commit 8fe28cb58bcb235034b64cbbb7550a8a43fd88be Author: Linus Torvalds Date: Sun Dec 23 15:55:59 2018 -0800 Linux 4.20 commit 3c730b1041aefa2a92b96fcba9db237d28585922 Merge: 9105b8aa50c1 ea5751ccd665 Author: Linus Torvalds Date: Sun Dec 23 10:40:41 2018 -0800 Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull vfs fixes from Al Viro: "A couple of fixes - no common topic ;-)" [ The aio spectre patch also came in from Jens, so now we have that doubly fixed .. ] * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: proc/sysctl: don't return ENOMEM on lookup when a table is unregistering aio: fix spectre gadget in lookup_ioctx commit 9105b8aa50c182371533fc97db64fc8f26f051b3 Merge: 1104bd96eb2a 61cce6f6eece Author: Linus Torvalds Date: Sat Dec 22 15:03:00 2018 -0800 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "This is two simple target fixes and one discard related I/O starvation problem in sd. The discard problem occurs because the discard page doesn't have a mempool backing so if the allocation fails due to memory pressure, we then lose the forward progress we require if the writeout is on the same device. The fix is to back it with a mempool" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: sd: use mempool for discard special page scsi: target: iscsi: cxgbit: add missing spin_lock_init() scsi: target: iscsi: cxgbit: fix csk leak commit 1104bd96eb2af9707dce69a22c63bd432a41380a Merge: 38c0ecf6087a 71391bdd2e9a Author: Linus Torvalds Date: Sat Dec 22 14:29:21 2018 -0800 Merge tag 'compiler-attributes-for-linus-v4.20' of https://github.com/ojeda/linux Pull compiler_types.h fix from Miguel Ojeda: "A cleanup for userspace in compiler_types.h: don't pollute userspace with macro definitions (Xiaozhou Liu) This is harmless for the kernel, but v4.19 was released with a few macros exposed to userspace as the patch explains; which this removes, so it *could* happen that we break something for someone (although leaving inline redefined is probably worse)" * tag 'compiler-attributes-for-linus-v4.20' of https://github.com/ojeda/linux: include/linux/compiler_types.h: don't pollute userspace with macro definitions commit 38c0ecf6087a8cb2af24ddd2124e9ca3c666dcdf Merge: 94f82008ce30 9bc30ab82108 Author: Linus Torvalds Date: Sat Dec 22 14:25:23 2018 -0800 Merge tag 'auxdisplay-for-linus-v4.20' of https://github.com/ojeda/linux Pull auxdisplay fix from Miguel Ojeda: "charlcd: fix x/y command parsing (Mans Rullgard)" * tag 'auxdisplay-for-linus-v4.20' of https://github.com/ojeda/linux: auxdisplay: charlcd: fix x/y command parsing commit 94f82008ce30e2624537d240d64ce718255e0b80 Author: Christian Brauner Date: Thu Jul 5 17:51:20 2018 +0200 Revert "vfs: Allow userns root to call mknod on owned filesystems." This reverts commit 55956b59df336f6738da916dbb520b6e37df9fbd. commit 55956b59df33 ("vfs: Allow userns root to call mknod on owned filesystems.") enabled mknod() in user namespaces for userns root if CAP_MKNOD is available. However, these device nodes are useless since any filesystem mounted from a non-initial user namespace will set the SB_I_NODEV flag on the filesystem. Now, when a device node s created in a non-initial user namespace a call to open() on said device node will fail due to: bool may_open_dev(const struct path *path) { return !(path->mnt->mnt_flags & MNT_NODEV) && !(path->mnt->mnt_sb->s_iflags & SB_I_NODEV); } The problem with this is that as of the aforementioned commit mknod() creates partially functional device nodes in non-initial user namespaces. In particular, it has the consequence that as of the aforementioned commit open() will be more privileged with respect to device nodes than mknod(). Before it was the other way around. Specifically, if mknod() succeeded then it was transparent for any userspace application that a fatal error must have occured when open() failed. All of this breaks multiple userspace workloads and a widespread assumption about how to handle mknod(). Basically, all container runtimes and systemd live by the slogan "ask for forgiveness not permission" when running user namespace workloads. For mknod() the assumption is that if the syscall succeeds the device nodes are useable irrespective of whether it succeeds in a non-initial user namespace or not. This logic was chosen explicitly to allow for the glorious day when mknod() will actually be able to create fully functional device nodes in user namespaces. A specific problem people are already running into when running 4.18 rc kernels are failing systemd services. For any distro that is run in a container systemd services started with the PrivateDevices= property set will fail to start since the device nodes in question cannot be opened (cf. the arguments in [1]). Full disclosure, Seth made the very sound argument that it is already possible to end up with partially functional device nodes. Any filesystem mounted with MS_NODEV set will allow mknod() to succeed but will not allow open() to succeed. The difference to the case here is that the MS_NODEV case is transparent to userspace since it is an explicitly set mount option while the SB_I_NODEV case is an implicit property enforced by the kernel and hence opaque to userspace. [1]: https://github.com/systemd/systemd/pull/9483 Signed-off-by: Christian Brauner Cc: "Eric W. Biederman" Cc: Seth Forshee Cc: Serge Hallyn Signed-off-by: Linus Torvalds commit 0cd60eb1a7b5421e92a3489e1829bfb2243e21e1 Author: Christoph Hellwig Date: Sat Dec 22 09:21:08 2018 +0100 dma-mapping: fix flags in dma_alloc_wc We really need the writecombine flag in dma_alloc_wc, fix a stupid oversight. Fixes: 7ed1d91a9e ("dma-mapping: translate __GFP_NOFAIL to DMA_ATTR_NO_WARN") Signed-off-by: Christoph Hellwig Signed-off-by: Linus Torvalds commit 23203e3f34c97f4ddd6e353adba45161880a52a4 Merge: 6cafab50eea3 17e2e7d7e1b8 Author: Linus Torvalds Date: Fri Dec 21 14:59:00 2018 -0800 Merge branch 'akpm' (patches from Andrew) Merge misc fixes from Andrew Morton: "4 fixes" * emailed patches from Andrew Morton : mm, page_alloc: fix has_unmovable_pages for HugePages fork,memcg: fix crash in free_thread_stack on memcg charge fail mm: thp: fix flags for pmd migration when split mm, memory_hotplug: initialize struct pages for the full memory section commit 17e2e7d7e1b83fa324b3f099bfe426659aa3c2a4 Author: Oscar Salvador Date: Fri Dec 21 14:31:00 2018 -0800 mm, page_alloc: fix has_unmovable_pages for HugePages While playing with gigantic hugepages and memory_hotplug, I triggered the following #PF when "cat memoryX/removable": BUG: unable to handle kernel NULL pointer dereference at 0000000000000008 #PF error: [normal kernel read fault] PGD 0 P4D 0 Oops: 0000 [#1] SMP PTI CPU: 1 PID: 1481 Comm: cat Tainted: G E 4.20.0-rc6-mm1-1-default+ #18 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.0.0-prebuilt.qemu-project.org 04/01/2014 RIP: 0010:has_unmovable_pages+0x154/0x210 Call Trace: is_mem_section_removable+0x7d/0x100 removable_show+0x90/0xb0 dev_attr_show+0x1c/0x50 sysfs_kf_seq_show+0xca/0x1b0 seq_read+0x133/0x380 __vfs_read+0x26/0x180 vfs_read+0x89/0x140 ksys_read+0x42/0x90 do_syscall_64+0x5b/0x180 entry_SYSCALL_64_after_hwframe+0x44/0xa9 The reason is we do not pass the Head to page_hstate(), and so, the call to compound_order() in page_hstate() returns 0, so we end up checking all hstates's size to match PAGE_SIZE. Obviously, we do not find any hstate matching that size, and we return NULL. Then, we dereference that NULL pointer in hugepage_migration_supported() and we got the #PF from above. Fix that by getting the head page before calling page_hstate(). Also, since gigantic pages span several pageblocks, re-adjust the logic for skipping pages. While are it, we can also get rid of the round_up(). [osalvador@suse.de: remove round_up(), adjust skip pages logic per Michal] Link: http://lkml.kernel.org/r/20181221062809.31771-1-osalvador@suse.de Link: http://lkml.kernel.org/r/20181217225113.17864-1-osalvador@suse.de Signed-off-by: Oscar Salvador Acked-by: Michal Hocko Reviewed-by: David Hildenbrand Cc: Vlastimil Babka Cc: Pavel Tatashin Cc: Mike Rapoport Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5eed6f1dff87bfb5e545935def3843edf42800f2 Author: Rik van Riel Date: Fri Dec 21 14:30:54 2018 -0800 fork,memcg: fix crash in free_thread_stack on memcg charge fail Commit 9b6f7e163cd0 ("mm: rework memcg kernel stack accounting") will result in fork failing if allocating a kernel stack for a task in dup_task_struct exceeds the kernel memory allowance for that cgroup. Unfortunately, it also results in a crash. This is due to the code jumping to free_stack and calling free_thread_stack when the memcg kernel stack charge fails, but without tsk->stack pointing at the freshly allocated stack. This in turn results in the vfree_atomic in free_thread_stack oopsing with a backtrace like this: #5 [ffffc900244efc88] die at ffffffff8101f0ab #6 [ffffc900244efcb8] do_general_protection at ffffffff8101cb86 #7 [ffffc900244efce0] general_protection at ffffffff818ff082 [exception RIP: llist_add_batch+7] RIP: ffffffff8150d487 RSP: ffffc900244efd98 RFLAGS: 00010282 RAX: 0000000000000000 RBX: ffff88085ef55980 RCX: 0000000000000000 RDX: ffff88085ef55980 RSI: 343834343531203a RDI: 343834343531203a RBP: ffffc900244efd98 R8: 0000000000000001 R9: ffff8808578c3600 R10: 0000000000000000 R11: 0000000000000001 R12: ffff88029f6c21c0 R13: 0000000000000286 R14: ffff880147759b00 R15: 0000000000000000 ORIG_RAX: ffffffffffffffff CS: 0010 SS: 0018 #8 [ffffc900244efda0] vfree_atomic at ffffffff811df2c7 #9 [ffffc900244efdb8] copy_process at ffffffff81086e37 #10 [ffffc900244efe98] _do_fork at ffffffff810884e0 #11 [ffffc900244eff10] sys_vfork at ffffffff810887ff #12 [ffffc900244eff20] do_syscall_64 at ffffffff81002a43 RIP: 000000000049b948 RSP: 00007ffcdb307830 RFLAGS: 00000246 RAX: ffffffffffffffda RBX: 0000000000896030 RCX: 000000000049b948 RDX: 0000000000000000 RSI: 00007ffcdb307790 RDI: 00000000005d7421 RBP: 000000000067370f R8: 00007ffcdb3077b0 R9: 000000000001ed00 R10: 0000000000000008 R11: 0000000000000246 R12: 0000000000000040 R13: 000000000000000f R14: 0000000000000000 R15: 000000000088d018 ORIG_RAX: 000000000000003a CS: 0033 SS: 002b The simplest fix is to assign tsk->stack right where it is allocated. Link: http://lkml.kernel.org/r/20181214231726.7ee4843c@imladris.surriel.com Fixes: 9b6f7e163cd0 ("mm: rework memcg kernel stack accounting") Signed-off-by: Rik van Riel Acked-by: Roman Gushchin Acked-by: Michal Hocko Cc: Shakeel Butt Cc: Johannes Weiner Cc: Tejun Heo Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2e83ee1d8694a61d0d95a5b694f2e61e8dde8627 Author: Peter Xu Date: Fri Dec 21 14:30:50 2018 -0800 mm: thp: fix flags for pmd migration when split When splitting a huge migrating PMD, we'll transfer all the existing PMD bits and apply them again onto the small PTEs. However we are fetching the bits unconditionally via pmd_soft_dirty(), pmd_write() or pmd_yound() while actually they don't make sense at all when it's a migration entry. Fix them up. Since at it, drop the ifdef together as not needed. Note that if my understanding is correct about the problem then if without the patch there is chance to lose some of the dirty bits in the migrating pmd pages (on x86_64 we're fetching bit 11 which is part of swap offset instead of bit 2) and it could potentially corrupt the memory of an userspace program which depends on the dirty bit. Link: http://lkml.kernel.org/r/20181213051510.20306-1-peterx@redhat.com Signed-off-by: Peter Xu Reviewed-by: Konstantin Khlebnikov Reviewed-by: William Kucharski Acked-by: Kirill A. Shutemov Cc: Andrea Arcangeli Cc: Matthew Wilcox Cc: Michal Hocko Cc: Dave Jiang Cc: "Aneesh Kumar K.V" Cc: Souptick Joarder Cc: Konstantin Khlebnikov Cc: Zi Yan Cc: [4.14+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2830bf6f05fb3e05bc4743274b806c821807a684 Author: Mikhail Zaslonko Date: Fri Dec 21 14:30:46 2018 -0800 mm, memory_hotplug: initialize struct pages for the full memory section If memory end is not aligned with the sparse memory section boundary, the mapping of such a section is only partly initialized. This may lead to VM_BUG_ON due to uninitialized struct page access from is_mem_section_removable() or test_pages_in_a_zone() function triggered by memory_hotplug sysfs handlers: Here are the the panic examples: CONFIG_DEBUG_VM=y CONFIG_DEBUG_VM_PGFLAGS=y kernel parameter mem=2050M -------------------------- page:000003d082008000 is uninitialized and poisoned page dumped because: VM_BUG_ON_PAGE(PagePoisoned(p)) Call Trace: ( test_pages_in_a_zone+0xde/0x160) show_valid_zones+0x5c/0x190 dev_attr_show+0x34/0x70 sysfs_kf_seq_show+0xc8/0x148 seq_read+0x204/0x480 __vfs_read+0x32/0x178 vfs_read+0x82/0x138 ksys_read+0x5a/0xb0 system_call+0xdc/0x2d8 Last Breaking-Event-Address: test_pages_in_a_zone+0xde/0x160 Kernel panic - not syncing: Fatal exception: panic_on_oops kernel parameter mem=3075M -------------------------- page:000003d08300c000 is uninitialized and poisoned page dumped because: VM_BUG_ON_PAGE(PagePoisoned(p)) Call Trace: ( is_mem_section_removable+0xb4/0x190) show_mem_removable+0x9a/0xd8 dev_attr_show+0x34/0x70 sysfs_kf_seq_show+0xc8/0x148 seq_read+0x204/0x480 __vfs_read+0x32/0x178 vfs_read+0x82/0x138 ksys_read+0x5a/0xb0 system_call+0xdc/0x2d8 Last Breaking-Event-Address: is_mem_section_removable+0xb4/0x190 Kernel panic - not syncing: Fatal exception: panic_on_oops Fix the problem by initializing the last memory section of each zone in memmap_init_zone() till the very end, even if it goes beyond the zone end. Michal said: : This has alwways been problem AFAIU. It just went unnoticed because we : have zeroed memmaps during allocation before f7f99100d8d9 ("mm: stop : zeroing memory during allocation in vmemmap") and so the above test : would simply skip these ranges as belonging to zone 0 or provided a : garbage. : : So I guess we do care for post f7f99100d8d9 kernels mostly and : therefore Fixes: f7f99100d8d9 ("mm: stop zeroing memory during : allocation in vmemmap") Link: http://lkml.kernel.org/r/20181212172712.34019-2-zaslonko@linux.ibm.com Fixes: f7f99100d8d9 ("mm: stop zeroing memory during allocation in vmemmap") Signed-off-by: Mikhail Zaslonko Reviewed-by: Gerald Schaefer Suggested-by: Michal Hocko Acked-by: Michal Hocko Reported-by: Mikhail Gavrilov Tested-by: Mikhail Gavrilov Cc: Dave Hansen Cc: Alexander Duyck Cc: Pasha Tatashin Cc: Martin Schwidefsky Cc: Heiko Carstens Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6cafab50eea327e0d198cc9579a60440fc959756 Merge: 87935eee5770 d430aff8cd0c Author: Linus Torvalds Date: Fri Dec 21 14:23:57 2018 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc Pull sparc fixes from David Miller: "Just some small fixes here and there, and a refcount leak in a serial driver, nothing serious" * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc: serial/sunsu: fix refcount leak sparc: Set "ARCH: sunxx" information on the same line sparc: vdso: Drop implicit common-page-size linker flag commit 87935eee57705e9b6df506c5df8b92d6a0b77a51 Merge: 5092adb2272e d667044f4951 Author: Linus Torvalds Date: Fri Dec 21 14:21:17 2018 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull more networking fixes from David Miller: "Some more bug fixes have trickled in, we have: 1) Local MAC entries properly in mscc driver, from Allan W. Nielsen. 2) Eric Dumazet found some more of the typical "pskb_may_pull() --> oops forgot to reload the header pointer" bugs in ipv6 tunnel handling. 3) Bad SKB socket pointer in ipv6 fragmentation handling, from Herbert Xu. 4) Overflow fix in sk_msg_clone(), from Vakul Garg. 5) Validate address lengths in AF_PACKET, from Willem de Bruijn" * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: qmi_wwan: Fix qmap header retrieval in qmimux_rx_fixup qmi_wwan: Add support for Fibocom NL678 series tls: Do not call sk_memcopy_from_iter with zero length ipv6: tunnels: fix two use-after-free Prevent overflow of sk_msg in sk_msg_clone() packet: validate address length net: netxen: fix a missing check and an uninitialized use tcp: fix a race in inet_diag_dump_icsk() MAINTAINERS: update cxgb4 and cxgb3 maintainer ipv6: frags: Fix bogus skb->sk in reassembled packets mscc: Configured MAC entries should be locked. commit 9bc30ab82108e6a34dc63bf956b49edf71b1681a Author: Mans Rullgard Date: Wed Dec 5 13:52:47 2018 +0000 auxdisplay: charlcd: fix x/y command parsing The x/y command parsing has been broken since commit 129957069e6a ("staging: panel: Fixed checkpatch warning about simple_strtoul()"). Commit b34050fadb86 ("auxdisplay: charlcd: Fix and clean up handling of x/y commands") fixed some problems by rewriting the parsing code, but also broke things further by removing the check for a complete command before attempting to parse it. As a result, parsing is terminated at the first x or y character. This reinstates the check for a final semicolon. Whereas the original code use strchr(), this is wasteful seeing as the semicolon is always at the end of the buffer. Thus check this character directly instead. Signed-off-by: Mans Rullgard Signed-off-by: Miguel Ojeda commit d430aff8cd0c57502d873909c184e3b5753f8b88 Author: Yangtao Li Date: Wed Dec 12 11:01:45 2018 -0500 serial/sunsu: fix refcount leak 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. su_get_type() doesn't do that. The match 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. 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: David S. Miller commit afaffac36806db34edcbd20f04258b1fcda192c1 Author: Corentin Labbe Date: Tue Dec 11 12:11:09 2018 +0000 sparc: Set "ARCH: sunxx" information on the same line While checking boot log from SPARC qemu, I saw that the "ARCH: sunxx" information was split on two different line. This patchs merge both line together. In the meantime, thoses information need to be printed via pr_info since printk print them by default via the warning loglevel. Signed-off-by: Corentin Labbe Signed-off-by: David S. Miller commit 0ff70f62c6a7eb5521ab340624de4c19f0c0881c Author: ndesaulniers@google.com Date: Mon Dec 10 14:35:13 2018 -0800 sparc: 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/sparc/vdso/Makefile sets it to the architecture default, which is implicit and redundant. Drop it. Link: https://lkml.kernel.org/r/20181206191231.192355-1-ndesaulniers@google.com Signed-off-by: Nick Desaulniers Signed-off-by: David S. Miller commit 5092adb2272e1760030a889aa4a3e9cf1d5f74b5 Merge: e572fa0e8401 3cf85f9f6bd7 Author: Linus Torvalds Date: Fri Dec 21 11:15:36 2018 -0800 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull kvm fix from Paolo Bonzini: "A simple patch for a pretty bad bug: Unbreak AMD nested virtualization." * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: KVM: x86: nSVM: fix switch to guest mmu commit d667044f49513d55fcfefe4fa8f8d96091782901 Author: Daniele Palmas Date: Fri Dec 21 13:07:23 2018 +0100 qmi_wwan: Fix qmap header retrieval in qmimux_rx_fixup This patch fixes qmap header retrieval when modem is configured for dl data aggregation. Signed-off-by: Daniele Palmas Signed-off-by: David S. Miller commit e572fa0e840154d33a69622af030dda551eee606 Merge: d5fa080d4cea 0e334db6bb4b Author: Linus Torvalds Date: Fri Dec 21 10:51:54 2018 -0800 Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull timer fix from Ingo Molnar: "Fix a division by zero crash in the posix-timers code" * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: posix-timers: Fix division by zero bug commit 7c3db4105ce8d69bcb5c04bfa9acd1e9119af8d5 Author: Jörgen Storvist Date: Fri Dec 21 15:38:52 2018 +0100 qmi_wwan: Add support for Fibocom NL678 series Added support for Fibocom NL678 series cellular module QMI interface. Using QMI_QUIRK_SET_DTR required for Qualcomm MDM9x40 series chipsets. Signed-off-by: Jörgen Storvist Signed-off-by: David S. Miller commit 65a10e28aee72903a41670170cd5330ad73c490e Author: Vakul Garg Date: Fri Dec 21 15:16:52 2018 +0000 tls: Do not call sk_memcopy_from_iter with zero length In some conditions e.g. when tls_clone_plaintext_msg() returns -ENOSPC, the number of bytes to be copied using subsequent function sk_msg_memcopy_from_iter() becomes zero. This causes function sk_msg_memcopy_from_iter() to fail which in turn causes tls_sw_sendmsg() to return failure. To prevent it, do not call sk_msg_memcopy_from_iter() when number of bytes to copy (indicated by 'try_to_copy') is zero. Fixes: d829e9c4112b ("tls: convert to generic sk_msg interface") Signed-off-by: Vakul Garg Signed-off-by: David S. Miller commit d5fa080d4ceaa8fec0fb28e27c7447caf4b4d22b Merge: 70ad6368e878 da791a667536 Author: Linus Torvalds Date: Fri Dec 21 10:11:51 2018 -0800 Merge branch 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull futex fix from Ingo Molnar: "A single fix for a robust futexes race between sys_exit() and sys_futex_lock_pi()" * 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: futex: Cure exit race commit 70ad6368e878857db315788dab36817aa992c86a Merge: 96d6ee7d2f81 6ac389346e69 Author: Linus Torvalds Date: Fri Dec 21 09:22:24 2018 -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: "The biggest part is a series of reverts for the macro based GCC inlining workarounds. It caused regressions in distro build and other kernel tooling environments, and the GCC project was very receptive to fixing the underlying inliner weaknesses - so as time ran out we decided to do a reasonably straightforward revert of the patches. The plan is to rely on the 'asm inline' GCC 9 feature, which might be backported to GCC 8 and could thus become reasonably widely available on modern distros. Other than those reverts, there's misc fixes from all around the place. I wish our final x86 pull request for v4.20 was smaller..." * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: Revert "kbuild/Makefile: Prepare for using macros in inline assembly code to work around asm() related GCC inlining bugs" Revert "x86/objtool: Use asm macros to work around GCC inlining bugs" Revert "x86/refcount: Work around GCC inlining bug" Revert "x86/alternatives: Macrofy lock prefixes to work around GCC inlining bugs" Revert "x86/bug: Macrofy the BUG table section handling, to work around GCC inlining bugs" Revert "x86/paravirt: Work around GCC inlining bugs when compiling paravirt ops" Revert "x86/extable: Macrofy inline assembly code to work around GCC inlining bugs" Revert "x86/cpufeature: Macrofy inline assembly code to work around GCC inlining bugs" Revert "x86/jump-labels: Macrofy inline assembly code to work around GCC inlining bugs" x86/mtrr: Don't copy uninitialized gentry fields back to userspace x86/fsgsbase/64: Fix the base write helper functions x86/mm/cpa: Fix cpa_flush_array() TLB invalidation x86/vdso: Pass --eh-frame-hdr to the linker x86/mm: Fix decoy address handling vs 32-bit builds x86/intel_rdt: Ensure a CPU remains online for the region's pseudo-locking sequence x86/dump_pagetables: Fix LDT remap address marker x86/mm: Fix guard hole handling commit cbb49697d5512ce9e61b45ce75d3ee43d7ea5524 Author: Eric Dumazet Date: Fri Dec 21 07:47:51 2018 -0800 ipv6: tunnels: fix two use-after-free xfrm6_policy_check() might have re-allocated skb->head, we need to reload ipv6 header pointer. sysbot reported : BUG: KASAN: use-after-free in __ipv6_addr_type+0x302/0x32f net/ipv6/addrconf_core.c:40 Read of size 4 at addr ffff888191b8cb70 by task syz-executor2/1304 CPU: 0 PID: 1304 Comm: syz-executor2 Not tainted 4.20.0-rc7+ #356 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+0x244/0x39d lib/dump_stack.c:113 print_address_description.cold.7+0x9/0x1ff mm/kasan/report.c:256 kasan_report_error mm/kasan/report.c:354 [inline] kasan_report.cold.8+0x242/0x309 mm/kasan/report.c:412 __asan_report_load4_noabort+0x14/0x20 mm/kasan/report.c:432 __ipv6_addr_type+0x302/0x32f net/ipv6/addrconf_core.c:40 ipv6_addr_type include/net/ipv6.h:403 [inline] ip6_tnl_get_cap+0x27/0x190 net/ipv6/ip6_tunnel.c:727 ip6_tnl_rcv_ctl+0xdb/0x2a0 net/ipv6/ip6_tunnel.c:757 vti6_rcv+0x336/0x8f3 net/ipv6/ip6_vti.c:321 xfrm6_ipcomp_rcv+0x1a5/0x3a0 net/ipv6/xfrm6_protocol.c:132 ip6_protocol_deliver_rcu+0x372/0x1940 net/ipv6/ip6_input.c:394 ip6_input_finish+0x84/0x170 net/ipv6/ip6_input.c:434 NF_HOOK include/linux/netfilter.h:289 [inline] ip6_input+0xe9/0x600 net/ipv6/ip6_input.c:443 IPVS: ftp: loaded support on port[0] = 21 ip6_mc_input+0x514/0x11c0 net/ipv6/ip6_input.c:537 dst_input include/net/dst.h:450 [inline] ip6_rcv_finish+0x17a/0x330 net/ipv6/ip6_input.c:76 NF_HOOK include/linux/netfilter.h:289 [inline] ipv6_rcv+0x115/0x640 net/ipv6/ip6_input.c:272 __netif_receive_skb_one_core+0x14d/0x200 net/core/dev.c:4973 __netif_receive_skb+0x2c/0x1e0 net/core/dev.c:5083 process_backlog+0x24e/0x7a0 net/core/dev.c:5923 napi_poll net/core/dev.c:6346 [inline] net_rx_action+0x7fa/0x19b0 net/core/dev.c:6412 __do_softirq+0x308/0xb7e kernel/softirq.c:292 do_softirq_own_stack+0x2a/0x40 arch/x86/entry/entry_64.S:1027 do_softirq.part.14+0x126/0x160 kernel/softirq.c:337 do_softirq+0x19/0x20 kernel/softirq.c:340 netif_rx_ni+0x521/0x860 net/core/dev.c:4569 dev_loopback_xmit+0x287/0x8c0 net/core/dev.c:3576 NF_HOOK include/linux/netfilter.h:289 [inline] ip6_finish_output2+0x193a/0x2930 net/ipv6/ip6_output.c:84 ip6_fragment+0x2b06/0x3850 net/ipv6/ip6_output.c:727 ip6_finish_output+0x6b7/0xc50 net/ipv6/ip6_output.c:152 NF_HOOK_COND include/linux/netfilter.h:278 [inline] ip6_output+0x232/0x9d0 net/ipv6/ip6_output.c:171 dst_output include/net/dst.h:444 [inline] ip6_local_out+0xc5/0x1b0 net/ipv6/output_core.c:176 ip6_send_skb+0xbc/0x340 net/ipv6/ip6_output.c:1727 ip6_push_pending_frames+0xc5/0xf0 net/ipv6/ip6_output.c:1747 rawv6_push_pending_frames net/ipv6/raw.c:615 [inline] rawv6_sendmsg+0x3a3e/0x4b40 net/ipv6/raw.c:945 kobject: 'queues' (0000000089e6eea2): kobject_add_internal: parent: 'tunl0', set: '' kobject: 'queues' (0000000089e6eea2): kobject_uevent_env inet_sendmsg+0x1a1/0x690 net/ipv4/af_inet.c:798 kobject: 'queues' (0000000089e6eea2): kobject_uevent_env: filter function caused the event to drop! sock_sendmsg_nosec net/socket.c:621 [inline] sock_sendmsg+0xd5/0x120 net/socket.c:631 sock_write_iter+0x35e/0x5c0 net/socket.c:900 call_write_iter include/linux/fs.h:1857 [inline] new_sync_write fs/read_write.c:474 [inline] __vfs_write+0x6b8/0x9f0 fs/read_write.c:487 kobject: 'rx-0' (00000000e2d902d9): kobject_add_internal: parent: 'queues', set: 'queues' kobject: 'rx-0' (00000000e2d902d9): kobject_uevent_env vfs_write+0x1fc/0x560 fs/read_write.c:549 ksys_write+0x101/0x260 fs/read_write.c:598 kobject: 'rx-0' (00000000e2d902d9): fill_kobj_path: path = '/devices/virtual/net/tunl0/queues/rx-0' __do_sys_write fs/read_write.c:610 [inline] __se_sys_write fs/read_write.c:607 [inline] __x64_sys_write+0x73/0xb0 fs/read_write.c:607 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290 kobject: 'tx-0' (00000000443b70ac): kobject_add_internal: parent: 'queues', set: 'queues' entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x457669 Code: fd b3 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 cb b3 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f9bd200bc78 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000457669 RDX: 000000000000058f RSI: 00000000200033c0 RDI: 0000000000000003 kobject: 'tx-0' (00000000443b70ac): kobject_uevent_env RBP: 000000000072bf00 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f9bd200c6d4 R13: 00000000004c2dcc R14: 00000000004da398 R15: 00000000ffffffff Allocated by task 1304: save_stack+0x43/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] kasan_kmalloc+0xc7/0xe0 mm/kasan/kasan.c:553 __do_kmalloc_node mm/slab.c:3684 [inline] __kmalloc_node_track_caller+0x50/0x70 mm/slab.c:3698 __kmalloc_reserve.isra.41+0x41/0xe0 net/core/skbuff.c:140 __alloc_skb+0x155/0x760 net/core/skbuff.c:208 kobject: 'tx-0' (00000000443b70ac): fill_kobj_path: path = '/devices/virtual/net/tunl0/queues/tx-0' alloc_skb include/linux/skbuff.h:1011 [inline] __ip6_append_data.isra.49+0x2f1a/0x3f50 net/ipv6/ip6_output.c:1450 ip6_append_data+0x1bc/0x2d0 net/ipv6/ip6_output.c:1619 rawv6_sendmsg+0x15ab/0x4b40 net/ipv6/raw.c:938 inet_sendmsg+0x1a1/0x690 net/ipv4/af_inet.c:798 sock_sendmsg_nosec net/socket.c:621 [inline] sock_sendmsg+0xd5/0x120 net/socket.c:631 ___sys_sendmsg+0x7fd/0x930 net/socket.c:2116 __sys_sendmsg+0x11d/0x280 net/socket.c:2154 __do_sys_sendmsg net/socket.c:2163 [inline] __se_sys_sendmsg net/socket.c:2161 [inline] __x64_sys_sendmsg+0x78/0xb0 net/socket.c:2161 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe kobject: 'gre0' (00000000cb1b2d7b): kobject_add_internal: parent: 'net', set: 'devices' Freed by task 1304: save_stack+0x43/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/kasan.c:521 kasan_slab_free+0xe/0x10 mm/kasan/kasan.c:528 __cache_free mm/slab.c:3498 [inline] kfree+0xcf/0x230 mm/slab.c:3817 skb_free_head+0x93/0xb0 net/core/skbuff.c:553 pskb_expand_head+0x3b2/0x10d0 net/core/skbuff.c:1498 __pskb_pull_tail+0x156/0x18a0 net/core/skbuff.c:1896 pskb_may_pull include/linux/skbuff.h:2188 [inline] _decode_session6+0xd11/0x14d0 net/ipv6/xfrm6_policy.c:150 __xfrm_decode_session+0x71/0x140 net/xfrm/xfrm_policy.c:3272 kobject: 'gre0' (00000000cb1b2d7b): kobject_uevent_env __xfrm_policy_check+0x380/0x2c40 net/xfrm/xfrm_policy.c:3322 __xfrm_policy_check2 include/net/xfrm.h:1170 [inline] xfrm_policy_check include/net/xfrm.h:1175 [inline] xfrm6_policy_check include/net/xfrm.h:1185 [inline] vti6_rcv+0x4bd/0x8f3 net/ipv6/ip6_vti.c:316 xfrm6_ipcomp_rcv+0x1a5/0x3a0 net/ipv6/xfrm6_protocol.c:132 ip6_protocol_deliver_rcu+0x372/0x1940 net/ipv6/ip6_input.c:394 ip6_input_finish+0x84/0x170 net/ipv6/ip6_input.c:434 NF_HOOK include/linux/netfilter.h:289 [inline] ip6_input+0xe9/0x600 net/ipv6/ip6_input.c:443 ip6_mc_input+0x514/0x11c0 net/ipv6/ip6_input.c:537 dst_input include/net/dst.h:450 [inline] ip6_rcv_finish+0x17a/0x330 net/ipv6/ip6_input.c:76 NF_HOOK include/linux/netfilter.h:289 [inline] ipv6_rcv+0x115/0x640 net/ipv6/ip6_input.c:272 __netif_receive_skb_one_core+0x14d/0x200 net/core/dev.c:4973 __netif_receive_skb+0x2c/0x1e0 net/core/dev.c:5083 process_backlog+0x24e/0x7a0 net/core/dev.c:5923 kobject: 'gre0' (00000000cb1b2d7b): fill_kobj_path: path = '/devices/virtual/net/gre0' napi_poll net/core/dev.c:6346 [inline] net_rx_action+0x7fa/0x19b0 net/core/dev.c:6412 __do_softirq+0x308/0xb7e kernel/softirq.c:292 The buggy address belongs to the object at ffff888191b8cac0 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 176 bytes inside of 512-byte region [ffff888191b8cac0, ffff888191b8ccc0) The buggy address belongs to the page: page:ffffea000646e300 count:1 mapcount:0 mapping:ffff8881da800940 index:0x0 flags: 0x2fffc0000000200(slab) raw: 02fffc0000000200 ffffea0006eaaa48 ffffea00065356c8 ffff8881da800940 raw: 0000000000000000 ffff888191b8c0c0 0000000100000006 0000000000000000 page dumped because: kasan: bad access detected kobject: 'queues' (000000005fd6226e): kobject_add_internal: parent: 'gre0', set: '' Memory state around the buggy address: ffff888191b8ca00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888191b8ca80: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb >ffff888191b8cb00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888191b8cb80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888191b8cc00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb Fixes: 0d3c703a9d17 ("ipv6: Cleanup IPv6 tunnel receive path") Fixes: ed1efb2aefbb ("ipv6: Add support for IPsec virtual tunnel interfaces") Signed-off-by: Eric Dumazet Cc: Steffen Klassert Signed-off-by: David S. Miller commit 96d6ee7d2f8110f6f3460eab5d3826a6f1ca058d Merge: 0b517333721c b6aac625e579 Author: Linus Torvalds Date: Fri Dec 21 09:17:52 2018 -0800 Merge tag 'drm-fixes-2018-12-21' of git://anongit.freedesktop.org/drm/drm Pull final drm fix from Daniel Vetter: "Very calm week, so either everything perfect or everyone on holidays already. Just one array_index_nospec patch, also for stable" * tag 'drm-fixes-2018-12-21' of git://anongit.freedesktop.org/drm/drm: drm/ioctl: Fix Spectre v1 vulnerabilities commit 5c1e7e94a7faca70760f5a2939c6a6bb0e18a5d4 Author: Vakul Garg Date: Fri Dec 21 15:55:46 2018 +0000 Prevent overflow of sk_msg in sk_msg_clone() Fixed function sk_msg_clone() to prevent overflow of 'dst' while adding pages in scatterlist entries. The overflow of 'dst' causes crash in kernel tls module while doing record encryption. Crash fixed by this patch. [ 78.796119] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000008 [ 78.804900] Mem abort info: [ 78.807683] ESR = 0x96000004 [ 78.810744] Exception class = DABT (current EL), IL = 32 bits [ 78.816677] SET = 0, FnV = 0 [ 78.819727] EA = 0, S1PTW = 0 [ 78.822873] Data abort info: [ 78.825759] ISV = 0, ISS = 0x00000004 [ 78.829600] CM = 0, WnR = 0 [ 78.832576] user pgtable: 4k pages, 48-bit VAs, pgdp = 00000000bf8ee311 [ 78.839195] [0000000000000008] pgd=0000000000000000 [ 78.844081] Internal error: Oops: 96000004 [#1] PREEMPT SMP [ 78.849642] Modules linked in: tls xt_conntrack ipt_REJECT nf_reject_ipv4 ip6table_filter ip6_tables xt_CHECKSUM cpve cpufreq_conservative lm90 ina2xx crct10dif_ce [ 78.865377] CPU: 0 PID: 6007 Comm: openssl Not tainted 4.20.0-rc6-01647-g754d5da63145-dirty #107 [ 78.874149] Hardware name: LS1043A RDB Board (DT) [ 78.878844] pstate: 60000005 (nZCv daif -PAN -UAO) [ 78.883632] pc : scatterwalk_copychunks+0x164/0x1c8 [ 78.888500] lr : scatterwalk_copychunks+0x160/0x1c8 [ 78.893366] sp : ffff00001d04b600 [ 78.896668] x29: ffff00001d04b600 x28: ffff80006814c680 [ 78.901970] x27: 0000000000000000 x26: ffff80006c8de786 [ 78.907272] x25: ffff00001d04b760 x24: 000000000000001a [ 78.912573] x23: 0000000000000006 x22: ffff80006814e440 [ 78.917874] x21: 0000000000000100 x20: 0000000000000000 [ 78.923175] x19: 000081ffffffffff x18: 0000000000000400 [ 78.928476] x17: 0000000000000008 x16: 0000000000000000 [ 78.933778] x15: 0000000000000100 x14: 0000000000000001 [ 78.939079] x13: 0000000000001080 x12: 0000000000000020 [ 78.944381] x11: 0000000000001080 x10: 00000000ffff0002 [ 78.949683] x9 : ffff80006814c248 x8 : 00000000ffff0000 [ 78.954985] x7 : ffff80006814c318 x6 : ffff80006c8de786 [ 78.960286] x5 : 0000000000000f80 x4 : ffff80006c8de000 [ 78.965588] x3 : 0000000000000000 x2 : 0000000000001086 [ 78.970889] x1 : ffff7e0001b74e02 x0 : 0000000000000000 [ 78.976192] Process openssl (pid: 6007, stack limit = 0x00000000291367f9) [ 78.982968] Call trace: [ 78.985406] scatterwalk_copychunks+0x164/0x1c8 [ 78.989927] skcipher_walk_next+0x28c/0x448 [ 78.994099] skcipher_walk_done+0xfc/0x258 [ 78.998187] gcm_encrypt+0x434/0x4c0 [ 79.001758] tls_push_record+0x354/0xa58 [tls] [ 79.006194] bpf_exec_tx_verdict+0x1e4/0x3e8 [tls] [ 79.010978] tls_sw_sendmsg+0x650/0x780 [tls] [ 79.015326] inet_sendmsg+0x2c/0xf8 [ 79.018806] sock_sendmsg+0x18/0x30 [ 79.022284] __sys_sendto+0x104/0x138 [ 79.025935] __arm64_sys_sendto+0x24/0x30 [ 79.029936] el0_svc_common+0x60/0xe8 [ 79.033588] el0_svc_handler+0x2c/0x80 [ 79.037327] el0_svc+0x8/0xc [ 79.040200] Code: 6b01005f 54fff788 940169b1 f9000320 (b9400801) [ 79.046283] ---[ end trace 74db007d069c1cf7 ]--- Fixes: d829e9c4112b ("tls: convert to generic sk_msg interface") Signed-off-by: Vakul Garg Acked-by: John Fastabend Signed-off-by: David S. Miller commit 99137b7888f4058087895d035d81c6b2d31015c5 Author: Willem de Bruijn Date: Fri Dec 21 12:06:59 2018 -0500 packet: validate address length Packet sockets with SOCK_DGRAM may pass an address for use in dev_hard_header. Ensure that it is of sufficient length. Reported-by: syzbot Signed-off-by: Willem de Bruijn Signed-off-by: David S. Miller commit 0b517333721c1b7a740e54b1cbe78a14884d51e7 Merge: bc380733a5e7 7a71712293ba Author: Linus Torvalds Date: Fri Dec 21 09:09:30 2018 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input fixes from Dmitry Torokhov: "Switching a few devices with Synaptics over to SMbus and disabling SMbus on a couple devices with Elan touchpads as they need more plumbing on PS/2 side" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: synaptics - enable SMBus for HP EliteBook 840 G4 Input: elantech - disable elan-i2c for P52 and P72 Input: synaptics - enable RMI on ThinkPad T560 Input: omap-keypad - fix idle configuration to not block SoC idle states commit bc380733a5e77ccc3b4d4622595e42f1b0902d66 Merge: 783619556a56 c8da642d41a6 Author: Linus Torvalds Date: Fri Dec 21 09:05:28 2018 -0800 Merge tag 'gpio-v4.20-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio Pull GPIO fixes from Linus Walleij: "Hopefully last round of GPIO fixes. The ACPI patch is pretty important for some laptop users, the rest is driver-specific for embedded (mostly ARM) systems. I took out one ACPI patch that wasn't critical enough because I couldn't justify sending it at this point, and that is why the commit date is today, but the patches have been in linux-next. Sorry for not sending some of them earlier :( Notice that we have a co-maintainer for GPIO now, Bartosz Golaszewski, and he might jump in and make some pull requests at times when I am off. Summary: - ACPI IRQ request deferral - OMAP: revert deferred wakeup quirk - MAX7301: fix DMA safe memory handling - MVEBU: selective probe failure on missing clk" * tag 'gpio-v4.20-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: gpio: mvebu: only fail on missing clk if pwm is actually to be used gpio: max7301: fix driver for use with CONFIG_VMAP_STACK gpio: gpio-omap: Revert deferred wakeup quirk handling for regressions gpiolib-acpi: Only defer request_irq for GpioInt ACPI event handlers commit d134e486e831defd26130770181f01dfc6195f7d Author: Kangjie Lu Date: Fri Dec 21 00:22:32 2018 -0600 net: netxen: fix a missing check and an uninitialized use When netxen_rom_fast_read() fails, "bios" is left uninitialized and may contain random value, thus should not be used. The fix ensures that if netxen_rom_fast_read() fails, we return "-EIO". Signed-off-by: Kangjie Lu Signed-off-by: David S. Miller commit 783619556a560919ed2113261042ce53a186d8cc Merge: 9097a058d49e 271b9c0c8007 Author: Linus Torvalds Date: Fri Dec 21 08:56:31 2018 -0800 Merge tag '4.20-rc7-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6 Pull smb3 fix from Steve French: "An important smb3 fix for an regression to some servers introduced by compounding optimization to rmdir. This fix has been tested by multiple developers (including me) with the usual private xfstesting, but also by the new cifs/smb3 "buildbot" xfstest VMs (thank you Ronnie and Aurelien for good work on this automation). The automated testing has been updated so that it will catch problems like this in the future. Note that Pavel discovered (very recently) some unrelated but extremely important bugs in credit handling (smb3 flow control problem that can lead to disconnects/reconnects) when compounding, that I would have liked to send in ASAP but the complete testing of those two fixes may not be done in time and have to wait for 4.21" * tag '4.20-rc7-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6: smb3: Fix rmdir compounding regression to strict servers commit 7a71712293ba303aad928f580b89addb0be2892e Author: Mantas Mikulėnas Date: Fri Dec 21 01:04:26 2018 -0800 Input: synaptics - enable SMBus for HP EliteBook 840 G4 dmesg reports that "Your touchpad (PNP: SYN3052 SYN0100 SYN0002 PNP0f13) says it can support a different bus." I've tested the offered psmouse.synaptics_intertouch=1 with 4.18.x and 4.19.x and it seems to work well. No problems seen with suspend/resume. Also, it appears that RMI/SMBus mode is actually required for 3-4 finger multitouch gestures to work -- otherwise they are not reported at all. Information from dmesg in both modes: psmouse serio3: synaptics: Touchpad model: 1, fw: 8.2, id: 0x1e2b1, caps: 0xf00123/0x840300/0x2e800/0x0, board id: 3139, fw id: 2000742 psmouse serio3: synaptics: Trying to set up SMBus access rmi4_smbus 6-002c: registering SMbus-connected sensor rmi4_f01 rmi4-00.fn01: found RMI device, manufacturer: Synaptics, product: TM3139-001, fw id: 2000742 Signed-off-by: Mantas Mikulėnas Reviewed-by: Benjamin Tissoires Signed-off-by: Dmitry Torokhov commit d21ff5d7f8c397261e095393a1a8e199934720bc Author: Benjamin Tissoires Date: Fri Dec 21 00:42:38 2018 -0800 Input: elantech - disable elan-i2c for P52 and P72 The current implementation of elan_i2c is known to not support those 2 laptops. A proper fix is to tweak both elantech and elan_i2c to transmit the correct information from PS/2, which would make a bad candidate for stable. So to give us some time for fixing the root of the problem, disable elan_i2c for the devices we know are not behaving properly. Link: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1803600 Link: https://bugs.archlinux.org/task/59714 Fixes: df077237cf55 Input: elantech - detect new ICs and setup Host Notify for them Cc: stable@vger.kernel.org # v4.18+ Signed-off-by: Benjamin Tissoires Acked-by: Peter Hutterer Signed-off-by: Dmitry Torokhov commit c8da642d41a6811c21177c9994aa7dc35be67d46 Author: Uwe Kleine-König Date: Mon Dec 17 09:43:13 2018 +0100 gpio: mvebu: only fail on missing clk if pwm is actually to be used The gpio IP on Armada 370 at offset 0x18180 has neither a clk nor pwm registers. So there is no need for a clk as the pwm isn't used anyhow. So only check for the clk in the presence of the pwm registers. This fixes a failure to probe the gpio driver for the above mentioned gpio device. Fixes: 757642f9a584 ("gpio: mvebu: Add limited PWM support") Signed-off-by: Uwe Kleine-König Reviewed-by: Gregory CLEMENT Signed-off-by: Linus Walleij commit abf221d2f51b8ce7b9959a8953f880a8b0a1400d Author: Christophe Leroy Date: Fri Dec 7 13:07:55 2018 +0000 gpio: max7301: fix driver for use with CONFIG_VMAP_STACK spi_read() and spi_write() require DMA-safe memory. When CONFIG_VMAP_STACK is selected, those functions cannot be used with buffers on stack. This patch replaces calls to spi_read() and spi_write() by spi_write_then_read() which doesn't require DMA-safe buffers. Fixes: 0c36ec314735 ("gpio: gpio driver for max7301 SPI GPIO expander") Cc: Signed-off-by: Christophe Leroy Signed-off-by: Linus Walleij commit 00ded24c33c586eaaf32764898c56f4a7d8c6d5c Author: Tony Lindgren Date: Fri Dec 7 11:08:29 2018 -0800 gpio: gpio-omap: Revert deferred wakeup quirk handling for regressions Commit ec0daae685b2 ("gpio: omap: Add level wakeup handling for omap4 based SoCs") attempted to fix omap4 GPIO wakeup handling as it was blocking deeper SoC idle states. However this caused a regression for GPIOs during runtime having over second long latencies for Ethernet GPIO interrupt as reportedy by Russell King . Let's fix this issue by doing a partial revert of the breaking commit. We still want to keep the quirk handling around as it is also used for OMAP_GPIO_QUIRK_IDLE_REMOVE_TRIGGER. The real fix for omap4 GPIO wakeup handling involves fixes for omap_set_gpio_trigger() and omap_gpio_unmask_irq() and will be posted separately. And we must keep the wakeup bit enabled during runtime because of module doing clock autogating with autoidle configured. Reported-by: Russell King Fixes: ec0daae685b2 ("gpio: omap: Add level wakeup handling for omap4 based SoCs") Cc: Aaro Koskinen Cc: Grygorii Strashko Cc: Keerthy Cc: Ladislav Michl Cc: Russell King Cc: Tero Kristo Signed-off-by: Tony Lindgren Signed-off-by: Linus Walleij commit f0c928d878e7d01b613c9ae5c971a6b1e473a938 Author: Eric Dumazet Date: Thu Dec 20 15:28:56 2018 -0800 tcp: fix a race in inet_diag_dump_icsk() Alexei reported use after frees in inet_diag_dump_icsk() [1] Because we use refcount_set() when various sockets are setup and inserted into ehash, we also need to make sure inet_diag_dump_icsk() wont race with the refcount_set() operations. Jonathan Lemon sent a patch changing net_twsk_hashdance() but other spots would need risky changes. Instead, fix inet_diag_dump_icsk() as this bug came with linux-4.10 only. [1] Quoting Alexei : First something iterating over sockets finds already freed tw socket: refcount_t: increment on 0; use-after-free. WARNING: CPU: 2 PID: 2738 at lib/refcount.c:153 refcount_inc+0x26/0x30 RIP: 0010:refcount_inc+0x26/0x30 RSP: 0018:ffffc90004c8fbc0 EFLAGS: 00010282 RAX: 000000000000002b RBX: 0000000000000000 RCX: 0000000000000000 RDX: ffff88085ee9d680 RSI: ffff88085ee954c8 RDI: ffff88085ee954c8 RBP: ffff88010ecbd2c0 R08: 0000000000000000 R09: 000000000000174c R10: ffffffff81e7c5a0 R11: 0000000000000000 R12: 0000000000000000 R13: ffff8806ba9bf210 R14: ffffffff82304600 R15: ffff88010ecbd328 FS: 00007f81f5a7d700(0000) GS:ffff88085ee80000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f81e2a95000 CR3: 000000069b2eb006 CR4: 00000000003606e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: inet_diag_dump_icsk+0x2b3/0x4e0 [inet_diag] // sock_hold(sk); in net/ipv4/inet_diag.c:1002 ? kmalloc_large_node+0x37/0x70 ? __kmalloc_node_track_caller+0x1cb/0x260 ? __alloc_skb+0x72/0x1b0 ? __kmalloc_reserve.isra.40+0x2e/0x80 __inet_diag_dump+0x3b/0x80 [inet_diag] netlink_dump+0x116/0x2a0 netlink_recvmsg+0x205/0x3c0 sock_read_iter+0x89/0xd0 __vfs_read+0xf7/0x140 vfs_read+0x8a/0x140 SyS_read+0x3f/0xa0 do_syscall_64+0x5a/0x100 then a minute later twsk timer fires and hits two bad refcnts for this freed socket: refcount_t: decrement hit 0; leaking memory. WARNING: CPU: 31 PID: 0 at lib/refcount.c:228 refcount_dec+0x2e/0x40 Modules linked in: RIP: 0010:refcount_dec+0x2e/0x40 RSP: 0018:ffff88085f5c3ea8 EFLAGS: 00010296 RAX: 000000000000002c RBX: ffff88010ecbd2c0 RCX: 000000000000083f RDX: 0000000000000000 RSI: 00000000000000f6 RDI: 000000000000003f RBP: ffffc90003c77280 R08: 0000000000000000 R09: 00000000000017d3 R10: ffffffff81e7c5a0 R11: 0000000000000000 R12: ffffffff82ad2d80 R13: ffffffff8182de00 R14: ffff88085f5c3ef8 R15: 0000000000000000 FS: 0000000000000000(0000) GS:ffff88085f5c0000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fbe42685250 CR3: 0000000002209001 CR4: 00000000003606e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: inet_twsk_kill+0x9d/0xc0 // inet_twsk_bind_unhash(tw, hashinfo); call_timer_fn+0x29/0x110 run_timer_softirq+0x36b/0x3a0 refcount_t: underflow; use-after-free. WARNING: CPU: 31 PID: 0 at lib/refcount.c:187 refcount_sub_and_test+0x46/0x50 RIP: 0010:refcount_sub_and_test+0x46/0x50 RSP: 0018:ffff88085f5c3eb8 EFLAGS: 00010296 RAX: 0000000000000026 RBX: ffff88010ecbd2c0 RCX: 000000000000083f RDX: 0000000000000000 RSI: 00000000000000f6 RDI: 000000000000003f RBP: ffff88010ecbd358 R08: 0000000000000000 R09: 000000000000185b R10: ffffffff81e7c5a0 R11: 0000000000000000 R12: ffff88010ecbd358 R13: ffffffff8182de00 R14: ffff88085f5c3ef8 R15: 0000000000000000 FS: 0000000000000000(0000) GS:ffff88085f5c0000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fbe42685250 CR3: 0000000002209001 CR4: 00000000003606e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: inet_twsk_put+0x12/0x20 // inet_twsk_put(tw); call_timer_fn+0x29/0x110 run_timer_softirq+0x36b/0x3a0 Fixes: 67db3e4bfbc9 ("tcp: no longer hold ehash lock while calling tcp_get_info()") Signed-off-by: Eric Dumazet Reported-by: Alexei Starovoitov Cc: Jonathan Lemon Acked-by: Jonathan Lemon Signed-off-by: David S. Miller commit de985ec5c5bb80c7d2554fb7ebd97953630b7589 Author: Ganesh Goudar Date: Thu Dec 20 18:56:09 2018 +0530 MAINTAINERS: update cxgb4 and cxgb3 maintainer Arjun Vynipadath will be taking over as maintainer from now. Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller commit d15f5ac8deea936d3adf629421a66a88b42b8a2f Author: Herbert Xu Date: Thu Dec 20 21:20:10 2018 +0800 ipv6: frags: Fix bogus skb->sk in reassembled packets It was reported that IPsec would crash when it encounters an IPv6 reassembled packet because skb->sk is non-zero and not a valid pointer. This is because skb->sk is now a union with ip_defrag_offset. This patch fixes this by resetting skb->sk when exiting from the reassembly code. Reported-by: Xiumei Mu Fixes: 219badfaade9 ("ipv6: frags: get rid of ip6frag_skb_cb/...") Signed-off-by: Herbert Xu Signed-off-by: David S. Miller commit 8fd1a4affbdafda592f80cd01bf7a382a5ff2fe8 Author: Allan W. Nielsen Date: Thu Dec 20 09:37:17 2018 +0100 mscc: Configured MAC entries should be locked. The MAC table in Ocelot supports auto aging (normal) and static entries. MAC entries that is manually configured should be static and not subject to aging. Fixes: a556c76adc05 ("net: mscc: Add initial Ocelot switch support") Signed-off-by: Allan Nielsen Reviewed-by: Steen Hegelund Signed-off-by: Steen Hegelund Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 9097a058d49e049925d8da72db07fffcee24efa0 Merge: f57b620a89ad 32774a8153b4 Author: Linus Torvalds Date: Thu Dec 20 14:49:56 2018 -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 a MAINTAINERS update for you, so people will be immediately pointed to the right person for this previously orphaned driver. And one of Arnd's build warning fixes for a new driver added this cycle" * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: i2c: nvidia-gpu: mark resume function as __maybe_unused MAINTAINERS: add entry for i2c-axxia driver commit f57b620a89ad2eee2e25218b5cb2bee0ad1e2e7d Merge: 1d51b4b1d3f2 e58725d51fa8 Author: Linus Torvalds Date: Thu Dec 20 14:17:24 2018 -0800 Merge tag 'upstream-4.20-rc7' of git://git.infradead.org/linux-ubifs Pull UBI/UBIFS fixes from Richard Weinberger: - Kconfig dependency fixes for our new auth feature - Fix for selecting the right compressor when creating a fs - Bugfix for a bug in UBIFS's O_TMPFILE implementation - Refcounting fixes for UBI * tag 'upstream-4.20-rc7' of git://git.infradead.org/linux-ubifs: ubifs: Handle re-linking of inodes correctly while recovery ubi: Do not drop UBI device reference before using ubi: Put MTD device after it is not used ubifs: Fix default compression selection in ubifs ubifs: Fix memory leak on error condition ubifs: auth: Add CONFIG_KEYS dependency ubifs: CONFIG_UBIFS_FS_AUTHENTICATION should depend on UBIFS_FS ubifs: replay: Fix high stack usage commit b6aac625e579ca684448f8ace632f8dceb972afb Merge: 7566ec393f41 505b5240329b Author: Daniel Vetter Date: Thu Dec 20 18:13:53 2018 +0100 Merge tag 'drm-misc-fixes-2018-12-20' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes Fix spectre v1 vuln in drm_ioctl Signed-off-by: Daniel Vetter From: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20181220165740.GA42344@art_vandelay commit 1d51b4b1d3f2db0d6d144175e31a84e472fbd99a Merge: c0f3ece4657f bed1369f5190 Author: Linus Torvalds Date: Thu Dec 20 07:35:16 2018 -0800 Merge tag 'm68k-for-v4.20-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k Pull m68k fix from Geert Uytterhoeven: "Fix memblock-related crashes" * tag 'm68k-for-v4.20-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k: m68k: Fix memblock-related crashes commit c0f3ece4657fe2205c1e59c5c27547d6e8cba34a Merge: 122b7e33804d ef7cfd00b2ca Author: Linus Torvalds Date: Thu Dec 20 07:33:09 2018 -0800 Merge tag 'kbuild-fixes-v4.20-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull Kbuild fix from Masahiro Yamada: "Fix false positive warning/error about missing library for objtool" * tag 'kbuild-fixes-v4.20-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: kbuild: fix false positive warning/error about missing libelf commit 122b7e33804d928f8f53cf9d25762c40b8148a02 Merge: bfd7bd5b49c8 55449af1a17a Author: Linus Torvalds Date: Thu Dec 20 07:30:37 2018 -0800 Merge tag 'char-misc-4.20-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char/misc driver fixes from Greg KH: "Here are three tiny last-minute driver fixes for 4.20-rc8 that resolve some reported issues, and one MAINTAINERS file update. All of them are related to the hyper-v subsystem, it seems people are actually testing and using it now, which is nice to see :) The fixes are: - uio_hv_generic: fix for opening multiple times - Remove PCI dependancy on hyperv drivers - return proper error code for an unopened channel. And Sasha has signed up to help out with the hyperv maintainership. All of these have been in linux-next for a while with no reported issues" * tag 'char-misc-4.20-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: Drivers: hv: vmbus: Return -EINVAL for the sys files for unopened channels x86, hyperv: remove PCI dependency MAINTAINERS: Patch monkey for the Hyper-V code uio_hv_generic: set callbacks on open commit bfd7bd5b49c84aac9068bff7635e94ce038475ec Merge: 177c459b08a3 3c9dc275dba1 Author: Linus Torvalds Date: Thu Dec 20 07:29:11 2018 -0800 Merge tag 'tty-4.20-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pull tty/serial fix from Greg KH: "Here is a single fix, a revert, for the 8250 serial driver to resolve a reported problem. There was some attempted patches to fix the issue, but people are arguing about them, so reverting the patch to revert back to the 4.19 and older behavior is the best thing to do at this late in the release cycle. The revert has been in linux-next with no reported issues" * tag 'tty-4.20-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: Revert "serial: 8250: Fix clearing FIFOs in RS485 mode again" commit 177c459b08a34dcf004aa9a4c1f1d8be682ff3af Merge: d31aeb78c682 2419f30a4a4f Author: Linus Torvalds Date: Thu Dec 20 07:27:39 2018 -0800 Merge tag 'usb-4.20-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB fixes and ids from Greg KH: "Here are some late xhci fixes for 4.20-rc8 as well as a few new device ids for the option usb-serial driver. The xhci fixes resolve some many-reported issues and all of these have been in linux-next for a while with no reported problems" * tag 'usb-4.20-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: USB: xhci: fix 'broken_suspend' placement in struct xchi_hcd xhci: Don't prevent USB2 bus suspend in state check intended for USB3 only USB: serial: option: add Telit LN940 series USB: serial: option: add Fibocom NL668 series USB: serial: option: add Simcom SIM7500/SIM7600 (MBIM mode) USB: serial: option: add GosunCn ZTE WeLink ME3630 USB: serial: option: add HP lt4132 commit d31aeb78c6827db17f447f0504fc35afcbb188c2 Merge: a837eca24120 e3ae3401aa19 Author: Linus Torvalds Date: Thu Dec 20 07:25:31 2018 -0800 Merge tag 'mmc-v4.20-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull MMC fixes from Ulf Hansson: "MMC core: - Restore code to allow BKOPS and CACHE ctrl even if no HPI support - Reset HPI enabled state during re-init - Use a default minimum timeout when enabling CACHE ctrl MMC host: - omap_hsmmc: Fix DMA API warning - sdhci-tegra: Fix dt parsing of SDMMC pads autocal values - Correct register accesses when enabling v4 mode" * tag 'mmc-v4.20-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: mmc: core: Use a minimum 1600ms timeout when enabling CACHE ctrl mmc: core: Allow BKOPS and CACHE ctrl even if no HPI support mmc: core: Reset HPI enabled state during re-init and in case of errors mmc: omap_hsmmc: fix DMA API warning mmc: tegra: Fix for SDMMC pads autocal parsing from dt mmc: sdhci: Fix sdhci_do_enable_v4_mode commit a837eca2412051628c0529768c9bc4f3580b040e Author: Dave Chinner Date: Thu Dec 20 23:23:24 2018 +1100 iomap: Revert "fs/iomap.c: get/put the page in iomap_page_create/release()" This reverts commit 61c6de667263184125d5ca75e894fcad632b0dd3. The reverted commit added page reference counting to iomap page structures that are used to track block size < page size state. This was supposed to align the code with page migration page accounting assumptions, but what it has done instead is break XFS filesystems. Every fstests run I've done on sub-page block size XFS filesystems has since picking up this commit 2 days ago has failed with bad page state errors such as: # ./run_check.sh "-m rmapbt=1,reflink=1 -i sparse=1 -b size=1k" "generic/038" .... SECTION -- xfs FSTYP -- xfs (debug) PLATFORM -- Linux/x86_64 test1 4.20.0-rc6-dgc+ MKFS_OPTIONS -- -f -m rmapbt=1,reflink=1 -i sparse=1 -b size=1k /dev/sdc MOUNT_OPTIONS -- /dev/sdc /mnt/scratch generic/038 454s ... run fstests generic/038 at 2018-12-20 18:43:05 XFS (sdc): Unmounting Filesystem XFS (sdc): Mounting V5 Filesystem XFS (sdc): Ending clean mount BUG: Bad page state in process kswapd0 pfn:3a7fa page:ffffea0000ccbeb0 count:0 mapcount:0 mapping:ffff88800d9b6360 index:0x1 flags: 0xfffffc0000000() raw: 000fffffc0000000 dead000000000100 dead000000000200 ffff88800d9b6360 raw: 0000000000000001 0000000000000000 00000000ffffffff page dumped because: non-NULL mapping CPU: 0 PID: 676 Comm: kswapd0 Not tainted 4.20.0-rc6-dgc+ #915 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.11.1-1 04/01/2014 Call Trace: dump_stack+0x67/0x90 bad_page.cold.116+0x8a/0xbd free_pcppages_bulk+0x4bf/0x6a0 free_unref_page_list+0x10f/0x1f0 shrink_page_list+0x49d/0xf50 shrink_inactive_list+0x19d/0x3b0 shrink_node_memcg.constprop.77+0x398/0x690 ? shrink_slab.constprop.81+0x278/0x3f0 shrink_node+0x7a/0x2f0 kswapd+0x34b/0x6d0 ? node_reclaim+0x240/0x240 kthread+0x11f/0x140 ? __kthread_bind_mask+0x60/0x60 ret_from_fork+0x24/0x30 Disabling lock debugging due to kernel taint .... The failures are from anyway that frees pages and empties the per-cpu page magazines, so it's not a predictable failure or an easy to debug failure. generic/038 is a reliable reproducer of this problem - it has a 9 in 10 failure rate on one of my test machines. Failure on other machines have been at random points in fstests runs but every run has ended up tripping this problem. Hence generic/038 was used to bisect the failure because it was the most reliable failure. It is too close to the 4.20 release (not to mention holidays) to try to diagnose, fix and test the underlying cause of the problem, so reverting the commit is the only option we have right now. The revert has been tested against a current tot 4.20-rc7+ kernel across multiple machines running sub-page block size XFs filesystems and none of the bad page state failures have been seen. Signed-off-by: Dave Chinner Cc: Piotr Jaroszynski Cc: Christoph Hellwig Cc: William Kucharski Cc: Darrick J. Wong Cc: Brian Foster Signed-off-by: Linus Torvalds commit 519be6995c31005ae3bad5421e09ef99d4eb0b82 Merge: ab63e725b49c d84e7bc0595a Author: Linus Torvalds Date: Wed Dec 19 23:34:33 2018 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: 1) Off by one in netlink parsing of mac802154_hwsim, from Alexander Aring. 2) nf_tables RCU usage fix from Taehee Yoo. 3) Flow dissector needs nhoff and thoff clamping, from Stanislav Fomichev. 4) Missing sin6_flowinfo initialization in SCTP, from Xin Long. 5) Spectrev1 in ipmr and ip6mr, from Gustavo A. R. Silva. 6) Fix r8169 crash when DEBUG_SHIRQ is enabled, from Heiner Kallweit. 7) Fix SKB leak in rtlwifi, from Larry Finger. 8) Fix state pruning in bpf verifier, from Jakub Kicinski. 9) Don't handle completely duplicate fragments as overlapping, from Michal Kubecek. 10) Fix memory corruption with macb and 64-bit DMA, from Anssi Hannula. 11) Fix TCP fallback socket release in smc, from Myungho Jung. 12) gro_cells_destroy needs to napi_disable, from Lorenzo Bianconi. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (130 commits) rds: Fix warning. neighbor: NTF_PROXY is a valid ndm_flag for a dump request net: mvpp2: fix the phylink mode validation net/sched: cls_flower: Remove old entries from rhashtable net/tls: allocate tls context using GFP_ATOMIC iptunnel: make TUNNEL_FLAGS available in uapi gro_cell: add napi_disable in gro_cells_destroy lan743x: Remove MAC Reset from initialization net/mlx5e: Remove the false indication of software timestamping support net/mlx5: Typo fix in del_sw_hw_rule net/mlx5e: RX, Fix wrong early return in receive queue poll ipv6: explicitly initialize udp6_addr in udp_sock_create6() bnxt_en: Fix ethtool self-test loopback. net/rds: remove user triggered WARN_ON in rds_sendmsg net/rds: fix warn in rds_message_alloc_sgs ath10k: skip sending quiet mode cmd for WCN3990 mac80211: free skb fraglist before freeing the skb nl80211: fix memory leak if validate_pae_over_nl80211() fails net/smc: fix TCP fallback socket release vxge: ensure data0 is initialized in when fetching firmware version information ... commit 505b5240329b922f21f91d5b5d1e535c805eca6d Author: Gustavo A. R. Silva Date: Wed Dec 19 18:00:15 2018 -0600 drm/ioctl: Fix Spectre v1 vulnerabilities nr 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: drivers/gpu/drm/drm_ioctl.c:805 drm_ioctl() warn: potential spectre issue 'dev->driver->ioctls' [r] drivers/gpu/drm/drm_ioctl.c:810 drm_ioctl() warn: potential spectre issue 'drm_ioctls' [r] (local cap) drivers/gpu/drm/drm_ioctl.c:892 drm_ioctl_flags() warn: potential spectre issue 'drm_ioctls' [r] (local cap) Fix this by sanitizing nr before using it to index dev->driver->ioctls and drm_ioctls. 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: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20181220000015.GA18973@embeddedor commit d84e7bc0595a7e146ad0ddb80b240cea77825245 Author: David S. Miller Date: Wed Dec 19 20:53:18 2018 -0800 rds: Fix warning. >> net/rds/send.c:1109:42: warning: Using plain integer as NULL pointer Fixes: ea010070d0a7 ("net/rds: fix warn in rds_message_alloc_sgs") Reported-by: kbuild test robot Signed-off-by: David S. Miller commit ab63e725b49c80f941446327d79ba5b68593bf5a Merge: 8c9dff1ebd72 c5c08bed843c Author: Linus Torvalds Date: Wed Dec 19 18:40:48 2018 -0800 Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost Pull virtio fix from Michael Tsirkin: "A last-minute fix for a test build" * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: virtio: fix test build after uio.h change commit 8c9dff1ebd721a3b19a002d1a901d4dc31b18ebb Merge: fe112793600b abc13275771f Author: Linus Torvalds Date: Wed Dec 19 18:38:54 2018 -0800 Merge tag 'nfs-for-4.20-6' of git://git.linux-nfs.org/projects/trondmy/linux-nfs Pull NFS client bugfixes from Trond Myklebust: - Fix TCP socket disconnection races by ensuring we always call xprt_disconnect_done() after releasing the socket. - Fix a race when clearing both XPRT_CONNECTING and XPRT_LOCKED - Remove xprt_connect_status() so it does not mask errors that should be handled by call_connect_status() * tag 'nfs-for-4.20-6' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: SUNRPC: Remove xprt_connect_status() SUNRPC: Fix a race with XPRT_CONNECTING SUNRPC: Fix disconnection races commit fe112793600bb14cfd519ed148ca2f252d7b14bc Merge: 2dd516ff7d85 0e1b869fff60 Author: Linus Torvalds Date: Wed Dec 19 18:27:58 2018 -0800 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull kvm fixes from Paolo Bonzini: - One nasty use-after-free bugfix, from this merge window however - A less nasty use-after-free that can only zero some words at the beginning of the page, and hence is not really exploitable - A NULL pointer dereference - A dummy implementation of an AMD chicken bit MSR that Windows uses for some unknown reason * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: kvm: x86: Add AMD's EX_CFG to the list of ignored MSRs KVM: X86: Fix NULL deref in vcpu_scan_ioapic KVM: Fix UAF in nested posted interrupt processing KVM: fix unregistering coalesced mmio zone from wrong bus commit 2dd516ff7d852c2cda8c5b883d6625d1c812714e Merge: 62393dbcbe0f c92a54cfa025 Author: Linus Torvalds Date: Wed Dec 19 18:16:17 2018 -0800 Merge tag 'dma-mapping-4.20-4' of git://git.infradead.org/users/hch/dma-mapping Pull dma-mapping fix from Christoph Hellwig: "Fix a regression in dma-direct that didn't take account the magic AMD memory encryption mask in the DMA address" * tag 'dma-mapping-4.20-4' of git://git.infradead.org/users/hch/dma-mapping: dma-direct: do not include SME mask in the DMA supported check commit c0fde870d96e42bbdcc0d9af7ae5e190c767aab8 Author: David Ahern Date: Wed Dec 19 16:54:38 2018 -0800 neighbor: NTF_PROXY is a valid ndm_flag for a dump request When dumping proxy entries the dump request has NTF_PROXY set in ndm_flags. strict mode checking needs to be updated to allow this flag. Fixes: 51183d233b5a ("net/neighbor: Update neigh_dump_info for strict data checking") Signed-off-by: David Ahern Signed-off-by: David S. Miller commit 1b451fb2051b464b9758c09a3492104403252e2b Author: Antoine Tenart Date: Wed Dec 19 18:00:12 2018 +0100 net: mvpp2: fix the phylink mode validation The mvpp2_phylink_validate() sets all modes that are supported by a given PPv2 port. An mistake made the 10000baseT_Full mode being advertised in some cases when a port wasn't configured to perform at 10G. This patch fixes this. Fixes: d97c9f4ab000 ("net: mvpp2: 1000baseX support") Reported-by: Russell King Signed-off-by: Antoine Tenart Signed-off-by: David S. Miller commit 599d2570b2da7c2f5419332b42b7999d79c85959 Author: Roi Dayan Date: Wed Dec 19 18:07:56 2018 +0200 net/sched: cls_flower: Remove old entries from rhashtable When replacing a rule we add the new rule to the rhashtable but only remove the old if not in skip_sw. This commit fix this and remove the old rule anyway. Fixes: 35cc3cefc4de ("net/sched: cls_flower: Reject duplicated rules also under skip_sw") Signed-off-by: Roi Dayan Reviewed-by: Vlad Buslov Acked-by: Or Gerlitz Signed-off-by: David S. Miller commit c6ec179a0082e2e76e3a72050c2b99d3d0f3da3f Author: Ganesh Goudar Date: Wed Dec 19 17:18:22 2018 +0530 net/tls: allocate tls context using GFP_ATOMIC create_ctx can be called from atomic context, hence use GFP_ATOMIC instead of GFP_KERNEL. [ 395.962599] BUG: sleeping function called from invalid context at mm/slab.h:421 [ 395.979896] in_atomic(): 1, irqs_disabled(): 0, pid: 16254, name: openssl [ 395.996564] 2 locks held by openssl/16254: [ 396.010492] #0: 00000000347acb52 (sk_lock-AF_INET){+.+.}, at: do_tcp_setsockopt.isra.44+0x13b/0x9a0 [ 396.029838] #1: 000000006c9552b5 (device_spinlock){+...}, at: tls_init+0x1d/0x280 [ 396.047675] CPU: 5 PID: 16254 Comm: openssl Tainted: G O 4.20.0-rc6+ #25 [ 396.066019] Hardware name: Supermicro X10SRA-F/X10SRA-F, BIOS 2.0c 09/25/2017 [ 396.083537] Call Trace: [ 396.096265] dump_stack+0x5e/0x8b [ 396.109876] ___might_sleep+0x216/0x250 [ 396.123940] kmem_cache_alloc_trace+0x1b0/0x240 [ 396.138800] create_ctx+0x1f/0x60 [ 396.152504] tls_init+0xbd/0x280 [ 396.166135] tcp_set_ulp+0x191/0x2d0 [ 396.180035] ? tcp_set_ulp+0x2c/0x2d0 [ 396.193960] do_tcp_setsockopt.isra.44+0x148/0x9a0 [ 396.209013] __sys_setsockopt+0x7c/0xe0 [ 396.223054] __x64_sys_setsockopt+0x20/0x30 [ 396.237378] do_syscall_64+0x4a/0x180 [ 396.251200] entry_SYSCALL_64_after_hwframe+0x49/0xbe Fixes: df9d4a178022 ("net/tls: sleeping function from invalid context") Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller commit 1875a9ab01dfa96b06cb6649cb1ce56efa86c7cb Author: wenxu Date: Wed Dec 19 14:11:15 2018 +0800 iptunnel: make TUNNEL_FLAGS available in uapi ip l add dev tun type gretap external ip r a 10.0.0.1 encap ip dst 192.168.152.171 id 1000 dev gretap For gretap Key example when the command set the id but don't set the TUNNEL_KEY flags. There is no key field in the send packet In the lwtunnel situation, some TUNNEL_FLAGS should can be set by userspace Signed-off-by: wenxu Signed-off-by: David S. Miller commit 8e1da73acded4751a93d4166458a7e640f37d26c Author: Lorenzo Bianconi Date: Wed Dec 19 23:23:00 2018 +0100 gro_cell: add napi_disable in gro_cells_destroy Add napi_disable routine in gro_cells_destroy since starting from commit c42858eaf492 ("gro_cells: remove spinlock protecting receive queues") gro_cell_poll and gro_cells_destroy can run concurrently on napi_skbs list producing a kernel Oops if the tunnel interface is removed while gro_cell_poll is running. The following Oops has been triggered removing a vxlan device while the interface is receiving traffic [ 5628.948853] BUG: unable to handle kernel NULL pointer dereference at 0000000000000008 [ 5628.949981] PGD 0 P4D 0 [ 5628.950308] Oops: 0002 [#1] SMP PTI [ 5628.950748] CPU: 0 PID: 9 Comm: ksoftirqd/0 Not tainted 4.20.0-rc6+ #41 [ 5628.952940] RIP: 0010:gro_cell_poll+0x49/0x80 [ 5628.955615] RSP: 0018:ffffc9000004fdd8 EFLAGS: 00010202 [ 5628.956250] RAX: 0000000000000000 RBX: ffffe8ffffc08150 RCX: 0000000000000000 [ 5628.957102] RDX: 0000000000000000 RSI: ffff88802356bf00 RDI: ffffe8ffffc08150 [ 5628.957940] RBP: 0000000000000026 R08: 0000000000000000 R09: 0000000000000000 [ 5628.958803] R10: 0000000000000001 R11: 0000000000000000 R12: 0000000000000040 [ 5628.959661] R13: ffffe8ffffc08100 R14: 0000000000000000 R15: 0000000000000040 [ 5628.960682] FS: 0000000000000000(0000) GS:ffff88803ea00000(0000) knlGS:0000000000000000 [ 5628.961616] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 5628.962359] CR2: 0000000000000008 CR3: 000000000221c000 CR4: 00000000000006b0 [ 5628.963188] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 5628.964034] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 5628.964871] Call Trace: [ 5628.965179] net_rx_action+0xf0/0x380 [ 5628.965637] __do_softirq+0xc7/0x431 [ 5628.966510] run_ksoftirqd+0x24/0x30 [ 5628.966957] smpboot_thread_fn+0xc5/0x160 [ 5628.967436] kthread+0x113/0x130 [ 5628.968283] ret_from_fork+0x3a/0x50 [ 5628.968721] Modules linked in: [ 5628.969099] CR2: 0000000000000008 [ 5628.969510] ---[ end trace 9d9dedc7181661fe ]--- [ 5628.970073] RIP: 0010:gro_cell_poll+0x49/0x80 [ 5628.972965] RSP: 0018:ffffc9000004fdd8 EFLAGS: 00010202 [ 5628.973611] RAX: 0000000000000000 RBX: ffffe8ffffc08150 RCX: 0000000000000000 [ 5628.974504] RDX: 0000000000000000 RSI: ffff88802356bf00 RDI: ffffe8ffffc08150 [ 5628.975462] RBP: 0000000000000026 R08: 0000000000000000 R09: 0000000000000000 [ 5628.976413] R10: 0000000000000001 R11: 0000000000000000 R12: 0000000000000040 [ 5628.977375] R13: ffffe8ffffc08100 R14: 0000000000000000 R15: 0000000000000040 [ 5628.978296] FS: 0000000000000000(0000) GS:ffff88803ea00000(0000) knlGS:0000000000000000 [ 5628.979327] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 5628.980044] CR2: 0000000000000008 CR3: 000000000221c000 CR4: 00000000000006b0 [ 5628.980929] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 5628.981736] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 5628.982409] Kernel panic - not syncing: Fatal exception in interrupt [ 5628.983307] Kernel Offset: disabled Fixes: c42858eaf492 ("gro_cells: remove spinlock protecting receive queues") Signed-off-by: Lorenzo Bianconi Acked-by: Eric Dumazet Signed-off-by: David S. Miller commit e0e587878f538c9e3400219b6c516b8199dc2042 Author: Bryan Whitehead Date: Wed Dec 19 16:55:15 2018 -0500 lan743x: Remove MAC Reset from initialization The MAC Reset was noticed to erase important EEPROM settings. It is also unnecessary since a chip wide reset was done earlier in initialization, and that reset preserves EEPROM settings. There for this patch removes the unnecessary MAC specific reset. Signed-off-by: Bryan Whitehead Signed-off-by: David S. Miller commit c5c08bed843c2b2c048c16d1296d7631d7c1620e Author: Michael S. Tsirkin Date: Wed Dec 19 18:21:51 2018 -0500 virtio: fix test build after uio.h change Fixes: d38499530e5 ("fs: decouple READ and WRITE from the block layer ops") Signed-off-by: Michael S. Tsirkin commit d9842f388b23d9bd4e7ac2cd273bdc3965db15ec Merge: fb2427454631 4765420439e7 Author: David S. Miller Date: Wed Dec 19 13:44:12 2018 -0800 Merge tag 'mlx5-fixes-2018-12-19' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5-fixes-2018-12-19 Some fixes for the mlx5 driver ==================== Signed-off-by: David S. Miller commit 4765420439e758bfa4808392d18b0a4cb6f06065 Author: Alaa Hleihel Date: Sun Nov 25 11:46:09 2018 +0200 net/mlx5e: Remove the false indication of software timestamping support mlx5 driver falsely advertises support of software timestamping. Fix it by removing the false indication. Fixes: ef9814deafd0 ("net/mlx5e: Add HW timestamping (TS) support") Signed-off-by: Alaa Hleihel Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit f0337889147c956721696553ffcc97212b0948fe Author: Yuval Avnery Date: Thu Dec 13 02:26:46 2018 +0200 net/mlx5: Typo fix in del_sw_hw_rule Expression terminated with "," instead of ";", resulted in set_fte getting bad value for modify_enable_mask field. Fixes: bd5251dbf156 ("net/mlx5_core: Introduce flow steering destination of type counter") Signed-off-by: Yuval Avnery Reviewed-by: Daniel Jurgens Signed-off-by: Saeed Mahameed commit bfc698254ba97b3e3e4ebbfae0ffa1f7e2fa0717 Author: Tariq Toukan Date: Sun Dec 2 15:45:53 2018 +0200 net/mlx5e: RX, Fix wrong early return in receive queue poll When the completion queue of the RQ is empty, do not immediately return. If left-over decompressed CQEs (from the previous cycle) were processed, need to go to the finalization part of the poll function. Bug exists only when CQE compression is turned ON. This solves the following issue: mlx5_core 0000:82:00.1: mlx5_eq_int:544:(pid 0): CQ error on CQN 0xc08, syndrome 0x1 mlx5_core 0000:82:00.1 p4p2: mlx5e_cq_error_event: cqn=0x000c08 event=0x04 Fixes: 4b7dfc992514 ("net/mlx5e: Early-return on empty completion queues") Signed-off-by: Tariq Toukan Reviewed-by: Eran Ben Elisha Signed-off-by: Saeed Mahameed commit 3cf85f9f6bd7b172122865432b4c6f0ec844e22a Author: Vitaly Kuznetsov Date: Wed Dec 19 17:25:14 2018 +0100 KVM: x86: nSVM: fix switch to guest mmu Recent optimizations in MMU code broke nested SVM with NPT in L1 completely: when we do nested_svm_{,un}init_mmu_context() we want to switch from TDP MMU to shadow MMU, both init_kvm_tdp_mmu() and kvm_init_shadow_mmu() check if re-configuration is needed by looking at cache source data. The data, however, doesn't change - it's only the type of the MMU which changes. We end up not re-initializing guest MMU as shadow and everything goes off the rails. The issue could have been fixed by putting MMU type into extended MMU role but this is not really needed. We can just split root and guest MMUs the exact same way we did for nVMX, their types never change in the lifetime of a vCPU. There is still room for improvement: currently, we reset all MMU roots when switching from L1 to L2 and back and this is not needed. Fixes: 7dcd57552008 ("x86/kvm/mmu: check if tdp/shadow MMU reconfiguration is needed") Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini commit fb24274546310872eeeaf3d1d53799d8414aa0f2 Author: Cong Wang Date: Tue Dec 18 21:17:44 2018 -0800 ipv6: explicitly initialize udp6_addr in udp_sock_create6() syzbot reported the use of uninitialized udp6_addr::sin6_scope_id. We can just set ::sin6_scope_id to zero, as tunnels are unlikely to use an IPv6 address that needs a scope id and there is no interface to bind in this context. For net-next, it looks different as we have cfg->bind_ifindex there so we can probably call ipv6_iface_scope_id(). Same for ::sin6_flowinfo, tunnels don't use it. Fixes: 8024e02879dd ("udp: Add udp_sock_create for UDP tunnels to open listener socket") Reported-by: syzbot+c56449ed3652e6720f30@syzkaller.appspotmail.com Cc: Jon Maloy Signed-off-by: Cong Wang Signed-off-by: David S. Miller commit 84404d5fd5858588bbf694b0300dbc6310d02737 Author: Michael Chan Date: Wed Dec 19 13:46:50 2018 -0500 bnxt_en: Fix ethtool self-test loopback. The current code has 2 problems. It assumes that the RX ring for the loopback packet is combined with the TX ring. This is not true if the ethtool channels are set to non-combined mode. The second problem is that it won't work on 57500 chips without adjusting the logic to get the proper completion ring (cpr) pointer. Fix both issues by locating the proper cpr pointer through the RX ring. Fixes: e44758b78ae8 ("bnxt_en: Use bnxt_cp_ring_info struct pointer as parameter for RX path.") Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 912cb1d55c96cd6a4e2c9c06803aa3a7810f72ba Merge: c6f4075e2f14 c75ab8a55ac1 Author: David S. Miller Date: Wed Dec 19 10:27:58 2018 -0800 Merge branch 'rds-fixes' Shamir Rabinovitch says: ==================== WARNING in rds_message_alloc_sgs This patch set fix google syzbot rds bug found in linux-next. The first patch solve the syzbot issue. The second patch fix issue mentioned by Leon Romanovsky that drivers should not call WARN_ON as result from user input. syzbot bug report can be foud here: https://lkml.org/lkml/2018/10/31/28 v1->v2: - patch 1: make rds_iov_vector fields name more descriptive (Hakon) - patch 1: fix potential mem leak in rds_rm_size if krealloc fail (Hakon) v2->v3: - patch 2: harden rds_sendmsg for invalid number of sgs (Gerd) v3->v4 - Santosh a.b. on both patches + repost to net-dev ==================== Signed-off-by: David S. Miller commit c75ab8a55ac1083c232e4407f52b0cadae6c1e0e Author: shamir rabinovitch Date: Sun Dec 16 09:01:09 2018 +0200 net/rds: remove user triggered WARN_ON in rds_sendmsg per comment from Leon in rdma mailing list https://lkml.org/lkml/2018/10/31/312 : Please don't forget to remove user triggered WARN_ON. https://lwn.net/Articles/769365/ "Greg Kroah-Hartman raised the problem of core kernel API code that will use WARN_ON_ONCE() to complain about bad usage; that will not generate the desired result if WARN_ON_ONCE() is configured to crash the machine. He was told that the code should just call pr_warn() instead, and that the called function should return an error in such situations. It was generally agreed that any WARN_ON() or WARN_ON_ONCE() calls that can be triggered from user space need to be fixed." in addition harden rds_sendmsg to detect and overcome issues with invalid sg count and fail the sendmsg. Suggested-by: Leon Romanovsky Acked-by: Santosh Shilimkar Signed-off-by: shamir rabinovitch Signed-off-by: David S. Miller commit ea010070d0a7497253d5a6f919f6dd107450b31a Author: shamir rabinovitch Date: Sun Dec 16 09:01:08 2018 +0200 net/rds: fix warn in rds_message_alloc_sgs redundant copy_from_user in rds_sendmsg system call expose rds to issue where rds_rdma_extra_size walk the rds iovec and and calculate the number pf pages (sgs) it need to add to the tail of rds message and later rds_cmsg_rdma_args copy the rds iovec again and re calculate the same number and get different result causing WARN_ON in rds_message_alloc_sgs. fix this by doing the copy_from_user only once per rds_sendmsg system call. When issue occur the below dump is seen: WARNING: CPU: 0 PID: 19789 at net/rds/message.c:316 rds_message_alloc_sgs+0x10c/0x160 net/rds/message.c:316 Kernel panic - not syncing: panic_on_warn set ... CPU: 0 PID: 19789 Comm: syz-executor827 Not tainted 4.19.0-next-20181030+ #101 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+0x244/0x39d lib/dump_stack.c:113 panic+0x2ad/0x55c kernel/panic.c:188 __warn.cold.8+0x20/0x45 kernel/panic.c:540 report_bug+0x254/0x2d0 lib/bug.c:186 fixup_bug arch/x86/kernel/traps.c:178 [inline] do_error_trap+0x11b/0x200 arch/x86/kernel/traps.c:271 do_invalid_op+0x36/0x40 arch/x86/kernel/traps.c:290 invalid_op+0x14/0x20 arch/x86/entry/entry_64.S:969 RIP: 0010:rds_message_alloc_sgs+0x10c/0x160 net/rds/message.c:316 Code: c0 74 04 3c 03 7e 6c 44 01 ab 78 01 00 00 e8 2b 9e 35 fa 4c 89 e0 48 83 c4 08 5b 41 5c 41 5d 41 5e 41 5f 5d c3 e8 14 9e 35 fa <0f> 0b 31 ff 44 89 ee e8 18 9f 35 fa 45 85 ed 75 1b e8 fe 9d 35 fa RSP: 0018:ffff8801c51b7460 EFLAGS: 00010293 RAX: ffff8801bc412080 RBX: ffff8801d7bf4040 RCX: ffffffff8749c9e6 RDX: 0000000000000000 RSI: ffffffff8749ca5c RDI: 0000000000000004 RBP: ffff8801c51b7490 R08: ffff8801bc412080 R09: ffffed003b5c5b67 R10: ffffed003b5c5b67 R11: ffff8801dae2db3b R12: 0000000000000000 R13: 000000000007165c R14: 000000000007165c R15: 0000000000000005 rds_cmsg_rdma_args+0x82d/0x1510 net/rds/rdma.c:623 rds_cmsg_send net/rds/send.c:971 [inline] rds_sendmsg+0x19a2/0x3180 net/rds/send.c:1273 sock_sendmsg_nosec net/socket.c:622 [inline] sock_sendmsg+0xd5/0x120 net/socket.c:632 ___sys_sendmsg+0x7fd/0x930 net/socket.c:2117 __sys_sendmsg+0x11d/0x280 net/socket.c:2155 __do_sys_sendmsg net/socket.c:2164 [inline] __se_sys_sendmsg net/socket.c:2162 [inline] __x64_sys_sendmsg+0x78/0xb0 net/socket.c:2162 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x44a859 Code: e8 dc e6 ff ff 48 83 c4 18 c3 0f 1f 80 00 00 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 0f 83 6b cb fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f1d4710ada8 EFLAGS: 00000297 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00000000006dcc28 RCX: 000000000044a859 RDX: 0000000000000000 RSI: 0000000020001600 RDI: 0000000000000003 RBP: 00000000006dcc20 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000297 R12: 00000000006dcc2c R13: 646e732f7665642f R14: 00007f1d4710b9c0 R15: 00000000006dcd2c Kernel Offset: disabled Rebooting in 86400 seconds.. Reported-by: syzbot+26de17458aeda9d305d8@syzkaller.appspotmail.com Acked-by: Santosh Shilimkar Signed-off-by: shamir rabinovitch Signed-off-by: David S. Miller commit c6f4075e2f14a91f2180c98bc7715946f791cbe6 Merge: 49ce708be602 53884577fbce Author: David S. Miller Date: Wed Dec 19 08:39:18 2018 -0800 Merge tag 'wireless-drivers-for-davem-2018-12-19' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers Kalle Valo says: ==================== wireless-drivers fixes for 4.20 Last set of fixes for 4.20. All (except the mt76 fix) of these are important fixes to user reported problems and pretty small in size. rtlwifi * fix skb leak mwifiex * revert a commit from v4.19 due to problems with locking mt76 * fix a potential NULL derenfence * add entry to MAINTAINERS iwlwifi * fix a firmware crash which was a regression introduced in v4.20-rc4 ath10k * fix a firmware crash with wcn3990 firmware ==================== Signed-off-by: David S. Miller commit 49ce708be602787518af6d846cf5f0a966018acb Merge: 3061169a47ee 34b1e0e9efe1 Author: David S. Miller Date: Wed Dec 19 08:34:46 2018 -0800 Merge tag 'mac80211-for-davem-2018-12-19' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211 Johannes Berg says: ==================== Just three fixes: * fix a memory leak in an error path * fix TXQs in interface teardown * free fraglist if we used it internally before returning SKB ==================== Signed-off-by: David S. Miller commit bed1369f51901b17108a4bb4f7210aab183bea42 Author: Geert Uytterhoeven Date: Mon Dec 3 12:53:51 2018 +0100 m68k: Fix memblock-related crashes When running the kernel in Fast RAM on Atari: Ignoring memory chunk at 0x0:0xe00000 before the first chunk ... Unable to handle kernel NULL pointer dereference at virtual address (ptrval) Oops: 00000000 Modules linked in: PC: [<0069dbac>] free_all_bootmem+0x12c/0x186 SR: 2714 SP: (ptrval) a2: 005e3314 d0: 00000000 d1: 0000000a d2: 00000e00 d3: 00000000 d4: 005e1fc0 d5: 0000001a a0: 01000000 a1: 00000000 Process swapper (pid: 0, task=(ptrval)) Frame format=7 eff addr=00000736 ssw=0505 faddr=00000736 wb 1 stat/addr/data: 0000 00000000 00000000 wb 2 stat/addr/data: 0000 00000000 00000000 wb 3 stat/addr/data: 0000 00000736 00000000 push data: 00000000 00000000 00000000 00000000 Stack from 005e1f84: 00000000 0000000a 027d3260 006b5006 00000000 00000000 00000000 00000000 0004f062 0003a220 0069e272 005e1ff8 0000054c 00000000 00e00000 00000000 00000001 00693cd8 027d3260 0004f062 0003a220 00691be6 00000000 00000000 00000000 00000000 00000000 00000000 006b5006 00000000 00690872 Call Trace: [<0004f062>] printk+0x0/0x18 [<0003a220>] parse_args+0x0/0x2d4 [<0069e272>] memblock_virt_alloc_try_nid+0x0/0xa4 [<00693cd8>] mem_init+0xa/0x5c [<0004f062>] printk+0x0/0x18 [<0003a220>] parse_args+0x0/0x2d4 [<00691be6>] start_kernel+0x1ca/0x462 [<00690872>] _sinittext+0x872/0x11f8 Code: 7a1a eaae 2270 6db0 0061 ef14 2f01 2f03 <96a9> 0736 2203 e589 d681 e78b d6a9 0732 2f03 2f40 0034 4eb9 0069 b8d0 260e 4fef Disabling lock debugging due to kernel taint Kernel panic - not syncing: Attempted to kill the idle task! As the kernel must run in the memory chunk with the lowest address, ST-RAM is ignored, and removed from the m68k_memory[] array. However, it is not removed from memblock, causing a crash later. More investigation shows that there are 3 places where memory chunks are ignored, all after the calls to memblock_add() in m68k_parse_bootinfo(), and thus causing crashes: 1. On classic m68k CPUs with a MMU, paging_init() ignores all memory chunks below the first chunk, cfr. above, 2. On Amigas equipped with a Zorro III bus, config_amiga() ignores all Zorro II memory, 3. If CONFIG_SINGLE_MEMORY_CHUNK=y, m68k_parse_bootinfo() ignores all but the first memory chunk. Fix this by moving the calls to memblock_add() from m68k_parse_bootinfo() to paging_init(), after all ignored memory chunks have been removed from m68k_memory[]. Reported-by: Andreas Schwab Fixes: 1008a11590b966b4 ("m68k: switch to MEMBLOCK + NO_BOOTMEM") Signed-off-by: Geert Uytterhoeven commit ef7cfd00b2caf6edeb7f169682b64be2d0a798cf Author: Masahiro Yamada Date: Tue Dec 18 14:25:41 2018 +0900 kbuild: fix false positive warning/error about missing libelf For the same reason as commit 25896d073d8a ("x86/build: Fix compiler support check for CONFIG_RETPOLINE"), you cannot put this $(error ...) into the parse stage of the top Makefile. Perhaps I'd propose a more sophisticated solution later, but this is the best I can do for now. Link: https://lkml.org/lkml/2017/12/25/211 Reported-by: Paul Gortmaker Reported-by: Bernd Edlinger Reported-by: Qian Cai Cc: Josh Poimboeuf Signed-off-by: Masahiro Yamada Tested-by: Qian Cai commit 271b9c0c80076bb1dd868dc384ef3aac87ec7dec Author: Ronnie Sahlberg Date: Tue Dec 18 17:49:05 2018 -0600 smb3: Fix rmdir compounding regression to strict servers Some servers require that the setinfo matches the exact size, and in this case compounding changes introduced by commit c2e0fe3f5aae ("cifs: make rmdir() use compounding") caused us to send 8 bytes (padded length) instead of 1 byte (the size of the structure). See MS-FSCC section 2.4.11. Fixing this when we send a SET_INFO command for delete file disposition, then ends up as an iov of a single byte but this causes problems with SMB3 and encryption. To avoid this, instead of creating a one byte iov for the disposition value and then appending an additional iov with a 7 byte padding we now handle this as a single 8 byte iov containing both the disposition byte as well as the padding in one single buffer. Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French Acked-by: Paulo Alcantara commit 53884577fbcef33a7d15ad664e664a3dabe35171 Author: Rakesh Pillai Date: Fri Dec 14 12:17:46 2018 +0200 ath10k: skip sending quiet mode cmd for WCN3990 HL2.0 firmware does not support setting quiet mode. If the host driver sends the quiet mode setting command to the HL2.0 firmware, it crashes with the below signature. fatal error received: err_qdi.c:456:EX:wlan_process:1:WLAN RT:207a:PC=b001b4f0 The quiet mode command support is exposed by the firmware via thermal throttle wmi service. Enable ath10k thermal support if thermal throttle wmi service bit is set. 10.x firmware versions support this feature by default, but unfortunately do not advertise the support via service flags, hence have to manually set the service flag in ath10k_core_compat_services(). Tested on QCA988X with 10.2.4.70.9-2. Also tested on WCN3990. Co-developed-by: Govind Singh Co-developed-by: Kalle Valo Signed-off-by: Rakesh Pillai Signed-off-by: Govind Singh Signed-off-by: Kalle Valo commit 6ac389346e6964e1f6a1c675cebf8bd0912526a5 Author: Ingo Molnar Date: Wed Dec 19 11:27:05 2018 +0100 Revert "kbuild/Makefile: Prepare for using macros in inline assembly code to work around asm() related GCC inlining bugs" This reverts commit 77b0bf55bc675233d22cd5df97605d516d64525e. See this commit for details about the revert: e769742d3584 ("Revert "x86/jump-labels: Macrofy inline assembly code to work around GCC inlining bugs"") Conflicts: arch/x86/Makefile Reported-by: Masahiro Yamada Reviewed-by: Borislav Petkov Reviewed-by: Thomas Gleixner Cc: Juergen Gross Cc: Richard Biener Cc: Kees Cook Cc: Segher Boessenkool Cc: Ard Biesheuvel Cc: Peter Zijlstra Cc: Josh Poimboeuf Cc: Nadav Amit Cc: Linus Torvalds Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar commit 96af6cd02a10b96108fc415a213441e7fb9f4f9b Author: Ingo Molnar Date: Wed Dec 19 11:23:27 2018 +0100 Revert "x86/objtool: Use asm macros to work around GCC inlining bugs" This reverts commit c06c4d8090513f2974dfdbed2ac98634357ac475. See this commit for details about the revert: e769742d3584 ("Revert "x86/jump-labels: Macrofy inline assembly code to work around GCC inlining bugs"") Reported-by: Masahiro Yamada Reviewed-by: Borislav Petkov Reviewed-by: Thomas Gleixner Cc: Juergen Gross Cc: Richard Biener Cc: Kees Cook Cc: Segher Boessenkool Cc: Ard Biesheuvel Cc: Peter Zijlstra Cc: Josh Poimboeuf Cc: Nadav Amit Cc: Linus Torvalds Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar commit ac180540b04d7ffaf8ba6f13bf628c4f50dc9820 Author: Ingo Molnar Date: Wed Dec 19 11:23:14 2018 +0100 Revert "x86/refcount: Work around GCC inlining bug" This reverts commit 9e1725b410594911cc5981b6c7b4cea4ec054ca8. See this commit for details about the revert: e769742d3584 ("Revert "x86/jump-labels: Macrofy inline assembly code to work around GCC inlining bugs"") The conflict resolution for interaction with: 288e4521f0f6: ("x86/asm: 'Simplify' GEN_*_RMWcc() macros") was provided by Masahiro Yamada. Conflicts: arch/x86/include/asm/refcount.h Reported-by: Masahiro Yamada Reviewed-by: Borislav Petkov Reviewed-by: Thomas Gleixner Cc: Juergen Gross Cc: Richard Biener Cc: Kees Cook Cc: Segher Boessenkool Cc: Ard Biesheuvel Cc: Peter Zijlstra Cc: Josh Poimboeuf Cc: Nadav Amit Cc: Linus Torvalds Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar commit 851a4cd7cc11fcebfa833824415fc57cf180cadf Author: Ingo Molnar Date: Wed Dec 19 11:20:57 2018 +0100 Revert "x86/alternatives: Macrofy lock prefixes to work around GCC inlining bugs" This reverts commit 77f48ec28e4ccff94d2e5f4260a83ac27a7f3099. See this commit for details about the revert: e769742d3584 ("Revert "x86/jump-labels: Macrofy inline assembly code to work around GCC inlining bugs"") Reported-by: Masahiro Yamada Reviewed-by: Borislav Petkov Reviewed-by: Thomas Gleixner Cc: Juergen Gross Cc: Richard Biener Cc: Kees Cook Cc: Segher Boessenkool Cc: Ard Biesheuvel Cc: Peter Zijlstra Cc: Josh Poimboeuf Cc: Nadav Amit Cc: Linus Torvalds Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar commit ffb61c6346d0f02b2a03377a3edac838c1f09b45 Author: Ingo Molnar Date: Wed Dec 19 11:20:50 2018 +0100 Revert "x86/bug: Macrofy the BUG table section handling, to work around GCC inlining bugs" This reverts commit f81f8ad56fd1c7b99b2ed1c314527f7d9ac447c6. See this commit for details about the revert: e769742d3584 ("Revert "x86/jump-labels: Macrofy inline assembly code to work around GCC inlining bugs"") Reported-by: Masahiro Yamada Reviewed-by: Borislav Petkov Reviewed-by: Thomas Gleixner Cc: Juergen Gross Cc: Richard Biener Cc: Kees Cook Cc: Segher Boessenkool Cc: Ard Biesheuvel Cc: Peter Zijlstra Cc: Josh Poimboeuf Cc: Nadav Amit Cc: Linus Torvalds Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar commit a4da3d86a285f0035a21bae776846c5077a535df Author: Ingo Molnar Date: Wed Dec 19 11:20:44 2018 +0100 Revert "x86/paravirt: Work around GCC inlining bugs when compiling paravirt ops" This reverts commit 494b5168f2de009eb80f198f668da374295098dd. See this commit for details about the revert: e769742d3584 ("Revert "x86/jump-labels: Macrofy inline assembly code to work around GCC inlining bugs"") Reported-by: Masahiro Yamada Reviewed-by: Borislav Petkov Reviewed-by: Thomas Gleixner Cc: Juergen Gross Cc: Richard Biener Cc: Kees Cook Cc: Segher Boessenkool Cc: Ard Biesheuvel Cc: Peter Zijlstra Cc: Josh Poimboeuf Cc: Nadav Amit Cc: Linus Torvalds Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar commit 81a68455e795c9094a49c017d974c89223e6cd42 Author: Ingo Molnar Date: Wed Dec 19 11:20:37 2018 +0100 Revert "x86/extable: Macrofy inline assembly code to work around GCC inlining bugs" This reverts commit 0474d5d9d2f7f3b11262f7bf87d0e7314ead9200. See this commit for details about the revert: e769742d3584 ("Revert "x86/jump-labels: Macrofy inline assembly code to work around GCC inlining bugs"") Reported-by: Masahiro Yamada Reviewed-by: Borislav Petkov Reviewed-by: Thomas Gleixner Cc: Juergen Gross Cc: Richard Biener Cc: Kees Cook Cc: Segher Boessenkool Cc: Ard Biesheuvel Cc: Peter Zijlstra Cc: Josh Poimboeuf Cc: Nadav Amit Cc: Linus Torvalds Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar commit c3462ba986837238f4409f2a9dfcf2b4c3195067 Author: Ingo Molnar Date: Wed Dec 19 11:20:30 2018 +0100 Revert "x86/cpufeature: Macrofy inline assembly code to work around GCC inlining bugs" This reverts commit d5a581d84ae6b8a4a740464b80d8d9cf1e7947b2. See this commit for details about the revert: e769742d3584 ("Revert "x86/jump-labels: Macrofy inline assembly code to work around GCC inlining bugs"") Reported-by: Masahiro Yamada Reviewed-by: Borislav Petkov Reviewed-by: Thomas Gleixner Cc: Juergen Gross Cc: Richard Biener Cc: Kees Cook Cc: Segher Boessenkool Cc: Ard Biesheuvel Cc: Peter Zijlstra Cc: Josh Poimboeuf Cc: Nadav Amit Cc: Linus Torvalds Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar commit e769742d35841a8198dd6af94e2931083abdee08 Author: Ingo Molnar Date: Wed Dec 19 11:20:23 2018 +0100 Revert "x86/jump-labels: Macrofy inline assembly code to work around GCC inlining bugs" This reverts commit 5bdcd510c2ac9efaf55c4cbd8d46421d8e2320cd. The macro based workarounds for GCC's inlining bugs caused regressions: distcc and other distro build setups broke, and the fixes are not easy nor will they solve regressions on already existing installations. So we are reverting this patch and the 8 followup patches. What makes this revert easier is that GCC9 will likely include the new 'asm inline' syntax that makes inlining of assembly blocks a lot more robust. This is a superior method to any macro based hackeries - and might even be backported to GCC8, which would make all modern distros get the inlining fixes as well. Many thanks to Masahiro Yamada and others for helping sort out these problems. Reported-by: Masahiro Yamada Reviewed-by: Borislav Petkov Reviewed-by: Thomas Gleixner Cc: Juergen Gross Cc: Richard Biener Cc: Kees Cook Cc: Segher Boessenkool Cc: Ard Biesheuvel Cc: Peter Zijlstra Cc: Josh Poimboeuf Cc: Nadav Amit Cc: Linus Torvalds Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar commit 34b1e0e9efe101822e83cc62d22443ed3867ae7a Author: Sara Sharon Date: Sat Dec 15 11:03:06 2018 +0200 mac80211: free skb fraglist before freeing the skb mac80211 uses the frag list to build AMSDU. When freeing the skb, it may not be really freed, since someone is still holding a reference to it. In that case, when TCP skb is being retransmitted, the pointer to the frag list is being reused, while the data in there is no longer valid. Since we will never get frag list from the network stack, as mac80211 doesn't advertise the capability, we can safely free and nullify it before releasing the SKB. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg commit d350a0f431189517b1af0dbbb605c273231a8966 Author: Johannes Berg Date: Sat Dec 15 11:03:22 2018 +0200 nl80211: fix memory leak if validate_pae_over_nl80211() fails If validate_pae_over_nl80211() were to fail in nl80211_crypto_settings(), we might leak the 'connkeys' allocation. Fix this. Fixes: 64bf3d4bc2b0 ("nl80211: Add CONTROL_PORT_OVER_NL80211 attribute") Signed-off-by: Johannes Berg commit 3061169a47ee3572af6de78887222b6d03771621 Merge: 78abe3d0dfad bcb671c2fa0e Author: David S. Miller Date: Tue Dec 18 22:30:33 2018 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Alexei Starovoitov says: ==================== pull-request: bpf 2018-12-18 The following pull-request contains BPF updates for your *net* tree. The main changes are: 1) promote bpf_perf_event.h to mandatory UAPI header, from Masahiro. ==================== Signed-off-by: David S. Miller commit 78abe3d0dfad196959b1246003366e2610775ea6 Author: Myungho Jung Date: Tue Dec 18 09:02:25 2018 -0800 net/smc: fix TCP fallback socket release clcsock can be released while kernel_accept() references it in TCP listen worker. Also, clcsock needs to wake up before released if TCP fallback is used and the clcsock is blocked by accept. Add a lock to safely release clcsock and call kernel_sock_shutdown() to wake up clcsock from accept in smc_release(). Reported-by: syzbot+0bf2e01269f1274b4b03@syzkaller.appspotmail.com Reported-by: syzbot+e3132895630f957306bc@syzkaller.appspotmail.com Signed-off-by: Myungho Jung Signed-off-by: David S. Miller commit f7db2beb4c2c6cc8111f5ab90fc7363ca91107b6 Author: Colin Ian King Date: Tue Dec 18 15:19:47 2018 +0000 vxge: ensure data0 is initialized in when fetching firmware version information Currently variable data0 is not being initialized so a garbage value is being passed to vxge_hw_vpath_fw_api and this value is being written to the rts_access_steer_data0 register. There are other occurrances where data0 is being initialized to zero (e.g. in function vxge_hw_upgrade_read_version) so I think it makes sense to ensure data0 is initialized likewise to 0. Detected by CoverityScan, CID#140696 ("Uninitialized scalar variable") Fixes: 8424e00dfd52 ("vxge: serialize access to steering control register") Signed-off-by: Colin Ian King Signed-off-by: David S. Miller commit d81c5054a5d1d4999c7cdead7636b6cd4af83d36 Author: Juergen Gross Date: Tue Dec 18 16:06:19 2018 +0100 xen/netfront: tolerate frags with no data At least old Xen net backends seem to send frags with no real data sometimes. In case such a fragment happens to occur with the frag limit already reached the frontend will BUG currently even if this situation is easily recoverable. Modify the BUG_ON() condition accordingly. Tested-by: Dietmar Hahn Signed-off-by: Juergen Gross Signed-off-by: David S. Miller commit 8742beb50f2db903d3b6d69ddd81d67ce9914453 Author: Kunihiko Hayashi Date: Tue Dec 18 16:57:04 2018 +0900 net: phy: Fix the issue that netif always links up after resuming Even though the link is down before entering hibernation, there is an issue that the network interface always links up after resuming from hibernation. If the link is still down before enabling the network interface, and after resuming from hibernation, the phydev->state is forcibly set to PHY_UP in mdio_bus_phy_restore(), and the link becomes up. In suspend sequence, only if the PHY is attached, mdio_bus_phy_suspend() calls phy_stop_machine(), and mdio_bus_phy_resume() calls phy_start_machine(). In resume sequence, it's enough to do the same as mdio_bus_phy_resume() because the state has been preserved. This patch fixes the issue by calling phy_start_machine() in mdio_bus_phy_restore() in the same way as mdio_bus_phy_resume(). Fixes: bc87922ff59d ("phy: Move PHY PM operations into phy_device") Suggested-by: Heiner Kallweit Signed-off-by: Kunihiko Hayashi Signed-off-by: David S. Miller commit 15515aaaa69659c502003926a2067ee76176148a Author: Jason Martinsen Date: Tue Dec 18 05:38:22 2018 +0000 lan78xx: Resolve issue with changing MAC address Current state for the lan78xx driver does not allow for changing the MAC address of the interface, without either removing the module (if you compiled it that way) or rebooting the machine. If you attempt to change the MAC address, ifconfig will show the new address, however, the system/interface will not respond to any traffic using that configuration. A few short-term options to work around this are to unload the module and reload it with the new MAC address, change the interface to "promisc", or reboot with the correct configuration to change the MAC. This patch enables the ability to change the MAC address via fairly normal means... ifdown modify entry in /etc/network/interfaces OR a similar method ifup Then test via any network communication, such as ICMP requests to gateway. My only test platform for this patch has been a raspberry pi model 3b+. Signed-off-by: Jason Martinsen ----- Signed-off-by: David S. Miller commit 0db7d253e9f0ff1a41c602429bea93df221be6ed Author: Bryan Whitehead Date: Mon Dec 17 16:44:50 2018 -0500 lan743x: Expand phy search for LAN7431 The LAN7431 uses an external phy, and it can be found anywhere in the phy address space. This patch uses phy address 1 for LAN7430 only. And searches all addresses otherwise. Signed-off-by: Bryan Whitehead Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 59fc137ebdd1a93bfec991a1c8dd96002433b2e9 Merge: a9d6d897f399 55cbe0794294 Author: David S. Miller Date: Tue Dec 18 21:18:26 2018 -0800 Merge branch 'vxlan-Various-fixes' Petr Machata says: ==================== vxlan: Various fixes This patch set contains three fixes for the vxlan driver. Patch #1 fixes handling of offload mark on replaced VXLAN FDB entries. A way to trigger this is to replace the FDB entry with one that can not be offloaded. A future patch set should make it possible to veto such FDB changes. However the FDB might still fail to be offloaded due to another issue, and the offload mark should reflect that. Patch #2 fixes problems in __vxlan_dev_create() when a call to rtnl_configure_link() fails. These failures would be tricky to hit on a real system, the most likely vector is through an error in vxlan_open(). However, with the abovementioned vetoing patchset, vetoing the created entry would trigger the same problems (and be easier to reproduce). Patch #3 fixes a problem in vxlan_changelink(). In situations where the default remote configured in the FDB table (if any) does not exactly match the remote address configured at the VXLAN device, changing the remote address breaks the default FDB entry. Patch #4 is then a self test for this issue. v3: - Patch #2: - Reuse the same errout block for both cleanup paths. Use a bool to decide whether the unregister_netdevice() call should be made. v2: - Drop former patch #3 - Patch #2: - Delete the default entry before calling unregister_netdevice(). That takes care of former patch #3, hence tweak the commit message to mention that problem as well. ==================== Signed-off-by: David S. Miller commit 55cbe0794294031d9b36984d4529f416e7e0a40a Author: Petr Machata Date: Tue Dec 18 13:16:03 2018 +0000 selftests: net: Add test_vxlan_fdb_changelink.sh Add a test to exercise the fix from the previous patch. Signed-off-by: Petr Machata Signed-off-by: David S. Miller commit ce5e098f7a10b4bf8e948c12fa350320c5c3afad Author: Petr Machata Date: Tue Dec 18 13:16:02 2018 +0000 vxlan: changelink: Fix handling of default remotes Default remotes are stored as FDB entries with an Ethernet address of 00:00:00:00:00:00. When a request is made to change a remote address of a VXLAN device, vxlan_changelink() first deletes the existing default remote, and then creates a new FDB entry. This works well as long as the list of default remotes matches exactly the configuration of a VXLAN remote address. Thus when the VXLAN device has a remote of X, there should be exactly one default remote FDB entry X. If the VXLAN device has no remote address, there should be no such entry. Besides using "ip link set", it is possible to manipulate the list of default remotes by using the "bridge fdb". It is therefore easy to break the above condition. Under such circumstances, the __vxlan_fdb_delete() call doesn't delete the FDB entry itself, but just one remote. The following vxlan_fdb_create() then creates a new FDB entry, leading to a situation where two entries exist for the address 00:00:00:00:00:00, each with a different subset of default remotes. An even more obvious breakage rooted in the same cause can be observed when a remote address is configured for a VXLAN device that did not have one before. In that case vxlan_changelink() doesn't remove any remote, and just creates a new FDB entry for the new address: $ ip link add name vx up type vxlan id 2000 dstport 4789 $ bridge fdb ap dev vx 00:00:00:00:00:00 dst 192.0.2.20 self permanent $ bridge fdb ap dev vx 00:00:00:00:00:00 dst 192.0.2.30 self permanent $ ip link set dev vx type vxlan remote 192.0.2.30 $ bridge fdb sh dev vx | grep 00:00:00:00:00:00 00:00:00:00:00:00 dst 192.0.2.30 self permanent <- new entry, 1 rdst 00:00:00:00:00:00 dst 192.0.2.20 self permanent <- orig. entry, 2 rdsts 00:00:00:00:00:00 dst 192.0.2.30 self permanent To fix this, instead of calling vxlan_fdb_create() directly, defer to vxlan_fdb_update(). That has logic to handle the duplicates properly. Additionally, it also handles notifications, so drop that call from changelink as well. Fixes: 0241b836732f ("vxlan: fix default fdb entry netlink notify ordering during netdev create") Signed-off-by: Petr Machata Acked-by: Roopa Prabhu Signed-off-by: David S. Miller commit 6db9246871394b3a136cd52001a0763676563840 Author: Petr Machata Date: Tue Dec 18 13:16:00 2018 +0000 vxlan: Fix error path in __vxlan_dev_create() When a failure occurs in rtnl_configure_link(), the current code calls unregister_netdevice() to roll back the earlier call to register_netdevice(), and jumps to errout, which calls vxlan_fdb_destroy(). However unregister_netdevice() calls transitively ndo_uninit, which is vxlan_uninit(), and that already takes care of deleting the default FDB entry by calling vxlan_fdb_delete_default(). Since the entry added earlier in __vxlan_dev_create() is exactly the default entry, the cleanup code in the errout block always leads to double free and thus a panic. Besides, since vxlan_fdb_delete_default() always destroys the FDB entry with notification enabled, the deletion of the default entry is notified even before the addition was notified. Instead, move the unregister_netdevice() call after the manual destroy, which solves both problems. Fixes: 0241b836732f ("vxlan: fix default fdb entry netlink notify ordering during netdev create") Signed-off-by: Petr Machata Signed-off-by: David S. Miller commit 6ad0b5a4e03dc5cc0c1ed6be093bdcefdc794a6f Author: Petr Machata Date: Tue Dec 18 13:15:59 2018 +0000 vxlan: Unmark offloaded bit on replaced FDB entries When rdst of an offloaded FDB entry is replaced, it certainly isn't offloaded anymore. Drivers are notified about such replacements, and can re-mark the entry as offloaded again if they so wish. However until a driver does so explicitly, assume a replaced FDB entry is not offloaded. Note that replaces coming via vxlan_fdb_external_learn_add() are always immediately followed by an explicit offload marking. Fixes: 0efe11733356 ("vxlan: Support marking RDSTs as offloaded") Signed-off-by: Petr Machata Signed-off-by: David S. Miller commit a9d6d897f3999e613dfacd4efbf63057f30ad7b3 Merge: e2c4cf7f98a5 6e0af298066f Author: David S. Miller Date: Tue Dec 18 16:17:49 2018 -0800 Merge branch 'macb-DMA-race-fixes' Anssi Hannula says: ==================== net: macb: DMA race condition fixes Here are a couple of race condition fixes for the macb driver. The first two are for issues observed at runtime on real HW. v2: - added received Tested-bys and Acked-bys to the first two patches - in patch 3/3, moved the timestamp protection barrier closer to the timestamp reads - in patch 3/3, removed unnecessary move of the addr assignment in gem_rx() to keep the patch minimal for maximum clarity - in patch 3/3, clarified commit message and comments The 3/3 is the same one I improperly sent last week as a standalone patch. ==================== Signed-off-by: David S. Miller commit 6e0af298066f3b6d99f58989bb0dca6f764b4c6d Author: Anssi Hannula Date: Mon Dec 17 15:05:41 2018 +0200 net: macb: add missing barriers when reading descriptors When reading buffer descriptors on RX or on TX completion, an RX_USED/TX_USED bit is checked first to ensure that the descriptors have been populated, i.e. the ownership has been transferred. However, there are no memory barriers to ensure that the data protected by the RX_USED/TX_USED bit is up-to-date with respect to that bit. Specifically: - TX timestamp descriptors may be loaded before ctrl is loaded for the TX_USED check, which is racy as the descriptors may be updated between the loads, causing old timestamp descriptor data to be used. - RX ctrl may be loaded before addr is loaded for the RX_USED check, which is racy as a new frame may be written between the loads, causing old ctrl descriptor data to be used. This issue exists for both macb_rx() and gem_rx() variants. Fix the races by adding DMA read memory barriers on those paths and reordering the reads in macb_rx(). I have not observed any actual problems in practice caused by these being missing, though. Tested on a ZynqMP based system. Fixes: 89e5785fc8a6 ("[PATCH] Atmel MACB ethernet driver") Signed-off-by: Anssi Hannula Cc: Nicolas Ferre Signed-off-by: David S. Miller commit 8159ecab0db9095902d4c73605fb8787f5c7d653 Author: Anssi Hannula Date: Mon Dec 17 15:05:40 2018 +0200 net: macb: fix dropped RX frames due to a race Bit RX_USED set to 0 in the address field allows the controller to write data to the receive buffer descriptor. The driver does not ensure the ctrl field is ready (cleared) when the controller sees the RX_USED=0 written by the driver. The ctrl field might only be cleared after the controller has already updated it according to a newly received frame, causing the frame to be discarded in gem_rx() due to unexpected ctrl field contents. A message is logged when the above scenario occurs: macb ff0b0000.ethernet eth0: not whole frame pointed by descriptor Fix the issue by ensuring that when the controller sees RX_USED=0 the ctrl field is already cleared. This issue was observed on a ZynqMP based system. Fixes: 4df95131ea80 ("net/macb: change RX path for GEM") Signed-off-by: Anssi Hannula Tested-by: Claudiu Beznea Cc: Nicolas Ferre Signed-off-by: David S. Miller commit e100a897bf9b19089e57f236f2398c9e0538900e Author: Anssi Hannula Date: Mon Dec 17 15:05:39 2018 +0200 net: macb: fix random memory corruption on RX with 64-bit DMA 64-bit DMA addresses are split in upper and lower halves that are written in separate fields on GEM. For RX, bit 0 of the address is used as the ownership bit (RX_USED). When the RX_USED bit is unset the controller is allowed to write data to the buffer. The driver does not guarantee that the controller already sees the upper half when the RX_USED bit is cleared, possibly resulting in the controller writing an incoming frame to an address with an incorrect upper half and therefore possibly corrupting unrelated system memory. Fix that by adding the necessary DMA memory barrier between the writes. This corruption was observed on a ZynqMP based system. Fixes: fff8019a08b6 ("net: macb: Add 64 bit addressing support for GEM") Signed-off-by: Anssi Hannula Acked-by: Harini Katakam Tested-by: Claudiu Beznea Cc: Nicolas Ferre Cc: Michal Simek Signed-off-by: David S. Miller commit e2c4cf7f98a519eb4d95532bfa06bcaf3562fed5 Author: Davide Caratti Date: Mon Dec 17 11:26:38 2018 +0100 net: Use __kernel_clockid_t in uapi net_stamp.h Herton reports the following error when building a userspace program that includes net_stamp.h: In file included from foo.c:2: /usr/include/linux/net_tstamp.h:158:2: error: unknown type name ‘clockid_t’ clockid_t clockid; /* reference clockid */ ^~~~~~~~~ Fix it by using __kernel_clockid_t in place of clockid_t. Fixes: 80b14dee2bea ("net: Add a new socket option for a future transmit time.") Cc: Timothy Redaelli Reported-by: Herton R. Krzesinski Signed-off-by: Davide Caratti Tested-by: Paolo Abeni Signed-off-by: David S. Miller commit 4298388574dae6168fa8940b3edc7ba965e8a7ab Author: Claudiu Beznea Date: Mon Dec 17 10:02:42 2018 +0000 net: macb: restart tx after tx used bit read On some platforms (currently detected only on SAMA5D4) TX might stuck even the pachets are still present in DMA memories and TX start was issued for them. This happens due to race condition between MACB driver updating next TX buffer descriptor to be used and IP reading the same descriptor. In such a case, the "TX USED BIT READ" interrupt is asserted. GEM/MACB user guide specifies that if a "TX USED BIT READ" interrupt is asserted TX must be restarted. Restart TX if used bit is read and packets are present in software TX queue. Packets are removed from software TX queue if TX was successful for them (see macb_tx_interrupt()). Signed-off-by: Claudiu Beznea Acked-by: Nicolas Ferre Signed-off-by: David S. Miller commit 62393dbcbe0f3001691e4bd479a25beb5941f2ed Merge: e738441e803d 98256376f81a Author: Linus Torvalds Date: Tue Dec 18 15:47:40 2018 -0800 Merge tag 'for-linus-20181218' of git://git.kernel.dk/linux-block Pull block fix from Jens Axboe: "Correct an ioctl direction for the zoned ioctls" * tag 'for-linus-20181218' of git://git.kernel.dk/linux-block: uapi: linux/blkzoned.h: fix BLKGETZONESZ and BLKGETNRZONES definitions commit e738441e803db6b61d5119df8f758396914fafd8 Merge: ddfbab46539f 1063a5148ac9 Author: Linus Torvalds Date: Tue Dec 18 15:45:38 2018 -0800 Merge tag 'pci-v4.20-fixes-4' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci Pull PCI fix from Bjorn Helgaas: "Fix the ACPI APEI error path, which previously queued several uninitialized events (Yanjiang Jin)" * tag 'pci-v4.20-fixes-4' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: PCI/AER: Queue one GHES event, not several uninitialized ones commit b26322d2ac6c1c1087af73856531bb836f6963ca Author: Dan Carpenter Date: Mon Dec 17 11:06:06 2018 +0300 net: stmmac: Fix an error code in probe() The function should return an error if create_singlethread_workqueue() fails. Fixes: 34877a15f787 ("net: stmmac: Rework and fix TX Timeout code") Signed-off-by: Dan Carpenter Signed-off-by: David S. Miller commit 3c6306d44082ef007a258ae1b86ea58e6974ee3f Author: Cong Wang Date: Sun Dec 16 23:25:12 2018 -0800 tipc: check group dests after tipc_wait_for_cond() Similar to commit 143ece654f9f ("tipc: check tsk->group in tipc_wait_for_cond()") we have to reload grp->dests too after we re-take the sock lock. This means we need to move the dsts check after tipc_wait_for_cond() too. Fixes: 75da2163dbb6 ("tipc: introduce communication groups") Reported-and-tested-by: syzbot+99f20222fc5018d2b97a@syzkaller.appspotmail.com Cc: Ying Xue Cc: Jon Maloy Signed-off-by: Cong Wang Acked-by: Jon Maloy Signed-off-by: David S. Miller commit f07d4276892d97671e880190ff195a288b2d8d92 Author: Dan Carpenter Date: Mon Dec 17 10:05:13 2018 +0300 qed: Fix an error code qed_ll2_start_xmit() We accidentally deleted the code to set "rc = -ENOMEM;" and this patch adds it back. Fixes: d2201a21598a ("qed: No need for LL2 frags indication") Signed-off-by: Dan Carpenter Signed-off-by: David S. Miller commit 32043fa065b51e0b1433e48d118821c71b5cd65d Author: Colin Ian King Date: Tue Dec 18 17:29:56 2018 +0000 x86/mtrr: Don't copy uninitialized gentry fields back to userspace Currently the copy_to_user of data in the gentry struct is copying uninitiaized data in field _pad from the stack to userspace. Fix this by explicitly memset'ing gentry to zero, this also will zero any compiler added padding fields that may be in struct (currently there are none). Detected by CoverityScan, CID#200783 ("Uninitialized scalar variable") Fixes: b263b31e8ad6 ("x86, mtrr: Use explicit sizing and padding for the 64-bit ioctls") Signed-off-by: Colin Ian King Signed-off-by: Thomas Gleixner Reviewed-by: Tyler Hicks Cc: security@kernel.org Link: https://lkml.kernel.org/r/20181218172956.1440-1-colin.king@canonical.com commit 006791772084383de779ef29f2e06f3a6e111e7d Author: Antoine Tenart Date: Tue Dec 11 17:32:28 2018 +0100 net: mvpp2: 10G modes aren't supported on all ports The mvpp2_phylink_validate() function sets all modes that are supported by a given PPv2 port. A recent change made all ports to advertise they support 10G modes in certain cases. This is not true, as only the port #0 can do so. This patch fixes it. Fixes: 01b3fd5ac97c ("net: mvpp2: fix detection of 10G SFP modules") Cc: Baruch Siach Signed-off-by: Antoine Tenart Signed-off-by: David S. Miller commit da791a667536bf8322042e38ca85d55a78d3c273 Author: Thomas Gleixner Date: Mon Dec 10 14:35:14 2018 +0100 futex: Cure exit race Stefan reported, that the glibc tst-robustpi4 test case fails occasionally. That case creates the following race between sys_exit() and sys_futex_lock_pi(): CPU0 CPU1 sys_exit() sys_futex() do_exit() futex_lock_pi() exit_signals(tsk) No waiters: tsk->flags |= PF_EXITING; *uaddr == 0x00000PID mm_release(tsk) Set waiter bit exit_robust_list(tsk) { *uaddr = 0x80000PID; Set owner died attach_to_pi_owner() { *uaddr = 0xC0000000; tsk = get_task(PID); } if (!tsk->flags & PF_EXITING) { ... attach(); tsk->flags |= PF_EXITPIDONE; } else { if (!(tsk->flags & PF_EXITPIDONE)) return -EAGAIN; return -ESRCH; <--- FAIL } ESRCH is returned all the way to user space, which triggers the glibc test case assert. Returning ESRCH unconditionally is wrong here because the user space value has been changed by the exiting task to 0xC0000000, i.e. the FUTEX_OWNER_DIED bit is set and the futex PID value has been cleared. This is a valid state and the kernel has to handle it, i.e. taking the futex. Cure it by rereading the user space value when PF_EXITING and PF_EXITPIDONE is set in the task which 'owns' the futex. If the value has changed, let the kernel retry the operation, which includes all regular sanity checks and correctly handles the FUTEX_OWNER_DIED case. If it hasn't changed, then return ESRCH as there is no way to distinguish this case from malfunctioning user space. This happens when the exiting task did not have a robust list, the robust list was corrupted or the user space value in the futex was simply bogus. Reported-by: Stefan Liebler Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra Cc: Heiko Carstens Cc: Darren Hart Cc: Ingo Molnar Cc: Sasha Levin Cc: stable@vger.kernel.org Link: https://bugzilla.kernel.org/show_bug.cgi?id=200467 Link: https://lkml.kernel.org/r/20181210152311.986181245@linutronix.de commit 0e1b869fff60c81b510c2d00602d778f8f59dd9a Author: Eduardo Habkost Date: Mon Dec 17 22:34:18 2018 -0200 kvm: x86: Add AMD's EX_CFG to the list of ignored MSRs Some guests OSes (including Windows 10) write to MSR 0xc001102c on some cases (possibly while trying to apply a CPU errata). Make KVM ignore reads and writes to that MSR, so the guest won't crash. The MSR is documented as "Execution Unit Configuration (EX_CFG)", at AMD's "BIOS and Kernel Developer's Guide (BKDG) for AMD Family 15h Models 00h-0Fh Processors". Cc: stable@vger.kernel.org Signed-off-by: Eduardo Habkost Signed-off-by: Paolo Bonzini commit dcbd3e49c2f0b2c2d8a321507ff8f3de4af76d7c Author: Wanpeng Li Date: Mon Dec 17 10:43:23 2018 +0800 KVM: X86: Fix NULL deref in vcpu_scan_ioapic Reported by syzkaller: CPU: 1 PID: 5962 Comm: syz-executor118 Not tainted 4.20.0-rc6+ #374 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:kvm_apic_hw_enabled arch/x86/kvm/lapic.h:169 [inline] RIP: 0010:vcpu_scan_ioapic arch/x86/kvm/x86.c:7449 [inline] RIP: 0010:vcpu_enter_guest arch/x86/kvm/x86.c:7602 [inline] RIP: 0010:vcpu_run arch/x86/kvm/x86.c:7874 [inline] RIP: 0010:kvm_arch_vcpu_ioctl_run+0x5296/0x7320 arch/x86/kvm/x86.c:8074 Call Trace: kvm_vcpu_ioctl+0x5c8/0x1150 arch/x86/kvm/../../../virt/kvm/kvm_main.c:2596 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:509 [inline] do_vfs_ioctl+0x1de/0x1790 fs/ioctl.c:696 ksys_ioctl+0xa9/0xd0 fs/ioctl.c:713 __do_sys_ioctl fs/ioctl.c:720 [inline] __se_sys_ioctl fs/ioctl.c:718 [inline] __x64_sys_ioctl+0x73/0xb0 fs/ioctl.c:718 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe The reason is that the testcase writes hyperv synic HV_X64_MSR_SINT14 msr and triggers scan ioapic logic to load synic vectors into EOI exit bitmap. However, irqchip is not initialized by this simple testcase, ioapic/apic objects should not be accessed. This patch fixes it by also considering whether or not apic is present. Reported-by: syzbot+39810e6c400efadfef71@syzkaller.appspotmail.com Cc: stable@vger.kernel.org Cc: Paolo Bonzini Cc: Radim Krčmář Signed-off-by: Wanpeng Li Signed-off-by: Paolo Bonzini commit c2dd5146e9fe1f22c77c1b011adf84eea0245806 Author: Cfir Cohen Date: Tue Dec 18 08:18:41 2018 -0800 KVM: Fix UAF in nested posted interrupt processing nested_get_vmcs12_pages() processes the posted_intr address in vmcs12. It caches the kmap()ed page object and pointer, however, it doesn't handle errors correctly: it's possible to cache a valid pointer, then release the page and later dereference the dangling pointer. I was able to reproduce with the following steps: 1. Call vmlaunch with valid posted_intr_desc_addr but an invalid MSR_EFER. This causes nested_get_vmcs12_pages() to cache the kmap()ed pi_desc_page and pi_desc. Later the invalid EFER value fails check_vmentry_postreqs() which fails the first vmlaunch. 2. Call vmlanuch with a valid EFER but an invalid posted_intr_desc_addr (I set it to 2G - 0x80). The second time we call nested_get_vmcs12_pages pi_desc_page is unmapped and released and pi_desc_page is set to NULL (the "shouldn't happen" clause). Due to the invalid posted_intr_desc_addr, kvm_vcpu_gpa_to_page() fails and nested_get_vmcs12_pages() returns. It doesn't return an error value so vmlaunch proceeds. Note that at this time we have a dangling pointer in vmx->nested.pi_desc and POSTED_INTR_DESC_ADDR in L0's vmcs. 3. Issue an IPI in L2 guest code. This triggers a call to vmx_complete_nested_posted_interrupt() and pi_test_and_clear_on() which dereferences the dangling pointer. Vulnerable code requires nested and enable_apicv variables to be set to true. The host CPU must also support posted interrupts. Fixes: 5e2f30b756a37 "KVM: nVMX: get rid of nested_get_page()" Cc: stable@vger.kernel.org Reviewed-by: Andy Honig Signed-off-by: Cfir Cohen Reviewed-by: Liran Alon Signed-off-by: Paolo Bonzini commit 987d1149be7ddcc1380ff946cf236874421a7e1b Author: Eric Biggers Date: Mon Dec 17 09:36:19 2018 -0800 KVM: fix unregistering coalesced mmio zone from wrong bus If you register a kvm_coalesced_mmio_zone with '.pio = 0' but then unregister it with '.pio = 1', KVM_UNREGISTER_COALESCED_MMIO will try to unregister it from KVM_PIO_BUS rather than KVM_MMIO_BUS, which is a no-op. But it frees the kvm_coalesced_mmio_dev anyway, causing a use-after-free. Fix it by only unregistering and freeing the zone if the correct value of 'pio' is provided. Reported-by: syzbot+f87f60bb6f13f39b54e3@syzkaller.appspotmail.com Fixes: 0804c849f1df ("kvm/x86 : add coalesced pio support") Signed-off-by: Eric Biggers Signed-off-by: Paolo Bonzini commit a915b982d8f5e4295f64b8dd37ce753874867e88 Author: Jorgen Hansen Date: Tue Dec 18 00:34:06 2018 -0800 VSOCK: Send reset control packet when socket is partially bound If a server side socket is bound to an address, but not in the listening state yet, incoming connection requests should receive a reset control packet in response. However, the function used to send the reset silently drops the reset packet if the sending socket isn't bound to a remote address (as is the case for a bound socket not yet in the listening state). This change fixes this by using the src of the incoming packet as destination for the reset packet in this case. Fixes: d021c344051a ("VSOCK: Introduce VM Sockets") Reviewed-by: Adit Ranadive Reviewed-by: Vishnu Dasa Signed-off-by: Jorgen Hansen Signed-off-by: David S. Miller commit fde9cd69a59f7ee405c87fff84bc08fa2a550e47 Merge: 8d013b791059 4a135e538962 Author: David S. Miller Date: Tue Dec 18 11:43:26 2018 -0800 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec Steffen Klassert says: ==================== pull request (net): ipsec 2018-12-18 1) Fix error return code in xfrm_output_one() when no dst_entry is attached to the skb. From Wei Yongjun. 2) The xfrm state hash bucket count reported to userspace is off by one. Fix from Benjamin Poirier. 3) Fix NULL pointer dereference in xfrm_input when skb_dst_force clears the dst_entry. 4) Fix freeing of xfrm states on acquire. We use a dedicated slab cache for the xfrm states now, so free it properly with kmem_cache_free. From Mathias Krause. Please pull or let me know if there are problems. ==================== Signed-off-by: David S. Miller commit ddfbab46539f2d37a9e9d357b054486b51f7dc27 Merge: 1a9430db2835 60a89a3ce0cc Author: Linus Torvalds Date: Tue Dec 18 09:38:34 2018 -0800 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "Three fixes: The t10-pi one is a regression from the 4.19 release, the qla2xxx one is a 4.20 merge window regression and the bnx2fc is a very old bug" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: t10-pi: Return correct ref tag when queue has no integrity profile scsi: bnx2fc: Fix NULL dereference in error handling Revert "scsi: qla2xxx: Fix NVMe Target discovery" commit 8d013b7910599a06405fb37d6def4dde7cab7984 Merge: a5f3932646a7 5edb7e8bd52c Author: David S. Miller Date: Tue Dec 18 09:17:39 2018 -0800 Merge branch 'mlxsw-VXLAN-and-firmware-flashing-fixes' Ido Schimmel says: ==================== mlxsw: VXLAN and firmware flashing fixes Patch #1 fixes firmware flashing failures by increasing the time period after which the driver fails the transaction with the firmware. The problem is explained in detail in the commit message. Patch #2 adds a missing trap for decapsulated ARP packets. It is necessary for VXLAN routing to work. Patch #3 fixes a memory leak during driver reload caused by NULLing a pointer before kfree(). Please consider patch #1 for 4.19.y ==================== Signed-off-by: David S. Miller commit 5edb7e8bd52cd79634d1d7fbc97c5960a21b2873 Author: Ido Schimmel Date: Tue Dec 18 15:59:23 2018 +0000 mlxsw: spectrum_nve: Fix memory leak upon driver reload The pointer was NULLed before freeing the memory, resulting in a memory leak. Trace from kmemleak: unreferenced object 0xffff88820ae36528 (size 512): comm "devlink", pid 5374, jiffies 4295354033 (age 10829.296s) hex dump (first 32 bytes): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace: [<00000000a43f5195>] kmem_cache_alloc_trace+0x1be/0x330 [<00000000312f8140>] mlxsw_sp_nve_init+0xcb/0x1ae0 [<0000000009201d22>] mlxsw_sp_init+0x1382/0x2690 [<000000007227d877>] mlxsw_sp1_init+0x1b5/0x260 [<000000004a16feec>] __mlxsw_core_bus_device_register+0x776/0x1360 [<0000000070ab954c>] mlxsw_devlink_core_bus_device_reload+0x129/0x220 [<00000000432313d5>] devlink_nl_cmd_reload+0x119/0x1e0 [<000000003821a06b>] genl_family_rcv_msg+0x813/0x1150 [<00000000d54d04c0>] genl_rcv_msg+0xd1/0x180 [<0000000040543d12>] netlink_rcv_skb+0x152/0x3c0 [<00000000efc4eae8>] genl_rcv+0x2d/0x40 [<00000000ea645603>] netlink_unicast+0x52f/0x740 [<00000000641fca1a>] netlink_sendmsg+0x9c7/0xf50 [<00000000fed4a4b8>] sock_sendmsg+0xbe/0x120 [<00000000d85795a9>] __sys_sendto+0x397/0x620 [<00000000c5f84622>] __x64_sys_sendto+0xe6/0x1a0 Fixes: 6e6030bd5412 ("mlxsw: spectrum_nve: Implement common NVE core") Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit 5d5043917a28438df163c4e6e56e77ef6d981089 Author: Ido Schimmel Date: Tue Dec 18 15:59:22 2018 +0000 mlxsw: spectrum: Add trap for decapsulated ARP packets After a packet was decapsulated it is classified to the relevant FID based on its VNI and undergoes L2 forwarding. Unlike regular (non-encapsulated) ARP packets, Spectrum does not trap decapsulated ARP packets during L2 forwarding and instead can only trap such packets in the underlay router during decapsulation. Add this missing packet trap, which is required for VXLAN routing when the MAC of the target host is not known. Fixes: b02597d513a9 ("mlxsw: spectrum: Add NVE packet traps") Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit cf0b70e71b32137ccf9c1f3dd9fb30cbf89b4322 Author: Shalom Toledo Date: Tue Dec 18 15:59:20 2018 +0000 mlxsw: core: Increase timeout during firmware flash process During the firmware flash process, some of the EMADs get timed out, which causes the driver to send them again with a limit of 5 retries. There are some situations in which 5 retries is not enough and the EMAD access fails. If the failed EMAD was related to the flashing process, the driver fails the flashing. The reason for these timeouts during firmware flashing is cache misses in the CPU running the firmware. In case the CPU needs to fetch instructions from the flash when a firmware is flashed, it needs to wait for the flashing to complete. Since flashing takes time, it is possible for pending EMADs to timeout. Fix by increasing EMADs' timeout while flashing firmware. Fixes: ce6ef68f433f ("mlxsw: spectrum: Implement the ethtool flash_device callback") Signed-off-by: Shalom Toledo Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit abc13275771fac77e2d7b129c289522dacb644b6 Author: Trond Myklebust Date: Mon Dec 17 17:33:33 2018 -0500 SUNRPC: Remove xprt_connect_status() Over the years, xprt_connect_status() has been superseded by call_connect_status(), which now handles all the errors that xprt_connect_status() does and more. Since the latter converts all errors that it doesn't recognise to EIO, then it is time for it to be retired. Reported-by: Chuck Lever Signed-off-by: Trond Myklebust Tested-by: Chuck Lever commit cf76785d30712d90185455e752337acdb53d2a5d Author: Trond Myklebust Date: Mon Dec 17 17:38:51 2018 -0500 SUNRPC: Fix a race with XPRT_CONNECTING Ensure that we clear XPRT_CONNECTING before releasing the XPRT_LOCK so that we don't have races between the (asynchronous) socket setup code and tasks in xprt_connect(). Signed-off-by: Trond Myklebust Tested-by: Chuck Lever commit 0445f92c5d537c173a54446b80d2052145de5148 Author: Trond Myklebust Date: Mon Dec 17 13:34:59 2018 -0500 SUNRPC: Fix disconnection races When the socket is closed, we need to call xprt_disconnect_done() in order to clean up the XPRT_WRITE_SPACE flag, and wake up the sleeping tasks. However, we also want to ensure that we don't wake them up before the socket is closed, since that would cause thundering herd issues with everyone piling up to retransmit before the TCP shutdown dance has completed. Only the task that holds XPRT_LOCKED needs to wake up early in order to allow the close to complete. Reported-by: Dave Wysochanski Reported-by: Scott Mayhew Cc: Chuck Lever Signed-off-by: Trond Myklebust Tested-by: Chuck Lever commit 87ab4689ca6526079ab6f5150219ee88b42000ae Author: Chang S. Bae Date: Mon Nov 26 11:55:24 2018 -0800 x86/fsgsbase/64: Fix the base write helper functions Andy spotted a regression in the fs/gs base helpers after the patch series was committed. The helper functions which write fs/gs base are not just writing the base, they are also changing the index. That's wrong and needs to be separated because writing the base has not to modify the index. While the regression is not causing any harm right now because the only caller depends on that behaviour, it's a guarantee for subtle breakage down the road. Make the index explicitly changed from the caller, instead of including the code in the helpers. Subsequently, the task write helpers do not handle for the current task anymore. The range check for a base value is also factored out, to minimize code redundancy from the caller. Fixes: b1378a561fd1 ("x86/fsgsbase/64: Introduce FS/GS base helper functions") Suggested-by: Andy Lutomirski Signed-off-by: Chang S. Bae Signed-off-by: Thomas Gleixner Reviewed-by: Andy Lutomirski Cc: "H . Peter Anvin" Cc: Andi Kleen Cc: Dave Hansen Cc: Ravi Shankar Cc: H. Peter Anvin Link: https://lkml.kernel.org/r/20181126195524.32179-1-chang.seok.bae@intel.com commit a50e5fb8db83c5b57392204c21ea6c5c4ccefde6 Author: Sara Sharon Date: Sat Dec 15 11:03:10 2018 +0200 mac80211: fix a kernel panic when TXing after TXQ teardown Recently TXQ teardown was moved earlier in ieee80211_unregister_hw(), to avoid a use-after-free of the netdev data. However, interfaces aren't fully removed at the point, and cfg80211_shutdown_all_interfaces can for example, TX a deauth frame. Move the TXQ teardown to the point between cfg80211_shutdown_all_interfaces and the free of netdev queues, so we can be sure they are torn down before netdev is freed, but after there is no ongoing TX. Fixes: 77cfaf52eca5 ("mac80211: Run TXQ teardown code before de-registering interfaces") Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg commit a5f3932646a74e690ed532a1f421f75c3b8cf1ec Author: Vivien Didelot Date: Mon Dec 17 16:05:21 2018 -0500 net: dsa: mv88e6xxx: set ethtool regs version Currently the ethtool_regs version is set to 0 for all DSA drivers. Use this field to store the chip ID to simplify the pretty dump of any interfaces registered by the "dsa" driver. Signed-off-by: Vivien Didelot Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit b33299017ca7a303fa650e007ebfbcf57527fc8c Merge: 255fe81a6ad4 8f932f762e79 Author: David S. Miller Date: Mon Dec 17 23:27:01 2018 -0800 Merge branch 'net-SO_TIMESTAMPING-fixes' Willem de Bruijn says: ==================== net: SO_TIMESTAMPING fixes Fix two omissions: - tx timestamping is missing for AF_INET6/SOCK_RAW/IPPROTO_RAW - SOF_TIMESTAMPING_OPT_ID is missing for IPPROTO_RAW, PF_PACKET, CAN Discovered while expanding the selftest in tools/testing/selftests/networking/timestamping/txtimestamp.c Will send the test patchset to net-next once the fixes make it to that branch. For now, it is available at https://github.com/wdebruij/linux/commits/txtimestamp-test-1 ==================== Signed-off-by: David S. Miller commit 8f932f762e7928d250e21006b00ff9b7718b0a64 Author: Willem de Bruijn Date: Mon Dec 17 12:24:00 2018 -0500 net: add missing SOF_TIMESTAMPING_OPT_ID support SOF_TIMESTAMPING_OPT_ID is supported on TCP, UDP and RAW sockets. But it was missing on RAW with IPPROTO_IP, PF_PACKET and CAN. Add skb_setup_tx_timestamp that configures both tx_flags and tskey for these paths that do not need corking or use bytestream keys. Fixes: 09c2d251b707 ("net-timestamp: add key to disambiguate concurrent datagrams") Signed-off-by: Willem de Bruijn Acked-by: Soheil Hassas Yeganeh Signed-off-by: David S. Miller commit fbfb2321e950918b430e7225546296b2dcadf725 Author: Willem de Bruijn Date: Mon Dec 17 12:23:59 2018 -0500 ipv6: add missing tx timestamping on IPPROTO_RAW Raw sockets support tx timestamping, but one case is missing. IPPROTO_RAW takes a separate packet construction path. raw_send_hdrinc has an explicit call to sock_tx_timestamp, but rawv6_send_hdrinc does not. Add it. Fixes: 11878b40ed5c ("net-timestamp: SOCK_RAW and PING timestamping") Signed-off-by: Willem de Bruijn Acked-by: Soheil Hassas Yeganeh Signed-off-by: David S. Miller commit 1a9430db2835c0c00acc87d915b573496998c1bf Author: Mimi Zohar Date: Mon Dec 17 19:14:49 2018 -0500 ima: cleanup the match_token policy code Start the policy_tokens and the associated enumeration from zero, simplifying the pt macro. Signed-off-by: Mimi Zohar Signed-off-by: Linus Torvalds commit 94c13f66e13ca0f3d5b7b9e7e385fe5db35abe3c Author: Linus Torvalds Date: Mon Dec 17 11:39:57 2018 -0800 security: don't use a negative Opt_err token index The code uses a bitmap to check for duplicate tokens during parsing, and that doesn't work at all for the negative Opt_err token case. There is absolutely no reason to make Opt_err be negative, and in fact it only confuses things, since some of the affected functions actually return a positive Opt_xyz enum _or_ a regular negative error code (eg -EINVAL), and using -1 for Opt_err makes no sense. There are similar problems in ima_policy.c and key encryption, but they don't have the immediate bug wrt bitmap handing, and ima_policy.c in particular needs a different patch to make the enum values match the token array index. Mimi is sending that separately. Reported-by: syzbot+a22e0dc07567662c50bc@syzkaller.appspotmail.com Reported-by: Eric Biggers Fixes: 5208cc83423d ("keys, trusted: fix: *do not* allow duplicate key options") Fixes: 00d60fd3b932 ("KEYS: Provide keyctls to drive the new key type ops for asymmetric keys [ver #2]") Cc: James Morris James Morris Cc: Mimi Zohar Cc: Jarkko Sakkinen Cc: Peter Huewe Signed-off-by: Linus Torvalds commit 255fe81a6ad420258b6dac8c509c99cd1c233390 Author: Vivien Didelot Date: Mon Dec 17 16:29:01 2018 -0500 MAINTAINERS: change my email address Make my Gmail address the primary one from now on. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller commit bcb671c2fa0e238eea087fdcb7eba72376ba3697 Author: Masahiro Yamada Date: Mon Dec 17 00:04:40 2018 +0900 bpf: promote bpf_perf_event.h to mandatory UAPI header Since commit c895f6f703ad ("bpf: correct broken uapi for BPF_PROG_TYPE_PERF_EVENT program type"), all architectures (except um) are required to have bpf_perf_event.h in uapi/asm. Add it to mandatory-y so "make headers_install" can check it. Signed-off-by: Masahiro Yamada Signed-off-by: Daniel Borkmann commit 721066dfd4d5c0fee5772c777d6930d0f423b4eb Author: Peter Zijlstra Date: Mon Dec 3 18:03:44 2018 +0100 x86/mm/cpa: Fix cpa_flush_array() TLB invalidation In commit: a7295fd53c39 ("x86/mm/cpa: Use flush_tlb_kernel_range()") I misread the CAP array code and incorrectly used tlb_flush_kernel_range(), resulting in missing TLB flushes and consequent failures. Instead do a full invalidate in this case -- for now. Reported-by: StDenis, Tom 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: dave.hansen@intel.com Fixes: a7295fd53c39 ("x86/mm/cpa: Use flush_tlb_kernel_range()") Link: http://lkml.kernel.org/r/20181203171043.089868285@infradead.org Signed-off-by: Ingo Molnar commit c92a54cfa0257e8ffd66b2a17d49e9c0bd4b769f Author: Lendacky, Thomas Date: Mon Dec 17 14:39:16 2018 +0000 dma-direct: do not include SME mask in the DMA supported check The dma_direct_supported() function intends to check the DMA mask against specific values. However, the phys_to_dma() function includes the SME encryption mask, which defeats the intended purpose of the check. This results in drivers that support less than 48-bit DMA (SME encryption mask is bit 47) from being able to set the DMA mask successfully when SME is active, which results in the driver failing to initialize. Change the function used to check the mask from phys_to_dma() to __phys_to_dma() so that the SME encryption mask is not part of the check. Fixes: c1d0af1a1d5d ("kernel/dma/direct: take DMA offset into account in dma_direct_supported") Signed-off-by: Tom Lendacky Signed-off-by: Christoph Hellwig commit 0e334db6bb4b1fd1e2d72c1f3d8f004313cd9f94 Author: Thomas Gleixner Date: Mon Dec 17 13:31:05 2018 +0100 posix-timers: Fix division by zero bug The signal delivery path of posix-timers can try to rearm the timer even if the interval is zero. That's handled for the common case (hrtimer) but not for alarm timers. In that case the forwarding function raises a division by zero exception. The handling for hrtimer based posix timers is wrong because it marks the timer as active despite the fact that it is stopped. Move the check from common_hrtimer_rearm() to posixtimer_rearm() to cure both issues. Reported-by: syzbot+9d38bedac9cc77b8ad5e@syzkaller.appspotmail.com Signed-off-by: Thomas Gleixner Cc: John Stultz Cc: Linus Torvalds Cc: Peter Zijlstra Cc: sboyd@kernel.org Cc: stable@vger.kernel.org Cc: syzkaller-bugs@googlegroups.com Link: http://lkml.kernel.org/r/alpine.DEB.2.21.1812171328050.1880@nanos.tec.linutronix.de Signed-off-by: Ingo Molnar commit 3c9dc275dba1124c1e16e7037226038451286813 Author: Paul Burton Date: Sun Dec 16 20:10:01 2018 +0000 Revert "serial: 8250: Fix clearing FIFOs in RS485 mode again" Commit f6aa5beb45be ("serial: 8250: Fix clearing FIFOs in RS485 mode again") makes a change to FIFO clearing code which its commit message suggests was intended to be specific to use with RS485 mode, however: 1) The change made does not just affect __do_stop_tx_rs485(), it also affects other uses of serial8250_clear_fifos() including paths for starting up, shutting down or auto-configuring a port regardless of whether it's an RS485 port or not. 2) It makes the assumption that resetting the FIFOs is a no-op when FIFOs are disabled, and as such it checks for this case & explicitly avoids setting the FIFO reset bits when the FIFO enable bit is clear. A reading of the PC16550D manual would suggest that this is OK since the FIFO should automatically be reset if it is later enabled, but we support many 16550-compatible devices and have never required this auto-reset behaviour for at least the whole git era. Starting to rely on it now seems risky, offers no benefit, and indeed breaks at least the Ingenic JZ4780's UARTs which reads garbage when the RX FIFO is enabled if we don't explicitly reset it. 3) By only resetting the FIFOs if they're enabled, the behaviour of serial8250_do_startup() during boot now depends on what the value of FCR is before the 8250 driver is probed. This in itself seems questionable and leaves us with FCR=0 & no FIFO reset if the UART was used by 8250_early, otherwise it depends upon what the bootloader left behind. 4) Although the naming of serial8250_clear_fifos() may be unclear, it is clear that callers of it expect that it will disable FIFOs. Both serial8250_do_startup() & serial8250_do_shutdown() contain comments to that effect, and other callers explicitly re-enable the FIFOs after calling serial8250_clear_fifos(). The premise of that patch that disabling the FIFOs is incorrect therefore seems wrong. For these reasons, this reverts commit f6aa5beb45be ("serial: 8250: Fix clearing FIFOs in RS485 mode again"). Signed-off-by: Paul Burton Fixes: f6aa5beb45be ("serial: 8250: Fix clearing FIFOs in RS485 mode again"). Cc: Greg Kroah-Hartman Cc: Daniel Jedrychowski Cc: Marek Vasut Cc: linux-mips@vger.kernel.org Cc: linux-serial@vger.kernel.org Cc: stable # 4.10+ Signed-off-by: Greg Kroah-Hartman commit 2419f30a4a4fcaa5f35111563b4c61f1b2b26841 Author: Nicolas Saenz Julienne Date: Mon Dec 17 14:37:40 2018 +0100 USB: xhci: fix 'broken_suspend' placement in struct xchi_hcd As commented in the struct's definition there shouldn't be anything underneath its 'priv[0]' member as it would break some macros. The patch converts the broken_suspend into a bit-field and relocates it next to to the rest of bit-fields. Fixes: a7d57abcc8a5 ("xhci: workaround CSS timeout on AMD SNPS 3.0 xHC") Reported-by: Oliver Neukum Signed-off-by: Nicolas Saenz Julienne Acked-by: Mathias Nyman Cc: stable Signed-off-by: Greg Kroah-Hartman commit eca1e56ceedd9cc185eb18baf307d3ff2e4af376 Author: Emmanuel Grumbach Date: Fri Dec 14 18:30:22 2018 +0200 iwlwifi: mvm: don't send GEO_TX_POWER_LIMIT to old firmwares Old firmware versions don't support this command. Sending it to any firmware before -41.ucode will crash the firmware. This fixes https://bugzilla.kernel.org/show_bug.cgi?id=201975 Fixes: 66e839030fd6 ("iwlwifi: fix wrong WGDS_WIFI_DATA_SIZE") CC: #4.19+ Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo commit e3ae3401aa19432ee4943eb0bbc2ec704d07d793 Author: Ulf Hansson Date: Mon Dec 10 17:52:38 2018 +0100 mmc: core: Use a minimum 1600ms timeout when enabling CACHE ctrl Some eMMCs from Micron have been reported to need ~800 ms timeout, while enabling the CACHE ctrl after running sudden power failure tests. The needed timeout is greater than what the card specifies as its generic CMD6 timeout, through the EXT_CSD register, hence the problem. Normally we would introduce a card quirk to extend the timeout for these specific Micron cards. However, due to the rather complicated debug process needed to find out the error, let's simply use a minimum timeout of 1600ms, the double of what has been reported, for all cards when enabling CACHE ctrl. Reported-by: Sjoerd Simons Reported-by: Andreas Dannenberg Reported-by: Faiz Abbas Cc: Signed-off-by: Ulf Hansson commit ba9f39a785a9977e72233000711ef1eb48203551 Author: Ulf Hansson Date: Mon Dec 10 17:52:37 2018 +0100 mmc: core: Allow BKOPS and CACHE ctrl even if no HPI support In commit 5320226a0512 ("mmc: core: Disable HPI for certain Hynix eMMC cards"), then intent was to prevent HPI from being used for some eMMC cards, which didn't properly support it. However, that went too far, as even BKOPS and CACHE ctrl became prevented. Let's restore those parts and allow BKOPS and CACHE ctrl even if HPI isn't supported. Fixes: 5320226a0512 ("mmc: core: Disable HPI for certain Hynix eMMC cards") Cc: Pratibhasagar V Cc: Signed-off-by: Ulf Hansson commit a0741ba40a009f97c019ae7541dc61c1fdf41efb Author: Ulf Hansson Date: Mon Dec 10 17:52:36 2018 +0100 mmc: core: Reset HPI enabled state during re-init and in case of errors During a re-initialization of the eMMC card, we may fail to re-enable HPI. In these cases, that isn't properly reflected in the card->ext_csd.hpi_en bit, as it keeps being set. This may cause following attempts to use HPI, even if's not enabled. Let's fix this! Fixes: eb0d8f135b67 ("mmc: core: support HPI send command") Cc: Signed-off-by: Ulf Hansson commit 0b479790684192ab7024ce6a621f93f6d0a64d92 Author: Russell King Date: Tue Dec 11 14:41:31 2018 +0000 mmc: omap_hsmmc: fix DMA API warning While booting with rootfs on MMC, the following warning is encountered on OMAP4430: omap-dma-engine 4a056000.dma-controller: DMA-API: mapping sg segment longer than device claims to support [len=69632] [max=65536] This is because the DMA engine has a default maximum segment size of 64K but HSMMC sets: mmc->max_blk_size = 512; /* Block Length at max can be 1024 */ mmc->max_blk_count = 0xFFFF; /* No. of Blocks is 16 bits */ mmc->max_req_size = mmc->max_blk_size * mmc->max_blk_count; mmc->max_seg_size = mmc->max_req_size; which ends up telling the block layer that we support a maximum segment size of 65535*512, which exceeds the advertised DMA engine capabilities. Fix this by clamping the maximum segment size to the lower of the maximum request size and of the DMA engine device used for either DMA channel. Signed-off-by: Russell King Cc: Signed-off-by: Ulf Hansson commit 5ccf7f5505f4c250b97d8d7ecee7397a94b637fa Author: Sowjanya Komatineni Date: Thu Dec 13 12:25:43 2018 -0800 mmc: tegra: Fix for SDMMC pads autocal parsing from dt Some of the SDMMC pads auto calibration values parsed from devicetree are assigned incorrectly. This patch fixes it. Signed-off-by: Sowjanya Komatineni Acked-by: Adrian Hunter Acked-by: Thierry Reding Fixes: 51b77c8ea784 ("mmc: tegra: Program pad autocal offsets from dt") Signed-off-by: Ulf Hansson commit 97207c12780d749770825f62c292c3140e57d79c Author: Sowjanya Komatineni Date: Thu Dec 13 12:34:06 2018 -0800 mmc: sdhci: Fix sdhci_do_enable_v4_mode V4_MODE is Bit-15 of SDHCI_HOST_CONTROL2 register. Need to perform word access to this register. Signed-off-by: Sowjanya Komatineni Fixes: b3f80b434f72 ("mmc: sdhci: Add sd host v4 mode") Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson commit 98256376f81ab7afd8dd233b99c78356159c21d5 Author: Dmitry V. Levin Date: Sun Dec 16 04:49:52 2018 +0300 uapi: linux/blkzoned.h: fix BLKGETZONESZ and BLKGETNRZONES definitions According to the documentation in include/uapi/asm-generic/ioctl.h, _IOW means userspace is writing and kernel is reading, and _IOR means userspace is reading and kernel is writing. In case of these two ioctls, kernel is writing and userspace is reading, so they have to be _IOR instead of _IOW. Fixes: 72cd87576d1d8 ("block: Introduce BLKGETZONESZ ioctl") Fixes: 65e4e3eee83d7 ("block: Introduce BLKGETNRZONES ioctl") Reviewed-by: Damien Le Moal Signed-off-by: Dmitry V. Levin Signed-off-by: Jens Axboe commit 7566ec393f4161572ba6f11ad5171fd5d59b0fbd Author: Linus Torvalds Date: Sun Dec 16 15:46:55 2018 -0800 Linux 4.20-rc7 commit e735fd55b94bb48363737db3b1d57627c1a16b47 Author: Marcin Wojtas Date: Tue Dec 11 13:56:49 2018 +0100 net: mvneta: fix operation for 64K PAGE_SIZE Recent changes in the mvneta driver reworked allocation and handling of the ingress buffers to use entire pages. Apart from that in SW BM scenario the HW must be informed via PRXDQS about the biggest possible incoming buffer that can be propagated by RX descriptors. The BufferSize field was filled according to the MTU-dependent pkt_size value. Later change to PAGE_SIZE broke RX operation when usin 64K pages, as the field is simply too small. This patch conditionally limits the value passed to the BufferSize of the PRXDQS register, depending on the PAGE_SIZE used. On the occasion remove now unused frag_size field of the mvneta_port structure. Fixes: 562e2f467e71 ("net: mvneta: Improve the buffer allocation method for SWBM") Signed-off-by: Marcin Wojtas Signed-off-by: David S. Miller commit 369a094d500fb4962071f2a91793f66cdfef00aa Merge: 8203e2d844d3 6adafc356e20 Author: David S. Miller Date: Sun Dec 16 12:07:32 2018 -0800 Merge branch 'hns-fixes' Peng Li says: ==================== net: hns: Code improvements & fixes for HNS driver This patchset introduces some code improvements and fixes for the identified problems in the HNS driver. Every patch is independent. ==================== Signed-off-by: David S. Miller commit 6adafc356e20189193b38ee6b9af7743078bf6b4 Author: Yonglong Liu Date: Sat Dec 15 11:53:29 2018 +0800 net: hns: Fix ping failed when use net bridge and send multicast Create a net bridge, add eth and vnet to the bridge. The vnet is used by a virtual machine. When ping the virtual machine from the outside host and the virtual machine send multicast at the same time, the ping package will lost. The multicast package send to the eth, eth will send it to the bridge too, and the bridge learn the mac of eth. When outside host ping the virtual mechine, it will match the promisc entry of the eth which is not expected, and the bridge send it to eth not to vnet, cause ping lost. So this patch change promisc tcam entry position to the END of 512 tcam entries, which indicate lower priority. And separate one promisc entry to two: mc & uc, to avoid package match the wrong tcam entry. Signed-off-by: Yonglong Liu Signed-off-by: Peng Li Signed-off-by: David S. Miller commit 726ae5c9e5f0c18eca8ea5296b526242c3e89822 Author: Yonglong Liu Date: Sat Dec 15 11:53:28 2018 +0800 net: hns: Add mac pcs config when enable|disable mac In some case, when mac enable|disable and adjust link, may cause hard to link(or abnormal) between mac and phy. This patch adds the code for rx PCS to avoid this bug. Disable the rx PCS when driver disable the gmac, and enable the rx PCS when driver enable the mac. Signed-off-by: Yonglong Liu Signed-off-by: Peng Li Signed-off-by: David S. Miller commit 7e74a19ca522aec7c2be201a7ae1d1d57ded409b Author: Yonglong Liu Date: Sat Dec 15 11:53:27 2018 +0800 net: hns: Fix ntuple-filters status error. The ntuple-filters features is forced on by chip. But it shows "ntuple-filters: off [fixed]" when use ethtool. This patch make it correct with "ntuple-filters: on [fixed]". Signed-off-by: Yonglong Liu Signed-off-by: Peng Li Signed-off-by: David S. Miller commit a57275d35576fdd89d8c771eedf1e7cf97e0dfa6 Author: Yonglong Liu Date: Sat Dec 15 11:53:26 2018 +0800 net: hns: Avoid net reset caused by pause frames storm There will be a large number of MAC pause frames on the net, which caused tx timeout of net device. And then the net device was reset to try to recover it. So that is not useful, and will cause some other problems. So need doubled ndev->watchdog_timeo if device watchdog occurred until watchdog_timeo up to 40s and then try resetting to recover it. When collecting dfx information such as hardware registers when tx timeout. Some registers for count were cleared when read. So need move this task before update net state which also read the count registers. Signed-off-by: Yonglong Liu Signed-off-by: Peng Li Signed-off-by: David S. Miller commit c82bd077e1ba3dd586569c733dc6d3dd4b0e43cd Author: Yonglong Liu Date: Sat Dec 15 11:53:25 2018 +0800 net: hns: Free irq when exit from abnormal branch 1.In "hns_nic_init_irq", if request irq fail at index i, the function return directly without releasing irq resources that already requested. 2.In "hns_nic_net_up" after "hns_nic_init_irq", if exceptional branch occurs, irqs that already requested are not release. Signed-off-by: Yonglong Liu Signed-off-by: Peng Li Signed-off-by: David S. Miller commit 31f6b61d810654fb3ef43f4d8afda0f44b142fad Author: Yonglong Liu Date: Sat Dec 15 11:53:24 2018 +0800 net: hns: Clean rx fbd when ae stopped. If there are packets in hardware when changing the speed or duplex, it may cause hardware hang up. This patch adds the code to wait rx fbd clean up when ae stopped. Signed-off-by: Yonglong Liu Signed-off-by: Peng Li Signed-off-by: David S. Miller commit 5778b13b64eca5549d242686f2f91a2c80c8fa40 Author: Yonglong Liu Date: Sat Dec 15 11:53:23 2018 +0800 net: hns: Fixed bug that netdev was opened twice After resetting dsaf to try to repair chip error such as ecc error, the net device will be open if net interface is up. But at this time if there is the users set the net device up with the command ifconfig, the net device will be opened twice consecutively. Function napi_enable was called when open device. And Kernel panic will be occurred if it was called twice consecutively. Such as follow: static inline void napi_enable(struct napi_struct *n) { BUG_ON(!test_bit(NAPI_STATE_SCHED, &n->state)); smp_mb__before_clear_bit(); clear_bit(NAPI_STATE_SCHED, &n->state); } [37255.571996] Kernel panic - not syncing: BUG! [37255.595234] Call trace: [37255.597694] [] dump_backtrace+0x0/0x1a0 [37255.603114] [] show_stack+0x20/0x28 [37255.608187] [] dump_stack+0x98/0xb8 [37255.613258] [] panic+0x10c/0x26c [37255.618070] [] hns_nic_net_up+0x30c/0x4e0 [37255.623664] [] hns_nic_net_open+0x94/0x12c [37255.629346] [] __dev_open+0xf4/0x168 [37255.634504] [] __dev_change_flags+0x98/0x15c [37255.640359] [] dev_change_flags+0x2c/0x68 [37255.769580] [] devinet_ioctl+0x650/0x704 [37255.775086] [] inet_ioctl+0x98/0xb4 [37255.780159] [] sock_do_ioctl+0x44/0x84 [37255.785490] [] sock_ioctl+0x248/0x30c [37255.790737] [] do_vfs_ioctl+0x480/0x618 [37255.796156] [] SyS_ioctl+0x90/0xa4 [37255.801139] SMP: stopping secondary CPUs [37255.805079] kbox: catch panic event. [37255.809586] collected_len = 128928, LOG_BUF_LEN_LOCAL = 131072 [37255.816103] flush cache 0xffff80003f000000 size 0x800000 [37255.822192] flush cache 0xffff80003f000000 size 0x800000 [37255.828289] flush cache 0xffff80003f000000 size 0x800000 [37255.834378] kbox: no notify die func register. no need to notify [37255.840413] ---[ end Kernel panic - not syncing: BUG! This patchset fix this bug according to the flag NIC_STATE_DOWN. Signed-off-by: Yonglong Liu Signed-off-by: Peng Li Signed-off-by: David S. Miller commit 4ad26f117b6ea0f5d5f1592127bafb5ec65904d3 Author: Yonglong Liu Date: Sat Dec 15 11:53:22 2018 +0800 net: hns: Some registers use wrong address according to the datasheet. According to the hip06 datasheet: 1.Six registers use wrong address: RCB_COM_SF_CFG_INTMASK_RING RCB_COM_SF_CFG_RING_STS RCB_COM_SF_CFG_RING RCB_COM_SF_CFG_INTMASK_BD RCB_COM_SF_CFG_BD_RINT_STS DSAF_INODE_VC1_IN_PKT_NUM_0_REG 2.The offset of DSAF_INODE_VC1_IN_PKT_NUM_0_REG should be 0x103C + 0x80 * all_chn_num 3.The offset to show the value of DSAF_INODE_IN_DATA_STP_DISC_0_REG is wrong, so the value of DSAF_INODE_SW_VLAN_TAG_DISC_0_REG will be overwrite These registers are only used in "ethtool -d", so that did not cause ndev to misfunction. Signed-off-by: Yonglong Liu Signed-off-by: Peng Li Signed-off-by: David S. Miller commit 308c6cafde0147616da45e3a928adae55c428deb Author: Yonglong Liu Date: Sat Dec 15 11:53:21 2018 +0800 net: hns: All ports can not work when insmod hns ko after rmmod. There are two test cases: 1. Remove the 4 modules:hns_enet_drv/hns_dsaf/hnae/hns_mdio, and install them again, must use "ifconfig down/ifconfig up" command pair to bring port to work. This patch calls phy_stop function when init phy to fix this bug. 2. Remove the 2 modules:hns_enet_drv/hns_dsaf, and install them again, all ports can not use anymore, because of the phy devices register failed(phy devices already exists). Phy devices are registered when hns_dsaf installed, this patch removes them when hns_dsaf removed. The two cases are sometimes related, fixing the second case also requires fixing the first case, so fix them together. Signed-off-by: Yonglong Liu Signed-off-by: Peng Li Signed-off-by: David S. Miller commit 4e1d4be681b2c26fd874adbf584bf034573ac45d Author: Yonglong Liu Date: Sat Dec 15 11:53:20 2018 +0800 net: hns: Incorrect offset address used for some registers. According to the hip06 Datasheet: 1. The offset of INGRESS_SW_VLAN_TAG_DISC should be 0x1A00+4*all_chn_num 2. The offset of INGRESS_IN_DATA_STP_DISC should be 0x1A50+4*all_chn_num Signed-off-by: Yonglong Liu Signed-off-by: Peng Li Signed-off-by: David S. Miller commit 8203e2d844d34af247a151d8ebd68553a6e91785 Author: Eric Dumazet Date: Fri Dec 14 06:46:49 2018 -0800 net: clear skb->tstamp in forwarding paths Sergey reported that forwarding was no longer working if fq packet scheduler was used. This is caused by the recent switch to EDT model, since incoming packets might have been timestamped by __net_timestamp() __net_timestamp() uses ktime_get_real(), while fq expects packets using CLOCK_MONOTONIC base. The fix is to clear skb->tstamp in forwarding paths. Fixes: 80b14dee2bea ("net: Add a new socket option for a future transmit time.") Fixes: fb420d5d91c1 ("tcp/fq: move back to CLOCK_MONOTONIC") Signed-off-by: Eric Dumazet Reported-by: Sergey Matyukevich Tested-by: Sergey Matyukevich Signed-off-by: David S. Miller commit 15c6d8e565943a904172de69cc13c53f724fa16c Author: Robert P. J. Day Date: Thu Dec 13 15:00:11 2018 -0500 mod_devicetable.h: correct kerneldoc typo, "PHYSID2" -> "MII_PHYSID2" Signed-off-by: Robert P. J. Day Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit ade446403bfb79d3528d56071a84b15351a139ad Author: Michal Kubecek Date: Thu Dec 13 17:23:32 2018 +0100 net: ipv4: do not handle duplicate fragments as overlapping Since commit 7969e5c40dfd ("ip: discard IPv4 datagrams with overlapping segments.") IPv4 reassembly code drops the whole queue whenever an overlapping fragment is received. However, the test is written in a way which detects duplicate fragments as overlapping so that in environments with many duplicate packets, fragmented packets may be undeliverable. Add an extra test and for (potentially) duplicate fragment, only drop the new fragment rather than the whole queue. Only starting offset and length are checked, not the contents of the fragments as that would be too expensive. For similar reason, linear list ("run") of a rbtree node is not iterated, we only check if the new fragment is a subset of the interval covered by existing consecutive fragments. v2: instead of an exact check iterating through linear list of an rbtree node, only check if the new fragment is subset of the "run" (suggested by Eric Dumazet) Fixes: 7969e5c40dfd ("ip: discard IPv4 datagrams with overlapping segments.") Signed-off-by: Michal Kubecek Signed-off-by: David S. Miller commit 1986af16e8ed355822600c24b3d2f0be46b573df Author: Jörgen Storvist Date: Thu Dec 13 17:00:35 2018 +0100 qmi_wwan: Added support for Telit LN940 series Added support for the Telit LN940 series cellular modules QMI interface. QMI_QUIRK_SET_DTR quirk requied for Qualcomm MDM9x40 chipset. Signed-off-by: Jörgen Storvist Acked-by: Bjørn Mork Signed-off-by: David S. Miller commit 110a1cc28bc383adb4885eff27e18c61ddebffb4 Author: Jörgen Storvist Date: Wed Dec 12 22:45:34 2018 +0100 qmi_wwan: Added support for Fibocom NL668 series Added support for Fibocom NL668 series QMI interface. Using QMI_QUIRK_SET_DTR required for Qualcomm MDM9x07 chipsets. Signed-off-by: Jörgen Storvist Signed-off-by: David S. Miller commit 10589a568f2ec531975504c98c1bed88c233a63d Merge: 143ece654f9f 7640ead93924 Author: David S. Miller Date: Sat Dec 15 10:58:32 2018 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Alexei Starovoitov says: ==================== pull-request: bpf 2018-12-15 The following pull-request contains BPF updates for your *net* tree. The main changes are: 1) fix liveness propagation of callee saved registers, from Jakub. 2) fix overflow in bpf_jit_limit knob, from Daniel. 3) bpf_flow_dissector api fix, from Stanislav. 4) bpf_perf_event api fix on powerpc, from Sandipan. ==================== Signed-off-by: David S. Miller commit cd01544a268ad8ee5b1dfe42c4393f1095f86879 Author: Alistair Strachan Date: Fri Dec 14 14:36:37 2018 -0800 x86/vdso: Pass --eh-frame-hdr to the linker Commit 379d98ddf413 ("x86: vdso: Use $LD instead of $CC to link") accidentally broke unwinding from userspace, because ld would strip the .eh_frame sections when linking. Originally, the compiler would implicitly add --eh-frame-hdr when invoking the linker, but when this Makefile was converted from invoking ld via the compiler, to invoking it directly (like vmlinux does), the flag was missed. (The EH_FRAME section is important for the VDSO shared libraries, but not for vmlinux.) Fix the problem by explicitly specifying --eh-frame-hdr, which restores parity with the old method. See relevant bug reports for additional info: https://bugzilla.kernel.org/show_bug.cgi?id=201741 https://bugzilla.redhat.com/show_bug.cgi?id=1659295 Fixes: 379d98ddf413 ("x86: vdso: Use $LD instead of $CC to link") Reported-by: Florian Weimer Reported-by: Carlos O'Donell Reported-by: "H. J. Lu" Signed-off-by: Alistair Strachan Signed-off-by: Borislav Petkov Tested-by: Laura Abbott Cc: Andy Lutomirski Cc: Carlos O'Donell Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Joel Fernandes Cc: kernel-team@android.com Cc: Laura Abbott Cc: stable Cc: Thomas Gleixner Cc: X86 ML Link: https://lkml.kernel.org/r/20181214223637.35954-1-astrachan@google.com commit 143ece654f9f5b37bedea252a990be37e48ae3a5 Author: Cong Wang Date: Tue Dec 11 21:43:51 2018 -0800 tipc: check tsk->group in tipc_wait_for_cond() tipc_wait_for_cond() drops socket lock before going to sleep, but tsk->group could be freed right after that release_sock(). So we have to re-check and reload tsk->group after it wakes up. After this patch, tipc_wait_for_cond() returns -ERESTARTSYS when tsk->group is NULL, instead of continuing with the assumption of a non-NULL tsk->group. (It looks like 'dsts' should be re-checked and reloaded too, but it is a different bug.) Similar for tipc_send_group_unicast() and tipc_send_group_anycast(). Reported-by: syzbot+10a9db47c3a0e13eb31c@syzkaller.appspotmail.com Fixes: b7d42635517f ("tipc: introduce flow control for group broadcast messages") Fixes: ee106d7f942d ("tipc: introduce group anycast messaging") Fixes: 27bd9ec027f3 ("tipc: introduce group unicast messaging") Cc: Ying Xue Cc: Jon Maloy Signed-off-by: Cong Wang Acked-by: Ying Xue Signed-off-by: David S. Miller commit 65cab850f0eeaa9180bd2e10a231964f33743edf Author: Dave Taht Date: Tue Dec 11 15:30:34 2018 -0800 net: Allow class-e address assignment via ifconfig ioctl While most distributions long ago switched to the iproute2 suite of utilities, which allow class-e (240.0.0.0/4) address assignment, distributions relying on busybox, toybox and other forms of ifconfig cannot assign class-e addresses without this kernel patch. While CIDR has been obsolete for 2 decades, and a survey of all the open source code in the world shows the IN_whatever macros are also obsolete... rather than obsolete CIDR from this ioctl entirely, this patch merely enables class-e assignment, sanely. Signed-off-by: Dave Taht Signed-off-by: David S. Miller commit 6531e115b7ab84f563fcd7f0d2d05ccf971aaaf9 Merge: 380ef2c9ad4f 3a6ab5c7dc11 Author: Linus Torvalds Date: Fri Dec 14 15:35:30 2018 -0800 Merge branch 'akpm' (patches from Andrew) Merge misc fixes from Andrew Morton: "11 fixes" * emailed patches from Andrew Morton : 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 commit 69d2c86766da2ded2b70281f1bf242cb0d58a778 Author: Gustavo A. R. Silva Date: Tue Dec 11 14:10:08 2018 -0600 ip6mr: Fix potential Spectre v1 vulnerability vr.mifi 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/ipv6/ip6mr.c:1845 ip6mr_ioctl() warn: potential spectre issue 'mrt->vif_table' [r] (local cap) net/ipv6/ip6mr.c:1919 ip6mr_compat_ioctl() warn: potential spectre issue 'mrt->vif_table' [r] (local cap) Fix this by sanitizing vr.mifi before using it to index mrt->vif_table' 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 3a6ab5c7dc114057fd67750e308e1745dafc0e6a Author: Thierry Reding Date: Fri Dec 14 14:17:24 2018 -0800 scripts/spdxcheck.py: always open files in binary mode The spdxcheck script currently falls over when confronted with a binary file (such as Documentation/logo.gif). To avoid that, always open files in binary mode and decode line-by-line, ignoring encoding errors. One tricky case is when piping data into the script and reading it from standard input. By default, standard input will be opened in text mode, so we need to reopen it in binary mode. The breakage only happens with python3 and results in a UnicodeDecodeError (according to Uwe). Link: http://lkml.kernel.org/r/20181212131210.28024-1-thierry.reding@gmail.com Fixes: 6f4d29df66ac ("scripts/spdxcheck.py: make python3 compliant") Signed-off-by: Thierry Reding Reviewed-by: Jeremy Cline Cc: Thomas Gleixner Cc: Jonathan Corbet Cc: Joe Perches Cc: Uwe Kleine-König Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f1733a1d3cd32a9492f4cf866be37bb46e10163d Author: Qian Cai Date: Fri Dec 14 14:17:20 2018 -0800 checkstack.pl: fix for aarch64 There is actually a space after "sp," like this, ffff2000080813c8: a9bb7bfd stp x29, x30, [sp, #-80]! Right now, checkstack.pl isn't able to print anything on aarch64, because it won't be able to match the stating objdump line of a function due to this missing space. Hence, it displays every stack as zero-size. After this patch, checkpatch.pl is able to match the start of a function's objdump, and is then able to calculate each function's stack correctly. Link: http://lkml.kernel.org/r/20181207195843.38528-1-cai@lca.pw Signed-off-by: Qian Cai Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 01e881f5a1fca4677e82733061868c6d6ea05ca7 Author: Andrea Arcangeli Date: Fri Dec 14 14:17:17 2018 -0800 userfaultfd: check VM_MAYWRITE was set after verifying the uffd is registered Calling UFFDIO_UNREGISTER on virtual ranges not yet registered in uffd could trigger an harmless false positive WARN_ON. Check the vma is already registered before checking VM_MAYWRITE to shut off the false positive warning. Link: http://lkml.kernel.org/r/20181206212028.18726-2-aarcange@redhat.com Cc: Fixes: 29ec90660d68 ("userfaultfd: shmem/hugetlbfs: only allow to register VM_MAYWRITE vmas") Signed-off-by: Andrea Arcangeli Reported-by: syzbot+06c7092e7d71218a2c16@syzkaller.appspotmail.com Acked-by: Mike Rapoport Acked-by: Hugh Dickins Acked-by: Peter Xu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 61c6de667263184125d5ca75e894fcad632b0dd3 Author: Piotr Jaroszynski Date: Fri Dec 14 14:17:14 2018 -0800 fs/iomap.c: get/put the page in iomap_page_create/release() migrate_page_move_mapping() expects pages with private data set to have a page_count elevated by 1. This is what used to happen for xfs through the buffer_heads code before the switch to iomap in commit 82cb14175e7d ("xfs: add support for sub-pagesize writeback without buffer_heads"). Not having the count elevated causes move_pages() to fail on memory mapped files coming from xfs. Make iomap compatible with the migrate_page_move_mapping() assumption by elevating the page count as part of iomap_page_create() and lowering it in iomap_page_release(). It causes the move_pages() syscall to misbehave on memory mapped files from xfs. It does not not move any pages, which I suppose is "just" a perf issue, but it also ends up returning a positive number which is out of spec for the syscall. Talking to Michal Hocko, it sounds like returning positive numbers might be a necessary update to move_pages() anyway though (https://lkml.kernel.org/r/20181116114955.GJ14706@dhcp22.suse.cz). I only hit this in tests that verify that move_pages() actually moved the pages. The test also got confused by the positive return from move_pages() (it got treated as a success as positive numbers were not expected and not handled) making it a bit harder to track down what's going on. Link: http://lkml.kernel.org/r/20181115184140.1388751-1-pjaroszynski@nvidia.com Fixes: 82cb14175e7d ("xfs: add support for sub-pagesize writeback without buffer_heads") Signed-off-by: Piotr Jaroszynski Reviewed-by: Christoph Hellwig Cc: William Kucharski Cc: Darrick J. Wong Cc: Brian Foster Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8ace22bce84014957da37e6b8baa49ee81c03366 Author: Yongkai Wu Date: Fri Dec 14 14:17:10 2018 -0800 hugetlbfs: call VM_BUG_ON_PAGE earlier in free_huge_page() A stack trace was triggered by VM_BUG_ON_PAGE(page_mapcount(page), page) in free_huge_page(). Unfortunately, the page->mapping field was set to NULL before this test. This made it more difficult to determine the root cause of the problem. Move the VM_BUG_ON_PAGE tests earlier in the function so that if they do trigger more information is present in the page struct. Link: http://lkml.kernel.org/r/1543491843-23438-1-git-send-email-nic_w@163.com Signed-off-by: Yongkai Wu Acked-by: Michal Hocko Acked-by: Mike Kravetz Reviewed-by: William Kucharski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f5a222dc2f0e893cc6b0fa34d421a41ca7dfb72e Author: Yueyi Li Date: Fri Dec 14 14:17:06 2018 -0800 memblock: annotate memblock_is_reserved() with __init_memblock Found warning: WARNING: EXPORT symbol "gsi_write_channel_scratch" [vmlinux] version generation failed, symbol will not be versioned. WARNING: vmlinux.o(.text+0x1e0a0): Section mismatch in reference from the function valid_phys_addr_range() to the function .init.text:memblock_is_reserved() The function valid_phys_addr_range() references the function __init memblock_is_reserved(). This is often because valid_phys_addr_range lacks a __init annotation or the annotation of memblock_is_reserved is wrong. Use __init_memblock instead of __init. Link: http://lkml.kernel.org/r/BLUPR13MB02893411BF12EACB61888E80DFAE0@BLUPR13MB0289.namprd13.prod.outlook.com Signed-off-by: Yueyi Li Acked-by: Michal Hocko Reviewed-by: David Hildenbrand Acked-by: Mike Rapoport Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 428a1cb4baeb9e5c7feda93af7372ba6d2491558 Author: Baruch Siach Date: Fri Dec 14 14:17:03 2018 -0800 psi: fix reference to kernel commandline enable The kernel commandline parameter named in CONFIG_PSI_DEFAULT_DISABLED help text contradicts the documentation in kernel-parameters.txt, and the code. Fix that. Link: http://lkml.kernel.org/r/20181203213416.GA12627@cmpxchg.org Fixes: e0c274472d ("psi: make disabling/enabling easier for vendor kernels") Signed-off-by: Baruch Siach Acked-by: Johannes Weiner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 915c9e1b6d008fdaebca91b83fa0d2596121d588 Author: Mark Brown Date: Fri Dec 14 14:17:00 2018 -0800 arch/sh/include/asm/io.h: provide prototypes for PCI I/O mapping in asm/io.h Most architectures provide prototypes for the PCI I/O mapping operations when asm/io.h is included but SH doesn't currently do that, leading to for example warnings in sound/pci/hda/patch_ca0132.c when pci_iomap() is used on current -next. Make SH more consistent with other architectures by including asm-generic/pci_iomap.h in asm/io.h. Link: http://lkml.kernel.org/r/20181106175142.27988-1-broonie@kernel.org Signed-off-by: Mark Brown Reported-by: kbuild test robot Cc: Geert Uytterhoeven Cc: Yoshinori Sato Cc: Rich Felker Cc: Arnd Bergmann Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9def36e0fa9a0d9c5393c039db59f1f2d3a388b3 Author: Logan Gunthorpe Date: Fri Dec 14 14:16:57 2018 -0800 mm/sparse: add common helper to mark all memblocks present Presently the arches arm64, arm and sh have a function which loops through each memblock and calls memory present. riscv will require a similar function. Introduce a common memblocks_present() function that can be used by all the arches. Subsequent patches will cleanup the arches that make use of this. Link: http://lkml.kernel.org/r/20181107205433.3875-3-logang@deltatee.com Signed-off-by: Logan Gunthorpe Acked-by: Andrew Morton Cc: Michal Hocko Cc: Vlastimil Babka Cc: Oscar Salvador Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d1402fc708e4c355813e49df6d15bc3466ba5114 Author: Logan Gunthorpe Date: Fri Dec 14 14:16:53 2018 -0800 mm: introduce common STRUCT_PAGE_MAX_SHIFT define This define is used by arm64 to calculate the size of the vmemmap region. It is defined as the log2 of the upper bound on the size of a struct page. We move it into mm_types.h so it can be defined properly instead of set and checked with a build bug. This also allows us to use the same define for riscv. Link: http://lkml.kernel.org/r/20181107205433.3875-2-logang@deltatee.com Signed-off-by: Logan Gunthorpe Acked-by: Will Deacon Acked-by: Andrew Morton Acked-by: Ard Biesheuvel Acked-by: Catalin Marinas Cc: Arnd Bergmann Cc: Christoph Hellwig Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5b5260902af4cf7d2b8da06ba395a722f6d490fa Author: Mike Rapoport Date: Fri Dec 14 14:16:50 2018 -0800 alpha: fix hang caused by the bootmem removal The conversion of alpha to memblock as the early memory manager caused boot to hang as described at [1]. The issue is caused because for CONFIG_DISCTONTIGMEM=y case, memblock_add() is called using memory start PFN that had been rounded down to the nearest 8Mb and it caused memblock to see more memory that is actually present in the system. Besides, memblock allocates memory from high addresses while bootmem was using low memory, which broke the assumption that early allocations are always accessible by the hardware. This patch ensures that memblock_add() is using the correct PFN for the memory start and forces memblock to use bottom-up allocations. [1] https://lkml.org/lkml/2018/11/22/1032 Link: http://lkml.kernel.org/r/1543233216-25833-1-git-send-email-rppt@linux.ibm.com Reported-by: Meelis Roos Signed-off-by: Mike Rapoport Tested-by: Meelis Roos Cc: Richard Henderson Cc: Ivan Kokshaysky Cc: Matt Turner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 51367e423c6501a26e67d91a655d2bc892303462 Author: Arnd Bergmann Date: Mon Dec 10 21:45:07 2018 +0100 w90p910_ether: remove incorrect __init annotation The get_mac_address() function is normally inline, but when it is not, we get a warning that this configuration is broken: WARNING: vmlinux.o(.text+0x4aff00): Section mismatch in reference from the function w90p910_ether_setup() to the function .init.text:get_mac_address() The function w90p910_ether_setup() references the function __init get_mac_address(). This is often because w90p910_ether_setup lacks a __init Remove the __init to make it always do the right thing. Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller commit 8236b08cf50f85bbfaf48910a0b3ee68318b7c4b Author: Lepton Wu Date: Tue Dec 11 11:12:55 2018 -0800 VSOCK: bind to random port for VMADDR_PORT_ANY The old code always starts from fixed port for VMADDR_PORT_ANY. Sometimes when VMM crashed, there is still orphaned vsock which is waiting for close timer, then it could cause connection time out for new started VM if they are trying to connect to same port with same guest cid since the new packets could hit that orphaned vsock. We could also fix this by doing more in vhost_vsock_reset_orphans, but any way, it should be better to start from a random local port instead of a fixed one. Signed-off-by: Lepton Wu Reviewed-by: Jorgen Hansen Signed-off-by: David S. Miller commit 9c27369f4a1393452c17e8708c1b0beb8ac59501 Author: Mario Limonciello Date: Tue Dec 11 08:16:14 2018 -0600 r8152: Add support for MAC address pass through on RTL8153-BND All previous docks and dongles that have supported this feature use the RTL8153-AD chip. RTL8153-BND is a new chip that will be used in upcoming Dell type-C docks. It should be added to the whitelist of devices to activate MAC address pass through. Per confirming with Realtek all devices containing RTL8153-BND should activate MAC pass through and there won't use pass through bit on efuse like in RTL8153-AD. Signed-off-by: Mario Limonciello Signed-off-by: David S. Miller commit 0c3a16be700ea008e1aa8843453bfc182e04b58a Author: Atul Gupta Date: Tue Dec 11 02:20:53 2018 -0800 crypto/chelsio/chtls: send/recv window update recalculated send and receive window using linkspeed. Determine correct value of eck_ok from SYN received and option configured on local system. Signed-off-by: Atul Gupta Signed-off-by: David S. Miller commit 848dd1c1cbc5a16ceae46f04722f9eb1f4b7bb4e Author: Atul Gupta Date: Tue Dec 11 02:20:40 2018 -0800 crypto/chelsio/chtls: macro correction in tx path corrected macro used in tx path. removed redundant hdrlen and check for !page in chtls_sendmsg Signed-off-by: Atul Gupta Signed-off-by: David S. Miller commit 6422ccc5fbefbd219f3fab133f698e58f5aa44eb Author: Atul Gupta Date: Tue Dec 11 02:20:26 2018 -0800 crypto/chelsio/chtls: listen fails with multiadapt listen fails when more than one tls capable device is registered. tls_hw_hash is called for each dev which loops again for each cdev_list causing listen failure. Hence call chtls_listen_start/stop for specific device than loop over all devices. Signed-off-by: Atul Gupta Signed-off-by: David S. Miller commit df9d4a1780223c3ddd4bf0810079b5a75251554e Author: Atul Gupta Date: Tue Dec 11 02:20:09 2018 -0800 net/tls: sleeping function from invalid context HW unhash within mutex for registered tls devices cause sleep when called from tcp_set_state for TCP_CLOSE. Release lock and re-acquire after function call with ref count incr/dec. defined kref and fp release for tls_device to ensure device is not released outside lock. BUG: sleeping function called from invalid context at kernel/locking/mutex.c:748 in_atomic(): 1, irqs_disabled(): 0, pid: 0, name: swapper/7 INFO: lockdep is turned off. CPU: 7 PID: 0 Comm: swapper/7 Tainted: G W O Call Trace: dump_stack+0x5e/0x8b ___might_sleep+0x222/0x260 __mutex_lock+0x5c/0xa50 ? vprintk_emit+0x1f3/0x440 ? kmem_cache_free+0x22d/0x2a0 ? tls_hw_unhash+0x2f/0x80 ? printk+0x52/0x6e ? tls_hw_unhash+0x2f/0x80 tls_hw_unhash+0x2f/0x80 tcp_set_state+0x5f/0x180 tcp_done+0x2e/0xe0 tcp_rcv_state_process+0x92c/0xdd3 ? lock_acquire+0xf5/0x1f0 ? tcp_v4_rcv+0xa7c/0xbe0 ? tcp_v4_do_rcv+0x70/0x1e0 Signed-off-by: Atul Gupta Signed-off-by: David S. Miller commit 6c0563e442528733219afe15c749eb2cc365da3f Author: Atul Gupta Date: Tue Dec 11 02:19:40 2018 -0800 net/tls: Init routines in create_ctx create_ctx is called from tls_init and tls_hw_prot hence initialize function pointers in common routine. Signed-off-by: Atul Gupta Signed-off-by: David S. Miller commit 2ab4c3426c0cf711d7147e3f559638e4ab88960e Author: Nathan Chancellor Date: Mon Dec 10 21:20:30 2018 -0700 drivers: net: xgene: Remove unnecessary forward declarations Clang warns: drivers/net/ethernet/apm/xgene/xgene_enet_main.c:33:36: warning: tentative array definition assumed to have one element static const struct acpi_device_id xgene_enet_acpi_match[]; ^ 1 warning generated. Both xgene_enet_acpi_match and xgene_enet_of_match are defined before their uses at the bottom of the file so this is unnecessary. When CONFIG_ACPI is disabled, ACPI_PTR becomes NULL so xgene_enet_acpi_match doesn't need to be defined. Signed-off-by: Nathan Chancellor Signed-off-by: David S. Miller commit fb83ed496b9a654f60cd1d58a0e1e79ec5694808 Author: Cong Wang Date: Mon Dec 10 15:23:30 2018 -0800 tipc: compare remote and local protocols in tipc_udp_enable() When TIPC_NLA_UDP_REMOTE is an IPv6 mcast address but TIPC_NLA_UDP_LOCAL is an IPv4 address, a NULL-ptr deref is triggered as the UDP tunnel sock is initialized to IPv4 or IPv6 sock merely based on the protocol in local address. We should just error out when the remote address and local address have different protocols. Reported-by: syzbot+eb4da3a20fad2e52555d@syzkaller.appspotmail.com Cc: Ying Xue Cc: Jon Maloy Signed-off-by: Cong Wang Acked-by: Jon Maloy Signed-off-by: David S. Miller commit acb4a33e9856d5fa3384b87d3d8369229be06d31 Author: Cong Wang Date: Mon Dec 10 12:45:45 2018 -0800 tipc: fix a double kfree_skb() tipc_udp_xmit() drops the packet on error, there is no need to drop it again. Fixes: ef20cd4dd163 ("tipc: introduce UDP replicast") Reported-and-tested-by: syzbot+eae585ba2cc2752d3704@syzkaller.appspotmail.com Cc: Ying Xue Cc: Jon Maloy Signed-off-by: Cong Wang Signed-off-by: David S. Miller commit 15ef70e286176165d28b0b8a969b422561a68dfc Author: Cong Wang Date: Mon Dec 10 11:49:55 2018 -0800 tipc: use lock_sock() in tipc_sk_reinit() lock_sock() must be used in process context to be race-free with other lock_sock() callers, for example, tipc_release(). Otherwise using the spinlock directly can't serialize a parallel tipc_release(). As it is blocking, we have to hold the sock refcnt before rhashtable_walk_stop() and release it after rhashtable_walk_start(). Fixes: 07f6c4bc048a ("tipc: convert tipc reference table to use generic rhashtable") Reported-by: Dmitry Vyukov Cc: Ying Xue Cc: Jon Maloy Signed-off-by: Cong Wang Signed-off-by: David S. Miller commit 380ef2c9ad4fdd5fdd81055857be21ae5f581877 Merge: 743e3c8f19db 927b6b2d69b4 Author: Linus Torvalds Date: Fri Dec 14 12:18:30 2018 -0800 Merge tag 'for-linus-20181214' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: "Three small fixes for this week. contains: - spectre indexing fix for aio (Jeff) - fix for the previous zeroing bio fix, we don't need it for user mapped pages, and in fact it breaks some applications if we do (Keith) - allocation failure fix for null_blk with zoned (Shin'ichiro)" * tag 'for-linus-20181214' of git://git.kernel.dk/linux-block: block: Fix null_blk_zoned creation failure with small number of zones aio: fix spectre gadget in lookup_ioctx block/bio: Do not zero user pages commit 743e3c8f19db951ce9d20e6accb290444f4737a4 Merge: eb6cf9f8cb9d 8a034aad4892 Author: Linus Torvalds Date: Fri Dec 14 12:14:41 2018 -0800 Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux Pull clk fix from Stephen Boyd: "One fix for the qcom QCS404 clk driver that was merged for this release. It specified the wrong parent for a PLL so a part of the clk tree wasn't rooted correctly. This fixes it by using the right name" * tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: clk: qcom: qcs404: Fix gpll0_out_main parent commit d3e8869ec82645599e6497d6974593bf00f7b19b Author: Jakub Kicinski Date: Fri Dec 14 11:38:48 2018 -0800 net: netlink: rename NETLINK_DUMP_STRICT_CHK -> NETLINK_GET_STRICT_CHK NETLINK_DUMP_STRICT_CHK can be used for all GET requests, dumps as well as doit handlers. Replace the DUMP in the name with GET make that clearer. Signed-off-by: Jakub Kicinski Reviewed-by: David Ahern Signed-off-by: David S. Miller commit eb6cf9f8cb9dfacf6679f9d6c72aaf568a027edf Merge: 4645453cefce 3238c359acee Author: Linus Torvalds Date: Fri Dec 14 09:36:41 2018 -0800 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fix from Catalin Marinas: "Invalidate the caches before clearing the DMA buffer via the non-cacheable alias in the FORCE_CONTIGUOUS case" * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: dma-mapping: Fix FORCE_CONTIGUOUS buffer clearing commit 4645453cefcebdff9db26f02cf325607357295c4 Merge: c19bf74fe4d9 a225f1567405 Author: Linus Torvalds Date: Fri Dec 14 09:33:34 2018 -0800 Merge tag 'powerpc-4.20-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: "One notable fix for our change to split pt_regs between user/kernel, we forgot to update BPF to use the user-visible type which was an ABI break for BPF programs. A slightly ugly but minimal fix to do_syscall_trace_enter() so that we use tracehook_report_syscall_entry() properly. We'll rework the code in next to avoid the empty if body. Seven commits fixing bugs in the new papr_scm (Storage Class Memory) driver. The driver was finally able to be tested on the other hypervisor which exposed several bugs. The fixes are all fairly minimal at least. Fix a crash in our MSI code if an MSI-capable device is plugged into a non-MSI capable PHB, only seen on older hardware (MPC8378). Fix our legacy serial code to look for "stdout-path" since the device trees were updated to use that instead of "linux,stdout-path". A change to the COFF zImage code to fix booting old powermacs. A couple of minor build fixes. Thanks to: Benjamin Herrenschmidt, Daniel Axtens, Dmitry V. Levin, Elvira Khabirova, Oliver O'Halloran, Paul Mackerras, Radu Rendec, Rob Herring, Sandipan Das" * tag 'powerpc-4.20-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/ptrace: replace ptrace_report_syscall() with a tracehook call powerpc/mm: Fallback to RAM if the altmap is unusable powerpc/papr_scm: Use ibm,unit-guid as the iset cookie powerpc/papr_scm: Fix DIMM device registration race powerpc/papr_scm: Remove endian conversions powerpc/papr_scm: Update DT properties powerpc/papr_scm: Fix resource end address powerpc/papr_scm: Use depend instead of select powerpc/bpf: Fix broken uapi for BPF_PROG_TYPE_PERF_EVENT powerpc/boot: Fix build failures with -j 1 powerpc: Look for "stdout-path" when setting up legacy consoles powerpc/msi: Fix NULL pointer access in teardown code powerpc/mm: Fix linux page tables build with some configs powerpc: Fix COFF zImage booting on old powermacs commit 1063a5148ac9d1606e80886fa53ee57d45fb4589 Author: Yanjiang Jin Date: Fri Dec 14 11:29:37 2018 -0600 PCI/AER: Queue one GHES event, not several uninitialized ones ecae65e133f2 ("PCI/AER: Use kfifo_in_spinlocked() to insert locked elements") replaced kfifo_put() with kfifo_in_spinlocked(), but passed the *size* of the queue entry, where kfifo_in_spinlocked() expects the *number* of entries to be copied. We want to insert only one element into kfifo, not "sizeof(entry) = 16". Without this patch, we would get 15 uninitialized elements. Fixes: ecae65e133f2 ("PCI/AER: Use kfifo_in_spinlocked() to insert locked elements") Signed-off-by: Yanjiang Jin [bhelgaas: changelog] Signed-off-by: Bjorn Helgaas Reviewed-by: Keith Busch commit c19bf74fe4d979455b22a8e998615a3d46e24c92 Merge: 7fb5f5d3738c 6f9718fe41c3 Author: Linus Torvalds Date: Fri Dec 14 09:22:14 2018 -0800 Merge tag 'ceph-for-4.20-rc7' of https://github.com/ceph/ceph-client Pull ceph fix from Ilya Dryomov: "Luis discovered a problem with the new copyfrom offload on the server side. Disable it for now" * tag 'ceph-for-4.20-rc7' of https://github.com/ceph/ceph-client: ceph: make 'nocopyfrom' a default mount option commit 7fb5f5d3738c3a3ed7a3a8685266bc88dc69fbbd Merge: 92de1de51e99 478b6767ad26 Author: Linus Torvalds Date: Fri Dec 14 09:17:17 2018 -0800 Merge tag 'pinctrl-v4.20-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl Pull pin control fixes from Linus Walleij: "Three pin control fixes for the v4.20 series. Just odd drivers, so nothing particularly interesting: - Set the tile property on Qualcomm SDM60. - Fix up enable register calculation for the Meson - Fix an IRQ offset on the Sunxi (Allwinner)" * tag 'pinctrl-v4.20-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: pinctrl: sunxi: a83t: Fix IRQ offset typo for PH11 pinctrl: meson: fix pull enable register calculation pinctrl: sdm660: Set tile property for pingroups commit 92de1de51e99910ff0b45b340c95994573a1ad23 Merge: 880b9df1bf15 1df07a7f2244 Author: Linus Torvalds Date: Fri Dec 14 09:12:02 2018 -0800 Merge tag 'drm-fixes-2018-12-14' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "While I hoped things would calm down, the world hasn't joined with me, but it's a few things scattered over a wide area. The i915 workarounds regression fix is probably the largest, the rest are more usual sized. We also get some new AMD PCI IDs. There is also a patch in here to MAINTAINERS to added Daniel as an official DRM toplevel co-maintainer, he's decided he wants to step up and share the glory, and he'll likely process next weeks fixes while I'm away on holidays. Summary: amdgpu: - some new PCI IDs - fixed firmware image updates - power management fixes - locking warning fix nouveau: - framebuffer flushing fix - memory leak fix - tegra device init regression fix vmwgfx: - OOM kernel memory fix - excess return in function fix i915: - the biggest fix is a regression fix where workarounds weren't getting reapplied after a gpu hang causing further crashing, this fixes the workaround application to make it happen again - GPU hang fixes for Braswell and some GEN3 GPUs - GVT fix for broadwell tiling rockchip: - revert to fix a regression causing a WARN on shutdown mediatek: - avoid crash attaching to non-existant bridges" * tag 'drm-fixes-2018-12-14' of git://anongit.freedesktop.org/drm/drm: (23 commits) drm/vmwgfx: Protect from excessive execbuf kernel memory allocations v3 MAINTAINERS: Daniel for drm co-maintainer drm/amdgpu: drop fclk/gfxclk ratio setting drm/vmwgfx: remove redundant return ret statement drm/i915: Flush GPU relocs harder for gen3 drm/i915: Allocate a common scratch page drm/i915/execlists: Apply a full mb before execution for Braswell drm/nouveau/kms: Fix memory leak in nv50_mstm_del() drm/nouveau/kms/nv50-: also flush fb writes when rewinding push buffer drm/amdgpu: Fix DEBUG_LOCKS_WARN_ON(depth <= 0) in amdgpu_ctx.lock Revert "drm/rockchip: Allow driver to be shutdown on reboot/kexec" drm/nouveau/drm/nouveau: tegra: Call nouveau_drm_device_init() drm/amdgpu/powerplay: Apply avfs cks-off voltages on VI drm/amdgpu: update SMC firmware image for polaris10 variants drm/amdkfd: add new vega20 pci id drm/amdkfd: add new vega10 pci ids drm/amdgpu: add some additional vega20 pci ids drm/amdgpu: add some additional vega10 pci ids drm/amdgpu: update smu firmware images for VI variants (v2) drm/i915: Introduce per-engine workarounds ... commit 93a86395b429c3a68a0d029f584f39890c0801b2 Merge: 45f750c16cae 28a86092b175 Author: Greg Kroah-Hartman Date: Fri Dec 14 17:06:09 2018 +0100 Merge tag 'usb-serial-4.20-rc7' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-linus Johan writes: USB-serial fixes for 4.20-rc7 Here are some new modem device ids. All have been in linux-next with no reported issues. Signed-off-by: Johan Hovold * tag 'usb-serial-4.20-rc7' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial: USB: serial: option: add Telit LN940 series USB: serial: option: add Fibocom NL668 series USB: serial: option: add Simcom SIM7500/SIM7600 (MBIM mode) USB: serial: option: add GosunCn ZTE WeLink ME3630 USB: serial: option: add HP lt4132 commit 71391bdd2e9aab188f86bf1ecd9b232531ec7eea Author: Xiaozhou Liu Date: Fri Dec 14 22:14:31 2018 +0800 include/linux/compiler_types.h: don't pollute userspace with macro definitions Macros 'inline' and '__gnu_inline' used to be defined in compiler-gcc.h, which was (and is) included entirely in (__KERNEL__ && !__ASSEMBLY__). Commit 815f0ddb346c ("include/linux/compiler*.h: make compiler-*.h mutually exclusive") had those macros exposed to userspace, unintentionally. Then commit a3f8a30f3f00 ("Compiler Attributes: use feature checks instead of version checks") moved '__gnu_inline' back into (__KERNEL__ && !__ASSEMBLY__) and 'inline' was left behind. Since 'inline' depends on '__gnu_inline', compiling error showing "unknown type name ‘__gnu_inline’" will pop up, if userspace somehow includes . Other macros like __must_check, notrace, etc. are in a similar situation. So just move all these macros back into (__KERNEL__ && !__ASSEMBLY__). Note: 1. This patch only affects what userspace sees. 2. __must_check (when !CONFIG_ENABLE_MUST_CHECK) and noinline_for_stack were once defined in __KERNEL__ only, but we believe that they can be put into !__ASSEMBLY__ too. Acked-by: Nick Desaulniers Signed-off-by: Xiaozhou Liu Signed-off-by: Miguel Ojeda commit 55449af1a17a4f32178b42d8ba4ee9477fe9a00c Merge: cb4f131e1f2c fc96df16a1ce Author: Greg Kroah-Hartman Date: Fri Dec 14 15:36:56 2018 +0100 Merge tag 'hyperv-fixes-4.20-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux into char-misc-linus Sasha writes: hyperv-fixes-4.20-rc6 * tag 'hyperv-fixes-4.20-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux: Drivers: hv: vmbus: Return -EINVAL for the sys files for unopened channels x86, hyperv: remove PCI dependency commit 45f750c16cae3625014c14c77bd9005eda975d35 Author: Mathias Nyman Date: Fri Dec 14 10:54:43 2018 +0200 xhci: Don't prevent USB2 bus suspend in state check intended for USB3 only The code to prevent a bus suspend if a USB3 port was still in link training also reacted to USB2 port polling state. This caused bus suspend to busyloop in some cases. USB2 polling state is different from USB3, and should not prevent bus suspend. Limit the USB3 link training state check to USB3 root hub ports only. The origial commit went to stable so this need to be applied there as well Fixes: 2f31a67f01a8 ("usb: xhci: Prevent bus suspend if a port connect change or polling state is detected") Cc: stable@vger.kernel.org Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman commit c3db8d531045774aeee6e0f731ab15b0c450de45 Author: Sudarsana Reddy Kalluru Date: Sun Dec 9 23:27:01 2018 -0800 qed: Fix command number mismatch between driver and the mfw The value for OEM_CFG_UPDATE command differs between driver and the Management firmware (mfw). Fix this gap with adding a reserved field. Fixes: cac6f691546b ("qed: Add support for Unified Fabric Port.") Signed-off-by: Sudarsana Reddy Kalluru Signed-off-by: Ariel Elior Signed-off-by: David S. Miller commit 38ed22351c80532b26f0e2cb60bff1a654b4e1e7 Merge: 9e69efd45321 fa2bf86bab4b Author: David S. Miller Date: Thu Dec 13 19:21:53 2018 -0800 Merge tag 'mlx5-fixes-2018-12-13' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux mlx5-fixes-2018-12-13 Subject: [pull request][net 0/9] Mellanox, mlx5 fixes 2018-12-13 Saeed Mahameed says: ==================== This series introduces some fixes to the mlx5 core and mlx5e netdevice driver. ======= Conflict with net-next: When merged with net-next this series will cause a moderate conflict: 1) in drivers/net/ethernet/mellanox/mlx5/core/en_tc.c (2 hunks) Take hunks from net only and just replace *attr->mirror_count to *attr->split_count 1.1) there is one more instance of slow_attr->mirror_count to be replaced with slow_attr->split_count, it doesn't appear in the conflict, it will cause a compilation error if left out. 2) in mlx5_ifc.h, take hunks only from net. Example for the merge resolution can be found at: https://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux.git/commit/?h=merge/mlx5-fixes&id=48830adf29804d85d77ed8a251d625db0eb5b8a8 branch merge/mlx5-fixes of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux (I simply merged this pull request tag into net-next and resolved the conflict) I don't know if it's ok with you, but to save your time, you can just: git pull git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux merge/mlx5-fixes Into net-next, before your next net merge, and you will have a clean merge of net into net-next (at least for mlx5 files). ====== Please pull and let me know if there's any problem. For -stable v4.18 338d615be484 ('net/mlx5e: Cancel DIM work on close SQ') 91f40f9904ad ('net/mlx5e: RX, Verify MPWQE stride size is in range') For -stable v4.19 c5c7e1c41bbe ('net/mlx5e: Remove unused UDP GSO remaining counter') ==================== Signed-off-by: David S. Miller commit ea5751ccd665a2fd1b24f9af81f6167f0718c5f6 Author: Ivan Delalande Date: Thu Dec 13 15:20:52 2018 -0800 proc/sysctl: don't return ENOMEM on lookup when a table is unregistering proc_sys_lookup can fail with ENOMEM instead of ENOENT when the corresponding sysctl table is being unregistered. In our case we see this upon opening /proc/sys/net/*/conf files while network interfaces are being deleted, which confuses our configuration daemon. The problem was successfully reproduced and this fix tested on v4.9.122 and v4.20-rc6. v2: return ERR_PTRs in all cases when proc_sys_make_inode fails instead of mixing them with NULL. Thanks Al Viro for the feedback. Fixes: ace0c791e6c3 ("proc/sysctl: Don't grab i_lock under sysctl_lock.") Cc: stable@vger.kernel.org Signed-off-by: Ivan Delalande Signed-off-by: Al Viro commit 880b9df1bf157dc28a2e65beea6183d095e0ccb0 Merge: 65e08c5e8631 48483614de97 Author: Linus Torvalds Date: Thu Dec 13 16:35:58 2018 -0800 Merge tag 'xarray-4.20-rc7' of git://git.infradead.org/users/willy/linux-dax Pull XArray fixes from Matthew Wilcox: "Two bugfixes, each with test-suite updates, two improvements to the test-suite without associated bugs, and one patch adding a missing API" * tag 'xarray-4.20-rc7' of git://git.infradead.org/users/willy/linux-dax: XArray: Fix xa_alloc when id exceeds max XArray tests: Check iterating over multiorder entries XArray tests: Handle larger indices more elegantly XArray: Add xa_cmpxchg_irq and xa_cmpxchg_bh radix tree: Don't return retry entries from lookup commit e58725d51fa8da9133f3f1c54170aa2e43056b91 Author: Richard Weinberger Date: Wed Nov 7 23:04:43 2018 +0100 ubifs: Handle re-linking of inodes correctly while recovery UBIFS's recovery code strictly assumes that a deleted inode will never come back, therefore it removes all data which belongs to that inode as soon it faces an inode with link count 0 in the replay list. Before O_TMPFILE this assumption was perfectly fine. With O_TMPFILE it can lead to data loss upon a power-cut. Consider a journal with entries like: 0: inode X (nlink = 0) /* O_TMPFILE was created */ 1: data for inode X /* Someone writes to the temp file */ 2: inode X (nlink = 0) /* inode was changed, xattr, chmod, … */ 3: inode X (nlink = 1) /* inode was re-linked via linkat() */ Upon replay of entry #2 UBIFS will drop all data that belongs to inode X, this will lead to an empty file after mounting. As solution for this problem, scan the replay list for a re-link entry before dropping data. Fixes: 474b93704f32 ("ubifs: Implement O_TMPFILE") Cc: stable@vger.kernel.org Cc: Russell Senior Cc: Rafał Miłecki Reported-by: Russell Senior Reported-by: Rafał Miłecki Tested-by: Rafał Miłecki Signed-off-by: Richard Weinberger commit e542087701f09418702673631a908429feb3eae0 Author: Pan Bian Date: Wed Nov 28 11:20:03 2018 +0800 ubi: Do not drop UBI device reference before using The UBI device reference is dropped but then the device is used as a parameter of ubi_err. The bug is introduced in changing ubi_err's behavior. The old ubi_err does not require a UBI device as its first parameter, but the new one does. Fixes: 32608703310 ("UBI: Extend UBI layer debug/messaging capabilities") Signed-off-by: Pan Bian Reviewed-by: Boris Brezillon Signed-off-by: Richard Weinberger commit b95f83ab762dd6211351b9140f99f43644076ca8 Author: Pan Bian Date: Wed Nov 28 10:57:33 2018 +0800 ubi: Put MTD device after it is not used The MTD device reference is dropped via put_mtd_device, however its field ->index is read and passed to ubi_msg. To fix this, the patch moves the reference dropping after calling ubi_msg. Signed-off-by: Pan Bian Reviewed-by: Boris Brezillon Signed-off-by: Richard Weinberger commit d62e98ed1efcaa94caa004f622944afdce5f1c3c Author: Gabor Juhos Date: Sun Dec 9 18:12:13 2018 +0100 ubifs: Fix default compression selection in ubifs When ubifs is build without the LZO compressor and no compressor is given the creation of the default file system will fail. before selection the LZO compressor check if it is present and if not fall back to the zlib or none. Signed-off-by: Gabor Juhos Signed-off-by: Hauke Mehrtens Signed-off-by: Richard Weinberger commit 6554a56f352ee2a6ce295fcfb39889eb9ecc79cf Author: Garry McNulty Date: Thu Nov 15 22:25:58 2018 +0000 ubifs: Fix memory leak on error condition If the call to ubifs_read_nnode() fails in ubifs_lpt_calc_hash() an error is returned without freeing the memory allocated to 'buf'. Read and check the root node before allocating the buffer. Detected by CoverityScan, CID 1441025 ("Resource leak") Signed-off-by: Garry McNulty Signed-off-by: Richard Weinberger commit 60eb5da2434b5288291aac533fb4dadc8ec8aed7 Author: Arnd Bergmann Date: Fri Nov 2 12:11:22 2018 +0100 ubifs: auth: Add CONFIG_KEYS dependency The new authentication support causes a build failure when CONFIG_KEYS is disabled, so add a dependency. fs/ubifs/auth.c: In function 'ubifs_init_authentication': fs/ubifs/auth.c:249:16: error: implicit declaration of function 'request_key'; did you mean 'request_irq'? [-Werror=implicit-function-declaration] keyring_key = request_key(&key_type_logon, c->auth_key_name, NULL); Fixes: d8a22773a12c ("ubifs: Enable authentication support") Signed-off-by: Arnd Bergmann Signed-off-by: Richard Weinberger commit aa3d31e08c5707c99feebe53cb713fb43f526f16 Author: Geert Uytterhoeven Date: Mon Nov 5 09:25:40 2018 +0100 ubifs: CONFIG_UBIFS_FS_AUTHENTICATION should depend on UBIFS_FS Instead of adding yet another dependency on UBIFS_FS, wrap the whole block of ubifs config options in a single "if UBIFS_FS". Fixes: d8a22773a12c6d78 ("ubifs: Enable authentication support") Signed-off-by: Geert Uytterhoeven Acked-by: Sascha Hauer Signed-off-by: Richard Weinberger commit eb66eff6636de0e83f74294447b47aec51e069fc Author: Arnd Bergmann Date: Fri Nov 2 16:39:24 2018 +0100 ubifs: replay: Fix high stack usage Having two shash descriptors on the stack cause a very significant kernel stack usage that can cross the warning threshold: fs/ubifs/replay.c: In function 'authenticate_sleb': fs/ubifs/replay.c:633:1: error: the frame size of 1144 bytes is larger than 1024 bytes [-Werror=frame-larger-than=] Normally, gcc optimizes the out, but with CONFIG_CC_OPTIMIZE_FOR_DEBUGGING, it does not. Splitting the two stack allocations into separate functions means that they will use the same memory again. In normal configurations (optimizing for size or performance), those should get inlined and we get the same behavior as before. Signed-off-by: Arnd Bergmann Signed-off-by: Richard Weinberger commit 65e08c5e86311143f45c3e4389561af3107fc8f6 Merge: 76a5cfb8e7c9 2bd61abead58 Author: Linus Torvalds Date: Thu Dec 13 12:57:21 2018 -0800 Merge tag 'linux-kselftest-4.20-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest Pull Kselftest fix from Shuah Khan: "A single fix for a seccomp test from Kees Cook." * tag 'linux-kselftest-4.20-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: selftests/seccomp: Remove SIGSTOP si_pid check commit 76a5cfb8e7c98ae0ea238910f97c17cb1f638918 Merge: e10db791bf73 99c47fcd4daa Author: Linus Torvalds Date: Thu Dec 13 12:02:41 2018 -0800 Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal Pull thermal fixes from Eduardo Valentin: "Fixes for STM and HISI thermal drivers" * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal: thermal: stm32: Fix stm_thermal_read_factory_settings thermal: stm32: read factory settings inside stm_thermal_prepare thermal/drivers/hisi: Fix number of sensors on hi3660 thermal/drivers/hisi: Fix wrong platform_get_irq_byname() commit fc96df16a1ce80cbb3c316ab7d4dc8cd5c2852ce Author: Dexuan Cui Date: Thu Dec 13 16:35:43 2018 +0000 Drivers: hv: vmbus: Return -EINVAL for the sys files for unopened channels Before 98f4c651762c, we returned zeros for unopened channels. With 98f4c651762c, we started to return random on-stack values. We'd better return -EINVAL instead. Fixes: 98f4c651762c ("hv: move ringbuffer bus attributes to dev_groups") Cc: stable@vger.kernel.org Cc: K. Y. Srinivasan Cc: Haiyang Zhang Cc: Stephen Hemminger Signed-off-by: Dexuan Cui Signed-off-by: Sasha Levin commit c629421a990033ba539eb8585e73a2e6fa9ea631 Author: Sinan Kaya Date: Sat Dec 1 21:40:38 2018 +0000 x86, hyperv: remove PCI dependency Need to be able to boot without PCI devices present. Signed-off-by: Sinan Kaya Signed-off-by: Sasha Levin commit 1df07a7f2244947c888dc35bba2b237f714afc56 Merge: a805ce683f4c fd567467753f Author: Dave Airlie Date: Fri Dec 14 05:19:25 2018 +1000 Merge branch 'vmwgfx-fixes-4.20' of git://people.freedesktop.org/~thomash/linux into drm-fixes One regression fix for avoiding kernel OOM, one cleanup return fix. Signed-off-by: Dave Airlie From: Thomas Hellstrom Link: https://patchwork.freedesktop.org/patch/msgid/20181213122815.10581-1-thellstrom@vmware.com commit 28a86092b1753b802ef7e3de8a4c4a69a9c1bb03 Author: Jörgen Storvist Date: Thu Dec 13 17:32:08 2018 +0100 USB: serial: option: add Telit LN940 series Added USB serial option driver support for Telit LN940 series cellular modules. Covering both QMI and MBIM modes. usb-devices output (0x1900): T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 21 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=1bc7 ProdID=1900 Rev=03.10 S: Manufacturer=Telit S: Product=Telit LN940 Mobile Broadband S: SerialNumber=0123456789ABCDEF C: #Ifs= 5 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=ff Prot=ff Driver=qmi_wwan I: If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option I: If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option I: If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option usb-devices output (0x1901): T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 20 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=1bc7 ProdID=1901 Rev=03.10 S: Manufacturer=Telit S: Product=Telit LN940 Mobile Broadband S: SerialNumber=0123456789ABCDEF 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= 1 Cls=02(commc) Sub=0e Prot=00 Driver=cdc_mbim I: If#= 5 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim Signed-off-by: Jörgen Storvist Cc: stable Signed-off-by: Johan Hovold commit 48483614de97c4f5219abeda630e62b2bebdce62 Author: Matthew Wilcox Date: Thu Dec 13 13:57:42 2018 -0500 XArray: Fix xa_alloc when id exceeds max Specifying a starting ID greater than the maximum ID isn't something attempted very often, but it should fail. It was succeeding due to xas_find_marked() returning the wrong error state, so add tests for both xa_alloc() and xas_find_marked(). Fixes: b803b42823d0 ("xarray: Add XArray iterators") Signed-off-by: Matthew Wilcox commit e10db791bf73c1973f24591897e839db2eb3c804 Merge: e861e11c5900 37fbd834b4e4 Author: Linus Torvalds Date: Thu Dec 13 11:02:23 2018 -0800 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma Pull rdma fixes from Doug Ledford: "We have 5 small fixes for this pull request. One is a performance regression, so not necessarily strictly a fix, but it was small and reasonable and claimed to avoid thrashing in the scheduler, so I took it. The remaining are all legitimate fixes that match the "we take fixes any time" criteria. Summary: - One performance regression for hfi1 - One kasan fix for hfi1 - A couple mlx5 fixes - A core oops fix" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: IB/core: Fix oops in netdev_next_upper_dev_rcu() IB/mlx5: Block DEVX umem from the non applicable cases IB/mlx5: Fix implicit ODP interrupted page fault IB/hfi1: Fix an out-of-bounds access in get_hw_stats IB/hfi1: Fix a latency issue for small messages commit e861e11c5900d21afe0c3a326d1303d6f92c9f6f Merge: 52a7dc28a7b0 b704441e38f6 Author: Linus Torvalds Date: Thu Dec 13 10:59:02 2018 -0800 Merge tag 'mmc-v4.20-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull mmc fixes from Ulf Hansson: "MMC core: - Fixup RPMB requests to use mrq->sbc when sending CMD23 MMC host: - omap: Fix broken MMC/SD on OMAP15XX/OMAP5910/OMAP310 - sdhci-omap: Fix DCRC error handling during tuning - sdhci: Fixup the timeout check window for clock and reset" * tag 'mmc-v4.20-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: mmc: sdhci: fix the timeout check window for clock and reset mmc: sdhci-omap: Fix DCRC error handling during tuning MMC: OMAP: fix broken MMC on OMAP15XX/OMAP5910/OMAP310 mmc: core: use mrq->sbc when sending CMD23 for RPMB commit 52a7dc28a7b01cdd9ec349a943944dc49d20fc26 Merge: 67f2a93099cc 0bea4cc83835 Author: Linus Torvalds Date: Thu Dec 13 10:54:13 2018 -0800 Merge tag 'sound-4.20-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "Only usual suspects here: a few more fixups for Realtek HD-audio on various PCs, including a regression fix in the previous fix for Lenovo X1 Carbon, as well as a typo fix in the recent Fireface patch" * tag 'sound-4.20-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: hda/realtek: Enable audio jacks of ASUS UX433FN/UX333FA with ALC294 ALSA: hda/realtek: Enable audio jacks of ASUS UX533FD with ALC294 ALSA: hda/realtek: ALC294 mic and headset-mode fixups for ASUS X542UN ALSA: fireface: fix reference to wrong register for clock configuration ALSA: hda/realtek - Fix the mute LED regresion on Lenovo X1 Carbon ALSA: hda/realtek - Fixed headphone issue for ALC700 commit 7640ead939247e91e84b7ec6ec001f30193cc7df Author: Jakub Kicinski Date: Wed Dec 12 16:29:07 2018 -0800 bpf: verifier: make sure callees don't prune with caller differences Currently for liveness and state pruning the register parentage chains don't include states of the callee. This makes some sense as the callee can't access those registers. However, this means that READs done after the callee returns will not propagate into the states of the callee. Callee will then perform pruning disregarding differences in caller state. Example: 0: (85) call bpf_user_rnd_u32 1: (b7) r8 = 0 2: (55) if r0 != 0x0 goto pc+1 3: (b7) r8 = 1 4: (bf) r1 = r8 5: (85) call pc+4 6: (15) if r8 == 0x1 goto pc+1 7: (05) *(u64 *)(r9 - 8) = r3 8: (b7) r0 = 0 9: (95) exit 10: (15) if r1 == 0x0 goto pc+0 11: (95) exit Here we acquire unknown state with call to get_random() [1]. Then we store this random state in r8 (either 0 or 1) [1 - 3], and make a call on line 5. Callee does nothing but a trivial conditional jump (to create a pruning point). Upon return caller checks the state of r8 and either performs an unsafe read or not. Verifier will first explore the path with r8 == 1, creating a pruning point at [11]. The parentage chain for r8 will include only callers states so once verifier reaches [6] it will mark liveness only on states in the caller, and not [11]. Now when verifier walks the paths with r8 == 0 it will reach [11] and since REG_LIVE_READ on r8 was not propagated there it will prune the walk entirely (stop walking the entire program, not just the callee). Since [6] was never walked with r8 == 0, [7] will be considered dead and replaced with "goto -1" causing hang at runtime. This patch weaves the callee's explored states onto the callers parentage chain. Rough parentage for r8 would have looked like this before: [0] [1] [2] [3] [4] [5] [10] [11] [6] [7] | | ,---|----. | | | sl0: sl0: / sl0: \ sl0: sl0: sl0: fr0: r8 <-- fr0: r8<+--fr0: r8 `fr0: r8 ,fr0: r8<-fr0: r8 \ fr1: r8 <- fr1: r8 / \__________________/ after: [0] [1] [2] [3] [4] [5] [10] [11] [6] [7] | | | | | | sl0: sl0: sl0: sl0: sl0: sl0: fr0: r8 <-- fr0: r8 <- fr0: r8 <- fr0: r8 <-fr0: r8<-fr0: r8 fr1: r8 <- fr1: r8 Now the mark from instruction 6 will travel through callees states. Note that we don't have to connect r0 because its overwritten by callees state on return and r1 - r5 because those are not alive any more once a call is made. v2: - don't connect the callees registers twice (Alexei: suggestion & code) - add more details to the comment (Ed & Alexei) v1: don't unnecessarily link caller saved regs (Jiong) Fixes: f4d7e40a5b71 ("bpf: introduce function calls (verification)") Reported-by: David Beckett Signed-off-by: Jakub Kicinski Reviewed-by: Jiong Wang Reviewed-by: Edward Cree Signed-off-by: Alexei Starovoitov commit cddfb283af7e5700760362ec6f6ab3a039636e64 Author: Lorenzo Bianconi Date: Mon Dec 10 16:46:28 2018 +0100 mt76: add entry in MAINTAINERS file Add entry for mt76 driver in MAINTAINERS file Signed-off-by: Lorenzo Bianconi Signed-off-by: Kalle Valo commit 7c250f4612ae97aa04500c0d0cff69bb87046e3a Author: Lorenzo Bianconi Date: Fri Nov 16 17:19:21 2018 +0100 mt76: fix potential NULL pointer dereference in mt76_stop_tx_queues Starting from mac80211 commit adf8ed01e4fd ("mac80211: add an optional TXQ for other PS-buffered frames") and commit 0eeb2b674f05 ("mac80211: add an option for station management TXQ") a new per-sta queue has been introduced for bufferable management frames. sta->txq[IEEE80211_NUM_TIDS] is initialized just if the driver reports the following hw flags: - IEEE80211_HW_STA_MMPDU_TXQ - IEEE80211_HW_BUFF_MMPDU_TXQ This can produce a NULL pointer dereference in mt76_stop_tx_queues since mt76 iterates on all available sta tx queues assuming they are initialized by mac80211. This issue has been spotted analyzing the code (it has not triggered any crash yet) Signed-off-by: Lorenzo Bianconi Signed-off-by: Kalle Valo commit 1aa48f088615ebfa5e139951a0d3e7dc2c2af4ec Author: Brian Norris Date: Fri Nov 30 09:59:57 2018 -0800 Revert "mwifiex: restructure rx_reorder_tbl_lock usage" This reverts commit 5188d5453bc9380ccd4ae1086138dd485d13aef2, because it introduced lock recursion: BUG: spinlock recursion on CPU#2, kworker/u13:1/395 lock: 0xffffffc0e28a47f0, .magic: dead4ead, .owner: kworker/u13:1/395, .owner_cpu: 2 CPU: 2 PID: 395 Comm: kworker/u13:1 Not tainted 4.20.0-rc4+ #2 Hardware name: Google Kevin (DT) Workqueue: MWIFIEX_RX_WORK_QUEUE mwifiex_rx_work_queue [mwifiex] Call trace: dump_backtrace+0x0/0x140 show_stack+0x20/0x28 dump_stack+0x84/0xa4 spin_bug+0x98/0xa4 do_raw_spin_lock+0x5c/0xdc _raw_spin_lock_irqsave+0x38/0x48 mwifiex_flush_data+0x2c/0xa4 [mwifiex] call_timer_fn+0xcc/0x1c4 run_timer_softirq+0x264/0x4f0 __do_softirq+0x1a8/0x35c do_softirq+0x54/0x64 netif_rx_ni+0xe8/0x120 mwifiex_recv_packet+0xfc/0x10c [mwifiex] mwifiex_process_rx_packet+0x1d4/0x238 [mwifiex] mwifiex_11n_dispatch_pkt+0x190/0x1ac [mwifiex] mwifiex_11n_rx_reorder_pkt+0x28c/0x354 [mwifiex] mwifiex_process_sta_rx_packet+0x204/0x26c [mwifiex] mwifiex_handle_rx_packet+0x15c/0x16c [mwifiex] mwifiex_rx_work_queue+0x104/0x134 [mwifiex] worker_thread+0x4cc/0x72c kthread+0x134/0x13c ret_from_fork+0x10/0x18 This was clearly not tested well at all. I simply performed 'wget' in a loop and it fell over within a few seconds. Fixes: 5188d5453bc9 ("mwifiex: restructure rx_reorder_tbl_lock usage") Cc: Cc: Ganapathi Bhat Signed-off-by: Brian Norris Signed-off-by: Kalle Valo commit 8cfa272b0d321160ebb5b45073e39ef0a6ad73f2 Author: Larry Finger Date: Sat Nov 17 20:55:03 2018 -0600 rtlwifi: Fix leak of skb when processing C2H_BT_INFO With commit 0a9f8f0a1ba9 ("rtlwifi: fix btmpinfo timeout while processing C2H_BT_INFO"), calling rtl_c2hcmd_enqueue() with rtl_c2h_fast_cmd() true, the routine returns without freeing that skb, thereby leaking it. This issue has been discussed at https://github.com/lwfinger/rtlwifi_new/issues/401 and the fix tested there. Fixes: 0a9f8f0a1ba9 ("rtlwifi: fix btmpinfo timeout while processing C2H_BT_INFO") Reported-and-tested-by: Francisco Machado Magalhães Neto Cc: Francisco Machado Magalhães Neto Cc: Ping-Ke Shih Cc: Stable # 4.18+ Signed-off-by: Larry Finger Signed-off-by: Kalle Valo commit fd567467753fac9f9f477550065018e7f4e3c8f3 Author: Thomas Hellstrom Date: Wed Dec 12 11:52:08 2018 +0100 drm/vmwgfx: Protect from excessive execbuf kernel memory allocations v3 With the new validation code, a malicious user-space app could potentially submit command streams with enough buffer-object and resource references in them to have the resulting allocated validion nodes and relocations make the kernel run out of GFP_KERNEL memory. Protect from this by having the validation code reserve TTM graphics memory when allocating. Signed-off-by: Thomas Hellstrom Reviewed-by: Deepak Rawat --- v2: Removed leftover debug printouts commit 30360224441ce89a98ed627861e735beb4010775 Author: Jörgen Storvist Date: Wed Dec 12 21:47:36 2018 +0100 USB: serial: option: add Fibocom NL668 series Added USB serial option driver support for Fibocom NL668 series cellular modules. Reserved USB endpoints 4, 5 and 6 for network + ADB interfaces. usb-devices output (QMI mode) T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 16 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=1508 ProdID=1001 Rev=03.18 S: Manufacturer=Nodecom NL668 Modem S: Product=Nodecom NL668-CN Modem S: SerialNumber= 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) usb-devices output (ECM mode) T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 17 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=1508 ProdID=1001 Rev=03.18 S: Manufacturer=Nodecom NL668 Modem S: Product=Nodecom NL668-CN Modem S: SerialNumber= 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 Signed-off-by: Johan Hovold commit fa2bf86bab4bbc61e5678a42a14e40075093a98f Author: Tal Gilboa Date: Thu Nov 22 14:20:45 2018 +0200 net/mlx5e: Cancel DIM work on close SQ TXQ SQ closure is followed by closing the corresponding CQ. A pending DIM work would try to modify the now non-existing CQ. This would trigger an error: [85535.835926] mlx5_core 0000:af:00.0: mlx5_cmd_check:769:(pid 124399): MODIFY_CQ(0x403) op_mod(0x0) failed, status bad resource state(0x9), syndrome (0x1d7771) Fix by making sure to cancel any pending DIM work before destroying the SQ. Fixes: cbce4f444798 ("net/mlx5e: Enable adaptive-TX moderation") Signed-off-by: Tal Gilboa Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit d13b224f431579fe2d712871d4265d7a22ca6c9c Author: Mikhael Goikhman Date: Mon Nov 19 19:11:12 2018 +0200 net/mlx5e: Remove unused UDP GSO remaining counter Remove tx_udp_seg_rem counter from ethtool output, as it is no longer being updated in the driver's data flow. Fixes: 3f44899ef2ce ("net/mlx5e: Use PARTIAL_GSO for UDP segmentation") Signed-off-by: Mikhael Goikhman Reviewed-by: Eran Ben Elisha Signed-off-by: Saeed Mahameed commit 61c806dafe81c58f41fec10fb5cad0d3a4390e3e Author: Or Gerlitz Date: Mon Dec 10 17:05:59 2018 +0200 net/mlx5e: Avoid encap flows deletion attempt the 1st time a neigh is resolved Currently, we are deleting offloaded encap flows in case the relevant neigh becomes unconnected while the encap is valid (a sign that it used to be connected), or if the curr neigh mac is different from the cached mac (a sign that the remote side changed their mac). The 2nd check also applies when the neigh becomes connected on the 1st time (we start with zero mac). Before the offending commit, the deleting handler was practically no op, as no flows were offloaded. But since that commit, we offload neigh-less encap flows to slow path. Under mirroring scheme, we go into the delete handler, attempt to unoffload a mirror rule which was never set (as we were offloading to slow path) and crash. Fix that by calling the delete handler only when the encap is valid, which covers both cases mentioned above. Fixes: 5dbe906ff1d5 ('net/mlx5e: Use a slow path rule instead if vxlan neighbour isn't available') Signed-off-by: Or Gerlitz Signed-off-by: Eli Britstein Reviewed-by: Paul Blakey Signed-off-by: Saeed Mahameed commit 154e62abe9cd07c9b71735d8456a03a7c5251280 Author: Or Gerlitz Date: Mon Dec 10 12:31:42 2018 +0200 net/mlx5e: Properly initialize flow attributes for slow path eswitch rule deletion When a neighbour is resolved, we delete the goto slow path rule from HW. The eswitch flow attributes where not properly initialized on that case, hence we mess up the eswitch refcounts for chain zero (the default one). Fix that along with making sure to use semicolons and not commas on that code; Fixes: 5dbe906ff1d5 ('net/mlx5e: Use a slow path rule instead if vxlan neighbour isn't available') Signed-off-by: Or Gerlitz Reviewed-by: Paul Blakey Signed-off-by: Saeed Mahameed commit d14f6f2a84326dd2751962167b2293fc91751ff8 Author: Or Gerlitz Date: Sun Dec 9 17:15:23 2018 +0200 net/mlx5e: Avoid overriding the user provided priority for offloaded tc rules Just a leftover which was wrongly left there, remove it while spawning a message to suggest firmware upgrade. Fixes: bf07aa730a04 ('net/mlx5e: Support offloading tc priorities and chains for eswitch flows') Signed-off-by: Or Gerlitz Reviewed-by: Paul Blakey Signed-off-by: Saeed Mahameed commit e88afe759a49f8d51d6cc5fc89d65b4a5768703f Author: Or Gerlitz Date: Sun Dec 9 17:03:36 2018 +0200 net/mlx5e: Err if asked to mirror a goto chain tc eswitch rule Currently we are not supporting this and not err-ing on that either. For now, just err if asked to do that. Fixes: bf07aa730a04 ('net/mlx5e: Support offloading tc priorities and chains for eswitch flows') Signed-off-by: Or Gerlitz Reported-by: Eli Britstein Reviewed-by: Eli Britstein Signed-off-by: Saeed Mahameed commit e1c15b62b7015119d3e5915cd2ae3b89d59c2576 Author: Moshe Shemesh Date: Fri Nov 2 06:10:49 2018 +0200 net/mlx5e: RX, Verify MPWQE stride size is in range Add check of MPWQE stride size is within range supported by HW. In case calculated MPWQE stride size exceed range, linear SKB can't be used and we should use non linear MPWQE instead. Fixes: 619a8f2a42f1 ("net/mlx5e: Use linear SKB in Striding RQ") Signed-off-by: Moshe Shemesh Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 8956f0014ea5ed824aae3816fd9e52cf3c85b9d4 Author: Gavi Teitz Date: Mon Nov 19 17:22:30 2018 +0200 net/mlx5e: Fix default amount of channels for VF representors The default amount of channels a representor opens was erroneously changed from one to the maximum amount of channels, restore to its intended value. Fixes: 779d986d60de ("net/mlx5e: Do not ignore netdevice TX/RX queues number") Signed-off-by: Gavi Teitz Reviewed-by: Or Gerlitz Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 663f146f2ecfcc47934cb9f9543f664eeb6adb46 Author: Vu Pham Date: Wed Oct 31 16:03:21 2018 +0200 net/mlx5: E-Switch, Fix fdb cap bits swap The cap bits locations for the fdb caps of multi path to table (used for local mirroring) and multi encap (used for prio/chains) were wrongly used in swapped locations. This went unnoted so far b/c we tested the offending patch with CX5 FW that supports both of them. On different environments where not both caps are supported, we will be messed up, fix that. Fixes: b9aa0ba17af5 ('net/mlx5: Add cap bits for multi fdb encap') Signed-off-by: Vu Pham Reviewed-by: Or Gerlitz Tested-by: Or Gerlitz Signed-off-by: Saeed Mahameed commit 9e69efd453211a3646fba9262d3e7819f80b2949 Merge: 3b076cfe86be 86a07da34380 Author: David S. Miller Date: Wed Dec 12 21:56:20 2018 -0800 Merge branch 'vhost-fixes' Jason Wang says: ==================== Fix various issue of vhost This series tries to fix various issues of vhost: - Patch 1 adds a missing write barrier between used idx updating and logging. - Patch 2-3 brings back the protection of device IOTLB through vq mutex, this fixes possible use after free in device IOTLB entries. Please consider them for -stable. Changes from V2: - drop dirty page fix and make it for net-next Changes from V1: - silent compiler warning for 32bit. - use mutex_trylock() on slowpath instead of mutex_lock() even on fast path. ==================== Signed-off-by: David S. Miller commit 86a07da34380bc9467fa407dc3e484488a8ad40d Author: Jason Wang Date: Thu Dec 13 10:53:39 2018 +0800 Revert "net: vhost: lock the vqs one by one" This reverts commit 78139c94dc8c96a478e67dab3bee84dc6eccb5fd. We don't protect device IOTLB with vq mutex, which will lead e.g use after free for device IOTLB entries. And since we've switched to use mutex_trylock() in previous patch, it's safe to revert it without having deadlock. Fixes: commit 78139c94dc8c ("net: vhost: lock the vqs one by one") Cc: Tonghao Zhang Acked-by: Michael S. Tsirkin Signed-off-by: Jason Wang Signed-off-by: David S. Miller commit 476e8ba712fa6a479192dfc4301cd3765d9ba713 Author: Jason Wang Date: Thu Dec 13 10:53:38 2018 +0800 vhost_net: switch to use mutex_trylock() in vhost_net_busy_poll() We used to hold the mutex of paired virtqueue in vhost_net_busy_poll(). But this will results an inconsistent lock order which may cause deadlock if we try to bring back the protection of device IOTLB with vq mutex that requires to hold mutex of all virtqueues at the same time. Fix this simply by switching to use mutex_trylock(), when fail just skip the busy polling. This can happen when device IOTLB is under updating which should be rare. Fixes: commit 78139c94dc8c ("net: vhost: lock the vqs one by one") Cc: Tonghao Zhang Acked-by: Michael S. Tsirkin Signed-off-by: Jason Wang Signed-off-by: David S. Miller commit 841df922417eb82c835e93d4b93eb6a68c99d599 Author: Jason Wang Date: Thu Dec 13 10:53:37 2018 +0800 vhost: make sure used idx is seen before log in vhost_add_used_n() We miss a write barrier that guarantees used idx is updated and seen before log. This will let userspace sync and copy used ring before used idx is update. Fix this by adding a barrier before log_write(). Fixes: 8dd014adfea6f ("vhost-net: mergeable buffers support") Acked-by: Michael S. Tsirkin Signed-off-by: Jason Wang Signed-off-by: David S. Miller commit 3b076cfe86be3784dee93cfd83d6913a9ef530ee Merge: 18330c58e309 96d1a731611f Author: David S. Miller Date: Wed Dec 12 21:43:43 2018 -0800 Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-queue Jeff Kirsher says: ==================== Intel Wired LAN Driver Fixes 2018-12-12 This series contains fixes to i40e and ixgbe. Stefan Assmann fixes an issue created by a previous fix, where ether_addr_copy() was moved to avoid a race but did not take into account that it alters the MAC address being handed to i40e_del_mac_filter(). Michał Mirosław provides 2 fixes for i40e, first resolves issues in the hardware VLAN offload where VLAN.TCI equal to 0 was being dropped and a race between disabling VLAN receive feature in hardware and processing the receive queue, where packets could have their VLAN information dropped. Ross Lagerwall fixes a racy condition during a ixgbe VF reset, where writing the register to issue a reset and sending the reset message via the mailbox API could result of the mailbox memory getting cleared during the reset before the message gets successfully sent which results in a VF driver malfunction. ==================== Signed-off-by: David S. Miller commit 18330c58e309d88261cf981c04c91f9130402594 Merge: 9463b9a4e0e4 d4e7df16567b Author: David S. Miller Date: Wed Dec 12 21:36:12 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: 1) Fix warnings suspicious rcu usage when handling base chain statistics, from Taehee Yoo. 2) Refetch pointer to tcp header from nf_ct_sack_adjust() since skb_make_writable() may reallocate data area, reported by Google folks patch from Florian. 3) Incorrect netlink nest end after previous cancellation from error path in ipset, from Pan Bian. 4) Use dst_hold_safe() from nf_xfrm_me_harder(), from Florian. 5) Use rb_link_node_rcu() for rcu-protected rbtree node in nf_conncount, from Taehee Yoo. ==================== Signed-off-by: David S. Miller commit 67f2a93099cca369c056e591c82f1d1bc726c945 Merge: 14a996c38312 2af6c0703d75 Author: Linus Torvalds Date: Wed Dec 12 18:29:24 2018 -0800 Merge tag 'for-4.20/dm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm Pull device mapper fixes from Mike Snitzer: - Fix DM cache metadata to verify that a cache has block before trying to continue with operation that requires them. - Fix bio-based DM core's dm_make_request() to properly impose device limits on individual bios by making use of blk_queue_split(). - Fix long-standing race with how DM thinp notified userspace of thin-pool mode state changes before they were actually made. - Fix the zoned target's bio completion handling; this is a fairly invassive fix at this stage but it is localized to the zoned target. Any zoned target users will benefit from this fix. * tag 'for-4.20/dm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm: dm thin: bump target version dm thin: send event about thin-pool state change _after_ making it dm zoned: Fix target BIO completion handling dm: call blk_queue_split() to impose device limits on bios dm cache metadata: verify cache has blocks in blocks_are_clean_separate_dirty() commit 14a996c383129525e55bab07e4857d08f6b61dda Merge: e6333d72cb37 078ab3ea2c3b Author: Linus Torvalds Date: Wed Dec 12 18:24:32 2018 -0800 Merge tag 'media/v4.20-5' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media fixes from Mauro Carvalho Chehab: - one regression at vsp1 driver - some last time changes for the upcoming request API logic and for stateless codec support. As the stateless codec "cedrus" driver is at staging, don't apply the MPEG controls as part of the main V4L2 API, as those may not be ready for production yet. * tag 'media/v4.20-5' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: media: Add a Kconfig option for the Request API media: extended-controls.rst: add note to the MPEG2 state controls media: mpeg2-ctrls.h: move MPEG2 state controls to non-public header media: vicodec: set state resolution from raw format media: vivid: drop v4l2_ctrl_request_complete() from start_streaming media: vb2: don't unbind/put the object when going to state QUEUED media: vb2: keep a reference to the request until dqbuf media: vb2: skip request checks for VIDIOC_PREPARE_BUF media: vb2: don't call __vb2_queue_cancel if vb2_start_streaming failed media: cedrus: Fix a NULL vs IS_ERR() check media: vsp1: Fix LIF buffer thresholds commit e6333d72cb373239400969f5d10204c094a9712a Merge: 70f4828201e3 ec7ba118b940 Author: Linus Torvalds Date: Wed Dec 12 18:19:44 2018 -0800 Merge tag 'ovl-fixes-4.20-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs Pull overlayfs fixes from Miklos Szeredi: "Needed to revert a patch, because it possibly introduces a security hole. Since the patch is basically a conceptual cleanup, not a bug fix, it's safe to revert. I'm not giving up on this, and discussions seemed to have reached an agreement over how to move forward, but that can wait 'till the next release. The other two patches are fixes for bugs introduced in recent releases" * tag 'ovl-fixes-4.20-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs: Revert "ovl: relax permission checking on underlying layers" ovl: fix decode of dir file handle with multi lower layers ovl: fix missing override creds in link of a metacopy upper commit 70f4828201e3bc9a5ac52d1f7ede06e56194268a Merge: b5884002dc39 2e64ff154ce6 Author: Linus Torvalds Date: Wed Dec 12 18:17:35 2018 -0800 Merge tag 'fuse-fixes-4.20-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse Pull fuse fixes from Miklos Szeredi: "There's one patch fixing a minor but long lived bug, the others are fixing regressions introduced in this cycle" * tag 'fuse-fixes-4.20-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse: fuse: continue to send FUSE_RELEASEDIR when FUSE_OPEN returns ENOSYS fuse: Fix memory leak in fuse_dev_free() fuse: fix revalidation of attributes for permission check fuse: fix fsync on directory fuse: Add bad inode check in fuse_destroy_inode() commit b5884002dc39fac45941ec408cd20d7a04f7b9c7 Merge: f5d582777bcb 2840f84f7403 Author: Linus Torvalds Date: Wed Dec 12 18:15:29 2018 -0800 Merge tag 'trace-v4.20-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing fixes from Steven Rostedt: "While running various ftrace tests on new development code, the kmemleak detector found some allocations that were not freed correctly. This fixes a couple of leaks in the event trigger code as well as in adding function trace filters in trace instances" * tag 'trace-v4.20-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: tracing: Fix memory leak of instance function hash filters tracing: Fix memory leak in set_trigger_filter() tracing: Fix memory leak in create_filter() commit 61cce6f6eeced5ddd9cac55e807fe28b4f18c1ba Author: Jens Axboe Date: Wed Dec 12 06:46:55 2018 -0700 scsi: sd: use mempool for discard special page When boxes are run near (or to) OOM, we have a problem with the discard page allocation in sd. 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. This means you get repeated spews of traces like this: [1201401.625972] Call Trace: [1201401.631748] dump_stack+0x4d/0x65 [1201401.639445] warn_alloc+0xec/0x190 [1201401.647335] __alloc_pages_slowpath+0xe84/0xf30 [1201401.657722] ? get_page_from_freelist+0x11b/0xb10 [1201401.668475] ? __alloc_pages_slowpath+0x2e/0xf30 [1201401.679054] __alloc_pages_nodemask+0x1f9/0x210 [1201401.689424] alloc_pages_current+0x8c/0x110 [1201401.699025] sd_setup_write_same16_cmnd+0x51/0x150 [1201401.709987] sd_init_command+0x49c/0xb70 [1201401.719029] scsi_setup_cmnd+0x9c/0x160 [1201401.727877] scsi_queue_rq+0x4d9/0x610 [1201401.736535] blk_mq_dispatch_rq_list+0x19a/0x360 [1201401.747113] blk_mq_sched_dispatch_requests+0xff/0x190 [1201401.758844] __blk_mq_run_hw_queue+0x95/0xa0 [1201401.768653] blk_mq_run_work_fn+0x2c/0x30 [1201401.777886] process_one_work+0x14b/0x400 [1201401.787119] worker_thread+0x4b/0x470 [1201401.795586] kthread+0x110/0x150 [1201401.803089] ? rescuer_thread+0x320/0x320 [1201401.812322] ? kthread_park+0x90/0x90 [1201401.820787] ? do_syscall_64+0x53/0x150 [1201401.829635] ret_from_fork+0x29/0x40 Ensure that the discard page allocation has a mempool backing, so we know we can make progress. Cc: stable@vger.kernel.org Signed-off-by: Jens Axboe Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen commit 9e6371d3c6913ff1707fb2c0274c9925f7aaef80 Author: Varun Prakash Date: Fri Nov 9 20:59:46 2018 +0530 scsi: target: iscsi: cxgbit: add missing spin_lock_init() Add missing spin_lock_init() for cdev->np_lock. Signed-off-by: Varun Prakash Signed-off-by: Martin K. Petersen commit ed076c55b359cc9982ca8b065bcc01675f7365f6 Author: Varun Prakash Date: Fri Nov 9 20:59:01 2018 +0530 scsi: target: iscsi: cxgbit: fix csk leak In case of arp failure call cxgbit_put_csk() to free csk. Signed-off-by: Varun Prakash Signed-off-by: Martin K. Petersen commit 9463b9a4e0e480a70d366c0cbbfd0c814fd35d90 Merge: 5146f95df782 9061193c4ee0 Author: David S. Miller Date: Wed Dec 12 16:25:14 2018 -0800 Merge branch 'bnx2x-Fix-series' Sudarsana Reddy Kalluru says: ==================== bnx2x: Fix series The patch series addresses few important issues in the bnx2x driver. Please consider applying it 'net' tree. ==================== Signed-off-by: David S. Miller commit 9061193c4ee065d3240fde06767c2e06ec61decc Author: Sudarsana Reddy Kalluru Date: Wed Dec 12 08:57:03 2018 -0800 bnx2x: Send update-svid ramrod with retry/poll flags enabled Driver sends update-SVID ramrod in the MFW notification path. If there is a pending ramrod, driver doesn't retry the command and storm firmware will never be updated with the SVID value. The patch adds changes to send update-svid ramrod in process context with retry/poll flags set. Signed-off-by: Sudarsana Reddy Kalluru Signed-off-by: Ariel Elior Signed-off-by: David S. Miller commit 07f12622a66320d5f56a71a921cf70a43e7a6b87 Author: Sudarsana Reddy Kalluru Date: Wed Dec 12 08:57:02 2018 -0800 bnx2x: Enable PTP only on the PF that initializes the port There will be only one PHC clock per port. PTP should be enabled only on one PF per port. The change enables PTP functionality on the PF that initializes the port. The change is useful in multi-function modes e.g., NPAR where a port can have more than one PF. Signed-off-by: Sudarsana Reddy Kalluru Signed-off-by: Ariel Elior Signed-off-by: David S. Miller commit 04f05230c5c13b1384f66f5186a68d7499e34622 Author: Sudarsana Reddy Kalluru Date: Wed Dec 12 08:57:01 2018 -0800 bnx2x: Remove configured vlans as part of unload sequence. Vlans are not getting removed when drivers are unloaded. The recent storm firmware versions had added safeguards against re-configuring an already configured vlan. As a result, PF inner reload flows (e.g., mtu change) might trigger an assertion. This change is going to remove vlans (same as we do for MACs) when doing a chip cleanup during unload. Signed-off-by: Sudarsana Reddy Kalluru Signed-off-by: Ariel Elior Signed-off-by: David S. Miller commit bbf666c1af916ed74795493c564df6fad462cc80 Author: Sudarsana Reddy Kalluru Date: Wed Dec 12 08:57:00 2018 -0800 bnx2x: Clear fip MAC when fcoe offload support is disabled On some customer setups it was observed that shmem contains a non-zero fip MAC for 57711 which would lead to enabling of SW FCoE. Add a software workaround to clear the bad fip mac address if no FCoE connections are supported. Signed-off-by: Sudarsana Reddy Kalluru Signed-off-by: Ariel Elior Signed-off-by: David S. Miller commit d4e7df16567b80836a78d31b42f1a9355a636d67 Author: Taehee Yoo Date: Sat Dec 8 11:03:01 2018 +0900 netfilter: nf_conncount: use rb_link_node_rcu() instead of rb_link_node() rbnode in insert_tree() is rcu protected pointer. So, in order to handle this pointer, _rcu function should be used. rb_link_node_rcu() is a rcu version of rb_link_node(). Fixes: 34848d5c896e ("netfilter: nf_conncount: Split insert and traversal") Signed-off-by: Taehee Yoo Signed-off-by: Pablo Neira Ayuso commit 542fbda0f08f1cbbc250f9e59f7537649651d0c8 Author: Florian Westphal Date: Tue Dec 11 07:45:29 2018 +0100 netfilter: nat: can't use dst_hold on noref dst The dst entry might already have a zero refcount, waiting on rcu list to be free'd. Using dst_hold() transitions its reference count to 1, and next dst release will try to free it again -- resulting in a double free: WARNING: CPU: 1 PID: 0 at include/net/dst.h:239 nf_xfrm_me_harder+0xe7/0x130 [nf_nat] RIP: 0010:nf_xfrm_me_harder+0xe7/0x130 [nf_nat] Code: 48 8b 5c 24 60 65 48 33 1c 25 28 00 00 00 75 53 48 83 c4 68 5b 5d 41 5c c3 85 c0 74 0d 8d 48 01 f0 0f b1 0a 74 86 85 c0 75 f3 <0f> 0b e9 7b ff ff ff 29 c6 31 d2 b9 20 00 48 00 4c 89 e7 e8 31 27 Call Trace: nf_nat_ipv4_out+0x78/0x90 [nf_nat_ipv4] nf_hook_slow+0x36/0xd0 ip_output+0x9f/0xd0 ip_forward+0x328/0x440 ip_rcv+0x8a/0xb0 Use dst_hold_safe instead and bail out if we cannot take a reference. Fixes: a4c2fd7f7891 ("net: remove DST_NOCACHE flag") Reported-by: Martin Zaharinov Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 708abf74dd87f8640871b814faa195fb5970b0e3 Author: Pan Bian Date: Mon Dec 10 14:39:37 2018 +0100 netfilter: ipset: do not call ipset_nest_end after nla_nest_cancel In the error handling block, nla_nest_cancel(skb, atd) is called to cancel the nest operation. But then, ipset_nest_end(skb, atd) is unexpected called to end the nest operation. This patch calls the ipset_nest_end only on the branch that nla_nest_cancel is not called. Fixes: 45040978c899 ("netfilter: ipset: Fix set:list type crash when flush/dump set in parallel") Signed-off-by: Pan Bian Signed-off-by: Jozsef Kadlecsik Signed-off-by: Pablo Neira Ayuso commit a805ce683f4cd7609730ee169dca38644b70e3fa Merge: 28adac6f74ef a0071bc455da Author: Dave Airlie Date: Thu Dec 13 09:55:05 2018 +1000 Merge branch 'mediatek-drm-fixes-4.20' of https://github.com/ckhu-mediatek/linux.git-tags into drm-fixes Single bridge attachment fix. Signed-off-by: Dave Airlie From: CK Hu Link: https://patchwork.freedesktop.org/patch/msgid/1544407975.18825.3.camel@mtksdaap41 commit 96d1a731611f711f0cb82cea93363ae2ea8cb028 Author: Ross Lagerwall Date: Wed Dec 5 13:54:26 2018 +0000 ixgbe: Fix race when the VF driver does a reset When the VF driver does a reset, it (at least the Linux one) writes to the VFCTRL register to issue a reset and then immediately sends a reset message using the mailbox API. This is racy because when the PF driver detects that the VFCTRL register reset pin has been asserted, it clears the mailbox memory. Depending on ordering, the reset message sent by the VF could be cleared by the PF driver. It then responds to the cleared message with a NACK which causes the VF driver to malfunction. Fix this by deferring clearing the mailbox memory until the reset message is received. Fixes: 939b701ad633 ("ixgbe: fix driver behaviour after issuing VFLR") Signed-off-by: Ross Lagerwall Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 800b8f637d07cc00a05e2e0d847d8d7c61745654 Author: Michał Mirosław Date: Tue Dec 4 18:31:15 2018 +0100 i40e: DRY rx_ptype handling code Move rx_ptype extracting to i40e_process_skb_fields() to avoid duplicating the code. Signed-off-by: Michał Mirosław Signed-off-by: Michał Mirosław Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 5146f95df782b0ac61abde36567e718692725c89 Author: Hui Peng Date: Wed Dec 12 12:42:24 2018 +0100 USB: hso: Fix OOB memory access in hso_probe/hso_get_config_data The function hso_probe reads if_num from the USB device (as an u8) and uses it without a length check to index an array, resulting in an OOB memory read in hso_probe or hso_get_config_data. Add a length check for both locations and updated hso_probe to bail on error. This issue has been assigned CVE-2018-19985. Reported-by: Hui Peng Reported-by: Mathias Payer Signed-off-by: Hui Peng Signed-off-by: Mathias Payer Reviewed-by: Sebastian Andrzej Siewior Signed-off-by: Greg Kroah-Hartman Signed-off-by: David S. Miller commit 2a508c64ad278d022543ec3360449c7f243eb56b Author: Michał Mirosław Date: Tue Dec 4 18:31:14 2018 +0100 i40e: fix VLAN.TCI == 0 RX HW offload This fixes two bugs in hardware VLAN offload: 1. VLAN.TCI == 0 was being dropped 2. there was a race between disabling of VLAN RX feature in hardware and processing RX queue, where packets processed in this window could have their VLAN information dropped Fix moves the VLAN handling into i40e_process_skb_fields() to save on duplicated code. i40e_receive_skb() becomes trivial and so is removed. Signed-off-by: Michał Mirosław Signed-off-by: Michał Mirosław Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 28adac6f74ef2b3dc0bd10df9fccb2e3d3e52acc Author: Daniel Vetter Date: Mon Dec 10 11:30:01 2018 +0100 MAINTAINERS: Daniel for drm co-maintainer lkml and Linus gained a CoC, and it's serious this time. Which means my no 1 reason for declining to officially step up as drm maintainer is gone, and I didn't find any new good excuse. I chatted with a few people in private already, and the biggest concern is that I mislay my community hat and start running around with my intel hat only. Or some other convenient abuse of trust. That's why this patch doesn't just need a lot of acks that mean "yeah seems fine to me", but a lot of acks that mean "yeah we'll tell you when you're over the line and usurp you from that comfy chair if you don't get it". Which I think we've been done a fairly good job here at dri-devel in general, but better to be clear. Rough idea is that I'll do this for maybe 2-3 years, helping Dave figure out a group model for drm overall. And getting the tooling and infrastructure for that off the ground. Then step down again because some other shiny thing that needs chasing. Of course as plans tend to do, this one will probably pan out a bit different in reality. Cc: David Airlie Cc: Linus Torvalds Signed-off-by: Daniel Vetter Acked-by: Christian König Acked-by: Rodrigo Vivi Acked-by: Alex Deucher Acked-by: Eric Anholt Acked-by: Gerd Hoffmann Acked-by: Daniel Stone Signed-off-by: Daniel Vetter Acked-by: Neil Armstrong Acked-by: Thierry Reding Acked-by: Thomas Hellstrom Acked-by: Sean Paul Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20181210103001.30549-1-daniel.vetter@ffwll.ch commit b5f436e7b4c2fcdb96204dbba346bddc7fc3e850 Merge: 26eacb788b7e 24199c5436f2 Author: Dave Airlie Date: Thu Dec 13 09:32:41 2018 +1000 Merge branch 'linux-4.20' of git://github.com/skeggsb/linux into drm-fixes Three fixes: tegra regression fix display flushing fix mst cleanup fix. Signed-off-by: Dave Airlie From: Ben Skeggs Link: https://patchwork.freedesktop.org/patch/msgid/CACAvsv7WCPzjQZonk+eS1FgEUKirz-4LOrVpMUVMM=D-GjbVpg@mail.gmail.com commit 26eacb788b7e37f9b08e6e6fc9686bf0817c0163 Merge: e59166b59aad 676fff1a5512 Author: Dave Airlie Date: Thu Dec 13 09:24:18 2018 +1000 Merge branch 'drm-fixes-4.20' of git://people.freedesktop.org/~agd5f/linux into drm-fixes Fixes for 4.20: - Stability fixes for new polaris variants (e.g., RX590) - New vega pci ids - Vega20 smu fix - Ctx locking fix Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20181212203022.3054-1-alexander.deucher@amd.com commit 158daed16efb1170694e420ae06ba8ba954d82e5 Author: Stefan Assmann Date: Tue Dec 4 15:18:52 2018 +0100 i40e: fix mac filter delete when setting mac address A previous commit moved the ether_addr_copy() in i40e_set_mac() before the mac filter del/add to avoid a race. However it wasn't taken into account that this alters the mac address being handed to i40e_del_mac_filter(). Also changed i40e_add_mac_filter() to operate on netdev->dev_addr, hopefully that makes the code easier to read. Fixes: 458867b2ca0c ("i40e: don't remove netdev->dev_addr when syncing uc list") Signed-off-by: Stefan Assmann Tested-by: Andrew Bowers Acked-by: Jacob Keller Signed-off-by: Jeff Kirsher commit e59166b59aad95d313cfc4cfe32240f1608b33d4 Merge: ce07fe9e1cec 63238173b2fa Author: Dave Airlie Date: Thu Dec 13 07:25:00 2018 +1000 Merge tag 'drm-misc-fixes-2018-12-12' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes - rockchip: Revert change causing WARN on shutdown (Brian) Cc: Brian Norris Signed-off-by: Dave Airlie From: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20181212204309.GA150523@art_vandelay commit ce07fe9e1cec520d343e31f1bf61949fe1b4411e Merge: 71fb55397455 5b2e31201c26 Author: Dave Airlie Date: Thu Dec 13 07:22:47 2018 +1000 Merge tag 'drm-intel-fixes-2018-12-12-1' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes - Two fixes to avoid GPU hangs (on Braswell and Gen3) Signed-off-by: Dave Airlie From: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20181212134010.GA18900@jlahtine-desk.ger.corp.intel.com commit 71fb553974556e29ebf6fa3cf6bd73342e7dbc5d Merge: 40e020c129cf d76b21ebf8ff Author: Dave Airlie Date: Thu Dec 13 07:21:29 2018 +1000 Merge tag 'drm-intel-fixes-2018-12-07' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes - Fix for system crash after GPU hang (Bugzilla #107945) - GVT fix for guest graphics corruption (https://github.com/intel/gvt-linux/issues/61) Signed-off-by: Dave Airlie From: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20181207104352.GA18214@jlahtine-desk.ger.corp.intel.com commit 676fff1a5512e7971aa9a235052d253df8f5284a Author: Evan Quan Date: Wed Dec 12 14:56:14 2018 +0800 drm/amdgpu: drop fclk/gfxclk ratio setting Since this is not needed any more on the latest SMC firmware. Signed-off-by: Evan Quan Acked-by: Feifei Xu Signed-off-by: Alex Deucher commit 37fbd834b4e492dc41743830cbe435f35120abd8 Author: Mark Zhang Date: Wed Dec 5 15:50:49 2018 +0200 IB/core: Fix oops in netdev_next_upper_dev_rcu() When support for bonding of RoCE devices was added, there was necessarily a link between the RoCE device and the paired netdevice that was part of the bond. If you remove the mlx4_en module, that paired association is broken (the RoCE device is still present but the paired netdevice has been released). We need to account for this in is_upper_ndev_bond_master_filter() and filter out those links with a broken pairing or else we later oops in netdev_next_upper_dev_rcu(). Fixes: 408f1242d940 ("IB/core: Delete lower netdevice default GID entries in bonding scenario") Signed-off-by: Mark Zhang Reviewed-by: Parav Pandit Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford commit cc6730df08a291e51e145bc65e24ffb5e2f17ab6 Author: Jörgen Storvist Date: Wed Dec 12 08:39:39 2018 +0100 USB: serial: option: add Simcom SIM7500/SIM7600 (MBIM mode) Added USB serial option driver support for Simcom SIM7500/SIM7600 series cellular modules exposing MBIM interface (VID 0x1e0e,PID 0x9003) T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 14 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=1e0e ProdID=9003 Rev=03.18 S: Manufacturer=SimTech, Incorporated S: Product=SimTech, Incorporated S: SerialNumber=0123456789ABCDEF 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= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option I: If#= 5 Alt= 0 #EPs= 1 Cls=02(commc) Sub=0e Prot=00 Driver=cdc_mbim I: If#= 6 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim Signed-off-by: Jörgen Storvist Cc: stable Signed-off-by: Johan Hovold commit 70a7444c550a75584ffcfae95267058817eff6a7 Author: Jörgen Storvist Date: Tue Dec 11 18:28:28 2018 +0100 USB: serial: option: add GosunCn ZTE WeLink ME3630 Added USB serial option driver support for GosunCn ZTE WeLink ME3630 series cellular modules for USB modes ECM/NCM and MBIM. usb-devices output MBIM mode: T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 10 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=19d2 ProdID=0602 Rev=03.18 S: Manufacturer=Android S: Product=Android S: SerialNumber= C: #Ifs= 5 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= 1 Cls=02(commc) Sub=0e Prot=00 Driver=cdc_mbim I: If#= 4 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim usb-devices output ECM/NCM mode: T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 11 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=19d2 ProdID=1476 Rev=03.18 S: Manufacturer=Android S: Product=Android S: SerialNumber= C: #Ifs= 5 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= 1 Cls=02(commc) Sub=06 Prot=00 Driver=cdc_ether I: If#= 4 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=cdc_ether Signed-off-by: Jörgen Storvist Cc: stable Signed-off-by: Johan Hovold commit 2af6c0703d75fc3ff2e6de19b4b3adab96acc12d Author: Mike Snitzer Date: Wed Dec 12 09:39:54 2018 -0500 dm thin: bump target version Decoupled version bump from commit f6c367585d0 ("dm thin: send event about thin-pool state change _after_ making it") because version bumps just create conflicts when backporting to the stable trees. Signed-off-by: Mike Snitzer commit e06d45d8c165a0b1a7aaa1b794c78d2db911c8f6 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: Thomas Hellstrom Signed-off-by: Thomas Hellstrom commit 5b2e31201c268c2331a209af799d667619216d40 Author: Chris Wilson Date: Fri Dec 7 13:40:37 2018 +0000 drm/i915: Flush GPU relocs harder for gen3 Adding an extra MI_STORE_DWORD_IMM to the gpu relocation path for gen3 was good, but still not good enough. To survive 24+ hours under test we needed to perform not one, not two but three extra store-dw. Doing so for each GPU relocation was a little unsightly and since we need to worry about userspace hitting the same issues, we should apply the dummy store-dw into the EMIT_FLUSH. Fixes: 7dd4f6729f92 ("drm/i915: Async GPU relocation processing") References: 7fa28e146994 ("drm/i915: Write GPU relocs harder with gen3") 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/20181207134037.11848-1-chris@chris-wilson.co.uk (cherry picked from commit a889580c087a9cf91fddb3832ece284174214183) Signed-off-by: Joonas Lahtinen commit fe78742d7f84e3803b760cdbb1ddbdedfca9640b 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+ (cherry picked from commit 5179749925933575a67f9d8f16d0cc204f98a29f) [Joonas: Use new function in gen9_init_indirectctx_bb too] Signed-off-by: Joonas Lahtinen commit cf66b8a0ba142fbd1bf10ac8f3ae92d1b0cb7b8f Author: Chris Wilson Date: Thu Dec 6 08:44:31 2018 +0000 drm/i915/execlists: Apply a full mb before execution for Braswell Braswell is really picky about having our writes posted to memory before we execute or else the GPU may see stale values. A wmb() is insufficient as it only ensures the writes are visible to other cores, we need a full mb() to ensure the writes are in memory and visible to the GPU. The most frequent failure in flushing before execution is that we see stale PTE values and execute the wrong pages. References: 987abd5c62f9 ("drm/i915/execlists: Force write serialisation into context image vs execution") Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Tvrtko Ursulin Cc: Joonas Lahtinen Cc: stable@vger.kernel.org Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20181206084431.9805-3-chris@chris-wilson.co.uk (cherry picked from commit 490b8c65b9db45896769e1095e78725775f47b3e) Signed-off-by: Joonas Lahtinen commit 24199c5436f267399afed0c4f1f57663c0408f57 Author: Lyude Paul Date: Tue Dec 11 18:56:20 2018 -0500 drm/nouveau/kms: Fix memory leak in nv50_mstm_del() Noticed this while working on redoing the reference counting scheme in the DP MST helpers. Nouveau doesn't attempt to call drm_dp_mst_topology_mgr_destroy() at all, which leaves it leaking all of the resources for drm_dp_mst_topology_mgr and it's children mstbs+ports. Fixes: f479c0ba4a17 ("drm/nouveau/kms/nv50: initial support for DP 1.2 multi-stream") Signed-off-by: Lyude Paul Cc: # v4.10+ Signed-off-by: Ben Skeggs commit 970a5ee41c72df46e3b0f307528c7d8ef7734a2e Author: Ben Skeggs Date: Wed Dec 12 16:51:17 2018 +1000 drm/nouveau/kms/nv50-: also flush fb writes when rewinding push buffer Should hopefully fix a regression some people have been seeing since EVO push buffers were moved to VRAM by default on Pascal GPUs. Fixes: d00ddd9da ("drm/nouveau/kms/nv50-: allocate push buffers in vidmem on pascal") Signed-off-by: Ben Skeggs Cc: # 4.19+ commit ee28b30cbbe0b490f52ba222c9d392b99581545e Author: Heiner Kallweit Date: Sun Dec 9 22:05:11 2018 +0100 r8169: fix crash if CONFIG_DEBUG_SHIRQ is enabled If CONFIG_DEBUG_SHIRQ is enabled __free_irq() intentionally fires a spurious interrupt. This interrupt causes a crash because tp->dev->phydev is NULL at that time. Fixes: 38caff5a445b ("r8169: handle all interrupt events in the hard irq handler") Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit fdadd04931c2d7cd294dc5b2b342863f94be53a3 Author: Daniel Borkmann Date: Tue Dec 11 12:14:12 2018 +0100 bpf: fix bpf_jit_limit knob for PAGE_SIZE >= 64K Michael and Sandipan report: Commit ede95a63b5 introduced a bpf_jit_limit tuneable to limit BPF JIT allocations. At compile time it defaults to PAGE_SIZE * 40000, and is adjusted again at init time if MODULES_VADDR is defined. For ppc64 kernels, MODULES_VADDR isn't defined, so we're stuck with the compile-time default at boot-time, which is 0x9c400000 when using 64K page size. This overflows the signed 32-bit bpf_jit_limit value: root@ubuntu:/tmp# cat /proc/sys/net/core/bpf_jit_limit -1673527296 and can cause various unexpected failures throughout the network stack. In one case `strace dhclient eth0` reported: setsockopt(5, SOL_SOCKET, SO_ATTACH_FILTER, {len=11, filter=0x105dd27f8}, 16) = -1 ENOTSUPP (Unknown error 524) and similar failures can be seen with tools like tcpdump. This doesn't always reproduce however, and I'm not sure why. The more consistent failure I've seen is an Ubuntu 18.04 KVM guest booted on a POWER9 host would time out on systemd/netplan configuring a virtio-net NIC with no noticeable errors in the logs. Given this and also given that in near future some architectures like arm64 will have a custom area for BPF JIT image allocations we should get rid of the BPF_JIT_LIMIT_DEFAULT fallback / default entirely. For 4.21, we have an overridable bpf_jit_alloc_exec(), bpf_jit_free_exec() so therefore add another overridable bpf_jit_alloc_exec_limit() helper function which returns the possible size of the memory area for deriving the default heuristic in bpf_jit_charge_init(). Like bpf_jit_alloc_exec() and bpf_jit_free_exec(), the new bpf_jit_alloc_exec_limit() assumes that module_alloc() is the default JIT memory provider, and therefore in case archs implement their custom module_alloc() we use MODULES_{END,_VADDR} for limits and otherwise for vmalloc_exec() cases like on ppc64 we use VMALLOC_{END,_START}. Additionally, for archs supporting large page sizes, we should change the sysctl to be handled as long to not run into sysctl restrictions in future. Fixes: ede95a63b5e8 ("bpf: add bpf_jit_limit knob to restrict unpriv allocations") Reported-by: Sandipan Das Reported-by: Michael Roth Signed-off-by: Daniel Borkmann Tested-by: Michael Roth Signed-off-by: Alexei Starovoitov commit 51c3fbd89d7554caa3290837604309f8d8669d99 Author: Dan Williams Date: Tue Dec 11 07:49:39 2018 -0800 x86/mm: Fix decoy address handling vs 32-bit builds A decoy address is used by set_mce_nospec() to update the cache attributes for a page that may contain poison (multi-bit ECC error) while attempting to minimize the possibility of triggering a speculative access to that page. When reserve_memtype() is handling a decoy address it needs to convert it to its real physical alias. The conversion, AND'ing with __PHYSICAL_MASK, is broken for a 32-bit physical mask and reserve_memtype() is passed the last physical page. Gert reports triggering the: BUG_ON(start >= end); ...assertion when running a 32-bit non-PAE build on a platform that has a driver resource at the top of physical memory: BIOS-e820: [mem 0x00000000fff00000-0x00000000ffffffff] reserved Given that the decoy address scheme is only targeted at 64-bit builds and assumes that the top of physical address space is free for use as a decoy address range, simply bypass address sanitization in the 32-bit case. Lastly, there was no need to crash the system when this failure occurred, and no need to crash future systems if the assumptions of decoy addresses are ever violated. Change the BUG_ON() to a WARN() with an error return. Fixes: 510ee090abc3 ("x86/mm/pat: Prepare {reserve, free}_memtype() for...") Reported-by: Gert Robben Signed-off-by: Dan Williams Signed-off-by: Thomas Gleixner Tested-by: Gert Robben Cc: stable@vger.kernel.org Cc: Andy Shevchenko Cc: Dave Hansen Cc: Andy Lutomirski Cc: Peter Zijlstra Cc: Borislav Petkov Cc: "H. Peter Anvin" Cc: platform-driver-x86@vger.kernel.org Cc: Link: https://lkml.kernel.org/r/154454337985.789277.12133288391664677775.stgit@dwillia2-desk3.amr.corp.intel.com commit 2bd61abead58c82714a1f6fa6beb0fd0df6a6d13 Author: Kees Cook Date: Thu Dec 6 15:50:38 2018 -0800 selftests/seccomp: Remove SIGSTOP si_pid check Commit f149b3155744 ("signal: Never allocate siginfo for SIGKILL or SIGSTOP") means that the seccomp selftest cannot check si_pid under SIGSTOP anymore. Since it's believed[1] there are no other userspace things depending on the old behavior, this removes the behavioral check in the selftest, since it's more a "extra" sanity check (which turns out, maybe, not to have been useful to test). [1] https://lkml.kernel.org/r/CAGXu5jJaZAOzP1qFz66tYrtbuywqb+UN2SOA1VLHpCCOiYvYeg@mail.gmail.com Reported-by: Tycho Andersen Suggested-by: Eric W. Biederman Signed-off-by: Kees Cook Signed-off-by: Shuah Khan commit 927b6b2d69b4cc900fa50d7e46d8f1fa91c91b3a Author: Shin'ichiro Kawasaki Date: Tue Dec 11 21:08:26 2018 +0900 block: Fix null_blk_zoned creation failure with small number of zones null_blk_zoned creation fails if the number of zones specified is equal to or is smaller than 64 due to a memory allocation failure in blk_alloc_zones(). With such a small number of zones, the required memory size for all zones descriptors fits in a single page, and the page order for alloc_pages_node() is zero. Allow this value in blk_alloc_zones() for the allocation to succeed. Fixes: bf5054569653 "block: Introduce blk_revalidate_disk_zones()" Reviewed-by: Damien Le Moal Signed-off-by: Shin'ichiro Kawasaki Signed-off-by: Jens Axboe commit 80b71c340f17705ec145911b9a193ea781811b16 Author: Reinette Chatre Date: Mon Dec 10 13:21:54 2018 -0800 x86/intel_rdt: Ensure a CPU remains online for the region's pseudo-locking sequence The user triggers the creation of a pseudo-locked region when writing the requested schemata to the schemata resctrl file. The pseudo-locking of a region is required to be done on a CPU that is associated with the cache on which the pseudo-locked region will reside. In order to run the locking code on a specific CPU, the needed CPU has to be selected and ensured to remain online during the entire locking sequence. At this time, the cpu_hotplug_lock is not taken during the pseudo-lock region creation and it is thus possible for a CPU to be selected to run the pseudo-locking code and then that CPU to go offline before the thread is able to run on it. Fix this by ensuring that the cpu_hotplug_lock is taken while the CPU on which code has to run needs to be controlled. Since the cpu_hotplug_lock is always taken before rdtgroup_mutex the lock order is maintained. Fixes: e0bdfe8e36f3 ("x86/intel_rdt: Support creation/removal of pseudo-locked region") 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: gavin.hindman@intel.com Cc: jithu.joseph@intel.com Cc: stable Cc: x86-ml Link: https://lkml.kernel.org/r/b7b17432a80f95a1fa21a1698ba643014f58ad31.1544476425.git.reinette.chatre@intel.com commit 2e64ff154ce6ce9a8dc0f9556463916efa6ff460 Author: Chad Austin Date: Mon Dec 10 10:54:52 2018 -0800 fuse: continue to send FUSE_RELEASEDIR when FUSE_OPEN returns ENOSYS When FUSE_OPEN returns ENOSYS, the no_open bit is set on the connection. Because the FUSE_RELEASE and FUSE_RELEASEDIR paths share code, this incorrectly caused the FUSE_RELEASEDIR request to be dropped and never sent to userspace. Pass an isdir bool to distinguish between FUSE_RELEASE and FUSE_RELEASEDIR inside of fuse_file_put. Fixes: 7678ac50615d ("fuse: support clients that don't implement 'open'") Cc: # v3.14 Signed-off-by: Chad Austin Signed-off-by: Miklos Szeredi commit 32774a8153b4c62e408297fba352248afb2e0143 Author: Arnd Bergmann Date: Mon Dec 10 21:53:45 2018 +0100 i2c: nvidia-gpu: mark resume function as __maybe_unused When CONFIG_PM is disabled, this is needed to avoid a harmless unused-function warning: drivers/i2c/busses/i2c-nvidia-gpu.c:345:12: error: 'gpu_i2c_resume' defined but not used [-Werror=unused-function] Fixes: c71bcdcb42a7 ("i2c: add i2c bus driver for NVIDIA GPU") Signed-off-by: Arnd Bergmann Reviewed-by: Andy Shevchenko Signed-off-by: Wolfram Sang commit a4f98be7dc31ba2a5046e3fe509dab399ecc191f Author: Adamski, Krzysztof (Nokia - PL/Wroclaw) Date: Tue Dec 11 09:17:52 2018 +0000 MAINTAINERS: add entry for i2c-axxia driver Create separate entry for i2c-axxia and set myself as maintainer. Even though I don't work for Intel/LSI who is the manufacturer of this IP, I do have access to some documentation and the actual hardware using this driver and I'm familiar with the code. Signed-off-by: Krzysztof Adamski Reviewed-by: Alexander Sverdlin Signed-off-by: Wolfram Sang commit f6c367585d0d851349d3a9e607c43e5bea993fa1 Author: Mike Snitzer Date: Tue Dec 11 13:31:40 2018 -0500 dm thin: send event about thin-pool state change _after_ making it Sending a DM event before a thin-pool state change is about to happen is a bug. It wasn't realized until it became clear that userspace response to the event raced with the actual state change that the event was meant to notify about. Fix this by first updating internal thin-pool state to reflect what the DM event is being issued about. This fixes a long-standing racey/buggy userspace device-mapper-test-suite 'resize_io' test that would get an event but not find the state it was looking for -- so it would just go on to hang because no other events caused the test to reevaluate the thin-pool's state. Cc: stable@vger.kernel.org Signed-off-by: Mike Snitzer commit 0afa99648350dbd6d08ee3efd2376db240a6c458 Author: Jeff Moyer Date: Tue Dec 11 12:37:49 2018 -0500 aio: fix spectre gadget in lookup_ioctx Matthew pointed out that the ioctx_table is susceptible to spectre v1, because the index can be controlled by an attacker. The below patch should mitigate the attack for all of the aio system calls. Reported-by: Matthew Wilcox Signed-off-by: Jeff Moyer Signed-off-by: Al Viro commit 2f1a9f666751bdcf20de7c120b20c5d156b87cf7 Merge: 290974d43478 8e41cae64b08 Author: David S. Miller Date: Tue Dec 11 11:04:22 2018 -0800 Merge branch 'ieee802154-for-davem-2018-12-11' of git://git.kernel.org/pub/scm/linux/kernel/git/sschmidt/wpan Stefan Schmidt says: ==================== pull-request: ieee802154 for net 2018-12-11 An update from ieee802154 for your *net* tree. Just two more fixes for ieee802154 dribver before the final 4.20 release. Alexander Aring fixes a problem in the nested parsing code of the hwsim driver interface. A fix for a potential overflow in the ca8210 driver by Yue Habing. ==================== Signed-off-by: David S. Miller commit 2840f84f74035e5a535959d5f17269c69fa6edc5 Author: Steven Rostedt (VMware) Date: Mon Dec 10 23:58:01 2018 -0500 tracing: Fix memory leak of instance function hash filters The following commands will cause a memory leak: # cd /sys/kernel/tracing # mkdir instances/foo # echo schedule > instance/foo/set_ftrace_filter # rmdir instances/foo The reason is that the hashes that hold the filters to set_ftrace_filter and set_ftrace_notrace are not freed if they contain any data on the instance and the instance is removed. Found by kmemleak detector. Cc: stable@vger.kernel.org Fixes: 591dffdade9f ("ftrace: Allow for function tracing instance to filter functions") Signed-off-by: Steven Rostedt (VMware) commit 3cec638b3d793b7cacdec5b8072364b41caeb0e1 Author: Steven Rostedt (VMware) Date: Sun Dec 9 21:17:30 2018 -0500 tracing: Fix memory leak in set_trigger_filter() When create_event_filter() fails in set_trigger_filter(), the filter may still be allocated and needs to be freed. The caller expects the data->filter to be updated with the new filter, even if the new filter failed (we could add an error message by setting set_str parameter of create_event_filter(), but that's another update). But because the error would just exit, filter was left hanging and nothing could free it. Found by kmemleak detector. Cc: stable@vger.kernel.org Fixes: bac5fb97a173a ("tracing: Add and use generic set_trigger_filter() implementation") Reviewed-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) commit b61c19209c2c35ea2a2fe502d484703686eba98c Author: Steven Rostedt (VMware) Date: Sat Dec 8 21:10:04 2018 -0500 tracing: Fix memory leak in create_filter() The create_filter() calls create_filter_start() which allocates a "parse_error" descriptor, but fails to call create_filter_finish() that frees it. The op_stack and inverts in predicate_parse() were also not freed. Found by kmemleak detector. Cc: stable@vger.kernel.org Fixes: 80765597bc587 ("tracing: Rewrite filter logic to be simpler and faster") Reviewed-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) commit a538e3ff9dabcdf6c3f477a373c629213d1c3066 Author: Jeff Moyer Date: Tue Dec 11 12:37:49 2018 -0500 aio: fix spectre gadget in lookup_ioctx Matthew pointed out that the ioctx_table is susceptible to spectre v1, because the index can be controlled by an attacker. The below patch should mitigate the attack for all of the aio system calls. Cc: stable@vger.kernel.org Reported-by: Matthew Wilcox Reported-by: Dan Carpenter Signed-off-by: Jeff Moyer Signed-off-by: Jens Axboe commit cb4f131e1f2ca5dd7e2f905e4cb9fb4c5c9dcffd Author: Sasha Levin Date: Tue Dec 11 12:09:49 2018 -0500 MAINTAINERS: Patch monkey for the Hyper-V code Now the Hyper-V code has it's own monkey on a tree! Make it easier to manage patch flow to upper level maintainers. Acked-by: Haiyang Zhang Acked-by: K. Y. Srinivasan Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman commit 6f9718fe41c3a47e4362bddf145e2db6ad7d8e87 Author: Luis Henriques Date: Mon Dec 10 10:23:12 2018 +0000 ceph: make 'nocopyfrom' a default mount option Since we found a problem with the 'copy-from' operation after objects have been truncated, offloading object copies to OSDs should be discouraged until the issue is fixed. Thus, this patch adds the 'nocopyfrom' mount option to the default mount options which effectily means that remote copies won't be done in copy_file_range unless they are explicitly enabled at mount time. [ Adjust ceph_show_options() accordingly. ] Link: https://tracker.ceph.com/issues/37378 Signed-off-by: Luis Henriques Reviewed-by: Ilya Dryomov Signed-off-by: Ilya Dryomov commit c554206077428af56cc2e0314b86b41cd030458c Author: Andrey Grodzovsky Date: Thu Dec 6 15:51:37 2018 -0500 drm/amdgpu: Fix DEBUG_LOCKS_WARN_ON(depth <= 0) in amdgpu_ctx.lock If CS is submitted using guilty ctx, we terminate amdgpu_cs_parser_init before locking ctx->lock, latter in amdgpu_cs_parser_fini we still are trying to release the lock just becase parser->ctx != NULL. Signed-off-by: Andrey Grodzovsky Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 63238173b2faf3d6b85a416f1c69af6c7be2413f Author: Brian Norris Date: Wed Dec 5 10:16:57 2018 -0800 Revert "drm/rockchip: Allow driver to be shutdown on reboot/kexec" This reverts commit 7f3ef5dedb146e3d5063b6845781ad1bb59b92b5. It causes new warnings [1] on shutdown when running the Google Kevin or Scarlet (RK3399) boards under Chrome OS. Presumably our usage of DRM is different than what Marc and Heiko test. We're looking at a different approach (e.g., [2]) to replace this, but IMO the revert should be taken first, as it already propagated to -stable. [1] Report here: http://lkml.kernel.org/lkml/20181205030127.GA200921@google.com WARNING: CPU: 4 PID: 2035 at drivers/gpu/drm/drm_mode_config.c:477 drm_mode_config_cleanup+0x1c4/0x294 ... Call trace: drm_mode_config_cleanup+0x1c4/0x294 rockchip_drm_unbind+0x4c/0x8c component_master_del+0x88/0xb8 rockchip_drm_platform_remove+0x2c/0x44 rockchip_drm_platform_shutdown+0x20/0x2c platform_drv_shutdown+0x2c/0x38 device_shutdown+0x164/0x1b8 kernel_restart_prepare+0x40/0x48 kernel_restart+0x20/0x68 ... Memory manager not clean during takedown. WARNING: CPU: 4 PID: 2035 at drivers/gpu/drm/drm_mm.c:950 drm_mm_takedown+0x34/0x44 ... drm_mm_takedown+0x34/0x44 rockchip_drm_unbind+0x64/0x8c component_master_del+0x88/0xb8 rockchip_drm_platform_remove+0x2c/0x44 rockchip_drm_platform_shutdown+0x20/0x2c platform_drv_shutdown+0x2c/0x38 device_shutdown+0x164/0x1b8 kernel_restart_prepare+0x40/0x48 kernel_restart+0x20/0x68 ... [2] https://patchwork.kernel.org/patch/10556151/ https://www.spinics.net/lists/linux-rockchip/msg21342.html [PATCH] drm/rockchip: shutdown drm subsystem on shutdown Fixes: 7f3ef5dedb14 ("drm/rockchip: Allow driver to be shutdown on reboot/kexec") Cc: Jeffy Chen Cc: Robin Murphy Cc: Vicente Bergas Cc: Marc Zyngier Cc: Heiko Stuebner Cc: stable@vger.kernel.org Signed-off-by: Brian Norris Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20181205181657.177703-1-briannorris@chromium.org commit 5e3c420dcca53766dec57d5bf4df8eecdb953c03 Author: Stephen Hemminger Date: Mon Dec 10 10:18:19 2018 -0800 uio_hv_generic: set callbacks on open This fixes the problem where uio application was unable to use multple queues on restart. The root cause is that the callbacks are cleared on disconnect. Change to setting up callbacks everytime in open. Fixes: cdfa835c6e5e ("uio_hv_generic: defer opening vmbus until first use") Reported-by: Mohammed Gamal Signed-off-by: Stephen Hemminger Signed-off-by: Greg Kroah-Hartman commit 3238c359acee4ab57f15abb5a82b8ab38a661ee7 Author: Robin Murphy Date: Mon Dec 10 19:33:31 2018 +0000 arm64: dma-mapping: Fix FORCE_CONTIGUOUS buffer clearing We need to invalidate the caches *before* clearing the buffer via the non-cacheable alias, else in the worst case __dma_flush_area() may write back dirty lines over the top of our nice new zeros. Fixes: dd65a941f6ba ("arm64: dma-mapping: clear buffers allocated with FORCE_CONTIGUOUS flag") Cc: # 4.18.x- Acked-by: Will Deacon Signed-off-by: Robin Murphy Signed-off-by: Catalin Marinas commit 254eb5505ca0ca749d3a491fc6668b6c16647a99 Author: Kirill A. Shutemov Date: Fri Nov 30 23:23:28 2018 +0300 x86/dump_pagetables: Fix LDT remap address marker The LDT remap placement has been changed. It's now placed before the direct mapping in the kernel virtual address space for both paging modes. Change address markers order accordingly. Fixes: d52888aa2753 ("x86/mm: Move LDT remap out of KASLR region on 5-level paging") Signed-off-by: Kirill A. Shutemov Signed-off-by: Thomas Gleixner Cc: bp@alien8.de Cc: hpa@zytor.com Cc: dave.hansen@linux.intel.com Cc: luto@kernel.org Cc: peterz@infradead.org Cc: boris.ostrovsky@oracle.com Cc: jgross@suse.com Cc: bhe@redhat.com Cc: hans.van.kranenburg@mendix.com Cc: linux-mm@kvack.org Cc: xen-devel@lists.xenproject.org Link: https://lkml.kernel.org/r/20181130202328.65359-3-kirill.shutemov@linux.intel.com commit 16877a5570e0c5f4270d5b17f9bab427bcae9514 Author: Kirill A. Shutemov Date: Fri Nov 30 23:23:27 2018 +0300 x86/mm: Fix guard hole handling There is a guard hole at the beginning of the kernel address space, also used by hypervisors. It occupies 16 PGD entries. This reserved range is not defined explicitely, it is calculated relative to other entities: direct mapping and user space ranges. The calculation got broken by recent changes of the kernel memory layout: LDT remap range is now mapped before direct mapping and makes the calculation invalid. The breakage leads to crash on Xen dom0 boot[1]. Define the reserved range explicitely. It's part of kernel ABI (hypervisors expect it to be stable) and must not depend on changes in the rest of kernel memory layout. [1] https://lists.xenproject.org/archives/html/xen-devel/2018-11/msg03313.html Fixes: d52888aa2753 ("x86/mm: Move LDT remap out of KASLR region on 5-level paging") Reported-by: Hans van Kranenburg Signed-off-by: Kirill A. Shutemov Signed-off-by: Thomas Gleixner Tested-by: Hans van Kranenburg Reviewed-by: Juergen Gross Cc: bp@alien8.de Cc: hpa@zytor.com Cc: dave.hansen@linux.intel.com Cc: luto@kernel.org Cc: peterz@infradead.org Cc: boris.ostrovsky@oracle.com Cc: bhe@redhat.com Cc: linux-mm@kvack.org Cc: xen-devel@lists.xenproject.org Link: https://lkml.kernel.org/r/20181130202328.65359-2-kirill.shutemov@linux.intel.com commit 8e41cae64b08fe2e86a9ffb88b295c6b4b3a3322 Author: YueHaibing Date: Tue Dec 11 11:13:39 2018 +0800 ieee802154: ca8210: fix possible u8 overflow in ca8210_rx_done gcc warning this: drivers/net/ieee802154/ca8210.c:730:10: warning: comparison is always false due to limited range of data type [-Wtype-limits] 'len' is u8 type, we get it from buf[1] adding 2, which can overflow. This patch change the type of 'len' to unsigned int to avoid this,also fix the gcc warning. Fixes: ded845a781a5 ("ieee802154: Add CA8210 IEEE 802.15.4 device driver") Signed-off-by: YueHaibing Signed-off-by: Stefan Schmidt commit 4ac0a807da6f79d5f2a65f991030aee503fece3a Author: Thierry Reding Date: Fri Nov 23 13:11:51 2018 +0100 drm/nouveau/drm/nouveau: tegra: Call nouveau_drm_device_init() As part of commit cfea88a4d866 ("drm/nouveau: Start using new drm_dev initialization helpers"), the initialization of the Nouveau DRM device was reworked and along the way the platform driver initialization was left incomplete. Add a call to nouveau_drm_device_init() to make sure all of the structures are properly initialized. Signed-off-by: Thierry Reding Reviewed-by: Lyude Paul Tested-by: Marcel Ziswiler Signed-off-by: Ben Skeggs commit 99c47fcd4daa2b9a1348872ba49226dcdc58cb40 Author: David HERNANDEZ SANCHEZ Date: Thu Dec 6 13:23:32 2018 +0000 thermal: stm32: Fix stm_thermal_read_factory_settings Adding brackets allows to multiply the register value, masked by TS1_RAMP_COEFF_MASK, by an ADJUST value properly and not to multiply ADJUST by register value and then mask the whole. Fixes: 1d693155 ("thermal: add stm32 thermal driver") Reviewed-by: Daniel Lezcano Signed-off-by: David Hernandez Sanchez Signed-off-by: Eduardo Valentin commit 3c9d082064b5ec5876f7e20bc50959d1915c5ab0 Author: David HERNANDEZ SANCHEZ Date: Thu Dec 6 13:23:32 2018 +0000 thermal: stm32: read factory settings inside stm_thermal_prepare Calling stm_thermal_read_factory_settings before clocking internal peripheral causes bad register values and makes temperature computation wrong. Calling stm_thermal_read_factory_settings inside stm_thermal_prepare fixes this problem as internal peripheral is well clocked at this stage. Fixes: 1d693155 ("thermal: add stm32 thermal driver") Reviewed-by: Daniel Lezcano Signed-off-by: David Hernandez Sanchez Signed-off-by: Eduardo Valentin commit 7d3a2a2bbadb4bf5856ed394ba09b8fbb7a80460 Author: Daniel Lezcano Date: Fri Nov 30 09:00:32 2018 +0100 thermal/drivers/hisi: Fix number of sensors on hi3660 Without this patch the thermal driver is broken on hi3660. The dual sensors support patchset was partially merged, unfortunately the dual thermal zones definition is not available in the DT yet, so when the driver tries to register all the sensors that fails. By reducing to 1 the number of sensors on the hi3660, we switch back to the previous functionnality. Fixes: 8c6c36846f11 (thermal/drivers/hisi: Add the dual clusters sensors for hi3660) Signed-off-by: Daniel Lezcano Signed-off-by: Eduardo Valentin commit 5d7ab8f0bc1410ee9d4099284ea05bf31a2e39ec Author: Daniel Lezcano Date: Fri Nov 30 09:00:31 2018 +0100 thermal/drivers/hisi: Fix wrong platform_get_irq_byname() Without this patch, the thermal driver on hi6220 and hi3660 is broken. That is due because part of the posted patchset was merged but a small change in the DT was dropped. The hi6220 and hi3660 do not have an interrupt name in the DT, so finding interrupt by name fails. Fix this by returning back to the platform_get_irq() function call. Fixes: 2cffaeff083f (thermal/drivers/hisi: Use platform_get_irq_byname) Signed-off-by: Daniel Lezcano Signed-off-by: Eduardo Valentin commit 290974d434783624c13a9530a23c45f9c5ffe018 Author: Pieter Jansen van Vuuren Date: Mon Dec 10 15:03:43 2018 -0800 nfp: flower: ensure TCP flags can be placed in IPv6 frame Previously we did not ensure tcp flags have a place to be stored when using IPv6. We correct this by including IPv6 key layer when we match tcp flags and the IPv6 key layer has not been included already. Fixes: 07e1671cfca5 ("nfp: flower: refactor shared ip header in match offload") Signed-off-by: Pieter Jansen van Vuuren Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller commit 6cbe721095fec97e1ffb542e3f8cb766aacb251f Merge: 5648451e30a0 1d1bbc37f89b Author: David S. Miller Date: Mon Dec 10 17:34:26 2018 -0800 Merge branch 'ibmvnic-Fix-reset-work-item-locking-bugs' Thomas Falcon says: ==================== net/ibmvnic: Fix reset work item locking bugs This patch set fixes issues with scheduling reset work items in a tasklet context. Since ibmvnic_reset can called in an interrupt, it should not use a mutex or allocate memory non-atomically. ==================== Signed-off-by: David S. Miller commit 1d1bbc37f89b0559c9e913682f2489d89cfde6b8 Author: Thomas Falcon Date: Mon Dec 10 15:22:23 2018 -0600 ibmvnic: Fix non-atomic memory allocation in IRQ context ibmvnic_reset allocated new reset work item objects in a non-atomic context. This can be called from a tasklet, generating the output below. Allocate work items with the GFP_ATOMIC flag instead. BUG: sleeping function called from invalid context at mm/slab.h:421 in_atomic(): 1, irqs_disabled(): 1, pid: 93, name: kworker/0:2 INFO: lockdep is turned off. irq event stamp: 66049 hardirqs last enabled at (66048): [] tasklet_action_common.isra.12+0x78/0x1c0 hardirqs last disabled at (66049): [] _raw_spin_lock_irqsave+0x48/0xf0 softirqs last enabled at (66044): [] dev_deactivate_queue.constprop.28+0xc8/0x160 softirqs last disabled at (66045): [] call_do_softirq+0x14/0x24 CPU: 0 PID: 93 Comm: kworker/0:2 Kdump: loaded Not tainted 4.20.0-rc6-00001-g1b50a8f03706 #7 Workqueue: events linkwatch_event Call Trace: [c0000003fffe7ae0] [c000000000bc83e4] dump_stack+0xe8/0x164 (unreliable) [c0000003fffe7b30] [c00000000015ba0c] ___might_sleep+0x2dc/0x320 [c0000003fffe7bb0] [c000000000391514] kmem_cache_alloc_trace+0x3e4/0x440 [c0000003fffe7c30] [d000000005b2309c] ibmvnic_reset+0x16c/0x360 [ibmvnic] [c0000003fffe7cc0] [d000000005b29834] ibmvnic_tasklet+0x1054/0x2010 [ibmvnic] [c0000003fffe7e00] [c0000000001224c8] tasklet_action_common.isra.12+0xd8/0x1c0 [c0000003fffe7e60] [c000000000bf1238] __do_softirq+0x1a8/0x64c [c0000003fffe7f90] [c0000000000306e0] call_do_softirq+0x14/0x24 [c0000003f3967980] [c00000000001ba50] do_softirq_own_stack+0x60/0xb0 [c0000003f39679c0] [c0000000001218a8] do_softirq+0xa8/0x100 [c0000003f39679f0] [c000000000121a74] __local_bh_enable_ip+0x174/0x180 [c0000003f3967a60] [c000000000bf003c] _raw_spin_unlock_bh+0x5c/0x80 [c0000003f3967a90] [c000000000a8ac78] dev_deactivate_queue.constprop.28+0xc8/0x160 [c0000003f3967ad0] [c000000000a8c8b0] dev_deactivate_many+0xd0/0x520 [c0000003f3967b70] [c000000000a8cd40] dev_deactivate+0x40/0x60 [c0000003f3967ba0] [c000000000a5e0c4] linkwatch_do_dev+0x74/0xd0 [c0000003f3967bd0] [c000000000a5e694] __linkwatch_run_queue+0x1a4/0x1f0 [c0000003f3967c30] [c000000000a5e728] linkwatch_event+0x48/0x60 [c0000003f3967c50] [c0000000001444e8] process_one_work+0x238/0x710 [c0000003f3967d20] [c000000000144a48] worker_thread+0x88/0x4e0 [c0000003f3967db0] [c00000000014e3a8] kthread+0x178/0x1c0 [c0000003f3967e20] [c00000000000bfd0] ret_from_kernel_thread+0x5c/0x6c Signed-off-by: Thomas Falcon Signed-off-by: David S. Miller commit 6c5c7489089608d89b7ce310bca44812e2b0a4a5 Author: Thomas Falcon Date: Mon Dec 10 15:22:22 2018 -0600 ibmvnic: Convert reset work item mutex to spin lock ibmvnic_reset can create and schedule a reset work item from an IRQ context, so do not use a mutex, which can sleep. Convert the reset work item mutex to a spin lock. Locking debugger generated the trace output below. BUG: sleeping function called from invalid context at kernel/locking/mutex.c:908 in_atomic(): 1, irqs_disabled(): 1, pid: 120, name: kworker/8:1 4 locks held by kworker/8:1/120: #0: 0000000017c05720 ((wq_completion)"events"){+.+.}, at: process_one_work+0x188/0x710 #1: 00000000ace90706 ((linkwatch_work).work){+.+.}, at: process_one_work+0x188/0x710 #2: 000000007632871f (rtnl_mutex){+.+.}, at: rtnl_lock+0x30/0x50 #3: 00000000fc36813a (&(&crq->lock)->rlock){..-.}, at: ibmvnic_tasklet+0x88/0x2010 [ibmvnic] irq event stamp: 26293 hardirqs last enabled at (26292): [] tasklet_action_common.isra.12+0x78/0x1c0 hardirqs last disabled at (26293): [] _raw_spin_lock_irqsave+0x48/0xf0 softirqs last enabled at (26288): [] dev_deactivate_queue.constprop.28+0xc8/0x160 softirqs last disabled at (26289): [] call_do_softirq+0x14/0x24 CPU: 8 PID: 120 Comm: kworker/8:1 Kdump: loaded Not tainted 4.20.0-rc6 #6 Workqueue: events linkwatch_event Call Trace: [c0000003fffa7a50] [c000000000bc83e4] dump_stack+0xe8/0x164 (unreliable) [c0000003fffa7aa0] [c00000000015ba0c] ___might_sleep+0x2dc/0x320 [c0000003fffa7b20] [c000000000be960c] __mutex_lock+0x8c/0xb40 [c0000003fffa7c30] [d000000006202ac8] ibmvnic_reset+0x78/0x330 [ibmvnic] [c0000003fffa7cc0] [d0000000062097f4] ibmvnic_tasklet+0x1054/0x2010 [ibmvnic] [c0000003fffa7e00] [c0000000001224c8] tasklet_action_common.isra.12+0xd8/0x1c0 [c0000003fffa7e60] [c000000000bf1238] __do_softirq+0x1a8/0x64c [c0000003fffa7f90] [c0000000000306e0] call_do_softirq+0x14/0x24 [c0000003f3f87980] [c00000000001ba50] do_softirq_own_stack+0x60/0xb0 [c0000003f3f879c0] [c0000000001218a8] do_softirq+0xa8/0x100 [c0000003f3f879f0] [c000000000121a74] __local_bh_enable_ip+0x174/0x180 [c0000003f3f87a60] [c000000000bf003c] _raw_spin_unlock_bh+0x5c/0x80 [c0000003f3f87a90] [c000000000a8ac78] dev_deactivate_queue.constprop.28+0xc8/0x160 [c0000003f3f87ad0] [c000000000a8c8b0] dev_deactivate_many+0xd0/0x520 [c0000003f3f87b70] [c000000000a8cd40] dev_deactivate+0x40/0x60 [c0000003f3f87ba0] [c000000000a5e0c4] linkwatch_do_dev+0x74/0xd0 [c0000003f3f87bd0] [c000000000a5e694] __linkwatch_run_queue+0x1a4/0x1f0 [c0000003f3f87c30] [c000000000a5e728] linkwatch_event+0x48/0x60 [c0000003f3f87c50] [c0000000001444e8] process_one_work+0x238/0x710 [c0000003f3f87d20] [c000000000144a48] worker_thread+0x88/0x4e0 [c0000003f3f87db0] [c00000000014e3a8] kthread+0x178/0x1c0 [c0000003f3f87e20] [c00000000000bfd0] ret_from_kernel_thread+0x5c/0x6c Signed-off-by: Thomas Falcon Signed-off-by: David S. Miller commit aca1a80ebe3e4d49adaf6516c61a6786b1ee7dad Author: Stanislav Fomichev Date: Mon Dec 10 15:25:04 2018 -0800 selftests/bpf: use proper type when passing prog_type Use bpf_prog_type instead of bpf_map_type when passing prog_type. -Wenum-conversion might be unhappy about it: error: implicit conversion from enumeration type 'enum bpf_map_type' to different enumeration type 'enum bpf_prog_type' Signed-off-by: Stanislav Fomichev Signed-off-by: Daniel Borkmann commit f55adad601c6a97c8c9628195453e0fb23b4a0ae Author: Keith Busch Date: Mon Dec 10 08:44:42 2018 -0700 block/bio: Do not zero user pages We don't need to zero fill the bio if not using kernel allocated pages. Fixes: f3587d76da05 ("block: Clear kernel memory before copying to user") # v4.20-rc2 Reported-by: Todd Aiken Cc: Laurence Oberman Cc: stable@vger.kernel.org Cc: Bart Van Assche Tested-by: Laurence Oberman Signed-off-by: Keith Busch Signed-off-by: Jens Axboe commit cf4197ed5796234a53beb71228198c7d1e678947 Author: Kenneth Feng Date: Thu Dec 6 11:56:14 2018 +0800 drm/amdgpu/powerplay: Apply avfs cks-off voltages on VI Instead of EVV cks-off voltages, avfs cks-off voltages can avoid the overshoot voltages when switching sclk. Signed-off-by: Kenneth Feng Acked-by: Alex Deucher Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit d55d8be0747c96db28a1d08fc24d22ccd9b448ac Author: Junwei Zhang Date: Fri Dec 7 15:15:03 2018 +0800 drm/amdgpu: update SMC firmware image for polaris10 variants Some new variants require different firmwares. Signed-off-by: Junwei Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 9bd206f89fa758f130fde09bf6f876f955ed989a Author: Alex Deucher Date: Fri Dec 7 16:24:33 2018 -0500 drm/amdkfd: add new vega20 pci id New vega20 id. Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 756e16bf79f2815e7c83a04881b5545b55a99fd3 Author: Alex Deucher Date: Fri Dec 7 16:23:19 2018 -0500 drm/amdkfd: add new vega10 pci ids New vega10 ids. Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit ec5b2020726bffc893d5bddca39502e116da1fbc Author: Alex Deucher Date: Fri Dec 7 16:00:27 2018 -0500 drm/amdgpu: add some additional vega20 pci ids New vega ids. Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 2244b5887c6865b9e9cf14ee12a312b776aeeb58 Author: Alex Deucher Date: Fri Dec 7 15:58:23 2018 -0500 drm/amdgpu: add some additional vega10 pci ids New vega ids. Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 5648451e30a0d13d11796574919a359025d52cce Author: Gustavo A. R. Silva Date: Mon Dec 10 12:41:24 2018 -0600 ipv4: Fix potential Spectre v1 vulnerability vr.vifi 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/ipv4/ipmr.c:1616 ipmr_ioctl() warn: potential spectre issue 'mrt->vif_table' [r] (local cap) net/ipv4/ipmr.c:1690 ipmr_compat_ioctl() warn: potential spectre issue 'mrt->vif_table' [r] (local cap) Fix this by sanitizing vr.vifi before using it to index mrt->vif_table' 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 4a2eb0c37b4759416996fbb4c45b932500cf06d3 Author: Xin Long Date: Mon Dec 10 18:00:52 2018 +0800 sctp: initialize sin6_flowinfo for ipv6 addrs in sctp_inet6addr_event syzbot reported a kernel-infoleak, which is caused by an uninitialized field(sin6_flowinfo) of addr->a.v6 in sctp_inet6addr_event(). The call trace is as below: BUG: KMSAN: kernel-infoleak in _copy_to_user+0x19a/0x230 lib/usercopy.c:33 CPU: 1 PID: 8164 Comm: syz-executor2 Not tainted 4.20.0-rc3+ #95 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+0x32d/0x480 lib/dump_stack.c:113 kmsan_report+0x12c/0x290 mm/kmsan/kmsan.c:683 kmsan_internal_check_memory+0x32a/0xa50 mm/kmsan/kmsan.c:743 kmsan_copy_to_user+0x78/0xd0 mm/kmsan/kmsan_hooks.c:634 _copy_to_user+0x19a/0x230 lib/usercopy.c:33 copy_to_user include/linux/uaccess.h:183 [inline] sctp_getsockopt_local_addrs net/sctp/socket.c:5998 [inline] sctp_getsockopt+0x15248/0x186f0 net/sctp/socket.c:7477 sock_common_getsockopt+0x13f/0x180 net/core/sock.c:2937 __sys_getsockopt+0x489/0x550 net/socket.c:1939 __do_sys_getsockopt net/socket.c:1950 [inline] __se_sys_getsockopt+0xe1/0x100 net/socket.c:1947 __x64_sys_getsockopt+0x62/0x80 net/socket.c:1947 do_syscall_64+0xcf/0x110 arch/x86/entry/common.c:291 entry_SYSCALL_64_after_hwframe+0x63/0xe7 sin6_flowinfo is not really used by SCTP, so it will be fixed by simply setting it to 0. The issue exists since very beginning. Thanks Alexander for the reproducer provided. Reported-by: syzbot+ad5d327e6936a2e284be@syzkaller.appspotmail.com Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Acked-by: Neil Horman Signed-off-by: David S. Miller commit 8a034aad4892baf82f8c9082f969c5ebc1143a05 Author: Srinivas Kandagatla Date: Fri Dec 7 14:11:49 2018 +0530 clk: qcom: qcs404: Fix gpll0_out_main parent gpll0_out_main parent is cxo so fix it. Fixes: 652f1813c113 ("clk: qcom: gcc: Add global clock controller driver for QCS404") Signed-off-by: Srinivas Kandagatla Reviewed-by: Bjorn Andersson Signed-off-by: Vinod Koul Signed-off-by: Stephen Boyd commit c2a20a2731df11f9b7b7030f7ac3fc222c9ce39d Author: Stanislav Fomichev Date: Thu Dec 6 20:14:11 2018 -0800 selftests/bpf: add missing pointer dereference for map stacktrace fixup I get a segfault without it, other fixups always do dereference, and without dereference I don't understand how it can ever work. Fixes: 7c85c448e7d74 ("selftests/bpf: test_verifier, check bpf_map_lookup_elem access in bpf prog") Signed-off-by: Stanislav Fomichev Signed-off-by: Daniel Borkmann commit f5d582777bcb1c7ff19a5a2343f66ea01de401c6 Merge: 9bb40f010885 c201e3808e0e Author: Linus Torvalds Date: Mon Dec 10 11:04:41 2018 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid Pull HID subsystem fixes from Jiri Kosina: - two device-specific quirks from Hans de Goede and Nic Soudée - reintroduction of (mistakenly remocved) ABS_RESERVED from Peter Hutterer * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid: Input: restore EV_ABS ABS_RESERVED HID: quirks: fix RetroUSB.com devices HID: ite: Add USB id match for another ITE based keyboard rfkill key quirk commit 9bb40f0108857ddb93e7480a7f38c1a9ad432e1d Merge: 1dffab5e9896 d347d0c82a99 Author: Linus Torvalds Date: Mon Dec 10 09:47:42 2018 -0800 Merge tag 'backlight-fixes-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight Pull backlight fix from Lee Jones: "Fix brightness levels when !DT in pwm_bl driver" * tag 'backlight-fixes-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight: backlight: pwm_bl: Fix brightness levels for non-DT case. commit 1dffab5e98969087039fefa8cde4699c7353b71e Merge: 40e020c129cf 0603a9a84679 Author: Linus Torvalds Date: Mon Dec 10 09:06:22 2018 -0800 Merge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC fixes from Olof Johansson: "The usual batch; most of them are DT tweaks to fix misdescribed hardware. Beyond that: - A bugfix for MMP2 CPU detection, it's been there quite a while but makes sense to fix now anyway. - Some power management tweaks: + disabling of CPU idle power state on Marvell Armada 7K/8K (Macchiatobin et al) + Increase of minimum voltage on BananaPi M3 + Tweak of power ramp time for DVFS on NXP/Freescale i.MX7SX - A couple of MAINTAINER updates: + MMP has a new volunteer to look after it + Mediatek adds a few keywords, IRC channel and wiki URL" * tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: 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 arm64: dts: mt7622: Drop the general purpose timer node arm64: dts: mt7622: fix no more console output on BPI-R64 board arm64: dts: mt7622: fix no more console output on rfb1 ARM: dts: sun8i: a83t: bananapi-m3: increase vcc-pd voltage to 3.3V commit d347d0c82a99b41efc2770fc01a04066903300df Author: Enric Balletbo i Serra Date: Mon Dec 10 13:14:37 2018 +0100 backlight: pwm_bl: Fix brightness levels for non-DT case. Commit '88ba95bedb79 ("backlight: pwm_bl: Compute brightness of LED linearly to human eye")' allows the possibility to compute a default brightness table when there isn't the brightness-levels property in the DT. Unfortunately the changes made broke the pwm backlight for the non-DT boards. Usually, the non-DT boards don't pass the brightness levels via platform data, instead, it sets the max_brightness in their platform data and the driver calculates the level without a table. The offending patch assumed that when there is no brightness levels table we should create one, but this is clearly wrong for the non-DT case. After this patch the code handles the DT and the non-DT case taking in consideration also if max_brightness is set or not. Fixes: 88ba95bedb79 ("backlight: pwm_bl: Compute brightness of LED linearly to human eye") Reported-by: Robert Jarzmik Signed-off-by: Enric Balletbo i Serra Tested-by: Robert Jarzmik Acked-by: Daniel Thompson Signed-off-by: Lee Jones commit 0bea4cc8383519f78f3f74caca7bdebdfb346d3b Author: Jian-Hong Pan Date: Fri Dec 7 17:17:13 2018 +0800 ALSA: hda/realtek: Enable audio jacks of ASUS UX433FN/UX333FA with ALC294 The ASUS UX433FN and UX333FA with ALC294 cannot detect the headset MIC and output through the internal speaker and the headphone until ALC294_FIXUP_ASUS_SPK and ALC294_FIXUP_ASUS_HEADSET_MIC quirk applied. Signed-off-by: Daniel Drake Signed-off-by: Jian-Hong Pan Cc: Signed-off-by: Takashi Iwai commit 4e051106730dfc640a8b49db88440af304726f4d Author: Jian-Hong Pan Date: Fri Dec 7 17:17:12 2018 +0800 ALSA: hda/realtek: Enable audio jacks of ASUS UX533FD with ALC294 The ASUS UX533FD with ALC294 cannot detect the headset MIC and outputs through the internal speaker and the headphone until ALC294_FIXUP_ASUS_SPK and ALC294_FIXUP_ASUS_HEADSET_MIC quirk applied. Signed-off-by: Daniel Drake Signed-off-by: Jian-Hong Pan Cc: Signed-off-by: Takashi Iwai commit d8ae458eeca9ed686e09a1b894867cb91fc4c1cb Author: Chris Chiu Date: Fri Dec 7 17:17:11 2018 +0800 ALSA: hda/realtek: ALC294 mic and headset-mode fixups for ASUS X542UN The known ALC256_FIXUP_ASUS_MIC fixup can fix the headphone jack sensing and enable use of the internal microphone on this laptop X542UN. However, it's ALC294 so create a new fixup named ALC294_FIXUP_ASUS_MIC to avoid confusion. Signed-off-by: Jian-Hong Pan Signed-off-by: Daniel Drake Signed-off-by: Chris Chiu Cc: Signed-off-by: Takashi Iwai commit d57ec3c83b5153217a70b561d4fb6ed96f2f7a25 Author: Tore Anderson Date: Sat Dec 8 19:05:12 2018 +0100 USB: serial: option: add HP lt4132 The HP lt4132 is a rebranded Huawei ME906s-158 LTE modem. The interface with protocol 0x16 is "CDC ECM & NCM" according to the *.inf files included with the Windows driver. Attaching the option driver to it doesn't result in a /dev/ttyUSB* device being created, so I've excluded it. Note that it is also excluded for corresponding Huawei-branded devices, cf. commit d544db293a44 ("USB: support new huawei devices in option.c"). T: Bus=01 Lev=01 Prnt=01 Port=02 Cnt=02 Dev#= 3 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=ff MxPS=64 #Cfgs= 3 P: Vendor=03f0 ProdID=a31d Rev=01.02 S: Manufacturer=HP Inc. S: Product=HP lt4132 LTE/HSPA+ 4G Module S: SerialNumber=0123456789ABCDEF C: #Ifs= 6 Cfg#= 1 Atr=a0 MxPwr=2mA I: If#=0x0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=06 Prot=10 Driver=option I: If#=0x1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=06 Prot=13 Driver=option I: If#=0x2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=06 Prot=12 Driver=option I: If#=0x3 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=06 Prot=16 Driver=(none) I: If#=0x4 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=06 Prot=14 Driver=option I: If#=0x5 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=06 Prot=1b Driver=option T: Bus=01 Lev=01 Prnt=01 Port=02 Cnt=02 Dev#= 3 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=ff MxPS=64 #Cfgs= 3 P: Vendor=03f0 ProdID=a31d Rev=01.02 S: Manufacturer=HP Inc. S: Product=HP lt4132 LTE/HSPA+ 4G Module S: SerialNumber=0123456789ABCDEF C: #Ifs= 7 Cfg#= 2 Atr=a0 MxPwr=2mA I: If#=0x0 Alt= 0 #EPs= 1 Cls=02(commc) Sub=06 Prot=00 Driver=cdc_ether I: If#=0x1 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=06 Prot=00 Driver=cdc_ether I: If#=0x2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=06 Prot=10 Driver=option I: If#=0x3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=06 Prot=13 Driver=option I: If#=0x4 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=06 Prot=12 Driver=option I: If#=0x5 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=06 Prot=14 Driver=option I: If#=0x6 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=06 Prot=1b Driver=option T: Bus=01 Lev=01 Prnt=01 Port=02 Cnt=02 Dev#= 3 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=ff MxPS=64 #Cfgs= 3 P: Vendor=03f0 ProdID=a31d Rev=01.02 S: Manufacturer=HP Inc. S: Product=HP lt4132 LTE/HSPA+ 4G Module S: SerialNumber=0123456789ABCDEF C: #Ifs= 3 Cfg#= 3 Atr=a0 MxPwr=2mA I: If#=0x0 Alt= 0 #EPs= 1 Cls=02(commc) Sub=0e Prot=00 Driver=cdc_mbim I: If#=0x1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim I: If#=0x2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=06 Prot=14 Driver=option Signed-off-by: Tore Anderson Cc: stable@vger.kernel.org [ johan: drop id defines ] Signed-off-by: Johan Hovold commit d72f70da60de1af4bfd0f0a3d0ecbc28eea07679 Author: Takeshi Misawa Date: Sun Dec 9 14:30:15 2018 +0900 fuse: Fix memory leak in fuse_dev_free() When ntfs is unmounted, the following leak is reported by kmemleak. kmemleak report: unreferenced object 0xffff880052bf4400 (size 4096): comm "mount.ntfs", pid 16530, jiffies 4294861127 (age 3215.836s) hex dump (first 32 bytes): 00 44 bf 52 00 88 ff ff 00 44 bf 52 00 88 ff ff .D.R.....D.R.... 10 44 bf 52 00 88 ff ff 10 44 bf 52 00 88 ff ff .D.R.....D.R.... backtrace: [<00000000bf4a2f8d>] fuse_fill_super+0xb22/0x1da0 [fuse] [<000000004dde0f0c>] mount_bdev+0x263/0x320 [<0000000025aebc66>] mount_fs+0x82/0x2bf [<0000000042c5a6be>] vfs_kern_mount.part.33+0xbf/0x480 [<00000000ed10cd5b>] do_mount+0x3de/0x2ad0 [<00000000d59ff068>] ksys_mount+0xba/0xd0 [<000000001bda1bcc>] __x64_sys_mount+0xba/0x150 [<00000000ebe26304>] do_syscall_64+0x151/0x490 [<00000000d25f2b42>] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [<000000002e0abd2c>] 0xffffffffffffffff fuse_dev_alloc() allocate fud->pq.processing. But this hash table is not freed. Fix this by freeing fud->pq.processing. Signed-off-by: Takeshi Misawa Signed-off-by: Miklos Szeredi Fixes: be2ff42c5d6e ("fuse: Use hash table to link processing request") commit a225f1567405558fb5410e9b2b90805819df1c67 Author: Elvira Khabirova Date: Fri Dec 7 18:56:05 2018 +0300 powerpc/ptrace: replace ptrace_report_syscall() with a tracehook call Arch code should use tracehook_*() helpers, as documented in include/linux/tracehook.h, ptrace_report_syscall() is not expected to be used outside that file. The patch does not look very nice, but at least it is correct and opens the way for PTRACE_GET_SYSCALL_INFO API. Co-authored-by: Dmitry V. Levin Fixes: 5521eb4bca2d ("powerpc/ptrace: Add support for PTRACE_SYSEMU") Signed-off-by: Elvira Khabirova Signed-off-by: Dmitry V. Levin [mpe: Take this as a minimal fix for 4.20, we'll rework it later] Signed-off-by: Michael Ellerman commit 40e020c129cfc991e8ab4736d2665351ffd1468d Author: Linus Torvalds Date: Sun Dec 9 15:31:00 2018 -0800 Linux 4.20-rc6 commit d48f782e4fb20dc7ec935ca0ca41ae31e4a69362 Merge: 8586ca8a2144 35cc3cefc4de Author: Linus Torvalds Date: Sun Dec 9 15:12:33 2018 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: "A decent batch of fixes here. I'd say about half are for problems that have existed for a while, and half are for new regressions added in the 4.20 merge window. 1) Fix 10G SFP phy module detection in mvpp2, from Baruch Siach. 2) Revert bogus emac driver change, from Benjamin Herrenschmidt. 3) Handle BPF exported data structure with pointers when building 32-bit userland, from Daniel Borkmann. 4) Memory leak fix in act_police, from Davide Caratti. 5) Check RX checksum offload in RX descriptors properly in aquantia driver, from Dmitry Bogdanov. 6) SKB unlink fix in various spots, from Edward Cree. 7) ndo_dflt_fdb_dump() only works with ethernet, enforce this, from Eric Dumazet. 8) Fix FID leak in mlxsw driver, from Ido Schimmel. 9) IOTLB locking fix in vhost, from Jean-Philippe Brucker. 10) Fix SKB truesize accounting in ipv4/ipv6/netfilter frag memory limits otherwise namespace exit can hang. From Jiri Wiesner. 11) Address block parsing length fixes in x25 from Martin Schiller. 12) IRQ and ring accounting fixes in bnxt_en, from Michael Chan. 13) For tun interfaces, only iface delete works with rtnl ops, enforce this by disallowing add. From Nicolas Dichtel. 14) Use after free in liquidio, from Pan Bian. 15) Fix SKB use after passing to netif_receive_skb(), from Prashant Bhole. 16) Static key accounting and other fixes in XPS from Sabrina Dubroca. 17) Partially initialized flow key passed to ip6_route_output(), from Shmulik Ladkani. 18) Fix RTNL deadlock during reset in ibmvnic driver, from Thomas Falcon. 19) Several small TCP fixes (off-by-one on window probe abort, NULL deref in tail loss probe, SNMP mis-estimations) from Yuchung Cheng" * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (93 commits) net/sched: cls_flower: Reject duplicated rules also under skip_sw bnxt_en: Fix _bnxt_get_max_rings() for 57500 chips. bnxt_en: Fix NQ/CP rings accounting on the new 57500 chips. bnxt_en: Keep track of reserved IRQs. bnxt_en: Fix CNP CoS queue regression. net/mlx4_core: Correctly set PFC param if global pause is turned off. Revert "net/ibm/emac: wrong bit is used for STA control" neighbour: Avoid writing before skb->head in neigh_hh_output() ipv6: Check available headroom in ip6_xmit() even without options tcp: lack of available data can also cause TSO defer ipv6: sr: properly initialize flowi6 prior passing to ip6_route_output mlxsw: spectrum_switchdev: Fix VLAN device deletion via ioctl mlxsw: spectrum_router: Relax GRE decap matching check mlxsw: spectrum_switchdev: Avoid leaking FID's reference count mlxsw: spectrum_nve: Remove easily triggerable warnings ipv4: ipv6: netfilter: Adjust the frag mem limit when truesize changes sctp: frag_point sanity check tcp: fix NULL ref in tail loss probe tcp: Do not underestimate rwnd_limited net: use skb_list_del_init() to remove from RX sublists ... commit 8586ca8a214471e4573d76356aabe890bfecdc8a Merge: ebbd30004d6c ac3e233d29f7 Author: Linus Torvalds Date: Sun Dec 9 15:09:55 2018 -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: "Three fixes: a boot parameter re-(re-)fix, a retpoline build artifact fix and an LLVM workaround" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/vdso: Drop implicit common-page-size linker flag x86/build: Fix compiler support check for CONFIG_RETPOLINE x86/boot: Clear RSDP address in boot_params for broken loaders commit 51a11b14c29c6c7cc985c6ce7dd9e20f61cf7f0a Author: Sandipan Das Date: Thu Dec 6 14:57:01 2018 +0530 bpf: powerpc: fix broken uapi for BPF_PROG_TYPE_PERF_EVENT Now that there are different variants of pt_regs for userspace and kernel, the uapi for the BPF_PROG_TYPE_PERF_EVENT program type must be changed by exporting the user_pt_regs structure instead of the pt_regs structure that is in-kernel only. Fixes: 002af9391bfb ("powerpc: Split user/kernel definitions of struct pt_regs") Signed-off-by: Sandipan Das Signed-off-by: Alexei Starovoitov commit ebbd30004d6cfa747723b3ac6ee1a97795f797ba Merge: 4b04e73a78c5 a50480cb6d61 Author: Linus Torvalds Date: Sun Dec 9 14:21:33 2018 -0800 Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull kprobes fixes from Ingo Molnar: "Two kprobes fixes: a blacklist fix and an instruction patching related corruption fix" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: kprobes/x86: Blacklist non-attachable interrupt functions kprobes/x86: Fix instruction patching corruption when copying more than one RIP-relative instruction commit 4b04e73a78c5c89dc1a75fb35dea6c947c1d2ac7 Merge: 0844895a2e51 79c2206d369b Author: Linus Torvalds Date: Sun Dec 9 14:03:56 2018 -0800 Merge branch 'efi-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull EFI fixes from Ingo Molnar: "Two fixes: a large-system fix and an earlyprintk fix with certain resolutions" * 'efi-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/earlyprintk/efi: Fix infinite loop on some screen widths x86/efi: Allocate e820 buffer before calling efi_exit_boot_service commit 35cc3cefc4de90001c9137e2d01dd9d06b11acfb Author: Or Gerlitz Date: Sun Dec 9 18:10:24 2018 +0200 net/sched: cls_flower: Reject duplicated rules also under skip_sw Currently, duplicated rules are rejected only for skip_hw or "none", hence allowing users to push duplicates into HW for no reason. Use the flower tables to protect for that. Signed-off-by: Or Gerlitz Signed-off-by: Paul Blakey Reported-by: Chris Mi Signed-off-by: David S. Miller commit d4b60e94e9bbe8c3b57e9cd126bed4a411ac5f6e Merge: bd5122cd1e06 e30fbc33190b Author: David S. Miller Date: Sun Dec 9 11:46:59 2018 -0800 Merge branch 'bnxt_en-Bug-fixes' Michael Chan says: ==================== bnxt_en: Bug fixes. The first patch fixes a regression on CoS queue setup, introduced recently by the 57500 new chip support patches. The rest are fixes related to ring and resource accounting on the new 57500 chips. ==================== Signed-off-by: David S. Miller commit e30fbc33190b8ba1d6e8ff4864627f7414b5ca99 Author: Michael Chan Date: Sun Dec 9 07:01:02 2018 -0500 bnxt_en: Fix _bnxt_get_max_rings() for 57500 chips. The CP rings are accounted differently on the new 57500 chips. There must be enough CP rings for the sum of RX and TX rings on the new chips. The current logic may be over-estimating the RX and TX rings. The output parameter max_cp should be the maximum NQs capped by MSIX vectors available for networking in the context of 57500 chips. The existing code which uses CMPL rings capped by the MSIX vectors works most of the time but is not always correct. Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit c0b8cda05e1d8151f57a79e525c2c7d51cec2f4e Author: Michael Chan Date: Sun Dec 9 07:01:01 2018 -0500 bnxt_en: Fix NQ/CP rings accounting on the new 57500 chips. The new 57500 chips have introduced the NQ structure in addition to the existing CP rings in all chips. We need to introduce a new bnxt_nq_rings_in_use(). On legacy chips, the 2 functions are the same and one will just call the other. On the new chips, they refer to the 2 separate ring structures. The new function is now called to determine the resource (NQ or CP rings) associated with MSIX that are in use. On 57500 chips, the RDMA driver does not use the CP rings so we don't need to do the subtraction adjustment. Fixes: 41e8d7983752 ("bnxt_en: Modify the ring reservation functions for 57500 series chips.") Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 75720e6323a1d195ae3ebf1a7b5e17c2e687f552 Author: Michael Chan Date: Sun Dec 9 07:01:00 2018 -0500 bnxt_en: Keep track of reserved IRQs. The new 57500 chips use 1 NQ per MSIX vector, whereas legacy chips use 1 CP ring per MSIX vector. To better unify this, add a resv_irqs field to struct bnxt_hw_resc. On legacy chips, we initialize resv_irqs with resv_cp_rings. On new chips, we initialize it with the allocated MSIX resources. Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 804fba4e9f508c8004a4bfbdf3f300ca237c56df Author: Michael Chan Date: Sun Dec 9 07:00:59 2018 -0500 bnxt_en: Fix CNP CoS queue regression. Recent changes to support the 57500 devices have created this regression. The bnxt_hwrm_queue_qportcfg() call was moved to be called earlier before the RDMA support was determined, causing the CoS queues configuration to be set before knowing whether RDMA was supported or not. Fix it by moving it to the right place right after RDMA support is determined. Fixes: 98f04cf0f1fc ("bnxt_en: Check context memory requirements from firmware.") Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 0844895a2e5161d2fc1674e870a0fd8286a3e18b Merge: 47dcb0802d28 dbde117c3126 Author: Linus Torvalds Date: Sun Dec 9 10:43:17 2018 -0800 Merge tag 'char-misc-4.20-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char/misc driver fixes from Greg KH: "Here are some small driver fixes for 4.20-rc6. There is a hyperv fix that for some reaon took forever to get into a shape that could be applied to the tree properly, but resolves a much reported issue. The others are some gnss patches, one a bugfix and the two others updates to the MAINTAINERS file to properly match the gnss files in the tree. All have been in linux-next for a while with no reported issues" * tag 'char-misc-4.20-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: MAINTAINERS: exclude gnss from SIRFPRIMA2 regex matching MAINTAINERS: add gnss scm tree gnss: sirf: fix activation retry handling Drivers: hv: vmbus: Offload the handling of channels to two workqueues commit 47dcb0802d28813e4600192ce27475681f96f230 Merge: 822b7683fff1 87e4a5405f08 Author: Linus Torvalds Date: Sun Dec 9 10:35:33 2018 -0800 Merge tag 'staging-4.20-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging fixes from Greg KH: "Here are two staging driver bugfixes for 4.20-rc6. One is a revert of a previously incorrect patch that was merged a while ago, and the other resolves a possible buffer overrun that was found by code inspection. Both of these have been in the linux-next tree with no reported issues" * tag 'staging-4.20-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: Revert commit ef9209b642f "staging: rtl8723bs: Fix indenting errors and an off-by-one mistake in core/rtw_mlme_ext.c" staging: rtl8712: Fix possible buffer overrun commit 0603a9a84679eb12d9dadb97f4e0ba017e684c7b Merge: f53de38ea64d dae522045094 Author: Olof Johansson Date: Sun Dec 9 10:28:02 2018 -0800 Merge tag 'mvebu-fixes-4.20-1' of git://git.infradead.org/linux-mvebu into fixes mvebu fixes for 4.20 Adding CPU Idle state in the device tree for Armada 8040 seems to breaks boot on some board, so let's revert it waiting for a better solution. * tag 'mvebu-fixes-4.20-1' of git://git.infradead.org/linux-mvebu: Revert "arm64: dts: marvell: add CPU Idle power state support on Armada 7K/8K" Signed-off-by: Olof Johansson commit f53de38ea64d7cbc0ecbae8548178e1f431225a6 Merge: 69dcddecaa78 5f8208f55706 Author: Olof Johansson Date: Sun Dec 9 10:27:17 2018 -0800 Merge tag 'sunxi-fixes-for-4.20' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into fixes Allwinner fixes for 4.20 One small fix for a regulator range on the Banana Pi M3 * tag 'sunxi-fixes-for-4.20' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: ARM: dts: sun8i: a83t: bananapi-m3: increase vcc-pd voltage to 3.3V Signed-off-by: Olof Johansson commit 69dcddecaa78a8765705cdf3eefc1b56f383dedc Merge: d9536e809801 f15096f12a4e Author: Olof Johansson Date: Sun Dec 9 10:26:36 2018 -0800 Merge tag 'imx-fixes-4.20-3' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into fixes 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. * tag 'imx-fixes-4.20-3' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: 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 Signed-off-by: Olof Johansson commit 822b7683fff11f152e74c404b3d915f6e5b13698 Merge: 50a5528a4b19 dada6a43b040 Author: Linus Torvalds Date: Sun Dec 9 10:24:29 2018 -0800 Merge tag 'tty-4.20-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pull tty driver fixes from Greg KH: "Here are three small tty driver fixes for 4.20-rc6 Nothing major, just some bug fixes for reported issues. Full details are in the shortlog. All of these have been in linux-next for a while with no reported issues" * tag 'tty-4.20-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: kgdboc: fix KASAN global-out-of-bounds bug in param_set_kgdboc_var() tty: serial: 8250_mtk: always resume the device in probe. tty: do not set TTY_IO_ERROR flag if console port commit 50a5528a4b19b7324f0796ea2fedf32530a11ff8 Merge: bc4caf186fb6 3caad34eab57 Author: Linus Torvalds Date: Sun Dec 9 10:18:24 2018 -0800 Merge tag 'usb-4.20-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB fixes from Greg KH: "Here are some small USB fixes for 4.20-rc6 The "largest" here are some xhci fixes for reported issues. Also here is a USB core fix, some quirk additions, and a usb-serial fix which required the export of one of the tty layer's functions to prevent code duplication. The tty maintainer agreed with this change. All of these have been in linux-next with no reported issues" * tag 'usb-4.20-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: xhci: Prevent U1/U2 link pm states if exit latency is too long xhci: workaround CSS timeout on AMD SNPS 3.0 xHC USB: check usb_get_extra_descriptor for proper size USB: serial: console: fix reported terminal settings usb: quirk: add no-LPM quirk on SanDisk Ultra Flair device USB: Fix invalid-free bug in port_over_current_notify() usb: appledisplay: Add 27" Apple Cinema Display commit bc4caf186fb691ad56adbe578d356a262f3a7d10 Merge: fa82dcbf2aed 6ac79291fb7d Author: Linus Torvalds Date: Sun Dec 9 10:15:13 2018 -0800 Merge tag '4.20-rc5-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6 Pull cifs fixes from Steve French: "Three small fixes: a fix for smb3 direct i/o, a fix for CIFS DFS for stable and a minor cifs Kconfig fix" * tag '4.20-rc5-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6: CIFS: Avoid returning EBUSY to upper layer VFS cifs: Fix separator when building path from dentry cifs: In Kconfig CONFIG_CIFS_POSIX needs depends on legacy (insecure cifs) commit fa82dcbf2aed65dc3ea78eaca9ea56fd926b2b10 Merge: bd799eb63db4 27359fd6e5f3 Author: Linus Torvalds Date: Sun Dec 9 09:54:04 2018 -0800 Merge tag 'dax-fixes-4.20-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm Pull dax fixes from Dan Williams: "The last of the known regression fixes and fallout from the Xarray conversion of the filesystem-dax implementation. On the path to debugging why the dax memory-failure injection test started failing after the Xarray conversion a couple more fixes for the dax_lock_mapping_entry(), now called dax_lock_page(), surfaced. Those plus the bug that started the hunt are now addressed. These patches have appeared in a -next release with no issues reported. Note the touches to mm/memory-failure.c are just the conversion to the new function signature for dax_lock_page(). Summary: - Fix the Xarray conversion of fsdax to properly handle dax_lock_mapping_entry() in the presense of pmd entries - Fix inode destruction racing a new lock request" * tag 'dax-fixes-4.20-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: dax: Fix unlock mismatch with updated API dax: Don't access a freed inode dax: Check page->mapping isn't NULL commit bd799eb63db4c61a5f2dc941672391fbca5bcab4 Merge: 6ec067e3a449 b5fd2e00a602 Author: Linus Torvalds Date: Sun Dec 9 09:46:54 2018 -0800 Merge tag 'libnvdimm-fixes-4.20-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm Pull libnvdimm fixes from Dan Williams: "A regression fix for the Address Range Scrub implementation, yes another one, and support for platforms that misalign persistent memory relative to the Linux memory hotplug section constraint. Longer term, support for sub-section memory hotplug would alleviate alignment waste, but until then this hack allows a 'struct page' memmap to be established for these misaligned memory regions. These have all appeared in a -next release, and thanks to Patrick for reporting and testing the alignment padding fix. Summary: - Unless and until the core mm handles memory hotplug units smaller than a section (128M), persistent memory namespaces must be padded to section alignment. The libnvdimm core already handled section collision with "System RAM", but some configurations overlap independent "Persistent Memory" ranges within a section, so additional padding injection is added for that case. - The recent reworks of the ARS (address range scrub) state machine to reduce the number of state flags inadvertantly missed a conversion of acpi_nfit_ars_rescan() call sites. Fix the regression whereby user-requested ARS results in a "short" scrub rather than a "long" scrub. - Fixup the unit tests to handle / test the 128M section alignment of mocked test resources. * tag 'libnvdimm-fixes-4.20-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: acpi/nfit: Fix user-initiated ARS to be "ARS-long" rather than "ARS-short" libnvdimm, pfn: Pad pfn namespaces relative to other regions tools/testing/nvdimm: Align test resources to 128M commit 9ef34630a4614ee1cd478f9859ebea55d55f10ec Author: Oliver O'Halloran Date: Fri Dec 7 02:17:14 2018 +1100 powerpc/mm: Fallback to RAM if the altmap is unusable The "altmap" is used to provide a pool of memory that is reserved for the vmemmap backing of hot-plugged memory. This is useful when adding large amount of ZONE_DEVICE memory to a system with a limited amount of normal memory. On ppc64 we use huge pages to map the vmemmap which requires the backing storage to be contigious and aligned to the hugepage size. The altmap implementation allows for the altmap provider to reserve a few PFNs at the start of the range for it's own uses and when this occurs the first chunk of the altmap is not usable for hugepage mappings. On hash there is no sane way to fall back to a normal sized page mapping so we fail the allocation. This results in memory hotplug failing with ENOMEM when the new range doesn't fall into an existing vmemmap block. This patch handles this case by falling back to using system memory rather than failing if we cannot allocate from the altmap. This fallback should only ever be used for the first vmemmap block so it should not cause excess memory consumption. Fixes: 7b73d978a5d0 ("mm: pass the vmem_altmap to vmemmap_populate") Signed-off-by: Oliver O'Halloran Signed-off-by: Michael Ellerman commit 43001c52b603cac041783cc392094ea560bd9444 Author: Oliver O'Halloran Date: Fri Dec 7 02:17:13 2018 +1100 powerpc/papr_scm: Use ibm,unit-guid as the iset cookie The interleave set cookie is used to determine if a label stored in the metadata space should be applied to the current region. This is important in the case of NVDIMMs since the firmware may change the interleaving configuration of a DIMM which would invalidate the existing labels. In our case the hypervisor hides those details from us so we don't really care, but libnvdimm still requires the interleave set cookie to be non-zero. For our purposes we just need the set cookie to be unique and fixed for a given PAPR SCM region and using the unit-guid (really a UUID) is fine for this purpose. Fixes: b5beae5e224f ("powerpc/pseries: Add driver for PAPR SCM regions") Signed-off-by: Oliver O'Halloran [mpe: Use kernel types (u64)] Signed-off-by: Michael Ellerman commit b0d65a8cbcb097d2110885c3660add97b0125867 Author: Oliver O'Halloran Date: Fri Dec 7 02:17:12 2018 +1100 powerpc/papr_scm: Fix DIMM device registration race When a new nvdimm device is registered with libnvdimm via nvdimm_create() it is added as a device on the nvdimm bus. The probe function for the DIMM driver is potentially quite slow so actually registering and probing the device is done in an async domain rather than immediately after device creation. This can result in a race where the region device (created 2nd) is probed first and fails to activate at boot. To fix this we use the same approach as the ACPI/NFIT driver which is to check that all the DIMM devices registered successfully. LibNVDIMM provides the nvdimm_bus_count_dimms() function which synchronises with the async domain and verifies that the dimm was successfully registered with the bus. If either of these does not occur then we bail. Fixes: b5beae5e224f ("powerpc/pseries: Add driver for PAPR SCM regions") Signed-off-by: Oliver O'Halloran Signed-off-by: Michael Ellerman commit 409dd7dc83eb54c4bc156aea890cc95bc21dc6f0 Author: Oliver O'Halloran Date: Fri Dec 7 02:17:11 2018 +1100 powerpc/papr_scm: Remove endian conversions The return values of a h-call are returned in the CPU registers and written to the provided buffer by the plpar_hcall() wrapper. As a result the values written to memory are always in the native endian and should not be byte swapped. The inital implementation of the H-Call interface was done in qemu and the returned values were byte swapped unnecessarily in both the hypervisor and in the driver so this was only noticed when bringing up the PowerVM implementation. Fixes: b5beae5e224f ("powerpc/pseries: Add driver for PAPR SCM regions") Signed-off-by: Oliver O'Halloran Signed-off-by: Michael Ellerman commit 683ec0e04ab7e2d86d2656c71322dfb2ebf063fc Author: Oliver O'Halloran Date: Fri Dec 7 02:17:10 2018 +1100 powerpc/papr_scm: Update DT properties The ibm,unit-sizes property was originally specified as an array of two u32s corresponding to the memory block size, and the number of blocks available in that region. A fairly last-minute change to the SCM DT specification was splitting that into two seperate u64 properties: ibm,block-sizes and ibm,number-of-blocks that convey the same information. No firmware / hypervisor that emitted the ibm,unit-size property ever appeared in the wild. Fixes: b5beae5e224f ("powerpc/pseries: Add driver for PAPR SCM regions") Signed-off-by: Oliver O'Halloran [mpe: Use kernel types (u32/u64)] Signed-off-by: Michael Ellerman commit fa9c98e4b975bb3192ed6af09d9fa282ed3cd8a0 Author: Takashi Sakamoto Date: Sun Dec 9 17:04:19 2018 +0900 ALSA: fireface: fix reference to wrong register for clock configuration In an initial commit, 'SYNC_STATUS' register is referred to get clock configuration, however this is wrong, according to my local note at hand for reverse-engineering about packet dump. It should be 'CLOCK_CONFIG' register. Actually, ff400_dump_clock_config() is correctly programmed. This commit fixes 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 6ba189c5c1a4bda70dc1e4826c58b0246068bb8d Author: Hui Wang Date: Sun Dec 9 09:16:43 2018 +0800 ALSA: hda/realtek - Fix the mute LED regresion on Lenovo X1 Carbon Users reported a mute LED regression on Lenovo X1 Carbon, the root cause is we applied the fixup of ALC285_FIXUP_LENOVO_HEADPHONE_NOISE to this machine, then the machine can't apply the fixup of ALC269_FIXUP_THINKPAD_ACPI anymore. To fix it, we chain two fixup together. Fixes: c4cfcf6f4297 ("ALSA: hda/realtek - fix the pop noise on headphone for lenovo laptops") Cc: Signed-off-by: Hui Wang Signed-off-by: Takashi Iwai commit ca5047286c9c93a01e1f471d00a6019536992954 Author: Yussuf Khalil Date: Sat Dec 8 20:13:35 2018 -0800 Input: synaptics - enable RMI on ThinkPad T560 Before commit 7fd6d98b89f3 ("i2c: i801: Allow ACPI AML access I/O ports not reserved for SMBus"), enabling RMI on the T560 would cause the touchpad to stop working after resuming from suspend. Now that this issue is fixed, RMI can be enabled safely and works fine. Reviewed-by: Benjamin Tissoires Signed-off-by: Yussuf Khalil Signed-off-by: Dmitry Torokhov commit e2ca26ec4f01486661b55b03597c13e2b9c18b73 Author: Tony Lindgren Date: Tue Dec 4 13:52:49 2018 -0800 Input: omap-keypad - fix idle configuration to not block SoC idle states With PM enabled, I noticed that pressing a key on the droid4 keyboard will block deeper idle states for the SoC. Let's fix this by using IRQF_ONESHOT and stop constantly toggling the device OMAP4_KBD_IRQENABLE register as suggested by Dmitry Torokhov . From the hardware point of view, looks like we need to manage the registers for OMAP4_KBD_IRQENABLE and OMAP4_KBD_WAKEUPENABLE together to avoid blocking deeper SoC idle states. And with toggling of OMAP4_KBD_IRQENABLE register now gone with IRQF_ONESHOT, also the SoC idle state problem is gone during runtime. We still also need to clear OMAP4_KBD_WAKEUPENABLE in omap4_keypad_close() though to pair it with omap4_keypad_open() to prevent blocking deeper SoC idle states after rmmod omap4-keypad. Reported-by: Pavel Machek Signed-off-by: Tony Lindgren Signed-off-by: Dmitry Torokhov commit bd5122cd1e0644d8bd8dd84517c932773e999766 Author: Tarick Bedeir Date: Fri Dec 7 00:30:26 2018 -0800 net/mlx4_core: Correctly set PFC param if global pause is turned off. rx_ppp and tx_ppp can be set between 0 and 255, so don't clamp to 1. Fixes: 6e8814ceb7e8 ("net/mlx4_en: Fix mixed PFC and Global pause user control requests") Signed-off-by: Tarick Bedeir Reviewed-by: Eran Ben Elisha Signed-off-by: David S. Miller commit 6ec067e3a4492569699676d75a21fcee22fefc5b Merge: 8214bdf7d3e6 1aea7aee805e Author: Linus Torvalds Date: Sat Dec 8 17:45:20 2018 -0800 Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal Pull thermal SoC fixes from Eduardo Valentin: "Fixes for armada and broadcom thermal drivers" * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal: thermal: broadcom: constify thermal_zone_of_device_ops structure thermal: armada: constify thermal_zone_of_device_ops structure thermal: bcm2835: Switch to SPDX identifier thermal: armada: fix legacy resource fixup thermal: armada: fix legacy validity test sense commit 8214bdf7d3e69050221aad19ec28826ed6cb4934 Merge: 570c9139c358 b7d624ab4312 Author: Linus Torvalds Date: Sat Dec 8 11:44:04 2018 -0800 Merge tag 'asm-generic-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic Pull asm-generic fix from Arnd Bergmann: "Multiple people reported a bug I introduced in asm-generic/unistd.h in 4.20, this is the obvious bugfix to get glibc and others to correctly build again on new architectures that no longer provide the old fstatat64() family of system calls" * tag 'asm-generic-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic: asm-generic: unistd.h: fixup broken macro include. commit 570c9139c358d45ab4d52fb0c4e478e2bd7123a2 Merge: f896adc42d53 9a43be9cedd5 Author: Linus Torvalds Date: Sat Dec 8 11:33:26 2018 -0800 Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux Pull clk fixes from Stephen Boyd: "A few clk driver fixes this time: - Introduce protected-clock DT binding to fix breakage on qcom sdm845-mtp boards where the qspi clks introduced this merge window cause the firmware on those boards to take down the system if we try to read the clk registers - Fix a couple off-by-one errors found by Dan Carpenter - Handle failure in zynq fixed factor clk driver to avoid using uninitialized data" * tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: 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: qcom: Support 'protected-clocks' property dt-bindings: clk: Introduce 'protected-clocks' property clk: zynqmp: handle fixed factor param query error commit f896adc42d5399eb68c9900bd4fd471ccea895e4 Merge: 356ff8a9a78f 8f67b5adc030 Author: Linus Torvalds Date: Sat Dec 8 11:25:02 2018 -0800 Merge tag 'xfs-4.20-fixes-3' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull xfs fixes from Darrick Wong: "Here are hopefully the last set of fixes for 4.20. There's a fix for a longstanding statfs reporting problem with project quotas, a correction for page cache invalidation behaviors when fallocating near EOF, and a fix for a broken metadata verifier return code. Finally, the most important fix is to the pipe splicing code (aka the generic copy_file_range fallback) to avoid pointless short directio reads by only asking the filesystem for as much data as there are available pages in the pipe buffer. Our previous fix (simulated short directio reads because the number of pages didn't match the length of the read requested) caused subtle problems on overlayfs, so that part is reverted. Anyhow, this series passes fstests -g all on xfs and overlay+xfs, and has passed 17 billion fsx operations problem-free since I started testing Summary: - Fix broken project quota inode counts - Fix incorrect PAGE_MASK/PAGE_SIZE usage - Fix incorrect return value in btree verifier - Fix WARN_ON remap flags false positive - Fix splice read overflows" * tag 'xfs-4.20-fixes-3' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: iomap: partially revert 4721a601099 (simulated directio short read on EFAULT) splice: don't read more than available pipe space vfs: allow some remap flags to be passed to vfs_clone_file_range xfs: fix inverted return from xfs_btree_sblock_verify_crc xfs: fix PAGE_MASK usage in xfs_free_file_space fs/xfs: fix f_ffree value for statfs when project quota is set commit 356ff8a9a78fb35d6482584d260c3754dcbdf669 Author: David Rientjes Date: Fri Dec 7 14:50:16 2018 -0800 Revert "mm, thp: consolidate THP gfp handling into alloc_hugepage_direct_gfpmask" This reverts commit 89c83fb539f95491be80cdd5158e6f0ce329e317. This should have been done as part of 2f0799a0ffc0 ("mm, thp: restore node-local hugepage allocations"). The movement of the thp allocation policy from alloc_pages_vma() to alloc_hugepage_direct_gfpmask() was intended to only set __GFP_THISNODE for mempolicies that are not MPOL_BIND whereas the revert could set this regardless of mempolicy. While the check for MPOL_BIND between alloc_hugepage_direct_gfpmask() and alloc_pages_vma() was racy, that has since been removed since the revert. What is left is the possibility to use __GFP_THISNODE in policy_node() when it is unexpected because the special handling for hugepages in alloc_pages_vma() was removed as part of the consolidation. Secondly, prior to 89c83fb539f9, alloc_pages_vma() implemented a somewhat different policy for hugepage allocations, which were allocated through alloc_hugepage_vma(). For hugepage allocations, if the allocating process's node is in the set of allowed nodes, allocate with __GFP_THISNODE for that node (for MPOL_PREFERRED, use that node with __GFP_THISNODE instead). This was changed for shmem_alloc_hugepage() to allow fallback to other nodes in 89c83fb539f9 as it did for new_page() in mm/mempolicy.c which is functionally different behavior and removes the requirement to only allocate hugepages locally. So this commit does a full revert of 89c83fb539f9 instead of the partial revert that was done in 2f0799a0ffc0. The result is the same thp allocation policy for 4.20 that was in 4.19. Fixes: 89c83fb539f9 ("mm, thp: consolidate THP gfp handling into alloc_hugepage_direct_gfpmask") Fixes: 2f0799a0ffc0 ("mm, thp: restore node-local hugepage allocations") Signed-off-by: David Rientjes Acked-by: Vlastimil Babka Cc: Andrea Arcangeli Cc: Mel Gorman Cc: Michal Hocko Cc: Andrew Morton Signed-off-by: Linus Torvalds commit 5b3279e2cba2238b37f6c18adfdea8bddb32715a Author: Benjamin Herrenschmidt Date: Fri Dec 7 15:05:04 2018 +1100 Revert "net/ibm/emac: wrong bit is used for STA control" This reverts commit 624ca9c33c8a853a4a589836e310d776620f4ab9. This commit is completely bogus. The STACR register has two formats, old and new, depending on the version of the IP block used. There's a pair of device-tree properties that can be used to specify the format used: has-inverted-stacr-oc has-new-stacr-staopc What this commit did was to change the bit definition used with the old parts to match the new parts. This of course breaks the driver on all the old ones. Instead, the author should have set the appropriate properties in the device-tree for the variant used on his board. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: David S. Miller commit 60a89a3ce0cce515dc663bc1b45ac89202ad6c79 Author: Martin K. Petersen Date: Tue Dec 4 20:58:33 2018 -0500 scsi: t10-pi: Return correct ref tag when queue has no integrity profile Commit ddd0bc756983 ("block: move ref_tag calculation func to the block layer") moved ref tag calculation from SCSI to a library function. However, this change broke returning the correct ref tag for devices operating in DIF mode since these do not have an associated block integrity profile. This in turn caused read/write failures on PI-formatted disks attached to an mpt3sas controller. Fixes: ddd0bc756983 ("block: move ref_tag calculation func to the block layer") Cc: stable@vger.kernel.org # 4.19+ Reported-by: John Garry Tested-by: Xiang Chen Signed-off-by: Martin K. Petersen commit 9ae4f8420ed7be4b13c96600e3568c144d101a23 Author: Dan Carpenter Date: Thu Nov 1 08:25:30 2018 +0300 scsi: bnx2fc: Fix NULL dereference in error handling If "interface" is NULL then we can't release it and trying to will only lead to an Oops. Fixes: aea71a024914 ("[SCSI] bnx2fc: Introduce interface structure for each vlan interface") Signed-off-by: Dan Carpenter Signed-off-by: Martin K. Petersen commit c64a87f9518409d0a439895f09f6149ffdd427b8 Author: Himanshu Madhani Date: Thu Dec 6 21:49:42 2018 -0800 Revert "scsi: qla2xxx: Fix NVMe Target discovery" This reverts commit db186382af21e926e90df19499475f2552192b77. This commit introduced regression with FCP discovery so revert it to fix discovery for FCP luns. Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit 8b78903bc5f1786f7f988d26de48819144a13d6c Merge: f9bfe4e6a9d0 e6ac64d4c4d0 Author: David S. Miller Date: Fri Dec 7 16:24:40 2018 -0800 Merge branch 'skb-headroom-slab-out-of-bounds' Stefano Brivio says: ==================== Fix slab out-of-bounds on insufficient headroom for IPv6 packets Patch 1/2 fixes a slab out-of-bounds occurring with short SCTP packets over IPv4 over L2TP over IPv6 on a configuration with relatively low HEADER_MAX. Patch 2/2 makes sure we avoid writing before the allocated buffer in neigh_hh_output() in case the headroom is enough for the unaligned hardware header size, but not enough for the aligned one, and that we warn if we hit this condition. ==================== Signed-off-by: David S. Miller commit e6ac64d4c4d095085d7dd71cbd05704ac99829b2 Author: Stefano Brivio Date: Thu Dec 6 19:30:37 2018 +0100 neighbour: Avoid writing before skb->head in neigh_hh_output() While skb_push() makes the kernel panic if the skb headroom is less than the unaligned hardware header size, it will proceed normally in case we copy more than that because of alignment, and we'll silently corrupt adjacent slabs. In the case fixed by the previous patch, "ipv6: Check available headroom in ip6_xmit() even without options", we end up in neigh_hh_output() with 14 bytes headroom, 14 bytes hardware header and write 16 bytes, starting 2 bytes before the allocated buffer. Always check we're not writing before skb->head and, if the headroom is not enough, warn and drop the packet. v2: - instead of panicking with BUG_ON(), WARN_ON_ONCE() and drop the packet (Eric Dumazet) - if we avoid the panic, though, we need to explicitly check the headroom before the memcpy(), otherwise we'll have corrupted slabs on a running kernel, after we warn - use __skb_push() instead of skb_push(), as the headroom check is already implemented here explicitly (Eric Dumazet) Signed-off-by: Stefano Brivio Signed-off-by: David S. Miller commit 66033f47ca60294a95fc85ec3a3cc909dab7b765 Author: Stefano Brivio Date: Thu Dec 6 19:30:36 2018 +0100 ipv6: Check available headroom in ip6_xmit() even without options Even if we send an IPv6 packet without options, MAX_HEADER might not be enough to account for the additional headroom required by alignment of hardware headers. On a configuration without HYPERV_NET, WLAN, AX25, and with IPV6_TUNNEL, sending short SCTP packets over IPv4 over L2TP over IPv6, we start with 100 bytes of allocated headroom in sctp_packet_transmit(), end up with 54 bytes after l2tp_xmit_skb(), and 14 bytes in ip6_finish_output2(). Those would be enough to append our 14 bytes header, but we're going to align that to 16 bytes, and write 2 bytes out of the allocated slab in neigh_hh_output(). KASan says: [ 264.967848] ================================================================== [ 264.967861] BUG: KASAN: slab-out-of-bounds in ip6_finish_output2+0x1aec/0x1c70 [ 264.967866] Write of size 16 at addr 000000006af1c7fe by task netperf/6201 [ 264.967870] [ 264.967876] CPU: 0 PID: 6201 Comm: netperf Not tainted 4.20.0-rc4+ #1 [ 264.967881] Hardware name: IBM 2827 H43 400 (z/VM 6.4.0) [ 264.967887] Call Trace: [ 264.967896] ([<00000000001347d6>] show_stack+0x56/0xa0) [ 264.967903] [<00000000017e379c>] dump_stack+0x23c/0x290 [ 264.967912] [<00000000007bc594>] print_address_description+0xf4/0x290 [ 264.967919] [<00000000007bc8fc>] kasan_report+0x13c/0x240 [ 264.967927] [<000000000162f5e4>] ip6_finish_output2+0x1aec/0x1c70 [ 264.967935] [<000000000163f890>] ip6_finish_output+0x430/0x7f0 [ 264.967943] [<000000000163fe44>] ip6_output+0x1f4/0x580 [ 264.967953] [<000000000163882a>] ip6_xmit+0xfea/0x1ce8 [ 264.967963] [<00000000017396e2>] inet6_csk_xmit+0x282/0x3f8 [ 264.968033] [<000003ff805fb0ba>] l2tp_xmit_skb+0xe02/0x13e0 [l2tp_core] [ 264.968037] [<000003ff80631192>] l2tp_eth_dev_xmit+0xda/0x150 [l2tp_eth] [ 264.968041] [<0000000001220020>] dev_hard_start_xmit+0x268/0x928 [ 264.968069] [<0000000001330e8e>] sch_direct_xmit+0x7ae/0x1350 [ 264.968071] [<000000000122359c>] __dev_queue_xmit+0x2b7c/0x3478 [ 264.968075] [<00000000013d2862>] ip_finish_output2+0xce2/0x11a0 [ 264.968078] [<00000000013d9b14>] ip_finish_output+0x56c/0x8c8 [ 264.968081] [<00000000013ddd1e>] ip_output+0x226/0x4c0 [ 264.968083] [<00000000013dbd6c>] __ip_queue_xmit+0x894/0x1938 [ 264.968100] [<000003ff80bc3a5c>] sctp_packet_transmit+0x29d4/0x3648 [sctp] [ 264.968116] [<000003ff80b7bf68>] sctp_outq_flush_ctrl.constprop.5+0x8d0/0xe50 [sctp] [ 264.968131] [<000003ff80b7c716>] sctp_outq_flush+0x22e/0x7d8 [sctp] [ 264.968146] [<000003ff80b35c68>] sctp_cmd_interpreter.isra.16+0x530/0x6800 [sctp] [ 264.968161] [<000003ff80b3410a>] sctp_do_sm+0x222/0x648 [sctp] [ 264.968177] [<000003ff80bbddac>] sctp_primitive_ASSOCIATE+0xbc/0xf8 [sctp] [ 264.968192] [<000003ff80b93328>] __sctp_connect+0x830/0xc20 [sctp] [ 264.968208] [<000003ff80bb11ce>] sctp_inet_connect+0x2e6/0x378 [sctp] [ 264.968212] [<0000000001197942>] __sys_connect+0x21a/0x450 [ 264.968215] [<000000000119aff8>] sys_socketcall+0x3d0/0xb08 [ 264.968218] [<000000000184ea7a>] system_call+0x2a2/0x2c0 [...] Just like ip_finish_output2() does for IPv4, check that we have enough headroom in ip6_xmit(), and reallocate it if we don't. This issue is older than git history. Reported-by: Jianlin Shi Signed-off-by: Stefano Brivio Signed-off-by: David S. Miller commit f9bfe4e6a9d08d405fe7b081ee9a13e649c97ecf Author: Eric Dumazet Date: Thu Dec 6 09:58:24 2018 -0800 tcp: lack of available data can also cause TSO defer tcp_tso_should_defer() can return true in three different cases : 1) We are cwnd-limited 2) We are rwnd-limited 3) We are application limited. Neal pointed out that my recent fix went too far, since it assumed that if we were not in 1) case, we must be rwnd-limited Fix this by properly populating the is_cwnd_limited and is_rwnd_limited booleans. After this change, we can finally move the silly check for FIN flag only for the application-limited case. The same move for EOR bit will be handled in net-next, since commit 1c09f7d073b1 ("tcp: do not try to defer skbs with eor mark (MSG_EOR)") is scheduled for linux-4.21 Tested by running 200 concurrent netperf -t TCP_RR -- -r 60000,100 and checking none of them was rwnd_limited in the chrono_stat output from "ss -ti" command. Fixes: 41727549de3e ("tcp: Do not underestimate rwnd_limited") Signed-off-by: Eric Dumazet Suggested-by: Neal Cardwell Reviewed-by: Neal Cardwell Acked-by: Soheil Hassas Yeganeh Reviewed-by: Yuchung Cheng Signed-off-by: David S. Miller commit 5f179793f0a73965681db6a3203fa1baabd9b3c3 Merge: b8bf4692c980 834e772c8db0 Author: Linus Torvalds Date: Fri Dec 7 14:34:10 2018 -0800 Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost Pull vhost/virtio fixes from Michael Tsirkin: "A couple of last-minute fixes" * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: vhost/vsock: fix use-after-free in network stack callers virtio/s390: fix race in ccw_io_helper() virtio/s390: avoid race on vcdev->config vhost/vsock: fix reset orphans race with close timeout commit b8bf4692c98038a1ec98faf09e545d1a32429b54 Merge: 1cdc3624a1df b4aecf78083d Author: Linus Torvalds Date: Fri Dec 7 14:18:49 2018 -0800 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fix from Catalin Marinas: "Avoid sending IPIs with interrupts disabled" * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: hibernate: Avoid sending cross-calling with interrupts disabled commit ec3d837aac5dca7cb8a69c9f101690c182da79c4 Author: Stanislav Fomichev Date: Wed Dec 5 20:40:48 2018 -0800 net/flow_dissector: correctly cap nhoff and thoff in case of BPF We want to make sure that the following condition holds: 0 <= nhoff <= thoff <= skb->len BPF program can set out-of-bounds nhoff and thoff, which is dangerous, see recent commit d0c081b49137 ("flow_dissector: properly cap thoff field")'. Signed-off-by: Stanislav Fomichev Acked-by: Song Liu Signed-off-by: Alexei Starovoitov commit 13e56ec2cc9860aa22e01ffc7a3160f35a96b728 Author: Stanislav Fomichev Date: Wed Dec 5 20:40:47 2018 -0800 selftests/bpf: use thoff instead of nhoff in BPF flow dissector We are returning thoff from the flow dissector, not the nhoff. Pass thoff along with nhoff to the bpf program (initially thoff == nhoff) and expect flow dissector amend/return thoff, not nhoff. This avoids confusion, when by the time bpf flow dissector exits, nhoff == thoff, which doesn't make much sense. Signed-off-by: Stanislav Fomichev Acked-by: Song Liu Signed-off-by: Alexei Starovoitov commit 1cdc3624a1df5b10519481763ec7a2b2481495ca Merge: 52ab2ec00518 8fb2dfb228df Author: Linus Torvalds Date: Fri Dec 7 13:13:07 2018 -0800 Merge tag 'gcc-plugins-v4.20-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull gcc stackleak plugin fixes from Kees Cook: - Remove tracing for inserted stack depth marking function (Anders Roxell) - Move gcc-plugin pass location to avoid objtool warnings (Alexander Popov) * tag 'gcc-plugins-v4.20-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: stackleak: Register the 'stackleak_cleanup' pass before the '*free_cfg' pass stackleak: Mark stackleak_track_stack() as notrace commit 52ab2ec00518a164884c5670932557cd868b0193 Merge: 7b24f6c082b3 e61efff4ae94 Author: Linus Torvalds Date: Fri Dec 7 13:07:10 2018 -0800 Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 Pull crypto fixes from Herbert Xu: - Disable the new crypto stats interface as it's still being changed - Fix potential uses-after-free in cbc/cfb/pcbc. * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: user - Disable statistics interface crypto: do not free algorithm before using commit d57f9da890696af1484f4a47f7f123560197865a Author: Damien Le Moal Date: Fri Nov 30 15:31:48 2018 +0900 dm zoned: Fix target BIO completion handling struct bioctx includes the ref refcount_t to track the number of I/O fragments used to process a target BIO as well as ensure that the zone of the BIO is kept in the active state throughout the lifetime of the BIO. However, since decrementing of this reference count is done in the target .end_io method, the function bio_endio() must be called multiple times for read and write target BIOs, which causes problems with the value of the __bi_remaining struct bio field for chained BIOs (e.g. the clone BIO passed by dm core is large and splits into fragments by the block layer), resulting in incorrect values and inconsistencies with the BIO_CHAIN flag setting. This is turn triggers the BUG_ON() call: BUG_ON(atomic_read(&bio->__bi_remaining) <= 0); in bio_remaining_done() called from bio_endio(). Fix this ensuring that bio_endio() is called only once for any target BIO by always using internal clone BIOs for processing any read or write target BIO. This allows reference counting using the target BIO context counter to trigger the target BIO completion bio_endio() call once all data, metadata and other zone work triggered by the BIO complete. Overall, this simplifies the code too as the target .end_io becomes unnecessary and differences between read and write BIO issuing and completion processing disappear. Fixes: 3b1a94c88b79 ("dm zoned: drive-managed zoned block device target") Cc: stable@vger.kernel.org Signed-off-by: Damien Le Moal Signed-off-by: Mike Snitzer commit 89f5fa47476eda56402e29fff3c5097f5c2a1e19 Author: Mike Snitzer Date: Mon Dec 3 16:47:21 2018 -0500 dm: call blk_queue_split() to impose device limits on bios Otherwise the incoming bios, of various types, won't be shaped based on the DM device's advertised limits. Depends-on: af67c31fba ("blk: remove bio_set arg from blk_queue_split()") Fixes: 744889b7cb ("block: don't deal with discard limit in blkdev_issue_discard()") Cc: stable@vger.kernel.org Signed-off-by: Mike Snitzer commit 687cf4412a343a63928a5c9d91bdc0f522939d43 Author: Mike Snitzer Date: Fri Nov 9 11:56:03 2018 -0500 dm cache metadata: verify cache has blocks in blocks_are_clean_separate_dirty() Otherwise dm_bitset_cursor_begin() return -ENODATA. Other calls to dm_bitset_cursor_begin() have similar negative checks. Fixes inability to create a cache in passthrough mode (even though doing so makes no sense). Fixes: 0d963b6e65 ("dm cache metadata: fix metadata2 format's blocks_are_clean_separate_dirty") Cc: stable@vger.kernel.org Reported-by: David Teigland Signed-off-by: Mike Snitzer commit 7b24f6c082b3777749ccd19c9beb8643fa718480 Merge: 0b43a299794e b07b864ee423 Author: Linus Torvalds Date: Fri Dec 7 12:58:34 2018 -0800 Merge tag 'pci-v4.20-fixes-3' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci Pull PCI fixes from Bjorn Helgaas: "Revert ASPM change that caused a regression" * tag 'pci-v4.20-fixes-3' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: Revert "PCI/ASPM: Do not initialize link state when aspm_disabled is set" commit 1b4e5ad5d6b9f15cd0b5121f86d4719165958417 Author: Shmulik Ladkani Date: Fri Dec 7 09:50:17 2018 +0200 ipv6: sr: properly initialize flowi6 prior passing to ip6_route_output In 'seg6_output', stack variable 'struct flowi6 fl6' was missing initialization. Fixes: 6c8702c60b88 ("ipv6: sr: add support for SRH encapsulation and injection with lwtunnels") Signed-off-by: Shmulik Ladkani Signed-off-by: David S. Miller commit 0b43a299794ee9dba2dc1b0f0290b1acab9d445d Merge: 52f842ccd615 8b878ee247ef Author: Linus Torvalds Date: Fri Dec 7 10:40:37 2018 -0800 Merge tag 'for-linus-20181207' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: "Let's try this again... We're finally happy with the DM livelock issue, and it's also passed overnight testing and the corruption regression test. The end result is much nicer now too, which is great. Outside of that fix, there's a pull request for NVMe with two small fixes, and a regression fix for BFQ from this merge window. The BFQ fix looks bigger than it is, it's 90% comment updates" * tag 'for-linus-20181207' of git://git.kernel.dk/linux-block: blk-mq: punt failed direct issue to dispatch list nvmet-rdma: fix response use after free nvme: validate controller state before rescheduling keep alive block, bfq: fix decrement of num_active_groups commit 52f842ccd615564a75ef45f8a0985ff14a0a61ce Merge: c431b42058ec ece27a337d42 Author: Linus Torvalds Date: Fri Dec 7 10:31:31 2018 -0800 Merge branch 'i2c/for-current-fixed' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c fixes from Wolfram Sang: "A set of driver bugfixes for the I2C subsystem" * 'i2c/for-current-fixed' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: i2c: uniphier-f: fix violation of tLOW requirement for Fast-mode i2c: uniphier: fix violation of tLOW requirement for Fast-mode i2c: uniphier-f: fill TX-FIFO only in IRQ handler for repeated START i2c: uniphier-f: fix timeout error after reading 8 bytes i2c: scmi: Fix probe error on devices with an empty SMB0001 ACPI device node i2c: axxia: properly handle master timeout i2c: rcar: check bus state before reinitializing i2c: nvidia-gpu: limit reads also for combined messages i2c: nvidia-gpu: adhere to I2C fault codes commit c431b42058ecad834d87fea002604dc38feccfd2 Merge: d387ac13ad12 ffe843b18211 Author: Linus Torvalds Date: Fri Dec 7 09:58:34 2018 -0800 Merge tag 'dmaengine-fix-4.20-rc6' of git://git.infradead.org/users/vkoul/slave-dma Pull dmaengine fixes from Vinod Koul: "Another pull request for dmaengine. We got bunch of fixes early this week and all are tagged to stable. Hope this is last fix for this cycle: - Fix imx-sdma handling of channel terminations, this involves reverting two commits and implement async termination - Fix cppi dma channel deletion from pending list on stop - Fix FIFO size for dw controller in Intel Merrifield" * tag 'dmaengine-fix-4.20-rc6' of git://git.infradead.org/users/vkoul/slave-dma: dmaengine: dw: Fix FIFO size for Intel Merrifield dmaengine: cppi41: delete channel from pending list when stop channel dmaengine: imx-sdma: use GFP_NOWAIT for dma descriptor allocations dmaengine: imx-sdma: implement channel termination via worker Revert "dmaengine: imx-sdma: alloclate bd memory from dma pool" Revert "dmaengine: imx-sdma: Use GFP_NOWAIT for dma allocations" commit ac3e233d29f7f77f28243af0132057d378d3ea58 Author: Nick Desaulniers Date: Thu Dec 6 11:12:31 2018 -0800 x86/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/entry/vdso/Makefile sets it to the architecture default, which is implicit and redundant. Drop it. Fixes: 2aae950b21e4 ("x86_64: Add vDSO for x86-64 with gettimeofday/clock_gettime/getcpu") Reported-by: Dmitry Golovin Reported-by: Bill Wendling Suggested-by: Dmitry Golovin Suggested-by: Rui Ueyama Signed-off-by: Nick Desaulniers Signed-off-by: Borislav Petkov Acked-by: Andy Lutomirski Cc: Andi Kleen Cc: Fangrui Song Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Thomas Gleixner Cc: x86-ml Link: https://lkml.kernel.org/r/20181206191231.192355-1-ndesaulniers@google.com Link: https://bugs.llvm.org/show_bug.cgi?id=38774 Link: https://github.com/ClangBuiltLinux/linux/issues/31 commit 153573d8870e1c173721bdc1ced72b3ad0d85de4 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 Cc: stable@vger.kernel.org commit b4aecf78083d8c6424657c1746c7c3de6e61669f Author: Will Deacon Date: Fri Dec 7 12:47:10 2018 +0000 arm64: hibernate: Avoid sending cross-calling with interrupts disabled Since commit 3b8c9f1cdfc50 ("arm64: IPI each CPU after invalidating the I-cache for kernel mappings"), a call to flush_icache_range() will use an IPI to cross-call other online CPUs so that any stale instructions are flushed from their pipelines. This triggers a WARN during the hibernation resume path, where flush_icache_range() is called with interrupts disabled and is therefore prone to deadlock: | Disabling non-boot CPUs ... | CPU1: shutdown | psci: CPU1 killed. | CPU2: shutdown | psci: CPU2 killed. | CPU3: shutdown | psci: CPU3 killed. | WARNING: CPU: 0 PID: 1 at ../kernel/smp.c:416 smp_call_function_many+0xd4/0x350 | Modules linked in: | CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.20.0-rc4 #1 Since all secondary CPUs have been taken offline prior to invalidating the I-cache, there's actually no need for an IPI and we can simply call __flush_icache_range() instead. Cc: Fixes: 3b8c9f1cdfc50 ("arm64: IPI each CPU after invalidating the I-cache for kernel mappings") Reported-by: Kunihiko Hayashi Tested-by: Kunihiko Hayashi Tested-by: James Morse Signed-off-by: Will Deacon Signed-off-by: Catalin Marinas commit 8b878ee247ef2691bd69e1bc3df5ae93738ea028 Merge: c616cbee97ae d7dcdf9d4e15 Author: Jens Axboe Date: Fri Dec 7 08:40:13 2018 -0700 Merge branch 'nvme-4.20' of git://git.infradead.org/nvme into for-linus Pull NVMe fixes from Christoph. * 'nvme-4.20' of git://git.infradead.org/nvme: nvmet-rdma: fix response use after free nvme: validate controller state before rescheduling keep alive commit c616cbee97aed4bc6178f148a7240206dcdb85a6 Author: Jens Axboe Date: Thu Dec 6 22:17:44 2018 -0700 blk-mq: punt failed direct issue to dispatch list After the direct dispatch corruption fix, we permanently disallow direct dispatch of non read/write requests. This works fine off the normal IO path, as they will be retried like any other failed direct dispatch request. But for the blk_insert_cloned_request() that only DM uses to bypass the bottom level scheduler, we always first attempt direct dispatch. For some types of requests, that's now a permanent failure, and no amount of retrying will make that succeed. This results in a livelock. Instead of making special cases for what we can direct issue, and now having to deal with DM solving the livelock while still retaining a BUSY condition feedback loop, always just add a request that has been through ->queue_rq() to the hardware queue dispatch list. These are safe to use as no merging can take place there. Additionally, if requests do have prepped data from drivers, we aren't dependent on them not sharing space in the request structure to safely add them to the IO scheduler lists. This basically reverts ffe81d45322c and is based on a patch from Ming, but with the list insert case covered as well. Fixes: ffe81d45322c ("blk-mq: fix corruption with direct issue") Cc: stable@vger.kernel.org Suggested-by: Ming Lei Reported-by: Bart Van Assche Tested-by: Ming Lei Acked-by: Mike Snitzer Signed-off-by: Jens Axboe commit d7dcdf9d4e15189ecfda24cc87339a3425448d5c Author: Israel Rukshin Date: Wed Dec 5 16:54:57 2018 +0000 nvmet-rdma: fix response use after free nvmet_rdma_release_rsp() may free the response before using it at error flow. Fixes: 8407879 ("nvmet-rdma: fix possible bogus dereference under heavy load") Signed-off-by: Israel Rukshin Reviewed-by: Sagi Grimberg Reviewed-by: Max Gurtovoy Signed-off-by: Christoph Hellwig commit 86880d646122240596d6719b642fee3213239994 Author: James Smart Date: Tue Nov 27 17:04:44 2018 -0800 nvme: validate controller state before rescheduling keep alive Delete operations are seeing NULL pointer references in call_timer_fn. Tracking these back, the timer appears to be the keep alive timer. nvme_keep_alive_work() which is tied to the timer that is cancelled by nvme_stop_keep_alive(), simply starts the keep alive io but doesn't wait for it's completion. So nvme_stop_keep_alive() only stops a timer when it's pending. When a keep alive is in flight, there is no timer running and the nvme_stop_keep_alive() will have no affect on the keep alive io. Thus, if the io completes successfully, the keep alive timer will be rescheduled. In the failure case, delete is called, the controller state is changed, the nvme_stop_keep_alive() is called while the io is outstanding, and the delete path continues on. The keep alive happens to successfully complete before the delete paths mark it as aborted as part of the queue termination, so the timer is restarted. The delete paths then tear down the controller, and later on the timer code fires and the timer entry is now corrupt. Fix by validating the controller state before rescheduling the keep alive. Testing with the fix has confirmed the condition above was hit. Signed-off-by: James Smart Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit ba7aeae5539c7a7cccc4cf07a2bc61281a93c50e Author: Paolo Valente Date: Thu Dec 6 19:18:18 2018 +0100 block, bfq: fix decrement of num_active_groups Since commit '2d29c9f89fcd ("block, bfq: improve asymmetric scenarios detection")', if there are process groups with I/O requests waiting for completion, then BFQ tags the scenario as 'asymmetric'. This detection is needed for preserving service guarantees (for details, see comments on the computation * of the variable asymmetric_scenario in the function bfq_better_to_idle). Unfortunately, commit '2d29c9f89fcd ("block, bfq: improve asymmetric scenarios detection")' contains an error exactly in the updating of the number of groups with I/O requests waiting for completion: if a group has more than one descendant process, then the above number of groups, which is renamed from num_active_groups to a more appropriate num_groups_with_pending_reqs by this commit, may happen to be wrongly decremented multiple times, namely every time one of the descendant processes gets all its pending I/O requests completed. A correct, complete solution should work as follows. Consider a group that is inactive, i.e., that has no descendant process with pending I/O inside BFQ queues. Then suppose that num_groups_with_pending_reqs is still accounting for this group, because the group still has some descendant process with some I/O request still in flight. num_groups_with_pending_reqs should be decremented when the in-flight request of the last descendant process is finally completed (assuming that nothing else has changed for the group in the meantime, in terms of composition of the group and active/inactive state of child groups and processes). To accomplish this, an additional pending-request counter must be added to entities, and must be updated correctly. To avoid this additional field and operations, this commit resorts to the following tradeoff between simplicity and accuracy: for an inactive group that is still counted in num_groups_with_pending_reqs, this commit decrements num_groups_with_pending_reqs when the first descendant process of the group remains with no request waiting for completion. This simplified scheme provides a fix to the unbalanced decrements introduced by 2d29c9f89fcd. Since this error was also caused by lack of comments on this non-trivial issue, this commit also adds related comments. Fixes: 2d29c9f89fcd ("block, bfq: improve asymmetric scenarios detection") Reported-by: Steven Barrett Tested-by: Steven Barrett Tested-by: Lucjan Lucjanov Reviewed-by: Federico Motta Signed-off-by: Paolo Valente Signed-off-by: Jens Axboe commit c201e3808e0e4be9b98d192802085a9f491bd80c Author: Peter Hutterer Date: Thu Dec 6 09:03:36 2018 +1000 Input: restore EV_ABS ABS_RESERVED ABS_RESERVED was added in d9ca1c990a7 and accidentally removed as part of ffe0e7cf290f5c9 when the high-resolution scrolling code was removed. Signed-off-by: Peter Hutterer Reviewed-by: Martin Kepplinger Acked-by: Benjamin Tissoires Acked-by: Dmitry Torokhov Signed-off-by: Benjamin Tissoires commit 868613f1c0ccf7b832f38b48b18cca31cdeb3d26 Author: Nic Soudée Date: Thu Dec 6 11:59:25 2018 -0500 HID: quirks: fix RetroUSB.com devices SNES RetroPort and RetroPad register only 4 gamepad buttons when they should register all 8 buttons. This is described here: https://ask.fedoraproject.org/en/question/128102 This is happening because of: Commit 190d7f02ce8e ("HID: input: do not increment usages when duplicate is found") Here, I add the quirk HID_QUIRK_INCREMENT_USAGE_ON_DUPLICATE (created for backward compatibility with the change in 190d7f02ce8e) for the two products. Tested with both RetroPort and RetroPad. Cc: stable@vger.kernel.org # v4.18+ Signed-off-by: Nic Soudée Signed-off-by: Benjamin Tissoires commit dbde117c31263fb632a5bfcafe4fe769663e8991 Merge: 37c2578c0c40 63cea1f73528 Author: Greg Kroah-Hartman Date: Fri Dec 7 14:05:28 2018 +0100 Merge tag 'gnss-4.20-rc6' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/gnss into char-misc-linus Johan writes: GNSS fixes for 4.20-rc6 Here's a fix for a broken activation retry loop in the sirf driver. Included are also two MAINTAINERS updates. All have been in linux-next with no reported issues. Signed-off-by: Johan Hovold * tag 'gnss-4.20-rc6' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/gnss: MAINTAINERS: exclude gnss from SIRFPRIMA2 regex matching MAINTAINERS: add gnss scm tree gnss: sirf: fix activation retry handling commit 478b6767ad26ab86d9ecc341027dd09a87b1f997 Author: Chen-Yu Tsai Date: Tue Dec 4 17:04:57 2018 +0800 pinctrl: sunxi: a83t: Fix IRQ offset typo for PH11 Pin PH11 is used on various A83T board to detect a change in the OTG port's ID pin, as in when an OTG host cable is plugged in. The incorrect offset meant the gpiochip/irqchip was activating the wrong pin for interrupts. Fixes: 4730f33f0d82 ("pinctrl: sunxi: add allwinner A83T PIO controller support") Cc: Signed-off-by: Chen-Yu Tsai Acked-by: Maxime Ripard Signed-off-by: Linus Walleij commit 59613526117b0595cb7b04835390ecd5175f9cd4 Author: Oliver O'Halloran Date: Fri Dec 7 02:17:09 2018 +1100 powerpc/papr_scm: Fix resource end address Fix an off-by-one error in the memory resource range. This resource is used to determine the address range of the memory to be hot-plugged as ZONE_DEVICE memory. The current end address results in the kernel attempting to map an additional memblock and the hypervisor may reject the mapping resulting in the entire hot-plug failing. Fixes: b5beae5e224f ("powerpc/pseries: Add driver for PAPR SCM regions") Signed-off-by: Oliver O'Halloran Signed-off-by: Michael Ellerman commit 14ebfec0712f66a4ef037fb7ac0df6a600584356 Author: Oliver O'Halloran Date: Fri Dec 7 02:17:08 2018 +1100 powerpc/papr_scm: Use depend instead of select Making PAPR_SCM select LIBNVDIMM results in circular dependencies in Kconfig when another symbol depends on it. Fix this by replacing the select with a depends. Fixes: b5beae5e224f ("powerpc/pseries: Add driver for PAPR SCM regions") Reported-by: Alastair D'Silva Signed-off-by: Oliver O'Halloran Signed-off-by: Michael Ellerman commit a6460b03f945ee216dbf42a0d9ee78d52fd470c2 Author: Sandipan Das Date: Thu Dec 6 14:57:01 2018 +0530 powerpc/bpf: Fix broken uapi for BPF_PROG_TYPE_PERF_EVENT Now that there are different variants of pt_regs for userspace and kernel, the uapi for the BPF_PROG_TYPE_PERF_EVENT program type must be changed by exporting the user_pt_regs structure instead of the pt_regs structure that is in-kernel only. Fixes: 002af9391bfb ("powerpc: Split user/kernel definitions of struct pt_regs") Signed-off-by: Sandipan Das Signed-off-by: Michael Ellerman commit e59f5e08ece1060073d92c66ded52e1f2c43b5bb Author: Hans de Goede Date: Wed Nov 28 17:57:55 2018 +0100 gpiolib-acpi: Only defer request_irq for GpioInt ACPI event handlers Commit 78d3a92edbfb ("gpiolib-acpi: Register GpioInt ACPI event handlers from a late_initcall") deferred the entire acpi_gpiochip_request_interrupt call for each event resource. This means it also delays the gpiochip_request_own_desc(..., "ACPI:Event") call. This is a problem if some AML code reads the GPIO pin before we run the deferred acpi_gpiochip_request_interrupt, because in that case acpi_gpio_adr_space_handler() will already have called gpiochip_request_own_desc(..., "ACPI:OpRegion") causing the call from acpi_gpiochip_request_interrupt to fail with -EBUSY and we will fail to register an event handler. acpi_gpio_adr_space_handler is prepared for acpi_gpiochip_request_interrupt already having claimed the pin, but the other way around does not work. One example of a problem this causes, is the event handler for the OTG ID pin on a Prowise PT301 tablet not registering, keeping the port stuck in whatever mode it was in during boot and e.g. only allowing charging after a reboot. This commit fixes this by only deferring the request_irq call and the initial run of edge-triggered IRQs instead of deferring all of acpi_gpiochip_request_interrupt. Cc: stable@vger.kernel.org Fixes: 78d3a92edbfb ("gpiolib-acpi: Register GpioInt ACPI event ...") Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Acked-by: Mika Westerberg Signed-off-by: Linus Walleij commit 530aad77010b81526586dfc09130ec875cd084e4 Author: Florian Westphal Date: Wed Dec 5 14:12:19 2018 +0100 netfilter: seqadj: re-load tcp header pointer after possible head reallocation When adjusting sack block sequence numbers, skb_make_writable() gets called to make sure tcp options are all in the linear area, and buffer is not shared. This can cause tcp header pointer to get reallocated, so we must reaload it to avoid memory corruption. This bug pre-dates git history. Reported-by: Neel Mehta Reported-by: Shane Huntley Reported-by: Heather Adkins Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit bde1a7459623a66c2abec4d0a841e4b06cc88d9a Author: Kailang Yang Date: Fri Dec 7 15:14:59 2018 +0800 ALSA: hda/realtek - Fixed headphone issue for ALC700 If it plugged headphone or headset into the jack, then do the reboot, it will have a chance to cause headphone no sound. It just need to run the headphone mode procedure after boot time. The issue will be fixed. It also suitable for ALC234 ALC274 and ALC294. Signed-off-by: Kailang Yang Cc: Signed-off-by: Takashi Iwai commit 6ac79291fb7dae4402b306789b1cb85f84687e44 Author: Long Li Date: Thu Dec 6 04:51:06 2018 +0000 CIFS: Avoid returning EBUSY to upper layer VFS EBUSY is not handled by VFS, and will be passed to user-mode. This is not correct as we need to wait for more credits. This patch also fixes a bug where rsize or wsize is used uninitialized when the call to server->ops->wait_mtu_credits() fails. Reported-by: Dan Carpenter Signed-off-by: Long Li Signed-off-by: Steve French Reviewed-by: Pavel Shilovsky commit e61efff4ae94f4509707a5e03f8edb6455f490e1 Author: Herbert Xu Date: Fri Dec 7 13:56:08 2018 +0800 crypto: user - Disable statistics interface Since this user-space API is still undergoing significant changes, this patch disables it for the current merge window. Signed-off-by: Herbert Xu commit d387ac13ad12194a62d268a6b7a0633ef832f6bd Merge: 7f80c7325be4 e594a5e349dd Author: Linus Torvalds Date: Thu Dec 6 19:35:50 2018 -0800 Merge tag 'drm-fixes-2018-12-07' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "There's a bit more in here than I'd like, and I'm hoping things calm down when I'm out. msm: - a bunch of display fixes for the new DPU - a couple of command submission fixes omap: - some DSI fixes ast: - driver unload crash fix core: - fix the lease uevent so userspace can distinguish it amd: - fix a bpc regression - fix lru handling regression - fixed firmware support for new GPUs - power management fixes for vega20" * tag 'drm-fixes-2018-12-07' of git://anongit.freedesktop.org/drm/drm: (37 commits) drm/ast: Fix connector leak during driver unload drm/amdgpu/vcn: Update vcn.cur_state during suspend drm/amd/display: Fix overflow/truncation from strncpy. drm/amd/powerplay: improve OD code robustness drm/amdgpu: enlarge maximum waiting time of KIQ drm/fb-helper: Fix typo in parameter description drm/amd/powerplay: support SoftMin/Max setting for some specific DPM drm/amd/powerplay: issue pre-display settings for display change event drm/amd/powerplay: support new pptable upload on Vega20 drm/amdgpu/gmc8: always load MC firmware in the driver drm/amdgpu/gmc8: update MC firmware for polaris drm/amdgpu: update mc firmware image for polaris12 variants drm/msm: Fix error return checking drm/msm/dpu: Ignore alpha for XBGR8888 format drm/msm: dpu: Fix "WARNING: invalid free of devm_ allocated data" drm/msm/hdmi: Drop pointless static qualifier in msm_hdmi_bind() drm/msm: Move fence put to where failure occurs drm/msm: dpu: Don't set legacy plane->crtc pointer drm/msm/gpu: Don't map command buffers with nr_relocs equal to 0 drm/msm/hdmi: Enable HPD after HDMI IRQ is set up ... commit 7f80c7325be49db3fb8b5f343f47691b7999fda7 Merge: b72f711a4efa 79462857eb54 Author: Linus Torvalds Date: Thu Dec 6 18:57:04 2018 -0800 Merge tag 'nfs-for-4.20-5' of git://git.linux-nfs.org/projects/trondmy/linux-nfs Pull NFS client bugfixes from Trond Myklebust: "This is mainly fallout from the updates to the SUNRPC code that is being triggered from less common combinations of NFS mount options. Highlights include: Stable fixes: - Fix a page leak when using RPCSEC_GSS/krb5p to encrypt data. Bugfixes: - Fix a regression that causes the RPC receive code to hang - Fix call_connect_status() so that it handles tasks that got transmitted while queued waiting for the socket lock. - Fix a memory leak in call_encode() - Fix several other connect races. - Fix receive code error handling. - Use the discard iterator rather than MSG_TRUNC for compatibility with AF_UNIX/AF_LOCAL sockets. - nfs: don't dirty kernel pages read by direct-io - pnfs/Flexfiles fix to enforce per-mirror stateid only for NFSv4 data servers" * tag 'nfs-for-4.20-5' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: SUNRPC: Don't force a redundant disconnection in xs_read_stream() SUNRPC: Fix up socket polling SUNRPC: Use the discard iterator rather than MSG_TRUNC SUNRPC: Treat EFAULT as a truncated message in xs_read_stream_request() SUNRPC: Fix up handling of the XDRBUF_SPARSE_PAGES flag SUNRPC: Fix RPC receive hangs SUNRPC: Fix a potential race in xprt_connect() SUNRPC: Fix a memory leak in call_encode() SUNRPC: Fix leak of krb5p encode pages SUNRPC: call_connect_status() must handle tasks that got transmitted nfs: don't dirty kernel pages read by direct-io flexfiles: enforce per-mirror stateid only for v4 DSes commit b72f711a4efadfaa8a16f9cb708bfe1ce6125906 Merge: 7e40b56c776f 3a4d0c2172bc Author: Linus Torvalds Date: Thu Dec 6 16:45:36 2018 -0800 Merge branch 'spectre' of git://git.armlinux.org.uk/~rmk/linux-arm Pull ARM spectre fix from Russell King: "Exynos folk noticed that CPU hotplug wasn't working with their kernel configuration, and have tested this as fixing the problem" * 'spectre' of git://git.armlinux.org.uk/~rmk/linux-arm: ARM: ensure that processor vtables is not lost after boot commit 7e40b56c776f75a35838360bf6360e2aa9311f92 Merge: abb8d6ecbd8f c2a3831df6dc Author: Linus Torvalds Date: Thu Dec 6 16:39:44 2018 -0800 Merge branch 'fixes' of git://git.armlinux.org.uk/~rmk/linux-arm Pull ARM fixes from Russell King: "Some small fixes that have been accumulated: - Chris Cole noticed that in a SMP environment, the DMA cache coherence handling can produce undesirable results in a corner case - Propagate that fix for ARMv7M as well - Fix a false positive with source fortification - Fix an uninitialised return that Nathan Jones spotted" * 'fixes' of git://git.armlinux.org.uk/~rmk/linux-arm: ARM: 8816/1: dma-mapping: fix potential uninitialized return ARM: 8815/1: V7M: align v7m_dma_inv_range() with v7 counterpart ARM: 8814/1: mm: improve/fix ARM v7_dma_inv_range() unaligned address handling ARM: 8806/1: kprobes: Fix false positive with FORTIFY_SOURCE commit ece27a337d42a3197935711997f2880f0957ed7e Author: Masahiro Yamada Date: Thu Dec 6 12:55:28 2018 +0900 i2c: uniphier-f: fix violation of tLOW requirement for Fast-mode Currently, the clock duty is set as tLOW/tHIGH = 1/1. For Fast-mode, tLOW is set to 1.25 us while the I2C spec requires tLOW >= 1.3 us. tLOW/tHIGH = 5/4 would meet both Standard-mode and Fast-mode: Standard-mode: tLOW = 5.56 us, tHIGH = 4.44 us Fast-mode: tLOW = 1.39 us, tHIGH = 1.11 us Signed-off-by: Masahiro Yamada Signed-off-by: Wolfram Sang commit 8469636ab5d8c77645b953746c10fda6983a8830 Author: Masahiro Yamada Date: Thu Dec 6 12:55:27 2018 +0900 i2c: uniphier: fix violation of tLOW requirement for Fast-mode Currently, the clock duty is set as tLOW/tHIGH = 1/1. For Fast-mode, tLOW is set to 1.25 us while the I2C spec requires tLOW >= 1.3 us. tLOW/tHIGH = 5/4 would meet both Standard-mode and Fast-mode: Standard-mode: tLOW = 5.56 us, tHIGH = 4.44 us Fast-mode: tLOW = 1.39 us, tHIGH = 1.11 us Signed-off-by: Masahiro Yamada Signed-off-by: Wolfram Sang commit cd8843f541cc0ef057e27f1afba46374bbb84219 Author: Masahiro Yamada Date: Thu Dec 6 12:55:26 2018 +0900 i2c: uniphier-f: fill TX-FIFO only in IRQ handler for repeated START - For a repeated START condition, this controller starts data transfer immediately after the slave address is written to the TX-FIFO. - Once the TX-FIFO empty interrupt is asserted, the controller makes a pause even if additional data are written to the TX-FIFO. Given those circumstances, the data after a repeated START may not be transferred if the interrupt is asserted while the TX-FIFO is being filled up. A more reliable way is to append TX data only in the interrupt handler. Signed-off-by: Masahiro Yamada Signed-off-by: Wolfram Sang commit c2a653deaa81f5a750c0dfcbaf9f8e5195cbe4a5 Author: Masahiro Yamada Date: Thu Dec 6 12:55:25 2018 +0900 i2c: uniphier-f: fix timeout error after reading 8 bytes I was totally screwed up in commit eaba68785c2d ("i2c: uniphier-f: fix race condition when IRQ is cleared"). Since that commit, if the number of read bytes is multiple of the FIFO size (8, 16, 24... bytes), the STOP condition could be issued twice, depending on the timing. If this happens, the controller will go wrong, resulting in the timeout error. It was more than 3 years ago when I wrote this driver, so my memory about this hardware was vague. Please let me correct the description in the commit log of eaba68785c2d. Clearing the IRQ status on exiting the IRQ handler is absolutely fine. This controller makes a pause while any IRQ status is asserted. If the IRQ status is cleared first, the hardware may start the next transaction before the IRQ handler finishes what it supposed to do. This partially reverts the bad commit with clear comments so that I will never repeat this mistake. I also investigated what is happening at the last moment of the read mode. The UNIPHIER_FI2C_INT_RF interrupt is asserted a bit earlier (by half a period of the clock cycle) than UNIPHIER_FI2C_INT_RB. I consulted a hardware engineer, and I got the following information: UNIPHIER_FI2C_INT_RF asserted at the falling edge of SCL at the 8th bit. UNIPHIER_FI2C_INT_RB asserted at the rising edge of SCL at the 9th (ACK) bit. In order to avoid calling uniphier_fi2c_stop() twice, check the latter interrupt. I also commented this because it is obscure hardware internal. Fixes: eaba68785c2d ("i2c: uniphier-f: fix race condition when IRQ is cleared") Signed-off-by: Masahiro Yamada Signed-off-by: Wolfram Sang commit 0544ee4b1ad574aec3b6379af5f5cdee42840971 Author: Hans de Goede Date: Wed Nov 21 10:19:55 2018 +0100 i2c: scmi: Fix probe error on devices with an empty SMB0001 ACPI device node Some AMD based HP laptops have a SMB0001 ACPI device node which does not define any methods. This leads to the following error in dmesg: [ 5.222731] cmi: probe of SMB0001:00 failed with error -5 This commit makes acpi_smbus_cmi_add() return -ENODEV instead in this case silencing the error. In case of a failure of the i2c_add_adapter() call this commit now propagates the error from that call instead of -EIO. Signed-off-by: Hans de Goede Signed-off-by: Wolfram Sang commit 6c7f25cae54b840302e4f1b371dbf318fbf09ab2 Author: Adamski, Krzysztof (Nokia - PL/Wroclaw) Date: Fri Nov 16 13:24:41 2018 +0000 i2c: axxia: properly handle master timeout According to Intel (R) Axxia TM Lionfish Communication Processor Peripheral Subsystem Hardware Reference Manual, the AXXIA I2C module have a programmable Master Wait Timer, which among others, checks the time between commands send in manual mode. When a timeout (25ms) passes, TSS bit is set in Master Interrupt Status register and a Stop command is issued by the hardware. The axxia_i2c_xfer(), does not properly handle this situation, however. For each message a separate axxia_i2c_xfer_msg() is called and this function incorrectly assumes that any interrupt might happen only when waiting for completion. This is mostly correct but there is one exception - a master timeout can trigger if enough time has passed between individual transfers. It will, by definition, happen between transfers when the interrupts are disabled by the code. If that happens, the hardware issues Stop command. The interrupt indicating timeout will not be triggered as soon as we enable them since the Master Interrupt Status is cleared when master mode is entered again (which happens before enabling irqs) meaning this error is lost and the transfer is continued even though the Stop was issued on the bus. The subsequent operations completes without error but a bogus value (0xFF in case of read) is read as the client device is confused because aborted transfer. No error is returned from master_xfer() making caller believe that a valid value was read. To fix the problem, the TSS bit (indicating timeout) in Master Interrupt Status register is checked before each transfer. If it is set, there was a timeout before this transfer and (as described above) the hardware already issued Stop command so the transaction should be aborted thus -ETIMEOUT is returned from the master_xfer() callback. In order to be sure no timeout was issued we can't just read the status just before starting new transaction as there will always be a small window of time (few CPU cycles at best) where this might still happen. For this reason we have to temporally disable the timer before checking for TSS bit. Disabling it will, however, clear the TSS bit so in order to preserve that information, we have to read it in ISR so we have to ensure that the TSS interrupt is not masked between transfers of one transaction. There is no need to call bus recovery or controller reinitialization if that happens so it's skipped. Signed-off-by: Krzysztof Adamski Reviewed-by: Alexander Sverdlin Signed-off-by: Wolfram Sang commit cd9d1a2332b01b043935c0ec9bb675effb67aac9 Merge: ebaf39e6032f 993107fea5ee Author: David S. Miller Date: Thu Dec 6 13:31:09 2018 -0800 Merge branch 'mlxsw-Various-fixes' Ido Schimmel says: ==================== mlxsw: Various fixes Patches #1 and #2 fix two VxLAN related issues. The first patch removes warnings that can currently be triggered from user space. Second patch avoids leaking a FID in an error path. Patch #3 fixes a too strict check that causes certain host routes not to be promoted to perform GRE decapsulation in hardware. Last patch avoids a use-after-free when deleting a VLAN device via an ioctl when it is enslaved to a bridge. I have a patchset for net-next that reworks this code and makes the driver more robust. ==================== Signed-off-by: David S. Miller commit 993107fea5eefdfdfde1ca38d3f01f0bebf76e77 Author: Ido Schimmel Date: Thu Dec 6 17:44:53 2018 +0000 mlxsw: spectrum_switchdev: Fix VLAN device deletion via ioctl When deleting a VLAN device using an ioctl the netdev is unregistered before the VLAN filter is updated via ndo_vlan_rx_kill_vid(). It can lead to a use-after-free in mlxsw in case the VLAN device is deleted while being enslaved to a bridge. The reason for the above is that when mlxsw receives the CHANGEUPPER event, it wrongly assumes that the VLAN device is no longer its upper and thus destroys the internal representation of the bridge port despite the reference count being non-zero. Fix this by checking if the VLAN device is our upper using its real device. In net-next I'm going to remove this trick and instead make mlxsw completely agnostic to the order of the events. Fixes: c57529e1d5d8 ("mlxsw: spectrum: Replace vPorts with Port-VLAN") Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit da93d2913fdf43d5cde3c5a53ac9cc29684d5c7c Author: Nir Dotan Date: Thu Dec 6 17:44:52 2018 +0000 mlxsw: spectrum_router: Relax GRE decap matching check GRE decap offload is configured when local routes prefix correspond to the local address of one of the offloaded GRE tunnels. The matching check was found to be too strict, such that for a flat GRE configuration, in which the overlay and underlay traffic share the same non-default VRF, decap flow was not offloaded. Relax the check for decap flow offloading. A match occurs if the local address of the tunnel matches the local route address while both share the same VRF table. Fixes: 4607f6d26950 ("mlxsw: spectrum_router: Support IPv4 underlay decap") Signed-off-by: Nir Dotan Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit f58a83c207b791c6586b9675a589db5c6ac7909e Author: Ido Schimmel Date: Thu Dec 6 17:44:51 2018 +0000 mlxsw: spectrum_switchdev: Avoid leaking FID's reference count It should never be possible for a user to set a VNI on a FID in case one is already set. The driver therefore returns an error, but fails to drop the reference count taken earlier when calling mlxsw_sp_fid_8021d_lookup(). Drop the reference when this unlikely error is hit. Fixes: 1c30d1836aeb ("mlxsw: spectrum: Enable VxLAN enslavement to bridges") Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit 050fc01fb1d916058605569cd7f4e15152afc3af Author: Ido Schimmel Date: Thu Dec 6 17:44:50 2018 +0000 mlxsw: spectrum_nve: Remove easily triggerable warnings It is possible to trigger a warning in mlxsw in case a flood entry which mlxsw is not aware of is deleted from the VxLAN device. This is because mlxsw expects to find a singly linked list where the flood entry is present in. Fix by removing these warnings for now. Will re-add them in the next release after we teach mlxsw to ask for a dump of FDB entries from the VxLAN device, once it is enslaved to a bridge mlxsw cares about. Fixes: 6e6030bd5412 ("mlxsw: spectrum_nve: Implement common NVE core") Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit 834e772c8db0c6a275d75315d90aba4ebbb1e249 Author: Stefan Hajnoczi Date: Mon Nov 5 10:35:47 2018 +0000 vhost/vsock: fix use-after-free in network stack callers If the network stack calls .send_pkt()/.cancel_pkt() during .release(), a struct vhost_vsock use-after-free is possible. This occurs because .release() does not wait for other CPUs to stop using struct vhost_vsock. Switch to an RCU-enabled hashtable (indexed by guest CID) so that .release() can wait for other CPUs by calling synchronize_rcu(). This also eliminates vhost_vsock_lock acquisition in the data path so it could have a positive effect on performance. This is CVE-2018-14625 "kernel: use-after-free Read in vhost_transport_send_pkt". Cc: stable@vger.kernel.org Reported-and-tested-by: syzbot+bd391451452fb0b93039@syzkaller.appspotmail.com Reported-by: syzbot+e3e074963495f92a89ed@syzkaller.appspotmail.com Reported-by: syzbot+d5a0a170c5069658b141@syzkaller.appspotmail.com Signed-off-by: Stefan Hajnoczi Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang commit 78b1a52e05c9db11d293342e8d6d8a230a04b4e7 Author: Halil Pasic Date: Wed Sep 26 18:48:30 2018 +0200 virtio/s390: fix race in ccw_io_helper() While ccw_io_helper() seems like intended to be exclusive in a sense that it is supposed to facilitate I/O for at most one thread at any given time, there is actually nothing ensuring that threads won't pile up at vcdev->wait_q. If they do, all threads get woken up and see the status that belongs to some other request than their own. This can lead to bugs. For an example see: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1788432 This race normally does not cause any problems. The operations provided by struct virtio_config_ops are usually invoked in a well defined sequence, normally don't fail, and are normally used quite infrequent too. Yet, if some of the these operations are directly triggered via sysfs attributes, like in the case described by the referenced bug, userspace is given an opportunity to force races by increasing the frequency of the given operations. Let us fix the problem by ensuring, that for each device, we finish processing the previous request before starting with a new one. Signed-off-by: Halil Pasic Reported-by: Colin Ian King Cc: stable@vger.kernel.org Message-Id: <20180925121309.58524-3-pasic@linux.ibm.com> Signed-off-by: Cornelia Huck Signed-off-by: Michael S. Tsirkin commit 2448a299ec416a80f699940a86f4a6d9a4f643b1 Author: Halil Pasic Date: Wed Sep 26 18:48:29 2018 +0200 virtio/s390: avoid race on vcdev->config Currently we have a race on vcdev->config in virtio_ccw_get_config() and in virtio_ccw_set_config(). This normally does not cause problems, as these are usually infrequent operations. However, for some devices writing to/reading from the config space can be triggered through sysfs attributes. For these, userspace can force the race by increasing the frequency. Signed-off-by: Halil Pasic Cc: stable@vger.kernel.org Message-Id: <20180925121309.58524-2-pasic@linux.ibm.com> Signed-off-by: Cornelia Huck Signed-off-by: Michael S. Tsirkin commit c38f57da428b033f2721b611d84b1f40bde674a8 Author: Stefan Hajnoczi Date: Thu Dec 6 19:14:34 2018 +0000 vhost/vsock: fix reset orphans race with close timeout If a local process has closed a connected socket and hasn't received a RST packet yet, then the socket remains in the table until a timeout expires. When a vhost_vsock instance is released with the timeout still pending, the socket is never freed because vhost_vsock has already set the SOCK_DONE flag. Check if the close timer is pending and let it close the socket. This prevents the race which can leak sockets. Reported-by: Maximilian Riemensberger Cc: Graham Whaley Signed-off-by: Stefan Hajnoczi Signed-off-by: Michael S. Tsirkin commit abb8d6ecbd8f7801c048f6543f79d22d24cead7b Merge: 2acee31cce65 1aed58e67a6e Author: Linus Torvalds Date: Thu Dec 6 10:35:19 2018 -0800 Merge tag 'trace-v4.20-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing fix from Steven Rostedt: "This is a single commit that fixes a bug in uprobes SDT code due to a missing mutex protection" * tag 'trace-v4.20-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: Uprobes: Fix kernel oops with delayed_uprobe_remove() commit 2acee31cce656cca9e81072c330c1322e1376155 Merge: 002f421a84c5 b72f936f6b32 Author: Linus Torvalds Date: Thu Dec 6 09:25:53 2018 -0800 Merge tag 'sound-4.20-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "Still more incoming fixes than wished at this stage, but all look like small and reasonable fixes. In addition to the usual HD-audio and USB-audio quirks for various devices, two notable changes are included: - a fix for USB-audio UAF at probing a malformed descriptor - workarounds for PCM rwsem mutex starvation" * tag 'sound-4.20-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: hda/realtek: Fix mic issue on Acer AIO Veriton Z4860G/Z6860G ALSA: hda/realtek: Fix mic issue on Acer AIO Veriton Z4660G ALSA: hda/realtek - Add support for Acer Aspire C24-860 headset mic ALSA: hda/realtek: ALC286 mic and headset-mode fixups for Acer Aspire U27-880 ALSA: usb-audio: Fix UAF decrement if card has no live interfaces in card.c ALSA: hda/realtek - Fix speaker output regression on Thinkpad T570 ALSA: pcm: Fix interval evaluation with openmin/max ALSA: hda: Add support for AMD Stoney Ridge ALSA: usb-audio: Add SMSL D1 to quirks for native DSD support ALSA: pcm: Fix starvation on down_write_nonblock() ALSA: pcm: Call snd_pcm_unlink() conditionally at closing commit 002f421a84c5a9260bf0e312af5d5043b3555511 Merge: cf76c364a1e1 63e19c8216bb Author: Linus Torvalds Date: Thu Dec 6 09:23:34 2018 -0800 Merge tag 'csky-4.20-rc6' of github.com:c-sky/csky-linux Pull C-SKY fixes from Guo Ren: - bugfix for tlb_get_pgd() error - update MAINTAINERS file for C-SKY drivers * tag 'csky-4.20-rc6' of github.com:c-sky/csky-linux: csky: bugfix tlb_get_pgd error. MAINTAINERS: add maintainer for C-SKY drivers commit ffe843b18211301ad25893eba09f402c19d12304 Author: Andy Shevchenko Date: Wed Dec 5 18:33:59 2018 +0200 dmaengine: dw: Fix FIFO size for Intel Merrifield Intel Merrifield has a reduced size of FIFO used in iDMA 32-bit controller, i.e. 512 bytes instead of 1024. Fix this by partitioning it as 64 bytes per channel. Note, in the future we might switch to 'fifo-size' property instead of hard coded value. Fixes: 199244d69458 ("dmaengine: dw: add support of iDMA 32-bit hardware") Signed-off-by: Andy Shevchenko Cc: stable@vger.kernel.org Signed-off-by: Vinod Koul commit 8fb2dfb228df785bbeb4d055a74402ef4b07fc25 Author: Alexander Popov Date: Thu Dec 6 18:13:07 2018 +0300 stackleak: Register the 'stackleak_cleanup' pass before the '*free_cfg' pass Currently the 'stackleak_cleanup' pass deleting a CALL insn is executed after the 'reload' pass. That allows gcc to do some weird optimization in function prologues and epilogues, which are generated later [1]. Let's avoid that by registering the 'stackleak_cleanup' pass before the '*free_cfg' pass. It's the moment when the stack frame size is already final, function prologues and epilogues are generated, and the machine-dependent code transformations are not done. [1] https://www.openwall.com/lists/kernel-hardening/2018/11/23/2 Reported-by: kbuild test robot Signed-off-by: Alexander Popov Signed-off-by: Kees Cook commit 3caad34eab57e622dad48086af7f89c19001664e Merge: 0472bf06c6fd f51ccf46217c Author: Greg Kroah-Hartman Date: Thu Dec 6 18:02:58 2018 +0100 Merge tag 'usb-serial-4.20-rc6' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-linus Johan writes: USB-serial fix for v4.20-rc6 Here's a fix for a reported USB-console regression in 4.18 which revealed a long-standing bug in the console implementation. The patch has been in linux-next over night with no reported issues. Signed-off-by: Johan Hovold * tag 'usb-serial-4.20-rc6' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial: USB: serial: console: fix reported terminal settings commit 3a4d0c2172bcf15b7a3d9d498b2b355f9864286b Author: Russell King Date: Thu Dec 6 16:36:38 2018 +0000 ARM: ensure that processor vtables is not lost after boot Marek Szyprowski reported problems with CPU hotplug in current kernels. This was tracked down to the processor vtables being located in an init section, and therefore discarded after kernel boot, despite being required after boot to properly initialise the non-boot CPUs. Arrange for these tables to end up in .rodata when required. Reported-by: Marek Szyprowski Tested-by: Krzysztof Kozlowski Fixes: 383fb3ee8024 ("ARM: spectre-v2: per-CPU vtables to work around big.Little systems") Signed-off-by: Russell King commit 47f07f03b5ee436fe074c4fb1fb28d013c36a0d8 Author: Yishai Hadas Date: Wed Dec 5 15:50:21 2018 +0200 IB/mlx5: Block DEVX umem from the non applicable cases Blocks creating a DEVX UMEM with the non applicable access flags as of ODP, MW_BIND, etc. Specifically when an ODP flag is used below WARN call trace is issued. [ 2510.404131] RIP: 0010:__mlx5_ib_populate_pas+0x207/0x220 [mlx5_ib] ... [ 2510.404143] Call Trace: [ 2510.404150] ? __kmalloc_node+0x1b3/0x280 [ 2510.404156] ? _uverbs_alloc+0x63/0x90 [ib_uverbs] [ 2510.404158] ? _uverbs_alloc+0x63/0x90 [ib_uverbs] [ 2510.404162] mlx5_ib_populate_pas+0x53/0x60 [mlx5_ib] [ 2510.404167] mlx5_ib_handler_MLX5_IB_METHOD_DEVX_UMEM_REG+0x273/0x3f0 [mlx5_ib] Fixes: aeae94579caf ("IB/mlx5: Add DEVX support for memory registration") Signed-off-by: Yishai Hadas Reviewed-by: Artemy Kovalyov Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford commit 63cea1f735284b2244e3f031625c65373520eff9 Author: Johan Hovold Date: Thu Dec 6 07:23:18 2018 +0100 MAINTAINERS: exclude gnss from SIRFPRIMA2 regex matching Exclude the gnss subsystem from SIRMPRIMA2 regex matching, which would otherwise match the unrelated gnss sirf driver. Cc: Barry Song Signed-off-by: Johan Hovold commit 85280de450f1ce8997b3ccfd0e504a942e5fa2d8 Author: Johan Hovold Date: Thu Dec 6 07:23:17 2018 +0100 MAINTAINERS: add gnss scm tree Add SCM tree for the gnss subsystem. Signed-off-by: Johan Hovold commit 06fd9ab12b804451b14d538adbf98a57c2d6846b Author: Johan Hovold Date: Wed Dec 5 11:21:49 2018 +0100 gnss: sirf: fix activation retry handling Fix activation helper which would return -ETIMEDOUT even if the last retry attempt was successful. Also change the semantics of the retries variable so that it actually holds the number of retries (rather than tries). Fixes: d2efbbd18b1e ("gnss: add driver for sirfstar-based receivers") Cc: stable # 4.19 Signed-off-by: Johan Hovold commit b7d624ab431227af376787148cd7d474088c03aa Author: Guo Ren Date: Thu Dec 6 10:07:40 2018 +0800 asm-generic: unistd.h: fixup broken macro include. The broken macros make the glibc compile error. If there is no __NR3264_fstat*, we should also removed related definitions. Reported-by: Marcin Juszkiewicz Fixes: bf4b6a7d371e ("y2038: Remove stat64 family from default syscall set") [arnd: Both Marcin and Guo provided this patch to fix up my clearly broken commit, I applied the version with the better changelog.] Signed-off-by: Guo Ren Signed-off-by: Mao Han Cc: Arnd Bergmann Signed-off-by: Arnd Bergmann commit a50480cb6d61d5c5fc13308479407b628b6bc1c5 Author: Andrea Righi Date: Thu Dec 6 10:56:48 2018 +0100 kprobes/x86: Blacklist non-attachable interrupt functions These interrupt functions are already non-attachable by kprobes. Blacklist them explicitly so that they can show up in /sys/kernel/debug/kprobes/blacklist and tools like BCC can use this additional information. Signed-off-by: Andrea Righi Cc: Andy Lutomirski Cc: Anil S Keshavamurthy Cc: Borislav Petkov Cc: David S. Miller Cc: Linus Torvalds Cc: Masami Hiramatsu Cc: Naveen N. Rao Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Yonghong Song Link: http://lkml.kernel.org/r/20181206095648.GA8249@Dell Signed-off-by: Ingo Molnar commit dada6a43b0402eba438a17ac86fdc64ac56a4607 Author: Macpaul Lin Date: Wed Oct 17 23:08:38 2018 +0800 kgdboc: fix KASAN global-out-of-bounds bug in param_set_kgdboc_var() This patch is trying to fix KE issue due to "BUG: KASAN: global-out-of-bounds in param_set_kgdboc_var+0x194/0x198" reported by Syzkaller scan." [26364:syz-executor0][name:report8t]BUG: KASAN: global-out-of-bounds in param_set_kgdboc_var+0x194/0x198 [26364:syz-executor0][name:report&]Read of size 1 at addr ffffff900e44f95f by task syz-executor0/26364 [26364:syz-executor0][name:report&] [26364:syz-executor0]CPU: 7 PID: 26364 Comm: syz-executor0 Tainted: G W 0 [26364:syz-executor0]Call trace: [26364:syz-executor0][] dump_bacIctrace+Ox0/0x470 [26364:syz-executor0][] show_stack+0x20/0x30 [26364:syz-executor0][] dump_stack+Oxd8/0x128 [26364:syz-executor0][] print_address_description +0x80/0x4a8 [26364:syz-executor0][] kasan_report+Ox178/0x390 [26364:syz-executor0][] _asan_report_loadi_noabort+Ox18/0x20 [26364:syz-executor0][] param_set_kgdboc_var+Ox194/0x198 [26364:syz-executor0][] param_attr_store+Ox14c/0x270 [26364:syz-executor0][] module_attr_store+0x60/0x90 [26364:syz-executor0][] sysfs_kl_write+Ox100/0x158 [26364:syz-executor0][] kernfs_fop_write+0x27c/0x3a8 [26364:syz-executor0][] do_loop_readv_writev+0x114/0x1b0 [26364:syz-executor0][] do_readv_writev+0x4f8/0x5e0 [26364:syz-executor0][] vfs_writev+0x7c/Oxb8 [26364:syz-executor0][] SyS_writev+Oxcc/0x208 [26364:syz-executor0][] elO_svc_naked +0x24/0x28 [26364:syz-executor0][name:report&] [26364:syz-executor0][name:report&]The buggy address belongs to the variable: [26364:syz-executor0][name:report&] kgdb_tty_line+Ox3f/0x40 [26364:syz-executor0][name:report&] [26364:syz-executor0][name:report&]Memory state around the buggy address: [26364:syz-executor0] ffffff900e44f800: 00 00 00 00 00 04 fa fa fa fa fa fa 00 fa fa fa [26364:syz-executor0] ffffff900e44f880: fa fa fa fa 00 fa fa fa fa fa fa fa 00 fa fa fa [26364:syz-executor0]> ffffff900e44f900: fa fa fa fa 04 fa fa fa fa fa fa fa 00 00 00 00 [26364:syz-executor0][name:report&] ^ [26364:syz-executor0] ffffff900e44f980: 00 fa fa fa fa fa fa fa 04 fa fa fa fa fa fa fa [26364:syz-executor0] ffffff900e44fa00: 04 fa fa fa fa fa fa fa 00 fa fa fa fa fa fa fa [26364:syz-executor0][name:report&] [26364:syz-executor0][name:panic&]Disabling lock debugging due to kernel taint [26364:syz-executor0]------------[cut here]------------ After checking the source code, we've found there might be an out-of-bounds access to "config[len - 1]" array when the variable "len" is zero. Signed-off-by: Macpaul Lin Acked-by: Daniel Thompson Cc: stable Signed-off-by: Greg Kroah-Hartman commit 4f145cd66a1a76136ff5a03a99e37ba082715dc6 Author: Matthew Wilcox Date: Thu Nov 29 16:04:35 2018 -0500 XArray tests: Check iterating over multiorder entries There was no bug here, but there was no test coverage for this scenario. Signed-off-by: Matthew Wilcox commit b7677a132a4c2ff877986c5b30f9427127b9897a Author: Matthew Wilcox Date: Mon Nov 5 13:19:54 2018 -0500 XArray tests: Handle larger indices more elegantly xa_mk_value() only handles values up to LONG_MAX. I successfully hid that inside xa_store_index() and xa_erase_index(), but it turned out I also needed it for testing xa_alloc() on 32-bit machines. So extract xa_mk_index() from the above two functions, and convert the non-constant users of xa_mk_value() to xa_mk_index(). Signed-off-by: Matthew Wilcox commit 55f3f7eab75c10d9b33d122670b5935ab64db50f Author: Matthew Wilcox Date: Mon Nov 26 16:08:43 2018 -0500 XArray: Add xa_cmpxchg_irq and xa_cmpxchg_bh These convenience wrappers match the other _irq and _bh wrappers we already have. It turns out I'd already open-coded xa_cmpxchg_irq() in the shmem code, so convert that. Signed-off-by: Matthew Wilcox commit eff3860bbfedbac6edac57fb0d7f3a60e860c1c3 Author: Matthew Wilcox Date: Thu Dec 6 08:19:13 2018 -0500 radix tree: Don't return retry entries from lookup Commit 66ee620f06f9 ("idr: Permit any valid kernel pointer to be stored") changed the radix tree lookup so that it stops when reaching the bottom of the tree. However, the condition was added in the wrong place, making it possible to return retry entries to the caller. Reorder the tests to check for the retry entry before checking whether we're at the bottom of the tree. The retry entry should never be found in the tree root, so it's safe to defer the check until the end of the loop. Add a regression test to the test-suite to be sure this doesn't come back. Fixes: 66ee620f06f9 ("idr: Permit any valid kernel pointer to be stored") Reported-by: Greg Kurz Signed-off-by: Matthew Wilcox commit 0472bf06c6fd33c1a18aaead4c8f91e5a03d8d7b Author: Mathias Nyman Date: Wed Dec 5 14:22:39 2018 +0200 xhci: Prevent U1/U2 link pm states if exit latency is too long Don't allow USB3 U1 or U2 if the latency to wake up from the U-state reaches the service interval for a periodic endpoint. This is according to xhci 1.1 specification section 4.23.5.2 extra note: "Software shall ensure that a device is prevented from entering a U-state where its worst case exit latency approaches the ESIT." Allowing too long exit latencies for periodic endpoint confuses xHC internal scheduling, and new devices may fail to enumerate with a "Not enough bandwidth for new device state" error from the host. Cc: Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman commit a7d57abcc8a5bdeb53bbf8e87558e8e0a2c2a29d Author: Sandeep Singh Date: Wed Dec 5 14:22:38 2018 +0200 xhci: workaround CSS timeout on AMD SNPS 3.0 xHC Occasionally AMD SNPS 3.0 xHC does not respond to CSS when set, also it does not flag anything on SRE and HCE to point the internal xHC errors on USBSTS register. This stalls the entire system wide suspend and there is no point in stalling just because of xHC CSS is not responding. To work around this problem, if the xHC does not flag anything on SRE and HCE, we can skip the CSS timeout and allow the system to continue the suspend. Once the system resume happens we can internally reset the controller using XHCI_RESET_ON_RESUME quirk Signed-off-by: Shyam Sundar S K Signed-off-by: Sandeep Singh cc: Nehal Shah Cc: Tested-by: Kai-Heng Feng Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman commit b704441e38f645dcfba1348ca3cc1ba43d1a9f31 Author: Alek Du Date: Thu Dec 6 17:24:59 2018 +0800 mmc: sdhci: fix the timeout check window for clock and reset We observed some premature timeouts on a virtualization platform, the log is like this: case 1: [159525.255629] mmc1: Internal clock never stabilised. [159525.255818] mmc1: sdhci: ============ SDHCI REGISTER DUMP =========== [159525.256049] mmc1: sdhci: Sys addr: 0x00000000 | Version: 0x00001002 ... [159525.257205] mmc1: sdhci: Wake-up: 0x00000000 | Clock: 0x0000fa03 From the clock control register dump, we are pretty sure the clock was stablized. case 2: [ 914.550127] mmc1: Reset 0x2 never completed. [ 914.550321] mmc1: sdhci: ============ SDHCI REGISTER DUMP =========== [ 914.550608] mmc1: sdhci: Sys addr: 0x00000010 | Version: 0x00001002 After checking the sdhci code, we found the timeout check actually has a little window that the CPU can be scheduled out and when it comes back, the original time set or check is not valid. Fixes: 5a436cc0af62 ("mmc: sdhci: Optimize delay loops") Cc: stable@vger.kernel.org # v4.12+ Signed-off-by: Alek Du Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson commit c988de29ca161823db6a7125e803d597ef75b49c Author: Paulo Alcantara Date: Thu Nov 15 15:20:52 2018 +0100 cifs: Fix separator when building path from dentry Make sure to use the CIFS_DIR_SEP(cifs_sb) as path separator for prefixpath too. Fixes a bug with smb1 UNIX extensions. Fixes: a6b5058fafdf ("fs/cifs: make share unaccessible at root level mountable") Signed-off-by: Paulo Alcantara Reviewed-by: Aurelien Aptel Signed-off-by: Steve French CC: Stable commit 6e785302dad32228819d8066e5376acd15d0e6ba Author: Steve French Date: Sat Nov 3 15:02:44 2018 -0500 cifs: In Kconfig CONFIG_CIFS_POSIX needs depends on legacy (insecure cifs) Missing a dependency. Shouldn't show cifs posix extensions in Kconfig if CONFIG_CIFS_ALLOW_INSECURE_DIALECTS (ie SMB1 protocol) is disabled. Signed-off-by: Steve French Reviewed-by: Pavel Shilovsky commit f15096f12a4e9340168df5fdd9201aa8ed60d59e Author: Fabio Estevam Date: Wed Dec 5 09:05:30 2018 -0200 ARM: dts: imx7d-nitrogen7: Fix the description of the Wifi clock According to bindings/regulator/fixed-regulator.txt the 'clocks' and 'clock-names' properties are not valid ones. In order to turn on the Wifi clock the correct location for describing the CLKO2 clock is via a mmc-pwrseq handle, so do it accordingly. Fixes: 56354959cfec ("ARM: dts: imx: add Boundary Devices Nitrogen7 board") Signed-off-by: Fabio Estevam Acked-by: Troy Kisky Signed-off-by: Shawn Guo commit e41b93a6be57e26a4a123345f826a6ac3a213551 Author: Michael Ellerman Date: Mon Dec 3 19:55:55 2018 +1100 powerpc/boot: Fix build failures with -j 1 In commit 5e9dcb6188a4 ("powerpc/boot: Expose Kconfig symbols to wrapper") we added a dependency to serial.c on autoconf.h: $(obj)/serial.c: $(obj)/autoconf.h This works when building in-tree (ie. with KBUILD_OUTPUT unset) because the obj tree is the src tree. But when building with eg. O=build and -j 1 the build fails: gcc ... -I../arch/powerpc/boot -c -o arch/powerpc/boot/serial.o arch/powerpc/boot/serial.c gcc: error: arch/powerpc/boot/serial.c: No such file or directory Why this is only happening with -j 1 is not clear, when building with -j greater than 1 somehow we decide to look for serial.c in the src tree (../), eg: gcc -I../arch/powerpc/boot -c -o arch/powerpc/boot/serial.o ../arch/powerpc/boot/serial.c Regardless we shouldn't be specifying a dependency on serial.c in the build tree, we want to add a dependency to the version in $(srctree) so fix the rule to say that. Fixes: 5e9dcb6188a4 ("powerpc/boot: Expose Kconfig symbols to wrapper") Tested-by: Daniel Axtens Signed-off-by: Michael Ellerman commit ebaf39e6032faf77218220707fc3fa22487784e0 Author: Jiri Wiesner Date: Wed Dec 5 16:55:29 2018 +0100 ipv4: ipv6: netfilter: Adjust the frag mem limit when truesize changes The *_frag_reasm() functions are susceptible to miscalculating the byte count of packet fragments in case the truesize of a head buffer changes. The truesize member may be changed by the call to skb_unclone(), leaving the fragment memory limit counter unbalanced even if all fragments are processed. This miscalculation goes unnoticed as long as the network namespace which holds the counter is not destroyed. Should an attempt be made to destroy a network namespace that holds an unbalanced fragment memory limit counter the cleanup of the namespace never finishes. The thread handling the cleanup gets stuck in inet_frags_exit_net() waiting for the percpu counter to reach zero. The thread is usually in running state with a stacktrace similar to: PID: 1073 TASK: ffff880626711440 CPU: 1 COMMAND: "kworker/u48:4" #5 [ffff880621563d48] _raw_spin_lock at ffffffff815f5480 #6 [ffff880621563d48] inet_evict_bucket at ffffffff8158020b #7 [ffff880621563d80] inet_frags_exit_net at ffffffff8158051c #8 [ffff880621563db0] ops_exit_list at ffffffff814f5856 #9 [ffff880621563dd8] cleanup_net at ffffffff814f67c0 #10 [ffff880621563e38] process_one_work at ffffffff81096f14 It is not possible to create new network namespaces, and processes that call unshare() end up being stuck in uninterruptible sleep state waiting to acquire the net_mutex. The bug was observed in the IPv6 netfilter code by Per Sundstrom. I thank him for his analysis of the problem. The parts of this patch that apply to IPv4 and IPv6 fragment reassembly are preemptive measures. Signed-off-by: Jiri Wiesner Reported-by: Per Sundstrom Acked-by: Peter Oskolkov Signed-off-by: David S. Miller commit afd0a8006e98b1890908f81746c94ca5dae29d7c Author: Jakub Audykowicz Date: Tue Dec 4 20:27:41 2018 +0100 sctp: frag_point sanity check If for some reason an association's fragmentation point is zero, sctp_datamsg_from_user will try to endlessly try to divide a message into zero-sized chunks. This eventually causes kernel panic due to running out of memory. Although this situation is quite unlikely, it has occurred before as reported. I propose to add this simple last-ditch sanity check due to the severity of the potential consequences. Signed-off-by: Jakub Audykowicz Acked-by: Neil Horman Acked-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller commit e594a5e349ddbfdaca1951bb3f8d72f3f1660d73 Author: Sam Bobroff Date: Mon Dec 3 11:53:21 2018 +1100 drm/ast: Fix connector leak during driver unload When unloading the ast driver, a warning message is printed by drm_mode_config_cleanup() because a reference is still held to one of the drm_connector structs. Correct this by calling drm_crtc_force_disable_all() in ast_fbdev_destroy(). Signed-off-by: Sam Bobroff Reviewed-by: Daniel Vetter Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/1e613f3c630c7bbc72e04a44b178259b9164d2f6.1543798395.git.sbobroff@linux.ibm.com commit 6ccd895e41520db9364b79896446e0f4de97e7f0 Merge: c6c2097a19d8 b31a3ca745a4 Author: Dave Airlie Date: Thu Dec 6 14:09:53 2018 +1000 Merge tag 'drm-misc-fixes-2018-12-05' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes UAPI: - Distinguish lease events from hotplug (Daniel) Other: - omap: Restore panel-dpi bus flags (Tomi) - omap: Fix a couple of dsi issues (Sebastian) Cc: Sebastian Reichel Cc: Tomi Valkeinen Cc: Daniel Vetter Signed-off-by: Dave Airlie From: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20181205201428.GA35447@art_vandelay commit c6c2097a19d895d31285ae4a251f182c13430af6 Merge: 534c6307beb4 0a9b89b2e2e7 Author: Dave Airlie Date: Thu Dec 6 14:08:43 2018 +1000 Merge branch 'drm-fixes-4.20' of git://people.freedesktop.org/~agd5f/linux into drm-fixes Fixes for 4.20: - Fix banding regression on 6 bpc panels - Vega20 fix for six 4k displays - Fix LRU handling in ttm_buffer_object_transfer - Use proper MC firmware for newer polaris variants - Vega20 powerplay fixes - VCN suspend/resume fix for PCO - Misc other fixes Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20181205192934.2857-1-alexander.deucher@amd.com commit 534c6307beb40a6154368210f70c04516de82510 Merge: 2595646791c3 098336deb946 Author: Dave Airlie Date: Thu Dec 6 14:07:26 2018 +1000 Merge tag 'msm-fixes-2018-12-04' of https://gitlab.freedesktop.org/seanpaul/dpu-staging into drm-fixes - Several related to incorrect error checking/handling (Various) - Prevent IRQ storm on MDP5 HDMI hotplug (Todor) - Don't capture crash state if unsupported (Sharat) - Properly grab vblank reference in atomic wait for commit done (Sean) Cc: Sharat Masetty Cc: Todor Tomov Cc: Sean Paul Signed-off-by: Dave Airlie From: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20181205194207.GY154160@art_vandelay commit 1aed58e67a6ec1e7a18bfabe8ba6ec2d27c15636 Author: Ravi Bangoria Date: Wed Dec 5 09:04:23 2018 +0530 Uprobes: Fix kernel oops with delayed_uprobe_remove() There could be a race between task exit and probe unregister: exit_mm() mmput() __mmput() uprobe_unregister() uprobe_clear_state() put_uprobe() delayed_uprobe_remove() delayed_uprobe_remove() put_uprobe() is calling delayed_uprobe_remove() without taking delayed_uprobe_lock and thus the race sometimes results in a kernel crash. Fix this by taking delayed_uprobe_lock before calling delayed_uprobe_remove() from put_uprobe(). Detailed crash log can be found at: Link: http://lkml.kernel.org/r/000000000000140c370577db5ece@google.com Link: http://lkml.kernel.org/r/20181205033423.26242-1-ravi.bangoria@linux.ibm.com Acked-by: Oleg Nesterov Reviewed-by: Srikar Dronamraju Reported-by: syzbot+cb1fb754b771caca0a88@syzkaller.appspotmail.com Fixes: 1cc33161a83d ("uprobes: Support SDT markers having reference count (semaphore)") Signed-off-by: Ravi Bangoria Signed-off-by: Steven Rostedt (VMware) commit e9c7d656610e3fff7c96b199d418add2528aea6e Author: Anders Roxell Date: Fri Nov 30 16:08:59 2018 +0100 stackleak: Mark stackleak_track_stack() as notrace Function graph tracing recurses into itself when stackleak is enabled, causing the ftrace graph selftest to run for up to 90 seconds and trigger the softlockup watchdog. Breakpoint 2, ftrace_graph_caller () at ../arch/arm64/kernel/entry-ftrace.S:200 200 mcount_get_lr_addr x0 // pointer to function's saved lr (gdb) bt \#0 ftrace_graph_caller () at ../arch/arm64/kernel/entry-ftrace.S:200 \#1 0xffffff80081d5280 in ftrace_caller () at ../arch/arm64/kernel/entry-ftrace.S:153 \#2 0xffffff8008555484 in stackleak_track_stack () at ../kernel/stackleak.c:106 \#3 0xffffff8008421ff8 in ftrace_ops_test (ops=0xffffff8009eaa840 , ip=18446743524091297036, regs=) at ../kernel/trace/ftrace.c:1507 \#4 0xffffff8008428770 in __ftrace_ops_list_func (regs=, ignored=, parent_ip=, ip=) at ../kernel/trace/ftrace.c:6286 \#5 ftrace_ops_no_ops (ip=18446743524091297036, parent_ip=18446743524091242824) at ../kernel/trace/ftrace.c:6321 \#6 0xffffff80081d5280 in ftrace_caller () at ../arch/arm64/kernel/entry-ftrace.S:153 \#7 0xffffff800832fd10 in irq_find_mapping (domain=0xffffffc03fc4bc80, hwirq=27) at ../kernel/irq/irqdomain.c:876 \#8 0xffffff800832294c in __handle_domain_irq (domain=0xffffffc03fc4bc80, hwirq=27, lookup=true, regs=0xffffff800814b840) at ../kernel/irq/irqdesc.c:650 \#9 0xffffff80081d52b4 in ftrace_graph_caller () at ../arch/arm64/kernel/entry-ftrace.S:205 Rework so we mark stackleak_track_stack as notrace Co-developed-by: Arnd Bergmann Signed-off-by: Arnd Bergmann Signed-off-by: Anders Roxell Acked-by: Steven Rostedt (VMware) Signed-off-by: Kees Cook commit 1e434b703248580b7aaaf8a115d93e682f57d29f Author: Anson Huang Date: Tue Dec 4 03:17:45 2018 +0000 ARM: imx: update the cpu power up timing setting on i.mx6sx The sw2iso count should cover ARM LDO ramp-up time, the MAX ARM LDO ramp-up time may be up to more than 100us on some boards, this patch sets sw2iso to 0xf (~384us) which is the reset value, and it is much more safe to cover different boards, since we have observed that some customer boards failed with current setting of 0x2. Fixes: 05136f0897b5 ("ARM: imx: support arm power off in cpuidle for i.mx6sx") Signed-off-by: Anson Huang Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo commit cf76c364a1e1e5224af80edf70a1e3023e1fcf8c Merge: 369af92ce47a c967590457ca Author: Linus Torvalds Date: Wed Dec 5 17:06:31 2018 -0800 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "Four obvious bug fixes. The vmw_pscsi is so old that it's amazing no-one noticed before now" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: storvsc: Fix a race in sub-channel creation that can cause panic scsi: vmw_pscsi: Rearrange code to avoid multiple calls to free_irq during unload scsi: libiscsi: Fix NULL pointer dereference in iscsi_eh_session_reset scsi: lpfc: fix block guard enablement on SLI3 adapters commit b2b7af861122a0c0f6260155c29a1b2e594cd5b5 Author: Yuchung Cheng Date: Wed Dec 5 14:38:38 2018 -0800 tcp: fix NULL ref in tail loss probe TCP loss probe timer may fire when the retranmission queue is empty but has a non-zero tp->packets_out counter. tcp_send_loss_probe will call tcp_rearm_rto which triggers NULL pointer reference by fetching the retranmission queue head in its sub-routines. Add a more detailed warning to help catch the root cause of the inflight accounting inconsistency. Reported-by: Rafael Tinoco Signed-off-by: Yuchung Cheng Signed-off-by: Eric Dumazet Signed-off-by: Neal Cardwell Signed-off-by: David S. Miller commit 41727549de3e7281feb174d568c6e46823db8684 Author: Eric Dumazet Date: Wed Dec 5 14:24:31 2018 -0800 tcp: Do not underestimate rwnd_limited If available rwnd is too small, tcp_tso_should_defer() can decide it is worth waiting before splitting a TSO packet. This really means we are rwnd limited. Fixes: 5615f88614a4 ("tcp: instrument how long TCP is limited by receive window") Signed-off-by: Eric Dumazet Acked-by: Soheil Hassas Yeganeh Reviewed-by: Yuchung Cheng Signed-off-by: David S. Miller commit e37d05a538a6656e108f7704ad66e1ccc13d6f68 Merge: 22f6bbb7bcfc a92a72a24d48 Author: David S. Miller Date: Wed Dec 5 16:30:30 2018 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Alexei Starovoitov says: ==================== pull-request: bpf 2018-12-05 The following pull-request contains BPF updates for your *net* tree. The main changes are: 1) fix bpf uapi pointers for 32-bit architectures, from Daniel. 2) improve verifer ability to handle progs with a lot of branches, from Alexei. 3) strict btf checks, from Yonghong. 4) bpf_sk_lookup api cleanup, from Joe. 5) other misc fixes ==================== Signed-off-by: David S. Miller commit 22f6bbb7bcfcef0b373b0502a7ff390275c575dd Author: Edward Cree Date: Tue Dec 4 17:37:57 2018 +0000 net: use skb_list_del_init() to remove from RX sublists list_del() leaves the skb->next pointer poisoned, which can then lead to a crash in e.g. OVS forwarding. For example, setting up an OVS VXLAN forwarding bridge on sfc as per: ======== $ ovs-vsctl show 5dfd9c47-f04b-4aaa-aa96-4fbb0a522a30 Bridge "br0" Port "br0" Interface "br0" type: internal Port "enp6s0f0" Interface "enp6s0f0" Port "vxlan0" Interface "vxlan0" type: vxlan options: {key="1", local_ip="10.0.0.5", remote_ip="10.0.0.4"} ovs_version: "2.5.0" ======== (where 10.0.0.5 is an address on enp6s0f1) and sending traffic across it will lead to the following panic: ======== general protection fault: 0000 [#1] SMP PTI CPU: 5 PID: 0 Comm: swapper/5 Not tainted 4.20.0-rc3-ehc+ #701 Hardware name: Dell Inc. PowerEdge R710/0M233H, BIOS 6.4.0 07/23/2013 RIP: 0010:dev_hard_start_xmit+0x38/0x200 Code: 53 48 89 fb 48 83 ec 20 48 85 ff 48 89 54 24 08 48 89 4c 24 18 0f 84 ab 01 00 00 48 8d 86 90 00 00 00 48 89 f5 48 89 44 24 10 <4c> 8b 33 48 c7 03 00 00 00 00 48 8b 05 c7 d1 b3 00 4d 85 f6 0f 95 RSP: 0018:ffff888627b437e0 EFLAGS: 00010202 RAX: 0000000000000000 RBX: dead000000000100 RCX: ffff88862279c000 RDX: ffff888614a342c0 RSI: 0000000000000000 RDI: 0000000000000000 RBP: ffff888618a88000 R08: 0000000000000001 R09: 00000000000003e8 R10: 0000000000000000 R11: ffff888614a34140 R12: 0000000000000000 R13: 0000000000000062 R14: dead000000000100 R15: ffff888616430000 FS: 0000000000000000(0000) GS:ffff888627b40000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f6d2bc6d000 CR3: 000000000200a000 CR4: 00000000000006e0 Call Trace: __dev_queue_xmit+0x623/0x870 ? masked_flow_lookup+0xf7/0x220 [openvswitch] ? ep_poll_callback+0x101/0x310 do_execute_actions+0xaba/0xaf0 [openvswitch] ? __wake_up_common+0x8a/0x150 ? __wake_up_common_lock+0x87/0xc0 ? queue_userspace_packet+0x31c/0x5b0 [openvswitch] ovs_execute_actions+0x47/0x120 [openvswitch] ovs_dp_process_packet+0x7d/0x110 [openvswitch] ovs_vport_receive+0x6e/0xd0 [openvswitch] ? dst_alloc+0x64/0x90 ? rt_dst_alloc+0x50/0xd0 ? ip_route_input_slow+0x19a/0x9a0 ? __udp_enqueue_schedule_skb+0x198/0x1b0 ? __udp4_lib_rcv+0x856/0xa30 ? __udp4_lib_rcv+0x856/0xa30 ? cpumask_next_and+0x19/0x20 ? find_busiest_group+0x12d/0xcd0 netdev_frame_hook+0xce/0x150 [openvswitch] __netif_receive_skb_core+0x205/0xae0 __netif_receive_skb_list_core+0x11e/0x220 netif_receive_skb_list+0x203/0x460 ? __efx_rx_packet+0x335/0x5e0 [sfc] efx_poll+0x182/0x320 [sfc] net_rx_action+0x294/0x3c0 __do_softirq+0xca/0x297 irq_exit+0xa6/0xb0 do_IRQ+0x54/0xd0 common_interrupt+0xf/0xf ======== So, in all listified-receive handling, instead pull skbs off the lists with skb_list_del_init(). Fixes: 9af86f933894 ("net: core: fix use-after-free in __netif_receive_skb_list_core") Fixes: 7da517a3bc52 ("net: core: Another step of skb receive list processing") Fixes: a4ca8b7df73c ("net: ipv4: fix drop handling in ip_list_rcv() and ip_list_rcv_finish()") Fixes: d8269e2cbf90 ("net: ipv6: listify ipv6_rcv() and ip6_rcv_finish()") Signed-off-by: Edward Cree Signed-off-by: David S. Miller commit 369af92ce47a04b2523ec4feea1febcacf8419b1 Merge: 2f0799a0ffc0 10d443431dc2 Author: Linus Torvalds Date: Wed Dec 5 15:51:41 2018 -0800 Merge tag 'arc-4.20-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc Pull ARC fixes/updates from Vineet Gupta - Missing reads{x}()/writes{x}() getting in the way of some drivers [Jose Abreu] - Builds defaulting to ARCv2 ISA based configsa [Kevin Hilman] - Misc fixes * tag 'arc-4.20-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc: ARC: io.h: Implement reads{x}()/writes{x}() ARC: change defconfig defaults to ARCv2 arc: [devboards] Add support of NFSv3 ACL ARC: mm: fix uninitialised signal code in do_page_fault ARC: [plat-hsdk] Enable DW APB GPIO support ARCv2: boot log unaligned access in use ARC: IOC: panic if kernel was started with previously enabled IOC ARC: remove redundant 'default n' from Kconfig commit 2f0799a0ffc033bf3cc82d5032acc3ec633464c2 Author: David Rientjes Date: Wed Dec 5 15:45:54 2018 -0800 mm, thp: restore node-local hugepage allocations This is a full revert of ac5b2c18911f ("mm: thp: relax __GFP_THISNODE for MADV_HUGEPAGE mappings") and a partial revert of 89c83fb539f9 ("mm, thp: consolidate THP gfp handling into alloc_hugepage_direct_gfpmask"). By not setting __GFP_THISNODE, applications can allocate remote hugepages when the local node is fragmented or low on memory when either the thp defrag setting is "always" or the vma has been madvised with MADV_HUGEPAGE. Remote access to hugepages often has much higher latency than local pages of the native page size. On Haswell, ac5b2c18911f was shown to have a 13.9% access regression after this commit for binaries that remap their text segment to be backed by transparent hugepages. The intent of ac5b2c18911f is to address an issue where a local node is low on memory or fragmented such that a hugepage cannot be allocated. In every scenario where this was described as a fix, there is abundant and unfragmented remote memory available to allocate from, even with a greater access latency. If remote memory is also low or fragmented, not setting __GFP_THISNODE was also measured on Haswell to have a 40% regression in allocation latency. Restore __GFP_THISNODE for thp allocations. Fixes: ac5b2c18911f ("mm: thp: relax __GFP_THISNODE for MADV_HUGEPAGE mappings") Fixes: 89c83fb539f9 ("mm, thp: consolidate THP gfp handling into alloc_hugepage_direct_gfpmask") Cc: Andrea Arcangeli Cc: Mel Gorman Cc: Vlastimil Babka Cc: Michal Hocko Cc: Andrew Morton Signed-off-by: David Rientjes Signed-off-by: Linus Torvalds commit b5fd2e00a60248902315fb32210550ac3cb9f44c Author: Dan Williams Date: Mon Dec 3 10:30:25 2018 -0800 acpi/nfit: Fix user-initiated ARS to be "ARS-long" rather than "ARS-short" A "short" ARS (address range scrub) instructs the platform firmware to return known errors. In contrast, a "long" ARS instructs platform firmware to arrange every data address on the DIMM to be read / checked for poisoned data. The conversion of the flags in commit d3abaf43bab8 "acpi, nfit: Fix Address Range Scrub completion tracking", changed the meaning of passing '0' to acpi_nfit_ars_rescan(). Previously '0' meant "not short", now '0' is ARS_REQ_SHORT. Pass ARS_REQ_LONG to restore the expected scrub-type behavior of user-initiated ARS sessions. Fixes: d3abaf43bab8 ("acpi, nfit: Fix Address Range Scrub completion tracking") Reported-by: Jacek Zloch Cc: Vishal Verma Reviewed-by: Dave Jiang Reviewed-by: Vishal Verma Signed-off-by: Dan Williams commit ae86cbfef3818300f1972e52f67a93211acb0e24 Author: Dan Williams Date: Sat Nov 24 10:47:04 2018 -0800 libnvdimm, pfn: Pad pfn namespaces relative to other regions Commit cfe30b872058 "libnvdimm, pmem: adjust for section collisions with 'System RAM'" enabled Linux to workaround occasions where platform firmware arranges for "System RAM" and "Persistent Memory" to collide within a single section boundary. Unfortunately, as reported in this issue [1], platform firmware can inflict the same collision between persistent memory regions. The approach of interrogating iomem_resource does not work in this case because platform firmware may merge multiple regions into a single iomem_resource range. Instead provide a method to interrogate regions that share the same parent bus. This is a stop-gap until the core-MM can grow support for hotplug on sub-section boundaries. [1]: https://github.com/pmem/ndctl/issues/76 Fixes: cfe30b872058 ("libnvdimm, pmem: adjust for section collisions with...") Cc: Reported-by: Patrick Geary Tested-by: Patrick Geary Reviewed-by: Vishal Verma Signed-off-by: Dan Williams commit e3f5df762d4a6ef6326c3c09bc9f89ea8a2eab2c Author: Dan Williams Date: Wed Dec 5 14:11:48 2018 -0800 tools/testing/nvdimm: Align test resources to 128M In preparation for libnvdimm growing new restrictions to detect section conflicts between persistent memory regions, enable nfit_test to allocate aligned resources. Use a gen_pool to allocate nfit_test's fake resources in a separate address space from the virtual translation of the same. Reviewed-by: Vishal Verma Tested-by: Vishal Verma Signed-off-by: Dan Williams commit 4eaaa2b99e30305f4bc677f4abfe56c1f8b39670 Merge: d08970904582 ffe81d45322c Author: Linus Torvalds Date: Wed Dec 5 13:28:01 2018 -0800 Merge tag 'for-linus-20181205' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: "A bit earlier in the week as usual, but there's a fix here that should go in sooner rather than later. Under a combination of circumstance, the direct issue path in blk-mq could corrupt data. This wasn't easy to hit, but the ones that are affected by it, seem to hit it pretty easily. Full explanation in the patch. None of the regular filesystem and storage testing has triggered it, even though it's been around since 4.19-rc1. Outside of that, whitelist trim tweak for certain Samsung devices for libata" * tag 'for-linus-20181205' of git://git.kernel.dk/linux-block: blk-mq: fix corruption with direct issue libata: whitelist all SAMSUNG MZ7KM* solid-state disks commit 704620afc70cf47abb9d6a1a57f3825d2bca49cf Author: Mathias Payer Date: Wed Dec 5 21:19:59 2018 +0100 USB: check usb_get_extra_descriptor for proper size When reading an extra descriptor, we need to properly check the minimum and maximum size allowed, to prevent from invalid data being sent by a device. Reported-by: Hui Peng Reported-by: Mathias Payer Co-developed-by: Linus Torvalds Signed-off-by: Hui Peng Signed-off-by: Mathias Payer Signed-off-by: Linus Torvalds Cc: stable Signed-off-by: Greg Kroah-Hartman commit 64d47902fea3dcd3f2d0f3366259984dbc31653b Merge: 0fb628f0f250 312ca38ddda6 Author: David S. Miller Date: Wed Dec 5 11:46:06 2018 -0800 Merge tag 'mac80211-for-davem-2018-12-05' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211 Johannes Berg: ==================== As it's been a while, we have various fixes for * hwsim * AP mode (client powersave related) * CSA/FTM interaction * a busy loop in IE handling * and similar ==================== Signed-off-by: David S. Miller commit 0a9b89b2e2e7b6d90f81ddc47e489be1043e01b1 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 078ab3ea2c3bb69cb989d52346fefa1246055e5b Author: Sakari Ailus Date: Wed Dec 5 12:23:54 2018 -0500 media: Add a Kconfig option for the Request API The Request API is now merged to the kernel but the confidence on the stability of that API is not great, especially regarding the interaction with V4L2. Add a Kconfig option for the API, with a scary-looking warning. The patch itself disables request creation as well as does not advertise them as buffer flags. The driver requiring requests (cedrus) now depends on the Kconfig option as well. Signed-off-by: Sakari Ailus Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit cd9fd6f12fc762246607c77673acdfb55f8096b6 Author: Hans Verkuil Date: Wed Dec 5 06:36:13 2018 -0500 media: extended-controls.rst: add note to the MPEG2 state controls Add a note mentioning that these two controls are not part of the public API while they still stabilizing. Signed-off-by: Hans Verkuil Reviewed-by: Paul Kocialkowski Signed-off-by: Mauro Carvalho Chehab commit 9514063498cbff9a351f4bc25e1b1bfca8eccb7a Author: Hans Verkuil Date: Wed Dec 5 06:28:20 2018 -0500 media: mpeg2-ctrls.h: move MPEG2 state controls to non-public header The MPEG2 state controls for the cedrus stateless MPEG2 driver are not yet stable. Move them out of the public headers into media/mpeg2-ctrls.h. Eventually, once this has stabilized, they will be moved back to the public headers. Unfortunately I had to cast the control type to a u32 in two switch statements to prevent a compiler warning about a control type define not being part of the enum. Signed-off-by: Hans Verkuil Reviewed-by: Paul Kocialkowski Signed-off-by: Mauro Carvalho Chehab commit d0897090458211f9c6b2d7f5af87f4d3b0403f69 Merge: 91dd51f6e7ce 10950929e994 Author: Linus Torvalds Date: Wed Dec 5 09:58:17 2018 -0800 Merge tag 'for-4.20-rc5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fix from David Sterba: "A patch in 4.19 introduced a sanity check that was too strict and a filesystem cannot be mounted. This happens for filesystems with more than 10 devices and has been reported by a few users so we need the fix to propagate to stable" * tag 'for-4.20-rc5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: tree-checker: Don't check max block group size as current max chunk size limit is unreliable commit 91dd51f6e7ce7f1eba5d7b583790e134367d0fbb Merge: 5e0dc1a7ce1f a72173ecfc67 Author: Linus Torvalds Date: Wed Dec 5 09:51:10 2018 -0800 Merge tag 'pm-4.20-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fix from Rafael Wysocki: "Revert a problematic recent commit that attempted to fix a system-wide suspend issue related to the freezer" * tag 'pm-4.20-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: Revert "exec: make de_thread() freezable" commit 5e0dc1a7ce1f322c06e993845def2c73cfc485fd Merge: a517af52cb57 48a2ca0ee399 Author: Linus Torvalds Date: Wed Dec 5 09:45:34 2018 -0800 Merge tag 'mfd-fixes-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd Pull mfd bugfix from Lee Jones: "Replace release function in cros_ec_dev" * tag 'mfd-fixes-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: Revert "mfd: cros_ec: Use devm_kzalloc for private data" commit b72f936f6b325f4fde06b02e4b6ab682f6f2e73f Author: Chris Chiu Date: Wed Dec 5 14:48:56 2018 +0800 ALSA: hda/realtek: Fix mic issue on Acer AIO Veriton Z4860G/Z6860G Acer AIO Veriton Z4860G/Z6860G with the same ALC286 codec has issues with the input from external microphone. The issue can be fixed by the fixup ALC286_FIXUP_ACER_AIO_MIC_NO_PRESENCE for Veriton Z4660G. Signed-off-by: Jian-Hong Pan Signed-off-by: Daniel Drake Signed-off-by: Chris Chiu Cc: Signed-off-by: Takashi Iwai commit 9f8aefed9623a91dec54eab8908f3810b7f8d73a Author: Chris Chiu Date: Wed Dec 5 14:48:55 2018 +0800 ALSA: hda/realtek: Fix mic issue on Acer AIO Veriton Z4660G Acer AIO Veriton Z4660G with ALC286 codec has issue with the input from external microphones connecting via 'Front Mic' jack. The fixup ALC286_FIXUP_ACER_AIO_MIC_NO_PRESENCE enables the jack sensing of the headset and fix the audio input issue of external microphone. Signed-off-by: Jian-Hong Pan Signed-off-by: Daniel Drake Signed-off-by: Chris Chiu Cc: Signed-off-by: Takashi Iwai commit 705b65f107470499442240ff7afee5021a7002a6 Author: Chris Chiu Date: Wed Dec 5 14:48:54 2018 +0800 ALSA: hda/realtek - Add support for Acer Aspire C24-860 headset mic The Acer AIO Aspire C24-860 with ALC286 can't detect the headset microphone. Just like another Acer AIO U27-880, it needs a different pin value for 0x18 and the headset fixup to make headset mic work. Signed-off-by: Jian-Hong Pan Signed-off-by: Daniel Drake Signed-off-by: Chris Chiu Cc: Signed-off-by: Takashi Iwai commit 33aaebd48ae2d2c78fef5063a0381e17db19b060 Author: Chris Chiu Date: Wed Dec 5 14:48:53 2018 +0800 ALSA: hda/realtek: ALC286 mic and headset-mode fixups for Acer Aspire U27-880 Acer Aspire U27-880(AIO) with ALC286 codec can not detect headset mic and internal mic not working either. It needs the similar quirk like Sony laptops to fix headphone jack sensing and enables use of the internal microphone. Unfortunately jack sensing for the headset mic is still not working. Signed-off-by: Jian-Hong Pan Signed-off-by: Daniel Drake Signed-off-by: Chris Chiu Cc: Signed-off-by: Takashi Iwai commit 1aea7aee805e3d1288f9f1fa4484964b51664960 Author: Julia Lawall Date: Tue Oct 30 16:15:00 2018 +0100 thermal: broadcom: constify thermal_zone_of_device_ops structure The thermal_zone_of_device_ops structure can be const as it is only passed as the last argument of thermal_zone_of_sensor_register and the corresponding parameter is declared as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Reviewed-by: Daniel Lezcano Signed-off-by: Eduardo Valentin commit 13cfb713c8c2035c058af3233c3432165c97ceeb Author: Julia Lawall Date: Tue Oct 30 16:14:59 2018 +0100 thermal: armada: constify thermal_zone_of_device_ops structure The thermal_zone_of_device_ops structure can be const as it is only passed as the last argument of devm_thermal_zone_of_sensor_register and the corresponding parameter is declared as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Reviewed-by: Daniel Lezcano Signed-off-by: Eduardo Valentin commit d76b21ebf8ff0ec5030e98c64c50dca2254474f3 Merge: 90098efacc4c a40fa231bb64 Author: Joonas Lahtinen Date: Wed Dec 5 15:51:46 2018 +0200 Merge tag 'gvt-fixes-2018-12-04' of https://github.com/intel/gvt-linux into drm-intel-fixes gvt-fixes-2018-12-04 - Fix tiling mode format on BDW for VFIO gfx dmabuf (Tina) Signed-off-by: Joonas Lahtinen From: Zhenyu Wang Link: https://patchwork.freedesktop.org/patch/msgid/20181204050633.GY12743@zhen-hp.sh.intel.com commit 79462857eb547e5d17fc8445b9768615e02dc1cf Author: Trond Myklebust Date: Mon Dec 3 18:49:00 2018 -0500 SUNRPC: Don't force a redundant disconnection in xs_read_stream() If the connection is broken, then xs_tcp_state_change() will take care of scheduling the socket close as soon as appropriate. xs_read_stream() just needs to report the error. Signed-off-by: Trond Myklebust commit dfcf0380858b4e760ae02665649d884d1baa50c9 Author: Trond Myklebust Date: Tue Dec 4 07:50:06 2018 -0500 SUNRPC: Fix up socket polling Ensure that we do not exit the socket read callback without clearing XPRT_SOCK_DATA_READY. Signed-off-by: Trond Myklebust commit b76a5afdce6c6dacfbd51863b31b3d7cc61ca21e Author: Trond Myklebust Date: Mon Dec 3 15:58:58 2018 -0500 SUNRPC: Use the discard iterator rather than MSG_TRUNC When discarding message data from the stream, we're better off using the discard iterator, since that will work with non-TCP streams. Signed-off-by: Trond Myklebust commit 26781eab48ece79000ffc4e69be402f2524e1137 Author: Trond Myklebust Date: Mon Dec 3 15:41:38 2018 -0500 SUNRPC: Treat EFAULT as a truncated message in xs_read_stream_request() Signed-off-by: Trond Myklebust commit 16e5e90f0e4f9b7b2e4d08558a2f695e2fa1fb0d Author: Trond Myklebust Date: Sun Dec 2 15:22:48 2018 -0500 SUNRPC: Fix up handling of the XDRBUF_SPARSE_PAGES flag If the allocator fails before it has reached the target number of pages, then we need to recheck that we're not seeking past the page buffer. Signed-off-by: Trond Myklebust commit c443305529d1d3d3bee0d68fdd14ae89835e091f Author: Trond Myklebust Date: Tue Dec 4 07:52:11 2018 -0500 SUNRPC: Fix RPC receive hangs The RPC code is occasionally hanging when the receive code fails to empty the socket buffer due to a partial read of the data. When we convert that to an EAGAIN, it appears we occasionally leave data in the socket. The fix is to just keep reading until the socket returns EAGAIN/EWOULDBLOCK. Reported-by: Catalin Marinas Reported-by: Cristian Marussi Reported-by: Chuck Lever Signed-off-by: Trond Myklebust Tested-by: Catalin Marinas Tested-by: Cristian Marussi commit db2039fcfd5754d15986340152e4503737f68f8d Author: Faiz Abbas Date: Wed Nov 21 16:03:55 2018 +0530 mmc: sdhci-omap: Fix DCRC error handling during tuning Commit 7d33c3581536 ("mmc: sdhci-omap: Workaround for Errata i802") disabled DCRC interrupts during tuning. This write to the interrupt enable register gets overwritten in sdhci_prepare_data() and the interrupt is not in fact disabled. Fix this by disabling the interrupt in the host->ier variable. Fixes: 7d33c3581536 ("mmc: sdhci-omap: Workaround for Errata i802") Cc: Signed-off-by: Faiz Abbas Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson commit 312ca38ddda64bac6513ec68e0ac3789b4eb44dc Author: Jouni Malinen Date: Wed Dec 5 12:55:54 2018 +0200 cfg80211: Fix busy loop regression in ieee80211_ie_split_ric() This function was modified to support the information element extension case (WLAN_EID_EXTENSION) in a manner that would result in an infinite loop when going through set of IEs that include WLAN_EID_RIC_DATA and contain an IE that is in the after_ric array. The only place where this can currently happen is in mac80211 ieee80211_send_assoc() where ieee80211_ie_split_ric() is called with after_ric[]. This can be triggered by valid data from user space nl80211 association/connect request (i.e., requiring GENL_UNS_ADMIN_PERM). The only known application having an option to include WLAN_EID_RIC_DATA in these requests is wpa_supplicant and it had a bug that prevented this specific contents from being used (and because of that, not triggering this kernel bug in an automated test case ap_ft_ric) and now that this bug is fixed, it has a workaround to avoid this kernel issue. WLAN_EID_RIC_DATA is currently used only for testing purposes, so this does not cause significant harm for production use cases. Fixes: 2512b1b18d07 ("mac80211: extend ieee80211_ie_split to support EXTENSION") Cc: stable@vger.kernel.org Signed-off-by: Jouni Malinen Signed-off-by: Johannes Berg commit 90098efacc4c3e2e4f6262a657d6b520ecfb2555 Author: Tvrtko Ursulin Date: Wed Dec 5 11:33:24 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 (cherry picked from commit 4a15c75c42460252a63d30f03b4766a52945fb47) Signed-off-by: Joonas Lahtinen commit 009367791f31afa0842854e7ea0acc9edf70ccaf Author: Tvrtko Ursulin Date: Wed Dec 5 11:33:23 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 (cherry picked from commit 25d140faaa25f728159eb8c304eae53d88a7f14e) Fixes: 59b449d5c82a ("drm/i915: Split out functions for different kinds of workarounds") Signed-off-by: Joonas Lahtinen commit 990d71846a0b7281bd933c34d734e6afc7408e7e Author: Emmanuel Grumbach Date: Mon Dec 3 21:16:07 2018 +0200 mac80211: ignore NullFunc frames in the duplicate detection NullFunc packets should never be duplicate just like QoS-NullFunc packets. We saw a client that enters / exits power save with NullFunc frames (and not with QoS-NullFunc) despite the fact that the association supports HT. This specific client also re-uses a non-zero sequence number for different NullFunc frames. At some point, the client had to send a retransmission of the NullFunc frame and we dropped it, leading to a misalignment in the power save state. Fix this by never consider a NullFunc frame as duplicate, just like we do for QoS NullFunc frames. This fixes https://bugzilla.kernel.org/show_bug.cgi?id=201449 CC: Signed-off-by: Emmanuel Grumbach Signed-off-by: Johannes Berg commit 9ec1190d065998650fd9260dea8cf3e1f56c0e8c Author: Felix Fietkau Date: Wed Nov 28 22:39:16 2018 +0100 mac80211: fix reordering of buffered broadcast packets If the buffered broadcast queue contains packets, letting new packets bypass that queue can lead to heavy reordering, since the driver is probably throttling transmission of buffered multicast packets after beacons. Keep buffering packets until the buffer has been cleared (and no client is in powersave mode). Cc: stable@vger.kernel.org Signed-off-by: Felix Fietkau Signed-off-by: Johannes Berg commit a317e65face482371de30246b6494feb093ff7f9 Author: Felix Fietkau Date: Tue Nov 13 20:32:13 2018 +0100 mac80211: ignore tx status for PS stations in ieee80211_tx_status_ext Make it behave like regular ieee80211_tx_status calls, except for the lack of filtered frame processing. This fixes spurious low-ack triggered disconnections with powersave clients connected to an AP. Fixes: f027c2aca0cf4 ("mac80211: add ieee80211_tx_status_noskb") Cc: stable@vger.kernel.org Signed-off-by: Felix Fietkau Signed-off-by: Johannes Berg commit 100bc3e2bebf95506da57cbdf5f26b25f6da4c81 Author: Peter Shih Date: Tue Nov 27 12:49:50 2018 +0800 tty: serial: 8250_mtk: always resume the device in probe. serial8250_register_8250_port calls uart_config_port, which calls config_port on the port before it tries to power on the port. So we need the port to be on before calling serial8250_register_8250_port. Change the code to always do a runtime resume in probe before registering port, and always do a runtime suspend in remove. This basically reverts the change in commit 68e5fc4a255a ("tty: serial: 8250_mtk: use pm_runtime callbacks for enabling"), but still use pm_runtime callbacks. Fixes: 68e5fc4a255a ("tty: serial: 8250_mtk: use pm_runtime callbacks for enabling") Signed-off-by: Peter Shih Cc: stable Signed-off-by: Greg Kroah-Hartman commit f51ccf46217c28758b1f3b5bc0ccfc00eca658b2 Author: Johan Hovold Date: Tue Dec 4 17:00:36 2018 +0100 USB: serial: console: fix reported terminal settings The USB-serial console implementation has never reported the actual terminal settings used. Despite storing the corresponding cflags in its struct console, these were never honoured on later tty open() where the tty termios would be left initialised to the driver defaults. Unlike the serial console implementation, the USB-serial code calls subdriver open() already at console setup. While calling set_termios() and write() before open() looks like it could work for some USB-serial drivers, others definitely do not expect this, so modelling this after serial core is going to be intrusive, if at all possible. Instead, use a (renamed) tty helper to save the termios data used at console setup so that the tty termios reflects the actual terminal settings after a subsequent tty open(). Note that the calls to tty_init_termios() (tty_driver_install()) and tty_save_termios() are serialised using the disconnect mutex. This specifically fixes a regression that was triggered by a recent change adding software flow control to the pl2303 driver: a getty trying to disable flow control while leaving the baud rate unchanged would now also set the baud rate to the driver default (prior to the flow-control change this had been a noop). Fixes: 7041d9c3f01b ("USB: serial: pl2303: add support for tx xon/xoff flow control") Cc: stable # 4.18 Cc: Florian Zumbiehl Reported-by: Jarkko Nikula Tested-by: Jarkko Nikula Acked-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit 48a2ca0ee3994df53da230c7079a18a70ec914f9 Author: Enric Balletbo i Serra Date: Tue Dec 4 16:58:43 2018 +0100 Revert "mfd: cros_ec: Use devm_kzalloc for private data" This reverts commit 3aa2177e47878f7e7616da8a2050c44f22301b6e. That commit triggered a new WARN when unloading the module (see at the end of the commit message). When a class_dev is embedded in a structure then that class_dev is the thing that controls the lifetime of that structure, for that reason device managed allocations can't be used here. See Documentation/kobject.txt. Revert the above patch, so the struct is allocated using kzalloc and we have a release function for it that frees the allocated memory, otherwise it is broken. ------------[ cut here ]------------ Device 'cros_ec' does not have a release() function, it is broken and must be fixed. WARNING: CPU: 3 PID: 3675 at drivers/base/core.c:895 device_release+0x80/0x90 Modules linked in: btusb btrtl btintel btbcm bluetooth ... CPU: 3 PID: 3675 Comm: rmmod Not tainted 4.20.0-rc4 #76 Hardware name: Google Kevin (DT) pstate: 40000005 (nZcv daif -PAN -UAO) pc : device_release+0x80/0x90 lr : device_release+0x80/0x90 sp : ffff00000c47bc70 x29: ffff00000c47bc70 x28: ffff8000e86b0d40 x27: 0000000000000000 x26: 0000000000000000 x25: 0000000056000000 x24: 0000000000000015 x23: ffff8000f0bbf860 x22: ffff000000d320a0 x21: ffff8000ee93e100 x20: ffff8000ed931428 x19: ffff8000ed931418 x18: 0000000000000020 x17: 0000000000000000 x16: 0000000000000000 x15: 0000000000000400 x14: 0000000000000143 x13: 0000000000000000 x12: 0000000000000400 x11: 0000000000000157 x10: 0000000000000960 x9 : ffff00000c47b9b0 x8 : ffff8000e86b1700 x7 : 0000000000000000 x6 : ffff8000f7d520b8 x5 : ffff8000f7d520b8 x4 : 0000000000000000 x3 : ffff8000f7d58e68 x2 : ffff8000e86b0d40 x1 : 37d859939c964800 x0 : 0000000000000000 Call trace: device_release+0x80/0x90 kobject_put+0x74/0xe8 device_unregister+0x20/0x30 ec_device_remove+0x34/0x48 [cros_ec_dev] platform_drv_remove+0x28/0x48 device_release_driver_internal+0x1a8/0x240 driver_detach+0x40/0x80 bus_remove_driver+0x54/0xa8 driver_unregister+0x2c/0x58 platform_driver_unregister+0x10/0x18 cros_ec_dev_exit+0x1c/0x2d8 [cros_ec_dev] __arm64_sys_delete_module+0x16c/0x1f8 el0_svc_common+0x84/0xd8 el0_svc_handler+0x2c/0x80 el0_svc+0x8/0xc ---[ end trace a57c4625f3c60ae8 ]--- Cc: stable@vger.kernel.org Fixes: 3aa2177e4787 ("mfd: cros_ec: Use devm_kzalloc for private data") Signed-off-by: Enric Balletbo i Serra Reviewed-by: Guenter Roeck Reviewed-by: Dmitry Torokhov Signed-off-by: Lee Jones commit 2f2dde6ba89b1ef1fe23c1138131b315d9aa4019 Author: Harry Pan Date: Thu Nov 29 00:40:41 2018 +0800 usb: quirk: add no-LPM quirk on SanDisk Ultra Flair device Some lower volume SanDisk Ultra Flair in 16GB, which the VID:PID is in 0781:5591, will aggressively request LPM of U1/U2 during runtime, when using this thumb drive as the OS installation key we found the device will generate failure during U1 exit path making it dropped from the USB bus, this causes a corrupted installation in system at the end. i.e., [ 166.918296] hub 2-0:1.0: state 7 ports 7 chg 0000 evt 0004 [ 166.918327] usb usb2-port2: link state change [ 166.918337] usb usb2-port2: do warm reset [ 166.970039] usb usb2-port2: not warm reset yet, waiting 50ms [ 167.022040] usb usb2-port2: not warm reset yet, waiting 200ms [ 167.276043] usb usb2-port2: status 02c0, change 0041, 5.0 Gb/s [ 167.276050] usb 2-2: USB disconnect, device number 2 [ 167.276058] usb 2-2: unregistering device [ 167.276060] usb 2-2: unregistering interface 2-2:1.0 [ 167.276170] xhci_hcd 0000:00:15.0: shutdown urb ffffa3c7cc695cc0 ep1in-bulk [ 167.284055] sd 0:0:0:0: [sda] tag#0 FAILED Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK [ 167.284064] sd 0:0:0:0: [sda] tag#0 CDB: Read(10) 28 00 00 33 04 90 00 01 00 00 ... Analyzed the USB trace in the link layer we realized it is because of the 6-ms timer of tRecoveryConfigurationTimeout which documented on the USB 3.2 Revision 1.0, the section 7.5.10.4.2 of "Exit from Recovery.Configuration"; device initiates U1 exit -> Recovery.Active -> Recovery.Configuration, then the host timer timeout makes the link transits to eSS.Inactive -> Rx.Detect follows by a Warm Reset. Interestingly, the other higher volume of SanDisk Ultra Flair sharing the same VID:PID, such as 64GB, would not request LPM during runtime, it sticks at U0 always, thus disabling LPM does not affect those thumb drives at all. The same odd occures in SanDisk Ultra Fit 16GB, VID:PID in 0781:5583. Signed-off-by: Harry Pan Cc: stable Signed-off-by: Greg Kroah-Hartman commit d81bb019d7bb30091e3c796102c00935d6dd7ca9 Author: Alan Stern Date: Wed Nov 28 11:25:58 2018 -0500 USB: Fix invalid-free bug in port_over_current_notify() Syzbot and KASAN found the following invalid-free bug in port_over_current_notify(): -------------------------------------------------------------------------- BUG: KASAN: double-free or invalid-free in port_over_current_notify drivers/usb/core/hub.c:5192 [inline] BUG: KASAN: double-free or invalid-free in port_event drivers/usb/core/hub.c:5241 [inline] BUG: KASAN: double-free or invalid-free in hub_event+0xd97/0x4140 drivers/usb/core/hub.c:5384 CPU: 1 PID: 32710 Comm: kworker/1:3 Not tainted 4.20.0-rc3+ #129 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: usb_hub_wq hub_event Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x244/0x39d lib/dump_stack.c:113 print_address_description.cold.7+0x9/0x1ff mm/kasan/report.c:256 kasan_report_invalid_free+0x64/0xa0 mm/kasan/report.c:336 __kasan_slab_free+0x13a/0x150 mm/kasan/kasan.c:501 kasan_slab_free+0xe/0x10 mm/kasan/kasan.c:528 __cache_free mm/slab.c:3498 [inline] kfree+0xcf/0x230 mm/slab.c:3817 port_over_current_notify drivers/usb/core/hub.c:5192 [inline] port_event drivers/usb/core/hub.c:5241 [inline] hub_event+0xd97/0x4140 drivers/usb/core/hub.c:5384 process_one_work+0xc90/0x1c40 kernel/workqueue.c:2153 worker_thread+0x17f/0x1390 kernel/workqueue.c:2296 kthread+0x35a/0x440 kernel/kthread.c:246 ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:352 -------------------------------------------------------------------------- The problem is caused by use of a static array to store environment-string pointers. When the routine is called by multiple threads concurrently, the pointers from one thread can overwrite those from another. The solution is to use an ordinary automatic array instead of a static array. Signed-off-by: Alan Stern Reported-by: syzbot+98881958e1410ec7e53c@syzkaller.appspotmail.com Cc: stable Signed-off-by: Greg Kroah-Hartman commit d7859905301880ad3e16272399d26900af3ac496 Author: Alexander Theissen Date: Tue Dec 4 23:43:35 2018 +0100 usb: appledisplay: Add 27" Apple Cinema Display Add another Apple Cinema Display to the list of supported displays. Signed-off-by: Alexander Theissen Cc: stable Signed-off-by: Greg Kroah-Hartman commit 87e4a5405f087427fbf8b437d2796283dce2b38f Author: Young Xiao Date: Tue Nov 27 09:12:20 2018 +0000 Revert commit ef9209b642f "staging: rtl8723bs: Fix indenting errors and an off-by-one mistake in core/rtw_mlme_ext.c" pstapriv->max_num_sta is always <= NUM_STA, since max_num_sta is either set in _rtw_init_sta_priv() or rtw_set_beacon(). Fixes: ef9209b642f1 ("staging: rtl8723bs: Fix indenting errors and an off-by-one mistake in core/rtw_mlme_ext.c") Signed-off-by: Young Xiao Reviewed-by: Dan Carpenter Cc: stable Signed-off-by: Greg Kroah-Hartman commit 300cd664865bed5d50ae0a42fb4e3a6f415e8a10 Author: Young Xiao Date: Wed Nov 28 08:06:53 2018 +0000 staging: rtl8712: Fix possible buffer overrun In commit 8b7a13c3f404 ("staging: r8712u: Fix possible buffer overrun") we fix a potential off by one by making the limit smaller. The better fix is to make the buffer larger. This makes it match up with the similar code in other drivers. Fixes: 8b7a13c3f404 ("staging: r8712u: Fix possible buffer overrun") Signed-off-by: Young Xiao Cc: stable Reviewed-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman commit 59861547ec9a9736e7882f6fb0c096a720ff811a Author: Bin Liu Date: Mon Nov 12 09:43:22 2018 -0600 dmaengine: cppi41: delete channel from pending list when stop channel The driver defines three states for a cppi channel. - idle: .chan_busy == 0 && not in .pending list - pending: .chan_busy == 0 && in .pending list - busy: .chan_busy == 1 && not in .pending list There are cases in which the cppi channel could be in the pending state when cppi41_dma_issue_pending() is called after cppi41_runtime_suspend() is called. cppi41_stop_chan() has a bug for these cases to set channels to idle state. It only checks the .chan_busy flag, but not the .pending list, then later when cppi41_runtime_resume() is called the channels in .pending list will be transitioned to busy state. Removing channels from the .pending list solves the problem. Fixes: 975faaeb9985 ("dma: cppi41: start tear down only if channel is busy") Cc: stable@vger.kernel.org # v3.15+ Signed-off-by: Bin Liu Reviewed-by: Peter Ujfalusi Signed-off-by: Vinod Koul commit dae522045094ebfa9a10cf7951a8f79b02da8e15 Author: Baruch Siach Date: Tue Dec 4 17:46:02 2018 +0200 Revert "arm64: dts: marvell: add CPU Idle power state support on Armada 7K/8K" This reverts commit 8ed46368776b3bc93d74c1f8f2bfb9fd8a9ad805. This commit breaks boot on Armada 8K based systems. Reverting it makes affected systems boot again. Reported-by: Sergey Matyukevich Signed-off-by: Baruch Siach Signed-off-by: Gregory CLEMENT commit 64068853bc77786d1a28abb4087d6a3e93aedbe2 Author: Lucas Stach Date: Tue Nov 6 03:40:37 2018 +0000 dmaengine: imx-sdma: use GFP_NOWAIT for dma descriptor allocations DMA buffer descriptors aren't allocated from atomic context, so they can use the less heavyweigth GFP_NOWAIT. Signed-off-by: Lucas Stach Signed-off-by: Robin Gong Cc: stable Signed-off-by: Vinod Koul commit b8603d2a5795c42f78998e70dc792336e0dc20c9 Author: Lucas Stach Date: Tue Nov 6 03:40:33 2018 +0000 dmaengine: imx-sdma: implement channel termination via worker The dmaengine documentation states that device_terminate_all may be asynchronous and need not wait for the active transfers to stop. This allows us to move most of the functionality currently implemented in the sdma channel termination function to run in a worker, outside of any atomic context. Moving this out of atomic context has two benefits: we can now sleep while waiting for the channel to terminate, instead of busy waiting and the freeing of the dma descriptors happens with IRQs enabled, getting rid of a warning in the dma mapping code. As the termination is now async, we need to implement the device_synchronize dma engine function which simply waits for the worker to finish its execution. Signed-off-by: Lucas Stach Signed-off-by: Robin Gong Cc: stable Signed-off-by: Vinod Koul commit ebb853b1bd5f659b92c71dc6a9de44cfc37c78c0 Author: Lucas Stach Date: Tue Nov 6 03:40:28 2018 +0000 Revert "dmaengine: imx-sdma: alloclate bd memory from dma pool" This reverts commit fe5b85c656bc. The SDMA engine needs the descriptors to be contiguous in memory. As the dma pool API is only able to provide a single descriptor per alloc invocation there is no guarantee that multiple descriptors satisfy this requirement. Also the code in question is broken as it only allocates memory for a single descriptor, without looking at the number of descriptors required for the transfer, leading to out-of-bounds accesses when the descriptors are written. Signed-off-by: Lucas Stach Signed-off-by: Robin Gong Cc: stable Signed-off-by: Vinod Koul commit c06abca69218ac42fa58d1ba7a7b0d9bab5f1b18 Author: Lucas Stach Date: Tue Nov 6 03:40:25 2018 +0000 Revert "dmaengine: imx-sdma: Use GFP_NOWAIT for dma allocations" This reverts commit c1199875d327, as this depends on another commit that is going to be reverted. Signed-off-by: Lucas Stach Signed-off-by: Robin Gong Cc: stable Signed-off-by: Vinod Koul commit 25896d073d8a0403b07e6dec56f58e6c33678207 Author: Masahiro Yamada Date: Wed Dec 5 15:27:19 2018 +0900 x86/build: Fix compiler support check for CONFIG_RETPOLINE It is troublesome to add a diagnostic like this to the Makefile parse stage because the top-level Makefile could be parsed with a stale include/config/auto.conf. Once you are hit by the error about non-retpoline compiler, the compilation still breaks even after disabling CONFIG_RETPOLINE. The easiest fix is to move this check to the "archprepare" like this commit did: 829fe4aa9ac1 ("x86: Allow generating user-space headers without a compiler") Reported-by: Meelis Roos Tested-by: Meelis Roos Signed-off-by: Masahiro Yamada Acked-by: Zhenzhong Duan Cc: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Zhenzhong Duan Fixes: 4cd24de3a098 ("x86/retpoline: Make CONFIG_RETPOLINE depend on compiler support") Link: http://lkml.kernel.org/r/1543991239-18476-1-git-send-email-yamada.masahiro@socionext.com Link: https://lkml.org/lkml/2018/12/4/206 Signed-off-by: Ingo Molnar commit 6085c13351ebab4a427215082d11e2f02bd3fb46 Author: Stefan Wahren Date: Sat Nov 10 17:55:27 2018 +0100 thermal: bcm2835: Switch to SPDX identifier Adopt the SPDX license identifier headers to ease license compliance management. Cc: Martin Sperl Signed-off-by: Stefan Wahren Signed-off-by: Eduardo Valentin commit 27359fd6e5f3c5db8fe544b63238b6170e8806d8 Author: Matthew Wilcox Date: Fri Nov 30 11:05:06 2018 -0500 dax: Fix unlock mismatch with updated API Internal to dax_unlock_mapping_entry(), dax_unlock_entry() is used to store a replacement entry in the Xarray at the given xas-index with the DAX_LOCKED bit clear. When called, dax_unlock_entry() expects the unlocked value of the entry relative to the current Xarray state to be specified. In most contexts dax_unlock_entry() is operating in the same scope as the matched dax_lock_entry(). However, in the dax_unlock_mapping_entry() case the implementation needs to recall the original entry. In the case where the original entry is a 'pmd' entry it is possible that the pfn performed to do the lookup is misaligned to the value retrieved in the Xarray. Change the api to return the unlock cookie from dax_lock_page() and pass it to dax_unlock_page(). This fixes a bug where dax_unlock_page() was assuming that the page was PMD-aligned if the entry was a PMD entry with signatures like: WARNING: CPU: 38 PID: 1396 at fs/dax.c:340 dax_insert_entry+0x2b2/0x2d0 RIP: 0010:dax_insert_entry+0x2b2/0x2d0 [..] Call Trace: dax_iomap_pte_fault.isra.41+0x791/0xde0 ext4_dax_huge_fault+0x16f/0x1f0 ? up_read+0x1c/0xa0 __do_fault+0x1f/0x160 __handle_mm_fault+0x1033/0x1490 handle_mm_fault+0x18b/0x3d0 Link: https://lkml.kernel.org/r/20181130154902.GL10377@bombadil.infradead.org Fixes: 9f32d221301c ("dax: Convert dax_lock_mapping_entry to XArray") Reported-by: Dan Williams Signed-off-by: Matthew Wilcox Tested-by: Dan Williams Reviewed-by: Jan Kara Signed-off-by: Dan Williams commit dc6946cbef38f10b9617250fa851e3cc550d9602 Author: Russell King Date: Fri Nov 9 17:01:05 2018 +0000 thermal: armada: fix legacy resource fixup When the armada thermal module is inserted, removed and then reinserted, the system panics as per the messages below. The reason is that "edit" a live resource in the resource tree twice, and end up with it pointing to some other hardware. Editing live resources (resources that are part of the registered resource tree) is not permissible - the resource tree is an ordered set of resources, sorted by start address, and when a new resource is inserted, it is validated that it (a) fits within its parent resource and (b) does not overlap a neighbouring resource. Get rid of this resource editing. We can instead adjust the return value from ioremap() as ioremap() deals with the creation of page- based mappings - provided the adjustment does not cross a page boundary. SError Interrupt on CPU1, code 0xbf000000 -- SError CPU: 1 PID: 2749 Comm: modprobe Not tainted 4.19.0+ #175 Hardware name: Marvell 8040 MACCHIATOBin Double shot (DT) pstate: 20400085 (nzCv daIf +PAN -UAO) pc : regmap_mmio_read+0x3c/0x60 lr : regmap_mmio_read+0x3c/0x60 sp : ffffff800d453900 x29: ffffff800d453900 x28: ffffff800096a1d0 x27: 0000000000000100 x26: ffffff80009696d8 x25: ffffff8000969000 x24: ffffffc13a588918 x23: ffffffc13a9a28a8 x22: ffffff800d4539dc x21: 0000000000000084 x20: ffffff800d4539dc x19: ffffffc13a5d5480 x18: 0000000000000000 x17: 0000000000000000 x16: 0000000000000000 x15: 0000000000000000 x14: 0000000000000000 x13: 0000000000000000 x12: 0000000000000030 x11: 0101010101010101 x10: 7f7f7f7f7f7f7f7f x9 : 0000000000000000 x8 : ffffffc13a5d5a80 x7 : 0000000000000000 x6 : 000000000000003f x5 : 0000000000000000 x4 : 0000000000000000 x3 : ffffff800851be70 x2 : ffffff800851bd60 x1 : ffffff800d492ff8 x0 : 0000000000000000 Kernel panic - not syncing: Asynchronous SError Interrupt CPU: 1 PID: 2749 Comm: modprobe Not tainted 4.19.0+ #175 Hardware name: Marvell 8040 MACCHIATOBin Double shot (DT) Call trace: dump_backtrace+0x0/0x158 show_stack+0x14/0x1c dump_stack+0x90/0xb0 panic+0x128/0x298 print_tainted+0x0/0xa8 arm64_serror_panic+0x74/0x80 do_serror+0x5c/0xb8 el1_error+0xb4/0x144 regmap_mmio_read+0x3c/0x60 _regmap_bus_reg_read+0x18/0x20 _regmap_read+0x64/0x180 regmap_read+0x44/0x6c armada_ap806_init+0x24/0x5c [armada_thermal] armada_thermal_probe+0x2c8/0x37c [armada_thermal] platform_drv_probe+0x4c/0xb0 really_probe+0x21c/0x2b4 driver_probe_device+0x58/0xfc __driver_attach+0xd4/0xd8 bus_for_each_dev+0x50/0xa0 driver_attach+0x20/0x28 bus_add_driver+0x1c4/0x228 driver_register+0x6c/0x124 __platform_driver_register+0x4c/0x54 armada_thermal_driver_init+0x20/0x1000 [armada_thermal] do_one_initcall+0x30/0x204 do_init_module+0x5c/0x1d4 load_module+0x1a88/0x212c __se_sys_finit_module+0xa0/0xac __arm64_sys_finit_module+0x1c/0x24 el0_svc_common+0x94/0xf0 el0_svc_handler+0x24/0x80 el0_svc+0x8/0x3c0 SMP: stopping secondary CPUs Kernel Offset: disabled CPU features: 0x0,21806000 Memory Limit: none Signed-off-by: Russell King Tested-by: Miquel Raynal Signed-off-by: Eduardo Valentin commit 0fb628f0f250c74b1023edd0ca4a57c8b35b9b2c Author: Baruch Siach Date: Tue Dec 4 16:03:53 2018 +0200 net: mvpp2: fix phylink handling of invalid PHY modes The .validate phylink callback should empty the supported bitmap when the interface mode is invalid. Cc: Maxime Chevallier Cc: Antoine Tenart Reported-by: Russell King Signed-off-by: Baruch Siach Signed-off-by: David S. Miller commit 01b3fd5ac97caffb8e5d5bd85086da33db3b361f Author: Baruch Siach Date: Tue Dec 4 16:03:52 2018 +0200 net: mvpp2: fix detection of 10G SFP modules The mvpp2_phylink_validate() relies on the interface field of phylink_link_state to determine valid link modes. However, when called from phylink_sfp_module_insert() this field in not initialized. The default switch case then excludes 10G link modes. This allows 10G SFP modules that are detected correctly to be configured at max rate of 2.5G. Catch the uninitialized PHY mode case, and allow 10G rates. Fixes: d97c9f4ab000b ("net: mvpp2: 1000baseX support") Cc: Maxime Chevallier Cc: Antoine Tenart Acked-by: Russell King Signed-off-by: Baruch Siach Signed-off-by: David S. Miller commit 70bb27b79adf63ea39e37371d09c823c7a8f93ce Author: Russell King Date: Fri Nov 9 16:44:14 2018 +0000 thermal: armada: fix legacy validity test sense Commit 8c0e64ac4075 ("thermal: armada: get rid of the ->is_valid() pointer") removed the unnecessary indirection through a function pointer, but in doing so, also removed the negation operator too: - if (priv->data->is_valid && !priv->data->is_valid(priv)) { + if (armada_is_valid(priv)) { which results in: armada_thermal f06f808c.thermal: Temperature sensor reading not valid armada_thermal f2400078.thermal: Temperature sensor reading not valid armada_thermal f4400078.thermal: Temperature sensor reading not valid at boot, or whenever the "temp" sysfs file is read. Replace the negation operator. Fixes: 8c0e64ac4075 ("thermal: armada: get rid of the ->is_valid() pointer") Signed-off-by: Russell King Signed-off-by: Eduardo Valentin commit ecb239d96d369c23c33d41708646df646de669f4 Author: Nicolas Saenz Julienne Date: Mon Dec 3 13:21:01 2018 +0100 ethernet: fman: fix wrong of_node_put() in probe function After getting a reference to the platform device's of_node the probe function ends up calling of_find_matching_node() using the node as an argument. The function takes care of decreasing the refcount on it. We are then incorrectly decreasing the refcount on that node again. This patch removes the unwarranted call to of_node_put(). Fixes: 414fd46e7762 ("fsl/fman: Add FMan support") Signed-off-by: Nicolas Saenz Julienne Signed-off-by: David S. Miller commit 688838934c231bb08f46db687e57f6d8bf82709c Author: Eric Dumazet Date: Tue Dec 4 09:40:35 2018 -0800 rtnetlink: ndo_dflt_fdb_dump() only work for ARPHRD_ETHER devices kmsan was able to trigger a kernel-infoleak using a gre device [1] nlmsg_populate_fdb_fill() has a hard coded assumption that dev->addr_len is ETH_ALEN, as normally guaranteed for ARPHRD_ETHER devices. A similar issue was fixed recently in commit da71577545a5 ("rtnetlink: Disallow FDB configuration for non-Ethernet device") [1] BUG: KMSAN: kernel-infoleak in copyout lib/iov_iter.c:143 [inline] BUG: KMSAN: kernel-infoleak in _copy_to_iter+0x4c0/0x2700 lib/iov_iter.c:576 CPU: 0 PID: 6697 Comm: syz-executor310 Not tainted 4.20.0-rc3+ #95 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+0x32d/0x480 lib/dump_stack.c:113 kmsan_report+0x12c/0x290 mm/kmsan/kmsan.c:683 kmsan_internal_check_memory+0x32a/0xa50 mm/kmsan/kmsan.c:743 kmsan_copy_to_user+0x78/0xd0 mm/kmsan/kmsan_hooks.c:634 copyout lib/iov_iter.c:143 [inline] _copy_to_iter+0x4c0/0x2700 lib/iov_iter.c:576 copy_to_iter include/linux/uio.h:143 [inline] skb_copy_datagram_iter+0x4e2/0x1070 net/core/datagram.c:431 skb_copy_datagram_msg include/linux/skbuff.h:3316 [inline] netlink_recvmsg+0x6f9/0x19d0 net/netlink/af_netlink.c:1975 sock_recvmsg_nosec net/socket.c:794 [inline] sock_recvmsg+0x1d1/0x230 net/socket.c:801 ___sys_recvmsg+0x444/0xae0 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+0xcf/0x110 arch/x86/entry/common.c:291 entry_SYSCALL_64_after_hwframe+0x63/0xe7 RIP: 0033:0x441119 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 db 0a fc ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007fffc7f008a8 EFLAGS: 00000207 ORIG_RAX: 000000000000002f RAX: ffffffffffffffda RBX: 00000000004002c8 RCX: 0000000000441119 RDX: 0000000000000040 RSI: 00000000200005c0 RDI: 0000000000000003 RBP: 00000000006cc018 R08: 0000000000000100 R09: 0000000000000100 R10: 0000000000000100 R11: 0000000000000207 R12: 0000000000402080 R13: 0000000000402110 R14: 0000000000000000 R15: 0000000000000000 Uninit was stored to memory at: kmsan_save_stack_with_flags mm/kmsan/kmsan.c:246 [inline] kmsan_save_stack mm/kmsan/kmsan.c:261 [inline] kmsan_internal_chain_origin+0x13d/0x240 mm/kmsan/kmsan.c:469 kmsan_memcpy_memmove_metadata+0x1a9/0xf70 mm/kmsan/kmsan.c:344 kmsan_memcpy_metadata+0xb/0x10 mm/kmsan/kmsan.c:362 __msan_memcpy+0x61/0x70 mm/kmsan/kmsan_instr.c:162 __nla_put lib/nlattr.c:744 [inline] nla_put+0x20a/0x2d0 lib/nlattr.c:802 nlmsg_populate_fdb_fill+0x444/0x810 net/core/rtnetlink.c:3466 nlmsg_populate_fdb net/core/rtnetlink.c:3775 [inline] ndo_dflt_fdb_dump+0x73a/0x960 net/core/rtnetlink.c:3807 rtnl_fdb_dump+0x1318/0x1cb0 net/core/rtnetlink.c:3979 netlink_dump+0xc79/0x1c90 net/netlink/af_netlink.c:2244 __netlink_dump_start+0x10c4/0x11d0 net/netlink/af_netlink.c:2352 netlink_dump_start include/linux/netlink.h:216 [inline] rtnetlink_rcv_msg+0x141b/0x1540 net/core/rtnetlink.c:4910 netlink_rcv_skb+0x394/0x640 net/netlink/af_netlink.c:2477 rtnetlink_rcv+0x50/0x60 net/core/rtnetlink.c:4965 netlink_unicast_kernel net/netlink/af_netlink.c:1310 [inline] netlink_unicast+0x1699/0x1740 net/netlink/af_netlink.c:1336 netlink_sendmsg+0x13c7/0x1440 net/netlink/af_netlink.c:1917 sock_sendmsg_nosec net/socket.c:621 [inline] sock_sendmsg net/socket.c:631 [inline] ___sys_sendmsg+0xe3b/0x1240 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+0xcf/0x110 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:246 [inline] kmsan_internal_poison_shadow+0x6d/0x130 mm/kmsan/kmsan.c:170 kmsan_kmalloc+0xa1/0x100 mm/kmsan/kmsan_hooks.c:186 __kmalloc+0x14c/0x4d0 mm/slub.c:3825 kmalloc include/linux/slab.h:551 [inline] __hw_addr_create_ex net/core/dev_addr_lists.c:34 [inline] __hw_addr_add_ex net/core/dev_addr_lists.c:80 [inline] __dev_mc_add+0x357/0x8a0 net/core/dev_addr_lists.c:670 dev_mc_add+0x6d/0x80 net/core/dev_addr_lists.c:687 ip_mc_filter_add net/ipv4/igmp.c:1128 [inline] igmp_group_added+0x4d4/0xb80 net/ipv4/igmp.c:1311 __ip_mc_inc_group+0xea9/0xf70 net/ipv4/igmp.c:1444 ip_mc_inc_group net/ipv4/igmp.c:1453 [inline] ip_mc_up+0x1c3/0x400 net/ipv4/igmp.c:1775 inetdev_event+0x1d03/0x1d80 net/ipv4/devinet.c:1522 notifier_call_chain kernel/notifier.c:93 [inline] __raw_notifier_call_chain kernel/notifier.c:394 [inline] raw_notifier_call_chain+0x13d/0x240 kernel/notifier.c:401 __dev_notify_flags+0x3da/0x860 net/core/dev.c:1733 dev_change_flags+0x1ac/0x230 net/core/dev.c:7569 do_setlink+0x165f/0x5ea0 net/core/rtnetlink.c:2492 rtnl_newlink+0x2ad7/0x35a0 net/core/rtnetlink.c:3111 rtnetlink_rcv_msg+0x1148/0x1540 net/core/rtnetlink.c:4947 netlink_rcv_skb+0x394/0x640 net/netlink/af_netlink.c:2477 rtnetlink_rcv+0x50/0x60 net/core/rtnetlink.c:4965 netlink_unicast_kernel net/netlink/af_netlink.c:1310 [inline] netlink_unicast+0x1699/0x1740 net/netlink/af_netlink.c:1336 netlink_sendmsg+0x13c7/0x1440 net/netlink/af_netlink.c:1917 sock_sendmsg_nosec net/socket.c:621 [inline] sock_sendmsg net/socket.c:631 [inline] ___sys_sendmsg+0xe3b/0x1240 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+0xcf/0x110 arch/x86/entry/common.c:291 entry_SYSCALL_64_after_hwframe+0x63/0xe7 Bytes 36-37 of 105 are uninitialized Memory access of size 105 starts at ffff88819686c000 Data copied to user address 0000000020000380 Fixes: d83b06036048 ("net: add fdb generic dump routine") Signed-off-by: Eric Dumazet Cc: John Fastabend Cc: Ido Schimmel Cc: David Ahern Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller commit c3b9ab5db11d8098ca7674175f12ab21cdce1bbb Author: Fabio Estevam Date: Fri Nov 30 08:31:29 2018 -0200 ARM: dts: imx7d-pico: Describe the Wifi clock The Wifi chip should be clocked by a 32kHz clock coming from i.MX7D CLKO2 output pin, so describe the pinmux and clock hierarchy in the device tree to allow the Wifi chip to be properly clocked. Managed to successfully test Wifi with such change. Used the standard nvram.txt file provided by TechNexion, which selects an external 32kHz clock for the Wifi chip by default. Fixes: 99a52450c707 ("ARM: dts: imx7d-pico: Add Wifi support") Suggested-by: Arend van Spriel Tested-by: Otavio Salvador Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit ffe81d45322cc3cb140f0db080a4727ea284661e Author: Jens Axboe Date: Tue Dec 4 20:06:48 2018 -0700 blk-mq: fix corruption with direct issue If we attempt a direct issue to a SCSI device, and it returns BUSY, then we queue the request up normally. However, the SCSI layer may have already setup SG tables etc for this particular command. If we later merge with this request, then the old tables are no longer valid. Once we issue the IO, we only read/write the original part of the request, not the new state of it. This causes data corruption, and is most often noticed with the file system complaining about the just read data being invalid: [ 235.934465] EXT4-fs error (device sda1): ext4_iget:4831: inode #7142: comm dpkg-query: bad extra_isize 24937 (inode size 256) because most of it is garbage... This doesn't happen from the normal issue path, as we will simply defer the request to the hardware queue dispatch list if we fail. Once it's on the dispatch list, we never merge with it. Fix this from the direct issue path by flagging the request as REQ_NOMERGE so we don't change the size of it before issue. See also: https://bugzilla.kernel.org/show_bug.cgi?id=201685 Tested-by: Guenter Roeck Fixes: 6ce3dd6eec1 ("blk-mq: issue directly if hw queue isn't busy in case of 'none'") Cc: stable@vger.kernel.org Signed-off-by: Jens Axboe commit c2a3831df6dc164af66d8d86cf356a90c021b86f Author: Nathan Jones Date: Tue Dec 4 10:05:32 2018 +0100 ARM: 8816/1: dma-mapping: fix potential uninitialized return While trying to use the dma_mmap_*() interface, it was noticed that this interface returns strange values when passed an incorrect length. If neither of the if() statements fire then the return value is uninitialized. In the worst case it returns 0 which means the caller will think the function succeeded. Fixes: 1655cf8829d8 ("ARM: dma-mapping: Remove traces of NOMMU code") Signed-off-by: Nathan Jones Reviewed-by: Robin Murphy Acked-by: Vladimir Murzin Signed-off-by: Russell King commit 3d0358d0ba048c5afb1385787aaec8fa5ad78fcc Author: Vladimir Murzin Date: Fri Nov 23 12:25:21 2018 +0100 ARM: 8815/1: V7M: align v7m_dma_inv_range() with v7 counterpart Chris has discovered and reported that v7_dma_inv_range() may corrupt memory if address range is not aligned to cache line size. Since the whole cache-v7m.S was lifted form cache-v7.S the same observation applies to v7m_dma_inv_range(). So the fix just mirrors what has been done for v7 with a little specific of M-class. Cc: Chris Cole Signed-off-by: Vladimir Murzin Signed-off-by: Russell King commit a1208f6a822ac29933e772ef1f637c5d67838da9 Author: Chris Cole Date: Fri Nov 23 12:20:45 2018 +0100 ARM: 8814/1: mm: improve/fix ARM v7_dma_inv_range() unaligned address handling This patch addresses possible memory corruption when v7_dma_inv_range(start_address, end_address) address parameters are not aligned to whole cache lines. This function issues "invalidate" cache management operations to all cache lines from start_address (inclusive) to end_address (exclusive). When start_address and/or end_address are not aligned, the start and/or end cache lines are first issued "clean & invalidate" operation. The assumption is this is done to ensure that any dirty data addresses outside the address range (but part of the first or last cache lines) are cleaned/flushed so that data is not lost, which could happen if just an invalidate is issued. The problem is that these first/last partial cache lines are issued "clean & invalidate" and then "invalidate". This second "invalidate" is not required and worse can cause "lost" writes to addresses outside the address range but part of the cache line. If another component writes to its part of the cache line between the "clean & invalidate" and "invalidate" operations, the write can get lost. This fix is to remove the extra "invalidate" operation when unaligned addressed are used. A kernel module is available that has a stress test to reproduce the issue and a unit test of the updated v7_dma_inv_range(). It can be downloaded from http://ftp.sageembedded.com/outgoing/linux/cache-test-20181107.tgz. v7_dma_inv_range() is call by dmac_[un]map_area(addr, len, direction) when the direction is DMA_FROM_DEVICE. One can (I believe) successfully argue that DMA from a device to main memory should use buffers aligned to cache line size, because the "clean & invalidate" might overwrite data that the device just wrote using DMA. But if a driver does use unaligned buffers, at least this fix will prevent memory corruption outside the buffer. Signed-off-by: Chris Cole Signed-off-by: Russell King commit 090afc1e40f411144e112431da279bafe7e734ff Author: Nicholas Kazlauskas Date: Fri Jul 20 10:17:29 2018 -0400 drm/amd/display: Fix overflow/truncation from strncpy. [Why] New GCC warnings for stringop-truncation and stringop-overflow help catch common misuse of strncpy. This patch suppresses these warnings by fixing bugs identified by them. [How] Since the parameter passed for name in amdpgu_dm_create_common_mode has no fixed length, if the string is >= DRM_DISPLAY_MODE_LEN then mode->name will not be null-terminated. The truncation in fill_audio_info won't actually occur (and the string will be null-terminated since the buffer is initialized to zero), but the warning can be suppressed by using the proper buffer size. This patch fixes both issues by using the real size for the buffer and making use of strscpy (which always terminates). Signed-off-by: Nicholas Kazlauskas Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher commit 1b3b27b2a1044457d7dbf1b13bfdbd9a0c1c1108 Author: tianci yin Date: Tue Dec 4 16:07:18 2018 +0800 drm/amd/powerplay: improve OD code robustness add protection code to avoid lower frequency trigger over drive. Reviewed-by: Rex Zhu Signed-off-by: Tianci Yin Signed-off-by: Alex Deucher commit 4944af670bc2c7da77ac17b295656d913e3898f4 Author: wentalou Date: Mon Dec 3 10:49:50 2018 +0800 drm/amdgpu: enlarge maximum waiting time of KIQ KIQ in VF’s init delayed by another VF’s reset, which would cause late_init failed occasionally. MAX_KIQ_REG_TRY enlarged from 20 to 80 would fix this issue. Reviewed-by: Christian König Signed-off-by: Wentao Lou Signed-off-by: Alex Deucher commit 8f67b5adc030553fbc877124306f3f3bdab89aa8 Author: Darrick J. Wong Date: Sun Dec 2 08:38:07 2018 -0800 iomap: partially revert 4721a601099 (simulated directio short read on EFAULT) In commit 4721a601099, we tried to fix a problem wherein directio reads into a splice pipe will bounce EFAULT/EAGAIN all the way out to userspace by simulating a zero-byte short read. This happens because some directio read implementations (xfs) will call bio_iov_iter_get_pages to grab pipe buffer pages and issue asynchronous reads, but as soon as we run out of pipe buffers that _get_pages call returns EFAULT, which the splice code translates to EAGAIN and bounces out to userspace. In that commit, the iomap code catches the EFAULT and simulates a zero-byte read, but that causes assertion errors on regular splice reads because xfs doesn't allow short directio reads. This causes infinite splice() loops and assertion failures on generic/095 on overlayfs because xfs only permit total success or total failure of a directio operation. The underlying issue in the pipe splice code has now been fixed by changing the pipe splice loop to avoid avoid reading more data than there is space in the pipe. Therefore, it's no longer necessary to simulate the short directio, so remove the hack from iomap. Fixes: 4721a601099 ("iomap: dio data corruption and spurious errors when pipes fill") Reported-by: Murphy Zhou Ranted-by: Amir Goldstein Reviewed-by: Christoph Hellwig Signed-off-by: Darrick J. Wong commit a517af52cb57f972cee2378765e1c5dd10141f0d Merge: adac0753c252 1e8249b8a4e9 Author: Linus Torvalds Date: Tue Dec 4 09:10:39 2018 -0800 Merge branch 'parisc-4.20-4' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux Pull parisc fix from Helge Deller: "On parisc, use -ffunction-sections compiler option when building 32-bit kernel modules to avoid sysfs-warnings when loading such modules. This got broken with kernel v4.18" * 'parisc-4.20-4' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: parisc: Enable -ffunction-sections for modules on 32-bit kernel commit 17614445576b6af24e9cf36607c6448164719c96 Author: Darrick J. Wong Date: Fri Nov 30 10:37:49 2018 -0800 splice: don't read more than available pipe space In commit 4721a601099, we tried to fix a problem wherein directio reads into a splice pipe will bounce EFAULT/EAGAIN all the way out to userspace by simulating a zero-byte short read. This happens because some directio read implementations (xfs) will call bio_iov_iter_get_pages to grab pipe buffer pages and issue asynchronous reads, but as soon as we run out of pipe buffers that _get_pages call returns EFAULT, which the splice code translates to EAGAIN and bounces out to userspace. In that commit, the iomap code catches the EFAULT and simulates a zero-byte read, but that causes assertion errors on regular splice reads because xfs doesn't allow short directio reads. The brokenness is compounded by splice_direct_to_actor immediately bailing on do_splice_to returning <= 0 without ever calling ->actor (which empties out the pipe), so if userspace calls back we'll EFAULT again on the full pipe, and nothing ever gets copied. Therefore, teach splice_direct_to_actor to clamp its requests to the amount of free space in the pipe and remove the simulated short read from the iomap directio code. Fixes: 4721a601099 ("iomap: dio data corruption and spurious errors when pipes fill") Reported-by: Murphy Zhou Ranted-by: Amir Goldstein Reviewed-by: Christoph Hellwig Signed-off-by: Darrick J. Wong commit 6744557b53a2b710ebce3736a5c27a0119685fcc Author: Darrick J. Wong Date: Fri Nov 30 12:32:38 2018 -0800 vfs: allow some remap flags to be passed to vfs_clone_file_range In overlayfs, ovl_remap_file_range calls vfs_clone_file_range on the lower filesystem's inode, passing through whatever remap flags it got from its caller. Since vfs_copy_file_range first tries a filesystem's remap function with REMAP_FILE_CAN_SHORTEN, this can get passed through to the second vfs_copy_file_range call, and this isn't an issue. Change the WARN_ON to look only for the DEDUP flag. Signed-off-by: Darrick J. Wong Reviewed-by: Amir Goldstein Reviewed-by: Christoph Hellwig commit 7d048df4e9b05ba89b74d062df59498aa81f3785 Author: Eric Sandeen Date: Fri Nov 30 07:55:57 2018 -0800 xfs: fix inverted return from xfs_btree_sblock_verify_crc xfs_btree_sblock_verify_crc is a bool so should not be returning a failaddr_t; worse, if xfs_log_check_lsn fails it returns __this_address which looks like a boolean true (i.e. success) to the caller. (interestingly xfs_btree_lblock_verify_crc doesn't have the issue) Signed-off-by: Eric Sandeen Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit a579121f94aba4e8bad1a121a0fad050d6925296 Author: Darrick J. Wong Date: Tue Nov 27 11:01:43 2018 -0800 xfs: fix PAGE_MASK usage in xfs_free_file_space In commit e53c4b598, I *tried* to teach xfs to force writeback when we fzero/fpunch right up to EOF so that if EOF is in the middle of a page, the post-EOF part of the page gets zeroed before we return to userspace. Unfortunately, I missed the part where PAGE_MASK is ~(PAGE_SIZE - 1), which means that we totally fail to zero if we're fpunching and EOF is within the first page. Worse yet, the same PAGE_MASK thinko plagues the filemap_write_and_wait_range call, so we'd initiate writeback of the entire file, which (mostly) masked the thinko. Drop the tricky PAGE_MASK and replace it with correct usage of PAGE_SIZE and the proper rounding macros. Fixes: e53c4b598 ("xfs: ensure post-EOF zeroing happens after zeroing part of a file") Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner Reviewed-by: Christoph Hellwig commit 7b566f70e1bf65b189b66eb3de6f431c30f7dff2 Author: David S. Miller Date: Tue Dec 4 08:47:44 2018 -0800 phy: Revert toggling reset changes. This reverts: ef1b5bf506b1 ("net: phy: Fix not to call phy_resume() if PHY is not attached") 8c85f4b81296 ("net: phy: micrel: add toggling phy reset if PHY is not attached") Andrew Lunn informs me that there are alternative efforts underway to fix this more properly. Signed-off-by: David S. Miller commit adac0753c25217a2365b132c87cb2540b51fa89b Merge: 0072a0c14d5b 6c3516fed7b6 Author: Linus Torvalds Date: Tue Dec 4 08:47:04 2018 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input updates from Dmitry Torokhov: "Mostly new IDs for Elan/Synaptics touchpads, plus a few small fixups" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: omap-keypad - fix keyboard debounce configuration Input: xpad - quirk all PDP Xbox One gamepads Input: synaptics - enable SMBus for HP 15-ay000 Input: synaptics - add PNP ID for ThinkPad P50 to SMBus Input: elan_i2c - add ACPI ID for Lenovo IdeaPad 330-15ARR Input: elan_i2c - add support for ELAN0621 touchpad Input: hyper-v - fix wakeup from suspend-to-idle Input: atkbd - clean up indentation issue Input: st1232 - convert to SPDX identifiers Input: migor_ts - convert to SPDX identifiers Input: dt-bindings - fix a typo in file input-reset.txt Input: cros_ec_keyb - fix button/switch capability reports Input: elan_i2c - add ELAN0620 to the ACPI table Input: matrix_keypad - check for errors from of_get_named_gpio() commit a92a72a24d48080f6c49bb514c082fbb1e5bf8fc Merge: 025dceb0fab3 ceefbc96fa5c Author: Daniel Borkmann Date: Tue Dec 4 17:22:02 2018 +0100 Merge branch 'bpf-verifier-resilience' Alexei Starovoitov says: ==================== Three patches to improve verifier ability to handle pathological bpf programs with a lot of branches: - make sure prog_load syscall can be aborted - improve branch taken analysis - introduce per-insn complexity limit for unprivileged programs ==================== Signed-off-by: Daniel Borkmann commit ceefbc96fa5c5b975d87bf8e89ba8416f6b764d9 Author: Alexei Starovoitov Date: Mon Dec 3 22:46:06 2018 -0800 bpf: add per-insn complexity limit malicious bpf program may try to force the verifier to remember a lot of distinct verifier states. Put a limit to number of per-insn 'struct bpf_verifier_state'. Note that hitting the limit doesn't reject the program. It potentially makes the verifier do more steps to analyze the program. It means that malicious programs will hit BPF_COMPLEXITY_LIMIT_INSNS sooner instead of spending cpu time walking long link list. The limit of BPF_COMPLEXITY_LIMIT_STATES==64 affects cilium progs with slight increase in number of "steps" it takes to successfully verify the programs: before after bpf_lb-DLB_L3.o 1940 1940 bpf_lb-DLB_L4.o 3089 3089 bpf_lb-DUNKNOWN.o 1065 1065 bpf_lxc-DDROP_ALL.o 28052 | 28162 bpf_lxc-DUNKNOWN.o 35487 | 35541 bpf_netdev.o 10864 10864 bpf_overlay.o 6643 6643 bpf_lcx_jit.o 38437 38437 But it also makes malicious program to be rejected in 0.4 seconds vs 6.5 Hence apply this limit to unprivileged programs only. Signed-off-by: Alexei Starovoitov Acked-by: Daniel Borkmann Acked-by: Edward Cree Signed-off-by: Daniel Borkmann commit 4f7b3e82589e0de723780198ec7983e427144c0a Author: Alexei Starovoitov Date: Mon Dec 3 22:46:05 2018 -0800 bpf: improve verifier branch analysis pathological bpf programs may try to force verifier to explode in the number of branch states: 20: (d5) if r1 s<= 0x24000028 goto pc+0 21: (b5) if r0 <= 0xe1fa20 goto pc+2 22: (d5) if r1 s<= 0x7e goto pc+0 23: (b5) if r0 <= 0xe880e000 goto pc+0 24: (c5) if r0 s< 0x2100ecf4 goto pc+0 25: (d5) if r1 s<= 0xe880e000 goto pc+1 26: (c5) if r0 s< 0xf4041810 goto pc+0 27: (d5) if r1 s<= 0x1e007e goto pc+0 28: (b5) if r0 <= 0xe86be000 goto pc+0 29: (07) r0 += 16614 30: (c5) if r0 s< 0x6d0020da goto pc+0 31: (35) if r0 >= 0x2100ecf4 goto pc+0 Teach verifier to recognize always taken and always not taken branches. This analysis is already done for == and != comparison. Expand it to all other branches. It also helps real bpf programs to be verified faster: before after bpf_lb-DLB_L3.o 2003 1940 bpf_lb-DLB_L4.o 3173 3089 bpf_lb-DUNKNOWN.o 1080 1065 bpf_lxc-DDROP_ALL.o 29584 28052 bpf_lxc-DUNKNOWN.o 36916 35487 bpf_netdev.o 11188 10864 bpf_overlay.o 6679 6643 bpf_lcx_jit.o 39555 38437 Reported-by: Anatoly Trosinenko Signed-off-by: Alexei Starovoitov Acked-by: Daniel Borkmann Acked-by: Edward Cree Signed-off-by: Daniel Borkmann commit c3494801cd1785e2c25f1a5735fa19ddcf9665da Author: Alexei Starovoitov Date: Mon Dec 3 22:46:04 2018 -0800 bpf: check pending signals while verifying programs Malicious user space may try to force the verifier to use as much cpu time and memory as possible. Hence check for pending signals while verifying the program. Note that suspend of sys_bpf(PROG_LOAD) syscall will lead to EAGAIN, since the kernel has to release the resources used for program verification. Reported-by: Anatoly Trosinenko Signed-off-by: Alexei Starovoitov Acked-by: Daniel Borkmann Acked-by: Edward Cree Signed-off-by: Daniel Borkmann commit a72173ecfc6774cf2d55de9fb29421ce69e3428c Author: Rafael J. Wysocki Date: Mon Dec 3 13:04:18 2018 +0100 Revert "exec: make de_thread() freezable" Revert commit c22397888f1e "exec: make de_thread() freezable" as requested by Ingo Molnar: "So there's a new regression in v4.20-rc4, my desktop produces this lockdep splat: [ 1772.588771] WARNING: pkexec/4633 still has locks held! [ 1772.588773] 4.20.0-rc4-custom-00213-g93a49841322b #1 Not tainted [ 1772.588775] ------------------------------------ [ 1772.588776] 1 lock held by pkexec/4633: [ 1772.588778] #0: 00000000ed85fbf8 (&sig->cred_guard_mutex){+.+.}, at: prepare_bprm_creds+0x2a/0x70 [ 1772.588786] stack backtrace: [ 1772.588789] CPU: 7 PID: 4633 Comm: pkexec Not tainted 4.20.0-rc4-custom-00213-g93a49841322b #1 [ 1772.588792] Call Trace: [ 1772.588800] dump_stack+0x85/0xcb [ 1772.588803] flush_old_exec+0x116/0x890 [ 1772.588807] ? load_elf_phdrs+0x72/0xb0 [ 1772.588809] load_elf_binary+0x291/0x1620 [ 1772.588815] ? sched_clock+0x5/0x10 [ 1772.588817] ? search_binary_handler+0x6d/0x240 [ 1772.588820] search_binary_handler+0x80/0x240 [ 1772.588823] load_script+0x201/0x220 [ 1772.588825] search_binary_handler+0x80/0x240 [ 1772.588828] __do_execve_file.isra.32+0x7d2/0xa60 [ 1772.588832] ? strncpy_from_user+0x40/0x180 [ 1772.588835] __x64_sys_execve+0x34/0x40 [ 1772.588838] do_syscall_64+0x60/0x1c0 The warning gets triggered by an ancient lockdep check in the freezer: (gdb) list *0xffffffff812ece06 0xffffffff812ece06 is in flush_old_exec (./include/linux/freezer.h:57). 52 * DO NOT ADD ANY NEW CALLERS OF THIS FUNCTION 53 * If try_to_freeze causes a lockdep warning it means the caller may deadlock 54 */ 55 static inline bool try_to_freeze_unsafe(void) 56 { 57 might_sleep(); 58 if (likely(!freezing(current))) 59 return false; 60 return __refrigerator(false); 61 } I reviewed the ->cred_guard_mutex code, and the mutex is held across all of exec() - and we always did this. But there's this recent -rc4 commit: > Chanho Min (1): > exec: make de_thread() freezable c22397888f1e: exec: make de_thread() freezable I believe this commit is bogus, you cannot call try_to_freeze() from de_thread(), because it's holding the ->cred_guard_mutex." Reported-by: Ingo Molnar Tested-by: Ingo Molnar Signed-off-by: Rafael J. Wysocki commit 10950929e994c5ecee149ff0873388d3c98f12b5 Author: Qu Wenruo Date: Fri Nov 23 09:06:36 2018 +0800 btrfs: tree-checker: Don't check max block group size as current max chunk size limit is unreliable [BUG] A completely valid btrfs will refuse to mount, with error message like: BTRFS critical (device sdb2): corrupt leaf: root=2 block=239681536 slot=172 \ bg_start=12018974720 bg_len=10888413184, invalid block group size, \ have 10888413184 expect (0, 10737418240] This has been reported several times as the 4.19 kernel is now being used. The filesystem refuses to mount, but is otherwise ok and booting 4.18 is a workaround. Btrfs check returns no error, and all kernels used on this fs is later than 2011, which should all have the 10G size limit commit. [CAUSE] For a 12 devices btrfs, we could allocate a chunk larger than 10G due to stripe stripe bump up. __btrfs_alloc_chunk() |- max_stripe_size = 1G |- max_chunk_size = 10G |- data_stripe = 11 |- if (1G * 11 > 10G) { stripe_size = 976128930; stripe_size = round_up(976128930, SZ_16M) = 989855744 However the final stripe_size (989855744) * 11 = 10888413184, which is still larger than 10G. [FIX] For the comprehensive check, we need to do the full check at chunk read time, and rely on bg <-> chunk mapping to do the check. We could just skip the length check for now. Fixes: fce466eab7ac ("btrfs: tree-checker: Verify block_group_item") Cc: stable@vger.kernel.org # v4.19+ Reported-by: Wang Yugui Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit e8cde625bfe8a714a856e1366bcbb259d7346095 Author: Aaro Koskinen Date: Tue Nov 20 01:14:00 2018 +0200 MMC: OMAP: fix broken MMC on OMAP15XX/OMAP5910/OMAP310 Since v2.6.22 or so there has been reports [1] about OMAP MMC being broken on OMAP15XX based hardware (OMAP5910 and OMAP310). The breakage seems to have been caused by commit 46a6730e3ff9 ("mmc-omap: Fix omap to use MMC_POWER_ON") that changed clock enabling to be done on MMC_POWER_ON. This can happen multiple times in a row, and on 15XX the hardware doesn't seem to like it and the MMC just stops responding. Fix by memorizing the power mode and do the init only when necessary. Before the patch (on Palm TE): mmc0: new SD card at address b368 mmcblk0: mmc0:b368 SDC 977 MiB mmci-omap mmci-omap.0: command timeout (CMD18) mmci-omap mmci-omap.0: command timeout (CMD13) mmci-omap mmci-omap.0: command timeout (CMD13) mmci-omap mmci-omap.0: command timeout (CMD12) [x 6] mmci-omap mmci-omap.0: command timeout (CMD13) [x 6] mmcblk0: error -110 requesting status mmci-omap mmci-omap.0: command timeout (CMD8) mmci-omap mmci-omap.0: command timeout (CMD18) mmci-omap mmci-omap.0: command timeout (CMD13) mmci-omap mmci-omap.0: command timeout (CMD13) mmci-omap mmci-omap.0: command timeout (CMD12) [x 6] mmci-omap mmci-omap.0: command timeout (CMD13) [x 6] mmcblk0: error -110 requesting status mmcblk0: recovery failed! print_req_error: I/O error, dev mmcblk0, sector 0 Buffer I/O error on dev mmcblk0, logical block 0, async page read mmcblk0: unable to read partition table After the patch: mmc0: new SD card at address b368 mmcblk0: mmc0:b368 SDC 977 MiB mmcblk0: p1 The patch is based on a fix and analysis done by Ladislav Michl. Tested on OMAP15XX/OMAP310 (Palm TE), OMAP1710 (Nokia 770) and OMAP2420 (Nokia N810). [1] https://marc.info/?t=123175197000003&r=1&w=2 Fixes: 46a6730e3ff9 ("mmc-omap: Fix omap to use MMC_POWER_ON") Reported-by: Ladislav Michl Reported-by: Andrzej Zaborowski Tested-by: Ladislav Michl Acked-by: Tony Lindgren Signed-off-by: Aaro Koskinen Cc: stable@vger.kernel.org Signed-off-by: Ulf Hansson commit b31a3ca745a4a47ba63208d37cd50abffe58280f Author: Wei Yongjun Date: Tue Dec 4 06:32:15 2018 +0000 drm/fb-helper: Fix typo in parameter description Fix typo in parameter description. Fixes: 4be9bd10e22d ("drm/fb_helper: Allow leaking fbdev smem_start") Signed-off-by: Wei Yongjun Acked-by: Neil Armstrong Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/1543905135-35293-1-git-send-email-weiyongjun1@huawei.com commit ec7ba118b9407c9b4d998b8065167afae5ed04be Author: Miklos Szeredi Date: Tue Dec 4 11:31:30 2018 +0100 Revert "ovl: relax permission checking on underlying layers" This reverts commit 007ea44892e6fa963a0876a979e34890325c64eb. The commit broke some selinux-testsuite cases, and it looks like there's no straightforward fix keeping the direction of this patch, so revert for now. The original patch was trying to fix the consistency of permission checks, and not an observed bug. So reverting should be safe. Signed-off-by: Miklos Szeredi commit a44f7cb937321d4961bfc8f28912126b06e701c5 Author: Wolfram Sang Date: Mon Nov 26 14:38:13 2018 +0100 mmc: core: use mrq->sbc when sending CMD23 for RPMB When sending out CMD23 in the blk preparation, the comment there rightfully says: * However, it is not sufficient to just send CMD23, * and avoid the final CMD12, as on an error condition * CMD12 (stop) needs to be sent anyway. This, coupled * with Auto-CMD23 enhancements provided by some * hosts, means that the complexity of dealing * with this is best left to the host. If CMD23 is * supported by card and host, we'll fill sbc in and let * the host deal with handling it correctly. Let's do this behaviour for RPMB as well, and not send CMD23 independently. Otherwise IP cores (like Renesas SDHI) may timeout because of automatic CMD23/CMD12 handling. Reported-by: Masaharu Hayakawa Signed-off-by: Wolfram Sang Tested-by: Clément Péron Reviewed-by: Avri Altman Reviewed-by: Niklas Söderlund Cc: stable@vger.kernel.org Signed-off-by: Ulf Hansson commit 43a1b0cb4cd6dbfd3cd9c10da663368394d299d8 Author: Masami Hiramatsu Date: Fri Aug 24 02:16:12 2018 +0900 kprobes/x86: Fix instruction patching corruption when copying more than one RIP-relative instruction After copy_optimized_instructions() copies several instructions to the working buffer it tries to fix up the real RIP address, but it adjusts the RIP-relative instruction with an incorrect RIP address for the 2nd and subsequent instructions due to a bug in the logic. This will break the kernel pretty badly (with likely outcomes such as a kernel freeze, a crash, or worse) because probed instructions can refer to the wrong data. For example putting kprobes on cpumask_next() typically hits this bug. cpumask_next() is normally like below if CONFIG_CPUMASK_OFFSTACK=y (in this case nr_cpumask_bits is an alias of nr_cpu_ids): : 48 89 f0 mov %rsi,%rax 8b 35 7b fb e2 00 mov 0xe2fb7b(%rip),%esi # ffffffff82db9e64 55 push %rbp ... If we put a kprobe on it and it gets jump-optimized, it gets patched by the kprobes code like this: : e9 95 7d 07 1e jmpq 0xffffffffa000207a 7b fb jnp 0xffffffff81f8a2e2 e2 00 loop 0xffffffff81f8a2e9 55 push %rbp This shows that the first two MOV instructions were copied to a trampoline buffer at 0xffffffffa000207a. Here is the disassembled result of the trampoline, skipping the optprobe template instructions: # Dump of assembly code from 0xffffffffa000207a to 0xffffffffa00020ea: 54 push %rsp ... 48 83 c4 08 add $0x8,%rsp 9d popfq 48 89 f0 mov %rsi,%rax 8b 35 82 7d db e2 mov -0x1d24827e(%rip),%esi # 0xffffffff82db9e67 This dump shows that the second MOV accesses *(nr_cpu_ids+3) instead of the original *nr_cpu_ids. This leads to a kernel freeze because cpumask_next() always returns 0 and for_each_cpu() never ends. Fix this by adding 'len' correctly to the real RIP address while copying. [ mingo: Improved the changelog. ] Reported-by: Michael Rodin Signed-off-by: Masami Hiramatsu Reviewed-by: Steven Rostedt (VMware) Cc: Arnaldo Carvalho de Melo Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Steven Rostedt Cc: Thomas Gleixner Cc: stable@vger.kernel.org # v4.15+ Fixes: 63fef14fc98a ("kprobes/x86: Make insn buffer always ROX and use text_poke()") Link: http://lkml.kernel.org/r/153504457253.22602.1314289671019919596.stgit@devbox Signed-off-by: Ingo Molnar commit 4c05ec47384ab3627b62814e8f886e90cc38ce15 Author: Taehee Yoo Date: Mon Nov 26 20:03:30 2018 +0900 netfilter: nf_tables: fix suspicious RCU usage in nft_chain_stats_replace() basechain->stats is rcu protected data which is updated from nft_chain_stats_replace(). This function is executed from the commit phase which holds the pernet nf_tables commit mutex - not the global nfnetlink subsystem mutex. Test commands to reproduce the problem are: %iptables-nft -I INPUT %iptables-nft -Z %iptables-nft -Z This patch uses RCU calls to handle basechain->stats updates to fix a splat that looks like: [89279.358755] ============================= [89279.363656] WARNING: suspicious RCU usage [89279.368458] 4.20.0-rc2+ #44 Tainted: G W L [89279.374661] ----------------------------- [89279.379542] net/netfilter/nf_tables_api.c:1404 suspicious rcu_dereference_protected() usage! [...] [89279.406556] 1 lock held by iptables-nft/5225: [89279.411728] #0: 00000000bf45a000 (&net->nft.commit_mutex){+.+.}, at: nf_tables_valid_genid+0x1f/0x70 [nf_tables] [89279.424022] stack backtrace: [89279.429236] CPU: 0 PID: 5225 Comm: iptables-nft Tainted: G W L 4.20.0-rc2+ #44 [89279.430135] Call Trace: [89279.430135] dump_stack+0xc9/0x16b [89279.430135] ? show_regs_print_info+0x5/0x5 [89279.430135] ? lockdep_rcu_suspicious+0x117/0x160 [89279.430135] nft_chain_commit_update+0x4ea/0x640 [nf_tables] [89279.430135] ? sched_clock_local+0xd4/0x140 [89279.430135] ? check_flags.part.35+0x440/0x440 [89279.430135] ? __rhashtable_remove_fast.constprop.67+0xec0/0xec0 [nf_tables] [89279.430135] ? sched_clock_cpu+0x126/0x170 [89279.430135] ? find_held_lock+0x39/0x1c0 [89279.430135] ? hlock_class+0x140/0x140 [89279.430135] ? is_bpf_text_address+0x5/0xf0 [89279.430135] ? check_flags.part.35+0x440/0x440 [89279.430135] ? __lock_is_held+0xb4/0x140 [89279.430135] nf_tables_commit+0x2555/0x39c0 [nf_tables] Fixes: f102d66b335a4 ("netfilter: nf_tables: use dedicated mutex to guard transactions") Signed-off-by: Taehee Yoo Signed-off-by: Pablo Neira Ayuso commit a2c741dfe7db0f628b7b3d98074ebb546ff0a137 Merge: bf29e9e9b6d2 1b603f9e4313 Author: David S. Miller Date: Mon Dec 3 16:16:23 2018 -0800 Merge branch 'mlx4-fixes' Tariq Toukan says: ==================== mlx4 fixes for 4.20-rc This patchset includes small fixes for the mlx4_en driver. First patch by Eran fixes the value used to init the netdevice's min_mtu field. Please queue it to -stable >= v4.10. Second patch by Saeed adds missing Kconfig build dependencies. Series generated against net commit: 35b827b6d061 tun: forbid iface creation with rtnl ops ==================== Signed-off-by: David S. Miller commit 1b603f9e4313348608f256b564ed6e3d9e67f377 Author: Saeed Mahameed Date: Sun Dec 2 14:34:37 2018 +0200 net/mlx4_en: Fix build break when CONFIG_INET is off MLX4_EN depends on NETDEVICES, ETHERNET and INET Kconfigs. Make sure they are listed in MLX4_EN Kconfig dependencies. This fixes the following build break: drivers/net/ethernet/mellanox/mlx4/en_rx.c:582:18: warning: ‘struct iphdr’ declared inside parameter list [enabled by default] struct iphdr *iph) ^ drivers/net/ethernet/mellanox/mlx4/en_rx.c:582:18: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default] drivers/net/ethernet/mellanox/mlx4/en_rx.c: In function ‘get_fixed_ipv4_csum’: drivers/net/ethernet/mellanox/mlx4/en_rx.c:586:20: error: dereferencing pointer to incomplete type _u8 ipproto = iph->protocol; Signed-off-by: Saeed Mahameed Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller commit 24be19e47779d604d1492c114459dca9a92acf78 Author: Eran Ben Elisha Date: Sun Dec 2 14:34:36 2018 +0200 net/mlx4_en: Change min MTU size to ETH_MIN_MTU NIC driver minimal MTU size shall be set to ETH_MIN_MTU, as defined in the RFC791 and in the network stack. Remove old mlx4_en only define for it, which was set to wrong value. Fixes: b80f71f5816f ("ethernet/mellanox: use core min/max MTU checking") Signed-off-by: Eran Ben Elisha Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller commit bf29e9e9b6d2f09cdbf39b48d028f0b49e944f85 Author: Qian Cai Date: Sat Dec 1 21:11:19 2018 -0500 net/core: tidy up an error message netif_napi_add() could report an error like this below due to it allows to pass a format string for wildcarding before calling dev_get_valid_name(), "netif_napi_add() called with weight 256 on device eth%d" For example, hns_enet_drv module does this. hns_nic_try_get_ae hns_nic_init_ring_data netif_napi_add register_netdev dev_get_valid_name Hence, make it a bit more human-readable by using netdev_err_once() instead. Signed-off-by: Qian Cai Signed-off-by: David S. Miller commit b07b864ee4232b03125992a8f6a490b040adcb6a Author: Bjorn Helgaas Date: Mon Dec 3 18:05:17 2018 -0600 Revert "PCI/ASPM: Do not initialize link state when aspm_disabled is set" This reverts commit 17c91487364fb33797ed84022564ee7544ac4945. Rafael found that this commit broke the SD card reader in his Acer Aspire S5. Details of the problem are in the bugzilla below. Fixes: 17c91487364f ("PCI/ASPM: Do not initialize link state when aspm_disabled is set") Link: https://bugzilla.kernel.org/show_bug.cgi?id=201801 Signed-off-by: Bjorn Helgaas commit a74515604a7b171f2702bdcbd1e231225fb456d0 Author: Anderson Luiz Alves Date: Fri Nov 30 21:58:36 2018 -0200 mv88e6060: disable hardware level MAC learning Disable hardware level MAC learning because it breaks station roaming. When enabled it drops all frames that arrive from a MAC address that is on a different port at learning table. Signed-off-by: Anderson Luiz Alves Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 59f997b088d26a774958cb7b17b0763cd82de7ec Author: Matteo Croce Date: Sat Dec 1 00:26:27 2018 +0100 macvlan: return correct error value A MAC address must be unique among all the macvlan devices with the same lower device. The only exception is the passthru [sic] mode, which shares the lower device address. When duplicate addresses are detected, EBUSY is returned when bringing the interface up: # ip link add macvlan0 link eth0 type macvlan # read addr Signed-off-by: David S. Miller commit fb6df5a6234c38a9c551559506a49a677ac6f07a Author: Xin Long Date: Sat Dec 1 01:36:59 2018 +0800 sctp: kfree_rcu asoc In sctp_hash_transport/sctp_epaddr_lookup_transport, it dereferences a transport's asoc under rcu_read_lock while asoc is freed not after a grace period, which leads to a use-after-free panic. This patch fixes it by calling kfree_rcu to make asoc be freed after a grace period. Note that only the asoc's memory is delayed to free in the patch, it won't cause sk to linger longer. Thanks Neil and Marcelo to make this clear. Fixes: 7fda702f9315 ("sctp: use new rhlist interface on sctp transport rhashtable") Fixes: cd2b70875058 ("sctp: check duplicate node before inserting a new transport") Reported-by: syzbot+0b05d8aa7cb185107483@syzkaller.appspotmail.com Reported-by: syzbot+aad231d51b1923158444@syzkaller.appspotmail.com Suggested-by: Neil Horman Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Acked-by: Neil Horman Signed-off-by: David S. Miller commit 986103e7920cabc0b910749e77ae5589d3934d52 Author: Thomas Falcon Date: Fri Nov 30 10:59:08 2018 -0600 net/ibmvnic: Fix RTNL deadlock during device reset Commit a5681e20b541 ("net/ibmnvic: Fix deadlock problem in reset") made the change to hold the RTNL lock during driver reset but still calls netdev_notify_peers, which results in a deadlock. Instead, use call_netdevice_notifiers, which is functionally the same except that it does not take the RTNL lock again. Fixes: a5681e20b541 ("net/ibmnvic: Fix deadlock problem in reset") Signed-off-by: Thomas Falcon Signed-off-by: David S. Miller commit e3f787189e10f5fafce77ba8aa948741ebb93c2b Author: Jean-Philippe Brucker Date: Fri Nov 30 16:05:53 2018 +0000 vhost: fix IOTLB locking Commit 78139c94dc8c ("net: vhost: lock the vqs one by one") moved the vq lock to improve scalability, but introduced a possible deadlock in vhost-iotlb. vhost_iotlb_notify_vq() now takes vq->mutex while holding the device's IOTLB spinlock. And on the vhost_iotlb_miss() path, the spinlock is taken while holding vq->mutex. Since calling vhost_poll_queue() doesn't require any lock, avoid the deadlock by not taking vq->mutex. Fixes: 78139c94dc8c ("net: vhost: lock the vqs one by one") Acked-by: Jason Wang Acked-by: Michael S. Tsirkin Signed-off-by: Jean-Philippe Brucker Signed-off-by: David S. Miller commit 4763c9f926d8907beaacea4fd883c784696d84ef Merge: 4e4b08e55889 8c85f4b81296 Author: David S. Miller Date: Mon Dec 3 15:20:19 2018 -0800 Merge branch 'phy-micrel-toggling-reset' Yoshihiro Shimoda says: ==================== net: phy: micrel: add toggling phy reset This patch set is for R-Car Gen3 Salvator-XS boards. If we do the following method, the phy cannot link up correctly. 1) Kernel boots by using initramfs. --> No open the nic, so phy_device_register() and phy_probe() deasserts the reset. 2) Kernel enters the suspend. --> So, keep the reset signal as deassert. --> On R-Car Salvator-XS board, unfortunately, the board power is turned off. 3) Kernel returns from suspend. 4) ifconfig eth0 up --> Then, since edge signal of the reset doesn't happen, it cannot link up. 5) ifconfig eth0 down 6) ifconfig eth0 up --> In this case, it can link up. When resolving this issue after I got feedback from Andrew and Heiner, I found an issue that the phy_device.c didn't call phy_resume() if the PHY was not attached. So, patch 1 fixes it and add toggling the phy reset to the micrel phy driver. Changes from v1 (as RFC): - No remove the current code of phy_device.c to avoid any side effects. - Fix the mdio_bus_phy_resume() in phy_device.c. - Add toggling the phy reset in micrel.c if the PHY is not attached. ==================== Signed-off-by: David S. Miller commit 8c85f4b81296a530b8af2796c110fa482ac42d4f Author: Yoshihiro Shimoda Date: Wed Nov 28 09:02:42 2018 +0000 net: phy: micrel: add toggling phy reset if PHY is not attached This patch adds toggling phy reset if PHY is not attached. Otherwise, some boards (e.g. R-Car H3 Salvator-XS) cannot link up correctly if we do the following method: 1) Kernel boots by using initramfs. --> No open the nic, so phy_device_register() and phy_probe() deasserts the reset. 2) Kernel enters the suspend. --> So, keep the reset signal as deassert. --> On R-Car Salvator-XS board, unfortunately, the board power is turned off. 3) Kernel returns from suspend. 4) ifconfig eth0 up --> Then, since edge signal of the reset doesn't happen, it cannot link up. 5) ifconfig eth0 down 6) ifconfig eth0 up --> In this case, it can link up. Reported-by: Hiromitsu Yamasaki Signed-off-by: Yoshihiro Shimoda Signed-off-by: David S. Miller commit ef1b5bf506b1f0ee3edc98533e1f3ecb105eb46a Author: Yoshihiro Shimoda Date: Wed Nov 28 09:02:41 2018 +0000 net: phy: Fix not to call phy_resume() if PHY is not attached This patch fixes an issue that mdio_bus_phy_resume() doesn't call phy_resume() if the PHY is not attached. Fixes: 803dd9c77ac3 ("net: phy: avoid suspending twice a PHY") Signed-off-by: Yoshihiro Shimoda Signed-off-by: David S. Miller commit 025dceb0fab31c912c41b8f32577432231d83e6b Author: Sandipan Das Date: Mon Dec 3 17:51:04 2018 +0530 bpf: powerpc64: optimize JIT passes for bpf function calls Once the JITed images for each function in a multi-function program are generated after the first three JIT passes, we only need to fix the target address for the branch instruction corresponding to each bpf-to-bpf function call. This introduces the following optimizations for reducing the work done by the JIT compiler when handling multi-function programs: [1] Instead of doing two extra passes to fix the bpf function calls, do just one as that would be sufficient. [2] During the extra pass, only overwrite the instruction sequences for the bpf-to-bpf function calls as everything else would still remain exactly the same. This also reduces the number of writes to the JITed image. [3] Do not regenerate the prologue and the epilogue during the extra pass as that would be redundant. Signed-off-by: Sandipan Das Signed-off-by: Daniel Borkmann commit 4e4b08e55889da97dec750759f3ade8cc92b4644 Author: Prashant Bhole Date: Mon Dec 3 18:09:24 2018 +0900 tun: remove skb access after netif_receive_skb In tun.c skb->len was accessed while doing stats accounting after a call to netif_receive_skb. We can not access skb after this call because buffers may be dropped. The fix for this bug would be to store skb->len in local variable and then use it after netif_receive_skb(). IMO using xdp data size for accounting bytes will be better because input for tun_xdp_one() is xdp_buff. Hence this patch: - fixes a bug by removing skb access after netif_receive_skb() - uses xdp data size for accounting bytes [613.019057] BUG: KASAN: use-after-free in tun_sendmsg+0x77c/0xc50 [tun] [613.021062] Read of size 4 at addr ffff8881da9ab7c0 by task vhost-1115/1155 [613.023073] [613.024003] CPU: 0 PID: 1155 Comm: vhost-1115 Not tainted 4.20.0-rc3-vm+ #232 [613.026029] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1ubuntu1 04/01/2014 [613.029116] Call Trace: [613.031145] dump_stack+0x5b/0x90 [613.032219] print_address_description+0x6c/0x23c [613.034156] ? tun_sendmsg+0x77c/0xc50 [tun] [613.036141] kasan_report.cold.5+0x241/0x308 [613.038125] tun_sendmsg+0x77c/0xc50 [tun] [613.040109] ? tun_get_user+0x1960/0x1960 [tun] [613.042094] ? __isolate_free_page+0x270/0x270 [613.045173] vhost_tx_batch.isra.14+0xeb/0x1f0 [vhost_net] [613.047127] ? peek_head_len.part.13+0x90/0x90 [vhost_net] [613.049096] ? get_tx_bufs+0x5a/0x2c0 [vhost_net] [613.051106] ? vhost_enable_notify+0x2d8/0x420 [vhost] [613.053139] handle_tx_copy+0x2d0/0x8f0 [vhost_net] [613.053139] ? vhost_net_buf_peek+0x340/0x340 [vhost_net] [613.053139] ? __mutex_lock+0x8d9/0xb30 [613.053139] ? finish_task_switch+0x8f/0x3f0 [613.053139] ? handle_tx+0x32/0x120 [vhost_net] [613.053139] ? mutex_trylock+0x110/0x110 [613.053139] ? finish_task_switch+0xcf/0x3f0 [613.053139] ? finish_task_switch+0x240/0x3f0 [613.053139] ? __switch_to_asm+0x34/0x70 [613.053139] ? __switch_to_asm+0x40/0x70 [613.053139] ? __schedule+0x506/0xf10 [613.053139] handle_tx+0xc7/0x120 [vhost_net] [613.053139] vhost_worker+0x166/0x200 [vhost] [613.053139] ? vhost_dev_init+0x580/0x580 [vhost] [613.053139] ? __kthread_parkme+0x77/0x90 [613.053139] ? vhost_dev_init+0x580/0x580 [vhost] [613.053139] kthread+0x1b1/0x1d0 [613.053139] ? kthread_park+0xb0/0xb0 [613.053139] ret_from_fork+0x35/0x40 [613.088705] [613.088705] Allocated by task 1155: [613.088705] kasan_kmalloc+0xbf/0xe0 [613.088705] kmem_cache_alloc+0xdc/0x220 [613.088705] __build_skb+0x2a/0x160 [613.088705] build_skb+0x14/0xc0 [613.088705] tun_sendmsg+0x4f0/0xc50 [tun] [613.088705] vhost_tx_batch.isra.14+0xeb/0x1f0 [vhost_net] [613.088705] handle_tx_copy+0x2d0/0x8f0 [vhost_net] [613.088705] handle_tx+0xc7/0x120 [vhost_net] [613.088705] vhost_worker+0x166/0x200 [vhost] [613.088705] kthread+0x1b1/0x1d0 [613.088705] ret_from_fork+0x35/0x40 [613.088705] [613.088705] Freed by task 1155: [613.088705] __kasan_slab_free+0x12e/0x180 [613.088705] kmem_cache_free+0xa0/0x230 [613.088705] ip6_mc_input+0x40f/0x5a0 [613.088705] ipv6_rcv+0xc9/0x1e0 [613.088705] __netif_receive_skb_one_core+0xc1/0x100 [613.088705] netif_receive_skb_internal+0xc4/0x270 [613.088705] br_pass_frame_up+0x2b9/0x2e0 [613.088705] br_handle_frame_finish+0x2fb/0x7a0 [613.088705] br_handle_frame+0x30f/0x6c0 [613.088705] __netif_receive_skb_core+0x61a/0x15b0 [613.088705] __netif_receive_skb_one_core+0x8e/0x100 [613.088705] netif_receive_skb_internal+0xc4/0x270 [613.088705] tun_sendmsg+0x738/0xc50 [tun] [613.088705] vhost_tx_batch.isra.14+0xeb/0x1f0 [vhost_net] [613.088705] handle_tx_copy+0x2d0/0x8f0 [vhost_net] [613.088705] handle_tx+0xc7/0x120 [vhost_net] [613.088705] vhost_worker+0x166/0x200 [vhost] [613.088705] kthread+0x1b1/0x1d0 [613.088705] ret_from_fork+0x35/0x40 [613.088705] [613.088705] The buggy address belongs to the object at ffff8881da9ab740 [613.088705] which belongs to the cache skbuff_head_cache of size 232 Fixes: 043d222f93ab ("tuntap: accept an array of XDP buffs through sendmsg()") Reviewed-by: Toshiaki Makita Signed-off-by: Prashant Bhole Acked-by: Jason Wang Acked-by: Michael S. Tsirkin Signed-off-by: David S. Miller commit a5d4a89245ead1f37ed135213653c5beebea4237 Author: Su Yanjun Date: Mon Dec 3 15:33:07 2018 +0800 net: 8139cp: fix a BUG triggered by changing mtu with network traffic When changing mtu many times with traffic, a bug is triggered: [ 1035.684037] kernel BUG at lib/dynamic_queue_limits.c:26! [ 1035.684042] invalid opcode: 0000 [#1] SMP [ 1035.684049] Modules linked in: loop binfmt_misc 8139cp(OE) macsec tcp_diag udp_diag inet_diag unix_diag af_packet_diag netlink_diag tcp_lp fuse uinput xt_CHECKSUM iptable_mangle ipt_MASQUERADE nf_nat_masquerade_ipv4 iptable_nat nf_nat_ipv4 nf_nat nf_conntrack_ipv4 nf_defrag_ipv4 xt_conntrack nf_conntrack ipt_REJECT nf_reject_ipv4 tun bridge stp llc ebtable_filter ebtables ip6table_filter devlink ip6_tables iptable_filter sunrpc snd_hda_codec_generic snd_hda_intel snd_hda_codec snd_hda_core snd_hwdep ppdev snd_seq iosf_mbi crc32_pclmul parport_pc snd_seq_device ghash_clmulni_intel parport snd_pcm aesni_intel joydev lrw snd_timer virtio_balloon sg gf128mul glue_helper ablk_helper cryptd snd soundcore i2c_piix4 pcspkr ip_tables xfs libcrc32c sr_mod sd_mod cdrom crc_t10dif crct10dif_generic ata_generic [ 1035.684102] pata_acpi virtio_console qxl drm_kms_helper syscopyarea sysfillrect sysimgblt floppy fb_sys_fops crct10dif_pclmul crct10dif_common ttm crc32c_intel serio_raw ata_piix drm libata 8139too virtio_pci drm_panel_orientation_quirks virtio_ring virtio mii dm_mirror dm_region_hash dm_log dm_mod [last unloaded: 8139cp] [ 1035.684132] CPU: 9 PID: 25140 Comm: if-mtu-change Kdump: loaded Tainted: G OE ------------ T 3.10.0-957.el7.x86_64 #1 [ 1035.684134] Hardware name: Red Hat KVM, BIOS 0.5.1 01/01/2011 [ 1035.684136] task: ffff8f59b1f5a080 ti: ffff8f5a2e32c000 task.ti: ffff8f5a2e32c000 [ 1035.684149] RIP: 0010:[] [] dql_completed+0x180/0x190 [ 1035.684162] RSP: 0000:ffff8f5a75483e50 EFLAGS: 00010093 [ 1035.684162] RAX: 00000000000000c2 RBX: ffff8f5a6f91c000 RCX: 0000000000000000 [ 1035.684162] RDX: 0000000000000000 RSI: 0000000000000184 RDI: ffff8f599fea3ec0 [ 1035.684162] RBP: ffff8f5a75483ea8 R08: 00000000000000c2 R09: 0000000000000000 [ 1035.684162] R10: 00000000000616ef R11: ffff8f5a75483b56 R12: ffff8f599fea3e00 [ 1035.684162] R13: 0000000000000001 R14: 0000000000000000 R15: 0000000000000184 [ 1035.684162] FS: 00007fa8434de740(0000) GS:ffff8f5a75480000(0000) knlGS:0000000000000000 [ 1035.684162] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 1035.684162] CR2: 00000000004305d0 CR3: 000000024eb66000 CR4: 00000000001406e0 [ 1035.684162] Call Trace: [ 1035.684162] [ 1035.684162] [] ? cp_interrupt+0x478/0x580 [8139cp] [ 1035.684162] [] __handle_irq_event_percpu+0x44/0x1c0 [ 1035.684162] [] handle_irq_event_percpu+0x32/0x80 [ 1035.684162] [] handle_irq_event+0x3c/0x60 [ 1035.684162] [] handle_fasteoi_irq+0x59/0x110 [ 1035.684162] [] handle_irq+0xe4/0x1a0 [ 1035.684162] [] do_IRQ+0x4d/0xf0 [ 1035.684162] [] common_interrupt+0x162/0x162 [ 1035.684162] [ 1035.684162] [] ? __wake_up_bit+0x24/0x70 [ 1035.684162] [] ? do_set_pte+0xd5/0x120 [ 1035.684162] [] unlock_page+0x2b/0x30 [ 1035.684162] [] do_read_fault.isra.61+0x139/0x1b0 [ 1035.684162] [] handle_pte_fault+0x2f4/0xd10 [ 1035.684162] [] handle_mm_fault+0x39d/0x9b0 [ 1035.684162] [] __do_page_fault+0x203/0x500 [ 1035.684162] [] trace_do_page_fault+0x56/0x150 [ 1035.684162] [] do_async_page_fault+0x22/0xf0 [ 1035.684162] [] async_page_fault+0x28/0x30 [ 1035.684162] Code: 54 c7 47 54 ff ff ff ff 44 0f 49 ce 48 8b 35 48 2f 9c 00 48 89 77 58 e9 fe fe ff ff 0f 1f 80 00 00 00 00 41 89 d1 e9 ef fe ff ff <0f> 0b 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 55 8d 42 ff 48 [ 1035.684162] RIP [] dql_completed+0x180/0x190 [ 1035.684162] RSP It's not the same as in 7fe0ee09 patch described. As 8139cp uses shared irq mode, other device irq will trigger cp_interrupt to execute. cp_change_mtu -> cp_close -> cp_open In cp_close routine just before free_irq(), some interrupt may occur. In my environment, cp_interrupt exectutes and IntrStatus is 0x4, exactly TxOk. That will cause cp_tx to wake device queue. As device queue is started, cp_start_xmit and cp_open will run at same time which will cause kernel BUG. For example: [#] for tx descriptor At start: [#][#][#] num_queued=3 After cp_init_hw->cp_start_hw->netdev_reset_queue: [#][#][#] num_queued=0 When 8139cp starts to work then cp_tx will check num_queued mismatchs the complete_bytes. The patch will check IntrMask before check IntrStatus in cp_interrupt. When 8139cp interrupt is disabled, just return. Signed-off-by: Su Yanjun Signed-off-by: David S. Miller commit 37b06e5078975bb4efe3cbd91e254112851b125f Author: Artemy Kovalyov Date: Tue Nov 27 08:51:25 2018 +0200 IB/mlx5: Fix implicit ODP interrupted page fault Since any page fault may be interrupted by a MMU invalidation and implicit leaf MR may be released during this process. The check for parent value is unreliable condition for an implicit MR. Use other condition that we can rely on to determine if MR is implicit. Fixes: b4cfe447d47b ("IB/mlx5: Implement on demand paging by adding support for MMU notifiers") Signed-off-by: Artemy Kovalyov Signed-off-by: Moni Shoua Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford commit d2a36971ef595069b7a600d1144c2e0881a930a1 Author: Heiner Kallweit Date: Mon Dec 3 08:19:33 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. The commit marked as fixed didn't do anything wrong, it just copied existing functionality to the helper which is being fixed now. Fixes: f3a6bd393c2c ("phylib: Add phy_set_max_speed helper") Signed-off-by: Heiner Kallweit Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit d9536e809801687600a02b9b3fc755e1b3bde1af Merge: f3b2f758ec1e e25b6783c7b1 Author: Olof Johansson Date: Mon Dec 3 13:05:34 2018 -0800 Merge tag 'arm-soc/for-4.20/devicetree-fixes' of https://github.com/Broadcom/stblinux into fixes This pull request contains Broadcom ARM-based SoCs Device Tree fixes, please pull the following for 4.20: - Stefan fixes the polariy of the Wi-Fi reset GPIOs signals which would break on Raspberry Pi 3B and 3B+ * tag 'arm-soc/for-4.20/devicetree-fixes' of https://github.com/Broadcom/stblinux: ARM: dts: bcm2837: Fix polarity of wifi reset GPIOs Signed-off-by: Olof Johansson commit 36d842194a57f1b21fbc6a6875f2fa2f9a7f8679 Author: Piotr Stankiewicz Date: Wed Nov 28 06:44:46 2018 -0800 IB/hfi1: Fix an out-of-bounds access in get_hw_stats When running with KASAN, the following trace is produced: [ 62.535888] ================================================================== [ 62.544930] BUG: KASAN: slab-out-of-bounds in gut_hw_stats+0x122/0x230 [hfi1] [ 62.553856] Write of size 8 at addr ffff88080e8d6330 by task kworker/0:1/14 [ 62.565333] CPU: 0 PID: 14 Comm: kworker/0:1 Not tainted 4.19.0-test-build-kasan+ #8 [ 62.575087] Hardware name: Intel Corporation S2600KPR/S2600KPR, BIOS SE5C610.86B.01.01.0019.101220160604 10/12/2016 [ 62.587951] Workqueue: events work_for_cpu_fn [ 62.594050] Call Trace: [ 62.598023] dump_stack+0xc6/0x14c [ 62.603089] ? dump_stack_print_info.cold.1+0x2f/0x2f [ 62.610041] ? kmsg_dump_rewind_nolock+0x59/0x59 [ 62.616615] ? get_hw_stats+0x122/0x230 [hfi1] [ 62.622985] print_address_description+0x6c/0x23c [ 62.629744] ? get_hw_stats+0x122/0x230 [hfi1] [ 62.636108] kasan_report.cold.6+0x241/0x308 [ 62.642365] get_hw_stats+0x122/0x230 [hfi1] [ 62.648703] ? hfi1_alloc_rn+0x40/0x40 [hfi1] [ 62.655088] ? __kmalloc+0x110/0x240 [ 62.660695] ? hfi1_alloc_rn+0x40/0x40 [hfi1] [ 62.667142] setup_hw_stats+0xd8/0x430 [ib_core] [ 62.673972] ? show_hfi+0x50/0x50 [hfi1] [ 62.680026] ib_device_register_sysfs+0x165/0x180 [ib_core] [ 62.687995] ib_register_device+0x5a2/0xa10 [ib_core] [ 62.695340] ? show_hfi+0x50/0x50 [hfi1] [ 62.701421] ? ib_unregister_device+0x2e0/0x2e0 [ib_core] [ 62.709222] ? __vmalloc_node_range+0x2d0/0x380 [ 62.716131] ? rvt_driver_mr_init+0x11f/0x2d0 [rdmavt] [ 62.723735] ? vmalloc_node+0x5c/0x70 [ 62.729697] ? rvt_driver_mr_init+0x11f/0x2d0 [rdmavt] [ 62.737347] ? rvt_driver_mr_init+0x1f5/0x2d0 [rdmavt] [ 62.744998] ? __rvt_alloc_mr+0x110/0x110 [rdmavt] [ 62.752315] ? rvt_rc_error+0x140/0x140 [rdmavt] [ 62.759434] ? rvt_vma_open+0x30/0x30 [rdmavt] [ 62.766364] ? mutex_unlock+0x1d/0x40 [ 62.772445] ? kmem_cache_create_usercopy+0x15d/0x230 [ 62.780115] rvt_register_device+0x1f6/0x360 [rdmavt] [ 62.787823] ? rvt_get_port_immutable+0x180/0x180 [rdmavt] [ 62.796058] ? __get_txreq+0x400/0x400 [hfi1] [ 62.802969] ? memcpy+0x34/0x50 [ 62.808611] hfi1_register_ib_device+0xde6/0xeb0 [hfi1] [ 62.816601] ? hfi1_get_npkeys+0x10/0x10 [hfi1] [ 62.823760] ? hfi1_init+0x89f/0x9a0 [hfi1] [ 62.830469] ? hfi1_setup_eagerbufs+0xad0/0xad0 [hfi1] [ 62.838204] ? pcie_capability_clear_and_set_word+0xcd/0xe0 [ 62.846429] ? pcie_capability_read_word+0xd0/0xd0 [ 62.853791] ? hfi1_pcie_init+0x187/0x4b0 [hfi1] [ 62.860958] init_one+0x67f/0xae0 [hfi1] [ 62.867301] ? hfi1_init+0x9a0/0x9a0 [hfi1] [ 62.873876] ? wait_woken+0x130/0x130 [ 62.879860] ? read_word_at_a_time+0xe/0x20 [ 62.886329] ? strscpy+0x14b/0x280 [ 62.891998] ? hfi1_init+0x9a0/0x9a0 [hfi1] [ 62.898405] local_pci_probe+0x70/0xd0 [ 62.904295] ? pci_device_shutdown+0x90/0x90 [ 62.910833] work_for_cpu_fn+0x29/0x40 [ 62.916750] process_one_work+0x584/0x960 [ 62.922974] ? rcu_work_rcufn+0x40/0x40 [ 62.928991] ? __schedule+0x396/0xdc0 [ 62.934806] ? __sched_text_start+0x8/0x8 [ 62.941020] ? pick_next_task_fair+0x68b/0xc60 [ 62.947674] ? run_rebalance_domains+0x260/0x260 [ 62.954471] ? __list_add_valid+0x29/0xa0 [ 62.960607] ? move_linked_works+0x1c7/0x230 [ 62.967077] ? trace_event_raw_event_workqueue_execute_start+0x140/0x140 [ 62.976248] ? mutex_lock+0xa6/0x100 [ 62.982029] ? __mutex_lock_slowpath+0x10/0x10 [ 62.988795] ? __switch_to+0x37a/0x710 [ 62.994731] worker_thread+0x62e/0x9d0 [ 63.000602] ? max_active_store+0xf0/0xf0 [ 63.006828] ? __switch_to_asm+0x40/0x70 [ 63.012932] ? __switch_to_asm+0x34/0x70 [ 63.019013] ? __switch_to_asm+0x40/0x70 [ 63.025042] ? __switch_to_asm+0x34/0x70 [ 63.031030] ? __switch_to_asm+0x40/0x70 [ 63.037006] ? __schedule+0x396/0xdc0 [ 63.042660] ? kmem_cache_alloc_trace+0xf3/0x1f0 [ 63.049323] ? kthread+0x59/0x1d0 [ 63.054594] ? ret_from_fork+0x35/0x40 [ 63.060257] ? __sched_text_start+0x8/0x8 [ 63.066212] ? schedule+0xcf/0x250 [ 63.071529] ? __wake_up_common+0x110/0x350 [ 63.077794] ? __schedule+0xdc0/0xdc0 [ 63.083348] ? wait_woken+0x130/0x130 [ 63.088963] ? finish_task_switch+0x1f1/0x520 [ 63.095258] ? kasan_unpoison_shadow+0x30/0x40 [ 63.101792] ? __init_waitqueue_head+0xa0/0xd0 [ 63.108183] ? replenish_dl_entity.cold.60+0x18/0x18 [ 63.115151] ? _raw_spin_lock_irqsave+0x25/0x50 [ 63.121754] ? max_active_store+0xf0/0xf0 [ 63.127753] kthread+0x1ae/0x1d0 [ 63.132894] ? kthread_bind+0x30/0x30 [ 63.138422] ret_from_fork+0x35/0x40 [ 63.146973] Allocated by task 14: [ 63.152077] kasan_kmalloc+0xbf/0xe0 [ 63.157471] __kmalloc+0x110/0x240 [ 63.162804] init_cntrs+0x34d/0xdf0 [hfi1] [ 63.168883] hfi1_init_dd+0x29a3/0x2f90 [hfi1] [ 63.175244] init_one+0x551/0xae0 [hfi1] [ 63.181065] local_pci_probe+0x70/0xd0 [ 63.186759] work_for_cpu_fn+0x29/0x40 [ 63.192310] process_one_work+0x584/0x960 [ 63.198163] worker_thread+0x62e/0x9d0 [ 63.203843] kthread+0x1ae/0x1d0 [ 63.208874] ret_from_fork+0x35/0x40 [ 63.217203] Freed by task 1: [ 63.221844] __kasan_slab_free+0x12e/0x180 [ 63.227844] kfree+0x92/0x1a0 [ 63.232570] single_release+0x3a/0x60 [ 63.238024] __fput+0x1d9/0x480 [ 63.242911] task_work_run+0x139/0x190 [ 63.248440] exit_to_usermode_loop+0x191/0x1a0 [ 63.254814] do_syscall_64+0x301/0x330 [ 63.260283] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [ 63.270199] The buggy address belongs to the object at ffff88080e8d5500 which belongs to the cache kmalloc-4096 of size 4096 [ 63.287247] The buggy address is located 3632 bytes inside of 4096-byte region [ffff88080e8d5500, ffff88080e8d6500) [ 63.303564] The buggy address belongs to the page: [ 63.310447] page:ffffea00203a3400 count:1 mapcount:0 mapping:ffff88081380e840 index:0x0 compound_mapcount: 0 [ 63.323102] flags: 0x2fffff80008100(slab|head) [ 63.329775] raw: 002fffff80008100 0000000000000000 0000000100000001 ffff88081380e840 [ 63.340175] raw: 0000000000000000 0000000000070007 00000001ffffffff 0000000000000000 [ 63.350564] page dumped because: kasan: bad access detected [ 63.361974] Memory state around the buggy address: [ 63.369137] ffff88080e8d6200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 63.379082] ffff88080e8d6280: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 63.389032] >ffff88080e8d6300: 00 00 00 00 00 00 fc fc fc fc fc fc fc fc fc fc [ 63.398944] ^ [ 63.406141] ffff88080e8d6380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 63.416109] ffff88080e8d6400: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 63.426099] ================================================================== The trace happens because get_hw_stats() assumes there is room in the memory allocated in init_cntrs() to accommodate the driver counters. Unfortunately, that routine only allocated space for the device counters. Fix by insuring the allocation has room for the additional driver counters. Cc: # v4.14+ Fixes: b7481944b06e9 ("IB/hfi1: Show statistics counters under IB stats interface") Reviewed-by: Mike Marciniczyn Reviewed-by: Mike Ruhl Signed-off-by: Piotr Stankiewicz Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford commit 90b2620e6a8aa08c40cc78d61603e0acd853c33a Author: Michael J. Ruhl Date: Wed Nov 28 06:44:36 2018 -0800 IB/hfi1: Fix a latency issue for small messages A recent performance enhancement introduced a latency issue in the HFI message path. The new algorithm removed a forced call send for PIO messages and added a forced schedule event for messages larger than the MTU. For PIO, the schedule path can introduce thrashing that can significantly impact the throughput for small messages. If a message size is within the PIO threshold, always take the send path. Fixes: 0b79b27748cb ("IB/{hfi1, qib, rdmavt}: Schedule multi RC/UC packets instead of posting") Reviewed-by: Mike Marciniszyn Signed-off-by: Michael J. Ruhl Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford commit f3b2f758ec1e6cdb13c925647cbd8ad4938b78fb Author: Rob Herring Date: Mon Dec 3 13:12:48 2018 -0600 ARM: dts: realview: Fix some more 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. Signed-off-by: Rob Herring Reviewed-by: Linus Walleij Signed-off-by: Olof Johansson commit f6936d029c4a14ce873bbb423bbc518aa1b4def2 Author: Lubomir Rintel Date: Sun Dec 2 12:14:28 2018 +0100 MAINTAINERS: update entry for MMP platform Move Eric Miao and Haojian Zhuang over to CREDITS, since they're AWOL for some time already. The git trees have gone away too. I'm adding myself as a reviewer. I'd like to be Cc'd on patches and will be able to test them, but I don't possess a data sheet thus there might be things I'll be unable to review. Hence the Odd-Fixes status. Signed-off-by: Lubomir Rintel Signed-off-by: Olof Johansson commit 76f4e2c3b6a560cdd7a75b87df543e04d05a9e5f Author: Lubomir Rintel Date: Sun Dec 2 12:12:24 2018 +0100 ARM: mmp/mmp2: fix cpu_is_mmp2() on mmp2-dt cpu_is_mmp2() was equivalent to cpu_is_pj4(), wouldn't be correct for multiplatform kernels. Fix it by also considering mmp_chip_id, as is done for cpu_is_pxa168() and cpu_is_pxa910() above. Moreover, it is only available with CONFIG_CPU_MMP2 and thus doesn't work on DT-based MMP2 machines. Enable it on CONFIG_MACH_MMP2_DT too. Note: CONFIG_CPU_MMP2 is only used for machines that use board files instead of DT. It should perhaps be renamed. I'm not doing it now, because I don't have a better idea. Signed-off-by: Lubomir Rintel Acked-by: Arnd Bergmann Cc: stable@vger.kernel.org Signed-off-by: Olof Johansson commit 358b5f73ce60fb1369be557c38a52e886834f44d Merge: 7bb64d55fd0e ce68cc6fad89 Author: Olof Johansson Date: Mon Dec 3 12:37:41 2018 -0800 Merge tag 'v4.19-next-fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux into fixes DT mt7622: - Kernelci awaits a working stdout-path. Fix the path for reference board and bananapi-r64 - General propouse timer has issues with clocks that didn't get probed early. Delete the DT node as the timer isn't need, a ARM arch timer exists on the system. * tag 'v4.19-next-fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux: arm64: dts: mt7622: Drop the general purpose timer node arm64: dts: mt7622: fix no more console output on BPI-R64 board arm64: dts: mt7622: fix no more console output on rfb1 Signed-off-by: Olof Johansson commit 7bb64d55fd0e4bb09863ae1519ec8024e1279b2b Author: Matthias Brugger Date: Tue Oct 16 16:57:58 2018 +0200 MAINTAINERS: mediatek: Update SoC entry Add IRC channel and URL of the wiki. Also add soc drivers folder and regex to catch more mediatek components. Signed-off-by: Matthias Brugger Signed-off-by: Olof Johansson commit daa3fc4454b21ac883152d07b4778bc4f83ec716 Author: Hans Verkuil Date: Wed Nov 28 15:52:42 2018 -0500 media: vicodec: set state resolution from raw format The state structure contains the resolution expected by the decoder and encoder. For an encoder that resolution should be taken from the OUTPUT format, and for a decoder from the CAPTURE format. If the wrong format is picked, a buffer overrun can occur if there is a mismatch between the CAPTURE and OUTPUT formats. The real fix would be to correctly implement the stateful codec specification, but that will take more time. For now just prevent the buffer overrun. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit e714c92f42aeed6052a287b8ccf5a519e42bab15 Author: Hans Verkuil Date: Wed Nov 28 03:37:47 2018 -0500 media: vivid: drop v4l2_ctrl_request_complete() from start_streaming If start_streaming() fails and all queued buffers are returned to vb2, then do not call v4l2_ctrl_request_complete(). Nothing happened to the request and the state should remain as it was before start_streaming was called. Signed-off-by: Hans Verkuil Acked-by: Sakari Ailus Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit dde6bdcc975983c219ffe9b8f3a2942df0b7937d Author: Hans Verkuil Date: Wed Nov 28 03:37:46 2018 -0500 media: vb2: don't unbind/put the object when going to state QUEUED When a buffer is returned to state QUEUED (that happens when start_streaming fails), then do not unbind and put the object from the request. Nothing has changed yet, so just keep it as is. Signed-off-by: Hans Verkuil Acked-by: Sakari Ailus Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 6093d3002eabd7c2913d97f1d1f4ce34b072acf9 Author: Hans Verkuil Date: Wed Nov 28 03:37:45 2018 -0500 media: vb2: keep a reference to the request until dqbuf When vb2_buffer_done is called the buffer is unbound from the request and put. The media_request_object_put also 'put's the request reference. If the application has already closed the request fd, then that means that the request reference at that point goes to 0 and the whole request is released. This means that the control handler associated with the request is also freed and that causes this kernel oops: [174705.995401] BUG: sleeping function called from invalid context at kernel/locking/mutex.c:908 [174705.995411] in_atomic(): 1, irqs_disabled(): 1, pid: 28071, name: vivid-000-vid-o [174705.995416] 2 locks held by vivid-000-vid-o/28071: [174705.995420] #0: 000000001ea3a232 (&dev->mutex#3){....}, at: vivid_thread_vid_out+0x3f5/0x550 [vivid] [174705.995447] #1: 00000000e30a0d1e (&(&q->done_lock)->rlock){....}, at: vb2_buffer_done+0x92/0x1d0 [videobuf2_common] [174705.995460] Preemption disabled at: [174705.995461] [<0000000000000000>] (null) [174705.995472] CPU: 11 PID: 28071 Comm: vivid-000-vid-o Tainted: G W 4.20.0-rc1-test-no #88 [174705.995476] Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 05/19/2017 [174705.995481] Call Trace: [174705.995500] dump_stack+0x46/0x60 [174705.995512] ___might_sleep.cold.79+0xe1/0xf1 [174705.995523] __mutex_lock+0x50/0x8f0 [174705.995531] ? find_held_lock+0x2d/0x90 [174705.995536] ? find_held_lock+0x2d/0x90 [174705.995542] ? find_held_lock+0x2d/0x90 [174705.995564] ? v4l2_ctrl_handler_free.part.13+0x44/0x1d0 [videodev] [174705.995576] v4l2_ctrl_handler_free.part.13+0x44/0x1d0 [videodev] [174705.995590] v4l2_ctrl_request_release+0x1c/0x30 [videodev] [174705.995600] media_request_clean+0x64/0xe0 [media] [174705.995609] media_request_release+0x19/0x40 [media] [174705.995617] vb2_buffer_done+0xef/0x1d0 [videobuf2_common] [174705.995630] vivid_thread_vid_out+0x2c1/0x550 [vivid] [174705.995645] ? vivid_stop_generating_vid_cap+0x1c0/0x1c0 [vivid] [174705.995653] kthread+0x113/0x130 [174705.995659] ? kthread_park+0x80/0x80 [174705.995667] ret_from_fork+0x35/0x40 The vb2_buffer_done function can be called from interrupt context, so anything that sleeps is not allowed. The solution is to increment the request refcount when the buffer is queued and decrement it when the buffer is dequeued. Releasing the request is fine if that happens from VIDIOC_DQBUF. Signed-off-by: Hans Verkuil Acked-by: Sakari Ailus Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit b7ff0b099089f3d4bfd4e30f581ee9d9dc4f8840 Author: Hans Verkuil Date: Wed Nov 28 03:37:44 2018 -0500 media: vb2: skip request checks for VIDIOC_PREPARE_BUF VIDIOC_PREPARE_BUF should ignore V4L2_BUF_FLAG_REQUEST_FD since it isn't doing anything with requests. So inform vb2_queue_or_prepare_buf whether it is called from vb2_prepare_buf or vb2_qbuf and just return 0 in the first case. This was found when adding new v4l2-compliance checks. Signed-off-by: Hans Verkuil Acked-by: Sakari Ailus Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 04990215dec43c424daff00d1f622167b8aafd1f Author: Hans Verkuil Date: Wed Nov 28 03:37:43 2018 -0500 media: vb2: don't call __vb2_queue_cancel if vb2_start_streaming failed vb2_start_streaming() already rolls back the buffers, so there is no need to call __vb2_queue_cancel(). Especially since __vb2_queue_cancel() does too much, such as zeroing the q->queued_count value, causing vb2 to think that no buffers have been queued. It appears that this call to __vb2_queue_cancel() is a left-over from before commit b3379c6201bb3. Fixes: b3379c6201bb3 ('vb2: only call start_streaming if sufficient buffers are queued') Signed-off-by: Hans Verkuil Cc: # for v4.16 and up Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 53e9d838275d9a2a5736d788f84814c64cbf94b0 Author: Dan Carpenter Date: Mon Nov 26 03:10:44 2018 -0500 media: cedrus: Fix a NULL vs IS_ERR() check The devm_ioremap_resource() function doesn't return NULL pointers, it returns error pointers. Fixes: 50e761516f2b ("media: platform: Add Cedrus VPU decoder driver") Signed-off-by: Dan Carpenter Acked-by: Paul Kocialkowski Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 230bce5511cc001cc5b27ffc83b2da188ea43606 Author: Laurent Pinchart Date: Wed Nov 21 22:38:07 2018 -0500 media: vsp1: Fix LIF buffer thresholds Commit de2bc45c84f7 ("media: vsp1: Update LIF buffer thresholds") updated the LIF buffer thresholds based on the VSP version, but used the wrong model mask. This resulted in all VSP instances to be treated as a Gen3 VSPD, breaking operation on all Gen2 platforms as well as on H3 ES2.0, M3-N, V3M and V3H. Fix it. Fixes: de2bc45c84f7 ("media: vsp1: Update LIF buffer thresholds") Reported-by: Colin Ian King Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham Signed-off-by: Mauro Carvalho Chehab commit fd6f32f78645db32b6b95a42e45da2ddd6de0e67 Author: Juha-Matti Tilli Date: Sun Dec 2 12:47:08 2018 +0200 libata: whitelist all SAMSUNG MZ7KM* solid-state disks These devices support read zero after trim (RZAT), as they advertise to the OS. However, the OS doesn't believe the SSDs unless they are explicitly whitelisted. Acked-by: Martin K. Petersen Signed-off-by: Juha-Matti Tilli Signed-off-by: Jens Axboe commit e25b6783c7b1bb79103d4617336879423f86b05e Author: Stefan Wahren Date: Mon Dec 3 19:37:08 2018 +0100 ARM: dts: bcm2837: Fix polarity of wifi reset GPIOs The commit b1b8f45b3130 ("ARM: dts: bcm2837: Add missing GPIOs of Expander") introduced a wifi power sequence. Unfortunately the polarity of the reset GPIOs were wrong and broke the wifi support on Raspberry Pi 3 B and later in 3 B+. This wasn't discovered before since the power sequence takes only effect in case the relevant MMC driver is compiled as a module. Fixes: b1b8f45b3130 ("ARM: dts: bcm2837: Add missing GPIOs of Expander") Cc: stable@vger.kernel.org Reported-by: Matthias Lueschner Link: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=911443 Signed-off-by: Stefan Wahren Reviewed-by: Eric Anholt Signed-off-by: Florian Fainelli commit 6c3516fed7b61a3527459ccfa67fab130d910610 Author: Tony Lindgren Date: Mon Dec 3 11:24:30 2018 -0800 Input: omap-keypad - fix keyboard debounce configuration I noticed that the Android v3.0.8 kernel on droid4 is using different keypad values from the mainline kernel and does not have issues with keys occasionally being stuck until pressed again. Turns out there was an earlier patch posted to fix this as "Input: omap-keypad: errata i689: Correct debounce time", but it was never reposted to fix use macros for timing calculations. This updated version is using macros, and also fixes the use of the input clock rate to use 32768KiHz instead of 32000KiHz. And we want to use the known good Android kernel values of 3 and 6 instead of 2 and 6 in the earlier patch. Reported-by: Pavel Machek Signed-off-by: Tony Lindgren Signed-off-by: Dmitry Torokhov commit a6754fae1e66e9a40fed406290d7ca3f2b4d227c Author: Cameron Gutman Date: Thu Nov 29 10:09:33 2018 -0800 Input: xpad - quirk all PDP Xbox One gamepads Since we continue to find tons of new variants [0,1,2,3,4,5,6] that need the PDP quirk, let's just quirk all devices from PDP. [0]: https://github.com/paroj/xpad/pull/104 [1]: https://github.com/paroj/xpad/pull/105 [2]: https://github.com/paroj/xpad/pull/108 [3]: https://github.com/paroj/xpad/pull/109 [4]: https://github.com/paroj/xpad/pull/112 [5]: https://github.com/paroj/xpad/pull/115 [6]: https://github.com/paroj/xpad/pull/116 Fixes: e5c9c6a885fa ("Input: xpad - add support for PDP Xbox One controllers") Cc: stable@vger.kernel.org Signed-off-by: Cameron Gutman Signed-off-by: Dmitry Torokhov commit 5a6dab15f7a79817cab4af612ddd99eda793fce6 Author: Teika Kazura Date: Mon Dec 3 11:26:03 2018 -0800 Input: synaptics - enable SMBus for HP 15-ay000 SMBus works fine for the touchpad with id SYN3221, used in the HP 15-ay000 series, This device has been reported in these messages in the "linux-input" mailing list: * https://marc.info/?l=linux-input&m=152016683003369&w=2 * https://www.spinics.net/lists/linux-input/msg52525.html Reported-by: Nitesh Debnath Reported-by: Teika Kazura Signed-off-by: Teika Kazura Reviewed-by: Benjamin Tissoires Signed-off-by: Dmitry Torokhov commit 9df39bedbf292680655c6a947c77d6562c693d4a Author: Lyude Paul Date: Sat Nov 24 23:28:10 2018 -0800 Input: synaptics - add PNP ID for ThinkPad P50 to SMBus Noticed the other day the trackpoint felt different on my P50, then realized it was because rmi4 wasn't loading for this machine automatically. Suspend/resume, hibernate, and everything else seem to work perfectly fine on here. Signed-off-by: Lyude Paul Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov commit ad33429cd02565c28404bb16ae7a4c2bdfda6626 Author: Noah Westervelt Date: Thu Nov 29 10:10:35 2018 -0800 Input: elan_i2c - add ACPI ID for Lenovo IdeaPad 330-15ARR Add ELAN061E to the ACPI table to support Elan touchpad found in Lenovo IdeaPad 330-15ARR. Signed-off-by: Noah Westervelt Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov commit bf87ade0dd7f8cf19dac4d3161d5e86abe0c062b Author: Adam Wong Date: Thu Nov 29 10:04:35 2018 -0800 Input: elan_i2c - add support for ELAN0621 touchpad Added the ability to detect the ELAN0621 touchpad found in some Lenovo laptops. Signed-off-by: Adam Wong Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov commit 0072a0c14d5b7cb72c611d396f143f5dcd73ebe2 Merge: f3f950dba37b a7c3a0d5f8d8 Author: Linus Torvalds Date: Mon Dec 3 11:29:20 2018 -0800 Merge tag 'media/v4.20-4' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media fixes from Mauro Carvalho Chehab: - Revert a dt-bindings patch whose driver didn't make for 4.20 - fix a kernel oops at vicodec driver - fix a frame overflow at gspca with was causing regressions on some cameras, making them to not work - use the proper type for wait_queue head - make media request API compatible with 32-bit userspace on 64-bit kernel - fix a regression on Kernel 4.19 at dvb-pll - don't use SPDX headers yet for GFDL * tag 'media/v4.20-4' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: media: mediactl docs: Fix licensing message media: dvb-pll: don't re-validate tuner frequencies media: dvb-pll: fix tuner frequency ranges media: Revert "media: dt-bindings: Document the Rockchip VPU bindings" media: gspca: fix frame overflow error media: vicodec: fix memchr() kernel oops media: cedrus: add action item to the TODO media: media-request: Add compat ioctl media: Use wait_queue_head_t for media_request commit 9a43be9cedd516f188e6333d3b43402386723eff Author: Dan Carpenter Date: Mon Dec 3 17:52:01 2018 +0300 clk: zynqmp: Off by one in zynqmp_is_valid_clock() The > comparison should be >= to prevent reading beyond the end of the clock[] array. (The clock[] array is allocated in zynqmp_clk_setup() and has clock_max_idx elements.) Fixes: 3fde0e16d016 ("drivers: clk: Add ZynqMP clock driver") Signed-off-by: Dan Carpenter Signed-off-by: Stephen Boyd commit 2e85c57493e391b93445c1e0d530b36b95becc64 Author: Dan Carpenter Date: Mon Dec 3 17:51:43 2018 +0300 clk: mmp: Off by one in mmp_clk_add() The > comparison should be >= or we write one element beyond the end of the unit->clk_table[] array. (The unit->clk_table[] array is allocated in the mmp_clk_init() function and it has unit->nr_clks elements). Fixes: 4661fda10f8b ("clk: mmp: add basic support functions for DT support") Signed-off-by: Dan Carpenter Signed-off-by: Stephen Boyd commit d9f5b7f5dd0fa74a89de5a7ac1e26366f211ccee Author: Dan Carpenter Date: Mon Dec 3 17:50:55 2018 +0300 clk: mvebu: Off by one bugs in cp110_of_clk_get() These > comparisons should be >= to prevent reading beyond the end of of the clk_data->hws[] buffer. The clk_data->hws[] array is allocated in cp110_syscon_common_probe() when we do: cp110_clk_data = devm_kzalloc(dev, sizeof(*cp110_clk_data) + sizeof(struct clk_hw *) * CP110_CLK_NUM, GFP_KERNEL); As you can see, it has CP110_CLK_NUM elements which is equivalent to CP110_MAX_CORE_CLOCKS + CP110_MAX_GATABLE_CLOCKS. Fixes: d3da3eaef7f4 ("clk: mvebu: new driver for Armada CP110 system controller") Signed-off-by: Dan Carpenter Signed-off-by: Stephen Boyd commit f3f950dba37b5bec870147aeb9878a157a6eb875 Merge: 9099ff769faf 94d0fb159da9 Author: Linus Torvalds Date: Mon Dec 3 09:43:24 2018 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide Pull IDE fixes from David Miller: "A missing of_node_put() and a small cleanup" * git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide: ide: Change to use DEFINE_SHOW_ATTRIBUTE macro ide: pmac: add of_node_put() commit 9099ff769faf879b5cb6e24e04c7904a8352aef0 Merge: 2595646791c3 dac097c4546e Author: Linus Torvalds Date: Mon Dec 3 09:35:27 2018 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc Pull sparc fixes from David Miller: 1) Some implicit switch fallthrough fixes from Stephen Rothwell. 2) Missing of_node_put() in various sparc drivers from Yangtao Li. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc: drivers/tty: add missing of_node_put() drivers/sbus/char: add of_node_put() sbus: char: add of_node_put() sparc32: supress another implicit-fallthrough warning sparc32: suppress an implicit-fallthrough warning sparc: suppress the implicit-fallthrough warning arch/sparc: Use kzalloc_node commit 106ea7feb98f1183e0cb5fe23da14fde662a8b15 Author: Evan Quan Date: Wed Nov 28 16:41:02 2018 +0800 drm/amd/powerplay: support SoftMin/Max setting for some specific DPM For some case, no need to force SoftMin/Max settings for all DPMs. It's OK to force on some specific DPM only. Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 10cb3e6b63bf4266a5198813526fdd7259ffb8be Author: Evan Quan Date: Wed Nov 28 16:36:12 2018 +0800 drm/amd/powerplay: issue pre-display settings for display change event For display config change event only, pre-display config settings are needed. Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit f02be8279a15c28302d72efa9ff21bdc586d5357 Author: Evan Quan Date: Wed Nov 28 16:33:30 2018 +0800 drm/amd/powerplay: support new pptable upload on Vega20 New pptable upload through sysfs interface is supported. Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit b52b6738cc2d50d2a8f4d0095bcb5a86716008a5 Author: Alex Deucher Date: Wed Nov 28 23:28:17 2018 -0500 drm/amdgpu/gmc8: always load MC firmware in the driver Some power features rely on the driver loaded version so always load the MC firmware from the driver even if the vbios loaded a version already. Acked-by: Christian König Reviewed-by: Junwei Zhang Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit a81a7c9c9ea3042ab02d66ac35def74abf091c15 Author: Alex Deucher Date: Wed Nov 28 23:25:41 2018 -0500 drm/amdgpu/gmc8: update MC firmware for polaris Some variants require different MC firmware images. Acked-by: Christian König Reviewed-by: Junwei Zhang Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 5f8cf712582617d523120df67d392059eaf2fc4b Author: Hui Peng Date: Mon Dec 3 16:09:34 2018 +0100 ALSA: usb-audio: Fix UAF decrement if card has no live interfaces in card.c If a USB sound card reports 0 interfaces, an error condition is triggered and the function usb_audio_probe errors out. In the error path, there was a use-after-free vulnerability where the memory object of the card was first freed, followed by a decrement of the number of active chips. Moving the decrement above the atomic_dec fixes the UAF. [ The original problem was introduced in 3.1 kernel, while it was developed in a different form. The Fixes tag below indicates the original commit but it doesn't mean that the patch is applicable cleanly. -- tiwai ] Fixes: 362e4e49abe5 ("ALSA: usb-audio - clear chip->probing on error exit") Reported-by: Hui Peng Reported-by: Mathias Payer Signed-off-by: Hui Peng Signed-off-by: Mathias Payer Cc: Signed-off-by: Takashi Iwai commit d7fd67653f847327e545bdb198b901ee124afd7c Author: Junwei Zhang Date: Thu Nov 22 17:53:00 2018 +0800 drm/amdgpu: update mc firmware image for polaris12 variants Some new variants require updated firmware. Signed-off-by: Junwei Zhang Reviewed-by: Evan Quan Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 098336deb946f37a70afc0979af388b615c378bf Author: Wen Yang Date: Thu Nov 29 14:01:50 2018 +0800 drm/msm: Fix error return checking The error checks on ret for a negative error return always fails because the return value of iommu_map_sg() is unsigned and can never be negative. Detected with Coccinelle: drivers/gpu/drm/msm/msm_iommu.c:69:9-12: WARNING: Unsigned expression compared with zero: ret < 0 Signed-off-by: Wen Yang CC: Rob Clark CC: David Airlie CC: Julia Lawall CC: linux-arm-msm@vger.kernel.org CC: dri-devel@lists.freedesktop.org CC: freedreno@lists.freedesktop.org CC: linux-kernel@vger.kernel.org Signed-off-by: Sean Paul commit d9a75a6201d9367a452de59d7759b708633f1a1f Author: Jayant Shekhar Date: Fri Nov 30 17:22:50 2018 +0530 drm/msm/dpu: Ignore alpha for XBGR8888 format Alpha enable in the pixel format will help in selecting the blend rule. By keeping alpha enable to true we are allowing foreground alpha to blend with the layer. If alpha is don't care, then we should not allow pixel alpha to be part of blend equation. Signed-off-by: Jayant Shekhar Signed-off-by: Sean Paul commit ce25aa3ee6939d83979cccf7adc5737cba9a0cb7 Author: YueHaibing Date: Fri Nov 16 19:25:26 2018 +0800 drm/msm: dpu: Fix "WARNING: invalid free of devm_ allocated data" 'dpu_enc' is a member of 'drm_enc' And 'drm_enc' got allocated with devm_kzalloc in dpu_encoder_init. This gives this error message: ./drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c:459:1-6: WARNING: invalid free of devm_ allocated data Signed-off-by: YueHaibing Signed-off-by: Rob Clark Signed-off-by: Sean Paul commit 671465198e39706a125d832857e987ec47ce3ae8 Author: YueHaibing Date: Wed Nov 14 09:55:34 2018 +0000 drm/msm/hdmi: Drop pointless static qualifier in msm_hdmi_bind() There is no need to have the 'struct hdmi_platform_config *hdmi_cfg' variable static since new value always be assigned before use it. Signed-off-by: YueHaibing Signed-off-by: Rob Clark Signed-off-by: Sean Paul commit 2189463dba3eac10d7264a40ede12fc1a3c06fb1 Author: Robert Foss Date: Mon Nov 5 11:13:12 2018 +0100 drm/msm: Move fence put to where failure occurs If dma_fence_wait fails to wait for a supplied in-fence in msm_ioctl_gem_submit, make sure we release that in-fence. Also remove this dma_fence_put() from the 'out' label. Signed-off-by: Robert Foss Reviewed-by: Chris Wilson Cc: stable@vger.kernel.org Signed-off-by: Rob Clark Signed-off-by: Sean Paul commit 081679c51ef2fd7b23cf9ddb7d775b17f75de18c Author: Sean Paul Date: Tue Oct 16 11:52:45 2018 -0400 drm/msm: dpu: Don't set legacy plane->crtc pointer It causes a WARN in drm_atomic_get_plane_state(), and is not used by atomic (or dpu). Signed-off-by: Sean Paul Reviewed-by: Daniel Vetter Signed-off-by: Rob Clark commit d52900437e95e2799953af21971a54fe5f8e33ff Author: Jordan Crouse Date: Mon Oct 15 15:31:54 2018 -0600 drm/msm/gpu: Don't map command buffers with nr_relocs equal to 0 If a command buffer doesn't have any relocs assigned to it there then is no need to map it in the kernel address space. Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark Signed-off-by: Sean Paul commit ee4456359640defe3f51cc6b728bfce4bc444c9e Author: Todor Tomov Date: Fri Oct 19 17:07:22 2018 +0300 drm/msm/hdmi: Enable HPD after HDMI IRQ is set up SoCs that contain MDP5 have a top level wrapper called MDSS that manages locks, power and irq for the sub-blocks within it. Irq for HDMI is also routed through the MDSS. Shortly after the Hot Plug Detection (HPD) is enabled in HDMI, HDMI interrupts are recieved by the MDSS interrupt handler. However at this moment the HDMI irq is still not mapped to the MDSS irq domain so the HDMI irq handler cannot be called to process the interrupts. This leads to a flood of HDMI interrupts on CPU 0. If we are lucky to have the HDMI initialization running on a different CPU, it will eventually map the HDMI irq to MDSS irq domain, the next HDMI interrupt will be handled by the HDMI irq handler, the interrupt flood will stop and we will recover. If the HDMI initialization is running on CPU 0, then it cannot complete and there is nothing to stop the interrupt flood on CPU 0. The system is stuck. Fix this by moving the HPD enablement after the HDMI irq is mapped to the MDSS irq domain. Signed-off-by: Todor Tomov Signed-off-by: Rob Clark Signed-off-by: Sean Paul commit 7f9743abaa79d3491fee7a0446461b0fdd2aeaa5 Author: Jeykumar Sankaran Date: Wed Oct 10 14:11:16 2018 -0700 drm/msm: validate display and event threads While creating display and event threads per crtc, validate them before setting their priorities. changes in v2: - use dev_warn (Abhinav Kumar) changes in v3: - fix compilation error changes in v4: - Remove Change-Id (Sean Paul) - Keep logging within 80 char limit (Sean Paul) Reviewed-by: Sean Paul Signed-off-by: Jeykumar Sankaran Signed-off-by: Rob Clark Signed-off-by: Sean Paul commit 3c613a3bddd322c87677604d81e267fee22c6f14 Author: Sebastian Reichel Date: Wed Nov 21 17:09:14 2018 +0100 drm/omap: fix incorrect union usage The DSI encoder sets dssdev->ops->dsi.set_config, which is stored at the same offset as dssdev->ops->hdmi.set_hdmi_mode. The code in omap_encoder only checks if dssdev->ops->hdmi.set_hdmi_mode is NULL. Due to the way union works, it won't be NULL if dsi.set_config is set. This means dsi_set_config will be called with config=hdmi_mode=false=NULL parameter resulting in a NULL dereference. Also the dereference happens while console is locked, so kernel hangs without any debug output without "fb.lockless_register_fb=1" parameter. This restructures the code, so that the HDMI mode is only configured for HDMI output types. Fixes: 83910ad3f51fb ("drm/omap: Move most omap_dss_driver operations to omap_dss_device_ops") Signed-off-by: Sebastian Reichel Tested-by: Tony Lindgren [tomi.valkeinen@ti.com: dropped the safeguard] Signed-off-by: Tomi Valkeinen Link: https://patchwork.freedesktop.org/patch/msgid/20181121160916.22017-5-sebastian.reichel@collabora.com commit 0a02d495531e0bbe32c3f7361232ba61b981199a Author: Sebastian Reichel Date: Wed Nov 21 17:09:12 2018 +0100 drm/omap: populate DSI platform bus earlier After the changes from 4.20 the DSI encoder tries to find the attached panel before populating the DSI bus. If the panel is not found -EPROBE_DEFER is returned, so the DSI bus is never populated and the panel never added. Fix this by populating the DSI bus before searching for the video sink in dsi_init_output(). Fixes: 27d624527d992 ("drm/omap: dss: Acquire next dssdev at probe time") Acked-by: Pavel Machek Tested-by: Tony Lindgren Tested-by: Pavel Machek Signed-off-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen Link: https://patchwork.freedesktop.org/patch/msgid/20181121160916.22017-3-sebastian.reichel@collabora.com commit 0a7f54ea0e1ed5a8f666e2adee7943b3991b4987 Author: Tomi Valkeinen Date: Mon Nov 26 11:24:47 2018 +0200 drm/omap: fix bus_flags for panel-dpi panel-dpi used to convey the bus-flags via the videomode, but recent changes changed the use of videomode to DRM's drm_display_mode which does not contain bus-flags. This broke panel-dpi, which didn't explicitly store the bus-flags into dssdev->bus_flags. Fix this by setting dssdev->bus_flags. Also change the bus_flags type to u32, as that is the type used in the DRM framework, and we would get a warning with drm_bus_flags_from_videomode() otherwise. Fixes: 3fbda31e814868d8477ddf52d74b7b8f596578e8 ("drm/omap: Split mode fixup and mode set from encoder enable") Signed-off-by: Tomi Valkeinen Reported-by: H. Nikolaus Schaller Link: https://patchwork.freedesktop.org/patch/msgid/20181126092447.11864-1-tomi.valkeinen@ti.com Reviewed-by: Laurent Pinchart commit 182ddd16194cd082f25fa1b063dae3c7c5cce384 Author: Juergen Gross Date: Mon Dec 3 11:38:11 2018 +0100 x86/boot: Clear RSDP address in boot_params for broken loaders Gunnar Krueger reported a systemd-boot failure and bisected it down to: e6e094e053af75 ("x86/acpi, x86/boot: Take RSDP address from boot params if available") In case a broken boot loader doesn't clear its 'struct boot_params', clear rsdp_addr in sanitize_boot_params(). Reported-by: Gunnar Krueger Tested-by: Gunnar Krueger Signed-off-by: Juergen Gross Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: bp@alien8.de Cc: sstabellini@kernel.org Fixes: e6e094e053af75 ("x86/acpi, x86/boot: Take RSDP address from boot params if available") Link: http://lkml.kernel.org/r/20181203103811.17056-1-jgross@suse.com Signed-off-by: Ingo Molnar commit 54947cd64c1b8290f64bb2958e343c07270e3a58 Author: Takashi Iwai Date: Mon Dec 3 10:44:15 2018 +0100 ALSA: hda/realtek - Fix speaker output regression on Thinkpad T570 We've got a regression report for some Thinkpad models (at least T570s) which shows the too low speaker output volume. The bisection leaded to the commit 61fcf8ece9b6 ("ALSA: hda/realtek - Enable Thinkpad Dock device for ALC298 platform"), and it's basically adding the two pin configurations for the dock, and looks harmless. The real culprit seems, though, that the DAC assignment for the speaker pin is implicitly assumed on these devices, i.e. pin NID 0x14 to be coupled with DAC NID 0x03. When more pins are configured by the commit above, the auto-parser changes the DAC assignment, and this resulted in the regression. As a workaround, just provide the fixed pin / DAC mapping table for this Thinkpad fixup function. It's no generic solution, but the problem itself is pretty much device-specific, so must be good enough. Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1554304 Fixes: 61fcf8ece9b6 ("ALSA: hda/realtek - Enable Thinkpad Dock device for ALC298 platform") Cc: Reported-and-tested-by: Jeremy Cline Signed-off-by: Takashi Iwai commit d233c7dd1682437ba4b430b04766aa6eef9aef67 Author: Miklos Szeredi Date: Mon Dec 3 10:14:43 2018 +0100 fuse: fix revalidation of attributes for permission check fuse_invalidate_attr() now sets fi->inval_mask instead of fi->i_time, hence we need to check the inval mask in fuse_permission() as well. Signed-off-by: Miklos Szeredi Fixes: 2f1e81965fd0 ("fuse: allow fine grained attr cache invaldation") commit a9c2d1e82fc2937baf43c0d400f0c9e87dcf035d Author: Miklos Szeredi Date: Mon Dec 3 10:14:43 2018 +0100 fuse: fix fsync on directory Commit ab2257e9941b ("fuse: reduce size of struct fuse_inode") moved parts of fields related to writeback on regular file and to directory caching into a union. However fuse_fsync_common() called from fuse_dir_fsync() touches some writeback related fields, resulting in a crash. Move writeback related parts from fuse_fsync_common() to fuse_fysnc(). Reported-by: Brett Girton Tested-by: Brett Girton Fixes: ab2257e9941b ("fuse: reduce size of struct fuse_inode") Signed-off-by: Miklos Szeredi commit a40fa231bb64b33e2cd54cf8ef44a9f89875fa11 Author: Tina Zhang Date: Mon Dec 3 16:29:23 2018 +0800 drm/i915/gvt: Fix tiled memory decoding bug on BDW Commit b244ffa15c8b ("drm/i915/gvt: Fix drm_format_mod value for vGPU plane") introduced a regression issue to the tiled memory decoding on BDW. This patch can fix this issue. Here is the issue detail: https://github.com/intel/gvt-linux/issues/61 v1->v2: - Refine the commit message. (Zhenyu) Fixes: b244ffa15c8b("drm/i915/gvt: Fix drm_format_mod value for vGPU plane") Signed-off-by: Tina Zhang Cc: stable@vger.kernel.org # v4.19+ Cc: Zhenyu Wang Signed-off-by: Zhenyu Wang commit 37c2578c0c40e286bc0d30bdc05290b2058cf66e Author: Dexuan Cui Date: Mon Dec 3 00:54:35 2018 +0000 Drivers: hv: vmbus: Offload the handling of channels to two workqueues vmbus_process_offer() mustn't call channel->sc_creation_callback() directly for sub-channels, because sc_creation_callback() -> vmbus_open() may never get the host's response to the OPEN_CHANNEL message (the host may rescind a channel at any time, e.g. in the case of hot removing a NIC), and vmbus_onoffer_rescind() may not wake up the vmbus_open() as it's blocked due to a non-zero vmbus_connection.offer_in_progress, and finally we have a deadlock. The above is also true for primary channels, if the related device drivers use sync probing mode by default. And, usually the handling of primary channels and sub-channels can depend on each other, so we should offload them to different workqueues to avoid possible deadlock, e.g. in sync-probing mode, NIC1's netvsc_subchan_work() can race with NIC2's netvsc_probe() -> rtnl_lock(), and causes deadlock: the former gets the rtnl_lock and waits for all the sub-channels to appear, but the latter can't get the rtnl_lock and this blocks the handling of sub-channels. The patch can fix the multiple-NIC deadlock described above for v3.x kernels (e.g. RHEL 7.x) which don't support async-probing of devices, and v4.4, v4.9, v4.14 and v4.18 which support async-probing but don't enable async-probing for Hyper-V drivers (yet). The patch can also fix the hang issue in sub-channel's handling described above for all versions of kernels, including v4.19 and v4.20-rc4. So actually the patch should be applied to all the existing kernels, not only the kernels that have 8195b1396ec8. Fixes: 8195b1396ec8 ("hv_netvsc: fix deadlock on hotplug") Cc: stable@vger.kernel.org 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 94d0fb159da94cb4522e14d6004bb7acf2ff0387 Author: Yangtao Li Date: Fri Nov 30 21:20:48 2018 -0500 ide: Change to use DEFINE_SHOW_ATTRIBUTE macro Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Yangtao Li Signed-off-by: David S. Miller commit a51921c0db3fd26c4ed83dc0ec5d32988fa02aa5 Author: Yangtao Li Date: Tue Nov 20 08:02:49 2018 -0500 ide: pmac: add of_node_put() use of_node_put() to release the refcount. Signed-off-by: Yangtao Li Signed-off-by: David S. Miller commit dac097c4546e4c5b16dd303a1e97c1d319c8ab3e 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: David S. Miller commit 6bd520ab7cf69486ea81fd3cdfd2d5a390ad1100 Author: Yangtao Li Date: Tue Nov 20 08:38:26 2018 -0500 drivers/sbus/char: add of_node_put() use of_node_put() to release the refcount. Signed-off-by: Yangtao Li Signed-off-by: David S. Miller commit 87d81a23e24f24ebe014891e8bdf3ff8785031e8 Author: Yangtao Li Date: Tue Nov 20 08:30:40 2018 -0500 sbus: char: add of_node_put() use of_node_put() to release the refcount. Signed-off-by: Yangtao Li Signed-off-by: David S. Miller commit a0071bc455da7b830b9517058933a83eb6cc902a Author: Nicolas Boichat Date: Mon Nov 26 12:07:37 2018 +0800 drm/mediatek: Only try to attach bridge if there is one Even if dsi->bridge is NULL, we still try to call drm_bridge_attach, and print out an error message, before creating the connector. When no bridge is provided, let's skip these 2 steps and directly create the connector. Signed-off-by: Nicolas Boichat Signed-off-by: CK Hu Reviewed-by: Andrzej Hajda commit 63e19c8216bb03a1b4d10f6637d1324ae7a2b612 Author: Guo Ren Date: Tue Nov 20 16:06:57 2018 +0800 csky: bugfix tlb_get_pgd error. It's wrong to mask/unmask highest bit in addr to translate the vaddr to paddr. We should use PAGE_OFFSET and PHYS_OFFSET. Wrong implement: return ((get_pgd()|(1<<31)) - PHYS_OFFSET) & ~1; When PHYS_OFFSET=0xc0000000 and get_pgd() return 0xe0000000, it'll return 0x60000000. It's wrong and should be 0xa0000000. Now correct it to: return ((get_pgd() - PHYS_OFFSET) & ~1) + PAGE_OFFSET; Signed-off-by: Guo Ren commit b4b84da36403bf1142d17fe7b06c2d639c9c9b8b Author: Guo Ren Date: Tue Nov 6 15:21:14 2018 +0800 MAINTAINERS: add maintainer for C-SKY drivers There are two intc drivers and two clocksource drivers, also include related dt-bindings' documentations. Change ren_guo@c-sky.com to guoren@kernel.org Signed-off-by: Guo Ren Acked-by: Daniel Lezcano commit 2595646791c319cadfdbf271563aac97d0843dc7 Author: Linus Torvalds Date: Sun Dec 2 15:07:55 2018 -0800 Linux 4.20-rc5 commit 6a512726090a5cfd8d5cd41652d2b98a222854b8 Merge: 292974c5acae bfed4d730823 Author: Linus Torvalds Date: Sun Dec 2 12:19:44 2018 -0800 Merge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC fixes from Olof Johansson: "Volume is a little higher than usual due to a set of gpio fixes for Davinci platforms that's been around a while, still seemed appropriate to not hold off until next merge window. Besides that it's the usual mix of minor fixes, mostly corrections of small stuff in device trees. Major stability-related one is the removal of a regulator from DT on Rock960, since DVFS caused undervoltage. I expect it'll be restored once they figure out the underlying issue" * tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (28 commits) MAINTAINERS: Remove unused Qualcomm SoC mailing list ARM: davinci: dm644x: set the GPIO base to 0 ARM: davinci: da830: set the GPIO base to 0 ARM: davinci: dm355: set the GPIO base to 0 ARM: davinci: dm646x: set the GPIO base to 0 ARM: davinci: dm365: set the GPIO base to 0 ARM: davinci: da850: set the GPIO base to 0 gpio: davinci: restore a way to manually specify the GPIO base ARM: davinci: dm644x: define gpio interrupts as separate resources ARM: davinci: dm355: define gpio interrupts as separate resources ARM: davinci: dm646x: define gpio interrupts as separate resources ARM: davinci: dm365: define gpio interrupts as separate resources ARM: davinci: da8xx: define gpio interrupts as separate resources ARM: dts: at91: sama5d2: use the divided clock for SMC ARM: dts: imx51-zii-rdu1: Remove EEPROM node ARM: dts: rockchip: Remove @0 from the veyron memory node arm64: dts: rockchip: Fix PCIe reset polarity for rk3399-puma-haikou. arm64: dts: qcom: msm8998: Reserve gpio ranges on MTP arm64: dts: sdm845-mtp: Reserve reserved gpios arm64: dts: ti: k3-am654: Fix wakeup_uart reg address ... commit 292974c5acae330186cbf5a833385f666aeb12c0 Merge: a234c7371fd8 975ef94a0284 Author: Linus Torvalds Date: Sun Dec 2 12:15:55 2018 -0800 Merge tag 'for-linus-4.20a-rc5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull xen fixes from Juergen Gross: - A revert of a previous commit as it is no longer necessary and has shown to cause problems in some memory hotplug cases. - Some small fixes and a minor cleanup. - A patch for adding better diagnostic data in a very rare failure case. * tag 'for-linus-4.20a-rc5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: pvcalls-front: fixes incorrect error handling Revert "xen/balloon: Mark unallocated host memory as UNUSABLE" xen: xlate_mmu: add missing header to fix 'W=1' warning xen/x86: add diagnostic printout to xen_mc_flush() in case of error x86/xen: cleanup includes in arch/x86/xen/spinlock.c commit a234c7371fd8a71faa000745ce6ffee05e1dc07a Merge: 4b78317679c4 77e75fda94d2 Author: Linus Torvalds Date: Sun Dec 2 12:07:27 2018 -0800 Merge tag 'dmaengine-fix-4.20-rc5' of git://git.infradead.org/users/vkoul/slave-dma Pull dmaengine fixes from Vinod Koul: "This contains two fixes to at_hdmac which fixes long standing bus reported recently on serial transfers causing memory leak. These fixes were done by Richard Genoud" * tag 'dmaengine-fix-4.20-rc5' of git://git.infradead.org/users/vkoul/slave-dma: dmaengine: at_hdmac: fix module unloading dmaengine: at_hdmac: fix memory leak in at_dma_xlate() commit 1e8249b8a4e960018e4baca6b523b8a4500af600 Author: Helge Deller Date: Thu Nov 29 17:05:47 2018 +0100 parisc: Enable -ffunction-sections for modules on 32-bit kernel Frank Schreiner reported, that since kernel 4.18 he faces sysfs-warnings when loading modules on a 32-bit kernel. Here is one such example: sysfs: cannot create duplicate filename '/module/nfs/sections/.text' CPU: 0 PID: 98 Comm: modprobe Not tainted 4.18.0-2-parisc #1 Debian 4.18.10-2 Backtrace: [<1017ce2c>] show_stack+0x3c/0x50 [<107a7210>] dump_stack+0x28/0x38 [<103f900c>] sysfs_warn_dup+0x88/0xac [<103f8b1c>] sysfs_add_file_mode_ns+0x164/0x1d0 [<103f9e70>] internal_create_group+0x11c/0x304 [<103fa0a0>] sysfs_create_group+0x48/0x60 [<1022abe8>] load_module.constprop.35+0x1f9c/0x23b8 [<1022b278>] sys_finit_module+0xd0/0x11c [<101831dc>] syscall_exit+0x0/0x14 This warning gets triggered by the fact, that due to commit 24b6c22504a2 ("parisc: Build kernel without -ffunction-sections") we now get multiple .text sections in the kernel modules for which sysfs_create_group() can't create multiple virtual files. This patch works around the problem by re-enabling the -ffunction-sections compiler option for modules, while keeping it disabled for the non-module kernel code. Reported-by: Frank Scheiner Fixes: 24b6c22504a2 ("parisc: Build kernel without -ffunction-sections") Cc: # v4.18+ Signed-off-by: Helge Deller commit 0a9a4304f3614e25d9de9b63502ca633c01c0d70 Author: Trond Myklebust Date: Sat Dec 1 23:18:00 2018 -0500 SUNRPC: Fix a potential race in xprt_connect() If an asynchronous connection attempt completes while another task is in xprt_connect(), then the call to rpc_sleep_on() could end up racing with the call to xprt_wake_pending_tasks(). So add a second test of the connection state after we've put the task to sleep and set the XPRT_CONNECTING flag, when we know that there can be no asynchronous connection attempts still in progress. Fixes: 0b9e79431377d ("SUNRPC: Move the test for XPRT_CONNECTING into...") Signed-off-by: Trond Myklebust commit 71700bb96047f68a0aae3932466fc7c9ad5ce6c0 Author: Trond Myklebust Date: Fri Nov 30 16:11:15 2018 -0500 SUNRPC: Fix a memory leak in call_encode() If we retransmit an RPC request, we currently end up clobbering the value of req->rq_rcv_buf.bvec that was allocated by the initial call to xprt_request_prepare(req). Signed-off-by: Trond Myklebust commit 8dae5398ab1ac107b1517e8195ed043d5f422bd0 Author: Chuck Lever Date: Fri Nov 30 15:39:57 2018 -0500 SUNRPC: Fix leak of krb5p encode pages call_encode can be invoked more than once per RPC call. Ensure that each call to gss_wrap_req_priv does not overwrite pointers to previously allocated memory. Signed-off-by: Chuck Lever Cc: stable@kernel.org Signed-off-by: Trond Myklebust commit 9bd11523dc1b9293d1eee2c0b8cfc986a312bbce Author: Trond Myklebust Date: Fri Nov 30 12:48:47 2018 -0500 SUNRPC: call_connect_status() must handle tasks that got transmitted If a task failed to get the write lock in the call to xprt_connect(), then it will be queued on xprt->sending. In that case, it is possible for it to get transmitted before the call to call_connect_status(), in which case it needs to be handled by call_transmit_status() instead. Signed-off-by: Trond Myklebust commit ad3cba223ac02dc769c3bbe88efe277bbb457566 Author: Dave Kleikamp Date: Tue Nov 27 19:31:30 2018 +0000 nfs: don't dirty kernel pages read by direct-io When we use direct_IO with an NFS backing store, we can trigger a WARNING in __set_page_dirty(), as below, since we're dirtying the page unnecessarily in nfs_direct_read_completion(). To fix, replicate the logic in commit 53cbf3b157a0 ("fs: direct-io: don't dirtying pages for ITER_BVEC/ITER_KVEC direct read"). Other filesystems that implement direct_IO handle this; most use blockdev_direct_IO(). ceph and cifs have similar logic. mount 127.0.0.1:/export /nfs dd if=/dev/zero of=/nfs/image bs=1M count=200 losetup --direct-io=on -f /nfs/image mkfs.btrfs /dev/loop0 mount -t btrfs /dev/loop0 /mnt/ kernel: WARNING: CPU: 0 PID: 8067 at fs/buffer.c:580 __set_page_dirty+0xaf/0xd0 kernel: Modules linked in: loop(E) nfsv3(E) rpcsec_gss_krb5(E) nfsv4(E) dns_resolver(E) nfs(E) fscache(E) nfsd(E) auth_rpcgss(E) nfs_acl(E) lockd(E) grace(E) fuse(E) tun(E) ip6t_rpfilter(E) ipt_REJECT(E) nf_ kernel: snd_seq(E) snd_seq_device(E) snd_pcm(E) video(E) snd_timer(E) snd(E) soundcore(E) ip_tables(E) xfs(E) libcrc32c(E) sd_mod(E) sr_mod(E) cdrom(E) ata_generic(E) pata_acpi(E) crc32c_intel(E) ahci(E) li kernel: CPU: 0 PID: 8067 Comm: kworker/0:2 Tainted: G E 4.20.0-rc1.master.20181111.ol7.x86_64 #1 kernel: Hardware name: innotek GmbH VirtualBox/VirtualBox, BIOS VirtualBox 12/01/2006 kernel: Workqueue: nfsiod rpc_async_release [sunrpc] kernel: RIP: 0010:__set_page_dirty+0xaf/0xd0 kernel: Code: c3 48 8b 02 f6 c4 04 74 d4 48 89 df e8 ba 05 f7 ff 48 89 c6 eb cb 48 8b 43 08 a8 01 75 1f 48 89 d8 48 8b 00 a8 04 74 02 eb 87 <0f> 0b eb 83 48 83 e8 01 eb 9f 48 83 ea 01 0f 1f 00 eb 8b 48 83 e8 kernel: RSP: 0000:ffffc1c8825b7d78 EFLAGS: 00013046 kernel: RAX: 000fffffc0020089 RBX: fffff2b603308b80 RCX: 0000000000000001 kernel: RDX: 0000000000000001 RSI: ffff9d11478115c8 RDI: ffff9d11478115d0 kernel: RBP: ffffc1c8825b7da0 R08: 0000646f6973666e R09: 8080808080808080 kernel: R10: 0000000000000001 R11: 0000000000000000 R12: ffff9d11478115d0 kernel: R13: ffff9d11478115c8 R14: 0000000000003246 R15: 0000000000000001 kernel: FS: 0000000000000000(0000) GS:ffff9d115ba00000(0000) knlGS:0000000000000000 kernel: CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 kernel: CR2: 00007f408686f640 CR3: 0000000104d8e004 CR4: 00000000000606f0 kernel: DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 kernel: DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 kernel: Call Trace: kernel: __set_page_dirty_buffers+0xb6/0x110 kernel: set_page_dirty+0x52/0xb0 kernel: nfs_direct_read_completion+0xc4/0x120 [nfs] kernel: nfs_pgio_release+0x10/0x20 [nfs] kernel: rpc_free_task+0x30/0x70 [sunrpc] kernel: rpc_async_release+0x12/0x20 [sunrpc] kernel: process_one_work+0x174/0x390 kernel: worker_thread+0x4f/0x3e0 kernel: kthread+0x102/0x140 kernel: ? drain_workqueue+0x130/0x130 kernel: ? kthread_stop+0x110/0x110 kernel: ret_from_fork+0x35/0x40 kernel: ---[ end trace 01341980905412c9 ]--- Signed-off-by: Dave Kleikamp Signed-off-by: Santosh Shilimkar [forward-ported to v4.20] Signed-off-by: Calum Mackay Reviewed-by: Dave Kleikamp Reviewed-by: Chuck Lever Signed-off-by: Trond Myklebust commit 320f35b7bf8cccf1997ca3126843535e1b95e9c4 Author: Tigran Mkrtchyan Date: Mon Nov 26 18:35:14 2018 +0100 flexfiles: enforce per-mirror stateid only for v4 DSes Since commit bb21ce0ad227 we always enforce per-mirror stateid. However, this makes sense only for v4+ servers. Signed-off-by: Tigran Mkrtchyan Signed-off-by: Trond Myklebust commit a73d4e1490913b76b292f91553b7ba08a65caa3f Author: Alexander Aring Date: Thu Nov 29 17:41:54 2018 -0500 ieee802154: hwsim: fix off-by-one in parse nested This patch fixes a off-by-one mistake in nla_parse_nested() functions of mac802154_hwsim driver. I had to enabled stack protector so I was able to reproduce it. Reference: https://github.com/linux-wpan/wpan-tools/issues/17 Signed-off-by: Alexander Aring Signed-off-by: Stefan Schmidt commit 4b78317679c4f3782a3cff0ddb269c1fcfde7621 Merge: 880584176ed7 55a974021ec9 Author: Linus Torvalds Date: Sat Dec 1 12:35:48 2018 -0800 Merge branch 'x86-pti-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull STIBP fallout fixes from Thomas Gleixner: "The performance destruction department finally got it's act together and came up with a cure for the STIPB regression: - Provide a command line option to control the spectre v2 user space mitigations. Default is either seccomp or prctl (if seccomp is disabled in Kconfig). prctl allows mitigation opt-in, seccomp enables the migitation for sandboxed processes. - Rework the code to handle the conditional STIBP/IBPB control and remove the now unused ptrace_may_access_sched() optimization attempt - Disable STIBP automatically when SMT is disabled - Optimize the switch_to() logic to avoid MSR writes and invocations of __switch_to_xtra(). - Make the asynchronous speculation TIF updates synchronous to prevent stale mitigation state. As a general cleanup this also makes retpoline directly depend on compiler support and removes the 'minimal retpoline' option which just pretended to provide some form of security while providing none" * 'x86-pti-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (31 commits) x86/speculation: Provide IBPB always command line options x86/speculation: Add seccomp Spectre v2 user space protection mode x86/speculation: Enable prctl mode for spectre_v2_user x86/speculation: Add prctl() control for indirect branch speculation x86/speculation: Prepare arch_smt_update() for PRCTL mode x86/speculation: Prevent stale SPEC_CTRL msr content x86/speculation: Split out TIF update ptrace: Remove unused ptrace_may_access_sched() and MODE_IBRS x86/speculation: Prepare for conditional IBPB in switch_mm() x86/speculation: Avoid __switch_to_xtra() calls x86/process: Consolidate and simplify switch_to_xtra() code x86/speculation: Prepare for per task indirect branch speculation control x86/speculation: Add command line control for indirect branch speculation x86/speculation: Unify conditional spectre v2 print functions x86/speculataion: Mark command line parser data __initdata x86/speculation: Mark string arrays const correctly x86/speculation: Reorder the spec_v2 code x86/l1tf: Show actual SMT state x86/speculation: Rework SMT state change sched/smt: Expose sched_smt_present static key ... commit dcb40590e69e306030e944a39d0e4bf54247fb68 Author: Roman Gushchin Date: Sat Dec 1 10:39:44 2018 -0800 bpf: refactor bpf_test_run() to separate own failures and test program result After commit f42ee093be29 ("bpf/test_run: support cgroup local storage") the bpf_test_run() function may fail with -ENOMEM, if it's not possible to allocate memory for a cgroup local storage. This error shouldn't be mixed with the return value of the testing program. Let's add an additional argument with a pointer where to store the testing program's result; and make bpf_test_run() return either 0 or -ENOMEM. Fixes: f42ee093be29 ("bpf/test_run: support cgroup local storage") Reported-by: Dan Carpenter Suggested-by: Alexei Starovoitov Signed-off-by: Roman Gushchin Cc: Daniel Borkmann Cc: Alexei Starovoitov Signed-off-by: Alexei Starovoitov commit 880584176ed7875117a5ba76cf316cb60f7ad30b Merge: c734b42583bc 1c9b357ced0b Author: Linus Torvalds Date: Sat Dec 1 11:36:32 2018 -0800 Merge tag 'for-linus-20181201' of git://git.kernel.dk/linux-block Pull block layer fixes from Jens Axboe: - Single range elevator discard merge fix, that caused crashes (Ming) - Fix for a regression in O_DIRECT, where we could potentially lose the error value (Maximilian Heyne) - NVMe pull request from Christoph, with little fixes all over the map for NVMe. * tag 'for-linus-20181201' of git://git.kernel.dk/linux-block: block: fix single range discard merge nvme-rdma: fix double freeing of async event data nvme: flush namespace scanning work just before removing namespaces nvme: warn when finding multi-port subsystems without multipathing enabled fs: fix lost error code in dio_complete nvme-pci: fix surprise removal nvme-fc: initialize nvme_req(rq)->ctrl after calling __nvme_fc_init_request() nvme: Free ctrl device name on init failure commit c734b42583bc391d86ed64e3be25fd5f2c464124 Merge: d8f190ee836a c74eadf881ad Author: Linus Torvalds Date: Sat Dec 1 11:32:49 2018 -0800 Merge tag 'pci-v4.20-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci Pull PCI fixes from Bjorn Helgaas: - Fix a link speed checking interface that broke PCIe gen3 cards in gen1 slots (Mikulas Patocka) - Fix an imx6 link training error (Trent Piepho) - Fix a layerscape outbound window accessor calling error (Hou Zhiqiang) - Fix a DesignWare endpoint MSI-X address calculation error (Gustavo Pimentel) * tag 'pci-v4.20-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: PCI: Fix incorrect value returned from pcie_get_speed_cap() PCI: dwc: Fix MSI-X EP framework address calculation bug PCI: layerscape: Fix wrong invocation of outbound window disable accessor PCI: imx6: Fix link training status detection in link up check commit c74eadf881ad634c68880e2c1b504989d95993ee Merge: f1f90e254e46 15cb127e3c8f Author: Bjorn Helgaas Date: Fri Nov 30 23:42:08 2018 -0600 Merge remote-tracking branch 'lorenzo/pci/controller-fixes' into for-linus - Fix DesignWare endpoint MSI-X address calculation bug (Gustavo Pimentel) - Fix Layerscape outbound window disable usage (Hou Zhiqiang) - Fix imx6 link up detection (Trent Piepho) * lorenzo/pci/controller-fixes: PCI: dwc: Fix MSI-X EP framework address calculation bug PCI: layerscape: Fix wrong invocation of outbound window disable accessor PCI: imx6: Fix link training status detection in link up check commit f1f90e254e46e0a14220e4090041f68256fbe297 Author: Mikulas Patocka Date: Mon Nov 26 10:37:13 2018 -0600 PCI: Fix incorrect value returned from pcie_get_speed_cap() The macros PCI_EXP_LNKCAP_SLS_*GB are values, not bit masks. We must mask the register and compare it against them. This fixes errors like this: amdgpu: [powerplay] failed to send message 261 ret is 0 when a PCIe-v3 card is plugged into a PCIe-v1 slot, because the slot is being incorrectly reported as PCIe-v3 capable. 6cf57be0f78e, which appeared in v4.17, added pcie_get_speed_cap() with the incorrect test of PCI_EXP_LNKCAP_SLS as a bitmask. 5d9a63304032, which appeared in v4.19, changed amdgpu to use pcie_get_speed_cap(), so the amdgpu bug reports below are regressions in v4.19. Fixes: 6cf57be0f78e ("PCI: Add pcie_get_speed_cap() to find max supported link speed") Fixes: 5d9a63304032 ("drm/amdgpu: use pcie functions for link width and speed") Link: https://bugs.freedesktop.org/show_bug.cgi?id=108704 Link: https://bugs.freedesktop.org/show_bug.cgi?id=108778 Signed-off-by: Mikulas Patocka [bhelgaas: update comment, remove use of PCI_EXP_LNKCAP_SLS_8_0GB and PCI_EXP_LNKCAP_SLS_16_0GB since those should be covered by PCI_EXP_LNKCAP2, remove test of PCI_EXP_LNKCAP for zero, since that register is required] Signed-off-by: Bjorn Helgaas Acked-by: Alex Deucher Cc: stable@vger.kernel.org # v4.17+ commit bf3d6afbb234156749b640b6c50f714967a85964 Author: Benjamin Herrenschmidt Date: Fri Nov 30 14:54:09 2018 +1100 powerpc: Look for "stdout-path" when setting up legacy consoles Commit 78e5dfea84dc ("powerpc: dts: replace 'linux,stdout-path' with 'stdout-path'") broke the default console on a number of embedded PowerPC systems, because it failed to also update the code in arch/powerpc/kernel/legacy_serial.c to look for that property in addition to the old one. This fixes it. Fixes: 78e5dfea84dc ("powerpc: dts: replace 'linux,stdout-path' with 'stdout-path'") Cc: stable@vger.kernel.org # v4.17+ Signed-off-by: Benjamin Herrenschmidt Reviewed-by: Rob Herring Signed-off-by: Michael Ellerman commit d8f190ee836a4581ba906731835d735cb97948f5 Merge: 6c7954b7eb76 164f7e586739 Author: Linus Torvalds Date: Fri Nov 30 18:45:49 2018 -0800 Merge branch 'akpm' (patches from Andrew) Merge misc fixes from Andrew Morton: "31 fixes" * emailed patches from Andrew Morton : (31 commits) 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 userfaultfd: shmem: add i_size checks userfaultfd: shmem/hugetlbfs: only allow to register VM_MAYWRITE vmas userfaultfd: shmem: allocate anonymous memory for MAP_PRIVATE shmem ... commit 6c7954b7eb76578866eba179709c5883f29f747f Merge: 868dda00b98c 6584297b78b6 Author: Linus Torvalds Date: Fri Nov 30 18:41:06 2018 -0800 Merge tag 'mips_fixes_4.20_4' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux Pull few more MIPS fixes from Paul Burton: - Fix mips_get_syscall_arg() to operate on the task specified when detecting o32 tasks running on MIPS64 kernels. - Fix some incorrect GPIO pin muxing for the MT7620 SoC. - Update the linux-mips mailing list address. * tag 'mips_fixes_4.20_4' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux: MAINTAINERS: Update linux-mips mailing list address MIPS: ralink: Fix mt7620 nd_sd pinmux mips: fix mips_get_syscall_arg o32 check commit 868dda00b98ccc701a70b8c1b0168fc3bbfd595d Merge: 1f817429b2dd ea2412dc21cc Author: Linus Torvalds Date: Fri Nov 30 18:39:07 2018 -0800 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fixes from Catalin Marinas: - Cortex-A76 erratum workaround - ftrace fix to enable syscall events on arm64 - Fix uninitialised pointer in iort_get_platform_device_domain() * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: ACPI/IORT: Fix iort_get_platform_device_domain() uninitialized pointer value arm64: ftrace: Fix to enable syscall events on arm64 arm64: Add workaround for Cortex-A76 erratum 1286807 commit 1f817429b2ddc08f5c92a5b83d0f303f1e0d1bd4 Merge: fd3b3e0ec59d ef1a84093489 Author: Linus Torvalds Date: Fri Nov 30 18:36:30 2018 -0800 Merge tag 'gcc-plugins-v4.20-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull stackleak plugin fix from Kees Cook: "Fix crash by not allowing kprobing of stackleak_erase() (Alexander Popov)" * tag 'gcc-plugins-v4.20-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: stackleak: Disable function tracing and kprobes for stackleak_erase() commit fd3b3e0ec59db813d3ff665e158b1390ecdcfd14 Merge: 38c7b224ce22 31ffa5638335 Author: Linus Torvalds Date: Fri Nov 30 18:32:33 2018 -0800 Merge tag 'fscache-fixes-20181130' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs Pull fscache and cachefiles fixes from David Howells: "Misc fixes: - Fix an assertion failure at fs/cachefiles/xattr.c:138 caused by a race between a cache object lookup failing and someone attempting to reenable that object, thereby triggering an update of the object's attributes. - Fix an assertion failure at fs/fscache/operation.c:449 caused by a split atomic subtract and atomic read that allows a race to happen. - Fix a leak of backing pages when simultaneously reading the same page from the same object from two or more threads. - Fix a hang due to a race between a cache object being discarded and the corresponding cookie being reenabled. There are also some minor cleanups: - Cast an enum value to a different enum type to prevent clang from generating a warning. This shouldn't cause any sort of change in the emitted code. - Use ktime_get_real_seconds() instead of get_seconds(). This is just used to uniquify a filename for an object to be placed in the graveyard. Objects placed there are deleted by cachfilesd in userspace immediately thereafter. - Remove an initialised, but otherwise unused variable. This should have been entirely optimised away anyway" * tag 'fscache-fixes-20181130' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs: fscache, cachefiles: remove redundant variable 'cache' cachefiles: avoid deprecated get_seconds() cachefiles: Explicitly cast enumerated type in put_object fscache: fix race between enablement and dropping of object cachefiles: Fix page leak in cachefiles_read_backing_file while vmscan is active fscache: Fix race in fscache_op_complete() due to split atomic_sub & read cachefiles: Fix an assertion failure when trying to update a failed object commit 35b827b6d06199841a83839e8bb69c0cd13a28be Author: Nicolas Dichtel Date: Thu Nov 29 14:45:39 2018 +0100 tun: forbid iface creation with rtnl ops It's not supported right now (the goal of the initial patch was to support 'ip link del' only). Before the patch: $ ip link add foo type tun [ 239.632660] BUG: unable to handle kernel NULL pointer dereference at 0000000000000000 [snip] [ 239.636410] RIP: 0010:register_netdevice+0x8e/0x3a0 This panic occurs because dev->netdev_ops is not set by tun_setup(). But to have something usable, it will require more than just setting netdev_ops. Fixes: f019a7a594d9 ("tun: Implement ip link del tunXXX") CC: Eric W. Biederman Signed-off-by: Nicolas Dichtel Signed-off-by: David S. Miller commit 436c9453a1ac0944b82870ef2e0d9be956b396d9 Author: Jason Wang Date: Thu Nov 29 13:53:16 2018 +0800 virtio-net: keep vnet header zeroed after processing XDP We copy vnet header unconditionally in page_to_skb() this is wrong since XDP may modify the packet data. So let's keep a zeroed vnet header for not confusing the conversion between vnet header and skb metadata. In the future, we should able to detect whether or not the packet was modified and keep using the vnet header when packet was not touched. Fixes: f600b6905015 ("virtio_net: Add XDP support") Reported-by: Pavel Popa Signed-off-by: Jason Wang Signed-off-by: David S. Miller commit 9b2156fab0b0df7c38847148b1d42a57e7985ed1 Merge: c0f53771ba45 e1561fe2dd69 Author: David S. Miller Date: Fri Nov 30 17:22:42 2018 -0800 Merge branch 'tcp-fixes-in-timeout-and-retransmission-accounting' Yuchung Cheng says: ==================== tcp: fixes in timeout and retransmission accounting This patch set has assorted fixes of minor accounting issues in timeout, window probe, and retransmission stats. ==================== Signed-off-by: David S. Miller commit e1561fe2dd69dc5dddd69bd73aa65355bdfb048b Author: Yuchung Cheng Date: Wed Nov 28 16:06:45 2018 -0800 tcp: fix SNMP TCP timeout under-estimation Previously the SNMP TCPTIMEOUTS counter has inconsistent accounting: 1. It counts all SYN and SYN-ACK timeouts 2. It counts timeouts in other states except recurring timeouts and timeouts after fast recovery or disorder state. Such selective accounting makes analysis difficult and complicated. For example the monitoring system needs to collect many other SNMP counters to infer the total amount of timeout events. This patch makes TCPTIMEOUTS counter simply counts all the retransmit timeout (SYN or data or FIN). Signed-off-by: Yuchung Cheng Signed-off-by: Eric Dumazet Signed-off-by: Neal Cardwell Signed-off-by: David S. Miller commit ec641b39457e17774313b66697a8a1dc070257bd Author: Yuchung Cheng Date: Wed Nov 28 16:06:44 2018 -0800 tcp: fix SNMP under-estimation on failed retransmission Previously the SNMP counter LINUX_MIB_TCPRETRANSFAIL is not counting the TSO/GSO properly on failed retransmission. This patch fixes that. Signed-off-by: Yuchung Cheng Signed-off-by: Eric Dumazet Signed-off-by: Neal Cardwell Signed-off-by: David S. Miller commit 3976535af0cb9fe34a55f2ffb8d7e6b39a2f8188 Author: Yuchung Cheng Date: Wed Nov 28 16:06:43 2018 -0800 tcp: fix off-by-one bug on aborting window-probing socket Previously there is an off-by-one bug on determining when to abort a stalled window-probing socket. This patch fixes that so it is consistent with tcp_write_timeout(). Signed-off-by: Yuchung Cheng Signed-off-by: Eric Dumazet Signed-off-by: Neal Cardwell Signed-off-by: David S. Miller commit c0f53771ba45745e5870daf880127925c93f232f Author: Pan Bian Date: Thu Nov 29 07:54:22 2018 +0800 liquidio: read sc->iq_no before release sc The function lio_vf_rep_packet_sent_callback releases the occupation of sc via octeon_free_soft_command. sc should not be used after that. Unfortunately, sc->iq_no is read. To fix this, the patch stores sc->iq_no into a local variable before releasing sc and then uses the local variable instead of sc->iq_no. Signed-off-by: Pan Bian Signed-off-by: David S. Miller commit ef6fcd455278c2be3032a346cc66d9dd9866b787 Author: Cong Wang Date: Wed Nov 28 15:04:05 2018 -0800 mlx5: fix get_ip_proto() IP header is not necessarily located right after struct ethhdr, there could be multiple 802.1Q headers in between, this is why we call __vlan_get_protocol(). Fixes: fe1dc069990c ("net/mlx5e: don't set CHECKSUM_COMPLETE on SCTP packets") Cc: Alaa Hleihel Cc: Or Gerlitz Cc: Saeed Mahameed Signed-off-by: Cong Wang Reviewed-by: Tariq Toukan Acked-by: Saeed Mahameed Signed-off-by: David S. Miller commit a3d7e01da06013dc580641a1da57c3b482d58157 Author: Florian Fainelli Date: Wed Nov 28 13:40:04 2018 -0800 net: dsa: Fix tagging attribute location While introducing the DSA tagging protocol attribute, it was added to the DSA slave network devices, but those actually see untagged traffic (that is their whole purpose). Correct this mistake by putting the tagging sysfs attribute under the DSA master network device where this is the information that we need. While at it, also correct the sysfs documentation mistake that missed the "dsa/" directory component of the attribute. Fixes: 98cdb4807123 ("net: dsa: Expose tagging protocol to user-space") Signed-off-by: Florian Fainelli Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit d74286d2c25ad29dbf9e342955dd8dc31f21653b Author: Joe Stringer Date: Fri Nov 30 15:32:21 2018 -0800 bpf: Improve socket lookup reuseport documentation Improve the wording around socket lookup for reuseport sockets, and ensure that both bpf.h headers are in sync. Signed-off-by: Joe Stringer Signed-off-by: Alexei Starovoitov commit f71c6143c2038df1cb43a4b9c90740d14f77467c Author: Joe Stringer Date: Fri Nov 30 15:32:20 2018 -0800 bpf: Support sk lookup in netns with id 0 David Ahern and Nicolas Dichtel report that the handling of the netns id 0 is incorrect for the BPF socket lookup helpers: rather than finding the netns with id 0, it is resolving to the current netns. This renders the netns_id 0 inaccessible. To fix this, adjust the API for the netns to treat all negative s32 values as a lookup in the current netns (including u64 values which when truncated to s32 become negative), while any values with a positive value in the signed 32-bit integer space would result in a lookup for a socket in the netns corresponding to that id. As before, if the netns with that ID does not exist, no socket will be found. Any netns outside of these ranges will fail to find a corresponding socket, as those values are reserved for future usage. Signed-off-by: Joe Stringer Acked-by: Nicolas Dichtel Acked-by: Joey Pabalinas Signed-off-by: Alexei Starovoitov commit fd6d433865a2ad1f7e018ef80408cb3dc3be1ab3 Author: Davide Caratti Date: Wed Nov 28 18:43:42 2018 +0100 net/sched: act_police: fix memory leak in case of invalid control action when users set an invalid control action, kmemleak complains as follows: # echo clear >/sys/kernel/debug/kmemleak # ./tdc.py -e b48b Test b48b: Add police action with exceed goto chain control action All test results: 1..1 ok 1 - b48b # Add police action with exceed goto chain control action about to flush the tap output if tests need to be skipped done flushing skipped test tap output # echo scan >/sys/kernel/debug/kmemleak # cat /sys/kernel/debug/kmemleak unreferenced object 0xffffa0fafbc3dde0 (size 96): comm "tc", pid 2358, jiffies 4294922738 (age 17.022s) hex dump (first 32 bytes): 2a 00 00 20 00 00 00 00 00 00 7d 00 00 00 00 00 *.. ......}..... f8 07 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace: [<00000000648803d2>] tcf_action_init_1+0x384/0x4c0 [<00000000cb69382e>] tcf_action_init+0x12b/0x1a0 [<00000000847ef0d4>] tcf_action_add+0x73/0x170 [<0000000093656e14>] tc_ctl_action+0x122/0x160 [<0000000023c98e32>] rtnetlink_rcv_msg+0x263/0x2d0 [<000000003493ae9c>] netlink_rcv_skb+0x4d/0x130 [<00000000de63f8ba>] netlink_unicast+0x209/0x2d0 [<00000000c3da0ebe>] netlink_sendmsg+0x2c1/0x3c0 [<000000007a9e0753>] sock_sendmsg+0x33/0x40 [<00000000457c6d2e>] ___sys_sendmsg+0x2a0/0x2f0 [<00000000c5c6a086>] __sys_sendmsg+0x5e/0xa0 [<00000000446eafce>] do_syscall_64+0x5b/0x180 [<000000004aa871f2>] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [<00000000450c38ef>] 0xffffffffffffffff change tcf_police_init() to avoid leaking 'new' in case TCA_POLICE_RESULT contains TC_ACT_GOTO_CHAIN extended action. Fixes: c08f5ed5d625 ("net/sched: act_police: disallow 'goto chain' on fallback control action") Reported-by: Dan Carpenter Signed-off-by: Davide Caratti Acked-by: Cong Wang Signed-off-by: David S. Miller commit b7df9ada9a7700dbcca1ba53d217c01e3d48179c Author: Daniel Borkmann Date: Sat Dec 1 01:18:53 2018 +0100 bpf: fix pointer offsets in context for 32 bit Currently, pointer offsets in three BPF context structures are broken in two scenarios: i) 32 bit compiled applications running on 64 bit kernels, and ii) LLVM compiled BPF programs running on 32 bit kernels. The latter is due to BPF target machine being strictly 64 bit. So in each of the cases the offsets will mismatch in verifier when checking / rewriting context access. Fix this by providing a helper macro __bpf_md_ptr() that will enforce padding up to 64 bit and proper alignment, and for context access a macro bpf_ctx_range_ptr() which will cover full 64 bit member range on 32 bit archs. For flow_keys, we additionally need to force the size check to sizeof(__u64) as with other pointer types. Fixes: d58e468b1112 ("flow_dissector: implements flow dissector BPF hook") Fixes: 4f738adba30a ("bpf: create tcp_bpf_ulp allowing BPF to monitor socket TX/RX data") Fixes: 2dbb9b9e6df6 ("bpf: Introduce BPF_PROG_TYPE_SK_REUSEPORT") Reported-by: David S. Miller Signed-off-by: Daniel Borkmann Acked-by: David S. Miller Tested-by: David S. Miller Signed-off-by: Alexei Starovoitov commit 6584297b78b66acb80917b664084f303317fcff1 Author: Paul Burton Date: Fri Nov 30 11:57:22 2018 -0800 MAINTAINERS: Update linux-mips mailing list address The linux-mips.org infrastructure has been unreliable recently & nobody with sufficient access to fix it is around to do so. As a result we're moving away from it, and part of this is migrating our mailing list to kernel.org. Replace all instances of linux-mips@linux-mips.org in MAINTAINERS with the shiny new linux-mips@vger.kernel.org address. The new list is now being archived on kernel.org at https://lore.kernel.org/linux-mips/ which also holds the history of the old linux-mips.org list. Signed-off-by: Paul Burton Cc: linux-mips@vger.kernel.org Cc: linux-mips@linux-mips.org commit 164f7e586739d07eb56af6f6d66acebb11f315c8 Author: Pan Bian Date: Fri Nov 30 14:10:54 2018 -0800 ocfs2: fix potential use after free ocfs2_get_dentry() calls iput(inode) to drop the reference count of inode, and if the reference count hits 0, inode is freed. However, in this function, it then reads inode->i_generation, which may result in a use after free bug. Move the put operation later. Link: http://lkml.kernel.org/r/1543109237-110227-1-git-send-email-bianpan2016@163.com Fixes: 781f200cb7a("ocfs2: Remove masklog ML_EXPORT.") Signed-off-by: Pan Bian 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 95feeabb77149f7d48f05bde61d75621c57db67e Author: Hugh Dickins Date: Fri Nov 30 14:10:50 2018 -0800 mm/khugepaged: fix the xas_create_range() error path collapse_shmem()'s xas_nomem() is very unlikely to fail, but it is rightly given a failure path, so move the whole xas_create_range() block up before __SetPageLocked(new_page): so that it does not need to remember to unlock_page(new_page). Add the missing mem_cgroup_cancel_charge(), and set (currently unused) result to SCAN_FAIL rather than SCAN_SUCCEED. Link: http://lkml.kernel.org/r/alpine.LSU.2.11.1811261531200.2275@eggly.anvils Fixes: 77da9389b9d5 ("mm: Convert collapse_shmem to XArray") Signed-off-by: Hugh Dickins Cc: Matthew Wilcox Cc: Kirill A. Shutemov Cc: Jerome Glisse Cc: Konstantin Khlebnikov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 06a5e1268a5fb9c2b346a3da6b97e85f2eba0f07 Author: Hugh Dickins Date: Fri Nov 30 14:10:47 2018 -0800 mm/khugepaged: collapse_shmem() do not crash on Compound collapse_shmem()'s VM_BUG_ON_PAGE(PageTransCompound) was unsafe: before it holds page lock of the first page, racing truncation then extension might conceivably have inserted a hugepage there already. Fail with the SCAN_PAGE_COMPOUND result, instead of crashing (CONFIG_DEBUG_VM=y) or otherwise mishandling the unexpected hugepage - though later we might code up a more constructive way of handling it, with SCAN_SUCCESS. Link: http://lkml.kernel.org/r/alpine.LSU.2.11.1811261529310.2275@eggly.anvils Fixes: f3f0e1d2150b2 ("khugepaged: add support of collapse for tmpfs/shmem pages") Signed-off-by: Hugh Dickins Cc: Kirill A. Shutemov Cc: Jerome Glisse Cc: Konstantin Khlebnikov Cc: Matthew Wilcox Cc: [4.8+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 87c460a0bded56195b5eb497d44709777ef7b415 Author: Hugh Dickins Date: Fri Nov 30 14:10:43 2018 -0800 mm/khugepaged: collapse_shmem() without freezing new_page khugepaged's collapse_shmem() does almost all of its work, to assemble the huge new_page from 512 scattered old pages, with the new_page's refcount frozen to 0 (and refcounts of all old pages so far also frozen to 0). Including shmem_getpage() to read in any which were out on swap, memory reclaim if necessary to allocate their intermediate pages, and copying over all the data from old to new. Imagine the frozen refcount as a spinlock held, but without any lock debugging to highlight the abuse: it's not good, and under serious load heads into lockups - speculative getters of the page are not expecting to spin while khugepaged is rescheduled. One can get a little further under load by hacking around elsewhere; but fortunately, freezing the new_page turns out to have been entirely unnecessary, with no hacks needed elsewhere. The huge new_page lock is already held throughout, and guards all its subpages as they are brought one by one into the page cache tree; and anything reading the data in that page, without the lock, before it has been marked PageUptodate, would already be in the wrong. So simply eliminate the freezing of the new_page. Each of the old pages remains frozen with refcount 0 after it has been replaced by a new_page subpage in the page cache tree, until they are all unfrozen on success or failure: just as before. They could be unfrozen sooner, but cause no problem once no longer visible to find_get_entry(), filemap_map_pages() and other speculative lookups. Link: http://lkml.kernel.org/r/alpine.LSU.2.11.1811261527570.2275@eggly.anvils Fixes: f3f0e1d2150b2 ("khugepaged: add support of collapse for tmpfs/shmem pages") Signed-off-by: Hugh Dickins Acked-by: Kirill A. Shutemov Cc: Jerome Glisse Cc: Konstantin Khlebnikov Cc: Matthew Wilcox Cc: [4.8+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 042a30824871fa3149b0127009074b75cc25863c Author: Hugh Dickins Date: Fri Nov 30 14:10:39 2018 -0800 mm/khugepaged: minor reorderings in collapse_shmem() Several cleanups in collapse_shmem(): most of which probably do not really matter, beyond doing things in a more familiar and reassuring order. Simplify the failure gotos in the main loop, and on success update stats while interrupts still disabled from the last iteration. Link: http://lkml.kernel.org/r/alpine.LSU.2.11.1811261526400.2275@eggly.anvils Fixes: f3f0e1d2150b2 ("khugepaged: add support of collapse for tmpfs/shmem pages") Signed-off-by: Hugh Dickins Acked-by: Kirill A. Shutemov Cc: Jerome Glisse Cc: Konstantin Khlebnikov Cc: Matthew Wilcox Cc: [4.8+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2af8ff291848cc4b1cce24b6c943394eb2c761e8 Author: Hugh Dickins Date: Fri Nov 30 14:10:35 2018 -0800 mm/khugepaged: collapse_shmem() remember to clear holes Huge tmpfs testing reminds us that there is no __GFP_ZERO in the gfp flags khugepaged uses to allocate a huge page - in all common cases it would just be a waste of effort - so collapse_shmem() must remember to clear out any holes that it instantiates. The obvious place to do so, where they are put into the page cache tree, is not a good choice: because interrupts are disabled there. Leave it until further down, once success is assured, where the other pages are copied (before setting PageUptodate). Link: http://lkml.kernel.org/r/alpine.LSU.2.11.1811261525080.2275@eggly.anvils Fixes: f3f0e1d2150b2 ("khugepaged: add support of collapse for tmpfs/shmem pages") Signed-off-by: Hugh Dickins Acked-by: Kirill A. Shutemov Cc: Jerome Glisse Cc: Konstantin Khlebnikov Cc: Matthew Wilcox Cc: [4.8+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit aaa52e340073b7f4593b3c4ddafcafa70cf838b5 Author: Hugh Dickins Date: Fri Nov 30 14:10:29 2018 -0800 mm/khugepaged: fix crashes due to misaccounted holes Huge tmpfs testing on a shortish file mapped into a pmd-rounded extent hit shmem_evict_inode()'s WARN_ON(inode->i_blocks) followed by clear_inode()'s BUG_ON(inode->i_data.nrpages) when the file was later closed and unlinked. khugepaged's collapse_shmem() was forgetting to update mapping->nrpages on the rollback path, after it had added but then needs to undo some holes. There is indeed an irritating asymmetry between shmem_charge(), whose callers want it to increment nrpages after successfully accounting blocks, and shmem_uncharge(), when __delete_from_page_cache() already decremented nrpages itself: oh well, just add a comment on that to them both. And shmem_recalc_inode() is supposed to be called when the accounting is expected to be in balance (so it can deduce from imbalance that reclaim discarded some pages): so change shmem_charge() to update nrpages earlier (though it's rare for the difference to matter at all). Link: http://lkml.kernel.org/r/alpine.LSU.2.11.1811261523450.2275@eggly.anvils Fixes: 800d8c63b2e98 ("shmem: add huge pages support") Fixes: f3f0e1d2150b2 ("khugepaged: add support of collapse for tmpfs/shmem pages") Signed-off-by: Hugh Dickins Acked-by: Kirill A. Shutemov Cc: Jerome Glisse Cc: Konstantin Khlebnikov Cc: Matthew Wilcox Cc: [4.8+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 701270fa193aadf00bdcf607738f64997275d4c7 Author: Hugh Dickins Date: Fri Nov 30 14:10:25 2018 -0800 mm/khugepaged: collapse_shmem() stop if punched or truncated Huge tmpfs testing showed that although collapse_shmem() recognizes a concurrently truncated or hole-punched page correctly, its handling of holes was liable to refill an emptied extent. Add check to stop that. Link: http://lkml.kernel.org/r/alpine.LSU.2.11.1811261522040.2275@eggly.anvils Fixes: f3f0e1d2150b2 ("khugepaged: add support of collapse for tmpfs/shmem pages") Signed-off-by: Hugh Dickins Reviewed-by: Matthew Wilcox Cc: Kirill A. Shutemov Cc: Jerome Glisse Cc: Konstantin Khlebnikov Cc: [4.8+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 006d3ff27e884f80bd7d306b041afc415f63598f Author: Hugh Dickins Date: Fri Nov 30 14:10:21 2018 -0800 mm/huge_memory: fix lockdep complaint on 32-bit i_size_read() Huge tmpfs testing, on 32-bit kernel with lockdep enabled, showed that __split_huge_page() was using i_size_read() while holding the irq-safe lru_lock and page tree lock, but the 32-bit i_size_read() uses an irq-unsafe seqlock which should not be nested inside them. Instead, read the i_size earlier in split_huge_page_to_list(), and pass the end offset down to __split_huge_page(): all while holding head page lock, which is enough to prevent truncation of that extent before the page tree lock has been taken. Link: http://lkml.kernel.org/r/alpine.LSU.2.11.1811261520070.2275@eggly.anvils Fixes: baa355fd33142 ("thp: file pages support for split_huge_page()") Signed-off-by: Hugh Dickins Acked-by: Kirill A. Shutemov Cc: Jerome Glisse Cc: Konstantin Khlebnikov Cc: Matthew Wilcox Cc: [4.8+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 173d9d9fd3ddae84c110fea8aedf1f26af6be9ec Author: Hugh Dickins Date: Fri Nov 30 14:10:16 2018 -0800 mm/huge_memory: splitting set mapping+index before unfreeze Huge tmpfs stress testing has occasionally hit shmem_undo_range()'s VM_BUG_ON_PAGE(page_to_pgoff(page) != index, page). Move the setting of mapping and index up before the page_ref_unfreeze() in __split_huge_page_tail() to fix this: so that a page cache lookup cannot get a reference while the tail's mapping and index are unstable. In fact, might as well move them up before the smp_wmb(): I don't see an actual need for that, but if I'm missing something, this way round is safer than the other, and no less efficient. You might argue that VM_BUG_ON_PAGE(page_to_pgoff(page) != index, page) is misplaced, and should be left until after the trylock_page(); but left as is has not crashed since, and gives more stringent assurance. Link: http://lkml.kernel.org/r/alpine.LSU.2.11.1811261516380.2275@eggly.anvils Fixes: e9b61f19858a5 ("thp: reintroduce split_huge_page()") Requires: 605ca5ede764 ("mm/huge_memory.c: reorder operations in __split_huge_page_tail()") Signed-off-by: Hugh Dickins Acked-by: Kirill A. Shutemov Cc: Konstantin Khlebnikov Cc: Jerome Glisse Cc: Matthew Wilcox Cc: [4.8+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 906f9cdfc2a0800f13683f9e4ebdfd08c12ee81b Author: Hugh Dickins Date: Fri Nov 30 14:10:13 2018 -0800 mm/huge_memory: rename freeze_page() to unmap_page() The term "freeze" is used in several ways in the kernel, and in mm it has the particular meaning of forcing page refcount temporarily to 0. freeze_page() is just too confusing a name for a function that unmaps a page: rename it unmap_page(), and rename unfreeze_page() remap_page(). Went to change the mention of freeze_page() added later in mm/rmap.c, but found it to be incorrect: ordinary page reclaim reaches there too; but the substance of the comment still seems correct, so edit it down. Link: http://lkml.kernel.org/r/alpine.LSU.2.11.1811261514080.2275@eggly.anvils Fixes: e9b61f19858a5 ("thp: reintroduce split_huge_page()") Signed-off-by: Hugh Dickins Acked-by: Kirill A. Shutemov Cc: Jerome Glisse Cc: Konstantin Khlebnikov Cc: Matthew Wilcox Cc: [4.8+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7c0950d455d6ab610d2990a13120f935b75abf2c Author: Li Zhijian Date: Fri Nov 30 14:10:09 2018 -0800 initramfs: clean old path before creating a hardlink sys_link() can fail due to the new path already existing. This case ofen occurs when we use a concated initrd, for example: 1) prepare a basic rootfs, it contains a regular files rc.local lizhijian@:~/yocto-tiny-i386-2016-04-22$ cat etc/rc.local #!/bin/sh echo "Running /etc/rc.local..." yocto-tiny-i386-2016-04-22$ find . | sed 's,^\./,,' | cpio -o -H newc | gzip -n -9 >../rootfs.cgz 2) create a extra initrd which also includes a etc/rc.local lizhijian@:~/lkp-x86_64/etc$ echo "append initrd" >rc.local lizhijian@:~/lkp/lkp-x86_64/etc$ cat rc.local append initrd lizhijian@:~/lkp/lkp-x86_64/etc$ ln rc.local rc.local.hardlink append initrd lizhijian@:~/lkp/lkp-x86_64/etc$ stat rc.local rc.local.hardlink File: 'rc.local' Size: 14 Blocks: 8 IO Block: 4096 regular file Device: 801h/2049d Inode: 11296086 Links: 2 Access: (0664/-rw-rw-r--) Uid: ( 1002/lizhijian) Gid: ( 1002/lizhijian) Access: 2018-11-15 16:08:28.654464815 +0800 Modify: 2018-11-15 16:07:57.514903210 +0800 Change: 2018-11-15 16:08:24.180228872 +0800 Birth: - File: 'rc.local.hardlink' Size: 14 Blocks: 8 IO Block: 4096 regular file Device: 801h/2049d Inode: 11296086 Links: 2 Access: (0664/-rw-rw-r--) Uid: ( 1002/lizhijian) Gid: ( 1002/lizhijian) Access: 2018-11-15 16:08:28.654464815 +0800 Modify: 2018-11-15 16:07:57.514903210 +0800 Change: 2018-11-15 16:08:24.180228872 +0800 Birth: - lizhijian@:~/lkp/lkp-x86_64$ find . | sed 's,^\./,,' | cpio -o -H newc | gzip -n -9 >../rc-local.cgz lizhijian@:~/lkp/lkp-x86_64$ gzip -dc ../rc-local.cgz | cpio -t . etc etc/rc.local.hardlink <<< it will be extracted first at this initrd etc/rc.local 3) concate 2 initrds and boot lizhijian@:~/lkp$ cat rootfs.cgz rc-local.cgz >concate-initrd.cgz lizhijian@:~/lkp$ qemu-system-x86_64 -nographic -enable-kvm -cpu host -smp 1 -m 1024 -kernel ~/lkp/linux/arch/x86/boot/bzImage -append "console=ttyS0 earlyprint=ttyS0 ignore_loglevel" -initrd ./concate-initr.cgz -serial stdio -nodefaults In this case, sys_link(2) will fail and return -EEXIST, so we can only get the rc.local at rootfs.cgz instead of rc-local.cgz [akpm@linux-foundation.org: move code to avoid forward declaration] Link: http://lkml.kernel.org/r/1542352368-13299-1-git-send-email-lizhijian@cn.fujitsu.com Signed-off-by: Li Zhijian Cc: Philip Li Cc: Dominik Brodowski Cc: Li Zhijian Cc: Al Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 903e8ff86753e6f327bb92166a0665e4ecb8e2e7 Author: Anders Roxell Date: Fri Nov 30 14:10:05 2018 -0800 kernel/kcov.c: mark funcs in __sanitizer_cov_trace_pc() as notrace Since __sanitizer_cov_trace_pc() is marked as notrace, function calls in __sanitizer_cov_trace_pc() shouldn't be traced either. ftrace_graph_caller() gets called for each function that isn't marked 'notrace', like canonicalize_ip(). This is the call trace from a run: [ 139.644550] ftrace_graph_caller+0x1c/0x24 [ 139.648352] canonicalize_ip+0x18/0x28 [ 139.652313] __sanitizer_cov_trace_pc+0x14/0x58 [ 139.656184] sched_clock+0x34/0x1e8 [ 139.659759] trace_clock_local+0x40/0x88 [ 139.663722] ftrace_push_return_trace+0x8c/0x1f0 [ 139.667767] prepare_ftrace_return+0xa8/0x100 [ 139.671709] ftrace_graph_caller+0x1c/0x24 Rework so that check_kcov_mode() and canonicalize_ip() that are called from __sanitizer_cov_trace_pc() are also marked as notrace. Link: http://lkml.kernel.org/r/20181128081239.18317-1-anders.roxell@linaro.org Signed-off-by: Arnd Bergmann Signen-off-by: Anders Roxell Co-developed-by: Arnd Bergmann Acked-by: Steven Rostedt (VMware) Cc: Dmitry Vyukov Cc: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e0c274472d5d27f277af722e017525e0b33784cd Author: Johannes Weiner Date: Fri Nov 30 14:09:58 2018 -0800 psi: make disabling/enabling easier for vendor kernels Mel Gorman reports a hackbench regression with psi that would prohibit shipping the suse kernel with it default-enabled, but he'd still like users to be able to opt in at little to no cost to others. With the current combination of CONFIG_PSI and the psi_disabled bool set from the commandline, this is a challenge. Do the following things to make it easier: 1. Add a config option CONFIG_PSI_DEFAULT_DISABLED that allows distros to enable CONFIG_PSI in their kernel but leave the feature disabled unless a user requests it at boot-time. To avoid double negatives, rename psi_disabled= to psi=. 2. Make psi_disabled a static branch to eliminate any branch costs when the feature is disabled. In terms of numbers before and after this patch, Mel says: : The following is a comparision using CONFIG_PSI=n as a baseline against : your patch and a vanilla kernel : : 4.20.0-rc4 4.20.0-rc4 4.20.0-rc4 : kconfigdisable-v1r1 vanilla psidisable-v1r1 : Amean 1 1.3100 ( 0.00%) 1.3923 ( -6.28%) 1.3427 ( -2.49%) : Amean 3 3.8860 ( 0.00%) 4.1230 * -6.10%* 3.8860 ( -0.00%) : Amean 5 6.8847 ( 0.00%) 8.0390 * -16.77%* 6.7727 ( 1.63%) : Amean 7 9.9310 ( 0.00%) 10.8367 * -9.12%* 9.9910 ( -0.60%) : Amean 12 16.6577 ( 0.00%) 18.2363 * -9.48%* 17.1083 ( -2.71%) : Amean 18 26.5133 ( 0.00%) 27.8833 * -5.17%* 25.7663 ( 2.82%) : Amean 24 34.3003 ( 0.00%) 34.6830 ( -1.12%) 32.0450 ( 6.58%) : Amean 30 40.0063 ( 0.00%) 40.5800 ( -1.43%) 41.5087 ( -3.76%) : Amean 32 40.1407 ( 0.00%) 41.2273 ( -2.71%) 39.9417 ( 0.50%) : : It's showing that the vanilla kernel takes a hit (as the bisection : indicated it would) and that disabling PSI by default is reasonably : close in terms of performance for this particular workload on this : particular machine so; Link: http://lkml.kernel.org/r/20181127165329.GA29728@cmpxchg.org Signed-off-by: Johannes Weiner Tested-by: Mel Gorman Reported-by: Mel Gorman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit dbd4af54745fc0c805217693c807a3928b2d408b Author: Alexey Dobriyan Date: Fri Nov 30 14:09:53 2018 -0800 proc: fixup map_files test on arm https://bugs.linaro.org/show_bug.cgi?id=3782 Turns out arm doesn't permit mapping address 0, so try minimum virtual address instead. Link: http://lkml.kernel.org/r/20181113165446.GA28157@avx2 Signed-off-by: Alexey Dobriyan Reported-by: Rafael David Tinoco Tested-by: Rafael David Tinoco Acked-by: Cyrill Gorcunov Cc: Shuah Khan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8de456cf87ba863e028c4dd01bae44255ce3d835 Author: Qian Cai Date: Fri Nov 30 14:09:48 2018 -0800 debugobjects: avoid recursive calls with kmemleak CONFIG_DEBUG_OBJECTS_RCU_HEAD does not play well with kmemleak due to recursive calls. fill_pool kmemleak_ignore make_black_object put_object __call_rcu (kernel/rcu/tree.c) debug_rcu_head_queue debug_object_activate debug_object_init fill_pool kmemleak_ignore make_black_object ... So add SLAB_NOLEAKTRACE to kmem_cache_create() to not register newly allocated debug objects at all. Link: http://lkml.kernel.org/r/20181126165343.2339-1-cai@gmx.us Signed-off-by: Qian Cai Suggested-by: Catalin Marinas Acked-by: Waiman Long Acked-by: Catalin Marinas Cc: Thomas Gleixner Cc: Yang Shi Cc: Arnd Bergmann Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit dcf7fe9d89763a28e0f43975b422ff141fe79e43 Author: Andrea Arcangeli Date: Fri Nov 30 14:09:43 2018 -0800 userfaultfd: shmem: UFFDIO_COPY: set the page dirty if VM_WRITE is not set Set the page dirty if VM_WRITE is not set because in such case the pte won't be marked dirty and the page would be reclaimed without writepage (i.e. swapout in the shmem case). This was found by source review. Most apps (certainly including QEMU) only use UFFDIO_COPY on PROT_READ|PROT_WRITE mappings or the app can't modify the memory in the first place. This is for correctness and it could help the non cooperative use case to avoid unexpected data loss. Link: http://lkml.kernel.org/r/20181126173452.26955-6-aarcange@redhat.com Reviewed-by: Hugh Dickins Cc: stable@vger.kernel.org Fixes: 4c27fe4c4c84 ("userfaultfd: shmem: add shmem_mcopy_atomic_pte for userfaultfd support") Reported-by: Hugh Dickins Signed-off-by: Andrea Arcangeli Cc: "Dr. David Alan Gilbert" Cc: Jann Horn Cc: Mike Kravetz Cc: Mike Rapoport Cc: Peter Xu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e2a50c1f64145a04959df2442305d57307e5395a Author: Andrea Arcangeli Date: Fri Nov 30 14:09:37 2018 -0800 userfaultfd: shmem: add i_size checks With MAP_SHARED: recheck the i_size after taking the PT lock, to serialize against truncate with the PT lock. Delete the page from the pagecache if the i_size_read check fails. With MAP_PRIVATE: check the i_size after the PT lock before mapping anonymous memory or zeropages into the MAP_PRIVATE shmem mapping. A mostly irrelevant cleanup: like we do the delete_from_page_cache() pagecache removal after dropping the PT lock, the PT lock is a spinlock so drop it before the sleepable page lock. Link: http://lkml.kernel.org/r/20181126173452.26955-5-aarcange@redhat.com Fixes: 4c27fe4c4c84 ("userfaultfd: shmem: add shmem_mcopy_atomic_pte for userfaultfd support") Signed-off-by: Andrea Arcangeli Reviewed-by: Mike Rapoport Reviewed-by: Hugh Dickins Reported-by: Jann Horn Cc: Cc: "Dr. David Alan Gilbert" Cc: Mike Kravetz Cc: Peter Xu Cc: stable@vger.kernel.org Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 29ec90660d68bbdd69507c1c8b4e33aa299278b1 Author: Andrea Arcangeli Date: Fri Nov 30 14:09:32 2018 -0800 userfaultfd: shmem/hugetlbfs: only allow to register VM_MAYWRITE vmas After the VMA to register the uffd onto is found, check that it has VM_MAYWRITE set before allowing registration. This way we inherit all common code checks before allowing to fill file holes in shmem and hugetlbfs with UFFDIO_COPY. The userfaultfd memory model is not applicable for readonly files unless it's a MAP_PRIVATE. Link: http://lkml.kernel.org/r/20181126173452.26955-4-aarcange@redhat.com Fixes: ff62a3421044 ("hugetlb: implement memfd sealing") Signed-off-by: Andrea Arcangeli Reviewed-by: Mike Rapoport Reviewed-by: Hugh Dickins Reported-by: Jann Horn Fixes: 4c27fe4c4c84 ("userfaultfd: shmem: add shmem_mcopy_atomic_pte for userfaultfd support") Cc: Cc: "Dr. David Alan Gilbert" Cc: Mike Kravetz Cc: Peter Xu Cc: stable@vger.kernel.org Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5b51072e97d587186c2f5390c8c9c1fb7e179505 Author: Andrea Arcangeli Date: Fri Nov 30 14:09:28 2018 -0800 userfaultfd: shmem: allocate anonymous memory for MAP_PRIVATE shmem Userfaultfd did not create private memory when UFFDIO_COPY was invoked on a MAP_PRIVATE shmem mapping. Instead it wrote to the shmem file, even when that had not been opened for writing. Though, fortunately, that could only happen where there was a hole in the file. Fix the shmem-backed implementation of UFFDIO_COPY to create private memory for MAP_PRIVATE mappings. The hugetlbfs-backed implementation was already correct. This change is visible to userland, if userfaultfd has been used in unintended ways: so it introduces a small risk of incompatibility, but is necessary in order to respect file permissions. An app that uses UFFDIO_COPY for anything like postcopy live migration won't notice the difference, and in fact it'll run faster because there will be no copy-on-write and memory waste in the tmpfs pagecache anymore. Userfaults on MAP_PRIVATE shmem keep triggering only on file holes like before. The real zeropage can also be built on a MAP_PRIVATE shmem mapping through UFFDIO_ZEROPAGE and that's safe because the zeropage pte is never dirty, in turn even an mprotect upgrading the vma permission from PROT_READ to PROT_READ|PROT_WRITE won't make the zeropage pte writable. Link: http://lkml.kernel.org/r/20181126173452.26955-3-aarcange@redhat.com Fixes: 4c27fe4c4c84 ("userfaultfd: shmem: add shmem_mcopy_atomic_pte for userfaultfd support") Signed-off-by: Andrea Arcangeli Reported-by: Mike Rapoport Reviewed-by: Hugh Dickins Cc: Cc: "Dr. David Alan Gilbert" Cc: Jann Horn Cc: Mike Kravetz Cc: Peter Xu Cc: stable@vger.kernel.org Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9e368259ad988356c4c95150fafd1a06af095d98 Author: Andrea Arcangeli Date: Fri Nov 30 14:09:25 2018 -0800 userfaultfd: use ENOENT instead of EFAULT if the atomic copy user fails Patch series "userfaultfd shmem updates". Jann found two bugs in the userfaultfd shmem MAP_SHARED backend: the lack of the VM_MAYWRITE check and the lack of i_size checks. Then looking into the above we also fixed the MAP_PRIVATE case. Hugh by source review also found a data loss source if UFFDIO_COPY is used on shmem MAP_SHARED PROT_READ mappings (the production usages incidentally run with PROT_READ|PROT_WRITE, so the data loss couldn't happen in those production usages like with QEMU). The whole patchset is marked for stable. We verified QEMU postcopy live migration with guest running on shmem MAP_PRIVATE run as well as before after the fix of shmem MAP_PRIVATE. Regardless if it's shmem or hugetlbfs or MAP_PRIVATE or MAP_SHARED, QEMU unconditionally invokes a punch hole if the guest mapping is filebacked and a MADV_DONTNEED too (needed to get rid of the MAP_PRIVATE COWs and for the anon backend). This patch (of 5): We internally used EFAULT to communicate with the caller, switch to ENOENT, so EFAULT can be used as a non internal retval. Link: http://lkml.kernel.org/r/20181126173452.26955-2-aarcange@redhat.com Fixes: 4c27fe4c4c84 ("userfaultfd: shmem: add shmem_mcopy_atomic_pte for userfaultfd support") Signed-off-by: Andrea Arcangeli Reviewed-by: Mike Rapoport Reviewed-by: Hugh Dickins Cc: Mike Kravetz Cc: Jann Horn Cc: Peter Xu Cc: "Dr. David Alan Gilbert" Cc: Cc: stable@vger.kernel.org Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5618cf031fecda63847cafd1091e7b8bd626cdb1 Author: Luis Chamberlain Date: Fri Nov 30 14:09:21 2018 -0800 lib/test_kmod.c: fix rmmod double free We free the misc device string twice on rmmod; fix this. Without this we cannot remove the module without crashing. Link: http://lkml.kernel.org/r/20181124050500.5257-1-mcgrof@kernel.org Signed-off-by: Luis Chamberlain Reported-by: Randy Dunlap Reviewed-by: Andrew Morton Cc: [4.12+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c7d7d620dcbd2a1c595092280ca943f2fced7bbd Author: Pan Bian Date: Fri Nov 30 14:09:18 2018 -0800 hfsplus: do not free node before using hfs_bmap_free() frees node via hfs_bnode_put(node). However it then reads node->this when dumping error message on an error path, which may result in a use-after-free bug. This patch frees node only when it is never used. Link: http://lkml.kernel.org/r/1543053441-66942-1-git-send-email-bianpan2016@163.com Signed-off-by: Pan Bian Reviewed-by: Andrew Morton Cc: Ernesto A. Fernandez Cc: Joe Perches Cc: Viacheslav Dubeyko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ce96a407adef126870b3f4a1b73529dd8aa80f49 Author: Pan Bian Date: Fri Nov 30 14:09:14 2018 -0800 hfs: do not free node before using hfs_bmap_free() frees the node via hfs_bnode_put(node). However, it then reads node->this when dumping error message on an error path, which may result in a use-after-free bug. This patch frees the node only when it is never again used. Link: http://lkml.kernel.org/r/1542963889-128825-1-git-send-email-bianpan2016@163.com Fixes: a1185ffa2fc ("HFS rewrite") Signed-off-by: Pan Bian Reviewed-by: Andrew Morton Cc: Joe Perches Cc: Ernesto A. Fernandez Cc: Viacheslav Dubeyko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 94570a413f01dda8938d980d36814eee295d2a58 Author: Alexey Dobriyan Date: Fri Nov 30 14:09:10 2018 -0800 proc: update MAINTAINERS with proc.txt Turns out that /proc has official documentation and people even trying to keep it uptodate. Link: http://lkml.kernel.org/r/20181116134630.GA8004@avx2 Signed-off-by: Alexey Dobriyan Reviewed-by: Andrew Morton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8f416836c0d50b198cad1225132e5abebf8980dc Author: Wei Yang Date: Fri Nov 30 14:09:07 2018 -0800 mm/page_alloc.c: fix calculation of pgdat->nr_zones init_currently_empty_zone() will adjust pgdat->nr_zones and set it to 'zone_idx(zone) + 1' unconditionally. This is correct in the normal case, while not exact in hot-plug situation. This function is used in two places: * free_area_init_core() * move_pfn_range_to_zone() In the first case, we are sure zone index increase monotonically. While in the second one, this is under users control. One way to reproduce this is: ---------------------------- 1. create a virtual machine with empty node1 -m 4G,slots=32,maxmem=32G \ -smp 4,maxcpus=8 \ -numa node,nodeid=0,mem=4G,cpus=0-3 \ -numa node,nodeid=1,mem=0G,cpus=4-7 2. hot-add cpu 3-7 cpu-add [3-7] 2. hot-add memory to nod1 object_add memory-backend-ram,id=ram0,size=1G device_add pc-dimm,id=dimm0,memdev=ram0,node=1 3. online memory with following order echo online_movable > memory47/state echo online > memory40/state After this, node1 will have its nr_zones equals to (ZONE_NORMAL + 1) instead of (ZONE_MOVABLE + 1). Michal said: "Having an incorrect nr_zones might result in all sorts of problems which would be quite hard to debug (e.g. reclaim not considering the movable zone). I do not expect many users would suffer from this it but still this is trivial and obviously right thing to do so backporting to the stable tree shouldn't be harmful (last famous words)" Link: http://lkml.kernel.org/r/20181117022022.9956-1-richard.weiyang@gmail.com Fixes: f1dd2cd13c4b ("mm, memory_hotplug: do not associate hotadded memory to zones until online") Signed-off-by: Wei Yang Acked-by: Michal Hocko Reviewed-by: Oscar Salvador Cc: Anshuman Khandual Cc: Dave Hansen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c1cb20d43728aa9b5393bd8d489bc85c142949b2 Author: Yu Zhao Date: Fri Nov 30 14:09:03 2018 -0800 mm: use swp_offset as key in shmem_replace_page() We changed the key of swap cache tree from swp_entry_t.val to swp_offset. We need to do so in shmem_replace_page() as well. Hugh said: "shmem_replace_page() has been wrong since the day I wrote it: good enough to work on swap "type" 0, which is all most people ever use (especially those few who need shmem_replace_page() at all), but broken once there are any non-0 swp_type bits set in the higher order bits" Link: http://lkml.kernel.org/r/20181121215442.138545-1-yuzhao@google.com Fixes: f6ab1f7f6b2d ("mm, swap: use offset of swap entry as key of swap cache") Signed-off-by: Yu Zhao Reviewed-by: Matthew Wilcox Acked-by: Hugh Dickins Cc: [4.9+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6ff38bd40230af35e446239396e5fc8ebd6a5248 Author: Pavel Tikhomirov Date: Fri Nov 30 14:09:00 2018 -0800 mm: cleancache: fix corruption on missed inode invalidation If all pages are deleted from the mapping by memory reclaim and also moved to the cleancache: __delete_from_page_cache (no shadow case) unaccount_page_cache_page cleancache_put_page page_cache_delete mapping->nrpages -= nr (nrpages becomes 0) We don't clean the cleancache for an inode after final file truncation (removal). truncate_inode_pages_final check (nrpages || nrexceptional) is false no truncate_inode_pages no cleancache_invalidate_inode(mapping) These way when reading the new file created with same inode we may get these trash leftover pages from cleancache and see wrong data instead of the contents of the new file. Fix it by always doing truncate_inode_pages which is already ready for nrpages == 0 && nrexceptional == 0 case and just invalidates inode. [akpm@linux-foundation.org: add comment, per Jan] Link: http://lkml.kernel.org/r/20181112095734.17979-1-ptikhomirov@virtuozzo.com Fixes: commit 91b0abe36a7b ("mm + fs: store shadow entries in page cache") Signed-off-by: Pavel Tikhomirov Reviewed-by: Vasily Averin Reviewed-by: Andrey Ryabinin Reviewed-by: Jan Kara Cc: Johannes Weiner Cc: Mel Gorman Cc: Matthew Wilcox Cc: Andi Kleen Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e21e57445a64598b29a6f629688f9b9a39e7242a Author: Larry Chen Date: Fri Nov 30 14:08:56 2018 -0800 ocfs2: fix deadlock caused by ocfs2_defrag_extent() ocfs2_defrag_extent may fall into deadlock. ocfs2_ioctl_move_extents ocfs2_ioctl_move_extents ocfs2_move_extents ocfs2_defrag_extent ocfs2_lock_allocators_move_extents ocfs2_reserve_clusters inode_lock GLOBAL_BITMAP_SYSTEM_INODE __ocfs2_flush_truncate_log inode_lock GLOBAL_BITMAP_SYSTEM_INODE As backtrace shows above, ocfs2_reserve_clusters() will call inode_lock against the global bitmap if local allocator has not sufficient cluters. Once global bitmap could meet the demand, ocfs2_reserve_cluster will return success with global bitmap locked. After ocfs2_reserve_cluster(), if truncate log is full, __ocfs2_flush_truncate_log() will definitely fall into deadlock because it needs to inode_lock global bitmap, which has already been locked. To fix this bug, we could remove from ocfs2_lock_allocators_move_extents() the code which intends to lock global allocator, and put the removed code after __ocfs2_flush_truncate_log(). ocfs2_lock_allocators_move_extents() is referred by 2 places, one is here, the other does not need the data allocator context, which means this patch does not affect the caller so far. Link: http://lkml.kernel.org/r/20181101071422.14470-1-lchen@suse.com Signed-off-by: Larry Chen Reviewed-by: Changwei Ge Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Joseph Qi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 08be37b798921af207e78082fe261a6ca8be5024 Author: John Hubbard Date: Fri Nov 30 14:08:53 2018 -0800 mm/gup: finish consolidating error handling Commit df06b37ffe5a ("mm/gup: cache dev_pagemap while pinning pages") attempted to operate on each page that get_user_pages had retrieved. In order to do that, it created a common exit point from the routine. However, one case was missed, which this patch fixes up. Also, there was still an unnecessary shadow declaration (with a different type) of the "ret" variable, which this patch removes. Keith's description of the situation is: This also fixes a potentially leaked dev_pagemap reference count if a failure occurs when an iteration crosses a vma boundary. I don't think it's normal to have different vma's on a users mapped zone device memory, but good to fix anyway. I actually thought that this code: /* first iteration or cross vma bound */ if (!vma || start >= vma->vm_end) { vma = find_extend_vma(mm, start); if (!vma && in_gate_area(mm, start)) { ret = get_gate_page(mm, start & PAGE_MASK, gup_flags, &vma, pages ? &pages[i] : NULL); if (ret) goto out; dealt with the "you're trying to pin the gate page, as part of this call", rather than the generic case of crossing a vma boundary. (I think there's a fine point that I must be overlooking.) But it's still a valid case, either way. Link: http://lkml.kernel.org/r/20181121081402.29641-2-jhubbard@nvidia.com Fixes: df06b37ffe5a4 ("mm/gup: cache dev_pagemap while pinning pages") Signed-off-by: John Hubbard Reviewed-by: Keith Busch Cc: Dan Williams Cc: Kirill A. Shutemov Cc: Dave Hansen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 12457e6391e000820bb0b2b775125a569c3e80ed Author: Luis Chamberlain Date: Fri Nov 30 14:08:49 2018 -0800 MAINTAINERS: name change for Luis My name has changed, works better than Global Entry I tell ya. Link: http://lkml.kernel.org/r/20181122003138.7752-1-mcgrof@kernel.org Signed-off-by: Luis Chamberlain Cc: Kees Cook Cc: Greg Kroah-Hartman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 38c7b224ce22c25fed04007839edf974bd13439d Author: Linus Torvalds Date: Fri Nov 30 14:45:01 2018 -0800 unifdef: use memcpy instead of strncpy New versions of gcc reasonably warn about the odd pattern of strncpy(p, q, strlen(q)); which really doesn't make sense: the strncpy() ends up being just a slow and odd way to write memcpy() in this case. There was a comment about _why_ the code used strncpy - to avoid the terminating NUL byte, but memcpy does the same and avoids the warning. Signed-off-by: Linus Torvalds commit c01ac66b38660f2b507ccd0b75d28e3002d56fbb 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 b5f0cf08340090d1503dbdbfd797e32264974100 Author: John Hurley Date: Tue Nov 27 14:04:12 2018 -0800 nfp: flower: prevent offload if rhashtable insert fails For flow offload adds, if the rhash insert code fails, the flow will still have been offloaded but the reference to it in the driver freed. Re-order the offload setup calls to ensure that a flow will only be written to FW if a kernel reference is held and stored in the rhashtable. Remove this hashtable entry if the offload fails. Fixes: c01d0efa5136 ("nfp: flower: use rhashtable for flow caching") Signed-off-by: John Hurley Reviewed-by: Pieter Jansen van Vuuren Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller commit 1166494891da88af25c444e65cd4f32c3e026b46 Author: John Hurley Date: Tue Nov 27 14:04:11 2018 -0800 nfp: flower: release metadata on offload failure Calling nfp_compile_flow_metadata both assigns a stats context and increments a ref counter on (or allocates) a mask id table entry. These are released by the nfp_modify_flow_metadata call on flow deletion, however, if a flow add fails after metadata is set then the flow entry will be deleted but the metadata assignments leaked. Add an error path to the flow add offload function to ensure allocated metadata is released in the event of an offload fail. Fixes: 81f3ddf2547d ("nfp: add control message passing capabilities to flower offloads") Signed-off-by: John Hurley Reviewed-by: Pieter Jansen van Vuuren Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller commit 3b5b3a3331d141e8f2a7aaae3a94dfa1e61ecbe4 Author: Toni Peltonen Date: Tue Nov 27 16:56:57 2018 +0200 bonding: fix 802.3ad state sent to partner when unbinding slave Previously when unbinding a slave the 802.3ad implementation only told partner that the port is not suitable for aggregation by setting the port aggregation state from aggregatable to individual. This is not enough. If the physical layer still stays up and we only unbinded this port from the bond there is nothing in the aggregation status alone to prevent the partner from sending traffic towards us. To ensure that the partner doesn't consider this port at all anymore we should also disable collecting and distributing to signal that this actor is going away. Also clear AD_STATE_SYNCHRONIZATION to ensure partner exits collecting + distributing state. I have tested this behaviour againts Arista EOS switches with mlx5 cards (physical link stays up even when interface is down) and simulated the same situation virtually Linux <-> Linux with two network namespaces running two veth device pairs. In both cases setting aggregation to individual doesn't alone prevent traffic from being to sent towards this port given that the link stays up in partners end. Partner still keeps it's end in collecting + distributing state and continues until timeout is reached. In most cases this means we are losing the traffic partner sends towards our port while we wait for timeout. This is most visible with slow periodic time (LACP rate slow). Other open source implementations like Open VSwitch and libreswitch, and vendor implementations like Arista EOS, seem to disable collecting + distributing to when doing similar port disabling/detaching/removing change. With this patch kernel implementation would behave the same way and ensure partner doesn't consider our actor viable anymore. Signed-off-by: Toni Peltonen Signed-off-by: Jay Vosburgh Acked-by: Jonathan Toppins Signed-off-by: David S. Miller commit 37c4b91f955fdd5f4ad771956b97d35f1321098e Author: Dmitry Bogdanov Date: Tue Nov 27 14:51:17 2018 +0000 net: aquantia: fix rx checksum offload bits The last set of csum offload fixes had a leak: Checksum enabled status bits from rx descriptor were incorrectly interpreted. Consequently all the other valid logic worked on zero bits. That caused rx checksum offloads never to trigger. Tested by dumping rx descriptors and validating resulting csum_level. Reported-by: Igor Russkikh Signed-off-by: Dmitry Bogdanov Signed-off-by: Igor Russkikh Fixes: ad703c2b9127f ("net: aquantia: invalid checksumm offload implementation") Signed-off-by: David S. Miller commit 43d0e96022ae3c66743c01bba6c18a3afec7b578 Author: Colin Ian King Date: Tue Nov 27 14:37:17 2018 +0000 openvswitch: fix spelling mistake "execeeds" -> "exceeds" There is a spelling mistake in a net_warn_ratelimited message, fix this. Signed-off-by: Colin Ian King Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 56e0e295091dde5d0346fad08d3d8b6c07084c9d Author: Colin Ian King Date: Tue Nov 27 14:00:15 2018 +0000 liquidio: fix spelling mistake "deferal" -> "deferral" There is a spelling mistake in the oct_stats_strings array, fix it. Signed-off-by: Colin Ian King Signed-off-by: David S. Miller commit 5f2b8b62786853341a20d4cd4948f9cbca3db002 Author: Thierry Reding Date: Tue Nov 27 14:21:43 2018 +0100 net: stmmac: Move debugfs init/exit to ->probe()/->remove() Setting up and tearing down debugfs is current unbalanced, as seen by this error during resume from suspend: [ 752.134067] dwc-eth-dwmac 2490000.ethernet eth0: ERROR failed to create debugfs directory [ 752.134347] dwc-eth-dwmac 2490000.ethernet eth0: stmmac_hw_setup: failed debugFS registration The imbalance happens because the driver creates the debugfs hierarchy when the device is opened and tears it down when the device is closed. There's little gain in that, and it could be argued that it is even surprising because it's not usually done for other devices. Fix the imbalance by moving the debugfs creation and teardown to the driver's ->probe() and ->remove() implementations instead. Note that the ring descriptors cannot be read while the interface is down, so make sure to return an empty file when the descriptors_status debugfs file is read. Signed-off-by: Thierry Reding Acked-by: Jose Abreu Signed-off-by: David S. Miller commit 4135cce7fd0a0d755665c02728578c7c5afe4726 Author: Xin Long Date: Tue Nov 27 19:11:50 2018 +0800 sctp: update frag_point when stream_interleave is set sctp_assoc_update_frag_point() should be called whenever asoc->pathmtu changes, but we missed one place in sctp_association_init(). It would cause frag_point is zero when sending data. As says in Jakub's reproducer, if sp->pathmtu is set by socketopt, the new asoc->pathmtu inherits it in sctp_association_init(). Later when transports are added and their pmtu >= asoc->pathmtu, it will never call sctp_assoc_update_frag_point() to set frag_point. This patch is to fix it by updating frag_point after asoc->pathmtu is set as sp->pathmtu in sctp_association_init(). Note that it moved them after sctp_stream_init(), as stream->si needs to be set first. Frag_point's calculation is also related with datachunk's type, so it needs to update frag_point when stream->si may be changed in sctp_process_init(). v1->v2: - call sctp_assoc_update_frag_point() separately in sctp_process_init and sctp_association_init, per Marcelo's suggestion. Fixes: 2f5e3c9df693 ("sctp: introduce sctp_assoc_update_frag_point") Reported-by: Jakub Audykowicz Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Acked-by: Neil Horman Signed-off-by: David S. Miller commit b6839ef26e549de68c10359d45163b0cfb031183 Merge: d7aca8a78c8b 6484a677294a Author: Linus Torvalds Date: Fri Nov 30 12:43:17 2018 -0800 Merge tag 'char-misc-4.20-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char/misc fixes from Greg KH: "Here are a few small char/misc driver fixes for 4.20-rc5 that resolve a number of reported issues. The "largest" here is the thunderbolt patch, which resolves an issue with NVM upgrade, the smallest being some fsi driver fixes. There's also a hyperv bugfix, and the usual binder bugfixes. All of these have been in linux-next with no reported issues" * tag 'char-misc-4.20-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: misc: mic/scif: fix copy-paste error in scif_create_remote_lookup thunderbolt: Prevent root port runtime suspend during NVM upgrade Drivers: hv: vmbus: check the creation_status in vmbus_establish_gpadl() binder: fix race that allows malicious free of live buffer fsi: fsi-scom.c: Remove duplicate header fsi: master-ast-cf: select GENERIC_ALLOCATOR commit d7aca8a78c8bc5d3707691aab13cb4f7f6de696f Merge: cd9a0433238d a66d972465d1 Author: Linus Torvalds Date: Fri Nov 30 12:26:06 2018 -0800 Merge tag 'driver-core-4.20-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core fix from Greg KH: "Here is a single driver core fix for 4.20-rc5 It resolves an issue with the data alignment in 'struct devres' for the ARC platform. The full details are in the commit changelog, but the short summary is the change is a single line: - unsigned long long data[]; /* guarantee ull alignment */ + u8 __aligned(ARCH_KMALLOC_MINALIGN) data[]; This has been in linux-next for a while with no reported issues" * tag 'driver-core-4.20-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: devres: Align data[] to ARCH_KMALLOC_MINALIGN commit cd9a0433238da43611179e44b1d71ad24998b107 Merge: 40ebba2ad7e1 c648284f6c96 Author: Linus Torvalds Date: Fri Nov 30 12:23:44 2018 -0800 Merge tag 'staging-4.20-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging and IIO driver fixes from Greg KH: "Here are some small IIO and staging driver fixes for 4.20-rc5. Nothing major, the IIO fix ended up touching the HID drivers at the same time, but the HID maintainer acked it. The staging fixes are all minor patches for reported issues and regressions, full details are in the shortlog. All of these have been in linux-next for a while with no reported issues" * tag 'staging-4.20-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: iio/hid-sensors: Fix IIO_CHAN_INFO_RAW returning wrong values for signed numbers staging: vchiq_arm: fix compat VCHIQ_IOC_AWAIT_COMPLETION staging: mt7621-pinctrl: fix uninitialized variable ngroups staging: rtl8723bs: Add missing return for cfg80211_rtw_get_station staging: most: use format specifier "%s" in snprintf staging: rtl8723bs: Fix incorrect sense of ether_addr_equal staging: mt7621-dma: fix potentially dereferencing uninitialized 'tx_desc' staging: comedi: clarify/unify macros for NI macro-defined terminals drivers: staging: cedrus: find ctx before dereferencing it ctx staging: rtl8723bs: Fix the return value in case of error in 'rtw_wx_read32()' staging: comedi: ni_mio_common: scale ao INSN_CONFIG_GET_CMD_TIMING_CONSTRAINTS iio:st_magn: Fix enable device after trigger commit 40ebba2ad7e1a3f024479e633da5ca5694524767 Merge: da59f180d529 96ae93b46dbb Author: Linus Torvalds Date: Fri Nov 30 12:20:48 2018 -0800 Merge tag 'usb-4.20-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB/PHY driver fixes from Greg KH: "Here are some small USB and PHY driver fixes for 4.20-rc5 Nothing big at all, just the usual handful of USB fixes for reported issues, along with some gadget and PHY driver bug fixes. All of these have been in linux-next with no reported issues. Note, the USB gadget fixes were in linux-next on its own branch, not in mine, it just got merged into here yesterday and missed linux-next of today" * tag 'usb-4.20-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: usb: gadget: u_ether: fix unsafe list iteration USB: omap_udc: fix rejection of out transfers when DMA is used USB: omap_udc: fix USB gadget functionality on Palm Tungsten E USB: omap_udc: fix omap_udc_start() on 15xx machines USB: omap_udc: fix crashes on probe error and module removal USB: omap_udc: use devm_request_irq() usb: core: quirks: add RESET_RESUME quirk for Cherry G230 Stream series USB: usb-storage: Add new IDs to ums-realtek Revert "usb: dwc3: gadget: skip Set/Clear Halt when invalid" phy: qcom-qusb2: Fix HSTX_TRIM tuning with fused value for SDM845 phy: qcom-qusb2: Use HSTX_TRIM fused value as is dt-bindings: phy-qcom-qmp: Fix several mistakes from prior commits phy: uniphier-pcie: Depend on HAS_IOMEM commit da59f180d529fc78591e71acf2c67114b8eff10d Merge: b1286ed7158e 40b412897ccb Author: Linus Torvalds Date: Fri Nov 30 12:18:00 2018 -0800 Merge tag 'mtd/fixes-for-4.20-rc5' of git://git.infradead.org/linux-mtd Pull mtd fixes from Boris Brezillon: "NAND fix: - Fix BBT cache allocation done in nanddev_bbt_init() SPI NOR fixes: - Fix the erase type selection logic" * tag 'mtd/fixes-for-4.20-rc5' of git://git.infradead.org/linux-mtd: mtd: nand: Fix memory allocation in nanddev_bbt_init() mtd: spi-nor: fix erase_type array to indicate current map conf commit b1286ed7158e9b62787508066283ab0b8850b518 Author: Linus Torvalds Date: Fri Nov 30 12:13:15 2018 -0800 test_hexdump: use memcpy instead of strncpy New versions of gcc reasonably warn about the odd pattern of strncpy(p, q, strlen(q)); which really doesn't make sense: the strncpy() ends up being just a slow and odd way to write memcpy() in this case. Apparently there was a patch for this floating around earlier, but it got lost. Acked-again-by: Andy Shevchenko Signed-off-by: Linus Torvalds commit bfed4d730823440d0da0cd21554efc2de831627d Merge: 7e76e65ce7e9 512cab3e7e0b Author: Olof Johansson Date: Fri Nov 30 11:57:53 2018 -0800 Merge tag 'imx-fixes-4.20-2' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into fixes i.MX fixes for 4.20, round 2: - Reomve non-existing EEPROM device from imx51-zii-rdu1 board. It was added by mistake. * tag 'imx-fixes-4.20-2' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: ARM: dts: imx51-zii-rdu1: Remove EEPROM node Signed-off-by: Olof Johansson commit 7e76e65ce7e9405a9608e1b806be58a6cbf4a737 Author: Andy Gross Date: Thu Nov 29 16:31:06 2018 -0600 MAINTAINERS: Remove unused Qualcomm SoC mailing list This patch removes the linux-soc mailing list from the Qualcomm SoC entry. We use the linux-msm and there is no need to have the second one and this clears the list for use by others. Signed-off-by: Andy Gross Signed-off-by: Olof Johansson commit f6149484f050940c6ca9a6ca44aa3b2693e2931e Merge: 89acb56db497 91e43395820b Author: Olof Johansson Date: Fri Nov 30 11:56:50 2018 -0800 Merge tag 'omap-for-v4.20/fixes-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into fixes Few minor fixes for omaps for v4.20-rc cycle This set of fixes contains minor regression fixes for LogicPD dts files for MMC pinctrl and interrupts. There is also one section annotation fix that shows up with Clang, and a fix for an unitialized field for omap1. * tag 'omap-for-v4.20/fixes-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: OMAP1: ams-delta: Fix possible use of uninitialized field ARM: dts: am3517-som: Fix WL127x Wifi interrupt ARM: dts: logicpd-somlv: Fix interrupt on mmc3_dat1 ARM: dts: LogicPD Torpedo: Fix mmc3_dat1 interrupt ARM: dts: am3517: Fix pinmuxing for CD on MMC1 ARM: OMAP2+: prm44xx: Fix section annotation on omap44xx_prm_enable_io_wakeup Signed-off-by: Olof Johansson commit 89acb56db4979e55380839c815566ddb9a01949b Merge: adb97bcdbdb2 27df7977099c Author: Olof Johansson Date: Fri Nov 30 11:54:31 2018 -0800 Merge tag 'davinci-fixes-for-v4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci into fixes DaVinci: fix GPIO breakage after v4.19 This set of changes is needed to fix the broken GPIO support for DaVinci boards in legacy mode after certain changes made to the GPIO driver in 4.19, namely: commits 587f7a694f01 ("gpio: davinci: Use dev name for label and automatic base selection") and eb3744a2dd01 ("gpio: davinci: Do not assume continuous IRQ numbering"). * tag 'davinci-fixes-for-v4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci: ARM: davinci: dm644x: set the GPIO base to 0 ARM: davinci: da830: set the GPIO base to 0 ARM: davinci: dm355: set the GPIO base to 0 ARM: davinci: dm646x: set the GPIO base to 0 ARM: davinci: dm365: set the GPIO base to 0 ARM: davinci: da850: set the GPIO base to 0 gpio: davinci: restore a way to manually specify the GPIO base ARM: davinci: dm644x: define gpio interrupts as separate resources ARM: davinci: dm355: define gpio interrupts as separate resources ARM: davinci: dm646x: define gpio interrupts as separate resources ARM: davinci: dm365: define gpio interrupts as separate resources ARM: davinci: da8xx: define gpio interrupts as separate resources Signed-off-by: Olof Johansson commit adb97bcdbdb2d42c90b5f11e08a9b5fbc017e5d7 Merge: a8505b4e02b4 c1d91f86a1b4 Author: Olof Johansson Date: Fri Nov 30 11:50:14 2018 -0800 Merge tag 'v4.20-rockchip-dts64fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into fixes Removal of vdd_log regulator on rk960 to fix a stability issue and fixup of the pcie reset polarity on puma-haikou. * tag 'v4.20-rockchip-dts64fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: arm64: dts: rockchip: Fix PCIe reset polarity for rk3399-puma-haikou. arm64: dts: rockchip: remove vdd_log from rock960 to fix a stability issues Signed-off-by: Olof Johansson commit a8505b4e02b49368878ccb14fb295b25c1859665 Merge: 9f60337147f0 672e60b72bbe Author: Olof Johansson Date: Fri Nov 30 11:49:48 2018 -0800 Merge tag 'v4.20-rockchip-dts32fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into fixes Moving the veyron memory node from memory@0 back to memory, as the firmware on these devices as issues identifying the formally correct node. * tag 'v4.20-rockchip-dts32fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: ARM: dts: rockchip: Remove @0 from the veyron memory node Signed-off-by: Olof Johansson commit 9f60337147f02793f4ce009a99bbd4387b7de794 Merge: 63415a3c38dd 4ab7ca092c3c Author: Olof Johansson Date: Fri Nov 30 11:49:03 2018 -0800 Merge tag 'at91-4.20-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux into fixes AT91 fixes for 4.20 - Fix the SMC parent clock * tag 'at91-4.20-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux: ARM: dts: at91: sama5d2: use the divided clock for SMC Signed-off-by: Olof Johansson commit 1ec63573b2db363848abb313cc75eb29e9abc1b3 Merge: a1b3cf6d9438 60c8144afc28 Author: Linus Torvalds Date: Fri Nov 30 11:34:25 2018 -0800 Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Ingo Molnar: "Misc fixes: - MCE related boot crash fix on certain AMD systems - FPU exception handling fix - FPU handling race fix - revert+rewrite of the RSDP boot protocol extension, use boot_params instead - documentation fix" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/MCE/AMD: Fix the thresholding machinery initialization order x86/fpu: Use the correct exception table macro in the XSTATE_OP wrapper x86/fpu: Disable bottom halves while loading FPU registers x86/acpi, x86/boot: Take RSDP address from boot params if available x86/boot: Mostly revert commit ae7e1238e68f2a ("Add ACPI RSDP address to setup_header") x86/ptrace: Fix documentation for tracehook_report_syscall_entry() commit a1b3cf6d943800059adc262c4d839524c529db2d Merge: 8d9f412d51b8 09d3f015d1e1 Author: Linus Torvalds Date: Fri Nov 30 11:31:48 2018 -0800 Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf fixes from Ingo Molnar: "Misc fixes: - counter freezing related regression fix - uprobes race fix - Intel PMU unusual event combination fix - .. and diverse tooling fixes" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: uprobes: Fix handle_swbp() vs. unregister() + register() race once more perf/x86/intel: Disallow precise_ip on BTS events perf/x86/intel: Add generic branch tracing check to intel_pmu_has_bts() perf/x86/intel: Move branch tracing setup to the Intel-specific source file perf/x86/intel: Fix regression by default disabling perfmon v4 interrupt handling perf tools beauty ioctl: Support new ISO7816 commands tools uapi asm-generic: Synchronize ioctls.h tools arch x86: Update tools's copy of cpufeatures.h tools headers uapi: Synchronize i915_drm.h perf tools: Restore proper cwd on return from mnt namespace tools build feature: Check if get_current_dir_name() is available perf tools: Fix crash on synthesizing the unit commit 8d9f412d51b84eafd2253a82120e218ddc53e721 Merge: 575d7d0d6f5c 976b489120cd Author: Linus Torvalds Date: Fri Nov 30 11:29:02 2018 -0800 Merge branch 'efi-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull EFI fix from Ingo Molnar: "An arm64 warning fix" * 'efi-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: efi: Prevent GICv3 WARN() by mapping the memreserve table before first use commit 10d443431dc2bb733cf7add99b453e3fb9047a2e Author: Jose Abreu Date: Fri Nov 30 09:47:31 2018 +0000 ARC: io.h: Implement reads{x}()/writes{x}() Some ARC CPU's do not support unaligned loads/stores. Currently, generic implementation of reads{b/w/l}()/writes{b/w/l}() is being used with ARC. This can lead to misfunction of some drivers as generic functions do a plain dereference of a pointer that can be unaligned. Let's use {get/put}_unaligned() helpers instead of plain dereference of pointer in order to fix. The helpers allow to get and store data from an unaligned address whilst preserving the CPU internal alignment. According to [1], the use of these helpers are costly in terms of performance so we added an initial check for a buffer already aligned so that the usage of the helpers can be avoided, when possible. [1] Documentation/unaligned-memory-access.txt Cc: Alexey Brodkin Cc: Joao Pinto Cc: David Laight Tested-by: Vitor Soares Signed-off-by: Jose Abreu Signed-off-by: Vineet Gupta commit 575d7d0d6f5c6feb896fae2e70578a1ab6d474b5 Merge: 5f1ca5c619c2 22566c160303 Author: Linus Torvalds Date: Fri Nov 30 10:57:06 2018 -0800 Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull objtool fixes from Ingo Molnar: "Two fixes for boundary conditions" * 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: objtool: Fix segfault in .cold detection with -ffunction-sections objtool: Fix double-free in .cold detection error path commit b7cc40c32a8bfa6f2581a71747f6a7d491fe43ba Author: Kevin Hilman Date: Fri Nov 30 15:51:56 2018 +0300 ARC: change defconfig defaults to ARCv2 Change the default defconfig (used with 'make defconfig') to the ARCv2 nsim_hs_defconfig, and also switch the default Kconfig ISA selection to ARCv2. This allows several default defconfigs (e.g. make defconfig, make allnoconfig, make tinyconfig) to all work with ARCv2 by default. Note since we change default architecture from ARCompact to ARCv2 it's required to explicitly mention architecture type in ARCompact defconfigs otherwise ARCv2 will be implied and binaries will be generated for ARCv2. Cc: # 4.4.x Signed-off-by: Kevin Hilman Signed-off-by: Alexey Brodkin Signed-off-by: Vineet Gupta commit 5f1ca5c619c2af5e03114b0276642cdc15d11a94 Merge: 49afe6614321 73116df7bb90 Author: Linus Torvalds Date: Fri Nov 30 10:47:50 2018 -0800 Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull vfs fixes from Al Viro: "Assorted fixes all over the place. The iov_iter one is this cycle regression (splice from UDP triggering WARN_ON()), the rest is older" * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: afs: Use d_instantiate() rather than d_add() and don't d_drop() afs: Fix missing net error handling afs: Fix validation/callback interaction iov_iter: teach csum_and_copy_to_iter() to handle pipe-backed ones exportfs: do not read dentry after free exportfs: fix 'passing zero to ERR_PTR()' warning aio: fix failure to put the file pointer sysv: return 'err' instead of 0 in __sysv_write_inode commit 49afe6614321e78727729680b97e96998695249a Merge: 0f1f69237545 5cf99a0f3161 Author: Linus Torvalds Date: Fri Nov 30 10:40:11 2018 -0800 Merge tag 'trace-v4.20-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull more tracing fixes from Steven Rostedt: "Two more fixes: - Change idx variable in DO_TRACE macro to __idx to avoid name conflicts. A kvm event had "idx" as a parameter and it confused the macro. - Fix a race where interrupts would be traced when set_graph_function was set. The previous patch set increased a race window that tricked the function graph tracer to think it should trace interrupts when it really should not have. The bug has been there before, but was seldom hit. Only the last patch series made it more common" * tag 'trace-v4.20-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: tracing/fgraph: Fix set_graph_function from showing interrupts tracepoint: Use __idx instead of idx in DO_TRACE macro to make it unique commit 0f1f692375450338a36af308cbb538ffabd130f9 Merge: 570a37437cf2 3054426dc68e Author: Linus Torvalds Date: Fri Nov 30 09:32:34 2018 -0800 Merge tag 'trace-v4.20-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing fixes from Steven Rostedt: "While rewriting the function graph tracer, I discovered a design flaw that was introduced by a patch that tried to fix one bug, but by doing so created another bug. As both bugs corrupt the output (but they do not crash the kernel), I decided to fix the design such that it could have both bugs fixed. The original fix, fixed time reporting of the function graph tracer when doing a max_depth of one. This was code that can test how much the kernel interferes with userspace. But in doing so, it could corrupt the time keeping of the function profiler. The issue is that the curr_ret_stack variable was being used for two different meanings. One was to keep track of the stack pointer on the ret_stack (shadow stack used by the function graph tracer), and the other use case was the graph call depth. Although, the two may be closely related, where they got updated was the issue that lead to the two different bugs that required the two use cases to be updated differently. The big issue with this fix is that it requires changing each architecture. The good news is, I was able to remove a lot of code that was duplicated within the architectures and place it into a single location. Then I could make the fix in one place. I pushed this code into linux-next to let it settle over a week, and before doing so, I cross compiled all the affected architectures to make sure that they built fine. In the mean time, I also pulled in a patch that fixes the sched_switch previous tasks state output, that was not actually correct" * tag 'trace-v4.20-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: sched, trace: Fix prev_state output in sched_switch tracepoint function_graph: Have profiler use curr_ret_stack and not depth function_graph: Reverse the order of pushing the ret_stack and the callback function_graph: Move return callback before update of curr_ret_stack function_graph: Use new curr_ret_depth to manage depth instead of curr_ret_stack function_graph: Make ftrace_push_return_trace() static sparc/function_graph: Simplify with function_graph_enter() sh/function_graph: Simplify with function_graph_enter() s390/function_graph: Simplify with function_graph_enter() riscv/function_graph: Simplify with function_graph_enter() powerpc/function_graph: Simplify with function_graph_enter() parisc: function_graph: Simplify with function_graph_enter() nds32: function_graph: Simplify with function_graph_enter() MIPS: function_graph: Simplify with function_graph_enter() microblaze: function_graph: Simplify with function_graph_enter() arm64: function_graph: Simplify with function_graph_enter() ARM: function_graph: Simplify with function_graph_enter() x86/function_graph: Simplify with function_graph_enter() function_graph: Create function_graph_enter() to consolidate architecture code commit ea2412dc21cc790335d319181dddc43682aef164 Author: Lorenzo Pieralisi Date: Thu Nov 29 09:55:59 2018 +0000 ACPI/IORT: Fix iort_get_platform_device_domain() uninitialized pointer value Running the Clang static analyzer on IORT code detected the following error: Logic error: Branch condition evaluates to a garbage value in iort_get_platform_device_domain() If the named component associated with a given device has no IORT mappings, iort_get_platform_device_domain() exits its MSI mapping loop with msi_parent pointer containing garbage, which can lead to erroneous code path execution. Initialize the msi_parent pointer, fixing the bug. Fixes: d4f54a186667 ("ACPI: platform: setup MSI domain for ACPI based platform device") Reported-by: Patrick Bellasi Reviewed-by: Hanjun Guo Acked-by: Will Deacon Cc: Sudeep Holla Cc: "Rafael J. Wysocki" Signed-off-by: Lorenzo Pieralisi Signed-off-by: Catalin Marinas commit 3bfa8897e4d08f822d1d58cf6cbbffbccef82e08 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 f10d9102de2816050af650da2c8f8b62535bbb72 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 d6e820fcd4cf08b11d291a1dd7bbd0636914647c 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 570a37437cf24790d77fed6a59fdc9ac749e6b19 Merge: e9eaf72e73d6 ebcdcef30333 Author: Linus Torvalds Date: Fri Nov 30 09:10:29 2018 -0800 Merge tag 'drm-fixes-2018-11-30' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "This weeks instalment of fixes. Looks fairly like business as usual and everything seems to rolling along. There was one MST fix applied and reverted in the misc tree, but otherwise nothing too strange in here. core: - incorrect master setting on error fix i915: - only GVT fixes this week: * one MOCS register load * rpm lock fix * use after free rcar-du: - regression fix for group start amdgpu: - DP MST fix - GPUVM fix for huge pages - RLC fix for vega20 ast: - fix EDID reading stability - ioreg free fix meson: - sleep in irq fix - vblank fixes - array boundary fix" * tag 'drm-fixes-2018-11-30' of git://anongit.freedesktop.org/drm/drm: drm/ast: fixed reading monitor EDID not stable issue drm/ast: Fix incorrect free on ioregs Revert "drm/dp_mst: Skip validating ports during destruction, just ref" drm/amdgpu: Add delay after enable RLC ucode drm/amdgpu: Avoid endless loop in GPUVM fragment processing drm/amdgpu: Cast to uint64_t before left shift drm/meson: add support for 1080p25 mode drm/meson: Fix OOB memory accesses in meson_viu_set_osd_lut() drm/meson: Enable fast_io in meson_dw_hdmi_regmap_config drm/meson: Fixes for drm_crtc_vblank_on/off support drm: set is_master to 0 upon drm_new_set_master() failure drm/dp_mst: Skip validating ports during destruction, just ref drm: rcar-du: Fix DU3 start/stop on M3-N drm/amd/dm: Understand why attaching path/tile properties are needed drm/amd/dm: Don't forget to attach MST encoders drm/i915/gvt: Avoid use-after-free iterating the gtt list drm/i915/gvt: ensure gpu is powered before do i915_gem_gtt_insert drm/i915/gvt: not to touch undefined MOCS registers commit 1c9b357ced0b2fd2c173c058c2de88af513bc064 Merge: 2a5cf35cd6c5 6344d02dc8f8 Author: Jens Axboe Date: Fri Nov 30 10:08:39 2018 -0700 Merge branch 'nvme-4.20' of git://git.infradead.org/nvme into for-linus Pull NVMe fixes from Christoph: "Various fixlets all over." * 'nvme-4.20' of git://git.infradead.org/nvme: nvme-rdma: fix double freeing of async event data nvme: flush namespace scanning work just before removing namespaces nvme: warn when finding multi-port subsystems without multipathing enabled nvme-pci: fix surprise removal nvme-fc: initialize nvme_req(rq)->ctrl after calling __nvme_fc_init_request() nvme: Free ctrl device name on init failure commit 2a5cf35cd6c56b2924bce103413ad3381bdc31fa Author: Ming Lei Date: Sat Dec 1 00:38:18 2018 +0800 block: fix single range discard merge There are actually two kinds of discard merge: - one is the normal discard merge, just like normal read/write request, and call it single-range discard - another is the multi-range discard, queue_max_discard_segments(rq->q) > 1 For the former case, queue_max_discard_segments(rq->q) is 1, and we should handle this kind of discard merge like the normal read/write request. This patch fixes the following kernel panic issue[1], which is caused by not removing the single-range discard request from elevator queue. Guangwu has one raid discard test case, in which this issue is a bit easier to trigger, and I verified that this patch can fix the kernel panic issue in Guangwu's test case. [1] kernel panic log from Jens's report BUG: unable to handle kernel NULL pointer dereference at 0000000000000148 PGD 0 P4D 0. Oops: 0000 [#1] SMP PTI CPU: 37 PID: 763 Comm: kworker/37:1H Not tainted \ 4.20.0-rc3-00649-ge64d9a554a91-dirty #14 Hardware name: Wiwynn \ Leopard-Orv2/Leopard-DDR BW, BIOS LBM08 03/03/2017 Workqueue: kblockd \ blk_mq_run_work_fn RIP: \ 0010:blk_mq_get_driver_tag+0x81/0x120 Code: 24 \ 10 48 89 7c 24 20 74 21 83 fa ff 0f 95 c0 48 8b 4c 24 28 65 48 33 0c 25 28 00 00 00 \ 0f 85 96 00 00 00 48 83 c4 30 5b 5d c3 <48> 8b 87 48 01 00 00 8b 40 04 39 43 20 72 37 \ f6 87 b0 00 00 00 02 RSP: 0018:ffffc90004aabd30 EFLAGS: 00010246 \ RAX: 0000000000000003 RBX: ffff888465ea1300 RCX: ffffc90004aabde8 RDX: 00000000ffffffff RSI: ffffc90004aabde8 RDI: 0000000000000000 RBP: 0000000000000000 R08: ffff888465ea1348 R09: 0000000000000000 R10: 0000000000001000 R11: 00000000ffffffff R12: ffff888465ea1300 R13: 0000000000000000 R14: ffff888465ea1348 R15: ffff888465d10000 FS: 0000000000000000(0000) GS:ffff88846f9c0000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000148 CR3: 000000000220a003 CR4: 00000000003606e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: blk_mq_dispatch_rq_list+0xec/0x480 ? elv_rb_del+0x11/0x30 blk_mq_do_dispatch_sched+0x6e/0xf0 blk_mq_sched_dispatch_requests+0xfa/0x170 __blk_mq_run_hw_queue+0x5f/0xe0 process_one_work+0x154/0x350 worker_thread+0x46/0x3c0 kthread+0xf5/0x130 ? process_one_work+0x350/0x350 ? kthread_destroy_worker+0x50/0x50 ret_from_fork+0x1f/0x30 Modules linked in: sb_edac x86_pkg_temp_thermal intel_powerclamp coretemp kvm_intel \ kvm switchtec irqbypass iTCO_wdt iTCO_vendor_support efivars cdc_ether usbnet mii \ cdc_acm i2c_i801 lpc_ich mfd_core ipmi_si ipmi_devintf ipmi_msghandler acpi_cpufreq \ button sch_fq_codel nfsd nfs_acl lockd grace auth_rpcgss oid_registry sunrpc nvme \ nvme_core fuse sg loop efivarfs autofs4 CR2: 0000000000000148 \ ---[ end trace 340a1fb996df1b9b ]--- RIP: 0010:blk_mq_get_driver_tag+0x81/0x120 Code: 24 10 48 89 7c 24 20 74 21 83 fa ff 0f 95 c0 48 8b 4c 24 28 65 48 33 0c 25 28 \ 00 00 00 0f 85 96 00 00 00 48 83 c4 30 5b 5d c3 <48> 8b 87 48 01 00 00 8b 40 04 39 43 \ 20 72 37 f6 87 b0 00 00 00 02 Fixes: 445251d0f4d329a ("blk-mq: fix discard merge with scheduler attached") Reported-by: Jens Axboe Cc: Guangwu Zhang Cc: Christoph Hellwig Cc: Jianchao Wang Signed-off-by: Ming Lei Signed-off-by: Jens Axboe commit ef1a8409348966f0b25ff97a170d6d0367710ea9 Author: Alexander Popov Date: Tue Nov 13 00:08:48 2018 +0300 stackleak: Disable function tracing and kprobes for stackleak_erase() The stackleak_erase() function is called on the trampoline stack at the end of syscall. This stack is not big enough for ftrace and kprobes operations, e.g. it can be exhausted if we use kprobe_events for stackleak_erase(). So let's disable function tracing and kprobes of stackleak_erase(). Reported-by: kernel test robot Fixes: 10e9ae9fabaf ("gcc-plugins: Add STACKLEAK plugin for tracking the kernel stack") Signed-off-by: Alexander Popov Reviewed-by: Steven Rostedt (VMware) Reviewed-by: Masami Hiramatsu Signed-off-by: Kees Cook commit e9eaf72e73d6159afbf90a9a02c24f2099067992 Merge: 2b17992f6f7f 89d328f637b9 Author: Linus Torvalds Date: Fri Nov 30 09:03:15 2018 -0800 Merge tag 'pstore-v4.20-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull pstore fix from Kees Cook: "Fix corrupted compression due to unlucky size choice with ECC" * tag 'pstore-v4.20-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: pstore/ram: Correctly calculate usable PRZ bytes commit 3b712e43e3876b42b38321ecf790a1f5fe59c834 Author: Sean Paul Date: Wed Oct 3 16:22:31 2018 -0400 drm/msm: Grab a vblank reference when waiting for commit_done Similar to the atomic helpers, we should enable vblank while we're waiting for the commit to finish. DPU needs this, MDP5 seems to work fine without it. Reviewed-by: Abhinav Kumar Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit 8531f0587f5c9e1a74cd9543a97617349f5e0706 Author: Abhinav Kumar Date: Thu Jun 14 21:01:10 2018 -0700 drm/msm/dsi: configure VCO rate for 10nm PLL driver Currenty the VCO rate in the 10nm PLL driver relies on the parent rate which is not configured. Configure the VCO rate to 19.2 Mhz as required by the 10nm PLL driver. Signed-off-by: Abhinav Kumar Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit 2b17992f6f7ff4f4b72d7d3ee3e93d228682508f Merge: 94f371cb7394 7bca603a69c0 Author: Linus Torvalds Date: Fri Nov 30 08:57:31 2018 -0800 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma Pull rdma fixes from Jason Gunthorpe: "This is a bit later than usual for our first -rc but I'm not seeing anything worry-some in the RDMA tree right now. Quiet so far this -rc cycle, only a few internal driver related bugs and a small series fixing ODP bugs found by more advanced testing. A set of small driver and core code fixes: - Small series fixing longtime user triggerable bugs in the ODP processing inside mlx5 and core code - Various small driver malfunctions and crashes (use after, free, error unwind, implementation bugs) - A misfunction of the RDMA GID cache that can be triggered by the administrator" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: RDMA/mlx5: Initialize return variable in case pagefault was skipped IB/mlx5: Fix page fault handling for MW IB/umem: Set correct address to the invalidation function IB/mlx5: Skip non-ODP MR when handling a page fault RDMA/hns: Bugfix pbl configuration for rereg mr iser: set sector for ambiguous mr status errors RDMA/rdmavt: Fix rvt_create_ah function signature IB/mlx5: Avoid load failure due to unknown link width IB/mlx5: Fix XRC QP support after introducing extended atomic RDMA/bnxt_re: Avoid accessing the device structure after it is freed RDMA/bnxt_re: Fix system hang when registration with L2 driver fails RDMA/core: Add GIDs while changing MAC addr only for registered ndev RDMA/mlx5: Fix fence type for IB_WR_LOCAL_INV WR net/mlx5: Fix XRC SRQ umem valid bits commit 47e7f506ee6590ceb2efa1f08aca7f9f2ee5c1d3 Author: Rob Clark Date: Mon Oct 15 11:22:57 2018 -0400 drm/msm: fix handling of cmdstream offset Userspace hasn't used submit cmds with submit_offset != 0 for a while, but this starts cropping up again with cmdstream sub-buffer-allocation in libdrm_freedreno. Doesn't do much good to increment the buf ptr before assigning it. Fixes: 78b8e5b847b4 drm/msm: dump a rd GPUADDR header for all buffers in the command Reviewed-by: Kristian H. Kristensen Signed-off-by: Rob Clark Signed-off-by: Sean Paul commit 51270de91412b819f654b849db3bf92dac0a0855 Author: Dan Carpenter Date: Sat Oct 13 13:28:06 2018 +0300 drm/msm/gpu: Fix a couple memory leaks in debugfs The msm_gpu_open() function should free "show_priv" on error or it causes static checker warnings. Fixes: 4f776f4511c7 ("drm/msm/gpu: Convert the GPU show function to use the GPU state") Signed-off-by: Dan Carpenter Signed-off-by: Rob Clark Signed-off-by: Sean Paul commit 482f96324a4e08818db7d75bb12beaaea6c9561d Author: Sharat Masetty Date: Fri Oct 12 14:26:56 2018 +0530 drm/msm: Fix task dump in gpu recovery The current recovery code gets a pointer to the task struct and does a few things all within the rcu_read_lock. This puts constraints on the types of gfp flags that can be used within the rcu lock. This patch instead gets a reference to the task within the rcu lock and releases the lock immediately, this way the task stays afloat until we need it and we also get to use the desired gfp flags. Signed-off-by: Sharat Masetty Signed-off-by: Rob Clark Signed-off-by: Sean Paul commit 4f3a31a8e8bff5fc363ec9f4755e58a15f7f36c7 Author: Sharat Masetty Date: Fri Oct 12 14:26:55 2018 +0530 drm/msm: Check if target supports crash dump capture This patch simply checks first to see if the target can support crash dump capture before proceeding. Signed-off-by: Sharat Masetty Signed-off-by: Rob Clark Signed-off-by: Sean Paul commit 6344d02dc8f886b6bbcd922ae1a17e4a41500f2d Author: Prabhath Sajeepa Date: Wed Nov 28 11:11:29 2018 -0700 nvme-rdma: fix double freeing of async event data Some error paths in configuration of admin queue free data buffer associated with async request SQE without resetting the data buffer pointer to NULL, This buffer is also freed up again if the controller is shutdown or reset. Signed-off-by: Prabhath Sajeepa Reviewed-by: Roland Dreier Signed-off-by: Christoph Hellwig commit f6c8e432cb0479255322c5d0335b9f1699a0270c Author: Sagi Grimberg Date: Wed Nov 21 15:17:37 2018 -0800 nvme: flush namespace scanning work just before removing namespaces nvme_stop_ctrl can be called also for reset flow and there is no need to flush the scan_work as namespaces are not being removed. This can cause deadlock in rdma, fc and loop drivers since nvme_stop_ctrl barriers before controller teardown (and specifically I/O cancellation of the scan_work itself) takes place, but the scan_work will be blocked anyways so there is no need to flush it. Instead, move scan_work flush to nvme_remove_namespaces() where it really needs to flush. Reported-by: Ming Lei Signed-off-by: Sagi Grimberg Reviewed-by: Keith Busch Reviewed by: James Smart Tested-by: Ewan D. Milne Signed-off-by: Christoph Hellwig commit 14a1336e6fff47dd1028b484d6c802105c58e2ee Author: Christoph Hellwig Date: Tue Nov 20 16:57:54 2018 +0100 nvme: warn when finding multi-port subsystems without multipathing enabled Without CONFIG_NVME_MULTIPATH enabled a multi-port subsystem might show up as invididual devices and cause problems, warn about it. Signed-off-by: Christoph Hellwig Reviewed-by: Sagi Grimberg commit 31ffa563833576bd49a8bf53120568312755e6e2 Author: Colin Ian King Date: Tue Jul 17 09:53:42 2018 +0100 fscache, cachefiles: remove redundant variable 'cache' Variable 'cache' is being assigned but is never used hence it is redundant and can be removed. Cleans up clang warning: warning: variable 'cache' set but not used [-Wunused-but-set-variable] Signed-off-by: Colin Ian King Signed-off-by: David Howells commit 34e06fe4d05bd120556a95d5ebf1bcc97b0a1ca0 Author: Arnd Bergmann Date: Fri Jul 13 16:27:44 2018 +0200 cachefiles: avoid deprecated get_seconds() get_seconds() returns an unsigned long can overflow on some architectures and is deprecated because of that. In cachefs, we cast that number to a a 32-bit integer, which will overflow in year 2106 on all architectures. As confirmed by David Howells, the overflow probably isn't harmful in the end, since the timestamps are only used to make the file names unique, but they don't strictly have to be in monotonically increasing order since the files only exist in order to be deleted as quickly as possible. Moving to ktime_get_real_seconds() avoids the deprecated interface. Signed-off-by: Arnd Bergmann Signed-off-by: David Howells commit b7e768b7e3522695ed36dcb48ecdcd344bd30a9b Author: Nathan Chancellor Date: Mon Sep 24 10:33:44 2018 -0700 cachefiles: Explicitly cast enumerated type in put_object Clang warns when one enumerated type is implicitly converted to another. fs/cachefiles/namei.c:247:50: warning: implicit conversion from enumeration type 'enum cachefiles_obj_ref_trace' to different enumeration type 'enum fscache_obj_ref_trace' [-Wenum-conversion] cache->cache.ops->put_object(&xobject->fscache, cachefiles_obj_put_wait_retry); Silence this warning by explicitly casting to fscache_obj_ref_trace, which is also done in put_object. Reported-by: Nick Desaulniers Signed-off-by: Nathan Chancellor Signed-off-by: David Howells commit c5a94f434c82529afda290df3235e4d85873c5b4 Author: NeilBrown Date: Fri Oct 26 17:16:29 2018 +1100 fscache: fix race between enablement and dropping of object It was observed that a process blocked indefintely in __fscache_read_or_alloc_page(), waiting for FSCACHE_COOKIE_LOOKING_UP to be cleared via fscache_wait_for_deferred_lookup(). At this time, ->backing_objects was empty, which would normaly prevent __fscache_read_or_alloc_page() from getting to the point of waiting. This implies that ->backing_objects was cleared *after* __fscache_read_or_alloc_page was was entered. When an object is "killed" and then "dropped", FSCACHE_COOKIE_LOOKING_UP is cleared in fscache_lookup_failure(), then KILL_OBJECT and DROP_OBJECT are "called" and only in DROP_OBJECT is ->backing_objects cleared. This leaves a window where something else can set FSCACHE_COOKIE_LOOKING_UP and __fscache_read_or_alloc_page() can start waiting, before ->backing_objects is cleared There is some uncertainty in this analysis, but it seems to be fit the observations. Adding the wake in this patch will be handled correctly by __fscache_read_or_alloc_page(), as it checks if ->backing_objects is empty again, after waiting. Customer which reported the hang, also report that the hang cannot be reproduced with this fix. The backtrace for the blocked process looked like: PID: 29360 TASK: ffff881ff2ac0f80 CPU: 3 COMMAND: "zsh" #0 [ffff881ff43efbf8] schedule at ffffffff815e56f1 #1 [ffff881ff43efc58] bit_wait at ffffffff815e64ed #2 [ffff881ff43efc68] __wait_on_bit at ffffffff815e61b8 #3 [ffff881ff43efca0] out_of_line_wait_on_bit at ffffffff815e625e #4 [ffff881ff43efd08] fscache_wait_for_deferred_lookup at ffffffffa04f2e8f [fscache] #5 [ffff881ff43efd18] __fscache_read_or_alloc_page at ffffffffa04f2ffe [fscache] #6 [ffff881ff43efd58] __nfs_readpage_from_fscache at ffffffffa0679668 [nfs] #7 [ffff881ff43efd78] nfs_readpage at ffffffffa067092b [nfs] #8 [ffff881ff43efda0] generic_file_read_iter at ffffffff81187a73 #9 [ffff881ff43efe50] nfs_file_read at ffffffffa066544b [nfs] #10 [ffff881ff43efe70] __vfs_read at ffffffff811fc756 #11 [ffff881ff43efee8] vfs_read at ffffffff811fccfa #12 [ffff881ff43eff18] sys_read at ffffffff811fda62 #13 [ffff881ff43eff50] entry_SYSCALL_64_fastpath at ffffffff815e986e Signed-off-by: NeilBrown Signed-off-by: David Howells commit 4265b0fe453240b5fa6d0986d1f23688497f4078 Author: Sandeep Panda Date: Fri Nov 30 14:57:45 2018 +0530 drm/bridge: fix AUX_CMD_SEND bit value for ti, sn65dsi86 bridge Fix the AUX_CMD_SEND bit for ti,sn65dsi86 bridge chip. With wrong value the dpcd aux transactions with eDP panel are failing. Signed-off-by: Sandeep Panda Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20181130092745.4219-1-spanda@codeaurora.org commit 41e817bca3acd3980efe5dd7d28af0e6f4ab9247 Author: Maximilian Heyne Date: Fri Nov 30 08:35:14 2018 -0700 fs: fix lost error code in dio_complete commit e259221763a40403d5bb232209998e8c45804ab8 ("fs: simplify the generic_write_sync prototype") reworked callers of generic_write_sync(), and ended up dropping the error return for the directio path. Prior to that commit, in dio_complete(), an error would be bubbled up the stack, but after that commit, errors passed on to dio_complete were eaten up. This was reported on the list earlier, and a fix was proposed in https://lore.kernel.org/lkml/20160921141539.GA17898@infradead.org/, but never followed up with. We recently hit this bug in our testing where fencing io errors, which were previously erroring out with EIO, were being returned as success operations after this commit. The fix proposed on the list earlier was a little short -- it would have still called generic_write_sync() in case `ret` already contained an error. This fix ensures generic_write_sync() is only called when there's no pending error in the write. Additionally, transferred is replaced with ret to bring this code in line with other callers. Fixes: e259221763a4 ("fs: simplify the generic_write_sync prototype") Reported-by: Ravi Nankani Signed-off-by: Maximilian Heyne Reviewed-by: Christoph Hellwig CC: Torsten Mehlan CC: Uwe Dannowski CC: Amit Shah CC: David Woodhouse CC: stable@vger.kernel.org Signed-off-by: Jens Axboe commit 4050207485e47e00353e87f2fe2166083e282688 Author: Hans de Goede Date: Mon Nov 26 11:52:18 2018 +0100 HID: ite: Add USB id match for another ITE based keyboard rfkill key quirk The 258a:6a88 keyboard-dock shipped with the Prowise PT301 tablet is likely another ITE based design. The controller die is directly bonded to the PCB with a blob of black glue on top so there are no markings and the 258a vendor-id used is unknown anywhere. But the keyboard has the exact same hotkeys mapped to Fn+F1 - F10 as the other ITE8595 keyboard I have *and* it has the same quirky behavior wrt the rfkill hotkey. Either way as said this keyboard has the same quirk for its rfkill / airplane mode hotkey as the ITE 8595 chip, it only sends a single release event when pressed and released, it never sends a press event. This commit adds the 258a:6a88 USB id to the hid-ite id-table, fixing the rfkill key not working on this keyboard. Signed-off-by: Hans de Goede Signed-off-by: Benjamin Tissoires commit ce85882860f0e756f7066cbda1c43e8b50b73ab6 Author: Daniel Vetter Date: Thu Nov 29 10:42:26 2018 +0100 drm/lease: Send a distinct uevent Sending the exact same hotplug event is not great uapi. Luckily the only already merged implementation of leases (in the -modesetting driver) doesn't care about what kind of uevent it gets, and unconditionally processes both hotplug and lease changes. So we can still adjust the uapi here. But e.g. weston tries to filter stuff, and I guess others might want to do that too. Try to make that possible. Cc: stable since it's uapi adjustement that we want to roll out everywhere. Michel Dänzer mentioned on irc that -amdgpu also has lease support. It has the same code flow as -modesetting though, so we can still go ahead. v2: Mention -amdgpu (Michel) Cc: Keith Packard Cc: Dave Airlie Cc: stable@vger.kernel.org Reviewed-by: Keith Packard Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20181129094226.30591-1-daniel.vetter@ffwll.ch commit 79c2206d369b87b19ac29cb47601059b6bf5c291 Author: YiFei Zhu Date: Thu Nov 29 18:12:30 2018 +0100 x86/earlyprintk/efi: Fix infinite loop on some screen widths An affected screen resolution is 1366 x 768, which width is not divisible by 8, the default font width. On such screens, when longer lines are earlyprintk'ed, overflow-to-next-line can never trigger, due to the left-most x-coordinate of the next character always less than the screen width. Earlyprintk will infinite loop in trying to print the rest of the string but unable to, due to the line being full. This patch makes the trigger consider the right-most x-coordinate, instead of left-most, as the value to compare against the screen width threshold. Signed-off-by: YiFei Zhu 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: Marc Zyngier Cc: Matt Fleming Cc: Nathan Chancellor Cc: Peter Zijlstra Cc: Sai Praneeth Prakhya Cc: Sedat Dilek Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/20181129171230.18699-12-ard.biesheuvel@linaro.org Signed-off-by: Ingo Molnar commit b84a64fad40637b1c9fa4f4dbf847a23e29e672b Author: Eric Snowberg Date: Thu Nov 29 18:12:20 2018 +0100 x86/efi: Allocate e820 buffer before calling efi_exit_boot_service The following commit: d64934019f6c ("x86/efi: Use efi_exit_boot_services()") introduced a regression on systems with large memory maps causing them to hang on boot. The first "goto get_map" that was removed from exit_boot() ensured there was enough room for the memory map when efi_call_early(exit_boot_services) was called. This happens when (nr_desc > ARRAY_SIZE(params->e820_table). Chain of events: exit_boot() efi_exit_boot_services() efi_get_memory_map <- at this point the mm can't grow over 8 desc priv_func() exit_boot_func() allocate_e820ext() <- new mm grows over 8 desc from e820 alloc efi_call_early(exit_boot_services) <- mm key doesn't match so retry efi_call_early(get_memory_map) <- not enough room for new mm system hangs This patch allocates the e820 buffer before calling efi_exit_boot_services() and fixes the regression. [ mingo: minor cleanliness edits. ] Signed-off-by: Eric Snowberg Signed-off-by: Ard Biesheuvel Cc: Cc: Andy Lutomirski Cc: Arend van Spriel Cc: Bhupesh Sharma Cc: Borislav Petkov Cc: Dave Hansen 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: 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-2-ard.biesheuvel@linaro.org Signed-off-by: Ingo Molnar commit 5cf99a0f3161bc3ae2391269d134d6bf7e26f00e Author: Steven Rostedt (VMware) Date: Thu Nov 29 08:50:27 2018 -0500 tracing/fgraph: Fix set_graph_function from showing interrupts The tracefs file set_graph_function is used to only function graph functions that are listed in that file (or all functions if the file is empty). The way this is implemented is that the function graph tracer looks at every function, and if the current depth is zero and the function matches something in the file then it will trace that function. When other functions are called, the depth will be greater than zero (because the original function will be at depth zero), and all functions will be traced where the depth is greater than zero. The issue is that when a function is first entered, and the handler that checks this logic is called, the depth is set to zero. If an interrupt comes in and a function in the interrupt handler is traced, its depth will be greater than zero and it will automatically be traced, even if the original function was not. But because the logic only looks at depth it may trace interrupts when it should not be. The recent design change of the function graph tracer to fix other bugs caused the depth to be zero while the function graph callback handler is being called for a longer time, widening the race of this happening. This bug was actually there for a longer time, but because the race window was so small it seldom happened. The Fixes tag below is for the commit that widen the race window, because that commit belongs to a series that will also help fix the original bug. Cc: stable@kernel.org Fixes: 39eb456dacb5 ("function_graph: Use new curr_ret_depth to manage depth instead of curr_ret_stack") Reported-by: Joe Lawrence Tested-by: Joe Lawrence Signed-off-by: Steven Rostedt (VMware) commit 0c7a52e4d4b5c4d35b31f3c3ad32af814f1bf491 Author: Zenghui Yu Date: Wed Nov 28 03:35:23 2018 +0000 tracepoint: Use __idx instead of idx in DO_TRACE macro to make it unique After enabling KVM event tracing, almost all of trace_kvm_exit()'s printk shows "kvm_exit: IRQ: ..." even if the actual exception_type is NOT IRQ. More specifically, trace_kvm_exit() is defined in virt/kvm/arm/trace.h by TRACE_EVENT. This slight problem may have existed after commit e6753f23d961 ("tracepoint: Make rcuidle tracepoint callers use SRCU"). There are two variables in trace_kvm_exit() and __DO_TRACE() which have the same name, *idx*. Thus the actual value of *idx* will be overwritten when tracing. Fix it by adding a simple prefix. Cc: Joel Fernandes Cc: Wang Haibin Cc: linux-trace-devel@vger.kernel.org Cc: stable@vger.kernel.org Fixes: e6753f23d961 ("tracepoint: Make rcuidle tracepoint callers use SRCU") Reviewed-by: Joel Fernandes (Google) Signed-off-by: Zenghui Yu Signed-off-by: Steven Rostedt (VMware) commit 73116df7bb90435ccb2817f44113295240d15034 Author: David Howells Date: Tue Nov 13 23:20:35 2018 +0000 afs: Use d_instantiate() rather than d_add() and don't d_drop() Use d_instantiate() rather than d_add() and don't d_drop() in afs_vnode_new_inode(). The dentry shouldn't be removed as it's not changing its name. Reported-by: Al Viro Signed-off-by: David Howells Signed-off-by: Al Viro commit 4584ae96ae307613625e80cb9c7d9a981bed47a7 Author: David Howells Date: Tue Nov 13 23:20:28 2018 +0000 afs: Fix missing net error handling kAFS can be given certain network errors (EADDRNOTAVAIL, EHOSTDOWN and ERFKILL) that it doesn't handle in its server/address rotation algorithms. They cause the probing and rotation to abort immediately rather than rotating. Fix this by: (1) Abstracting out the error prioritisation from the VL and FS rotation algorithms into a common function and expand usage into the server probing code. When multiple errors are available, this code selects the one we'd prefer to return. (2) Add handling for EADDRNOTAVAIL, EHOSTDOWN and ERFKILL. Fixes: 0fafdc9f888b ("afs: Fix file locking") Fixes: 0338747d8454 ("afs: Probe multiple fileservers simultaneously") Signed-off-by: David Howells Signed-off-by: Al Viro commit ae3b7361dc0ee9a425bf7d77ce211f533500b39b Author: David Howells Date: Tue Nov 13 23:20:21 2018 +0000 afs: Fix validation/callback interaction When afs_validate() is called to validate a vnode (inode), there are two unhandled cases in the fastpath at the top of the function: (1) If the vnode is promised (AFS_VNODE_CB_PROMISED is set), the break counters match and the data has expired, then there's an implicit case in which the vnode needs revalidating. This has no consequences since the default "valid = false" set at the top of the function happens to do the right thing. (2) If the vnode is not promised and it hasn't been deleted (AFS_VNODE_DELETED is not set) then there's a default case we're not handling in which the vnode is invalid. If the vnode is invalid, we need to bring cb_s_break and cb_v_break up to date before we refetch the status. As a consequence, once the server loses track of the client (ie. sufficient time has passed since we last sent it an operation), it will send us a CB.InitCallBackState* operation when we next try to talk to it. This calls afs_init_callback_state() which increments afs_server::cb_s_break, but this then doesn't propagate to the afs_vnode record. The result being that every afs_validate() call thereafter sends a status fetch operation to the server. Clarify and fix this by: (A) Setting valid in all the branches rather than initialising it at the top so that the compiler catches where we've missed. (B) Restructuring the logic in the 'promised' branch so that we set valid to false if the callback is due to expire (or has expired) and so that the final case is that the vnode is still valid. (C) Adding an else-statement that ups cb_s_break and cb_v_break if the promised and deleted cases don't match. Fixes: c435ee34551e ("afs: Overhaul the callback handling") Signed-off-by: David Howells Signed-off-by: Al Viro commit 9410d386d0a829ace9558336263086c2fbbe8aed Author: Christoph Paasch Date: Thu Nov 29 16:01:04 2018 -0800 net: Prevent invalid access to skb->prev in __qdisc_drop_all __qdisc_drop_all() accesses skb->prev to get to the tail of the segment-list. With commit 68d2f84a1368 ("net: gro: properly remove skb from list") the skb-list handling has been changed to set skb->next to NULL and set the list-poison on skb->prev. With that change, __qdisc_drop_all() will panic when it tries to dereference skb->prev. Since commit 992cba7e276d ("net: Add and use skb_list_del_init().") __list_del_entry is used, leaving skb->prev unchanged (thus, pointing to the list-head if it's the first skb of the list). This will make __qdisc_drop_all modify the next-pointer of the list-head and result in a panic later on: [ 34.501053] general protection fault: 0000 [#1] SMP KASAN PTI [ 34.501968] CPU: 2 PID: 0 Comm: swapper/2 Not tainted 4.20.0-rc2.mptcp #108 [ 34.502887] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 0.5.1 01/01/2011 [ 34.504074] RIP: 0010:dev_gro_receive+0x343/0x1f90 [ 34.504751] Code: e0 48 c1 e8 03 42 80 3c 30 00 0f 85 4a 1c 00 00 4d 8b 24 24 4c 39 65 d0 0f 84 0a 04 00 00 49 8d 7c 24 38 48 89 f8 48 c1 e8 03 <42> 0f b6 04 30 84 c0 74 08 3c 04 [ 34.507060] RSP: 0018:ffff8883af507930 EFLAGS: 00010202 [ 34.507761] RAX: 0000000000000007 RBX: ffff8883970b2c80 RCX: 1ffff11072e165a6 [ 34.508640] RDX: 1ffff11075867008 RSI: ffff8883ac338040 RDI: 0000000000000038 [ 34.509493] RBP: ffff8883af5079d0 R08: ffff8883970b2d40 R09: 0000000000000062 [ 34.510346] R10: 0000000000000034 R11: 0000000000000000 R12: 0000000000000000 [ 34.511215] R13: 0000000000000000 R14: dffffc0000000000 R15: ffff8883ac338008 [ 34.512082] FS: 0000000000000000(0000) GS:ffff8883af500000(0000) knlGS:0000000000000000 [ 34.513036] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 34.513741] CR2: 000055ccc3e9d020 CR3: 00000003abf32000 CR4: 00000000000006e0 [ 34.514593] Call Trace: [ 34.514893] [ 34.515157] napi_gro_receive+0x93/0x150 [ 34.515632] receive_buf+0x893/0x3700 [ 34.516094] ? __netif_receive_skb+0x1f/0x1a0 [ 34.516629] ? virtnet_probe+0x1b40/0x1b40 [ 34.517153] ? __stable_node_chain+0x4d0/0x850 [ 34.517684] ? kfree+0x9a/0x180 [ 34.518067] ? __kasan_slab_free+0x171/0x190 [ 34.518582] ? detach_buf+0x1df/0x650 [ 34.519061] ? lapic_next_event+0x5a/0x90 [ 34.519539] ? virtqueue_get_buf_ctx+0x280/0x7f0 [ 34.520093] virtnet_poll+0x2df/0xd60 [ 34.520533] ? receive_buf+0x3700/0x3700 [ 34.521027] ? qdisc_watchdog_schedule_ns+0xd5/0x140 [ 34.521631] ? htb_dequeue+0x1817/0x25f0 [ 34.522107] ? sch_direct_xmit+0x142/0xf30 [ 34.522595] ? virtqueue_napi_schedule+0x26/0x30 [ 34.523155] net_rx_action+0x2f6/0xc50 [ 34.523601] ? napi_complete_done+0x2f0/0x2f0 [ 34.524126] ? kasan_check_read+0x11/0x20 [ 34.524608] ? _raw_spin_lock+0x7d/0xd0 [ 34.525070] ? _raw_spin_lock_bh+0xd0/0xd0 [ 34.525563] ? kvm_guest_apic_eoi_write+0x6b/0x80 [ 34.526130] ? apic_ack_irq+0x9e/0xe0 [ 34.526567] __do_softirq+0x188/0x4b5 [ 34.527015] irq_exit+0x151/0x180 [ 34.527417] do_IRQ+0xdb/0x150 [ 34.527783] common_interrupt+0xf/0xf [ 34.528223] This patch makes sure that skb->prev is set to NULL when entering netem_enqueue. Cc: Prashant Bhole Cc: Tyler Hicks Cc: Eric Dumazet Fixes: 68d2f84a1368 ("net: gro: properly remove skb from list") Suggested-by: Eric Dumazet Signed-off-by: Christoph Paasch Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller commit 94f371cb73944b410a269d570d6946c042f2ddd0 Merge: 2f8406891fed c4f784268210 Author: Linus Torvalds Date: Thu Nov 29 15:54:12 2018 -0800 Merge tag 'acpi-4.20-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI fix from Rafael Wysocki: "Fix a recent regression in ACPICA releted to the Generic Serial Bus protocol handling and causing it to read or write too little or too much data in some cases, so incorrect data may be written to hardware as a result (Hans de Goede)" * tag 'acpi-4.20-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPICA: Fix handling of buffer-size in acpi_ex_write_data_to_field() commit 2f8406891fed8be5aa5f535b7b5c37bba3272b1a Merge: f92a2ebb3d55 36c3aeb4b48d Author: Linus Torvalds Date: Thu Nov 29 15:07:30 2018 -0800 Merge tag 'pm-4.20-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fixes from Rafael Wysocki: "These fix two issues in the operating performance points (OPP) framework. Specifics: - Fix the handling of the "operating-points-v2" property to avoid failures if multiple phandles are present in it which is legitimate (Viresh Kumar). - Drop the unnecessary static initialization of the .owner field in the ti_opp_supply_driver structure (YueHaibing)" * tag 'pm-4.20-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: OPP: Fix parsing of multiple phandles in "operating-points-v2" property opp: ti-opp-supply: Fix platform_no_drv_owner.cocci warnings commit b020fcf6bb4b2d980298c416b3f407075aa2b3b6 Author: Martin Schiller Date: Tue Nov 27 09:50:29 2018 +0100 net/x25: handle call collisions If a session in X25_STATE_1 (Awaiting Call Accept) receives a call request, the session will be closed (x25_disconnect), cause=0x01 (Number Busy) and diag=0x48 (Call Collision) will be set and a clear request will be send. Signed-off-by: Martin Schiller Signed-off-by: David S. Miller commit 06137619f061f498c2924f6543fa45b7d39f0501 Author: Martin Schiller Date: Tue Nov 27 09:50:28 2018 +0100 net/x25: fix null_x25_address handling o x25_find_listener(): the compare for the null_x25_address was wrong. We have to check the x25_addr of the listener socket instead of the x25_addr of the incomming call. o x25_bind(): it was not possible to bind a socket to null_x25_address Signed-off-by: Martin Schiller Signed-off-by: David S. Miller commit d449ba3d581ed29f751a59792fdc775572c66904 Author: Martin Schiller Date: Tue Nov 27 09:50:27 2018 +0100 net/x25: fix called/calling length calculation in x25_parse_address_block The length of the called and calling address was not calculated correctly (BCD encoding). Signed-off-by: Martin Schiller Signed-off-by: David S. Miller commit 7bca603a69c0c239654a8f0bcb99e1a60b30040c Author: Leon Romanovsky Date: Thu Nov 29 12:25:29 2018 +0200 RDMA/mlx5: Initialize return variable in case pagefault was skipped Pagefaults occurred in non-ODP MR are completely valid events, so initialize return variable to 0. Fixes: 4d5422a309de ("IB/mlx5: Skip non-ODP MR when handling a page fault") Reported-by: Dan Carpenter Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 89d328f637b9904b6d4c9af73c8a608b8dd4d6f8 Author: Kees Cook Date: Thu Nov 1 16:17:22 2018 -0700 pstore/ram: Correctly calculate usable PRZ bytes The actual number of bytes stored in a PRZ is smaller than the bytes requested by platform data, since there is a header on each PRZ. Additionally, if ECC is enabled, there are trailing bytes used as well. Normally this mismatch doesn't matter since PRZs are circular buffers and the leading "overflow" bytes are just thrown away. However, in the case of a compressed record, this rather badly corrupts the results. This corruption was visible with "ramoops.mem_size=204800 ramoops.ecc=1". Any stored crashes would not be uncompressable (producing a pstorefs "dmesg-*.enc.z" file), and triggering errors at boot: [ 2.790759] pstore: crypto_comp_decompress failed, ret = -22! Backporting this depends on commit 70ad35db3321 ("pstore: Convert console write to use ->write_buf") Reported-by: Joel Fernandes Fixes: b0aad7a99c1d ("pstore: Add compression support to pstore") Signed-off-by: Kees Cook Reviewed-by: Joel Fernandes (Google) commit c4f784268210ae5e6749d4ba30d117bd301a70a6 Merge: 2bbb5fa37475 ae6b3e54aa52 Author: Rafael J. Wysocki Date: Thu Nov 29 21:21:39 2018 +0100 Merge branch 'acpica-fixes' * acpica-fixes: ACPICA: Fix handling of buffer-size in acpi_ex_write_data_to_field() commit 90230968f102acbe103fbf7c03d41addfef5f153 Author: Baruch Siach Date: Thu Nov 29 12:00:05 2018 +0200 net: phy: sfp: correct location of SFP standards SFP standards are now available from the SNIA (Storage Networking Industry Association) website. Cc: Andrew Lunn Cc: Florian Fainelli Signed-off-by: Baruch Siach Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit c6888879fd55b1ba903c2a770127edbf6aef6f27 Author: Roman Li Date: Tue Nov 27 17:16:37 2018 -0500 drm/amd/display: Fix 6x4K displays light-up on Vega20 (v2) [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. v2: backport to 4.20 (Alex) 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 49f1c44b581b08e3289127ffe58bd208c3166701 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 e869e7b59906a28232a71594599e07888033fc75 Merge: d7f7e0018b96 867d0ad476db Author: David S. Miller Date: Thu Nov 29 11:06:09 2018 -0800 Merge branch 'xps-fixes' Sabrina Dubroca says: ==================== fixes for XPS configuration after Symmetric queue selection This fixes some bugs introduced by the "Symmetric queue selection using XPS for Rx queues". First, the refactoring of the cleanup function skipped resetting the queue's NUMA node under some conditions. Second, the accounting on static keys for XPS and RXQS-XPS is unbalanced, so the static key for XPS won't actually disable itself, once enabled. The RXQS-XPS static key can actually be disabled by reconfiguring a device that didn't have RXQS-XPS configured at all. ==================== Signed-off-by: David S. Miller commit 867d0ad476db89a1e8af3f297af402399a54eea5 Author: Sabrina Dubroca Date: Thu Nov 29 14:14:49 2018 +0100 net: fix XPS static_key accounting Commit 04157469b7b8 ("net: Use static_key for XPS maps") introduced a static key for XPS, but the increments/decrements don't match. First, the static key's counter is incremented once for each queue, but only decremented once for a whole batch of queues, leading to large unbalances. Second, the xps_rxqs_needed key is decremented whenever we reset a batch of queues, whether they had any rxqs mapping or not, so that if we setup cpu-XPS on em1 and RXQS-XPS on em2, resetting the queues on em1 would decrement the xps_rxqs_needed key. This reworks the accounting scheme so that the xps_needed key is incremented only once for each type of XPS for all the queues on a device, and the xps_rxqs_needed key is incremented only once for all queues. This is sufficient to let us retrieve queues via get_xps_queue(). This patch introduces a new reset_xps_maps(), which reinitializes and frees the appropriate map (xps_rxqs_map or xps_cpus_map), and drops a reference to the needed keys: - both xps_needed and xps_rxqs_needed, in case of rxqs maps, - only xps_needed, in case of CPU maps. Now, we also need to call reset_xps_maps() at the end of __netif_set_xps_queue() when there's no active map left, for example when writing '00000000,00000000' to all queues' xps_rxqs setting. Fixes: 04157469b7b8 ("net: Use static_key for XPS maps") Signed-off-by: Sabrina Dubroca Signed-off-by: David S. Miller commit f28c020fb488e1a8b87469812017044bef88aa2b Author: Sabrina Dubroca Date: Thu Nov 29 14:14:48 2018 +0100 net: restore call to netdev_queue_numa_node_write when resetting XPS Before commit 80d19669ecd3 ("net: Refactor XPS for CPUs and Rx queues"), netif_reset_xps_queues() did netdev_queue_numa_node_write() for all the queues being reset. Now, this is only done when the "active" variable in clean_xps_maps() is false, ie when on all the CPUs, there's no active XPS mapping left. Fixes: 80d19669ecd3 ("net: Refactor XPS for CPUs and Rx queues") Signed-off-by: Sabrina Dubroca Signed-off-by: David S. Miller commit d7f7e0018b96fd1a30a968faa9464eb57372c1ec Author: Baruch Siach Date: Thu Nov 29 12:40:11 2018 +0200 net: phy: sfp: correct store of detected link modes The link modes that sfp_parse_support() detects are stored in the 'modes' bitmap. There is no reason to make an exception for 1000Base-PX or 1000Base-BX10. Fixes: 03145864bd0f ("sfp: support 1G BiDi (eg, FiberStore SFP-GE-BX) modules") Signed-off-by: Baruch Siach Acked-by: Russell King Signed-off-by: David S. Miller commit f1c0f59199419bfa955f84996122f5a81a24cb0f Merge: 60b548237fed d75d0e874ffe Author: David S. Miller Date: Thu Nov 29 10:38:39 2018 -0800 Merge branch 'ave-fixes' Kunihiko Hayashi says: ==================== fixup AVE ethernet driver This series adds fixup for AVE ethernet driver that includes increse of descriptors, replacing macro for linux-next, and adding missing author information. ==================== Signed-off-by: David S. Miller commit d75d0e874ffe929dec143d331b53e4bfceb10af2 Author: Kunihiko Hayashi Date: Thu Nov 29 17:08:38 2018 +0900 net: ethernet: ave: Add MODULE_AUTHOR and MAINTAINERS entry Add missing MODULE_AUTHOR of ave driver and an entry to MAINTAINERS. Signed-off-by: Kunihiko Hayashi Signed-off-by: David S. Miller commit 88113957ddb7b7d5451e28cd708c82ea7e63b097 Author: Kunihiko Hayashi Date: Thu Nov 29 17:08:37 2018 +0900 net: ethernet: ave: Replace NET_IP_ALIGN with AVE_FRAME_HEADROOM In commit 26a4676faa1a ("arm64: mm: define NET_IP_ALIGN to 0"), AVE controller affects this modification because the controller forces to ignore lower 2bits of buffer start address, and make 2-byte headroom, that is, data reception starts from (buffer + 2). This patch defines AVE_FRAME_HEADROOM macro as hardware-specific value, and replaces NET_IP_ALIGN with it. Signed-off-by: Kunihiko Hayashi Signed-off-by: David S. Miller commit 09ee3b4a249dd5c64da7d25a52a4ce42a49d647a Author: Kunihiko Hayashi Date: Thu Nov 29 17:08:36 2018 +0900 net: ethernet: ave: Increase descriptors to improve performance To improve performance, this increases Rx descriptor to 256, Tx descriptor to 64, and adjusts NAPI weight to NAPI_POLL_WEIGHT. Signed-off-by: Kunihiko Hayashi Signed-off-by: David S. Miller commit f92a2ebb3d5588720a33d4f22d55b4ba24f94da6 Merge: 3578f19143b0 598e1a42e962 Author: Linus Torvalds Date: Thu Nov 29 10:15:06 2018 -0800 Merge tag 'selinux-pr-20181129' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux Pull SELinux fix from Paul Moore: "One more SELinux fix for v4.20: add some missing netlink message to SELinux permission mappings. The netlink messages were added in v4.19, but unfortunately we didn't catch it then because the mechanism to catch these things was bypassed. In addition to adding the mappings, we're adding some comments to the code to hopefully prevent bypasses in the future" * tag 'selinux-pr-20181129' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux: selinux: add support for RTM_NEWCHAIN, RTM_DELCHAIN, and RTM_GETCHAIN commit 3578f19143b0a792bcd0ecb19f9295e2da563b54 Merge: b905e2db5cc4 814cedbc0b78 Author: Linus Torvalds Date: Thu Nov 29 10:10:42 2018 -0800 Merge tag 's390-4.20-3' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 updates from Martin Schwidefsky: - Add two missing kfree calls on error paths in the vfio-ccw code - Make sure that all data structures of a mediated vfio-ccw device are initialized before registering it - Fix a sparse warning in vfio-ccw - A followup patch for the pgtable_bytes accounting, the page table downgrade for compat processes missed a mm_dec_nr_pmds() - Reject sampling requests in the PMU init function of the CPU measurement counter facility - With the vfio AP driver an AP queue needs to be reset on every device probe as the alternative driver could have modified the device state * tag 's390-4.20-3' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390/mm: correct pgtable_bytes on page table downgrade s390/zcrypt: reinit ap queue state machine during device probe s390/cpum_cf: Reject request for sampling in event initialization s390/cio: Fix cleanup when unsupported IDA format is used s390/cio: Fix cleanup of pfn_array alloc failure vfio: ccw: Register mediated device once all structures are initialized s390/cio: make vfio_ccw_io_region static commit b905e2db5cc42e64f8169474448f16083c535abe Merge: 9af33b574517 8159a6a4a7d2 Author: Linus Torvalds Date: Thu Nov 29 10:03:42 2018 -0800 Merge tag 'sound-4.20-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "As a usual pattern, we've got relatively large updates at rc5: - A fix for races in ALSA control user elements - ASoC DAPM regression due to component refactoring - A fix in error handling of ASoC iteration macro - ASoC Intel SST Skylake kconfig fix; a new Kconfig will appear as a consequence, but in the end it's a good cleanup - HD-audio and USB-audio quirks as always - Assort of ASoC driver fixes (pcm186x, Intel cht, rockchip, pcm3060, rsnd, omap, wm_adsp, qcom, sunxi, stm32)" * tag 'sound-4.20-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (34 commits) ALSA: usb-audio: Add vendor and product name for Dell WD19 Dock ALSA: hda/realtek - Support ALC300 ALSA: hda/realtek - Add auto-mute quirk for HP Spectre x360 laptop ALSA: hda/realtek - fix the pop noise on headphone for lenovo laptops ALSA: control: Fix race between adding and removing a user element ALSA: sparc: Fix invalid snd_free_pages() at error path ALSA: wss: Fix invalid snd_free_pages() at error path ALSA: hda/realtek - fix headset mic detection for MSI MS-B171 ALSA: hda: Add ASRock N68C-S UCC the power_save blacklist ALSA: ac97: Fix incorrect bit shift at AC97-SPSA control write ASoC: omap-dmic: Add pm_qos handling to avoid overruns with CPU_IDLE ASoC: omap-mcpdm: Add pm_qos handling to avoid under/overruns with CPU_IDLE ASoC: omap-mcbsp: Fix latency value calculation for pm_qos ASoC: acpi: fix: continue searching when machine is ignored ASoC: Intel: Skylake: fix Kconfigs, make HDaudio codec optional MAINTAINERS: add ASoC maintainers for sound dt-bindings ASoC: pcm186x: Fix device reset-registers trigger value ASoC: dapm: Recalculate audio map forcely when card instantiated ASoC: omap-abe-twl6040: Fix missing audio card caused by deferred probing ASoC: pcm3060: Rename output widgets ... commit 9af33b574517609763ff32dbca8857686c4bf296 Merge: 60b548237fed ecebf55d27a1 Author: Linus Torvalds Date: Thu Nov 29 09:56:00 2018 -0800 Merge tag 'fixes_for_v4.20-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs Pull ext2 and udf fixes from Jan Kara: "Three small ext2 and udf fixes" * tag 'fixes_for_v4.20-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: ext2: fix potential use after free ext2: initialize opts.s_mount_opt as zero before using it udf: Allow mounting volumes with incorrect identification strings commit 975ef94a0284648fb0137bd5e949b18cef604e33 Author: Pan Bian Date: Thu Nov 22 10:07:12 2018 +0800 pvcalls-front: fixes incorrect error handling kfree() is incorrectly used to release the pages allocated by __get_free_page() and __get_free_pages(). Use the matching deallocators i.e., free_page() and free_pages(), respectively. Signed-off-by: Pan Bian Reviewed-by: Stefano Stabellini Signed-off-by: Juergen Gross commit 123664101aa2156d05251704fc63f9bcbf77741a Author: Igor Druzhinin Date: Tue Nov 27 20:58:21 2018 +0000 Revert "xen/balloon: Mark unallocated host memory as UNUSABLE" This reverts commit b3cf8528bb21febb650a7ecbf080d0647be40b9f. That commit unintentionally broke Xen balloon memory hotplug with "hotplug_unpopulated" set to 1. As long as "System RAM" resource got assigned under a new "Unusable memory" resource in IO/Mem tree any attempt to online this memory would fail due to general kernel restrictions on having "System RAM" resources as 1st level only. The original issue that commit has tried to workaround fa564ad96366 ("x86/PCI: Enable a 64bit BAR on AMD Family 15h (Models 00-1f, 30-3f, 60-7f)") also got amended by the following 03a551734 ("x86/PCI: Move and shrink AMD 64-bit window to avoid conflict") which made the original fix to Xen ballooning unnecessary. Signed-off-by: Igor Druzhinin Reviewed-by: Boris Ostrovsky Signed-off-by: Juergen Gross commit 72791ac854fea36034fa7976b748fde585008e78 Author: Srikanth Boddepalli Date: Tue Nov 27 19:53:27 2018 +0530 xen: xlate_mmu: add missing header to fix 'W=1' warning Add a missing header otherwise compiler warns about missed prototype: drivers/xen/xlate_mmu.c:183:5: warning: no previous prototype for 'xen_xlate_unmap_gfn_range?' [-Wmissing-prototypes] int xen_xlate_unmap_gfn_range(struct vm_area_struct *vma, ^~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Srikanth Boddepalli Reviewed-by: Boris Ostrovsky Reviewed-by: Joey Pabalinas Signed-off-by: Juergen Gross commit a7b403104e17209ea71eea59d4a71bf9e0d8cb83 Author: Juergen Gross Date: Fri Nov 23 17:24:51 2018 +0100 xen/x86: add diagnostic printout to xen_mc_flush() in case of error Failure of an element of a Xen multicall is signalled via a WARN() only if the kernel is compiled with MC_DEBUG. It is impossible to know which element failed and why it did so. Change that by printing the related information even without MC_DEBUG, even if maybe in some limited form (e.g. without information which caller produced the failing element). Move the printing out of the switch statement in order to have the same information for a single call. Signed-off-by: Juergen Gross Reviewed-by: Boris Ostrovsky Signed-off-by: Juergen Gross commit 874bfc6e5422d2421f7e4d5ea318d30e91679dfe Author: Masami Hiramatsu Date: Thu Nov 29 14:39:33 2018 +0900 arm64: ftrace: Fix to enable syscall events on arm64 Since commit 4378a7d4be30 ("arm64: implement syscall wrappers") introduced "__arm64_" prefix to all syscall wrapper symbols in sys_call_table, syscall tracer can not find corresponding metadata from syscall name. In the result, we have no syscall ftrace events on arm64 kernel, and some bpf testcases are failed on arm64. To fix this issue, this introduces custom arch_syscall_match_sym_name() which skips first 8 bytes when comparing the syscall and symbol names. Fixes: 4378a7d4be30 ("arm64: implement syscall wrappers") Reported-by: Naresh Kamboju Signed-off-by: Masami Hiramatsu Acked-by: Will Deacon Tested-by: Naresh Kamboju Cc: stable@vger.kernel.org Signed-off-by: Catalin Marinas commit ce8c80c536dac9f325a051b30bf7730ee505eddc Author: Catalin Marinas Date: Mon Nov 19 11:27:28 2018 +0000 arm64: Add workaround for Cortex-A76 erratum 1286807 On the affected Cortex-A76 cores (r0p0 to r3p0), if a virtual address for a cacheable mapping of a location is being accessed by a core while another core is remapping the virtual address to a new physical page using the recommended break-before-make sequence, then under very rare circumstances TLBI+DSB completes before a read using the translation being invalidated has been observed by other observers. The workaround repeats the TLBI+DSB operation and is shared with the Qualcomm Falkor erratum 1009 Reviewed-by: Suzuki K Poulose Signed-off-by: Catalin Marinas commit 598e1a42e9626213565d3b22ea948ce78556512a Author: Paul Moore Date: Wed Nov 28 12:57:33 2018 -0500 selinux: add support for RTM_NEWCHAIN, RTM_DELCHAIN, and RTM_GETCHAIN Commit 32a4f5ecd738 ("net: sched: introduce chain object to uapi") added new RTM_* definitions without properly updating SELinux, this patch adds the necessary SELinux support. While there was a BUILD_BUG_ON() in the SELinux code to protect from exactly this case, it was bypassed in the broken commit. In order to hopefully prevent this from happening in the future, add additional comments which provide some instructions on how to resolve the BUILD_BUG_ON() failures. Fixes: 32a4f5ecd738 ("net: sched: introduce chain object to uapi") Cc: # 4.19 Acked-by: David S. Miller Signed-off-by: Paul Moore commit 77e75fda94d2ebb86aa9d35fb1860f6395bf95de Author: Richard Genoud Date: Tue Nov 27 17:06:35 2018 +0100 dmaengine: at_hdmac: fix module unloading of_dma_controller_free() was not called on module onloading. This lead to a soft lockup: watchdog: BUG: soft lockup - CPU#0 stuck for 23s! Modules linked in: at_hdmac [last unloaded: at_hdmac] when of_dma_request_slave_channel() tried to call ofdma->of_dma_xlate(). Cc: stable@vger.kernel.org Fixes: bbe89c8e3d59 ("at_hdmac: move to generic DMA binding") Acked-by: Ludovic Desroches Signed-off-by: Richard Genoud Signed-off-by: Vinod Koul commit 98f5f932254b88ce828bc8e4d1642d14e5854caa Author: Richard Genoud Date: Tue Nov 27 17:06:34 2018 +0100 dmaengine: at_hdmac: fix memory leak in at_dma_xlate() The leak was found when opening/closing a serial port a great number of time, increasing kmalloc-32 in slabinfo. Each time the port was opened, dma_request_slave_channel() was called. Then, in at_dma_xlate(), atslave was allocated with devm_kzalloc() and never freed. (Well, it was free at module unload, but that's not what we want). So, here, kzalloc is more suited for the job since it has to be freed in atc_free_chan_resources(). Cc: stable@vger.kernel.org Fixes: bbe89c8e3d59 ("at_hdmac: move to generic DMA binding") Reported-by: Mario Forner Suggested-by: Alexandre Belloni Acked-by: Alexandre Belloni Acked-by: Ludovic Desroches Signed-off-by: Richard Genoud Signed-off-by: Vinod Koul commit 78e7b15e17ac175e7eed9e21c6f92d03d3b0a6fa Author: Radu Rendec Date: Tue Nov 27 22:20:48 2018 -0500 powerpc/msi: Fix NULL pointer access in teardown code The arch_teardown_msi_irqs() function assumes that controller ops pointers were already checked in arch_setup_msi_irqs(), but this assumption is wrong: arch_teardown_msi_irqs() can be called even when arch_setup_msi_irqs() returns an error (-ENOSYS). This can happen in the following scenario: - msi_capability_init() calls pci_msi_setup_msi_irqs() - pci_msi_setup_msi_irqs() returns -ENOSYS - msi_capability_init() notices the error and calls free_msi_irqs() - free_msi_irqs() calls pci_msi_teardown_msi_irqs() This is easier to see when CONFIG_PCI_MSI_IRQ_DOMAIN is not set and pci_msi_setup_msi_irqs() and pci_msi_teardown_msi_irqs() are just aliases to arch_setup_msi_irqs() and arch_teardown_msi_irqs(). The call to free_msi_irqs() upon pci_msi_setup_msi_irqs() failure seems legit, as it does additional cleanup; e.g. list_del(&entry->list) and kfree(entry) inside free_msi_irqs() do happen (MSI descriptors are allocated before pci_msi_setup_msi_irqs() is called and need to be cleaned up if that fails). Fixes: 6b2fd7efeb88 ("PCI/MSI/PPC: Remove arch_msi_check_device()") Cc: stable@vger.kernel.org # v3.18+ Signed-off-by: Radu Rendec Signed-off-by: Michael Ellerman commit 5363857b916c1f48027e9b96ee8be8376bf20811 Author: Takashi Iwai Date: Thu Nov 29 12:05:19 2018 +0100 ALSA: pcm: Fix interval evaluation with openmin/max As addressed in alsa-lib (commit b420056604f0), we need to fix the case where the evaluation of PCM interval "(x x+1]" leading to -EINVAL. After applying rules, such an interval may be translated as "(x x+1)". Fixes: ff2d6acdf6f1 ("ALSA: pcm: Fix snd_interval_refine first/last with open min/max") Cc: Signed-off-by: Takashi Iwai commit 96ae93b46dbb37a4a7a1e807d1b089f6b438840f Merge: effd14f66cc1 c9287fa657b3 Author: Greg Kroah-Hartman Date: Thu Nov 29 11:39:35 2018 +0100 Merge tag 'fixes-for-v4.20-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-linus Felipe writes: USB: fixes for v4.20-rc4 In this second set of fixes for the current -rc cycle, we have some regressions fixes for the old omap_udc driver done by Aaro Koskinen. We're also reverting an old patch on dwc3 which is, now, known to break USB certification in some cases. We have a fix on u_ether for an unsafe list iteration. * tag 'fixes-for-v4.20-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb: usb: gadget: u_ether: fix unsafe list iteration USB: omap_udc: fix rejection of out transfers when DMA is used USB: omap_udc: fix USB gadget functionality on Palm Tungsten E USB: omap_udc: fix omap_udc_start() on 15xx machines USB: omap_udc: fix crashes on probe error and module removal USB: omap_udc: use devm_request_irq() Revert "usb: dwc3: gadget: skip Set/Clear Halt when invalid" commit 3deef52ce10514ccdebba8e8ab85f9cebd0eb3f7 Author: Kai-Heng Feng Date: Thu Nov 29 08:57:37 2018 +0000 ALSA: hda: Add support for AMD Stoney Ridge It's similar to other AMD audio devices, it also supports D3, which can save some power drain. Signed-off-by: Kai-Heng Feng Cc: Signed-off-by: Takashi Iwai commit 44ff57e685f96d0cb9540004cc9d1d880e7a4315 Author: Tony Das Date: Wed Nov 28 20:16:37 2018 +0000 ALSA: usb-audio: Add SMSL D1 to quirks for native DSD support This patch adds quirk VID/PID IDs for the SMSL D1 in order to enable Native DSD support. [ Moved the added entry in numerical order -- tiwai ] Signed-off-by: Tony Das Cc: Signed-off-by: Takashi Iwai commit b888a5f713e4d17faaaff24316585a4eb07f35b7 Author: Chanho Min Date: Mon Nov 26 14:36:37 2018 +0900 ALSA: pcm: Fix starvation on down_write_nonblock() Commit 67ec1072b053 ("ALSA: pcm: Fix rwsem deadlock for non-atomic PCM stream") fixes deadlock for non-atomic PCM stream. But, This patch causes antother stuck. If writer is RT thread and reader is a normal thread, the reader thread will be difficult to get scheduled. It may not give chance to release readlocks and writer gets stuck for a long time if they are pinned to single cpu. The deadlock described in the previous commit is because the linux rwsem queues like a FIFO. So, we might need non-FIFO writelock, not non-block one. My suggestion is that the writer gives reader a chance to be scheduled by using the minimum msleep() instaed of spinning without blocking by writer. Also, The *_nonblock may be changed to *_nonfifo appropriately to this concept. In terms of performance, when trylock is failed, this minimum periodic msleep will have the same performance as the tick-based schedule()/wake_up_q(). [ Although this has a fairly high performance penalty, the relevant code path became already rare due to the previous commit ("ALSA: pcm: Call snd_pcm_unlink() conditionally at closing"). That is, now this unconditional msleep appears only when using linked streams, and this must be a rare case. So we accept this as a quick workaround until finding a more suitable one -- tiwai ] Fixes: 67ec1072b053 ("ALSA: pcm: Fix rwsem deadlock for non-atomic PCM stream") Suggested-by: Wonmin Jung Signed-off-by: Chanho Min Cc: Signed-off-by: Takashi Iwai commit b51abed8355e5556886623b2772fa6b7598d2282 Author: Takashi Iwai Date: Thu Nov 29 08:02:49 2018 +0100 ALSA: pcm: Call snd_pcm_unlink() conditionally at closing Currently the PCM core calls snd_pcm_unlink() always unconditionally at closing a stream. However, since snd_pcm_unlink() invokes the global rwsem down, the lock can be easily contended. More badly, when a thread runs in a high priority RT-FIFO, it may stall at spinning. Basically the call of snd_pcm_unlink() is required only for the linked streams that are already rare occasion. For normal use cases, this code path is fairly superfluous. As an optimization (and also as a workaround for the RT problem above in normal situations without linked streams), this patch adds a check before calling snd_pcm_unlink() and calls it only when needed. Reported-by: Chanho Min Cc: Signed-off-by: Takashi Iwai commit e5bde04ccce64d808f8b00a489a1fe5825d285cb Author: Pan Bian Date: Thu Nov 22 18:00:16 2018 +0800 crypto: do not free algorithm before using In multiple functions, the algorithm fields are read after its reference is dropped through crypto_mod_put. In this case, the algorithm memory may be freed, resulting in use-after-free bugs. This patch delays the put operation until the algorithm is never used. Fixes: 79c65d179a40 ("crypto: cbc - Convert to skcipher") Fixes: a7d85e06ed80 ("crypto: cfb - add support for Cipher FeedBack mode") Fixes: 043a44001b9e ("crypto: pcbc - Convert to skcipher") Cc: Signed-off-by: Pan Bian Signed-off-by: Herbert Xu commit c967590457cae5ba4f018704c341641bdcecfdcf Author: Dexuan Cui Date: Mon Nov 26 00:26:17 2018 +0000 scsi: storvsc: Fix a race in sub-channel creation that can cause panic We can concurrently try to open the same sub-channel from 2 paths: path #1: vmbus_onoffer() -> vmbus_process_offer() -> handle_sc_creation(). path #2: storvsc_probe() -> storvsc_connect_to_vsp() -> -> storvsc_channel_init() -> handle_multichannel_storage() -> -> vmbus_are_subchannels_present() -> handle_sc_creation(). They conflict with each other, but it was not an issue before the recent commit ae6935ed7d42 ("vmbus: split ring buffer allocation from open"), because at the beginning of vmbus_open() we checked newchannel->state so only one path could succeed, and the other would return with -EINVAL. After ae6935ed7d42, the failing path frees the channel's ringbuffer by vmbus_free_ring(), and this causes a panic later. Commit ae6935ed7d42 itself is good, and it just reveals the longstanding race. We can resolve the issue by removing path #2, i.e. removing the second vmbus_are_subchannels_present() in handle_multichannel_storage(). BTW, the comment "Check to see if sub-channels have already been created" in handle_multichannel_storage() is incorrect: when we unload the driver, we first close the sub-channel(s) and then close the primary channel, next the host sends rescind-offer message(s) so primary->sc_list will become empty. This means the first vmbus_are_subchannels_present() in handle_multichannel_storage() is never useful. Fixes: ae6935ed7d42 ("vmbus: split ring buffer allocation from open") Cc: stable@vger.kernel.org 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: Martin K. Petersen commit 528bff0cdb6649f97f2c4802e4ac7a4b50645f2f Author: Yonghong Song Date: Wed Nov 28 09:38:23 2018 -0800 tools: bpftool: fix a bitfield pretty print issue Commit b12d6ec09730 ("bpf: btf: add btf print functionality") added btf pretty print functionality to bpftool. There is a problem though in printing a bitfield whose type has modifiers. For example, for a type like typedef int ___int; struct tmp_t { int a:3; ___int b:3; }; Suppose we have a map struct bpf_map_def SEC("maps") tmpmap = { .type = BPF_MAP_TYPE_HASH, .key_size = sizeof(__u32), .value_size = sizeof(struct tmp_t), .max_entries = 1, }; and the hash table is populated with one element with key 0 and value (.a = 1 and .b = 2). In BTF, the struct member "b" will have a type "typedef" which points to an int type. The current implementation does not pass the bit offset during transition from typedef to int type, hence incorrectly print the value as $ bpftool m d id 79 [{ "key": 0, "value": { "a": 0x1, "b": 0x1 } } ] This patch fixed the issue by carrying bit_offset along the type chain during bit_field print. The correct result can be printed as $ bpftool m d id 76 [{ "key": 0, "value": { "a": 0x1, "b": 0x2 } } ] The kernel pretty print is implemented correctly and does not have this issue. Fixes: b12d6ec09730 ("bpf: btf: add btf print functionality") Signed-off-by: Yonghong Song Acked-by: Song Liu Signed-off-by: Alexei Starovoitov commit ebcdcef30333660d3314158bac362425ade3d28c Merge: 50c187712701 9765635b3075 Author: Dave Airlie Date: Thu Nov 29 10:11:02 2018 +1000 Merge tag 'drm-misc-fixes-2018-11-28-1' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes - mst: Don't try to validate ports while destroying them (Lyude) - Revert: Don't try to validate ports while destroying them (Lyude) - core: Don't set device to master unless set_master succeeds (Sergio) - meson: Do vblank_on/off on enable/disable (Neil) - meson: Use fast_io regmap option to avoid sleeping in irq ctx (Lyude) - meson: Don't walk off the end of the OSD EOTF LUTs (Lyude) Cc: Lyude Paul Cc: Sergio Correia Cc: Neil Armstrong Signed-off-by: Dave Airlie From: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20181128212936.GA21379@art_vandelay commit 50c1877127012b6e8ccc0d8a1a3ad0e1b09e26dd Merge: 5c1c86031ead ad97d9de4583 Author: Dave Airlie Date: Thu Nov 29 10:07:33 2018 +1000 Merge branch 'drm-fixes-4.20' of git://people.freedesktop.org/~agd5f/linux into drm-fixes Fixes for 4.20. Nothing major. - DC DP MST fix - GPUVM fix for huge page mapping - RLC fix for vega20 Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20181128195905.2897-1-alexander.deucher@amd.com commit c2209c6d18d60298303af8353ae1e3f225df996a Merge: d78a5ebd8b18 d08489125e04 Author: Alexei Starovoitov Date: Wed Nov 28 16:03:05 2018 -0800 Merge branch 'btf-check-name' Yonghong Song says: ==================== This patch set added name checking for PTR, ARRAY, VOLATILE, TYPEDEF, CONST, RESTRICT, STRUCT, UNION, ENUM and FWD types. Such a strict name checking makes BTF more sound in the kernel and future BTF-to-header-file converesion ([1]) less fragile. Patch #1 implemented btf_name_valid_identifier() for name checking which will be used in Patch #2. Patch #2 checked name validity for the above mentioned types. Patch #3 fixed two existing test_btf unit tests exposed by the strict name checking. Patch #4 added additional test cases. This patch set is against bpf tree. Patch #1 has been implemented in bpf-next commit Commit 2667a2626f4d ("bpf: btf: Add BTF_KIND_FUNC and BTF_KIND_FUNC_PROTO"), so there is no need to apply this patch to bpf-next. In case this patch is applied to bpf-next, there will be a minor conflict like diff --cc kernel/bpf/btf.c index a09b2f94ab25,93c233ab2db6..000000000000 --- a/kernel/bpf/btf.c +++ b/kernel/bpf/btf.c @@@ -474,7 -451,7 +474,11 @@@ static bool btf_name_valid_identifier(c return !*src; } ++<<<<<<< HEAD +const char *btf_name_by_offset(const struct btf *btf, u32 offset) ++======= + static const char *btf_name_by_offset(const struct btf *btf, u32 offset) ++>>>>>>> fa9566b0847d... bpf: btf: implement btf_name_valid_identifier() { if (!offset) return "(anon)"; Just resolve the conflict by taking the "const char ..." line. Patches #2, #3 and #4 can be applied to bpf-next without conflict. [1]: http://vger.kernel.org/lpc-bpf2018.html#session-2 ==================== Signed-off-by: Alexei Starovoitov commit d08489125e04a9f73d9323caea43270fd22d395f Author: Yonghong Song Date: Tue Nov 27 13:23:30 2018 -0800 tools/bpf: add addition type tests to test_btf The following additional unit testcases are added to test_btf: ... BTF raw test[42] (typedef (invalid name, name_off = 0)): OK BTF raw test[43] (typedef (invalid name, invalid identifier)): OK BTF raw test[44] (ptr type (invalid name, name_off <> 0)): OK BTF raw test[45] (volatile type (invalid name, name_off <> 0)): OK BTF raw test[46] (const type (invalid name, name_off <> 0)): OK BTF raw test[47] (restrict type (invalid name, name_off <> 0)): OK BTF raw test[48] (fwd type (invalid name, name_off = 0)): OK BTF raw test[49] (fwd type (invalid name, invalid identifier)): OK BTF raw test[50] (array type (invalid name, name_off <> 0)): OK BTF raw test[51] (struct type (name_off = 0)): OK BTF raw test[52] (struct type (invalid name, invalid identifier)): OK BTF raw test[53] (struct member (name_off = 0)): OK BTF raw test[54] (struct member (invalid name, invalid identifier)): OK BTF raw test[55] (enum type (name_off = 0)): OK BTF raw test[56] (enum type (invalid name, invalid identifier)): OK BTF raw test[57] (enum member (invalid name, name_off = 0)): OK BTF raw test[58] (enum member (invalid name, invalid identifier)): OK ... Fixes: c0fa1b6c3efc ("bpf: btf: Add BTF tests") Acked-by: Martin KaFai Lau Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov commit 8800cd031af085807028656c6ba7eb7908d78262 Author: Martin KaFai Lau Date: Tue Nov 27 13:23:29 2018 -0800 tools/bpf: fix two test_btf unit test cases There are two unit test cases, which should encode TYPEDEF type, but instead encode PTR type. The error is flagged out after enforcing name checking in the previous patch. Fixes: c0fa1b6c3efc ("bpf: btf: Add BTF tests") Signed-off-by: Martin KaFai Lau Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov commit eb04bbb608e683f8fd3ef7f716e2fa32dd90861f Author: Yonghong Song Date: Tue Nov 27 13:23:28 2018 -0800 bpf: btf: check name validity for various types This patch added name checking for the following types: . BTF_KIND_PTR, BTF_KIND_ARRAY, BTF_KIND_VOLATILE, BTF_KIND_CONST, BTF_KIND_RESTRICT: the name must be null . BTF_KIND_STRUCT, BTF_KIND_UNION: the struct/member name is either null or a valid identifier . BTF_KIND_ENUM: the enum type name is either null or a valid identifier; the enumerator name must be a valid identifier. . BTF_KIND_FWD: the name must be a valid identifier . BTF_KIND_TYPEDEF: the name must be a valid identifier For those places a valid name is required, the name must be a valid C identifier. This can be relaxed later if we found use cases for a different (non-C) frontend. Fixes: 69b693f0aefa ("bpf: btf: Introduce BPF Type Format (BTF)") Acked-by: Martin KaFai Lau Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov commit cdbb096adddb3f42584cecb5ec2e07c26815b71f Author: Yonghong Song Date: Tue Nov 27 13:23:27 2018 -0800 bpf: btf: implement btf_name_valid_identifier() Function btf_name_valid_identifier() have been implemented in bpf-next commit 2667a2626f4d ("bpf: btf: Add BTF_KIND_FUNC and BTF_KIND_FUNC_PROTO"). Backport this function so later patch can use it. Fixes: 69b693f0aefa ("bpf: btf: Introduce BPF Type Format (BTF)") Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov commit 5c1c86031ead5f13674fff31de9c2bf503c1c11a Merge: c5fbf9ebe0aa 2455facbb700 Author: Dave Airlie Date: Thu Nov 29 09:59:12 2018 +1000 Merge tag 'drm-intel-fixes-2018-11-28' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes Just gvt-fixes-2018-11-26 ""One to correct MOCS registers load on engine list, one for rpm lock warning fix, and another for use-after-free fix for partial ggtt list destroy. " Signed-off-by: Dave Airlie From: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20181128180648.GA17585@jlahtine-desk.ger.corp.intel.com commit c5fbf9ebe0aa33ec3cda8461f63ccd90a8f4086a Merge: 300625620314 0bc3544a010c Author: Dave Airlie Date: Thu Nov 29 09:56:29 2018 +1000 Merge tag 'du-fixes-20181126' of git://linuxtv.org/pinchartl/media into drm-fixes R-Car DU v4.20 regression fix Signed-off-by: Dave Airlie From: Laurent Pinchart Link: https://patchwork.freedesktop.org/patch/msgid/8134504.ZSXK7gKU4H@avalon commit 02f425f811cefcc4d325d7a72272651e622dc97e Author: Cathy Avery Date: Tue Nov 27 14:28:53 2018 -0500 scsi: vmw_pscsi: Rearrange code to avoid multiple calls to free_irq during unload Currently pvscsi_remove calls free_irq more than once as pvscsi_release_resources and __pvscsi_shutdown both call pvscsi_shutdown_intr. This results in a 'Trying to free already-free IRQ' warning and stack trace. To solve the problem pvscsi_shutdown_intr has been moved out of pvscsi_release_resources. Signed-off-by: Cathy Avery Reviewed-by: Ewan D. Milne Reviewed-by: Dan Carpenter Signed-off-by: Martin K. Petersen commit 300625620314194d9e6d4f6dda71f2dc9cf62d9f Author: Y.C. Chen Date: Thu Nov 22 11:56:28 2018 +0800 drm/ast: fixed reading monitor EDID not stable issue v1: over-sample data to increase the stability with some specific monitors v2: refine to avoid infinite loop v3: remove un-necessary "volatile" declaration [airlied: fix two checkpatch warnings] Signed-off-by: Y.C. Chen Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/1542858988-1127-1-git-send-email-yc_chen@aspeedtech.com commit dc25ab067645eabd037f1a23d49a666f9e0b8c68 Author: Sam Bobroff Date: Mon Nov 5 16:57:47 2018 +1100 drm/ast: Fix incorrect free on ioregs If the platform has no IO space, ioregs is placed next to the already allocated regs. In this case, it should not be separately freed. This prevents a kernel warning from __vunmap "Trying to vfree() nonexistent vm area" when unloading the driver. Fixes: 0dd68309b9c5 ("drm/ast: Try to use MMIO registers when PIO isn't supported") Signed-off-by: Sam Bobroff Cc: Signed-off-by: Dave Airlie commit 5db6dd14b31397e8cccaaddab2ff44ebec1acf25 Author: Fred Herard Date: Tue Nov 20 20:22:45 2018 -0500 scsi: libiscsi: Fix NULL pointer dereference in iscsi_eh_session_reset This commit addresses NULL pointer dereference in iscsi_eh_session_reset. Reference should not be made to session->leadconn when session->state is set to ISCSI_STATE_TERMINATE. Signed-off-by: Fred Herard Reviewed-by: Konrad Rzeszutek Wilk Reviewed-by: Lee Duncan Signed-off-by: Martin K. Petersen commit 9765635b30756eb74e05e260ac812659c296cd28 Author: Lyude Paul Date: Wed Nov 28 16:00:05 2018 -0500 Revert "drm/dp_mst: Skip validating ports during destruction, just ref" This reverts commit: c54c7374ff44 ("drm/dp_mst: Skip validating ports during destruction, just ref") ugh. In drm_dp_destroy_connector_work(), we have a pretty good chance of freeing the actual struct drm_dp_mst_port. However, after destroying things we send a hotplug through (*mgr->cbs->hotplug)(mgr) which is where the problems start. For i915, this calls all the way down to the fbcon probing helpers, which start trying to access the port in a modeset. [ 45.062001] ================================================================== [ 45.062112] BUG: KASAN: use-after-free in ex_handler_refcount+0x146/0x180 [ 45.062196] Write of size 4 at addr ffff8882b4b70968 by task kworker/3:1/53 [ 45.062325] CPU: 3 PID: 53 Comm: kworker/3:1 Kdump: loaded Tainted: G O 4.20.0-rc4Lyude-Test+ #3 [ 45.062442] Hardware name: LENOVO 20BWS1KY00/20BWS1KY00, BIOS JBET71WW (1.35 ) 09/14/2018 [ 45.062554] Workqueue: events drm_dp_destroy_connector_work [drm_kms_helper] [ 45.062641] Call Trace: [ 45.062685] dump_stack+0xbd/0x15a [ 45.062735] ? dump_stack_print_info.cold.0+0x1b/0x1b [ 45.062801] ? printk+0x9f/0xc5 [ 45.062847] ? kmsg_dump_rewind_nolock+0xe4/0xe4 [ 45.062909] ? ex_handler_refcount+0x146/0x180 [ 45.062970] print_address_description+0x71/0x239 [ 45.063036] ? ex_handler_refcount+0x146/0x180 [ 45.063095] kasan_report.cold.5+0x242/0x30b [ 45.063155] __asan_report_store4_noabort+0x1c/0x20 [ 45.063313] ex_handler_refcount+0x146/0x180 [ 45.063371] ? ex_handler_clear_fs+0xb0/0xb0 [ 45.063428] fixup_exception+0x98/0xd7 [ 45.063484] ? raw_notifier_call_chain+0x20/0x20 [ 45.063548] do_trap+0x6d/0x210 [ 45.063605] ? _GLOBAL__sub_I_65535_1_drm_dp_aux_unregister_devnode+0x2f/0x1c6 [drm_kms_helper] [ 45.063732] do_error_trap+0xc0/0x170 [ 45.063802] ? _GLOBAL__sub_I_65535_1_drm_dp_aux_unregister_devnode+0x2f/0x1c6 [drm_kms_helper] [ 45.063929] do_invalid_op+0x3b/0x50 [ 45.063997] ? _GLOBAL__sub_I_65535_1_drm_dp_aux_unregister_devnode+0x2f/0x1c6 [drm_kms_helper] [ 45.064103] invalid_op+0x14/0x20 [ 45.064162] RIP: 0010:_GLOBAL__sub_I_65535_1_drm_dp_aux_unregister_devnode+0x2f/0x1c6 [drm_kms_helper] [ 45.064274] Code: 00 48 c7 c7 80 fe 53 a0 48 89 e5 e8 5b 6f 26 e1 5d c3 48 8d 0e 0f 0b 48 8d 0b 0f 0b 48 8d 0f 0f 0b 48 8d 0f 0f 0b 49 8d 4d 00 <0f> 0b 49 8d 0e 0f 0b 48 8d 08 0f 0b 49 8d 4d 00 0f 0b 48 8d 0b 0f [ 45.064569] RSP: 0018:ffff8882b789ee10 EFLAGS: 00010282 [ 45.064637] RAX: ffff8882af47ae70 RBX: ffff8882af47aa60 RCX: ffff8882b4b70968 [ 45.064723] RDX: ffff8882af47ae70 RSI: 0000000000000008 RDI: ffff8882b788bdb8 [ 45.064808] RBP: ffff8882b789ee28 R08: ffffed1056f13db4 R09: ffffed1056f13db3 [ 45.064894] R10: ffffed1056f13db3 R11: ffff8882b789ed9f R12: ffff8882af47ad28 [ 45.064980] R13: ffff8882b4b70968 R14: ffff8882acd86728 R15: ffff8882b4b75dc8 [ 45.065084] drm_dp_mst_reset_vcpi_slots+0x12/0x80 [drm_kms_helper] [ 45.065225] intel_mst_disable_dp+0xda/0x180 [i915] [ 45.065361] intel_encoders_disable.isra.107+0x197/0x310 [i915] [ 45.065498] haswell_crtc_disable+0xbe/0x400 [i915] [ 45.065622] ? i9xx_disable_plane+0x1c0/0x3e0 [i915] [ 45.065750] intel_atomic_commit_tail+0x74e/0x3e60 [i915] [ 45.065884] ? intel_pre_plane_update+0xbc0/0xbc0 [i915] [ 45.065968] ? drm_atomic_helper_swap_state+0x88b/0x1d90 [drm_kms_helper] [ 45.066054] ? kasan_check_write+0x14/0x20 [ 45.066165] ? i915_gem_track_fb+0x13a/0x330 [i915] [ 45.066277] ? i915_sw_fence_complete+0xe9/0x140 [i915] [ 45.066406] ? __i915_sw_fence_complete+0xc50/0xc50 [i915] [ 45.066540] intel_atomic_commit+0x72e/0xef0 [i915] [ 45.066635] ? drm_dev_dbg+0x200/0x200 [drm] [ 45.066764] ? intel_atomic_commit_tail+0x3e60/0x3e60 [i915] [ 45.066898] ? intel_atomic_commit_tail+0x3e60/0x3e60 [i915] [ 45.067001] drm_atomic_commit+0xc4/0xf0 [drm] [ 45.067074] restore_fbdev_mode_atomic+0x562/0x780 [drm_kms_helper] [ 45.067166] ? drm_fb_helper_debug_leave+0x690/0x690 [drm_kms_helper] [ 45.067249] ? kasan_check_read+0x11/0x20 [ 45.067324] restore_fbdev_mode+0x127/0x4b0 [drm_kms_helper] [ 45.067364] ? kasan_check_read+0x11/0x20 [ 45.067406] drm_fb_helper_restore_fbdev_mode_unlocked+0x164/0x200 [drm_kms_helper] [ 45.067462] ? drm_fb_helper_hotplug_event+0x30/0x30 [drm_kms_helper] [ 45.067508] ? kasan_check_write+0x14/0x20 [ 45.070360] ? mutex_unlock+0x22/0x40 [ 45.073748] drm_fb_helper_set_par+0xb2/0xf0 [drm_kms_helper] [ 45.075846] drm_fb_helper_hotplug_event.part.33+0x1cd/0x290 [drm_kms_helper] [ 45.078088] drm_fb_helper_hotplug_event+0x1c/0x30 [drm_kms_helper] [ 45.082614] intel_fbdev_output_poll_changed+0x9f/0x140 [i915] [ 45.087069] drm_kms_helper_hotplug_event+0x67/0x90 [drm_kms_helper] [ 45.089319] intel_dp_mst_hotplug+0x37/0x50 [i915] [ 45.091496] drm_dp_destroy_connector_work+0x510/0x6f0 [drm_kms_helper] [ 45.093675] ? drm_dp_update_payload_part1+0x1220/0x1220 [drm_kms_helper] [ 45.095851] ? kasan_check_write+0x14/0x20 [ 45.098473] ? kasan_check_read+0x11/0x20 [ 45.101155] ? strscpy+0x17c/0x530 [ 45.103808] ? __switch_to_asm+0x34/0x70 [ 45.106456] ? syscall_return_via_sysret+0xf/0x7f [ 45.109711] ? read_word_at_a_time+0x20/0x20 [ 45.113138] ? __switch_to_asm+0x40/0x70 [ 45.116529] ? __switch_to_asm+0x34/0x70 [ 45.119891] ? __switch_to_asm+0x40/0x70 [ 45.123224] ? __switch_to_asm+0x34/0x70 [ 45.126540] ? __switch_to_asm+0x34/0x70 [ 45.129824] process_one_work+0x88d/0x15d0 [ 45.133172] ? pool_mayday_timeout+0x850/0x850 [ 45.136459] ? pci_mmcfg_check_reserved+0x110/0x128 [ 45.139739] ? wake_q_add+0xb0/0xb0 [ 45.143010] ? check_preempt_wakeup+0x652/0x1050 [ 45.146304] ? worker_enter_idle+0x29e/0x740 [ 45.149589] ? __schedule+0x1ec0/0x1ec0 [ 45.152937] ? kasan_check_read+0x11/0x20 [ 45.156179] ? _raw_spin_lock_irq+0xa3/0x130 [ 45.159382] ? _raw_read_unlock_irqrestore+0x30/0x30 [ 45.162542] ? kasan_check_write+0x14/0x20 [ 45.165657] worker_thread+0x1a5/0x1470 [ 45.168725] ? set_load_weight+0x2e0/0x2e0 [ 45.171755] ? process_one_work+0x15d0/0x15d0 [ 45.174806] ? __switch_to_asm+0x34/0x70 [ 45.177645] ? __switch_to_asm+0x40/0x70 [ 45.180323] ? __switch_to_asm+0x34/0x70 [ 45.182936] ? __switch_to_asm+0x40/0x70 [ 45.185539] ? __switch_to_asm+0x34/0x70 [ 45.188100] ? __switch_to_asm+0x40/0x70 [ 45.190628] ? __schedule+0x7d4/0x1ec0 [ 45.193143] ? save_stack+0xa9/0xd0 [ 45.195632] ? kasan_check_write+0x10/0x20 [ 45.198162] ? kasan_kmalloc+0xc4/0xe0 [ 45.200609] ? kmem_cache_alloc_trace+0xdd/0x190 [ 45.203046] ? kthread+0x9f/0x3b0 [ 45.205470] ? ret_from_fork+0x35/0x40 [ 45.207876] ? unwind_next_frame+0x43/0x50 [ 45.210273] ? __save_stack_trace+0x82/0x100 [ 45.212658] ? deactivate_slab.isra.67+0x3d4/0x580 [ 45.215026] ? default_wake_function+0x35/0x50 [ 45.217399] ? kasan_check_read+0x11/0x20 [ 45.219825] ? _raw_spin_lock_irqsave+0xae/0x140 [ 45.222174] ? __lock_text_start+0x8/0x8 [ 45.224521] ? replenish_dl_entity.cold.62+0x4f/0x4f [ 45.226868] ? __kthread_parkme+0x87/0xf0 [ 45.229200] kthread+0x2f7/0x3b0 [ 45.231557] ? process_one_work+0x15d0/0x15d0 [ 45.233923] ? kthread_park+0x120/0x120 [ 45.236249] ret_from_fork+0x35/0x40 [ 45.240875] Allocated by task 242: [ 45.243136] save_stack+0x43/0xd0 [ 45.245385] kasan_kmalloc+0xc4/0xe0 [ 45.247597] kmem_cache_alloc_trace+0xdd/0x190 [ 45.249793] drm_dp_add_port+0x1e0/0x2170 [drm_kms_helper] [ 45.252000] drm_dp_send_link_address+0x4a7/0x740 [drm_kms_helper] [ 45.254389] drm_dp_check_and_send_link_address+0x1a7/0x210 [drm_kms_helper] [ 45.256803] drm_dp_mst_link_probe_work+0x6f/0xb0 [drm_kms_helper] [ 45.259200] process_one_work+0x88d/0x15d0 [ 45.261597] worker_thread+0x1a5/0x1470 [ 45.264038] kthread+0x2f7/0x3b0 [ 45.266371] ret_from_fork+0x35/0x40 [ 45.270937] Freed by task 53: [ 45.273170] save_stack+0x43/0xd0 [ 45.275382] __kasan_slab_free+0x139/0x190 [ 45.277604] kasan_slab_free+0xe/0x10 [ 45.279826] kfree+0x99/0x1b0 [ 45.282044] drm_dp_free_mst_port+0x4a/0x60 [drm_kms_helper] [ 45.284330] drm_dp_destroy_connector_work+0x43e/0x6f0 [drm_kms_helper] [ 45.286660] process_one_work+0x88d/0x15d0 [ 45.288934] worker_thread+0x1a5/0x1470 [ 45.291231] kthread+0x2f7/0x3b0 [ 45.293547] ret_from_fork+0x35/0x40 [ 45.298206] The buggy address belongs to the object at ffff8882b4b70968 which belongs to the cache kmalloc-2k of size 2048 [ 45.303047] The buggy address is located 0 bytes inside of 2048-byte region [ffff8882b4b70968, ffff8882b4b71168) [ 45.308010] The buggy address belongs to the page: [ 45.310477] page:ffffea000ad2dc00 count:1 mapcount:0 mapping:ffff8882c080cf40 index:0x0 compound_mapcount: 0 [ 45.313051] flags: 0x8000000000010200(slab|head) [ 45.315635] raw: 8000000000010200 ffffea000aac2808 ffffea000abe8608 ffff8882c080cf40 [ 45.318300] raw: 0000000000000000 00000000000d000d 00000001ffffffff 0000000000000000 [ 45.320966] page dumped because: kasan: bad access detected [ 45.326312] Memory state around the buggy address: [ 45.329085] ffff8882b4b70800: fb fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 45.331845] ffff8882b4b70880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 45.334584] >ffff8882b4b70900: fc fc fc fc fc fc fc fc fc fc fc fc fc fb fb fb [ 45.337302] ^ [ 45.340061] ffff8882b4b70980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 45.342910] ffff8882b4b70a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 45.345748] ================================================================== So, this definitely isn't a fix that we want. This being said; there's no real easy fix for this problem because of some of the catch-22's of the MST helpers current design. For starters; we always need to validate a port with drm_dp_get_validated_port_ref(), but validation relies on the lifetime of the port in the actual topology. So once the port is gone, it can't be validated again. If we were to try to make the payload helpers not use port validation, then we'd cause another problem: if the port isn't validated, it could be freed and we'd just start causing more KASAN issues. There are already hacks that attempt to workaround this in drm_dp_mst_destroy_connector_work() by re-initializing the kref so that it can be used again and it's memory can be freed once the VCPI helpers finish removing the port's respective payloads. But none of these really do anything helpful since the port still can't be validated since it's gone from the topology. Also, that workaround is immensely confusing to read through. What really needs to be done in order to fix this is to teach DRM how to track the lifetime of the structs for MST ports and branch devices separately from their lifetime in the actual topology. Simply put; this means having two different krefs-one that removes the port/branch device from the topology, and one that finally calls kfree(). This would let us simplify things, since we'd now be able to keep ports around without having to keep them in the topology at the same time, which is exactly what we need in order to teach our VCPI helpers to only validate ports when it's actually necessary without running the risk of trying to use unallocated memory. Such a fix is on it's way, but for now let's play it safe and just revert this. If this bug has been around for well over a year, we can wait a little while to get an actual proper fix here. Signed-off-by: Lyude Paul Fixes: c54c7374ff44 ("drm/dp_mst: Skip validating ports during destruction, just ref") Cc: Daniel Vetter Cc: Sean Paul Cc: Jerry Zuo Cc: Harry Wentland Cc: stable@vger.kernel.org # v4.6+ Acked-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20181128210005.24434-1-lyude@redhat.com commit 60b548237fed4b4164bab13c994dd9615f6c4323 Merge: b26b2b24b1d8 d78a5ebd8b18 Author: Linus Torvalds Date: Wed Nov 28 12:53:48 2018 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: 1) ARM64 JIT fixes for subprog handling from Daniel Borkmann. 2) Various sparc64 JIT bug fixes (fused branch convergance, frame pointer usage detection logic, PSEODU call argument handling). 3) Fix to use BH locking in nf_conncount, from Taehee Yoo. 4) Fix race of TX skb freeing in ipheth driver, from Bernd Eckstein. 5) Handle return value of TX NAPI completion properly in lan743x driver, from Bryan Whitehead. 6) MAC filter deletion in i40e driver clears wrong state bit, from Lihong Yang. 7) Fix use after free in rionet driver, from Pan Bian. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (53 commits) s390/qeth: fix length check in SNMP processing net: hisilicon: remove unexpected free_netdev rapidio/rionet: do not free skb before reading its length i40e: fix kerneldoc for xsk methods ixgbe: recognize 1000BaseLX SFP modules as 1Gbps i40e: Fix deletion of MAC filters igb: fix uninitialized variables netfilter: nf_tables: deactivate expressions in rule replecement routine lan743x: Enable driver to work with LAN7431 tipc: fix lockdep warning during node delete lan743x: fix return value for lan743x_tx_napi_poll net: via: via-velocity: fix spelling mistake "alignement" -> "alignment" qed: fix spelling mistake "attnetion" -> "attention" net: thunderx: fix NULL pointer dereference in nic_remove sctp: increase sk_wmem_alloc when head->truesize is increased firestream: fix spelling mistake: "Inititing" -> "Initializing" net: phy: add workaround for issue where PHY driver doesn't bind to the device usbnet: ipheth: fix potential recvmsg bug and recvmsg bug 2 sparc: Adjust bpf JIT prologue for PSEUDO calls. bpf, doc: add entries of who looks over which jits ... commit b26b2b24b1d8cc6e24d81872e6e18c0d76382a81 Merge: 121b018f8c74 38a35a78c5e2 Author: Linus Torvalds Date: Wed Nov 28 12:51:10 2018 -0800 Merge tag 'xtensa-20181128' of git://github.com/jcmvbkbc/linux-xtensa Pull Xtensa fixes from Max Filippov: - fix kernel exception on userspace access to a currently disabled coprocessor - fix coprocessor data saving/restoring in configurations with multiple coprocessors - fix ptrace access to coprocessor data on configurations with multiple coprocessors with high alignment requirements * tag 'xtensa-20181128' of git://github.com/jcmvbkbc/linux-xtensa: xtensa: fix coprocessor part of ptrace_{get,set}xregs xtensa: fix coprocessor context offset definitions xtensa: enable coprocessors that are being flushed commit ad97d9de45835b6a0f71983b0ae0cffd7306730a Author: shaoyunl Date: Thu Nov 22 11:45:24 2018 -0500 drm/amdgpu: Add delay after enable RLC ucode Driver shouldn't try to access any GFX registers until RLC is idle. During the test, it took 12 seconds for RLC to clear the BUSY bit in RLC_GPM_STAT register which is un-acceptable for driver. As per RLC engineer, it would take RLC Ucode less than 10,000 GFXCLK cycles to finish its critical section. In a lowest 300M enginer clock setting(default from vbios), 50 us delay is enough. This commit fix the hang when RLC introduce the work around for XGMI which requires more cycles to setup more registers than normal Signed-off-by: shaoyunl Acked-by: Felix Kuehling Signed-off-by: Alex Deucher commit 1954db153d181e32017804e353e09ffe669c000b Author: Felix Kuehling Date: Sat Nov 24 23:25:04 2018 -0500 drm/amdgpu: Avoid endless loop in GPUVM fragment processing Don't bounce back to the root level for fragment processing, because huge pages are not supported at that level. This is unlikely to happen with the default VM size on Vega, but can be exposed by limiting the VM size with the amdgpu.vm_size module parameter. Signed-off-by: Felix Kuehling Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 9ce2b991f7ea45b913c3c391bb652dd95dd78876 Author: Felix Kuehling Date: Sat Nov 24 22:46:23 2018 -0500 drm/amdgpu: Cast to uint64_t before left shift Avoid potential integer overflows with left shift in huge-page mapping code by casting the operand to uin64_t first. Signed-off-by: Felix Kuehling Reviewed-by: Christian König Signed-off-by: Alex Deucher commit d78a5ebd8b18d3809fd9d6bbaeb64d78a332204f Merge: 9a764c1e5968 529eb362a347 Author: David S. Miller Date: Wed Nov 28 11:33:35 2018 -0800 Merge branch '1GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-queue Jeff Kirsher says: ==================== Intel Wired LAN Driver Fixes 2018-11-28 This series contains fixes to igb, ixgbe and i40e. Yunjian Wang from Huawei resolves a variable that could potentially be NULL before it is used. Lihong fixes an i40e issue which goes back to 4.17 kernels, where deleting any of the MAC filters was causing the incorrect syncing for the PF. Josh Elsasser caught that there were missing enum values in the link capabilities for x550 devices, which was preventing link for 1000BaseLX SFP modules. Jan fixes the function header comments for XSK methods. ==================== Signed-off-by: David S. Miller commit 9a764c1e59684c0358e16ccaafd870629f2cfe67 Author: Julian Wiedmann Date: Wed Nov 28 16:20:50 2018 +0100 s390/qeth: fix length check in SNMP processing The response for a SNMP request can consist of multiple parts, which the cmd callback stages into a kernel buffer until all parts have been received. If the callback detects that the staging buffer provides insufficient space, it bails out with error. This processing is buggy for the first part of the response - while it initially checks for a length of 'data_len', it later copies an additional amount of 'offsetof(struct qeth_snmp_cmd, data)' bytes. Fix the calculation of 'data_len' for the first part of the response. This also nicely cleans up the memcpy code. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Julian Wiedmann Reviewed-by: Ursula Braun Signed-off-by: David S. Miller commit 55e56f06ed71d9441f3abd5b1d3c1a870812b3fe Author: Matthew Wilcox Date: Tue Nov 27 13:16:34 2018 -0800 dax: Don't access a freed inode After we drop the i_pages lock, the inode can be freed at any time. The get_unlocked_entry() code has no choice but to reacquire the lock, so it can't be used here. Create a new wait_entry_unlocked() which takes care not to acquire the lock or dereference the address_space in any way. Fixes: c2a7d2a11552 ("filesystem-dax: Introduce dax_lock_mapping_entry()") Cc: Signed-off-by: Matthew Wilcox Reviewed-by: Jan Kara Signed-off-by: Dan Williams commit c93db7bb6ef3251e0ea48ade311d3e9942748e1c Author: Matthew Wilcox Date: Tue Nov 27 13:16:33 2018 -0800 dax: Check page->mapping isn't NULL If we race with inode destroy, it's possible for page->mapping to be NULL before we even enter this routine, as well as after having slept waiting for the dax entry to become unlocked. Fixes: c2a7d2a11552 ("filesystem-dax: Introduce dax_lock_mapping_entry()") Cc: Reported-by: Jan Kara Signed-off-by: Matthew Wilcox Reviewed-by: Johannes Thumshirn Reviewed-by: Jan Kara Signed-off-by: Dan Williams commit e9d8faf93d273374dc6ae073a35e2fbcbcd97305 Merge: c758940158bf ca08987885a1 Author: David S. Miller Date: Wed Nov 28 11:02:45 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: 1) Disable BH while holding list spinlock in nf_conncount, from Taehee Yoo. 2) List corruption in nf_conncount, also from Taehee. 3) Fix race that results in leaving around an empty list node in nf_conncount, from Taehee Yoo. 4) Proper chain handling for inactive chains from the commit path, from Florian Westphal. This includes a selftest for this. 5) Do duplicate rule handles when replacing rules, also from Florian. 6) Remove net_exit path in xt_RATEEST that results in splat, from Taehee. 7) Possible use-after-free in nft_compat when releasing extensions. From Florian. 8) Memory leak in xt_hashlimit, from Taehee. 9) Call ip_vs_dst_notifier after ipv6_dev_notf, from Xin Long. 10) Fix cttimeout with udplite and gre, from Florian. 11) Preserve oif for IPv6 link-local generated traffic from mangle table, from Alin Nastac. 12) Missing error handling in masquerade notifiers, from Taehee Yoo. 13) Use mutex to protect registration/unregistration of masquerade extensions in order to prevent a race, from Taehee. 14) Incorrect condition check in tree_nodes_free(), also from Taehee. 15) Fix chain counter leak in rule replacement path, from Taehee. ==================== Signed-off-by: David S. Miller commit c758940158bf29fe14e9d0f89d5848f227b48134 Author: Pan Bian Date: Wed Nov 28 15:30:24 2018 +0800 net: hisilicon: remove unexpected free_netdev The net device ndev is freed via free_netdev when failing to register the device. The control flow then jumps to the error handling code block. ndev is used and freed again. Resulting in a use-after-free bug. Signed-off-by: Pan Bian Signed-off-by: David S. Miller commit cfc435198f53a6fa1f656d98466b24967ff457d0 Author: Pan Bian Date: Wed Nov 28 14:53:19 2018 +0800 rapidio/rionet: do not free skb before reading its length skb is freed via dev_kfree_skb_any, however, skb->len is read then. This may result in a use-after-free bug. Fixes: e6161d64263 ("rapidio/rionet: rework driver initialization and removal") Signed-off-by: Pan Bian Signed-off-by: David S. Miller commit dfb7513374c1f8e7cd595106fbdba3fd07ebaf30 Author: Martin Wilck Date: Mon Nov 12 09:58:37 2018 +0100 scsi: lpfc: fix block guard enablement on SLI3 adapters Since f44ac12f1dcc, BG enablement is tracked with the LPFC_SLI3_BG_ENABLED bit, which is set in lpfc_get_cfgparam before lpfc_sli_config_sli_port() is called. The bit shouldn't be cleared before checking the feature. Based on problem analysis by David Bond. Fixes: f44ac12f1dcc "scsi: lpfc: Memory allocation error during driver start-up on power8" Tested-by: David Bond Signed-off-by: Martin Wilck Cc: stable@vger.kernel.org # 4.17.x Cc: stable@vger.kernel.org # 4.18.x Cc: stable@vger.kernel.org # 4.19.x Reviewed-by: Hannes Reinecke Acked-by: James Smart Signed-off-by: Martin K. Petersen commit 529eb362a3477189224e7b7d24983d49448a85db Author: Jan Sokolowski Date: Tue Nov 27 09:35:35 2018 -0800 i40e: fix kerneldoc for xsk methods One method, xsk_umem_setup, had an incorrect kernel doc description, which has been corrected. Also fixes small typos found in the comments. Signed-off-by: Jan Sokolowski Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 121b018f8c74b4e0ba81b4b8ee73a82db3f24b7b Merge: 5b26f7180cdb 42a657f57628 Author: Linus Torvalds Date: Wed Nov 28 08:38:20 2018 -0800 Merge tag 'for-4.20-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fixes from David Sterba: "Some of these bugs are being hit during testing so we'd like to get them merged, otherwise there are usual stability fixes for stable trees" * tag 'for-4.20-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: relocation: set trans to be NULL after ending transaction Btrfs: fix race between enabling quotas and subvolume creation Btrfs: send, fix infinite loop due to directory rename dependencies Btrfs: ensure path name is null terminated at btrfs_control_ioctl Btrfs: fix rare chances for data loss when doing a fast fsync btrfs: Always try all copies when reading extent buffers commit 5b26f7180cdb3406404e6da78741e4e57f9a999e Merge: d8242d22d501 91b9deefedf4 Author: Linus Torvalds Date: Wed Nov 28 08:33:55 2018 -0800 Merge tag 'spi-fix-v4.20-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi fixes from Mark Brown: "A few driver specific fixes here, nothing big or that stands out for anyone other than the driver users. The omap2-mcspi fix is for issues that started showing up with a change in defconfig in this release to make cpuidle get turned on by default" * tag 'spi-fix-v4.20-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: spi: omap2-mcspi: Add missing suspend and resume calls spi: mediatek: use correct mata->xfer_len when in fifo transfer spi: uniphier: fix incorrect property items commit a8bf879af7b1999eba36303ce9cc60e0e7dd816c Author: Josh Elsasser Date: Sat Nov 24 12:57:33 2018 -0800 ixgbe: recognize 1000BaseLX SFP modules as 1Gbps Add the two 1000BaseLX enum values to the X550's check for 1Gbps modules, allowing the core driver code to establish a link over this SFP type. This is done by the out-of-tree driver but the fix wasn't in mainline. Fixes: e23f33367882 ("ixgbe: Fix 1G and 10G link stability for X550EM_x SFP+”) Fixes: 6a14ee0cfb19 ("ixgbe: Add X550 support function pointers") Signed-off-by: Josh Elsasser Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit d8242d22d501b8403c780f306762fbdf889ec0c5 Merge: ef78e5ec9214 fd65d3142f73 Author: Linus Torvalds Date: Wed Nov 28 08:29:18 2018 -0800 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull kvm fixes from Paolo Bonzini: "Bugfixes, many of them reported by syzkaller and mostly predating the merge window" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: kvm: svm: Ensure an IBPB on all affected CPUs when freeing a vmcb kvm: mmu: Fix race in emulated page table writes KVM: nVMX: vmcs12 revision_id is always VMCS12_REVISION even when copied from eVMCS KVM: nVMX: Verify eVMCS revision id match supported eVMCS version on eVMCS VMPTRLD KVM: nVMX/nSVM: Fix bug which sets vcpu->arch.tsc_offset to L1 tsc_offset x86/kvm/vmx: fix old-style function declaration KVM: x86: fix empty-body warnings KVM: VMX: Update shared MSRs to be saved/restored on MSR_EFER.LMA changes KVM: x86: Fix kernel info-leak in KVM_HC_CLOCK_PAIRING hypercall KVM: nVMX: Fix kernel info-leak when enabling KVM_CAP_HYPERV_ENLIGHTENED_VMCS more than once svm: Add mutex_lock to protect apic_access_page_done on AMD systems KVM: X86: Fix scan ioapic use-before-initialization KVM: LAPIC: Fix pv ipis use-before-initialization KVM: VMX: re-add ple_gap module parameter KVM: PPC: Book3S HV: Fix handling for interrupted H_ENTER_NESTED commit eab077aa84331afbda071a213925d4cdbca58941 Author: Lihong Yang Date: Wed Nov 21 09:15:37 2018 -0800 i40e: Fix deletion of MAC filters In __i40e_del_filter function, the flag __I40E_MACVLAN_SYNC_PENDING for the PF state is wrongly set for the VSI. Deleting any of the MAC filters has caused the incorrect syncing for the PF. Fix it by setting this state flag to the intended PF. CC: stable Signed-off-by: Lihong Yang Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit e4c39f7926b4de355f7df75651d75003806aae09 Author: Yunjian Wang Date: Tue Nov 6 16:27:12 2018 +0800 igb: fix uninitialized variables This patch fixes the variable 'phy_word' may be used uninitialized. Signed-off-by: Yunjian Wang Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher commit 9a24ce5b66f9c8190d63b15f4473600db4935f1f Author: Kiran Kumar Modukuri Date: Mon Sep 24 12:02:39 2018 +1000 cachefiles: Fix page leak in cachefiles_read_backing_file while vmscan is active [Description] In a heavily loaded system where the system pagecache is nearing memory limits and fscache is enabled, pages can be leaked by fscache while trying read pages from cachefiles backend. This can happen because two applications can be reading same page from a single mount, two threads can be trying to read the backing page at same time. This results in one of the threads finding that a page for the backing file or netfs file is already in the radix tree. During the error handling cachefiles does not clean up the reference on backing page, leading to page leak. [Fix] The fix is straightforward, to decrement the reference when error is encountered. [dhowells: Note that I've removed the clearance and put of newpage as they aren't attested in the commit message and don't appear to actually achieve anything since a new page is only allocated is newpage!=NULL and any residual new page is cleared before returning.] [Testing] I have tested the fix using following method for 12+ hrs. 1) mkdir -p /mnt/nfs ; mount -o vers=3,fsc :/export /mnt/nfs 2) create 10000 files of 2.8MB in a NFS mount. 3) start a thread to simulate heavy VM presssure (while true ; do echo 3 > /proc/sys/vm/drop_caches ; sleep 1 ; done)& 4) start multiple parallel reader for data set at same time find /mnt/nfs -type f | xargs -P 80 cat > /dev/null & find /mnt/nfs -type f | xargs -P 80 cat > /dev/null & find /mnt/nfs -type f | xargs -P 80 cat > /dev/null & .. .. find /mnt/nfs -type f | xargs -P 80 cat > /dev/null & find /mnt/nfs -type f | xargs -P 80 cat > /dev/null & 5) finally check using cat /proc/fs/fscache/stats | grep -i pages ; free -h , cat /proc/meminfo and page-types -r -b lru to ensure all pages are freed. Reviewed-by: Daniel Axtens Signed-off-by: Shantanu Goel Signed-off-by: Kiran Kumar Modukuri [dja: forward ported to current upstream] Signed-off-by: Daniel Axtens Signed-off-by: David Howells commit 40b412897ccb4b98b2cfb2a0aaabed58dd9e2086 Author: Frieder Schrempf Date: Tue Nov 27 07:44:52 2018 +0000 mtd: nand: Fix memory allocation in nanddev_bbt_init() Fix the size of the buffer allocated to store the in-memory BBT. This bug was previously hidden by a different bug, that was fixed in commit d098093ba06e ("mtd: nand: Fix nanddev_neraseblocks()"). Fixes: 9c3736a3de21 ("mtd: nand: Add core infrastructure to deal with NAND devices") Cc: Signed-off-by: Frieder Schrempf Acked-by: Miquel Raynal Signed-off-by: Boris Brezillon commit 3f2b7b9035107d6096ea438ea3d97dcf0481b6d2 Author: kiran.modukuri Date: Mon Nov 26 15:41:48 2018 +0000 fscache: Fix race in fscache_op_complete() due to split atomic_sub & read The code in fscache_retrieval_complete is using atomic_sub followed by an atomic_read: atomic_sub(n_pages, &op->n_pages); if (atomic_read(&op->n_pages) <= 0) fscache_op_complete(&op->op, true); This causes two threads doing a decrement of n_pages to race with each other seeing the op->refcount 0 at same time - and they end up calling fscache_op_complete() in both the threads leading to an assertion failure. Fix this by using atomic_sub_return_relaxed() instead of two calls. Note that I'm using 'relaxed' rather than, say, 'release' as there aren't multiple variables that appear to need ordering across the release. The oops looks something like: FS-Cache: Assertion failed FS-Cache: 0 > 0 is false ... kernel BUG at /usr/src/linux-4.4.0/fs/fscache/operation.c:449! ... Workqueue: fscache_operation fscache_op_work_func [fscache] ... RIP: 0010:[] fscache_op_complete+0x10d/0x180 [fscache] ... Call Trace: [] cachefiles_read_copier+0x3a9/0x410 [cachefiles] [] fscache_op_work_func+0x22/0x50 [fscache] [] process_one_work+0x150/0x3f0 [] worker_thread+0x11a/0x470 [] ? __schedule+0x359/0x980 [] ? rescuer_thread+0x310/0x310 [] kthread+0xd6/0xf0 [] ? kthread_park+0x60/0x60 [] ret_from_fork+0x3f/0x70 [] ? kthread_park+0x60/0x60 This seen this in 4.4.x kernels and the same bug affects fscache in latest upstreams kernels. Fixes: 1bb4b7f98f36 ("FS-Cache: The retrieval remaining-pages counter needs to be atomic_t") Signed-off-by: Kiran Kumar Modukuri Signed-off-by: David Howells commit e6bc06faf64a83384cc0abc537df954c9d3ff942 Author: David Howells Date: Tue Nov 27 16:34:55 2018 +0000 cachefiles: Fix an assertion failure when trying to update a failed object If cachefiles gets an error other then ENOENT when trying to look up an object in the cache (in this case, EACCES), the object state machine will eventually transition to the DROP_OBJECT state. This state invokes fscache_drop_object() which tries to sync the auxiliary data with the cache (this is done lazily since commit 402cb8dda949d) on an incomplete cache object struct. The problem comes when cachefiles_update_object_xattr() is called to rewrite the xattr holding the data. There's an assertion there that the cache object points to a dentry as we're going to update its xattr. The assertion trips, however, as dentry didn't get set. Fix the problem by skipping the update in cachefiles if the object doesn't refer to a dentry. A better way to do it could be to skip the update from the DROP_OBJECT state handler in fscache, but that might deny the cache the opportunity to update intermediate state. If this error occurs, the kernel log includes lines that look like the following: CacheFiles: Lookup failed error -13 CacheFiles: CacheFiles: Assertion failed ------------[ cut here ]------------ kernel BUG at fs/cachefiles/xattr.c:138! ... Workqueue: fscache_object fscache_object_work_func [fscache] RIP: 0010:cachefiles_update_object_xattr.cold.4+0x18/0x1a [cachefiles] ... Call Trace: cachefiles_update_object+0xdd/0x1c0 [cachefiles] fscache_update_aux_data+0x23/0x30 [fscache] fscache_drop_object+0x18e/0x1c0 [fscache] fscache_object_work_func+0x74/0x2b0 [fscache] process_one_work+0x18d/0x340 worker_thread+0x2e/0x390 ? pwq_unbound_release_workfn+0xd0/0xd0 kthread+0x112/0x130 ? kthread_bind+0x30/0x30 ret_from_fork+0x35/0x40 Note that there are actually two issues here: (1) EACCES happened on a cache object and (2) an oops occurred. I think that the second is a consequence of the first (it certainly looks like it ought to be). This patch only deals with the second. Fixes: 402cb8dda949 ("fscache: Attach the index key and aux data to the cookie") Reported-by: Zhibin Li Signed-off-by: David Howells commit 55a974021ec952ee460dc31ca08722158639de72 Author: Thomas Gleixner Date: Sun Nov 25 19:33:56 2018 +0100 x86/speculation: Provide IBPB always command line options Provide the possibility to enable IBPB always in combination with 'prctl' and 'seccomp'. Add the extra command line options and rework the IBPB selection to evaluate the command instead of the mode selected by the STIPB switch case. Signed-off-by: Thomas Gleixner Reviewed-by: Ingo Molnar Cc: Peter Zijlstra Cc: Andy Lutomirski Cc: Linus Torvalds Cc: Jiri Kosina Cc: Tom Lendacky Cc: Josh Poimboeuf Cc: Andrea Arcangeli Cc: David Woodhouse Cc: Tim Chen Cc: Andi Kleen Cc: Dave Hansen Cc: Casey Schaufler Cc: Asit Mallick Cc: Arjan van de Ven Cc: Jon Masters Cc: Waiman Long Cc: Greg KH Cc: Dave Stewart Cc: Kees Cook Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20181125185006.144047038@linutronix.de commit 6b3e64c237c072797a9ec918654a60e3a46488e2 Author: Thomas Gleixner Date: Sun Nov 25 19:33:55 2018 +0100 x86/speculation: Add seccomp Spectre v2 user space protection mode If 'prctl' mode of user space protection from spectre v2 is selected on the kernel command-line, STIBP and IBPB are applied on tasks which restrict their indirect branch speculation via prctl. SECCOMP enables the SSBD mitigation for sandboxed tasks already, so it makes sense to prevent spectre v2 user space to user space attacks as well. The Intel mitigation guide documents how STIPB works: Setting bit 1 (STIBP) of the IA32_SPEC_CTRL MSR on a logical processor prevents the predicted targets of indirect branches on any logical processor of that core from being controlled by software that executes (or executed previously) on another logical processor of the same core. Ergo setting STIBP protects the task itself from being attacked from a task running on a different hyper-thread and protects the tasks running on different hyper-threads from being attacked. While the document suggests that the branch predictors are shielded between the logical processors, the observed performance regressions suggest that STIBP simply disables the branch predictor more or less completely. Of course the document wording is vague, but the fact that there is also no requirement for issuing IBPB when STIBP is used points clearly in that direction. The kernel still issues IBPB even when STIBP is used until Intel clarifies the whole mechanism. IBPB is issued when the task switches out, so malicious sandbox code cannot mistrain the branch predictor for the next user space task on the same logical processor. Signed-off-by: Jiri Kosina Signed-off-by: Thomas Gleixner Reviewed-by: Ingo Molnar Cc: Peter Zijlstra Cc: Andy Lutomirski Cc: Linus Torvalds Cc: Tom Lendacky Cc: Josh Poimboeuf Cc: Andrea Arcangeli Cc: David Woodhouse Cc: Tim Chen Cc: Andi Kleen Cc: Dave Hansen Cc: Casey Schaufler Cc: Asit Mallick Cc: Arjan van de Ven Cc: Jon Masters Cc: Waiman Long Cc: Greg KH Cc: Dave Stewart Cc: Kees Cook Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20181125185006.051663132@linutronix.de commit 7cc765a67d8e04ef7d772425ca5a2a1e2b894c15 Author: Thomas Gleixner Date: Sun Nov 25 19:33:54 2018 +0100 x86/speculation: Enable prctl mode for spectre_v2_user Now that all prerequisites are in place: - Add the prctl command line option - Default the 'auto' mode to 'prctl' - When SMT state changes, update the static key which controls the conditional STIBP evaluation on context switch. - At init update the static key which controls the conditional IBPB evaluation on context switch. Signed-off-by: Thomas Gleixner Reviewed-by: Ingo Molnar Cc: Peter Zijlstra Cc: Andy Lutomirski Cc: Linus Torvalds Cc: Jiri Kosina Cc: Tom Lendacky Cc: Josh Poimboeuf Cc: Andrea Arcangeli Cc: David Woodhouse Cc: Tim Chen Cc: Andi Kleen Cc: Dave Hansen Cc: Casey Schaufler Cc: Asit Mallick Cc: Arjan van de Ven Cc: Jon Masters Cc: Waiman Long Cc: Greg KH Cc: Dave Stewart Cc: Kees Cook Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20181125185005.958421388@linutronix.de commit 9137bb27e60e554dab694eafa4cca241fa3a694f Author: Thomas Gleixner Date: Sun Nov 25 19:33:53 2018 +0100 x86/speculation: Add prctl() control for indirect branch speculation Add the PR_SPEC_INDIRECT_BRANCH option for the PR_GET_SPECULATION_CTRL and PR_SET_SPECULATION_CTRL prctls to allow fine grained per task control of indirect branch speculation via STIBP and IBPB. Invocations: Check indirect branch speculation status with - prctl(PR_GET_SPECULATION_CTRL, PR_SPEC_INDIRECT_BRANCH, 0, 0, 0); Enable indirect branch speculation with - prctl(PR_SET_SPECULATION_CTRL, PR_SPEC_INDIRECT_BRANCH, PR_SPEC_ENABLE, 0, 0); Disable indirect branch speculation with - prctl(PR_SET_SPECULATION_CTRL, PR_SPEC_INDIRECT_BRANCH, PR_SPEC_DISABLE, 0, 0); Force disable indirect branch speculation with - prctl(PR_SET_SPECULATION_CTRL, PR_SPEC_INDIRECT_BRANCH, PR_SPEC_FORCE_DISABLE, 0, 0); See Documentation/userspace-api/spec_ctrl.rst. Signed-off-by: Tim Chen Signed-off-by: Thomas Gleixner Reviewed-by: Ingo Molnar Cc: Peter Zijlstra Cc: Andy Lutomirski Cc: Linus Torvalds Cc: Jiri Kosina Cc: Tom Lendacky Cc: Josh Poimboeuf Cc: Andrea Arcangeli Cc: David Woodhouse Cc: Andi Kleen Cc: Dave Hansen Cc: Casey Schaufler Cc: Asit Mallick Cc: Arjan van de Ven Cc: Jon Masters Cc: Waiman Long Cc: Greg KH Cc: Dave Stewart Cc: Kees Cook Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20181125185005.866780996@linutronix.de commit 6893a959d7fdebbab5f5aa112c277d5a44435ba1 Author: Thomas Gleixner Date: Sun Nov 25 19:33:52 2018 +0100 x86/speculation: Prepare arch_smt_update() for PRCTL mode The upcoming fine grained per task STIBP control needs to be updated on CPU hotplug as well. Split out the code which controls the strict mode so the prctl control code can be added later. Mark the SMP function call argument __unused while at it. Signed-off-by: Thomas Gleixner Reviewed-by: Ingo Molnar Cc: Peter Zijlstra Cc: Andy Lutomirski Cc: Linus Torvalds Cc: Jiri Kosina Cc: Tom Lendacky Cc: Josh Poimboeuf Cc: Andrea Arcangeli Cc: David Woodhouse Cc: Tim Chen Cc: Andi Kleen Cc: Dave Hansen Cc: Casey Schaufler Cc: Asit Mallick Cc: Arjan van de Ven Cc: Jon Masters Cc: Waiman Long Cc: Greg KH Cc: Dave Stewart Cc: Kees Cook Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20181125185005.759457117@linutronix.de commit 6d991ba509ebcfcc908e009d1db51972a4f7a064 Author: Thomas Gleixner Date: Wed Nov 28 10:56:57 2018 +0100 x86/speculation: Prevent stale SPEC_CTRL msr content The seccomp speculation control operates on all tasks of a process, but only the current task of a process can update the MSR immediately. For the other threads the update is deferred to the next context switch. This creates the following situation with Process A and B: Process A task 2 and Process B task 1 are pinned on CPU1. Process A task 2 does not have the speculation control TIF bit set. Process B task 1 has the speculation control TIF bit set. CPU0 CPU1 MSR bit is set ProcB.T1 schedules out ProcA.T2 schedules in MSR bit is cleared ProcA.T1 seccomp_update() set TIF bit on ProcA.T2 ProcB.T1 schedules in MSR is not updated <-- FAIL This happens because the context switch code tries to avoid the MSR update if the speculation control TIF bits of the incoming and the outgoing task are the same. In the worst case ProcB.T1 and ProcA.T2 are the only tasks scheduling back and forth on CPU1, which keeps the MSR stale forever. In theory this could be remedied by IPIs, but chasing the remote task which could be migrated is complex and full of races. The straight forward solution is to avoid the asychronous update of the TIF bit and defer it to the next context switch. The speculation control state is stored in task_struct::atomic_flags by the prctl and seccomp updates already. Add a new TIF_SPEC_FORCE_UPDATE bit and set this after updating the atomic_flags. Check the bit on context switch and force a synchronous update of the speculation control if set. Use the same mechanism for updating the current task. Reported-by: Tim Chen Signed-off-by: Thomas Gleixner Cc: Peter Zijlstra Cc: Andy Lutomirski Cc: Linus Torvalds Cc: Jiri Kosina Cc: Tom Lendacky Cc: Josh Poimboeuf Cc: Andrea Arcangeli Cc: David Woodhouse Cc: Tim Chen Cc: Andi Kleen Cc: Dave Hansen Cc: Casey Schaufler Cc: Asit Mallick Cc: Arjan van de Ven Cc: Jon Masters Cc: Waiman Long Cc: Greg KH Cc: Dave Stewart Cc: Kees Cook Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/alpine.DEB.2.21.1811272247140.1875@nanos.tec.linutronix.de commit e6da8bb6f9abb2628381904b24163c770e630bac Author: Thomas Gleixner Date: Sun Nov 25 19:33:51 2018 +0100 x86/speculation: Split out TIF update The update of the TIF_SSBD flag and the conditional speculation control MSR update is done in the ssb_prctl_set() function directly. The upcoming prctl support for controlling indirect branch speculation via STIBP needs the same mechanism. Split the code out and make it reusable. Reword the comment about updates for other tasks. Signed-off-by: Thomas Gleixner Reviewed-by: Ingo Molnar Cc: Peter Zijlstra Cc: Andy Lutomirski Cc: Linus Torvalds Cc: Jiri Kosina Cc: Tom Lendacky Cc: Josh Poimboeuf Cc: Andrea Arcangeli Cc: David Woodhouse Cc: Tim Chen Cc: Andi Kleen Cc: Dave Hansen Cc: Casey Schaufler Cc: Asit Mallick Cc: Arjan van de Ven Cc: Jon Masters Cc: Waiman Long Cc: Greg KH Cc: Dave Stewart Cc: Kees Cook Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20181125185005.652305076@linutronix.de commit 46f7ecb1e7359f183f5bbd1e08b90e10e52164f9 Author: Thomas Gleixner Date: Sun Nov 25 19:33:50 2018 +0100 ptrace: Remove unused ptrace_may_access_sched() and MODE_IBRS The IBPB control code in x86 removed the usage. Remove the functionality which was introduced for this. Signed-off-by: Thomas Gleixner Reviewed-by: Ingo Molnar Cc: Peter Zijlstra Cc: Andy Lutomirski Cc: Linus Torvalds Cc: Jiri Kosina Cc: Tom Lendacky Cc: Josh Poimboeuf Cc: Andrea Arcangeli Cc: David Woodhouse Cc: Tim Chen Cc: Andi Kleen Cc: Dave Hansen Cc: Casey Schaufler Cc: Asit Mallick Cc: Arjan van de Ven Cc: Jon Masters Cc: Waiman Long Cc: Greg KH Cc: Dave Stewart Cc: Kees Cook Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20181125185005.559149393@linutronix.de commit 4c71a2b6fd7e42814aa68a6dec88abf3b42ea573 Author: Thomas Gleixner Date: Sun Nov 25 19:33:49 2018 +0100 x86/speculation: Prepare for conditional IBPB in switch_mm() The IBPB speculation barrier is issued from switch_mm() when the kernel switches to a user space task with a different mm than the user space task which ran last on the same CPU. An additional optimization is to avoid IBPB when the incoming task can be ptraced by the outgoing task. This optimization only works when switching directly between two user space tasks. When switching from a kernel task to a user space task the optimization fails because the previous task cannot be accessed anymore. So for quite some scenarios the optimization is just adding overhead. The upcoming conditional IBPB support will issue IBPB only for user space tasks which have the TIF_SPEC_IB bit set. This requires to handle the following cases: 1) Switch from a user space task (potential attacker) which has TIF_SPEC_IB set to a user space task (potential victim) which has TIF_SPEC_IB not set. 2) Switch from a user space task (potential attacker) which has TIF_SPEC_IB not set to a user space task (potential victim) which has TIF_SPEC_IB set. This needs to be optimized for the case where the IBPB can be avoided when only kernel threads ran in between user space tasks which belong to the same process. The current check whether two tasks belong to the same context is using the tasks context id. While correct, it's simpler to use the mm pointer because it allows to mangle the TIF_SPEC_IB bit into it. The context id based mechanism requires extra storage, which creates worse code. When a task is scheduled out its TIF_SPEC_IB bit is mangled as bit 0 into the per CPU storage which is used to track the last user space mm which was running on a CPU. This bit can be used together with the TIF_SPEC_IB bit of the incoming task to make the decision whether IBPB needs to be issued or not to cover the two cases above. As conditional IBPB is going to be the default, remove the dubious ptrace check for the IBPB always case and simply issue IBPB always when the process changes. Move the storage to a different place in the struct as the original one created a hole. Signed-off-by: Thomas Gleixner Reviewed-by: Ingo Molnar Cc: Peter Zijlstra Cc: Andy Lutomirski Cc: Linus Torvalds Cc: Jiri Kosina Cc: Tom Lendacky Cc: Josh Poimboeuf Cc: Andrea Arcangeli Cc: David Woodhouse Cc: Tim Chen Cc: Andi Kleen Cc: Dave Hansen Cc: Casey Schaufler Cc: Asit Mallick Cc: Arjan van de Ven Cc: Jon Masters Cc: Waiman Long Cc: Greg KH Cc: Dave Stewart Cc: Kees Cook Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20181125185005.466447057@linutronix.de commit 5635d99953f04b550738f6f4c1c532667c3fd872 Author: Thomas Gleixner Date: Sun Nov 25 19:33:48 2018 +0100 x86/speculation: Avoid __switch_to_xtra() calls The TIF_SPEC_IB bit does not need to be evaluated in the decision to invoke __switch_to_xtra() when: - CONFIG_SMP is disabled - The conditional STIPB mode is disabled The TIF_SPEC_IB bit still controls IBPB in both cases so the TIF work mask checks might invoke __switch_to_xtra() for nothing if TIF_SPEC_IB is the only set bit in the work masks. Optimize it out by masking the bit at compile time for CONFIG_SMP=n and at run time when the static key controlling the conditional STIBP mode is disabled. Signed-off-by: Thomas Gleixner Reviewed-by: Ingo Molnar Cc: Peter Zijlstra Cc: Andy Lutomirski Cc: Linus Torvalds Cc: Jiri Kosina Cc: Tom Lendacky Cc: Josh Poimboeuf Cc: Andrea Arcangeli Cc: David Woodhouse Cc: Tim Chen Cc: Andi Kleen Cc: Dave Hansen Cc: Casey Schaufler Cc: Asit Mallick Cc: Arjan van de Ven Cc: Jon Masters Cc: Waiman Long Cc: Greg KH Cc: Dave Stewart Cc: Kees Cook Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20181125185005.374062201@linutronix.de commit ff16701a29cba3aafa0bd1656d766813b2d0a811 Author: Thomas Gleixner Date: Sun Nov 25 19:33:47 2018 +0100 x86/process: Consolidate and simplify switch_to_xtra() code Move the conditional invocation of __switch_to_xtra() into an inline function so the logic can be shared between 32 and 64 bit. Remove the handthrough of the TSS pointer and retrieve the pointer directly in the bitmap handling function. Use this_cpu_ptr() instead of the per_cpu() indirection. This is a preparatory change so integration of conditional indirect branch speculation optimization happens only in one place. Signed-off-by: Thomas Gleixner Reviewed-by: Ingo Molnar Cc: Peter Zijlstra Cc: Andy Lutomirski Cc: Linus Torvalds Cc: Jiri Kosina Cc: Tom Lendacky Cc: Josh Poimboeuf Cc: Andrea Arcangeli Cc: David Woodhouse Cc: Tim Chen Cc: Andi Kleen Cc: Dave Hansen Cc: Casey Schaufler Cc: Asit Mallick Cc: Arjan van de Ven Cc: Jon Masters Cc: Waiman Long Cc: Greg KH Cc: Dave Stewart Cc: Kees Cook Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20181125185005.280855518@linutronix.de commit 5bfbe3ad5840d941b89bcac54b821ba14f50a0ba Author: Tim Chen Date: Sun Nov 25 19:33:46 2018 +0100 x86/speculation: Prepare for per task indirect branch speculation control To avoid the overhead of STIBP always on, it's necessary to allow per task control of STIBP. Add a new task flag TIF_SPEC_IB and evaluate it during context switch if SMT is active and flag evaluation is enabled by the speculation control code. Add the conditional evaluation to x86_virt_spec_ctrl() as well so the guest/host switch works properly. This has no effect because TIF_SPEC_IB cannot be set yet and the static key which controls evaluation is off. Preparatory patch for adding the control code. [ tglx: Simplify the context switch logic and make the TIF evaluation depend on SMP=y and on the static key controlling the conditional update. Rename it to TIF_SPEC_IB because it controls both STIBP and IBPB ] Signed-off-by: Tim Chen Signed-off-by: Thomas Gleixner Reviewed-by: Ingo Molnar Cc: Peter Zijlstra Cc: Andy Lutomirski Cc: Linus Torvalds Cc: Jiri Kosina Cc: Tom Lendacky Cc: Josh Poimboeuf Cc: Andrea Arcangeli Cc: David Woodhouse Cc: Andi Kleen Cc: Dave Hansen Cc: Casey Schaufler Cc: Asit Mallick Cc: Arjan van de Ven Cc: Jon Masters Cc: Waiman Long Cc: Greg KH Cc: Dave Stewart Cc: Kees Cook Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20181125185005.176917199@linutronix.de commit fa1202ef224391b6f5b26cdd44cc50495e8fab54 Author: Thomas Gleixner Date: Sun Nov 25 19:33:45 2018 +0100 x86/speculation: Add command line control for indirect branch speculation Add command line control for user space indirect branch speculation mitigations. The new option is: spectre_v2_user= The initial options are: - on: Unconditionally enabled - off: Unconditionally disabled -auto: Kernel selects mitigation (default off for now) When the spectre_v2= command line argument is either 'on' or 'off' this implies that the application to application control follows that state even if a contradicting spectre_v2_user= argument is supplied. Originally-by: Tim Chen Signed-off-by: Thomas Gleixner Reviewed-by: Ingo Molnar Cc: Peter Zijlstra Cc: Andy Lutomirski Cc: Linus Torvalds Cc: Jiri Kosina Cc: Tom Lendacky Cc: Josh Poimboeuf Cc: Andrea Arcangeli Cc: David Woodhouse Cc: Andi Kleen Cc: Dave Hansen Cc: Casey Schaufler Cc: Asit Mallick Cc: Arjan van de Ven Cc: Jon Masters Cc: Waiman Long Cc: Greg KH Cc: Dave Stewart Cc: Kees Cook Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20181125185005.082720373@linutronix.de commit 495d470e9828500e0155027f230449ac5e29c025 Author: Thomas Gleixner Date: Sun Nov 25 19:33:44 2018 +0100 x86/speculation: Unify conditional spectre v2 print functions There is no point in having two functions and a conditional at the call site. Signed-off-by: Thomas Gleixner Reviewed-by: Ingo Molnar Cc: Peter Zijlstra Cc: Andy Lutomirski Cc: Linus Torvalds Cc: Jiri Kosina Cc: Tom Lendacky Cc: Josh Poimboeuf Cc: Andrea Arcangeli Cc: David Woodhouse Cc: Tim Chen Cc: Andi Kleen Cc: Dave Hansen Cc: Casey Schaufler Cc: Asit Mallick Cc: Arjan van de Ven Cc: Jon Masters Cc: Waiman Long Cc: Greg KH Cc: Dave Stewart Cc: Kees Cook Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20181125185004.986890749@linutronix.de commit 30ba72a990f5096ae08f284de17986461efcc408 Author: Thomas Gleixner Date: Sun Nov 25 19:33:43 2018 +0100 x86/speculataion: Mark command line parser data __initdata No point to keep that around. Signed-off-by: Thomas Gleixner Reviewed-by: Ingo Molnar Cc: Peter Zijlstra Cc: Andy Lutomirski Cc: Linus Torvalds Cc: Jiri Kosina Cc: Tom Lendacky Cc: Josh Poimboeuf Cc: Andrea Arcangeli Cc: David Woodhouse Cc: Tim Chen Cc: Andi Kleen Cc: Dave Hansen Cc: Casey Schaufler Cc: Asit Mallick Cc: Arjan van de Ven Cc: Jon Masters Cc: Waiman Long Cc: Greg KH Cc: Dave Stewart Cc: Kees Cook Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20181125185004.893886356@linutronix.de commit 8770709f411763884535662744a3786a1806afd3 Author: Thomas Gleixner Date: Sun Nov 25 19:33:42 2018 +0100 x86/speculation: Mark string arrays const correctly checkpatch.pl muttered when reshuffling the code: WARNING: static const char * array should probably be static const char * const Fix up all the string arrays. Signed-off-by: Thomas Gleixner Reviewed-by: Ingo Molnar Cc: Peter Zijlstra Cc: Andy Lutomirski Cc: Linus Torvalds Cc: Jiri Kosina Cc: Tom Lendacky Cc: Josh Poimboeuf Cc: Andrea Arcangeli Cc: David Woodhouse Cc: Tim Chen Cc: Andi Kleen Cc: Dave Hansen Cc: Casey Schaufler Cc: Asit Mallick Cc: Arjan van de Ven Cc: Jon Masters Cc: Waiman Long Cc: Greg KH Cc: Dave Stewart Cc: Kees Cook Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20181125185004.800018931@linutronix.de commit 15d6b7aab0793b2de8a05d8a828777dd24db424e Author: Thomas Gleixner Date: Sun Nov 25 19:33:41 2018 +0100 x86/speculation: Reorder the spec_v2 code Reorder the code so it is better grouped. No functional change. Signed-off-by: Thomas Gleixner Reviewed-by: Ingo Molnar Cc: Peter Zijlstra Cc: Andy Lutomirski Cc: Linus Torvalds Cc: Jiri Kosina Cc: Tom Lendacky Cc: Josh Poimboeuf Cc: Andrea Arcangeli Cc: David Woodhouse Cc: Tim Chen Cc: Andi Kleen Cc: Dave Hansen Cc: Casey Schaufler Cc: Asit Mallick Cc: Arjan van de Ven Cc: Jon Masters Cc: Waiman Long Cc: Greg KH Cc: Dave Stewart Cc: Kees Cook Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20181125185004.707122879@linutronix.de commit 130d6f946f6f2a972ee3ec8540b7243ab99abe97 Author: Thomas Gleixner Date: Sun Nov 25 19:33:40 2018 +0100 x86/l1tf: Show actual SMT state Use the now exposed real SMT state, not the SMT sysfs control knob state. This reflects the state of the system when the mitigation status is queried. This does not change the warning in the VMX launch code. There the dependency on the control knob makes sense because siblings could be brought online anytime after launching the VM. Signed-off-by: Thomas Gleixner Reviewed-by: Ingo Molnar Cc: Peter Zijlstra Cc: Andy Lutomirski Cc: Linus Torvalds Cc: Jiri Kosina Cc: Tom Lendacky Cc: Josh Poimboeuf Cc: Andrea Arcangeli Cc: David Woodhouse Cc: Tim Chen Cc: Andi Kleen Cc: Dave Hansen Cc: Casey Schaufler Cc: Asit Mallick Cc: Arjan van de Ven Cc: Jon Masters Cc: Waiman Long Cc: Greg KH Cc: Dave Stewart Cc: Kees Cook Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20181125185004.613357354@linutronix.de commit a74cfffb03b73d41e08f84c2e5c87dec0ce3db9f Author: Thomas Gleixner Date: Sun Nov 25 19:33:39 2018 +0100 x86/speculation: Rework SMT state change arch_smt_update() is only called when the sysfs SMT control knob is changed. This means that when SMT is enabled in the sysfs control knob the system is considered to have SMT active even if all siblings are offline. To allow finegrained control of the speculation mitigations, the actual SMT state is more interesting than the fact that siblings could be enabled. Rework the code, so arch_smt_update() is invoked from each individual CPU hotplug function, and simplify the update function while at it. Signed-off-by: Thomas Gleixner Reviewed-by: Ingo Molnar Cc: Peter Zijlstra Cc: Andy Lutomirski Cc: Linus Torvalds Cc: Jiri Kosina Cc: Tom Lendacky Cc: Josh Poimboeuf Cc: Andrea Arcangeli Cc: David Woodhouse Cc: Tim Chen Cc: Andi Kleen Cc: Dave Hansen Cc: Casey Schaufler Cc: Asit Mallick Cc: Arjan van de Ven Cc: Jon Masters Cc: Waiman Long Cc: Greg KH Cc: Dave Stewart Cc: Kees Cook Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20181125185004.521974984@linutronix.de commit 321a874a7ef85655e93b3206d0f36b4a6097f948 Author: Thomas Gleixner Date: Sun Nov 25 19:33:38 2018 +0100 sched/smt: Expose sched_smt_present static key Make the scheduler's 'sched_smt_present' static key globaly available, so it can be used in the x86 speculation control code. Provide a query function and a stub for the CONFIG_SMP=n case. Signed-off-by: Thomas Gleixner Reviewed-by: Ingo Molnar Cc: Peter Zijlstra Cc: Andy Lutomirski Cc: Linus Torvalds Cc: Jiri Kosina Cc: Tom Lendacky Cc: Josh Poimboeuf Cc: Andrea Arcangeli Cc: David Woodhouse Cc: Tim Chen Cc: Andi Kleen Cc: Dave Hansen Cc: Casey Schaufler Cc: Asit Mallick Cc: Arjan van de Ven Cc: Jon Masters Cc: Waiman Long Cc: Greg KH Cc: Dave Stewart Cc: Kees Cook Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20181125185004.430168326@linutronix.de commit dbe733642e01dd108f71436aaea7b328cb28fd87 Author: Thomas Gleixner Date: Sun Nov 25 19:33:37 2018 +0100 x86/Kconfig: Select SCHED_SMT if SMP enabled CONFIG_SCHED_SMT is enabled by all distros, so there is not a real point to have it configurable. The runtime overhead in the core scheduler code is minimal because the actual SMT scheduling parts are conditional on a static key. This allows to expose the scheduler's SMT state static key to the speculation control code. Alternatively the scheduler's static key could be made always available when CONFIG_SMP is enabled, but that's just adding an unused static key to every other architecture for nothing. Signed-off-by: Thomas Gleixner Reviewed-by: Ingo Molnar Cc: Peter Zijlstra Cc: Andy Lutomirski Cc: Linus Torvalds Cc: Jiri Kosina Cc: Tom Lendacky Cc: Josh Poimboeuf Cc: Andrea Arcangeli Cc: David Woodhouse Cc: Tim Chen Cc: Andi Kleen Cc: Dave Hansen Cc: Casey Schaufler Cc: Asit Mallick Cc: Arjan van de Ven Cc: Jon Masters Cc: Waiman Long Cc: Greg KH Cc: Dave Stewart Cc: Kees Cook Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20181125185004.337452245@linutronix.de commit c5511d03ec090980732e929c318a7a6374b5550e Author: Peter Zijlstra (Intel) Date: Sun Nov 25 19:33:36 2018 +0100 sched/smt: Make sched_smt_present track topology Currently the 'sched_smt_present' static key is enabled when at CPU bringup SMT topology is observed, but it is never disabled. However there is demand to also disable the key when the topology changes such that there is no SMT present anymore. Implement this by making the key count the number of cores that have SMT enabled. In particular, the SMT topology bits are set before interrrupts are enabled and similarly, are cleared after interrupts are disabled for the last time and the CPU dies. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner Reviewed-by: Ingo Molnar Cc: Andy Lutomirski Cc: Linus Torvalds Cc: Jiri Kosina Cc: Tom Lendacky Cc: Josh Poimboeuf Cc: Andrea Arcangeli Cc: David Woodhouse Cc: Tim Chen Cc: Andi Kleen Cc: Dave Hansen Cc: Casey Schaufler Cc: Asit Mallick Cc: Arjan van de Ven Cc: Jon Masters Cc: Waiman Long Cc: Greg KH Cc: Dave Stewart Cc: Kees Cook Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20181125185004.246110444@linutronix.de commit 01daf56875ee0cd50ed496a09b20eb369b45dfa5 Author: Tim Chen Date: Sun Nov 25 19:33:35 2018 +0100 x86/speculation: Reorganize speculation control MSRs update The logic to detect whether there's a change in the previous and next task's flag relevant to update speculation control MSRs is spread out across multiple functions. Consolidate all checks needed for updating speculation control MSRs into the new __speculation_ctrl_update() helper function. This makes it easy to pick the right speculation control MSR and the bits in MSR_IA32_SPEC_CTRL that need updating based on TIF flags changes. Originally-by: Thomas Lendacky Signed-off-by: Tim Chen Signed-off-by: Thomas Gleixner Reviewed-by: Ingo Molnar Cc: Peter Zijlstra Cc: Andy Lutomirski Cc: Linus Torvalds Cc: Jiri Kosina Cc: Tom Lendacky Cc: Josh Poimboeuf Cc: Andrea Arcangeli Cc: David Woodhouse Cc: Andi Kleen Cc: Dave Hansen Cc: Casey Schaufler Cc: Asit Mallick Cc: Arjan van de Ven Cc: Jon Masters Cc: Waiman Long Cc: Greg KH Cc: Dave Stewart Cc: Kees Cook Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20181125185004.151077005@linutronix.de commit 26c4d75b234040c11728a8acb796b3a85ba7507c Author: Thomas Gleixner Date: Sun Nov 25 19:33:34 2018 +0100 x86/speculation: Rename SSBD update functions During context switch, the SSBD bit in SPEC_CTRL MSR is updated according to changes of the TIF_SSBD flag in the current and next running task. Currently, only the bit controlling speculative store bypass disable in SPEC_CTRL MSR is updated and the related update functions all have "speculative_store" or "ssb" in their names. For enhanced mitigation control other bits in SPEC_CTRL MSR need to be updated as well, which makes the SSB names inadequate. Rename the "speculative_store*" functions to a more generic name. No functional change. Signed-off-by: Tim Chen Signed-off-by: Thomas Gleixner Reviewed-by: Ingo Molnar Cc: Peter Zijlstra Cc: Andy Lutomirski Cc: Linus Torvalds Cc: Jiri Kosina Cc: Tom Lendacky Cc: Josh Poimboeuf Cc: Andrea Arcangeli Cc: David Woodhouse Cc: Andi Kleen Cc: Dave Hansen Cc: Casey Schaufler Cc: Asit Mallick Cc: Arjan van de Ven Cc: Jon Masters Cc: Waiman Long Cc: Greg KH Cc: Dave Stewart Cc: Kees Cook Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20181125185004.058866968@linutronix.de commit 34bce7c9690b1d897686aac89604ba7adc365556 Author: Tim Chen Date: Sun Nov 25 19:33:33 2018 +0100 x86/speculation: Disable STIBP when enhanced IBRS is in use If enhanced IBRS is active, STIBP is redundant for mitigating Spectre v2 user space exploits from hyperthread sibling. Disable STIBP when enhanced IBRS is used. Signed-off-by: Tim Chen Signed-off-by: Thomas Gleixner Reviewed-by: Ingo Molnar Cc: Peter Zijlstra Cc: Andy Lutomirski Cc: Linus Torvalds Cc: Jiri Kosina Cc: Tom Lendacky Cc: Josh Poimboeuf Cc: Andrea Arcangeli Cc: David Woodhouse Cc: Andi Kleen Cc: Dave Hansen Cc: Casey Schaufler Cc: Asit Mallick Cc: Arjan van de Ven Cc: Jon Masters Cc: Waiman Long Cc: Greg KH Cc: Dave Stewart Cc: Kees Cook Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20181125185003.966801480@linutronix.de commit a8f76ae41cd633ac00be1b3019b1eb4741be3828 Author: Tim Chen Date: Sun Nov 25 19:33:32 2018 +0100 x86/speculation: Move STIPB/IBPB string conditionals out of cpu_show_common() The Spectre V2 printout in cpu_show_common() handles conditionals for the various mitigation methods directly in the sprintf() argument list. That's hard to read and will become unreadable if more complex decisions need to be made for a particular method. Move the conditionals for STIBP and IBPB string selection into helper functions, so they can be extended later on. Signed-off-by: Tim Chen Signed-off-by: Thomas Gleixner Reviewed-by: Ingo Molnar Cc: Peter Zijlstra Cc: Andy Lutomirski Cc: Linus Torvalds Cc: Jiri Kosina Cc: Tom Lendacky Cc: Josh Poimboeuf Cc: Andrea Arcangeli Cc: David Woodhouse Cc: Andi Kleen Cc: Dave Hansen Cc: Casey Schaufler Cc: Asit Mallick Cc: Arjan van de Ven Cc: Jon Masters Cc: Waiman Long Cc: Greg KH Cc: Dave Stewart Cc: Kees Cook Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20181125185003.874479208@linutronix.de commit b86bda0426853bfe8a3506c7d2a5b332760ae46b Author: Tim Chen Date: Sun Nov 25 19:33:31 2018 +0100 x86/speculation: Remove unnecessary ret variable in cpu_show_common() Signed-off-by: Tim Chen Signed-off-by: Thomas Gleixner Reviewed-by: Ingo Molnar Cc: Peter Zijlstra Cc: Andy Lutomirski Cc: Linus Torvalds Cc: Jiri Kosina Cc: Tom Lendacky Cc: Josh Poimboeuf Cc: Andrea Arcangeli Cc: David Woodhouse Cc: Andi Kleen Cc: Dave Hansen Cc: Casey Schaufler Cc: Asit Mallick Cc: Arjan van de Ven Cc: Jon Masters Cc: Waiman Long Cc: Greg KH Cc: Dave Stewart Cc: Kees Cook Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20181125185003.783903657@linutronix.de commit 24848509aa55eac39d524b587b051f4e86df3c12 Author: Tim Chen Date: Sun Nov 25 19:33:30 2018 +0100 x86/speculation: Clean up spectre_v2_parse_cmdline() Remove the unnecessary 'else' statement in spectre_v2_parse_cmdline() to save an indentation level. Signed-off-by: Tim Chen Signed-off-by: Thomas Gleixner Reviewed-by: Ingo Molnar Cc: Peter Zijlstra Cc: Andy Lutomirski Cc: Linus Torvalds Cc: Jiri Kosina Cc: Tom Lendacky Cc: Josh Poimboeuf Cc: Andrea Arcangeli Cc: David Woodhouse Cc: Andi Kleen Cc: Dave Hansen Cc: Casey Schaufler Cc: Asit Mallick Cc: Arjan van de Ven Cc: Jon Masters Cc: Waiman Long Cc: Greg KH Cc: Dave Stewart Cc: Kees Cook Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20181125185003.688010903@linutronix.de commit 8eb729b77faf83ac4c1f363a9ad68d042415f24c Author: Tim Chen Date: Sun Nov 25 19:33:29 2018 +0100 x86/speculation: Update the TIF_SSBD comment "Reduced Data Speculation" is an obsolete term. The correct new name is "Speculative store bypass disable" - which is abbreviated into SSBD. Signed-off-by: Tim Chen Signed-off-by: Thomas Gleixner Reviewed-by: Ingo Molnar Cc: Peter Zijlstra Cc: Andy Lutomirski Cc: Linus Torvalds Cc: Jiri Kosina Cc: Tom Lendacky Cc: Josh Poimboeuf Cc: Andrea Arcangeli Cc: David Woodhouse Cc: Andi Kleen Cc: Dave Hansen Cc: Casey Schaufler Cc: Asit Mallick Cc: Arjan van de Ven Cc: Jon Masters Cc: Waiman Long Cc: Greg KH Cc: Dave Stewart Cc: Kees Cook Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20181125185003.593893901@linutronix.de commit ef014aae8f1cd2793e4e014bbb102bed53f852b7 Author: Zhenzhong Duan Date: Fri Nov 2 01:45:41 2018 -0700 x86/retpoline: Remove minimal retpoline support Now that CONFIG_RETPOLINE hard depends on compiler support, there is no reason to keep the minimal retpoline support around which only provided basic protection in the assembly files. Suggested-by: Peter Zijlstra Signed-off-by: Zhenzhong Duan Signed-off-by: Thomas Gleixner Cc: David Woodhouse Cc: Borislav Petkov Cc: H. Peter Anvin Cc: Konrad Rzeszutek Wilk Cc: Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/f06f0a89-5587-45db-8ed2-0a9d6638d5c0@default commit 4cd24de3a0980bf3100c9dcb08ef65ca7c31af48 Author: Zhenzhong Duan Date: Fri Nov 2 01:45:41 2018 -0700 x86/retpoline: Make CONFIG_RETPOLINE depend on compiler support Since retpoline capable compilers are widely available, make CONFIG_RETPOLINE hard depend on the compiler capability. Break the build when CONFIG_RETPOLINE is enabled and the compiler does not support it. Emit an error message in that case: "arch/x86/Makefile:226: *** You are building kernel with non-retpoline compiler, please update your compiler.. Stop." [dwmw: Fail the build with non-retpoline compiler] Suggested-by: Peter Zijlstra Signed-off-by: Zhenzhong Duan Signed-off-by: Thomas Gleixner Cc: David Woodhouse Cc: Borislav Petkov Cc: Daniel Borkmann Cc: H. Peter Anvin Cc: Konrad Rzeszutek Wilk Cc: Andy Lutomirski Cc: Masahiro Yamada Cc: Michal Marek Cc: Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/cca0cb20-f9e2-4094-840b-fb0f8810cd34@default commit 8159a6a4a7d2a092d5375f695ecfca22b4562b5f Author: Hui Wang Date: Wed Nov 28 17:11:26 2018 +0800 ALSA: usb-audio: Add vendor and product name for Dell WD19 Dock Like the Dell WD15 Dock, the WD19 Dock (0bda:402e) doens't provide useful string for the vendor and product names too. In order to share the UCM with WD15, here we keep the profile_name same as the WD15. Signed-off-by: Hui Wang Signed-off-by: Takashi Iwai commit ca08987885a147643817d02bf260bc4756ce8cd4 Author: Taehee Yoo Date: Wed Nov 28 11:27:28 2018 +0900 netfilter: nf_tables: deactivate expressions in rule replecement routine There is no expression deactivation call from the rule replacement path, hence, chain counter is not decremented. A few steps to reproduce the problem: %nft add table ip filter %nft add chain ip filter c1 %nft add chain ip filter c1 %nft add rule ip filter c1 jump c2 %nft replace rule ip filter c1 handle 3 accept %nft flush ruleset expression means immediate NFT_JUMP to chain c2. Reference count of chain c2 is increased when the rule is added. When rule is deleted or replaced, the reference counter of c2 should be decreased via nft_rule_expr_deactivate() which calls nft_immediate_deactivate(). Splat looks like: [ 214.396453] WARNING: CPU: 1 PID: 21 at net/netfilter/nf_tables_api.c:1432 nf_tables_chain_destroy.isra.38+0x2f9/0x3a0 [nf_tables] [ 214.398983] Modules linked in: nf_tables nfnetlink [ 214.398983] CPU: 1 PID: 21 Comm: kworker/1:1 Not tainted 4.20.0-rc2+ #44 [ 214.398983] Workqueue: events nf_tables_trans_destroy_work [nf_tables] [ 214.398983] RIP: 0010:nf_tables_chain_destroy.isra.38+0x2f9/0x3a0 [nf_tables] [ 214.398983] Code: 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 80 3c 02 00 0f 85 8e 00 00 00 48 8b 7b 58 e8 e1 2c 4e c6 48 89 df e8 d9 2c 4e c6 eb 9a <0f> 0b eb 96 0f 0b e9 7e fe ff ff e8 a7 7e 4e c6 e9 a4 fe ff ff e8 [ 214.398983] RSP: 0018:ffff8881152874e8 EFLAGS: 00010202 [ 214.398983] RAX: 0000000000000001 RBX: ffff88810ef9fc28 RCX: ffff8881152876f0 [ 214.398983] RDX: dffffc0000000000 RSI: 1ffff11022a50ede RDI: ffff88810ef9fc78 [ 214.398983] RBP: 1ffff11022a50e9d R08: 0000000080000000 R09: 0000000000000000 [ 214.398983] R10: 0000000000000000 R11: 0000000000000000 R12: 1ffff11022a50eba [ 214.398983] R13: ffff888114446e08 R14: ffff8881152876f0 R15: ffffed1022a50ed6 [ 214.398983] FS: 0000000000000000(0000) GS:ffff888116400000(0000) knlGS:0000000000000000 [ 214.398983] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 214.398983] CR2: 00007fab9bb5f868 CR3: 000000012aa16000 CR4: 00000000001006e0 [ 214.398983] Call Trace: [ 214.398983] ? nf_tables_table_destroy.isra.37+0x100/0x100 [nf_tables] [ 214.398983] ? __kasan_slab_free+0x145/0x180 [ 214.398983] ? nf_tables_trans_destroy_work+0x439/0x830 [nf_tables] [ 214.398983] ? kfree+0xdb/0x280 [ 214.398983] nf_tables_trans_destroy_work+0x5f5/0x830 [nf_tables] [ ... ] Fixes: bb7b40aecbf7 ("netfilter: nf_tables: bogus EBUSY in chain deletions") Reported by: Christoph Anton Mitterer Link: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=914505 Link: https://bugzilla.kernel.org/show_bug.cgi?id=201791 Signed-off-by: Taehee Yoo Signed-off-by: Pablo Neira Ayuso commit 60c8144afc287ef09ce8c1230c6aa972659ba1bb Author: Borislav Petkov Date: Tue Nov 27 14:41:37 2018 +0100 x86/MCE/AMD: Fix the thresholding machinery initialization order Currently, the code sets up the thresholding interrupt vector and only then goes about initializing the thresholding banks. Which is wrong, because an early thresholding interrupt would cause a NULL pointer dereference when accessing those banks and prevent the machine from booting. Therefore, set the thresholding interrupt vector only *after* having initialized the banks successfully. Fixes: 18807ddb7f88 ("x86/mce/AMD: Reset Threshold Limit after logging error") Reported-by: Rafał Miłecki Reported-by: John Clemens Signed-off-by: Borislav Petkov Tested-by: Rafał Miłecki Tested-by: John Clemens Cc: Aravind Gopalakrishnan Cc: linux-edac@vger.kernel.org Cc: stable@vger.kernel.org Cc: Tony Luck Cc: x86@kernel.org Cc: Yazen Ghannam Link: https://lkml.kernel.org/r/20181127101700.2964-1-zajec5@gmail.com Link: https://bugzilla.kernel.org/show_bug.cgi?id=201291 commit dc92843159a7d01e37cf68750745333e944a9e55 Author: Tudor Ambarus Date: Mon Nov 26 12:45:44 2018 +0000 mtd: spi-nor: fix erase_type array to indicate current map conf BFPT advertises all the erase types supported by all the possible map configurations. Mask out the erase types that are not supported by the current map configuration. Backward compatibility test done on sst26vf064b. Fixes: b038e8e3be72 ("mtd: spi-nor: parse SFDP Sector Map Parameter Table") Reported-by: Alexander Sverdlin Signed-off-by: Tudor Ambarus Tested-by: Alexander Sverdlin Signed-off-by: Boris Brezillon commit c9287fa657b3328b4549c0ab39ea7f197a3d6a50 Author: Marek Szyprowski Date: Mon Nov 19 16:49:05 2018 +0100 usb: gadget: u_ether: fix unsafe list iteration list_for_each_entry_safe() is not safe for deleting entries from the list if the spin lock, which protects it, is released and reacquired during the list iteration. Fix this issue by replacing this construction with a simple check if list is empty and removing the first entry in each iteration. This is almost equivalent to a revert of the commit mentioned in the Fixes: tag. This patch fixes following issue: --->8--- Unable to handle kernel NULL pointer dereference at virtual address 00000104 pgd = (ptrval) [00000104] *pgd=00000000 Internal error: Oops: 817 [#1] PREEMPT SMP ARM Modules linked in: CPU: 1 PID: 84 Comm: kworker/1:1 Not tainted 4.20.0-rc2-next-20181114-00009-g8266b35ec404 #1061 Hardware name: SAMSUNG EXYNOS (Flattened Device Tree) Workqueue: events eth_work PC is at rx_fill+0x60/0xac LR is at _raw_spin_lock_irqsave+0x50/0x5c pc : [] lr : [] psr: 80000093 sp : ee7fbee8 ip : 00000100 fp : 00000000 r10: 006000c0 r9 : c10b0ab0 r8 : ee7eb5c0 r7 : ee7eb614 r6 : ee7eb5ec r5 : 000000dc r4 : ee12ac00 r3 : ee12ac24 r2 : 00000200 r1 : 60000013 r0 : ee7eb5ec Flags: Nzcv IRQs off FIQs on Mode SVC_32 ISA ARM Segment none Control: 10c5387d Table: 6d5dc04a DAC: 00000051 Process kworker/1:1 (pid: 84, stack limit = 0x(ptrval)) Stack: (0xee7fbee8 to 0xee7fc000) ... [] (rx_fill) from [] (process_one_work+0x200/0x738) [] (process_one_work) from [] (worker_thread+0x2c/0x4c8) [] (worker_thread) from [] (kthread+0x128/0x164) [] (kthread) from [] (ret_from_fork+0x14/0x20) Exception stack(0xee7fbfb0 to 0xee7fbff8) ... ---[ end trace 64480bc835eba7d6 ]--- Fixes: fea14e68ff5e ("usb: gadget: u_ether: use better list accessors") Signed-off-by: Marek Szyprowski Signed-off-by: Felipe Balbi commit d206e6b7ea3fdc8ec8f6be9a2ecfe58142b49e37 Author: Bjorn Andersson Date: Mon Nov 5 21:50:13 2018 -0800 arm64: dts: qcom: sdm845-mtp: Mark protected gcc clocks As of v4.20-rc1 probing the GCC driver on a SDM845 device with the standard security implementation causes an access violation and an immediate system restart. Use the protected-clocks property to mark the offending clocks protected for the MTP, in order to allow it to boot. Cc: Stephen Boyd Signed-off-by: Bjorn Andersson Acked-by: Andy Gross Signed-off-by: Stephen Boyd commit 149964e2d618e60df5ba82a5a153cef2fbc4a31e Merge: 27c0f2b01970 b181b3b801da Author: Stephen Boyd Date: Tue Nov 27 22:33:58 2018 -0800 Merge branch 'clk-protected-binding' into clk-fixes * clk-protected-binding: clk: qcom: Support 'protected-clocks' property dt-bindings: clk: Introduce 'protected-clocks' property commit 3054426dc68e5d63aa6a6e9b91ac4ec78e3f3805 Author: Pavankumar Kondeti Date: Tue Oct 30 12:24:33 2018 +0530 sched, trace: Fix prev_state output in sched_switch tracepoint commit 3f5fe9fef5b2 ("sched/debug: Fix task state recording/printout") tried to fix the problem introduced by a previous commit efb40f588b43 ("sched/tracing: Fix trace_sched_switch task-state printing"). However the prev_state output in sched_switch is still broken. task_state_index() uses fls() which considers the LSB as 1. Left shifting 1 by this value gives an incorrect mapping to the task state. Fix this by decrementing the value returned by __get_task_state() before shifting. Link: http://lkml.kernel.org/r/1540882473-1103-1-git-send-email-pkondeti@codeaurora.org Cc: stable@vger.kernel.org Fixes: 3f5fe9fef5b2 ("sched/debug: Fix task state recording/printout") Signed-off-by: Pavankumar Kondeti Signed-off-by: Steven Rostedt (VMware) commit b1b35f2e218a5b57d03bbc3b0667d5064570dc60 Author: Steven Rostedt (VMware) Date: Tue Nov 20 12:51:07 2018 -0500 function_graph: Have profiler use curr_ret_stack and not depth The profiler uses trace->depth to find its entry on the ret_stack, but the depth may not match the actual location of where its entry is (if an interrupt were to preempt the processing of the profiler for another function, the depth and the curr_ret_stack will be different). Have it use the curr_ret_stack as the index to find its ret_stack entry instead of using the depth variable, as that is no longer guaranteed to be the same. Cc: stable@kernel.org Fixes: 03274a3ffb449 ("tracing/fgraph: Adjust fgraph depth before calling trace return callback") Reviewed-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 7c6ea35ef50810aa12ab26f21cb858d980881576 Author: Steven Rostedt (VMware) Date: Tue Nov 20 12:40:25 2018 -0500 function_graph: Reverse the order of pushing the ret_stack and the callback The function graph profiler uses the ret_stack to store the "subtime" and reuse it by nested functions and also on the return. But the current logic has the profiler callback called before the ret_stack is updated, and it is just modifying the ret_stack that will later be allocated (it's just lucky that the "subtime" is not touched when it is allocated). This could also cause a crash if we are at the end of the ret_stack when this happens. By reversing the order of the allocating the ret_stack and then calling the callbacks attached to a function being traced, the ret_stack entry is no longer used before it is allocated. Cc: stable@kernel.org Fixes: 03274a3ffb449 ("tracing/fgraph: Adjust fgraph depth before calling trace return callback") Reviewed-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 552701dd0fa7c3d448142e87210590ba424694a0 Author: Steven Rostedt (VMware) Date: Mon Nov 19 15:18:40 2018 -0500 function_graph: Move return callback before update of curr_ret_stack In the past, curr_ret_stack had two functions. One was to denote the depth of the call graph, the other is to keep track of where on the ret_stack the data is used. Although they may be slightly related, there are two cases where they need to be used differently. The one case is that it keeps the ret_stack data from being corrupted by an interrupt coming in and overwriting the data still in use. The other is just to know where the depth of the stack currently is. The function profiler uses the ret_stack to save a "subtime" variable that is part of the data on the ret_stack. If curr_ret_stack is modified too early, then this variable can be corrupted. The "max_depth" option, when set to 1, will record the first functions going into the kernel. To see all top functions (when dealing with timings), the depth variable needs to be lowered before calling the return hook. But by lowering the curr_ret_stack, it makes the data on the ret_stack still being used by the return hook susceptible to being overwritten. Now that there's two variables to handle both cases (curr_ret_depth), we can move them to the locations where they can handle both cases. Cc: stable@kernel.org Fixes: 03274a3ffb449 ("tracing/fgraph: Adjust fgraph depth before calling trace return callback") Reviewed-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 39eb456dacb543de90d3bc6a8e0ac5cf51ac475e Author: Steven Rostedt (VMware) Date: Mon Nov 19 08:07:12 2018 -0500 function_graph: Use new curr_ret_depth to manage depth instead of curr_ret_stack Currently, the depth of the ret_stack is determined by curr_ret_stack index. The issue is that there's a race between setting of the curr_ret_stack and calling of the callback attached to the return of the function. Commit 03274a3ffb44 ("tracing/fgraph: Adjust fgraph depth before calling trace return callback") moved the calling of the callback to after the setting of the curr_ret_stack, even stating that it was safe to do so, when in fact, it was the reason there was a barrier() there (yes, I should have commented that barrier()). Not only does the curr_ret_stack keep track of the current call graph depth, it also keeps the ret_stack content from being overwritten by new data. The function profiler, uses the "subtime" variable of ret_stack structure and by moving the curr_ret_stack, it allows for interrupts to use the same structure it was using, corrupting the data, and breaking the profiler. To fix this, there needs to be two variables to handle the call stack depth and the pointer to where the ret_stack is being used, as they need to change at two different locations. Cc: stable@kernel.org Fixes: 03274a3ffb449 ("tracing/fgraph: Adjust fgraph depth before calling trace return callback") Reviewed-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit d125f3f866df88da5a85df00291f88f0baa89f7c Author: Steven Rostedt (VMware) Date: Mon Nov 19 07:40:39 2018 -0500 function_graph: Make ftrace_push_return_trace() static As all architectures now call function_graph_enter() to do the entry work, no architecture should ever call ftrace_push_return_trace(). Make it static. This is needed to prepare for a fix of a design bug on how the curr_ret_stack is used. Cc: stable@kernel.org Fixes: 03274a3ffb449 ("tracing/fgraph: Adjust fgraph depth before calling trace return callback") Reviewed-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 9c4bf5e0db164f330a2d3e128e9832661f69f0e9 Author: Steven Rostedt (VMware) Date: Sun Nov 18 17:37:40 2018 -0500 sparc/function_graph: Simplify with function_graph_enter() The function_graph_enter() function does the work of calling the function graph hook function and the management of the shadow stack, simplifying the work done in the architecture dependent prepare_ftrace_return(). Have sparc use the new code, and remove the shadow stack management as well as having to set up the trace structure. This is needed to prepare for a fix of a design bug on how the curr_ret_stack is used. Cc: "David S. Miller" Cc: sparclinux@vger.kernel.org Cc: stable@kernel.org Fixes: 03274a3ffb449 ("tracing/fgraph: Adjust fgraph depth before calling trace return callback") Reviewed-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit bc715ee4dbc5db462c59b9cfba92d31b3274fe3a Author: Steven Rostedt (VMware) Date: Sun Nov 18 17:35:37 2018 -0500 sh/function_graph: Simplify with function_graph_enter() The function_graph_enter() function does the work of calling the function graph hook function and the management of the shadow stack, simplifying the work done in the architecture dependent prepare_ftrace_return(). Have superh use the new code, and remove the shadow stack management as well as having to set up the trace structure. This is needed to prepare for a fix of a design bug on how the curr_ret_stack is used. Cc: Yoshinori Sato Cc: Rich Felker Cc: linux-sh@vger.kernel.org Cc: stable@kernel.org Fixes: 03274a3ffb449 ("tracing/fgraph: Adjust fgraph depth before calling trace return callback") Reviewed-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 18588e1487b19e45bd90bd55ec8d3a1d44f3257f Author: Steven Rostedt (VMware) Date: Sun Nov 18 17:33:17 2018 -0500 s390/function_graph: Simplify with function_graph_enter() The function_graph_enter() function does the work of calling the function graph hook function and the management of the shadow stack, simplifying the work done in the architecture dependent prepare_ftrace_return(). Have s390 use the new code, and remove the shadow stack management as well as having to set up the trace structure. This is needed to prepare for a fix of a design bug on how the curr_ret_stack is used. Acked-by: Martin Schwidefsky Cc: Heiko Carstens Cc: Julian Wiedmann Cc: linux-s390@vger.kernel.org Cc: stable@kernel.org Fixes: 03274a3ffb449 ("tracing/fgraph: Adjust fgraph depth before calling trace return callback") Reviewed-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit e949b6db51dc172a35c962bc4414ca148315fe21 Author: Steven Rostedt (VMware) Date: Sun Nov 18 17:31:44 2018 -0500 riscv/function_graph: Simplify with function_graph_enter() The function_graph_enter() function does the work of calling the function graph hook function and the management of the shadow stack, simplifying the work done in the architecture dependent prepare_ftrace_return(). Have riscv use the new code, and remove the shadow stack management as well as having to set up the trace structure. This is needed to prepare for a fix of a design bug on how the curr_ret_stack is used. Cc: Greentime Hu Cc: Alan Kao Cc: stable@kernel.org Fixes: 03274a3ffb449 ("tracing/fgraph: Adjust fgraph depth before calling trace return callback") Reviewed-by: Palmer Dabbelt Reviewed-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit fe60522ec60082a1dd735691b82c64f65d4ad15e Author: Steven Rostedt (VMware) Date: Sun Nov 18 17:28:53 2018 -0500 powerpc/function_graph: Simplify with function_graph_enter() The function_graph_enter() function does the work of calling the function graph hook function and the management of the shadow stack, simplifying the work done in the architecture dependent prepare_ftrace_return(). Have powerpc use the new code, and remove the shadow stack management as well as having to set up the trace structure. This is needed to prepare for a fix of a design bug on how the curr_ret_stack is used. Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: linuxppc-dev@lists.ozlabs.org Cc: stable@kernel.org Fixes: 03274a3ffb449 ("tracing/fgraph: Adjust fgraph depth before calling trace return callback") Reviewed-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit a87532c78d291265efadc4b20a8c7a70cd59ea29 Author: Steven Rostedt (VMware) Date: Sun Nov 18 17:27:43 2018 -0500 parisc: function_graph: Simplify with function_graph_enter() The function_graph_enter() function does the work of calling the function graph hook function and the management of the shadow stack, simplifying the work done in the architecture dependent prepare_ftrace_return(). Have parisc use the new code, and remove the shadow stack management as well as having to set up the trace structure. This is needed to prepare for a fix of a design bug on how the curr_ret_stack is used. Cc: "James E.J. Bottomley" Cc: Helge Deller Cc: linux-parisc@vger.kernel.org Cc: stable@kernel.org Fixes: 03274a3ffb449 ("tracing/fgraph: Adjust fgraph depth before calling trace return callback") Reviewed-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit d48ebb24866edea2c35be02a878f25bc65529370 Author: Steven Rostedt (VMware) Date: Sun Nov 18 17:26:35 2018 -0500 nds32: function_graph: Simplify with function_graph_enter() The function_graph_enter() function does the work of calling the function graph hook function and the management of the shadow stack, simplifying the work done in the architecture dependent prepare_ftrace_return(). Have nds32 use the new code, and remove the shadow stack management as well as having to set up the trace structure. This is needed to prepare for a fix of a design bug on how the curr_ret_stack is used. Cc: Greentime Hu Cc: stable@kernel.org Fixes: 03274a3ffb449 ("tracing/fgraph: Adjust fgraph depth before calling trace return callback") Reviewed-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 8712b27c5723c26400a2b350faf1d6d9fd7ffaad Author: Steven Rostedt (VMware) Date: Sun Nov 18 17:25:18 2018 -0500 MIPS: function_graph: Simplify with function_graph_enter() The function_graph_enter() function does the work of calling the function graph hook function and the management of the shadow stack, simplifying the work done in the architecture dependent prepare_ftrace_return(). Have MIPS use the new code, and remove the shadow stack management as well as having to set up the trace structure. This is needed to prepare for a fix of a design bug on how the curr_ret_stack is used. Cc: Ralf Baechle Cc: Paul Burton Cc: James Hogan Cc: linux-mips@linux-mips.org Cc: stable@kernel.org Fixes: 03274a3ffb449 ("tracing/fgraph: Adjust fgraph depth before calling trace return callback") Reviewed-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 556763e5a500d71879d632867b75826551acd49c Author: Steven Rostedt (VMware) Date: Sun Nov 18 17:23:30 2018 -0500 microblaze: function_graph: Simplify with function_graph_enter() The function_graph_enter() function does the work of calling the function graph hook function and the management of the shadow stack, simplifying the work done in the architecture dependent prepare_ftrace_return(). Have microblaze use the new code, and remove the shadow stack management as well as having to set up the trace structure. This is needed to prepare for a fix of a design bug on how the curr_ret_stack is used. Cc: Michal Simek Cc: stable@kernel.org Fixes: 03274a3ffb449 ("tracing/fgraph: Adjust fgraph depth before calling trace return callback") Reviewed-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 01e0ab2c4ff12358f15a856fd1a7bbea0670972b Author: Steven Rostedt (VMware) Date: Sun Nov 18 17:21:51 2018 -0500 arm64: function_graph: Simplify with function_graph_enter() The function_graph_enter() function does the work of calling the function graph hook function and the management of the shadow stack, simplifying the work done in the architecture dependent prepare_ftrace_return(). Have arm64 use the new code, and remove the shadow stack management as well as having to set up the trace structure. This is needed to prepare for a fix of a design bug on how the curr_ret_stack is used. Cc: Catalin Marinas Cc: linux-arm-kernel@lists.infradead.org Cc: stable@kernel.org Fixes: 03274a3ffb449 ("tracing/fgraph: Adjust fgraph depth before calling trace return callback") Acked-by: Will Deacon Reviewed-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit f1f5b14afd7cce39e6a9b25c685e1ea34c231096 Author: Steven Rostedt (VMware) Date: Sun Nov 18 17:19:26 2018 -0500 ARM: function_graph: Simplify with function_graph_enter() The function_graph_enter() function does the work of calling the function graph hook function and the management of the shadow stack, simplifying the work done in the architecture dependent prepare_ftrace_return(). Have ARM use the new code, and remove the shadow stack management as well as having to set up the trace structure. This is needed to prepare for a fix of a design bug on how the curr_ret_stack is used. Cc: Russell King Cc: linux-arm-kernel@lists.infradead.org Cc: stable@kernel.org Fixes: 03274a3ffb449 ("tracing/fgraph: Adjust fgraph depth before calling trace return callback") Reviewed-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 07f7175b43827640d1e69c9eded89aa089a234b4 Author: Steven Rostedt (VMware) Date: Sun Nov 18 17:14:10 2018 -0500 x86/function_graph: Simplify with function_graph_enter() The function_graph_enter() function does the work of calling the function graph hook function and the management of the shadow stack, simplifying the work done in the architecture dependent prepare_ftrace_return(). Have x86 use the new code, and remove the shadow stack management as well as having to set up the trace structure. This is needed to prepare for a fix of a design bug on how the curr_ret_stack is used. Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: "H. Peter Anvin" Cc: x86@kernel.org Cc: stable@kernel.org Fixes: 03274a3ffb449 ("tracing/fgraph: Adjust fgraph depth before calling trace return callback") Reviewed-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 4df5ce9bc03e47d05f400e64aa32a82ec4cef419 Author: Bryan Whitehead Date: Mon Nov 26 12:27:10 2018 -0500 lan743x: Enable driver to work with LAN7431 This driver was designed to work with both LAN7430 and LAN7431. The only difference between the two is the LAN7431 has support for external phy. This change adds LAN7431 to the list of recognized devices supported by this driver. Updates for v2: changed 'fixes' tag to match defined format fixes: 23f0703c125b ("lan743x: Add main source files for new lan743x driver") Signed-off-by: Bryan Whitehead Signed-off-by: David S. Miller commit ec835f891232d7763dea9da0358f31e24ca6dfb7 Author: Jon Maloy Date: Mon Nov 26 12:26:14 2018 -0500 tipc: fix lockdep warning during node delete We see the following lockdep warning: [ 2284.078521] ====================================================== [ 2284.078604] WARNING: possible circular locking dependency detected [ 2284.078604] 4.19.0+ #42 Tainted: G E [ 2284.078604] ------------------------------------------------------ [ 2284.078604] rmmod/254 is trying to acquire lock: [ 2284.078604] 00000000acd94e28 ((&n->timer)#2){+.-.}, at: del_timer_sync+0x5/0xa0 [ 2284.078604] [ 2284.078604] but task is already holding lock: [ 2284.078604] 00000000f997afc0 (&(&tn->node_list_lock)->rlock){+.-.}, at: tipc_node_stop+0xac/0x190 [tipc] [ 2284.078604] [ 2284.078604] which lock already depends on the new lock. [ 2284.078604] [ 2284.078604] [ 2284.078604] the existing dependency chain (in reverse order) is: [ 2284.078604] [ 2284.078604] -> #1 (&(&tn->node_list_lock)->rlock){+.-.}: [ 2284.078604] tipc_node_timeout+0x20a/0x330 [tipc] [ 2284.078604] call_timer_fn+0xa1/0x280 [ 2284.078604] run_timer_softirq+0x1f2/0x4d0 [ 2284.078604] __do_softirq+0xfc/0x413 [ 2284.078604] irq_exit+0xb5/0xc0 [ 2284.078604] smp_apic_timer_interrupt+0xac/0x210 [ 2284.078604] apic_timer_interrupt+0xf/0x20 [ 2284.078604] default_idle+0x1c/0x140 [ 2284.078604] do_idle+0x1bc/0x280 [ 2284.078604] cpu_startup_entry+0x19/0x20 [ 2284.078604] start_secondary+0x187/0x1c0 [ 2284.078604] secondary_startup_64+0xa4/0xb0 [ 2284.078604] [ 2284.078604] -> #0 ((&n->timer)#2){+.-.}: [ 2284.078604] del_timer_sync+0x34/0xa0 [ 2284.078604] tipc_node_delete+0x1a/0x40 [tipc] [ 2284.078604] tipc_node_stop+0xcb/0x190 [tipc] [ 2284.078604] tipc_net_stop+0x154/0x170 [tipc] [ 2284.078604] tipc_exit_net+0x16/0x30 [tipc] [ 2284.078604] ops_exit_list.isra.8+0x36/0x70 [ 2284.078604] unregister_pernet_operations+0x87/0xd0 [ 2284.078604] unregister_pernet_subsys+0x1d/0x30 [ 2284.078604] tipc_exit+0x11/0x6f2 [tipc] [ 2284.078604] __x64_sys_delete_module+0x1df/0x240 [ 2284.078604] do_syscall_64+0x66/0x460 [ 2284.078604] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 2284.078604] [ 2284.078604] other info that might help us debug this: [ 2284.078604] [ 2284.078604] Possible unsafe locking scenario: [ 2284.078604] [ 2284.078604] CPU0 CPU1 [ 2284.078604] ---- ---- [ 2284.078604] lock(&(&tn->node_list_lock)->rlock); [ 2284.078604] lock((&n->timer)#2); [ 2284.078604] lock(&(&tn->node_list_lock)->rlock); [ 2284.078604] lock((&n->timer)#2); [ 2284.078604] [ 2284.078604] *** DEADLOCK *** [ 2284.078604] [ 2284.078604] 3 locks held by rmmod/254: [ 2284.078604] #0: 000000003368be9b (pernet_ops_rwsem){+.+.}, at: unregister_pernet_subsys+0x15/0x30 [ 2284.078604] #1: 0000000046ed9c86 (rtnl_mutex){+.+.}, at: tipc_net_stop+0x144/0x170 [tipc] [ 2284.078604] #2: 00000000f997afc0 (&(&tn->node_list_lock)->rlock){+.-.}, at: tipc_node_stop+0xac/0x19 [...} The reason is that the node timer handler sometimes needs to delete a node which has been disconnected for too long. To do this, it grabs the lock 'node_list_lock', which may at the same time be held by the generic node cleanup function, tipc_node_stop(), during module removal. Since the latter is calling del_timer_sync() inside the same lock, we have a potential deadlock. We fix this letting the timer cleanup function use spin_trylock() instead of just spin_lock(), and when it fails to grab the lock it just returns so that the timer handler can terminate its execution. This is safe to do, since tipc_node_stop() anyway is about to delete both the timer and the node instance. Fixes: 6a939f365bdb ("tipc: Auto removal of peer down node instance") Acked-by: Ying Xue Signed-off-by: Jon Maloy Signed-off-by: David S. Miller commit cc5922054131f9abefdc0622ae64fc55e6b2671d Author: Bryan Whitehead Date: Mon Nov 26 12:04:57 2018 -0500 lan743x: fix return value for lan743x_tx_napi_poll The lan743x driver, when under heavy traffic load, has been noticed to sometimes hang, or cause a kernel panic. Debugging reveals that the TX napi poll routine was returning the wrong value, 'weight'. Most other drivers return 0. And call napi_complete, instead of napi_complete_done. Additionally when creating the tx napi poll routine. Changed netif_napi_add, to netif_tx_napi_add. Updates for v3: changed 'fixes' tag to match defined format Updates for v2: use napi_complete, instead of napi_complete_done in lan743x_tx_napi_poll use netif_tx_napi_add, instead of netif_napi_add for registration of tx napi poll routine fixes: 23f0703c125b ("lan743x: Add main source files for new lan743x driver") Signed-off-by: Bryan Whitehead Signed-off-by: David S. Miller commit 4b5adba07c945e191ac2ecd83627dd520dca152f Author: Colin Ian King Date: Mon Nov 26 15:34:01 2018 +0000 net: via: via-velocity: fix spelling mistake "alignement" -> "alignment" The text in array velocity_gstrings contains a spelling mistake, rename rx_frame_alignement_errors to rx_frame_alignment_errors. Signed-off-by: Colin Ian King Signed-off-by: David S. Miller commit 1d510657ac7e486dd443cabbbd0677253aeb705f Author: Colin Ian King Date: Mon Nov 26 15:53:54 2018 +0000 qed: fix spelling mistake "attnetion" -> "attention" The text in array s_igu_fifo_error_strs contains a spelling mistake, fix it. Signed-off-by: Colin Ian King Signed-off-by: David S. Miller commit 24a6d2dd263bc910de018c78d1148b3e33b94512 Author: Lorenzo Bianconi Date: Mon Nov 26 15:07:16 2018 +0100 net: thunderx: fix NULL pointer dereference in nic_remove Fix a possible NULL pointer dereference in nic_remove routine removing the nicpf module if nic_probe fails. The issue can be triggered with the following reproducer: $rmmod nicvf $rmmod nicpf [ 521.412008] Unable to handle kernel access to user memory outside uaccess routines at virtual address 0000000000000014 [ 521.422777] Mem abort info: [ 521.425561] ESR = 0x96000004 [ 521.428624] Exception class = DABT (current EL), IL = 32 bits [ 521.434535] SET = 0, FnV = 0 [ 521.437579] EA = 0, S1PTW = 0 [ 521.440730] Data abort info: [ 521.443603] ISV = 0, ISS = 0x00000004 [ 521.447431] CM = 0, WnR = 0 [ 521.450417] user pgtable: 4k pages, 48-bit VAs, pgdp = 0000000072a3da42 [ 521.457022] [0000000000000014] pgd=0000000000000000 [ 521.461916] Internal error: Oops: 96000004 [#1] SMP [ 521.511801] Hardware name: GIGABYTE H270-T70/MT70-HD0, BIOS T49 02/02/2018 [ 521.518664] pstate: 80400005 (Nzcv daif +PAN -UAO) [ 521.523451] pc : nic_remove+0x24/0x88 [nicpf] [ 521.527808] lr : pci_device_remove+0x48/0xd8 [ 521.532066] sp : ffff000013433cc0 [ 521.535370] x29: ffff000013433cc0 x28: ffff810f6ac50000 [ 521.540672] x27: 0000000000000000 x26: 0000000000000000 [ 521.545974] x25: 0000000056000000 x24: 0000000000000015 [ 521.551274] x23: ffff8007ff89a110 x22: ffff000001667070 [ 521.556576] x21: ffff8007ffb170b0 x20: ffff8007ffb17000 [ 521.561877] x19: 0000000000000000 x18: 0000000000000025 [ 521.567178] x17: 0000000000000000 x16: 000000000000010ffc33ff98 x8 : 0000000000000000 [ 521.593683] x7 : 0000000000000000 x6 : 0000000000000001 [ 521.598983] x5 : 0000000000000002 x4 : 0000000000000003 [ 521.604284] x3 : ffff8007ffb17184 x2 : ffff8007ffb17184 [ 521.609585] x1 : ffff000001662118 x0 : ffff000008557be0 [ 521.614887] Process rmmod (pid: 1897, stack limit = 0x00000000859535c3) [ 521.621490] Call trace: [ 521.623928] nic_remove+0x24/0x88 [nicpf] [ 521.627927] pci_device_remove+0x48/0xd8 [ 521.631847] device_release_driver_internal+0x1b0/0x248 [ 521.637062] driver_detach+0x50/0xc0 [ 521.640628] bus_remove_driver+0x60/0x100 [ 521.644627] driver_unregister+0x34/0x60 [ 521.648538] pci_unregister_driver+0x24/0xd8 [ 521.652798] nic_cleanup_module+0x14/0x111c [nicpf] [ 521.657672] __arm64_sys_delete_module+0x150/0x218 [ 521.662460] el0_svc_handler+0x94/0x110 [ 521.666287] el0_svc+0x8/0xc [ 521.669160] Code: aa1e03e0 9102c295 d503201f f9404eb3 (b9401660) Fixes: 4863dea3fab0 ("net: Adding support for Cavium ThunderX network controller") Signed-off-by: Lorenzo Bianconi Signed-off-by: David S. Miller commit e399ef194171717aefa78838d02b1e92267be2b1 Author: Stephen Rothwell Date: Mon Nov 26 18:45:26 2018 +1100 sparc32: supress another implicit-fallthrough warning Signed-off-by: Stephen Rothwell Signed-off-by: David S. Miller commit e945067d95cc99a6e4601b6bda665f30c7917c3b Author: Stephen Rothwell Date: Mon Nov 26 18:11:46 2018 +1100 sparc32: suppress an implicit-fallthrough warning Signed-off-by: Stephen Rothwell Signed-off-by: David S. Miller commit f6f8c1c09c224076a6c9ca3d97c24b81698f98f8 Author: Stephen Rothwell Date: Mon Nov 26 17:59:40 2018 +1100 sparc: suppress the implicit-fallthrough warning sparc builds with -Werror Signed-off-by: Stephen Rothwell Signed-off-by: David S. Miller commit 0d32f17717e65e76cbdb248374dd162acdfe2fff Author: Xin Long Date: Mon Nov 26 14:52:44 2018 +0800 sctp: increase sk_wmem_alloc when head->truesize is increased I changed to count sk_wmem_alloc by skb truesize instead of 1 to fix the sk_wmem_alloc leak caused by later truesize's change in xfrm in Commit 02968ccf0125 ("sctp: count sk_wmem_alloc by skb truesize in sctp_packet_transmit"). But I should have also increased sk_wmem_alloc when head->truesize is increased in sctp_packet_gso_append() as xfrm does. Otherwise, sctp gso packet will cause sk_wmem_alloc underflow. Fixes: 02968ccf0125 ("sctp: count sk_wmem_alloc by skb truesize in sctp_packet_transmit") Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller commit a8842e975503191e4982efb886299fc19972c97f Author: Colin Ian King Date: Sun Nov 25 23:21:08 2018 +0000 firestream: fix spelling mistake: "Inititing" -> "Initializing" There are spelling mistakes in debug messages, fix them. Signed-off-by: Colin Ian King Signed-off-by: David S. Miller commit c85ddecae6e5e82ca3ae6f20c63f1d865e2ff5ea Author: Heiner Kallweit Date: Fri Nov 23 19:41:29 2018 +0100 net: phy: add workaround for issue where PHY driver doesn't bind to the device After switching the r8169 driver to use phylib some user reported that their network is broken. This was caused by the genphy PHY driver being used instead of the dedicated PHY driver for the RTL8211B. Users reported that loading the Realtek PHY driver module upfront fixes the issue. See also this mail thread: https://marc.info/?t=154279781800003&r=1&w=2 The issue is quite weird and the root cause seems to be somewhere in the base driver core. The patch works around the issue and may be removed once the actual issue is fixed. The Fixes tag refers to the first reported occurrence of the issue. The issue itself may have been existing much longer and it may affect users of other network chips as well. Users typically will recognize this issue only if their PHY stops working when being used with the genphy driver. Fixes: f1e911d5d0df ("r8169: add basic phylib support") Signed-off-by: Heiner Kallweit Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 45611c61dd503454b2edae00aabe1e429ec49ebe Author: Bernd Eckstein <3erndeckstein@gmail.com> Date: Fri Nov 23 13:51:26 2018 +0100 usbnet: ipheth: fix potential recvmsg bug and recvmsg bug 2 The bug is not easily reproducable, as it may occur very infrequently (we had machines with 20minutes heavy downloading before it occurred) However, on a virual machine (VMWare on Windows 10 host) it occurred pretty frequently (1-2 seconds after a speedtest was started) dev->tx_skb mab be freed via dev_kfree_skb_irq on a callback before it is set. This causes the following problems: - double free of the skb or potential memory leak - in dmesg: 'recvmsg bug' and 'recvmsg bug 2' and eventually general protection fault Example dmesg output: [ 134.841986] ------------[ cut here ]------------ [ 134.841987] recvmsg bug: copied 9C24A555 seq 9C24B557 rcvnxt 9C25A6B3 fl 0 [ 134.841993] WARNING: CPU: 7 PID: 2629 at /build/linux-hwe-On9fm7/linux-hwe-4.15.0/net/ipv4/tcp.c:1865 tcp_recvmsg+0x44d/0xab0 [ 134.841994] Modules linked in: ipheth(OE) kvm_intel kvm irqbypass crct10dif_pclmul crc32_pclmul ghash_clmulni_intel pcbc aesni_intel aes_x86_64 crypto_simd glue_helper cryptd vmw_balloon intel_rapl_perf joydev input_leds serio_raw vmw_vsock_vmci_transport vsock shpchp i2c_piix4 mac_hid binfmt_misc vmw_vmci parport_pc ppdev lp parport autofs4 vmw_pvscsi vmxnet3 hid_generic usbhid hid vmwgfx ttm drm_kms_helper syscopyarea sysfillrect mptspi mptscsih sysimgblt ahci psmouse fb_sys_fops pata_acpi mptbase libahci e1000 drm scsi_transport_spi [ 134.842046] CPU: 7 PID: 2629 Comm: python Tainted: G W OE 4.15.0-34-generic #37~16.04.1-Ubuntu [ 134.842046] Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 05/19/2017 [ 134.842048] RIP: 0010:tcp_recvmsg+0x44d/0xab0 [ 134.842048] RSP: 0018:ffffa6630422bcc8 EFLAGS: 00010286 [ 134.842049] RAX: 0000000000000000 RBX: ffff997616f4f200 RCX: 0000000000000006 [ 134.842049] RDX: 0000000000000007 RSI: 0000000000000082 RDI: ffff9976257d6490 [ 134.842050] RBP: ffffa6630422bd98 R08: 0000000000000001 R09: 000000000004bba4 [ 134.842050] R10: 0000000001e00c6f R11: 000000000004bba4 R12: ffff99760dee3000 [ 134.842051] R13: 0000000000000000 R14: ffff99760dee3514 R15: 0000000000000000 [ 134.842051] FS: 00007fe332347700(0000) GS:ffff9976257c0000(0000) knlGS:0000000000000000 [ 134.842052] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 134.842053] CR2: 0000000001e41000 CR3: 000000020e9b4006 CR4: 00000000003606e0 [ 134.842055] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 134.842055] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 134.842057] Call Trace: [ 134.842060] ? aa_sk_perm+0x53/0x1a0 [ 134.842064] inet_recvmsg+0x51/0xc0 [ 134.842066] sock_recvmsg+0x43/0x50 [ 134.842070] SYSC_recvfrom+0xe4/0x160 [ 134.842072] ? __schedule+0x3de/0x8b0 [ 134.842075] ? ktime_get_ts64+0x4c/0xf0 [ 134.842079] SyS_recvfrom+0xe/0x10 [ 134.842082] do_syscall_64+0x73/0x130 [ 134.842086] entry_SYSCALL_64_after_hwframe+0x3d/0xa2 [ 134.842086] RIP: 0033:0x7fe331f5a81d [ 134.842088] RSP: 002b:00007ffe8da98398 EFLAGS: 00000246 ORIG_RAX: 000000000000002d [ 134.842090] RAX: ffffffffffffffda RBX: ffffffffffffffff RCX: 00007fe331f5a81d [ 134.842094] RDX: 00000000000003fb RSI: 0000000001e00874 RDI: 0000000000000003 [ 134.842095] RBP: 00007fe32f642c70 R08: 0000000000000000 R09: 0000000000000000 [ 134.842097] R10: 0000000000000000 R11: 0000000000000246 R12: 00007fe332347698 [ 134.842099] R13: 0000000001b7e0a0 R14: 0000000001e00874 R15: 0000000000000000 [ 134.842103] Code: 24 fd ff ff e9 cc fe ff ff 48 89 d8 41 8b 8c 24 10 05 00 00 44 8b 45 80 48 c7 c7 08 bd 59 8b 48 89 85 68 ff ff ff e8 b3 c4 7d ff <0f> 0b 48 8b 85 68 ff ff ff e9 e9 fe ff ff 41 8b 8c 24 10 05 00 [ 134.842126] ---[ end trace b7138fc08c83147f ]--- [ 134.842144] general protection fault: 0000 [#1] SMP PTI [ 134.842145] Modules linked in: ipheth(OE) kvm_intel kvm irqbypass crct10dif_pclmul crc32_pclmul ghash_clmulni_intel pcbc aesni_intel aes_x86_64 crypto_simd glue_helper cryptd vmw_balloon intel_rapl_perf joydev input_leds serio_raw vmw_vsock_vmci_transport vsock shpchp i2c_piix4 mac_hid binfmt_misc vmw_vmci parport_pc ppdev lp parport autofs4 vmw_pvscsi vmxnet3 hid_generic usbhid hid vmwgfx ttm drm_kms_helper syscopyarea sysfillrect mptspi mptscsih sysimgblt ahci psmouse fb_sys_fops pata_acpi mptbase libahci e1000 drm scsi_transport_spi [ 134.842161] CPU: 7 PID: 2629 Comm: python Tainted: G W OE 4.15.0-34-generic #37~16.04.1-Ubuntu [ 134.842162] Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 05/19/2017 [ 134.842164] RIP: 0010:tcp_close+0x2c6/0x440 [ 134.842165] RSP: 0018:ffffa6630422bde8 EFLAGS: 00010202 [ 134.842167] RAX: 0000000000000000 RBX: ffff99760dee3000 RCX: 0000000180400034 [ 134.842168] RDX: 5c4afd407207a6c4 RSI: ffffe868495bd300 RDI: ffff997616f4f200 [ 134.842169] RBP: ffffa6630422be08 R08: 0000000016f4d401 R09: 0000000180400034 [ 134.842169] R10: ffffa6630422bd98 R11: 0000000000000000 R12: 000000000000600c [ 134.842170] R13: 0000000000000000 R14: ffff99760dee30c8 R15: ffff9975bd44fe00 [ 134.842171] FS: 00007fe332347700(0000) GS:ffff9976257c0000(0000) knlGS:0000000000000000 [ 134.842173] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 134.842174] CR2: 0000000001e41000 CR3: 000000020e9b4006 CR4: 00000000003606e0 [ 134.842177] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 134.842178] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 134.842179] Call Trace: [ 134.842181] inet_release+0x42/0x70 [ 134.842183] __sock_release+0x42/0xb0 [ 134.842184] sock_close+0x15/0x20 [ 134.842187] __fput+0xea/0x220 [ 134.842189] ____fput+0xe/0x10 [ 134.842191] task_work_run+0x8a/0xb0 [ 134.842193] exit_to_usermode_loop+0xc4/0xd0 [ 134.842195] do_syscall_64+0xf4/0x130 [ 134.842197] entry_SYSCALL_64_after_hwframe+0x3d/0xa2 [ 134.842197] RIP: 0033:0x7fe331f5a560 [ 134.842198] RSP: 002b:00007ffe8da982e8 EFLAGS: 00000246 ORIG_RAX: 0000000000000003 [ 134.842200] RAX: 0000000000000000 RBX: 00007fe32f642c70 RCX: 00007fe331f5a560 [ 134.842201] RDX: 00000000008f5320 RSI: 0000000001cd4b50 RDI: 0000000000000003 [ 134.842202] RBP: 00007fe32f6500f8 R08: 000000000000003c R09: 00000000009343c0 [ 134.842203] R10: 0000000000000000 R11: 0000000000000246 R12: 00007fe32f6500d0 [ 134.842204] R13: 00000000008f5320 R14: 00000000008f5320 R15: 0000000001cd4770 [ 134.842205] Code: c8 00 00 00 45 31 e4 49 39 fe 75 4d eb 50 83 ab d8 00 00 00 01 48 8b 17 48 8b 47 08 48 c7 07 00 00 00 00 48 c7 47 08 00 00 00 00 <48> 89 42 08 48 89 10 0f b6 57 34 8b 47 2c 2b 47 28 83 e2 01 80 [ 134.842226] RIP: tcp_close+0x2c6/0x440 RSP: ffffa6630422bde8 [ 134.842227] ---[ end trace b7138fc08c831480 ]--- The proposed patch eliminates a potential racing condition. Before, usb_submit_urb was called and _after_ that, the skb was attached (dev->tx_skb). So, on a callback it was possible, however unlikely that the skb was freed before it was set. That way (because dev->tx_skb was not set to NULL after it was freed), it could happen that a skb from a earlier transmission was freed a second time (and the skb we should have freed did not get freed at all) Now we free the skb directly in ipheth_tx(). It is not passed to the callback anymore, eliminating the posibility of a double free of the same skb. Depending on the retval of usb_submit_urb() we use dev_kfree_skb_any() respectively dev_consume_skb_any() to free the skb. Signed-off-by: Oliver Zweigle Signed-off-by: Bernd Eckstein <3ernd.Eckstein@gmail.com> Signed-off-by: David S. Miller commit a7c3a0d5f8d8cd5cdb32c06d4d68f5b4e4d2104b Author: Mauro Carvalho Chehab Date: Fri Nov 23 07:18:12 2018 -0500 media: mediactl docs: Fix licensing message Right now, it mentions two SPDX headers that don't exist inside the Kernel: GFDL-1.1-or-later And an exception: no-invariant-sections While it would be trivial to add the first one, there's no way, currently, to distinguish, with SPDX, between a free and a non-free document under GFDL. Free documents with GFDL should not have invariant sections. There's an open issue at SPDX tree waiting for it to be solved. While we don't have this issue closed, let's just replace by a free-text license, and add a TODO note to remind us to revisit it later. Reviewed-by: Tomasz Figa Signed-off-by: Mauro Carvalho Chehab commit 3420f65cbbd0555049bd02394bed33a0ef74d860 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 3d8e450f517cdb33da77827ec75929354753e9c0 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 93143f846b2728d81b000740acfdbbd52ab41e46 Merge: 69500127424c 2b9034b5eadd Author: David S. Miller Date: Tue Nov 27 09:52:05 2018 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Daniel Borkmann says: ==================== pull-request: bpf 2018-11-27 The following pull-request contains BPF updates for your *net* tree. The main changes are: 1) Fix several bugs in BPF sparc JIT, that is, convergence for fused branches, initialization of frame pointer register, and moving all arguments into output registers from input registers in prologue to fix BPF to BPF calls, from David. 2) Fix a bug in arm64 JIT for fetching BPF to BPF call addresses where they are not guaranteed to fit into imm field and therefore must be retrieved through prog aux data, from Daniel. 3) Explicitly add all JITs to MAINTAINERS file with developers able to help out in feature development, fixes, review, etc. ==================== Signed-off-by: David S. Miller commit 751a0cc0cd3a0d51e6aaf6fd3b8bd31f4ecfaf3e Author: Igor Konopko Date: Fri Nov 23 16:58:10 2018 +0100 nvme-pci: fix surprise removal When a PCIe NVMe device is not present, nvme_dev_remove_admin() calls blk_cleanup_queue() on the admin queue, which frees the hctx for that queue. Moments later, on the same path nvme_kill_queues() calls blk_mq_unquiesce_queue() on admin queue and tries to access hctx of it, which leads to following OOPS: Oops: 0000 [#1] SMP PTI RIP: 0010:sbitmap_any_bit_set+0xb/0x40 Call Trace: blk_mq_run_hw_queue+0xd5/0x150 blk_mq_run_hw_queues+0x3a/0x50 nvme_kill_queues+0x26/0x50 nvme_remove_namespaces+0xb2/0xc0 nvme_remove+0x60/0x140 pci_device_remove+0x3b/0xb0 Fixes: cb4bfda62afa2 ("nvme-pci: fix hot removal during error handling") Signed-off-by: Igor Konopko Reviewed-by: Keith Busch Signed-off-by: Christoph Hellwig commit dfa74422d604abc2e16763db12646583219806e4 Author: Ewan D. Milne Date: Mon Nov 26 12:01:30 2018 -0500 nvme-fc: initialize nvme_req(rq)->ctrl after calling __nvme_fc_init_request() __nvme_fc_init_request() invokes memset() on the nvme_fcp_op_w_sgl structure, which NULLed-out the nvme_req(req)->ctrl field previously set by nvme_fc_init_request(). This apparently was not referenced until commit faf4a44fff ("nvme: support traffic based keep-alive") which now results in a crash in nvme_complete_rq(): [ 8386.897130] RIP: 0010:panic+0x220/0x26c [ 8386.901406] Code: 83 3d 6f ee 72 01 00 74 05 e8 e8 54 02 00 48 c7 c6 40 fd 5b b4 48 c7 c7 d8 8d c6 b3 31e [ 8386.922359] RSP: 0018:ffff99650019fc40 EFLAGS: 00000246 ORIG_RAX: ffffffffffffff13 [ 8386.930804] RAX: 0000000000000046 RBX: 0000000000000000 RCX: 0000000000000006 [ 8386.938764] RDX: 0000000000000000 RSI: 0000000000000082 RDI: ffff8e325f8168b0 [ 8386.946725] RBP: ffff99650019fcb0 R08: 0000000000000000 R09: 00000000000004f8 [ 8386.954687] R10: 0000000000000000 R11: ffff99650019f9b8 R12: ffffffffb3c55f3c [ 8386.962648] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000001 [ 8386.970613] oops_end+0xd1/0xe0 [ 8386.974116] no_context+0x1b2/0x3c0 [ 8386.978006] do_page_fault+0x32/0x140 [ 8386.982090] page_fault+0x1e/0x30 [ 8386.985786] RIP: 0010:nvme_complete_rq+0x65/0x1d0 [nvme_core] [ 8386.992195] Code: 41 bc 03 00 00 00 74 16 0f 86 c3 00 00 00 66 3d 83 00 41 bc 06 00 00 00 0f 85 e7 00 000 [ 8387.013147] RSP: 0018:ffff99650019fe18 EFLAGS: 00010246 [ 8387.018973] RAX: 0000000000000000 RBX: ffff8e322ae51280 RCX: 0000000000000001 [ 8387.026935] RDX: 0000000000000400 RSI: 0000000000000001 RDI: ffff8e322ae51280 [ 8387.034897] RBP: ffff8e322ae51280 R08: 0000000000000000 R09: ffffffffb2f0b890 [ 8387.042859] R10: 0000000000000001 R11: 0000000000000000 R12: 0000000000000000 [ 8387.050821] R13: 0000000000000100 R14: 0000000000000004 R15: ffff8e2b0446d990 [ 8387.058782] ? swiotlb_unmap_page+0x40/0x40 [ 8387.063448] nvme_fc_complete_rq+0x2d/0x70 [nvme_fc] [ 8387.068986] blk_done_softirq+0xa1/0xd0 [ 8387.073264] __do_softirq+0xd6/0x2a9 [ 8387.077251] run_ksoftirqd+0x26/0x40 [ 8387.081238] smpboot_thread_fn+0x10e/0x160 [ 8387.085807] kthread+0xf8/0x130 [ 8387.089309] ? sort_range+0x20/0x20 [ 8387.093198] ? kthread_stop+0x110/0x110 [ 8387.097475] ret_from_fork+0x35/0x40 [ 8387.101462] ---[ end trace 7106b0adf5e422f8 ]--- Fixes: faf4a44fff ("nvme: support traffic based keep-alive") Signed-off-by: Ewan D. Milne Reviewed-by: Hannes Reinecke Signed-off-by: Christoph Hellwig commit ac26d1f74cfc19c8dc9d533b5f20e99dbee3d9bd Author: Jann Horn Date: Tue Nov 27 14:32:00 2018 +0100 x86/fpu: Use the correct exception table macro in the XSTATE_OP wrapper Commit 75045f77f7a7 ("x86/extable: Introduce _ASM_EXTABLE_UA for uaccess fixups") incorrectly replaced the fixup entry for XSTATE_OP with a user-#PF-only fixup. XRSTOR can also raise #GP if the xstate content is invalid, and _ASM_EXTABLE_UA doesn't expect that. Change this fixup back to _ASM_EXTABLE so that #GP gets fixed up. Fixes: 75045f77f7a7 ("x86/extable: Introduce _ASM_EXTABLE_UA for uaccess fixups") Reported-by: Sebastian Andrzej Siewior Signed-off-by: Jann Horn Signed-off-by: Borislav Petkov Acked-by: Sebastian Andrzej Siewior Tested-by: Sebastian Andrzej Siewior Cc: "H. Peter Anvin" Cc: "Naveen N. Rao" Cc: Andy Lutomirski Cc: Ingo Molnar Cc: Thomas Gleixner Cc: kernel-hardening@lists.openwall.com Cc: x86-ml Link: https://lkml.kernel.org/r/20181126165957.xhsyu2dhyy45mrjo@linutronix.de Link: https://lkml.kernel.org/r/20181127133200.38322-1-jannh@google.com commit b8e0be79d0004eded7f93981489781a389790959 Merge: 1078bef0cd92 ffdcc3638c58 Author: Takashi Iwai Date: Tue Nov 27 16:06:42 2018 +0100 Merge tag 'asoc-v4.20-rc4' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v4.20 Lots of fixes here, the majority of which are driver specific but there's a couple of core things and one notable driver specific one: - A core fix for a DAPM regression introduced during the component refactoring, we'd lost the code that forced a reevaluation of the DAPM graph after probe (which we suppress during init to save lots of recalcuation) and have now restored it. - A core fix for error handling using the newly added for_each_rtd_codec_dai_rollback() macro. - A fix for the names of widgets in the newly introduced pcm3060 driver, merged as a fix so we don't have a release with legacy names. commit 814cedbc0b78d75e335c96da9b9391142eab5600 Author: Martin Schwidefsky Date: Tue Nov 27 14:04:04 2018 +0100 s390/mm: correct pgtable_bytes on page table downgrade The downgrade of a page table from 3 levels to 2 levels for a 31-bit compat process removes a pmd table which has to be counted against pgtable_bytes. Signed-off-by: Martin Schwidefsky commit 0b57436f15bf40e432487086c4f2d01fd3529393 Author: Wolfram Sang Date: Tue Nov 13 12:15:42 2018 +0100 i2c: rcar: check bus state before reinitializing We should check the bus state before reinitializing the IP core. Otherwise, the internal bus busy state which also tracks multi-master activity is lost. Credits go to the Renesas BSP team for suggesting this change. Reported-by: Yoshihiro Shimoda Signed-off-by: Wolfram Sang Fixes: ae481cc13965 ("i2c: rcar: fix resume by always initializing registers before transfer") Signed-off-by: Wolfram Sang commit 39129f28c9431522a6790e7b8c3283221a28447b Author: Wolfram Sang Date: Fri Nov 9 18:07:32 2018 +0100 i2c: nvidia-gpu: limit reads also for combined messages If the controller can only do 4 byte reads, this needs to be applied for the read-part of combined messages, too. Signed-off-by: Wolfram Sang Fixes: c71bcdcb42a7 ("i2c: add i2c bus driver for NVIDIA GPU") Acked-by: Ajay Gupta Tested-by: Ajay Gupta commit 98be694ba25fa0e87811e7784b782c9498741b26 Author: Wolfram Sang Date: Fri Nov 9 18:02:16 2018 +0100 i2c: nvidia-gpu: adhere to I2C fault codes As described in Documentation/i2c/fault-codes. Signed-off-by: Wolfram Sang Fixes: c71bcdcb42a7 ("i2c: add i2c bus driver for NVIDIA GPU") Acked-by: Ajay Gupta Tested-by: Ajay Gupta commit 976b489120cdab2b1b3a41ffa14661db43d58190 Author: Ard Biesheuvel Date: Fri Nov 23 22:51:32 2018 +0100 efi: Prevent GICv3 WARN() by mapping the memreserve table before first use Mapping the MEMRESERVE EFI configuration table from an early initcall is too late: the GICv3 ITS code that creates persistent reservations for the boot CPU's LPI tables is invoked from init_IRQ(), which runs much earlier than the handling of the initcalls. This results in a WARN() splat because the LPI tables cannot be reserved persistently, which will result in silent memory corruption after a kexec reboot. So instead, invoke the initialization performed by the initcall from efi_mem_reserve_persistent() itself as well, but keep the initcall so that the init is guaranteed to have been called before SMP boot. Tested-by: Marc Zyngier Tested-by: Jan Glauber Tested-by: John Garry Signed-off-by: Ard Biesheuvel Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Fixes: 63eb322d89c8 ("efi: Permit calling efi_mem_reserve_persistent() ...") Link: http://lkml.kernel.org/r/20181123215132.7951-2-ard.biesheuvel@linaro.org Signed-off-by: Ingo Molnar commit fd65d3142f734bc4376053c8d75670041903134d Author: Jim Mattson Date: Tue May 22 09:54:20 2018 -0700 kvm: svm: Ensure an IBPB on all affected CPUs when freeing a vmcb Previously, we only called indirect_branch_prediction_barrier on the logical CPU that freed a vmcb. This function should be called on all logical CPUs that last loaded the vmcb in question. Fixes: 15d45071523d ("KVM/x86: Add IBPB support") Reported-by: Neel Natu Signed-off-by: Jim Mattson Reviewed-by: Konrad Rzeszutek Wilk Cc: stable@vger.kernel.org Signed-off-by: Paolo Bonzini commit 0e0fee5c539b61fdd098332e0e2cc375d9073706 Author: Junaid Shahid Date: Wed Oct 31 14:53:57 2018 -0700 kvm: mmu: Fix race in emulated page table writes When a guest page table is updated via an emulated write, kvm_mmu_pte_write() is called to update the shadow PTE using the just written guest PTE value. But if two emulated guest PTE writes happened concurrently, it is possible that the guest PTE and the shadow PTE end up being out of sync. Emulated writes do not mark the shadow page as unsync-ed, so this inconsistency will not be resolved even by a guest TLB flush (unless the page was marked as unsync-ed at some other point). This is fixed by re-reading the current value of the guest PTE after the MMU lock has been acquired instead of just using the value that was written prior to calling kvm_mmu_pte_write(). Signed-off-by: Junaid Shahid Reviewed-by: Wanpeng Li Cc: stable@vger.kernel.org Signed-off-by: Paolo Bonzini commit 52ad7eb3d668867f9ee2e34d715cfb4860d36a93 Author: Liran Alon Date: Tue Nov 13 17:44:46 2018 +0200 KVM: nVMX: vmcs12 revision_id is always VMCS12_REVISION even when copied from eVMCS vmcs12 represents the per-CPU cache of L1 active vmcs12. This cache can be loaded by one of the following: 1) Guest making a vmcs12 active by exeucting VMPTRLD 2) Guest specifying eVMCS in VP assist page and executing VMLAUNCH/VMRESUME. Either way, vmcs12 should have revision_id of VMCS12_REVISION. Which is not equal to eVMCS revision_id which specifies used VersionNumber of eVMCS struct (e.g. KVM_EVMCS_VERSION). Specifically, this causes an issue in restoring a nested VM state because vmx_set_nested_state() verifies that vmcs12->revision_id is equal to VMCS12_REVISION which was not true in case vmcs12 was populated from an eVMCS by vmx_get_nested_state() which calls copy_enlightened_to_vmcs12(). Reviewed-by: Darren Kenny Signed-off-by: Liran Alon Reviewed-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini commit 72aeb60c52bf74a0eeec77d6b41ce40145697d76 Author: Liran Alon Date: Thu Nov 1 10:57:39 2018 +0200 KVM: nVMX: Verify eVMCS revision id match supported eVMCS version on eVMCS VMPTRLD According to TLFS section 16.11.2 Enlightened VMCS, the first u32 field of eVMCS should specify eVMCS VersionNumber. This version should be in the range of supported eVMCS versions exposed to guest via CPUID.0x4000000A.EAX[0:15]. The range which KVM expose to guest in this CPUID field should be the same as the value returned in vmcs_version by nested_enable_evmcs(). According to the above, eVMCS VMPTRLD should verify that version specified in given eVMCS is in the supported range. However, current code mistakenly verfies this field against VMCS12_REVISION. One can also see that when KVM use eVMCS, it makes sure that alloc_vmcs_cpu() sets allocated eVMCS revision_id to KVM_EVMCS_VERSION. Obvious fix should just change eVMCS VMPTRLD to verify first u32 field of eVMCS is equal to KVM_EVMCS_VERSION. However, it turns out that Microsoft Hyper-V fails to comply to their own invented interface: When Hyper-V use eVMCS, it just sets first u32 field of eVMCS to revision_id specified in MSR_IA32_VMX_BASIC (In our case: VMCS12_REVISION). Instead of used eVMCS version number which is one of the supported versions specified in CPUID.0x4000000A.EAX[0:15]. To overcome Hyper-V bug, we accept either a supported eVMCS version or VMCS12_REVISION as valid values for first u32 field of eVMCS. Cc: Vitaly Kuznetsov Reviewed-by: Nikita Leshenko Reviewed-by: Mark Kanda Signed-off-by: Liran Alon Reviewed-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini commit 326e742533bf0a23f0127d8ea62fb558ba665f08 Author: Leonid Shatz Date: Tue Nov 6 12:14:25 2018 +0200 KVM: nVMX/nSVM: Fix bug which sets vcpu->arch.tsc_offset to L1 tsc_offset Since commit e79f245ddec1 ("X86/KVM: Properly update 'tsc_offset' to represent the running guest"), vcpu->arch.tsc_offset meaning was changed to always reflect the tsc_offset value set on active VMCS. Regardless if vCPU is currently running L1 or L2. However, above mentioned commit failed to also change kvm_vcpu_write_tsc_offset() to set vcpu->arch.tsc_offset correctly. This is because vmx_write_tsc_offset() could set the tsc_offset value in active VMCS to given offset parameter *plus vmcs12->tsc_offset*. However, kvm_vcpu_write_tsc_offset() just sets vcpu->arch.tsc_offset to given offset parameter. Without taking into account the possible addition of vmcs12->tsc_offset. (Same is true for SVM case). Fix this issue by changing kvm_x86_ops->write_tsc_offset() to return actually set tsc_offset in active VMCS and modify kvm_vcpu_write_tsc_offset() to set returned value in vcpu->arch.tsc_offset. In addition, rename write_tsc_offset() callback to write_l1_tsc_offset() to make it clear that it is meant to set L1 TSC offset. Fixes: e79f245ddec1 ("X86/KVM: Properly update 'tsc_offset' to represent the running guest") Reviewed-by: Liran Alon Reviewed-by: Mihai Carabas Reviewed-by: Krish Sadhukhan Signed-off-by: Leonid Shatz Cc: stable@vger.kernel.org Signed-off-by: Paolo Bonzini commit 1e4329ee2c52692ea42cc677fb2133519718b34a Author: Yi Wang Date: Thu Nov 8 11:22:21 2018 +0800 x86/kvm/vmx: fix old-style function declaration The inline keyword which is not at the beginning of the function declaration may trigger the following build warnings, so let's fix it: arch/x86/kvm/vmx.c:1309:1: warning: ‘inline’ is not at beginning of declaration [-Wold-style-declaration] arch/x86/kvm/vmx.c:5947:1: warning: ‘inline’ is not at beginning of declaration [-Wold-style-declaration] arch/x86/kvm/vmx.c:5985:1: warning: ‘inline’ is not at beginning of declaration [-Wold-style-declaration] arch/x86/kvm/vmx.c:6023:1: warning: ‘inline’ is not at beginning of declaration [-Wold-style-declaration] Signed-off-by: Yi Wang Signed-off-by: Paolo Bonzini commit 354cb410d87314e2eda344feea84809e4261570a Author: Yi Wang Date: Thu Nov 8 16:48:36 2018 +0800 KVM: x86: fix empty-body warnings We get the following warnings about empty statements when building with 'W=1': arch/x86/kvm/lapic.c:632:53: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body] arch/x86/kvm/lapic.c:1907:42: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body] arch/x86/kvm/lapic.c:1936:65: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body] arch/x86/kvm/lapic.c:1975:44: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body] Rework the debug helper macro to get rid of these warnings. Signed-off-by: Yi Wang Signed-off-by: Paolo Bonzini commit f48b4711dd6e1cf282f9dfd159c14a305909c97c Author: Liran Alon Date: Tue Nov 20 18:03:25 2018 +0200 KVM: VMX: Update shared MSRs to be saved/restored on MSR_EFER.LMA changes When guest transitions from/to long-mode by modifying MSR_EFER.LMA, the list of shared MSRs to be saved/restored on guest<->host transitions is updated (See vmx_set_efer() call to setup_msrs()). On every entry to guest, vcpu_enter_guest() calls vmx_prepare_switch_to_guest(). This function should also take care of setting the shared MSRs to be saved/restored. However, the function does nothing in case we are already running with loaded guest state (vmx->loaded_cpu_state != NULL). This means that even when guest modifies MSR_EFER.LMA which results in updating the list of shared MSRs, it isn't being taken into account by vmx_prepare_switch_to_guest() because it happens while we are running with loaded guest state. To fix above mentioned issue, add a flag to mark that the list of shared MSRs has been updated and modify vmx_prepare_switch_to_guest() to set shared MSRs when running with host state *OR* list of shared MSRs has been updated. Note that this issue was mistakenly introduced by commit 678e315e78a7 ("KVM: vmx: add dedicated utility to access guest's kernel_gs_base") because previously vmx_set_efer() always called vmx_load_host_state() which resulted in vmx_prepare_switch_to_guest() to set shared MSRs. Fixes: 678e315e78a7 ("KVM: vmx: add dedicated utility to access guest's kernel_gs_base") Reported-by: Eyal Moscovici Reviewed-by: Mihai Carabas Reviewed-by: Liam Merwick Reviewed-by: Jim Mattson Signed-off-by: Liran Alon Signed-off-by: Paolo Bonzini commit bcbfbd8ec21096027f1ee13ce6c185e8175166f6 Author: Liran Alon Date: Thu Nov 8 00:43:06 2018 +0200 KVM: x86: Fix kernel info-leak in KVM_HC_CLOCK_PAIRING hypercall kvm_pv_clock_pairing() allocates local var "struct kvm_clock_pairing clock_pairing" on stack and initializes all it's fields besides padding (clock_pairing.pad[]). Because clock_pairing var is written completely (including padding) to guest memory, failure to init struct padding results in kernel info-leak. Fix the issue by making sure to also init the padding with zeroes. Fixes: 55dd00a73a51 ("KVM: x86: add KVM_HC_CLOCK_PAIRING hypercall") Reported-by: syzbot+a8ef68d71211ba264f56@syzkaller.appspotmail.com Reviewed-by: Mark Kanda Signed-off-by: Liran Alon Cc: stable@vger.kernel.org Signed-off-by: Paolo Bonzini commit 7f9ad1dfa3c768d1116c2dbacd7a09f9a871534e Author: Liran Alon Date: Sat Nov 17 14:05:06 2018 +0200 KVM: nVMX: Fix kernel info-leak when enabling KVM_CAP_HYPERV_ENLIGHTENED_VMCS more than once Consider the case that userspace enables KVM_CAP_HYPERV_ENLIGHTENED_VMCS twice: 1) kvm_vcpu_ioctl_enable_cap() is called to enable KVM_CAP_HYPERV_ENLIGHTENED_VMCS which calls nested_enable_evmcs(). 2) nested_enable_evmcs() sets enlightened_vmcs_enabled to true and fills vmcs_version which is then copied to userspace. 3) kvm_vcpu_ioctl_enable_cap() is called again to enable KVM_CAP_HYPERV_ENLIGHTENED_VMCS which calls nested_enable_evmcs(). 4) This time nested_enable_evmcs() just returns 0 as enlightened_vmcs_enabled is already true. *Without filling vmcs_version*. 5) kvm_vcpu_ioctl_enable_cap() continues as usual and copies *uninitialized* vmcs_version to userspace which leads to kernel info-leak. Fix this issue by simply changing nested_enable_evmcs() to always fill vmcs_version output argument. Even when enlightened_vmcs_enabled is already set to true. Note that SVM's nested_enable_evmcs() should not be modified because it always returns a non-zero value (-ENODEV) which results in kvm_vcpu_ioctl_enable_cap() skipping the copy of vmcs_version to userspace (as it should). Fixes: 57b119da3594 ("KVM: nVMX: add KVM_CAP_HYPERV_ENLIGHTENED_VMCS capability") Reported-by: syzbot+cfbc368e283d381f8cef@syzkaller.appspotmail.com Reviewed-by: Krish Sadhukhan Reviewed-by: Vitaly Kuznetsov Signed-off-by: Liran Alon Signed-off-by: Paolo Bonzini commit 30510387a5e45bfcf8190e03ec7aa15b295828e2 Author: Wei Wang Date: Mon Nov 12 12:23:14 2018 +0000 svm: Add mutex_lock to protect apic_access_page_done on AMD systems There is a race condition when accessing kvm->arch.apic_access_page_done. Due to it, x86_set_memory_region will fail when creating the second vcpu for a svm guest. Add a mutex_lock to serialize the accesses to apic_access_page_done. This lock is also used by vmx for the same purpose. Signed-off-by: Wei Wang Signed-off-by: Amadeusz Juskowiak Signed-off-by: Julian Stecklina Signed-off-by: Suravee Suthikulpanit Reviewed-by: Joerg Roedel Cc: stable@vger.kernel.org Signed-off-by: Paolo Bonzini commit e97f852fd4561e77721bb9a4e0ea9d98305b1e93 Author: Wanpeng Li Date: Tue Nov 20 16:34:18 2018 +0800 KVM: X86: Fix scan ioapic use-before-initialization Reported by syzkaller: BUG: unable to handle kernel NULL pointer dereference at 00000000000001c8 PGD 80000003ec4da067 P4D 80000003ec4da067 PUD 3f7bfa067 PMD 0 Oops: 0000 [#1] PREEMPT SMP PTI CPU: 7 PID: 5059 Comm: debug Tainted: G OE 4.19.0-rc5 #16 RIP: 0010:__lock_acquire+0x1a6/0x1990 Call Trace: lock_acquire+0xdb/0x210 _raw_spin_lock+0x38/0x70 kvm_ioapic_scan_entry+0x3e/0x110 [kvm] vcpu_enter_guest+0x167e/0x1910 [kvm] kvm_arch_vcpu_ioctl_run+0x35c/0x610 [kvm] kvm_vcpu_ioctl+0x3e9/0x6d0 [kvm] do_vfs_ioctl+0xa5/0x690 ksys_ioctl+0x6d/0x80 __x64_sys_ioctl+0x1a/0x20 do_syscall_64+0x83/0x6e0 entry_SYSCALL_64_after_hwframe+0x49/0xbe The reason is that the testcase writes hyperv synic HV_X64_MSR_SINT6 msr and triggers scan ioapic logic to load synic vectors into EOI exit bitmap. However, irqchip is not initialized by this simple testcase, ioapic/apic objects should not be accessed. This can be triggered by the following program: #define _GNU_SOURCE #include #include #include #include #include #include #include #include uint64_t r[3] = {0xffffffffffffffff, 0xffffffffffffffff, 0xffffffffffffffff}; int main(void) { syscall(__NR_mmap, 0x20000000, 0x1000000, 3, 0x32, -1, 0); long res = 0; memcpy((void*)0x20000040, "/dev/kvm", 9); res = syscall(__NR_openat, 0xffffffffffffff9c, 0x20000040, 0, 0); if (res != -1) r[0] = res; res = syscall(__NR_ioctl, r[0], 0xae01, 0); if (res != -1) r[1] = res; res = syscall(__NR_ioctl, r[1], 0xae41, 0); if (res != -1) r[2] = res; memcpy( (void*)0x20000080, "\x01\x00\x00\x00\x00\x5b\x61\xbb\x96\x00\x00\x40\x00\x00\x00\x00\x01\x00" "\x08\x00\x00\x00\x00\x00\x0b\x77\xd1\x78\x4d\xd8\x3a\xed\xb1\x5c\x2e\x43" "\xaa\x43\x39\xd6\xff\xf5\xf0\xa8\x98\xf2\x3e\x37\x29\x89\xde\x88\xc6\x33" "\xfc\x2a\xdb\xb7\xe1\x4c\xac\x28\x61\x7b\x9c\xa9\xbc\x0d\xa0\x63\xfe\xfe" "\xe8\x75\xde\xdd\x19\x38\xdc\x34\xf5\xec\x05\xfd\xeb\x5d\xed\x2e\xaf\x22" "\xfa\xab\xb7\xe4\x42\x67\xd0\xaf\x06\x1c\x6a\x35\x67\x10\x55\xcb", 106); syscall(__NR_ioctl, r[2], 0x4008ae89, 0x20000080); syscall(__NR_ioctl, r[2], 0xae80, 0); return 0; } This patch fixes it by bailing out scan ioapic if ioapic is not initialized in kernel. Reported-by: Wei Wu Cc: Paolo Bonzini Cc: Radim Krčmář Cc: Wei Wu Signed-off-by: Wanpeng Li Cc: stable@vger.kernel.org Signed-off-by: Paolo Bonzini commit 38ab012f109caf10f471db1adf284e620dd8d701 Author: Wanpeng Li Date: Tue Nov 20 09:39:30 2018 +0800 KVM: LAPIC: Fix pv ipis use-before-initialization Reported by syzkaller: BUG: unable to handle kernel NULL pointer dereference at 0000000000000014 PGD 800000040410c067 P4D 800000040410c067 PUD 40410d067 PMD 0 Oops: 0000 [#1] PREEMPT SMP PTI CPU: 3 PID: 2567 Comm: poc Tainted: G OE 4.19.0-rc5 #16 RIP: 0010:kvm_pv_send_ipi+0x94/0x350 [kvm] Call Trace: kvm_emulate_hypercall+0x3cc/0x700 [kvm] handle_vmcall+0xe/0x10 [kvm_intel] vmx_handle_exit+0xc1/0x11b0 [kvm_intel] vcpu_enter_guest+0x9fb/0x1910 [kvm] kvm_arch_vcpu_ioctl_run+0x35c/0x610 [kvm] kvm_vcpu_ioctl+0x3e9/0x6d0 [kvm] do_vfs_ioctl+0xa5/0x690 ksys_ioctl+0x6d/0x80 __x64_sys_ioctl+0x1a/0x20 do_syscall_64+0x83/0x6e0 entry_SYSCALL_64_after_hwframe+0x49/0xbe The reason is that the apic map has not yet been initialized, the testcase triggers pv_send_ipi interface by vmcall which results in kvm->arch.apic_map is dereferenced. This patch fixes it by checking whether or not apic map is NULL and bailing out immediately if that is the case. Fixes: 4180bf1b65 (KVM: X86: Implement "send IPI" hypercall) Reported-by: Wei Wu Cc: Paolo Bonzini Cc: Radim Krčmář Cc: Wei Wu Signed-off-by: Wanpeng Li Cc: stable@vger.kernel.org Signed-off-by: Paolo Bonzini commit a87c99e61236ba8ca962ce97a19fab5ebd588d35 Author: Luiz Capitulino Date: Fri Nov 23 12:02:14 2018 -0500 KVM: VMX: re-add ple_gap module parameter Apparently, the ple_gap parameter was accidentally removed by commit c8e88717cfc6b36bedea22368d97667446318291. Add it back. Signed-off-by: Luiz Capitulino Cc: stable@vger.kernel.org Fixes: c8e88717cfc6b36bedea22368d97667446318291 Signed-off-by: Paolo Bonzini commit 15cb127e3c8f6232096d5dba6a5b4046bc292d70 Author: Gustavo Pimentel Date: Fri Nov 23 18:00:21 2018 +0100 PCI: dwc: Fix MSI-X EP framework address calculation bug Fix an error caused by 3-bit right rotation on offset address calculation of MSI-X table in dw_pcie_ep_raise_msix_irq(). The initial testing code was setting by default the offset address of MSI-X table to zero, so that even with a 3-bit right rotation the computed result would still be zero and valid, therefore this bug went unnoticed. Fixes: beb4641a787d ("PCI: dwc: Add MSI-X callbacks handler") Signed-off-by: Gustavo Pimentel [lorenzo.pieralisi@arm.com: updated commit log] Signed-off-by: Lorenzo Pieralisi Cc: stable@vger.kernel.org commit 1078bef0cd9291355a20369b21cd823026ab8eaa Author: Kailang Yang Date: Thu Nov 8 16:36:15 2018 +0800 ALSA: hda/realtek - Support ALC300 This patch will enable ALC300. [ It's almost equivalent with other ALC269-compatible ones, and apparently has no loopback mixer -- tiwai ] Signed-off-by: Kailang Yang Cc: Signed-off-by: Takashi Iwai commit e8ed64b08eddc05043e556832616a478bbe4bb00 Author: Girija Kumar Kasinadhuni Date: Mon Nov 26 13:40:46 2018 -0500 ALSA: hda/realtek - Add auto-mute quirk for HP Spectre x360 laptop This device makes a loud buzzing sound when a headphone is inserted while playing audio at full volume through the speaker. Fixes: bbf8ff6b1d2a ("ALSA: hda/realtek - Fixup for HP x360 laptops with B&O speakers") Signed-off-by: Girija Kumar Kasinadhuni Cc: Signed-off-by: Takashi Iwai commit 104f708fd1241b22f808bdf066ab67dc5a051de5 Author: Harald Freudenberger Date: Fri Nov 9 14:59:24 2018 +0100 s390/zcrypt: reinit ap queue state machine during device probe Until the vfio-ap driver came into live there was a well known agreement about the way how ap devices are initialized and their states when the driver's probe function is called. However, the vfio device driver when receiving an ap queue device does additional resets thereby removing the registration for interrupts for the ap device done by the ap bus core code. So when later the vfio driver releases the device and one of the default zcrypt drivers takes care of the device the interrupt registration needs to get renewed. The current code does no renew and result is that requests send into such a queue will never see a reply processed - the application hangs. This patch adds a function which resets the aq queue state machine for the ap queue device and triggers the walk through the initial states (which are reset and registration for interrupts). This function is now called before the driver's probe function is invoked. When the association between driver and device is released, the driver's remove function is called. The current implementation calls a ap queue function ap_queue_remove(). This invokation has been moved to the ap bus function to make the probe / remove pair for ap bus and drivers more symmetric. Fixes: 7e0bdbe5c21c ("s390/zcrypt: AP bus support for alternate driver(s)") Cc: stable@vger.kernel.org # 4.19+ Signed-off-by: Harald Freudenberger Reviewd-by: Tony Krowiak Reviewd-by: Martin Schwidefsky Signed-off-by: Martin Schwidefsky commit ecebf55d27a11538ea84aee0be643dd953f830d5 Author: Pan Bian Date: Sun Nov 25 08:58:02 2018 +0800 ext2: fix potential use after free The function ext2_xattr_set calls brelse(bh) to drop the reference count of bh. After that, bh may be freed. However, following brelse(bh), it reads bh->b_data via macro HDR(bh). This may result in a use-after-free bug. This patch moves brelse(bh) after reading field. CC: stable@vger.kernel.org Signed-off-by: Pan Bian Signed-off-by: Jan Kara commit e5f5b717983bccfa033282e9886811635602510e Author: xingaopeng Date: Sat Nov 24 19:21:59 2018 +0800 ext2: initialize opts.s_mount_opt as zero before using it We need to initialize opts.s_mount_opt as zero before using it, else we may get some unexpected mount options. Fixes: 088519572ca8 ("ext2: Parse mount options into a dedicated structure") CC: stable@vger.kernel.org Signed-off-by: xingaopeng Signed-off-by: Jan Kara commit 2a48602615e0a2f563549c7d5c8d507f904cf96e Author: Chanho Park Date: Thu Nov 22 18:23:47 2018 +0900 tty: do not set TTY_IO_ERROR flag if console port Since Commit 761ed4a94582 ('tty: serial_core: convert uart_close to use tty_port_close') and Commit 4dda864d7307 ('tty: serial_core: Fix serial console crash on port shutdown), a serial port which is used as console can be stuck when logging out if there is a remained process. After logged out, agetty will try to grab the serial port but it will be failed because the previous process did not release the port correctly. To fix this, TTY_IO_ERROR bit should not be enabled of tty_port_close if the port is console port. Reproduce step: - Run background processes from serial console $ while true; do sleep 10; done & - Log out $ logout -> Stuck - Read journal log by journalctl | tail Jan 28 16:07:01 ubuntu systemd[1]: Stopped Serial Getty on ttyAMA0. Jan 28 16:07:01 ubuntu systemd[1]: Started Serial Getty on ttyAMA0. Jan 28 16:07:02 ubuntu agetty[1643]: /dev/ttyAMA0: not a tty Fixes: 761ed4a94582 ("tty: serial_core: convert uart_close to use tty_port_close") Cc: Geert Uytterhoeven Cc: Rob Herring Cc: Jiri Slaby Signed-off-by: Chanho Park Cc: stable Signed-off-by: Greg Kroah-Hartman commit 2b9034b5eaddc09c0e9529b93446eb975f97f814 Author: David Miller Date: Mon Nov 26 21:55:09 2018 -0800 sparc: Adjust bpf JIT prologue for PSEUDO calls. Move all arguments into output registers from input registers. This path is exercised by test_verifier.c's "calls: two calls with args" test. Adjust BPF_TAILCALL_PROLOGUE_SKIP as needed. Let's also make the prologue length a constant size regardless of the combination of ->saw_frame_pointer and ->saw_tail_call settings. Signed-off-by: David S. Miller Signed-off-by: Daniel Borkmann commit 27df7977099c2b8d32399cd1752f527c5a343dfa Author: Bartosz Golaszewski Date: Wed Nov 21 10:35:23 2018 +0100 ARM: davinci: dm644x: set the GPIO base to 0 Commit 587f7a694f01 ("gpio: davinci: Use dev name for label and automatic base selection") broke the GPIO support on DaVinci boards in legacy mode by allowing gpiolib to set the GPIO base automatically. DaVinci board files use the legacy GPIO API with hard-coded GPIO line numbers. Use the new fields in struct davinci_gpio_platform_data to manually set the GPIO base to 0. 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 55a891d0d0bd3db9303c580857147c37e2c76a5a Author: Bartosz Golaszewski Date: Wed Nov 21 10:35:22 2018 +0100 ARM: davinci: da830: set the GPIO base to 0 Commit 587f7a694f01 ("gpio: davinci: Use dev name for label and automatic base selection") broke the GPIO support on DaVinci boards in legacy mode by allowing gpiolib to set the GPIO base automatically. DaVinci board files use the legacy GPIO API with hard-coded GPIO line numbers. Use the new fields in struct davinci_gpio_platform_data to manually set the GPIO base to 0. 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 a6ca633e13f888cbb0a92309a1e090818cffcc86 Author: Bartosz Golaszewski Date: Wed Nov 21 10:35:21 2018 +0100 ARM: davinci: dm355: set the GPIO base to 0 Commit 587f7a694f01 ("gpio: davinci: Use dev name for label and automatic base selection") broke the GPIO support on DaVinci boards in legacy mode by allowing gpiolib to set the GPIO base automatically. DaVinci board files use the legacy GPIO API with hard-coded GPIO line numbers. Use the new fields in struct davinci_gpio_platform_data to manually set the GPIO base to 0. 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 6484a677294aa5d08c0210f2f387ebb9be646115 Author: YueHaibing Date: Wed Nov 14 01:57:03 2018 +0000 misc: mic/scif: fix copy-paste error in scif_create_remote_lookup gcc '-Wunused-but-set-variable' warning: drivers/misc/mic/scif/scif_rma.c: In function 'scif_create_remote_lookup': drivers/misc/mic/scif/scif_rma.c:373:25: warning: variable 'vmalloc_num_pages' set but not used [-Wunused-but-set-variable] 'vmalloc_num_pages' should be used to determine if the address is within the vmalloc range. Fixes: ba612aa8b487 ("misc: mic: SCIF memory registration and unregistration") Signed-off-by: YueHaibing Cc: stable Signed-off-by: Greg Kroah-Hartman commit d6a2b9535d1e52bea269c138614c4801469d10e1 Author: Keith Busch Date: Mon Nov 26 16:39:47 2018 -0700 nvme: Free ctrl device name on init failure Free the kobject name that was allocated for the controller device on failure rather than its parent. Fixes: d22524a4782a9 ("nvme: switch controller refcounting to use struct device") Signed-off-by: Keith Busch Signed-off-by: Christoph Hellwig commit 38a35a78c5e270cbe53c4fef6b0d3c2da90dd849 Author: Max Filippov Date: Mon Nov 26 18:06:01 2018 -0800 xtensa: fix coprocessor part of ptrace_{get,set}xregs Layout of coprocessor registers in the elf_xtregs_t and xtregs_coprocessor_t may be different due to alignment. Thus it is not always possible to copy data between the xtregs_coprocessor_t structure and the elf_xtregs_t and get correct values for all registers. Use a table of offsets and sizes of individual coprocessor register groups to do coprocessor context copying in the ptrace_getxregs and ptrace_setxregs. This fixes incorrect coprocessor register values reading from the user process by the native gdb on an xtensa core with multiple coprocessors and registers with high alignment requirements. Cc: stable@vger.kernel.org Signed-off-by: Max Filippov commit 03bc996af0cc71c7f30c384d8ce7260172423b34 Author: Max Filippov Date: Mon Nov 26 15:18:26 2018 -0800 xtensa: fix coprocessor context offset definitions Coprocessor context offsets are used by the assembly code that moves coprocessor context between the individual fields of the thread_info::xtregs_cp structure and coprocessor registers. This fixes coprocessor context clobbering on flushing and reloading during normal user code execution and user process debugging in the presence of more than one coprocessor in the core configuration. Cc: stable@vger.kernel.org Signed-off-by: Max Filippov commit 2958b66694e018c552be0b60521fec27e8d12988 Author: Max Filippov Date: Mon Nov 26 13:29:41 2018 -0800 xtensa: enable coprocessors that are being flushed coprocessor_flush_all may be called from a context of a thread that is different from the thread being flushed. In that case contents of the cpenable special register may not match ti->cpenable of the target thread, resulting in unhandled coprocessor exception in the kernel context. Set cpenable special register to the ti->cpenable of the target register for the duration of the flush and restore it afterwards. This fixes the following crash caused by coprocessor register inspection in native gdb: (gdb) p/x $w0 Illegal instruction in kernel: sig: 9 [#1] PREEMPT Call Trace: ___might_sleep+0x184/0x1a4 __might_sleep+0x41/0xac exit_signals+0x14/0x218 do_exit+0xc9/0x8b8 die+0x99/0xa0 do_illegal_instruction+0x18/0x6c common_exception+0x77/0x77 coprocessor_flush+0x16/0x3c arch_ptrace+0x46c/0x674 sys_ptrace+0x2ce/0x3b4 system_call+0x54/0x80 common_exception+0x77/0x77 note: gdb[100] exited with preempt_count 1 Killed Cc: stable@vger.kernel.org Signed-off-by: Max Filippov commit ef78e5ec9214376c5cb989f5da70b02d0c117b66 Author: Matias Bjørling Date: Mon Nov 26 11:27:03 2018 -0800 ia64: export node_distance function The numa_slit variable used by node_distance is available to a module as long as it is linked at compile-time. However, it is not available to loadable modules. Leading to errors such as: ERROR: "numa_slit" [drivers/nvme/host/nvme-core.ko] undefined! The error above is caused by the nvme multipath code that makes use of node_distance for its path calculation. When the patch was added, the lightnvm subsystem would select nvme and always compile it in, leading to the node_distance call to always succeed. However, when this requirement was removed, nvme could be compiled in as a module, which exposed this bug. This patch extracts node_distance to a function and exports it. Since ACPI is depending on node_distance being a simple lookup to numa_slit, the previous behavior is exposed as slit_distance and its users updated. Fixes: f333444708f82 "nvme: take node locality into account when selecting a path" Fixes: 73569e11032f "lightnvm: remove dependencies on BLK_DEV_NVME and PCI" Signed-off-by: Matias Bjøring Signed-off-by: Tony Luck Signed-off-by: Linus Torvalds commit fa1e0c9690bfa19eadd2adbaf511fb4fef9270e6 Author: Daniel Borkmann Date: Tue Nov 27 01:21:00 2018 +0100 bpf, doc: add entries of who looks over which jits Make the high-level BPF JIT entry a general 'catch-all' and add architecture specific entries to make it more clear who actively maintains which BPF JIT compiler. The list (L) address implies that this eventually lands in the bpf patchwork bucket. Goal is that this set of responsible developers listed here is always up to date and a point of contact for helping out in e.g. feature development, fixes, review or testing patches in order to help long-term in ensuring quality of the BPF JITs and therefore BPF core under a given architecture. Every new JIT in future /must/ have an entry here as well. Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Acked-by: Naveen N. Rao Acked-by: Sandipan Das Acked-by: Martin Schwidefsky Acked-by: Heiko Carstens Acked-by: David S. Miller Acked-by: Zi Shen Lim Acked-by: Paul Burton Acked-by: Jakub Kicinski Acked-by: Wang YanQing Signed-off-by: Alexei Starovoitov commit e2ac579a7a18bcd9e8cf14cf42eac0b8a2ba6c4b Author: David Miller Date: Mon Nov 26 14:52:18 2018 -0800 sparc: Correct ctx->saw_frame_pointer logic. We need to initialize the frame pointer register not just if it is seen as a source operand, but also if it is seen as the destination operand of a store or an atomic instruction (which effectively is a source operand). This is exercised by test_verifier's "non-invalid fp arithmetic" Signed-off-by: David S. Miller Signed-off-by: Alexei Starovoitov commit c44768a33da81b4a0986e79bbf0588f1a0651dec Author: David Miller Date: Mon Nov 26 13:03:46 2018 -0800 sparc: Fix JIT fused branch convergance. On T4 and later sparc64 cpus we can use the fused compare and branch instruction. However, it can only be used if the branch destination is in the range of a signed 10-bit immediate offset. This amounts to 1024 instructions forwards or backwards. After the commit referenced in the Fixes: tag, the largest possible size program seen by the JIT explodes by a significant factor. As a result of this convergance takes many more passes since the expanded "BPF_LDX | BPF_MSH | BPF_B" code sequence, for example, contains several embedded branch on condition instructions. On each pass, as suddenly new fused compare and branch instances become valid, this makes thousands more in range for the next pass. And so on and so forth. This is most greatly exemplified by "BPF_MAXINSNS: exec all MSH" which takes 35 passes to converge, and shrinks the image by about 64K. To decrease the cost of this number of convergance passes, do the convergance pass before we have the program image allocated, just like other JITs (such as x86) do. Fixes: e0cea7ce988c ("bpf: implement ld_abs/ld_ind in native bpf") Signed-off-by: David S. Miller Signed-off-by: Alexei Starovoitov commit fdac315d705a97e9edff1a40889fefd2df594422 Merge: 69500127424c 8c11ea5ce13d Author: Alexei Starovoitov Date: Mon Nov 26 17:34:25 2018 -0800 Merge branch 'arm64-jit-fixes' Daniel Borkmann says: ==================== This set contains a fix for arm64 BPF JIT. First patch generalizes ppc64 way of retrieving subprog into bpf_jit_get_func_addr() as core code and uses the same on arm64 in second patch. Tested on both arm64 and ppc64. ==================== Signed-off-by: Alexei Starovoitov commit 8c11ea5ce13da0252fc92f91e90b0cb0c8fe5619 Author: Daniel Borkmann Date: Mon Nov 26 14:05:39 2018 +0100 bpf, arm64: fix getting subprog addr from aux for calls The arm64 JIT has the same issue as ppc64 JIT in that the relative BPF to BPF call offset can be too far away from core kernel in that relative encoding into imm is not sufficient and could potentially be truncated, see also fd045f6cd98e ("arm64: add support for module PLTs") which adds spill-over space for module_alloc() and therefore bpf_jit_binary_alloc(). Therefore, use the recently added bpf_jit_get_func_addr() helper for properly fetching the address through prog->aux->func[off]->bpf_func instead. This also has the benefit to optimize normal helper calls since their address can use the optimized emission. Tested on Cavium ThunderX CN8890. Fixes: db496944fdaa ("bpf: arm64: add JIT support for multi-function programs") Signed-off-by: Daniel Borkmann Signed-off-by: Alexei Starovoitov commit e2c95a61656d29ceaac97b6a975c8a1f26e26f15 Author: Daniel Borkmann Date: Mon Nov 26 14:05:38 2018 +0100 bpf, ppc64: generalize fetching subprog into bpf_jit_get_func_addr Make fetching of the BPF call address from ppc64 JIT generic. ppc64 was using a slightly different variant rather than through the insns' imm field encoding as the target address would not fit into that space. Therefore, the target subprog number was encoded into the insns' offset and fetched through fp->aux->func[off]->bpf_func instead. Given there are other JITs with this issue and the mechanism of fetching the address is JIT-generic, move it into the core as a helper instead. On the JIT side, we get information on whether the retrieved address is a fixed one, that is, not changing through JIT passes, or a dynamic one. For the former, JITs can optimize their imm emission because this doesn't change jump offsets throughout JIT process. Signed-off-by: Daniel Borkmann Reviewed-by: Sandipan Das Tested-by: Sandipan Das Signed-off-by: Alexei Starovoitov commit 462951cd32e1496dc64b00051dfb777efc8ae5d8 Author: Michael Ellerman Date: Mon Nov 26 12:59:16 2018 +1100 powerpc/mm: Fix linux page tables build with some configs For some configs the build fails with: arch/powerpc/mm/dump_linuxpagetables.c: In function 'populate_markers': arch/powerpc/mm/dump_linuxpagetables.c:306:39: error: 'PKMAP_BASE' undeclared (first use in this function) arch/powerpc/mm/dump_linuxpagetables.c:314:50: error: 'LAST_PKMAP' undeclared (first use in this function) These come from highmem.h, including that fixes the build. Signed-off-by: Michael Ellerman commit 5564597d51c8ff5b88d95c76255e18b13b760879 Author: Paul Mackerras Date: Tue Nov 27 09:01:54 2018 +1100 powerpc: Fix COFF zImage booting on old powermacs Commit 6975a783d7b4 ("powerpc/boot: Allow building the zImage wrapper as a relocatable ET_DYN", 2011-04-12) changed the procedure descriptor at the start of crt0.S to have a hard-coded start address of 0x500000 rather than a reference to _zimage_start, presumably because having a reference to a symbol introduced a relocation which is awkward to handle in a position-independent executable. Unfortunately, what is at 0x500000 in the COFF image is not the first instruction, but the procedure descriptor itself, that is, a word containing 0x500000, which is not a valid instruction. Hence, booting a COFF zImage results in a "DEFAULT CATCH!, code=FFF00700" message from Open Firmware. This fixes the problem by (a) putting the procedure descriptor in the data section and (b) adding a branch to _zimage_start as the first instruction in the program. Fixes: 6975a783d7b4 ("powerpc/boot: Allow building the zImage wrapper as a relocatable ET_DYN") Signed-off-by: Paul Mackerras Signed-off-by: Michael Ellerman commit 53ca0f2fec39c80ccd19e6e3f30cc8daef174b70 Author: Taehee Yoo Date: Sun Nov 25 18:47:13 2018 +0900 netfilter: nf_conncount: remove wrong condition check routine All lists that reach the tree_nodes_free() function have both zero counter and true dead flag. The reason for this is that lists to be release are selected by nf_conncount_gc_list() which already decrements the list counter and sets on the dead flag. Therefore, this if statement in tree_nodes_free() is unnecessary and wrong. Fixes: 31568ec09ea0 ("netfilter: nf_conncount: fix list_del corruption in conn_free") Signed-off-by: Taehee Yoo Signed-off-by: Pablo Neira Ayuso commit 095faf45e64be00bff4da2d6182dface3d69c9b7 Author: Taehee Yoo Date: Thu Nov 22 19:59:57 2018 +0900 netfilter: nat: fix double register in masquerade modules There is a reference counter to ensure that masquerade modules register notifiers only once. However, the existing reference counter approach is not safe, test commands are: while : do modprobe ip6t_MASQUERADE & modprobe nft_masq_ipv6 & modprobe -rv ip6t_MASQUERADE & modprobe -rv nft_masq_ipv6 & done numbers below represent the reference counter. -------------------------------------------------------- CPU0 CPU1 CPU2 CPU3 CPU4 [insmod] [insmod] [rmmod] [rmmod] [insmod] -------------------------------------------------------- 0->1 register 1->2 returns 2->1 returns 1->0 0->1 register <-- unregister -------------------------------------------------------- The unregistation of CPU3 should be processed before the registration of CPU4. In order to fix this, use a mutex instead of reference counter. splat looks like: [ 323.869557] watchdog: BUG: soft lockup - CPU#0 stuck for 22s! [modprobe:1381] [ 323.869574] Modules linked in: nf_tables(+) nf_nat_ipv6(-) nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 n] [ 323.869574] irq event stamp: 194074 [ 323.898930] hardirqs last enabled at (194073): [] trace_hardirqs_on_thunk+0x1a/0x1c [ 323.898930] hardirqs last disabled at (194074): [] trace_hardirqs_off_thunk+0x1a/0x1c [ 323.898930] softirqs last enabled at (182132): [] __do_softirq+0x6ec/0xa3b [ 323.898930] softirqs last disabled at (182109): [] irq_exit+0x1a6/0x1e0 [ 323.898930] CPU: 0 PID: 1381 Comm: modprobe Not tainted 4.20.0-rc2+ #27 [ 323.898930] RIP: 0010:raw_notifier_chain_register+0xea/0x240 [ 323.898930] Code: 3c 03 0f 8e f2 00 00 00 44 3b 6b 10 7f 4d 49 bc 00 00 00 00 00 fc ff df eb 22 48 8d 7b 10 488 [ 323.898930] RSP: 0018:ffff888101597218 EFLAGS: 00000206 ORIG_RAX: ffffffffffffff13 [ 323.898930] RAX: 0000000000000000 RBX: ffffffffc04361c0 RCX: 0000000000000000 [ 323.898930] RDX: 1ffffffff26132ae RSI: ffffffffc04aa3c0 RDI: ffffffffc04361d0 [ 323.898930] RBP: ffffffffc04361c8 R08: 0000000000000000 R09: 0000000000000001 [ 323.898930] R10: ffff8881015972b0 R11: fffffbfff26132c4 R12: dffffc0000000000 [ 323.898930] R13: 0000000000000000 R14: 1ffff110202b2e44 R15: ffffffffc04aa3c0 [ 323.898930] FS: 00007f813ed41540(0000) GS:ffff88811ae00000(0000) knlGS:0000000000000000 [ 323.898930] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 323.898930] CR2: 0000559bf2c9f120 CR3: 000000010bc80000 CR4: 00000000001006f0 [ 323.898930] Call Trace: [ 323.898930] ? atomic_notifier_chain_register+0x2d0/0x2d0 [ 323.898930] ? down_read+0x150/0x150 [ 323.898930] ? sched_clock_cpu+0x126/0x170 [ 323.898930] ? nf_tables_core_module_init+0xe4/0xe4 [nf_tables] [ 323.898930] ? nf_tables_core_module_init+0xe4/0xe4 [nf_tables] [ 323.898930] register_netdevice_notifier+0xbb/0x790 [ 323.898930] ? __dev_close_many+0x2d0/0x2d0 [ 323.898930] ? __mutex_unlock_slowpath+0x17f/0x740 [ 323.898930] ? wait_for_completion+0x710/0x710 [ 323.898930] ? nf_tables_core_module_init+0xe4/0xe4 [nf_tables] [ 323.898930] ? up_write+0x6c/0x210 [ 323.898930] ? nf_tables_core_module_init+0xe4/0xe4 [nf_tables] [ 324.127073] ? nf_tables_core_module_init+0xe4/0xe4 [nf_tables] [ 324.127073] nft_chain_filter_init+0x1e/0xe8a [nf_tables] [ 324.127073] nf_tables_module_init+0x37/0x92 [nf_tables] [ ... ] Fixes: 8dd33cc93ec9 ("netfilter: nf_nat: generalize IPv4 masquerading support for nf_tables") Fixes: be6b635cd674 ("netfilter: nf_nat: generalize IPv6 masquerading support for nf_tables") Signed-off-by: Taehee Yoo Signed-off-by: Pablo Neira Ayuso commit 584eab291c67894cb17cc87544b9d086228ea70f Author: Taehee Yoo Date: Thu Nov 22 19:59:46 2018 +0900 netfilter: add missing error handling code for register functions register_{netdevice/inetaddr/inet6addr}_notifier may return an error value, this patch adds the code to handle these error paths. Signed-off-by: Taehee Yoo Signed-off-by: Pablo Neira Ayuso commit 75b7b86bdb0df37e08e44b6c1f99010967f81944 Author: Artemy Kovalyov Date: Sun Nov 25 20:34:26 2018 +0200 IB/mlx5: Fix page fault handling for MW Memory windows are implemented with an indirect MKey, when a page fault event comes for a MW Mkey we need to find the MR at the end of the list of the indirect MKeys by iterating on all items from the first to the last. The offset calculated during this process has to be zeroed after the first iteration or the next iteration will start from a wrong address, resulting incorrect ODP faulting behavior. Fixes: db570d7deafb ("IB/mlx5: Add ODP support to MW") Signed-off-by: Artemy Kovalyov Signed-off-by: Moni Shoua Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 605728e65ad303a1b639bcae7c0abd2e24e6a930 Author: Artemy Kovalyov Date: Sun Nov 25 20:34:25 2018 +0200 IB/umem: Set correct address to the invalidation function The invalidate range was using PAGE_SIZE instead of the computed 'end', and had the wrong transformation of page_index due the weird construction. This can trigger during error unwind and would cause malfunction. Inline the code and correct the math. Fixes: 403cd12e2cf7 ("IB/umem: Add contiguous ODP support") Signed-off-by: Artemy Kovalyov Signed-off-by: Moni Shoua Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 4d5422a309deecec906c491f8aea77593a46321d Author: Artemy Kovalyov Date: Sun Nov 25 20:34:23 2018 +0200 IB/mlx5: Skip non-ODP MR when handling a page fault It is possible that we call pagefault_single_data_segment() with a MKey that belongs to a memory region which is not on demand (i.e. pinned pages). This can happen if, for instance, a WQE that points to multiple MRs where some of them are ODP MRs and some are not. In this case we don't need to handle this MR in the ODP context besides reporting success. Otherwise the code will call pagefault_mr() which will do to_ib_umem_odp() on a non-ODP MR and thus access out of bounds. Fixes: 7bdf65d411c1 ("IB/mlx5: Handle page faults") Signed-off-by: Artemy Kovalyov Signed-off-by: Moni Shoua Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 508b09046c0f21678652fb66fd1e9959d55591d2 Author: Alin Nastac Date: Wed Nov 21 14:00:30 2018 +0100 netfilter: ipv6: Preserve link scope traffic original oif When ip6_route_me_harder is invoked, it resets outgoing interface of: - link-local scoped packets sent by neighbor discovery - multicast packets sent by MLD host - multicast packets send by MLD proxy daemon that sets outgoing interface through IPV6_PKTINFO ipi6_ifindex Link-local and multicast packets must keep their original oif after ip6_route_me_harder is called. Signed-off-by: Alin Nastac Signed-off-by: Pablo Neira Ayuso commit de7243057e7cefa923fa5f467c0f1ec24eef41d2 Author: Ye Yin Date: Fri Nov 23 09:55:18 2018 -0800 fs/xfs: fix f_ffree value for statfs when project quota is set When project is set, we should use inode limit minus the used count Signed-off-by: Ye Yin Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 8114865ff82e200b383e46821c25cb0625b842b5 Author: Steven Rostedt (VMware) Date: Sun Nov 18 17:10:15 2018 -0500 function_graph: Create function_graph_enter() to consolidate architecture code Currently all the architectures do basically the same thing in preparing the function graph tracer on entry to a function. This code can be pulled into a generic location and then this will allow the function graph tracer to be fixed, as well as extended. Create a new function graph helper function_graph_enter() that will call the hook function (ftrace_graph_entry) and the shadow stack operation (ftrace_push_return_trace), and remove the need of the architecture code to manage the shadow stack. This is needed to prepare for a fix of a design bug on how the curr_ret_stack is used. Cc: stable@kernel.org Fixes: 03274a3ffb449 ("tracing/fgraph: Adjust fgraph depth before calling trace return callback") Reviewed-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 31e1ab494559fb46de304cc6c2aed1528f94b298 Author: Christian Hewitt Date: Wed Nov 21 13:39:29 2018 +0400 drm/meson: add support for 1080p25 mode This essential mode for PAL users is missing, so add it. Fixes: 335e3713afb87 ("drm/meson: Add support for HDMI venc modes and settings") Signed-off-by: Christian Hewitt Acked-by: Neil Armstrong Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/1542793169-13008-1-git-send-email-christianshewitt@gmail.com Signed-off-by: Sean Paul commit 97b2a3180a559a33852ac0cd77904166069484fd Author: Lyude Paul Date: Sat Nov 24 20:21:17 2018 -0500 drm/meson: Fix OOB memory accesses in meson_viu_set_osd_lut() Currently on driver bringup with KASAN enabled, meson triggers an OOB memory access as shown below: [ 117.904528] ================================================================== [ 117.904560] BUG: KASAN: global-out-of-bounds in meson_viu_set_osd_lut+0x7a0/0x890 [ 117.904588] Read of size 4 at addr ffff20000a63ce24 by task systemd-udevd/498 [ 117.904601] [ 118.083372] CPU: 4 PID: 498 Comm: systemd-udevd Not tainted 4.20.0-rc3Lyude-Test+ #20 [ 118.091143] Hardware name: amlogic khadas-vim2/khadas-vim2, BIOS 2018.07-rc2-armbian 09/11/2018 [ 118.099768] Call trace: [ 118.102181] dump_backtrace+0x0/0x3e8 [ 118.105796] show_stack+0x14/0x20 [ 118.109083] dump_stack+0x130/0x1c4 [ 118.112539] print_address_description+0x60/0x25c [ 118.117214] kasan_report+0x1b4/0x368 [ 118.120851] __asan_report_load4_noabort+0x18/0x20 [ 118.125566] meson_viu_set_osd_lut+0x7a0/0x890 [ 118.129953] meson_viu_init+0x10c/0x290 [ 118.133741] meson_drv_bind_master+0x474/0x748 [ 118.138141] meson_drv_bind+0x10/0x18 [ 118.141760] try_to_bring_up_master+0x3d8/0x768 [ 118.146249] component_add+0x214/0x570 [ 118.149978] meson_dw_hdmi_probe+0x18/0x20 [meson_dw_hdmi] [ 118.155404] platform_drv_probe+0x98/0x138 [ 118.159455] really_probe+0x2a0/0xa70 [ 118.163070] driver_probe_device+0x1b4/0x2d8 [ 118.167299] __driver_attach+0x200/0x280 [ 118.171189] bus_for_each_dev+0x10c/0x1a8 [ 118.175144] driver_attach+0x38/0x50 [ 118.178681] bus_add_driver+0x330/0x608 [ 118.182471] driver_register+0x140/0x388 [ 118.186361] __platform_driver_register+0xc8/0x108 [ 118.191117] meson_dw_hdmi_platform_driver_init+0x1c/0x1000 [meson_dw_hdmi] [ 118.198022] do_one_initcall+0x12c/0x3bc [ 118.201883] do_init_module+0x1fc/0x638 [ 118.205673] load_module+0x4b4c/0x6808 [ 118.209387] __se_sys_init_module+0x2e8/0x3c0 [ 118.213699] __arm64_sys_init_module+0x68/0x98 [ 118.218100] el0_svc_common+0x104/0x210 [ 118.221893] el0_svc_handler+0x48/0xb8 [ 118.225594] el0_svc+0x8/0xc [ 118.228429] [ 118.229887] The buggy address belongs to the variable: [ 118.235007] eotf_33_linear_mapping+0x84/0xc0 [ 118.239301] [ 118.240752] Memory state around the buggy address: [ 118.245522] ffff20000a63cd00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 118.252695] ffff20000a63cd80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 118.259850] >ffff20000a63ce00: 00 00 00 00 04 fa fa fa fa fa fa fa 00 00 00 00 [ 118.267000] ^ [ 118.271222] ffff20000a63ce80: 00 fa fa fa fa fa fa fa 00 00 00 00 00 00 00 00 [ 118.278393] ffff20000a63cf00: 00 00 00 00 00 00 00 00 00 00 00 00 04 fa fa fa [ 118.285542] ================================================================== [ 118.292699] Disabling lock debugging due to kernel taint It seems that when looping through the OSD EOTF LUT maps, we use the same max iterator for OETF: 20. This is wrong though, since 20*2 is 40, which means that we'll stop out of bounds on the EOTF maps. But, this whole thing is already confusing enough to read through as-is, so let's just replace all of the hardcoded sizes with OSD_(OETF/EOTF)_LUT_SIZE / 2. Signed-off-by: Lyude Paul Fixes: bbbe775ec5b5 ("drm: Add support for Amlogic Meson Graphic Controller") Cc: Neil Armstrong Cc: Maxime Ripard Cc: Carlo Caione Cc: Kevin Hilman Cc: dri-devel@lists.freedesktop.org Cc: linux-amlogic@lists.infradead.org Cc: linux-arm-kernel@lists.infradead.org Cc: # v4.10+ Acked-by: Neil Armstrong Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20181125012117.31915-1-lyude@redhat.com Signed-off-by: Sean Paul commit 995b278e4723b26f8ebf0e7c119286d16c712747 Author: Lyude Paul Date: Sat Nov 24 14:12:38 2018 -0500 drm/meson: Enable fast_io in meson_dw_hdmi_regmap_config Seeing as we use this registermap in the context of our IRQ handlers, we need to be using spinlocks for reading/writing registers so that we can still read them from IRQ handlers without having to grab any mutexes and accidentally sleep. We don't currently do this, as pointed out by lockdep: [ 18.403770] BUG: sleeping function called from invalid context at kernel/locking/mutex.c:908 [ 18.406744] in_atomic(): 1, irqs_disabled(): 128, pid: 68, name: kworker/u17:0 [ 18.413864] INFO: lockdep is turned off. [ 18.417675] irq event stamp: 12 [ 18.420778] hardirqs last enabled at (11): [] _raw_spin_unlock_irq+0x2c/0x60 [ 18.429510] hardirqs last disabled at (12): [] __schedule+0xc4/0xa60 [ 18.437345] softirqs last enabled at (0): [] copy_process.isra.4.part.5+0x4d8/0x1c50 [ 18.446684] softirqs last disabled at (0): [<0000000000000000>] (null) [ 18.453979] CPU: 0 PID: 68 Comm: kworker/u17:0 Tainted: G W O 4.20.0-rc3Lyude-Test+ #9 [ 18.469839] Hardware name: amlogic khadas-vim2/khadas-vim2, BIOS 2018.07-rc2-armbian 09/11/2018 [ 18.480037] Workqueue: hci0 hci_power_on [bluetooth] [ 18.487138] Call trace: [ 18.494192] dump_backtrace+0x0/0x1b8 [ 18.501280] show_stack+0x14/0x20 [ 18.508361] dump_stack+0xbc/0xf4 [ 18.515427] ___might_sleep+0x140/0x1d8 [ 18.522515] __might_sleep+0x50/0x88 [ 18.529582] __mutex_lock+0x60/0x870 [ 18.536621] mutex_lock_nested+0x1c/0x28 [ 18.543660] regmap_lock_mutex+0x10/0x18 [ 18.550696] regmap_read+0x38/0x70 [ 18.557727] dw_hdmi_hardirq+0x58/0x138 [dw_hdmi] [ 18.564804] __handle_irq_event_percpu+0xac/0x410 [ 18.571891] handle_irq_event_percpu+0x34/0x88 [ 18.578982] handle_irq_event+0x48/0x78 [ 18.586051] handle_fasteoi_irq+0xac/0x160 [ 18.593061] generic_handle_irq+0x24/0x38 [ 18.599989] __handle_domain_irq+0x60/0xb8 [ 18.606857] gic_handle_irq+0x50/0xa0 [ 18.613659] el1_irq+0xb4/0x130 [ 18.620394] debug_lockdep_rcu_enabled+0x2c/0x30 [ 18.627111] schedule+0x38/0xa0 [ 18.633781] schedule_timeout+0x3a8/0x510 [ 18.640389] wait_for_common+0x15c/0x180 [ 18.646905] wait_for_completion+0x14/0x20 [ 18.653319] mmc_wait_for_req_done+0x28/0x168 [ 18.659693] mmc_wait_for_req+0xa8/0xe8 [ 18.665978] mmc_wait_for_cmd+0x64/0x98 [ 18.672180] mmc_io_rw_direct_host+0x94/0x130 [ 18.678385] mmc_io_rw_direct+0x10/0x18 [ 18.684516] sdio_enable_func+0xe8/0x1d0 [ 18.690627] btsdio_open+0x24/0xc0 [btsdio] [ 18.696821] hci_dev_do_open+0x64/0x598 [bluetooth] [ 18.703025] hci_power_on+0x50/0x270 [bluetooth] [ 18.709163] process_one_work+0x2a0/0x6e0 [ 18.715252] worker_thread+0x40/0x448 [ 18.721310] kthread+0x12c/0x130 [ 18.727326] ret_from_fork+0x10/0x1c [ 18.735555] ------------[ cut here ]------------ [ 18.741430] do not call blocking ops when !TASK_RUNNING; state=2 set at [<000000006265ec59>] wait_for_common+0x140/0x180 [ 18.752417] WARNING: CPU: 0 PID: 68 at kernel/sched/core.c:6096 __might_sleep+0x7c/0x88 [ 18.760553] Modules linked in: dm_mirror dm_region_hash dm_log dm_mod btsdio bluetooth snd_soc_hdmi_codec dw_hdmi_i2s_audio ecdh_generic brcmfmac brcmutil cfg80211 rfkill ir_nec_decoder meson_dw_hdmi(O) dw_hdmi rc_geekbox meson_rng meson_ir ao_cec rng_core rc_core cec leds_pwm efivars nfsd ip_tables x_tables crc32_generic f2fs uas meson_gxbb_wdt pwm_meson efivarfs ipv6 [ 18.799469] CPU: 0 PID: 68 Comm: kworker/u17:0 Tainted: G W O 4.20.0-rc3Lyude-Test+ #9 [ 18.808858] Hardware name: amlogic khadas-vim2/khadas-vim2, BIOS 2018.07-rc2-armbian 09/11/2018 [ 18.818045] Workqueue: hci0 hci_power_on [bluetooth] [ 18.824088] pstate: 80000085 (Nzcv daIf -PAN -UAO) [ 18.829891] pc : __might_sleep+0x7c/0x88 [ 18.835722] lr : __might_sleep+0x7c/0x88 [ 18.841256] sp : ffff000008003cb0 [ 18.846751] x29: ffff000008003cb0 x28: 0000000000000000 [ 18.852269] x27: ffff00000938e000 x26: ffff800010283000 [ 18.857726] x25: ffff800010353280 x24: ffff00000868ef50 [ 18.863166] x23: 0000000000000000 x22: 0000000000000000 [ 18.868551] x21: 0000000000000000 x20: 000000000000038c [ 18.873850] x19: ffff000008cd08c0 x18: 0000000000000010 [ 18.879081] x17: ffff000008a68cb0 x16: 0000000000000000 [ 18.884197] x15: 0000000000aaaaaa x14: 0e200e200e200e20 [ 18.889239] x13: 0000000000000001 x12: 00000000ffffffff [ 18.894261] x11: ffff000008adfa48 x10: 0000000000000001 [ 18.899517] x9 : ffff0000092a0158 x8 : 0000000000000000 [ 18.904674] x7 : ffff00000812136c x6 : 0000000000000000 [ 18.909895] x5 : 0000000000000000 x4 : 0000000000000001 [ 18.915080] x3 : 0000000000000007 x2 : 0000000000000007 [ 18.920269] x1 : 99ab8e9ebb6c8500 x0 : 0000000000000000 [ 18.925443] Call trace: [ 18.929904] __might_sleep+0x7c/0x88 [ 18.934311] __mutex_lock+0x60/0x870 [ 18.938687] mutex_lock_nested+0x1c/0x28 [ 18.943076] regmap_lock_mutex+0x10/0x18 [ 18.947453] regmap_read+0x38/0x70 [ 18.951842] dw_hdmi_hardirq+0x58/0x138 [dw_hdmi] [ 18.956269] __handle_irq_event_percpu+0xac/0x410 [ 18.960712] handle_irq_event_percpu+0x34/0x88 [ 18.965176] handle_irq_event+0x48/0x78 [ 18.969612] handle_fasteoi_irq+0xac/0x160 [ 18.974058] generic_handle_irq+0x24/0x38 [ 18.978501] __handle_domain_irq+0x60/0xb8 [ 18.982938] gic_handle_irq+0x50/0xa0 [ 18.987351] el1_irq+0xb4/0x130 [ 18.991734] debug_lockdep_rcu_enabled+0x2c/0x30 [ 18.996180] schedule+0x38/0xa0 [ 19.000609] schedule_timeout+0x3a8/0x510 [ 19.005064] wait_for_common+0x15c/0x180 [ 19.009513] wait_for_completion+0x14/0x20 [ 19.013951] mmc_wait_for_req_done+0x28/0x168 [ 19.018402] mmc_wait_for_req+0xa8/0xe8 [ 19.022809] mmc_wait_for_cmd+0x64/0x98 [ 19.027177] mmc_io_rw_direct_host+0x94/0x130 [ 19.031563] mmc_io_rw_direct+0x10/0x18 [ 19.035922] sdio_enable_func+0xe8/0x1d0 [ 19.040294] btsdio_open+0x24/0xc0 [btsdio] [ 19.044742] hci_dev_do_open+0x64/0x598 [bluetooth] [ 19.049228] hci_power_on+0x50/0x270 [bluetooth] [ 19.053687] process_one_work+0x2a0/0x6e0 [ 19.058143] worker_thread+0x40/0x448 [ 19.062608] kthread+0x12c/0x130 [ 19.067064] ret_from_fork+0x10/0x1c [ 19.071513] irq event stamp: 12 [ 19.075937] hardirqs last enabled at (11): [] _raw_spin_unlock_irq+0x2c/0x60 [ 19.083560] hardirqs last disabled at (12): [] __schedule+0xc4/0xa60 [ 19.091401] softirqs last enabled at (0): [] copy_process.isra.4.part.5+0x4d8/0x1c50 [ 19.100801] softirqs last disabled at (0): [<0000000000000000>] (null) [ 19.108135] ---[ end trace 38c4920787b88c75 ]--- So, fix this by enabling the fast_io option in our regmap config so that regmap uses spinlocks for locking instead of mutexes. Signed-off-by: Lyude Paul Fixes: 3f68be7d8e96 ("drm/meson: Add support for HDMI encoder and DW-HDMI bridge + PHY") Cc: Daniel Vetter Cc: Neil Armstrong Cc: Carlo Caione Cc: Kevin Hilman Cc: dri-devel@lists.freedesktop.org Cc: linux-amlogic@lists.infradead.org Cc: linux-arm-kernel@lists.infradead.org Cc: # v4.12+ Acked-by: Neil Armstrong Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20181124191238.28276-1-lyude@redhat.com Signed-off-by: Sean Paul commit 2bcd3ecab773f73211c45bb1430bb52ac641f271 Author: Neil Armstrong Date: Thu Nov 22 17:01:03 2018 +0100 drm/meson: Fixes for drm_crtc_vblank_on/off support Since Linux 4.17, calls to drm_crtc_vblank_on/off are mandatory, and we get a warning when ctrc is disabled : " driver forgot to call drm_crtc_vblank_off()" But, the vsync IRQ was not totally disabled due the transient hardware state and specific interrupt line, thus adding proper IRQ masking from the HHI system control registers. The last change fixes a race condition introduced by calling the added drm_crtc_vblank_on/off when an HPD event occurs from the HDMI connector, triggering a WARN_ON() in the _atomic_begin() callback when the CRTC is disabled, thus also triggering a WARN_ON() in drm_vblank_put() : WARNING: CPU: 0 PID: 1185 at drivers/gpu/drm/meson/meson_crtc.c:157 meson_crtc_atomic_begin+0x78/0x80 [...] Call trace: meson_crtc_atomic_begin+0x78/0x80 drm_atomic_helper_commit_planes+0x140/0x218 drm_atomic_helper_commit_tail+0x38/0x80 commit_tail+0x7c/0x80 drm_atomic_helper_commit+0xdc/0x150 drm_atomic_commit+0x54/0x60 restore_fbdev_mode_atomic+0x198/0x238 restore_fbdev_mode+0x6c/0x1c0 drm_fb_helper_restore_fbdev_mode_unlocked+0x7c/0xf0 drm_fb_helper_set_par+0x34/0x60 drm_fb_helper_hotplug_event.part.28+0xb8/0xc8 drm_fbdev_client_hotplug+0xa4/0xe0 drm_client_dev_hotplug+0x90/0xe0 drm_kms_helper_hotplug_event+0x3c/0x48 drm_helper_hpd_irq_event+0x134/0x168 dw_hdmi_top_thread_irq+0x3c/0x50 [...] WARNING: CPU: 0 PID: 1185 at drivers/gpu/drm/drm_vblank.c:1026 drm_vblank_put+0xb4/0xc8 [...] Call trace: drm_vblank_put+0xb4/0xc8 drm_crtc_vblank_put+0x24/0x30 drm_atomic_helper_wait_for_vblanks.part.9+0x130/0x2b8 drm_atomic_helper_commit_tail+0x68/0x80 [...] The issue is that vblank need to be enabled in any occurrence of : - atomic_enable() - atomic_begin() and state->enable == true, which was not the case Moving the CRTC enable code to a common function and calling in one of these occurrence solves this race condition and makes sure vblank is enabled in each call to _atomic_begin() from the HPD event leading to drm_atomic_helper_commit_planes(). To Summarize : - Make sure that the CRTC code will call the drm_crtc_vblank_on()/off() - *Really* mask the Vsync IRQ - Initialize and enable vblank at the first atomic_begin()/_atomic_enable() Cc: stable@vger.kernel.org # 4.17+ Signed-off-by: Neil Armstrong Reviewed-by: Lyude Paul [fixed typos+added cc for stable] Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20181122160103.10993-1-narmstrong@baylibre.com Signed-off-by: Sean Paul commit 23a336b34258aba3b50ea6863cca4e81b5ef6384 Author: Sergio Correia Date: Thu Nov 22 02:33:29 2018 -0300 drm: set is_master to 0 upon drm_new_set_master() failure When drm_new_set_master() fails, set is_master to 0, to prevent a possible NULL pointer deref. Here is a problematic flow: we check is_master in drm_is_current_master(), then proceed to call drm_lease_owner() passing master. If we do not restore is_master status when drm_new_set_master() fails, we may have a situation in which is_master will be 1 and master itself, NULL, leading to the deref of a NULL pointer in drm_lease_owner(). This fixes the following OOPS, observed on an ArchLinux running a 4.19.2 kernel: [ 97.804282] BUG: unable to handle kernel NULL pointer dereference at 0000000000000080 [ 97.807224] PGD 0 P4D 0 [ 97.807224] Oops: 0000 [#1] PREEMPT SMP NOPTI [ 97.807224] CPU: 0 PID: 1348 Comm: xfwm4 Tainted: P OE 4.19.2-arch1-1-ARCH #1 [ 97.807224] Hardware name: To Be Filled By O.E.M. To Be Filled By O.E.M./AB350 Pro4, BIOS P5.10 10/16/2018 [ 97.807224] RIP: 0010:drm_lease_owner+0xd/0x20 [drm] [ 97.807224] Code: 83 c4 18 5b 5d c3 b8 ea ff ff ff eb e2 b8 ed ff ff ff eb db e8 b4 ca 68 fb 0f 1f 40 00 0f 1f 44 00 00 48 89 f8 eb 03 48 89 d0 <48> 8b 90 80 00 00 00 48 85 d2 75 f1 c3 66 0f 1f 44 00 00 0f 1f 44 [ 97.807224] RSP: 0018:ffffb8cf08e07bb0 EFLAGS: 00010202 [ 97.807224] RAX: 0000000000000000 RBX: ffff9cf0f2586c00 RCX: ffff9cf0f2586c88 [ 97.807224] RDX: ffff9cf0ddbd8000 RSI: 0000000000000000 RDI: 0000000000000000 [ 97.807224] RBP: ffff9cf1040e9800 R08: 0000000000000000 R09: 0000000000000000 [ 97.807224] R10: ffffdeb30fd5d680 R11: ffffdeb30f5d6808 R12: ffff9cf1040e9888 [ 97.807224] R13: 0000000000000000 R14: dead000000000200 R15: ffff9cf0f2586cc8 [ 97.807224] FS: 00007f4145513180(0000) GS:ffff9cf10ea00000(0000) knlGS:0000000000000000 [ 97.807224] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 97.807224] CR2: 0000000000000080 CR3: 00000003d7548000 CR4: 00000000003406f0 [ 97.807224] Call Trace: [ 97.807224] drm_is_current_master+0x1a/0x30 [drm] [ 97.807224] drm_master_release+0x3e/0x130 [drm] [ 97.807224] drm_file_free.part.0+0x2be/0x2d0 [drm] [ 97.807224] drm_open+0x1ba/0x1e0 [drm] [ 97.807224] drm_stub_open+0xaf/0xe0 [drm] [ 97.807224] chrdev_open+0xa3/0x1b0 [ 97.807224] ? cdev_put.part.0+0x20/0x20 [ 97.807224] do_dentry_open+0x132/0x340 [ 97.807224] path_openat+0x2d1/0x14e0 [ 97.807224] ? mem_cgroup_commit_charge+0x7a/0x520 [ 97.807224] do_filp_open+0x93/0x100 [ 97.807224] ? __check_object_size+0x102/0x189 [ 97.807224] ? _raw_spin_unlock+0x16/0x30 [ 97.807224] do_sys_open+0x186/0x210 [ 97.807224] do_syscall_64+0x5b/0x170 [ 97.807224] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [ 97.807224] RIP: 0033:0x7f4147b07976 [ 97.807224] Code: 89 54 24 08 e8 7b f4 ff ff 8b 74 24 0c 48 8b 3c 24 41 89 c0 44 8b 54 24 08 b8 01 01 00 00 89 f2 48 89 fe bf 9c ff ff ff 0f 05 <48> 3d 00 f0 ff ff 77 30 44 89 c7 89 44 24 08 e8 a6 f4 ff ff 8b 44 [ 97.807224] RSP: 002b:00007ffcced96ca0 EFLAGS: 00000293 ORIG_RAX: 0000000000000101 [ 97.807224] RAX: ffffffffffffffda RBX: 00005619d5037f80 RCX: 00007f4147b07976 [ 97.807224] RDX: 0000000000000002 RSI: 00005619d46b969c RDI: 00000000ffffff9c [ 98.040039] RBP: 0000000000000024 R08: 0000000000000000 R09: 0000000000000000 [ 98.040039] R10: 0000000000000000 R11: 0000000000000293 R12: 0000000000000024 [ 98.040039] R13: 0000000000000012 R14: 00005619d5035950 R15: 0000000000000012 [ 98.040039] Modules linked in: nct6775 hwmon_vid algif_skcipher af_alg nls_iso8859_1 nls_cp437 vfat fat uvcvideo videobuf2_vmalloc videobuf2_memops videobuf2_v4l2 videobuf2_common arc4 videodev media snd_usb_audio snd_hda_codec_hdmi snd_usbmidi_lib snd_rawmidi snd_seq_device mousedev input_leds iwlmvm mac80211 snd_hda_codec_realtek snd_hda_codec_generic snd_hda_intel snd_hda_codec edac_mce_amd kvm_amd snd_hda_core kvm iwlwifi snd_hwdep r8169 wmi_bmof cfg80211 snd_pcm irqbypass snd_timer snd libphy soundcore pinctrl_amd rfkill pcspkr sp5100_tco evdev gpio_amdpt k10temp mac_hid i2c_piix4 wmi pcc_cpufreq acpi_cpufreq vboxnetflt(OE) vboxnetadp(OE) vboxpci(OE) vboxdrv(OE) msr sg crypto_user ip_tables x_tables ext4 crc32c_generic crc16 mbcache jbd2 fscrypto uas usb_storage dm_crypt hid_generic usbhid hid [ 98.040039] dm_mod raid1 md_mod sd_mod crct10dif_pclmul crc32_pclmul crc32c_intel ghash_clmulni_intel pcbc ahci libahci aesni_intel aes_x86_64 libata crypto_simd cryptd glue_helper ccp xhci_pci rng_core scsi_mod xhci_hcd nvidia_drm(POE) drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops drm agpgart nvidia_uvm(POE) nvidia_modeset(POE) nvidia(POE) ipmi_devintf ipmi_msghandler [ 98.040039] CR2: 0000000000000080 [ 98.040039] ---[ end trace 3b65093b6fe62b2f ]--- [ 98.040039] RIP: 0010:drm_lease_owner+0xd/0x20 [drm] [ 98.040039] Code: 83 c4 18 5b 5d c3 b8 ea ff ff ff eb e2 b8 ed ff ff ff eb db e8 b4 ca 68 fb 0f 1f 40 00 0f 1f 44 00 00 48 89 f8 eb 03 48 89 d0 <48> 8b 90 80 00 00 00 48 85 d2 75 f1 c3 66 0f 1f 44 00 00 0f 1f 44 [ 98.040039] RSP: 0018:ffffb8cf08e07bb0 EFLAGS: 00010202 [ 98.040039] RAX: 0000000000000000 RBX: ffff9cf0f2586c00 RCX: ffff9cf0f2586c88 [ 98.040039] RDX: ffff9cf0ddbd8000 RSI: 0000000000000000 RDI: 0000000000000000 [ 98.040039] RBP: ffff9cf1040e9800 R08: 0000000000000000 R09: 0000000000000000 [ 98.040039] R10: ffffdeb30fd5d680 R11: ffffdeb30f5d6808 R12: ffff9cf1040e9888 [ 98.040039] R13: 0000000000000000 R14: dead000000000200 R15: ffff9cf0f2586cc8 [ 98.040039] FS: 00007f4145513180(0000) GS:ffff9cf10ea00000(0000) knlGS:0000000000000000 [ 98.040039] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 98.040039] CR2: 0000000000000080 CR3: 00000003d7548000 CR4: 00000000003406f0 Signed-off-by: Sergio Correia Cc: stable@vger.kernel.org Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20181122053329.2692-1-sergio@correia.cc Signed-off-by: Sean Paul commit c54c7374ff44de5e609506aca7c0deae4703b6d1 Author: Lyude Paul Date: Tue Nov 13 17:46:14 2018 -0500 drm/dp_mst: Skip validating ports during destruction, just ref Jerry Zuo pointed out a rather obscure hotplugging issue that it seems I accidentally introduced into DRM two years ago. Pretend we have a topology like this: |- DP-1: mst_primary |- DP-4: active display |- DP-5: disconnected |- DP-6: active hub |- DP-7: active display |- DP-8: disconnected |- DP-9: disconnected If we unplug DP-6, the topology starting at DP-7 will be destroyed but it's payloads will live on in DP-1's VCPI allocations and thus require removal. However, this removal currently fails because drm_dp_update_payload_part1() will (rightly so) try to validate the port before accessing it, fail then abort. If we keep going, eventually we run the MST hub out of bandwidth and all new allocations will start to fail (or in my case; all new displays just start flickering a ton). We could just teach drm_dp_update_payload_part1() not to drop the port ref in this case, but then we also need to teach drm_dp_destroy_payload_step1() to do the same thing, then hope no one ever adds anything to the that requires a validated port reference in drm_dp_destroy_connector_work(). Kind of sketchy. So let's go with a more clever solution: any port that drm_dp_destroy_connector_work() interacts with is guaranteed to still exist in memory until we say so. While said port might not be valid we don't really care: that's the whole reason we're destroying it in the first place! So, teach drm_dp_get_validated_port_ref() to use the all mighty current_work() function to avoid attempting to validate ports from the context of mgr->destroy_connector_work. I can't see any situation where this wouldn't be safe, and this avoids having to play whack-a-mole in the future of trying to work around port validation. Signed-off-by: Lyude Paul Fixes: 263efde31f97 ("drm/dp/mst: Get validated port ref in drm_dp_update_payload_part1()") Reported-by: Jerry Zuo Cc: Jerry Zuo Cc: Harry Wentland Cc: # v4.6+ Reviewed-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20181113224613.28809-1-lyude@redhat.com Signed-off-by: Sean Paul commit 1830b6eeda1fed42d85f2388f79c926331a9b2d0 Author: Mika Westerberg Date: Mon Nov 26 12:47:46 2018 +0300 thunderbolt: Prevent root port runtime suspend during NVM upgrade During NVM upgrade process the host router is hot-removed for a short while. During this time it is possible that the root port is moved into D3cold which would be fine if the root port could trigger PME on itself. However, many systems actually do not implement it so what happens is that the root port goes into D3cold and never wakes up unless userspace does PCI config space access, such as running 'lscpi'. For this reason we explicitly prevent the root port from runtime suspending during NVM upgrade. Signed-off-by: Mika Westerberg Signed-off-by: Greg Kroah-Hartman commit eceb05965489784f24bbf4d61ba60e475a983016 Author: Dexuan Cui Date: Mon Nov 26 02:29:56 2018 +0000 Drivers: hv: vmbus: check the creation_status in vmbus_establish_gpadl() This is a longstanding issue: if the vmbus upper-layer drivers try to consume too many GPADLs, the host may return with an error 0xC0000044 (STATUS_QUOTA_EXCEEDED), but currently we forget to check the creation_status, and hence we can pass an invalid GPADL handle into the OPEN_CHANNEL message, and get an error code 0xc0000225 in open_info->response.open_result.status, and finally we hang in vmbus_open() -> "goto error_free_info" -> vmbus_teardown_gpadl(). With this patch, we can exit gracefully on STATUS_QUOTA_EXCEEDED. Cc: Stephen Hemminger Cc: K. Y. Srinivasan Cc: Haiyang Zhang Cc: stable@vger.kernel.org Signed-off-by: Dexuan Cui Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman commit 7bada55ab50697861eee6bb7d60b41e68a961a9c Author: Todd Kjos Date: Tue Nov 6 15:55:32 2018 -0800 binder: fix race that allows malicious free of live buffer Malicious code can attempt to free buffers using the BC_FREE_BUFFER ioctl to binder. There are protections against a user freeing a buffer while in use by the kernel, however there was a window where BC_FREE_BUFFER could be used to free a recently allocated buffer that was not completely initialized. This resulted in a use-after-free detected by KASAN with a malicious test program. This window is closed by setting the buffer's allow_user_free attribute to 0 when the buffer is allocated or when the user has previously freed it instead of waiting for the caller to set it. The problem was that when the struct buffer was recycled, allow_user_free was stale and set to 1 allowing a free to go through. Signed-off-by: Todd Kjos Acked-by: Arve Hjønnevåg Cc: stable # 4.14 Signed-off-by: Greg Kroah-Hartman commit 7d35baa4e9ec4b717bc0e58a39cdb6a1c50f5465 Author: Mathias Kresin Date: Mon Nov 26 11:25:40 2018 +0100 MIPS: ralink: Fix mt7620 nd_sd pinmux In case the nd_sd group is set to the sd-card function, Pins 45 + 46 are configured as GPIOs. If they are blocked by the sd function, they can't be used as GPIOs. Reported-by: Kristian Evensen Signed-off-by: Mathias Kresin Signed-off-by: Paul Burton Fixes: f576fb6a0700 ("MIPS: ralink: cleanup the soc specific pinmux data") Patchwork: https://patchwork.linux-mips.org/patch/21220/ Cc: John Crispin Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Cc: stable@vger.kernel.org # v3.18+ commit 6f8b52ba442ce1372a58df4e85f169686ef52a0d Merge: 2e6e902d1850 09aaf6813cfc Author: Linus Torvalds Date: Mon Nov 26 09:34:31 2018 -0800 Merge tag 'hwmon-for-v4.20-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging Pull hwmon fixes from Guenter Roeck: - fix temp4_type attribute permissions in w83795 driver - fix tacho fault detection in mlxreg-fan driver - fix current value calculations in ina2xx driver - fix initial notification/warning in raspberrypi driver - fix a NULL pointer access in ina2xx * tag 'hwmon-for-v4.20-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: hwmon: (w83795) temp4_type has writable permission hwmon: (mlxreg-fan) Fix macros for tacho fault reading hwmon: (ina2xx) Fix current value calculation hwmon: (raspberrypi) Fix initial notify hwmon (ina2xx) Fix NULL id pointer in probe() commit fb9e7f0bba151281d7587c1262fae8bdf0497296 Author: Bartosz Golaszewski Date: Wed Nov 21 10:35:20 2018 +0100 ARM: davinci: dm646x: set the GPIO base to 0 Commit 587f7a694f01 ("gpio: davinci: Use dev name for label and automatic base selection") broke the GPIO support on DaVinci boards in legacy mode by allowing gpiolib to set the GPIO base automatically. DaVinci board files use the legacy GPIO API with hard-coded GPIO line numbers. Use the new fields in struct davinci_gpio_platform_data to manually set the GPIO base to 0. 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 133cd2e48305887709675847da1f6ee2b7363929 Author: Bartosz Golaszewski Date: Wed Nov 21 10:35:19 2018 +0100 ARM: davinci: dm365: set the GPIO base to 0 Commit 587f7a694f01 ("gpio: davinci: Use dev name for label and automatic base selection") broke the GPIO support on DaVinci boards in legacy mode by allowing gpiolib to set the GPIO base automatically. DaVinci board files use the legacy GPIO API with hard-coded GPIO line numbers. Use the new fields in struct davinci_gpio_platform_data to manually set the GPIO base to 0. 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 45ed94b9e2d2e310fa7fb884b26080dfd4f0e31d Author: Bartosz Golaszewski Date: Wed Nov 21 10:35:18 2018 +0100 ARM: davinci: da850: set the GPIO base to 0 Commit 587f7a694f01 ("gpio: davinci: Use dev name for label and automatic base selection") broke the network support in legacy boot mode for da850-evm since we can no longer request the MDIO clock GPIO. We now have the option to specify the GPIO base manually for davinci, so add the relevant fields to platform data. 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 786a9ab1330169f2602238822b4df5d5c4c98f6c Author: Bartosz Golaszewski Date: Wed Nov 21 10:35:17 2018 +0100 gpio: davinci: restore a way to manually specify the GPIO base Commit 587f7a694f01 ("gpio: davinci: Use dev name for label and automatic base selection") broke the network support in legacy boot mode for da850-evm since we can no longer request the MDIO clock GPIO. Other boards may be broken too, which I haven't tested. The problem is in the fact that most board files still use the legacy GPIO API where lines are requested by numbers rather than descriptors. While this should be fixed eventually, in order to unbreak the board for now - provide a way to manually specify the GPIO base in platform data. Fixes: 587f7a694f01 ("gpio: davinci: Use dev name for label and automatic base selection") Cc: stable@vger.kernel.org Signed-off-by: Bartosz Golaszewski Acked-by: Linus Walleij Signed-off-by: Sekhar Nori commit adcf60ce14c8250761af9de907eb6c7d096c26d3 Author: Bartosz Golaszewski Date: Wed Nov 21 10:35:16 2018 +0100 ARM: davinci: dm644x: define gpio interrupts as separate resources Since commit eb3744a2dd01 ("gpio: davinci: Do not assume continuous IRQ numbering") the davinci GPIO driver fails to probe if we boot in legacy mode from any of the board files. Since the driver now expects every interrupt to be defined as a separate resource, split the definition of IRQ resources instead of having a single continuous interrupt range. Fixes: eb3744a2dd01 ("gpio: davinci: Do not assume continuous IRQ numbering") Cc: stable@vger.kernel.org Signed-off-by: Bartosz Golaszewski Signed-off-by: Sekhar Nori commit 27db7baab640ea28d7994eda943fef170e347081 Author: Bartosz Golaszewski Date: Wed Nov 21 10:35:15 2018 +0100 ARM: davinci: dm355: define gpio interrupts as separate resources Since commit eb3744a2dd01 ("gpio: davinci: Do not assume continuous IRQ numbering") the davinci GPIO driver fails to probe if we boot in legacy mode from any of the board files. Since the driver now expects every interrupt to be defined as a separate resource, split the definition of IRQ resources instead of having a single continuous interrupt range. Fixes: eb3744a2dd01 ("gpio: davinci: Do not assume continuous IRQ numbering") Cc: stable@vger.kernel.org Signed-off-by: Bartosz Golaszewski Signed-off-by: Sekhar Nori commit 2c9c83491f30afbce25796e185cd4d5e36080e31 Author: Bartosz Golaszewski Date: Wed Nov 21 10:35:14 2018 +0100 ARM: davinci: dm646x: define gpio interrupts as separate resources Since commit eb3744a2dd01 ("gpio: davinci: Do not assume continuous IRQ numbering") the davinci GPIO driver fails to probe if we boot in legacy mode from any of the board files. Since the driver now expects every interrupt to be defined as a separate resource, split the definition of IRQ resources instead of having a single continuous interrupt range. Fixes: eb3744a2dd01 ("gpio: davinci: Do not assume continuous IRQ numbering") Cc: stable@vger.kernel.org Signed-off-by: Bartosz Golaszewski Signed-off-by: Sekhar Nori commit 193c04374e281a56c7d4f96e66d329671945bebe Author: Bartosz Golaszewski Date: Wed Nov 21 10:35:13 2018 +0100 ARM: davinci: dm365: define gpio interrupts as separate resources Since commit eb3744a2dd01 ("gpio: davinci: Do not assume continuous IRQ numbering") the davinci GPIO driver fails to probe if we boot in legacy mode from any of the board files. Since the driver now expects every interrupt to be defined as a separate resource, split the definition of IRQ resources instead of having a single continuous interrupt range. Fixes: eb3744a2dd01 ("gpio: davinci: Do not assume continuous IRQ numbering") Cc: stable@vger.kernel.org Signed-off-by: Bartosz Golaszewski Signed-off-by: Sekhar Nori commit 58a0afbf4c99ac355df16773af835b919b9432ee Author: Bartosz Golaszewski Date: Wed Nov 21 10:35:12 2018 +0100 ARM: davinci: da8xx: define gpio interrupts as separate resources Since commit eb3744a2dd01 ("gpio: davinci: Do not assume continuous IRQ numbering") the davinci GPIO driver fails to probe if we boot in legacy mode from any of the board files. Since the driver now expects every interrupt to be defined as a separate resource, split the definition of IRQ resources instead of having a single continuous interrupt range. Fixes: eb3744a2dd01 ("gpio: davinci: Do not assume continuous IRQ numbering") Cc: stable@vger.kernel.org Signed-off-by: Bartosz Golaszewski Signed-off-by: Sekhar Nori commit 069caf5950dfa75d0526cd89c439ff9d9d3136d8 Author: Aaro Koskinen Date: Sun Nov 25 00:17:08 2018 +0200 USB: omap_udc: fix rejection of out transfers when DMA is used Commit 387f869d2579 ("usb: gadget: u_ether: conditionally align transfer size") started aligning transfer size only if requested, breaking omap_udc DMA mode. Set quirk_ep_out_aligned_size to restore the old behaviour. Fixes: 387f869d2579 ("usb: gadget: u_ether: conditionally align transfer size") Signed-off-by: Aaro Koskinen Signed-off-by: Felipe Balbi commit 2c2322fbcab8102b8cadc09d66714700a2da42c2 Author: Aaro Koskinen Date: Sun Nov 25 00:17:07 2018 +0200 USB: omap_udc: fix USB gadget functionality on Palm Tungsten E On Palm TE nothing happens when you try to use gadget drivers and plug the USB cable. Fix by adding the board to the vbus sense quirk list. Signed-off-by: Aaro Koskinen Signed-off-by: Felipe Balbi commit 6ca6695f576b8453fe68865e84d25946d63b10ad Author: Aaro Koskinen Date: Sun Nov 25 00:17:06 2018 +0200 USB: omap_udc: fix omap_udc_start() on 15xx machines On OMAP 15xx machines there are no transceivers, and omap_udc_start() always fails as it forgot to adjust the default return value. Signed-off-by: Aaro Koskinen Signed-off-by: Felipe Balbi commit 99f700366fcea1aa2fa3c49c99f371670c3c62f8 Author: Aaro Koskinen Date: Sun Nov 25 00:17:05 2018 +0200 USB: omap_udc: fix crashes on probe error and module removal We currently crash if usb_add_gadget_udc_release() fails, since the udc->done is not initialized until in the remove function. Furthermore, on module removal the udc data is accessed although the release function is already triggered by usb_del_gadget_udc() early in the function. Fix by rewriting the release and remove functions, basically moving all the cleanup into the release function, and doing the completion only in the module removal case. The patch fixes omap_udc module probe with a failing gadged, and also allows the removal of omap_udc. Tested by running "modprobe omap_udc; modprobe -r omap_udc" in a loop. Signed-off-by: Aaro Koskinen Signed-off-by: Felipe Balbi commit 286afdde1640d8ea8916a0f05e811441fbbf4b9d Author: Aaro Koskinen Date: Sun Nov 25 00:17:04 2018 +0200 USB: omap_udc: use devm_request_irq() The current code fails to release the third irq on the error path (observed by reading the code), and we get also multiple WARNs with failing gadget drivers due to duplicate IRQ releases. Fix by using devm_request_irq(). Signed-off-by: Aaro Koskinen Signed-off-by: Felipe Balbi commit ce68cc6fad893eb33b69ef7ec186233a51696236 Author: Ryder Lee Date: Mon Nov 12 09:28:08 2018 +0800 arm64: dts: mt7622: Drop the general purpose timer node MediaTeks general purpose timer register into system in early phase during kernel boot, but the clock sources aren't probed at this point. The system has the ARM architecture timer, so we don't need the GPT timer from mediatek. Drop the DT node for it. Fixes: 9cc7f0de9e67 ("arm64: dts: mt7622: add timer, CCI-400 and PMU nodes") Signed-off-by: Ryder Lee [mb: fix commit message] Signed-off-by: Matthias Brugger commit 89259088c1b7fecb43e8e245dc931909132a4e03 Author: Florian Westphal Date: Sat Nov 17 11:32:29 2018 +0100 netfilter: nfnetlink_cttimeout: fetch timeouts for udplite and gre, too syzbot was able to trigger the WARN in cttimeout_default_get() by passing UDPLITE as l4protocol. Alias UDPLITE to UDP, both use same timeout values. Furthermore, also fetch GRE timeouts. GRE is a bit more complicated, as it still can be a module and its netns_proto_gre struct layout isn't visible outside of the gre module. Can't move timeouts around, it appears conntrack sysctl unregister assumes net_generic() returns nf_proto_net, so we get crash. Expose layout of netns_proto_gre instead. A followup nf-next patch could make gre tracker be built-in as well if needed, its not that large. Last, make the WARN() mention the missing protocol value in case anything else is missing. Reported-by: syzbot+2fae8fa157dd92618cae@syzkaller.appspotmail.com Fixes: 8866df9264a3 ("netfilter: nfnetlink_cttimeout: pass default timeout policy to obj_to_nlattr") Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 2a31e4bd9ad255ee40809b5c798c4b1c2b09703b Author: Xin Long Date: Thu Nov 15 15:14:30 2018 +0800 ipvs: call ip_vs_dst_notifier earlier than ipv6_dev_notf ip_vs_dst_event is supposed to clean up all dst used in ipvs' destinations when a net dev is going down. But it works only when the dst's dev is the same as the dev from the event. Now with the same priority but late registration, ip_vs_dst_notifier is always called later than ipv6_dev_notf where the dst's dev is set to lo for NETDEV_DOWN event. As the dst's dev lo is not the same as the dev from the event in ip_vs_dst_event, ip_vs_dst_notifier doesn't actually work. Also as these dst have to wait for dest_trash_timer to clean them up. It would cause some non-permanent kernel warnings: unregister_netdevice: waiting for br0 to become free. Usage count = 3 To fix it, call ip_vs_dst_notifier earlier than ipv6_dev_notf by increasing its priority to ADDRCONF_NOTIFY_PRIORITY + 5. Note that for ipv4 route fib_netdev_notifier doesn't set dst's dev to lo in NETDEV_DOWN event, so this fix is only needed when IP_VS_IPV6 is defined. Fixes: 7a4f0761fce3 ("IPVS: init and cleanup restructuring") Reported-by: Li Shuang Signed-off-by: Xin Long Acked-by: Julian Anastasov Acked-by: Simon Horman Signed-off-by: Pablo Neira Ayuso commit 2455facbb700e3c3ca26b9255956d6ed45cb6217 Merge: 2e6e902d1850 7513edbc096a Author: Joonas Lahtinen Date: Mon Nov 26 11:19:47 2018 +0200 Merge tag 'gvt-fixes-2018-11-26' of https://github.com/intel/gvt-linux into drm-intel-fixes gvt-fixes-2018-11-26 - Fix engine check for correct MOCS regs load (Xinyun) - Fix rpm locking for vGPU ggtt init (Henry) - Fix use-after-free when destroy partial ggtt entries (Chris) Signed-off-by: Joonas Lahtinen From: Zhenyu Wang Link: https://patchwork.freedesktop.org/patch/msgid/20181126021820.GL12743@zhen-hp.sh.intel.com commit 36c3aeb4b48d5b058526d606fde14db4fd7e5e6d Merge: 2e6e902d1850 3e27c79c4b12 Author: Rafael J. Wysocki Date: Mon Nov 26 10:13:28 2018 +0100 Merge branch 'opp/fixes-for-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm Pull operating performance points (OPP) framework fixes for 4.20-rc5 from Viresh Kumar. * 'opp/fixes-for-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm: OPP: Fix parsing of multiple phandles in "operating-points-v2" property opp: ti-opp-supply: Fix platform_no_drv_owner.cocci warnings commit 0bc3544a010c1e460c99fa052991789f113d860e Author: Laurent Pinchart Date: Fri Nov 23 13:38:17 2018 +0200 drm: rcar-du: Fix DU3 start/stop on M3-N Group start/stop is controlled by the DRES and DEN bits of DSYSR0 for the first group and DSYSR2 for the second group. On most DU instances, this maps to the first CRTC of the group. On M3-N, however, DU2 doesn't exist, but DSYSR2 does. There is no CRTC object there that maps to the correct DSYSR register. Commit 9144adc5e5a9 ("drm: rcar-du: Cache DSYSR value to ensure known initial value") switched group start/stop from using group read/write access to DSYSR to a CRTC-based API to cache the DSYSR value. While doing so, it introduced a regression on M3-N by accessing DSYSR3 instead of DSYSR2 to start/stop the second group. To fix this, access the DSYSR register directly through group read/write if the SoC is missing the first DU channel of the group. Keep using the rcar_du_crtc_dsysr_clr_set() function otherwise, to retain the DSYSR caching feature. Fixes: 9144adc5e5a9 ("drm: rcar-du: Cache DSYSR value to ensure known initial value") Reported-by: Hoan Nguyen An Signed-off-by: Laurent Pinchart Acked-by: Kieran Bingham Tested-by: Simon Horman commit c4cfcf6f4297c9256b53790bacbbbd6901fef468 Author: Hui Wang Date: Mon Nov 26 14:17:16 2018 +0800 ALSA: hda/realtek - fix the pop noise on headphone for lenovo laptops We have several Lenovo laptops with the codec alc285, when playing sound via headphone, we can hear click/pop noise in the headphone, if we let the headphone share the DAC of NID 0x2 with the speaker, the noise disappears. The Lenovo laptops here include P52, P72, X1 yoda2 and X1 carbon. I have tried to set preferred_dacs and override_conn, but neither of them worked. Thanks for Kailang, he told me to invalidate the NID 0x3 through override_wcaps. BugLink: https://bugs.launchpad.net/bugs/1805079 Cc: Signed-off-by: Kailang Yang Signed-off-by: Hui Wang Signed-off-by: Takashi Iwai commit effd14f66cc1ef6701a19c5a56e39c35f4d395a5 Author: Michael Niewöhner Date: Sun Nov 25 17:57:33 2018 +0100 usb: core: quirks: add RESET_RESUME quirk for Cherry G230 Stream series Cherry G230 Stream 2.0 (G85-231) and 3.0 (G85-232) need this quirk to function correctly. This fixes a but where double pressing numlock locks up the device completely with need to replug the keyboard. Signed-off-by: Michael Niewöhner Tested-by: Michael Niewöhner Cc: stable Signed-off-by: Greg Kroah-Hartman commit a84a1bcc992f0545a51d2e120b8ca2ef20e2ea97 Author: Kai-Heng Feng Date: Fri Nov 23 08:42:19 2018 +0000 USB: usb-storage: Add new IDs to ums-realtek There are two new Realtek card readers require ums-realtek to work correctly. Add the new IDs to support them. Signed-off-by: Kai-Heng Feng Acked-by: Alan Stern Cc: stable Signed-off-by: Greg Kroah-Hartman commit 1dbcd8d42c02afe38740d26f333f76e23e830d54 Merge: 2e6e902d1850 c88520db18ba Author: Greg Kroah-Hartman Date: Mon Nov 26 08:08:01 2018 +0100 Merge tag 'phy-for-4.20-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy into usb-linus Kishon writes: phy: for 4.20-rc *) Fix updating HSTX_TRIM tuning parameter in qcom-qusb2 PHY driver *) Fix inconsistencies between dt-bindings and the driver *) Add "Depend on HAS_IOMEM" uniphier-pcie to avoid randconfig errors Signed-off-by: Kishon Vijay Abraham I * tag 'phy-for-4.20-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy: phy: qcom-qusb2: Fix HSTX_TRIM tuning with fused value for SDM845 phy: qcom-qusb2: Use HSTX_TRIM fused value as is dt-bindings: phy-qcom-qmp: Fix several mistakes from prior commits phy: uniphier-pcie: Depend on HAS_IOMEM commit 38317f5c0f2faae5110854f36edad810f841d62f Author: Felipe Balbi Date: Mon Nov 19 08:34:04 2018 +0200 Revert "usb: dwc3: gadget: skip Set/Clear Halt when invalid" This reverts commit ffb80fc672c3a7b6afd0cefcb1524fb99917b2f3. Turns out that commit is wrong. Host controllers are allowed to use Clear Feature HALT as means to sync data toggle between host and periperal. Cc: Signed-off-by: Felipe Balbi commit 032371a1e673275202c047537726f4216d7dbf0b Merge: 2e6e902d1850 d20810530b71 Author: Greg Kroah-Hartman Date: Mon Nov 26 08:02:51 2018 +0100 Merge tag 'fsi-updates-2018-11-26' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/linux-fsi char-misc-linus Ben writes: "Here are two very minor fixes for FSI. One from Arnd is a Kconfig fixup and has been rusting away in my tree for a while (I had forgotten about it). The other one just removes a duplicate #include, courtesy of Brajeswar Ghosh." * tag 'fsi-updates-2018-11-26' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/linux-fsi: fsi: fsi-scom.c: Remove duplicate header fsi: master-ast-cf: select GENERIC_ALLOCATOR commit 69500127424cd90ff2cf8191256b2ac3b0a4af56 Merge: aba36930a35e 1efb6ee3edea Author: David S. Miller Date: Sun Nov 25 20:04:58 2018 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Daniel Borkmann says: ==================== pull-request: bpf 2018-11-25 The following pull-request contains BPF updates for your *net* tree. The main changes are: 1) Fix an off-by-one bug when adjusting subprog start offsets after patching, from Edward. 2) Fix several bugs such as overflow in size allocation in queue / stack map creation, from Alexei. 3) Fix wrong IPv6 destination port byte order in bpf_sk_lookup_udp helper, from Andrey. 4) Fix several bugs in bpftool such as preventing an infinite loop in get_fdinfo, error handling and man page references, from Quentin. 5) Fix a warning in bpf_trace_printk() that wasn't catching an invalid format string, from Martynas. 6) Fix a bug in BPF cgroup local storage where non-atomic allocation was used in atomic context, from Roman. 7) Fix a NULL pointer dereference bug in bpftool from reallocarray() error handling, from Jakub and Wen. 8) Add a copy of pkt_cls.h and tc_bpf.h uapi headers to the tools include infrastructure so that bpftool compiles on older RHEL7-like user space which does not ship these headers, from Yonghong. 9) Fix BPF kselftests for user space where to get ping test working with ping6 and ping -6, from Li. ==================== Signed-off-by: David S. Miller commit d20810530b7109a95abef5130e6dcec09c5180d7 Author: Brajeswar Ghosh Date: Fri Nov 16 16:17:03 2018 +0530 fsi: fsi-scom.c: Remove duplicate header Remove linux/cdev.h which is included more than once Signed-off-by: Brajeswar Ghosh Signed-off-by: Benjamin Herrenschmidt commit 64999fa7aa2c076ec6d05aee481f11f5296ceb8c Author: Arnd Bergmann Date: Tue Aug 14 00:37:18 2018 +0200 fsi: master-ast-cf: select GENERIC_ALLOCATOR In randconfig builds without CONFIG_GENERIC_ALLOCATOR, this driver fails to link: ERROR: "gen_pool_alloc_algo" [drivers/fsi/fsi-master-ast-cf.ko] undefined! ERROR: "gen_pool_fixed_alloc" [drivers/fsi/fsi-master-ast-cf.ko] undefined! ERROR: "of_gen_pool_get" [drivers/fsi/fsi-master-ast-cf.ko] undefined! ERROR: "gen_pool_free" [drivers/fsi/fsi-master-ast-cf.ko] undefined! Select the dependency as all other users do. Fixes: 6a794a27daca ("fsi: master-ast-cf: Add new FSI master using Aspeed ColdFire") Signed-off-by: Arnd Bergmann Signed-off-by: Benjamin Herrenschmidt commit 2e6e902d185027f8e3cb8b7305238f7e35d6a436 Author: Linus Torvalds Date: Sun Nov 25 14:19:31 2018 -0800 Linux 4.20-rc4 commit 78e1f386170798159a81fdbc5e131836fd808048 Author: Al Viro Date: Sun Nov 25 16:24:16 2018 -0500 iov_iter: teach csum_and_copy_to_iter() to handle pipe-backed ones Signed-off-by: Al Viro commit caf54f59e57e1652e2460d3a45dce233d44d5884 Merge: 9ff01193a20d 6c08ec1216b7 Author: Paolo Bonzini Date: Sun Nov 25 18:56:32 2018 +0100 Merge tag 'kvm-ppc-fixes-4.20-1' of https://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc into HEAD PPC KVM fixes for 4.20 This has a single 1-line patch which fixes a bug in the recently-merged nested HV KVM support. commit d6d460b89378b1bc6715574cdafd748ba59d5a27 Merge: 17c2f540863a cb216b84d6ea Author: Linus Torvalds Date: Sun Nov 25 09:24:40 2018 -0800 Merge tag 'dma-mapping-4.20-3' of git://git.infradead.org/users/hch/dma-mapping Pull dma-mapping fixes from Christoph Hellwig: "Two dma-direct / swiotlb regressions fixes: - zero is a valid physical address on some arm boards, we can't use it as the error value - don't try to cache flush the error return value (no matter what it is)" * tag 'dma-mapping-4.20-3' of git://git.infradead.org/users/hch/dma-mapping: swiotlb: Skip cache maintenance on map error dma-direct: Make DIRECT_MAPPING_ERROR viable for SWIOTLB commit 17c2f540863a6c0faa3f0ede3c785d9427bcaf80 Merge: 4e962ff6e34f bb21ce0ad227 Author: Linus Torvalds Date: Sun Nov 25 09:19:58 2018 -0800 Merge tag 'nfs-for-4.20-4' of git://git.linux-nfs.org/projects/trondmy/linux-nfs Pull NFS client bugfixes from Trond Myklebust: - Fix a NFSv4 state manager deadlock when returning a delegation - NFSv4.2 copy do not allocate memory under the lock - flexfiles: Use the correct stateid for IO in the tightly coupled case * tag 'nfs-for-4.20-4' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: flexfiles: use per-mirror specified stateid for IO NFSv4.2 copy do not allocate memory under the lock NFSv4: Fix a NFSv4 state manager deadlock commit 4e962ff6e34f44c400c548da0c1e2393053a691e Author: Luc Van Oostenryck Date: Sun Nov 25 17:34:05 2018 +0100 MAINTAINERS: change Sparse's maintainer I'm taking over the maintainance of Sparse so add myself as maintainer and move Christopher's info to CREDITS. Signed-off-by: Luc Van Oostenryck Signed-off-by: Linus Torvalds commit e2125dac22f2c9c66c412cd8e049a7305af59f73 Merge: e195ca6cb6f2 fffc9a260e38 Author: Linus Torvalds Date: Sat Nov 24 18:44:01 2018 -0800 Merge tag 'xarray-4.20-rc4' of git://git.infradead.org/users/willy/linux-dax Pull XArray updates from Matthew Wilcox: "We found some bugs in the DAX conversion to XArray (and one bug which predated the XArray conversion). There were a couple of bugs in some of the higher-level functions, which aren't actually being called in today's kernel, but surfaced as a result of converting existing radix tree & IDR users over to the XArray. Some of the other changes to how the higher-level APIs work were also motivated by converting various users; again, they're not in use in today's kernel, so changing them has a low probability of introducing a bug. Dan can still trigger a bug in the DAX code with hot-offline/online, and we're working on tracking that down" * tag 'xarray-4.20-rc4' of git://git.infradead.org/users/willy/linux-dax: XArray tests: Add missing locking dax: Avoid losing wakeup in dax_lock_mapping_entry dax: Fix huge page faults dax: Fix dax_unlock_mapping_entry for PMD pages dax: Reinstate RCU protection of inode dax: Make sure the unlocking entry isn't locked dax: Remove optimisation from dax_lock_mapping_entry XArray tests: Correct some 64-bit assumptions XArray: Correct xa_store_range XArray: Fix Documentation XArray: Handle NULL pointers differently for allocation XArray: Unify xa_store and __xa_store XArray: Add xa_store_bh() and xa_store_irq() XArray: Turn xa_erase into an exported function XArray: Unify xa_cmpxchg and __xa_cmpxchg XArray: Regularise xa_reserve nilfs2: Use xa_erase_irq XArray: Export __xa_foo to non-GPL modules XArray: Fix xa_for_each with a single element at 0 commit aba36930a35e7f1fe1319b203f25c05d6c119936 Author: Willem de Bruijn Date: Sat Nov 24 14:21:16 2018 -0500 net: always initialize pagedlen In ip packet generation, pagedlen is initialized for each skb at the start of the loop in __ip(6)_append_data, before label alloc_new_skb. Depending on compiler options, code can be generated that jumps to this label, triggering use of an an uninitialized variable. In practice, at -O2, the generated code moves the initialization below the label. But the code should not rely on that for correctness. Fixes: 15e36f5b8e98 ("udp: paged allocation with gso") Signed-off-by: Willem de Bruijn Signed-off-by: David S. Miller commit 9efdda4e3abed13f0903b7b6e4d4c2102019440a Author: Eric Dumazet Date: Sat Nov 24 09:12:24 2018 -0800 tcp: address problems caused by EDT misshaps When a qdisc setup including pacing FQ is dismantled and recreated, some TCP packets are sent earlier than instructed by TCP stack. TCP can be fooled when ACK comes back, because the following operation can return a negative value. tcp_time_stamp(tp) - tp->rx_opt.rcv_tsecr; Some paths in TCP stack were not dealing properly with this, this patch addresses four of them. Fixes: ab408b6dc744 ("tcp: switch tcp and sch_fq to new earliest departure time model") Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit e195ca6cb6f21633e56322d5aa11ed59cdb22fb2 Merge: d146194f31c9 ffe0e7cf290f Author: Linus Torvalds Date: Sat Nov 24 12:58:47 2018 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid Pull HID fixes from Jiri Kosina: - revert of the high-resolution scrolling feature, as it breaks certain hardware due to incompatibilities between Logitech and Microsoft worlds. Peter Hutterer is working on a fixed implementation. Until that is finished, revert by Benjamin Tissoires. - revert of incorrect strncpy->strlcpy conversion in uhid, from David Herrmann - fix for buggy sendfile() implementation on uhid device node, from Eric Biggers - a few assorted device-ID specific quirks * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid: Revert "Input: Add the `REL_WHEEL_HI_RES` event code" Revert "HID: input: Create a utility class for counting scroll events" Revert "HID: logitech: Add function to enable HID++ 1.0 "scrolling acceleration"" Revert "HID: logitech: Enable high-resolution scrolling on Logitech mice" Revert "HID: logitech: Use LDJ_DEVICE macro for existing Logitech mice" Revert "HID: logitech: fix a used uninitialized GCC warning" Revert "HID: input: simplify/fix high-res scroll event handling" HID: Add quirk for Primax PIXART OEM mice HID: i2c-hid: Disable runtime PM for LG touchscreen HID: multitouch: Add pointstick support for Cirque Touchpad HID: steam: remove input device when a hid client is running. Revert "HID: uhid: use strlcpy() instead of strncpy()" HID: uhid: forbid UHID_CREATE under KERNEL_DS or elevated privileges HID: input: Ignore battery reported by Symbol DS4308 HID: Add quirk for Microsoft PIXART OEM mouse commit e1a7bfe3807974e66f971f2589d4e0197ec0fced Author: Takashi Iwai Date: Thu Nov 22 14:36:17 2018 +0100 ALSA: control: Fix race between adding and removing a user element The procedure for adding a user control element has some window opened for race against the concurrent removal of a user element. This was caught by syzkaller, hitting a KASAN use-after-free error. This patch addresses the bug by wrapping the whole procedure to add a user control element with the card->controls_rwsem, instead of only around the increment of card->user_ctl_count. This required a slight code refactoring, too. The function snd_ctl_add() is split to two parts: a core function to add the control element and a part calling it. The former is called from the function for adding a user control element inside the controls_rwsem. One change to be noted is that snd_ctl_notify() for adding a control element gets called inside the controls_rwsem as well while it was called outside the rwsem. But this should be OK, as snd_ctl_notify() takes another (finer) rwlock instead of rwsem, and the call of snd_ctl_notify() inside rwsem is already done in another code path. Reported-by: syzbot+dc09047bce3820621ba2@syzkaller.appspotmail.com Cc: Signed-off-by: Takashi Iwai commit 9a20332ab373b1f8f947e0a9c923652b32dab031 Author: Takashi Iwai Date: Fri Nov 23 18:18:30 2018 +0100 ALSA: sparc: Fix invalid snd_free_pages() at error path Some spurious calls of snd_free_pages() have been overlooked and remain in the error paths of sparc cs4231 driver code. Since runtime->dma_area is managed by the PCM core helper, we shouldn't release manually. Drop the superfluous calls. Reviewed-by: Takashi Sakamoto Cc: Signed-off-by: Takashi Iwai commit 7b69154171b407844c273ab4c10b5f0ddcd6aa29 Author: Takashi Iwai Date: Fri Nov 23 18:16:33 2018 +0100 ALSA: wss: Fix invalid snd_free_pages() at error path Some spurious calls of snd_free_pages() have been overlooked and remain in the error paths of wss driver code. Since runtime->dma_area is managed by the PCM core helper, we shouldn't release manually. Drop the superfluous calls. Reviewed-by: Takashi Sakamoto Cc: Signed-off-by: Takashi Iwai commit d146194f31c96f9b260c5a1cf1592d2e7f82a2e2 Merge: 857fa628bbe9 4f9f49646a57 Author: Linus Torvalds Date: Sat Nov 24 09:42:32 2018 -0800 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fixes from Catalin Marinas:: - Fix wrong conflict resolution around CONFIG_ARM64_SSBD - Fix sparse warning on unsigned long constant * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: cpufeature: Fix mismerge of CONFIG_ARM64_SSBD block arm64: sysreg: fix sparse warnings commit 857fa628bbe93017c72ddd0d5304962a2608db07 Merge: abe72ff41340 07093b764769 Author: Linus Torvalds Date: Sat Nov 24 09:19:38 2018 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: 1) Need to take mutex in ath9k_add_interface(), from Dan Carpenter. 2) Fix mt76 build without CONFIG_LEDS_CLASS, from Arnd Bergmann. 3) Fix socket wmem accounting in SCTP, from Xin Long. 4) Fix failed resume crash in ena driver, from Arthur Kiyanovski. 5) qed driver passes bytes instead of bits into second arg of bitmap_weight(). From Denis Bolotin. 6) Fix reset deadlock in ibmvnic, from Juliet Kim. 7) skb_scrube_packet() needs to scrub the fwd marks too, from Petr Machata. 8) Make sure older TCP stacks see enough dup ACKs, and avoid doing SACK compression during this period, from Eric Dumazet. 9) Add atomicity to SMC protocol cursor handling, from Ursula Braun. 10) Don't leave dangling error pointer if bpf_prog_add() fails in thunderx driver, from Lorenzo Bianconi. Also, when we unmap TSO headers, set sq->tso_hdrs to NULL. 11) Fix race condition over state variables in act_police, from Davide Caratti. 12) Disable guest csum in the presence of XDP in virtio_net, from Jason Wang. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (64 commits) net: gemini: Fix copy/paste error net: phy: mscc: fix deadlock in vsc85xx_default_config dt-bindings: dsa: Fix typo in "probed" net: thunderx: set tso_hdrs pointer to NULL in nicvf_free_snd_queue net: amd: add missing of_node_put() team: no need to do team_notify_peers or team_mcast_rejoin when disabling port virtio-net: fail XDP set if guest csum is negotiated virtio-net: disable guest csum during XDP set net/sched: act_police: add missing spinlock initialization net: don't keep lonely packets forever in the gro hash net/ipv6: re-do dad when interface has IFF_NOARP flag change packet: copy user buffers before orphan or clone ibmvnic: Update driver queues after change in ring size support ibmvnic: Fix RX queue buffer cleanup net: thunderx: set xdp_prog to NULL if bpf_prog_add fails net/dim: Update DIM start sample after each DIM iteration net: faraday: ftmac100: remove netif_running(netdev) check before disabling interrupts net/smc: use after free fix in smc_wr_tx_put_slot() net/smc: atomic SMCD cursor handling net/smc: add SMC-D shutdown signal ... commit abe72ff4134028ff2189d29629c40a40bee0a989 Merge: 7c98a4261827 8c110d43c6bc Author: Linus Torvalds Date: Sat Nov 24 09:11:52 2018 -0800 Merge tag 'xfs-4.20-fixes-2' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull xfs fixes from Darrick Wong: "Dave and I have continued our work fixing corruption problems that can be found when running long-term burn-in exercisers on xfs. Here are some patches fixing most of the problems, but there will likely be more. :/ - Numerous corruption fixes for copy on write - Numerous corruption fixes for blocksize < pagesize writes - Don't miscalculate AG reservations for small final AGs - Fix page cache truncation to work properly for reflink and extent shifting - Fix use-after-free when retrying failed inode/dquot buffer logging - Fix corruptions seen when using copy_file_range in directio mode" * tag 'xfs-4.20-fixes-2' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: iomap: readpages doesn't zero page tail beyond EOF vfs: vfs_dedupe_file_range() doesn't return EOPNOTSUPP iomap: dio data corruption and spurious errors when pipes fill iomap: sub-block dio needs to zeroout beyond EOF iomap: FUA is wrong for DIO O_DSYNC writes into unwritten extents xfs: delalloc -> unwritten COW fork allocation can go wrong xfs: flush removing page cache in xfs_reflink_remap_prep xfs: extent shifting doesn't fully invalidate page cache xfs: finobt AG reserves don't consider last AG can be a runt xfs: fix transient reference count error in xfs_buf_resubmit_failed_buffers xfs: uncached buffer tracing needs to print bno xfs: make xfs_file_remap_range() static xfs: fix shared extent data corruption due to missing cow reservation commit 07093b76476903f820d83d56c3040e656fb4d9e3 Author: Andreas Fiedler Date: Sat Nov 24 00:16:34 2018 +0100 net: gemini: Fix copy/paste error The TX stats should be started with the tx_stats_syncp, there seems to be a copy/paste error in the driver. Signed-off-by: Andreas Fiedler Signed-off-by: Linus Walleij Signed-off-by: David S. Miller commit 3fa528b7682e73e906266bcd43728b8f923bf9b2 Author: Quentin Schulz Date: Fri Nov 23 19:01:51 2018 +0100 net: phy: mscc: fix deadlock in vsc85xx_default_config The vsc85xx_default_config function called in the vsc85xx_config_init function which is used by VSC8530, VSC8531, VSC8540 and VSC8541 PHYs mistakenly calls phy_read and phy_write in-between phy_select_page and phy_restore_page. phy_select_page and phy_restore_page actually take and release the MDIO bus lock and phy_write and phy_read take and release the lock to write or read to a PHY register. Let's fix this deadlock by using phy_modify_paged which handles correctly a read followed by a write in a non-standard page. Fixes: 6a0bfbbe20b0 ("net: phy: mscc: migrate to phy_select/restore_page functions") Signed-off-by: Quentin Schulz Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit e7b9fb4f545b1f7885e7c642643828f93d3d79c9 Author: Fabio Estevam Date: Fri Nov 23 15:46:50 2018 -0200 dt-bindings: dsa: Fix typo in "probed" The correct form is "can be probed", so fix the typo. Signed-off-by: Fabio Estevam Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit ef2a7cf1d8831535b8991459567b385661eb4a36 Author: Lorenzo Bianconi Date: Fri Nov 23 18:28:01 2018 +0100 net: thunderx: set tso_hdrs pointer to NULL in nicvf_free_snd_queue Reset snd_queue tso_hdrs pointer to NULL in nicvf_free_snd_queue routine since it is used to check if tso dma descriptor queue has been previously allocated. The issue can be triggered with the following reproducer: $ip link set dev enP2p1s0v0 xdpdrv obj xdp_dummy.o $ip link set dev enP2p1s0v0 xdpdrv off [ 341.467649] WARNING: CPU: 74 PID: 2158 at mm/vmalloc.c:1511 __vunmap+0x98/0xe0 [ 341.515010] Hardware name: GIGABYTE H270-T70/MT70-HD0, BIOS T49 02/02/2018 [ 341.521874] pstate: 60400005 (nZCv daif +PAN -UAO) [ 341.526654] pc : __vunmap+0x98/0xe0 [ 341.530132] lr : __vunmap+0x98/0xe0 [ 341.533609] sp : ffff00001c5db860 [ 341.536913] x29: ffff00001c5db860 x28: 0000000000020000 [ 341.542214] x27: ffff810feb5090b0 x26: ffff000017e57000 [ 341.547515] x25: 0000000000000000 x24: 00000000fbd00000 [ 341.552816] x23: 0000000000000000 x22: ffff810feb5090b0 [ 341.558117] x21: 0000000000000000 x20: 0000000000000000 [ 341.563418] x19: ffff000017e57000 x18: 0000000000000000 [ 341.568719] x17: 0000000000000000 x16: 0000000000000000 [ 341.574020] x15: 0000000000000010 x14: ffffffffffffffff [ 341.579321] x13: ffff00008985eb27 x12: ffff00000985eb2f [ 341.584622] x11: ffff0000096b3000 x10: ffff00001c5db510 [ 341.589923] x9 : 00000000ffffffd0 x8 : ffff0000086868e8 [ 341.595224] x7 : 3430303030303030 x6 : 00000000000006ef [ 341.600525] x5 : 00000000003fffff x4 : 0000000000000000 [ 341.605825] x3 : 0000000000000000 x2 : ffffffffffffffff [ 341.611126] x1 : ffff0000096b3728 x0 : 0000000000000038 [ 341.616428] Call trace: [ 341.618866] __vunmap+0x98/0xe0 [ 341.621997] vunmap+0x3c/0x50 [ 341.624961] arch_dma_free+0x68/0xa0 [ 341.628534] dma_direct_free+0x50/0x80 [ 341.632285] nicvf_free_resources+0x160/0x2d8 [nicvf] [ 341.637327] nicvf_config_data_transfer+0x174/0x5e8 [nicvf] [ 341.642890] nicvf_stop+0x298/0x340 [nicvf] [ 341.647066] __dev_close_many+0x9c/0x108 [ 341.650977] dev_close_many+0xa4/0x158 [ 341.654720] rollback_registered_many+0x140/0x530 [ 341.659414] rollback_registered+0x54/0x80 [ 341.663499] unregister_netdevice_queue+0x9c/0xe8 [ 341.668192] unregister_netdev+0x28/0x38 [ 341.672106] nicvf_remove+0xa4/0xa8 [nicvf] [ 341.676280] nicvf_shutdown+0x20/0x30 [nicvf] [ 341.680630] pci_device_shutdown+0x44/0x88 [ 341.684720] device_shutdown+0x144/0x250 [ 341.688640] kernel_restart_prepare+0x44/0x50 [ 341.692986] kernel_restart+0x20/0x68 [ 341.696638] __se_sys_reboot+0x210/0x238 [ 341.700550] __arm64_sys_reboot+0x24/0x30 [ 341.704555] el0_svc_handler+0x94/0x110 [ 341.708382] el0_svc+0x8/0xc [ 341.711252] ---[ end trace 3f4019c8439959c9 ]--- [ 341.715874] page:ffff7e0003ef4000 count:0 mapcount:0 mapping:0000000000000000 index:0x4 [ 341.723872] flags: 0x1fffe000000000() [ 341.727527] raw: 001fffe000000000 ffff7e0003f1a008 ffff7e0003ef4048 0000000000000000 [ 341.735263] raw: 0000000000000004 0000000000000000 00000000ffffffff 0000000000000000 [ 341.742994] page dumped because: VM_BUG_ON_PAGE(page_ref_count(page) == 0) where xdp_dummy.c is a simple bpf program that forwards the incoming frames to the network stack (available here: https://github.com/altoor/xdp_walkthrough_examples/blob/master/sample_1/xdp_dummy.c) Fixes: 05c773f52b96 ("net: thunderx: Add basic XDP support") Fixes: 4863dea3fab0 ("net: Adding support for Cavium ThunderX network controller") Signed-off-by: Lorenzo Bianconi Signed-off-by: David S. Miller commit c44c749d3b6fdfca39002e7e48e03fe9f9fe37a3 Author: Yangtao Li Date: Thu Nov 22 07:34:41 2018 -0500 net: amd: 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 doesn't do that, so fix it. Signed-off-by: Yangtao Li Signed-off-by: David S. Miller commit 5ed9dc99107144f83b6c1bb52a69b58875baf540 Author: Hangbin Liu Date: Thu Nov 22 16:15:28 2018 +0800 team: no need to do team_notify_peers or team_mcast_rejoin when disabling port team_notify_peers() will send ARP and NA to notify peers. team_mcast_rejoin() will send multicast join group message to notify peers. We should do this when enabling/changed to a new port. But it doesn't make sense to do it when a port is disabled. On the other hand, when we set mcast_rejoin_count to 2, and do a failover, team_port_disable() will increase mcast_rejoin.count_pending to 2 and then team_port_enable() will increase mcast_rejoin.count_pending to 4. We will send 4 mcast rejoin messages at latest, which will make user confused. The same with notify_peers.count. Fix it by deleting team_notify_peers() and team_mcast_rejoin() in team_port_disable(). Reported-by: Liang Li Fixes: fc423ff00df3a ("team: add peer notification") Fixes: 492b200efdd20 ("team: add support for sending multicast rejoins") Signed-off-by: Hangbin Liu Signed-off-by: David S. Miller commit 1efb6ee3edea57f57f9fb05dba8dcb3f7333f61f Author: Martynas Pumputis Date: Fri Nov 23 17:43:26 2018 +0100 bpf: fix check of allowed specifiers in bpf_trace_printk A format string consisting of "%p" or "%s" followed by an invalid specifier (e.g. "%p%\n" or "%s%") could pass the check which would make format_decode (lib/vsprintf.c) to warn. Fixes: 9c959c863f82 ("tracing: Allow BPF programs to call bpf_trace_printk()") Reported-by: syzbot+1ec5c5ec949c4adaa0c4@syzkaller.appspotmail.com Signed-off-by: Martynas Pumputis Signed-off-by: Daniel Borkmann commit ca088320a02537f36c243ac21794525d8eabb3bd Author: Yixian Liu Date: Fri Nov 23 15:46:07 2018 +0800 RDMA/hns: Bugfix pbl configuration for rereg mr Current hns driver assigned the first two PBL page addresses from previous registered MR to the hardware when reregister MR changing the memory locations occurred. This will lead to PBL addressing error as the PBL has already been released. This patch fixes this wrong assignment by using the page address from new allocated PBL. Fixes: a2c80b7b4119 ("RDMA/hns: Add rereg mr support for hip08") Signed-off-by: Yixian Liu Signed-off-by: Jason Gunthorpe commit 18ba58e1c234ea1a2d9835ac8c1735d965ce4640 Author: Jason Wang Date: Thu Nov 22 14:36:31 2018 +0800 virtio-net: fail XDP set if guest csum is negotiated We don't support partial csumed packet since its metadata will be lost or incorrect during XDP processing. So fail the XDP set if guest_csum feature is negotiated. Fixes: f600b6905015 ("virtio_net: Add XDP support") Reported-by: Jesper Dangaard Brouer Cc: Jesper Dangaard Brouer Cc: Pavel Popa Cc: David Ahern Signed-off-by: Jason Wang Signed-off-by: David S. Miller commit e59ff2c49ae16e1d179de679aca81405829aee6c Author: Jason Wang Date: Thu Nov 22 14:36:30 2018 +0800 virtio-net: disable guest csum during XDP set We don't disable VIRTIO_NET_F_GUEST_CSUM if XDP was set. This means we can receive partial csumed packets with metadata kept in the vnet_hdr. This may have several side effects: - It could be overridden by header adjustment, thus is might be not correct after XDP processing. - There's no way to pass such metadata information through XDP_REDIRECT to another driver. - XDP does not support checksum offload right now. So simply disable guest csum if possible in this the case of XDP. Fixes: 3f93522ffab2d ("virtio-net: switch off offloads on demand if possible on XDP set") Reported-by: Jesper Dangaard Brouer Cc: Jesper Dangaard Brouer Cc: Pavel Popa Cc: David Ahern Signed-off-by: Jason Wang Signed-off-by: David S. Miller commit 7c98a42618271210c60b79128b220107d35938d9 Merge: 3381918fec92 7e241f647dc7 Author: Linus Torvalds Date: Fri Nov 23 11:24:55 2018 -0800 Merge tag 'ceph-for-4.20-rc4' of https://github.com/ceph/ceph-client Pullk ceph fix from Ilya Dryomov: "A messenger fix, marked for stable" * tag 'ceph-for-4.20-rc4' of https://github.com/ceph/ceph-client: libceph: fall back to sendmsg for slab pages commit 3381918fec9278d14f776d1dabd68da85fd6822e Merge: d88783b9c884 14b04063cc99 Author: Linus Torvalds Date: Fri Nov 23 11:20:14 2018 -0800 Merge tag 'for-linus-20181123' of git://git.kernel.dk/linux-block Pull block fix from Jens Axboe: "Just a single fix for this week, fixing an issue with nvme-fc" * tag 'for-linus-20181123' of git://git.kernel.dk/linux-block: nvme-fc: resolve io failures during connect commit 484afd1bd3fc6f9f5347289fc8b285aa65f67054 Author: Davide Caratti Date: Wed Nov 21 18:23:53 2018 +0100 net/sched: act_police: add missing spinlock initialization commit f2cbd4852820 ("net/sched: act_police: fix race condition on state variables") introduces a new spinlock, but forgets its initialization. Ensure that tcf_police_init() initializes 'tcfp_lock' every time a 'police' action is newly created, to avoid the following lockdep splat: INFO: trying to register non-static key. the code is fine but needs lockdep annotation. turning off the locking correctness validator. <...> Call Trace: dump_stack+0x85/0xcb register_lock_class+0x581/0x590 __lock_acquire+0xd4/0x1330 ? tcf_police_init+0x2fa/0x650 [act_police] ? lock_acquire+0x9e/0x1a0 lock_acquire+0x9e/0x1a0 ? tcf_police_init+0x2fa/0x650 [act_police] ? tcf_police_init+0x55a/0x650 [act_police] _raw_spin_lock_bh+0x34/0x40 ? tcf_police_init+0x2fa/0x650 [act_police] tcf_police_init+0x2fa/0x650 [act_police] tcf_action_init_1+0x384/0x4c0 tcf_action_init+0xf6/0x160 tcf_action_add+0x73/0x170 tc_ctl_action+0x122/0x160 rtnetlink_rcv_msg+0x2a4/0x490 ? netlink_deliver_tap+0x99/0x400 ? validate_linkmsg+0x370/0x370 netlink_rcv_skb+0x4d/0x130 netlink_unicast+0x196/0x230 netlink_sendmsg+0x2e5/0x3e0 sock_sendmsg+0x36/0x40 ___sys_sendmsg+0x280/0x2f0 ? _raw_spin_unlock+0x24/0x30 ? handle_pte_fault+0xafe/0xf30 ? find_held_lock+0x2d/0x90 ? syscall_trace_enter+0x1df/0x360 ? __sys_sendmsg+0x5e/0xa0 __sys_sendmsg+0x5e/0xa0 do_syscall_64+0x60/0x210 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7f1841c7cf10 Code: c3 48 8b 05 82 6f 2c 00 f7 db 64 89 18 48 83 cb ff eb dd 0f 1f 80 00 00 00 00 83 3d 8d d0 2c 00 00 75 10 b8 2e 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 31 c3 48 83 ec 08 e8 ae cc 00 00 48 89 04 24 RSP: 002b:00007ffcf9df4d68 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 00007f1841c7cf10 RDX: 0000000000000000 RSI: 00007ffcf9df4dc0 RDI: 0000000000000003 RBP: 000000005bf56105 R08: 0000000000000002 R09: 00007ffcf9df8edc R10: 00007ffcf9df47e0 R11: 0000000000000246 R12: 0000000000671be0 R13: 00007ffcf9df4e84 R14: 0000000000000008 R15: 0000000000000000 Fixes: f2cbd4852820 ("net/sched: act_police: fix race condition on state variables") Reported-by: Cong Wang Signed-off-by: Davide Caratti Acked-by: Cong Wang Acked-by: Jiri Pirko Signed-off-by: David S. Miller commit 605108acfe6233b72e2f803aa1cb59a2af3001ca Author: Paolo Abeni Date: Wed Nov 21 18:21:35 2018 +0100 net: don't keep lonely packets forever in the gro hash Eric noted that with UDP GRO and NAPI timeout, we could keep a single UDP packet inside the GRO hash forever, if the related NAPI instance calls napi_gro_complete() at an higher frequency than the NAPI timeout. Willem noted that even TCP packets could be trapped there, till the next retransmission. This patch tries to address the issue, flushing the old packets - those with a NAPI_GRO_CB age before the current jiffy - before scheduling the NAPI timeout. The rationale is that such a timeout should be well below a jiffy and we are not flushing packets eligible for sane GRO. v1 -> v2: - clarified the commit message and comment RFC -> v1: - added 'Fixes tags', cleaned-up the wording. Reported-by: Eric Dumazet Fixes: 3b47d30396ba ("net: gro: add a per device gro flush timer") Signed-off-by: Paolo Abeni Acked-by: Willem de Bruijn Acked-by: Eric Dumazet Signed-off-by: David S. Miller commit 896585d48e8e9ba44cd1754fbce8537feffcc1a5 Author: Hangbin Liu Date: Wed Nov 21 21:52:33 2018 +0800 net/ipv6: re-do dad when interface has IFF_NOARP flag change When we add a new IPv6 address, we should also join corresponding solicited-node multicast address, unless the interface has IFF_NOARP flag, as function addrconf_join_solict() did. But if we remove IFF_NOARP flag later, we do not do dad and add the mcast address. So we will drop corresponding neighbour discovery message that came from other nodes. A typical example is after creating a ipvlan with mode l3, setting up an ipv6 address and changing the mode to l2. Then we will not be able to ping this address as the interface doesn't join related solicited-node mcast address. Fix it by re-doing dad when interface changed IFF_NOARP flag. Then we will add corresponding mcast group and check if there is a duplicate address on the network. Reported-by: Jianlin Shi Reviewed-by: Stefano Brivio Signed-off-by: Hangbin Liu Signed-off-by: David S. Miller commit d88783b9c8849d88c3a75b7b9071cba072b47eba Merge: a03bac580ae7 829383e18372 Author: Linus Torvalds Date: Fri Nov 23 11:15:27 2018 -0800 Merge tag 'iommu-fixes-v4.20-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu Pull IOMMU fixes from Joerg Roedel: - Two fixes for the Intel VT-d driver to fix a NULL-ptr dereference and an unbalance in an allocate/free path (allocated with memremap, freed with iounmap) - Fix for a crash in the Renesas IOMMU driver - Fix for the Advanced Virtual Interrupt Controler (AVIC) code in the AMD IOMMU driver * tag 'iommu-fixes-v4.20-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: iommu/vt-d: Use memunmap to free memremap amd/iommu: Fix Guest Virtual APIC Log Tail Address Register iommu/ipmmu-vmsa: Fix crash on early domain free iommu/vt-d: Fix NULL pointer dereference in prq_event_thread() commit 5cd8d46ea1562be80063f53c7c6a5f40224de623 Author: Willem de Bruijn Date: Tue Nov 20 13:00:18 2018 -0500 packet: copy user buffers before orphan or clone tpacket_snd sends packets with user pages linked into skb frags. It notifies that pages can be reused when the skb is released by setting skb->destructor to tpacket_destruct_skb. This can cause data corruption if the skb is orphaned (e.g., on transmit through veth) or cloned (e.g., on mirror to another psock). Create a kernel-private copy of data in these cases, same as tun/tap zerocopy transmission. Reuse that infrastructure: mark the skb as SKBTX_ZEROCOPY_FRAG, which will trigger copy in skb_orphan_frags(_rx). Unlike other zerocopy packets, do not set shinfo destructor_arg to struct ubuf_info. tpacket_destruct_skb already uses that ptr to notify when the original skb is released and a timestamp is recorded. Do not change this timestamp behavior. The ubuf_info->callback is not needed anyway, as no zerocopy notification is expected. Mark destructor_arg as not-a-uarg by setting the lower bit to 1. The resulting value is not a valid ubuf_info pointer, nor a valid tpacket_snd frame address. Add skb_zcopy_.._nouarg helpers for this. The fix relies on features introduced in commit 52267790ef52 ("sock: add MSG_ZEROCOPY"), so can be backported as is only to 4.14. Tested with from `./in_netns.sh ./txring_overwrite` from http://github.com/wdebruij/kerneltools/tests Fixes: 69e3c75f4d54 ("net: TX_RING and packet mmap") Reported-by: Anand H. Krishnan Signed-off-by: Willem de Bruijn Signed-off-by: David S. Miller commit a03bac580ae743d5900af626ac63f7f8cd85def9 Merge: b88af9948724 2bbb5fa37475 Author: Linus Torvalds Date: Fri Nov 23 10:56:16 2018 -0800 Merge tag 'acpi-4.20-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI fix from Rafael Wysocki: "Prevent the ACPI core from registering a platform device for the SMB0001 HID to avoid IRQ allocation issues (Hans de Goede)" * tag 'acpi-4.20-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI / platform: Add SMB0001 HID to forbidden_id_list commit b88af994872418f0a98db6f4a9bae849315a99b0 Merge: e6005d3c4233 1d50088ca395 Author: Linus Torvalds Date: Fri Nov 23 10:52:57 2018 -0800 Merge tag 'pm-4.20-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fixes from Rafael Wysocki: "These fix two issues in the Operating Performance Points (OPP) framework, one cpufreq driver issue, one problem related to the tasks freezer and a few build-related issues in the cpupower utility. Specifics: - Fix tasks freezer deadlock in de_thread() that occurs if one of its sub-threads has been frozen already (Chanho Min). - Avoid registering a platform device by the ti-cpufreq driver on platforms that cannot use it (Dave Gerlach). - Fix a mistake in the ti-opp-supply operating performance points (OPP) driver that caused an incorrect reference voltage to be used and make it adjust the minimum voltage dynamically to avoid hangs or crashes in some cases (Keerthy). - Fix issues related to compiler flags in the cpupower utility and correct a linking problem in it by renaming a file with a duplicate name (Jiri Olsa, Konstantin Khlebnikov)" * tag 'pm-4.20-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: exec: make de_thread() freezable cpufreq: ti-cpufreq: Only register platform_device when supported opp: ti-opp-supply: Correct the supply in _get_optimal_vdd_voltage call opp: ti-opp-supply: Dynamically update u_volt_min tools cpupower: Override CFLAGS assignments tools cpupower debug: Allow to use outside build flags tools/power/cpupower: fix compilation with STATIC=true commit 4f9f49646a5733c0c2bd49940673dde89a9c5add Author: Will Deacon Date: Wed Nov 21 15:07:00 2018 +0000 arm64: cpufeature: Fix mismerge of CONFIG_ARM64_SSBD block When merging support for SSBD and the CRC32 instructions, the conflict resolution for the new capability entries in arm64_features[] inadvertedly predicated the availability of the CRC32 instructions on CONFIG_ARM64_SSBD, despite the functionality being entirely unrelated. Move the #ifdef CONFIG_ARM64_SSBD down so that it only covers the SSBD capability. Signed-off-by: Will Deacon Signed-off-by: Catalin Marinas commit e6005d3c42336074de3745718ac85807dd6e1e6a Merge: dcd3aa31dcdd 10547d956d59 Author: Linus Torvalds Date: Fri Nov 23 10:40:19 2018 -0800 Merge tag 'gpio-v4.20-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio Pull GPIO fixes from Linus Walleij: "Minor stuff except the IDA leak which was kind of important to fix. Also new maintainers, yay. - Do not lose an IDA on the gpiochip register errorpath. - Fix the PXA non-pincontrol GPIO-using platforms. - Fix the direction on the mockup GPIO driver. - Add some MAINTAINERS stuff: Bartosz stepped up as GPIO co-maintainer, and Andy established an Intel git tree" * tag 'gpio-v4.20-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: MAINTAINERS: Do maintain Intel GPIO drivers via separate tree gpio: mockup: fix indicated direction gpio: pxa: fix legacy non pinctrl aware builds again gpio: don't free unallocated ida on gpiochip_add_data_with_key() error path MAINTAINERS: add myself as co-maintainer of gpiolib commit dcd3aa31dcdd6d8eae8d4771c44aeb3b1fec995a Merge: 9b7c880c834c 5305ec6a27b2 Author: Linus Torvalds Date: Fri Nov 23 10:36:02 2018 -0800 Merge tag 'mmc-v4.20-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull MMC fixes from Ulf Hansson: "MMC host: - sdhci-pci: Fixup card detect lookup - sdhci-pci: Workaround GLK firmware bug for tuning" * tag 'mmc-v4.20-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: mmc: sdhci-pci: Workaround GLK firmware failing to restore the tuning value mmc: sdhci-pci: Try "cd" for card-detect lookup before using NULL commit 9b7c880c834c0a1c80a1dc6b8a0b19155361321f Merge: edeca3a769ad 98c9cdfd34fb Author: Linus Torvalds Date: Fri Nov 23 10:03:08 2018 -0800 Merge tag 'drm-fixes-2018-11-23' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "Regular drm fixes: amdgpu: - Vega20 fixes - firmware loading fix - panel display fix - override fix i915: - Sandybridge lockup fix - fastboot DSI panel fix - GPU hang on Broxton - GPU reloc fixes on pineview/bearlake ast: - screen blurring fix - cursor appearance fix udmabuf: - mmap fix vc4: - NULL deref fix - async cursor update fix All seems pretty normal at this stage" * tag 'drm-fixes-2018-11-23' of git://anongit.freedesktop.org/drm/drm: drm/ast: fixed cursor may disappear sometimes drm/ast: change resolution may cause screen blurred drm/i915: Add rotation readout for plane initial config drm/i915: Force a LUT update in intel_initial_commit() drm/fb-helper: Blacklist writeback when adding connectors to fbdev drm/i915: Write GPU relocs harder with gen3 drm/amdgpu: Enable HDP memory light sleep drm/i915: Prevent machine hang from Broxton's vtd w/a and error capture drm/amd/pp: handle negative values when reading OD drm/amdgpu: Add missing firmware entry for HAINAN drm/amd/powerplay: disable Vega20 DS related features drm/amdgpu: Fix oops when pp_funcs->switch_power_profile is unset drm/i915: Disable LP3 watermarks on all SNB machines drm/ast: Remove existing framebuffers before loading driver udmabuf: set read/write flag when exporting drm/amd/display: Support amdgpu "max bpc" connector property (v2) drm/amdgpu: Add amdgpu "max bpc" connector property (v2) drm/vc4: Set ->legacy_cursor_update to false when doing non-async updates drm/vc4: Fix NULL pointer dereference in the async update path commit b5d9a07ef7736b2456b9d3c90568de25e43d8ec3 Author: Sergey Matyukevich Date: Fri Nov 16 21:21:30 2018 +0300 arm64: sysreg: fix sparse warnings Specify correct type for the constants to avoid the following sparse complaints: ./arch/arm64/include/asm/sysreg.h:471:42: warning: constant 0xffffffffffffffff is so big it is unsigned long ./arch/arm64/include/asm/sysreg.h:512:42: warning: constant 0xffffffffffffffff is so big it is unsigned long Acked-by: Will Deacon Acked-by: Olof Johansson Acked-by: Luc Van Oostenryck Signed-off-by: Sergey Matyukevich Signed-off-by: Catalin Marinas commit 8cd65271f8e545ddeed10ecc2e417936bdff168e Author: Anisse Astier Date: Fri Nov 23 17:59:11 2018 +0100 ALSA: hda/realtek - fix headset mic detection for MSI MS-B171 MSI Cubi N 8GL (MS-B171) needs the same fixup as its older model, the MS-B120, in order for the headset mic to be properly detected. They both use a single 3-way jack for both mic and headset with an ALC283 codec, with the same pins used. Cc: stable@vger.kernel.org Signed-off-by: Anisse Astier Signed-off-by: Takashi Iwai commit 39070a98d668db8fbaa2a6a6752f732cbcbb14b1 Author: Hans de Goede Date: Thu Nov 22 12:38:12 2018 +0100 ALSA: hda: Add ASRock N68C-S UCC the power_save blacklist Power-saving is causing plops on audio start/stop on the built-in audio of the nForce 430 based ASRock N68C-S UCC motherboard, add this model to the power_save blacklist. BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1525104 Cc: Signed-off-by: Hans de Goede Signed-off-by: Takashi Iwai commit 7194eda1ba0872d917faf3b322540b4f57f11ba5 Author: Takashi Iwai Date: Fri Nov 23 15:44:00 2018 +0100 ALSA: ac97: Fix incorrect bit shift at AC97-SPSA control write The function snd_ac97_put_spsa() gets the bit shift value from the associated private_value, but it extracts too much; the current code extracts 8 bit values in bits 8-15, but this is a combination of two nibbles (bits 8-11 and bits 12-15) for left and right shifts. Due to the incorrect bits extraction, the actual shift may go beyond the 32bit value, as spotted recently by UBSAN check: UBSAN: Undefined behaviour in sound/pci/ac97/ac97_codec.c:836:7 shift exponent 68 is too large for 32-bit type 'int' This patch fixes the shift value extraction by masking the properly with 0x0f instead of 0xff. Reported-and-tested-by: Meelis Roos Cc: Signed-off-by: Takashi Iwai commit 2084ac6c505a58f7efdec13eba633c6aaa085ca5 Author: Pan Bian Date: Fri Nov 23 15:56:33 2018 +0800 exportfs: do not read dentry after free The function dentry_connected calls dput(dentry) to drop the previously acquired reference to dentry. In this case, dentry can be released. After that, IS_ROOT(dentry) checks the condition (dentry == dentry->d_parent), which may result in a use-after-free bug. This patch directly compares dentry with its parent obtained before dropping the reference. Fixes: a056cc8934c("exportfs: stop retrying once we race with rename/remove") Signed-off-by: Pan Bian Signed-off-by: Al Viro commit ffdcc3638c58d55a6fa68b6e5dfd4fb4109652eb Author: Peter Ujfalusi Date: Wed Nov 14 13:06:23 2018 +0200 ASoC: omap-dmic: Add pm_qos handling to avoid overruns with CPU_IDLE We need to block sleep states which would require longer time to leave than the time the DMA must react to the DMA request in order to keep the FIFO serviced without overrun. Signed-off-by: Peter Ujfalusi Acked-by: Jarkko Nikula Signed-off-by: Mark Brown commit 373a500e34aea97971c9d71e45edad458d3da98f Author: Peter Ujfalusi Date: Wed Nov 14 13:06:22 2018 +0200 ASoC: omap-mcpdm: Add pm_qos handling to avoid under/overruns with CPU_IDLE We need to block sleep states which would require longer time to leave than the time the DMA must react to the DMA request in order to keep the FIFO serviced without under of overrun. Signed-off-by: Peter Ujfalusi Acked-by: Jarkko Nikula Signed-off-by: Mark Brown commit dd2f52d8991af9fe0928d59ec502ba52be7bc38d Author: Peter Ujfalusi Date: Wed Nov 14 13:06:21 2018 +0200 ASoC: omap-mcbsp: Fix latency value calculation for pm_qos The latency number is in usec for the pm_qos. Correct the calculation to give us the time in usec Signed-off-by: Peter Ujfalusi Acked-by: Jarkko Nikula Signed-off-by: Mark Brown commit 42a657f57628402c73237547f0134e083e2f6764 Author: Pan Bian Date: Fri Nov 23 18:10:15 2018 +0800 btrfs: relocation: set trans to be NULL after ending transaction The function relocate_block_group calls btrfs_end_transaction to release trans when update_backref_cache returns 1, and then continues the loop body. If btrfs_block_rsv_refill fails this time, it will jump out the loop and the freed trans will be accessed. This may result in a use-after-free bug. The patch assigns NULL to trans after trans is released so that it will not be accessed. Fixes: 0647bf564f1 ("Btrfs: improve forever loop when doing balance relocation") CC: stable@vger.kernel.org # 4.4+ Reviewed-by: Qu Wenruo Signed-off-by: Pan Bian Reviewed-by: David Sterba Signed-off-by: David Sterba commit 396defa8523372645d6d5a8b7f4b5403b119e360 Author: Ryder Lee Date: Mon Nov 12 09:28:07 2018 +0800 arm64: dts: mt7622: fix no more console output on BPI-R64 board Fix this by using a 'stdout-path' property that points to the device. Fixes: 0b6286dd96c0 ("arm64: dts: mt7622: add bananapi BPI-R64 board") Signed-off-by: Ryder Lee Signed-off-by: Matthias Brugger commit 6c05946e349d92f527d98644fbc9c41f06312c00 Author: Ryder Lee Date: Mon Nov 12 09:28:06 2018 +0800 arm64: dts: mt7622: fix no more console output on rfb1 No default serial console on boot. Fix this by using a 'stdout-path' property that points to the device. Fixes: c0d9f9ad4f76 ("arm64: dts: mt7622: add earlycon to mt7622-rfb1 board") Signed-off-by: Ryder Lee Tested-by: Kevin Hilman [mb: Fix commit message] Signed-off-by: Matthias Brugger commit 1d50088ca3956e5dcd2751a658e7869b9af10bb4 Merge: bec00cb5e97c d98ccfc3948a c22397888f1e Author: Rafael J. Wysocki Date: Fri Nov 23 10:32:49 2018 +0100 Merge branches 'pm-cpufreq' and 'pm-sleep' * pm-cpufreq: cpufreq: ti-cpufreq: Only register platform_device when supported * pm-sleep: exec: make de_thread() freezable commit bec00cb5e97c19d2c8bd10db15d334cb40760000 Merge: 6eb5c9b5edff 0db699f747cc Author: Rafael J. Wysocki Date: Fri Nov 23 10:32:22 2018 +0100 Merge branches 'pm-opp' and 'pm-tools' * pm-opp: opp: ti-opp-supply: Correct the supply in _get_optimal_vdd_voltage call opp: ti-opp-supply: Dynamically update u_volt_min * pm-tools: tools cpupower: Override CFLAGS assignments tools cpupower debug: Allow to use outside build flags tools/power/cpupower: fix compilation with STATIC=true commit 09d3f015d1e1b4fee7e9bbdcf54201d239393391 Author: Andrea Parri Date: Thu Nov 22 17:10:31 2018 +0100 uprobes: Fix handle_swbp() vs. unregister() + register() race once more Commit: 142b18ddc8143 ("uprobes: Fix handle_swbp() vs unregister() + register() race") added the UPROBE_COPY_INSN flag, and corresponding smp_wmb() and smp_rmb() memory barriers, to ensure that handle_swbp() uses fully-initialized uprobes only. However, the smp_rmb() is mis-placed: this barrier should be placed after handle_swbp() has tested for the flag, thus guaranteeing that (program-order) subsequent loads from the uprobe can see the initial stores performed by prepare_uprobe(). Move the smp_rmb() accordingly. Also amend the comments associated to the two memory barriers to indicate their actual locations. Signed-off-by: Andrea Parri Acked-by: Oleg Nesterov Cc: Alexander Shishkin Cc: Andrew Morton Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Namhyung Kim Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Cc: stable@kernel.org Fixes: 142b18ddc8143 ("uprobes: Fix handle_swbp() vs unregister() + register() race") Link: http://lkml.kernel.org/r/20181122161031.15179-1-andrea.parri@amarulasolutions.com Signed-off-by: Ingo Molnar commit 4a135e538962cb00a9667c82e7d2b9e4d7cd7177 Author: Mathias Krause Date: Wed Nov 21 21:09:23 2018 +0100 xfrm_user: fix freeing of xfrm states on acquire Commit 565f0fa902b6 ("xfrm: use a dedicated slab cache for struct xfrm_state") moved xfrm state objects to use their own slab cache. However, it missed to adapt xfrm_user to use this new cache when freeing xfrm states. Fix this by introducing and make use of a new helper for freeing xfrm_state objects. Fixes: 565f0fa902b6 ("xfrm: use a dedicated slab cache for struct xfrm_state") Reported-by: Pan Bian Cc: # v4.18+ Signed-off-by: Mathias Krause Acked-by: Herbert Xu Signed-off-by: Steffen Klassert commit 3e27c79c4b121a64e85f26ab8957e5d0a09ff28e Author: Viresh Kumar Date: Fri Nov 23 10:36:07 2018 +0530 OPP: Fix parsing of multiple phandles in "operating-points-v2" property We currently return error if more than one phandle is present in the "operating-points-v2" property, which is incorrect. We only want to check the count of phandles here and set index to 0 if only one phandle is present. Fix it. Fixes: 5ed4cecd75e9 ("OPP: Pass OPP table to _of_add_opp_table_v{1|2}()") Signed-off-by: Viresh Kumar commit 98c9cdfd34fbb62886e4c5a07e33661aa3352ef5 Merge: 8cf6f361eb76 f559156c399c Author: Dave Airlie Date: Fri Nov 23 11:03:20 2018 +1000 Merge tag 'drm-intel-fixes-2018-11-22' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes - Fix for fastboot DSI panel boot time flicker regression, also fixes Bugzilla #108225 - Fix Bugzilla #101269 to avoid GPU hangs on Sandybridge machines - Avoid GPU hang on error capture on Broxton with Vt-d enabled - Avoid missing GPU relocations on Pineview and Bearlake (Gen3) Signed-off-by: Dave Airlie From: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20181122120555.GA18282@jlahtine-desk.ger.corp.intel.com commit 813961de3ee6474dd5703e883471fd941d6c8f69 Author: Alexei Starovoitov Date: Thu Nov 22 10:49:56 2018 -0800 bpf: fix integer overflow in queue_stack_map Fix the following issues: - allow queue_stack_map for root only - fix u32 max_entries overflow - disallow value_size == 0 Fixes: f1a2e44a3aec ("bpf: add queue and stack maps") Reported-by: Wei Wu Signed-off-by: Alexei Starovoitov Cc: Mauricio Vasquez B Signed-off-by: Daniel Borkmann commit 039e70a70c8417b5bf5878a60612ebd2c95f731e Merge: 6d0f60b0f858 5bf032ef08e6 Author: David S. Miller Date: Thu Nov 22 11:53:26 2018 -0800 Merge branch 'ibmvnic-Fix-queue-and-buffer-accounting-errors' Thomas Falcon says: ==================== ibmvnic: Fix queue and buffer accounting errors This series includes two small fixes. The first resolves a typo bug in the code to clean up unused RX buffers during device queue removal. The second ensures that device queue memory is updated to reflect new supported queue ring sizes after migration to other backing hardware. ==================== Signed-off-by: David S. Miller commit 5bf032ef08e6a110edc1e3bfb3c66a208fb55125 Author: Thomas Falcon Date: Wed Nov 21 11:17:59 2018 -0600 ibmvnic: Update driver queues after change in ring size support During device reset, queue memory is not being updated to accommodate changes in ring buffer sizes supported by backing hardware. Track any differences in ring buffer sizes following the reset and update queue memory when possible. Signed-off-by: Thomas Falcon Signed-off-by: David S. Miller commit b7cdec3d699db2e5985ad39de0f25d3b6111928e Author: Thomas Falcon Date: Wed Nov 21 11:17:58 2018 -0600 ibmvnic: Fix RX queue buffer cleanup The wrong index is used when cleaning up RX buffer objects during release of RX queues. Update to use the correct index counter. Signed-off-by: Thomas Falcon Signed-off-by: David S. Miller commit 6d0f60b0f8588fd4380ea5df9601e12fddd55ce2 Author: Lorenzo Bianconi Date: Wed Nov 21 16:32:10 2018 +0100 net: thunderx: set xdp_prog to NULL if bpf_prog_add fails Set xdp_prog pointer to NULL if bpf_prog_add fails since that routine reports the error code instead of NULL in case of failure and xdp_prog pointer value is used in the driver to verify if XDP is currently enabled. Moreover report the error code to userspace if nicvf_xdp_setup fails Fixes: 05c773f52b96 ("net: thunderx: Add basic XDP support") Signed-off-by: Lorenzo Bianconi Signed-off-by: David S. Miller commit 0211dda68a4f6531923a2f72d8e8959207f59fba Author: Tal Gilboa Date: Wed Nov 21 16:28:23 2018 +0200 net/dim: Update DIM start sample after each DIM iteration On every iteration of net_dim, the algorithm may choose to check for the system state by comparing current data sample with previous data sample. After each of these comparison, regardless of the action taken, the sample used as baseline is needed to be updated. This patch fixes a bug that causes DIM to take wrong decisions, due to never updating the baseline sample for comparison between iterations. This way, DIM always compares current sample with zeros. Although this is a functional fix, it also improves and stabilizes performance as the algorithm works properly now. Performance: Tested single UDP TX stream with pktgen: samples/pktgen/pktgen_sample03_burst_single_flow.sh -i p4p2 -d 1.1.1.1 -m 24:8a:07:88:26:8b -f 3 -b 128 ConnectX-5 100GbE packet rate improved from 15-19Mpps to 19-20Mpps. Also, toggling between profiles is less frequent with the fix. Fixes: 8115b750dbcb ("net/dim: use struct net_dim_sample as arg to net_dim") Signed-off-by: Tal Gilboa Reviewed-by: Tariq Toukan Signed-off-by: David S. Miller commit bb21ce0ad227b69ec0f83279297ee44232105d96 Author: Tigran Mkrtchyan Date: Wed Nov 21 12:25:41 2018 +0100 flexfiles: use per-mirror specified stateid for IO rfc8435 says: For tight coupling, ffds_stateid provides the stateid to be used by the client to access the file. However current implementation replaces per-mirror provided stateid with by open or lock stateid. Ensure that per-mirror stateid is used by ff_layout_write_prepare_v4 and nfs4_ff_layout_prepare_ds. Signed-off-by: Tigran Mkrtchyan Signed-off-by: Rick Macklem Signed-off-by: Trond Myklebust commit 99f2c55591fb5c1b536263970d98c2ebc2089906 Author: Olga Kornievskaia Date: Wed Nov 21 11:24:22 2018 -0500 NFSv4.2 copy do not allocate memory under the lock Bruce pointed out that we shouldn't allocate memory while holding a lock in the nfs4_callback_offload() and handle_async_copy() that deal with a racing CB_OFFLOAD and reply to COPY case. Signed-off-by: Olga Kornievskaia Signed-off-by: Trond Myklebust commit ea2fc769719f9cc8e26845e8ffa2a719e2724645 Author: Ezequiel Garcia Date: Fri Nov 9 10:16:41 2018 -0500 media: Revert "media: dt-bindings: Document the Rockchip VPU bindings" This reverts commit e4183d3256e3cd668e899d06af66da5aac3a51af. The commit was picked by mistake, as the Rockchip VPU driver is not ready for inclusion yet, and it's still under discussion. Signed-off-by: Ezequiel Garcia Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit f96d84488f7d5f9123428c700cea82a292bca53e Author: Hans Verkuil Date: Tue Nov 20 05:13:04 2018 -0500 media: gspca: fix frame overflow error When converting gspca to vb2 I missed that fact that the buffer sizes were rounded up to the next page size. As a result some gspca drivers (spca561 being one of them) reported frame overflows. Modify the code to align the buffer sizes to the next page size, just as the original code did. Fixes: 1f5965c4dfd7 ("media: gspca: convert to vb2") Tested-off-by: Hans Verkuil Signed-off-by: Hans Verkuil Reported-by: softwarebugs Cc: # for v4.18 and up Signed-off-by: Mauro Carvalho Chehab commit 552f0329c75b3e1d7f9bb8c9e421d37403f192cd Author: Filipe Manana Date: Mon Nov 19 16:20:34 2018 +0000 Btrfs: fix race between enabling quotas and subvolume creation We have a race between enabling quotas end subvolume creation that cause subvolume creation to fail with -EINVAL, and the following diagram shows how it happens: CPU 0 CPU 1 btrfs_ioctl() btrfs_ioctl_quota_ctl() btrfs_quota_enable() mutex_lock(fs_info->qgroup_ioctl_lock) btrfs_ioctl() create_subvol() btrfs_qgroup_inherit() -> save fs_info->quota_root into quota_root -> stores a NULL value -> tries to lock the mutex qgroup_ioctl_lock -> blocks waiting for the task at CPU0 -> sets BTRFS_FS_QUOTA_ENABLED in fs_info -> sets quota_root in fs_info->quota_root (non-NULL value) mutex_unlock(fs_info->qgroup_ioctl_lock) -> checks quota enabled flag is set -> returns -EINVAL because fs_info->quota_root was NULL before it acquired the mutex qgroup_ioctl_lock -> ioctl returns -EINVAL Returning -EINVAL to user space will be confusing if all the arguments passed to the subvolume creation ioctl were valid. Fix it by grabbing the value from fs_info->quota_root after acquiring the mutex. CC: stable@vger.kernel.org # 4.4+ Reviewed-by: Qu Wenruo Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit edeca3a769ad28a9477798c3b1d8e0701db728e4 Merge: 52465bce85a2 a6b0961b3989 Author: Linus Torvalds Date: Thu Nov 22 08:45:44 2018 -0800 Merge tag 'sound-4.20-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "The only significant change is for OSS PCM emulation to convert with kvcalloc() to address both performance and security issues. It's a pretty straightforward change, which should be safe. The rest are, as usual, device-specific small fixes for HD-audio" * tag 'sound-4.20-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: hda/ca0132 - fix AE-5 pincfg ALSA: hda/ca0132 - Add new ZxR quirk ALSA: hda/ca0132 - Call pci_iounmap() instead of iounmap() ALSA: hda/realtek - Add quirk entry for HP Pavilion 15 ALSA: oss: Use kvzalloc() for local buffer allocations commit 52465bce85a2d28bcec5cba5a645bb610367ab1b Merge: 4cd731953d62 544b03da39e2 Author: Linus Torvalds Date: Thu Nov 22 08:43:06 2018 -0800 Merge tag 'char-misc-4.20-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char/misc driver fixes from Greg KH: "Here are some small char/misc driver fixes for issues that have been reported. Nothing major, highlights include: - gnss sync write fixes - uio oops fix - nvmem fixes - other minor fixes and some documentation/maintainers updates Full details are in the shortlog. All of these have been in linux-next for a while with no reported issues" * tag 'char-misc-4.20-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: Documentation/security-bugs: Postpone fix publication in exceptional cases MAINTAINERS: Add Sasha as a stable branch maintainer gnss: sirf: fix synchronous write timeout gnss: serial: fix synchronous write timeout uio: Fix an Oops on load test_firmware: fix error return getting clobbered nvmem: core: fix regression in of_nvmem_cell_get() misc: atmel-ssc: Fix section annotation on atmel_ssc_get_driver_data drivers/misc/sgi-gru: fix Spectre v1 vulnerability Drivers: hv: kvp: Fix the recent regression caused by incorrect clean-up slimbus: ngd: remove unnecessary check commit 4cd731953d620b7e4e999a90d13db58b88c5e95b Merge: ef4d6f2c0c65 63529eaa6164 Author: Linus Torvalds Date: Thu Nov 22 08:39:29 2018 -0800 Merge tag 'usb-4.20-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB fixes from Greg KH: "Here are a number of small USB fixes for 4.20-rc4. There's the usual xhci and dwc2/3 fixes as well as a few minor other issues resolved for problems that have been reported. Full details are in the shortlog. All have been in linux-next for a while with no reported issues" * tag 'usb-4.20-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: usb: cdc-acm: add entry for Hiro (Conexant) modem usb: xhci: Prevent bus suspend if a port connect change or polling state is detected usb: core: Fix hub port connection events lost usb: dwc3: gadget: fix ISOC TRB type on unaligned transfers Revert "usb: gadget: ffs: Fix BUG when userland exits with submitted AIO transfers" usb: dwc2: pci: Fix an error code in probe usb: dwc3: Fix NULL pointer exception in dwc3_pci_remove() xhci: Add quirk to workaround the errata seen on Cavium Thunder-X2 Soc usb: xhci: fix timeout for transition from RExit to U0 usb: xhci: fix uninitialized completion when USB3 port got wrong status xhci: Add check for invalid byte size error when UAS devices are connected. xhci: handle port status events for removed USB3 hcd xhci: Fix leaking USB3 shared_hcd at xhci removal USB: misc: appledisplay: add 20" Apple Cinema Display USB: quirks: Add no-lpm quirk for Raydium touchscreens usb: quirks: Add delay-init quirk for Corsair K70 LUX RGB USB: Wait for extra delay time after USB_PORT_FEAT_RESET for quirky hub usb: dwc3: gadget: Properly check last unaligned/zero chain TRB usb: dwc3: core: Clean up ULPI device commit ef4d6f2c0c659922856bb48cbb7a83ac97941e01 Merge: b84b6345e382 e8828ec1c003 Author: Linus Torvalds Date: Thu Nov 22 08:35:30 2018 -0800 Merge tag 'mtd/fixes-for-4.20-rc4' of git://git.infradead.org/linux-mtd Pull mtd fixes from Boris Brezillon: "SPI NOR fixes: - Various fixes related to the SFDP parsing code merged in 4.20 - Fix for a page fault in the cadence-qspi NAND fixes: - Fix a macro name conflict between the QCOM NAND controller driver and the RISC-V asm headers - Fix of-node handling in the atmel driver" * tag 'mtd/fixes-for-4.20-rc4' of git://git.infradead.org/linux-mtd: mtd: spi-nor: fix selection of uniform erase type in flexible conf mtd: spi-nor: Fix Cadence QSPI page fault kernel panic mtd: rawnand: qcom: Namespace prefix some commands mtd: rawnand: atmel: fix OF child-node lookup mtd: spi_nor: pass DMA-able buffer to spi_nor_read_raw() mtd: spi-nor: don't overwrite errno in spi_nor_get_map_in_use() mtd: spi-nor: fix iteration over smpt array mtd: spi-nor: don't drop sfdp data if optional parsers fail commit b84b6345e3827ab616946b52f46e95179657b596 Merge: 92b419289cee 8e4829c6f747 Author: Linus Torvalds Date: Thu Nov 22 08:31:46 2018 -0800 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "Two small fixes. The qla2xxx is a regression from 4.18 and the ufs one is a device enablement fix" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: ufs: Fix hynix ufs bug with quirk on hi36xx SoC scsi: qla2xxx: Timeouts occur on surprise removal of QLogic adapter commit 829383e183728dec7ed9150b949cd6de64127809 Author: Pan Bian Date: Wed Nov 21 17:53:47 2018 +0800 iommu/vt-d: Use memunmap to free memremap memunmap() should be used to free the return of memremap(), not iounmap(). Fixes: dfddb969edf0 ('iommu/vt-d: Switch from ioremap_cache to memremap') Signed-off-by: Pan Bian Signed-off-by: Joerg Roedel commit f2a5fef1248beccacec0deecb67c1be693d72ae6 Author: Juergen Gross Date: Mon Nov 19 14:59:45 2018 +0100 x86/xen: cleanup includes in arch/x86/xen/spinlock.c arch/x86/xen/spinlock.c includes several headers which are not needed. Remove the #includes. Signed-off-by: Juergen Gross Reviewed-by: Boris Ostrovsky Signed-off-by: Juergen Gross commit 4fc4bb796b0c75067fd65292dfd874869ff7c9dc Author: Myungho Jung Date: Wed Nov 21 15:18:30 2018 -0800 fuse: Add bad inode check in fuse_destroy_inode() make_bad_inode() sets inode->i_mode to S_IFREG if I/O error is detected in fuse_do_getattr()/fuse_do_setattr(). If the inode is not a regular file, write_files and queued_writes in fuse_inode are not initialized and have NULL or invalid pointers written by other members in a union. So, list_empty() returns false in fuse_destroy_inode(). Add is_bad_inode() to check if make_bad_inode() was called. Reported-by: syzbot+b9c89b84423073226299@syzkaller.appspotmail.com Fixes: ab2257e9941b ("fuse: reduce size of struct fuse_inode") Signed-off-by: Myungho Jung Signed-off-by: Miklos Szeredi commit 0152eee6fc3b84298bb6a79961961734e8afa5b8 Author: Steffen Klassert Date: Thu Nov 22 07:26:24 2018 +0100 xfrm: Fix NULL pointer dereference in xfrm_input when skb_dst_force clears the dst_entry. Since commit 222d7dbd258d ("net: prevent dst uses after free") skb_dst_force() might clear the dst_entry attached to the skb. The xfrm code doesn't expect this to happen, so we crash with a NULL pointer dereference in this case. Fix it by checking skb_dst(skb) for NULL after skb_dst_force() and drop the packet in case the dst_entry was cleared. We also move the skb_dst_force() to a codepath that is not used when the transformation was offloaded, because in this case we don't have a dst_entry attached to the skb. The output and forwarding path was already fixed by commit 9e1437937807 ("xfrm: Fix NULL pointer dereference when skb_dst_force clears the dst_entry.") Fixes: 222d7dbd258d ("net: prevent dst uses after free") Reported-by: Jean-Philippe Menil Signed-off-by: Steffen Klassert commit 472de49fdc53365c880ab81ae2b5cfdd83db0b06 Author: Jiri Olsa Date: Wed Nov 21 11:16:12 2018 +0100 perf/x86/intel: Disallow precise_ip on BTS events Vince reported a crash in the BTS flush code when touching the callchain data, which was supposed to be initialized as an 'early' callchain, but intel_pmu_drain_bts_buffer() does not do that: BUG: unable to handle kernel NULL pointer dereference at 0000000000000000 ... Call Trace: intel_pmu_drain_bts_buffer+0x151/0x220 ? intel_get_event_constraints+0x219/0x360 ? perf_assign_events+0xe2/0x2a0 ? select_idle_sibling+0x22/0x3a0 ? __update_load_avg_se+0x1ec/0x270 ? enqueue_task_fair+0x377/0xdd0 ? cpumask_next_and+0x19/0x20 ? load_balance+0x134/0x950 ? check_preempt_curr+0x7a/0x90 ? ttwu_do_wakeup+0x19/0x140 x86_pmu_stop+0x3b/0x90 x86_pmu_del+0x57/0x160 event_sched_out.isra.106+0x81/0x170 group_sched_out.part.108+0x51/0xc0 __perf_event_disable+0x7f/0x160 event_function+0x8c/0xd0 remote_function+0x3c/0x50 flush_smp_call_function_queue+0x35/0xe0 smp_call_function_single_interrupt+0x3a/0xd0 call_function_single_interrupt+0xf/0x20 It was triggered by fuzzer but can be easily reproduced by: # perf record -e cpu/branch-instructions/pu -g -c 1 Peter suggested not to allow branch tracing for precise events: > Now arguably, this is really stupid behaviour. Who in his right mind > wants callchain output on BTS entries. And even if they do, BTS + > precise_ip is nonsensical. > > So in my mind disallowing precise_ip on BTS would be the simplest fix. Suggested-by: Peter Zijlstra Reported-by: Vince Weaver Signed-off-by: Jiri Olsa Acked-by: Peter Zijlstra Cc: Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Stephane Eranian Cc: Thomas Gleixner Fixes: 6cbc304f2f36 ("perf/x86/intel: Fix unwind errors from PEBS entries (mk-II)") Link: http://lkml.kernel.org/r/20181121101612.16272-3-jolsa@kernel.org Signed-off-by: Ingo Molnar commit 67266c1080ad56c31af72b9c18355fde8ccc124a Author: Jiri Olsa Date: Wed Nov 21 11:16:11 2018 +0100 perf/x86/intel: Add generic branch tracing check to intel_pmu_has_bts() Currently we check the branch tracing only by checking for the PERF_COUNT_HW_BRANCH_INSTRUCTIONS event of PERF_TYPE_HARDWARE type. But we can define the same event with the PERF_TYPE_RAW type. Changing the intel_pmu_has_bts() code to check on event's final hw config value, so both HW types are covered. Adding unlikely to intel_pmu_has_bts() condition calls, because it was used in the original code in intel_bts_constraints. Signed-off-by: Jiri Olsa Acked-by: Peter Zijlstra Cc: Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Link: http://lkml.kernel.org/r/20181121101612.16272-2-jolsa@kernel.org Signed-off-by: Ingo Molnar commit ed6101bbf6266ee83e620b19faa7c6ad56bb41ab Author: Jiri Olsa Date: Wed Nov 21 11:16:10 2018 +0100 perf/x86/intel: Move branch tracing setup to the Intel-specific source file Moving branch tracing setup to Intel core object into separate intel_pmu_bts_config function, because it's Intel specific. Suggested-by: Peter Zijlstra Signed-off-by: Jiri Olsa Acked-by: Peter Zijlstra Cc: Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Link: http://lkml.kernel.org/r/20181121101612.16272-1-jolsa@kernel.org Signed-off-by: Ingo Molnar commit c648284f6c9606f1854816086593eeae5556845a Merge: 5a96b2d38dc0 0145b50566e7 Author: Greg Kroah-Hartman Date: Thu Nov 22 09:37:36 2018 +0100 Merge tag 'iio-fixes-for-4.20a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-linus Jonathan writes: First set of IIO fixes for the 4.20 cycle. * st_magn - Avoid an ordering issue that lead to large numbers of unhandled interrupts whilst enabling buffered capture. * hid-sensors - Fix a long running problem with signed values reading wrong from sysfs on these sensors. It appears people were only using the buffered interface. These typically occur in laptops so chances are everyone was using the sensor-proxy which will use the buffered interface by default. * tag 'iio-fixes-for-4.20a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: iio/hid-sensors: Fix IIO_CHAN_INFO_RAW returning wrong values for signed numbers iio:st_magn: Fix enable device after trigger commit ffe0e7cf290f5c9d1392134b4ef8da2a3761a4cd Author: Benjamin Tissoires Date: Wed Nov 21 16:27:12 2018 +0100 Revert "Input: Add the `REL_WHEEL_HI_RES` event code" This reverts commit aaf9978c3c0291ef3beaa97610bc9c3084656a85. Quoting Peter: There is a HID feature report called "Resolution Multiplier" Described in the "Enhanced Wheel Support in Windows" doc and the "USB HID Usage Tables" page 30. http://download.microsoft.com/download/b/d/1/bd1f7ef4-7d72-419e-bc5c-9f79ad7bb66e/wheel.docx https://www.usb.org/sites/default/files/documents/hut1_12v2.pdf This was new for Windows Vista, so we're only a decade behind here. I only accidentally found this a few days ago while debugging a stuck button on a Microsoft mouse. The docs above describe it like this: a wheel control by default sends value 1 per notch. If the resolution multiplier is active, the wheel is expected to send a value of $multiplier per notch (e.g. MS Sculpt mouse) or just send events more often, i.e. for less physical motion (e.g. MS Comfort mouse). For the latter, you need the right HW of course. The Sculpt mouse has tactile wheel clicks, so nothing really changes. The Comfort mouse has continuous motion with no tactile clicks. Similar to the free-wheeling Logitech mice but without any inertia. Note that the doc also says that Vista and onwards *always* enable this feature where available. An example HID definition looks like this: Usage Page Generic Desktop (0x01) Usage Resolution Multiplier (0x48) Logical Minimum 0 Logical Maximum 1 Physical Minimum 1 Physical Maximum 16 Report Size 2 # in bits Report Count 1 Feature (Data, Var, Abs) So the actual bits have values 0 or 1 and that reflects real values 1 or 16. We've only seen single-bits so far, so there's low-res and hi-res, but nothing in between. The multiplier is available for HID usages "Wheel" and "AC Pan" (horiz wheel). Microsoft suggests that > Vendors should ship their devices with smooth scrolling disabled and allow > Windows to enable it. This ensures that the device works like a regular HID > device on legacy operating systems that do not support smooth scrolling. (see the wheel doc linked above) The mice that we tested so far do reset on unplug. Device Support looks to be all (?) Microsoft mice but nothing else Not supported: - Logitech G500s, G303 - Roccat Kone XTD - all the cheap Lenovo, HP, Dell, Logitech USB mice that come with a workstation that I could find don't have it. - Etekcity something something - Razer Imperator Supported: - Microsoft Comfort Optical Mouse 3000 - yes, physical: 1:4 - Microsoft Sculpt Ergonomic Mouse - yes, physical: 1:12 - Microsoft Surface mouse - yes, physical: 1:4 So again, I think this is really just available on Microsoft mice, but probably all decent MS mice released over the last decade. Looking at the hardware itself: - no noticeable notches in the weel - low-res: 18 events per 360deg rotation (click angle 20 deg) - high-res: 72 events per 360deg → matches multiplier of 4 - I can feel the notches during wheel turns - low-res: 24 events per 360 deg rotation (click angle 15 deg) - horiz wheel is tilt-based, continuous output value 1 - high-res: 24 events per 360deg with value 12 → matches multiplier of 12 - horiz wheel output rate doubles/triples?, values is 3 - It's a touch strip, not a wheel so no notches - high-res: events have value 4 instead of 1 a bit strange given that it doesn't actually have notches. Ok, why is this an issue for the current API? First, because the logitech multiplier used in Harry's patches looks suspiciously like the Resolution Multiplier so I think we should assume it's the same thing. Nestor, can you shed some light on that? - `REL_WHEEL` is defined as the number of notches, emulated where needed. - `REL_WHEEL_HI_RES` is the movement of the user's finger in microns. - `WM_MOUSEWHEEL` (Windows) is is a multiple of 120, defined as "the threshold for action to be taken and one such action" https://docs.microsoft.com/en-us/windows/desktop/inputdev/wm-mousewheel If the multiplier is set to M, this means we need an accumulated value of M until we can claim there was a wheel click. So after enabling the multiplier and setting it to the maximum (like Windows): - M units are 15deg rotation → 1 unit is 2620/M micron (see below). This is the `REL_WHEEL_HI_RES` value. - wheel diameter 20mm: 15 deg rotation is 2.62mm, 2620 micron (pi * 20mm / (360deg/15deg)) - For every M units accumulated, send one `REL_WHEEL` event The problem here is that we've now hardcoded 20mm/15 deg into the kernel and we have no way of getting the size of the wheel or the click angle into the kernel. In userspace we now have to undo the kernel's calculation. If our click angle is e.g. 20 degree we have to undo the (lossy) calculation from the kernel and calculate the correct angle instead. This also means the 15 is a hardcoded option forever and cannot be changed. In hid-logitech-hidpp.c, the microns per unit is hardcoded per device. Harry, did you measure those by hand? We'd need to update the kernel for every device and there are 10 years worth of devices from MS alone. The multiplier default is 8 which is in the right ballpark, so I'm pretty sure this is the same as the Resolution Multiplier, just in HID++ lingo. And given that the 120 magic factor is what Windows uses in the end, I can't imagine Logitech rolling their own thing here. Nestor? And we're already fairly inaccurate with the microns anyway. The MX Anywhere 2S has a click angle of 20 degrees (18 stops) and a 17mm wheel, so a wheel notch is approximately 2.67mm, one event at multiplier 8 (1/8 of a notch) would be 334 micron. That's only 80% of the fallback value of 406 in the kernel. Multiplier 6 gives us 445micron (10% off). I'm assuming multiplier 7 doesn't exist because it's not a factor of 120. Summary: Best option may be to simply do what Windows is doing, all the HW manufacturers have to use that approach after all. Switch `REL_WHEEL_HI_RES` to report in fractions of 120, with 120 being one notch and divide that by the multiplier for the actual events. So e.g. the Logitech multiplier 8 would send value 15 for each event in hi-res mode. This can be converted in userspace to whatever userspace needs (combined with a hwdb there that tells you wheel size/click angle/...). Conflicts: include/uapi/linux/input-event-codes.h -> I kept the new reserved event in the code, so I had to adapt the revert slightly Signed-off-by: Benjamin Tissoires Acked-by: Harry Cutts Acked-by: Dmitry Torokhov Acked-by: Jiri Kosina commit f1539a0c2545d7bd82e451bd1464f2a820f55de4 Author: Benjamin Tissoires Date: Wed Nov 21 16:27:11 2018 +0100 Revert "HID: input: Create a utility class for counting scroll events" This reverts commit 1ff2e1a44e02d4bdbb9be67c7d9acc240a67141f. It turns out the current API is not that compatible with some Microsoft mice, so better start again from scratch. Signed-off-by: Benjamin Tissoires Acked-by: Harry Cutts Acked-by: Dmitry Torokhov Acked-by: Jiri Kosina commit 00acc9e2c4a55045d73f2615429742369996d801 Author: Benjamin Tissoires Date: Wed Nov 21 16:27:10 2018 +0100 Revert "HID: logitech: Add function to enable HID++ 1.0 "scrolling acceleration"" This reverts commit 051dc9b0579602bd63e9df74d0879b5293e71581. It turns out the current API is not that compatible with some Microsoft mice, so better start again from scratch. Signed-off-by: Benjamin Tissoires Acked-by: Harry Cutts Acked-by: Dmitry Torokhov Acked-by: Jiri Kosina commit 5372fc3797691065b8318f0cc9ab8695cebb17e1 Author: Benjamin Tissoires Date: Wed Nov 21 16:27:09 2018 +0100 Revert "HID: logitech: Enable high-resolution scrolling on Logitech mice" This reverts commit d56ca9855bf924f3bc9807a3e42f38539df3f41f. It turns out the current API is not that compatible with some Microsoft mice, so better start again from scratch. Signed-off-by: Benjamin Tissoires Acked-by: Harry Cutts Acked-by: Dmitry Torokhov Acked-by: Jiri Kosina commit a69616d5b3e13f18cdec1c759818aec87866ac0c Author: Benjamin Tissoires Date: Wed Nov 21 16:27:08 2018 +0100 Revert "HID: logitech: Use LDJ_DEVICE macro for existing Logitech mice" This reverts commit 3fe1d6bbcd16f384d2c7dab2caf8e4b2df9ea7e6. It turns out the current API is not that compatible with some Microsoft mice, so better start again from scratch. Signed-off-by: Benjamin Tissoires Acked-by: Harry Cutts Acked-by: Dmitry Torokhov Acked-by: Jiri Kosina commit d0341efe7449860e1bbfdd282b3b7f0c34309222 Author: Benjamin Tissoires Date: Wed Nov 21 16:27:07 2018 +0100 Revert "HID: logitech: fix a used uninitialized GCC warning" This reverts commit 5fe2ccbef9d7aecf5c4402c753444f1a12096cfd. It turns out the current API is not that compatible with some Microsoft mice, so better start again from scratch. Signed-off-by: Benjamin Tissoires Acked-by: Harry Cutts Acked-by: Dmitry Torokhov Acked-by: Jiri Kosina commit e2b95b27196cc90f37016d79432fb2af3f9c9291 Author: Benjamin Tissoires Date: Wed Nov 21 16:27:06 2018 +0100 Revert "HID: input: simplify/fix high-res scroll event handling" This reverts commit 044ee890286153a1aefb40cb8b6659921aecb38b. It turns out the current API is not that compatible with some Microsoft mice, so better start again from scratch. Signed-off-by: Benjamin Tissoires Acked-by: Harry Cutts Acked-by: Dmitry Torokhov Acked-by: Jiri Kosina commit bf21c6e455539a495ce6d2877da2f9e364a89062 Author: YueHaibing Date: Thu Nov 22 03:41:07 2018 +0000 opp: ti-opp-supply: 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: Viresh Kumar commit 8cf6f361eb76bf7fca85bde15a0a9316fa124c0c Merge: 1d74f133252f a5d0f4565996 Author: Dave Airlie Date: Thu Nov 22 11:19:20 2018 +1000 Merge branch 'drm-fixes-4.20' of git://people.freedesktop.org/~agd5f/linux into drm-fixes - OD fixes for powerplay - Vega20 fixes - KFD fix for Kaveri - add missing firmware declaration for hainan (SI chip) - Fix DC user experience regressions related to panels that support >8 bpc Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20181121163647.2847-1-alexander.deucher@amd.com commit 1d74f133252fab157b9bcd4c710cee7ffcdd01c1 Merge: 7989b9ee8baf 8fd3b90300be Author: Dave Airlie Date: Thu Nov 22 11:17:46 2018 +1000 Merge tag 'drm-misc-fixes-2018-11-21' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes - vc4: Fix NULL deref in async path (Boris) - vc4: Avoid taking async path for cursor updates when impossible (Boris) - udmabuf: Fix mmap with PROT_WRITE (Gerd) - fb-helper: Don't use writeback connectors for fbdev (Paul) Cc: Boris Brezillon Cc: Gerd Hoffmann Cc: Paul Kocialkowski Signed-off-by: Dave Airlie From: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20181121155248.GA241511@art_vandelay commit 7989b9ee8bafe5cc625381dd0c3c4586de27ca26 Author: Y.C. Chen Date: Tue Oct 30 11:34:46 2018 +0800 drm/ast: fixed cursor may disappear sometimes Signed-off-by: Y.C. Chen Cc: Reviewed-by: Dave Airlie Signed-off-by: Dave Airlie commit 426a593e641ebf0d9288f0a2fcab644a86820220 Author: Vincent Chen Date: Wed Nov 21 09:38:11 2018 +0800 net: faraday: ftmac100: remove netif_running(netdev) check before disabling interrupts In the original ftmac100_interrupt(), the interrupts are only disabled when the condition "netif_running(netdev)" is true. However, this condition causes kerenl hang in the following case. When the user requests to disable the network device, kernel will clear the bit __LINK_STATE_START from the dev->state and then call the driver's ndo_stop function. Network device interrupts are not blocked during this process. If an interrupt occurs between clearing __LINK_STATE_START and stopping network device, kernel cannot disable the interrupts due to the condition "netif_running(netdev)" in the ISR. Hence, kernel will hang due to the continuous interruption of the network device. In order to solve the above problem, the interrupts of the network device should always be disabled in the ISR without being restricted by the condition "netif_running(netdev)". [V2] Remove unnecessary curly braces. Signed-off-by: Vincent Chen Signed-off-by: David S. Miller commit 1a37bd823891568f8721989aed0615835632d81a Author: Y.C. Chen Date: Wed Oct 3 14:57:47 2018 +0800 drm/ast: change resolution may cause screen blurred The value of pitches is not correct while calling mode_set. The issue we found so far on following system: - Debian8 with XFCE Desktop - Ubuntu with KDE Desktop - SUSE15 with KDE Desktop Signed-off-by: Y.C. Chen Cc: Tested-by: Jean Delvare Reviewed-by: Jean Delvare Signed-off-by: Dave Airlie commit 395048ebd4547d3cced71807b8aabfbde000fe55 Merge: 1e2b1046b53f e438bae43c1e Author: David S. Miller Date: Wed Nov 21 16:14:56 2018 -0800 Merge branch 'smc-fixes' Ursula Braun says: ==================== net/smc: fixes 2018-11-12 here is V4 of some net/smc fixes in different areas for the net tree. v1->v2: do not define 8-byte alignment for union smcd_cdc_cursor in patch 4/5 "net/smc: atomic SMCD cursor handling" v2->v3: stay with 8-byte alignment for union smcd_cdc_cursor in patch 4/5 "net/smc: atomic SMCD cursor handling", but get rid of __packed for struct smcd_cdc_msg v3->v4: get rid of another __packed for struct smc_cdc_msg in patch 4/5 "net/smc: atomic SMCD cursor handling" ==================== Signed-off-by: David S. Miller commit e438bae43c1e08e688c09c410407b59fc1c173b4 Author: Ursula Braun Date: Tue Nov 20 16:46:43 2018 +0100 net/smc: use after free fix in smc_wr_tx_put_slot() In smc_wr_tx_put_slot() field pend->idx is used after being cleared. That means always idx 0 is cleared in the wr_tx_mask. This results in a broken administration of available WR send payload buffers. Signed-off-by: Ursula Braun Signed-off-by: David S. Miller commit b9a22dd9811dbcddb5623c499e5b736400059df6 Author: Ursula Braun Date: Tue Nov 20 16:46:42 2018 +0100 net/smc: atomic SMCD cursor handling Running uperf tests with SMCD on LPARs results in corrupted cursors. SMCD cursors should be treated atomically to fix cursor corruption. Signed-off-by: Ursula Braun Signed-off-by: David S. Miller commit 0512f69e388c963dbe955d4bd9ae0f7d88d2dc54 Author: Hans Wippel Date: Tue Nov 20 16:46:41 2018 +0100 net/smc: add SMC-D shutdown signal When a SMC-D link group is freed, a shutdown signal should be sent to the peer to indicate that the link group is invalid. This patch adds the shutdown signal to the SMC code. Signed-off-by: Hans Wippel Signed-off-by: Ursula Braun Signed-off-by: David S. Miller commit ee05ff7af26509f39360534a5225ee714416cdfd Author: Karsten Graul Date: Tue Nov 20 16:46:40 2018 +0100 net/smc: use queue pair number when matching link group When searching for an existing link group the queue pair number is also to be taken into consideration. When the SMC server sends a new number in a CLC packet (keeping all other values equal) then a new link group is to be created on the SMC client side. Signed-off-by: Karsten Graul Signed-off-by: Ursula Braun Signed-off-by: David S. Miller commit f07920ad9c6f5781c90ac4915f8254d999d8c1cc Author: Hans Wippel Date: Tue Nov 20 16:46:39 2018 +0100 net/smc: abort CLC connection in smc_release In case of a non-blocking SMC socket, the initial CLC handshake is performed over a blocking TCP connection in a worker. If the SMC socket is released, smc_release has to wait for the blocking CLC socket operations (e.g., kernel_connect) inside the worker. This patch aborts a CLC connection when the respective non-blocking SMC socket is released to avoid waiting on socket operations or timeouts. Signed-off-by: Hans Wippel Signed-off-by: Ursula Braun Signed-off-by: David S. Miller commit 1e2b1046b53f356e663fd145d0c57bea04a0343a Merge: 86de5921a3d5 1770f0fa978e Author: David S. Miller Date: Wed Nov 21 15:51:16 2018 -0800 Merge tag 'wireless-drivers-for-davem-2018-11-20' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers Kalle Valo says: ==================== wireless-drivers fixes for 4.20 First set of fixes for 4.20, this time we have quite a few them but all very small. ath9k * fix a locking regression found by a static checker wlcore * fix a crash which was a regression with wakeirq handling brcm80211 * yet another fix for 160 MHz channel handling mt76 * fix a longstaning build problem when CONFIG_LEDS_CLASS is disabled * don't use uninitialised mutex iwlwifi * do note that the iwlwifi merge tag (commit 4ec321c14693) seems to contain wrong list of changes so ignore that * fix ACPI data handling, a memory leak and other smaller fixes ath10k * fix a crash during suspend which was a recent regression ==================== Signed-off-by: David S. Miller commit 86de5921a3d5dd246df661e09bdd0a6131b39ae3 Author: Eric Dumazet Date: Tue Nov 20 05:53:59 2018 -0800 tcp: defer SACK compression after DupThresh Jean-Louis reported a TCP regression and bisected to recent SACK compression. After a loss episode (receiver not able to keep up and dropping packets because its backlog is full), linux TCP stack is sending a single SACK (DUPACK). Sender waits a full RTO timer before recovering losses. While RFC 6675 says in section 5, "Algorithm Details", (2) If DupAcks < DupThresh but IsLost (HighACK + 1) returns true -- indicating at least three segments have arrived above the current cumulative acknowledgment point, which is taken to indicate loss -- go to step (4). ... (4) Invoke fast retransmit and enter loss recovery as follows: there are old TCP stacks not implementing this strategy, and still counting the dupacks before starting fast retransmit. While these stacks probably perform poorly when receivers implement LRO/GRO, we should be a little more gentle to them. This patch makes sure we do not enable SACK compression unless 3 dupacks have been sent since last rcv_nxt update. Ideally we should even rearm the timer to send one or two more DUPACK if no more packets are coming, but that will be work aiming for linux-4.21. Many thanks to Jean-Louis for bisecting the issue, providing packet captures and testing this patch. Fixes: 5d9f4262b7ea ("tcp: add SACK compression") Reported-by: Jean-Louis Dupond Tested-by: Jean-Louis Dupond Signed-off-by: Eric Dumazet Acked-by: Neal Cardwell Signed-off-by: David S. Miller commit dde7011a824cfa815b03f853ec985ff46b740939 Author: Jakub Kicinski Date: Wed Nov 21 13:53:17 2018 -0800 tools: bpftool: fix potential NULL pointer dereference in do_load This patch fixes a possible null pointer dereference in do_load, detected by the semantic patch deref_null.cocci, with the following warning: ./tools/bpf/bpftool/prog.c:1021:23-25: ERROR: map_replace is NULL but dereferenced. The following code has potential null pointer references: 881 map_replace = reallocarray(map_replace, old_map_fds + 1, 882 sizeof(*map_replace)); 883 if (!map_replace) { 884 p_err("mem alloc failed"); 885 goto err_free_reuse_maps; 886 } ... 1019 err_free_reuse_maps: 1020 for (i = 0; i < old_map_fds; i++) 1021 close(map_replace[i].fd); 1022 free(map_replace); Fixes: 3ff5a4dc5d89 ("tools: bpftool: allow reuse of maps with bpftool prog load") Co-developed-by: Wen Yang Signed-off-by: Wen Yang Signed-off-by: Jakub Kicinski Signed-off-by: Daniel Borkmann commit b5dd186d10ba59e6b5ba60e42b3b083df56df6f3 Author: Petr Machata Date: Tue Nov 20 11:39:56 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. Fixes: 6bc506b4fb06 ("bridge: switchdev: Add forward mark support for stacked devices") Fixes: abf4bb6b63d0 ("skbuff: Add the offload_mr_fwd_mark field") Signed-off-by: Petr Machata Suggested-by: Ido Schimmel Acked-by: Jiri Pirko Signed-off-by: David S. Miller commit 24c3456c8d5ee6fc1933ca40f7b4406130682668 Author: Sagi Grimberg Date: Wed Nov 14 10:17:01 2018 -0800 iser: set sector for ambiguous mr status errors If for some reason we failed to query the mr status, we need to make sure to provide sufficient information for an ambiguous error (guard error on sector 0). Fixes: 0a7a08ad6f5f ("IB/iser: Implement check_protection") Cc: Reported-by: Dan Carpenter Signed-off-by: Sagi Grimberg Signed-off-by: Jason Gunthorpe commit 4f32fb921b153ae9ea280e02a3e91509fffc03d3 Author: Kamal Heib Date: Thu Nov 15 09:49:38 2018 -0800 RDMA/rdmavt: Fix rvt_create_ah function signature rdmavt uses a crazy system that looses the type checking when assinging functions to struct ib_device function pointers. Because of this the signature to this function was not changed when the below commit revised things. Fix the signature so we are not calling a function pointer with a mismatched signature. Fixes: 477864c8fcd9 ("IB/core: Let create_ah return extended response to user") Signed-off-by: Kamal Heib Reviewed-by: Dennis Dalessandro Signed-off-by: Jason Gunthorpe commit db7a691a1551a748cb92d9c89c6b190ea87e28d5 Author: Michael Guralnik Date: Wed Nov 21 15:03:54 2018 +0200 IB/mlx5: Avoid load failure due to unknown link width If the firmware reports a connection width that is not 1x, 4x, 8x or 12x it causes the driver to fail during initialization. To prevent this failure every time a new width is introduced to the RDMA stack, we will set a default 4x width for these widths which ar unknown to the driver. This is needed to allow to run old kernels with new firmware. Cc: # 4.1 Fixes: 1b5daf11b015 ("IB/mlx5: Avoid using the MAD_IFC command under ISSI > 0 mode") Signed-off-by: Michael Guralnik Reviewed-by: Majd Dibbiny Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 13f8d9c16693afb908ead3d2a758adbe6a79eccd Author: Yonatan Cohen Date: Wed Nov 21 13:48:39 2018 +0200 IB/mlx5: Fix XRC QP support after introducing extended atomic Extended atomics are supported with RC and XRC QP types, but the commit citied in the Fixes line added an unneeded check to to_mlx5_access_flags. This broke XRC QPs. The following ib_atomic_bw invocation over XRC reproduces the issue: ib_atomic_bw -d mlx5_1 --connection=XRC --atomic_type=FETCH_AND_ADD It is safe to remove such checks because the QP type was already checked in ib_modify_qp_is_ok(), which was previously called from mlx5_ib_modify_qp. Fixes: a60109dc9a95 ("IB/mlx5: Add support for extended atomic operations") Signed-off-by: Yonatan Cohen Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit a6c66d6a08b88cc10aca9d3f65cfae31e7652a99 Author: Selvin Xavier Date: Wed Nov 21 00:05:01 2018 -0800 RDMA/bnxt_re: Avoid accessing the device structure after it is freed When bnxt_re_ib_reg returns failure, the device structure gets freed. Driver tries to access the device pointer after it is freed. [ 4871.034744] Failed to register with netedev: 0xffffffa1 [ 4871.034765] infiniband (null): Failed to register with IB: 0xffffffea [ 4871.046430] ================================================================== [ 4871.046437] BUG: KASAN: use-after-free in bnxt_re_task+0x63/0x180 [bnxt_re] [ 4871.046439] Write of size 4 at addr ffff880fa8406f48 by task kworker/u48:2/17813 [ 4871.046443] CPU: 20 PID: 17813 Comm: kworker/u48:2 Kdump: loaded Tainted: G B OE 4.20.0-rc1+ #42 [ 4871.046444] Hardware name: Dell Inc. PowerEdge R730/0599V5, BIOS 1.0.4 08/28/2014 [ 4871.046447] Workqueue: bnxt_re bnxt_re_task [bnxt_re] [ 4871.046449] Call Trace: [ 4871.046454] dump_stack+0x91/0xeb [ 4871.046458] print_address_description+0x6a/0x2a0 [ 4871.046461] kasan_report+0x176/0x2d0 [ 4871.046463] ? bnxt_re_task+0x63/0x180 [bnxt_re] [ 4871.046466] bnxt_re_task+0x63/0x180 [bnxt_re] [ 4871.046470] process_one_work+0x216/0x5b0 [ 4871.046471] ? process_one_work+0x189/0x5b0 [ 4871.046475] worker_thread+0x4e/0x3d0 [ 4871.046479] kthread+0x10e/0x140 [ 4871.046480] ? process_one_work+0x5b0/0x5b0 [ 4871.046482] ? kthread_stop+0x220/0x220 [ 4871.046486] ret_from_fork+0x3a/0x50 [ 4871.046492] The buggy address belongs to the page: [ 4871.046494] page:ffffea003ea10180 count:0 mapcount:0 mapping:0000000000000000 index:0x0 [ 4871.046495] flags: 0x57ffffc0000000() [ 4871.046498] raw: 0057ffffc0000000 0000000000000000 ffffea003ea10188 0000000000000000 [ 4871.046500] raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 [ 4871.046501] page dumped because: kasan: bad access detected Avoid accessing the device structure once it is freed. Fixes: 497158aa5f52 ("RDMA/bnxt_re: Fix the ib_reg failure cleanup") Signed-off-by: Selvin Xavier Signed-off-by: Jason Gunthorpe commit 3c4b1419c33c2417836a63f8126834ee36968321 Author: Selvin Xavier Date: Wed Nov 21 00:05:00 2018 -0800 RDMA/bnxt_re: Fix system hang when registration with L2 driver fails Driver doesn't release rtnl lock if registration with L2 driver (bnxt_re_register_netdev) fais and this causes hang while requesting for the next lock. [ 371.635416] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [ 371.635417] kworker/u48:1 D 0 634 2 0x80000000 [ 371.635423] Workqueue: bnxt_re bnxt_re_task [bnxt_re] [ 371.635424] Call Trace: [ 371.635426] ? __schedule+0x36b/0xbd0 [ 371.635429] schedule+0x39/0x90 [ 371.635430] schedule_preempt_disabled+0x11/0x20 [ 371.635431] __mutex_lock+0x45b/0x9c0 [ 371.635433] ? __mutex_lock+0x16d/0x9c0 [ 371.635435] ? bnxt_re_ib_reg+0x2b/0xb30 [bnxt_re] [ 371.635438] ? wake_up_klogd+0x37/0x40 [ 371.635442] bnxt_re_ib_reg+0x2b/0xb30 [bnxt_re] [ 371.635447] bnxt_re_task+0xfd/0x180 [bnxt_re] [ 371.635449] process_one_work+0x216/0x5b0 [ 371.635450] ? process_one_work+0x189/0x5b0 [ 371.635453] worker_thread+0x4e/0x3d0 [ 371.635455] kthread+0x10e/0x140 [ 371.635456] ? process_one_work+0x5b0/0x5b0 [ 371.635458] ? kthread_stop+0x220/0x220 [ 371.635460] ret_from_fork+0x3a/0x50 [ 371.635477] INFO: task NetworkManager:1228 blocked for more than 120 seconds. [ 371.635478] Tainted: G B OE 4.20.0-rc1+ #42 [ 371.635479] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. Release the rtnl_lock correctly in the failure path. Fixes: de5c95d0f518 ("RDMA/bnxt_re: Fix system crash during RDMA resource initialization") Signed-off-by: Selvin Xavier Signed-off-by: Jason Gunthorpe commit d52ef88a9f4be523425730da3239cf87bee936da Author: Parav Pandit Date: Mon Nov 19 09:58:24 2018 +0200 RDMA/core: Add GIDs while changing MAC addr only for registered ndev Currently when MAC address is changed, regardless of the netdev reg_state, GID entries are removed and added to reflect the new MAC address and new default GID entries. When a bonding device is used and the underlying PCI device is removed several netdevice events are generated. Two events of the interest are CHANGEADDR and UNREGISTER event on lower(slave) netdevice of the bond netdevice. Sometimes CHANGEADDR event is generated when netdev state is UNREGISTERING (after UNREGISTER event is generated). In this scenario, GID entries for default GIDs are added and never deleted because GID entries are deleted only when netdev state is < UNREGISTERED. This leads to non zero reference count on the netdevice. Due to this, PCI device unbind operation is getting stuck. To avoid it, when changing mac address, add GID entries only if netdev is in REGISTERED state. Fixes: 03db3a2d81e6 ("IB/core: Add RoCE GID table management") Signed-off-by: Parav Pandit Reviewed-by: Mark Bloch Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 074fca3a18e7e1e0d4d7dcc9d7badc43b90232f4 Author: Majd Dibbiny Date: Mon Nov 5 08:07:37 2018 +0200 RDMA/mlx5: Fix fence type for IB_WR_LOCAL_INV WR Currently, for IB_WR_LOCAL_INV WR, when the next fence is None, the current fence will be SMALL instead of Normal Fence. Without this patch krping doesn't work on CX-5 devices and throws following error: The error messages are from CX5 driver are: (from server side) [ 710.434014] mlx5_0:dump_cqe:278:(pid 2712): dump error cqe [ 710.434016] 00000000 00000000 00000000 00000000 [ 710.434016] 00000000 00000000 00000000 00000000 [ 710.434017] 00000000 00000000 00000000 00000000 [ 710.434018] 00000000 93003204 100000b8 000524d2 [ 710.434019] krping: cq completion failed with wr_id 0 status 4 opcode 128 vender_err 32 Fixed the logic to set the correct fence type. Fixes: 6e8484c5cf07 ("RDMA/mlx5: set UMR wqe fence according to HCA cap") Signed-off-by: Majd Dibbiny Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 04ac4b0ed412f65230b456fcd9aa07e13befff89 Author: Lyude Paul Date: Mon Nov 19 19:44:55 2018 +0000 drm/amd/dm: Understand why attaching path/tile properties are needed Path property is used for userspace to know what MST connector goes to what actual DRM DisplayPort connector, the tiling property is for tiling configurations. Not sure what else there is to figure out. Signed-off-by: Lyude Paul Reviewed-by: Jerry (Fangzhi) Zuo Cc: Stable Signed-off-by: Alex Deucher commit c9e0ab86b2e03154bb898cd2f851827783224727 Author: Lyude Paul Date: Mon Nov 19 15:00:10 2018 +0000 drm/amd/dm: Don't forget to attach MST encoders The change fixed huge delay in SST daisy chain and S3 soft hang observed in 4.19 kernel rebase. Regression point in drm: drm/fb-helper: Eliminate the .best_encoder() usage The aux sequence is altered due to the failure in drm_connector_for_each_possible_encoder(). The failure is caused by missing attached encoder in the process of adding MST connector.   drm_dp_send_enum_path_resources() aux transaction is pushed after mode probe, which causes conflict to drm_dp_mst_i2c_xfer(), leading to the transaction timeout. Signed-off-by: Lyude Paul Reviewed-by: Jerry (Fangzhi) Zuo Cc: Stable Signed-off-by: Alex Deucher commit 92b419289ceecdd1eae03114928913f298b84327 Merge: c8ce94b8fe53 5d8f81ba1da5 Author: Linus Torvalds Date: Wed Nov 21 11:28:20 2018 -0800 Merge tag 'riscv-for-linus-4.20-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/palmer/riscv-linux Pull RISC-V fixes from Palmer Dabbelt: "This week is a bit bigger than I expected. That's my fault, as I missed a few patches while I was at Plumbers last week. We have: - A fix to a quite embarassing issue where raw_copy_to_user() was implemented with asm_copy_from_user() (and vice versa). - Improvements to our makefile to allow flat binaries to be generated. - A build fix that predeclares "struct module" at the top of , which triggers warnings later in that header. - The addition of our own header, which is necessary to align our stat ABI on 32-bit systems. - A fix to avoid printing a warning when the S or U bits are set in print_isa(). I already have one patch in the queue for next week" * tag 'riscv-for-linus-4.20-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/palmer/riscv-linux: RISC-V: recognize S/U mode bits in print_isa riscv: add asm/unistd.h UAPI header riscv: fix warning in arch/riscv/include/asm/module.h RISC-V: Build flat and compressed kernel images RISC-V: Fix raw_copy_{to,from}_user() commit 6b04114f6fae5e84d33404c2970b1949c032546e Author: Alexey Brodkin Date: Tue Nov 20 13:30:19 2018 +0300 arc: [devboards] Add support of NFSv3 ACL By default NFSv3 doesn't support ACL (Access Control Lists) which might be quite convenient to have so that mounted NFS behaves exactly as any other local file-system. In particular missing support of ACL makes umask useless. This among other thigs fixes Glibc's "nptl/tst-umask1". Signed-off-by: Alexey Brodkin Cc: Cupertino Miranda Cc: stable@vger.kernel.org #4.14+ Signed-off-by: Vineet Gupta commit c50cbd85cd7027d32ac5945bb60217936b4f7eaf Author: Dmitry V. Levin Date: Wed Nov 21 22:14:39 2018 +0300 mips: fix mips_get_syscall_arg o32 check When checking for TIF_32BIT_REGS flag, mips_get_syscall_arg() should use the task specified as its argument instead of the current task. This potentially affects all syscall_get_arguments() users who specify tasks different from the current. Fixes: c0ff3c53d4f99 ("MIPS: Enable HAVE_ARCH_TRACEHOOK.") Signed-off-by: Dmitry V. Levin Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/21185/ Cc: Elvira Khabirova Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Cc: stable@vger.kernel.org # v3.13+ commit 8c110d43c6bca4b24dd13272a9d4e0ba6f2ec957 Author: Dave Chinner Date: Wed Nov 21 08:06:37 2018 -0800 iomap: readpages doesn't zero page tail beyond EOF When we read the EOF page of the file via readpages, we need to zero the region beyond EOF that we either do not read or should not contain data so that mmap does not expose stale data to user applications. However, iomap_adjust_read_range() fails to detect EOF correctly, and so fsx on 1k block size filesystems fails very quickly with mapreads exposing data beyond EOF. There are two problems here. Firstly, when calculating the end block of the EOF byte, we have to round the size by one to avoid a block aligned EOF from reporting a block too large. i.e. a size of 1024 bytes is 1 block, which in index terms is block 0. Therefore we have to calculate the end block from (isize - 1), not isize. The second bug is determining if the current page spans EOF, and so whether we need split it into two half, one for the IO, and the other for zeroing. Unfortunately, the code that checks whether we should split the block doesn't actually check if we span EOF, it just checks if the read spans the /offset in the page/ that EOF sits on. So it splits every read into two if EOF is not page aligned, regardless of whether we are reading the EOF block or not. Hence we need to restrict the "does the read span EOF" check to just the page that spans EOF, not every page we read. This patch results in correct EOF detection through readpages: xfs_vm_readpages: dev 259:0 ino 0x43 nr_pages 24 xfs_iomap_found: dev 259:0 ino 0x43 size 0x66c00 offset 0x4f000 count 98304 type hole startoff 0x13c startblock 1368 blockcount 0x4 iomap_readpage_actor: orig pos 323584 pos 323584, length 4096, poff 0 plen 4096, isize 420864 xfs_iomap_found: dev 259:0 ino 0x43 size 0x66c00 offset 0x50000 count 94208 type hole startoff 0x140 startblock 1497 blockcount 0x5c iomap_readpage_actor: orig pos 327680 pos 327680, length 94208, poff 0 plen 4096, isize 420864 iomap_readpage_actor: orig pos 331776 pos 331776, length 90112, poff 0 plen 4096, isize 420864 iomap_readpage_actor: orig pos 335872 pos 335872, length 86016, poff 0 plen 4096, isize 420864 iomap_readpage_actor: orig pos 339968 pos 339968, length 81920, poff 0 plen 4096, isize 420864 iomap_readpage_actor: orig pos 344064 pos 344064, length 77824, poff 0 plen 4096, isize 420864 iomap_readpage_actor: orig pos 348160 pos 348160, length 73728, poff 0 plen 4096, isize 420864 iomap_readpage_actor: orig pos 352256 pos 352256, length 69632, poff 0 plen 4096, isize 420864 iomap_readpage_actor: orig pos 356352 pos 356352, length 65536, poff 0 plen 4096, isize 420864 iomap_readpage_actor: orig pos 360448 pos 360448, length 61440, poff 0 plen 4096, isize 420864 iomap_readpage_actor: orig pos 364544 pos 364544, length 57344, poff 0 plen 4096, isize 420864 iomap_readpage_actor: orig pos 368640 pos 368640, length 53248, poff 0 plen 4096, isize 420864 iomap_readpage_actor: orig pos 372736 pos 372736, length 49152, poff 0 plen 4096, isize 420864 iomap_readpage_actor: orig pos 376832 pos 376832, length 45056, poff 0 plen 4096, isize 420864 iomap_readpage_actor: orig pos 380928 pos 380928, length 40960, poff 0 plen 4096, isize 420864 iomap_readpage_actor: orig pos 385024 pos 385024, length 36864, poff 0 plen 4096, isize 420864 iomap_readpage_actor: orig pos 389120 pos 389120, length 32768, poff 0 plen 4096, isize 420864 iomap_readpage_actor: orig pos 393216 pos 393216, length 28672, poff 0 plen 4096, isize 420864 iomap_readpage_actor: orig pos 397312 pos 397312, length 24576, poff 0 plen 4096, isize 420864 iomap_readpage_actor: orig pos 401408 pos 401408, length 20480, poff 0 plen 4096, isize 420864 iomap_readpage_actor: orig pos 405504 pos 405504, length 16384, poff 0 plen 4096, isize 420864 iomap_readpage_actor: orig pos 409600 pos 409600, length 12288, poff 0 plen 4096, isize 420864 iomap_readpage_actor: orig pos 413696 pos 413696, length 8192, poff 0 plen 4096, isize 420864 iomap_readpage_actor: orig pos 417792 pos 417792, length 4096, poff 0 plen 3072, isize 420864 iomap_readpage_actor: orig pos 420864 pos 420864, length 1024, poff 3072 plen 1024, isize 420864 As you can see, it now does full page reads until the last one which is split correctly at the block aligned EOF, reading 3072 bytes and zeroing the last 1024 bytes. The original version of the patch got this right, but it got another case wrong. The EOF detection crossing really needs to the the original length as plen, while it starts at the end of the block, will be shortened as up-to-date blocks are found on the page. This means "orig_pos + plen" no longer points to the end of the page, and so will not correctly detect EOF crossing. Hence we have to use the length passed in to detect this partial page case: xfs_filemap_fault: dev 259:1 ino 0x43 write_fault 0 xfs_vm_readpage: dev 259:1 ino 0x43 nr_pages 1 xfs_iomap_found: dev 259:1 ino 0x43 size 0x2cc00 offset 0x2c000 count 4096 type hole startoff 0xb0 startblock 282 blockcount 0x4 iomap_readpage_actor: orig pos 180224 pos 181248, length 4096, poff 1024 plen 2048, isize 183296 xfs_iomap_found: dev 259:1 ino 0x43 size 0x2cc00 offset 0x2cc00 count 1024 type hole startoff 0xb3 startblock 285 blockcount 0x1 iomap_readpage_actor: orig pos 183296 pos 183296, length 1024, poff 3072 plen 1024, isize 183296 Heere we see a trace where the first block on the EOF page is up to date, hence poff = 1024 bytes. The offset into the page of EOF is 3072, so the range we want to read is 1024 - 3071, and the range we want to zero is 3072 - 4095. You can see this is split correctly now. This fixes the stale data beyond EOF problem that fsx quickly uncovers on 1k block size filesystems. Signed-off-by: Dave Chinner Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 494633fac7896afc2bce6f83fe7319946270540b Author: Dave Chinner Date: Mon Nov 19 13:31:12 2018 -0800 vfs: vfs_dedupe_file_range() doesn't return EOPNOTSUPP It returns EINVAL when the operation is not supported by the filesystem. Fix it to return EOPNOTSUPP to be consistent with the man page and clone_file_range(). Clean up the inconsistent error return handling while I'm there. (I know, lipstick on a pig, but every little bit helps...) Signed-off-by: Dave Chinner Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 4721a6010990971440b4ffefbdf014976b8eda2f Author: Dave Chinner Date: Mon Nov 19 13:31:11 2018 -0800 iomap: dio data corruption and spurious errors when pipes fill When doing direct IO to a pipe for do_splice_direct(), then pipe is trivial to fill up and overflow as it can only hold 16 pages. At this point bio_iov_iter_get_pages() then returns -EFAULT, and we abort the IO submission process. Unfortunately, iomap_dio_rw() propagates the error back up the stack. The error is converted from the EFAULT to EAGAIN in generic_file_splice_read() to tell the splice layers that the pipe is full. do_splice_direct() completely fails to handle EAGAIN errors (it aborts on error) and returns EAGAIN to the caller. copy_file_write() then completely fails to handle EAGAIN as well, and so returns EAGAIN to userspace, having failed to copy the data it was asked to. Avoid this whole steaming pile of fail by having iomap_dio_rw() silently swallow EFAULT errors and so do short reads. To make matters worse, iomap_dio_actor() has a stale data exposure bug bio_iov_iter_get_pages() fails - it does not zero the tail block that it may have been left uncovered by partial IO. Fix the error handling case to drop to the sub-block zeroing rather than immmediately returning the -EFAULT error. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Signed-off-by: Darrick J. Wong commit b450672fb66b4a991a5b55ee24209ac7ae7690ce Author: Dave Chinner Date: Mon Nov 19 13:31:10 2018 -0800 iomap: sub-block dio needs to zeroout beyond EOF If we are doing sub-block dio that extends EOF, we need to zero the unused tail of the block to initialise the data in it it. If we do not zero the tail of the block, then an immediate mmap read of the EOF block will expose stale data beyond EOF to userspace. Found with fsx running sub-block DIO sizes vs MAPREAD/MAPWRITE operations. Fix this by detecting if the end of the DIO write is beyond EOF and zeroing the tail if necessary. Signed-off-by: Dave Chinner Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 0929d8580071c6a1cec1a7916a8f674c243ceee1 Author: Dave Chinner Date: Mon Nov 19 13:31:10 2018 -0800 iomap: FUA is wrong for DIO O_DSYNC writes into unwritten extents When we write into an unwritten extent via direct IO, we dirty metadata on IO completion to convert the unwritten extent to written. However, when we do the FUA optimisation checks, the inode may be clean and so we issue a FUA write into the unwritten extent. This means we then bypass the generic_write_sync() call after unwritten extent conversion has ben done and we don't force the modified metadata to stable storage. This violates O_DSYNC semantics. The window of exposure is a single IO, as the next DIO write will see the inode has dirty metadata and hence will not use the FUA optimisation. Calling generic_write_sync() after completion of the second IO will also sync the first write and it's metadata. Fix this by avoiding the FUA optimisation when writing to unwritten extents. Signed-off-by: Dave Chinner Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 9230a0b65b47fe6856c4468ec0175c4987e5bede Author: Dave Chinner Date: Mon Nov 19 22:50:08 2018 -0800 xfs: delalloc -> unwritten COW fork allocation can go wrong Long saga. There have been days spent following this through dead end after dead end in multi-GB event traces. This morning, after writing a trace-cmd wrapper that enabled me to be more selective about XFS trace points, I discovered that I could get just enough essential tracepoints enabled that there was a 50:50 chance the fsx config would fail at ~115k ops. If it didn't fail at op 115547, I stopped fsx at op 115548 anyway. That gave me two traces - one where the problem manifested, and one where it didn't. After refining the traces to have the necessary information, I found that in the failing case there was a real extent in the COW fork compared to an unwritten extent in the working case. Walking back through the two traces to the point where the CWO fork extents actually diverged, I found that the bad case had an extra unwritten extent in it. This is likely because the bug it led me to had triggered multiple times in those 115k ops, leaving stray COW extents around. What I saw was a COW delalloc conversion to an unwritten extent (as they should always be through xfs_iomap_write_allocate()) resulted in a /written extent/: xfs_writepage: dev 259:0 ino 0x83 pgoff 0x17000 size 0x79a00 offset 0 length 0 xfs_iext_remove: dev 259:0 ino 0x83 state RC|LF|RF|COW cur 0xffff888247b899c0/2 offset 32 block 152 count 20 flag 1 caller xfs_bmap_add_extent_delay_real xfs_bmap_pre_update: dev 259:0 ino 0x83 state RC|LF|RF|COW cur 0xffff888247b899c0/1 offset 1 block 4503599627239429 count 31 flag 0 caller xfs_bmap_add_extent_delay_real xfs_bmap_post_update: dev 259:0 ino 0x83 state RC|LF|RF|COW cur 0xffff888247b899c0/1 offset 1 block 121 count 51 flag 0 caller xfs_bmap_add_ex Basically, Cow fork before: 0 1 32 52 +H+DDDDDDDDDDDD+UUUUUUUUUUU+ PREV RIGHT COW delalloc conversion allocates: 1 32 +uuuuuuuuuuuu+ NEW And the result according to the xfs_bmap_post_update trace was: 0 1 32 52 +H+wwwwwwwwwwwwwwwwwwwwwwww+ PREV Which is clearly wrong - it should be a merged unwritten extent, not an unwritten extent. That lead me to look at the LEFT_FILLING|RIGHT_FILLING|RIGHT_CONTIG case in xfs_bmap_add_extent_delay_real(), and sure enough, there's the bug. It takes the old delalloc extent (PREV) and adds the length of the RIGHT extent to it, takes the start block from NEW, removes the RIGHT extent and then updates PREV with the new extent. What it fails to do is update PREV.br_state. For delalloc, this is always XFS_EXT_NORM, while in this case we are converting the delayed allocation to unwritten, so it needs to be updated to XFS_EXT_UNWRITTEN. This LF|RF|RC case does not do this, and so the resultant extent is always written. And that's the bug I've been chasing for a week - a bmap btree bug, not a reflink/dedupe/copy_file_range bug, but a BMBT bug introduced with the recent in core extent tree scalability enhancements. Signed-off-by: Dave Chinner Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 2c307174ab77e34645e75e12827646e044d273c3 Author: Dave Chinner Date: Mon Nov 19 13:31:10 2018 -0800 xfs: flush removing page cache in xfs_reflink_remap_prep On a sub-page block size filesystem, fsx is failing with a data corruption after a series of operations involving copying a file with the destination offset beyond EOF of the destination of the file: 8093(157 mod 256): TRUNCATE DOWN from 0x7a120 to 0x50000 ******WWWW 8094(158 mod 256): INSERT 0x25000 thru 0x25fff (0x1000 bytes) 8095(159 mod 256): COPY 0x18000 thru 0x1afff (0x3000 bytes) to 0x2f400 8096(160 mod 256): WRITE 0x5da00 thru 0x651ff (0x7800 bytes) HOLE 8097(161 mod 256): COPY 0x2000 thru 0x5fff (0x4000 bytes) to 0x6fc00 The second copy here is beyond EOF, and it is to sub-page (4k) but block aligned (1k) offset. The clone runs the EOF zeroing, landing in a pre-existing post-eof delalloc extent. This zeroes the post-eof extents in the page cache just fine, dirtying the pages correctly. The problem is that xfs_reflink_remap_prep() now truncates the page cache over the range that it is copying it to, and rounds that down to cover the entire start page. This removes the dirty page over the delalloc extent from the page cache without having written it back. Hence later, when the page cache is flushed, the page at offset 0x6f000 has not been written back and hence exposes stale data, which fsx trips over less than 10 operations later. Fix this by changing xfs_reflink_remap_prep() to use xfs_flush_unmap_range(). Signed-off-by: Dave Chinner Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit cb216b84d6ea24fa10f1e7aac35de77246841041 Author: Robin Murphy Date: Wed Nov 21 16:00:51 2018 +0000 swiotlb: Skip cache maintenance on map error If swiotlb_bounce_page() failed, calling arch_sync_dma_for_device() may lead to such delights as performing cache maintenance on whatever address phys_to_virt(SWIOTLB_MAP_ERROR) looks like, which is typically outside the kernel memory map and goes about as well as expected. Don't do that. Fixes: a4a4330db46a ("swiotlb: add support for non-coherent DMA") Tested-by: John Stultz Signed-off-by: Robin Murphy Signed-off-by: Christoph Hellwig commit b34087157dd76e8d96e5e52808134a791ac61e57 Author: Robin Murphy Date: Wed Nov 21 16:00:50 2018 +0000 dma-direct: Make DIRECT_MAPPING_ERROR viable for SWIOTLB With the overflow buffer removed, we no longer have a unique address which is guaranteed not to be a valid DMA target to use as an error token. The DIRECT_MAPPING_ERROR value of 0 tries to at least represent an unlikely DMA target, but unfortunately there are already SWIOTLB users with DMA-able memory at physical address 0 which now gets falsely treated as a mapping failure and leads to all manner of misbehaviour. The best we can do to mitigate that is flip DIRECT_MAPPING_ERROR to the other commonly-used error value of all-bits-set, since the last single byte of memory is by far the least-likely-valid DMA target. Fixes: dff8d6c1ed58 ("swiotlb: remove the overflow buffer") Reported-by: John Stultz Tested-by: John Stultz Acked-by: Konrad Rzeszutek Wilk Signed-off-by: Robin Murphy Signed-off-by: Christoph Hellwig commit a4390aee72713d9e73f1132bcdeb17d72fbbf974 Author: Robbie Ko Date: Wed Nov 14 18:32:37 2018 +0000 Btrfs: send, fix infinite loop due to directory rename dependencies When doing an incremental send, due to the need of delaying directory move (rename) operations we can end up in infinite loop at apply_children_dir_moves(). An example scenario that triggers this problem is described below, where directory names correspond to the numbers of their respective inodes. Parent snapshot: . |--- 261/ |--- 271/ |--- 266/ |--- 259/ |--- 260/ | |--- 267 | |--- 264/ | |--- 258/ | |--- 257/ | |--- 265/ |--- 268/ |--- 269/ | |--- 262/ | |--- 270/ |--- 272/ | |--- 263/ | |--- 275/ | |--- 274/ |--- 273/ Send snapshot: . |-- 275/ |-- 274/ |-- 273/ |-- 262/ |-- 269/ |-- 258/ |-- 271/ |-- 268/ |-- 267/ |-- 270/ |-- 259/ | |-- 265/ | |-- 272/ |-- 257/ |-- 260/ |-- 264/ |-- 263/ |-- 261/ |-- 266/ When processing inode 257 we delay its move (rename) operation because its new parent in the send snapshot, inode 272, was not yet processed. Then when processing inode 272, we delay the move operation for that inode because inode 274 is its ancestor in the send snapshot. Finally we delay the move operation for inode 274 when processing it because inode 275 is its new parent in the send snapshot and was not yet moved. When finishing processing inode 275, we start to do the move operations that were previously delayed (at apply_children_dir_moves()), resulting in the following iterations: 1) We issue the move operation for inode 274; 2) Because inode 262 depended on the move operation of inode 274 (it was delayed because 274 is its ancestor in the send snapshot), we issue the move operation for inode 262; 3) We issue the move operation for inode 272, because it was delayed by inode 274 too (ancestor of 272 in the send snapshot); 4) We issue the move operation for inode 269 (it was delayed by 262); 5) We issue the move operation for inode 257 (it was delayed by 272); 6) We issue the move operation for inode 260 (it was delayed by 272); 7) We issue the move operation for inode 258 (it was delayed by 269); 8) We issue the move operation for inode 264 (it was delayed by 257); 9) We issue the move operation for inode 271 (it was delayed by 258); 10) We issue the move operation for inode 263 (it was delayed by 264); 11) We issue the move operation for inode 268 (it was delayed by 271); 12) We verify if we can issue the move operation for inode 270 (it was delayed by 271). We detect a path loop in the current state, because inode 267 needs to be moved first before we can issue the move operation for inode 270. So we delay again the move operation for inode 270, this time we will attempt to do it after inode 267 is moved; 13) We issue the move operation for inode 261 (it was delayed by 263); 14) We verify if we can issue the move operation for inode 266 (it was delayed by 263). We detect a path loop in the current state, because inode 270 needs to be moved first before we can issue the move operation for inode 266. So we delay again the move operation for inode 266, this time we will attempt to do it after inode 270 is moved (its move operation was delayed in step 12); 15) We issue the move operation for inode 267 (it was delayed by 268); 16) We verify if we can issue the move operation for inode 266 (it was delayed by 270). We detect a path loop in the current state, because inode 270 needs to be moved first before we can issue the move operation for inode 266. So we delay again the move operation for inode 266, this time we will attempt to do it after inode 270 is moved (its move operation was delayed in step 12). So here we added again the same delayed move operation that we added in step 14; 17) We attempt again to see if we can issue the move operation for inode 266, and as in step 16, we realize we can not due to a path loop in the current state due to a dependency on inode 270. Again we delay inode's 266 rename to happen after inode's 270 move operation, adding the same dependency to the empty stack that we did in steps 14 and 16. The next iteration will pick the same move dependency on the stack (the only entry) and realize again there is still a path loop and then again the same dependency to the stack, over and over, resulting in an infinite loop. So fix this by preventing adding the same move dependency entries to the stack by removing each pending move record from the red black tree of pending moves. This way the next call to get_pending_dir_moves() will not return anything for the current parent inode. A test case for fstests, with this reproducer, follows soon. Signed-off-by: Robbie Ko Reviewed-by: Filipe Manana [Wrote changelog with example and more clear explanation] Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit b1a9d7b0190119dad5b9b7841751b5a7586bbc8b Merge: 2a5bf23d5b79 a4243e149453 Author: Ingo Molnar Date: Wed Nov 21 15:57:21 2018 +0100 Merge tag 'perf-urgent-for-mingo-4.20-20181121' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent Pull perf/urgent fixes: - Update kernel ABI headers, one of them lead to a small change in the ioctl 'cmd' beautifier in 'perf trace' to support the new ISO7816 commands. (Arnaldo Carvalho de Melo) - Restore proper cwd on return from mnt namespace (Jiri Olsa) - Add feature check for the get_current_dir_name() function used in the namespace fix from Jiri, that is not available in systems such as Alpine Linux, which uses the musl libc (Arnaldo Carvalho de Melo) - Fix crash in 'perf record' when synthesizing the unit for events such as 'cpu-clock' (Jiri Olsa) Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit 14b04063cc994effc86f976625bf8f806d8d44cb Merge: 8dc765d438f1 4cff280a5fcc Author: Jens Axboe Date: Wed Nov 21 05:56:28 2018 -0700 Merge branch 'nvme-4.20' of git://git.infradead.org/nvme into for-linus Pull NVMe fix from Christoph. * 'nvme-4.20' of git://git.infradead.org/nvme: nvme-fc: resolve io failures during connect commit 0db699f747cc24835af77a34852882a33b3e1fc6 Merge: 9ff01193a20d dbc4ca339c8d Author: Rafael J. Wysocki Date: Wed Nov 21 13:33:06 2018 +0100 Merge tag 'linux-cpupower-4.20-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux Pull cpupower utility updates for 4.20-rc4 from Shuah Khan: "This cpupower update for Linux 4.20-rc4 consists of compile fixes to allow use of outside build flags and override of CFLAGS from Jiri Olsa, and fix to compilation with STATIC=true from Konstantin Khlebnikov." * tag 'linux-cpupower-4.20-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux: tools cpupower: Override CFLAGS assignments tools cpupower debug: Allow to use outside build flags tools/power/cpupower: fix compilation with STATIC=true commit f559156c399cfb11d53a128d210118fbea36816e 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 (cherry picked from commit f43348a3db89305bb1935da9fe4499fdcdde9796) Signed-off-by: Joonas Lahtinen commit c773058dde9a4f919a8069f3828d9f4adb1fce1e 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 (cherry picked from commit fa6af5145b4e87a30a530be0d80734a9dd40da77) Signed-off-by: Joonas Lahtinen commit 2bbb5fa37475d7aa5fa62f34db1623f3da2dfdfa Author: Hans de Goede Date: Mon Nov 19 19:06:01 2018 +0100 ACPI / platform: Add SMB0001 HID to forbidden_id_list Many HP AMD based laptops contain an SMB0001 device like this: Device (SMBD) { Name (_HID, "SMB0001") // _HID: Hardware ID Name (_CRS, ResourceTemplate () // _CRS: Current Resource Settings { IO (Decode16, 0x0B20, // Range Minimum 0x0B20, // Range Maximum 0x20, // Alignment 0x20, // Length ) IRQ (Level, ActiveLow, Shared, ) {7} }) } The legacy style IRQ resource here causes acpi_dev_get_irqresource() to be called with legacy=true and this message to show in dmesg: ACPI: IRQ 7 override to edge, high This causes issues when later on the AMD0030 GPIO device gets enumerated: Device (GPIO) { Name (_HID, "AMDI0030") // _HID: Hardware ID Name (_CID, "AMDI0030") // _CID: Compatible ID Name (_UID, Zero) // _UID: Unique ID Method (_CRS, 0, NotSerialized) // _CRS: Current Resource Settings { Name (RBUF, ResourceTemplate () { Interrupt (ResourceConsumer, Level, ActiveLow, Shared, ,, ) { 0x00000007, } Memory32Fixed (ReadWrite, 0xFED81500, // Address Base 0x00000400, // Address Length ) }) Return (RBUF) /* \_SB_.GPIO._CRS.RBUF */ } } Now acpi_dev_get_irqresource() gets called with legacy=false, but because of the earlier override of the trigger-type acpi_register_gsi() returns -EBUSY (because we try to register the same interrupt with a different trigger-type) and we end up setting IORESOURCE_DISABLED in the flags. The setting of IORESOURCE_DISABLED causes platform_get_irq() to call acpi_irq_get() which is not implemented on x86 and returns -EINVAL. resulting in the following in dmesg: amd_gpio AMDI0030:00: Failed to get gpio IRQ: -22 amd_gpio: probe of AMDI0030:00 failed with error -22 The SMB0001 is a "virtual" device in the sense that the only way the OS interacts with it is through calling a couple of methods to do SMBus transfers. As such it is weird that it has IO and IRQ resources at all, because the driver for it is not expected to ever access the hardware directly. The Linux driver for the SMB0001 device directly binds to the acpi_device through the acpi_bus, so we do not need to instantiate a platform_device for this ACPI device. This commit adds the SMB0001 HID to the forbidden_id_list, avoiding the instantiating of a platform_device for it. Not instantiating a platform_device means we will no longer call acpi_dev_get_irqresource() for the legacy IRQ resource fixing the probe of the AMDI0030 device failing. BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1644013 BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=198715 BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=199523 Reported-by: Lukas Kahnert Tested-by: Marc Cc: All applicable Signed-off-by: Hans de Goede Signed-off-by: Rafael J. Wysocki commit 4ab7ca092c3c7ac8b16aa28eba723a8868f82f14 Author: Romain Izard Date: Tue Nov 20 17:57:37 2018 +0100 ARM: dts: at91: sama5d2: use the divided clock for SMC The SAMA5D2 is different from SAMA5D3 and SAMA5D4, as there are two different clocks for the peripherals in the SoC. The Static Memory controller is connected to the divided master clock. Unfortunately, the device tree does not correctly show this and uses the master clock directly. This clock is then used by the code for the NAND controller to calculate the timings for the controller, and we end up with slow NAND Flash access. Fix the device tree, and the performance of Flash access is improved. Signed-off-by: Romain Izard Signed-off-by: Alexandre Belloni commit 155b8a0492a90a4c6e22f046a3568b92a6bc48da Author: Amir Goldstein Date: Mon Nov 5 07:50:10 2018 +0200 ovl: fix decode of dir file handle with multi lower layers When decoding a lower file handle, we first call ovl_check_origin_fh() with connected=false to get any real lower dentry for overlay inode cache lookup. If the real dentry is a disconnected dir dentry, ovl_check_origin_fh() is called again with connected=true to get a connected real dentry and find the lower layer the real dentry belongs to. If the first call returned a connected real dentry, we use it to lookup an overlay connected dentry, but the first ovl_check_origin_fh() call with connected=false did not check that the found dentry is under the root of the layer (see ovl_acceptable()), it only checked that the found dentry super block matches the uuid of the lower file handle. In case there are multiple lower layers on the same fs and the found dentry is not from the top most lower layer, using the layer index returned from the first ovl_check_origin_fh() is wrong and we end up failing to decode the file handle. Fix this by always calling ovl_check_origin_fh() with connected=true if we got a directory dentry in the first call. Fixes: 8b58924ad55c ("ovl: lookup in inode cache first when decoding...") Cc: # v4.17 Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi commit 8fd3b90300bec541806dac271de2fd44e2e4e2d2 Author: Paul Kocialkowski Date: Thu Nov 15 17:32:48 2018 +0100 drm/fb-helper: Blacklist writeback when adding connectors to fbdev Writeback connectors do not produce any on-screen output and require special care for use. Such connectors are hidden from enumeration in DRM resources by default, but they are still picked-up by fbdev. This makes rather little sense since fbdev is not really adapted for dealing with writeback. Moreover, this is also a source of issues when userspace disables the CRTC (and associated plane) without detaching the CRTC from the connector (which is hidden by default). In this case, the connector is still using the CRTC, leading to am "enabled/connectors mismatch" and eventually the failure of the associated atomic commit. This situation happens with VC4 testing under IGT GPU Tools. Filter out writeback connectors in the fbdev helper to solve this. Signed-off-by: Paul Kocialkowski Reviewed-by: Boris Brezillon Reviewed-by: Maxime Ripard Tested-by: Maxime Ripard Fixes: 935774cd71fe ("drm: Add writeback connector type") Cc: # v4.19+ Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20181115163248.21168-1-paul.kocialkowski@bootlin.com commit 7513edbc096a006f967eaf39088091442e623b83 Author: Chris Wilson Date: Tue Nov 20 20:24:38 2018 +0000 drm/i915/gvt: Avoid use-after-free iterating the gtt list Found by smatch: drivers/gpu/drm/i915/gvt/gtt.c:2452 intel_vgpu_destroy_ggtt_mm() error: dereferencing freed memory 'pos' Signed-off-by: Chris Wilson Cc: Zhenyu Wang Reviewed-by: Zhenyu Wang Signed-off-by: Zhenyu Wang commit b181b3b801da8893c8eb706e448dd5111b02de60 Author: Stephen Boyd Date: Mon Nov 5 11:40:11 2018 -0800 clk: qcom: Support 'protected-clocks' property Certain firmware configurations "protect" clks and cause the entire system to reboot when a non-secure OS such as Linux tries to read or write protected clk registers. But other firmware configurations allow reading or writing the same registers, and they may actually require that the OS use the otherwise locked down clks. Support the 'protected-clocks' property by never registering these protected clks with the common clk framework. This way, when firmware is protecting these clks we won't have the chance to ever read or write these registers and take down the entire system. Cc: Taniya Das Cc: Bjorn Andersson Signed-off-by: Stephen Boyd Reviewed-by: Bjorn Andersson Signed-off-by: Stephen Boyd commit 48d7f160b10711f014bf07b574c73452646c9fdd Author: Stephen Boyd Date: Mon Nov 5 11:40:10 2018 -0800 dt-bindings: clk: Introduce 'protected-clocks' property Add a generic clk property for clks which are not intended to be used by the OS due to security restrictions put in place by firmware. For example, on some Qualcomm firmwares reading or writing certain clk registers causes the entire system to reboot, but on other firmwares reading and writing those same registers is required to make devices like QSPI work. Rather than adding one-off properties each time a new set of clks appears to be protected, let's add a generic clk property to describe any set of clks that shouldn't be touched by the OS. This way we never need to register the clks or use them in certain firmware configurations. Cc: Rob Herring Cc: Bjorn Andersson Cc: Taniya Das Signed-off-by: Stephen Boyd Reviewed-by: Bjorn Andersson Reviewed-by: Rob Herring Signed-off-by: Stephen Boyd commit c88520db18ba0b9a41326c3b8680e7c09eb4c381 Author: Manu Gautam Date: Tue Oct 16 12:52:07 2018 +0530 phy: qcom-qusb2: Fix HSTX_TRIM tuning with fused value for SDM845 Tune1 register on sdm845 is used to update HSTX_TRIM with fused setting. Enable same by specifying update_tune1_with_efuse flag for sdm845, otherwise driver ends up programming tune2 register. Fixes: ef17f6e212ca ("phy: qcom-qusb2: Add QUSB2 PHYs support for sdm845") Signed-off-by: Manu Gautam Reviewed-by: Douglas Anderson Reviewed-by: Stephen Boyd Acked-by: Vivek Gautam Signed-off-by: Kishon Vijay Abraham I commit 6e34d358b24ffc40764eb3681164c79091765429 Author: Manu Gautam Date: Tue Oct 16 12:52:06 2018 +0530 phy: qcom-qusb2: Use HSTX_TRIM fused value as is Fix HSTX_TRIM tuning logic which instead of using fused value as HSTX_TRIM, incorrectly performs bitwise OR operation with existing default value. Fixes: ca04d9d3e1b1 ("phy: qcom-qusb2: New driver for QUSB2 PHY on Qcom chips") Signed-off-by: Manu Gautam Reviewed-by: Douglas Anderson Reviewed-by: Stephen Boyd Acked-by: Vivek Gautam Signed-off-by: Kishon Vijay Abraham I commit f8577fb3c273bcae821a5254c8fbcf82016d9a8d 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 (cherry picked from commit 7fa28e146994da1e8a4124623d7da97b798ea520) Signed-off-by: Joonas Lahtinen commit f2cbd485282014132851bf37cb2ca624a456275d Author: Davide Caratti Date: Tue Nov 20 22:18:44 2018 +0100 net/sched: act_police: fix race condition on state variables after 'police' configuration parameters were converted to use RCU instead of spinlock, the state variables used to compute the traffic rate (namely 'tcfp_toks', 'tcfp_ptoks' and 'tcfp_t_c') are erroneously read/updated in the traffic path without any protection. Use a dedicated spinlock to avoid race conditions on these variables, and ensure proper cache-line alignment. In this way, 'police' is still faster than what we observed when 'tcf_lock' was used in the traffic path _ i.e. reverting commit 2d550dbad83c ("net/sched: act_police: don't use spinlock in the data path"). Moreover, we preserve the throughput improvement that was obtained after 'police' started using per-cpu counters, when 'avrate' is used instead of 'rate'. Changes since v1 (thanks to Eric Dumazet): - call ktime_get_ns() before acquiring the lock in the traffic path - use a dedicated spinlock instead of tcf_lock - improve cache-line usage Fixes: 2d550dbad83c ("net/sched: act_police: don't use spinlock in the data path") Reported-and-suggested-by: Eric Dumazet Signed-off-by: Davide Caratti Reviewed-by: Eric Dumazet commit c8ce94b8fe5324aca4c10baeb53dea2d5775a170 Merge: 06e68fed3282 1229ace4a4a2 Author: Linus Torvalds Date: Tue Nov 20 14:31:00 2018 -0800 Merge tag 'mips_fixes_4.20_3' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux Pull MIPS fixes from Paul Burton: "A few MIPS fixes for 4.20: - Re-enable the Cavium Octeon USB driver in its defconfig after it was accidentally removed back in 4.14. - Have early memblock allocations be performed bottom-up to more closely match the behaviour we used to have with bootmem, which seems a safer choice since we've seen fallout from the change made in the 4.20 merge window. - Simplify max_low_pfn calculation in the NUMA code for the Loongson3 and SGI IP27 platforms to both clean up the code & ensure max_low_pfn has been set appropriately before it is used" * tag 'mips_fixes_4.20_3' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux: MIPS: Loongson3,SGI-IP27: Simplify max_low_pfn calculation MIPS: Let early memblock_alloc*() allocate memories bottom-up MIPS: OCTEON: cavium_octeon_defconfig: re-enable OCTEON USB driver commit b1d982330134bbba371821bc850da6fa4bfa3271 Author: Heiner Kallweit Date: Tue Nov 20 21:22:50 2018 +0100 MAINTAINERS: add myself as co-maintainer for r8169 Meanwhile I know the driver quite well and I refactored bigger parts of it. As a result people contact me already with r8169 questions. Therefore I'd volunteer to become co-maintainer of the driver also officially. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit a5d0f4565996e5595a10cb57b3d1e3d74379c502 Author: Kenneth Feng Date: Mon Nov 19 14:49:16 2018 +0800 drm/amdgpu: Enable HDP memory light sleep Due to the register name and setting change of HDP memory light sleep on Vega20,change accordingly in the driver. Signed-off-by: Kenneth Feng Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit 7f9f71be84bcab368e58020a42f6d0dd97adf0ce Author: Dave Chinner Date: Mon Nov 19 13:31:09 2018 -0800 xfs: extent shifting doesn't fully invalidate page cache The extent shifting code uses a flush and invalidate mechainsm prior to shifting extents around. This is similar to what xfs_free_file_space() does, but it doesn't take into account things like page cache vs block size differences, and it will fail if there is a page that it currently busy. xfs_flush_unmap_range() handles all of these cases, so just convert xfs_prepare_shift() to us that mechanism rather than having it's own special sauce. Signed-off-by: Dave Chinner Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit c08768977b9a65cab9bcfd1ba30ffb686b2b7c69 Author: Dave Chinner Date: Mon Nov 19 13:31:08 2018 -0800 xfs: finobt AG reserves don't consider last AG can be a runt The last AG may be very small comapred to all other AGs, and hence AG reservations based on the superblock AG size may actually consume more space than the AG actually has. This results on assert failures like: XFS: Assertion failed: xfs_perag_resv(pag, XFS_AG_RESV_METADATA)->ar_reserved + xfs_perag_resv(pag, XFS_AG_RESV_RMAPBT)->ar_reserved <= pag->pagf_freeblks + pag->pagf_flcount, file: fs/xfs/libxfs/xfs_ag_resv.c, line: 319 [ 48.932891] xfs_ag_resv_init+0x1bd/0x1d0 [ 48.933853] xfs_fs_reserve_ag_blocks+0x37/0xb0 [ 48.934939] xfs_mountfs+0x5b3/0x920 [ 48.935804] xfs_fs_fill_super+0x462/0x640 [ 48.936784] ? xfs_test_remount_options+0x60/0x60 [ 48.937908] mount_bdev+0x178/0x1b0 [ 48.938751] mount_fs+0x36/0x170 [ 48.939533] vfs_kern_mount.part.43+0x54/0x130 [ 48.940596] do_mount+0x20e/0xcb0 [ 48.941396] ? memdup_user+0x3e/0x70 [ 48.942249] ksys_mount+0xba/0xd0 [ 48.943046] __x64_sys_mount+0x21/0x30 [ 48.943953] do_syscall_64+0x54/0x170 [ 48.944835] entry_SYSCALL_64_after_hwframe+0x49/0xbe Hence we need to ensure the finobt per-ag space reservations take into account the size of the last AG rather than treat it like all the other full size AGs. Note that both refcountbt and rmapbt already take the size of the AG into account via reading the AGF length directly. Signed-off-by: Dave Chinner Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit d43aaf1685aa471f0593685c9f54d53e3af3cf3f Author: Dave Chinner Date: Mon Nov 19 13:31:08 2018 -0800 xfs: fix transient reference count error in xfs_buf_resubmit_failed_buffers When retrying a failed inode or dquot buffer, xfs_buf_resubmit_failed_buffers() clears all the failed flags from the inde/dquot log items. In doing so, it also drops all the reference counts on the buffer that the failed log items hold. This means it can drop all the active references on the buffer and hence free the buffer before it queues it for write again. Putting the buffer on the delwri queue takes a reference to the buffer (so that it hangs around until it has been written and completed), but this goes bang if the buffer has already been freed. Hence we need to add the buffer to the delwri queue before we remove the failed flags from the log items attached to the buffer to ensure it always remains referenced during the resubmit process. Reported-by: Josef Bacik Signed-off-by: Dave Chinner Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit d61fa8cbf3da85ffca6620f261354941c126ee23 Author: Dave Chinner Date: Mon Nov 19 13:31:07 2018 -0800 xfs: uncached buffer tracing needs to print bno Useless: xfs_buf_get_uncached: dev 253:32 bno 0xffffffffffffffff nblks 0x1 ... xfs_buf_unlock: dev 253:32 bno 0xffffffffffffffff nblks 0x1 ... xfs_buf_submit: dev 253:32 bno 0xffffffffffffffff nblks 0x1 ... xfs_buf_hold: dev 253:32 bno 0xffffffffffffffff nblks 0x1 ... xfs_buf_iowait: dev 253:32 bno 0xffffffffffffffff nblks 0x1 ... xfs_buf_iodone: dev 253:32 bno 0xffffffffffffffff nblks 0x1 ... xfs_buf_iowait_done: dev 253:32 bno 0xffffffffffffffff nblks 0x1 ... xfs_buf_rele: dev 253:32 bno 0xffffffffffffffff nblks 0x1 ... Useful: xfs_buf_get_uncached: dev 253:32 bno 0xffffffffffffffff nblks 0x1 ... xfs_buf_unlock: dev 253:32 bno 0xffffffffffffffff nblks 0x1 ... xfs_buf_submit: dev 253:32 bno 0x200b5 nblks 0x1 ... xfs_buf_hold: dev 253:32 bno 0x200b5 nblks 0x1 ... xfs_buf_iowait: dev 253:32 bno 0x200b5 nblks 0x1 ... xfs_buf_iodone: dev 253:32 bno 0x200b5 nblks 0x1 ... xfs_buf_iowait_done: dev 253:32 bno 0x200b5 nblks 0x1 ... xfs_buf_rele: dev 253:32 bno 0x200b5 nblks 0x1 ... Signed-off-by: Dave Chinner Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit cadf9df27e7cf40e390e060a1c71bb86ecde798b Author: Stephen Mallon Date: Tue Nov 20 19:15:02 2018 +1100 tcp: Fix SOF_TIMESTAMPING_RX_HARDWARE to use the latest timestamp during TCP coalescing During tcp coalescing ensure that the skb hardware timestamp refers to the highest sequence number data. Previously only the software timestamp was updated during coalescing. Signed-off-by: Stephen Mallon Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit 59663e42199c93d1d7314d1446f6782fc4b1eb81 Author: Siva Reddy Kallam Date: Tue Nov 20 10:04:04 2018 +0530 tg3: Add PHY reset for 5717/5719/5720 in change ring and flow control paths This patch has the fix to avoid PHY lockup with 5717/5719/5720 in change ring and flow control paths. This patch solves the RX hang while doing continuous ring or flow control parameters with heavy traffic from peer. Signed-off-by: Siva Reddy Kallam Acked-by: Michael Chan Signed-off-by: David S. Miller commit 22566c1603030f0a036ad564634b064ad1a55db2 Author: Artem Savkov Date: Tue Nov 20 11:52:16 2018 -0600 objtool: Fix segfault in .cold detection with -ffunction-sections Because find_symbol_by_name() traverses the same lists as read_symbols(), changing sym->name in place without copying it affects the result of find_symbol_by_name(). In the case where a ".cold" function precedes its parent in sec->symbol_list, it can result in a function being considered a parent of itself. This leads to function length being set to 0 and other consequent side-effects including a segfault in add_switch_table(). The effects of this bug are only visible when building with -ffunction-sections in KCFLAGS. Fix by copying the search string instead of modifying it in place. Signed-off-by: Artem Savkov Signed-off-by: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: 13810435b9a7 ("objtool: Support GCC 8's cold subfunctions") Link: http://lkml.kernel.org/r/910abd6b5a4945130fd44f787c24e07b9e07c8da.1542736240.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar commit 0b9301fb632f7111a3293a30cc5b20f1b82ed08d Author: Artem Savkov Date: Tue Nov 20 11:52:15 2018 -0600 objtool: Fix double-free in .cold detection error path If read_symbols() fails during second list traversal (the one dealing with ".cold" subfunctions) it frees the symbol, but never deletes it from the list/hash_table resulting in symbol being freed again in elf_close(). Fix it by just returning an error, leaving cleanup to elf_close(). Signed-off-by: Artem Savkov Signed-off-by: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: 13810435b9a7 ("objtool: Support GCC 8's cold subfunctions") Link: http://lkml.kernel.org/r/beac5a9b7da9e8be90223459dcbe07766ae437dd.1542736240.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar commit 2a5bf23d5b795d5df33dc284e8f5cf8b6a5b4042 Author: Peter Zijlstra Date: Tue Nov 20 18:08:42 2018 +0100 perf/x86/intel: Fix regression by default disabling perfmon v4 interrupt handling Kyle Huey reported that 'rr', a replay debugger, broke due to the following commit: af3bdb991a5c ("perf/x86/intel: Add a separate Arch Perfmon v4 PMI handler") Rework the 'disable_counter_freezing' __setup() parameter such that we can explicitly enable/disable it and switch to default disabled. To this purpose, rename the parameter to "perf_v4_pmi=" which is a much better description and allows requiring a bool argument. [ mingo: Improved the changelog some more. ] Reported-by: Kyle Huey Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Kan Liang Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Robert O'Callahan Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Cc: acme@kernel.org Link: http://lkml.kernel.org/r/20181120170842.GZ2131@hirez.programming.kicks-ass.net Signed-off-by: Ingo Molnar commit cb3b2ffb757e75fef40fb94bc093cbbf49a6bf6e Author: Hans Verkuil Date: Sat Nov 17 06:25:08 2018 -0500 media: vicodec: fix memchr() kernel oops The size passed to memchr is too large as it assumes the search starts at the start of the buffer, but it can start at an offset. Cc: # for v4.19 and up Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 0408b205f1ae60c1b99c9888ac0326543d96a091 Author: Hans Verkuil Date: Thu Nov 15 02:49:24 2018 -0500 media: cedrus: add action item to the TODO Mention that the request validation should increment the memory refcount of reference buffers so we don't forget to do this. Acked-by: Paul Kocialkowski Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit f44e361e37eb074df2e2ca204ef31c834ce44af8 Author: Jernej Skrabec Date: Sun Nov 11 06:06:21 2018 -0500 media: media-request: Add compat ioctl Currently media request ioctl operations fail on 64-bit kernel with 32-bit userspace due to missing .compat_ioctl callback. Because no ioctl command uses any argument, just reuse existing ioctl handler for compat_ioctl too. Signed-off-by: Jernej Skrabec Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 4212368750cf94623f5b382293625dbb3d8d041a Author: Jasmin Jessich Date: Fri Nov 9 16:06:05 2018 -0500 media: Use wait_queue_head_t for media_request The portable type for a wait queue is wait_queue_head_t. Signed-off-by: Jasmin Jessich Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 544b03da39e2d7b4961d3163976ed4bfb1fac509 Author: Will Deacon Date: Mon Nov 19 11:07:18 2018 +0000 Documentation/security-bugs: Postpone fix publication in exceptional cases At the request of the reporter, the Linux kernel security team offers to postpone the publishing of a fix for up to 5 business days from the date of a report. While it is generally undesirable to keep a fix private after it has been developed, this short window is intended to allow distributions to package the fix into their kernel builds and permits early inclusion of the security team in the case of a co-ordinated disclosure with other parties. Unfortunately, discussions with major Linux distributions and cloud providers has revealed that 5 business days is not sufficient to achieve either of these two goals. As an example, cloud providers need to roll out KVM security fixes to a global fleet of hosts with sufficient early ramp-up and monitoring. An end-to-end timeline of less than two weeks dramatically cuts into the amount of early validation and increases the chance of guest-visible regressions. The consequence of this timeline mismatch is that security issues are commonly fixed without the involvement of the Linux kernel security team and are instead analysed and addressed by an ad-hoc group of developers across companies contributing to Linux. In some cases, mainline (and therefore the official stable kernels) can be left to languish for extended periods of time. This undermines the Linux kernel security process and puts upstream developers in a difficult position should they find themselves involved with an undisclosed security problem that they are unable to report due to restrictions from their employer. To accommodate the needs of these users of the Linux kernel and encourage them to engage with the Linux security team when security issues are first uncovered, extend the maximum period for which fixes may be delayed to 7 calendar days, or 14 calendar days in exceptional cases, where the logistics of QA and large scale rollouts specifically need to be accommodated. This brings parity with the linux-distros@ maximum embargo period of 14 calendar days. Cc: Paolo Bonzini Cc: David Woodhouse Cc: Amit Shah Cc: Laura Abbott Acked-by: Kees Cook Co-developed-by: Thomas Gleixner Co-developed-by: David Woodhouse Signed-off-by: Thomas Gleixner Signed-off-by: David Woodhouse Signed-off-by: Will Deacon Reviewed-by: Tyler Hicks Acked-by: Peter Zijlstra Signed-off-by: Greg Kroah-Hartman commit cb5d21946d2a2f4687c482ab4604af1d29dac35a Author: Greg Kroah-Hartman Date: Thu Nov 15 15:03:24 2018 -0800 MAINTAINERS: Add Sasha as a stable branch maintainer Sasha has somehow been convinced into helping me with the stable kernel maintenance. Codify this slip in good judgement before he realizes what he really signed up for :) Signed-off-by: Greg Kroah-Hartman Acked-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman commit a3e620f8422832afd832ad5e20aa97d0c72bada8 Author: Keyon Jie Date: Fri Nov 16 18:47:04 2018 -0600 ASoC: acpi: fix: continue searching when machine is ignored The machine_quirk may return NULL which means the acpi entries should be skipped and search for next matched entry is needed, here add return check here and continue for NULL case. Signed-off-by: Keyon Jie Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown commit 8c4e7c2ee8096b5ca8214418f287b3878d578cc0 Author: Pierre-Louis Bossart Date: Sun Nov 18 16:38:09 2018 -0600 ASoC: Intel: Skylake: fix Kconfigs, make HDaudio codec optional The Skylake driver currently has a set of problems supporting load/unload modules. We need to make the HDaudio codec support optional to help narrow down the issues. Support for HDaudio codecs also leads to a Kconfig issue. We want the hdac_hda codec to be compilable independently of Skylake (e.g. with ALL_CODECS) but when Skylake is selected as built-in the hdac_hda codec needs to use the same option due a a code dependency Solve both problems by adding a user-selectable boolean Kconfig, select HDAC_HDA as needed and make the HDaudio codec support in the Skylake driver optional. Tests on a Chell Chromebook device without HDaudio show no regression for speaker and HDMI playback. This is submitted as an RFC to allow for comments and more validation. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown commit 68239654acafe6aad5a3c1dc7237e60accfebc03 Author: Sebastian Andrzej Siewior Date: Tue Nov 20 11:26:35 2018 +0100 x86/fpu: Disable bottom halves while loading FPU registers The sequence fpu->initialized = 1; /* step A */ preempt_disable(); /* step B */ fpu__restore(fpu); preempt_enable(); in __fpu__restore_sig() is racy in regard to a context switch. For 32bit frames, __fpu__restore_sig() prepares the FPU state within fpu->state. To ensure that a context switch (switch_fpu_prepare() in particular) does not modify fpu->state it uses fpu__drop() which sets fpu->initialized to 0. After fpu->initialized is cleared, the CPU's FPU state is not saved to fpu->state during a context switch. The new state is loaded via fpu__restore(). It gets loaded into fpu->state from userland and ensured it is sane. fpu->initialized is then set to 1 in order to avoid fpu__initialize() doing anything (overwrite the new state) which is part of fpu__restore(). A context switch between step A and B above would save CPU's current FPU registers to fpu->state and overwrite the newly prepared state. This looks like a tiny race window but the Kernel Test Robot reported this back in 2016 while we had lazy FPU support. Borislav Petkov made the link between that report and another patch that has been posted. Since the removal of the lazy FPU support, this race goes unnoticed because the warning has been removed. Disable bottom halves around the restore sequence to avoid the race. BH need to be disabled because BH is allowed to run (even with preemption disabled) and might invoke kernel_fpu_begin() by doing IPsec. [ bp: massage commit message a bit. ] Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Borislav Petkov Acked-by: Ingo Molnar Acked-by: Thomas Gleixner Cc: Andy Lutomirski Cc: Dave Hansen Cc: "H. Peter Anvin" Cc: "Jason A. Donenfeld" Cc: kvm ML Cc: Paolo Bonzini Cc: Radim Krčmář Cc: Rik van Riel Cc: stable@vger.kernel.org Cc: x86-ml Link: http://lkml.kernel.org/r/20181120102635.ddv3fvavxajjlfqk@linutronix.de Link: https://lkml.kernel.org/r/20160226074940.GA28911@pd.tnic commit 06e68fed32826b44aa9ffcf282c14d3c58918a70 Merge: f2ce1065e767 4e26f692e2e2 Author: Linus Torvalds Date: Tue Nov 20 07:37:15 2018 -0800 Merge tag 'media/v4.20-3' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media fixes from Mauro Carvalho Chehab: - add a missing include at v4l2-controls uAPI header - minor kAPI update for the request API - some fixes at CEC core - use a lower minimum height for the virtual codec driver - cleanup a gcc warning due to the lack of a fall though markup - tc358743: Remove unnecessary self assignment - fix the V4L event subscription logic - docs: Document metadata format in struct v4l2_format - omap3isp and ipu3-cio2: fix unbinding logic * tag 'media/v4.20-3' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: media: ipu3-cio2: Use cio2_queues_exit media: ipu3-cio2: Unregister device nodes first, then release resources media: omap3isp: Unregister media device as first media: docs: Document metadata format in struct v4l2_format media: v4l: event: Add subscription to list before calling "add" operation media: dm365_ipipeif: better annotate a fall though media: Rename vb2_m2m_request_queue -> v4l2_m2m_request_queue media: cec: increase debug level for 'queue full' media: cec: check for non-OK/NACK conditions while claiming a LA media: vicodec: lower minimum height to 360 media: tc358743: Remove unnecessary self assignment media: v4l: fix uapi mpeg slice params definition v4l2-controls: add a missing include commit e8828ec1c003727fc001eab06aa19bd2ca9b677e Author: Tudor.Ambarus@microchip.com Date: Fri Nov 16 17:46:37 2018 +0000 mtd: spi-nor: fix selection of uniform erase type in flexible conf There are uniform, non-uniform and flexible erase flash configurations. The non-uniform erase types, are the erase types that can _not_ erase the entire flash by their own. As the code was, in case flashes had flexible erase capabilities (support both uniform and non-uniform erase types in the same flash configuration) and supported multiple uniform erase type sizes, the code did not sort the uniform erase types, and could select a wrong erase type size. Sort the uniform erase mask in case of flexible erase flash configurations, in order to select the best uniform erase type size. Uniform, non-uniform, and flexible configurations with just a valid uniform erase type, are not affected by this change. Uniform erase tested on mx25l3273fm2i-08g and sst26vf064B-104i/sn. Non uniform erase tested on sst26vf064B-104i/sn. Fixes: 5390a8df769e ("mtd: spi-nor: add support to non-uniform SFDP SPI NOR flash memories") Signed-off-by: Tudor Ambarus Signed-off-by: Boris Brezillon commit 5d8f81ba1da55210123b9595e87b913c79579d02 Author: Patrick Stählin Date: Fri Nov 9 22:42:16 2018 +0100 RISC-V: recognize S/U mode bits in print_isa Removes the warning about an unsupported ISA when reading /proc/cpuinfo on QEMU. The "S" extension is not being returned as it is not accessible from userspace. Signed-off-by: Patrick Stählin Signed-off-by: Palmer Dabbelt commit 27f8899d6002e11a6e2d995e29b8deab5aa9cc25 Author: David Abdurachmanov Date: Thu Nov 8 20:02:39 2018 +0100 riscv: add asm/unistd.h UAPI header Marcin Juszkiewicz reported issues while generating syscall table for riscv using 4.20-rc1. The patch refactors our unistd.h files to match some other architectures. - Add asm/unistd.h UAPI header, which has __ARCH_WANT_NEW_STAT only for 64-bit - Remove asm/syscalls.h UAPI header and merge to asm/unistd.h - Adjust kernel asm/unistd.h So now asm/unistd.h UAPI header should show all syscalls for riscv. Before this, Makefile simply put `#include ` into generated asm/unistd.h UAPI header thus user didn't see: - __NR_riscv_flush_icache - __NR_newfstatat - __NR_fstat which are supported by riscv kernel. Signed-off-by: David Abdurachmanov Cc: Arnd Bergmann Cc: Marcin Juszkiewicz Cc: Guenter Roeck Fixes: 67314ec7b025 ("RISC-V: Request newstat syscalls") Signed-off-by: David Abdurachmanov Acked-by: Olof Johansson Signed-off-by: Palmer Dabbelt commit 0138ebb90c633f76bc71617f8f23635ce41c84fd Author: David Abdurachmanov Date: Thu Nov 8 20:07:00 2018 +0100 riscv: fix warning in arch/riscv/include/asm/module.h Fixes warning: 'struct module' declared inside parameter list will not be visible outside of this definition or declaration Signed-off-by: David Abdurachmanov Acked-by: Olof Johansson Signed-off-by: Palmer Dabbelt commit c0fbcd9918607e85c9598bfa3dd0a84ed77ea210 Author: Anup Patel Date: Mon Nov 12 11:25:15 2018 +0530 RISC-V: Build flat and compressed kernel images This patch extends Linux RISC-V build system to build and install: Image - Flat uncompressed kernel image Image.gz - Flat and GZip compressed kernel image Quiet a few bootloaders (such as Uboot, UEFI, etc) are capable of booting flat and compressed kernel images. In case of Uboot, booting Image or Image.gz is achieved using bootm command. The flat and uncompressed kernel image (i.e. Image) is very useful in pre-silicon developent and testing because we can create back-door HEX files for RAM on FPGAs from Image. Signed-off-by: Anup Patel Signed-off-by: Palmer Dabbelt commit 21f70d4abf9e17c2e3d7e64b7bfa3424e017f176 Author: Olof Johansson Date: Wed Nov 14 16:27:55 2018 -0800 RISC-V: Fix raw_copy_{to,from}_user() Sparse highlighted it, and appears to be a pure bug (from vs to). ./arch/riscv/include/asm/uaccess.h:403:35: warning: incorrect type in argument 1 (different address spaces) ./arch/riscv/include/asm/uaccess.h:403:39: warning: incorrect type in argument 2 (different address spaces) ./arch/riscv/include/asm/uaccess.h:409:37: warning: incorrect type in argument 1 (different address spaces) ./arch/riscv/include/asm/uaccess.h:409:41: warning: incorrect type in argument 2 (different address spaces) Signed-off-by: Olof Johansson Cc: stable@vger.kernel.org Signed-off-by: Palmer Dabbelt commit fb862c3b199d28bee238d52e8270eae8650d6cb0 Author: Sebastian Parschauer Date: Tue Nov 20 07:25:08 2018 +0100 HID: Add quirk for Primax PIXART OEM mice The PixArt OEM mice are known for disconnecting every minute in runlevel 1 or 3 if they are not always polled. So add quirk ALWAYS_POLL for two Primax mice as well. 0x4e22 is the Dell MS111-P and 0x4d0f is the unbranded HP Portia mouse HP 697738-001. Both were built until approx. 2014. Those were the standard mice from those vendors and are still around - even as new old stock. Reference: https://github.com/sriemer/fix-linux-mouse/issues/11 Signed-off-by: Sebastian Parschauer CC: stable@vger.kernel.org Signed-off-by: Jiri Kosina commit 63529eaa6164ef7ab4b907b25ac3648177e5e78f Author: Maarten Jacobs Date: Mon Nov 19 23:18:49 2018 +0000 usb: cdc-acm: add entry for Hiro (Conexant) modem The cdc-acm kernel module currently does not support the Hiro (Conexant) H05228 USB modem. The patch below adds the device specific information: idVendor 0x0572 idProduct 0x1349 Signed-off-by: Maarten Jacobs Acked-by: Oliver Neukum Cc: stable Signed-off-by: Greg Kroah-Hartman commit c6fd6fe9dea44732cdcd970f1130b8cc50ad685a Author: Hou Zhiqiang Date: Wed Nov 7 05:16:49 2018 +0000 PCI: layerscape: Fix wrong invocation of outbound window disable accessor The order of parameters is not correct when invoking the outbound window disable routine. Fix it. Fixes: 4a2745d760fa ("PCI: layerscape: Disable outbound windows configured by bootloader") Signed-off-by: Hou Zhiqiang [lorenzo.pieralisi@arm.com: commit log] Signed-off-by: Lorenzo Pieralisi Cc: stable@vger.kernel.org commit 68bc10bf992180f269816ff3d22eb30383138577 Author: Trent Piepho Date: Mon Nov 5 18:11:36 2018 +0000 PCI: imx6: Fix link training status detection in link up check This bug was introduced in the interaction for two commits on either branch of the merge commit 562df5c8521e ("Merge branch 'pci/host-designware' into next"). Commit 4d107d3b5a68 ("PCI: imx6: Move link up check into imx6_pcie_wait_for_link()"), changed imx6_pcie_wait_for_link() to poll the link status register directly, checking for link up and not training, and made imx6_pcie_link_up() only check the link up bit (once, not a polling loop). While commit 886bc5ceb5cc ("PCI: designware: Add generic dw_pcie_wait_for_link()"), replaced the loop in imx6_pcie_wait_for_link() with a call to a new dwc core function, which polled imx6_pcie_link_up(), which still checked both link up and not training in a loop. When these two commits were merged, the version of imx6_pcie_wait_for_link() from 886bc5ceb5cc was kept, which eliminated the link training check placed there by 4d107d3b5a68. However, the version of imx6_pcie_link_up() from 4d107d3b5a68 was kept, which eliminated the link training check that had been there and was moved to imx6_pcie_wait_for_link(). The result was the link training check got lost for the imx6 driver. Eliminate imx6_pcie_link_up() so that the default handler, dw_pcie_link_up(), is used instead. The default handler has the correct code, which checks for link up and also that it still is not training, fixing the regression. Fixes: 562df5c8521e ("Merge branch 'pci/host-designware' into next") Signed-off-by: Trent Piepho [lorenzo.pieralisi@arm.com: rewrote the commit log] Signed-off-by: Lorenzo Pieralisi Reviewed-by: Lucas Stach Cc: Bjorn Helgaas Cc: Joao Pinto Cc: Lorenzo Pieralisi Cc: Richard Zhu commit e6e094e053af75cbc164e950814d3d084fb1e698 Author: Juergen Gross Date: Tue Nov 20 08:25:29 2018 +0100 x86/acpi, x86/boot: Take RSDP address from boot params if available In case the RSDP address in struct boot_params is specified don't try to find the table by searching, but take the address directly as set by the boot loader. Suggested-by: "H. Peter Anvin" Signed-off-by: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: boris.ostrovsky@oracle.com Cc: bp@alien8.de Cc: daniel.kiper@oracle.com Cc: sstabellini@kernel.org Cc: xen-devel@lists.xenproject.org Link: http://lkml.kernel.org/r/20181120072529.5489-3-jgross@suse.com Signed-off-by: Ingo Molnar commit 3841840449817ba6cf3e636008bc4e1061a03388 Author: Juergen Gross Date: Tue Nov 20 08:25:28 2018 +0100 x86/boot: Mostly revert commit ae7e1238e68f2a ("Add ACPI RSDP address to setup_header") Peter Anvin pointed out that commit: ae7e1238e68f2a ("x86/boot: Add ACPI RSDP address to setup_header") should be reverted as setup_header should only contain items set by the legacy BIOS. So revert said commit. Instead of fully reverting the dependent commit of: e7b66d16fe4172 ("x86/acpi, x86/boot: Take RSDP address for boot params if available") just remove the setup_header reference in order to replace it by a boot_params in a followup patch. Suggested-by: "H. Peter Anvin" Signed-off-by: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: boris.ostrovsky@oracle.com Cc: bp@alien8.de Cc: daniel.kiper@oracle.com Cc: sstabellini@kernel.org Cc: xen-devel@lists.xenproject.org Link: http://lkml.kernel.org/r/20181120072529.5489-2-jgross@suse.com Signed-off-by: Ingo Molnar commit 8830f26bcd3cf1ff07d9078cd310a534c03b6a10 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 (cherry picked from commit fb6f0b64e455b207a636346588e65bf9598d30eb) Signed-off-by: Joonas Lahtinen commit 1359f25106cad6535812f900625150379c51df82 Merge: a5681e20b541 9184e51b5b3e Author: David S. Miller Date: Mon Nov 19 19:04:33 2018 -0800 Merge tag 'mlx5-fixes-2018-11-19' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== Mellanox, mlx5 fixes 2018-11-19 The following fixes are for mlx5 core and netdev driver. For -stable v4.16 bc7fda7d4637 ('net/mlx5e: IPoIB, Reset QP after channels are closed') For -stable v4.17 36917a270395 ('net/mlx5: IPSec, Fix the SA context hash key') For -stable v4.18 6492a432be3a ('net/mlx5e: Always use the match level enum when parsing TC rule match') c3f81be236b1 ('net/mlx5e: Removed unnecessary warnings in FEC caps query') c5ce2e736b64 ('net/mlx5e: Fix selftest for small MTUs') For -stable v4.19 effcd896b25e ('net/mlx5e: Adjust to max number of channles when re-attaching') 394cbc5acd68 ('net/mlx5e: RX, verify received packet size in Linear Striding RQ') 447cbb3613c8 ('net/mlx5e: Don't match on vlan non-existence if ethertype is wildcarded') c223c1574612 ('net/mlx5e: Claim TC hw offloads support only under a proper build config') Please pull and let me know if there's any problem. ==================== Signed-off-by: David S. Miller commit a5681e20b541a507c7d4fd48ae4a4040d32ee1ef Author: Juliet Kim Date: Mon Nov 19 15:59:22 2018 -0600 net/ibmnvic: Fix deadlock problem in reset This patch changes to use rtnl_lock only during a reset to avoid deadlock that could occur when a thread operating close is holding rtnl_lock and waiting for reset_lock acquired by another thread, which is waiting for rtnl_lock in order to set the number of tx/rx queues during a reset. Also, we now setting the number of tx/rx queues during a soft reset for failover or LPM events. Signed-off-by: Juliet Kim Signed-off-by: David S. Miller commit db9a0bae8ffca4e1ce5089b999e40afd4edb8e79 Merge: d7c60210a9d7 eb62cca9bee8 Author: David S. Miller Date: Mon Nov 19 18:38:16 2018 -0800 Merge branch 'qed-Fix-Queue-Manager-getters' Denis Bolotin says: ==================== qed: Fix Queue Manager getters This patch series fixes various queue manager getter functions. It is important to make sure the getter's caller will receive a valid queue even in error case to prevent more serious bugs. Please consider applying to net. ==================== Signed-off-by: David S. Miller commit eb62cca9bee842e5b23bd0ddfb1f271ca95e8759 Author: Denis Bolotin Date: Mon Nov 19 16:28:31 2018 +0200 qed: Fix QM getters to always return a valid pq The getter callers doesn't know the valid Physical Queues (PQ) values. This patch makes sure that a valid PQ will always be returned. The patch consists of 3 fixes: - When qed_init_qm_get_idx_from_flags() receives a disabled flag, it returned PQ 0, which can potentially be another function's pq. Verify that flag is enabled, otherwise return default start_pq. - When qed_init_qm_get_idx_from_flags() receives an unknown flag, it returned NULL and could lead to a segmentation fault. Return default start_pq instead. - A modulo operation was added to MCOS/VFS PQ getters to make sure the PQ returned is in range of the required flag. Fixes: b5a9ee7cf3be ("qed: Revise QM cofiguration") Signed-off-by: Denis Bolotin Signed-off-by: Michal Kalderon Signed-off-by: David S. Miller commit 276d43f0ae963312c0cd0e2b9a85fd11ac65dfcc Author: Denis Bolotin Date: Mon Nov 19 16:28:30 2018 +0200 qed: Fix bitmap_weight() check Fix the condition which verifies that only one flag is set. The API bitmap_weight() should receive size in bits instead of bytes. Fixes: b5a9ee7cf3be ("qed: Revise QM cofiguration") Signed-off-by: Denis Bolotin Signed-off-by: Michal Kalderon Signed-off-by: David S. Miller commit aeabb3c96186a0f944fc2b1f25c84d5eb3a93fa9 Author: Trond Myklebust Date: Mon Nov 19 20:11:45 2018 -0500 NFSv4: Fix a NFSv4 state manager deadlock Fix a deadlock whereby the NFSv4 state manager can get stuck in the delegation return code, waiting for a layout return to complete in another thread. If the server reboots before that other thread completes, then we need to be able to start a second state manager thread in order to perform recovery. Signed-off-by: Trond Myklebust commit 9184e51b5b3ef4509ea869f43e34a60f78f0d32a Author: Shay Agroskin Date: Thu Nov 8 14:23:36 2018 +0200 net/mlx5e: Fix failing ethtool query on FEC query error If FEC caps query fails when executing 'ethtool ' the whole callback fails unnecessarily, fixed that by replacing the error return code with debug logging only. Fixes: 6cfa94605091 ("net/mlx5e: Ethtool driver callback for query/set FEC policy") Signed-off-by: Shay Agroskin Signed-off-by: Saeed Mahameed commit 64e283348458e2fd2fe41b60dfb6c30e88ee695f Author: Shay Agroskin Date: Sun Oct 28 09:06:11 2018 +0200 net/mlx5e: Removed unnecessary warnings in FEC caps query Querying interface FEC caps with 'ethtool [int]' after link reset throws warning regading link speed. This warning is not needed as there is already an indication in user space that the link is not up. Fixes: 0696d60853d5 ("net/mlx5e: Receive buffer configuration") Signed-off-by: Shay Agroskin Signed-off-by: Saeed Mahameed commit febd72f27c02713823cdd011e0087c0e80eb8f62 Author: Shay Agroskin Date: Sun Oct 28 09:17:29 2018 +0200 net/mlx5e: Fix wrong field name in FEC related functions This bug would result in reading wrong FEC capabilities for 10G/40G. Fixes: 2095b2641477 ("net/mlx5e: Add port FEC get/set functions") Signed-off-by: Shay Agroskin Signed-off-by: Saeed Mahameed commit 9cdeaab3b7e72fe60f582e7658511f30c19f1e29 Author: Shay Agroskin Date: Sun Oct 28 16:13:46 2018 +0200 net/mlx5e: Fix a bug in turning off FEC policy in unsupported speeds Some speeds don't support turning FEC policy off. In case a requested FEC policy is not supported for a speed (including current speed), its new FEC policy would be: no FEC - if disabling FEC is supported for that speed unchanged - else Fixes: 2095b2641477 ("net/mlx5e: Add port FEC get/set functions") Signed-off-by: Shay Agroskin Signed-off-by: Saeed Mahameed commit d7c60210a9d72210c9cf348f1221b2367b9c0bb4 Merge: e1e46479847e 4c23738a3f9f Author: David S. Miller Date: Mon Nov 19 15:13:00 2018 -0800 Merge branch 'ena-hibernation-and-rmmod-bug-fixes' Arthur Kiyanovski says: ==================== net: ena: hibernation and rmmod bug fixes This patchset includes 2 bug fixes: 1. A fix to a crash during resume from hibernation. 2. A fix to an illegal memory access during driver removal (e.g. during rmmod) which might cause a crash in certain systems. The subminor number in the driver version is also promoted to indicate driver was changed. ==================== Signed-off-by: David S. Miller commit 4c23738a3f9f203a9b41c89e030eaa8ee241f90f Author: Arthur Kiyanovski Date: Mon Nov 19 12:05:22 2018 +0200 net: ena: update driver version from 2.0.1 to 2.0.2 Update driver version due to critical bug fixes. Signed-off-by: Arthur Kiyanovski Signed-off-by: David S. Miller commit 58a54b9c62e206b8d5f6e59020bcb178fc271d8e Author: Arthur Kiyanovski Date: Mon Nov 19 12:05:21 2018 +0200 net: ena: fix crash during ena_remove() In ena_remove() we have the following stack call: ena_remove() unregister_netdev() ena_destroy_device() netif_carrier_off() Calling netif_carrier_off() causes linkwatch to try to handle the link change event on the already unregistered netdev, which leads to a read from an unreadable memory address. This patch switches the order of the two functions, so that netif_carrier_off() is called on a regiestered netdev. To accomplish this fix we also had to: 1. Remove the set bit ENA_FLAG_TRIGGER_RESET 2. Add a sanitiy check in ena_close() both to prevent double device reset (when calling unregister_netdev() ena_close is called, but the device was already deleted in ena_destroy_device()). 3. Set the admin_queue running state to false to avoid using it after device was reset (for example when calling ena_destroy_all_io_queues() right after ena_com_dev_reset() in ena_down) Fixes: 944b28aa2982 ("net: ena: fix missing lock during device destruction") Signed-off-by: Arthur Kiyanovski Signed-off-by: David S. Miller commit e76ad21d070f79e566ac46ce0b0584c3c93e1b43 Author: Arthur Kiyanovski Date: Mon Nov 19 12:05:20 2018 +0200 net: ena: fix crash during failed resume from hibernation During resume from hibernation if ena_restore_device fails, ena_com_dev_reset() is called, and uses the readless read mechanism, which was already destroyed by the call to ena_com_mmio_reg_read_request_destroy(). This causes a NULL pointer reference. In this commit we switch the call order of the above two functions to avoid this crash. Fixes: d7703ddbd7c9 ("net: ena: fix rare bug when failed restart/resume is followed by driver removal") Signed-off-by: Arthur Kiyanovski Signed-off-by: David S. Miller commit e1e46479847e66f78f79d8c24d5169a5954b3fc2 Author: Xin Long Date: Sun Nov 18 21:59:49 2018 +0800 sctp: not increase stream's incnt before sending addstrm_in request Different from processing the addstrm_out request, The receiver handles an addstrm_in request by sending back an addstrm_out request to the sender who will increase its stream's in and incnt later. Now stream->incnt has been increased since it sent out the addstrm_in request in sctp_send_add_streams(), with the wrong stream->incnt will even cause crash when copying stream info from the old stream's in to the new one's in sctp_process_strreset_addstrm_out(). This patch is to fix it by simply removing the stream->incnt change from sctp_send_add_streams(). Fixes: 242bd2d519d7 ("sctp: implement sender-side procedures for Add Incoming/Outgoing Streams Request Parameter") Reported-by: Jianwen Ji Signed-off-by: Xin Long Signed-off-by: David S. Miller commit 228c4cd04dfd0667eda182c91504b83c17d97584 Author: Valentine Fatiev Date: Wed Oct 17 11:45:07 2018 +0300 net/mlx5e: Fix selftest for small MTUs Loopback test had fixed packet size, which can be bigger than configured MTU. Shorten the loopback packet size to be bigger than minimal MTU allowed by the device. Text field removed from struct 'mlx5ehdr' as redundant to allow send small packets as minimal allowed MTU. Fixes: d605d66 ("net/mlx5e: Add support for ethtool self diagnostics test") Signed-off-by: Valentine Fatiev Reviewed-by: Eran Ben Elisha Signed-off-by: Saeed Mahameed commit 0073c8f72736b423aade8a817587a5f3e4df4ad8 Author: Moshe Shemesh Date: Thu Oct 11 07:31:10 2018 +0300 net/mlx5e: RX, verify received packet size in Linear Striding RQ In case of striding RQ, we use MPWRQ (Multi Packet WQE RQ), which means that WQE (RX descriptor) can be used for many packets and so the WQE is much bigger than MTU. In virtualization setups where the port mtu can be larger than the vf mtu, if received packet is bigger than MTU, it won't be dropped by HW on too small receive WQE. If we use linear SKB in striding RQ, since each stride has room for mtu size payload and skb info, an oversized packet can lead to crash for crossing allocated page boundary upon the call to build_skb. So driver needs to check packet size and drop it. Introduce new SW rx counter, rx_oversize_pkts_sw_drop, which counts the number of packets dropped by the driver for being too large. As a new field is added to the RQ struct, re-open the channels whenever this field is being used in datapath (i.e., in the case of linear Striding RQ). Fixes: 619a8f2a42f1 ("net/mlx5e: Use linear SKB in Striding RQ") Signed-off-by: Moshe Shemesh Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 1392f44bba22533b8dfdc6b0e73610b27c3f76cf Author: Roi Dayan Date: Tue Oct 23 17:30:04 2018 +0300 net/mlx5e: Apply the correct check for supporting TC esw rules split The mirror and not the output count is the one denoting a split. Fix to condition the offload attempt on the mirror count being > 0 along the firmware to have the related capability. Fixes: 592d36515969 ("net/mlx5e: Parse mirroring action for offloaded TC eswitch flows") Signed-off-by: Roi Dayan Reviewed-by: Yossi Kuperman Reviewed-by: Chris Mi Acked-by: Or Gerlitz Reviewed-by: Or Gerlitz Signed-off-by: Saeed Mahameed commit a1f240f1801721f76bee734c50df2d9529da86e0 Author: Yuval Avnery Date: Tue Oct 16 15:20:20 2018 -0500 net/mlx5e: Adjust to max number of channles when re-attaching When core driver enters deattach/attach flow after pci reset, Number of logical CPUs may have changed. As a result we need to update the cpu affiliated resource tables. 1. indirect rqt list 2. eq table Reproduction (PowerPC): echo 1000 > /sys/kernel/debug/powerpc/eeh_max_freezes ppc64_cpu --smt=on # Restart driver modprobe -r ... ; modprobe ... # Link up ifconfig ... # Only physical CPUs ppc64_cpu --smt=off # Inject PCI errors so PCI will reset - calling the pci error handler echo 0x8000000000000000 > /sys/kernel/debug/powerpc//err_injct_inboundA Call trace when trying to add non-existing rqs to an indirect rqt: mlx5e_redirect_rqt+0x84/0x260 [mlx5_core] (unreliable) mlx5e_redirect_rqts+0x188/0x190 [mlx5_core] mlx5e_activate_priv_channels+0x488/0x570 [mlx5_core] mlx5e_open_locked+0xbc/0x140 [mlx5_core] mlx5e_open+0x50/0x130 [mlx5_core] mlx5e_nic_enable+0x174/0x1b0 [mlx5_core] mlx5e_attach_netdev+0x154/0x290 [mlx5_core] mlx5e_attach+0x88/0xd0 [mlx5_core] mlx5_attach_device+0x168/0x1e0 [mlx5_core] mlx5_load_one+0x1140/0x1210 [mlx5_core] mlx5_pci_resume+0x6c/0xf0 [mlx5_core] Create cq will fail when trying to use non-existing EQ. Fixes: 89d44f0a6c73 ("net/mlx5_core: Add pci error handlers to mlx5_core driver") Signed-off-by: Yuval Avnery Signed-off-by: Saeed Mahameed commit 83621b7df6a646e550fd3d36db2e301cf9a5096b Author: Or Gerlitz Date: Sun Oct 28 12:27:29 2018 +0200 net/mlx5e: Always use the match level enum when parsing TC rule match We get the match level (none, l2, l3, l4) while going over the match dissectors of an offloaded tc rule. When doing this, the match level enum and the not min inline enum values should be used, fix that. This worked accidentally b/c both enums have the same numerical values. Fixes: d708f902989b ('net/mlx5e: Get the required HW match level while parsing TC flow matches') Signed-off-by: Or Gerlitz Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed commit 077ecd785d90c6cbba08d719faa4be8561aa0a1e Author: Or Gerlitz Date: Thu Oct 18 12:31:27 2018 +0200 net/mlx5e: Claim TC hw offloads support only under a proper build config Currently, we are only supporting tc hw offloads when the eswitch support is compiled in, but we are not gating the adevertizment of the NETIF_F_HW_TC feature on this config being set. Fix it, and while doing that, also avoid dealing with the feature on ethtool when the config is not set. Fixes: e8f887ac6a45 ('net/mlx5e: Introduce tc offload support') Signed-off-by: Or Gerlitz Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed commit d3a80bb5a3eac311ddf28387402593977574460d Author: Or Gerlitz Date: Thu Oct 25 15:41:58 2018 +0000 net/mlx5e: Don't match on vlan non-existence if ethertype is wildcarded For the "all" ethertype we should not care whether the packet has vlans. Besides being wrong, the way we did it caused FW error for rules such as: tc filter add dev eth0 protocol all parent ffff: \ prio 1 flower skip_sw action drop b/c the matching meta-data (outer headers bit in struct mlx5_flow_spec) wasn't set. Fix that by matching on vlan non-existence only if we were also told to match on the ethertype. Fixes: cee26487620b ('net/mlx5e: Set vlan masks for all offloaded TC rules') Signed-off-by: Or Gerlitz Reported-by: Slava Ovsiienko Reviewed-by: Jianbo Liu Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed commit acf3766b36d8e59ecbc307894c6d05703ee48014 Author: Denis Drozdov Date: Thu Sep 27 14:17:54 2018 +0300 net/mlx5e: IPoIB, Reset QP after channels are closed The mlx5e channels should be closed before mlx5i_uninit_underlay_qp puts the QP into RST (reset) state during mlx5i_close. Currently QP state incorrectly set to RST before channels got deactivated and closed, since mlx5_post_send request expects QP in RTS (Ready To Send) state. The fix is to keep QP in RTS state until mlx5e channels get closed and to reset QP afterwards. Also this fix is simply correct in order to keep the open/close flow symmetric, i.e mlx5i_init_underlay_qp() is called first thing at open, the correct thing to do is to call mlx5i_uninit_underlay_qp() last thing at close, which is exactly what this patch is doing. Fixes: dae37456c8ac ("net/mlx5: Support for attaching multiple underlay QPs to root flow table") Signed-off-by: Denis Drozdov Signed-off-by: Saeed Mahameed commit f2b18732ee9863ac036759baf616ffa03c252ed5 Author: Raed Salem Date: Thu Oct 18 08:55:21 2018 +0300 net/mlx5: IPSec, Fix the SA context hash key The commit "net/mlx5: Refactor accel IPSec code" introduced a bug where asynchronous short time change in hash key value by create/release SA context might happen during an asynchronous hash resize operation this could cause a subsequent remove SA context operation to fail as the key value used during resize is not the same key value used when remove SA context operation is invoked. This commit fixes the bug by defining the SA context hash key such that it includes only fields that never change during the lifetime of the SA context object. Fixes: d6c4f0298cec ("net/mlx5: Refactor accel IPSec code") Signed-off-by: Raed Salem Reviewed-by: Aviad Yehezkel Signed-off-by: Saeed Mahameed commit da034bcc6aaaf2a6ba6c5b5e63565c5ef4816a0e Author: Eric Biggers Date: Wed Nov 14 21:48:18 2018 -0800 xfs: make xfs_file_remap_range() static xfs_file_remap_range() is only used in fs/xfs/xfs_file.c, so make it static. This addresses a gcc warning when -Wmissing-prototypes is enabled. Signed-off-by: Eric Biggers Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 59e4293149106fb92530f8e56fa3992d8548c5e6 Author: Brian Foster Date: Wed Nov 14 07:46:40 2018 -0800 xfs: fix shared extent data corruption due to missing cow reservation Page writeback indirectly handles shared extents via the existence of overlapping COW fork blocks. If COW fork blocks exist, writeback always performs the associated copy-on-write regardless if the underlying blocks are actually shared. If the blocks are shared, then overlapping COW fork blocks must always exist. fstests shared/010 reproduces a case where a buffered write occurs over a shared block without performing the requisite COW fork reservation. This ultimately causes writeback to the shared extent and data corruption that is detected across md5 checks of the filesystem across a mount cycle. The problem occurs when a buffered write lands over a shared extent that crosses an extent size hint boundary and that also happens to have a partial COW reservation that doesn't cover the start and end blocks of the data fork extent. For example, a buffered write occurs across the file offset (in FSB units) range of [29, 57]. A shared extent exists at blocks [29, 35] and COW reservation already exists at blocks [32, 34]. After accommodating a COW extent size hint of 32 blocks and the existing reservation at offset 32, xfs_reflink_reserve_cow() allocates 32 blocks of reservation at offset 0 and returns with COW reservation across the range of [0, 34]. The associated data fork extent is still [29, 35], however, which isn't fully covered by the COW reservation. This leads to a buffered write at file offset 35 over a shared extent without associated COW reservation. Writeback eventually kicks in, performs an overwrite of the underlying shared block and causes the associated data corruption. Update xfs_reflink_reserve_cow() to accommodate the fact that a delalloc allocation request may not fully cover the extent in the data fork. Trim the data fork extent appropriately, just as is done for shared extent boundaries and/or existing COW reservations that happen to overlap the start of the data fork extent. This prevents shared/010 failures due to data corruption on reflink enabled filesystems. Signed-off-by: Brian Foster Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit a6a66f80c85e8e20573ca03fabf32445954a88d5 Author: Thor Thayer Date: Fri Nov 16 08:25:49 2018 -0600 mtd: spi-nor: Fix Cadence QSPI page fault kernel panic The current Cadence QSPI driver caused a kernel panic sporadically when writing to QSPI. The problem was caused by writing more bytes than needed because the QSPI operated on 4 bytes at a time. [ 11.202044] Unable to handle kernel paging request at virtual address bffd3000 [ 11.209254] pgd = e463054d [ 11.211948] [bffd3000] *pgd=2fffb811, *pte=00000000, *ppte=00000000 [ 11.218202] Internal error: Oops: 7 [#1] SMP ARM [ 11.222797] Modules linked in: [ 11.225844] CPU: 1 PID: 1317 Comm: systemd-hwdb Not tainted 4.17.7-d0c45cd44a8f [ 11.235796] Hardware name: Altera SOCFPGA Arria10 [ 11.240487] PC is at __raw_writesl+0x70/0xd4 [ 11.244741] LR is at cqspi_write+0x1a0/0x2cc On a page boundary limit the number of bytes copied from the tx buffer to remain within the page. This patch uses a temporary buffer to hold the 4 bytes to write and then copies only the bytes required from the tx buffer. Reported-by: Adrian Amborzewicz Signed-off-by: Thor Thayer Signed-off-by: Boris Brezillon commit a4233cc944d1b7125d906f1fa276bda3df48df0c Author: Greathouse, Joseph Date: Mon Nov 19 16:59:28 2018 +0000 drm/amd/pp: handle negative values when reading OD Reading the sysfs files pp_sclk_od and pp_mclk_od return the percentage difference between the VBIOS-provided default frequency and the current (possibly user-set) frequency in the highest SCLK and MCLK DPM states, respectively. Writing to these files provides an easy mechanism for setting a higher-than-default maximum frequency. We normally only allow values >= 0 to be written here. However, with the addition of pp_od_clk_voltage, we now allow users to set custom DPM tables. If they then set the maximum DPM state to something less than the default, later reads of pp_*_od should return a negative value. The highest DPM state is now less than the VBIOS-provided default, so the percentage is negative. The math to calculate this was originally performed with unsigned values, meaning reads that should return negative values returned meaningless data. This patch corrects that issue and normalizes how all of the calculations are done across the various hwmgr types. Acked-by: Alex Deucher Signed-off-by: Joseph Greathouse Signed-off-by: Alex Deucher commit 8d4d7c58994759bbd9f4fec32d88bf0e0b89302e Author: Takashi Iwai Date: Mon Nov 19 12:55:12 2018 +0100 drm/amdgpu: Add missing firmware entry for HAINAN Due to lack of MODULE_FIRMWARE() with hainan_mc.bin, the driver doesn't work properly in initrd. Let's add it. Bugzilla: https://bugzilla.suse.com/show_bug.cgi?id=1116239 Fixes: 8eaf2b1faaf4 ("drm/amdgpu: switch firmware path for SI parts") Cc: Reviewed-by: Christian König Signed-off-by: Takashi Iwai Signed-off-by: Alex Deucher commit 009dd011762925e5e03a59282b1785214f8470e0 Author: Evan Quan Date: Mon Nov 19 12:03:24 2018 +0800 drm/amd/powerplay: disable Vega20 DS related features Disable these features on Vega20 for now. Signed-off-by: Evan Quan Acked-by: Feifei Xu Signed-off-by: Alex Deucher commit 919a52fc4ca137c871f295224507fa3401e08472 Author: Felix Kuehling Date: Fri Jul 20 11:37:25 2018 -0400 drm/amdgpu: Fix oops when pp_funcs->switch_power_profile is unset On Vega20 and other pre-production GPUs, powerplay is not enabled yet. Check for NULL pointers before calling pp_funcs function pointers. Also affects Kaveri. CC: Joerg Roedel Signed-off-by: Felix Kuehling Reviewed-by: Alex Deucher Tested-by: Joerg Roedel Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 69fec325a64383667b8a35df5d48d6ce52fb2782 Author: Xin Long Date: Sun Nov 18 16:14:47 2018 +0800 Revert "sctp: remove sctp_transport_pmtu_check" This reverts commit 22d7be267eaa8114dcc28d66c1c347f667d7878a. The dst's mtu in transport can be updated by a non sctp place like in xfrm where the MTU information didn't get synced between asoc, transport and dst, so it is still needed to do the pmtu check in sctp_packet_config. Acked-by: Neil Horman Signed-off-by: David S. Miller commit cc3ccf26f0649089b3a34a2781977755ea36e72c Author: Xin Long Date: Sun Nov 18 15:21:53 2018 +0800 sctp: not allow to set asoc prsctp_enable by sockopt As rfc7496#section4.5 says about SCTP_PR_SUPPORTED: This socket option allows the enabling or disabling of the negotiation of PR-SCTP support for future associations. For existing associations, it allows one to query whether or not PR-SCTP support was negotiated on a particular association. It means only sctp sock's prsctp_enable can be set. Note that for the limitation of SCTP_{CURRENT|ALL}_ASSOC, we will add it when introducing SCTP_{FUTURE|CURRENT|ALL}_ASSOC for linux sctp in another patchset. v1->v2: - drop the params.assoc_id check as Neil suggested. Fixes: 28aa4c26fce2 ("sctp: add SCTP_PR_SUPPORTED on sctp sockopt") Reported-by: Ying Xu Signed-off-by: Xin Long Signed-off-by: David S. Miller commit 02968ccf0125d39b08ecef5946300a8a873c0942 Author: Xin Long Date: Sun Nov 18 15:07:38 2018 +0800 sctp: count sk_wmem_alloc by skb truesize in sctp_packet_transmit Now sctp increases sk_wmem_alloc by 1 when doing set_owner_w for the skb allocked in sctp_packet_transmit and decreases by 1 when freeing this skb. But when this skb goes through networking stack, some subcomponents might change skb->truesize and add the same amount on sk_wmem_alloc. However sctp doesn't know the amount to decrease by, it would cause a leak on sk->sk_wmem_alloc and the sock can never be freed. Xiumei found this issue when it hit esp_output_head() by using sctp over ipsec, where skb->truesize is added and so is sk->sk_wmem_alloc. Since sctp has used sk_wmem_queued to count for writable space since Commit cd305c74b0f8 ("sctp: use sk_wmem_queued to check for writable space"), it's ok to fix it by counting sk_wmem_alloc by skb truesize in sctp_packet_transmit. Fixes: cac2661c53f3 ("esp4: Avoid skb_cow_data whenever possible") Reported-by: Xiumei Mu Signed-off-by: Xin Long Signed-off-by: David S. Miller commit a4243e1494532ab8fa679a4134153149a71fa331 Author: Arnaldo Carvalho de Melo Date: Mon Nov 19 12:38:50 2018 -0800 perf tools beauty ioctl: Support new ISO7816 commands Introduced in: ad8c0eaa0a41 ("tty/serial_core: add ISO7816 infrastructure") Now 'perf trace' will be able to pretty-print the 'cmd' ioctl arg when used in capable systems with software emitting those commands. Cc: Adrian Hunter Cc: David Ahern Cc: Greg Kroah-Hartman Cc: Jiri Olsa Cc: Namhyung Kim Cc: Nicolas Ferre Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-7bds48dhckfnleie08mit314@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 83d9bdeaedd8f7aa9749828364f0018cacd1dad3 Author: Arnaldo Carvalho de Melo Date: Mon Nov 19 12:31:45 2018 -0800 tools uapi asm-generic: Synchronize ioctls.h To pick up the changes in: ad8c0eaa0a41 ("tty/serial_core: add ISO7816 infrastructure") That is a change that imply a change to be made in tools/perf/trace/beauty/ioctl.c to make 'perf trace' ioctl syscall argument beautifier to support these new commands: TIOCGISO7816 and TIOCSISO7816. This is not yet done automatically by a script like is done for some other headers, for instance: $ tools/perf/trace/beauty/drm_ioctl.sh | head #ifndef DRM_COMMAND_BASE #define DRM_COMMAND_BASE 0x40 #endif static const char *drm_ioctl_cmds[] = { [0x00] = "VERSION", [0x01] = "GET_UNIQUE", [0x02] = "GET_MAGIC", [0x03] = "IRQ_BUSID", [0x04] = "GET_MAP", [0x05] = "GET_CLIENT", $ So we will need to change tools/perf/trace/beauty/ioctl.c in a follow up patch until we switch to a generator script. Cc: Adrian Hunter Cc: David Ahern Cc: Greg Kroah-Hartman Cc: Jiri Olsa Cc: Namhyung Kim Cc: Nicolas Ferre Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-zin76fe6iykqsilvo6u47f9o@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 65e259d5c4ae425f7c80e40b838eba1b9e8608fd Author: Arnaldo Carvalho de Melo Date: Mon Nov 19 12:27:07 2018 -0800 tools arch x86: Update tools's copy of cpufeatures.h To get the changes in the following csets: ace6485a0326 ("x86/cpufeatures: Enumerate MOVDIR64B instruction") 33823f4d63f7 ("x86/cpufeatures: Enumerate MOVDIRI instruction") No tools were affected, copy it to silence this perf tool build warning: Warning: Kernel ABI header at 'tools/arch/x86/include/asm/cpufeatures.h' differs from latest version at 'arch/x86/include/asm/cpufeatures.h' diff -u tools/arch/x86/include/asm/cpufeatures.h arch/x86/include/asm/cpufeatures.h Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Cc: Fenghua Yu Link: https://lkml.kernel.org/n/tip-83kcyqa1qkxkhm1s7q3hbpel@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 53f00f4548ef700e3c6867a35fd7d4f824cd165a Author: Arnaldo Carvalho de Melo Date: Mon Nov 19 12:17:42 2018 -0800 tools headers uapi: Synchronize i915_drm.h To pick up the changes in: 900ccf30f9e1 ("drm/i915: Only force GGTT coherency w/a on required chipsets") No changes are required in tools/ nor does anything gets automatically generated to be used in the 'perf trace' syscall arg beautifiers. This silences 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: Chris Wilson Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-t2vor2wegv41gt5n49095kly@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit b01c1f69c8660eaeab7d365cd570103c5c073a02 Author: Jiri Olsa Date: Thu Nov 1 18:00:01 2018 +0100 perf tools: Restore proper cwd on return from mnt namespace When reporting on 'record' server we try to retrieve/use the mnt namespace of the profiled tasks. We use following API with cookie to hold the return namespace, roughly: nsinfo__mountns_enter(struct nsinfo *nsi, struct nscookie *nc) setns(newns, 0); ... new ns related open.. ... nsinfo__mountns_exit(struct nscookie *nc) setns(nc->oldns) Once finished we setns to old namespace, which also sets the current working directory (cwd) to "/", trashing the cwd we had. This is mostly fine, because we use absolute paths almost everywhere, but it screws up 'perf diff': # perf diff failed to open perf.data: No such file or directory (try 'perf record' first) ... Adding the current working directory to be part of the cookie and restoring it in the nsinfo__mountns_exit call. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Krister Johansen Cc: Namhyung Kim Cc: Peter Zijlstra Fixes: 843ff37bb59e ("perf symbols: Find symbols in different mount namespace") Link: http://lkml.kernel.org/r/20181101170001.30019-1-jolsa@kernel.org [ No need to check for NULL args for free(), use zfree() for struct members ] Signed-off-by: Arnaldo Carvalho de Melo commit 8feb8efef97a134933620071e0b6384cb3238b4e Author: Arnaldo Carvalho de Melo Date: Mon Nov 19 16:56:22 2018 -0300 tools build feature: Check if get_current_dir_name() is available As the namespace support code will use this, which is not available in some non _GNU_SOURCE libraries such as Android's bionic used in my container build tests (r12b and r15c at the moment). Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-x56ypm940pwclwu45d7jfj47@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit a36b5444b1ec79ed5fedd12295626c05b4f788eb Author: Heiner Kallweit Date: Mon Nov 19 08:01:03 2018 +0100 MAINTAINERS: Add myself as third phylib maintainer Add myself as third phylib maintainer. Signed-off-by: Heiner Kallweit Acked-by: Andrew Lunn Acked-by: Florian Fainelli Signed-off-by: David S. Miller commit f2ce1065e767fc7da106a5f5381d1e8f842dc6f4 Merge: 9ff01193a20d 8ebebcba559a Author: Linus Torvalds Date: Mon Nov 19 09:24:04 2018 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: 1) Fix some potentially uninitialized variables and use-after-free in kvaser_usb can drier, from Jimmy Assarsson. 2) Fix leaks in qed driver, from Denis Bolotin. 3) Socket leak in l2tp, from Xin Long. 4) RSS context allocation fix in bnxt_en from Michael Chan. 5) Fix cxgb4 build errors, from Ganesh Goudar. 6) Route leaks in ipv6 when removing exceptions, from Xin Long. 7) Memory leak in IDR allocation handling of act_pedit, from Davide Caratti. 8) Use-after-free of bridge vlan stats, from Nikolay Aleksandrov. 9) When MTU is locked, do not force DF bit on ipv4 tunnels. From Sabrina Dubroca. 10) When NAPI cached skb is reused, we must set it to the proper initial state which includes skb->pkt_type. From Eric Dumazet. 11) Lockdep and non-linear SKB handling fix in tipc from Jon Maloy. 12) Set RX queue properly in various tuntap receive paths, from Matthew Cover. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (61 commits) tuntap: fix multiqueue rx ipv6: Fix PMTU updates for UDP/raw sockets in presence of VRF tipc: don't assume linear buffer when reading ancillary data tipc: fix lockdep warning when reinitilaizing sockets net-gro: reset skb->pkt_type in napi_reuse_skb() tc-testing: tdc.py: Guard against lack of returncode in executed command tc-testing: tdc.py: ignore errors when decoding stdout/stderr ip_tunnel: don't force DF when MTU is locked MAINTAINERS: Add entry for CAKE qdisc net: bridge: fix vlan stats use-after-free on destruction socket: do a generic_file_splice_read when proto_ops has no splice_read net: phy: mdio-gpio: Fix working over slow can_sleep GPIOs Revert "net: phy: mdio-gpio: Fix working over slow can_sleep GPIOs" net: phy: mdio-gpio: Fix working over slow can_sleep GPIOs net/sched: act_pedit: fix memory leak when IDR allocation fails net: lantiq: Fix returned value in case of error in 'xrx200_probe()' ipv6: fix a dst leak when removing its exception net: mvneta: Don't advertise 2.5G modes drivers/net/ethernet/qlogic/qed/qed_rdma.h: fix typo net/mlx4: Fix UBSAN warning of signed integer overflow ... commit 7e241f647dc7087a0401418a187f3f5b527cc690 Author: Ilya Dryomov Date: Thu Nov 8 15:55:37 2018 +0100 libceph: fall back to sendmsg for slab pages skb_can_coalesce() allows coalescing neighboring slab objects into a single frag: return page == skb_frag_page(frag) && off == frag->page_offset + skb_frag_size(frag); ceph_tcp_sendpage() can be handed slab pages. One example of this is XFS: it passes down sector sized slab objects for its metadata I/O. If the kernel client is co-located on the OSD node, the skb may go through loopback and pop on the receive side with the exact same set of frags. When tcp_recvmsg() attempts to copy out such a frag, hardened usercopy complains because the size exceeds the object's allocated size: usercopy: kernel memory exposure attempt detected from ffff9ba917f20a00 (kmalloc-512) (1024 bytes) Although skb_can_coalesce() could be taught to return false if the resulting frag would cross a slab object boundary, we already have a fallback for non-refcounted pages. Utilize it for slab pages too. Cc: stable@vger.kernel.org # 4.8+ Signed-off-by: Ilya Dryomov commit 86c31524b27c7e686841dd4a79eda95cfd989f16 Author: Kai-Heng Feng Date: Wed Nov 14 07:24:57 2018 +0000 HID: i2c-hid: Disable runtime PM for LG touchscreen LG touchscreen (1fd2:8001) stops working after reboot: [ 4.859153] i2c_hid i2c-SAPS2101:00: i2c_hid_get_input: incomplete report (64/66) [ 4.936070] i2c_hid i2c-SAPS2101:00: i2c_hid_get_input: incomplete report (64/66) [ 9.948224] i2c_hid i2c-SAPS2101:00: failed to reset device. The device in question stops working after receives SLEEP, ON, SLEEP commands in a short period. The scenario is like this: - Once the desktop session closes, it also closed the hid device, so the device gets runtime suspended and receives a SLEEP command. - Before calling shutdown callback, it gets runtime resumed and received an ON command. - In the shutdown callback, it receives another SLEEP command. I failed to find a reliable interval between ON/SLEEP commands that can make it work, so let's simply disable runtime PM for the device. Signed-off-by: Kai-Heng Feng Signed-off-by: Jiri Kosina commit 12d43aacf9a74d0eb66fd0ea54ebeb79ca28940f Author: Kai-Heng Feng Date: Wed Nov 14 05:35:20 2018 +0000 HID: multitouch: Add pointstick support for Cirque Touchpad Cirque Touchpad/Pointstick combo is similar to Alps devices, it requires MT_CLS_WIN_8_DUAL to expose its pointstick as a mouse. Signed-off-by: Kai-Heng Feng Signed-off-by: Jiri Kosina commit 91ff20f34e94424e586f57f4f593beae16504f86 Author: Amir Goldstein Date: Wed Nov 14 16:01:34 2018 +0200 ovl: fix missing override creds in link of a metacopy upper Theodore Ts'o reported a v4.19 regression with docker-dropbox: https://marc.info/?l=linux-fsdevel&m=154070089431116&w=2 "I was rebuilding my dropbox Docker container, and it failed in 4.19 with the following error: ... dpkg: error: error creating new backup file \ '/var/lib/dpkg/status-old': Invalid cross-device link" The problem did not reproduce with metacopy feature disabled. The error was caused by insufficient credentials to set "trusted.overlay.redirect" xattr on link of a metacopy file. Reproducer: echo Y > /sys/module/overlay/parameters/redirect_dir echo Y > /sys/module/overlay/parameters/metacopy cd /tmp mkdir l u w m chmod 777 l u touch l/foo ln l/foo l/link chmod 666 l/foo mount -t overlay none -olowerdir=l,upperdir=u,workdir=w m su fsgqa ln m/foo m/bar [ 21.455823] overlayfs: failed to set redirect (-1) ln: failed to create hard link 'm/bar' => 'm/foo':\ Invalid cross-device link Reported-by: Theodore Y. Ts'o Reported-by: Maciej Zięba Fixes: 4120fe64dce4 ("ovl: Set redirect on upper inode when it is linked") Cc: # v4.19 Signed-off-by: Amir Goldstein Acked-by: Vivek Goyal Signed-off-by: Miklos Szeredi commit 385a4886778f6d6e61eff1d4d295af332d7130e1 Author: Rodrigo Rivas Costa Date: Sun Oct 14 19:36:43 2018 +0200 HID: steam: remove input device when a hid client is running. Previously, when a HID client such as the Steam Client was running, this driver disabled its input device to avoid doubling the input events. While it worked mostly fine, some games got confused by the idle gamepad, and switched to two player mode, or asked the user to choose which gamepad to use. Other games just crashed, probably a bug in Unity [1]. With this commit, when a HID client starts, the input device is removed; when the HID client ends the input device is recreated. [1]: https://github.com/ValveSoftware/steam-for-linux/issues/5645 Signed-off-by: Rodrigo Rivas Costa Signed-off-by: Jiri Kosina commit fffc9a260e38acec3187515738122a3ecb24ac90 Author: Matthew Wilcox Date: Mon Nov 19 09:36:29 2018 -0500 XArray tests: Add missing locking Lockdep caught me being sloppy in the test suite and failing to lock the XArray appropriately. Reported-by: kernel test robot Signed-off-by: Matthew Wilcox commit 25bbe21bf427a81b8e3ccd480ea0e1d940256156 Author: Matthew Wilcox Date: Fri Nov 16 15:50:02 2018 -0500 dax: Avoid losing wakeup in dax_lock_mapping_entry After calling get_unlocked_entry(), you have to call put_unlocked_entry() to avoid subsequent waiters losing wakeups. Fixes: c2a7d2a11552 ("filesystem-dax: Introduce dax_lock_mapping_entry()") Cc: stable@vger.kernel.org Signed-off-by: Matthew Wilcox commit 614b1868a125a0ba24be08f3a7fa832ddcde6bca Author: Jerome Brunet Date: Tue Nov 13 11:55:36 2018 +0100 pinctrl: meson: fix pull enable register calculation We just changed the code so we apply bias disable on the correct register but forgot to align the register calculation. The result is that we apply the change on the correct register, but possibly at the incorrect offset/bit This went undetected because offsets tends to be the same between REG_PULL and REG_PULLEN for a given pin the EE controller. This is not true for the AO controller. Fixes: e39f9dd8206a ("pinctrl: meson: fix pinconf bias disable") Signed-off-by: Jerome Brunet Acked-by: Neil Armstrong Signed-off-by: Linus Walleij commit 5db0b0a298d26c007e06a96d7e60849b4829a57c Author: Craig Tatlor Date: Mon Nov 12 20:25:53 2018 +0000 pinctrl: sdm660: Set tile property for pingroups This was missed when tiles support was added in a revison and causes the driver to fail to load. Fixes: 9cf0c526bc58 ("pinctrl: qcom: Add sdm660 pinctrl driver") Signed-off-by: Craig Tatlor Reviewed-by: Bjorn Andersson Signed-off-by: Linus Walleij commit 512cab3e7e0be11234f965d9898936dce2325382 Author: Fabio Estevam Date: Sat Nov 10 15:53:59 2018 -0200 ARM: dts: imx51-zii-rdu1: Remove EEPROM node The EEPROM under I2C2 was put by mistake in the dts. Remove it as it is not really present on the real hardware. Fixes: ceef0396f367 ("ARM: dts: imx: add ZII RDU1 board") Reported-by: Chris Healy Signed-off-by: Fabio Estevam Reviewed-by: Chris Healy Signed-off-by: Shawn Guo commit 4d26d1d1e8065bb3326a7c06d5d4698e581443a9 Author: David Herrmann Date: Wed Nov 14 14:16:42 2018 +0100 Revert "HID: uhid: use strlcpy() instead of strncpy()" This reverts commit 336fd4f5f25157e9e8bd50e898a1bbcd99eaea46. Please note that `strlcpy()` does *NOT* do what you think it does. strlcpy() *ALWAYS* reads the full input string, regardless of the 'length' parameter. That is, if the input is not zero-terminated, strlcpy() will *READ* beyond input boundaries. It does this, because it always returns the size it *would* copy if the target was big enough, not the truncated size it actually copied. The original code was perfectly fine. The hid device is zero-initialized and the strncpy() functions copied up to n-1 characters. The result is always zero-terminated this way. This is the third time someone tried to replace strncpy with strlcpy in this function, and gets it wrong. I now added a comment that should at least make people reconsider. Signed-off-by: David Herrmann Signed-off-by: Jiri Kosina commit 8c01db7619f07c85c5cd81ec5eb83608b56c88f5 Author: Eric Biggers Date: Wed Nov 14 13:55:09 2018 -0800 HID: uhid: forbid UHID_CREATE under KERNEL_DS or elevated privileges When a UHID_CREATE command is written to the uhid char device, a copy_from_user() is done from a user pointer embedded in the command. When the address limit is KERNEL_DS, e.g. as is the case during sys_sendfile(), this can read from kernel memory. Alternatively, information can be leaked from a setuid binary that is tricked to write to the file descriptor. Therefore, forbid UHID_CREATE in these cases. No other commands in uhid_char_write() are affected by this bug and UHID_CREATE is marked as "obsolete", so apply the restriction to UHID_CREATE only rather than to uhid_char_write() entirely. Thanks to Dmitry Vyukov for adding uhid definitions to syzkaller and to Jann Horn for commit 9da3f2b740544 ("x86/fault: BUG() when uaccess helpers fault on kernel addresses"), allowing this bug to be found. Reported-by: syzbot+72473edc9bf4eb1c6556@syzkaller.appspotmail.com Fixes: d365c6cfd337 ("HID: uhid: add UHID_CREATE and UHID_DESTROY events") Cc: # v3.6+ Cc: Jann Horn Cc: Andy Lutomirski Signed-off-by: Eric Biggers Reviewed-by: Jann Horn Signed-off-by: Jiri Kosina commit 5305ec6a27b2dc7398a689e661a4a2e951026f09 Author: Adrian Hunter Date: Mon Nov 19 14:53:07 2018 +0200 mmc: sdhci-pci: Workaround GLK firmware failing to restore the tuning value GLK firmware can indicate that the tuning value will be restored after runtime suspend, but not actually do that. Add a workaround that detects such cases, and lets the driver do re-tuning instead. Reported-by: Anisse Astier Tested-by: Anisse Astier Signed-off-by: Adrian Hunter Cc: stable@vger.kernel.org Signed-off-by: Ulf Hansson commit 5bb9b84b0796336b18c8b8651628009eace70202 Author: Clément Péron Date: Sat Nov 17 13:14:52 2018 +0100 MAINTAINERS: add ASoC maintainers for sound dt-bindings Sound dt-bindings are applied by ASoC maintainers and should be submit to ASoC list in addition to the devicetree list. Hence, add this information into the MAINTAINERS file. Signed-off-by: Clément Péron Signed-off-by: Mark Brown commit 21556350ade3cb5d7afecc8b3544e56431d21695 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 (cherry picked from commit 03981c6ebec4fc7056b9b45f847393aeac90d060) Signed-off-by: Joonas Lahtinen commit a6b0961b39896a9f9f1350d26d202f078a7d9dbc Author: Connor McAdams Date: Fri Nov 16 14:24:56 2018 -0500 ALSA: hda/ca0132 - fix AE-5 pincfg This patch fixes the pincfg assignment for the AE-5, which was previously using the Recon3D pincfg's by mistake. Fixes: d06feaf02fe6 ("ALSA: hda/ca0132 - Add pincfg for AE-5") Signed-off-by: Connor McAdams Signed-off-by: Takashi Iwai commit cce997292a5264c5342c968bbd226d7c365f03d6 Author: Connor McAdams Date: Fri Nov 16 14:24:55 2018 -0500 ALSA: hda/ca0132 - Add new ZxR quirk This patch adds a new PCI subsys ID for the ZxR, as found and tested by other users. Without a way to know if any Z's use it as well, it keeps the quirk of QUIRK_SBZ and goes through the HDA subsys test function. Signed-off-by: Connor McAdams Signed-off-by: Takashi Iwai commit cdcefe6bd9df754f528ffc339d3cc143cea4ddf6 Author: Rajat Jain Date: Mon Oct 29 15:17:01 2018 -0700 mmc: sdhci-pci: Try "cd" for card-detect lookup before using NULL Problem: The card detect IRQ does not work with modern BIOS (that want to use _DSD to provide the card detect GPIO to the driver). Details: The mmc core provides the mmc_gpiod_request_cd() API to let host drivers request the gpio descriptor for the "card detect" pin. This pin is specified in the ACPI for the SDHC device: * Either as a resource using _CRS. This is a method used by legacy BIOS. (The driver needs to tell which resource index). * Or as a named property ("cd-gpios"/"cd-gpio") in _DSD (which internally points to an entry in _CRS). This way, the driver can lookup using a string. This is what modern BIOS prefer to use. This API finally results in a call to the following code: struct gpio_desc *acpi_find_gpio(..., const char *con_id,...) { ... /* Lookup gpio (using "-gpio") in the _DSD */ ... if (!acpi_can_fallback_to_crs(adev, con_id)) return ERR_PTR(-ENOENT); ... /* Falling back to _CRS is allowed, Lookup gpio in the _CRS */ ... } Note that this means that if the ACPI has _DSD properties, the kernel will never use _CRS for the lookup (Because acpi_can_fallback_to_crs() will always be false for any device hat has _DSD entries). The SDHCI driver is thus currently broken on a modern BIOS, even if BIOS provides both _CRS (for index based lookup) and _DSD entries (for string based lookup). Ironically, none of these will be used for the lookup currently because: * Since the con_id is NULL, acpi_find_gpio() does not find a matching entry in DSDT. (The _DSDT entry has the property name = "cd-gpios") * Because ACPI contains DSDT entries, thus acpi_can_fallback_to_crs() returns false (because device properties have been populated from _DSD), thus the _CRS is never used for the lookup. Fix: Try "cd" for lookup in the _DSD before falling back to using NULL so as to try looking up in the _CRS. I've tested this patch successfully with both Legacy BIOS (that provide only _CRS method) as well as modern BIOS (that provide both _CRS and _DSD). Also the use of "cd" appears to be fairly consistent across other users of this API (other MMC host controller drivers). Link: https://lkml.org/lkml/2018/9/25/1113 Signed-off-by: Rajat Jain Acked-by: Adrian Hunter Fixes: f10e4bf6632b ("gpio: acpi: Even more tighten up ACPI GPIO lookups") Cc: stable@vger.kernel.org Signed-off-by: Ulf Hansson commit c22397888f1eed98cd59f0a88f2a5f6925f80e15 Author: Chanho Min Date: Mon Nov 12 12:54:45 2018 +0900 exec: make de_thread() freezable Suspend fails due to the exec family of functions blocking the freezer. The casue is that de_thread() sleeps in TASK_UNINTERRUPTIBLE waiting for all sub-threads to die, and we have the deadlock if one of them is frozen. This also can occur with the schedule() waiting for the group thread leader to exit if it is frozen. In our machine, it causes freeze timeout as bellows. Freezing of tasks failed after 20.010 seconds (1 tasks refusing to freeze, wq_busy=0): setcpushares-ls D ffffffc00008ed70 0 5817 1483 0x0040000d Call trace: [] __switch_to+0x88/0xa0 [] __schedule+0x1bc/0x720 [] schedule+0x40/0xa8 [] flush_old_exec+0xdc/0x640 [] load_elf_binary+0x2a8/0x1090 [] search_binary_handler+0x9c/0x240 [] load_script+0x20c/0x228 [] search_binary_handler+0x9c/0x240 [] do_execveat_common.isra.14+0x4f8/0x6e8 [] compat_SyS_execve+0x38/0x48 [] el0_svc_naked+0x24/0x28 To fix this, make de_thread() freezable. It looks safe and works fine. Suggested-by: Oleg Nesterov Signed-off-by: Chanho Min Acked-by: Oleg Nesterov Acked-by: Pavel Machek Acked-by: Michal Hocko Signed-off-by: Rafael J. Wysocki commit d98ccfc3948ab63152494bb6b9c17e15295c0310 Author: Dave Gerlach Date: Tue Nov 13 13:30:40 2018 -0600 cpufreq: ti-cpufreq: Only register platform_device when supported Currently the ti-cpufreq driver blindly registers a 'ti-cpufreq' to force the driver to probe on any platforms where the driver is built in. However, this should only happen on platforms that actually can make use of the driver. There is already functionality in place to match the SoC compatible so let's factor this out into a separate call and make sure we find a match before creating the ti-cpufreq platform device. Reviewed-by: Johan Hovold Signed-off-by: Dave Gerlach Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki commit 6eb5c9b5edffe626d2df6a22f449dc7fab253841 Merge: 9ff01193a20d 622fecbccfe8 Author: Rafael J. Wysocki Date: Mon Nov 19 11:22:04 2018 +0100 Merge branch 'opp/fixes-for-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm Pull operating performance points (OPP) framework fixes for 4.20 from Viresh Kumar. * 'opp/fixes-for-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm: opp: ti-opp-supply: Correct the supply in _get_optimal_vdd_voltage call opp: ti-opp-supply: Dynamically update u_volt_min commit 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() Generic Serial Bus transfers use a data struct like this: struct gsb_buffer { u8 status; u8 len; u8 data[0]; }; acpi_ex_write_data_to_field() copies the data which is to be written from the source-buffer to a temp-buffer. This is done because the OpReg-handler overwrites the status field and some transfers do a write + read-back. Commit f99b89eefeb6 ("ACPICA: Update for generic_serial_bus and attrib_raw_process_bytes protocol") acpi_ex_write_data_to_field() introduces a number of problems with this: 1) It drops a "length += 2" statement used to calculate the temp-buffer size causing the temp-buffer to only be 1/2 bytes large for byte/word transfers while it should be 3/4 bytes (taking the status and len field into account). This is already fixed in commit e324e10109fc ("ACPICA: Update for field unit access") which refactors the code. The ACPI 6.0 spec (ACPI_6.0.pdf) "5.5.2.4.5.2 Declaring and Using a GenericSerialBusData Buffer" (page 232) states that the GenericSerialBus Data Buffer Length field is only valid when doing a Read/Write Block (AttribBlock) transfer, but since the troublesome commit we unconditionally use the len field to determine how much data to copy from the source-buffer into the temp-buffer passed to the OpRegion. This causes 3 further issues: 2) This may lead to not copying enough data to the temp-buffer causing the OpRegion handler for the serial-bus to write garbage to the hardware. 3) The temp-buffer passed to the OpRegion is allocated to the size returned by acpi_ex_get_serial_access_length(), which may be as little as 1, so potentially this may lead to a write overflow of the temp-buffer. 4) Commit e324e10109fc ("ACPICA: Update for field unit access") drops a length check on the source-buffer, leading to a potential read overflow of the source-buffer. This commit fixes all 3 remaining issues by not looking at the len field at all (the interpretation of this field is left up to the OpRegion handler), and copying the minimum of the source- and temp-buffer sizes from the source-buffer to the temp-buffer. This fixes e.g. an Acer S1003 no longer booting since the troublesome commit. Fixes: f99b89eefeb6 (ACPICA: Update for generic_serial_bus and ...) Fixes: e324e10109fc (ACPICA: Update for field unit access) Signed-off-by: Hans de Goede Signed-off-by: Rafael J. Wysocki commit b54e41f5efcb4316b2f30b30c2535cc194270373 Author: Jan Kara Date: Fri Nov 16 13:43:17 2018 +0100 udf: Allow mounting volumes with incorrect identification strings Commit c26f6c615788 ("udf: Fix conversion of 'dstring' fields to UTF8") started to be more strict when checking whether converted strings are properly formatted. Sudip reports that there are DVDs where the volume identification string is actually too long - UDF reports: [ 632.309320] UDF-fs: incorrect dstring lengths (32/32) during mount and fails the mount. This is mostly harmless failure as we don't need volume identification (and even less volume set identification) for anything. So just truncate the volume identification string if it is too long and replace it with 'Invalid' if we just cannot convert it for other reasons. This keeps slightly incorrect media still mountable. CC: stable@vger.kernel.org Fixes: c26f6c615788 ("udf: Fix conversion of 'dstring' fields to UTF8") Reported-and-tested-by: Sudip Mukherjee Signed-off-by: Jan Kara commit 672e60b72bbe7aace88721db55b380b6a51fb8f9 Author: Heiko Stuebner Date: Sun Nov 18 20:03:02 2018 +0100 ARM: dts: rockchip: Remove @0 from the veyron memory node The Coreboot version on veyron ChromeOS devices seems to ignore memory@0 nodes when updating the available memory and instead inserts another memory node without the address. This leads to 4GB systems only ever be using 2GB as the memory@0 node takes precedence. So remove the @0 for veyron devices. Fixes: 0b639b815f15 ("ARM: dts: rockchip: Add missing unit name to memory nodes in rk3288 boards") Cc: stable@vger.kernel.org Reported-by: Heikki Lindholm Signed-off-by: Heiko Stuebner commit 909e22e05353a783c526829427e9a8de122fba9c Author: YueHaibing Date: Mon Nov 19 11:32:41 2018 +0800 exportfs: fix 'passing zero to ERR_PTR()' warning Fix a static code checker warning: fs/exportfs/expfs.c:171 reconnect_one() warn: passing zero to 'ERR_PTR' The error path for lookup_one_len_unlocked failure should set err to PTR_ERR. Fixes: bbf7a8a3562f ("exportfs: move most of reconnect_path to helper function") Signed-off-by: YueHaibing Signed-off-by: Al Viro commit 8ebebcba559a1bfbaec7bbda64feb9870b9c58da Author: Matthew Cover Date: Sun Nov 18 00:46:00 2018 -0700 tuntap: fix multiqueue rx When writing packets to a descriptor associated with a combined queue, the packets should end up on that queue. Before this change all packets written to any descriptor associated with a tap interface end up on rx-0, even when the descriptor is associated with a different queue. The rx traffic can be generated by either of the following. 1. a simple tap program which spins up multiple queues and writes packets to each of the file descriptors 2. tx from a qemu vm with a tap multiqueue netdev The queue for rx traffic can be observed by either of the following (done on the hypervisor in the qemu case). 1. a simple netmap program which opens and reads from per-queue descriptors 2. configuring RPS and doing per-cpu captures with rxtxcpu Alternatively, if you printk() the return value of skb_get_rx_queue() just before each instance of netif_receive_skb() in tun.c, you will get 65535 for every skb. Calling skb_record_rx_queue() to set the rx queue to the queue_index fixes the association between descriptor and rx queue. Signed-off-by: Matthew Cover Signed-off-by: David S. Miller commit 7ddacfa564870cdd97275fd87decb6174abc6380 Author: David Ahern Date: Sun Nov 18 10:45:30 2018 -0800 ipv6: Fix PMTU updates for UDP/raw sockets in presence of VRF Preethi reported that PMTU discovery for UDP/raw applications is not working in the presence of VRF when the socket is not bound to a device. The problem is that ip6_sk_update_pmtu does not consider the L3 domain of the skb device if the socket is not bound. Update the function to set oif to the L3 master device if relevant. Fixes: ca254490c8df ("net: Add VRF support to IPv6 stack") Reported-by: Preethi Ramachandra Signed-off-by: David Ahern Signed-off-by: David S. Miller commit 86322ba9571a36b0b149a5f27fc3423c2dadbe39 Author: Sabyasachi Gupta Date: Sat Nov 3 10:54:52 2018 +0530 arch/sparc: Use kzalloc_node Replaced kmalloc_node + memset with kzalloc_node Signed-off-by: Sabyasachi Gupta Signed-off-by: David S. Miller commit 5478ad10e7850ce3d8b7056db05ddfa3c9ddad9a Author: Thomas Zimmermann Date: Thu Nov 15 11:42:16 2018 +0100 drm/ast: Remove existing framebuffers before loading driver If vesafb attaches to the AST device, it configures the framebuffer memory for uncached access by default. When ast.ko later tries to attach itself to the device, it wants to use write-combining on the framebuffer memory, but vesefb's existing configuration for uncached access takes precedence. This results in reduced performance. Removing the framebuffer's configuration before loding the AST driver fixes the problem. Other DRM drivers already contain equivalent code. Link: https://bugzilla.opensuse.org/show_bug.cgi?id=1112963 Signed-off-by: Thomas Zimmermann Cc: Tested-by: Y.C. Chen Reviewed-by: Jean Delvare Tested-by: Jean Delvare Signed-off-by: Dave Airlie commit 09aaf6813cfca4c18034fda7a43e68763f34abb1 Author: Huacai Chen Date: Thu Nov 15 10:44:57 2018 +0800 hwmon: (w83795) temp4_type has writable permission Both datasheet and comments of store_temp_mode() tell us that temp1~4_type is writable, so fix it. Signed-off-by: Yao Wang Signed-off-by: Huacai Chen Fixes: 39deb6993e7c (" hwmon: (w83795) Simplify temperature sensor type handling") Signed-off-by: Guenter Roeck commit 9ff01193a20d391e8dbce4403dd5ef87c7eaaca6 Author: Linus Torvalds Date: Sun Nov 18 13:33:44 2018 -0800 Linux 4.20-rc3 commit 25e19c1fe421280a47f37c3571aa379e6e67966c Merge: c67a98c00ea3 2121db096301 Author: Linus Torvalds Date: Sun Nov 18 12:21:09 2018 -0800 Merge tag 'libnvdimm-fixes-4.20-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm Pull libnvdimm fixes from Dan Williams: "A small batch of fixes for v4.20-rc3. The overflow continuation fix addresses something that has been broken for several releases. Arguably it could wait even longer, but it's a one line fix and this finishes the last of the known address range scrub bug reports. The revert addresses a lockdep regression. The unit tests are not critical to fix, but no reason to hold this fix back. Summary: - Address Range Scrub overflow continuation handling has been broken since it was initially merged. It was only recently that error injection and platform-BIOS support enabled this corner case to be exercised. - The recent attempt to provide more isolation for the kernel Address Range Scrub state machine from userapace initiated sessions triggers a lockdep report. Revert and try again at the next merge window. - Fix a kasan reported buffer overflow in libnvdimm unit test infrastrucutre (nfit_test)" * tag 'libnvdimm-fixes-4.20-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: Revert "acpi, nfit: Further restrict userspace ARS start requests" acpi, nfit: Fix ARS overflow continuation tools/testing/nvdimm: Fix the array size for dimm devices. commit c67a98c00ea3c1fad14833f440fcd770232d24e7 Merge: 03582f338e39 45e79815b891 Author: Linus Torvalds Date: Sun Nov 18 11:31:26 2018 -0800 Merge branch 'akpm' (patches from Andrew) Merge misc fixes from Andrew Morton: "16 fixes" * emailed patches from Andrew Morton : mm/memblock.c: fix a typo in __next_mem_pfn_range() comments mm, page_alloc: check for max order in hot path scripts/spdxcheck.py: make python3 compliant tmpfs: make lseek(SEEK_DATA/SEK_HOLE) return ENXIO with a negative offset lib/ubsan.c: don't mark __ubsan_handle_builtin_unreachable as noreturn mm/vmstat.c: fix NUMA statistics updates mm/gup.c: fix follow_page_mask() kerneldoc comment ocfs2: free up write context when direct IO failed scripts/faddr2line: fix location of start_kernel in comment mm: don't reclaim inodes with many attached pages mm, memory_hotplug: check zone_movable in has_unmovable_pages mm/swapfile.c: use kvzalloc for swap_info_struct allocation MAINTAINERS: update OMAP MMC entry hugetlbfs: fix kernel BUG at fs/hugetlbfs/inode.c:444! kernel/sched/psi.c: simplify cgroup_move_task() z3fold: fix possible reclaim races commit 03582f338e39ed8f8e8451ef1ef04f060d785a87 Merge: b53e27f618b5 c469933e7721 Author: Linus Torvalds Date: Sun Nov 18 10:58:20 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: "Fix an exec() related scalability/performance regression, which was caused by incorrectly calculating load and migrating tasks on exec() when they shouldn't be" * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched/fair: Fix cpu_util_wake() for 'execl' type workloads commit b53e27f618b58d50db72375eb8e1b6ddcef7cdb5 Merge: 743a4863fddc 4d47d6407ac7 Author: Linus Torvalds Date: Sun Nov 18 10:54:59 2018 -0800 Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf fixes from Ingo Molnar: "Fix uncore PMU enumeration for CofeeLake CPUs" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf/x86/intel/uncore: Support CoffeeLake 8th CBOX perf/x86/intel/uncore: Add more IMC PCI IDs for KabyLake and CoffeeLake CPUs commit 743a4863fddc4fdd591e1cbf4157e981a71b0f09 Merge: cfaa9f029f81 63eb322d89c8 Author: Linus Torvalds Date: Sun Nov 18 10:52:26 2018 -0800 Merge branch 'efi-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull EFI fixes from Ingo Molnar: "Misc fixes: two warning splat fixes, a leak fix and persistent memory allocation fixes for ARM" * 'efi-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: efi: Permit calling efi_mem_reserve_persistent() from atomic context efi/arm: Defer persistent reservations until after paging_init() efi/arm/libstub: Pack FDT after populating it efi/arm: Revert deferred unmap of early memmap mapping efi: Fix debugobjects warning on 'efi_rts_work' commit cfaa9f029f8141e9ee8d621a126d9dd4cc89aa63 Merge: 1ce80e0fe98e 383fb3ee8024 Author: Linus Torvalds Date: Sun Nov 18 10:45:09 2018 -0800 Merge branch 'spectre' of git://git.armlinux.org.uk/~rmk/linux-arm Pull ARM spectre updates from Russell King: "These are the currently known final bits that resolve the Spectre issues. big.Little systems used to be sufficiently identical in that there were no differences between individual CPUs in the system that mattered to the kernel. With the advent of the Spectre problem, the CPUs now have differences in how the workaround is applied. As a result of previous Spectre patches, these systems ended up reporting quite a lot of: "CPUx: Spectre v2: incorrect context switching function, system vulnerable" messages due to the action of the big.Little switcher causing the CPUs to be re-initialised regularly. This series resolves that issue by making the CPU vtable unique to each CPU. However, since this is used very early, before per-cpu is setup, per-cpu can't be used. We also have a problem that two of the methods are not called from preempt-safe paths, but thankfully these remain identical between all CPUs in the system. To make sure, we validate that these are identical during boot" * 'spectre' of git://git.armlinux.org.uk/~rmk/linux-arm: ARM: spectre-v2: per-CPU vtables to work around big.Little systems ARM: add PROC_VTABLE and PROC_TABLE macros ARM: clean up per-processor check_bugs method call ARM: split out processor lookup ARM: make lookup_processor_type() non-__init commit 45e79815b89149dc6698e71b587c86ffaf4062aa Author: Chen Chang Date: Fri Nov 16 15:08:57 2018 -0800 mm/memblock.c: fix a typo in __next_mem_pfn_range() comments Link: http://lkml.kernel.org/r/20181107100247.13359-1-rainccrun@gmail.com Signed-off-by: Chen Chang Acked-by: Michal Hocko Acked-by: Mike Rapoport Reviewed-by: Andrew Morton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c63ae43ba53bc432b414fd73dd5f4b01fcb1ab43 Author: Michal Hocko Date: Fri Nov 16 15:08:53 2018 -0800 mm, page_alloc: check for max order in hot path Konstantin has noticed that kvmalloc might trigger the following warning: WARNING: CPU: 0 PID: 6676 at mm/vmstat.c:986 __fragmentation_index+0x54/0x60 [...] Call Trace: fragmentation_index+0x76/0x90 compaction_suitable+0x4f/0xf0 shrink_node+0x295/0x310 node_reclaim+0x205/0x250 get_page_from_freelist+0x649/0xad0 __alloc_pages_nodemask+0x12a/0x2a0 kmalloc_large_node+0x47/0x90 __kmalloc_node+0x22b/0x2e0 kvmalloc_node+0x3e/0x70 xt_alloc_table_info+0x3a/0x80 [x_tables] do_ip6t_set_ctl+0xcd/0x1c0 [ip6_tables] nf_setsockopt+0x44/0x60 SyS_setsockopt+0x6f/0xc0 do_syscall_64+0x67/0x120 entry_SYSCALL_64_after_hwframe+0x3d/0xa2 the problem is that we only check for an out of bound order in the slow path and the node reclaim might happen from the fast path already. This is fixable by making sure that kvmalloc doesn't ever use kmalloc for requests that are larger than KMALLOC_MAX_SIZE but this also shows that the code is rather fragile. A recent UBSAN report just underlines that by the following report UBSAN: Undefined behaviour in mm/page_alloc.c:3117:19 shift exponent 51 is too large for 32-bit type 'int' CPU: 0 PID: 6520 Comm: syz-executor1 Not tainted 4.19.0-rc2 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0xd2/0x148 lib/dump_stack.c:113 ubsan_epilogue+0x12/0x94 lib/ubsan.c:159 __ubsan_handle_shift_out_of_bounds+0x2b6/0x30b lib/ubsan.c:425 __zone_watermark_ok+0x2c7/0x400 mm/page_alloc.c:3117 zone_watermark_fast mm/page_alloc.c:3216 [inline] get_page_from_freelist+0xc49/0x44c0 mm/page_alloc.c:3300 __alloc_pages_nodemask+0x21e/0x640 mm/page_alloc.c:4370 alloc_pages_current+0xcc/0x210 mm/mempolicy.c:2093 alloc_pages include/linux/gfp.h:509 [inline] __get_free_pages+0x12/0x60 mm/page_alloc.c:4414 dma_mem_alloc+0x36/0x50 arch/x86/include/asm/floppy.h:156 raw_cmd_copyin drivers/block/floppy.c:3159 [inline] raw_cmd_ioctl drivers/block/floppy.c:3206 [inline] fd_locked_ioctl+0xa00/0x2c10 drivers/block/floppy.c:3544 fd_ioctl+0x40/0x60 drivers/block/floppy.c:3571 __blkdev_driver_ioctl block/ioctl.c:303 [inline] blkdev_ioctl+0xb3c/0x1a30 block/ioctl.c:601 block_ioctl+0x105/0x150 fs/block_dev.c:1883 vfs_ioctl fs/ioctl.c:46 [inline] do_vfs_ioctl+0x1c0/0x1150 fs/ioctl.c:687 ksys_ioctl+0x9e/0xb0 fs/ioctl.c:702 __do_sys_ioctl fs/ioctl.c:709 [inline] __se_sys_ioctl fs/ioctl.c:707 [inline] __x64_sys_ioctl+0x7e/0xc0 fs/ioctl.c:707 do_syscall_64+0xc4/0x510 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe Note that this is not a kvmalloc path. It is just that the fast path really depends on having sanitzed order as well. Therefore move the order check to the fast path. Link: http://lkml.kernel.org/r/20181113094305.GM15120@dhcp22.suse.cz Signed-off-by: Michal Hocko Reported-by: Konstantin Khlebnikov Reported-by: Kyungtae Kim Acked-by: Vlastimil Babka Cc: Balbir Singh Cc: Mel Gorman Cc: Pavel Tatashin Cc: Oscar Salvador Cc: Mike Rapoport Cc: Aaron Lu Cc: Joonsoo Kim Cc: Byoungyoung Lee Cc: "Dae R. Jeong" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6f4d29df66acd49303a99025046b85cabe7aa17a Author: Uwe Kleine-König Date: Fri Nov 16 15:08:43 2018 -0800 scripts/spdxcheck.py: make python3 compliant Without this change the following happens when using Python3 (3.6.6): $ echo "GPL-2.0" | python3 scripts/spdxcheck.py - FAIL: 'str' object has no attribute 'decode' Traceback (most recent call last): File "scripts/spdxcheck.py", line 253, in parser.parse_lines(sys.stdin, args.maxlines, '-') File "scripts/spdxcheck.py", line 171, in parse_lines line = line.decode(locale.getpreferredencoding(False), errors='ignore') AttributeError: 'str' object has no attribute 'decode' So as the line is already a string, there is no need to decode it and the line can be dropped. /usr/bin/python on Arch is Python 3. So this would indeed be worth going into 4.19. Link: http://lkml.kernel.org/r/20181023070802.22558-1-u.kleine-koenig@pengutronix.de Signed-off-by: Uwe Kleine-König Cc: Thomas Gleixner Cc: Joe Perches Cc: Greg Kroah-Hartman Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1a413646931cb14442065cfc17561e50f5b5bb44 Author: Yufen Yu Date: Fri Nov 16 15:08:39 2018 -0800 tmpfs: make lseek(SEEK_DATA/SEK_HOLE) return ENXIO with a negative offset Other filesystems such as ext4, f2fs and ubifs all return ENXIO when lseek (SEEK_DATA or SEEK_HOLE) requests a negative offset. man 2 lseek says : EINVAL whence is not valid. Or: the resulting file offset would be : negative, or beyond the end of a seekable device. : : ENXIO whence is SEEK_DATA or SEEK_HOLE, and the file offset is beyond : the end of the file. Make tmpfs return ENXIO under these circumstances as well. After this, tmpfs also passes xfstests's generic/448. [akpm@linux-foundation.org: rewrite changelog] Link: http://lkml.kernel.org/r/1540434176-14349-1-git-send-email-yuyufen@huawei.com Signed-off-by: Yufen Yu Reviewed-by: Andrew Morton Cc: Al Viro Cc: Hugh Dickins Cc: William Kucharski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1c23b4108d716cc848b38532063a8aca4f86add8 Author: Arnd Bergmann Date: Fri Nov 16 15:08:35 2018 -0800 lib/ubsan.c: don't mark __ubsan_handle_builtin_unreachable as noreturn gcc-8 complains about the prototype for this function: lib/ubsan.c:432:1: error: ignoring attribute 'noreturn' in declaration of a built-in function '__ubsan_handle_builtin_unreachable' because it conflicts with attribute 'const' [-Werror=attributes] This is actually a GCC's bug. In GCC internals __ubsan_handle_builtin_unreachable() declared with both 'noreturn' and 'const' attributes instead of only 'noreturn': https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84210 Workaround this by removing the noreturn attribute. [aryabinin: add information about GCC bug in changelog] Link: http://lkml.kernel.org/r/20181107144516.4587-1-aryabinin@virtuozzo.com Signed-off-by: Arnd Bergmann Signed-off-by: Andrey Ryabinin Acked-by: Olof Johansson Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 13c9aaf7fa01cc7600c61981609feadeef3354ec Author: Janne Huttunen Date: Fri Nov 16 15:08:32 2018 -0800 mm/vmstat.c: fix NUMA statistics updates Scan through the whole array to see if an update is needed. While we're at it, use sizeof() to be safe against any possible type changes in the future. The bug here is that we wouldn't sync per-cpu counters into global ones if there was an update of numa_stats for higher cpus. Highly theoretical one though because it is much more probable that zone_stats are updated so we would refresh anyway. So I wouldn't bother to mark this for stable, yet something nice to fix. [mhocko@suse.com: changelog enhancement] Link: http://lkml.kernel.org/r/1541601517-17282-1-git-send-email-janne.huttunen@nokia.com Fixes: 1d90ca897cb0 ("mm: update NUMA counter threshold size") Signed-off-by: Janne Huttunen Acked-by: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 78179556e7605ba07fd3ddba6ab8891fa457b93e Author: Mike Rapoport Date: Fri Nov 16 15:08:29 2018 -0800 mm/gup.c: fix follow_page_mask() kerneldoc comment Commit df06b37ffe5a ("mm/gup: cache dev_pagemap while pinning pages") modified the signature of follow_page_mask() but left the parameter description behind. Update the description to make the code and comments agree again. While at it, update formatting of the return value description to match Documentation/doc-guide/kernel-doc.rst guidelines. Link: http://lkml.kernel.org/r/1541603316-27832-1-git-send-email-rppt@linux.ibm.com Signed-off-by: Mike Rapoport Reviewed-by: Andrew Morton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5040f8df56fb90c7919f1c9b0b6e54c843437456 Author: Wengang Wang Date: Fri Nov 16 15:08:25 2018 -0800 ocfs2: free up write context when direct IO failed The write context should also be freed even when direct IO failed. Otherwise a memory leak is introduced and entries remain in oi->ip_unwritten_list causing the following BUG later in unlink path: ERROR: bug expression: !list_empty(&oi->ip_unwritten_list) ERROR: Clear inode of 215043, inode has unwritten extents ... Call Trace: ? __set_current_blocked+0x42/0x68 ocfs2_evict_inode+0x91/0x6a0 [ocfs2] ? bit_waitqueue+0x40/0x33 evict+0xdb/0x1af iput+0x1a2/0x1f7 do_unlinkat+0x194/0x28f SyS_unlinkat+0x1b/0x2f do_syscall_64+0x79/0x1ae entry_SYSCALL_64_after_hwframe+0x151/0x0 This patch also logs, with frequency limit, direct IO failures. Link: http://lkml.kernel.org/r/20181102170632.25921-1-wen.gang.wang@oracle.com Signed-off-by: Wengang Wang Reviewed-by: Junxiao Bi Reviewed-by: Changwei Ge Reviewed-by: Joseph Qi Cc: Mark Fasheh Cc: Joel Becker Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f5f67cc0e0d3d17ee046ba83f831f267767b8554 Author: Randy Dunlap Date: Fri Nov 16 15:08:22 2018 -0800 scripts/faddr2line: fix location of start_kernel in comment Fix a source file reference location to the correct path name. Link: http://lkml.kernel.org/r/1d50bd3d-178e-dcd8-779f-9711887440eb@infradead.org Signed-off-by: Randy Dunlap Acked-by: Josh Poimboeuf Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a76cf1a474d7dbcd9336b5f5afb0162baa142cf0 Author: Roman Gushchin Date: Fri Nov 16 15:08:18 2018 -0800 mm: don't reclaim inodes with many attached pages Spock reported that commit 172b06c32b94 ("mm: slowly shrink slabs with a relatively small number of objects") leads to a regression on his setup: periodically the majority of the pagecache is evicted without an obvious reason, while before the change the amount of free memory was balancing around the watermark. The reason behind is that the mentioned above change created some minimal background pressure on the inode cache. The problem is that if an inode is considered to be reclaimed, all belonging pagecache page are stripped, no matter how many of them are there. So, if a huge multi-gigabyte file is cached in the memory, and the goal is to reclaim only few slab objects (unused inodes), we still can eventually evict all gigabytes of the pagecache at once. The workload described by Spock has few large non-mapped files in the pagecache, so it's especially noticeable. To solve the problem let's postpone the reclaim of inodes, which have more than 1 attached page. Let's wait until the pagecache pages will be evicted naturally by scanning the corresponding LRU lists, and only then reclaim the inode structure. Link: http://lkml.kernel.org/r/20181023164302.20436-1-guro@fb.com Signed-off-by: Roman Gushchin Reported-by: Spock Tested-by: Spock Reviewed-by: Andrew Morton Cc: Michal Hocko Cc: Rik van Riel Cc: Randy Dunlap Cc: [4.19.x] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9d7899999c62c1a81129b76d2a6ecbc4655e1597 Author: Michal Hocko Date: Fri Nov 16 15:08:15 2018 -0800 mm, memory_hotplug: check zone_movable in has_unmovable_pages Page state checks are racy. Under a heavy memory workload (e.g. stress -m 200 -t 2h) it is quite easy to hit a race window when the page is allocated but its state is not fully populated yet. A debugging patch to dump the struct page state shows has_unmovable_pages: pfn:0x10dfec00, found:0x1, count:0x0 page:ffffea0437fb0000 count:1 mapcount:1 mapping:ffff880e05239841 index:0x7f26e5000 compound_mapcount: 1 flags: 0x5fffffc0090034(uptodate|lru|active|head|swapbacked) Note that the state has been checked for both PageLRU and PageSwapBacked already. Closing this race completely would require some sort of retry logic. This can be tricky and error prone (think of potential endless or long taking loops). Workaround this problem for movable zones at least. Such a zone should only contain movable pages. Commit 15c30bc09085 ("mm, memory_hotplug: make has_unmovable_pages more robust") has told us that this is not strictly true though. Bootmem pages should be marked reserved though so we can move the original check after the PageReserved check. Pages from other zones are still prone to races but we even do not pretend that memory hotremove works for those so pre-mature failure doesn't hurt that much. Link: http://lkml.kernel.org/r/20181106095524.14629-1-mhocko@kernel.org Fixes: 15c30bc09085 ("mm, memory_hotplug: make has_unmovable_pages more robust") Signed-off-by: Michal Hocko Reported-by: Baoquan He Tested-by: Baoquan He Acked-by: Baoquan He Reviewed-by: Oscar Salvador Acked-by: Balbir Singh Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 873d7bcfd066663e3e50113dc4a0de19289b6354 Author: Vasily Averin Date: Fri Nov 16 15:08:11 2018 -0800 mm/swapfile.c: use kvzalloc for swap_info_struct allocation Commit a2468cc9bfdf ("swap: choose swap device according to numa node") changed 'avail_lists' field of 'struct swap_info_struct' to an array. In popular linux distros it increased size of swap_info_struct up to 40 Kbytes and now swap_info_struct allocation requires order-4 page. Switch to kvzmalloc allows to avoid unexpected allocation failures. Link: http://lkml.kernel.org/r/fc23172d-3c75-21e2-d551-8b1808cbe593@virtuozzo.com Fixes: a2468cc9bfdf ("swap: choose swap device according to numa node") Signed-off-by: Vasily Averin Acked-by: Aaron Lu Acked-by: Michal Hocko Reviewed-by: Andrew Morton Cc: Huang Ying Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f341e16fb67ddc199582d187b0d39120a9dfd2bf Author: Aaro Koskinen Date: Fri Nov 16 15:08:08 2018 -0800 MAINTAINERS: update OMAP MMC entry Jarkko's e-mail address hasn't worked for a long time. We still want to keep this driver working as it is critical for some of the OMAP boards. I use and test this driver frequently, so change myself as a maintainer with "Odd Fixes" status. Link: http://lkml.kernel.org/r/20181106222750.12939-1-aaro.koskinen@iki.fi Signed-off-by: Aaro Koskinen Acked-by: Tony Lindgren Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5e41540c8a0f0e98c337dda8b391e5dda0cde7cf Author: Mike Kravetz Date: Fri Nov 16 15:08:04 2018 -0800 hugetlbfs: fix kernel BUG at fs/hugetlbfs/inode.c:444! This bug has been experienced several times by the Oracle DB team. The BUG is in remove_inode_hugepages() as follows: /* * If page is mapped, it was faulted in after being * unmapped in caller. Unmap (again) now after taking * the fault mutex. The mutex will prevent faults * until we finish removing the page. * * This race can only happen in the hole punch case. * Getting here in a truncate operation is a bug. */ if (unlikely(page_mapped(page))) { BUG_ON(truncate_op); In this case, the elevated map count is not the result of a race. Rather it was incorrectly incremented as the result of a bug in the huge pmd sharing code. Consider the following: - Process A maps a hugetlbfs file of sufficient size and alignment (PUD_SIZE) that a pmd page could be shared. - Process B maps the same hugetlbfs file with the same size and alignment such that a pmd page is shared. - Process B then calls mprotect() to change protections for the mapping with the shared pmd. As a result, the pmd is 'unshared'. - Process B then calls mprotect() again to chage protections for the mapping back to their original value. pmd remains unshared. - Process B then forks and process C is created. During the fork process, we do dup_mm -> dup_mmap -> copy_page_range to copy page tables. Copying page tables for hugetlb mappings is done in the routine copy_hugetlb_page_range. In copy_hugetlb_page_range(), the destination pte is obtained by: dst_pte = huge_pte_alloc(dst, addr, sz); If pmd sharing is possible, the returned pointer will be to a pte in an existing page table. In the situation above, process C could share with either process A or process B. Since process A is first in the list, the returned pte is a pointer to a pte in process A's page table. However, the check for pmd sharing in copy_hugetlb_page_range is: /* If the pagetables are shared don't copy or take references */ if (dst_pte == src_pte) continue; Since process C is sharing with process A instead of process B, the above test fails. The code in copy_hugetlb_page_range which follows assumes dst_pte points to a huge_pte_none pte. It copies the pte entry from src_pte to dst_pte and increments this map count of the associated page. This is how we end up with an elevated map count. To solve, check the dst_pte entry for huge_pte_none. If !none, this implies PMD sharing so do not copy. Link: http://lkml.kernel.org/r/20181105212315.14125-1-mike.kravetz@oracle.com Fixes: c5c99429fa57 ("fix hugepages leak due to pagetable page sharing") Signed-off-by: Mike Kravetz Reviewed-by: Naoya Horiguchi Cc: Michal Hocko Cc: Hugh Dickins Cc: Andrea Arcangeli Cc: "Kirill A . Shutemov" Cc: Davidlohr Bueso Cc: Prakash Sangappa Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8fcb2312d1e3300e81aa871aad00d4c038cfc184 Author: Olof Johansson Date: Fri Nov 16 15:08:00 2018 -0800 kernel/sched/psi.c: simplify cgroup_move_task() The existing code triggered an invalid warning about 'rq' possibly being used uninitialized. Instead of doing the silly warning suppression by initializa it to NULL, refactor the code to bail out early instead. Warning was: kernel/sched/psi.c: In function `cgroup_move_task': kernel/sched/psi.c:639:13: warning: `rq' may be used uninitialized in this function [-Wmaybe-uninitialized] Link: http://lkml.kernel.org/r/20181103183339.8669-1-olof@lixom.net Fixes: 2ce7135adc9ad ("psi: cgroup support") Signed-off-by: Olof Johansson Reviewed-by: Andrew Morton Acked-by: Johannes Weiner Cc: Ingo Molnar Cc: Peter Zijlstra Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ca0246bb97c23da9d267c2107c07fb77e38205c9 Author: Vitaly Wool Date: Fri Nov 16 15:07:56 2018 -0800 z3fold: fix possible reclaim races Reclaim and free can race on an object which is basically fine but in order for reclaim to be able to map "freed" object we need to encode object length in the handle. handle_to_chunks() is then introduced to extract object length from a handle and use it during mapping. Moreover, to avoid racing on a z3fold "headless" page release, we should not try to free that page in z3fold_free() if the reclaim bit is set. Also, in the unlikely case of trying to reclaim a page being freed, we should not proceed with that page. While at it, fix the page accounting in reclaim function. This patch supersedes "[PATCH] z3fold: fix reclaim lock-ups". Link: http://lkml.kernel.org/r/20181105162225.74e8837d03583a9b707cf559@gmail.com Signed-off-by: Vitaly Wool Signed-off-by: Jongseok Kim Reported-by-by: Jongseok Kim Reviewed-by: Snild Dolkow Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 33bf5519ae5dd356b182a94e3622f42860274a38 Author: Olof Johansson Date: Fri Nov 16 19:43:27 2018 -0800 mtd: rawnand: qcom: Namespace prefix some commands PAGE_READ is used by RISC-V arch code included through mm headers, and it makes sense to bring in a prefix on these in the driver. drivers/mtd/nand/raw/qcom_nandc.c:153: warning: "PAGE_READ" redefined #define PAGE_READ 0x2 In file included from include/linux/memremap.h:7, from include/linux/mm.h:27, from include/linux/scatterlist.h:8, from include/linux/dma-mapping.h:11, from drivers/mtd/nand/raw/qcom_nandc.c:17: arch/riscv/include/asm/pgtable.h:48: note: this is the location of the previous definition Caught by riscv allmodconfig. Signed-off-by: Olof Johansson Reviewed-by: Miquel Raynal Signed-off-by: Boris Brezillon commit 5d1e9c2212ea6b4dd735e4fc3dd6279a365d5d10 Author: Johan Hovold Date: Mon Aug 27 10:21:49 2018 +0200 mtd: rawnand: atmel: fix OF child-node lookup Use the new of_get_compatible_child() helper to lookup the nfc child node instead of using of_find_compatible_node(), which searches the entire tree from a given start node and thus can return an unrelated (i.e. non-child) node. This also addresses a potential use-after-free (e.g. after probe deferral) as the tree-wide helper drops a reference to its first argument (i.e. the node of the device being probed). While at it, also fix a related nfc-node reference leak. Fixes: f88fc122cc34 ("mtd: nand: Cleanup/rework the atmel_nand driver") Cc: stable # 4.11 Cc: Nicolas Ferre Cc: Josh Wu Cc: Boris Brezillon Signed-off-by: Johan Hovold Signed-off-by: Boris Brezillon commit 1c1274a56999fbdf9cf84e332b28448bb2d55221 Author: Jon Maloy Date: Sat Nov 17 12:17:06 2018 -0500 tipc: don't assume linear buffer when reading ancillary data The code for reading ancillary data from a received buffer is assuming the buffer is linear. To make this assumption true we have to linearize the buffer before message data is read. Signed-off-by: Jon Maloy Signed-off-by: David S. Miller commit adba75be0d23cca92a028749d92c60c8909bbdb3 Author: Jon Maloy Date: Fri Nov 16 16:55:04 2018 -0500 tipc: fix lockdep warning when reinitilaizing sockets We get the following warning: [ 47.926140] 32-bit node address hash set to 2010a0a [ 47.927202] [ 47.927433] ================================ [ 47.928050] WARNING: inconsistent lock state [ 47.928661] 4.19.0+ #37 Tainted: G E [ 47.929346] -------------------------------- [ 47.929954] inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage. [ 47.930116] swapper/3/0 [HC0[0]:SC1[3]:HE1:SE0] takes: [ 47.930116] 00000000af8bc31e (&(&ht->lock)->rlock){+.?.}, at: rhashtable_walk_enter+0x36/0xb0 [ 47.930116] {SOFTIRQ-ON-W} state was registered at: [ 47.930116] _raw_spin_lock+0x29/0x60 [ 47.930116] rht_deferred_worker+0x556/0x810 [ 47.930116] process_one_work+0x1f5/0x540 [ 47.930116] worker_thread+0x64/0x3e0 [ 47.930116] kthread+0x112/0x150 [ 47.930116] ret_from_fork+0x3a/0x50 [ 47.930116] irq event stamp: 14044 [ 47.930116] hardirqs last enabled at (14044): [] __local_bh_enable_ip+0x7a/0xf0 [ 47.938117] hardirqs last disabled at (14043): [] __local_bh_enable_ip+0x41/0xf0 [ 47.938117] softirqs last enabled at (14028): [] irq_enter+0x5e/0x60 [ 47.938117] softirqs last disabled at (14029): [] irq_exit+0xb5/0xc0 [ 47.938117] [ 47.938117] other info that might help us debug this: [ 47.938117] Possible unsafe locking scenario: [ 47.938117] [ 47.938117] CPU0 [ 47.938117] ---- [ 47.938117] lock(&(&ht->lock)->rlock); [ 47.938117] [ 47.938117] lock(&(&ht->lock)->rlock); [ 47.938117] [ 47.938117] *** DEADLOCK *** [ 47.938117] [ 47.938117] 2 locks held by swapper/3/0: [ 47.938117] #0: 0000000062c64f90 ((&d->timer)){+.-.}, at: call_timer_fn+0x5/0x280 [ 47.938117] #1: 00000000ee39619c (&(&d->lock)->rlock){+.-.}, at: tipc_disc_timeout+0xc8/0x540 [tipc] [ 47.938117] [ 47.938117] stack backtrace: [ 47.938117] CPU: 3 PID: 0 Comm: swapper/3 Tainted: G E 4.19.0+ #37 [ 47.938117] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 47.938117] Call Trace: [ 47.938117] [ 47.938117] dump_stack+0x5e/0x8b [ 47.938117] print_usage_bug+0x1ed/0x1ff [ 47.938117] mark_lock+0x5b5/0x630 [ 47.938117] __lock_acquire+0x4c0/0x18f0 [ 47.938117] ? lock_acquire+0xa6/0x180 [ 47.938117] lock_acquire+0xa6/0x180 [ 47.938117] ? rhashtable_walk_enter+0x36/0xb0 [ 47.938117] _raw_spin_lock+0x29/0x60 [ 47.938117] ? rhashtable_walk_enter+0x36/0xb0 [ 47.938117] rhashtable_walk_enter+0x36/0xb0 [ 47.938117] tipc_sk_reinit+0xb0/0x410 [tipc] [ 47.938117] ? mark_held_locks+0x6f/0x90 [ 47.938117] ? __local_bh_enable_ip+0x7a/0xf0 [ 47.938117] ? lockdep_hardirqs_on+0x20/0x1a0 [ 47.938117] tipc_net_finalize+0xbf/0x180 [tipc] [ 47.938117] tipc_disc_timeout+0x509/0x540 [tipc] [ 47.938117] ? call_timer_fn+0x5/0x280 [ 47.938117] ? tipc_disc_msg_xmit.isra.19+0xa0/0xa0 [tipc] [ 47.938117] ? tipc_disc_msg_xmit.isra.19+0xa0/0xa0 [tipc] [ 47.938117] call_timer_fn+0xa1/0x280 [ 47.938117] ? tipc_disc_msg_xmit.isra.19+0xa0/0xa0 [tipc] [ 47.938117] run_timer_softirq+0x1f2/0x4d0 [ 47.938117] __do_softirq+0xfc/0x413 [ 47.938117] irq_exit+0xb5/0xc0 [ 47.938117] smp_apic_timer_interrupt+0xac/0x210 [ 47.938117] apic_timer_interrupt+0xf/0x20 [ 47.938117] [ 47.938117] RIP: 0010:default_idle+0x1c/0x140 [ 47.938117] Code: 90 90 90 90 90 90 90 90 90 90 90 90 90 90 0f 1f 44 00 00 41 54 55 53 65 8b 2d d8 2b 74 65 0f 1f 44 00 00 e8 c6 2c 8b ff fb f4 <65> 8b 2d c5 2b 74 65 0f 1f 44 00 00 5b 5d 41 5c c3 65 8b 05 b4 2b [ 47.938117] RSP: 0018:ffffaf6ac0207ec8 EFLAGS: 00000206 ORIG_RAX: ffffffffffffff13 [ 47.938117] RAX: ffff8f5b3735e200 RBX: 0000000000000003 RCX: 0000000000000001 [ 47.938117] RDX: 0000000000000001 RSI: 0000000000000001 RDI: ffff8f5b3735e200 [ 47.938117] RBP: 0000000000000003 R08: 0000000000000001 R09: 0000000000000000 [ 47.938117] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 [ 47.938117] R13: 0000000000000000 R14: ffff8f5b3735e200 R15: ffff8f5b3735e200 [ 47.938117] ? default_idle+0x1a/0x140 [ 47.938117] do_idle+0x1bc/0x280 [ 47.938117] cpu_startup_entry+0x19/0x20 [ 47.938117] start_secondary+0x187/0x1c0 [ 47.938117] secondary_startup_64+0xa4/0xb0 The reason seems to be that tipc_net_finalize()->tipc_sk_reinit() is calling the function rhashtable_walk_enter() within a timer interrupt. We fix this by executing tipc_net_finalize() in work queue context. Acked-by: Ying Xue Signed-off-by: Jon Maloy Signed-off-by: David S. Miller commit 33d9a2c72f086cbf1087b2fd2d1a15aa9df14a7f Author: Eric Dumazet Date: Sat Nov 17 21:57:02 2018 -0800 net-gro: reset skb->pkt_type in napi_reuse_skb() eth_type_trans() assumes initial value for skb->pkt_type is PACKET_HOST. This is indeed the value right after a fresh skb allocation. However, it is possible that GRO merged a packet with a different value (like PACKET_OTHERHOST in case macvlan is used), so we need to make sure napi->skb will have pkt_type set back to PACKET_HOST. Otherwise, valid packets might be dropped by the stack because their pkt_type is not PACKET_HOST. napi_reuse_skb() was added in commit 96e93eab2033 ("gro: Add internal interfaces for VLAN"), but this bug always has been there. Fixes: 96e93eab2033 ("gro: Add internal interfaces for VLAN") Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit 5396527f8c002018bcfc9576b4c151a0695e7db4 Merge: 16f7eb2b77b5 c6cecf4ae44e Author: David S. Miller Date: Sat Nov 17 21:54:53 2018 -0800 Merge branch 'tdc-fixes' Lucas Bates says: ==================== Prevent uncaught exceptions in tdc This patch series addresses two potential bugs in tdc that can cause exceptions to be raised in certain circumstances. These exceptions are generally not handled, so instead we will prevent them from being raised. ==================== Signed-off-by: David S. Miller commit c6cecf4ae44e4ce9158ef8806358142c3512cd33 Author: Brenda J. Butler Date: Fri Nov 16 17:37:56 2018 -0500 tc-testing: tdc.py: Guard against lack of returncode in executed command Add some defensive coding in case one of the subprocesses created by tdc returns nothing. If no object is returned from exec_cmd, then tdc will halt with an unhandled exception. Signed-off-by: Brenda J. Butler Signed-off-by: Lucas Bates Signed-off-by: David S. Miller commit 5aaf6428526bcad98d6f51f2f679c919bb75d7e9 Author: Lucas Bates Date: Fri Nov 16 17:37:55 2018 -0500 tc-testing: tdc.py: ignore errors when decoding stdout/stderr Prevent exceptions from being raised while decoding output from an executed command. There is no impact on tdc's execution and the verify command phase would fail the pattern match. Signed-off-by: Lucas Bates Signed-off-by: David S. Miller commit 16f7eb2b77b55da816c4e207f3f9440a8cafc00a Author: Sabrina Dubroca Date: Fri Nov 16 16:58:19 2018 +0100 ip_tunnel: don't force DF when MTU is locked The various types of tunnels running over IPv4 can ask to set the DF bit to do PMTU discovery. However, PMTU discovery is subject to the threshold set by the net.ipv4.route.min_pmtu sysctl, and is also disabled on routes with "mtu lock". In those cases, we shouldn't set the DF bit. This patch makes setting the DF bit conditional on the route's MTU locking state. This issue seems to be older than git history. Signed-off-by: Sabrina Dubroca Reviewed-by: Stefano Brivio Signed-off-by: David S. Miller commit 8840c3e2344a456267d7989b97d097e798b28b0b Author: Toke Høiland-Jørgensen Date: Fri Nov 16 12:13:59 2018 -0800 MAINTAINERS: Add entry for CAKE qdisc We would like the existing community to be kept in the loop for any new developments on CAKE; and I certainly plan to keep maintaining it. Reflect this in MAINTAINERS. Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: David S. Miller commit 9d332e69c1dc74dcd748de7cbd2dac5c61bda265 Author: Nikolay Aleksandrov Date: Fri Nov 16 18:50:01 2018 +0200 net: bridge: fix vlan stats use-after-free on destruction Syzbot reported a use-after-free of the global vlan context on port vlan destruction. When I added per-port vlan stats I missed the fact that the global vlan context can be freed before the per-port vlan rcu callback. There're a few different ways to deal with this, I've chosen to add a new private flag that is set only when per-port stats are allocated so we can directly check it on destruction without dereferencing the global context at all. The new field in net_bridge_vlan uses a hole. v2: cosmetic change, move the check to br_process_vlan_info where the other checks are done v3: add change log in the patch, add private (in-kernel only) flags in a hole in net_bridge_vlan struct and use that instead of mixing user-space flags with private flags Fixes: 9163a0fc1f0c ("net: bridge: add support for per-port vlan stats") Reported-by: syzbot+04681da557a0e49a52e5@syzkaller.appspotmail.com Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit 95506588d2c1d72ca29adef8ae9bf771bcfb4ced Author: Slavomir Kaslev Date: Fri Nov 16 11:27:53 2018 +0200 socket: do a generic_file_splice_read when proto_ops has no splice_read splice(2) fails with -EINVAL when called reading on a socket with no splice_read set in its proto_ops (such as vsock sockets). Switch this to fallbacks to a generic_file_splice_read instead. Signed-off-by: Slavomir Kaslev Signed-off-by: David S. Miller commit df5a8ec64eed7fe45b556cfff503acd6429ab817 Author: Martin Schiller Date: Fri Nov 16 08:38:36 2018 +0100 net: phy: mdio-gpio: Fix working over slow can_sleep GPIOs Up until commit 7e5fbd1e0700 ("net: mdio-gpio: Convert to use gpiod functions where possible"), the _cansleep variants of the gpio_ API was used. After that commit and the change to gpiod_ API, the _cansleep() was dropped. This then results in WARN_ON() when used with GPIO devices which do sleep. Add back the _cansleep() to avoid this. Fixes: 7e5fbd1e0700 ("net: mdio-gpio: Convert to use gpiod functions where possible") Signed-off-by: Martin Schiller Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit b4e955e9f372035361fbc6f07b21fe2cc6a5be4a Author: Taehee Yoo Date: Fri Nov 16 21:32:35 2018 +0900 netfilter: xt_hashlimit: fix a possible memory leak in htable_create() In the htable_create(), hinfo is allocated by vmalloc() So that if error occurred, hinfo should be freed. Fixes: 11d5f15723c9 ("netfilter: xt_hashlimit: Create revision 2 to support higher pps rates") Signed-off-by: Taehee Yoo Signed-off-by: Pablo Neira Ayuso commit 0e40de0338d005f73d46898a21544cd26f01b4ce Author: Matthew Wilcox Date: Fri Nov 16 15:19:13 2018 -0500 dax: Fix huge page faults Using xas_load() with a PMD-sized xa_state would work if either a PMD-sized entry was present or a PTE sized entry was present in the first 64 entries (of the 512 PTEs in a PMD on x86). If there was no PTE in the first 64 entries, grab_mapping_entry() would believe there were no entries present, allocate a PMD-sized entry and overwrite the PTE in the page cache. Use xas_find_conflict() instead which turns out to simplify both get_unlocked_entry() and grab_mapping_entry(). Also remove a WARN_ON_ONCE from grab_mapping_entry() as it will have already triggered in get_unlocked_entry(). Fixes: cfc93c6c6c96 ("dax: Convert dax_insert_pfn_mkwrite to XArray") Signed-off-by: Matthew Wilcox commit fda490d39fc0668d92e170d95c11e35a010019aa Author: Matthew Wilcox Date: Fri Nov 16 15:07:31 2018 -0500 dax: Fix dax_unlock_mapping_entry for PMD pages Device DAX PMD pages do not set the PageHead bit for compound pages. Fix for now by retrieving the PMD bit from the entry, but eventually we will be passed the page size by the caller. Reported-by: Dan Williams Fixes: 9f32d221301c ("dax: Convert dax_lock_mapping_entry to XArray") Signed-off-by: Matthew Wilcox commit 53fffe29a9e664a999dd3787e4428da8c30533e0 Author: Jens Axboe Date: Sat Nov 17 07:43:42 2018 -0700 aio: fix failure to put the file pointer If the ioprio capability check fails, we return without putting the file pointer. Fixes: d9a08a9e616b ("fs: Add aio iopriority support") Signed-off-by: Jens Axboe Signed-off-by: Al Viro commit 160396a722e0c4dfd462f3eec779251bf944f438 Author: David S. Miller Date: Fri Nov 16 23:04:37 2018 -0800 Revert "net: phy: mdio-gpio: Fix working over slow can_sleep GPIOs" This reverts commit dfa0d55ff6be64e7b6881212a291cb95f8da3b08. Discussion still ongoing, I shouldn't have applied this. Signed-off-by: David S. Miller commit 569a933b03f3c48b392fe67c0086b3a6b9306b5a Author: Roman Gushchin Date: Wed Nov 14 10:00:34 2018 -0800 bpf: allocate local storage buffers using GFP_ATOMIC Naresh reported an issue with the non-atomic memory allocation of cgroup local storage buffers: [ 73.047526] BUG: sleeping function called from invalid context at /srv/oe/build/tmp-rpb-glibc/work-shared/intel-corei7-64/kernel-source/mm/slab.h:421 [ 73.060915] in_atomic(): 1, irqs_disabled(): 0, pid: 3157, name: test_cgroup_sto [ 73.068342] INFO: lockdep is turned off. [ 73.072293] CPU: 2 PID: 3157 Comm: test_cgroup_sto Not tainted 4.20.0-rc2-next-20181113 #1 [ 73.080548] Hardware name: Supermicro SYS-5019S-ML/X11SSH-F, BIOS 2.0b 07/27/2017 [ 73.088018] Call Trace: [ 73.090463] dump_stack+0x70/0xa5 [ 73.093783] ___might_sleep+0x152/0x240 [ 73.097619] __might_sleep+0x4a/0x80 [ 73.101191] __kmalloc_node+0x1cf/0x2f0 [ 73.105031] ? cgroup_storage_update_elem+0x46/0x90 [ 73.109909] cgroup_storage_update_elem+0x46/0x90 cgroup_storage_update_elem() (as well as other update map update callbacks) is called with disabled preemption, so GFP_ATOMIC allocation should be used: e.g. alloc_htab_elem() in hashtab.c. Reported-by: Naresh Kamboju Tested-by: Naresh Kamboju Signed-off-by: Roman Gushchin Cc: Alexei Starovoitov Cc: Daniel Borkmann Signed-off-by: Alexei Starovoitov commit afd594240806acc138cf696c09f2f4829d55d02f Author: Edward Cree Date: Fri Nov 16 12:00:07 2018 +0000 bpf: fix off-by-one error in adjust_subprog_starts When patching in a new sequence for the first insn of a subprog, the start of that subprog does not change (it's the first insn of the sequence), so adjust_subprog_starts should check start <= off (rather than < off). Also added a test to test_verifier.c (it's essentially the syz reproducer). Fixes: cc8b0b92a169 ("bpf: introduce function calls (function boundaries)") Reported-by: syzbot+4fc427c7af994b0948be@syzkaller.appspotmail.com Signed-off-by: Edward Cree Acked-by: Yonghong Song Signed-off-by: Alexei Starovoitov commit 5594923f6e708d393c906e38399b3d4a65d390e9 Merge: dfa0d55ff6be d7d8bbb40a5b Author: David S. Miller Date: Fri Nov 16 20:26:30 2018 -0800 Merge tag 'batadv-net-for-davem-20181114' of git://git.open-mesh.org/linux-merge Simon Wunderlich says: ==================== Here are two batman-adv bugfixes: - Explicitly pad short ELP packets with zeros, by Sven Eckelmann - Fix packet size calculation when merging fragments, by Sven Eckelmann ==================== Signed-off-by: David S. Miller commit dfa0d55ff6be64e7b6881212a291cb95f8da3b08 Author: Martin Schiller Date: Wed Nov 14 12:54:49 2018 +0100 net: phy: mdio-gpio: Fix working over slow can_sleep GPIOs This commit re-enables support for slow GPIO pins. It was initially introduced by commit 2d6c9091ab76 ("net: mdio-gpio: support access that may sleep") and got lost by commit 7e5fbd1e0700 ("net: mdio-gpio: Convert to use gpiod functions where possible"). Also add a warning about slow GPIO pins like it is done in i2c-gpio. Signed-off-by: Martin Schiller Signed-off-by: David S. Miller commit 19ab69107d3ecfb7cd3e38ad262a881be40c01a3 Author: Davide Caratti Date: Wed Nov 14 12:17:25 2018 +0100 net/sched: act_pedit: fix memory leak when IDR allocation fails tcf_idr_check_alloc() can return a negative value, on allocation failures (-ENOMEM) or IDR exhaustion (-ENOSPC): don't leak keys_ex in these cases. Fixes: 0190c1d452a9 ("net: sched: atomically check-allocate action") Signed-off-by: Davide Caratti Acked-by: Cong Wang Signed-off-by: David S. Miller commit 06bc4d0079ab6a2de86f56703ce1bd13e90b9d9d Author: Christophe JAILLET Date: Tue Nov 13 18:42:24 2018 +0100 net: lantiq: Fix returned value in case of error in 'xrx200_probe()' Return 'err' in the error handling path instead of 0. Return explicitly 0 in the normal path, instead of 'err', which is known to be 0 at this point. Fixes: fe1a56420cf2 ("net: lantiq: Add Lantiq / Intel VRX200 Ethernet driver") Signed-off-by: Christophe JAILLET Signed-off-by: David S. Miller commit 761f60261b4401aa368d71d431b4c218af0efcee Author: Xin Long Date: Wed Nov 14 00:48:28 2018 +0800 ipv6: fix a dst leak when removing its exception These is no need to hold dst before calling rt6_remove_exception_rt(). The call to dst_hold_safe() in ip6_link_failure() was for ip6_del_rt(), which has been removed in Commit 93531c674315 ("net/ipv6: separate handling of FIB entries from dst based routes"). Otherwise, it will cause a dst leak. This patch is to simply remove the dst_hold_safe() call before calling rt6_remove_exception_rt() and also do the same in ip6_del_cached_rt(). It's safe, because the removal of the exception that holds its dst's refcnt is protected by rt6_exception_lock. Fixes: 93531c674315 ("net/ipv6: separate handling of FIB entries from dst based routes") Fixes: 23fb93a4d3f1 ("net/ipv6: Cleanup exception and cache route handling") Reported-by: Li Shuang Signed-off-by: Xin Long Reviewed-by: David Ahern Signed-off-by: David S. Miller commit 83e65df6dfece9eb588735459428f221eb930c0c Author: Maxime Chevallier Date: Fri Nov 9 09:17:33 2018 +0100 net: mvneta: Don't advertise 2.5G modes Using 2.5G speed relies on the SerDes lanes being configured accordingly. The lanes have to be reconfigured to switch between 1G and 2.5G, and for now only the bootloader does this configuration. In the case we add a Comphy driver to handle switching the lanes dynamically, it's better for now to stick with supporting only 1G and add advertisement for 2.5G once we really are capable of handling both speeds without problem. Since the interface mode is initialy taken from the DT, we want to make sure that adding comphy support won't break boards that don't update their dtb. Fixes: da58a931f248 ("net: mvneta: Add support for 2500Mbps SGMII") Reported-by: Andrew Lunn Reported-by: Russell King Signed-off-by: Maxime Chevallier Signed-off-by: David S. Miller commit 10547d956d590fbb846a7bd053a1dfc30e8f9a68 Author: Andy Shevchenko Date: Fri Nov 9 17:40:16 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 Signed-off-by: Linus Walleij commit bff466bac59994cfcceabe4d0be5fdc1c20cd5b8 Author: Bartosz Golaszewski Date: Thu Nov 8 17:52:53 2018 +0100 gpio: mockup: fix indicated direction Commit 3edfb7bd76bd ("gpiolib: Show correct direction from the beginning") fixed an existing issue but broke libgpiod tests by changing the default direction of dummy lines to output. We don't break user-space so make gpio-mockup behave as before. Signed-off-by: Bartosz Golaszewski Signed-off-by: Linus Walleij commit 70cdb6ad6dc342d9643a00c9092e88f0075f2b9a Author: Robert Jarzmik Date: Thu Nov 15 18:16:38 2018 +0100 gpio: pxa: fix legacy non pinctrl aware builds again As pointed out by Gregor, spitz keyboard matrix is broken, with or without CONFIG_PINCTRL set, quoting : "The gpio matrix keypard on the Zaurus C3x00 (see spitz.c) does not work properly. Noticeable are that rshift+c does nothing where as lshift+c creates C. Opposite it is for rshift+a vs lshift+a, here only rshift works. This affects a few other combinations using the rshift or lshift buttons." As a matter of fact, as for platform_data based builds CONFIG_PINCTRL=n is required for now (as opposed for devicetree builds where it should be set), this means gpio driver should change the direction, which is what was attempted by commit c4e5ffb6f224 ("gpio: pxa: fix legacy non pinctrl aware builds"). Unfortunately, the input case was inverted, and the direction change was never done. This wasn't seen up until now because the initial platform setup (MFP) was setting this direction. Yet in Gregory's case, the matrix-keypad driver changes back and forth the direction dynamically, and this is why he's the first to report it. Fixes: c4e5ffb6f224 ("gpio: pxa: fix legacy non pinctrl aware builds") Tested-by: Greg Signed-off-by: Robert Jarzmik Signed-off-by: Linus Walleij commit c5bbd4515a05f8acb7e6ab6297044a529762cbf5 Author: Matthew Wilcox Date: Fri Nov 16 14:37:06 2018 -0500 dax: Reinstate RCU protection of inode For the device-dax case, it is possible that the inode can go away underneath us. The rcu_read_lock() was there to prevent it from being freed, and not (as I thought) to protect the tree. Bring back the rcu_read_lock() protection. Also add a little kernel-doc; while this function is not exported to modules, it is used from outside dax.c Reported-by: Dan Williams Fixes: 9f32d221301c ("dax: Convert dax_lock_mapping_entry to XArray") Signed-off-by: Matthew Wilcox commit 7ae2ea7dc45e8250a74cfaaecdce578427669ae5 Author: Matthew Wilcox Date: Fri Nov 9 20:09:37 2018 -0500 dax: Make sure the unlocking entry isn't locked I wrote the semantics in the commit message, but didn't document it in the source code. Use a BUG_ON instead (if any code does do this, it's really buggy; we can't recover and it's worth taking the machine down). Signed-off-by: Matthew Wilcox commit 6d7cd8c1373746a93dc868ee9d38a82df78b38aa Author: Matthew Wilcox Date: Tue Nov 6 13:11:57 2018 -0500 dax: Remove optimisation from dax_lock_mapping_entry Skipping some of the revalidation after we sleep can lead to returning a mapping which has already been freed. Just drop this optimisation. Reported-by: Dan Williams Fixes: 9f32d221301c ("dax: Convert dax_lock_mapping_entry to XArray") Signed-off-by: Matthew Wilcox commit 5404a7f1c21cfda061712bedf2d06cc0f6c755e9 Author: Matthew Wilcox Date: Mon Nov 5 09:34:04 2018 -0500 XArray tests: Correct some 64-bit assumptions The test-suite caught these two mistakes when compiled for 32-bit. I had only been running the test-suite in 64-bit mode. Signed-off-by: Matthew Wilcox commit 44a4a66b619a0a83a52e707ebcd80182207bd50e Author: Matthew Wilcox Date: Mon Nov 5 10:53:09 2018 -0500 XArray: Correct xa_store_range The explicit '64' should have been BITS_PER_LONG, but while looking at this code I realised I meant to use __ffs(), not ilog2(). Signed-off-by: Matthew Wilcox commit 1ce80e0fe98e72af4125f47c65b0bc01b60a7feb Merge: e6a2562fe27f b469e7e47c8a Author: Linus Torvalds Date: Fri Nov 16 13:18:36 2018 -0600 Merge tag 'fsnotify_for_v4.20-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs Pull fsnotify fix from Jan Kara: "One small fsnotify fix for duplicate events" * tag 'fsnotify_for_v4.20-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: fanotify: fix handling of events on child sub-directory commit e6a2562fe27f0a42243ca5a0aec5408c9a1d42a5 Merge: 32e2524a529c c26b5aa8ef0d Author: Linus Torvalds Date: Fri Nov 16 11:38:14 2018 -0600 Merge tag 'gfs2-4.20.fixes3' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2 Pull bfs2 fixes from Andreas Gruenbacher: "Fix two bugs leading to leaked buffer head references: - gfs2: Put bitmap buffers in put_super - gfs2: Fix iomap buffer head reference counting bug And one bug leading to significant slow-downs when deleting large files: - gfs2: Fix metadata read-ahead during truncate (2)" * tag 'gfs2-4.20.fixes3' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2: gfs2: Fix iomap buffer head reference counting bug gfs2: Fix metadata read-ahead during truncate (2) gfs2: Put bitmap buffers in put_super commit c26b5aa8ef0d46035060fded475e6ab957b9f69f Author: Andreas Gruenbacher Date: Sun Nov 11 11:15:21 2018 +0000 gfs2: Fix iomap buffer head reference counting bug GFS2 passes the inode buffer head (dibh) from gfs2_iomap_begin to gfs2_iomap_end in iomap->private. It sets that private pointer in gfs2_iomap_get. Users of gfs2_iomap_get other than gfs2_iomap_begin would have to release iomap->private, but this isn't done correctly, leading to a leak of buffer head references. To fix this, move the code for setting iomap->private from gfs2_iomap_get to gfs2_iomap_begin. Fixes: 64bc06bb32 ("gfs2: iomap buffered write support") Cc: stable@vger.kernel.org # v4.19+ Signed-off-by: Andreas Gruenbacher Signed-off-by: Linus Torvalds commit 32e2524a529c1fd8e377738d6cdc2268ffd171ce Merge: 4efd34602fc0 9f4debe38415 Author: Linus Torvalds Date: Fri Nov 16 10:37:27 2018 -0600 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: - Potential memory overwrite in simd - Kernel info leaks in crypto_user - NULL dereference and use-after-free in hisilicon" * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: user - Zeroize whole structure given to user space crypto: user - fix leaking uninitialized memory to userspace crypto: simd - correctly take reqsize of wrapped skcipher into account crypto: hisilicon - Fix reference after free of memories on error path crypto: hisilicon - Fix NULL dereference for same dst and src commit 4efd34602fc0da31f87dca8669388edcafba622d Merge: ef268de19756 20325e8a6143 Author: Linus Torvalds Date: Fri Nov 16 10:17:29 2018 -0600 Merge tag 'drm-fixes-2018-11-16' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "Live from Vancouver, SoC maintainer talk, this weeks drm fixes pull for rc3: omapdrm: - regression fixes for the reordering bridge stuff that went into rc1 i915: - incorrect EU count fix - HPD storm fix - MST fix - relocation fix for gen4/5 amdgpu: - huge page handling fix - IH ring setup - XGMI aperture setup - watermark setup fix misc: - docs and MST fix" * tag 'drm-fixes-2018-11-16' of git://anongit.freedesktop.org/drm/drm: (23 commits) drm/i915: Account for scale factor when calculating initial phase drm/i915: Clean up skl_program_scaler() drm/i915: Move programming plane scaler to its own function. drm/i915/icl: Drop spurious register read from icl_dbuf_slices_update drm/i915: fix broadwell EU computation drm/amdgpu: fix huge page handling on Vega10 drm/amd/pp: Fix truncated clock value when set watermark drm/amdgpu: fix bug with IH ring setup drm/meson: venc: dmt mode must use encp drm/amdgpu: set system aperture to cover whole FB region drm/i915: Fix hpd handling for pins with two encoders drm/i915/execlists: Force write serialisation into context image vs execution drm/i915/icl: Fix power well 2 wrt. DC-off toggling order drm/i915: Fix NULL deref when re-enabling HPD IRQs on systems with MST drm/i915: Fix possible race in intel_dp_add_mst_connector() drm/i915/ringbuffer: Delay after EMIT_INVALIDATE for gen4/gen5 drm/omap: dsi: Fix missing of_platform_depopulate() drm/omap: Move DISPC runtime PM handling to omapdrm drm/omap: dsi: Ensure the device is active during probe drm/omap: hdmi4: Ensure the device is active during bind ... commit ef268de19756e6bc78cd3e6d9b15545f7df97ef2 Merge: 50d25bdc6431 b2fed34a628d Author: Linus Torvalds Date: Fri Nov 16 10:14:54 2018 -0600 Merge tag 'powerpc-4.20-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: "Two weeks worth of fixes since rc1. - I broke 16-byte alignment of the stack when we moved PPR into pt_regs. Despite being required by the ABI this broke almost nothing, we eventually hit it in code where GCC does arithmetic on the stack pointer assuming the bottom 4 bits are clear. Fix it by padding the in-kernel pt_regs by 8 bytes. - A couple of commits fixing minor bugs in the recent SLB rewrite. - A build fix related to tracepoints in KVM in some configurations. - Our old "IO workarounds" code written for Cell couldn't coexist in a kernel that runs on Power9 with the Radix MMU, fix that. - Remove the NPU DMA ops, these just printed a warning and should never have been called. - Suppress an overly chatty message triggered by CPU hotplug in some configs. - Two small selftest fixes. Thanks to: Alistair Popple, Gustavo Romero, Nicholas Piggin, Satheesh Rajendran, Scott Wood" * tag 'powerpc-4.20-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: selftests/powerpc: Adjust wild_bctr to build with old binutils powerpc/64: Fix kernel stack 16-byte alignment powerpc/numa: Suppress "VPHN is not supported" messages selftests/powerpc: Fix wild_bctr test to work on ppc64 powerpc/io: Fix the IO workarounds code to work with Radix powerpc/mm/64s: Fix preempt warning in slb_allocate_kernel() KVM: PPC: Move and undef TRACE_INCLUDE_PATH/FILE powerpc/mm/64s: Only use slbfee on CPUs that support it powerpc/mm/64s: Use PPC_SLBFEE macro powerpc/mm/64s: Consolidate SLB assertions powerpc/powernv/npu: Remove NPU DMA ops commit 50d25bdc64318a8a367c4433fa1e030c38331f05 Merge: 59749c2d49bf 40dc948f234b Author: Linus Torvalds Date: Fri Nov 16 10:10:27 2018 -0600 Merge tag 'xtensa-20181115' of git://github.com/jcmvbkbc/linux-xtensa Pull Xtensa fixes from Max Filippov: - fix stack alignment for bFLT binaries. - fix physical-to-virtual address translation for boot parameters in MMUv3 256+256 and 512+512 virtual memory layouts. * tag 'xtensa-20181115' of git://github.com/jcmvbkbc/linux-xtensa: xtensa: fix boot parameters address translation xtensa: make sure bFLT stack is 16 byte aligned commit 243cfe3fb8978c7eec24511aba7dac98819ed896 Author: Vadim Pasternak Date: Fri Nov 16 13:47:11 2018 +0000 hwmon: (mlxreg-fan) Fix macros for tacho fault reading Fix macros for tacometer fault reading. This fix is relevant for three Mellanox systems MQMB7, MSN37, MSN34, which are about to be released to the customers. At the moment, none of them is at customers sites. Fixes: 65afb4c8e7e4 ("hwmon: (mlxreg-fan) Add support for Mellanox FAN driver") Signed-off-by: Vadim Pasternak Signed-off-by: Guenter Roeck commit 59749c2d49bf28df69ac4bcabf1f69b00d3dca59 Merge: 9b5f361ac4a9 8dc765d438f1 Author: Linus Torvalds Date: Fri Nov 16 09:31:59 2018 -0600 Merge tag 'for-linus-20181115' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: - Discard loop fix, caused by integer overflow (Dave) - Blacklist of Samsung drive that hangs with power management (Diego) - Copy bio priority when cloning it (Hannes) - Fix race condition exposed in floppy (me) - Fix SCSI queue cleanup regression. While elusive, it caused oopses in queue running (Ming) - Fix bad string copy in kyber tracing (Omar) * tag 'for-linus-20181115' of git://git.kernel.dk/linux-block: SCSI: fix queue cleanup race before queue initialization is done block: fix 32 bit overflow in __blkdev_issue_discard() libata: blacklist SAMSUNG MZ7TD256HAFV-000L9 SSD block: copy ioprio in __bio_clone_fast() and bounce kyber: fix wrong strlcpy() size in trace_kyber_latency() floppy: fix race condition in __floppy_read_block_0() commit 9b5f361ac4a923bf53ca8c0875509ef68c8958cd Merge: da5322e65940 ebacb8127359 Author: Linus Torvalds Date: Fri Nov 16 09:30:13 2018 -0600 Merge tag 'fuse-fixes-4.20-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse Pull fuse fixes from Miklos Szeredi: "A couple of fixes, all bound for -stable (i.e. not regressions in this cycle)" * tag 'fuse-fixes-4.20-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse: fuse: fix use-after-free in fuse_direct_IO() fuse: fix possibly missed wake-up after abort fuse: fix leaked notify reply commit 1770f0fa978ed691a454fa9d3ba903d5a70630cc Author: Lorenzo Bianconi Date: Sat Nov 10 12:03:09 2018 +0100 mt76: fix uninitialized mutex access setting rts threshold Fix following crash due to a leftover uninitialized mutex access in mt76x2_set_rts_threshold routine. [ 31.018059] Call Trace: [ 31.018341] register_lock_class+0x51f/0x530 [ 31.018828] __lock_acquire+0x6c/0x1580 [ 31.019247] lock_acquire+0x88/0x120 [ 31.021089] __mutex_lock+0x4a/0x4f0 [ 31.023343] mt76x2_set_rts_threshold+0x28/0x50 [ 31.023831] ieee80211_set_wiphy_params+0x16d/0x4e0 [ 31.024344] nl80211_set_wiphy+0x72b/0xbc0 [ 31.024781] genl_family_rcv_msg+0x192/0x3a0 [ 31.025233] genl_rcv_msg+0x42/0x89 [ 31.026079] netlink_rcv_skb+0x38/0x100 [ 31.026475] genl_rcv+0x1f/0x30 [ 31.026804] netlink_unicast+0x19c/0x250 [ 31.027212] netlink_sendmsg+0x1ed/0x390 [ 31.027615] sock_sendmsg+0x31/0x40 [ 31.027973] ___sys_sendmsg+0x23c/0x280 [ 31.030414] __sys_sendmsg+0x42/0x80 [ 31.030783] do_syscall_64+0x4a/0x170 [ 31.031160] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 31.031677] RIP: 0033:0x7f3498b39ba7 [ 31.033953] RSP: 002b:00007fffe19675b8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 31.034883] RAX: ffffffffffffffda RBX: 00000000012d5350 RCX: 00007f3498b39ba7 [ 31.035756] RDX: 0000000000000000 RSI: 00007fffe19675f0 RDI: 0000000000000003 [ 31.036587] RBP: 00000000012da740 R08: 0000000000000002 R09: 0000000000000000 [ 31.037422] R10: 0000000000000006 R11: 0000000000000246 R12: 00000000012da880 [ 31.038252] R13: 00007fffe19675f0 R14: 00007fffe19678c0 R15: 00000000012da880 Fixes: 108a4861ef19 ("mt76: create new mt76x02-lib module for common mt76x{0,2} code") Reported-by: lorenzo.trisolini@fluidmesh.com Reported-by: luca.bisti@fluidmesh.com Signed-off-by: Lorenzo Bianconi Signed-off-by: Kalle Valo commit d1fe6ad6f6bd61c84788d3a7b11e459a439c6169 Author: Rafał Miłecki Date: Thu Nov 8 16:08:29 2018 +0100 brcmfmac: fix reporting support for 160 MHz channels Driver can report IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160MHZ so it's important to provide valid & complete info about supported bands for each channel. By default no support for 160 MHz should be assumed unless firmware reports it for a given channel later. This fixes info passed to the userspace. Without that change userspace could try to use invalid channel and fail to start an interface. Signed-off-by: Rafał Miłecki Cc: stable@vger.kernel.org Signed-off-by: Kalle Valo commit d987f783a4808ce0636f58e2412addd453cba88c Author: Brian Norris Date: Wed Nov 7 16:40:35 2018 -0800 ath10k: don't assume 'vif' is non-NULL in flush() mac80211 may call us with vif == NULL, if the station is not currently active (e.g., not associated). It is trivially easy to reproduce a crash by suspending the system when not connected to an AP: [ 65.533934] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000 ... [ 65.574521] pc : ath10k_flush+0x30/0xd0 [ath10k_core] [ 65.574538] lr : __ieee80211_flush_queues+0x180/0x244 [mac80211] [ 65.599680] Process kworker/u12:1 (pid: 57, stack limit = 0x(____ptrval____)) [ 65.599682] Call trace: [ 65.599695] ath10k_flush+0x30/0xd0 [ath10k_core] [ 65.642064] __ieee80211_flush_queues+0x180/0x244 [mac80211] [ 65.642079] ieee80211_flush_queues+0x34/0x40 [mac80211] [ 65.642095] __ieee80211_suspend+0xfc/0x47c [mac80211] [ 65.658611] ieee80211_suspend+0x30/0x3c [mac80211] [ 65.658627] wiphy_suspend+0x15c/0x3a8 [cfg80211] [ 65.672810] dpm_run_callback+0xf0/0x1f0 [ 65.672814] __device_suspend+0x3ac/0x4f8 [ 65.672819] async_suspend+0x34/0xbc [ 65.684096] async_run_entry_fn+0x54/0x104 [ 65.684099] worker_thread+0x4cc/0x72c [ 65.684102] kthread+0x134/0x13c [ 65.684105] ret_from_fork+0x10/0x18 Fixes: 9de4162f0999 ("ath10k: add peer flush in ath10k_flush for STATION") Signed-off-by: Brian Norris Signed-off-by: Kalle Valo commit 0145b50566e7de5637e80ecba96c7f0e6fff1aad Author: Hans de Goede Date: Wed Oct 31 15:20:05 2018 +0100 iio/hid-sensors: Fix IIO_CHAN_INFO_RAW returning wrong values for signed numbers Before this commit sensor_hub_input_attr_get_raw_value() failed to take the signedness of 16 and 8 bit values into account, returning e.g. 65436 instead of -100 for the z-axis reading of an accelerometer. This commit adds a new is_signed parameter to the function and makes all callers pass the appropriate value for this. While at it, this commit also fixes up some neighboring lines where statements were needlessly split over 2 lines to improve readability. Signed-off-by: Hans de Goede Acked-by: Srinivas Pandruvada Acked-by: Benjamin Tissoires Cc: Signed-off-by: Jonathan Cameron commit 5c074eeabbd332b11559f7fc1e89d456f94801fb Author: Gerd Hoffmann Date: Wed Nov 14 13:20:29 2018 +0100 udmabuf: set read/write flag when exporting Otherwise, mmap fails when done with PROT_WRITE. Suggested-by: Gurchetan Singh Signed-off-by: Gerd Hoffmann Reviewed-by: Gurchetan Singh Tested-by: Gurchetan Singh Link: http://patchwork.freedesktop.org/patch/msgid/20181114122029.16766-1-kraxel@redhat.com commit 4ec321c14693458acae02054e51471e4390049c2 Merge: b374e8686fc3 5d041c46ccb9 Author: Kalle Valo Date: Fri Nov 16 09:03:38 2018 +0200 Merge tag 'iwlwifi-for-kalle-2018-11-15' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next First batch of iwlwifi fixes for 4.20 * 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 a97b9565338350d70d8d971c4ee6f0d4fa967418 Author: Andrew Morton Date: Thu Nov 15 16:15:20 2018 -0800 drivers/net/ethernet/qlogic/qed/qed_rdma.h: fix typo Add missing semicolon. Fixes: 291d57f67d244973 ("qed: Fix rdma_info structure allocation") Cc: Michal Kalderon Cc: Denis Bolotin Cc: David S. Miller Signed-off-by: Andrew Morton Signed-off-by: David S. Miller commit 91b9deefedf4c35a01027ce38bed7299605026a3 Author: Tony Lindgren Date: Thu Nov 15 15:59:39 2018 -0800 spi: omap2-mcspi: Add missing suspend and resume calls I've been wondering still about omap2-mcspi related suspend and resume flakeyness and looks like we're missing calls to spi_master_suspend() and spi_master_resume(). Adding those and using pm_runtime_force_suspend() and pm_runtime_force_resume() makes things work for suspend and resume and allows us to stop using noirq suspend and resume. And while at it, let's use SET_SYSTEM_SLEEP_PM_OPS to simplify things further. Signed-off-by: Tony Lindgren Signed-off-by: Mark Brown commit 35bf9f1fd2508d2652e1b638570d4b13f3dc185a Merge: 08e14fe429a0 a463146e67c8 Author: David S. Miller Date: Thu Nov 15 16:09:31 2018 -0800 Merge branch 'mlx4-fixes' Tariq Toukan says: ==================== mlx4 fixes for 4.20-rc This patchset includes small fixes for mlx4_core driver. First patch by Jack zeros a field in a FW communication command, to match the FW spec. Please queue it to -stable >= v3.17. In the second patch I zero-initialize a variable to silence a compliation warning. Please queue it to -stable >= v3.19. Third patch by Aya replaces int fields with unsigned int, to fix a UBSAN warning. Please queue it to -stable >= v3.13. Series generated against net commit: db8ddde766ad Merge branch 'qed-Miscellaneous-bug-fixes' ==================== Signed-off-by: David S. Miller commit a463146e67c848cbab5ce706d6528281b7cded08 Author: Aya Levin Date: Thu Nov 15 18:05:15 2018 +0200 net/mlx4: Fix UBSAN warning of signed integer overflow UBSAN: Undefined behavior in drivers/net/ethernet/mellanox/mlx4/resource_tracker.c:626:29 signed integer overflow: 1802201963 + 1802201963 cannot be represented in type 'int' The union of res_reserved and res_port_rsvd[MLX4_MAX_PORTS] monitors granting of reserved resources. The grant operation is calculated and protected, thus both members of the union cannot be negative. Changed type of res_reserved and of res_port_rsvd[MLX4_MAX_PORTS] from signed int to unsigned int, allowing large value. Fixes: 5a0d0a6161ae ("mlx4: Structures and init/teardown for VF resource quotas") Signed-off-by: Aya Levin Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller commit 3ea7e7ea53c9f6ee41cb69a29c375fe9dd9a56a7 Author: Tariq Toukan Date: Thu Nov 15 18:05:14 2018 +0200 net/mlx4_core: Fix uninitialized variable compilation warning Initialize the uid variable to zero to avoid the compilation warning. Fixes: 7a89399ffad7 ("net/mlx4: Add mlx4_bitmap zone allocator") Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller commit bd85fbc2038a1bbe84990b23ff69b6fc81a32b2c Author: Jack Morgenstein Date: Thu Nov 15 18:05:13 2018 +0200 net/mlx4_core: Zero out lkey field in SW2HW_MPT fw command When re-registering a user mr, the mpt information for the existing mr when running SRIOV is obtained via the QUERY_MPT fw command. The returned information includes the mpt's lkey. This retrieved mpt information is used to move the mpt back to hardware ownership in the rereg flow (via the SW2HW_MPT fw command when running SRIOV). The fw API spec states that for SW2HW_MPT, the lkey field must be zero. Any ConnectX-3 PF driver which checks for strict spec adherence will return failure for SW2HW_MPT if the lkey field is not zero (although the fw in practice ignores this field for SW2HW_MPT). Thus, in order to conform to the fw API spec, set the lkey field to zero before invoking SW2HW_MPT when running SRIOV. Fixes: e630664c8383 ("mlx4_core: Add helper functions to support MR re-registration") Signed-off-by: Jack Morgenstein Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller commit 1229ace4a4a2e2c982a32fb075dc1bf95423924f Author: Paul Burton Date: Mon Nov 12 22:18:01 2018 +0000 MIPS: Loongson3,SGI-IP27: Simplify max_low_pfn calculation Both the Loongson3 & SGI-IP27 platforms set max_low_pfn to the last available PFN describing memory. They both do it in paging_init() which is later than ideal since max_low_pfn is used before that function is called. Simplify both platforms to trivially initialize max_low_pfn using the end address of DRAM, and do it earlier in prom_meminit(). Signed-off-by: Paul Burton Suggested-by: Mike Rapoport Tested-by: Thomas Bogendoerfer Patchwork: https://patchwork.linux-mips.org/patch/21104/ References: https://patchwork.linux-mips.org/patch/21031/ Cc: Huacai Chen Cc: Mike Rapoport Cc: Thomas Bogendoerfer Cc: linux-mips@linux-mips.org commit 20325e8a614377967644cf63050095c9f2ea8ab9 Merge: 9826b1138e49 6e8adf6f4a4f Author: Dave Airlie Date: Fri Nov 16 08:52:14 2018 +1000 Merge tag 'drm-intel-fixes-2018-11-15' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes - Fix Bugzilla #108712: Fix incorrect EU count report from kernel - Fix to account for scale factor when calculating initial phase on scaled output - Avoid too trigger-happy HPD storm detection and fix a race and an OOPS for MST systems. - Relocation race fix for Gen4/5 - A couple ICL fixes and dependencies for above Fixes:. Signed-off-by: Dave Airlie From: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20181115164709.GA13430@jlahtine-desk.ger.corp.intel.com commit 07e3a1cfb0568b6d8d7862077029af96af6690ea 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 69756c6ff0de478c10100481f16c966dde3b5339 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 5d041c46ccb9b48acc110e214beff5e2789311df Author: Luca Coelho Date: Wed Oct 17 08:35:15 2018 +0300 iwlwifi: mvm: don't use SAR Geo if basic SAR is not used We can't use SAR Geo if basic SAR is not enabled, since the SAR Geo tables define offsets in relation to the basic SAR table in use. To fix this, make iwl_mvm_sar_init() return one in case WRDS is not available, so we can skip reading WGDS entirely. Fixes: a6bff3cb19b7 ("iwlwifi: mvm: add GEO_TX_POWER_LIMIT cmd for geographic tx power table") Cc: stable@vger.kernel.org # 4.12+ Signed-off-by: Luca Coelho commit 54f3f994e9964466855e11068c0f7d952d58b260 Author: Shahar S Matityahu Date: Mon Aug 20 17:16:21 2018 +0300 iwlwifi: fix D3 debug data buffer memory leak If the driver is unloaded when D3 debug data pulling is enabled but not triggered, it doesn't release the data buffer. Fix this by adding iwl_fw_runtime_free and calling it from the relevant places. Fixes: 2d8c261511ab ("iwlwifi: add d3 debug data support") Signed-off-by: Shahar S Matityahu Signed-off-by: Luca Coelho commit 82715ac71e6b94a2c2136e31f3a8e6748e33aa8c Author: Emmanuel Grumbach Date: Wed Oct 3 11:16:54 2018 +0300 iwlwifi: mvm: fix regulatory domain update when the firmware starts When the firmware starts, it doesn't have any regulatory information, hence it uses the world wide limitations. The driver can feed the firmware with previous knowledge that was kept in the driver, but the firmware may still not update its internal tables. This happens when we start a BSS interface, and then the firmware can change the regulatory tables based on our location and it'll use more lenient, location specific rules. Then, if the firmware is shut down (when the interface is brought down), and then an AP interface is created, the firmware will forget the country specific rules. The host will think that we are in a certain country that may allow channels and will try to teach the firmware about our location, but the firmware may still not allow to drop the world wide limitations and apply country specific rules because it was just re-started. In this case, the firmware will reply with MCC_RESP_ILLEGAL to the MCC_UPDATE_CMD. In that case, iwlwifi needs to let the upper layers (cfg80211 / hostapd) know that the channel list they know about has been updated. This fixes https://bugzilla.kernel.org/show_bug.cgi?id=201105 Cc: stable@vger.kernel.org Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho commit ec484d03ef0df8d34086b95710e355a259cbe1f2 Author: Emmanuel Grumbach Date: Thu Aug 16 13:25:48 2018 +0300 iwlwifi: mvm: support sta_statistics() even on older firmware The oldest firmware supported by iwlmvm do support getting the average beacon RSSI. Enable the sta_statistics() call from mac80211 even on older firmware versions. Fixes: 33cef9256342 ("iwlwifi: mvm: support beacon statistics for BSS client") Cc: stable@vger.kernel.org # 4.2+ Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho commit 66e839030fd698586734e017fd55c4f2a89dba0b Author: Matt Chen Date: Fri Aug 3 14:29:20 2018 +0800 iwlwifi: fix wrong WGDS_WIFI_DATA_SIZE From coreboot/BIOS: Name ("WGDS", Package() { Revision, Package() { DomainType, // 0x7:WiFi ==> We miss this one. WgdsWiFiSarDeltaGroup1PowerMax1, // Group 1 FCC 2400 Max WgdsWiFiSarDeltaGroup1PowerChainA1, // Group 1 FCC 2400 A Offset WgdsWiFiSarDeltaGroup1PowerChainB1, // Group 1 FCC 2400 B Offset WgdsWiFiSarDeltaGroup1PowerMax2, // Group 1 FCC 5200 Max WgdsWiFiSarDeltaGroup1PowerChainA2, // Group 1 FCC 5200 A Offset WgdsWiFiSarDeltaGroup1PowerChainB2, // Group 1 FCC 5200 B Offset WgdsWiFiSarDeltaGroup2PowerMax1, // Group 2 EC Jap 2400 Max WgdsWiFiSarDeltaGroup2PowerChainA1, // Group 2 EC Jap 2400 A Offset WgdsWiFiSarDeltaGroup2PowerChainB1, // Group 2 EC Jap 2400 B Offset WgdsWiFiSarDeltaGroup2PowerMax2, // Group 2 EC Jap 5200 Max WgdsWiFiSarDeltaGroup2PowerChainA2, // Group 2 EC Jap 5200 A Offset WgdsWiFiSarDeltaGroup2PowerChainB2, // Group 2 EC Jap 5200 B Offset WgdsWiFiSarDeltaGroup3PowerMax1, // Group 3 ROW 2400 Max WgdsWiFiSarDeltaGroup3PowerChainA1, // Group 3 ROW 2400 A Offset WgdsWiFiSarDeltaGroup3PowerChainB1, // Group 3 ROW 2400 B Offset WgdsWiFiSarDeltaGroup3PowerMax2, // Group 3 ROW 5200 Max WgdsWiFiSarDeltaGroup3PowerChainA2, // Group 3 ROW 5200 A Offset WgdsWiFiSarDeltaGroup3PowerChainB2, // Group 3 ROW 5200 B Offset } }) When read the ACPI data to find out the WGDS, the DATA_SIZE is never matched. From the above format, it gives 19 numbers, but our driver is hardcode as 18. Fix it to pass then can parse the data into our wgds table. Then we will see: iwlwifi 0000:01:00.0: U iwl_mvm_sar_geo_init Sending GEO_TX_POWER_LIMIT iwlwifi 0000:01:00.0: U iwl_mvm_sar_geo_init SAR geographic profile[0] Band[0]: chain A = 68 chain B = 69 max_tx_power = 54 iwlwifi 0000:01:00.0: U iwl_mvm_sar_geo_init SAR geographic profile[0] Band[1]: chain A = 48 chain B = 49 max_tx_power = 70 iwlwifi 0000:01:00.0: U iwl_mvm_sar_geo_init SAR geographic profile[1] Band[0]: chain A = 51 chain B = 67 max_tx_power = 50 iwlwifi 0000:01:00.0: U iwl_mvm_sar_geo_init SAR geographic profile[1] Band[1]: chain A = 69 chain B = 70 max_tx_power = 68 iwlwifi 0000:01:00.0: U iwl_mvm_sar_geo_init SAR geographic profile[2] Band[0]: chain A = 49 chain B = 50 max_tx_power = 48 iwlwifi 0000:01:00.0: U iwl_mvm_sar_geo_init SAR geographic profile[2] Band[1]: chain A = 52 chain B = 53 max_tx_power = 51 Cc: stable@vger.kernel.org # 4.12+ Fixes: a6bff3cb19b7 ("iwlwifi: mvm: add GEO_TX_POWER_LIMIT cmd for geographic tx power table") Signed-off-by: Matt Chen Signed-off-by: Luca Coelho commit 08e14fe429a07475ee9f29a283945d602e4a6d92 Author: Eric Dumazet Date: Mon Nov 12 16:17:16 2018 -0800 net_sched: sch_fq: ensure maxrate fq parameter applies to EDT flows When EDT conversion happened, fq lost the ability to enfore a maxrate for all flows. It kept it for non EDT flows. This commit restores the functionality. Tested: tc qd replace dev eth0 root fq maxrate 500Mbit netperf -P0 -H host -- -O THROUGHPUT 489.75 Fixes: ab408b6dc744 ("tcp: switch tcp and sch_fq to new earliest departure time model") Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit 7150ceaacb27f7b3bf494e72cd4be4e11612dfff Author: David Howells Date: Mon Nov 12 22:33:22 2018 +0000 rxrpc: Fix life check The life-checking function, which is used by kAFS to make sure that a call is still live in the event of a pending signal, only samples the received packet serial number counter; it doesn't actually provoke a change in the counter, rather relying on the server to happen to give us a packet in the time window. Fix this by adding a function to force a ping to be transmitted. kAFS then keeps track of whether there's been a stall, and if so, uses the new function to ping the server, resetting the timeout to allow the reply to come back. If there's a stall, a ping and the call is *still* stalled in the same place after another period, then the call will be aborted. Fixes: bc5e3a546d55 ("rxrpc: Use MSG_WAITALL to tell sendmsg() to temporarily ignore signals") Fixes: f4d15fb6f99a ("rxrpc: Provide functions for allowing cleaner handling of signals") Signed-off-by: David Howells Signed-off-by: David S. Miller commit 5277715639ff6f75c729e657690751a831112c4b Author: Andreas Dannenberg Date: Thu Nov 15 11:01:31 2018 -0600 ASoC: pcm186x: Fix device reset-registers trigger value According to the current device datasheet (TI Lit # SLAS831D, revised March 2018) the value written to the device's PAGE register to trigger a complete register reset should be 0xfe, not 0xff. So go ahead and update to the correct value. Reported-by: Stephane Le Provost Tested-by: Stephane Le Provost Signed-off-by: Andreas Dannenberg Acked-by: Andrew F. Davis Signed-off-by: Mark Brown Cc: stable@vger.kernel.org commit 10f91c73cc41ceead210a905dbd196398e99c7d2 Author: Vitaly Kuznetsov Date: Thu Nov 15 11:05:10 2018 -0800 Input: hyper-v - fix wakeup from suspend-to-idle It makes little sense but still possible to put Hyper-V guests into suspend-to-idle state. To wake them up two wakeup sources were registered in the past: hyperv-keyboard and hid-hyperv. However, since commit eed4d47efe95 ("ACPI / sleep: Ignore spurious SCI wakeups from suspend-to-idle") pm_wakeup_event() from these devices is ignored. Switch to pm_wakeup_hard_event() API as these devices are actually the only possible way to wakeup Hyper-V guests. Fixes: eed4d47efe95 (ACPI / sleep: Ignore spurious SCI wakeups from suspend-to-idle) Reviewed-by: Rafael J. Wysocki Acked-by: K. Y. Srinivasan Acked-by: Jiri Kosina Signed-off-by: Vitaly Kuznetsov Signed-off-by: Dmitry Torokhov commit ebcd210e93b2a984b7a7b82d45f7f0d21b7ec2d2 Author: Ganesh Goudar Date: Thu Nov 15 15:36:21 2018 +0530 cxgb4: fix thermal zone build error with CONFIG_THERMAL=m and cxgb4 as built-in build fails, and 'commit e70a57fa59bb ("cxgb4: fix thermal configuration dependencies")' tries to fix it but when cxgb4i is made built-in build fails again, use IS_REACHABLE instead of IS_ENABLED to fix the issue. Fixes: e70a57fa59bb (cxgb4: fix thermal configuration dependencies) Reported-by: Randy Dunlap Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller commit b8c3c10cf68d7556466bb7d99f249ed586ddfbe3 Author: Thor Thayer Date: Mon Nov 12 11:50:56 2018 -0600 MAINTAINERS: Replace Vince Bridgers as Altera TSE maintainer Vince has moved to a different role. Replace him as Altera TSE maintainer. Signed-off-by: Thor Thayer Acked-by: Vince Bridgers Acked-by: Alan Tull Signed-off-by: David S. Miller commit e371357f0760af7a1f199f1c9e80d1ed3c676208 Merge: f8504f4ca0a0 8dc5ae2d4897 Author: David S. Miller Date: Thu Nov 15 09:37:16 2018 -0800 Merge branch 'bnxt_en-Bug-fixes' Michael Chan says: ==================== bnxt_en: Bug fixes. Most of the bug fixes are related to the new 57500 chips, including some initialization and counter fixes, disabling RDMA support, and a workaround for occasional missing interrupts. The last patch from Vasundhara fixes the year/month parameters for firmware coredump. ==================== Signed-off-by: David S. Miller commit 8dc5ae2d48976764cf3498e97963fa06befefb0e Author: Vasundhara Volam Date: Thu Nov 15 03:25:42 2018 -0500 bnxt_en: Fix filling time in bnxt_fill_coredump_record() Fix the year and month offset while storing it in bnxt_fill_coredump_record(). Fixes: 6c5657d085ae ("bnxt_en: Add support for ethtool get dump.") Signed-off-by: Vasundhara Volam Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 83eb5c5cff32681f3769f502cb5589c7d7509bfe Author: Michael Chan Date: Thu Nov 15 03:25:41 2018 -0500 bnxt_en: Add software "missed_irqs" counter. To keep track of the number of times the workaround code for 57500 A0 has been triggered. This is a per NQ counter. Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit ffd77621700ec3adcf859681e24910c38e0931f5 Author: Michael Chan Date: Thu Nov 15 03:25:40 2018 -0500 bnxt_en: Workaround occasional TX timeout on 57500 A0. Hardware can sometimes not generate NQ MSIX with a single pending CP ring entry. This seems to always happen at the last entry of the CP ring before it wraps. Add logic to check all the CP rings for pending entries without the CP ring consumer index advancing. Calling HWRM_DBG_RING_INFO_GET to read the context of the CP ring will flush out the NQ entry and MSIX. Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit addd4df6d763556e16d5316e4e8cd441050cc2af Author: Michael Chan Date: Thu Nov 15 03:25:39 2018 -0500 bnxt_en: Disable RDMA support on the 57500 chips. There is no RDMA support on 57500 chips yet, so prevent bnxt_re from registering on these chips. There is intermittent failure if bnxt_re is allowed to register and proceed with RDMA operations. Fixes: 1ab968d2f1d6 ("bnxt_en: Add PCI ID for BCM57508 device.") Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit d19819297d9284bd990e22116b8b43d0abcbf488 Author: Michael Chan Date: Thu Nov 15 03:25:38 2018 -0500 bnxt_en: Fix rx_l4_csum_errors counter on 57500 devices. The software counter structure is defined in both the CP ring's structure and the NQ ring's structure on the new devices. The legacy code adds the counter to the CP ring's structure and the counter won't get displayed since the ethtool code is looking at the NQ ring's structure. Since all other counters are contained in the NQ ring's structure, it makes more sense to count rx_l4_csum_errors in the NQ. Fixes: 50e3ab7836b5 ("bnxt_en: Allocate completion ring structures for 57500 series chips.") Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 6ba990384e924476b5eed1734f3bcca0df6fd77e Author: Michael Chan Date: Thu Nov 15 03:25:37 2018 -0500 bnxt_en: Fix RSS context allocation. Recent commit has added the reservation of RSS context. This requires bnxt_hwrm_vnic_qcaps() to be called before allocating any RSS contexts. The bnxt_hwrm_vnic_qcaps() call sets up proper flags that will determine how many RSS contexts to allocate to support NTUPLE. This causes a regression that too many RSS contexts are being reserved and causing resource shortage when enabling many VFs. Fix it by calling bnxt_hwrm_vnic_qcaps() earlier. Fixes: 41e8d7983752 ("bnxt_en: Modify the ring reservation functions for 57500 series chips.") Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit da5322e65940e4e8426613a8ff3d99a08b350a52 Merge: 282fd2a2adb4 877181a8d9dc Author: Linus Torvalds Date: Thu Nov 15 11:26:09 2018 -0600 Merge tag 'selinux-pr-20181115' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux Pull SELinux fixes from Paul Moore: "Two small SELinux fixes for v4.20. Ondrej's patch adds a check on user input, and my patch ensures we don't look past the end of a buffer. Both patches are quite small and pass the selinux-testsuite" * tag 'selinux-pr-20181115' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux: selinux: fix non-MLS handling in mls_context_to_sid() selinux: check length properly in SCTP bind hook commit 282fd2a2adb487e97ef9cd757848b2112d7b8d0c Merge: 94ca5c18e1e3 595b0674ce78 Author: Linus Torvalds Date: Thu Nov 15 11:20:06 2018 -0600 Merge tag 'pinctrl-v4.20-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl Pull pin control fixes from Linus Walleij: - A bunch of fixes for the Allwinner meson platform - Establish a git repo for Intel pin control in MAINTAINERS * tag 'pinctrl-v4.20-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: MAINTAINERS: Add tree link for Intel pin control driver pinctrl: meson: fix meson8b ao pull register bits pinctrl: meson: fix meson8 ao pull register bits pinctrl: meson: fix gxl ao pull register bits pinctrl: meson: fix gxbb ao pull register bits pinctrl: meson: fix pinconf bias disable commit 2f31a67f01a8beb22cae754c53522cb61a005750 Author: Mathias Nyman Date: Thu Nov 15 11:38:41 2018 +0200 usb: xhci: Prevent bus suspend if a port connect change or polling state is detected USB3 roothub might autosuspend before a plugged USB3 device is detected, causing USB3 device enumeration failure. USB3 devices don't show up as connected and enabled until USB3 link trainig completes. On a fast booting platform with a slow USB3 link training the link might reach the connected enabled state just as the bus is suspending. If this device is discovered first time by the xhci_bus_suspend() routine it will be put to U3 suspended state like the other ports which failed to suspend earlier. The hub thread will notice the connect change and resume the bus, moving the port back to U0 This U0 -> U3 -> U0 transition right after being connected seems to be too much for some devices, causing them to first go to SS.Inactive state, and finally end up stuck in a polling state with reset asserted Fix this by failing the bus suspend if a port has a connect change or is in a polling state in xhci_bus_suspend(). Don't do any port changes until all ports are checked, buffer all port changes and only write them in the end if suspend can proceed Cc: stable@vger.kernel.org Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman commit 94ca5c18e1e3742102ba3d054d36f4ee7c71fb7a Merge: 5929a1f0ff30 e39d8a186ed0 Author: Linus Torvalds Date: Thu Nov 15 10:59:37 2018 -0600 Merge tag 'nfs-for-4.20-3' of git://git.linux-nfs.org/projects/trondmy/linux-nfs Pull NFS client bugfixes from Trond Myklebust: "Highlights include: Stable fixes: - Don't exit the NFSv4 state manager without clearing NFS4CLNT_MANAGER_RUNNING Bugfixes: - Fix an Oops when destroying the RPCSEC_GSS credential cache - Fix an Oops during delegation callbacks - Ensure that the NFSv4 state manager exits the loop on SIGKILL - Fix a bogus get/put in generic_key_to_expire()" * tag 'nfs-for-4.20-3' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: NFSv4: Fix an Oops during delegation callbacks SUNRPC: Fix a bogus get/put in generic_key_to_expire() SUNRPC: Fix a Oops when destroying the RPCSEC_GSS credential cache NFSv4: Ensure that the state manager exits the loop on SIGKILL NFSv4: Don't exit the state manager without clearing NFS4CLNT_MANAGER_RUNNING commit fcc86cb45d38ca2f24bcea9c29c7f4742041caed Author: Boris Brezillon Date: Thu Nov 15 11:58:52 2018 +0100 drm/vc4: Set ->legacy_cursor_update to false when doing non-async updates drm_atomic_helper_setup_commit() auto-completes commit->flip_done when state->legacy_cursor_update is true, but we know for sure that we want a sync update when we call drm_atomic_helper_setup_commit() from vc4_atomic_commit(). Explicitly set state->legacy_cursor_update to false to prevent this auto-completion. Fixes: 184d3cf4f738 ("drm/vc4: Use wait_for_flip_done() instead of wait_for_vblanks()") Cc: Signed-off-by: Boris Brezillon Reviewed-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/20181115105852.9844-2-boris.brezillon@bootlin.com commit 5a43911fd256f1c9748f3f82aee1c3a3adad2719 Author: Boris Brezillon Date: Thu Nov 15 11:58:51 2018 +0100 drm/vc4: Fix NULL pointer dereference in the async update path vc4_plane_atomic_async_update() calls vc4_plane_atomic_check() which in turn calls vc4_plane_setup_clipping_and_scaling(), and since commit 58a6a36fe8e0 ("drm/vc4: Use drm_atomic_helper_check_plane_state() to simplify the logic"), this function accesses plane_state->state which will be NULL when called from the async update path because we're passing the current plane state, and plane_state->state has been assigned to NULL in drm_atomic_helper_swap_state(). Pass the new state instead of the current one (the new state has ->state set to a non-NULL value). Fixes: 58a6a36fe8e0 ("drm/vc4: Use drm_atomic_helper_check_plane_state() to simplify the logic") Signed-off-by: Boris Brezillon Reviewed-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/20181115105852.9844-1-boris.brezillon@bootlin.com commit 9826b1138e497dfb48f5cc64a82c219b4d0932da Merge: 7b74026d9c4e c1a17777eb45 Author: Dave Airlie Date: Fri Nov 16 02:14:42 2018 +1000 Merge branch 'drm-fixes-4.20' of git://people.freedesktop.org/~agd5f/linux into drm-fixes Fixes for 4.20: - Fix for huge page handling that caused a GPUVM fault in some cases - Fix IH ring setup - Fix for xgmi aperture setup - Fix for watermark setup for SMU Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20181114171853.2866-1-alexander.deucher@amd.com commit 7b74026d9c4ee0cfc5b24e51b7f8d5771bdef1f8 Merge: ccda4af0f4b9 adf59dd2408c Author: Dave Airlie Date: Fri Nov 16 02:12:27 2018 +1000 Merge tag 'drm-misc-fixes-2018-11-14' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes Cross-subsystem: - omap: Instantiate dss children in omapdss instead of mach (Laurent) Other: - htmldocs build warning (Sean) - MST NULL deref fix (Stanislav) - omap: Various runtime ref gets on probe/bind (Laurent) - omap: Fix to the above dss children patch (Tony) Cc: Sean Paul Cc: Stanislav Lisovskiy Cc: Laurent Pinchart Cc: Tony Lindgren Signed-off-by: Dave Airlie From: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20181114204542.GA52569@art_vandelay commit b2fed34a628df6118b5d4e13f49a33e15f704fa9 Author: Gustavo Romero Date: Wed Nov 14 21:33:30 2018 -0500 selftests/powerpc: Adjust wild_bctr to build with old binutils Currently the selftest wild_bctr can fail to build when an old gcc is used, notably on gcc using a binutils version <= 2.27, because the assembler does not support the integer suffix UL. This patch adjusts the wild_bctr test so the REG_POISON value is still treated as an unsigned long for the shifts on compilation but the UL suffix is absent on the stringification, so the inline asm code generated has no UL suffixes. Signed-off-by: Gustavo Romero [mpe: Wrap long line] Signed-off-by: Michael Ellerman commit 6e8adf6f4a4fa57dd3bef6b70de96e2b7b311204 Author: Ville Syrjälä Date: Wed Nov 14 15:32:55 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 (cherry picked from commit e7a278a329dd8aa2c70c564849f164cb5673689c) Signed-off-by: Joonas Lahtinen commit 27971d613fcb5b6ad96320bc4f2c90f4d4fde768 Author: Ville Syrjälä Date: Wed Nov 14 13:49:24 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 (cherry picked from commit d0105af939769393d6447a04cee2d1ae12e3f09a) Signed-off-by: Joonas Lahtinen commit 2a2777990a342b05f611e78822fc4fa2d9789ade Author: Maarten Lankhorst Date: Wed Nov 14 13:49:23 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 (cherry picked from commit ab5c60bf76755d24ae8de5c1c6ac594934656ace) Signed-off-by: Joonas Lahtinen commit 4cff280a5fccf6513ed9e895bb3a4e7ad8b0cedc Author: James Smart Date: Wed Nov 14 16:35:10 2018 -0800 nvme-fc: resolve io failures during connect If an io error occurs on an io issued while connecting, recovery of the io falls flat as the state checking ends up nooping the error handler. Create an err_work work item that is scheduled upon an io error while connecting. The work thread terminates all io on all queues and marks the queues as not connected. The termination of the io will return back to the callee, which will then back out of the connection attempt and will reschedule, if possible, the connection attempt. The changes: - in case there are several commands hitting the error handler, a state flag is kept so that the error work is only scheduled once, on the first error. The subsequent errors can be ignored. - The calling sequence to stop keep alive and terminate the queues and their io is lifted from the reset routine. Made a small service routine used by both reset and err_work. - During debugging, found that the teardown path can reference an uninitialized pointer, resulting in a NULL pointer oops. The aen_ops weren't initialized yet. Add validation on their initialization before calling the teardown routine. Signed-off-by: James Smart Signed-off-by: Christoph Hellwig commit 63eb322d89c8505af9b4a3d703e85e42281ebaa0 Author: Ard Biesheuvel Date: Wed Nov 14 09:55:44 2018 -0800 efi: Permit calling efi_mem_reserve_persistent() from atomic context Currently, efi_mem_reserve_persistent() may not be called from atomic context, since both the kmalloc() call and the memremap() call may sleep. The kmalloc() call is easy enough to fix, but the memremap() call needs to be moved into an init hook since we cannot control the memory allocation behavior of memremap() at the call site. Signed-off-by: Ard Biesheuvel Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/20181114175544.12860-6-ard.biesheuvel@linaro.org Signed-off-by: Ingo Molnar commit eff896288872d687d9662000ec9ae11b6d61766f Author: Ard Biesheuvel Date: Wed Nov 14 09:55:43 2018 -0800 efi/arm: Defer persistent reservations until after paging_init() The new memory EFI reservation feature we introduced to allow memory reservations to persist across kexec may trigger an unbounded number of calls to memblock_reserve(). The memblock subsystem can deal with this fine, but not before memblock resizing is enabled, which we can only do after paging_init(), when the memory we reallocate the array into is actually mapped. So break out the memreserve table processing into a separate routine and call it after paging_init() on arm64. On ARM, because of limited reviewing bandwidth of the maintainer, we cannot currently fix this, so instead, disable the EFI persistent memreserve entirely on ARM so we can fix it later. Tested-by: Marc Zyngier Signed-off-by: Ard Biesheuvel Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/20181114175544.12860-5-ard.biesheuvel@linaro.org Signed-off-by: Ingo Molnar commit 72a58a63a164b4e9d2d914e65caeb551846883f1 Author: Ard Biesheuvel Date: Wed Nov 14 09:55:42 2018 -0800 efi/arm/libstub: Pack FDT after populating it Commit: 24d7c494ce46 ("efi/arm-stub: Round up FDT allocation to mapping size") increased the allocation size for the FDT image created by the stub to a fixed value of 2 MB, to simplify the former code that made several attempts with increasing values for the size. This is reasonable given that the allocation is of type EFI_LOADER_DATA, which is released to the kernel unless it is explicitly memblock_reserve()d by the early boot code. However, this allocation size leaked into the 'size' field of the FDT header metadata, and so the entire allocation remains occupied by the device tree binary, even if most of it is not used to store device tree information. So call fdt_pack() to shrink the FDT data structure to its minimum size after populating all the fields, so that the remaining memory is no longer wasted. Signed-off-by: Ard Biesheuvel Cc: # v4.12+ Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Fixes: 24d7c494ce46 ("efi/arm-stub: Round up FDT allocation to mapping size") Link: http://lkml.kernel.org/r/20181114175544.12860-4-ard.biesheuvel@linaro.org Signed-off-by: Ingo Molnar commit 33412b8673135b18ea42beb7f5117ed0091798b6 Author: Ard Biesheuvel Date: Wed Nov 14 09:55:41 2018 -0800 efi/arm: Revert deferred unmap of early memmap mapping Commit: 3ea86495aef2 ("efi/arm: preserve early mapping of UEFI memory map longer for BGRT") deferred the unmap of the early mapping of the UEFI memory map to accommodate the ACPI BGRT code, which looks up the memory type that backs the BGRT table to validate it against the requirements of the UEFI spec. Unfortunately, this causes problems on ARM, which does not permit early mappings to persist after paging_init() is called, resulting in a WARN() splat. Since we don't support the BGRT table on ARM anway, let's revert ARM to the old behaviour, which is to take down the early mapping at the end of efi_init(). Signed-off-by: Ard Biesheuvel Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Fixes: 3ea86495aef2 ("efi/arm: preserve early mapping of UEFI memory ...") Link: http://lkml.kernel.org/r/20181114175544.12860-3-ard.biesheuvel@linaro.org Signed-off-by: Ingo Molnar commit ef1491e791308317bb9851a0ad380c4a68b58d54 Author: Waiman Long Date: Wed Nov 14 09:55:40 2018 -0800 efi: Fix debugobjects warning on 'efi_rts_work' The following commit: 9dbbedaa6171 ("efi: Make efi_rts_work accessible to efi page fault handler") converted 'efi_rts_work' from an auto variable to a global variable. However, when submitting the work, INIT_WORK_ONSTACK() was still used, causing the following complaint from debugobjects: ODEBUG: object 00000000ed27b500 is NOT on stack 00000000c7d38760, but annotated. Change the macro to just INIT_WORK() to eliminate the warning. Signed-off-by: Waiman Long Signed-off-by: Ard Biesheuvel Acked-by: Sai Praneeth Prakhya Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Fixes: 9dbbedaa6171 ("efi: Make efi_rts_work accessible to efi page fault handler") Link: http://lkml.kernel.org/r/20181114175544.12860-2-ard.biesheuvel@linaro.org Signed-off-by: Ingo Molnar commit f8504f4ca0a0e9f84546ef86e00b24d2ea9a0bd2 Author: Xin Long Date: Tue Nov 13 01:08:25 2018 +0800 l2tp: fix a sock refcnt leak in l2tp_tunnel_register This issue happens when trying to add an existent tunnel. It doesn't call sock_put() before returning -EEXIST to release the sock refcnt that was held by calling sock_hold() before the existence check. This patch is to fix it by holding the sock after doing the existence check. Fixes: f6cd651b056f ("l2tp: fix race in duplicate tunnel detection") Reported-by: Jianlin Shi Signed-off-by: Xin Long Reviewed-by: Guillaume Nault Signed-off-by: David S. Miller commit 66f93c5a02d5ba6ef17fef459143961382593212 Author: Nicholas Piggin Date: Thu Nov 15 12:34:27 2018 +1000 powerpc/64: Fix kernel stack 16-byte alignment Commit 4c2de74cc869 ("powerpc/64: Interrupts save PPR on stack rather than thread_struct") changed sizeof(struct pt_regs) % 16 from 0 to 8, which causes the interrupt frame allocation on kernel entry to put the kernel stack out of alignment. Quadword (16-byte) alignment for the stack is required by both the 64-bit v1 ABI (v1.9 § 3.2.2) and the 64-bit v2 ABI (v1.1 § 2.2.2.1). Add a pad field to fix alignment, and add a BUILD_BUG_ON to catch this in future. Fixes: 4c2de74cc869 ("powerpc/64: Interrupts save PPR on stack rather than thread_struct") Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman commit 6c08ec1216b7b2f84b9755f339d6009768599256 Author: Michael Roth Date: Thu Nov 8 21:27:23 2018 -0600 KVM: PPC: Book3S HV: Fix handling for interrupted H_ENTER_NESTED While running a nested guest VCPU on L0 via H_ENTER_NESTED hcall, a pending signal in the L0 QEMU process can generate the following sequence: ret0 = kvmppc_pseries_do_hcall() ret1 = kvmhv_enter_nested_guest() ret2 = kvmhv_run_single_vcpu() if (ret2 == -EINTR) return H_INTERRUPT if (ret1 == H_INTERRUPT) kvmppc_set_gpr(vcpu, 3, 0) return -EINTR /* skipped: */ kvmppc_set_gpr(vcpu, 3, ret) vcpu->arch.hcall_needed = 0 return RESUME_GUEST which causes an exit to L0 userspace with ret0 == -EINTR. The intention seems to be to set the hcall return value to 0 (via VCPU r3) so that L1 will see a successful return from H_ENTER_NESTED once we resume executing the VCPU. However, because we don't set vcpu->arch.hcall_needed = 0, we do the following once userspace resumes execution via kvm_arch_vcpu_ioctl_run(): ... } else if (vcpu->arch.hcall_needed) { int i kvmppc_set_gpr(vcpu, 3, run->papr_hcall.ret); for (i = 0; i < 9; ++i) kvmppc_set_gpr(vcpu, 4 + i, run->papr_hcall.args[i]); vcpu->arch.hcall_needed = 0; since vcpu->arch.hcall_needed == 1 indicates that userspace should have handled the hcall and stored the return value in run->papr_hcall.ret. Since that's not the case here, we can get an unexpected value in VCPU r3, which can result in kvmhv_p9_guest_entry() reporting an unexpected trap value when it returns from H_ENTER_NESTED, causing the following register dump to console via subsequent call to kvmppc_handle_exit_hv() in L1: [ 350.612854] vcpu 00000000f9564cf8 (0): [ 350.612915] pc = c00000000013eb98 msr = 8000000000009033 trap = 1 [ 350.613020] r 0 = c0000000004b9044 r16 = 0000000000000000 [ 350.613075] r 1 = c00000007cffba30 r17 = 0000000000000000 [ 350.613120] r 2 = c00000000178c100 r18 = 00007fffc24f3b50 [ 350.613166] r 3 = c00000007ef52480 r19 = 00007fffc24fff58 [ 350.613212] r 4 = 0000000000000000 r20 = 00000a1e96ece9d0 [ 350.613253] r 5 = 70616d00746f6f72 r21 = 00000a1ea117c9b0 [ 350.613295] r 6 = 0000000000000020 r22 = 00000a1ea1184360 [ 350.613338] r 7 = c0000000783be440 r23 = 0000000000000003 [ 350.613380] r 8 = fffffffffffffffc r24 = 00000a1e96e9e124 [ 350.613423] r 9 = c00000007ef52490 r25 = 00000000000007ff [ 350.613469] r10 = 0000000000000004 r26 = c00000007eb2f7a0 [ 350.613513] r11 = b0616d0009eccdb2 r27 = c00000007cffbb10 [ 350.613556] r12 = c0000000004b9000 r28 = c00000007d83a2c0 [ 350.613597] r13 = c000000001b00000 r29 = c0000000783cdf68 [ 350.613639] r14 = 0000000000000000 r30 = 0000000000000000 [ 350.613681] r15 = 0000000000000000 r31 = c00000007cffbbf0 [ 350.613723] ctr = c0000000004b9000 lr = c0000000004b9044 [ 350.613765] srr0 = 0000772f954dd48c srr1 = 800000000280f033 [ 350.613808] sprg0 = 0000000000000000 sprg1 = c000000001b00000 [ 350.613859] sprg2 = 0000772f9565a280 sprg3 = 0000000000000000 [ 350.613911] cr = 88002848 xer = 0000000020040000 dsisr = 42000000 [ 350.613962] dar = 0000772f95390000 [ 350.614031] fault dar = c000000244b278c0 dsisr = 00000000 [ 350.614073] SLB (0 entries): [ 350.614157] lpcr = 0040000003d40413 sdr1 = 0000000000000000 last_inst = ffffffff [ 350.614252] trap=0x1 | pc=0xc00000000013eb98 | msr=0x8000000000009033 followed by L1's QEMU reporting the following before stopping execution of the nested guest: KVM: unknown exit, hardware reason 1 NIP c00000000013eb98 LR c0000000004b9044 CTR c0000000004b9000 XER 0000000020040000 CPU#0 MSR 8000000000009033 HID0 0000000000000000 HF 8000000000000000 iidx 3 didx 3 TB 00000000 00000000 DECR 00000000 GPR00 c0000000004b9044 c00000007cffba30 c00000000178c100 c00000007ef52480 GPR04 0000000000000000 70616d00746f6f72 0000000000000020 c0000000783be440 GPR08 fffffffffffffffc c00000007ef52490 0000000000000004 b0616d0009eccdb2 GPR12 c0000000004b9000 c000000001b00000 0000000000000000 0000000000000000 GPR16 0000000000000000 0000000000000000 00007fffc24f3b50 00007fffc24fff58 GPR20 00000a1e96ece9d0 00000a1ea117c9b0 00000a1ea1184360 0000000000000003 GPR24 00000a1e96e9e124 00000000000007ff c00000007eb2f7a0 c00000007cffbb10 GPR28 c00000007d83a2c0 c0000000783cdf68 0000000000000000 c00000007cffbbf0 CR 88002848 [ L L - - E L G L ] RES ffffffffffffffff SRR0 0000772f954dd48c SRR1 800000000280f033 PVR 00000000004e1202 VRSAVE 0000000000000000 SPRG0 0000000000000000 SPRG1 c000000001b00000 SPRG2 0000772f9565a280 SPRG3 0000000000000000 SPRG4 0000000000000000 SPRG5 0000000000000000 SPRG6 0000000000000000 SPRG7 0000000000000000 HSRR0 0000000000000000 HSRR1 0000000000000000 CFAR 0000000000000000 LPCR 0000000003d40413 PTCR 0000000000000000 DAR 0000772f95390000 DSISR 0000000042000000 Fix this by setting vcpu->arch.hcall_needed = 0 to indicate completion of H_ENTER_NESTED before we exit to L0 userspace. Fixes: 360cae313702 ("KVM: PPC: Book3S HV: Nested guest entry via hypercall") Cc: linuxppc-dev@ozlabs.org Cc: David Gibson Signed-off-by: Michael Roth Reviewed-by: Suraj Jitindar Singh Signed-off-by: Paul Mackerras commit 5929a1f0ff30d04ccf4b0f9c648e7aa8bc816bbd Merge: 9746e46737a1 ef3a61406618 Author: Linus Torvalds Date: Wed Nov 14 17:14:40 2018 -0600 Merge tag 'riscv-for-linus-4.20-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/palmer/riscv-linux Pull RISC-V fixes from Palmer Dabbelt: "This contains a few patches that fix various issues in the RISC-V port: - enable printk timestamps in the RISC-V defconfig. - a whitespace fix to "struct pt_regs". - add a "vdso_install" target for RISC-V. - a pair of build fixes: one to fix a typo in our makefile, and one to clean up some warnings. There will probably be more patches from us for 4.20, but I don't have anything that's ready to go right now so I'm going to hold off a bit. Right now the only concrete thing I know I want to make sure gets sorted out is our 32-bit stat interface, which I don't want sitting in limbo for another cycle as we have to get RV32I glibc sone" * tag 'riscv-for-linus-4.20-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/palmer/riscv-linux: RISC-V: Silence some module warnings on 32-bit RISC-V: lib: Fix build error for 64-bit riscv: add missing vdso_install target riscv: fix spacing in struct pt_regs RISC-V: defconfig: Enable printk timestamps commit 9746e46737a143631a301be9a09fafdae3349138 Merge: e4c4b0e45dfd 646558ff1643 Author: Linus Torvalds Date: Wed Nov 14 17:07:01 2018 -0600 Merge tag 'kgdb-fixes-4.20-rc3' of https://git.linaro.org/people/daniel.thompson/linux Pull kgdb fixes from Daniel Thompson: "The most important changes here are two fixes for kdb regressions causes by the hashing of %p pointers together with a fix for a potential overflow in kdb tab completion handling (and warning fix). Also included are a set of changes in preparation to (eventually) enable -Wimplicit-fallthrough" * tag 'kgdb-fixes-4.20-rc3' of https://git.linaro.org/people/daniel.thompson/linux: kdb: kdb_support: mark expected switch fall-throughs kdb: kdb_keyboard: mark expected switch fall-throughs kdb: kdb_main: refactor code in kdb_md_line kdb: Use strscpy with destination buffer size kdb: print real address of pointers instead of hashed addresses kdb: use correct pointer when 'btc' calls 'btt' commit e4c4b0e45dfd1212831ad5bd129c6781d55e162a Merge: 3472f66013d1 fd35f192e42c Author: Linus Torvalds Date: Wed Nov 14 17:03:24 2018 -0600 Merge branch 'fixes-v4.20-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security Pull integrity fix from James Morris: "Fix a bug introduced with in this merge window in 82f94f24475c ("KEYS: Provide software public key query function [ver #2]")" * 'fixes-v4.20-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: integrity: support new struct public_key_signature encoding field commit 5082a7df5251b361be8f8edc1f0a148d07999820 Merge: 432798195bbc 1decef370456 Author: Greg Kroah-Hartman Date: Wed Nov 14 14:57:39 2018 -0800 Merge tag 'gnss-4.20-rc3' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/gnss into char-misc-linus Johan writes: GNSS fixes for v4.20-rc3 The two serdev drivers were using the wrong timeout argument when expecting the serdev_device_write() helper to wait indefinitely, something which could result in incomplete writes when the controller write buffer was getting full. Signed-off-by: Johan Hovold commit 27c0f2b0197070c8e94bdf28686d4c63b959dea8 Author: Rajan Vaja Date: Tue Nov 13 23:46:49 2018 -0800 clk: zynqmp: handle fixed factor param query error Return proper error code in case query for fixed factor parameter fails. This also fixes build warning for set but not used variable 'ret'. Signed-off-by: Rajan Vaja Fixes: 3fde0e16d016 ("drivers: clk: Add ZynqMP clock driver") Signed-off-by: Stephen Boyd commit 22454b79e6de05fa61a2a72d00d2eed798abbb75 Author: Dennis Wassenberg Date: Tue Nov 13 14:40:34 2018 +0100 usb: core: Fix hub port connection events lost This will clear the USB_PORT_FEAT_C_CONNECTION bit in case of a hub port reset only if a device is was attached to the hub port before resetting the hub port. Using a Lenovo T480s attached to the ultra dock it was not possible to detect some usb-c devices at the dock usb-c ports because the hub_port_reset code will clear the USB_PORT_FEAT_C_CONNECTION bit after the actual hub port reset. Using this device combo the USB_PORT_FEAT_C_CONNECTION bit was set between the actual hub port reset and the clear of the USB_PORT_FEAT_C_CONNECTION bit. This ends up with clearing the USB_PORT_FEAT_C_CONNECTION bit after the new device was attached such that it was not detected. This patch will not clear the USB_PORT_FEAT_C_CONNECTION bit if there is currently no device attached to the port before the hub port reset. This will avoid clearing the connection bit for new attached devices. Signed-off-by: Dennis Wassenberg Acked-by: Mathias Nyman Cc: stable Signed-off-by: Greg Kroah-Hartman commit 882eab6c28d23a970ae73b7eb831b169a672d456 Author: Tzung-Bi Shih Date: Wed Nov 14 17:06:13 2018 +0800 ASoC: dapm: Recalculate audio map forcely when card instantiated Audio map are possible in wrong state before card->instantiated has been set to true. Imaging the following examples: time 1: at the beginning in:-1 in:-1 in:-1 in:-1 out:-1 out:-1 out:-1 out:-1 SIGGEN A B Spk time 2: after someone called snd_soc_dapm_new_widgets() (e.g. create_fill_widget_route_map() in sound/soc/codecs/hdac_hdmi.c) in:1 in:0 in:0 in:0 out:0 out:0 out:0 out:1 SIGGEN A B Spk time 3: routes added in:1 in:0 in:0 in:0 out:0 out:0 out:0 out:1 SIGGEN -----> A -----> B ---> Spk In the end, the path should be powered on but it did not. At time 3, "in" of SIGGEN and "out" of Spk did not propagate to their neighbors because snd_soc_dapm_add_path() will not invalidate the paths if the card has not instantiated (i.e. card->instantiated is false). To correct the state of audio map, recalculate the whole map forcely. Signed-off-by: Tzung-Bi Shih Signed-off-by: Mark Brown commit 4b8440abc9025e214474b11f1ee7db146ce30afa Merge: 11644a765952 2fc6d4be35fb Author: Greg Kroah-Hartman Date: Wed Nov 14 14:24:07 2018 -0800 Merge tag 'fixes-for-v4.20-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-linus Felipe writes: For now only 5 small fixes. Most importantly, we have a fix for the TRB type used on unaligned transfers on dwc3. Also a fix for a NULL pointer dereference in dwc3_pci_remove(). Note that a recent commit on ffs was reverted because it causes a regression elsewere. * tag 'fixes-for-v4.20-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb: usb: dwc3: gadget: fix ISOC TRB type on unaligned transfers Revert "usb: gadget: ffs: Fix BUG when userland exits with submitted AIO transfers" usb: dwc2: pci: Fix an error code in probe usb: dwc3: Fix NULL pointer exception in dwc3_pci_remove() usb: dwc3: gadget: Properly check last unaligned/zero chain TRB usb: dwc3: core: Clean up ULPI device commit 007b656851ed7f94ba0fa358ac3e5d7705da6846 Author: Ursula Braun Date: Mon Nov 12 17:06:12 2018 +0100 s390/ism: clear dmbe_mask bit before SMC IRQ handling SMC-D stress workload showed connection stalls. Since the firmware decides to skip raising an interrupt if the SBA DMBE mask bit is still set, this SBA DMBE mask bit should be cleared before the IRQ handling in the SMC code runs. Otherwise there are small windows possible with missing interrupts for incoming data. SMC-D currently does not care about the old value of the SBA DMBE mask. Acked-by: Sebastian Ott Signed-off-by: Ursula Braun Signed-off-by: David S. Miller commit 76836fd354922ebe4798a64fda01f8dc6a8b0984 Author: Peter Ujfalusi Date: Wed Nov 14 14:58:20 2018 +0200 ASoC: omap-abe-twl6040: Fix missing audio card caused by deferred probing The machine driver fails to probe in next-20181113 with: [ 2.539093] omap-abe-twl6040 sound: ASoC: CODEC DAI twl6040-legacy not registered [ 2.546630] omap-abe-twl6040 sound: devm_snd_soc_register_card() failed: -517 ... [ 3.693206] omap-abe-twl6040 sound: ASoC: Both platform name/of_node are set for TWL6040 [ 3.701446] omap-abe-twl6040 sound: ASoC: failed to init link TWL6040 [ 3.708007] omap-abe-twl6040 sound: devm_snd_soc_register_card() failed: -22 [ 3.715148] omap-abe-twl6040: probe of sound failed with error -22 Bisect pointed to a merge commit: first bad commit: [0f688ab20a540aafa984c5dbd68a71debebf4d7f] Merge remote-tracking branch 'net-next/master' and a diff between a working kernel does not reveal anything which would explain the change in behavior. Further investigation showed that on the second try of loading fails because the dai_link->platform is no longer NULL and it might be pointing to uninitialized memory. The fix is to move the snd_soc_dai_link and snd_soc_card inside of the abe_twl6040 struct, which is dynamically allocated every time the driver probes. Signed-off-by: Peter Ujfalusi Signed-off-by: Mark Brown commit 3472f66013d1972f0baf1631ea1e02479b902579 Merge: dbb3c26034fa 017ce359a718 Author: Linus Torvalds Date: Wed Nov 14 15:36:45 2018 -0600 Merge tag 'acpi-4.20-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI fix from Rafael Wysocki: "Fix a recently introduced build issue in the xpower PMIC driver (Arnd Bergmann)" * tag 'acpi-4.20-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI / PMIC: xpower: fix IOSF_MBI dependency commit dbb3c26034fa5336de45e667e2faf80a78531cd0 Merge: 4e4490d438a1 97dc6c03c1b0 Author: Linus Torvalds Date: Wed Nov 14 15:33:45 2018 -0600 Merge tag 'pm-4.20-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fixes from Rafael Wysocki: "These remove a stale DT entry left behind after recent removal of a cpufreq driver without users, fix up error handling in the imx6q cpufreq driver, fix two issues in the cpufreq documentation, and update the ARM cpufreq driver. Specifics: - Drop stale DT binding for the arm_big_little_dt driver removed recently (Sudeep Holla). - Fix up error handling in the imx6q cpufreq driver to make it report voltage scaling failures (Anson Huang). - Fix two issues in the cpufreq documentation (Viresh Kumar, Zhao Wei Liew). - Fix ARM cpuidle driver initialization regression from the 4.19 time frame and rework the driver registration part of it to simplify code (Ulf Hansson)" * tag 'pm-4.20-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ARM: cpuidle: Convert to use cpuidle_register|unregister() ARM: cpuidle: Don't register the driver when back-end init returns -ENXIO dt-bindings: cpufreq: remove stale arm_big_little_dt entry Documentation: cpufreq: Correct a typo cpufreq: imx6q: add return value check for voltage scale Documentation: cpu-freq: Frequencies aren't always sorted commit 4e4490d438a1c84411e3ebd0b850b46dd2e752cf Merge: d41217aac0a5 025911a5f4e3 Author: Linus Torvalds Date: Wed Nov 14 15:31:15 2018 -0600 Merge tag 'nfsd-4.20-1' of git://linux-nfs.org/~bfields/linux Pull nfsd fixes from Bruce Fields: "Three nfsd bugfixes. None are new bugs, but they all take a little effort to hit, which might explain why they weren't found sooner" * tag 'nfsd-4.20-1' of git://linux-nfs.org/~bfields/linux: SUNRPC: drop pointless static qualifier in xdr_get_next_encode_buffer() nfsd: COPY and CLONE operations require the saved filehandle to be set sunrpc: correct the computation for page_ptr when truncating commit d41217aac0a577a247c9c8cde688419fde25fba5 Merge: dbcec2e6bcfe 0d76bcc960e6 Author: Linus Torvalds Date: Wed Nov 14 13:51:47 2018 -0600 Merge tag 'pci-v4.20-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci Pull PCI fix from Bjorn Helgaas: "Revert a _PXM change that causes silent early boot failure on some AMD ThreadRipper systems" * tag 'pci-v4.20-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: Revert "ACPI/PCI: Pay attention to device-specific _PXM node values" commit dbcec2e6bcfeb9769005cf529f0b5050f9557ff6 Merge: b7bbf9935fb7 f635e48e866e Author: Linus Torvalds Date: Wed Nov 14 13:49:29 2018 -0600 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "This is mostly a set of minor and obvious fixes (three in one of the new drivers). The only substantial change is to move the ufs to the blk-mq now that the merge window fixed the suspend/resume issues with blk-mq" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: qla2xxx: Initialize port speed to avoid setting lower speed Revert "scsi: ufs: Disable blk-mq for now" scsi: NCR5380: Return false instead of NULL scsi: qla2xxx: Fix a typo in MODULE_PARM_DESC scsi: hisi_sas: Remove set but not used variable 'dq_list' scsi: myrs: only build on little-endian platforms scsi: myrs: avoid stack overflow warning scsi: lpfc: fix remoteport access scsi: myrb: fix sprintf buffer overflow warning scsi: target/core: Avoid that a kernel oops is triggered when COMPARE AND WRITE fails commit b7bbf9935fb793ef8dc42c61a459d74e8606a799 Merge: 47e624c03043 9bde0afb7a90 Author: Linus Torvalds Date: Wed Nov 14 13:47:15 2018 -0600 Merge tag 'rtc-4.20-2' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux Pull RTC driver fixes from Alexandre Belloni: - cmos: stop exporting alarms when not supported - hctosys: correctly report range error - pcf2127: fix a memory leak * tag 'rtc-4.20-2' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: rtc: pcf2127: fix a kmemleak caused in pcf2127_i2c_gather_write rtc: hctosys: Add missing range error reporting rtc: cmos: Do not export alarm rtc_ops when we do not support alarms commit 47e624c03043f544ab797ee073d958cfa57dbf51 Merge: 857c34cd094b 1e9c75fb9c47 Author: Linus Torvalds Date: Wed Nov 14 13:44:52 2018 -0600 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace Pull namespace fix from Eric Biederman: "Benjamin Coddington noticed an unkillable busy loop in the kernel that anyone who is sufficiently motivated can trigger. This bug did not exist in earlier kernels making this bug a regression. I have tested the change personally and confirmed that the bug exists and that the fix works. This fix has been picked up by linux-next and hopefully the automated testing bots and no problems have been reported from those sources. Ordinarily I would let something like this sit a little longer but I am going to be away at Linux Plumbers the rest of this week and I am afraid if I don't send the pull request now this fix will get lost" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace: mnt: fix __detach_mounts infinite loop commit 857c34cd094b94a82aceba23fdd9af47296404a2 Merge: e2f8b472a708 86d4d068df57 Author: Linus Torvalds Date: Wed Nov 14 13:42:41 2018 -0600 Merge branch 'parisc-4.20-3' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux Pull parisc fix from Helge Deller: "Revert one patch which changed how spinlocks get released. It breaks the rwlock implementation in glibc" * 'parisc-4.20-3' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: parisc: Revert "Release spinlocks using ordered store" commit e2f8b472a70827348ce2007e121d67f49047ba62 Merge: ccda4af0f4b9 5df7a99bdd0d Author: Linus Torvalds Date: Wed Nov 14 13:40:22 2018 -0600 Merge branch 'spectre' of git://git.armlinux.org.uk/~rmk/linux-arm Pull ARM fix from Russell King: "It was noticed that one of Julien's patches contained an error, this fixes that up" * 'spectre' of git://git.armlinux.org.uk/~rmk/linux-arm: ARM: 8810/1: vfp: Fix wrong assignement to ufp_exc commit 1decef370456870bf448a565be95db636428e106 Author: Johan Hovold Date: Wed Nov 14 09:37:54 2018 +0100 gnss: sirf: fix synchronous write timeout Passing a timeout of zero to the synchronous serdev_device_write() helper does currently not imply to wait forever (unlike passing zero to serdev_device_wait_until_sent()). Instead, if there's insufficient room in the write buffer, we'd end up with an incomplete write. Fixes: d2efbbd18b1e ("gnss: add driver for sirfstar-based receivers") Cc: stable # 4.19 Signed-off-by: Johan Hovold commit 56a6c7268312cba9436b84cac01b3e502c5c511d Author: Johan Hovold Date: Wed Nov 14 09:33:57 2018 +0100 gnss: serial: fix synchronous write timeout Passing a timeout of zero to the synchronous serdev_device_write() helper does currently not imply to wait forever (unlike passing zero to serdev_device_wait_until_sent()). Instead, if there's insufficient room in the write buffer, we'd end up with an incomplete write. Fixes: 37768b054f20 ("gnss: add generic serial driver") Cc: stable # 4.19 Signed-off-by: Johan Hovold commit f505754fd6599230371cb01b9332754ddc104be1 Author: Filipe Manana Date: Wed Nov 14 11:35:24 2018 +0000 Btrfs: ensure path name is null terminated at btrfs_control_ioctl We were using the path name received from user space without checking that it is null terminated. While btrfs-progs is well behaved and does proper validation and null termination, someone could call the ioctl and pass a non-null terminated patch, leading to buffer overrun problems in the kernel. The ioctl is protected by CAP_SYS_ADMIN. So just set the last byte of the path to a null character, similar to what we do in other ioctls (add/remove/resize device, snapshot creation, etc). CC: stable@vger.kernel.org # 4.4+ Reviewed-by: Anand Jain Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 38cd989ee38c16388cde89db5b734f9d55b905f9 Author: Nicolin Chen Date: Tue Nov 13 19:48:54 2018 -0800 hwmon: (ina2xx) Fix current value calculation The current register (04h) has a sign bit at MSB. The comments for this calculation also mention that it's a signed register. However, the regval is unsigned type so result of calculation turns out to be an incorrect value when current is negative. This patch simply fixes this by adding a casting to s16. Fixes: 5d389b125186c ("hwmon: (ina2xx) Make calibration register value fixed") Signed-off-by: Nicolin Chen Signed-off-by: Guenter Roeck commit 8dc765d438f1e42b3e8227b3b09fad7d73f4ec9a Author: Ming Lei Date: Wed Nov 14 16:25:51 2018 +0800 SCSI: fix queue cleanup race before queue initialization is done c2856ae2f315d ("blk-mq: quiesce queue before freeing queue") has already fixed this race, however the implied synchronize_rcu() in blk_mq_quiesce_queue() can slow down LUN probe a lot, so caused performance regression. Then 1311326cf4755c7 ("blk-mq: avoid to synchronize rcu inside blk_cleanup_queue()") tried to quiesce queue for avoiding unnecessary synchronize_rcu() only when queue initialization is done, because it is usual to see lots of inexistent LUNs which need to be probed. However, turns out it isn't safe to quiesce queue only when queue initialization is done. Because when one SCSI command is completed, the user of sending command can be waken up immediately, then the scsi device may be removed, meantime the run queue in scsi_end_request() is still in-progress, so kernel panic can be caused. In Red Hat QE lab, there are several reports about this kind of kernel panic triggered during kernel booting. This patch tries to address the issue by grabing one queue usage counter during freeing one request and the following run queue. Fixes: 1311326cf4755c7 ("blk-mq: avoid to synchronize rcu inside blk_cleanup_queue()") Cc: Andrew Jones Cc: Bart Van Assche Cc: linux-scsi@vger.kernel.org Cc: Martin K. Petersen Cc: Christoph Hellwig Cc: James E.J. Bottomley Cc: stable Cc: jianchao.wang Signed-off-by: Ming Lei Signed-off-by: Jens Axboe commit 4800bf7bc8c725e955fcbc6191cc872f43f506d3 Author: Dave Chinner Date: Wed Nov 14 08:17:18 2018 -0700 block: fix 32 bit overflow in __blkdev_issue_discard() A discard cleanup merged into 4.20-rc2 causes fstests xfs/259 to fall into an endless loop in the discard code. The test is creating a device that is exactly 2^32 sectors in size to test mkfs boundary conditions around the 32 bit sector overflow region. mkfs issues a discard for the entire device size by default, and hence this throws a sector count of 2^32 into blkdev_issue_discard(). It takes the number of sectors to discard as a sector_t - a 64 bit value. The commit ba5d73851e71 ("block: cleanup __blkdev_issue_discard") takes this sector count and casts it to a 32 bit value before comapring it against the maximum allowed discard size the device has. This truncates away the upper 32 bits, and so if the lower 32 bits of the sector count is zero, it starts issuing discards of length 0. This causes the code to fall into an endless loop, issuing a zero length discards over and over again on the same sector. Fixes: ba5d73851e71 ("block: cleanup __blkdev_issue_discard") Tested-by: Darrick J. Wong Reviewed-by: Darrick J. Wong Signed-off-by: Dave Chinner Killed pointless WARN_ON(). Signed-off-by: Jens Axboe commit 613a41b0d16e617f46776a93b975a1eeea96417c Author: Thomas Richter Date: Tue Nov 13 15:38:22 2018 +0000 s390/cpum_cf: Reject request for sampling in event initialization On s390 command perf top fails [root@s35lp76 perf] # ./perf top -F100000 --stdio Error: cycles: PMU Hardware doesn't support sampling/overflow-interrupts. Try 'perf stat' [root@s35lp76 perf] # Using event -e rb0000 works as designed. Event rb0000 is the event number of the sampling facility for basic sampling. During system start up the following PMUs are installed in the kernel's PMU list (from head to tail): cpum_cf --> s390 PMU counter facility device driver cpum_sf --> s390 PMU sampling facility device driver uprobe kprobe tracepoint task_clock cpu_clock Perf top executes following functions and calls perf_event_open(2) system call with different parameters many times: cmd_top --> __cmd_top --> perf_evlist__add_default --> __perf_evlist__add_default --> perf_evlist__new_cycles (creates event type:0 (HW) config 0 (CPU_CYCLES) --> perf_event_attr__set_max_precise_ip Uses perf_event_open(2) to detect correct precise_ip level. Fails 3 times on s390 which is ok. Then functions cmd_top --> __cmd_top --> perf_top__start_counters -->perf_evlist__config --> perf_can_comm_exec --> perf_probe_api This functions test support for the following events: "cycles:u", "instructions:u", "cpu-clock:u" using --> perf_do_probe_api --> perf_event_open_cloexec Test the close on exec flag support with perf_event_open(2). perf_do_probe_api returns true if the event is supported. The function returns true because event cpu-clock is supported by the PMU cpu_clock. This is achieved by many calls to perf_event_open(2). Function perf_top__start_counters now calls perf_evsel__open() for every event, which is the default event cpu_cycles (config:0) and type HARDWARE (type:0) which a predfined frequence of 4000. Given the above order of the PMU list, the PMU cpum_cf gets called first and returns 0, which indicates support for this sampling. The event is fully allocated in the function perf_event_open (file kernel/event/core.c near line 10521 and the following check fails: event = perf_event_alloc(&attr, cpu, task, group_leader, NULL, NULL, NULL, cgroup_fd); if (IS_ERR(event)) { err = PTR_ERR(event); goto err_cred; } if (is_sampling_event(event)) { if (event->pmu->capabilities & PERF_PMU_CAP_NO_INTERRUPT) { err = -EOPNOTSUPP; goto err_alloc; } } The check for the interrupt capabilities fails and the system call perf_event_open() returns -EOPNOTSUPP (-95). Add a check to return -ENODEV when sampling is requested in PMU cpum_cf. This allows common kernel code in the perf_event_open() system call to test the next PMU in above list. Fixes: 97b1198fece0 (" "s390, perf: Use common PMU interrupt disabled code") Signed-off-by: Thomas Richter Reviewed-by: Hendrik Brueckner Signed-off-by: Martin Schwidefsky commit a22612301ae61d78a7c0c82dc556931a35db0e91 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 (cherry picked from commit 8577c319b6511fbc391f3775225fecd8b979bc26) Signed-off-by: Joonas Lahtinen commit 6a67a20366f894c172734f28c5646bdbe48a46e3 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 (cherry picked from commit 63ac3328f0d1d37f286e397b14d9596ed09d7ca5) Signed-off-by: Joonas Lahtinen commit 2fc6d4be35fb1e262f209758e25bfe2b7a113a7f Author: Felipe Balbi Date: Wed Aug 1 09:37:34 2018 +0300 usb: dwc3: gadget: fix ISOC TRB type on unaligned transfers When chaining ISOC TRBs together, only the first ISOC TRB should be of type ISOC_FIRST, all others should be of type ISOC. This patch fixes that. Fixes: c6267a51639b ("usb: dwc3: gadget: align transfers to wMaxPacketSize") Cc: # v4.11+ Signed-off-by: Felipe Balbi commit a9c859033f6ec772f8e3228c343bb1321584ae0e Author: Shen Jing Date: Thu Nov 1 15:35:17 2018 +0530 Revert "usb: gadget: ffs: Fix BUG when userland exits with submitted AIO transfers" This reverts commit b4194da3f9087dd38d91b40f9bec42d59ce589a8 since it causes list corruption followed by kernel panic: Workqueue: adb ffs_aio_cancel_worker RIP: 0010:__list_add_valid+0x4d/0x70 Call Trace: insert_work+0x47/0xb0 __queue_work+0xf6/0x400 queue_work_on+0x65/0x70 dwc3_gadget_giveback+0x44/0x50 [dwc3] dwc3_gadget_ep_dequeue+0x83/0x2d0 [dwc3] ? finish_wait+0x80/0x80 usb_ep_dequeue+0x1e/0x90 process_one_work+0x18c/0x3b0 worker_thread+0x3c/0x390 ? process_one_work+0x3b0/0x3b0 kthread+0x11e/0x140 ? kthread_create_worker_on_cpu+0x70/0x70 ret_from_fork+0x3a/0x50 This issue is seen with warm reboot stability testing. Signed-off-by: Shen Jing Signed-off-by: Saranya Gopal Signed-off-by: Felipe Balbi commit 3c135e8900199e3b9375c1eff808cceba2ee37de Author: Dan Carpenter Date: Thu Oct 18 10:36:47 2018 +0300 usb: dwc2: pci: Fix an error code in probe We added some error handling to this function but forgot to set the error code on this path. Fixes: ecd29dabb2ba ("usb: dwc2: pci: Handle error cleanup in probe") Acked-by: Minas Harutyunyan Signed-off-by: Dan Carpenter Signed-off-by: Felipe Balbi commit 7b412b04a0c7000293008231ce8413056abb1982 Author: Kuppuswamy Sathyanarayanan Date: Wed Oct 17 11:40:26 2018 -0700 usb: dwc3: Fix NULL pointer exception in dwc3_pci_remove() In dwc3_pci_quirks() function, gpiod lookup table is only registered for baytrail SOC. But in dwc3_pci_remove(), we try to unregistered it without any checks. This leads to NULL pointer de-reference exception in gpiod_remove_lookup_table() when unloading the module for non baytrail SOCs. This patch fixes this issue. Fixes: 5741022cbdf3 ("usb: dwc3: pci: Add GPIO lookup table on platforms without ACPI GPIO resources") Cc: Signed-off-by: Kuppuswamy Sathyanarayanan Reviewed-by: Heikki Krogerus Signed-off-by: Felipe Balbi commit 40dc948f234b73497c3278875eb08a01d5854d3f Author: Max Filippov Date: Tue Nov 13 23:46:42 2018 -0800 xtensa: fix boot parameters address translation The bootloader may pass physical address of the boot parameters structure to the MMUv3 kernel in the register a2. Code in the _SetupMMU block in the arch/xtensa/kernel/head.S is supposed to map that physical address to the virtual address in the configured virtual memory layout. This code haven't been updated when additional 256+256 and 512+512 memory layouts were introduced and it may produce wrong addresses when used with these layouts. Cc: stable@vger.kernel.org Signed-off-by: Max Filippov commit 5f8208f557065163f9a8089ea2ea7888f9d96922 Author: Corentin Labbe Date: Mon Jul 9 19:51:54 2018 +0000 ARM: dts: sun8i: a83t: bananapi-m3: increase vcc-pd voltage to 3.3V Since commit d7c5f6863550 ("ARM: dts: sun8i: a83t: bananapi-m3: Add AXP813 regulator nodes") my BPIM3 no longer works at gigabit speed. With the default setting, dldo3 is regulated at 2.9v which seems sufficient for the PHY but the aforementioned commit drops it to 2.5V which is insufficient. Note that this behaviour is random for all BPIM3. Some work with 2.5V, but some don't. Finnaly, someone from Bananapi confirmed that this regulator must be set to 3.3V. Fixes: d7c5f6863550 ("ARM: dts: sun8i: a83t: bananapi-m3: Add AXP813 regulator nodes") Signed-off-by: Corentin Labbe [wens@csie.org: Reworked commit message] Signed-off-by: Chen-Yu Tsai commit 437ccdc8ce629470babdda1a7086e2f477048cbd Author: Satheesh Rajendran Date: Thu Nov 8 10:47:56 2018 +0530 powerpc/numa: Suppress "VPHN is not supported" messages When VPHN function is not supported and during cpu hotplug event, kernel prints message 'VPHN function not supported. Disabling polling...'. Currently it prints on every hotplug event, it floods dmesg when a KVM guest tries to hotplug huge number of vcpus, let's just print once and suppress further kernel prints. Signed-off-by: Satheesh Rajendran Signed-off-by: Michael Ellerman commit 877181a8d9dc663f7a73f77f50af714d7888ec3b Author: Paul Moore Date: Tue Nov 13 21:44:33 2018 -0500 selinux: fix non-MLS handling in mls_context_to_sid() Commit 95ffe194204a ("selinux: refactor mls_context_to_sid() and make it stricter") inadvertently changed how we handle labels that did not contain MLS information. This patch restores the proper behavior in mls_context_to_sid() and adds a comment explaining the proper behavior to help ensure this doesn't happen again. Fixes: 95ffe194204a ("selinux: refactor mls_context_to_sid() and make it stricter") Reported-by: Stephen Smalley Signed-off-by: Paul Moore commit 933a95496e48bde40e366a79e6dd9f9740905573 Author: Kirill Marinushkin Date: Mon Nov 12 08:08:34 2018 +0100 ASoC: pcm3060: Rename output widgets In the initial commit [1], I added differential output of the codec as separate `+` and `-` widgets: OUTL+ OUTR+ OUTL- OUTR- Later, in the commit [2], I added a device tree property to configure the output as single-ended or differential. Having this property, the `+` and `-` separation in widgets seems for me confusing. There are no functional benefits in such separation, so I find reasonable to get rid of it: OUTL OUTR The new naming is more friendly for sound cards, and is better aligned with other codec drivers in kernel. Renaming the output widgets now should not be a problem from the backwards- compatibility perspective, as the driver for PCM3060 is added into the mainline very recently, and did not yet appear in any releases. [1] commit 6ee47d4a8dac ("ASoC: pcm3060: Add codec driver") [2] commit a78c62de00d5 ("ASoC: pcm3060: Add DT property for single-ended output") Signed-off-by: Kirill Marinushkin Signed-off-by: Mark Brown commit 67fd1437d11620de8768b22fe20942e752ed52e9 Author: Rohit kumar Date: Thu Nov 8 19:11:40 2018 +0530 ASoC: qcom: Set dai_link id to each dai_link Frontend dai_link id is used for closing ADM sessions. During concurrent usecase when one session is closed, it closes other ADM session associated with other usecase too. Dai_link->id should always point to Frontend dai id. Set cpu_dai id as dai_link id to fix the issue. Signed-off-by: Rohit kumar Acked-by: Srinivas Kandagatla Signed-off-by: Mark Brown commit 9ee325d029c4abb75716851ce38863845911d605 Author: Vasily Khoruzhick Date: Thu Nov 8 20:24:19 2018 -0800 ASoC: sun8i-codec: add missing route for ADC sun8i-codec misses a route from ADC to AIF1 Slot 0 ADC. Add it to the driver to avoid adding it to every dts. Fixes: eda85d1fee05d ("ASoC: sun8i-codec: Add ADC support for a33") Signed-off-by: Vasily Khoruzhick Signed-off-by: Mark Brown commit e39d8a186ed002854196668cb7562ffdfbc6d379 Author: Trond Myklebust Date: Tue Nov 13 16:37:54 2018 -0500 NFSv4: Fix an Oops during delegation callbacks If the server sends a CB_GETATTR or a CB_RECALL while the filesystem is being unmounted, then we can Oops when releasing the inode in nfs4_callback_getattr() and nfs4_callback_recall(). Signed-off-by: Trond Myklebust commit fd35f192e42cf7c0df1e2480bfd5965e35b2f4ca 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 Signed-off-by: James Morris commit 646558ff1643467d3b941b47f519867cbca462c3 Author: Gustavo A. R. Silva Date: Sat Aug 4 21:48:44 2018 -0500 kdb: kdb_support: 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 the code comments with a proper "fall through" annotation, which is what GCC is expecting to find. Signed-off-by: Gustavo A. R. Silva Reviewed-by: Daniel Thompson Signed-off-by: Daniel Thompson commit 01cb37351bafc1b44b962842926210115e231f0a Author: Gustavo A. R. Silva Date: Sat Aug 4 23:18:25 2018 -0500 kdb: kdb_keyboard: 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 the code comments with a proper "fall through" annotation, which is what GCC is expecting to find. Signed-off-by: Gustavo A. R. Silva Reviewed-by: Daniel Thompson Signed-off-by: Daniel Thompson commit 9eb62f0e1bc70ebc9b15837a0c4e8f12a7b910cb Author: Gustavo A. R. Silva Date: Thu Aug 16 09:01:41 2018 -0500 kdb: kdb_main: refactor code in kdb_md_line Replace the whole switch statement with a for loop. This makes the code clearer and easy to read. This also addresses the following Coverity warnings: Addresses-Coverity-ID: 115090 ("Missing break in switch") Addresses-Coverity-ID: 115091 ("Missing break in switch") Addresses-Coverity-ID: 114700 ("Missing break in switch") Suggested-by: Daniel Thompson Signed-off-by: Gustavo A. R. Silva Reviewed-by: Daniel Thompson [daniel.thompson@linaro.org: Tiny grammar change in description] Signed-off-by: Daniel Thompson commit c2b94c72d93d0929f48157eef128c4f9d2e603ce Author: Prarit Bhargava Date: Thu Sep 20 08:59:14 2018 -0400 kdb: Use strscpy with destination buffer size gcc 8.1.0 warns with: kernel/debug/kdb/kdb_support.c: In function ‘kallsyms_symbol_next’: kernel/debug/kdb/kdb_support.c:239:4: warning: ‘strncpy’ specified bound depends on the length of the source argument [-Wstringop-overflow=] strncpy(prefix_name, name, strlen(name)+1); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ kernel/debug/kdb/kdb_support.c:239:31: note: length computed here Use strscpy() with the destination buffer size, and use ellipses when displaying truncated symbols. v2: Use strscpy() Signed-off-by: Prarit Bhargava Cc: Jonathan Toppins Cc: Jason Wessel Cc: Daniel Thompson Cc: kgdb-bugreport@lists.sourceforge.net Reviewed-by: Daniel Thompson Signed-off-by: Daniel Thompson commit 568fb6f42ac6851320adaea25f8f1b94de14e40a Author: Christophe Leroy Date: Thu Sep 27 17:17:57 2018 +0000 kdb: print real address of pointers instead of hashed addresses Since commit ad67b74d2469 ("printk: hash addresses printed with %p"), all pointers printed with %p are printed with hashed addresses instead of real addresses in order to avoid leaking addresses in dmesg and syslog. But this applies to kdb too, with is unfortunate: Entering kdb (current=0x(ptrval), pid 329) due to Keyboard Entry kdb> ps 15 sleeping system daemon (state M) processes suppressed, use 'ps A' to see all. Task Addr Pid Parent [*] cpu State Thread Command 0x(ptrval) 329 328 1 0 R 0x(ptrval) *sh 0x(ptrval) 1 0 0 0 S 0x(ptrval) init 0x(ptrval) 3 2 0 0 D 0x(ptrval) rcu_gp 0x(ptrval) 4 2 0 0 D 0x(ptrval) rcu_par_gp 0x(ptrval) 5 2 0 0 D 0x(ptrval) kworker/0:0 0x(ptrval) 6 2 0 0 D 0x(ptrval) kworker/0:0H 0x(ptrval) 7 2 0 0 D 0x(ptrval) kworker/u2:0 0x(ptrval) 8 2 0 0 D 0x(ptrval) mm_percpu_wq 0x(ptrval) 10 2 0 0 D 0x(ptrval) rcu_preempt The whole purpose of kdb is to debug, and for debugging real addresses need to be known. In addition, data displayed by kdb doesn't go into dmesg. This patch replaces all %p by %px in kdb in order to display real addresses. Fixes: ad67b74d2469 ("printk: hash addresses printed with %p") Cc: Signed-off-by: Christophe Leroy Signed-off-by: Daniel Thompson commit dded2e159208a9edc21dd5c5f583afa28d378d39 Author: Christophe Leroy Date: Thu Sep 27 17:17:49 2018 +0000 kdb: use correct pointer when 'btc' calls 'btt' On a powerpc 8xx, 'btc' fails as follows: Entering kdb (current=0x(ptrval), pid 282) due to Keyboard Entry kdb> btc btc: cpu status: Currently on cpu 0 Available cpus: 0 kdb_getarea: Bad address 0x0 when booting the kernel with 'debug_boot_weak_hash', it fails as well Entering kdb (current=0xba99ad80, pid 284) due to Keyboard Entry kdb> btc btc: cpu status: Currently on cpu 0 Available cpus: 0 kdb_getarea: Bad address 0xba99ad80 On other platforms, Oopses have been observed too, see https://github.com/linuxppc/linux/issues/139 This is due to btc calling 'btt' with %p pointer as an argument. This patch replaces %p by %px to get the real pointer value as expected by 'btt' Fixes: ad67b74d2469 ("printk: hash addresses printed with %p") Cc: Signed-off-by: Christophe Leroy Reviewed-by: Daniel Thompson Signed-off-by: Daniel Thompson commit 1d5ceff25aa1edcaf84e7ee26fdcc746cb245af8 Author: Tudor.Ambarus@microchip.com Date: Fri Nov 9 16:56:54 2018 +0000 mtd: spi_nor: pass DMA-able buffer to spi_nor_read_raw() spi_nor_read_raw() calls nor->read() which might be implemented by the m25p80 driver. m25p80 uses the spi-mem layer which requires DMA-able in/out buffers. Pass kmalloc'ed dma buffer to spi_nor_read_raw(). Fixes: b038e8e3be72 ("mtd: spi-nor: parse SFDP Sector Map Parameter Table") Signed-off-by: Tudor Ambarus Signed-off-by: Boris Brezillon commit b9f07cc8207a2a69496beec3f5a5a8372bacdfdc Author: Tudor.Ambarus@microchip.com Date: Fri Nov 9 16:56:52 2018 +0000 mtd: spi-nor: don't overwrite errno in spi_nor_get_map_in_use() Don't overwrite the errno from spi_nor_read_raw(). Signed-off-by: Tudor Ambarus Signed-off-by: Boris Brezillon commit c797bd81d10e648ec8c84c041191527113e63e85 Author: Tudor.Ambarus@microchip.com Date: Fri Nov 9 16:56:50 2018 +0000 mtd: spi-nor: fix iteration over smpt array Iterate over smpt array using its starting address and length instead of the blind iterations that used data found in the array. This prevents possible memory accesses outside of the smpt array boundaries in case software, or manufacturers, misrepresent smpt array fields. Fixes: b038e8e3be72 ("mtd: spi-nor: parse SFDP Sector Map Parameter Table") Suggested-by: Boris Brezillon Signed-off-by: Tudor Ambarus Signed-off-by: Boris Brezillon commit cd5e6d79384eb2dd47de6cb9569150053d4a6803 Author: Tudor.Ambarus@microchip.com Date: Fri Nov 9 16:56:48 2018 +0000 mtd: spi-nor: don't drop sfdp data if optional parsers fail JESD216C states that just the Basic Flash Parameter Table is mandatory. Already defined (or future) additional parameter headers and tables are optional. Don't drop already collected sfdp data in case an optional table parser fails. In case of failing, each optional parser is responsible to roll back to the previously known spi_nor data. Fixes: b038e8e3be72 ("mtd: spi-nor: parse SFDP Sector Map Parameter Table") Reported-by: Yogesh Gaur Suggested-by: Boris Brezillon Signed-off-by: Tudor Ambarus Tested-by: Yogesh Gaur Signed-off-by: Boris Brezillon commit 63415a3c38ddd952608a0bc9afd856f5fcdb6edb Merge: a619b72a3670 7900f06c3fee Author: Olof Johansson Date: Tue Nov 13 11:24:24 2018 -0800 Merge tag 'arm-soc/for-4.20/maintainers-part2' of https://github.com/Broadcom/stblinux into fixes This pull request contains update to the MAINTAINERS file for Broadcom SoCs, please pull the following changes for 4.20: - Jon removes himself from the MAINTAINERS file since he is no longer with Broadcom * tag 'arm-soc/for-4.20/maintainers-part2' of https://github.com/Broadcom/stblinux: MAINTAINERS: Remove self from Broadcom SoCs Signed-off-by: Olof Johansson commit 4c10473d6ddf12ec124c9ff71a5d23bb5388478b Author: Pierre-Louis Bossart Date: Fri Nov 9 13:39:23 2018 -0600 ASoC: Intel: Power down links before turning off display audio power On certain platforms, Display HDMI HDA codec was not going to sleep state after the use when links are powered down after turning off the display power. As per the HW recommendation, links are powered down before turning off the display power to ensure that the codec goes to sleep state. This patch was updated from an earlier version submitted upstream [1] which conflicted with the changes merged for HDaudio codec support with the Intel DSP. [1] https://patchwork.kernel.org/patch/10540213/ Signed-off-by: Sriram Periyasamy Signed-off-by: Sanyog Kale Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown commit 20e00db2f59bdddf8a8e241473ef8be94631d3ae Author: Richard Fitzgerald Date: Mon Nov 12 13:36:38 2018 +0000 ASoC: wm_adsp: Fix dma-unsafe read of scratch registers Stack memory isn't DMA-safe so it isn't safe to use either regmap_raw_read or regmap_bulk_read to read into stack memory. The two functions to read the scratch registers were using stack memory and regmap_raw_read. It's not worth allocating memory just for this trivial read, and it isn't time-critical. A simple regmap_read for each register is sufficient. Signed-off-by: Richard Fitzgerald Signed-off-by: Mark Brown commit 16a8ee4c80b45984b6de1f90a49edcf336b7c621 Author: Katsuhiro Suzuki Date: Sun Nov 11 00:18:44 2018 +0900 ASoC: rockchip: add missing slave_config setting for I2S This patch adds missing prepare_sleve_config that is needed for setup the DMA slave channel for I2S. Signed-off-by: Katsuhiro Suzuki Signed-off-by: Mark Brown commit 35fdc3902179366489a12cae4cb3ccc3b95f0afe Author: Stefan Wahren Date: Sun Nov 11 13:01:11 2018 +0100 hwmon: (raspberrypi) Fix initial notify In case an under-voltage happens before probing the driver wont write the critical warning into the kernel log. So don't init of last_throttled during probe and fix this issue. Fixes: 74d1e007915f ("hwmon: Add support for RPi voltage sensor") Reported-by: "Noralf Trønnes" Signed-off-by: Stefan Wahren Signed-off-by: Guenter Roeck commit 70df9ebbd82c794ddfbb49d45b337f18d5588dc2 Author: Nicolin Chen Date: Fri Nov 9 16:42:14 2018 -0800 hwmon (ina2xx) Fix NULL id pointer in probe() When using DT configurations, the id pointer might turn out to be NULL. Then the driver encounters NULL pointer access: Unable to handle kernel read from unreadable memory at vaddr 00000018 [...] PC is at ina2xx_probe+0x114/0x200 LR is at ina2xx_probe+0x10c/0x200 [...] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b The reason is that i2c core returns the id pointer by matching id_table with client->name, while the client->name is actually using the name from the first string in the DT compatible list, not the best one. So i2c core would fail to match the id_table if the best matched compatible string isn't the first one, and then would return a NULL id pointer. This probably should be fixed in i2c core. But it doesn't hurt to make the driver robust. So this patch fixes it by using the "chip" that's added to unify both DT and non-DT configurations. Additionally, since id pointer could be null, so as id->name: ina2xx 10-0047: power monitor (null) (Rshunt = 1000 uOhm) ina2xx 10-0048: power monitor (null) (Rshunt = 10000 uOhm) So this patch also fixes NULL name pointer, using client->name to play safe and to align with hwmon->name. Fixes: bd0ddd4d0883 ("hwmon: (ina2xx) Add OF device ID table") Signed-off-by: Nicolin Chen Signed-off-by: Guenter Roeck commit db8ddde766adf09605b5282e7978fa0ba76c3ee3 Merge: 11123ab9d90c ed4eac20dcff Author: David S. Miller Date: Tue Nov 13 08:51:17 2018 -0800 Merge branch 'qed-Miscellaneous-bug-fixes' Denis Bolotin says: ==================== qed: Miscellaneous bug fixes This patch series fixes several unrelated bugs across the driver. Please consider applying to net. V1->V2: ------- Use dma_rmb() instead of rmb(). ==================== Signed-off-by: David S. Miller commit ed4eac20dcffdad47709422e0cb925981b056668 Author: Denis Bolotin Date: Mon Nov 12 12:50:23 2018 +0200 qed: Fix reading wrong value in loop condition The value of "sb_index" is written by the hardware. Reading its value and writing it to "index" must finish before checking the loop condition. Signed-off-by: Denis Bolotin Signed-off-by: Michal Kalderon Signed-off-by: David S. Miller commit 291d57f67d2449737d1e370ab5b9a583818eaa0c Author: Michal Kalderon Date: Mon Nov 12 12:50:22 2018 +0200 qed: Fix rdma_info structure allocation Certain flows need to access the rdma-info structure, for example dcbx update flows. In some cases there can be a race between the allocation or deallocation of the structure which was done in roce start / roce stop and an asynchrounous dcbx event that tries to access the structure. For this reason, we move the allocation of the rdma_info structure to be similar to the iscsi/fcoe info structures which are allocated during device setup. We add a new field of "active" to the struct to define whether roce has already been started or not, and this is checked instead of whether the pointer to the info structure. Fixes: 51ff17251c9c ("qed: Add support for RoCE hw init") Signed-off-by: Michal Kalderon Signed-off-by: Denis Bolotin Signed-off-by: David S. Miller commit e90202ed1cf9672c48a363c84a929932ebfe6fc0 Author: Denis Bolotin Date: Mon Nov 12 12:50:21 2018 +0200 qed: Fix overriding offload_tc by protocols without APP TLV The TC received from APP TLV is stored in offload_tc, and should not be set by protocols which did not receive an APP TLV. Fixed the condition when overriding the offload_tc. Signed-off-by: Denis Bolotin Signed-off-by: Michal Kalderon Signed-off-by: David S. Miller commit 9aaa4e8ba12972d674caeefbc5f88d83235dd697 Author: Denis Bolotin Date: Mon Nov 12 12:50:20 2018 +0200 qed: Fix PTT leak in qed_drain() Release PTT before entering error flow. Signed-off-by: Denis Bolotin Signed-off-by: Michal Kalderon Signed-off-by: David S. Miller commit 11123ab9d90c5f426beadfe01507616c3654b06d Merge: 77e461d14ed1 d788905f68fd Author: David S. Miller Date: Tue Nov 13 08:43:05 2018 -0800 Merge tag 'linux-can-fixes-for-4.20-20181109' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can Marc Kleine-Budde says: ==================== pull-request: can 2018-11-09 this is a pull request of 20 patches for net/master. First we have a patch by Oliver Hartkopp which changes the raw socket's raw_sendmsg() to return an error value if the user tries to send a CANFD frame to a CAN-2.0 device. The next two patches are by Jimmy Assarsson and fix potential problems in the kvaser_usb driver. YueHaibing's patches for the ucan driver fix a compile time warning and remove a duplicate include. Eugeniu Rosca patch adds more binding documentation to the rcar_can driver bindings. The next two patches are by Fabrizio Castro for the rcar_can driver and fixes a problem in the driver's probe function and document the r8a774a1 binding. Lukas Wunner's patch fixes a recpetion problem in hi311x driver by switching from edge to level triggered interruts. The next three patches all target the flexcan driver. Pankaj Bansal's patch unconditionally unlocks the last mailbox used for RX. Alexander Stein provides a better workaround for a hardware limitation when sending RTR frames, by using the last mailbox for TX, resulting in fewer lost frames. The patch by me simplyfies the driver, by making a runtime value a compile time constant. The following 4 patches are by me and provide the groundwork for the next patches by Oleksij Rempel. To avoid code duplication common code in the common CAN driver infrastructure is factured out and error handling is cleaned up. The next 4 patches are by Oleksij Rempel and fix the problem in the flexcan driver that other processes see TX frames arrive out of order with ragards to a RX'ed frame (which are send by a different system on the CAN bus as the result of our TX frame). ==================== Signed-off-by: David S. Miller commit c138325fb8713472d5a0c3c7258b9131bab40725 Author: Ondrej Mosnacek Date: Tue Nov 13 16:16:08 2018 +0100 selinux: check length properly in SCTP bind hook selinux_sctp_bind_connect() must verify if the address buffer has sufficient length before accessing the 'sa_family' field. See __sctp_connect() for a similar check. The length of the whole address ('len') is already checked in the callees. Reported-by: Qian Cai Fixes: d452930fd3b9 ("selinux: Add SCTP support") Cc: # 4.17+ Cc: Richard Haines Signed-off-by: Ondrej Mosnacek Tested-by: Qian Cai Signed-off-by: Paul Moore commit c1a17777eb45d9f3821f35e9869c0a08cd2e664e Author: Christian König Date: Mon Nov 12 18:08:31 2018 +0100 drm/amdgpu: fix huge page handling on Vega10 We accidentially set the huge flag on the parent instead of the childs. This caused some VM faults under memory pressure. Signed-off-by: Christian König Acked-by: Alex Deucher Tested-by: Samuel Pitoiset Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 4d454e9ffdb1ef5a51ebc147b5389c96048db683 Author: Rex Zhu Date: Tue Nov 13 11:15:56 2018 +0800 drm/amd/pp: Fix truncated clock value when set watermark the clk value should be tranferred to MHz first and then transfer to uint16. otherwise, the clock value will be truncated. Reviewed-by: Alex Deucher Reported-by: Hersen Wu Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 005af85c50f79b48a1d3aaeb7dfe88b07c125d46 Merge: ccda4af0f4b9 b89e242eee8d Author: Martin Schwidefsky Date: Tue Nov 13 15:42:39 2018 +0100 Merge tag 'vfio-ccw-20181113' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/vfio-ccw into fixes Pull vfio-ccw from Cornelia Huck with the following changes: - Several bugfixes for vfio-ccw commit c837243ff4017f493c7d6f4ab57278d812a86859 Author: Philip Yang Date: Mon Nov 12 14:00:45 2018 -0500 drm/amdgpu: fix bug with IH ring setup The bug limits the IH ring wptr address to 40bit. When the system memory is bigger than 1TB, the bus address is more than 40bit, this causes the interrupt cannot be handled and cleared correctly. Reviewed-by: Christian König Signed-off-by: Philip Yang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 0d76bcc960e6057750fcf556b65da13f8bbdfd2b Author: Bjorn Helgaas Date: Tue Nov 13 08:38:17 2018 -0600 Revert "ACPI/PCI: Pay attention to device-specific _PXM node values" This reverts commit bad7dcd94f3956bcfc0a69ef71fdf0fcca3de4a8. bad7dcd94f39 ("ACPI/PCI: Pay attention to device-specific _PXM node values") caused boot failures (no console output at all) for Martin [1] and Ingo [2] on AMD ThreadRipper systems. Revert the commit until we figure out how to safely use these device-specific _PXM values. [1] https://lore.kernel.org/linux-pci/20180912152140.3676-2-Jonathan.Cameron@huawei.com [2] https://lore.kernel.org/linux-pci/20181113071712.GA2353@gmail.com Fixes: bad7dcd94f39 ("ACPI/PCI: Pay attention to device-specific _PXM node values") Signed-off-by: Bjorn Helgaas commit c1d91f86a1b4c9c05854d59c6a0abd5d0f75b849 Author: Christoph Muellner Date: Tue Nov 13 11:25:35 2018 +0100 arm64: dts: rockchip: Fix PCIe reset polarity for rk3399-puma-haikou. This patch fixes the wrong polarity setting for the PCIe host driver's pre-reset pin for rk3399-puma-haikou. Without this patch link training will most likely fail. Fixes: 60fd9f72ce8a ("arm64: dts: rockchip: add Haikou baseboard with RK3399-Q7 SoM") Cc: stable@vger.kernel.org Signed-off-by: Christoph Muellner Signed-off-by: Heiko Stuebner commit aab15e8ec25765cf7968c72cbec7583acf99d8a4 Author: Filipe Manana Date: Mon Nov 12 10:23:58 2018 +0000 Btrfs: fix rare chances for data loss when doing a fast fsync After the simplification of the fast fsync patch done recently by commit b5e6c3e170b7 ("btrfs: always wait on ordered extents at fsync time") and commit e7175a692765 ("btrfs: remove the wait ordered logic in the log_one_extent path"), we got a very short time window where we can get extents logged without writeback completing first or extents logged without logging the respective data checksums. Both issues can only happen when doing a non-full (fast) fsync. As soon as we enter btrfs_sync_file() we trigger writeback, then lock the inode and then wait for the writeback to complete before starting to log the inode. However before we acquire the inode's lock and after we started writeback, it's possible that more writes happened and dirtied more pages. If that happened and those pages get writeback triggered while we are logging the inode (for example, the VM subsystem triggering it due to memory pressure, or another concurrent fsync), we end up seeing the respective extent maps in the inode's list of modified extents and will log matching file extent items without waiting for the respective ordered extents to complete, meaning that either of the following will happen: 1) We log an extent after its writeback finishes but before its checksums are added to the csum tree, leading to -EIO errors when attempting to read the extent after a log replay. 2) We log an extent before its writeback finishes. Therefore after the log replay we will have a file extent item pointing to an unwritten extent (and without the respective data checksums as well). This could not happen before the fast fsync patch simplification, because for any extent we found in the list of modified extents, we would wait for its respective ordered extent to finish writeback or collect its checksums for logging if it did not complete yet. Fix this by triggering writeback again after acquiring the inode's lock and before waiting for ordered extents to complete. Fixes: e7175a692765 ("btrfs: remove the wait ordered logic in the log_one_extent path") Fixes: b5e6c3e170b7 ("btrfs: always wait on ordered extents at fsync time") CC: stable@vger.kernel.org # 4.19+ Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit b89e242eee8d4cd8261d8d821c62c5d1efc454d0 Author: Eric Farman Date: Fri Nov 9 03:39:29 2018 +0100 s390/cio: Fix cleanup when unsupported IDA format is used Direct returns from within a loop are rude, but it doesn't mean it gets to avoid releasing the memory acquired beforehand. Signed-off-by: Eric Farman Message-Id: <20181109023937.96105-3-farman@linux.ibm.com> Reviewed-by: Farhan Ali Reviewed-by: Pierre Morel Acked-by: Halil Pasic Signed-off-by: Cornelia Huck commit 806212f91c874b24cf9eb4a9f180323671b6c5ed Author: Eric Farman Date: Fri Nov 9 03:39:28 2018 +0100 s390/cio: Fix cleanup of pfn_array alloc failure If pfn_array_alloc fails somehow, we need to release the pfn_array_table that was malloc'd earlier. Signed-off-by: Eric Farman Message-Id: <20181109023937.96105-2-farman@linux.ibm.com> Acked-by: Halil Pasic Signed-off-by: Cornelia Huck commit 55e93ecdc1ef9256279e0a0b08edf72cc47fc2f6 Author: Pierre Morel Date: Thu Oct 25 19:15:20 2018 +0200 vfio: ccw: Register mediated device once all structures are initialized Let's register the mediated device when all the data structures which could be used are initialized. Signed-off-by: Pierre Morel Reviewed-by: Eric Farman Message-Id: <1540487720-11634-3-git-send-email-pmorel@linux.ibm.com> Acked-by: Halil Pasic Signed-off-by: Cornelia Huck commit 52df7837560e51a47903b49243291fb8039653d2 Author: Sebastian Ott Date: Mon Oct 15 13:31:39 2018 +0200 s390/cio: make vfio_ccw_io_region static Fix the following sparse warning: drivers/s390/cio/vfio_ccw_drv.c:25:19: warning: symbol 'vfio_ccw_io_region' was not declared. Should it be static? Signed-off-by: Sebastian Ott Message-Id: Signed-off-by: Cornelia Huck commit adf59dd2408c4536d490bee649784f0465562444 Author: Jorge Ramirez-Ortiz Date: Mon Nov 12 19:41:09 2018 +0100 drm/meson: venc: dmt mode must use encp The video mode for DMT is only populated to support encp. Signed-off-by: Jorge Ramirez-Ortiz Acked-by: Neil Armstrong Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/1542048069-22603-1-git-send-email-jramirez@baylibre.com commit 29e3880109e357fdc607b4393f8308cef6af9413 Author: Florian Westphal Date: Mon Nov 12 22:43:45 2018 +0100 netfilter: nf_tables: fix use-after-free when deleting compat expressions nft_compat ops do not have static storage duration, unlike all other expressions. When nf_tables_expr_destroy() returns, expr->ops might have been free'd already, so we need to store next address before calling expression destructor. For same reason, we can't deref match pointer after nft_xt_put(). This can be easily reproduced by adding msleep() before nft_match_destroy() returns. Fixes: 0ca743a55991 ("netfilter: nf_tables: add compatibility layer for x_tables") Reported-by: Pablo Neira Ayuso Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 0fbcc5b568edab7d848b7c7fa66d44ffbd4133c0 Author: Taehee Yoo Date: Fri Oct 19 00:27:57 2018 +0900 netfilter: xt_RATEEST: remove netns exit routine xt_rateest_net_exit() was added to check whether rules are flushed successfully. but ->net_exit() callback is called earlier than ->destroy() callback. So that ->net_exit() callback can't check that. test commands: %ip netns add vm1 %ip netns exec vm1 iptables -t mangle -I PREROUTING -p udp \ --dport 1111 -j RATEEST --rateest-name ap \ --rateest-interval 250ms --rateest-ewma 0.5s %ip netns del vm1 splat looks like: [ 668.813518] WARNING: CPU: 0 PID: 87 at net/netfilter/xt_RATEEST.c:210 xt_rateest_net_exit+0x210/0x340 [xt_RATEEST] [ 668.813518] Modules linked in: xt_RATEEST xt_tcpudp iptable_mangle bpfilter ip_tables x_tables [ 668.813518] CPU: 0 PID: 87 Comm: kworker/u4:2 Not tainted 4.19.0-rc7+ #21 [ 668.813518] Workqueue: netns cleanup_net [ 668.813518] RIP: 0010:xt_rateest_net_exit+0x210/0x340 [xt_RATEEST] [ 668.813518] Code: 00 48 8b 85 30 ff ff ff 4c 8b 23 80 38 00 0f 85 24 01 00 00 48 8b 85 30 ff ff ff 4d 85 e4 4c 89 a5 58 ff ff ff c6 00 f8 74 b2 <0f> 0b 48 83 c3 08 4c 39 f3 75 b0 48 b8 00 00 00 00 00 fc ff df 49 [ 668.813518] RSP: 0018:ffff8801156c73f8 EFLAGS: 00010282 [ 668.813518] RAX: ffffed0022ad8e85 RBX: ffff880118928e98 RCX: 5db8012a00000000 [ 668.813518] RDX: ffff8801156c7428 RSI: 00000000cb1d185f RDI: ffff880115663b74 [ 668.813518] RBP: ffff8801156c74d0 R08: ffff8801156633c0 R09: 1ffff100236440be [ 668.813518] R10: 0000000000000001 R11: ffffed002367d852 R12: ffff880115142b08 [ 668.813518] R13: 1ffff10022ad8e81 R14: ffff880118928ea8 R15: dffffc0000000000 [ 668.813518] FS: 0000000000000000(0000) GS:ffff88011b200000(0000) knlGS:0000000000000000 [ 668.813518] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 668.813518] CR2: 0000563aa69f4f28 CR3: 0000000105a16000 CR4: 00000000001006f0 [ 668.813518] Call Trace: [ 668.813518] ? unregister_netdevice_many+0xe0/0xe0 [ 668.813518] ? xt_rateest_net_init+0x2c0/0x2c0 [xt_RATEEST] [ 668.813518] ? default_device_exit+0x1ca/0x270 [ 668.813518] ? remove_proc_entry+0x1cd/0x390 [ 668.813518] ? dev_change_net_namespace+0xd00/0xd00 [ 668.813518] ? __init_waitqueue_head+0x130/0x130 [ 668.813518] ops_exit_list.isra.10+0x94/0x140 [ 668.813518] cleanup_net+0x45b/0x900 [ 668.813518] ? net_drop_ns+0x110/0x110 [ 668.813518] ? swapgs_restore_regs_and_return_to_usermode+0x3c/0x80 [ 668.813518] ? save_trace+0x300/0x300 [ 668.813518] ? lock_acquire+0x196/0x470 [ 668.813518] ? lock_acquire+0x196/0x470 [ 668.813518] ? process_one_work+0xb60/0x1de0 [ 668.813518] ? _raw_spin_unlock_irq+0x29/0x40 [ 668.813518] ? _raw_spin_unlock_irq+0x29/0x40 [ 668.813518] ? __lock_acquire+0x4500/0x4500 [ 668.813518] ? __lock_is_held+0xb4/0x140 [ 668.813518] process_one_work+0xc13/0x1de0 [ 668.813518] ? pwq_dec_nr_in_flight+0x3c0/0x3c0 [ 668.813518] ? set_load_weight+0x270/0x270 [ ... ] Fixes: 3427b2ab63fa ("netfilter: make xt_rateest hash table per net") Signed-off-by: Taehee Yoo Signed-off-by: Pablo Neira Ayuso commit 622fecbccfe86a8052dea6b512d3821dcce29994 Author: Keerthy Date: Wed Nov 7 10:04:23 2018 +0530 opp: ti-opp-supply: Correct the supply in _get_optimal_vdd_voltage call _get_optimal_vdd_voltage call provides new_supply_vbb->u_volt as the reference voltage while it should be really new_supply_vdd->u_volt. Cc: 4.16+ # v4.16+ Fixes: 9a835fa6e47 ("PM / OPP: Add ti-opp-supply driver") Signed-off-by: Keerthy Acked-by: Dave Gerlach Signed-off-by: Viresh Kumar commit ba038546ff9e15d54d1134b5c5d2355648c00dec Author: Keerthy Date: Wed Nov 7 10:04:22 2018 +0530 opp: ti-opp-supply: Dynamically update u_volt_min The voltage range (min, max) provided in the device tree is from the data manual and is pretty big, catering to a wide range of devices. On a i2c read/write failure the regulator_set_voltage_triplet function falls back to set voltage between min and max. The min value from Device Tree can be lesser than the optimal value and in that case that can lead to a hang or crash. Hence set the u_volt_min dynamically to the optimal voltage value. Cc: 4.16+ # v4.16+ Fixes: 9a835fa6e47 ("PM / OPP: Add ti-opp-supply driver") Signed-off-by: Keerthy Acked-by: Dave Gerlach Signed-off-by: Viresh Kumar commit ef3a61406618291c46da168ff91acaa28d85944c Author: Olof Johansson Date: Tue Oct 30 23:47:09 2018 -0700 RISC-V: Silence some module warnings on 32-bit Fixes: arch/riscv/kernel/module.c: In function 'apply_r_riscv_32_rela': ./include/linux/kern_levels.h:5:18: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 3 has type 'Elf32_Addr' {aka 'unsigned int'} [-Wformat=] arch/riscv/kernel/module.c:23:27: note: format string is defined here arch/riscv/kernel/module.c: In function 'apply_r_riscv_pcrel_hi20_rela': ./include/linux/kern_levels.h:5:18: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 3 has type 'Elf32_Addr' {aka 'unsigned int'} [-Wformat=] arch/riscv/kernel/module.c:104:23: note: format string is defined here arch/riscv/kernel/module.c: In function 'apply_r_riscv_hi20_rela': ./include/linux/kern_levels.h:5:18: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 3 has type 'Elf32_Addr' {aka 'unsigned int'} [-Wformat=] arch/riscv/kernel/module.c:146:23: note: format string is defined here arch/riscv/kernel/module.c: In function 'apply_r_riscv_got_hi20_rela': ./include/linux/kern_levels.h:5:18: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 3 has type 'Elf32_Addr' {aka 'unsigned int'} [-Wformat=] arch/riscv/kernel/module.c:190:60: note: format string is defined here arch/riscv/kernel/module.c: In function 'apply_r_riscv_call_plt_rela': ./include/linux/kern_levels.h:5:18: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 3 has type 'Elf32_Addr' {aka 'unsigned int'} [-Wformat=] arch/riscv/kernel/module.c:214:24: note: format string is defined here arch/riscv/kernel/module.c: In function 'apply_r_riscv_call_rela': ./include/linux/kern_levels.h:5:18: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 3 has type 'Elf32_Addr' {aka 'unsigned int'} [-Wformat=] arch/riscv/kernel/module.c:236:23: note: format string is defined here Signed-off-by: Olof Johansson Signed-off-by: Palmer Dabbelt commit 85d90b91807bb0c4a0fcff6a144e73f11cda782a Author: Olof Johansson Date: Tue Oct 30 23:47:07 2018 -0700 RISC-V: lib: Fix build error for 64-bit Fixes the following build error from tinyconfig: riscv64-unknown-linux-gnu-ld: kernel/sched/fair.o: in function `.L8': fair.c:(.text+0x70): undefined reference to `__lshrti3' riscv64-unknown-linux-gnu-ld: kernel/time/clocksource.o: in function `.L0 ': clocksource.c:(.text+0x334): undefined reference to `__lshrti3' Fixes: 7f47c73b355f ("RISC-V: Build tishift only on 64-bit") Signed-off-by: Olof Johansson Signed-off-by: Palmer Dabbelt commit f157d411a9eb170d2ee6b766da7a381962017cc9 Author: David Abdurachmanov Date: Mon Nov 5 15:35:37 2018 +0100 riscv: add missing vdso_install target Building kernel 4.20 for Fedora as RPM fails, because riscv is missing vdso_install target in arch/riscv/Makefile. Signed-off-by: David Abdurachmanov Signed-off-by: Palmer Dabbelt commit 10febb3ecace4b557eaa0d52c9d2c3531c1a715a Author: David Abdurachmanov Date: Mon Nov 5 15:40:04 2018 +0100 riscv: fix spacing in struct pt_regs Replace 8 spaces with tab to match styling. Signed-off-by: David Abdurachmanov Signed-off-by: Palmer Dabbelt commit 4ab49461d9d9b8274cc72d8656fe685ed394b8f7 Author: Anup Patel Date: Thu Nov 1 10:40:33 2018 +0530 RISC-V: defconfig: Enable printk timestamps The printk timestamps are very useful information to visually see where kernel is spending time during boot. It also helps us see the timing of hotplug events at runtime. This patch enables printk timestamps in RISC-V defconfig so that we have it enabled by default (similar to other architectures such as x86_64, arm64, etc). Signed-off-by: Anup Patel Acked-by: Olof Johansson Signed-off-by: Palmer Dabbelt commit f8397d69daef06d358430d3054662fb597e37c00 Author: Nikolay Borisov Date: Tue Nov 6 16:40:20 2018 +0200 btrfs: Always try all copies when reading extent buffers When a metadata read is served the endio routine btree_readpage_end_io_hook is called which eventually runs the tree-checker. If tree-checker fails to validate the read eb then it sets EXTENT_BUFFER_CORRUPT flag. This leads to btree_read_extent_buffer_pages wrongly assuming that all available copies of this extent buffer are wrong and failing prematurely. Fix this modify btree_read_extent_buffer_pages to read all copies of the data. This failure was exhibitted in xfstests btrfs/124 which would spuriously fail its balance operations. The reason was that when balance was run following re-introduction of the missing raid1 disk __btrfs_map_block would map the read request to stripe 0, which corresponded to devid 2 (the disk which is being removed in the test): item 2 key (FIRST_CHUNK_TREE CHUNK_ITEM 3553624064) itemoff 15975 itemsize 112 length 1073741824 owner 2 stripe_len 65536 type DATA|RAID1 io_align 65536 io_width 65536 sector_size 4096 num_stripes 2 sub_stripes 1 stripe 0 devid 2 offset 2156920832 dev_uuid 8466c350-ed0c-4c3b-b17d-6379b445d5c8 stripe 1 devid 1 offset 3553624064 dev_uuid 1265d8db-5596-477e-af03-df08eb38d2ca This caused read requests for a checksum item that to be routed to the stale disk which triggered the aforementioned logic involving EXTENT_BUFFER_CORRUPT flag. This then triggered cascading failures of the balance operation. Fixes: a826d6dcb32d ("Btrfs: check items for correctness as we search") CC: stable@vger.kernel.org # 4.4+ Suggested-by: Qu Wenruo Reviewed-by: Qu Wenruo Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba commit e3d5e573a54dabdc0f9f3cb039d799323372b251 Author: Trond Myklebust Date: Mon Nov 12 16:06:51 2018 -0500 SUNRPC: Fix a bogus get/put in generic_key_to_expire() Signed-off-by: Trond Myklebust commit a652a4bc21695a57c3b8d13d222a6f8b41f100aa Author: Trond Myklebust Date: Mon Nov 12 15:30:52 2018 -0500 SUNRPC: Fix a Oops when destroying the RPCSEC_GSS credential cache Commit 07d02a67b7fa causes a use-after free in the RPCSEC_GSS credential destroy code, because the call to get_rpccred() in gss_destroying_context() will now always fail to increment the refcount. While we could just replace the get_rpccred() with a refcount_set(), that would have the unfortunate consequence of resurrecting a credential in the credential cache for which we are in the process of destroying the RPCSEC_GSS context. Rather than do this, we choose to make a copy that is never added to the cache and use that to destroy the context. Fixes: 07d02a67b7fa ("SUNRPC: Simplify lookup code") Signed-off-by: Trond Myklebust commit a1aa09be21fa344d1f5585aab8164bfae55f57e3 Author: Trond Myklebust Date: Mon Nov 5 12:17:01 2018 -0500 NFSv4: Ensure that the state manager exits the loop on SIGKILL Signed-off-by: Trond Myklebust commit 21a446cf186570168b7281b154b1993968598aca Author: Trond Myklebust Date: Mon Nov 5 11:10:50 2018 -0500 NFSv4: Don't exit the state manager without clearing NFS4CLNT_MANAGER_RUNNING If we exit the NFSv4 state manager due to a umount, then we can end up leaving the NFS4CLNT_MANAGER_RUNNING flag set. If another mount causes the nfs4_client to be rereferenced before it is destroyed, then we end up never being able to recover state. Fixes: 47c2199b6eb5 ("NFSv4.1: Ensure state manager thread dies on last ...") Signed-off-by: Trond Myklebust Cc: stable@vger.kernel.org # v4.15+ commit 5581c670fb7ec267fc79215c6d5176b07e5f6dad Author: shaoyunl Date: Mon Nov 12 11:19:24 2018 -0500 drm/amdgpu: set system aperture to cover whole FB region In XGMI configuration, the FB region covers vram region from peer device, adjust system aperture to cover all of them Reviewed-by: Alex Deucher Reviewed-by: Christian König Signed-off-by: shaoyunl Signed-off-by: Alex Deucher commit e94b9f12fa2ceb4d5067aa2a7580b02850fb272e Author: Colin Ian King Date: Mon Nov 12 11:41:04 2018 -0800 Input: atkbd - clean up indentation issue Trivial fix to clean up indentation issues, add missing tab Signed-off-by: Colin Ian King Signed-off-by: Dmitry Torokhov commit 4aeba6418a160d8e58501cd57800252ba349ad1a Author: Kuninori Morimoto Date: Mon Nov 12 11:30:06 2018 -0800 Input: st1232 - 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: Dmitry Torokhov commit dda2af7418db9dd51913cb71d9ec9266d4f7924d Author: Kuninori Morimoto Date: Mon Nov 12 11:29:27 2018 -0800 Input: migor_ts - 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: Dmitry Torokhov commit 6c4b88288abf908d6fe9fc71fdfeb69cb4135193 Author: Ding Tao Date: Mon Nov 12 11:27:11 2018 -0800 Input: dt-bindings - fix a typo in file input-reset.txt Replace sysrq-reset-seq with keyset. Signed-off-by: Ding Tao Signed-off-by: Dmitry Torokhov commit ac5722c1643a2fb75224c79b578214956d34f989 Author: Brian Norris Date: Mon Nov 12 11:23:39 2018 -0800 Input: cros_ec_keyb - fix button/switch capability reports The cros_ec_keyb_bs array lists buttons and switches together, expecting that its users will match the appropriate type and bit fields. But cros_ec_keyb_register_bs() only checks the 'bit' field, which causes misreported input capabilities in some cases. For example, tablets (e.g., Scarlet -- a.k.a. Acer Chromebook Tab 10) were reporting a SW_LID capability, because EC_MKBP_POWER_BUTTON and EC_MKBP_LID_OPEN happen to share the same bit. (This has comedic effect on a tablet, in which a power-management daemon then thinks this "lid" is closed, and so puts the system to sleep as soon as it boots!) To fix this, check both the 'ev_type' and 'bit' fields before reporting the capability. Tested with a lid (Kevin / Samsung Chromebook Plus) and without a lid (Scarlet / Acer Chromebook Tab 10). This error got introduced when porting the feature from the downstream Chromium OS kernel to be upstreamed. Fixes: cdd7950e7aa4 ("input: cros_ec_keyb: Add non-matrix buttons and switches") Cc: Signed-off-by: Brian Norris Reviewed-by: Heiko Stuebner Signed-off-by: Dmitry Torokhov commit 3ed64da3b790be7c63601e8ca6341b7dff74a660 Author: Patrick Gaskin Date: Mon Nov 12 11:12:24 2018 -0800 Input: elan_i2c - add ELAN0620 to the ACPI table Add ELAN0620 to the ACPI table to support the elan touchpad in the Lenovo IdeaPad 130-15IKB. Signed-off-by: Patrick Gaskin Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov commit d55bda1b3e7c5a87f10da54fdda866a9a9cef30b Author: Christian Hoff Date: Mon Nov 12 11:11:29 2018 -0800 Input: matrix_keypad - check for errors from of_get_named_gpio() "of_get_named_gpio()" returns a negative error value if it fails and drivers should check for this. This missing check was now added to the matrix_keypad driver. In my case "of_get_named_gpio()" returned -EPROBE_DEFER because the referenced GPIOs belong to an I/O expander, which was not yet probed at the point in time when the matrix_keypad driver was loading. Because the driver did not check for errors from the "of_get_named_gpio()" routine, it was assuming that "-EPROBE_DEFER" is actually a GPIO number and continued as usual, which led to further errors like this later on: WARNING: CPU: 3 PID: 167 at drivers/gpio/gpiolib.c:114 gpio_to_desc+0xc8/0xd0 invalid GPIO -517 Note that the "GPIO number" -517 in the error message above is actually "-EPROBE_DEFER". As part of the patch a misleading error message "no platform data defined" was also removed. This does not lead to information loss because the other error paths in matrix_keypad_parse_dt() already print an error. Signed-off-by: Christian Hoff Suggested-by: Sebastian Reichel Reviewed-by: Sebastian Reichel Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov commit 410b5c7b48368317af95f0113692561d01d8144e Author: Diego Viola Date: Mon Nov 12 17:22:52 2018 -0200 libata: blacklist SAMSUNG MZ7TD256HAFV-000L9 SSD med_power_with_dipm still causes freezes after updating the firmware to the latest version (DXT04L5Q). Set model_rev to NULL and blacklist the device. Cc: stable@vger.kernel.org Signed-off-by: Diego Viola Reviewed-by: Hans de Goede Signed-off-by: Jens Axboe commit 25517ed4e99b3be4244dfd61d1e5c753b09faf2c Author: Huacai Chen Date: Sat Nov 10 11:50:14 2018 +0800 MIPS: Let early memblock_alloc*() allocate memories bottom-up After switched to NO_BOOTMEM, there are several boot failures. Some of them have been fixed and some of them haven't. I find that many of them are because of memory allocations are top-down, while the old behavior is bottom-up. This patch let early memblock_alloc*() allocate memories bottom-up to avoid some potential problems. Signed-off-by: Huacai Chen Signed-off-by: Paul Burton Fixes: bcec54bf3118 ("mips: switch to NO_BOOTMEM") Patchwork: https://patchwork.linux-mips.org/patch/21069/ References: https://patchwork.linux-mips.org/patch/21031/ Cc: Ralf Baechle Cc: James Hogan Cc: Steven J . Hill Cc: linux-mips@linux-mips.org Cc: Fuxin Zhang Cc: Zhangjin Wu commit 82fba2df7f7c019627f24c5036dc99f41731d770 Author: Aaro Koskinen Date: Sun Nov 11 00:06:12 2018 +0200 MIPS: OCTEON: cavium_octeon_defconfig: re-enable OCTEON USB driver Re-enable OCTEON USB driver which is needed on older hardware (e.g. EdgeRouter Lite) for mass storage etc. This got accidentally deleted when config options were changed for OCTEON2/3 USB. Signed-off-by: Aaro Koskinen Signed-off-by: Paul Burton Fixes: f922bc0ad08b ("MIPS: Octeon: cavium_octeon_defconfig: Enable more drivers") Patchwork: https://patchwork.linux-mips.org/patch/21077/ Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Cc: stable@vger.kernel.org # 4.14+ commit 121e38e5acdc8e1e4cdb750fcdcc72f94e420968 Author: Eugeniy Paltsev Date: Wed Nov 7 15:12:49 2018 +0300 ARC: mm: fix uninitialised signal code in do_page_fault Commit 15773ae938d8 ("signal/arc: Use force_sig_fault where appropriate") introduced undefined behaviour by leaving si_code unitiailized and leaking random kernel values to user space. Fixes: 15773ae938d8 ("signal/arc: Use force_sig_fault where appropriate") Signed-off-by: Eugeniy Paltsev Signed-off-by: Vineet Gupta commit 4592f11e47a2b28562d6cfe165d5ea7495ff4dca Author: Eugeniy Paltsev Date: Tue Oct 23 15:09:19 2018 +0300 ARC: [plat-hsdk] Enable DW APB GPIO support Enable GPIO support on HSDK. HSDK SoC includes Synopsys DesignWare DW_apb_gpio IP with 24 GPIOs mapped onto port A. Signed-off-by: Eugeniy Paltsev Acked-by: Alexey Brodkin Signed-off-by: Vineet Gupta commit afba5d157fe1f2e64bc3df46fe83841657ec8fdd Author: Vineet Gupta Date: Mon Oct 29 09:44:18 2018 -0700 ARCv2: boot log unaligned access in use ARC gcc 8.x generates unaligned accesses by default, so call that out Signed-off-by: Vineet Gupta commit 3624379d90ad2b65f9dbb30d7f7ce5498d2fe322 Author: Eugeniy Paltsev Date: Thu Oct 4 16:12:12 2018 +0300 ARC: IOC: panic if kernel was started with previously enabled IOC If IOC was already enabled (due to bootloader) it technically needs to be reconfigured with aperture base,size corresponding to Linux memory map which will certainly be different than uboot's. But disabling and reenabling IOC when DMA might be potentially active is tricky business. To avoid random memory issues later, just panic here and ask user to upgrade bootloader to one which doesn't enable IOC This was actually seen as issue on some of the HSDK board with a version of uboot which enabled IOC. There were random issues later with starting of X or peripherals etc. Also while I'm at it, replace hardcoded bits in ARC_REG_IO_COH_PARTIAL and ARC_REG_IO_COH_ENABLE registers by definitions. Inspired by: https://lkml.org/lkml/2018/1/19/557 Signed-off-by: Eugeniy Paltsev Signed-off-by: Vineet Gupta commit 2c519f583e84eb578d4db48e38160f58aafad2ac Author: Bartlomiej Zolnierkiewicz Date: Wed Oct 10 16:46:17 2018 +0200 ARC: 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: Vineet Gupta commit a619b72a36707c9d43a949e5fe63e1c6db238d43 Merge: 2e904398119d 8588eac3ff66 Author: Olof Johansson Date: Mon Nov 12 10:23:47 2018 -0800 Merge tag 'am654-fixes-for-v4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/kristo/linux into fixes Texas Instruments AM65x fixes for v4.20 - Fix the wkup uart instance addresses to use proper cell sizes, otherwise the uart fails to probe. * tag 'am654-fixes-for-v4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/kristo/linux: arm64: dts: ti: k3-am654: Fix wakeup_uart reg address Signed-off-by: Olof Johansson commit 2e904398119d64a58ac26cb9a3f2c178a132368f Merge: a89f84a56ec9 9134586715e3 Author: Olof Johansson Date: Mon Nov 12 10:14:45 2018 -0800 Merge tag 'qcom-fixes-for-4.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux into fixes Qualcomm ARM64 DT Fixes for 4.20-rc1 * Fix reserved gpio ranges for SDM845 and MSM8998 * tag 'qcom-fixes-for-4.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux: arm64: dts: qcom: msm8998: Reserve gpio ranges on MTP arm64: dts: sdm845-mtp: Reserve reserved gpios Signed-off-by: Olof Johansson commit ca474b73896bf6e0c1eb8787eb217b0f80221610 Author: Hannes Reinecke Date: Mon Nov 12 10:35:25 2018 -0700 block: copy ioprio in __bio_clone_fast() and bounce We need to copy the io priority, too; otherwise the clone will run with a different priority than the original one. Fixes: 43b62ce3ff0a ("block: move bio io prio to a new field") Signed-off-by: Hannes Reinecke Signed-off-by: Jean Delvare Fixed up subject, and ordered stores. Signed-off-by: Jens Axboe commit 77e461d14ed141253573eeeb4d34eccc51e38328 Author: Sudarsana Reddy Kalluru Date: Sun Nov 11 18:27:34 2018 -0800 bnx2x: Assign unique DMAE channel number for FW DMAE transactions. Driver assigns DMAE channel 0 for FW as part of START_RAMROD command. FW uses this channel for DMAE operations (e.g., TIME_SYNC implementation). Driver also uses the same channel 0 for DMAE operations for some of the PFs (e.g., PF0 on Port0). This could lead to concurrent access to the DMAE channel by FW and driver which is not legal. Hence need to assign unique DMAE id for FW. Currently following DMAE channels are used by the clients, MFW - OCBB/OCSD functionality uses DMAE channel 14/15 Driver 0-3 and 8-11 (for PF dmae operations) 4 and 12 (for stats requests) Assigning unique dmae_id '13' to the FW. Changes from previous version: ------------------------------ v2: Incorporated the review comments. Signed-off-by: Sudarsana Reddy Kalluru Signed-off-by: Michal Kalderon Signed-off-by: David S. Miller commit fb50c09e923870a358d68b0d58891bd145b8d7c7 Author: Jiri Olsa Date: Mon Nov 12 14:00:12 2018 +0100 perf tools: Fix crash on synthesizing the unit Adam reported a record command crash for simple session like: $ perf record -e cpu-clock ls with following backtrace: Program received signal SIGSEGV, Segmentation fault. 3543 ev = event_update_event__new(size + 1, PERF_EVENT_UPDATE__UNIT, evsel->id[0]); (gdb) bt #0 perf_event__synthesize_event_update_unit #1 0x000000000051e469 in perf_event__synthesize_extra_attr #2 0x00000000004445cb in record__synthesize #3 0x0000000000444bc5 in __cmd_record ... We synthesize an update event that needs to touch the evsel id array, which is not defined at that time. Fix this by forcing the id allocation for events with their unit defined. Reflecting possible read_format ID bit in the attr tests. Reported-by: Yongxin Liu Signed-off-by: Jiri Olsa Cc: Adam Lee Cc: Alexander Shishkin Cc: Namhyung Kim Cc: Peter Zijlstra Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=201477 Fixes: bfd8f72c2778 ("perf record: Synthesize unit/scale/... in event update") Link: http://lkml.kernel.org/r/20181112130012.5424-1-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 18e962ac0781bcb70d433de3b2a325ff792b4288 Author: Omar Sandoval Date: Mon Nov 12 00:08:46 2018 -0800 kyber: fix wrong strlcpy() size in trace_kyber_latency() When copying to the latency type, we should be passing LATENCY_TYPE_LEN, not DOMAIN_LEN (this isn't a problem in practice because we only pass "total" or "I/O"). Fix it by changing all of the strlcpy() calls to use sizeof(). Fixes: 6c3b7af1c975 ("kyber: add tracepoints") Reported-by: Jordan Glover Tested-by: Jordan Glover Signed-off-by: Omar Sandoval Signed-off-by: Jens Axboe commit 447750f281abef547be44fdcfe3bc4447b3115a8 Author: Florian Westphal Date: Sun Nov 4 12:07:14 2018 +0100 netfilter: nf_tables: don't use position attribute on rule replacement Its possible to set both HANDLE and POSITION when replacing a rule. In this case, the rule at POSITION gets replaced using the userspace-provided handle. Rule handles are supposed to be generated by the kernel only. Duplicate handles should be harmless, however better disable this "feature" by only checking for the POSITION attribute on insert operations. Fixes: 5e94846686d0 ("netfilter: nf_tables: add insert operation") Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 25d8bcedbf4329895dbaf9dd67baa6f18dad918c Author: Florian Westphal Date: Wed Oct 31 18:26:21 2018 +0100 selftests: add script to stress-test nft packet path vs. control plane Start flood ping for each cpu while loading/flushing rulesets to make sure we do not access already-free'd rules from nf_tables evaluation loop. Also add this to TARGETS so 'make run_tests' in selftest dir runs it automatically. This would have caught the bug fixed in previous change ("netfilter: nf_tables: do not skip inactive chains during generation update") sooner. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 0fb39bbe43d4481fcf300d2b5822de60942fd189 Author: Florian Westphal Date: Wed Oct 31 18:26:20 2018 +0100 netfilter: nf_tables: don't skip inactive chains during update There is no synchronization between packet path and the configuration plane. The packet path uses two arrays with rules, one contains the current (active) generation. The other either contains the last (obsolete) generation or the future one. Consider: cpu1 cpu2 nft_do_chain(c); delete c net->gen++; genbit = !!net->gen; rules = c->rg[genbit]; cpu1 ignores c when updating if c is not active anymore in the new generation. On cpu2, we now use rules from wrong generation, as c->rg[old] contains the rules matching 'c' whereas c->rg[new] was not updated and can even point to rules that have been free'd already, causing a crash. To fix this, make sure that 'current' to the 'next' generation are identical for chains that are going away so that c->rg[new] will just use the matching rules even if genbit was incremented already. Fixes: 0cbc06b3faba7 ("netfilter: nf_tables: remove synchronize_rcu in commit phase") Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 44a7276b30c3c15f2b7790a5729640597fb6a1df Author: Ville Syrjälä Date: Mon Nov 12 15:36:16 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 (cherry picked from commit 5a3aeca97af1b6b3498d59a7fd4e8bb95814c108) Signed-off-by: Joonas Lahtinen commit 0a823e8fd4fd67726697854578f3584ee3a49b1d 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 (cherry picked from commit 987abd5c62f92ee4970b45aa077f47949974e615) Signed-off-by: Joonas Lahtinen commit c4f224076d00ccf30c7bd3561cceaed82628c8ce 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 (cherry picked from commit a33e1ece777996ddddb1f23a30f8c66422ed0b68) Signed-off-by: Joonas Lahtinen commit 541ff7e96c13cd5d67f6021d233f8e1c3df49278 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 (cherry picked from commit fee61deecb1d850bf34f682a6a452e5ee51b7572) Signed-off-by: Joonas Lahtinen commit 7c4512300cfa5a4dcc8c1c52ae61e3fa4bd11a39 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 (cherry picked from commit 66a5ab1034be801630816d1fa6cfc30db1a2f0b0) Signed-off-by: Joonas Lahtinen commit fb5bbae9b1333d44023713946fdd28db0cd85751 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 (cherry picked from commit 55f99bf2a9c331838c981694bc872cd1ec4070b2) Signed-off-by: Joonas Lahtinen commit 3c5cdb17c3be76714dfd0d03e384f70579545614 Author: Taehee Yoo Date: Mon Nov 5 03:44:39 2018 +0900 netfilter: nf_conncount: fix unexpected permanent node of list. When list->count is 0, the list is deleted by GC. But list->count is never reached 0 because initial count value is 1 and it is increased when node is inserted. So that initial value of list->count should be 0. Originally GC always finds zero count list through deleting node and decreasing count. However, list may be left empty since node insertion may fail eg. allocaton problem. In order to solve this problem, GC routine also finds zero count list without deleting node. Fixes: cb2b36f5a97d ("netfilter: nf_conncount: Switch to plain list") Signed-off-by: Taehee Yoo Signed-off-by: Pablo Neira Ayuso commit 31568ec09ea02a050249921698c9729419539cce Author: Taehee Yoo Date: Mon Nov 5 03:44:11 2018 +0900 netfilter: nf_conncount: fix list_del corruption in conn_free nf_conncount_tuple is an element of nft_connlimit and that is deleted by conn_free(). Elements can be deleted by both GC routine and data path functions (nf_conncount_lookup, nf_conncount_add) and they call conn_free() to free elements. But conn_free() only protects lists, not each element. So that list_del corruption could occurred. The conn_free() doesn't check whether element is already deleted. In order to protect elements, dead flag is added. If an element is deleted, dead flag is set. The only conn_free() can delete elements so that both list lock and dead flag are enough to protect it. test commands: %nft add table ip filter %nft add chain ip filter input { type filter hook input priority 0\; } %nft add rule filter input meter test { ip id ct count over 2 } counter splat looks like: [ 1779.495778] list_del corruption, ffff8800b6e12008->prev is LIST_POISON2 (dead000000000200) [ 1779.505453] ------------[ cut here ]------------ [ 1779.506260] kernel BUG at lib/list_debug.c:50! [ 1779.515831] invalid opcode: 0000 [#1] SMP DEBUG_PAGEALLOC KASAN PTI [ 1779.516772] CPU: 0 PID: 33 Comm: kworker/0:2 Not tainted 4.19.0-rc6+ #22 [ 1779.516772] Workqueue: events_power_efficient nft_rhash_gc [nf_tables_set] [ 1779.516772] RIP: 0010:__list_del_entry_valid+0xd8/0x150 [ 1779.516772] Code: 39 48 83 c4 08 b8 01 00 00 00 5b 5d c3 48 89 ea 48 c7 c7 00 c3 5b 98 e8 0f dc 40 ff 0f 0b 48 c7 c7 60 c3 5b 98 e8 01 dc 40 ff <0f> 0b 48 c7 c7 c0 c3 5b 98 e8 f3 db 40 ff 0f 0b 48 c7 c7 20 c4 5b [ 1779.516772] RSP: 0018:ffff880119127420 EFLAGS: 00010286 [ 1779.516772] RAX: 000000000000004e RBX: dead000000000200 RCX: 0000000000000000 [ 1779.516772] RDX: 000000000000004e RSI: 0000000000000008 RDI: ffffed0023224e7a [ 1779.516772] RBP: ffff88011934bc10 R08: ffffed002367cea9 R09: ffffed002367cea9 [ 1779.516772] R10: 0000000000000001 R11: ffffed002367cea8 R12: ffff8800b6e12008 [ 1779.516772] R13: ffff8800b6e12010 R14: ffff88011934bc20 R15: ffff8800b6e12008 [ 1779.516772] FS: 0000000000000000(0000) GS:ffff88011b200000(0000) knlGS:0000000000000000 [ 1779.516772] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 1779.516772] CR2: 00007fc876534010 CR3: 000000010da16000 CR4: 00000000001006f0 [ 1779.516772] Call Trace: [ 1779.516772] conn_free+0x9f/0x2b0 [nf_conncount] [ 1779.516772] ? nf_ct_tmpl_alloc+0x2a0/0x2a0 [nf_conntrack] [ 1779.516772] ? nf_conncount_add+0x520/0x520 [nf_conncount] [ 1779.516772] ? do_raw_spin_trylock+0x1a0/0x1a0 [ 1779.516772] ? do_raw_spin_trylock+0x10/0x1a0 [ 1779.516772] find_or_evict+0xe5/0x150 [nf_conncount] [ 1779.516772] nf_conncount_gc_list+0x162/0x360 [nf_conncount] [ 1779.516772] ? nf_conncount_lookup+0xee0/0xee0 [nf_conncount] [ 1779.516772] ? _raw_spin_unlock_irqrestore+0x45/0x50 [ 1779.516772] ? trace_hardirqs_off+0x6b/0x220 [ 1779.516772] ? trace_hardirqs_on_caller+0x220/0x220 [ 1779.516772] nft_rhash_gc+0x16b/0x540 [nf_tables_set] [ ... ] Fixes: 5c789e131cbb ("netfilter: nf_conncount: Add list lock and gc worker, and RCU for init tree search") Signed-off-by: Taehee Yoo Signed-off-by: Pablo Neira Ayuso commit fd3e71a9f71e232181a225301a75936373636ccc Author: Taehee Yoo Date: Mon Nov 5 03:43:19 2018 +0900 netfilter: nf_conncount: use spin_lock_bh instead of spin_lock conn_free() holds lock with spin_lock() and it is called by both nf_conncount_lookup() and nf_conncount_gc_list(). nf_conncount_lookup() is called from bottom-half context and nf_conncount_gc_list() from process context. So that spin_lock() call is not safe. Hence conn_free() should use spin_lock_bh() instead of spin_lock(). test commands: %nft add table ip filter %nft add chain ip filter input { type filter hook input priority 0\; } %nft add rule filter input meter test { ip saddr ct count over 2 } \ counter splat looks like: [ 461.996507] ================================ [ 461.998999] WARNING: inconsistent lock state [ 461.998999] 4.19.0-rc6+ #22 Not tainted [ 461.998999] -------------------------------- [ 461.998999] inconsistent {IN-SOFTIRQ-W} -> {SOFTIRQ-ON-W} usage. [ 461.998999] kworker/0:2/134 [HC0[0]:SC0[0]:HE1:SE1] takes: [ 461.998999] 00000000a71a559a (&(&list->list_lock)->rlock){+.?.}, at: conn_free+0x69/0x2b0 [nf_conncount] [ 461.998999] {IN-SOFTIRQ-W} state was registered at: [ 461.998999] _raw_spin_lock+0x30/0x70 [ 461.998999] nf_conncount_add+0x28a/0x520 [nf_conncount] [ 461.998999] nft_connlimit_eval+0x401/0x580 [nft_connlimit] [ 461.998999] nft_dynset_eval+0x32b/0x590 [nf_tables] [ 461.998999] nft_do_chain+0x497/0x1430 [nf_tables] [ 461.998999] nft_do_chain_ipv4+0x255/0x330 [nf_tables] [ 461.998999] nf_hook_slow+0xb1/0x160 [ ... ] [ 461.998999] other info that might help us debug this: [ 461.998999] Possible unsafe locking scenario: [ 461.998999] [ 461.998999] CPU0 [ 461.998999] ---- [ 461.998999] lock(&(&list->list_lock)->rlock); [ 461.998999] [ 461.998999] lock(&(&list->list_lock)->rlock); [ 461.998999] [ 461.998999] *** DEADLOCK *** [ 461.998999] [ ... ] Fixes: 5c789e131cbb ("netfilter: nf_conncount: Add list lock and gc worker, and RCU for init tree search") Signed-off-by: Taehee Yoo Signed-off-by: Pablo Neira Ayuso commit ab99be4683d9db33b100497d463274ebd23bd67e Author: Filippo Sironi Date: Mon Nov 12 12:26:30 2018 +0000 amd/iommu: Fix Guest Virtual APIC Log Tail Address Register This register should have been programmed with the physical address of the memory location containing the shadow tail pointer for the guest virtual APIC log instead of the base address. Fixes: 8bda0cfbdc1a ('iommu/amd: Detect and initialize guest vAPIC log') Signed-off-by: Filippo Sironi Signed-off-by: Wei Wang Signed-off-by: Suravee Suthikulpanit Signed-off-by: Joerg Roedel commit d99501b8575dc1248bacf1b58d2241cb4b265d49 Author: Takashi Iwai Date: Mon Nov 12 12:26:57 2018 +0100 ALSA: hda/ca0132 - Call pci_iounmap() instead of iounmap() We need to call pci_iounmap() instead of iounmap() for the regions obtained via pci_iomap() call for some archs that need special treatment. Fixes: aa31704fd81c ("ALSA: hda/ca0132: Add PCI region2 iomap for SBZ") Cc: Signed-off-by: Takashi Iwai commit 383fb3ee8024d596f488d2dbaf45e572897acbdb Author: Russell King Date: Thu Jul 19 12:21:31 2018 +0100 ARM: spectre-v2: per-CPU vtables to work around big.Little systems In big.Little systems, some CPUs require the Spectre workarounds in paths such as the context switch, but other CPUs do not. In order to handle these differences, we need per-CPU vtables. We are unable to use the kernel's per-CPU variables to support this as per-CPU is not initialised at times when we need access to the vtables, so we have to use an array indexed by logical CPU number. We use an array-of-pointers to avoid having function pointers in the kernel's read/write .data section. Reviewed-by: Julien Thierry Signed-off-by: Russell King commit 5df7a99bdd0de4a0480320264c44c04543c29d5a Author: Julien Thierry Date: Thu Nov 8 17:25:28 2018 +0100 ARM: 8810/1: vfp: Fix wrong assignement to ufp_exc In vfp_preserve_user_clear_hwstate, ufp_exc->fpinst2 gets assigned to itself. It should actually be hwstate->fpinst2 that gets assigned to the ufp_exc field. Fixes commit 3aa2df6ec2ca6bc143a65351cca4266d03a8bc41 ("ARM: 8791/1: vfp: use __copy_to_user() when saving VFP state"). Reported-by: David Binderman Signed-off-by: Julien Thierry Signed-off-by: Russell King commit e209950fdd065d2cc46e6338e47e52841b830cba Author: Russell King Date: Thu Jul 19 12:17:38 2018 +0100 ARM: add PROC_VTABLE and PROC_TABLE macros Allow the way we access members of the processor vtable to be changed at compile time. We will need to move to per-CPU vtables to fix the Spectre variant 2 issues on big.Little systems. However, we have a couple of calls that do not need the vtable treatment, and indeed cause a kernel warning due to the (later) use of smp_processor_id(), so also introduce the PROC_TABLE macro for these which always use CPU 0's function pointers. Reviewed-by: Julien Thierry Signed-off-by: Russell King commit 945aceb1db8885d3a35790cf2e810f681db52756 Author: Russell King Date: Thu Jul 19 12:43:03 2018 +0100 ARM: clean up per-processor check_bugs method call Call the per-processor type check_bugs() method in the same way as we do other per-processor functions - move the "processor." detail into proc-fns.h. Reviewed-by: Julien Thierry Signed-off-by: Russell King commit 65987a8553061515b5851b472081aedb9837a391 Author: Russell King Date: Thu Jul 19 11:59:56 2018 +0100 ARM: split out processor lookup Split out the lookup of the processor type and associated error handling from the rest of setup_processor() - we will need to use this in the secondary CPU bringup path for big.Little Spectre variant 2 mitigation. Reviewed-by: Julien Thierry Signed-off-by: Russell King commit 899a42f836678a595f7d2bc36a5a0c2b03d08cbc Author: Russell King Date: Thu Jul 19 11:42:36 2018 +0100 ARM: make lookup_processor_type() non-__init Move lookup_processor_type() out of the __init section so it is callable from (eg) the secondary startup code during hotplug. Reviewed-by: Julien Thierry Signed-off-by: Russell King commit 7243ec72b9024b1ae98ed571db559a7cf0c5a0f4 Author: Douglas Anderson Date: Fri Oct 12 14:36:32 2018 -0700 dt-bindings: phy-qcom-qmp: Fix several mistakes from prior commits Digging through the "phy-qcom-qmp" showed me many inconsistencies between the bindings and the reality of the driver. Let's fix them all. * In commit 2d66eab18375 ("dt-bindings: phy: qmp: Add support for QMP phy in IPQ8074") we probably should have explicitly listed that there are no clocks for this PHY and also added the reset names in alphabetical order. You can see that there are no clocks in the driver where "clk_list" is NULL. * In commit 8587b220f05e ("dt-bindings: phy-qcom-qmp: Update bindings for QMP V3 USB PHY") we probably should have listed the resets for this new PHY and also removed the "(Optional)" marking for the "cfg" reset since PHYs that need "cfg" really do need it. It's just that not all PHYs need it. * In commit 7f0802074120 ("dt-bindings: phy-qcom-qmp: Update bindings for sdm845") we forgot to update one instance of the string "qcom,qmp-v3-usb3-phy" to be "qcom,sdm845-qmp-usb3-phy". Let's fix that. We should also have added "qcom,sdm845-qmp-usb3-uni-phy" to the clock-names and reset-names lists. * In commit 99c7c7364b71 ("dt-bindings: phy-qcom-qmp: Add UFS phy compatible string for sdm845") we should have added the set of clocks and resets for "qcom,sdm845-qmp-ufs-phy". These were taken from the driver. * Cleanup the wording for what properties child nodes have to make it more obvious which types of PHYs need clocks and resets. This was sorta implicit in the "-names" description but I found myself confused. * As per the code not all "pcie qmp phys" have resets. Specifically note that the "has_lane_rst" property in the driver is false for "ipq8074-qmp-pcie-phy". Thus make it clear exactly which PHYs need child nodes with resets. Signed-off-by: Douglas Anderson Reviewed-by: Evan Green Reviewed-by: Rob Herring Signed-off-by: Kishon Vijay Abraham I commit f5fde094a7425ac062f22a94e8a711efa5074946 Author: Kunihiko Hayashi Date: Mon Oct 15 10:31:30 2018 +0900 phy: uniphier-pcie: Depend on HAS_IOMEM The driver uses devm_ioremap_resource() which is only available when CONFIG_HAS_IOMEM is set, so the driver depends on this option. Signed-off-by: Kunihiko Hayashi Signed-off-by: Kishon Vijay Abraham I commit cbed7545db7ae5907d7dc9d4002717d46cae29e9 Author: Tony Lindgren Date: Tue Nov 6 07:28:02 2018 -0800 drm/omap: dsi: Fix missing of_platform_depopulate() We're missing a call to of_platform_depopulate() on errors for dsi. Looks like dss is already doing this. Signed-off-by: Tony Lindgren Reviewed-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen Link: https://patchwork.freedesktop.org/patch/msgid/20181106152802.38599-1-tony@atomide.com commit 24ec84e854c68ceda59a26027114eb7f260f9411 Author: Laurent Pinchart Date: Sat Nov 10 13:16:54 2018 +0200 drm/omap: Move DISPC runtime PM handling to omapdrm The internal encoders (DSI, HDMI4, HDMI5 and VENC) runtime PM handlers attempt to manage the runtime PM state of the connected DISPC, based on the rationale that the DISPC providing data to the encoders requires ensuring that the display is active whenever the encoders are active. While the DISPC provides data to the encoders, it doesn't as such constitute a resource that encoders require in order to be taken out of suspend, contrary to for instance a functional clock or a power supply. Encoders registers can be accessed without the DISPC being active, and while the encoders will not output any video stream without being fed by the DISPC, the DISPC PM state doesn't influence the encoders PM state. For this reason the DISPC PM state is better managed from the omapdrm driver, in the CRTC enable and disable operations. This allows the encoders PM state to be handled separately from the DISPC, and in particular at times when the DISPC may not be available (for instance at probe due to the DSS probe being deferred, or at remove time du to the DISPC being already removed). Fixes: edb715dffdee ("drm/omap: dss: dsi: Move initialization code from bind to probe") Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen Link: https://patchwork.freedesktop.org/patch/msgid/20181110111654.4387-5-laurent.pinchart@ideasonboard.com commit 350c03e880038bf60184500bab9025d3361c0b0e Author: Laurent Pinchart Date: Sat Nov 10 13:16:53 2018 +0200 drm/omap: dsi: Ensure the device is active during probe The probe function performs hardware access to read the number of supported data lanes from a configuration register and thus requires the device to be active. Ensure this by surrounding the access with dsi_runtime_get() and dsi_runtime_put() calls. Fixes: edb715dffdee ("drm/omap: dss: dsi: Move initialization code from bind to probe") Signed-off-by: Laurent Pinchart Acked-by: Tony Lindgren Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen Link: https://patchwork.freedesktop.org/patch/msgid/20181110111654.4387-4-laurent.pinchart@ideasonboard.com commit f8523b64d2d2f94bb429c15166d7601d39243c4d Author: Laurent Pinchart Date: Sat Nov 10 13:16:52 2018 +0200 drm/omap: hdmi4: Ensure the device is active during bind The bind function performs hardware access (in hdmi4_cec_init()) and thus requires the device to be active. Ensure this by surrounding the bind function by hdmi_runtime_get() and hdmi_runtime_put() calls. Fixes: 27d624527d99 ("drm/omap: dss: Acquire next dssdev at probe time") Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen Link: https://patchwork.freedesktop.org/patch/msgid/20181110111654.4387-3-laurent.pinchart@ideasonboard.com commit e0c827aca0730b51f38081aa4e8ecf0912aab55f Author: Laurent Pinchart Date: Sat Nov 10 13:16:51 2018 +0200 drm/omap: Populate DSS children in omapdss driver The DSS DT node contains children that describe the DSS components (DISPC and internal encoders). Each of those components is handled by a platform driver, and thus needs to be backed by a platform device. The corresponding platform devices are created in mach-omap2 code by a call to of_platform_populate(). While this approach has worked so far, it doesn't model the hardware architecture very well, as it creates child devices before the parent is ready to handle them. This would be akin to creating I2C slaves before the I2C master is available. The task can be easily performed in the omapdss driver code instead, simplifying mach-omap2 code. We however can't remove the mach-omap2 code completely as the omap2fb driver still depends on it, but we can move it to the omap2fb-specific section, where it can stay until the omap2fb driver gets removed. This has the added benefit of not allowing DSS components to probe before the DSS itself, which led to runtime PM issues when the DSS probe is deferred. Fixes: 27d624527d99 ("drm/omap: dss: Acquire next dssdev at probe time") Signed-off-by: Laurent Pinchart Acked-by: Tony Lindgren Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen Link: https://patchwork.freedesktop.org/patch/msgid/20181110111654.4387-2-laurent.pinchart@ideasonboard.com commit d7d8bbb40a5b1f682ee6589e212934f4c6b8ad60 Author: Sven Eckelmann Date: Wed Nov 7 23:09:12 2018 +0100 batman-adv: Expand merged fragment buffer for full packet The complete size ("total_size") of the fragmented packet is stored in the fragment header and in the size of the fragment chain. When the fragments are ready for merge, the skbuff's tail of the first fragment is expanded to have enough room after the data pointer for at least total_size. This means that it gets expanded by total_size - first_skb->len. But this is ignoring the fact that after expanding the buffer, the fragment header is pulled by from this buffer. Assuming that the tailroom of the buffer was already 0, the buffer after the data pointer of the skbuff is now only total_size - len(fragment_header) large. When the merge function is then processing the remaining fragments, the code to copy the data over to the merged skbuff will cause an skb_over_panic when it tries to actually put enough data to fill the total_size bytes of the packet. The size of the skb_pull must therefore also be taken into account when the buffer's tailroom is expanded. Fixes: 610bfc6bc99b ("batman-adv: Receive fragmented packets and merge") Reported-by: Martin Weinelt Co-authored-by: Linus Lüssing Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich commit f4156f9656feac21f4de712fac94fae964c5d402 Author: Sven Eckelmann Date: Tue Oct 30 12:17:10 2018 +0100 batman-adv: Use explicit tvlv padding for ELP packets The announcement messages of batman-adv COMPAT_VERSION 15 have the possibility to announce additional information via a dynamic TVLV part. This part is optional for the ELP packets and currently not parsed by the Linux implementation. Still out-of-tree versions are using it to transport things like neighbor hashes to optimize the rebroadcast behavior. Since the ELP broadcast packets are smaller than the minimal ethernet packet, it often has to be padded. This is often done (as specified in RFC894) with octets of zero and thus work perfectly fine with the TVLV part (making it a zero length and thus empty). But not all ethernet compatible hardware seems to follow this advice. To avoid ambiguous situations when parsing the TVLV header, just force the 4 bytes (TVLV length + padding) after the required ELP header to zero. Fixes: d6f94d91f766 ("batman-adv: ELP - adding basic infrastructure") Reported-by: Linus Lüssing Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich commit 0fd791841a6d67af1155a9c3de54dea51220721e Author: Benson Leung Date: Thu Nov 8 15:59:21 2018 -0800 HID: input: Ignore battery reported by Symbol DS4308 The Motorola/Zebra Symbol DS4308-HD is a handheld USB barcode scanner which does not have a battery, but reports one anyway that always has capacity 2. Let's apply the IGNORE quirk to prevent it from being treated like a power supply so that userspaces don't get confused that this accessory is almost out of power and warn the user that they need to charge their wired barcode scanner. Reported here: https://bugs.chromium.org/p/chromium/issues/detail?id=804720 Signed-off-by: Benson Leung Reviewed-by: Benjamin Tissoires Signed-off-by: Benjamin Tissoires commit f3be657d96b0709c832b165501170f072882df3c Author: Hang Yuan Date: Tue Oct 30 13:12:23 2018 +0800 drm/i915/gvt: ensure gpu is powered before do i915_gem_gtt_insert i915_gem_gtt_insert may evict some vmas and access HW if ggtt vm space is not enough. So add mmio_hw_access_pre before invoke i915_gem_gtt_insert to avoid call trace like below in vgpu create/ destroy test. WARNING: CPU: 6 PID: 8720 at drivers/gpu/drm/i915/intel_drv.h:1768 assert_rpm_wakelock_held.part.2+0x27/0x30 [i915] RPM wakelock ref not held during HW access Call Trace: [] dump_stack+0x19/0x1b [] __warn+0xd8/0x100 [] warn_slowpath_fmt+0x5f/0x80 [] assert_rpm_wakelock_held.part.2+0x27/0x30 [i915] [] intel_runtime_pm_get_noresume+0x6f/0x80 [i915] [] i915_gem_request_alloc+0x2dd/0x3c0 [i915] [] i915_gem_switch_to_kernel_context+0xae/0x1d0 [i915] [] ggtt_flush+0x12/0x30 [i915] [] i915_gem_evict_something+0x25f/0x470 [i915] [] i915_gem_gtt_insert+0x15c/0x1c0 [i915] [] alloc_gm+0xa7/0x160 [i915] [] intel_vgpu_alloc_resource+0x1ad/0x410 [i915] [] intel_gvt_create_vgpu+0x16c/0x260 [i915] [] intel_vgpu_create+0x50/0x140 [kvmgt] [] mdev_device_create+0x1aa/0x2e0 [mdev] v2: use mmio_hw_access_pre/post Signed-off-by: Hang Yuan Signed-off-by: Zhenyu Wang commit def40774f63ad446aaf5c12e2185045979c06c75 Author: Xinyun Liu Date: Mon Oct 29 14:18:25 2018 +0800 drm/i915/gvt: not to touch undefined MOCS registers Some engines are not available for all Gens. eg, Gen11 introduced VCS3/VCS4/VECS2, and VCS2 is not supported on some Gen9 machines. So need to add check before access them. Signed-off-by: Xinyun Liu Signed-off-by: Yakui Zhao Signed-off-by: Zhenyu Wang commit 563785edfcef02b566e64fb5292c74c1600808aa Author: Takashi Iwai Date: Mon Nov 12 09:43:12 2018 +0100 ALSA: hda/realtek - Add quirk entry for HP Pavilion 15 HP Pavilion 15 (103c:820d) with ALC295 codec requires the quirk for the mute LED control over mic3 pin. Added the corresponding quirk entry. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=201653 Cc: Signed-off-by: Takashi Iwai commit 1e9c75fb9c47a75a9aec0cd17db5f6dc36b58e00 Author: Benjamin Coddington Date: Wed Oct 3 10:18:33 2018 -0400 mnt: fix __detach_mounts infinite loop Since commit ff17fa561a04 ("d_invalidate(): unhash immediately") immediately unhashes the dentry, we'll never return the mountpoint in lookup_mountpoint(), which can lead to an unbreakable loop in d_invalidate(). I have reports of NFS clients getting into this condition after the server removes an export of an existing mount created through follow_automount(), but I suspect there are various other ways to produce this problem if we hunt down users of d_invalidate(). For example, it is possible to get into this state by using XFS' d_invalidate() call in xfs_vn_unlink(): truncate -s 100m img{1,2} mkfs.xfs -q -n version=ci img1 mkfs.xfs -q -n version=ci img2 mkdir -p /mnt/xfs mount img1 /mnt/xfs mkdir /mnt/xfs/sub1 mount img2 /mnt/xfs/sub1 cat > /mnt/xfs/sub1/foo & umount -l /mnt/xfs/sub1 mount img2 /mnt/xfs/sub1 mount --make-private /mnt/xfs mkdir /mnt/xfs/sub2 mount --move /mnt/xfs/sub1 /mnt/xfs/sub2 rmdir /mnt/xfs/sub1 Fix this by moving the check for an unlinked dentry out of the detach_mounts() path. Fixes: ff17fa561a04 ("d_invalidate(): unhash immediately") Cc: stable@vger.kernel.org Reviewed-by: "Eric W. Biederman" Signed-off-by: Benjamin Coddington Signed-off-by: Eric W. Biederman commit 4d47d6407ac7b4b442a4e717488a3bb137398b6c Author: Kan Liang Date: Fri Oct 19 10:04:19 2018 -0700 perf/x86/intel/uncore: Support CoffeeLake 8th CBOX Coffee Lake has 8 core products which has 8 Cboxes. The 8th CBOX is mapped into different MSR space. Increase the num_boxes to 8 to handle the new products. It will not impact the previous platforms, SkyLake, KabyLake and earlier CoffeeLake. Because the num_boxes will be recalculated in uncore_cpu_init and doesn't exceed the x86_max_cores. Introduce a new box flag bit to indicate the 8th CBOX. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Link: http://lkml.kernel.org/r/20181019170419.378-2-kan.liang@linux.intel.com Signed-off-by: Ingo Molnar commit c10a8de0d32e95b0b8c7c17b6dc09baea5a5a899 Author: Kan Liang Date: Fri Oct 19 10:04:18 2018 -0700 perf/x86/intel/uncore: Add more IMC PCI IDs for KabyLake and CoffeeLake CPUs KabyLake and CoffeeLake CPUs have the same client uncore events as SkyLake. Add the PCI IDs for the KabyLake Y, U, S processor lines and CoffeeLake U, H, S processor lines. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Link: http://lkml.kernel.org/r/20181019170419.378-1-kan.liang@linux.intel.com Signed-off-by: Ingo Molnar commit c469933e772132aad040bd6a2adc8edf9ad6f825 Author: Patrick Bellasi Date: Mon Nov 5 14:53:58 2018 +0000 sched/fair: Fix cpu_util_wake() for 'execl' type workloads A ~10% regression has been reported for UnixBench's execl throughput test by Aaron Lu and Ye Xiaolong: https://lkml.org/lkml/2018/10/30/765 That test is pretty simple, it does a "recursive" execve() syscall on the same binary. Starting from the syscall, this sequence is possible: do_execve() do_execveat_common() __do_execve_file() sched_exec() select_task_rq_fair() <==| Task already enqueued find_idlest_cpu() find_idlest_group() capacity_spare_wake() <==| Functions not called from cpu_util_wake() | the wakeup path which means we can end up calling cpu_util_wake() not only from the "wakeup path", as its name would suggest. Indeed, the task doing an execve() syscall is already enqueued on the CPU we want to get the cpu_util_wake() for. The estimated utilization for a CPU computed in cpu_util_wake() was written under the assumption that function can be called only from the wakeup path. If instead the task is already enqueued, we end up with a utilization which does not remove the current task's contribution from the estimated utilization of the CPU. This will wrongly assume a reduced spare capacity on the current CPU and increase the chances to migrate the task on execve. The regression is tracked down to: commit d519329f72a6 ("sched/fair: Update util_est only on util_avg updates") because in that patch we turn on by default the UTIL_EST sched feature. However, the real issue is introduced by: commit f9be3e5961c5 ("sched/fair: Use util_est in LB and WU paths") Let's fix this by ensuring to always discount the task estimated utilization from the CPU's estimated utilization when the task is also the current one. The same benchmark of the bug report, executed on a dual socket 40 CPUs Intel(R) Xeon(R) CPU E5-2690 v2 @ 3.00GHz machine, reports these "Execl Throughput" figures (higher the better): mainline : 48136.5 lps mainline+fix : 55376.5 lps which correspond to a 15% speedup. Moreover, since {cpu_util,capacity_spare}_wake() are not really only used from the wakeup path, let's remove this ambiguity by using a better matching name: {cpu_util,capacity_spare}_without(). Since we are at that, let's also improve the existing documentation. Reported-by: Aaron Lu Reported-by: Ye Xiaolong Tested-by: Aaron Lu 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 Fixes: f9be3e5961c5 (sched/fair: Use util_est in LB and WU paths) Link: https://lore.kernel.org/lkml/20181025093100.GB13236@e110439-lin/ Signed-off-by: Ingo Molnar commit d19f9130b814d33c03118493c17454f7d90075d1 Author: Elvira Khabirova Date: Sat Nov 10 04:22:09 2018 +0100 x86/ptrace: Fix documentation for tracehook_report_syscall_entry() tracehook_report_syscall_entry() is called not only if %TIF_SYSCALL_TRACE is set, but also if %TIF_SYSCALL_EMU is set, as appears from x86's entry code. Signed-off-by: Elvira Khabirova Cc: Borislav Petkov Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: ldv@altlinux.org Cc: oleg@redhat.com Cc: rostedt@goodmis.org Link: http://lkml.kernel.org/r/20181110042209.26333972@akathisia Signed-off-by: Ingo Molnar commit 2c7645b0f7d1014f2636393de7906c6bfd25939f Author: Michael Ellerman Date: Mon Nov 12 13:46:06 2018 +1100 selftests/powerpc: Fix wild_bctr test to work on ppc64 The selftest I recently added to test branching to an out-of-bounds NIP doesn't work on 64-bit big endian. It does fail but not in the right way. That is it SEGVs trying to load from the opd at BAD_NIP, but it never gets as far as branching to BAD_NIP. To fix it we need to create an opd which is reachable but which holds the bad address. Fixes: b7683fc66eba ("selftests/powerpc: Add a test of wild bctr") Signed-off-by: Michael Ellerman commit 43c6494fa1499912c8177e71450c0279041152a6 Author: Michael Ellerman Date: Tue Nov 6 23:37:58 2018 +1100 powerpc/io: Fix the IO workarounds code to work with Radix Back in 2006 Ben added some workarounds for a misbehaviour in the Spider IO bridge used on early Cell machines, see commit 014da7ff47b5 ("[POWERPC] Cell "Spider" MMIO workarounds"). Later these were made to be generic, ie. not tied specifically to Spider. The code stashes a token in the high bits (59-48) of virtual addresses used for IO (eg. returned from ioremap()). This works fine when using the Hash MMU, but when we're using the Radix MMU the bits used for the token overlap with some of the bits of the virtual address. This is because the maximum virtual address is larger with Radix, up to c00fffffffffffff, and in fact we use that high part of the address range for ioremap(), see RADIX_KERN_IO_START. As it happens the bits that are used overlap with the bits that differentiate an IO address vs a linear map address. If the resulting address lies outside the linear mapping we will crash (see below), if not we just corrupt memory. virtio-pci 0000:00:00.0: Using 64-bit direct DMA at offset 800000000000000 Unable to handle kernel paging request for data at address 0xc000000080000014 ... CFAR: c000000000626b98 DAR: c000000080000014 DSISR: 42000000 IRQMASK: 0 GPR00: c0000000006c54fc c00000003e523378 c0000000016de600 0000000000000000 GPR04: c00c000080000014 0000000000000007 0fffffff000affff 0000000000000030 ^^^^ ... NIP [c000000000626c5c] .iowrite8+0xec/0x100 LR [c0000000006c992c] .vp_reset+0x2c/0x90 Call Trace: .pci_bus_read_config_dword+0xc4/0x120 (unreliable) .register_virtio_device+0x13c/0x1c0 .virtio_pci_probe+0x148/0x1f0 .local_pci_probe+0x68/0x140 .pci_device_probe+0x164/0x220 .really_probe+0x274/0x3b0 .driver_probe_device+0x80/0x170 .__driver_attach+0x14c/0x150 .bus_for_each_dev+0xb8/0x130 .driver_attach+0x34/0x50 .bus_add_driver+0x178/0x2f0 .driver_register+0x90/0x1a0 .__pci_register_driver+0x6c/0x90 .virtio_pci_driver_init+0x2c/0x40 .do_one_initcall+0x64/0x280 .kernel_init_freeable+0x36c/0x474 .kernel_init+0x24/0x160 .ret_from_kernel_thread+0x58/0x7c This hasn't been a problem because CONFIG_PPC_IO_WORKAROUNDS which enables this code is usually not enabled. It is only enabled when it's selected by PPC_CELL_NATIVE which is only selected by PPC_IBM_CELL_BLADE and that in turn depends on BIG_ENDIAN. So in order to hit the bug you need to build a big endian kernel, with IBM Cell Blade support enabled, as well as Radix MMU support, and then boot that on Power9 using Radix MMU. Still we can fix the bug, so let's do that. We simply use fewer bits for the token, taking the union of the restrictions on the address from both Hash and Radix, we end up with 8 bits we can use for the token. The only user of the token is iowa_mem_find_bus() which only supports 8 token values, so 8 bits is plenty for that. Fixes: 566ca99af026 ("powerpc/mm/radix: Add dummy radix_enabled()") Signed-off-by: Michael Ellerman commit c8b00bb742dd036388f37d019dbb9db177f3e66c Author: Michael Ellerman Date: Thu Nov 1 16:21:05 2018 +1100 powerpc/mm/64s: Fix preempt warning in slb_allocate_kernel() With preempt enabled we see warnings in do_slb_fault(): BUG: using smp_processor_id() in preemptible [00000000] code: kworker/u33:0/98 futex hash table entries: 4096 (order: 3, 524288 bytes) caller is do_slb_fault+0x204/0x230 CPU: 5 PID: 98 Comm: kworker/u33:0 Not tainted 4.19.0-rc3-gcc-7.3.1-00022-g1936f094e164 #138 Call Trace: dump_stack+0xb4/0x104 (unreliable) check_preemption_disabled+0x148/0x150 do_slb_fault+0x204/0x230 data_access_slb_common+0x138/0x180 This is caused by the get_paca() in slb_allocate_kernel(), which includes a call to debug_smp_processor_id(). slb_allocate_kernel() can only be called from do_slb_fault(), and in that path interrupts are hard disabled and so we can't be preempted, but we can't update the preempt flags (in thread_info) because that could cause an SLB fault. So just use local_paca which is safe and doesn't cause the warning. Fixes: 48e7b7695745 ("powerpc/64s/hash: Convert SLB miss handlers to C") Signed-off-by: Michael Ellerman commit ccda4af0f4b92f7b4c308d3acc262f4a7e3affad Author: Linus Torvalds Date: Sun Nov 11 17:12:31 2018 -0600 Linux 4.20-rc2 commit 7a3765ed66d187071bbf56a8212f5d2bc2d2e2cc Merge: e12e00e388de 7236ead1b149 Author: Linus Torvalds Date: Sun Nov 11 17:09:48 2018 -0600 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: "One last pull request before heading to Vancouver for LPC, here we have: 1) Don't forget to free VSI contexts during ice driver unload, from Victor Raj. 2) Don't forget napi delete calls during device remove in ice driver, from Dave Ertman. 3) Don't request VLAN tag insertion of ibmvnic device when SKB doesn't have VLAN tags at all. 4) IPV4 frag handling code has to accomodate the situation where two threads try to insert the same fragment into the hash table at the same time. From Eric Dumazet. 5) Relatedly, don't flow separate on protocol ports for fragmented frames, also from Eric Dumazet. 6) Memory leaks in qed driver, from Denis Bolotin. 7) Correct valid MTU range in smsc95xx driver, from Stefan Wahren. 8) Validate cls_flower nested policies properly, from Jakub Kicinski. 9) Clearing of stats counters in mc88e6xxx driver doesn't retain important bits in the G1_STATS_OP register causing the chip to hang. Fix from Andrew Lunn" * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (41 commits) act_mirred: clear skb->tstamp on redirect net: dsa: mv88e6xxx: Fix clearing of stats counters tipc: fix link re-establish failure net: sched: cls_flower: validate nested enc_opts_policy to avoid warning net: mvneta: correct typo flow_dissector: do not dissect l4 ports for fragments net: qualcomm: rmnet: Fix incorrect assignment of real_dev net: aquantia: allow rx checksum offload configuration net: aquantia: invalid checksumm offload implementation net: aquantia: fixed enable unicast on 32 macvlan net: aquantia: fix potential IOMMU fault after driver unbind net: aquantia: synchronized flow control between mac/phy net: smsc95xx: Fix MTU range net: stmmac: Fix RX packet size > 8191 qed: Fix potential memory corruption qed: Fix SPQ entries not returned to pool in error flows qed: Fix blocking/unlimited SPQ entries leak qed: Fix memory/entry leak in qed_init_sp_request() inet: frags: better deal with smp races net: hns3: bugfix for not checking return value ... commit e12e00e388dee1d2a86e9b90f79a69f9acd2c9b0 Merge: 63a42e1a5cb3 d5615e472d23 Author: Linus Torvalds Date: Sun Nov 11 16:57:55 2018 -0600 Merge tag 'kbuild-fixes-v4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull Kbuild fixes from Masahiro Yamada: - fix build errors in binrpm-pkg and bindeb-pkg targets - fix false positive matches in merge_config.sh - fix build version mismatch in deb-pkg target - fix dtbs_install handling in (bin)deb-pkg target - revert a commit that allows setlocalversion to write to source tree * tag 'kbuild-fixes-v4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: builddeb: Fix inclusion of dtbs in debian package Revert "scripts/setlocalversion: git: Make -dirty check more robust" kbuild: deb-pkg: fix too low build version number kconfig: merge_config: avoid false positive matches from comment lines kbuild: deb-pkg: fix bindeb-pkg breakage when O= is used kbuild: rpm-pkg: fix binrpm-pkg breakage when O= is used commit 63a42e1a5cb3d01eef2f370c11d8733a32f12f86 Merge: c140f8b072d1 d6fd0ae25c64 Author: Linus Torvalds Date: Sun Nov 11 16:54:38 2018 -0600 Merge tag 'for-4.20-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fixes from David Sterba: "Several fixes to recent release (4.19, fixes tagged for stable) and other fixes" * tag 'for-4.20-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: Btrfs: fix missing delayed iputs on unmount Btrfs: fix data corruption due to cloning of eof block Btrfs: fix infinite loop on inode eviction after deduplication of eof block Btrfs: fix deadlock on tree root leaf when finding free extent btrfs: avoid link error with CONFIG_NO_AUTO_INLINE btrfs: tree-checker: Fix misleading group system information Btrfs: fix missing data checksums after a ranged fsync (msync) btrfs: fix pinned underflow after transaction aborted Btrfs: fix cur_offset in the error case for nocow commit c140f8b072d16595c83d4d16a05693e72d9b1973 Merge: b6df7b6db1c1 eb6984fa4ce2 Author: Linus Torvalds Date: Sun Nov 11 16:53:02 2018 -0600 Merge tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 Pull ext4 fixes from Ted Ts'o: "A large number of ext4 bug fixes, mostly buffer and memory leaks on error return cleanup paths" * tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: ext4: missing !bh check in ext4_xattr_inode_write() ext4: fix buffer leak in __ext4_read_dirblock() on error path ext4: fix buffer leak in ext4_expand_extra_isize_ea() on error path ext4: fix buffer leak in ext4_xattr_move_to_block() on error path ext4: release bs.bh before re-using in ext4_xattr_block_find() ext4: fix buffer leak in ext4_xattr_get_block() on error path ext4: fix possible leak of s_journal_flag_rwsem in error path ext4: fix possible leak of sbi->s_group_desc_leak in error path ext4: remove unneeded brelse call in ext4_xattr_inode_update_ref() ext4: avoid possible double brelse() in add_new_gdb() on error path ext4: avoid buffer leak in ext4_orphan_add() after prior errors ext4: avoid buffer leak on shutdown in ext4_mark_iloc_dirty() ext4: fix possible inode leak in the retry loop of ext4_resize_fs() ext4: fix missing cleanup if ext4_alloc_flex_bg_array() fails while resizing ext4: add missing brelse() update_backups()'s error path ext4: add missing brelse() add_new_gdb_meta_bg()'s error path ext4: add missing brelse() in set_flexbg_block_bitmap()'s error path ext4: avoid potential extra brelse in setup_new_flex_group_blocks() commit b6df7b6db1c1837fc9eada74ed561cbfe7746755 Merge: 655c6b977755 15035388439f Author: Linus Torvalds Date: Sun Nov 11 16:41:50 2018 -0600 Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Thomas Gleixner: "A set of x86 fixes: - Cure the LDT remapping to user space on 5 level paging which ended up in the KASLR space - Remove LDT mapping before freeing the LDT pages - Make NFIT MCE handling more robust - Unbreak the VSMP build by removing the dependency on paravirt ops - Support broken PIT emulation on Microsoft hyperV - Don't trace vmware_sched_clock() to avoid tracer recursion - Remove -pipe from KBUILD CFLAGS which breaks clang and is also slower on GCC - Trivial coding style and typo fixes" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/cpu/vmware: Do not trace vmware_sched_clock() x86/vsmp: Remove dependency on pv_irq_ops x86/ldt: Remove unused variable in map_ldt_struct() x86/ldt: Unmap PTEs for the slot before freeing LDT pages x86/mm: Move LDT remap out of KASLR region on 5-level paging acpi/nfit, x86/mce: Validate a MCE's address before using it acpi/nfit, x86/mce: Handle only uncorrectable machine checks x86/build: Remove -pipe from KBUILD_CFLAGS x86/hyper-v: Fix indentation in hv_do_fast_hypercall16() Documentation/x86: Fix typo in zero-page.txt x86/hyper-v: Enable PIT shutdown quirk clockevents/drivers/i8253: Add support for PIT shutdown quirk commit 655c6b977755594d104d2b87d3e896bd09fd34e8 Merge: 08b5278650d6 45fd80809144 Author: Linus Torvalds Date: Sun Nov 11 16:39:12 2018 -0600 Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf fixes from Thomas Gleixner: "A bunch of perf tooling fixes: - Make the Intel PT SQL viewer more robust - Make the Intel PT debug log more useful - Support weak groups in perf record so it's behaving the same way as perf stat - Display the LBR stats in callchain entries properly in perf top - Handle different PMu names with common prefix properlin in pert stat - Start syscall augmenting in perf trace. Preparation for architecture independent eBPF instrumentation of syscalls. - Fix build breakage in JVMTI perf lib - Fix arm64 tools build failure wrt smp_load_{acquire,release}" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf tools: Do not zero sample_id_all for group members perf tools: Fix undefined symbol scnprintf in libperf-jvmti.so perf beauty: Use SRCARCH, ARCH=x86_64 must map to "x86" to find the headers perf intel-pt: Add MTC and CYC timestamps to debug log perf intel-pt: Add more event information to debug log perf scripts python: exported-sql-viewer.py: Fix table find when table re-ordered perf scripts python: exported-sql-viewer.py: Add help window perf scripts python: exported-sql-viewer.py: Add Selected branches report perf scripts python: exported-sql-viewer.py: Fall back to /usr/local/lib/libxed.so perf top: Display the LBR stats in callchain entry perf stat: Handle different PMU names with common prefix perf record: Support weak groups perf evlist: Move perf_evsel__reset_weak_group into evlist perf augmented_syscalls: Start collecting pathnames in the BPF program perf trace: Fix setting of augmented payload when using eBPF + raw_syscalls perf trace: When augmenting raw_syscalls plug raw_syscalls:sys_exit too perf examples bpf: Start augmenting raw_syscalls:sys_{start,exit} tools headers barrier: Fix arm64 tools build failure wrt smp_load_{acquire,release} commit 08b5278650d6e9f61a210f88e3f418c87389df5b Merge: 024d4d4c0cf4 e6a2d72c1040 Author: Linus Torvalds Date: Sun Nov 11 16:37:41 2018 -0600 Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull timer fix from Thomas Gleixner: "Just the removal of a redundant call into the sched deadline overrun check" * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: posix-cpu-timers: Remove useless call to check_dl_overrun() commit 024d4d4c0cf486dee5240183125edbddc6cf2d55 Merge: 1acf93ca6c53 e1ff516a56ad Author: Linus Torvalds Date: Sun Nov 11 16:33:00 2018 -0600 Merge branch 'sched/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler fixes from Thomas Gleixner: "Two small scheduler fixes: - Take hotplug lock in sched_init_smp(). Technically not really required, but lockdep will complain other. - Trivial comment fix in sched/fair" * 'sched/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched/fair: Fix a comment in task_numa_fault() sched/core: Take the hotplug lock in sched_init_smp() commit 1acf93ca6c53144f5ffd408f1820ef5431656eb7 Merge: 0b002cdd5004 b987ffc18fb3 Author: Linus Torvalds Date: Sun Nov 11 16:18:10 2018 -0600 Merge branch 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull locking build fix from Thomas Gleixner: "A single fix for a build fail with CONFIG_PROFILE_ALL_BRANCHES=y in the qspinlock code" * 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/qspinlock: Fix compile error commit 0b002cdd5004c0205364b3be2cfa6aed05c61f42 Merge: e255aee5b66c f26621e60b35 Author: Linus Torvalds Date: Sun Nov 11 16:14:05 2018 -0600 Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull core fixes from Thomas Gleixner: "A couple of fixlets for the core: - Kernel doc function documentation fixes - Missing prototypes for weak watchdog functions" * 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: resource/docs: Complete kernel-doc style function documentation watchdog/core: Add missing prototypes for weak functions resource/docs: Fix new kernel-doc warnings commit 5a96b2d38dc054c0bbcbcd585b116566cbd877fe Author: Ben Wolsieffer Date: Sat Nov 3 19:32:20 2018 -0400 staging: vchiq_arm: fix compat VCHIQ_IOC_AWAIT_COMPLETION The compatibility ioctl wrapper for VCHIQ_IOC_AWAIT_COMPLETION assumes that the native ioctl always uses a message buffer and decrements msgbufcount. Certain message types do not use a message buffer and in this case msgbufcount is not decremented, and completion->header for the message is NULL. Because the wrapper unconditionally decrements msgbufcount, the calling process may assume that a message buffer has been used even when it has not. This results in a memory leak in the userspace code that interfaces with this driver. When msgbufcount is decremented, the userspace code assumes that the buffer can be freed though the reference in completion->header, which cannot happen when the reference is NULL. This patch causes the wrapper to only decrement msgbufcount when the native ioctl decrements it. Note that we cannot simply copy the native ioctl's value of msgbufcount, because the wrapper only retrieves messages from the native ioctl one at a time, while userspace may request multiple messages. See https://github.com/raspberrypi/linux/pull/2703 for more discussion of this patch. Fixes: 5569a1260933 ("staging: vchiq_arm: Add compatibility wrappers for ioctls") Signed-off-by: Ben Wolsieffer Acked-by: Stefan Wahren Cc: stable Signed-off-by: Greg Kroah-Hartman commit cd56a5141331abfe218d744a3d66e1788135d482 Author: Colin Ian King Date: Sat Nov 10 23:28:06 2018 +0000 staging: mt7621-pinctrl: fix uninitialized variable ngroups Currently the for_each_node_with_property loop us incrementing variable ngroups however it was not initialized and hence will contain garbage. Fix this by initializing ngroups to zero. Detected with static analysis with cppcheck: drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c:89]: (error) Uninitialized variable: ngroups Fixes: e12a1a6e087b ("staging: mt7621-pinctrl: refactor rt2880_pinctrl_dt_node_to_map function") Signed-off-by: Colin Ian King Reviewed-by: Sergio Paracuellos Cc: stable Signed-off-by: Greg Kroah-Hartman commit a66d972465d15b1d89281258805eb8b47d66bd36 Author: Alexey Brodkin Date: Wed Oct 31 18:25:47 2018 +0300 devres: Align data[] to ARCH_KMALLOC_MINALIGN Initially we bumped into problem with 32-bit aligned atomic64_t on ARC, see [1]. And then during quite lengthly discussion Peter Z. mentioned ARCH_KMALLOC_MINALIGN which IMHO makes perfect sense. If allocation is done by plain kmalloc() obtained buffer will be ARCH_KMALLOC_MINALIGN aligned and then why buffer obtained via devm_kmalloc() should have any other alignment? This way we at least get the same behavior for both types of allocation. [1] http://lists.infradead.org/pipermail/linux-snps-arc/2018-July/004009.html [2] http://lists.infradead.org/pipermail/linux-snps-arc/2018-July/004036.html Signed-off-by: Alexey Brodkin Cc: Greg Kroah-Hartman Cc: Geert Uytterhoeven Cc: David Laight Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Vineet Gupta Cc: Will Deacon Cc: Greg KH Cc: # 4.8+ Signed-off-by: Greg Kroah-Hartman commit 7236ead1b14923f3ba35cd29cce13246be83f451 Author: Eric Dumazet Date: Sat Nov 10 16:22:29 2018 -0800 act_mirred: clear skb->tstamp on redirect If sch_fq is used at ingress, skbs that might have been timestamped by net_timestamp_set() if a packet capture is requesting timestamps could be delayed by arbitrary amount of time, since sch_fq time base is MONOTONIC. Fix this problem by moving code from sch_netem.c to act_mirred.c. Fixes: fb420d5d91c1 ("tcp/fq: move back to CLOCK_MONOTONIC") Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit a9049ff9214da68df1179a7d5e36b43479abc9b8 Author: Andrew Lunn Date: Sun Nov 11 00:41:10 2018 +0100 net: dsa: mv88e6xxx: Fix clearing of stats counters The mv88e6161 would sometime fail to probe with a timeout waiting for the switch to complete an operation. This operation is supposed to clear the statistics counters. However, due to a read/modify/write, without the needed mask, the operation actually carried out was more random, with invalid parameters, resulting in the switch not responding. We need to preserve the histogram mode bits, so apply a mask to keep them. Reported-by: Chris Healy Fixes: 40cff8fca9e3 ("net: dsa: mv88e6xxx: Fix stats histogram mode") Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller commit 7ab412d33b4c7ff3e0148d3db25dd861edd1283d Author: Jon Maloy Date: Sat Nov 10 17:30:24 2018 -0500 tipc: fix link re-establish failure When a link failure is detected locally, the link is reset, the flag link->in_session is set to false, and a RESET_MSG with the 'stopping' bit set is sent to the peer. The purpose of this bit is to inform the peer that this endpoint just is going down, and that the peer should handle the reception of this particular RESET message as a local failure. This forces the peer to accept another RESET or ACTIVATE message from this endpoint before it can re-establish the link. This again is necessary to ensure that link session numbers are properly exchanged before the link comes up again. If a failure is detected locally at the same time at the peer endpoint this will do the same, which is also a correct behavior. However, when receiving such messages, the endpoints will not distinguish between 'stopping' RESETs and ordinary ones when it comes to updating session numbers. Both endpoints will copy the received session number and set their 'in_session' flags to true at the reception, while they are still expecting another RESET from the peer before they can go ahead and re-establish. This is contradictory, since, after applying the validation check referred to below, the 'in_session' flag will cause rejection of all such messages, and the link will never come up again. We now fix this by not only handling received RESET/STOPPING messages as a local failure, but also by omitting to set a new session number and the 'in_session' flag in such cases. Fixes: 7ea817f4e832 ("tipc: check session number before accepting link protocol messages") Signed-off-by: Jon Maloy Signed-off-by: David S. Miller commit 432798195bbce1f8cd33d1c0284d0538835e25fb Author: Dan Carpenter Date: Fri Oct 26 10:19:51 2018 +0300 uio: Fix an Oops on load I was trying to solve a double free but I introduced a more serious NULL dereference bug. The problem is that if there is an IRQ which triggers immediately, then we need "info->uio_dev" but it's not set yet. This patch puts the original initialization back to how it was and just sets info->uio_dev to NULL on the error path so it should solve both the Oops and the double free. Fixes: f019f07ecf6a ("uio: potential double frees if __uio_register_device() fails") Reported-by: Mathias Thore Signed-off-by: Dan Carpenter Cc: stable Tested-by: Mathias Thore Signed-off-by: Greg Kroah-Hartman commit 8bb0a88600f0267cfcc245d34f8c4abe8c282713 Author: Colin Ian King Date: Fri Oct 19 13:58:01 2018 +0100 test_firmware: fix error return getting clobbered In the case where eq->fw->size > PAGE_SIZE the error return rc is being set to EINVAL however this is being overwritten to rc = req->fw->size because the error exit path via label 'out' is not being taken. Fix this by adding the jump to the error exit path 'out'. Detected by CoverityScan, CID#1453465 ("Unused value") Fixes: c92316bf8e94 ("test_firmware: add batched firmware tests") Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman commit 0749aa25af82c690395a96e799cd2c6e54c459cf Author: Srinivas Kandagatla Date: Tue Nov 6 15:41:41 2018 +0000 nvmem: core: fix regression in of_nvmem_cell_get() NVMEM DT support seems to be totally broken after commit e888d445ac33 ("nvmem: resolve cells from DT at registration time") Fix this! Index used in of_nvmem_cell_get() to find cell is specific to consumer, It can not be used for searching the cell in provider. Use device_node instead of this to find the matching cell in device tree case. Fixes: e888d445ac33 ("nvmem: resolve cells from DT at registration time") Reported-by: Niklas Cassel Signed-off-by: Srinivas Kandagatla Tested-by: Niklas Cassel Signed-off-by: Greg Kroah-Hartman commit 7c97301285b62a41d6bceded7d964085fc8cc50f Author: Nathan Chancellor Date: Wed Oct 17 10:09:02 2018 -0700 misc: atmel-ssc: Fix section annotation on atmel_ssc_get_driver_data After building the kernel with Clang, the following section mismatch warning appears: WARNING: vmlinux.o(.text+0x3bf19a6): Section mismatch in reference from the function ssc_probe() to the function .init.text:atmel_ssc_get_driver_data() The function ssc_probe() references the function __init atmel_ssc_get_driver_data(). This is often because ssc_probe lacks a __init annotation or the annotation of atmel_ssc_get_driver_data is wrong. Remove __init from atmel_ssc_get_driver_data to get rid of the mismatch. Signed-off-by: Nathan Chancellor Cc: stable Signed-off-by: Greg Kroah-Hartman commit fee05f455ceb5c670cbe48e2f9454ebc4a388554 Author: Gustavo A. R. Silva Date: Tue Oct 16 12:59:44 2018 +0200 drivers/misc/sgi-gru: fix Spectre v1 vulnerability req.gid 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: vers/misc/sgi-gru/grukdump.c:200 gru_dump_chiplet_request() warn: potential spectre issue 'gru_base' [w] Fix this by sanitizing req.gid before calling macro GID_TO_GRU, which uses it to index gru_base. 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: Greg Kroah-Hartman commit e670de54c813b5bc3672dd1c67871dc60e9206f4 Author: Dexuan Cui Date: Thu Oct 18 05:09:30 2018 +0000 Drivers: hv: kvp: Fix the recent regression caused by incorrect clean-up In kvp_send_key(), we do need call process_ib_ipinfo() if message->kvp_hdr.operation is KVP_OP_GET_IP_INFO, because it turns out the userland hv_kvp_daemon needs the info of operation, adapter_id and addr_family. With the incorrect fc62c3b1977d, the host can't get the VM's IP via KVP. And, fc62c3b1977d added a "break;", but actually forgot to initialize the key_size/value in the case of KVP_OP_SET, so the default key_size of 0 is passed to the kvp daemon, and the pool files /var/lib/hyperv/.kvp_pool_* can't be updated. This patch effectively rolls back the previous fc62c3b1977d, and correctly fixes the "this statement may fall through" warnings. This patch is tested on WS 2012 R2 and 2016. Fixes: fc62c3b1977d ("Drivers: hv: kvp: Fix two "this statement may fall through" warnings") Signed-off-by: Dexuan Cui Cc: K. Y. Srinivasan Cc: Stephen Hemminger Signed-off-by: Haiyang Zhang Cc: Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman commit d5615e472d23e854e96192103b6ae7977e705f01 Author: Rob Herring Date: Wed Nov 7 08:36:46 2018 -0600 builddeb: Fix inclusion of dtbs in debian package Commit 37c8a5fafa3b ("kbuild: consolidate Devicetree dtb build rules") moved the location of 'dtbs_install' target which caused dtbs to not be installed when building debian package with 'bindeb-pkg' target. Update the builddeb script to use the same logic that determines if there's a 'dtbs_install' target which is presence of the arch dts directory. Also, use CONFIG_OF_EARLY_FLATTREE instead of CONFIG_OF as that's a better indication of whether we are building dtbs. This commit will also have the side effect of installing dtbs on any arch that has dts files. Previously, it was dependent on whether the arch defined 'dtbs_install'. Fixes: 37c8a5fafa3b ("kbuild: consolidate Devicetree dtb build rules") Reported-by: Nuno Gonçalves Signed-off-by: Rob Herring Signed-off-by: Masahiro Yamada commit 8ef14c2c41d962756d314f1d7dc972b0ea7a180f Author: Guenter Roeck Date: Tue Nov 6 10:10:38 2018 -0800 Revert "scripts/setlocalversion: git: Make -dirty check more robust" This reverts commit 6147b1cf19651c7de297e69108b141fb30aa2349. The reverted patch results in attempted write access to the source repository, even if that repository is mounted read-only. Output from "strace git status -uno --porcelain": getcwd("/tmp/linux-test", 129) = 16 open("/tmp/linux-test/.git/index.lock", O_RDWR|O_CREAT|O_EXCL|O_CLOEXEC, 0666) = -1 EROFS (Read-only file system) While git appears to be able to handle this situation, a monitored build environment (such as the one used for Chrome OS kernel builds) may detect it and bail out with an access violation error. On top of that, the attempted write access suggests that git _will_ write to the file even if a build output directory is specified. Users may have the reasonable expectation that the source repository remains untouched in that situation. Fixes: 6147b1cf19651 ("scripts/setlocalversion: git: Make -dirty check more robust" Cc: Genki Sky Signed-off-by: Guenter Roeck Reviewed-by: Brian Norris Signed-off-by: Masahiro Yamada commit bbcde0a7241261cd0ca8d8e6b94a4113a4b71443 Author: Masahiro Yamada Date: Tue Nov 6 13:18:05 2018 +0900 kbuild: deb-pkg: fix too low build version number Since commit b41d920acff8 ("kbuild: deb-pkg: split generating packaging and build"), the build version of the kernel contained in a deb package is too low by 1. Prior to the bad commit, the kernel was built first, then the number in .version file was read out, and written into the debian control file. Now, the debian control file is created before the kernel is actually compiled, which is causing the version number mismatch. Let the mkdebian script pass KBUILD_BUILD_VERSION=${revision} to require the build system to use the specified version number. Fixes: b41d920acff8 ("kbuild: deb-pkg: split generating packaging and build") Reported-by: Doug Smythies Signed-off-by: Masahiro Yamada Tested-by: Doug Smythies commit 6bbe4385d035c6fac56f840a59861a0310ce137b Author: Masahiro Yamada Date: Mon Nov 5 17:19:36 2018 +0900 kconfig: merge_config: avoid false positive matches from comment lines The current SED_CONFIG_EXP could match to comment lines in config fragment files, especially when CONFIG_PREFIX_ is empty. For example, Buildroot uses empty prefixing; starting symbols with BR2_ is just convention. Make the sed expression more robust against false positives from comment lines. The new sed expression matches to only valid patterns. Signed-off-by: Masahiro Yamada Reviewed-by: Petr Vorel Reviewed-by: Arnout Vandecappelle (Essensium/Mind) commit 97dc6c03c1b0a9af7aa26da7b0b266a762451f5f Merge: aeaf6a4b2d9e 3e452e636d00 Author: Rafael J. Wysocki Date: Sun Nov 11 00:02:37 2018 +0100 Merge branch 'pm-cpuidle' * pm-cpuidle: ARM: cpuidle: Convert to use cpuidle_register|unregister() ARM: cpuidle: Don't register the driver when back-end init returns -ENXIO commit e255aee5b66ce4af025e6f77122114c01303b861 Merge: 20ef6d06ef9a 641a41dbba21 Author: Linus Torvalds Date: Sat Nov 10 13:32:14 2018 -0600 Merge tag 'tty-4.20-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pull tty/serial fixes from Greg KH: "Here are some small tty fixes for 4.20-rc2 One of these missed the original 4.19-final release, I missed that I hadn't done a pull request for it as it was in linux-next and my branch for a long time, that's my fault. The others are small, fixing some reported issues and finally fixing the termios mess for alpha so that glibc has a chance to implement some missing functionality that has been pending for many years now. All of these have been in linux-next with no reported issues" * tag 'tty-4.20-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: serial: sh-sci: Fix could not remove dev_attr_rx_fifo_timeout arch/alpha, termios: implement BOTHER, IBSHIFT and termios2 termios, tty/tty_baudrate.c: fix buffer overrun vt: fix broken display when running aptitude serial: sh-sci: Fix receive on SCIFA/SCIFB variants with DMA commit 20ef6d06ef9a31a33516637a80521b9fc7f1f849 Merge: 1de4f2ef216d 73b6f96cbc01 Author: Linus Torvalds Date: Sat Nov 10 13:29:47 2018 -0600 Merge tag 'drm-fixes-2018-11-11' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "drm: i915, amdgpu, sun4i, exynos and etnaviv fixes: - amdgpu has some display fixes, KFD ioctl fixes and a Vega20 bios interaction fix. - sun4i has some NULL checks added - i915 has a 32-bit system fix, LPE audio oops, and HDMI2.0 clock fixes. - Exynos has a 3 regression fixes (one frame counter, fbdev missing, dsi->panel check) - Etnaviv has a single fencing fix for GPU recovery" * tag 'drm-fixes-2018-11-11' of git://anongit.freedesktop.org/drm/drm: (39 commits) drm/amd/amdgpu/dm: Fix dm_dp_create_fake_mst_encoder() drm/amd/display: Drop reusing drm connector for MST drm/amd/display: Cleanup MST non-atomic code workaround drm/amd/powerplay: always use fast UCLK switching when UCLK DPM enabled drm/amd/powerplay: set a default fclk/gfxclk ratio drm/amdgpu/display/dce11: only enable FBC when selected drm/amdgpu/display/dm: handle FBC dc feature parameter drm/amdgpu/display/dc: add FBC to dc_config drm/amdgpu: add DC feature mask module parameter drm/amdgpu/display: check if fbc is available in set_static_screen_control (v2) drm/amdgpu/vega20: add CLK base offset drm/amd/display: Stop leaking planes drm/amd/display: Fix misleading buffer information Revert "drm/amd/display: set backlight level limit to 1" drm/amd: Update atom_smu_info_v3_3 structure drm/i915: Fix ilk+ watermarks when disabling pipes drm/sun4i: tcon: prevent tcon->panel dereference if NULL drm/sun4i: tcon: fix check of tcon->panel null pointer drm/i915: Don't oops during modeset shutdown after lpe audio deinit drm/i915: Mark pin flags as u64 ... commit 1de4f2ef216dade3b5bd5f5247c4c750a953f51c Merge: a1aa42f1d8c0 9c8e0a1b6835 Author: Linus Torvalds Date: Sat Nov 10 13:27:58 2018 -0600 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace Pull namespace fixes from Eric Biederman: "I believe all of these are simple obviously correct bug fixes. These fall into two groups: - Fixing the implementation of MNT_LOCKED which prevents lesser privileged users from seeing unders mounts created by more privileged users. - Fixing the extended uid and group mapping in user namespaces. As well as ensuring the code looks correct I have spot tested these changes as well and in my testing the fixes are working" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace: mount: Prevent MNT_DETACH from disconnecting locked mounts mount: Don't allow copying MNT_UNBINDABLE|MNT_LOCKED mounts mount: Retest MNT_LOCKED in do_umount userns: also map extents in the reverse map to kernel IDs commit a1aa42f1d8c00a0767afee28d17caafd2a4dd8ff Merge: ab6e1f378f54 1aefa98b010e Author: Linus Torvalds Date: Sat Nov 10 13:25:55 2018 -0600 Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux Pull clk fixes from Stephen Boyd: "A small set of fixes for clk drivers. One to fix a DT refcount imbalance, two to mark some Amlogic clks as critical, and one final one that fixes a clk name for the Qualcomm driver merged this cycle" * tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: 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 73b6f96cbc0162787bcbdac5f538167084c8d605 Merge: d10cf6da3112 63237f8748bd Author: Dave Airlie Date: Sun Nov 11 04:20:48 2018 +1000 Merge branch 'drm-fixes-4.20' of git://people.freedesktop.org/~agd5f/linux into drm-fixes Fixes for 4.20: - DC MST fixes - DC FBC fix - Vega20 updates to support the latest vbios - KFD type fixes for ioctl headers Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20181108035551.2904-1-alexander.deucher@amd.com commit d10cf6da31128f4678058e1ed77bcb8922d5e4b0 Merge: 7d588f90fb32 a8939766c75c Author: Dave Airlie Date: Sun Nov 11 04:19:52 2018 +1000 Merge tag 'drm-misc-fixes-2018-11-07' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes - sun4i: tcon->panel NULL deref protections (Giulio) Cc: Giulio Benetti Signed-off-by: Dave Airlie From: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20181107205051.GA27823@art_vandelay commit 7d588f90fb32aacdebd30481e5a38974ac68b689 Merge: d08f44b18ccb 214782da8fe8 Author: Dave Airlie Date: Sun Nov 11 04:14:22 2018 +1000 Merge tag 'drm-intel-fixes-2018-11-08' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes Bugzilla #108282 fixed: Avoid graphics corruption on 32-bit systems for Mesa 18.2.x Avoid OOPS on LPE audio deinit. Remove two unused W/As. Fix to correct HDMI 2.0 audio clock modes to spec. Signed-off-by: Dave Airlie From: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20181108134508.GA28466@jlahtine-desk.ger.corp.intel.com commit 63c82997f5c0f3e1b914af43d82f712a86bc5f3a Author: Jakub Kicinski Date: Fri Nov 9 21:06:26 2018 -0800 net: sched: cls_flower: validate nested enc_opts_policy to avoid warning TCA_FLOWER_KEY_ENC_OPTS and TCA_FLOWER_KEY_ENC_OPTS_MASK can only currently contain further nested attributes, which are parsed by hand, so the policy is never actually used resulting in a W=1 build warning: net/sched/cls_flower.c:492:1: warning: ‘enc_opts_policy’ defined but not used [-Wunused-const-variable=] enc_opts_policy[TCA_FLOWER_KEY_ENC_OPTS_MAX + 1] = { Add the validation anyway to avoid potential bugs when other attributes are added and to make the attribute structure slightly more clear. Validation will also set extact to point to bad attribute on error. Fixes: 0a6e77784f49 ("net/sched: allow flower to match tunnel options") Signed-off-by: Jakub Kicinski Acked-by: Simon Horman Acked-by: Jiri Pirko Signed-off-by: David S. Miller commit 2121db09630113e67b51ae78c18115f1858f648a Author: Dan Williams Date: Sat Nov 3 17:53:09 2018 -0700 Revert "acpi, nfit: Further restrict userspace ARS start requests" The following lockdep splat results from acquiring the init_mutex in acpi_nfit_clear_to_send(): WARNING: possible circular locking dependency detected lt-daxdev-error/7216 is trying to acquire lock: 00000000f694db15 (&acpi_desc->init_mutex){+.+.}, at: acpi_nfit_clear_to_send+0x27/0x80 [nfit] but task is already holding lock: 00000000182298f2 (&nvdimm_bus->reconfig_mutex){+.+.}, at: __nd_ioctl+0x457/0x610 [libnvdimm] which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&nvdimm_bus->reconfig_mutex){+.+.}: nvdimm_badblocks_populate+0x41/0x150 [libnvdimm] nd_region_notify+0x95/0xb0 [libnvdimm] nd_device_notify+0x40/0x50 [libnvdimm] ars_complete+0x7f/0xd0 [nfit] acpi_nfit_scrub+0xbb/0x410 [nfit] process_one_work+0x22b/0x5c0 worker_thread+0x3c/0x390 kthread+0x11e/0x140 ret_from_fork+0x3a/0x50 -> #0 (&acpi_desc->init_mutex){+.+.}: __mutex_lock+0x83/0x980 acpi_nfit_clear_to_send+0x27/0x80 [nfit] __nd_ioctl+0x474/0x610 [libnvdimm] nd_ioctl+0xa4/0xb0 [libnvdimm] do_vfs_ioctl+0xa5/0x6e0 ksys_ioctl+0x70/0x80 __x64_sys_ioctl+0x16/0x20 do_syscall_64+0x60/0x210 entry_SYSCALL_64_after_hwframe+0x49/0xbe New infrastructure is needed to be able to perform this check without acquiring the lock. Fixes: 594861215c83 ("acpi, nfit: Further restrict userspace ARS start") Cc: Dave Jiang Signed-off-by: Dan Williams commit 3fa58dcab50a0aa16817f16a8d38aee869eb3fb9 Author: Dan Williams Date: Thu Nov 1 00:30:22 2018 -0700 acpi, nfit: Fix ARS overflow continuation When the platform BIOS is unable to report all the media error records it requires the OS to restart the scrub at a prescribed location. The driver detects the overflow condition, but then fails to report it to the ARS state machine after reaping the records. Propagate -ENOSPC correctly to continue the ARS operation. Cc: Fixes: 1cf03c00e7c1 ("nfit: scrub and register regions in a workqueue") Reported-by: Jacek Zloch Reviewed-by: Dave Jiang Signed-off-by: Dan Williams commit de7b75d82f70c5469675b99ad632983c50b6f7e7 Author: Jens Axboe Date: Fri Nov 9 15:58:40 2018 -0700 floppy: fix race condition in __floppy_read_block_0() LKP recently reported a hang at bootup in the floppy code: [ 245.678853] INFO: task mount:580 blocked for more than 120 seconds. [ 245.679906] Tainted: G T 4.19.0-rc6-00172-ga9f38e1 #1 [ 245.680959] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [ 245.682181] mount D 6372 580 1 0x00000004 [ 245.683023] Call Trace: [ 245.683425] __schedule+0x2df/0x570 [ 245.683975] schedule+0x2d/0x80 [ 245.684476] schedule_timeout+0x19d/0x330 [ 245.685090] ? wait_for_common+0xa5/0x170 [ 245.685735] wait_for_common+0xac/0x170 [ 245.686339] ? do_sched_yield+0x90/0x90 [ 245.686935] wait_for_completion+0x12/0x20 [ 245.687571] __floppy_read_block_0+0xfb/0x150 [ 245.688244] ? floppy_resume+0x40/0x40 [ 245.688844] floppy_revalidate+0x20f/0x240 [ 245.689486] check_disk_change+0x43/0x60 [ 245.690087] floppy_open+0x1ea/0x360 [ 245.690653] __blkdev_get+0xb4/0x4d0 [ 245.691212] ? blkdev_get+0x1db/0x370 [ 245.691777] blkdev_get+0x1f3/0x370 [ 245.692351] ? path_put+0x15/0x20 [ 245.692871] ? lookup_bdev+0x4b/0x90 [ 245.693539] blkdev_get_by_path+0x3d/0x80 [ 245.694165] mount_bdev+0x2a/0x190 [ 245.694695] squashfs_mount+0x10/0x20 [ 245.695271] ? squashfs_alloc_inode+0x30/0x30 [ 245.695960] mount_fs+0xf/0x90 [ 245.696451] vfs_kern_mount+0x43/0x130 [ 245.697036] do_mount+0x187/0xc40 [ 245.697563] ? memdup_user+0x28/0x50 [ 245.698124] ksys_mount+0x60/0xc0 [ 245.698639] sys_mount+0x19/0x20 [ 245.699167] do_int80_syscall_32+0x61/0x130 [ 245.699813] entry_INT80_32+0xc7/0xc7 showing that we never complete that read request. The reason is that the completion setup is racy - it initializes the completion event AFTER submitting the IO, which means that the IO could complete before/during the init. If it does, we are passing garbage to complete() and we may sleep forever waiting for the event to occur. Fixes: 7b7b68bba5ef ("floppy: bail out in open() if drive is not responding to block0 read") Reviewed-by: Omar Sandoval Signed-off-by: Jens Axboe commit ab6e1f378f546b0caa616ac0fcc730725cc2d222 Merge: 35c55685fc80 3941552aec1e Author: Linus Torvalds Date: Sat Nov 10 08:58:48 2018 -0600 Merge tag 'for-linus-4.20a-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull xen fixes from Juergen Gross: "Several fixes, mostly for rather recent regressions when running under Xen" * tag 'for-linus-4.20a-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: xen: remove size limit of privcmd-buf mapping interface xen: fix xen_qlock_wait() x86/xen: fix pv boot xen-blkfront: fix kernel panic with negotiate_mq error path xen/grant-table: Fix incorrect gnttab_dma_free_pages() pr_debug message CONFIG_XEN_PV breaks xen_create_contiguous_region on ARM commit 35c55685fc807fb536067602418f4a12dde23987 Merge: d5335b3dfc61 24cc61d8cb5a Author: Linus Torvalds Date: Sat Nov 10 07:07:21 2018 -0600 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fixes from Catalin Marinas: - Fix occasional page fault during boot due to memblock resizing before the linear map is up. - Define NET_IP_ALIGN to 0 to improve the DMA performance on some platforms. - lib/raid6 test build fix. - .mailmap update for Punit Agrawal * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: memblock: don't permit memblock resizing until linear mapping is up arm64: mm: define NET_IP_ALIGN to 0 lib/raid6: Fix arm64 test build mailmap: Update email for Punit Agrawal commit c4b7d1ba7d263b74bb72e9325262a67139605cde Author: YueHaibing Date: Sat Nov 10 04:13:24 2018 +0000 sysv: return 'err' instead of 0 in __sysv_write_inode Fixes gcc '-Wunused-but-set-variable' warning: fs/sysv/inode.c: In function '__sysv_write_inode': fs/sysv/inode.c:239:6: warning: variable 'err' set but not used [-Wunused-but-set-variable] __sysv_write_inode should return 'err' instead of 0 Fixes: 05459ca81ac3 ("repair sysv_write_inode(), switch sysv to simple_fsync()") Signed-off-by: YueHaibing Signed-off-by: Al Viro commit d5335b3dfc614fbb4ce2b352177f38521ec3ecdd Merge: aa4330e15c26 247c554a14aa Author: Linus Torvalds Date: Sat Nov 10 06:57:34 2018 -0600 Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c updates from Wolfram Sang: "I2C has one bugfix (qcom-geni driver), one arch enablement (i2c-omap driver, no code change), and a new driver (nvidia-gpu) this time" * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: usb: typec: ucsi: add support for Cypress CCGx i2c: nvidia-gpu: make pm_ops static i2c: add i2c bus driver for NVIDIA GPU i2c: qcom-geni: Fix runtime PM mismatch with child devices MAINTAINERS: Add entry for i2c-omap driver i2c: omap: Enable for ARCH_K3 dt-bindings: i2c: omap: Add new compatible for AM654 SoCs commit fbd1d5245372e48b494120a30fe0b34b304576c4 Author: Alexandre Belloni Date: Fri Nov 9 17:37:20 2018 +0100 net: mvneta: correct typo The reserved variable should be named reserved1. Signed-off-by: Alexandre Belloni Signed-off-by: David S. Miller commit 62230715fd2453b3ba948c9d83cfb3ada9169169 Author: 배석진 Date: Fri Nov 9 16:53:06 2018 -0800 flow_dissector: do not dissect l4 ports for fragments Only first fragment has the sport/dport information, not the following ones. If we want consistent hash for all fragments, we need to ignore ports even for first fragment. This bug is visible for IPv6 traffic, if incoming fragments do not have a flow label, since skb_get_hash() will give different results for first fragment and following ones. It is also visible if any routing rule wants dissection and sport or dport. See commit 5e5d6fed3741 ("ipv6: route: dissect flow in input path if fib rules need it") for details. [edumazet] rewrote the changelog completely. Fixes: 06635a35d13d ("flow_dissect: use programable dissector in skb_flow_dissect and friends") Signed-off-by: 배석진 Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit d02854dc1999ed3e7fd79ec700c64ac23ac0c458 Author: Subash Abhinov Kasiviswanathan Date: Fri Nov 9 18:56:27 2018 -0700 net: qualcomm: rmnet: Fix incorrect assignment of real_dev A null dereference was observed when a sysctl was being set from userspace and rmnet was stuck trying to complete some actions in the NETDEV_REGISTER callback. This is because the real_dev is set only after the device registration handler completes. sysctl call stack - <6> Unable to handle kernel NULL pointer dereference at virtual address 00000108 <2> pc : rmnet_vnd_get_iflink+0x1c/0x28 <2> lr : dev_get_iflink+0x2c/0x40 <2> rmnet_vnd_get_iflink+0x1c/0x28 <2> inet6_fill_ifinfo+0x15c/0x234 <2> inet6_ifinfo_notify+0x68/0xd4 <2> ndisc_ifinfo_sysctl_change+0x1b8/0x234 <2> proc_sys_call_handler+0xac/0x100 <2> proc_sys_write+0x3c/0x4c <2> __vfs_write+0x54/0x14c <2> vfs_write+0xcc/0x188 <2> SyS_write+0x60/0xc0 <2> el0_svc_naked+0x34/0x38 device register call stack - <2> notifier_call_chain+0x84/0xbc <2> raw_notifier_call_chain+0x38/0x48 <2> call_netdevice_notifiers_info+0x40/0x70 <2> call_netdevice_notifiers+0x38/0x60 <2> register_netdevice+0x29c/0x3d8 <2> rmnet_vnd_newlink+0x68/0xe8 <2> rmnet_newlink+0xa0/0x160 <2> rtnl_newlink+0x57c/0x6c8 <2> rtnetlink_rcv_msg+0x1dc/0x328 <2> netlink_rcv_skb+0xac/0x118 <2> rtnetlink_rcv+0x24/0x30 <2> netlink_unicast+0x158/0x1f0 <2> netlink_sendmsg+0x32c/0x338 <2> sock_sendmsg+0x44/0x60 <2> SyS_sendto+0x150/0x1ac <2> el0_svc_naked+0x34/0x38 Fixes: b752eff5be24 ("net: qualcomm: rmnet: Implement ndo_get_iflink") Signed-off-by: Sean Tranchetti Signed-off-by: Subash Abhinov Kasiviswanathan Signed-off-by: David S. Miller commit dd63c3e02b998a2c1270c4021a4e2e72753f2632 Merge: 85b18b0237ce bbb67a44baf9 Author: David S. Miller Date: Fri Nov 9 15:38:11 2018 -0800 Merge branch 'aquantia-fixes' Igor Russkikh says: ==================== net: aquantia: 2018-11 bugfixes The patchset fixes a number of bugs found in various areas after driver validation. ==================== Signed-off-by: David S. Miller commit bbb67a44baf973da734b9fd61cba4211da240751 Author: Dmitry Bogdanov Date: Fri Nov 9 11:54:03 2018 +0000 net: aquantia: allow rx checksum offload configuration RX Checksum offloads could not be configured and ignored netdev features flag for checksumming. Signed-off-by: Igor Russkikh Signed-off-by: Dmitry Bogdanov Signed-off-by: David S. Miller commit ad703c2b9127f9acdef697ec4755f6da4beaa266 Author: Dmitry Bogdanov Date: Fri Nov 9 11:54:01 2018 +0000 net: aquantia: invalid checksumm offload implementation Packets with marked invalid IP/UDP/TCP checksums were considered as good by the driver. The error was in a logic, processing offload bits in RX descriptor. Signed-off-by: Igor Russkikh Signed-off-by: Dmitry Bogdanov Signed-off-by: David S. Miller commit bfaa9f8553d5c20703781e63f4fc8cb4792f18fd Author: Igor Russkikh Date: Fri Nov 9 11:53:59 2018 +0000 net: aquantia: fixed enable unicast on 32 macvlan Fixed a condition mistake due to which macvlans unicast item number 32 was not added in the unicast filter. The consequence is that when exactly 32 macvlans are created on NIC, the last created macvlan receives no traffic because its MAC was not registered in HW. Fixes: 94b3b542303f ("net: aquantia: vlan unicast address list correct handling") Signed-off-by: Igor Russkikh Tested-by: Nikita Danilov Signed-off-by: David S. Miller commit 7a1bb49461b12b2e6332a4d054256835f45203f3 Author: Dmitry Bogdanov Date: Fri Nov 9 11:53:57 2018 +0000 net: aquantia: fix potential IOMMU fault after driver unbind IOMMU fault may occurr on unbind/bind or if_down/if_up sequence. Although driver disables the rings on down, this is not enough. Due to internal HW design, during subsequent initialization NIC sometimes may reuse RX descriptors cache and write to the host memory from the descriptor cache. That's get catched by IOMMU on host. This patch invalidates the descriptor cache in NIC on interface down to prevent writing to the cached descriptors and to the memory pointed in those descriptors. Signed-off-by: Dmitry Bogdanov Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit 35e8e8b45d31bec34379dd36e7b71448e003efb2 Author: Igor Russkikh Date: Fri Nov 9 11:53:56 2018 +0000 net: aquantia: synchronized flow control between mac/phy Flow control statuses were not synchronized between blocks, that caused packets/link drop on some corner cases, when MAC sent PFC although Phy was not expecting these to come. Driver should readout the negotiated FC from phy and configure RX block accordigly. This is done on each link change event with information from FW. Fixes: 288551de45aa ("net: aquantia: Implement rx/tx flow control ethtools callback") Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit 9134586715e389fe90d9d28cb37a668f374d686a Author: Bjorn Andersson Date: Mon Oct 29 22:45:54 2018 -0700 arm64: dts: qcom: msm8998: Reserve gpio ranges on MTP GPIOs 0 through 3 and 81 through 84 are configured to not be accessible from the application CPUs. Mark them as reserved to allow the MSM8998 MTP to boot after the introduction of 3edfb7bd76bd ("gpiolib: Show correct direction from the beginning"). Signed-off-by: Bjorn Andersson Reviewed-by: Jeffrey Hugo Signed-off-by: Andy Gross commit 5f8d3ab136d0ccb59c4d628d8f85e0d8f2761d07 Author: Bjorn Andersson Date: Fri Nov 2 14:45:32 2018 -0700 arm64: dts: sdm845-mtp: Reserve reserved gpios With the introduction of commit 3edfb7bd76bd ("gpiolib: Show correct direction from the beginning") the gpiolib will attempt to read the direction of all pins, which triggers a read from protected register regions. The pins 0 through 3 and 81 through 84 are protected, so mark these as reserved. Signed-off-by: Bjorn Andersson Reviewed-by: Stephen Boyd Reviewed-by: Linus Walleij Signed-off-by: Andy Gross commit aa4330e15c26c5ef8dd184f515c0655db8c6df3a Merge: dc5db2186550 89c38422e072 Author: Linus Torvalds Date: Fri Nov 9 16:41:58 2018 -0600 Merge tag 'devicetree-fixes-for-4.20-2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux Pull Devicetree fixes from Rob Herring: - Add validation of NUMA distance map to prevent crashes with bad map - Fix setting of dma_mask * tag 'devicetree-fixes-for-4.20-2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: of, numa: Validate some distance map rules of/device: Really only set bus DMA mask when appropriate commit dc5db21865507d0d9f706bd97c4a85315d60d0c5 Merge: d757a3b01e72 34ffec60b27a Author: Linus Torvalds Date: Fri Nov 9 16:31:51 2018 -0600 Merge tag 'for-linus-20181109' of git://git.kernel.dk/linux-block Pull block layer fixes from Jens Axboe: - Two fixes for an ubd regression, one for missing locking, and one for a missing initialization of a field. The latter was an old latent bug, but it's now visible and triggers (Me, Anton Ivanov) - Set of NVMe fixes via Christoph, but applied manually due to a git tree mixup (Christoph, Sagi) - Fix for a discard split regression, in three patches (Ming) - Update libata git trees (Geert) - SPDX identifier for sata_rcar (Kuninori Morimoto) - Virtual boundary merge fix (Johannes) - Preemptively clear memory we are going to pass to userspace, in case the driver does a short read (Keith) * tag 'for-linus-20181109' of git://git.kernel.dk/linux-block: block: make sure writesame bio is aligned with logical block size block: cleanup __blkdev_issue_discard() block: make sure discard bio is aligned with logical block size Revert "nvmet-rdma: use a private workqueue for delete" nvme: make sure ns head inherits underlying device limits nvmet: don't try to add ns to p2p map unless it actually uses it sata_rcar: convert to SPDX identifiers ubd: fix missing initialization of io_req block: Clear kernel memory before copying to user MAINTAINERS: Fix remaining pointers to obsolete libata.git ubd: fix missing lock around request issue block: respect virtual boundary mask in bvecs commit d757a3b01e72368176c5ee580ea17f8c2d185cd7 Merge: 26eaed4671af 23c625ce3065 Author: Linus Torvalds Date: Fri Nov 9 16:26:18 2018 -0600 Merge tag 'ceph-for-4.20-rc2' of https://github.com/ceph/ceph-client Pull Ceph fixes from Ilya Dryomov: "Two CephFS fixes (copy_file_range and quota) and a small feature bit cleanup" * tag 'ceph-for-4.20-rc2' of https://github.com/ceph/ceph-client: libceph: assume argonaut on the server side ceph: quota: fix null pointer dereference in quota check ceph: add destination file data sync before doing any remote copy commit 26eaed4671af3c4108b266504aed1103fb68a378 Merge: 3541833fd1f2 d01501f85249 Author: Linus Torvalds Date: Fri Nov 9 16:21:24 2018 -0600 Merge tag 'mips_fixes_4.20_2' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux Pull MIPS fixes from Paul Burton: "A couple of small MIPS fixes for 4.20: - Extend an array to avoid overruns on some Octeon hardware, fixing a bug introduced in 4.3. - Fix a coherent DMA regression for systems without cache-coherent DMA introduced in the 4.20 merge window" * tag 'mips_fixes_4.20_2' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux: MIPS: Fix `dma_alloc_coherent' returning a non-coherent allocation MIPS: OCTEON: fix out of bounds array access on CN68XX commit 1aefa98b010e9cc7a07046cbcb1237ddad85b708 Author: Vinod Koul Date: Fri Nov 9 15:20:54 2018 +0530 clk: qcom: gcc: Fix board clock node name Device tree node name are not supposed to have "_" in them so fix the node name use of xo_board to xo-board Fixes: 652f1813c113 ("clk: qcom: gcc: Add global clock controller driver for QCS404") Signed-off-by: Vinod Koul Signed-off-by: Stephen Boyd commit 15035388439f892017d38b05214d3cda6578af64 Author: Steven Rostedt (VMware) Date: Fri Nov 9 15:22:07 2018 -0500 x86/cpu/vmware: Do not trace vmware_sched_clock() When running function tracing on a Linux guest running on VMware Workstation, the guest would crash. This is due to tracing of the sched_clock internal call of the VMware vmware_sched_clock(), which causes an infinite recursion within the tracing code (clock calls must not be traced). Make vmware_sched_clock() not traced by ftrace. Fixes: 80e9a4f21fd7c ("x86/vmware: Add paravirt sched clock") Reported-by: GwanYeong Kim Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Borislav Petkov CC: Alok Kataria CC: GwanYeong Kim CC: "H. Peter Anvin" CC: Ingo Molnar Cc: stable@vger.kernel.org CC: Thomas Gleixner CC: virtualization@lists.linux-foundation.org CC: x86-ml Link: http://lkml.kernel.org/r/20181109152207.4d3e7d70@gandalf.local.home commit 247c554a14aa16ca08f4ed4d9eb39a2389f69d1d Author: Ajay Gupta Date: Fri Oct 26 09:36:59 2018 -0700 usb: typec: ucsi: add support for Cypress CCGx Latest NVIDIA GPU cards have a Cypress CCGx Type-C controller over I2C interface. This UCSI I2C driver uses I2C bus driver interface for communicating with Type-C controller. Signed-off-by: Ajay Gupta Acked-by: Heikki Krogerus Signed-off-by: Wolfram Sang commit 641a41dbba217ee5bd26abe6be77f8cead9cd00e Author: Yoshihiro Shimoda Date: Tue Oct 30 15:13:35 2018 +0900 serial: sh-sci: Fix could not remove dev_attr_rx_fifo_timeout This patch fixes an issue that the sci_remove() could not remove dev_attr_rx_fifo_timeout because uart_remove_one_port() set the port->port.type to PORT_UNKNOWN. Reported-by: Hiromitsu Yamasaki Fixes: 5d23188a473d ("serial: sh-sci: make RX FIFO parameters tunable via sysfs") Cc: # v4.11+ Signed-off-by: Yoshihiro Shimoda Reviewed-by: Ulrich Hecht Signed-off-by: Greg Kroah-Hartman commit 23d8003907d094f77cf959228e2248d6db819fa7 Author: Stanislav Lisovskiy Date: Fri Nov 9 11:00:12 2018 +0200 drm/dp_mst: Check if primary mstb is null Unfortunately drm_dp_get_mst_branch_device which is called from both drm_dp_mst_handle_down_rep and drm_dp_mst_handle_up_rep seem to rely on that mgr->mst_primary is not NULL, which seem to be wrong as it can be cleared with simultaneous mode set, if probing fails or in other case. mgr->lock mutex doesn't protect against that as it might just get assigned to NULL right before, not simultaneously. There are currently bugs 107738, 108616 bugs which crash in drm_dp_get_mst_branch_device, caused by this issue. v2: Refactored the code, as it was nicely noticed. Fixed Bugzilla bug numbers(second was 108616, but not 108816) and added links. [changed title and added stable cc] Signed-off-by: Lyude Paul Signed-off-by: Stanislav Lisovskiy Cc: stable@vger.kernel.org Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108616 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107738 Link: https://patchwork.freedesktop.org/patch/msgid/20181109090012.24438-1-stanislav.lisovskiy@intel.com commit caccdcc5dbec0dd9643fe1667893e78631a4d38e Author: Wolfram Sang Date: Fri Nov 9 17:54:38 2018 +0100 i2c: nvidia-gpu: make pm_ops static sparse rightfully says: warning: symbol 'gpu_i2c_driver_pm' was not declared. Should it be static? Signed-off-by: Wolfram Sang commit c71bcdcb42a7493348d3b45dee8139843bf45efc Author: Ajay Gupta Date: Fri Oct 26 09:36:58 2018 -0700 i2c: add i2c bus driver for NVIDIA GPU Latest NVIDIA GPU card has USB Type-C interface. There is a Type-C controller which can be accessed over I2C. This driver adds I2C bus driver to communicate with Type-C controller. I2C client driver will be part of USB Type-C UCSI driver. Signed-off-by: Ajay Gupta Reviewed-by: Andy Shevchenko [wsa: kept Makefile sorting] Signed-off-by: Wolfram Sang commit eb6984fa4ce2837dcb1f66720a600f31b0bb3739 Author: Vasily Averin Date: Fri Nov 9 11:34:40 2018 -0500 ext4: missing !bh check in ext4_xattr_inode_write() According to Ted Ts'o ext4_getblk() called in ext4_xattr_inode_write() should not return bh = NULL The only time that bh could be NULL, then, would be in the case of something really going wrong; a programming error elsewhere (perhaps a wild pointer dereference) or I/O error causing on-disk file system corruption (although that would be highly unlikely given that we had *just* allocated the blocks and so the metadata blocks in question probably would still be in the cache). Fixes: e50e5129f384 ("ext4: xattr-in-inode support") Signed-off-by: Vasily Averin Signed-off-by: Theodore Ts'o Cc: stable@kernel.org # 4.13 commit d788905f68fd4714c82936f6f7f1d3644d7ae7ef Author: Oleksij Rempel Date: Tue Sep 18 11:40:41 2018 +0200 can: flexcan: use can_rx_offload_queue_sorted() for flexcan_irq_bus_*() Currently, in case of bus error, driver will generate error message and put in the tail of the message queue. To avoid confusions, this change should place the bus related messages in proper order. Signed-off-by: Oleksij Rempel Cc: linux-stable Signed-off-by: Marc Kleine-Budde commit 4530ec36bb1e0d24f41c33229694adacda3d5d89 Author: Oleksij Rempel Date: Tue Sep 18 11:40:40 2018 +0200 can: rx-offload: rename can_rx_offload_irq_queue_err_skb() to can_rx_offload_queue_tail() This function has nothing todo with error. Signed-off-by: Oleksij Rempel Cc: linux-stable Signed-off-by: Marc Kleine-Budde commit ed72bc8bcb9277061e753faf300b20f97323761c Author: Oleksij Rempel Date: Tue Sep 18 11:40:39 2018 +0200 can: flexcan: handle tx-complete CAN frames via rx-offload infrastructure Current flexcan driver will put TX-ECHO in regular unsorted way, in this case TX-ECHO can come after the response to the same TXed message. In some cases, for example for J1939 stack, things will break. This patch is using new rx-offload API to put the messages just in the right place. Signed-off-by: Oleksij Rempel Cc: linux-stable Signed-off-by: Marc Kleine-Budde commit 11644a7659529730eaf2f166efaabe7c3dc7af8c Author: Cherian, George Date: Fri Nov 9 17:21:22 2018 +0200 xhci: Add quirk to workaround the errata seen on Cavium Thunder-X2 Soc Implement workaround for ThunderX2 Errata-129 (documented in CN99XX Known Issues" available at Cavium support site). As per ThunderX2errata-129, USB 2 device may come up as USB 1 if a connection to a USB 1 device is followed by another connection to a USB 2 device, the link will come up as USB 1 for the USB 2 device. Resolution: Reset the PHY after the USB 1 device is disconnected. The PHY reset sequence is done using private registers in XHCI register space. After the PHY is reset we check for the PLL lock status and retry the operation if it fails. From our tests, retrying 4 times is sufficient. Add a new quirk flag XHCI_RESET_PLL_ON_DISCONNECT to invoke the workaround in handle_xhci_port_status(). Cc: stable@vger.kernel.org Signed-off-by: George Cherian Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman commit a5baeaeabcca3244782a9b6382ebab6f8a58f583 Author: Aaron Ma Date: Fri Nov 9 17:21:21 2018 +0200 usb: xhci: fix timeout for transition from RExit to U0 This definition is used by msecs_to_jiffies in milliseconds. According to the comments, max rexit timeout should be 20ms. Align with the comments to properly calculate the delay. Verified on Sunrise Point-LP and Cannon Lake. Cc: stable@vger.kernel.org Signed-off-by: Aaron Ma Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman commit 958c0bd86075d4ef1c936998deefe1947e539240 Author: Aaron Ma Date: Fri Nov 9 17:21:20 2018 +0200 usb: xhci: fix uninitialized completion when USB3 port got wrong status Realtek USB3.0 Card Reader [0bda:0328] reports wrong port status on Cannon lake PCH USB3.1 xHCI [8086:a36d] after resume from S3, after clear port reset it works fine. Since this device is registered on USB3 roothub at boot, when port status reports not superspeed, xhci_get_port_status will call an uninitialized completion in bus_state[0]. Kernel will hang because of NULL pointer. Restrict the USB2 resume status check in USB2 roothub to fix hang issue. Cc: stable@vger.kernel.org Signed-off-by: Aaron Ma Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman commit d9193efba84fe4c4aa22a569fade5e6ca971f8af Author: Sandeep Singh Date: Fri Nov 9 17:21:19 2018 +0200 xhci: Add check for invalid byte size error when UAS devices are connected. Observed "TRB completion code (27)" error which corresponds to Stopped - Length Invalid error(xhci spec section 4.17.4) while connecting USB to SATA bridge. Looks like this case was not considered when the following patch[1] was committed. Hence adding this new check which can prevent the invalid byte size error. [1] ade2e3a xhci: handle transfer events without TRB pointer Cc: Signed-off-by: Sandeep Singh cc: Nehal Shah cc: Shyam Sundar S K Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman commit 1245374e9b8340fc255fd51b2015173a83050d03 Author: Mathias Nyman Date: Fri Nov 9 17:21:18 2018 +0200 xhci: handle port status events for removed USB3 hcd At xhci removal the USB3 hcd (shared_hcd) is removed before the primary USB2 hcd. Interrupts for port status changes may still occur for USB3 ports after the shared_hcd is freed, causing NULL pointer dereference. Check if xhci->shared_hcd is still valid before handing USB3 port events Cc: Reported-by: Peter Chen Tested-by: Jack Pham Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman commit f068090426ea8d72c408ebd42953a82a88e2282c Author: Mathias Nyman Date: Fri Nov 9 17:21:17 2018 +0200 xhci: Fix leaking USB3 shared_hcd at xhci removal Ensure that the shared_hcd pointer is valid when calling usb_put_hcd() The shared_hcd is removed and freed in xhci by first calling usb_remove_hcd(xhci->shared_hcd), and later usb_put_hcd(xhci->shared_hcd) Afer commit fe190ed0d602 ("xhci: Do not halt the host until both HCD have disconnected their devices.") the shared_hcd was never properly put as xhci->shared_hcd was set to NULL before usb_put_hcd(xhci->shared_hcd) was called. shared_hcd (USB3) is removed before primary hcd (USB2). While removing the primary hcd we might need to handle xhci interrupts to cleanly remove last USB2 devices, therefore we need to set xhci->shared_hcd to NULL before removing the primary hcd to let xhci interrupt handler know shared_hcd is no longer available. xhci-plat.c, xhci-histb.c and xhci-mtk first create both their hcd's before adding them. so to keep the correct reverse removal order use a temporary shared_hcd variable for them. For more details see commit 4ac53087d6d4 ("usb: xhci: plat: Create both HCDs before adding them") Fixes: fe190ed0d602 ("xhci: Do not halt the host until both HCD have disconnected their devices.") Cc: Joel Stanley Cc: Chunfeng Yun Cc: Thierry Reding Cc: Jianguo Sun Cc: Reported-by: Jack Pham Tested-by: Jack Pham Tested-by: Peter Chen Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman commit 8588eac3ff66e77fb681591714fd76da3a4da80d Author: Vignesh R Date: Thu Sep 27 10:31:46 2018 +0530 arm64: dts: ti: k3-am654: Fix wakeup_uart reg address cbass_wakeup interconnect which is the parent of wakeup_uart node defines address-cells=1 and size-cells=1, therefore fix up reg property of wakeup_uart node accordingly. Otherwise, this UART instance fails to probe if enabled. Fixes: 4201af2544b3 ("arm64: dts: ti: am654: Add uart nodes") Signed-off-by: Vignesh R Reviewed-by: Lokesh Vutla Signed-off-by: Tero Kristo commit 848bd3f3de9d44950c00eda6c115e8e9785440da Author: Stephen Boyd Date: Fri Nov 2 13:57:32 2018 -0700 i2c: qcom-geni: Fix runtime PM mismatch with child devices We need to enable runtime PM on this i2c controller before populating child devices with i2c_add_adapter(). Otherwise, if a child device uses runtime PM and stays runtime PM enabled we'll get the following warning at boot. Enabling runtime PM for inactive device (a98000.i2c) with active children [...] Call trace: pm_runtime_enable+0xd8/0xf8 geni_i2c_probe+0x440/0x460 platform_drv_probe+0x74/0xc8 [...] Let's move the runtime PM enabling and setup to before we add the adapter, so that this device can respond to runtime PM requests from children. Fixes: 37692de5d523 ("i2c: i2c-qcom-geni: Add bus driver for the Qualcomm GENI I2C controller") Signed-off-by: Stephen Boyd Reviewed-by: Douglas Anderson Signed-off-by: Wolfram Sang commit 350784e79230f85e9007c4c7d8b2259717d67a4d Author: Vignesh R Date: Fri Nov 9 16:44:12 2018 +0530 MAINTAINERS: Add entry for i2c-omap driver Add separate entry for i2c-omap and add my name as maintainer for this driver. Signed-off-by: Vignesh R Acked-by: Tony Lindgren Signed-off-by: Wolfram Sang commit 5b277402deac0691226a947df71c581686bd4020 Author: Vignesh R Date: Fri Nov 9 16:44:11 2018 +0530 i2c: omap: Enable for ARCH_K3 Allow I2C_OMAP to be built for K3 platforms. Signed-off-by: Vignesh R Reviewed-by: Grygorii Strashko Signed-off-by: Wolfram Sang commit ab214c48387aaaadcf8246b4b00d8b78286fde1b Author: Vignesh R Date: Fri Nov 9 16:44:10 2018 +0530 dt-bindings: i2c: omap: Add new compatible for AM654 SoCs AM654 SoCs have same I2C IP as OMAP SoCs. Add new compatible to handle AM654 SoCs. While at that reformat the existing compatible list for older SoCs to list one valid compatible per line. Signed-off-by: Vignesh R Reviewed-by: Rob Herring Reviewed-by: Grygorii Strashko Signed-off-by: Wolfram Sang commit 55059f2b7f868cd43b3ad30e28e18347e1b46ace Author: Oleksij Rempel Date: Tue Sep 18 11:40:38 2018 +0200 can: rx-offload: introduce can_rx_offload_get_echo_skb() and can_rx_offload_queue_sorted() functions Current CAN framework can't guarantee proper/chronological order of RX and TX-ECHO messages. To make this possible, drivers should use this functions instead of can_get_echo_skb(). Signed-off-by: Oleksij Rempel Cc: linux-stable Signed-off-by: Marc Kleine-Budde commit 7da11ba5c5066dadc2e96835a6233d56d7b7764a Author: Marc Kleine-Budde Date: Wed Oct 31 14:15:13 2018 +0100 can: dev: __can_get_echo_skb(): print error message, if trying to echo non existing skb Prior to echoing a successfully transmitted CAN frame (by calling can_get_echo_skb()), CAN drivers have to put the CAN frame (by calling can_put_echo_skb() in the transmit function). These put and get function take an index as parameter, which is used to identify the CAN frame. A driver calling can_get_echo_skb() with a index not pointing to a skb is a BUG, so add an appropriate error message. Cc: linux-stable Signed-off-by: Marc Kleine-Budde commit e7a6994d043a1e31d5b17706a22ce33d2a3e4cdc Author: Marc Kleine-Budde Date: Wed Oct 31 14:05:26 2018 +0100 can: dev: __can_get_echo_skb(): Don't crash the kernel if can_priv::echo_skb is accessed out of bounds If the "struct can_priv::echo_skb" is accessed out of bounds would lead to a kernel crash. Better print a sensible warning message instead and try to recover. Cc: linux-stable Signed-off-by: Marc Kleine-Budde commit 200f5c49f7a2cd694436bfc6cb0662b794c96736 Author: Marc Kleine-Budde Date: Wed Oct 31 11:08:21 2018 +0100 can: dev: __can_get_echo_skb(): replace struct can_frame by canfd_frame to access frame length This patch replaces the use of "struct can_frame::can_dlc" by "struct canfd_frame::len" to access the frame's length. As it is ensured that both structures have a compatible memory layout for this member this is no functional change. Futher, this compatibility is documented in a comment. Cc: linux-stable Signed-off-by: Marc Kleine-Budde commit a4310fa2f24687888ce80fdb0e88583561a23700 Author: Marc Kleine-Budde Date: Wed Oct 31 10:37:46 2018 +0100 can: dev: can_get_echo_skb(): factor out non sending code to __can_get_echo_skb() This patch factors out all non sending parts of can_get_echo_skb() into a seperate function __can_get_echo_skb(), so that it can be re-used in an upcoming patch. Cc: linux-stable Signed-off-by: Marc Kleine-Budde commit e05237f9da42ee52e73acea0bb082d788e111229 Author: Marc Kleine-Budde Date: Fri Nov 9 15:01:50 2018 +0100 can: flexcan: remove not needed struct flexcan_priv::tx_mb and struct flexcan_priv::tx_mb_idx The previous patch changes the TX path to always use the last mailbox regardless of the used offload scheme (rx-fifo or timestamp based). This means members "tx_mb" and "tx_mb_idx" of the struct flexcan_priv don't depend on the offload scheme, so replace them by compile time constants. Cc: linux-stable Signed-off-by: Marc Kleine-Budde commit cbffaf7aa09edbaea2bc7dc440c945297095e2fd Author: Alexander Stein Date: Thu Oct 11 17:01:25 2018 +0200 can: flexcan: Always use last mailbox for TX Essentially this patch moves the TX mailbox to position 63, regardless of timestamp based offloading or RX FIFO. So mainly the iflag register usage regarding TX has changed. The rest is consolidating RX FIFO and timestamp offloading as they now use both the same TX mailbox. The reason is a very annoying behavior regarding sending RTR frames when _not_ using RX FIFO: If a TX mailbox sent a RTR frame it becomes a RX mailbox. For that reason flexcan_irq disables the TX mailbox again. But if during the time the RTR was sent and the TX mailbox is disabled a new CAN frames is received, it is lost without notice. The reason is that so-called "Move-in" process starts from the lowest mailbox which happen to be a TX mailbox set to EMPTY. Steps to reproduce (I used an imx7d): 1. generate regular bursts of messages 2. send a RTR from flexcan with higher priority than burst messages every 1ms, e.g. cangen -I 0x100 -L 0 -g 1 -R can0 3. notice a lost message without notification after some seconds When running an iperf in parallel this problem is occurring even more frequently. Using filters is not possible as at least one single CAN-ID is allowed. Handling the TX MB during RX is also not possible as there is no race-free disable of RX MB. There is still a slight window when the described problem can occur. But for that all RX MB must be in use which is essentially next to an overrun. Still there will be no indication if it ever occurs. Signed-off-by: Alexander Stein Cc: linux-stable Signed-off-by: Marc Kleine-Budde commit 5178b7cd8e42448b1041716f124734eaaa36ca50 Author: Pankaj Bansal Date: Wed Aug 1 19:36:46 2018 +0530 can: flexcan: Unlock the MB unconditionally Unlock the MB irrespective of reception method being FIFO or timestamp based. It is optional but recommended to unlock Mailbox as soon as possible and make it available for reception. Reported-by: Alexander Stein Signed-off-by: Pankaj Bansal Cc: linux-stable Signed-off-by: Marc Kleine-Budde commit f164d0204b1156a7e0d8d1622c1a8d25752befec Author: Lukas Wunner Date: Sat Oct 27 10:36:54 2018 +0200 can: hi311x: Use level-triggered interrupt If the hi3110 shares the SPI bus with another traffic-intensive device and packets are received in high volume (by a separate machine sending with "cangen -g 0 -i -x"), reception stops after a few minutes and the counter in /proc/interrupts stops incrementing. Bus state is "active". Bringing the interface down and back up reconvenes the reception. The issue is not observed when the hi3110 is the sole device on the SPI bus. Using a level-triggered interrupt makes the issue go away and lets the hi3110 successfully receive 2 GByte over the course of 5 days while a ks8851 Ethernet chip on the same SPI bus handles 6 GByte of traffic. Unfortunately the hi3110 datasheet is mum on the trigger type. The pin description on page 3 only specifies the polarity (active high): http://www.holtic.com/documents/371-hi-3110_v-rev-kpdf.do Cc: Mathias Duckeck Cc: Akshay Bhat Cc: Casey Fitzpatrick Signed-off-by: Lukas Wunner Cc: linux-stable Signed-off-by: Marc Kleine-Budde commit 868b7c0f43e61f227bf3d7f7d6134bb3c67bb0e8 Author: Fabrizio Castro Date: Mon Sep 10 11:43:14 2018 +0100 dt-bindings: can: rcar_can: Add r8a774a1 support Document RZ/G2M (r8a774a1) SoC specific bindings. Signed-off-by: Fabrizio Castro Signed-off-by: Chris Paterson Reviewed-by: Biju Das Reviewed-by: Rob Herring Reviewed-by: Simon Horman Signed-off-by: Marc Kleine-Budde commit 68c8d209cd4337da4fa04c672f0b62bb735969bc Author: Fabrizio Castro Date: Mon Sep 10 11:43:13 2018 +0100 can: rcar_can: Fix erroneous registration Assigning 2 to "renesas,can-clock-select" tricks the driver into registering the CAN interface, even though we don't want that. This patch improves one of the checks to prevent that from happening. Fixes: 862e2b6af9413b43 ("can: rcar_can: support all input clocks") Signed-off-by: Fabrizio Castro Signed-off-by: Chris Paterson Reviewed-by: Simon Horman Signed-off-by: Marc Kleine-Budde commit 4f145f14f6b98b5aa0dd91bdae518b3f24f74b37 Author: Eugeniu Rosca Date: Mon Aug 20 16:49:10 2018 +0200 dt-bindings: can: rcar_can: document r8a77965 support Document the support for rcar_can on R8A77965 SoC devices. Add R8A77965 to the list of SoCs which require the "assigned-clocks" and "assigned-clock-rates" properties (thanks, Sergei). Signed-off-by: Eugeniu Rosca Reviewed-by: Simon Horman Reviewed-by: Kieran Bingham Reviewed-by: Rob Herring Signed-off-by: Marc Kleine-Budde commit ff1f19d56c200b35eb07cfa6668aa6dcac198cec Author: YueHaibing Date: Wed Aug 29 01:25:45 2018 +0000 can: ucan: remove duplicated include from ucan.c Remove duplicated include. Signed-off-by: YueHaibing Reviewed-by: Martin Elshuber Signed-off-by: Marc Kleine-Budde commit 207681fc5f3d5d398f106d1ae0080fc2373f707a Author: YueHaibing Date: Wed Aug 29 01:46:54 2018 +0000 can: ucan: remove set but not used variable 'udev' Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/can/usb/ucan.c: In function 'ucan_disconnect': drivers/net/can/usb/ucan.c:1578:21: warning: variable 'udev' set but not used [-Wunused-but-set-variable] struct usb_device *udev; Signed-off-by: YueHaibing Reviewed-by: Martin Elshuber Signed-off-by: Marc Kleine-Budde commit e13fb9b37cc00616b90df2d620f30345b5ada6ff Author: Jimmy Assarsson Date: Mon Aug 6 15:14:49 2018 +0200 can: kvaser_usb: Fix accessing freed memory in kvaser_usb_start_xmit() The call to can_put_echo_skb() may result in the skb being freed. The skb is later used in the call to dev->ops->dev_frame_to_cmd(). This is avoided by moving the call to can_put_echo_skb() after dev->ops->dev_frame_to_cmd(). Reported-by: Dan Carpenter Signed-off-by: Jimmy Assarsson Cc: linux-stable Signed-off-by: Marc Kleine-Budde commit 95217260649aa504eb5d4a0d50959ca4e67c8f96 Author: Jimmy Assarsson Date: Mon Aug 6 15:14:50 2018 +0200 can: kvaser_usb: Fix potential uninitialized variable use If alloc_can_err_skb() fails, cf is never initialized. Move assignment of cf inside check. Reported-by: Dan Carpenter Signed-off-by: Jimmy Assarsson Cc: linux-stable Signed-off-by: Marc Kleine-Budde commit a43608fa77213ad5ac5f75994254b9f65d57cfa0 Author: Oliver Hartkopp Date: Wed Oct 24 10:27:12 2018 +0200 can: raw: check for CAN FD capable netdev in raw_sendmsg() When the socket is CAN FD enabled it can handle CAN FD frame transmissions. Add an additional check in raw_sendmsg() as a CAN2.0 CAN driver (non CAN FD) should never see a CAN FD frame. Due to the commonly used can_dropped_invalid_skb() function the CAN 2.0 driver would drop that CAN FD frame anyway - but with this patch the user gets a proper -EINVAL return code. Signed-off-by: Oliver Hartkopp Cc: linux-stable Signed-off-by: Marc Kleine-Budde commit 3941552aec1e04d63999988a057ae09a1c56ebeb Author: Juergen Gross Date: Thu Nov 1 13:33:07 2018 +0100 xen: remove size limit of privcmd-buf mapping interface Currently the size of hypercall buffers allocated via /dev/xen/hypercall is limited to a default of 64 memory pages. For live migration of guests this might be too small as the page dirty bitmask needs to be sized according to the size of the guest. This means migrating a 8GB sized guest is already exhausting the default buffer size for the dirty bitmap. There is no sensible way to set a sane limit, so just remove it completely. The device node's usage is limited to root anyway, so there is no additional DOS scenario added by allowing unlimited buffers. While at it make the error path for the -ENOMEM case a little bit cleaner by setting n_pages to the number of successfully allocated pages instead of the target size. Fixes: c51b3c639e01f2 ("xen: add new hypercall buffer mapping device") Cc: #4.18 Signed-off-by: Juergen Gross Reviewed-by: Boris Ostrovsky Signed-off-by: Juergen Gross commit d3132b3860f6cf35ff7609a76bbcdbb814bd027c Author: Juergen Gross Date: Thu Nov 8 08:35:06 2018 +0100 xen: fix xen_qlock_wait() Commit a856531951dc80 ("xen: make xen_qlock_wait() nestable") introduced a regression for Xen guests running fully virtualized (HVM or PVH mode). The Xen hypervisor wouldn't return from the poll hypercall with interrupts disabled in case of an interrupt (for PV guests it does). So instead of disabling interrupts in xen_qlock_wait() use a nesting counter to avoid calling xen_clear_irq_pending() in case xen_qlock_wait() is nested. Fixes: a856531951dc80 ("xen: make xen_qlock_wait() nestable") Cc: stable@vger.kernel.org Reported-by: Sander Eikelenboom Signed-off-by: Juergen Gross Reviewed-by: Boris Ostrovsky Tested-by: Sander Eikelenboom Signed-off-by: Juergen Gross commit 278df5e5527b633f4882f1680ad58b62a7c07bfe Author: Vasily Khoruzhick Date: Thu Nov 8 20:31:35 2018 -0800 ASoC: sun8i-codec: fix crash on module removal drvdata is actually sun8i_codec, not snd_soc_card, so it crashes when calling snd_soc_card_get_drvdata(). Drop card and scodec vars anyway since we don't need to disable/unprepare clocks - it's already done by calling runtime_suspend() Drop clk_disable_unprepare() calls for the same reason. Fixes: 36c684936fae7 ("ASoC: Add sun8i digital audio codec") Signed-off-by: Vasily Khoruzhick Acked-by: Maxime Ripard Signed-off-by: Mark Brown commit ebacb81273599555a7a19f7754a1451206a5fc4f Author: Lukas Czerner Date: Fri Nov 9 14:51:46 2018 +0100 fuse: fix use-after-free in fuse_direct_IO() In async IO blocking case the additional reference to the io is taken for it to survive fuse_aio_complete(). In non blocking case this additional reference is not needed, however we still reference io to figure out whether to wait for completion or not. This is wrong and will lead to use-after-free. Fix it by storing blocking information in separate variable. This was spotted by KASAN when running generic/208 fstest. Signed-off-by: Lukas Czerner Reported-by: Zorro Lang Signed-off-by: Miklos Szeredi Fixes: 744742d692e3 ("fuse: Add reference counting for fuse_io_priv") Cc: # v4.6 commit 2d84a2d19b6150c6dbac1e6ebad9c82e4c123772 Author: Miklos Szeredi Date: Fri Nov 9 15:52:16 2018 +0100 fuse: fix possibly missed wake-up after abort In current fuse_drop_waiting() implementation it's possible that fuse_wait_aborted() will not be woken up in the unlikely case that fuse_abort_conn() + fuse_wait_aborted() runs in between checking fc->connected and calling atomic_dec(&fc->num_waiting). Do the atomic_dec_and_test() unconditionally, which also provides the necessary barrier against reordering with the fc->connected check. The explicit smp_mb() in fuse_wait_aborted() is not actually needed, since the spin_unlock() in fuse_abort_conn() provides the necessary RELEASE barrier after resetting fc->connected. However, this is not a performance sensitive path, and adding the explicit barrier makes it easier to document. Signed-off-by: Miklos Szeredi Fixes: b8f95e5d13f5 ("fuse: umount should wait for all requests") Cc: #v4.19 commit 7fabaf303458fcabb694999d6fa772cc13d4e217 Author: Miklos Szeredi Date: Fri Nov 9 15:52:16 2018 +0100 fuse: fix leaked notify reply fuse_request_send_notify_reply() may fail if the connection was reset for some reason (e.g. fs was unmounted). Don't leak request reference in this case. Besides leaking memory, this resulted in fc->num_waiting not being decremented and hence fuse_wait_aborted() left in a hanging and unkillable state. Fixes: 2d45ba381a74 ("fuse: add retrieve request") Fixes: b8f95e5d13f5 ("fuse: umount should wait for all requests") Reported-and-tested-by: syzbot+6339eda9cb4ebbc4c37b@syzkaller.appspotmail.com Signed-off-by: Miklos Szeredi Cc: #v2.6.36 commit 34ffec60b27aa81d04e274e71e4c6ef740f75fc7 Author: Ming Lei Date: Mon Oct 29 20:57:19 2018 +0800 block: make sure writesame bio is aligned with logical block size Obviously the created writesame bio has to be aligned with logical block size, and use bio_allowed_max_sectors() to retrieve this number. Cc: stable@vger.kernel.org Cc: Mike Snitzer Cc: Christoph Hellwig Cc: Xiao Ni Cc: Mariusz Dabrowski Fixes: b49a0871be31a745b2ef ("block: remove split code in blkdev_issue_{discard,write_same}") Tested-by: Rui Salvaterra Signed-off-by: Ming Lei Signed-off-by: Jens Axboe commit ba5d73851e71847ba7f7f4c27a1a6e1f5ab91c79 Author: Ming Lei Date: Mon Oct 29 20:57:18 2018 +0800 block: cleanup __blkdev_issue_discard() Cleanup __blkdev_issue_discard() a bit: - remove local variable of 'end_sect' - remove code block of 'fail' Cc: Mike Snitzer Cc: Christoph Hellwig Cc: Xiao Ni Cc: Mariusz Dabrowski Tested-by: Rui Salvaterra Signed-off-by: Ming Lei Signed-off-by: Jens Axboe commit 1adfc5e4136f5967d591c399aff95b3b035f16b7 Author: Ming Lei Date: Mon Oct 29 20:57:17 2018 +0800 block: make sure discard bio is aligned with logical block size Obviously the created discard bio has to be aligned with logical block size. This patch introduces the helper of bio_allowed_max_sectors() for this purpose. Cc: stable@vger.kernel.org Cc: Mike Snitzer Cc: Christoph Hellwig Cc: Xiao Ni Cc: Mariusz Dabrowski Fixes: 744889b7cbb56a6 ("block: don't deal with discard limit in blkdev_issue_discard()") Fixes: a22c4d7e34402cc ("block: re-add discard_granularity and alignment checks") Reported-by: Rui Salvaterra Tested-by: Rui Salvaterra Signed-off-by: Ming Lei Signed-off-by: Jens Axboe commit d39aa4979219ca3d61c492f7460f1032b97b9ef2 Author: Christoph Hellwig Date: Wed Nov 7 09:20:25 2018 +0100 Revert "nvmet-rdma: use a private workqueue for delete" This reverts commit 2acf70ade79d26b97611a8df52eb22aa33814cd4. The commit never really fixed the intended issue and caused all kinds of other issues, including a use before initialization. Suggested-by: Sagi Grimberg Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 8f676b8508c250bbe255096522fdefb73f1ea0b9 Author: Sagi Grimberg Date: Fri Nov 2 11:22:13 2018 -0700 nvme: make sure ns head inherits underlying device limits Whenever we update ns_head info, we need to make sure it is still compatible with all underlying backing devices because although nvme multipath doesn't have any explicit use of these limits, other devices can still be stacked on top of it which may rely on the underlying limits. Start with unlimited stacking limits, and every info update iterate over siblings and adjust queue limits. Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 21d3bbdd4c342f16eac8d70893e45cdfa3381a1e Author: Sagi Grimberg Date: Fri Nov 2 16:12:21 2018 -0700 nvmet: don't try to add ns to p2p map unless it actually uses it Even without CONFIG_P2PDMA this results in a error print: nvmet: no peer-to-peer memory is available that's supported by rxe0 and /dev/nullb0 Fixes: c6925093d0b2 ("nvmet: Optionally use PCI P2P memory") Signed-off-by: Sagi Grimberg Reviewed-by: Logan Gunthorpe Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 65766ee0bf7fe8b3be80e2e1c3ef54ad59b29476 Author: Takashi Iwai Date: Fri Nov 9 11:59:45 2018 +0100 ALSA: oss: Use kvzalloc() for local buffer allocations PCM OSS layer may allocate a few temporary buffers, one for the core read/write and another for the conversions via plugins. Currently both are allocated via vmalloc(). But as the allocation size is equivalent with the PCM period size, the required size might be quite small, depending on the application. This patch replaces these vmalloc() calls with kvzalloc() for covering small period sizes better. Also, we use "z"-alloc variant here for addressing the possible uninitialized access reported by syzkaller. Reported-by: syzbot+1cb36954e127c98dd037@syzkaller.appspotmail.com Cc: Signed-off-by: Takashi Iwai commit 8561fb31a1f9594e2807681f5c0721894e367f19 Author: Larry Finger Date: Thu Nov 8 23:30:09 2018 -0600 staging: rtl8723bs: Add missing return for cfg80211_rtw_get_station With Androidx86 8.1, wificond returns "failed to get nl80211_sta_info_tx_failed" and wificondControl returns "Invalid signal poll result from wificond". The fix is to OR sinfo->filled with BIT_ULL(NL80211_STA_INFO_TX_FAILED). This missing bit is apparently not needed with NetworkManager, but it does no harm in that case. Reported-and-Tested-by: youling257 Cc: linux-wireless@vger.kernel.org Cc: youling257 Signed-off-by: Larry Finger Cc: stable Signed-off-by: Greg Kroah-Hartman commit 13c45007e0a87e912da21223599583fdea677914 Author: Colin Ian King Date: Fri Nov 9 11:56:45 2018 +0000 staging: most: use format specifier "%s" in snprintf Passing string ch_data_type[i].name as the format specifier is potentially hazardous because it 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. Cleans up clang warning: format string is not a string literal (potentially insecure) [-Wformat-security] Fixes: e7f2b70fd3a9 ("staging: most: replace multiple if..else with table lookup") Signed-off-by: Colin Ian King Cc: stable Signed-off-by: Greg Kroah-Hartman commit 3541833fd1f264e7579e573a6586a1b665da37db Merge: 24ccea7e102d 0bb2ae1b26e1 Author: Linus Torvalds Date: Fri Nov 9 06:30:44 2018 -0600 Merge tag 's390-4.20-2' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 fixes from Martin Schwidefsky: - A fix for the pgtable_bytes misaccounting on s390. The patch changes common code part in regard to page table folding and adds extra checks to mm_[inc|dec]_nr_[pmds|puds]. - Add FORCE for all build targets using if_changed - Use non-loadable phdr for the .vmlinux.info section to avoid a segment overlap that confuses kexec - Cleanup the attribute definition for the diagnostic sampling - Increase stack size for CONFIG_KASAN=y builds - Export __node_distance to fix a build error - Correct return code of a PMU event init function - An update for the default configs * tag 's390-4.20-2' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390/perf: Change CPUM_CF return code in event init function s390: update defconfigs s390/mm: Fix ERROR: "__node_distance" undefined! s390/kasan: increase instrumented stack size to 64k s390/cpum_sf: Rework attribute definition for diagnostic sampling s390/mm: fix mis-accounting of pgtable_bytes mm: add mm_pxd_folded checks to pgtable_bytes accounting functions mm: introduce mm_[p4d|pud|pmd]_folded mm: make the __PAGETABLE_PxD_FOLDED defines non-empty s390: avoid vmlinux segments overlap s390/vdso: add missing FORCE to build targets s390/decompressor: add missing FORCE to build targets commit e7445ceddfc220c1aede6d42758a5acb8844e9c3 Author: Andreas Gruenbacher Date: Thu Nov 8 20:14:29 2018 +0000 gfs2: Fix metadata read-ahead during truncate (2) The previous attempt to fix for metadata read-ahead during truncate was incorrect: for files with a height > 2 (1006989312 bytes with a block size of 4096 bytes), read-ahead requests were not being issued for some of the indirect blocks discovered while walking the metadata tree, leading to significant slow-downs when deleting large files. Fix that. In addition, only issue read-ahead requests in the first pass through the meta-data tree, while deallocating data blocks. Fixes: c3ce5aa9b0 ("gfs2: Fix metadata read-ahead during truncate") Cc: stable@vger.kernel.org # v4.16+ Signed-off-by: Andreas Gruenbacher commit 10283ea525d30f2e99828978fd04d8427876a7ad Author: Andreas Gruenbacher Date: Mon Nov 5 22:57:24 2018 +0000 gfs2: Put bitmap buffers in put_super gfs2_put_super calls gfs2_clear_rgrpd to destroy the gfs2_rgrpd objects attached to the resource group glocks. That function should release the buffers attached to the gfs2_bitmap objects (bi_bh), but the call to gfs2_rgrp_brelse for doing that is missing. When gfs2_releasepage later runs across these buffers which are still referenced, it refuses to free them. This causes the pages the buffers are attached to to remain referenced as well. With enough mount/unmount cycles, the system will eventually run out of memory. Fix this by adding the missing call to gfs2_rgrp_brelse in gfs2_clear_rgrpd. (Also fix a gfs2_rgrp_relse -> gfs2_rgrp_brelse typo in a comment.) Fixes: 39b0f1e92908 ("GFS2: Don't brelse rgrp buffer_heads every allocation") Cc: stable@vger.kernel.org # v4.2+ Signed-off-by: Andreas Gruenbacher commit 595b0674ce781e38522097b18718ce3c3bffc1a1 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 Signed-off-by: Linus Walleij commit a05a14049999598a3bb6fab12db6b768a0215522 Author: Vladimir Zapolskiy Date: Fri Nov 2 15:39:43 2018 +0200 gpio: don't free unallocated ida on gpiochip_add_data_with_key() error path The change corrects the error path in gpiochip_add_data_with_key() by avoiding to call ida_simple_remove(), if ida_simple_get() returns an error. Note that ida_simple_remove()/ida_free() throws a BUG(), if id argument is negative, it allows to easily check the correctness of the fix by fuzzing the return value from ida_simple_get(). Fixes: ff2b13592299 ("gpio: make the gpiochip a real device") Cc: stable@vger.kernel.org # v4.6+ Signed-off-by: Vladimir Zapolskiy Signed-off-by: Linus Walleij commit da85d8bfd1512461bcfb64929e8426cf340b3707 Author: Li Zhijian Date: Mon Nov 5 16:57:48 2018 +0800 kselftests/bpf: use ping6 as the default ipv6 ping binary when it exists At commit deee2cae27d1 ("kselftests/bpf: use ping6 as the default ipv6 ping binary if it exists"), it fixed similar issues for shell script, but it missed a same issue in the C code. Fixes: 371e4fcc9d96 ("selftests/bpf: cgroup local storage-based network counters") Reported-by: kernel test robot Signed-off-by: Li Zhijian CC: Philip Li Signed-off-by: Daniel Borkmann commit 9f4debe38415583086ce814798eeb864aeb39551 Author: Corentin Labbe Date: Sat Nov 3 14:56:01 2018 -0700 crypto: user - Zeroize whole structure given to user space For preventing uninitialized data to be given to user-space (and so leak potential useful data), the crypto_stat structure must be correctly initialized. Reported-by: Dan Carpenter Fixes: cac5818c25d0 ("crypto: user - Implement a generic crypto statistics") Signed-off-by: Corentin Labbe [EB: also fix it in crypto_reportstat_one()] [EB: use sizeof(var) rather than sizeof(type)] Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit f43f39958beb206b53292801e216d9b8a660f087 Author: Eric Biggers Date: Sat Nov 3 14:56:00 2018 -0700 crypto: user - fix leaking uninitialized memory to userspace All bytes of the NETLINK_CRYPTO report structures must be initialized, since they are copied to userspace. The change from strncpy() to strlcpy() broke this. As a minimal fix, change it back. Fixes: 4473710df1f8 ("crypto: user - Prepare for CRYPTO_MAX_ALG_NAME expansion") Cc: # v4.12+ Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 508a1c4df085a547187eed346f1bfe5e381797f1 Author: Ard Biesheuvel Date: Thu Nov 8 23:55:16 2018 +0100 crypto: simd - correctly take reqsize of wrapped skcipher into account The simd wrapper's skcipher request context structure consists of a single subrequest whose size is taken from the subordinate skcipher. However, in simd_skcipher_init(), the reqsize that is retrieved is not from the subordinate skcipher but from the cryptd request structure, whose size is completely unrelated to the actual wrapped skcipher. Reported-by: Qian Cai Signed-off-by: Ard Biesheuvel Tested-by: Qian Cai Signed-off-by: Herbert Xu commit 0b0cf6af3f3151c26c27e8e51def5527091c3e69 Author: John Garry Date: Mon Nov 5 20:35:15 2018 +0800 crypto: hisilicon - Fix reference after free of memories on error path coccicheck currently warns of the following issues in the driver: drivers/crypto/hisilicon/sec/sec_algs.c:864:51-66: ERROR: reference preceded by free on line 812 drivers/crypto/hisilicon/sec/sec_algs.c:864:40-49: ERROR: reference preceded by free on line 813 drivers/crypto/hisilicon/sec/sec_algs.c:861:8-24: ERROR: reference preceded by free on line 814 drivers/crypto/hisilicon/sec/sec_algs.c:860:41-51: ERROR: reference preceded by free on line 815 drivers/crypto/hisilicon/sec/sec_algs.c:867:7-18: ERROR: reference preceded by free on line 816 It would appear than on certain error paths that we may attempt reference- after-free some memories. This patch fixes those issues. The solution doesn't look perfect, but having same memories free'd possibly from separate functions makes it tricky. Fixes: 915e4e8413da ("crypto: hisilicon - SEC security accelerator driver") Reviewed-by: Jonathan Cameron Cc: Signed-off-by: John Garry Signed-off-by: Herbert Xu commit 68a031d22c57b94870ba13513c9d93b8a8119ab2 Author: John Garry Date: Mon Nov 5 20:35:14 2018 +0800 crypto: hisilicon - Fix NULL dereference for same dst and src When the source and destination addresses for the cipher are the same, we will get a NULL dereference from accessing the split destination scatterlist memories, as shown: [ 56.565719] tcrypt: [ 56.565719] testing speed of async ecb(aes) (hisi_sec_aes_ecb) encryption [ 56.574683] tcrypt: test 0 (128 bit key, 16 byte blocks): [ 56.587585] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000 [ 56.596361] Mem abort info: [ 56.599151] ESR = 0x96000006 [ 56.602196] Exception class = DABT (current EL), IL = 32 bits [ 56.608105] SET = 0, FnV = 0 [ 56.611149] EA = 0, S1PTW = 0 [ 56.614280] Data abort info: [ 56.617151] ISV = 0, ISS = 0x00000006 [ 56.620976] CM = 0, WnR = 0 [ 56.623930] user pgtable: 4k pages, 48-bit VAs, pgdp = (____ptrval____) [ 56.630533] [0000000000000000] pgd=0000041fc7e4d003, pud=0000041fcd9bf003, pmd=0000000000000000 [ 56.639224] Internal error: Oops: 96000006 [#1] PREEMPT SMP [ 56.644782] Modules linked in: tcrypt(+) [ 56.648695] CPU: 21 PID: 2326 Comm: insmod Tainted: G W 4.19.0-rc6-00001-g3fabfb8-dirty #716 [ 56.658420] Hardware name: Huawei Taishan 2280 /D05, BIOS Hisilicon D05 IT17 Nemo 2.0 RC0 10/05/2018 [ 56.667537] pstate: 20000005 (nzCv daif -PAN -UAO) [ 56.672322] pc : sec_alg_skcipher_crypto+0x318/0x748 [ 56.677274] lr : sec_alg_skcipher_crypto+0x178/0x748 [ 56.682224] sp : ffff0000118e3840 [ 56.685525] x29: ffff0000118e3840 x28: ffff841fbb3f8118 [ 56.690825] x27: 0000000000000000 x26: 0000000000000000 [ 56.696125] x25: ffff841fbb3f8080 x24: ffff841fbadc0018 [ 56.701425] x23: ffff000009119000 x22: ffff841fbb24e280 [ 56.706724] x21: ffff841ff212e780 x20: ffff841ff212e700 [ 56.712023] x19: 0000000000000001 x18: ffffffffffffffff [ 56.717322] x17: 0000000000000000 x16: 0000000000000000 [ 56.722621] x15: ffff0000091196c8 x14: 72635f7265687069 [ 56.727920] x13: 636b735f676c615f x12: ffff000009119940 [ 56.733219] x11: 0000000000000000 x10: 00000000006080c0 [ 56.738519] x9 : 0000000000000000 x8 : ffff841fbb24e480 [ 56.743818] x7 : ffff841fbb24e500 x6 : ffff841ff00cdcc0 [ 56.749117] x5 : 0000000000000010 x4 : 0000000000000000 [ 56.754416] x3 : ffff841fbb24e380 x2 : ffff841fbb24e480 [ 56.759715] x1 : 0000000000000000 x0 : ffff000008f682c8 [ 56.765016] Process insmod (pid: 2326, stack limit = 0x(____ptrval____)) [ 56.771702] Call trace: [ 56.774136] sec_alg_skcipher_crypto+0x318/0x748 [ 56.778740] sec_alg_skcipher_encrypt+0x10/0x18 [ 56.783259] test_skcipher_speed+0x2a0/0x700 [tcrypt] [ 56.788298] do_test+0x18f8/0x48c8 [tcrypt] [ 56.792469] tcrypt_mod_init+0x60/0x1000 [tcrypt] [ 56.797161] do_one_initcall+0x5c/0x178 [ 56.800985] do_init_module+0x58/0x1b4 [ 56.804721] load_module+0x1da4/0x2150 [ 56.808456] __se_sys_init_module+0x14c/0x1e8 [ 56.812799] __arm64_sys_init_module+0x18/0x20 [ 56.817231] el0_svc_common+0x60/0xe8 [ 56.820880] el0_svc_handler+0x2c/0x80 [ 56.824615] el0_svc+0x8/0xc [ 56.827483] Code: a94c87a3 910b2000 f87b7842 f9004ba2 (b87b7821) [ 56.833564] ---[ end trace 0f63290590e93d94 ]--- Segmentation fault Fix this by only accessing these memories when we have different src and dst. Fixes: 915e4e8413da ("crypto: hisilicon - SEC security accelerator driver") Reviewed-by: Jonathan Cameron Cc: Signed-off-by: John Garry Signed-off-by: Herbert Xu commit 113f3aaa81bd56aba02659786ed65cbd9cb9a6fc Author: Sriram R Date: Fri Oct 19 14:42:59 2018 +0530 cfg80211: Prevent regulatory restore during STA disconnect in concurrent interfaces Currently when an AP and STA interfaces are active in the same or different radios, regulatory settings are restored whenever the STA disconnects. This restores all channel information including dfs states in all radios. For example, if an AP interface is active in one radio and STA in another, when radar is detected on the AP interface, the dfs state of the channel will be changed to UNAVAILABLE. But when the STA interface disconnects, this issues a regulatory disconnect hint which restores all regulatory settings in all the radios attached and thereby losing the stored dfs state on the other radio where the channel was marked as unavailable earlier. Hence prevent such regulatory restore whenever another active beaconing interface is present in the same or other radios. Signed-off-by: Sriram R Signed-off-by: Johannes Berg commit 03b738625b1e58f4ae2bddf04706ab85c677af2d Author: Johannes Berg Date: Tue Oct 30 09:17:45 2018 +0100 mac80211: fix CSA beacon allocation size If the FTM responder settings are changed simultaneously with the CSA beacon, the buffer size allocated isn't sufficient and we'll have a heap overrun. Fix this. While at it, also clean up the ftm_responder assignment, doing it only if ftm_responder is non-zero is valid as it's 0 to start with, but not really useful to understand the code. Fixes: bc847970f432 ("mac80211: support FTM responder configuration/statistics") Signed-off-by: Johannes Berg commit c177db2d0d5e751d52d3827b8cfdb6ef92a95a2d Author: Johannes Berg Date: Tue Oct 30 09:17:44 2018 +0100 cfg80211/mac80211: fix FTM settings across CSA When FTM is enabled, doing a CSA will unexpectedly lose it since the value of ftm_responder may be initialized to 0 instead of -1, so fix that. Fixes: 81e54d08d9d8 ("cfg80211: support FTM responder configuration/statistics") Signed-off-by: Johannes Berg commit 5c21e8100dfd57c806e833ae905e26efbb87840f Author: Ben Greear Date: Tue Oct 23 13:36:52 2018 -0700 mac80211: Clear beacon_int in ieee80211_do_stop This fixes stale beacon-int values that would keep a netdev from going up. To reproduce: Create two VAP on one radio. vap1 has beacon-int 100, start it. vap2 has beacon-int 240, start it (and it will fail because beacon-int mismatch). reconfigure vap2 to have beacon-int 100 and start it. It will fail because the stale beacon-int 240 will be used in the ifup path and hostapd never gets a chance to set the new beacon interval. Cc: stable@vger.kernel.org Signed-off-by: Ben Greear Signed-off-by: Johannes Berg commit c752cac9db1b0c469db7ba9d17af4ba708984db5 Author: Yan-Hsuan Chuang Date: Tue Oct 23 11:24:44 2018 +0800 mac80211: fix GFP_KERNEL under tasklet context cfg80211_sta_opmode_change_notify needs a gfp_t flag to hint the nl80211 stack when allocating new skb, but it is called under tasklet context here with GFP_KERNEL and kernel will yield a warning about it. Cc: stable@vger.kernel.org Fixes: ff84e7bfe176 ("mac80211: Add support to notify ht/vht opmode modification.") Signed-off-by: Yan-Hsuan Chuang ACKed-by: Larry Finger Signed-off-by: Johannes Berg commit 81c5dce2cd0bb0ecb61b6212410da5eb78cd8f79 Author: Sergey Matyukevich Date: Fri Oct 19 15:40:13 2018 +0000 cfg80211: add missing constraint for user-supplied VHT mask Do a logical vht_capa &= vht_capa_mask of user-supplied VHT mask with the driver-supplied mask of modifiable VHT capabilities. Fix whitespaces and comment typos. Signed-off-by: Sergey Matyukevich Signed-off-by: Johannes Berg commit a1881c9b8a1edef0a5ae1d5c1b61406fe3402114 Author: Vasyl Vavrychuk Date: Thu Oct 18 01:02:12 2018 +0300 mac80211_hwsim: Timer should be initialized before device registered Otherwise if network manager starts configuring Wi-Fi interface immidiatelly after getting notification of its creation, we will get NULL pointer dereference: BUG: unable to handle kernel NULL pointer dereference at (null) IP: [] hrtimer_active+0x28/0x50 ... Call Trace: [] ? hrtimer_try_to_cancel+0x27/0x110 [] ? hrtimer_cancel+0x15/0x20 [] ? mac80211_hwsim_config+0x140/0x1c0 [mac80211_hwsim] Cc: stable@vger.kernel.org Signed-off-by: Vasyl Vavrychuk Signed-off-by: Johannes Berg commit 33483a6b88e4c4c3fc50178b185da52c55288b95 Author: Wei Yongjun Date: Tue Oct 16 02:35:30 2018 +0000 mac80211: fix missing unlock on error in ieee80211_mark_sta_auth() Add the missing unlock before return from function ieee80211_mark_sta_auth() in the error handling case. Cc: stable@vger.kernel.org Fixes: fc107a933071 ("mac80211: Helper function for marking STA authenticated") Signed-off-by: Wei Yongjun [use result variable/label instead of duplicating] Signed-off-by: Johannes Berg commit 05cc09de4c017663a217630682041066f2f9a5cd Author: Alexey Khoroshilov Date: Fri Oct 5 23:22:06 2018 +0300 mac80211_hwsim: fix module init error paths for netlink There is no unregister netlink notifier and family on error paths in init_mac80211_hwsim(). Also there is an error path where hwsim_class is not destroyed. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov Fixes: 62759361eb49 ("mac80211-hwsim: Provide multicast event for HWSIM_CMD_NEW_RADIO") Signed-off-by: Johannes Berg commit f98e46a251d04e1f9a7a14a7f2d166b34da525e5 Author: Quentin Monnet Date: Thu Nov 8 11:52:28 2018 +0000 tools: bpftool: update references to other man pages in documentation Update references to other bpftool man pages at the bottom of each manual page. Also reference the "bpf(2)" and "bpf-helpers(7)" man pages. References are sorted by number of man section, then by "prog-and-map-go-first", the other pages in alphabetical order. Signed-off-by: Quentin Monnet Reviewed-by: Jakub Kicinski Signed-off-by: Daniel Borkmann commit f120919f9905a2cad9dea792a28a11fb623f72c1 Author: Quentin Monnet Date: Thu Nov 8 11:52:27 2018 +0000 tools: bpftool: pass an argument to silence open_obj_pinned() Function open_obj_pinned() prints error messages when it fails to open a link in the BPF virtual file system. However, in some occasions it is not desirable to print an error, for example when we parse all links under the bpffs root, and the error is due to some paths actually being symbolic links. Example output: # ls -l /sys/fs/bpf/ lrwxrwxrwx 1 root root 0 Oct 18 19:00 ip -> /sys/fs/bpf/tc/ drwx------ 3 root root 0 Oct 18 19:00 tc lrwxrwxrwx 1 root root 0 Oct 18 19:00 xdp -> /sys/fs/bpf/tc/ # bpftool --bpffs prog show Error: bpf obj get (/sys/fs/bpf): Permission denied Error: bpf obj get (/sys/fs/bpf): Permission denied # strace -e bpf bpftool --bpffs prog show bpf(BPF_OBJ_GET, {pathname="/sys/fs/bpf/ip", bpf_fd=0}, 72) = -1 EACCES (Permission denied) Error: bpf obj get (/sys/fs/bpf): Permission denied bpf(BPF_OBJ_GET, {pathname="/sys/fs/bpf/xdp", bpf_fd=0}, 72) = -1 EACCES (Permission denied) Error: bpf obj get (/sys/fs/bpf): Permission denied ... To fix it, pass a bool as a second argument to the function, and prevent it from printing an error when the argument is set to true. Signed-off-by: Quentin Monnet Reviewed-by: Jakub Kicinski Signed-off-by: Daniel Borkmann commit a8bfd2bc29f3bf35c7b588b102662375b0184475 Author: Quentin Monnet Date: Thu Nov 8 11:52:26 2018 +0000 tools: bpftool: fix plain output and doc for --bpffs option Edit the documentation of the -f|--bpffs option to make it explicit that it dumps paths of pinned programs when bpftool is used to list the programs only, so that users do not believe they will see the name of the newly pinned program with "bpftool prog pin" or "bpftool prog load". Also fix the plain output: do not add a blank line after each program block, in order to remain consistent with what bpftool does when the option is not passed. Signed-off-by: Quentin Monnet Reviewed-by: Jakub Kicinski Signed-off-by: Daniel Borkmann commit 53909030aa29bffe1f8490df62176c2375135652 Author: Quentin Monnet Date: Thu Nov 8 11:52:25 2018 +0000 tools: bpftool: prevent infinite loop in get_fdinfo() Function getline() returns -1 on failure to read a line, thus creating an infinite loop in get_fdinfo() if the key is not found. Fix it by calling the function only as long as we get a strictly positive return value. Found by copying the code for a key which is not always present... Fixes: 71bb428fe2c1 ("tools: bpf: add bpftool") Signed-off-by: Quentin Monnet Reviewed-by: Jakub Kicinski Signed-off-by: Daniel Borkmann commit 49a249c387268882e8393dd1fafc51e3b21cb7a2 Author: Yonghong Song Date: Wed Nov 7 19:55:36 2018 -0800 tools/bpftool: copy a few net uapi headers to tools directory Commit f6f3bac08ff9 ("tools/bpf: bpftool: add net support") added certain networking support to bpftool. The implementation relies on a relatively recent uapi header file linux/tc_act/tc_bpf.h on the host which contains the marco definition of TCA_ACT_BPF_ID. Unfortunately, this is not the case for all distributions. See the email message below where rhel-7.2 does not have an up-to-date linux/tc_act/tc_bpf.h. https://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1799211.html Further investigation found that linux/pkt_cls.h is also needed for macro TCA_BPF_TAG. This patch fixed the issue by copying linux/tc_act/tc_bpf.h and linux/pkt_cls.h from kernel include/uapi directory to tools/include/uapi directory so building the bpftool does not depend on host system for these files. Fixes: f6f3bac08ff9 ("tools/bpf: bpftool: add net support") Reported-by: kernel test robot Cc: Li Zhijian Signed-off-by: Yonghong Song Signed-off-by: Daniel Borkmann commit b13b8787c95c156b093305e9f006a6fb7d9119b1 Author: Andrey Ignatov Date: Wed Nov 7 13:36:07 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: Daniel Borkmann commit 1457d8cf7664f34c4ba534c1073821a559a2f6f9 Author: Juergen Gross Date: Wed Nov 7 18:01:00 2018 +0100 x86/xen: fix pv boot Commit 9da3f2b7405440 ("x86/fault: BUG() when uaccess helpers fault on kernel addresses") introduced a regression for booting Xen PV guests. Xen PV guests are using __put_user() and __get_user() for accessing the p2m map (physical to machine frame number map) as accesses might fail in case of not populated areas of the map. With above commit using __put_user() and __get_user() for accessing kernel pages is no longer valid. So replace the Xen hack by adding appropriate p2m access functions using the default fixup handler. Fixes: 9da3f2b7405440 ("x86/fault: BUG() when uaccess helpers fault on kernel addresses") Signed-off-by: Juergen Gross Reviewed-by: Andrew Cooper Signed-off-by: Juergen Gross commit 85b18b0237ce9986a81a1b9534b5e2ee116f5504 Author: Stefan Wahren Date: Thu Nov 8 20:38:26 2018 +0100 net: smsc95xx: Fix MTU range The commit f77f0aee4da4 ("net: use core MTU range checking in USB NIC drivers") introduce a common MTU handling for usbnet. But it's missing the necessary changes for smsc95xx. So set the MTU range accordingly. This patch has been tested on a Raspberry Pi 3. Fixes: f77f0aee4da4 ("net: use core MTU range checking in USB NIC drivers") Signed-off-by: Stefan Wahren Signed-off-by: David S. Miller commit 8137b6ef0ce469154e5cf19f8e7fe04d9a72ac5e Author: Thor Thayer Date: Thu Nov 8 11:42:14 2018 -0600 net: stmmac: Fix RX packet size > 8191 Ping problems with packets > 8191 as shown: PING 192.168.1.99 (192.168.1.99) 8150(8178) bytes of data. 8158 bytes from 192.168.1.99: icmp_seq=1 ttl=64 time=0.669 ms wrong data byte 8144 should be 0xd0 but was 0x0 16 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f 20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f %< ---------------snip-------------------------------------- 8112 b0 b1 b2 b3 b4 b5 b6 b7 b8 b9 ba bb bc bd be bf c0 c1 c2 c3 c4 c5 c6 c7 c8 c9 ca cb cc cd ce cf 8144 0 0 0 0 d0 d1 ^^^^^^^ Notice the 4 bytes of 0 before the expected byte of d0. Databook notes that the RX buffer must be a multiple of 4/8/16 bytes [1]. Update the DMA Buffer size define to 8188 instead of 8192. Remove the -1 from the RX buffer size allocations and use the new DMA Buffer size directly. [1] Synopsys DesignWare Cores Ethernet MAC Universal v3.70a [section 8.4.2 - Table 8-24] Tested on SoCFPGA Stratix10 with ping sweep from 100 to 8300 byte packets. Fixes: 286a83721720 ("stmmac: add CHAINED descriptor mode support (V4)") Suggested-by: Jose Abreu Signed-off-by: Thor Thayer Signed-off-by: David S. Miller commit 81fe16e05308f34e8bf62206aec6aad95014e375 Merge: 0d5b9311baf2 fa5c448d98f0 Author: David S. Miller Date: Thu Nov 8 19:38:19 2018 -0800 Merge branch 'qed-Slowpath-Queue-bug-fixes' Denis Bolotin says: ==================== qed: Slowpath Queue bug fixes This patch series fixes several bugs in the SPQ mechanism. It deals with SPQ entries management, preventing resource leaks, memory corruptions and handles error cases throughout the driver. Please consider applying to net. ==================== Signed-off-by: David S. Miller commit fa5c448d98f0df660bfcad3dd5facc027ef84cd3 Author: Sagiv Ozeri Date: Thu Nov 8 16:46:11 2018 +0200 qed: Fix potential memory corruption A stuck ramrod should be deleted from the completion_pending list, otherwise it will be added again in the future and corrupt the list. Return error value to inform that ramrod is stuck and should be deleted. Signed-off-by: Sagiv Ozeri Signed-off-by: Denis Bolotin Signed-off-by: David S. Miller commit fb5e7438e7a3c8966e04ccb0760170e9e06f3699 Author: Denis Bolotin Date: Thu Nov 8 16:46:10 2018 +0200 qed: Fix SPQ entries not returned to pool in error flows qed_sp_destroy_request() API was added for SPQ users that need to free/return the entry they acquired in their error flows. Signed-off-by: Denis Bolotin Signed-off-by: Michal Kalderon Signed-off-by: David S. Miller commit 2632f22ebd08da249c2017962a199a0cfb2324bf Author: Denis Bolotin Date: Thu Nov 8 16:46:09 2018 +0200 qed: Fix blocking/unlimited SPQ entries leak When there are no SPQ entries left in the free_pool, new entries are allocated and are added to the unlimited list. When an entry in the pool is available, the content is copied from the original entry, and the new entry is sent to the device. qed_spq_post() is not aware of that, so the additional entry is stored in the original entry as p_post_ent, which can later be returned to the pool. Signed-off-by: Denis Bolotin Signed-off-by: Michal Kalderon Signed-off-by: David S. Miller commit 39477551df940ddb1339203817de04f5caaacf7a Author: Denis Bolotin Date: Thu Nov 8 16:46:08 2018 +0200 qed: Fix memory/entry leak in qed_init_sp_request() Free the allocated SPQ entry or return the acquired SPQ entry to the free list in error flows. Signed-off-by: Denis Bolotin Signed-off-by: Michal Kalderon Signed-off-by: David S. Miller commit 0d5b9311baf27bb545f187f12ecfd558220c607d Author: Eric Dumazet Date: Thu Nov 8 17:34:27 2018 -0800 inet: frags: better deal with smp races Multiple cpus might attempt to insert a new fragment in rhashtable, if for example RPS is buggy, as reported by 배석진 in https://patchwork.ozlabs.org/patch/994601/ We use rhashtable_lookup_get_insert_key() instead of rhashtable_insert_fast() to let cpus losing the race free their own inet_frag_queue and use the one that was inserted by another cpu. Fixes: 648700f76b03 ("inet: frags: use rhashtables for reassembly units") Signed-off-by: Eric Dumazet Reported-by: 배석진 Signed-off-by: David S. Miller commit 8e4829c6f7470722c1f5a1dc5769ebe09ef036d6 Author: Wei Li Date: Thu Nov 8 09:08:29 2018 -0800 scsi: ufs: Fix hynix ufs bug with quirk on hi36xx SoC Hynix ufs has deviations on hi36xx platform which will result in ufs bursts transfer failures. To fix the problem, the Hynix device must set the register VS_DebugSaveConfigTime to 0x10, which will set time reference for SaveConfigTime is 250 ns. The time reference for SaveConfigTime is 40 ns by default. This patch is necessary to boot on HiKey960 boards that use Hynix UFS chips (H28U62301AMR model: hB8aL1). Cc: Vinayak Holikatti Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org Signed-off-by: Wei Li Signed-off-by: Dmitry Shmidt [jstultz: Forward ported from older code, slight tweak to commit message] Signed-off-by: John Stultz Signed-off-by: Martin K. Petersen commit f2ffd4e5bc7b629b312be48fbe3c3a2afbd67e4a Author: Bill Kuzeja Date: Mon Nov 5 11:23:50 2018 -0500 scsi: qla2xxx: Timeouts occur on surprise removal of QLogic adapter When doing a surprise removal of an adapter, some in flight I/Os can get stuck and take a while to complete (they actually time out and are retried). We are not handling an early error exit from qla2xxx_eh_abort properly. Fixes: 45235022da99 ("scsi: qla2xxx: Fix driver unload by shutting down chip") Signed-off-by: Bill Kuzeja Reviewed-by: Laurence Oberman Acked-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit e12c225258f2584906765234ca6db4ad4c618192 Author: Huazhong Tan Date: Thu Nov 8 10:13:19 2018 +0800 net: hns3: bugfix for not checking return value hns3_reset_notify_init_enet() only return error early if the return value of hns3_restore_vlan() is not 0. This patch adds checking for the return value of hns3_restore_vlan. Fixes: 7fa6be4fd2f6 ("net: hns3: fix incorrect return value/type of some functions") Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 24ccea7e102de8cbc93ab3befb123bbd18532be9 Merge: 6a1ac56c23db 837514f7a4ca Author: Linus Torvalds Date: Thu Nov 8 17:55:01 2018 -0600 Merge tag 'xfs-4.20-fixes-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull xfs fixes from Darrick Wong: - fix incorrect dropping of error code from bmap - print buffer offsets instead of useless hashed pointers when dumping corrupt metadata - fix integer overflow in attribute verifier * tag 'xfs-4.20-fixes-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: xfs: fix overflow in xfs_attr3_leaf_verify xfs: print buffer offsets when dumping corrupt buffers xfs: Fix error code in 'xfs_ioc_getbmap()' commit 6a1ac56c23db741200d1618ef4c3fb2d31932431 Merge: d464572a80da 406e7f986b2e Author: Linus Torvalds Date: Thu Nov 8 17:49:04 2018 -0600 Merge tag 'led-fixes-for-4.20-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds Pull LED fixes from Jacek Anaszewski: "All three fixes are related to the newly added pattern trigger: - remove mutex_lock() from timer callback, which would trigger problems related to sleeping in atomic context, the removal is harmless since mutex protection turned out to be redundant in this case - fix pattern parsing to properly handle intervals with brightness == 0 - fix typos in the ABI documentation" * tag 'led-fixes-for-4.20-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds: Documentation: ABI: led-trigger-pattern: Fix typos leds: trigger: Fix sleeping function called from invalid context Fix pattern handling optimalization commit d464572a80da40e44a1810d85ea451a4b225cf6a Merge: b00d209241ff 5e93a125f521 Author: Linus Torvalds Date: Thu Nov 8 17:45:42 2018 -0600 Merge tag 'sound-4.20-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "Two small regression fixes for HD-audio: one about vga_switcheroo and runtime PM, and another about Oops on some Thinkpads" * tag 'sound-4.20-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: hda - Fix incorrect clearance of thinkpad_acpi hooks vga_switcheroo: Fix missing gpu_bound call at audio client registration commit 89c38422e072bb453e3045b8f1b962a344c3edea Author: John Garry Date: Thu Nov 8 18:17:03 2018 +0800 of, numa: Validate some distance map rules Currently the NUMA distance map parsing does not validate the distance table for the distance-matrix rules 1-2 in [1]. However the arch NUMA code may enforce some of these rules, but not all. Such is the case for the arm64 port, which does not enforce the rule that the distance between separates nodes cannot equal LOCAL_DISTANCE. The patch adds the following rules validation: - distance of node to self equals LOCAL_DISTANCE - distance of separate nodes > LOCAL_DISTANCE This change avoids a yet-unresolved crash reported in [2]. A note on dealing with symmetrical distances between nodes: Validating symmetrical distances between nodes is difficult. If it were mandated in the bindings that every distance must be recorded in the table, then it would be easy. However, it isn't. In addition to this, it is also possible to record [b, a] distance only (and not [a, b]). So, when processing the table for [b, a], we cannot assert that current distance of [a, b] != [b, a] as invalid, as [a, b] distance may not be present in the table and current distance would be default at REMOTE_DISTANCE. As such, we maintain the policy that we overwrite distance [a, b] = [b, a] for b > a. This policy is different to kernel ACPI SLIT validation, which allows non-symmetrical distances (ACPI spec SLIT rules allow it). However, the distance debug message is dropped as it may be misleading (for a distance which is later overwritten). Some final notes on semantics: - It is implied that it is the responsibility of the arch NUMA code to reset the NUMA distance map for an error in distance map parsing. - It is the responsibility of the FW NUMA topology parsing (whether OF or ACPI) to enforce NUMA distance rules, and not arch NUMA code. [1] Documents/devicetree/bindings/numa.txt [2] https://www.spinics.net/lists/arm-kernel/msg683304.html Cc: stable@vger.kernel.org # 4.7 Signed-off-by: John Garry Acked-by: Will Deacon Signed-off-by: Rob Herring commit 6778be4e520959659b27a441c06a84c9cb009085 Author: Robin Murphy Date: Wed Nov 7 16:30:32 2018 +0000 of/device: Really only set bus DMA mask when appropriate of_dma_configure() was *supposed* to be following the same logic as acpi_dma_configure() and only setting bus_dma_mask if some range was specified by the firmware. However, it seems that subtlety got lost in the process of fitting it into the differently-shaped control flow, and as a result the force_dma==true case ends up always setting the bus mask to the 32-bit default, which is not what anyone wants. Make sure we only touch it if the DT actually said so. Fixes: 6c2fb2ea7636 ("of/device: Set bus DMA mask as appropriate") Reported-by: Aaro Koskinen Reported-by: Jean-Philippe Brucker Tested-by: Aaro Koskinen Tested-by: John Stultz Tested-by: Geert Uytterhoeven Tested-by: Robert Richter Signed-off-by: Robin Murphy Signed-off-by: Rob Herring commit d6ee1e7e9004d3d246cdfa14196989e0a9466c16 Author: Jerome Brunet Date: Thu Nov 8 10:31:23 2018 +0100 clk: meson: axg: mark fdiv2 and fdiv3 as critical Similar to gxbb and gxl platforms, axg SCPI Cortex-M co-processor uses the fdiv2 and fdiv3 to, among other things, provide the cpu clock. Until clock hand-off mechanism makes its way to CCF and the generic SCPI claims platform specific clocks, these clocks must be marked as critical to make sure they are never disabled when needed by the co-processor. Fixes: 05f814402d61 ("clk: meson: add fdiv clock gates") Signed-off-by: Jerome Brunet Acked-by: Neil Armstrong Signed-off-by: Stephen Boyd commit e2576c8bdfd462c34b8a46c0084e7c30b0851bf4 Author: Christian Hewitt Date: Tue Nov 6 00:08:20 2018 +0100 clk: meson-gxbb: set fclk_div3 as CLK_IS_CRITICAL On the Khadas VIM2 (GXM) and LePotato (GXL) board there are problems with reboot; e.g. a ~60 second delay between issuing reboot and the board power cycling (and in some OS configurations reboot will fail and require manual power cycling). Similar to 'commit c987ac6f1f088663b6dad39281071aeb31d450a8 ("clk: meson-gxbb: set fclk_div2 as CLK_IS_CRITICAL")' the SCPI Cortex-M4 Co-Processor seems to depend on FCLK_DIV3 being operational. Until commit 05f814402d6174369b3b29832cbb5eb5ed287059 ("clk: meson: add fdiv clock gates"), this clock was modeled and left on by the bootloader. We don't have precise documentation about the SCPI Co-Processor and its clock requirement so we are learning things the hard way. Marking this clock as critical solves the problem but it should not be viewed as final solution. Ideally, the SCPI driver should claim these clocks. We also depends on some clock hand-off mechanism making its way to CCF, to make sure the clock stays on between its registration and the SCPI driver probe. Fixes: 05f814402d61 ("clk: meson: add fdiv clock gates") Signed-off-by: Christian Hewitt Signed-off-by: Jerome Brunet Signed-off-by: Stephen Boyd commit 24cc61d8cb5a9232fadf21a830061853c1268fdd Author: Ard Biesheuvel Date: Wed Nov 7 15:16:06 2018 +0100 arm64: memblock: don't permit memblock resizing until linear mapping is up Bhupesh reports that having numerous memblock reservations at early boot may result in the following crash: Unable to handle kernel paging request at virtual address ffff80003ffe0000 ... Call trace: __memcpy+0x110/0x180 memblock_add_range+0x134/0x2e8 memblock_reserve+0x70/0xb8 memblock_alloc_base_nid+0x6c/0x88 __memblock_alloc_base+0x3c/0x4c memblock_alloc_base+0x28/0x4c memblock_alloc+0x2c/0x38 early_pgtable_alloc+0x20/0xb0 paging_init+0x28/0x7f8 This is caused by the fact that we permit memblock resizing before the linear mapping is up, and so the memblock_reserved() array is moved into memory that is not mapped yet. So let's ensure that this crash can no longer occur, by deferring to call to memblock_allow_resize() to after the linear mapping has been created. Reported-by: Bhupesh Sharma Acked-by: Will Deacon Tested-by: Marc Zyngier Signed-off-by: Ard Biesheuvel Signed-off-by: Catalin Marinas commit 3e452e636d006fa759a9914c044398869acba98f Author: Ulf Hansson Date: Thu Nov 1 11:15:58 2018 +0100 ARM: cpuidle: Convert to use cpuidle_register|unregister() The only reason that remains, to why the ARM cpuidle driver calls cpuidle_register_driver(), is to avoid printing an error message in case another driver already have been registered for the CPU. This seems a bit silly, but more importantly, if that is a common scenario, perhaps we should change cpuidle_register() accordingly instead. In either case, let's consolidate the code, by converting to use cpuidle_register|unregister(), which also avoids the unnecessary allocation of the struct cpuidle_device. Signed-off-by: Ulf Hansson Reviewed-by: Lorenzo Pieralisi Reviewed-by: Daniel Lezcano Signed-off-by: Rafael J. Wysocki commit 763f191af51f127cf8e69cd361f50bf6180768a5 Author: Ulf Hansson Date: Thu Nov 1 13:22:38 2018 +0100 ARM: cpuidle: Don't register the driver when back-end init returns -ENXIO There's no point to register the cpuidle driver for the current CPU, when the initialization of the arch specific back-end data fails by returning -ENXIO. Instead, let's re-order the sequence to its original flow, by first trying to initialize the back-end part and then act accordingly on the returned error code. Additionally, let's print the error message, no matter of what error code that was returned. Fixes: a0d46a3dfdc3 (ARM: cpuidle: Register per cpuidle device) Signed-off-by: Ulf Hansson Reviewed-by: Daniel Lezcano Cc: 4.19+ # v4.19+ Signed-off-by: Rafael J. Wysocki commit 26a4676faa1ad5d99317e0cd701e5d6f3e716b77 Author: Ard Biesheuvel Date: Wed Nov 7 18:10:38 2018 +0100 arm64: mm: define NET_IP_ALIGN to 0 On arm64, there is no need to add 2 bytes of padding to the start of each network buffer just to make the IP header appear 32-bit aligned. Since this might actually adversely affect DMA performance some platforms, let's override NET_IP_ALIGN to 0 to get rid of this padding. Acked-by: Ilias Apalodimas Tested-by: Ilias Apalodimas Acked-by: Mark Rutland Acked-by: Will Deacon Signed-off-by: Ard Biesheuvel Signed-off-by: Catalin Marinas commit aeaf6a4b2d9ed4373e39a64c1c10cb1d93dd6bd1 Author: Sudeep Holla Date: Wed Nov 7 17:40:58 2018 +0000 dt-bindings: cpufreq: remove stale arm_big_little_dt entry Most of the ARM platforms used v2 OPP bindings to support big-little configurations. This arm_big_little_dt binding is incomplete and was never used. Commit f174e49e4906 (cpufreq: remove unused arm_big_little_dt driver) removed the driver supporting this binding, but the binding was left unnoticed, so let's get rid of it now. Fixes: f174e49e4906 (cpufreq: remove unused arm_big_little_dt driver) Signed-off-by: Sudeep Holla Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki commit 91e43395820baad80248987608216c35da9df65b Merge: eef3dc34a1e0 cec83ff1241e Author: Tony Lindgren Date: Thu Nov 8 09:32:24 2018 -0800 Merge branch 'fixes-dts' into omap-for-v4.20/fixes commit 017ce359a7187192df5222a00fa3c9055eb3736d Author: Arnd Bergmann Date: Fri Nov 2 12:06:43 2018 +0100 ACPI / PMIC: xpower: fix IOSF_MBI dependency We still get a link failure with IOSF_MBI=m when the xpower driver is built-in: drivers/acpi/pmic/intel_pmic_xpower.o: In function `intel_xpower_pmic_update_power': intel_pmic_xpower.c:(.text+0x4f2): undefined reference to `iosf_mbi_block_punit_i2c_access' intel_pmic_xpower.c:(.text+0x5e2): undefined reference to `iosf_mbi_unblock_punit_i2c_access' This makes the dependency stronger, so we can only build when IOSF_MBI is built-in. Fixes: 6a9b593d4b6f (ACPI / PMIC: xpower: Add depends on IOSF_MBI to Kconfig entry) Signed-off-by: Arnd Bergmann Signed-off-by: Rafael J. Wysocki commit cec83ff1241ec98113a19385ea9e9cfa9aa4125b Author: Janusz Krzysztofik Date: Wed Nov 7 22:30:31 2018 +0100 ARM: OMAP1: ams-delta: Fix possible use of uninitialized field While playing with initialization order of modem device, it has been discovered that under some circumstances (early console init, I believe) its .pm() callback may be called before the uart_port->private_data pointer is initialized from plat_serial8250_port->private_data, resulting in NULL pointer dereference. Fix it by checking for uninitialized pointer before using it in modem_pm(). Fixes: aabf31737a6a ("ARM: OMAP1: ams-delta: update the modem to use regulator API") Signed-off-by: Janusz Krzysztofik Signed-off-by: Tony Lindgren commit 419b194cdedc76d0d3cd5b0900db0fa8177c4a52 Author: Adam Ford Date: Sun Oct 28 15:34:21 2018 -0500 ARM: dts: am3517-som: Fix WL127x Wifi interrupt At the same time the AM3517 EVM was gaining WiFi support, separate patches were introduced to move the interrupt from HIGH to RISING. Because they overlapped, this was not done to the AM3517-EVM. This patch fixes Kernel 4.19+ Fixes: 6bf5e3410f19 ("ARM: dts: am3517-som: Add WL127x Wifi") Signed-off-by: Adam Ford Signed-off-by: Tony Lindgren commit 3d8b804bc528d3720ec0c39c212af92dafaf6e84 Author: Adam Ford Date: Sun Oct 28 15:29:27 2018 -0500 ARM: dts: logicpd-somlv: Fix interrupt on mmc3_dat1 The interrupt on mmc3_dat1 is wrong which prevents this from appearing in /proc/interrupts. Fixes: ab8dd3aed011 ("ARM: DTS: Add minimal Support for Logic PD DM3730 SOM-LV") #Kernel 4.9+ Signed-off-by: Adam Ford Signed-off-by: Tony Lindgren commit 6809564d64ff1301d44c13334cc0e8369e825a20 Author: Adam Ford Date: Sun Oct 28 15:28:32 2018 -0500 ARM: dts: LogicPD Torpedo: Fix mmc3_dat1 interrupt When the Torpedo was first introduced back at Kernel 4.2, the interrupt extended flag has been set incorrectly. It was subsequently moved, so this patch corrects Kernel 4.18+ Fixes: a38867305203 ("ARM: dts: Move move WiFi bindings to logicpd-torpedo-37xx-devkit") # v4.18+ Signed-off-by: Adam Ford Signed-off-by: Tony Lindgren commit e7f4ffffa972db4820c23ff9831a6a4f3f6d8cc5 Author: Adam Ford Date: Sun Oct 28 15:13:48 2018 -0500 ARM: dts: am3517: Fix pinmuxing for CD on MMC1 The MMC1 is active low, not active high. For some reason, this worked with different combination of U-Boot and kernels, but it's supposed to be active low and is currently broken. Fixes: cfaa856a2510 ("ARM: dts: am3517: Add pinmuxing, CD and WP for MMC1") #kernel 4.18+ Signed-off-by: Adam Ford Signed-off-by: Tony Lindgren commit 025911a5f4e36955498ed50806ad1b02f0f76288 Author: YueHaibing Date: Thu Nov 8 02:04:57 2018 +0000 SUNRPC: drop pointless static qualifier in xdr_get_next_encode_buffer() There is no need to have the '__be32 *p' variable static since new value always be assigned before use it. Signed-off-by: YueHaibing Cc: stable@vger.kernel.org Signed-off-by: J. Bruce Fields commit 01310bb7c9c98752cc763b36532fab028e0f8f81 Author: Scott Mayhew Date: Thu Nov 8 11:11:36 2018 -0500 nfsd: COPY and CLONE operations require the saved filehandle to be set Make sure we have a saved filehandle, otherwise we'll oops with a null pointer dereference in nfs4_preprocess_stateid_op(). Signed-off-by: Scott Mayhew Cc: stable@vger.kernel.org Signed-off-by: J. Bruce Fields commit 23c625ce3065e40c933a4239efb9b11f1194a343 Author: Ilya Dryomov Date: Thu Nov 8 14:55:21 2018 +0100 libceph: assume argonaut on the server side No one is running pre-argonaut. In addition one of the argonaut features (NOSRCADDR) has been required since day one (and a half, 2.6.34 vs 2.6.35) of the kernel client. Allow for the possibility of reusing these feature bits later. Signed-off-by: Ilya Dryomov Reviewed-by: Sage Weil commit 71f2cc64d027d712f29bf8d09d3e123302d5f245 Author: Luis Henriques Date: Mon Nov 5 19:00:52 2018 +0000 ceph: quota: fix null pointer dereference in quota check This patch fixes a possible null pointer dereference in check_quota_exceeded, detected by the static checker smatch, with the following warning:    fs/ceph/quota.c:240 check_quota_exceeded()     error: we previously assumed 'realm' could be null (see line 188) Fixes: b7a2921765cf ("ceph: quota: support for ceph.quota.max_files") Reported-by: Dan Carpenter Signed-off-by: Luis Henriques Reviewed-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov commit c2c6d3ce0d9a1fae4472fc10755372d022a487a4 Author: Luis Henriques Date: Tue Oct 23 16:53:14 2018 +0000 ceph: add destination file data sync before doing any remote copy If we try to copy into a file that was just written, any data that is remote copied will be overwritten by our buffered writes once they are flushed.  When this happens, the call to invalidate_inode_pages2_range will also return a -EBUSY error. This patch fixes this by also sync'ing the destination file before starting any copy. Fixes: 503f82a9932d ("ceph: support copy_file_range file operation") Signed-off-by: Luis Henriques Reviewed-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov commit b469e7e47c8a075cc08bcd1e85d4365134bdcdd5 Author: Amir Goldstein Date: Tue Oct 30 20:29:53 2018 +0200 fanotify: fix handling of events on child sub-directory When an event is reported on a sub-directory and the parent inode has a mark mask with FS_EVENT_ON_CHILD|FS_ISDIR, the event will be sent to fsnotify() even if the event type is not in the parent mark mask (e.g. FS_OPEN). Further more, if that event happened on a mount or a filesystem with a mount/sb mark that does have that event type in their mask, the "on child" event will be reported on the mount/sb mark. That is not desired, because user will get a duplicate event for the same action. Note that the event reported on the victim inode is never merged with the event reported on the parent inode, because of the check in should_merge(): old_fsn->inode == new_fsn->inode. Fix this by looking for a match of an actual event type (i.e. not just FS_ISDIR) in parent's inode mark mask and by not reporting an "on child" event to group if event type is only found on mount/sb marks. [backport hint: The bug seems to have always been in fanotify, but this patch will only apply cleanly to v4.19.y] Cc: # v4.19 Signed-off-by: Amir Goldstein Signed-off-by: Jan Kara commit bb39ba6a8deab70752b836a36c62205b1c65b559 Author: Kuninori Morimoto Date: Thu Nov 8 06:34:34 2018 +0000 sata_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: Jens Axboe commit 0033dfd92a5646a78025e86f8df4d5b18181ba2c Author: Anton Ivanov Date: Thu Nov 8 13:07:23 2018 +0000 ubd: fix missing initialization of io_req The SYNC path doesn't initialize io_req->error, which can cause random errors. Before the conversion to blk-mq, we always completed requests with BLK_STS_OK status, but now we actually look at the error field and this issue becomes apparent. Signed-off-by: Anton Ivanov [axboe: fixed up commit message to explain what is actually going on] Signed-off-by: Jens Axboe commit d0ffb805b729322626639336986bc83fc2e60871 Author: H. Peter Anvin (Intel) Date: Mon Oct 22 09:19:05 2018 -0700 arch/alpha, termios: implement BOTHER, IBSHIFT and termios2 Alpha has had c_ispeed and c_ospeed, but still set speeds in c_cflags using arbitrary flags. Because BOTHER is not defined, the general Linux code doesn't allow setting arbitrary baud rates, and because CBAUDEX == 0, we can have an array overrun of the baud_rate[] table in drivers/tty/tty_baudrate.c if (c_cflags & CBAUD) == 037. Resolve both problems by #defining BOTHER to 037 on Alpha. However, userspace still needs to know if setting BOTHER is actually safe given legacy kernels (does anyone actually care about that on Alpha anymore?), so enable the TCGETS2/TCSETS*2 ioctls on Alpha, even though they use the same structure. Define struct termios2 just for compatibility; it is the exact same structure as struct termios. In a future patchset, this will be cleaned up so the uapi headers are usable from libc. Signed-off-by: H. Peter Anvin (Intel) Cc: Jiri Slaby Cc: Al Viro Cc: Richard Henderson Cc: Ivan Kokshaysky Cc: Matt Turner Cc: Thomas Gleixner Cc: Kate Stewart Cc: Philippe Ombredanne Cc: Eugene Syromiatnikov Cc: Cc: Cc: Johan Hovold Cc: Alan Cox Cc: Signed-off-by: Greg Kroah-Hartman commit b00d209241ff7ac336543f92ea764b9d6b03032a Merge: d50ffc585dbe 24efee412c75 Author: Linus Torvalds Date: Thu Nov 8 07:06:58 2018 -0500 Merge tag 'compiler-attributes-for-linus-v4.20-rc2' of https://github.com/ojeda/linux Pull compiler attribute fixlets from Miguel Ojeda: "Small improvements to Compiler Attributes: - Define asm_volatile_goto for non-gcc compilers (Nick Desaulniers) - Improve the explanation of compiler_attributes.h" * tag 'compiler-attributes-for-linus-v4.20-rc2' of https://github.com/ojeda/linux: Compiler Attributes: improve explanation of header include/linux/compiler*.h: define asm_volatile_goto commit d50ffc585dbec04fb1d219d5e8523fe6055e706f Merge: 85758777c2a2 98ee3fc7ef83 Author: Linus Torvalds Date: Thu Nov 8 07:04:29 2018 -0500 Merge tag 'mtd/fixes-for-4.20-rc2' of git://git.infradead.org/linux-mtd Pull MTD fixes from Boris Brezillon: "MTD changes: - Kill a VLA in sa1100 SPI NOR changes: - Make sure ->addr_width is restored when SFDP parsing fails - Propate errors happening in cqspi_direct_read_execute() NAND changes: - Fix kernel-doc mismatch - Fix nanddev_neraseblocks() to return the correct value - Avoid selection of BCH_CONST_PARAMS when some users require dynamic BCH settings" * tag 'mtd/fixes-for-4.20-rc2' of git://git.infradead.org/linux-mtd: mtd: nand: Fix nanddev_pos_next_page() kernel-doc header mtd: sa1100: avoid VLA in sa1100_setup_mtd mtd: spi-nor: Reset nor->addr_width when SFDP parsing failed mtd: spi-nor: cadence-quadspi: Return error code in cqspi_direct_read_execute() mtd: nand: Fix nanddev_neraseblocks() mtd: nand: drop kernel-doc notation for a deleted function parameter mtd: docg3: don't set conflicting BCH_CONST_PARAMS option commit 991a25194097006ec1e0d2e0814ff920e59e3465 Author: H. Peter Anvin Date: Mon Oct 22 09:19:04 2018 -0700 termios, tty/tty_baudrate.c: fix buffer overrun On architectures with CBAUDEX == 0 (Alpha and PowerPC), the code in tty_baudrate.c does not do any limit checking on the tty_baudrate[] array, and in fact a buffer overrun is possible on both architectures. Add a limit check to prevent that situation. This will be followed by a much bigger cleanup/simplification patch. Signed-off-by: H. Peter Anvin (Intel) Requested-by: Cc: Johan Hovold Cc: Jiri Slaby Cc: Al Viro Cc: Richard Henderson Cc: Ivan Kokshaysky Cc: Matt Turner Cc: Thomas Gleixner Cc: Kate Stewart Cc: Philippe Ombredanne Cc: Eugene Syromiatnikov Cc: Alan Cox Cc: stable Signed-off-by: Greg Kroah-Hartman commit 943210ba807ec50aafa2fa7b13bd6d36a478969b Author: Mikulas Patocka Date: Tue Oct 23 11:28:28 2018 -0400 vt: fix broken display when running aptitude If you run aptitude on framebuffer console, the display is corrupted. The corruption is caused by the commit d8ae7242. The patch adds "offset" to "start" when calling scr_memsetw, but it forgets to do the same addition on a subsequent call to do_update_region. Signed-off-by: Mikulas Patocka Fixes: d8ae72427187 ("vt: preserve unicode values corresponding to screen characters") Reviewed-by: Nicolas Pitre Cc: stable@vger.kernel.org # 4.19 Signed-off-by: Greg Kroah-Hartman commit e82e62e390d39c3819641cd721695702180d54fb Author: Sebastian Parschauer Date: Wed Nov 7 13:36:40 2018 +0100 HID: Add quirk for Microsoft PIXART OEM mouse The PixArt OEM mice are known for disconnecting every minute in runlevel 1 or 3 if they are not always polled. So add quirk ALWAYS_POLL for this one as well. References: https://www.spinics.net/lists/linux-usb/msg88965.html http://linet.gr.jp/~kojima/PlamoWeb/ML/htdocs/201808/msg00019.html Signed-off-by: Sebastian Parschauer CC: stable@vger.kernel.org Signed-off-by: Jiri Kosina commit e46daee53bb50bde38805f1823a182979724c229 Author: Kees Cook Date: Tue Oct 30 22:12:56 2018 +0100 ARM: 8806/1: kprobes: Fix false positive with FORTIFY_SOURCE The arm compiler internally interprets an inline assembly label as an unsigned long value, not a pointer. As a result, under CONFIG_FORTIFY_SOURCE, the address of a label has a size of 4 bytes, which was tripping the runtime checks. Instead, we can just cast the label (as done with the size calculations earlier). Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1639397 Reported-by: William Cohen Fixes: 6974f0c4555e ("include/linux/string.h: add the option of fortified string.h functions") Cc: stable@vger.kernel.org Acked-by: Laura Abbott Acked-by: Masami Hiramatsu Tested-by: William Cohen Signed-off-by: Kees Cook Signed-off-by: Russell King commit 24efee412c75843755da0ddd7bbc2db2ce9129f5 Author: Miguel Ojeda Date: Tue Nov 6 22:52:11 2018 +0100 Compiler Attributes: improve explanation of header Explain better what "optional" attributes are, and avoid calling them so to avoid confusion. Simply retain "Optional" as a word to look for in the comments. Moreover, add a couple sentences to explain a bit more the intention and the documentation links. Signed-off-by: Miguel Ojeda commit e5b78f2e349eef5d4fca5dc1cf5a3b4b2cc27abd Author: Geert Uytterhoeven Date: Wed Nov 7 14:18:50 2018 +0100 iommu/ipmmu-vmsa: Fix crash on early domain free If iommu_ops.add_device() fails, iommu_ops.domain_free() is still called, leading to a crash, as the domain was only partially initialized: ipmmu-vmsa e67b0000.mmu: Cannot accommodate DMA translation for IOMMU page tables sata_rcar ee300000.sata: Unable to initialize IPMMU context iommu: Failed to add device ee300000.sata to group 0: -22 Unable to handle kernel NULL pointer dereference at virtual address 0000000000000038 ... Call trace: ipmmu_domain_free+0x1c/0xa0 iommu_group_release+0x48/0x68 kobject_put+0x74/0xe8 kobject_del.part.0+0x3c/0x50 kobject_put+0x60/0xe8 iommu_group_get_for_dev+0xa8/0x1f0 ipmmu_add_device+0x1c/0x40 of_iommu_configure+0x118/0x190 Fix this by checking if the domain's context already exists, before trying to destroy it. Signed-off-by: Geert Uytterhoeven Reviewed-by: Robin Murphy Fixes: d25a2a16f0889 ('iommu: Add driver for Renesas VMSA-compatible IPMMU') Signed-off-by: Joerg Roedel commit 9c8e0a1b683525464a2abe9fb4b54404a50ed2b4 Author: Eric W. Biederman Date: Thu Oct 25 12:05:11 2018 -0500 mount: Prevent MNT_DETACH from disconnecting locked mounts Timothy Baldwin wrote: > As per mount_namespaces(7) unprivileged users should not be able to look under mount points: > > Mounts that come as a single unit from more privileged mount are locked > together and may not be separated in a less privileged mount namespace. > > However they can: > > 1. Create a mount namespace. > 2. In the mount namespace open a file descriptor to the parent of a mount point. > 3. Destroy the mount namespace. > 4. Use the file descriptor to look under the mount point. > > I have reproduced this with Linux 4.16.18 and Linux 4.18-rc8. > > The setup: > > $ sudo sysctl kernel.unprivileged_userns_clone=1 > kernel.unprivileged_userns_clone = 1 > $ mkdir -p A/B/Secret > $ sudo mount -t tmpfs hide A/B > > > "Secret" is indeed hidden as expected: > > $ ls -lR A > A: > total 0 > drwxrwxrwt 2 root root 40 Feb 12 21:08 B > > A/B: > total 0 > > > The attack revealing "Secret": > > $ unshare -Umr sh -c "exec unshare -m ls -lR /proc/self/fd/4/ 4 /proc/self/fd/4/: > total 0 > drwxr-xr-x 3 root root 60 Feb 12 21:08 B > > /proc/self/fd/4/B: > total 0 > drwxr-xr-x 2 root root 40 Feb 12 21:08 Secret > > /proc/self/fd/4/B/Secret: > total 0 I tracked this down to put_mnt_ns running passing UMOUNT_SYNC and disconnecting all of the mounts in a mount namespace. Fix this by factoring drop_mounts out of drop_collected_mounts and passing 0 instead of UMOUNT_SYNC. There are two possible behavior differences that result from this. - No longer setting UMOUNT_SYNC will no longer set MNT_SYNC_UMOUNT on the vfsmounts being unmounted. This effects the lazy rcu walk by kicking the walk out of rcu mode and forcing it to be a non-lazy walk. - No longer disconnecting locked mounts will keep some mounts around longer as they stay because the are locked to other mounts. There are only two users of drop_collected mounts: audit_tree.c and put_mnt_ns. In audit_tree.c the mounts are private and there are no rcu lazy walks only calls to iterate_mounts. So the changes should have no effect except for a small timing effect as the connected mounts are disconnected. In put_mnt_ns there may be references from process outside the mount namespace to the mounts. So the mounts remaining connected will be the bug fix that is needed. That rcu walks are allowed to continue appears not to be a problem especially as the rcu walk change was about an implementation detail not about semantics. Cc: stable@vger.kernel.org Fixes: 5ff9d8a65ce8 ("vfs: Lock in place mounts from more privileged users") Reported-by: Timothy Baldwin Tested-by: Timothy Baldwin Signed-off-by: "Eric W. Biederman" commit 0bb2ae1b26e1fb7543ec7474cdd374ac4b88c4da Author: Thomas Richter Date: Mon Oct 29 08:11:33 2018 +0000 s390/perf: Change CPUM_CF return code in event init function The function perf_init_event() creates a new event and assignes it to a PMU. This a done in a loop over all existing PMUs. For each listed PMU the event init function is called and if this function does return any other error than -ENOENT, the loop is terminated the creation of the event fails. If the event is invalid, return -ENOENT to try other PMUs. Signed-off-by: Thomas Richter Reviewed-by: Hendrik Brueckner Signed-off-by: Martin Schwidefsky commit e6a2d72c10405b30ddba5af2e44a9d3d925a56d3 Author: Juri Lelli Date: Wed Nov 7 12:10:32 2018 +0100 posix-cpu-timers: Remove useless call to check_dl_overrun() check_dl_overrun() is used to send a SIGXCPU to users that asked to be informed when a SCHED_DEADLINE runtime overruns occur. The function is called by check_thread_timers() already, so the call in check_process_timers() is redundant/wrong (even though harmless). Remove it. Fixes: 34be39305a77 ("sched/deadline: Implement "runtime overrun signal" support") Signed-off-by: Juri Lelli Signed-off-by: Thomas Gleixner Reviewed-by: Daniel Bristot de Oliveira Reviewed-by: Steven Rostedt (VMware) Cc: linux-rt-users@vger.kernel.org Cc: mtk.manpages@gmail.com Cc: Mathieu Poirier Cc: Peter Zijlstra Cc: Luca Abeni Cc: Claudio Scordino Link: https://lkml.kernel.org/r/20181107111032.32291-1-juri.lelli@redhat.com commit b25ddb00bc1b96613edcb525f19203a7d1405fce Author: Michał Mirosław Date: Wed Nov 7 17:50:53 2018 +0100 qlcnic: remove assumption that vlan_tci != 0 VLAN.TCI == 0 is perfectly valid (802.1p), so allow it to be accelerated. Signed-off-by: Michał Mirosław Signed-off-by: David S. Miller commit e84b47941e15e6666afb8ee8b21d1c3fc1a013af Author: Michał Mirosław Date: Wed Nov 7 17:50:52 2018 +0100 ibmvnic: fix accelerated VLAN handling Don't request tag insertion when it isn't present in outgoing skb. Signed-off-by: Michał Mirosław Signed-off-by: David S. Miller commit df7342b240185d58d3d9665c0bbf0a0f5570ec29 Author: Eric W. Biederman Date: Thu Oct 25 09:04:18 2018 -0500 mount: Don't allow copying MNT_UNBINDABLE|MNT_LOCKED mounts Jonathan Calmels from NVIDIA reported that he's able to bypass the mount visibility security check in place in the Linux kernel by using a combination of the unbindable property along with the private mount propagation option to allow a unprivileged user to see a path which was purposefully hidden by the root user. Reproducer: # Hide a path to all users using a tmpfs root@castiana:~# mount -t tmpfs tmpfs /sys/devices/ root@castiana:~# # As an unprivileged user, unshare user namespace and mount namespace stgraber@castiana:~$ unshare -U -m -r # Confirm the path is still not accessible root@castiana:~# ls /sys/devices/ # Make /sys recursively unbindable and private root@castiana:~# mount --make-runbindable /sys root@castiana:~# mount --make-private /sys # Recursively bind-mount the rest of /sys over to /mnnt root@castiana:~# mount --rbind /sys/ /mnt # Access our hidden /sys/device as an unprivileged user root@castiana:~# ls /mnt/devices/ breakpoint cpu cstate_core cstate_pkg i915 intel_pt isa kprobe LNXSYSTM:00 msr pci0000:00 platform pnp0 power software system tracepoint uncore_arb uncore_cbox_0 uncore_cbox_1 uprobe virtual Solve this by teaching copy_tree to fail if a mount turns out to be both unbindable and locked. Cc: stable@vger.kernel.org Fixes: 5ff9d8a65ce8 ("vfs: Lock in place mounts from more privileged users") Reported-by: Jonathan Calmels Signed-off-by: "Eric W. Biederman" commit 25d202ed820ee347edec0bf3bf553544556bf64b Author: Eric W. Biederman Date: Mon Oct 22 10:21:38 2018 -0500 mount: Retest MNT_LOCKED in do_umount It was recently pointed out that the one instance of testing MNT_LOCKED outside of the namespace_sem is in ksys_umount. Fix that by adding a test inside of do_umount with namespace_sem and the mount_lock held. As it helps to fail fails the existing test is maintained with an additional comment pointing out that it may be racy because the locks are not held. Cc: stable@vger.kernel.org Reported-by: Al Viro Fixes: 5ff9d8a65ce8 ("vfs: Lock in place mounts from more privileged users") Signed-off-by: "Eric W. Biederman" commit b1870a6d3f398e869b4eb2a8297cc8a80899c80d Merge: 69e362985fcb 8f5365ebf7b1 Author: David S. Miller Date: Wed Nov 7 21:53:31 2018 -0800 Merge branch 'FDDI-defza-Fix-a-bunch-of-small-issues' Maciej W. Rozycki says: ==================== FDDI: defza: Fix a bunch of small issues Here is a bunch of small fixes addressing issues that I missed in my final round of testing. None of these affect run-time behaviour. One was actually found by the kbuild bot, which turned out to be more pedantic than my compiler. See individual change descriptions for details. ==================== Signed-off-by: David S. Miller commit 8f5365ebf7b17c35dddbb694b4f0ffd1293a947f Author: Maciej W. Rozycki Date: Wed Nov 7 12:07:10 2018 +0000 FDDI: defza: Make the driver version string constant The driver version string is obviously not meant to be changed at run time, so mark it `const'. Signed-off-by: Maciej W. Rozycki Signed-off-by: David S. Miller commit 04453b6b241913f85af013eec187bab776428af5 Author: Maciej W. Rozycki Date: Wed Nov 7 12:07:05 2018 +0000 FDDI: defza: Move SMT Tx data buffer declaration next to its skb Move the temporary data buffer used when tapping into the SMT Tx queue from the outer function level into the conditional block it's actually used in and its containing skb is also declared, making the structure of code better. Signed-off-by: Maciej W. Rozycki Signed-off-by: David S. Miller commit 5f5fae37dbcf37feae48c40d2580dbd67c5df131 Author: Maciej W. Rozycki Date: Wed Nov 7 12:06:59 2018 +0000 FDDI: defza: Add missing comment closing Fix: drivers/net/fddi/defza.h:238:1: warning: "/*" within comment [-Wcomment] by adding a missing comment closing. Signed-off-by: Maciej W. Rozycki Signed-off-by: David S. Miller commit 96ed82cc1f515a2329f93506129ab1de35429b89 Author: Maciej W. Rozycki Date: Wed Nov 7 12:06:52 2018 +0000 FDDI: defza: Fix SPDX annotation The SPDX annotation for this driver does not match the license text, which specifies GNU GPL 2 or later. Make the two match by correcting the SPDX tag. Signed-off-by: Maciej W. Rozycki Signed-off-by: David S. Miller commit d2f007dbe7e4c9583eea6eb04d60001e85c6f1bd Author: Jann Horn Date: Mon Nov 5 20:55:09 2018 +0100 userns: also map extents in the reverse map to kernel IDs The current logic first clones the extent array and sorts both copies, then maps the lower IDs of the forward mapping into the lower namespace, but doesn't map the lower IDs of the reverse mapping. This means that code in a nested user namespace with >5 extents will see incorrect IDs. It also breaks some access checks, like inode_owner_or_capable() and privileged_wrt_inode_uidgid(), so a process can incorrectly appear to be capable relative to an inode. To fix it, we have to make sure that the "lower_first" members of extents in both arrays are translated; and we have to make sure that the reverse map is sorted *after* the translation (since otherwise the translation can break the sorting). This is CVE-2018-18955. Fixes: 6397fac4915a ("userns: bump idmap limits to 340") Cc: stable@vger.kernel.org Signed-off-by: Jann Horn Tested-by: Eric W. Biederman Reviewed-by: Eric W. Biederman Signed-off-by: Eric W. Biederman commit de59fae0043f07de5d25e02ca360f7d57bfa5866 Author: Vasily Averin Date: Wed Nov 7 22:36:23 2018 -0500 ext4: fix buffer leak in __ext4_read_dirblock() on error path Fixes: dc6982ff4db1 ("ext4: refactor code to read directory blocks ...") Signed-off-by: Vasily Averin Signed-off-by: Theodore Ts'o Cc: stable@kernel.org # 3.9 commit 69e362985fcbbb0589fc3e910fab00e6cdcc17e7 Merge: 042cb5647815 d5596fd46770 Author: David S. Miller Date: Wed Nov 7 17:08:51 2018 -0800 Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-queue Jeff Kirsher says: ==================== Intel Wired LAN Driver Updates 2018-11-07 This series contains fixes to igb, i40e and ice drivers. Anirudh fixes an issue during rebuild of the ice driver, where we need to set the carrier state, as well as start or stop the queues all based on the link status. Removed functions that were duplicating current functionality in the VSI rebuild/replay framework. Dave fixes a potential resource collision during the remove path, so add a check to see if we are in the middle of a reset. Fixed the remove path to ensure we call netif_napi_del() to free vectors before we set vsi->netdev to NULL. Akeem fixes an issue when the receive or transmit pause parameter is set, results in link loss on the interface. Fixed the spelling of "Enabling" in error message. Victor fixes potential memory leak by also freeing the related VSI contexts in the unload path. Md Fahad fixes a flag during port VLAN insertion, which was not being set properly. Brett fixes a transmit timeout during stress due to the hardware tail and software tail were incorrectly out of sync. Miroslav Lichvar fixes the igb PHC timecounter update interval to be sure the timecounter is updated in time. Chinh fixes the req_speeds variable to be u16 instead of u8 so that it can handle all the link speeds. Jake fixes i40e to add back the missing feature flags, which was causing IP-in-IP offloads to be reported as not supported. ==================== Signed-off-by: David S. Miller commit 63237f8748bdf46dccf79ef8f98f05e9fe799162 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 0e6613e46fed29316f33acf86e1d1568288638b5 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 8be17ac95f8451b51f636622d8d4b8674334f468 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 108110a3ffa3483d743f3bff93917ba64dc8edd0 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 3c7eda0b65ad279dd2f26908d2f4bd088da93996 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 f3587d76da05f68098ddb1cb3c98cc6a9e8a402c Author: Keith Busch Date: Wed Nov 7 07:37:45 2018 -0700 block: Clear kernel memory before copying to user If the kernel allocates a bounce buffer for user read data, this memory needs to be cleared before copying it to the user, otherwise it may leak kernel memory to user space. Laurence Oberman Signed-off-by: Keith Busch Signed-off-by: Jens Axboe commit e31d36b0a453d581fb077fce6883811c5e14874d Author: Geert Uytterhoeven Date: Wed Nov 7 10:47:57 2018 +0100 MAINTAINERS: Fix remaining pointers to obsolete libata.git libata.git no longer exists. Replace the remaining pointers to it by pointers to the block tree, which is where all libata development happens now. Signed-off-by: Geert Uytterhoeven Signed-off-by: Jens Axboe commit 6961cd4d0fde97f1cdb798ba21cf124ecfa0bf95 Author: Jens Axboe Date: Wed Nov 7 14:34:05 2018 -0700 ubd: fix missing lock around request issue We need to hold the device lock (and disable interrupts) while writing new commands, or we could be interrupted while that is happening and read invalid requests in the completion path. Fixes: 4e6da0fe8058 ("um: Convert ubd driver to blk-mq") Tested-by: Richard Weinberger Signed-off-by: Jens Axboe commit cf3d02a185edf449d30465dae8d22a4979545829 Author: Sean Paul Date: Wed Nov 7 15:55:33 2018 -0500 drm: Fix htmldocs warnings in drm_fourcc.c Add a description for dev and remove the excess one for native. Fixes the following warnings: ../drivers/gpu/drm/drm_fourcc.c:112: warning: Function parameter or member 'dev' not described in 'drm_driver_legacy_fb_format' ../drivers/gpu/drm/drm_fourcc.c:112: warning: Excess function parameter 'native' description in 'drm_driver_legacy_fb_format' Fixes: 059b5eb5d955 ("drm: move native byte order quirk to new drm_driver_legacy_fb_format function") Cc: Gerd Hoffmann Cc: Daniel Vetter Reviewed-by: Daniel Vetter Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20181107205546.216088-1-sean@poorly.run commit 406e7f986b2e4499295351bcfff5c93b0d34022a Author: Geert Uytterhoeven Date: Wed Nov 7 14:45:24 2018 +0100 Documentation: ABI: led-trigger-pattern: Fix typos - Spelling s/brigntess/brightness/, - Double "use". Signed-off-by: Geert Uytterhoeven Acked-by: Pavel Machek Signed-off-by: Jacek Anaszewski commit 3a40cfe8ba3abba57af2c7e26aad2c6dd1681864 Author: Baolin Wang Date: Wed Nov 7 13:42:58 2018 +0800 leds: trigger: Fix sleeping function called from invalid context We will meet below issue due to mutex_lock() is called in interrupt context. The mutex lock is used to protect the pattern trigger data, but before changing new pattern trigger data (pattern values or repeat value) by users, we always cancel the timer firstly to clear previous patterns' performance. That means there is no race in pattern_trig_timer_function(), so we can drop the mutex lock in pattern_trig_timer_function() to avoid this issue. Moreover we can move the timer cancelling into mutex protection, since there is no deadlock risk if we remove the mutex lock in pattern_trig_timer_function(). BUG: sleeping function called from invalid context at kernel/locking/mutex.c:254 in_atomic(): 1, irqs_disabled(): 0, pid: 0, name: swapper/1 CPU: 1 PID: 0 Comm: swapper/1 Not tainted 4.20.0-rc1-koelsch-00841-ga338c8181013c1a9 #171 Hardware name: Generic R-Car Gen2 (Flattened Device Tree) [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [] (show_stack) from [] (dump_stack+0x7c/0x9c) [] (dump_stack) from [] (___might_sleep+0xf4/0x158) [] (___might_sleep) from [] (mutex_lock+0x18/0x60) [] (mutex_lock) from [] (pattern_trig_timer_function+0x1c/0x11c) [] (pattern_trig_timer_function) from [] (call_timer_fn+0x1c/0x90) [] (call_timer_fn) from [] (expire_timers+0x94/0xa4) [] (expire_timers) from [] (run_timer_softirq+0x108/0x15c) [] (run_timer_softirq) from [] (__do_softirq+0x1d4/0x258) [] (__do_softirq) from [] (irq_exit+0x64/0xc4) [] (irq_exit) from [] (__handle_domain_irq+0x80/0xb4) [] (__handle_domain_irq) from [] (gic_handle_irq+0x58/0x90) [] (gic_handle_irq) from [] (__irq_svc+0x58/0x74) Exception stack(0xeb483f60 to 0xeb483fa8) 3f60: 00000000 00000000 eb9afaa0 c0217e80 00000000 ffffe000 00000000 c0e06408 3f80: 00000002 c0e0647c c0c6a5f0 00000000 c0e04900 eb483fb0 c0207ea8 c0207e98 3fa0: 60020013 ffffffff [] (__irq_svc) from [] (arch_cpu_idle+0x1c/0x38) [] (arch_cpu_idle) from [] (do_idle+0x138/0x268) [] (do_idle) from [] (cpu_startup_entry+0x18/0x1c) [] (cpu_startup_entry) from [<402022ec>] (0x402022ec) Fixes: 5fd752b6b3a2 ("leds: core: Introduce LED pattern trigger") Signed-off-by: Baolin Wang Reported-by: Geert Uytterhoeven Tested-by: Geert Uytterhoeven Signed-off-by: Jacek Anaszewski commit df376b2ed51a2777c3398e038992f62523c0f932 Author: Johannes Thumshirn Date: Wed Nov 7 14:58:14 2018 +0100 block: respect virtual boundary mask in bvecs With drivers that are settting a virtual boundary constrain, we are seeing a lot of bio splitting and smaller I/Os being submitted to the driver. This happens because the bio gap detection code does not account cases where PAGE_SIZE - 1 is bigger than queue_virt_boundary() and thus will split the bio unnecessarily. Cc: Jan Kara Cc: Bart Van Assche Cc: Ming Lei Reviewed-by: Sagi Grimberg Signed-off-by: Johannes Thumshirn Acked-by: Keith Busch Reviewed-by: Ming Lei Signed-off-by: Jens Axboe commit 85758777c2a227fd1541b6dd122a08ab79c347ce Merge: e09d51adfbb1 e3e61f01d755 Author: Linus Torvalds Date: Wed Nov 7 11:39:07 2018 -0800 Merge tag 'hwmon-for-v4.20-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging Pull hwmon fixes from Guenter Roeck: - Remove bogus __init annotations in ibmpowernv driver - Fix double-free in error handling of __hwmon_device_register() * tag 'hwmon-for-v4.20-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: hwmon: (ibmpowernv) Remove bogus __init annotations hwmon: (core) Fix double-free in __hwmon_device_register() commit d6fd0ae25c6495674dc5a41a8d16bc8e0073276d Author: Omar Sandoval Date: Wed Oct 31 10:06:08 2018 -0700 Btrfs: fix missing delayed iputs on unmount There's a race between close_ctree() and cleaner_kthread(). close_ctree() sets btrfs_fs_closing(), and the cleaner stops when it sees it set, but this is racy; the cleaner might have already checked the bit and could be cleaning stuff. In particular, if it deletes unused block groups, it will create delayed iputs for the free space cache inodes. As of "btrfs: don't run delayed_iputs in commit", we're no longer running delayed iputs after a commit. Therefore, if the cleaner creates more delayed iputs after delayed iputs are run in btrfs_commit_super(), we will leak inodes on unmount and get a busy inode crash from the VFS. Fix it by parking the cleaner before we actually close anything. Then, any remaining delayed iputs will always be handled in btrfs_commit_super(). This also ensures that the commit in close_ctree() is really the last commit, so we can get rid of the commit in cleaner_kthread(). The fstest/generic/475 followed by 476 can trigger a crash that manifests as a slab corruption caused by accessing the freed kthread structure by a wake up function. Sample trace: [ 5657.077612] BUG: unable to handle kernel NULL pointer dereference at 00000000000000cc [ 5657.079432] PGD 1c57a067 P4D 1c57a067 PUD da10067 PMD 0 [ 5657.080661] Oops: 0000 [#1] PREEMPT SMP [ 5657.081592] CPU: 1 PID: 5157 Comm: fsstress Tainted: G W 4.19.0-rc8-default+ #323 [ 5657.083703] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.11.2-0-gf9626cc-prebuilt.qemu-project.org 04/01/2014 [ 5657.086577] RIP: 0010:shrink_page_list+0x2f9/0xe90 [ 5657.091937] RSP: 0018:ffffb5c745c8f728 EFLAGS: 00010287 [ 5657.092953] RAX: 0000000000000074 RBX: ffffb5c745c8f830 RCX: 0000000000000000 [ 5657.094590] RDX: 0000000000000000 RSI: 0000000000000001 RDI: ffff9a8747fdf3d0 [ 5657.095987] RBP: ffffb5c745c8f9e0 R08: 0000000000000000 R09: 0000000000000000 [ 5657.097159] R10: ffff9a8747fdf5e8 R11: 0000000000000000 R12: ffffb5c745c8f788 [ 5657.098513] R13: ffff9a877f6ff2c0 R14: ffff9a877f6ff2c8 R15: dead000000000200 [ 5657.099689] FS: 00007f948d853b80(0000) GS:ffff9a877d600000(0000) knlGS:0000000000000000 [ 5657.101032] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 5657.101953] CR2: 00000000000000cc CR3: 00000000684bd000 CR4: 00000000000006e0 [ 5657.103159] Call Trace: [ 5657.103776] shrink_inactive_list+0x194/0x410 [ 5657.104671] shrink_node_memcg.constprop.84+0x39a/0x6a0 [ 5657.105750] shrink_node+0x62/0x1c0 [ 5657.106529] try_to_free_pages+0x1a4/0x500 [ 5657.107408] __alloc_pages_slowpath+0x2c9/0xb20 [ 5657.108418] __alloc_pages_nodemask+0x268/0x2b0 [ 5657.109348] kmalloc_large_node+0x37/0x90 [ 5657.110205] __kmalloc_node+0x236/0x310 [ 5657.111014] kvmalloc_node+0x3e/0x70 Fixes: 30928e9baac2 ("btrfs: don't run delayed_iputs in commit") Signed-off-by: Omar Sandoval Reviewed-by: David Sterba [ add trace ] Signed-off-by: David Sterba commit d5596fd46770550873ab4c02bcb69f83d3d63f63 Author: Jacob Keller Date: Mon Oct 29 10:52:43 2018 -0700 i40e: enable NETIF_F_NTUPLE and NETIF_F_HW_TC at driver load The assignment of the feature flag NETIF_F_NTUPLE and NETIF_F_HW_TC occurs prior to the initial setup of the local hw_features variable. This means the features are set as user-changeable, but are not set in the currently active feature list. This results in the features being disabled at the driver's initial load. Move the assignment after the initial assignment of hw_features, and assign to the local variable. This ensures that NETIF_F_NTUPLE and NETIF_F_HW_TC are marked as user-changeable, and also enables them by default when the driver loads. Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit ba766b8b99c30ad3c55ed8cf224d1185ecff1476 Author: Jacob Keller Date: Mon Oct 29 10:52:42 2018 -0700 i40e: restore NETIF_F_GSO_IPXIP[46] to netdev features Since commit bacd75cfac8a ("i40e/i40evf: Add capability exchange for outer checksum", 2017-04-06) the i40e driver has not reported support for IP-in-IP offloads. This likely occurred due to a bad rebase, as the commit extracts hw_enc_features into its own variable. As part of this change, it dropped the NETIF_F_FSO_IPXIP flags from the netdev->hw_enc_features. This was unfortunately not caught during code review. Fix this by adding back the missing feature flags. For reference, NETIF_F_GSO_IPXIP4 was added in commit 7e13318daa4a ("net: define gso types for IPx over IPv4 and IPv6", 2016-05-20), replacing NETIF_F_GSO_IPIP and NETIF_F_GSO_SIT. NETIF_F_GSO_IPXIP6 was added in commit bf2d1df39502 ("intel: Add support for IPv6 IP-in-IP offload", 2016-05-20). Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit ffe498237b36ee42624e139b21efa05da4ff1f48 Author: Chinh T Cao Date: Mon Nov 5 12:18:35 2018 -0800 ice: Change req_speeds to be u16 Since the req_speeds field in struct ice_link_status is a u8, req_speeds & ICE_AQ_LINK_SPEED_40GB always returns 0. This was caught by a coverity scan. Fix this by changing req_speeds to be u16. Reported-by: Bruce Allan Signed-off-by: Chinh T Cao Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit e09d51adfbb110ee1d4af3571b8cb67b0f938756 Merge: ecb4d529f13d a89f84a56ec9 Author: Linus Torvalds Date: Wed Nov 7 09:13:34 2018 -0800 Merge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC fixes from Olof Johansson: "A few more fixes that have come in, and one revert of a previous fix. I was a bit too trigger happy to enable PREEMPT on multi_v7_defconfig, and it ended up regressing at least BeagleBone XM boards. While we get that debugged for next merge window, let's disable it again. Beyond that: - Stratix change to fix multicast filtering - Minor DT fixes for Renesas and i.MX - Ethernet fix for a Renesas board (switching main interfaces) - Ethernet phy regulator fix for i.MX6SX" * tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: arm64: dts: stratix10: fix multicast filtering ARM: defconfig: Disable PREEMPT again on multi_v7 arm64: dts: renesas: condor: switch from EtherAVB to GEther dt-bindings: arm: Fix RZ/G2E part number arm64: dts: renesas: r8a7795: add missing dma-names on hscif2 ARM: dts: imx6sx-sdb: Fix enet phy regulator ARM: dts: fsl: Fix improperly quoted stdout-path values ARM: dts: imx6sll: fix typo for fsl,imx6sll-i2c node commit ecb4d529f13d610a4f0236a4c804f55d7582adab Merge: 8053e5b93eca aa9b760cec23 Author: Linus Torvalds Date: Wed Nov 7 09:05:58 2018 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid Pull HID fixes from Jiri Kosina: - hid.git is moving towards group maintainership (where group is myself and Benjamin Tissoires), therefore this pull request updates MAINTAINERS accordingly - fix for hid-asus config dependency from Arnd Bergmann - two device-specific quirks for i2c-hid from Julian Sax and Kai-Heng Feng - other few small assorted fixes * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid: HID: fix up .raw_event() documentation HID: asus: fix build warning wiht CONFIG_ASUS_WMI disabled HID: i2c-hid: add Direkt-Tek DTLAPY133-1 to descriptor override HID: moving to group maintainership model HID: alps: allow incoming reports when only the trackstick is opened Revert "HID: add NOGET quirk for Eaton Ellipse MAX UPS" HID: i2c-hid: Add a small delay after sleep command for Raydium touchpanel HID: hiddev: fix potential Spectre v1 commit 53692ec074d00589c2cf1d6d17ca76ad0adce6ec Author: Vasily Averin Date: Wed Nov 7 11:14:35 2018 -0500 ext4: fix buffer leak in ext4_expand_extra_isize_ea() on error path Fixes: de05ca852679 ("ext4: move call to ext4_error() into ...") Signed-off-by: Vasily Averin Signed-off-by: Theodore Ts'o Cc: stable@kernel.org # 4.17 commit 9bde0afb7a906f1dabdba37162551565740b862d Author: Xulin Sun Date: Tue Nov 6 16:42:19 2018 +0800 rtc: pcf2127: fix a kmemleak caused in pcf2127_i2c_gather_write pcf2127_i2c_gather_write() allocates memory as local variable for i2c_master_send(), after finishing the master transfer, the allocated memory should be freed. The kmemleak is reported: unreferenced object 0xffff80231e7dba80 (size 64): comm "hwclock", pid 27762, jiffies 4296880075 (age 356.944s) hex dump (first 32 bytes): 03 00 12 03 19 02 11 13 00 80 98 18 00 00 ff ff ................ 00 50 00 00 00 00 00 00 02 00 00 00 00 00 00 00 .P.............. backtrace: [] create_object+0xf8/0x278 [] kmemleak_alloc+0x74/0xa0 [] __kmalloc+0x1ac/0x348 [] pcf2127_i2c_gather_write+0x54/0xf8 [] _regmap_raw_write+0x464/0x850 [] regmap_bulk_write+0x1a4/0x348 [] pcf2127_rtc_set_time+0xac/0xe8 [] rtc_set_time+0x80/0x138 [] rtc_dev_ioctl+0x398/0x610 [] do_vfs_ioctl+0xb0/0x848 [] SyS_ioctl+0x8c/0xa8 [] el0_svc_naked+0x34/0x38 [] 0xffffffffffffffff Signed-off-by: Xulin Sun Signed-off-by: Alexandre Belloni commit 7ce9a992ffde8ce93d5ae5767362a5c7389ae895 Author: Maciej W. Rozycki Date: Mon Nov 5 03:48:25 2018 +0000 rtc: hctosys: Add missing range error reporting Fix an issue with the 32-bit range error path in `rtc_hctosys' where no error code is set and consequently the successful preceding call result from `rtc_read_time' is propagated to `rtc_hctosys_ret'. This in turn makes any subsequent call to `hctosys_show' incorrectly report in sysfs that the system time has been set from this RTC while it has not. Set the error to ERANGE then if we can't express the result due to an overflow. Signed-off-by: Maciej W. Rozycki Fixes: b3a5ac42ab18 ("rtc: hctosys: Ensure system time doesn't overflow time_t") Cc: stable@vger.kernel.org # 4.17+ Signed-off-by: Alexandre Belloni commit fbb974ba693bbfb4e24a62181ef16d4e45febc37 Author: Hans de Goede Date: Tue Sep 4 16:51:29 2018 +0200 rtc: cmos: Do not export alarm rtc_ops when we do not support alarms When there is no IRQ configured for the RTC, the rtc-cmos code does not support alarms, all alarm rtc_ops fail with -EIO / -EINVAL. The rtc-core expects a rtc driver which does not support rtc alarms to not have alarm ops at all. Otherwise the wakealarm sysfs attr will read as empty rather then returning an error, making it impossible for userspace to find out beforehand if alarms are supported. A system without an IRQ for the RTC before this patch: [root@localhost ~]# cat /sys/class/rtc/rtc0/wakealarm [root@localhost ~]# After this patch: [root@localhost ~]# cat /sys/class/rtc/rtc0/wakealarm cat: /sys/class/rtc/rtc0/wakealarm: No such file or directory [root@localhost ~]# This fixes gnome-session + systemd trying to use suspend-then-hibernate, which causes systemd to abort the suspend when writing the RTC alarm fails. BugLink: https://github.com/systemd/systemd/issues/9988 Signed-off-by: Hans de Goede Signed-off-by: Alexandre Belloni commit 6bdc9977fcdedf47118d2caf7270a19f4b6d8a8f Author: Vasily Averin Date: Wed Nov 7 11:10:21 2018 -0500 ext4: fix buffer leak in ext4_xattr_move_to_block() on error path Fixes: 3f2571c1f91f ("ext4: factor out xattr moving") Fixes: 6dd4ee7cab7e ("ext4: Expand extra_inodes space per ...") Reviewed-by: Jan Kara Signed-off-by: Vasily Averin Signed-off-by: Theodore Ts'o Cc: stable@kernel.org # 2.6.23 commit a89f84a56ec95fd66b839bf9c545f8a59a4ffcd5 Merge: 9be66f55b131 fd5ba6ee3187 Author: Olof Johansson Date: Wed Nov 7 08:07:59 2018 -0800 Merge tag 'stratix10_dts_fix_for_v4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux into fixes ARM: dts: stratix10: fix multicast filtering On Stratix 10, the EMAC has 256 hash buckets for multicast filtering. This needs to be specified in DTS, otherwise the stmmac driver defaults to 64 buckets and initializes the filter incorrectly. As a result, e.g. valid IPv6 multicast traffic ends up being dropped. * tag 'stratix10_dts_fix_for_v4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux: arm64: dts: stratix10: fix multicast filtering Signed-off-by: Olof Johansson commit 45ae932d246f721e6584430017176cbcadfde610 Author: Vasily Averin Date: Wed Nov 7 11:07:01 2018 -0500 ext4: release bs.bh before re-using in ext4_xattr_block_find() bs.bh was taken in previous ext4_xattr_block_find() call, it should be released before re-using Fixes: 7e01c8e5420b ("ext3/4: fix uninitialized bs in ...") Signed-off-by: Vasily Averin Signed-off-by: Theodore Ts'o Cc: stable@kernel.org # 2.6.26 commit ecaaf408478b6fb4d9986f9b6652f3824e374f4c Author: Vasily Averin Date: Wed Nov 7 11:01:33 2018 -0500 ext4: fix buffer leak in ext4_xattr_get_block() on error path Fixes: dec214d00e0d ("ext4: xattr inode deduplication") Signed-off-by: Vasily Averin Signed-off-by: Theodore Ts'o Cc: stable@kernel.org # 4.13 commit 9be66f55b1319d71d492ac1e58a3c352e0b23070 Merge: 6ff6bc46c0a4 eab53fdfd60a Author: Olof Johansson Date: Wed Nov 7 07:59:33 2018 -0800 Merge tag 'renesas-fixes-for-v4.20' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into fixes Renesas ARM Based SoC Fixes for v4.20 * R-Car V3H (r8a77980) based Condor board - Switch from EtherAVB to GEther to match offical boards * RZ/G2E (ra8774c0) SoC: correct documentation of part number * R-Car H3 (r8a7795) SoC: reinstate all DMA channels on HSCIF2 * tag 'renesas-fixes-for-v4.20' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: arm64: dts: renesas: condor: switch from EtherAVB to GEther dt-bindings: arm: Fix RZ/G2E part number arm64: dts: renesas: r8a7795: add missing dma-names on hscif2 Signed-off-by: Olof Johansson commit af18e35bfd01e6d65a5e3ef84ffe8b252d1628c5 Author: Vasily Averin Date: Wed Nov 7 10:56:28 2018 -0500 ext4: fix possible leak of s_journal_flag_rwsem in error path Fixes: c8585c6fcaf2 ("ext4: fix races between changing inode journal ...") Signed-off-by: Vasily Averin Signed-off-by: Theodore Ts'o Cc: stable@kernel.org # 4.7 commit f26621e60b35369bca9228bc936dc723b3e421af Author: Borislav Petkov Date: Mon Nov 5 10:33:07 2018 +0100 resource/docs: Complete kernel-doc style function documentation Add the missing kernel-doc style function parameters documentation. Signed-off-by: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: akpm@linux-foundation.org Cc: linux-tip-commits@vger.kernel.org Cc: rdunlap@infradead.org Fixes: b69c2e20f6e4 ("resource: Clean it up a bit") Link: http://lkml.kernel.org/r/20181105093307.GA12445@zn.tnic Signed-off-by: Ingo Molnar commit 9e463084cdb22e0b56b2dfbc50461020409a5fd3 Author: Theodore Ts'o Date: Wed Nov 7 10:32:53 2018 -0500 ext4: fix possible leak of sbi->s_group_desc_leak in error path Fixes: bfe0a5f47ada ("ext4: add more mount time checks of the superblock") Reported-by: Vasily Averin Signed-off-by: Theodore Ts'o Cc: stable@kernel.org # 4.18 commit 943126417891372d56aa3fe46295cbf53db31370 Author: Srinivas Kandagatla Date: Tue Oct 16 10:57:48 2018 +0100 slimbus: ngd: remove unnecessary check SLIM_MSG_CLK_PAUSE_SEQ_FLG is never set in any of the slim core, so performing a check in ngd driver is totally unnecessary. Also this patch fixes warning about mc field overflow reported with CoverityScan. Making clk pause feature optional will be added to slim core in next development cycle. Reported-by: Colin Ian King Fixes: 917809e2280b ("slimbus: ngd: Add qcom SLIMBus NGD driver") Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman commit 214782da8fe8497b9af39095c784f3a633e377ec Merge: df5e31c204b3 5e7154ff5e8e Author: Joonas Lahtinen Date: Wed Nov 7 15:34:09 2018 +0200 Merge tag 'gvt-fixes-2018-11-07' of https://github.com/intel/gvt-linux into drm-intel-fixes gvt-fixes-2018-11-07 - Fix invalidate of old ggtt entry (Hang) - Fix partial ggtt entry update in any order (Hang) - Fix one mask setting for chicken reg (Xinyun) - Fix eDP warning in guest (Longhe) Signed-off-by: Joonas Lahtinen From: Zhenyu Wang Link: https://patchwork.freedesktop.org/patch/msgid/20181107023137.GO25194@zhen-hp.sh.intel.com commit e531efa1e92b888acce45785b3ae69278fa712c0 Author: Zhao Wei Liew Date: Thu Nov 1 01:32:46 2018 +0000 Documentation: cpufreq: Correct a typo Fix a typo in the admin-guide documentation for cpufreq. Signed-off-by: Zhao Wei Liew Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki commit 6ef28a04d1ccf718eee069b72132ce4aa1e52ab9 Author: Anson Huang Date: Mon Nov 5 00:59:28 2018 +0000 cpufreq: imx6q: add return value check for voltage scale Add return value check for voltage scale when ARM clock rate change fail. Signed-off-by: Anson Huang Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki commit 8d72ee3266f08fd3490011ee7b95ffc31e66fd6d Author: Viresh Kumar Date: Mon Oct 29 12:47:40 2018 +0530 Documentation: cpu-freq: Frequencies aren't always sorted The order in which the frequencies are displayed in cpufreq stats depends on the order in which the frequencies were sorted in the frequency table provided to cpufreq core by the cpufreq driver. They can be completely unsorted as well. The documentation's claim that the stats will be sorted in descending order is hence incorrect and here is an attempt to fix it. Reported-by: Pavel Signed-off-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki commit f6501f49199097b99e4e263644d88c90d1ec1060 Author: Mattias Jacobsson <2pi@mok.nu> Date: Sun Oct 21 11:25:37 2018 +0200 USB: misc: appledisplay: add 20" Apple Cinema Display Add another Apple Cinema Display to the list of supported displays Signed-off-by: Mattias Jacobsson <2pi@mok.nu> Cc: stable Signed-off-by: Greg Kroah-Hartman commit deefd24228a172d1b27d4a9adbfd2cdacd60ae64 Author: Kai-Heng Feng Date: Fri Oct 26 13:33:15 2018 +0800 USB: quirks: Add no-lpm quirk for Raydium touchscreens Raydium USB touchscreen fails to set config if LPM is enabled: [ 2.030658] usb 1-8: New USB device found, idVendor=2386, idProduct=3119 [ 2.030659] usb 1-8: New USB device strings: Mfr=1, Product=2, SerialNumber=0 [ 2.030660] usb 1-8: Product: Raydium Touch System [ 2.030661] usb 1-8: Manufacturer: Raydium Corporation [ 7.132209] usb 1-8: can't set config #1, error -110 Same behavior can be observed on 2386:3114. Raydium claims the touchscreen supports LPM under Windows, so I used Microsoft USB Test Tools (MUTT) [1] to check its LPM status. MUTT shows that the LPM doesn't work under Windows, either. So let's just disable LPM for Raydium touchscreens. [1] https://docs.microsoft.com/en-us/windows-hardware/drivers/usbcon/usb-test-tools Signed-off-by: Kai-Heng Feng Cc: stable Signed-off-by: Greg Kroah-Hartman commit a77112577667cbda7c6292c52d909636aef31fd9 Author: Emmanuel Pescosta Date: Fri Oct 26 14:48:09 2018 +0200 usb: quirks: Add delay-init quirk for Corsair K70 LUX RGB Following on from this patch: https://lkml.org/lkml/2017/11/3/516, Corsair K70 LUX RGB keyboards also require the DELAY_INIT quirk to start correctly at boot. Dmesg output: usb 1-6: string descriptor 0 read error: -110 usb 1-6: New USB device found, idVendor=1b1c, idProduct=1b33 usb 1-6: New USB device strings: Mfr=1, Product=2, SerialNumber=3 usb 1-6: can't set config #1, error -110 Signed-off-by: Emmanuel Pescosta Cc: stable Signed-off-by: Greg Kroah-Hartman commit 781f0766cc41a9dd2e5d118ef4b1d5d89430257b Author: Kai-Heng Feng Date: Fri Oct 19 16:14:50 2018 +0800 USB: Wait for extra delay time after USB_PORT_FEAT_RESET for quirky hub Devices connected under Terminus Technology Inc. Hub (1a40:0101) may fail to work after the system resumes from suspend: [ 206.063325] usb 3-2.4: reset full-speed USB device number 4 using xhci_hcd [ 206.143691] usb 3-2.4: device descriptor read/64, error -32 [ 206.351671] usb 3-2.4: device descriptor read/64, error -32 Info for this hub: T: Bus=03 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#= 2 Spd=480 MxCh= 4 D: Ver= 2.00 Cls=09(hub ) Sub=00 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=1a40 ProdID=0101 Rev=01.11 S: Product=USB 2.0 Hub C: #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=100mA I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub Some expirements indicate that the USB devices connected to the hub are innocent, it's the hub itself is to blame. The hub needs extra delay time after it resets its port. Hence wait for extra delay, if the device is connected to this quirky hub. Signed-off-by: Kai-Heng Feng Cc: stable Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit c948c6915b620f075496846df8d4487ee0c56121 Author: Larry Finger Date: Tue Nov 6 21:33:14 2018 -0600 staging: rtl8723bs: Fix incorrect sense of ether_addr_equal In commit b37f9e1c3801 ("staging: rtl8723bs: Fix lines too long in update_recvframe_attrib()."), the refactoring involved replacing two memcmp() calls with ether_addr_equal() calls. What the author missed is that memcmp() returns false when the two strings are equal, whereas ether_addr_equal() returns true when the two addresses are equal. One side effect of this error is that the strength of an unassociated AP was much stronger than the same AP after association. This bug is reported at bko#201611. Fixes: b37f9e1c3801 ("staging: rtl8723bs: Fix lines too long in update_recvframe_attrib().") Cc: Stable Cc: youling257 Cc: u.srikant.patnaik@gmail.com Reported-and-tested-by: youling257 Signed-off-by: Larry Finger Signed-off-by: Greg Kroah-Hartman commit 354e379684fcc70ab8d5450b4d57bd92b5294dfd Author: Sergio Paracuellos Date: Sat Oct 20 13:31:06 2018 +0200 staging: mt7621-dma: fix potentially dereferencing uninitialized 'tx_desc' Function 'mtk_hsdma_start_transfer' uses 'tx_desc' pointer which can be dereferenced before it is initializated. Initializate pointer before avoiding the problem. Fixes: 0853c7a53eb3 ("staging: mt7621-dma: ralink: add rt2880 dma engine") Reported-by: Dan Carpenter Signed-off-by: Sergio Paracuellos Cc: stable Signed-off-by: Greg Kroah-Hartman commit 4dc2a3cd27856531cf92762fea2eb9468efe552f Author: Spencer E. Olson Date: Wed Oct 24 08:33:40 2018 -0600 staging: comedi: clarify/unify macros for NI macro-defined terminals Uses a single macro to define multiple macros that represent a series of terminals for NI devices. This patch also redefines NI_MAX_COUNTERS as the maximum number of counters possible on NI devices (instead of the maximum index of the counters). This was a little confusing and caused a bug in commit 347e244884c3b ("staging: comedi: tio: implement global tio/ctr routing") when setting/reading registers for counter terminals. Fixes: 347e244884c3b ("staging: comedi: tio: implement global tio/ctr routing") Signed-off-by: Spencer E. Olson Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman commit b7c56d7bfe834904d9d332e0cfbf929b75976f8a Author: Colin Ian King Date: Fri Nov 2 19:01:26 2018 +0000 drivers: staging: cedrus: find ctx before dereferencing it ctx Currently if count is an invalid value the v4l2_info message will dereference a null ctx pointer to get the dev information. Fix this by finding ctx first and then checking for an invalid count, this way ctxt will be non-null hence avoiding the null pointer dereference. Detected by CoverityScan, CID#1475337 ("Explicit null dereferenced") Fixes: 50e761516f2b ("media: platform: Add Cedrus VPU decoder driver") Signed-off-by: Colin Ian King Acked-by: Maxime Ripard Signed-off-by: Greg Kroah-Hartman commit c3e43d8b958bd6849817393483e805d8638a8ab7 Author: Christophe JAILLET Date: Wed Oct 17 10:15:34 2018 +0200 staging: rtl8723bs: Fix the return value in case of error in 'rtw_wx_read32()' We return 0 unconditionally in 'rtw_wx_read32()'. However, 'ret' is set to some error codes in several error handling paths. Return 'ret' instead to propagate the error code. Fixes: 554c0a3abf216 ("staging: Add rtl8723bs sdio wifi driver") Signed-off-by: Christophe JAILLET Signed-off-by: Greg Kroah-Hartman commit 9a1ec4eb6f3722a65a267bb7d14c371d73f66c5b Author: Spencer E. Olson Date: Wed Oct 24 08:46:59 2018 -0600 staging: comedi: ni_mio_common: scale ao INSN_CONFIG_GET_CMD_TIMING_CONSTRAINTS Fixes implementation of INSN_CONFIG_GET_CMD_TIMING_CONSTRAINTS for ni_mio devices. The previous patch should have used the channel information passed in to scale the result by the number of channels being used. Fixes: 51fd36738383 ("staging: comedi: ni_mio_common: implement INSN_CONFIG_GET_CMD_TIMING_CONSTRAINTS") Signed-off-by: Spencer E. Olson Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman commit 28c5bcf74fa07c25d5bd118d1271920f51ce2a98 Author: Scott Wood Date: Tue Nov 6 19:49:34 2018 -0600 KVM: PPC: Move and undef TRACE_INCLUDE_PATH/FILE TRACE_INCLUDE_PATH and TRACE_INCLUDE_FILE are used by , so like that #include, they should be outside #ifdef protection. They also need to be #undefed before defining, in case multiple trace headers are included by the same C file. This became the case on book3e after commit cf4a6085151a ("powerpc/mm: Add missing tracepoint for tlbie"), leading to the following build error: CC arch/powerpc/kvm/powerpc.o In file included from arch/powerpc/kvm/powerpc.c:51:0: arch/powerpc/kvm/trace.h:9:0: error: "TRACE_INCLUDE_PATH" redefined [-Werror] #define TRACE_INCLUDE_PATH . ^ In file included from arch/powerpc/kvm/../mm/mmu_decl.h:25:0, from arch/powerpc/kvm/powerpc.c:48: ./arch/powerpc/include/asm/trace.h:224:0: note: this is the location of the previous definition #define TRACE_INCLUDE_PATH asm ^ cc1: all warnings being treated as errors Reported-by: Christian Zigotzky Signed-off-by: Scott Wood Signed-off-by: Michael Ellerman commit 99b77fef3c6c69bb7664f1ac97a69d5b17968dae Author: Yishai Hadas Date: Wed Oct 31 12:20:28 2018 +0200 net/mlx5: Fix XRC SRQ umem valid bits Adapt XRC SRQ to the latest HW specification with fixed definition around umem valid bits. The previous definition relied on a bit which was taken for other purposes in legacy FW. Fixes: bd37197554eb ("net/mlx5: Update mlx5_ifc with DEVX UID bits") Signed-off-by: Yishai Hadas Reviewed-by: Artemy Kovalyov Signed-off-by: Leon Romanovsky commit f635e48e866ee1a47d2d42ce012fdcc07bf55853 Author: Quinn Tran Date: Tue Nov 6 00:51:21 2018 -0800 scsi: qla2xxx: Initialize port speed to avoid setting lower speed This patch initializes port speed so that firmware does not set lower operating speed. Setting lower speed in firmware impacts WRITE perfomance. Fixes: 726b85487067 ("qla2xxx: Add framework for async fabric discovery") Cc: Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Tested-by: Laurence Oberman Reviewed-by: Ewan D. Milne Signed-off-by: Martin K. Petersen commit aca49ee041cbdd329c55d4dbcd6b3d4b9af240e4 Author: Martin K. Petersen Date: Mon Nov 5 22:49:47 2018 -0500 Revert "scsi: ufs: Disable blk-mq for now" This reverts commit d87161bea405e3260377026ca8a704a3f68bd67a. The issues that forced us to disable blk_mq for ufs have been resolved. Signed-off-by: Martin K. Petersen commit d08f44b18ccbe4de36282df6343dc098922d1159 Merge: d99de699ac03 989534cfcac8 Author: Dave Airlie Date: Wed Nov 7 09:32:53 2018 +1000 Merge tag 'exynos-drm-fixes-for-v4.20-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-fixes Three regressions - Revert frame counter support . This patch fixes a issue which doesn't work extension and clone mode because some CRTC devices don't provide frame counter value properly. - Fix lack of fbdev on Rinato and trats boards. . This patch considers for connector to be registered by DSI after DRM device is registered, and also it makes fbdev initializaion to be done even if no connector at the moment. - Check for dsi->panel object correctly . This patch fixes checking for dsi->panel. of_drm_find_panel function returns panel object or error value so error value should be checked using IS_ERR macro. Signed-off-by: Dave Airlie From: Inki Dae Link: https://patchwork.freedesktop.org/patch/msgid/1541407733-7632-1-git-send-email-inki.dae@samsung.com commit d99de699ac034ff1b706496a33f49bd7e1e8ae30 Merge: 651022382c7f 6fce3a406108 Author: Dave Airlie Date: Wed Nov 7 09:32:22 2018 +1000 Merge branch 'etnaviv/fixes' of https://git.pengutronix.de/git/lst/linux into drm-fixes Single etnaviv fence fix for GPU recovery. Signed-off-by: Dave Airlie From: Lucas Stach Link: https://patchwork.freedesktop.org/patch/msgid/1541522424.2508.26.camel@pengutronix.de commit 1bfc204dc0e7a690ab8440e91bb7d1a324320fdc Author: Vasily Averin Date: Tue Nov 6 17:45:02 2018 -0500 ext4: remove unneeded brelse call in ext4_xattr_inode_update_ref() Signed-off-by: Vasily Averin Signed-off-by: Theodore Ts'o commit 4f32c38b4662312dd3c5f113d8bdd459887fb773 Author: Theodore Ts'o Date: Tue Nov 6 17:18:17 2018 -0500 ext4: avoid possible double brelse() in add_new_gdb() on error path Fixes: b40971426a83 ("ext4: add error checking to calls to ...") Reported-by: Vasily Averin Signed-off-by: Theodore Ts'o Cc: stable@kernel.org # 2.6.38 commit feaf264ce7f8d54582e2f66eb82dd9dd124c94f3 Author: Vasily Averin Date: Tue Nov 6 17:01:36 2018 -0500 ext4: avoid buffer leak in ext4_orphan_add() after prior errors Fixes: d745a8c20c1f ("ext4: reduce contention on s_orphan_lock") Fixes: 6e3617e579e0 ("ext4: Handle non empty on-disk orphan link") Cc: Dmitry Monakhov Signed-off-by: Vasily Averin Signed-off-by: Theodore Ts'o Cc: stable@kernel.org # 2.6.34 commit a6758309a005060b8297a538a457c88699cb2520 Author: Vasily Averin Date: Tue Nov 6 16:49:50 2018 -0500 ext4: avoid buffer leak on shutdown in ext4_mark_iloc_dirty() ext4_mark_iloc_dirty() callers expect that it releases iloc->bh even if it returns an error. Fixes: 0db1ff222d40 ("ext4: add shutdown bit and check for it") Signed-off-by: Vasily Averin Signed-off-by: Theodore Ts'o Cc: stable@kernel.org # 4.11 commit 5822e9539dc11721b53d74accd4c091b982011d0 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 04b94af4e348acc52546b9b19c933575f26589a1 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 ce2127c462d9d1c0832f088b23158420e87e71a0 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 7875a22625aa7f11befba84bd1e669201032947d 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 689e7b34234e29e5168894b27b752a4e16ef08c4 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 3426d66d3e74ab0ab264a85e0795a17e3dde1e71 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 02680efbb10be0d2c867fe722ae23d588f6bebef 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 8ed4ec32d5b1f04a641978322a38a8d7089553bb 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 63088da9472854408ae5d7c47bd011daf9e1a81b Author: Alex Deucher Date: Tue Nov 6 16:06:32 2018 -0500 Revert "drm/amd/display: set backlight level limit to 1" This reverts commit 0cafc82fae41531b0162150f9a97f2c74f97118f. This breaks some apps that assume 0 is minimum brightness. Revert for 4.20. This is fixed properly for drm-next/4.21 in: "drm/amd: Don't fail on backlight = 0" However, that patch depends on more extensive changes to the backlight interface which are too invasive for -fixes. Fixes: Bugzilla: https://bugs.freedesktop.org/108668 Signed-off-by: Alex Deucher commit db6aee62406d9fbb53315fcddd81f1dc271d49fa Author: Vasily Averin Date: Tue Nov 6 16:20:40 2018 -0500 ext4: fix possible inode leak in the retry loop of ext4_resize_fs() Fixes: 1c6bd7173d66 ("ext4: convert file system to meta_bg if needed ...") Signed-off-by: Vasily Averin Signed-off-by: Theodore Ts'o Cc: stable@kernel.org # 3.7 commit f348e2241fb73515d65b5d77dd9c174128a7fbf2 Author: Vasily Averin Date: Tue Nov 6 16:16:01 2018 -0500 ext4: fix missing cleanup if ext4_alloc_flex_bg_array() fails while resizing Fixes: 117fff10d7f1 ("ext4: grow the s_flex_groups array as needed ...") Signed-off-by: Vasily Averin Signed-off-by: Theodore Ts'o Cc: stable@kernel.org # 3.7 commit 81bd415c91eb966118d773dddf254aebf3022411 Author: Mathieu Malaterre Date: Wed Jun 6 21:42:32 2018 +0200 watchdog/core: Add missing prototypes for weak functions The split out of the hard lockup detector exposed two new weak functions, but no prototypes for them, which triggers the build warning: kernel/watchdog.c:109:12: warning: no previous prototype for ‘watchdog_nmi_enable’ [-Wmissing-prototypes] kernel/watchdog.c:115:13: warning: no previous prototype for ‘watchdog_nmi_disable’ [-Wmissing-prototypes] Add the prototypes. Fixes: 73ce0511c436 ("kernel/watchdog.c: move hardlockup detector to separate file") Signed-off-by: Mathieu Malaterre Signed-off-by: Thomas Gleixner Cc: Babu Moger Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20180606194232.17653-1-malat@debian.org commit 4c9b658eeaefedd402a59e858d8ac3bfdf6153e3 Author: Miroslav Lichvar Date: Fri Oct 26 19:13:00 2018 +0200 igb: shorten maximum PHC timecounter update interval The timecounter needs to be updated at least once per ~550 seconds in order to avoid a 40-bit SYSTIM timestamp to be misinterpreted as an old timestamp. Since commit 500462a9de65 ("timers: Switch to a non-cascading wheel"), scheduling of delayed work seems to be less accurate and a requested delay of 540 seconds may actually be longer than 550 seconds. Also, the PHC may be adjusted to run up to 6% faster than real time and the system clock up to 10% slower. Shorten the delay to 360 seconds to be sure the timecounter is updated in time. This fixes an issue with HW timestamps on 82580/I350/I354 being off by ~1100 seconds for few seconds every ~9 minutes. Cc: Thomas Gleixner Signed-off-by: Miroslav Lichvar Acked-by: Jacob Keller Acked-by: Richard Cochran Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher commit d944b46992f8e99b6bdc721e44b02e5ca294fa2b Author: Brett Creeley Date: Fri Oct 26 10:40:59 2018 -0700 ice: Fix the bytecount sent to netdev_tx_sent_queue Currently if the driver does a TSO offload the bytecount sent to netdev_tx_sent_queue will be incorrect. This is because in ice_tso we overwrite the initial value that we set in ice_tx_map. This creates a mismatch between the Tx and Tx clean flow. In the Tx clean flow we calculate the bytecount (called total_bytes) as we clean the descriptors so the value used in the Tx clean path is correct. Fix this by using += in ice_tso instead of =. This fixes the mismatch in bytecount mentioned above. Signed-off-by: Brett Creeley Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit c585ea42ec75e8d3afa278b7095d9f0dd6ee515b Author: Brett Creeley Date: Fri Oct 26 10:40:58 2018 -0700 ice: Fix tx_timeout in PF driver Prior to this commit the driver was running into tx_timeouts when a queue was stressed enough. This was happening because the HW tail and SW tail (NTU) were incorrectly out of sync. Consequently this was causing the HW head to collide with the HW tail, which to the hardware means that all descriptors posted for Tx have been processed. Due to the Tx logic used in the driver SW tail and HW tail are allowed to be out of sync. This is done as an optimization because it allows the driver to write HW tail as infrequently as possible, while still updating the SW tail index to keep track. However, there are situations where this results in the tail never getting updated, resulting in Tx timeouts. Tx HW tail write condition: if (netif_xmit_stopped(txring_txq(tx_ring) || !skb->xmit_more) writel(sw_tail, tx_ring->tail); An issue was found in the Tx logic that was causing the afore mentioned condition for updating HW tail to never happen, causing tx_timeouts. In ice_xmit_frame_ring we calculate how many descriptors we need for the Tx transaction based on the skb the kernel hands us. This is then passed into ice_maybe_stop_tx along with some extra padding to determine if we have enough descriptors available for this transaction. If we don't then we return -EBUSY to the stack, otherwise we move on and eventually prepare the Tx descriptors accordingly in ice_tx_map and set next_to_watch. In ice_tx_map we make another call to ice_maybe_stop_tx with a value of MAX_SKB_FRAGS + 4. The key here is that this value is possibly less than the value we sent in the first call to ice_maybe_stop_tx in ice_xmit_frame_ring. Now, if the number of unused descriptors is between MAX_SKB_FRAGS + 4 and the value used in the first call to ice_maybe_stop_tx in ice_xmit_frame_ring then we do not update the HW tail because of the "Tx HW tail write condition" above. This is because in ice_maybe_stop_tx we return success from ice_maybe_stop_tx instead of calling __ice_maybe_stop_tx and subsequently calling netif_stop_subqueue, which sets the __QUEUE_STATE_DEV_XOFF bit. This bit is then checked in the "Tx HW tail write condition" by calling netif_xmit_stopped and subsequently updating HW tail if the afore mentioned bit is set. In ice_clean_tx_irq, if next_to_watch is not NULL, we end up cleaning the descriptors that HW sets the DD bit on and we have the budget. The HW head will eventually run into the HW tail in response to the description in the paragraph above. The next time through ice_xmit_frame_ring we make the initial call to ice_maybe_stop_tx with another skb from the stack. This time we do not have enough descriptors available and we return NETDEV_TX_BUSY to the stack and end up setting next_to_watch to NULL. This is where we are stuck. In ice_clean_tx_irq we never clean anything because next_to_watch is always NULL and in ice_xmit_frame_ring we never update HW tail because we already return NETDEV_TX_BUSY to the stack and eventually we hit a tx_timeout. This issue was fixed by making sure that the second call to ice_maybe_stop_tx in ice_tx_map is passed a value that is >= the value that was used on the initial call to ice_maybe_stop_tx in ice_xmit_frame_ring. This was done by adding the following defines to make the logic more clear and to reduce the chance of mucking this up again: ICE_CACHE_LINE_BYTES 64 ICE_DESCS_PER_CACHE_LINE (ICE_CACHE_LINE_BYTES / \ sizeof(struct ice_tx_desc)) ICE_DESCS_FOR_CTX_DESC 1 ICE_DESCS_FOR_SKB_DATA_PTR 1 The ICE_CACHE_LINE_BYTES being 64 is an assumption being made so we don't have to figure this out on every pass through the Tx path. Instead I added a sanity check in ice_probe to verify cache line size and print a message if it's not 64 Bytes. This will make it easier to file issues if they are seen when the cache line size is not 64 Bytes when reading from the GLPCI_CNF2 register. Signed-off-by: Brett Creeley Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 25525b69bb44a628841492f44a5a8e74f34724f4 Author: Dave Ertman Date: Fri Oct 26 10:40:57 2018 -0700 ice: Fix napi delete calls for remove In the remove path, the vsi->netdev is being set to NULL before the call to free vectors. This is causing the netif_napi_del call to never be made. Add a call to ice_napi_del to the same location as the calls to unregister_netdev and just prior to them. This will use the reverse flow as the register and netif_napi_add calls. Signed-off-by: Dave Ertman Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 31082519c11b01fe1fb6dd512055f252812c1508 Author: Anirudh Venkataramanan Date: Fri Oct 26 10:40:56 2018 -0700 ice: Fix typo in error message Print should say "Enabling" instead of "Enaabling" Signed-off-by: Akeem G Abodunrin Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 58297dd133f64ea028e7d52dd00cd9ff8aa4479f Author: Md Fahad Iqbal Polash Date: Fri Oct 26 10:40:55 2018 -0700 ice: Fix flags for port VLAN According to the spec, whenever insert PVID field is set, the VLAN driver insertion mode should be set to 01b which isn't done currently. Fix it. Signed-off-by: Md Fahad Iqbal Polash Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 9ecd25c26810a61b9c3abc6c73de32dca6da96e1 Author: Anirudh Venkataramanan Date: Fri Oct 26 10:40:54 2018 -0700 ice: Remove duplicate addition of VLANs in replay path ice_restore_vlan and active_vlans were originally put in place to reprogram VLAN filters in the replay path. This is now done as part of the much broader VSI rebuild/replay framework. So remove both ice_restore_vlan and active_vlans Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 33e055fcc26909b1d66b5d1f334aee38356068d7 Author: Victor Raj Date: Fri Oct 26 10:40:53 2018 -0700 ice: Free VSI contexts during for unload In the unload path, all VSIs are freed. Also free the related VSI contexts to prevent memory leaks. Signed-off-by: Victor Raj Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 0f5d4c21a50716f8bd4e220544b82dca7408d113 Author: Akeem G Abodunrin Date: Fri Oct 26 10:40:52 2018 -0700 ice: Fix dead device link issue with flow control Setting Rx or Tx pause parameter currently results in link loss on the interface, requiring the platform/host to be cold power cycled. Fix it. Signed-off-by: Akeem G Abodunrin Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit afd9d4ab58db20029a75cf82f23b6a5641cd7d6f Author: Anirudh Venkataramanan Date: Fri Oct 26 10:40:51 2018 -0700 ice: Check for reset in progress during remove The remove path does not currently check to see if a reset is in progress before proceeding. This can cause a resource collision resulting in various types of errors. Check for reset in progress and wait for a reasonable amount of time before allowing the remove to progress. Signed-off-by: Dave Ertman Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit ce317dd9f809c8da9656c88761e30f0a82a8c2e6 Author: Anirudh Venkataramanan Date: Fri Oct 26 10:40:50 2018 -0700 ice: Set carrier state and start/stop queues in rebuild Set the carrier state post rebuild by querying the link status. Also start/stop queues based on link status. Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 86a484bda787d542d4a968bd7742bcf844c8adb2 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 a48777fdda7d13179979a889e1fb87655a783cc0 Author: Eial Czerwacki Date: Mon Nov 5 19:31:54 2018 +0200 x86/vsmp: Remove dependency on pv_irq_ops vSMP dependency on pv_irq_ops has been removed some years ago, but the code still deals with pv_irq_ops. In short, "cap & ctl & (1 << 4)" is always returning 0, so all PARAVIRT/PARAVIRT_XXL code related to that can be removed. However, the rest of the code depends on CONFIG_PCI, so fix it accordingly. Rename set_vsmp_pv_ops to set_vsmp_ctl as the original name does not make sense anymore. Signed-off-by: Eial Czerwacki Signed-off-by: Thomas Gleixner Acked-by: Shai Fultheim Cc: Juergen Gross Link: https://lkml.kernel.org/r/1541439114-28297-1-git-send-email-eial@scalemp.com commit b082f2dd80612015cd6d9d84e52099734ec9a0e1 Author: Kirill A. Shutemov Date: Fri Oct 26 15:28:56 2018 +0300 x86/ldt: Remove unused variable in map_ldt_struct() Splitting out the sanity check in map_ldt_struct() moved page table syncing into a separate function, which made the pgd variable unused. Remove it. [ tglx: Massaged changelog ] Fixes: 9bae3197e15d ("x86/ldt: Split out sanity check in map_ldt_struct()") Signed-off-by: Kirill A. Shutemov Signed-off-by: Thomas Gleixner Reviewed-by: Andy Lutomirski Cc: bp@alien8.de Cc: hpa@zytor.com Cc: dave.hansen@linux.intel.com Cc: peterz@infradead.org Cc: boris.ostrovsky@oracle.com Cc: jgross@suse.com Cc: bhe@redhat.com Cc: willy@infradead.org Cc: linux-mm@kvack.org Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20181026122856.66224-4-kirill.shutemov@linux.intel.com commit a0e6e0831c516860fc7f9be1db6c081fe902ebcf Author: Kirill A. Shutemov Date: Fri Oct 26 15:28:55 2018 +0300 x86/ldt: Unmap PTEs for the slot before freeing LDT pages modify_ldt(2) leaves the old LDT mapped after switching over to the new one. The old LDT gets freed and the pages can be re-used. Leaving the mapping in place can have security implications. The mapping is present in the userspace page tables and Meltdown-like attacks can read these freed and possibly reused pages. It's relatively simple to fix: unmap the old LDT and flush TLB before freeing the old LDT memory. This further allows to avoid flushing the TLB in map_ldt_struct() as the slot is unmapped and flushed by unmap_ldt_struct() or has never been mapped at all. [ tglx: Massaged changelog and removed the needless line breaks ] Fixes: f55f0501cbf6 ("x86/pti: Put the LDT in its own PGD if PTI is on") Signed-off-by: Kirill A. Shutemov Signed-off-by: Thomas Gleixner Cc: bp@alien8.de Cc: hpa@zytor.com Cc: dave.hansen@linux.intel.com Cc: luto@kernel.org Cc: peterz@infradead.org Cc: boris.ostrovsky@oracle.com Cc: jgross@suse.com Cc: bhe@redhat.com Cc: willy@infradead.org Cc: linux-mm@kvack.org Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20181026122856.66224-3-kirill.shutemov@linux.intel.com commit d52888aa2753e3063a9d3a0c9f72f94aa9809c15 Author: Kirill A. Shutemov Date: Fri Oct 26 15:28:54 2018 +0300 x86/mm: Move LDT remap out of KASLR region on 5-level paging On 5-level paging the LDT remap area is placed in the middle of the KASLR randomization region and it can overlap with the direct mapping, the vmalloc or the vmap area. The LDT mapping is per mm, so it cannot be moved into the P4D page table next to the CPU_ENTRY_AREA without complicating PGD table allocation for 5-level paging. The 4 PGD slot gap just before the direct mapping is reserved for hypervisors, so it cannot be used. Move the direct mapping one slot deeper and use the resulting gap for the LDT remap area. The resulting layout is the same for 4 and 5 level paging. [ tglx: Massaged changelog ] Fixes: f55f0501cbf6 ("x86/pti: Put the LDT in its own PGD if PTI is on") Signed-off-by: Kirill A. Shutemov Signed-off-by: Thomas Gleixner Reviewed-by: Andy Lutomirski Cc: bp@alien8.de Cc: hpa@zytor.com Cc: dave.hansen@linux.intel.com Cc: peterz@infradead.org Cc: boris.ostrovsky@oracle.com Cc: jgross@suse.com Cc: bhe@redhat.com Cc: willy@infradead.org Cc: linux-mm@kvack.org Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20181026122856.66224-2-kirill.shutemov@linux.intel.com commit 042cb56478152b31c50bea8a784fc826891eb38e Author: Tao Ren Date: Mon Nov 5 14:35:40 2018 -0800 net: phy: Allow BCM54616S PHY to setup internal TX/RX clock delay This patch allows users to enable/disable internal TX and/or RX clock delay for BCM54616S PHYs so as to satisfy RGMII timing specifications. On a particular platform, whether TX and/or RX clock delay is required depends on how PHY connected to the MAC IP. This requirement can be specified through "phy-mode" property in the platform device tree. The patch is inspired by commit 733336262b28 ("net: phy: Allow BCM5481x PHYs to setup internal TX/RX clock delay"). Signed-off-by: Tao Ren Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 45fd808091449086f5bf83dff263ad081108020d Merge: 163c8d54a997 8e88c29b351e Author: Ingo Molnar Date: Tue Nov 6 20:03:11 2018 +0100 Merge tag 'perf-urgent-for-mingo-4.20-20181106' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent Pull perf/urgent improvements and fixes from Arnaldo Carvalho de Melo: Intel PT SQL viewer: (Adrian Hunter) - Fall back to /usr/local/lib/libxed.so - Add Selected branches report - Add help window - Fix table find when table re-ordered Intel PT debug log (Adrian Hunter) - Add more event information - Add MTC and CYC timestamps perf record: (Andi Kleen) - Support weak groups, just like with 'perf stat' perf trace: (Arnaldo Carvalho de Melo) - Start augmenting raw_syscalls:{sys_enter,sys_exit}: goal is to have a generic, arch independent eBPF kernel component that is programmed with syscall table details, what to copy, how many bytes, pid, arg filters from the userspace via eBPF maps by the 'perf trace' tool that continues to use all its argument beautifiers, just taking advantage of the extra pointer contents. JVMTI: (Gustavo Romero) - Fix undefined symbol scnprintf in libperf-jvmti.so perf top: (Jin Yao) - Display the LBR stats in callchain entries perf stat: (Thomas Richter) - Handle different PMU names with common prefix arm64: Will (Deacon) - Fix arm64 tools build failure wrt smp_load_{acquire,release}. Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit e8a308e5f47e545e0d41d0686c00f5f5217c5f61 Author: Vishal Verma Date: Thu Oct 25 18:37:29 2018 -0600 acpi/nfit, x86/mce: Validate a MCE's address before using it The NFIT machine check handler uses the physical address from the mce structure, and compares it against information in the ACPI NFIT table to determine whether that location lies on an NVDIMM. The mce->addr field however may not always be valid, and this is indicated by the MCI_STATUS_ADDRV bit in the status field. Export mce_usable_address() which already performs validation for the address, and use it in the NFIT handler. Fixes: 6839a6d96f4e ("nfit: do an ARS scrub on hitting a latent media error") Reported-by: Robert Elliott Signed-off-by: Vishal Verma Signed-off-by: Borislav Petkov CC: Arnd Bergmann Cc: Dan Williams CC: Dave Jiang CC: elliott@hpe.com CC: "H. Peter Anvin" CC: Ingo Molnar CC: Len Brown CC: linux-acpi@vger.kernel.org CC: linux-edac CC: linux-nvdimm@lists.01.org CC: Qiuxu Zhuo CC: "Rafael J. Wysocki" CC: Ross Zwisler CC: stable CC: Thomas Gleixner CC: Tony Luck CC: x86-ml CC: Yazen Ghannam Link: http://lkml.kernel.org/r/20181026003729.8420-2-vishal.l.verma@intel.com commit 5d96c9342c23ee1d084802dcf064caa67ecaa45b Author: Vishal Verma Date: Thu Oct 25 18:37:28 2018 -0600 acpi/nfit, x86/mce: Handle only uncorrectable machine checks The MCE handler for nfit devices is called for memory errors on a Non-Volatile DIMM and adds the error location to a 'badblocks' list. This list is used by the various NVDIMM drivers to avoid consuming known poison locations during IO. The MCE handler gets called for both corrected and uncorrectable errors. Until now, both kinds of errors have been added to the badblocks list. However, corrected memory errors indicate that the problem has already been fixed by hardware, and the resulting interrupt is merely a notification to Linux. As far as future accesses to that location are concerned, it is perfectly fine to use, and thus doesn't need to be included in the above badblocks list. Add a check in the nfit MCE handler to filter out corrected mce events, and only process uncorrectable errors. Fixes: 6839a6d96f4e ("nfit: do an ARS scrub on hitting a latent media error") Reported-by: Omar Avelar Signed-off-by: Vishal Verma Signed-off-by: Borislav Petkov CC: Arnd Bergmann CC: Dan Williams CC: Dave Jiang CC: elliott@hpe.com CC: "H. Peter Anvin" CC: Ingo Molnar CC: Len Brown CC: linux-acpi@vger.kernel.org CC: linux-edac CC: linux-nvdimm@lists.01.org CC: Qiuxu Zhuo CC: "Rafael J. Wysocki" CC: Ross Zwisler CC: stable CC: Thomas Gleixner CC: Tony Luck CC: x86-ml CC: Yazen Ghannam Link: http://lkml.kernel.org/r/20181026003729.8420-1-vishal.l.verma@intel.com commit 313a06e636808387822af24c507cba92703568b1 Author: Jeremy Linton Date: Mon Nov 5 18:14:41 2018 -0600 lib/raid6: Fix arm64 test build The lib/raid6/test fails to build the neon objects on arm64 because the correct machine type is 'aarch64'. Once this is correctly enabled, the neon recovery objects need to be added to the build. Reviewed-by: Ard Biesheuvel Signed-off-by: Jeremy Linton Signed-off-by: Catalin Marinas commit e14856f6cfbb1b96aa45a68f188b147b5bde76b4 Author: Srinivas Kandagatla Date: Tue Nov 6 11:38:57 2018 +0000 ASoC: qdsp6: q6afe-dai: Fix the dai widgets For some reason the dapm widgets are incorrectly defined from the start, Not sure how we ended up with such thing. Fix them now! Without this fix the backend dais are always powered up even if there is no active stream. Reported-by: Jimmy Cheng-Yi Chiang Reported-by: Rohit kumar Signed-off-by: Srinivas Kandagatla Signed-off-by: Mark Brown commit 9de57ff1566fd36a664c1b04a641e26fed472a9c Author: Srinivas Kandagatla Date: Tue Nov 6 11:38:56 2018 +0000 ASoC: qdsp6: q6asm-dai: Only add routing once. q6asm routing gets added multiple times as part of dai probe. Move this to q6routing routes which has those widgets defined, this also fixes the issue where these are added each time at dai probe. Signed-off-by: Srinivas Kandagatla Signed-off-by: Mark Brown commit b374e8686fc35ae124e62dc78725ea656ba1ef8a Author: Arnd Bergmann Date: Mon Nov 5 16:51:47 2018 +0100 mt76: fix building without CONFIG_LEDS_CLASS When CONFIG_LEDS_CLASS is disabled, or it is a loadable module while mt76 is built-in, we run into a link error: drivers/net/wireless/mediatek/mt76/mac80211.o: In function `mt76_register_device': mac80211.c:(.text+0xb78): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `devm_of_led_classdev_register' We don't really need a hard dependency here as the driver can presumably work just fine without LEDs, so this follows the iwlwifi example and adds a separate Kconfig option for the LED support, this will be available whenever it will link, and otherwise the respective code gets left out from the driver object. Fixes: 17f1de56df05 ("mt76: add common code shared between multiple chipsets") Signed-off-by: Arnd Bergmann Signed-off-by: Lorenzo Bianconi Signed-off-by: Kalle Valo commit 3401d42c7ea2d064d15c66698ff8eb96553179ce Author: Rafał Miłecki Date: Fri Oct 26 12:50:39 2018 +0200 brcmutil: really fix decoding channel info for 160 MHz bandwidth Previous commit /adding/ support for 160 MHz chanspecs was incomplete. It didn't set bandwidth info and didn't extract control channel info. As the result it was also using uninitialized "sb" var. This change has been tested for two chanspecs found to be reported by some devices/firmwares: 1) 60/160 (0xee32) Before: chnum:50 control_ch_num:36 After: chnum:50 control_ch_num:60 2) 120/160 (0xed72) Before: chnum:114 control_ch_num:100 After: chnum:114 control_ch_num:120 Fixes: 330994e8e8ec ("brcmfmac: fix for proper support of 160MHz bandwidth") Signed-off-by: Rafał Miłecki Signed-off-by: Kalle Valo commit b630806d7ce2051a3306fa6f1cfa31bc870d7c4b Author: John Stultz Date: Thu Oct 25 10:57:21 2018 -0700 wlcore: Fixup "Add support for optional wakeirq" After commit 3c83dd577c7f ("wlcore: Add support for optional wakeirq") landed upstream, I started seeing the following oops on my HiKey board: [ 1.870279] Unable to handle kernel read from unreadable memory at virtual address 0000000000000010 [ 1.870283] Mem abort info: [ 1.870287] ESR = 0x96000005 [ 1.870292] Exception class = DABT (current EL), IL = 32 bits [ 1.870296] SET = 0, FnV = 0 [ 1.870299] EA = 0, S1PTW = 0 [ 1.870302] Data abort info: [ 1.870306] ISV = 0, ISS = 0x00000005 [ 1.870309] CM = 0, WnR = 0 [ 1.870312] [0000000000000010] user address but active_mm is swapper [ 1.870318] Internal error: Oops: 96000005 [#1] PREEMPT SMP [ 1.870327] CPU: 0 PID: 5 Comm: kworker/0:0 Not tainted 4.19.0-05129-gb3d1e8e #48 [ 1.870331] Hardware name: HiKey Development Board (DT) [ 1.870350] Workqueue: events_freezable mmc_rescan [ 1.870358] pstate: 60400005 (nZCv daif +PAN -UAO) [ 1.870366] pc : wl1271_probe+0x210/0x350 [ 1.870371] lr : wl1271_probe+0x210/0x350 [ 1.870374] sp : ffffff80080739b0 [ 1.870377] x29: ffffff80080739b0 x28: 0000000000000000 [ 1.870384] x27: 0000000000000000 x26: 0000000000000000 [ 1.870391] x25: 0000000000000036 x24: ffffffc074ecb598 [ 1.870398] x23: ffffffc07ffdce78 x22: ffffffc0744ed808 [ 1.870404] x21: ffffffc074ecbb98 x20: ffffff8008ff9000 [ 1.870411] x19: ffffffc0744ed800 x18: ffffff8008ff9a48 [ 1.870418] x17: 0000000000000000 x16: 0000000000000000 [ 1.870425] x15: ffffffc074ecb503 x14: ffffffffffffffff [ 1.870431] x13: ffffffc074ecb502 x12: 0000000000000030 [ 1.870438] x11: 0101010101010101 x10: 0000000000000040 [ 1.870444] x9 : ffffffc075400248 x8 : ffffffc075400270 [ 1.870451] x7 : 0000000000000000 x6 : 0000000000000000 [ 1.870457] x5 : 0000000000000000 x4 : 0000000000000000 [ 1.870463] x3 : 0000000000000000 x2 : 0000000000000000 [ 1.870469] x1 : 0000000000000028 x0 : 0000000000000000 [ 1.870477] Process kworker/0:0 (pid: 5, stack limit = 0x(____ptrval____)) [ 1.870480] Call trace: [ 1.870485] wl1271_probe+0x210/0x350 [ 1.870491] sdio_bus_probe+0x100/0x128 [ 1.870500] really_probe+0x1a8/0x2b8 [ 1.870506] driver_probe_device+0x58/0x100 [ 1.870511] __device_attach_driver+0x94/0xd8 [ 1.870517] bus_for_each_drv+0x70/0xc8 [ 1.870522] __device_attach+0xe0/0x140 [ 1.870527] device_initial_probe+0x10/0x18 [ 1.870532] bus_probe_device+0x94/0xa0 [ 1.870537] device_add+0x374/0x5b8 [ 1.870542] sdio_add_func+0x60/0x88 [ 1.870546] mmc_attach_sdio+0x1b0/0x358 [ 1.870551] mmc_rescan+0x2cc/0x390 [ 1.870558] process_one_work+0x12c/0x320 [ 1.870563] worker_thread+0x48/0x458 [ 1.870569] kthread+0xf8/0x128 [ 1.870575] ret_from_fork+0x10/0x18 [ 1.870583] Code: 92400c21 b2760021 a90687a2 97e95bf9 (f9400803) [ 1.870587] ---[ end trace 1e15f81d3c139ca9 ]--- It seems since we don't have a wakeirq value in the dts, the wakeirq value in wl1271_probe() is zero, which then causes trouble in irqd_get_trigger_type(irq_get_irq_data(wakeirq)). This patch tries to address this by checking if wakeirq is zero, and not trying to add it to the resources if that is the case. Fixes: 3c83dd577c7f ("wlcore: Add support for optional wakeirq") Cc: Tony Lindgren Cc: Kalle Valo Cc: Eyal Reizer Cc: Anders Roxell Cc: linux-wireless@vger.kernel.org Acked-by: Tony Lindgren Signed-off-by: John Stultz Tested-by: Anders Roxell Signed-off-by: Kalle Valo commit 461cf036057477805a8a391e5fd0f5264a5e56a8 Author: Dan Carpenter Date: Fri Oct 19 23:08:43 2018 +0300 ath9k: Fix a locking bug in ath9k_add_interface() We tried to revert commit d9c52fd17cb4 ("ath9k: fix tx99 with monitor mode interface") but accidentally missed part of the locking change. The lock has to be held earlier so that we're holding it when we do "sc->tx99_vif = vif;" and also there in the current code there is a stray unlock before we have taken the lock. Fixes: 6df0580be8bc ("ath9k: add back support for using active monitor interfaces for tx99") Signed-off-by: Dan Carpenter Signed-off-by: Kalle Valo commit 98ee3fc7ef8395f8b7a379e6608aee91efc66d48 Author: Boris Brezillon Date: Tue Nov 6 17:25:37 2018 +0100 mtd: nand: Fix nanddev_pos_next_page() kernel-doc header Function name is wrong in the kernel-doc header. Fixes: 9c3736a3de21 ("mtd: nand: Add core infrastructure to deal with NAND devices") Signed-off-by: Boris Brezillon Reviewed-by: Miquel Raynal commit f98e8a572bddbf27032114127d2fcc78fa5e6a9d Author: Ricardo Ribalda Delgado Date: Thu Nov 1 14:15:49 2018 +0100 clk: fixed-factor: fix of_node_get-put imbalance When the fixed factor clock is created by devicetree, of_clk_add_provider is called. Add a call to of_clk_del_provider in the remove function to balance it out. Reported-by: Alan Tull Fixes: 971451b3b15d ("clk: fixed-factor: Convert into a module platform driver") Signed-off-by: Ricardo Ribalda Delgado Signed-off-by: Stephen Boyd commit df5e31c204b34e8d9e5ec33f5b28e960c4f25e14 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 (cherry picked from commit a748faea3bfd7fd1d1485bc1c426c7d460cc6503) Signed-off-by: Joonas Lahtinen commit 8053e5b93eca9b011f7b79bb019bf1eeaaf96c4b Merge: 4581aa96475b ee474b81fe5a Author: Linus Torvalds Date: Tue Nov 6 08:12:10 2018 -0800 Merge tag 'trace-v4.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing fix from Steven Rostedt: "Masami found a slight bug in his code where he transposed the arguments of a call to strpbrk. The reason this wasn't detected in our tests is that the only way this would transpire is when a kprobe event with a symbol offset is attached to a function that belongs to a module that isn't loaded yet. When the kprobe trace event is added, the offset would be truncated after it was parsed, and when the module is loaded, it would use the symbol without the offset (as the nul character added by the parsing would not be replaced with the original character)" * tag 'trace-v4.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: tracing/kprobes: Fix strpbrk() argument order commit 4581aa96475b792de4b1206a12830339b65ec246 Merge: a13511dfa836 6282e916f774 Author: Linus Torvalds Date: Tue Nov 6 08:10:01 2018 -0800 Merge branch 'spectre' of git://git.armlinux.org.uk/~rmk/linux-arm Pull ARM fix from Russell King: "Ard spotted a typo in one of the assembly files which leads to a kernel oops when that code path is executed. Fix this" * 'spectre' of git://git.armlinux.org.uk/~rmk/linux-arm: ARM: 8809/1: proc-v7: fix Thumb annotation of cpu_v7_hvc_switch_mm commit a8939766c75c06b5a0ab691ecbba9347e4e520cf 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 7f4cedd882f7cae83177066c2b239ef457ce4a42 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 dbc4ca339c8dbdd8652ce57c16bf5ef45ee4307e Author: Jiri Olsa Date: Tue Oct 16 17:06:09 2018 +0200 tools cpupower: Override CFLAGS assignments So user could specify outside CFLAGS values. Cc: Thomas Renninger Cc: Shuah Khan Signed-off-by: Jiri Olsa Acked-by: Thomas Renninger Signed-off-by: Shuah Khan (Samsung OSG) commit 4bf3bd0f15a9c81064c0b430d04d221ffcc503cc Author: Jiri Olsa Date: Tue Oct 16 17:06:08 2018 +0200 tools cpupower debug: Allow to use outside build flags Adding CFLAGS and LDFLAGS to be used during the build. Cc: Thomas Renninger Cc: Shuah Khan Signed-off-by: Jiri Olsa Acked-by: Thomas Renninger Signed-off-by: Shuah Khan (Samsung OSG) commit 9de9aa45e9bd67232e000cca42ceb134b8ae51b6 Author: Konstantin Khlebnikov Date: Tue Oct 16 11:56:26 2018 +0300 tools/power/cpupower: fix compilation with STATIC=true Rename duplicate sysfs_read_file into cpupower_read_sysfs and fix linking. Signed-off-by: Konstantin Khlebnikov Acked-by: Thomas Renninger Cc: Signed-off-by: Shuah Khan (Samsung OSG) commit 837514f7a4ca4aca06aec5caa5ff56d33ef06976 Author: Dave Chinner Date: Tue Nov 6 07:50:50 2018 -0800 xfs: fix overflow in xfs_attr3_leaf_verify generic/070 on 64k block size filesystems is failing with a verifier corruption on writeback or an attribute leaf block: [ 94.973083] XFS (pmem0): Metadata corruption detected at xfs_attr3_leaf_verify+0x246/0x260, xfs_attr3_leaf block 0x811480 [ 94.975623] XFS (pmem0): Unmount and run xfs_repair [ 94.976720] XFS (pmem0): First 128 bytes of corrupted metadata buffer: [ 94.978270] 000000004b2e7b45: 00 00 00 00 00 00 00 00 3b ee 00 00 00 00 00 00 ........;....... [ 94.980268] 000000006b1db90b: 00 00 00 00 00 81 14 80 00 00 00 00 00 00 00 00 ................ [ 94.982251] 00000000433f2407: 22 7b 5c 82 2d 5c 47 4c bb 31 1c 37 fa a9 ce d6 "{\.-\GL.1.7.... [ 94.984157] 0000000010dc7dfb: 00 00 00 00 00 81 04 8a 00 0a 18 e8 dd 94 01 00 ................ [ 94.986215] 00000000d5a19229: 00 a0 dc f4 fe 98 01 68 f0 d8 07 e0 00 00 00 00 .......h........ [ 94.988171] 00000000521df36c: 0c 2d 32 e2 fe 20 01 00 0c 2d 58 65 fe 0c 01 00 .-2.. ...-Xe.... [ 94.990162] 000000008477ae06: 0c 2d 5b 66 fe 8c 01 00 0c 2d 71 35 fe 7c 01 00 .-[f.....-q5.|.. [ 94.992139] 00000000a4a6bca6: 0c 2d 72 37 fc d4 01 00 0c 2d d8 b8 f0 90 01 00 .-r7.....-...... [ 94.994789] XFS (pmem0): xfs_do_force_shutdown(0x8) called from line 1453 of file fs/xfs/xfs_buf.c. Return address = ffffffff815365f3 This is failing this check: end = ichdr.freemap[i].base + ichdr.freemap[i].size; if (end < ichdr.freemap[i].base) >>>>> return __this_address; if (end > mp->m_attr_geo->blksize) return __this_address; And from the buffer output above, the freemap array is: freemap[0].base = 0x00a0 freemap[0].size = 0xdcf4 end = 0xdd94 freemap[1].base = 0xfe98 freemap[1].size = 0x0168 end = 0x10000 freemap[2].base = 0xf0d8 freemap[2].size = 0x07e0 end = 0xf8b8 These all look valid - the block size is 0x10000 and so from the last check in the above verifier fragment we know that the end of freemap[1] is valid. The problem is that end is declared as: uint16_t end; And (uint16_t)0x10000 = 0. So we have a verifier bug here, not a corruption. Fix the verifier to use uint32_t types for the check and hence avoid the overflow. Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=201577 Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit bdec055bb9f262964c4f5cb330dab26646c345c6 Author: Darrick J. Wong Date: Tue Nov 6 07:50:50 2018 -0800 xfs: print buffer offsets when dumping corrupt buffers Use DUMP_PREFIX_OFFSET when printing hex dumps of corrupt buffers because modern Linux now prints a 32-bit hash of our 64-bit pointer when using DUMP_PREFIX_ADDRESS: 00000000b4bb4297: 00 00 00 00 00 00 00 00 3b ee 00 00 00 00 00 00 ........;....... 00000005ec77e26: 00 00 00 00 02 d0 5a 00 00 00 00 00 00 00 00 00 ......Z......... 000000015938018: 21 98 e8 b4 fd de 4c 07 bc ea 3c e5 ae b4 7c 48 !.....L...<...|H This is totally worthless for a sequential dump since we probably only care about tracking the buffer offsets and afaik there's no way to recover the actual pointer from the hashed value. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit 132bf6723749f7219c399831eeb286dbbb985429 Author: Christophe JAILLET Date: Tue Nov 6 07:50:50 2018 -0800 xfs: Fix error code in 'xfs_ioc_getbmap()' In this function, once 'buf' has been allocated, we unconditionally return 0. However, 'error' is set to some error codes in several error handling paths. Before commit 232b51948b99 ("xfs: simplify the xfs_getbmap interface") this was not an issue because all error paths were returning directly, but now that some cleanup at the end may be needed, we must propagate the error code. Fixes: 232b51948b99 ("xfs: simplify the xfs_getbmap interface") Signed-off-by: Christophe JAILLET Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 19ed3e2dd8549c1a34914e8dad01b64e7837645a Author: Lu Baolu Date: Mon Nov 5 10:18:58 2018 +0800 iommu/vt-d: Fix NULL pointer dereference in prq_event_thread() When handling page request without pasid event, go to "no_pasid" branch instead of "bad_req". Otherwise, a NULL pointer deference will happen there. Cc: Ashok Raj Cc: Jacob Pan Cc: Sohil Mehta Signed-off-by: Lu Baolu Fixes: a222a7f0bb6c9 'iommu/vt-d: Implement page request handling' Signed-off-by: Joerg Roedel commit a13511dfa836c8305a737436eed3ba9a8e74a826 Merge: 163c8d54a997 a422757e8c32 Author: Linus Torvalds Date: Tue Nov 6 07:44:04 2018 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: 1) Handle errors mid-stream of an all dump, from Alexey Kodanev. 2) Fix build of openvswitch with certain combinations of netfilter options, from Arnd Bergmann. 3) Fix interactions between GSO and BQL, from Eric Dumazet. 4) Don't put a '/' in RTL8201F's sysfs file name, from Holger Hoffstätte. 5) S390 qeth driver fixes from Julian Wiedmann. 6) Allow ipv6 link local addresses for netconsole when both source and destination are link local, from Matwey V. Kornilov. 7) Fix the BPF program address seen in /proc/kallsyms, from Song Liu. 8) Initialize mutex before use in dsa microchip driver, from Tristram Ha. 9) Out-of-bounds access in hns3, from Yunsheng Lin. 10) Various netfilter fixes from Stefano Brivio, Jozsef Kadlecsik, Jiri Slaby, Florian Westphal, Eric Westbrook, Andrey Ryabinin, and Pablo Neira Ayuso. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (50 commits) net: alx: make alx_drv_name static net: bpfilter: fix iptables failure if bpfilter_umh is disabled sock_diag: fix autoloading of the raw_diag module net: core: netpoll: Enable netconsole IPv6 link local address ipv6: properly check return value in inet6_dump_all() rtnetlink: restore handling of dumpit return value in rtnl_dump_all() net/ipv6: Move anycast init/cleanup functions out of CONFIG_PROC_FS bonding/802.3ad: fix link_failure_count tracking net: phy: realtek: fix RTL8201F sysfs name sctp: define SCTP_SS_DEFAULT for Stream schedulers sctp: fix strchange_flags name for Stream Change Event mlxsw: spectrum: Fix IP2ME CPU policer configuration openvswitch: fix linking without CONFIG_NF_CONNTRACK_LABELS qed: fix link config error handling net: hns3: Fix for out-of-bounds access when setting pfc back pressure net/mlx4_en: use __netdev_tx_sent_queue() net: do not abort bulk send on BQL status net: bql: add __netdev_tx_sent_queue() s390/qeth: report 25Gbit link speed s390/qeth: sanitize ARP requests ... commit ac765f83f1397646c11092a032d4f62c3d478b81 Author: Filipe Manana Date: Mon Nov 5 11:14:17 2018 +0000 Btrfs: fix data corruption due to cloning of eof block We currently allow cloning a range from a file which includes the last block of the file even if the file's size is not aligned to the block size. This is fine and useful when the destination file has the same size, but when it does not and the range ends somewhere in the middle of the destination file, it leads to corruption because the bytes between the EOF and the end of the block have undefined data (when there is support for discard/trimming they have a value of 0x00). Example: $ mkfs.btrfs -f /dev/sdb $ mount /dev/sdb /mnt $ export foo_size=$((256 * 1024 + 100)) $ xfs_io -f -c "pwrite -S 0x3c 0 $foo_size" /mnt/foo $ xfs_io -f -c "pwrite -S 0xb5 0 1M" /mnt/bar $ xfs_io -c "reflink /mnt/foo 0 512K $foo_size" /mnt/bar $ od -A d -t x1 /mnt/bar 0000000 b5 b5 b5 b5 b5 b5 b5 b5 b5 b5 b5 b5 b5 b5 b5 b5 * 0524288 3c 3c 3c 3c 3c 3c 3c 3c 3c 3c 3c 3c 3c 3c 3c 3c * 0786528 3c 3c 3c 3c 00 00 00 00 00 00 00 00 00 00 00 00 0786544 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 * 0790528 b5 b5 b5 b5 b5 b5 b5 b5 b5 b5 b5 b5 b5 b5 b5 b5 * 1048576 The bytes in the range from 786532 (512Kb + 256Kb + 100 bytes) to 790527 (512Kb + 256Kb + 4Kb - 1) got corrupted, having now a value of 0x00 instead of 0xb5. This is similar to the problem we had for deduplication that got recently fixed by commit de02b9f6bb65 ("Btrfs: fix data corruption when deduplicating between different files"). Fix this by not allowing such operations to be performed and return the errno -EINVAL to user space. This is what XFS is doing as well at the VFS level. This change however now makes us return -EINVAL instead of -EOPNOTSUPP for cases where the source range maps to an inline extent and the destination range's end is smaller then the destination file's size, since the detection of inline extents is done during the actual process of dropping file extent items (at __btrfs_drop_extents()). Returning the -EINVAL error is done early on and solely based on the input parameters (offsets and length) and destination file's size. This makes us consistent with XFS and anyone else supporting cloning since this case is now checked at a higher level in the VFS and is where the -EINVAL will be returned from starting with kernel 4.20 (the VFS changed was introduced in 4.20-rc1 by commit 07d19dc9fbe9 ("vfs: avoid problematic remapping requests into partial EOF block"). So this change is more geared towards stable kernels, as it's unlikely the new VFS checks get removed intentionally. A test case for fstests follows soon, as well as an update to filter existing tests that expect -EOPNOTSUPP to accept -EINVAL as well. CC: # 4.4+ Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit 11023d3f5fdf89bba5e1142127701ca6e6014587 Author: Filipe Manana Date: Mon Nov 5 11:14:05 2018 +0000 Btrfs: fix infinite loop on inode eviction after deduplication of eof block If we attempt to deduplicate the last block of a file A into the middle of a file B, and file A's size is not a multiple of the block size, we end rounding the deduplication length to 0 bytes, to avoid the data corruption issue fixed by commit de02b9f6bb65 ("Btrfs: fix data corruption when deduplicating between different files"). However a length of zero will cause the insertion of an extent state with a start value greater (by 1) then the end value, leading to a corrupt extent state that will trigger a warning and cause chaos such as an infinite loop during inode eviction. Example trace: [96049.833585] ------------[ cut here ]------------ [96049.833714] WARNING: CPU: 0 PID: 24448 at fs/btrfs/extent_io.c:436 insert_state+0x101/0x120 [btrfs] [96049.833767] CPU: 0 PID: 24448 Comm: xfs_io Not tainted 4.19.0-rc7-btrfs-next-39 #1 [96049.833768] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.11.2-0-gf9626ccb91-prebuilt.qemu-project.org 04/01/2014 [96049.833780] RIP: 0010:insert_state+0x101/0x120 [btrfs] [96049.833783] RSP: 0018:ffffafd2c3707af0 EFLAGS: 00010282 [96049.833785] RAX: 0000000000000000 RBX: 000000000004dfff RCX: 0000000000000006 [96049.833786] RDX: 0000000000000007 RSI: ffff99045c143230 RDI: ffff99047b2168a0 [96049.833787] RBP: ffff990457851cd0 R08: 0000000000000001 R09: 0000000000000000 [96049.833787] R10: ffffafd2c3707ab8 R11: 0000000000000000 R12: ffff9903b93b12c8 [96049.833788] R13: 000000000004e000 R14: ffffafd2c3707b80 R15: ffffafd2c3707b78 [96049.833790] FS: 00007f5c14e7d700(0000) GS:ffff99047b200000(0000) knlGS:0000000000000000 [96049.833791] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [96049.833792] CR2: 00007f5c146abff8 CR3: 0000000115f4c004 CR4: 00000000003606f0 [96049.833795] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [96049.833796] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [96049.833796] Call Trace: [96049.833809] __set_extent_bit+0x46c/0x6a0 [btrfs] [96049.833823] lock_extent_bits+0x6b/0x210 [btrfs] [96049.833831] ? _raw_spin_unlock+0x24/0x30 [96049.833841] ? test_range_bit+0xdf/0x130 [btrfs] [96049.833853] lock_extent_range+0x8e/0x150 [btrfs] [96049.833864] btrfs_double_extent_lock+0x78/0xb0 [btrfs] [96049.833875] btrfs_extent_same_range+0x14e/0x550 [btrfs] [96049.833885] ? rcu_read_lock_sched_held+0x3f/0x70 [96049.833890] ? __kmalloc_node+0x2b0/0x2f0 [96049.833899] ? btrfs_dedupe_file_range+0x19a/0x280 [btrfs] [96049.833909] btrfs_dedupe_file_range+0x270/0x280 [btrfs] [96049.833916] vfs_dedupe_file_range_one+0xd9/0xe0 [96049.833919] vfs_dedupe_file_range+0x131/0x1b0 [96049.833924] do_vfs_ioctl+0x272/0x6e0 [96049.833927] ? __fget+0x113/0x200 [96049.833931] ksys_ioctl+0x70/0x80 [96049.833933] __x64_sys_ioctl+0x16/0x20 [96049.833937] do_syscall_64+0x60/0x1b0 [96049.833939] entry_SYSCALL_64_after_hwframe+0x49/0xbe [96049.833941] RIP: 0033:0x7f5c1478ddd7 [96049.833943] RSP: 002b:00007ffe15b196a8 EFLAGS: 00000202 ORIG_RAX: 0000000000000010 [96049.833945] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f5c1478ddd7 [96049.833946] RDX: 00005625ece322d0 RSI: 00000000c0189436 RDI: 0000000000000004 [96049.833947] RBP: 0000000000000000 R08: 00007f5c14a46f48 R09: 0000000000000040 [96049.833948] R10: 0000000000000541 R11: 0000000000000202 R12: 0000000000000000 [96049.833949] R13: 0000000000000000 R14: 0000000000000004 R15: 00005625ece322d0 [96049.833954] irq event stamp: 6196 [96049.833956] hardirqs last enabled at (6195): [] console_unlock+0x503/0x640 [96049.833958] hardirqs last disabled at (6196): [] trace_hardirqs_off_thunk+0x1a/0x1c [96049.833959] softirqs last enabled at (6114): [] __do_softirq+0x370/0x421 [96049.833964] softirqs last disabled at (6095): [] irq_exit+0xcd/0xe0 [96049.833965] ---[ end trace db7b05f01b7fa10c ]--- [96049.935816] R13: 0000000000000000 R14: 00005562e5259240 R15: 00007ffff092b910 [96049.935822] irq event stamp: 6584 [96049.935823] hardirqs last enabled at (6583): [] console_unlock+0x503/0x640 [96049.935825] hardirqs last disabled at (6584): [] trace_hardirqs_off_thunk+0x1a/0x1c [96049.935827] softirqs last enabled at (6328): [] __do_softirq+0x370/0x421 [96049.935828] softirqs last disabled at (6313): [] irq_exit+0xcd/0xe0 [96049.935829] ---[ end trace db7b05f01b7fa123 ]--- [96049.935840] ------------[ cut here ]------------ [96049.936065] WARNING: CPU: 1 PID: 24463 at fs/btrfs/extent_io.c:436 insert_state+0x101/0x120 [btrfs] [96049.936107] CPU: 1 PID: 24463 Comm: umount Tainted: G W 4.19.0-rc7-btrfs-next-39 #1 [96049.936108] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.11.2-0-gf9626ccb91-prebuilt.qemu-project.org 04/01/2014 [96049.936117] RIP: 0010:insert_state+0x101/0x120 [btrfs] [96049.936119] RSP: 0018:ffffafd2c3637bc0 EFLAGS: 00010282 [96049.936120] RAX: 0000000000000000 RBX: 000000000004dfff RCX: 0000000000000006 [96049.936121] RDX: 0000000000000007 RSI: ffff990445cf88e0 RDI: ffff99047b2968a0 [96049.936122] RBP: ffff990457851cd0 R08: 0000000000000001 R09: 0000000000000000 [96049.936123] R10: ffffafd2c3637b88 R11: 0000000000000000 R12: ffff9904574301e8 [96049.936124] R13: 000000000004e000 R14: ffffafd2c3637c50 R15: ffffafd2c3637c48 [96049.936125] FS: 00007fe4b87e72c0(0000) GS:ffff99047b280000(0000) knlGS:0000000000000000 [96049.936126] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [96049.936128] CR2: 00005562e52618d8 CR3: 00000001151c8005 CR4: 00000000003606e0 [96049.936129] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [96049.936131] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [96049.936131] Call Trace: [96049.936141] __set_extent_bit+0x46c/0x6a0 [btrfs] [96049.936154] lock_extent_bits+0x6b/0x210 [btrfs] [96049.936167] btrfs_evict_inode+0x1e1/0x5a0 [btrfs] [96049.936172] evict+0xbf/0x1c0 [96049.936174] dispose_list+0x51/0x80 [96049.936176] evict_inodes+0x193/0x1c0 [96049.936180] generic_shutdown_super+0x3f/0x110 [96049.936182] kill_anon_super+0xe/0x30 [96049.936189] btrfs_kill_super+0x13/0x100 [btrfs] [96049.936191] deactivate_locked_super+0x3a/0x70 [96049.936193] cleanup_mnt+0x3b/0x80 [96049.936195] task_work_run+0x93/0xc0 [96049.936198] exit_to_usermode_loop+0xfa/0x100 [96049.936201] do_syscall_64+0x17f/0x1b0 [96049.936202] entry_SYSCALL_64_after_hwframe+0x49/0xbe [96049.936204] RIP: 0033:0x7fe4b80cfb37 [96049.936206] RSP: 002b:00007ffff092b688 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6 [96049.936207] RAX: 0000000000000000 RBX: 00005562e5259060 RCX: 00007fe4b80cfb37 [96049.936208] RDX: 0000000000000001 RSI: 0000000000000000 RDI: 00005562e525faa0 [96049.936209] RBP: 00005562e525faa0 R08: 00005562e525f770 R09: 0000000000000015 [96049.936210] R10: 00000000000006b4 R11: 0000000000000246 R12: 00007fe4b85d1e64 [96049.936211] R13: 0000000000000000 R14: 00005562e5259240 R15: 00007ffff092b910 [96049.936211] R13: 0000000000000000 R14: 00005562e5259240 R15: 00007ffff092b910 [96049.936216] irq event stamp: 6616 [96049.936219] hardirqs last enabled at (6615): [] console_unlock+0x503/0x640 [96049.936219] hardirqs last disabled at (6616): [] trace_hardirqs_off_thunk+0x1a/0x1c [96049.936222] softirqs last enabled at (6328): [] __do_softirq+0x370/0x421 [96049.936222] softirqs last disabled at (6313): [] irq_exit+0xcd/0xe0 [96049.936223] ---[ end trace db7b05f01b7fa124 ]--- The second stack trace, from inode eviction, is repeated forever due to the infinite loop during eviction. This is the same type of problem fixed way back in 2015 by commit 113e8283869b ("Btrfs: fix inode eviction infinite loop after extent_same ioctl") and commit ccccf3d67294 ("Btrfs: fix inode eviction infinite loop after cloning into it"). So fix this by returning immediately if the deduplication range length gets rounded down to 0 bytes, as there is nothing that needs to be done in such case. Example reproducer: $ mkfs.btrfs -f /dev/sdb $ mount /dev/sdb /mnt $ xfs_io -f -c "pwrite -S 0xe6 0 100" /mnt/foo $ xfs_io -f -c "pwrite -S 0xe6 0 1M" /mnt/bar # Unmount the filesystem and mount it again so that we start without any # extent state records when we ask for the deduplication. $ umount /mnt $ mount /dev/sdb /mnt $ xfs_io -c "dedupe /mnt/foo 0 500K 100" /mnt/bar # This unmount triggers the infinite loop. $ umount /mnt A test case for fstests will follow soon. Fixes: de02b9f6bb65 ("Btrfs: fix data corruption when deduplicating between different files") CC: # 4.19+ Reviewed-by: Nikolay Borisov Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit 4222ea7100c0e37adace2790c8822758bbeee179 Author: Filipe Manana Date: Wed Oct 24 10:13:03 2018 +0100 Btrfs: fix deadlock on tree root leaf when finding free extent When we are writing out a free space cache, during the transaction commit phase, we can end up in a deadlock which results in a stack trace like the following: schedule+0x28/0x80 btrfs_tree_read_lock+0x8e/0x120 [btrfs] ? finish_wait+0x80/0x80 btrfs_read_lock_root_node+0x2f/0x40 [btrfs] btrfs_search_slot+0xf6/0x9f0 [btrfs] ? evict_refill_and_join+0xd0/0xd0 [btrfs] ? inode_insert5+0x119/0x190 btrfs_lookup_inode+0x3a/0xc0 [btrfs] ? kmem_cache_alloc+0x166/0x1d0 btrfs_iget+0x113/0x690 [btrfs] __lookup_free_space_inode+0xd8/0x150 [btrfs] lookup_free_space_inode+0x5b/0xb0 [btrfs] load_free_space_cache+0x7c/0x170 [btrfs] ? cache_block_group+0x72/0x3b0 [btrfs] cache_block_group+0x1b3/0x3b0 [btrfs] ? finish_wait+0x80/0x80 find_free_extent+0x799/0x1010 [btrfs] btrfs_reserve_extent+0x9b/0x180 [btrfs] btrfs_alloc_tree_block+0x1b3/0x4f0 [btrfs] __btrfs_cow_block+0x11d/0x500 [btrfs] btrfs_cow_block+0xdc/0x180 [btrfs] btrfs_search_slot+0x3bd/0x9f0 [btrfs] btrfs_lookup_inode+0x3a/0xc0 [btrfs] ? kmem_cache_alloc+0x166/0x1d0 btrfs_update_inode_item+0x46/0x100 [btrfs] cache_save_setup+0xe4/0x3a0 [btrfs] btrfs_start_dirty_block_groups+0x1be/0x480 [btrfs] btrfs_commit_transaction+0xcb/0x8b0 [btrfs] At cache_save_setup() we need to update the inode item of a block group's cache which is located in the tree root (fs_info->tree_root), which means that it may result in COWing a leaf from that tree. If that happens we need to find a free metadata extent and while looking for one, if we find a block group which was not cached yet we attempt to load its cache by calling cache_block_group(). However this function will try to load the inode of the free space cache, which requires finding the matching inode item in the tree root - if that inode item is located in the same leaf as the inode item of the space cache we are updating at cache_save_setup(), we end up in a deadlock, since we try to obtain a read lock on the same extent buffer that we previously write locked. So fix this by using the tree root's commit root when searching for a block group's free space cache inode item when we are attempting to load a free space cache. This is safe since block groups once loaded stay in memory forever, as well as their caches, so after they are first loaded we will never need to read their inode items again. For new block groups, once they are created they get their ->cached field set to BTRFS_CACHE_FINISHED meaning we will not need to read their inode item. Reported-by: Andrew Nelson Link: https://lore.kernel.org/linux-btrfs/CAPTELenq9x5KOWuQ+fa7h1r3nsJG8vyiTH8+ifjURc_duHh2Wg@mail.gmail.com/ Fixes: 9d66e233c704 ("Btrfs: load free space cache if it exists") Tested-by: Andrew Nelson Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit 7e17916b35797396f681a3270245fd29c1e4c250 Author: Arnd Bergmann Date: Sat Nov 3 16:39:28 2018 +0100 btrfs: avoid link error with CONFIG_NO_AUTO_INLINE Note: this patch fixes a problem in a feature outside of btrfs ("kernel hacking: add a config option to disable compiler auto-inlining") and is applied ahead of time due to cross-subsystem dependencies. On 32-bit ARM with gcc-8, I see a link error with the addition of the CONFIG_NO_AUTO_INLINE option: fs/btrfs/super.o: In function `btrfs_statfs': super.c:(.text+0x67b8): undefined reference to `__aeabi_uldivmod' super.c:(.text+0x67fc): undefined reference to `__aeabi_uldivmod' super.c:(.text+0x6858): undefined reference to `__aeabi_uldivmod' super.c:(.text+0x6920): undefined reference to `__aeabi_uldivmod' super.c:(.text+0x693c): undefined reference to `__aeabi_uldivmod' fs/btrfs/super.o:super.c:(.text+0x6958): more undefined references to `__aeabi_uldivmod' follow So far this is the only file that shows the behavior, so I'd propose to just work around it by marking the functions as 'static inline' that normally get inlined here. The reference to __aeabi_uldivmod comes from a div_u64() which has an optimization for a constant division that uses a straight '/' operator when the result should be known to the compiler. My interpretation is that as we turn off inlining, gcc still expects the result to be constant but fails to use that constant value. Link: https://lkml.kernel.org/r/20181103153941.1881966-1-arnd@arndb.de Reviewed-by: Nikolay Borisov Reviewed-by: Changbin Du Signed-off-by: Arnd Bergmann [ add the note ] Signed-off-by: David Sterba commit 761333f2f50ccc887aa9957ae829300262c0d15b Author: Shaokun Zhang Date: Mon Nov 5 18:49:09 2018 +0800 btrfs: tree-checker: Fix misleading group system information block_group_err shows the group system as a decimal value with a '0x' prefix, which is somewhat misleading. Fix it to print hexadecimal, as was intended. Fixes: fce466eab7ac6 ("btrfs: tree-checker: Verify block_group_item") CC: stable@vger.kernel.org # 4.19+ Reviewed-by: Nikolay Borisov Reviewed-by: Qu Wenruo Signed-off-by: Shaokun Zhang Reviewed-by: David Sterba Signed-off-by: David Sterba commit 008c6753f7e070c77c70d708a6bf0255b4381763 Author: Filipe Manana Date: Mon Oct 29 09:42:06 2018 +0000 Btrfs: fix missing data checksums after a ranged fsync (msync) Recently we got a massive simplification for fsync, where for the fast path we no longer log new extents while their respective ordered extents are still running. However that simplification introduced a subtle regression for the case where we use a ranged fsync (msync). Consider the following example: CPU 0 CPU 1 mmap write to range [2Mb, 4Mb[ mmap write to range [512Kb, 1Mb[ msync range [512K, 1Mb[ --> triggers fast fsync (BTRFS_INODE_NEEDS_FULL_SYNC not set) --> creates extent map A for this range and adds it to list of modified extents --> starts ordered extent A for this range --> waits for it to complete writeback triggered for range [2Mb, 4Mb[ --> create extent map B and adds it to the list of modified extents --> creates ordered extent B --> start looking for and logging modified extents --> logs extent maps A and B --> finds checksums for extent A in the csum tree, but not for extent B fsync (msync) finishes --> ordered extent B finishes and its checksums are added to the csum tree After replaying the log, we have the extent covering the range [2Mb, 4Mb[ but do not have the data checksum items covering that file range. This happens because at the very beginning of an fsync (btrfs_sync_file()) we start and wait for IO in the given range [512Kb, 1Mb[ and therefore wait for any ordered extents in that range to complete before we start logging the extents. However if right before we start logging the extent in our range [512Kb, 1Mb[, writeback is started for any other dirty range, such as the range [2Mb, 4Mb[ due to memory pressure or a concurrent fsync or msync (btrfs_sync_file() starts writeback before acquiring the inode's lock), an ordered extent is created for that other range and a new extent map is created to represent that range and added to the inode's list of modified extents. That means that we will see that other extent in that list when collecting extents for logging (done at btrfs_log_changed_extents()) and log the extent before the respective ordered extent finishes - namely before the checksum items are added to the checksums tree, which is where log_extent_csums() looks for the checksums, therefore making us log an extent without logging its checksums. Before that massive simplification of fsync, this wasn't a problem because besides looking for checkums in the checksums tree, we also looked for them in any ordered extent still running. The consequence of data checksums missing for a file range is that users attempting to read the affected file range will get -EIO errors and dmesg reports the following: [10188.358136] BTRFS info (device sdc): no csum found for inode 297 start 57344 [10188.359278] BTRFS warning (device sdc): csum failed root 5 ino 297 off 57344 csum 0x98f94189 expected csum 0x00000000 mirror 1 So fix this by skipping extents outside of our logging range at btrfs_log_changed_extents() and leaving them on the list of modified extents so that any subsequent ranged fsync may collect them if needed. Also, if we find a hole extent outside of the range still log it, just to prevent having gaps between extent items after replaying the log, otherwise fsck will complain when we are not using the NO_HOLES feature (fstest btrfs/056 triggers such case). Fixes: e7175a692765 ("btrfs: remove the wait ordered logic in the log_one_extent path") CC: stable@vger.kernel.org # 4.19+ Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit fcd5e74288f7d36991b1f0fb96b8c57079645e38 Author: Lu Fengqi Date: Wed Oct 24 20:24:03 2018 +0800 btrfs: fix pinned underflow after transaction aborted When running generic/475, we may get the following warning in dmesg: [ 6902.102154] WARNING: CPU: 3 PID: 18013 at fs/btrfs/extent-tree.c:9776 btrfs_free_block_groups+0x2af/0x3b0 [btrfs] [ 6902.109160] CPU: 3 PID: 18013 Comm: umount Tainted: G W O 4.19.0-rc8+ #8 [ 6902.110971] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 0.0.0 02/06/2015 [ 6902.112857] RIP: 0010:btrfs_free_block_groups+0x2af/0x3b0 [btrfs] [ 6902.118921] RSP: 0018:ffffc9000459bdb0 EFLAGS: 00010286 [ 6902.120315] RAX: ffff880175050bb0 RBX: ffff8801124a8000 RCX: 0000000000170007 [ 6902.121969] RDX: 0000000000000002 RSI: 0000000000170007 RDI: ffffffff8125fb74 [ 6902.123716] RBP: ffff880175055d10 R08: 0000000000000000 R09: 0000000000000000 [ 6902.125417] R10: 0000000000000000 R11: 0000000000000000 R12: ffff880175055d88 [ 6902.127129] R13: ffff880175050bb0 R14: 0000000000000000 R15: dead000000000100 [ 6902.129060] FS: 00007f4507223780(0000) GS:ffff88017ba00000(0000) knlGS:0000000000000000 [ 6902.130996] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 6902.132558] CR2: 00005623599cac78 CR3: 000000014b700001 CR4: 00000000003606e0 [ 6902.134270] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 6902.135981] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 6902.137836] Call Trace: [ 6902.138939] close_ctree+0x171/0x330 [btrfs] [ 6902.140181] ? kthread_stop+0x146/0x1f0 [ 6902.141277] generic_shutdown_super+0x6c/0x100 [ 6902.142517] kill_anon_super+0x14/0x30 [ 6902.143554] btrfs_kill_super+0x13/0x100 [btrfs] [ 6902.144790] deactivate_locked_super+0x2f/0x70 [ 6902.146014] cleanup_mnt+0x3b/0x70 [ 6902.147020] task_work_run+0x9e/0xd0 [ 6902.148036] do_syscall_64+0x470/0x600 [ 6902.149142] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 6902.150375] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 6902.151640] RIP: 0033:0x7f45077a6a7b [ 6902.157324] RSP: 002b:00007ffd589f3e68 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6 [ 6902.159187] RAX: 0000000000000000 RBX: 000055e8eec732b0 RCX: 00007f45077a6a7b [ 6902.160834] RDX: 0000000000000001 RSI: 0000000000000000 RDI: 000055e8eec73490 [ 6902.162526] RBP: 0000000000000000 R08: 000055e8eec734b0 R09: 00007ffd589f26c0 [ 6902.164141] R10: 0000000000000000 R11: 0000000000000246 R12: 000055e8eec73490 [ 6902.165815] R13: 00007f4507ac61a4 R14: 0000000000000000 R15: 00007ffd589f40d8 [ 6902.167553] irq event stamp: 0 [ 6902.168998] hardirqs last enabled at (0): [<0000000000000000>] (null) [ 6902.170731] hardirqs last disabled at (0): [] copy_process.part.55+0x3b0/0x1f00 [ 6902.172773] softirqs last enabled at (0): [] copy_process.part.55+0x3b0/0x1f00 [ 6902.174671] softirqs last disabled at (0): [<0000000000000000>] (null) [ 6902.176407] ---[ end trace 463138c2986b275c ]--- [ 6902.177636] BTRFS info (device dm-3): space_info 4 has 273465344 free, is not full [ 6902.179453] BTRFS info (device dm-3): space_info total=276824064, used=4685824, pinned=18446744073708158976, reserved=0, may_use=0, readonly=65536 In the above line there's "pinned=18446744073708158976" which is an unsigned u64 value of -1392640, an obvious underflow. When transaction_kthread is running cleanup_transaction(), another fsstress is running btrfs_commit_transaction(). The btrfs_finish_extent_commit() may get the same range as btrfs_destroy_pinned_extent() got, which causes the pinned underflow. Fixes: d4b450cd4b33 ("Btrfs: fix race between transaction commit and empty block group removal") CC: stable@vger.kernel.org # 4.4+ Reviewed-by: Josef Bacik Signed-off-by: Lu Fengqi Reviewed-by: David Sterba Signed-off-by: David Sterba commit 506481b20e818db40b6198815904ecd2d6daee64 Author: Robbie Ko Date: Tue Oct 30 18:04:04 2018 +0800 Btrfs: fix cur_offset in the error case for nocow When the cow_file_range fails, the related resources are unlocked according to the range [start..end), so the unlock cannot be repeated in run_delalloc_nocow. In some cases (e.g. cur_offset <= end && cow_start != -1), cur_offset is not updated correctly, so move the cur_offset update before cow_file_range. kernel BUG at mm/page-writeback.c:2663! Internal error: Oops - BUG: 0 [#1] SMP CPU: 3 PID: 31525 Comm: kworker/u8:7 Tainted: P O Hardware name: Realtek_RTD1296 (DT) Workqueue: writeback wb_workfn (flush-btrfs-1) task: ffffffc076db3380 ti: ffffffc02e9ac000 task.ti: ffffffc02e9ac000 PC is at clear_page_dirty_for_io+0x1bc/0x1e8 LR is at clear_page_dirty_for_io+0x14/0x1e8 pc : [] lr : [] pstate: 40000145 sp : ffffffc02e9af4f0 Process kworker/u8:7 (pid: 31525, stack limit = 0xffffffc02e9ac020) Call trace: [] clear_page_dirty_for_io+0x1bc/0x1e8 [] extent_clear_unlock_delalloc+0x1e4/0x210 [btrfs] [] run_delalloc_nocow+0x3b8/0x948 [btrfs] [] run_delalloc_range+0x250/0x3a8 [btrfs] [] writepage_delalloc.isra.21+0xbc/0x1d8 [btrfs] [] __extent_writepage+0xe8/0x248 [btrfs] [] extent_write_cache_pages.isra.17+0x164/0x378 [btrfs] [] extent_writepages+0x48/0x68 [btrfs] [] btrfs_writepages+0x20/0x30 [btrfs] [] do_writepages+0x30/0x88 [] __writeback_single_inode+0x34/0x198 [] writeback_sb_inodes+0x184/0x3c0 [] __writeback_inodes_wb+0x6c/0xc0 [] wb_writeback+0x1b8/0x1c0 [] wb_workfn+0x150/0x250 [] process_one_work+0x1dc/0x388 [] worker_thread+0x130/0x500 [] kthread+0x10c/0x110 [] ret_from_fork+0x10/0x40 Code: d503201f a9025bb5 a90363b7 f90023b9 (d4210000) CC: stable@vger.kernel.org # 4.4+ Reviewed-by: Filipe Manana Signed-off-by: Robbie Ko Signed-off-by: David Sterba commit 5e93a125f521efd00d71af31c2a301f3d46af48c Author: Takashi Iwai Date: Mon Nov 5 12:28:07 2018 +0100 ALSA: hda - Fix incorrect clearance of thinkpad_acpi hooks Since the commit c647f806b8c2 ("ALSA: hda - Allow multiple ADCs for mic mute LED controls") we allow enabling the mic mute LED with multiple ADCs. The commit changed the function return value to be zero or a negative error, while this change was overlooked in the thinkpad_acpi helper code where it still expects a positive return value for success. This eventually leads to a NULL dereference on a system that has only a mic mute LED. This patch corrects the return value check in the corresponding code as well. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=201621 Fixes: c647f806b8c2 ("ALSA: hda - Allow multiple ADCs for mic mute LED controls") Cc: Signed-off-by: Takashi Iwai commit 6a8915d0f8cf323e1beb792a33095cf652db4056 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 (cherry picked from commit f45a7977d1140c11f334e01a9f77177ed68e3bfa) Signed-off-by: Joonas Lahtinen commit 0014868b9c3c1dda1de6711cf58c3486fb422d07 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 (cherry picked from commit 83b466b1dc5f0b4d33f0a901e8b00197a8f3582d) Signed-off-by: Joonas Lahtinen commit e528c2affcf216b3d02b22004895cb678769629b 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 (cherry picked from commit b4335ec0a3ee6229a570755f8fb95dc8a7c694f2) Signed-off-by: Joonas Lahtinen commit f42f343887016330b321dd40eebc68c7292e4f1b 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 (cherry picked from commit 3b90946fcb6f13b65888c380461793a9dea9d1f4) Signed-off-by: Joonas Lahtinen commit 76271ef2638ca8e4bf2884cad664a34be0d5a42b 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 (cherry picked from commit 09209662618f9fdc38b8d4da39040c8829fd2d57) Signed-off-by: Joonas Lahtinen commit 2c2f6e30d5f29691e3563d334ce208d3a1907f49 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 (cherry picked from commit 42882336e62aab00278114392a16374f272a0c99) Signed-off-by: Joonas Lahtinen commit 085603287452fc96376ed4888bf29f8c095d2b40 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 (cherry picked from commit 6fc4e48f9ed46e9adff236a0c350074aafa3b7fa) Signed-off-by: Joonas Lahtinen commit c58281056a8b26d5d9dc15c19859a7880835ef44 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 (cherry picked from commit 9125963a9494253fa5a29cc1b4169885d2be7042) Signed-off-by: Joonas Lahtinen commit 6503493145cba4413ecd3d4d153faeef4a1e9b85 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 (cherry picked from commit 5a400aa3c562c4a726b4da286e63c96db905ade1) Signed-off-by: Joonas Lahtinen commit 18354b422ce4ce1124277dfe8f4f094bae0102ad 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 (cherry picked from commit 5d6f36b27d2764f3dc940606ee6b7ec5c669af3e) Signed-off-by: Joonas Lahtinen commit 8bd66d147c88bd441178c7b4c774ae5a185f19b8 Author: ndesaulniers@google.com Date: Wed Oct 31 12:39:01 2018 -0700 include/linux/compiler*.h: define asm_volatile_goto asm_volatile_goto should also be defined for other compilers that support asm goto. Fixes commit 815f0ddb346c ("include/linux/compiler*.h: make compiler-*.h mutually exclusive"). Signed-off-by: Nick Desaulniers Signed-off-by: Miguel Ojeda commit aa9b760cec2385ad408bb2e346c7f6dc1be69a79 Author: Linus Walleij Date: Sun Nov 4 11:32:47 2018 +0100 HID: fix up .raw_event() documentation The documentation for the .raw_event() callback says that if the driver return 1, there will be no further processing of the event, but this is not true, the actual code in hid-core.c looks like this: if (hdrv && hdrv->raw_event && hid_match_report(hid, report)) { ret = hdrv->raw_event(hid, report, data, size); if (ret < 0) goto unlock; } ret = hid_report_raw_event(hid, type, data, size, interrupt); The only return value that has any effect on the processing is a negative error. Correct this as it seems to confuse people: I found bogus code in the Razer out-of-tree driver attempting to return 1 here. Signed-off-by: Linus Walleij Signed-off-by: Jiri Kosina commit 3fc202e81db70bf60beb9296eefd4e48d6304607 Author: Arnd Bergmann Date: Fri Nov 2 16:14:32 2018 +0100 HID: asus: fix build warning wiht CONFIG_ASUS_WMI disabled asus_wmi_evaluate_method() is an empty dummy function when CONFIG_ASUS_WMI is disabled, or not reachable from a built-in device driver. This leads to a theoretical evaluation of an uninitialized variable that the compiler complains about, failing to check that the hardcoded return value makes this an unreachable code path: In file included from include/linux/printk.h:336, from include/linux/kernel.h:14, from include/linux/list.h:9, from include/linux/dmi.h:5, from drivers/hid/hid-asus.c:29: drivers/hid/hid-asus.c: In function 'asus_input_configured': include/linux/dynamic_debug.h:135:3: error: 'value' may be used uninitialized in this function [-Werror=maybe-uninitialized] __dynamic_dev_dbg(&descriptor, dev, fmt, \ ^~~~~~~~~~~~~~~~~ drivers/hid/hid-asus.c:359:6: note: 'value' was declared here u32 value; ^~~~~ With an extra IS_ENABLED() check, the warning goes away. Fixes: 3b692c55e58d ("HID: asus: only support backlight when it's not driven by WMI") Signed-off-by: Arnd Bergmann Acked-by: Geert Uytterhoeven Signed-off-by: Jiri Kosina commit 0c7244209588630a9b45e52490ef1390e04499a6 Merge: 399474e4c110 eb7046e9bf46 Author: Jiri Kosina Date: Tue Nov 6 13:57:02 2018 +0100 Merge branch 'master' into for-4.20/upstream-fixes Pull in a merge commit that brought in 3b692c55e58d ("HID: asus: only support backlight when it's not driven by WMI") so that fixup could be applied on top of it. commit 4e26f692e2e2aa4d7d6ddb3c4d3dec17f45d6495 Author: Sakari Ailus Date: Wed Oct 10 04:04:18 2018 -0400 media: ipu3-cio2: Use cio2_queues_exit The ipu3-cio2 driver has a function to tear down video devices as well as the associated video buffer queues. Use it. Signed-off-by: Sakari Ailus Tested-by: Bingbu Cao Reviewed-by: Bingbu Cao Signed-off-by: Mauro Carvalho Chehab commit 32388d6ef7cffc7d8291b67f8dfa26acd45217fd Author: Sakari Ailus Date: Wed Oct 10 04:01:05 2018 -0400 media: ipu3-cio2: Unregister device nodes first, then release resources While there are issues related to object lifetime management, unregister the media device first, followed immediately by other device nodes when the driver is being unbound. Only then the resources needed by the driver may be released. This is slightly safer. Signed-off-by: Sakari Ailus Tested-by: Bingbu Cao Reviewed-by: Bingbu Cao Signed-off-by: Mauro Carvalho Chehab commit 30efae3d789cd0714ef795545a46749236e29558 Author: Sakari Ailus Date: Tue Oct 9 07:49:49 2018 -0400 media: omap3isp: Unregister media device as first While there are issues related to object lifetime management, unregister the media device first when the driver is being unbound. This is slightly safer. Signed-off-by: Sakari Ailus Reviewed-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit 003aedaed65d4f71f3f122ea1e079c648bab113e Author: Sakari Ailus Date: Tue Oct 9 07:29:14 2018 -0400 media: docs: Document metadata format in struct v4l2_format The format fields in struct v4l2_format were otherwise documented but the meta field was missing. Document it. Reported-by: Hans Verkuil Signed-off-by: Sakari Ailus Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 92539d3eda2c090b382699bbb896d4b54e9bdece Author: Sakari Ailus Date: Mon Nov 5 09:35:44 2018 -0500 media: v4l: event: Add subscription to list before calling "add" operation Patch ad608fbcf166 changed how events were subscribed to address an issue elsewhere. As a side effect of that change, the "add" callback was called before the event subscription was added to the list of subscribed events, causing the first event queued by the add callback (and possibly other events arriving soon afterwards) to be lost. Fix this by adding the subscription to the list before calling the "add" callback, and clean up afterwards if that fails. Fixes: ad608fbcf166 ("media: v4l: event: Prevent freeing event subscriptions while accessed") Reported-by: Dave Stevenson Signed-off-by: Sakari Ailus Tested-by: Dave Stevenson Reviewed-by: Hans Verkuil Tested-by: Hans Verkuil Cc: stable@vger.kernel.org (for 4.14 and up) Signed-off-by: Mauro Carvalho Chehab commit b50b769bcbc24d68d95870d87354ec45fa0f07bb Author: Mauro Carvalho Chehab Date: Tue Nov 6 05:54:48 2018 -0500 media: dm365_ipipeif: better annotate a fall though Shut up this warning: drivers/staging/media/davinci_vpfe/dm365_ipipeif.c: In function 'ipipeif_hw_setup': drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:298:3: warning: this statement may fall through [-Wimplicit-fallthrough=] switch (isif_port_if) { ^~~~~~ drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:314:2: note: here case IPIPEIF_SDRAM_YUV: ^~~~ By annotating a fall though case at the right place. Acked-by: Hans Verkuil Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 8e88c29b351ed4e09dd63f825f1c8260b0cb0ab3 Author: Jiri Olsa Date: Sun Sep 23 17:04:20 2018 +0200 perf tools: Do not zero sample_id_all for group members Andi reported following malfunction: # perf record -e '{ref-cycles,cycles}:S' -a sleep 1 # perf script non matching sample_id_all That's because we disable sample_id_all bit for non-sampling group members. We can't do that, because it needs to be the same over the whole event list. This patch keeps it untouched again. Reported-by: Andi Kleen Tested-by: Andi Kleen Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20180923150420.27327-1-jolsa@kernel.org Fixes: e9add8bac6c6 ("perf evsel: Disable write_backward for leader sampling group events") Signed-off-by: Arnaldo Carvalho de Melo commit ca92e173ab34a4f7fc4128bd372bd96f1af6f507 Author: Benjamin Poirier Date: Mon Nov 5 17:00:53 2018 +0900 xfrm: Fix bucket count reported to userspace sadhcnt is reported by `ip -s xfrm state count` as "buckets count", not the hash mask. Fixes: 28d8909bc790 ("[XFRM]: Export SAD info.") Signed-off-by: Benjamin Poirier Signed-off-by: Steffen Klassert commit 86d4d068df573a8c2105554624796c086d6bec3d Author: John David Anglin Date: Tue Nov 6 12:00:01 2018 +0100 parisc: Revert "Release spinlocks using ordered store" This reverts commit d27dfa13b9f77ae7e6ed09d70a0426ed26c1a8f9. Unfortunately, this patch needs to be reverted. We need the full sync barrier and not the limited barrier provided by using an ordered store. The sync ensures that all accesses and cache purge instructions that follow the sync are performed after all such instructions prior the sync instruction have completed executing. The patch breaks the rwlock implementation in glibc. This caused the test-lock application in the libprelude testsuite to hang. With the change reverted, the test runs correctly and the libprelude package builds successfully. Signed-off-by: John David Anglin Signed-off-by: Helge Deller commit 6282e916f774e37845c65d1eae9f8c649004f033 Author: Ard Biesheuvel Date: Mon Nov 5 14:54:56 2018 +0100 ARM: 8809/1: proc-v7: fix Thumb annotation of cpu_v7_hvc_switch_mm Due to what appears to be a copy/paste error, the opening ENTRY() of cpu_v7_hvc_switch_mm() lacks a matching ENDPROC(), and instead, the one for cpu_v7_smc_switch_mm() is duplicated. Given that it is ENDPROC() that emits the Thumb annotation, the cpu_v7_hvc_switch_mm() routine will be called in ARM mode on a Thumb2 kernel, resulting in the following splat: Internal error: Oops - undefined instruction: 0 [#1] SMP THUMB2 Modules linked in: CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.18.0-rc1-00030-g4d28ad89189d-dirty #488 Hardware name: QEMU KVM Virtual Machine, BIOS 0.0.0 02/06/2015 PC is at cpu_v7_hvc_switch_mm+0x12/0x18 LR is at flush_old_exec+0x31b/0x570 pc : [] lr : [] psr: 00000013 sp : ee899e50 ip : 00000000 fp : 00000001 r10: eda28f34 r9 : eda31800 r8 : c12470e0 r7 : eda1fc00 r6 : eda53000 r5 : 00000000 r4 : ee88c000 r3 : c0316eec r2 : 00000001 r1 : eda53000 r0 : 6da6c000 Flags: nzcv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none Note the 'ISA ARM' in the last line. Fix this by using the correct name in ENDPROC(). Cc: Fixes: 10115105cb3a ("ARM: spectre-v2: add firmware based hardening") Reviewed-by: Dave Martin Acked-by: Marc Zyngier Signed-off-by: Ard Biesheuvel Signed-off-by: Russell King commit ef86eaf97acd6d82cd3fd40f997b1c8c4895a443 Author: Ezequiel Garcia Date: Thu Oct 18 14:54:29 2018 -0400 media: Rename vb2_m2m_request_queue -> v4l2_m2m_request_queue To be consistent with the rest of the mem2mem helpers, rename vb2_m2m_request_queue to v4l2_m2m_request_queue. This is just a cosmetic change. Signed-off-by: Ezequiel Garcia Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 2efaf6ebb34fe66c613e94c6e97ae95879455bc3 Author: Hans Verkuil Date: Thu Oct 11 06:38:27 2018 -0400 media: cec: increase debug level for 'queue full' The "transmit queue full" message doesn't warrant debug level 1 since it is already clear from the error code what's going on. Bump to level 2. Signed-off-by: Hans Verkuil Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 55623b4169056d7bb493d1c6f715991f8db67302 Author: Hans Verkuil Date: Wed Oct 10 07:12:15 2018 -0400 media: cec: check for non-OK/NACK conditions while claiming a LA During the configuration phase of a CEC adapter it is trying to claim a free logical address by polling. However, the code doesn't check if there were errors other than OK or NACK, those are just treated as if the poll was NACKed. Instead check for such errors and retry the poll. And if the problem persists then don't claim this LA since there is something weird going on. Signed-off-by: Hans Verkuil Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 7cf7b2e977abf3f992036939e35a8eab60013aff Author: Hans Verkuil Date: Wed Oct 10 03:03:43 2018 -0400 media: vicodec: lower minimum height to 360 Lower the minimum height to 360 to be consistent with the webcam input of vivid. The 480 was rather arbitrary but it made it harder to use vivid as a source for encoding since the default resolution when you load vivid is 640x360. Signed-off-by: Hans Verkuil Reviewed-by: Kieran Bingham Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 0ede1794b9667d9cd35d1ac27f2eeff52d5733d5 Author: Nathan Chancellor Date: Mon Oct 8 18:11:28 2018 -0400 media: tc358743: Remove unnecessary self assignment Clang warns when a variable is assigned to itself. drivers/media/i2c/tc358743.c:1921:7: warning: explicitly assigning value of variable of type 'int' to itself [-Wself-assign] ret = ret; ~~~ ^ ~~~ 1 warning generated. Signed-off-by: Nathan Chancellor Reviewed-by: Kieran Bingham Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 215237a5e436f72e8ee5b53243acf88a16e3ac01 Merge: df18bfd35bbf 651022382c7f Author: Mauro Carvalho Chehab Date: Tue Nov 6 05:11:16 2018 -0500 Merge tag 'v4.20-rc1' into patchwork Linux 4.20-rc1 * tag 'v4.20-rc1': (836 commits) Linux 4.20-rc1 sched/topology: Fix off by one bug memory_hotplug: cond_resched in __remove_pages bfs: add sanity check at bfs_fill_super() kernel/sysctl.c: remove duplicated include kernel/kexec_file.c: remove some duplicated includes mm, thp: consolidate THP gfp handling into alloc_hugepage_direct_gfpmask ocfs2: fix clusters leak in ocfs2_defrag_extent() ocfs2: dlmglue: clean up timestamp handling ocfs2: don't put and assigning null to bh allocated outside ocfs2: fix a misuse a of brelse after failing ocfs2_check_dir_entry ocfs2: don't use iocb when EIOCBQUEUED returns ocfs2: without quota support, avoid calling quota recovery ocfs2: remove ocfs2_is_o2cb_active() mm: thp: relax __GFP_THISNODE for MADV_HUGEPAGE mappings include/linux/notifier.h: SRCU: fix ctags mm: handle no memcg case in memcg_kmem_charge() properly ARM: dts: stm32: update HASH1 dmas property on stm32mp157c ARM: orion: avoid VLA in orion_mpp_conf iov_iter: Fix 9p virtio breakage ... commit df18bfd35bbf7cb1a420b5beede1de29343793b3 Author: Arnd Bergmann Date: Fri Nov 2 07:09:07 2018 -0400 media: v4l: fix uapi mpeg slice params definition We get a headers_check warning about the newly defined ioctl command structures: ./usr/include/linux/v4l2-controls.h:1105: found __[us]{8,16,32,64} type without #include This is resolved by including linux/types.h, as suggested by the warning, but there is another problem: Three of the four structures have an odd number of __u8 headers, but are aligned to 32 bit in the v4l2_ctrl_mpeg2_slice_params, so we get an implicit padding byte for each one. To solve that, let's add explicit padding that can be set to zero and verified in the kernel. Fixes: c27bb30e7b6d ("media: v4l: Add definitions for MPEG-2 slice format and metadata") Signed-off-by: Arnd Bergmann Signed-off-by: Mauro Carvalho Chehab commit ba26cd7d58dcc50e25c8f02b5376c05046b181dc Author: Boris Brezillon Date: Mon Nov 5 08:58:35 2018 +0100 mtd: sa1100: avoid VLA in sa1100_setup_mtd Enabling -Wvla found another variable-length array with randconfig testing: drivers/mtd/maps/sa1100-flash.c: In function 'sa1100_setup_mtd': drivers/mtd/maps/sa1100-flash.c:224:10: error: ISO C90 forbids variable length array 'cdev' [-Werror=vla] Dynamically allocate the cdev array passed to mtd_concat_create() instead of using a VLA. Reported-by: Arnd Bergmann Signed-off-by: Boris Brezillon Cc: Kees Cook Cc: Olof Johansson commit 6cc4a0863c9709c512280c64e698d68443ac8053 Author: Manjunath Patil Date: Tue Oct 30 09:49:21 2018 -0700 xen-blkfront: fix kernel panic with negotiate_mq error path info->nr_rings isn't adjusted in case of ENOMEM error from negotiate_mq(). This leads to kernel panic in error path. Typical call stack involving panic - #8 page_fault at ffffffff8175936f [exception RIP: blkif_free_ring+33] RIP: ffffffffa0149491 RSP: ffff8804f7673c08 RFLAGS: 00010292 ... #9 blkif_free at ffffffffa0149aaa [xen_blkfront] #10 talk_to_blkback at ffffffffa014c8cd [xen_blkfront] #11 blkback_changed at ffffffffa014ea8b [xen_blkfront] #12 xenbus_otherend_changed at ffffffff81424670 #13 backend_changed at ffffffff81426dc3 #14 xenwatch_thread at ffffffff81422f29 #15 kthread at ffffffff810abe6a #16 ret_from_fork at ffffffff81754078 Cc: stable@vger.kernel.org Fixes: 7ed8ce1c5fc7 ("xen-blkfront: move negotiate_mq to cover all cases of new VBDs") Signed-off-by: Manjunath Patil Acked-by: Roger Pau Monné Signed-off-by: Juergen Gross commit d9cccfa7c4d1d9ef967ec9308df7304a18609b30 Author: Liam Merwick Date: Fri Nov 2 14:04:23 2018 +0000 xen/grant-table: Fix incorrect gnttab_dma_free_pages() pr_debug message If a call to xenmem_reservation_increase() in gnttab_dma_free_pages() fails it triggers a message "Failed to decrease reservation..." which should be "Failed to increase reservation..." Fixes: 9bdc7304f536 ('xen/grant-table: Allow allocating buffers suitable for DMA') Reported-by: Ross Philipson Signed-off-by: Liam Merwick Reviewed-by: Mark Kanda Reviewed-by: Juergen Gross Signed-off-by: Juergen Gross commit 9586d569a369dc585a3e191dcabd72748e3c9c5c Author: Michael Ellerman Date: Tue Nov 6 19:25:38 2018 +1100 powerpc/mm/64s: Only use slbfee on CPUs that support it The slbfee instruction was only added in ISA 2.05 (Power6), it's not supported on older CPUs. We don't have a CPU feature for that ISA version though, so just use the ISA 2.06 feature flag. Fixes: e15a4fea4dee ("powerpc/64s/hash: Add some SLB debugging tests") Signed-off-by: Michael Ellerman commit 08e6a3434e2125e4b21d0d3f84678d427345bc0d Author: Michael Ellerman Date: Tue Nov 6 19:25:18 2018 +1100 powerpc/mm/64s: Use PPC_SLBFEE macro Old toolchains don't know about slbfee and break the build, eg: {standard input}:37: Error: Unrecognized opcode: `slbfee.' Fix it by using the macro version. We need to add an underscore version that takes raw register numbers from the inline asm, rather than our Rx macros. Fixes: e15a4fea4dee ("powerpc/64s/hash: Add some SLB debugging tests") Signed-off-by: Michael Ellerman commit 0ae790683fc28bb718d74f87cdf753c6445fe28d Author: Michael Ellerman Date: Tue Nov 6 19:23:28 2018 +1100 powerpc/mm/64s: Consolidate SLB assertions The code for assert_slb_exists() and assert_slb_notexists() is almost identical, except for the polarity of the WARN_ON(). In a future patch we'll need to modify this code, so consolidate it now into a single function. Signed-off-by: Michael Ellerman commit ba3a51ac32ebcf8d0a54b37f1af268ad8a31c52f Author: Thinh Nguyen Date: Thu Aug 2 20:17:16 2018 -0700 usb: dwc3: gadget: Properly check last unaligned/zero chain TRB Current check for the last extra TRB for zero and unaligned transfers does not account for isoc OUT. The last TRB of the Buffer Descriptor for isoc OUT transfers will be retired with HWO=0. As a result, we won't return early. The req->remaining will be updated to include the BUFSIZ count of the extra TRB, and the actual number of transferred bytes calculation will be wrong. To fix this, check whether it's a short or zero packet and the last TRB chain bit to return early. Fixes: c6267a51639b ("usb: dwc3: gadget: align transfers to wMaxPacketSize") Cc: Signed-off-by: Thinh Nguyen Signed-off-by: Felipe Balbi commit 08fd9a82fda86529bb2f2af3c2f7cb657b4d3066 Author: Andy Shevchenko Date: Mon Aug 27 18:30:16 2018 +0300 usb: dwc3: core: Clean up ULPI device If dwc3_core_init_mode() fails with deferred probe, next probe fails on sysfs with sysfs: cannot create duplicate filename '/devices/pci0000:00/0000:00:11.0/dwc3.0.auto/dwc3.0.auto.ulpi' To avoid this failure, clean up ULPI device. Cc: Signed-off-by: Andy Shevchenko Signed-off-by: Felipe Balbi commit 96edebd6bb995f2acb7694bed6e01bf6f5a7b634 Author: Finn Thain Date: Wed Oct 24 18:45:33 2018 +1100 scsi: NCR5380: Return false instead of NULL I overlooked this statement when I recently converted the function result type from struct scsi_cmnd * to bool. No change to object code. Signed-off-by: Finn Thain Signed-off-by: Martin K. Petersen commit 0d52e642c0ccd7a877a58b6ec23552eb35e7170c Author: Masanari Iida Date: Sun Oct 28 14:05:48 2018 +0900 scsi: qla2xxx: Fix a typo in MODULE_PARM_DESC This patch fixes a spelling typo in MODULE_PARM_DESC of ql2xplogiabsentdevice. Signed-off-by: Masanari Iida Signed-off-by: Martin K. Petersen commit e34ff8edcae89922d187425ab0b82e6a039aa371 Author: YueHaibing Date: Fri Oct 26 15:07:31 2018 +0800 scsi: hisi_sas: Remove set but not used variable 'dq_list' Fixes gcc '-Wunused-but-set-variable' warning: drivers/scsi/hisi_sas/hisi_sas_v1_hw.c: In function 'start_delivery_v1_hw': drivers/scsi/hisi_sas/hisi_sas_v1_hw.c:907:20: warning: variable 'dq_list' set but not used [-Wunused-but-set-variable] drivers/scsi/hisi_sas/hisi_sas_v2_hw.c: In function 'start_delivery_v2_hw': drivers/scsi/hisi_sas/hisi_sas_v2_hw.c:1671:20: warning: variable 'dq_list' set but not used [-Wunused-but-set-variable] drivers/scsi/hisi_sas/hisi_sas_v3_hw.c: In function 'start_delivery_v3_hw': drivers/scsi/hisi_sas/hisi_sas_v3_hw.c:889:20: warning: variable 'dq_list' set but not used [-Wunused-but-set-variable] It never used since introduction in commit fa222db0b036 ("scsi: hisi_sas: Don't lock DQ for complete task sending") Signed-off-by: YueHaibing Acked-by: John Garry Signed-off-by: Martin K. Petersen commit a3ecf48248a393438e77e569a0047e968e0ec6c6 Author: Arnd Bergmann Date: Fri Nov 2 16:47:23 2018 +0100 scsi: myrs: only build on little-endian platforms Reading throught the new driver, I noticed that this cannot work on big-endian CPUs, and the old DAC960 had exactly the same behavior. To document this for the future, add a Kconfig dependency that prevents it from being included in big-endian kernels. Since the hardware is really old and we never had a working driver on it for big-endian platforms, it's unlikely to make a difference to users. Signed-off-by: Arnd Bergmann Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen commit 77409c4cdc44560e1b3b839e62d7f73478199680 Author: Arnd Bergmann Date: Fri Nov 2 16:44:13 2018 +0100 scsi: myrs: avoid stack overflow warning Putting a 1024 byte data structure on the stack is generally a bad idea. On 32-bit systems, it also triggers a compile-time warning when building with -Og: drivers/scsi/myrs.c: In function 'myrs_get_ctlr_info': drivers/scsi/myrs.c:212:1: error: the frame size of 1028 bytes is larger than 1024 bytes [-Werror=frame-larger-than=] We only really need three members of the structure, so just read them manually here instead of copying the entire structure. Fixes: 77266186397c ("scsi: myrs: Add Mylex RAID controller (SCSI interface)") Signed-off-by: Arnd Bergmann Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen commit f8d294324598ec85bea2779512e48c94cbe4d7c6 Author: Arnd Bergmann Date: Fri Nov 2 16:35:48 2018 +0100 scsi: lpfc: fix remoteport access The addition of a spinlock in lpfc_debugfs_nodelist_data() introduced a bug that lets us not skip NULL pointers correctly, as noticed by gcc-8: drivers/scsi/lpfc/lpfc_debugfs.c: In function 'lpfc_debugfs_nodelist_data.constprop': drivers/scsi/lpfc/lpfc_debugfs.c:728:13: error: 'nrport' may be used uninitialized in this function [-Werror=maybe-uninitialized] if (nrport->port_role & FC_PORT_ROLE_NVME_INITIATOR) This changes the logic back to what it was, while keeping the added spinlock. Fixes: 9e210178267b ("scsi: lpfc: Synchronize access to remoteport via rport") Signed-off-by: Arnd Bergmann Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen commit f8f4adc1c1661686f492cf27817844a3d0517aff Author: Arnd Bergmann Date: Fri Nov 2 16:34:49 2018 +0100 scsi: myrb: fix sprintf buffer overflow warning gcc warns that the 12 byte fw_version field might not be long enough to contain the generated firmware name string: drivers/scsi/myrb.c: In function 'myrb_get_hba_config': drivers/scsi/myrb.c:1052:38: error: '%02d' directive writing between 2 and 3 bytes into a region of size between 2 and 5 [-Werror=format-overflow=] sprintf(cb->fw_version, "%d.%02d-%c-%02d", ^~~~ drivers/scsi/myrb.c:1052:26: note: directive argument in the range [0, 255] sprintf(cb->fw_version, "%d.%02d-%c-%02d", ^~~~~~~~~~~~~~~~~ drivers/scsi/myrb.c:1052:2: note: 'sprintf' output between 10 and 14 bytes into a destination of size 12 sprintf(cb->fw_version, "%d.%02d-%c-%02d", ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ enquiry2->fw.major_version, ~~~~~~~~~~~~~~~~~~~~~~~~~~~ enquiry2->fw.minor_version, ~~~~~~~~~~~~~~~~~~~~~~~~~~~ enquiry2->fw.firmware_type, ~~~~~~~~~~~~~~~~~~~~~~~~~~~ enquiry2->fw.turn_id); ~~~~~~~~~~~~~~~~~~~~~ I have not checked whether there are appropriate range checks before the sprintf, but there is a range check after it that will bail out in case of out of range version numbers. This means we can simply use snprintf() instead of sprintf() to limit the output buffer size, and it will work correctly. Fixes: 081ff398c56c ("scsi: myrb: Add Mylex RAID controller (block interface)") Signed-off-by: Arnd Bergmann Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen commit 5841734fa6f997e57e8c29cbb6409bd74a6949e8 Author: Bart Van Assche Date: Mon Nov 5 16:44:59 2018 -0800 scsi: target/core: Avoid that a kernel oops is triggered when COMPARE AND WRITE fails Fixes: aa73237dcb2d ("scsi: target/core: Always call transport_complete_callback() upon failure") 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 a422757e8c323ae12163fa74bc21c41606a233df Merge: 713119315741 f393808dc641 Author: David S. Miller Date: Mon Nov 5 17:19:25 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 the first batch of Netfilter fixes for your net tree: 1) Fix splat with IPv6 defragmenting locally generated fragments, from Florian Westphal. 2) Fix Incorrect check for missing attribute in nft_osf. 3) Missing INT_MIN & INT_MAX definition for netfilter bridge uapi header, from Jiri Slaby. 4) Revert map lookup in nft_numgen, this is already possible with the existing infrastructure without this extension. 5) Fix wrong listing of set reference counter, make counter synchronous again, from Stefano Brivio. 6) Fix CIDR 0 in hash:net,port,net, from Eric Westbrook. 7) Fix allocation failure with large set, use kvcalloc(). From Andrey Ryabinin. 8) No need to disable BH when fetch ip set comment, patch from Jozsef Kadlecsik. 9) Sanity check for valid sysfs entry in xt_IDLETIMER, from Taehee Yoo. 10) Fix suspicious rcu usage via ip_set() macro at netlink dump, from Jozsef Kadlecsik. 11) Fix setting default timeout via nfnetlink_cttimeout, this comes with preparation patch to add nf_{tcp,udp,...}_pernet() helper. 12) Allow ebtables table nat to be of filter type via nft_compat. From Florian Westphal. 13) Incorrect calculation of next bucket in early_drop, do no bump hash value, update bucket counter instead. From Vasily Khoruzhick. ==================== Signed-off-by: David S. Miller commit 7131193157414ac3167d7b2f2feb4c42b415d6c5 Author: Rasmus Villemoes Date: Mon Nov 5 18:52:21 2018 +0100 net: alx: make alx_drv_name static alx_drv_name is not used outside main.c, so there's no reason for it to have external linkage. Signed-off-by: Rasmus Villemoes Signed-off-by: David S. Miller commit 97adaddaa6db7a8af81b9b11e30cbe3628cd6700 Author: Taehee Yoo Date: Mon Nov 5 22:31:41 2018 +0900 net: bpfilter: fix iptables failure if bpfilter_umh is disabled When iptables command is executed, ip_{set/get}sockopt() try to upload bpfilter.ko if bpfilter is enabled. if it couldn't find bpfilter.ko, command is failed. bpfilter.ko is generated if CONFIG_BPFILTER_UMH is enabled. ip_{set/get}sockopt() only checks CONFIG_BPFILTER. So that if CONFIG_BPFILTER is enabled and CONFIG_BPFILTER_UMH is disabled, iptables command is always failed. test config: CONFIG_BPFILTER=y # CONFIG_BPFILTER_UMH is not set test command: %iptables -L iptables: No chain/target/match by that name. Fixes: d2ba09c17a06 ("net: add skeleton of bpfilter kernel module") Signed-off-by: Taehee Yoo Signed-off-by: David S. Miller commit c34c1287778b080ed692c0a46a8e345206cc29e6 Author: Andrei Vagin Date: Sun Nov 4 22:37:15 2018 -0800 sock_diag: fix autoloading of the raw_diag module IPPROTO_RAW isn't registred as an inet protocol, so inet_protos[protocol] is always NULL for it. Cc: Cyrill Gorcunov Cc: Xin Long Fixes: bf2ae2e4bf93 ("sock_diag: request _diag module only when the family or proto has been registered") Signed-off-by: Andrei Vagin Reviewed-by: Cyrill Gorcunov Signed-off-by: David S. Miller commit d016b4a3562b745fd9fa387a47d8de62ccd7e241 Author: Matwey V. Kornilov Date: Fri Nov 2 21:19:36 2018 +0300 net: core: netpoll: Enable netconsole IPv6 link local address There is no reason to discard using source link local address when remote netconsole IPv6 address is set to be link local one. The patch allows administrators to use IPv6 netconsole without explicitly configuring source address: netconsole=@/,@fe80::5054:ff:fe2f:6012/ Signed-off-by: Matwey V. Kornilov Signed-off-by: David S. Miller commit e22d0bfa09a56e427a1a950ccb85621c86b343a4 Author: Alexey Kodanev Date: Fri Nov 2 19:11:05 2018 +0300 ipv6: properly check return value in inet6_dump_all() Make sure we call fib6_dump_end() if it happens that skb->len is zero. rtnl_dump_all() can reset cb->args on the next loop iteration there. Fixes: 08e814c9e8eb ("net/ipv6: Bail early if user only wants cloned entries") Fixes: ae677bbb4441 ("net: Don't return invalid table id error when dumping all families") Signed-off-by: Alexey Kodanev Signed-off-by: David S. Miller commit 5e1acb4afacc6229946c3d2b7ffc422b53fb2448 Author: Alexey Kodanev Date: Fri Nov 2 19:11:04 2018 +0300 rtnetlink: restore handling of dumpit return value in rtnl_dump_all() For non-zero return from dumpit() we should break the loop in rtnl_dump_all() and return the result. Otherwise, e.g., we could get the memory leak in inet6_dump_fib() [1]. The pointer to the allocated struct fib6_walker there (saved in cb->args) can be lost, reset on the next iteration. Fix it by partially restoring the previous behavior before commit c63586dc9b3e ("net: rtnl_dump_all needs to propagate error from dumpit function"). The returned error from dumpit() is still passed further. [1]: unreferenced object 0xffff88001322a200 (size 96): comm "sshd", pid 1484, jiffies 4296032768 (age 1432.542s) hex dump (first 32 bytes): 00 01 00 00 00 00 ad de 00 02 00 00 00 00 ad de ................ 18 09 41 36 00 88 ff ff 18 09 41 36 00 88 ff ff ..A6......A6.... backtrace: [<0000000095846b39>] kmem_cache_alloc_trace+0x151/0x220 [<000000007d12709f>] inet6_dump_fib+0x68d/0x940 [<000000002775a316>] rtnl_dump_all+0x1d9/0x2d0 [<00000000d7cd302b>] netlink_dump+0x945/0x11a0 [<000000002f43485f>] __netlink_dump_start+0x55d/0x800 [<00000000f76bbeec>] rtnetlink_rcv_msg+0x4fa/0xa00 [<000000009b5761f3>] netlink_rcv_skb+0x29c/0x420 [<0000000087a1dae1>] rtnetlink_rcv+0x15/0x20 [<00000000691b703b>] netlink_unicast+0x4e3/0x6c0 [<00000000b5be0204>] netlink_sendmsg+0x7f2/0xba0 [<0000000096d2aa60>] sock_sendmsg+0xba/0xf0 [<000000008c1b786f>] __sys_sendto+0x1e4/0x330 [<0000000019587b3f>] __x64_sys_sendto+0xe1/0x1a0 [<00000000071f4d56>] do_syscall_64+0x9f/0x300 [<000000002737577f>] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [<0000000057587684>] 0xffffffffffffffff Fixes: c63586dc9b3e ("net: rtnl_dump_all needs to propagate error from dumpit function") Signed-off-by: Alexey Kodanev Signed-off-by: David S. Miller commit 90c31cb9a8115a1183daed9a714eea4be0687931 Author: Boris Brezillon Date: Fri Oct 19 11:02:22 2018 +0200 mtd: spi-nor: Reset nor->addr_width when SFDP parsing failed Commit 5390a8df769e ("mtd: spi-nor: add support to non-uniform SFDP SPI NOR flash memories") removed the 'nor->addr_width = 0;' statement when spi_nor_parse_sfdp() returns an error, thus leaving ->addr_width in an undefined state which can cause trouble when spi_nor_scan() checks its value. Reported-by: Cyrille Pitchen Fixes: 5390a8df769e ("mtd: spi-nor: add support to non-uniform SFDP SPI NOR flash memories") Signed-off-by: Boris Brezillon Reviewed-by: Tudor Ambarus commit 91d7b67000c6e9bd605624079fee5a084238ad92 Author: Christophe JAILLET Date: Tue Oct 16 09:13:46 2018 +0200 mtd: spi-nor: cadence-quadspi: Return error code in cqspi_direct_read_execute() We return 0 unconditionally in 'cqspi_direct_read_execute()'. However, 'ret' is set to some error codes in several error handling paths. Return 'ret' instead to propagate the error code. Fixes: ffa639e069fb ("mtd: spi-nor: cadence-quadspi: Add DMA support for direct mode reads") Cc: Signed-off-by: Christophe JAILLET Signed-off-by: Boris Brezillon commit 0773495b1f5f1c5e23551843f87b5ff37e7af8f7 Author: Max Filippov Date: Sun Nov 4 01:46:00 2018 -0700 xtensa: make sure bFLT stack is 16 byte aligned Xtensa ABI requires stack alignment to be at least 16. In noMMU configuration ARCH_SLAB_MINALIGN is used to align stack. Make it at least 16. This fixes the following runtime error in noMMU configuration, caused by interaction between insufficiently aligned stack and alloca function, that results in corruption of on-stack variable in the libc function glob: Caught unhandled exception in 'sh' (pid = 47, pc = 0x02d05d65) - should not happen EXCCAUSE is 15 Cc: stable@vger.kernel.org Signed-off-by: Max Filippov commit 804dfaf01bcc9daa4298c608ba9018abf616ec48 Author: Matthew Wilcox Date: Mon Nov 5 16:37:15 2018 -0500 XArray: Fix Documentation Minor fixes. Signed-off-by: Matthew Wilcox commit d9c480435add8257f9069941f0e6196647f6d746 Author: Matthew Wilcox Date: Mon Nov 5 16:15:56 2018 -0500 XArray: Handle NULL pointers differently for allocation For allocating XArrays, it makes sense to distinguish beteen erasing an entry and storing NULL. Storing NULL keeps the index allocated with a NULL pointer associated with it while xa_erase() frees the index. Some existing IDR users rely on this ability. Signed-off-by: Matthew Wilcox commit 611f318637daa5710a1d7a0e7dc6cda23914094a Author: Matthew Wilcox Date: Mon Nov 5 15:56:17 2018 -0500 XArray: Unify xa_store and __xa_store Saves around 115 bytes on a tinyconfig build and reduces the amount of code duplication in the XArray implementation. Signed-off-by: Matthew Wilcox commit 84e5acb76dacb8ebd648a86a53907ce0dd616534 Author: Matthew Wilcox Date: Fri Oct 26 14:41:29 2018 -0400 XArray: Add xa_store_bh() and xa_store_irq() These convenience wrappers disable interrupts while taking the spinlock. A number of drivers would otherwise have to open-code these functions. Signed-off-by: Matthew Wilcox commit 9c16bb88905456a9b1299338041f05fa7699971b Author: Matthew Wilcox Date: Mon Nov 5 15:48:49 2018 -0500 XArray: Turn xa_erase into an exported function Make xa_erase() take the spinlock and then call __xa_erase(), but make it out of line since it's such a common function. Signed-off-by: Matthew Wilcox commit c5beb07e7a06b24f4f27304f6282b5dbd929543b Author: Matthew Wilcox Date: Wed Oct 31 14:39:28 2018 -0400 XArray: Unify xa_cmpxchg and __xa_cmpxchg xa_cmpxchg() was one of the largest functions in the xarray implementation. By turning it into a wrapper and having the callers take the lock (like several other functions), we save 160 bytes on a tinyconfig build and reduce the duplication in xarray.c. Signed-off-by: Matthew Wilcox commit 4c0608f4a0e76dfb82d3accd20081f4bf47ed143 Author: Matthew Wilcox Date: Tue Oct 30 09:45:55 2018 -0400 XArray: Regularise xa_reserve The xa_reserve() function was a little unusual in that it attempted to be callable for all kinds of locking scenarios. Make it look like the other APIs with __xa_reserve, xa_reserve_bh and xa_reserve_irq variants. Signed-off-by: Matthew Wilcox commit 6915ed86cca6a0b422e8ada05ec7009d2074b88a Author: Jeff Barnhill <0xeffeff@gmail.com> Date: Mon Nov 5 20:36:45 2018 +0000 net/ipv6: Move anycast init/cleanup functions out of CONFIG_PROC_FS Move the anycast.c init and cleanup functions which were inadvertently added inside the CONFIG_PROC_FS definition. Fixes: 2384d02520ff ("net/ipv6: Add anycast addresses to a global hashtable") Signed-off-by: Jeff Barnhill <0xeffeff@gmail.com> Signed-off-by: David S. Miller commit 8e7f91719db36440d63de37331367be9700ca0c7 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 aba118389a6fb2ad7958de0f37b5869852bd38cf 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 fe2b51145c9ffd5a49013fe180e42e92ef0e6df9 Author: Matthew Wilcox Date: Mon Dec 4 19:33:30 2017 -0500 nilfs2: Use xa_erase_irq This code simply opencoded xa_erase_irq(). Signed-off-by: Matthew Wilcox commit 9ee5a3b7eeb190eb413e0fac3246022bd1baa05d Author: Matthew Wilcox Date: Thu Nov 1 22:52:06 2018 -0400 XArray: Export __xa_foo to non-GPL modules Without this, it's not possible to use static inlines like xa_store_bh() and xa_erase_irq(). Signed-off-by: Matthew Wilcox commit 8229706e03e4147f3e22d1de0d30630cde6d18a9 Author: Matthew Wilcox Date: Thu Nov 1 16:55:19 2018 -0400 XArray: Fix xa_for_each with a single element at 0 The following sequence of calls would result in an infinite loop in xa_find_after(): xa_store(xa, 0, x, GFP_KERNEL); index = 0; xa_for_each(xa, entry, index, ULONG_MAX, XA_PRESENT) { } xa_find_after() was confusing the situation where we found no entry in the tree with finding a multiorder entry, so it would look for the successor entry forever. Just check for this case explicitly. Includes a few new checks in the test suite to be sure this doesn't reappear. Signed-off-by: Matthew Wilcox commit af31b04b67f4fd7f639fd465a507c154c46fc9fb Author: Masayoshi Mizuma Date: Tue Oct 30 21:50:25 2018 -0400 tools/testing/nvdimm: Fix the array size for dimm devices. KASAN reports following global out of bounds access while nfit_test is being loaded. The out of bound access happens the following reference to dimm_fail_cmd_flags[dimm]. 'dimm' is over than the index value, NUM_DCR (==5). static int override_return_code(int dimm, unsigned int func, int rc) { if ((1 << func) & dimm_fail_cmd_flags[dimm]) { dimm_fail_cmd_flags[] definition: static unsigned long dimm_fail_cmd_flags[NUM_DCR]; 'dimm' is the return value of get_dimm(), and get_dimm() returns the index of handle[] array. The handle[] has 7 index. Let's use ARRAY_SIZE(handle) as the array size. KASAN report: ================================================================== BUG: KASAN: global-out-of-bounds in nfit_test_ctl+0x47bb/0x55b0 [nfit_test] Read of size 8 at addr ffffffffc10cbbe8 by task kworker/u41:0/8 ... Call Trace: dump_stack+0xea/0x1b0 ? dump_stack_print_info.cold.0+0x1b/0x1b ? kmsg_dump_rewind_nolock+0xd9/0xd9 print_address_description+0x65/0x22e ? nfit_test_ctl+0x47bb/0x55b0 [nfit_test] kasan_report.cold.6+0x92/0x1a6 nfit_test_ctl+0x47bb/0x55b0 [nfit_test] ... The buggy address belongs to the variable: dimm_fail_cmd_flags+0x28/0xffffffffffffa440 [nfit_test] ================================================================== Fixes: 39611e83a28c ("tools/testing/nvdimm: Make DSM failure code injection...") Signed-off-by: Masayoshi Mizuma Signed-off-by: Dan Williams commit 6ac2226229d931153331a93d90655a3de05b9290 Author: Gustavo Romero Date: Thu Nov 1 20:13:21 2018 -0400 perf tools: Fix undefined symbol scnprintf in libperf-jvmti.so Currently jvmti agent can not be used because function scnprintf is not present in the agent libperf-jvmti.so. As a result the JVM when using such agent to record JITed code profiling information will fail on looking up scnprintf: java: symbol lookup error: lib/libperf-jvmti.so: undefined symbol: scnprintf This commit fixes that by reverting to the use of snprintf, that can be looked up, instead of scnprintf, adding a proper check for the returned value in order to print a better error message when the jitdump file pathname is too long. Checking the returned value also helps to comply with some recent gcc versions, like gcc8, which will fail due to truncated writing checks related to the -Werror=format-truncation= flag. Signed-off-by: Gustavo Romero Acked-by: Jiri Olsa LPU-Reference: 1541117601-18937-2-git-send-email-gromero@linux.vnet.ibm.com Link: https://lkml.kernel.org/n/tip-mvpxxxy7wnzaj74cq75muw3f@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit fd5ba6ee3187617287fb9cb187e3d6b3631210a3 Author: Aaro Koskinen Date: Fri Nov 2 21:10:48 2018 +0200 arm64: dts: stratix10: fix multicast filtering On Stratix 10, the EMAC has 256 hash buckets for multicast filtering. This needs to be specified in DTS, otherwise the stmmac driver defaults to 64 buckets and initializes the filter incorrectly. As a result, e.g. valid IPv6 multicast traffic ends up being dropped. Fixes: 78cd6a9d8e15 ("arm64: dts: Add base stratix 10 dtsi") Cc: stable@vger.kernel.org Signed-off-by: Aaro Koskinen Signed-off-by: Dinh Nguyen commit e2c39f36c354a06c6e9d32d4fdf8660b41803d82 Author: Arnaldo Carvalho de Melo Date: Mon Nov 5 15:46:51 2018 -0300 perf beauty: Use SRCARCH, ARCH=x86_64 must map to "x86" to find the headers Guenter reported that using ARCH=x86_64 to build perf has regressed: $ make -C tools/perf O=/tmp/build/perf ARCH=x86_64 make: Entering directory '/home/acme/git/perf/tools/perf' BUILD: Doing 'make -j4' parallel build HOSTCC /tmp/build/perf/fixdep.o HOSTLD /tmp/build/perf/fixdep-in.o LINK /tmp/build/perf/fixdep Auto-detecting system features: ... dwarf: [ on ] ... bpf: [ on ] GEN /tmp/build/perf/common-cmds.h make[2]: *** No rule to make target '/home/acme/git/perf/tools/arch/x86_64/include/uapi/asm//mman.h', needed by '/tmp/build/perf/trace/beauty/generated/mmap_flags_array.c'. Stop. make[2]: *** Waiting for unfinished jobs.... PERF_VERSION = 4.19.gf6c23e3 make[1]: *** [Makefile.perf:207: sub-make] Error 2 make: *** [Makefile:70: all] Error 2 make: Leaving directory '/home/acme/git/perf/tools/perf' $ This is because we must use $(SRCARCH) where we were using $(ARCH), so that, just like the top level Makefile, we get this done: # Additional ARCH settings for x86 ifeq ($(ARCH),i386) SRCARCH := x86 endif ifeq ($(ARCH),x86_64) SRCARCH := x86 endif Which is done in tools/scripts/Makefile.arch, so switch to use $(SRCARCH). Reported-by: Guenter Roeck Cc: Adrian Hunter Cc: Clark Williams Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Fixes: fbd7458db757 ("perf beauty: Wire up the mmap flags table generator to the Makefile") Link: https://lkml.kernel.org/r/20181105184612.GD7077@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 7900f06c3feedbe74d79f28a0d062dbf11fd10bf Author: Jon Mason Date: Wed Sep 19 11:31:40 2018 -0400 MAINTAINERS: Remove self from Broadcom SoCs I'm leaving Broadcom, and will no longer have access to hardware and documentation necessary to be effective in a maintainership role. Signed-off-by: Jon Mason Signed-off-by: Florian Fainelli commit d01501f85249848a2497968d46dd46d5c6fe32e6 Author: Maciej W. Rozycki Date: Thu Nov 1 07:54:24 2018 +0000 MIPS: Fix `dma_alloc_coherent' returning a non-coherent allocation Fix a MIPS `dma_alloc_coherent' regression from commit bc3ec75de545 ("dma-mapping: merge direct and noncoherent ops") that causes a cached allocation to be returned on noncoherent cache systems. This is due to an inverted check now used in the MIPS implementation of `arch_dma_alloc' on the result from `dma_direct_alloc_pages' before doing the cached-to-uncached mapping of the allocation address obtained. The mapping has to be done for a non-NULL rather than NULL result, because a NULL result means the allocation has failed. Invert the check for correct operation then. Signed-off-by: Maciej W. Rozycki Signed-off-by: Paul Burton Reviewed-by: Christoph Hellwig Fixes: bc3ec75de545 ("dma-mapping: merge direct and noncoherent ops") Patchwork: https://patchwork.linux-mips.org/patch/20965/ commit c0fae7e2452b90c31edd2d25eb3baf0c76b400ca Author: Aaro Koskinen Date: Sat Oct 27 01:46:34 2018 +0300 MIPS: OCTEON: fix out of bounds array access on CN68XX The maximum number of interfaces is returned by cvmx_helper_get_number_of_interfaces(), and the value is used to access interface_port_count[]. When CN68XX support was added, we forgot to increase the array size. Fix that. Fixes: 2c8c3f0201333 ("MIPS: Octeon: Support additional interfaces on CN68XX") Signed-off-by: Aaro Koskinen Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/20949/ Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Cc: stable@vger.kernel.org # v4.3+ commit f6c23e3b55cb93f32a724f41af8d38888bc2ab6b Author: Adrian Hunter Date: Mon Nov 5 09:35:05 2018 +0200 perf intel-pt: Add MTC and CYC timestamps to debug log One cause of decoding errors is un-synchronized side-band data. Timestamps are needed to debug such cases. TSC packet timestamps are logged. Log also MTC and CYC timestamps. Signed-off-by: Adrian Hunter Link: http://lkml.kernel.org/r/20181105073505.8129-3-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 93f8be2799515e01647c5a9b0d17a90a00ebcf82 Author: Adrian Hunter Date: Mon Nov 5 09:35:04 2018 +0200 perf intel-pt: Add more event information to debug log More event information is useful for debugging, especially MMAP events. Signed-off-by: Adrian Hunter Link: http://lkml.kernel.org/r/20181105073505.8129-2-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 35fa1cee21e34f43db928d022610707d5a234faf Author: Adrian Hunter Date: Sun Nov 4 17:12:38 2018 +0200 perf scripts python: exported-sql-viewer.py: Fix table find when table re-ordered Table rows can be re-ordered by selecting a column to sort by. After re-ordering, the "find" operation was highlighting the wrong row, fix it. Signed-off-by: Adrian Hunter Cc: Andi Kleen Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20181104151238.15947-5-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 65b24292e8f34df22a16bf7c47823325ac247572 Author: Adrian Hunter Date: Sun Nov 4 17:12:37 2018 +0200 perf scripts python: exported-sql-viewer.py: Add help window Add a window to display help. It is also possible to display the help only, by using the option "--help-only" instead of a database name. Signed-off-by: Adrian Hunter Cc: Andi Kleen Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20181104151238.15947-4-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 210cf1f96185f0c6383df8b6030e3d2945e1b41a Author: Adrian Hunter Date: Sun Nov 4 17:12:36 2018 +0200 perf scripts python: exported-sql-viewer.py: Add Selected branches report Fetching data from the database can be slow. Add a report that provides the ability to select a subset of branches. Signed-off-by: Adrian Hunter Cc: Andi Kleen Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20181104151238.15947-3-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 5ed4419d47f8ba6bbccd8e3203276b3c39a792b7 Author: Adrian Hunter Date: Sun Nov 4 17:12:35 2018 +0200 perf scripts python: exported-sql-viewer.py: Fall back to /usr/local/lib/libxed.so Fall back to /usr/local/lib/libxed.so to cater for distributions that do not have /usr/local/lib in the library path by default. Signed-off-by: Adrian Hunter Cc: Andi Kleen Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20181104151238.15947-2-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 590ac60d8aa929bd21e35cd95a7d8720d00eb4f3 Author: Jin Yao Date: Wed Oct 31 19:06:35 2018 +0800 perf top: Display the LBR stats in callchain entry 'perf report' has supported the displaying of LBR stats (such as cycles, predicted%) in callchain entry. For example: $ perf report --branch-history --stdio --1.01%--intel_idle mwait.h:29 intel_idle cpufeature.h:164 (cycles:5) intel_idle cpufeature.h:164 (predicted:76.4%) intel_idle mwait.h:102 (cycles:41) intel_idle current.h:15 While 'perf top' doesn't support that. For example: $ perf top -a -b --call-graph branch - 13.86% 0.23% [kernel] [k] __x86_indirect_thunk_rax - 13.65% __x86_indirect_thunk_rax + 1.69% do_syscall_64 + 1.68% do_select + 1.41% ktime_get + 0.70% __schedule + 0.62% do_sys_poll 0.58% __x86_indirect_thunk_rax Actually it's very easy to enable this feature in 'perf top'. With this patch, the result is: $ perf top -a -b --call-graph branch $ - 13.58% 0.00% [kernel] [k] __x86_indirect_thunk_rax $ - 13.57% __x86_indirect_thunk_rax (predicted:93.9%) $ + 1.78% do_select (cycles:2) $ + 1.68% perf_pmu_disable.part.99 (cycles:1) $ + 1.45% ___sys_recvmsg (cycles:25) $ + 0.81% unix_stream_sendmsg (cycles:18) $ + 0.80% ktime_get (cycles:400) $ 0.58% pick_next_task_fair (cycles:47) $ + 0.56% i915_request_retire (cycles:2) $ + 0.52% do_sys_poll (cycles:4) Signed-off-by: Jin Yao Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jiri Olsa Cc: Kan Liang Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1540983995-20462-1-git-send-email-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit ea1fa48c055f833eb25f0c33188feecb7002ada5 Author: Thomas Richter Date: Tue Oct 23 17:16:16 2018 +0200 perf stat: Handle different PMU names with common prefix On s390 the CPU Measurement Facility for counters now supports 2 PMUs named cpum_cf (CPU Measurement Facility for counters) and cpum_cf_diag (CPU Measurement Facility for diagnostic counters) for one and the same CPU. Running command [root@s35lp76 perf]# ./perf stat -e tx_c_tend \ -- ~/mytests/cf-tx-events 1 Measuring transactions TX_C_TABORT_NO_SPECIAL: 0 expected:0 TX_C_TABORT_SPECIAL: 0 expected:0 TX_C_TEND: 1 expected:1 TX_NC_TABORT: 11 expected:11 TX_NC_TEND: 1 expected:1 Performance counter stats for '/root/mytests/cf-tx-events 1': 2 tx_c_tend 0.002120091 seconds time elapsed 0.000121000 seconds user 0.002127000 seconds sys [root@s35lp76 perf]# displays output which is unexpected (and wrong): 2 tx_c_tend The test program definitely triggers only one transaction, as shown in line 'TX_C_TEND: 1 expected:1'. This is caused by the following call sequence: pmu_lookup() scans and installs a PMU. +--> pmu_aliases() parses all aliases in directory ...//events/* which are file names. +--> pmu_aliases_parse() Read each file in directory and create an new alias entry. This is done with +--> perf_pmu__new_alias() and +--> __perf_pmu__new_alias() which also check for identical alias names. After pmu_aliases() returns, a complete list of event names for this pmu has been created. Now function pmu_add_cpu_aliases() is called to add the events listed in the json | files to the alias list of the cpu. +--> perf_pmu__find_map() Returns a pointer to the json events. Now function pmu_add_cpu_aliases() scans through all events listed in the JSON files for this CPU. Each json event pmu name is compared with the current PMU being built up and if they mismatch, the json event is added to the current PMUs alias list. To avoid duplicate entries the following comparison is done: if (!is_arm_pmu_core(name)) { pname = pe->pmu ? pe->pmu : "cpu"; if (strncmp(pname, name, strlen(pname))) continue; } The culprit is the strncmp() function. Using current s390 PMU naming, the first PMU is 'cpum_cf' and a long list of events is added, among them 'tx_c_tend' When the second PMU named 'cpum_cf_diag' is added, only one event named 'CF_DIAG' is added by the pmu_aliases() function. Now function pmu_add_cpu_aliases() is invoked for PMU 'cpum_cf_diag'. Since the CPUID string is the same for both PMUs, json file events for PMU named 'cpum_cf' are added to the PMU 'cpm_cf_diag' This happens because the strncmp() actually compares: strncmp("cpum_cf", "cpum_cf_diag", 6); The first parameter is the pmu name taken from the event in the json file. The second parameter is the pmu name of the PMU currently being built. They are different, but the length of the compare only tests the common prefix and this returns 0(true) when it should return false. Now all events for PMU cpum_cf are added to the alias list for pmu cpum_cf_diag. Later on in function parse_events_add_pmu() the event 'tx_c_end' is searched in all available PMUs and found twice, adding it two times to the evsel_list global variable which is the root of all events. This results in a counter value of 2 instead of 1. Output with this patch: [root@s35lp76 perf]# ./perf stat -e tx_c_tend \ -- ~/mytests/cf-tx-events 1 Measuring transactions TX_C_TABORT_NO_SPECIAL: 0 expected:0 TX_C_TABORT_SPECIAL: 0 expected:0 TX_C_TEND: 1 expected:1 TX_NC_TABORT: 11 expected:11 TX_NC_TEND: 1 expected:1 Performance counter stats for '/root/mytests/cf-tx-events 1': 1 tx_c_tend 0.001815365 seconds time elapsed 0.000123000 seconds user 0.001756000 seconds sys [root@s35lp76 perf]# Signed-off-by: Thomas Richter Reviewed-by: Hendrik Brueckner Reviewed-by: Sebastien Boisvert Cc: Heiko Carstens Cc: Kan Liang Cc: Martin Schwidefsky Cc: stable@vger.kernel.org Fixes: 292c34c10249 ("perf pmu: Fix core PMU alias list for X86 platform") Link: http://lkml.kernel.org/r/20181023151616.78193-1-tmricht@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo commit cf99ad1424c54fc84b84d3a3deb57a48c340c30a Author: Andi Kleen Date: Mon Oct 1 12:59:27 2018 -0700 perf record: Support weak groups Implement a weak group fallback for 'perf record', similar to the existing 'perf stat' support. This allows to use groups that might be longer than the available counters without failing. Before: $ perf record -e '{cycles,cache-misses,cache-references,cpu_clk_unhalted.thread,cycles,cycles,cycles}' -a sleep 1 Error: The sys_perf_event_open() syscall returned with 22 (Invalid argument) for event (cycles). /bin/dmesg | grep -i perf may provide additional information. After: $ ./perf record -e '{cycles,cache-misses,cache-references,cpu_clk_unhalted.thread,cycles,cycles,cycles}:W' -a sleep 1 WARNING: No sample_id_all support, falling back to unordered processing [ perf record: Woken up 3 times to write data ] [ perf record: Captured and wrote 8.136 MB perf.data (134069 samples) ] Signed-off-by: Andi Kleen Acked-by: Jiri Olsa Link: http://lkml.kernel.org/r/20181001195927.14211-2-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo commit c3537fc251503af18085b8f84126d13743663970 Author: Andi Kleen Date: Mon Oct 1 12:59:26 2018 -0700 perf evlist: Move perf_evsel__reset_weak_group into evlist - Move the function from builtin-stat to evlist for reuse - Rename to evlist to match purpose better - Pass the evlist as first argument. - No functional changes Signed-off-by: Andi Kleen Acked-by: Jiri Olsa Link: http://lkml.kernel.org/r/20181001195927.14211-1-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo commit 6fce3a406108ee6c8a61e2a33e52e9198a626ea0 Author: Lucas Stach Date: Thu Oct 4 11:37:00 2018 +0200 drm/etnaviv: fix bogus fence complete check in timeout handler The GPU hardware fences and the job out-fences are on different timelines so it's wrong to compare them. Fix this by only looking at the out-fence. Cc: Fixes: 2c83a726d6fb (drm/etnaviv: bring back progress check in job timeout handler) Signed-off-by: Lucas Stach commit 5d7a5bcb67c70cbc904057ef52d3fcfeb24420bb Author: Frank Sorenson Date: Tue Oct 30 15:10:40 2018 -0500 sunrpc: correct the computation for page_ptr when truncating When truncating the encode buffer, the page_ptr is getting advanced, causing the next page to be skipped while encoding. The page is still included in the response, so the response contains a page of bogus data. We need to adjust the page_ptr backwards to ensure we encode the next page into the correct place. We saw this triggered when concurrent directory modifications caused nfsd4_encode_direct_fattr() to return nfserr_noent, and the resulting call to xdr_truncate_encode() corrupted the READDIR reply. Signed-off-by: Frank Sorenson Cc: stable@vger.kernel.org Signed-off-by: J. Bruce Fields commit 02826a6ba301b72461c3706e1cc66d5571cd327e Author: Masahiro Yamada Date: Mon Nov 5 16:52:34 2018 +0900 kbuild: deb-pkg: fix bindeb-pkg breakage when O= is used Ard Biesheuvel reports bindeb-pkg with O= option is broken in the following way: ... LD [M] sound/soc/rockchip/snd-soc-rk3399-gru-sound.ko LD [M] sound/soc/rockchip/snd-soc-rockchip-pcm.ko LD [M] sound/soc/rockchip/snd-soc-rockchip-rt5645.ko LD [M] sound/soc/rockchip/snd-soc-rockchip-spdif.ko LD [M] sound/soc/sh/rcar/snd-soc-rcar.ko fakeroot -u debian/rules binary make KERNELRELEASE=4.19.0-12677-g19beffaf7a99-dirty ARCH=arm64 KBUILD_SRC= intdeb-pkg /bin/bash /home/ard/linux/scripts/package/builddeb Makefile:600: include/config/auto.conf: No such file or directory *** *** Configuration file ".config" not found! *** *** Please run some configurator (e.g. "make oldconfig" or *** "make menuconfig" or "make xconfig"). *** make[12]: *** [syncconfig] Error 1 make[11]: *** [syncconfig] Error 2 make[10]: *** [include/config/auto.conf] Error 2 make[9]: *** [__sub-make] Error 2 ... Prior to commit 80463f1b7bf9 ("kbuild: add --include-dir flag only for out-of-tree build"), both srctree and objtree were added to --include-dir redundantly, and the wrong code '$MAKE image_name' was working by relying on that. Now, the potential issue that had previously been hidden just showed up. '$MAKE image_name' recurses to the generated $(objtree)/Makefile and ends up with running in srctree, which is incorrect. It should be invoked with '-f $srctree/Makefile' (or KBUILD_SRC=) to be executed in objtree. Fixes: 80463f1b7bf9 ("kbuild: add --include-dir flag only for out-of-tree build") Reported-by: Ard Biesheuvel Signed-off-by: Masahiro Yamada Tested-by: Ard Biesheuvel commit 21b42eb46834f6245a55ac77bdf3e14c034e2864 Author: Masahiro Yamada Date: Mon Nov 5 16:51:49 2018 +0900 kbuild: rpm-pkg: fix binrpm-pkg breakage when O= is used Zhenzhong Duan reported that running 'make O=/build/kernel binrpm-pkg' failed with the following errors: Running 'make O=/build/kernel binrpm-pkg' failed with below two errors. Makefile:600: include/config/auto.conf: No such file or directory + cp make -C /mnt/root/kernel O=/build/kernel image_name make -f /mnt/root/kernel/Makefile ... cp: invalid option -- 'C' Try 'cp --help' for more information. Prior to commit 80463f1b7bf9 ("kbuild: add --include-dir flag only for out-of-tree build"), both srctree and objtree were added to --include-dir redundantly, and the wrong code 'make image_name' was working by relying on that. Now, the potential issue that had previously been hidden just showed up. 'make image_name' recurses to the generated $(objtree)/Makefile and ends up with running in srctree, which is incorrect. It should be invoked with '-f $srctree/Makefile' (or KBUILD_SRC=) to be executed in objtree. Fixes: 80463f1b7bf9 ("kbuild: add --include-dir flag only for out-of-tree build") Reported-by: Zhenzhong Duan Signed-off-by: Masahiro Yamada commit 163c8d54a997153ee1a1e07fcac087492ad85b37 Author: Martin Schwidefsky Date: Mon Nov 5 07:36:28 2018 +0100 compiler: remove __no_sanitize_address_or_inline again The __no_sanitize_address_or_inline and __no_kasan_or_inline defines are almost identical. The only difference is that __no_kasan_or_inline does not have the 'notrace' attribute. To be able to replace __no_sanitize_address_or_inline with the older definition, add 'notrace' to __no_kasan_or_inline and change to two users of __no_sanitize_address_or_inline in the s390 code. The 'notrace' option is necessary for e.g. the __load_psw_mask function in arch/s390/include/asm/processor.h. Without the option it is possible to trace __load_psw_mask which leads to kernel stack overflow. Signed-off-by: Martin Schwidefsky Pointed-out-by: Andrey Ryabinin Acked-by: Steven Rostedt (VMware) Signed-off-by: Linus Torvalds commit 437e88ab8f9e2ad90576ab74c4cf8f527bbf51cd Author: Nathan Chancellor Date: Tue Oct 23 16:11:25 2018 -0700 x86/build: Remove -pipe from KBUILD_CFLAGS Commit 77b0bf55bc67 ("kbuild/Makefile: Prepare for using macros in inline assembly code to work around asm() related GCC inlining bugs") added -Wa,- to KBUILD_CFLAGS, which breaks compiling with Clang (hangs indefinitely at compiling init/main.o). This happens because while Clang accepts -pipe (and has it documented in its list of supported flags), it silently ignores it after this 2010 commit (thanks to Nick Desaulniers for tracking this down), meaning that gas just infinitely waits for stdin and never receives it. https://github.com/llvm-mirror/clang/commit/c19a12dc3d441bec62eed55e312b76c12d6d9022 Initially, I had suggested just add -Wa,- to KBUILD_CFLAGS when GCC was being used but that was before realizing it is because Clang doesn't do anything with -pipe. H. Peter Anvin suggested checking to see if -pipe gives us any gains out of GCC. Turns out it might actually be hurting: With -pipe: real 3m40.813s real 3m44.449s real 3m39.648s Without -pipe: real 3m38.492s real 3m38.335s real 3m38.975s The issue of -Wa,- being passed along to gas without -pipe being supported should still probably be fixed on the LLVM side (open issue: https://bugs.llvm.org/show_bug.cgi?id=39410) but this is not as much of a workaround anymore since it helps both GCC and Clang. Suggested-by: H. Peter Anvin Signed-off-by: Nathan Chancellor Signed-off-by: Thomas Gleixner Tested-by: Nick Desaulniers Reviewed-by: Nadav Amit Reviewed-by: Nick Desaulniers Cc: Borislav Petkov Cc: Kees Cook Cc: Masahiro Yamada Link: https://github.com/ClangBuiltLinux/linux/issues/213 Link: https://lkml.kernel.org/r/20181023231125.27976-1-natechancellor@gmail.com commit b42967dcac1d4f5b059ec25568136462bcb051fe Author: Yi Wang Date: Mon Oct 29 15:17:31 2018 +0800 x86/hyper-v: Fix indentation in hv_do_fast_hypercall16() Remove the surplus TAB in hv_do_fast_hypercall16(). Signed-off-by: Yi Wang Signed-off-by: Thomas Gleixner Cc: kys@microsoft.com Cc: haiyangz@microsoft.com Cc: sthemmin@microsoft.com Cc: bp@alien8.de Cc: hpa@zytor.com Cc: devel@linuxdriverproject.org Cc: zhong.weidong@zte.com.cn Link: https://lkml.kernel.org/r/1540797451-2792-1-git-send-email-wang.yi59@zte.com.cn commit 79ef68c7e1f665578e005b454480b6eca60edabe Author: Arnaldo Carvalho de Melo Date: Mon Nov 5 12:23:40 2018 -0300 perf augmented_syscalls: Start collecting pathnames in the BPF program This is the start of having the raw_syscalls:sys_enter BPF handler collecting pointer arguments, namely pathnames, and with two syscalls that have that pointer in different arguments, "open" as it as its first argument, "openat" as the second. With this in place the existing beautifiers in 'perf trace' works, those args are shown instead of just the pointer that comes with the syscalls tracepoints. This also serves to show and document pitfalls in the process of using just that place in the kernel (raw_syscalls:sys_enter) plus tables provided by userspace to collect syscall pointer arguments. One is the need to use a barrier, as suggested by Edward, to avoid clang optimizations that make the kernel BPF verifier to refuse loading our pointer contents collector. The end result should be a generic eBPF program that works in all architectures, with the differences amongst archs resolved by the userspace component, 'perf trace', that should get all its tables created automatically from the kernel components where they are defined, via string table constructors for things not expressed in BTF/DWARF (enums, structs, etc), and otherwise using those observability files (BTF). 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-37dz54pmotgpnwg9tb6zuk9j@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit ee474b81fe5aa5dc0faae920bf66240fbf55f891 Author: Masami Hiramatsu Date: Thu Nov 1 23:29:28 2018 +0900 tracing/kprobes: Fix strpbrk() argument order Fix strpbrk()'s argument order, it must pass acceptable string in 2nd argument. Note that this can cause a kernel panic where it recovers backup character to code->data. Link: http://lkml.kernel.org/r/154108256792.2604.1816052586385217811.stgit@devbox Fixes: a6682814f371 ("tracing/kprobes: Allow kprobe-events to record module symbol") Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 6ff6bc46c0a4f44e7d0b5ca88c33f2b1eb55d519 Merge: f55275bcc729 1ad9fb750a10 Author: Olof Johansson Date: Mon Nov 5 06:39:40 2018 -0800 Merge tag 'imx-fixes-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into fixes i.MX fixes for 4.20: - Add boot-on and always-on for imx6sx-sdb phy regulator to fix enet resume problem, which is exposed by commit ("regulator: fixed: Convert to use GPIO descriptor only"). - Fix improperly quoted stdout-path values for imx53-ppd and vf610m4-colibri board. - Fix the typo of compatible string "fs,imx6sll-i2c" which should be "fsl,imx6sll-i2c". * tag 'imx-fixes-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: ARM: dts: imx6sx-sdb: Fix enet phy regulator ARM: dts: fsl: Fix improperly quoted stdout-path values ARM: dts: imx6sll: fix typo for fsl,imx6sll-i2c node Signed-off-by: Olof Johansson commit f55275bcc72948056387041abe9fce1c54300adc Author: Olof Johansson Date: Mon Nov 5 06:34:09 2018 -0800 ARM: defconfig: Disable PREEMPT again on multi_v7 I should have let this soak for a while in linux-next, since we have at least one board that hit a regression from it. Revert from 4.20-rc, and we'll queue it for next merge window once regression is fixed. This reverts commit 513eb98595522bc0cb83831a9daee1d5738e66f1. Signed-off-by: Olof Johansson commit 02522ad77fb7619615720147dc5da18024cad577 Author: Heiko Carstens Date: Fri Nov 2 13:09:08 2018 +0100 s390: update defconfigs Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky commit eab53fdfd60a84b0cc514d4f1f5d79226c76df01 Author: Sergei Shtylyov Date: Thu Oct 18 19:48:53 2018 +0300 arm64: dts: renesas: condor: switch from EtherAVB to GEther The "official" Condor boards have always been wired to mount NFS via GEther, not EtherAVB -- the boards resoldered for EtherAVB were local to Cogent Embedded, so we've been having an unpleasant situation where a "normal" Condor board still can't mount NFS (unless an EtherAVB PHY extension board is plugged in). Switch from EtherAVB to GEther at last! Fixes: 8091788f3d38 ("arm64: dts: renesas: condor: add EtherAVB support") Signed-off-by: Sergei Shtylyov Signed-off-by: Simon Horman commit 058ad7b6aa5204d3af878415c7b946748ab34f7a Author: Fabrizio Castro Date: Thu Oct 4 09:53:10 2018 +0100 dt-bindings: arm: Fix RZ/G2E part number Fix RZ/G2E part number from its description. Signed-off-by: Fabrizio Castro Reviewed-by: Biju Das Reviewed-by: Rob Herring Signed-off-by: Simon Horman commit aab7a2414ba0d5c3d0571a90031b535adba7146a Author: Kuninori Morimoto Date: Fri Sep 28 02:38:36 2018 +0000 arm64: dts: renesas: r8a7795: add missing dma-names on hscif2 hscif2 has 4 dmas, but has only 2 dma-names. This patch add missing dma-names. Signed-off-by: Kuninori Morimoto Reviewed-by: Geert Uytterhoeven Fixes: e0f0bda79337701a ("arm64: dts: renesas: r8a7795: sort subnodes of the soc node") Signed-off-by: Simon Horman commit fc09ab7a767394f9ecdad84ea6e85d68b83c8e21 Author: Takashi Iwai Date: Mon Nov 5 11:52:50 2018 +0100 vga_switcheroo: Fix missing gpu_bound call at audio client registration The commit 37a3a98ef601 ("ALSA: hda - Enable runtime PM only for discrete GPU") added a new ops gpu_bound to be called when GPU gets bound. The patch overlooked, however, that vga_switcheroo_enable() is called only once at GPU is bound. When an audio client is registered after that point, it would miss the gpu_bound call. This leads to the unexpected lack of runtime PM in HD-audio side. For addressing that regression, just call gpu_bound callback manually at vga_switcheroo_register_audio_client() when the GPU was already bound. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=201615 Fixes: 37a3a98ef601 ("ALSA: hda - Enable runtime PM only for discrete GPU") Cc: Reviewed-by: Lukas Wunner Signed-off-by: Takashi Iwai commit 112b57fa737445b2361be332ce8cc0fd3e2b994e Author: Rohit kumar Date: Thu Nov 1 17:21:07 2018 +0530 ASoC: qdsp6: q6afe: Fix wrong MI2S SD line mask SD line mask for MI2S starts from BIT 0 instead of BIT 1. Fix all bit mask for MI2S SD lines. Signed-off-by: Rohit kumar Signed-off-by: Mark Brown commit a182ecd3809c8d5a2da80c520f3602e301c5317e Author: Hans de Goede Date: Wed Oct 31 15:22:25 2018 +0100 ASoC: intel: cht_bsw_max98090_ti: Add quirk for boards using pmc_plt_clk_0 Some boards such as the Swanky model Chromebooks use pmc_plt_clk_0 for the mclk instead of pmc_plt_clk_3. 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 Swanky 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") Reported-and-tested-by: Dean Wallace Signed-off-by: Hans de Goede Signed-off-by: Mark Brown commit 2f5d94123ce3c12a1e15802e6d5ee98f304ccb71 Author: Vasily Khoruzhick Date: Fri Nov 2 21:26:51 2018 -0700 ASoC: sunxi: rename SND_SUNXI_ADDA_PR_REGMAP to SND_SUN8I_ADDA_PR_REGMAP SND_SUN50I_CODEC_ANALOG selects SND_SUNXI_ADDA_PR_REGMAP which is leftover of renaming SND_SUNXI_ADDA_PR_REGMAP to SND_SUN8I_ADDA_PR_REGMAP. Replace it with SND_SUN8I_ADDA_PR_REGMAP to fix possible link errors for some configurations: sound/soc/sunxi/sun50i-codec-analog.o: In function `sun50i_codec_analog_probe': sun50i-codec-analog.c:(.text+0x62): undefined reference to `sun8i_adda_pr_regmap_init' Fixes: 42371f327df0 ("ASoC: sunxi: Add new driver for Allwinner A64 codec's analog path controls") Signed-off-by: Vasily Khoruzhick Reviewed-by: Andre Przywara Signed-off-by: Mark Brown commit 4920b1f7676d55dcebdf55f2b0431a328acb4abe Author: Punit Agrawal Date: Fri Nov 2 16:57:52 2018 +0000 mailmap: Update email for Punit Agrawal As I'll no longer be working with Arm, add a mailmap entry so any mail directed towards me reaches the appropriate mailbox. Acked-by: Will Deacon Signed-off-by: Punit Agrawal Signed-off-by: Catalin Marinas commit a1705f02704cd8a24d434bfd0141ee8142ad277a Author: Jerome Brunet Date: Mon Oct 29 16:13:40 2018 +0100 pinctrl: meson: fix meson8b ao pull register bits AO pull register definition is inverted between pull (up/down) and pull enable. Fixing this allows to properly apply bias setting through pinconf Fixes: 0fefcb6876d0 ("pinctrl: Add support for Meson8b") Signed-off-by: Jerome Brunet Signed-off-by: Linus Walleij commit e91b162d2868672d06010f34aa83d408db13d3c6 Author: Jerome Brunet Date: Mon Oct 29 16:13:39 2018 +0100 pinctrl: meson: fix meson8 ao pull register bits AO pull register definition is inverted between pull (up/down) and pull enable. Fixing this allows to properly apply bias setting through pinconf Fixes: 6ac730951104 ("pinctrl: add driver for Amlogic Meson SoCs") Signed-off-by: Jerome Brunet Signed-off-by: Linus Walleij commit ed3a2b74f3eb34c84c8377353f4730f05acdfd05 Author: Jerome Brunet Date: Mon Oct 29 16:13:38 2018 +0100 pinctrl: meson: fix gxl ao pull register bits AO pull register definition is inverted between pull (up/down) and pull enable. Fixing this allows to properly apply bias setting through pinconf Fixes: 0f15f500ff2c ("pinctrl: meson: Add GXL pinctrl definitions") Signed-off-by: Jerome Brunet Signed-off-by: Linus Walleij commit 4bc51e1e350cd4707ce6e551a93eae26d40b9889 Author: Jerome Brunet Date: Mon Oct 29 16:13:37 2018 +0100 pinctrl: meson: fix gxbb ao pull register bits AO pull register definition is inverted between pull (up/down) and pull enable. Fixing this allows to properly apply bias setting through pinconf Fixes: 468c234f9ed7 ("pinctrl: amlogic: Add support for Amlogic Meson GXBB SoC") Signed-off-by: Jerome Brunet Signed-off-by: Linus Walleij commit e39f9dd8206ad66992ac0e6218ef1ba746f2cce9 Author: Jerome Brunet Date: Tue Oct 23 18:03:19 2018 +0200 pinctrl: meson: fix pinconf bias disable If a bias is enabled on a pin of an Amlogic SoC, calling .pin_config_set() with PIN_CONFIG_BIAS_DISABLE will not disable the bias. Instead it will force a pull-down bias on the pin. Instead of the pull type register bank, the driver should access the pull enable register bank. Fixes: 6ac730951104 ("pinctrl: add driver for Amlogic Meson SoCs") Signed-off-by: Jerome Brunet Acked-by: Neil Armstrong Signed-off-by: Linus Walleij commit d098093ba06eb032057d1aca1c2e45889e099d00 Author: Boris Brezillon Date: Sun Oct 28 12:29:55 2018 +0100 mtd: nand: Fix nanddev_neraseblocks() nanddev_neraseblocks() currently returns the number pages per LUN instead of the total number of eraseblocks. Fixes: 9c3736a3de21 ("mtd: nand: Add core infrastructure to deal with NAND devices") Cc: Signed-off-by: Boris Brezillon Reviewed-by: Miquel Raynal commit ce97e2bb6687d3af675ecf2e836a9122def53578 Author: Randy Dunlap Date: Sun Nov 4 18:38:35 2018 -0800 mtd: nand: drop kernel-doc notation for a deleted function parameter Remove kernel-doc notation for a deleted function parameter to prevent a kernel-doc warning: ../drivers/mtd/nand/raw/nand_base.c:603: warning: Excess function parameter 'mtd' description in 'panic_nand_wait' Fixes: f1d46942e823 ("mtd: rawnand: Pass a nand_chip object to chip->waitfunc()") Signed-off-by: Randy Dunlap Cc: Boris Brezillon Cc: Miquel Raynal Cc: Richard Weinberger Reviewed-by: Miquel Raynal Signed-off-by: Boris Brezillon commit be2e1c9dcf76886a83fb1c433a316e26d4ca2550 Author: Arnd Bergmann Date: Thu Oct 11 13:06:16 2018 +0200 mtd: docg3: don't set conflicting BCH_CONST_PARAMS option I noticed during the creation of another bugfix that the BCH_CONST_PARAMS option that is set by DOCG3 breaks setting variable parameters for any other users of the BCH library code. The only other user we have today is the MTD_NAND software BCH implementation (most flash controllers use hardware BCH these days and are not affected). I considered removing BCH_CONST_PARAMS entirely because of the inherent conflict, but according to the description in lib/bch.c there is a significant performance benefit in keeping it. To avoid the immediate problem of the conflict between MTD_NAND_BCH and DOCG3, this only sets the constant parameters if MTD_NAND_BCH is disabled, which should fix the problem for all cases that are affected. This should also work for all stable kernels. Note that there is only one machine that actually seems to use the DOCG3 driver (arch/arm/mach-pxa/mioa701.c), so most users should have the driver disabled, but it almost certainly shows up if we wanted to test random kernels on machines that use software BCH in MTD. Fixes: d13d19ece39f ("mtd: docg3: add ECC correction code") Cc: stable@vger.kernel.org Cc: Robert Jarzmik Signed-off-by: Arnd Bergmann Signed-off-by: Boris Brezillon commit defeea5ee23d9cdd296801a0a9ea885c037ff9c9 Author: Bartosz Golaszewski Date: Wed Oct 24 17:38:43 2018 +0200 MAINTAINERS: add myself as co-maintainer of gpiolib As discussed with Linus Walleij - I'm adding myself as the co-maintainer. Cc: Benoît Cousson Cc: Kevin Hilman Cc: Michael Turquette Signed-off-by: Bartosz Golaszewski Acked-by: Michael Turquette Signed-off-by: Linus Walleij commit 989534cfcac89f927fa46b1e0861d92ffbd2c7e4 Author: Andrzej Hajda Date: Fri Oct 26 12:13:28 2018 +0200 drm/exynos/fbdev: do not skip fbdev init if there are no connectors Since connectors can be created dynamically, fbdev should be initialized even if there are no connectors at the moment. Otherwise fbdev will not be created even after connector's appearance. The patch fixes lack of fbdev on rinato and trats boards. Fixes: 6afb7721e2a0 ("drm/exynos: move connector creation to attach callback") Reported-by: Marek Szyprowski Signed-off-by: Andrzej Hajda Tested-by: Marek Szyprowski Signed-off-by: Inki Dae commit deee3284cba3145a4ee03cbe8541d7a3bfc499e2 Author: Andrzej Hajda Date: Fri Oct 26 12:40:03 2018 +0200 drm/exynos/dsi: register connector if it is created after drm bind DSI device can be attached after DRM device is registered. In such case newly created connector must be registered by exynos_dsi. The patch fixes exynos_drm on rinato and trats boards. Fixes: 6afb7721e2a0 ("drm/exynos: move connector creation to attach callback") Reported-by: Marek Szyprowski Signed-off-by: Andrzej Hajda Tested-by: Marek Szyprowski Signed-off-by: Inki Dae commit 6ca469e22a30992b4478d2ab88737c70667c1e00 Author: Inki Dae Date: Fri Oct 5 11:50:20 2018 +0900 Revert "drm/exynos/decon5433: implement frame counter" This reverts commit 0586feba322e1de05075700eb4b835c8b683e62b This patch makes it to need get_vblank_counter callback in crtc to get frame counter from decon driver. However, drm_dev->max_vblank_count is a member unique to vendor's DRM driver but in case of ARM DRM, some CRTC devices don't provide the frame counter value. As a result, this patch made extension and clone mode not working. Instead of this patch, we may need separated max_vblank_count which belongs to each CRTC device, or need to implement frame counter emulation for them who don't support HW frame counter. Signed-off-by: Inki Dae commit 8727b230f665cadb9349a915c60e6abb18fb083c Author: Dan Carpenter Date: Sat Oct 13 13:21:40 2018 +0300 drm/exynos: checking for NULL instead of IS_ERR() The of_drm_find_panel() function returns error pointers and never NULL but we the driver assumes that ->panel is NULL when it's not present. Fixes: 6afb7721e2a0 ("drm/exynos: move connector creation to attach callback") Signed-off-by: Dan Carpenter Signed-off-by: Inki Dae commit 13682e524167cbd7e2a26c5e91bec765f0f96273 Author: Daniel Lezcano Date: Wed Oct 17 11:18:30 2018 +0200 arm64: dts: rockchip: remove vdd_log from rock960 to fix a stability issues When the performance governor is set as default, the rock960 hangs around one minute after booting, whatever the activity is (idle, key pressed, loaded, ...). Based on the commit log found at https://patchwork.kernel.org/patch/10092377/ "vdd_log has no consumer and therefore will not be set to a specific voltage. Still the PWM output pin gets configured and thence the vdd_log output voltage will changed from it's default. Depending on the idle state of the PWM this will slightly over or undervoltage the logic supply of the RK3399 and cause instability with GbE (undervoltage) and PCIe (overvoltage). Since the default value set by a voltage divider is the correct supply voltage and we don't need to change it during runtime we remove the rail from the devicetree completely so the PWM pin will not be configured." After removing the vdd-log from the rock960's specific DT, the board does no longer hang and shows a stable behavior. Apply the same change for the rock960 by removing the vdd-log from the DT. Fixes: 874846f1fccd ("arm64: dts: rockchip: add 96boards RK3399 Ficus board") Cc: stable@vger.kernel.org Tested-by: Manivannan Sadhasivam Signed-off-by: Daniel Lezcano Signed-off-by: Heiko Stuebner commit b068621a53f92f42400581d69ad0e84c56620b0a Author: Randy Dunlap Date: Sun Nov 4 14:03:56 2018 -0800 Documentation/x86: Fix typo in zero-page.txt Signed-off-by: Randy Dunlap Cc: Jonathan Corbet Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-doc@vger.kernel.org Link: http://lkml.kernel.org/r/f259b21b-1f2b-f215-00d2-23388bed2530@infradead.org Signed-off-by: Ingo Molnar commit f75d651587f719a813ebbbfeee570e6570731d55 Author: Randy Dunlap Date: Sun Nov 4 18:40:14 2018 -0800 resource/docs: Fix new kernel-doc warnings The first group of warnings is caused by a "/**" kernel-doc notation marker but the function comments are not in kernel-doc format. Also add another error return value here. ../kernel/resource.c:337: warning: Function parameter or member 'start' not described in 'find_next_iomem_res' ../kernel/resource.c:337: warning: Function parameter or member 'end' not described in 'find_next_iomem_res' ../kernel/resource.c:337: warning: Function parameter or member 'flags' not described in 'find_next_iomem_res' ../kernel/resource.c:337: warning: Function parameter or member 'desc' not described in 'find_next_iomem_res' ../kernel/resource.c:337: warning: Function parameter or member 'first_lvl' not described in 'find_next_iomem_res' ../kernel/resource.c:337: warning: Function parameter or member 'res' not described in 'find_next_iomem_res' Add the missing function parameter documentation for the other warnings: ../kernel/resource.c:409: warning: Function parameter or member 'arg' not described in 'walk_iomem_res_desc' ../kernel/resource.c:409: warning: Function parameter or member 'func' not described in 'walk_iomem_res_desc' Signed-off-by: Randy Dunlap Cc: Andrew Morton Cc: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: b69c2e20f6e4 ("resource: Clean it up a bit") Link: http://lkml.kernel.org/r/dda2e4d8-bedd-3167-20fe-8c7d2d35b354@infradead.org Signed-off-by: Ingo Molnar commit e1ff516a56ad56c476b47795d3811eef79d25fbe Author: Yi Wang Date: Mon Nov 5 08:50:13 2018 +0800 sched/fair: Fix a comment in task_numa_fault() Duplicated 'case it'. Signed-off-by: Yi Wang Reviewed-by: Xi Xu Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: zhong.weidong@zte.com.cn Link: http://lkml.kernel.org/r/1541379013-11352-1-git-send-email-wang.yi59@zte.com.cn Signed-off-by: Ingo Molnar commit 3182215dd0b2120fb942ed88430cfb7c12d583e0 Author: Alistair Popple Date: Tue Oct 30 22:02:03 2018 +1100 powerpc/powernv/npu: Remove NPU DMA ops The NPU IOMMU is setup to mirror the parent PCIe device IOMMU setup. Therefore it does not make sense to call dma operations such as dma_map_page(), etc. directly on these devices. The existing dma_ops simply print a warning if they are ever called, however this is unnecessary and the warnings are likely to go unnoticed. It is instead simpler to remove these operations and let the generic DMA code print warnings (eg. via a NULL pointer deref) in cases of buggy drivers attempting dma operations on NVLink devices. Signed-off-by: Alistair Popple Signed-off-by: Michael Ellerman commit 1ad9fb750a104f51851c092edd7b3553f0218428 Author: Leonard Crestez Date: Mon Oct 8 15:28:01 2018 +0000 ARM: dts: imx6sx-sdb: Fix enet phy regulator Bindings for "fixed-regulator" only explicitly support "gpio" property, not "gpios". Fix by correcting the property name. The enet PHYs on imx6sx-sdb needs to be explicitly reset after a power cycle, this can be handled by the phy-reset-gpios property. Sadly this is not handled on suspend: the fec driver turns phy-supply off but doesn't assert phy-reset-gpios again on resume. Since additional phy-level work is required to support powering off the phy in suspend fix the problem by just marking the regulator as "boot-on" "always-on" so that it's never turned off. This behavior is equivalent to older releases. Keep the phy-reset-gpios property on fec anyway because it is a correct description of board design. This issue was exposed by commit efdfeb079cc3 ("regulator: fixed: Convert to use GPIO descriptor only") which causes the "gpios" property to also be parsed. Before that commit the "gpios" property had no effect, PHY reset was only handled in the the bootloader. This fixes linux-next boot failures previously reported here: https://lore.kernel.org/patchwork/patch/982437/#1177900 https://lore.kernel.org/patchwork/patch/994091/#1178304 Signed-off-by: Leonard Crestez Signed-off-by: Shawn Guo commit 1af6ab3bac8458fc2e92ad7bb97b62de4a1fddef Author: Rob Herring Date: Tue Oct 30 20:02:30 2018 -0500 ARM: dts: fsl: Fix improperly quoted stdout-path values A quoted label reference doesn't expand to the node path and is taken as a literal string. Dropping the quotes can fix this unless the baudrate string is appended in which case we have to use the alias. At least on VF610, the problem was masked by setting the console in bootargs. Use the alias syntax with baudrate parameter so we can drop setting the console in bootargs. Cc: Shawn Guo Cc: Sascha Hauer Cc: Pengutronix Kernel Team Cc: NXP Linux Team Cc: Mark Rutland Reviewed-by: Fabio Estevam Reviewed-by: Stefan Agner Signed-off-by: Rob Herring Signed-off-by: Shawn Guo commit 438ad09af5581b7024850b5dbb6353c7f2f7d8a9 Author: Oleksij Rempel Date: Thu Oct 18 13:26:13 2018 +0200 ARM: dts: imx6sll: fix typo for fsl,imx6sll-i2c node Fix the type of compatible string "fs,imx6sll-i2c" which should be "fsl,imx6sll-i2c". Signed-off-by: Oleksij Rempel Acked-by: Uwe Kleine-König Signed-off-by: Shawn Guo commit ea53abfab960909d622ca37bcfb8e1c5378d21cc Author: Jarod Wilson Date: Sun Nov 4 14:59:46 2018 -0500 bonding/802.3ad: fix link_failure_count tracking Commit 4d2c0cda07448ea6980f00102dc3964eb25e241c set slave->link to BOND_LINK_DOWN for 802.3ad bonds whenever invalid speed/duplex values were read, to fix a problem with slaves getting into weird states, but in the process, broke tracking of link failures, as going straight to BOND_LINK_DOWN when a link is indeed down (cable pulled, switch rebooted) means we broke out of bond_miimon_inspect()'s BOND_LINK_DOWN case because !link_state was already true, we never incremented commit, and never got a chance to call bond_miimon_commit(), where slave->link_failure_count would be incremented. I believe the simple fix here is to mark the slave as BOND_LINK_FAIL, and let bond_miimon_inspect() transition the link from _FAIL to either _UP or _DOWN, and in the latter case, we now get proper incrementing of link_failure_count again. Fixes: 4d2c0cda0744 ("bonding: speed/duplex update at NETDEV_UP event") CC: Mahesh Bandewar CC: David S. Miller CC: netdev@vger.kernel.org CC: stable@vger.kernel.org Signed-off-by: Jarod Wilson Signed-off-by: David S. Miller commit 0432e833191ad4d17b7fc2364941f91dad51db1a Author: Holger Hoffstätte Date: Sun Nov 4 19:02:42 2018 +0100 net: phy: realtek: fix RTL8201F sysfs name Since 4.19 the following error in sysfs has appeared when using the r8169 NIC driver: $cd /sys/module/realtek/drivers $ls -l ls: cannot access 'mdio_bus:RTL8201F 10/100Mbps Ethernet': No such file or directory [..garbled dir entries follow..] Apparently the forward slash in "10/100Mbps Ethernet" is interpreted as directory separator that leads nowhere, and was introduced in commit 513588dd44b ("net: phy: realtek: add RTL8201F phy-id and functions"). Fix this by removing the offending slash in the driver name. Other drivers in net/phy seem to have the same problem, but I cannot test/verify them. Fixes: 513588dd44b ("net: phy: realtek: add RTL8201F phy-id and functions") Signed-off-by: Holger Hoffstätte Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit e3e61f01d755188cb6c2dcf5a244b9c0937c258e Author: Geert Uytterhoeven Date: Sun Oct 28 18:16:51 2018 +0100 hwmon: (ibmpowernv) Remove bogus __init annotations If gcc decides not to inline make_sensor_label(): WARNING: vmlinux.o(.text+0x4df549c): Section mismatch in reference from the function .create_device_attrs() to the function .init.text:.make_sensor_label() The function .create_device_attrs() references the function __init .make_sensor_label(). This is often because .create_device_attrs lacks a __init annotation or the annotation of .make_sensor_label is wrong. As .probe() can be called after freeing of __init memory, all __init annotiations in the driver are bogus, and should be removed. Signed-off-by: Geert Uytterhoeven Signed-off-by: Guenter Roeck commit 74e3512731bd5c9673176425a76a7cc5efa8ddb6 Author: Dmitry Osipenko Date: Wed Oct 24 22:37:13 2018 +0300 hwmon: (core) Fix double-free in __hwmon_device_register() Fix double-free that happens when thermal zone setup fails, see KASAN log below. ================================================================== BUG: KASAN: double-free or invalid-free in __hwmon_device_register+0x5dc/0xa7c CPU: 0 PID: 132 Comm: kworker/0:2 Tainted: G B 4.19.0-rc8-next-20181016-00042-gb52cd80401e9-dirty #41 Hardware name: NVIDIA Tegra SoC (Flattened Device Tree) Workqueue: events deferred_probe_work_func Backtrace: [] (dump_backtrace) from [] (show_stack+0x20/0x24) [] (show_stack) from [] (dump_stack+0x9c/0xb0) [] (dump_stack) from [] (print_address_description+0x68/0x250) [] (print_address_description) from [] (kasan_report_invalid_free+0x68/0x88) [] (kasan_report_invalid_free) from [] (__kasan_slab_free+0x1f4/0x200) [] (__kasan_slab_free) from [] (kasan_slab_free+0x14/0x18) [] (kasan_slab_free) from [] (kfree+0x90/0x294) [] (kfree) from [] (__hwmon_device_register+0x5dc/0xa7c) [] (__hwmon_device_register) from [] (hwmon_device_register_with_info+0xa0/0xa8) [] (hwmon_device_register_with_info) from [] (devm_hwmon_device_register_with_info+0x74/0xb4) [] (devm_hwmon_device_register_with_info) from [] (lm90_probe+0x414/0x578) [] (lm90_probe) from [] (i2c_device_probe+0x35c/0x384) [] (i2c_device_probe) from [] (really_probe+0x290/0x3e4) [] (really_probe) from [] (driver_probe_device+0x80/0x1c4) [] (driver_probe_device) from [] (__device_attach_driver+0x104/0x11c) [] (__device_attach_driver) from [] (bus_for_each_drv+0xa4/0xc8) [] (bus_for_each_drv) from [] (__device_attach+0xf0/0x15c) [] (__device_attach) from [] (device_initial_probe+0x1c/0x20) [] (device_initial_probe) from [] (bus_probe_device+0xdc/0xec) [] (bus_probe_device) from [] (deferred_probe_work_func+0xa8/0xd4) [] (deferred_probe_work_func) from [] (process_one_work+0x3dc/0x96c) [] (process_one_work) from [] (worker_thread+0x4ec/0x8bc) [] (worker_thread) from [] (kthread+0x230/0x240) [] (kthread) from [] (ret_from_fork+0x14/0x38) Exception stack(0xcf743fb0 to 0xcf743ff8) 3fa0: 00000000 00000000 00000000 00000000 3fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 3fe0: 00000000 00000000 00000000 00000000 00000013 00000000 Allocated by task 132: kasan_kmalloc.part.1+0x58/0xf4 kasan_kmalloc+0x90/0xa4 kmem_cache_alloc_trace+0x90/0x2a0 __hwmon_device_register+0xbc/0xa7c hwmon_device_register_with_info+0xa0/0xa8 devm_hwmon_device_register_with_info+0x74/0xb4 lm90_probe+0x414/0x578 i2c_device_probe+0x35c/0x384 really_probe+0x290/0x3e4 driver_probe_device+0x80/0x1c4 __device_attach_driver+0x104/0x11c bus_for_each_drv+0xa4/0xc8 __device_attach+0xf0/0x15c device_initial_probe+0x1c/0x20 bus_probe_device+0xdc/0xec deferred_probe_work_func+0xa8/0xd4 process_one_work+0x3dc/0x96c worker_thread+0x4ec/0x8bc kthread+0x230/0x240 ret_from_fork+0x14/0x38 (null) Freed by task 132: __kasan_slab_free+0x12c/0x200 kasan_slab_free+0x14/0x18 kfree+0x90/0x294 hwmon_dev_release+0x1c/0x20 device_release+0x4c/0xe8 kobject_put+0xac/0x11c device_unregister+0x2c/0x30 __hwmon_device_register+0xa58/0xa7c hwmon_device_register_with_info+0xa0/0xa8 devm_hwmon_device_register_with_info+0x74/0xb4 lm90_probe+0x414/0x578 i2c_device_probe+0x35c/0x384 really_probe+0x290/0x3e4 driver_probe_device+0x80/0x1c4 __device_attach_driver+0x104/0x11c bus_for_each_drv+0xa4/0xc8 __device_attach+0xf0/0x15c device_initial_probe+0x1c/0x20 bus_probe_device+0xdc/0xec deferred_probe_work_func+0xa8/0xd4 process_one_work+0x3dc/0x96c worker_thread+0x4ec/0x8bc kthread+0x230/0x240 ret_from_fork+0x14/0x38 (null) Cc: # v4.15+ Fixes: 47c332deb8e8 ("hwmon: Deal with errors from the thermal subsystem") Signed-off-by: Dmitry Osipenko Signed-off-by: Guenter Roeck commit 651022382c7f8da46cb4872a545ee1da6d097d2a Author: Linus Torvalds Date: Sun Nov 4 15:37:52 2018 -0800 Linux 4.20-rc1 commit 42bd06e93d108a3ee5b8b4eaa350ec81853cb217 Merge: 4710e78940d8 84db119f5a83 Author: Linus Torvalds Date: Sun Nov 4 14:46:04 2018 -0800 Merge tag 'tags/upstream-4.20-rc1' of git://git.infradead.org/linux-ubifs Pull UBIFS updates from Richard Weinberger: - Full filesystem authentication feature, UBIFS is now able to have the whole filesystem structure authenticated plus user data encrypted and authenticated. - Minor cleanups * tag 'tags/upstream-4.20-rc1' of git://git.infradead.org/linux-ubifs: (26 commits) ubifs: Remove unneeded semicolon Documentation: ubifs: Add authentication whitepaper ubifs: Enable authentication support ubifs: Do not update inode size in-place in authenticated mode ubifs: Add hashes and HMACs to default filesystem ubifs: authentication: Authenticate super block node ubifs: Create hash for default LPT ubfis: authentication: Authenticate master node ubifs: authentication: Authenticate LPT ubifs: Authenticate replayed journal ubifs: Add auth nodes to garbage collector journal head ubifs: Add authentication nodes to journal ubifs: authentication: Add hashes to index nodes ubifs: Add hashes to the tree node cache ubifs: Create functions to embed a HMAC in a node ubifs: Add helper functions for authentication support ubifs: Add separate functions to init/crc a node ubifs: Format changes for authentication support ubifs: Store read superblock node ubifs: Drop write_node ... commit 4710e78940d8d957f24b8f085f961f1279f8fbff Merge: 35e745244268 d3787af289c8 Author: Linus Torvalds Date: Sun Nov 4 08:20:09 2018 -0800 Merge tag 'nfs-for-4.20-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs Pull NFS client bugfixes from Trond Myklebust: "Highlights include: Bugfix: - Fix build issues on architectures that don't provide 64-bit cmpxchg Cleanups: - Fix a spelling mistake" * tag 'nfs-for-4.20-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: NFS: fix spelling mistake, EACCESS -> EACCES SUNRPC: Use atomic(64)_t for seq_send(64) commit 35e7452442687d7bd70f042ddfa92f89311b039c Merge: 04578e8441c5 bff9a1076adf Author: Linus Torvalds Date: Sun Nov 4 08:15:15 2018 -0800 Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull more timer updates from Thomas Gleixner: "A set of commits for the new C-SKY architecture timers" * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: dt-bindings: timer: gx6605s SOC timer clocksource/drivers/c-sky: Add gx6605s SOC system timer dt-bindings: timer: C-SKY Multi-processor timer clocksource/drivers/c-sky: Add C-SKY SMP timer commit 04578e8441c5420259a71eff9fede535858bfc6a Merge: 71e56028173b a662315d8ad9 Author: Linus Torvalds Date: Sun Nov 4 08:12:44 2018 -0800 Merge tag 'ntb-4.20' of git://github.com/jonmason/ntb Pull NTB updates from Jon Mason: "Fairly minor changes and bug fixes: NTB IDT thermal changes and hook into hwmon, ntb_netdev clean-up of private struct, and a few bug fixes" * tag 'ntb-4.20' of git://github.com/jonmason/ntb: ntb: idt: Alter the driver info comments ntb: idt: Discard temperature sensor IRQ handler ntb: idt: Add basic hwmon sysfs interface ntb: idt: Alter temperature read method ntb_netdev: Simplify remove with client device drvdata NTB: transport: Try harder to alloc an aligned MW buffer ntb: ntb_transport: Mark expected switch fall-throughs ntb: idt: Set PCIe bus address to BARLIMITx NTB: ntb_hw_idt: replace IS_ERR_OR_NULL with regular NULL checks ntb: intel: fix return value for ndev_vec_mask() ntb_netdev: fix sleep time mismatch commit 1de72c706488b7be664a601cf3843bd01e327e58 Author: Michael Kelley Date: Sun Nov 4 03:48:57 2018 +0000 x86/hyper-v: Enable PIT shutdown quirk Hyper-V emulation of the PIT has a quirk such that the normal PIT shutdown path doesn't work, because clearing the counter register restarts the timer. Disable the counter clearing on PIT shutdown. Signed-off-by: Michael Kelley Signed-off-by: Thomas Gleixner Cc: "gregkh@linuxfoundation.org" Cc: "devel@linuxdriverproject.org" Cc: "daniel.lezcano@linaro.org" Cc: "virtualization@lists.linux-foundation.org" Cc: "jgross@suse.com" Cc: "akataria@vmware.com" Cc: "olaf@aepfle.de" Cc: "apw@canonical.com" Cc: vkuznets Cc: "jasowang@redhat.com" Cc: "marcelo.cerri@canonical.com" Cc: KY Srinivasan Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/1541303219-11142-3-git-send-email-mikelley@microsoft.com commit 35b69a420bfb56b7b74cb635ea903db05e357bec Author: Michael Kelley Date: Sun Nov 4 03:48:54 2018 +0000 clockevents/drivers/i8253: Add support for PIT shutdown quirk Add support for platforms where pit_shutdown() doesn't work because of a quirk in the PIT emulation. On these platforms setting the counter register to zero causes the PIT to start running again, negating the shutdown. Provide a global variable that controls whether the counter register is zero'ed, which platform specific code can override. Signed-off-by: Michael Kelley Signed-off-by: Thomas Gleixner Cc: "gregkh@linuxfoundation.org" Cc: "devel@linuxdriverproject.org" Cc: "daniel.lezcano@linaro.org" Cc: "virtualization@lists.linux-foundation.org" Cc: "jgross@suse.com" Cc: "akataria@vmware.com" Cc: "olaf@aepfle.de" Cc: "apw@canonical.com" Cc: vkuznets Cc: "jasowang@redhat.com" Cc: "marcelo.cerri@canonical.com" Cc: KY Srinivasan Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/1541303219-11142-2-git-send-email-mikelley@microsoft.com commit 12480e3b16982c4026de10dd8155823219cd6391 Author: Xin Long Date: Sat Nov 3 14:01:31 2018 +0800 sctp: define SCTP_SS_DEFAULT for Stream schedulers According to rfc8260#section-4.3.2, SCTP_SS_DEFAULT is required to defined as SCTP_SS_FCFS or SCTP_SS_RR. SCTP_SS_FCFS is used for SCTP_SS_DEFAULT's value in this patch. Fixes: 5bbbbe32a431 ("sctp: introduce stream scheduler foundations") Reported-by: Jianwen Ji Signed-off-by: Xin Long Signed-off-by: David S. Miller commit fd82d61ba142f0b83463e47064bf5460aac57b6e Author: Xin Long Date: Sat Nov 3 13:59:45 2018 +0800 sctp: fix strchange_flags name for Stream Change Event As defined in rfc6525#section-6.1.3, SCTP_STREAM_CHANGE_DENIED and SCTP_STREAM_CHANGE_FAILED should be used instead of SCTP_ASSOC_CHANGE_DENIED and SCTP_ASSOC_CHANGE_FAILED. To keep the compatibility, fix it by adding two macros. Fixes: b444153fb5a6 ("sctp: add support for generating add stream change event notification") Reported-by: Jianwen Ji Signed-off-by: Xin Long Signed-off-by: David S. Miller commit 1e2d3c4929b68ce9491ec317846634306a9eeaa4 Merge: 96801552f846 28c2fae726bf Author: David S. Miller Date: Sat Nov 3 19:33:35 2018 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Daniel Borkmann says: ==================== pull-request: bpf 2018-11-03 The following pull-request contains BPF updates for your *net* tree. The main changes are: 1) Fix BPF prog kallsyms and bpf_prog_get_info_by_fd() jited address export to not use page start but actual start instead to work correctly with profiling e.g. finding hot instructions from stack traces. Also fix latter with regards to dumping address and jited len for !multi prog, from Song. 2) Fix bpf_prog_get_info_by_fd() for !root to zero info.nr_jited_func_lens instead of leaving the user provided length, from Daniel. ==================== Signed-off-by: David S. Miller commit 96801552f846460fe9ac10f1b189602992f004e1 Author: Shalom Toledo Date: Fri Nov 2 19:49:15 2018 +0000 mlxsw: spectrum: Fix IP2ME CPU policer configuration The CPU policer used to police packets being trapped via a local route (IP2ME) was incorrectly configured to police based on bytes per second instead of packets per second. Change the policer to police based on packets per second and avoid packet loss under certain circumstances. Fixes: 9148e7cf73ce ("mlxsw: spectrum: Add policers for trap groups") Signed-off-by: Shalom Toledo Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit a277d516de5f498c91d91189717ef7e01102ad27 Author: Arnd Bergmann Date: Fri Nov 2 16:36:55 2018 +0100 openvswitch: fix linking without CONFIG_NF_CONNTRACK_LABELS When CONFIG_CC_OPTIMIZE_FOR_DEBUGGING is enabled, the compiler fails to optimize out a dead code path, which leads to a link failure: net/openvswitch/conntrack.o: In function `ovs_ct_set_labels': conntrack.c:(.text+0x2e60): undefined reference to `nf_connlabels_replace' In this configuration, we can take a shortcut, and completely remove the contrack label code. This may also help the regular optimization. Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller commit 92619210529a6b77b2cbedbadba3ff5eaa6e28ed Author: Arnd Bergmann Date: Fri Nov 2 16:36:24 2018 +0100 qed: fix link config error handling gcc-8 notices that qed_mcp_get_transceiver_data() may fail to return a result to the caller: drivers/net/ethernet/qlogic/qed/qed_mcp.c: In function 'qed_mcp_trans_speed_mask': drivers/net/ethernet/qlogic/qed/qed_mcp.c:1955:2: error: 'transceiver_type' may be used uninitialized in this function [-Werror=maybe-uninitialized] When an error is returned by qed_mcp_get_transceiver_data(), we should propagate that to the caller of qed_mcp_trans_speed_mask() rather than continuing with uninitialized data. Fixes: c56a8be7e7aa ("qed: Add supported link and advertise link to display in ethtool.") Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller commit 71e56028173bc84f01456a5679d8be9d681b49f1 Merge: 601a88077cf6 993f0b0510da Author: Linus Torvalds Date: Sat Nov 3 18:37:09 2018 -0700 Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler fixes from Ingo Molnar: "A memory (under-)allocation fix and a comment fix" * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched/topology: Fix off by one bug sched/rt: Update comment in pick_next_task_rt() commit 601a88077cf6e5c85a776cf27f643e5d563b29fb Merge: 01897f3e05ed 23a12ddee1ce Author: Linus Torvalds Date: Sat Nov 3 18:25:17 2018 -0700 Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Ingo Molnar: "A number of fixes and some late updates: - make in_compat_syscall() behavior on x86-32 similar to other platforms, this touches a number of generic files but is not intended to impact non-x86 platforms. - objtool fixes - PAT preemption fix - paravirt fixes/cleanups - cpufeatures updates for new instructions - earlyprintk quirk - make microcode version in sysfs world-readable (it is already world-readable in procfs) - minor cleanups and fixes" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: compat: Cleanup in_compat_syscall() callers x86/compat: Adjust in_compat_syscall() to generic code under !COMPAT objtool: Support GCC 9 cold subfunction naming scheme x86/numa_emulation: Fix uniform-split numa emulation x86/paravirt: Remove unused _paravirt_ident_32 x86/mm/pat: Disable preemption around __flush_tlb_all() x86/paravirt: Remove GPL from pv_ops export x86/traps: Use format string with panic() call x86: Clean up 'sizeof x' => 'sizeof(x)' x86/cpufeatures: Enumerate MOVDIR64B instruction x86/cpufeatures: Enumerate MOVDIRI instruction x86/earlyprintk: Add a force option for pciserial device objtool: Support per-function rodata sections x86/microcode: Make revision and processor flags world-readable commit 01897f3e05ede4d66c0f9df465fde1d67a1d733f Merge: e9ebc2151f88 29995d296e3e Author: Linus Torvalds Date: Sat Nov 3 18:13:43 2018 -0700 Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf updates and fixes from Ingo Molnar: "These are almost all tooling updates: 'perf top', 'perf trace' and 'perf script' fixes and updates, an UAPI header sync with the merge window versions, license marker updates, much improved Sparc support from David Miller, and a number of fixes" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (66 commits) perf intel-pt/bts: Calculate cpumode for synthesized samples perf intel-pt: Insert callchain context into synthesized callchains perf tools: Don't clone maps from parent when synthesizing forks perf top: Start display thread earlier tools headers uapi: Update linux/if_link.h header copy tools headers uapi: Update linux/netlink.h header copy tools headers: Sync the various kvm.h header copies tools include uapi: Update linux/mmap.h copy perf trace beauty: Use the mmap flags table generated from headers perf beauty: Wire up the mmap flags table generator to the Makefile perf beauty: Add a generator for MAP_ mmap's flag constants tools include uapi: Update asound.h copy tools arch uapi: Update asm-generic/unistd.h and arm64 unistd.h copies tools include uapi: Update linux/fs.h copy perf callchain: Honour the ordering of PERF_CONTEXT_{USER,KERNEL,etc} perf cs-etm: Correct CPU mode for samples perf unwind: Take pgoff into account when reporting elf to libdwfl perf top: Do not use overwrite mode by default perf top: Allow disabling the overwrite mode perf trace: Beautify mount's first pathname arg ... commit e9ebc2151f88600e726e51e5f7ca9c33ad53b35f Merge: d2ff0ff2c23f 3424243e39e8 Author: Linus Torvalds Date: Sat Nov 3 18:12:09 2018 -0700 Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull irq fixes from Ingo Molnar: "An irqchip driver fix and a memory (over-)allocation fix" * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: irqchip/irq-mvebu-sei: Fix a NULL vs IS_ERR() bug in probe function irq/matrix: Fix memory overallocation commit 40fa3780bac2b654edf23f6b13f4e2dd550aea10 Author: Valentin Schneider Date: Tue Oct 23 14:37:31 2018 +0100 sched/core: Take the hotplug lock in sched_init_smp() When running on linux-next (8c60c36d0b8c ("Add linux-next specific files for 20181019")) + CONFIG_PROVE_LOCKING=y on a big.LITTLE system (e.g. Juno or HiKey960), we get the following report: [ 0.748225] Call trace: [ 0.750685] lockdep_assert_cpus_held+0x30/0x40 [ 0.755236] static_key_enable_cpuslocked+0x20/0xc8 [ 0.760137] build_sched_domains+0x1034/0x1108 [ 0.764601] sched_init_domains+0x68/0x90 [ 0.768628] sched_init_smp+0x30/0x80 [ 0.772309] kernel_init_freeable+0x278/0x51c [ 0.776685] kernel_init+0x10/0x108 [ 0.780190] ret_from_fork+0x10/0x18 The static_key in question is 'sched_asym_cpucapacity' introduced by commit: df054e8445a4 ("sched/topology: Add static_key for asymmetric CPU capacity optimizations") In this particular case, we enable it because smp_prepare_cpus() will end up fetching the capacity-dmips-mhz entry from the devicetree, so we already have some asymmetry detected when entering sched_init_smp(). This didn't get detected in tip/sched/core because we were missing: commit cb538267ea1e ("jump_label/lockdep: Assert we hold the hotplug lock for _cpuslocked() operations") Calls to build_sched_domains() post sched_init_smp() will hold the hotplug lock, it just so happens that this very first call is a special case. As stated by a comment in sched_init_smp(), "There's no userspace yet to cause hotplug operations" so this is a harmless warning. However, to both respect the semantics of underlying callees and make lockdep happy, take the hotplug lock in sched_init_smp(). This also satisfies the comment atop sched_init_domains() that says "Callers must hold the hotplug lock". Reported-by: Sudeep Holla Tested-by: Sudeep Holla 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: morten.rasmussen@arm.com Cc: quentin.perret@arm.com Link: http://lkml.kernel.org/r/1540301851-3048-1-git-send-email-valentin.schneider@arm.com Signed-off-by: Ingo Molnar commit b987ffc18fb3b3b76b059aa9e372dbee26f7c4f2 Author: Peter Zijlstra Date: Fri Nov 2 14:26:53 2018 +0100 x86/qspinlock: Fix compile error With a compiler that has asm-goto but not asm-cc-output and CONFIG_PROFILE_ALL_BRANCHES=y we get a compiler error: arch/x86/include/asm/rmwcc.h:23:17: error: jump into statement expression Fix this by writing the if() as a boolean multiplication instead. Reported-by: kbuild test robot Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Will Deacon Cc: linux-kernel@vger.kernel.org Fixes: 7aa54be29765 ("locking/qspinlock, x86: Provide liveness guarantee") Signed-off-by: Ingo Molnar commit 993f0b0510dad98b4e6e39506834dab0d13fd539 Author: Peter Zijlstra Date: Fri Nov 2 14:22:25 2018 +0100 sched/topology: Fix off by one bug With the addition of the NUMA identity level, we increased @level by one and will run off the end of the array in the distance sort loop. Fixed: 051f3ca02e46 ("sched/topology: Introduce NUMA identity node sched domain") Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar commit 23a12ddee1ce28065b71f14ccc695b5a0c8a64ff Merge: 98f76206b335 bcb6fb5da77c Author: Ingo Molnar Date: Sat Nov 3 23:42:16 2018 +0100 Merge branch 'core/urgent' into x86/urgent, to pick up objtool fix Signed-off-by: Ingo Molnar commit e8ccbb7d2f53c62e14b889faaa3f6f809b657278 Author: Yunsheng Lin Date: Fri Nov 2 17:47:48 2018 +0800 net: hns3: Fix for out-of-bounds access when setting pfc back pressure The vport should be initialized to hdev->vport for each bp group, otherwise it will cause out-of-bounds access and bp setting not correct problem. [ 35.254124] BUG: KASAN: slab-out-of-bounds in hclge_pause_setup_hw+0x2a0/0x3f8 [hclge] [ 35.254126] Read of size 2 at addr ffff803b6651581a by task kworker/0:1/14 [ 35.254132] CPU: 0 PID: 14 Comm: kworker/0:1 Not tainted 4.19.0-rc7-hulk+ #85 [ 35.254133] Hardware name: Huawei D06/D06, BIOS Hisilicon D06 UEFI RC0 - B052 (V0.52) 09/14/2018 [ 35.254141] Workqueue: events work_for_cpu_fn [ 35.254144] Call trace: [ 35.254147] dump_backtrace+0x0/0x2f0 [ 35.254149] show_stack+0x24/0x30 [ 35.254154] dump_stack+0x110/0x184 [ 35.254157] print_address_description+0x168/0x2b0 [ 35.254160] kasan_report+0x184/0x310 [ 35.254162] __asan_load2+0x7c/0xa0 [ 35.254170] hclge_pause_setup_hw+0x2a0/0x3f8 [hclge] [ 35.254177] hclge_tm_init_hw+0x794/0x9f0 [hclge] [ 35.254184] hclge_tm_schd_init+0x48/0x58 [hclge] [ 35.254191] hclge_init_ae_dev+0x778/0x1168 [hclge] [ 35.254196] hnae3_register_ae_dev+0x14c/0x298 [hnae3] [ 35.254206] hns3_probe+0x88/0xa8 [hns3] [ 35.254210] local_pci_probe+0x7c/0xf0 [ 35.254212] work_for_cpu_fn+0x34/0x50 [ 35.254214] process_one_work+0x4d4/0xa38 [ 35.254216] worker_thread+0x55c/0x8d8 [ 35.254219] kthread+0x1b0/0x1b8 [ 35.254222] ret_from_fork+0x10/0x1c [ 35.254224] The buggy address belongs to the page: [ 35.254228] page:ffff7e00ed994400 count:1 mapcount:0 mapping:0000000000000000 index:0x0 compound_mapcount: 0 [ 35.273835] flags: 0xfffff8000008000(head) [ 35.282007] raw: 0fffff8000008000 dead000000000100 dead000000000200 0000000000000000 [ 35.282010] raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000 [ 35.282012] page dumped because: kasan: bad access detected [ 35.282014] Memory state around the buggy address: [ 35.282017] ffff803b66515700: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe [ 35.282019] ffff803b66515780: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe [ 35.282021] >ffff803b66515800: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe [ 35.282022] ^ [ 35.282024] ffff803b66515880: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe [ 35.282026] ffff803b66515900: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe [ 35.282028] ================================================================== [ 35.282029] Disabling lock debugging due to kernel taint [ 35.282747] hclge driver initialization finished. Fixes: 67bf2541f4b9 ("net: hns3: Fixes the back pressure setting when sriov is enabled") Signed-off-by: Yunsheng Lin Signed-off-by: David S. Miller commit cb53fd54e340ce54d2bc2397cd0b70c712642f98 Merge: b8a5d06ae234 c29734443511 Author: David S. Miller Date: Sat Nov 3 15:40:01 2018 -0700 Merge branch 'net-bql-better-deal-with-GSO' Eric Dumazet says: ==================== net: bql: better deal with GSO While BQL bulk dequeue works well for TSO packets, it is not very efficient as soon as GSO is involved. On a GSO only workload (UDP or TCP), this patch series can save about 8 % of cpu cycles on a 40Gbit mlx4 NIC, by keeping optimal batching, and avoiding expensive doorbells, qdisc requeues and reschedules. This patch series : - Add __netdev_tx_sent_queue() so that drivers can implement efficient BQL and xmit_more support. - Implement a work around in dev_hard_start_xmit() for drivers not using __netdev_tx_sent_queue() - changes mlx4 to use __netdev_tx_sent_queue() v2: Tariq and Willem feedback addressed. added __netdev_tx_sent_queue() (Willem suggestion) ==================== Signed-off-by: David S. Miller commit c29734443511aa3c53844e1941805fc761aa80ba Author: Eric Dumazet Date: Wed Oct 31 08:39:14 2018 -0700 net/mlx4_en: use __netdev_tx_sent_queue() doorbell only depends on xmit_more and netif_tx_queue_stopped() Using __netdev_tx_sent_queue() avoids messing with BQL stop flag, and is more generic. This patch increases performance on GSO workload by keeping doorbells to the minimum required. Signed-off-by: Eric Dumazet Cc: Tariq Toukan Reviewed-by: Tariq Toukan Signed-off-by: David S. Miller commit fe60faa5063822f2d555f4f326c7dd72a60929bf Author: Eric Dumazet Date: Wed Oct 31 08:39:13 2018 -0700 net: do not abort bulk send on BQL status Before calling dev_hard_start_xmit(), upper layers tried to cook optimal skb list based on BQL budget. Problem is that GSO packets can end up comsuming more than the BQL budget. Breaking the loop is not useful, since requeued packets are ahead of any packets still in the qdisc. It is also more expensive, since next TX completion will push these packets later, while skbs are not in cpu caches. It is also a behavior difference with TSO packets, that can break the BQL limit by a large amount. Note that drivers should use __netdev_tx_sent_queue() in order to have optimal xmit_more support, and avoid useless atomic operations as shown in the following patch. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit 3e59020abf0f88182730527ee5b862e786eb485a Author: Eric Dumazet Date: Wed Oct 31 08:39:12 2018 -0700 net: bql: add __netdev_tx_sent_queue() When qdisc_run() tries to use BQL budget to bulk-dequeue a batch of packets, GSO can later transform this list in another list of skbs, and each skb is sent to device ndo_start_xmit(), one at a time, with skb->xmit_more being set to one but for last skb. Problem is that very often, BQL limit is hit in the middle of the packet train, forcing dev_hard_start_xmit() to stop the bulk send and requeue the end of the list. BQL role is to avoid head of line blocking, making sure a qdisc can deliver high priority packets before low priority ones. But there is no way requeued packets can be bypassed by fresh packets in the qdisc. Aborting the bulk send increases TX softirqs, and hot cache lines (after skb_segment()) are wasted. Note that for TSO packets, we never split a packet in the middle because of BQL limit being hit. Drivers should be able to update BQL counters without flipping/caring about BQL status, if the current skb has xmit_more set. Upper layers are ultimately responsible to stop sending another packet train when BQL limit is hit. Code template in a driver might look like the following : send_doorbell = __netdev_tx_sent_queue(tx_queue, nr_bytes, skb->xmit_more); Note that __netdev_tx_sent_queue() use is not mandatory, since following patch will change dev_hard_start_xmit() to not care about BQL status. But it is highly recommended so that xmit_more full benefits can be reached (less doorbells sent, and less atomic operations as well) Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit ea0abbb648452cdb6e1734b702b6330a7448fcf8 Author: Vasily Averin Date: Sat Nov 3 17:11:19 2018 -0400 ext4: add missing brelse() update_backups()'s error path Fixes: ac27a0ec112a ("ext4: initial copy of files from ext3") Signed-off-by: Vasily Averin Signed-off-by: Theodore Ts'o Cc: stable@kernel.org # 2.6.19 commit 61a9c11e5e7a0dab5381afa5d9d4dd5ebf18f7a0 Author: Vasily Averin Date: Sat Nov 3 16:50:08 2018 -0400 ext4: add missing brelse() add_new_gdb_meta_bg()'s error path Fixes: 01f795f9e0d6 ("ext4: add online resizing support for meta_bg ...") Signed-off-by: Vasily Averin Signed-off-by: Theodore Ts'o Cc: stable@kernel.org # 3.7 commit cea5794122125bf67559906a0762186cf417099c Author: Vasily Averin Date: Sat Nov 3 16:22:10 2018 -0400 ext4: add missing brelse() in set_flexbg_block_bitmap()'s error path Fixes: 33afdcc5402d ("ext4: add a function which sets up group blocks ...") Cc: stable@kernel.org # 3.3 Signed-off-by: Vasily Averin Signed-off-by: Theodore Ts'o commit 9e4028935cca3f9ef9b6a90df9da6f1f94853536 Author: Vasily Averin Date: Sat Nov 3 16:13:17 2018 -0400 ext4: avoid potential extra brelse in setup_new_flex_group_blocks() Currently bh is set to NULL only during first iteration of for cycle, then this pointer is not cleared after end of using. Therefore rollback after errors can lead to extra brelse(bh) call, decrements bh counter and later trigger an unexpected warning in __brelse() Patch moves brelse() calls in body of cycle to exclude requirement of brelse() call in rollback. Fixes: 33afdcc5402d ("ext4: add a function which sets up group blocks ...") Signed-off-by: Vasily Averin Signed-off-by: Theodore Ts'o Cc: stable@kernel.org # 3.3+ commit d2ff0ff2c23f1bacd35073bf50e6c18298a8d530 Merge: 83650fd58a93 8008cc78d3d6 Author: Linus Torvalds Date: Sat Nov 3 12:13:57 2018 -0700 Merge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC fixes from Olof Johansson: "A few fixes who have come in near or during the merge window: - Removal of a VLA usage in Marvell mpp platform code - Enable some IPMI options for ARM64 servers by default, helps testing - Enable PREEMPT on 32-bit ARMv7 defconfig - Minor fix for stm32 DT (removal of an unused DMA property) - Bugfix for TI OMAP1-based ams-delta (-EINVAL -> IRQ_NOTCONNECTED)" * tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: ARM: dts: stm32: update HASH1 dmas property on stm32mp157c ARM: orion: avoid VLA in orion_mpp_conf ARM: defconfig: Update multi_v7 to use PREEMPT arm64: defconfig: Enable some IPMI configs soc: ti: QMSS: Fix usage of irq_set_affinity_hint ARM: OMAP1: ams-delta: Fix impossible .irq < 0 commit 83650fd58a934fad5b7735fea96905ef986c0821 Merge: 3308a383ce99 966866892cf8 Author: Linus Torvalds Date: Sat Nov 3 10:55:23 2018 -0700 Merge tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull more arm64 updates from Catalin Marinas: - fix W+X page (mark RO) allocated by the arm64 kprobes code - Makefile fix for .i files in out of tree modules * tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: kprobe: make page to RO mode when allocate it arm64: kdump: fix small typo arm64: makefile fix build of .i file in external module case commit 3308a383ce99f739a3fa47dbd8564ab517562b51 Merge: 9a12efc5e01a f62717551b2b Author: Linus Torvalds Date: Sat Nov 3 10:53:33 2018 -0700 Merge tag 'dma-mapping-4.20-2' of git://git.infradead.org/users/hch/dma-mapping Pull dma-mapping fix from Christoph Hellwig: "Avoid compile warnings on non-default arm64 configs" * tag 'dma-mapping-4.20-2' of git://git.infradead.org/users/hch/dma-mapping: arm64: fix warnings without CONFIG_IOMMU_DMA commit 9a12efc5e01ac1dbad089f22e5d0e6f817970c3c Merge: 169447287bfb 995167420797 Author: Linus Torvalds Date: Sat Nov 3 10:47:33 2018 -0700 Merge tag 'kbuild-v4.20-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull Kbuild updates from Masahiro Yamada: - clean-up leftovers in Kconfig files - remove stale oldnoconfig and silentoldconfig targets - remove unneeded cc-fullversion and cc-name variables - improve merge_config script to allow overriding option prefix * tag 'kbuild-v4.20-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: kbuild: remove cc-name variable kbuild: replace cc-name test with CONFIG_CC_IS_CLANG merge_config.sh: Allow to define config prefix kbuild: remove unused cc-fullversion variable kconfig: remove silentoldconfig target kconfig: remove oldnoconfig target powerpc: PCI_MSI needs PCI powerpc: remove CONFIG_MCA leftovers powerpc: remove CONFIG_PCI_QSPAN scsi: aha152x: rename the PCMCIA define commit 169447287bfb0a8e494f33c04dda50bb078cf2f0 Merge: ed61a132cbbf b98e26df0754 Author: Linus Torvalds Date: Sat Nov 3 10:45:55 2018 -0700 Merge tag '4.20-rc1-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6 Pull cifs fixes and updates from Steve French: "Three small fixes (one Kerberos related, one for stable, and another fixes an oops in xfstest 377), two helpful debugging improvements, three patches for cifs directio and some minor cleanup" * tag '4.20-rc1-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6: cifs: fix signed/unsigned mismatch on aio_read patch cifs: don't dereference smb_file_target before null check CIFS: Add direct I/O functions to file_operations CIFS: Add support for direct I/O write CIFS: Add support for direct I/O read smb3: missing defines and structs for reparse point handling smb3: allow more detailed protocol info on open files for debugging smb3: on kerberos mount if server doesn't specify auth type use krb5 smb3: add trace point for tree connection cifs: fix spelling mistake, EACCESS -> EACCES cifs: fix return value for cifs_listxattr commit b8a5d06ae234b9522f49d5cc97ff46edc6bdb780 Merge: 265ad0632fef 54e049c227d9 Author: David S. Miller Date: Sat Nov 3 10:44:06 2018 -0700 Merge branch 's390-qeth-fixes' Julian Wiedmann says: ==================== s390/qeth: fixes 2018-11-02 please apply one round of qeth fixes for -net. Patch 1 is rather large and removes a use-after-free hazard from many of our debug trace entries. Patch 2 is yet another fix-up for the L3 subdriver's new IP address management code. Patch 3 and 4 resolve some fallout from the recent changes wrt how/when qeth allocates its net_device. Patch 5 makes sure we don't set reserved bits when building HW commands from user-provided data. And finally, patch 6 allows ethtool to play nice with new HW. ==================== Signed-off-by: David S. Miller commit 54e049c227d9968ff6a7d80aae5fec27b54d39da Author: Julian Wiedmann Date: Fri Nov 2 19:04:13 2018 +0100 s390/qeth: report 25Gbit link speed This adds the various identifiers for 25Gbit cards, and wires them up into sysfs and ethtool. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit 125d7d30111738a5bdafacc1ed87cd3d7f32b4ea Author: Julian Wiedmann Date: Fri Nov 2 19:04:12 2018 +0100 s390/qeth: sanitize ARP requests The ARP_{ADD,REMOVE}_ENTRY cmd structs contain reserved fields. Introduce a common helper that doesn't raw-copy the user-provided data into the cmd, but only sets those fields that are strictly needed for the command. This also sets the correct command length for ARP_REMOVE_ENTRY. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit 9fae5c3b60396b8586881a0e7c028ae5bcaeaa3f Author: Julian Wiedmann Date: Fri Nov 2 19:04:11 2018 +0100 s390/qeth: fix initial operstate Setting the carrier 'on' for an unregistered netdevice doesn't update its operstate. Fix this by delaying the update until the netdevice has been registered. Fixes: 91cc98f51e3d ("s390/qeth: remove duplicated carrier state tracking") Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit 30356d08159d7899438e94503ae322a8b881e205 Author: Julian Wiedmann Date: Fri Nov 2 19:04:10 2018 +0100 s390/qeth: unregister netdevice only when registered qeth only registers its netdevice when the qeth device is first set online. Thus a device that has never been set online will trigger a WARN ("network todo 'hsi%d' but state 0") in unregister_netdev() when removed. Fix this by protecting the unregister step, just like we already protect against repeated registering of the netdevice. Fixes: d3d1b205e89f ("s390/qeth: allocate netdevice early") Reported-by: Karsten Graul Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit bd74a7f9cc033cf4d405788f80292268987dc0c5 Author: Julian Wiedmann Date: Fri Nov 2 19:04:09 2018 +0100 s390/qeth: fix HiperSockets sniffer Sniffing mode for L3 HiperSockets requires that no IP addresses are registered with the HW. The preferred way to achieve this is for userspace to delete all the IPs on the interface. But qeth is expected to also tolerate a configuration where that is not the case, by skipping the IP registration when in sniffer mode. Since commit 5f78e29ceebf ("qeth: optimize IP handling in rx_mode callback") reworked the IP registration logic in the L3 subdriver, this no longer works. When the qeth device is set online, qeth_l3_recover_ip() now unconditionally registers all unicast addresses from our internal IP table. While we could fix this particular problem by skipping qeth_l3_recover_ip() on a sniffer device, the more future-proof change is to skip the IP address registration at the lowest level. This way we a) catch any future code path that attempts to register an IP address without considering the sniffer scenario, and b) continue to build up our internal IP table, so that if sniffer mode is switched off later we can operate just like normal. Fixes: 5f78e29ceebf ("qeth: optimize IP handling in rx_mode callback") Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit e19e5be8b4cafa8b3f8b0cd1b1dfe20fa0145b83 Author: Julian Wiedmann Date: Fri Nov 2 19:04:08 2018 +0100 s390/qeth: sanitize strings in debug messages As Documentation/s390/s390dbf.txt states quite clearly, using any pointer in sprinf-formatted s390dbf debug entries is dangerous. The pointers are dereferenced whenever the trace file is read from. So if the referenced data has a shorter life-time than the trace file, any read operation can result in a use-after-free. So rip out all hazardous use of indirect data, and replace any usage of dev_name() and such by the Bus ID number. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit ed61a132cbbf7cadae7b255cd5083c8fadc77f31 Merge: af102b333a21 2cbfdf4df583 Author: Linus Torvalds Date: Sat Nov 3 10:35:52 2018 -0700 Merge branch 'work.afs' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull 9p fix from Al Viro: "Regression fix for net/9p handling of iov_iter; broken by braino when switching to iov_iter_is_kvec() et.al., spotted and fixed by Marc" * 'work.afs' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: iov_iter: Fix 9p virtio breakage commit af102b333a21cc77c1834cf7a604d0359db9d54b Merge: cddfa11aef3c 33279c305d07 Author: Linus Torvalds Date: Sat Nov 3 10:34:03 2018 -0700 Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull more SCSI updates from James Bottomley: "This is a set of minor small (and safe changes) that didn't make the initial pull request plus some bug fixes" * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: mvsas: Remove set but not used variable 'id' scsi: qla2xxx: Remove two arguments from qlafx00_error_entry() scsi: qla2xxx: Make sure that qlafx00_ioctl_iosb_entry() initializes 'res' scsi: qla2xxx: Remove a set-but-not-used variable scsi: qla2xxx: Make qla2x00_sysfs_write_nvram() easier to analyze scsi: qla2xxx: Declare local functions 'static' scsi: qla2xxx: Improve several kernel-doc headers scsi: qla2xxx: Modify fall-through annotations scsi: 3w-sas: 3w-9xxx: Use unsigned char for cdb scsi: mvsas: Use dma_pool_zalloc scsi: target: Don't request modules that aren't even built scsi: target: Set response length for REPORT TARGET PORT GROUPS commit cddfa11aef3c4914f406a059138ccc354f034d1c Merge: 5f21585384a4 dd33ad7b251f Author: Linus Torvalds Date: Sat Nov 3 10:21:43 2018 -0700 Merge branch 'akpm' (patches from Andrew) Merge more updates from Andrew Morton: - more ocfs2 work - various leftovers * emailed patches from Andrew Morton : memory_hotplug: cond_resched in __remove_pages bfs: add sanity check at bfs_fill_super() kernel/sysctl.c: remove duplicated include kernel/kexec_file.c: remove some duplicated includes mm, thp: consolidate THP gfp handling into alloc_hugepage_direct_gfpmask ocfs2: fix clusters leak in ocfs2_defrag_extent() ocfs2: dlmglue: clean up timestamp handling ocfs2: don't put and assigning null to bh allocated outside ocfs2: fix a misuse a of brelse after failing ocfs2_check_dir_entry ocfs2: don't use iocb when EIOCBQUEUED returns ocfs2: without quota support, avoid calling quota recovery ocfs2: remove ocfs2_is_o2cb_active() mm: thp: relax __GFP_THISNODE for MADV_HUGEPAGE mappings include/linux/notifier.h: SRCU: fix ctags mm: handle no memcg case in memcg_kmem_charge() properly commit dd33ad7b251f900481701b2a82d25de583867708 Author: Michal Hocko Date: Fri Nov 2 15:48:46 2018 -0700 memory_hotplug: cond_resched in __remove_pages We have received a bug report that unbinding a large pmem (>1TB) can result in a soft lockup: NMI watchdog: BUG: soft lockup - CPU#9 stuck for 23s! [ndctl:4365] [...] Supported: Yes CPU: 9 PID: 4365 Comm: ndctl Not tainted 4.12.14-94.40-default #1 SLE12-SP4 Hardware name: Intel Corporation S2600WFD/S2600WFD, BIOS SE5C620.86B.01.00.0833.051120182255 05/11/2018 task: ffff9cce7d4410c0 task.stack: ffffbe9eb1bc4000 RIP: 0010:__put_page+0x62/0x80 Call Trace: devm_memremap_pages_release+0x152/0x260 release_nodes+0x18d/0x1d0 device_release_driver_internal+0x160/0x210 unbind_store+0xb3/0xe0 kernfs_fop_write+0x102/0x180 __vfs_write+0x26/0x150 vfs_write+0xad/0x1a0 SyS_write+0x42/0x90 do_syscall_64+0x74/0x150 entry_SYSCALL_64_after_hwframe+0x3d/0xa2 RIP: 0033:0x7fd13166b3d0 It has been reported on an older (4.12) kernel but the current upstream code doesn't cond_resched in the hot remove code at all and the given range to remove might be really large. Fix the issue by calling cond_resched once per memory section. Link: http://lkml.kernel.org/r/20181031125840.23982-1-mhocko@kernel.org Signed-off-by: Michal Hocko Acked-by: Johannes Thumshirn Cc: Dan Williams Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9f2df09a33aa2c76ce6385d382693f98d7f2f07e Author: Tetsuo Handa Date: Fri Nov 2 15:48:42 2018 -0700 bfs: add sanity check at bfs_fill_super() syzbot is reporting too large memory allocation at bfs_fill_super() [1]. Since file system image is corrupted such that bfs_sb->s_start == 0, bfs_fill_super() is trying to allocate 8MB of continuous memory. Fix this by adding a sanity check on bfs_sb->s_start, __GFP_NOWARN and printf(). [1] https://syzkaller.appspot.com/bug?id=16a87c236b951351374a84c8a32f40edbc034e96 Link: http://lkml.kernel.org/r/1525862104-3407-1-git-send-email-penguin-kernel@I-love.SAKURA.ne.jp Signed-off-by: Tetsuo Handa Reported-by: syzbot Reviewed-by: Andrew Morton Cc: Tigran Aivazian Cc: Matthew Wilcox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6f0483d1f91b612186abeaebf3ce43bf805eb9f7 Author: Michael Schupikov Date: Fri Nov 2 15:48:38 2018 -0700 kernel/sysctl.c: remove duplicated include Remove one include of . No functional changes. Link: http://lkml.kernel.org/r/20181004134223.17735-1-michael@schupikov.de Signed-off-by: Michael Schupikov Reviewed-by: Richard Weinberger Acked-by: Luis Chamberlain Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3383b36040522505546cb112f0a543a5998edfb6 Author: zhong jiang Date: Fri Nov 2 15:48:35 2018 -0700 kernel/kexec_file.c: remove some duplicated includes We include kexec.h and slab.h twice in kexec_file.c. It's unnecessary. hence just remove them. Link: http://lkml.kernel.org/r/1537498098-19171-1-git-send-email-zhongjiang@huawei.com Signed-off-by: zhong jiang Reviewed-by: Bhupesh Sharma Reviewed-by: Andrew Morton Acked-by: Baoquan He Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 89c83fb539f95491be80cdd5158e6f0ce329e317 Author: Michal Hocko Date: Fri Nov 2 15:48:31 2018 -0700 mm, thp: consolidate THP gfp handling into alloc_hugepage_direct_gfpmask THP allocation mode is quite complex and it depends on the defrag mode. This complexity is hidden in alloc_hugepage_direct_gfpmask from a large part currently. The NUMA special casing (namely __GFP_THISNODE) is however independent and placed in alloc_pages_vma currently. This both adds an unnecessary branch to all vma based page allocation requests and it makes the code more complex unnecessarily as well. Not to mention that e.g. shmem THP used to do the node reclaiming unconditionally regardless of the defrag mode until recently. This was not only unexpected behavior but it was also hardly a good default behavior and I strongly suspect it was just a side effect of the code sharing more than a deliberate decision which suggests that such a layering is wrong. Get rid of the thp special casing from alloc_pages_vma and move the logic to alloc_hugepage_direct_gfpmask. __GFP_THISNODE is applied to the resulting gfp mask only when the direct reclaim is not requested and when there is no explicit numa binding to preserve the current logic. Please note that there's also a slight difference wrt MPOL_BIND now. The previous code would avoid using __GFP_THISNODE if the local node was outside of policy_nodemask(). After this patch __GFP_THISNODE is avoided for all MPOL_BIND policies. So there's a difference that if local node is actually allowed by the bind policy's nodemask, previously __GFP_THISNODE would be added, but now it won't be. From the behavior POV this is still correct because the policy nodemask is used. Link: http://lkml.kernel.org/r/20180925120326.24392-3-mhocko@kernel.org Signed-off-by: Michal Hocko Acked-by: Vlastimil Babka Cc: Alex Williamson Cc: Andrea Arcangeli Cc: David Rientjes Cc: "Kirill A. Shutemov" Cc: Mel Gorman Cc: Stefan Priebe - Profihost AG Cc: Zi Yan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6194ae4242dec0c9d604bc05df83aa9260a899e4 Author: Larry Chen Date: Fri Nov 2 15:48:27 2018 -0700 ocfs2: fix clusters leak in ocfs2_defrag_extent() ocfs2_defrag_extent() might leak allocated clusters. When the file system has insufficient space, the number of claimed clusters might be less than the caller wants. If that happens, the original code might directly commit the transaction without returning clusters. This patch is based on code in ocfs2_add_clusters_in_btree(). [akpm@linux-foundation.org: include localalloc.h, reduce scope of data_ac] Link: http://lkml.kernel.org/r/20180904041621.16874-3-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 3a3d1e51042895c58d4797831921c940b28d8c4b Author: Arnd Bergmann Date: Fri Nov 2 15:48:23 2018 -0700 ocfs2: dlmglue: clean up timestamp handling The handling of timestamps outside of the 1970..2038 range in the dlm glue is rather inconsistent: on 32-bit architectures, this has always wrapped around to negative timestamps in the 1902..1969 range, while on 64-bit kernels all timestamps are interpreted as positive 34 bit numbers in the 1970..2514 year range. Now that the VFS code handles 64-bit timestamps on all architectures, we can make the behavior more consistent here, and return the same result that we had on 64-bit already, making the file system y2038 safe in the process. Outside of dlmglue, it already uses 64-bit on-disk timestamps anway, so that part is fine. For consistency, I'm changing ocfs2_pack_timespec() to clamp anything outside of the supported range to the minimum and maximum values. This avoids a possible ambiguity of values before 1970 in particular, which used to be interpreted as times at the end of the 2514 range previously. Link: http://lkml.kernel.org/r/20180619155826.4106487-1-arnd@arndb.de Signed-off-by: Arnd Bergmann 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 cf76c78595ca87548ca5e45c862ac9e0949c4687 Author: Changwei Ge Date: Fri Nov 2 15:48:19 2018 -0700 ocfs2: don't put and assigning null to bh allocated outside ocfs2_read_blocks() and ocfs2_read_blocks_sync() are both used to read several blocks from disk. Currently, the input argument *bhs* can be NULL or NOT. It depends on the caller's behavior. If the function fails in reading blocks from disk, the corresponding bh will be assigned to NULL and put. Obviously, above process for non-NULL input bh is not appropriate. Because the caller doesn't even know its bhs are put and re-assigned. If buffer head is managed by caller, ocfs2_read_blocks and ocfs2_read_blocks_sync() should not evaluate it to NULL. It will cause caller accessing illegal memory, thus crash. Link: http://lkml.kernel.org/r/HK2PR06MB045285E0F4FBB561F9F2F9B3D5680@HK2PR06MB0452.apcprd06.prod.outlook.com Signed-off-by: Changwei Ge Reviewed-by: Guozhonghua 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 29aa30167a0a2e6045a0d6d2e89d8168132333d5 Author: Changwei Ge Date: Fri Nov 2 15:48:15 2018 -0700 ocfs2: fix a misuse a of brelse after failing ocfs2_check_dir_entry Somehow, file system metadata was corrupted, which causes ocfs2_check_dir_entry() to fail in function ocfs2_dir_foreach_blk_el(). According to the original design intention, if above happens we should skip the problematic block and continue to retrieve dir entry. But there is obviouse misuse of brelse around related code. After failure of ocfs2_check_dir_entry(), current code just moves to next position and uses the problematic buffer head again and again during which the problematic buffer head is released for multiple times. I suppose, this a serious issue which is long-lived in ocfs2. This may cause other file systems which is also used in a the same host insane. So we should also consider about bakcporting this patch into linux -stable. Link: http://lkml.kernel.org/r/HK2PR06MB045211675B43EED794E597B6D56E0@HK2PR06MB0452.apcprd06.prod.outlook.com Signed-off-by: Changwei Ge Suggested-by: Changkuo Shi Reviewed-by: Andrew Morton Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Joseph Qi Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9e985787750db8aae87f02b67e908f28ac4d6b83 Author: Changwei Ge Date: Fri Nov 2 15:48:11 2018 -0700 ocfs2: don't use iocb when EIOCBQUEUED returns When -EIOCBQUEUED returns, it means that aio_complete() will be called from dio_complete(), which is an asynchronous progress against write_iter. Generally, IO is a very slow progress than executing instruction, but we still can't take the risk to access a freed iocb. And we do face a BUG crash issue. Using the crash tool, iocb is obviously freed already. crash> struct -x kiocb ffff881a350f5900 struct kiocb { ki_filp = 0xffff881a350f5a80, ki_pos = 0x0, ki_complete = 0x0, private = 0x0, ki_flags = 0x0 } And the backtrace shows: ocfs2_file_write_iter+0xcaa/0xd00 [ocfs2] aio_run_iocb+0x229/0x2f0 do_io_submit+0x291/0x540 SyS_io_submit+0x10/0x20 system_call_fastpath+0x16/0x75 Link: http://lkml.kernel.org/r/1523361653-14439-1-git-send-email-ge.changwei@h3c.com Signed-off-by: Changwei Ge Reviewed-by: Andrew Morton Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Joseph Qi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 21158ca85b73ddd0088076a5209cfd040513a8b5 Author: Guozhonghua Date: Fri Nov 2 15:48:07 2018 -0700 ocfs2: without quota support, avoid calling quota recovery During one dead node's recovery by other node, quota recovery work will be queued. We should avoid calling quota when it is not supported, so check the quota flags. Link: http://lkml.kernel.org/r/71604351584F6A4EBAE558C676F37CA401071AC9FB@H3CMLB12-EX.srv.huawei-3com.com Signed-off-by: guozhonghua Reviewed-by: Jan Kara 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 a634644751c46238df58bbfe992e30c1668388db Author: Gang He Date: Fri Nov 2 15:48:03 2018 -0700 ocfs2: remove ocfs2_is_o2cb_active() Remove ocfs2_is_o2cb_active(). We have similar functions to identify which cluster stack is being used via osb->osb_cluster_stack. Secondly, the current implementation of ocfs2_is_o2cb_active() is not totally safe. Based on the design of stackglue, we need to get ocfs2_stack_lock before using ocfs2_stack related data structures, and that active_stack pointer can be NULL in the case of mount failure. Link: http://lkml.kernel.org/r/1495441079-11708-1-git-send-email-ghe@suse.com Signed-off-by: Gang He Reviewed-by: Joseph Qi Reviewed-by: Eric Ren Acked-by: Changwei Ge Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ac5b2c18911ffe95c08d69273917f90212cf5659 Author: Andrea Arcangeli Date: Fri Nov 2 15:47:59 2018 -0700 mm: thp: relax __GFP_THISNODE for MADV_HUGEPAGE mappings THP allocation might be really disruptive when allocated on NUMA system with the local node full or hard to reclaim. Stefan has posted an allocation stall report on 4.12 based SLES kernel which suggests the same issue: kvm: page allocation stalls for 194572ms, order:9, mode:0x4740ca(__GFP_HIGHMEM|__GFP_IO|__GFP_FS|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL|__GFP_THISNODE|__GFP_MOVABLE|__GFP_DIRECT_RECLAIM), nodemask=(null) kvm cpuset=/ mems_allowed=0-1 CPU: 10 PID: 84752 Comm: kvm Tainted: G W 4.12.0+98-ph 0000001 SLE15 (unreleased) Hardware name: Supermicro SYS-1029P-WTRT/X11DDW-NT, BIOS 2.0 12/05/2017 Call Trace: dump_stack+0x5c/0x84 warn_alloc+0xe0/0x180 __alloc_pages_slowpath+0x820/0xc90 __alloc_pages_nodemask+0x1cc/0x210 alloc_pages_vma+0x1e5/0x280 do_huge_pmd_wp_page+0x83f/0xf00 __handle_mm_fault+0x93d/0x1060 handle_mm_fault+0xc6/0x1b0 __do_page_fault+0x230/0x430 do_page_fault+0x2a/0x70 page_fault+0x7b/0x80 [...] Mem-Info: active_anon:126315487 inactive_anon:1612476 isolated_anon:5 active_file:60183 inactive_file:245285 isolated_file:0 unevictable:15657 dirty:286 writeback:1 unstable:0 slab_reclaimable:75543 slab_unreclaimable:2509111 mapped:81814 shmem:31764 pagetables:370616 bounce:0 free:32294031 free_pcp:6233 free_cma:0 Node 0 active_anon:254680388kB inactive_anon:1112760kB active_file:240648kB inactive_file:981168kB unevictable:13368kB isolated(anon):0kB isolated(file):0kB mapped:280240kB dirty:1144kB writeback:0kB shmem:95832kB shmem_thp: 0kB shmem_pmdmapped: 0kB anon_thp: 81225728kB writeback_tmp:0kB unstable:0kB all_unreclaimable? no Node 1 active_anon:250583072kB inactive_anon:5337144kB active_file:84kB inactive_file:0kB unevictable:49260kB isolated(anon):20kB isolated(file):0kB mapped:47016kB dirty:0kB writeback:4kB shmem:31224kB shmem_thp: 0kB shmem_pmdmapped: 0kB anon_thp: 31897600kB writeback_tmp:0kB unstable:0kB all_unreclaimable? no The defrag mode is "madvise" and from the above report it is clear that the THP has been allocated for MADV_HUGEPAGA vma. Andrea has identified that the main source of the problem is __GFP_THISNODE usage: : The problem is that direct compaction combined with the NUMA : __GFP_THISNODE logic in mempolicy.c is telling reclaim to swap very : hard the local node, instead of failing the allocation if there's no : THP available in the local node. : : Such logic was ok until __GFP_THISNODE was added to the THP allocation : path even with MPOL_DEFAULT. : : The idea behind the __GFP_THISNODE addition, is that it is better to : provide local memory in PAGE_SIZE units than to use remote NUMA THP : backed memory. That largely depends on the remote latency though, on : threadrippers for example the overhead is relatively low in my : experience. : : The combination of __GFP_THISNODE and __GFP_DIRECT_RECLAIM results in : extremely slow qemu startup with vfio, if the VM is larger than the : size of one host NUMA node. This is because it will try very hard to : unsuccessfully swapout get_user_pages pinned pages as result of the : __GFP_THISNODE being set, instead of falling back to PAGE_SIZE : allocations and instead of trying to allocate THP on other nodes (it : would be even worse without vfio type1 GUP pins of course, except it'd : be swapping heavily instead). Fix this by removing __GFP_THISNODE for THP requests which are requesting the direct reclaim. This effectivelly reverts 5265047ac301 on the grounds that the zone/node reclaim was known to be disruptive due to premature reclaim when there was memory free. While it made sense at the time for HPC workloads without NUMA awareness on rare machines, it was ultimately harmful in the majority of cases. The existing behaviour is similar, if not as widespare as it applies to a corner case but crucially, it cannot be tuned around like zone_reclaim_mode can. The default behaviour should always be to cause the least harm for the common case. If there are specialised use cases out there that want zone_reclaim_mode in specific cases, then it can be built on top. Longterm we should consider a memory policy which allows for the node reclaim like behavior for the specific memory ranges which would allow a [1] http://lkml.kernel.org/r/20180820032204.9591-1-aarcange@redhat.com Mel said: : Both patches look correct to me but I'm responding to this one because : it's the fix. The change makes sense and moves further away from the : severe stalling behaviour we used to see with both THP and zone reclaim : mode. : : I put together a basic experiment with usemem configured to reference a : buffer multiple times that is 80% the size of main memory on a 2-socket : box with symmetric node sizes and defrag set to "always". The defrag : setting is not the default but it would be functionally similar to : accessing a buffer with madvise(MADV_HUGEPAGE). Usemem is configured to : reference the buffer multiple times and while it's not an interesting : workload, it would be expected to complete reasonably quickly as it fits : within memory. The results were; : : usemem : vanilla noreclaim-v1 : Amean Elapsd-1 42.78 ( 0.00%) 26.87 ( 37.18%) : Amean Elapsd-3 27.55 ( 0.00%) 7.44 ( 73.00%) : Amean Elapsd-4 5.72 ( 0.00%) 5.69 ( 0.45%) : : This shows the elapsed time in seconds for 1 thread, 3 threads and 4 : threads referencing buffers 80% the size of memory. With the patches : applied, it's 37.18% faster for the single thread and 73% faster with two : threads. Note that 4 threads showing little difference does not indicate : the problem is related to thread counts. It's simply the case that 4 : threads gets spread so their workload mostly fits in one node. : : The overall view from /proc/vmstats is more startling : : 4.19.0-rc1 4.19.0-rc1 : vanillanoreclaim-v1r1 : Minor Faults 35593425 708164 : Major Faults 484088 36 : Swap Ins 3772837 0 : Swap Outs 3932295 0 : : Massive amounts of swap in/out without the patch : : Direct pages scanned 6013214 0 : Kswapd pages scanned 0 0 : Kswapd pages reclaimed 0 0 : Direct pages reclaimed 4033009 0 : : Lots of reclaim activity without the patch : : Kswapd efficiency 100% 100% : Kswapd velocity 0.000 0.000 : Direct efficiency 67% 100% : Direct velocity 11191.956 0.000 : : Mostly from direct reclaim context as you'd expect without the patch. : : Page writes by reclaim 3932314.000 0.000 : Page writes file 19 0 : Page writes anon 3932295 0 : Page reclaim immediate 42336 0 : : Writes from reclaim context is never good but the patch eliminates it. : : We should never have default behaviour to thrash the system for such a : basic workload. If zone reclaim mode behaviour is ever desired but on a : single task instead of a global basis then the sensible option is to build : a mempolicy that enforces that behaviour. This was a severe regression compared to previous kernels that made important workloads unusable and it starts when __GFP_THISNODE was added to THP allocations under MADV_HUGEPAGE. It is not a significant risk to go to the previous behavior before __GFP_THISNODE was added, it worked like that for years. This was simply an optimization to some lucky workloads that can fit in a single node, but it ended up breaking the VM for others that can't possibly fit in a single node, so going back is safe. [mhocko@suse.com: rewrote the changelog based on the one from Andrea] Link: http://lkml.kernel.org/r/20180925120326.24392-2-mhocko@kernel.org Fixes: 5265047ac301 ("mm, thp: really limit transparent hugepage allocation to local node") Signed-off-by: Andrea Arcangeli Signed-off-by: Michal Hocko Reported-by: Stefan Priebe Debugged-by: Andrea Arcangeli Reported-by: Alex Williamson Reviewed-by: Mel Gorman Tested-by: Mel Gorman Cc: Zi Yan Cc: Vlastimil Babka Cc: David Rientjes Cc: "Kirill A. Shutemov" Cc: [4.1+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 94e297c50b529f5d01cfd1dbc808d61e95180ab7 Author: Sam Protsenko Date: Fri Nov 2 15:47:53 2018 -0700 include/linux/notifier.h: SRCU: fix ctags ctags indexing ("make tags" command) throws this warning: ctags: Warning: include/linux/notifier.h:125: null expansion of name pattern "\1" This is the result of DEFINE_PER_CPU() macro expansion. Fix that by getting rid of line break. Similar fix was already done in commit 25528213fe9f ("tags: Fix DEFINE_PER_CPU expansions"), but this one probably wasn't noticed. Link: http://lkml.kernel.org/r/20181030202808.28027-1-semen.protsenko@linaro.org Fixes: 9c80172b902d ("kernel/SRCU: provide a static initializer") Signed-off-by: Sam Protsenko Cc: Sebastian Andrzej Siewior Cc: Andy Shevchenko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e68599a3c3ad0f3171a7cb4e48aa6f9a69381902 Author: Roman Gushchin Date: Fri Nov 2 15:47:49 2018 -0700 mm: handle no memcg case in memcg_kmem_charge() properly Mike Galbraith reported a regression caused by the commit 9b6f7e163cd0 ("mm: rework memcg kernel stack accounting") on a system with "cgroup_disable=memory" boot option: the system panics with the following stack trace: BUG: unable to handle kernel NULL pointer dereference at 00000000000000f8 PGD 0 P4D 0 Oops: 0002 [#1] PREEMPT SMP PTI CPU: 0 PID: 1 Comm: systemd Not tainted 4.19.0-preempt+ #410 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS ?-20180531_142017-buildhw-08.phx2.fed4 RIP: 0010:page_counter_try_charge+0x22/0xc0 Code: 41 5d c3 c3 0f 1f 40 00 0f 1f 44 00 00 48 85 ff 0f 84 a7 00 00 00 41 56 48 89 f8 49 89 fe 49 Call Trace: try_charge+0xcb/0x780 memcg_kmem_charge_memcg+0x28/0x80 memcg_kmem_charge+0x8b/0x1d0 copy_process.part.41+0x1ca/0x2070 _do_fork+0xd7/0x3d0 do_syscall_64+0x5a/0x180 entry_SYSCALL_64_after_hwframe+0x49/0xbe The problem occurs because get_mem_cgroup_from_current() returns the NULL pointer if memory controller is disabled. Let's check if this is a case at the beginning of memcg_kmem_charge() and just return 0 if mem_cgroup_disabled() returns true. This is how we handle this case in many other places in the memory controller code. Link: http://lkml.kernel.org/r/20181029215123.17830-1-guro@fb.com Fixes: 9b6f7e163cd0 ("mm: rework memcg kernel stack accounting") Signed-off-by: Roman Gushchin Reported-by: Mike Galbraith Acked-by: Rik van Riel Acked-by: Michal Hocko Cc: Johannes Weiner Cc: Vladimir Davydov Cc: Shakeel Butt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f393808dc64149ccd0e5a8427505ba2974a59854 Author: Vasily Khoruzhick Date: Thu Oct 25 12:15:43 2018 -0700 netfilter: conntrack: fix calculation of next bucket number in early_drop If there's no entry to drop in bucket that corresponds to the hash, early_drop() should look for it in other buckets. But since it increments hash instead of bucket number, it actually looks in the same bucket 8 times: hsize is 16k by default (14 bits) and hash is 32-bit value, so reciprocal_scale(hash, hsize) returns the same value for hash..hash+7 in most cases. Fix it by increasing bucket number instead of hash and rename _hash to bucket to avoid future confusion. Fixes: 3e86638e9a0b ("netfilter: conntrack: consider ct netns in early_drop logic") Cc: # v4.7+ Signed-off-by: Vasily Khoruzhick Signed-off-by: Pablo Neira Ayuso commit e4844c9c62a0fe47980d6c3d4b7a096a5d755925 Author: Florian Westphal Date: Fri Nov 2 11:33:37 2018 +0100 netfilter: nft_compat: ebtables 'nat' table is normal chain type Unlike ip(6)tables, the ebtables nat table has no special properties. This bug causes 'ebtables -A' to fail when using a target such as 'snat' (ebt_snat target sets ".table = "nat"'). Targets that have no table restrictions work fine. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 8866df9264a34e675b4ee8a151db819b87cce2d3 Author: Pablo Neira Ayuso Date: Fri Nov 2 00:14:00 2018 +0100 netfilter: nfnetlink_cttimeout: pass default timeout policy to obj_to_nlattr Otherwise, we hit a NULL pointer deference since handlers always assume default timeout policy is passed. netlink: 24 bytes leftover after parsing attributes in process `syz-executor2'. kasan: CONFIG_KASAN_INLINE enabled kasan: GPF could be caused by NULL-ptr deref or user memory access general protection fault: 0000 [#1] PREEMPT SMP KASAN CPU: 0 PID: 9575 Comm: syz-executor1 Not tainted 4.19.0+ #312 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:icmp_timeout_obj_to_nlattr+0x77/0x170 net/netfilter/nf_conntrack_proto_icmp.c:297 Fixes: c779e849608a ("netfilter: conntrack: remove get_timeout() indirection") Reported-by: Eric Dumazet Signed-off-by: Pablo Neira Ayuso commit a95a7774d51e13f9cf4b7285666829b68852f07a Author: Pablo Neira Ayuso Date: Fri Nov 2 00:11:34 2018 +0100 netfilter: conntrack: add nf_{tcp,udp,sctp,icmp,dccp,icmpv6,generic}_pernet() Expose these functions to access conntrack protocol tracker netns area, nfnetlink_cttimeout needs this. Signed-off-by: Pablo Neira Ayuso commit 8a02bdd50b2ecb6d62121d2958d3ea186cc88ce7 Author: Jozsef Kadlecsik Date: Tue Oct 30 22:43:42 2018 +0100 netfilter: ipset: Fix calling ip_set() macro at dumping The ip_set() macro is called when either ip_set_ref_lock held only or no lock/nfnl mutex is held at dumping. Take this into account properly. Also, use Pablo's suggestion to use rcu_dereference_raw(), the ref_netlink protects the set. Signed-off-by: Jozsef Kadlecsik Signed-off-by: Pablo Neira Ayuso commit 54451f60c8fa061af9051a53be9786393947367c Author: Taehee Yoo Date: Sun Oct 21 00:00:08 2018 +0900 netfilter: xt_IDLETIMER: add sysfs filename checking routine When IDLETIMER rule is added, sysfs file is created under /sys/class/xt_idletimer/timers/ But some label name shouldn't be used. ".", "..", "power", "uevent", "subsystem", etc... So that sysfs filename checking routine is needed. test commands: %iptables -I INPUT -j IDLETIMER --timeout 1 --label "power" splat looks like: [95765.423132] sysfs: cannot create duplicate filename '/devices/virtual/xt_idletimer/timers/power' [95765.433418] CPU: 0 PID: 8446 Comm: iptables Not tainted 4.19.0-rc6+ #20 [95765.449755] Call Trace: [95765.449755] dump_stack+0xc9/0x16b [95765.449755] ? show_regs_print_info+0x5/0x5 [95765.449755] sysfs_warn_dup+0x74/0x90 [95765.449755] sysfs_add_file_mode_ns+0x352/0x500 [95765.449755] sysfs_create_file_ns+0x179/0x270 [95765.449755] ? sysfs_add_file_mode_ns+0x500/0x500 [95765.449755] ? idletimer_tg_checkentry+0x3e5/0xb1b [xt_IDLETIMER] [95765.449755] ? rcu_read_lock_sched_held+0x114/0x130 [95765.449755] ? __kmalloc_track_caller+0x211/0x2b0 [95765.449755] ? memcpy+0x34/0x50 [95765.449755] idletimer_tg_checkentry+0x4e2/0xb1b [xt_IDLETIMER] [ ... ] Fixes: 0902b469bd25 ("netfilter: xtables: idletimer target implementation") Signed-off-by: Taehee Yoo Signed-off-by: Pablo Neira Ayuso commit 17b8b74c0f8dbf9b9e3301f9ca5b65dd1c079951 Author: Jozsef Kadlecsik Date: Fri Oct 19 19:35:19 2018 +0200 netfilter: ipset: Correct rcu_dereference() call in ip_set_put_comment() The function is called when rcu_read_lock() is held and not when rcu_read_lock_bh() is held. Signed-off-by: Jozsef Kadlecsik Signed-off-by: Pablo Neira Ayuso commit fe5192ac81ad0d4dfe1395d11f393f0513c15f7f Author: Martin Kelly Date: Sun Oct 28 20:18:53 2018 -0700 iio:st_magn: Fix enable device after trigger Currently, we enable the device before we enable the device trigger. At high frequencies, this can cause interrupts that don't yet have a poll function associated with them and are thus treated as spurious. At high frequencies with level interrupts, this can even cause an interrupt storm of repeated spurious interrupts (~100,000 on my Beagleboard with the LSM9DS1 magnetometer). If these repeat too much, the interrupt will get disabled and the device will stop functioning. To prevent these problems, enable the device prior to enabling the device trigger, and disable the divec prior to disabling the trigger. This means there's no window of time during which the device creates interrupts but we have no trigger to answer them. Fixes: 90efe055629 ("iio: st_sensors: harden interrupt handling") Signed-off-by: Martin Kelly Tested-by: Denis Ciocca Cc: Signed-off-by: Jonathan Cameron commit cd26ea6d50a207ee37e0364ecc2d196d6c9671e8 Author: Arnaldo Carvalho de Melo Date: Sat Nov 3 08:19:56 2018 -0300 perf trace: Fix setting of augmented payload when using eBPF + raw_syscalls For now with BPF raw_augmented we hook into raw_syscalls:sys_enter and there we get all 6 syscall args plus the tracepoint common fields (sizeof(long)) and the syscall_nr (another long). So we check if that is the case and if so don't look after the sc->args_size, but always after the full raw_syscalls:sys_enter payload, which is fixed. We'll revisit this later to pass s->args_size to the BPF augmenter (now tools/perf/examples/bpf/augmented_raw_syscalls.c, so that it copies only what we need for each syscall, like what happens when we use syscalls:sys_enter_NAME, so that we reduce the kernel/userspace traffic to just what is needed for each syscall. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-nlslrg8apxdsobt4pwl3n7ur@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 265ad0632fef0fac447894b26fcf91562fbb0e30 Merge: c7e86acfcee3 7cb6a2a2c72c Author: David S. Miller Date: Sat Nov 3 00:03:40 2018 -0700 Merge branch 'net-timeout-fixes-for-GENET-and-SYSTEMPORT' Florian Fainelli says: ==================== net: timeout fixes for GENET and SYSTEMPORT This patch series fixes occasional transmit timeout around the time the system goes into suspend. GENET and SYSTEMPORT have nearly the same logic in that regard and were both affected in the same way. Please queue up for stable, thanks! ==================== Signed-off-by: David S. Miller commit 7cb6a2a2c72c1ed8f42fb01f1a661281b568dead Author: Florian Fainelli Date: Thu Nov 1 15:55:38 2018 -0700 net: systemport: Protect stop from timeout A timing hazard exists when the network interface is stopped that allows a watchdog timeout to be processed by a separate core in parallel. This creates the potential for the timeout handler to wake the queues while the driver is shutting down, or access registers after their clocks have been removed. The more common case is that the watchdog timeout will produce a warning message which doesn't lead to a crash. The chances of this are greatly increased by the fact that bcm_sysport_netif_stop stops the transmit queues which can easily precipitate a watchdog time- out because of stale trans_start data in the queues. This commit corrects the behavior by ensuring that the watchdog timeout is disabled before enterring bcm_sysport_netif_stop. There are currently only two users of the bcm_sysport_netif_stop function: close and suspend. The close case already handles the issue by exiting the RUNNING state before invoking the driver close service. The suspend case now performs the netif_device_detach to exit the PRESENT state before the call to bcm_sysport_netif_stop rather than after it. These behaviors prevent any future scheduling of the driver timeout service during the window. The netif_tx_stop_all_queues function in bcm_sysport_netif_stop is replaced with netif_tx_disable to ensure synchronization with any transmit or timeout threads that may already be executing on other cores. For symmetry, the netif_device_attach call upon resume is moved to after the call to bcm_sysport_netif_start. Since it wakes the transmit queues it is not necessary to invoke netif_tx_start_all_queues from bcm_sysport_netif_start so it is moved into the driver open service. Fixes: 40755a0fce17 ("net: systemport: add suspend and resume support") Fixes: 80105befdb4b ("net: systemport: add Broadcom SYSTEMPORT Ethernet MAC driver") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller commit 09e805d2570a3a94f13dd9c9ad2bcab23da76e09 Author: Doug Berger Date: Thu Nov 1 15:55:37 2018 -0700 net: bcmgenet: protect stop from timeout A timing hazard exists when the network interface is stopped that allows a watchdog timeout to be processed by a separate core in parallel. This creates the potential for the timeout handler to wake the queues while the driver is shutting down, or access registers after their clocks have been removed. The more common case is that the watchdog timeout will produce a warning message which doesn't lead to a crash. The chances of this are greatly increased by the fact that bcmgenet_netif_stop stops the transmit queues which can easily precipitate a watchdog time- out because of stale trans_start data in the queues. This commit corrects the behavior by ensuring that the watchdog timeout is disabled before enterring bcmgenet_netif_stop. There are currently only two users of the bcmgenet_netif_stop function: close and suspend. The close case already handles the issue by exiting the RUNNING state before invoking the driver close service. The suspend case now performs the netif_device_detach to exit the PRESENT state before the call to bcmgenet_netif_stop rather than after it. These behaviors prevent any future scheduling of the driver timeout service during the window. The netif_tx_stop_all_queues function in bcmgenet_netif_stop is replaced with netif_tx_disable to ensure synchronization with any transmit or timeout threads that may already be executing on other cores. For symmetry, the netif_device_attach call upon resume is moved to after the call to bcmgenet_netif_start. Since it wakes the transmit queues it is not necessary to invoke netif_tx_start_all_queues from bcmgenet_netif_start so it is moved into the driver open service. Fixes: 1c1008c793fa ("net: bcmgenet: add main driver file") Signed-off-by: Doug Berger Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller commit c7e86acfcee30794dc99a0759924bf7b9d43f1ca Author: David Howells Date: Thu Nov 1 13:39:53 2018 +0000 rxrpc: Fix lockup due to no error backoff after ack transmit error If the network becomes (partially) unavailable, say by disabling IPv6, the background ACK transmission routine can get itself into a tizzy by proposing immediate ACK retransmission. Since we're in the call event processor, that happens immediately without returning to the workqueue manager. The condition should clear after a while when either the network comes back or the call times out. Fix this by: (1) When re-proposing an ACK on failed Tx, don't schedule it immediately. This will allow a certain amount of time to elapse before we try again. (2) Enforce a return to the workqueue manager after a certain number of iterations of the call processing loop. (3) Add a backoff delay that increases the delay on deferred ACKs by a jiffy per failed transmission to a limit of HZ. The backoff delay is cleared on a successful return from kernel_sendmsg(). (4) Cancel calls immediately if the opening sendmsg fails. The layer above can arrange retransmission or rotate to another server. Fixes: 248f219cb8bc ("rxrpc: Rewrite the data and ack handling code") Signed-off-by: David Howells Signed-off-by: David S. Miller commit 284fb78ed7572117846f8e1d1d8e3dbfd16880c2 Author: Tristram Ha Date: Fri Nov 2 19:23:41 2018 -0700 net: dsa: microchip: initialize mutex before use Initialize mutex before use. Avoid kernel complaint when CONFIG_DEBUG_LOCK_ALLOC is enabled. Fixes: b987e98e50ab90e5 ("dsa: add DSA switch driver for Microchip KSZ9477") Signed-off-by: Tristram Ha Reviewed-by: Pavel Machek Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 2384d02520ff2a916169b2fd85ea50e923ed56c2 Author: Jeff Barnhill <0xeffeff@gmail.com> Date: Fri Nov 2 20:23:57 2018 +0000 net/ipv6: Add anycast addresses to a global hashtable icmp6_send() function is expensive on systems with a large number of interfaces. Every time it’s called, it has to verify that the source address does not correspond to an existing anycast address by looping through every device and every anycast address on the device. This can result in significant delays for a CPU when there are a large number of neighbors and ND timers are frequently timing out and calling neigh_invalidate(). Add anycast addresses to a global hashtable to allow quick searching for matching anycast addresses. This is based on inet6_addr_lst in addrconf.c. Signed-off-by: Jeff Barnhill <0xeffeff@gmail.com> Signed-off-by: David S. Miller commit 7b900ead6cc66b2ee873cb042dfba169aa68b56c Author: Frieder Schrempf Date: Wed Oct 31 22:52:19 2018 +0100 usbnet: smsc95xx: disable carrier check while suspending We need to make sure, that the carrier check polling is disabled while suspending. Otherwise we can end up with usbnet_read_cmd() being issued when only usbnet_read_cmd_nopm() is allowed. If this happens, read operations lock up. Fixes: d69d169493 ("usbnet: smsc95xx: fix link detection for disabled autonegotiation") Signed-off-by: Frieder Schrempf Reviewed-by: Raghuram Chary J Signed-off-by: David S. Miller commit 49682bfa1e0e448a711471a5db83be0df1fb39a2 Author: Mathieu Malaterre Date: Wed Oct 31 13:16:58 2018 +0100 net: document skb parameter in function 'skb_gso_size_check' Remove kernel-doc warning: net/core/skbuff.c:4953: warning: Function parameter or member 'skb' not described in 'skb_gso_size_check' Signed-off-by: Mathieu Malaterre Signed-off-by: David S. Miller commit 8008cc78d3d6f5191ffcb2b85a423d516000e7f4 Merge: 00a6a845c0b6 ab6ead7d07ca Author: Olof Johansson Date: Fri Nov 2 22:31:40 2018 -0700 Merge tag 'omap-for-v4.20/omap1-fix-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into fixes Fix for omap1 ams-delta irq We need to use IRQ_NOTCONNECTED instead of -EINVAL for ams_delta_modem_ports irq. * tag 'omap-for-v4.20/omap1-fix-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: OMAP1: ams-delta: Fix impossible .irq < 0 Signed-off-by: Olof Johansson commit 00a6a845c0b66e7ffb9adb6b3a9ce2ae97a0c172 Author: Alexandre Torgue Date: Thu Sep 20 18:34:17 2018 +0200 ARM: dts: stm32: update HASH1 dmas property on stm32mp157c Remove unused parameter from HASH1 dmas property on stm32mp157c SoC. Fixes: 1e726a40e067 ("ARM: dts: stm32: Add HASH support on stm32mp157c") Signed-off-by: Alexandre Torgue [Olof: Bug doesn't cause any harm, so shouldn't need stable backport] Signed-off-by: Olof Johansson commit d4f79cb872bd4faa44eb133c1aee5f3411342c54 Author: Arnd Bergmann Date: Fri Oct 5 18:15:49 2018 +0200 ARM: orion: avoid VLA in orion_mpp_conf Testing randconfig builds found an instance of a VLA that was missed when determining that we have removed them all: arch/arm/plat-orion/mpp.c: In function 'orion_mpp_conf': arch/arm/plat-orion/mpp.c:31:2: error: ISO C90 forbids variable length array 'mpp_ctrl' [-Werror=vla] This one is fairly straightforward: we know what all three callers are, and the maximum length is not very long. Fixes: 68664695ae57 ("Makefile: Globally enable VLA warning") Signed-off-by: Arnd Bergmann Reviewed-by: Andrew Lunn Reviewed-by: Kees Cook Signed-off-by: Olof Johansson commit 2cbfdf4df58330f6cb493500387427dae1c5551d Author: Marc Zyngier Date: Fri Nov 2 17:16:51 2018 +0000 iov_iter: Fix 9p virtio breakage When switching to the new iovec accessors, a negation got subtly dropped, leading to 9p being remarkably broken (here with kvmtool): [ 7.430941] VFS: Mounted root (9p filesystem) on device 0:15. [ 7.432080] devtmpfs: mounted [ 7.432717] Freeing unused kernel memory: 1344K [ 7.433658] Run /virt/init as init process Warning: unable to translate guest address 0x7e00902ff000 to host Warning: unable to translate guest address 0x7e00902fefc0 to host Warning: unable to translate guest address 0x7e00902ff000 to host Warning: unable to translate guest address 0x7e008febef80 to host Warning: unable to translate guest address 0x7e008febf000 to host Warning: unable to translate guest address 0x7e008febef00 to host Warning: unable to translate guest address 0x7e008febf000 to host [ 7.436376] Kernel panic - not syncing: Requested init /virt/init failed (error -8). [ 7.437554] CPU: 29 PID: 1 Comm: swapper/0 Not tainted 4.19.0-rc8-02267-g00e23707442a #291 [ 7.439006] Hardware name: linux,dummy-virt (DT) [ 7.439902] Call trace: [ 7.440387] dump_backtrace+0x0/0x148 [ 7.441104] show_stack+0x14/0x20 [ 7.441768] dump_stack+0x90/0xb4 [ 7.442425] panic+0x120/0x27c [ 7.443036] kernel_init+0xa4/0x100 [ 7.443725] ret_from_fork+0x10/0x18 [ 7.444444] SMP: stopping secondary CPUs [ 7.445391] Kernel Offset: disabled [ 7.446169] CPU features: 0x0,23000438 [ 7.446974] Memory Limit: none [ 7.447645] ---[ end Kernel panic - not syncing: Requested init /virt/init failed (error -8). ]--- Restoring the missing "!" brings the guest back to life. Fixes: 00e23707442a ("iov_iter: Use accessor function") Reported-by: Will Deacon Signed-off-by: Marc Zyngier Signed-off-by: Al Viro commit bff9a1076adfb787036ced707fc28cfa578aee99 Merge: 291d0e5d81e1 ab1e77c3f590 Author: Thomas Gleixner Date: Fri Nov 2 21:58:39 2018 +0100 Merge branch 'clockevents/4.20-rc1' of https://git.linaro.org/people/daniel.lezcano/linux into timers/urgent Pull clockevent update from Daniel Lezcano: - Add the per cpu timer for the c-sky architecture (Guo Ren) - Add the global timer for the c-sky architecture (Guo Ren) commit 28c2fae726bf5003cd209b0d5910a642af98316f Author: Daniel Borkmann Date: Fri Nov 2 11:35:46 2018 +0100 bpf: fix bpf_prog_get_info_by_fd to return 0 func_lens for unpriv While dbecd7388476 ("bpf: get kernel symbol addresses via syscall") zeroed info.nr_jited_ksyms in bpf_prog_get_info_by_fd() for queries from unprivileged users, commit 815581c11cc2 ("bpf: get JITed image lengths of functions via syscall") forgot about doing so and therefore returns the #elems of the user set up buffer which is incorrect. It also needs to indicate a info.nr_jited_func_lens of zero. Fixes: 815581c11cc2 ("bpf: get JITed image lengths of functions via syscall") Signed-off-by: Daniel Borkmann Cc: Sandipan Das Cc: Song Liu Signed-off-by: Alexei Starovoitov commit b0970f235f1ff68a49fd36fdbd8a80dd92bb7b04 Merge: 7de414a9dd91 ff1889fc531f Author: Daniel Borkmann Date: Fri Nov 2 21:39:02 2018 +0100 Merge branch 'bpf-accurate-prog-addr' Song Liu says: ==================== Changes v1 -> v2: 1. Added main program length to bpf_prog_info->jited_fun_lens (3/3). 2. Updated commit message of 1/3 and 2/3 with more background about the address masking, and why it is still save after the changes. 3. Replace "ulong" with "unsigned long". This set improves bpf program address showed in /proc/kallsyms and in bpf_prog_info. First, real program address is showed instead of page address. Second, when there is no subprogram, bpf_prog_info->jited_ksyms and bpf_prog_info->jited_fun_lens returns the main prog address and length. ==================== Acked-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann commit ff1889fc531f582f902175c0acc80321af540b24 Author: Song Liu Date: Fri Nov 2 10:16:17 2018 -0700 bpf: show main program address and length in bpf_prog_info Currently, when there is no subprog (prog->aux->func_cnt == 0), bpf_prog_info does not return any jited_ksyms or jited_func_lens. This patch adds main program address (prog->bpf_func) and main program length (prog->jited_len) to bpf_prog_info. Signed-off-by: Song Liu Signed-off-by: Daniel Borkmann commit de57e99ceb65d0d7775cc14a8ba5931d7de1d708 Author: Song Liu Date: Fri Nov 2 10:16:16 2018 -0700 bpf: show real jited address in bpf_prog_info->jited_ksyms Currently, jited_ksyms in bpf_prog_info shows page addresses of jited bpf program. The main reason here is to not expose randomized start address. However, this is not ideal for detailed profiling (find hot instructions from stack traces). This patch replaces the page address with real prog start address. This change is OK because bpf_prog_get_info_by_fd() is only available to root. Signed-off-by: Song Liu Signed-off-by: Daniel Borkmann commit df0734702a7cbba49d6765bd5ba069340bf9c5db Author: Song Liu Date: Fri Nov 2 10:16:15 2018 -0700 bpf: show real jited prog address in /proc/kallsyms Currently, /proc/kallsyms shows page address of jited bpf program. The main reason here is to not expose randomized start address. However, This is not ideal for detailed profiling (find hot instructions from stack traces). This patch replaces the page address with real prog start address. This change is OK because these addresses are still protected by sysctl kptr_restrict (see kallsyms_show_value()), and only programs loaded by root are added to kallsyms (see bpf_prog_kallsyms_add()). Signed-off-by: Song Liu Signed-off-by: Daniel Borkmann commit b98e26df07549d4649ac5b8f24c49f5c722bbc7e Author: Steve French Date: Thu Nov 1 10:54:32 2018 -0500 cifs: fix signed/unsigned mismatch on aio_read patch The patch "CIFS: Add support for direct I/O read" had a signed/unsigned mismatch (ssize_t vs. size_t) in the return from one function. Similar trivial change in aio_write Signed-off-by: Long Li Signed-off-by: Steve French Reported-by: Julia Lawall commit 8c6c9bed8773375b1d54ccca2911ec892c59db5d Author: Colin Ian King Date: Thu Nov 1 13:14:30 2018 +0000 cifs: don't dereference smb_file_target before null check There is a null check on dst_file->private data which suggests it can be potentially null. However, before this check, pointer smb_file_target is derived from dst_file->private and dereferenced in the call to tlink_tcon, hence there is a potential null pointer deference. Fix this by assigning smb_file_target and target_tcon after the null pointer sanity checks. Detected by CoverityScan, CID#1475302 ("Dereference before null check") Fixes: 04b38d601239 ("vfs: pull btrfs clone API to vfs layer") Signed-off-by: Colin Ian King Signed-off-by: Steve French commit be4eb68846dc4450a9a4998d7c16d9f4955f9988 Author: Long Li Date: Wed Oct 31 22:13:11 2018 +0000 CIFS: Add direct I/O functions to file_operations With direct read/write functions implemented, add them to file_operations. Dircet I/O is used under two conditions: 1. When mounting with "cache=none", CIFS uses direct I/O for all user file data transfer. 2. When opening a file with O_DIRECT, CIFS uses direct I/O for all data transfer on this file. Signed-off-by: Long Li Signed-off-by: Steve French Reviewed-by: Ronnie Sahlberg commit 8c5f9c1ab7cb45f6584ce312b14fb310a8fa28f3 Author: Long Li Date: Wed Oct 31 22:13:10 2018 +0000 CIFS: Add support for direct I/O write With direct I/O write, user supplied buffers are pinned to the memory and data are transferred directly from user buffers to the transport layer. Change in v3: add support for kernel AIO Change in v4: Refactor common write code to __cifs_writev for direct and non-direct I/O. Retry on direct I/O failure. Signed-off-by: Long Li Signed-off-by: Steve French commit 6e6e2b86c29c6fcfa16ad9fdc7ea32027bea5d73 Author: Long Li Date: Wed Oct 31 22:13:09 2018 +0000 CIFS: Add support for direct I/O read With direct I/O read, we transfer the data directly from transport layer to the user data buffer. Change in v3: add support for kernel AIO Change in v4: Refactor common read code to __cifs_readv for direct and non-direct I/O. Retry on direct I/O failure. Signed-off-by: Long Li Signed-off-by: Steve French commit 0df444a00f32a3ab4d37c3c101bb960ee38a9617 Author: Steve French Date: Wed Oct 31 11:24:33 2018 -0500 smb3: missing defines and structs for reparse point handling We were missing some structs from MS-FSCC relating to reparse point handling. Add them to protocol defines in smb2pdu.h Signed-off-by: Steve French Reviewed-by: Aurelien Aptel commit dfe33f9abc08997e56f9bdf14fe9ac7ac0e14075 Author: Steve French Date: Tue Oct 30 19:50:31 2018 -0500 smb3: allow more detailed protocol info on open files for debugging In order to debug complex problems it is often helpful to have detailed information on the client and server view of the open file information. Add the ability for root to view the list of smb3 open files and dump the persistent handle and other info so that it can be more easily correlated with server logs. Sample output from "cat /proc/fs/cifs/open_files" # Version:1 # Format: # 0x5 0x800000378 0x8000 1 7704 0 some-file 0x14 0xcb903c0c 0x84412e67 0x8000 1 7754 1001 rofile 0x1a6d 0xcb903c0c 0x9526b767 0x8000 1 7720 1000 file 0x1a5b 0xcb903c0c 0x9ce41a21 0x8000 1 7715 0 smallfile 0xd67 Signed-off-by: Steve French Reviewed-by: Ronnie Sahlberg commit 926674de6705f0f1dbf29a62fd758d0977f535d6 Author: Steve French Date: Sun Oct 28 13:13:23 2018 -0500 smb3: on kerberos mount if server doesn't specify auth type use krb5 Some servers (e.g. Azure) do not include a spnego blob in the SMB3 negotiate protocol response, so on kerberos mounts ("sec=krb5") we can fail, as we expected the server to list its supported auth types (OIDs in the spnego blob in the negprot response). Change this so that on krb5 mounts we default to trying krb5 if the server doesn't list its supported protocol mechanisms. Signed-off-by: Steve French Reviewed-by: Ronnie Sahlberg CC: Stable commit f8af49dd1702118e9520f946ce1cf591d553608f Author: Steve French Date: Sun Oct 28 00:47:11 2018 -0500 smb3: add trace point for tree connection In debugging certain scenarios, especially reconnect cases, it can be helpful to have a dynamic trace point for the result of tree connect. See sample output below from a reconnect event. The new event is 'smb3_tcon' TASK-PID CPU# |||| TIMESTAMP FUNCTION | | | |||| | | cifsd-6071 [001] .... 2659.897923: smb3_reconnect: server=localhost current_mid=0xa kworker/1:1-71 [001] .... 2666.026342: smb3_cmd_done: sid=0x0 tid=0x0 cmd=0 mid=0 kworker/1:1-71 [001] .... 2666.026576: smb3_cmd_err: sid=0xc49e1787 tid=0x0 cmd=1 mid=1 status=0xc0000016 rc=-5 kworker/1:1-71 [001] .... 2666.031677: smb3_cmd_done: sid=0xc49e1787 tid=0x0 cmd=1 mid=2 kworker/1:1-71 [001] .... 2666.031921: smb3_cmd_done: sid=0xc49e1787 tid=0x6e78f05f cmd=3 mid=3 kworker/1:1-71 [001] .... 2666.031923: smb3_tcon: xid=0 sid=0xc49e1787 tid=0x0 unc_name=\\localhost\test rc=0 kworker/1:1-71 [001] .... 2666.032097: smb3_cmd_done: sid=0xc49e1787 tid=0x6e78f05f cmd=11 mid=4 kworker/1:1-71 [001] .... 2666.032265: smb3_cmd_done: sid=0xc49e1787 tid=0x7912332f cmd=3 mid=5 kworker/1:1-71 [001] .... 2666.032266: smb3_tcon: xid=0 sid=0xc49e1787 tid=0x0 unc_name=\\localhost\IPC$ rc=0 kworker/1:1-71 [001] .... 2666.032386: smb3_cmd_done: sid=0xc49e1787 tid=0x7912332f cmd=11 mid=6 Signed-off-by: Steve French Reviewed-by: Ronnie Sahlberg commit 413d61008131c8ea22312164ba498075ce2fccc8 Author: Colin Ian King Date: Fri Oct 26 19:07:21 2018 +0100 cifs: 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: Steve French commit 0c5d6cb6643f48ad3775322f3ebab6c7eb67484e Author: Ronnie Sahlberg Date: Thu Oct 25 15:43:36 2018 +1000 cifs: fix return value for cifs_listxattr If the application buffer was too small to fit all the names we would still count the number of bytes and return this for listxattr. This would then trigger a BUG in usercopy.c Fix the computation of the size so that we return -ERANGE correctly when the buffer is too small. This fixes the kernel BUG for xfstest generic/377 Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French Reviewed-by: Aurelien Aptel commit ab1e77c3f590536b2659c097980efe6e8f713921 Author: Guo Ren Date: Sat Nov 3 00:51:31 2018 +0800 dt-bindings: timer: gx6605s SOC timer Dt-bindings doc for gx6605s SOC's system timer. Signed-off-by: Guo Ren Reviewed-by: Rob Herring Signed-off-by: Daniel Lezcano commit 33745c3cc588d9d5e18d6fd88709002158dddd5e Author: Guo Ren Date: Sat Nov 3 00:51:30 2018 +0800 clocksource/drivers/c-sky: Add gx6605s SOC system timer The driver is for gx6605s SOC system timer and there are two same timers in gx6605s. We use one for clkevt and another one for clksrc. The timer is mmio map to access, so we need give mmio address in dts. The counter at 0x0 offset is clock event. The counter at 0x40 offset is clock source. Signed-off-by: Guo Ren Cc: Daniel Lezcano Cc: Thomas Gleixner Signed-off-by: Daniel Lezcano commit 732e5dca374d764bd9711c8c121b0e18ff92985e Author: Guo Ren Date: Sat Nov 3 00:51:29 2018 +0800 dt-bindings: timer: C-SKY Multi-processor timer Dt-bingdings doc for C-SKY SMP system setting. Signed-off-by: Guo Ren Reviewed-by: Rob Herring Signed-off-by: Daniel Lezcano commit a7ad38b0dd3c1ba8d6e5a55241e875e9db8331ab Author: Guo Ren Date: Sat Nov 3 00:51:28 2018 +0800 clocksource/drivers/c-sky: Add C-SKY SMP timer The driver is for C-SKY SMP timer. It only supports oneshot event and 32bit overflow for clocksource. Per cpu core has one timer and all timers share one clock-counter-input from the same clocksource. This use mfcr&mtcr instructions to access the regs. Signed-off-by: Guo Ren Cc: Daniel Lezcano Cc: Thomas Gleixner Signed-off-by: Daniel Lezcano commit 513eb98595522bc0cb83831a9daee1d5738e66f1 Author: Linus Walleij Date: Fri Oct 19 11:24:26 2018 +0200 ARM: defconfig: Update multi_v7 to use PREEMPT Using CONFIG_PREEMPT as preemption model for ARMv7 systems appear to be the most reasonable default. Signed-off-by: Linus Walleij Signed-off-by: Olof Johansson commit 7f3d08f5255b964827214e69967b4d5008d6ea18 Author: John Garry Date: Fri Oct 19 00:17:07 2018 +0800 arm64: defconfig: Enable some IPMI configs The arm64 port now runs on servers which use IPMI. This patch enables relevant core configs to save manually enabling them when testing mainline. Signed-off-by: John Garry [olof: Switched to =m instead of =y] Signed-off-by: Olof Johansson commit f62717551b2b7d72fc2a3975539117d350bad84d Author: Christoph Hellwig Date: Tue Oct 30 09:41:29 2018 +0200 arm64: fix warnings without CONFIG_IOMMU_DMA __swiotlb_get_sgtable_page and __swiotlb_mmap_pfn are not only misnamed but also only used if CONFIG_IOMMU_DMA is set. Just add a simple ifdef for now, given that we plan to remove them entirely for the next merge window. Reported-by: Florian Fainelli Signed-off-by: Christoph Hellwig Tested-by: Will Deacon Acked-by: Catalin Marinas commit 5f21585384a4a69b8bfdd2cae7e3648ae805f57d Merge: fcc37f76a995 9fe5c59ff6a1 Author: Linus Torvalds Date: Fri Nov 2 11:25:48 2018 -0700 Merge tag 'for-linus-20181102' of git://git.kernel.dk/linux-block Pull block layer fixes from Jens Axboe: "The biggest part of this pull request is the revert of the blkcg cleanup series. It had one fix earlier for a stacked device issue, but another one was reported. Rather than play whack-a-mole with this, revert the entire series and try again for the next kernel release. Apart from that, only small fixes/changes. Summary: - Indentation fixup for mtip32xx (Colin Ian King) - The blkcg cleanup series revert (Dennis Zhou) - Two NVMe fixes. One fixing a regression in the nvme request initialization in this merge window, causing nvme-fc to not work. The other is a suspend/resume p2p resource issue (James, Keith) - Fix sg discard merge, allowing us to merge in cases where we didn't before (Jianchao Wang) - Call rq_qos_exit() after the queue is frozen, preventing a hang (Ming) - Fix brd queue setup, fixing an oops if we fail setting up all devices (Ming)" * tag 'for-linus-20181102' of git://git.kernel.dk/linux-block: nvme-pci: fix conflicting p2p resource adds nvme-fc: fix request private initialization blkcg: revert blkcg cleanups series block: brd: associate with queue until adding disk block: call rq_qos_exit() after queue is frozen mtip32xx: clean an indentation issue, remove extraneous tabs block: fix the DISCARD request merge commit fcc37f76a995cc08546b88b83f9bb5da11307a0b Merge: 0b21f21ae0d7 2153bbc12f77 Author: Linus Torvalds Date: Fri Nov 2 11:22:45 2018 -0700 Merge tag 'pwm/for-4.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm Pull pwm updates from Thierry Reding: "This series contains a number of improvements to existing drivers, such as LPSS. Some drivers, such as renesas-tpu and rcar get support for more SoC generations. To round things off this fixes an issue with the sysfs interface" * tag 'pwm/for-4.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm: pwm: lpss: Only set update bit if we are actually changing the settings pwm: lpss: Force runtime-resume on suspend on Cherry Trail pwm: Enable TI ECAP driver for ARCH_K3 dt-bindings: pwm: tiecap: Add TI AM654 SoC specific compatible dt-bindings: pwm: rcar: Add r8a774a1 support pwm: Send a uevent on the pwmchip device upon channel sysfs (un)export Revert "pwm: Set class for exported channels in sysfs" dt-bindings: pwm: renesas-tpu: Document r8a7744 support dt-bindings: pwm: rcar: Add r8a7744 support dt-bindings: pwm: renesas: tpu: Document R8A779{7|8}0 bindings dt-bindings: pwm: renesas: pwm-rcar: Document R8A779{7|8}0 bindings dt-bindings: pwm: renesas: tpu: Fix "compatible" prop description pwm: Use SPDX identifier for Renesas drivers pwm: lpss: Add get_state callback pwm: lpss: Release runtime-pm reference from the driver's remove callback pwm: lpss: Check PWM powerstate after resume on Cherry Trail devices pwm: lpss: Move struct pwm_lpss_chip definition to the header file pwm: lpss: Add ACPI HID for second PWM controller on Cherry Trail devices ACPI / PM: Export acpi_device_get_power() for use by modular build drivers pwm: tegra: Remove gratuituous blank line commit 832ad0e3da4510fd17f98804abe512ea9a747035 Author: Marc Zyngier Date: Wed Oct 31 08:41:34 2018 +0000 soc: ti: QMSS: Fix usage of irq_set_affinity_hint The Keystone QMSS driver is pretty damaged, in the sense that it does things like this: irq_set_affinity_hint(irq, to_cpumask(&cpu_map)); where cpu_map is a local variable. As we leave the function, this will point to nowhere-land, and things will end-up badly. Instead, let's use a proper cpumask that gets allocated, giving the driver a chance to actually work with things like irqbalance as well as have a hypothetical 64bit future. Cc: stable@vger.kernel.org Acked-by: Santosh Shilimkar Signed-off-by: Marc Zyngier Signed-off-by: Olof Johansson commit 0b21f21ae0d746b385a827aceb84cb26c551eb94 Merge: 54480aa7fac3 a324e9396ca3 Author: Linus Torvalds Date: Fri Nov 2 11:17:22 2018 -0700 Merge tag 'edac_for_4.20_2' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp Pull more EDAC updates from Borislav Petkov: "The second part of the EDAC pile which contains the ADXL user and a build fix which addresses a not-so-sensical .config but fixes randconfig builds people do: - skx_edac: Address translation for NVDIMMs (Tony Luck and Qiuxu Zhuo) - ACPI_ADXL build fix" [ I don't think "sensical" is a word, particularly when used in the context of actually meaning "nonsensical", but I like it - Linus ] * tag 'edac_for_4.20_2' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp: EDAC, skx: Fix randconfig builds EDAC, skx_edac: Add address translation for non-volatile DIMMs commit 966866892cf89d606544bca22d584ba2ef9ec208 Author: Anders Roxell Date: Tue Oct 30 12:38:50 2018 +0100 arm64: kprobe: make page to RO mode when allocate it Commit 1404d6f13e47 ("arm64: dump: Add checking for writable and exectuable pages") has successfully identified code that leaves a page with W+X permissions. [ 3.245140] arm64/mm: Found insecure W+X mapping at address (____ptrval____)/0xffff000000d90000 [ 3.245771] WARNING: CPU: 0 PID: 1 at ../arch/arm64/mm/dump.c:232 note_page+0x410/0x420 [ 3.246141] Modules linked in: [ 3.246653] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.19.0-rc5-next-20180928-00001-ge70ae259b853-dirty #62 [ 3.247008] Hardware name: linux,dummy-virt (DT) [ 3.247347] pstate: 80000005 (Nzcv daif -PAN -UAO) [ 3.247623] pc : note_page+0x410/0x420 [ 3.247898] lr : note_page+0x410/0x420 [ 3.248071] sp : ffff00000804bcd0 [ 3.248254] x29: ffff00000804bcd0 x28: ffff000009274000 [ 3.248578] x27: ffff00000921a000 x26: ffff80007dfff000 [ 3.248845] x25: ffff0000093f5000 x24: ffff000009526f6a [ 3.249109] x23: 0000000000000004 x22: ffff000000d91000 [ 3.249396] x21: ffff000000d90000 x20: 0000000000000000 [ 3.249661] x19: ffff00000804bde8 x18: 0000000000000400 [ 3.249924] x17: 0000000000000000 x16: 0000000000000000 [ 3.250271] x15: ffffffffffffffff x14: 295f5f5f5f6c6176 [ 3.250594] x13: 7274705f5f5f5f28 x12: 2073736572646461 [ 3.250941] x11: 20746120676e6970 x10: 70616d20582b5720 [ 3.251252] x9 : 6572756365736e69 x8 : 3039643030303030 [ 3.251519] x7 : 306666666678302f x6 : ffff0000095467b2 [ 3.251802] x5 : 0000000000000000 x4 : 0000000000000000 [ 3.252060] x3 : 0000000000000000 x2 : ffffffffffffffff [ 3.252323] x1 : 4d151327adc50b00 x0 : 0000000000000000 [ 3.252664] Call trace: [ 3.252953] note_page+0x410/0x420 [ 3.253186] walk_pgd+0x12c/0x238 [ 3.253417] ptdump_check_wx+0x68/0xf8 [ 3.253637] mark_rodata_ro+0x68/0x98 [ 3.253847] kernel_init+0x38/0x160 [ 3.254103] ret_from_fork+0x10/0x18 kprobes allocates a writable executable page with module_alloc() in order to store executable code. Reworked to that when allocate a page it sets mode RO. Inspired by commit 63fef14fc98a ("kprobes/x86: Make insn buffer always ROX and use text_poke()"). Suggested-by: Arnd Bergmann Suggested-by: Ard Biesheuvel Acked-by: Will Deacon Acked-by: Masami Hiramatsu Reviewed-by: Laura Abbott Signed-off-by: Anders Roxell [catalin.marinas@arm.com: removed unnecessary casts] Signed-off-by: Catalin Marinas commit 54480aa7fac324c1c50519e69287cf49aa2f3afc Merge: bc6080ae38b3 826b5de90c0b Author: Linus Torvalds Date: Fri Nov 2 11:02:52 2018 -0700 Merge tag 'sound-fix-4.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "A few device-specific fixes: a fix for SPDIF on old Creative PCI board, and two additional fixes for the recent changes in FireWire audio stack" * tag 'sound-fix-4.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: firewire-lib: fix insufficient PCM rule for period/buffer size ALSA: ca0106: Disable IZD on SB0570 DAC to fix audio pops ALSA: dice: fix to wait for releases of all ALSA character devices commit bc6080ae38b3b0c6e8166f8561e993298095f7be Merge: d81f50bd3464 f9885ef875e9 Author: Linus Torvalds Date: Fri Nov 2 10:58:20 2018 -0700 Merge tag 'drm-next-2018-11-02' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "Pretty much a normal fixes pull pre-rc1, mostly amdgpu fixes, one i915 link training regression fix, and a couple of minor panel/bridge fixes and a panel quirk" * tag 'drm-next-2018-11-02' of git://anongit.freedesktop.org/drm/drm: (37 commits) drm/amdgpu: revert "enable gfxoff in non-sriov and stutter mode by default" drm/amd/pp: Print warning if od_sclk/mclk out of range drm/amd/pp: Fix pp_sclk/mclk_od not work on Vega10 drm/amd/pp: Fix pp_sclk/mclk_od not work on smu7 drm/amd/powerplay: no MGPU fan boost enablement on DPM disabled drm/amdgpu: Fix skipping hangged job reset during gpu recover. drm/amd/powerplay: revise Vega20 pptable version check drm/amd/display: set backlight level limit to 1 drm/panel: simple: Innolux TV123WAM is actually P120ZDG-BF1 dt-bindings: drm/panel: simple: Innolux TV123WAM is actually P120ZDG-BF1 drm/bridge: ti-sn65dsi86: Remove the mystery delay drm/panel: simple: Add "no-hpd" delay for Innolux TV123WAM drm/panel: simple: Support panels with HPD where HPD isn't connected dt-bindings: drm/panel: simple: Add no-hpd property drm/edid: Add 6 bpc quirk for BOE panel. drm/amdgpu: fix reporting of failed msg sent to SMU (v2) drm/amdgpu: Fix compute ring 1.0.0 failure after reset drm/amdgpu: fix VM leaf walking drm/amdgpu: fix amdgpu_vm_fini drm/amd/powerplay: commonize the API for retrieving current clocks ... commit 5900e02b5b8cac1792c790ac2c6adb695d530fda Author: Yangtao Li Date: Fri Nov 2 08:36:19 2018 -0400 arm64: kdump: fix small typo This brings the kernel doc in line with the function signature. Signed-off-by: Yangtao Li Signed-off-by: Catalin Marinas commit 98356eb0ae499c63e78073ccedd9a5fc5c563288 Author: Victor Kamensky Date: Tue Oct 30 16:37:10 2018 -0700 arm64: makefile fix build of .i file in external module case After 'a66649dab350 arm64: fix vdso-offsets.h dependency' if one will try to build .i file in case of external kernel module, build fails complaining that prepare0 target is missing. This issue came up with SystemTap when it tries to build variety of .i files for its own generated kernel modules trying to figure given kernel features/capabilities. The issue is that prepare0 is defined in top level Makefile only if KBUILD_EXTMOD is not defined. .i file rule depends on prepare and in case KBUILD_EXTMOD defined top level Makefile contains empty rule for prepare. But after mentioned commit arch/arm64/Makefile would introduce dependency on prepare0 through its own prepare target. Fix it to put proper ifdef KBUILD_EXTMOD around code introduced by mentioned commit. It matches what top level Makefile does. Acked-by: Kevin Brodsky Signed-off-by: Victor Kamensky Signed-off-by: Catalin Marinas commit d81f50bd34646d8373b989e55180c0fc9af94e0b Merge: c2aa1a444cab 566f52ece7bd Author: Linus Torvalds Date: Fri Nov 2 10:04:26 2018 -0700 Merge tag 'apparmor-pr-2018-11-01' of git://git.kernel.org/pub/scm/linux/kernel/git/jj/linux-apparmor Pull apparmor updates from John Johansen: "Features/Improvements: - replace spin_is_locked() with lockdep - add base support for secmark labeling and matching Cleanups: - clean an indentation issue, remove extraneous space - remove no-op permission check in policy_unpack - fix checkpatch missing spaces error in Parse secmark policy - fix network performance issue in aa_label_sk_perm Bug fixes: - add #ifdef checks for secmark filtering - fix an error code in __aa_create_ns() - don't try to replace stale label in ptrace checks - fix failure to audit context info in build_change_hat - check buffer bounds when mapping permissions mask - fully initialize aa_perms struct when answering userspace query - fix uninitialized value in aa_split_fqname" * tag 'apparmor-pr-2018-11-01' of git://git.kernel.org/pub/scm/linux/kernel/git/jj/linux-apparmor: apparmor: clean an indentation issue, remove extraneous space apparmor: fix checkpatch error in Parse secmark policy apparmor: add #ifdef checks for secmark filtering apparmor: Fix uninitialized value in aa_split_fqname apparmor: don't try to replace stale label in ptraceme check apparmor: Replace spin_is_locked() with lockdep apparmor: Allow filtering based on secmark policy apparmor: Parse secmark policy apparmor: Add a wildcard secid apparmor: don't try to replace stale label in ptrace access check apparmor: Fix network performance issue in aa_label_sk_perm commit c2aa1a444cab2c673650ada80a7dffc4345ce2e6 Merge: b69f9e17a57a bf4a1fcf0bc1 Author: Linus Torvalds Date: Fri Nov 2 09:33:08 2018 -0700 Merge tag 'xfs-4.20-merge-2' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull vfs dedup fixes from Dave Chinner: "This reworks the vfs data cloning infrastructure. We discovered many issues with these interfaces late in the 4.19 cycle - the worst of them (data corruption, setuid stripping) were fixed for XFS in 4.19-rc8, but a larger rework of the infrastructure fixing all the problems was needed. That rework is the contents of this pull request. Rework the vfs_clone_file_range and vfs_dedupe_file_range infrastructure to use a common .remap_file_range method and supply generic bounds and sanity checking functions that are shared with the data write path. The current VFS infrastructure has problems with rlimit, LFS file sizes, file time stamps, maximum filesystem file sizes, stripping setuid bits, etc and so they are addressed in these commits. We also introduce the ability for the ->remap_file_range methods to return short clones so that clones for vfs_copy_file_range() don't get rejected if the entire range can't be cloned. It also allows filesystems to sliently skip deduplication of partial EOF blocks if they are not capable of doing so without requiring errors to be thrown to userspace. Existing filesystems are converted to user the new remap_file_range method, and both XFS and ocfs2 are modified to make use of the new generic checking infrastructure" * tag 'xfs-4.20-merge-2' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: (28 commits) xfs: remove [cm]time update from reflink calls xfs: remove xfs_reflink_remap_range xfs: remove redundant remap partial EOF block checks xfs: support returning partial reflink results xfs: clean up xfs_reflink_remap_blocks call site xfs: fix pagecache truncation prior to reflink ocfs2: remove ocfs2_reflink_remap_range ocfs2: support partial clone range and dedupe range ocfs2: fix pagecache truncation prior to reflink ocfs2: truncate page cache for clone destination file before remapping vfs: clean up generic_remap_file_range_prep return value vfs: hide file range comparison function vfs: enable remap callers that can handle short operations vfs: plumb remap flags through the vfs dedupe functions vfs: plumb remap flags through the vfs clone functions vfs: make remap_file_range functions take and return bytes completed vfs: remap helper should update destination inode metadata vfs: pass remap flags to generic_remap_checks vfs: pass remap flags to generic_remap_file_range_prep vfs: combine the clone and dedupe into a single remap_file_range ... commit b69f9e17a57a50bc34d88975afce4425086e525d Merge: 63c6e188f639 1936f094e164 Author: Linus Torvalds Date: Fri Nov 2 09:19:35 2018 -0700 Merge tag 'powerpc-4.20-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: "Some things that I missed due to travel, or that came in late. Two fixes also going to stable: - A revert of a buggy change to the 8xx TLB miss handlers. - Our flushing of SPE (Signal Processing Engine) registers on fork was broken. Other changes: - A change to the KVM decrementer emulation to use proper APIs. - Some cleanups to the way we do code patching in the 8xx code. - Expose the maximum possible memory for the system in /proc/powerpc/lparcfg. - Merge some updates from Scott: "a couple device tree updates, and a fix for a missing prototype warning" A few other minor fixes and a handful of fixes for our selftests. Thanks to: Aravinda Prasad, Breno Leitao, Camelia Groza, Christophe Leroy, Felipe Rechia, Joel Stanley, Naveen N. Rao, Paul Mackerras, Scott Wood, Tyrel Datwyler" * tag 'powerpc-4.20-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (21 commits) selftests/powerpc: Fix compilation issue due to asm label selftests/powerpc/cache_shape: Fix out-of-tree build selftests/powerpc/switch_endian: Fix out-of-tree build selftests/powerpc/pmu: Link ebb tests with -no-pie selftests/powerpc/signal: Fix out-of-tree build selftests/powerpc/ptrace: Fix out-of-tree build powerpc/xmon: Relax frame size for clang selftests: powerpc: Fix warning for security subdir selftests/powerpc: Relax L1d miss targets for rfi_flush test powerpc/process: Fix flush_all_to_thread for SPE powerpc/pseries: add missing cpumask.h include file selftests/powerpc: Fix ptrace tm failure KVM: PPC: Use exported tb_to_ns() function in decrementer emulation powerpc/pseries: Export maximum memory value powerpc/8xx: Use patch_site for perf counters setup powerpc/8xx: Use patch_site for memory setup patching powerpc/code-patching: Add a helper to get the address of a patch_site Revert "powerpc/8xx: Use L1 entry APG to handle _PAGE_ACCESSED for CONFIG_SWAP" powerpc/8xx: add missing header in 8xx_mmu.c powerpc/8xx: Add DT node for using the SEC engine of the MPC885 ... commit f9005571701920551bcf54a500973fb61f2e1eda Author: Stefano Stabellini Date: Wed Oct 31 16:11:49 2018 -0700 CONFIG_XEN_PV breaks xen_create_contiguous_region on ARM xen_create_contiguous_region has now only an implementation if CONFIG_XEN_PV is defined. However, on ARM we never set CONFIG_XEN_PV but we do have an implementation of xen_create_contiguous_region which is required for swiotlb-xen to work correctly (although it just sets *dma_handle). Cc: # 4.12 Fixes: 16624390816c ("xen: create xen_create/destroy_contiguous_region() stubs for PVHVM only builds") Signed-off-by: Stefano Stabellini Reviewed-by: Juergen Gross CC: Jeff.Kubascik@dornerworks.com CC: Jarvis.Roach@dornerworks.com CC: Nathan.Studer@dornerworks.com CC: vkuznets@redhat.com CC: boris.ostrovsky@oracle.com CC: jgross@suse.com CC: julien.grall@arm.com Signed-off-by: Juergen Gross commit 63c6e188f639b5828bf744e675270bb5e2adc139 Merge: 8adcc59974b8 ba1f0d955769 Author: Linus Torvalds Date: Fri Nov 2 09:17:39 2018 -0700 Merge tag 'riscv-for-linus-4.20-mw3' of git://git.kernel.org/pub/scm/linux/kernel/git/palmer/riscv-linux Pull RISC-V defconfig update from Palmer Dabbelt: "Sorry for the last minute patches, but it was suggested we try to push this in before rc1 to make it easier for people to keep their branch rebases sane" * tag 'riscv-for-linus-4.20-mw3' of git://git.kernel.org/pub/scm/linux/kernel/git/palmer/riscv-linux: RISC-V: refresh defconfig commit 9fe5c59ff6a1e5e26a39b75489a1420e7eaaf0b1 Author: Keith Busch Date: Wed Oct 31 13:15:29 2018 -0600 nvme-pci: fix conflicting p2p resource adds The nvme pci driver had been adding its CMB resource to the P2P DMA subsystem everytime on on a controller reset. This results in the following warning: ------------[ cut here ]------------ nvme 0000:00:03.0: Conflicting mapping in same section WARNING: CPU: 7 PID: 81 at kernel/memremap.c:155 devm_memremap_pages+0xa6/0x380 ... Call Trace: pci_p2pdma_add_resource+0x153/0x370 nvme_reset_work+0x28c/0x17b1 [nvme] ? add_timer+0x107/0x1e0 ? dequeue_entity+0x81/0x660 ? dequeue_entity+0x3b0/0x660 ? pick_next_task_fair+0xaf/0x610 ? __switch_to+0xbc/0x410 process_one_work+0x1cf/0x350 worker_thread+0x215/0x3d0 ? process_one_work+0x350/0x350 kthread+0x107/0x120 ? kthread_park+0x80/0x80 ret_from_fork+0x1f/0x30 ---[ end trace f7ea76ac6ee72727 ]--- nvme nvme0: failed to register the CMB This patch fixes this by registering the CMB with P2P only once. Signed-off-by: Keith Busch Reviewed-by: Logan Gunthorpe Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit d19b8bc82fc232d17ec45ca148388e4ba05ac4b9 Author: James Smart Date: Sat Oct 27 12:41:54 2018 -0700 nvme-fc: fix request private initialization The patch made to avoid Coverity reporting of out of bounds access on aen_op moved the assignment of a pointer, leaving it null when it was subsequently used to calculate a private pointer. Thus the private pointer was bad. Move/correct the private pointer initialization to be in sync with the patch. Fixes: 0d2bdf9f4134 ("nvme-fc: rework the request initialization code") Signed-off-by: James Smart Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 995167420797c000bff1f0787ab2390ffa1a9784 Author: Masahiro Yamada Date: Tue Oct 30 22:26:34 2018 +0900 kbuild: remove cc-name variable There is one more user of $(cc-name) in the top Makefile. It is supposed to detect Clang before invoking Kconfig, so it should still be there in the $(shell ...) form. All the other users of $(cc-name) have been replaced with $(CONFIG_CC_IS_CLANG). Hence, scripts/Kbuild.include does not need to define cc-name any more. Signed-off-by: Masahiro Yamada commit 076f421da5d4594d0a3e60c032ccf02ba55e868a Author: Masahiro Yamada Date: Tue Oct 30 22:26:33 2018 +0900 kbuild: replace cc-name test with CONFIG_CC_IS_CLANG Evaluating cc-name invokes the compiler every time even when you are not compiling anything, like 'make help'. This is not efficient. The compiler type has been already detected in the Kconfig stage. Use CONFIG_CC_IS_CLANG, instead. Signed-off-by: Masahiro Yamada Acked-by: Michael Ellerman (powerpc) Acked-by: Paul Burton (MIPS) Acked-by: Joel Stanley commit dafb7f9aef2fd44991ff1691721ff765a23be27b Author: Mauro Carvalho Chehab Date: Fri Nov 2 06:36:32 2018 -0400 v4l2-controls: add a missing include As warned by "make headers_check", the definition for the linux-specific integer types is missing: ./usr/include/linux/v4l2-controls.h:1105: found __[us]{8,16,32,64} type without #include Fixes: c27bb30e7b6d ("media: v4l: Add definitions for MPEG-2 slice format and metadata") Reported-by: Linus Torvalds Reported-by: Stephen Rothwell Signed-off-by: Mauro Carvalho Chehab commit a541f0ebcc08ed8bc0cc492eec9a86cb280a9f24 Author: Justin M. Forbes Date: Wed Oct 31 13:02:03 2018 -0500 s390/mm: Fix ERROR: "__node_distance" undefined! Fixes: ERROR: "__node_distance" [drivers/nvme/host/nvme-core.ko] undefined! make[1]: *** [scripts/Makefile.modpost:92: __modpost] Error 1 make: *** [Makefile:1275: modules] Error 2 + exit 1 Signed-off-by: Justin M. Forbes Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky commit 9fed920e6817218ad786c3f28e14b4c877cc2aed Author: Vasily Gorbik Date: Fri Oct 26 15:29:59 2018 +0200 s390/kasan: increase instrumented stack size to 64k Increase kasan instrumented kernel stack size from 32k to 64k. Other architectures seems to get away with just doubling kernel stack size under kasan, but on s390 this appears to be not enough due to bigger frame size. The particular pain point is kasan inlined checks (CONFIG_KASAN_INLINE vs CONFIG_KASAN_OUTLINE). With inlined checks one particular case hitting stack overflow is fs sync on xfs filesystem: #0 [9a0681e8] 704 bytes check_usage at 34b1fc #1 [9a0684a8] 432 bytes check_usage at 34c710 #2 [9a068658] 1048 bytes validate_chain at 35044a #3 [9a068a70] 312 bytes __lock_acquire at 3559fe #4 [9a068ba8] 440 bytes lock_acquire at 3576ee #5 [9a068d60] 104 bytes _raw_spin_lock at 21b44e0 #6 [9a068dc8] 1992 bytes enqueue_entity at 2dbf72 #7 [9a069590] 1496 bytes enqueue_task_fair at 2df5f0 #8 [9a069b68] 64 bytes ttwu_do_activate at 28f438 #9 [9a069ba8] 552 bytes try_to_wake_up at 298c4c #10 [9a069dd0] 168 bytes wake_up_worker at 23f97c #11 [9a069e78] 200 bytes insert_work at 23fc2e #12 [9a069f40] 648 bytes __queue_work at 2487c0 #13 [9a06a1c8] 200 bytes __queue_delayed_work at 24db28 #14 [9a06a290] 248 bytes mod_delayed_work_on at 24de84 #15 [9a06a388] 24 bytes kblockd_mod_delayed_work_on at 153e2a0 #16 [9a06a3a0] 288 bytes __blk_mq_delay_run_hw_queue at 158168c #17 [9a06a4c0] 192 bytes blk_mq_run_hw_queue at 1581a3c #18 [9a06a580] 184 bytes blk_mq_sched_insert_requests at 15a2192 #19 [9a06a638] 1024 bytes blk_mq_flush_plug_list at 1590f3a #20 [9a06aa38] 704 bytes blk_flush_plug_list at 1555028 #21 [9a06acf8] 320 bytes schedule at 219e476 #22 [9a06ae38] 760 bytes schedule_timeout at 21b0aac #23 [9a06b130] 408 bytes wait_for_common at 21a1706 #24 [9a06b2c8] 360 bytes xfs_buf_iowait at fa1540 #25 [9a06b430] 256 bytes __xfs_buf_submit at fadae6 #26 [9a06b530] 264 bytes xfs_buf_read_map at fae3f6 #27 [9a06b638] 656 bytes xfs_trans_read_buf_map at 10ac9a8 #28 [9a06b8c8] 304 bytes xfs_btree_kill_root at e72426 #29 [9a06b9f8] 288 bytes xfs_btree_lookup_get_block at e7bc5e #30 [9a06bb18] 624 bytes xfs_btree_lookup at e7e1a6 #31 [9a06bd88] 2664 bytes xfs_alloc_ag_vextent_near at dfa070 #32 [9a06c7f0] 144 bytes xfs_alloc_ag_vextent at dff3ca #33 [9a06c880] 1128 bytes xfs_alloc_vextent at e05fce #34 [9a06cce8] 584 bytes xfs_bmap_btalloc at e58342 #35 [9a06cf30] 1336 bytes xfs_bmapi_write at e618de #36 [9a06d468] 776 bytes xfs_iomap_write_allocate at ff678e #37 [9a06d770] 720 bytes xfs_map_blocks at f82af8 #38 [9a06da40] 928 bytes xfs_writepage_map at f83cd6 #39 [9a06dde0] 320 bytes xfs_do_writepage at f85872 #40 [9a06df20] 1320 bytes write_cache_pages at 73dfe8 #41 [9a06e448] 208 bytes xfs_vm_writepages at f7f892 #42 [9a06e518] 88 bytes do_writepages at 73fe6a #43 [9a06e570] 872 bytes __writeback_single_inode at a20cb6 #44 [9a06e8d8] 664 bytes writeback_sb_inodes at a23be2 #45 [9a06eb70] 296 bytes __writeback_inodes_wb at a242e0 #46 [9a06ec98] 928 bytes wb_writeback at a2500e #47 [9a06f038] 848 bytes wb_do_writeback at a260ae #48 [9a06f388] 536 bytes wb_workfn at a28228 #49 [9a06f5a0] 1088 bytes process_one_work at 24a234 #50 [9a06f9e0] 1120 bytes worker_thread at 24ba26 #51 [9a06fe40] 104 bytes kthread at 26545a #52 [9a06fea8] kernel_thread_starter at 21b6b62 To be able to increase the stack size to 64k reuse LLILL instruction in __switch_to function to load 64k - STACK_FRAME_OVERHEAD - __PT_SIZE (65192) value as unsigned. Reported-by: Benjamin Block Reviewed-by: Heiko Carstens Signed-off-by: Vasily Gorbik Signed-off-by: Martin Schwidefsky commit c43e1c5a801fdde1aad0a2f9ed948753b5275d56 Author: Thomas Richter Date: Thu Oct 25 09:04:05 2018 +0100 s390/cpum_sf: Rework attribute definition for diagnostic sampling Previously, the attribute entry for diagnostic sampling was added if authorized. Otherwise, the array of struct attribute contains two NULL values. Change this logic and reserve space for the attribute for diagnostic sampling. If diagnostic sampling is authorized, add an entry in the respective position in the array of struct attribute. Signed-off-by: Thomas Richter Reviewed-by: Hendrik Brueckner Suggested-by: Heiko Carstens Signed-off-by: Martin Schwidefsky commit e12e4044aede97974f2222eb7f0ed726a5179a32 Author: Martin Schwidefsky Date: Mon Oct 15 11:09:16 2018 +0200 s390/mm: fix mis-accounting of pgtable_bytes In case a fork or a clone system fails in copy_process and the error handling does the mmput() at the bad_fork_cleanup_mm label, the following warning messages will appear on the console: BUG: non-zero pgtables_bytes on freeing mm: 16384 The reason for that is the tricks we play with mm_inc_nr_puds() and mm_inc_nr_pmds() in init_new_context(). A normal 64-bit process has 3 levels of page table, the p4d level and the pud level are folded. On process termination the free_pud_range() function in mm/memory.c will subtract 16KB from pgtable_bytes with a mm_dec_nr_puds() call, but there actually is not really a pud table. One issue with this is the fact that pgtable_bytes is usually off by a few kilobytes, but the more severe problem is that for a failed fork or clone the free_pgtables() function is not called. In this case there is no mm_dec_nr_puds() or mm_dec_nr_pmds() that go together with the mm_inc_nr_puds() and mm_inc_nr_pmds in init_new_context(). The pgtable_bytes will be off by 16384 or 32768 bytes and we get the BUG message. The message itself is purely cosmetic, but annoying. To fix this override the mm_pmd_folded, mm_pud_folded and mm_p4d_folded function to check for the true size of the address space. Reported-by: Li Wang Tested-by: Li Wang Signed-off-by: Martin Schwidefsky commit 6d212db11947ae5464e4717536ed9faf61c01e86 Author: Martin Schwidefsky Date: Mon Oct 15 10:30:23 2018 +0200 mm: add mm_pxd_folded checks to pgtable_bytes accounting functions The common mm code calls mm_dec_nr_pmds() and mm_dec_nr_puds() in free_pgtables() if the address range spans a full pud or pmd. If mm_dec_nr_puds/mm_dec_nr_pmds are non-empty due to configuration settings they blindly subtract the size of the pmd or pud table from pgtable_bytes even if the pud or pmd page table layer is folded. Add explicit mm_[pmd|pud]_folded checks to the four pgtable_bytes accounting functions mm_inc_nr_puds, mm_inc_nr_pmds, mm_dec_nr_puds and mm_dec_nr_pmds. As the check for folded page tables can be overwritten by the architecture, this allows to keep a correct pgtable_bytes value for platforms that use a dynamic number of page table levels. Acked-by: Kirill A. Shutemov Signed-off-by: Martin Schwidefsky commit 1071fc5779d9846fec56a4ff6089ab08cac1ab72 Author: Martin Schwidefsky Date: Mon Oct 15 10:25:57 2018 +0200 mm: introduce mm_[p4d|pud|pmd]_folded Add three architecture overrideable functions to test if the p4d, pud, or pmd layer of a page table is folded or not. Acked-by: Kirill A. Shutemov Signed-off-by: Martin Schwidefsky commit a8874e7e8a8896f2b6c641f4b8e2473eafd35204 Author: Martin Schwidefsky Date: Wed Oct 31 12:11:48 2018 +0100 mm: make the __PAGETABLE_PxD_FOLDED defines non-empty Change the currently empty defines for __PAGETABLE_PMD_FOLDED, __PAGETABLE_PUD_FOLDED and __PAGETABLE_P4D_FOLDED to return 1. This makes it possible to use __is_defined() to test if the preprocessor define exists. Acked-by: Kirill A. Shutemov Signed-off-by: Martin Schwidefsky commit 566f52ece7bd1099d20dfe2f6f0801896643cf8f Author: Colin Ian King Date: Tue Oct 30 14:11:31 2018 +0000 apparmor: 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: John Johansen commit 76af016e65e74023a11b2710e18a98b68b86e3cd Author: John Johansen Date: Thu Nov 1 22:28:17 2018 -0700 apparmor: fix checkpatch error in Parse secmark policy Fix missed spacing error reported by checkpatch for 9caafbe2b4cf ("Parse secmark policy") Signed-off-by: John Johansen commit f9885ef875e9160454392f85159163674159c51f Merge: 43e0f873b2f2 f9776280c29e Author: Dave Airlie Date: Fri Nov 2 15:17:56 2018 +1000 Merge tag 'drm-intel-next-fixes-2018-10-25' of git://anongit.freedesktop.org/drm/drm-intel into drm-next - Fix to avoid link retraining workaround on eDP (the other is a comment change) Signed-off-by: Dave Airlie From: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20181025131836.GA2296@jlahtine-desk.ger.corp.intel.com commit 8adcc59974b8a65b7eac7d503364837c297139bc Merge: 9931a07d518e 3642b29a6367 Author: Linus Torvalds Date: Thu Nov 1 20:19:49 2018 -0700 Merge branch 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull misc vfs updates from Al Viro: "No common topic, really - a handful of assorted stuff; the least trivial bits are Mark's dedupe patches" * 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: fs/exofs: only use true/false for asignment of bool type variable fs/exofs: fix potential memory leak in mount option parsing Delete invalid assignment statements in do_sendfile iomap: remove duplicated include from iomap.c vfs: dedupe should return EPERM if permission is not granted vfs: allow dedupe of user owned read-only files ntfs: don't open-code ERR_CAST ext4: don't open-code ERR_CAST commit 9931a07d518e86eb58a75e508ed9626f86359303 Merge: e468f5c06b5e 0e9b4a827102 Author: Linus Torvalds Date: Thu Nov 1 19:58:52 2018 -0700 Merge branch 'work.afs' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull AFS updates from Al Viro: "AFS series, with some iov_iter bits included" * 'work.afs' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (26 commits) missing bits of "iov_iter: Separate type from direction and use accessor functions" afs: Probe multiple fileservers simultaneously afs: Fix callback handling afs: Eliminate the address pointer from the address list cursor afs: Allow dumping of server cursor on operation failure afs: Implement YFS support in the fs client afs: Expand data structure fields to support YFS afs: Get the target vnode in afs_rmdir() and get a callback on it afs: Calc callback expiry in op reply delivery afs: Fix FS.FetchStatus delivery from updating wrong vnode afs: Implement the YFS cache manager service afs: Remove callback details from afs_callback_break struct afs: Commit the status on a new file/dir/symlink afs: Increase to 64-bit volume ID and 96-bit vnode ID for YFS afs: Don't invoke the server to read data beyond EOF afs: Add a couple of tracepoints to log I/O errors afs: Handle EIO from delivery function afs: Fix TTL on VL server and address lists afs: Implement VL server rotation afs: Improve FS server rotation error handling ... commit 43e0f873b2f2226f454930172f8090819d380f5a Merge: 52b50ae1af8a 9d064be1e6a1 Author: Dave Airlie Date: Fri Nov 2 12:56:24 2018 +1000 Merge branch 'drm-next-4.20' of git://people.freedesktop.org/~agd5f/linux into drm-next - Fix flickering at low backlight levels on some systems - Fix some overclocking regressions - Vega20 updates for - GPU recovery fixes - Disable gfxoff on RV as some sbios/fw combinations are not stable yet Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20181101151939.2828-1-alexander.deucher@amd.com commit 52b50ae1af8a9672792c55b23471a3488dec7229 Merge: f2bfc71aee75 8f054b6f53ff Author: Dave Airlie Date: Fri Nov 2 11:53:48 2018 +1000 Merge tag 'drm-misc-next-fixes-2018-10-31' of git://anongit.freedesktop.org/drm/drm-misc into drm-next - Properly label Innolux TV123WAM as P120ZDG-BF1 (Doug) - Add optional delay for panels without hpd hooked up (which solves the mystery delay for TI SN65DSI86 bridge) (Doug) - Another 6bpc quirk for BOE panel 0x0771 (Shawn) Cc: Doug Anderson Cc: Lee, Shawn C Signed-off-by: Dave Airlie From: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20181031201944.GA262020@art_vandelay commit b5f2954d30c77649bce9c27e7a0a94299d9cfdf8 Author: Dennis Zhou Date: Thu Nov 1 17:24:10 2018 -0400 blkcg: revert blkcg cleanups series This reverts a series committed earlier due to null pointer exception bug report in [1]. It seems there are edge case interactions that I did not consider and will need some time to understand what causes the adverse interactions. The original series can be found in [2] with a follow up series in [3]. [1] https://www.spinics.net/lists/cgroups/msg20719.html [2] https://lore.kernel.org/lkml/20180911184137.35897-1-dennisszhou@gmail.com/ [3] https://lore.kernel.org/lkml/20181020185612.51587-1-dennis@kernel.org/ This reverts the following commits: d459d853c2ed, b2c3fa546705, 101246ec02b5, b3b9f24f5fcc, e2b0989954ae, f0fcb3ec89f3, c839e7a03f92, bdc2491708c4, 74b7c02a9bc1, 5bf9a1f3b4ef, a7b39b4e961c, 07b05bcc3213, 49f4c2dc2b50, 27e6fa996c53 Signed-off-by: Dennis Zhou Signed-off-by: Jens Axboe commit 153fcd5f6d93b8e1e4040b1337f564a10f8d93af Author: Ming Lei Date: Fri Nov 2 08:50:51 2018 +0800 block: brd: associate with queue until adding disk brd_free() may be called in failure path on one brd instance which disk isn't added yet, so release handler of gendisk may free the associated request_queue early and causes the following use-after-free[1]. This patch fixes this issue by associating gendisk with request_queue just before adding disk. [1] KASAN: use-after-free Read in del_timer_syncNon-volatile memory driver v1.3 Linux agpgart interface v0.103 [drm] Initialized vgem 1.0.0 20120112 for virtual device on minor 0 usbcore: registered new interface driver udl ================================================================== BUG: KASAN: use-after-free in __lock_acquire+0x36d9/0x4c20 kernel/locking/lockdep.c:3218 Read of size 8 at addr ffff8801d1b6b540 by task swapper/0/1 CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.19.0+ #88 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+0x244/0x39d lib/dump_stack.c:113 print_address_description.cold.7+0x9/0x1ff mm/kasan/report.c:256 kasan_report_error mm/kasan/report.c:354 [inline] kasan_report.cold.8+0x242/0x309 mm/kasan/report.c:412 __asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:433 __lock_acquire+0x36d9/0x4c20 kernel/locking/lockdep.c:3218 lock_acquire+0x1ed/0x520 kernel/locking/lockdep.c:3844 del_timer_sync+0xb7/0x270 kernel/time/timer.c:1283 blk_cleanup_queue+0x413/0x710 block/blk-core.c:809 brd_free+0x5d/0x71 drivers/block/brd.c:422 brd_init+0x2eb/0x393 drivers/block/brd.c:518 do_one_initcall+0x145/0x957 init/main.c:890 do_initcall_level init/main.c:958 [inline] do_initcalls init/main.c:966 [inline] do_basic_setup init/main.c:984 [inline] kernel_init_freeable+0x5c6/0x6b9 init/main.c:1148 kernel_init+0x11/0x1ae init/main.c:1068 ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:350 Reported-by: syzbot+3701447012fe951dabb2@syzkaller.appspotmail.com Signed-off-by: Ming Lei Signed-off-by: Jens Axboe commit e468f5c06b5ebef3f6f3c187e51aa6daab667e57 Merge: baa888d25ea6 1ff2fea5e30c Author: Linus Torvalds Date: Thu Nov 1 18:34:46 2018 -0700 Merge tag 'compiler-attributes-for-linus-4.20-rc1' of https://github.com/ojeda/linux Pull compiler attribute updates from Miguel Ojeda: "This is an effort to disentangle the include/linux/compiler*.h headers and bring them up to date. The main idea behind the series is to use feature checking macros (i.e. __has_attribute) instead of compiler version checks (e.g. GCC_VERSION), which are compiler-agnostic (so they can be shared, reducing the size of compiler-specific headers) and version-agnostic. Other related improvements have been performed in the headers as well, which on top of the use of __has_attribute it has amounted to a significant simplification of these headers (e.g. GCC_VERSION is now only guarding a few non-attribute macros). This series should also help the efforts to support compiling the kernel with clang and icc. A fair amount of documentation and comments have also been added, clarified or removed; and the headers are now more readable, which should help kernel developers in general. The series was triggered due to the move to gcc >= 4.6. In turn, this series has also triggered Sparse to gain the ability to recognize __has_attribute on its own. Finally, the __nonstring variable attribute series has been also applied on top; plus two related patches from Nick Desaulniers for unreachable() that came a bit afterwards" * tag 'compiler-attributes-for-linus-4.20-rc1' of https://github.com/ojeda/linux: compiler-gcc: remove comment about gcc 4.5 from unreachable() compiler.h: update definition of unreachable() Compiler Attributes: ext4: remove local __nonstring definition Compiler Attributes: auxdisplay: panel: use __nonstring Compiler Attributes: enable -Wstringop-truncation on W=1 (gcc >= 8) Compiler Attributes: add support for __nonstring (gcc >= 8) Compiler Attributes: add MAINTAINERS entry Compiler Attributes: add Doc/process/programming-language.rst Compiler Attributes: remove uses of __attribute__ from compiler.h Compiler Attributes: KENTRY used twice the "used" attribute Compiler Attributes: use feature checks instead of version checks Compiler Attributes: add missing SPDX ID in compiler_types.h Compiler Attributes: remove unneeded sparse (__CHECKER__) tests Compiler Attributes: homogenize __must_be_array Compiler Attributes: remove unneeded tests Compiler Attributes: always use the extra-underscores syntax Compiler Attributes: remove unused attributes commit ba1f0d95576902c10930d3467e638bac38f942f1 Author: Anup Patel Date: Thu Nov 1 10:40:32 2018 +0530 RISC-V: refresh defconfig This patch updates defconfig using savedefconfig on Linux-4.19. It is intended to have no functional change. Signed-off-by: Anup Patel Reviewed-by: Palmer Dabbelt Signed-off-by: Palmer Dabbelt commit baa888d25ea64d0c59344d474284ca99cfdd449a Merge: 7260935d71b6 64ae16dfeefe Author: Linus Torvalds Date: Thu Nov 1 15:23:59 2018 -0700 Merge branch 'next-keys2' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security Pull keys updates from James Morris: "Provide five new operations in the key_type struct that can be used to provide access to asymmetric key operations. These will be implemented for the asymmetric key type in a later patch and may refer to a key retained in RAM by the kernel or a key retained in crypto hardware. int (*asym_query)(const struct kernel_pkey_params *params, struct kernel_pkey_query *info); int (*asym_eds_op)(struct kernel_pkey_params *params, const void *in, void *out); int (*asym_verify_signature)(struct kernel_pkey_params *params, const void *in, const void *in2); Since encrypt, decrypt and sign are identical in their interfaces, they're rolled together in the asym_eds_op() operation and there's an operation ID in the params argument to distinguish them. Verify is different in that we supply the data and the signature instead and get an error value (or 0) as the only result on the expectation that this may well be how a hardware crypto device may work" * 'next-keys2' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: (22 commits) KEYS: asym_tpm: Add support for the sign operation [ver #2] KEYS: asym_tpm: Implement tpm_sign [ver #2] KEYS: asym_tpm: Implement signature verification [ver #2] KEYS: asym_tpm: Implement the decrypt operation [ver #2] KEYS: asym_tpm: Implement tpm_unbind [ver #2] KEYS: asym_tpm: Add loadkey2 and flushspecific [ver #2] KEYS: Move trusted.h to include/keys [ver #2] KEYS: trusted: Expose common functionality [ver #2] KEYS: asym_tpm: Implement encryption operation [ver #2] KEYS: asym_tpm: Implement pkey_query [ver #2] KEYS: Add parser for TPM-based keys [ver #2] KEYS: asym_tpm: extract key size & public key [ver #2] KEYS: asym_tpm: add skeleton for asym_tpm [ver #2] crypto: rsa-pkcs1pad: Allow hash to be optional [ver #2] KEYS: Implement PKCS#8 RSA Private Key parser [ver #2] KEYS: Implement encrypt, decrypt and sign for software asymmetric key [ver #2] KEYS: Allow the public_key struct to hold a private key [ver #2] KEYS: Provide software public key query function [ver #2] KEYS: Make the X.509 and PKCS7 parsers supply the sig encoding type [ver #2] KEYS: Provide missing asymmetric key subops for new key type ops [ver #2] ... commit 0e9b4a82710220c04100892fb7277b78fd33a747 Author: Al Viro Date: Thu Nov 1 18:19:03 2018 -0400 missing bits of "iov_iter: Separate type from direction and use accessor functions" sunrpc patches from nfs tree conflict with calling conventions change done in iov_iter work. Trivial fixup... Signed-off-by: Al Viro commit 78a63f1235deb1ab9c0780b332d9cc18270247e2 Merge: 3bf0fb6f33dd 331bc71cb175 Author: Al Viro Date: Thu Nov 1 18:17:23 2018 -0400 Merge tag 'nfs-for-4.20-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs backmerge to do fixup of iov_iter_kvec() conflict commit 7260935d71b6d582376543844185add72848dde8 Merge: 34c7685a177a d47748e5ae5a Author: Linus Torvalds Date: Thu Nov 1 14:48:48 2018 -0700 Merge tag 'ovl-update-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs Pull overlayfs updates from Miklos Szeredi: "A mix of fixes and cleanups" * tag 'ovl-update-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs: ovl: automatically enable redirect_dir on metacopy=on ovl: check whiteout in ovl_create_over_whiteout() ovl: using posix_acl_xattr_size() to get size instead of posix_acl_to_xattr() ovl: abstract ovl_inode lock with a helper ovl: remove the 'locked' argument of ovl_nlink_{start,end} ovl: relax requirement for non null uuid of lower fs ovl: fold copy-up helpers into callers ovl: untangle copy up call chain ovl: relax permission checking on underlying layers ovl: fix recursive oi->lock in ovl_link() vfs: fix FIGETBSZ ioctl on an overlayfs file ovl: clean up error handling in ovl_get_tmpfile() ovl: fix error handling in ovl_verify_set_fh() commit 34c7685a177a7bc98066f7e5daa42eef621d0bdb Merge: b5b1de3537e2 c961cb3be906 Author: Linus Torvalds Date: Thu Nov 1 14:45:38 2018 -0700 Merge tag 'devicetree-fixes-for-4.20-1' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux Pull Devicetree fixes from Rob Herring: - fix cpu node iterator for powerpc systems - clarify ARM CPU binding 'capacities-dmips-mhz' property calculations * tag 'devicetree-fixes-for-4.20-1' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: of: Fix cpu node iterator to not ignore disabled cpu nodes dt-bindings: arm: Explain capacities-dmips-mhz calculations in example commit b5b1de3537e2cd8f52971224a1be24bb3ce34a65 Merge: 90de1fb83e7c 79f800b2e769 Author: Linus Torvalds Date: Thu Nov 1 14:42:49 2018 -0700 Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost Pull virtio/vhost updates from Michael Tsirkin: "Fixes and tweaks: - virtio balloon page hinting support - vhost scsi control queue - misc fixes" * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: MAINTAINERS: remove reference to bogus vsock file vhost/scsi: Use common handling code in request queue handler vhost/scsi: Extract common handling code from control queue handler vhost/scsi: Respond to control queue operations vhost/scsi: truncate T10 PI iov_iter to prot_bytes virtio-balloon: VIRTIO_BALLOON_F_PAGE_POISON mm/page_poison: expose page_poisoning_enabled to kernel modules virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT kvm_config: add CONFIG_VIRTIO_MENU commit 90de1fb83e7c760aa403381f072486fc4e3e8b5f Merge: 2d6bb6adb714 960b82c383d3 Author: Linus Torvalds Date: Thu Nov 1 14:32:43 2018 -0700 Merge tag 'xtensa-20181101' of git://github.com/jcmvbkbc/linux-xtensa Pull Xtensa fixes and cleanups from Max Filippov: - use ZONE_NORMAL instead of ZONE_DMA - fix Image.elf build error caused by assignment of incorrect address to the .note.Linux section - clean up debug and property sections in the vmlinux.lds.S * tag 'xtensa-20181101' of git://github.com/jcmvbkbc/linux-xtensa: xtensa: clean up xtensa-specific property sections xtensa: use DWARF_DEBUG in the vmlinux.lds.S xtensa: add NOTES section to the linker script xtensa: remove ZONE_DMA commit c961cb3be9064d1097ccc019390f8b5739daafc6 Author: Rob Herring Date: Wed Oct 31 09:28:06 2018 -0500 of: Fix cpu node iterator to not ignore disabled cpu nodes In most cases, nodes with 'status = "disabled";' are treated as if the node is not present though it is a common bug to forget to check that. However, cpu nodes are different in that "disabled" simply means offline and the OS can bring the CPU core online. Commit f1f207e43b8a ("of: Add cpu node iterator for_each_of_cpu_node()") followed the common behavior of ignoring disabled cpu nodes. This breaks some powerpc systems (at least NXP P50XX/e5500). Fix this by dropping the status check. Fixes: 651d44f9679c ("of: use for_each_of_cpu_node iterator") Fixes: f1f207e43b8a ("of: Add cpu node iterator for_each_of_cpu_node()") Reported-by: Christian Zigotzky Tested-by: Michael Ellerman Cc: Frank Rowand Signed-off-by: Rob Herring commit 7de414a9dd91426318df7b63da024b2b07e53df5 Author: Cong Wang Date: Thu Nov 1 12:02:37 2018 -0700 net: drop skb on failure in ip_check_defrag() Most callers of pskb_trim_rcsum() simply drop the skb when it fails, however, ip_check_defrag() still continues to pass the skb up to stack. This is suspicious. In ip_check_defrag(), after we learn the skb is an IP fragment, passing the skb to callers makes no sense, because callers expect fragments are defrag'ed on success. So, dropping the skb when we can't defrag it is reasonable. Note, prior to commit 88078d98d1bb, this is not a big problem as checksum will be fixed up anyway. After it, the checksum is not correct on failure. Found this during code review. Fixes: 88078d98d1bb ("net: pskb_trim_rcsum() and CHECKSUM_COMPLETE are friends") Cc: Eric Dumazet Signed-off-by: Cong Wang Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller commit d47748e5ae5af6572e520cc9767bbe70c22ea498 Author: Miklos Szeredi Date: Thu Nov 1 21:31:39 2018 +0100 ovl: automatically enable redirect_dir on metacopy=on Current behavior is to automatically disable metacopy if redirect_dir is not enabled and proceed with the mount. If "metacopy=on" mount option was given, then this behavior can confuse the user: no mount failure, yet metacopy is disabled. This patch makes metacopy=on imply redirect_dir=on. The converse is also true: turning off full redirect with redirect_dir= {off|follow|nofollow} will disable metacopy. If both metacopy=on and redirect_dir={off|follow|nofollow} is specified, then mount will fail, since there's no way to correctly resolve the conflict. Reported-by: Daniel Walsh Fixes: d5791044d2e5 ("ovl: Provide a mount option metacopy=on/off...") Cc: # v4.19 Signed-off-by: Miklos Szeredi commit 2d6bb6adb714b133db92ccd4bfc9c20f75f71f3f Merge: 7c6c54b505b8 6fcde9046673 Author: Linus Torvalds Date: Thu Nov 1 11:46:27 2018 -0700 Merge tag 'stackleak-v4.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull stackleak gcc plugin from Kees Cook: "Please pull this new GCC plugin, stackleak, for v4.20-rc1. This plugin was ported from grsecurity by Alexander Popov. It provides efficient stack content poisoning at syscall exit. This creates a defense against at least two classes of flaws: - Uninitialized stack usage. (We continue to work on improving the compiler to do this in other ways: e.g. unconditional zero init was proposed to GCC and Clang, and more plugin work has started too). - Stack content exposure. By greatly reducing the lifetime of valid stack contents, exposures via either direct read bugs or unknown cache side-channels become much more difficult to exploit. This complements the existing buddy and heap poisoning options, but provides the coverage for stacks. The x86 hooks are included in this series (which have been reviewed by Ingo, Dave Hansen, and Thomas Gleixner). The arm64 hooks have already been merged through the arm64 tree (written by Laura Abbott and reviewed by Mark Rutland and Will Deacon). With VLAs having been removed this release, there is no need for alloca() protection, so it has been removed from the plugin" * tag 'stackleak-v4.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: arm64: Drop unneeded stackleak_check_alloca() stackleak: Allow runtime disabling of kernel stack erasing doc: self-protection: Add information about STACKLEAK feature fs/proc: Show STACKLEAK metrics in the /proc file system lkdtm: Add a test for STACKLEAK gcc-plugins: Add STACKLEAK plugin for tracking the kernel stack x86/entry: Add STACKLEAK erasing the kernel stack at the end of syscalls commit d3787af289c85381cc048cb8c56b67260dbbc436 Author: Colin Ian King Date: Fri Oct 26 19:10:31 2018 +0100 NFS: 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: Trond Myklebust commit c3be6577d82a9f0163eb1e2c37a477414d12a209 Author: Paul Burton Date: Thu Nov 1 17:51:34 2018 +0000 SUNRPC: Use atomic(64)_t for seq_send(64) The seq_send & seq_send64 fields in struct krb5_ctx are used as atomically incrementing counters. This is implemented using cmpxchg() & cmpxchg64() to implement what amount to custom versions of atomic_fetch_inc() & atomic64_fetch_inc(). Besides the duplication, using cmpxchg64() has another major drawback in that some 32 bit architectures don't provide it. As such commit 571ed1fd2390 ("SUNRPC: Replace krb5_seq_lock with a lockless scheme") resulted in build failures for some architectures. Change seq_send to be an atomic_t and seq_send64 to be an atomic64_t, then use atomic(64)_* functions to manipulate the values. The atomic64_t type & associated functions are provided even on architectures which lack real 64 bit atomic memory access via CONFIG_GENERIC_ATOMIC64 which uses spinlocks to serialize access. This fixes the build failures for architectures lacking cmpxchg64(). A potential alternative that was raised would be to provide cmpxchg64() on the 32 bit architectures that currently lack it, using spinlocks. However this would provide a version of cmpxchg64() with semantics a little different to the implementations on architectures with real 64 bit atomics - the spinlock-based implementation would only work if all access to the memory used with cmpxchg64() is *always* performed using cmpxchg64(). That is not currently a requirement for users of cmpxchg64(), and making it one seems questionable. As such avoiding cmpxchg64() outside of architecture-specific code seems best, particularly in cases where atomic64_t seems like a better fit anyway. The CONFIG_GENERIC_ATOMIC64 implementation of atomic64_* functions will use spinlocks & so faces the same issue, but with the key difference that the memory backing an atomic64_t ought to always be accessed via the atomic64_* functions anyway making the issue moot. Signed-off-by: Paul Burton Fixes: 571ed1fd2390 ("SUNRPC: Replace krb5_seq_lock with a lockless scheme") Cc: Trond Myklebust Cc: Anna Schumaker Cc: J. Bruce Fields Cc: Jeff Layton Cc: David S. Miller Cc: linux-nfs@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Trond Myklebust commit 3c5e3dabf3722a883227623a4adf61976c2224ff Author: Arnaldo Carvalho de Melo Date: Thu Nov 1 13:50:35 2018 -0300 perf trace: When augmenting raw_syscalls plug raw_syscalls:sys_exit too With just this commit we get to support all syscalls via hooking raw_syscalls:sys_{enter,exit} to the trace__sys_{enter,exit} routines to combine, strace-like, those tracepoints. # trace -e tools/perf/examples/bpf/augmented_raw_syscalls.c sleep 1 ? ( ): sleep/31680 ... [continued]: execve()) = 0 0.043 ( 0.004 ms): sleep/31680 brk() = 0x55652a851000 0.070 ( 0.009 ms): sleep/31680 access(filename:, mode: R) = -1 ENOENT No such file or directory 0.087 ( 0.006 ms): sleep/31680 openat(dfd: CWD, filename: , flags: CLOEXEC) = 3 0.096 ( 0.003 ms): sleep/31680 fstat(fd: 3, statbuf: 0x7ffc5269e190) = 0 0.101 ( 0.005 ms): sleep/31680 mmap(len: 103334, prot: READ, flags: PRIVATE, fd: 3) = 0x7f709c239000 0.109 ( 0.002 ms): sleep/31680 close(fd: 3) = 0 0.126 ( 0.006 ms): sleep/31680 openat(dfd: CWD, filename: , flags: CLOEXEC) = 3 0.135 ( 0.003 ms): sleep/31680 read(fd: 3, buf: 0x7ffc5269e358, count: 832) = 832 0.141 ( 0.002 ms): sleep/31680 fstat(fd: 3, statbuf: 0x7ffc5269e1f0) = 0 0.146 ( 0.005 ms): sleep/31680 mmap(len: 8192, prot: READ|WRITE, flags: PRIVATE|ANONYMOUS) = 0x7f709c237000 0.159 ( 0.007 ms): sleep/31680 mmap(len: 3889792, prot: EXEC|READ, flags: PRIVATE|DENYWRITE, fd: 3) = 0x7f709bc79000 0.168 ( 0.009 ms): sleep/31680 mprotect(start: 0x7f709be26000, len: 2093056) = 0 0.179 ( 0.010 ms): sleep/31680 mmap(addr: 0x7f709c025000, len: 24576, prot: READ|WRITE, flags: PRIVATE|FIXED|DENYWRITE, fd: 3, off: 1753088) = 0x7f709c025000 0.196 ( 0.005 ms): sleep/31680 mmap(addr: 0x7f709c02b000, len: 14976, prot: READ|WRITE, flags: PRIVATE|FIXED|ANONYMOUS) = 0x7f709c02b000 0.210 ( 0.002 ms): sleep/31680 close(fd: 3) = 0 0.230 ( 0.002 ms): sleep/31680 arch_prctl(option: 4098, arg2: 140121632638208) = 0 0.306 ( 0.009 ms): sleep/31680 mprotect(start: 0x7f709c025000, len: 16384, prot: READ) = 0 0.338 ( 0.005 ms): sleep/31680 mprotect(start: 0x556529607000, len: 4096, prot: READ) = 0 0.348 ( 0.005 ms): sleep/31680 mprotect(start: 0x7f709c253000, len: 4096, prot: READ) = 0 0.356 ( 0.019 ms): sleep/31680 munmap(addr: 0x7f709c239000, len: 103334) = 0 0.463 ( 0.002 ms): sleep/31680 brk() = 0x55652a851000 0.468 ( 0.004 ms): sleep/31680 brk(brk: 0x55652a872000) = 0x55652a872000 0.474 ( 0.002 ms): sleep/31680 brk() = 0x55652a872000 0.484 ( 0.008 ms): sleep/31680 open(filename: , flags: CLOEXEC) = 3 0.497 ( 0.002 ms): sleep/31680 fstat(fd: 3, statbuf: 0x7f709c02aaa0) = 0 0.501 ( 0.006 ms): sleep/31680 mmap(len: 113045344, prot: READ, flags: PRIVATE, fd: 3) = 0x7f70950aa000 0.514 ( 0.002 ms): sleep/31680 close(fd: 3) = 0 0.554 (1000.140 ms): sleep/31680 nanosleep(rqtp: 0x7ffc5269eed0) = 0 1000.734 ( 0.007 ms): sleep/31680 close(fd: 1) = 0 1000.748 ( 0.004 ms): sleep/31680 close(fd: 2) = 0 1000.769 ( ): sleep/31680 exit_group() # Now to allow selecting which syscalls should be traced, using a map. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-votqqmqhag8e1i9mgyzfez3o@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit febf8a3712e4209b7e650b37b3b240a2b387794d Author: Arnaldo Carvalho de Melo Date: Thu Nov 1 10:34:34 2018 -0300 perf examples bpf: Start augmenting raw_syscalls:sys_{start,exit} The previous approach of attaching to each syscall showed how it is possible to augment tracepoints and use that augmentation, pointer payloads, in the existing beautifiers in 'perf trace', but for a more general solution we now will try to augment the main raw_syscalls:sys_{enter,exit} syscalls, and then pass instructions in maps so that it knows which syscalls and which pointer contents, and how many bytes for each of the arguments should be copied. Start with just the bare minimum to collect what is provided by those two tracepoints via the __augmented_syscalls__ map + bpf-output perf event, which results in perf trace showing them without connecting enter+exit: # perf trace -e tools/perf/examples/bpf/augmented_raw_syscalls.c sleep 1 0.000 sleep/11563 raw_syscalls:sys_exit:NR 59 = 0 0.019 ( ): sleep/11563 brk() ... 0.021 sleep/11563 raw_syscalls:sys_exit:NR 12 = 94682642325504 0.033 ( ): sleep/11563 access(filename:, mode: R) ... 0.037 sleep/11563 raw_syscalls:sys_exit:NR 21 = -2 0.041 ( ): sleep/11563 openat(dfd: CWD, filename: , flags: CLOEXEC) ... 0.044 sleep/11563 raw_syscalls:sys_exit:NR 257 = 3 0.045 ( ): sleep/11563 fstat(fd: 3, statbuf: 0x7ffdbf7119b0) ... 0.046 sleep/11563 raw_syscalls:sys_exit:NR 5 = 0 0.047 ( ): sleep/11563 mmap(len: 103334, prot: READ, flags: PRIVATE, fd: 3) ... 0.049 sleep/11563 raw_syscalls:sys_exit:NR 9 = 140196285493248 0.050 ( ): sleep/11563 close(fd: 3) ... 0.051 sleep/11563 raw_syscalls:sys_exit:NR 3 = 0 0.059 ( ): sleep/11563 openat(dfd: CWD, filename: , flags: CLOEXEC) ... 0.062 sleep/11563 raw_syscalls:sys_exit:NR 257 = 3 0.063 ( ): sleep/11563 read(fd: 3, buf: 0x7ffdbf711b78, count: 832) ... 0.065 sleep/11563 raw_syscalls:sys_exit:NR 0 = 832 0.066 ( ): sleep/11563 fstat(fd: 3, statbuf: 0x7ffdbf711a10) ... 0.067 sleep/11563 raw_syscalls:sys_exit:NR 5 = 0 0.068 ( ): sleep/11563 mmap(len: 8192, prot: READ|WRITE, flags: PRIVATE|ANONYMOUS) ... 0.070 sleep/11563 raw_syscalls:sys_exit:NR 9 = 140196285485056 0.073 ( ): sleep/11563 mmap(len: 3889792, prot: EXEC|READ, flags: PRIVATE|DENYWRITE, fd: 3) ... 0.076 sleep/11563 raw_syscalls:sys_exit:NR 9 = 140196279463936 0.077 ( ): sleep/11563 mprotect(start: 0x7f81fd8a8000, len: 2093056) ... 0.083 sleep/11563 raw_syscalls:sys_exit:NR 10 = 0 0.084 ( ): sleep/11563 mmap(addr: 0x7f81fdaa7000, len: 24576, prot: READ|WRITE, flags: PRIVATE|FIXED|DENYWRITE, fd: 3, off: 1753088) ... 0.088 sleep/11563 raw_syscalls:sys_exit:NR 9 = 140196283314176 0.091 ( ): sleep/11563 mmap(addr: 0x7f81fdaad000, len: 14976, prot: READ|WRITE, flags: PRIVATE|FIXED|ANONYMOUS) ... 0.093 sleep/11563 raw_syscalls:sys_exit:NR 9 = 140196283338752 0.097 ( ): sleep/11563 close(fd: 3) ... 0.098 sleep/11563 raw_syscalls:sys_exit:NR 3 = 0 0.107 ( ): sleep/11563 arch_prctl(option: 4098, arg2: 140196285490432) ... 0.108 sleep/11563 raw_syscalls:sys_exit:NR 158 = 0 0.143 ( ): sleep/11563 mprotect(start: 0x7f81fdaa7000, len: 16384, prot: READ) ... 0.146 sleep/11563 raw_syscalls:sys_exit:NR 10 = 0 0.157 ( ): sleep/11563 mprotect(start: 0x561d037e7000, len: 4096, prot: READ) ... 0.160 sleep/11563 raw_syscalls:sys_exit:NR 10 = 0 0.163 ( ): sleep/11563 mprotect(start: 0x7f81fdcd5000, len: 4096, prot: READ) ... 0.165 sleep/11563 raw_syscalls:sys_exit:NR 10 = 0 0.166 ( ): sleep/11563 munmap(addr: 0x7f81fdcbb000, len: 103334) ... 0.174 sleep/11563 raw_syscalls:sys_exit:NR 11 = 0 0.216 ( ): sleep/11563 brk() ... 0.217 sleep/11563 raw_syscalls:sys_exit:NR 12 = 94682642325504 0.217 ( ): sleep/11563 brk(brk: 0x561d05453000) ... 0.219 sleep/11563 raw_syscalls:sys_exit:NR 12 = 94682642460672 0.220 ( ): sleep/11563 brk() ... 0.221 sleep/11563 raw_syscalls:sys_exit:NR 12 = 94682642460672 0.224 ( ): sleep/11563 open(filename: , flags: CLOEXEC) ... 0.228 sleep/11563 raw_syscalls:sys_exit:NR 2 = 3 0.229 ( ): sleep/11563 fstat(fd: 3, statbuf: 0x7f81fdaacaa0) ... 0.230 sleep/11563 raw_syscalls:sys_exit:NR 5 = 0 0.231 ( ): sleep/11563 mmap(len: 113045344, prot: READ, flags: PRIVATE, fd: 3) ... 0.234 sleep/11563 raw_syscalls:sys_exit:NR 9 = 140196166418432 0.237 ( ): sleep/11563 close(fd: 3) ... 0.238 sleep/11563 raw_syscalls:sys_exit:NR 3 = 0 0.262 ( ): sleep/11563 nanosleep(rqtp: 0x7ffdbf7126f0) ... 1000.399 sleep/11563 raw_syscalls:sys_exit:NR 35 = 0 1000.440 ( ): sleep/11563 close(fd: 1) ... 1000.447 sleep/11563 raw_syscalls:sys_exit:NR 3 = 0 1000.454 ( ): sleep/11563 close(fd: 2) ... 1000.468 ( ): sleep/11563 exit_group( ) # In the next csets we'll connect those events to the existing enter/exit raw_syscalls handlers in 'perf trace', just like we did with the syscalls:sys_{enter,exit}_* tracepoints. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-5nl8l4hx1tl9pqdx65nkp6pw@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 7c6c54b505b8aea1782ce6a6e8f3b8297d179937 Merge: 6444ccfd699c 012ebc3b7801 Author: Linus Torvalds Date: Thu Nov 1 09:31:19 2018 -0700 Merge branch 'i2c/for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c fixes from Wolfram Sang: "I2C has a core bugfix & cleanup as well as an ID addition and MAINTAINERS update for you" * 'i2c/for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: MAINTAINERS: add maintainer for IMX LPI2C driver dt-bindings: i2c: i2c-imx-lpi2c: add imx8qxp compatible string i2c: Clear client->irq in i2c_device_remove i2c: Remove unnecessary call to irq_find_mapping commit 6444ccfd699cda8db5edaac7fa469d6a29aa9a47 Merge: 82aa4671516a b5bb42587118 Author: Linus Torvalds Date: Thu Nov 1 09:27:57 2018 -0700 Merge branch 'for-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/dennis/percpu Pull percpu fixes from Dennis Zhou: "Two small things for v4.20. The first fixes a clang uninitialized variable warning for arm64 in the default path calls BUILD_BUG(). The second removes an unnecessary unlikely() in a WARN_ON() use" * 'for-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/dennis/percpu: arm64: percpu: Initialize ret in the default case mm: percpu: remove unnecessary unlikely() commit 82aa4671516a3203261c835e98c3eecab10c994d Merge: ffb845db5001 46ebe2834ba5 Author: Linus Torvalds Date: Thu Nov 1 09:16:01 2018 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: 1) BPF verifier fixes from Daniel Borkmann. 2) HNS driver fixes from Huazhong Tan. 3) FDB only works for ethernet devices, reject attempts to install FDB rules for others. From Ido Schimmel. 4) Fix spectre V1 in vhost, from Jason Wang. 5) Don't pass on-stack object to irq_set_affinity_hint() in mvpp2 driver, from Marc Zyngier. 6) Fix mlx5e checksum handling when RXFCS is enabled, from Eric Dumazet. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (49 commits) openvswitch: Fix push/pop ethernet validation net: stmmac: Fix stmmac_mdio_reset() when building stmmac as modules bpf: test make sure to run unpriv test cases in test_verifier bpf: add various test cases to test_verifier bpf: don't set id on after map lookup with ptr_to_map_val return bpf: fix partial copy of map_ptr when dst is scalar libbpf: Fix compile error in libbpf_attach_type_by_name kselftests/bpf: use ping6 as the default ipv6 ping binary if it exists selftests: mlxsw: qos_mc_aware: Add a test for UC awareness selftests: mlxsw: qos_mc_aware: Tweak for min shaper mlxsw: spectrum: Set minimum shaper on MC TCs mlxsw: reg: QEEC: Add minimum shaper fields net: hns3: bugfix for rtnl_lock's range in the hclgevf_reset() net: hns3: bugfix for rtnl_lock's range in the hclge_reset() net: hns3: bugfix for handling mailbox while the command queue reinitialized net: hns3: fix incorrect return value/type of some functions net: hns3: bugfix for hclge_mdio_write and hclge_mdio_read net: hns3: bugfix for is_valid_csq_clean_head() net: hns3: remove unnecessary queue reset in the hns3_uninit_all_ring() net: hns3: bugfix for the initialization of command queue's spin lock ... commit ffb845db50012eb3704a270efdf9b98be4e3454a Merge: 5c99a8d1edb5 1f2b5b8e2df4 Author: Linus Torvalds Date: Thu Nov 1 09:07:04 2018 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc Pull sparc fixes from David Miller: "Two small fixes" * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc: sparc64: Wire up compat getpeername and getsockname. sparc64: Remvoe set_fs() from perf_callchain_user(). commit 5c99a8d1edb53921d79fee29231bca3ada77b5d6 Merge: eb7046e9bf46 e8d0c9a726cd Author: Linus Torvalds Date: Thu Nov 1 09:04:30 2018 -0700 Merge tag 'csky-for-linus-4.20-fixup-dtb' of https://github.com/c-sky/csky-linux Pull csky dtb fixups from Guo Ren: "These fix the csky dtb Kbuild to follow the new Devicetree dtb build rules" * tag 'csky-for-linus-4.20-fixup-dtb' of https://github.com/c-sky/csky-linux: csky: use common dtb build rules csky: remove builtin-dtb Kbuild commit eb7046e9bf466cebfcfbcdf640e41d9e3a80086c Merge: 5b7449810ae6 3b692c55e58d Author: Linus Torvalds Date: Thu Nov 1 08:42:21 2018 -0700 Merge tag 'platform-drivers-x86-v4.20-1' of git://git.infradead.org/linux-platform-drivers-x86 Pull x86 platform driver updates from Darren Hart: - Move the Dell dcdbas and dell_rbu drivers into platform/drivers/x86 as they are closely coupled with other drivers in this location. - Improve _init* usage for acerhdf and fix some usage issues with messages and module parameters. - Simplify asus-wmi by calling ACPI/WMI methods directly, eliminating workqueue overhead, eliminate double reporting of keyboard backlight. - Fix wake from USB failure on Bay Trail devices (intel_int0002_vgpio). - Notify intel_telemetry users when IPC1 device is not enabled. - Update various drivers with new laptop model IDs. - Update several intel drivers to use SPDX identifers and order headers alphabetically. * tag 'platform-drivers-x86-v4.20-1' of git://git.infradead.org/linux-platform-drivers-x86: (64 commits) HID: asus: only support backlight when it's not driven by WMI platform/x86: asus-wmi: export function for evaluating WMI methods platform/x86: asus-wmi: Only notify kbd LED hw_change by fn-key pressed platform/x86: wmi: declare device_type structure as constant platform/x86: ideapad: Add Y530-15ICH to no_hw_rfkill platform/x86: Add Intel AtomISP2 dummy / power-management driver platform/x86: touchscreen_dmi: Add min-x and min-y settings for various models platform/x86: touchscreen_dmi: Add info for the Onda V80 Plus v3 tablet platform/x86: touchscreen_dmi: Add info for the Trekstor Primetab T13B tablet platform/x86: intel_telemetry: Get rid of custom macro platform/x86: intel_telemetry: report debugfs failure MAINTAINERS: intel_telemetry: Update maintainers info platform/x86: Add LG Gram laptop special features driver platform/x86: asus-wmi: Simplify the keyboard brightness updating process platform/x86: touchscreen_dmi: Add info for the Trekstor Primebook C11 convertible platform/x86: mlx-platform: Properly use mlxplat_mlxcpld_msn201x_items MAINTAINERS: intel_pmc_core: Update MAINTAINERS firmware: dcdbas: include linux/io.h platform/x86: intel-wmi-thunderbolt: Add dynamic debugging platform/x86: intel-wmi-thunderbolt: Convert to use SPDX identifier ... commit 2cd3faf87d2d8f6123adf34741b9a7b98828a76f Author: Petr Vorel Date: Mon Oct 29 22:10:58 2018 +0100 merge_config.sh: Allow to define config prefix with CONFIG_ environment variable. merge_config.sh uses CONFIG_ which is used in kernel and other projects. There are some projects which use kconfig with different prefixes (e.g. buildroot: BR2_ prefix). CONFIG_ variable is already used for this purpose in kconfig binary (scripts/kconfig/lkc.h), let's use the same rule for in merge_config.sh. Suggested-by: Masahiro Yamada Signed-off-by: Petr Vorel Signed-off-by: Masahiro Yamada commit 3f80babd9ca477d19a027e0b25b95973cd7f7357 Author: Masahiro Yamada Date: Tue Oct 30 01:03:54 2018 +0900 kbuild: remove unused cc-fullversion variable The last user of cc-fullversion was removed by commit f2910f0e6835 ("powerpc: remove old GCC version checks"). Signed-off-by: Masahiro Yamada commit 0085b4191f3e30ec94beef4103679f2828d3c54f Author: Masahiro Yamada Date: Tue Oct 30 00:41:28 2018 +0900 kconfig: remove silentoldconfig target As commit 911a91c39cab ("kconfig: rename silentoldconfig to syncconfig") announced, it is time for the removal. Signed-off-by: Masahiro Yamada Acked-by: Jeff Kirsher commit 04c459d204484fa4747d29c24f00df11fe6334d4 Author: Masahiro Yamada Date: Tue Oct 30 00:41:27 2018 +0900 kconfig: remove oldnoconfig target As commit 312ee68752fa ("kconfig: announce removal of oldnoconfig if used") announced, it is time for the removal. Signed-off-by: Masahiro Yamada commit a15687ca7b927c02fde9ab68ecbbc3043fb72f25 Author: Christoph Hellwig Date: Fri Oct 19 14:09:48 2018 +0200 powerpc: PCI_MSI needs PCI Various powerpc boards select the PCI_MSI config option without selecting PCI, resulting in potentially not compilable configurations if the by default enabled PCI option is disabled. Explicitly select PCI to ensure we always have valid configs. Signed-off-by: Christoph Hellwig Acked-by: Thomas Gleixner Signed-off-by: Masahiro Yamada commit c8bf9212d1c2df2080e8870da5b791354c20376e Author: Christoph Hellwig Date: Fri Oct 19 14:09:47 2018 +0200 powerpc: remove CONFIG_MCA leftovers Signed-off-by: Christoph Hellwig Acked-by: Thomas Gleixner Signed-off-by: Masahiro Yamada commit 3905361b723ad9fbc74b3e449acc1d52bee1b4ce Author: Christoph Hellwig Date: Fri Oct 19 14:09:46 2018 +0200 powerpc: remove CONFIG_PCI_QSPAN This option isn't actually used anywhere. Signed-off-by: Christoph Hellwig Acked-by: Benjamin Herrenschmidt Signed-off-by: Masahiro Yamada commit 3eb2ebcb8e8d2e57d7a9f21ffe1dc82bf0322bdc Author: Christoph Hellwig Date: Fri Oct 19 14:09:44 2018 +0200 scsi: aha152x: rename the PCMCIA define We plan to enable building the PCMCIA core and drivers, and the non-prefixed PCMCIA name clashes with some arch headers. Signed-off-by: Christoph Hellwig Acked-by: Thomas Gleixner Signed-off-by: Masahiro Yamada commit 9d064be1e6a195eaaa3762af5c7c6cd3f66aa6cc Author: Christian König Date: Wed Oct 24 14:59:10 2018 +0200 drm/amdgpu: revert "enable gfxoff in non-sriov and stutter mode by default" This is still completely breaking my Raven system. This reverts commit cdf2f910fa969adca1b0e3ad2b487821233dc038. Revert until we sort out the sbios and firmware combinations that work correctly. bug: https://bugs.freedesktop.org/show_bug.cgi?id=108606 Cc: stable@vger.kernel.org # v4.19 Reviewed-by: Alex Deucher Signed-off-by: Christian König Signed-off-by: Alex Deucher commit a4c3f247ee94945ac949f3280b7c050c712857cd Author: Rex Zhu Date: Wed Oct 31 19:12:01 2018 +0800 drm/amd/pp: Print warning if od_sclk/mclk out of range print warning in dmesg to notify user the setting for sclk_od/mclk_od out of range that vbios can support Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher commit 47fdd897534704a8a3e77d0091e43479b64d3de1 Author: Rex Zhu Date: Tue Oct 30 20:01:59 2018 +0800 drm/amd/pp: Fix pp_sclk/mclk_od not work on Vega10 not update dpm table with user's setting. Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher commit 17c7c7e714624dd8f00fb6b85a214745fc2bae6b Author: Rex Zhu Date: Mon Oct 22 13:27:37 2018 +0800 drm/amd/pp: Fix pp_sclk/mclk_od not work on smu7 not update the dpm table with user's setting Acked-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher commit 5be3bb6e92549f246f472d74bfaa54f56acbf998 Author: Evan Quan Date: Wed Oct 31 14:15:04 2018 +0800 drm/amd/powerplay: no MGPU fan boost enablement on DPM disabled As MGPU fan boost feature will be definitely not needed when DPM is disabled. So, there is no need to error out. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 734afd4b217f827e71b39abea10f5492c6f27606 Author: Andrey Grodzovsky Date: Wed Oct 31 10:23:05 2018 -0400 drm/amdgpu: Fix skipping hangged job reset during gpu recover. Problem: During GPU recover DAL would hang in amdgpu_pm_compute_clocks->amdgpu_fence_wait_empty Fix: Turns out there was a typo introduced by 3320b8d drm/amdgpu: remove job->ring which caused skipping amdgpu_fence_driver_force_completion and so the hangged job was never force signaled and this would cause the hang later in DAL. Signed-off-by: Andrey Grodzovsky Reviewed-by: Christian König Signed-off-by: Alex Deucher commit a662315d8ad9e687fe648b6eea9bd35017f565dd Author: Serge Semin Date: Tue Jul 17 12:24:37 2018 +0300 ntb: idt: Alter the driver info comments Since IDT PCIe-switch temperature sensor is now always available irregardless of the EEPROM/BIOS settings, Kconfig and in-code description should be properly altered. In addition lets update the driver copyright lines. Signed-off-by: Serge Semin Signed-off-by: Jon Mason commit b8babacbae624da6d244d0721263edda56be3991 Author: Serge Semin Date: Tue Jul 17 12:24:36 2018 +0300 ntb: idt: Discard temperature sensor IRQ handler IDT PCIe-switch temperature sensor interface is very broken. First of all only a few combinations of TMPCTL threshold enable bits really cause the interrupts unmasked. Even if an individual bit indicates the event unmasked, corresponding IRQ just isn't generated. Most of the threshold enable bits combinations are in fact useless and non of them can help to create a fully functional alarm interface. So to speak, we can't create a well defined hwmon alarms based on the IDT PCI-switch threshold IRQs. Secondly a single threshold IRQ (not a combination of thresholds) can be successfully enabled without the issue described above. But in this case we experienced an enormous number of interrupts generated by the chip if the temperature got near the enabled threshold value. Filter adjustment didn't help much. It also doesn't provide a hysteresis settings. Due to the temperature sample fluctuations near the threshold the interrupts spate makes the system nearly unusable until the temperature value finally settled so being pushed either to be fully higher or lower the threshold. All of these issues makes the temperature sensor alarm interface useless and even at some point dangerous to be used in the driver. In this case it is safer to completely discard it and disable the temperature alarm interrupts. Signed-off-by: Serge Semin Signed-off-by: Jon Mason commit aed1b7b31154bdd6f2fccca0ab5cf8a6fe2f52eb Author: Serge Semin Date: Tue Jul 17 12:24:35 2018 +0300 ntb: idt: Add basic hwmon sysfs interface IDT PCIe switches provide an embedded temperature sensor working within [0; 127.5]C with resolution of 0.5C. They also can generate a PCIe upstream interrupt in case if the temperature passes through specified thresholds. Since this thresholds interface is very broken the created hwmon-sysfs interface exposes only the next set of hwmon nodes: current input temperature, lowest and highest values measured, history resetting, value offset. HWmon alarm interface isn't provided. IDT PCIe switch also've got an ADC/filter settings of the sensor. This driver doesn't expose them to the hwmon-sysfs interface at the moment, except the offset node. Signed-off-by: Serge Semin Signed-off-by: Jon Mason commit 40070408f54e76896d75ddccaabdd0c0714600f1 Author: Serge Semin Date: Tue Jul 17 12:24:34 2018 +0300 ntb: idt: Alter temperature read method In order to create a hwmon interface for the IDT PCIe-switch temperature sensor the already available reader method should be improved. Particularly we need to redesign it so one would be able to read temperature/offset values from registers of the passed types. Since IDT sensor interface provides temperature in unsigned format 0:7:1 (7 bits for real value and one for fraction) we also need to have helpers for the typical sysfs temperature data type conversion to and from this format. Even though the IDT PCIe-switch provided temperature offset got the same but signed type it can be translated by these methods too. Signed-off-by: Serge Semin Signed-off-by: Jon Mason commit 51f5fd2e4615dcdc25cd7f9d19b7b27eb9ecdac7 Author: Will Deacon Date: Wed Oct 31 17:44:08 2018 +0000 tools headers barrier: Fix arm64 tools build failure wrt smp_load_{acquire,release} Cheers for reporting this. I managed to reproduce the build failure with gcc version 6.3.0 20170516 (Debian 6.3.0-18+deb9u1). The code in question is the arm64 versions of smp_load_acquire() and smp_store_release(). Unlike other architectures, these are not built around READ_ONCE() and WRITE_ONCE() since we have instructions we can use instead of fences. Bringing our macros up-to-date with those (i.e. tweaking the union initialisation and using the special "uXX_alias_t" types) appears to fix the issue for me. Committer notes: Testing it in the systems previously failing: # time dm android-ndk:r12b-arm \ android-ndk:r15c-arm \ debian:experimental-x-arm64 \ ubuntu:14.04.4-x-linaro-arm64 \ ubuntu:16.04-x-arm \ ubuntu:16.04-x-arm64 \ ubuntu:18.04-x-arm \ ubuntu:18.04-x-arm64 1 android-ndk:r12b-arm : Ok arm-linux-androideabi-gcc (GCC) 4.9.x 20150123 (prerelease) 2 android-ndk:r15c-arm : Ok arm-linux-androideabi-gcc (GCC) 4.9.x 20150123 (prerelease) 3 debian:experimental-x-arm64 : Ok aarch64-linux-gnu-gcc (Debian 8.2.0-7) 8.2.0 4 ubuntu:14.04.4-x-linaro-arm64 : Ok aarch64-linux-gnu-gcc (Linaro GCC 5.5-2017.10) 5.5.0 5 ubuntu:16.04-x-arm : Ok arm-linux-gnueabihf-gcc (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609 6 ubuntu:16.04-x-arm64 : Ok aarch64-linux-gnu-gcc (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609 7 ubuntu:18.04-x-arm : Ok arm-linux-gnueabihf-gcc (Ubuntu/Linaro 7.3.0-27ubuntu1~18.04) 7.3.0 8 ubuntu:18.04-x-arm64 : Ok aarch64-linux-gnu-gcc (Ubuntu/Linaro 7.3.0-27ubuntu1~18.04) 7.3.0 Reported-by: Arnaldo Carvalho de Melo Signed-off-by: Will Deacon Tested-by: Arnaldo Carvalho de Melo Tested-by: Daniel Borkmann Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20181031174408.GA27871@arm.com Signed-off-by: Arnaldo Carvalho de Melo commit 98f76206b33504b934209d16196477dfa519a807 Author: Dmitry Safonov Date: Fri Oct 12 14:42:53 2018 +0100 compat: Cleanup in_compat_syscall() callers Now that in_compat_syscall() is consistent on all architectures and does not longer report true on native i686, the workarounds (ifdeffery and helpers) can be removed. Signed-off-by: Dmitry Safonov Signed-off-by: Thomas Gleixner Cc: Dmitry Safonov <0x7f454c46@gmail.com> Cc: Ard Biesheuvel Cc: Andy Lutomirsky Cc: "David S. Miller" Cc: Herbert Xu Cc: "H. Peter Anvin" Cc: John Stultz Cc: "Kirill A. Shutemov" Cc: Oleg Nesterov Cc: Steffen Klassert Cc: Stephen Boyd Cc: Steven Rostedt Cc: linux-efi@vger.kernel.org Cc: netdev@vger.kernel.org Link: https://lkml.kernel.org/r/20181012134253.23266-3-dima@arista.com commit a846446b1914d1e3d996d657754f43fde89bab51 Author: Dmitry Safonov Date: Fri Oct 12 14:42:52 2018 +0100 x86/compat: Adjust in_compat_syscall() to generic code under !COMPAT The result of in_compat_syscall() can be pictured as: x86 platform: --------------------------------------------------- | Arch\syscall | 64-bit | ia32 | x32 | |-------------------------------------------------| | x86_64 | false | true | true | |-------------------------------------------------| | i686 | | | | --------------------------------------------------- Other platforms: ------------------------------------------- | Arch\syscall | 64-bit | compat | |-----------------------------------------| | 64-bit | false | true | |-----------------------------------------| | 32-bit(?) | | | ------------------------------------------- As seen, the result of in_compat_syscall() on generic 32-bit platform differs from i686. There is no reason for in_compat_syscall() == true on native i686. It also easy to misread code if the result on native 32-bit platform differs between arches. Because of that non arch-specific code has many places with: if (IS_ENABLED(CONFIG_COMPAT) && in_compat_syscall()) in different variations. It looks-like the only non-x86 code which uses in_compat_syscall() not under CONFIG_COMPAT guard is in amd/amdkfd. But according to the commit a18069c132cb ("amdkfd: Disable support for 32-bit user processes"), it actually should be disabled on native i686. Rename in_compat_syscall() to in_32bit_syscall() for x86-specific code and make in_compat_syscall() false under !CONFIG_COMPAT. A follow on patch will clean up generic users which were forced to check IS_ENABLED(CONFIG_COMPAT) with in_compat_syscall(). Signed-off-by: Dmitry Safonov Signed-off-by: Thomas Gleixner Reviewed-by: Andy Lutomirski Cc: Dmitry Safonov <0x7f454c46@gmail.com> Cc: Ard Biesheuvel Cc: "David S. Miller" Cc: Herbert Xu Cc: "H. Peter Anvin" Cc: John Stultz Cc: "Kirill A. Shutemov" Cc: Oleg Nesterov Cc: Steffen Klassert Cc: Stephen Boyd Cc: Steven Rostedt Cc: linux-efi@vger.kernel.org Cc: netdev@vger.kernel.org Link: https://lkml.kernel.org/r/20181012134253.23266-2-dima@arista.com commit 3424243e39e8ec138486926949e3668e7553125d Author: Dan Carpenter Date: Sat Oct 13 13:22:46 2018 +0300 irqchip/irq-mvebu-sei: Fix a NULL vs IS_ERR() bug in probe function The devm_ioremap_resource() function never returns NULL, it returns error pointers. Fixes: 61ce8d8d8a81 ("irqchip/irq-mvebu-sei: Add new driver for Marvell SEI") Signed-off-by: Dan Carpenter Signed-off-by: Thomas Gleixner Reviewed-by: Miquel Raynal Cc: Jason Cooper Cc: Andrew Lunn Cc: Gregory Clement Cc: Sebastian Hesselbarth Cc: Marc Zyngier Cc: linux-arm-kernel@lists.infradead.org Cc: kernel-janitors@vger.kernel.org Link: https://lkml.kernel.org/r/20181013102246.GD16086@mwanda commit 57f01796f14fecf00d330fe39c8d2477ced9cd79 Author: Michael Kelley Date: Thu Nov 1 00:35:05 2018 +0000 irq/matrix: Fix memory overallocation IRQ_MATRIX_SIZE is the number of longs needed for a bitmap, multiplied by the size of a long, yielding a byte count. But it is used to size an array of longs, which is way more memory than is needed. Change IRQ_MATRIX_SIZE so it is just the number of longs needed and the arrays come out the correct size. Fixes: 2f75d9e1c905 ("genirq: Implement bitmap matrix allocator") Signed-off-by: Michael Kelley Signed-off-by: Thomas Gleixner Cc: KY Srinivasan Link: https://lkml.kernel.org/r/1541032428-10392-1-git-send-email-mikelley@microsoft.com commit bcb6fb5da77c2a228adf07cc9cb1a0c2aa2001c6 Author: Josh Poimboeuf Date: Wed Oct 31 21:57:30 2018 -0500 objtool: Support GCC 9 cold subfunction naming scheme Starting with GCC 8, a lot of unlikely code was moved out of line to "cold" subfunctions in .text.unlikely. For example, the unlikely bits of: irq_do_set_affinity() are moved out to the following subfunction: irq_do_set_affinity.cold.49() Starting with GCC 9, the numbered suffix has been removed. So in the above example, the cold subfunction is instead: irq_do_set_affinity.cold() Tweak the objtool subfunction detection logic so that it detects both GCC 8 and GCC 9 naming schemes. Reported-by: Peter Zijlstra (Intel) Signed-off-by: Josh Poimboeuf Signed-off-by: Thomas Gleixner Tested-by: Peter Zijlstra (Intel) Acked-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/015e9544b1f188d36a7f02fa31e9e95629aa5f50.1541040800.git.jpoimboe@redhat.com commit e8d0c9a726cd1eae410148fcc6a1db23019f0334 Author: Guo Ren Date: Tue Oct 30 18:46:47 2018 +0800 csky: use common dtb build rules Remove the Kbuild rules in arch/csky and use common dtb build rules. This modification is based on: commit 37c8a5fafa3b ("kbuild: consolidate Devicetree dtb build rules") Signed-off-by: Guo Ren Reviewed-by: Rob Herring Acked-by: Arnd Bergmann commit c4c14c3bd177ea769fee938674f73a8ec0cdd47a Author: Guo Ren Date: Tue Oct 30 18:42:32 2018 +0800 csky: remove builtin-dtb Kbuild Remove the builtin-dtb implementation in arch/csky. Signed-off-by: Guo Ren Reviewed-by: Rob Herring Reviewed-by: Arnd Bergmann commit 46ebe2834ba5b541f28ee72e556a3fed42c47570 Author: Jaime Caamaño Ruiz Date: Wed Oct 31 18:52:03 2018 +0100 openvswitch: Fix push/pop ethernet validation When there are both pop and push ethernet header actions among the actions to be applied to a packet, an unexpected EINVAL (Invalid argument) error is obtained. This is due to mac_proto not being reset correctly when those actions are validated. Reported-at: https://mail.openvswitch.org/pipermail/ovs-discuss/2018-October/047554.html Fixes: 91820da6ae85 ("openvswitch: add Ethernet push and pop actions") Signed-off-by: Jaime Caamaño Ruiz Tested-by: Greg Rose Reviewed-by: Greg Rose Signed-off-by: David S. Miller commit 30549aab146ccb1275230c3b4b4bc6b4181fd54e Author: Niklas Cassel Date: Wed Oct 31 16:08:10 2018 +0100 net: stmmac: Fix stmmac_mdio_reset() when building stmmac as modules When building stmmac, it is only possible to select CONFIG_DWMAC_GENERIC, or any of the glue drivers, when CONFIG_STMMAC_PLATFORM is set. The only exception is CONFIG_STMMAC_PCI. When calling of_mdiobus_register(), it will call our ->reset() callback, which is set to stmmac_mdio_reset(). Most of the code in stmmac_mdio_reset() is protected by a "#if defined(CONFIG_STMMAC_PLATFORM)", which will evaluate to false when CONFIG_STMMAC_PLATFORM=m. Because of this, the phy reset gpio will only be pulled when stmmac is built as built-in, but not when built as modules. Fix this by using "#if IS_ENABLED()" instead of "#if defined()". Signed-off-by: Niklas Cassel Signed-off-by: David S. Miller commit 1f2b5b8e2df4591fbca430aff9c5a072dcc0f408 Author: David S. Miller Date: Wed Oct 31 18:30:21 2018 -0700 sparc64: Wire up compat getpeername and getsockname. Fixes: 8b30ca73b7cc ("sparc: Add all necessary direct socket system calls.") Reported-by: Joseph Myers Signed-off-by: David S. Miller commit 4d3163cf873f628dc598d5e9a15911b198655a07 Merge: df975da4e578 6702185c1ffe Author: David S. Miller Date: Wed Oct 31 18:21:37 2018 -0700 Merge branch '10GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-queue Jeff Kirsher says: ==================== Intel Wired LAN Driver Updates 2018-10-31 This series contains a various collection of fixes. Miroslav Lichvar from Red Hat or should I say IBM now? Updates the PHC timecounter interval for igb so that it gets updated at least once every 550 seconds. Ngai-Mint provides a fix for fm10k to prevent a soft lockup or system crash by adding a new condition to determine if the SM mailbox is in the correct state before proceeding. Jake provides several fm10k fixes, first one marks complier aborts as non-fatal since on some platforms trigger machine check errors when the compile aborts. Added missing device ids to the in-kernel driver. Due to the recent fixes, bumped the driver version. I (Jeff Kirsher) fixed a XFRM_ALGO dependency for both ixgbe and ixgbevf. This fix was based on the original work from Arnd Bergmann, which only fixed ixgbe. Mitch provides a fix for i40e/avf to update the status codes, which resolves an issue between a mis-match between i40e and the iavf driver, which also supports the ice LAN driver. Radoslaw fixes the ixgbe where the driver is logging a message about spoofed packets detected when the VF is re-started with a different MAC address. ==================== Signed-off-by: David S. Miller commit 906e86b22dba61cb1baaed9be7fdcbf0afd74d7b Author: Aaron Sierra Date: Mon Oct 15 15:32:47 2018 -0500 ntb_netdev: Simplify remove with client device drvdata Replace the elaborate private structure global linked-list used in ntb_netdev_probe() and ntb_netdev_remove() by stashing our private data in the NTB transport client device. Signed-off-by: Aaron Sierra Reviewed-by: Logan Gunthorpe Signed-off-by: Jon Mason commit fc5d1829f9bf3d8275322727c0e9a8baf268b7c6 Author: Aaron Sierra Date: Fri Oct 12 15:35:03 2018 -0500 NTB: transport: Try harder to alloc an aligned MW buffer Be a little wasteful if the (likely CMA) message window buffer is not suitably aligned after our first attempt; allocate a buffer twice as big as we need and manually align our MW buffer within it. This was needed on Intel Broadwell DE platforms with intel_iommu=off Signed-off-by: Aaron Sierra Reviewed-by: Dave Jiang Signed-off-by: Jon Mason commit 846429bc998f4c42d9961c139ce82d0f76a51d35 Author: Gustavo A. R. Silva Date: Fri Oct 5 09:12:34 2018 +0200 ntb: ntb_transport: Mark expected switch fall-throughs In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 1373888 ("Missing break in switch") Addresses-Coverity-ID: 1373889 ("Missing break in switch") Signed-off-by: Gustavo A. R. Silva Acked-by: Allen Hubbe Signed-off-by: Jon Mason commit 37a3e9693d444701e4b8f8b98ee0480450bb5982 Author: Serge Semin Date: Wed Jul 11 23:40:51 2018 +0300 ntb: idt: Set PCIe bus address to BARLIMITx IDT NTB driver sets the upper limit of actual translation address being written to the corresponding memory window setup. It is achieved by BARLIMITx register initialization. Needless to say, that the register works within PCIe bus address space. In general CPU and PCIe address spaces are different. It means, that addresses used for Memory TLPs routine can be different from CPU addresses. While in most of cases they are the same, there are exceptions when the proper mapping must be performed to have the portable driver code. There used to be a virt_to_bus()/bus_to_virt() interface for this purpose. But it's deprecated now. It was also a mistake to use pci_resource_start() since the return address of the method is at the CPU address space. In order to achieve the desired purpose we need to use pci_bus_address() helper. This method shall return a PCIe bus base address of the corresponding BAR resource. Signed-off-by: Serge Semin Acked-by: Allen Hubbe Signed-off-by: Jon Mason commit df975da4e578eb06453f41a3ecd73c2a4c28044d Merge: e2acdddde015 dfeb8f4c9692 Author: David S. Miller Date: Wed Oct 31 17:34:08 2018 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Daniel Borkmann says: ==================== pull-request: bpf 2018-11-01 The following pull-request contains BPF updates for your *net* tree. The main changes are: 1) Fix tcp_bpf_recvmsg() to return -EAGAIN instead of 0 in non-blocking case when no data is available yet, from John. 2) Fix a compilation error in libbpf_attach_type_by_name() when compiled with clang 3.8, from Andrey. 3) Fix a partial copy of map pointer on scalar alu and remove id generation for RET_PTR_TO_MAP_VALUE return types, from Daniel. 4) Add unlimited memlock limit for kernel selftest's flow_dissector_load program, from Yonghong. 5) Fix ping for some BPF shell based kselftests where distro does not ship "ping -6" anymore, from Li. ==================== Signed-off-by: David S. Miller commit dfeb8f4c9692fd5e6c3eef19c2e4ae5338dbdb01 Merge: 361535321874 832c6f2c29ec Author: Alexei Starovoitov Date: Wed Oct 31 16:53:18 2018 -0700 Merge branch 'verifier-fixes' Daniel Borkmann says: ==================== The series contains two fixes in BPF core and test cases. For details please see individual patches. Thanks! ==================== Signed-off-by: Alexei Starovoitov commit 832c6f2c29ec519b766923937f4f93fb1008b47d Author: Daniel Borkmann Date: Thu Nov 1 00:05:55 2018 +0100 bpf: test make sure to run unpriv test cases in test_verifier Right now unprivileged tests are never executed as a BPF test run, only loaded. Allow for running them as well so that we can check the outcome and probe for regressions. Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: Alexei Starovoitov commit 2683f4128c8730699296827d3209d2de80fa1d6c Author: Daniel Borkmann Date: Thu Nov 1 00:05:54 2018 +0100 bpf: add various test cases to test_verifier Add some more map related test cases to test_verifier kselftest to improve test coverage. Summary: 1012 PASSED, 0 SKIPPED, 0 FAILED Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: Alexei Starovoitov commit 4d31f30148cea6e97e42616231eed55295117fe7 Author: Daniel Borkmann Date: Thu Nov 1 00:05:53 2018 +0100 bpf: don't set id on after map lookup with ptr_to_map_val return In the verifier there is no such semantics where registers with PTR_TO_MAP_VALUE type have an id assigned to them. This is only used in PTR_TO_MAP_VALUE_OR_NULL and later on nullified once the test against NULL has been pattern matched and type transformed into PTR_TO_MAP_VALUE. Fixes: 3e6a4b3e0289 ("bpf/verifier: introduce BPF_PTR_TO_MAP_VALUE") Signed-off-by: Daniel Borkmann Cc: Roman Gushchin Acked-by: Alexei Starovoitov Signed-off-by: Alexei Starovoitov commit 0962590e553331db2cc0aef2dc35c57f6300dbbe Author: Daniel Borkmann Date: Thu Nov 1 00:05:52 2018 +0100 bpf: fix partial copy of map_ptr when dst is scalar ALU operations on pointers such as scalar_reg += map_value_ptr are handled in adjust_ptr_min_max_vals(). Problem is however that map_ptr and range in the register state share a union, so transferring state through dst_reg->range = ptr_reg->range is just buggy as any new map_ptr in the dst_reg is then truncated (or null) for subsequent checks. Fix this by adding a raw member and use it for copying state over to dst_reg. Fixes: f1174f77b50c ("bpf/verifier: rework value tracking") Signed-off-by: Daniel Borkmann Cc: Edward Cree Acked-by: Alexei Starovoitov Signed-off-by: Alexei Starovoitov commit 5b7449810ae6d652629c550d3974c8453836d229 Merge: 3dca04d694f1 bc3f4b5c60db Author: Linus Torvalds Date: Wed Oct 31 16:47:55 2018 -0700 Merge tag 'tag-chrome-platform-for-v4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/bleung/chrome-platform Pull chrome-platform updates from Benson Leung: - Move mfd/cros_ec_lpc* includes to drivers/platform from mfd - Adding a new interrupt path for cros_ec_lpc * tag 'tag-chrome-platform-for-v4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/bleung/chrome-platform: platform/chrome: chromeos_tbmc - Remove unneeded const platform/chrome: Add a new interrupt path for cros_ec_lpc mfd: cros_ec: Fix and improve kerneldoc comments. platform/chrome: Move mfd/cros_ec_lpc* includes to drivers/platform. commit 012ebc3b7801fcf424d0ebb4689c98f90a8593e0 Author: A.s. Dong Date: Tue Oct 30 15:28:14 2018 +0000 MAINTAINERS: add maintainer for IMX LPI2C driver The LPI2C is used in IMX7ULP/MX8 SoCs. Signed-off-by: Dong Aisheng Signed-off-by: Wolfram Sang commit 69819c7fc836e17a870a23a54b885a44afc89d85 Author: A.s. Dong Date: Tue Oct 30 15:28:11 2018 +0000 dt-bindings: i2c: i2c-imx-lpi2c: add imx8qxp compatible string Add imx8qxp compatible string Reviewed-by: Rob Herring Signed-off-by: Dong Aisheng Signed-off-by: Wolfram Sang commit 6f108dd70d3010c391c1e9f56f3f20d1f9e75450 Author: Charles Keepax Date: Fri Oct 19 09:59:58 2018 +0100 i2c: Clear client->irq in i2c_device_remove The IRQ will be mapped in i2c_device_probe only if client->irq is zero and i2c_device_remove does not clear this. When rebinding an I2C device, whos IRQ provider has also been rebound this means that an IRQ mapping will never be created, causing the I2C device to fail to acquire its IRQ. Fix this issue by clearing client->irq in i2c_device_remove, forcing i2c_device_probe to lookup the mapping again. Signed-off-by: Charles Keepax Reviewed-by: Benjamin Tissoires Signed-off-by: Wolfram Sang commit b9bb3fdf4e870fb655064f5c3c81c1fee7fd89ce Author: Charles Keepax Date: Fri Oct 19 09:59:57 2018 +0100 i2c: Remove unnecessary call to irq_find_mapping irq_create_mapping calls irq_find_mapping internally and will use the found mapping if one exists, so there is no need to manually call this from i2c_smbus_host_notify_to_irq. Signed-off-by: Charles Keepax Reviewed-by: Benjamin Tissoires Signed-off-by: Wolfram Sang commit ed956f3947a01ff9875cd908d7c1ef1fe7f47bf0 Author: Andrey Ryabinin Date: Mon Oct 22 23:30:40 2018 +0200 netfilter: ipset: fix ip_set_list allocation failure ip_set_create() and ip_set_net_init() attempt to allocate physically contiguous memory for ip_set_list. If memory is fragmented, the allocations could easily fail: vzctl: page allocation failure: order:7, mode:0xc0d0 Call Trace: dump_stack+0x19/0x1b warn_alloc_failed+0x110/0x180 __alloc_pages_nodemask+0x7bf/0xc60 alloc_pages_current+0x98/0x110 kmalloc_order+0x18/0x40 kmalloc_order_trace+0x26/0xa0 __kmalloc+0x279/0x290 ip_set_net_init+0x4b/0x90 [ip_set] ops_init+0x3b/0xb0 setup_net+0xbb/0x170 copy_net_ns+0xf1/0x1c0 create_new_namespaces+0xf9/0x180 copy_namespaces+0x8e/0xd0 copy_process+0xb61/0x1a00 do_fork+0x91/0x320 Use kvcalloc() to fallback to 0-order allocations if high order page isn't available. Signed-off-by: Andrey Ryabinin Signed-off-by: Jozsef Kadlecsik Signed-off-by: Pablo Neira Ayuso commit 886503f34d63e681662057448819edb5b1057a97 Author: Eric Westbrook Date: Tue Aug 28 15:14:42 2018 -0600 netfilter: ipset: actually allow allowable CIDR 0 in hash:net,port,net Allow /0 as advertised for hash:net,port,net sets. For "hash:net,port,net", ipset(8) says that "either subnet is permitted to be a /0 should you wish to match port between all destinations." Make that statement true. Before: # ipset create cidrzero hash:net,port,net # ipset add cidrzero 0.0.0.0/0,12345,0.0.0.0/0 ipset v6.34: The value of the CIDR parameter of the IP address is invalid # ipset create cidrzero6 hash:net,port,net family inet6 # ipset add cidrzero6 ::/0,12345,::/0 ipset v6.34: The value of the CIDR parameter of the IP address is invalid After: # ipset create cidrzero hash:net,port,net # ipset add cidrzero 0.0.0.0/0,12345,0.0.0.0/0 # ipset test cidrzero 192.168.205.129,12345,172.16.205.129 192.168.205.129,tcp:12345,172.16.205.129 is in set cidrzero. # ipset create cidrzero6 hash:net,port,net family inet6 # ipset add cidrzero6 ::/0,12345,::/0 # ipset test cidrzero6 fe80::1,12345,ff00::1 fe80::1,tcp:12345,ff00::1 is in set cidrzero6. See also: https://bugzilla.kernel.org/show_bug.cgi?id=200897 https://github.com/ewestbrook/linux/commit/df7ff6efb0934ab6acc11f003ff1a7580d6c1d9c Signed-off-by: Eric Westbrook Signed-off-by: Jozsef Kadlecsik Signed-off-by: Pablo Neira Ayuso commit 439cd39ea136d2c026805264d58a91f36b6b64ca Author: Stefano Brivio Date: Sat Jul 14 21:59:43 2018 +0200 netfilter: ipset: list:set: Decrease refcount synchronously on deletion and replace Commit 45040978c899 ("netfilter: ipset: Fix set:list type crash when flush/dump set in parallel") postponed decreasing set reference counters to the RCU callback. An 'ipset del' command can terminate before the RCU grace period is elapsed, and if sets are listed before then, the reference counter shown in userspace will be wrong: # ipset create h hash:ip; ipset create l list:set; ipset add l # ipset del l h; ipset list h Name: h Type: hash:ip Revision: 4 Header: family inet hashsize 1024 maxelem 65536 Size in memory: 88 References: 1 Number of entries: 0 Members: # sleep 1; ipset list h Name: h Type: hash:ip Revision: 4 Header: family inet hashsize 1024 maxelem 65536 Size in memory: 88 References: 0 Number of entries: 0 Members: Fix this by making the reference count update synchronous again. As a result, when sets are listed, ip_set_name_byindex() might now fetch a set whose reference count is already zero. Instead of relying on the reference count to protect against concurrent set renaming, grab ip_set_ref_lock as reader and copy the name, while holding the same lock in ip_set_rename() as writer instead. Reported-by: Li Shuang Fixes: 45040978c899 ("netfilter: ipset: Fix set:list type crash when flush/dump set in parallel") Signed-off-by: Stefano Brivio Signed-off-by: Jozsef Kadlecsik Signed-off-by: Pablo Neira Ayuso commit 3dca04d694f16cc74dc87de9a13547e2ffec81d7 Merge: 9bb9d4fdce9e ef70696a63c7 Author: Linus Torvalds Date: Wed Oct 31 16:20:28 2018 -0700 Merge tag 'riscv-for-linus-4.20-mw2' of git://git.kernel.org/pub/scm/linux/kernel/git/palmer/riscv-linux Pull more RISC-V updates from Palmer Dabbelt: "This contains the follow-on patches I'd like to target for the 4.20 merge window. I'm being somewhat conservative here, as while there are a few patches on the mailing list that were posted early in the merge window I'd like to let those bake for another round -- this was a fairly big release as far as RISC-V is concerened, and we need to walk before we can run. As far as the patches that made it go: - A patch to ignore offline CPUs when calculating AT_HWCAP. This should fix GDB on the HiFive unleashed, which has an embedded core for hart 0 which is exposed to Linux as an offline CPU. - A move of EM_RISCV to elf-em.h, which is where it should have been to begin with. - I've also removed the 64-bit divide routines. I know I'm not really playing by my own rules here because I posted the patches this morning, but since they shouldn't be in the kernel I think it's better to err on the side of going too fast here. I don't anticipate any more patch sets for the merge window" * tag 'riscv-for-linus-4.20-mw2' of git://git.kernel.org/pub/scm/linux/kernel/git/palmer/riscv-linux: Move EM_RISCV into elf-em.h RISC-V: properly determine hardware caps Revert "lib: Add umoddi3 and udivmoddi4 of GCC library routines" Revert "RISC-V: Select GENERIC_LIB_UMODDI3 on RV32" commit 1936f094e164cc13ebf17aba1d6b34e033e64188 Author: Naveen N. Rao Date: Wed Oct 31 22:48:13 2018 +0530 selftests/powerpc: Fix compilation issue due to asm label We are using 'dscr_insn' as a label in inline asm to identify if a SIGILL was generated by the mtspr instruction at that point. However, with inline assembly, the compiler is still free to duplicate the asm statement for optimization purposes, which results in the label being defined twice with the error: /tmp/ccerQCql.s:874: Error: symbol `dscr_insn' is already defined With different compiler versions, we may also see: /tmp/ccJzLDlN.o:(.toc+0x0): undefined reference to `dscr_insn' Remove the use of the label in the inline assembly. Instead, just look for the offending instruction in the signal handler. Fixes: d2bf793237b3 ("selftests/powerpc: Add test to verify rfi flush across a system call") Reported-by: Breno Leitao Signed-off-by: Naveen N. Rao Tested-by: Breno Leitao Signed-off-by: Michael Ellerman commit 9bb9d4fdce9e6b351b7b905f150745a0fccccc06 Merge: adb6b2b2b59f 917e2fd2c53e Author: Linus Torvalds Date: Wed Oct 31 15:46:16 2018 -0700 Merge branch 'for-linus-4.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml Pull UML updates from Richard Weinberger: - removal of old and dead code - a bug fix for our tty driver - other minor cleanups across the code base * 'for-linus-4.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml: um: Make line/tty semantics use true write IRQ um: trap: fix spelling mistake, EACCESS -> EACCES um: Don't hardcode path as it is architecture dependent um: NULL check before kfree is not needed um: remove unused AIO code um: Give start_idle_thread() a return code um: Remove update_debugregs() um: Drop own definition of PTRACE_SYSEMU/_SINGLESTEP commit adb6b2b2b59f7872322f255206583b4c3ce661a3 Merge: 9b5cf826ef8b 4d8106f0299c Author: Linus Torvalds Date: Wed Oct 31 15:39:25 2018 -0700 Merge tag 'for-linus' of git://linux-c6x.org/git/projects/linux-c6x-upstreaming Pull c6x update from Mark Salter. * tag 'for-linus' of git://linux-c6x.org/git/projects/linux-c6x-upstreaming: c6x: switch to NO_BOOTMEM commit 3615353218744bb60f55170c620ce4dce1a008c7 Author: Andrey Ignatov Date: Wed Oct 31 12:57:18 2018 -0700 libbpf: Fix compile error in libbpf_attach_type_by_name Arnaldo Carvalho de Melo reported build error in libbpf when clang version 3.8.1-24 (tags/RELEASE_381/final) is used: libbpf.c:2201:36: error: comparison of constant -22 with expression of type 'const enum bpf_attach_type' is always false [-Werror,-Wtautological-constant-out-of-range-compare] if (section_names[i].attach_type == -EINVAL) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~ 1 error generated. Fix the error by keeping "is_attachable" property of a program in a separate struct field instead of trying to use attach_type itself. Fixes: 956b620fcf0b ("libbpf: Introduce libbpf_attach_type_by_name") Reported-by: Arnaldo Carvalho de Melo Signed-off-by: Andrey Ignatov Tested-by: Arnaldo Carvalho de Melo Signed-off-by: Daniel Borkmann commit deee2cae27d1914850195e3fb219cc611e953560 Author: Li Zhijian Date: Tue Oct 30 11:15:55 2018 +0800 kselftests/bpf: use ping6 as the default ipv6 ping binary if it exists ping binary on some distros doesn't support "ping -6" anymore. Signed-off-by: Li Zhijian Acked-by: Song Liu Signed-off-by: Daniel Borkmann commit 29995d296e3e9ce4f9767963ecbef143ade26c36 Merge: 28fa741c27e6 5d4f0edaa3ac Author: Ingo Molnar Date: Wed Oct 31 22:53:40 2018 +0100 Merge tag 'perf-urgent-for-mingo-4.20-20181031' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent Pull perf/urgent improvements and fixes from Arnaldo Carvalho de Melo: - Fixes dealing with the removal of the fallback to looking up samples marked as userspace in the kernel maps, done recently: - For intel-pt, that was setting the synthesized header misc field as PERF_RECORD_MISC_USER, depending thus on the fallback to take place, now it sets as USER or KERNEL according to x86 specific knowledge. Also now it inserts the PERF_CONTEXT_{USER,KERNEL} into the PERF_SAMPLE_CALLCHAINs it synthesizes from hw traces (Adrian Hunter) - Similar fixes for the cs-etm ARM HW trace code, that used the Intel PT model as a starting point (Leo Yan) - For the "caller" callchain order, where the callchain returned by the kernel was simply reversed without taking into account the PERF_CONTEXT_{USER,KERNEL,etc} markers from where to define if an entry was for kernel or userspace, working just because the map lookup fallback was in place (David S. Miller) - Allow for selecting if 'overwrite' mode should be used in 'perf top' and make the default for it not to be used. This is due to problems with the current implementation where the pausing used ends up making 'perf top' miss PERF_RECORD_{MMAP,FORK,EXEC,etc} events, which with short lifetime threads workloads leads quickly to many "unknown" maps (and thus symbols) to appear in the UI. Workloads with long thread lifetimes and with few metadata events can still use --overwrite to take advantage of the overwrite mode (Arnaldo Carvalho de Melo) - Start 'perf top''s display thread earlier, so that the screen doesn't remain blank for too long at tool start (David S. Miller) - Don't clone maps from parent when synthesizing forks, to avoid the inevitable flurry of overlapping maps as we process the synthesized MMAP2 events that get delivered shortly thereafter. (David S. Miller) - Take pgoff into account when reporting elf to libdwfl, now the unwinding results are the same with elfutils's libdwfl and libunwind (Milian Wolff) - Update lotsa kernel ABI headers (Arnaldo Carvalho de Melo) - 'perf trace' syscall arg beautification improvements to allow for handling args such as mount's 'flags', where maks have to be ignored before considering what is left, that, if only zeroes, is suppressed like other args without such masks (Arnaldo Carvalho de Melo) - Beautify mount's 'source' and 'flags' args (Arnaldo Carvalho de Melo) - Generate mmap's flags bit constants from linux/mman.h and all the arch specific mman.h files, so that no changes in the main 'perf trace' source files is required when new flags get added (Arnaldo Carvalho de Melo) - Consider syscall aliases, so that 'perf trace -e umount' works and we don't have to use 'umount2' (that works as well, just not required) (Arnaldo Carvalho de Melo) Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit 9b5cf826ef8b607d452ba7bf683ae5510a745232 Merge: 31990f0f5366 5571f1e65486 Author: Linus Torvalds Date: Wed Oct 31 14:50:02 2018 -0700 Merge tag 'fuse-update-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse Pull fuse updates from Miklos Szeredi: "As well as the usual bug fixes, this adds the following new features: - cached readdir and readlink - max I/O size increased from 128k to 1M - improved performance and scalability of request queues - copy_file_range support The only non-fuse bits are trivial cleanups of macros in " * tag 'fuse-update-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse: (31 commits) fuse: enable caching of symlinks fuse: only invalidate atime in direct read fuse: don't need GETATTR after every READ fuse: allow fine grained attr cache invaldation bitops: protect variables in bit_clear_unless() macro bitops: protect variables in set_mask_bits() macro fuse: realloc page array fuse: add max_pages to init_out fuse: allocate page array more efficiently fuse: reduce size of struct fuse_inode fuse: use iversion for readdir cache verification fuse: use mtime for readdir cache verification fuse: add readdir cache version fuse: allow using readdir cache fuse: allow caching readdir fuse: extract fuse_emit() helper fuse: add FOPEN_CACHE_DIR fuse: split out readdir.c fuse: Use hash table to link processing request fuse: kill req->intr_unique ... commit 31990f0f5366a8f66688edae8688723b22034108 Merge: a9ac6cc47bbb ea4cdc548e5e Author: Linus Torvalds Date: Wed Oct 31 14:42:31 2018 -0700 Merge tag 'ceph-for-4.20-rc1' of git://github.com/ceph/ceph-client Pull ceph updates from Ilya Dryomov: "The highlights are: - a series that fixes some old memory allocation issues in libceph (myself). We no longer allocate memory in places where allocation failures cannot be handled and BUG when the allocation fails. - support for copy_file_range() syscall (Luis Henriques). If size and alignment conditions are met, it leverages RADOS copy-from operation. Otherwise, a local copy is performed. - a patch that reduces memory requirement of ceph_sync_read() from the size of the entire read to the size of one object (Zheng Yan). - fallocate() syscall is now restricted to FALLOC_FL_PUNCH_HOLE (Luis Henriques)" * tag 'ceph-for-4.20-rc1' of git://github.com/ceph/ceph-client: (25 commits) ceph: new mount option to disable usage of copy-from op ceph: support copy_file_range file operation libceph: support the RADOS copy-from operation ceph: add non-blocking parameter to ceph_try_get_caps() libceph: check reply num_data_items in setup_request_data() libceph: preallocate message data items libceph, rbd, ceph: move ceph_osdc_alloc_messages() calls libceph: introduce alloc_watch_request() libceph: assign cookies in linger_submit() libceph: enable fallback to ceph_msg_new() in ceph_msgpool_get() ceph: num_ops is off by one in ceph_aio_retry_work() libceph: no need to call osd_req_opcode_valid() in osd_req_encode_op() ceph: set timeout conditionally in __cap_delay_requeue libceph: don't consume a ref on pagelist in ceph_msg_data_add_pagelist() libceph: introduce ceph_pagelist_alloc() libceph: osd_req_op_cls_init() doesn't need to take opcode libceph: bump CEPH_MSG_MAX_DATA_LEN ceph: only allow punch hole mode in fallocate ceph: refactor ceph_sync_read() ceph: check if LOOKUPNAME request was aborted when filling trace ... commit 1b7619828d0c341612f58683e73f279c37e70bbc Author: Gustavo A. R. Silva Date: Mon Aug 27 17:13:06 2018 -0500 NTB: ntb_hw_idt: replace IS_ERR_OR_NULL with regular NULL checks Both devm_kcalloc() and devm_kzalloc() return NULL on error. They never return error pointers. The use of IS_ERR_OR_NULL is currently applied to the wrong context. Fix this by replacing IS_ERR_OR_NULL with regular NULL checks. Fixes: bf2a952d31d2 ("NTB: Add IDT 89HPESxNTx PCIe-switches support") Signed-off-by: Gustavo A. R. Silva Signed-off-by: Jon Mason commit 7756e2b5d68c36e170a111dceea22f7365f83256 Author: Dave Jiang Date: Tue Aug 28 17:13:59 2018 -0700 ntb: intel: fix return value for ndev_vec_mask() ndev_vec_mask() should be returning u64 mask value instead of int. Otherwise the mask value returned can be incorrect for larger vectors. Fixes: e26a5843f7f5 ("NTB: Split ntb_hw_intel and ntb_transport drivers") Signed-off-by: Dave Jiang Tested-by: Lucas Van Signed-off-by: Jon Mason commit a861594b1b7ffd630f335b351c4e9f938feadb8e Author: Jon Mason Date: Mon Jun 11 16:13:12 2018 -0400 ntb_netdev: fix sleep time mismatch The tx_time should be in usecs (according to the comment above the variable), but the setting of the timer during the rearming is done in msecs. Change it to match the expected units. Fixes: e74bfeedad08 ("NTB: Add flow control to the ntb_netdev") Suggested-by: Gerd W. Haeussler Signed-off-by: Jon Mason Acked-by: Dave Jiang commit e2acdddde01511c74e4f6f1d5951a0f5d9bea14a Merge: c4d63c714715 a5ee171d087e Author: David S. Miller Date: Wed Oct 31 12:56:59 2018 -0700 Merge branch 'mlxsw-Enable-minimum-shaper-on-MC-TCs' Ido Schimmel says: ==================== mlxsw: Enable minimum shaper on MC TCs Petr says: An MC-aware mode was introduced in commit 7b8195306694 ("mlxsw: spectrum: Configure MC-aware mode on mlxsw ports"). In MC-aware mode, BUM traffic gets a special treatment by being assigned to a separate set of traffic classes 8..15. Pairs of TCs 0 and 8, 1 and 9, etc., are then configured to strictly prioritize the lower-numbered ones. The intention is to prevent BUM traffic from flooding the switch and push out all UC traffic, which would otherwise happen, and instead give UC traffic precedence. However strictly prioritizing UC traffic has the effect that UC overload pushes out all BUM traffic, such as legitimate ARP queries. These packets are kept in queues for a while, but under sustained UC overload, their lifetime eventually expires and these packets are dropped. That is detrimental to network performance as well. In this patchset, MC TCs (8..15) are configured with minimum shaper of 200Mbps (a minimum permitted value) to allow a trickle of necessary control traffic to get through. First in patch #1, the QEEC register is extended with fields necessary to configure the minimum shaper. In patch #2, minimum shaper is enabled on TCs 8..15. In patches #3 and #4, first the MC-awareness test is tweaked to support the minimum shaper, and then a new test is introduced to test that MC traffic behaves well under UC overload. ==================== Signed-off-by: David S. Miller commit a5ee171d087ee632a5f190bb3ce1c0f98e06ec0a Author: Petr Machata Date: Wed Oct 31 09:56:46 2018 +0000 selftests: mlxsw: qos_mc_aware: Add a test for UC awareness In a previous patch, mlxsw was updated to configure a minimum bandwidth allowance on MC TCs. Test that this indeed fixes the problem of UC traffic overload pushing out all MC traffic. Fixes: b5638d46c90a ("selftests: mlxsw: Add a test for UC behavior under MC flood") Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 8f3f09358c81248109463b3cae254b7db4ea9af0 Author: Petr Machata Date: Wed Oct 31 09:56:45 2018 +0000 selftests: mlxsw: qos_mc_aware: Tweak for min shaper Since the minimum shaper is now being enabled for MC TCs, it's unreasonable to expect no UC traffic loss. Minimal min shaper value is 200Mbps, which is 20% of the 1Gbps that this test configures on egress. To cover for glitches, tolerate up to 25% UC degradation under MC overload. Fixes: b5638d46c90a ("selftests: mlxsw: Add a test for UC behavior under MC flood") Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 0fe64023162aef123de2f1993ba13a35a786e1de Author: Petr Machata Date: Wed Oct 31 09:56:44 2018 +0000 mlxsw: spectrum: Set minimum shaper on MC TCs An MC-aware mode was introduced in commit 7b8195306694 ("mlxsw: spectrum: Configure MC-aware mode on mlxsw ports"). In MC-aware mode, BUM traffic gets a special treatment by being assigned to a separate set of traffic classes 8..15. Pairs of TCs 0 and 8, 1 and 9, etc., are then configured to strictly prioritize the lower-numbered ones. The intention is to prevent BUM traffic from flooding the switch and push out all UC traffic, which would otherwise happen, and instead give UC traffic precedence. However strictly prioritizing UC traffic has the effect that UC overload pushes out all BUM traffic, such as legitimate ARP queries. These packets are kept in queues for a while, but under sustained UC overload, their lifetime eventually expires and these packets are dropped. That is detrimental to network performance as well. Therefore configure the MC TCs (8..15) with minimum shaper of 200Mbps (a minimum permitted value) to allow a trickle of necessary control traffic to get through. Fixes: 7b8195306694 ("mlxsw: spectrum: Configure MC-aware mode on mlxsw ports") Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 8b931821aa04823e2e5df0ae93937baabbd23286 Author: Petr Machata Date: Wed Oct 31 09:56:42 2018 +0000 mlxsw: reg: QEEC: Add minimum shaper fields Add QEEC.mise (minimum shaper enable) and QEEC.min_shaper_rate to enable configuration of minimum shaper. Increase the QEEC length to 0x20 as well: that's the length that the register has had for a long time now, but with the configurations that mlxsw typically exercises, the firmware tolerated 0x1C-sized packets. With mise=true however, FW rejects packets unless they have the full required length. Fixes: b9b7cee40579 ("mlxsw: reg: Add QoS ETS Element Configuration register") Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit c4d63c714715bc44fee3f7a818052e59216a7d8e Merge: d48051c5b837 29118ab962d5 Author: David S. Miller Date: Wed Oct 31 12:42:39 2018 -0700 Merge branch 'hns3-fixes' Huazhong Tan says: ==================== Bugfix for the HNS3 driver This patch series include bugfix for the HNS3 ethernet controller driver. Change log: V4->V5: Fixes comments from Joe Perches & Sergei Shtylyov V3->V4: Fixes comments from Sergei Shtylyov V2->V3: Fixes comments from Sergei Shtylyov V1->V2: Fixes the compilation break reported by kbuild test robot http://patchwork.ozlabs.org/patch/989818/ ==================== Signed-off-by: David S. Miller commit 29118ab962d5476fdc65fae312ac38db68092d78 Author: Huazhong Tan Date: Tue Oct 30 21:50:53 2018 +0800 net: hns3: bugfix for rtnl_lock's range in the hclgevf_reset() Since hclgevf_reset_wait() is used to wait for the hardware to complete the reset, it is not necessary to hold the rtnl_lock during hclgevf_reset_wait(). So this patch releases the lock for the duration of hclgevf_reset_wait(). Fixes: 6988eb2a9b77 ("net: hns3: Add support to reset the enet/ring mgmt layer") Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit a963052e539887df481d4d3a6ad4c92ca6461852 Author: Huazhong Tan Date: Tue Oct 30 21:50:52 2018 +0800 net: hns3: bugfix for rtnl_lock's range in the hclge_reset() Since hclge_reset_wait() is used to wait for the hardware to complete the reset, it is not necessary to hold the rtnl_lock during hclge_reset_wait(). So this patch releases the lock for the duration of hclge_reset_wait(). Fixes: 6d4fab39533f ("net: hns3: Reset net device with rtnl_lock") Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 3c88ed1d798da355859ca083d3884a16ce0841f2 Author: Huazhong Tan Date: Tue Oct 30 21:50:51 2018 +0800 net: hns3: bugfix for handling mailbox while the command queue reinitialized In a multi-core machine, the mailbox service and reset service will be executed at the same time. The reset service will re-initialize the command queue, before that, the mailbox handler can only get some invalid messages. The HCLGE_STATE_CMD_DISABLE flag means that the command queue is not available and needs to be reinitialized. Therefore, when the mailbox handler recognizes this flag, it should not process the command. Fixes: dde1a86e93ca ("net: hns3: Add mailbox support to PF driver") Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 7fa6be4fd2f60399f3f3370a87629e102407a724 Author: Huazhong Tan Date: Tue Oct 30 21:50:50 2018 +0800 net: hns3: fix incorrect return value/type of some functions There are some functions that, when they fail to send the command, need to return the corresponding error value to its caller. Fixes: 46a3df9f9718 ("net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support") Fixes: 681ec3999b3d ("net: hns3: fix for vlan table lost problem when resetting") Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 1c12493809924deda6c0834cb2f2c5a6dc786390 Author: Huazhong Tan Date: Tue Oct 30 21:50:49 2018 +0800 net: hns3: bugfix for hclge_mdio_write and hclge_mdio_read When there is a PHY, the driver needs to complete some operations through MDIO during reset reinitialization, so HCLGE_STATE_CMD_DISABLE is more suitable than HCLGE_STATE_RST_HANDLING to prevent the MDIO operation from being sent during the hardware reset. Fixes: b50ae26c57cb ("net: hns3: never send command queue message to IMP when reset) Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 6d71ec6cbf74ac9c2823ef751b1baa5b889bb3ac Author: Huazhong Tan Date: Tue Oct 30 21:50:48 2018 +0800 net: hns3: bugfix for is_valid_csq_clean_head() The HEAD pointer of the hardware command queue maybe equal to the command queue's next_to_use in the driver, so that does not belong to the invalid HEAD pointer, since the hardware may not process the command in time, causing the HEAD pointer to be too late to update. The variables' name in this function is unreadable, so give them a more readable one. Fixes: 3ff504908f95 ("net: hns3: fix a dead loop in hclge_cmd_csq_clean") Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 5faaf0752a0c43735b7c508dcf3c4c7b36a032db Author: Huazhong Tan Date: Tue Oct 30 21:50:47 2018 +0800 net: hns3: remove unnecessary queue reset in the hns3_uninit_all_ring() It is not necessary to reset the queue in the hns3_uninit_all_ring(), since the queue is stopped in the down operation, and will be reset in the up operation. And the judgment of the HCLGE_STATE_RST_HANDLING flag in the hclge_reset_tqp() is not correct, because we need to reset tqp during pf reset, otherwise it may cause queue not being reset to working state problem. Fixes: 76ad4f0ee747 ("net: hns3: Add support of HNS3 Ethernet Driver for hip08 SoC") Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit b2f74dbaf12bf59ff35d451005b3cdee78232ff0 Author: Huazhong Tan Date: Tue Oct 30 21:50:46 2018 +0800 net: hns3: bugfix for the initialization of command queue's spin lock The spin lock of the command queue only need to be initialized once when the driver initializes the command queue. It is not necessary to initialize the spin lock when resetting. At the same time, the modification of the queue member should be performed after acquiring the lock. Fixes: 3efb960f056d ("net: hns3: Refactor the initialization of command queue") Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 0d4411408a7fb9aad0645f23911d9bfdd2ce3177 Author: Huazhong Tan Date: Tue Oct 30 21:50:45 2018 +0800 net: hns3: bugfix for reporting unknown vector0 interrupt repeatly problem The current driver supports handling two vector0 interrupts, reset and mailbox. When the hardware reports an interrupt of another type of interrupt source, if the driver does not process the interrupt, but enables the interrupt, the hardware will repeatedly report the unknown interrupt. Therefore, the driver enables the vector0 interrupt after clearing the known type of interrupt source. Other conditions are not enabled. Fixes: cd8c5c269b1d ("net: hns3: Fix for hclge_reset running repeatly problem") Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 73b907a083b8a8c1c62cb494bc9fbe6ae086c460 Author: Huazhong Tan Date: Tue Oct 30 21:50:44 2018 +0800 net: hns3: bugfix for buffer not free problem during resetting When hns3_get_ring_config()/hns3_queue_to_ring()/ hns3_get_vector_ring_chain() failed during resetting, the allocated memory has not been freed before these three functions return. So this patch adds error handler in these functions to fix it. Fixes: 76ad4f0ee747 ("net: hns3: Add support of HNS3 Ethernet Driver for hip08 SoC") Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit ece4bf46e98c9f3775a488f3932a531508d3b1a2 Author: Huazhong Tan Date: Tue Oct 30 21:50:43 2018 +0800 net: hns3: add error handler for hns3_nic_init_vector_data() When hns3_nic_init_vector_data() fails to map ring to vector, it should cancel the netif_napi_add() that has been successfully done and then exits. Fixes: 76ad4f0ee747 ("net: hns3: Add support of HNS3 Ethernet Driver for hip08 SoC") Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit d48051c5b8376038c2b287c3b1bd55b8d391d567 Author: Eric Dumazet Date: Tue Oct 30 00:57:25 2018 -0700 net/mlx5e: fix csum adjustments caused by RXFCS As shown by Dmitris, we need to use csum_block_add() instead of csum_add() when adding the FCS contribution to skb csum. Before 4.18 (more exactly commit 88078d98d1bb "net: pskb_trim_rcsum() and CHECKSUM_COMPLETE are friends"), the whole skb csum was thrown away, so RXFCS changes were ignored. Then before commit d55bef5059dd ("net: fix pskb_trim_rcsum_slow() with odd trim offset") both mlx5 and pskb_trim_rcsum_slow() bugs were canceling each other. Now we fixed pskb_trim_rcsum_slow() we need to fix mlx5. Note that this patch also rewrites mlx5e_get_fcs() to : - Use skb_header_pointer() instead of reinventing it. - Use __get_unaligned_cpu32() to avoid possible non aligned accesses as Dmitris pointed out. Fixes: 902a545904c7 ("net/mlx5e: When RXFCS is set, add FCS data into checksum calculation") Reported-by: Paweł Staszewski Signed-off-by: Eric Dumazet Cc: Eran Ben Elisha Cc: Saeed Mahameed Cc: Dimitris Michailidis Cc: Cong Wang Cc: Paweł Staszewski Reviewed-by: Eran Ben Elisha Tested-By: Maria Pasechnik Signed-off-by: David S. Miller commit ff002269a4ee9c769dbf9365acef633ebcbd6cbe Author: Jason Wang Date: Tue Oct 30 14:10:49 2018 +0800 vhost: Fix Spectre V1 vulnerability The idx in vhost_vring_ioctl() was controlled by userspace, hence a potential exploitation of the Spectre variant 1 vulnerability. Fixing this by sanitizing idx before using it to index d->vqs. Cc: Michael S. Tsirkin Cc: Josh Poimboeuf Cc: Andrea Arcangeli Signed-off-by: Jason Wang Signed-off-by: David S. Miller commit b1c234441e07da748ccded3aaa37177622d469d3 Author: Bo YU Date: Mon Oct 29 23:42:10 2018 -0400 net: drop a space before tabs Fix a warning from checkpatch.pl:'please no space before tabs' in include/net/af_unix.h Signed-off-by: Bo YU Signed-off-by: David S. Miller commit c4147beabec19fc7b37eb79251114bad3e9915dd Author: Bo YU Date: Mon Oct 29 23:42:09 2018 -0400 net: add an identifier name for 'struct sock *' Fix a warning from checkpatch: function definition argument 'struct sock *' should also have an identifier name in include/net/af_unix.h. Signed-off-by: Bo YU Signed-off-by: David S. Miller commit e7611088f0357339d8c30540222debfa24095d4b Author: Colin Ian King Date: Mon Oct 29 22:46:11 2018 +0000 net: hns3: fix spelling mistake "intrerrupt" -> "interrupt" Trivial fix to spelling mistake in dev_err message Signed-off-by: Colin Ian King Signed-off-by: David S. Miller commit ef70696a63c773280ef46f5764a6cda39ef2f383 Merge: 9b4789eacb65 0ef08ca36a3a Author: Palmer Dabbelt Date: Wed Oct 31 12:13:54 2018 -0700 lib: Remove umoddi3 and udivmoddi4 These were only necessary for an out-of-tree driver that has since been fixed to use the proper divide routines. I've simply reverted the pair of commits we made last week. Signed-off-by: Palmer Dabbelt commit 9b4789eacb654b7bbc806c831bcebd799ae0e2f5 Author: Palmer Dabbelt Date: Mon Jun 25 13:23:12 2018 -0700 Move EM_RISCV into elf-em.h This should never have been inside our arch port to begin with, it's just a relic from when we were maintaining out of tree patches. Reviewed-by: Kees Cook Reviewed-by: Paul Walmsley Reviewed-by: Christoph Hellwig Tested-by: David Abdurachmanov Signed-off-by: Palmer Dabbelt commit 732e8e4130ffccb618390e0f80a884543e61fd61 Author: Andreas Schwab Date: Tue Oct 23 09:33:47 2018 +0200 RISC-V: properly determine hardware caps On the Hifive-U platform, cpu 0 is a masked cpu with less capabilities than the other cpus. Ignore it for the purpose of determining the hardware capabilities of the system. Signed-off-by: Andreas Schwab Signed-off-by: Palmer Dabbelt commit 0ef08ca36a3aafbf0dcce7b3c2c4b6b664ce56bd Author: Palmer Dabbelt Date: Fri Oct 26 12:38:11 2018 -0700 Revert "lib: Add umoddi3 and udivmoddi4 of GCC library routines" We don't want 64-bit divide in the kernel. This reverts commit 6315730e9eab7de5fa9864bb13a352713f48aef1. Signed-off-by: Palmer Dabbelt commit 3b306f6f3a03c285a7044350d263cb9251def49d Author: Palmer Dabbelt Date: Fri Oct 26 12:37:43 2018 -0700 Revert "RISC-V: Select GENERIC_LIB_UMODDI3 on RV32" I'm removing the generic 64-bit divide support, which means this will no longer work. This reverts commit 757331db921428295948fed5e7377a436e66d34e. Signed-off-by: Palmer Dabbelt commit a9ac6cc47bbb0fdd042012044f737ba13da10cb4 Merge: d547d44e5c5d 217188d9f985 Author: Linus Torvalds Date: Wed Oct 31 11:41:37 2018 -0700 Merge tag 'fbdev-v4.20' of https://github.com/bzolnier/linux Pull fbdev updates from Bartlomiej Zolnierkiewicz: "No major changes to the subsystem itself, mainly fb drivers fixes & cleanups (atyfb & udlfb updates stand out from the rest) + removal of no longer needed old clps711xfb driver. Details: - update atyfb driver - improvements for ATI Mach64 chips: detect the dot clock divider correctly on Sparc, fix display corruptions (due to endianness issues and improper reading of accelerator registers), optimize scrolling performance and also fix debugging printks (Mikulas Patocka) - rewrite USB unplug handling in udlfb driver using framebuffer subsystem reference counting (Mikulas Patocka) - fix support for native-mode display-timings in atmel_lcdfb driver (Sam Ravnborg) - fix information leak & add missing access_ok() checks in sbuslib (Dan Carpenter) - allow using GPIO expanders that can sleep in ssd1307fb driver (Michal Vokáč) - convert omapfb driver to use GPIO descriptors instead of GPIO numbers for Amstrad Delta board (Janusz Krzysztofik) - fix broken Kconfig menu dependencies (Randy Dunlap) - convert fbdev subsystem to use %pOFn instead of device_node.name (Rob Herring) - remove the dead old CLPS711x LCD support driver (the new CLPS711x LCD support driver is still available) - misc fixes (Jia-Ju Bai, Gustavo A. R. Silva) - misc cleanups (Mehdi Bounya, Nathan Chancellor, YueHaibing)" * tag 'fbdev-v4.20' of https://github.com/bzolnier/linux: (22 commits) video: fbdev: remove redundant 'default n' from Kconfig-s video: fbdev: remove dead old CLPS711x LCD support driver Revert "video: ssd1307fb: Do not hard code active-low reset sequence" video: fbdev: arcfb: mark expected switch fall-through pxa168fb: remove set but not used variables 'mi' video: ssd1307fb: Do not hard code active-low reset sequence video: ssd1307fb: Use gpiod_set_value_cansleep() for reset fbdev: fix broken menu dependencies video: fbdev: sis: Remove unnecessary parentheses and commented code video: fbdev: omapfb: lcd_ams_delta: use GPIO lookup table fbdev: sbuslib: integer overflow in sbusfb_ioctl_helper() fbdev: sbuslib: use checked version of put_user() fbdev: Convert to using %pOFn instead of device_node.name atmel_lcdfb: support native-mode display-timings Video: vgastate: fixed a spacing coding style atyfb: fix debugging printks mach64: optimize wait_for_fifo mach64: fix image corruption due to reading accelerator registers mach64: fix display corruption on big endian machines mach64: detect the dot clock divider correctly on sparc ... commit d547d44e5c5dd82b32c2399632b254395a099072 Merge: 519f64bf15dc c2b59d279dbb Author: Linus Torvalds Date: Wed Oct 31 11:28:12 2018 -0700 Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux Pull thermal management updates from Zhang Rui: - Fix a use-after-free issue when unregistering a thermal cooling device (Dmitry Osipenko) - use power_efficient_wq for thermal worker to save more power (Jeson Gao) * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux: thermal: core: using power_efficient_wq for thermal worker thermal: core: Fix use-after-free in thermal_cooling_device_destroy_sysfs commit a324e9396ca3d00e1101476ba067b412e0aba232 Author: Borislav Petkov Date: Wed Oct 31 19:20:20 2018 +0100 EDAC, skx: Fix randconfig builds The driver depends on the ADXL component glue and selects it. However, ADXL itself implicitly depends on ACPI and in nonsensical randconfig builds like this: # CONFIG_ACPI is not set CONFIG_ACPI_ADXL=y where ACPI is not enabled, the build fails with: drivers/edac/skx_edac.o: In function `skx_mce_check_error': skx_edac.c:(.text+0xab): undefined reference to `adxl_decode' drivers/edac/skx_edac.o: In function `skx_init': skx_edac.c:(.init.text+0x8bf): undefined reference to `adxl_get_component_names' make: *** [vmlinux] Error 1 Add stubs for that case so that the build succeeds. CONFIG_ACPI=n doesn't make any sense for real configurations but this fix will at least silence randconfig builds. Signed-off-by: Borislav Petkov Acked-by: Tony Luck Cc: "Rafael J. Wysocki" commit 519f64bf15dccb4f64af34b74ed186c32363ab59 Merge: 0c86e761b951 9a1d6b232bed Author: Linus Torvalds Date: Wed Oct 31 11:08:30 2018 -0700 Merge tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux Pull clk updates from Stephen Boyd: "This time it looks like a quieter release cycle in the clk tree. I guess that's because of summer time holidays/vacations. The biggest change in the diffstat is in the Qualcomm clk driver, where they got support for CPUs and handful of SoCs. After that, the at91 driver got a major rewrite for newer DT bindings that should make things easier going forward and the TI code moved to a clockdomain based design. The long tail is mostly small driver updates for newer clks and some simpler SoC clock drivers such as the Hisilicon and imx support. In the core framework, we only have two small changes this time. One is a new clk API to get all clks for a device with the bulk clk APIs. This allows drivers that don't care about doing anything besides turning on all the clks to just clk_get() them all and turn them on. The other change is the beginning of a way to support save and restore of clk settings in the clk framework. TI is the only user right now, but we will want to expand upon this design in the future to support more save and restore of clk registers. At least this gets us started and works well enough for one SoC, but there's more work in the future. Core: - clk_bulk_get_all() API and friends to get all the clks for a device - Basic clk state save/restore hooks New Drivers: - Renesas RZ/A2 (R7S9210) SoC, including early clocks - Rensas RZ/G1N (R8A7744) and RZ/G2E (R8A774C0) SoCs - Rensas RZ/G2M (r8a774a1) SoC - Qualcomm Krait CPU clk support - Qualcomm QCS404 GCC support - Qualcomm SDM660 GCC support - Qualcomm SDM845 camera clock controller - Ingenic jz4725b CGU - Hisilicon 3670 SoC support - TI SCI clks on K3 SoCs - iMX6 MMDC clks - Reset Controller (RMU) support for Actions Semi Owl S900 and S700 SoCs Updates: - Rework at91 PMC clock driver for new DT bindings - Nvidia Tegra clk driver MBIST workaround fix - S2RAM support for Marvell mvebu periph clks - Use updated printk format for OF node names - Fix TI code to only search DT subnodes - Various static analysis finds - Tag various drivers with SPDX license tags - Support dynamic frequency switching (DFS) on qcom SDM845 GCC - Only use s2mps11 dt-binding defines instead of redefining them in the driver - Add some more missing clks to qcom MSM8996 GCC - Quad SPI clks on qcom SDM845 - Add support for CMT timer clocks on R-Car V3H - Add support for SHDI and various timer clocks on R-Car V3M - Improve OSC and RCLK (watchdog) handling on R-Car Gen3 SoCs - Amlogic clk-pll driver improvements and updates - Amlogic axg audio controller system clocks - Register Amlogic meson8b clock controller early - Add support for SATA and Fine Display Processor (FDP) clocks on R-Car M3-N - Consolidation of system suspend related code in Exynos, S5P, S3C SoC clk drivers - Fixes for system suspend support on Exynos542x (Odroid boards) and Exynos5433 SoC - Remove obsoleted Exynos4212 ISP clock definitions - Migrated TI am3/4/5 and dra7 SoCs to clockdomain based design - TI RTC+DDR sleep mode support for clock save/restore - Allwinner A64 display engine support and fixes - Allwinner A83t display engine support and fixes" * tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: (186 commits) clk: qcom: Remove unused arrays in SDM845 GCC clk: fixed-rate: fix of_node_get-put imbalance clk: s2mps11: Add used attribute to s2mps11_dt_match clk: qcom: gcc-sdm660: Add MODULE_LICENSE clk: qcom: Add safe switch hook for krait mux clocks dt-bindings: clock: Document qcom,krait-cc clk: qcom: Add Krait clock controller driver dt-bindings: arm: Document qcom,kpss-gcc clk: qcom: Add KPSS ACC/GCC driver clk: qcom: Add support for Krait clocks clk: qcom: Add IPQ806X's HFPLLs clk: qcom: Add MSM8960/APQ8064's HFPLLs dt-bindings: clock: Document qcom,hfpll clk: qcom: Add HFPLL driver clk: qcom: Add support for High-Frequency PLLs (HFPLLs) ARM: Add Krait L2 register accessor functions clk: imx6q: add mmdc0 ipg clock clk: imx6sl: add mmdc ipg clocks clk: imx6sll: add mmdc1 ipg clock clk: imx6sx: add mmdc1 ipg clock ... commit 6702185c1ffec3421181b5e24491e3fac920cb61 Author: Radoslaw Tyl Date: Mon Oct 22 08:44:31 2018 +0200 ixgbe: fix MAC anti-spoofing filter after VFLR This change resolves a driver bug where the driver is logging a message that says "Spoofed packets detected". This can occur on the PF (host) when a VF has VLAN+MACVLAN enabled and is re-started with a different MAC address. MAC and VLAN anti-spoofing filters are to be enabled together. Signed-off-by: Radoslaw Tyl Tested-by: Andrew Bowers Acked-by: Piotr Skajewski Signed-off-by: Jeff Kirsher commit 0c86e761b95131943c2b8af2ffb3c0554f9a71f5 Merge: b3491d8430dd 104c7405a64d Author: Linus Torvalds Date: Wed Oct 31 11:01:38 2018 -0700 Merge tag 'vfio-v4.20-rc1.v2' of git://github.com/awilliam/linux-vfio Pull VFIO updates from Alex Williamson: - EDID interfaces for vfio devices supporting display extensions (Gerd Hoffmann) - Generically select Type-1 IOMMU model support on ARM/ARM64 (Geert Uytterhoeven) - Quirk for VFs reporting INTx pin (Alex Williamson) - Fix error path memory leak in MSI support (Li Qiang) * tag 'vfio-v4.20-rc1.v2' of git://github.com/awilliam/linux-vfio: vfio: add edid support to mbochs sample driver vfio: add edid api for display (vgpu) devices. drivers/vfio: Allow type-1 IOMMU instantiation with all ARM/ARM64 IOMMUs vfio/pci: Mask buggy SR-IOV VF INTx support vfio/pci: Fix potential memory leak in vfio_msi_cap_len commit bb58fd7eeffc9bd5d6e2a16cbf0e9e259f8d09f2 Author: Mitch Williams Date: Fri Oct 19 14:11:03 2018 -0700 i40e: Update status codes Add a few new status code which will be used by the ice driver, and rename a few to make them more consistent. Error code are mapped to similar values as in i40e_status.h, so as to be compatible with older VF drivers not using this status enum. Signed-off-by: Mitch Williams Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit b3491d8430dd25f0a4e00c33d60da22a9bd9d052 Merge: 59fc453b21f7 e4183d3256e3 Author: Linus Torvalds Date: Wed Oct 31 10:53:29 2018 -0700 Merge tag 'media/v4.20-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull new experimental media request API from Mauro Carvalho Chehab: "A new media request API This API is needed to support device drivers that can dynamically change their parameters for each new frame. The latest versions of Google camera and codec HAL depends on such feature. At this stage, it supports only stateless codecs. It has been discussed for a long time (at least over the last 3-4 years), and we finally reached to something that seem to work. This series contain both the API and core changes required to support it and a new m2m decoder driver (cedrus). As the current API is still experimental, the only real driver using it (cedrus) was added at staging[1]. We intend to keep it there for a while, in order to test the API. Only when we're sure that this API works for other cases (like encoders), we'll move this driver out of staging and set the API into a stone. [1] We added support for the vivid virtual driver (used only for testing) to it too, as it makes easier to test the API for the ones that don't have the cedrus hardware" * tag 'media/v4.20-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (53 commits) media: dt-bindings: Document the Rockchip VPU bindings media: platform: Add Cedrus VPU decoder driver media: dt-bindings: media: Document bindings for the Cedrus VPU driver media: v4l: Add definition for the Sunxi tiled NV12 format media: v4l: Add definitions for MPEG-2 slice format and metadata media: videobuf2-core: Rework and rename helper for request buffer count media: v4l2-ctrls.c: initialize an error return code with zero media: v4l2-compat-ioctl32.c: add missing documentation for a field media: media-request: update documentation media: media-request: EPERM -> EACCES/EBUSY media: v4l2-ctrls: improve media_request_(un)lock_for_update media: v4l2-ctrls: use media_request_(un)lock_for_access media: media-request: add media_request_(un)lock_for_access media: vb2: set reqbufs/create_bufs capabilities media: videodev2.h: add new capabilities for buffer types media: buffer.rst: only set V4L2_BUF_FLAG_REQUEST_FD for QBUF media: v4l2-ctrls: return -EACCES if request wasn't completed media: media-request: return -EINVAL for invalid request_fds media: vivid: add request support media: vivid: add mc ... commit 48e01e001da31d5a40e31ed5f8cea83a18823cc1 Author: Jeff Kirsher Date: Thu Oct 18 15:39:43 2018 -0700 ixgbe/ixgbevf: fix XFRM_ALGO dependency Based on the original work from Arnd Bergmann. When XFRM_ALGO is not enabled, the new ixgbe IPsec code produces a link error: drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.o: In function `ixgbe_ipsec_vf_add_sa': ixgbe_ipsec.c:(.text+0x1266): undefined reference to `xfrm_aead_get_byname' Simply selecting XFRM_ALGO from here causes circular dependencies, so to fix it, we probably want this slightly more complex solution that is similar to what other drivers with XFRM offload do: A separate Kconfig symbol now controls whether we include the IPsec offload code. To keep the old behavior, this is left as 'default y'. The dependency in XFRM_OFFLOAD still causes a circular dependency but is not actually needed because this symbol is not user visible, so removing that dependency on top makes it all work. CC: Arnd Bergmann CC: Shannon Nelson Fixes: eda0333ac293 ("ixgbe: add VF IPsec management") Signed-off-by: Jeff Kirsher Tested-by: Andrew Bowers commit 35ae5414e7085dfabe3d1737569eff549b04942e Author: Jacob Keller Date: Mon Oct 15 12:21:28 2018 -0700 fm10k: bump driver version to match out-of-tree release The upstream and out-of-tree drivers are once again at comparable functionality. It's been a while since we updated the upstream driver version, so bump it now. Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 9a1fe1e2bbc4194103bd6f5f8d78383d3bef41ae Author: Jacob Keller Date: Mon Oct 15 12:18:29 2018 -0700 fm10k: add missing device IDs to the upstream driver The device IDs for the Ethernet SDI Adapter devices were never added to the upstream driver. The IDs are already in the pci.ids database, and are supported by the out-of-tree driver. Add the device IDs now, so that the upstream driver can recognize and load these devices. Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit e330af788998b0de4da4f5bd7ddd087507999800 Author: Jacob Keller Date: Mon Oct 15 12:18:28 2018 -0700 fm10k: ensure completer aborts are marked as non-fatal after a resume VF drivers can trigger PCIe completer aborts any time they read a queue that they don't own. Even in nominal circumstances, it is not possible to prevent the VF driver from reading queues it doesn't own. VF drivers may attempt to read queues it previously owned, but which it no longer does due to a PF reset. Normally these completer aborts aren't an issue. However, on some platforms these trigger machine check errors. This is true even if we lower their severity from fatal to non-fatal. Indeed, we already have code for lowering the severity. We could attempt to mask these errors conditionally around resets, which is the most common time they would occur. However this would essentially be a race between the PF and VF drivers, and we may still occasionally see machine check exceptions on these strictly configured platforms. Instead, mask the errors entirely any time we resume VFs. By doing so, we prevent the completer aborts from being sent to the parent PCIe device, and thus these strict platforms will not upgrade them into machine check errors. Additionally, we don't lose any information by masking these errors, because we'll still report VFs which attempt to access queues via the FUM_BAD_VF_QACCESS errors. Without this change, on platforms where completer aborts cause machine check exceptions, the VF reading queues it doesn't own could crash the host system. Masking the completer abort prevents this, so we should mask it for good, and not just around a PCIe reset. Otherwise malicious or misconfigured VFs could cause the host system to crash. Because we are masking the error entirely, there is little reason to also keep setting the severity bit, so that code is also removed. Signed-off-by: Jacob Keller Signed-off-by: Jeff Kirsher commit e69e40c8066c0e2fafd63a5919cb9b2fb9f81f2e Author: Ngai-Mint Kwan Date: Mon Oct 15 12:18:27 2018 -0700 fm10k: fix SM mailbox full condition Current condition will always incorrectly report a full SM mailbox if an IES API application is not running. Due to this, the "fm10k_service_task" will be infinitely queued into the driver's workqueue. This, in turn, will cause a "kworker" thread to report 100% CPU utilization and might cause "soft lockup" events or system crashes. To fix this issue, a new condition is added to determine if the SM mailbox is in the correct state of FM10K_STATE_OPEN before proceeding. In other words, an instance of the IES API must be running. If there is, the remainder of the flow stays the same which is to determine if the SM mailbox capacity has been exceeded or not and take appropriate action. Signed-off-by: Ngai-Mint Kwan Signed-off-by: Jacob Keller Signed-off-by: Jeff Kirsher commit 094bf4d0e9657f6ea1ee3d7e07ce3970796949ce Author: Miroslav Lichvar Date: Fri Oct 12 13:13:39 2018 +0200 igb: shorten maximum PHC timecounter update interval The timecounter needs to be updated at least once per ~550 seconds in order to avoid a 40-bit SYSTIM timestamp to be misinterpreted as an old timestamp. Since commit 500462a9d ("timers: Switch to a non-cascading wheel"), scheduling of delayed work seems to be less accurate and a requested delay of 540 seconds may actually be longer than 550 seconds. Shorten the delay to 480 seconds to be sure the timecounter is updated in time. This fixes an issue with HW timestamps on 82580/I350/I354 being off by ~1100 seconds for few seconds every ~9 minutes. Cc: Jacob Keller Cc: Richard Cochran Cc: Thomas Gleixner Signed-off-by: Miroslav Lichvar Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher commit 59fc453b21f767f2fb0ff4dc0a947e9b9c9e6d14 Merge: 310c7585e830 2ebe82288b32 Author: Linus Torvalds Date: Wed Oct 31 09:25:15 2018 -0700 Merge branch 'akpm' (patches from Andrew) Merge more updates from Andrew Morton: - the rest of MM - lib/bitmap updates - hfs updates - fatfs updates - various other misc things * emailed patches from Andrew Morton : (94 commits) mm/gup.c: fix __get_user_pages_fast() comment mm: Fix warning in insert_pfn() memory-hotplug.rst: add some details about locking internals powerpc/powernv: hold device_hotplug_lock when calling memtrace_offline_pages() powerpc/powernv: hold device_hotplug_lock when calling device_online() mm/memory_hotplug: fix online/offline_pages called w.o. mem_hotplug_lock mm/memory_hotplug: make add_memory() take the device_hotplug_lock mm/memory_hotplug: make remove_memory() take the device_hotplug_lock mm/memblock.c: warn if zero alignment was requested memblock: stop using implicit alignment to SMP_CACHE_BYTES docs/boot-time-mm: remove bootmem documentation mm: remove include/linux/bootmem.h memblock: replace BOOTMEM_ALLOC_* with MEMBLOCK variants mm: remove nobootmem memblock: rename __free_pages_bootmem to memblock_free_pages memblock: rename free_all_bootmem to memblock_free_all memblock: replace free_bootmem_late with memblock_free_late memblock: replace free_bootmem{_node} with memblock_free mm: nobootmem: remove bootmem allocation APIs memblock: replace alloc_bootmem with memblock_alloc ... commit 5d4f0edaa3ac4f1844ed7c64cd2bae6f1912bac5 Author: Adrian Hunter Date: Wed Oct 31 11:10:43 2018 +0200 perf intel-pt/bts: Calculate cpumode for synthesized samples In the absence of a fallback, samples must provide a correct cpumode for the 'ip'. Do that now there is no fallback. Signed-off-by: Adrian Hunter Reviewed-by: Jiri Olsa Cc: Andi Kleen Cc: David S. Miller Cc: Leo Yan Cc: Mathieu Poirier Cc: stable@vger.kernel.org # 4.19 Link: http://lkml.kernel.org/r/20181031091043.23465-6-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 242483068b4b9ad02f1653819b6e683577681e0e Author: Adrian Hunter Date: Wed Oct 31 11:10:42 2018 +0200 perf intel-pt: Insert callchain context into synthesized callchains In the absence of a fallback, callchains must encode also the callchain context. Do that now there is no fallback. Signed-off-by: Adrian Hunter Reviewed-by: Jiri Olsa Cc: Andi Kleen Cc: David S. Miller Cc: Leo Yan Cc: Mathieu Poirier Cc: stable@vger.kernel.org # 4.19 Link: http://lkml.kernel.org/r/100ea2ec-ed14-b56d-d810-e0a6d2f4b069@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 2ebe82288b3278b8e538ee8adce4142dbdedd8f6 Author: Fengguang Wu Date: Tue Oct 30 15:10:51 2018 -0700 mm/gup.c: fix __get_user_pages_fast() comment mmu_gather_tlb() no longer exists. Replace with mmu_table_batch(). Link: http://lkml.kernel.org/r/20180928053441.rpzwafzlsnp74mkl@wfg-t540p.sh.intel.com Signed-off-by: Fengguang Wu Reviewed-by: Andrew Morton Cc: Jiri Kosina Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f2c57d91b0d96aa13ccff4e3b178038f17b00658 Author: Jan Kara Date: Tue Oct 30 15:10:47 2018 -0700 mm: Fix warning in insert_pfn() In DAX mode a write pagefault can race with write(2) in the following way: CPU0 CPU1 write fault for mapped zero page (hole) dax_iomap_rw() iomap_apply() xfs_file_iomap_begin() - allocates blocks dax_iomap_actor() invalidate_inode_pages2_range() - invalidates radix tree entries in given range dax_iomap_pte_fault() grab_mapping_entry() - no entry found, creates empty ... xfs_file_iomap_begin() - finds already allocated block ... vmf_insert_mixed_mkwrite() - WARNs and does nothing because there is still zero page mapped in PTE unmap_mapping_pages() This race results in WARN_ON from insert_pfn() and is occasionally triggered by fstest generic/344. Note that the race is otherwise harmless as before write(2) on CPU0 is finished, we will invalidate page tables properly and thus user of mmap will see modified data from write(2) from that point on. So just restrict the warning only to the case when the PFN in PTE is not zero page. Link: http://lkml.kernel.org/r/20180824154542.26872-1-jack@suse.cz Signed-off-by: Jan Kara Reviewed-by: Andrew Morton Cc: Ross Zwisler Cc: Dan Williams Cc: Dave Jiang Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit dee6da22efac451d361f5224a60be2796d847b51 Author: David Hildenbrand Date: Tue Oct 30 15:10:44 2018 -0700 memory-hotplug.rst: add some details about locking internals Let's document the magic a bit, especially why device_hotplug_lock is required when adding/removing memory and how it all play together with requests to online/offline memory from user space. Link: http://lkml.kernel.org/r/20180925091457.28651-7-david@redhat.com Signed-off-by: David Hildenbrand Reviewed-by: Pavel Tatashin Reviewed-by: Rashmica Gupta Reviewed-by: Oscar Salvador Cc: Jonathan Corbet Cc: Michal Hocko Cc: Balbir Singh Cc: Benjamin Herrenschmidt Cc: Boris Ostrovsky Cc: Dan Williams Cc: Greg Kroah-Hartman Cc: Haiyang Zhang Cc: Heiko Carstens Cc: John Allen Cc: Joonsoo Kim Cc: Juergen Gross Cc: Kate Stewart Cc: "K. Y. Srinivasan" Cc: Len Brown Cc: Martin Schwidefsky Cc: Mathieu Malaterre Cc: Michael Ellerman Cc: Michael Neuling Cc: Nathan Fontenot Cc: Paul Mackerras Cc: Philippe Ombredanne Cc: Rafael J. Wysocki Cc: "Rafael J. Wysocki" Cc: Stephen Hemminger Cc: Thomas Gleixner Cc: Vlastimil Babka Cc: YASUAKI ISHIMATSU Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5666848774ef43d3db5151ec518f1deb63515c20 Author: David Hildenbrand Date: Tue Oct 30 15:10:39 2018 -0700 powerpc/powernv: hold device_hotplug_lock when calling memtrace_offline_pages() Let's perform all checking + offlining + removing under device_hotplug_lock, so nobody can mess with these devices via sysfs concurrently. [david@redhat.com: take device_hotplug_lock outside of loop] Link: http://lkml.kernel.org/r/20180927092554.13567-6-david@redhat.com Link: http://lkml.kernel.org/r/20180925091457.28651-6-david@redhat.com Signed-off-by: David Hildenbrand Reviewed-by: Pavel Tatashin Reviewed-by: Rashmica Gupta Acked-by: Balbir Singh Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: Rashmica Gupta Cc: Michael Neuling Cc: Boris Ostrovsky Cc: Dan Williams Cc: Greg Kroah-Hartman Cc: Haiyang Zhang Cc: Heiko Carstens Cc: John Allen Cc: Jonathan Corbet Cc: Joonsoo Kim Cc: Juergen Gross Cc: Kate Stewart Cc: "K. Y. Srinivasan" Cc: Len Brown Cc: Martin Schwidefsky Cc: Mathieu Malaterre Cc: Michal Hocko Cc: Nathan Fontenot Cc: Oscar Salvador Cc: Philippe Ombredanne Cc: Rafael J. Wysocki Cc: "Rafael J. Wysocki" Cc: Stephen Hemminger Cc: Thomas Gleixner Cc: Vlastimil Babka Cc: YASUAKI ISHIMATSU Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit cec1680591d6d5b10ecc10f370210089416e98af Author: David Hildenbrand Date: Tue Oct 30 15:10:33 2018 -0700 powerpc/powernv: hold device_hotplug_lock when calling device_online() device_online() should be called with device_hotplug_lock() held. Link: http://lkml.kernel.org/r/20180925091457.28651-5-david@redhat.com Signed-off-by: David Hildenbrand Reviewed-by: Pavel Tatashin Reviewed-by: Rashmica Gupta Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: Rashmica Gupta Cc: Balbir Singh Cc: Michael Neuling Cc: Boris Ostrovsky Cc: Dan Williams Cc: Greg Kroah-Hartman Cc: Haiyang Zhang Cc: Heiko Carstens Cc: John Allen Cc: Jonathan Corbet Cc: Joonsoo Kim Cc: Juergen Gross Cc: Kate Stewart Cc: "K. Y. Srinivasan" Cc: Len Brown Cc: Martin Schwidefsky Cc: Mathieu Malaterre Cc: Michal Hocko Cc: Nathan Fontenot Cc: Oscar Salvador Cc: Philippe Ombredanne Cc: Rafael J. Wysocki Cc: "Rafael J. Wysocki" Cc: Stephen Hemminger Cc: Thomas Gleixner Cc: Vlastimil Babka Cc: YASUAKI ISHIMATSU Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 381eab4a6ee81266f8dddc62e57376c7e584e5b8 Author: David Hildenbrand Date: Tue Oct 30 15:10:29 2018 -0700 mm/memory_hotplug: fix online/offline_pages called w.o. mem_hotplug_lock There seem to be some problems as result of 30467e0b3be ("mm, hotplug: fix concurrent memory hot-add deadlock"), which tried to fix a possible lock inversion reported and discussed in [1] due to the two locks a) device_lock() b) mem_hotplug_lock While add_memory() first takes b), followed by a) during bus_probe_device(), onlining of memory from user space first took a), followed by b), exposing a possible deadlock. In [1], and it was decided to not make use of device_hotplug_lock, but rather to enforce a locking order. The problems I spotted related to this: 1. Memory block device attributes: While .state first calls mem_hotplug_begin() and the calls device_online() - which takes device_lock() - .online does no longer call mem_hotplug_begin(), so effectively calls online_pages() without mem_hotplug_lock. 2. device_online() should be called under device_hotplug_lock, however onlining memory during add_memory() does not take care of that. In addition, I think there is also something wrong about the locking in 3. arch/powerpc/platforms/powernv/memtrace.c calls offline_pages() without locks. This was introduced after 30467e0b3be. And skimming over the code, I assume it could need some more care in regards to locking (e.g. device_online() called without device_hotplug_lock. This will be addressed in the following patches. Now that we hold the device_hotplug_lock when - adding memory (e.g. via add_memory()/add_memory_resource()) - removing memory (e.g. via remove_memory()) - device_online()/device_offline() We can move mem_hotplug_lock usage back into online_pages()/offline_pages(). Why is mem_hotplug_lock still needed? Essentially to make get_online_mems()/put_online_mems() be very fast (relying on device_hotplug_lock would be very slow), and to serialize against addition of memory that does not create memory block devices (hmm). [1] http://driverdev.linuxdriverproject.org/pipermail/ driverdev-devel/ 2015-February/065324.html This patch is partly based on a patch by Vitaly Kuznetsov. Link: http://lkml.kernel.org/r/20180925091457.28651-4-david@redhat.com Signed-off-by: David Hildenbrand Reviewed-by: Pavel Tatashin Reviewed-by: Rashmica Gupta Reviewed-by: Oscar Salvador Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: "Rafael J. Wysocki" Cc: Len Brown Cc: Greg Kroah-Hartman Cc: "K. Y. Srinivasan" Cc: Haiyang Zhang Cc: Stephen Hemminger Cc: Martin Schwidefsky Cc: Heiko Carstens Cc: Boris Ostrovsky Cc: Juergen Gross Cc: Rashmica Gupta Cc: Michael Neuling Cc: Balbir Singh Cc: Kate Stewart Cc: Thomas Gleixner Cc: Philippe Ombredanne Cc: Pavel Tatashin Cc: Vlastimil Babka Cc: Dan Williams Cc: Oscar Salvador Cc: YASUAKI ISHIMATSU Cc: Mathieu Malaterre Cc: John Allen Cc: Jonathan Corbet Cc: Joonsoo Kim Cc: Nathan Fontenot Cc: Rafael J. Wysocki Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8df1d0e4a265f25dc1e7e7624ccdbcb4a6630c89 Author: David Hildenbrand Date: Tue Oct 30 15:10:24 2018 -0700 mm/memory_hotplug: make add_memory() take the device_hotplug_lock add_memory() currently does not take the device_hotplug_lock, however is aleady called under the lock from arch/powerpc/platforms/pseries/hotplug-memory.c drivers/acpi/acpi_memhotplug.c to synchronize against CPU hot-remove and similar. In general, we should hold the device_hotplug_lock when adding memory to synchronize against online/offline request (e.g. from user space) - which already resulted in lock inversions due to device_lock() and mem_hotplug_lock - see 30467e0b3be ("mm, hotplug: fix concurrent memory hot-add deadlock"). add_memory()/add_memory_resource() will create memory block devices, so this really feels like the right thing to do. Holding the device_hotplug_lock makes sure that a memory block device can really only be accessed (e.g. via .online/.state) from user space, once the memory has been fully added to the system. The lock is not held yet in drivers/xen/balloon.c arch/powerpc/platforms/powernv/memtrace.c drivers/s390/char/sclp_cmd.c drivers/hv/hv_balloon.c So, let's either use the locked variants or take the lock. Don't export add_memory_resource(), as it once was exported to be used by XEN, which is never built as a module. If somebody requires it, we also have to export a locked variant (as device_hotplug_lock is never exported). Link: http://lkml.kernel.org/r/20180925091457.28651-3-david@redhat.com Signed-off-by: David Hildenbrand Reviewed-by: Pavel Tatashin Reviewed-by: Rafael J. Wysocki Reviewed-by: Rashmica Gupta Reviewed-by: Oscar Salvador Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: "Rafael J. Wysocki" Cc: Len Brown Cc: Greg Kroah-Hartman Cc: Boris Ostrovsky Cc: Juergen Gross Cc: Nathan Fontenot Cc: John Allen Cc: Michal Hocko Cc: Dan Williams Cc: Joonsoo Kim Cc: Vlastimil Babka Cc: Mathieu Malaterre Cc: Pavel Tatashin Cc: YASUAKI ISHIMATSU Cc: Balbir Singh Cc: Haiyang Zhang Cc: Heiko Carstens Cc: Jonathan Corbet Cc: Kate Stewart Cc: "K. Y. Srinivasan" Cc: Martin Schwidefsky Cc: Michael Neuling Cc: Philippe Ombredanne Cc: Stephen Hemminger Cc: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d15e59260f62bd5e0f625cf5f5240f6ffac78ab6 Author: David Hildenbrand Date: Tue Oct 30 15:10:18 2018 -0700 mm/memory_hotplug: make remove_memory() take the device_hotplug_lock Patch series "mm: online/offline_pages called w.o. mem_hotplug_lock", v3. Reading through the code and studying how mem_hotplug_lock is to be used, I noticed that there are two places where we can end up calling device_online()/device_offline() - online_pages()/offline_pages() without the mem_hotplug_lock. And there are other places where we call device_online()/device_offline() without the device_hotplug_lock. While e.g. echo "online" > /sys/devices/system/memory/memory9/state is fine, e.g. echo 1 > /sys/devices/system/memory/memory9/online Will not take the mem_hotplug_lock. However the device_lock() and device_hotplug_lock. E.g. via memory_probe_store(), we can end up calling add_memory()->online_pages() without the device_hotplug_lock. So we can have concurrent callers in online_pages(). We e.g. touch in online_pages() basically unprotected zone->present_pages then. Looks like there is a longer history to that (see Patch #2 for details), and fixing it to work the way it was intended is not really possible. We would e.g. have to take the mem_hotplug_lock in device/base/core.c, which sounds wrong. Summary: We had a lock inversion on mem_hotplug_lock and device_lock(). More details can be found in patch 3 and patch 6. I propose the general rules (documentation added in patch 6): 1. add_memory/add_memory_resource() must only be called with device_hotplug_lock. 2. remove_memory() must only be called with device_hotplug_lock. This is already documented and holds for all callers. 3. device_online()/device_offline() must only be called with device_hotplug_lock. This is already documented and true for now in core code. Other callers (related to memory hotplug) have to be fixed up. 4. mem_hotplug_lock is taken inside of add_memory/remove_memory/ online_pages/offline_pages. To me, this looks way cleaner than what we have right now (and easier to verify). And looking at the documentation of remove_memory, using lock_device_hotplug also for add_memory() feels natural. This patch (of 6): remove_memory() is exported right now but requires the device_hotplug_lock, which is not exported. So let's provide a variant that takes the lock and only export that one. The lock is already held in arch/powerpc/platforms/pseries/hotplug-memory.c drivers/acpi/acpi_memhotplug.c arch/powerpc/platforms/powernv/memtrace.c Apart from that, there are not other users in the tree. Link: http://lkml.kernel.org/r/20180925091457.28651-2-david@redhat.com Signed-off-by: David Hildenbrand Reviewed-by: Pavel Tatashin Reviewed-by: Rafael J. Wysocki Reviewed-by: Rashmica Gupta Reviewed-by: Oscar Salvador Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: "Rafael J. Wysocki" Cc: Len Brown Cc: Rashmica Gupta Cc: Michael Neuling Cc: Balbir Singh Cc: Nathan Fontenot Cc: John Allen Cc: Michal Hocko Cc: Dan Williams Cc: Joonsoo Kim Cc: Vlastimil Babka Cc: Greg Kroah-Hartman Cc: YASUAKI ISHIMATSU Cc: Mathieu Malaterre Cc: Boris Ostrovsky Cc: Haiyang Zhang Cc: Heiko Carstens Cc: Jonathan Corbet Cc: Juergen Gross Cc: Kate Stewart Cc: "K. Y. Srinivasan" Cc: Martin Schwidefsky Cc: Philippe Ombredanne Cc: Stephen Hemminger Cc: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2f770806fd2c3db9616965e57ba60d80f43c827d Author: Mike Rapoport Date: Tue Oct 30 15:10:01 2018 -0700 mm/memblock.c: warn if zero alignment was requested After updating all memblock users to explicitly specify SMP_CACHE_BYTES alignment rather than use 0, it is still possible that uncovered users may sneak in. Add a WARN_ON_ONCE for such cases. [sfr@canb.auug.org.au: use dump_stack() instead of WARN_ON_ONCE for the alignment checks] Link: http://lkml.kernel.org/r/20181016131927.6ceba6ab@canb.auug.org.au [akpm@linux-foundation.org: add apologetic comment] Link: http://lkml.kernel.org/r/20181011060850.GA19822@rapoport-lnx Signed-off-by: Mike Rapoport Signed-off-by: Stephen Rothwell Reviewed-by: Andrew Morton Acked-by: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7e1c4e27928e5f87b9b1eaf06dc31773b2f1e7f1 Author: Mike Rapoport Date: Tue Oct 30 15:09:57 2018 -0700 memblock: stop using implicit alignment to SMP_CACHE_BYTES When a memblock allocation APIs are called with align = 0, the alignment is implicitly set to SMP_CACHE_BYTES. Implicit alignment is done deep in the memblock allocator and it can come as a surprise. Not that such an alignment would be wrong even when used incorrectly but it is better to be explicit for the sake of clarity and the prinicple of the least surprise. Replace all such uses of memblock APIs with the 'align' parameter explicitly set to SMP_CACHE_BYTES and stop implicit alignment assignment in the memblock internal allocation functions. For the case when memblock APIs are used via helper functions, e.g. like iommu_arena_new_node() in Alpha, the helper functions were detected with Coccinelle's help and then manually examined and updated where appropriate. The direct memblock APIs users were updated using the semantic patch below: @@ expression size, min_addr, max_addr, nid; @@ ( | - memblock_alloc_try_nid_raw(size, 0, min_addr, max_addr, nid) + memblock_alloc_try_nid_raw(size, SMP_CACHE_BYTES, min_addr, max_addr, nid) | - memblock_alloc_try_nid_nopanic(size, 0, min_addr, max_addr, nid) + memblock_alloc_try_nid_nopanic(size, SMP_CACHE_BYTES, min_addr, max_addr, nid) | - memblock_alloc_try_nid(size, 0, min_addr, max_addr, nid) + memblock_alloc_try_nid(size, SMP_CACHE_BYTES, min_addr, max_addr, nid) | - memblock_alloc(size, 0) + memblock_alloc(size, SMP_CACHE_BYTES) | - memblock_alloc_raw(size, 0) + memblock_alloc_raw(size, SMP_CACHE_BYTES) | - memblock_alloc_from(size, 0, min_addr) + memblock_alloc_from(size, SMP_CACHE_BYTES, min_addr) | - memblock_alloc_nopanic(size, 0) + memblock_alloc_nopanic(size, SMP_CACHE_BYTES) | - memblock_alloc_low(size, 0) + memblock_alloc_low(size, SMP_CACHE_BYTES) | - memblock_alloc_low_nopanic(size, 0) + memblock_alloc_low_nopanic(size, SMP_CACHE_BYTES) | - memblock_alloc_from_nopanic(size, 0, min_addr) + memblock_alloc_from_nopanic(size, SMP_CACHE_BYTES, min_addr) | - memblock_alloc_node(size, 0, nid) + memblock_alloc_node(size, SMP_CACHE_BYTES, nid) ) [mhocko@suse.com: changelog update] [akpm@linux-foundation.org: coding-style fixes] [rppt@linux.ibm.com: fix missed uses of implicit alignment] Link: http://lkml.kernel.org/r/20181016133656.GA10925@rapoport-lnx Link: http://lkml.kernel.org/r/1538687224-17535-1-git-send-email-rppt@linux.vnet.ibm.com Signed-off-by: Mike Rapoport Suggested-by: Michal Hocko Acked-by: Paul Burton [MIPS] Acked-by: Michael Ellerman [powerpc] Acked-by: Michal Hocko Cc: Catalin Marinas Cc: Chris Zankel Cc: Geert Uytterhoeven Cc: Guan Xuetao Cc: Ingo Molnar Cc: Matt Turner Cc: Michal Simek Cc: Richard Weinberger Cc: Russell King Cc: Thomas Gleixner Cc: Tony Luck Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 530d4c0cfd5b71caf2d17f73a80696c4a4509813 Author: Mike Rapoport Date: Tue Oct 30 15:09:54 2018 -0700 docs/boot-time-mm: remove bootmem documentation Link: http://lkml.kernel.org/r/1536927045-23536-31-git-send-email-rppt@linux.vnet.ibm.com Signed-off-by: Mike Rapoport Cc: Catalin Marinas Cc: Chris Zankel Cc: "David S. Miller" Cc: Geert Uytterhoeven Cc: Greentime Hu Cc: Greg Kroah-Hartman Cc: Guan Xuetao Cc: Ingo Molnar Cc: "James E.J. Bottomley" Cc: Jonas Bonn Cc: Jonathan Corbet Cc: Ley Foon Tan Cc: Mark Salter Cc: Martin Schwidefsky Cc: Matt Turner Cc: Michael Ellerman Cc: Michal Hocko Cc: Michal Simek Cc: Palmer Dabbelt Cc: Paul Burton Cc: Richard Kuo Cc: Richard Weinberger Cc: Rich Felker Cc: Russell King Cc: Serge Semin Cc: Thomas Gleixner Cc: Tony Luck Cc: Vineet Gupta Cc: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 57c8a661d95dff48dd9c2f2496139082bbaf241a Author: Mike Rapoport Date: Tue Oct 30 15:09:49 2018 -0700 mm: remove include/linux/bootmem.h Move remaining definitions and declarations from include/linux/bootmem.h into include/linux/memblock.h and remove the redundant header. The includes were replaced with the semantic patch below and then semi-automated removal of duplicated '#include @@ @@ - #include + #include [sfr@canb.auug.org.au: dma-direct: fix up for the removal of linux/bootmem.h] Link: http://lkml.kernel.org/r/20181002185342.133d1680@canb.auug.org.au [sfr@canb.auug.org.au: powerpc: fix up for removal of linux/bootmem.h] Link: http://lkml.kernel.org/r/20181005161406.73ef8727@canb.auug.org.au [sfr@canb.auug.org.au: x86/kaslr, ACPI/NUMA: fix for linux/bootmem.h removal] Link: http://lkml.kernel.org/r/20181008190341.5e396491@canb.auug.org.au Link: http://lkml.kernel.org/r/1536927045-23536-30-git-send-email-rppt@linux.vnet.ibm.com Signed-off-by: Mike Rapoport Signed-off-by: Stephen Rothwell Acked-by: Michal Hocko Cc: Catalin Marinas Cc: Chris Zankel Cc: "David S. Miller" Cc: Geert Uytterhoeven Cc: Greentime Hu Cc: Greg Kroah-Hartman Cc: Guan Xuetao Cc: Ingo Molnar Cc: "James E.J. Bottomley" Cc: Jonas Bonn Cc: Jonathan Corbet Cc: Ley Foon Tan Cc: Mark Salter Cc: Martin Schwidefsky Cc: Matt Turner Cc: Michael Ellerman Cc: Michal Simek Cc: Palmer Dabbelt Cc: Paul Burton Cc: Richard Kuo Cc: Richard Weinberger Cc: Rich Felker Cc: Russell King Cc: Serge Semin Cc: Thomas Gleixner Cc: Tony Luck Cc: Vineet Gupta Cc: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 97ad1087efffed26cb00e310a927f9603332dfcb Author: Mike Rapoport Date: Tue Oct 30 15:09:44 2018 -0700 memblock: replace BOOTMEM_ALLOC_* with MEMBLOCK variants Drop BOOTMEM_ALLOC_ACCESSIBLE and BOOTMEM_ALLOC_ANYWHERE in favor of identical MEMBLOCK definitions. Link: http://lkml.kernel.org/r/1536927045-23536-29-git-send-email-rppt@linux.vnet.ibm.com Signed-off-by: Mike Rapoport Acked-by: Michal Hocko Cc: Catalin Marinas Cc: Chris Zankel Cc: "David S. Miller" Cc: Geert Uytterhoeven Cc: Greentime Hu Cc: Greg Kroah-Hartman Cc: Guan Xuetao Cc: Ingo Molnar Cc: "James E.J. Bottomley" Cc: Jonas Bonn Cc: Jonathan Corbet Cc: Ley Foon Tan Cc: Mark Salter Cc: Martin Schwidefsky Cc: Matt Turner Cc: Michael Ellerman Cc: Michal Simek Cc: Palmer Dabbelt Cc: Paul Burton Cc: Richard Kuo Cc: Richard Weinberger Cc: Rich Felker Cc: Russell King Cc: Serge Semin Cc: Thomas Gleixner Cc: Tony Luck Cc: Vineet Gupta Cc: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit bda49a81164ab3e62f5348447345711586fd42e9 Author: Mike Rapoport Date: Tue Oct 30 15:09:40 2018 -0700 mm: remove nobootmem Move a few remaining functions from nobootmem.c to memblock.c and remove nobootmem Link: http://lkml.kernel.org/r/1536927045-23536-28-git-send-email-rppt@linux.vnet.ibm.com Signed-off-by: Mike Rapoport Acked-by: Michal Hocko Cc: Catalin Marinas Cc: Chris Zankel Cc: "David S. Miller" Cc: Geert Uytterhoeven Cc: Greentime Hu Cc: Greg Kroah-Hartman Cc: Guan Xuetao Cc: Ingo Molnar Cc: "James E.J. Bottomley" Cc: Jonas Bonn Cc: Jonathan Corbet Cc: Ley Foon Tan Cc: Mark Salter Cc: Martin Schwidefsky Cc: Matt Turner Cc: Michael Ellerman Cc: Michal Simek Cc: Palmer Dabbelt Cc: Paul Burton Cc: Richard Kuo Cc: Richard Weinberger Cc: Rich Felker Cc: Russell King Cc: Serge Semin Cc: Thomas Gleixner Cc: Tony Luck Cc: Vineet Gupta Cc: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7c2ee349cf79b6348e833dd7d8167c4004a72ecb Author: Mike Rapoport Date: Tue Oct 30 15:09:36 2018 -0700 memblock: rename __free_pages_bootmem to memblock_free_pages The conversion is done using sed -i 's@__free_pages_bootmem@memblock_free_pages@' \ $(git grep -l __free_pages_bootmem) Link: http://lkml.kernel.org/r/1536927045-23536-27-git-send-email-rppt@linux.vnet.ibm.com Signed-off-by: Mike Rapoport Acked-by: Michal Hocko Cc: Catalin Marinas Cc: Chris Zankel Cc: "David S. Miller" Cc: Geert Uytterhoeven Cc: Greentime Hu Cc: Greg Kroah-Hartman Cc: Guan Xuetao Cc: Ingo Molnar Cc: "James E.J. Bottomley" Cc: Jonas Bonn Cc: Jonathan Corbet Cc: Ley Foon Tan Cc: Mark Salter Cc: Martin Schwidefsky Cc: Matt Turner Cc: Michael Ellerman Cc: Michal Simek Cc: Palmer Dabbelt Cc: Paul Burton Cc: Richard Kuo Cc: Richard Weinberger Cc: Rich Felker Cc: Russell King Cc: Serge Semin Cc: Thomas Gleixner Cc: Tony Luck Cc: Vineet Gupta Cc: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c6ffc5ca8fb311a89cb6de5c31b6511308ddac8d Author: Mike Rapoport Date: Tue Oct 30 15:09:30 2018 -0700 memblock: rename free_all_bootmem to memblock_free_all The conversion is done using sed -i 's@free_all_bootmem@memblock_free_all@' \ $(git grep -l free_all_bootmem) Link: http://lkml.kernel.org/r/1536927045-23536-26-git-send-email-rppt@linux.vnet.ibm.com Signed-off-by: Mike Rapoport Acked-by: Michal Hocko Cc: Catalin Marinas Cc: Chris Zankel Cc: "David S. Miller" Cc: Geert Uytterhoeven Cc: Greentime Hu Cc: Greg Kroah-Hartman Cc: Guan Xuetao Cc: Ingo Molnar Cc: "James E.J. Bottomley" Cc: Jonas Bonn Cc: Jonathan Corbet Cc: Ley Foon Tan Cc: Mark Salter Cc: Martin Schwidefsky Cc: Matt Turner Cc: Michael Ellerman Cc: Michal Simek Cc: Palmer Dabbelt Cc: Paul Burton Cc: Richard Kuo Cc: Richard Weinberger Cc: Rich Felker Cc: Russell King Cc: Serge Semin Cc: Thomas Gleixner Cc: Tony Luck Cc: Vineet Gupta Cc: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 53ab85ebfd27cdf16c8ddc72781c072a63bef3cb Author: Mike Rapoport Date: Tue Oct 30 15:09:25 2018 -0700 memblock: replace free_bootmem_late with memblock_free_late The free_bootmem_late and memblock_free_late do exactly the same thing: they iterate over a range and give pages to the page allocator. Replace calls to free_bootmem_late with calls to memblock_free_late and remove the bootmem variant. Link: http://lkml.kernel.org/r/1536927045-23536-25-git-send-email-rppt@linux.vnet.ibm.com Signed-off-by: Mike Rapoport Acked-by: Michal Hocko Cc: Catalin Marinas Cc: Chris Zankel Cc: "David S. Miller" Cc: Geert Uytterhoeven Cc: Greentime Hu Cc: Greg Kroah-Hartman Cc: Guan Xuetao Cc: Ingo Molnar Cc: "James E.J. Bottomley" Cc: Jonas Bonn Cc: Jonathan Corbet Cc: Ley Foon Tan Cc: Mark Salter Cc: Martin Schwidefsky Cc: Matt Turner Cc: Michael Ellerman Cc: Michal Simek Cc: Palmer Dabbelt Cc: Paul Burton Cc: Richard Kuo Cc: Richard Weinberger Cc: Rich Felker Cc: Russell King Cc: Serge Semin Cc: Thomas Gleixner Cc: Tony Luck Cc: Vineet Gupta Cc: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2013288f723887837d2f1cebef5fcf663b2319de Author: Mike Rapoport Date: Tue Oct 30 15:09:21 2018 -0700 memblock: replace free_bootmem{_node} with memblock_free The free_bootmem and free_bootmem_node are merely wrappers for memblock_free. Replace their usage with a call to memblock_free using the following semantic patch: @@ expression e1, e2, e3; @@ ( - free_bootmem(e1, e2) + memblock_free(e1, e2) | - free_bootmem_node(e1, e2, e3) + memblock_free(e2, e3) ) Link: http://lkml.kernel.org/r/1536927045-23536-24-git-send-email-rppt@linux.vnet.ibm.com Signed-off-by: Mike Rapoport Acked-by: Michal Hocko Cc: Catalin Marinas Cc: Chris Zankel Cc: "David S. Miller" Cc: Geert Uytterhoeven Cc: Greentime Hu Cc: Greg Kroah-Hartman Cc: Guan Xuetao Cc: Ingo Molnar Cc: "James E.J. Bottomley" Cc: Jonas Bonn Cc: Jonathan Corbet Cc: Ley Foon Tan Cc: Mark Salter Cc: Martin Schwidefsky Cc: Matt Turner Cc: Michael Ellerman Cc: Michal Simek Cc: Palmer Dabbelt Cc: Paul Burton Cc: Richard Kuo Cc: Richard Weinberger Cc: Rich Felker Cc: Russell King Cc: Serge Semin Cc: Thomas Gleixner Cc: Tony Luck Cc: Vineet Gupta Cc: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6c7835f8d0d1839ca93bd3cf6faa15706f03d604 Author: Mike Rapoport Date: Tue Oct 30 15:09:15 2018 -0700 mm: nobootmem: remove bootmem allocation APIs The bootmem compatibility APIs are not used and can be removed. Link: http://lkml.kernel.org/r/1536927045-23536-23-git-send-email-rppt@linux.vnet.ibm.com Signed-off-by: Mike Rapoport Acked-by: Michal Hocko Cc: Catalin Marinas Cc: Chris Zankel Cc: "David S. Miller" Cc: Geert Uytterhoeven Cc: Greentime Hu Cc: Greg Kroah-Hartman Cc: Guan Xuetao Cc: Ingo Molnar Cc: "James E.J. Bottomley" Cc: Jonas Bonn Cc: Jonathan Corbet Cc: Ley Foon Tan Cc: Mark Salter Cc: Martin Schwidefsky Cc: Matt Turner Cc: Michael Ellerman Cc: Michal Simek Cc: Palmer Dabbelt Cc: Paul Burton Cc: Richard Kuo Cc: Richard Weinberger Cc: Rich Felker Cc: Russell King Cc: Serge Semin Cc: Thomas Gleixner Cc: Tony Luck Cc: Vineet Gupta Cc: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2a5bda5a624d6471d25e953b9adba5182ab1b51f Author: Mike Rapoport Date: Tue Oct 30 15:09:09 2018 -0700 memblock: replace alloc_bootmem with memblock_alloc The alloc_bootmem(size) is a shortcut for allocation of SMP_CACHE_BYTES aligned memory. When the align parameter of memblock_alloc() is 0, the alignment is implicitly set to SMP_CACHE_BYTES and thus alloc_bootmem(size) and memblock_alloc(size, 0) are equivalent. The conversion is done using the following semantic patch: @@ expression size; @@ - alloc_bootmem(size) + memblock_alloc(size, 0) Link: http://lkml.kernel.org/r/1536927045-23536-22-git-send-email-rppt@linux.vnet.ibm.com Signed-off-by: Mike Rapoport Cc: Catalin Marinas Cc: Chris Zankel Cc: "David S. Miller" Cc: Geert Uytterhoeven Cc: Greentime Hu Cc: Greg Kroah-Hartman Cc: Guan Xuetao Cc: Ingo Molnar Cc: "James E.J. Bottomley" Cc: Jonas Bonn Cc: Jonathan Corbet Cc: Ley Foon Tan Cc: Mark Salter Cc: Martin Schwidefsky Cc: Matt Turner Cc: Michael Ellerman Cc: Michal Hocko Cc: Michal Simek Cc: Palmer Dabbelt Cc: Paul Burton Cc: Richard Kuo Cc: Richard Weinberger Cc: Rich Felker Cc: Russell King Cc: Serge Semin Cc: Thomas Gleixner Cc: Tony Luck Cc: Vineet Gupta Cc: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4fc4a09e4cc1126c4e8a86c293425cffa2a2eb3c Author: Mike Rapoport Date: Tue Oct 30 15:09:03 2018 -0700 memblock: replace __alloc_bootmem with memblock_alloc_from The functions are equivalent, just the later does not require nobootmem translation layer. The conversion is done using the following semantic patch: @@ expression size, align, goal; @@ - __alloc_bootmem(size, align, goal) + memblock_alloc_from(size, align, goal) Link: http://lkml.kernel.org/r/1536927045-23536-21-git-send-email-rppt@linux.vnet.ibm.com Signed-off-by: Mike Rapoport Acked-by: Michal Hocko Cc: Catalin Marinas Cc: Chris Zankel Cc: "David S. Miller" Cc: Geert Uytterhoeven Cc: Greentime Hu Cc: Greg Kroah-Hartman Cc: Guan Xuetao Cc: Ingo Molnar Cc: "James E.J. Bottomley" Cc: Jonas Bonn Cc: Jonathan Corbet Cc: Ley Foon Tan Cc: Mark Salter Cc: Martin Schwidefsky Cc: Matt Turner Cc: Michael Ellerman Cc: Michal Simek Cc: Palmer Dabbelt Cc: Paul Burton Cc: Richard Kuo Cc: Richard Weinberger Cc: Rich Felker Cc: Russell King Cc: Serge Semin Cc: Thomas Gleixner Cc: Tony Luck Cc: Vineet Gupta Cc: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 15c3c114ed144e5d9ad0f9e8f9f2998bae372190 Author: Mike Rapoport Date: Tue Oct 30 15:08:58 2018 -0700 memblock: replace alloc_bootmem_pages with memblock_alloc The alloc_bootmem_pages() function allocates PAGE_SIZE aligned memory. memblock_alloc() with alignment set to PAGE_SIZE does exactly the same thing. The conversion is done using the following semantic patch: @@ expression e; @@ - alloc_bootmem_pages(e) + memblock_alloc(e, PAGE_SIZE) Link: http://lkml.kernel.org/r/1536927045-23536-20-git-send-email-rppt@linux.vnet.ibm.com Signed-off-by: Mike Rapoport Acked-by: Michal Hocko Cc: Catalin Marinas Cc: Chris Zankel Cc: "David S. Miller" Cc: Geert Uytterhoeven Cc: Greentime Hu Cc: Greg Kroah-Hartman Cc: Guan Xuetao Cc: Ingo Molnar Cc: "James E.J. Bottomley" Cc: Jonas Bonn Cc: Jonathan Corbet Cc: Ley Foon Tan Cc: Mark Salter Cc: Martin Schwidefsky Cc: Matt Turner Cc: Michael Ellerman Cc: Michal Simek Cc: Palmer Dabbelt Cc: Paul Burton Cc: Richard Kuo Cc: Richard Weinberger Cc: Rich Felker Cc: Russell King Cc: Serge Semin Cc: Thomas Gleixner Cc: Tony Luck Cc: Vineet Gupta Cc: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e8625dce71b4c23eb81bc9b023c7628807df89e8 Author: Mike Rapoport Date: Tue Oct 30 15:08:54 2018 -0700 memblock: replace alloc_bootmem_low_pages with memblock_alloc_low The alloc_bootmem_low_pages() function allocates PAGE_SIZE aligned regions from low memory. memblock_alloc_low() with alignment set to PAGE_SIZE does exactly the same thing. The conversion is done using the following semantic patch: @@ expression e; @@ - alloc_bootmem_low_pages(e) + memblock_alloc_low(e, PAGE_SIZE) Link: http://lkml.kernel.org/r/1536927045-23536-19-git-send-email-rppt@linux.vnet.ibm.com Signed-off-by: Mike Rapoport Acked-by: Michal Hocko Cc: Catalin Marinas Cc: Chris Zankel Cc: "David S. Miller" Cc: Geert Uytterhoeven Cc: Greentime Hu Cc: Greg Kroah-Hartman Cc: Guan Xuetao Cc: Ingo Molnar Cc: "James E.J. Bottomley" Cc: Jonas Bonn Cc: Jonathan Corbet Cc: Ley Foon Tan Cc: Mark Salter Cc: Martin Schwidefsky Cc: Matt Turner Cc: Michael Ellerman Cc: Michal Simek Cc: Palmer Dabbelt Cc: Paul Burton Cc: Richard Kuo Cc: Richard Weinberger Cc: Rich Felker Cc: Russell King Cc: Serge Semin Cc: Thomas Gleixner Cc: Tony Luck Cc: Vineet Gupta Cc: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3bb1f80ee6873e8be6cb57eec4926e9647e88ea7 Author: Mike Rapoport Date: Tue Oct 30 15:08:49 2018 -0700 memblock: replace alloc_bootmem_node with memblock_alloc_node Both functions attempt to allocate memory with specified alignment from a particular node. If the allocation from that node fails, they both fall back to allocating from any node in the system. Usage of native memblock API eliminates the nobootmem translation layer. Link: http://lkml.kernel.org/r/1536927045-23536-18-git-send-email-rppt@linux.vnet.ibm.com Signed-off-by: Mike Rapoport Acked-by: Michal Hocko Cc: Catalin Marinas Cc: Chris Zankel Cc: "David S. Miller" Cc: Geert Uytterhoeven Cc: Greentime Hu Cc: Greg Kroah-Hartman Cc: Guan Xuetao Cc: Ingo Molnar Cc: "James E.J. Bottomley" Cc: Jonas Bonn Cc: Jonathan Corbet Cc: Ley Foon Tan Cc: Mark Salter Cc: Martin Schwidefsky Cc: Matt Turner Cc: Michael Ellerman Cc: Michal Simek Cc: Palmer Dabbelt Cc: Paul Burton Cc: Richard Kuo Cc: Richard Weinberger Cc: Rich Felker Cc: Russell King Cc: Serge Semin Cc: Thomas Gleixner Cc: Tony Luck Cc: Vineet Gupta Cc: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ccfa2a0f2e8581a68715aaad5ad0fb56daf7db43 Author: Mike Rapoport Date: Tue Oct 30 15:08:45 2018 -0700 memblock: replace __alloc_bootmem_node with appropriate memblock_ API Use memblock_alloc_try_nid whenever goal (i.e. minimal address is specified) and memblock_alloc_node otherwise. Link: http://lkml.kernel.org/r/1536927045-23536-17-git-send-email-rppt@linux.vnet.ibm.com Signed-off-by: Mike Rapoport Acked-by: Michal Hocko Cc: Catalin Marinas Cc: Chris Zankel Cc: "David S. Miller" Cc: Geert Uytterhoeven Cc: Greentime Hu Cc: Greg Kroah-Hartman Cc: Guan Xuetao Cc: Ingo Molnar Cc: "James E.J. Bottomley" Cc: Jonas Bonn Cc: Jonathan Corbet Cc: Ley Foon Tan Cc: Mark Salter Cc: Martin Schwidefsky Cc: Matt Turner Cc: Michael Ellerman Cc: Michal Simek Cc: Palmer Dabbelt Cc: Paul Burton Cc: Richard Kuo Cc: Richard Weinberger Cc: Rich Felker Cc: Russell King Cc: Serge Semin Cc: Thomas Gleixner Cc: Tony Luck Cc: Vineet Gupta Cc: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 64c0066c1e74650ca7bc90876fbc6bad3bf50c91 Author: Mike Rapoport Date: Tue Oct 30 15:08:41 2018 -0700 memblock: replace alloc_bootmem_pages_node with memblock_alloc_node The functions are equivalent, just the later does not require nobootmem translation layer. Link: http://lkml.kernel.org/r/1536927045-23536-16-git-send-email-rppt@linux.vnet.ibm.com Signed-off-by: Mike Rapoport Acked-by: Michal Hocko Cc: Catalin Marinas Cc: Chris Zankel Cc: "David S. Miller" Cc: Geert Uytterhoeven Cc: Greentime Hu Cc: Greg Kroah-Hartman Cc: Guan Xuetao Cc: Ingo Molnar Cc: "James E.J. Bottomley" Cc: Jonas Bonn Cc: Jonathan Corbet Cc: Ley Foon Tan Cc: Mark Salter Cc: Martin Schwidefsky Cc: Matt Turner Cc: Michael Ellerman Cc: Michal Simek Cc: Palmer Dabbelt Cc: Paul Burton Cc: Richard Kuo Cc: Richard Weinberger Cc: Rich Felker Cc: Russell King Cc: Serge Semin Cc: Thomas Gleixner Cc: Tony Luck Cc: Vineet Gupta Cc: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3913c8f9f96bb75a062ad16ea10a1cdad48bb716 Author: Mike Rapoport Date: Tue Oct 30 15:08:36 2018 -0700 memblock: add align parameter to memblock_alloc_node() With the align parameter memblock_alloc_node() can be used as drop in replacement for alloc_bootmem_pages_node() and __alloc_bootmem_node(), which is done in the following patches. Link: http://lkml.kernel.org/r/1536927045-23536-15-git-send-email-rppt@linux.vnet.ibm.com Signed-off-by: Mike Rapoport Cc: Catalin Marinas Cc: Chris Zankel Cc: "David S. Miller" Cc: Geert Uytterhoeven Cc: Greentime Hu Cc: Greg Kroah-Hartman Cc: Guan Xuetao Cc: Ingo Molnar Cc: "James E.J. Bottomley" Cc: Jonas Bonn Cc: Jonathan Corbet Cc: Ley Foon Tan Cc: Mark Salter Cc: Martin Schwidefsky Cc: Matt Turner Cc: Michael Ellerman Cc: Michal Hocko Cc: Michal Simek Cc: Palmer Dabbelt Cc: Paul Burton Cc: Richard Kuo Cc: Richard Weinberger Cc: Rich Felker Cc: Russell King Cc: Serge Semin Cc: Thomas Gleixner Cc: Tony Luck Cc: Vineet Gupta Cc: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a5159e84daf491a865b20b1ba5ef87f70dc5a627 Author: Mike Rapoport Date: Tue Oct 30 15:08:31 2018 -0700 memblock: replace __alloc_bootmem_nopanic with memblock_alloc_from_nopanic When __alloc_bootmem_nopanic() is used with explicit lower limit for the allocation it attempts to allocate memory at or above that limit and falls back to allocation with no limit set. The memblock_alloc_from_nopanic() does exactly the same thing and can be used as a replacement for __alloc_bootmem_nopanic() is such cases. Link: http://lkml.kernel.org/r/1536927045-23536-14-git-send-email-rppt@linux.vnet.ibm.com Signed-off-by: Mike Rapoport Acked-by: Michal Hocko Cc: Catalin Marinas Cc: Chris Zankel Cc: "David S. Miller" Cc: Geert Uytterhoeven Cc: Greentime Hu Cc: Greg Kroah-Hartman Cc: Guan Xuetao Cc: Ingo Molnar Cc: "James E.J. Bottomley" Cc: Jonas Bonn Cc: Jonathan Corbet Cc: Ley Foon Tan Cc: Mark Salter Cc: Martin Schwidefsky Cc: Matt Turner Cc: Michael Ellerman Cc: Michal Simek Cc: Palmer Dabbelt Cc: Paul Burton Cc: Richard Kuo Cc: Richard Weinberger Cc: Rich Felker Cc: Russell King Cc: Serge Semin Cc: Thomas Gleixner Cc: Tony Luck Cc: Vineet Gupta Cc: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 510d22f44d1621d32deb6c510a258504c8946750 Author: Mike Rapoport Date: Tue Oct 30 15:08:26 2018 -0700 memblock: replace alloc_bootmem_low with memblock_alloc_low (2) The alloc_bootmem_low(size) allocates low memory with default alignment and can be replaced by memblock_alloc_low(size, 0) Link: http://lkml.kernel.org/r/1536927045-23536-13-git-send-email-rppt@linux.vnet.ibm.com Signed-off-by: Mike Rapoport Acked-by: Michal Hocko Cc: Catalin Marinas Cc: Chris Zankel Cc: "David S. Miller" Cc: Geert Uytterhoeven Cc: Greentime Hu Cc: Greg Kroah-Hartman Cc: Guan Xuetao Cc: Ingo Molnar Cc: "James E.J. Bottomley" Cc: Jonas Bonn Cc: Jonathan Corbet Cc: Ley Foon Tan Cc: Mark Salter Cc: Martin Schwidefsky Cc: Matt Turner Cc: Michael Ellerman Cc: Michal Simek Cc: Palmer Dabbelt Cc: Paul Burton Cc: Richard Kuo Cc: Richard Weinberger Cc: Rich Felker Cc: Russell King Cc: Serge Semin Cc: Thomas Gleixner Cc: Tony Luck Cc: Vineet Gupta Cc: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 238997e5e63ab6a655c73d6a65c81cfb7f452f25 Author: Mike Rapoport Date: Tue Oct 30 15:08:22 2018 -0700 memblock: replace alloc_bootmem_pages_nopanic with memblock_alloc_nopanic The alloc_bootmem_pages_nopanic(size) is a shortcut for __alloc_bootmem_nopanic(size, PAGE_SIZE, BOOTMEM_LOW_LIMIT) which allocates PAGE_SIZE aligned memory. Since BOOTMEM_LOW_LIMIT is hardwired to 0 there is no restrictions on where the allocated memory should reside. The memblock_alloc_nopanic(size, PAGE_SIZE) also allocates PAGE_SIZE aligned memory without any restrictions and thus can be used as a replacement for alloc_bootmem_pages_nopanic() Link: http://lkml.kernel.org/r/1536927045-23536-12-git-send-email-rppt@linux.vnet.ibm.com Signed-off-by: Mike Rapoport Acked-by: Michal Hocko Cc: Catalin Marinas Cc: Chris Zankel Cc: "David S. Miller" Cc: Geert Uytterhoeven Cc: Greentime Hu Cc: Greg Kroah-Hartman Cc: Guan Xuetao Cc: Ingo Molnar Cc: "James E.J. Bottomley" Cc: Jonas Bonn Cc: Jonathan Corbet Cc: Ley Foon Tan Cc: Mark Salter Cc: Martin Schwidefsky Cc: Matt Turner Cc: Michael Ellerman Cc: Michal Simek Cc: Palmer Dabbelt Cc: Paul Burton Cc: Richard Kuo Cc: Richard Weinberger Cc: Rich Felker Cc: Russell King Cc: Serge Semin Cc: Thomas Gleixner Cc: Tony Luck Cc: Vineet Gupta Cc: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit bf2886efdc1bdbe839a14d0f47d5d8533b8609a0 Author: Mike Rapoport Date: Tue Oct 30 15:08:18 2018 -0700 memblock: replace __alloc_bootmem_node_nopanic with memblock_alloc_try_nid_nopanic The __alloc_bootmem_node_nopanic() attempts to allocate memory for a specified node. If the allocation fails it then retries to allocate memory from any node. Upon success, the allocated memory is set to 0. The memblock_alloc_try_nid_nopanic() does exactly the same thing and can be used instead. Link: http://lkml.kernel.org/r/1536927045-23536-11-git-send-email-rppt@linux.vnet.ibm.com Signed-off-by: Mike Rapoport Acked-by: Michal Hocko Cc: Catalin Marinas Cc: Chris Zankel Cc: "David S. Miller" Cc: Geert Uytterhoeven Cc: Greentime Hu Cc: Greg Kroah-Hartman Cc: Guan Xuetao Cc: Ingo Molnar Cc: "James E.J. Bottomley" Cc: Jonas Bonn Cc: Jonathan Corbet Cc: Ley Foon Tan Cc: Mark Salter Cc: Martin Schwidefsky Cc: Matt Turner Cc: Michael Ellerman Cc: Michal Simek Cc: Palmer Dabbelt Cc: Paul Burton Cc: Richard Kuo Cc: Richard Weinberger Cc: Rich Felker Cc: Russell King Cc: Serge Semin Cc: Thomas Gleixner Cc: Tony Luck Cc: Vineet Gupta Cc: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 079151704d0118e19d84075592d64668d7fcfecd Author: Mike Rapoport Date: Tue Oct 30 15:08:12 2018 -0700 memblock: replace alloc_bootmem_low with memblock_alloc_low The functions are equivalent, just the later does not require nobootmem translation layer. Link: http://lkml.kernel.org/r/1536927045-23536-10-git-send-email-rppt@linux.vnet.ibm.com Signed-off-by: Mike Rapoport Acked-by: Michal Hocko Cc: Catalin Marinas Cc: Chris Zankel Cc: "David S. Miller" Cc: Geert Uytterhoeven Cc: Greentime Hu Cc: Greg Kroah-Hartman Cc: Guan Xuetao Cc: Ingo Molnar Cc: "James E.J. Bottomley" Cc: Jonas Bonn Cc: Jonathan Corbet Cc: Ley Foon Tan Cc: Mark Salter Cc: Martin Schwidefsky Cc: Matt Turner Cc: Michael Ellerman Cc: Michal Simek Cc: Palmer Dabbelt Cc: Paul Burton Cc: Richard Kuo Cc: Richard Weinberger Cc: Rich Felker Cc: Russell King Cc: Serge Semin Cc: Thomas Gleixner Cc: Tony Luck Cc: Vineet Gupta Cc: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e0802b8dfcd1fded7d82ef5993eb0c1087788b1a Author: Mike Rapoport Date: Tue Oct 30 15:08:08 2018 -0700 memblock: replace alloc_bootmem_align with memblock_alloc The functions are equivalent, just the later does not require nobootmem translation layer. Link: http://lkml.kernel.org/r/1536927045-23536-9-git-send-email-rppt@linux.vnet.ibm.com Signed-off-by: Mike Rapoport Acked-by: Michal Hocko Cc: Catalin Marinas Cc: Chris Zankel Cc: "David S. Miller" Cc: Geert Uytterhoeven Cc: Greentime Hu Cc: Greg Kroah-Hartman Cc: Guan Xuetao Cc: Ingo Molnar Cc: "James E.J. Bottomley" Cc: Jonas Bonn Cc: Jonathan Corbet Cc: Ley Foon Tan Cc: Mark Salter Cc: Martin Schwidefsky Cc: Matt Turner Cc: Michael Ellerman Cc: Michal Simek Cc: Palmer Dabbelt Cc: Paul Burton Cc: Richard Kuo Cc: Richard Weinberger Cc: Rich Felker Cc: Russell King Cc: Serge Semin Cc: Thomas Gleixner Cc: Tony Luck Cc: Vineet Gupta Cc: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit eb31d559f1e8390195372cd51cfb198da8bc84b9 Author: Mike Rapoport Date: Tue Oct 30 15:08:04 2018 -0700 memblock: remove _virt from APIs returning virtual address The conversion is done using sed -i 's@memblock_virt_alloc@memblock_alloc@g' \ $(git grep -l memblock_virt_alloc) Link: http://lkml.kernel.org/r/1536927045-23536-8-git-send-email-rppt@linux.vnet.ibm.com Signed-off-by: Mike Rapoport Cc: Catalin Marinas Cc: Chris Zankel Cc: "David S. Miller" Cc: Geert Uytterhoeven Cc: Greentime Hu Cc: Greg Kroah-Hartman Cc: Guan Xuetao Cc: Ingo Molnar Cc: "James E.J. Bottomley" Cc: Jonas Bonn Cc: Jonathan Corbet Cc: Ley Foon Tan Cc: Mark Salter Cc: Martin Schwidefsky Cc: Matt Turner Cc: Michael Ellerman Cc: Michal Hocko Cc: Michal Simek Cc: Palmer Dabbelt Cc: Paul Burton Cc: Richard Kuo Cc: Richard Weinberger Cc: Rich Felker Cc: Russell King Cc: Serge Semin Cc: Thomas Gleixner Cc: Tony Luck Cc: Vineet Gupta Cc: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9a8dd708d547268c899f1cb443c49bd4d8c84eb3 Author: Mike Rapoport Date: Tue Oct 30 15:07:59 2018 -0700 memblock: rename memblock_alloc{_nid,_try_nid} to memblock_phys_alloc* Make it explicit that the caller gets a physical address rather than a virtual one. This will also allow using meblock_alloc prefix for memblock allocations returning virtual address, which is done in the following patches. The conversion is done using the following semantic patch: @@ expression e1, e2, e3; @@ ( - memblock_alloc(e1, e2) + memblock_phys_alloc(e1, e2) | - memblock_alloc_nid(e1, e2, e3) + memblock_phys_alloc_nid(e1, e2, e3) | - memblock_alloc_try_nid(e1, e2, e3) + memblock_phys_alloc_try_nid(e1, e2, e3) ) Link: http://lkml.kernel.org/r/1536927045-23536-7-git-send-email-rppt@linux.vnet.ibm.com Signed-off-by: Mike Rapoport Acked-by: Michal Hocko Cc: Catalin Marinas Cc: Chris Zankel Cc: "David S. Miller" Cc: Geert Uytterhoeven Cc: Greentime Hu Cc: Greg Kroah-Hartman Cc: Guan Xuetao Cc: Ingo Molnar Cc: "James E.J. Bottomley" Cc: Jonas Bonn Cc: Jonathan Corbet Cc: Ley Foon Tan Cc: Mark Salter Cc: Martin Schwidefsky Cc: Matt Turner Cc: Michael Ellerman Cc: Michal Simek Cc: Palmer Dabbelt Cc: Paul Burton Cc: Richard Kuo Cc: Richard Weinberger Cc: Rich Felker Cc: Russell King Cc: Serge Semin Cc: Thomas Gleixner Cc: Tony Luck Cc: Vineet Gupta Cc: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b146ada221c178a384fee2a8e2e5b2e8a04476b1 Author: Mike Rapoport Date: Tue Oct 30 15:07:54 2018 -0700 mm: nobootmem: remove dead code Several bootmem functions and macros are not used. Remove them. Link: http://lkml.kernel.org/r/1536927045-23536-6-git-send-email-rppt@linux.vnet.ibm.com Signed-off-by: Mike Rapoport Acked-by: Michal Hocko Cc: Catalin Marinas Cc: Chris Zankel Cc: "David S. Miller" Cc: Geert Uytterhoeven Cc: Greentime Hu Cc: Greg Kroah-Hartman Cc: Guan Xuetao Cc: Ingo Molnar Cc: "James E.J. Bottomley" Cc: Jonas Bonn Cc: Jonathan Corbet Cc: Ley Foon Tan Cc: Mark Salter Cc: Martin Schwidefsky Cc: Matt Turner Cc: Michael Ellerman Cc: Michal Simek Cc: Palmer Dabbelt Cc: Paul Burton Cc: Richard Kuo Cc: Richard Weinberger Cc: Rich Felker Cc: Russell King Cc: Serge Semin Cc: Thomas Gleixner Cc: Tony Luck Cc: Vineet Gupta Cc: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 355c45affca7114ab510e296a5b7012943aeea17 Author: Mike Rapoport Date: Tue Oct 30 15:07:50 2018 -0700 mm: remove bootmem allocator implementation. All architectures have been converted to use MEMBLOCK + NO_BOOTMEM. The bootmem allocator implementation can be removed. Link: http://lkml.kernel.org/r/1536927045-23536-5-git-send-email-rppt@linux.vnet.ibm.com Signed-off-by: Mike Rapoport Acked-by: Michal Hocko Cc: Catalin Marinas Cc: Chris Zankel Cc: "David S. Miller" Cc: Geert Uytterhoeven Cc: Greentime Hu Cc: Greg Kroah-Hartman Cc: Guan Xuetao Cc: Ingo Molnar Cc: "James E.J. Bottomley" Cc: Jonas Bonn Cc: Jonathan Corbet Cc: Ley Foon Tan Cc: Mark Salter Cc: Martin Schwidefsky Cc: Matt Turner Cc: Michael Ellerman Cc: Michal Simek Cc: Palmer Dabbelt Cc: Paul Burton Cc: Richard Kuo Cc: Richard Weinberger Cc: Rich Felker Cc: Russell King Cc: Serge Semin Cc: Thomas Gleixner Cc: Tony Luck Cc: Vineet Gupta Cc: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit aca52c39838910605b1063a2243f553aa2a02d5c Author: Mike Rapoport Date: Tue Oct 30 15:07:44 2018 -0700 mm: remove CONFIG_HAVE_MEMBLOCK All architecures use memblock for early memory management. There is no need for the CONFIG_HAVE_MEMBLOCK configuration option. [rppt@linux.vnet.ibm.com: of/fdt: fixup #ifdefs] Link: http://lkml.kernel.org/r/20180919103457.GA20545@rapoport-lnx [rppt@linux.vnet.ibm.com: csky: fixups after bootmem removal] Link: http://lkml.kernel.org/r/20180926112744.GC4628@rapoport-lnx [rppt@linux.vnet.ibm.com: remove stale #else and the code it protects] Link: http://lkml.kernel.org/r/1538067825-24835-1-git-send-email-rppt@linux.vnet.ibm.com Link: http://lkml.kernel.org/r/1536927045-23536-4-git-send-email-rppt@linux.vnet.ibm.com Signed-off-by: Mike Rapoport Acked-by: Michal Hocko Tested-by: Jonathan Cameron Cc: Catalin Marinas Cc: Chris Zankel Cc: "David S. Miller" Cc: Geert Uytterhoeven Cc: Greentime Hu Cc: Greg Kroah-Hartman Cc: Guan Xuetao Cc: Ingo Molnar Cc: "James E.J. Bottomley" Cc: Jonas Bonn Cc: Jonathan Corbet Cc: Ley Foon Tan Cc: Mark Salter Cc: Martin Schwidefsky Cc: Matt Turner Cc: Michael Ellerman Cc: Michal Simek Cc: Palmer Dabbelt Cc: Paul Burton Cc: Richard Kuo Cc: Richard Weinberger Cc: Rich Felker Cc: Russell King Cc: Serge Semin Cc: Thomas Gleixner Cc: Tony Luck Cc: Vineet Gupta Cc: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b4a991ec584b3ce333342c431c3cc4fef8a690d7 Author: Mike Rapoport Date: Tue Oct 30 15:07:40 2018 -0700 mm: remove CONFIG_NO_BOOTMEM All achitectures select NO_BOOTMEM which essentially becomes 'Y' for any kernel configuration and therefore it can be removed. [alexander.h.duyck@linux.intel.com: remove now defunct NO_BOOTMEM from depends list for deferred init] Link: http://lkml.kernel.org/r/20180925201814.3576.15105.stgit@localhost.localdomain Link: http://lkml.kernel.org/r/1536927045-23536-3-git-send-email-rppt@linux.vnet.ibm.com Signed-off-by: Mike Rapoport Signed-off-by: Alexander Duyck Acked-by: Michal Hocko Cc: Catalin Marinas Cc: Chris Zankel Cc: "David S. Miller" Cc: Geert Uytterhoeven Cc: Greentime Hu Cc: Greg Kroah-Hartman Cc: Guan Xuetao Cc: Ingo Molnar Cc: "James E.J. Bottomley" Cc: Jonas Bonn Cc: Jonathan Corbet Cc: Ley Foon Tan Cc: Mark Salter Cc: Martin Schwidefsky Cc: Matt Turner Cc: Michael Ellerman Cc: Michal Simek Cc: Palmer Dabbelt Cc: Paul Burton Cc: Richard Kuo Cc: Richard Weinberger Cc: Rich Felker Cc: Russell King Cc: Serge Semin Cc: Thomas Gleixner Cc: Tony Luck Cc: Vineet Gupta Cc: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 69a60bc75fe73511af89328ded1b33bc4a625a5c Author: Alexander Pateenok Date: Tue Oct 30 15:07:36 2018 -0700 percpu: remove PER_CPU_DEF_ATTRIBUTES macro The macro is not used: $ grep -r PER_CPU_DEF_ATTRIBUTES include/linux/percpu-defs.h: __PCPU_ATTRS(sec) PER_CPU_DEF_ATTRIBUTES __weak \ include/linux/percpu-defs.h: __PCPU_ATTRS(sec) PER_CPU_DEF_ATTRIBUTES \ include/asm-generic/percpu.h:#ifndef PER_CPU_DEF_ATTRIBUTES include/asm-generic/percpu.h:#define PER_CPU_DEF_ATTRIBUTES It was added with b01e8dc34379 ("alpha: fix percpu build breakage") and removed in 2009 with b01e8dc34379..6088464cf1ae. Link: http://lkml.kernel.org/r/20180821164904.qqhcduimjznods66@K55DR.localdomain Signed-off-by: Alexander Pateenok Acked-by: Tejun Heo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6a32c2469c3fbfee8f25bcd20af647326650a6cf Author: Arnd Bergmann Date: Tue Oct 30 15:07:32 2018 -0700 kbuild: fix kernel/bounds.c 'W=1' warning Building any configuration with 'make W=1' produces a warning: kernel/bounds.c:16:6: warning: no previous prototype for 'foo' [-Wmissing-prototypes] When also passing -Werror, this prevents us from building any other files. Nobody ever calls the function, but we can't make it 'static' either since we want the compiler output. Calling it 'main' instead however avoids the warning, because gcc does not insist on having a declaration for main. Link: http://lkml.kernel.org/r/20181005083313.2088252-1-arnd@arndb.de Signed-off-by: Arnd Bergmann Reported-by: Kieran Bingham Reviewed-by: Kieran Bingham Cc: David Laight Cc: Masahiro Yamada Cc: Greg Kroah-Hartman Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2209fda323e2fd2a2d0885595fd5097717f8d2aa Author: Gao Xiang Date: Tue Oct 30 15:07:28 2018 -0700 lib/lz4: update LZ4 decompressor module Update the LZ4 compression module based on LZ4 v1.8.3 in order for the erofs file system to use the newest LZ4_decompress_safe_partial() which can now decode exactly the nb of bytes requested [1] to take place of the open hacked code in the erofs file system itself. Currently, apart from the erofs file system, no other users use LZ4_decompress_safe_partial, so no worry about the interface. In addition, LZ4 v1.8.x boosts up decompression speed compared to the current code which is based on LZ4 v1.7.3, mainly due to shortcut optimization for the specific common LZ4-sequences [2]. lzbench testdata (tested in kirin710, 8 cores, 4 big cores at 2189Mhz, 2GB DDR RAM at 1622Mhz, with enwik8 testdata [3]): Compressor name Compress. Decompress. Compr. size Ratio Filename memcpy 5004 MB/s 4924 MB/s 100000000 100.00 enwik8 lz4hc 1.7.3 -9 12 MB/s 653 MB/s 42203253 42.20 enwik8 lz4hc 1.8.0 -9 12 MB/s 908 MB/s 42203096 42.20 enwik8 lz4hc 1.8.3 -9 11 MB/s 965 MB/s 42203094 42.20 enwik8 [1] https://github.com/lz4/lz4/issues/566 https://github.com/lz4/lz4/commit/08d347b5b217b011ff7487130b79480d8cfdaeb8 [2] v1.8.1 perf: slightly faster compression and decompression speed https://github.com/lz4/lz4/commit/a31b7058cb97e4393da55e78a77a1c6f0c9ae038 v1.8.2 perf: slightly faster HC compression and decompression speed https://github.com/lz4/lz4/commit/45f8603aae389d34c689d3ff7427b314071ccd2c https://github.com/lz4/lz4/commit/1a191b3f8d26b50a7c1d41590b529ec308d768cd [3] http://mattmahoney.net/dc/textdata.html http://mattmahoney.net/dc/enwik8.zip Link: http://lkml.kernel.org/r/1537181207-21932-1-git-send-email-gaoxiang25@huawei.com Signed-off-by: Gao Xiang Tested-by: Guo Xuenan Cc: Colin Ian King Cc: Yann Collet Cc: Greg Kroah-Hartman Cc: Fang Wei Cc: Chao Yu Cc: Miao Xie Cc: Sven Schmidt <4sschmid@informatik.uni-hamburg.de> Cc: Kyungsik Lee Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8c81ddd2acd2c10979f5a64f6784ce7c6717495e Author: Waiman Long Date: Tue Oct 30 15:07:24 2018 -0700 ipc: IPCMNI limit check for semmni For SysV semaphores, the semmni value is the last part of the 4-element sem number array. To make semmni behave in a similar way to msgmni and shmmni, we can't directly use the _minmax handler. Instead, a special sem specific handler is added to check the last argument to make sure that it is limited to the [0, IPCMNI] range. An error will be returned if this is not the case. Link: http://lkml.kernel.org/r/1536352137-12003-3-git-send-email-longman@redhat.com Signed-off-by: Waiman Long Reviewed-by: Davidlohr Bueso Cc: "Eric W. Biederman" Cc: Jonathan Corbet Cc: Kees Cook Cc: Luis R. Rodriguez Cc: Matthew Wilcox Cc: Takashi Iwai Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6730e6580177d13f4612767873cb5a533ad63c61 Author: Waiman Long Date: Tue Oct 30 15:07:20 2018 -0700 ipc: IPCMNI limit check for msgmni and shmmni Patch series "ipc: IPCMNI limit check for *mni & increase that limit", v9. The sysctl parameters msgmni, shmmni and semmni have an inherent limit of IPC_MNI (32k). However, users may not be aware of that because they can write a value much higher than that without getting any error or notification. Reading the parameters back will show the newly written values which are not real. The real IPCMNI limit is now enforced to make sure that users won't put in an unrealistic value. The first 2 patches enforce the limits. There are also users out there requesting increase in the IPCMNI value. The last 2 patches attempt to do that by using a boot kernel parameter "ipcmni_extend" to increase the IPCMNI limit from 32k to 8M if the users really want the extended value. This patch (of 4): A user can write arbitrary integer values to msgmni and shmmni sysctl parameters without getting error, but the actual limit is really IPCMNI (32k). This can mislead users as they think they can get a value that is not real. The right limits are now set for msgmni and shmmni so that the users will become aware if they set a value outside of the acceptable range. Link: http://lkml.kernel.org/r/1536352137-12003-2-git-send-email-longman@redhat.com Signed-off-by: Waiman Long Acked-by: Luis R. Rodriguez Reviewed-by: Davidlohr Bueso Cc: Kees Cook Cc: Jonathan Corbet Cc: Matthew Wilcox Cc: "Eric W. Biederman" Cc: Takashi Iwai Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b49dec1cf8ff1e0b204dd2c30b95a92d75591146 Author: Borislav Petkov Date: Tue Oct 30 15:07:17 2018 -0700 kernel/panic.c: filter out a potential trailing newline If a call to panic() terminates the string with a \n , the result puts the closing brace ']---' on a newline because panic() itself adds \n too. Now, if one goes and removes the newline chars from all panic() invocations - and the stats right now look like this: ~300 calls with a \n ~500 calls without a \n one is destined to a neverending game of whack-a-mole because the usual thing to do is add a newline at the end of a string a function is supposed to print. Therefore, simply zap any \n at the end of the panic string to avoid touching so many places in the kernel. Link: http://lkml.kernel.org/r/20181009205019.2786-1-bp@alien8.de Signed-off-by: Borislav Petkov Acked-by: Kees Cook Reviewed-by: Steven Rostedt (VMware) Acked-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 95c4fb78fb23081472465ca20d5d31c4b780ed82 Author: Borislav Petkov Date: Tue Oct 30 15:07:13 2018 -0700 kernel/panic.c: do not append newline to the stack protector panic string ... because panic() itself already does this. Otherwise you have line-broken trailer: [ 1.836965] ---[ end Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: pgd_alloc+0x29e/0x2a0 [ 1.836965] ]--- Link: http://lkml.kernel.org/r/20181008202901.7894-1-bp@alien8.de Signed-off-by: Borislav Petkov Acked-by: Kees Cook Cc: Masahiro Yamada Cc: "Steven Rostedt (VMware)" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3819ddec1f8c8a5daf215bec4067f8fd1dc40d6d Author: Gustavo A. R. Silva Date: Tue Oct 30 15:07:10 2018 -0700 include/linux/signal.h: mark expected switch fall-throughs In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Link: http://lkml.kernel.org/r/20181013114847.GA3160@embeddedor.com Signed-off-by: Gustavo A. R. Silva Acked-by: Kees Cook Reviewed-by: Michael Ellerman Cc: Oleg Nesterov Cc: "Eric W. Biederman" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2e58f57d859fbe0ce79e052d7a63bba32d5786e8 Author: Weikang Shi Date: Tue Oct 30 15:07:05 2018 -0700 kernel/signal.c: fix a comment error Because get_signal_to_deliver() was renamed to get_signal() the comment should be fixed. Link: http://lkml.kernel.org/r/1539179128-45709-1-git-send-email-swkhack@gmail.com Signed-off-by: Weikang Shi Reported-by: Christian Brauner Cc: Eric W. Biederman Cc: Oleg Nesterov Cc: Anna-Maria Gleixner Cc: "Luck, Tony" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 22ea4eba63410515c1aa6e0dde67bda22d31a660 Author: Frank Sorenson Date: Tue Oct 30 15:07:01 2018 -0700 fat: truncate inode timestamp updates in setattr setattr_copy can't truncate timestamps correctly for msdos/vfat, so truncate and copy them ourselves. Link: http://lkml.kernel.org/r/a2b4701b1125573fafaeaae6802050ca86d6f8cc.1538363961.git.sorenson@redhat.com Signed-off-by: Frank Sorenson Acked-by: OGAWA Hirofumi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit cd83f6b194e95fa616dd3157ae7a63d4713b6670 Author: Frank Sorenson Date: Tue Oct 30 15:06:57 2018 -0700 fat: change timestamp updates to use fat_truncate_time Convert the inode timestamp updates to use fat_truncate_time. Link: http://lkml.kernel.org/r/2663d3083c4dd62f00b64612c8eaf5542bb05a4c.1538363961.git.sorenson@redhat.com Signed-off-by: Frank Sorenson Acked-by: OGAWA Hirofumi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6bb885ecd746752aa70d146b58f2f83e5e21813d Author: Frank Sorenson Date: Tue Oct 30 15:06:53 2018 -0700 fat: add functions to update and truncate timestamps appropriately Add the fat-specific inode_operation ->update_time() and fat_truncate_time() function to truncate the inode timestamps from 1 nanosecond to the appropriate granularity. Link: http://lkml.kernel.org/r/38af1ba3c3cf0d7381ce7b63077ef8af75901532.1538363961.git.sorenson@redhat.com Signed-off-by: Frank Sorenson Acked-by: OGAWA Hirofumi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d9f4d94261d52a5fe31ad2ec00a06824a150af6f Author: Frank Sorenson Date: Tue Oct 30 15:06:50 2018 -0700 fat: create a function to calculate the timezone offest Patch series "fat: timestamp updates", v5. fat/msdos timestamps are stored on-disk with several different granularities, some of them lower resolution than timespec64_trunc() can provide. In addition, they are only truncated as they are written to disk, so the timestamps in-memory for new or modified files/directories may be different from the same timestamps after a remount, as the now-truncated times are re-read from the on-disk format. These patches allow finer granularity for the timestamps where possible and add fat-specific ->update_time inode operation and fat_truncate_time functions to truncate each timestamp correctly, giving consistent times across remounts. This patch (of 4): Move the calculation of the number of seconds in the timezone offset to a common function. Link: http://lkml.kernel.org/r/3671ff8cff5eeedbb85ebda5e4de0728920db4f6.1538363961.git.sorenson@redhat.com Signed-off-by: Frank Sorenson Acked-by: OGAWA Hirofumi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit eceb8902be2910be296f00ad6662941d79c09f8e Author: Mihir Mehta Date: Tue Oct 30 15:06:46 2018 -0700 fat: expand a slightly out-of-date comment The file namei.c seems to have been renamed to namei_msdos.c, so I decided to update the comment with the correct name, and expand it a bit to tell the reader what to look for. Link: http://lkml.kernel.org/r/20180928194947.23932-1-mihir@cs.utexas.edu Signed-off-by: Mihir Mehta Acked-by: OGAWA Hirofumi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 21bfc8309cca566b76fc0c1d65c598e62f8971a1 Author: Masahiro Yamada Date: Tue Oct 30 15:06:42 2018 -0700 reiserfs: remove workaround code for GCC 3.x cafa0010cd51 ("Raise the minimum required gcc version to 4.6") bumped the minimum GCC version to 4.6 for all architectures. The workaround code in fs/reiserfs/Makefile is obsolete now. Link: http://lkml.kernel.org/r/1535337230-13222-1-git-send-email-yamada.masahiro@socionext.com Signed-off-by: Masahiro Yamada Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b10298d56c9623f9b173f19959732d3184b35f4f Author: Jann Horn Date: Tue Oct 30 15:06:38 2018 -0700 reiserfs: propagate errors from fill_with_dentries() properly fill_with_dentries() failed to propagate errors up to reiserfs_for_each_xattr() properly. Plumb them through. Note that reiserfs_for_each_xattr() is only used by reiserfs_delete_xattrs() and reiserfs_chown_xattrs(). The result of reiserfs_delete_xattrs() is discarded anyway, the only difference there is whether a warning is printed to dmesg. The result of reiserfs_chown_xattrs() does matter because it can block chowning of the file to which the xattrs belong; but either way, the resulting state can have misaligned ownership, so my patch doesn't improve things greatly. Credit for making me look at this code goes to Al Viro, who pointed out that the ->actor calling convention is suboptimal and should be changed. Link: http://lkml.kernel.org/r/20180802163335.83312-1-jannh@google.com Signed-off-by: Jann Horn Reviewed-by: Andrew Morton Cc: Jeff Mahoney Cc: Eric Biggers Cc: Al Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6c9a3f843a29d6894dfc40df338b91dbd78f0ae3 Author: Colin Ian King Date: Tue Oct 30 15:06:35 2018 -0700 fs/hfs/extent.c: fix array out of bounds read of array extent Currently extent and index i are both being incremented causing an array out of bounds read on extent[i]. Fix this by removing the extraneous increment of extent. Ernesto said: : This is only triggered when deleting a file with a resource fork. I : may be wrong because the documentation isn't clear, but I don't think : you can create those under linux. So I guess nobody was testing them. : : > A disk space leak, perhaps? : : That's what it looks like in general. hfs_free_extents() won't do : anything if the block count doesn't add up, and the error will be : ignored. Now, if the block count randomly does add up, we could see : some corruption. Detected by CoverityScan, CID#711541 ("Out of bounds read") Link: http://lkml.kernel.org/r/20180831140538.31566-1-colin.king@canonical.com Signed-off-by: Colin Ian King Reviewed-by: Ernesto A. Fernndez Cc: David Howells Cc: Al Viro Cc: Hin-Tak Leung Cc: Vyacheslav Dubeyko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8cd3cb5061730af085a3f9890a3352f162b4e20c Author: Ernesto A. Fernández Date: Tue Oct 30 15:06:31 2018 -0700 hfs: update timestamp on truncate() The vfs takes care of updating mtime on ftruncate(), but on truncate() it must be done by the module. Link: http://lkml.kernel.org/r/e1611eda2985b672ed2d8677350b4ad8c2d07e8a.1539316825.git.ernesto.mnd.fernandez@gmail.com Signed-off-by: Ernesto A. Fernández Reviewed-by: Vyacheslav Dubeyko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit dc8844aada735890a6de109bef327f5df36a982e Author: Ernesto A. Fernández Date: Tue Oct 30 15:06:27 2018 -0700 hfsplus: update timestamps on truncate() The vfs takes care of updating ctime and mtime on ftruncate(), but on truncate() it must be done by the module. This patch can be tested with xfstests generic/313. Link: http://lkml.kernel.org/r/9beb0913eea37288599e8e1b7cec8768fb52d1b8.1539316825.git.ernesto.mnd.fernandez@gmail.com Signed-off-by: Ernesto A. Fernández Reviewed-by: Vyacheslav Dubeyko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1267a07be5ebbff2d2739290f3d043ae137c15b4 Author: Ernesto A. Fernández Date: Tue Oct 30 15:06:24 2018 -0700 hfs: fix return value of hfs_get_block() Direct writes to empty inodes fail with EIO. The generic direct-io code is in part to blame (a patch has been submitted as "direct-io: allow direct writes to empty inodes"), but hfs is worse affected than the other filesystems because the fallback to buffered I/O doesn't happen. The problem is the return value of hfs_get_block() when called with !create. Change it to be more consistent with the other modules. Link: http://lkml.kernel.org/r/4538ab8c35ea37338490525f0f24cbc37227528c.1539195310.git.ernesto.mnd.fernandez@gmail.com Signed-off-by: Ernesto A. Fernández Reviewed-by: Vyacheslav Dubeyko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 839c3a6a5e1fbc8542d581911b35b2cb5cd29304 Author: Ernesto A. Fernández Date: Tue Oct 30 15:06:21 2018 -0700 hfsplus: fix return value of hfsplus_get_block() Direct writes to empty inodes fail with EIO. The generic direct-io code is in part to blame (a patch has been submitted as "direct-io: allow direct writes to empty inodes"), but hfsplus is worse affected than the other filesystems because the fallback to buffered I/O doesn't happen. The problem is the return value of hfsplus_get_block() when called with !create. Change it to be more consistent with the other modules. Link: http://lkml.kernel.org/r/2cd1301404ec7cf1e39c8f11a01a4302f1460ad6.1539195310.git.ernesto.mnd.fernandez@gmail.com Signed-off-by: Ernesto A. Fernández Reviewed-by: Vyacheslav Dubeyko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 54640c7502e5ed41fbf4eedd499e85f9acc9698f Author: Ernesto A. Fernández Date: Tue Oct 30 15:06:17 2018 -0700 hfs: prevent btree data loss on ENOSPC Inserting a new record in a btree may require splitting several of its nodes. If we hit ENOSPC halfway through, the new nodes will be left orphaned and their records will be lost. This could mean lost inodes or extents. Henceforth, check the available disk space before making any changes. This still leaves the potential problem of corruption on ENOMEM. There is no need to reserve space before deleting a catalog record, as we do for hfsplus. This difference is because hfs index nodes have fixed length keys. Link: http://lkml.kernel.org/r/ab5fc8a7d5ffccfd5f27b1cf2cb4ceb6c110da74.1536269131.git.ernesto.mnd.fernandez@gmail.com Signed-off-by: Ernesto A. Fernández Cc: Christoph Hellwig Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d92915c35bfaf763d78bf1d5ac7f183420e3bd99 Author: Ernesto A. Fernández Date: Tue Oct 30 15:06:14 2018 -0700 hfsplus: prevent btree data loss on ENOSPC Inserting or deleting a record in a btree may require splitting several of its nodes. If we hit ENOSPC halfway through, the new nodes will be left orphaned and their records will be lost. This could mean lost inodes, extents or xattrs. Henceforth, check the available disk space before making any changes. This still leaves the potential problem of corruption on ENOMEM. The patch can be tested with xfstests generic/027. Link: http://lkml.kernel.org/r/4596eef22fbda137b4ffa0272d92f0da15364421.1536269129.git.ernesto.mnd.fernandez@gmail.com Signed-off-by: Ernesto A. Fernández Cc: Christoph Hellwig Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ef75bcc5763d130451a99825f247d301088b790b Author: Ernesto A. Fernández Date: Tue Oct 30 15:06:11 2018 -0700 hfs: fix BUG on bnode parent update hfs_brec_update_parent() may hit BUG_ON() if the first record of both a leaf node and its parent are changed, and if this forces the parent to be split. It is not possible for this to happen on a valid hfs filesystem because the index nodes have fixed length keys. For reasons I ignore, the hfs module does have support for a number of hfsplus features. A corrupt btree header may report variable length keys and trigger this BUG, so it's better to fix it. Link: http://lkml.kernel.org/r/cf9b02d57f806217a2b1bf5db8c3e39730d8f603.1535682463.git.ernesto.mnd.fernandez@gmail.com Signed-off-by: Ernesto A. Fernández Reviewed-by: Andrew Morton Cc: Christoph Hellwig Cc: Viacheslav Dubeyko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d057c036672f33d43a5f7344acbb08cf3a8a0c09 Author: Ernesto A. Fernández Date: Tue Oct 30 15:06:07 2018 -0700 hfs: prevent btree data loss on root split This bug is triggered whenever hfs_brec_update_parent() needs to split the root node. The height of the btree is not increased, which leaves the new node orphaned and its records lost. It is not possible for this to happen on a valid hfs filesystem because the index nodes have fixed length keys. For reasons I ignore, the hfs module does have support for a number of hfsplus features. A corrupt btree header may report variable length keys and trigger this bug, so it's better to fix it. Link: http://lkml.kernel.org/r/9750b1415685c4adca10766895f6d5ef12babdb0.1535682463.git.ernesto.mnd.fernandez@gmail.com Signed-off-by: Ernesto A. Fernández Cc: Christoph Hellwig Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 19a9d0f1acf75e8be8cfba19c1a34e941846fa2b Author: Ernesto A. Fernández Date: Tue Oct 30 15:06:04 2018 -0700 hfsplus: fix BUG on bnode parent update Creating, renaming or deleting a file may hit BUG_ON() if the first record of both a leaf node and its parent are changed, and if this forces the parent to be split. This bug is triggered by xfstests generic/027, somewhat rarely; here is a more reliable reproducer: truncate -s 50M fs.iso mkfs.hfsplus fs.iso mount fs.iso /mnt i=1000 while [ $i -le 2400 ]; do touch /mnt/$i &>/dev/null ((++i)) done i=2400 while [ $i -ge 1000 ]; do mv /mnt/$i /mnt/$(perl -e "print $i x61") &>/dev/null ((--i)) done The issue is that a newly created bnode is being put twice. Reset new_node to NULL in hfs_brec_update_parent() before reaching goto again. Link: http://lkml.kernel.org/r/5ee1db09b60373a15890f6a7c835d00e76bf601d.1535682461.git.ernesto.mnd.fernandez@gmail.com Signed-off-by: Ernesto A. Fernández Cc: Christoph Hellwig Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0a3021d4f5295aa073c7bf5c5e4de60a2e292578 Author: Ernesto A. Fernández Date: Tue Oct 30 15:06:00 2018 -0700 hfsplus: prevent btree data loss on root split Creating, renaming or deleting a file may cause catalog corruption and data loss. This bug is randomly triggered by xfstests generic/027, but here is a faster reproducer: truncate -s 50M fs.iso mkfs.hfsplus fs.iso mount fs.iso /mnt i=100 while [ $i -le 150 ]; do touch /mnt/$i &>/dev/null ((++i)) done i=100 while [ $i -le 150 ]; do mv /mnt/$i /mnt/$(perl -e "print $i x82") &>/dev/null ((++i)) done umount /mnt fsck.hfsplus -n fs.iso The bug is triggered whenever hfs_brec_update_parent() needs to split the root node. The height of the btree is not increased, which leaves the new node orphaned and its records lost. Link: http://lkml.kernel.org/r/26d882184fc43043a810114258f45277752186c7.1535682461.git.ernesto.mnd.fernandez@gmail.com Signed-off-by: Ernesto A. Fernández Cc: Christoph Hellwig Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f027c34d844013d9d6c902af8fa01a82d6e5073d Author: Nikolaus Voss Date: Tue Oct 30 15:05:57 2018 -0700 init/do_mounts.c: add root=PARTLABEL= support Support referencing the root partition label from GPT as argument to the root= option on the kernel command line in analogy to referencing the partition uuid as root=PARTUUID=. Specifying the partition label instead of the uuid is often much easier, e.g. in embedded environments when there is an A/B rootfs partition scheme for interruptible firmware updates (i.e. rootfsA/ rootfsB). The partition label can be queried with the blkid command. Link: http://lkml.kernel.org/r/20180822060904.828E510665E@pc-niv.weinmann.com Signed-off-by: Nikolaus Voss Reviewed-by: Andrew Morton Cc: Dominik Brodowski Cc: Sasha Levin Cc: Al Viro Cc: Jens Axboe Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 22ebb72b32606aa0f891e09de007be7d3d8effd1 Author: Christophe Leroy Date: Tue Oct 30 15:05:53 2018 -0700 checkpatch: remove GCC_BINARY_CONSTANT warning This warning was there to avoid the use of 0bxxx values as they are not supported by gcc prior to v4.3 Since cafa0010cd51f ("Raise the minimum required gcc version to 4.6"), it's not an issue anymore and using such values can increase readability of code. Joe said: : Seems sensible as the other compilers also support binary literals from : relatively old versions. : http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3472.pdf : https://software.intel.com/en-us/articles/c14-features-supported-by-intel-c-compiler Link: http://lkml.kernel.org/r/392eeae782302ee8812a3c932a602035deed1609.1535351453.git.christophe.leroy@c-s.fr Signed-off-by: Christophe Leroy Cc: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 89976005536c47a788bdd6cef5a4e9fef3c0de32 Author: Gustavo A. R. Silva Date: Tue Oct 30 15:05:49 2018 -0700 include/linux/compat.h: mark expected switch fall-throughs In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Link: http://lkml.kernel.org/r/20181013115048.GA3262@embeddedor.com Signed-off-by: Gustavo A. R. Silva Acked-by: Kees Cook Cc: Michael Ellerman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 048e513d876113ebc2352ac2add66e4bfec67037 Author: Alexey Dobriyan Date: Tue Oct 30 15:05:46 2018 -0700 lib/kstrtox.c: delete unnecessary casts Implicit casts to the same type are done by the language if necessary. Link: http://lkml.kernel.org/r/20181014223934.GA18107@avx2 Signed-off-by: Alexey Dobriyan Reviewed-by: Andrew Morton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7e5ca363a5a1ec42c54dc1e0644b361a2daf984c Author: Wei Yang Date: Tue Oct 30 15:05:42 2018 -0700 lib/rbtree.c: fix typo in comment of rb_insert_augmented() The function name in the comment is not correct. Link: http://lkml.kernel.org/r/20181010021344.60433-1-richard.weiyang@gmail.com Signed-off-by: Wei Yang Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7f476715d05f53915f0390e074a6988ce6a12f36 Author: zhong jiang Date: Tue Oct 30 15:05:37 2018 -0700 lib/sg_pool.c: remove unnecessary null check when freeing object mempool_destroy(NULL) and kmem_cache_destroy(NULL) are legal Link: http://lkml.kernel.org/r/1533054107-35657-1-git-send-email-zhongjiang@huawei.com Signed-off-by: zhong jiang Cc: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7a20c2fa1cc6edc1c3d1d40174fc30d1bbafa4d1 Author: Corentin Labbe Date: Tue Oct 30 15:05:33 2018 -0700 lib/zlib_inflate/inflate.c: remove fall through warnings This patch remove all following fall through warnings by adding /* fall through */ markers. Note that we cannot add "__attribute__ ((fallthrough));" due to it is GCC7 only arch/arm/boot/compressed/../../../../lib/zlib_inflate/inflate.c:384:25: warning: this statement may fall through [-Wimplicit-fallthrough=] arch/arm/boot/compressed/../../../../lib/zlib_inflate/inflate.c:391:25: warning: this statement may fall through [-Wimplicit-fallthrough=] arch/arm/boot/compressed/../../../../lib/zlib_inflate/inflate.c:393:16: warning: this statement may fall through [-Wimplicit-fallthrough=] arch/arm/boot/compressed/../../../../lib/zlib_inflate/inflate.c:430:25: warning: this statement may fall through [-Wimplicit-fallthrough=] arch/arm/boot/compressed/../../../../lib/zlib_inflate/inflate.c:556:25: warning: this statement may fall through [-Wimplicit-fallthrough=] arch/arm/boot/compressed/../../../../lib/zlib_inflate/inflate.c:595:25: warning: this statement may fall through [-Wimplicit-fallthrough=] arch/arm/boot/compressed/../../../../lib/zlib_inflate/inflate.c:602:25: warning: this statement may fall through [-Wimplicit-fallthrough=] arch/arm/boot/compressed/../../../../lib/zlib_inflate/inflate.c:627:25: warning: this statement may fall through [-Wimplicit-fallthrough=] arch/arm/boot/compressed/../../../../lib/zlib_inflate/inflate.c:646:25: warning: this statement may fall through [-Wimplicit-fallthrough=] arch/arm/boot/compressed/../../../../lib/zlib_inflate/inflate.c:696:25: warning: this statement may fall through [-Wimplicit-fallthrough=] It is easy to see that thoses fall through are needed since in each case state->mode are set to the case value just below. Link: http://lkml.kernel.org/r/1536215920-19955-1-git-send-email-clabbe@baylibre.com Signed-off-by: Corentin Labbe Cc: David Miller Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 36c8d1e7a27f94b4d812b2a0abf106dab0fa377e Author: Eric Biggers Date: Tue Oct 30 15:05:30 2018 -0700 lib/parser.c: switch match_number() over to use match_strdup() This simplifies the code. No change in behavior. Link: http://lkml.kernel.org/r/20180830194727.191555-1-ebiggers@kernel.org Signed-off-by: Eric Biggers Reviewed-by: Andrew Morton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4ed97b3c6d088e063e065142fc3217fae5cc29f8 Author: Eric Biggers Date: Tue Oct 30 15:05:26 2018 -0700 lib/parser.c: switch match_u64int() over to use match_strdup() This simplifies the code. No change in behavior. Link: http://lkml.kernel.org/r/20180830194814.192880-1-ebiggers@kernel.org Signed-off-by: Eric Biggers Reviewed-by: Andrew Morton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 30f7bc99a2a97cce9cda17d411c748550c0ece7b Author: Eric Biggers Date: Tue Oct 30 15:05:22 2018 -0700 lib/parser.c: switch match_strdup() over to use kmemdup_nul() This simplifies the code. No change in behavior. Link: http://lkml.kernel.org/r/20180830194436.188867-1-ebiggers@kernel.org Signed-off-by: Eric Biggers Reviewed-by: Andrew Morton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8ec3d76863d8bb317f330bbe4bf35cded8d85f01 Author: Rasmus Villemoes Date: Tue Oct 30 15:05:18 2018 -0700 lib/bitmap.c: simplify bitmap_print_to_pagebuf() len is guaranteed to lie in [1, PAGE_SIZE]. If scnprintf is called with a buffer size of 1, it is guaranteed to return 0. So in the extremely unlikely case of having just one byte remaining in the page, let's just call scnprintf anyway. The only difference is that this will write a '\0' to that final byte in the page, but that's an improvement: We now guarantee that after the call, buf is a properly terminated C string of length exactly the return value. Link: http://lkml.kernel.org/r/20180818131623.8755-8-linux@rasmusvillemoes.dk Signed-off-by: Rasmus Villemoes Reviewed-by: Andy Shevchenko Cc: Yury Norov Cc: Rasmus Villemoes Cc: Sudeep Holla Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ce1091d471107dbf6f91db66a480a25950c9b9ff Author: Rasmus Villemoes Date: Tue Oct 30 15:05:14 2018 -0700 lib/bitmap.c: fix remaining space computation in bitmap_print_to_pagebuf For various alignments of buf, the current expression computes 4096 ok 4095 ok 8190 8189 ... 4097 i.e., if the caller has already written two bytes into the page buffer, len is 8190 rather than 4094, because PTR_ALIGN aligns up to the next boundary. So if the printed version of the bitmap is huge, scnprintf() ends up writing beyond the page boundary. I don't think any current callers actually write anything before bitmap_print_to_pagebuf, but the API seems to be designed to allow it. [akpm@linux-foundation.org: use offset_in_page(), per Andy] [akpm@linux-foundation.org: include mm.h for offset_in_page()] Link: http://lkml.kernel.org/r/20180818131623.8755-7-linux@rasmusvillemoes.dk Signed-off-by: Rasmus Villemoes Reviewed-by: Andy Shevchenko Cc: Yury Norov Cc: Rasmus Villemoes Cc: Sudeep Holla Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 41e7b1661ffbf562d3aa2b7ce4ad283db50b711a Author: Rasmus Villemoes Date: Tue Oct 30 15:05:10 2018 -0700 linux/bitmap.h: relax comment on compile-time constant nbits It's not clear what's so horrible about emitting a function call to handle a run-time sized bitmap. Moreover, gcc also emits a function call for a compile-time-constant-but-huge nbits, so the comment isn't even accurate. Link: http://lkml.kernel.org/r/20180818131623.8755-6-linux@rasmusvillemoes.dk Signed-off-by: Rasmus Villemoes Reviewed-by: Andy Shevchenko Cc: Yury Norov Cc: Rasmus Villemoes Cc: Sudeep Holla Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d9873969fa8725dc6a5a21ab788c057fd8719751 Author: Rasmus Villemoes Date: Tue Oct 30 15:05:07 2018 -0700 linux/bitmap.h: fix type of nbits in bitmap_shift_right() Most other bitmap API, including the OOL version __bitmap_shift_right, take unsigned nbits. This was accidentally left out from 2fbad29917c98. Link: http://lkml.kernel.org/r/20180818131623.8755-5-linux@rasmusvillemoes.dk Fixes: 2fbad29917c98 ("lib: bitmap: change bitmap_shift_right to take unsigned parameters") Signed-off-by: Rasmus Villemoes Reported-by: Yury Norov Reviewed-by: Andy Shevchenko Cc: Rasmus Villemoes Cc: Sudeep Holla Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c8cebc553368209426f7279736db4f88f1853396 Author: Rasmus Villemoes Date: Tue Oct 30 15:05:02 2018 -0700 linux/bitmap.h: remove redundant uses of small_const_nbits() In the _zero, _fill and _copy functions, the small_const_nbits branch is redundant. If nbits is small and const, gcc knows full well that BITS_TO_LONGS(nbits) is 1, so len is also a compile-time constant (sizeof(long)), and calling memset or memcpy with a length argument of sizeof(long) makes gcc generate the expected code anyway: #include void a(unsigned long *x) { memset(x, 0, 8); } void b(unsigned long *x) { memset(x, 0xff, 8); } void c(unsigned long *x, const unsigned long *y) { memcpy(x, y, 8); } turns into 0000000000000000 : 0: 48 c7 07 00 00 00 00 movq $0x0,(%rdi) 7: c3 retq 8: 0f 1f 84 00 00 00 00 nopl 0x0(%rax,%rax,1) f: 00 0000000000000010 : 10: 48 c7 07 ff ff ff ff movq $0xffffffffffffffff,(%rdi) 17: c3 retq 18: 0f 1f 84 00 00 00 00 nopl 0x0(%rax,%rax,1) 1f: 00 0000000000000020 : 20: 48 8b 06 mov (%rsi),%rax 23: 48 89 07 mov %rax,(%rdi) 26: c3 retq Link: http://lkml.kernel.org/r/20180818131623.8755-4-linux@rasmusvillemoes.dk Signed-off-by: Rasmus Villemoes Reviewed-by: Andy Shevchenko Cc: Yury Norov Cc: Rasmus Villemoes Cc: Sudeep Holla Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7275b097851a5e2e0dd4da039c7e96b59ac5314e Author: Rasmus Villemoes Date: Tue Oct 30 15:04:59 2018 -0700 linux/bitmap.h: handle constant zero-size bitmaps correctly The static inlines in bitmap.h do not handle a compile-time constant nbits==0 correctly (they dereference the passed src or dst pointers, despite only 0 words being valid to access). I had the 0-day buildbot chew on a patch [1] that would cause build failures for such cases without complaining, suggesting that we don't have any such users currently, at least for the 70 .config/arch combinations that was built. Should any turn up, make sure they use the out-of-line versions, which do handle nbits==0 correctly. This is of course not the most efficient, but it's much less churn than teaching all the static inlines an "if (zero_const_nbits())", and since we don't have any current instances, this doesn't affect existing code at all. [1] lkml.kernel.org/r/20180815085539.27485-1-linux@rasmusvillemoes.dk Link: http://lkml.kernel.org/r/20180818131623.8755-3-linux@rasmusvillemoes.dk Signed-off-by: Rasmus Villemoes Reviewed-by: Andy Shevchenko Cc: Yury Norov Cc: Rasmus Villemoes Cc: Sudeep Holla Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 696e4219237b4cac48b5145f497f4840bb5e3391 Author: Rasmus Villemoes Date: Tue Oct 30 15:04:54 2018 -0700 lib/bitmap.c: remove wrong documentation This promise is violated in a number of places, e.g. already in the second function below this paragraph. Since I don't think anybody relies on this being true, and since actually honouring it would hurt performance and code size in various places, just remove the paragraph. Link: http://lkml.kernel.org/r/20180818131623.8755-2-linux@rasmusvillemoes.dk Signed-off-by: Rasmus Villemoes Reviewed-by: Andy Shevchenko Cc: Yury Norov Cc: Rasmus Villemoes Cc: Sudeep Holla Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ea6f650465c61c70b4c96648ed2cb8a0c55db337 Author: zhong jiang Date: Tue Oct 30 15:04:51 2018 -0700 kernel/fail_function.c: remove meaningless null pointer check before debugfs_remove_recursive debugfs_remove_recursive() has taken the null pointer into account. just remove the null check before debugfs_remove_recursive(). Link: http://lkml.kernel.org/r/1537494404-16473-1-git-send-email-zhongjiang@huawei.com Signed-off-by: zhong jiang Acked-by: Masami Hiramatsu Acked-by: Kees Cook Cc: Ingo Molnar Cc: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit de0d22e50cd3d57277f073ccf65d57aa519d6888 Author: Nick Desaulniers Date: Tue Oct 30 15:04:47 2018 -0700 treewide: remove current_text_addr Prefer _THIS_IP_ defined in linux/kernel.h. Most definitions of current_text_addr were the same as _THIS_IP_, but a few archs had inline assembly instead. This patch removes the final call site of current_text_addr, making all of the definitions dead code. [akpm@linux-foundation.org: fix arch/csky/include/asm/processor.h] Link: http://lkml.kernel.org/r/20180911182413.180715-1-ndesaulniers@google.com Signed-off-by: Nick Desaulniers Cc: Peter Zijlstra Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 49ef341ab668df248949c8e011d176ac6f8918fe Author: Oleksij Rempel Date: Tue Oct 30 15:04:43 2018 -0700 .mailmap: add Oleksij Rempel I have had various email addresses and a name change after marriage. Link: http://lkml.kernel.org/r/20181009125207.6096-1-o.rempel@pengutronix.de Signed-off-by: Oleksij Rempel Cc: Jiri Kosina Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b5c212374c85353a4412a08a958ecb6e0d2aa95f Author: Souptick Joarder Date: Tue Oct 30 15:04:35 2018 -0700 fs/proc/vmcore.c: Convert to use vmf_error() This code can be replaced with vmf_error() inline function. Link: http://lkml.kernel.org/r/20180918145945.GA11392@jordon-HP-15-Notebook-PC Signed-off-by: Souptick Joarder Reviewed-by: Matthew Wilcox Cc: Alexey Dobriyan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4b408c74ee5a0b74fc9265c2fe39b0e7dec7c056 Author: Dan Carpenter Date: Tue Oct 30 15:04:32 2018 -0700 mm/gup_benchmark.c: prevent integer overflow in ioctl The concern here is that "gup->size" is a u64 and "nr_pages" is unsigned long. On 32 bit systems we could trick the kernel into allocating fewer pages than expected. Link: http://lkml.kernel.org/r/20181025061546.hnhkv33diogf2uis@kili.mountain Fixes: 64c349f4ae78 ("mm: add infrastructure for get_user_pages_fast() benchmarking") Signed-off-by: Dan Carpenter Acked-by: Kirill A. Shutemov Reviewed-by: Andrew Morton Cc: Stephen Rothwell Cc: Keith Busch Cc: "Michael S. Tsirkin" Cc: Kees Cook Cc: YueHaibing Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ec131b2d7fa629edf88a1f51669d1b4a189cba44 Author: Jérôme Glisse Date: Tue Oct 30 15:04:28 2018 -0700 mm/hmm: invalidate device page table at start of invalidation Invalidate device page table at start of invalidation and invalidate in progress CPU page table snapshooting at both start and end of any invalidation. This is helpful when device need to dirty page because the device page table report the page as dirty. Dirtying page must happen in the start mmu notifier callback and not in the end one. Link: http://lkml.kernel.org/r/20181019160442.18723-7-jglisse@redhat.com Signed-off-by: Jérôme Glisse Cc: Ralph Campbell Cc: John Hubbard Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 44532d4c591c10d6907ac5030373bc306617d92b Author: Jérôme Glisse Date: Tue Oct 30 15:04:24 2018 -0700 mm/hmm: use a structure for update callback parameters Use a structure to gather all the parameters for the update callback. This make it easier when adding new parameters by avoiding having to update all callback function signature. The hmm_update structure is always associated with a mmu_notifier callbacks so we are not planing on grouping multiple updates together. Nor do we care about page size for the range as range will over fully cover the page being invalidated (this is a mmu_notifier property). Link: http://lkml.kernel.org/r/20181019160442.18723-6-jglisse@redhat.com Signed-off-by: Jérôme Glisse Cc: Ralph Campbell Cc: John Hubbard Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d08faca018c4618068e54dfef4f1d71230feff38 Author: Jérôme Glisse Date: Tue Oct 30 15:04:20 2018 -0700 mm/hmm: properly handle migration pmd Before this patch migration pmd entry (!pmd_present()) would have been treated as a bad entry (pmd_bad() returns true on migration pmd entry). The outcome was that device driver would believe that the range covered by the pmd was bad and would either SIGBUS or simply kill all the device's threads (each device driver decide how to react when the device tries to access poisonnous or invalid range of memory). This patch explicitly handle the case of migration pmd entry which are non present pmd entry and either wait for the migration to finish or report empty range (when device is just trying to pre- fill a range of virtual address and thus do not want to wait or trigger page fault). Link: http://lkml.kernel.org/r/20181019160442.18723-5-jglisse@redhat.com Signed-off-by: Aneesh Kumar K.V Signed-off-by: Jérôme Glisse Cc: Zi Yan Cc: Michal Hocko Cc: Ralph Campbell Cc: John Hubbard Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 86a2d59841ab0b147ffc1b7b3041af87927cf312 Author: Ralph Campbell Date: Tue Oct 30 15:04:14 2018 -0700 mm/hmm: fix race between hmm_mirror_unregister() and mmu_notifier callback In hmm_mirror_unregister(), mm->hmm is set to NULL and then mmu_notifier_unregister_no_release() is called. That creates a small window where mmu_notifier can call mmu_notifier_ops with mm->hmm equal to NULL. Fix this by first unregistering mmu notifier callbacks and then setting mm->hmm to NULL. Similarly in hmm_register(), set mm->hmm before registering mmu_notifier callbacks so callback functions always see mm->hmm set. Link: http://lkml.kernel.org/r/20181019160442.18723-4-jglisse@redhat.com Signed-off-by: Ralph Campbell Signed-off-by: Jérôme Glisse Reviewed-by: John Hubbard Reviewed-by: Jérôme Glisse Reviewed-by: Balbir Singh Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit aab8d0520e6e7c2a61f71195e6ce7007a4843afb Author: Ralph Campbell Date: Tue Oct 30 15:04:11 2018 -0700 mm/rmap: map_pte() was not handling private ZONE_DEVICE page properly Private ZONE_DEVICE pages use a special pte entry and thus are not present. Properly handle this case in map_pte(), it is already handled in check_pte(), the map_pte() part was lost in some rebase most probably. Without this patch the slow migration path can not migrate back to any private ZONE_DEVICE memory to regular memory. This was found after stress testing migration back to system memory. This ultimatly can lead to the CPU constantly page fault looping on the special swap entry. Link: http://lkml.kernel.org/r/20181019160442.18723-3-jglisse@redhat.com Signed-off-by: Ralph Campbell Signed-off-by: Jérôme Glisse Reviewed-by: Balbir Singh Cc: Andrew Morton Cc: Kirill A. Shutemov Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f813f21971b96f61a789dd48151f92220fdd2e0a Author: Jérôme Glisse Date: Tue Oct 30 15:04:06 2018 -0700 mm/hmm: fix utf8 ... Patch series "HMM updates, improvements and fixes", v2 Few fixes that only affect HMM users. Improve the synchronization call back so that we match was other mmu_notifier listener do and add proper support to the new blockable flags in the process. For curious folks here are branches to leverage HMM in various existing device drivers: https://cgit.freedesktop.org/~glisse/linux/log/?h=hmm-nouveau-v01 https://cgit.freedesktop.org/~glisse/linux/log/?h=hmm-radeon-v00 https://cgit.freedesktop.org/~glisse/linux/log/?h=hmm-intel-v00 More to come (amd gpu, Mellanox, ...) I expect more of the preparatory work for nouveau will be merge in 4.20 (like we have been doing since 4.16) and i will wait until this patchset is upstream before pushing the patches that actualy make use of HMM (to avoid complex tree inter-dependency). This patch (of 6): Somehow utf=8 must have been broken. Link: http://lkml.kernel.org/r/20181019160442.18723-2-jglisse@redhat.com Signed-off-by: Jérôme Glisse Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c57cdf7a9e51d97a43e29b8f4a04157875104000 Author: Ming Lei Date: Wed Oct 24 21:18:09 2018 +0800 block: call rq_qos_exit() after queue is frozen rq_qos_exit() removes the current q->rq_qos, this action has to be done after queue is frozen, otherwise the IO queue path may never be waken up, then IO hang is caused. So fixes this issue by moving rq_qos_exit() after queue is frozen. Cc: Josef Bacik Signed-off-by: Ming Lei Signed-off-by: Jens Axboe commit 3b692c55e58d06ba9b17c66784cab5a95ba5be9b Author: Daniel Drake Date: Tue Oct 9 14:40:56 2018 +0800 HID: asus: only support backlight when it's not driven by WMI The Asus GL502VSK has the same 0B05:1837 keyboard as we've seen in several Republic of Gamers laptops. However, in this model, the keybard backlight control exposed by hid-asus has no effect on the keyboard backlight. Instead, the keyboard backlight is correctly driven by asus-wmi. With two keyboard backlight devices available (and only the acer-wmi one working), GNOME is picking the wrong one to drive in the UI. Avoid this problem by not creating the backlight interface when we detect a WMI-driven keyboard backlight. We have also tested Asus GL702VMK which does have the hid-asus backlight present, and it still works fine with this patch (WMI method call returns UNSUPPORTED_METHOD). A direct "depends on ASUS_WMI" is intentionally avoided so that HID_ASUS users who have ASUS_WMI=n will not quietly lose their HID_ASUS driver on a kernel upgrade. Signed-off-by: Daniel Drake Reviewed-by: Benjamin Tissoires Signed-off-by: Andy Shevchenko commit ffb6ce7086ee2d68d8d6d987882f1c5e923fee7e Author: Daniel Drake Date: Tue Oct 9 14:40:55 2018 +0800 platform/x86: asus-wmi: export function for evaluating WMI methods Export asus_wmi_evaluate_method() and related headers for use by other drivers. hid-asus is going to use this to avoid advertising that it has a keyboard backlight when the keyboard backlight is controlled via WMI. Signed-off-by: Daniel Drake Signed-off-by: Andy Shevchenko commit 29f6eb533c3be9b9c74cdeacc7bf14d927a8adb4 Author: Jian-Hong Pan Date: Mon Oct 22 18:00:04 2018 +0800 platform/x86: asus-wmi: Only notify kbd LED hw_change by fn-key pressed Since commit dbb3d78f61ba ("platform/x86: asus-wmi: Call led hw_changed API on kbd brightness change"), asus-wmi directly changes the keyboard LED brightness when the keyboard brightness keys are pressed, raising the appropriate notification. However, this notification was unintentionally also being raised during boot and resume from suspend. This was resulting in userspace showing the keyboard LED OSD on resume for no good reason. Move the keyboard LED brightness changed notification from kbd_led_update to the new kbd_led_set_by_kbd function which is only called from the keyboard brightness function keys codepath. Signed-off-by: Jian-Hong Pan Signed-off-by: Daniel Drake Signed-off-by: Andy Shevchenko commit 69372c1dbdee8cab3c3892eda932c624af59a494 Author: Bhumika Goyal Date: Sun Oct 28 11:37:00 2018 +0530 platform/x86: wmi: declare device_type structure as constant The only usage of device_type structure is getting stored as a reference in the type field of device structure. This type field is declared const. Therefore, the device_type structure can never be modified and can be declared as const. Signed-off-by: Bhumika Goyal Signed-off-by: Andy Shevchenko commit 0252894f53fc2693672308d5453d5076b7516637 Author: Misha Komarovskiy Date: Sat Oct 27 02:07:23 2018 +0300 platform/x86: ideapad: Add Y530-15ICH to no_hw_rfkill Lenovo Legion Y530-15ICH is another model without hardware radio switch. Add it to no_hw_rfkill to enable wireless. Signed-off-by: Misha Komarovskiy Signed-off-by: Andy Shevchenko commit 4f8f382e635707ddaddf8269a116e4f8cc8835c0 Author: David Miller Date: Tue Oct 30 22:24:04 2018 -0700 perf tools: Don't clone maps from parent when synthesizing forks When synthesizing FORK events, we are trying to create thread objects for the already running tasks on the machine. Normally, for a kernel FORK event, we want to clone the parent's maps because that is what the kernel just did. But when synthesizing, this should not be done. If we do, we end up with overlapping maps as we process the sythesized MMAP2 events that get delivered shortly thereafter. Use the FORK event misc flags in an internal way to signal this situation, so we can elide the map clone when appropriate. Signed-off-by: David S. Miller Cc: Don Zickus Cc: Jiri Olsa Cc: Joe Mario Link: http://lkml.kernel.org/r/20181030.222404.2085088822877051075.davem@davemloft.net [ Added comment about flag use in machine__process_fork_event(), use ternary op in thread__clone_map_groups() as suggested by Jiri ] Signed-off-by: Arnaldo Carvalho de Melo commit ff27a06af6ffd3f49b9e193eb68f487ad76651e1 Author: David Miller Date: Tue Oct 30 22:30:03 2018 -0700 perf top: Start display thread earlier If events are coming in at a rate such that the event processing thread can barely keep up, our initial run of the event ring will almost never terminate and this delays the starting of the display thread. The screen basically stays black until the event thread can get out of it's endless loop. Therefore, start the display thread before we start processing the ring buffer. This also make sure that we always have the user requested real time setting engaged when processing the ring. Signed-off-by: David S. Miller Tested-by: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Kan Liang Cc: Namhyung Kim Link: http://lkml.kernel.org/r/20181030.223003.2242527041807905962.davem@davemloft.net Signed-off-by: Arnaldo Carvalho de Melo commit 76b0b801782b34b3028dcef3de36cb634e3908a8 Author: Arnaldo Carvalho de Melo Date: Tue Oct 30 17:06:57 2018 -0300 tools headers uapi: Update linux/if_link.h header copy To pick the changes from: 9163a0fc1f0c ("net: bridge: add support for per-port vlan stats") And silence this 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: Alexei Starovoitov Cc: David S. Miller Cc: Eric Leblond Cc: Nikolay Aleksandrov Link: https://lkml.kernel.org/n/tip-7p53ghippywz7fqkwo3nkzet@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit d45a57fff0a657045a77b395ae713ffae0cb4e46 Author: Arnaldo Carvalho de Melo Date: Tue Oct 30 17:04:47 2018 -0300 tools headers uapi: Update linux/netlink.h header copy Picking the changes from: 89d35528d17d ("netlink: Add new socket option to enable strict checking on dumps") To silence this build warning: Warning: Kernel ABI header at 'tools/include/uapi/linux/netlink.h' differs from latest version at 'include/uapi/linux/netlink.h' Cc: Alexei Starovoitov Cc: David Ahern Cc: David S. Miller Cc: Eric Leblond Link: https://lkml.kernel.org/n/tip-1xymkfjpmhxfzrs46t8z8mjw@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 827758129a0f84fbd0b2dda15e14a77a7604803d Author: Arnaldo Carvalho de Melo Date: Tue Oct 30 17:01:46 2018 -0300 tools headers: Sync the various kvm.h header copies For powerpc, s390, x86 and the main uapi linux/kvm.h header, none of them entail changes in tooling. Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-avn7iy8f4tcm2y40sbsdk31m@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 685626dc26bd9cead850d06520708acbd16bcfda Author: Arnaldo Carvalho de Melo Date: Tue Oct 30 16:50:08 2018 -0300 tools include uapi: Update linux/mmap.h copy To pick up the changes from: 20916d4636a9 ("mm/hugetlb: add mmap() encodings for 32MB and 512MB page sizes") That do not entail changes in in tools, this just shows that we have to consider bits [26:31] of flags to beautify that in tools like 'perf trace' This silences this perf build warning: 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 Cc: Anshuman Khandual Cc: Greg Kroah-Hartman Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-3rvc39lon93kgt5pl31d8g4x@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 2f967f1dbbc1f746ad0deda8352bcf563d59e1c7 Author: Arnaldo Carvalho de Melo Date: Tue Oct 30 16:30:38 2018 -0300 perf trace beauty: Use the mmap flags table generated from headers Instead of requiring us to go on and edit sources to add new flag. # perf trace -e *mmap sleep 0.1 0.025 ( 0.005 ms): sleep/29876 mmap(len: 163746, prot: READ, flags: PRIVATE, fd: 3) = 0x7faa68ad1000 0.059 ( 0.004 ms): sleep/29876 mmap(len: 8192, prot: READ|WRITE, flags: PRIVATE|ANONYMOUS) = 0x7faa68acf000 0.069 ( 0.006 ms): sleep/29876 mmap(len: 3889792, prot: EXEC|READ, flags: PRIVATE|DENYWRITE, fd: 3) = 0x7faa6851f000 0.086 ( 0.009 ms): sleep/29876 mmap(addr: 0x7faa688cb000, len: 24576, prot: READ|WRITE, flags: PRIVATE|FIXED|DENYWRITE, fd: 3, off: 1753088) = 0x7faa688cb000 0.101 ( 0.005 ms): sleep/29876 mmap(addr: 0x7faa688d1000, len: 14976, prot: READ|WRITE, flags: PRIVATE|FIXED|ANONYMOUS) = 0x7faa688d1000 0.348 ( 0.005 ms): sleep/29876 mmap(len: 111950656, prot: READ, flags: PRIVATE, fd: 3) = 0x7faa61a5b000 # Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-ggmoy6vxoygh5yim890ht0kf@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit fbd7458db75790e37903c75be68513a4c087737c Author: Arnaldo Carvalho de Melo Date: Tue Oct 30 16:11:59 2018 -0300 perf beauty: Wire up the mmap 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/mmap_flags_array.c 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", }; $ Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-t3fn7u3tjsupio6e6vkufx9m@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 80ee5668b8a755039ca6180c6272a6e8efee5aad Author: Arnaldo Carvalho de Melo Date: Tue Oct 30 15:26:47 2018 -0300 perf beauty: Add a generator for MAP_ mmap's flag constants It'll use tools/{arch}/*,include copies of mman.h to generate a table to be used by tools, initially by the 'mmap' beautifiers in 'perf trace', but that could also be used to translate from a string constant to the integer value to be used in a eBPF or tracefs tracepoint filter. Tested for all archs using: $ for arch in `ls tools/arch/` ; \ do echo $arch ; tools/perf/trace/beauty/mmap_flags.sh $arch ; \ done | less Example for alpha, an oddball, doesn't include any header, defines all its stuff: $ tools/perf/trace/beauty/mmap_flags.sh alpha static const char *mmap_flags[] = { [ilog2(0x10) + 1] = "ANONYMOUS", [ilog2(0x02000) + 1] = "DENYWRITE", [ilog2(0x04000) + 1] = "EXECUTABLE", [ilog2(0x100) + 1] = "FIXED", [ilog2(0x01000) + 1] = "GROWSDOWN", [ilog2(0x100000) + 1] = "HUGETLB", [ilog2(0x08000) + 1] = "LOCKED", [ilog2(0x40000) + 1] = "NONBLOCK", [ilog2(0x10000) + 1] = "NORESERVE", [ilog2(0x20000) + 1] = "POPULATE", [ilog2(0x02) + 1] = "PRIVATE", [ilog2(0x01) + 1] = "SHARED", [ilog2(0x80000) + 1] = "STACK", }; $ Common case, my workstation, defines one entry (MAP_32BIT), then includes mman.h, which gets it to include mman-common.h too: $ 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", }; $ uname -m x86_64 $ Sparc, that defines a bunch then includes just mman-common.h: $ tools/perf/trace/beauty/mmap_flags.sh sparc static const char *mmap_flags[] = { [ilog2(0x0800) + 1] = "DENYWRITE", [ilog2(0x1000) + 1] = "EXECUTABLE", [ilog2(0x0200) + 1] = "GROWSDOWN", [ilog2(0x40000) + 1] = "HUGETLB", [ilog2(0x100) + 1] = "LOCKED", [ilog2(0x10000) + 1] = "NONBLOCK", [ilog2(0x40) + 1] = "NORESERVE", [ilog2(0x8000) + 1] = "POPULATE", [ilog2(0x20000) + 1] = "STACK", [ilog2(0x01) + 1] = "SHARED", [ilog2(0x02) + 1] = "PRIVATE", [ilog2(0x10) + 1] = "FIXED", [ilog2(0x20) + 1] = "ANONYMOUS", [ilog2(0x100000) + 1] = "FIXED_NOREPLACE", }; [acme@jouet perf]$ Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-xydeh491z8fkgglcmqnl5thj@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 89eb1f3b7f2a9156ce6f78713d7924c1bb2fab9f Author: Arnaldo Carvalho de Melo Date: Tue Oct 30 14:20:07 2018 -0300 tools include uapi: Update asound.h copy To silence this perf build warning: Warning: Kernel ABI header at 'tools/include/uapi/sound/asound.h' differs from latest version at 'include/uapi/sound/asound.h' diff -u tools/include/uapi/sound/asound.h include/uapi/sound/asound.h Due to this cset: a98401518def ("ALSA: timer: fix wrong comment to refer to 'SNDRV_TIMER_PSFLG_*'") Cc: Jiri Olsa Cc: Namhyung Kim Cc: Takashi Sakamoto Cc: Takashi Iwai Link: https://lkml.kernel.org/n/tip-76gsvs0w2g0x723ivqa2xua3@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 8dd4c0f68c0db4c0f01af60a99a7ed34fd3dee2b Author: Arnaldo Carvalho de Melo Date: Tue Oct 30 13:10:50 2018 -0300 tools arch uapi: Update asm-generic/unistd.h and arm64 unistd.h copies To get the changes in: 82b355d161c9 ("y2038: Remove newstat family from default syscall set") Which will make the syscall table used by 'perf trace' for arm64 to be updated from the changes in that patch. This silences these perf build warnings: Warning: Kernel ABI header at 'tools/arch/arm64/include/uapi/asm/unistd.h' differs from latest version at 'arch/arm64/include/uapi/asm/unistd.h' diff -u tools/arch/arm64/include/uapi/asm/unistd.h arch/arm64/include/uapi/asm/unistd.h 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: Kim Phillips Cc: Arnd Bergmann Cc: Geert Uytterhoeven Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-3euy7c4yy5mvnp5bm16t9vqg@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 733ac4f9935c4b257aff2ec476e6c20665daf6c2 Author: Arnaldo Carvalho de Melo Date: Tue Oct 30 12:27:37 2018 -0300 tools include uapi: Update linux/fs.h copy To silence this 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 Due to just two comments added by: Fixes: 578bdaabd015 ("crypto: speck - remove Speck") So nothing that entails changes in tools/, that so far uses fs.h to generate the mount and umount syscalls 'flags' argument integer->string tables with: $ tools/perf/trace/beauty/mount_flags.sh static const char *mount_flags[] = { [4096 ? (ilog2(4096) + 1) : 0] = "BIND", [30 + 1] = "ACTIVE", [31 + 1] = "NOUSER", }; $ # trace -e mount,umount mount --bind /proc /mnt 1.228 ( 2.581 ms): mount/1068 mount(dev_name: /mnt, dir_name: 0x55f011c354a0, type: 0x55f011c38170, flags: BIND) = 0 # trace -e mount,umount umount /proc /mnt umount: /proc: target is busy. 1.587 ( 0.010 ms): umount/1070 umount2(name: /proc) = -1 EBUSY Device or resource busy 1.799 (12.660 ms): umount/1070 umount2(name: /mnt) = 0 # Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Cc: Jason A. Donenfeld Cc: Herbert Xu Link: https://lkml.kernel.org/n/tip-c00bqzclscgah26z2g5zxm73@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit e9024d519d892b38176cafd46f68a7cdddd77412 Author: David S. Miller Date: Tue Oct 30 12:12:26 2018 -0300 perf callchain: Honour the ordering of PERF_CONTEXT_{USER,KERNEL,etc} When processing using 'perf report -g caller', which is the default, we ended up reverting the callchain entries received from the kernel, but simply reverting throws away the information that tells that from a point onwards the addresses are for userspace, kernel, guest kernel, guest user, hypervisor. The idea is that if we are walking backwards, for each cluster of non-cpumode entries we have to first scan backwards for the next one and use that for the cluster. This seems silly and more expensive than it needs to be but it is enough for a initial fix. The code here is really complicated because it is intimately intertwined with the lbr and branch handling, as well as this callchain order, further fixes will be needed to properly take into account the cpumode in those cases. Another problem with ORDER_CALLER is that the NULL "0" IP that is at the end of most callchains shows up at the top of the histogram because every callchain contains it and with ORDER_CALLER it is the first entry. Signed-off-by: David S. Miller Tested-by: Arnaldo Carvalho de Melo Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Souvik Banerjee Cc: Wang Nan Cc: stable@vger.kernel.org # 4.19 Link: https://lkml.kernel.org/n/tip-2wt3ayp6j2y2f2xowixa8y6y@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit d6c9c05fe1eb4b213b183d8a1e79416256dc833a Author: Leo Yan Date: Tue Oct 30 15:18:28 2018 +0800 perf cs-etm: Correct CPU mode for samples Since commit edeb0c90df35 ("perf tools: Stop fallbacking to kallsyms for vdso symbols lookup"), the kernel address cannot be properly parsed to kernel symbol with command 'perf script -k vmlinux'. The reason is CoreSight samples is always to set CPU mode as PERF_RECORD_MISC_USER, thus it fails to find corresponding map/dso in below flows: process_sample_event() `-> machine__resolve() `-> thread__find_map(thread, sample->cpumode, sample->ip, al); In this flow it needs to pass argument 'sample->cpumode' to tell what's the CPU mode, before it always passed PERF_RECORD_MISC_USER but without any failure until the commit edeb0c90df35 ("perf tools: Stop fallbacking to kallsyms for vdso symbols lookup") has been merged. The reason is even with the wrong CPU mode the function thread__find_map() firstly fails to find map but it will rollback to find kernel map for vdso symbols lookup. In the latest code it has removed the fallback code, thus if CPU mode is PERF_RECORD_MISC_USER then it cannot find map anymore with kernel address. This patch is to correct samples CPU mode setting, it creates a new helper function cs_etm__cpu_mode() to tell what's the CPU mode based on the address with the info from machine structure; this patch has a bit extension to check not only kernel and user mode, but also check for host/guest and hypervisor mode. Finally this patch uses the function in instruction and branch samples and also apply in cs_etm__mem_access() for a minor polishing. Signed-off-by: Leo Yan Cc: Adrian Hunter Cc: Alexander Shishkin Cc: David Miller Cc: Jiri Olsa Cc: Mathieu Poirier Cc: Namhyung Kim Cc: Peter Zijlstra Cc: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org Cc: stable@kernel.org # v4.19 Link: http://lkml.kernel.org/r/1540883908-17018-1-git-send-email-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit 1fe627da30331024f453faef04d500079b901107 Author: Milian Wolff Date: Mon Oct 29 15:16:44 2018 +0100 perf unwind: Take pgoff into account when reporting elf to libdwfl libdwfl parses an ELF file itself and creates mappings for the individual sections. perf on the other hand sees raw mmap events which represent individual sections. When we encounter an address pointing into a mapping with pgoff != 0, we must take that into account and report the file at the non-offset base address. This fixes unwinding with libdwfl in some cases. E.g. for a file like: ``` using namespace std; mutex g_mutex; double worker() { lock_guard guard(g_mutex); uniform_real_distribution uniform(-1E5, 1E5); default_random_engine engine; double s = 0; for (int i = 0; i < 1000; ++i) { s += norm(complex(uniform(engine), uniform(engine))); } cout << s << endl; return s; } int main() { vector> results; for (int i = 0; i < 10000; ++i) { results.push_back(async(launch::async, worker)); } return 0; } ``` Compile it with `g++ -g -O2 -lpthread cpp-locking.cpp -o cpp-locking`, then record it with `perf record --call-graph dwarf -e sched:sched_switch`. When you analyze it with `perf script` and libunwind, you should see: ``` cpp-locking 20038 [005] 54830.236589: sched:sched_switch: prev_comm=cpp-locking prev_pid=20038 prev_prio=120 prev_state=T ==> next_comm=swapper/5 next_pid=0 next_prio=120 ffffffffb166fec5 __sched_text_start+0x545 (/lib/modules/4.14.78-1-lts/build/vmlinux) ffffffffb166fec5 __sched_text_start+0x545 (/lib/modules/4.14.78-1-lts/build/vmlinux) ffffffffb1670208 schedule+0x28 (/lib/modules/4.14.78-1-lts/build/vmlinux) ffffffffb16737cc rwsem_down_read_failed+0xec (/lib/modules/4.14.78-1-lts/build/vmlinux) ffffffffb1665e04 call_rwsem_down_read_failed+0x14 (/lib/modules/4.14.78-1-lts/build/vmlinux) ffffffffb1672a03 down_read+0x13 (/lib/modules/4.14.78-1-lts/build/vmlinux) ffffffffb106bd85 __do_page_fault+0x445 (/lib/modules/4.14.78-1-lts/build/vmlinux) ffffffffb18015f5 page_fault+0x45 (/lib/modules/4.14.78-1-lts/build/vmlinux) 7f38e4252591 new_heap+0x101 (/usr/lib/libc-2.28.so) 7f38e4252d0b arena_get2.part.4+0x2fb (/usr/lib/libc-2.28.so) 7f38e4255b1c tcache_init.part.6+0xec (/usr/lib/libc-2.28.so) 7f38e42569e5 __GI___libc_malloc+0x115 (inlined) 7f38e4241790 __GI__IO_file_doallocate+0x90 (inlined) 7f38e424fbbf __GI__IO_doallocbuf+0x4f (inlined) 7f38e424ee47 __GI__IO_file_overflow+0x197 (inlined) 7f38e424df36 _IO_new_file_xsputn+0x116 (inlined) 7f38e4242bfb __GI__IO_fwrite+0xdb (inlined) 7f38e463fa6d std::basic_streambuf >::sputn(char const*, long)+0x1cd (inlined) 7f38e463fa6d std::ostreambuf_iterator >::_M_put(char const*, long)+0x1cd (inlined) 7f38e463fa6d std::ostreambuf_iterator > std::__write(std::ostreambuf_iterator >, char const*, int)+0x1cd (inlined) 7f38e463fa6d std::ostreambuf_iterator > std::num_put > >::_M_insert_float(std::ostreambuf_iterator 7f38e464bd70 std::num_put > >::put(std::ostreambuf_iterator >, std::ios_base&, char, double) const+0x90 (inl> 7f38e464bd70 std::ostream& std::ostream::_M_insert(double)+0x90 (/usr/lib/libstdc++.so.6.0.25) 563b9cb502f7 std::ostream::operator<<(double)+0xb7 (inlined) 563b9cb502f7 worker()+0xb7 (/ssd/milian/projects/kdab/rnd/hotspot/build/tests/test-clients/cpp-locking/cpp-locking) 563b9cb506fb double std::__invoke_impl(std::__invoke_other, double (*&&)())+0x2b (inlined) 563b9cb506fb std::__invoke_result::type std::__invoke(double (*&&)())+0x2b (inlined) 563b9cb506fb decltype (__invoke((_S_declval<0ul>)())) std::thread::_Invoker >::_M_invoke<0ul>(std::_Index_tuple<0ul>)+0x2b (inlined) 563b9cb506fb std::thread::_Invoker >::operator()()+0x2b (inlined) 563b9cb506fb std::__future_base::_Task_setter, std::__future_base::_Result_base::_Deleter>, std::thread::_Invoker >, dou> 563b9cb506fb std::_Function_handler (), std::__future_base::_Task_setter 563b9cb507e8 std::function ()>::operator()() const+0x28 (inlined) 563b9cb507e8 std::__future_base::_State_baseV2::_M_do_set(std::function ()>*, bool*)+0x28 (/ssd/milian/> 7f38e46d24fe __pthread_once_slow+0xbe (/usr/lib/libpthread-2.28.so) 563b9cb51149 __gthread_once+0xe9 (inlined) 563b9cb51149 void std::call_once ()>*, bool*)> 563b9cb51149 std::__future_base::_State_baseV2::_M_set_result(std::function ()>, bool)+0xe9 (inlined) 563b9cb51149 std::__future_base::_Async_state_impl >, double>::_Async_state_impl(std::thread::_Invoker >&&)::{lambda()#1}::op> 563b9cb51149 void std::__invoke_impl >, double>::_Async_state_impl(std::thread::_Invoker 563b9cb51149 std::__invoke_result >, double>::_Async_state_impl(std::thread::_Invoker >> 563b9cb51149 decltype (__invoke((_S_declval<0ul>)())) std::thread::_Invoker >, double>::_Async_state_> 563b9cb51149 std::thread::_Invoker >, double>::_Async_state_impl(std::thread::_Invoker 563b9cb51149 std::thread::_State_impl >, double>::_Async_state_impl(std::thread> 7f38e45f0062 execute_native_thread_routine+0x12 (/usr/lib/libstdc++.so.6.0.25) 7f38e46caa9c start_thread+0xfc (/usr/lib/libpthread-2.28.so) 7f38e42ccb22 __GI___clone+0x42 (inlined) ``` Before this patch, using libdwfl, you would see: ``` cpp-locking 20038 [005] 54830.236589: sched:sched_switch: prev_comm=cpp-locking prev_pid=20038 prev_prio=120 prev_state=T ==> next_comm=swapper/5 next_pid=0 next_prio=120 ffffffffb166fec5 __sched_text_start+0x545 (/lib/modules/4.14.78-1-lts/build/vmlinux) ffffffffb166fec5 __sched_text_start+0x545 (/lib/modules/4.14.78-1-lts/build/vmlinux) ffffffffb1670208 schedule+0x28 (/lib/modules/4.14.78-1-lts/build/vmlinux) ffffffffb16737cc rwsem_down_read_failed+0xec (/lib/modules/4.14.78-1-lts/build/vmlinux) ffffffffb1665e04 call_rwsem_down_read_failed+0x14 (/lib/modules/4.14.78-1-lts/build/vmlinux) ffffffffb1672a03 down_read+0x13 (/lib/modules/4.14.78-1-lts/build/vmlinux) ffffffffb106bd85 __do_page_fault+0x445 (/lib/modules/4.14.78-1-lts/build/vmlinux) ffffffffb18015f5 page_fault+0x45 (/lib/modules/4.14.78-1-lts/build/vmlinux) 7f38e4252591 new_heap+0x101 (/usr/lib/libc-2.28.so) a041161e77950c5c [unknown] ([unknown]) ``` With this patch applied, we get a bit further in unwinding: ``` cpp-locking 20038 [005] 54830.236589: sched:sched_switch: prev_comm=cpp-locking prev_pid=20038 prev_prio=120 prev_state=T ==> next_comm=swapper/5 next_pid=0 next_prio=120 ffffffffb166fec5 __sched_text_start+0x545 (/lib/modules/4.14.78-1-lts/build/vmlinux) ffffffffb166fec5 __sched_text_start+0x545 (/lib/modules/4.14.78-1-lts/build/vmlinux) ffffffffb1670208 schedule+0x28 (/lib/modules/4.14.78-1-lts/build/vmlinux) ffffffffb16737cc rwsem_down_read_failed+0xec (/lib/modules/4.14.78-1-lts/build/vmlinux) ffffffffb1665e04 call_rwsem_down_read_failed+0x14 (/lib/modules/4.14.78-1-lts/build/vmlinux) ffffffffb1672a03 down_read+0x13 (/lib/modules/4.14.78-1-lts/build/vmlinux) ffffffffb106bd85 __do_page_fault+0x445 (/lib/modules/4.14.78-1-lts/build/vmlinux) ffffffffb18015f5 page_fault+0x45 (/lib/modules/4.14.78-1-lts/build/vmlinux) 7f38e4252591 new_heap+0x101 (/usr/lib/libc-2.28.so) 7f38e4252d0b arena_get2.part.4+0x2fb (/usr/lib/libc-2.28.so) 7f38e4255b1c tcache_init.part.6+0xec (/usr/lib/libc-2.28.so) 7f38e42569e5 __GI___libc_malloc+0x115 (inlined) 7f38e4241790 __GI__IO_file_doallocate+0x90 (inlined) 7f38e424fbbf __GI__IO_doallocbuf+0x4f (inlined) 7f38e424ee47 __GI__IO_file_overflow+0x197 (inlined) 7f38e424df36 _IO_new_file_xsputn+0x116 (inlined) 7f38e4242bfb __GI__IO_fwrite+0xdb (inlined) 7f38e463fa6d std::basic_streambuf >::sputn(char const*, long)+0x1cd (inlined) 7f38e463fa6d std::ostreambuf_iterator >::_M_put(char const*, long)+0x1cd (inlined) 7f38e463fa6d std::ostreambuf_iterator > std::__write(std::ostreambuf_iterator >, char const*, int)+0x1cd (inlined) 7f38e463fa6d std::ostreambuf_iterator > std::num_put > >::_M_insert_float(std::ostreambuf_iterator 7f38e464bd70 std::num_put > >::put(std::ostreambuf_iterator >, std::ios_base&, char, double) const+0x90 (inl> 7f38e464bd70 std::ostream& std::ostream::_M_insert(double)+0x90 (/usr/lib/libstdc++.so.6.0.25) 563b9cb502f7 std::ostream::operator<<(double)+0xb7 (inlined) 563b9cb502f7 worker()+0xb7 (/ssd/milian/projects/kdab/rnd/hotspot/build/tests/test-clients/cpp-locking/cpp-locking) 6eab825c1ee3e4ff [unknown] ([unknown]) ``` Note that the backtrace is still stopping too early, when compared to the nice results obtained via libunwind. It's unclear so far what the reason for that is. Committer note: Further comment by Milian on the thread started on the Link: tag below: --- The remaining issue is due to a bug in elfutils: https://sourceware.org/ml/elfutils-devel/2018-q4/msg00089.html With both patches applied, libunwind and elfutils produce the same output for the above scenario. --- Signed-off-by: Milian Wolff Acked-by: Jiri Olsa Link: http://lkml.kernel.org/r/20181029141644.3907-1-milian.wolff@kdab.com Signed-off-by: Arnaldo Carvalho de Melo commit 218d61110f69632974034b6e27686ce482a1c455 Author: Arnaldo Carvalho de Melo Date: Mon Oct 29 09:47:00 2018 -0300 perf top: Do not use overwrite mode by default Enabling --overwrite mode allows us to to use just the most recent records, which helps in high core count machines such as Knights Landing/Mill, but right now is being disabled by default as the pausing used in this technique is leading to loss of metadata events such as PERF_RECORD_MMAP which makes 'perf top' unable to resolve samples, leading to lots of unknown samples appearing on the UI. Enabling this may be useful if you are in such machines and profiling a workload that doesn't creates short lived threads and/or doesn't uses many executable mmap operations. Work is being planed to solve this situation, till then, this will remain disabled by default. Reported-by: David Miller Acked-by: Kan Liang Link: https://lkml.kernel.org/r/4f84468f-37d9-cf1b-12c1-514ef74b6a48@linux.intel.com Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Fixes: ebebbf082357 ("perf top: Switch default mode to overwrite mode") Link: https://lkml.kernel.org/n/tip-ehvf77vi1si9409r7p4wx788@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 69f8117f17b332a68cd8f4bf8c2d0d3d5b84efc5 Author: Michael Ellerman Date: Mon Oct 29 22:23:53 2018 +1100 selftests/powerpc/cache_shape: Fix out-of-tree build Use TEST_GEN_PROGS and don't redefine all, this makes the out-of-tree build work. We need to move the extra dependencies below the include of lib.mk, because it adds the $(OUTPUT) prefix if it's defined. We can also drop the clean rule, lib.mk does it for us. Signed-off-by: Michael Ellerman commit 266bac361d5677e61a6815bd29abeb3bdced2b07 Author: Michael Ellerman Date: Mon Oct 29 22:23:52 2018 +1100 selftests/powerpc/switch_endian: Fix out-of-tree build For the out-of-tree build to work we need to tell switch_endian_test to look for check-reversed.S in $(OUTPUT). Signed-off-by: Michael Ellerman commit 98415da03ae6559dc62899fd31e55e194779c45b Author: Joel Stanley Date: Mon Oct 29 22:23:51 2018 +1100 selftests/powerpc/pmu: Link ebb tests with -no-pie When running the ebb tests after building on a ppc64le Ubuntu machine: $ pmu/ebb/reg_access_test: error while loading shared libraries: R_PPC64_ADDR16_HI reloc at 0x000000013a965130 for symbol `' out of range This is because the Ubuntu toolchain builds has PIE enabled by default. Change it to be always off instead. Signed-off-by: Joel Stanley Signed-off-by: Michael Ellerman commit 27825349d7b238533a47e3d98b8bb0efd886b752 Author: Joel Stanley Date: Mon Oct 29 22:23:50 2018 +1100 selftests/powerpc/signal: Fix out-of-tree build We should use TEST_GEN_PROGS, not TEST_PROGS. That tells the selftests makefile (lib.mk) that those tests are generated (built), and so it adds the $(OUTPUT) prefix for us, making the out-of-tree build work correctly. It also means we don't need our own clean rule, lib.mk does it. We also have to update the signal_tm rule to use $(OUTPUT). Signed-off-by: Joel Stanley Signed-off-by: Michael Ellerman commit c39b79082a38a4f8c801790edecbbb4d62ed2992 Author: Joel Stanley Date: Mon Oct 29 22:23:49 2018 +1100 selftests/powerpc/ptrace: Fix out-of-tree build We should use TEST_GEN_PROGS, not TEST_PROGS. That tells the selftests makefile (lib.mk) that those tests are generated (built), and so it adds the $(OUTPUT) prefix for us, making the out-of-tree build work correctly. It also means we don't need our own clean rule, lib.mk does it. We also have to update the ptrace-pkey and core-pkey rules to use $(OUTPUT). Signed-off-by: Joel Stanley Signed-off-by: Michael Ellerman commit 399474e4c1100bca264ed14fa3ad0d68fab484d8 Author: Julian Sax Date: Wed Oct 24 22:40:26 2018 +0200 HID: i2c-hid: add Direkt-Tek DTLAPY133-1 to descriptor override This device uses the SIPODEV SP1064 touchpad, which does not supply descriptors, so it has to be added to the override list. Reported-by: Tim Aldridge Signed-off-by: Julian Sax Signed-off-by: Jiri Kosina commit 5e1275808630ea3b2c97c776f40e475017535f72 Author: Miklos Szeredi Date: Wed Oct 31 12:15:23 2018 +0100 ovl: check whiteout in ovl_create_over_whiteout() Kaixuxia repors that it's possible to crash overlayfs by removing the whiteout on the upper layer before creating a directory over it. This is a reproducer: mkdir lower upper work merge touch lower/file mount -t overlay overlay -olowerdir=lower,upperdir=upper,workdir=work merge rm merge/file ls -al merge/file rm upper/file ls -al merge/ mkdir merge/file Before commencing with a vfs_rename(..., RENAME_EXCHANGE) verify that the lookup of "upper" is positive and is a whiteout, and return ESTALE otherwise. Reported by: kaixuxia Signed-off-by: Miklos Szeredi Fixes: e9be9d5e76e3 ("overlay filesystem") Cc: # v3.18 commit 3ee9a76a8c5a10e1bfb04b81db767c6d562ddaf3 Author: Kuninori Morimoto Date: Wed Oct 31 00:48:12 2018 +0000 ASoC: rsnd: fixup clock start checker commit 4d230d12710646 ("ASoC: rsnd: fixup not to call clk_get/set under non-atomic") fixuped clock start timing. But it exchanged clock start checker from ssi->usrcnt to ssi->rate. Current rsnd_ssi_master_clk_start() is called from .prepare, but some player (for example GStreamer) might calls it many times. In such case, the checker might returns error even though it was not error. It should check ssi->usrcnt instead of ssi->rate. This patch fixup it. Without this patch, GStreamer can't switch 48kHz / 44.1kHz. Reported-by: Yusuke Goda Signed-off-by: Kuninori Morimoto Tested-by: Yusuke Goda Signed-off-by: Mark Brown commit a4d8f64f7267a88d4688f5c216926f5f6cafbae6 Author: Leilk Liu Date: Wed Oct 31 16:49:16 2018 +0800 spi: mediatek: use correct mata->xfer_len when in fifo transfer when xfer_len is greater than 64 bytes and use fifo mode to transfer, the actual length from the third time is mata->xfer_len but not len in mtk_spi_interrupt(). Signed-off-by: Leilk Liu Signed-off-by: Mark Brown commit 9c87156cce5a63735d1218f0096a65c50a7a32aa Author: Joel Stanley Date: Wed Oct 31 11:39:34 2018 +1030 powerpc/xmon: Relax frame size for clang When building with clang (8 trunk, 7.0 release) the frame size limit is hit: arch/powerpc/xmon/xmon.c:452:12: warning: stack frame size of 2576 bytes in function 'xmon_core' [-Wframe-larger-than=] Some investigation by Naveen indicates this is due to clang saving the addresses to printf format strings on the stack. While this issue is investigated, bump up the frame size limit for xmon when building with clang. Link: https://github.com/ClangBuiltLinux/linux/issues/252 Signed-off-by: Joel Stanley Signed-off-by: Michael Ellerman commit 5e7154ff5e8e21dc9acac4f8dba7533552365374 Author: Longhe Zheng Date: Tue Oct 30 16:12:10 2018 +0800 drm/i915/gvt: Handle values of EDP_PSR_IMR and EDP_PSR_IIR GVT-g only simulates DP port for guest and leaves EDP_PSR_IMR and EDP_PSR_IIR registers as default MMIO read/write. So guest won't get expected initial values of these registers when initializing the gpu driver, which results in following warning and logs. -------- Interrupt register 0x64838 is not zero: 0xffffffff WARNING: CPU: 1 PID: 157 at drivers/gpu/drm/i915/i915_irq.c:177 gen3_assert_iir_is_zero+0x38/0xa0 Call Trace: gen8_de_irq_postinstall+0xa7/0x400 gen8_irq_postinstall+0x27/0x80 drm_irq_install+0xbc/0x140 i915_driver_load+0xa9d/0xd50 -------- Because GVT-g does not handle EDP(embedded DP) simulation for guests, always set EDP_PSR_IMR and EDP_PSR_IIR to value 0. Signed-off-by: Longhe Zheng Signed-off-by: Zhenyu Wang commit 606a745944bc0ebd14f77dfc61ac7d6cb685cefe Author: Xinyun Liu Date: Wed Sep 19 15:28:53 2018 +0800 drm/i915/gvt: correct mask setting for CSFE_CHICKEN1 CSFE_CHICKEN1(0x20d4) needs access with mask. This is caught in AcrnGT conformance check test: [drm:intel_gvt_vgpu_conformance_check] *ERROR* gvt: vgpu1 unconformance mmio 0x20d4:0x40004,0x4 Signed-off-by: Xinyun Liu Signed-off-by: Zhi Wang Signed-off-by: Zhenyu Wang commit bc0686ff5fad7a842cc88377439e78be87fedc80 Author: Hang Yuan Date: Wed Sep 19 14:42:10 2018 +0800 drm/i915/gvt: support inconsecutive partial gtt entry write Previously we assumed two 4-byte writes to the same PTE coming in sequence. But recently we observed inconsecutive partial write happening as well. So this patch enhances the previous solution. It now uses a list to save more partial writes. If one partial write can be combined with another one in the list to construct a full PTE, update its shadow entry. Otherwise, save the partial write in the list. v2: invalidate old entry and flush ggtt (Zhenyu) v3: split old ggtt page unmap to another patch (Zhenyu) v4: refine codes (Zhenyu) Signed-off-by: Hang Yuan Cc: Yan Zhao Cc: Xiaolin Zhang Cc: Zhenyu Wang Reviewed-by: Xiaolin Zhang Signed-off-by: Zhenyu Wang commit a0aebae07f211c05d64be886e56d352eea86350b Author: Joel Stanley Date: Mon Oct 22 22:39:26 2018 +1030 selftests: powerpc: Fix warning for security subdir typing 'make' inside tools/testing/selftests/powerpc gave a build warning: BUILD_TARGET=tools/testing/selftests/powerpc/security; mkdir -p $BUILD_TARGET; make OUTPUT=$BUILD_TARGET -k -C security all make[1]: Entering directory 'tools/testing/selftests/powerpc/security' ../../lib.mk:20: ../../../../scripts/subarch.include: No such file or directory make[1]: *** No rule to make target '../../../../scripts/subarch.include'. make[1]: Failed to remake makefile '../../../../scripts/subarch.include'. The build is one level deeper than lib.mk thinks it is. Set top_srcdir to set things straight. Note that the test program is still built. Signed-off-by: Joel Stanley Signed-off-by: Michael Ellerman commit 27b31e68bc9fc25c519c7772fa23913687218d5f Author: John Fastabend Date: Mon Oct 29 12:31:28 2018 -0700 bpf: tcp_bpf_recvmsg should return EAGAIN when nonblocking and no data We return 0 in the case of a nonblocking socket that has no data available. However, this is incorrect and may confuse applications. After this patch we do the correct thing and return the error EAGAIN. Quoting return codes from recvmsg manpage, EAGAIN or EWOULDBLOCK The socket is marked nonblocking and the receive operation would block, or a receive timeout had been set and the timeout expired before data was received. Fixes: 604326b41a6f ("bpf, sockmap: convert to generic sk_msg interface") Signed-off-by: John Fastabend Acked-by: Song Liu Signed-off-by: Daniel Borkmann commit b31d30d9be32d41bef3e6076a965565d3a3d8005 Author: Yonghong Song Date: Mon Oct 29 14:56:48 2018 -0700 tools/bpf: add unlimited rlimit for flow_dissector_load On our test machine, bpf selftest test_flow_dissector.sh failed with the following error: # ./test_flow_dissector.sh bpffs not mounted. Mounting... libbpf: failed to create map (name: 'jmp_table'): Operation not permitted libbpf: failed to load object 'bpf_flow.o' ./flow_dissector_load: bpf_prog_load bpf_flow.o selftests: test_flow_dissector [FAILED] Let us increase the rlimit to remove the above map creation failure. Signed-off-by: Yonghong Song Acked-by: Song Liu Signed-off-by: Daniel Borkmann commit 204c881e96e435606451e8a167cdb5a12fafd32a Author: Viresh Kumar Date: Mon Oct 29 15:13:05 2018 +0530 dt-bindings: arm: Explain capacities-dmips-mhz calculations in example The example contains two values for the capacity currently, 446 in text and 578 in code. The numbers are all correct but can confuse some of the readers. This patch tries to explain how the numbers are calculated to avoid same confusion going forward. Acked-by: Daniel Lezcano Signed-off-by: Viresh Kumar Signed-off-by: Rob Herring commit 1ecd0da5888960ecff6409393c11b35fad644104 Author: Evan Quan Date: Tue Oct 30 09:12:22 2018 +0800 drm/amd/powerplay: revise Vega20 pptable version check Tell the version numbers when the pptable versions do not match. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 0cafc82fae41531b0162150f9a97f2c74f97118f Author: Guttula, Suresh Date: Mon Oct 29 05:23:25 2018 +0000 drm/amd/display: set backlight level limit to 1 This patch will work as workaround for silicon limitation related to PWM dutycycle when the backlight level goes to 0. Actually PWM value is 16 bit value and valid range from 1-65535. when ever user requested to set this PWM value to 0 which is not fall in the range, in VBIOS taken care this by limiting to 1. This patch here will do the same. Either driver or VBIOS can not pass 0 value as it is not a valid range for PWM and it will give a high PWM pulse which is not the intended behaviour as per HW constraints. Signed-off-by: suresh guttula Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher commit 698b53b3119c45a59eef10b516d780b3e9a5402d Author: Colin Ian King Date: Tue Oct 30 11:29:42 2018 +0000 mtip32xx: 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: Jens Axboe commit 310c7585e8300ddc46211df0757c11e4299ec482 Merge: 9b190ecca11c 93f38b6fae0e Author: Linus Torvalds Date: Tue Oct 30 13:03:29 2018 -0700 Merge tag 'nfsd-4.20' of git://linux-nfs.org/~bfields/linux Pull nfsd updates from Bruce Fields: "Olga added support for the NFSv4.2 asynchronous copy protocol. We already supported COPY, by copying a limited amount of data and then returning a short result, letting the client resend. The asynchronous protocol should offer better performance at the expense of some complexity. The other highlight is Trond's work to convert the duplicate reply cache to a red-black tree, and to move it and some other server caches to RCU. (Previously these have meant taking global spinlocks on every RPC) Otherwise, some RDMA work and miscellaneous bugfixes" * tag 'nfsd-4.20' of git://linux-nfs.org/~bfields/linux: (30 commits) lockd: fix access beyond unterminated strings in prints nfsd: Fix an Oops in free_session() nfsd: correctly decrement odstate refcount in error path svcrdma: Increase the default connection credit limit svcrdma: Remove try_module_get from backchannel svcrdma: Remove ->release_rqst call in bc reply handler svcrdma: Reduce max_send_sges nfsd: fix fall-through annotations knfsd: Improve lookup performance in the duplicate reply cache using an rbtree knfsd: Further simplify the cache lookup knfsd: Simplify NFS duplicate replay cache knfsd: Remove dead code from nfsd_cache_lookup SUNRPC: Simplify TCP receive code SUNRPC: Replace the cache_detail->hash_lock with a regular spinlock SUNRPC: Remove non-RCU protected lookup NFS: Fix up a typo in nfs_dns_ent_put NFS: Lockless DNS lookups knfsd: Lockless lookup of NFSv4 identities. SUNRPC: Lockless server RPCSEC_GSS context lookup knfsd: Allow lockless lookups of the exports ... commit 9b190ecca11c6ed6e20f35caef5746416d8ee0f0 Merge: 343a9f35409b 56ce68bceeef Author: Linus Torvalds Date: Tue Oct 30 12:46:25 2018 -0700 Merge tag 'cramfs_fixes' of git://git.linaro.org/people/nicolas.pitre/linux Pull cramfs fixes from Nicolas Pitre: "Make the Cramfs code more robust against filesystem corruptions, plus trivial indentation fixes" * tag 'cramfs_fixes' of git://git.linaro.org/people/nicolas.pitre/linux: Cramfs: trivial whitespace fixes Cramfs: fix abad comparison when wrap-arounds occur commit a6b3a3fa042343e29ffaf9169f5ba3c819d4f9a2 Author: Marc Zyngier Date: Tue Oct 30 15:41:00 2018 +0000 net: mvpp2: Fix affinity hint allocation The mvpp2 driver has the curious behaviour of passing a stack variable to irq_set_affinity_hint(), which results in the kernel exploding the first time anyone accesses this information. News flash: userspace does, and irqbalance will happily take the machine down. Great stuff. An easy fix is to track the mask within the queue_vector structure, and to make sure it has the same lifetime as the interrupt itself. Fixes: e531f76757eb ("net: mvpp2: handle cases where more CPUs are available than s/w threads") Signed-off-by: Marc Zyngier Signed-off-by: David S. Miller commit 56ce68bceeefa38e5b3509bf3d39259138e2d76a Author: Nicolas Pitre Date: Tue Oct 30 14:22:58 2018 -0400 Cramfs: trivial whitespace fixes Signed-off-by: Nicolas Pitre commit 672ca9dd13f1aca0c17516f76fc5b0e8344b3e46 Author: Nicolas Pitre Date: Tue Oct 30 13:26:15 2018 -0400 Cramfs: fix abad comparison when wrap-arounds occur It is possible for corrupted filesystem images to produce very large block offsets that may wrap when a length is added, and wrongly pass the buffer size test. Reported-by: Anatoly Trosinenko Signed-off-by: Nicolas Pitre Cc: stable@vger.kernel.org commit 3aa8029e1ac4faea2967e36281d93f5d099ed6a9 Author: Eric Dumazet Date: Tue Oct 30 00:18:12 2018 -0700 net/mlx4_en: add a missing include Abdul Haleem reported a build error on ppc : drivers/net/ethernet/mellanox/mlx4/en_rx.c:582:18: warning: `struct iphdr` declared inside parameter list [enabled by default] struct iphdr *iph) ^ drivers/net/ethernet/mellanox/mlx4/en_rx.c:582:18: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default] drivers/net/ethernet/mellanox/mlx4/en_rx.c: In function get_fixed_ipv4_csum: drivers/net/ethernet/mellanox/mlx4/en_rx.c:586:20: error: dereferencing pointer to incomplete type __u8 ipproto = iph->protocol; ^ Fixes: 55469bc6b577 ("drivers: net: remove inclusion when not needed") Signed-off-by: Eric Dumazet Reported-by: Abdul Haleem Signed-off-by: David S. Miller commit 343a9f35409b68b6de66ecd0db90a277aee90ec2 Merge: f4267b3604a8 a2acce536921 Author: Linus Torvalds Date: Tue Oct 30 09:49:56 2018 -0700 Merge tag 'trace-v4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing updates from Steven Rostedt: "The biggest change here is the updates to kprobes Back in January I posted patches to create function based events. These were the events that you suggested I make to allow developers to easily create events in code where no trace event exists. After posting those changes for review, it was suggested that we implement this instead with kprobes. The problem with kprobes is that the interface is too complex and needs to be simplified. Masami Hiramatsu posted patches in March and I've been playing with them a bit. There's been a bit of clean up in the kprobe code that was inspired by the function based event patches, and a couple of enhancements to the kprobe event interface. - If the arch supports it (we added support for x86), you can place a kprobe event at the start of a function and use $arg1, $arg2, etc to reference the arguments of a function. (Before you needed to know what register or where on the stack the argument was). - The second is a way to see array of events. For example, if you reference a mac address, you can add: echo 'p:mac ip_rcv perm_addr=+574($arg2):x8[6]' > kprobe_events And this will produce: mac: (ip_rcv+0x0/0x140) perm_addr={0x52,0x54,0x0,0xc0,0x76,0xec} Other changes include - Exporting trace_dump_stack to modules - Have the stack tracer trace the entire stack (stop trying to remove tracing itself, as we keep removing too much). - Added support for SDT in uprobes" [ SDT - "Statically Defined Tracing" are userspace markers for tracing. Let's not use random TLA's in explanations unless they are fairly well-established as generic (at least for kernel people) - Linus ] * tag 'trace-v4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: (24 commits) tracing: Have stack tracer trace full stack tracing: Export trace_dump_stack to modules tracing: probeevent: Fix uninitialized used of offset in parse args tracing/kprobes: Allow kprobe-events to record module symbol tracing/kprobes: Check the probe on unloaded module correctly tracing/uprobes: Fix to return -EFAULT if copy_from_user failed tracing: probeevent: Add $argN for accessing function args x86: ptrace: Add function argument access API tracing: probeevent: Add array type support tracing: probeevent: Add symbol type tracing: probeevent: Unify fetch_insn processing common part tracing: probeevent: Append traceprobe_ for exported function tracing: probeevent: Return consumed bytes of dynamic area tracing: probeevent: Unify fetch type tables tracing: probeevent: Introduce new argument fetching code tracing: probeevent: Remove NOKPROBE_SYMBOL from print functions tracing: probeevent: Cleanup argument field definition tracing: probeevent: Cleanup print argument functions trace_uprobe: support reference counter in fd-based uprobe perf probe: Support SDT markers having reference counter (semaphore) ... commit f4267b3604a84ff72c013a0e3e467289908603a6 Merge: 5b4c0d87de2d 0d0352d8b3d6 Author: Linus Torvalds Date: Tue Oct 30 09:47:28 2018 -0700 Merge tag 'trace-v4.19-rc8-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing fixes from Steven Rostedt: "Masami had a couple more fixes to the synthetic events. One was a proper error return value, and the other is for the self tests" * tag 'trace-v4.19-rc8-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: selftests/ftrace: Fix synthetic event test to delete event correctly tracing: Return -ENOENT if there is no target synthetic event commit 5b4c0d87de2d4932354ebcf118677c94533f9a01 Merge: c2101d018264 7a048cec598e Author: Linus Torvalds Date: Tue Oct 30 09:31:07 2018 -0700 Merge tag 'for-linus-4.20a-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull xen fixes from Juergen Gross: "Only several small fixes and cleanups this time" * tag 'for-linus-4.20a-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: xen: drop writing error messages to xenstore xen/pvh: don't try to unplug emulated devices add myself as reviewer for Xen support in Linux xen: remove redundant 'default n' from Kconfig xen/balloon: Support xend-based toolstack xen/pvh: increase early stack size xen: make xen_qlock_wait() nestable xen: fix race in xen_qlock_wait() xen/balloon: Grammar s/Is it/It is/ xen: Make XEN_BACKEND selectable by DomU commit c2101d01826480755f2bd9f3dd5e36757be61e23 Merge: 6ef746769ef5 6a9b593d4b6f Author: Linus Torvalds Date: Tue Oct 30 09:15:31 2018 -0700 Merge tag 'acpi-4.20-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull more ACPI updates from Rafael Wysocki: "Rework the handling of the P-unit semaphore on Intel Baytrail and Cherrytrail systems to avoid race conditions and excessive overhead related to it (Hans de Goede)" * tag 'acpi-4.20-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI / PMIC: xpower: Add depends on IOSF_MBI to Kconfig entry i2c: designware: Cleanup bus lock handling ACPI / PMIC: xpower: Block P-Unit I2C access during read-modify-write x86: baytrail/cherrytrail: Rework and move P-Unit PMIC bus semaphore code commit 6ef746769ef5cfef84cdfdf61ecbab5a6aa4651a Merge: 85b5d4bcab8b c4ac6889930d Author: Linus Torvalds Date: Tue Oct 30 09:08:07 2018 -0700 Merge tag 'pm-4.20-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull more power management updates from Rafael Wysocki: "These remove a questionable heuristic from the menu cpuidle governor, fix a recent build regression in the intel_pstate driver, clean up ARM big-Little support in cpufreq and fix up hung task watchdog's interaction with system-wide power management transitions. Specifics: - Fix build regression in the intel_pstate driver that doesn't build without CONFIG_ACPI after recent changes (Dominik Brodowski). - One of the heuristics in the menu cpuidle governor is based on a function returning 0 most of the time, so drop it and clean up the scheduler code related to it (Daniel Lezcano). - Prevent the arm_big_little cpufreq driver from being used on ARM64 which is not suitable for it and drop the arm_big_little_dt driver that is not used any more (Sudeep Holla). - Prevent the hung task watchdog from triggering during resume from system-wide sleep states by disabling it before freezing tasks and enabling it again after they have been thawed (Vitaly Kuznetsov)" * tag 'pm-4.20-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: kernel: hung_task.c: disable on suspend cpufreq: remove unused arm_big_little_dt driver cpufreq: drop ARM_BIG_LITTLE_CPUFREQ support for ARM64 cpufreq: intel_pstate: Fix compilation for !CONFIG_ACPI cpuidle: menu: Remove get_loadavg() from the performance multiplier sched: Factor out nr_iowait and nr_iowait_cpu commit 23cb2d04db54535df65edbbebbca89f2590f08bd Author: Pierre-Louis Bossart Date: Fri Oct 26 16:54:43 2018 -0500 ASoC: fix oops w/ for_each_rtd_codec_dai_rollback() macro A kernel oops happens on an error case (usual missing BE mixer configuration required by Intel SST driver). Git bisect points to this macro and an operator precedence issue. for (; ((i--) >= 0) && ((dai) = rtd->codec_dais[i]);) The initial code replaced by this macro was while (--i >= 0) { codec_dai = rtd->codec_dais[i]; Fix the C operator precedence difference by reverting to pre-decrement Fixes: 0b7990e3897 ('ASoC: add for_each_rtd_codec_dai() macro') Cc: Kuninori Morimoto Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown commit 85b5d4bcab8b46664f8e1993bd5919cb0f24a3ca Merge: 11743c56785c 9084cb6a24bf Author: Linus Torvalds Date: Tue Oct 30 08:27:13 2018 -0700 Merge tag 'for-4.20-part2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull more btrfs updates from David Sterba: "This contains a few minor updates and fixes that were under testing or arrived shortly after the merge window freeze, mostly stable material" * tag 'for-4.20-part2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: Btrfs: fix use-after-free when dumping free space Btrfs: fix use-after-free during inode eviction btrfs: move the dio_sem higher up the callchain btrfs: don't run delayed_iputs in commit btrfs: fix insert_reserved error handling btrfs: only free reserved extent if we didn't insert it btrfs: don't use ctl->free_space for max_extent_size btrfs: set max_extent_size properly btrfs: reset max_extent_size properly MAINTAINERS: update my email address for btrfs btrfs: delayed-ref: extract find_first_ref_head from find_ref_head Btrfs: fix deadlock when writing out free space caches Btrfs: fix assertion on fsync of regular file when using no-holes feature Btrfs: fix null pointer dereference on compressed write path error commit 4e303fbe2d95806c875f5ebfcb3d980e20b4bd83 Author: Arnaldo Carvalho de Melo Date: Fri Oct 26 15:55:23 2018 -0300 perf top: Allow disabling the overwrite mode In ebebbf082357 ("perf top: Switch default mode to overwrite mode") we forgot to leave a way to disable that new default, add a --overwrite option that can be disabled using --no-overwrite, since the code already in such a way that we can readily disable this mode. This is useful when investigating bugs with this mode like the recent report from David Miller where lots of unknown symbols appear due to disabling the events while processing them which disables all record types, not just PERF_RECORD_SAMPLE, which makes it impossible to resolve maps when we lose PERF_RECORD_MMAP records. This can be easily seen while building a kernel, when there are lots of short lived processes. Reported-by: David Miller Acked-by: Kan Liang Cc: Adrian Hunter Cc: Andi Kleen Cc: David Ahern Cc: Jin Yao Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Wang Nan Fixes: ebebbf082357 ("perf top: Switch default mode to overwrite mode") Link: https://lkml.kernel.org/n/tip-oqgsz2bq4kgrnnajrafcdhie@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 23c07a23cbed389d0b9c7a06486574621df8d1a4 Author: Arnaldo Carvalho de Melo Date: Fri Oct 26 13:51:45 2018 -0300 perf trace: Beautify mount's first pathname arg The pathname beautifiers so far support just one augmented pathname per syscall, so do it just for mount's first arg, later this will get fixed. With: # perf probe -l probe:vfs_getname (on getname_flags:73@acme/git/linux/fs/namei.c with pathname) # Later this will get added to augmented_syscalls.c (eBPF): In one xterm: # perf trace -e mount,umount 2687.331 ( 3.544 ms): mount/8892 mount(dev_name: /mnt, dir_name: 0x561f9ac184a0, type: 0x561f9ac1b170, flags: BIND) = 0 3912.126 ( 8.807 ms): umount/8895 umount2(name: /mnt) = 0 ^C# In the other: $ sudo mount --bind /proc /mnt $ sudo umount /mnt Cc: Adrian Hunter Cc: Benjamin Peterson Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-qsvhrm2es635cl4zicqjeth2@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 476c92cacf383c83584ba02d06c88cf18f062afb Author: Arnaldo Carvalho de Melo Date: Fri Oct 26 13:23:25 2018 -0300 perf trace: Beautify the umount's 'name' argument By using the SCA_FILENAME beautifier, that works when either the probe:vfs_getname probe is in place or with the eBPF program tools/perf/examples/bpf/augmented_syscalls.c: # perf probe -l probe:vfs_getname (on getname_flags:73@acme/git/linux/fs/namei.c with pathname) # perf trace -e umount 9630.332 ( 9.521 ms): umount/8082 umount2(name: /mnt) = 0 # The augmented syscalls one will be done in the next patch. Cc: Adrian Hunter Cc: Benjamin Peterson Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-hegbzlpd2nrn584l5jxn7sy2@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit f932184e282f574cfd34afee917a10b782fd3e76 Author: Arnaldo Carvalho de Melo Date: Thu Oct 25 17:24:45 2018 -0300 perf trace: Consider syscall aliases too When trying to trace the 'umount' syscall on x86_64 I noticed that it was failing: # trace -e umount umount /mnt event syntax error: 'umount' \___ parser error 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 # This is because in the x86-64 we have it just as 'umount2': $ grep umount arch/x86/entry/syscalls/syscall_64.tbl 166 common umount2 __x64_sys_umount $ So if the syscall name fails, try fallbacking to looking at the aliases we have in the syscall_fmts table to then re-lookup, now: # trace -e umount umount -f /mnt umount: /mnt: not mounted. 1.759 ( 0.004 ms): umount/18365 umount2(name: 0x55fbfcbc4480, flags: 1) = -1 EINVAL Invalid argument # Time to beautify the flags arg :-) Cc: Adrian Hunter Cc: Benjamin Peterson Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-ukweodgzbmjd25lfkgryeft1@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 73d141adcea66de656d0c8336811f2b0bbd9700c Author: Arnaldo Carvalho de Melo Date: Thu Oct 25 15:18:06 2018 -0300 perf trace beauty: Beautify mount/umount's 'flags' argument # trace -e mount mount -o ro -t debugfs nodev /mnt 0.000 ( 1.040 ms): mount/27235 mount(dev_name: 0x5601cc8c64e0, dir_name: 0x5601cc8c6500, type: 0x5601cc8c6480, flags: RDONLY) = 0 # trace -e mount mount -o remount,relatime -t debugfs nodev /mnt 0.000 ( 2.946 ms): mount/27262 mount(dev_name: 0x55f4a73d64e0, dir_name: 0x55f4a73d6500, type: 0x55f4a73d6480, flags: REMOUNT|RELATIME) = 0 # trace -e mount mount -o remount,strictatime -t debugfs nodev /mnt 0.000 ( 2.934 ms): mount/27265 mount(dev_name: 0x5617f71d94e0, dir_name: 0x5617f71d9500, type: 0x5617f71d9480, flags: REMOUNT|STRICTATIME) = 0 # trace -e mount mount -o remount,suid,silent -t debugfs nodev /mnt 0.000 ( 0.049 ms): mount/27273 mount(dev_name: 0x55ad65df24e0, dir_name: 0x55ad65df2500, type: 0x55ad65df2480, flags: REMOUNT|SILENT) = 0 # trace -e mount mount -o remount,rw,sync,lazytime -t debugfs nodev /mnt 0.000 ( 2.684 ms): mount/27281 mount(dev_name: 0x561216055530, dir_name: 0x561216055550, type: 0x561216055510, flags: SYNCHRONOUS|REMOUNT|LAZYTIME) = 0 # trace -e mount mount -o remount,dirsync -t debugfs nodev /mnt 0.000 ( 3.512 ms): mount/27314 mount(dev_name: 0x55c4e7188480, dir_name: 0x55c4e7188530, type: 0x55c4e71884a0, flags: REMOUNT|DIRSYNC, data: 0x55c4e71884e0) = 0 # Cc: Adrian Hunter Cc: Benjamin Peterson Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-i5ncao73c0bd02qprgrq6wb9@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 496fd346b71ffa0ff35623e9ec79df0bad47bd66 Author: Arnaldo Carvalho de Melo Date: Thu Oct 25 16:09:47 2018 -0300 perf trace beauty: Allow syscalls to mask an argument before considering it Take mount's 'flags' arg, to cope with this semantic, as defined in do_mount in fs/namespace.c: /* * Pre-0.97 versions of mount() didn't have a flags word. When the * flags word was introduced its top half was required to have the * magic value 0xC0ED, and this remained so until 2.4.0-test9. * Therefore, if this magic number is present, it carries no * information and must be discarded. */ We need to mask this arg, and then see if it is zero, when we simply don't print the arg name and value. The next patch will use this for mount's 'flag' arg. Cc: Adrian Hunter Cc: Benjamin Peterson Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-btue14k5jemayuykfrwsnh85@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 579e5ff629b17744f62473f314768de8b6f1e66c Author: Arnaldo Carvalho de Melo Date: Thu Oct 25 14:21:31 2018 -0300 perf beauty: Introduce strarray__scnprintf_flags() Generalizing pkey_alloc__scnprintf_access_rights(), so that we can use it with other flags-like arguments, such as mount's mountflags argument. Cc: Adrian Hunter Cc: Benjamin Peterson Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-o3ymi3104m8moaz9865g09w9@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 794f594e0c3be6199e0b3e2324280e8785806fb6 Author: Arnaldo Carvalho de Melo Date: Wed Oct 24 15:54:23 2018 -0300 perf beauty: Switch from GPL v2.0 to LGPL v2.1 The intention is to have this as a library, since it is not perf specific at all. I did the switch for the files where I'm the only contributor, with the exception of a few lines changed by Jiri Olsa. Acked-by: Jiri Olsa Cc: Adrian Hunter Cc: David Ahern Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-a04q6chdyjknm1hr305ulx8h@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit ceaf8e5b49ce18e9e58d292130e92150d01a34e6 Author: Arnaldo Carvalho de Melo Date: Wed Oct 24 14:54:55 2018 -0300 perf beauty: Add a generator for MS_ mount/umount's flag constants It'll use tools/include copy of linux/fs.h to generate a table to be used by tools, initially by the 'mount' and 'umount' beautifiers in 'perf trace', but that could also be used to translate from a string constant to the integer value to be used in a eBPF or tracefs tracepoint filter. When used without any args it produces: $ tools/perf/trace/beauty/mount_flags.sh static const char *mount_flags[] = { [1 ? (ilog2(1) + 1) : 0] = "RDONLY", [2 ? (ilog2(2) + 1) : 0] = "NOSUID", [4 ? (ilog2(4) + 1) : 0] = "NODEV", [8 ? (ilog2(8) + 1) : 0] = "NOEXEC", [16 ? (ilog2(16) + 1) : 0] = "SYNCHRONOUS", [32 ? (ilog2(32) + 1) : 0] = "REMOUNT", [64 ? (ilog2(64) + 1) : 0] = "MANDLOCK", [128 ? (ilog2(128) + 1) : 0] = "DIRSYNC", [1024 ? (ilog2(1024) + 1) : 0] = "NOATIME", [2048 ? (ilog2(2048) + 1) : 0] = "NODIRATIME", [4096 ? (ilog2(4096) + 1) : 0] = "BIND", [8192 ? (ilog2(8192) + 1) : 0] = "MOVE", [16384 ? (ilog2(16384) + 1) : 0] = "REC", [32768 ? (ilog2(32768) + 1) : 0] = "SILENT", [16 + 1] = "POSIXACL", [17 + 1] = "UNBINDABLE", [18 + 1] = "PRIVATE", [19 + 1] = "SLAVE", [20 + 1] = "SHARED", [21 + 1] = "RELATIME", [22 + 1] = "KERNMOUNT", [23 + 1] = "I_VERSION", [24 + 1] = "STRICTATIME", [25 + 1] = "LAZYTIME", [26 + 1] = "SUBMOUNT", [27 + 1] = "NOREMOTELOCK", [28 + 1] = "NOSEC", [29 + 1] = "BORN", [30 + 1] = "ACTIVE", [31 + 1] = "NOUSER", }; $ Cc: Adrian Hunter Cc: Benjamin Peterson Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-mgutbbkmip9gfnmd28ikg7xt@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit f443f38c5789ece6ebe59ae21c27bf861e61c4e2 Author: Arnaldo Carvalho de Melo Date: Wed Oct 24 14:31:12 2018 -0300 tools include uapi: Grab a copy of linux/fs.h We'll use it to create tables for the 'flags' argument to the 'mount' and 'umount' syscalls. Add it to check_headers.sh so that when a new protocol gets added we get a notification during the build process. Cc: Adrian Hunter Cc: Benjamin Peterson Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-yacf9jvkwfwg2g95r2us3xb3@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit a95ecac5cb2fc8a8ee606991384d33ee121df00c Author: Naveen N. Rao Date: Tue Oct 23 13:34:56 2018 +0530 selftests/powerpc: Relax L1d miss targets for rfi_flush test When running the rfi_flush test, if the system is loaded, we see two issues: 1. The L1d misses when rfi_flush is disabled increase significantly due to other workloads interfering with the cache. 2. The L1d misses when rfi_flush is enabled sometimes goes slightly below the expected number of misses. To address these, let's relax the expected number of L1d misses: 1. When rfi_flush is disabled, we allow upto half the expected number of the misses for when rfi_flush is enabled. 2. When rfi_flush is enabled, we allow ~1% lower number of cache misses. Reported-by: Joel Stanley Signed-off-by: Naveen N. Rao Tested-by: Joel Stanley Signed-off-by: Michael Ellerman commit 826b5de90c0bca4e9de6231da9e1730480621588 Author: Takashi Sakamoto Date: Tue Oct 30 15:31:15 2018 +0900 ALSA: firewire-lib: fix insufficient PCM rule for period/buffer size In a former commit, PCM constraint based on LCM of SYT_INTERVAL was obsoleted with PCM rule. However, the new PCM rule brings -EINVAL in some cases that max/min values of size of buffer/period is not multiples of one of values of SYT_INTERVAL. For example, pulseaudio always fail to configure PCM substream. This commit changes strategy for the PCM rule. Although the buggy rules had a single dependency (rate from period, period from rate, rate from buffer, buffer from rate), a revised rule has double dependencies (period from period/rate, buffer from buffer/rate). A step of value is calculated with table of SYT_INTERVAL and list of available rates. This prevents interval template which brings -EINVAL to a call of snd_interval_refine(). Fixes: 5950229582bc('ALSA: firewire-lib: add PCM rules to obsolete PCM constraints based on LCM of SYT_INTERVAL') Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai commit c6ee7a548e2c291398b4f32c1f741c66b9f98e1c Author: Dave Jiang Date: Thu Oct 25 13:26:45 2018 -0700 x86/numa_emulation: Fix uniform-split numa emulation The numa_emulation() routine in the 'uniform' case walks through all the physical 'memblk' instances and divides them into N emulated nodes with split_nodes_size_interleave_uniform(). As each physical node is consumed it is removed from the physical memblk array in the numa_remove_memblk_from() helper. Since split_nodes_size_interleave_uniform() handles advancing the array as the 'memblk' is consumed it is expected that the base of the array is always specified as the argument. Otherwise, on multi-socket (> 2) configurations the uniform-split capability can generate an invalid numa configuration leading to boot failures with signatures like the following: rcu: INFO: rcu_sched detected stalls on CPUs/tasks: Sending NMI from CPU 0 to CPUs 2: NMI backtrace for cpu 2 CPU: 2 PID: 1332 Comm: pgdatinit0 Not tainted 4.19.0-rc8-next-20181019-baseline #59 RIP: 0010:__init_single_page.isra.74+0x81/0x90 [..] Call Trace: deferred_init_pages+0xaa/0xe3 deferred_init_memmap+0x18f/0x318 kthread+0xf8/0x130 ? deferred_free_pages.isra.105+0xc9/0xc9 ? kthread_stop+0x110/0x110 ret_from_fork+0x35/0x40 Fixes: 1f6a2c6d9f121 ("x86/numa_emulation: Introduce uniform split capability") Signed-off-by: Dave Jiang Signed-off-by: Dan Williams Signed-off-by: Thomas Gleixner Tested-by: Alexander Duyck Reviewed-by: Dave Hansen Cc: Borislav Petkov Cc: "H. Peter Anvin" Cc: Andy Lutomirski Cc: Peter Zijlstra Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/154049911459.2685845.9210186007479774286.stgit@dwillia2-desk3.amr.corp.intel.com commit 7847c7be0481558f17e3ef3b03f573677fd30d29 Author: Juergen Gross Date: Tue Oct 30 07:33:01 2018 +0100 x86/paravirt: Remove unused _paravirt_ident_32 There is no user of _paravirt_ident_32 left in the tree. Remove it together with the related paravirt_patch_ident_32(). paravirt_patch_ident_64() can be moved inside CONFIG_PARAVIRT_XXL=y. Signed-off-by: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: akataria@vmware.com Cc: boris.ostrovsky@oracle.com Cc: rusty@rustcorp.com.au Cc: virtualization@lists.linux-foundation.org Cc: xen-devel@lists.xenproject.org Link: http://lkml.kernel.org/r/20181030063301.15054-1-jgross@suse.com Signed-off-by: Ingo Molnar commit 28fa741c27e6d57f6bf594ba3c444ce79e671e09 Author: Colin Ian King Date: Mon Oct 29 23:32:11 2018 +0000 perf/core: Clean up inconsisent indentation Replace a bunch of spaces with tab, cleans up indentation Signed-off-by: Colin Ian King Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: kernel-janitors@vger.kernel.org Link: http://lkml.kernel.org/r/20181029233211.21475-1-colin.king@canonical.com Signed-off-by: Ingo Molnar commit 960b82c383d38fea4439e4182b5be4352a6048e2 Author: Max Filippov Date: Tue Oct 30 01:28:56 2018 -0700 xtensa: clean up xtensa-specific property sections xtensa-specific property sections may be section-specific. They should be collected in the order of appearance. .gnu.linkonce.prop.* input sections should be collected into the .xt.prop output section. Signed-off-by: Max Filippov commit 1026ded6936f0f9caba5759e2e7438f4dee67867 Author: Max Filippov Date: Mon Oct 29 18:30:46 2018 -0700 xtensa: use DWARF_DEBUG in the vmlinux.lds.S Xtensa doesn't have anything custom in its debug sections list. Use macro DWARF_DEBUG instead of opencoding it. Signed-off-by: Max Filippov commit c4ac6889930d027ffa5cf77e0c202e7e97a4be06 Merge: a1c6ca3c6de7 a7fe5190c03f f174e49e4906 Author: Rafael J. Wysocki Date: Tue Oct 30 08:47:14 2018 +0100 Merge branches 'pm-cpuidle' and 'pm-cpufreq' * pm-cpuidle: cpuidle: menu: Remove get_loadavg() from the performance multiplier sched: Factor out nr_iowait and nr_iowait_cpu * pm-cpufreq: cpufreq: remove unused arm_big_little_dt driver cpufreq: drop ARM_BIG_LITTLE_CPUFREQ support for ARM64 cpufreq: intel_pstate: Fix compilation for !CONFIG_ACPI commit 0f0a691f1ef9af0f8943f601b325a219d1ba8184 Author: David S. Miller Date: Mon Oct 29 22:17:12 2018 -0700 sparc64: Remvoe set_fs() from perf_callchain_user(). Ever since commit 88b0193d9418 ("perf/callchain: Force USER_DS when invoking perf_callchain_user()") the caller does this for us. Signed-off-by: David S. Miller commit da71577545a52be3e0e9225a946e5fd79cfab015 Author: Ido Schimmel Date: Mon Oct 29 20:36:43 2018 +0000 rtnetlink: Disallow FDB configuration for non-Ethernet device When an FDB entry is configured, the address is validated to have the length of an Ethernet address, but the device for which the address is configured can be of any type. The above can result in the use of uninitialized memory when the address is later compared against existing addresses since 'dev->addr_len' is used and it may be greater than ETH_ALEN, as with ip6tnl devices. Fix this by making sure that FDB entries are only configured for Ethernet devices. BUG: KMSAN: uninit-value in memcmp+0x11d/0x180 lib/string.c:863 CPU: 1 PID: 4318 Comm: syz-executor998 Not tainted 4.19.0-rc3+ #49 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+0x14b/0x190 lib/dump_stack.c:113 kmsan_report+0x183/0x2b0 mm/kmsan/kmsan.c:956 __msan_warning+0x70/0xc0 mm/kmsan/kmsan_instr.c:645 memcmp+0x11d/0x180 lib/string.c:863 dev_uc_add_excl+0x165/0x7b0 net/core/dev_addr_lists.c:464 ndo_dflt_fdb_add net/core/rtnetlink.c:3463 [inline] rtnl_fdb_add+0x1081/0x1270 net/core/rtnetlink.c:3558 rtnetlink_rcv_msg+0xa0b/0x1530 net/core/rtnetlink.c:4715 netlink_rcv_skb+0x36e/0x5f0 net/netlink/af_netlink.c:2454 rtnetlink_rcv+0x50/0x60 net/core/rtnetlink.c:4733 netlink_unicast_kernel net/netlink/af_netlink.c:1317 [inline] netlink_unicast+0x1638/0x1720 net/netlink/af_netlink.c:1343 netlink_sendmsg+0x1205/0x1290 net/netlink/af_netlink.c:1908 sock_sendmsg_nosec net/socket.c:621 [inline] sock_sendmsg net/socket.c:631 [inline] ___sys_sendmsg+0xe70/0x1290 net/socket.c:2114 __sys_sendmsg net/socket.c:2152 [inline] __do_sys_sendmsg net/socket.c:2161 [inline] __se_sys_sendmsg+0x2a3/0x3d0 net/socket.c:2159 __x64_sys_sendmsg+0x4a/0x70 net/socket.c:2159 do_syscall_64+0xb8/0x100 arch/x86/entry/common.c:291 entry_SYSCALL_64_after_hwframe+0x63/0xe7 RIP: 0033:0x440ee9 Code: e8 cc ab 02 00 48 83 c4 18 c3 0f 1f 80 00 00 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 0f 83 bb 0a fc ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007fff6a93b518 EFLAGS: 00000213 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000440ee9 RDX: 0000000000000000 RSI: 0000000020000240 RDI: 0000000000000003 RBP: 0000000000000000 R08: 00000000004002c8 R09: 00000000004002c8 R10: 00000000004002c8 R11: 0000000000000213 R12: 000000000000b4b0 R13: 0000000000401ec0 R14: 0000000000000000 R15: 0000000000000000 Uninit was created at: kmsan_save_stack_with_flags mm/kmsan/kmsan.c:256 [inline] kmsan_internal_poison_shadow+0xb8/0x1b0 mm/kmsan/kmsan.c:181 kmsan_kmalloc+0x98/0x100 mm/kmsan/kmsan_hooks.c:91 kmsan_slab_alloc+0x10/0x20 mm/kmsan/kmsan_hooks.c:100 slab_post_alloc_hook mm/slab.h:446 [inline] slab_alloc_node mm/slub.c:2718 [inline] __kmalloc_node_track_caller+0x9e7/0x1160 mm/slub.c:4351 __kmalloc_reserve net/core/skbuff.c:138 [inline] __alloc_skb+0x2f5/0x9e0 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+0xb49/0x1290 net/netlink/af_netlink.c:1883 sock_sendmsg_nosec net/socket.c:621 [inline] sock_sendmsg net/socket.c:631 [inline] ___sys_sendmsg+0xe70/0x1290 net/socket.c:2114 __sys_sendmsg net/socket.c:2152 [inline] __do_sys_sendmsg net/socket.c:2161 [inline] __se_sys_sendmsg+0x2a3/0x3d0 net/socket.c:2159 __x64_sys_sendmsg+0x4a/0x70 net/socket.c:2159 do_syscall_64+0xb8/0x100 arch/x86/entry/common.c:291 entry_SYSCALL_64_after_hwframe+0x63/0xe7 v2: * Make error message more specific (David) Fixes: 090096bf3db1 ("net: generic fdb support for drivers without ndo_fdb_") Signed-off-by: Ido Schimmel Reported-and-tested-by: syzbot+3a288d5f5530b901310e@syzkaller.appspotmail.com Reported-and-tested-by: syzbot+d53ab4e92a1db04110ff@syzkaller.appspotmail.com Cc: Vlad Yasevich Cc: David Ahern Reviewed-by: David Ahern Signed-off-by: David S. Miller commit 713358369382cebf92f6e98ce2005f94e7344931 Author: Xin Long Date: Mon Oct 29 23:13:11 2018 +0800 sctp: check policy more carefully when getting pr status When getting pr_assocstatus and pr_streamstatus by sctp_getsockopt, it doesn't correctly process the case when policy is set with SCTP_PR_SCTP_ALL | SCTP_PR_SCTP_MASK. It even causes a slab-out-of-bounds in sctp_getsockopt_pr_streamstatus(). This patch fixes it by return -EINVAL for this case. Fixes: 0ac1077e3a54 ("sctp: get pr_assoc and pr_stream all status with SCTP_PR_SCTP_ALL") Reported-by: syzbot+5da0d0a72a9e7d791748@syzkaller.appspotmail.com Suggested-by: Marcelo Ricardo Leitner Signed-off-by: Xin Long Signed-off-by: David S. Miller commit df132eff463873e14e019a07f387b4d577d6d1f9 Author: Xin Long Date: Mon Oct 29 23:10:29 2018 +0800 sctp: clear the transport of some out_chunk_list chunks in sctp_assoc_rm_peer If a transport is removed by asconf but there still are some chunks with this transport queuing on out_chunk_list, later an use-after-free issue will be caused when accessing this transport from these chunks in sctp_outq_flush(). This is an old bug, we fix it by clearing the transport of these chunks in out_chunk_list when removing a transport in sctp_assoc_rm_peer(). Reported-by: syzbot+56a40ceee5fb35932f4d@syzkaller.appspotmail.com Signed-off-by: Xin Long Signed-off-by: David S. Miller commit 2b0ab72799c29ac63f889f3ccb14d6e22a8ac6bb Merge: 6e29464b8a72 a22712a96291 Author: David S. Miller Date: Mon Oct 29 20:48:00 2018 -0700 Merge branch 'mlxsw-Couple-of-fixes' Ido Schimmel says: ==================== mlxsw: Couple of fixes First patch makes sure mlxsw does not ignore user requests to delete FDB entries that were learned by the device. Second patch fixes a use-after-free that can be triggered by requesting a reload via devlink when the previous reload failed. Please consider both patches for stable. They apply cleanly to both 4.18.y and 4.19.y. ==================== Signed-off-by: David S. Miller commit a22712a962912faf257e857ab6857f56a93cfb34 Author: Shalom Toledo Date: Mon Oct 29 14:26:16 2018 +0000 mlxsw: core: Fix devlink unregister flow After a failed reload, the driver is still registered to devlink, its devlink instance is still allocated and the 'reload_fail' flag is set. Then, in the next reload try, the driver's allocated devlink instance will be freed without unregistering from devlink and its components (e.g, resources). This scenario can cause a use-after-free if the user tries to execute command via devlink user-space tool. Fix by not freeing the devlink instance during reload (failed or not). Fixes: 24cc68ad6c46 ("mlxsw: core: Add support for reload") Signed-off-by: Shalom Toledo Reviewed-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit ad0b9d94182be8356978d220c82f9837cffeb7a9 Author: Petr Machata Date: Mon Oct 29 14:26:14 2018 +0000 mlxsw: spectrum_switchdev: Don't ignore deletions of learned MACs Demands to remove FDB entries should be honored even if the FDB entry in question was originally learned, and not added by the user. Therefore ignore the added_by_user datum for SWITCHDEV_FDB_DEL_TO_DEVICE. Fixes: 816a3bed9549 ("switchdev: Add fdb.added_by_user to switchdev notifications") Signed-off-by: Petr Machata Suggested-by: Ido Schimmel Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 6e29464b8a72e74ec7c3f816f53bfe46a43601bc Author: Nathan Chancellor Date: Mon Oct 29 03:51:58 2018 -0700 hinic: Fix l4_type parameter in hinic_task_set_tunnel_l4 Clang warns: drivers/net/ethernet/huawei/hinic/hinic_tx.c:392:34: error: implicit conversion from enumeration type 'enum hinic_l4_tunnel_type' to different enumeration type 'enum hinic_l4_offload_type' [-Werror,-Wenum-conversion] hinic_task_set_tunnel_l4(task, TUNNEL_UDP_NO_CSUM, ~~~~~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~ 1 error generated. It seems that hinic_task_set_tunnel_l4 was meant to take an enum of type hinic_l4_tunnel_type, not hinic_l4_offload_type, given both the name of the functions and the values used. Fixes: cc18a7543d2f ("net-next/hinic: add checksum offload and TSO support") Signed-off-by: Nathan Chancellor Reviewed-by: Nick Desaulniers Signed-off-by: David S. Miller commit e2d00e62f24b907d49b83802ae91a6fa6254a48c Author: Lorenzo Colitti Date: Mon Oct 29 09:30:29 2018 +0900 Documentation: ip-sysctl.txt: Document tcp_fwmark_accept This patch documents the tcp_fwmark_accept sysctl that was added in 3.15. Signed-off-by: Lorenzo Colitti Signed-off-by: David S. Miller commit 414dd6fb9a1a1b59983aea7bf0f79f0085ecc5b8 Author: Tobias Jungel Date: Sun Oct 28 12:54:10 2018 +0100 bonding: fix length of actor system The attribute IFLA_BOND_AD_ACTOR_SYSTEM is sent to user space having the length of sizeof(bond->params.ad_actor_system) which is 8 byte. This patch aligns the length to ETH_ALEN to have the same MAC address exposed as using sysfs. Fixes: f87fda00b6ed2 ("bonding: prevent out of bound accesses") Signed-off-by: Tobias Jungel Signed-off-by: David S. Miller commit 966c37f2d77eb44d47af8e919267b1ba675b2eca Author: Hangbin Liu Date: Fri Oct 26 11:30:35 2018 +0800 ipv4/igmp: fix v1/v2 switchback timeout based on rfc3376, 8.12 Similiar with ipv6 mcast commit 89225d1ce6af3 ("net: ipv6: mld: fix v1/v2 switchback timeout to rfc3810, 9.12.") i) RFC3376 8.12. Older Version Querier Present Timeout says: The Older Version Querier Interval is the time-out for transitioning a host back to IGMPv3 mode once an older version query is heard. When an older version query is received, hosts set their Older Version Querier Present Timer to Older Version Querier Interval. This value MUST be ((the Robustness Variable) times (the Query Interval in the last Query received)) plus (one Query Response Interval). Currently we only use a hardcode value IGMP_V1/v2_ROUTER_PRESENT_TIMEOUT. Fix it by adding two new items mr_qi(Query Interval) and mr_qri(Query Response Interval) in struct in_device. Now we can calculate the switchback time via (mr_qrv * mr_qi) + mr_qri. We need update these values when receive IGMPv3 queries. Reported-by: Ying Xu Signed-off-by: Hangbin Liu Signed-off-by: David S. Miller commit 4119ba211bc4f1bf638f41e50b7a0f329f58aa16 Author: Max Filippov Date: Mon Oct 29 18:30:13 2018 -0700 xtensa: add NOTES section to the linker script This section collects all source .note.* sections together in the vmlinux image. Without it .note.Linux section may be placed at address 0, while the rest of the kernel is at its normal address, resulting in a huge vmlinux.bin image that may not be linked into the xtensa Image.elf. Cc: stable@vger.kernel.org Signed-off-by: Max Filippov commit 11743c56785c751c087eecdb98713eef796609e0 Merge: 929e134c43c9 928002a5e9da Author: Linus Torvalds Date: Mon Oct 29 17:10:03 2018 -0700 Merge tag 'rpmsg-v4.20' of git://github.com/andersson/remoteproc Pull rpmsg updates from Bjorn Andersson: "This migrates rpmsg_char to use read/write_iter to allow being operated using aio, removes the message size alignment requirements from glink, closes a potential memory leak in SMD and switches to %pOFn for printing device_node names" * tag 'rpmsg-v4.20' of git://github.com/andersson/remoteproc: rpmsg: glink: smem: Support rx peak for size less than 4 bytes rpmsg: smd: fix memory leak on channel create rpmsg: glink: Remove chunk size word align warning rpmsg: Convert to using %pOFn instead of device_node.name rpmsg: char: Migrate to iter versions of read and write commit 929e134c43c95822663367c47fb211ca272309f7 Merge: 4b42745211af f18b7e914fd2 Author: Linus Torvalds Date: Mon Oct 29 17:07:53 2018 -0700 Merge tag 'rproc-v4.20' of git://github.com/andersson/remoteproc Pull remoteproc updates from Bjorn Andersson: "This contains a series of patches that reworks the memory carveout handling in remoteproc, in order to allow this to be reused for statically allocated memory regions to be used for e.g. firmware. It adds support for audio DSP (both TZ-assisted and non-TZ assisted) and compute DSP on Qualcomm SDM845, TZ-assisted audio DSP, compute DSP and WiFi processor on Qualcomm QCS404 and through some renaming of the drivers cleans up the naming situation. Finally support for custom coreudmp segment handlers is added and is used in the Qualcomm modem remoteproc driver to gather memory dumps of the firmware" * tag 'rproc-v4.20' of git://github.com/andersson/remoteproc: (36 commits) remoteproc: qcom: q6v5-mss: Register segments/dumpfn for coredump remoteproc: qcom: q6v5-mss: Add custom dump function for modem remoteproc: qcom: q6v5-mss: Refactor mba load/unload sequence remoteproc: Add mechanism for custom dump function assignment remoteproc: Introduce custom dump function for each remoteproc segment remoteproc: modify vring allocation to rely on centralized carveout allocator remoteproc: qcom: q6v5: shore up resource probe handling remoteproc: qcom: qcom_q6v5_adsp: Fix some return value check remoteproc: modify rproc_handle_carveout to support pre-registered region remoteproc: add helper function to check carveout device address remoteproc: add helper function to allocate rproc_mem_entry from reserved memory remoteproc: add alloc ops in rproc_mem_entry struct remoteproc: introduce rproc_find_carveout_by_name function remoteproc: introduce rproc_add_carveout function remoteproc: add helper function to allocate and init rproc_mem_entry struct remoteproc: add name in rproc_mem_entry struct remoteproc: add release ops in rproc_mem_entry struct remoteproc: add rproc_va_to_pa function remoteproc: configure IOMMU only if device address requested remoteproc: qcom: q6v5-mss: add SCM probe dependency ... commit bf4a1fcf0bc18d52cf0fce6571d6f327ab5eaf22 Author: Darrick J. Wong Date: Tue Oct 30 10:47:48 2018 +1100 xfs: remove [cm]time update from reflink calls Now that the vfs remap helper dirties the inode [cm]time for us, xfs no longer needs to do that on its own. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner Signed-off-by: Dave Chinner commit 3fc9f5e409319e994d113cf1327ba6ab147423c2 Author: Darrick J. Wong Date: Tue Oct 30 10:47:26 2018 +1100 xfs: remove xfs_reflink_remap_range Since xfs_file_remap_range is a thin wrapper, move the contents of xfs_reflink_remap_range into the shell. This cuts down on the vfs calls being made from internal xfs code. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner Signed-off-by: Dave Chinner commit 7a6ccf004e234c01fb2a11771de9837c9ff3d56d Author: Darrick J. Wong Date: Tue Oct 30 10:47:16 2018 +1100 xfs: remove redundant remap partial EOF block checks Now that we've moved the partial EOF block checks to the VFS helpers, we can remove the redundant functionality from XFS. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner Signed-off-by: Dave Chinner commit 3f68c1f562f1e4c5e1a515b392a2e0a509a342d5 Author: Darrick J. Wong Date: Tue Oct 30 10:47:06 2018 +1100 xfs: support returning partial reflink results Back when the XFS reflink code only supported clone_file_range, we were only able to return zero or negative error codes to userspace. However, now that copy_file_range (which returns bytes copied) can use XFS' clone_file_range, we have the opportunity to return partial results. For example, if userspace sends a 1GB clone request and we run out of space halfway through, we at least can tell userspace that we completed 512M of that request like a regular write. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner Signed-off-by: Dave Chinner commit 9f04aaffddb3e487f3eda1945f1a9531d6cc7628 Author: Darrick J. Wong Date: Tue Oct 30 10:46:50 2018 +1100 xfs: clean up xfs_reflink_remap_blocks call site Move the offset <-> blocks unit conversions into xfs_reflink_remap_blocks to make the call site less ugly. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner Signed-off-by: Dave Chinner commit 4918ef4ea008cd2ff47eb852894e3f9b9047f4f3 Author: Darrick J. Wong Date: Tue Oct 30 10:46:33 2018 +1100 xfs: fix pagecache truncation prior to reflink Prior to remapping blocks, it is necessary to remove pages from the destination file's page cache. Unfortunately, the truncation is not aggressive enough -- if page size > block size, we'll end up zeroing subpage blocks instead of removing them. So, round the start offset down and the end offset up to page boundaries. We already wrote all the dirty data so the larger range shouldn't be a problem. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner Reviewed-by: Christoph Hellwig Signed-off-by: Dave Chinner commit 65f098e91ffbb64d7ca2ed93b6ab2428a2e34452 Author: Darrick J. Wong Date: Tue Oct 30 10:45:48 2018 +1100 ocfs2: remove ocfs2_reflink_remap_range Since ocfs2_remap_file_range is a thin shell around ocfs2_remap_remap_range, move everything from the latter into the former. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner Signed-off-by: Dave Chinner commit 900611a1bd06ef4a79980e58babc61ef056c81ab Author: Darrick J. Wong Date: Tue Oct 30 10:44:45 2018 +1100 ocfs2: support partial clone range and dedupe range Change the ocfs2 remap code to allow for returning partial results. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner Signed-off-by: Dave Chinner commit a8a94302c9754d05069ee149cf01df8aa5116aaa Author: Darrick J. Wong Date: Tue Oct 30 10:43:16 2018 +1100 ocfs2: fix pagecache truncation prior to reflink Prior to remapping blocks, it is necessary to remove pages from the destination file's page cache. Unfortunately, the truncation is not aggressive enough -- if page size > block size, we'll end up zeroing subpage blocks instead of removing them. So, round the start offset down and the end offset up to page boundaries. We already wrote all the dirty data so the larger range should be fine. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner Signed-off-by: Dave Chinner commit 2587b1f1fae2d992de67e57b519f36e7c9ba70cd Author: Darrick J. Wong Date: Tue Oct 30 10:42:56 2018 +1100 ocfs2: truncate page cache for clone destination file before remapping When cloning blocks into another file, truncate the page cache before we start remapping blocks so that concurrent reads wait for us to finish. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner Signed-off-by: Dave Chinner commit 8c5c836bd6c3b9f9fc1c5a210d630b8c42f4f7df Author: Darrick J. Wong Date: Tue Oct 30 10:42:24 2018 +1100 vfs: clean up generic_remap_file_range_prep return value Since the remap prep function can update the length of the remap request, we can change this function to return the usual return status instead of the odd behavior it has now. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Signed-off-by: Dave Chinner commit c32e5f39953fa6bbff35c655bdcb7b3128f1e79f Author: Darrick J. Wong Date: Tue Oct 30 10:42:17 2018 +1100 vfs: hide file range comparison function There are no callers of vfs_dedupe_file_range_compare, so we might as well make it a static helper and remove the export. Signed-off-by: Darrick J. Wong Reviewed-by: Amir Goldstein Reviewed-by: Christoph Hellwig Signed-off-by: Dave Chinner commit eca3654e3cc7d93e9734d0fa96cfb15c7f356244 Author: Darrick J. Wong Date: Tue Oct 30 10:42:10 2018 +1100 vfs: enable remap callers that can handle short operations Plumb in a remap flag that enables the filesystem remap handler to shorten remapping requests for callers that can handle it. Now copy_file_range can report partial success (in case we run up against alignment problems, resource limits, etc.). We also enable CAN_SHORTEN for fideduperange to maintain existing userspace-visible behavior where xfs/btrfs shorten the dedupe range to avoid stale post-eof data exposure. Signed-off-by: Darrick J. Wong Reviewed-by: Amir Goldstein Signed-off-by: Dave Chinner commit df3658361951e17364f1e1c3fa92862a990ad8bd Author: Darrick J. Wong Date: Tue Oct 30 10:42:03 2018 +1100 vfs: plumb remap flags through the vfs dedupe functions Plumb a remap_flags argument through the vfs_dedupe_file_range_one functions so that dedupe can take advantage of it. Signed-off-by: Darrick J. Wong Reviewed-by: Amir Goldstein Signed-off-by: Dave Chinner commit 452ce65951a2f0719e4e119ecca134c06cfe22ee Author: Darrick J. Wong Date: Tue Oct 30 10:41:56 2018 +1100 vfs: plumb remap flags through the vfs clone functions Plumb a remap_flags argument through the {do,vfs}_clone_file_range functions so that clone can take advantage of it. Signed-off-by: Darrick J. Wong Reviewed-by: Amir Goldstein Signed-off-by: Dave Chinner commit 42ec3d4c02187a18e27ff94b409ec27234bf2ffd Author: Darrick J. Wong Date: Tue Oct 30 10:41:49 2018 +1100 vfs: make remap_file_range functions take and return bytes completed Change the remap_file_range functions to take a number of bytes to operate upon and return the number of bytes they operated on. This is a requirement for allowing fs implementations to return short clone/dedupe results to the user, which will enable us to obey resource limits in a graceful manner. A subsequent patch will enable copy_file_range to signal to the ->clone_file_range implementation that it can handle a short length, which will be returned in the function's return value. For now the short return is not implemented anywhere so the behavior won't change -- either copy_file_range manages to clone the entire range or it tries an alternative. Neither clone ioctl can take advantage of this, alas. Signed-off-by: Darrick J. Wong Reviewed-by: Amir Goldstein Signed-off-by: Dave Chinner commit 8dde90bca6fca3736ea20109654bcf6dcf2ecf1d Author: Darrick J. Wong Date: Tue Oct 30 10:41:41 2018 +1100 vfs: remap helper should update destination inode metadata Extend generic_remap_file_range_prep to handle inode metadata updates when remapping into a file. If the operation can possibly alter the file contents, we must update the ctime and mtime and remove security privileges, just like we do for regular file writes. Signed-off-by: Darrick J. Wong Reviewed-by: Amir Goldstein Signed-off-by: Dave Chinner commit 3d28193e1df043764deb7abdaba5e3a6660bc393 Author: Darrick J. Wong Date: Tue Oct 30 10:41:34 2018 +1100 vfs: pass remap flags to generic_remap_checks Pass the same remap flags to generic_remap_checks for consistency. Signed-off-by: Darrick J. Wong Reviewed-by: Amir Goldstein Reviewed-by: Christoph Hellwig Signed-off-by: Dave Chinner commit a91ae49bbaf43910edb09e03fedf26b23875bd52 Author: Darrick J. Wong Date: Tue Oct 30 10:41:28 2018 +1100 vfs: pass remap flags to generic_remap_file_range_prep Plumb the remap flags through the filesystem from the vfs function dispatcher all the way to the prep function to prepare for behavior changes in subsequent patches. Signed-off-by: Darrick J. Wong Reviewed-by: Amir Goldstein Reviewed-by: Christoph Hellwig Signed-off-by: Dave Chinner commit 2e5dfc99f2e61c42083ba742395e7a7b353513d1 Author: Darrick J. Wong Date: Tue Oct 30 10:41:21 2018 +1100 vfs: combine the clone and dedupe into a single remap_file_range Combine the clone_file_range and dedupe_file_range operations into a single remap_file_range file operation dispatch since they're fundamentally the same operation. The differences between the two can be made in the prep functions. Signed-off-by: Darrick J. Wong Reviewed-by: Amir Goldstein Reviewed-by: Christoph Hellwig Signed-off-by: Dave Chinner commit 6095028b455d775e369ae27875f698ff0f6fdeb8 Author: Darrick J. Wong Date: Tue Oct 30 10:41:14 2018 +1100 vfs: rename clone_verify_area to remap_verify_area Since we use clone_verify_area for both clone and dedupe range checks, rename the function to make it clear that it's for both. Signed-off-by: Darrick J. Wong Reviewed-by: Amir Goldstein Signed-off-by: Dave Chinner commit a83ab01a62e61616ebb8b97f90f568c1214dc10d Author: Darrick J. Wong Date: Tue Oct 30 10:41:08 2018 +1100 vfs: rename vfs_clone_file_prep to be more descriptive The vfs_clone_file_prep is a generic function to be called by filesystem implementations only. Rename the prefix to generic_ and make it more clear that it applies to remap operations, not just clones. Signed-off-by: Darrick J. Wong Reviewed-by: Amir Goldstein Signed-off-by: Dave Chinner commit 9aae20500d9cd3e7d55d0536d359bdd1c869db89 Author: Darrick J. Wong Date: Tue Oct 30 10:41:01 2018 +1100 vfs: skip zero-length dedupe requests Don't bother calling the filesystem for a zero-length dedupe request; we can return zero and exit. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Reviewed-by: Amir Goldstein Signed-off-by: Dave Chinner commit 07d19dc9fbe9128378b9e226abe886fd8fd473df Author: Darrick J. Wong Date: Tue Oct 30 10:40:55 2018 +1100 vfs: avoid problematic remapping requests into partial EOF block A deduplication data corruption is exposed in XFS and btrfs. It is caused by extending the block match range to include the partial EOF block, but then allowing unknown data beyond EOF to be considered a "match" to data in the destination file because the comparison is only made to the end of the source file. This corrupts the destination file when the source extent is shared with it. The VFS remapping prep functions only support whole block dedupe, but we still need to appear to support whole file dedupe correctly. Hence if the dedupe request includes the last block of the souce file, don't include it in the actual dedupe operation. If the rest of the range dedupes successfully, then reject the entire request. A subsequent patch will enable us to shorten dedupe requests correctly. When reflinking sub-file ranges, a data corruption can occur when the source file range includes a partial EOF block. This shares the unknown data beyond EOF into the second file at a position inside EOF, exposing stale data in the second file. If the reflink request includes the last block of the souce file, only proceed with the reflink operation if it lands at or past the destination file's current EOF. If it lands within the destination file EOF, reject the entire request with -EINVAL and make the caller go the hard way. A subsequent patch will enable us to shorten reflink requests correctly. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Signed-off-by: Dave Chinner commit 9fd91a90cb9837372af24a804853e15c11aed93e Author: Darrick J. Wong Date: Tue Oct 30 10:40:46 2018 +1100 vfs: strengthen checking of file range inputs to generic_remap_checks File range remapping, if allowed to run past the destination file's EOF, is an optimization on a regular file write. Regular file writes that extend the file length are subject to various constraints which are not checked by range cloning. This is a correctness problem because we're never allowed to touch ranges that the page cache can't support (s_maxbytes); we're not supposed to deal with large offsets (MAX_NON_LFS) if O_LARGEFILE isn't set; and we must obey resource limits (RLIMIT_FSIZE). Therefore, add these checks to the new generic_remap_checks function so that we curtail unexpected behavior. Signed-off-by: Darrick J. Wong Reviewed-by: Amir Goldstein Reviewed-by: Christoph Hellwig Signed-off-by: Dave Chinner commit 2c5773f102c9bb07d5328467f61f0a88f2f2892d Author: Darrick J. Wong Date: Tue Oct 30 10:40:39 2018 +1100 vfs: exit early from zero length remap operations If a remap caller asks us to remap to the source file's EOF and the source file length leaves us with a zero byte request, exit early. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Signed-off-by: Dave Chinner commit 1383a7ed67490fb00d793e36c7a4d599ff88a64d Author: Darrick J. Wong Date: Tue Oct 30 10:40:31 2018 +1100 vfs: check file ranges before cloning files Move the file range checks from vfs_clone_file_prep into a separate generic_remap_checks function so that all the checks are collected in a central location. This forms the basis for adding more checks from generic_write_checks that will make cloning's input checking more consistent with write input checking. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Reviewed-by: Amir Goldstein Signed-off-by: Dave Chinner commit 5b49f64db299d0b3f7c2170088186aa593d0be7d Author: Darrick J. Wong Date: Tue Oct 30 10:40:22 2018 +1100 vfs: vfs_clone_file_prep_inodes should return EINVAL for a clone from beyond EOF vfs_clone_file_prep_inodes cannot return 0 if it is asked to remap from a zero byte file because that's what btrfs does. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Signed-off-by: Dave Chinner commit 4b42745211af552f170f38a1b97f4a112b5da6b2 Merge: b22b6beae611 f4f9554f16d0 Author: Linus Torvalds Date: Mon Oct 29 15:37:33 2018 -0700 Merge tag 'armsoc-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC platform updates from Arnd Bergmann: "A couple of platforms change hands in the MAINTAINERS file: - Linus Walleij lists himself for the ARM Reference platforms: versatile, vexpress, integrator and realview. He has been the main contributor for these for a while, and makes it official now. - Vladimir Zapolskiy takes over the LPC18xx platform from Joachim Eastwood - Manivannan Sadhasivam becomes a secondary maintainer for the Actions Semi machines - Nicolas Ferre lists updates the MAINTAINER listing for the AT91 platform: Ludovic Desroches is now a co-maintainer for the platform, and several other people (Claudiu Beznea, Cristian Birsan, Eugen Hristev, Codrin Ciubotariu) take over individual device drivers. Thanks everyone for working on this, and welcome to the new maintainers! The "virt" platform on qemy or kvm can now be used in big-endian mode without additional tricks, thanks to Jason Donenfeld. Once again, we gain support for another NXP i.MX6 variant, this time it's the i.MX 6ULZ 32-bit single-core version. On arm64, we add support for two SoCs from Renesas: RZ/G2E (r8a774c0) and RZ/G2M (r8a774a1). These are described as microcontrollers on the manufacturer website, but appear to be rather powerful. The RZ/G2M is used on the reference board for the CIP Super Long Term Support (SLTS) Linux Kernels" * tag 'armsoc-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (54 commits) MAINTAINERS: Assign myself as a maintainer of ARM/LPC18XX architecture arm64: exynos: Enable generic power domain support MAINTAINERS: remove non-exsiting email address of Baoyou MAINTAINERS: fix pattern in ARM/Synaptics berlin SoC section MAINTAINERS: Drop dt-bindings/genpd/k2g.h ARM: samsung: Limit SAMSUNG_PM_CHECK config option to non-Exynos platforms arm64: actions: Enable PINCTRL in platforms Kconfig MAINTAINERS: Add entry for Actions Semi Owl SoCs DMA driver MAINTAINERS: Add entry for Actions Semiconductor Owl I2C driver MAINTAINERS: Update clock binding entry for Actions Semi Owl SoCs ARM: imx: add i.mx6ulz msl support ARM: Assume maintainership of ARM reference designs ARM: support big-endian for the virt architecture MAINTAINERS: sdhci: move the Microchip entry to proper location MAINTAINERS: move former ATMEL entries to proper MICROCHIP location MAINTAINERS: remove the / ATMEL string from MICROCHIP entries MAINTAINERS: iio: add co-maintainer to SAMA5D2-compatible ADC driver MAINTAINERS: pwm: add entry for Microchip pwm driver MAINTAINERS: dmaengine: add files to Microchip dma entry MAINTAINERS: USB: change maintainer for Microchip USBA gadget driver ... commit b22b6beae6116e3a9c46ced312c626f6737a3fa6 Merge: 53b7a3b7ec00 c1a92909dbc2 Author: Linus Torvalds Date: Mon Oct 29 15:16:01 2018 -0700 Merge tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC driver updates from Arnd Bergmann: "The most noteworthy SoC driver changes this time include: - The TEE subsystem gains an in-kernel interface to access the TEE from device drivers. - The reset controller subsystem gains a driver for the Qualcomm Snapdragon 845 Power Domain Controller. - The Xilinx Zynq platform now has a firmware interface for its platform management unit. This contains a firmware "ioctl" interface that was a little controversial at first, but the version we merged solved that by not exposing arbitrary firmware calls to user space. - The Amlogic Meson platform gains a "canvas" driver that is used for video processing and shared between different high-level drivers. The rest is more of the usual, mostly related to SoC specific power management support and core drivers in drivers/soc: - Several Renesas SoCs (RZ/G1N, RZ/G2M, R-Car V3M, RZ/A2M) gain new features related to power and reset control. - The Mediatek mt8183 and mt6765 SoC platforms gain support for their respective power management chips. - A new driver for NXP i.MX8, which need a firmware interface for power management. - The SCPI firmware interface now contains support estimating power usage of performance states - The NVIDIA Tegra "pmc" driver gains a few new features, in particular a pinctrl interface for configuring the pads. - Lots of small changes for Qualcomm, in particular the "smem" device driver. - Some cleanups for the TI OMAP series related to their sysc controller. Additional cleanups and bugfixes in SoC specific drivers include the Meson, Keystone, NXP, AT91, Sunxi, Actions, and Tegra platforms" * tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (129 commits) firmware: tegra: bpmp: Implement suspend/resume support drivers: clk: Add ZynqMP clock driver dt-bindings: clock: Add bindings for ZynqMP clock driver firmware: xilinx: Add zynqmp IOCTL API for device control Documentation: xilinx: Add documentation for eemi APIs MAINTAINERS: imx: include drivers/firmware/imx path firmware: imx: add misc svc support firmware: imx: add SCU firmware driver support reset: Fix potential use-after-free in __of_reset_control_get() dt-bindings: arm: fsl: add scu binding doc soc: fsl: qbman: add interrupt coalesce changing APIs soc: fsl: bman_portals: defer probe after bman's probe soc: fsl: qbman: Use last response to determine valid bit soc: fsl: qbman: Add 64 bit DMA addressing requirement to QBMan soc: fsl: qbman: replace CPU 0 with any online CPU in hotplug handlers soc: fsl: qbman: Check if CPU is offline when initializing portals reset: qcom: PDC Global (Power Domain Controller) reset controller dt-bindings: reset: Add PDC Global binding for SDM845 SoCs reset: Grammar s/more then once/more than once/ bus: ti-sysc: Just use SET_NOIRQ_SYSTEM_SLEEP_PM_OPS ... commit 53b7a3b7ec00f207c18e71f58ef2bca48635c622 Merge: 93335e5911db e8c3f6322cc8 Author: Linus Torvalds Date: Mon Oct 29 15:10:45 2018 -0700 Merge tag 'armsoc-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC defconfig updates from Arnd Bergmann: "The defconfig changes are split out from the rest again. This time we have a number of changes for NXP i.MX and Renesas, including a cleanup of old options. Some smaller changes are for Socionext Uniphier, Allwinner, Qualcomm, Rockchip, Renesas, AT91, Hisilicon, and STM32. All of these just enable platform specific device drivers" * tag 'armsoc-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (40 commits) arm64: defconfig: Enable SERIAL_8250_OMAP arm64: defconfig: Enable TI_SCI related configs ARM: imx_v6_v7_defconfig: Select CONFIG_TMPFS_POSIX_ACL ARM: imx_v4_v5_defconfig: Remove unneeded options ARM: imx_v4_v5_defconfig: Re-sync defconfig ARM: mxs_defconfig: Remove unneeded options ARM: mxs_defconfig: Re-sync defconfig ARM: imx_v6_v7_defconfig: Remove unneeded options ARM: imx_v6_v7_defconfig: Re-sync defconfig ARM: imx_v6_v7_defconfig: select CONFIG_ARM_CPUIDLE by default ARM: imx_v6_v7_defconfig: Make usbnet drivers builtin for boot ARM: imx_v6_v7_defconfig: add CONFIG_FW_LOADER_USER_HELPER ARM: imx_v6_v7_defconfig: Select CONFIG_SENSORS_MC13783_ADC ARM: multi_v7_defconfig: enable CONFIG_MMC_UNIPHIER arm64: defconfig: enable CONFIG_MMC_UNIPHIER ARM: multi_v7_defconfig: Enable USB phys for UniPhier SoCs arm64: defconfig: Enable USB phys for UniPhier SoCs arm64: defconfig: enable Rockchip Innosilicon hdmiphy arm64: defconfig: Enable PCIEPORTBUS arm64: defconfig: enable HiSilicon HNS3 driver ... commit 93335e5911dbffccd3b74c4d214268c0fd2bc1b0 Merge: c38239b4be1a be59a3282cf8 Author: Linus Torvalds Date: Mon Oct 29 15:05:20 2018 -0700 Merge tag 'armsoc-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC device tree updates from Arnd Bergmann: "There are close to 800 indivudal changesets in this branch again, which feels like a lot. There are particularly many changes for the NVIDIA Tegra platform this time, in fact more than it has seen in the two years since the v4.9 merge window. Aside from this, it's been fairly normal, with lots of changes going into Renesas R-CAR, NXP i.MX, Allwinner Sunxi, Samsung Exynos, and TI OMAP. Most of the changes are for adding new features into existing boards, for brevity I'm only mentioning completely new machines and SoCs here. For the first time I think we have (slightly) more new 64-bit hardware than 32-bit: Two boards get added for TI OMAP: Moxa UC-2101 is an industrial computer, see https://www.moxa.com/product/UC-2100.htm; GTA04A5 is a minor variation of the motherboards of the GTA04 phone, see https://shop.goldelico.com/wiki.php?page=GTA04A5 Clearfog is a nice little board for quad-core Marvell Armada 8040 network processor, see https://www.solid-run.com/marvell-armada-family/clearfog-gt-8k/ Two additional server boards come with the Aspeed baseboard management controllers: Stardragon4800 is an arm64 reference platform made by HXT (based on Qualcomm's server chips), and TiogaPass is an Open Compute mainboard with x86 CPUs. Both use the ARM11 based AST2500 chips in the BMC. NXP i.MX usually sees a lot of new boards each release. This time there we only add one minor variant: ConnectCore 6UL SBC Pro uses the same SoM design as the ConnectCore 6UL SBC Express added later. However, there is a new chip, the i.MX6ULZ, which is an even smaller variant of the i.MX6ULL, with features removed. There is also support for the reference board design, the i.MX6ULZ 14x14 EVK. A new Raspberry Pi variant gets added, this one is the CM3 compute module based on bcm2837, it was launched in early 2017 but only now added to the kernel, both as 32-bit and as 64-bit files, as we tend to do for Raspberry Pi. On the Allwinner side, everything is again about cheap development boards, usually of the "Fruit Pi" variety. The new ones this time are: - Orange Pi Zero Plus2: http://www.orangepi.org/OrangePiZeroPlus2/ - Orange Pi One Plus: http://www.orangepi.org/OrangePiOneplus/ - Pine64 LTS: https://www.pine64.org/?product=pine-a64-lts - Banana Pi M2+ H5: http://www.banana-pi.org/m2plus.html The last one of these is now a 64-bit version of the earlier Banana Pi M2+ H3, with the same board layout. Similarly, for Rockchips, get get another variant of the 32-bit Asus Tinker board, the model 'S' based on rk3288, and three now boards based on the popular RK3399 chip: - ROC-RK3399-PC: https://libre.computer/products/boards/roc-rk3399-pc/ - Rock960: https://www.96boards.org/product/rock960/ - RockPro64: https://www.pine64.org/?page_id=61454 These are all quite powerful boards with lots of RAM and I/O, and the RK3399 is the same chip used in several Chromebooks. Finally, we get support for the PX30 (aka rk3326) chip, which is based on the low-end 64-bit Cortex-A35 CPU core. So far, only the evaluation board is supported. One more Banana Pi is added with a Mediatek chip: Banana Pi R64 is based on the MT7622 WiFi router platform, and the first product I've seen with a 64-bit Mediatek chip in that market: http://www.banana-pi.org/r64.html For HiSilicon, we gain support for the Hi3670 SoC and HiKey 370 development board, which are similar to the Hi3660 and Hikey 360 respectively, but add support for an NPU. Amlogic gets initial support for the Meson-G12A chip (S905D2), another quad-core Cortex-A53 SoC, and its evaluation platform. On the 32-bit side, we gain support for an actual end-user product, the Endless Computers Endless Mini based on Meson8b (S805), see https://endlessos.com/computers/ Qualcomm adds support for their MSM8998 SoC and evaluation platform. This chip is commonly known as the Snapdragon 835, and is used in high-end phones as well as low-end laptops. For Renesas, a very bare support for the r8a774a1 (RZ/G2M) is added, but no boards for this one. However, we do add boards for the previously added r8a77965 (R-Car M3-N): the M3NULCB Kingfisher and the M3NULCB Starter Kit Pro. While we have lots of DT changes for NVIDIA to update the existing files, the only board that gets added is the Toradex Colibri T20 on Colibri Evaluation Board for the old Tegra2. Synaptics add support for their AS370 SoC, which is part of the (formerly Marvell) Berlin line of set-top-box chips used e.g. in the various Google Chromecast. Only the .dtsi gets added at this point, no actual machines" * tag 'armsoc-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (721 commits) ARM: dts: socfgpa: remove ethernet aliases from dtsi arm64: dts: stratix10: add ethernet aliases dt-bindings: mediatek: Add bindig for MT7623 IOMMU and SMI dt-bindings: mediatek: Add JPEG Decoder binding for MT7623 dt-bindings: iommu: mediatek: Add binding for MT7623 dt-bindings: clock: mediatek: add support for MT7623 ARM: dts: mvebu: armada-385-db-88f6820-amc: auto-detect nand ECC properites ARM: dts: da850-lego-ev3: slow down A/DC as much as possible ARM: dts: da850-evm: Enable tca6416 on baseboard arm64: dts: uniphier: Add USB2 PHY nodes arm64: dts: uniphier: Add USB3 controller nodes ARM: dts: uniphier: Add USB2 PHY nodes ARM: dts: uniphier: Add USB3 controller nodes arm64: dts: meson-axg: s400: disable emmc arm64: dts: meson-axg: s400: add missing emmc pwrseq arm64: dts: clearfog-gt-8k: add PCIe slot description ARM: dts: at91: sama5d4_xplained: even nand memory partitions ARM: dts: at91: sama5d3_xplained: even nand memory partitions ARM: dts: at91: at91sam9x5cm: even nand memory partitions ARM: dts: at91: sama5d2_ptc_ek: fix bootloader env offsets ... commit c38239b4be1ac7e4bcf5bbd971353bae51525b8f Merge: 57dbde63f288 c9fa406f62ec Author: Linus Torvalds Date: Mon Oct 29 15:02:40 2018 -0700 Merge branch 'parisc-4.20-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux Pull parisc updates from Helge Deller: "Three small patches: - A boot fix for A500 machines, crash was caused by the new alternative patching code from this merge window (Dave) - Change __kernel_suseconds_t to match glibc on 64-bit parisc (Arnd) - Use constants instead of hard-coded numbers (me)" * 'parisc-4.20-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: parisc: Fix A500 boot crash parisc: Use LINUX_GATEWAY_SPACE constant in entry.S parisc64: change __kernel_suseconds_t to match glibc commit 57dbde63f2888af1be5111d369d124f4e659c0f8 Merge: 134bf98c5596 84de6e96e036 Author: Linus Torvalds Date: Mon Oct 29 14:44:03 2018 -0700 Merge branch 'i2c/for-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c updates from Wolfram Sang: "I2C has not so much stuff this time. Mostly driver enablement for new SoCs, some driver bugfixes, and some cleanups" * 'i2c/for-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (35 commits) MAINTAINERS: add maintainer for Renesas RIIC driver i2c: sh_mobile: Remove dummy runtime PM callbacks i2c: uniphier-f: fix race condition when IRQ is cleared i2c: uniphier-f: fix occasional timeout error i2c: uniphier-f: make driver robust against concurrency i2c: i2c-qcom-geni: Simplify irq handler i2c: i2c-qcom-geni: Simplify tx/rx functions i2c: designware: Set IRQF_NO_SUSPEND flag for all BYT and CHT controllers i2c: mux: mlxcpld: simplify code to reach the adapter i2c: mux: ltc4306: simplify code to reach the adapter i2c: mux: pca954x: simplify code to reach the adapter i2c: core: remove level of indentation in i2c_transfer i2c: core: remove outdated DEBUG output i2c: zx2967: use core to detect 'no zero length' quirk i2c: tegra: use core to detect 'no zero length' quirk i2c: qup: use core to detect 'no zero length' quirk i2c: omap: use core to detect 'no zero length' quirk i2c: Convert to using %pOFn instead of device_node.name i2c: brcmstb: Allow enabling the driver on DSL SoCs eeprom: at24: fix unexpected timeout under high load ... commit 917e2fd2c53eb3c4162f5397555cbd394390d4bc Author: Anton Ivanov Date: Tue Sep 25 08:47:13 2018 +0100 um: Make line/tty semantics use true write IRQ This fixes a long standing bug where large amounts of output could freeze the tty (most commonly seen on stdio console). While the bug has always been there it became more pronounced after moving to the new interrupt controller. The line semantics are now changed to have true IRQ write semantics which should further improve the tty/line subsystem stability and performance Signed-off-by: Anton Ivanov Signed-off-by: Richard Weinberger commit 59fdf91d90e62cc4e2f665d7de963c0d385afd09 Author: Colin Ian King Date: Fri Oct 26 19:02:47 2018 +0100 um: trap: 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: Richard Weinberger commit 9ca19a3a3e2482916c475b90f3d7fa2a03d8e5ed Author: Ritesh Raj Sarraf Date: Thu Sep 20 11:56:38 2018 +0530 um: Don't hardcode path as it is architecture dependent The current code fails to run on amd64 because of hardcoded reference to i386 Signed-off-by: Ritesh Raj Sarraf Signed-off-by: Richard Weinberger commit 134bf98c5596605af90f104716ef912e8f7eb56b Merge: 044ee8902861 3b796aa60af0 Author: Linus Torvalds Date: Mon Oct 29 14:29:58 2018 -0700 Merge tag 'media/v4.20-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media updates from Mauro Carvalho Chehab: - new dvb frontend driver: lnbh29 - new sensor drivers: imx319 and imx 355 - some old soc_camera driver renames to avoid conflict with new drivers - new i.MX Pixel Pipeline (PXP) mem-to-mem platform driver - a new V4L2 frontend for the FWHT codec - several other improvements, bug fixes, code cleanups, etc * tag 'media/v4.20-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (289 commits) media: rename soc_camera I2C drivers media: cec: forgot to cancel delayed work media: vivid: Support 480p for webcam capture media: v4l2-tpg: fix kernel oops when enabling HFLIP and OSD media: vivid: Add 16-bit bayer to format list media: v4l2-tpg-core: Add 16-bit bayer media: pvrusb2: replace `printk` with `pr_*` media: venus: vdec: fix decoded data size media: cx231xx: fix potential sign-extension overflow on large shift media: dt-bindings: media: rcar_vin: add device tree support for r8a7744 media: isif: fix a NULL pointer dereference bug media: exynos4-is: make const array config_ids static media: cx23885: make const array addr_list static media: ivtv: make const array addr_list static media: bttv-input: make const array addr_list static media: cx18: Don't check for address of video_dev media: dw9807-vcm: Fix probe error handling media: dw9714: Remove useless error message media: dw9714: Fix error handling in probe function media: cec: name for RC passthrough device does not need 'RC for' ... commit d312a25d477519d5d47f8ce850e80b52cf4113b0 Author: YueHaibing Date: Fri Aug 3 14:39:11 2018 +0800 um: NULL check before kfree is not needed kfree(NULL) is safe,so this removes NULL check before freeing the mem Signed-off-by: YueHaibing Signed-off-by: Richard Weinberger commit 369cca266860db8222c991fced8caa42c3e5b05f Author: Christoph Hellwig Date: Wed Jul 11 09:32:39 2018 +0200 um: remove unused AIO code Signed-off-by: Christoph Hellwig Signed-off-by: Richard Weinberger commit 7ff1e34bbdc15acab823b1ee4240e94623d50ee8 Author: Richard Weinberger Date: Fri Jun 15 16:42:56 2018 +0200 um: Give start_idle_thread() a return code Fixes: arch/um/os-Linux/skas/process.c:613:1: warning: control reaches end of non-void function [-Wreturn-type] longjmp() never returns but gcc still warns that the end of the function can be reached. Add a return code and debug aid to detect this impossible case. Signed-off-by: Richard Weinberger commit 3033998bb8cd5a109c3171f4cde62665e3f5ce63 Author: Richard Weinberger Date: Fri Jun 15 16:42:55 2018 +0200 um: Remove update_debugregs() This function is nowhere used, let's get rid of it. Signed-off-by: Richard Weinberger commit 0676b957c24bfb6e495449ba7b7e72c5b5d79233 Author: Richard Weinberger Date: Fri Jun 15 16:42:54 2018 +0200 um: Drop own definition of PTRACE_SYSEMU/_SINGLESTEP 32bit UML used to define PTRACE_SYSEMU and PTRACE_SYSEMU_SINGLESTEP own its own because many years ago not all libcs had these request codes in their UAPI. These days PTRACE_SYSEMU/_SINGLESTEP is well known and part of glibc and our own define becomes problematic. With change c48831d0eebf ("linux/x86: sync sys/ptrace.h with Linux 4.14 [BZ #22433]") glibc turned PTRACE_SYSEMU/_SINGLESTEP into a enum and UML failed to build. Let's drop our define and rely on the fact that every libc has PTRACE_SYSEMU/_SINGLESTEP. Cc: Cc: Ritesh Raj Sarraf Reported-and-tested-by: Ritesh Raj Sarraf Signed-off-by: Richard Weinberger commit 93f38b6fae0ea8987e22d9e6c38f8dfdccd867ee Author: Amir Goldstein Date: Fri Sep 28 20:41:48 2018 +0300 lockd: fix access beyond unterminated strings in prints printk format used %*s instead of %.*s, so hostname_len does not limit the number of bytes accessed from hostname. Signed-off-by: Amir Goldstein Cc: stable@vger.kernel.org Signed-off-by: J. Bruce Fields commit bb6ad5572c0022e17e846b382d7413cdcf8055be Author: Trond Myklebust Date: Tue Oct 9 15:54:15 2018 -0400 nfsd: Fix an Oops in free_session() In call_xpt_users(), we delete the entry from the list, but we do not reinitialise it. This triggers the list poisoning when we later call unregister_xpt_user() in nfsd4_del_conns(). Signed-off-by: Trond Myklebust Cc: stable@vger.kernel.org Signed-off-by: J. Bruce Fields commit bd8d725078867cda250fe94b9c5a067b4a64ca74 Author: Andrew Elble Date: Fri Oct 5 09:32:08 2018 -0400 nfsd: correctly decrement odstate refcount in error path alloc_init_deleg() both allocates an nfs4_delegation, and bumps the refcount on odstate. So after this point, we need to put_clnt_odstate() and nfs4_put_stid() to not leave the odstate refcount inappropriately bumped. Signed-off-by: Andrew Elble Reviewed-by: Jeff Layton Cc: stable@vger.kernel.org Signed-off-by: J. Bruce Fields commit 3ae2cefb613b00d613677c05ffa384b4f660f468 Author: Chuck Lever Date: Mon Oct 1 14:16:11 2018 -0400 svcrdma: Increase the default connection credit limit Reduce queuing on clients by allowing more credits by default. 64 is the default NFSv4.1 slot table size on Linux clients. This size prevents the credit limit from putting RPC requests to sleep again after they have already slept waiting for a session slot. Signed-off-by: Chuck Lever Reviewed-by: Sagi Grimberg Signed-off-by: J. Bruce Fields commit 07880fa4968b07db9df0f126bb7fbde245ed12ff Author: Chuck Lever Date: Mon Oct 1 14:16:06 2018 -0400 svcrdma: Remove try_module_get 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 try_module_get() call in the backchannel code is no longer necessary. Signed-off-by: Chuck Lever Reviewed-by: Sagi Grimberg Signed-off-by: J. Bruce Fields commit 596f2a1950437095fee3062b75935c3bfdda0289 Author: Chuck Lever Date: Mon Oct 1 14:16:01 2018 -0400 svcrdma: Remove ->release_rqst call in bc reply handler Similar to a change made in the client's forward channel reply handler: The xprt_release_rqst_cong() call is not necessary. Also, release xprt->recv_lock when taking xprt->transport_lock to avoid disabling and enabling BH's while holding another spin lock. Signed-off-by: Chuck Lever Reviewed-by: Sagi Grimberg Signed-off-by: J. Bruce Fields commit f3c1fd0ee294abd4367dfa72d89f016c682202f0 Author: Chuck Lever Date: Mon Oct 1 14:15:56 2018 -0400 svcrdma: Reduce max_send_sges There's no need to request a large number of send SGEs because the inline threshold already constrains the number of SGEs per Send. Signed-off-by: Chuck Lever Reviewed-by: Sagi Grimberg Signed-off-by: J. Bruce Fields commit 0ac203cb1f03734606c0674eded43aaefb5a491a Author: Gustavo A. R. Silva Date: Tue Oct 2 12:08:48 2018 +0200 nfsd: fix fall-through annotations Replace "fallthru" with a proper "fall through" annotation. Also, add an annotation were it is expected to fall through. These fixes are part of the ongoing efforts to enabling -Wimplicit-fallthrough Signed-off-by: Gustavo A. R. Silva Signed-off-by: J. Bruce Fields commit 736c6625de666f3fd0b47428f10568154033151a Author: Trond Myklebust Date: Mon Oct 1 10:41:57 2018 -0400 knfsd: Improve lookup performance in the duplicate reply cache using an rbtree Use an rbtree to ensure the lookup/insert of an entry in a DRC bucket is O(log(N)). Signed-off-by: Trond Myklebust Signed-off-by: J. Bruce Fields commit ed00c2f65267f3a5a8727ac74a90d32470f91679 Author: Trond Myklebust Date: Wed Oct 3 13:11:51 2018 -0400 knfsd: Further simplify the cache lookup Order the structure so that the key can be compared using memcmp(). Signed-off-by: Trond Myklebust Signed-off-by: J. Bruce Fields commit 76ecec21197ab23bb821d8bf584949013efd0494 Author: Trond Myklebust Date: Mon Oct 1 10:41:55 2018 -0400 knfsd: Simplify NFS duplicate replay cache Simplify the duplicate replay cache by initialising the preallocated cache entry, so that we can use it as a key for the cache lookup. Note that the 99.999% case we want to optimise for is still the one where the lookup fails, and we have to add this entry to the cache, so preinitialising should not cause a performance penalty. Signed-off-by: Trond Myklebust Signed-off-by: J. Bruce Fields commit 3e87da5145fc25e18fb934eb496f4e7c4d038e71 Author: Trond Myklebust Date: Mon Oct 1 10:41:54 2018 -0400 knfsd: Remove dead code from nfsd_cache_lookup The preallocated cache entry is always set to type RC_NOCACHE, and that type isn't changed until we later call nfsd_cache_update(). Signed-off-by: Trond Myklebust Signed-off-by: J. Bruce Fields commit 4c8e5537bb28f0e4b2ca60ecb0ca1ea12b82adf6 Author: Trond Myklebust Date: Mon Oct 1 10:41:53 2018 -0400 SUNRPC: Simplify TCP receive code Use the fact that the iov iterators already have functionality for skipping a base offset. Signed-off-by: Trond Myklebust Signed-off-by: J. Bruce Fields commit 1863d77f15da0addcd293a1719fa5d3ef8cde3ca Author: Trond Myklebust Date: Mon Oct 1 10:41:52 2018 -0400 SUNRPC: Replace the cache_detail->hash_lock with a regular spinlock Now that the reader functions are all RCU protected, use a regular spinlock rather than a reader/writer lock. Signed-off-by: Trond Myklebust Signed-off-by: J. Bruce Fields commit d48cf356a13073853f19be6ca5ebbecfc2762ebe Author: Trond Myklebust Date: Mon Oct 1 10:41:51 2018 -0400 SUNRPC: Remove non-RCU protected lookup Clean up the cache code by removing the non-RCU protected lookup. Signed-off-by: Trond Myklebust Signed-off-by: J. Bruce Fields commit a6482733bc98aa04b44c91e744bbcbfb29f8d3ee Author: Trond Myklebust Date: Fri Oct 5 10:27:20 2018 -0400 NFS: Fix up a typo in nfs_dns_ent_put call_rcu() needs to take a first argument of type (struct rcu_head *). Fixes: fd497f1e40d9 ("NFS: Lockless DNS lookups") Signed-off-by: Trond Myklebust Signed-off-by: J. Bruce Fields commit 437f91451349a94d581cb9a928fa3958153f0b71 Author: Trond Myklebust Date: Mon Oct 1 10:41:50 2018 -0400 NFS: Lockless DNS lookups Enable RCU protected lookup in the legacy DNS resolver. Signed-off-by: Trond Myklebust Signed-off-by: J. Bruce Fields commit 9d5afd9491c80779730686159aeec7fa06ead085 Author: Trond Myklebust Date: Mon Oct 1 10:41:49 2018 -0400 knfsd: Lockless lookup of NFSv4 identities. Enable RCU protected lookups of the NFSv4 idmap. Signed-off-by: Trond Myklebust Signed-off-by: J. Bruce Fields commit 6d1616b26cd91f2502111d098cd9c288dbafe5c8 Author: Trond Myklebust Date: Mon Oct 1 10:41:48 2018 -0400 SUNRPC: Lockless server RPCSEC_GSS context lookup Use RCU protection for looking up the RPCSEC_GSS context. Signed-off-by: Trond Myklebust Signed-off-by: J. Bruce Fields commit 9ceddd9da13434a5906255c0fc528c385aded283 Author: Trond Myklebust Date: Mon Oct 1 10:41:47 2018 -0400 knfsd: Allow lockless lookups of the exports Convert structs svc_expkey and svc_export to allow RCU protected lookups. Signed-off-by: Trond Myklebust Signed-off-by: J. Bruce Fields commit fd5d2f78261bedd3a40feb1474323fddb88398b8 Author: Trond Myklebust Date: Mon Oct 1 10:41:46 2018 -0400 SUNRPC: Make server side AUTH_UNIX use lockless lookups Convert structs ip_map and unix_gid to use RCU protected lookups. Signed-off-by: Trond Myklebust Signed-off-by: J. Bruce Fields commit ae74136b4bb64440a55117e12065b8c282ab6c1a Author: Trond Myklebust Date: Wed Oct 3 12:01:22 2018 -0400 SUNRPC: Allow cache lookups to use RCU protection rather than the r/w spinlock Instead of the reader/writer spinlock, allow cache lookups to use RCU for looking up entries. This is more efficient since modifications can occur while other entries are being looked up. Note that for now, we keep the reader/writer spinlock until all users have been converted to use RCU-safe freeing of their cache entries. Signed-off-by: Trond Myklebust Signed-off-by: J. Bruce Fields commit 84de6e96e036dcfb18dded04a506b1dd72ba0e5b Author: Chris Brandt Date: Fri Oct 26 14:57:10 2018 -0500 MAINTAINERS: add maintainer for Renesas RIIC driver The RIIC I2C controller is used in Renesas RZ/A SoCs. Signed-off-by: Chris Brandt [wsa: added documentation file] Signed-off-by: Wolfram Sang commit 7ce6c65b617e64d310fcf18b35e29fd4d28b9c4f Author: Jarkko Nikula Date: Wed Oct 24 16:51:32 2018 +0300 i2c: sh_mobile: Remove dummy runtime PM callbacks Platform drivers don't need dummy runtime PM callbacks that just return success and non-NULL pm pointer in their struct device_driver in order to have runtime PM happening. This has changed since following commits: 05aa55dddb9e ("PM / Runtime: Lenient generic runtime pm callbacks") 543f2503a956 ("PM / platform_bus: Allow runtime PM by default") 8b313a38ecff ("PM / Platform: Use generic runtime PM callbacks directly") Signed-off-by: Jarkko Nikula Reviewed-by: Wolfram Sang Signed-off-by: Wolfram Sang commit eaba68785c2d24ebf1f0d46c24e11b79cc2f94c7 Author: Masahiro Yamada Date: Tue Oct 16 12:01:49 2018 +0900 i2c: uniphier-f: fix race condition when IRQ is cleared The current IRQ handler clears all the IRQ status bits when it bails out. This is dangerous because it might clear away the status bits that have just been set while processing the current handler. If this happens, the IRQ event for the latest transfer is lost forever. The IRQ status bits must be cleared *before* the next transfer is kicked. Fixes: 6a62974b667f ("i2c: uniphier_f: add UniPhier FIFO-builtin I2C driver") Signed-off-by: Masahiro Yamada Signed-off-by: Wolfram Sang commit 39226aaa85f002d695e3cafade3309e12ffdaecd Author: Masahiro Yamada Date: Tue Oct 16 12:01:48 2018 +0900 i2c: uniphier-f: fix occasional timeout error Currently, a timeout error could happen at a repeated START condition. For a (non-repeated) START condition, the controller starts sending data when the UNIPHIER_FI2C_CR_STA bit is set. However, for a repeated START condition, the hardware starts running when the slave address is written to the TX FIFO - the write to the UNIPHIER_FI2C_CR register is actually unneeded. Because the hardware is already running before the IRQ is enabled for a repeated START, the driver may miss the IRQ event. In most cases, this problem does not show up since modern CPUs are much faster than the I2C transfer. However, it is still possible that a context switch happens after the controller starts, but before the IRQ register is set up. To fix this, - Do not write UNIPHIER_FI2C_CR for repeated START conditions. - Enable IRQ *before* writing the slave address to the TX FIFO. - Disable IRQ for the current CPU while queuing up the TX FIFO; If the CPU is interrupted by some task, the interrupt handler might be invoked due to the empty TX FIFO before completing the setup. Fixes: 6a62974b667f ("i2c: uniphier_f: add UniPhier FIFO-builtin I2C driver") Signed-off-by: Masahiro Yamada Signed-off-by: Wolfram Sang commit f1fdcbbdf45d9609f3d4063b67e9ea941ba3a58f Author: Masahiro Yamada Date: Tue Oct 16 12:01:47 2018 +0900 i2c: uniphier-f: make driver robust against concurrency This is unlikely to happen, but it is possible for a CPU to enter the interrupt handler just after wait_for_completion_timeout() has expired. If this happens, the hardware is accessed from multiple contexts concurrently. Disable the IRQ after wait_for_completion_timeout(), and do nothing from the handler when the IRQ is disabled. Fixes: 6a62974b667f ("i2c: uniphier_f: add UniPhier FIFO-builtin I2C driver") Signed-off-by: Masahiro Yamada Signed-off-by: Wolfram Sang commit a560ae55dcc3ae43c0c5764c745d3d1f0257beee Merge: a676973e4501 7451dc608564 Author: Wolfram Sang Date: Mon Oct 29 18:52:46 2018 +0000 Merge branch 'i2c-mux/for-next' of https://github.com/peda-r/i2c-mux into i2c/for-4.20-fixed commit 044ee890286153a1aefb40cb8b6659921aecb38b Author: Linus Torvalds Date: Mon Oct 29 11:25:24 2018 -0700 HID: input: simplify/fix high-res scroll event handling Commit 1ff2e1a44e02 ("HID: input: Create a utility class for counting scroll events") created the helper function hid_scroll_counter_handle_scroll() to handle high-res scroll events and also expose them as regular wheel events. But the resulting algorithm was unstable, and causes scrolling to be very unreliable. When you hit the half-way mark of the highres multiplier, small highres movements will incorrectly translate into big traditional wheel movements, causing odd jitters. Simplify the code and make the output stable. NOTE! I'm pretty sure this will need further tweaking. But this at least turns a unusable mouse wheel on my Logitech MX Anywhere 2S into a usable one. Cc: Jiri Kosina Cc: Harry Cutts Cc: Benjamin Tissoires Cc: Peter Hutterer Signed-off-by: Linus Torvalds commit f77084d96355f5fba8e2c1fb3a51a393b1570de7 Author: Sebastian Andrzej Siewior Date: Wed Oct 17 12:34:32 2018 +0200 x86/mm/pat: Disable preemption around __flush_tlb_all() The WARN_ON_ONCE(__read_cr3() != build_cr3()) in switch_mm_irqs_off() triggers every once in a while during a snapshotted system upgrade. The warning triggers since commit decab0888e6e ("x86/mm: Remove preempt_disable/enable() from __native_flush_tlb()"). The callchain is: get_page_from_freelist() -> post_alloc_hook() -> __kernel_map_pages() with CONFIG_DEBUG_PAGEALLOC enabled. Disable preemption during CR3 reset / __flush_tlb_all() and add a comment why preemption has to be disabled so it won't be removed accidentaly. Add another preemptible() check in __flush_tlb_all() to catch callers with enabled preemption when PGE is enabled, because PGE enabled does not trigger the warning in __native_flush_tlb(). Suggested by Andy Lutomirski. Fixes: decab0888e6e ("x86/mm: Remove preempt_disable/enable() from __native_flush_tlb()") Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Cc: Andy Lutomirski Cc: Dave Hansen Cc: Peter Zijlstra Cc: Borislav Petkov Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20181017103432.zgv46nlu3hc7k4rq@linutronix.de commit 8af1909580595a303b03d5999e410d407b7a6db7 Author: Juergen Gross Date: Mon Oct 29 16:01:16 2018 +0100 x86/paravirt: Remove GPL from pv_ops export Commit 5c83511bdb9832 ("x86/paravirt: Use a single ops structure") introduced a regression for out-of-tree modules using spinlocks, as pv_lock_ops was exported via EXPORT_SYMBOL(), while the new pv_ops structure now containing the pv lock operations is exported via EXPORT_SYMBOL_GPL(). Change that by using EXPORT_SYMBOL(pv_ops). Fixes: 5c83511bdb9832 ("x86/paravirt: Use a single ops structure") Signed-off-by: Juergen Gross Signed-off-by: Thomas Gleixner Cc: xen-devel@lists.xenproject.org Cc: virtualization@lists.linux-foundation.org Cc: akataria@vmware.com Cc: rusty@rustcorp.com.au Cc: boris.ostrovsky@oracle.com Cc: hpa@zytor.com Link: https://lkml.kernel.org/r/20181029150116.25372-1-jgross@suse.com commit 5bd4af34a09a381a0f8b1552684650698937e6b0 Merge: 738b04fba18d 59eaeba63a17 Author: Linus Torvalds Date: Mon Oct 29 10:42:20 2018 -0700 Merge tag 'tty-4.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pull tty/serial updates from Greg KH: "Here is the big tty and serial pull request for 4.20-rc1 Lots of little things here, including a merge from the SPI tree in order to keep things simpler for everyone to sync around for one platform. Major stuff is: - tty buffer clearing after use - atmel_serial fixes and additions - xilinx uart driver updates and of course, lots of tiny fixes and additions to individual serial drivers. All of these have been in linux-next with no reported issues for a while" * tag 'tty-4.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (66 commits) of: base: Change logic in of_alias_get_alias_list() of: base: Fix english spelling in of_alias_get_alias_list() serial: sh-sci: do not warn if DMA transfers are not supported serial: uartps: Do not allow use aliases >= MAX_UART_INSTANCES tty: check name length in tty_find_polling_driver() serial: sh-sci: Add r8a77990 support tty: wipe buffer if not echoing data tty: wipe buffer. serial: fsl_lpuart: Remove the alias node dependence TTY: sn_console: Replace spin_is_locked() with spin_trylock() Revert "serial:serial_core: Allow use of CTS for PPS line discipline" serial: 8250_uniphier: add auto-flow-control support serial: 8250_uniphier: flatten probe function serial: 8250_uniphier: remove unused "fifo-size" property dt-bindings: serial: sh-sci: Document r8a7744 bindings serial: uartps: Fix missing unlock on error in cdns_get_id() tty/serial: atmel: add ISO7816 support tty/serial_core: add ISO7816 infrastructure serial:serial_core: Allow use of CTS for PPS line discipline serial: docs: Fix filename for serial reference implementation ... commit 738b04fba18d35cd352b7b15afefb8a7b798648e Merge: fe675d4d3c6b 4ab7e05dd070 Author: Linus Torvalds Date: Mon Oct 29 10:38:10 2018 -0700 Merge tag 'staging-4.20-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.20-rc1. There are lots of things here, we ended up adding more lines than removing, thanks to a large influx of Comedi National Instrument device support. Someday soon we need to get comedi out of staging... Other than the comedi drivers, the "big" things here are: - new iio drivers - delete dgnc driver (no one used it and no one had the hardware anymore) - vbox driver updates and fixes - erofs fixes - tons and tons of tiny checkpatch fixes for almost all staging drivers All of these have been in linux-next, with the last few happening a bit "late" due to them getting stuck on my laptop during travel to the Mantainers summit" * tag 'staging-4.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (690 commits) staging: gasket: Fix sparse "incorrect type in assignment" warnings. staging: gasket: remove debug logs for callback invocation staging: gasket: remove debug logs in page table mapping calls staging: rtl8188eu: core: Use sizeof(*p) instead of sizeof(struct P) for memory allocation staging: ks7010: Remove extra blank line staging: gasket: Remove extra blank line staging: media: davinci_vpfe: Fix spelling mistake in enum staging: speakup: Add a pair of braces staging: wlan-ng: Replace long int with long staging: MAINTAINERS: remove obsolete IPX staging directory staging: MAINTAINERS: remove NCP filesystem entry staging: rtl8188eu: cleanup comparsions to false staging: gasket: Update device virtual address comment staging: gasket: sysfs: fix attribute release comment staging: gasket: apex: fix sysfs_show staging: gasket: page_table: simplify gasket_components_to_dev_address staging: gasket: page_table: fix comment in components_to_dev_address staging: gasket: page table: fixup error path allocating coherent mem staging: gasket: page_table: rearrange gasket_page_table_entry staging: gasket: page_table: remove unnecessary PTE status set to free ... commit fe675d4d3c6b96710d481346821839b4a817c672 Merge: e64433d58763 9f0a0a381c5d Author: Linus Torvalds Date: Mon Oct 29 10:30:44 2018 -0700 Merge tag 'mailbox-v4.20' of git://git.linaro.org/landing-teams/working/fujitsu/integration Pull mailbox updates from Jassi Brar: - convert print users to use the %pOFn format specifier - enable ti-msgmr driver for the K3 platform as well - add QCS404 to compatible list of QCOM's APCS IPC driver - minor spelling fixes toogle -> toggle - kzalloc failure catch in Mediatek driver * tag 'mailbox-v4.20' of git://git.linaro.org/landing-teams/working/fujitsu/integration: mailbox: mediatek: Add check for possible failure of kzalloc mailbox: bcm-flexrm-mailbox: fix spelling mistake "toogle" -> "toggle" mailbox: qcom: Add QCS404 APPS Global compatible drivers: mailbox: Make ti-msgmr driver depend on ARCH_K3 mailbox: Convert to using %pOFn instead of device_node.name commit e64433d587635140fda898365978e6b6fe73ba4e Merge: 79257514f532 2aad26fa0a3d Author: Linus Torvalds Date: Mon Oct 29 10:23:36 2018 -0700 Merge tag 'filesystems_for_v4.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs Pull ext2 and udf updates from Jan Kara: "Small ext2 cleanups and a couple of udf fixes" * tag 'filesystems_for_v4.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: ext2: remove redundant building macro check udf: Drop pack pragma from udf_sb.h udf: Drop freed bitmap / table support udf: Fix crash during mount udf: Prevent write-unsupported filesystem to be remounted read-write ext2: cache NULL when both default_acl and acl are NULL udf: remove unused variables group_start and nr_groups commit 79257514f532bd6e500267a061ae2cae4e3d28d5 Merge: 7da4221b530f 721fb6fbfd21 Author: Linus Torvalds Date: Mon Oct 29 09:19:53 2018 -0700 Merge tag 'for_v4.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs Pull fsnotify updates from Jan Kara: "Amir's patches to implement superblock fanotify watches, Xiaoming's patch to enable reporting of thread IDs in fanotify events instead of TGIDs (sadly the patch got mis-attributed to Amir and I've noticed only now), and a fix of possible oops on umount caused by fsnotify infrastructure" * tag 'for_v4.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: fsnotify: Fix busy inodes during unmount fs: group frequently accessed fields of struct super_block together fanotify: support reporting thread id instead of process id fanotify: add BUILD_BUG_ON() to count the bits of fanotify constants fsnotify: convert runtime BUG_ON() to BUILD_BUG_ON() fanotify: deprecate uapi FAN_ALL_* constants fanotify: simplify handling of FAN_ONDIR fsnotify: generalize handling of extra event flags fanotify: fix collision of internal and uapi mark flags fanotify: store fanotify_init() flags in group's fanotify_data fanotify: add API to attach/detach super block mark fsnotify: send path type events to group with super block marks fsnotify: add super block object type commit 7da4221b530f0427cc09bdaa5c5c1bd86d30583d Merge: 673c790e7282 fb488fc1f2b4 Author: Linus Torvalds Date: Mon Oct 29 09:09:47 2018 -0700 Merge tag '9p-for-4.20' of git://github.com/martinetd/linux Pull 9p updates from Dominique Martinet: "Highlights this time around are the end of Matthew's work to remove the custom 9p request cache and use a slab directly for requests, with some extra patches on my end to not degrade performance, but it's a very good cleanup. Tomas and I fixed a few more syzkaller bugs (refcount is the big one), and I had a go at the coverity bugs and at some of the bugzilla reports we had open for a while. I'm a bit disappointed that I couldn't get much reviews for a few of my own patches, but the big ones got some and it's all been soaking in linux-next for quite a while so I think it should be OK. Summary: - Finish removing the custom 9p request cache mechanism - Embed part of the fcall in the request to have better slab performance (msize usually is power of two aligned) - syzkaller fixes: * add a refcount to 9p requests to avoid use after free * a few double free issues - A few coverity fixes - Some old patches that were in the bugzilla: * do not trust pdu content for size header * mount option for lock retry interval" * tag '9p-for-4.20' of git://github.com/martinetd/linux: (21 commits) 9p/trans_fd: put worker reqs on destroy 9p/trans_fd: abort p9_read_work if req status changed 9p: potential NULL dereference 9p locks: fix glock.client_id leak in do_lock 9p: p9dirent_read: check network-provided name length 9p/rdma: remove useless check in cm_event_handler 9p: acl: fix uninitialized iattr access 9p locks: add mount option for lock retry interval 9p: do not trust pdu content for stat item size 9p: Rename req to rreq in trans_fd 9p: fix spelling mistake in fall-through annotation 9p/rdma: do not disconnect on down_interruptible EAGAIN 9p: Add refcount to p9_req_t 9p: rename p9_free_req() function 9p: add a per-client fcall kmem_cache 9p: embed fcall in req to round down buffer allocs 9p: Remove p9_idpool 9p: Use a slab for allocating requests 9p: clear dangling pointers in p9stat_free v9fs_dir_readdir: fix double-free on p9stat_read error ... commit 673c790e72822ee433931ea701e4fceef75a0eac Merge: 83e7e5b54417 381fdd62c383 Author: Linus Torvalds Date: Mon Oct 29 09:04:26 2018 -0700 Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu Pull m68k nommu fix from Greg Ungerer: "Only a single change to fix an out of bounds array access when parsing boot command line" * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu: m68k: fix command-line parsing when passed from u-boot commit 83e7e5b54417e20aea7ce571a19af331a539027e Merge: ac435075892e 58c116fb7dc6 Author: Linus Torvalds Date: Mon Oct 29 09:02:15 2018 -0700 Merge tag 'm68k-for-v4.20-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k Pull m68k updates from Geert Uytterhoeven: "Just two small cleanups" * tag 'm68k-for-v4.20-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k: m68k/sun3: Remove is_medusa and m68k_pgtable_cachemode m68k/atari: ARAnyM - Remove reference to long-deprecated MODULE_PARM commit ac237c28d5ac1b241d58b1b7b4b9fa10efb22fb5 Author: Alex Stanoev Date: Sun Oct 28 16:55:12 2018 +0000 ALSA: ca0106: Disable IZD on SB0570 DAC to fix audio pops The Creative Audigy SE (SB0570) card currently exhibits an audible pop whenever playback is stopped or resumed, or during silent periods of an audio stream. Initialise the IZD bit to the 0 to eliminate these pops. The Infinite Zero Detection (IZD) feature on the DAC causes the output to be shunted to Vcap after 2048 samples of silence. This discharges the AC coupling capacitor through the output and causes the aforementioned pop/click noise. The behaviour of the IZD bit is described on page 15 of the WM8768GEDS datasheet: "With IZD=1, applying MUTE for 1024 consecutive input samples will cause all outputs to be connected directly to VCAP. This also happens if 2048 consecutive zero input samples are applied to all 6 channels, and IZD=0. It will be removed as soon as any channel receives a non-zero input". I believe the second sentence might be referring to IZD=1 instead of IZD=0 given the observed behaviour of the card. This change should make the DAC initialisation consistent with Creative's Windows driver, as this popping persists when initialising the card in Linux and soft rebooting into Windows, but is not present on a cold boot to Windows. Signed-off-by: Alex Stanoev Cc: Signed-off-by: Takashi Iwai commit 8f054b6f53ff34fb787bde4c5940f86a9c175177 Author: Douglas Anderson Date: Thu Oct 25 15:21:34 2018 -0700 drm/panel: simple: Innolux TV123WAM is actually P120ZDG-BF1 As far as I can tell the panel that was added in commit da50bd4258db ("drm/panel: simple: Add Innolux TV123WAM panel driver support") wasn't actually an Innolux TV123WAM but was actually an Innolux P120ZDG-BF1. As far as I can tell the Innolux TV123WAM isn't a real panel and but it's a mosh between the TI TV123WAM and the Innolux P120ZDG-BF1. Let's unmosh. Here's my evidence: * Searching for TV123WAM on the Internet turns up a TI panel. While it's possible that an Innolux panel has the same model number as the TI Panel, it seems a little doubtful. Looking up the datasheet from the TI Panel shows that it's 1920 x 1280 and 259.2 mm x 172.8 mm. * As far as I know, the patch adding the Innolux Panel was supposed to be for the board that's sitting in front of me as I type this (support for that board is not yet upstream). On the back of that panel I see Innolux P120ZDZ-EZ1 rev B1. * Someone pointed me at a datasheet that's supposed to be for the panel in front of me (sorry, I can't share the datasheet). That datasheet has the string "p120zdg-bf1" * If I search for "P120ZDG-BF1" on the Internet I get hits for panels that are 2160x1440. They don't have datasheets, but the fact that the resolution matches is a good sign. In any case, let's update the name and also the physical size to match the correct panel. Fixes: da50bd4258db ("drm/panel: simple: Add Innolux TV123WAM panel driver support") Cc: Sandeep Panda Reviewed-by: Abhinav Kumar Reviewed-by: Sean Paul Signed-off-by: Douglas Anderson Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20181025222134.174583-6-dianders@chromium.org commit c0e9ab24723cbc0be32993f02b34477929555e0d Author: Douglas Anderson Date: Thu Oct 25 15:21:33 2018 -0700 dt-bindings: drm/panel: simple: Innolux TV123WAM is actually P120ZDG-BF1 As far as I can tell the bindings that were added in commit 9c04400f7ea6 ("dt-bindings: drm/panel: Document Innolux TV123WAM panel bindings") weren't actually for Innolux TV123WAM but were actually for Innolux P120ZDG-BF1. As far as I can tell the Innolux TV123WAM isn't a real panel and but it's a mosh between the TI TV123WAM and the Innolux P120ZDG-BF1. Let's unmosh. Here's my evidence: * Searching for TV123WAM on the Internet turns up a TI panel. While it's possible that an Innolux panel has the same model number as the TI Panel, it seems a little doubtful. Looking up the datasheet from the TI Panel shows that it's 1920 x 1280 and 259.2 mm x 172.8 mm. * As far as I know, the patch adding the Innolux Panel was supposed to be for the board that's sitting in front of me as I type this (support for that board is not yet upstream). On the back of that panel I see Innolux P120ZDZ-EZ1 rev B1. * Someone pointed me at a datasheet that's supposed to be for the panel in front of me (sorry, I can't share the datasheet). That datasheet has the string "p120zdg-bf1" * If I search for "P120ZDG-BF1" on the Internet I get hits for panels that are 2160x1440. They don't have datasheets, but the fact that the resolution matches is a good sign. While we doing the rename, also mention that no-hpd can be used with this panel. See the previous patch in this series ("drm/panel: simple: Add "no-hpd" delay for Innolux TV123WAM"). Fixes: 9c04400f7ea6 ("dt-bindings: drm/panel: Document Innolux TV123WAM panel bindings") Cc: Sandeep Panda Reviewed-by: Rob Herring Reviewed-by: Andrzej Hajda Signed-off-by: Douglas Anderson Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20181025222134.174583-5-dianders@chromium.org commit c2bfc223882d4b9d73be970e00ead6fe7868bdb7 Author: Douglas Anderson Date: Thu Oct 25 15:21:32 2018 -0700 drm/bridge: ti-sn65dsi86: Remove the mystery delay Let's solve the mystery of commit bf1178c98930 ("drm/bridge: ti-sn65dsi86: Add mystery delay to enable()"). Specifically the reason we needed that mystery delay is that we weren't paying attention to HPD. Looking at the datasheet for the same panel that was tested for the original commit, I see there's a timing "t3" that times from power on to the aux channel being operational. This time is specced as 0 - 200 ms. The datasheet says that the aux channel is operational at exactly the same time that HPD is asserted. Scoping the signals on this board showed that HPD was asserted 84 ms after power was asserted. That very closely matches the magic 70 ms delay that we had. ...and actually, in my testing the 70 ms wasn't quite enough of a delay and some percentage of the time the display didn't come up until I bumped it to 100 ms (presumably 84 ms would have worked too). To solve this, we tried to hook up the HPD signal in the bridge. ...but in doing so we found that that the bridge didn't report that HPD was asserted until ~280 ms after we powered it (!). This is explained by looking at the sn65dsi86 datasheet section "8.4.5.1 HPD (Hot Plug/Unplug Detection)". Reading there we see that the bridge isn't even intended to report HPD until 100 ms after it's asserted. ...but that would have left us at 184 ms. The extra 100 ms (presumably) comes from this part in the datasheet: > The HPD state machine operates off an internal ring oscillator. The > ring oscillator frequency will vary [ ... ]. The min/max range in > the HPD State Diagram refers to the possible times based off > variation in the ring oscillator frequency. Given that the 280 ms we'll end up delaying if we hook up HPD is _slower_ than the 200 ms we could just hardcode, for now we'll solve the problem by just hardcoding a 200 ms delay in the panel driver using the patch in this series ("drm/panel: simple: Support panels with HPD where HPD isn't connected"). If we later find a panel that needs to use this bridge where we need HPD then we'll have to come up with some new code to handle it. Given the silly debouncing in the bridge chip, though, it seems unlikely. One last note is that I tried to solve this through another way: In ti_sn_bridge_enable() I tried to use various combinations of dp_dpcd_writeb() and dp_dpcd_readb() to detect when the aux channel was up. In theory that would let me detect _exactly_ when I could continue and do link training. Unfortunately even if I did an aux transfer w/out waiting I couldn't see any errors. Possibly I could keep looping over link training until it came back with success, but that seemed a little overly hacky to me. Reviewed-by: Sean Paul Reviewed-by: Andrzej Hajda Signed-off-by: Douglas Anderson Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20181025222134.174583-4-dianders@chromium.org commit 625d3b5c2ea612e4adf8b289384ad654c207c2bb Author: Douglas Anderson Date: Thu Oct 25 15:21:31 2018 -0700 drm/panel: simple: Add "no-hpd" delay for Innolux TV123WAM If the HPD signal isn't hooked up to this panel we need a 200 ms delay. In the datasheet this is shown as the maximum time that HPD will take to be asserted after power is given to the panel. Reviewed-by: Sean Paul Signed-off-by: Douglas Anderson Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20181025222134.174583-3-dianders@chromium.org commit 2ed3e9510f60d0c097ca492e094eeb376ba4330a Author: Douglas Anderson Date: Thu Oct 25 15:21:30 2018 -0700 drm/panel: simple: Support panels with HPD where HPD isn't connected Some eDP panels that are designed to be always connected to a board use their HPD signal to signal that they've finished powering on and they're ready to be talked to. However, for various reasons it's possible that the HPD signal from the panel isn't actually hooked up. In the case where the HPD isn't hooked up you can look at the timing diagram on the panel datasheet and insert a delay for the maximum amount of time that the HPD might take to come up. Let's add support in simple-panel for this concept. At the moment we will co-opt the existing "prepare" delay to keep track of the delay and we'll use a boolean to specify that a given panel should only apply the delay if the "no-hpd" property was specified. Reviewed-by: Sean Paul Signed-off-by: Douglas Anderson Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20181025222134.174583-2-dianders@chromium.org commit cb028e49129f352d2f2645727ceeeacdd64761f4 Author: Douglas Anderson Date: Thu Oct 25 15:21:29 2018 -0700 dt-bindings: drm/panel: simple: Add no-hpd property Some eDP panels that are designed to be always connected to a board use their HPD signal to signal that they've finished powering on and they're ready to be talked to. However, for various reasons it's possible that the HPD signal from the panel isn't actually hooked up. In the case where the HPD isn't hooked up you can look at the timing diagram on the panel datasheet and insert a delay for the maximum amount of time that the HPD might take to come up. Let's add a property in the device tree for this concept. Reviewed-by: Sean Paul Reviewed-by: Rob Herring Signed-off-by: Douglas Anderson Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20181025222134.174583-1-dianders@chromium.org commit 69840466086d2248898020a08dda52732686c4e6 Author: Jianchao Wang Date: Sat Oct 27 19:52:14 2018 +0800 block: fix the DISCARD request merge There are two cases when handle DISCARD merge. If max_discard_segments == 1, the bios/requests need to be contiguous to merge. If max_discard_segments > 1, it takes every bio as a range and different range needn't to be contiguous. But now, attempt_merge screws this up. It always consider contiguity for DISCARD for the case max_discard_segments > 1 and cannot merge contiguous DISCARD for the case max_discard_segments == 1, because rq_attempt_discard_merge always returns false in this case. This patch fixes both of the two cases above. Reviewed-by: Christoph Hellwig Reviewed-by: Ming Lei Signed-off-by: Jianchao Wang Signed-off-by: Jens Axboe commit c6e0bba4ac44fd3d116d763c834dd43f3824f635 Author: Jiri Kosina Date: Sat Oct 27 14:16:13 2018 +0200 HID: moving to group maintainership model Benjamin and myself will from now on be sharing maintainership responsibilities for hid.git. Update maintainers to reflect that change, and also move a git repository to shared space at kernel.org. Signed-off-by: Jiri Kosina Signed-off-by: Benjamin Tissoires Signed-off-by: Jiri Kosina commit ac435075892e3e651c667b4a9f2267cf3ef1d5a2 Merge: 9f51ae62c84a 2347e7e1aea4 Author: Linus Torvalds Date: Mon Oct 29 08:25:00 2018 -0700 Merge tag 'csky-for-linus-4.20' of https://github.com/c-sky/csky-linux Pull C-SKY architecture port from Guo Ren: "This contains the Linux port for C-SKY(csky) based on linux-4.19 Release, which has been through 10 rounds of review on mailing list. More information: http://en.c-sky.com The development repo: https://github.com/c-sky/csky-linux ABI Documentation: https://github.com/c-sky/csky-doc Here is the pre-built cross compiler for fast test from our CI: https://gitlab.com/c-sky/buildroot/-/jobs/101608095/artifacts/file/output/images/csky_toolchain_qemu_csky_ck807f_4.18_glibc_defconfig_482b221e52908be1c9b2ccb444255e1562bb7025.tar.xz We use buildroot as our CI-test enviornment. "LTP, Lmbench ..." will be tested for every commit. See here for more details: https://gitlab.com/c-sky/buildroot/pipelines We'll continouslly improve csky subsystem in future" Arnd acks, and adds the following notes: "I did a thorough review of the ABI, which as usual mainly consists of spotting any files that don't use the asm-generic ABI itself, and having it changed to it matches exactly what we do on other new architectures. I also looked at every other patch and commented on maybe half of them where I saw something that did not quite seem right. Others have reviewed specific patches in greater depth. I'm sure that one could fine more of the minor details, but as long as they are not ABI relevant, they can be fixed later. The only patch that is part of the ABI and that nobody reviewed is the signal handling. This is one of the areas I never worked on in much detail. I did not see anything wrong with it, but I also don't know what the problems with the other architectures are here, and we seem to be hitting issues occasionally, and we never managed to generalize this enough for new architectures to have a trivial implementation. I was originally hoping that we could have the 64-bit time_t interfaces ready in time to completely drop the 32-bit ones, but that did not happen. We might still remove them in the next merge window depending on whether the libc upstream people prefer to keep them or not. One more general comment: I think this may well be the last new CPU architecture we ever add to the kernel. Both nds32 and c-sky are made by companies that also work on risc-v, and generally speaking risc-v seems to be killing off any of the minor licensable instruction set projects, just like ARM has mostly killed off the custom vendor-specific instruction sets already. If we add another architecture in the future, it may instead be something like the LLVM bitcode or WebAssembly, who knows?" To which Geert Uytterhoeven pipes in about another architecture still in the pipeline: Kalray MPPA. * tag 'csky-for-linus-4.20' of https://github.com/c-sky/csky-linux: (24 commits) dt-bindings: interrupt-controller: C-SKY APB intc irqchip: add C-SKY APB bus interrupt controller dt-bindings: interrupt-controller: C-SKY SMP intc irqchip: add C-SKY SMP interrupt controller MAINTAINERS: Add csky dt-bindings: Add vendor prefix for csky dt-bindings: csky CPU Bindings csky: Misc headers csky: SMP support csky: Debug and Ptrace GDB csky: User access csky: Library functions csky: ELF and module probe csky: Atomic operations csky: IRQ handling csky: VDSO and rt_sigreturn csky: Process management and Signal csky: MMU and page table management csky: Cache and TLB routines csky: System Call ... commit 49ad712afa88c502831d37f7089d98eac441fb80 Author: Hans de Goede Date: Sun Oct 14 19:54:27 2018 +0200 platform/x86: Add Intel AtomISP2 dummy / power-management driver The Image Signal Processor found on Cherry Trail devices is brought up in D0 state on devices which have camera sensors attached to it. The ISP will not enter D3 state again without some massaging of its registers beforehand and the ISP not being in D3 state blocks the SoC from entering S0ix modes. There was a driver for the ISP in drivers/staging but that got removed again because it never worked. It does not seem likely that a real driver for the ISP will be added to the mainline kernel anytime soon. This commit adds a dummy driver which contains the necessary magic from the staging driver to powerdown the ISP, so that Cherry Trail devices where the ISP is used will properly use S0ix modes when suspended. Together with other recent S0ix related fixes this allows S0ix modes to be entered on e.g. a Chuwi Hi8 Pro and a HP x2 210. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=196915 Signed-off-by: Hans de Goede Reviewed-by: Alan Cox Signed-off-by: Andy Shevchenko commit 3b9672fff747b31a2204003cab9fe082321edc1b Merge: e901378578c6 b6ae3550c8e2 Author: Michael Ellerman Date: Mon Oct 29 22:31:51 2018 +1100 Merge branch 'next' of https://git.kernel.org/pub/scm/linux/kernel/git/scottwood/linux into next Updates from Scott: "This contains a couple device tree updates, and a fix for a missing prototype warning." commit 4104916d8cad141faa6c24003540e0faeed859fd Author: Hans de Goede Date: Sat Oct 20 12:21:00 2018 +0200 platform/x86: touchscreen_dmi: Add min-x and min-y settings for various models Add min-x and min-y settings now that we've support for this and for some models also update the width/height settings with slighly more accurate values. This fixes touches along the edges registering at the wrong coordinates. While at it also set max-fingers to 10 in a couple of cases where the touchpad can handle 10 fingers (rather then the default 5) and that was missing. Signed-off-by: Hans de Goede Signed-off-by: Andy Shevchenko commit 4269fea768a11a447d8de620ce420f2214d4685c Author: Pablo Neira Ayuso Date: Fri Oct 26 11:14:28 2018 +0200 Revert "netfilter: nft_numgen: add map lookups for numgen random operations" Laura found a better way to do this from userspace without requiring kernel infrastructure, revert this. Fixes: 978d8f9055c3 ("netfilter: nft_numgen: add map lookups for numgen random operations") Signed-off-by: Laura Garcia Liebana Signed-off-by: Pablo Neira Ayuso commit 922dceff8dc1fb4dafc9af78139ba65671408103 Author: Lee, Shawn C Date: Sun Oct 28 22:49:33 2018 -0700 drm/edid: Add 6 bpc quirk for BOE panel. BOE panel (ID: 0x0771) that reports "DFP 1.x compliant TMDS". But it's 6bpc panel only instead of 8 bpc. Add panel ID to edid quirk list and set 6 bpc as default to work around this issue. Cc: Jani Nikula Cc: Maarten Lankhorst Cc: Gustavo Padovan Cc: Cooper Chiou Signed-off-by: Lee, Shawn C > Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/1540792173-7288-1-git-send-email-shawn.c.lee@intel.com commit f0718d792b8a6d4b5ddc929e418ac57cc4897375 Merge: efe8eaf7b525 b59dfdaef173 Author: Ingo Molnar Date: Mon Oct 29 07:20:52 2018 +0100 Merge branch 'linus' into perf/urgent, to pick up fixes Signed-off-by: Ingo Molnar commit 2022cceb4e30f1bb4c84d40ffa705aa8d8d68adb Author: Rasmus Villemoes Date: Sat Oct 27 00:20:04 2018 +0200 x86/traps: Use format string with panic() call Building with -Wformat-nonliteral gives: arch/x86/kernel/traps.c:334:2: warning: format not a string literal and no format arguments [-Wformat-nonliteral] panic(message); handle_stack_overflow() can only be called from two places (kernel/traps.c and via inline asm in mm/fault.c), in both cases with a string not containing format specifiers, so we might as well silence this warning using "%s" as a format string. Signed-off-by: Rasmus Villemoes Cc: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20181026222004.14193-1-linux@rasmusvillemoes.dk Signed-off-by: Ingo Molnar commit a68d75081aeccfb169575bea6f452a5a12b9f49b Author: Muchun Song Date: Sat Oct 27 11:05:17 2018 +0800 sched/rt: Update comment in pick_next_task_rt() Commit: f4ebcbc0d7e0 ("sched/rt: Substract number of tasks of throttled queues from rq->nr_running") added a new rt_rq->rt_queued field, which is used to indicate the status of rq->rt enqueue or dequeue. So, the ->rt_nr_running check was removed and we now check ->rt_queued instead. Fix the comment in pick_next_task_rt() as well, which was still referencing the old logic. Signed-off-by: Muchun Song Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20181027030517.23292-1-smuchun@gmail.com Signed-off-by: Ingo Molnar commit 0e96f31ea4249b1e94e266fe4dff908c2983a9b3 Author: Jordan Borgner Date: Sun Oct 28 12:58:28 2018 +0000 x86: Clean up 'sizeof x' => 'sizeof(x)' "sizeof(x)" is the canonical coding style used in arch/x86 most of the time. Fix the few places that didn't follow the convention. (Also do some whitespace cleanups in a few places while at it.) [ mingo: Rewrote the changelog. ] 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/20181028125828.7rgammkgzep2wpam@JordanDesktop Signed-off-by: Ingo Molnar commit 4b783dd6a4071e0919fa7556462d86a792f518fc Merge: 97ec37c57dd4 d2266bbfa9e3 f4661d293eb2 4a60aa05a063 Author: Ingo Molnar Date: Mon Oct 29 07:13:09 2018 +0100 Merge branches 'x86/early-printk', 'x86/microcode' and 'core/objtool' into x86/urgent, to pick up simple topic branches Signed-off-by: Ingo Molnar commit 97ec37c57dd411d0815455bca07166411c0da1df Merge: ace6485a0326 b59dfdaef173 Author: Ingo Molnar Date: Mon Oct 29 07:12:34 2018 +0100 Merge branch 'linus' into x86/urgent, to refresh the tree Signed-off-by: Ingo Molnar commit 9f51ae62c84a23ade0ba86457d30a30c9db0c50f Merge: 53b3b6bbfde6 747569b0a7c5 Author: Linus Torvalds Date: Sun Oct 28 20:17:49 2018 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: 1) GRO overflow entries are not unlinked properly, resulting in list poison pointers being dereferenced. 2) Fix bridge build with ipv6 disabled, from Nikolay Aleksandrov. 3) Direct packet access and other fixes in BPF from Daniel Borkmann. 4) gred_change_table_def() gets passed the wrong pointer, a pointer to a set of unparsed attributes instead of the attribute itself. From Jakub Kicinski. 5) Allow macsec device to be brought up even if it's lowerdev is down, from Sabrina Dubroca. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: net: diag: document swapped src/dst in udp_dump_one. macsec: let the administrator set UP state even if lowerdev is down macsec: update operstate when lower device changes net: sched: gred: pass the right attribute to gred_change_table_def() ptp: drop redundant kasprintf() to create worker name net: bridge: remove ipv6 zero address check in mcast queries net: Properly unlink GRO packets on overflow. bpf: fix wrong helper enablement in cgroup local storage bpf: add bpf_jit_limit knob to restrict unpriv allocations bpf: make direct packet write unclone more robust bpf: fix leaking uninitialized memory on pop/peek helpers bpf: fix direct packet write into pop/peek helpers bpf: fix cg_skb types to hint access type in may_access_direct_pkt_data bpf: fix direct packet access for flow dissector progs bpf: disallow direct packet access for unpriv in cg_skb bpf: fix test suite to enable all unpriv program types bpf, btf: fix a missing check bug in btf_parse selftests/bpf: add config fragments BPF_STREAM_PARSER and XDP_SOCKETS bpf: devmap: fix wrong interface selection in notifier_call commit 747569b0a7c537d680bc94a988be6caad9960488 Author: Lorenzo Colitti Date: Mon Oct 29 09:15:22 2018 +0900 net: diag: document swapped src/dst in udp_dump_one. Since its inception, udp_dump_one has had a bug where userspace needs to swap src and dst addresses and ports in order to find the socket it wants. This is because it passes the socket source address to __udp[46]_lib_lookup's saddr argument, but those functions are intended to find local sockets matching received packets, so saddr is the remote address, not the local address. This can no longer be fixed for backwards compatibility reasons, so add a brief comment explaining that this is the case. This will avoid confusion and help ensure SOCK_DIAG implementations of new protocols don't have the same problem. Fixes: a925aa00a55 ("udp_diag: Implement the get_exact dumping functionality") Signed-off-by: Lorenzo Colitti Signed-off-by: David S. Miller commit 3bdf6bac58170383465a2fb67cf6e13a27e43b85 Merge: 38b4f18d5637 07bddef98393 Author: David S. Miller Date: Sun Oct 28 19:26:43 2018 -0700 Merge branch 'macsec-fixes' Sabrina Dubroca says: ==================== macsec: linkstate fixes This series fixes issues with handling administrative and operstate of macsec devices. Radu Rendec proposed another version of the first patch [0] but I'd rather not follow the behavior of vlan devices, going with macvlan does instead. Patrick Talbert also reported the same issue to me. The second patch is a follow-up. The restriction on setting the device up is a bit unreasonable, and operstate provides the information we need in this case. [0] https://patchwork.ozlabs.org/patch/971374/ ==================== Signed-off-by: David S. Miller commit 07bddef9839378bd6f95b393cf24c420529b4ef1 Author: Sabrina Dubroca Date: Sun Oct 28 09:33:10 2018 +0100 macsec: let the administrator set UP state even if lowerdev is down Currently, the kernel doesn't let the administrator set a macsec device up unless its lower device is currently up. This is inconsistent, as a macsec device that is up won't automatically go down when its lower device goes down. Now that linkstate propagation works, there's really no reason for this limitation, so let's remove it. Fixes: c09440f7dcb3 ("macsec: introduce IEEE 802.1AE driver") Reported-by: Radu Rendec Signed-off-by: Sabrina Dubroca Signed-off-by: David S. Miller commit e6ac075882b2afcdf2d5ab328ce4ab42a1eb9593 Author: Sabrina Dubroca Date: Sun Oct 28 09:33:09 2018 +0100 macsec: update operstate when lower device changes Like all other virtual devices (macvlan, vlan), the operstate of a macsec device should match the state of its lower device. This is done by calling netif_stacked_transfer_operstate from its netdevice notifier. We also need to call netif_stacked_transfer_operstate when a new macsec device is created, so that its operstate is set properly. This is only relevant when we try to bring the device up directly when we create it. Radu Rendec proposed a similar patch, inspired from the 802.1q driver, that included changing the administrative state of the macsec device, instead of just the operstate. This version is similar to what the macvlan driver does, and updates only the operstate. Fixes: c09440f7dcb3 ("macsec: introduce IEEE 802.1AE driver") Reported-by: Radu Rendec Reported-by: Patrick Talbert Signed-off-by: Sabrina Dubroca Signed-off-by: David S. Miller commit 38b4f18d56372e1e21771ab7b0357b853330186c Author: Jakub Kicinski Date: Fri Oct 26 15:51:06 2018 -0700 net: sched: gred: pass the right attribute to gred_change_table_def() gred_change_table_def() takes a pointer to TCA_GRED_DPS attribute, and expects it will be able to interpret its contents as struct tc_gred_sopt. Pass the correct gred attribute, instead of TCA_OPTIONS. This bug meant the table definition could never be changed after Qdisc was initialized (unless whatever TCA_OPTIONS contained both passed netlink validation and was a valid struct tc_gred_sopt...). Old behaviour: $ ip link add type dummy $ tc qdisc replace dev dummy0 parent root handle 7: \ gred setup vqs 4 default 0 $ tc qdisc replace dev dummy0 parent root handle 7: \ gred setup vqs 4 default 0 RTNETLINK answers: Invalid argument Now: $ ip link add type dummy $ tc qdisc replace dev dummy0 parent root handle 7: \ gred setup vqs 4 default 0 $ tc qdisc replace dev dummy0 parent root handle 7: \ gred setup vqs 4 default 0 $ tc qdisc replace dev dummy0 parent root handle 7: \ gred setup vqs 4 default 0 Fixes: f62d6b936df5 ("[PKT_SCHED]: GRED: Use central VQ change procedure") Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit 822c5f7341366bef761e5e49f05bb8b1b0afccee Author: Rasmus Villemoes Date: Fri Oct 26 23:22:59 2018 +0200 ptp: drop redundant kasprintf() to create worker name Building with -Wformat-nonliteral, gcc complains drivers/ptp/ptp_clock.c: In function ‘ptp_clock_register’: drivers/ptp/ptp_clock.c:239:26: warning: format not a string literal and no format arguments [-Wformat-nonliteral] worker_name : info->name); kthread_create_worker takes fmt+varargs to set the name of the worker, and that happens with a vsnprintf() to a stack buffer (that is then copied into task_comm). So there's no reason not to just pass "ptp%d", ptp->index to kthread_create_worker() and avoid the intermediate worker_name variable. Signed-off-by: Rasmus Villemoes Acked-by: Richard Cochran Reviewed-by: Kees Cook Signed-off-by: David S. Miller commit 0fe5119e267f3e3d8ac206895f5922195ec55a8a Author: Nikolay Aleksandrov Date: Sat Oct 27 12:07:47 2018 +0300 net: bridge: remove ipv6 zero address check in mcast queries Recently a check was added which prevents marking of routers with zero source address, but for IPv6 that cannot happen as the relevant RFCs actually forbid such packets: RFC 2710 (MLDv1): "To be valid, the Query message MUST come from a link-local IPv6 Source Address, be at least 24 octets long, and have a correct MLD checksum." Same goes for RFC 3810. And also it can be seen as a requirement in ipv6_mc_check_mld_query() which is used by the bridge to validate the message before processing it. Thus any queries with :: source address won't be processed anyway. So just remove the check for zero IPv6 source address from the query processing function. Fixes: 5a2de63fd1a5 ("bridge: do not add port to router list when receives query with source 0.0.0.0") Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit 53b3b6bbfde6aae8d1ededc86ad4e0e1e00eb5f8 Merge: 746bb4ed6d62 f2bfc71aee75 Author: Linus Torvalds Date: Sun Oct 28 17:49:53 2018 -0700 Merge tag 'drm-next-2018-10-24' of git://anongit.freedesktop.org/drm/drm Pull drm updates from Dave Airlie: "This is going to rebuild more than drm as it adds a new helper to list.h for doing bulk updates. Seemed like a reasonable addition to me. Otherwise the usual merge window stuff lots of i915 and amdgpu, not so much nouveau, and piles of everything else. Core: - Adds a new list.h helper for doing bulk list updates for TTM. - Don't leak fb address in smem_start to userspace (comes with EXPORT workaround for people using mali out of tree hacks) - udmabuf device to turn memfd regions into dma-buf - Per-plane blend mode property - ref/unref replacements with get/put - fbdev conflicting framebuffers code cleaned up - host-endian format variants - panel orientation quirk for Acer One 10 bridge: - TI SN65DSI86 chip support vkms: - GEM support. - Cursor support amdgpu: - Merge amdkfd and amdgpu into one module - CEC over DP AUX support - Picasso APU support + VCN dynamic powergating - Raven2 APU support - Vega20 enablement + kfd support - ACP powergating improvements - ABGR/XBGR display support - VCN jpeg support - xGMI support - DC i2c/aux cleanup - Ycbcr 4:2:0 support - GPUVM improvements - Powerplay and powerplay endian fixes - Display underflow fixes vmwgfx: - Move vmwgfx specific TTM code to vmwgfx - Split out vmwgfx buffer/resource validation code - Atomic operation rework bochs: - use more helpers - format/byteorder improvements qxl: - use more helpers i915: - GGTT coherency getparam - Turn off resource streamer API - More Icelake enablement + DMC firmware - Full PPGTT for Ivybridge, Haswell and Valleyview - DDB distribution based on resolution - Limited range DP display support nouveau: - CEC over DP AUX support - Initial HDMI 2.0 support virtio-gpu: - vmap support for PRIME objects tegra: - Initial Tegra194 support - DMA/IOMMU integration fixes msm: - a6xx perf improvements + clock prefix - GPU preemption optimisations - a6xx devfreq support - cursor support rockchip: - PX30 support - rgb output interface support mediatek: - HDMI output support on mt2701 and mt7623 rcar-du: - Interlaced modes on Gen3 - LVDS on R8A77980 - D3 and E3 SoC support hisilicon: - misc fixes mxsfb: - runtime pm support sun4i: - R40 TCON support - Allwinner A64 support - R40 HDMI support omapdrm: - Driver rework changing display pipeline ordering to use common code - DMM memory barrier and irq fixes - Errata workarounds exynos: - out-bridge support for LVDS bridge driver - Samsung 16x16 tiled format support - Plane alpha and pixel blend mode support tilcdc: - suspend/resume update mali-dp: - misc updates" * tag 'drm-next-2018-10-24' of git://anongit.freedesktop.org/drm/drm: (1382 commits) firmware/dmc/icl: Add missing MODULE_FIRMWARE() for Icelake. drm/i915/icl: Fix signal_levels drm/i915/icl: Fix DDI/TC port clk_off bits drm/i915/icl: create function to identify combophy port drm/i915/gen9+: Fix initial readout for Y tiled framebuffers drm/i915: Large page offsets for pread/pwrite drm/i915/selftests: Disable shrinker across mmap-exhaustion drm/i915/dp: Link train Fallback on eDP only if fallback link BW can fit panel's native mode drm/i915: Fix intel_dp_mst_best_encoder() drm/i915: Skip vcpi allocation for MSTB ports that are gone drm/i915: Don't unset intel_connector->mst_port drm/i915: Only reset seqno if actually idle drm/i915: Use the correct crtc when sanitizing plane mapping drm/i915: Restore vblank interrupts earlier drm/i915: Check fb stride against plane max stride drm/amdgpu/vcn:Fix uninitialized symbol error drm: panel-orientation-quirks: Add quirk for Acer One 10 (S1003) drm/amd/amdgpu: Fix debugfs error handling drm/amdgpu: Update gc_9_0 golden settings. drm/amd/powerplay: update PPtable with DC BTC and Tvr SocLimit fields ... commit 746bb4ed6d626f3f9e431a7f9b20504538e62ded Merge: ac747c0715f2 0bb95f80a38f Author: Linus Torvalds Date: Sun Oct 28 13:26:45 2018 -0700 Merge tag 'vla-v4.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull VLA removal from Kees Cook: "Globally warn on VLA use. This turns on "-Wvla" globally now that the last few trees with their VLA removals have landed (crypto, block, net, and powerpc). Arnd mentioned that there may be a couple more VLAs hiding in hard-to-find randconfigs, but nothing big has shaken out in the last month or so in linux-next. We should be basically VLA-free now! Wheee. :) Summary: - Remove unused fallback for BUILD_BUG_ON (which technically contains a VLA) - Lift -Wvla to the top-level Makefile" * tag 'vla-v4.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: Makefile: Globally enable VLA warning compiler.h: give up __compiletime_assert_fallback() commit ac747c0715f29c2be3848b719a1b7e65b07f7b21 Merge: f8cab69be0a8 c2b1a9226fe7 Author: Linus Torvalds Date: Sun Oct 28 13:22:35 2018 -0700 Merge tag 'kbuild-v4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull Kbuild updates from Masahiro Yamada: - optimize kallsyms slightly - remove check for old CFLAGS usage - add some compiler flags unconditionally instead of evaluating $(call cc-option,...) - fix variable shadowing in host tools - refactor scripts/mkmakefile - refactor various makefiles * tag 'kbuild-v4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: modpost: Create macro to avoid variable shadowing ASN.1: Remove unnecessary shadowed local variable kbuild: use 'else ifeq' for checksrc to improve readability kbuild: remove unneeded link_multi_deps kbuild: add -Wno-unused-but-set-variable flag unconditionally kbuild: add -Wdeclaration-after-statement flag unconditionally kbuild: add -Wno-pointer-sign flag unconditionally modpost: remove leftover symbol prefix handling for module device table kbuild: simplify command line creation in scripts/mkmakefile kbuild: do not pass $(objtree) to scripts/mkmakefile kbuild: remove user ID check in scripts/mkmakefile kbuild: remove VERSION and PATCHLEVEL from $(objtree)/Makefile kbuild: add --include-dir flag only for out-of-tree build kbuild: remove dead code in cmd_files calculation in top Makefile kbuild: hide most of targets when running config or mixed targets kbuild: remove old check for CFLAGS use kbuild: prefix Makefile.dtbinst path with $(srctree) unconditionally kallsyms: remove left-over Blackfin code kallsyms: reduce size a little on 64-bit commit f8cab69be0a8a756a7409f6d2bd1e6e96ce46482 Merge: dad4f140edaa f73581f8d9a3 Author: Linus Torvalds Date: Sun Oct 28 12:58:42 2018 -0700 Merge tag 'linux-kselftest-4.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest Pull kselftest updates from Shuah Khan: "This Kselftest update for Linux 4.20-rc1 consists of: - Improvements to ftrace test suite from Masami Hiramatsu. - Color coded ftrace PASS / FAIL results from Steven Rostedt (VMware) to improve readability of reports. - watchdog Fixes and enhancement to add gettimeout and get|set pretimeout options from Jerry Hoemann. - Several fixes to warnings and spelling etc" * tag 'linux-kselftest-4.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: (40 commits) selftests/ftrace: Strip escape sequences for log file selftests/ftrace: Use colored output when available selftests: fix warning: "_GNU_SOURCE" redefined selftests: kvm: Fix -Wformat warnings selftests/ftrace: Add color to the PASS / FAIL results kvm: selftests: fix spelling mistake "Insufficent" -> "Insufficient" selftests: gpio: Fix OUTPUT directory in Makefile selftests: gpio: restructure Makefile selftests: watchdog: Fix ioctl SET* error paths to take oneshot exit path selftests: watchdog: Add gettimeout and get|set pretimeout selftests: watchdog: Fix error message. selftests: watchdog: fix message when /dev/watchdog open fails selftests/ftrace: Add ftrace cpumask testcase selftests/ftrace: Add wakeup_rt tracer testcase selftests/ftrace: Add wakeup tracer testcase selftests/ftrace: Add stacktrace ftrace filter command testcase selftests/ftrace: Add trace_pipe testcase selftests/ftrace: Add function filter on module testcase selftests/ftrace: Add max stack tracer testcase selftests/ftrace: Add function profiling stat testcase ... commit 0d0352d8b3d6d7ca9a710b40e194cbbaeb841c88 Author: Masami Hiramatsu Date: Mon Oct 22 00:08:48 2018 +0900 selftests/ftrace: Fix synthetic event test to delete event correctly Fix the synthetic event test case to remove event correctly. If redirecting command to synthetic_event file without append mode, it cleans up all existing events and execute (parse) the command. This means "delete event" always fails to find the target event. Since previous synthetic event has a bug which doesn't return -ENOENT even if it fails to find the deleting event, this test passed. But fixing that bug, this test fails because this test itself has a bug. This fixes that bug by trying to delete event right after adding an event, and use append mode redirection ('>>') instead of normal redirection ('>'). Link: http://lkml.kernel.org/r/154013452832.25576.2305459545429386517.stgit@devbox Acked-by: Shuah Khan Acked-by: Tom Zanussi Tested-by: Tom Zanussi Cc: Tom Zanussi Cc: Tom Zanussi Cc: Rajvi Jingar Cc: Shuah Khan Cc: stable@vger.kernel.org Fixes: f06eec4d0f2c ('selftests: ftrace: Add inter-event hist triggers testcases') Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit dad4f140edaa3f6bb452b6913d41af1ffd672e45 Merge: 69d5b97c5973 3a08cd52c37c Author: Linus Torvalds Date: Sun Oct 28 11:35:40 2018 -0700 Merge branch 'xarray' of git://git.infradead.org/users/willy/linux-dax Pull XArray conversion from Matthew Wilcox: "The XArray provides an improved interface to the radix tree data structure, providing locking as part of the API, specifying GFP flags at allocation time, eliminating preloading, less re-walking the tree, more efficient iterations and not exposing RCU-protected pointers to its users. This patch set 1. Introduces the XArray implementation 2. Converts the pagecache to use it 3. Converts memremap to use it The page cache is the most complex and important user of the radix tree, so converting it was most important. Converting the memremap code removes the only other user of the multiorder code, which allows us to remove the radix tree code that supported it. I have 40+ followup patches to convert many other users of the radix tree over to the XArray, but I'd like to get this part in first. The other conversions haven't been in linux-next and aren't suitable for applying yet, but you can see them in the xarray-conv branch if you're interested" * 'xarray' of git://git.infradead.org/users/willy/linux-dax: (90 commits) radix tree: Remove multiorder support radix tree test: Convert multiorder tests to XArray radix tree tests: Convert item_delete_rcu to XArray radix tree tests: Convert item_kill_tree to XArray radix tree tests: Move item_insert_order radix tree test suite: Remove multiorder benchmarking radix tree test suite: Remove __item_insert memremap: Convert to XArray xarray: Add range store functionality xarray: Move multiorder_check to in-kernel tests xarray: Move multiorder_shrink to kernel tests xarray: Move multiorder account test in-kernel radix tree test suite: Convert iteration test to XArray radix tree test suite: Convert tag_tagged_items to XArray radix tree: Remove radix_tree_clear_tags radix tree: Remove radix_tree_maybe_preload_order radix tree: Remove split/join code radix tree: Remove radix_tree_update_node_t page cache: Finish XArray conversion dax: Convert page fault handlers to XArray ... commit ece23711dd956cd5053c9cb03e9fe0668f9c8894 Author: David S. Miller Date: Sun Oct 28 10:35:12 2018 -0700 net: Properly unlink GRO packets on overflow. Just like with normal GRO processing, we have to initialize skb->next to NULL when we unlink overflow packets from the GRO hash lists. Fixes: d4546c2509b1 ("net: Convert GRO SKB handling to list_head.") Reported-by: Oleksandr Natalenko Tested-by: Oleksandr Natalenko Signed-off-by: David S. Miller commit 4d8106f0299c7942c5f13a22da6d553d28127ef5 Author: Mike Rapoport Date: Mon Jun 25 12:02:34 2018 +0300 c6x: switch to NO_BOOTMEM The c6x is already using memblock and does most of early memory reservations with it, so it was only a matter of removing the bootmem initialization and handover of the memory from memblock to bootmem. Signed-off-by: Mike Rapoport Signed-off-by: Mark Salter commit c2b1a9226fe7c1cee8f0ae42496f3eb282d73ebb Author: Leonardo Bras Date: Wed Oct 24 01:03:52 2018 -0300 modpost: Create macro to avoid variable shadowing Create DEF_FIELD_ADDR_VAR as a more generic version of the DEF_FIELD_ADD macro, allowing usage of a variable name other than the struct element name. Also, sets DEF_FIELD_ADDR as a specific usage of DEF_FILD_ADDR_VAR in which the var name is the same as the struct element name. Then, makes use of DEF_FIELD_ADDR_VAR to create a variable of another name, in order to avoid variable shadowing. Signed-off-by: Leonardo Bras Signed-off-by: Masahiro Yamada commit 9e1e8194332fa4c453bcbad434b5da17c1c7e4c5 Author: Leonardo Bras Date: Wed Oct 24 01:03:51 2018 -0300 ASN.1: Remove unnecessary shadowed local variable Remove an unnecessary shadowed local variable (start). It was used only once, with the same value it was started before the if block. Signed-off-by: Leonardo Bras Signed-off-by: Masahiro Yamada commit 533555e5cbb6aa2d77598917871ae5b579fe724b Author: Wei Yongjun Date: Sat Oct 27 06:12:06 2018 +0000 xfrm: Fix error return code in xfrm_output_one() xfrm_output_one() does not return a error code when there is no dst_entry attached to the skb, it is still possible crash with a NULL pointer dereference in xfrm_output_resume(). Fix it by return error code -EHOSTUNREACH. Fixes: 9e1437937807 ("xfrm: Fix NULL pointer dereference when skb_dst_force clears the dst_entry.") Signed-off-by: Wei Yongjun Signed-off-by: Steffen Klassert commit c9fa406f62ec952bc4689b5120a02759ce42a68d Author: John David Anglin Date: Sat Oct 27 18:03:25 2018 -0400 parisc: Fix A500 boot crash I believe the following change will fix the cache/TLB inconsistency observed by Meelis. After changing the page table entries, we need to flush the cache and TLB to ensure that we don't have any stale PTE values in the cache or TLB. The alternative patching is done after all CPUs are running. Thus, we need to flush the whole cache and TLB. I included the init section in the range modified by map_pages as suggested by Helge. Some routines in the init section may require patching. Signed-off-by: John David Anglin Signed-off-by: Helge Deller commit 18858511fd8a877303cc34c06efa461b26a0e070 Author: Masami Hiramatsu Date: Mon Oct 22 00:08:20 2018 +0900 tracing: Return -ENOENT if there is no target synthetic event Return -ENOENT error if there is no target synthetic event. This notices an operation failure to user as below; # echo 'wakeup_latency u64 lat; pid_t pid;' > synthetic_events # echo '!wakeup' >> synthetic_events sh: write error: No such file or directory Link: http://lkml.kernel.org/r/154013449986.25576.9487131386597290172.stgit@devbox Acked-by: Tom Zanussi Tested-by: Tom Zanussi Cc: Shuah Khan Cc: Rajvi Jingar Cc: stable@vger.kernel.org Fixes: 4b147936fa50 ('tracing: Add support for 'synthetic' events') Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 69d5b97c597307773fe6c59775a5d5a88bb7e6b3 Author: Linus Torvalds Date: Sat Oct 27 11:03:27 2018 -0700 HID: we do not randomly make new drivers 'default y' .. even when that "default y" is hidden syntactically as a default !EXPERT it's wrong. The only reason something should be 'default y' is if it used to be built-in, and it was made configurable, and the 'default y' is just retaining the status quo. Altheratively, the hardware for the driver has become _so_ common that it really makes sense for everybody to build it. Finally, one possible reason for 'default y' is because the option is not enabling any new code at all, but is just enabling other options (the networking people do this for vendor options, for example, so that you can disable whole vendors at a time). Clearly, none of these cases hold for the BigBen Interactive Kids' gamepad, and HID_BIGBEN_FF should thus most definitely not default to on for everybody. Cc: Hanno Zulla Cc: Jiri Kosina Signed-off-by: Linus Torvalds commit 5ecf3e110c32c5756351eed067cdf6a91c308e62 Merge: ed3f4e239834 cd6ba41c192d Author: Linus Torvalds Date: Sat Oct 27 10:25:22 2018 -0700 Merge tag 'linux-watchdog-4.20-rc1' of git://www.linux-watchdog.org/linux-watchdog Pull watchdog updates from Wim Van Sebroeck: - Add Armada 37xx CPU watchdog - w83627hf_wdt: Add Support for NCT6796D, NCT6797D, NCT6798D - hpwdt: several improvements - renesas_wdt: SPDX identifiers, stop when unregistering, support for R7S9210 - rza_wdt: SPDX identifiers, support longer timeouts - core: fix null pointer dereference when releasing cdev - iTCO_wdt: Drop option vendorsupport=2 - sama5d4: fix timeout-sec usage - lantiq_wdt: convert to watchdog framework - several small fixes * tag 'linux-watchdog-4.20-rc1' of git://www.linux-watchdog.org/linux-watchdog: (30 commits) watchdog: ts4800: release syscon device node in ts4800_wdt_probe() watchdog: armada_37xx_wdt: use do_div for u64 division documentation: watchdog: add documentation for armada-37xx-wdt dt-bindings: watchdog: Document armada-37xx-wdt binding watchdog: Add support for Armada 37xx CPU watchdog dt-bindings: watchdog: add mpc8xxx-wdt support watchdog: mpc8xxx: provide boot status MAINTAINERS: Fix file pattern for MEN Z069 watchdog driver dt-bindings: watchdog: renesas-wdt: Add support for R7S9210 watchdog: rza_wdt: Support longer timeouts watchdog: hpwdt: Disable PreTimeout when Timeout is smaller watchdog: w83627hf_wdt: Support NCT6796D, NCT6797D, NCT6798D watchdog: mpc8xxx: use dev_xxxx() instead of pr_xxxx() watchdog: lantiq: add get_timeleft callback watchdog: lantiq: Convert to watchdog_device watchdog: lantiq: update register names to better match spec watchdog: sama5d4: fix timeout-sec usage watchdog: fix a small number of "watchog" typos in comments watchdog: rza_wdt: convert to SPDX identifiers watchdog: iTCO_wdt: Remove unused hooks ... commit ed3f4e239834317934cc73a187e27e44b217056b Merge: c7b7eefa57ae cacd9759eea2 Author: Linus Torvalds Date: Sat Oct 27 10:20:39 2018 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input updates from Dmitry Torokhov: "Just random driver fixups, nothing exiting" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: synaptics - avoid using uninitialized variable when probing Input: xen-kbdfront - mark expected switch fall-through Input: atmel_mxt_ts - mark expected switch fall-through Input: cyapa - mark expected switch fall-throughs Input: wm97xx-ts - fix exit path Input: of_touchscreen - add support for touchscreen-min-x|y Input: Fix DIR-685 touchkeys MAINTAINERS entry Input: elants_i2c - use DMA safe i2c when possible Input: silead - try firmware reload after unsuccessful resume Input: st1232 - set INPUT_PROP_DIRECT property Input: xilinx_ps2 - convert to using %pOFn instead of device_node.name Input: atmel_mxt_ts - fix multiple includes Input: sun4i-lradc - convert to using %pOFn instead of device_node.name Input: pwm-vibrator - correct pwms in DT binding example commit c7b7eefa57ae3c8802fdec7d07ac4df6c49d1e7a Merge: e55854534989 3822d1bb0df1 Author: Linus Torvalds Date: Sat Oct 27 09:24:24 2018 -0700 Merge tag 'rtc-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux Pull RTC updates from Alexandre Belloni: "This cycle, there were mostly non urgent fixes in drivers. I also finally unexported the non managed registration. Subsystem: - non devm managed registration is now removed from the driver API - all the unnecessary rtc_valid_tm() calls have been removed Drivers: - abx80X: watchdog support - cmos: fix non ACPI support - sc27xx: fix alarm support - Remove a possible sysfs race condition for ab8500, ds1307, ds1685, isl1208 - Fix a possible race condition where an irq handler may be called before the rtc_device struct is allocated for mt6397, pl030, menelaus, armada38x" * tag 'rtc-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: (54 commits) rtc: sc27xx: Always read normal alarm when registering RTC device rtc: sc27xx: Add check to see if need to enable the alarm interrupt rtc: sc27xx: Remove interrupts disable and clear in probe() rtc: sc27xx: Clear SPG value update interrupt status rtc: sc27xx: Set wakeup capability before registering rtc device rtc: s35390a: Change buf's type to u8 in s35390a_init rtc: ds1307: fix ds1339 wakealarm support rtc: ds1685: simplify getting .driver_data rtc: m41t80: mark expected switch fall-through rtc: tegra: Propagate errors from platform_get_irq() rtc: cmos: Remove the `use_acpi_alarm' module parameter for !ACPI rtc: cmos: Fix non-ACPI undefined reference to `hpet_rtc_interrupt' rtc: mv: let the core handle invalid alarms rtc: vr41xx: switch to rtc_time64_to_tm/rtc_tm_to_time64 rtc: ab8500: remove useless check rtc: ab8500: let the core handle range rtc: ab8500: use rtc_add_group rtc: rs5c348: report error when time is invalid rtc: rs5c348: remove forward declaration rtc: rs5c348: remove useless label ... commit e5585453498907080c456ec5b51131867ed6d095 Merge: b59dfdaef173 72b8ad40e143 Author: Linus Torvalds Date: Sat Oct 27 09:20:42 2018 -0700 Merge tag 'led-fix-for-4.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds Pull LED fix from Jacek Anaszewski. * tag 'led-fix-for-4.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds: leds: gpio: set led_dat->gpiod pointer for OF defined GPIO leds commit b59dfdaef173677b0b7e10f375226c0a1114fd20 Author: Linus Torvalds Date: Sat Oct 27 09:10:48 2018 -0700 i2c-hid: properly terminate i2c_hid_dmi_desc_override_table[] array Commit 9ee3e06610fd ("HID: i2c-hid: override HID descriptors for certain devices") added a new dmi_system_id quirk table to override certain HID report descriptors for some systems that lack them. But the table wasn't properly terminated, causing the dmi matching to walk off into la-la-land, and starting to treat random data as dmi descriptor pointers, causing boot-time oopses if you were at all unlucky. Terminate the array. We really should have some way to just statically check that arrays that should be terminated by an empty entry actually are so. But the HID people really should have caught this themselves, rather than have me deal with an oops during the merge window. Tssk, tssk. Cc: Julian Sax Cc: Benjamin Tissoires Cc: Jiri Kosina Signed-off-by: Linus Torvalds commit a2acce536921bd793bae13fa344fcea157638e72 Author: Steven Rostedt (VMware) Date: Mon Oct 15 23:14:28 2018 -0400 tracing: Have stack tracer trace full stack The stack tracer traces every function call checking the current stack (in non interrupt context), looking for the deepest stack, and saving it when it finds a new max depth. The problem is that it calls save_stack_trace(), and with the new ORC unwinder, it can skip too much. As it looks at the ip of the function call in the backtrace to find where it should start, it doesn't need to skip anything. The stack trace selftest would fail when the kernel was complied with the ORC UNDWINDER enabled. Without skipping functions when doing the stack trace, it now passes again. Signed-off-by: Steven Rostedt (VMware) commit da387e5c930f43d9f3b011a6fbb33bdf43d9714c Author: Nikolay Borisov Date: Wed Oct 17 09:51:43 2018 +0300 tracing: Export trace_dump_stack to modules There is no reason for this function to be unexprted and it's a useful debugging aid. Link: http://lkml.kernel.org/r/1539759103-5923-1-git-send-email-nborisov@suse.com Signed-off-by: Nikolay Borisov Signed-off-by: Steven Rostedt (VMware) commit aedef16a63d5d330afde4fcb54e0e73980e4a116 Author: Takashi Sakamoto Date: Sat Oct 27 17:13:31 2018 +0900 ALSA: dice: fix to wait for releases of all ALSA character devices In a development period for Linux kernel v4.20, drivers in ALSA firewire stack were changed to wait for releases of all ALSA character devices at .remove callback of bus driver. However, ALSA dice driver is partly out of this change. This bug can bring fault to user process which holds the last of character device in unplugging. This commit fixes the driver to wait in the callback. Fixes: 61ccc6f6b27c ('ALSA: firewire: block .remove callback of bus driver till all of ALSA character devices are released') Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai commit 6788fac82001ed1944b5da976bcec4a7b9accf51 Merge: 345671ea0f92 d8fd9e106fbc Author: David S. Miller Date: Fri Oct 26 21:41:49 2018 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Daniel Borkmann says: ==================== pull-request: bpf 2018-10-27 The following pull-request contains BPF updates for your *net* tree. The main changes are: 1) Fix toctou race in BTF header validation, from Martin and Wenwen. 2) Fix devmap interface comparison in notifier call which was neglecting netns, from Taehee. 3) Several fixes in various places, for example, correcting direct packet access and helper function availability, from Daniel. 4) Fix BPF kselftest config fragment to include af_xdp and sockmap, from Naresh. ==================== Signed-off-by: David S. Miller commit 345671ea0f9258f410eb057b9ced9cefbbe5dc78 Merge: 4904008165c8 22146c3ce989 Author: Linus Torvalds Date: Fri Oct 26 19:33:41 2018 -0700 Merge branch 'akpm' (patches from Andrew) Merge updates from Andrew Morton: - a few misc things - ocfs2 updates - most of MM * emailed patches from Andrew Morton : (132 commits) hugetlbfs: dirty pages as they are added to pagecache mm: export add_swap_extent() mm: split SWP_FILE into SWP_ACTIVATED and SWP_FS tools/testing/selftests/vm/map_fixed_noreplace.c: add test for MAP_FIXED_NOREPLACE mm: thp: relocate flush_cache_range() in migrate_misplaced_transhuge_page() mm: thp: fix mmu_notifier in migrate_misplaced_transhuge_page() mm: thp: fix MADV_DONTNEED vs migrate_misplaced_transhuge_page race condition mm/kasan/quarantine.c: make quarantine_lock a raw_spinlock_t mm/gup: cache dev_pagemap while pinning pages Revert "x86/e820: put !E820_TYPE_RAM regions into memblock.reserved" mm: return zero_resv_unavail optimization mm: zero remaining unavailable struct pages tools/testing/selftests/vm/gup_benchmark.c: add MAP_HUGETLB option tools/testing/selftests/vm/gup_benchmark.c: add MAP_SHARED option tools/testing/selftests/vm/gup_benchmark.c: allow user specified file tools/testing/selftests/vm/gup_benchmark.c: fix 'write' flag usage mm/gup_benchmark.c: add additional pinning methods mm/gup_benchmark.c: time put_page() mm: don't raise MEMCG_OOM event due to failed high-order allocation mm/page-writeback.c: fix range_cyclic writeback vs writepages deadlock ... commit 4904008165c8a1c48602b8316139691b8c735e6e Merge: a45dcff7489f aab456dfa404 Author: Linus Torvalds Date: Fri Oct 26 19:25:07 2018 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: "What better way to start off a weekend than with some networking bug fixes: 1) net namespace leak in dump filtering code of ipv4 and ipv6, fixed by David Ahern and Bjørn Mork. 2) Handle bad checksums from hardware when using CHECKSUM_COMPLETE properly in UDP, from Sean Tranchetti. 3) Remove TCA_OPTIONS from policy validation, it turns out we don't consistently use nested attributes for this across all packet schedulers. From David Ahern. 4) Fix SKB corruption in cadence driver, from Tristram Ha. 5) Fix broken WoL handling in r8169 driver, from Heiner Kallweit. 6) Fix OOPS in pneigh_dump_table(), from Eric Dumazet" * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (28 commits) net/neigh: fix NULL deref in pneigh_dump_table() net: allow traceroute with a specified interface in a vrf bridge: do not add port to router list when receives query with source 0.0.0.0 net/smc: fix smc_buf_unuse to use the lgr pointer ipv6/ndisc: Preserve IPv6 control buffer if protocol error handlers are called net/{ipv4,ipv6}: Do not put target net if input nsid is invalid lan743x: Remove SPI dependency from Microchip group. drivers: net: remove inclusion when not needed net: phy: genphy_10g_driver: Avoid NULL pointer dereference r8169: fix broken Wake-on-LAN from S5 (poweroff) octeontx2-af: Use GFP_ATOMIC under spin lock net: ethernet: cadence: fix socket buffer corruption problem net/ipv6: Allow onlink routes to have a device mismatch if it is the default route net: sched: Remove TCA_OPTIONS from policy ice: Poll for link status change ice: Allocate VF interrupts and set queue map ice: Introduce ice_dev_onetime_setup net: hns3: Fix for warning uninitialized symbol hw_err_lst3 octeontx2-af: Copy the right amount of memory net: udp: fix handling of CHECKSUM_COMPLETE packets ... commit a45dcff7489f7cb21a3a8e967a90ea41b31c1559 Merge: cc10ad25bbca 6c2fc9cddc1f Author: Linus Torvalds Date: Fri Oct 26 17:15:49 2018 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc Pull sparc fixes from David Miller: "Some more sparc fixups, mostly aimed at getting the allmodconfig build up and clean again" * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc: sparc64: Rework xchg() definition to avoid warnings. sparc64: Export __node_distance. sparc64: Make corrupted user stacks more debuggable. commit 22146c3ce98962436e401f7b7016a6f664c9ffb5 Author: Mike Kravetz Date: Fri Oct 26 15:10:58 2018 -0700 hugetlbfs: dirty pages as they are added to pagecache Some test systems were experiencing negative huge page reserve counts and incorrect file block counts. This was traced to /proc/sys/vm/drop_caches removing clean pages from hugetlbfs file pagecaches. When non-hugetlbfs explicit code removes the pages, the appropriate accounting is not performed. This can be recreated as follows: fallocate -l 2M /dev/hugepages/foo echo 1 > /proc/sys/vm/drop_caches fallocate -l 2M /dev/hugepages/foo grep -i huge /proc/meminfo AnonHugePages: 0 kB ShmemHugePages: 0 kB HugePages_Total: 2048 HugePages_Free: 2047 HugePages_Rsvd: 18446744073709551615 HugePages_Surp: 0 Hugepagesize: 2048 kB Hugetlb: 4194304 kB ls -lsh /dev/hugepages/foo 4.0M -rw-r--r--. 1 root root 2.0M Oct 17 20:05 /dev/hugepages/foo To address this issue, dirty pages as they are added to pagecache. This can easily be reproduced with fallocate as shown above. Read faulted pages will eventually end up being marked dirty. But there is a window where they are clean and could be impacted by code such as drop_caches. So, just dirty them all as they are added to the pagecache. Link: http://lkml.kernel.org/r/b5be45b8-5afe-56cd-9482-28384699a049@oracle.com Fixes: 6bda666a03f0 ("hugepages: fold find_or_alloc_pages into huge_no_page()") Signed-off-by: Mike Kravetz Acked-by: Mihcla Hocko Reviewed-by: Khalid Aziz Cc: Hugh Dickins Cc: Naoya Horiguchi Cc: "Aneesh Kumar K . V" Cc: Andrea Arcangeli Cc: "Kirill A . Shutemov" Cc: Davidlohr Bueso Cc: Alexander Viro Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit aa8aa8a331d27fcef3e60dabb918eb8c5c9a2ad9 Author: Omar Sandoval Date: Fri Oct 26 15:10:55 2018 -0700 mm: export add_swap_extent() Btrfs currently does not support swap files because swap's use of bmap does not work with copy-on-write and multiple devices. See 35054394c4b3 ("Btrfs: stop providing a bmap operation to avoid swapfile corruptions"). However, the swap code has a mechanism for the filesystem to manually add swap extents using add_swap_extent() from the ->swap_activate() aop. iomap has done this since 67482129cdab ("iomap: add a swapfile activation function"). Btrfs will do the same in a later patch, so export add_swap_extent(). Link: http://lkml.kernel.org/r/bb1208575e02829aae51b538709476964f97b1ea.1536704650.git.osandov@fb.com Signed-off-by: Omar Sandoval Reviewed-by: Andrew Morton Cc: David Sterba Cc: Johannes Weiner Cc: Nikolay Borisov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit bc4ae27d817a4e92071ef67cb6368120cfabe7ec Author: Omar Sandoval Date: Fri Oct 26 15:10:51 2018 -0700 mm: split SWP_FILE into SWP_ACTIVATED and SWP_FS The SWP_FILE flag serves two purposes: to make swap_{read,write}page() go through the filesystem, and to make swapoff() call ->swap_deactivate(). For Btrfs, we want the latter but not the former, so split this flag into two. This makes us always call ->swap_deactivate() if ->swap_activate() succeeded, not just if it didn't add any swap extents itself. This also resolves the issue of the very misleading name of SWP_FILE, which is only used for swap files over NFS. Link: http://lkml.kernel.org/r/6d63d8668c4287a4f6d203d65696e96f80abdfc7.1536704650.git.osandov@fb.com Signed-off-by: Omar Sandoval Reviewed-by: Nikolay Borisov Reviewed-by: Andrew Morton Cc: Johannes Weiner Cc: David Sterba Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 91cbacc34512e37c9bb89125ca4b224ca6459245 Author: Michael Ellerman Date: Fri Oct 26 15:10:48 2018 -0700 tools/testing/selftests/vm/map_fixed_noreplace.c: add test for MAP_FIXED_NOREPLACE Add a test for MAP_FIXED_NOREPLACE, based on some code originally by Jann Horn. This would have caught the overlap bug reported by Daniel Micay. I originally suggested to Michal that we create MAP_FIXED_NOREPLACE, but instead of writing a selftest I spent my time bike-shedding whether it should be called MAP_FIXED_SAFE/NOCLOBBER/WEAK/NEW .. mea culpa. Link: http://lkml.kernel.org/r/20181013133929.28653-1-mpe@ellerman.id.au Signed-off-by: Michael Ellerman Reviewed-by: Kees Cook Reviewed-by: Khalid Aziz Acked-by: Michal Hocko Cc: Jann Horn Cc: Andrea Arcangeli Cc: Florian Weimer Cc: John Hubbard Cc: Matthew Wilcox Cc: Abdul Haleem Cc: Joel Stanley Cc: Jason Evans Cc: David Goldblatt Cc: Daniel Micay Cc: Shuah Khan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7eef5f97c1f94c7b72520b42d372037e97a81b95 Author: Andrea Arcangeli Date: Fri Oct 26 15:10:43 2018 -0700 mm: thp: relocate flush_cache_range() in migrate_misplaced_transhuge_page() There should be no cache left by the time we overwrite the old transhuge pmd with the new one. It's already too late to flush through the virtual address because we already copied the page data to the new physical address. So flush the cache before the data copy. Also delete the "end" variable to shutoff a "unused variable" warning on x86 where flush_cache_range() is a noop. Link: http://lkml.kernel.org/r/20181015202311.7209-1-aarcange@redhat.com Signed-off-by: Andrea Arcangeli Acked-by: Kirill A. Shutemov Cc: Aaron Tomlin Cc: Jerome Glisse Cc: Mel Gorman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7066f0f933a1fd707bb38781866657769cff7efc Author: Andrea Arcangeli Date: Fri Oct 26 15:10:40 2018 -0700 mm: thp: fix mmu_notifier in migrate_misplaced_transhuge_page() change_huge_pmd() after arming the numa/protnone pmd doesn't flush the TLB right away. do_huge_pmd_numa_page() flushes the TLB before calling migrate_misplaced_transhuge_page(). By the time do_huge_pmd_numa_page() runs some CPU could still access the page through the TLB. change_huge_pmd() before arming the numa/protnone transhuge pmd calls mmu_notifier_invalidate_range_start(). So there's no need of mmu_notifier_invalidate_range_start()/mmu_notifier_invalidate_range_only_end() sequence in migrate_misplaced_transhuge_page() too, because by the time migrate_misplaced_transhuge_page() runs, the pmd mapping has already been invalidated in the secondary MMUs. It has to or if a secondary MMU can still write to the page, the migrate_page_copy() would lose data. However an explicit mmu_notifier_invalidate_range() is needed before migrate_misplaced_transhuge_page() starts copying the data of the transhuge page or the below can happen for MMU notifier users sharing the primary MMU pagetables and only implementing ->invalidate_range: CPU0 CPU1 GPU sharing linux pagetables using only ->invalidate_range ----------- ------------ --------- GPU secondary MMU writes to the page mapped by the transhuge pmd change_pmd_range() mmu..._range_start() ->invalidate_range_start() noop change_huge_pmd() set_pmd_at(numa/protnone) pmd_unlock() do_huge_pmd_numa_page() CPU TLB flush globally (1) CPU cannot write to page migrate_misplaced_transhuge_page() GPU writes to the page... migrate_page_copy() ...GPU stops writing to the page CPU TLB flush (2) mmu..._range_end() (3) ->invalidate_range_stop() noop ->invalidate_range() GPU secondary MMU is invalidated and cannot write to the page anymore (too late) Just like we need a CPU TLB flush (1) because the TLB flush (2) arrives too late, we also need a mmu_notifier_invalidate_range() before calling migrate_misplaced_transhuge_page(), because the ->invalidate_range() in (3) also arrives too late. This requirement is the result of the lazy optimization in change_huge_pmd() that releases the pmd_lock without first flushing the TLB and without first calling mmu_notifier_invalidate_range(). Even converting the removed mmu_notifier_invalidate_range_only_end() into a mmu_notifier_invalidate_range_end() would not have been enough to fix this, because it run after migrate_page_copy(). After the hugepage data copy is done migrate_misplaced_transhuge_page() can proceed and call set_pmd_at without having to flush the TLB nor any secondary MMUs because the secondary MMU invalidate, just like the CPU TLB flush, has to happen before the migrate_page_copy() is called or it would be a bug in the first place (and it was for drivers using ->invalidate_range()). KVM is unaffected because it doesn't implement ->invalidate_range(). The standard PAGE_SIZEd migrate_misplaced_page is less accelerated and uses the generic migrate_pages which transitions the pte from numa/protnone to a migration entry in try_to_unmap_one() and flushes TLBs and all mmu notifiers there before copying the page. Link: http://lkml.kernel.org/r/20181013002430.698-3-aarcange@redhat.com Signed-off-by: Andrea Arcangeli Acked-by: Mel Gorman Acked-by: Kirill A. Shutemov Reviewed-by: Aaron Tomlin Cc: Jerome Glisse Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d7c3393413fe7e7dc54498ea200ea94742d61e18 Author: Andrea Arcangeli Date: Fri Oct 26 15:10:36 2018 -0700 mm: thp: fix MADV_DONTNEED vs migrate_misplaced_transhuge_page race condition Patch series "migrate_misplaced_transhuge_page race conditions". Aaron found a new instance of the THP MADV_DONTNEED race against pmdp_clear_flush* variants, that was apparently left unfixed. While looking into the race found by Aaron, I may have found two more issues in migrate_misplaced_transhuge_page. These race conditions would not cause kernel instability, but they'd corrupt userland data or leave data non zero after MADV_DONTNEED. I did only minor testing, and I don't expect to be able to reproduce this (especially the lack of ->invalidate_range before migrate_page_copy, requires the latest iommu hardware or infiniband to reproduce). The last patch is noop for x86 and it needs further review from maintainers of archs that implement flush_cache_range() (not in CC yet). To avoid confusion, it's not the first patch that introduces the bug fixed in the second patch, even before removing the pmdp_huge_clear_flush_notify, that _notify suffix was called after migrate_page_copy already run. This patch (of 3): This is a corollary of ced108037c2aa ("thp: fix MADV_DONTNEED vs. numa balancing race"), 58ceeb6bec8 ("thp: fix MADV_DONTNEED vs. MADV_FREE race") and 5b7abeae3af8c ("thp: fix MADV_DONTNEED vs clear soft dirty race). When the above three fixes where posted Dave asked https://lkml.kernel.org/r/929b3844-aec2-0111-fef7-8002f9d4e2b9@intel.com but apparently this was missed. The pmdp_clear_flush* in migrate_misplaced_transhuge_page() was introduced in a54a407fbf7 ("mm: Close races between THP migration and PMD numa clearing"). The important part of such commit is only the part where the page lock is not released until the first do_huge_pmd_numa_page() finished disarming the pagenuma/protnone. The addition of pmdp_clear_flush() wasn't beneficial to such commit and there's no commentary about such an addition either. I guess the pmdp_clear_flush() in such commit was added just in case for safety, but it ended up introducing the MADV_DONTNEED race condition found by Aaron. At that point in time nobody thought of such kind of MADV_DONTNEED race conditions yet (they were fixed later) so the code may have looked more robust by adding the pmdp_clear_flush(). This specific race condition won't destabilize the kernel, but it can confuse userland because after MADV_DONTNEED the memory won't be zeroed out. This also optimizes the code and removes a superfluous TLB flush. [akpm@linux-foundation.org: reflow comment to 80 cols, fix grammar and typo (beacuse)] Link: http://lkml.kernel.org/r/20181013002430.698-2-aarcange@redhat.com Signed-off-by: Andrea Arcangeli Reported-by: Aaron Tomlin Acked-by: Mel Gorman Acked-by: Kirill A. Shutemov Cc: Jerome Glisse Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 026d1eaf5ef1a5d6258b46e4e411cd9f5ab8c41d Author: Clark Williams Date: Fri Oct 26 15:10:32 2018 -0700 mm/kasan/quarantine.c: make quarantine_lock a raw_spinlock_t The static lock quarantine_lock is used in quarantine.c to protect the quarantine queue datastructures. It is taken inside quarantine queue manipulation routines (quarantine_put(), quarantine_reduce() and quarantine_remove_cache()), with IRQs disabled. This is not a problem on a stock kernel but is problematic on an RT kernel where spin locks are sleeping spinlocks, which can sleep and can not be acquired with disabled interrupts. Convert the quarantine_lock to a raw spinlock_t. The usage of quarantine_lock is confined to quarantine.c and the work performed while the lock is held is used for debug purpose. [bigeasy@linutronix.de: slightly altered the commit message] Link: http://lkml.kernel.org/r/20181010214945.5owshc3mlrh74z4b@linutronix.de Signed-off-by: Clark Williams Signed-off-by: Sebastian Andrzej Siewior Acked-by: Sebastian Andrzej Siewior Acked-by: Dmitry Vyukov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit df06b37ffe5a442503b7095b77b0a970df515459 Author: Keith Busch Date: Fri Oct 26 15:10:28 2018 -0700 mm/gup: cache dev_pagemap while pinning pages Getting pages from ZONE_DEVICE memory needs to check the backing device's live-ness, which is tracked in the device's dev_pagemap metadata. This metadata is stored in a radix tree and looking it up adds measurable software overhead. This patch avoids repeating this relatively costly operation when dev_pagemap is used by caching the last dev_pagemap while getting user pages. The gup_benchmark kernel self test reports this reduces time to get user pages to as low as 1/3 of the previous time. Link: http://lkml.kernel.org/r/20181012173040.15669-1-keith.busch@intel.com Signed-off-by: Keith Busch Reviewed-by: Dan Williams Acked-by: Kirill A. Shutemov Cc: Dave Hansen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9fd61bc95130d4971568b89c9548b5e0a4e18e0e Author: Masayoshi Mizuma Date: Fri Oct 26 15:10:24 2018 -0700 Revert "x86/e820: put !E820_TYPE_RAM regions into memblock.reserved" commit 124049decbb1 ("x86/e820: put !E820_TYPE_RAM regions into memblock.reserved") breaks movable_node kernel option because it changed the memory gap range to reserved memblock. So, the node is marked as Normal zone even if the SRAT has Hot pluggable affinity. ===================================================================== kernel: BIOS-e820: [mem 0x0000180000000000-0x0000180fffffffff] usable kernel: BIOS-e820: [mem 0x00001c0000000000-0x00001c0fffffffff] usable ... kernel: reserved[0x12]#011[0x0000181000000000-0x00001bffffffffff], 0x000003f000000000 bytes flags: 0x0 ... kernel: ACPI: SRAT: Node 2 PXM 6 [mem 0x180000000000-0x1bffffffffff] hotplug kernel: ACPI: SRAT: Node 3 PXM 7 [mem 0x1c0000000000-0x1fffffffffff] hotplug ... kernel: Movable zone start for each node kernel: Node 3: 0x00001c0000000000 kernel: Early memory node ranges ... ===================================================================== The original issue is fixed by the former patches, so let's revert commit 124049decbb1 ("x86/e820: put !E820_TYPE_RAM regions into memblock.reserved"). Link: http://lkml.kernel.org/r/20181002143821.5112-4-msys.mizuma@gmail.com Signed-off-by: Masayoshi Mizuma Reviewed-by: Pavel Tatashin Acked-by: Ingo Molnar Cc: Naoya Horiguchi Cc: Michal Hocko Cc: Thomas Gleixner Cc: Oscar Salvador Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ec393a0f014eaf688a3dbe8c8a4cbb52d7f535f9 Author: Pavel Tatashin Date: Fri Oct 26 15:10:21 2018 -0700 mm: return zero_resv_unavail optimization When checking for valid pfns in zero_resv_unavail(), it is not necessary to verify that pfns within pageblock_nr_pages ranges are valid, only the first one needs to be checked. This is because memory for pages are allocated in contiguous chunks that contain pageblock_nr_pages struct pages. Link: http://lkml.kernel.org/r/20181002143821.5112-3-msys.mizuma@gmail.com Signed-off-by: Pavel Tatashin Signed-off-by: Masayoshi Mizuma Reviewed-by: Masayoshi Mizuma Acked-by: Naoya Horiguchi Reviewed-by: Oscar Salvador Cc: Ingo Molnar Cc: Michal Hocko Cc: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 907ec5fca3dc38d37737de826f06f25b063aa08e Author: Naoya Horiguchi Date: Fri Oct 26 15:10:15 2018 -0700 mm: zero remaining unavailable struct pages Patch series "mm: Fix for movable_node boot option", v3. This patch series contains a fix for the movable_node boot option issue which was introduced by commit 124049decbb1 ("x86/e820: put !E820_TYPE_RAM regions into memblock.reserved"). The commit breaks the option because it changed the memory gap range to reserved memblock. So, the node is marked as Normal zone even if the SRAT has Hot pluggable affinity. First and second patch fix the original issue which the commit tried to fix, then revert the commit. This patch (of 3): There is a kernel panic that is triggered when reading /proc/kpageflags on the kernel booted with kernel parameter 'memmap=nn[KMG]!ss[KMG]': BUG: unable to handle kernel paging request at fffffffffffffffe PGD 9b20e067 P4D 9b20e067 PUD 9b210067 PMD 0 Oops: 0000 [#1] SMP PTI CPU: 2 PID: 1728 Comm: page-types Not tainted 4.17.0-rc6-mm1-v4.17-rc6-180605-0816-00236-g2dfb086ef02c+ #160 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.11.0-2.fc28 04/01/2014 RIP: 0010:stable_page_flags+0x27/0x3c0 Code: 00 00 00 0f 1f 44 00 00 48 85 ff 0f 84 a0 03 00 00 41 54 55 49 89 fc 53 48 8b 57 08 48 8b 2f 48 8d 42 ff 83 e2 01 48 0f 44 c7 <48> 8b 00 f6 c4 01 0f 84 10 03 00 00 31 db 49 8b 54 24 08 4c 89 e7 RSP: 0018:ffffbbd44111fde0 EFLAGS: 00010202 RAX: fffffffffffffffe RBX: 00007fffffffeff9 RCX: 0000000000000000 RDX: 0000000000000001 RSI: 0000000000000202 RDI: ffffed1182fff5c0 RBP: ffffffffffffffff R08: 0000000000000001 R09: 0000000000000001 R10: ffffbbd44111fed8 R11: 0000000000000000 R12: ffffed1182fff5c0 R13: 00000000000bffd7 R14: 0000000002fff5c0 R15: ffffbbd44111ff10 FS: 00007efc4335a500(0000) GS:ffff93a5bfc00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: fffffffffffffffe CR3: 00000000b2a58000 CR4: 00000000001406e0 Call Trace: kpageflags_read+0xc7/0x120 proc_reg_read+0x3c/0x60 __vfs_read+0x36/0x170 vfs_read+0x89/0x130 ksys_pread64+0x71/0x90 do_syscall_64+0x5b/0x160 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x7efc42e75e23 Code: 09 00 ba 9f 01 00 00 e8 ab 81 f4 ff 66 2e 0f 1f 84 00 00 00 00 00 90 83 3d 29 0a 2d 00 00 75 13 49 89 ca b8 11 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 34 c3 48 83 ec 08 e8 db d3 01 00 48 89 04 24 According to kernel bisection, this problem became visible due to commit f7f99100d8d9 which changes how struct pages are initialized. Memblock layout affects the pfn ranges covered by node/zone. Consider that we have a VM with 2 NUMA nodes and each node has 4GB memory, and the default (no memmap= given) memblock layout is like below: MEMBLOCK configuration: memory size = 0x00000001fff75c00 reserved size = 0x000000000300c000 memory.cnt = 0x4 memory[0x0] [0x0000000000001000-0x000000000009efff], 0x000000000009e000 bytes on node 0 flags: 0x0 memory[0x1] [0x0000000000100000-0x00000000bffd6fff], 0x00000000bfed7000 bytes on node 0 flags: 0x0 memory[0x2] [0x0000000100000000-0x000000013fffffff], 0x0000000040000000 bytes on node 0 flags: 0x0 memory[0x3] [0x0000000140000000-0x000000023fffffff], 0x0000000100000000 bytes on node 1 flags: 0x0 ... If you give memmap=1G!4G (so it just covers memory[0x2]), the range [0x100000000-0x13fffffff] is gone: MEMBLOCK configuration: memory size = 0x00000001bff75c00 reserved size = 0x000000000300c000 memory.cnt = 0x3 memory[0x0] [0x0000000000001000-0x000000000009efff], 0x000000000009e000 bytes on node 0 flags: 0x0 memory[0x1] [0x0000000000100000-0x00000000bffd6fff], 0x00000000bfed7000 bytes on node 0 flags: 0x0 memory[0x2] [0x0000000140000000-0x000000023fffffff], 0x0000000100000000 bytes on node 1 flags: 0x0 ... This causes shrinking node 0's pfn range because it is calculated by the address range of memblock.memory. So some of struct pages in the gap range are left uninitialized. We have a function zero_resv_unavail() which does zeroing the struct pages outside memblock.memory, but currently it covers only the reserved unavailable range (i.e. memblock.memory && !memblock.reserved). This patch extends it to cover all unavailable range, which fixes the reported issue. Link: http://lkml.kernel.org/r/20181002143821.5112-2-msys.mizuma@gmail.com Fixes: f7f99100d8d9 ("mm: stop zeroing memory during allocation in vmemmap") Signed-off-by: Naoya Horiguchi Signed-off-by-by: Masayoshi Mizuma Tested-by: Oscar Salvador Tested-by: Masayoshi Mizuma Reviewed-by: Pavel Tatashin Cc: Ingo Molnar Cc: Michal Hocko Cc: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3821b76c3cdb5f2c5ef1b082de79829e8ff50a7d Author: Keith Busch Date: Fri Oct 26 15:10:12 2018 -0700 tools/testing/selftests/vm/gup_benchmark.c: add MAP_HUGETLB option Add a new option '-H' to the gup benchmark to help understand how hugetlb mapping pages compare with the default. Link: http://lkml.kernel.org/r/20181010195605.10689-6-keith.busch@intel.com Signed-off-by: Keith Busch Reviewed-by: Andrew Morton Cc: Kirill Shutemov Cc: Dave Hansen Cc: Dan Williams Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0dd8666afb99c71d124e0c2abf1ad7d934a242a0 Author: Keith Busch Date: Fri Oct 26 15:10:08 2018 -0700 tools/testing/selftests/vm/gup_benchmark.c: add MAP_SHARED option Add a new benchmark option, -S, to request MAP_SHARED. This can be used to compare with MAP_PRIVATE, or for files that require this option, like dax. Link: http://lkml.kernel.org/r/20181010195605.10689-5-keith.busch@intel.com Signed-off-by: Keith Busch Reviewed-by: Andrew Morton Cc: Kirill Shutemov Cc: Dave Hansen Cc: Dan Williams Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit aeb85ed4f41a8c0f5c4606d69f5da75e2348d984 Author: Keith Busch Date: Fri Oct 26 15:10:02 2018 -0700 tools/testing/selftests/vm/gup_benchmark.c: allow user specified file Allow a user to specify a file to map by adding a new option, '-f', providing a means to test various file backings. If not specified, the benchmark will use a private mapping of /dev/zero, which produces an anonymous mapping as before. [akpm@linux-foundation.org: avoid using comma operator] Link: http://lkml.kernel.org/r/20181010195605.10689-4-keith.busch@intel.com Signed-off-by: Keith Busch Reviewed-by: Andrew Morton Cc: Kirill Shutemov Cc: Dave Hansen Cc: Dan Williams Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 319e0bec1aecb36c5ac6d23812af487ff2c8f47f Author: Keith Busch Date: Fri Oct 26 15:09:59 2018 -0700 tools/testing/selftests/vm/gup_benchmark.c: fix 'write' flag usage If the '-w' parameter was provided, the benchmark would exit due to a mssing 'break'. Link: http://lkml.kernel.org/r/20181010195605.10689-3-keith.busch@intel.com Signed-off-by: Keith Busch Acked-by: Kirill A. Shutemov Reviewed-by: Andrew Morton Cc: Dave Hansen Cc: Dan Williams Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 714a3a1ebafe6e23af55a5c694c308f4044a7e00 Author: Keith Busch Date: Fri Oct 26 15:09:56 2018 -0700 mm/gup_benchmark.c: add additional pinning methods Provide new gup benchmark ioctl commands to run different user page pinning methods, get_user_pages_longterm() and get_user_pages(), in addition to the existing get_user_pages_fast(). Link: http://lkml.kernel.org/r/20181010195605.10689-2-keith.busch@intel.com Signed-off-by: Keith Busch Acked-by: Kirill A. Shutemov Reviewed-by: Andrew Morton Cc: Dave Hansen Cc: Dan Williams Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 26db3d09d9e1963c9db77cb275bd2d36e56ef57a Author: Keith Busch Date: Fri Oct 26 15:09:52 2018 -0700 mm/gup_benchmark.c: time put_page() We'd like to measure time to unpin user pages, so this adds a second benchmark timer on put_page, separate from get_page. Adding the field breaks this ioctl ABI, but should be okay since this an in-tree kernel selftest. [akpm@linux-foundation.org: add expansion to struct gup_benchmark for future use] Link: http://lkml.kernel.org/r/20181010195605.10689-1-keith.busch@intel.com Signed-off-by: Keith Busch Acked-by: Kirill A. Shutemov Reviewed-by: Andrew Morton Cc: Dave Hansen Cc: Dan Williams Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7a1adfddaf0d11a39fdcaf6e82a88e9c0586e08b Author: Roman Gushchin Date: Fri Oct 26 15:09:48 2018 -0700 mm: don't raise MEMCG_OOM event due to failed high-order allocation It was reported that on some of our machines containers were restarted with OOM symptoms without an obvious reason. Despite there were almost no memory pressure and plenty of page cache, MEMCG_OOM event was raised occasionally, causing the container management software to think, that OOM has happened. However, no tasks have been killed. The following investigation showed that the problem is caused by a failing attempt to charge a high-order page. In such case, the OOM killer is never invoked. As shown below, it can happen under conditions, which are very far from a real OOM: e.g. there is plenty of clean page cache and no memory pressure. There is no sense in raising an OOM event in this case, as it might confuse a user and lead to wrong and excessive actions (e.g. restart the workload, as in my case). Let's look at the charging path in try_charge(). If the memory usage is about memory.max, which is absolutely natural for most memory cgroups, we try to reclaim some pages. Even if we were able to reclaim enough memory for the allocation, the following check can fail due to a race with another concurrent allocation: if (mem_cgroup_margin(mem_over_limit) >= nr_pages) goto retry; For regular pages the following condition will save us from triggering the OOM: if (nr_reclaimed && nr_pages <= (1 << PAGE_ALLOC_COSTLY_ORDER)) goto retry; But for high-order allocation this condition will intentionally fail. The reason behind is that we'll likely fall to regular pages anyway, so it's ok and even preferred to return ENOMEM. In this case the idea of raising MEMCG_OOM looks dubious. Fix this by moving MEMCG_OOM raising to mem_cgroup_oom() after allocation order check, so that the event won't be raised for high order allocations. This change doesn't affect regular pages allocation and charging. Link: http://lkml.kernel.org/r/20181004214050.7417-1-guro@fb.com Signed-off-by: Roman Gushchin Acked-by: David Rientjes Acked-by: Michal Hocko Acked-by: Johannes Weiner Cc: Vladimir Davydov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 64081362e8ff4587b4554087f3cfc73d3e0a4cd7 Author: Dave Chinner Date: Fri Oct 26 15:09:45 2018 -0700 mm/page-writeback.c: fix range_cyclic writeback vs writepages deadlock We've recently seen a workload on XFS filesystems with a repeatable deadlock between background writeback and a multi-process application doing concurrent writes and fsyncs to a small range of a file. range_cyclic writeback Process 1 Process 2 xfs_vm_writepages write_cache_pages writeback_index = 2 cycled = 0 .... find page 2 dirty lock Page 2 ->writepage page 2 writeback page 2 clean page 2 added to bio no more pages write() locks page 1 dirties page 1 locks page 2 dirties page 1 fsync() .... xfs_vm_writepages write_cache_pages start index 0 find page 1 towrite lock Page 1 ->writepage page 1 writeback page 1 clean page 1 added to bio find page 2 towrite lock Page 2 page 2 is writeback write() locks page 1 dirties page 1 fsync() .... xfs_vm_writepages write_cache_pages start index 0 !done && !cycled sets index to 0, restarts lookup find page 1 dirty find page 1 towrite lock Page 1 page 1 is writeback lock Page 1 DEADLOCK because: - process 1 needs page 2 writeback to complete to make enough progress to issue IO pending for page 1 - writeback needs page 1 writeback to complete so process 2 can progress and unlock the page it is blocked on, then it can issue the IO pending for page 2 - process 2 can't make progress until process 1 issues IO for page 1 The underlying cause of the problem here is that range_cyclic writeback is processing pages in descending index order as we hold higher index pages in a structure controlled from above write_cache_pages(). The write_cache_pages() caller needs to be able to submit these pages for IO before write_cache_pages restarts writeback at mapping index 0 to avoid wcp inverting the page lock/writeback wait order. generic_writepages() is not susceptible to this bug as it has no private context held across write_cache_pages() - filesystems using this infrastructure always submit pages in ->writepage immediately and so there is no problem with range_cyclic going back to mapping index 0. However: mpage_writepages() has a private bio context, exofs_writepages() has page_collect fuse_writepages() has fuse_fill_wb_data nfs_writepages() has nfs_pageio_descriptor xfs_vm_writepages() has xfs_writepage_ctx All of these ->writepages implementations can hold pages under writeback in their private structures until write_cache_pages() returns, and hence they are all susceptible to this deadlock. Also worth noting is that ext4 has it's own bastardised version of write_cache_pages() and so it /may/ have an equivalent deadlock. I looked at the code long enough to understand that it has a similar retry loop for range_cyclic writeback reaching the end of the file and then promptly ran away before my eyes bled too much. I'll leave it for the ext4 developers to determine if their code is actually has this deadlock and how to fix it if it has. There's a few ways I can see avoid this deadlock. There's probably more, but these are the first I've though of: 1. get rid of range_cyclic altogether 2. range_cyclic always stops at EOF, and we start again from writeback index 0 on the next call into write_cache_pages() 2a. wcp also returns EAGAIN to ->writepages implementations to indicate range cyclic has hit EOF. writepages implementations can then flush the current context and call wpc again to continue. i.e. lift the retry into the ->writepages implementation 3. range_cyclic uses trylock_page() rather than lock_page(), and it skips pages it can't lock without blocking. It will already do this for pages under writeback, so this seems like a no-brainer 3a. all non-WB_SYNC_ALL writeback uses trylock_page() to avoid blocking as per pages under writeback. I don't think #1 is an option - range_cyclic prevents frequently dirtied lower file offset from starving background writeback of rarely touched higher file offsets. #2 is simple, and I don't think it will have any impact on performance as going back to the start of the file implies an immediate seek. We'll have exactly the same number of seeks if we switch writeback to another inode, and then come back to this one later and restart from index 0. #2a is pretty much "status quo without the deadlock". Moving the retry loop up into the wcp caller means we can issue IO on the pending pages before calling wcp again, and so avoid locking or waiting on pages in the wrong order. I'm not convinced we need to do this given that we get the same thing from #2 on the next writeback call from the writeback infrastructure. #3 is really just a band-aid - it doesn't fix the access/wait inversion problem, just prevents it from becoming a deadlock situation. I'd prefer we fix the inversion, not sweep it under the carpet like this. #3a is really an optimisation that just so happens to include the band-aid fix of #3. So it seems that the simplest way to fix this issue is to implement solution #2 Link: http://lkml.kernel.org/r/20181005054526.21507-1-david@fromorbit.com Signed-off-by: Dave Chinner Reviewed-by: Jan Kara Cc: Nicholas Piggin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a9a9e77fbf2784ae2694696eb772419c0a96159e Author: Pavel Tatashin Date: Fri Oct 26 15:09:40 2018 -0700 mm: move mirrored memory specific code outside of memmap_init_zone memmap_init_zone, is getting complex, because it is called from different contexts: hotplug, and during boot, and also because it must handle some architecture quirks. One of them is mirrored memory. Move the code that decides whether to skip mirrored memory outside of memmap_init_zone, into a separate function. [pasha.tatashin@oracle.com: uninline overlap_memmap_init()] Link: http://lkml.kernel.org/r/20180726193509.3326-4-pasha.tatashin@oracle.com Link: http://lkml.kernel.org/r/20180724235520.10200-4-pasha.tatashin@oracle.com Signed-off-by: Pavel Tatashin Reviewed-by: Oscar Salvador Cc: Pasha Tatashin Cc: Abdul Haleem Cc: Baoquan He Cc: Daniel Jordan Cc: Dan Williams Cc: Dave Hansen Cc: David Rientjes Cc: Greg Kroah-Hartman Cc: Ingo Molnar Cc: Jan Kara Cc: Jérôme Glisse Cc: Kirill A. Shutemov Cc: Michael Ellerman Cc: Michal Hocko Cc: Souptick Joarder Cc: Steven Sistare Cc: Vlastimil Babka Cc: Wei Yang Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d3035be4ce2345d98633a45f93a74e526e94b802 Author: Pavel Tatashin Date: Fri Oct 26 15:09:37 2018 -0700 mm: calculate deferred pages after skipping mirrored memory update_defer_init() should be called only when struct page is about to be initialized. Because it counts number of initialized struct pages, but there we may skip struct pages if there is some mirrored memory. So move, update_defer_init() after checking for mirrored memory. Also, rename update_defer_init() to defer_init() and reverse the return boolean to emphasize that this is a boolean function, that tells that the reset of memmap initialization should be deferred. Make this function self-contained: do not pass number of already initialized pages in this zone by using static counters. I found this bug by reading the code. The effect is that fewer than expected struct pages are initialized early in boot, and it is possible that in some corner cases we may fail to boot when mirrored pages are used. The deferred on demand code should somewhat mitigate this. But this still brings some inconsistencies compared to when booting without mirrored pages, so it is better to fix. [pasha.tatashin@oracle.com: add comment about defer_init's lack of locking] Link: http://lkml.kernel.org/r/20180726193509.3326-3-pasha.tatashin@oracle.com [akpm@linux-foundation.org: make defer_init non-inline, __meminit] Link: http://lkml.kernel.org/r/20180724235520.10200-3-pasha.tatashin@oracle.com Signed-off-by: Pavel Tatashin Reviewed-by: Oscar Salvador Cc: Abdul Haleem Cc: Baoquan He Cc: Daniel Jordan Cc: Dan Williams Cc: Dave Hansen Cc: David Rientjes Cc: Greg Kroah-Hartman Cc: Ingo Molnar Cc: Jan Kara Cc: Jérôme Glisse Cc: Kirill A. Shutemov Cc: Michael Ellerman Cc: Michal Hocko Cc: Souptick Joarder Cc: Steven Sistare Cc: Vlastimil Babka Cc: Wei Yang Cc: Pasha Tatashin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit dfb3ccd00a06d71171961022019bb0f210d2cdc1 Author: Pavel Tatashin Date: Fri Oct 26 15:09:32 2018 -0700 mm: make memmap_init a proper function memmap_init is sometimes a macro sometimes a function based on __HAVE_ARCH_MEMMAP_INIT. It is only a function on ia64. Make memmap_init a weak function instead, and let ia64 redefine it. Link: http://lkml.kernel.org/r/20180724235520.10200-2-pasha.tatashin@oracle.com Signed-off-by: Pavel Tatashin Reviewed-by: Andrew Morton Reviewed-by: Oscar Salvador Cc: Steven Sistare Cc: Daniel Jordan Cc: Kirill A. Shutemov Cc: Michal Hocko Cc: Dan Williams Cc: Jan Kara Cc: Jérôme Glisse Cc: Souptick Joarder Cc: Baoquan He Cc: Greg Kroah-Hartman Cc: Vlastimil Babka Cc: Wei Yang Cc: Dave Hansen Cc: David Rientjes Cc: Ingo Molnar Cc: Pavel Tatashin Cc: Abdul Haleem Cc: Michael Ellerman Cc: Pasha Tatashin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1c2d479a119b84feacbe4de782016f1bf1ad16dc Author: Kirill Tkhai Date: Fri Oct 26 15:09:28 2018 -0700 mm/memcontrol.c: convert mem_cgroup_id::ref to refcount_t type This will allow to use generic refcount_t interfaces to check counters overflow instead of currently existing VM_BUG_ON(). The only difference after the patch is VM_BUG_ON() may cause BUG(), while refcount_t fires with WARN(). But this seems not to be significant here, since such the problems are usually caught by syzbot with panic-on-warn enabled. Link: http://lkml.kernel.org/r/153910718919.7006.13400779039257185427.stgit@localhost.localdomain Signed-off-by: Kirill Tkhai Reviewed-by: Andrew Morton Acked-by: Michal Hocko Cc: Johannes Weiner Cc: Vladimir Davydov Cc: Andrea Parri Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4a222127f3631e6cdde228e3bb6b599f52b96d14 Author: David Rientjes Date: Fri Oct 26 15:09:24 2018 -0700 mm/page_alloc.c: initialize num_movable in move_freepages() If move_freepages_block() returns 0 because !zone_spans_pfn(), *num_movable can hold the value from the stack because it does not get initialized in move_freepages(). Move the initialization to move_freepages_block() to guarantee the value actually makes sense. This currently doesn't affect its only caller where num_movable != NULL, so no bug fix, but just more robust. Link: http://lkml.kernel.org/r/alpine.DEB.2.21.1810051355490.212229@chino.kir.corp.google.com Signed-off-by: David Rientjes Reviewed-by: Andrew Morton Acked-by: Vlastimil Babka Cc: Greg Thelen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 61855f021c3ae2ccc244111e2a321690f9786aed Author: Gustavo A. R. Silva Date: Fri Oct 26 15:09:20 2018 -0700 mm/zsmalloc.c: fix fall-through annotation Replace "fallthru" with a proper "fall through" annotation. This fix is part of the ongoing efforts to enabling -Wimplicit-fallthrough Link: http://lkml.kernel.org/r/20181003105114.GA24423@embeddedor.com Signed-off-by: Gustavo A. R. Silva Reviewed-by: Sergey Senozhatsky Cc: Minchan Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7eaa8c969efa77127de9a05856eef9e5d22cf487 Author: Peter Xu Date: Fri Oct 26 15:09:17 2018 -0700 userfaultfd: selftest: recycle lock threads first Now we recycle the uffd servicing threads earlier than the lock threads. It might happen that when the lock thread is still blocked at a pthread mutex lock while the servicing thread has already quitted for the cpu so the lock thread will be blocked forever and hang the test program. To fix the possible race, recycle the lock threads first. This never happens with current missing-only tests, but when I start to run the write-protection tests (the feature is not yet posted upstream) it happens every time of the run possibly because in that new test we'll need to service two page faults for each lock operation. Link: http://lkml.kernel.org/r/20180930074259.18229-4-peterx@redhat.com Signed-off-by: Peter Xu Acked-by: Mike Rapoport Cc: Shuah Khan Cc: Mike Kravetz Cc: Jerome Glisse Cc: Zi Yan Cc: "Kirill A . Shutemov" Cc: Shaohua Li Cc: Andrea Arcangeli Cc: "Dr . David Alan Gilbert" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 04d877319e2aa3895cc7998adb32de0967d3927b Author: Peter Xu Date: Fri Oct 26 15:09:13 2018 -0700 userfaultfd: selftest: generalize read and poll We do very similar things in read and poll modes, but we're copying the codes around. Share the codes properly on reading the message and handling the page fault to make the code cleaner. Meanwhile this solves previous mismatch of behaviors between the two modes on that the old code: - did not check EAGAIN case in read() mode - ignored BOUNCE_VERIFY check in read() mode Link: http://lkml.kernel.org/r/20180930074259.18229-3-peterx@redhat.com Signed-off-by: Peter Xu Acked-by: Mike Rapoport Cc: Shuah Khan Cc: Mike Kravetz Cc: Jerome Glisse Cc: Zi Yan Cc: "Kirill A . Shutemov" Cc: Shaohua Li Cc: Andrea Arcangeli Cc: "Dr . David Alan Gilbert" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 439de0d7443789c688428429874b8e27f693c00e Author: Peter Xu Date: Fri Oct 26 15:09:09 2018 -0700 userfaultfd: selftest: cleanup help messages Firstly, the help in the comment region is obsolete, now we support three parameters. Since at it, change it and move it into the help message of the program. Also, the help messages dumped here and there is obsolete too. Use a single usage() helper. Link: http://lkml.kernel.org/r/20180930074259.18229-2-peterx@redhat.com Signed-off-by: Peter Xu Acked-by: Mike Rapoport Cc: Shuah Khan Cc: Mike Kravetz Cc: Jerome Glisse Cc: Zi Yan Cc: "Kirill A . Shutemov" Cc: Shaohua Li Cc: Andrea Arcangeli Cc: "Dr . David Alan Gilbert" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f0ecf25a093fc0589f0a6bc4c1ea068bbb67d220 Author: Jann Horn Date: Fri Oct 26 15:09:05 2018 -0700 mm/vmstat.c: assert that vmstat_text is in sync with stat_items_size Having two gigantic arrays that must manually be kept in sync, including ifdefs, isn't exactly robust. To make it easier to catch such issues in the future, add a BUILD_BUG_ON(). Link: http://lkml.kernel.org/r/20181001143138.95119-3-jannh@google.com Signed-off-by: Jann Horn Reviewed-by: Kees Cook Reviewed-by: Andrew Morton Acked-by: Roman Gushchin Acked-by: Michal Hocko Cc: Davidlohr Bueso Cc: Oleg Nesterov Cc: Christoph Lameter Cc: Kemi Wang Cc: Andy Lutomirski Cc: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ff09d7ec9786be4ad7589aa987d7dc66e2dd9160 Author: Aneesh Kumar K.V Date: Fri Oct 26 15:09:01 2018 -0700 mm/memory.c: recheck page table entry with page table lock held We clear the pte temporarily during read/modify/write update of the pte. If we take a page fault while the pte is cleared, the application can get SIGBUS. One such case is with remap_pfn_range without a backing vm_ops->fault callback. do_fault will return SIGBUS in that case. cpu 0 cpu1 mprotect() ptep_modify_prot_start()/pte cleared. . . page fault. . . prep_modify_prot_commit() Fix this by taking page table lock and rechecking for pte_none. [aneesh.kumar@linux.ibm.com: fix crash observed with syzkaller run] Link: http://lkml.kernel.org/r/87va6bwlfg.fsf@linux.ibm.com Link: http://lkml.kernel.org/r/20180926031858.9692-1-aneesh.kumar@linux.ibm.com Signed-off-by: Aneesh Kumar K.V Acked-by: Kirill A. Shutemov Cc: Willem de Bruijn Cc: Eric Dumazet Cc: Ido Schimmel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit cc4b8c794f476076c9ce19f43eb4d98dc4b5e155 Author: Yang Shi Date: Fri Oct 26 15:08:57 2018 -0700 mm: dax: add comment for PFN_SPECIAL The comment for PFN_SPECIAL is missed in pfn_t.h. Add comment to get consistent with other pfn flags. Link: http://lkml.kernel.org/r/1538086549-100536-1-git-send-email-yang.shi@linux.alibaba.com Signed-off-by: Yang Shi Suggested-by: Dan Williams Reviewed-by: Dan Williams Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9bc8039e715da3b53dbac89525323a9f2f69b7b5 Author: Yang Shi Date: Fri Oct 26 15:08:54 2018 -0700 mm: brk: downgrade mmap_sem to read when shrinking brk might be used to shrink memory mapping too other than munmap(). So, it may hold write mmap_sem for long time when shrinking large mapping, as what commit ("mm: mmap: zap pages with read mmap_sem in munmap") described. The brk() will not manipulate vmas anymore after __do_munmap() call for the mapping shrink use case. But, it may set mm->brk after __do_munmap(), which needs hold write mmap_sem. However, a simple trick can workaround this by setting mm->brk before __do_munmap(). Then restore the original value if __do_munmap() fails. With this trick, it is safe to downgrade to read mmap_sem. So, the same optimization, which downgrades mmap_sem to read for zapping pages, is also feasible and reasonable to this case. The period of holding exclusive mmap_sem for shrinking large mapping would be reduced significantly with this optimization. [akpm@linux-foundation.org: tweak comment] [yang.shi@linux.alibaba.com: fix unsigned compare against 0 issue] Link: http://lkml.kernel.org/r/1538687672-17795-1-git-send-email-yang.shi@linux.alibaba.com Link: http://lkml.kernel.org/r/1538067582-60038-2-git-send-email-yang.shi@linux.alibaba.com Signed-off-by: Yang Shi Acked-by: Vlastimil Babka Acked-by: Kirill A. Shutemov Cc: Michal Hocko Cc: Matthew Wilcox Cc: Laurent Dufour Cc: Colin Ian King Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 85a06835f6f1ba79f0f00838ccd5ad840dd1eafb Author: Yang Shi Date: Fri Oct 26 15:08:50 2018 -0700 mm: mremap: downgrade mmap_sem to read when shrinking Other than munmap, mremap might be used to shrink memory mapping too. So, it may hold write mmap_sem for long time when shrinking large mapping, as what commit ("mm: mmap: zap pages with read mmap_sem in munmap") described. The mremap() will not manipulate vmas anymore after __do_munmap() call for the mapping shrink use case, so it is safe to downgrade to read mmap_sem. So, the same optimization, which downgrades mmap_sem to read for zapping pages, is also feasible and reasonable to this case. The period of holding exclusive mmap_sem for shrinking large mapping would be reduced significantly with this optimization. MREMAP_FIXED and MREMAP_MAYMOVE are more complicated to adopt this optimization since they need manipulate vmas after do_munmap(), downgrading mmap_sem may create race window. Simple mapping shrink is the low hanging fruit, and it may cover the most cases of unmap with munmap together. [akpm@linux-foundation.org: tweak comment] [yang.shi@linux.alibaba.com: fix unsigned compare against 0 issue] Link: http://lkml.kernel.org/r/1538687672-17795-2-git-send-email-yang.shi@linux.alibaba.com Link: http://lkml.kernel.org/r/1538067582-60038-1-git-send-email-yang.shi@linux.alibaba.com Signed-off-by: Yang Shi Acked-by: Vlastimil Babka Acked-by: Kirill A. Shutemov Cc: Michal Hocko Cc: Matthew Wilcox Cc: Laurent Dufour Cc: Colin Ian King Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3c0513243a4a07ebad2d59f3d972bef483818ec6 Author: Souptick Joarder Date: Fri Oct 26 15:08:47 2018 -0700 mm/filemap.c: use vmf_error() These codes can be replaced with new inline vmf_error(). Link: http://lkml.kernel.org/r/20180927171411.GA23331@jordon-HP-15-Notebook-PC Signed-off-by: Souptick Joarder Reviewed-by: Andrew Morton Reviewed-by: Jan Kara Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 544db7597ad0fd1ceebf656e2808a209d46ccd9e Author: Alexandre Ghiti Date: Fri Oct 26 15:08:43 2018 -0700 hugetlb: introduce generic version of huge_ptep_get ia64, mips, parisc, powerpc, sh, sparc, x86 architectures use the same version of huge_ptep_get, so move this generic implementation into asm-generic/hugetlb.h. [arnd@arndb.de: fix ARM 3level page tables] Link: http://lkml.kernel.org/r/20181005161722.904274-1-arnd@arndb.de Link: http://lkml.kernel.org/r/20180920060358.16606-12-alex@ghiti.fr Signed-off-by: Alexandre Ghiti Reviewed-by: Luiz Capitulino Reviewed-by: Mike Kravetz Tested-by: Helge Deller [parisc] Acked-by: Catalin Marinas [arm64] Acked-by: Paul Burton [MIPS] Acked-by: Ingo Molnar [x86] Cc: Arnd Bergmann Cc: Benjamin Herrenschmidt Cc: David S. Miller Cc: Fenghua Yu Cc: Heiko Carstens Cc: H. Peter Anvin Cc: Ingo Molnar Cc: James E.J. Bottomley Cc: James Hogan Cc: Martin Schwidefsky Cc: Michael Ellerman Cc: Paul Mackerras Cc: Ralf Baechle Cc: Rich Felker Cc: Russell King Cc: Thomas Gleixner Cc: Tony Luck Cc: Will Deacon Cc: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit facf6d5b8b6c4212519acfefbf3a0e0aeeb5b77e Author: Alexandre Ghiti Date: Fri Oct 26 15:08:39 2018 -0700 hugetlb: introduce generic version of huge_ptep_set_access_flags() arm, ia64, sh, x86 architectures use the same version of huge_ptep_set_access_flags, so move this generic implementation into asm-generic/hugetlb.h. Link: http://lkml.kernel.org/r/20180920060358.16606-11-alex@ghiti.fr Signed-off-by: Alexandre Ghiti Reviewed-by: Luiz Capitulino Reviewed-by: Mike Kravetz Tested-by: Helge Deller [parisc] Acked-by: Catalin Marinas [arm64] Acked-by: Paul Burton [MIPS] Acked-by: Ingo Molnar [x86] Cc: Arnd Bergmann Cc: Benjamin Herrenschmidt Cc: David S. Miller Cc: Fenghua Yu Cc: Heiko Carstens Cc: H. Peter Anvin Cc: Ingo Molnar Cc: James E.J. Bottomley Cc: James Hogan Cc: Martin Schwidefsky Cc: Michael Ellerman Cc: Paul Mackerras Cc: Ralf Baechle Cc: Rich Felker Cc: Russell King Cc: Thomas Gleixner Cc: Tony Luck Cc: Will Deacon Cc: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8e581d433bf796738181e865878a130b4e98f1b9 Author: Alexandre Ghiti Date: Fri Oct 26 15:08:35 2018 -0700 hugetlb: introduce generic version of huge_ptep_set_wrprotect() arm, ia64, mips, powerpc, sh, x86 architectures use the same version of huge_ptep_set_wrprotect, so move this generic implementation into asm-generic/hugetlb.h. Link: http://lkml.kernel.org/r/20180920060358.16606-10-alex@ghiti.fr Signed-off-by: Alexandre Ghiti Reviewed-by: Luiz Capitulino Reviewed-by: Mike Kravetz Tested-by: Helge Deller [parisc] Acked-by: Catalin Marinas [arm64] Acked-by: Paul Burton [MIPS] Acked-by: Ingo Molnar [x86] Cc: Arnd Bergmann Cc: Benjamin Herrenschmidt Cc: David S. Miller Cc: Fenghua Yu Cc: Heiko Carstens Cc: H. Peter Anvin Cc: Ingo Molnar Cc: James E.J. Bottomley Cc: James Hogan Cc: Martin Schwidefsky Cc: Michael Ellerman Cc: Paul Mackerras Cc: Ralf Baechle Cc: Rich Felker Cc: Russell King Cc: Thomas Gleixner Cc: Tony Luck Cc: Will Deacon Cc: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 78d6e4e8ea8700fb3973661eb3774f632bab5842 Author: Alexandre Ghiti Date: Fri Oct 26 15:08:31 2018 -0700 hugetlb: introduce generic version of prepare_hugepage_range arm, arm64, powerpc, sparc, x86 architectures use the same version of prepare_hugepage_range, so move this generic implementation into asm-generic/hugetlb.h. Link: http://lkml.kernel.org/r/20180920060358.16606-9-alex@ghiti.fr Signed-off-by: Alexandre Ghiti Reviewed-by: Luiz Capitulino Reviewed-by: Mike Kravetz Tested-by: Helge Deller [parisc] Acked-by: Catalin Marinas [arm64] Acked-by: Paul Burton [MIPS] Acked-by: Ingo Molnar [x86] Cc: Arnd Bergmann Cc: Benjamin Herrenschmidt Cc: David S. Miller Cc: Fenghua Yu Cc: Heiko Carstens Cc: H. Peter Anvin Cc: Ingo Molnar Cc: James E.J. Bottomley Cc: James Hogan Cc: Martin Schwidefsky Cc: Michael Ellerman Cc: Paul Mackerras Cc: Ralf Baechle Cc: Rich Felker Cc: Russell King Cc: Thomas Gleixner Cc: Tony Luck Cc: Will Deacon Cc: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c4916a008665a6650834a736f80559a7f90e5857 Author: Alexandre Ghiti Date: Fri Oct 26 15:08:26 2018 -0700 hugetlb: introduce generic version of huge_pte_wrprotect arm, arm64, ia64, mips, parisc, powerpc, sh, sparc, x86 architectures use the same version of huge_pte_wrprotect, so move this generic implementation into asm-generic/hugetlb.h. Link: http://lkml.kernel.org/r/20180920060358.16606-8-alex@ghiti.fr Signed-off-by: Alexandre Ghiti Reviewed-by: Luiz Capitulino Reviewed-by: Mike Kravetz Tested-by: Helge Deller [parisc] Acked-by: Catalin Marinas [arm64] Acked-by: Paul Burton [MIPS] Acked-by: Ingo Molnar [x86] Cc: Arnd Bergmann Cc: Benjamin Herrenschmidt Cc: David S. Miller Cc: Fenghua Yu Cc: Heiko Carstens Cc: H. Peter Anvin Cc: Ingo Molnar Cc: James E.J. Bottomley Cc: James Hogan Cc: Martin Schwidefsky Cc: Michael Ellerman Cc: Paul Mackerras Cc: Ralf Baechle Cc: Rich Felker Cc: Russell King Cc: Thomas Gleixner Cc: Tony Luck Cc: Will Deacon Cc: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit cae72abc1af0c1ef4cb39e7187c5af44a7ce17a4 Author: Alexandre Ghiti Date: Fri Oct 26 15:08:22 2018 -0700 hugetlb: introduce generic version of huge_pte_none() arm, arm64, ia64, mips, parisc, powerpc, sh, sparc, x86 architectures use the same version of huge_pte_none, so move this generic implementation into asm-generic/hugetlb.h. Link: http://lkml.kernel.org/r/20180920060358.16606-7-alex@ghiti.fr Signed-off-by: Alexandre Ghiti Reviewed-by: Luiz Capitulino Reviewed-by: Mike Kravetz Tested-by: Helge Deller [parisc] Acked-by: Catalin Marinas [arm64] Acked-by: Paul Burton [MIPS] Acked-by: Ingo Molnar [x86] Cc: Arnd Bergmann Cc: Benjamin Herrenschmidt Cc: David S. Miller Cc: Fenghua Yu Cc: Heiko Carstens Cc: H. Peter Anvin Cc: Ingo Molnar Cc: James E.J. Bottomley Cc: James Hogan Cc: Martin Schwidefsky Cc: Michael Ellerman Cc: Paul Mackerras Cc: Ralf Baechle Cc: Rich Felker Cc: Russell King Cc: Thomas Gleixner Cc: Tony Luck Cc: Will Deacon Cc: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit fe632225bdbd49f5620e7ccfa03268fec9a3e370 Author: Alexandre Ghiti Date: Fri Oct 26 15:08:17 2018 -0700 hugetlb: introduce generic version of huge_ptep_clear_flush arm, x86 architectures use the same version of huge_ptep_clear_flush, so move this generic implementation into asm-generic/hugetlb.h. Link: http://lkml.kernel.org/r/20180920060358.16606-6-alex@ghiti.fr Signed-off-by: Alexandre Ghiti Reviewed-by: Luiz Capitulino Reviewed-by: Mike Kravetz Tested-by: Helge Deller [parisc] Acked-by: Catalin Marinas [arm64] Acked-by: Paul Burton [MIPS] Acked-by: Ingo Molnar [x86] Cc: Arnd Bergmann Cc: Benjamin Herrenschmidt Cc: David S. Miller Cc: Fenghua Yu Cc: Heiko Carstens Cc: H. Peter Anvin Cc: Ingo Molnar Cc: James E.J. Bottomley Cc: James Hogan Cc: Martin Schwidefsky Cc: Michael Ellerman Cc: Paul Mackerras Cc: Ralf Baechle Cc: Rich Felker Cc: Russell King Cc: Thomas Gleixner Cc: Tony Luck Cc: Will Deacon Cc: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a4d838536c6e5c1807a863c860d9e767d55ba681 Author: Alexandre Ghiti Date: Fri Oct 26 15:08:12 2018 -0700 hugetlb: introduce generic version of huge_ptep_get_and_clear() arm, ia64, sh, x86 architectures use the same version of huge_ptep_get_and_clear, so move this generic implementation into asm-generic/hugetlb.h. Link: http://lkml.kernel.org/r/20180920060358.16606-5-alex@ghiti.fr Signed-off-by: Alexandre Ghiti Reviewed-by: Luiz Capitulino Reviewed-by: Mike Kravetz Tested-by: Helge Deller [parisc] Acked-by: Catalin Marinas [arm64] Acked-by: Paul Burton [MIPS] Acked-by: Ingo Molnar [x86] Cc: Arnd Bergmann Cc: Benjamin Herrenschmidt Cc: David S. Miller Cc: Fenghua Yu Cc: Heiko Carstens Cc: H. Peter Anvin Cc: Ingo Molnar Cc: James E.J. Bottomley Cc: James Hogan Cc: Martin Schwidefsky Cc: Michael Ellerman Cc: Paul Mackerras Cc: Ralf Baechle Cc: Rich Felker Cc: Russell King Cc: Thomas Gleixner Cc: Tony Luck Cc: Will Deacon Cc: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit cea685d556330b0265ca62c0d820f687cc9a38d6 Author: Alexandre Ghiti Date: Fri Oct 26 15:08:07 2018 -0700 hugetlb: introduce generic version of set_huge_pte_at() arm, ia64, mips, powerpc, sh, x86 architectures use the same version of set_huge_pte_at, so move this generic implementation into asm-generic/hugetlb.h. Link: http://lkml.kernel.org/r/20180920060358.16606-4-alex@ghiti.fr Signed-off-by: Alexandre Ghiti Reviewed-by: Luiz Capitulino Reviewed-by: Mike Kravetz Tested-by: Helge Deller [parisc] Acked-by: Catalin Marinas [arm64] Acked-by: Paul Burton [MIPS] Acked-by: Ingo Molnar [x86] Cc: Arnd Bergmann Cc: Benjamin Herrenschmidt Cc: David S. Miller Cc: Fenghua Yu Cc: Heiko Carstens Cc: H. Peter Anvin Cc: Ingo Molnar Cc: James E.J. Bottomley Cc: James Hogan Cc: Martin Schwidefsky Cc: Michael Ellerman Cc: Paul Mackerras Cc: Ralf Baechle Cc: Rich Felker Cc: Russell King Cc: Thomas Gleixner Cc: Tony Luck Cc: Will Deacon Cc: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1e5f50fc9d0a653c910df2291f245a8fa7beed11 Author: Alexandre Ghiti Date: Fri Oct 26 15:08:03 2018 -0700 hugetlb: introduce generic version of hugetlb_free_pgd_range arm, arm64, mips, parisc, sh, x86 architectures use the same version of hugetlb_free_pgd_range, so move this generic implementation into asm-generic/hugetlb.h. Link: http://lkml.kernel.org/r/20180920060358.16606-3-alex@ghiti.fr Signed-off-by: Alexandre Ghiti Reviewed-by: Luiz Capitulino Reviewed-by: Mike Kravetz Tested-by: Helge Deller [parisc] Acked-by: Catalin Marinas [arm64] Acked-by: Paul Burton [MIPS] Acked-by: Ingo Molnar [x86] Cc: Arnd Bergmann Cc: Benjamin Herrenschmidt Cc: David S. Miller Cc: Fenghua Yu Cc: Heiko Carstens Cc: H. Peter Anvin Cc: Ingo Molnar Cc: James E.J. Bottomley Cc: James Hogan Cc: Martin Schwidefsky Cc: Michael Ellerman Cc: Paul Mackerras Cc: Ralf Baechle Cc: Rich Felker Cc: Russell King Cc: Thomas Gleixner Cc: Tony Luck Cc: Will Deacon Cc: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d018498ccc92775dd593432ba6f3ef92d4d2a782 Author: Alexandre Ghiti Date: Fri Oct 26 15:07:59 2018 -0700 hugetlb: harmonize hugetlb.h arch specific defines with pgtable.h In order to reduce copy/paste of functions across architectures and then make riscv hugetlb port (and future ports) simpler and smaller, this patchset intends to factorize the numerous hugetlb primitives that are defined across all the architectures. Except for prepare_hugepage_range, this patchset moves the versions that are just pass-through to standard pte primitives into asm-generic/hugetlb.h by using the same #ifdef semantic that can be found in asm-generic/pgtable.h, i.e. __HAVE_ARCH_***. s390 architecture has not been tackled in this serie since it does not use asm-generic/hugetlb.h at all. This patchset has been compiled on all addressed architectures with success (except for parisc, but the problem does not come from this series). This patch (of 11): asm-generic/hugetlb.h proposes generic implementations of hugetlb related functions: use __HAVE_ARCH_HUGE* defines in order to make arch specific implementations of hugetlb functions consistent with pgtable.h scheme. Link: http://lkml.kernel.org/r/20180920060358.16606-2-alex@ghiti.fr Signed-off-by: Alexandre Ghiti Reviewed-by: Luiz Capitulino Reviewed-by: Mike Kravetz Acked-by: Catalin Marinas [arm64] Cc: Russell King Cc: Will Deacon Cc: Tony Luck Cc: Fenghua Yu Cc: Ralf Baechle Cc: Paul Burton Cc: James Hogan Cc: James E.J. Bottomley Cc: Helge Deller 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: H. Peter Anvin Cc: Arnd Bergmann Cc: Martin Schwidefsky Cc: Heiko Carstens Cc: Ingo Molnar [x86] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d4faa40259b8524a09c1b0fcd38a446db0c0b770 Author: Wei Yang Date: Fri Oct 26 15:07:55 2018 -0700 mm: remove unnecessary local variable addr in __get_user_pages_fast() The local variable `addr' in __get_user_pages_fast() is just a shadow of `start'. Since `start' never changes after assignment to `addr', it is fine to replace `start' with it. Also the meaning of [start, end] is more obvious than [addr, end] when passed to gup_pgd_range(). Link: http://lkml.kernel.org/r/20180925021448.20265-1-richard.weiyang@gmail.com Signed-off-by: Wei Yang Reviewed-by: Andrew Morton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 966cf44f637e6aeea7e3d01ba004bf8b5beac78f Author: Alexander Duyck Date: Fri Oct 26 15:07:52 2018 -0700 mm: defer ZONE_DEVICE page initialization to the point where we init pgmap The ZONE_DEVICE pages were being initialized in two locations. One was with the memory_hotplug lock held and another was outside of that lock. The problem with this is that it was nearly doubling the memory initialization time. Instead of doing this twice, once while holding a global lock and once without, I am opting to defer the initialization to the one outside of the lock. This allows us to avoid serializing the overhead for memory init and we can instead focus on per-node init times. One issue I encountered is that devm_memremap_pages and hmm_devmmem_pages_create were initializing only the pgmap field the same way. One wasn't initializing hmm_data, and the other was initializing it to a poison value. Since this is something that is exposed to the driver in the case of hmm I am opting for a third option and just initializing hmm_data to 0 since this is going to be exposed to unknown third party drivers. [alexander.h.duyck@linux.intel.com: fix reference count for pgmap in devm_memremap_pages] Link: http://lkml.kernel.org/r/20181008233404.1909.37302.stgit@localhost.localdomain Link: http://lkml.kernel.org/r/20180925202053.3576.66039.stgit@localhost.localdomain Signed-off-by: Alexander Duyck Reviewed-by: Pavel Tatashin Tested-by: Dan Williams Cc: Dave Hansen Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d483da5bc78b86fe4200d2947f193a745f711713 Author: Alexander Duyck Date: Fri Oct 26 15:07:48 2018 -0700 mm: create non-atomic version of SetPageReserved for init use It doesn't make much sense to use the atomic SetPageReserved at init time when we are using memset to clear the memory and manipulating the page flags via simple "&=" and "|=" operations in __init_single_page. This patch adds a non-atomic version __SetPageReserved that can be used during page init and shows about a 10% improvement in initialization times on the systems I have available for testing. On those systems I saw initialization times drop from around 35 seconds to around 32 seconds to initialize a 3TB block of persistent memory. I believe the main advantage of this is that it allows for more compiler optimization as the __set_bit operation can be reordered whereas the atomic version cannot. I tried adding a bit of documentation based on f1dd2cd13c4 ("mm, memory_hotplug: do not associate hotadded memory to zones until online"). Ideally the reserved flag should be set earlier since there is a brief window where the page is initialization via __init_single_page and we have not set the PG_Reserved flag. I'm leaving that for a future patch set as that will require a more significant refactor. Link: http://lkml.kernel.org/r/20180925202018.3576.11607.stgit@localhost.localdomain Signed-off-by: Alexander Duyck Reviewed-by: Pavel Tatashin Acked-by: Michal Hocko Cc: Dave Hansen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f682a97a00591def7cefbb5003dc04045028e405 Author: Alexander Duyck Date: Fri Oct 26 15:07:45 2018 -0700 mm: provide kernel parameter to allow disabling page init poisoning Patch series "Address issues slowing persistent memory initialization", v5. The main thing this patch set achieves is that it allows us to initialize each node worth of persistent memory independently. As a result we reduce page init time by about 2 minutes because instead of taking 30 to 40 seconds per node and going through each node one at a time, we process all 4 nodes in parallel in the case of a 12TB persistent memory setup spread evenly over 4 nodes. This patch (of 3): On systems with a large amount of memory it can take a significant amount of time to initialize all of the page structs with the PAGE_POISON_PATTERN value. I have seen it take over 2 minutes to initialize a system with over 12TB of RAM. In order to work around the issue I had to disable CONFIG_DEBUG_VM and then the boot time returned to something much more reasonable as the arch_add_memory call completed in milliseconds versus seconds. However in doing that I had to disable all of the other VM debugging on the system. In order to work around a kernel that might have CONFIG_DEBUG_VM enabled on a system that has a large amount of memory I have added a new kernel parameter named "vm_debug" that can be set to "-" in order to disable it. Link: http://lkml.kernel.org/r/20180925201921.3576.84239.stgit@localhost.localdomain Reviewed-by: Pavel Tatashin Signed-off-by: Alexander Duyck Cc: Dave Hansen Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 85cfb245060e45640fa3447f8b0bad5e8bd3bdaf Author: Shakeel Butt Date: Fri Oct 26 15:07:41 2018 -0700 memcg: remove memcg_kmem_skip_account The flag memcg_kmem_skip_account was added during the era of opt-out kmem accounting. There is no need for such flag in the opt-in world as there aren't any __GFP_ACCOUNT allocations within memcg_create_cache_enqueue(). Link: http://lkml.kernel.org/r/20180919004501.178023-1-shakeelb@google.com Signed-off-by: Shakeel Butt Acked-by: Johannes Weiner Cc: Michal Hocko Cc: Vladimir Davydov Cc: Greg Thelen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 86b27beae59685a42f81bcda9d502b5aebddfab8 Author: Oscar Salvador Date: Fri Oct 26 15:07:38 2018 -0700 mm/memory_hotplug.c: clean up node_states_check_changes_offline() This patch, as the previous one, gets rid of the wrong if statements. While at it, I realized that the comments are sometimes very confusing, to say the least, and wrong. For example: ___ zone_last = ZONE_MOVABLE; /* * check whether node_states[N_HIGH_MEMORY] will be changed * If we try to offline the last present @nr_pages from the node, * we can determind we will need to clear the node from * node_states[N_HIGH_MEMORY]. */ for (; zt <= zone_last; zt++) present_pages += pgdat->node_zones[zt].present_pages; if (nr_pages >= present_pages) arg->status_change_nid = zone_to_nid(zone); else arg->status_change_nid = -1; ___ In case the node gets empry, it must be removed from N_MEMORY. We already check N_HIGH_MEMORY a bit above within the CONFIG_HIGHMEM ifdef code. Not to say that status_change_nid is for N_MEMORY, and not for N_HIGH_MEMORY. So I re-wrote some of the comments to what I think is better. [osalvador@suse.de: address feedback from Pavel] Link: http://lkml.kernel.org/r/20180921132634.10103-5-osalvador@techadventures.net Link: http://lkml.kernel.org/r/20180919100819.25518-6-osalvador@techadventures.net Signed-off-by: Oscar Salvador Reviewed-by: Pavel Tatashin Cc: Michal Hocko Cc: Dan Williams Cc: David Hildenbrand Cc: Jonathan Cameron Cc: Cc: Mathieu Malaterre Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8efe33f40f3e69ac6069ed46666d2d527ddc2c04 Author: Oscar Salvador Date: Fri Oct 26 15:07:34 2018 -0700 mm/memory_hotplug.c: simplify node_states_check_changes_online While looking at node_states_check_changes_online, I stumbled upon some confusing things. Right after entering the function, we find this: if (N_MEMORY == N_NORMAL_MEMORY) zone_last = ZONE_MOVABLE; This is wrong. N_MEMORY cannot really be equal to N_NORMAL_MEMORY. My guess is that this wanted to be something like: if (N_NORMAL_MEMORY == N_HIGH_MEMORY) to check if we have CONFIG_HIGHMEM. Later on, in the CONFIG_HIGHMEM block, we have: if (N_MEMORY == N_HIGH_MEMORY) zone_last = ZONE_MOVABLE; Again, this is wrong, and will never be evaluated to true. Besides removing these wrong if statements, I simplified the function a bit. [osalvador@suse.de: address feedback from Pavel] Link: http://lkml.kernel.org/r/20180921132634.10103-4-osalvador@techadventures.net Link: http://lkml.kernel.org/r/20180919100819.25518-5-osalvador@techadventures.net Signed-off-by: Oscar Salvador Reviewed-by: Pavel Tatashin Cc: Dan Williams Cc: David Hildenbrand Cc: Jonathan Cameron Cc: Mathieu Malaterre Cc: Michal Hocko Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit cf01f6f5e398a74f00fa9ac490ec98c12e63e4b1 Author: Oscar Salvador Date: Fri Oct 26 15:07:28 2018 -0700 mm/memory_hotplug.c: tidy up node_states_clear_node() node_states_clear has the following if statements: if ((N_MEMORY != N_NORMAL_MEMORY) && (arg->status_change_nid_high >= 0)) ... if ((N_MEMORY != N_HIGH_MEMORY) && (arg->status_change_nid >= 0)) ... N_MEMORY can never be equal to neither N_NORMAL_MEMORY nor N_HIGH_MEMORY. Similar problem was found in [1]. Since this is wrong, let us get rid of it. [1] https://patchwork.kernel.org/patch/10579155/ Link: http://lkml.kernel.org/r/20180919100819.25518-4-osalvador@techadventures.net Signed-off-by: Oscar Salvador Reviewed-by: Pavel Tatashin Cc: Dan Williams Cc: David Hildenbrand Cc: Jonathan Cameron Cc: Mathieu Malaterre Cc: Michal Hocko Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 83d83612d707c3709e030c745e3df8d4e17bbfa2 Author: Oscar Salvador Date: Fri Oct 26 15:07:25 2018 -0700 mm/memory_hotplug.c: spare unnecessary calls to node_set_state In node_states_check_changes_online, we check if the node will have to be set for any of the N_*_MEMORY states after the pages have been onlined. Later on, we perform the activation in node_states_set_node. Currently, in node_states_set_node we set the node to N_MEMORY unconditionally. This means that we call node_set_state for N_MEMORY every time pages go online, but we only need to do it if the node has not yet been set for N_MEMORY. Fix this by checking status_change_nid. Link: http://lkml.kernel.org/r/20180919100819.25518-2-osalvador@techadventures.net Signed-off-by: Oscar Salvador Reviewed-by: Pavel Tatashin Cc: Michal Hocko Cc: Dan Williams Cc: David Hildenbrand Cc: Jonathan Cameron Cc: Cc: Mathieu Malaterre Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3cb7b121ff4dfbf202845b8ea27d9a437eae210f Author: haiqing.shq Date: Fri Oct 26 15:07:22 2018 -0700 mm/filemap.c: Use existing variable Use the variable write_len instead of ov_iter_count(from). Link: http://lkml.kernel.org/r/1537375855-2088-1-git-send-email-leviathan0992@gmail.com Signed-off-by: haiqing.shq Reviewed-by: Andrew Morton Cc: Jan Kara Cc: Al Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit cb4922496ae40a775a1b17025eaa1060e8991253 Author: Yang Shi Date: Fri Oct 26 15:07:18 2018 -0700 mm: unmap VM_PFNMAP mappings with optimized path When unmapping VM_PFNMAP mappings, vm flags need to be updated. Since the vmas have been detached, so it sounds safe to update vm flags with read mmap_sem. Link: http://lkml.kernel.org/r/1537376621-51150-4-git-send-email-yang.shi@linux.alibaba.com Signed-off-by: Yang Shi Reviewed-by: Matthew Wilcox Acked-by: Kirill A. Shutemov Acked-by: Vlastimil Babka Cc: Michal Hocko Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b4cefb36051244bcb5651026d862c332a6cac7df Author: Yang Shi Date: Fri Oct 26 15:07:15 2018 -0700 mm: unmap VM_HUGETLB mappings with optimized path When unmapping VM_HUGETLB mappings, vm flags need to be updated. Since the vmas have been detached, so it sounds safe to update vm flags with read mmap_sem. Link: http://lkml.kernel.org/r/1537376621-51150-3-git-send-email-yang.shi@linux.alibaba.com Signed-off-by: Yang Shi Reviewed-by: Matthew Wilcox Acked-by: Kirill A. Shutemov Acked-by: Vlastimil Babka Cc: Michal Hocko Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit dd2283f2605e3b3e9c61bcae844b34f2afa4813f Author: Yang Shi Date: Fri Oct 26 15:07:11 2018 -0700 mm: mmap: zap pages with read mmap_sem in munmap Patch series "mm: zap pages with read mmap_sem in munmap for large mapping", v11. Background: Recently, when we ran some vm scalability tests on machines with large memory, we ran into a couple of mmap_sem scalability issues when unmapping large memory space, please refer to https://lkml.org/lkml/2017/12/14/733 and https://lkml.org/lkml/2018/2/20/576. History: Then akpm suggested to unmap large mapping section by section and drop mmap_sem at a time to mitigate it (see https://lkml.org/lkml/2018/3/6/784). V1 patch series was submitted to the mailing list per Andrew's suggestion (see https://lkml.org/lkml/2018/3/20/786). Then I received a lot great feedback and suggestions. Then this topic was discussed on LSFMM summit 2018. In the summit, Michal Hocko suggested (also in the v1 patches review) to try "two phases" approach. Zapping pages with read mmap_sem, then doing via cleanup with write mmap_sem (for discussion detail, see https://lwn.net/Articles/753269/) Approach: Zapping pages is the most time consuming part, according to the suggestion from Michal Hocko [1], zapping pages can be done with holding read mmap_sem, like what MADV_DONTNEED does. Then re-acquire write mmap_sem to cleanup vmas. But, we can't call MADV_DONTNEED directly, since there are two major drawbacks: * The unexpected state from PF if it wins the race in the middle of munmap. It may return zero page, instead of the content or SIGSEGV. * Can't handle VM_LOCKED | VM_HUGETLB | VM_PFNMAP and uprobe mappings, which is a showstopper from akpm But, some part may need write mmap_sem, for example, vma splitting. So, the design is as follows: acquire write mmap_sem lookup vmas (find and split vmas) deal with special mappings detach vmas downgrade_write zap pages free page tables release mmap_sem The vm events with read mmap_sem may come in during page zapping, but since vmas have been detached before, they, i.e. page fault, gup, etc, will not be able to find valid vma, then just return SIGSEGV or -EFAULT as expected. If the vma has VM_HUGETLB | VM_PFNMAP, they are considered as special mappings. They will be handled by falling back to regular do_munmap() with exclusive mmap_sem held in this patch since they may update vm flags. But, with the "detach vmas first" approach, the vmas have been detached when vm flags are updated, so it sounds safe to update vm flags with read mmap_sem for this specific case. So, VM_HUGETLB and VM_PFNMAP will be handled by using the optimized path in the following separate patches for bisectable sake. Unmapping uprobe areas may need update mm flags (MMF_RECALC_UPROBES). However it is fine to have false-positive MMF_RECALC_UPROBES according to uprobes developer. So, uprobe unmap will not be handled by the regular path. With the "detach vmas first" approach we don't have to re-acquire mmap_sem again to clean up vmas to avoid race window which might get the address space changed since downgrade_write() doesn't release the lock to lead regression, which simply downgrades to read lock. And, since the lock acquire/release cost is managed to the minimum and almost as same as before, the optimization could be extended to any size of mapping without incurring significant penalty to small mappings. For the time being, just do this in munmap syscall path. Other vm_munmap() or do_munmap() call sites (i.e mmap, mremap, etc) remain intact due to some implementation difficulties since they acquire write mmap_sem from very beginning and hold it until the end, do_munmap() might be called in the middle. But, the optimized do_munmap would like to be called without mmap_sem held so that we can do the optimization. So, if we want to do the similar optimization for mmap/mremap path, I'm afraid we would have to redesign them. mremap might be called on very large area depending on the usecases, the optimization to it will be considered in the future. This patch (of 3): When running some mmap/munmap scalability tests with large memory (i.e. > 300GB), the below hung task issue may happen occasionally. INFO: task ps:14018 blocked for more than 120 seconds. Tainted: G E 4.9.79-009.ali3000.alios7.x86_64 #1 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. ps D 0 14018 1 0x00000004 ffff885582f84000 ffff885e8682f000 ffff880972943000 ffff885ebf499bc0 ffff8828ee120000 ffffc900349bfca8 ffffffff817154d0 0000000000000040 00ffffff812f872a ffff885ebf499bc0 024000d000948300 ffff880972943000 Call Trace: [] ? __schedule+0x250/0x730 [] schedule+0x36/0x80 [] rwsem_down_read_failed+0xf0/0x150 [] call_rwsem_down_read_failed+0x18/0x30 [] down_read+0x20/0x40 [] proc_pid_cmdline_read+0xd9/0x4e0 [] ? do_filp_open+0xa5/0x100 [] __vfs_read+0x37/0x150 [] ? security_file_permission+0x9b/0xc0 [] vfs_read+0x96/0x130 [] SyS_read+0x55/0xc0 [] entry_SYSCALL_64_fastpath+0x1a/0xc5 It is because munmap holds mmap_sem exclusively from very beginning to all the way down to the end, and doesn't release it in the middle. When unmapping large mapping, it may take long time (take ~18 seconds to unmap 320GB mapping with every single page mapped on an idle machine). Zapping pages is the most time consuming part, according to the suggestion from Michal Hocko [1], zapping pages can be done with holding read mmap_sem, like what MADV_DONTNEED does. Then re-acquire write mmap_sem to cleanup vmas. But, some part may need write mmap_sem, for example, vma splitting. So, the design is as follows: acquire write mmap_sem lookup vmas (find and split vmas) deal with special mappings detach vmas downgrade_write zap pages free page tables release mmap_sem The vm events with read mmap_sem may come in during page zapping, but since vmas have been detached before, they, i.e. page fault, gup, etc, will not be able to find valid vma, then just return SIGSEGV or -EFAULT as expected. If the vma has VM_HUGETLB | VM_PFNMAP, they are considered as special mappings. They will be handled by without downgrading mmap_sem in this patch since they may update vm flags. But, with the "detach vmas first" approach, the vmas have been detached when vm flags are updated, so it sounds safe to update vm flags with read mmap_sem for this specific case. So, VM_HUGETLB and VM_PFNMAP will be handled by using the optimized path in the following separate patches for bisectable sake. Unmapping uprobe areas may need update mm flags (MMF_RECALC_UPROBES). However it is fine to have false-positive MMF_RECALC_UPROBES according to uprobes developer. With the "detach vmas first" approach we don't have to re-acquire mmap_sem again to clean up vmas to avoid race window which might get the address space changed since downgrade_write() doesn't release the lock to lead regression, which simply downgrades to read lock. And, since the lock acquire/release cost is managed to the minimum and almost as same as before, the optimization could be extended to any size of mapping without incurring significant penalty to small mappings. For the time being, just do this in munmap syscall path. Other vm_munmap() or do_munmap() call sites (i.e mmap, mremap, etc) remain intact due to some implementation difficulties since they acquire write mmap_sem from very beginning and hold it until the end, do_munmap() might be called in the middle. But, the optimized do_munmap would like to be called without mmap_sem held so that we can do the optimization. So, if we want to do the similar optimization for mmap/mremap path, I'm afraid we would have to redesign them. mremap might be called on very large area depending on the usecases, the optimization to it will be considered in the future. With the patches, exclusive mmap_sem hold time when munmap a 80GB address space on a machine with 32 cores of E5-2680 @ 2.70GHz dropped to us level from second. munmap_test-15002 [008] 594.380138: funcgraph_entry: | __vm_munmap() { munmap_test-15002 [008] 594.380146: funcgraph_entry: !2485684 us | unmap_region(); munmap_test-15002 [008] 596.865836: funcgraph_exit: !2485692 us | } Here the execution time of unmap_region() is used to evaluate the time of holding read mmap_sem, then the remaining time is used with holding exclusive lock. [1] https://lwn.net/Articles/753269/ Link: http://lkml.kernel.org/r/1537376621-51150-2-git-send-email-yang.shi@linux.alibaba.com Signed-off-by: Yang Shi Suggested-by: Michal Hocko Suggested-by: Kirill A. Shutemov Suggested-by: Matthew Wilcox Reviewed-by: Matthew Wilcox Acked-by: Kirill A. Shutemov Acked-by: Vlastimil Babka Cc: Laurent Dufour Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a8dda165ec34fac2b4119654330150e2c896e531 Author: Andrey Ryabinin Date: Fri Oct 26 15:07:07 2018 -0700 vfree: add debug might_sleep() Add might_sleep() call to vfree() to catch potential sleep-in-atomic bugs earlier. [aryabinin@virtuozzo.com: drop might_sleep_if() from kvfree()] Link: http://lkml.kernel.org/r/7e19e4df-b1a6-29bd-9ae7-0266d50bef1d@virtuozzo.com Link: http://lkml.kernel.org/r/20180914130512.10394-3-aryabinin@virtuozzo.com Signed-off-by: Andrey Ryabinin Reviewed-by: Andrew Morton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3ca4ea3a7a78a243ee9edf71a2736bc8fb26d70f Author: Andrey Ryabinin Date: Fri Oct 26 15:07:03 2018 -0700 mm/vmalloc.c: improve vfree() kerneldoc vfree() might sleep if called not in interrupt context. Explain that in the comment. Link: http://lkml.kernel.org/r/20180914130512.10394-2-aryabinin@virtuozzo.com Signed-off-by: Andrey Ryabinin Reviewed-by: Andrew Morton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 52414d3302577bb60e4ba3c21b7957da7c7a8d21 Author: Andrey Ryabinin Date: Fri Oct 26 15:07:00 2018 -0700 kvfree(): fix misleading comment vfree() might sleep if called not in interrupt context. So does kvfree() too. Fix misleading kvfree()'s comment about allowed context. Link: http://lkml.kernel.org/r/20180914130512.10394-1-aryabinin@virtuozzo.com Fixes: 04b8e946075d ("mm/util.c: improve kvfree() kerneldoc") Signed-off-by: Andrey Ryabinin Reviewed-by: Andrew Morton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit dedf2c73b80b4566dfcae8ebe9ed46a38b63a1f9 Author: zhong jiang Date: Fri Oct 26 15:06:57 2018 -0700 mm/mempolicy.c: use match_string() helper to simplify the code match_string() returns the index of an array for a matching string, which can be used intead of open coded implementation. Link: http://lkml.kernel.org/r/1536988365-50310-1-git-send-email-zhongjiang@huawei.com Signed-off-by: zhong jiang Reviewed-by: Andrew Morton Acked-by: Michal Hocko Cc: Vlastimil Babka Cc: Andrey Ryabinin Cc: Andrea Arcangeli Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c3df29d13044d885695067fa0b1386824942557a Author: YueHaibing Date: Fri Oct 26 15:06:53 2018 -0700 mm/swap.c: remove duplicated include Remove duplicated include linux/memremap.h Link: http://lkml.kernel.org/r/20180917131308.16420-1-yuehaibing@huawei.com Signed-off-by: YueHaibing Reviewed-by: Andrew Morton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2c029a1ea3aac296cd5b47584a579defcc4b4aa0 Author: Michal Hocko Date: Fri Oct 26 15:06:49 2018 -0700 mm, page_alloc: drop should_suppress_show_mem should_suppress_show_mem() was introduced to reduce the overhead of show_mem on large NUMA systems. Things have changed since then though. Namely c78e93630d15 ("mm: do not walk all of system memory during show_mem") has reduced the overhead considerably. Moreover warn_alloc_show_mem clears SHOW_MEM_FILTER_NODES when called from the IRQ context already so we are not printing per node stats. Remove should_suppress_show_mem because we are losing potentially interesting information about allocation failures. We have seen a bug report where system gets unresponsive under memory pressure and there is only kernel: [2032243.696888] qlge 0000:8b:00.1 ql1: Could not get a page chunk, i=8, clean_idx =200 . kernel: [2032243.710725] swapper/7: page allocation failure: order:1, mode:0x1084120(GFP_ATOMIC|__GFP_COLD|__GFP_COMP) without an additional information for debugging. It would be great to see the state of the page allocator at the moment. Link: http://lkml.kernel.org/r/20180907114334.7088-1-mhocko@kernel.org Signed-off-by: Michal Hocko Acked-by: Vlastimil Babka Cc: David Rientjes Cc: Mel Gorman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e9b257ed150c1f43912bd66031185598451f68a9 Author: Johannes Weiner Date: Fri Oct 26 15:06:45 2018 -0700 mm/memcontrol.c: fix memory.stat item ordering The refault stats go better with the page fault stats, and are of higher interest than the stats on LRU operations. In fact they used to be grouped together; when the LRU operation stats were added later on, they were wedged in between. Move them back together. Documentation/admin-guide/cgroup-v2.rst already lists them in the right order. Link: http://lkml.kernel.org/r/20181010140239.GA2527@cmpxchg.org Signed-off-by: Johannes Weiner Cc: Rik van Riel Cc: Michal Hocko Cc: Peter Zijlstra (Intel) Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4b85afbdacd290c7a22c96df40a6433fdcacb509 Author: Johannes Weiner Date: Fri Oct 26 15:06:42 2018 -0700 mm: zero-seek shrinkers The page cache and most shrinkable slab caches hold data that has been read from disk, but there are some caches that only cache CPU work, such as the dentry and inode caches of procfs and sysfs, as well as the subset of radix tree nodes that track non-resident page cache. Currently, all these are shrunk at the same rate: using DEFAULT_SEEKS for the shrinker's seeks setting tells the reclaim algorithm that for every two page cache pages scanned it should scan one slab object. This is a bogus setting. A virtual inode that required no IO to create is not twice as valuable as a page cache page; shadow cache entries with eviction distances beyond the size of memory aren't either. In most cases, the behavior in practice is still fine. Such virtual caches don't tend to grow and assert themselves aggressively, and usually get picked up before they cause problems. But there are scenarios where that's not true. Our database workloads suffer from two of those. For one, their file workingset is several times bigger than available memory, which has the kernel aggressively create shadow page cache entries for the non-resident parts of it. The workingset code does tell the VM that most of these are expendable, but the VM ends up balancing them 2:1 to cache pages as per the seeks setting. This is a huge waste of memory. These workloads also deal with tens of thousands of open files and use /proc for introspection, which ends up growing the proc_inode_cache to absurdly large sizes - again at the cost of valuable cache space, which isn't a reasonable trade-off, given that proc inodes can be re-created without involving the disk. This patch implements a "zero-seek" setting for shrinkers that results in a target ratio of 0:1 between their objects and IO-backed caches. This allows such virtual caches to grow when memory is available (they do cache/avoid CPU work after all), but effectively disables them as soon as IO-backed objects are under pressure. It then switches the shrinkers for procfs and sysfs metadata, as well as excess page cache shadow nodes, to the new zero-seek setting. Link: http://lkml.kernel.org/r/20181009184732.762-5-hannes@cmpxchg.org Signed-off-by: Johannes Weiner Reported-by: Domas Mituzas Reviewed-by: Andrew Morton Reviewed-by: Rik van Riel Acked-by: Peter Zijlstra (Intel) Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 68d48e6a2df575b935edd420396c3cb8b6aa6ad3 Author: Johannes Weiner Date: Fri Oct 26 15:06:39 2018 -0700 mm: workingset: add vmstat counter for shadow nodes Make it easier to catch bugs in the shadow node shrinker by adding a counter for the shadow nodes in circulation. [akpm@linux-foundation.org: assert that irqs are disabled, for __inc_lruvec_page_state()] [akpm@linux-foundation.org: s/WARN_ON_ONCE/VM_WARN_ON_ONCE/, per Johannes] Link: http://lkml.kernel.org/r/20181009184732.762-4-hannes@cmpxchg.org Signed-off-by: Johannes Weiner Reviewed-by: Andrew Morton Acked-by: Peter Zijlstra (Intel) Cc: Rik van Riel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 505802a53510e54ad5fbbd655a68893df83bfb91 Author: Johannes Weiner Date: Fri Oct 26 15:06:35 2018 -0700 mm: workingset: use cheaper __inc_lruvec_state in irqsafe node reclaim No need to use the preemption-safe lruvec state function inside the reclaim region that has irqs disabled. Link: http://lkml.kernel.org/r/20181009184732.762-3-hannes@cmpxchg.org Signed-off-by: Johannes Weiner Reviewed-by: Andrew Morton Reviewed-by: Rik van Riel Acked-by: Peter Zijlstra (Intel) Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2ce7135adc9ad081aa3c49744144376ac74fea60 Author: Johannes Weiner Date: Fri Oct 26 15:06:31 2018 -0700 psi: cgroup support On a system that executes multiple cgrouped jobs and independent workloads, we don't just care about the health of the overall system, but also that of individual jobs, so that we can ensure individual job health, fairness between jobs, or prioritize some jobs over others. This patch implements pressure stall tracking for cgroups. In kernels with CONFIG_PSI=y, cgroup2 groups will have cpu.pressure, memory.pressure, and io.pressure files that track aggregate pressure stall times for only the tasks inside the cgroup. Link: http://lkml.kernel.org/r/20180828172258.3185-10-hannes@cmpxchg.org Signed-off-by: Johannes Weiner Acked-by: Tejun Heo Acked-by: Peter Zijlstra (Intel) Tested-by: Daniel Drake Tested-by: Suren Baghdasaryan Cc: Christopher Lameter Cc: Ingo Molnar Cc: Johannes Weiner Cc: Mike Galbraith Cc: Peter Enderborg Cc: Randy Dunlap Cc: Shakeel Butt Cc: Vinayak Menon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit eb414681d5a07d28d2ff90dc05f69ec6b232ebd2 Author: Johannes Weiner Date: Fri Oct 26 15:06:27 2018 -0700 psi: pressure stall information for CPU, memory, and IO When systems are overcommitted and resources become contended, it's hard to tell exactly the impact this has on workload productivity, or how close the system is to lockups and OOM kills. In particular, when machines work multiple jobs concurrently, the impact of overcommit in terms of latency and throughput on the individual job can be enormous. In order to maximize hardware utilization without sacrificing individual job health or risk complete machine lockups, this patch implements a way to quantify resource pressure in the system. A kernel built with CONFIG_PSI=y creates files in /proc/pressure/ that expose the percentage of time the system is stalled on CPU, memory, or IO, respectively. Stall states are aggregate versions of the per-task delay accounting delays: cpu: some tasks are runnable but not executing on a CPU memory: tasks are reclaiming, or waiting for swapin or thrashing cache io: tasks are waiting for io completions These percentages of walltime can be thought of as pressure percentages, and they give a general sense of system health and productivity loss incurred by resource overcommit. They can also indicate when the system is approaching lockup scenarios and OOMs. To do this, psi keeps track of the task states associated with each CPU and samples the time they spend in stall states. Every 2 seconds, the samples are averaged across CPUs - weighted by the CPUs' non-idle time to eliminate artifacts from unused CPUs - and translated into percentages of walltime. A running average of those percentages is maintained over 10s, 1m, and 5m periods (similar to the loadaverage). [hannes@cmpxchg.org: doc fixlet, per Randy] Link: http://lkml.kernel.org/r/20180828205625.GA14030@cmpxchg.org [hannes@cmpxchg.org: code optimization] Link: http://lkml.kernel.org/r/20180907175015.GA8479@cmpxchg.org [hannes@cmpxchg.org: rename psi_clock() to psi_update_work(), per Peter] Link: http://lkml.kernel.org/r/20180907145404.GB11088@cmpxchg.org [hannes@cmpxchg.org: fix build] Link: http://lkml.kernel.org/r/20180913014222.GA2370@cmpxchg.org Link: http://lkml.kernel.org/r/20180828172258.3185-9-hannes@cmpxchg.org Signed-off-by: Johannes Weiner Acked-by: Peter Zijlstra (Intel) Tested-by: Daniel Drake Tested-by: Suren Baghdasaryan Cc: Christopher Lameter Cc: Ingo Molnar Cc: Johannes Weiner Cc: Mike Galbraith Cc: Peter Enderborg Cc: Randy Dunlap Cc: Shakeel Butt Cc: Tejun Heo Cc: Vinayak Menon Cc: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 246b3b3342c9b0a2e24cda2178be87bc36e1c874 Author: Johannes Weiner Date: Fri Oct 26 15:06:23 2018 -0700 sched: introduce this_rq_lock_irq() do_sched_yield() disables IRQs, looks up this_rq() and locks it. The next patch is adding another site with the same pattern, so provide a convenience function for it. Link: http://lkml.kernel.org/r/20180828172258.3185-8-hannes@cmpxchg.org Signed-off-by: Johannes Weiner Acked-by: Peter Zijlstra (Intel) Tested-by: Suren Baghdasaryan Tested-by: Daniel Drake Cc: Christopher Lameter Cc: Ingo Molnar Cc: Johannes Weiner Cc: Mike Galbraith Cc: Peter Enderborg Cc: Randy Dunlap Cc: Shakeel Butt Cc: Tejun Heo Cc: Vinayak Menon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1f351d7f7590857ea281579c26e6045b4c548ef4 Author: Johannes Weiner Date: Fri Oct 26 15:06:19 2018 -0700 sched: sched.h: make rq locking and clock functions available in stats.h kernel/sched/sched.h includes "stats.h" half-way through the file. The next patch introduces users of sched.h's rq locking functions and update_rq_clock() in kernel/sched/stats.h. Move those definitions up in the file so they are available in stats.h. Link: http://lkml.kernel.org/r/20180828172258.3185-7-hannes@cmpxchg.org Signed-off-by: Johannes Weiner Acked-by: Peter Zijlstra (Intel) Tested-by: Suren Baghdasaryan Tested-by: Daniel Drake Cc: Christopher Lameter Cc: Ingo Molnar Cc: Johannes Weiner Cc: Mike Galbraith Cc: Peter Enderborg Cc: Randy Dunlap Cc: Shakeel Butt Cc: Tejun Heo Cc: Vinayak Menon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5c54f5b9edb1aa2eabbb1091c458f1b6776a1896 Author: Johannes Weiner Date: Fri Oct 26 15:06:16 2018 -0700 sched: loadavg: make calc_load_n() public It's going to be used in a later patch. Keep the churn separate. Link: http://lkml.kernel.org/r/20180828172258.3185-6-hannes@cmpxchg.org Signed-off-by: Johannes Weiner Acked-by: Peter Zijlstra (Intel) Tested-by: Suren Baghdasaryan Tested-by: Daniel Drake Cc: Christopher Lameter Cc: Ingo Molnar Cc: Johannes Weiner Cc: Mike Galbraith Cc: Peter Enderborg Cc: Randy Dunlap Cc: Shakeel Butt Cc: Tejun Heo Cc: Vinayak Menon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8508cf3ffad4defa202b303e5b6379efc4cd9054 Author: Johannes Weiner Date: Fri Oct 26 15:06:11 2018 -0700 sched: loadavg: consolidate LOAD_INT, LOAD_FRAC, CALC_LOAD There are several definitions of those functions/macros in places that mess with fixed-point load averages. Provide an official version. [akpm@linux-foundation.org: fix missed conversion in block/blk-iolatency.c] Link: http://lkml.kernel.org/r/20180828172258.3185-5-hannes@cmpxchg.org Signed-off-by: Johannes Weiner Acked-by: Peter Zijlstra (Intel) Tested-by: Suren Baghdasaryan Tested-by: Daniel Drake Cc: Christopher Lameter Cc: Ingo Molnar Cc: Johannes Weiner Cc: Mike Galbraith Cc: Peter Enderborg Cc: Randy Dunlap Cc: Shakeel Butt Cc: Tejun Heo Cc: Vinayak Menon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b1d29ba82cf2bc784f4c963ddd6a2cf29e229b33 Author: Johannes Weiner Date: Fri Oct 26 15:06:08 2018 -0700 delayacct: track delays from thrashing cache pages Delay accounting already measures the time a task spends in direct reclaim and waiting for swapin, but in low memory situations tasks spend can spend a significant amount of their time waiting on thrashing page cache. This isn't tracked right now. To know the full impact of memory contention on an individual task, measure the delay when waiting for a recently evicted active cache page to read back into memory. Also update tools/accounting/getdelays.c: [hannes@computer accounting]$ sudo ./getdelays -d -p 1 print delayacct stats ON PID 1 CPU count real total virtual total delay total delay average 50318 745000000 847346785 400533713 0.008ms IO count delay total delay average 435 122601218 0ms SWAP count delay total delay average 0 0 0ms RECLAIM count delay total delay average 0 0 0ms THRASHING count delay total delay average 19 12621439 0ms Link: http://lkml.kernel.org/r/20180828172258.3185-4-hannes@cmpxchg.org Signed-off-by: Johannes Weiner Acked-by: Peter Zijlstra (Intel) Tested-by: Daniel Drake Tested-by: Suren Baghdasaryan Cc: Christopher Lameter Cc: Ingo Molnar Cc: Johannes Weiner Cc: Mike Galbraith Cc: Peter Enderborg Cc: Randy Dunlap Cc: Shakeel Butt Cc: Tejun Heo Cc: Vinayak Menon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1899ad18c6072d689896badafb81267b0a1092a4 Author: Johannes Weiner Date: Fri Oct 26 15:06:04 2018 -0700 mm: workingset: tell cache transitions from workingset thrashing Refaults happen during transitions between workingsets as well as in-place thrashing. Knowing the difference between the two has a range of applications, including measuring the impact of memory shortage on the system performance, as well as the ability to smarter balance pressure between the filesystem cache and the swap-backed workingset. During workingset transitions, inactive cache refaults and pushes out established active cache. When that active cache isn't stale, however, and also ends up refaulting, that's bonafide thrashing. Introduce a new page flag that tells on eviction whether the page has been active or not in its lifetime. This bit is then stored in the shadow entry, to classify refaults as transitioning or thrashing. How many page->flags does this leave us with on 32-bit? 20 bits are always page flags 21 if you have an MMU 23 with the zone bits for DMA, Normal, HighMem, Movable 29 with the sparsemem section bits 30 if PAE is enabled 31 with this patch. So on 32-bit PAE, that leaves 1 bit for distinguishing two NUMA nodes. If that's not enough, the system can switch to discontigmem and re-gain the 6 or 7 sparsemem section bits. Link: http://lkml.kernel.org/r/20180828172258.3185-3-hannes@cmpxchg.org Signed-off-by: Johannes Weiner Acked-by: Peter Zijlstra (Intel) Tested-by: Daniel Drake Tested-by: Suren Baghdasaryan Cc: Christopher Lameter Cc: Ingo Molnar Cc: Johannes Weiner Cc: Mike Galbraith Cc: Peter Enderborg Cc: Randy Dunlap Cc: Shakeel Butt Cc: Tejun Heo Cc: Vinayak Menon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 95f9ab2d596e8cbb388315e78c82b9a131bf2928 Author: Johannes Weiner Date: Fri Oct 26 15:05:59 2018 -0700 mm: workingset: don't drop refault information prematurely Patch series "psi: pressure stall information for CPU, memory, and IO", v4. Overview PSI reports the overall wallclock time in which the tasks in a system (or cgroup) wait for (contended) hardware resources. This helps users understand the resource pressure their workloads are under, which allows them to rootcause and fix throughput and latency problems caused by overcommitting, underprovisioning, suboptimal job placement in a grid; as well as anticipate major disruptions like OOM. Real-world applications We're using the data collected by PSI (and its previous incarnation, memdelay) quite extensively at Facebook, and with several success stories. One usecase is avoiding OOM hangs/livelocks. The reason these happen is because the OOM killer is triggered by reclaim not being able to free pages, but with fast flash devices there is *always* some clean and uptodate cache to reclaim; the OOM killer never kicks in, even as tasks spend 90% of the time thrashing the cache pages of their own executables. There is no situation where this ever makes sense in practice. We wrote a <100 line POC python script to monitor memory pressure and kill stuff way before such pathological thrashing leads to full system losses that would require forcible hard resets. We've since extended and deployed this code into other places to guarantee latency and throughput SLAs, since they're usually violated way before the kernel OOM killer would ever kick in. It is available here: https://github.com/facebookincubator/oomd Eventually we probably want to trigger the in-kernel OOM killer based on extreme sustained pressure as well, so that Linux can avoid memory livelocks - which technically aren't deadlocks, but to the user indistinguishable from them - out of the box. We'd continue using OOMD as the first line of defense to ensure workload health and implement complex kill policies that are beyond the scope of the kernel. We also use PSI memory pressure for loadshedding. Our batch job infrastructure used to use heuristics based on various VM stats to anticipate OOM situations, with lackluster success. We switched it to PSI and managed to anticipate and avoid OOM kills and lockups fairly reliably. The reduction of OOM outages in the worker pool raised the pool's aggregate productivity, and we were able to switch that service to smaller machines. Lastly, we use cgroups to isolate a machine's main workload from maintenance crap like package upgrades, logging, configuration, as well as to prevent multiple workloads on a machine from stepping on each others' toes. We were not able to configure this properly without the pressure metrics; we would see latency or bandwidth drops, but it would often be hard to impossible to rootcause it post-mortem. We now log and graph pressure for the containers in our fleet and can trivially link latency spikes and throughput drops to shortages of specific resources after the fact, and fix the job config/scheduling. PSI has also received testing, feedback, and feature requests from Android and EndlessOS for the purpose of low-latency OOM killing, to intervene in pressure situations before the UI starts hanging. How do you use this feature? A kernel with CONFIG_PSI=y will create a /proc/pressure directory with 3 files: cpu, memory, and io. If using cgroup2, cgroups will also have cpu.pressure, memory.pressure and io.pressure files, which simply aggregate task stalls at the cgroup level instead of system-wide. The cpu file contains one line: some avg10=2.04 avg60=0.75 avg300=0.40 total=157656722 The averages give the percentage of walltime in which one or more tasks are delayed on the runqueue while another task has the CPU. They're recent averages over 10s, 1m, 5m windows, so you can tell short term trends from long term ones, similarly to the load average. The total= value gives the absolute stall time in microseconds. This allows detecting latency spikes that might be too short to sway the running averages. It also allows custom time averaging in case the 10s/1m/5m windows aren't adequate for the usecase (or are too coarse with future hardware). What to make of this "some" metric? If CPU utilization is at 100% and CPU pressure is 0, it means the system is perfectly utilized, with one runnable thread per CPU and nobody waiting. At two or more runnable tasks per CPU, the system is 100% overcommitted and the pressure average will indicate as much. From a utilization perspective this is a great state of course: no CPU cycles are being wasted, even when 50% of the threads were to go idle (as most workloads do vary). From the perspective of the individual job it's not great, however, and they would do better with more resources. Depending on what your priority and options are, raised "some" numbers may or may not require action. The memory file contains two lines: some avg10=70.24 avg60=68.52 avg300=69.91 total=3559632828 full avg10=57.59 avg60=58.06 avg300=60.38 total=3300487258 The some line is the same as for cpu, the time in which at least one task is stalled on the resource. In the case of memory, this includes waiting on swap-in, page cache refaults and page reclaim. The full line, however, indicates time in which *nobody* is using the CPU productively due to pressure: all non-idle tasks are waiting for memory in one form or another. Significant time spent in there is a good trigger for killing things, moving jobs to other machines, or dropping incoming requests, since neither the jobs nor the machine overall are making too much headway. The io file is similar to memory. Because the block layer doesn't have a concept of hardware contention right now (how much longer is my IO request taking due to other tasks?), it reports CPU potential lost on all IO delays, not just the potential lost due to competition. FAQ Q: How is PSI's CPU component different from the load average? A: There are several quirks in the load average that make it hard to impossible to tell how overcommitted the CPU really is. 1. The load average is reported as a raw number of active tasks. You need to know how many CPUs there are in the system, how many CPUs the workload is allowed to use, then think about what the proportion between load and the number of CPUs mean for the tasks trying to run. PSI reports the percentage of wallclock time in which tasks are waiting for a CPU to run on. It doesn't matter how many CPUs are present or usable. The number always tells the quality of life of tasks in the system or in a particular cgroup. 2. The shortest averaging window is 1m, which is extremely coarse, and it's sampled in 5s intervals. A *lot* can happen on a CPU in 5 seconds. This *may* be able to identify persistent long-term trends and very clear and obvious overloads, but it's unusable for latency spikes and more subtle overutilization. PSI's shortest window is 10s. It also exports the cumulative stall times (in microseconds) of synchronously recorded events. 3. On Linux, the load average for historical reasons includes all TASK_UNINTERRUPTIBLE tasks. This gives a broader sense of how busy the system is, but on the flipside it doesn't distinguish whether tasks are likely to contend over the CPU or IO - which obviously requires very different interventions from a sys admin or a job scheduler. PSI reports independent metrics for CPU and IO. You can tell which resource is making the tasks wait, but in conjunction still see how overloaded the system is overall. Q: What's the cost / performance impact of this feature? A: PSI's primary cost is in the scheduler, in particular task wakeups and sleeps. I benchmarked this code using Facebook's two most scheduling sensitive workloads: memcache and webserver. They handle a ton of small requests - lots of wakeups and sleeps with little actual work in between - so they tend to be canaries for scheduler regressions. In the tests, the boxes were handling live traffic over the course of several hours. Half the machines, the control, ran with CONFIG_PSI=n. For memcache I used eight machines total. They're 2-socket, 14 core, 56 thread boxes. The test runs for half the test period, flips the test and control kernels on the hardware to rule out HW factors, DC location etc., then runs the other half of the test. For the webservers, I used 32 machines total. They're single socket, 16 core, 32 thread machines. During the memcache test, CPU load was nopsi=78.05% psi=78.98% in the first half and nopsi=77.52% psi=78.25%, so PSI added between 0.7 and 0.9 percentage points to the CPU load, a difference of about 1%. UPDATE: I re-ran this test with the v3 version of this patch set and the CPU utilization was equivalent between test and control. UPDATE: v4 is on par with v3. As far as end-to-end request latency from the client perspective goes, we don't sample those finely enough to capture the requests going to those particular machines during the test, but we know the p50 turnaround time in this workload is 54us, and perf bench sched pipe on those machines show nopsi=5.232666 us/op and psi=5.587347 us/op, so this doesn't add much here either. The profile for the pipe benchmark shows: 0.87% sched-pipe [kernel.vmlinux] [k] psi_group_change 0.83% perf.real [kernel.vmlinux] [k] psi_group_change 0.82% perf.real [kernel.vmlinux] [k] psi_task_change 0.58% sched-pipe [kernel.vmlinux] [k] psi_task_change The webserver load is running inside 4 nested cgroup levels. The CPU load with both nopsi and psi kernels was indistinguishable at 81%. For comparison, we had to disable the cgroup cpu controller on the webservers because it added 4 percentage points to the CPU% during this same exact test. Versions of this accounting code now run on 80% of our fleet. None of our workloads have reported regressions during the rollout. Daniel Drake said: : I just retested the latest version at : http://git.cmpxchg.org/cgit.cgi/linux-psi.git (Linux 4.18) and the results : are great. : : Test setup: : Endless OS : GeminiLake N4200 low end laptop : 2GB RAM : swap (and zram swap) disabled : : Baseline test: open a handful of large-ish apps and several website : tabs in Google Chrome. : : Results: after a couple of minutes, system is excessively thrashing, mouse : cursor can barely be moved, UI is not responding to mouse clicks, so it's : impractical to recover from this situation as an ordinary user : : Add my simple killer: : https://gist.github.com/dsd/a8988bf0b81a6163475988120fe8d9cd : : Results: when the thrashing causes the UI to become sluggish, the killer : steps in and kills something (usually a chrome tab), and the system : remains usable. I repeatedly opened more apps and more websites over a 15 : minute period but I wasn't able to get the system to a point of UI : unresponsiveness. Suren said: : Backported to 4.9 and retested on ARMv8 8 code system running Android. : Signals behave as expected reacting to memory pressure, no jumps in : "total" counters that would indicate an overflow/underflow issues. Nicely : done! This patch (of 9): If we keep just enough refault information to match the *current* page cache during reclaim time, we could lose a lot of events when there is only a temporary spike in non-cache memory consumption that pushes out all the cache. Once cache comes back, we won't see those refaults. They might not be actionable for LRU aging, but we want to know about them for measuring memory pressure. [hannes@cmpxchg.org: switch to NUMA-aware lru and slab counters] Link: http://lkml.kernel.org/r/20181009184732.762-2-hannes@cmpxchg.org Link: http://lkml.kernel.org/r/20180828172258.3185-2-hannes@cmpxchg.org Signed-off-by: Johannes Weiner Acked-by: Peter Zijlstra (Intel) Reviewed-by: Rik van Riel Tested-by: Daniel Drake Tested-by: Suren Baghdasaryan Cc: Ingo Molnar Cc: Tejun Heo Cc: Vinayak Menon Cc: Christopher Lameter Cc: Peter Enderborg Cc: Shakeel Butt Cc: Mike Galbraith Cc: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f0d77874143df90f9831f30254eb149fc4d76b40 Author: Vlastimil Babka Date: Fri Oct 26 15:05:55 2018 -0700 mm, slab: shorten kmalloc cache names for large sizes Kmalloc cache names can get quite long for large object sizes, when the sizes are expressed in bytes. Use 'k' and 'M' prefixes to make the names as short as possible e.g. in /proc/slabinfo. This works, as we mostly use power-of-two sizes, with exceptions only below 1k. Example: 'kmalloc-4194304' becomes 'kmalloc-4M' Link: http://lkml.kernel.org/r/20180731090649.16028-7-vbabka@suse.cz Suggested-by: Matthew Wilcox Signed-off-by: Vlastimil Babka Acked-by: Mel Gorman Acked-by: Christoph Lameter Acked-by: Roman Gushchin Cc: David Rientjes Cc: Johannes Weiner Cc: Joonsoo Kim Cc: Laura Abbott Cc: Michal Hocko Cc: Sumit Semwal Cc: Vijayanand Jitta Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 61f94e18de94f79abaad3bb83549ff78923ac785 Author: Vlastimil Babka Date: Fri Oct 26 15:05:50 2018 -0700 mm, proc: add KReclaimable to /proc/meminfo The vmstat NR_KERNEL_MISC_RECLAIMABLE counter is for kernel non-slab allocations that can be reclaimed via shrinker. In /proc/meminfo, we can show the sum of all reclaimable kernel allocations (including slab) as "KReclaimable". Add the same counter also to per-node meminfo under /sys With this counter, users will have more complete information about kernel memory usage. Non-slab reclaimable pages (currently just the ION allocator) will not be missing from /proc/meminfo, making users wonder where part of their memory went. More precisely, they already appear in MemAvailable, but without the new counter, it's not obvious why the value in MemAvailable doesn't fully correspond with the sum of other counters participating in it. Link: http://lkml.kernel.org/r/20180731090649.16028-6-vbabka@suse.cz Signed-off-by: Vlastimil Babka Acked-by: Roman Gushchin Cc: Christoph Lameter Cc: David Rientjes Cc: Johannes Weiner Cc: Joonsoo Kim Cc: Laura Abbott Cc: Matthew Wilcox Cc: Mel Gorman Cc: Michal Hocko Cc: Sumit Semwal Cc: Vijayanand Jitta Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b29940c1abd7a4c3abeb926df0a5ec84d6902d47 Author: Vlastimil Babka Date: Fri Oct 26 15:05:46 2018 -0700 mm: rename and change semantics of nr_indirectly_reclaimable_bytes The vmstat counter NR_INDIRECTLY_RECLAIMABLE_BYTES was introduced by commit eb59254608bc ("mm: introduce NR_INDIRECTLY_RECLAIMABLE_BYTES") with the goal of accounting objects that can be reclaimed, but cannot be allocated via a SLAB_RECLAIM_ACCOUNT cache. This is now possible via kmalloc() with __GFP_RECLAIMABLE flag, and the dcache external names user is converted. The counter is however still useful for accounting direct page allocations (i.e. not slab) with a shrinker, such as the ION page pool. So keep it, and: - change granularity to pages to be more like other counters; sub-page allocations should be able to use kmalloc - rename the counter to NR_KERNEL_MISC_RECLAIMABLE - expose the counter again in vmstat as "nr_kernel_misc_reclaimable"; we can again remove the check for not printing "hidden" counters Link: http://lkml.kernel.org/r/20180731090649.16028-5-vbabka@suse.cz Signed-off-by: Vlastimil Babka Acked-by: Christoph Lameter Acked-by: Roman Gushchin Cc: Vijayanand Jitta Cc: Laura Abbott Cc: Sumit Semwal Cc: David Rientjes Cc: Johannes Weiner Cc: Joonsoo Kim Cc: Matthew Wilcox Cc: Mel Gorman Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2e03b4bc4ae84fcc0eee00e5ba5d228901d38809 Author: Vlastimil Babka Date: Fri Oct 26 15:05:41 2018 -0700 dcache: allocate external names from reclaimable kmalloc caches We can use the newly introduced kmalloc-reclaimable-X caches, to allocate external names in dcache, which will take care of the proper accounting automatically, and also improve anti-fragmentation page grouping. This effectively reverts commit f1782c9bc547 ("dcache: account external names as indirectly reclaimable memory") and instead passes __GFP_RECLAIMABLE to kmalloc(). The accounting thus moves from NR_INDIRECTLY_RECLAIMABLE_BYTES to NR_SLAB_RECLAIMABLE, which is also considered in MemAvailable calculation and overcommit decisions. Link: http://lkml.kernel.org/r/20180731090649.16028-4-vbabka@suse.cz Signed-off-by: Vlastimil Babka Acked-by: Mel Gorman Acked-by: Roman Gushchin Cc: Christoph Lameter Cc: David Rientjes Cc: Johannes Weiner Cc: Joonsoo Kim Cc: Laura Abbott Cc: Matthew Wilcox Cc: Michal Hocko Cc: Sumit Semwal Cc: Vijayanand Jitta Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1291523f2c1d631fea34102fd241fb54a4e8f7a0 Author: Vlastimil Babka Date: Fri Oct 26 15:05:38 2018 -0700 mm, slab/slub: introduce kmalloc-reclaimable caches Kmem caches can be created with a SLAB_RECLAIM_ACCOUNT flag, which indicates they contain objects which can be reclaimed under memory pressure (typically through a shrinker). This makes the slab pages accounted as NR_SLAB_RECLAIMABLE in vmstat, which is reflected also the MemAvailable meminfo counter and in overcommit decisions. The slab pages are also allocated with __GFP_RECLAIMABLE, which is good for anti-fragmentation through grouping pages by mobility. The generic kmalloc-X caches are created without this flag, but sometimes are used also for objects that can be reclaimed, which due to varying size cannot have a dedicated kmem cache with SLAB_RECLAIM_ACCOUNT flag. A prominent example are dcache external names, which prompted the creation of a new, manually managed vmstat counter NR_INDIRECTLY_RECLAIMABLE_BYTES in commit f1782c9bc547 ("dcache: account external names as indirectly reclaimable memory"). To better handle this and any other similar cases, this patch introduces SLAB_RECLAIM_ACCOUNT variants of kmalloc caches, named kmalloc-rcl-X. They are used whenever the kmalloc() call passes __GFP_RECLAIMABLE among gfp flags. They are added to the kmalloc_caches array as a new type. Allocations with both __GFP_DMA and __GFP_RECLAIMABLE will use a dma type cache. This change only applies to SLAB and SLUB, not SLOB. This is fine, since SLOB's target are tiny system and this patch does add some overhead of kmem management objects. Link: http://lkml.kernel.org/r/20180731090649.16028-3-vbabka@suse.cz Signed-off-by: Vlastimil Babka Acked-by: Mel Gorman Acked-by: Christoph Lameter Acked-by: Roman Gushchin Cc: David Rientjes Cc: Johannes Weiner Cc: Joonsoo Kim Cc: Laura Abbott Cc: Matthew Wilcox Cc: Michal Hocko Cc: Sumit Semwal Cc: Vijayanand Jitta Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit cc252eae85e09552f9c1e7ac0c3227f835efdf2d Author: Vlastimil Babka Date: Fri Oct 26 15:05:34 2018 -0700 mm, slab: combine kmalloc_caches and kmalloc_dma_caches Patch series "kmalloc-reclaimable caches", v4. As discussed at LSF/MM [1] here's a patchset that introduces kmalloc-reclaimable caches (more details in the second patch) and uses them for dcache external names. That allows us to repurpose the NR_INDIRECTLY_RECLAIMABLE_BYTES counter later in the series. With patch 3/6, dcache external names are allocated from kmalloc-rcl-* caches, eliminating the need for manual accounting. More importantly, it also ensures the reclaimable kmalloc allocations are grouped in pages separate from the regular kmalloc allocations. The need for proper accounting of dcache external names has shown it's easy for misbehaving process to allocate lots of them, causing premature OOMs. Without the added grouping, it's likely that a similar workload can interleave the dcache external names allocations with regular kmalloc allocations (note: I haven't searched myself for an example of such regular kmalloc allocation, but I would be very surprised if there wasn't some). A pathological case would be e.g. one 64byte regular allocations with 63 external dcache names in a page (64x64=4096), which means the page is not freed even after reclaiming after all dcache names, and the process can thus "steal" the whole page with single 64byte allocation. If other kmalloc users similar to dcache external names become identified, they can also benefit from the new functionality simply by adding __GFP_RECLAIMABLE to the kmalloc calls. Side benefits of the patchset (that could be also merged separately) include removed branch for detecting __GFP_DMA kmalloc(), and shortening kmalloc cache names in /proc/slabinfo output. The latter is potentially an ABI break in case there are tools parsing the names and expecting the values to be in bytes. This is how /proc/slabinfo looks like after booting in virtme: ... kmalloc-rcl-4M 0 0 4194304 1 1024 : tunables 1 1 0 : slabdata 0 0 0 ... kmalloc-rcl-96 7 32 128 32 1 : tunables 120 60 8 : slabdata 1 1 0 kmalloc-rcl-64 25 128 64 64 1 : tunables 120 60 8 : slabdata 2 2 0 kmalloc-rcl-32 0 0 32 124 1 : tunables 120 60 8 : slabdata 0 0 0 kmalloc-4M 0 0 4194304 1 1024 : tunables 1 1 0 : slabdata 0 0 0 kmalloc-2M 0 0 2097152 1 512 : tunables 1 1 0 : slabdata 0 0 0 kmalloc-1M 0 0 1048576 1 256 : tunables 1 1 0 : slabdata 0 0 0 ... /proc/vmstat with renamed nr_indirectly_reclaimable_bytes counter: ... nr_slab_reclaimable 2817 nr_slab_unreclaimable 1781 ... nr_kernel_misc_reclaimable 0 ... /proc/meminfo with new KReclaimable counter: ... Shmem: 564 kB KReclaimable: 11260 kB Slab: 18368 kB SReclaimable: 11260 kB SUnreclaim: 7108 kB KernelStack: 1248 kB ... This patch (of 6): The kmalloc caches currently mainain separate (optional) array kmalloc_dma_caches for __GFP_DMA allocations. There are tests for __GFP_DMA in the allocation hotpaths. We can avoid the branches by combining kmalloc_caches and kmalloc_dma_caches into a single two-dimensional array where the outer dimension is cache "type". This will also allow to add kmalloc-reclaimable caches as a third type. Link: http://lkml.kernel.org/r/20180731090649.16028-2-vbabka@suse.cz Signed-off-by: Vlastimil Babka Acked-by: Mel Gorman Acked-by: Christoph Lameter Acked-by: Roman Gushchin Cc: Michal Hocko Cc: Johannes Weiner Cc: David Rientjes Cc: Joonsoo Kim Cc: Matthew Wilcox Cc: Laura Abbott Cc: Sumit Semwal Cc: Vijayanand Jitta Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3b9aadf7278d16d7bed4d5d808501065f70898d8 Author: Andrea Arcangeli Date: Fri Oct 26 15:05:16 2018 -0700 userfaultfd: allow get_mempolicy(MPOL_F_NODE|MPOL_F_ADDR) to trigger userfaults get_mempolicy(MPOL_F_NODE|MPOL_F_ADDR) called a get_user_pages that would not be waiting for userfaults before failing and it would hit on a SIGBUS instead. Using get_user_pages_locked/unlocked instead will allow get_mempolicy to allow userfaults to resolve the fault and fill the hole, before grabbing the node id of the page. If the user calls get_mempolicy() with MPOL_F_ADDR | MPOL_F_NODE for an address inside an area managed by uffd and there is no page at that address, the page allocation from within get_mempolicy() will fail because get_user_pages() does not allow for page fault retry required for uffd; the user will get SIGBUS. With this patch, the page fault will be resolved by the uffd and the get_mempolicy() will continue normally. Background: Via code review, previously the syscall would have returned -EFAULT (vm_fault_to_errno), now it will block and wait for an userfault (if it's waken before the fault is resolved it'll still -EFAULT). This way get_mempolicy will give a chance to an "unaware" app to be compliant with userfaults. The reason this visible change is that becoming "userfault compliant" cannot regress anything: all other syscalls including read(2)/write(2) had to become "userfault compliant" long time ago (that's one of the things userfaultfd can do that PROT_NONE and trapping segfaults can't). So this is just one more syscall that become "userfault compliant" like all other major ones already were. This has been happening on virtio-bridge dpdk process which just called get_mempolicy on the guest space post live migration, but before the memory had a chance to be migrated to destination. I didn't run an strace to be able to show the -EFAULT going away, but I've the confirmation of the below debug aid information (only visible with CONFIG_DEBUG_VM=y) going away with the patch: [20116.371461] FAULT_FLAG_ALLOW_RETRY missing 0 [20116.371464] CPU: 1 PID: 13381 Comm: vhost-events Not tainted 4.17.12-200.fc28.x86_64 #1 [20116.371465] Hardware name: LENOVO 20FAS2BN0A/20FAS2BN0A, BIOS N1CET54W (1.22 ) 02/10/2017 [20116.371466] Call Trace: [20116.371473] dump_stack+0x5c/0x80 [20116.371476] handle_userfault.cold.37+0x1b/0x22 [20116.371479] ? remove_wait_queue+0x20/0x60 [20116.371481] ? poll_freewait+0x45/0xa0 [20116.371483] ? do_sys_poll+0x31c/0x520 [20116.371485] ? radix_tree_lookup_slot+0x1e/0x50 [20116.371488] shmem_getpage_gfp+0xce7/0xe50 [20116.371491] ? page_add_file_rmap+0x1a/0x2c0 [20116.371493] shmem_fault+0x78/0x1e0 [20116.371495] ? filemap_map_pages+0x3a1/0x450 [20116.371498] __do_fault+0x1f/0xc0 [20116.371500] __handle_mm_fault+0xe2e/0x12f0 [20116.371502] handle_mm_fault+0xda/0x200 [20116.371504] __get_user_pages+0x238/0x790 [20116.371506] get_user_pages+0x3e/0x50 [20116.371510] kernel_get_mempolicy+0x40b/0x700 [20116.371512] ? vfs_write+0x170/0x1a0 [20116.371515] __x64_sys_get_mempolicy+0x21/0x30 [20116.371517] do_syscall_64+0x5b/0x160 [20116.371520] entry_SYSCALL_64_after_hwframe+0x44/0xa9 The above harmless debug message (not a kernel crash, just a dump_stack()) is shown with CONFIG_DEBUG_VM=y to more quickly identify and improve kernel spots that may have to become "userfaultfd compliant" like this one (without having to run an strace and search for syscall misbehavior). Spots like the above are more closer to a kernel bug for the non-cooperative usages that Mike focuses on, than for for dpdk qemu-cooperative usages that reproduced it, but it's still nicer to get this fixed for dpdk too. The part of the patch that caused me to think is only the implementation issue of mpol_get, but it looks like it should work safe no matter the kind of mempolicy structure that is (the default static policy also starts at 1 so it'll go to 2 and back to 1 without crashing everything at 0). [rppt@linux.vnet.ibm.com: changelog addition] http://lkml.kernel.org/r/20180904073718.GA26916@rapoport-lnx Link: http://lkml.kernel.org/r/20180831214848.23676-1-aarcange@redhat.com Signed-off-by: Andrea Arcangeli Reported-by: Maxime Coquelin Tested-by: Dr. David Alan Gilbert Reviewed-by: Mike Rapoport Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6471f52af786fc9cb82bf1af9d086fb09c62f99b Author: Mike Rapoport Date: Fri Oct 26 15:05:10 2018 -0700 alpha: switch to NO_BOOTMEM Replace bootmem allocator with memblock and enable use of NO_BOOTMEM like on most other architectures. Alpha gets the description of the physical memory from the firmware as an array of memory clusters. Each cluster that is not reserved by the firmware is added to memblock.memory. Once the memblock.memory is set up, we reserve the kernel and initrd pages with memblock reserve. Since we don't need the bootmem bitmap anymore, the code that finds an appropriate place is removed. The conversion does not take care of NUMA support which is marked broken for more than 10 years now. Link: http://lkml.kernel.org/r/1535952894-10967-1-git-send-email-rppt@linux.vnet.ibm.com Signed-off-by: Mike Rapoport Cc: Richard Henderson Cc: Ivan Kokshaysky Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e92d39cdb120219a16502ca646d407d61cd7adf4 Author: Mike Rapoport Date: Fri Oct 26 15:05:05 2018 -0700 unicore32: switch to NO_BOOTMEM The unicore32 architecture already supports memblock and uses it for some early memory reservations, e.g initrd and the page tables. At some point unicore32 allocates the bootmem bitmap from the memblock and then hands over the memory reservations from memblock to bootmem. This patch removes the bootmem initialization and leaves memblock as the only boot time memory manager for unicore32. Link: http://lkml.kernel.org/r/1533326330-31677-8-git-send-email-rppt@linux.vnet.ibm.com Signed-off-by: Mike Rapoport Acked-by: Guan Xuetao Cc: Ley Foon Tan Cc: Richard Kuo Cc: Richard Weinberger Cc: Rob Herring Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ddf63983576ac2520d13a49f03f2d382ac60e2c7 Author: Mike Rapoport Date: Fri Oct 26 15:05:02 2018 -0700 um: switch to NO_BOOTMEM Replace bootmem initialization with memblock_add and memblock_reserve calls and explicit initialization of {min,max}_low_pfn. Link: http://lkml.kernel.org/r/1533326330-31677-7-git-send-email-rppt@linux.vnet.ibm.com Signed-off-by: Mike Rapoport Acked-by: Richard Weinberger Cc: Guan Xuetao Cc: Ley Foon Tan Cc: Richard Kuo Cc: Rob Herring Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit be6ec5b1eecf1c5e985831540b90a320a9ed3aa5 Author: Mike Rapoport Date: Fri Oct 26 15:04:58 2018 -0700 um: setup_physmem: stop using global variables The setup_physmem() function receives uml_physmem and uml_reserved as parameters and still used these global variables. Replace such usage with local variables. Link: http://lkml.kernel.org/r/1533326330-31677-6-git-send-email-rppt@linux.vnet.ibm.com Signed-off-by: Mike Rapoport Acked-by: Richard Weinberger Cc: Guan Xuetao Cc: Ley Foon Tan Cc: Richard Kuo Cc: Rob Herring Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0042379279bcac871d2a60172f942a3a255ec611 Author: Mike Rapoport Date: Fri Oct 26 15:04:55 2018 -0700 nios2: switch to NO_BOOTMEM Remove bootmem bitmap initialization and replace reserve_bootmem() with memblock_reserve(). Link: http://lkml.kernel.org/r/1533326330-31677-5-git-send-email-rppt@linux.vnet.ibm.com Signed-off-by: Mike Rapoport Acked-by: Ley Foon Tan Cc: Guan Xuetao Cc: Richard Kuo Cc: Richard Weinberger Cc: Rob Herring Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a811c05c16b53ff89e9cfc029ec77a0aae846881 Author: Mike Rapoport Date: Fri Oct 26 15:04:51 2018 -0700 nios2: use generic early_init_dt_add_memory_arch All we have to do is to enable memblock, the generic FDT code will take care of the rest. Link: http://lkml.kernel.org/r/1533326330-31677-4-git-send-email-rppt@linux.vnet.ibm.com Signed-off-by: Mike Rapoport Acked-by: Ley Foon Tan Cc: Guan Xuetao Cc: Richard Kuo Cc: Richard Weinberger Cc: Rob Herring Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6072cf567a2be7f13fb3522156409ca0e7a27ff9 Author: Mike Rapoport Date: Fri Oct 26 15:04:48 2018 -0700 of: ignore sub-page memory regions Memory region size is rounded down to page boundary and with sub-page region it becomes 0 and there is no point to add an empty region. Moreover, when the base is less than PAGE_SIZE we get a bogus size as (base + size - 1) evaluates to -1. 8cccffc52694 ("of: check for size < 0 after rounding in early_init_dt_add_memory_arch") introduced a test for wrap around for the case when base is not page aligned, the same test can be used to ignore sub-page region sizes. Link: http://lkml.kernel.org/r/1533326330-31677-3-git-send-email-rppt@linux.vnet.ibm.com Signed-off-by: Mike Rapoport Reviewed-by: Rob Herring Cc: Guan Xuetao Cc: Ley Foon Tan Cc: Richard Kuo Cc: Richard Weinberger Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 426dcd4b600f72d9f797eae385d85af4128589cc Author: Mike Rapoport Date: Fri Oct 26 15:04:44 2018 -0700 hexagon: switch to NO_BOOTMEM Patch series "switch several architectures NO_BOOTMEM". These patches perform conversion to NO_BOOTMEM of hexagon, nios2, uml and unicore32. This patch (of 7): Add registration of the system memory with memblock, eliminate bootmem initialization and convert early memory reservations from bootmem to memblock. Link: http://lkml.kernel.org/r/1533326330-31677-2-git-send-email-rppt@linux.vnet.ibm.com Signed-off-by: Mike Rapoport Acked-by: Richard Kuo Cc: Guan Xuetao Cc: Ley Foon Tan Cc: Richard Weinberger Cc: Rob Herring Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9b5a8e00d479bb5e55f6902bf50877c080d9506d Author: Matthew Wilcox Date: Fri Oct 26 15:04:40 2018 -0700 mm: convert insert_pfn() to vm_fault_t All callers convert its errno into a vm_fault_t, so convert it to return a vm_fault_t directly. Link: http://lkml.kernel.org/r/20180828145728.11873-11-willy@infradead.org Signed-off-by: Matthew Wilcox Reviewed-by: Andrew Morton Cc: Nicolas Pitre Cc: Souptick Joarder Cc: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 79f3aa5ba989a1fa6e2ef189f2abdfcee25ba663 Author: Matthew Wilcox Date: Fri Oct 26 15:04:37 2018 -0700 mm: convert __vm_insert_mixed() to vm_fault_t Both of its callers currently convert its errno return into a vm_fault_t, so move the conversion into __vm_insert_mixed(). Link: http://lkml.kernel.org/r/20180828145728.11873-10-willy@infradead.org Signed-off-by: Matthew Wilcox Reviewed-by: Andrew Morton Cc: Nicolas Pitre Cc: Souptick Joarder Cc: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6d958546ff611c9ae09b181e628c1c5d5da5ebda Author: Matthew Wilcox Date: Fri Oct 26 15:04:33 2018 -0700 mm: inline vm_insert_pfn_prot() into caller vm_insert_pfn_prot() is only called from vmf_insert_pfn_prot(), so inline it and convert some of the errnos into vm_fault codes earlier. Link: http://lkml.kernel.org/r/20180828145728.11873-9-willy@infradead.org Signed-off-by: Matthew Wilcox Reviewed-by: Andrew Morton Cc: Nicolas Pitre Cc: Souptick Joarder Cc: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ae2b01f37044c10e975d22116755df56252b09d8 Author: Matthew Wilcox Date: Fri Oct 26 15:04:29 2018 -0700 mm: remove vm_insert_pfn() All callers are now converted to vmf_insert_pfn() so convert vmf_insert_pfn() from being a compatibility wrapper around vm_insert_pfn() to being a compatibility wrapper around vmf_insert_pfn_prot(). Link: http://lkml.kernel.org/r/20180828145728.11873-8-willy@infradead.org Signed-off-by: Matthew Wilcox Reviewed-by: Andrew Morton Cc: Nicolas Pitre Cc: Souptick Joarder Cc: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 67fa1666223d7c825f6651add97f0011fe155f36 Author: Matthew Wilcox Date: Fri Oct 26 15:04:26 2018 -0700 mm: remove references to vm_insert_pfn() Documentation and comments. Link: http://lkml.kernel.org/r/20180828145728.11873-7-willy@infradead.org Signed-off-by: Matthew Wilcox Reviewed-by: Andrew Morton Cc: Nicolas Pitre Cc: Souptick Joarder Cc: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit bc12e6ad9617831727e4201e7cbf5c3b868cc8fd Author: Matthew Wilcox Date: Fri Oct 26 15:04:21 2018 -0700 mm: make vm_insert_pfn_prot() static Now this is no longer used outside mm/memory.c, make it static. Link: http://lkml.kernel.org/r/20180828145728.11873-6-willy@infradead.org Signed-off-by: Matthew Wilcox Reviewed-by: Andrew Morton Cc: Nicolas Pitre Cc: Souptick Joarder Cc: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b13fd1dc9f853835784c4c7e09f2059128986adb Author: Matthew Wilcox Date: Fri Oct 26 15:04:16 2018 -0700 x86: convert vdso to use vm_fault_t Return vm_fault_t codes directly from the appropriate mm routines instead of converting from errnos ourselves. Fixes a minor bug where we'd return SIGBUS instead of the correct OOM code if we ran out of memory allocating page tables. Link: http://lkml.kernel.org/r/20180828145728.11873-5-willy@infradead.org Signed-off-by: Matthew Wilcox Reviewed-by: Thomas Gleixner Reviewed-by: Andrew Morton Cc: Nicolas Pitre Cc: Souptick Joarder Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f5e6d1d5f8f3080aa7a51acea1f77085f45abe9c Author: Matthew Wilcox Date: Fri Oct 26 15:04:13 2018 -0700 mm: introduce vmf_insert_pfn_prot() Like vm_insert_pfn_prot(), but returns a vm_fault_t instead of an errno. Also unexport vm_insert_pfn_prot as it has no modular users. Link: http://lkml.kernel.org/r/20180828145728.11873-4-willy@infradead.org Signed-off-by: Matthew Wilcox Reviewed-by: Andrew Morton Cc: Nicolas Pitre Cc: Souptick Joarder Cc: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5d7476374564645b1a2d299e242ad7b17b1104ee Author: Matthew Wilcox Date: Fri Oct 26 15:04:10 2018 -0700 mm: remove vm_insert_mixed() All callers are now converted to vmf_insert_mixed() so convert vmf_insert_mixed() from being a compatibility wrapper into the real function. Link: http://lkml.kernel.org/r/20180828145728.11873-3-willy@infradead.org Signed-off-by: Matthew Wilcox Reviewed-by: Andrew Morton Cc: Nicolas Pitre Cc: Souptick Joarder Cc: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7f2764cfbd85a18170f9d7a4cf01454dead8b0bc Author: Nicolas Pitre Date: Fri Oct 26 15:04:06 2018 -0700 cramfs: convert to use vmf_insert_mixed cramfs is the only remaining user of vm_insert_mixed() and should be converted to vmf_insert_mixed(). Based on a previous patch from Matthew Wilcox. Link: http://lkml.kernel.org/r/nycvar.YSQ.7.76.1808290945450.10215@knanqh.ubzr Signed-off-by: Nicolas Pitre Reviewed-by: Andrew Morton Cc: Souptick Joarder a Cc: Matthew Wilcox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4b96a37d1c684f12468f436c0d79b5e6830d0b0b Author: Souptick Joarder Date: Fri Oct 26 15:04:03 2018 -0700 mm: convert to use vm_fault_t As part of vm_fault_t conversion filemap_page_mkwrite() for the NOMMU case was missed. Now converted. Link: http://lkml.kernel.org/r/20180828174952.GA29229@jordon-HP-15-Notebook-PC Signed-off-by: Souptick Joarder Reviewed-by: Andrew Morton Cc: Matthew Wilcox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7b0e0c0e35f5c7eca719404ca0e38bc964657330 Author: Oscar Salvador Date: Fri Oct 26 15:03:58 2018 -0700 mm/page_alloc.c: clean up check_for_memory() check_for_memory() looks a bit confusing. First of all, we have this: if (N_MEMORY == N_NORMAL_MEMORY) return; Checking the ENUM declaration, looks like N_MEMORY canot be equal to N_NORMAL_MEMORY. I could not find where N_MEMORY is set to N_NORMAL_MEMORY, or the other way around either, so unless I am missing something, this condition will never evaluate to true. It makes sense to get rid of it. Moving forward, the operations within the loop look a bit confusing as well. We set N_HIGH_MEMORY unconditionally, and then we set N_NORMAL_MEMORY in case we have CONFIG_HIGHMEM (N_NORMAL_MEMORY != N_HIGH_MEMORY) and zone <= ZONE_NORMAL. (N_HIGH_MEMORY falls back to N_NORMAL_MEMORY on !CONFIG_HIGHMEM systems, and that is why we can just go ahead and set N_HIGH_MEMORY unconditionally) Although this works, it is a bit subtle. I think that this could be easier to follow: First, we should only set N_HIGH_MEMORY in case we have CONFIG_HIGHMEM. And then we should set N_NORMAL_MEMORY in case zone <= ZONE_NORMAL, without further checking whether we have CONFIG_HIGHMEM or not. Link: http://lkml.kernel.org/r/20180828210158.4617-1-osalvador@techadventures.net Signed-off-by: Oscar Salvador Reviewed-by: Andrew Morton Cc: Michael Hocko Cc: Vlastimil Babka Cc: Pavel Tatashin Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 979aafa5919b106a65646ac5f73f8354c0164e63 Author: Huang Ying Date: Fri Oct 26 15:03:53 2018 -0700 mm/swapfile.c: clear si->swap_map[] in swap_free_cluster() si->swap_map[] of the swap entries in cluster needs to be cleared during freeing. Previously, this is done in the caller of swap_free_cluster(). This may cause code duplication (one user now, will add more users later) and lock/unlock cluster unnecessarily. In this patch, the clearing code is moved to swap_free_cluster() to avoid the downside. Link: http://lkml.kernel.org/r/20180827075535.17406-4-ying.huang@intel.com Signed-off-by: "Huang, Ying" Reviewed-by: Andrew Morton Cc: Dave Hansen Cc: Michal Hocko Cc: Johannes Weiner Cc: Shaohua Li Cc: Hugh Dickins Cc: Minchan Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 10e364da10d73ce4e3b61e1c53319ce93ee51c63 Author: Huang Ying Date: Fri Oct 26 15:03:49 2018 -0700 mm/swapfile.c: call free_swap_slot() in __swap_entry_free() This is a code cleanup patch without functionality change. Originally, when __swap_entry_free() is called, and its return value is 0, free_swap_slot() will always be called to free the swap entry to the per-CPU pool. So move the call to free_swap_slot() to __swap_entry_free() to simplify the code. Link: http://lkml.kernel.org/r/20180827075535.17406-3-ying.huang@intel.com Signed-off-by: "Huang, Ying" Reviewed-by: Andrew Morton Cc: Dave Hansen Cc: Michal Hocko Cc: Johannes Weiner Cc: Shaohua Li Cc: Hugh Dickins Cc: Minchan Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit bcd49e86710b42f15c7512de594d23b3ae0b21d7 Author: Huang Ying Date: Fri Oct 26 15:03:46 2018 -0700 mm/swapfile.c: use __try_to_reclaim_swap() in free_swap_and_cache() The code path to reclaim the swap entry in free_swap_and_cache() is almost same as that of __try_to_reclaim_swap(). The largest difference is just coding style. So the support to the additional requirement of free_swap_and_cache() is added into __try_to_reclaim_swap(). free_swap_and_cache() is changed to call __try_to_reclaim_swap(), and delete the duplicated code. This will improve code readability and reduce the potential bugs. There are 2 functionality differences between __try_to_reclaim_swap() and swap entry reclaim code of free_swap_and_cache(). - free_swap_and_cache() only reclaims the swap entry if the page is unmapped or swap is getting full. The support has been added into __try_to_reclaim_swap(). - try_to_free_swap() (called by __try_to_reclaim_swap()) checks pm_suspended_storage(), while free_swap_and_cache() not. I think this is OK. Because the page and the swap entry can be reclaimed later eventually. Link: http://lkml.kernel.org/r/20180827075535.17406-2-ying.huang@intel.com Signed-off-by: "Huang, Ying" Reviewed-by: Andrew Morton Cc: Dave Hansen Cc: Michal Hocko Cc: Johannes Weiner Cc: Shaohua Li Cc: Hugh Dickins Cc: Minchan Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 154221c3e52083d9f54fa58b4e1090264969f6bc Author: Vincent Whitchurch Date: Fri Oct 26 15:03:42 2018 -0700 kmemleak: add module param to print warnings to dmesg Currently, kmemleak only prints the number of suspected leaks to dmesg but requires the user to read a debugfs file to get the actual stack traces of the objects' allocation points. Add a module option to print the full object information to dmesg too. It can be enabled with kmemleak.verbose=1 on the kernel command line, or "echo 1 > /sys/module/kmemleak/parameters/verbose": This allows easier integration of kmemleak into test systems: We have automated test infrastructure to test our Linux systems. With this option, running our tests with kmemleak is as simple as enabling kmemleak and passing this command line option; the test infrastructure knows how to save kernel logs, which will now include kmemleak reports. Without this option, the test infrastructure needs to be specifically taught to read out the kmemleak debugfs file. Removing this need for special handling makes kmemleak more similar to other kernel debug options (slab debugging, debug objects, etc). Link: http://lkml.kernel.org/r/20180903144046.21023-1-vincent.whitchurch@axis.com Signed-off-by: Vincent Whitchurch Acked-by: Catalin Marinas Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4e15a073a168b62311db911a55c4d4f1500c2821 Author: Michal Hocko Date: Fri Oct 26 15:03:39 2018 -0700 Revert "mm, mmu_notifier: annotate mmu notifiers with blockable invalidate callbacks" Revert 5ff7091f5a2ca ("mm, mmu_notifier: annotate mmu notifiers with blockable invalidate callbacks"). MMU_INVALIDATE_DOES_NOT_BLOCK flags was the only one used and it is no longer needed since 93065ac753e4 ("mm, oom: distinguish blockable mode for mmu notifiers"). We now have a full support for per range !blocking behavior so we can drop the stop gap workaround which the per notifier flag was used for. Link: http://lkml.kernel.org/r/20180827112623.8992-4-mhocko@kernel.org Signed-off-by: Michal Hocko Cc: David Rientjes Cc: Boris Ostrovsky Cc: Jerome Glisse Cc: Juergen Gross Cc: Tetsuo Handa Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 33490af3f5c15757448b6c454ca93b48a333aa1b Author: Michal Hocko Date: Fri Oct 26 15:03:35 2018 -0700 mm, mmu_notifier: be explicit about range invalition non-blocking mode If invalidate_range_start() is called for !blocking mode then all callbacks have to guarantee they will no block/sleep. The same obviously applies to invalidate_range_end because this operation pairs with the former and they are called from the same context. Make sure this is appropriately documented. Link: http://lkml.kernel.org/r/20180827112623.8992-3-mhocko@kernel.org Signed-off-by: Michal Hocko Reviewed-by: Jerome Glisse Cc: Boris Ostrovsky Cc: David Rientjes Cc: Juergen Gross Cc: Tetsuo Handa Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 15f570bf3d13aa94a97234538a5110d18df03aa3 Author: Michal Hocko Date: Fri Oct 26 15:03:31 2018 -0700 mm,page_alloc: PF_WQ_WORKER threads must sleep at should_reclaim_retry() Tetsuo Handa has reported that it is possible to bypass the short sleep for PF_WQ_WORKER threads which was introduced by commit 373ccbe5927034b5 ("mm, vmstat: allow WQ concurrency to discover memory reclaim doesn't make any progress") and lock up the system if OOM. The primary reason is that WQ_MEM_RECLAIM WQs are not guaranteed to run even when they have a rescuer available. Those workers might be essential for reclaim to make a forward progress, however. If we are too unlucky all the allocations requests can get stuck waiting for a WQ_MEM_RECLAIM work item and the system is essentially stuck in an OOM condition without much hope to move on. Tetsuo has seen the reclaim stuck on drain_local_pages_wq or xlog_cil_push_work (xfs). There might be others. Since should_reclaim_retry() should be a natural reschedule point, let's do the short sleep for PF_WQ_WORKER threads unconditionally in order to guarantee that other pending work items are started. This will workaround this problem and it is less fragile than hunting down when the sleep is missed. Having a single sleeping point is more robust. [akpm@linux-foundation.org: reflow comment to 80 cols to save a couple of lines] Link: http://lkml.kernel.org/r/20180827135101.15700-1-mhocko@kernel.org Signed-off-by: Michal Hocko Debugged-by: Tetsuo Handa Reported-by: Tetsuo Handa Reviewed-by: Andrew Morton Cc: Roman Gushchin Cc: Johannes Weiner Cc: Vladimir Davydov Cc: David Rientjes Cc: Tejun Heo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 68600f623d69da428c6163275f97ca126e1a8ec5 Author: Roman Gushchin Date: Fri Oct 26 15:03:27 2018 -0700 mm: don't miss the last page because of round-off error I've noticed, that dying memory cgroups are often pinned in memory by a single pagecache page. Even under moderate memory pressure they sometimes stayed in such state for a long time. That looked strange. My investigation showed that the problem is caused by applying the LRU pressure balancing math: scan = div64_u64(scan * fraction[lru], denominator), where denominator = fraction[anon] + fraction[file] + 1. Because fraction[lru] is always less than denominator, if the initial scan size is 1, the result is always 0. This means the last page is not scanned and has no chances to be reclaimed. Fix this by rounding up the result of the division. In practice this change significantly improves the speed of dying cgroups reclaim. [guro@fb.com: prevent double calculation of DIV64_U64_ROUND_UP() arguments] Link: http://lkml.kernel.org/r/20180829213311.GA13501@castle Link: http://lkml.kernel.org/r/20180827162621.30187-3-guro@fb.com Signed-off-by: Roman Gushchin Reviewed-by: Andrew Morton Cc: Johannes Weiner Cc: Michal Hocko Cc: Tejun Heo Cc: Rik van Riel Cc: Konstantin Khlebnikov Cc: Matthew Wilcox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 591edfb10a949d635ed770c6e85ec5286206c07e Author: Roman Gushchin Date: Fri Oct 26 15:03:23 2018 -0700 mm: drain memcg stocks on css offlining Memcg charge is batched using per-cpu stocks, so an offline memcg can be pinned by a cached charge up to a moment, when a process belonging to some other cgroup will charge some memory on the same cpu. In other words, cached charges can prevent a memory cgroup from being reclaimed for some time, without any clear need. Let's optimize it by explicit draining of all stocks on css offlining. As draining is performed asynchronously, and is skipped if any parallel draining is happening, it's cheap. Link: http://lkml.kernel.org/r/20180827162621.30187-2-guro@fb.com Signed-off-by: Roman Gushchin Reviewed-by: Shakeel Butt Acked-by: Michal Hocko Cc: Johannes Weiner Cc: Konstantin Khlebnikov Cc: Tejun Heo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9b6f7e163cd0f468d1b9696b785659d3c27c8667 Author: Roman Gushchin Date: Fri Oct 26 15:03:19 2018 -0700 mm: rework memcg kernel stack accounting If CONFIG_VMAP_STACK is set, kernel stacks are allocated using __vmalloc_node_range() with __GFP_ACCOUNT. So kernel stack pages are charged against corresponding memory cgroups on allocation and uncharged on releasing them. The problem is that we do cache kernel stacks in small per-cpu caches and do reuse them for new tasks, which can belong to different memory cgroups. Each stack page still holds a reference to the original cgroup, so the cgroup can't be released until the vmap area is released. To make this happen we need more than two subsequent exits without forks in between on the current cpu, which makes it very unlikely to happen. As a result, I saw a significant number of dying cgroups (in theory, up to 2 * number_of_cpu + number_of_tasks), which can't be released even by significant memory pressure. As a cgroup structure can take a significant amount of memory (first of all, per-cpu data like memcg statistics), it leads to a noticeable waste of memory. Link: http://lkml.kernel.org/r/20180827162621.30187-1-guro@fb.com Fixes: ac496bf48d97 ("fork: Optimize task creation by caching two thread stacks per CPU if CONFIG_VMAP_STACK=y") Signed-off-by: Roman Gushchin Reviewed-by: Shakeel Butt Acked-by: Michal Hocko Cc: Johannes Weiner Cc: Andy Lutomirski Cc: Konstantin Khlebnikov Cc: Tejun Heo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c5fd3ca06b4699e251b4a1fb808c2d5124494101 Author: Aaron Tomlin Date: Fri Oct 26 15:03:15 2018 -0700 slub: extend slub debug to handle multiple slabs Extend the slub_debug syntax to "slub_debug=[,]*", where may contain an asterisk at the end. For example, the following would poison all kmalloc slabs: slub_debug=P,kmalloc* and the following would apply the default flags to all kmalloc and all block IO slabs: slub_debug=,bio*,kmalloc* Please note that a similar patch was posted by Iliyan Malchev some time ago but was never merged: https://marc.info/?l=linux-mm&m=131283905330474&w=2 Link: http://lkml.kernel.org/r/20180928111139.27962-1-atomlin@redhat.com Signed-off-by: Aaron Tomlin Acked-by: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Cc: Iliyan Malchev Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 61448479a9f2c954cde0cfe778cb6bec5d0a748d Author: Dmitry Vyukov Date: Fri Oct 26 15:03:12 2018 -0700 mm: don't warn about large allocations for slab Slub does not call kmalloc_slab() for sizes > KMALLOC_MAX_CACHE_SIZE, instead it falls back to kmalloc_large(). For slab KMALLOC_MAX_CACHE_SIZE == KMALLOC_MAX_SIZE and it calls kmalloc_slab() for all allocations relying on NULL return value for over-sized allocations. This inconsistency leads to unwanted warnings from kmalloc_slab() for over-sized allocations for slab. Returning NULL for failed allocations is the expected behavior. Make slub and slab code consistent by checking size > KMALLOC_MAX_CACHE_SIZE in slab before calling kmalloc_slab(). While we are here also fix the check in kmalloc_slab(). We should check against KMALLOC_MAX_CACHE_SIZE rather than KMALLOC_MAX_SIZE. It all kinda worked because for slab the constants are the same, and slub always checks the size against KMALLOC_MAX_CACHE_SIZE before kmalloc_slab(). But if we get there with size > KMALLOC_MAX_CACHE_SIZE anyhow bad things will happen. For example, in case of a newly introduced bug in slub code. Also move the check in kmalloc_slab() from function entry to the size > 192 case. This partially compensates for the additional check in slab code and makes slub code a bit faster (at least theoretically). Also drop __GFP_NOWARN in the warning check. This warning means a bug in slab code itself, user-passed flags have nothing to do with it. Nothing of this affects slob. Link: http://lkml.kernel.org/r/20180927171502.226522-1-dvyukov@gmail.com Signed-off-by: Dmitry Vyukov Reported-by: syzbot+87829a10073277282ad1@syzkaller.appspotmail.com Reported-by: syzbot+ef4e8fc3a06e9019bb40@syzkaller.appspotmail.com Reported-by: syzbot+6e438f4036df52cbb863@syzkaller.appspotmail.com Reported-by: syzbot+8574471d8734457d98aa@syzkaller.appspotmail.com Reported-by: syzbot+af1504df0807a083dbd9@syzkaller.appspotmail.com Acked-by: Christoph Lameter Acked-by: Vlastimil Babka Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0684e6526edfb4debf0a0a884834bb1a104085dc Author: Andy Shevchenko Date: Fri Oct 26 15:03:06 2018 -0700 mm/slub.c: 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 *. Link: http://lkml.kernel.org/r/20180830104301.61649-1-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko Acked-by: Christoph Lameter Reviewed-by: Andrew Morton Tested-by: David Rientjes Cc: Pekka Enberg Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 253cc22fc6a1245472b12e2162df00c5817402b7 Author: Jiri Slaby Date: Fri Oct 26 15:03:02 2018 -0700 xtensa: use generic vga.h What xtensa has in asm/vga.h is the same as what can be found in asm-generic/vga.h. So use the latter header. Link: http://lkml.kernel.org/r/20180907132219.12979-1-jslaby@suse.cz Signed-off-by: Jiri Slaby Acked-by: Max Filippov Cc: Chris Zankel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5780a02fd1e87641ad6a8dd6891a1e890cf45c5d Author: Souptick Joarder Date: Fri Oct 26 15:02:59 2018 -0700 fs/iomap.c: change return type to vm_fault_t Change iomap_page_mkwrite() return type to vm_fault_t. see commit 1c8f422059ae ("mm: change return type to vm_fault_t") for reference. Link: http://lkml.kernel.org/r/20180827172050.GA18673@jordon-HP-15-Notebook-PC Signed-off-by: Souptick Joarder Reviewed-by: Matthew Wilcox Cc: Matthew Wilcox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 867632d6a6126a9ef3e8d8015423d90f8613f2ef Author: YueHaibing Date: Fri Oct 26 15:02:56 2018 -0700 ocfs2: remove set but not used variable 'rb' Fixes gcc '-Wunused-but-set-variable' warning: fs/ocfs2/refcounttree.c: In function 'ocfs2_create_reflink_node': fs/ocfs2/refcounttree.c:4138:31: warning: variable 'rb' set but not used [-Wunused-but-set-variable] Link: http://lkml.kernel.org/r/1536198443-113047-1-git-send-email-yuehaibing@huawei.com Signed-off-by: YueHaibing 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 999865764f5f128896402572b439269acb471022 Author: Jia-Ju Bai Date: Fri Oct 26 15:02:52 2018 -0700 fs/ocfs2/dlm/dlmdebug.c: fix a sleep-in-atomic-context bug in dlm_print_one_mle() The kernel module may sleep with holding a spinlock. The function call paths (from bottom to top) in Linux-4.16 are: [FUNC] get_zeroed_page(GFP_NOFS) fs/ocfs2/dlm/dlmdebug.c, 332: get_zeroed_page in dlm_print_one_mle fs/ocfs2/dlm/dlmmaster.c, 240: dlm_print_one_mle in __dlm_put_mle fs/ocfs2/dlm/dlmmaster.c, 255: __dlm_put_mle in dlm_put_mle fs/ocfs2/dlm/dlmmaster.c, 254: spin_lock in dlm_put_ml [FUNC] get_zeroed_page(GFP_NOFS) fs/ocfs2/dlm/dlmdebug.c, 332: get_zeroed_page in dlm_print_one_mle fs/ocfs2/dlm/dlmmaster.c, 240: dlm_print_one_mle in __dlm_put_mle fs/ocfs2/dlm/dlmmaster.c, 222: __dlm_put_mle in dlm_put_mle_inuse fs/ocfs2/dlm/dlmmaster.c, 219: spin_lock in dlm_put_mle_inuse To fix this bug, GFP_NOFS is replaced with GFP_ATOMIC. This bug is found by my static analysis tool DSAC. Link: http://lkml.kernel.org/r/20180901112528.27025-1-baijiaju1990@gmail.com Signed-off-by: Jia-Ju Bai 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 0ae1c2dbdccc090762eb3c89183d7fc80dafca76 Author: Ding Xiang Date: Fri Oct 26 15:02:48 2018 -0700 ocfs2: remove unneeded null check Null check for kfree is unnecessary, so remove it. Link: http://lkml.kernel.org/r/1535704514-26559-1-git-send-email-dingxiang@cmss.chinamobile.com Signed-off-by: Ding Xiang 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 2de24cb742d4f0c41358aa078bed7f089c827ac7 Author: Colin Ian King Date: Fri Oct 26 15:02:45 2018 -0700 ocfs2: remove unused pointer 'eb' Pointer 'eb' is being assigned but is never used hence it is redundant and can be removed. Cleans up clang warning: warning: variable 'eb' set but not used [-Wunused-but-set-variable] Link: http://lkml.kernel.org/r/20180828141907.10826-1-colin.king@canonical.com Signed-off-by: Colin Ian King 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 32c1b90dcd90c7f6343e1b328801f7be5f7da88d Author: Nathan Chancellor Date: Fri Oct 26 15:02:41 2018 -0700 ocfs2/dlm: remove unnecessary parentheses Clang warns when more than one set of parentheses is used for a single conditional statement: fs/ocfs2/dlm/dlmthread.c:534:18: warning: equality comparison with extraneous parentheses [-Wparentheses-equality] if ((res->owner == dlm->node_num)) { ~~~~~~~~~~~^~~~~~~~~~~~~~~~ fs/ocfs2/dlm/dlmthread.c:534:18: note: remove extraneous parentheses around the comparison to silence this warning if ((res->owner == dlm->node_num)) { ~ ^ ~ Link: http://lkml.kernel.org/r/20180924181929.6853-1-natechancellor@gmail.com Signed-off-by: Nathan Chancellor Reported-by: Nick Desaulniers Reviewed-by: Nick Desaulniers Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1f6904f72937d1867a5d62b124231069d7e71ca9 Author: Kirill Tkhai Date: Fri Oct 26 15:02:38 2018 -0700 scripts/tags.sh: add DECLARE_HASHTABLE() In addition to DEFINE_HASHTABLE() add DECLARE_ variant. Link: http://lkml.kernel.org/r/153683203215.13678.11468076350083405643.stgit@localhost.localdomain Signed-off-by: Kirill Tkhai Reviewed-by: Andrew Morton Cc: Masahiro Yamada Cc: Constantine Shulyupin Cc: Arend van Spriel Cc: Daniel Borkmann Cc: Joey Pabalinas Cc: Matthew Wilcox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0c96350a2d2f64fe777b444c995f6bb633c5d069 Author: Andrey Ryabinin Date: Fri Oct 26 15:02:34 2018 -0700 lib/test_kasan.c: add tests for several string/memory API functions Arch code may have asm implementation of string/memory API functions instead of using generic one from lib/string.c. KASAN don't see memory accesses in asm code, thus can miss many bugs. E.g. on ARM64 KASAN don't see bugs in memchr(), memcmp(), str[r]chr(), str[n]cmp(), str[n]len(). Add tests for these functions to be sure that we notice the problem on other architectures. Link: http://lkml.kernel.org/r/20180920135631.23833-3-aryabinin@virtuozzo.com Signed-off-by: Andrey Ryabinin Cc: Alexander Potapenko Cc: Ard Biesheuvel Cc: Dmitry Vyukov Cc: Kyeongdon Kim Cc: Mark Rutland Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 19a2ca0fb560fd7be7b5293c6b652c6d6078dcde Author: Andrey Ryabinin Date: Fri Oct 26 15:02:30 2018 -0700 arm64: lib: use C string functions with KASAN enabled ARM64 has asm implementation of memchr(), memcmp(), str[r]chr(), str[n]cmp(), str[n]len(). KASAN don't see memory accesses in asm code, thus it can potentially miss many bugs. Ifdef out __HAVE_ARCH_* defines of these functions when KASAN is enabled, so the generic implementations from lib/string.c will be used. We can't just remove the asm functions because efistub uses them. And we can't have two non-weak functions either, so declare the asm functions as weak. Link: http://lkml.kernel.org/r/20180920135631.23833-2-aryabinin@virtuozzo.com Signed-off-by: Andrey Ryabinin Reported-by: Kyeongdon Kim Cc: Alexander Potapenko Cc: Ard Biesheuvel Cc: Dmitry Vyukov Cc: Mark Rutland Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 74f213ea25b99fddcf34cbe07dabdb01136bcd86 Author: Andrey Ryabinin Date: Fri Oct 26 15:02:27 2018 -0700 include/linux/linkage.h: align weak symbols Since WEAK() supposed to be used instead of ENTRY() to define weak symbols, but unlike ENTRY() it doesn't have ALIGN directive. It seems there is no actual reason to not have, so let's add ALIGN to WEAK() too. Link: http://lkml.kernel.org/r/20180920135631.23833-1-aryabinin@virtuozzo.com Signed-off-by: Andrey Ryabinin Will Deacon , Catalin Marinas Cc: Kyeongdon Kim Cc: Ard Biesheuvel Cc: Alexander Potapenko Cc: Dmitry Vyukov Cc: Mark Rutland Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4d54954a197175c0dcb3c82af0c0740d0c5f827a Author: Sebastien Boisvert Date: Fri Oct 26 15:02:23 2018 -0700 include/linux/pfn_t.h: force '~' to be parsed as an unary operator Tracing the event "fs_dax:dax_pmd_insert_mapping" with perf produces this warning: [fs_dax:dax_pmd_insert_mapping] unknown op '~' It is printed in process_op (tools/lib/traceevent/event-parse.c) because '~' is parsed as a binary operator. perf reads the format of fs_dax:dax_pmd_insert_mapping ("print fmt") from /sys/kernel/debug/tracing/events/fs_dax/dax_pmd_insert_mapping/format . The format contains: ~(((u64) ~(~(((1UL) << 12)-1))) ^ \ interpreted as a binary operator by process_op(). This part is generated in the declaration of the event class dax_pmd_insert_mapping_class in include/trace/events/fs_dax.h : __print_flags_u64(__entry->pfn_val & PFN_FLAGS_MASK, "|", PFN_FLAGS_TRACE), This patch adds a pair of parentheses in the declaration of PFN_FLAGS_MASK to make sure that '~' is parsed as a unary operator by perf. The part of the format that was problematic is now: ~(((u64) (~(~(((1UL) << 12)-1)))) Now, all the '~' are parsed as unary operators. Link: http://lkml.kernel.org/r/20181021145939.8760-1-sebhtml@videotron.qc.ca Signed-off-by: Sebastien Boisvert Acked-by: Dan Williams Cc: "Steven Rostedt (VMware)" Cc: Arnaldo Carvalho de Melo Cc: "Tzvetomir Stoyanov (VMware)" Cc: Namhyung Kim Cc: Ross Zwisler Cc: Elenie Godzaridis Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ae62c16e105a869524afcf8a07ee85c5ae5d0479 Author: Christoph Hellwig Date: Fri Oct 26 15:02:19 2018 -0700 userfaultfd: disable irqs when taking the waitqueue lock userfaultfd contains howe-grown locking of the waitqueue lock, and does not disable interrupts. This relies on the fact that no one else takes it from interrupt context and violates an invariat of the normal waitqueue locking scheme. With aio poll it is easy to trigger other locks that disable interrupts (or are called from interrupt context). Link: http://lkml.kernel.org/r/20181018154101.18750-1-hch@lst.de Signed-off-by: Christoph Hellwig Reviewed-by: Andrea Arcangeli Reviewed-by: Andrew Morton Cc: [4.19.x] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit fa76da461bb0be13c8339d984dcf179151167c8f Author: Vlastimil Babka Date: Fri Oct 26 15:02:16 2018 -0700 mm: /proc/pid/smaps_rollup: fix NULL pointer deref in smaps_pte_range() Leonardo reports an apparent regression in 4.19-rc7: BUG: unable to handle kernel NULL pointer dereference at 00000000000000f0 PGD 0 P4D 0 Oops: 0000 [#1] PREEMPT SMP PTI CPU: 3 PID: 6032 Comm: python Not tainted 4.19.0-041900rc7-lowlatency #201810071631 Hardware name: LENOVO 80UG/Toronto 4A2, BIOS 0XCN45WW 08/09/2018 RIP: 0010:smaps_pte_range+0x32d/0x540 Code: 80 00 00 00 00 74 a9 48 89 de 41 f6 40 52 40 0f 85 04 02 00 00 49 2b 30 48 c1 ee 0c 49 03 b0 98 00 00 00 49 8b 80 a0 00 00 00 <48> 8b b8 f0 00 00 00 e8 b7 ef ec ff 48 85 c0 0f 84 71 ff ff ff a8 RSP: 0018:ffffb0cbc484fb88 EFLAGS: 00010202 RAX: 0000000000000000 RBX: 0000560ddb9e9000 RCX: 0000000000000000 RDX: 0000000000000000 RSI: 0000000560ddb9e9 RDI: 0000000000000001 RBP: ffffb0cbc484fbc0 R08: ffff94a5a227a578 R09: ffff94a5a227a578 R10: 0000000000000000 R11: 0000560ddbbe7000 R12: ffffe903098ba728 R13: ffffb0cbc484fc78 R14: ffffb0cbc484fcf8 R15: ffff94a5a2e9cf48 FS: 00007f6dfb683740(0000) GS:ffff94a5aaf80000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00000000000000f0 CR3: 000000011c118001 CR4: 00000000003606e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: __walk_page_range+0x3c2/0x6f0 walk_page_vma+0x42/0x60 smap_gather_stats+0x79/0xe0 ? gather_pte_stats+0x320/0x320 ? gather_hugetlb_stats+0x70/0x70 show_smaps_rollup+0xcd/0x1c0 seq_read+0x157/0x400 __vfs_read+0x3a/0x180 ? security_file_permission+0x93/0xc0 ? security_file_permission+0x93/0xc0 vfs_read+0x8f/0x140 ksys_read+0x55/0xc0 __x64_sys_read+0x1a/0x20 do_syscall_64+0x5a/0x110 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Decoded code matched to local compilation+disassembly points to smaps_pte_entry(): } else if (unlikely(IS_ENABLED(CONFIG_SHMEM) && mss->check_shmem_swap && pte_none(*pte))) { page = find_get_entry(vma->vm_file->f_mapping, linear_page_index(vma, addr)); Here, vma->vm_file is NULL. mss->check_shmem_swap should be false in that case, however for smaps_rollup, smap_gather_stats() can set the flag true for one vma and leave it true for subsequent vma's where it should be false. To fix, reset the check_shmem_swap flag to false. There's also related bug which sets mss->swap to shmem_swapped, which in the context of smaps_rollup overwrites any value accumulated from previous vma's. Fix that as well. Note that the report suggests a regression between 4.17.19 and 4.19-rc7, which makes the 4.19 series ending with commit 258f669e7e88 ("mm: /proc/pid/smaps_rollup: convert to single value seq_file") suspicious. But the mss was reused for rollup since 493b0e9d945f ("mm: add /proc/pid/smaps_rollup") so let's play it safe with the stable backport. Link: http://lkml.kernel.org/r/555fbd1f-4ac9-0b58-dcd4-5dc4380ff7ca@suse.cz Link: https://bugzilla.kernel.org/show_bug.cgi?id=201377 Fixes: 493b0e9d945f ("mm: add /proc/pid/smaps_rollup") Signed-off-by: Vlastimil Babka Reported-by: Leonardo Soares Müller Tested-by: Leonardo Soares Müller Cc: Greg Kroah-Hartman Cc: Daniel Colascione Cc: Alexey Dobriyan Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit aab456dfa404f3a16d6f1780e62a6a8533c4d008 Author: Eric Dumazet Date: Fri Oct 26 09:33:27 2018 -0700 net/neigh: fix NULL deref in pneigh_dump_table() pneigh can have NULL device pointer, so we need to make neigh_master_filtered() and neigh_ifindex_filtered() more robust. syzbot report : kasan: CONFIG_KASAN_INLINE enabled kasan: GPF could be caused by NULL-ptr deref or user memory access general protection fault: 0000 [#1] PREEMPT SMP KASAN CPU: 0 PID: 15867 Comm: syz-executor2 Not tainted 4.19.0+ #276 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:__read_once_size include/linux/compiler.h:179 [inline] RIP: 0010:list_empty include/linux/list.h:203 [inline] RIP: 0010:netdev_master_upper_dev_get+0xa1/0x250 net/core/dev.c:6467 RSP: 0018:ffff8801bfaf7220 EFLAGS: 00010202 RAX: dffffc0000000000 RBX: 0000000000000001 RCX: ffffc90005e92000 RDX: 0000000000000016 RSI: ffffffff860b44d9 RDI: 0000000000000005 RBP: ffff8801bfaf72b0 R08: ffff8801c4c84080 R09: fffffbfff139a580 R10: fffffbfff139a580 R11: ffffffff89cd2c07 R12: 1ffff10037f5ee45 R13: 0000000000000000 R14: ffff8801bfaf7288 R15: 00000000000000b0 FS: 00007f65cc68d700(0000) GS:ffff8801dae00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000001b33a21000 CR3: 00000001c6116000 CR4: 00000000001406f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: neigh_master_filtered net/core/neighbour.c:2367 [inline] pneigh_dump_table net/core/neighbour.c:2456 [inline] neigh_dump_info+0x7a9/0x1ce0 net/core/neighbour.c:2577 netlink_dump+0x606/0x1080 net/netlink/af_netlink.c:2244 __netlink_dump_start+0x59a/0x7c0 net/netlink/af_netlink.c:2352 netlink_dump_start include/linux/netlink.h:216 [inline] rtnetlink_rcv_msg+0x809/0xc20 net/core/rtnetlink.c:4898 netlink_rcv_skb+0x172/0x440 net/netlink/af_netlink.c:2477 rtnetlink_rcv+0x1c/0x20 net/core/rtnetlink.c:4953 netlink_unicast_kernel net/netlink/af_netlink.c:1310 [inline] netlink_unicast+0x5a5/0x760 net/netlink/af_netlink.c:1336 netlink_sendmsg+0xa18/0xfc0 net/netlink/af_netlink.c:1917 sock_sendmsg_nosec net/socket.c:621 [inline] sock_sendmsg+0xd5/0x120 net/socket.c:631 sock_write_iter+0x35e/0x5c0 net/socket.c:900 call_write_iter include/linux/fs.h:1808 [inline] new_sync_write fs/read_write.c:474 [inline] __vfs_write+0x6b8/0x9f0 fs/read_write.c:487 vfs_write+0x1fc/0x560 fs/read_write.c:549 ksys_write+0x101/0x260 fs/read_write.c:598 __do_sys_write fs/read_write.c:610 [inline] __se_sys_write fs/read_write.c:607 [inline] __x64_sys_write+0x73/0xb0 fs/read_write.c:607 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x457569 Fixes: 6f52f80e8530 ("net/neigh: Extend dump filter to proxy neighbor dumps") Signed-off-by: Eric Dumazet Cc: David Ahern Reported-by: syzbot Reviewed-by: David Ahern Tested-by: David Ahern Signed-off-by: David S. Miller commit d8fd9e106fbc291167ebb675ad69234597d0fd98 Author: Daniel Borkmann Date: Sat Oct 27 00:49:02 2018 +0200 bpf: fix wrong helper enablement in cgroup local storage Commit cd3394317653 ("bpf: introduce the bpf_get_local_storage() helper function") enabled the bpf_get_local_storage() helper also for BPF program types where it does not make sense to use them. They have been added both in sk_skb_func_proto() and sk_msg_func_proto() even though both program types are not invoked in combination with cgroups, and neither through BPF_PROG_RUN_ARRAY(). In the latter the bpf_cgroup_storage_set() is set shortly before BPF program invocation. Later, the helper bpf_get_local_storage() retrieves this prior set up per-cpu pointer and hands the buffer to the BPF program. The map argument in there solely retrieves the enum bpf_cgroup_storage_type from a local storage map associated with the program and based on the type returns either the global or per-cpu storage. However, there is no specific association between the program's map and the actual content in bpf_cgroup_storage[]. Meaning, any BPF program that would have been properly run from the cgroup side through BPF_PROG_RUN_ARRAY() where bpf_cgroup_storage_set() was performed, and that is later unloaded such that prog / maps are teared down will cause a use after free if that pointer is retrieved from programs that are not run through BPF_PROG_RUN_ARRAY() but have the cgroup local storage helper enabled in their func proto. Lets just remove it from the two sock_map program types to fix it. Auditing through the types where this helper is enabled, it appears that these are the only ones where it was mistakenly allowed. Fixes: cd3394317653 ("bpf: introduce the bpf_get_local_storage() helper function") Signed-off-by: Daniel Borkmann Cc: Roman Gushchin Acked-by: John Fastabend Acked-by: Roman Gushchin Signed-off-by: Alexei Starovoitov commit f64bf6b8ae802e93231155b0d92a619d896cd0bd Author: Mike Manning Date: Fri Oct 26 12:24:35 2018 +0100 net: allow traceroute with a specified interface in a vrf Traceroute executed in a vrf succeeds if no device is given or if the vrf is given as the device, but fails if the interface is given as the device. This is for default UDP probes, it succeeds for TCP SYN or ICMP ECHO probes. As the skb bound dev is the interface and the sk dev is the vrf, sk lookup fails for ICMP_DEST_UNREACH and ICMP_TIME_EXCEEDED messages. The solution is for the secondary dev to be passed so that the interface is available for the device match to succeed, in the same way as is already done for non-error cases. Signed-off-by: Mike Manning Reviewed-by: David Ahern Signed-off-by: David S. Miller commit 5a2de63fd1a59c30c02526d427bc014b98adf508 Author: Hangbin Liu Date: Fri Oct 26 10:28:43 2018 +0800 bridge: do not add port to router list when receives query with source 0.0.0.0 Based on RFC 4541, 2.1.1. IGMP Forwarding Rules The switch supporting IGMP snooping must maintain a list of multicast routers and the ports on which they are attached. This list can be constructed in any combination of the following ways: a) This list should be built by the snooping switch sending Multicast Router Solicitation messages as described in IGMP Multicast Router Discovery [MRDISC]. It may also snoop Multicast Router Advertisement messages sent by and to other nodes. b) The arrival port for IGMP Queries (sent by multicast routers) where the source address is not 0.0.0.0. We should not add the port to router list when receives query with source 0.0.0.0. Reported-by: Ying Xu Signed-off-by: Hangbin Liu Acked-by: Nikolay Aleksandrov Acked-by: Roopa Prabhu Signed-off-by: David S. Miller commit fb692ec4117f6fd25044cfb5720d6b79d400dc65 Author: Karsten Graul Date: Thu Oct 25 13:25:28 2018 +0200 net/smc: fix smc_buf_unuse to use the lgr pointer The pointer to the link group is unset in the smc connection structure right before the call to smc_buf_unuse. Provide the lgr pointer to smc_buf_unuse explicitly. And move the call to smc_lgr_schedule_free_work to the end of smc_conn_free. Fixes: a6920d1d130c ("net/smc: handle unregistered buffers") Signed-off-by: Karsten Graul Signed-off-by: Ursula Braun Signed-off-by: David S. Miller commit ee1abcf689353f36d9322231b4320926096bdee0 Author: Stefano Brivio Date: Wed Oct 24 14:37:21 2018 +0200 ipv6/ndisc: Preserve IPv6 control buffer if protocol error handlers are called Commit a61bbcf28a8c ("[NET]: Store skb->timestamp as offset to a base timestamp") introduces a neighbour control buffer and zeroes it out in ndisc_rcv(), as ndisc_recv_ns() uses it. Commit f2776ff04722 ("[IPV6]: Fix address/interface handling in UDP and DCCP, according to the scoping architecture.") introduces the usage of the IPv6 control buffer in protocol error handlers (e.g. inet6_iif() in present-day __udp6_lib_err()). Now, with commit b94f1c0904da ("ipv6: Use icmpv6_notify() to propagate redirect, instead of rt6_redirect()."), we call protocol error handlers from ndisc_redirect_rcv(), after the control buffer is already stolen and some parts are already zeroed out. This implies that inet6_iif() on this path will always return zero. This gives unexpected results on UDP socket lookup in __udp6_lib_err(), as we might actually need to match sockets for a given interface. Instead of always claiming the control buffer in ndisc_rcv(), do that only when needed. Fixes: b94f1c0904da ("ipv6: Use icmpv6_notify() to propagate redirect, instead of rt6_redirect().") Signed-off-by: Stefano Brivio Reviewed-by: Sabrina Dubroca Signed-off-by: David S. Miller commit 6c2fc9cddc1ffdef8ada1dc8404e5affae849953 Author: David S. Miller Date: Fri Oct 26 15:39:49 2018 -0700 sparc64: Rework xchg() definition to avoid warnings. Such as: fs/ocfs2/file.c: In function ‘ocfs2_file_write_iter’: ./arch/sparc/include/asm/cmpxchg_64.h:55:22: warning: value computed is not used [-Wunused-value] #define xchg(ptr,x) ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr)))) and drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c: In function ‘ixgbevf_xdp_setup’: ./arch/sparc/include/asm/cmpxchg_64.h:55:22: warning: value computed is not used [-Wunused-value] #define xchg(ptr,x) ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr)))) Signed-off-by: David S. Miller commit 2b4792eaa9f553764047d157365ed8b7787751a3 Author: David S. Miller Date: Fri Oct 26 15:11:56 2018 -0700 sparc64: Export __node_distance. Some drivers reference it via node_distance(), for example the NVME host driver core. ERROR: "__node_distance" [drivers/nvme/host/nvme-core.ko] undefined! make[1]: *** [scripts/Makefile.modpost:92: __modpost] Error 1 Signed-off-by: David S. Miller commit 5b4fc3882a649c9411dd0dcad2ddb78e911d340e Author: David Miller Date: Thu Oct 25 20:36:46 2018 -0700 sparc64: Make corrupted user stacks more debuggable. Right now if we get a corrupted user stack frame we do a do_exit(SIGILL) which is not helpful. If under a debugger, this behavior causes the inferior process to exit. So the register and other state cannot be examined at the time of the event. Instead, conditionally log a rate limited kernel log message and then force a SIGSEGV. With bits and ideas borrowed (as usual) from powerpc. Signed-off-by: David S. Miller commit cc10ad25bbca3d2925adc32d51cb7a10b837d32c Merge: ec9c16643459 edbb4233e7ef Author: Linus Torvalds Date: Fri Oct 26 14:43:48 2018 -0700 Merge tag 'mips_4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux Pull MIPS updates from Paul Burton: - kexec support for the generic MIPS platform when running on a CPU including the MIPS Coherence Manager & related hardware. - Improvements to the definition of memory barriers used around MMIO accesses, and fixes in their use. - Switch to CONFIG_NO_BOOTMEM from Mike Rapoport, finally dropping reliance on the old bootmem code. - A number of fixes & improvements for Loongson 3 systems. - DT & config updates for the Microsemi Ocelot platform. - Workaround to enable USB power on the Netgear WNDR3400v3. - Various cleanups & fixes. * tag 'mips_4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux: (51 commits) MIPS: Cleanup DSP ASE detection MIPS: dts: Change upper case to lower case MIPS: generic: Add Network, SPI and I2C to ocelot_defconfig MIPS: Loongson-3: Fix BRIDGE irq delivery problem MIPS: Loongson-3: Fix CPU UART irq delivery problem MIPS: Remove unused PREF, PREFE & PREFX macros MIPS: lib: Use kernel_pref & user_pref in memcpy() MIPS: Remove unused CAT macro MIPS: Add kernel_pref & user_pref helpers MIPS: Remove unused TTABLE macro MIPS: Remove unused PIC macros MIPS: Remove unused MOVN & MOVZ macros MIPS: Provide actually relaxed MMIO accessors MIPS: Enforce strong ordering for MMIO accessors MIPS: Correct `mmiowb' barrier for `wbflush' platforms MIPS: Define MMIO ordering barriers MIPS: mscc: add PCB120 to the ocelot fitImage MIPS: mscc: add DT for Ocelot PCB120 MIPS: memset: Limit excessive `noreorder' assembly mode use MIPS: memset: Fix CPU_DADDI_WORKAROUNDS `small_fixup' regression ... commit ec9c166434595382be3babf266febf876327774d Merge: 685f7e4f1614 c61c7def1fa0 Author: Linus Torvalds Date: Fri Oct 26 14:39:22 2018 -0700 Merge tag 'mips_fixes_4.20_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux Pull MIPS fixes from Paul Burton: "A couple of MIPS fixes that should have ideally made it for v4.19, but hey-ho here they are now: - A fix for potential poor stack placement introduced in v4.19-rc8. - A fix for a warning introduced in use of TURBOchannel devices by DMA changes in v4.16" * tag 'mips_fixes_4.20_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux: MIPS: VDSO: Reduce VDSO_RANDOMIZE_SIZE to 64MB for 64bit TC: Set DMA masks for devices commit 685f7e4f161425b137056abe35ba8ef7b669d83d Merge: c7a2c49ea6c9 58cfbac25b1f Author: Linus Torvalds Date: Fri Oct 26 14:36:21 2018 -0700 Merge tag 'powerpc-4.20-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc updates from Michael Ellerman: "Notable changes: - A large series to rewrite our SLB miss handling, replacing a lot of fairly complicated asm with much fewer lines of C. - Following on from that, we now maintain a cache of SLB entries for each process and preload them on context switch. Leading to a 27% speedup for our context switch benchmark on Power9. - Improvements to our handling of SLB multi-hit errors. We now print more debug information when they occur, and try to continue running by flushing the SLB and reloading, rather than treating them as fatal. - Enable THP migration on 64-bit Book3S machines (eg. Power7/8/9). - Add support for physical memory up to 2PB in the linear mapping on 64-bit Book3S. We only support up to 512TB as regular system memory, otherwise the percpu allocator runs out of vmalloc space. - Add stack protector support for 32 and 64-bit, with a per-task canary. - Add support for PTRACE_SYSEMU and PTRACE_SYSEMU_SINGLESTEP. - Support recognising "big cores" on Power9, where two SMT4 cores are presented to us as a single SMT8 core. - A large series to cleanup some of our ioremap handling and PTE flags. - Add a driver for the PAPR SCM (storage class memory) interface, allowing guests to operate on SCM devices (acked by Dan). - Changes to our ftrace code to handle very large kernels, where we need to use a trampoline to get to ftrace_caller(). And many other smaller enhancements and cleanups. Thanks to: Alan Modra, Alistair Popple, Aneesh Kumar K.V, Anton Blanchard, Aravinda Prasad, Bartlomiej Zolnierkiewicz, Benjamin Herrenschmidt, Breno Leitao, Cédric Le Goater, Christophe Leroy, Christophe Lombard, Dan Carpenter, Daniel Axtens, Finn Thain, Gautham R. Shenoy, Gustavo Romero, Haren Myneni, Hari Bathini, Jia Hongtao, Joel Stanley, John Allen, Laurent Dufour, Madhavan Srinivasan, Mahesh Salgaonkar, Mark Hairgrove, Masahiro Yamada, Michael Bringmann, Michael Neuling, Michal Suchanek, Murilo Opsfelder Araujo, Nathan Fontenot, Naveen N. Rao, Nicholas Piggin, Nick Desaulniers, Oliver O'Halloran, Paul Mackerras, Petr Vorel, Rashmica Gupta, Reza Arbab, Rob Herring, Sam Bobroff, Samuel Mendoza-Jonas, Scott Wood, Stan Johnson, Stephen Rothwell, Stewart Smith, Suraj Jitindar Singh, Tyrel Datwyler, Vaibhav Jain, Vasant Hegde, YueHaibing, zhong jiang" * tag 'powerpc-4.20-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (221 commits) Revert "selftests/powerpc: Fix out-of-tree build errors" powerpc/msi: Fix compile error on mpc83xx powerpc: Fix stack protector crashes on CPU hotplug powerpc/traps: restore recoverability of machine_check interrupts powerpc/64/module: REL32 relocation range check powerpc/64s/radix: Fix radix__flush_tlb_collapsed_pmd double flushing pmd selftests/powerpc: Add a test of wild bctr powerpc/mm: Fix page table dump to work on Radix powerpc/mm/radix: Display if mappings are exec or not powerpc/mm/radix: Simplify split mapping logic powerpc/mm/radix: Remove the retry in the split mapping logic powerpc/mm/radix: Fix small page at boundary when splitting powerpc/mm/radix: Fix overuse of small pages in splitting logic powerpc/mm/radix: Fix off-by-one in split mapping logic powerpc/ftrace: Handle large kernel configs powerpc/mm: Fix WARN_ON with THP NUMA migration selftests/powerpc: Fix out-of-tree build errors powerpc/time: no steal_time when CONFIG_PPC_SPLPAR is not selected powerpc/time: Only set CONFIG_ARCH_HAS_SCALED_CPUTIME on PPC64 powerpc/time: isolate scaled cputime accounting in dedicated functions. ... commit 14fa085640a7eb55431eec8a0273bbf0c463ce46 Author: Chengguang Xu Date: Fri Jun 22 09:49:36 2018 +0800 ovl: using posix_acl_xattr_size() to get size instead of posix_acl_to_xattr() There is no functional change but it seems better to get size by calling posix_acl_xattr_size() instead of calling posix_acl_to_xattr() with NULL buffer argument. Additionally, remove unnecessary assignments. Signed-off-by: Chengguang Xu Signed-off-by: Miklos Szeredi commit 1e92e3072c1456abedf51c9dedd245d2ba0daa4f Author: Amir Goldstein Date: Thu Oct 18 18:37:14 2018 +0300 ovl: abstract ovl_inode lock with a helper The abstraction improves code readabilty (to some). Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi commit 0e32992f7faccd50d1b00032de83e87a35fed247 Author: Amir Goldstein Date: Thu Oct 18 18:37:13 2018 +0300 ovl: remove the 'locked' argument of ovl_nlink_{start,end} It just makes the interface strange without adding any significant value. The only case where locked is false and return value is 0 is in ovl_rename() when new is negative, so handle that case explicitly in ovl_rename(). Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi commit 9df085f3c9a2d4658a9fe323d70c200aa00ede93 Author: Amir Goldstein Date: Mon Sep 3 09:12:09 2018 +0300 ovl: relax requirement for non null uuid of lower fs We use uuid to associate an overlay lower file handle with a lower layer, so we can accept lower fs with null uuid as long as all lower layers with null uuid are on the same fs. This change allows enabling index and nfs_export features for the setup of single lower fs of type squashfs - squashfs supports file handles, but has a null uuid. This change also allows enabling index and nfs_export features for nested overlayfs, where the lower overlay has nfs_export enabled. Enabling the index feature with single lower squashfs fixes the unionmount-testsuite test: ./run --ov --squashfs --verify As a by-product, if, like the lower squashfs, upper fs also uses the generic export_encode_fh() implementation to export 32bit inode file handles (e.g. ext4), then the xino_auto config/module/mount option will enable unique overlay inode numbers. Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi commit 6b52243f633eb5521e427bf78c85ccf646795f46 Author: Miklos Szeredi Date: Fri Oct 26 23:34:39 2018 +0200 ovl: fold copy-up helpers into callers Now that the workdir and tmpfile copy up modes have been untagled, the functions become simple enough that the helpers can be folded into the callers. Add new helpers where there is any duplication remaining: preparing creds for creating the object. Signed-off-by: Miklos Szeredi commit b10cdcdc2012b2c199077a0a648e8a7067e573bf Author: Amir Goldstein Date: Mon Oct 8 07:25:23 2018 +0300 ovl: untangle copy up call chain In an attempt to dedup ~100 LOC, we ended up creating a tangled call chain, whose branches merge and diverge in several points according to the immutable c->tmpfile copy up mode. This call chain was hard to analyse for locking correctness because the locking requirements for the c->tmpfile flow were very different from the locking requirements for the !c->tmpfile flow (i.e. directory vs. regulare file copy up). Split the copy up helpers of the c->tmpfile flow from those of the !c->tmpfile (i.e. workdir) flow and remove the c->tmpfile mode from copy up context. Suggested-by: Al Viro Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi commit 007ea44892e6fa963a0876a979e34890325c64eb Author: Miklos Szeredi Date: Fri Oct 26 23:34:39 2018 +0200 ovl: relax permission checking on underlying layers Make permission checking more consistent: - special files don't need any access check on underling fs - exec permission check doesn't need to be performed on underlying fs Reported-by: "J. Bruce Fields" Signed-off-by: Miklos Szeredi commit 6cd078702f2f33cb6b19a682de3e9184112f1a46 Author: Amir Goldstein Date: Thu Oct 18 09:45:49 2018 +0300 ovl: fix recursive oi->lock in ovl_link() linking a non-copied-up file into a non-copied-up parent results in a nested call to mutex_lock_interruptible(&oi->lock). Fix this by copying up target parent before ovl_nlink_start(), same as done in ovl_rename(). ~/unionmount-testsuite$ ./run --ov -s ~/unionmount-testsuite$ ln /mnt/a/foo100 /mnt/a/dir100/ WARNING: possible recursive locking detected -------------------------------------------- ln/1545 is trying to acquire lock: 00000000bcce7c4c (&ovl_i_lock_key[depth]){+.+.}, at: ovl_copy_up_start+0x28/0x7d but task is already holding lock: 0000000026d73d5b (&ovl_i_lock_key[depth]){+.+.}, at: ovl_nlink_start+0x3c/0xc1 [SzM: this seems to be a false positive, but doing the copy-up first is harmless and removes the lockdep splat] Reported-by: syzbot+3ef5c0d1a5cb0b21e6be@syzkaller.appspotmail.com Fixes: 5f8415d6b87e ("ovl: persistent overlay inode nlink for...") Cc: # v4.13 Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi commit 8f97d1e99149a7f1aa19e47a51b09764382a482e Author: Amir Goldstein Date: Thu Oct 11 17:38:14 2018 +0300 vfs: fix FIGETBSZ ioctl on an overlayfs file Some anon_bdev filesystems (e.g. overlayfs, ceph) don't have s_blocksize set. Returning zero from FIGETBSZ ioctl results in a Floating point exception from the e2fsprogs utility filefrag, which divides the size of the file with the value returned by FIGETBSZ. Fix the interface by returning -EINVAL for these filesystems. Fixes: d1d04ef8572b ("ovl: stack file ops") Cc: # v4.19 Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi commit 1f244dc5213960f76e7463bbb5719c331045bbc9 Author: Miklos Szeredi Date: Fri Oct 26 23:34:39 2018 +0200 ovl: clean up error handling in ovl_get_tmpfile() If security_inode_copy_up() fails, it should not set new_creds, so no need for the cleanup (which would've Oops-ed anyway, due to old_creds being NULL). Signed-off-by: Miklos Szeredi commit babf4770be0adc69e6d2de150f4040f175e24beb Author: Amir Goldstein Date: Wed Oct 10 19:10:06 2018 +0300 ovl: fix error handling in ovl_verify_set_fh() We hit a BUG on kfree of an ERR_PTR()... Reported-by: syzbot+ff03fe05c717b82502d0@syzkaller.appspotmail.com Fixes: 8b88a2e64036 ("ovl: verify upper root dir matches lower root dir") Cc: # v4.13 Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi commit c7a2c49ea6c9eebbe44ff2c08b663b2905ee2c13 Merge: 033078a9afe5 331bc71cb175 Author: Linus Torvalds Date: Fri Oct 26 13:05:26 2018 -0700 Merge tag 'nfs-for-4.20-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs Pull NFS client updates from Trond Myklebust: "Highlights include: Stable fixes: - Fix the NFSv4.1 r/wsize sanity checking - Reset the RPC/RDMA credit grant properly after a disconnect - Fix a missed page unlock after pg_doio() Features and optimisations: - Overhaul of the RPC client socket code to eliminate a locking bottleneck and reduce the latency when transmitting lots of requests in parallel. - Allow parallelisation of the RPCSEC_GSS encoding of an RPC request. - Convert the RPC client socket receive code to use iovec_iter() for improved efficiency. - Convert several NFS and RPC lookup operations to use RCU instead of taking global locks. - Avoid the need for BH-safe locks in the RPC/RDMA back channel. Bugfixes and cleanups: - Fix lock recovery during NFSv4 delegation recalls - Fix the NFSv4 + NFSv4.1 "lookup revalidate + open file" case. - Fixes for the RPC connection metrics - Various RPC client layer cleanups to consolidate stream based sockets - RPC/RDMA connection cleanups - Simplify the RPC/RDMA cleanup after memory operation failures - Clean ups for NFS v4.2 copy completion and NFSv4 open state reclaim" * tag 'nfs-for-4.20-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: (97 commits) SUNRPC: Convert the auth cred cache to use refcount_t SUNRPC: Convert auth creds to use refcount_t SUNRPC: Simplify lookup code SUNRPC: Clean up the AUTH cache code NFS: change sign of nfs_fh length sunrpc: safely reallow resvport min/max inversion nfs: remove redundant call to nfs_context_set_write_error() nfs: Fix a missed page unlock after pg_doio() SUNRPC: Fix a compile warning for cmpxchg64() NFSv4.x: fix lock recovery during delegation recall SUNRPC: use cmpxchg64() in gss_seq_send64_fetch_and_inc() xprtrdma: Squelch a sparse warning xprtrdma: Clean up xprt_rdma_disconnect_inject xprtrdma: Add documenting comments xprtrdma: Report when there were zero posted Receives xprtrdma: Move rb_flags initialization xprtrdma: Don't disable BH's in backchannel server xprtrdma: Remove memory address of "ep" from an error message xprtrdma: Rename rpcrdma_qp_async_error_upcall xprtrdma: Simplify RPC wake-ups on connect ... commit 033078a9afe504ac9e615d10c4b35d634450b637 Merge: 7abe849315c8 38f876bb2d62 Author: Linus Torvalds Date: Fri Oct 26 13:02:38 2018 -0700 Merge tag '4.20-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6 Pull cifs updates from Steve French: "Three smb3 fixes for stable, patches for improved debugging and perf gathering, and much improved performance for most metadata operations (expanded use of compounding)" * tag '4.20-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6: (46 commits) cifs: update internal module version number for cifs.ko to 2.14 smb3: add debug for unexpected mid cancellation cifs: allow calling SMB2_xxx_free(NULL) smb3 - clean up debug output displaying network interfaces smb3: show number of current open files in /proc/fs/cifs/Stats cifs: add support for ioctl on directories cifs: fallback to older infolevels on findfirst queryinfo retry smb3: do not attempt cifs operation in smb3 query info error path smb3: send backup intent on compounded query info cifs: track writepages in vfs operation counters smb2: fix uninitialized variable bug in smb2_ioctl_query_info cifs: add IOCTL for QUERY_INFO passthrough to userspace cifs: minor clarification in comments CIFS: Print message when attempting a mount CIFS: Adds information-level logging function cifs: OFD locks do not conflict with eachothers CIFS: SMBD: Do not call ib_dereg_mr on invalidated memory registration CIFS: pass page offsets on SMB1 read/write fs/cifs: fix uninitialised variable warnings smb3: add tracepoint for sending lease break responses to server ... commit 7abe849315c870c1d3f3cb4b302e827aaa28348e Merge: 71f4d95b2365 af9b926de9c5 Author: Linus Torvalds Date: Fri Oct 26 13:00:44 2018 -0700 Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/shli/md Pull md updates from Shaohua Li: "This mainly improves raid10 cluster and fixes some bugs: - raid10 cluster improvements from Guoqing - Memory leak fixes from Jack and Xiao - raid10 hang fix from Alex - raid5 block faulty device fix from Mariusz - metadata update fix from Neil - Invalid disk role fix from Me - Other clearnups" * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/shli/md: MD: Memory leak when flush bio size is zero md: fix memleak for mempool md-cluster: remove suspend_info md-cluster: send BITMAP_NEEDS_SYNC message if reshaping is interrupted md-cluster/bitmap: don't call md_bitmap_sync_with_cluster during reshaping stage md-cluster/raid10: don't call remove_and_add_spares during reshaping stage md-cluster/raid10: call update_size in md_reap_sync_thread md-cluster: introduce resync_info_get interface for sanity check md-cluster/raid10: support add disk under grow mode md-cluster/raid10: resize all the bitmaps before start reshape MD: fix invalid stored role for a disk - try2 md/bitmap: use mddev_suspend/resume instead of ->quiesce() md: remove redundant code that is no longer reachable md: allow metadata updates while suspending an array - fix MD: fix invalid stored role for a disk md/raid10: Fix raid10 replace hang when new added disk faulty raid5: block failing device if raid will be failed commit 71f4d95b23654ec2b347bd15b1260d68ca9ea5ea Merge: 6080ad3a9941 da4ad3a23af3 Author: Linus Torvalds Date: Fri Oct 26 12:57:38 2018 -0700 Merge tag 'for-4.20/dm-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm Pull device mapper updates from Mike Snitzer: - The biggest change this cycle is to remove support for the legacy IO path (.request_fn) from request-based DM. Jens has already started preparing for complete removal of the legacy IO path in 4.21 but this earlier removal of support from DM has been coordinated with Jens (as evidenced by the commit being attributed to him). Making request-based DM exclussively blk-mq only cleans up that portion of DM core quite nicely. - Convert the thinp and zoned targets over to using refcount_t where applicable. - A couple fixes to the DM zoned target for refcounting and other races buried in the implementation of metadata block creation and use. - Small cleanups to remove redundant unlikely() around a couple WARN_ON_ONCE(). - Simplify how dm-ioctl copies from userspace, eliminating some potential for a malicious user trying to change the executed ioctl after its processing has begun. - Tweaked DM crypt target to use the DM device name when naming the various workqueues created for a particular DM crypt device (makes the N workqueues for a DM crypt device more easily understood and enhances user's accounting capabilities at a glance via "ps") - Small fixup to remove dead branch in DM writecache's memory_entry(). * tag 'for-4.20/dm-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm: dm writecache: remove disabled code in memory_entry() dm zoned: fix various dmz_get_mblock() issues dm zoned: fix metadata block ref counting dm raid: avoid bitmap with raid4/5/6 journal device dm crypt: make workqueue names device-specific dm: add dm_table_device_name() dm ioctl: harden copy_params()'s copy_from_user() from malicious users dm: remove unnecessary unlikely() around WARN_ON_ONCE() dm zoned: target: use refcount_t for dm zoned reference counters dm thin: use refcount_t for thin_c reference counting dm table: require that request-based DM be layered on blk-mq devices dm: rename DM_TYPE_MQ_REQUEST_BASED to DM_TYPE_REQUEST_BASED dm: remove legacy request-based IO path commit 6080ad3a9941e4707bb929445b813fadca9a27ff Merge: b27186abb37b a435ab4f80f9 Author: Linus Torvalds Date: Fri Oct 26 12:43:13 2018 -0700 Merge tag 'for-linus-20181026' of git://git.kernel.dk/linux-block Pull more block layer updates from Jens Axboe: - Set of patches improving support for zoned devices. This was ready before the merge window, but I was late in picking it up and hence it missed the original pull request (Damien, Christoph) - libata no link power management quirk addition for a Samsung drive (Diego Viola) - Fix for a performance regression in BFQ that went into this merge window (Federico Motta) - Fix for a missing dma mask setting return value check (Gustavo) - Typo in the gdrom queue failure case (me) - NULL pointer deref fix for xen-blkfront (Vasilis Liaskovitis) - Fixing the get_rq trace point placement in blk-mq (Xiaoguang Wang) - Removal of a set-but-not-read variable in cdrom (zhong jiang) * tag 'for-linus-20181026' of git://git.kernel.dk/linux-block: libata: Apply NOLPM quirk for SAMSUNG MZ7TD256HAFV-000L9 block, bfq: fix asymmetric scenarios detection gdrom: fix mistake in assignment of error blk-mq: place trace_block_getrq() in correct place block: Introduce blk_revalidate_disk_zones() block: add a report_zones method block: Expose queue nr_zones in sysfs block: Improve zone reset execution block: Introduce BLKGETNRZONES ioctl block: Introduce BLKGETZONESZ ioctl block: Limit allocation of zone descriptors for report zones block: Introduce blkdev_nr_zones() helper scsi: sd_zbc: Fix sd_zbc_check_zones() error checks scsi: sd_zbc: Reduce boot device scan and revalidate time scsi: sd_zbc: Rearrange code cdrom: remove set but not used variable 'tocuse' skd: fix unchecked return values xen/blkfront: avoid NULL blkfront_info dereference on device removal commit b27186abb37b7bd19e0ca434f4f425c807dbd708 Merge: 0ef7791e2bfb d061864b89c3 Author: Linus Torvalds Date: Fri Oct 26 12:09:58 2018 -0700 Merge tag 'devicetree-for-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux Pull Devicetree updates from Rob Herring: "A bit bigger than normal as I've been busy this cycle. There's a few things with dependencies and a few things subsystem maintainers didn't pick up, so I'm taking them thru my tree. The fixes from Johan didn't get into linux-next, but they've been waiting for some time now and they are what's left of what subsystem maintainers didn't pick up. Summary: - Sync dtc with upstream version v1.4.7-14-gc86da84d30e4 - Work to get rid of direct accesses to struct device_node name and type pointers in preparation for removing them. New helpers for parsing DT cpu nodes and conversions to use the helpers. printk conversions to %pOFn for printing DT node names. Most went thru subystem trees, so this is the remainder. - Fixes to DT child node lookups to actually be restricted to child nodes instead of treewide. - Refactoring of dtb targets out of arch code. This makes the support more uniform and enables building all dtbs on c6x, microblaze, and powerpc. - Various DT binding updates for Renesas r8a7744 SoC - Vendor prefixes for Facebook, OLPC - Restructuring of some ARM binding docs moving some peripheral bindings out of board/SoC binding files - New "secure-chosen" binding for secure world settings on ARM - Dual licensing of 2 DT IRQ binding headers" * tag 'devicetree-for-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: (78 commits) ARM: dt: relicense two DT binding IRQ headers power: supply: twl4030-charger: fix OF sibling-node lookup NFC: nfcmrvl_uart: fix OF child-node lookup net: stmmac: dwmac-sun8i: fix OF child-node lookup net: bcmgenet: fix OF child-node lookup drm/msm: fix OF child-node lookup drm/mediatek: fix OF sibling-node lookup of: Add missing exports of node name compare functions dt-bindings: Add OLPC vendor prefix dt-bindings: misc: bk4: Add device tree binding for Liebherr's BK4 SPI bus dt-bindings: thermal: samsung: Add SPDX license identifier dt-bindings: clock: samsung: Add SPDX license identifiers dt-bindings: timer: ostm: Add R7S9210 support dt-bindings: phy: rcar-gen2: Add r8a7744 support dt-bindings: can: rcar_can: Add r8a7744 support dt-bindings: timer: renesas, cmt: Document r8a7744 CMT support dt-bindings: watchdog: renesas-wdt: Document r8a7744 support dt-bindings: thermal: rcar: Add device tree support for r8a7744 Documentation: dt: Add binding for /secure-chosen/stdout-path dt-bindings: arm: zte: Move sysctrl bindings to their own doc ... commit 0ef7791e2bfb2e10aa95dc492eab72074cef9942 Merge: befa93633193 760eea43f8c6 Author: Linus Torvalds Date: Fri Oct 26 12:04:29 2018 -0700 Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal Pull thermal SoC updates from Eduardo Valentin: "Several new things coming up. Specifics: - Rework of tsens and hisi thermal drivers - OF-thermal now allows sharing multiple cooling devices on maps - Added support for r8a7744 and R8A77970 on rcar thermal driver - Added support for r8a774a1 on rcar_gen3 thermal driver - New thermal driver stm32 - Fixes on multiple thermal drivers: of-thermal, imx, qoriq, armada, qcom-spmi, rcar, da9062/61" * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal: (41 commits) thermal: da9062/61: Prevent hardware access during system suspend thermal: rcar_thermal: Prevent doing work after unbind thermal: rcar_thermal: Prevent hardware access during system suspend thermal: rcar_gen3_thermal: add R8A77980 support dt-bindings: thermal: rcar-gen3-thermal: document R8A77980 bindings thermal: add stm32 thermal driver dt-bindings: stm32-thermal: add binding documentation thermal: rcar_thermal: add R8A77970 support dt-bindings: thermal: rcar-thermal: document R8A77970 bindings thermal: rcar_thermal: fix duplicate IRQ request dt-bindings: thermal: rcar: Add device tree support for r8a7744 thermal/drivers/hisi: Add the dual clusters sensors for hi3660 thermal/drivers/hisi: Add more sensors channel thermal/drivers/hisi: Remove pointless irq field thermal/drivers/hisi: Use platform_get_irq_byname thermal/drivers/hisi: Replace macro name with relevant sensor location thermal/drivers/hisi: Add multiple sensors support thermal/drivers/hisi: Prepare to support multiple sensors thermal/drivers/hisi: Factor out the probe functions thermal/drivers/hisi: Set the thermal zone private data to the sensor pointer ... commit 72b8ad40e14302f869382656a914bb803796b4ed Author: Liviu Dudau Date: Thu Oct 18 01:14:32 2018 +0100 leds: gpio: set led_dat->gpiod pointer for OF defined GPIO leds Commit 45d4c6de4e49 ("leds: gpio: Try to lookup gpiod from device") removed the common code path that set the led_dat->gpiod pointer in create_gpio_led(), but only added it back for the devices that have a valid gpio_led_platform_data structure. Calling gpio_leds_create() in gpio_led_probe() is not enough to get a valid gpiod pointer. Fortunately enough, gpio_leds_create() already gets the needed pointer, we just need to assign it to the relevant gpio_led_data structure. Fixes: 45d4c6de4e49 ("leds: gpio: Try to lookup gpiod from device") Signed-off-by: Liviu Dudau Reviewed-by: Linus Walleij Acked-by: Pavel Machek Signed-off-by: Jacek Anaszewski commit cb899a615be6c42e186e0e71862ebbd5a5c15533 Author: Shirish S Date: Fri Oct 26 02:38:58 2018 +0530 drm/amdgpu: fix reporting of failed msg sent to SMU (v2) Currently send_msg_to_smc_async() only report which message failed, but the actual failing message is the previous one, which SMU is unable to service. This patch reads the contents of register where the SMU is stuck and report appropriately. v2: fix the build (Alex) Signed-off-by: Shirish S Reviewed-by: Rex Zhu Signed-off-by: Alex Deucher commit befa93633193e5327e4045d1e5fa29114580fa5d Merge: d1f2b1710d92 886643b76632 Author: Linus Torvalds Date: Fri Oct 26 11:29:17 2018 -0700 Merge tag 'dma-mapping-4.20-1' of git://git.infradead.org/users/hch/dma-mapping Pull more dma-mapping updates from Christoph Hellwig: - various swiotlb cleanups - do not dip into the ѕwiotlb pool for dma coherent allocations - add support for not cache coherent DMA to swiotlb - switch ARM64 to use the generic swiotlb_dma_ops * tag 'dma-mapping-4.20-1' of git://git.infradead.org/users/hch/dma-mapping: arm64: use the generic swiotlb_dma_ops swiotlb: add support for non-coherent DMA swiotlb: don't dip into swiotlb pool for coherent allocations swiotlb: refactor swiotlb_map_page swiotlb: use swiotlb_map_page in swiotlb_map_sg_attrs swiotlb: merge swiotlb_unmap_page and unmap_single swiotlb: remove the overflow buffer swiotlb: do not panic on mapping failures swiotlb: mark is_swiotlb_buffer static swiotlb: remove a pointless comment commit 31e3aad62ab8039581d621403b7905aa19fb30af Author: Andrey Grodzovsky Date: Thu Oct 25 15:47:02 2018 -0400 drm/amdgpu: Fix compute ring 1.0.0 failure after reset Problem: After GPU reset on dGPUs with gfx8 compute ring 1.0.0 fails to pass the ring test. Ring registers inspection shows that it's active and no hang is observed (rptr == wptr) No significant diffs were observed between CP_HQD* registers for the ring in good and bad shape. Fix: No clear reason why but reversing the order of ring tests fixes the problem. Signed-off-by: Andrey Grodzovsky Acked-by: Christian König Signed-off-by: Alex Deucher commit 4faaaa762328cfb8579b9c908999ca189e2ea474 Author: Christian König Date: Wed Oct 24 16:25:23 2018 +0200 drm/amdgpu: fix VM leaf walking Make sure we don't try to go down further after the leave walk already ended. This fixes a crash with a new VM test. Signed-off-by: Christian König Reviewed-by: Felix Kuehling Acked-by: Alex Deucher Tested-by: Rex Zhu Rex.Zhu@amd.com Signed-off-by: Alex Deucher commit d1f2b1710d92a80d60351503bbf41cdac95ed7a8 Merge: 18d0eae30e6a 2f2fbfb71ecc Author: Linus Torvalds Date: Fri Oct 26 10:50:10 2018 -0700 Merge tag 'iommu-updates-v4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu Pull IOMMU updates from Joerg Roedel: - Debugfs support for the Intel VT-d driver. When enabled, it now also exposes some of its internal data structures to user-space for debugging purposes. - ARM-SMMU driver now uses the generic deferred flushing and fast-path iova allocation code. This is expected to be a major performance improvement, as this allocation path scales a lot better. - Support for r8a7744 in the Renesas iommu driver - Couple of minor fixes and improvements all over the place * tag 'iommu-updates-v4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: (39 commits) iommu/arm-smmu-v3: Remove unnecessary wrapper function iommu/arm-smmu-v3: Add SPDX header iommu/amd: Add default branch in amd_iommu_capable() dt-bindings: iommu: ipmmu-vmsa: Add r8a7744 support iommu/amd: Move iommu_init_pci() to .init section iommu/arm-smmu: Support non-strict mode iommu/io-pgtable-arm-v7s: Add support for non-strict mode iommu/arm-smmu-v3: Add support for non-strict mode iommu/io-pgtable-arm: Add support for non-strict mode iommu: Add "iommu.strict" command line option iommu/dma: Add support for non-strict mode iommu/arm-smmu: Ensure that page-table updates are visible before TLBI iommu/arm-smmu-v3: Implement flush_iotlb_all hook iommu/arm-smmu-v3: Avoid back-to-back CMD_SYNC operations iommu/arm-smmu-v3: Fix unexpected CMD_SYNC timeout iommu/io-pgtable-arm: Fix race handling in split_blk_unmap() iommu/arm-smmu-v3: Fix a couple of minor comment typos iommu: Fix a typo iommu: Remove .domain_{get,set}_windows iommu: Tidy up window attributes ... commit 18d0eae30e6a4f8644d589243d7ac1d70d29203d Merge: 26873acacbdb 14fdc2c5318a Author: Linus Torvalds Date: Fri Oct 26 09:11:43 2018 -0700 Merge tag 'char-misc-4.20-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/misc patches for 4.20-rc1. Loads of things here, we have new code in all of these driver subsystems: - fpga - stm - extcon - nvmem - eeprom - hyper-v - gsmi - coresight - thunderbolt - vmw_balloon - goldfish - soundwire along with lots of fixes and minor changes to other small drivers. All of these have been in linux-next for a while with no reported issues" * tag 'char-misc-4.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (245 commits) Documentation/security-bugs: Clarify treatment of embargoed information lib: Fix ia64 bootloader linkage MAINTAINERS: Clarify UIO vs UIOVEC maintainer docs/uio: fix a grammar nitpick docs: fpga: document programming fpgas using regions fpga: add devm_fpga_region_create fpga: bridge: add devm_fpga_bridge_create fpga: mgr: add devm_fpga_mgr_create hv_balloon: Replace spin_is_locked() with lockdep sgi-xp: Replace spin_is_locked() with lockdep eeprom: New ee1004 driver for DDR4 memory eeprom: at25: remove unneeded 'at25_remove' w1: IAD Register is yet readable trough iad sys file. Fix snprintf (%u for unsigned, count for max size). misc: mic: scif: remove set but not used variables 'src_dma_addr, dst_dma_addr' misc: mic: fix a DMA pool free failure platform: goldfish: pipe: Add a blank line to separate varibles and code platform: goldfish: pipe: Remove redundant casting platform: goldfish: pipe: Call misc_deregister if init fails platform: goldfish: pipe: Move the file-scope goldfish_pipe_dev variable into the driver state platform: goldfish: pipe: Move the file-scope goldfish_pipe_miscdev variable into the driver state ... commit 26873acacbdbb4e4b444f5dd28dcc4853f0e8ba2 Merge: 9703fc8caf36 09d1ea1c7309 Author: Linus Torvalds Date: Fri Oct 26 08:42:25 2018 -0700 Merge tag 'driver-core-4.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core updates from Greg KH: "Here is a small number of driver core patches for 4.20-rc1. Not much happened here this merge window, only a very tiny number of patches that do: - add BUS_ATTR_WO() for use by drivers - component error path fixes - kernfs range check fix - other tiny error path fixes and const changes All of these have been in linux-next with no reported issues for a while" * tag 'driver-core-4.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: devres: provide devm_kstrdup_const() mm: move is_kernel_rodata() to asm-generic/sections.h devres: constify p in devm_kfree() driver core: add BUS_ATTR_WO() macro kernfs: Fix range checks in kernfs_get_target_path component: fix loop condition to call unbind() if bind() fails drivers/base/devtmpfs.c: don't pretend path is const in delete_path kernfs: update comment about kernfs_path() return value commit 7dd8db68949a7acc5bd528ee0ecb8f8720f49921 Author: Benjamin Tissoires Date: Fri Oct 12 16:05:25 2018 +0200 HID: alps: allow incoming reports when only the trackstick is opened If userspace only reads the trackstick node, and no one is listening to the touchpad nor the hidraw node then, the device is not powered on. Add open/close callbacks to allow users to disable the touchpad in Gnome while keeping the trackstick active. Link: https://bugzilla.redhat.com/show_bug.cgi?id=1559632 Link: https://gitlab.gnome.org/GNOME/mutter/issues/128 Signed-off-by: Benjamin Tissoires Signed-off-by: Jiri Kosina commit 9703fc8caf36ac65dca1538b23dd137de0b53233 Merge: da19a102ce87 b8d9ee24493d Author: Linus Torvalds Date: Fri Oct 26 08:14:13 2018 -0700 Merge tag 'usb-4.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB/PHY updates from Greg KH: "Here is the big USB/PHY driver patches for 4.20-rc1 Lots of USB changes in here, primarily in these areas: - typec updates and new drivers - new PHY drivers - dwc2 driver updates and additions (this old core keeps getting added to new devices.) - usbtmc major update based on the industry group coming together and working to add new features and performance to the driver. - USB gadget additions for new features - USB gadget configfs updates - chipidea driver updates - other USB gadget updates - USB serial driver updates - renesas driver updates - xhci driver updates - other tiny USB driver updates All of these have been in linux-next for a while with no reported issues" * tag 'usb-4.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (229 commits) usb: phy: ab8500: silence some uninitialized variable warnings usb: xhci: tegra: Add genpd support usb: xhci: tegra: Power-off power-domains on removal usbip:vudc: BUG kmalloc-2048 (Not tainted): Poison overwritten usbip: tools: fix atoi() on non-null terminated string USB: misc: appledisplay: fix backlight update_status return code phy: phy-pxa-usb: add a new driver usb: host: add DT bindings for faraday fotg2 usb: host: ohci-at91: fix request of irq for optional gpio usb/early: remove set but not used variable 'remain_length' usb: typec: Fix copy/paste on typec_set_vconn_role() kerneldoc usb: typec: tcpm: Report back negotiated PPS voltage and current USB: core: remove set but not used variable 'udev' usb: core: fix memory leak on port_dev_path allocation USB: net2280: Remove ->disconnect() callback from net2280_pullup() usb: dwc2: disable power_down on rockchip devices usb: gadget: udc: renesas_usb3: add support for r8a77990 dt-bindings: usb: renesas_usb3: add bindings for r8a77990 usb: gadget: udc: renesas_usb3: Add r8a774a1 support USB: serial: cypress_m8: remove set but not used variable 'iflag' ... commit 6298944d8f57f40ee2a3e6dcea1253e78d7a9969 Author: Benjamin Tissoires Date: Wed Oct 17 09:01:53 2018 +0200 Revert "HID: add NOGET quirk for Eaton Ellipse MAX UPS" This reverts commit 67ddbb3e6568fb1820b2cc45b00c50702b114801. 67ddbb3e656 ("HID: add NOGET quirk for Eaton Ellipse MAX UPS") was reported by Laurent Bigonville. It turns out that a later model Laurent got doesn't need the quirk after all. My take is that Eaton upgraded their firmwares, so we don't need it anymore. The old model was from 2012, so better make sure the new line works properly by removing the quirk. This allows upower to actually fetch the current data. Reported-by: Laurent Bigonville Signed-off-by: Benjamin Tissoires Signed-off-by: Jiri Kosina commit 00b790ea545b6ef30221adef6e9c3707e03b82b5 Author: Kai-Heng Feng Date: Fri Oct 5 12:46:29 2018 +0800 HID: i2c-hid: Add a small delay after sleep command for Raydium touchpanel Raydium touchpanel (2386:4B33) sometimes does not work in desktop session although it works in display manager. During user logging, the display manager exits, close the HID device, then the device gets runtime suspended and powered off. The desktop session begins shortly after, opens the HID device, then the device gets runtime resumed and powered on. If the trasition from display manager to desktop sesesion is fast, the touchpanel cannot switch from powered off to powered on in short timeframe. So add a small delay to workaround the issue. Signed-off-by: Kai-Heng Feng Reviewed-by: Benjamin Tissoires Signed-off-by: Jiri Kosina commit f11274396a538b31bc010f782e05c2ce3f804c13 Author: Breno Leitao Date: Fri Oct 19 17:01:33 2018 -0300 HID: hiddev: fix potential Spectre v1 uref->usage_index can be indirectly controlled by userspace, hence leading to a potential exploitation of the Spectre variant 1 vulnerability. This field is used as an array index by the hiddev_ioctl_usage() function, when 'cmd' is either HIDIOCGCOLLECTIONINDEX, HIDIOCGUSAGES or HIDIOCSUSAGES. For cmd == HIDIOCGCOLLECTIONINDEX case, uref->usage_index is compared to field->maxusage and then used as an index to dereference field->usage array. The same thing happens to the cmd == HIDIOC{G,S}USAGES cases, where uref->usage_index is checked against an array maximum value and then it is used as an index in an array. This is a summary of the HIDIOCGCOLLECTIONINDEX case, which matches the traditional Spectre V1 first load: copy_from_user(uref, user_arg, sizeof(*uref)) if (uref->usage_index >= field->maxusage) goto inval; i = field->usage[uref->usage_index].collection_index; return i; This patch fixes this by sanitizing field uref->usage_index before using it to index field->usage (HIDIOCGCOLLECTIONINDEX) or field->value in HIDIOC{G,S}USAGES arrays, thus, avoiding speculation in the first load. Cc: Signed-off-by: Breno Leitao -- v2: Contemplate cmd == HIDIOC{G,S}USAGES case Signed-off-by: Jiri Kosina commit da19a102ce87bf3e0a7fe277a659d1fc35330d6d Merge: e5f6d9afa341 a60109dc9a95 Author: Linus Torvalds Date: Fri Oct 26 07:38:19 2018 -0700 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 smaller cycle with many of the commits being smallish code fixes and improvements across the drivers. - Driver updates for bnxt_re, cxgb4, hfi1, hns, mlx5, nes, qedr, and rxe - Memory window support in hns - mlx5 user API 'flow mutate/steering' allows accessing the full packet mangling and matching machinery from user space - Support inter-working with verbs API calls in the 'devx' mlx5 user API, and provide options to use devx with less privilege - Modernize the use of syfs and the device interface to use attribute groups and cdev properly for uverbs, and clean up some of the core code's device list management - More progress on net namespaces for RDMA devices - Consolidate driver BAR mmapping support into core code helpers and rework how RDMA holds poitners to mm_struct for get_user_pages cases - First pass to use 'dev_name' instead of ib_device->name - Device renaming for RDMA devices" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: (242 commits) IB/mlx5: Add support for extended atomic operations RDMA/core: Fix comment for hw stats init for port == 0 RDMA/core: Refactor ib_register_device() function RDMA/core: Fix unwinding flow in case of error to register device ib_srp: Remove WARN_ON in srp_terminate_io() IB/mlx5: Allow scatter to CQE without global signaled WRs IB/mlx5: Verify that driver supports user flags IB/mlx5: Support scatter to CQE for DC transport type RDMA/drivers: Use core provided API for registering device attributes RDMA/core: Allow existing drivers to set one sysfs group per device IB/rxe: Remove unnecessary enum values RDMA/umad: Use kernel API to allocate umad indexes RDMA/uverbs: Use kernel API to allocate uverbs indexes RDMA/core: Increase total number of RDMA ports across all devices IB/mlx4: Add port and TID to MAD debug print IB/mlx4: Enable debug print of SMPs RDMA/core: Rename ports_parent to ports_kobj RDMA/core: Do not expose unsupported counters IB/mlx4: Refer to the device kobject instead of ports_parent RDMA/nldev: Allow IB device rename through RDMA netlink ... commit a435ab4f80f983c53b4ca4f8c12b3ddd3ca17670 Author: Diego Viola Date: Fri Oct 26 10:45:16 2018 -0300 libata: Apply NOLPM quirk for SAMSUNG MZ7TD256HAFV-000L9 med_power_with_dipm causes my T450 to freeze with a SAMSUNG MZ7TD256HAFV-000L9 SSD (firmware DXT02L5Q). Switching the LPM to max_performance fixes this issue. Acked-by: Hans de Goede Signed-off-by: Diego Viola Signed-off-by: Jens Axboe commit d061864b89c3234b53d8884027b0cd6f06bd3149 Author: Stephen Warren Date: Wed Oct 24 11:05:13 2018 -0600 ARM: dt: relicense two DT binding IRQ headers Files in include/dt-bindings/ may be useful to any OS that uses DT, when building the OS binary itself, not just when building DTB files. Since some OSs are not GPL, they need non-GPL headers. This change relicenses two of the useful files so that they can be used under the MIT license when desired. I wrote these files and NVIDIA legal has approved this change. Geert also ack'd the change; he fixed some spelling issues in the comments. Cc: Geert Uytterhoeven Signed-off-by: Stephen Warren Signed-off-by: Rob Herring commit e901378578c62202594cba0f6c076f3df365ec91 Author: Felipe Rechia Date: Wed Oct 24 10:57:22 2018 -0300 powerpc/process: Fix flush_all_to_thread for SPE Fix a bug introduced by the creation of flush_all_to_thread() for processors that have SPE (Signal Processing Engine) and use it to compute floating-point operations. >From userspace perspective, the problem was seen in attempts of computing floating-point operations which should generate exceptions. For example: fork(); float x = 0.0 / 0.0; isnan(x); // forked process returns False (should be True) The operation above also should always cause the SPEFSCR FINV bit to be set. However, the SPE floating-point exceptions were turned off after a fork(). Kernel versions prior to the bug used flush_spe_to_thread(), which first saves SPEFSCR register values in tsk->thread and then calls giveup_spe(tsk). After commit 579e633e764e, the save_all() function was called first to giveup_spe(), and then the SPEFSCR register values were saved in tsk->thread. This would save the SPEFSCR register values after disabling SPE for that thread, causing the bug described above. Fixes 579e633e764e ("powerpc: create flush_all_to_thread()") Signed-off-by: Felipe Rechia Signed-off-by: Michael Ellerman commit 58cfbac25b1fd2b76f94566aed28a3662b0ff8c6 Author: Michael Ellerman Date: Fri Oct 26 04:24:15 2018 +1100 Revert "selftests/powerpc: Fix out-of-tree build errors" This reverts commit d8a2fe29d3c97038c8efcc328d5e7940c5310565. That commit, by me, fixed the out of tree build errors by causing some of the tests not to build at all. commit 8dce6b2215eaa91dbf04463e11098a48748da5ab Author: Tyrel Datwyler Date: Mon Oct 22 20:32:12 2018 -0500 powerpc/pseries: add missing cpumask.h include file Build error is encountered when inlcuding if no explicit or implicit include of cpumask.h exists in the including file. In file included from arch/powerpc/platforms/pseries/hotplug-pci.c:3:0: ./arch/powerpc/include/asm/rtas.h:360:34: error: unknown type name 'cpumask_var_t' extern int rtas_online_cpus_mask(cpumask_var_t cpus); ^ ./arch/powerpc/include/asm/rtas.h:361:35: error: unknown type name 'cpumask_var_t' extern int rtas_offline_cpus_mask(cpumask_var_t cpus); Fixes: 120496ac2d2d ("powerpc: Bring all threads online prior to migration/hibernation") Signed-off-by: Tyrel Datwyler Signed-off-by: Michael Ellerman commit 48dc0ef19044bfb69193302fbe3a834e3331b7ae Author: Breno Leitao Date: Mon Oct 22 18:16:26 2018 -0300 selftests/powerpc: Fix ptrace tm failure Test ptrace-tm-spd-gpr fails on current kernel (4.19) due to a segmentation fault that happens on the child process prior to setting cptr[2] = 1. This causes the parent process to wait forever at 'while (!pptr[2])' and the test to be killed by the test harness framework by timeout, thus, failing. The segmentation fault happens because of a inline assembly being generated as: 0x10000355c lfs f0, 0(0) This is reading memory position 0x0 and causing the segmentation fault. This code is being generated by ASM_LOAD_FPR_SINGLE_PRECISION(flt_4), where flt_4 is passed to the inline assembly block as: [flt_4] "r" (&d) Since the inline assembly 'r' constraint means any GPR, gpr0 is being chosen, thus causing this issue when issuing a Load Floating-Point Single instruction. This patch simply changes the constraint to 'b', which specify that this register will be used as base, and r0 is not allowed to be used, avoiding this issue. Other than that, removing flt_2 register from the input operands, since it is not used by the inline assembly code at all. Cc: stable@vger.kernel.org Signed-off-by: Breno Leitao Acked-by: Segher Boessenkool Signed-off-by: Michael Ellerman commit c43befca86ae35cc82bd889484bd179bff27b6c6 Author: Paul Mackerras Date: Sat Oct 20 20:54:55 2018 +1100 KVM: PPC: Use exported tb_to_ns() function in decrementer emulation This changes the KVM code that emulates the decrementer function to do the conversion of decrementer values to time intervals in nanoseconds by calling the tb_to_ns() function exported by the powerpc timer code, in preference to open-coded arithmetic using values from the decrementer_clockevent struct. Similarly, the HV-KVM code that did the same conversion using arithmetic on tb_ticks_per_sec also now uses tb_to_ns(). Signed-off-by: Paul Mackerras Signed-off-by: Michael Ellerman commit 772b039fd9a7e12d5fc80e6f649341934ad51fbe Author: Aravinda Prasad Date: Wed Oct 10 15:52:59 2018 +0530 powerpc/pseries: Export maximum memory value This patch exports the maximum possible amount of memory configured on the system via /proc/powerpc/lparcfg. Signed-off-by: Aravinda Prasad Signed-off-by: Michael Ellerman commit 709cf19c5749308603ffa12557d8bd152a926783 Author: Christophe Leroy Date: Fri Oct 19 06:55:08 2018 +0000 powerpc/8xx: Use patch_site for perf counters setup The 8xx TLB miss routines are patched when (de)activating perf counters. This patch uses the new patch_site functionality in order to get a better code readability and avoid a label mess when dumping the code with 'objdump -d' Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman commit 1a210878bf21de3f60646c13001d04bd4f57dfe1 Author: Christophe Leroy Date: Fri Oct 19 06:55:06 2018 +0000 powerpc/8xx: Use patch_site for memory setup patching The 8xx TLB miss routines are patched at startup at several places. This patch uses the new patch_site functionality in order to get a better code readability and avoid a label mess when dumping the code with 'objdump -d' Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman commit 082e2869fc022de4db9977e06558da78384ea98c Author: Christophe Leroy Date: Fri Oct 19 06:55:04 2018 +0000 powerpc/code-patching: Add a helper to get the address of a patch_site This patch adds a helper to get the address of a patch_site. Signed-off-by: Christophe Leroy [mpe: Call it "patch site" addr] Signed-off-by: Michael Ellerman commit cc4ebf5c0a3440ed0a32d25c55ebdb6ce5f3c0bc Author: Christophe Leroy Date: Fri Oct 19 06:54:54 2018 +0000 Revert "powerpc/8xx: Use L1 entry APG to handle _PAGE_ACCESSED for CONFIG_SWAP" This reverts commit 4f94b2c7462d9720b2afa7e8e8d4c19446bb31ce. That commit was buggy, as it used rlwinm instead of rlwimi. Instead of fixing that bug, we revert the previous commit in order to reduce the dependency between L1 entries and L2 entries Fixes: 4f94b2c7462d9 ("powerpc/8xx: Use L1 entry APG to handle _PAGE_ACCESSED for CONFIG_SWAP") Cc: stable@vger.kernel.org Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman commit 64ae16dfeefec670276607fa789ce096c7ebd7c4 Author: Denis Kenzior Date: Tue Oct 9 17:49:35 2018 +0100 KEYS: asym_tpm: Add support for the sign operation [ver #2] The sign operation can operate in a non-hashed mode by running the RSA sign operation directly on the input. This assumes that the input is less than key_size_in_bytes - 11. Since the TPM performs its own PKCS1 padding, it isn't possible to support 'raw' mode, only 'pkcs1'. Alternatively, a hashed version is also possible. In this variant the input is hashed (by userspace) via the selected hash function first. Then this implementation takes care of converting the hash to ASN.1 format and the sign operation is performed on the result. This is similar to the implementation inside crypto/rsa-pkcs1pad.c. ASN1 templates were copied from crypto/rsa-pkcs1pad.c. There seems to be no easy way to expose that functionality, but likely the templates should be shared somehow. The sign operation is implemented via TPM_Sign operation on the TPM. It is assumed that the TPM wrapped key provided uses TPM_SS_RSASSAPKCS1v15_DER signature scheme. This allows the TPM_Sign operation to work on data up to key_len_in_bytes - 11 bytes long. In theory, we could also use TPM_Unbind instead of TPM_Sign, but we would have to manually pkcs1 pad the digest first. Signed-off-by: Denis Kenzior Signed-off-by: David Howells Tested-by: Marcel Holtmann Reviewed-by: Marcel Holtmann Signed-off-by: James Morris commit e73d170f6c77e7006b48c5e9c325fe520f6012ca Author: Denis Kenzior Date: Tue Oct 9 17:49:28 2018 +0100 KEYS: asym_tpm: Implement tpm_sign [ver #2] Signed-off-by: Denis Kenzior Signed-off-by: David Howells Tested-by: Marcel Holtmann Reviewed-by: Marcel Holtmann Signed-off-by: James Morris commit e08e6891231f5fae82a6ffb4affdfa2ced8c1a77 Author: Denis Kenzior Date: Tue Oct 9 17:49:20 2018 +0100 KEYS: asym_tpm: Implement signature verification [ver #2] This patch implements the verify_signature operation. The public key portion extracted from the TPM key blob is used. The operation is performed entirely in software using the crypto API. Signed-off-by: Denis Kenzior Signed-off-by: David Howells Tested-by: Marcel Holtmann Reviewed-by: Marcel Holtmann Signed-off-by: James Morris commit a335974ae0883e045151a2160093a22aa02c3626 Author: Denis Kenzior Date: Tue Oct 9 17:49:13 2018 +0100 KEYS: asym_tpm: Implement the decrypt operation [ver #2] This patch implements the pkey_decrypt operation using the private key blob. The blob is first loaded into the TPM via tpm_loadkey2. Once the handle is obtained, tpm_unbind operation is used to decrypt the data on the TPM and the result is returned. The key loaded by tpm_loadkey2 is then evicted via tpm_flushspecific operation. This patch assumes that the SRK authorization is a well known 20-byte of zeros and the same holds for the key authorization of the provided key. Signed-off-by: Denis Kenzior Signed-off-by: David Howells Tested-by: Marcel Holtmann Reviewed-by: Marcel Holtmann Signed-off-by: James Morris commit f884fe5a158f750e232b029e1fac0283e388e062 Author: Denis Kenzior Date: Tue Oct 9 17:49:05 2018 +0100 KEYS: asym_tpm: Implement tpm_unbind [ver #2] Signed-off-by: Denis Kenzior Reviewed-by: James Morris Signed-off-by: David Howells Tested-by: Marcel Holtmann Reviewed-by: Marcel Holtmann Signed-off-by: James Morris commit 0c36264aa1d5b77eb21f646f83223134e4528cfe Author: Denis Kenzior Date: Tue Oct 9 17:48:58 2018 +0100 KEYS: asym_tpm: Add loadkey2 and flushspecific [ver #2] This commit adds TPM_LoadKey2 and TPM_FlushSpecific operations. Signed-off-by: Denis Kenzior Signed-off-by: David Howells Reviewed-by: James Morris Tested-by: Marcel Holtmann Reviewed-by: Marcel Holtmann Signed-off-by: James Morris commit 22447981fc050b5f1bdd0e7cbee89b4152a2b2d8 Author: Denis Kenzior Date: Tue Oct 9 17:48:49 2018 +0100 KEYS: Move trusted.h to include/keys [ver #2] Signed-off-by: Denis Kenzior Signed-off-by: David Howells Tested-by: Marcel Holtmann Reviewed-by: Marcel Holtmann Signed-off-by: James Morris commit e1ea9f86023e7668604cc6456a818e5e4d0361c9 Author: Denis Kenzior Date: Tue Oct 9 17:48:41 2018 +0100 KEYS: trusted: Expose common functionality [ver #2] This patch exposes some common functionality needed to send TPM commands. Several functions from keys/trusted.c are exposed for use by the new tpm key subtype and a module dependency is introduced. In the future, common functionality between the trusted key type and the asym_tpm subtype should be factored out into a common utility library. Signed-off-by: Denis Kenzior Signed-off-by: David Howells Tested-by: Marcel Holtmann Reviewed-by: Marcel Holtmann Signed-off-by: James Morris commit ad4b1eb5fb3350c979a4f86eacfe7aac0595f335 Author: Denis Kenzior Date: Tue Oct 9 17:48:33 2018 +0100 KEYS: asym_tpm: Implement encryption operation [ver #2] This patch impelements the pkey_encrypt operation. The public key portion extracted from the TPM key blob is used. The operation is performed entirely in software using the crypto API. Signed-off-by: Denis Kenzior Signed-off-by: David Howells Tested-by: Marcel Holtmann Reviewed-by: Marcel Holtmann Signed-off-by: James Morris commit dff5a61a59614c110d06a5dc1466cdb762b6affd Author: Denis Kenzior Date: Tue Oct 9 17:48:25 2018 +0100 KEYS: asym_tpm: Implement pkey_query [ver #2] This commit implements the pkey_query operation. This is accomplished by utilizing the public key portion to obtain max encryption size information for the operations that utilize the public key (encrypt, verify). The private key size extracted from the TPM_Key data structure is used to fill the information where the private key is used (decrypt, sign). The kernel uses a DER/BER format for public keys and does not support setting the key via the raw binary form. To get around this a simple DER/BER formatter is implemented which stores the DER/BER formatted key and exponent in a temporary buffer for use by the crypto API. The only exponent supported currently is 65537. This holds true for other Linux TPM tools such as 'create_tpm_key' and trousers-openssl_tpm_engine. Signed-off-by: Denis Kenzior Signed-off-by: David Howells Tested-by: Marcel Holtmann Reviewed-by: Marcel Holtmann Signed-off-by: James Morris commit d5e72745ca121459f68c598dac7b374a76322b94 Author: Denis Kenzior Date: Tue Oct 9 17:48:17 2018 +0100 KEYS: Add parser for TPM-based keys [ver #2] For TPM based keys, the only standard seems to be described here: http://david.woodhou.se/draft-woodhouse-cert-best-practice.html#rfc.section.4.4 Quote from the relevant section: "Rather, a common form of storage for "wrapped" keys is to encode the binary TCPA_KEY structure in a single ASN.1 OCTET-STRING, and store the result in PEM format with the tag "-----BEGIN TSS KEY BLOB-----". " This patch implements the above behavior. It is assumed that the PEM encoding is stripped out by userspace and only the raw DER/BER format is provided. This is similar to how PKCS7, PKCS8 and X.509 keys are handled. Signed-off-by: Denis Kenzior Signed-off-by: David Howells Tested-by: Marcel Holtmann Reviewed-by: Marcel Holtmann Signed-off-by: James Morris commit f8c54e1ac4b82933dfcf88c37892da8ae35ccbe4 Author: Denis Kenzior Date: Tue Oct 9 17:48:10 2018 +0100 KEYS: asym_tpm: extract key size & public key [ver #2] The parsed BER/DER blob obtained from user space contains a TPM_Key structure. This structure has some information about the key as well as the public key portion. This patch extracts this information for future use. Signed-off-by: Denis Kenzior Signed-off-by: David Howells Tested-by: Marcel Holtmann Reviewed-by: Marcel Holtmann Signed-off-by: James Morris commit 903be6bb84c544551150a6f5aab9fda1ed9a6895 Author: Denis Kenzior Date: Tue Oct 9 17:48:02 2018 +0100 KEYS: asym_tpm: add skeleton for asym_tpm [ver #2] This patch adds the basic skeleton for the asym_tpm asymmetric key subtype. Signed-off-by: Denis Kenzior Signed-off-by: David Howells Tested-by: Marcel Holtmann Reviewed-by: Marcel Holtmann Signed-off-by: James Morris commit b3a8c8a5ebb5b4c3eb7b104364e63c453cc85f14 Author: Denis Kenzior Date: Tue Oct 9 17:47:53 2018 +0100 crypto: rsa-pkcs1pad: Allow hash to be optional [ver #2] The original pkcs1pad implementation allowed to pad/unpad raw RSA output. However, this has been taken out in commit: commit c0d20d22e0ad ("crypto: rsa-pkcs1pad - Require hash to be present") This patch restored this ability as it is needed by the asymmetric key implementation. Signed-off-by: Denis Kenzior Signed-off-by: David Howells Tested-by: Marcel Holtmann Reviewed-by: Marcel Holtmann Signed-off-by: James Morris commit 3c58b2362ba828ee2970c66c6a6fd7b04fde4413 Author: David Howells Date: Tue Oct 9 17:47:46 2018 +0100 KEYS: Implement PKCS#8 RSA Private Key parser [ver #2] Implement PKCS#8 RSA Private Key format [RFC 5208] parser for the asymmetric key type. For the moment, this will only support unencrypted DER blobs. PEM and decryption can be added later. PKCS#8 keys can be loaded like this: openssl pkcs8 -in private_key.pem -topk8 -nocrypt -outform DER | \ keyctl padd asymmetric foo @s Signed-off-by: David Howells Tested-by: Marcel Holtmann Reviewed-by: Marcel Holtmann Reviewed-by: Denis Kenzior Tested-by: Denis Kenzior Signed-off-by: James Morris commit c08fed73712620eb0a19244dbbbbdf00edbe5e47 Author: David Howells Date: Tue Oct 9 17:47:38 2018 +0100 KEYS: Implement encrypt, decrypt and sign for software asymmetric key [ver #2] Implement the encrypt, decrypt and sign operations for the software asymmetric key subtype. This mostly involves offloading the call to the crypto layer. Note that the decrypt and sign operations require a private key to be supplied. Encrypt (and also verify) will work with either a public or a private key. A public key can be supplied with an X.509 certificate and a private key can be supplied using a PKCS#8 blob: # j=`openssl pkcs8 -in ~/pkcs7/firmwarekey2.priv -topk8 -nocrypt -outform DER | keyctl padd asymmetric foo @s` # keyctl pkey_query $j - enc=pkcs1 key_size=4096 max_data_size=512 max_sig_size=512 max_enc_size=512 max_dec_size=512 encrypt=y decrypt=y sign=y verify=y # keyctl pkey_encrypt $j 0 data enc=pkcs1 >/tmp/enc # keyctl pkey_decrypt $j 0 /tmp/enc enc=pkcs1 >/tmp/dec # cmp data /tmp/dec # keyctl pkey_sign $j 0 data enc=pkcs1 hash=sha1 >/tmp/sig # keyctl pkey_verify $j 0 data /tmp/sig enc=pkcs1 hash=sha1 # Signed-off-by: David Howells Tested-by: Marcel Holtmann Reviewed-by: Marcel Holtmann Reviewed-by: Denis Kenzior Tested-by: Denis Kenzior Signed-off-by: James Morris commit f7c4e06e066c3df282e6e3d4e7d8c498be9e1e46 Author: David Howells Date: Tue Oct 9 17:47:31 2018 +0100 KEYS: Allow the public_key struct to hold a private key [ver #2] Put a flag in the public_key struct to indicate if the structure is holding a private key. The private key must be held ASN.1 encoded in the format specified in RFC 3447 A.1.2. This is the form required by crypto/rsa.c. The software encryption subtype's verification and query functions then need to select the appropriate crypto function to set the key. Signed-off-by: David Howells Tested-by: Marcel Holtmann Reviewed-by: Marcel Holtmann Reviewed-by: Denis Kenzior Tested-by: Denis Kenzior Signed-off-by: James Morris commit 82f94f24475c89c6d5cb673e1277b5b4394499c8 Author: David Howells Date: Tue Oct 9 17:47:23 2018 +0100 KEYS: Provide software public key query function [ver #2] Provide a query function for the software public key implementation. This permits information about such a key to be obtained using query_asymmetric_key() or KEYCTL_PKEY_QUERY. Signed-off-by: David Howells Tested-by: Marcel Holtmann Reviewed-by: Marcel Holtmann Reviewed-by: Denis Kenzior Tested-by: Denis Kenzior Signed-off-by: James Morris commit 039884907787e55166e84e0b654a5342cc8a04ab Author: David Howells Date: Tue Oct 9 17:47:15 2018 +0100 KEYS: Make the X.509 and PKCS7 parsers supply the sig encoding type [ver #2] Make the X.509 and PKCS7 parsers fill in the signature encoding type field recently added to the public_key_signature struct. Signed-off-by: David Howells Tested-by: Marcel Holtmann Reviewed-by: Marcel Holtmann Reviewed-by: Denis Kenzior Tested-by: Denis Kenzior Signed-off-by: James Morris commit 5a30771832aab228e0863e414f9182f86797429e Author: David Howells Date: Tue Oct 9 17:47:07 2018 +0100 KEYS: Provide missing asymmetric key subops for new key type ops [ver #2] Provide the missing asymmetric key subops for new key type ops. This include query, encrypt, decrypt and create signature. Verify signature already exists. Also provided are accessor functions for this: int query_asymmetric_key(const struct key *key, struct kernel_pkey_query *info); int encrypt_blob(struct kernel_pkey_params *params, const void *data, void *enc); int decrypt_blob(struct kernel_pkey_params *params, const void *enc, void *data); int create_signature(struct kernel_pkey_params *params, const void *data, void *enc); The public_key_signature struct gains an encoding field to carry the encoding for verify_signature(). Signed-off-by: David Howells Tested-by: Marcel Holtmann Reviewed-by: Marcel Holtmann Reviewed-by: Denis Kenzior Tested-by: Denis Kenzior Signed-off-by: James Morris commit 00d60fd3b93219ea854220f0fd264b86398cbc53 Author: David Howells Date: Tue Oct 9 17:46:59 2018 +0100 KEYS: Provide keyctls to drive the new key type ops for asymmetric keys [ver #2] Provide five keyctl functions that permit userspace to make use of the new key type ops for accessing and driving asymmetric keys. (*) Query an asymmetric key. long keyctl(KEYCTL_PKEY_QUERY, key_serial_t key, unsigned long reserved, struct keyctl_pkey_query *info); Get information about an asymmetric key. The information is returned in the keyctl_pkey_query struct: __u32 supported_ops; A bit mask of flags indicating which ops are supported. This is constructed from a bitwise-OR of: KEYCTL_SUPPORTS_{ENCRYPT,DECRYPT,SIGN,VERIFY} __u32 key_size; The size in bits of the key. __u16 max_data_size; __u16 max_sig_size; __u16 max_enc_size; __u16 max_dec_size; The maximum sizes in bytes of a blob of data to be signed, a signature blob, a blob to be encrypted and a blob to be decrypted. reserved must be set to 0. This is intended for future use to hand over one or more passphrases needed unlock a key. If successful, 0 is returned. If the key is not an asymmetric key, EOPNOTSUPP is returned. (*) Encrypt, decrypt, sign or verify a blob using an asymmetric key. long keyctl(KEYCTL_PKEY_ENCRYPT, const struct keyctl_pkey_params *params, const char *info, const void *in, void *out); long keyctl(KEYCTL_PKEY_DECRYPT, const struct keyctl_pkey_params *params, const char *info, const void *in, void *out); long keyctl(KEYCTL_PKEY_SIGN, const struct keyctl_pkey_params *params, const char *info, const void *in, void *out); long keyctl(KEYCTL_PKEY_VERIFY, const struct keyctl_pkey_params *params, const char *info, const void *in, const void *in2); Use an asymmetric key to perform a public-key cryptographic operation a blob of data. The parameter block pointed to by params contains a number of integer values: __s32 key_id; __u32 in_len; __u32 out_len; __u32 in2_len; For a given operation, the in and out buffers are used as follows: Operation ID in,in_len out,out_len in2,in2_len ======================= =============== =============== =========== KEYCTL_PKEY_ENCRYPT Raw data Encrypted data - KEYCTL_PKEY_DECRYPT Encrypted data Raw data - KEYCTL_PKEY_SIGN Raw data Signature - KEYCTL_PKEY_VERIFY Raw data - Signature info is a string of key=value pairs that supply supplementary information. The __spare space in the parameter block must be set to 0. This is intended, amongst other things, to allow the passing of passphrases required to unlock a key. If successful, encrypt, decrypt and sign all return the amount of data written into the output buffer. Verification returns 0 on success. Signed-off-by: David Howells Tested-by: Marcel Holtmann Reviewed-by: Marcel Holtmann Reviewed-by: Denis Kenzior Tested-by: Denis Kenzior Signed-off-by: James Morris commit 70025f84e5b79627a6739533c4fe7cef5b605886 Author: David Howells Date: Tue Oct 9 17:46:51 2018 +0100 KEYS: Provide key type operations for asymmetric key ops [ver #2] Provide five new operations in the key_type struct that can be used to provide access to asymmetric key operations. These will be implemented for the asymmetric key type in a later patch and may refer to a key retained in RAM by the kernel or a key retained in crypto hardware. int (*asym_query)(const struct kernel_pkey_params *params, struct kernel_pkey_query *info); int (*asym_eds_op)(struct kernel_pkey_params *params, const void *in, void *out); int (*asym_verify_signature)(struct kernel_pkey_params *params, const void *in, const void *in2); Since encrypt, decrypt and sign are identical in their interfaces, they're rolled together in the asym_eds_op() operation and there's an operation ID in the params argument to distinguish them. Verify is different in that we supply the data and the signature instead and get an error value (or 0) as the only result on the expectation that this may well be how a hardware crypto device may work. Signed-off-by: David Howells Tested-by: Marcel Holtmann Reviewed-by: Marcel Holtmann Reviewed-by: Denis Kenzior Tested-by: Denis Kenzior Signed-off-by: James Morris commit 5a2e1853d68904c4b26706dba2884cbeb77bc3ee Author: Vasily Gorbik Date: Wed Oct 17 13:59:46 2018 +0200 s390: avoid vmlinux segments overlap Currently .vmlinux.info section of uncompressed vmlinux elf image is included into the data segment and load address specified as 0. That extends data segment to address 0 and makes "text" and "data" segments overlap. Program Headers: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flags Align LOAD 0x0000000000001000 0x0000000000100000 0x0000000000100000 0x0000000000ead03c 0x0000000000ead03c R E 0x1000 LOAD 0x0000000000eaf000 0x0000000000000000 0x0000000000000000 0x0000000001a13400 0x000000000233b520 RWE 0x1000 NOTE 0x0000000000eae000 0x0000000000fad000 0x0000000000fad000 0x000000000000003c 0x000000000000003c 0x4 Section to Segment mapping: Segment Sections... 00 .text .notes 01 .rodata __ksymtab __ksymtab_gpl __ksymtab_strings __param __modver .data..ro_after_init __ex_table .data __bug_table .init.text .exit.text .exit.data .altinstructions .altinstr_replacement .nospec_call_table .nospec_return_table .boot.data .init.data .data..percpu .bss .vmlinux.info 02 .notes Later when vmlinux.bin is produced from vmlinux, .vmlinux.info section is removed. But elf vmlinux file, even though it is not bootable anymore, used for debugging and loadable segments overlap should be avoided. Utilize special ":NONE" phdr specification to avoid adding .vmlinux.info into loadable data segment. Also set .vmlinux.info section type to INFO, which allows to get a not-loadable info CONTENTS section. Since minimal supported version of binutils 2.20 does not have --dump-section objcopy option, make .vmlinux.info section loadable during info.bin creation to get actual section contents. Reported-by: Philipp Rudo Signed-off-by: Vasily Gorbik Signed-off-by: Martin Schwidefsky commit b44b136a3773d8a9c7853f8df716bd1483613cbb Author: Vasily Gorbik Date: Fri Oct 19 15:37:01 2018 +0200 s390/vdso: add missing FORCE to build targets According to Documentation/kbuild/makefiles.txt all build targets using if_changed should use FORCE as well. Add missing FORCE to make sure vdso targets are rebuild properly when not just immediate prerequisites have changed but also when build command differs. Reviewed-by: Philipp Rudo Signed-off-by: Vasily Gorbik Signed-off-by: Martin Schwidefsky commit ef5febae1543f35a45f01614123e829d77326d0f Author: Vasily Gorbik Date: Fri Oct 19 13:37:46 2018 +0200 s390/decompressor: add missing FORCE to build targets According to Documentation/kbuild/makefiles.txt all build targets using if_changed should use FORCE as well. Add missing FORCE to make sure vmlinux decompressor targets are rebuild properly when not just immediate prerequisites have changed but also when build command differs. Reviewed-by: Philipp Rudo Signed-off-by: Vasily Gorbik Signed-off-by: Martin Schwidefsky commit efe8eaf7b525f1be26fe20d723d2bfbfcd7455fd Merge: 034bda1cd5ab fe57120e18a1 Author: Ingo Molnar Date: Fri Oct 26 09:22:45 2018 +0200 Merge tag 'perf-core-for-mingo-4.20-20181025' 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: - Introduce 'perf trace --max-events' for stopping 'perf trace' when that many syscalls (enter+exit), tracepoints or other events such as page faults take place. Support that as well on a per-event basis, e.g.: perf trace -e sched:*switch/nr=2/,block:*_plug/nr=4/,block:*_unplug/nr=1/,net:*dev_queue/nr=3,max-stack=16/ Will stop when 2 context switches, 4 block plugs, 1 block unplug and 3 net_dev_queue tracepoints take place. (Arnaldo Carvalho de Melo) - Poll for monitored tasks being alive in 'perf stat -p/-t', exiting when those tasks all terminate (Jiri Olsa) - Encode -k clockid frequency into perf.data to enable timestamps derived metrics conversion into wall clock time on reporting stage. (Alexey Budankov) - Improve Intel PT call graph from SQL database and GUI python scripts, including adopting the Qt MDI interface to allow for multiple subwindows for all the tables, helping in better visualizing the data in the SQL tables, also uses, when available, the Intel XED disassembler libraries to present the Intel PT data as x86 asm mnemonics. This last feature is not currently working in some cases, fix is being discussed (Adrian Hunter) - Implement a ftrace function_graph view in 'perf script' when processing hardware trace data such as Intel PT (Andi Kleen) - Better integration with the Intel XED disassembler, when available, in 'perf script' (Andi Kleen) - Some 'perf trace' drop refcount fixes (Arnaldo Carvalho de Melo) - Add Sparc support to 'perf annotate', jitdump (David Miller) - Fix PLT symbols entry/header sizes properly on Sparc (David Miller) - Fix generation of system call table failure with /tmp mounted with 'noexec' in arm64 (Hongxu Jia) - Allow extended console debug output in 'perf script' (Milian Wolff) - Flush output stream after events in 'perf script' verbose mode (Milian Wolff) Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit 7a048cec598e1761cdcd63eb3a3c6e390b7661c7 Author: Juergen Gross Date: Tue Oct 9 18:09:59 2018 +0200 xen: drop writing error messages to xenstore xenbus_va_dev_error() will try to write error messages to Xenstore under the error//error node (with something like "device/vbd/51872"). This will fail normally and another message about this failure is added to dmesg. I believe this is a remnant from very ancient times, as it was added in the first pvops rush of commits in 2007. So remove the additional message when writing to Xenstore failed as a minimum step. Signed-off-by: Juergen Gross Reviewed-by: Boris Ostrovsky Signed-off-by: Juergen Gross commit e6111161c0a02d58919d776eec94b313bb57911f Author: Juergen Gross Date: Thu Oct 25 09:54:15 2018 +0200 xen/pvh: don't try to unplug emulated devices A Xen PVH guest has no associated qemu device model, so trying to unplug any emulated devices is making no sense at all. Bail out early from xen_unplug_emulated_devices() when running as PVH guest. This will avoid issuing the boot message: [ 0.000000] Xen Platform PCI: unrecognised magic value Cc: # 4.11 Signed-off-by: Juergen Gross Reviewed-by: Boris Ostrovsky Signed-off-by: Juergen Gross commit 87613bb9d20c556b5eeae04f4caf40701189f07b Author: Helge Deller Date: Thu Oct 25 08:31:16 2018 +0200 parisc: Use LINUX_GATEWAY_SPACE constant in entry.S Use and mention the predefined LINUX_GATEWAY_SPACE constant in the various important code sections which deal with the gateway page. Signed-off-by: Helge Deller commit 9a298b445514b3de08252c71833f9273b7727355 Author: Arnd Bergmann Date: Thu Sep 13 17:59:50 2018 +0200 parisc64: change __kernel_suseconds_t to match glibc There are only two 64-bit architecture ports that have a 32-bit suseconds_t: sparc64 and parisc64. I've encountered a number of problems with this, while trying to get a proper 64-bit time_t working on 32-bit architectures. Having a 32-bit suseconds_t combined with a 64-bit time_t means that we get extra padding in data structures that may leak kernel stack data to user space, and it breaks all code that assumes that timespec and timeval have the same layout. While we can't change sparc64, it seems that glibc on parisc64 has always set suseconds_t to 'long', and the current version would give incorrect results for gettimeofday() and many other interfaces: timestamps passed from user space into the kernel result in tv_usec being always zero (the lower bits contain the intended value but are ignored) while data passed from the kernel to user space contains either zeroes or random data in tv_usec. Based on that, it seems best to change the user API in the kernel in an incompatible way to match what glibc expects. Note that the distros I could find (gentoo and debian) all just have 32-bit user space, which does not suffer from this problem. Signed-off-by: Arnd Bergmann Signed-off-by: Helge Deller commit e5f6d9afa3415104e402cd69288bb03f7165eeba Merge: c300af28572d caf539cd1087 Author: Linus Torvalds Date: Thu Oct 25 18:14:31 2018 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc Pull sparc fix from David Miller: "Build regression fix" * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc: sparc: Fix VDSO build with older binutils. commit c300af28572d05ae6891c359a7c8c2c81f01dccf Merge: 0d1e8b8d2bcd d26c4bbf9924 Author: Linus Torvalds Date: Thu Oct 25 18:01:29 2018 -0700 Merge tag 'riscv-for-linus-4.20-mw0' of git://git.kernel.org/pub/scm/linux/kernel/git/palmer/riscv-linux Pull RISC-V updates from Palmer Dabbelt: "This patch set contains a lot (at least, for me) of improvements to the RISC-V kernel port: - The removal of some cacheinfo values that were bogus. - On systems with F but without D the kernel will not show the F extension to userspace, as it isn't actually supported. - Support for futexes. - Removal of some unused code. - Cleanup of some menuconfig entries. - Support for systems without a floating-point unit, and for building kernels that will never use the floating-point unit. - More fixes to the RV32I port, which regressed again. It's really time to get this into a regression test somewhere so I stop breaking it. Thanks to Zong for resurrecting it again! - Various fixes that resulted from a year old review of our original patch set that I finally got around to. - Various improvements to SMP support, largely based around having switched to logical hart numbering, as well as some interrupt improvements. This one is in the same patch set as above, thanks to Atish for sheparding everything though as my patch set was a bit of a mess. I'm pretty sure this is our largest patch set since the original kernel contribution, and it's certainly the one with the most contributors. While I don't have anything else I know I'm going to submit for the merge window, I would be somewhat surprised if I didn't screw anything up. Thanks for the help, everyone!" * tag 'riscv-for-linus-4.20-mw0' of git://git.kernel.org/pub/scm/linux/kernel/git/palmer/riscv-linux: (31 commits) RISC-V: Cosmetic menuconfig changes riscv: move GCC version check for ARCH_SUPPORTS_INT128 to Kconfig RISC-V: remove the unused return_to_handler export RISC-V: Add futex support. RISC-V: Add FP register ptrace support for gdb. RISC-V: Mask out the F extension on systems without D RISC-V: Don't set cacheinfo.{physical_line_partition,attributes} RISC-V: Show IPI stats RISC-V: Show CPU ID and Hart ID separately in /proc/cpuinfo RISC-V: Use Linux logical CPU number instead of hartid RISC-V: Add logical CPU indexing for RISC-V RISC-V: Use WRITE_ONCE instead of direct access RISC-V: Use mmgrab() RISC-V: Rename im_okay_therefore_i_am to found_boot_cpu RISC-V: Rename riscv_of_processor_hart to riscv_of_processor_hartid RISC-V: Provide a cleaner raw_smp_processor_id() RISC-V: Disable preemption before enabling interrupts RISC-V: Comment on the TLB flush in smp_callin() RISC-V: Filter ISA and MMU values in cpuinfo RISC-V: Don't set cacheinfo.{physical_line_partition,attributes} ... commit 0d1e8b8d2bcd3150d51754d8d0fdbf44dc88b0d3 Merge: 83c4087ce468 22a7cdcae6a4 Author: Linus Torvalds Date: Thu Oct 25 17:57:35 2018 -0700 Merge tag 'kvm-4.20-1' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull KVM updates from Radim Krčmář: "ARM: - Improved guest IPA space support (32 to 52 bits) - RAS event delivery for 32bit - PMU fixes - Guest entry hardening - Various cleanups - Port of dirty_log_test selftest PPC: - Nested HV KVM support for radix guests on POWER9. The performance is much better than with PR KVM. Migration and arbitrary level of nesting is supported. - Disable nested HV-KVM on early POWER9 chips that need a particular hardware bug workaround - One VM per core mode to prevent potential data leaks - PCI pass-through optimization - merge ppc-kvm topic branch and kvm-ppc-fixes to get a better base s390: - Initial version of AP crypto virtualization via vfio-mdev - Improvement for vfio-ap - Set the host program identifier - Optimize page table locking x86: - Enable nested virtualization by default - Implement Hyper-V IPI hypercalls - Improve #PF and #DB handling - Allow guests to use Enlightened VMCS - Add migration selftests for VMCS and Enlightened VMCS - Allow coalesced PIO accesses - Add an option to perform nested VMCS host state consistency check through hardware - Automatic tuning of lapic_timer_advance_ns - Many fixes, minor improvements, and cleanups" * tag 'kvm-4.20-1' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (204 commits) KVM/nVMX: Do not validate that posted_intr_desc_addr is page aligned Revert "kvm: x86: optimize dr6 restore" KVM: PPC: Optimize clearing TCEs for sparse tables x86/kvm/nVMX: tweak shadow fields selftests/kvm: add missing executables to .gitignore KVM: arm64: Safety check PSTATE when entering guest and handle IL KVM: PPC: Book3S HV: Don't use streamlined entry path on early POWER9 chips arm/arm64: KVM: Enable 32 bits kvm vcpu events support arm/arm64: KVM: Rename function kvm_arch_dev_ioctl_check_extension() KVM: arm64: Fix caching of host MDCR_EL2 value KVM: VMX: enable nested virtualization by default KVM/x86: Use 32bit xor to clear registers in svm.c kvm: x86: Introduce KVM_CAP_EXCEPTION_PAYLOAD kvm: vmx: Defer setting of DR6 until #DB delivery kvm: x86: Defer setting of CR2 until #PF delivery kvm: x86: Add payload operands to kvm_multiple_exception kvm: x86: Add exception payload fields to kvm_vcpu_events kvm: x86: Add has_payload and payload to kvm_queued_exception KVM: Documentation: Fix omission in struct kvm_vcpu_events KVM: selftests: add Enlightened VMCS test ... commit 83c4087ce468601501ecde4d0ec5b2abd5f57c31 Merge: a67eefad996f a90e90b7d55e Author: Linus Torvalds Date: Thu Oct 25 17:15:46 2018 -0700 Merge branch 'for-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup Pull cgroup updates from Tejun Heo: "All trivial changes - simplification, typo fix and adding cond_resched() in a netclassid update loop" * 'for-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup: cgroup, netclassid: add a preemption point to write_classid rdmacg: fix a typo in rdmacg documentation cgroup: Simplify cgroup_ancestor commit a67eefad996f007afc7c38efe8f45257fb1e3994 Merge: 62606c224d72 54edeb0327d7 Author: Linus Torvalds Date: Thu Oct 25 17:11:52 2018 -0700 Merge tag 'printk-for-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/pmladek/printk Pull printk updates from Petr Mladek: - Fix two more locations where printf formatting leaked pointers - Better log_buf_len parameter handling - Add prefix to messages from printk code - Do not miss messages on other consoles when the log is replayed on a new one - Reduce race between console registration and panic() when the log might get replayed on all consoles - Some cont buffer code clean up - Call console only when there is something to do (log vs cont buffer) * tag 'printk-for-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/pmladek/printk: lib/vsprintf: Hash printed address for netdev bits fallback lib/vsprintf: Hash legacy clock addresses lib/vsprintf: Prepare for more general use of ptr_to_id() lib/vsprintf: Make ptr argument conts in ptr_to_id() printk: fix integer overflow in setup_log_buf() printk: do not preliminary split up cont buffer printk: lock/unlock console only for new logbuf entries printk: keep kernel cont support always enabled printk: Give error on attempt to set log buffer length to over 2G printk: Add KBUILD_MODNAME and remove a redundant print prefix printk: Correct wrong casting printk: Fix panic caused by passing log_buf_len to command line printk: CON_PRINTBUFFER console registration is a bit racy printk: Do not miss new messages when replaying the log commit ede95a63b5e84ddeea6b0c473b36ab8bfd8c6ce3 Author: Daniel Borkmann Date: Tue Oct 23 01:11:04 2018 +0200 bpf: add bpf_jit_limit knob to restrict unpriv allocations Rick reported that the BPF JIT could potentially fill the entire module space with BPF programs from unprivileged users which would prevent later attempts to load normal kernel modules or privileged BPF programs, for example. If JIT was enabled but unsuccessful to generate the image, then before commit 290af86629b2 ("bpf: introduce BPF_JIT_ALWAYS_ON config") we would always fall back to the BPF interpreter. Nowadays in the case where the CONFIG_BPF_JIT_ALWAYS_ON could be set, then the load will abort with a failure since the BPF interpreter was compiled out. Add a global limit and enforce it for unprivileged users such that in case of BPF interpreter compiled out we fail once the limit has been reached or we fall back to BPF interpreter earlier w/o using module mem if latter was compiled in. In a next step, fair share among unprivileged users can be resolved in particular for the case where we would fail hard once limit is reached. Fixes: 290af86629b2 ("bpf: introduce BPF_JIT_ALWAYS_ON config") Fixes: 0a14842f5a3c ("net: filter: Just In Time compiler for x86-64") Co-Developed-by: Rick Edgecombe Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Cc: Eric Dumazet Cc: Jann Horn Cc: Kees Cook Cc: LKML Signed-off-by: Alexei Starovoitov commit 4d716e10e3c59df6a2252353edb774dc819eb8f5 Merge: 4a6998aff82a b09928b97628 Author: Alexei Starovoitov Date: Thu Oct 25 17:02:06 2018 -0700 Merge branch 'pkt-access-fixes' Daniel Borkmann says: ==================== Several fixes to get direct packet access in order from verifier side. Also test suite fix to run cg_skb as unpriv and an improvement to make direct packet write less error prone in future. ==================== Acked-by: Song Liu Signed-off-by: Alexei Starovoitov commit b09928b976280d64060d7bee146d7df5c5a29bef Author: Daniel Borkmann Date: Wed Oct 24 22:05:49 2018 +0200 bpf: make direct packet write unclone more robust Given this seems to be quite fragile and can easily slip through the cracks, lets make direct packet write more robust by requiring that future program types which allow for such write must provide a prologue callback. In case of XDP and sk_msg it's noop, thus add a generic noop handler there. The latter starts out with NULL data/data_end unconditionally when sg pages are shared. Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Acked-by: Song Liu Signed-off-by: Alexei Starovoitov commit d3f66e4116aff8dd0d5bd4067295b9ddb5e2c29c Author: Daniel Borkmann Date: Wed Oct 24 22:05:48 2018 +0200 bpf: fix leaking uninitialized memory on pop/peek helpers Commit f1a2e44a3aec ("bpf: add queue and stack maps") added helpers with ARG_PTR_TO_UNINIT_MAP_VALUE. Meaning, the helper is supposed to fill the map value buffer with data instead of reading from it like in other helpers such as map update. However, given the buffer is allowed to be uninitialized (since we fill it in the helper anyway), it also means that the helper is obliged to wipe the memory in case of an error in order to not allow for leaking uninitialized memory. Given pop/peek is both handled inside __{stack,queue}_map_get(), lets wipe it there on error case, that is, empty stack/queue. Fixes: f1a2e44a3aec ("bpf: add queue and stack maps") Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Cc: Mauricio Vasquez B Acked-by: Mauricio Vasquez B Signed-off-by: Alexei Starovoitov commit 80b0d86a176cab6201719b8dfd806902b0c6e046 Author: Daniel Borkmann Date: Wed Oct 24 22:05:47 2018 +0200 bpf: fix direct packet write into pop/peek helpers Commit f1a2e44a3aec ("bpf: add queue and stack maps") probably just copy-pasted .pkt_access for bpf_map_{pop,peek}_elem() helpers, but this is buggy in this context since it would allow writes into cloned skbs which is invalid. Therefore, disable .pkt_access for the two. Fixes: f1a2e44a3aec ("bpf: add queue and stack maps") Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Cc: Mauricio Vasquez B Acked-by: Mauricio Vasquez B Signed-off-by: Alexei Starovoitov commit d5563d367c2ce48ea3d675c77f7109f37311943d Author: Daniel Borkmann Date: Wed Oct 24 22:05:46 2018 +0200 bpf: fix cg_skb types to hint access type in may_access_direct_pkt_data Commit b39b5f411dcf ("bpf: add cg_skb_is_valid_access for BPF_PROG_TYPE_CGROUP_SKB") added direct packet access for skbs in cg_skb program types, however allowed access type was not added to the may_access_direct_pkt_data() helper. Therefore the latter always returns false. This is not directly an issue, it just means writes are unconditionally disabled (which is correct) but also reads. Latter is relevant in this function when BPF helpers may read direct packet data which is unconditionally disabled then. Fix it by properly adding BPF_PROG_TYPE_CGROUP_SKB to may_access_direct_pkt_data(). Fixes: b39b5f411dcf ("bpf: add cg_skb_is_valid_access for BPF_PROG_TYPE_CGROUP_SKB") Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Cc: Song Liu Signed-off-by: Alexei Starovoitov commit 5d66fa7d9e9e9399ddfdc530f352dd6f7c724485 Author: Daniel Borkmann Date: Wed Oct 24 22:05:45 2018 +0200 bpf: fix direct packet access for flow dissector progs Commit d58e468b1112 ("flow_dissector: implements flow dissector BPF hook") added direct packet access for skbs in may_access_direct_pkt_data() function where this enables read and write access to the skb->data. This is buggy because without a prologue generator such as bpf_unclone_prologue() we would allow for writing into cloned skbs. Original intention might have been to only allow read access where this is not needed (similar as the flow_dissector_func_proto() indicates which enables only bpf_skb_load_bytes() as well), therefore this patch fixes it to restrict to read-only. Fixes: d58e468b1112 ("flow_dissector: implements flow dissector BPF hook") Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Cc: Petar Penkov Signed-off-by: Alexei Starovoitov commit ab21c1b5f799395232b838e98981cfed6d647905 Author: Daniel Borkmann Date: Wed Oct 24 22:05:44 2018 +0200 bpf: disallow direct packet access for unpriv in cg_skb Commit b39b5f411dcf ("bpf: add cg_skb_is_valid_access for BPF_PROG_TYPE_CGROUP_SKB") added support for returning pkt pointers for direct packet access. Given this program type is allowed for both unprivileged and privileged users, we shouldn't allow unprivileged ones to use it, e.g. besides others one reason would be to avoid any potential speculation on the packet test itself, thus guard this for root only. Fixes: b39b5f411dcf ("bpf: add cg_skb_is_valid_access for BPF_PROG_TYPE_CGROUP_SKB") Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Cc: Song Liu Signed-off-by: Alexei Starovoitov commit 36641ad61db5ce9befd5eb0071abb36eaff16cfc Author: Daniel Borkmann Date: Wed Oct 24 22:05:43 2018 +0200 bpf: fix test suite to enable all unpriv program types Given BPF_PROG_TYPE_CGROUP_SKB program types are also valid in an unprivileged setting, lets not omit these tests and potentially have issues fall through the cracks. Make this more obvious by adding a small test_as_unpriv() helper. Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: Alexei Starovoitov commit 62606c224d72a98c35d21a849f95cccf95b0a252 Merge: 24ed334f3366 a1c6fd4308d3 Author: Linus Torvalds Date: Thu Oct 25 16:43:35 2018 -0700 Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 Pull crypto updates from Herbert Xu: "API: - Remove VLA usage - Add cryptostat user-space interface - Add notifier for new crypto algorithms Algorithms: - Add OFB mode - Remove speck Drivers: - Remove x86/sha*-mb as they are buggy - Remove pcbc(aes) from x86/aesni - Improve performance of arm/ghash-ce by up to 85% - Implement CTS-CBC in arm64/aes-blk, faster by up to 50% - Remove PMULL based arm64/crc32 driver - Use PMULL in arm64/crct10dif - Add aes-ctr support in s5p-sss - Add caam/qi2 driver Others: - Pick better transform if one becomes available in crc-t10dif" * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (124 commits) crypto: chelsio - Update ntx queue received from cxgb4 crypto: ccree - avoid implicit enum conversion crypto: caam - add SPDX license identifier to all files crypto: caam/qi - simplify CGR allocation, freeing crypto: mxs-dcp - make symbols 'sha1_null_hash' and 'sha256_null_hash' static crypto: arm64/aes-blk - ensure XTS mask is always loaded crypto: testmgr - fix sizeof() on COMP_BUF_SIZE crypto: chtls - remove set but not used variable 'csk' crypto: axis - fix platform_no_drv_owner.cocci warnings crypto: x86/aes-ni - fix build error following fpu template removal crypto: arm64/aes - fix handling sub-block CTS-CBC inputs crypto: caam/qi2 - avoid double export crypto: mxs-dcp - Fix AES issues crypto: mxs-dcp - Fix SHA null hashes and output length crypto: mxs-dcp - Implement sha import/export crypto: aegis/generic - fix for big endian systems crypto: morus/generic - fix for big endian systems crypto: lrw - fix rebase error after out of bounds fix crypto: cavium/nitrox - use pci_alloc_irq_vectors() while enabling MSI-X. crypto: cavium/nitrox - NITROX command queue changes. ... commit bf4cc40e9343bbe6c7400ff6f4feb46fb9338087 Author: Bjørn Mork Date: Thu Oct 25 21:18:25 2018 +0200 net/{ipv4,ipv6}: Do not put target net if input nsid is invalid The cleanup path will put the target net when netnsid is set. So we must reset netnsid if the input is invalid. 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 Signed-off-by: Bjørn Mork Reviewed-by: David Ahern Signed-off-by: David S. Miller commit 863d4187d05aafd53f13fe1f358e9eb42bb0dbc1 Author: Bryan Whitehead Date: Thu Oct 25 13:09:38 2018 -0400 lan743x: Remove SPI dependency from Microchip group. The SPI dependency does not apply to lan743x driver, and other drivers in the group already state their dependence on SPI. Signed-off-by: Bryan Whitehead Signed-off-by: David S. Miller commit 55469bc6b5770ffdf0f87c38ce2573f8ddbaa33f Author: Eric Dumazet Date: Thu Oct 25 06:42:12 2018 -0700 drivers: net: remove inclusion when not needed Drivers using generic NAPI interface no longer need to include , since busy polling was moved to core networking stack long ago. See commit 79e7fff47b7b ("net: remove support for per driver ndo_busy_poll()") for reference. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit f802912d42525eddb2e504b0b852539f46c8fd9d Author: Andrew Lunn Date: Thu Oct 25 14:42:38 2018 +0200 net: phy: genphy_10g_driver: Avoid NULL pointer dereference This driver got missed during the recent change of .features from a u32 to a pointer to a Linux bitmap. Change the initialisation from 0 to PHY_10GBIT_FEATURES so removing the danger of a NULL pointer dereference. Fixes: 719655a14971 ("net: phy: Replace phy driver features u32 with link_mode bitmap") Reported-by: Jose Abreu Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller commit 649f0837a8cc2b39329f2de00fa0d04b029291c5 Author: Heiner Kallweit Date: Thu Oct 25 18:40:19 2018 +0200 r8169: fix broken Wake-on-LAN from S5 (poweroff) It was reported that WoL from S5 is broken (WoL from S3 works) and the analysis showed that during system shutdown the network interface was brought down already when the actual kernel shutdown started. Therefore netif_running() returned false and as a consequence the PHY was suspended. Obviously WoL wasn't working then. To fix this the original patch needs to be effectively reverted. A side effect is that when normally bringing down the interface and WoL is enabled the PHY will remain powered on (like it was before the original patch). Fixes: fe87bef01f9b ("r8169: don't check WoL when powering down PHY and interface is down") Reported-by: Neil MacLeod Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 4a6998aff82a20a1aece86a186d8e5263f8b2315 Author: Martin Lau Date: Wed Oct 24 20:42:25 2018 +0000 bpf, btf: fix a missing check bug in btf_parse Wenwen Wang reported: In btf_parse(), the header of the user-space btf data 'btf_data' is firstly parsed and verified through btf_parse_hdr(). In btf_parse_hdr(), the header is copied from user-space 'btf_data' to kernel-space 'btf->hdr' and then verified. If no error happens during the verification process, the whole data of 'btf_data', including the header, is then copied to 'data' in btf_parse(). It is obvious that the header is copied twice here. More importantly, no check is enforced after the second copy to make sure the headers obtained in these two copies are same. Given that 'btf_data' resides in the user space, a malicious user can race to modify the header between these two copies. By doing so, the user can inject inconsistent data, which can cause undefined behavior of the kernel and introduce potential security risk. This issue is similar to the one fixed in commit 8af03d1ae2e1 ("bpf: btf: Fix a missing check bug"). To fix it, this patch copies the user 'btf_data' *before* parsing / verifying the BTF header. Fixes: 69b693f0aefa ("bpf: btf: Introduce BPF Type Format (BTF)") Signed-off-by: Martin KaFai Lau Co-developed-by: Wenwen Wang Acked-by: Song Liu Signed-off-by: Daniel Borkmann commit a3f49d97c22022666fb94101454520a7adacaf08 Author: Naresh Kamboju Date: Thu Oct 25 20:17:28 2018 +0530 selftests/bpf: add config fragments BPF_STREAM_PARSER and XDP_SOCKETS BPF sockmap and hashmap are dependent on CONFIG_BPF_STREAM_PARSER and xskmap is dependent on CONFIG_XDP_SOCKETS Signed-off-by: Naresh Kamboju Signed-off-by: Daniel Borkmann commit f592f804831f1cf9d1f9966f58c80f150e6829b5 Author: Taehee Yoo Date: Wed Oct 24 20:15:17 2018 +0900 bpf: devmap: fix wrong interface selection in notifier_call The dev_map_notification() removes interface in devmap if unregistering interface's ifindex is same. But only checking ifindex is not enough because other netns can have same ifindex. so that wrong interface selection could occurred. Hence netdev pointer comparison code is added. v2: compare netdev pointer instead of using net_eq() (Daniel Borkmann) v1: Initial patch Fixes: 2ddf71e23cc2 ("net: add notifier hooks for devmap bpf map") Signed-off-by: Taehee Yoo Acked-by: Song Liu Signed-off-by: Daniel Borkmann commit 24ed334f33666f2ae929ccc08f72e7e72e353c64 Merge: e80bc229691a 85a585918fb4 Author: Linus Torvalds Date: Thu Oct 25 13:32:00 2018 -0700 Merge branch 'next-loadpin' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security Pull LoadPin updates from James Morris: "From Kees: This is a small reporting improvement and the param change needed for the ordering series (but since the loadpin change is desired and separable, I'm putting it here)" * 'next-loadpin' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: LoadPin: Rename boot param "enabled" to "enforce" LoadPin: Report friendly block device name commit e80bc229691a4f601a2476e07cbdf08a289a2ad6 Merge: 52ff0779d6cf f0f9756b7260 Author: Linus Torvalds Date: Thu Oct 25 13:29:51 2018 -0700 Merge branch 'next-smack' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security Pull smack updates from James Morris: "From Casey: three patches for Smack for 4.20. Two clean up warnings and one is a rarely encountered ptrace capability check" * 'next-smack' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: Smack: Mark expected switch fall-through Smack: ptrace capability use fixes Smack: remove set but not used variable 'root_inode' commit 52ff0779d6cfcce24c0204c22b0b4899dc55449d Merge: 57ce66d39f10 b8d7b7581452 Author: Linus Torvalds Date: Thu Oct 25 13:25:18 2018 -0700 Merge branch 'next-tpm' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security Pull TPM updates from James Morris: "From Jarkko: The only new feature is non-blocking operation for /dev/tpm0" * 'next-tpm' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: tpm: Restore functionality to xen vtpm driver. tpm: add support for nonblocking operation tpm: add ptr to the tpm_space struct to file_priv tpm: Make SECURITYFS a weak dependency tpm: suppress transmit cmd error logs when TPM 1.2 is disabled/deactivated tpm: fix response size validation in tpm_get_random() commit 57ce66d39f10fb01efabd72b14eb033deddb226b Merge: 4ba9628fe5bf 34bccd61b139 Author: Linus Torvalds Date: Thu Oct 25 13:22:23 2018 -0700 Merge branch 'next-integrity' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security Pull integrity updates from James Morris: "From Mimi: This contains a couple of bug fixes, including one for a recent problem with calculating file hashes on overlayfs, and some code cleanup" * 'next-integrity' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: MAINTAINERS: add Jarkko as maintainer for trusted keys ima: open a new file instance if no read permissions ima: fix showing large 'violations' or 'runtime_measurements_count' security/integrity: remove unnecessary 'init_keyring' variable security/integrity: constify some read-only data vfs: require i_size <= SIZE_MAX in kernel_read_file() commit 4ba9628fe5bf90e0125dbec847a0cf4f5553de14 Merge: 06999fd59277 1a16dbaf798c Author: Linus Torvalds Date: Thu Oct 25 12:55:31 2018 -0700 Merge branch 'work.lookup' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull more ->lookup() cleanups from Al Viro: "Some ->lookup() instances are still overcomplicating the life for themselves, open-coding the stuff that would be handled by d_splice_alias() just fine. Simplify a couple of such cases caught this cycle and document d_splice_alias() intended use" * 'work.lookup' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: Document d_splice_alias() calling conventions for ->lookup() users. simplify btrfs_lookup() clean erofs_lookup() commit 06999fd59277afef07638453c695a500eb2a93c0 Merge: ba7d4f36a2ec 8a68060cefa6 Author: Linus Torvalds Date: Thu Oct 25 12:52:10 2018 -0700 Merge branch 'work.alpha' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull alpha syscall glue updates from Al Viro: "Two old patches making alpha syscall glue a bit less mysterious" * 'work.alpha' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: alpha: unify the glue for sigreturn-like syscalls alpha: use alpha_ni_syscall only for syscall zero commit ba7d4f36a2ec7d6f8d9e5c6cabbc57469dd4dc22 Merge: 5947a64a7e0c 702ec3072ae6 Author: Linus Torvalds Date: Thu Oct 25 12:48:22 2018 -0700 Merge branch 'work.compat' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull compat_ioctl fixes from Al Viro: "A bunch of compat_ioctl fixes, mostly in bluetooth. Hopefully, most of fs/compat_ioctl.c will get killed off over the next few cycles; between this, tty series already merged and Arnd's work this cycle ought to take a good chunk out of the damn thing..." * 'work.compat' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: hidp: fix compat_ioctl hidp: constify hidp_connection_add() cmtp: fix compat_ioctl bnep: fix compat_ioctl compat_ioctl: trim the pointless includes commit 0af5c656fdb797f74ee57414e0c07cd57406d0c3 Author: Christian König Date: Thu Oct 18 14:29:28 2018 +0200 drm/amdgpu: fix amdgpu_vm_fini We should not remove mappings in rbtree_postorder_for_each_entry_safe because that rebalances the tree. Signed-off-by: Christian König Reviewed-by: Chunming Zhou Signed-off-by: Alex Deucher commit 3732eb0683c17113201cd29fdefd7a58b1acfa7f Author: Evan Quan Date: Wed Oct 24 12:57:56 2018 +0800 drm/amd/powerplay: commonize the API for retrieving current clocks So that it can be shared between all clocks. Signed-off-by: Evan Quan Reviewed-by: Feifei Xu Reviewed-by: Rex Zhu Signed-off-by: Alex Deucher commit 7dc94969e165464896366fcb096f4be18ba56f44 Author: Evan Quan Date: Tue Oct 23 14:31:38 2018 +0800 drm/amd/powerplay: correct the clocks for DAL to be Khz unit Currently the clocks reported are in 10Khz unit. Correct them as Khz unit as DAL wanted. Signed-off-by: Evan Quan Reviewed-by: Feifei Xu Reviewed-by: Rex Zhu Signed-off-by: Alex Deucher commit 1b50bb4d36e89fd54c14722c4ab5266ef17767ff Author: Pavel Machek Date: Wed Oct 24 22:44:39 2018 +0200 Fix pattern handling optimalization Check for zero duration before skipping step. This fixes pattern echo "0 1000 10 2550 0 1000" > pattern which should do [ .-xXx-.] but does [ Xx-.] Signed-off-by: Pavel Machek Suggested-by: Jacek Anaszewski Signed-off-by: Jacek Anaszewski commit 5947a64a7e0c70cc16d5d1e5af3cf3b44535047a Merge: 4dcb9239dad6 746a923b863a Author: Linus Torvalds Date: Thu Oct 25 11:43:47 2018 -0700 Merge branch 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull irq updates from Thomas Gleixner: "The interrupt brigade came up with the following updates: - Driver for the Marvell System Error Interrupt machinery - Overhaul of the GIC-V3 ITS driver - Small updates and fixes all over the place" * 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (31 commits) genirq: Fix race on spurious interrupt detection softirq: Fix typo in __do_softirq() comments genirq: Fix grammar s/an /a / irqchip/gic: Unify GIC priority definitions irqchip/gic-v3: Remove acknowledge loop dt-bindings/interrupt-controller: Add documentation for Marvell SEI controller dt-bindings/interrupt-controller: Update Marvell ICU bindings irqchip/irq-mvebu-icu: Add support for System Error Interrupts (SEI) arm64: marvell: Enable SEI driver irqchip/irq-mvebu-sei: Add new driver for Marvell SEI irqchip/irq-mvebu-icu: Support ICU subnodes irqchip/irq-mvebu-icu: Disociate ICU and NSR irqchip/irq-mvebu-icu: Clarify the reset operation of configured interrupts irqchip/irq-mvebu-icu: Fix wrong private data retrieval dt-bindings/interrupt-controller: Fix Marvell ICU length in the example genirq/msi: Allow creation of a tree-based irqdomain for platform-msi dt-bindings: irqchip: renesas-irqc: Document r8a7744 support dt-bindings: irqchip: renesas-irqc: Document R-Car E3 support irqchip/pdc: Setup all edge interrupts as rising edge at GIC irqchip/gic-v3-its: Allow use of LPI tables in reserved memory ... commit 42d0f71c9b5fd48861d61cfc05c9e001f847c9d5 Author: Wei Yongjun Date: Thu Oct 25 01:42:26 2018 +0000 octeontx2-af: Use GFP_ATOMIC under spin lock The function nix_update_mce_list() is called from nix_update_bcast_mce_list(), and a spin lock is held here, so we should use GFP_ATOMIC instead. Fixes: 4b05528ebf0c ("octeontx2-af: Update bcast list upon NIXLF alloc/free") Signed-off-by: Wei Yongjun Signed-off-by: David S. Miller commit 899ecaedd15599c22553d158f53b127cc1632dc2 Author: Tristram Ha Date: Wed Oct 24 14:51:23 2018 -0700 net: ethernet: cadence: fix socket buffer corruption problem Socket buffer is not re-created when headroom is 2 and tailroom is 1. Signed-off-by: Tristram Ha Signed-off-by: David S. Miller commit 4dcb9239dad6cee17c538482619a5b659774ee51 Merge: 3acbd2de6bc3 d59e0ba19481 Author: Linus Torvalds Date: Thu Oct 25 11:14:36 2018 -0700 Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull timekeeping updates from Thomas Gleixner: "The timers and timekeeping departement provides: - Another large y2038 update with further preparations for providing the y2038 safe timespecs closer to the syscalls. - An overhaul of the SHCMT clocksource driver - SPDX license identifier updates - Small cleanups and fixes all over the place" * 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (31 commits) tick/sched : Remove redundant cpu_online() check clocksource/drivers/dw_apb: Add reset control clocksource: Remove obsolete CLOCKSOURCE_OF_DECLARE clocksource/drivers: Unify the names to timer-* format clocksource/drivers/sh_cmt: Add R-Car gen3 support dt-bindings: timer: renesas: cmt: document R-Car gen3 support clocksource/drivers/sh_cmt: Properly line-wrap sh_cmt_of_table[] initializer clocksource/drivers/sh_cmt: Fix clocksource width for 32-bit machines clocksource/drivers/sh_cmt: Fixup for 64-bit machines clocksource/drivers/sh_tmu: Convert to SPDX identifiers clocksource/drivers/sh_mtu2: Convert to SPDX identifiers clocksource/drivers/sh_cmt: Convert to SPDX identifiers clocksource/drivers/renesas-ostm: Convert to SPDX identifiers clocksource: Convert to using %pOFn instead of device_node.name tick/broadcast: Remove redundant check RISC-V: Request newstat syscalls y2038: signal: Change rt_sigtimedwait to use __kernel_timespec y2038: socket: Change recvmmsg to use __kernel_timespec y2038: sched: Change sched_rr_get_interval to use __kernel_timespec y2038: utimes: Rework #ifdef guards for compat syscalls ... commit 760eea43f8c6d48684f1f34b8a02fddc1456e849 Author: Geert Uytterhoeven Date: Fri Oct 12 09:20:17 2018 +0200 thermal: da9062/61: Prevent hardware access during system suspend The workqueue used for monitoring the hardware may run while the device is already suspended. Fix this by using the freezable system workqueue instead, cfr. commit 51e20d0e3a60cf46 ("thermal: Prevent polling from happening during system suspend"). Fixes: 608567aac3206ae8 ("thermal: da9062/61: Thermal junction temperature monitoring driver") Signed-off-by: Geert Uytterhoeven Acked-by: Steve Twiss Signed-off-by: Eduardo Valentin commit 697ee786f15d7b65c7f3045d45fe3a05d28e0911 Author: Geert Uytterhoeven Date: Fri Oct 12 09:20:16 2018 +0200 thermal: rcar_thermal: Prevent doing work after unbind When testing bind/unbind on r8a7791/koelsch: WARNING: CPU: 1 PID: 697 at lib/debugobjects.c:329 debug_print_object+0x8c/0xb4 ODEBUG: free active (active state 0) object type: timer_list hint: delayed_work_timer_fn+0x0/0x10 This happens if the workqueue runs after the device has been unbound. Fix this by cancelling any queued work during remove. Fixes: e0a5172e9eec7f0d ("thermal: rcar: add interrupt support") Signed-off-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund Signed-off-by: Eduardo Valentin commit 3a31386217628ffe2491695be2db933c25dde785 Author: Geert Uytterhoeven Date: Fri Oct 12 09:20:15 2018 +0200 thermal: rcar_thermal: Prevent hardware access during system suspend On r8a7791/koelsch, sometimes the following message is printed during system suspend: rcar_thermal e61f0000.thermal: thermal sensor was broken This happens if the workqueue runs while the device is already suspended. Fix this by using the freezable system workqueue instead, cfr. commit 51e20d0e3a60cf46 ("thermal: Prevent polling from happening during system suspend"). Fixes: e0a5172e9eec7f0d ("thermal: rcar: add interrupt support") Signed-off-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund Signed-off-by: Eduardo Valentin commit 853cbc1f2d3a6ef9d5f6f99fe7c4b7595eae9d3a Author: Sergei Shtylyov Date: Tue Oct 9 22:11:51 2018 +0300 thermal: rcar_gen3_thermal: add R8A77980 support Add the R-Car V3H (R8A77980) SoC support to the R-Car gen3 thermal driver. Signed-off-by: Sergei Shtylyov Reviewed-by: Simon Horman Reviewed-by: Niklas Söderlund Signed-off-by: Eduardo Valentin commit 8583d8d621eb7f38e388dfe53a45fff908ccf07d Author: Sergei Shtylyov Date: Tue Oct 9 22:10:14 2018 +0300 dt-bindings: thermal: rcar-gen3-thermal: document R8A77980 bindings Document the R-Car V3H (R8A77980) SoC in the Renesas R-Car gen3 thermal bindings. Signed-off-by: Sergei Shtylyov Reviewed-by: Simon Horman Reviewed-by: Niklas Söderlund Reviewed-by: Rob Herring Signed-off-by: Eduardo Valentin commit 1d693155607329adff57f5307d35a3a8320d4e7f Author: David HERNANDEZ SANCHEZ Date: Fri Oct 5 10:08:46 2018 +0000 thermal: add stm32 thermal driver Add support for DTS thermal sensor that can be found on some STM32 platforms. This driver is based on OF and works in interrupt mode. It offers two temperature trip points: passive and critical. The first is intended for passive cooling notification while the second is used for over-temperature reset. Signed-off-by: David Hernandez Sanchez Signed-off-by: Eduardo Valentin commit 7f1a22ce597c2d6410843628c7d240e7441a81a3 Author: David HERNANDEZ SANCHEZ Date: Fri Oct 5 10:08:45 2018 +0000 dt-bindings: stm32-thermal: add binding documentation Add thermal binding documentation for STM32 DTS sensor Signed-off-by: David Hernandez Sanchez Reviewed-by: Rob Herring Signed-off-by: Eduardo Valentin commit 92ca366e9b835ada0bfe3c663da91ae44d7e8184 Author: Sergei Shtylyov Date: Fri Oct 5 00:03:13 2018 +0300 thermal: rcar_thermal: add R8A77970 support Add the R-Car V3M (R8A77970) SoC support to the R-Car gen2 thermal driver. The hardware is the same as in the R-Car D3 (R8A77995) plus the CIVM status register (we don't use). Signed-off-by: Sergei Shtylyov Reviewed-by: Geert Uytterhoeven Reviewed-by: Simon Horman Signed-off-by: Eduardo Valentin commit a14404a9f04b904bd0c22f34e2119afbf1425abe Author: Sergei Shtylyov Date: Fri Oct 5 00:01:38 2018 +0300 dt-bindings: thermal: rcar-thermal: document R8A77970 bindings Document the R-Car V3M (R8A77970) SoC in the Renesas R-Car gen2 thermal bindings. The hardware is the same as in the R-Car D3 (R8A77995) plus an extra status register. Signed-off-by: Sergei Shtylyov Reviewed-by: Geert Uytterhoeven Reviewed-by: Simon Horman Reviewed-by: Rob Herring Signed-off-by: Eduardo Valentin commit df016bbba63743bbef9ff5c6c282561211dd72cc Author: Sergei Shtylyov Date: Wed Oct 3 23:47:34 2018 +0300 thermal: rcar_thermal: fix duplicate IRQ request The driver on R8A77995 requests the same IRQ twice since platform_get_resource() is always called for the 1st IRQ resource. Fixes: 1969d9dc2079 ("thermal: rcar_thermal: add r8a77995 support") Signed-off-by: Sergei Shtylyov Reviewed-by: Geert Uytterhoeven Reviewed-by: Simon Horman Reviewed-by: Daniel Lezcano Signed-off-by: Eduardo Valentin commit caf539cd1087f7c36b9c4df271575e9aee49fde5 Author: David S. Miller Date: Thu Oct 25 10:36:19 2018 -0700 sparc: Fix VDSO build with older binutils. Older versions of bintutils do not allow symbol math across different segments on sparc: ==================== Assembler messages: 99: Error: operation combines symbols in different segments ==================== This is controlled by whether or not DIFF_EXPR_OK is defined in gas/config/tc-*.h and for sparc this was not the case until mid-2017. So we have to patch between %stick and %tick another way. Do what powerpc does and emit two versions of the relevant functions, one using %tick and one using %stick, and patch the symbols in the dynamic symbol table. Fixes: 2f6c9bf31a0b ("sparc: Improve VDSO instruction patching.") Reported-by: Meelis Roos Tested-by: Meelis Roos Signed-off-by: David S. Miller commit 98fa7a3e001b21fb47c08af4304f40a3b0535cbd Author: Federico Motta Date: Wed Oct 24 19:13:25 2018 +0200 block, bfq: fix asymmetric scenarios detection Since commit 2d29c9f89fcd ("block, bfq: improve asymmetric scenarios detection"), a scenario is defined asymmetric when one of the following conditions holds: - active bfq_queues have different weights - one or more group of entities (bfq_queue or other groups of entities) are active bfq grants fairness and low latency also in such asymmetric scenarios, by plugging the dispatching of I/O if the bfq_queue in service happens to be temporarily idle. This plugging may lower throughput, so it is important to do it only when strictly needed. By mistake, in commit '2d29c9f89fcd' ("block, bfq: improve asymmetric scenarios detection") the num_active_groups counter was firstly incremented and subsequently decremented at any entity (group or bfq_queue) weight change. This is useless, because only transitions from active to inactive and vice versa matter for that counter. Unfortunately this is also incorrect in the following case: the entity at issue is a bfq_queue and it is under weight raising. In fact in this case there is a spurious increment of the num_active_groups counter. This spurious increment may cause scenarios to be wrongly detected as asymmetric, thus causing useless plugging and loss of throughput. This commit fixes this issue by simply removing the above useless and wrong increments and decrements. Fixes: 2d29c9f89fcd ("block, bfq: improve asymmetric scenarios detection") Tested-by: Oleksandr Natalenko Signed-off-by: Federico Motta Signed-off-by: Paolo Valente Signed-off-by: Jens Axboe commit 0a40a93524736c2ce01d82effe2f2bc34d5cf159 Author: Jens Axboe Date: Thu Oct 25 08:15:30 2018 -0600 gdrom: fix mistake in assignment of error Apparently the kbuild bots missed this one originally, but at least it caught it now. Fix compilation error: All errors (new ones prefixed by >>): drivers/cdrom/gdrom.c: In function 'probe_gdrom': >> drivers/cdrom/gdrom.c:797:3: error: 'rc' undeclared (first use in this function) rc = PTR_ERR(gd.gdrom_rq); ^~ drivers/cdrom/gdrom.c:797:3: note: each undeclared identifier is reported only once for each function it appears in Fixes: ad5fc6bb7221 ("gdrom: convert to blk-mq") Signed-off-by: Jens Axboe commit d6f1dda27251909a27b8d8aacb498628a1047978 Author: Xiaoguang Wang Date: Tue Oct 23 22:30:50 2018 +0800 blk-mq: place trace_block_getrq() in correct place trace_block_getrq() is to indicate a request struct has been allocated for queue, so put it in right place. Reviewed-by: Jianchao Wang Signed-off-by: Xiaoguang Wang Signed-off-by: Jens Axboe commit bf5054569653c491ece544cc7ee333ae53b47121 Author: Damien Le Moal Date: Fri Oct 12 19:08:50 2018 +0900 block: Introduce blk_revalidate_disk_zones() Drivers exposing zoned block devices have to initialize and maintain correctness (i.e. revalidate) of the device zone bitmaps attached to the device request queue (seq_zones_bitmap and seq_zones_wlock). To simplify coding this, introduce a generic helper function blk_revalidate_disk_zones() suitable for most (and likely all) cases. This new function always update the seq_zones_bitmap and seq_zones_wlock bitmaps as well as the queue nr_zones field when called for a disk using a request based queue. For a disk using a BIO based queue, only the number of zones is updated since these queues do not have schedulers and so do not need the zone bitmaps. With this change, the zone bitmap initialization code in sd_zbc.c can be replaced with a call to this function in sd_zbc_read_zones(), which is called from the disk revalidate block operation method. A call to blk_revalidate_disk_zones() is also added to the null_blk driver for devices created with the zoned mode enabled. Finally, to ensure that zoned devices created with dm-linear or dm-flakey expose the correct number of zones through sysfs, a call to blk_revalidate_disk_zones() is added to dm_table_set_restrictions(). The zone bitmaps allocated and initialized with blk_revalidate_disk_zones() are freed automatically from __blk_release_queue() using the block internal function blk_queue_free_zone_bitmaps(). Reviewed-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Reviewed-by: Martin K. Petersen Reviewed-by: Mike Snitzer Signed-off-by: Damien Le Moal Signed-off-by: Jens Axboe commit e76239a3748c90a8b0e197f8f4544a8ce52f126e Author: Christoph Hellwig Date: Fri Oct 12 19:08:49 2018 +0900 block: add a report_zones method Dispatching a report zones command through the request queue is a major pain due to the command reply payload rewriting necessary. Given that blkdev_report_zones() is executing everything synchronously, implement report zones as a block device file operation instead, allowing major simplification of the code in many places. sd, null-blk, dm-linear and dm-flakey being the only block device drivers supporting exposing zoned block devices, these drivers are modified to provide the device side implementation of the report_zones() block device file operation. For device mappers, a new report_zones() target type operation is defined so that the upper block layer calls blkdev_report_zones() can be propagated down to the underlying devices of the dm targets. Implementation for this new operation is added to the dm-linear and dm-flakey targets. Reviewed-by: Hannes Reinecke Signed-off-by: Christoph Hellwig [Damien] * Changed method block_device argument to gendisk * Various bug fixes and improvements * Added support for null_blk, dm-linear and dm-flakey. Reviewed-by: Martin K. Petersen Reviewed-by: Mike Snitzer Signed-off-by: Damien Le Moal Signed-off-by: Jens Axboe commit 965b652e901886ea54f93c60027b5be76328d958 Author: Damien Le Moal Date: Fri Oct 12 19:08:48 2018 +0900 block: Expose queue nr_zones in sysfs Expose through sysfs the nr_zones field of struct request_queue. Exposing this value helps in debugging disk issues as well as facilitating scripts based use of the disk (e.g. blktests). For zoned block devices, the nr_zones field indicates the total number of zones of the device calculated using the known disk capacity and zone size. This number of zones is always 0 for regular block devices. Since nr_zones is defined conditionally with CONFIG_BLK_DEV_ZONED, introduce the blk_queue_nr_zones() function to return the correct value for any device, regardless if CONFIG_BLK_DEV_ZONED is set. Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Signed-off-by: Damien Le Moal Signed-off-by: Jens Axboe commit a2d6b3a2d39005ab4d4a83481a7db092ebf0e9d6 Author: Damien Le Moal Date: Fri Oct 12 19:08:47 2018 +0900 block: Improve zone reset execution There is no need to synchronously execute all REQ_OP_ZONE_RESET BIOs necessary to reset a range of zones. Similarly to what is done for discard BIOs in blk-lib.c, all zone reset BIOs can be chained and executed asynchronously and a synchronous call done only for the last BIO of the chain. Modify blkdev_reset_zones() to operate similarly to blkdev_issue_discard() using the next_bio() helper for chaining BIOs. To avoid code duplication of that function in blk_zoned.c, rename next_bio() into blk_next_bio() and declare it as a block internal function in blk.h. Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Signed-off-by: Damien Le Moal Signed-off-by: Jens Axboe commit 65e4e3eee83d7a4ad7e8c5175b2a0ddfd3b5685f Author: Damien Le Moal Date: Fri Oct 12 19:08:46 2018 +0900 block: Introduce BLKGETNRZONES ioctl Get a zoned block device total number of zones. The device can be a partition of the whole device. The number of zones is always 0 for regular block devices. Reviewed-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Signed-off-by: Damien Le Moal Signed-off-by: Jens Axboe commit 72cd87576d1d885fc2968416ed5aca8f54749653 Author: Damien Le Moal Date: Fri Oct 12 19:08:45 2018 +0900 block: Introduce BLKGETZONESZ ioctl Get a zoned block device zone size in number of 512 B sectors. The zone size is always 0 for regular block devices. Reviewed-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Signed-off-by: Damien Le Moal Signed-off-by: Jens Axboe commit 2e85fbaff3a71e46038ec736186c42ffa721c775 Author: Damien Le Moal Date: Fri Oct 12 19:08:44 2018 +0900 block: Limit allocation of zone descriptors for report zones There is no point in allocating more zone descriptors than the number of zones a block device has for doing a zone report. Avoid doing that in blkdev_report_zones_ioctl() by limiting the number of zone decriptors allocated internally to process the user request. Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Signed-off-by: Damien Le Moal Signed-off-by: Jens Axboe commit a91e138022bc29b5d2bbc56b41de3e0db6261e28 Author: Damien Le Moal Date: Fri Oct 12 19:08:43 2018 +0900 block: Introduce blkdev_nr_zones() helper Introduce the blkdev_nr_zones() helper function to get the total number of zones of a zoned block device. This number is always 0 for a regular block device (q->limits.zoned == BLK_ZONED_NONE case). Replace hard-coded number of zones calculation in dmz_get_zoned_device() with a call to this helper. Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Signed-off-by: Damien Le Moal Signed-off-by: Jens Axboe commit 5f832a395859de7191e638e3777ae57f37d46d08 Author: Damien Le Moal Date: Fri Oct 12 19:08:42 2018 +0900 scsi: sd_zbc: Fix sd_zbc_check_zones() error checks The unsigned 32 bits overflow check for the zone size value is already done within sd_zbc_check_zones() with the test: } else if (logical_to_sectors(sdkp->device, zone_blocks) > UINT_MAX) { so there is no need to check again for an out of range value in sd_zbc_read_zones(). Simplify the code and fix sd_zbc_check_zones() error return to -EFBIG instead of -ENODEV if the zone size is too large. Change the return type of sd_zbc_check_zones() to an int for the error code and return the zone size (zone_blocks) through a u32 pointer to avoid overflowing the signed 32 return value. Reviewed-by: Hannes Reinecke Acked-by: Martin K. Petersen Reviewed-by: Christoph Hellwig Signed-off-by: Damien Le Moal Signed-off-by: Jens Axboe commit d2e428e49eec9b7ff175d7d5941d50e5a7d15324 Author: Damien Le Moal Date: Fri Oct 12 19:08:41 2018 +0900 scsi: sd_zbc: Reduce boot device scan and revalidate time Handling checks of ZBC device capacity using the max_lba field of the REPORT ZONES command reply for disks with rc_basis == 0 can be done using the same report zones command reply used to check the "same" field. Avoid executing a report zones command solely to check the disk capacity by merging sd_zbc_check_capacity() into sd_zbc_check_zone_size() and renaming that function to sd_zbc_check_zones(). This removes a costly execution of a full report zones command and so reduces device scan duration at boot time as well as the duration of disk revalidate calls. Furthermore, setting the partial report bit in the REPORT ZONES command cdb can significantly reduce this command execution time as the device does not have to count and report the total number of zones that could be reported assuming a large enough reply buffer. A non-partial zone report is necessary only for the first execution of report zones used to check the same field value (to ensure that this value applies to all zones of the disk). All other calls to sd_zbc_report_zones() can use a partial report to reduce execution time. Using a 14 TB ZBC disk, these simple changes reduce device scan time at boot from about 3.5s down to about 900ms. Disk revalidate times are also reduced from about 450ms down to 230ms. Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Acked-by: Martin K. Petersen Signed-off-by: Damien Le Moal Signed-off-by: Jens Axboe commit 7f9d35d24c56576a8c18a8b6f74711c7f3c9c6c0 Author: Damien Le Moal Date: Fri Oct 12 19:08:40 2018 +0900 scsi: sd_zbc: Rearrange code Move the urswrz check out of sd_zbc_read_zones() and into sd_zbc_read_zoned_characteristics() where that value is obtained (read from the disk zoned characteristics VPD page). Since this function now does more than simply reading the VPD page, rename it to sd_zbc_check_zoned_characteristics(). Also fix the error message displayed when reading that VPD page fails. Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Acked-by: Martin K. Petersen Signed-off-by: Damien Le Moal Signed-off-by: Jens Axboe commit cdffab7a86b05b207907c391c093023daed5d4a4 Author: zhong jiang Date: Tue Oct 23 20:06:37 2018 +0800 cdrom: remove set but not used variable 'tocuse' tocuse is not used after setting its value. It is safe to remove the unused variable. Signed-off-by: zhong jiang Signed-off-by: Jens Axboe commit d91dc172e34f6954a94957b012c3b08f4103d5f9 Author: Gustavo A. R. Silva Date: Fri Oct 19 20:44:17 2018 +0200 skd: fix unchecked return values Check return values of dma_set_mask_and_coherent(). Otherwise, if dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64)); fails, the following piece of code will be executed even when the call to dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32)); returns 0: dev_err(&pdev->dev, "DMA mask error %d\n", rc); goto err_out_regions; Addresses-Coverity-ID: 1474553 ("Unchecked return value") Fixes: 138126214868 ("skd: switch to the generic DMA API") Reviewed-by: Christoph Hellwig Signed-off-by: Gustavo A. R. Silva Signed-off-by: Jens Axboe commit f92898e7f32e3533bfd95be174044bc349d416ca Author: Vasilis Liaskovitis Date: Mon Oct 15 15:25:08 2018 +0200 xen/blkfront: avoid NULL blkfront_info dereference on device removal If a block device is hot-added when we are out of grants, gnttab_grant_foreign_access fails with -ENOSPC (log message "28 granting access to ring page") in this code path: talk_to_blkback -> setup_blkring -> xenbus_grant_ring -> gnttab_grant_foreign_access and the failing path in talk_to_blkback sets the driver_data to NULL: destroy_blkring: blkif_free(info, 0); mutex_lock(&blkfront_mutex); free_info(info); mutex_unlock(&blkfront_mutex); dev_set_drvdata(&dev->dev, NULL); This results in a NULL pointer BUG when blkfront_remove and blkif_free try to access the failing device's NULL struct blkfront_info. Cc: stable@vger.kernel.org # 4.5 and later Signed-off-by: Vasilis Liaskovitis Reviewed-by: Roger Pau Monné Signed-off-by: Konrad Rzeszutek Wilk Signed-off-by: Jens Axboe commit 2347e7e1aea410865e3c3f92014b07ff7d4c5b02 Author: Guo Ren Date: Wed Sep 5 14:25:23 2018 +0800 dt-bindings: interrupt-controller: C-SKY APB intc - Dt-bindings doc about C-SKY apb bus interrupt controller. Signed-off-by: Guo Ren Reviewed-by: Rob Herring commit edff1b4835b71e14538d3a48568fa513ee9f7931 Author: Guo Ren Date: Sun Sep 16 15:57:14 2018 +0800 irqchip: add C-SKY APB bus interrupt controller The driver is for C-SKY APB bus interrupt controller. It's a simple interrupt controller which use pending reg to detect the irq and use enable/disable reg to mask/unmask interrupt sources. A lot of SOCs based on C-SKY CPU use the interrupt controller as root controller. Signed-off-by: Guo Ren Reviewed-by: Mark Rutland commit 3fe5d5bd2dd92124f2a773c19fbc117e023a2ce3 Author: Guo Ren Date: Tue Sep 18 21:07:00 2018 +0800 dt-bindings: interrupt-controller: C-SKY SMP intc Dt-bindings doc about C-SKY Multi-processors interrupt controller. Changelog: - Should be: '#interrupt-cells' not 'interrupt-cells' Signed-off-by: Guo Ren Reviewed-by: Rob Herring commit d8a5f5f79122b42b8afdce29f03683c1b8cdb60e Author: Guo Ren Date: Sun Sep 16 15:57:14 2018 +0800 irqchip: add C-SKY SMP interrupt controller The driver is for C-SKY SMP interrupt controller. It support 16 soft-irqs, 16 private-irqs, and 992 max external-irqs, a total of 1024 interrupts. C-SKY CPU 807/810/860 SMP/non-SMP could use it. Signed-off-by: Guo Ren Reviewed-by: Marc Zyngier commit 243b40a469d1c5d7824df8235ccddbde8c45f03e Author: Guo Ren Date: Thu Sep 20 17:54:54 2018 +0800 MAINTAINERS: Add csky Add a maintainer information for the csky(C-SKY) architecture. Signed-off-by: Guo Ren Reviewed-by: Arnd Bergmann commit f746650f9cdce67419041b8c2cc1f11db2d666d1 Author: Guo Ren Date: Wed Sep 12 21:03:06 2018 +0800 dt-bindings: Add vendor prefix for csky Add csky vendor definition. Signed-off-by: Guo Ren Reviewed-by: Rob Herring commit 19fef6c4893d0321ec07978cb56bda0a753dde8c Author: Guo Ren Date: Wed Sep 5 14:25:22 2018 +0800 dt-bindings: csky CPU Bindings This patch adds the documentation to describe that how to add cpu nodes in dts for SMP. Signed-off-by: Guo Ren Reviewed-by: Rob Herring commit 735ee005c371b2d8d1dbf0542590d17f1e0a0b2f Author: Guo Ren Date: Wed Sep 5 14:25:22 2018 +0800 csky: Misc headers This patch adds csky registers' definition, bitops, byteorder, asm-offsets codes. Signed-off-by: Guo Ren Reviewed-by: Arnd Bergmann commit 991069865796f8ad31ee54aca8a0f1b7a522e94b Author: Guo Ren Date: Wed Sep 5 14:25:20 2018 +0800 csky: SMP support This patch adds boot, ipi, hotplug codes for SMP. Signed-off-by: Guo Ren Cc: Marc Zyngier Cc: Mark Rutland Cc: Peter Zijlstra Reviewed-by: Arnd Bergmann commit 2ce36bfa6a0904524baed699ad78706e50295f84 Author: Guo Ren Date: Wed Sep 5 14:25:19 2018 +0800 csky: Debug and Ptrace GDB This patch adds arch ptrace implementation, stack dump and bug.h. Signed-off-by: Guo Ren Reviewed-by: Arnd Bergmann commit da551281947cb2c0ab6e0045529a706af5d79584 Author: Guo Ren Date: Wed Sep 5 14:25:18 2018 +0800 csky: User access The patch adds "user access from kernel" codes. Signed-off-by: Guo Ren Reviewed-by: Arnd Bergmann commit c5af58b769113c4045209973052db3e3a543ee43 Author: Guo Ren Date: Wed Sep 5 14:25:18 2018 +0800 csky: Library functions This patch adds string optimize codes and some auxiliary codes. Signed-off-by: Chen Linfei Signed-off-by: Mao Han Signed-off-by: Guo Ren Reviewed-by: Arnd Bergmann commit 9d056df0924edbb0a30c85a1c1d3153c1229ec47 Author: Guo Ren Date: Wed Sep 5 14:25:16 2018 +0800 csky: ELF and module probe This patch adds ELF definition and module relocate codes. Signed-off-by: Guo Ren Reviewed-by: Arnd Bergmann commit a0ae62806ff495b60235cc4f2fee3f3ab6a265c9 Author: Guo Ren Date: Wed Sep 5 14:25:16 2018 +0800 csky: Atomic operations This patch adds atomic, cmpxchg, spinlock files. Signed-off-by: Guo Ren Cc: Andrea Parri Cc: Arnd Bergmann Reviewed-by: Peter Zijlstra commit e38a5272baaa81b31680389efdec0c9008e17446 Author: Guo Ren Date: Wed Sep 5 14:25:15 2018 +0800 csky: IRQ handling This patch adds IRQ handling files. Signed-off-by: Guo Ren Cc: Thomas Gleixner Reviewed-by: Arnd Bergmann commit dd3ef10ea295f8f4181e6044fb19444cad7c6aab Author: Guo Ren Date: Wed Sep 5 14:25:14 2018 +0800 csky: VDSO and rt_sigreturn This patch adds files related to VDSO and our VDSO only support rt_sigreturn. Signed-off-by: Guo Ren Reviewed-by: Arnd Bergmann commit e9564df753fd547fcbcd4fd10015c3b1213ef452 Author: Guo Ren Date: Wed Sep 5 14:25:14 2018 +0800 csky: Process management and Signal This patch adds files related to task_switch, sigcontext, signal, fpu context switch. Signed-off-by: Guo Ren Cc: Arnd Bergmann Cc: Eric W. Biederman commit a1c6ca3c6de763459a6e93b644ec6518c890ba1c Author: Vitaly Kuznetsov Date: Wed Oct 17 13:23:55 2018 +0200 kernel: hung_task.c: disable on suspend It is possible to observe hung_task complaints when system goes to suspend-to-idle state: # echo freeze > /sys/power/state PM: Syncing filesystems ... done. Freezing user space processes ... (elapsed 0.001 seconds) done. OOM killer disabled. Freezing remaining freezable tasks ... (elapsed 0.002 seconds) done. sd 0:0:0:0: [sda] Synchronizing SCSI cache INFO: task bash:1569 blocked for more than 120 seconds. Not tainted 4.19.0-rc3_+ #687 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. bash D 0 1569 604 0x00000000 Call Trace: ? __schedule+0x1fe/0x7e0 schedule+0x28/0x80 suspend_devices_and_enter+0x4ac/0x750 pm_suspend+0x2c0/0x310 Register a PM notifier to disable the detector on suspend and re-enable back on wakeup. Signed-off-by: Vitaly Kuznetsov Signed-off-by: Rafael J. Wysocki commit f174e49e4906d945a0e4de98fbf796de31614f47 Author: Sudeep Holla Date: Wed Oct 24 14:44:58 2018 +0100 cpufreq: remove unused arm_big_little_dt driver Most of the ARM platforms used cpufreq-dt driver irrespective of whether it's big-little(HMP) or SMP system. This arm_big_little_dt is not used actively at all. So let's remove the driver, so that it need not be maintained. Signed-off-by: Sudeep Holla Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki commit a7314405d83c8f95736edb0ea7ade5d459b79afe Author: Sudeep Holla Date: Wed Oct 24 14:44:57 2018 +0100 cpufreq: drop ARM_BIG_LITTLE_CPUFREQ support for ARM64 ARM_BIG_LITTLE_CPUFREQ depends on topology_physical_package_id to get the cluster id which inturn provides the information on related cpus in the same performance domain. ARM64 core doesn't provide the cluster information as it's not architecturally defined. There are no users of this driver in ARM64 after the one and only user(SCPI) moved away. So let's ban the usage of this driver for ARM64. Signed-off-by: Sudeep Holla Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki commit 5906056e52e9ee5e130d880443e83016f892b5dd Author: Dominik Brodowski Date: Tue Oct 23 21:54:04 2018 +0200 cpufreq: intel_pstate: Fix compilation for !CONFIG_ACPI While at it, add a few comments which config options #ifdef and #else statements refer to. Fixes: 86d333a8cc7f (cpufreq: intel_pstate: Add base_frequency attribute) Signed-off-by: Dominik Brodowski Acked-by: Srinivas Pandruvada Signed-off-by: Rafael J. Wysocki commit 3acbd2de6bc3af215c6ed7732dfc097d1e238503 Merge: d49f8a52b15b de7d83da84bd Author: Linus Torvalds Date: Thu Oct 25 09:00:15 2018 -0700 Merge tag 'sound-4.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound updates from Takashi Iwai: "There have been little changes in ALSA core stuff, but ASoC core still kept rolling for the continued restructuring. The rest are lots of small driver-specific changes and some minor API updates. Here are highlights: General: - Appropriate fall-through annotations everywhere - Some code cleanup in memalloc code, handling non-cacahed pages more commonly in the helper - Deployment of SNDRV_PCM_INFO_SYNC_APPLPTR flag consistently Drivers: - More HD-audio CA0132 codec improvement for supporting other Creative boards - Plumbing legacy HD-audio codecs as ASoC BE on Intel SST; this will give move support of existing HD-audio devices with DSP - A few device-specific HD-audio quirks as usual - New quirk for RME CC devices and correction for B&W PX for USB-audio - FireWire: code refactoring including devres usages ASoC Core: - Continued componentization works; it's almost done! - A bunch of new for_each_foo macros - Cleanups and fixes in DAPM code ASoC Drivers: - MCLK support for several different devices, including CS42L51, STM32 SAI, and MAX98373 - Support for Allwinner A64 CODEC analog, Intel boards with DA7219 and MAX98927, Meson AXG PDM inputs, Nuvoton NAU8822, Renesas R8A7744 and TI PCM3060" * tag 'sound-4.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (299 commits) ASoC: stm32: sai: fix master clock naming ASoC: stm32: add clock dependency for sai ALSA: hda/ca0132 - Actually fix microphone issue ASoC: sun4i-i2s: move code from startup/shutdown hooks into pm_runtime hooks ASoC: wm2000: Remove wm2000_read helper function ASoC: cs42l51: fix mclk support ASoC: wm_adsp: Log addresses as 8 digits in wm_adsp_buffer_populate ASoC: wm_adsp: Rename memory fields in wm_adsp_buffer ASoC: cs42l51: add mclk support ASoC: stm32: sai: set sai as mclk clock provider ASoC: dt-bindings: add mclk support to cs42l51 ASoC: dt-bindings: add mclk provider support to stm32 sai ASoC: soc-core: fix trivial checkpatch issues ASoC: dapm: Add support for hw_free on CODEC to CODEC links ASoC: Intel: kbl_da7219_max98927: minor white space clean up ALSA: i2c/cs8427: Fix int to char conversion ALSA: doc: Brush up the old writing-an-alsa-driver ASoC: rsnd: tidyup SSICR::SWSP for TDM ASoC: rsnd: enable TDM settings for SSI parent ASoC: pcm3168a: add hw constraint for capture channel ... commit 013de2d6671d89de3397904749c86a69ac0686f7 Author: Guo Ren Date: Wed Sep 5 14:25:12 2018 +0800 csky: MMU and page table management This patch adds files related to memory management and here is our memory-layout: Fixmap : 0xffc02000 – 0xfffff000 (4 MB - 12KB) Pkmap : 0xff800000 – 0xffc00000 (4 MB) Vmalloc : 0xf0200000 – 0xff000000 (238 MB) Lowmem : 0x80000000 – 0xc0000000 (1GB) abiv1 CPU (CK610) is VIPT cache and it doesn't support highmem. abiv2 CPUs are all PIPT cache and they could support highmem. Lowmem is directly mapped by msa0 & msa1 reg, and we needn't setup memory page table for it. Link:https://lore.kernel.org/lkml/20180518215548.GH17671@n2100.armlinux.org.uk/ Signed-off-by: Guo Ren Cc: Christoph Hellwig Reviewed-by: Arnd Bergmann commit 00a9730e1007c6cc87a7c78af2f24a4105d616ee Author: Guo Ren Date: Wed Sep 5 14:25:10 2018 +0800 csky: Cache and TLB routines This patch adds cache and tlb sync codes for abiv1 & abiv2. Signed-off-by: Guo Ren Reviewed-by: Arnd Bergmann commit 4859bfca11c7d63d55175bcd85a75d6cee4b7184 Author: Guo Ren Date: Wed Sep 5 14:25:08 2018 +0800 csky: System Call This patch adds files related to syscall. Signed-off-by: Guo Ren Reviewed-by: Arnd Bergmann commit 081860b970adb69888734df0c8aa849b00ea7254 Author: Guo Ren Date: Wed Sep 5 14:25:08 2018 +0800 csky: Exception handling and mm-fault This patch adds exception handling code, cpuinfo and mm-fault code. Signed-off-by: Guo Ren Reviewed-by: Arnd Bergmann commit 9143a9359d051142081b26c3726c928f965c5eb7 Author: Guo Ren Date: Wed Sep 5 14:25:07 2018 +0800 csky: Kernel booting This patch add boot code. Thx boot params is all in dtb and it's the only way to let kernel get bootloader param information. Signed-off-by: Guo Ren Reviewed-by: Arnd Bergmann commit 7c768f845104b7c96954ad536be29797eff6a434 Author: Guo Ren Date: Wed Sep 5 14:25:06 2018 +0800 csky: defconfig This patch adds csky defconfig. Signed-off-by: Guo Ren Reviewed-by: Arnd Bergmann commit c32e64e852f3f5c0fd709f84bc94736840088375 Author: Guo Ren Date: Wed Sep 5 14:25:06 2018 +0800 csky: Build infrastructure This patch adds Makefile, Kconfig for build infrastructure. Signed-off-by: Guo Ren Acked-by: Arnd Bergmann commit 6a9b593d4b6f5994209456de7a3c2db0974b5dda Author: Hans de Goede Date: Fri Oct 19 10:41:28 2018 +0200 ACPI / PMIC: xpower: Add depends on IOSF_MBI to Kconfig entry This is necessary to avoid compilation issues on non x86 systems (where the asm/iosf_mbi.h header is not available) and on x86 systems in case IOSF_MBI support is not enabled there. Note that the AXP288 PMIC is connected through the LPSS i2c controller, so either we have IOSF_MBI support selected through the X86_INTEL_LPSS option, or we have a kernel where the OpRegion will never work anyways. Signed-off-by: Hans de Goede Acked-by: Andy Shevchenko Signed-off-by: Rafael J. Wysocki commit 8afb46804dfa88bb86d65e13f3209372f3d912e3 Author: Hans de Goede Date: Thu Oct 11 16:29:11 2018 +0200 i2c: designware: Cleanup bus lock handling Now that most of the special Bay- / Cherry-Trail bus lock handling has been moved to the iosf_mbi code we can simplify the remaining code a bit. Signed-off-by: Hans de Goede Acked-by: Jarkko Nikula Tested-by: Jarkko Nikula Acked-by: Wolfram Sang Signed-off-by: Rafael J. Wysocki commit 3c670dba864d9ab0a23612a93b7d98700734bd44 Author: Hans de Goede Date: Thu Oct 11 16:29:10 2018 +0200 ACPI / PMIC: xpower: Block P-Unit I2C access during read-modify-write intel_xpower_pmic_update_power() does a read-modify-write of the output control register. The i2c-designware code blocks the P-Unit I2C access during the read and write by taking the P-Unit's PMIC bus semaphore. But between the read and the write that semaphore is released and the P-Unit could make changes to the register which we then end up overwriting. This commit makes intel_xpower_pmic_update_power() take the semaphore itself so that it is held over the entire read-modify-write, avoiding this race. Signed-off-by: Hans de Goede Signed-off-by: Rafael J. Wysocki commit ad6e16059d8e00de0887885db11d87cba0bd1512 Author: Qiuxu Zhuo Date: Sun Oct 21 15:18:56 2018 +0800 EDAC, skx_edac: Add address translation for non-volatile DIMMs Currently, this driver doesn't support address translation for non-volatile DIMMs. The ACPI ADXL DSM method provides address translation for both volatile and non-volatile DIMMs. Enable it to use the ACPI DSM methods if they are supported and there are non-volatile DIMMs populated on the system. 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/1540106336-5212-1-git-send-email-qiuxu.zhuo@intel.com commit e09db3d241f8d594381b6e5f2ca0f72ffcce478a Author: Hans de Goede Date: Thu Oct 11 16:29:09 2018 +0200 x86: baytrail/cherrytrail: Rework and move P-Unit PMIC bus semaphore code On some BYT/CHT systems the SoC's P-Unit shares the I2C bus with the kernel. The P-Unit has a semaphore for the PMIC bus which we can take to block it from accessing the shared bus while the kernel wants to access it. Currently we have the I2C-controller driver acquiring and releasing the semaphore around each I2C transfer. There are 2 problems with this: 1) PMIC accesses often come in the form of a read-modify-write on one of the PMIC registers, we currently release the P-Unit's PMIC bus semaphore between the read and the write. If the P-Unit modifies the register during this window?, then we end up overwriting the P-Unit's changes. I believe that this is mostly an academic problem, but I'm not sure. 2) To safely access the shared I2C bus, we need to do 3 things: a) Notify the GPU driver that we are starting a window in which it may not access the P-Unit, since the P-Unit seems to ignore the semaphore for explicit power-level requests made by the GPU driver b) Make a pm_qos request to force all CPU cores out of C6/C7 since entering C6/C7 while we hold the semaphore hangs the SoC c) Finally take the P-Unit's PMIC bus semaphore All 3 these steps together are somewhat expensive, so ideally if we have a bunch of i2c transfers grouped together we only do this once for the entire group. Taking the read-modify-write on a PMIC register as example then ideally we would only do all 3 steps once at the beginning and undo all 3 steps once at the end. For this we need to be able to take the semaphore from within e.g. the PMIC opregion driver, yet we do not want to remove the taking of the semaphore from the I2C-controller driver, as that is still necessary to protect many other code-paths leading to accessing the shared I2C bus. This means that we first have the PMIC driver acquire the semaphore and then have the I2C controller driver trying to acquire it again. To make this possible this commit does the following: 1) Move the semaphore code from being private to the I2C controller driver into the generic iosf_mbi code, which already has other code to deal with the shared bus so that it can be accessed outside of the I2C bus driver. 2) Rework the code so that it can be called multiple times nested, while still blocking I2C accesses while e.g. the GPU driver has indicated the P-Unit needs the bus through a iosf_mbi_punit_acquire() call. Signed-off-by: Hans de Goede Acked-by: Jarkko Nikula Tested-by: Jarkko Nikula Acked-by: Wolfram Sang Signed-off-by: Rafael J. Wysocki commit a7fe5190c03f8137ef08db84a58dd4daf2c4785d Author: Daniel Lezcano Date: Thu Oct 4 14:04:03 2018 +0200 cpuidle: menu: Remove get_loadavg() from the performance multiplier The function get_loadavg() returns almost always zero. To be more precise, statistically speaking for a total of 1023379 times passing in the function, the load is equal to zero 1020728 times, greater than 100, 610 times, the remaining is between 0 and 5. In 2011, the get_loadavg() was removed from the Android tree because of the above [1]. At this time, the load was: unsigned long this_cpu_load(void) { struct rq *this = this_rq(); return this->cpu_load[0]; } In 2014, the code was changed by commit 372ba8cb46b2 (cpuidle: menu: Lookup CPU runqueues less) and the load is: void get_iowait_load(unsigned long *nr_waiters, unsigned long *load) { struct rq *rq = this_rq(); *nr_waiters = atomic_read(&rq->nr_iowait); *load = rq->load.weight; } with the same result. Both measurements show using the load in this code path does no matter anymore. Removing it. [1] https://android.googlesource.com/kernel/common/+/4dedd9f124703207895777ac6e91dacde0f7cc17 Signed-off-by: Daniel Lezcano Acked-by: Mel Gorman Acked-by: Peter Zijlstra (Intel) Signed-off-by: Rafael J. Wysocki commit 145d952a29320dea883246bcb24ba1da7ac4bb7f Author: Daniel Lezcano Date: Thu Oct 4 14:04:02 2018 +0200 sched: Factor out nr_iowait and nr_iowait_cpu The function nr_iowait_cpu() can be used directly by nr_iowait() instead of duplicating code. Call nr_iowait_cpu() from nr_iowait() Signed-off-by: Daniel Lezcano Acked-by: Peter Zijlstra (Intel) Signed-off-by: Rafael J. Wysocki commit d49f8a52b15bf35db778035340d8a673149f9f93 Merge: bd6bf7c10484 a0db8a7516d9 Author: Linus Torvalds Date: Thu Oct 25 07:40:30 2018 -0700 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 updates of the usual drivers: UFS, esp_scsi, NCR5380, qla2xxx, lpfc, libsas, hisi_sas. In addition there's a set of mostly small updates to the target subsystem a set of conversions to the generic DMA API, which do have some potential for issues in the older drivers but we'll handle those as case by case fixes. A new myrs driver for the DAC960/mylex raid controllers to replace the block based DAC960 which is also being removed by Jens in this merge window. Plus the usual slew of trivial changes" [ "myrs" stands for "MYlex Raid Scsi". Obviously. Silly of me to even wonder. There's also a "myrb" driver, where the 'b' stands for 'block'. Truly, somebody has got mad naming skillz. - Linus ] * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (237 commits) scsi: myrs: Fix the processor absent message in processor_show() scsi: myrs: Fix a logical vs bitwise bug scsi: hisi_sas: Fix NULL pointer dereference scsi: myrs: fix build failure on 32 bit scsi: fnic: replace gross legacy tag hack with blk-mq hack scsi: mesh: switch to generic DMA API scsi: ips: switch to generic DMA API scsi: smartpqi: fully convert to the generic DMA API scsi: vmw_pscsi: switch to generic DMA API scsi: snic: switch to generic DMA API scsi: qla4xxx: fully convert to the generic DMA API scsi: qla2xxx: fully convert to the generic DMA API scsi: qla1280: switch to generic DMA API scsi: qedi: fully convert to the generic DMA API scsi: qedf: fully convert to the generic DMA API scsi: pm8001: switch to generic DMA API scsi: nsp32: switch to generic DMA API scsi: mvsas: fully convert to the generic DMA API scsi: mvumi: switch to generic DMA API scsi: mpt3sas: switch to generic DMA API ... commit bd6bf7c10484f026505814b690104cdef27ed460 Merge: a41efc2a0f68 663569db6476 Author: Linus Torvalds Date: Thu Oct 25 06:50:48 2018 -0700 Merge tag 'pci-v4.20-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci Pull PCI updates from Bjorn Helgaas: - Fix ASPM link_state teardown on removal (Lukas Wunner) - Fix misleading _OSC ASPM message (Sinan Kaya) - Make _OSC optional for PCI (Sinan Kaya) - Don't initialize ASPM link state when ACPI_FADT_NO_ASPM is set (Patrick Talbert) - Remove x86 and arm64 node-local allocation for host bridge structures (Punit Agrawal) - Pay attention to device-specific _PXM node values (Jonathan Cameron) - Support new Immediate Readiness bit (Felipe Balbi) - Differentiate between pciehp surprise and safe removal (Lukas Wunner) - Remove unnecessary pciehp includes (Lukas Wunner) - Drop pciehp hotplug_slot_ops wrappers (Lukas Wunner) - Tolerate PCIe Slot Presence Detect being hardwired to zero to workaround broken hardware, e.g., the Wilocity switch/wireless device (Lukas Wunner) - Unify pciehp controller & slot structs (Lukas Wunner) - Constify hotplug_slot_ops (Lukas Wunner) - Drop hotplug_slot_info (Lukas Wunner) - Embed hotplug_slot struct into users instead of allocating it separately (Lukas Wunner) - Initialize PCIe port service drivers directly instead of relying on initcall ordering (Keith Busch) - Restore PCI config state after a slot reset (Keith Busch) - Save/restore DPC config state along with other PCI config state (Keith Busch) - Reference count devices during AER handling to avoid race issue with concurrent hot removal (Keith Busch) - If an Upstream Port reports ERR_FATAL, don't try to read the Port's config space because it is probably unreachable (Keith Busch) - During error handling, use slot-specific reset instead of secondary bus reset to avoid link up/down issues on hotplug ports (Keith Busch) - Restore previous AER/DPC handling that does not remove and re-enumerate devices on ERR_FATAL (Keith Busch) - Notify all drivers that may be affected by error recovery resets (Keith Busch) - Always generate error recovery uevents, even if a driver doesn't have error callbacks (Keith Busch) - Make PCIe link active reporting detection generic (Keith Busch) - Support D3cold in PCIe hierarchies during system sleep and runtime, including hotplug and Thunderbolt ports (Mika Westerberg) - Handle hpmemsize/hpiosize kernel parameters uniformly, whether slots are empty or occupied (Jon Derrick) - Remove duplicated include from pci/pcie/err.c and unused variable from cpqphp (YueHaibing) - Remove driver pci_cleanup_aer_uncorrect_error_status() calls (Oza Pawandeep) - Uninline PCI bus accessors for better ftracing (Keith Busch) - Remove unused AER Root Port .error_resume method (Keith Busch) - Use kfifo in AER instead of a local version (Keith Busch) - Use threaded IRQ in AER bottom half (Keith Busch) - Use managed resources in AER core (Keith Busch) - Reuse pcie_port_find_device() for AER injection (Keith Busch) - Abstract AER interrupt handling to disconnect error injection (Keith Busch) - Refactor AER injection callbacks to simplify future improvments (Keith Busch) - Remove unused Netronome NFP32xx Device IDs (Jakub Kicinski) - Use bitmap_zalloc() for dma_alias_mask (Andy Shevchenko) - Add switch fall-through annotations (Gustavo A. R. Silva) - Remove unused Switchtec quirk variable (Joshua Abraham) - Fix pci.c kernel-doc warning (Randy Dunlap) - Remove trivial PCI wrappers for DMA APIs (Christoph Hellwig) - Add Intel GPU device IDs to spurious interrupt quirk (Bin Meng) - Run Switchtec DMA aliasing quirk only on NTB endpoints to avoid useless dmesg errors (Logan Gunthorpe) - Update Switchtec NTB documentation (Wesley Yung) - Remove redundant "default n" from Kconfig (Bartlomiej Zolnierkiewicz) - Avoid panic when drivers enable MSI/MSI-X twice (Tonghao Zhang) - Add PCI support for peer-to-peer DMA (Logan Gunthorpe) - Add sysfs group for PCI peer-to-peer memory statistics (Logan Gunthorpe) - Add PCI peer-to-peer DMA scatterlist mapping interface (Logan Gunthorpe) - Add PCI configfs/sysfs helpers for use by peer-to-peer users (Logan Gunthorpe) - Add PCI peer-to-peer DMA driver writer's documentation (Logan Gunthorpe) - Add block layer flag to indicate driver support for PCI peer-to-peer DMA (Logan Gunthorpe) - Map Infiniband scatterlists for peer-to-peer DMA if they contain P2P memory (Logan Gunthorpe) - Register nvme-pci CMB buffer as PCI peer-to-peer memory (Logan Gunthorpe) - Add nvme-pci support for PCI peer-to-peer memory in requests (Logan Gunthorpe) - Use PCI peer-to-peer memory in nvme (Stephen Bates, Steve Wise, Christoph Hellwig, Logan Gunthorpe) - Cache VF config space size to optimize enumeration of many VFs (KarimAllah Ahmed) - Remove unnecessary include (Bjorn Helgaas) - Fix VMD AERSID quirk Device ID matching (Jon Derrick) - Fix Cadence PHY handling during probe (Alan Douglas) - Signal Cadence Endpoint interrupts via AXI region 0 instead of last region (Alan Douglas) - Write Cadence Endpoint MSI interrupts with 32 bits of data (Alan Douglas) - Remove redundant controller tests for "device_type == pci" (Rob Herring) - Document R-Car E3 (R8A77990) bindings (Tho Vu) - Add device tree support for R-Car r8a7744 (Biju Das) - Drop unused mvebu PCIe capability code (Thomas Petazzoni) - Add shared PCI bridge emulation code (Thomas Petazzoni) - Convert mvebu to use shared PCI bridge emulation (Thomas Petazzoni) - Add aardvark Root Port emulation (Thomas Petazzoni) - Support 100MHz/200MHz refclocks for i.MX6 (Lucas Stach) - Add initial power management for i.MX7 (Leonard Crestez) - Add PME_Turn_Off support for i.MX7 (Leonard Crestez) - Fix qcom runtime power management error handling (Bjorn Andersson) - Update TI dra7xx unaligned access errata workaround for host mode as well as endpoint mode (Vignesh R) - Fix kirin section mismatch warning (Nathan Chancellor) - Remove iproc PAXC slot check to allow VF support (Jitendra Bhivare) - Quirk Keystone K2G to limit MRRS to 256 (Kishon Vijay Abraham I) - Update Keystone to use MRRS quirk for host bridge instead of open coding (Kishon Vijay Abraham I) - Refactor Keystone link establishment (Kishon Vijay Abraham I) - Simplify and speed up Keystone link training (Kishon Vijay Abraham I) - Remove unused Keystone host_init argument (Kishon Vijay Abraham I) - Merge Keystone driver files into one (Kishon Vijay Abraham I) - Remove redundant Keystone platform_set_drvdata() (Kishon Vijay Abraham I) - Rename Keystone functions for uniformity (Kishon Vijay Abraham I) - Add Keystone device control module DT binding (Kishon Vijay Abraham I) - Use SYSCON API to get Keystone control module device IDs (Kishon Vijay Abraham I) - Clean up Keystone PHY handling (Kishon Vijay Abraham I) - Use runtime PM APIs to enable Keystone clock (Kishon Vijay Abraham I) - Clean up Keystone config space access checks (Kishon Vijay Abraham I) - Get Keystone outbound window count from DT (Kishon Vijay Abraham I) - Clean up Keystone outbound window configuration (Kishon Vijay Abraham I) - Clean up Keystone DBI setup (Kishon Vijay Abraham I) - Clean up Keystone ks_pcie_link_up() (Kishon Vijay Abraham I) - Fix Keystone IRQ status checking (Kishon Vijay Abraham I) - Add debug messages for all Keystone errors (Kishon Vijay Abraham I) - Clean up Keystone includes and macros (Kishon Vijay Abraham I) - Fix Mediatek unchecked return value from devm_pci_remap_iospace() (Gustavo A. R. Silva) - Fix Mediatek endpoint/port matching logic (Honghui Zhang) - Change Mediatek Root Port Class Code to PCI_CLASS_BRIDGE_PCI (Honghui Zhang) - Remove redundant Mediatek PM domain check (Honghui Zhang) - Convert Mediatek to pci_host_probe() (Honghui Zhang) - Fix Mediatek MSI enablement (Honghui Zhang) - Add Mediatek system PM support for MT2712 and MT7622 (Honghui Zhang) - Add Mediatek loadable module support (Honghui Zhang) - Detach VMD resources after stopping root bus to prevent orphan resources (Jon Derrick) - Convert pcitest build process to that used by other tools (iio, perf, etc) (Gustavo Pimentel) * tag 'pci-v4.20-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (140 commits) PCI/AER: Refactor error injection fallbacks PCI/AER: Abstract AER interrupt handling PCI/AER: Reuse existing pcie_port_find_device() interface PCI/AER: Use managed resource allocations PCI: pcie: Remove redundant 'default n' from Kconfig PCI: aardvark: Implement emulated root PCI bridge config space PCI: mvebu: Convert to PCI emulated bridge config space PCI: mvebu: Drop unused PCI express capability code PCI: Introduce PCI bridge emulated config space common logic PCI: vmd: Detach resources after stopping root bus nvmet: Optionally use PCI P2P memory nvmet: Introduce helper functions to allocate and free request SGLs nvme-pci: Add support for P2P memory in requests nvme-pci: Use PCI p2pmem subsystem to manage the CMB IB/core: Ensure we map P2P memory correctly in rdma_rw_ctx_[init|destroy]() block: Add PCI P2P flag for request queue PCI/P2PDMA: Add P2P DMA driver writer's documentation docs-rst: Add a new directory for PCI documentation PCI/P2PDMA: Introduce configfs/sysfs enable attribute helpers PCI/P2PDMA: Add PCI p2pmem DMA mappings to adjust the bus offset ... commit 721fb6fbfd2132164c2e8777cc837f9b2c1794dc Author: Jan Kara Date: Wed Oct 17 13:07:05 2018 +0200 fsnotify: Fix busy inodes during unmount Detaching of mark connector from fsnotify_put_mark() can race with unmounting of the filesystem like: CPU1 CPU2 fsnotify_put_mark() spin_lock(&conn->lock); ... inode = fsnotify_detach_connector_from_object(conn) spin_unlock(&conn->lock); generic_shutdown_super() fsnotify_unmount_inodes() sees connector detached for inode -> nothing to do evict_inode() barfs on pending inode reference iput(inode); Resulting in "Busy inodes after unmount" message and possible kernel oops. Make fsnotify_unmount_inodes() properly wait for outstanding inode references from detached connectors. Note that the accounting of outstanding inode references in the superblock can cause some cacheline contention on the counter. OTOH it happens only during deletion of the last notification mark from an inode (or during unlinking of watched inode) and that is not too bad. I have measured time to create & delete inotify watch 100000 times from 64 processes in parallel (each process having its own inotify group and its own file on a shared superblock) on a 64 CPU machine. Average and standard deviation of 15 runs look like: Avg Stddev Vanilla 9.817400 0.276165 Fixed 9.710467 0.228294 So there's no statistically significant difference. Fixes: 6b3f05d24d35 ("fsnotify: Detach mark from object list when last reference is dropped") CC: stable@vger.kernel.org Signed-off-by: Jan Kara commit a41efc2a0f68cea26665ab9e6d991c9bf33b3f59 Merge: 36168d712331 71f021cf6de8 Author: Linus Torvalds Date: Thu Oct 25 06:43:18 2018 -0700 Merge tag 'dmaengine-4.20-rc1' of git://git.infradead.org/users/vkoul/slave-dma Pull dmaengine updates from Vinod Koul: - Support for ColdFire mcf5441x edma controller - Support for link list mode in sprd dma - More users of managed dmaenginem_async_device_register API - Cyclic mode support in owl dma driver - DT updates for renesas drivers, dma-jz4780 updates and support for JZ4770, JZ4740 and JZ4725B controllers - Removal of deprecated dma_slave_config direction in dmaengine drivers, few more users will be removed in next cycle and eventually removed. - Minor updates to idma64, ioat, pxa, ppc drivers * tag 'dmaengine-4.20-rc1' of git://git.infradead.org/users/vkoul/slave-dma: (66 commits) dmaengine: ppc4xx: fix off-by-one build failure dmaengine: owl: Fix warnings generated during build dmaengine: fsl-edma: remove dma_slave_config direction usage dmaengine: rcar-dmac: set scatter/gather max segment size dmaengine: mmp_tdma: remove dma_slave_config direction usage dmaengine: ep93xx_dma: remove dma_slave_config direction usage dmaengine: k3dma: remove dma_slave_config direction usage dmaengine: k3dma: dont use direction for memcpy dmaengine: imx-dma: remove dma_slave_config direction usage dmaengine: idma: remove dma_slave_config direction usage dmaengine: hsu: remove dma_slave_config direction usage dmaengine: dw: remove dma_slave_config direction usage dmaengine: jz4740: remove dma_slave_config direction usage dmaengine: coh901318: remove dma_slave_config direction usage dmaengine: bcm2835: remove dma_slave_config direction usage dmaengine: at_hdmac: remove dma_slave_config direction usage dmaengine: owl: Add Slave and Cyclic mode support for Actions Semi Owl S900 SoC dmaengine: ioat: fix prototype of ioat_enumerate_channels dmaengine: stm32-dma: check whether length is aligned on FIFO threshold dt-bindings: dmaengine: usb-dmac: Add binding for r8a7744 ... commit 36168d7123311d52e085c116f6c66e16f0b84615 Merge: 6078e07dcf53 4cf841e39850 Author: Linus Torvalds Date: Thu Oct 25 06:40:00 2018 -0700 Merge tag 'edac_for_4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp Pull EDAC updates from Borislav Petkov: "The EDAC tree was busier than usual this cycle as the shortlog below shows. Also, this pull request is carrying an ACPI DSM driver which is used to ask the platform to supply the DIMM location of a reported hardware error and thus simplify all the EDAC logic when trying to map the error address to the respective DIMM. Core EDAC updates: - amd64_edac: AMD family 0x17, models 0x10-0x2f support (Michael Jin) Hygon Dhyana support (Pu Wen) - sb_edac: New maintainer + fixes (Tony Luck) Error reporting improvements and fixes (Qiuxu Zhuo) - ghes_edac: SMBIOS handle type 17 for DIMM locating and per-DIMM error accounting (Fan Wu) - altera_edac: Stratix10 support and refactoring (Thor Thayer) Out of tree addition: - acpi_adxl: Address Translation interface using an ACPI DSM (Tony Luck) - the usual amount of other misc fixes and cleanups all over" * tag 'edac_for_4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp: (22 commits) ACPI/ADXL: Add address translation interface using an ACPI DSM EDAC, thunderx: Fix memory leak in thunderx_l2c_threaded_isr() EDAC, skx_edac: Fix logical channel intermediate decoding EDAC, {i7core,sb,skx}_edac: Fix uncorrected error counting EDAC, altera: Work around int-to-pointer-cast warnings EDAC, amd64: Add Hygon Dhyana support EDAC: Raise the maximum number of memory controllers arm64: dts: stratix10: Add peripheral EDAC nodes EDAC, altera: Add Stratix10 peripheral support EDAC, altera: Merge Stratix10 into the Arria10 SDRAM probe routine arm64: dts: stratix10: Add SDRAM node EDAC, altera: Combine Stratix10 and Arria10 probe functions arm64: dts: stratix10: Additions to EDAC System Manager EDAC, i7core: Remove set but not used variable pvt EDAC, ghes: Use CPER module handles to locate DIMMs EDAC: Correct DIMM capacity unit symbol EDAC, sb_edac: Fix signedness bugs in *_get_ha() functions EDAC, sb_edac: Fix reporting for patrol scrubber errors EDAC, sb_edac: Return early on ADDRV bit and address type test MAINTAINERS: Update maintainer for drivers/edac/sb_edac.c ... commit 6078e07dcf5348075713124508d03786dc9ffa8b Merge: df132e4062af 594861215c83 Author: Linus Torvalds Date: Thu Oct 25 06:31:56 2018 -0700 Merge tag 'libnvdimm-for-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm Pull libnvdimm updates from Dan Williams: - Improve the efficiency and performance of reading nvdimm-namespace labels. Reduce the amount of label data read at driver load time by a few orders of magnitude. Reduce heavyweight call-outs to platform-firmware routines. - Handle media errors located in the 'struct page' array stored on a persistent memory namespace. Let the kernel clear these errors rather than an awkward userspace workaround. - Fix Address Range Scrub (ARS) completion tracking. Correct occasions where the kernel indicates completion of ARS before submission. - Fix asynchronous device registration reference counting. - Add support for reporting an nvdimm dirty-shutdown-count via sysfs. - Fix various small libnvdimm core and uapi issues. * tag 'libnvdimm-for-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: (21 commits) acpi, nfit: Further restrict userspace ARS start requests acpi, nfit: Fix Address Range Scrub completion tracking UAPI: ndctl: Remove use of PAGE_SIZE UAPI: ndctl: Fix g++-unsupported initialisation in headers tools/testing/nvdimm: Populate dirty shutdown data acpi, nfit: Collect shutdown status acpi, nfit: Introduce nfit_mem flags libnvdimm, label: Fix sparse warning nvdimm: Use namespace index data to reduce number of label reads needed nvdimm: Split label init out from the logic for getting config data nvdimm: Remove empty if statement nvdimm: Clarify comment in sizeof_namespace_index nvdimm: Sanity check labeloff libnvdimm, dimm: Maximize label transfer size libnvdimm, pmem: Fix badblocks population for 'raw' namespaces libnvdimm, namespace: Drop the repeat assignment for variable dev->parent libnvdimm, region: Fail badblocks listing for inactive regions libnvdimm, pfn: during init, clear errors in the metadata area libnvdimm: Set device node in nd_device_register libnvdimm: Hold reference on parent while scheduling async init ... commit df132e4062afe06ddc9938802243d704906a884a Merge: 96f2f66a9856 cfb347979e71 Author: Linus Torvalds Date: Thu Oct 25 06:28:08 2018 -0700 Merge tag 'for-v4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply Pull power supply and reset updates from Sebastian Reichel: - Add Spreadtrum SC2731 charger driver - bq25890-charger: Add BQ25896 support - bq27xxx-battery: Add support for BQ27411 - qcom-pon: Add pms405 pon support - cros-charger: add support for dedicated port - misc fixes * tag 'for-v4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: (28 commits) power: max8925: mark expected switch fall-through power: supply: fix spelling mistake "Gauage" -> "Gauge" power: reset: qcom-pon: Add pms405 pon support power: supply: bq27xxx: Add support for BQ27411 power: supply: Add Spreadtrum SC2731 charger support dt-bindings: power: Add Spreadtrum SC2731 charger documentation power: supply: twl4030_charger: disable eoc interrupt on linear charge power: supply: twl4030_charger: fix charging current out-of-bounds power: supply: bq25890_charger: fix semicolon.cocci warnings power: supply: max8998-charger: Fix platform data retrieval power: supply: cros: add support for dedicated port mfd: cros: add charger port count command definition power: reset: at91-poweroff: do not procede if at91_shdwc is allocated power: reset: at91-poweroff: rename at91_shdwc_base member of struct shdwc power: reset: at91-poweroff: make sclk part of struct shdwc power: reset: at91-poweroff: make mpddrc_base part of struct shdwc power: reset: at91-poweroff: use only one poweroff function power: reset: at91-poweroff: switch to slow clock before shutdown power: reset: convert to SPDX identifiers power: supply: ab8500_fg: silence uninitialized variable warnings ... commit 96f2f66a985699d201b3a84222b8dd42262a71fe Merge: 3f2dcb6411eb 46011e9755e9 Author: Linus Torvalds Date: Thu Oct 25 06:23:07 2018 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid Pull HID updates from Jiri Kosina: - rumble support for Xbox One S, from Andrey Smirnov - high-resolution support for Logitech mice, from Harry Cutts - support for recent devices requiring the HID parse to be able to cope with tag report sizes > 256 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: (35 commits) HID: usbhid: Add quirk for Redragon/Dragonrise Seymur 2 HID: wacom: Work around HID descriptor bug in DTK-2451 and DTH-2452 HID: google: add dependency on Cros EC for Hammer HID: elan: fix spelling mistake "registred" -> "registered" HID: google: drop superfluous const before SIMPLE_DEV_PM_OPS() HID: google: add support tablet mode switch for Whiskers mfd: cros: add "base attached" MKBP switch definition Input: reserve 2 events code because of HID HID: magicmouse: add support for Apple Magic Trackpad 2 HID: i2c-hid: override HID descriptors for certain devices HID: hid-bigbenff: driver for BigBen Interactive PS3OFMINIPAD gamepad HID: logitech: fix a used uninitialized GCC warning HID: intel-ish-hid: using list_head for ipc write queue HID: intel-ish-hid: use resource-managed api HID: intel_ish-hid: Enhance API to get ring buffer sizes HID: intel-ish-hid: use helper function to search client id HID: intel-ish-hid: ishtp: add helper function for client search HID: intel-ish-hid: use helper function to access client buffer HID: intel-ish-hid: ishtp: add helper functions for client buffer operation HID: intel-ish-hid: use helper function for private driver data set/get ... commit 3f2dcb6411eb3fd4a8be5d3713be0e2c1c750d6d Merge: 3ea172c84dc5 e1c9f2eaa0fb Author: Linus Torvalds Date: Thu Oct 25 06:21:28 2018 -0700 Merge tag 'backlight-next-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight Pull backlight updates from Lee Jones: "Old Drivers - Remove driver for S6E63M0 - Remove driver for LD9040 Fix-ups - Trivial (email address update); adp*_bl - Use 'atomic' PWM API; pwm_bl Bug Fixes - Remove pointless boolen '&ptr' check; lm3639_bl" * tag 'backlight-next-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight: backlight: Remove ld9040 driver backlight: Remove s6e63m0 driver backlight: lm3639: Unconditionally call led_classdev_unregister backlight: pwm_bl: Switch to using "atomic" PWM API backlight: Update MODULE AUTHOR email address commit 3ea172c84dc5a88f4fa7316311857f5878bcf777 Merge: 01aa9d518eae 6eb357844373 Author: Linus Torvalds Date: Thu Oct 25 06:19:15 2018 -0700 Merge tag 'mfd-next-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd Pull MFD updates from Lee Jones: "New Drivers - Add support for USART SPI to AT91* New Functionality - Add support for Audio CODECs to motorola-cpcap Fix-ups - DT documentation fix-ups; atmel-usart - Staticise functions/structs; spi-at91-usart, arizona-core - Constify; ti-lmu - Fix memory leaks; menelaus - Change device 'wake-up' status; ti_am335x_tscadc, max8997 - Power Management (suspend/resume) semantic changes; ti_am335x_adc, cros_ec, max8997 - SPDX churn; sec-core (+ headers), max* (+ headers), intel* (+ headers), - Trivial (whitespace, email addresses, alphabetisise); Kconfig, adp5520, intel_soc_pmic_* - Build as module; sec-irq - Use new %pOFn printk format for device_node.name; max77620 - Remove unused code; madera - Use generic MACROs; intel_msic, intel_soc_pmic_crc - Move to GPIOD; ti-lmu - Use managed resources; ti-lmu Bug Fixes - Add missing headers; at91-usart - Prevent device from entering low-power mode; arizona-core - Poll for BOOT_DONE to avoid still-booting NACK; madera-core - Prevent ADC read from shutting down device; mc13xxx-core" * tag 'mfd-next-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (45 commits) mfd: cros_ec: Avoid unneeded internal declaration warning mfd: ti-lmu: Use of_device_get_match_data() helper mfd: ti-lmu: Use managed resource for everything mfd: ti-lmu: Switch to GPIOD mfd: ti-lmu: constify mfd_cell tables mfd: max8997: Disable interrupt handling for suspend/resume cycle mfd: max8997: Enale irq-wakeup unconditionally mfd: arizona: Make array mclk_name static, shrinks object size MAINTAINERS: Add myself as designated reviewer of Intel MFD PMIC mfd: Convert Intel PMIC drivers to use SPDX identifier 1;5201;0c Reduce size of duplicated comments by switching to use SPDX identifier. mfd: Sort headers alphabetically for Intel PMIC drivers mfd: intel_soc_pmic_bxtwc: Chain power button IRQs as well mfd: intel_soc_pmic_crc: Use REGMAP_IRQ_REG() macro mfd: intel_soc_pmic_crc: Use DEFINE_RES_IRQ_NAMED() macro mfd: intel_msic: Use DEFINE_RES_IRQ() macro mfd: motorola-cpcap: Add audio-codec support mfd: mc13xxx-core: Fix PMIC shutdown when reading ADC values mfd: madera: Remove unused forward reference mfd: max77620: Convert to using %pOFn instead of device_node.name mfd: madera: Don't use regmap_read_poll_timeout to poll for BOOT_DONE ... commit 5a8de47b3c250521dd632cdedaac6db88367defa Author: Jiri Slaby Date: Wed Oct 24 13:54:03 2018 +0200 netfilter: bridge: define INT_MIN & INT_MAX in userspace With 4.19, programs like ebtables fail to build when they include "linux/netfilter_bridge.h". It is caused by commit 94276fa8a2a4 which added a use of INT_MIN and INT_MAX to the header: : In file included from /usr/include/linux/netfilter_bridge/ebtables.h:18, : from include/ebtables_u.h:28, : from communication.c:23: : /usr/include/linux/netfilter_bridge.h:30:20: error: 'INT_MIN' undeclared here (not in a function) : NF_BR_PRI_FIRST = INT_MIN, : ^~~~~~~ Define these constants by including "limits.h" when !__KERNEL__ (the same way as for other netfilter_* headers). Fixes: 94276fa8a2a4 ("netfilter: bridge: Expose nf_tables bridge hook priorities through uapi") Signed-off-by: Jiri Slaby Acked-by: Máté Eckl Signed-off-by: Pablo Neira Ayuso commit 5e91c9d9cd3fd557226ca75fed58816b9eee7e07 Author: Pablo Neira Ayuso Date: Mon Oct 22 21:49:45 2018 +0200 netfilter: nft_osf: check if attribute is present If the attribute is not sent, eg. old libnftnl binary, then tb[NFTA_OSF_TTL] is NULL and kernel crashes from the _init path. Fixes: a218dc82f0b5 ("netfilter: nft_osf: Add ttl option support") Signed-off-by: Pablo Neira Ayuso commit 61792b677415b77c8db04991c22966bb8de7603e Author: Florian Westphal Date: Tue Oct 23 16:47:16 2018 +0200 netfilter: ipv6: fix oops when defragmenting locally generated fragments Unlike ipv4 and normal ipv6 defrag, netfilter ipv6 defragmentation did not save/restore skb->dst. This causes oops when handling locally generated ipv6 fragments, as output path needs a valid dst. Reported-by: Maciej Żenczykowski Fixes: 84379c9afe01 ("netfilter: ipv6: nf_defrag: drop skb dst before queueing") Signed-off-by: Florian Westphal Reviewed-by: Eric Dumazet Signed-off-by: Pablo Neira Ayuso commit ace6485a03266cc3c198ce8e927a1ce0ce139699 Author: Fenghua Yu Date: Wed Oct 24 14:57:17 2018 -0700 x86/cpufeatures: Enumerate MOVDIR64B instruction MOVDIR64B moves 64-bytes as direct-store with 64-bytes write atomicity. Direct store is implemented by using write combining (WC) for writing data directly into memory without caching the data. In low latency offload (e.g. Non-Volatile Memory, etc), MOVDIR64B writes work descriptors (and data in some cases) to device-hosted work-queues atomically without cache pollution. Availability of the MOVDIR64B instruction is indicated by the presence of the CPUID feature flag MOVDIR64B (CPUID.0x07.0x0:ECX[bit 28]). Please check the latest Intel Architecture Instruction Set Extensions and Future Features Programming Reference for more details on the CPUID feature MOVDIR64B flag. Signed-off-by: Fenghua Yu Cc: Andy Lutomirski Cc: Ashok Raj Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Ravi V Shankar Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1540418237-125817-3-git-send-email-fenghua.yu@intel.com Signed-off-by: Ingo Molnar commit 33823f4d63f7a010653d219800539409a78ef4be Author: Fenghua Yu Date: Wed Oct 24 14:57:16 2018 -0700 x86/cpufeatures: Enumerate MOVDIRI instruction MOVDIRI moves doubleword or quadword from register to memory through direct store which is implemented by using write combining (WC) for writing data directly into memory without caching the data. Programmable agents can handle streaming offload (e.g. high speed packet processing in network). Hardware implements a doorbell (tail pointer) register that is updated by software when adding new work-elements to the streaming offload work-queue. MOVDIRI can be used as the doorbell write which is a 4-byte or 8-byte uncachable write to MMIO. MOVDIRI has lower overhead than other ways to write the doorbell. Availability of the MOVDIRI instruction is indicated by the presence of the CPUID feature flag MOVDIRI(CPUID.0x07.0x0:ECX[bit 27]). Please check the latest Intel Architecture Instruction Set Extensions and Future Features Programming Reference for more details on the CPUID feature MOVDIRI flag. Signed-off-by: Fenghua Yu Cc: Andy Lutomirski Cc: Ashok Raj Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Ravi V Shankar Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1540418237-125817-2-git-send-email-fenghua.yu@intel.com Signed-off-by: Ingo Molnar commit 79f800b2e76923cd8ce0aa659cb5c019d9643bc9 Author: Stefan Hajnoczi Date: Fri Oct 12 16:46:37 2018 +0100 MAINTAINERS: remove reference to bogus vsock file The file drivers/vhost/vsock.h never existed. Remove the bogus MAINTAINERS reference. Fixes: 433fc58e6bf2c8bd97e57153ed28e64fd78207b8 ("VSOCK: Introduce vhost_vsock.ko") Reported-by: Joe Perches Signed-off-by: Stefan Hajnoczi Signed-off-by: Michael S. Tsirkin commit 09d7583294aada625349b6f80f1e1c730b5a5208 Author: Bijan Mottahedeh Date: Mon Sep 17 17:09:49 2018 -0700 vhost/scsi: Use common handling code in request queue handler Change the request queue handler to use common handling routines same as the control queue handler. Signed-off-by: Bijan Mottahedeh Signed-off-by: Michael S. Tsirkin commit 3f8ca2e115e55af4c15d97dda635e948d2e380be Author: Bijan Mottahedeh Date: Mon Sep 17 17:09:48 2018 -0700 vhost/scsi: Extract common handling code from control queue handler Prepare to change the request queue handler to use common handling routines. Signed-off-by: Bijan Mottahedeh Signed-off-by: Michael S. Tsirkin commit 0d02dbd68c47b66367130b696baef7246720791c Author: Bijan Mottahedeh Date: Mon Sep 17 17:09:47 2018 -0700 vhost/scsi: Respond to control queue operations The vhost-scsi driver currently does not handle any control queue operations. In particular, vhost_scsi_ctl_handle_kick, merely prints out a debug message but does nothing else. This can cause guest VMs to hang. As part of SCSI recovery from an error, e.g., an I/O timeout, the SCSI midlayer attempts to abort the failed operation. The SCSI virtio driver translates the abort to a SCSI TMF request that gets put on the control queue (virtscsi_abort -> virtscsi_tmf). The SCSI virtio driver then waits indefinitely for this request to be completed, but it never will because vhost-scsi never responds to that request. To avoid a hang, always respond to control queue operations; explicitly reject TMF requests, and return a no-op response to event requests. Signed-off-by: Bijan Mottahedeh Signed-off-by: Michael S. Tsirkin commit 4542d623c7134bc1738f8a68ccb6dd546f1c264f Author: Greg Edwards Date: Wed Aug 22 13:21:53 2018 -0600 vhost/scsi: truncate T10 PI iov_iter to prot_bytes Commands with protection information included were not truncating the protection iov_iter to the number of protection bytes in the command. This resulted in vhost_scsi mis-calculating the size of the protection SGL in vhost_scsi_calc_sgls(), and including both the protection and data SG entries in the protection SGL. Fixes: 09b13fa8c1a1 ("vhost/scsi: Add ANY_LAYOUT support in vhost_scsi_handle_vq") Signed-off-by: Greg Edwards Signed-off-by: Michael S. Tsirkin Fixes: 09b13fa8c1a1093e9458549ac8bb203a7c65c62a Cc: stable@vger.kernel.org Reviewed-by: Paolo Bonzini commit 1a0e348e5693b7acde02e50319b3237657b7981a Author: David Francis Date: Tue Sep 25 11:23:31 2018 -0400 drm/amd/display: Disable 4k 60 HDMI on DCE11 [Why] Carrizo and Stoney have severe corruption when trying to power 4k 60 monitors over HDMI connectors that support 4k 60. Carrizo and Stoney require retimers and redrivers to support 4k 60 over HDMI. This driver does not currently support these. Thus, 4k 60 HDMI (and all other modes requiring over 300MHz) should be disabled. [How] Reduce the dce11 HDMI pixel clock cap to 300000kHz. Signed-off-by: David Francis Reviewed-by: Roman Li Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 7179d24040d66de22e4710e943256be9e1045feb Author: Rex Zhu Date: Fri Oct 19 10:46:53 2018 +0800 drm/amdgpu: Fix null point error need to check adev->powerplay.pp_funcs first, becasue from AI, the smu ip can be disabled by user, and the pp_handle is null in this case. Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher commit 6f059c641b31076248ba89d0f7e0e753946a8099 Author: Rex Zhu Date: Fri Oct 19 10:38:10 2018 +0800 drm/amd/display: Fix Null point error if smu ip was disabled from AI, SMU Ip is not indispensable to driver and can be disabled by user via module parameter ip_block_mask. so the pp_handle may be NULL. Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher commit 355c8db13be409695956c666e839f654a99cfc2d Author: Evan Quan Date: Mon Oct 22 14:35:40 2018 +0800 drm/amd/powerplay: commit get_performance_level API as DAL needed This can suppress the error reported on driver loading. Also these are empty APIs as Vega12/Vega20 has no performance levels. Signed-off-by: Evan Quan Reviewed-by: Feifei Xu Signed-off-by: Alex Deucher commit 2e991629bcf55a43681aec1ee096eeb03cf81709 Author: Wei Wang Date: Mon Aug 27 09:32:19 2018 +0800 virtio-balloon: VIRTIO_BALLOON_F_PAGE_POISON The VIRTIO_BALLOON_F_PAGE_POISON feature bit is used to indicate if the guest is using page poisoning. Guest writes to the poison_val config field to tell host about the page poisoning value that is in use. Suggested-by: Michael S. Tsirkin Signed-off-by: Wei Wang Cc: Michael S. Tsirkin Cc: Michal Hocko Cc: Andrew Morton Signed-off-by: Michael S. Tsirkin commit d95f58f4a6ca002126c36c530fb096519c94baef Author: Wei Wang Date: Mon Aug 27 09:32:18 2018 +0800 mm/page_poison: expose page_poisoning_enabled to kernel modules In some usages, e.g. virtio-balloon, a kernel module needs to know if page poisoning is in use. This patch exposes the page_poisoning_enabled function to kernel modules. Signed-off-by: Wei Wang Cc: Andrew Morton Cc: Michal Hocko Cc: Michael S. Tsirkin Acked-by: Andrew Morton Signed-off-by: Michael S. Tsirkin commit 86a559787e6f5cf662c081363f64a20cad654195 Author: Wei Wang Date: Mon Aug 27 09:32:17 2018 +0800 virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT Negotiation of the VIRTIO_BALLOON_F_FREE_PAGE_HINT feature indicates the support of reporting hints of guest free pages to host via virtio-balloon. Currenlty, only free page blocks of MAX_ORDER - 1 are reported. They are obtained one by one from the mm free list via the regular allocation function. Host requests the guest to report free page hints by sending a new cmd id to the guest via the free_page_report_cmd_id configuration register. When the guest starts to report, it first sends a start cmd to host via the free page vq, which acks to host the cmd id received. When the guest finishes reporting free pages, a stop cmd is sent to host via the vq. Host may also send a stop cmd id to the guest to stop the reporting. VIRTIO_BALLOON_CMD_ID_STOP: Host sends this cmd to stop the guest reporting. VIRTIO_BALLOON_CMD_ID_DONE: Host sends this cmd to tell the guest that the reported pages are ready to be freed. Why does the guest free the reported pages when host tells it is ready to free? This is because freeing pages appears to be expensive for live migration. free_pages() dirties memory very quickly and makes the live migraion not converge in some cases. So it is good to delay the free_page operation when the migration is done, and host sends a command to guest about that. Why do we need the new VIRTIO_BALLOON_CMD_ID_DONE, instead of reusing VIRTIO_BALLOON_CMD_ID_STOP? This is because live migration is usually done in several rounds. At the end of each round, host needs to send a VIRTIO_BALLOON_CMD_ID_STOP cmd to the guest to stop (or say pause) the reporting. The guest resumes the reporting when it receives a new command id at the beginning of the next round. So we need a new cmd id to distinguish between "stop reporting" and "ready to free the reported pages". TODO: - Add a batch page allocation API to amortize the allocation overhead. Signed-off-by: Wei Wang Signed-off-by: Liang Li Cc: Michael S. Tsirkin Cc: Michal Hocko Cc: Andrew Morton Cc: Linus Torvalds Signed-off-by: Michael S. Tsirkin commit d7b31359ecef8d32540266f39d99892f61d17c4b Author: Lénaïc Huard Date: Thu Mar 22 23:53:05 2018 +0100 kvm_config: add CONFIG_VIRTIO_MENU Make sure that make kvmconfig enables all the virtio drivers even if it is preceded by a make allnoconfig. Signed-off-by: Lénaïc Huard Signed-off-by: Michael S. Tsirkin commit 3822d1bb0df18aa28930f19bc46e0704aea1be0f Author: Baolin Wang Date: Thu Oct 18 16:52:30 2018 +0800 rtc: sc27xx: Always read normal alarm when registering RTC device When registering one RTC device, it will check to see if there is an alarm already set in RTC hardware by reading RTC alarm, at this time we should always read the normal alarm put in always-on region by checking the rtc->registered flag. Signed-off-by: Baolin Wang Signed-off-by: Alexandre Belloni commit bf2c532b67fc077051e17de4a1304a83e5ca5b15 Author: Baolin Wang Date: Thu Oct 18 16:52:29 2018 +0800 rtc: sc27xx: Add check to see if need to enable the alarm interrupt The RTC interrupt enable register is not put in always-power-on region supplied by VDDRTC, so we should check if we need enable the alarm interrupt when system booting. Signed-off-by: Baolin Wang Signed-off-by: Alexandre Belloni commit b2ddc48582efa157635f7ef815c9d4a657e2cabd Author: Baolin Wang Date: Thu Oct 18 16:52:28 2018 +0800 rtc: sc27xx: Remove interrupts disable and clear in probe() When registering one rtc device, it will check to see if there is an alarm already set in rtc hardware by issuing __rtc_read_alarm(). So we should not disable the RTC interrupts and clear the interrupts status in probe() function. Signed-off-by: Baolin Wang Signed-off-by: Alexandre Belloni commit 7db5adfa63167dac548022c973e00da7f56ffb72 Author: Baolin Wang Date: Thu Oct 18 16:52:27 2018 +0800 rtc: sc27xx: Clear SPG value update interrupt status We should clear the SPG value update interrupt status once the SPG value is updated successfully, in case incorrect status validation for next time. Signed-off-by: Baolin Wang Signed-off-by: Alexandre Belloni commit a86d6b23ed9729d47b2818857d8fa5d8e3f8284a Author: Baolin Wang Date: Thu Oct 18 16:52:26 2018 +0800 rtc: sc27xx: Set wakeup capability before registering rtc device Set wakeup capability before registering rtc device, in case the alarmtimer can find one available rtc device. Signed-off-by: Baolin Wang Signed-off-by: Alexandre Belloni commit 4f3ebb04d05fe36f74ef17c6ee06559626d47964 Merge: 4ed591c8ab44 4f4be03bdeb3 Author: David S. Miller Date: Wed Oct 24 16:27:33 2018 -0700 Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-queue Jeff Kirsher says: ==================== Intel Wired LAN Driver Fixes 2018-10-24 This series contains fixes for the ice driver. Anirudh fixes a namespace issue which was introduced with a previous patch to remove ice_netpoll. Fixed up the device ID define names to align with the branding string names. Use the capability count returned by the firmware, instead of calculating the count. Introduced driver workarounds due to current firmware limitations. Fixed the queue mapping for a VF, which needs to be set in the config and scatter queue modes. Fixed the driver which is setup to handle link status events (LSE), even though the firmware does not have this feature yet, so add the ability to poll for link status changes while we wait for updated firmware. ==================== Signed-off-by: David S. Miller commit 4ed591c8ab44e711e56b8e021ffaf4f407c045f5 Author: David Ahern Date: Wed Oct 24 13:58:39 2018 -0700 net/ipv6: Allow onlink routes to have a device mismatch if it is the default route The intent of ip6_route_check_nh_onlink is to make sure the gateway given for an onlink route is not actually on a connected route for a different interface (e.g., 2001:db8:1::/64 is on dev eth1 and then an onlink route has a via 2001:db8:1::1 dev eth2). If the gateway lookup hits the default route then it most likely will be a different interface than the onlink route which is ok. Update ip6_route_check_nh_onlink to disregard the device mismatch if the gateway lookup hits the default route. Turns out the existing onlink tests are passing because there is no default route or it is an unreachable default, so update the onlink tests to have a default route other than unreachable. Fixes: fc1e64e1092f6 ("net/ipv6: Add support for onlink flag") Signed-off-by: David Ahern Signed-off-by: David S. Miller commit e72bde6b66299602087c8c2350d36a525e75d06e Author: David Ahern Date: Wed Oct 24 08:32:49 2018 -0700 net: sched: Remove TCA_OPTIONS from policy Marco reported an error with hfsc: root@Calimero:~# tc qdisc add dev eth0 root handle 1:0 hfsc default 1 Error: Attribute failed policy validation. Apparently a few implementations pass TCA_OPTIONS as a binary instead of nested attribute, so drop TCA_OPTIONS from the policy. Fixes: 8b4c3cdd9dd8 ("net: sched: Add policy validation for tc attributes") Reported-by: Marco Berizzi Signed-off-by: David Ahern Signed-off-by: David S. Miller commit 4f4be03bdeb32761f89cec3f2bec5e69dd41bc82 Author: Anirudh Venkataramanan Date: Thu Oct 18 08:37:09 2018 -0700 ice: Poll for link status change When the physical link goes up or down, the driver is supposed to receive a link status event (LSE). The driver currently has the code to handle LSEs but there is no firmware support for this feature yet. So this patch adds the ability for the driver to poll for link status changes. The polling itself is done in ice_watchdog_subtask. For namespace cleanliness, this patch also removes code that handles LSE. This code will be reintroduced once the feature is officially supported. Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 982b1219182ecd5a18a08caaf9be59a8373ac764 Author: Anirudh Venkataramanan Date: Thu Oct 18 08:37:08 2018 -0700 ice: Allocate VF interrupts and set queue map Allocate VF interrupts using VPINT_ALLOC_PCI. Multiple interrupts are specified as a range from "first" to "last". Also, according to the spec, the queue mapping for a VF needs to be set in both contig and scatter queue modes. So make this change as well. Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit f203dca363f837b1e5a4e0c018264680aab90307 Author: Anirudh Venkataramanan Date: Thu Oct 18 08:37:07 2018 -0700 ice: Introduce ice_dev_onetime_setup ice_dev_onetime_setup contains a couple of driver workarounds for current firmware limitations. These workarounds are expected to go away once these limitations are fixed in the firmware. On a firmware release that has these issues addressed, these workarounds (while unnecessary) will not break anything. Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit ac0e549678d60097793a6a818ece319e99d1ae9a Author: Shiju Jose Date: Wed Oct 24 15:32:18 2018 +0100 net: hns3: Fix for warning uninitialized symbol hw_err_lst3 This patch fixes the smatch warning, drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_err.c:700 hclge_log_and_clear_ppp_error() error: uninitialized symbol 'hw_err_lst3' Link: https://lkml.org/lkml/2018/10/23/430 Fixes: da2d072a9ea7 ("net: hns3: Add enable and process hw errors from PPP") Reported-by: Dan Carpenter Signed-off-by: Shiju Jose Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit cdaa18f9bd98df75d4ce9478f72c0a5d11562249 Author: Dan Carpenter Date: Wed Oct 24 11:32:21 2018 +0300 octeontx2-af: Copy the right amount of memory This is a copy and paste bug where we copied the sizeof() from the chunk before. We're copying more data than intended but the destination is a union so it doesn't cause memory corruption. Fixes: ffb0abd7e9cb ("octeontx2-af: NIX AQ instruction enqueue support") Signed-off-by: Dan Carpenter Signed-off-by: David S. Miller commit db4f1be3ca9b0ef7330763d07bf4ace83ad6f913 Author: Sean Tranchetti Date: Tue Oct 23 16:04:31 2018 -0600 net: udp: fix handling of CHECKSUM_COMPLETE packets Current handling of CHECKSUM_COMPLETE packets by the UDP stack is incorrect for any packet that has an incorrect checksum value. udp4/6_csum_init() will both make a call to __skb_checksum_validate_complete() to initialize/validate the csum field when receiving a CHECKSUM_COMPLETE packet. When this packet fails validation, skb->csum will be overwritten with the pseudoheader checksum so the packet can be fully validated by software, but the skb->ip_summed value will be left as CHECKSUM_COMPLETE so that way the stack can later warn the user about their hardware spewing bad checksums. Unfortunately, leaving the SKB in this state can cause problems later on in the checksum calculation. Since the the packet is still marked as CHECKSUM_COMPLETE, udp_csum_pull_header() will SUBTRACT the checksum of the UDP header from skb->csum instead of adding it, leaving us with a garbage value in that field. Once we try to copy the packet to userspace in the udp4/6_recvmsg(), we'll make a call to skb_copy_and_csum_datagram_msg() to checksum the packet data and add it in the garbage skb->csum value to perform our final validation check. Since the value we're validating is not the proper checksum, it's possible that the folded value could come out to 0, causing us not to drop the packet. Instead, we believe that the packet was checksummed incorrectly by hardware since skb->ip_summed is still CHECKSUM_COMPLETE, and we attempt to warn the user with netdev_rx_csum_fault(skb->dev); Unfortunately, since this is the UDP path, skb->dev has been overwritten by skb->dev_scratch and is no longer a valid pointer, so we end up reading invalid memory. This patch addresses this problem in two ways: 1) Do not use the dev pointer when calling netdev_rx_csum_fault() from skb_copy_and_csum_datagram_msg(). Since this gets called from the UDP path where skb->dev has been overwritten, we have no way of knowing if the pointer is still valid. Also for the sake of consistency with the other uses of netdev_rx_csum_fault(), don't attempt to call it if the packet was checksummed by software. 2) Add better CHECKSUM_COMPLETE handling to udp4/6_csum_init(). If we receive a packet that's CHECKSUM_COMPLETE that fails verification (i.e. skb->csum_valid == 0), check who performed the calculation. It's possible that the checksum was done in software by the network stack earlier (such as Netfilter's CONNTRACK module), and if that says the checksum is bad, we can drop the packet immediately instead of waiting until we try and copy it to userspace. Otherwise, we need to mark the SKB as CHECKSUM_NONE, since the skb->csum field no longer contains the full packet checksum after the call to __skb_checksum_validate_complete(). Fixes: e6afc8ace6dd ("udp: remove headers from UDP packets before queueing") Fixes: c84d949057ca ("udp: copy skb->truesize in the first cache line") Cc: Sam Kumar Cc: Eric Dumazet Signed-off-by: Sean Tranchetti Signed-off-by: David S. Miller commit 559bf69e3c8f8892c3205417c01cdf8d7823d03c Merge: 01aa9d518eae c63586dc9b3e Author: David S. Miller Date: Wed Oct 24 14:06:26 2018 -0700 Merge branch 'route-dump-filter-fixes' David Ahern says: ==================== net: Fixups for recent dump filtering changes Li RongQing noted that tgt_net is leaked in ipv4 due to the recent change to handle address dumps for a specific device. The report also applies to ipv6 and other error paths. Patches 1 and 2 fix those leaks. Patch 3 stops route dumps from erroring out when dumping across address families and a table id is given. This is needed in preparation for patch 4. Patch 4 updates the rtnl_dump_all to handle a failure in one of the dumpit functions. At the moment, if an address dump returns an error the dump all loop breaks but the error is dropped. The result can be no data is returned and no error either leaving the user wondering about the addresses. Patches were tested with a modified iproute2 to add invalid data to the dump request causing each specific failure path to be hit in addition to positive testing that it works as it should when given valid data. ==================== Signed-off-by: David S. Miller commit c63586dc9b3ed5d45ba82e16bf9e2170a55521e6 Author: David Ahern Date: Wed Oct 24 12:59:02 2018 -0700 net: rtnl_dump_all needs to propagate error from dumpit function If an address, route or netconf dump request is sent for AF_UNSPEC, then rtnl_dump_all is used to do the dump across all address families. If one of the dumpit functions fails (e.g., invalid attributes in the dump request) then rtnl_dump_all needs to propagate that error so the user gets an appropriate response instead of just getting no data. Fixes: effe67926624 ("net: Enable kernel side filtering of route dumps") Fixes: 5fcd266a9f64 ("net/ipv4: Add support for dumping addresses for a specific device") Fixes: 6371a71f3a3b ("net/ipv6: Add support for dumping addresses for a specific device") Signed-off-by: David Ahern Signed-off-by: David S. Miller commit ae677bbb4441309e1827e60413de92363153dccb Author: David Ahern Date: Wed Oct 24 12:59:01 2018 -0700 net: Don't return invalid table id error when dumping all families When doing a route dump across all address families, do not error out if the table does not exist. This allows a route dump for AF_UNSPEC with a table id that may only exist for some of the families. Do return the table does not exist error if dumping routes for a specific family and the table does not exist. Signed-off-by: David Ahern Signed-off-by: David S. Miller commit 242afaa6968cde96824247ab984c24c466ca29f3 Author: David Ahern Date: Wed Oct 24 12:59:00 2018 -0700 net/ipv6: Put target net when address dump fails due to bad attributes If tgt_net is set based on IFA_TARGET_NETNSID attribute in the dump request, make sure all error paths call put_net. Fixes: 6371a71f3a3b ("net/ipv6: Add support for dumping addresses for a specific device") Fixes: ed6eff11790a ("net/ipv6: Update inet6_dump_addr for strict data checking") Signed-off-by: David Ahern Signed-off-by: David S. Miller commit d7e38611b81e6d7e14969c361f2b9fc07403a6c3 Author: David Ahern Date: Wed Oct 24 12:58:59 2018 -0700 net/ipv4: Put target net when address dump fails due to bad attributes If tgt_net is set based on IFA_TARGET_NETNSID attribute in the dump request, make sure all error paths call put_net. Fixes: 5fcd266a9f64 ("net/ipv4: Add support for dumping addresses for a specific device") Fixes: c33078e3dfb1 ("net/ipv4: Update inet_dump_ifaddr for strict data checking") Reported-by: Li RongQing Signed-off-by: David Ahern Signed-off-by: David S. Miller commit 99189e8b6b0ea3e561df8602982b796a146a6747 Author: Anirudh Venkataramanan Date: Thu Oct 18 08:37:06 2018 -0700 ice: Use capability count returned by the firmware The firmware now returns the capability count in the command buffer. Use it. Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit ac5a8aef112e194c7d41988c4f32112085ebc22f Author: Anirudh Venkataramanan Date: Thu Oct 18 08:37:05 2018 -0700 ice: Update expected FW version Update to the current firmware major and minor version which are 1 and 3 respectively. Also remove an empty comment line. Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 633d7449a30133e99a5182fb74f40594801497b1 Author: Anirudh Venkataramanan Date: Thu Oct 18 08:37:04 2018 -0700 ice: Change device ID define names to align with branding string Basically remove references to C810 and use E810C (from the branding string) instead. Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit f73581f8d9a367459f36e6a4ef0065997ab14c75 Author: Masami Hiramatsu Date: Wed Oct 17 12:33:23 2018 +0900 selftests/ftrace: Strip escape sequences for log file Strip escape sequences from the stream to the ftracetest summary log file. Note that all test-case results are dumped raw in each file. Signed-off-by: Masami Hiramatsu Acked-by: Steven Rostedt (VMware) Signed-off-by: Shuah Khan (Samsung OSG) commit 8096fbcf55c0da535bdca9adab982ec0c5affb67 Author: Daniel Díaz Date: Tue Oct 16 12:02:20 2018 -0500 selftests/ftrace: Use colored output when available If test is being directly executed (with stdout opened on the terminal) and the terminal capabilities indicate enough colors, then use the existing scheme of green, red, and blue to show when tests pass, fail or end in a different way. When running the tests redirecting the stdout, for instance, to a file, then colors are not shown, thus producing a more readable output. Signed-off-by: Daniel Díaz Acked-by: Steven Rostedt (VMware) Signed-off-by: Shuah Khan (Samsung OSG) commit 0387662d1b6c5ad2950d8e94d5e380af3f15c05c Author: Peng Hao Date: Fri Oct 12 03:53:50 2018 +0800 selftests: fix warning: "_GNU_SOURCE" redefined Makefile contains -D_GNU_SOURCE. remove define "_GNU_SOURCE" in c files. Signed-off-by: Peng Hao Signed-off-by: Shuah Khan (Samsung OSG) commit fb363e2d20351e1d16629df19e7bce1a31b3227a Author: Andrea Parri Date: Tue Oct 16 16:13:46 2018 +0200 selftests: kvm: Fix -Wformat warnings Fixes the following warnings: dirty_log_test.c: In function ‘help’: dirty_log_test.c:216:9: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 2 has type ‘int’ [-Wformat=] printf(" -i: specify iteration counts (default: %"PRIu64")\n", ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from include/test_util.h:18:0, from dirty_log_test.c:16: /usr/include/inttypes.h:105:34: note: format string is defined here # define PRIu64 __PRI64_PREFIX "u" dirty_log_test.c:218:9: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 2 has type ‘int’ [-Wformat=] printf(" -I: specify interval in ms (default: %"PRIu64" ms)\n", ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from include/test_util.h:18:0, from dirty_log_test.c:16: /usr/include/inttypes.h:105:34: note: format string is defined here # define PRIu64 __PRI64_PREFIX "u" Signed-off-by: Andrea Parri Signed-off-by: Shuah Khan (Samsung OSG) commit 8f381ac4d3210025891c5397e744fd4c771481d7 Author: Steven Rostedt (VMware) Date: Fri Oct 12 22:21:06 2018 -0400 selftests/ftrace: Add color to the PASS / FAIL results Now that ftracetest has over 80 tests, it is difficult to simply scroll up the console window to find the failed tests when it reports just two tests have failed. In order to make this stand out better, have the color of the word "PASS" be green, "FAIL" and "XFAIL" be red, and all other results be blue. This helps tremendously in quickly spotting the failed tests by just scrolling up the console window. Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Shuah Khan (Samsung OSG) commit 717da97e94a9ba590632624992a9f79d53d3579b Author: Colin Ian King Date: Sat Oct 13 16:41:05 2018 +0100 kvm: selftests: fix spelling mistake "Insufficent" -> "Insufficient" Trivial fix to spelling mistake in TEST_ASSERT message text Signed-off-by: Colin Ian King Signed-off-by: Shuah Khan (Samsung OSG) commit 8c7f6316fccf38ca45d33ed658cc4813837b6294 Author: Daniel Díaz Date: Fri Sep 7 09:34:55 2018 -0500 selftests: gpio: Fix OUTPUT directory in Makefile When simply running `make' from the selftests top dir, this error shows up: cc -O2 -g -std=gnu99 -Wall -I../../../../usr/include/ -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/uuid gpio-mockup-chardev.c ../../../gpio/gpio-utils.o -lmount -o gpio-mockup-chardev cc: error: ../../../gpio/gpio-utils.o: No such file or directory : recipe for target 'gpio-mockup-chardev' failed make[1]: *** [gpio-mockup-chardev] Error 1 because the output directory is set to "selftests/gpio" and all binaries built from ../../../gpio/ end up there. In fact, they appear as, exempli gratia: * gpiogpio-event-mon * gpiogpio-hammer * gpioinclude/ * gpiolsgpio which is wrong, as it's missing a directory separator somewhere. This patch sets straight the output directory when building ../../../gpio/ so that binaries don't cross paths. Signed-off-by: Daniel Díaz Signed-off-by: Shuah Khan (Samsung OSG) commit a4f222e000b3f75bd1ab763dcc289d004ff6596e Author: Fathi Boudra Date: Fri Sep 7 09:34:54 2018 -0500 selftests: gpio: restructure Makefile This patch cleans up the Makefile by restructuring a couple of things, namely: 1) change explicit paths in targets for variables 2) substitute a variable (BINARIES) for another, part of the selftests build system (TEST_PROGS_EXTENDED) 3) proper cleaning up of the EXTRA objects The resulting Makefile is much more readable and manageable. Signed-off-by: Fathi Boudra Signed-off-by: Daniel Díaz Signed-off-by: Shuah Khan (Samsung OSG) commit d89d08ffd2c5a9043c8df7333d9bee6c09904a8f Author: Shuah Khan (Samsung OSG) Date: Wed Sep 26 16:37:43 2018 -0600 selftests: watchdog: Fix ioctl SET* error paths to take oneshot exit path When ioctls for WDIOC_SETOPTIONS (WDIOS_DISABLECARD or WDIOS_ENABLECARD), WDIOC_SETTIMEOUT, and WDIOC_SETPRETIMEOUT fail, the error path continues to handler watchdog timer until user terminates it. When ioctl returns error, it might not be safe to let the watchdog tick. The error could be due an unsupported ioctl command or some other error. Fix it to handle error paths as oneshot to stop the watchdog ticks and exit right away. Signed-off-by: Shuah Khan (Samsung OSG) commit 7514c39cf1d9433203c9b7c6674dbfa429db804b Author: Jerry Hoemann Date: Wed Sep 26 15:23:09 2018 -0600 selftests: watchdog: Add gettimeout and get|set pretimeout Add command line arguments to call ioctl WDIOC_GETTIMEOUT, WDIOC_GETPRETIMEOUT and WDIOC_SETPRETIMEOUT. Signed-off-by: Jerry Hoemann Signed-off-by: Shuah Khan (Samsung OSG) commit 04d5e4bd37516ad60854eb74592c7dbddd75d277 Author: Jerry Hoemann Date: Wed Sep 26 15:23:08 2018 -0600 selftests: watchdog: Fix error message. Printf's say errno but print the string version of error. Make consistent. Signed-off-by: Jerry Hoemann Signed-off-by: Shuah Khan (Samsung OSG) commit 9a244229a4b850b11952a0df79607c69b18fd8df Author: Shuah Khan (Samsung OSG) Date: Wed Sep 26 13:07:11 2018 -0600 selftests: watchdog: fix message when /dev/watchdog open fails When /dev/watchdog open fails, watchdog exits with "watchdog not enabled" message. This is incorrect when open fails due to insufficient privilege. Fix message to clearly state the reason when open fails with EACCESS when a non-root user runs it. Signed-off-by: Shuah Khan (Samsung OSG) commit 8ffade754bdf8350f63792c6125346d77f975b41 Author: Masami Hiramatsu Date: Thu Aug 30 23:25:39 2018 +0900 selftests/ftrace: Add ftrace cpumask testcase Add a testcase for tracing_cpumask with function tracer. Signed-off-by: Masami Hiramatsu Signed-off-by: Shuah Khan (Samsung OSG) commit c575dea2c1a50306d382615fad06767564734e0b Author: Masami Hiramatsu Date: Thu Aug 30 23:25:11 2018 +0900 selftests/ftrace: Add wakeup_rt tracer testcase Add a testcase for wakeup_rt tracer. This requires chrt command to test. Signed-off-by: Masami Hiramatsu Signed-off-by: Shuah Khan (Samsung OSG) commit c1edd060b41383bb6fa76008aacf4b0b3b1c46e7 Author: Masami Hiramatsu Date: Thu Aug 30 23:24:42 2018 +0900 selftests/ftrace: Add wakeup tracer testcase Add a testcase for wakeup tracer. Signed-off-by: Masami Hiramatsu Signed-off-by: Shuah Khan (Samsung OSG) commit 91ae08a265142d9378f7d972e00de29d5c91a2de Author: Masami Hiramatsu Date: Thu Aug 30 23:24:14 2018 +0900 selftests/ftrace: Add stacktrace ftrace filter command testcase Add a test case for stacktrace filter command for ftrace. Signed-off-by: Masami Hiramatsu Signed-off-by: Shuah Khan (Samsung OSG) commit 174fd823397a2f19905a20bbcf47907e30e58444 Author: Masami Hiramatsu Date: Thu Aug 30 23:23:46 2018 +0900 selftests/ftrace: Add trace_pipe testcase Add a simple testcase for trace_pipe which can consume ringbuffer. Signed-off-by: Masami Hiramatsu Signed-off-by: Shuah Khan (Samsung OSG) commit 7bc026d6c0328f49469a56168b50ff7a498a5810 Author: Masami Hiramatsu Date: Thu Aug 30 23:23:18 2018 +0900 selftests/ftrace: Add function filter on module testcase Add a testcase for function filter on module. Signed-off-by: Masami Hiramatsu Signed-off-by: Shuah Khan (Samsung OSG) commit 47c509d30db4cef11a406f87279633cd21380163 Author: Masami Hiramatsu Date: Thu Aug 30 23:22:49 2018 +0900 selftests/ftrace: Add max stack tracer testcase Add a testcase for max stack tracer, which checks basic max stack usage tracing and its filter feature. Signed-off-by: Masami Hiramatsu Signed-off-by: Shuah Khan (Samsung OSG) commit 5b56a07b9c461bb4db26797c82d6ac3be0f83a94 Author: Masami Hiramatsu Date: Thu Aug 30 23:22:21 2018 +0900 selftests/ftrace: Add function profiling stat testcase Add a testcase for function profiling per-cpu statistics interface. There is already func_profile.tc, but that is mainly focusing on the combination of function-profiler and function tracer. This testcase ensures trace_stat per-cpu function statistics is correctly updated. Signed-off-by: Masami Hiramatsu Acked-by: Steven Rostedt (VMware) Signed-off-by: Shuah Khan (Samsung OSG) commit c21ceceae94dc22f5b42c8174efa4597a0c990de Author: Masami Hiramatsu Date: Thu Aug 30 23:21:53 2018 +0900 selftests/ftrace: Add ringbuffer size changing testcase Add a testcase for changing ringbuffer size. This tests not only ringbuffer size but also tests the imbalance per-cpu buffer size change too. Signed-off-by: Masami Hiramatsu Acked-by: Steven Rostedt (VMware) Signed-off-by: Shuah Khan (Samsung OSG) commit 4d23e9b4fd2e44f10d22b9d2ba1dfb3fff8cd9d5 Author: Masami Hiramatsu Date: Thu Aug 30 23:21:25 2018 +0900 selftests/ftrace: Add trace_printk sample module test Add trace_printk sample module test. This requires to enable trace_printk.ko module for test. Signed-off-by: Masami Hiramatsu Signed-off-by: Shuah Khan (Samsung OSG) commit 873b4af2103fbd1bb7895be202a58878254d89bc Author: Masami Hiramatsu Date: Thu Aug 30 23:20:56 2018 +0900 selftests/ftrace: Add kprobe-event with symbol argument test Add a testcase for kprobe-event with @symbol argument. Since @symbol needs to refer the kernel data symbol (linux_proc_banner), it requires CONFIG_KALLSYMS_ALL. Signed-off-by: Masami Hiramatsu Signed-off-by: Shuah Khan (Samsung OSG) commit 32f6e5da83c7f06db7e4efbdacdbc59c16fd6ecb Author: Masami Hiramatsu Date: Thu Aug 30 23:20:28 2018 +0900 selftests/ftrace: Add kprobe profile testcase Add a testcase for testing kprobe_profile interface which provides per-kprobe event hit/misshit counts. Signed-off-by: Masami Hiramatsu Signed-off-by: Shuah Khan (Samsung OSG) commit b0898e84851c96248c376897c96f3fde3ff7e3b5 Author: Masami Hiramatsu Date: Thu Aug 30 23:19:59 2018 +0900 selftests/ftrace: Add kprobe event with $comm argument testcase Add kprobe-event with $comm argument testcase to ftracetest. This not only checks syntax but also checks log file. Signed-off-by: Masami Hiramatsu Signed-off-by: Shuah Khan (Samsung OSG) commit ddbc31e63aef5e7d12f28f3ac4742420bd5b274c Author: Masami Hiramatsu Date: Thu Aug 30 23:19:31 2018 +0900 selftests/ftrace: Check set_event_pid result Ensure the set_event_pid shows set pid list. Signed-off-by: Masami Hiramatsu Signed-off-by: Shuah Khan (Samsung OSG) commit 00b2f2bc3aacb658c44dcb76e004423b6a6380eb Author: Masami Hiramatsu Date: Thu Aug 30 23:19:03 2018 +0900 selftests/ftrace: Test kprobe-event argument with various bitsize Improve the kprobe-event with argument types testcase to test it with various bitsize. kprobe-event argument can be recorded in given types with various bitsize (8, 16, 32, 64), thus the type testcase should test the different bitsize too. Signed-off-by: Masami Hiramatsu Signed-off-by: Shuah Khan (Samsung OSG) commit 1e51263ef4e637199b725df6811f0d2bea70156c Author: Masami Hiramatsu Date: Thu Aug 30 23:18:35 2018 +0900 selftests/ftrace: Improve kretprobe testcase to check log data Improve kretprobe testcase to check the log data correctness and ensure the event definition is corrctly including argument definition. Signed-off-by: Masami Hiramatsu Signed-off-by: Shuah Khan (Samsung OSG) commit e42e5c46b07d09b6b985ceea954eae165103c7ed Author: Masami Hiramatsu Date: Thu Aug 30 23:18:06 2018 +0900 selftests/ftrace: Improve kprobe testcase to check log data Improve kprobe testcase to check the log data correctness and ensure the event definition is corrctly including argument definition. Signed-off-by: Masami Hiramatsu Signed-off-by: Shuah Khan (Samsung OSG) commit af2a0750f374935c07b8beab78d6032b1ca2218d Author: Masami Hiramatsu Date: Thu Aug 30 23:17:38 2018 +0900 selftests/ftrace: Improve kprobe on module testcase to load/unload module Improve kprobe events on module testcase to check module load/unload with disabled/enabled events. This also change the target module to trace_printk.ko, so it depends on CONFIG_SAMPLE_TRACE_PRINTK=m. Signed-off-by: Masami Hiramatsu Signed-off-by: Shuah Khan (Samsung OSG) commit cec3adf5f57160d829a033bcb578c3dd0a90c693 Author: Masami Hiramatsu Date: Thu Aug 30 23:17:10 2018 +0900 selftests/ftrace: Use loopback address instead of localhost Use raw loopback address instead of localhost, because "localhost" can depend on nsswitch and in some case we can not resolve the localhost. Signed-off-by: Masami Hiramatsu Signed-off-by: Shuah Khan (Samsung OSG) commit 72ce3daf92ba4f5bae6e91095d40e67b367c6b2f Author: Masami Hiramatsu Date: Thu Aug 30 23:16:41 2018 +0900 selftests/ftrace: Fix checkbashisms errors Fix a test case to make checkbashisms clean. Signed-off-by: Masami Hiramatsu Acked-by: Steven Rostedt (VMware) Signed-off-by: Shuah Khan (Samsung OSG) commit 2452c96e617a0ff6fb2692e55217a3fa57a7322c Author: Masami Hiramatsu Date: Thu Aug 30 23:16:13 2018 +0900 selftests/ftrace: Fix to test kprobe $comm arg only if available Test $comm in kprobe-event argument syntax testcase only if it is supported on the kernel because $comm has been introduced 4.8 kernel. So on older stable kernel, it should be skipped. Signed-off-by: Masami Hiramatsu Signed-off-by: Shuah Khan (Samsung OSG) commit e527c47081c7e2795ffc3201809de9545cc25830 Author: Masami Hiramatsu Date: Thu Aug 30 23:15:44 2018 +0900 selftests/ftrace: Remove unneeded per-test init/cleanup ftrace Since ftracetest framework calls initialize_ftrace() right before each test and after all tests, we don't need to init/cleanup ftrace for each test case. Just remove such unneeded init/cleanup code because it can increase logfile size. Signed-off-by: Masami Hiramatsu Signed-off-by: Shuah Khan (Samsung OSG) commit 9768cc46d39a029f7da47beea449d023b377103d Author: Masami Hiramatsu Date: Thu Aug 30 23:15:16 2018 +0900 selftests/ftrace: Cleanup ftrace after running test Cleanup ftrace by initialize_ftrace() after running all test cases. This means we also don't need cleanup ftrace on each test case, except for some special options. Signed-off-by: Masami Hiramatsu Signed-off-by: Shuah Khan (Samsung OSG) commit 3a96a9d0a4e985e80280357393d86ff4401eeff7 Author: Masami Hiramatsu Date: Thu Aug 30 23:14:48 2018 +0900 selftests/ftrace: Add SPDX License Identifier to template Add SPDX License Identifier line to template file so that someone who makes new testcase from the template does not forgot it. Signed-off-by: Masami Hiramatsu Signed-off-by: Shuah Khan (Samsung OSG) commit 7590472e78c8fbe1383aba30450655fd6415fa7b Author: Masami Hiramatsu Date: Thu Aug 30 23:14:19 2018 +0900 selftests/ftrace: More initialize features in initialize_ftrace Clear pid filter, synthetic_events, snapshots, ftrace filter, and trace log in initialize_ftrace(), since those are used in test cases. Signed-off-by: Masami Hiramatsu Acked-by: Steven Rostedt (VMware) Signed-off-by: Shuah Khan (Samsung OSG) commit 7d0abba4293e555a5b1a6ea060cddd05f4ee357f Author: Masami Hiramatsu Date: Thu Aug 30 23:13:51 2018 +0900 selftests/ftrace: Add case number prefix to logfile Add a case number prefix to each logfile. This makes it easier to find which logfile is corresponding to which failure. Signed-off-by: Masami Hiramatsu Acked-by: Steven Rostedt (VMware) Signed-off-by: Shuah Khan (Samsung OSG) commit 5d1c6580d616dfc864ffdec587e645e50a21c072 Author: Masami Hiramatsu Date: Thu Aug 30 23:13:23 2018 +0900 selftests/ftrace: Add --console hidden option Add --console hidden option for debug test cases. This option allows to put "sh" or something else when the test case hits a bug. For example, if you find a testcase which doesn't pass, you can insert sh for interactive debug as below ----- #!/bin/sh # description: sample test case good-command suspicious-wrong-command sh # <- add this for interactive debug ----- Signed-off-by: Masami Hiramatsu Signed-off-by: Shuah Khan (Samsung OSG) commit 9d954f9519707bc0af29ead8b1dedc660306da1b Author: Masami Hiramatsu Date: Thu Aug 30 23:12:55 2018 +0900 selftests/ftrace: Add --stop-fail hidden option for debug Add --stop-fail option for debugging the ftracetest. With this option, ftracetest stops right after a testcase fails instead of finish running all testcases. Signed-off-by: Masami Hiramatsu Acked-by: Steven Rostedt (VMware) Signed-off-by: Shuah Khan (Samsung OSG) commit f3aaaaaae2633281ad2a4d9b835d4093f0b0a2c8 Author: Anirudh Venkataramanan Date: Thu Oct 18 08:37:03 2018 -0700 ice: Make ice_msix_clean_rings static commit 158a08a694c4e ("ice: remove ndo_poll_controller") removed ice_netpoll and introduced a namespace warning for ice_msix_clean_rings. Fix the namespace warning by making ice_msix_clean_rings static. Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit fe57120e18a1f9124ca758c89cc54f91333d1847 Author: Andi Kleen Date: Mon Sep 24 10:07:32 2018 -0700 perf script: Support total cycles count For 'perf script' brstackinsn also print a running cycles count. This makes it easier to calculate cycle deltas for code sections measured with LBRs. % perf record -b -a sleep 1 % perf script -F +brstackinsn ... 00007f73ecc41083 insn: 74 06 # PRED 9 cycles [17] 1.11 IPC 00007f73ecc4108b insn: a8 10 00007f73ecc4108d insn: 74 71 # PRED 1 cycles [18] 1.00 IPC 00007f73ecc41100 insn: 48 8b 46 10 00007f73ecc41104 insn: 4c 8b 38 00007f73ecc41107 insn: 4d 85 ff 00007f73ecc4110a insn: 0f 84 b0 00 00 00 00007f73ecc41110 insn: 83 43 58 01 00007f73ecc41114 insn: 48 89 df 00007f73ecc41117 insn: e8 94 73 04 00 # PRED 6 cycles [24] 1.00 IPC Signed-off-by: Andi Kleen Acked-by: Jiri Olsa Cc: Andi Kleen Link: http://lkml.kernel.org/r/20180924170732.GA28040@tassilo.jf.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 99f753f048b3f02f31a56951781672021af6cd0d Author: Andi Kleen Date: Thu Sep 20 11:05:39 2018 -0700 perf script: Implement --graph-function Add a ftrace style --graph-function argument to 'perf script' that allows to print itrace function calls only below a given function. This makes it easier to find the code of interest in a large trace. % perf record -e intel_pt//k -a sleep 1 % perf script --graph-function group_sched_in --call-trace perf 900 [000] 194167.205652203: ([kernel.kallsyms]) group_sched_in perf 900 [000] 194167.205652203: ([kernel.kallsyms]) __x86_indirect_thunk_rax perf 900 [000] 194167.205652203: ([kernel.kallsyms]) event_sched_in.isra.107 perf 900 [000] 194167.205652203: ([kernel.kallsyms]) perf_event_set_state.part.71 perf 900 [000] 194167.205652203: ([kernel.kallsyms]) perf_event_update_time perf 900 [000] 194167.205652203: ([kernel.kallsyms]) perf_pmu_disable perf 900 [000] 194167.205652203: ([kernel.kallsyms]) perf_log_itrace_start perf 900 [000] 194167.205652203: ([kernel.kallsyms]) __x86_indirect_thunk_rax perf 900 [000] 194167.205652203: ([kernel.kallsyms]) perf_event_update_userpage perf 900 [000] 194167.205652203: ([kernel.kallsyms]) calc_timer_values perf 900 [000] 194167.205652203: ([kernel.kallsyms]) sched_clock_cpu perf 900 [000] 194167.205652203: ([kernel.kallsyms]) __x86_indirect_thunk_rax perf 900 [000] 194167.205652203: ([kernel.kallsyms]) arch_perf_update_userpage perf 900 [000] 194167.205652203: ([kernel.kallsyms]) __fentry__ perf 900 [000] 194167.205652203: ([kernel.kallsyms]) using_native_sched_clock perf 900 [000] 194167.205652203: ([kernel.kallsyms]) sched_clock_stable perf 900 [000] 194167.205652203: ([kernel.kallsyms]) perf_pmu_enable perf 900 [000] 194167.205652203: ([kernel.kallsyms]) __x86_indirect_thunk_rax swapper 0 [001] 194167.205660693: ([kernel.kallsyms]) group_sched_in swapper 0 [001] 194167.205660693: ([kernel.kallsyms]) __x86_indirect_thunk_rax swapper 0 [001] 194167.205660693: ([kernel.kallsyms]) event_sched_in.isra.107 swapper 0 [001] 194167.205660693: ([kernel.kallsyms]) perf_event_set_state.part.71 swapper 0 [001] 194167.205660693: ([kernel.kallsyms]) perf_event_update_time swapper 0 [001] 194167.205660693: ([kernel.kallsyms]) perf_pmu_disable swapper 0 [001] 194167.205660693: ([kernel.kallsyms]) perf_log_itrace_start swapper 0 [001] 194167.205660693: ([kernel.kallsyms]) __x86_indirect_thunk_rax swapper 0 [001] 194167.205660693: ([kernel.kallsyms]) perf_event_update_userpage swapper 0 [001] 194167.205660693: ([kernel.kallsyms]) calc_timer_values swapper 0 [001] 194167.205660693: ([kernel.kallsyms]) sched_clock_cpu swapper 0 [001] 194167.205660693: ([kernel.kallsyms]) __x86_indirect_thunk_rax swapper 0 [001] 194167.205660693: ([kernel.kallsyms]) arch_perf_update_userpage swapper 0 [001] 194167.205660693: ([kernel.kallsyms]) __fentry__ swapper 0 [001] 194167.205660693: ([kernel.kallsyms]) using_native_sched_clock swapper 0 [001] 194167.205660693: ([kernel.kallsyms]) sched_clock_stable Signed-off-by: Andi Kleen Tested-by: Arnaldo Carvalho de Melo Tested-by: Leo Yan Acked-by: Jiri Olsa Cc: Kim Phillips Link: http://lkml.kernel.org/r/20180920180540.14039-5-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo commit d1b1552e15d41297abcaf3812378e3391d44fa6b Author: Andi Kleen Date: Thu Sep 20 11:05:38 2018 -0700 tools script: Add --call-trace and --call-ret-trace Add short cut options to print PT call trace and call-ret-trace, for calls and call and returns. Roughly corresponds to ftrace function tracer and function graph tracer. Just makes these common use cases nicer to use. % perf record -a -e intel_pt// sleep 1 % perf script --call-trace perf 900 [000] 194167.205652203: ([kernel.kallsyms]) perf_pmu_enable perf 900 [000] 194167.205652203: ([kernel.kallsyms]) __x86_indirect_thunk_rax perf 900 [000] 194167.205652203: ([kernel.kallsyms]) event_filter_match perf 900 [000] 194167.205652203: ([kernel.kallsyms]) group_sched_in perf 900 [000] 194167.205652203: ([kernel.kallsyms]) __x86_indirect_thunk_rax perf 900 [000] 194167.205652203: ([kernel.kallsyms]) event_sched_in.isra.107 perf 900 [000] 194167.205652203: ([kernel.kallsyms]) perf_event_set_state.part.71 perf 900 [000] 194167.205652203: ([kernel.kallsyms]) perf_event_update_time perf 900 [000] 194167.205652203: ([kernel.kallsyms]) perf_pmu_disable perf 900 [000] 194167.205652203: ([kernel.kallsyms]) perf_log_itrace_start perf 900 [000] 194167.205652203: ([kernel.kallsyms]) __x86_indirect_thunk_rax perf 900 [000] 194167.205652203: ([kernel.kallsyms]) perf_event_update_userpage % perf script --call-ret-trace perf 900 [000] 194167.205652203: tr strt ([unknown]) pt_config perf 900 [000] 194167.205652203: return ([kernel.kallsyms]) pt_config perf 900 [000] 194167.205652203: return ([kernel.kallsyms]) pt_event_add perf 900 [000] 194167.205652203: call ([kernel.kallsyms]) perf_pmu_enable perf 900 [000] 194167.205652203: return ([kernel.kallsyms]) perf_pmu_nop_void perf 900 [000] 194167.205652203: return ([kernel.kallsyms]) event_sched_in.isra.107 perf 900 [000] 194167.205652203: call ([kernel.kallsyms]) __x86_indirect_thunk_rax perf 900 [000] 194167.205652203: return ([kernel.kallsyms]) perf_pmu_nop_int perf 900 [000] 194167.205652203: return ([kernel.kallsyms]) group_sched_in perf 900 [000] 194167.205652203: call ([kernel.kallsyms]) event_filter_match perf 900 [000] 194167.205652203: return ([kernel.kallsyms]) event_filter_match perf 900 [000] 194167.205652203: call ([kernel.kallsyms]) group_sched_in perf 900 [000] 194167.205652203: call ([kernel.kallsyms]) __x86_indirect_thunk_rax perf 900 [000] 194167.205652203: return ([kernel.kallsyms]) perf_pmu_nop_txn perf 900 [000] 194167.205652203: call ([kernel.kallsyms]) event_sched_in.isra.107 perf 900 [000] 194167.205652203: call ([kernel.kallsyms]) perf_event_set_state.part.71 Signed-off-by: Andi Kleen Tested-by: Arnaldo Carvalho de Melo Tested-by: Leo Yan Acked-by: Jiri Olsa Cc: Kim Phillips Link: http://lkml.kernel.org/r/20180920180540.14039-4-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo commit 4eb068157121939f4bc16256a37bcd88f5554123 Author: Andi Kleen Date: Thu Sep 20 11:05:37 2018 -0700 perf script: Make itrace script default to all calls By default 'perf script' for itrace outputs sampled instructions or branches. In my experience this is confusing to users because it's hard to correlate with real program behavior. The sampling makes sense for tools like 'perf report' that actually sample to reduce the run time, but run time is normally not a problem for 'perf script'. It's better to give an accurate representation of the program flow. Default 'perf script' to output all calls for itrace. That's a much saner default. The old behavior can be still requested with 'perf script' --itrace=ibxwpe100000 v2: Fix ETM build failure v3: Really fix ETM build failure (Kim Phillips) Signed-off-by: Andi Kleen Acked-by: Jiri Olsa Cc: Kim Phillips Cc: Leo Yan Link: http://lkml.kernel.org/r/20180920180540.14039-3-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo commit b585ebdb5912cf1438d4822f79aaebe36a2d123a Author: Andi Kleen Date: Thu Sep 20 11:05:36 2018 -0700 perf script: Add --insn-trace for instruction decoding Add a --insn-trace short hand option for decoding and disassembling instruction streams for intel_pt. This automatically pipes the output into the xed disassembler to generate disassembled instructions. This just makes this use model much nicer to use. Before % perf record -e intel_pt// ... % perf script --itrace=i0ns --ns -F +insn,-event,-period | xed -F insn: -A -64 swapper 0 [000] 17276.429606186: ffffffff81010486 pt_config ([kernel.kallsyms]) nopl %eax, (%rax,%rax,1) swapper 0 [000] 17276.429606186: ffffffff8101048b pt_config ([kernel.kallsyms]) add $0x10, %rsp swapper 0 [000] 17276.429606186: ffffffff8101048f pt_config ([kernel.kallsyms]) popq %rbx swapper 0 [000] 17276.429606186: ffffffff81010490 pt_config ([kernel.kallsyms]) popq %rbp swapper 0 [000] 17276.429606186: ffffffff81010491 pt_config ([kernel.kallsyms]) popq %r12 swapper 0 [000] 17276.429606186: ffffffff81010493 pt_config ([kernel.kallsyms]) popq %r13 swapper 0 [000] 17276.429606186: ffffffff81010495 pt_config ([kernel.kallsyms]) popq %r14 swapper 0 [000] 17276.429606186: ffffffff81010497 pt_config ([kernel.kallsyms]) popq %r15 swapper 0 [000] 17276.429606186: ffffffff81010499 pt_config ([kernel.kallsyms]) retq swapper 0 [000] 17276.429606186: ffffffff8101063e pt_event_add ([kernel.kallsyms]) cmpl $0x1, 0x1b0(%rbx) swapper 0 [000] 17276.429606186: ffffffff81010645 pt_event_add ([kernel.kallsyms]) mov $0xffffffea, %eax swapper 0 [000] 17276.429606186: ffffffff8101064a pt_event_add ([kernel.kallsyms]) mov $0x0, %edx swapper 0 [000] 17276.429606186: ffffffff8101064f pt_event_add ([kernel.kallsyms]) popq %rbx swapper 0 [000] 17276.429606186: ffffffff81010650 pt_event_add ([kernel.kallsyms]) cmovnz %edx, %eax swapper 0 [000] 17276.429606186: ffffffff81010653 pt_event_add ([kernel.kallsyms]) jmp 0xffffffff81010635 swapper 0 [000] 17276.429606186: ffffffff81010635 pt_event_add ([kernel.kallsyms]) retq swapper 0 [000] 17276.429606186: ffffffff8115e687 event_sched_in.isra.107 ([kernel.kallsyms]) test %eax, %eax Now: % perf record -e intel_pt// ... % perf script --insn-trace --xed ... same output ... XED needs to be installed with: $ git clone https://github.com/intelxed/mbuild.git mbuild $ git clone https://github.com/intelxed/xed $ cd xed $ ./mfile.py $ ./mfile.py examples $ sudo ./mfile.py --prefix=/usr/local install $ sudo cp obj/examples/xed /usr/local/bin $ xed | head -3 ERROR: required argument(s) were missing Copyright (C) 2017, Intel Corporation. All rights reserved. XED version: [v10.0-328-g7d62c8c49b7b] $ Signed-off-by: Andi Kleen Tested-by: Arnaldo Carvalho de Melo Acked-by: Jiri Olsa Link: http://lkml.kernel.org/r/20180920180540.14039-2-andi@firstfloor.org [ Fixed up whitespace damage, added the 'mfile.py examples + cp obj/examples/xed ... ] Signed-off-by: Arnaldo Carvalho de Melo commit 01aa9d518eae8a4d75cd3049defc6ed0b6d0a658 Merge: 5993692f0958 aea74de4b216 Author: Linus Torvalds Date: Wed Oct 24 18:01:11 2018 +0100 Merge tag 'docs-4.20' of git://git.lwn.net/linux Pull documentation updates from Jonathan Corbet: "This is a fairly typical cycle for documentation. There's some welcome readability improvements for the formatted output, some LICENSES updates including the addition of the ISC license, the removal of the unloved and unmaintained 00-INDEX files, the deprecated APIs document from Kees, more MM docs from Mike Rapoport, and the usual pile of typo fixes and corrections" * tag 'docs-4.20' of git://git.lwn.net/linux: (41 commits) docs: Fix typos in histogram.rst docs: Introduce deprecated APIs list kernel-doc: fix declaration type determination doc: fix a typo in adding-syscalls.rst docs/admin-guide: memory-hotplug: remove table of contents doc: printk-formats: Remove bogus kobject references for device nodes Documentation: preempt-locking: Use better example dm flakey: Document "error_writes" feature docs/completion.txt: Fix a couple of punctuation nits LICENSES: Add ISC license text LICENSES: Add note to CDDL-1.0 license that it should not be used docs/core-api: memory-hotplug: add some details about locking internals docs/core-api: rename memory-hotplug-notifier to memory-hotplug docs: improve readability for people with poorer eyesight yama: clarify ptrace_scope=2 in Yama documentation docs/vm: split memory hotplug notifier description to Documentation/core-api docs: move memory hotplug description into admin-guide/mm doc: Fix acronym "FEKEK" in ecryptfs docs: fix some broken documentation references iommu: Fix passthrough option documentation ... commit 5993692f09582accb4cb7af11d344598af43c3b8 Merge: d6edff78fe9e 33458eaba4df Author: Linus Torvalds Date: Wed Oct 24 17:42:24 2018 +0100 Merge tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 Pull ext4 updates from Ted Ts'o: - further restructure ext4 documentation - fix up ext4's delayed allocation for bigalloc file systems - fix up some syzbot-detected races in EXT4_IOC_MOVE_EXT, EXT4_IOC_SWAP_BOOT, and ext4_remount - ... and a few other miscellaneous bugs and optimizations. * tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: (21 commits) ext4: fix use-after-free race in ext4_remount()'s error path ext4: cache NULL when both default_acl and acl are NULL docs: promote the ext4 data structures book to top level docs: move ext4 administrative docs to admin-guide/ jbd2: fix use after free in jbd2_log_do_checkpoint() ext4: propagate error from dquot_initialize() in EXT4_IOC_FSSETXATTR ext4: fix setattr project check in fssetxattr ioctl docs: make ext4 readme tables readable docs: fix ext4 documentation table formatting problems docs: generate a separate ext4 pdf file from the documentation ext4: convert fault handler to use vm_fault_t type ext4: initialize retries variable in ext4_da_write_inline_data_begin() ext4: fix EXT4_IOC_SWAP_BOOT ext4: fix build error when DX_DEBUG is defined ext4: fix argument checking in EXT4_IOC_MOVE_EXT ext4: fix reserved cluster accounting at page invalidation time ext4: adjust reserved cluster count when removing extents ext4: reduce reserved cluster count by number of allocated clusters ext4: fix reserved cluster accounting at delayed write time ext4: add new pending reservation mechanism ... commit d6edff78fe9e34dbea1bec7dc26cfce92c6d96d5 Merge: fe0142df648f 78130819695f Author: Linus Torvalds Date: Wed Oct 24 17:39:36 2018 +0100 Merge tag 'f2fs-for-4.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs Pull f2fs updates from Jaegeuk Kim: "In this round, we've added 1) superblock checksum feature, 2) implemented new mount option which we can disable/enable checkpoint to provide atomic updates of entire filesystem, 3) refactored quota operations to enhance its consistency along with checkpoint, 4) fixed subtle IO hang conditions and roll-forward recovery flow to resurrect any fsync'ed inode metadata. Enhancements: - add checksum to keep superblock contents more safe - add checkpoint=disable/enable to support A/B update of entire filesystem - use plug for readahead IO in readdir - add more IO counts to avoid block layer hacks Bug fixes: - prevent data corruption issue for hardware encryption - fix IO hang issues when GC is heavily triggered - add missing up_read in __write_node_page - recover inode metadata during roll-forward recovery flow - fix null pointer dereference issue in wrongly configured discard map There are some more sanity checks and minor bug fixes as well" * tag 'f2fs-for-4.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs: (62 commits) f2fs: fix to keep project quota consistent f2fs: guarantee journalled quota data by checkpoint f2fs: cleanup dirty pages if recover failed f2fs: fix data corruption issue with hardware encryption f2fs: fix to recover inode->i_flags of inode block during POR f2fs: spread f2fs_set_inode_flags() f2fs: fix to spread clear_cold_data() Revert "f2fs: fix to clear PG_checked flag in set_page_dirty()" f2fs: account read IOs and use IO counts for is_idle f2fs: fix to account IO correctly for cgroup writeback f2fs: fix to account IO correctly f2fs: remove request_list check in is_idle() f2fs: allow to mount, if quota is failed f2fs: update REQ_TIME in f2fs_cross_rename() f2fs: do not update REQ_TIME in case of error conditions f2fs: remove unneeded disable_nat_bits() f2fs: remove unused sbi->trigger_ssr_threshold f2fs: shrink sbi->sb_lock coverage in set_file_temperature() f2fs: use rb_*_cached friends f2fs: fix to recover cold bit of inode block during POR ... commit fe0142df648f5478f410c41e01771b90b9793215 Merge: bfd93a87eadb 96987eea537d Author: Linus Torvalds Date: Wed Oct 24 17:36:12 2018 +0100 Merge tag 'xfs-4.20-merge-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pul xfs updates from Dave Chinner: "There's not a huge amount of change in this cycle - Darrick has been out of action for a couple of months (hence me sending the last few pull requests), so we decided a quiet cycle mainly focussed on bug fixes was a good idea. Darrick will take the helm again at the end of this merge window. FYI, I may be sending another update later in the cycle - there's a pending rework of the clone/dedupe_file_range code that fixes numerous bugs that is spread amongst the VFS, XFS and ocfs2 code. It has been reviewed and tested, Al and I just need to work out the details of the merge, so it may come from him rather than me. Summary: - only support filesystems with unwritten extents - add definition for statfs XFS magic number - remove unused parameters around reflink code - more debug for dangling delalloc extents - cancel COW extents on extent swap targets - fix quota stats output and clean up the code - refactor some of the attribute code in preparation for parent pointers - fix several buffer handling bugs" * tag 'xfs-4.20-merge-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: (21 commits) xfs: cancel COW blocks before swapext xfs: clear ail delwri queued bufs on unmount of shutdown fs xfs: use offsetof() in place of offset macros for __xfsstats xfs: Fix xqmstats offsets in /proc/fs/xfs/xqmstat xfs: fix use-after-free race in xfs_buf_rele xfs: Add attibute remove and helper functions xfs: Add attibute set and helper functions xfs: Add helper function xfs_attr_try_sf_addname xfs: Move fs/xfs/xfs_attr.h to fs/xfs/libxfs/xfs_attr.h xfs: issue log message on user force shutdown xfs: fix buffer state management in xrep_findroot_block xfs: always assign buffer verifiers when one is provided xfs: xrep_findroot_block should reject root blocks with siblings xfs: add a define for statfs magic to uapi xfs: print dangling delalloc extents xfs: fix fork selection in xfs_find_trim_cow_extent xfs: remove the unused trimmed argument from xfs_reflink_trim_around_shared xfs: remove the unused shared argument to xfs_reflink_reserve_cow xfs: handle zeroing in xfs_file_iomap_begin_delay xfs: remove suport for filesystems without unwritten extent flag ... commit bfd93a87eadb03499a5ff02dfebfaf515310d27c Merge: e1cbbf406782 8e31582a9ab1 Author: Linus Torvalds Date: Wed Oct 24 17:30:39 2018 +0100 Merge tag 'gfs2-4.20.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2 Pull gfs2 updates from Bob Peterson: "We've got 18 patches for this merge window, none of which are very major: - clean up the gfs2 block allocator to prepare for future performance enhancements (Andreas Gruenbacher) - fix a use-after-free problem (Andy Price) - patches that fix gfs2's broken rgrplvb mount option (me) - cleanup patches and error message improvements (me) - enable getlabel support (Steve Whitehouse and Abhi Das) - flush the glock delete workqueue at exit (Tim Smith)" * tag 'gfs2-4.20.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2: gfs2: Fix minor typo: couln't versus couldn't. gfs2: write revokes should traverse sd_ail1_list in reverse gfs2: Pass resource group to rgblk_free gfs2: Remove unnecessary gfs2_rlist_alloc parameter gfs2: Fix marking bitmaps non-full gfs2: Fix some minor typos gfs2: Rename bitmap.bi_{len => bytes} gfs2: Remove unused RGRP_RSRV_MINBYTES definition gfs2: Move rs_{sizehint, rgd_gh} fields into the inode gfs2: Clean up out-of-bounds check in gfs2_rbm_from_block gfs2: Always check the result of gfs2_rbm_from_block gfs2: getlabel support GFS2: Flush the GFS2 delete workqueue before stopping the kernel threads gfs2: Don't leave s_fs_info pointing to freed memory in init_sbd gfs2: Use fs_* functions instead of pr_* function where we can gfs2: slow the deluge of io error messages gfs2: Don't set GFS2_RDF_UPTODATE when the lvb is updated gfs2: improve debug information when lvb mismatches are found commit e1cbbf4067820ea4df534dd96f51c8f67854dcad Merge: 6b609e3b0068 22fc9db296fc Author: Linus Torvalds Date: Wed Oct 24 17:28:03 2018 +0100 Merge tag 'for-linus-4.20-ofs1' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux Pull orangefs updates from Mike Marshall: "Fixes and a cleanup. Fixes: - fix superfluous service_operation return code check in orangefs_lookup - fix some error code paths that missed kmem_cache_free - don't let orangefs_iget return NULL - don't let orangefs_new_inode return NULL - cache NULL when both default_acl and acl are NULL Cleanup: - rate limit the client not running info message" * tag 'for-linus-4.20-ofs1' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux: orangefs: no need to check for service_operation returns > 0 orangefs: some error code paths missed kmem_cache_free orangefs: don't let orangefs_iget return NULL. orangefs: don't let orangefs_new_inode return NULL orangefs: rate limit the client not running info message orangefs: cache NULL when both default_acl and acl are NULL commit 6b609e3b0068d29c676e8f1c6d2c0d503d18fea1 Merge: deba28b12bcb 3df629d873f8 Author: Linus Torvalds Date: Wed Oct 24 17:24:04 2018 +0100 Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull vfs fixes from Al Viro. * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: gfs2_meta: ->mount() can get NULL dev_name ecryptfs_rename(): verify that lower dentries are still OK after lock_rename() cachefiles: fix the race between cachefiles_bury_object() and rmdir(2) commit deba28b12bcb5e11c6f6689f4edd96eea4929162 Merge: 318b067a5dd6 1390643d1d5c Author: Linus Torvalds Date: Wed Oct 24 17:22:16 2018 +0100 Merge tag 'jfs-for-4.20' of git://github.com/kleikamp/linux-shaggy Pull jfs updates from David Kleikamp: "Just a few small fixes" * tag 'jfs-for-4.20' of git://github.com/kleikamp/linux-shaggy: jfs: remove redundant dquot_initialize() in jfs_evict_inode() jfs: remove quota option from ignore list jfs: cache NULL when both default_acl and acl are NULL commit 318b067a5dd649d198c2ba00cf7408d778fc00b4 Merge: 44adbac8f721 d9352794dad9 Author: Linus Torvalds Date: Wed Oct 24 17:15:26 2018 +0100 Merge tag 'for-4.20-part1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs updates from David Sterba: "This is the first batch with fixes and some nice performance improvements. Preliminary results show eg. more files/sec in fsmark, better perf on multi-threaded workloads (filebench, dbench), fewer context switches and overall better memory allocation characteristics (multiple benchmarks). Apart from general performance, there's an improvement for qgroups + balance workload that's been troubling our users. Note for stable: there are 20+ patches tagged for stable, out of 90. Not all of them apply cleanly on all stable versions but the conflicts are mostly due to simple cleanups and resolving should be obvious. The fixes are otherwise independent. Performance improvements: - transition between blocking and spinning modes of path is gone, which originally resulted to more unnecessary wakeups and updates to the path locks, the effects are measurable and improve latency and scalability - qgroups: first batch of changes that should speedup balancing with qgroups on, skip quota accounting on unchanged subtrees, overall gain is about 30+% in runtime - use rb-tree with cached first node for several structures, small improvement to avoid pointer chasing Fixes: - trim - fix: some blockgroups could have been missed if their logical address was past the total filesystem size (ie. after a lot of balancing) - better error reporting, after processing blockgroups and whole device - fix: continue trimming block groups after an error is encountered - check for trim support of the device earlier and avoid some unnecessary work - less interaction with transaction commit that improves latency on slower storage (eg. image files over NFS) - fsync - fix warning when replaying log after fsync of a O_TMPFILE - fix wrong dentries after fsync of file that got its parent replaced - qgroups: fix rescan that might misc some dirty groups - don't clean dirty pages during buffered writes, this could lead to lost updates in some corner cases - some block groups could have been delayed in creation, if the allocation triggered another one - error handling improvements Cleanups: - removed unused struct members and variables - function return type cleanups - delayed refs code refactoring - protect against deadlock that could be caused by crafted image that tries to allocate from a tree that's locked already" * tag 'for-4.20-part1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: (93 commits) btrfs: switch return_bigger to bool in find_ref_head btrfs: remove fs_info from btrfs_should_throttle_delayed_refs btrfs: remove fs_info from btrfs_check_space_for_delayed_refs btrfs: delayed-ref: pass delayed_refs directly to btrfs_delayed_ref_lock btrfs: delayed-ref: pass delayed_refs directly to btrfs_select_ref_head btrfs: qgroup: move the qgroup->members check out from (!qgroup)'s else branch btrfs: relocation: Remove redundant tree level check btrfs: relocation: Cleanup while loop using rbtree_postorder_for_each_entry_safe btrfs: qgroup: Avoid calling qgroup functions if qgroup is not enabled Btrfs: fix wrong dentries after fsync of file that got its parent replaced Btrfs: fix warning when replaying log after fsync of a tmpfile btrfs: drop min_size from evict_refill_and_join btrfs: assert on non-empty delayed iputs btrfs: make sure we create all new block groups btrfs: reset max_extent_size on clear in a bitmap btrfs: protect space cache inode alloc with GFP_NOFS btrfs: release metadata before running delayed refs Btrfs: kill btrfs_clear_path_blocking btrfs: dev-replace: remove pointless assert in write unlock btrfs: dev-replace: move replace members out of fs_info ... commit 44adbac8f7217040be97928cd19998259d9d4418 Merge: 08ffb584d9eb ce5a983191ce Author: Linus Torvalds Date: Wed Oct 24 14:43:41 2018 +0100 Merge branch 'work.tty-ioctl' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull tty ioctl updates from Al Viro: "This is the compat_ioctl work related to tty ioctls. Quite a bit of dead code taken out, all tty-related stuff gone from fs/compat_ioctl.c. A bunch of compat bugs fixed - some still remain, but all more or less generic tty-related ioctls should be covered (remaining issues are in things like driver-private ioctls in a pcmcia serial card driver not getting properly handled in 32bit processes on 64bit host, etc)" * 'work.tty-ioctl' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (53 commits) kill TIOCSERGSTRUCT change semantics of ldisc ->compat_ioctl() kill TIOCSER[SG]WILD synclink_gt(): fix compat_ioctl() pty: fix compat ioctls compat_ioctl - kill keyboard ioctl handling gigaset: add ->compat_ioctl() vt_compat_ioctl(): clean up, use compat_ptr() properly gigaset: don't try to printk userland buffer contents dgnc: don't bother with (empty) stub for TCXONC dgnc: leave TIOC[GS]SOFTCAR to ldisc remove fallback to drivers for TIOCGICOUNT dgnc: break-related ioctls won't reach ->ioctl() kill the rest of tty COMPAT_IOCTL() entries dgnc: TIOCM... won't reach ->ioctl() isdn_tty: TCSBRK{,P} won't reach ->ioctl() kill capinc_tty_ioctl() take compat TIOC[SG]SERIAL treatment into tty_compat_ioctl() synclink: reduce pointless checks in ->ioctl() complete ->[sg]et_serial() switchover ... commit 08ffb584d9eb17940321317ef6c9c7383ad4f149 Merge: 638820d8da8e 1227daa43bce Author: Linus Torvalds Date: Wed Oct 24 14:42:02 2018 +0100 Merge tag 'pstore-v4.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull pstore updates from Kees Cook: "pstore improvements: - refactor init to happen as early as possible again (Joel Fernandes) - improve resource reservation names" * tag 'pstore-v4.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: pstore/ram: Clarify resource reservation labels pstore: Refactor compression initialization pstore: Allocate compression during late_initcall() pstore: Centralize init/exit routines commit 38f876bb2d621bfbcc6636c0317121137e9f2afc Author: Steve French Date: Sun Sep 23 19:06:33 2018 -0500 cifs: update internal module version number for cifs.ko to 2.14 Update version reported in "modinfo cifs" Signed-off-by: Steve French commit 43de1db36424fd21bbcfbe11a018f25c1566f246 Author: Steve French Date: Tue Oct 23 21:04:57 2018 -0500 smb3: add debug for unexpected mid cancellation We have hit this intermittently, increase the verbosity of warning message on unexpected mid cancellation. Signed-off-by: Steve French commit 32a1fb36f6e50183871c2c1fcf5493c633e84732 Author: Ronnie Sahlberg Date: Wed Oct 24 11:50:33 2018 +1000 cifs: allow calling SMB2_xxx_free(NULL) Change these free functions to allow passing NULL as the argument and treat it as a no-op just like free(NULL) would. Or, if rqst->rq_iov is NULL. The second scenario could happen for smb2_queryfs() if the call to SMB2_query_info_init() fails and we go to qfs_exit to clean up and free all resources. In that case we have not yet assigned rqst[2].rq_iov and thus the rq_iov dereference in SMB2_close_free() will cause a NULL pointer dereference. Fixes: 1eb9fb52040f ("cifs: create SMB2_open_init()/SMB2_open_free() helpers") Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French Reviewed-by: Aurelien Aptel CC: Stable commit 54edeb0327d7320e2a9a3e517e8bc8f318d41a77 Merge: d2130e82e945 431bca24308c Author: Petr Mladek Date: Wed Oct 24 13:59:05 2018 +0200 Merge branch 'for-4.20-vsprintf-hash-fixes' into for-linus commit 638820d8da8ededd6dc609beaef02d5396599c03 Merge: d5e4d81da4d4 3f6caaf5ff33 Author: Linus Torvalds Date: Wed Oct 24 11:49:35 2018 +0100 Merge branch 'next-general' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security Pull security subsystem updates from James Morris: "In this patchset, there are a couple of minor updates, as well as some reworking of the LSM initialization code from Kees Cook (these prepare the way for ordered stackable LSMs, but are a valuable cleanup on their own)" * 'next-general' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: LSM: Don't ignore initialization failures LSM: Provide init debugging infrastructure LSM: Record LSM name in struct lsm_info LSM: Convert security_initcall() into DEFINE_LSM() vmlinux.lds.h: Move LSM_TABLE into INIT_DATA LSM: Convert from initcall to struct lsm_info LSM: Remove initcall tracing LSM: Rename .security_initcall section to .lsm_info vmlinux.lds.h: Avoid copy/paste of security_init section LSM: Correctly announce start of LSM initialization security: fix LSM description location keys: Fix the use of the C++ keyword "private" in uapi/linux/keyctl.h seccomp: remove unnecessary unlikely() security: tomoyo: Fix obsolete function security/capabilities: remove check for -EINVAL commit f9776280c29e77a18cbc7ebb6d48f7885e494990 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 (cherry picked from commit f24f6eb95807bca0dbd8dc5b2f3a4099000f4472) Fixes: 399334708b4f ("drm/i915: Re-apply "Perform link quality check, unconditionally during long pulse"") Cc: stable@vger.kernel.org Signed-off-by: Joonas Lahtinen commit d5e4d81da4d443d54b0b5c28ba6d26be297c509b Merge: ba9f6f8954af 4458bba09788 Author: Linus Torvalds Date: Wed Oct 24 11:47:32 2018 +0100 Merge tag 'selinux-pr-20181022' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux Pull SELinux updates from Paul Moore: "Three SELinux patches for v4.20, all fall under the bug-fix or behave-better category, which is good. All three have pretty good descriptions too, which is even better" * tag 'selinux-pr-20181022' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux: selinux: Add __GFP_NOWARN to allocation at str_read() selinux: refactor mls_context_to_sid() and make it stricter selinux: fix mounting of cgroup2 under older policies commit 22a7cdcae6a4a3c8974899e62851d270956f58ce Author: KarimAllah Ahmed Date: Sat Oct 20 23:42:59 2018 +0200 KVM/nVMX: Do not validate that posted_intr_desc_addr is page aligned The spec only requires the posted interrupt descriptor address to be 64-bytes aligned (i.e. bits[0:5] == 0). Using page_address_valid also forces the address to be page aligned. Only validate that the address does not cross the maximum physical address without enforcing a page alignment. Cc: Paolo Bonzini Cc: Radim Krčmář Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: H. Peter Anvin Cc: x86@kernel.org Cc: kvm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Fixes: 6de84e581c0 ("nVMX x86: check posted-interrupt descriptor addresss on vmentry of L2") Signed-off-by: KarimAllah Ahmed Reviewed-by: Jim Mattson Reviewed-by: Krish Sadhuhan Signed-off-by: Radim Krčmář commit 49af5d95b9b3c21a84ad115a9db9acbc036d849a 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 (cherry picked from commit 9ebd8202393dde9d3678c9ec162c1aa63ba17eac) Fixes: 399334708b4f ("drm/i915: Re-apply "Perform link quality check, unconditionally during long pulse"") Cc: stable@vger.kernel.org Signed-off-by: Joonas Lahtinen commit 3511ba7d4ca6f39e2d060bb94e42a41ad1fee7bf Author: Keiji Hayashibara Date: Wed Oct 24 18:34:29 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 409fa67a7f4a68f6990955849c22eaca589f18c0 Author: kbuild test robot Date: Tue Oct 23 20:20:22 2018 +0800 ASoC: stm32: sai: fix noderef.cocci warnings sound/soc/stm/stm32_sai_sub.c:393:26-32: ERROR: application of sizeof to pointer sizeof when applied to a pointer typed expression gives the size of the pointer Generated by: scripts/coccinelle/misc/noderef.cocci Fixes: 8307b2afd386 ("ASoC: stm32: sai: set sai as mclk clock provider") CC: Olivier Moysan Signed-off-by: kbuild test robot Signed-off-by: Mark Brown commit ba9f6f8954afa5224e3ed60332f7b92242b7ed0f Merge: a978a5b8d83f a36700589b85 Author: Linus Torvalds Date: Wed Oct 24 11:22:39 2018 +0100 Merge branch 'siginfo-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace Pull siginfo updates from Eric Biederman: "I have been slowly sorting out siginfo and this is the culmination of that work. The primary result is in several ways the signal infrastructure has been made less error prone. The code has been updated so that manually specifying SEND_SIG_FORCED is never necessary. The conversion to the new siginfo sending functions is now complete, which makes it difficult to send a signal without filling in the proper siginfo fields. At the tail end of the patchset comes the optimization of decreasing the size of struct siginfo in the kernel from 128 bytes to about 48 bytes on 64bit. The fundamental observation that enables this is by definition none of the known ways to use struct siginfo uses the extra bytes. This comes at the cost of a small user space observable difference. For the rare case of siginfo being injected into the kernel only what can be copied into kernel_siginfo is delivered to the destination, the rest of the bytes are set to 0. For cases where the signal and the si_code are known this is safe, because we know those bytes are not used. For cases where the signal and si_code combination is unknown the bits that won't fit into struct kernel_siginfo are tested to verify they are zero, and the send fails if they are not. I made an extensive search through userspace code and I could not find anything that would break because of the above change. If it turns out I did break something it will take just the revert of a single change to restore kernel_siginfo to the same size as userspace siginfo. Testing did reveal dependencies on preferring the signo passed to sigqueueinfo over si->signo, so bit the bullet and added the complexity necessary to handle that case. Testing also revealed bad things can happen if a negative signal number is passed into the system calls. Something no sane application will do but something a malicious program or a fuzzer might do. So I have fixed the code that performs the bounds checks to ensure negative signal numbers are handled" * 'siginfo-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace: (80 commits) signal: Guard against negative signal numbers in copy_siginfo_from_user32 signal: Guard against negative signal numbers in copy_siginfo_from_user signal: In sigqueueinfo prefer sig not si_signo signal: Use a smaller struct siginfo in the kernel signal: Distinguish between kernel_siginfo and siginfo signal: Introduce copy_siginfo_from_user and use it's return value signal: Remove the need for __ARCH_SI_PREABLE_SIZE and SI_PAD_SIZE signal: Fail sigqueueinfo if si_signo != sig signal/sparc: Move EMT_TAGOVF into the generic siginfo.h signal/unicore32: Use force_sig_fault where appropriate signal/unicore32: Generate siginfo in ucs32_notify_die signal/unicore32: Use send_sig_fault where appropriate signal/arc: Use force_sig_fault where appropriate signal/arc: Push siginfo generation into unhandled_exception signal/ia64: Use force_sig_fault where appropriate signal/ia64: Use the force_sig(SIGSEGV,...) in ia64_rt_sigreturn signal/ia64: Use the generic force_sigsegv in setup_frame signal/arm/kvm: Use send_sig_mceerr signal/arm: Use send_sig_fault where appropriate signal/arm: Use force_sig_fault where appropriate ... commit 769d6bfc74c1f02333dd5f9a438df3346aded56f Author: Stefano Stabellini Date: Wed Oct 17 21:44:45 2018 +0800 add myself as reviewer for Xen support in Linux It would be good for me to keep an eye on the patches that touch Xen support in Linux to try to spot changes that break Xen on ARM early on. Signed-off-by: Stefano Stabellini Reviewed-by: Boris Ostrovsky Signed-off-by: Juergen Gross commit f1db0050483cd3d63bb7b2e8c8a772501d52031b Author: Bartlomiej Zolnierkiewicz Date: Tue Oct 16 16:33:58 2018 +0200 xen: 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 Reviewed-by: Juergen Gross Signed-off-by: Juergen Gross commit 217188d9f985bd3ce8c9a0cd50ca35be62d0f8c6 Author: Bartlomiej Zolnierkiewicz Date: Wed Oct 24 11:26:32 2018 +0200 video: fbdev: remove redundant 'default n' from Kconfig-s '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. ... Acked-by: Randy Dunlap Signed-off-by: Bartlomiej Zolnierkiewicz commit ca6d73f97f92167dedfc31740606c99045df85c9 Author: Bartlomiej Zolnierkiewicz Date: Wed Oct 24 11:26:32 2018 +0200 video: fbdev: remove dead old CLPS711x LCD support driver Since commit c86f51737f8d ("ARM: clps711x: Switch to MULTIPLATFORM") ARCH_CLPS711X depends on ARCH_MULTIPLATFORM to be enabled so the old CLPS711x LCD support driver (enabled by the FB_CLPS711X_OLD config option) can't be selected any longer. Remove all FB_CLPS711XX_OLD code as it has been dead for over 2 years now. Please note that the new CLPS711x LCD support driver (enabled by the FB_CLPS711X config option) is still available in the kernel tree. Reviewed-by: Alexander Shiyan Signed-off-by: Bartlomiej Zolnierkiewicz commit 3aa6c19d2f38be9c6e9a8ad5fa8e3c9d29ee3c35 Author: Boris Ostrovsky Date: Sun Oct 7 16:05:38 2018 -0400 xen/balloon: Support xend-based toolstack Xend-based toolstacks don't have static-max entry in xenstore. The equivalent node for those toolstacks is memory_static_max. Fixes: 5266b8e4445c (xen: fix booting ballooned down hvm guest) Signed-off-by: Boris Ostrovsky Cc: # 4.13 Reviewed-by: Juergen Gross Signed-off-by: Juergen Gross commit 7deecbda3026f5e2a8cc095d7ef7261a920efcf2 Author: Roger Pau Monne Date: Tue Oct 9 12:32:37 2018 +0200 xen/pvh: increase early stack size While booting on an AMD EPYC box the stack canary would detect stack overflows when using the current PVH early stack size (256). Switch to using the value defined by BOOT_STACK_SIZE, which prevents the stack overflow. Cc: # 4.11 Signed-off-by: Roger Pau Monné Reviewed-by: Juergen Gross Signed-off-by: Juergen Gross commit a856531951dc8094359dfdac21d59cee5969c18e Author: Juergen Gross Date: Mon Oct 1 07:57:42 2018 +0200 xen: make xen_qlock_wait() nestable xen_qlock_wait() isn't safe for nested calls due to interrupts. A call of xen_qlock_kick() might be ignored in case a deeper nesting level was active right before the call of xen_poll_irq(): CPU 1: CPU 2: spin_lock(lock1) spin_lock(lock1) -> xen_qlock_wait() -> xen_clear_irq_pending() Interrupt happens spin_unlock(lock1) -> xen_qlock_kick(CPU 2) spin_lock_irqsave(lock2) spin_lock_irqsave(lock2) -> xen_qlock_wait() -> xen_clear_irq_pending() clears kick for lock1 -> xen_poll_irq() spin_unlock_irq_restore(lock2) -> xen_qlock_kick(CPU 2) wakes up spin_unlock_irq_restore(lock2) IRET resumes in xen_qlock_wait() -> xen_poll_irq() never wakes up The solution is to disable interrupts in xen_qlock_wait() and not to poll for the irq in case xen_qlock_wait() is called in nmi context. Cc: stable@vger.kernel.org Cc: Waiman.Long@hp.com Cc: peterz@infradead.org Signed-off-by: Juergen Gross Reviewed-by: Jan Beulich Signed-off-by: Juergen Gross commit 2ac2a7d4d9ff4e01e36f9c3d116582f6f655ab47 Author: Juergen Gross Date: Mon Oct 1 07:57:42 2018 +0200 xen: fix race in xen_qlock_wait() In the following situation a vcpu waiting for a lock might not be woken up from xen_poll_irq(): CPU 1: CPU 2: CPU 3: takes a spinlock tries to get lock -> xen_qlock_wait() frees the lock -> xen_qlock_kick(cpu2) -> xen_clear_irq_pending() takes lock again tries to get lock -> *lock = _Q_SLOW_VAL -> *lock == _Q_SLOW_VAL ? -> xen_poll_irq() frees the lock -> xen_qlock_kick(cpu3) And cpu 2 will sleep forever. This can be avoided easily by modifying xen_qlock_wait() to call xen_poll_irq() only if the related irq was not pending and to call xen_clear_irq_pending() only if it was pending. Cc: stable@vger.kernel.org Cc: Waiman.Long@hp.com Cc: peterz@infradead.org Signed-off-by: Juergen Gross Reviewed-by: Jan Beulich Signed-off-by: Juergen Gross commit af320de90ec864bb78fdbc9c0c3e99f28d1aab0f Author: Geert Uytterhoeven Date: Wed Sep 26 10:43:13 2018 +0200 xen/balloon: Grammar s/Is it/It is/ Signed-off-by: Geert Uytterhoeven Signed-off-by: Juergen Gross commit ea9e57d06e48239e19f67769703aa48554f6648b Author: Jason Andryuk Date: Tue Sep 25 07:36:55 2018 -0400 xen: Make XEN_BACKEND selectable by DomU XEN_BACKEND doesn't actually depend on XEN_DOM0. DomUs can serve backends to other DomUs. One example is a service VM providing network backends. The original Kconfig defaulted Dom0 to y and it could be disabled. DomU could not select the option. With the new Kconfig, we default y for Dom0 and n for DomU. Either can then toggle the selection. Signed-off-by: Jason Andryuk Reviewed-by: Boris Ostrovsky Signed-off-by: Juergen Gross commit 71f021cf6de822ac49a790509683fbb4a06ce4bf Merge: 4b4447bfadd0 cc832dc8e327 Author: Vinod Koul Date: Wed Oct 24 09:16:33 2018 +0100 Merge branch 'topic/stm' into for-linus commit 4b4447bfadd0e12aa975c45d953ef6c34eb2e5cd Merge: 8e75ab9bd835 4ac695464763 Author: Vinod Koul Date: Wed Oct 24 09:16:27 2018 +0100 Merge branch 'topic/sprd' into for-linus commit 8e75ab9bd835bd29bc9f3a587d8e2799009d301a Merge: bfda90208708 97d49c59e219 Author: Vinod Koul Date: Wed Oct 24 09:16:22 2018 +0100 Merge branch 'topic/renesas' into for-linus commit bfda9020870824c497c674901142f836c199dde9 Merge: 4fa7393bda7b a3e403161fe1 Author: Vinod Koul Date: Wed Oct 24 09:16:18 2018 +0100 Merge branch 'topic/owl' into for-linus commit 4fa7393bda7b558f8ff546ebad51a445da86cd58 Merge: ca36ed0c4547 5ab64902b5f9 Author: Vinod Koul Date: Wed Oct 24 09:16:14 2018 +0100 Merge branch 'topic/of' into for-linus commit ca36ed0c4547e954f8cac9dfc5a647fb4dbd243c Merge: 81c3ee027e5d cbc229a47c82 Author: Vinod Koul Date: Wed Oct 24 09:16:08 2018 +0100 Merge branch 'topic/mv' into for-linus commit 81c3ee027e5d79eb184d2b225a67b06e9e5b9271 Merge: b29cf44398a9 d426c517a742 Author: Vinod Koul Date: Wed Oct 24 09:16:04 2018 +0100 Merge branch 'topic/jz' into for-linus commit b29cf44398a93ae6ea9122f9b722faad0d280981 Merge: 9b01029dc093 f4d34aa8c887 Author: Vinod Koul Date: Wed Oct 24 09:15:59 2018 +0100 Merge branch 'topic/intel' into for-linus commit 9b01029dc093262c6ad7fde6940916f154168496 Merge: 11b73fcf3a3a 0e819e3564c0 Author: Vinod Koul Date: Wed Oct 24 09:15:52 2018 +0100 Merge branch 'topic/fsl' into for-linus commit 11b73fcf3a3aee7f70dc48eb4fb471a938dbf55e Merge: b8bb45cbb387 5658f4f94cca Author: Vinod Koul Date: Wed Oct 24 09:15:48 2018 +0100 Merge branch 'topic/dw' into for-linus commit b8bb45cbb3873f38715471726530eedf39a13ac7 Merge: edc329fbb8de a436ff1e96b9 Author: Vinod Koul Date: Wed Oct 24 09:15:43 2018 +0100 Merge branch 'topic/dmam' into for-linus commit edc329fbb8de57afd144632cdb0749c7da27810a Merge: e1b5c26e254a 314448f0386f Author: Vinod Koul Date: Wed Oct 24 09:15:37 2018 +0100 Merge branch 'topic/dirn_remove' into for-linus commit e1b5c26e254af3f4f59cdddb91c21b48c2c34b2c Merge: 27d8d2d7a9b7 d8570d018f69 Author: Vinod Koul Date: Wed Oct 24 09:15:32 2018 +0100 Merge branch 'topic/at' into for-linus commit a978a5b8d83f795e107a2ff759b28643739be70e Author: Linus Torvalds Date: Wed Oct 24 08:11:35 2018 +0100 net/kconfig: Make QCOM_QMI_HELPERS available when COMPILE_TEST The networking merge brought in the experimental support for the Qualcomm ath10k system NOC, which selects QCOM_QMI_HELPERS as a dependency. But the ATH10K_SNOC option (which selects QCOM_QMI_HELPERS) depends on ARCH_QCOM || COMPILE_TEST in order to get wider build testing than just the unusual QCOM architecture build, while the QCOM_QMI_HELPERS option doesn't have that COMPILE_TEST option and is limited to only ARCH_QCOM. As a result, a "make allmodconfig" complains WARNING: unmet direct dependencies detected for QCOM_QMI_HELPERS Depends on [n]: ARCH_QCOM && NET [=y] Selected by [m]: - ATH10K_SNOC [=m] && NETDEVICES [=y] && WLAN [=y] && WLAN_VENDOR_ATH [=y] && ATH10K [=m] && (ARCH_QCOM || COMPILE_TEST [=y]) Fix the config-time warning by making QCOM_QMI_HELPERS available when COMPILE_TEST, since the result seems to build fine. Cc: Bjorn Andersson Cc: Govind Singh Cc: Kalle Valo Cc: David Miller Signed-off-by: Linus Torvalds commit 50b825d7e87f4cff7070df6eb26390152bb29537 Merge: a97a2d4d56ea 3f80e08f40cd Author: Linus Torvalds Date: Wed Oct 24 06:47:44 2018 +0100 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next Pull networking updates from David Miller: 1) Add VF IPSEC offload support in ixgbe, from Shannon Nelson. 2) Add zero-copy AF_XDP support to i40e, from Björn Töpel. 3) All in-tree drivers are converted to {g,s}et_link_ksettings() so we can get rid of the {g,s}et_settings ethtool callbacks, from Michal Kubecek. 4) Add software timestamping to veth driver, from Michael Walle. 5) More work to make packet classifiers and actions lockless, from Vlad Buslov. 6) Support sticky FDB entries in bridge, from Nikolay Aleksandrov. 7) Add ipv6 version of IP_MULTICAST_ALL sockopt, from Andre Naujoks. 8) Support batching of XDP buffers in vhost_net, from Jason Wang. 9) Add flow dissector BPF hook, from Petar Penkov. 10) i40e vf --> generic iavf conversion, from Jesse Brandeburg. 11) Add NLA_REJECT netlink attribute policy type, to signal when users provide attributes in situations which don't make sense. From Johannes Berg. 12) Switch TCP and fair-queue scheduler over to earliest departure time model. From Eric Dumazet. 13) Improve guest receive performance by doing rx busy polling in tx path of vhost networking driver, from Tonghao Zhang. 14) Add per-cgroup local storage to bpf 15) Add reference tracking to BPF, from Joe Stringer. The verifier can now make sure that references taken to objects are properly released by the program. 16) Support in-place encryption in TLS, from Vakul Garg. 17) Add new taprio packet scheduler, from Vinicius Costa Gomes. 18) Lots of selftests additions, too numerous to mention one by one here but all of which are very much appreciated. 19) Support offloading of eBPF programs containing BPF to BPF calls in nfp driver, frm Quentin Monnet. 20) Move dpaa2_ptp driver out of staging, from Yangbo Lu. 21) Lots of u32 classifier cleanups and simplifications, from Al Viro. 22) Add new strict versions of netlink message parsers, and enable them for some situations. From David Ahern. 23) Evict neighbour entries on carrier down, also from David Ahern. 24) Support BPF sk_msg verdict programs with kTLS, from Daniel Borkmann and John Fastabend. 25) Add support for filtering route dumps, from David Ahern. 26) New igc Intel driver for 2.5G parts, from Sasha Neftin et al. 27) Allow vxlan enslavement to bridges in mlxsw driver, from Ido Schimmel. 28) Add queue and stack map types to eBPF, from Mauricio Vasquez B. 29) Add back byte-queue-limit support to r8169, with all the bug fixes in other areas of the driver it works now! From Florian Westphal and Heiner Kallweit. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (2147 commits) tcp: add tcp_reset_xmit_timer() helper qed: Fix static checker warning Revert "be2net: remove desc field from be_eq_obj" Revert "net: simplify sock_poll_wait" net: socionext: Reset tx queue in ndo_stop net: socionext: Add dummy PHY register read in phy_write() net: socionext: Stop PHY before resetting netsec net: stmmac: Set OWN bit for jumbo frames arm64: dts: stratix10: Support Ethernet Jumbo frame tls: Add maintainers net: ethernet: ti: cpsw: unsync mcast entries while switch promisc mode octeontx2-af: Support for NIXLF's UCAST/PROMISC/ALLMULTI modes octeontx2-af: Support for setting MAC address octeontx2-af: Support for changing RSS algorithm octeontx2-af: NIX Rx flowkey configuration for RSS octeontx2-af: Install ucast and bcast pkt forwarding rules octeontx2-af: Add LMAC channel info to NIXLF_ALLOC response octeontx2-af: NPC MCAM and LDATA extract minimal configuration octeontx2-af: Enable packet length and csum validation octeontx2-af: Support for VTAG strip and capture ... commit a97a2d4d56ea596871b739d63d41b084733bd9fb Merge: 44786880df19 8dbc450f76dc Author: Linus Torvalds Date: Wed Oct 24 06:42:00 2018 +0100 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc Pull sparc updates from David Miller: "Mostly VDSO cleanups and optimizations" * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc: sparc: Several small VDSO vclock_gettime.c improvements. sparc: Validate VDSO for undefined symbols. sparc: Really use linker with LDFLAGS. sparc: Improve VDSO CFLAGS. sparc: Set DISABLE_BRANCH_PROFILING in VDSO CFLAGS. sparc: Don't bother masking out TICK_PRIV_BIT in VDSO code. sparc: Inline VDSO gettime code aggressively. sparc: Improve VDSO instruction patching. sparc: Fix parport build warnings. commit 3f80e08f40cdb308589a49077c87632fa4508b21 Author: Eric Dumazet Date: Tue Oct 23 11:54:16 2018 -0700 tcp: add tcp_reset_xmit_timer() helper With EDT model, SRTT no longer is inflated by pacing delays. This means that RTO and some other xmit timers might be setup incorrectly. This is particularly visible with either : - Very small enforced pacing rates (SO_MAX_PACING_RATE) - Reduced rto (from the default 200 ms) This can lead to TCP flows aborts in the worst case, or spurious retransmits in other cases. For example, this session gets far more throughput than the requested 80kbit : $ netperf -H 127.0.0.2 -l 100 -- -q 10000 MIGRATED TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 127.0.0.2 () port 0 AF_INET Recv Send Send Socket Socket Message Elapsed Size Size Size Time Throughput bytes bytes bytes secs. 10^6bits/sec 540000 262144 262144 104.00 2.66 With the fix : $ netperf -H 127.0.0.2 -l 100 -- -q 10000 MIGRATED TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 127.0.0.2 () port 0 AF_INET Recv Send Send Socket Socket Message Elapsed Size Size Size Time Throughput bytes bytes bytes secs. 10^6bits/sec 540000 262144 262144 104.00 0.12 EDT allows for better control of rtx timers, since TCP has a better idea of the earliest departure time of each skb in the rtx queue. We only have to eventually add to the timer the difference of the EDT time with current time. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit 35a908072311b8efce8467161ea870cd410a1d68 Author: Steve French Date: Fri Oct 19 21:21:37 2018 -0500 smb3 - clean up debug output displaying network interfaces Make the output of /proc/fs/cifs/DebugData a little easier to read by cleaning up the listing of network interfaces removing a wasted line break. Here is a comparison of the network interface information that from be viewed at the end of output from "cat /proc/fs/cifs/DebugData" Before: Server interfaces: 8 0) Speed: 10000000000 bps Capabilities: rss IPv6: fe80:0000:0000:0000:2cf5:407e:84b0:21dd 1) Speed: 1000000000 bps Capabilities: IPv6: fe80:0000:0000:0000:61cd:6147:3d0c:f484 vs. after: Server interfaces: 11 0) Speed: 10000000000 bps Capabilities: rss IPv6: fe80:0000:0000:0000:2cf5:407e:84b0:21dd 1) Speed: 2000000000 bps Capabilities: IPv6: fe80:0000:0000:0000:3d76:2d05:dcf8:ed10 Signed-off-by: Steve French commit fae8044c03c3c03e06b384a6122b78a6c3a0b6a7 Author: Steve French Date: Fri Oct 19 17:14:32 2018 -0500 smb3: show number of current open files in /proc/fs/cifs/Stats To allow better debugging (for example applications with handle leaks, or complex reconnect scenarios) display the number of open files (on the client) and number of open server file handles for each tcon in /proc/fs/cifs/Stats. Note that open files on server is one larger than local due to handle caching (in this case of the root of the share). In this example there are two local open files, and three (two file and one directory handle) open on the server. Sample output: $ cat /proc/fs/cifs/Stats Resources in use CIFS Session: 1 Share (unique mount targets): 2 SMB Request/Response Buffer: 1 Pool size: 5 SMB Small Req/Resp Buffer: 1 Pool size: 30 Operations (MIDs): 0 0 session 0 share reconnects Total vfs operations: 36 maximum at one time: 2 1) \\localhost\test SMBs: 69 Bytes read: 27 Bytes written: 0 Open files: 2 total (local), 3 open on server TreeConnects: 1 total 0 failed TreeDisconnects: 0 total 0 failed Creates: 19 total 0 failed Closes: 16 total 0 failed ... Signed-off-by: Steve French commit 8d8b26e58432cb2840048b9f8aea286be6f75de5 Author: Ronnie Sahlberg Date: Wed Oct 17 05:47:58 2018 +1000 cifs: add support for ioctl on directories We do not call cifs_open_file() for directories and thus we do not have a pSMBFile we can extract the FIDs from. Solve this by instead always using a compounded open/query/close for the passthrough ioctl. Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French commit 3b7960caceafdfc2cdfe2850487f8d091eb41144 Author: Steve French Date: Fri Oct 19 01:58:22 2018 -0500 cifs: fallback to older infolevels on findfirst queryinfo retry In cases where queryinfo fails, we have cases in cifs (vers=1.0) where with backupuid mounts we retry the query info with findfirst. This doesn't work to some NetApp servers which don't support WindowsXP (and later) infolevel 261 (SMB_FIND_FILE_ID_FULL_DIR_INFO) so in this case use other info levels (in this case it will usually be level 257, SMB_FIND_FILE_DIRECTORY_INFO). (Also fixes some indentation) See kernel bugzilla 201435 Signed-off-by: Steve French commit 1e77a8c204c9d1b655c61751b8ad0fde22421dbb Author: Steve French Date: Fri Oct 19 00:45:21 2018 -0500 smb3: do not attempt cifs operation in smb3 query info error path If backupuid mount option is sent, we can incorrectly retry (on access denied on query info) with a cifs (FindFirst) operation on an smb3 mount which causes the server to force the session close. We set backup intent on open so no need for this fallback. See kernel bugzilla 201435 Signed-off-by: Steve French CC: Stable Reviewed-by: Ronnie Sahlberg commit 61351d6d54e651ec4098445afa5ddc2092c4741a Author: Steve French Date: Fri Oct 19 00:32:41 2018 -0500 smb3: send backup intent on compounded query info When mounting with backupuid set, we should be setting CREATE_OPEN_BACKUP_INTENT flag on compounded opens as well, especially the case of compounded smb2_query_path_info. Signed-off-by: Steve French Reviewed-by: Ronnie Sahlberg commit 0cb012d1a0a9ead759112da141698a2078fbf2ce Author: Steve French Date: Thu Oct 11 01:01:02 2018 -0500 cifs: track writepages in vfs operation counters writepages and readpages operations did not call get/free_xid so the statistics for file copy could get confusing with "vfs operations" not increasing. Add get_xid and free_xid to cifs readpages and writepages functions. Signed-off-by: Steve French Reviewed-by: Ronnie Sahlberg commit f70556c8cae976e50ba9c27dd4c1a86b57efc17d Author: Gustavo A. R. Silva Date: Wed Oct 10 00:02:20 2018 +0200 smb2: fix uninitialized variable bug in smb2_ioctl_query_info There is a potential execution path in which variable *resp_buftype* is passed as an argument to function free_rsp_buf(), in which it is used in a comparison without being properly initialized previously. Fix this by initializing variable *resp_buftype* to CIFS_NO_BUFFER in order to avoid unpredictable or unintended results. Addresses-Coverity-ID: 1473971 ("Uninitialized scalar variable") Fixes: c5d25bdb2967 ("cifs: add IOCTL for QUERY_INFO passthrough to userspace") Signed-off-by: Gustavo A. R. Silva Signed-off-by: Steve French Reviewed-by: Ronnie Sahlberg commit f5b05d622a3e99e6a97a189fe500414be802a05c Author: Ronnie Sahlberg Date: Sun Oct 7 19:19:58 2018 -0500 cifs: add IOCTL for QUERY_INFO passthrough to userspace This allows userspace tools to query the raw info levels for cifs files and process the response in userspace. In particular this is useful for many of those data where there is no corresponding native data structure in linux. For example querying the security descriptor for a file and extract the SIDs. Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French commit 8c1beb9801293b175cfa0341e5df89581a87dc02 Author: Steve French Date: Sun Oct 7 13:52:18 2018 -0500 cifs: minor clarification in comments Clarify meaning (in comments) meaning of various options for debug messages in cifs.ko. Also fixed trivial formatting/style issue with previous patch. Signed-off-by: Steve French commit f80eaedd6c5978fdd31549446cfa4a7212522b8d Author: Rodrigo Freire Date: Sun Oct 7 12:21:26 2018 -0300 CIFS: Print message when attempting a mount Currently, no messages are printed when mounting a CIFS filesystem and no debug configuration is enabled. However, a CIFS mount information is valuable when troubleshooting and/or forensic analyzing a system and finding out if was a CIFS endpoint mount attempted. Other filesystems such as XFS, EXT* does issue a printk() when mounting their filesystems. A terse log message is printed only if cifsFYI is not enabled. Otherwise, the default full debug message is printed. In order to not clutter and classify correctly the event messages, these are logged as KERN_INFO level. Sample mount operations: [root@corinthians ~]# mount -o user=administrator //172.25.250.18/c$ /mnt (non-existent system) [root@corinthians ~]# mount -o user=administrator //172.25.250.19/c$ /mnt (Valid system) Kernel message log for the mount operations: [ 450.464543] CIFS: Attempting to mount //172.25.250.18/c$ [ 456.478186] CIFS VFS: Error connecting to socket. Aborting operation. [ 456.478381] CIFS VFS: cifs_mount failed w/return code = -113 [ 467.688866] CIFS: Attempting to mount //172.25.250.19/c$ Signed-off-by: Rodrigo Freire Signed-off-by: Steve French commit 9a0efeccfa7ea6a82585bb2def161de006396b7d Author: Rodrigo Freire Date: Sun Oct 7 12:21:25 2018 -0300 CIFS: Adds information-level logging function Currently, CIFS lacks a internal logging function that prints out data when CIFS_DEBUG=n. When CIFS_DEBUG=y, the only message level for CIFS events are KERN_ERR or KERN_DEBUG. This patch creates cifs_info(), which is useful for printing non-critical event messges, at either CIFS_DEBUG state. Signed-off-by: Rodrigo Freire Signed-off-by: Steve French commit 9645759ce6b39013231f4fa312834935c93fe5bc Author: Ronnie Sahlberg Date: Thu Oct 4 09:24:38 2018 +1000 cifs: OFD locks do not conflict with eachothers RHBZ 1484130 Update cifs_find_fid_lock_conflict() to recognize that ODF locks do not conflict with eachother. Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French commit ff526d86051f3689fe41e235ab962389d43999a9 Author: Long Li Date: Thu Sep 20 21:18:39 2018 +0000 CIFS: SMBD: Do not call ib_dereg_mr on invalidated memory registration It is not necessary to deregister a memory registration after it has been successfully invalidated. Signed-off-by: Long Li Signed-off-by: Steve French commit 6d3adb23becb7b14995f6171c1d9f7f3baab1c79 Author: Long Li Date: Thu Sep 20 21:18:38 2018 +0000 CIFS: pass page offsets on SMB1 read/write When issuing SMB1 read/write, pass the page offset to transport. Signed-off-by: Long Li Signed-off-by: Steve French commit ef2298a06d012973bbc592b86fe5ff730d4d0c63 Author: Garry McNulty Date: Wed Oct 3 20:51:21 2018 +0100 fs/cifs: fix uninitialised variable warnings In some error conditions, resp_buftype can be passed uninitialised to free_rsp_buf(), potentially resulting in a spurious debug message. If resp_buftype randomly had the value 1 (CIFS_SMALL_BUFFER) then this would log a debug message. The rsp pointer is initialised to NULL so there is no other side-effect. Detected by CoverityScan, CID 1438585 ("Uninitialized scalar variable") Detected by CoverityScan, CID 1438667 ("Uninitialized scalar variable") Detected by CoverityScan, CID 1438764 ("Uninitialized scalar variable") Signed-off-by: Garry McNulty Signed-off-by: Steve French Reviewed-by: Aurelien Aptel commit 179e44d49c2f6f4e90479f0a98d896e415742c96 Author: Steve French Date: Fri Sep 28 19:44:23 2018 -0500 smb3: add tracepoint for sending lease break responses to server Be able to log a ftrace message on success and/or failure of sending a lease break response to the server. Example output: TASK-PID CPU# |||| TIMESTAMP FUNCTION | | | |||| | | kworker/1:1-5681 [001] .... 11123.530457: smb3_lease_done: sid=0x291e3e0f tid=0x8ba43071 lease_key=0x1852ca0d3ecd9b55847750a86716fde lease_state=0x0 Signed-off-by: Steve French Reviewed-by: Aurelien Aptel commit 9b9c5bea0b960616d638711d0ecc270c3a074e7f Author: Steve French Date: Sat Sep 22 12:07:06 2018 -0500 cifs: do not return atime less than mtime In network file system it is fairly easy for server and client atime vs. mtime to get confused (and atime updated less frequently) which we noticed broke some apps which expect atime >= mtime Also ignore relatime mount option (rather than error on it) since relatime is basically what some network server fs are doing (relatime). Signed-off-by: Steve French Reviewed-by: Ronnie Sahlberg commit 3d621230b8a0c6616f32b86ec3f0bc3ead9eb5b8 Author: Steve French Date: Tue Sep 25 15:33:47 2018 -0500 smb3: update default requested iosize to 4MB from 1MB for recent dialects Modern servers often support 8MB as maximum i/o size, and we see some performance benefits (my testing showed 1 to 13% on write paths, and 1 to 3% on read paths for increasing the default to 4MB). If server doesn't support larger i/o size, during negotiate protocol it is already set correctly to the server's maximum if lower than 4MB. Signed-off-by: Steve French Reviewed-by: Ronnie Sahlberg commit 6e4d3bbe92120f8482d31e4138e5fc2983caec3e Author: Steve French Date: Sat Sep 22 11:25:04 2018 -0500 smb3: Add debug message later in smb2/smb3 reconnect path As we reset credits later in the reconnect path, useful to have optional (cifsFYI) debug message. Signed-off-by: Steve French Reviewed-by: Pavel Shilovsky commit 8393072bab060f0a05888ee31543175d44b5dde0 Author: Aurelien Aptel Date: Thu Sep 20 18:10:25 2018 -0700 CIFS: make 'nodfs' mount opt a superblock flag tcon->Flags is only used by SMB1 code and changing it is not permanent (you lose the setting on tcon reconnect). * Move the setting to superblock flags (per mount-points). * Make automount callback exit early when flag present * Make dfs resolving happening in mount syscall exit early if flag present Signed-off-by: Aurelien Aptel Signed-off-by: Steve French Acked-by: Pavel Shilovsky commit 9e1a37dad4f3b9f1d36d9fd27021bbd67fb8c85f Author: Steve French Date: Wed Sep 19 02:38:17 2018 -0500 smb3: track the instance of each session for debugging Each time we reconnect to the same server, bump an instance counter (and display in /proc/fs/cifs/DebugData) to make it easier to debug. Signed-off-by: Steve French Reviewed-by: Aurelien Aptel Reviewed-by: Pavel Shilovsky commit 37e6a7057607121485099e405eb528d416a5ced4 Author: Steve French Date: Wed Sep 19 02:02:58 2018 -0500 smb3: minor missing defines relating to reparse points Previously reserved dpen response field changed in smb3 Signed-off-by: Steve French Reviewed-by: Aurelien Aptel commit 00778e2294d560361e2ed4e94cc003351a2d82d9 Author: Steve French Date: Tue Sep 18 14:05:18 2018 -0500 smb3: add way to control slow response threshold for logging and stats /proc/fs/cifs/Stats when CONFIG_CIFS_STATS2 is enabled logs 'slow' responses, but depending on the server you are debugging a one second timeout may be too fast, so allow setting it to a larger number of seconds via new module parameter /sys/module/cifs/parameters/slow_rsp_threshold or via modprobe: slow_rsp_threshold:Amount of time (in seconds) to wait before logging that a response is delayed. Default: 1 (if set to 0 disables msg). (uint) Recommended values are 0 (disabled) to 32767 (9 hours) with the default remaining as 1 second. Signed-off-by: Steve French Reviewed-by: Aurelien Aptel commit 1c3a13a38a28c6ed84ff9220c1b8dadf5fbcf8a5 Author: Steve French Date: Tue Sep 18 04:07:45 2018 -0500 cifs: minor updates to module description for cifs.ko note smb3 (and common more modern servers) in the module description Signed-off-by: Steve French Reviewed-by: Ronnie Sahlberg commit 5a519bead49938aa0e3086bc753930d610fbd705 Author: Steve French Date: Sat Sep 15 14:07:09 2018 -0500 cifs: protect against server returning invalid file system block size For a network file system we generally prefer large i/o, but if the server returns invalid file system block/sector sizes in cifs (vers=1.0) QFSInfo then set block size to a default of a reasonable minimum (4K). Reported-by: Dan Carpenter Signed-off-by: Steve French Reviewed-by: Aurelien Aptel commit 2c887635cd6ab3af619dc2be94e5bf8f2e172b78 Author: Steve French Date: Sat Sep 15 23:04:41 2018 -0500 smb3: allow stats which track session and share reconnects to be reset Currently, "echo 0 > /proc/fs/cifs/Stats" resets all of the stats except the session and share reconnect counts. Fix it to reset those as well. CC: Stable Signed-off-by: Steve French Reviewed-by: Aurelien Aptel commit 4d5bdf28690a304e089ce750efc8b7dd718945c7 Author: Steve French Date: Tue Aug 28 16:14:21 2018 -0500 SMB3: Backup intent flag missing from compounded ops When "backup intent" is requested on the mount (e.g. backupuid or backupgid mount options), the corresponding flag was missing from some of the new compounding operations as well (now that open_query_close is gone). Related to kernel bugzilla #200953 Reported-and-tested-by: Signed-off-by: Steve French Reviewed-by: Ronnie Sahlberg commit 14e562ada2b152cdeb49a1aec40fac402d19f3ce Author: Ronnie Sahlberg Date: Mon Sep 3 13:33:50 2018 +1000 cifs: create a define for the max number of iov we need for a SMB2 set_info So we don't overflow the io vector arrays accidentally Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French commit bb435512cec806a8e4e1af2700a7a7848baed0b5 Author: Ronnie Sahlberg Date: Mon Sep 3 13:33:49 2018 +1000 cifs: change SMB2_OP_RENAME and SMB2_OP_HARDLINK to use compounding Get rid of smb2_open_op_close() as all operations are now migrated to smb2_compound_op(). Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French commit 3764cbd179f061ddb308cd58c1e9bbf987505a18 Author: Ronnie Sahlberg Date: Mon Sep 3 13:33:47 2018 +1000 cifs: remove the is_falloc argument to SMB2_set_eof We never pass is_falloc==true here anyway and if we ever need to support is_falloc in the future, SMB2_set_eof is such a trivial wrapper around send_set_info() that we can/should just create a differently named wrapper for that new functionality. Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French commit dcbf91035709e9b8490bba96995998f48ce85947 Author: Ronnie Sahlberg Date: Mon Sep 3 13:33:48 2018 +1000 cifs: change SMB2_OP_SET_INFO to use compounding Cuts number of network roundtrips significantly for some common syscalls Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French commit f7bfe04bf0dbc422cbb3d5cffe1601518116dad6 Author: Ronnie Sahlberg Date: Mon Sep 3 13:33:46 2018 +1000 cifs: change SMB2_OP_SET_EOF to use compounding This changes SMB2_OP_SET_EOF to use compounding in some situations. This is part of the path based API to truncate a file. Most of the time this will however not be invoked for SMB2 since cifs_set_file_size() will as far as I can tell almost always just open the file synchronously and switch to the handle based truncate code path, thus bypassing the compounding we add here. Rewriting cifs_set_file_size() and make that whole pile of code more compounding friendly, and also easier to read and understand, is a different project though and not for this patch. Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French commit c2e0fe3f5aae1f70a1ab402778819d2cacbaefa6 Author: Ronnie Sahlberg Date: Mon Sep 3 13:33:45 2018 +1000 cifs: make rmdir() use compounding This and previous patches drop the number of roundtrips we need for rmdir() from 6 to 2. Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French commit ba8ca116854abe19893b8287d15c781e73e72405 Author: Ronnie Sahlberg Date: Mon Sep 3 13:33:44 2018 +1000 cifs: create helpers for SMB2_set_info_init/free() so that we can use these later for compounded set-info calls. Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French commit 47dd9597df41f0f5cc6d86cffbbccce2d9e3a788 Author: Ronnie Sahlberg Date: Mon Sep 3 13:33:43 2018 +1000 cifs: change unlink to use a compound This,and previous patches, drops the number of roundtrips from five to two for unlink() Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French commit f733e3936da462265a155f4dd44a333e56d197ed Author: Ronnie Sahlberg Date: Mon Sep 3 13:33:42 2018 +1000 cifs: change mkdir to use a compound This with the previous patch changes mkdir() from needing 6 roundtrips to just 3. Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French commit c5a5f38f075cf7656a1d7ad2b40cbc19e48e9805 Author: Ronnie Sahlberg Date: Mon Sep 3 13:33:41 2018 +1000 cifs: add a smb2_compound_op and change QUERY_INFO to use it This turns most open/query-info/close patterns in cifs.ko to become compounds. This changes stat from using 3 roundtrips to just a single one. Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French commit cb5c2e63948451d38c977685fffc06e23beb4517 Author: Ronnie Sahlberg Date: Wed Oct 10 15:29:06 2018 +1000 cifs: fix a credits leak for compund commands When processing the mids for compounds we would only add credits based on the last successful mid in the compound which would leak credits and eventually triggering a re-connect. Fix this by splitting the mid processing part into two loops instead of one where the first loop just waits for all mids and then counts how many credits we were granted for the whole compound. Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French commit b340a4d4aa18691a6d8b0e747840b0cf30dc01cb Author: Steve French Date: Sat Sep 1 01:10:17 2018 -0500 smb3: add tracepoint to catch cases where credit refund of failed op overlaps reconnect Add tracepoint to catch potential cases where a pending operation overlapping a reconnect could fail and incorrectly refund its credits causing the client to think it has more credits available than the server thinks it does. Signed-off-by: Steve French Reviewed-by: Ronnie Sahlberg commit ce7fb50f92d78cf9cd35a520d293a4b791c8d7a1 Author: YueHaibing Date: Thu Sep 6 01:50:43 2018 +0000 cifs: remove set but not used variable 'cifs_sb' Fixes gcc '-Wunused-but-set-variable' warning: fs/cifs/ioctl.c: In function 'cifs_ioctl': fs/cifs/ioctl.c:164:23: warning: variable 'cifs_sb' set but not used [-Wunused-but-set-variable] Signed-off-by: YueHaibing Signed-off-by: Steve French commit d034feeb44b8a8fb473f1ba805db97787f54bf3a Author: YueHaibing Date: Mon Sep 10 01:33:06 2018 +0000 cifs: Use kmemdup rather than duplicating its implementation in smb311_posix_mkdir() Use kmemdup rather than duplicating its implementation Signed-off-by: YueHaibing Signed-off-by: Steve French commit d42c8a87d18b7f08325a695d00afa83cad876631 Author: Steve French Date: Thu Sep 13 15:12:34 2018 -0500 smb3: do not display confusing message on mount to Azure servers Some servers (e.g. Azure) return "STATUS_NOT_IMPLEMENTED" rather than "STATUS_INVALID_DEVICE_REQUEST" on query network interface info at mount. This shouldn't cause us to log a warning message automatically. Don't log this unless noisier cifsFYI is enabled. Signed-off-by: Steve French Reviewed-by: Ronnie Sahlberg commit 33279c305d071090e529febf043a8a02d2ab451a Author: YueHaibing Date: Sun Oct 21 09:50:54 2018 +0000 scsi: mvsas: Remove set but not used variable 'id' Fixes gcc '-Wunused-but-set-variable' warning: drivers/scsi/mvsas/mv_sas.c: In function 'mvs_work_queue': drivers/scsi/mvsas/mv_sas.c:1909:31: warning: variable 'id' set but not used [-Wunused-but-set-variable] It never used since introduction in commit 20b09c2992fe ("[SCSI] mvsas: add support for 94xx; layout change; bug fixes") Signed-off-by: YueHaibing Reviewed-by: John Garry Signed-off-by: Martin K. Petersen commit 2c309aeed62c25661eb2c7d4e4510613a1c7ffc2 Author: Bart Van Assche Date: Thu Oct 18 15:45:46 2018 -0700 scsi: qla2xxx: Remove two arguments from qlafx00_error_entry() Move a debug statement from qlafx00_error_entry() into its caller. Remove one unused argument from that function. This patch does not change the behavior of the qla2xxx driver. Cc: Himanshu Madhani Signed-off-by: Bart Van Assche Acked-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit 5b0af4777b1bf397787f03336f0db34f185ca565 Author: Bart Van Assche Date: Thu Oct 18 15:45:45 2018 -0700 scsi: qla2xxx: Make sure that qlafx00_ioctl_iosb_entry() initializes 'res' Only one of the two code paths in qlafx00_ioctl_iosb_entry() initializes the variable 'res'. Make sure that 'res' is initialized before sp->done(sp, res) is called. Cc: Himanshu Madhani Signed-off-by: Bart Van Assche Acked-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit eb023220f4eac1703e22e48ed62310a6565b3a1f Author: Bart Van Assche Date: Thu Oct 18 15:45:44 2018 -0700 scsi: qla2xxx: Remove a set-but-not-used variable This patch 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 109a5987d9ead316523647d6310d609dc95bdaa2 Author: Bart Van Assche Date: Thu Oct 18 15:45:43 2018 -0700 scsi: qla2xxx: Make qla2x00_sysfs_write_nvram() easier to analyze Modify the unlock statement such that it becomes easier for static analyzers to analyze it. This patch 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 8f9a214823c9806386760b9f8624a376bbcd5232 Author: Bart Van Assche Date: Thu Oct 18 15:45:42 2018 -0700 scsi: qla2xxx: Declare local functions 'static' This patch avoids that the compiler complains about missing declarations when building with W=1. Cc: Himanshu Madhani Signed-off-by: Bart Van Assche Acked-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit 807eb90703e78c0fb853d8e5b90c9947d7a95cba Author: Bart Van Assche Date: Thu Oct 18 15:45:41 2018 -0700 scsi: qla2xxx: Improve several kernel-doc headers This patch avoids that complaints about kernel-doc headers are reported when building with W=1. Cc: Himanshu Madhani Signed-off-by: Bart Van Assche Acked-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit 50435d4211a784e1577b4af72b07276c3851d324 Author: Bart Van Assche Date: Thu Oct 18 15:45:40 2018 -0700 scsi: qla2xxx: Modify fall-through annotations This patch avoids that the compiler complains about missing fall-through annotations when building with W=1. Cc: Himanshu Madhani Signed-off-by: Bart Van Assche Acked-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit 09968e5049b4b9a47413327c56f254aa2812bbc2 Author: Nathan Chancellor Date: Thu Oct 18 14:55:41 2018 -0700 scsi: 3w-sas: 3w-9xxx: Use unsigned char for cdb Clang warns a few times: drivers/scsi/3w-sas.c:386:11: warning: implicit conversion from 'int' to 'char' changes value from 128 to -128 [-Wconstant-conversion] cdb[4] = TW_ALLOCATION_LENGTH; /* allocation length */ ~ ^~~~~~~~~~~~~~~~~~~~ Update cdb's type to unsigned char, which matches the type of the cdb member in struct TW_Command_Apache. Link: https://github.com/ClangBuiltLinux/linux/issues/158 Signed-off-by: Nathan Chancellor Acked-by: Adam Radford Signed-off-by: Martin K. Petersen commit 1b171b1a29d68bcad1e44b0135a5155570efa3ea Author: Sabyasachi Gupta Date: Thu Oct 18 21:36:26 2018 +0530 scsi: mvsas: Use dma_pool_zalloc Replace dma_pool_alloc + memset with dma_pool_zalloc. Signed-off-by: Sabyasachi Gupta Reviewed-by: Jack Wang Signed-off-by: Martin K. Petersen commit 6110f37fb33d54781e1fa841922c466c8b9005cd Author: Roland Dreier Date: Sat Oct 20 09:45:16 2018 -0700 scsi: target: Don't request modules that aren't even built If, for example, I don't enable CONFIG_TCM_PSCSI, then every time I load the target subsystem, I get an annoying Unable to load target_core_pscsi kernel log message. Instead let's only request_module() on things if that code is enabled. Signed-off-by: Roland Dreier Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen commit 7081fb629e434c13f126f191c67ff0c9939d9ef5 Author: Roland Dreier Date: Sat Oct 20 09:45:04 2018 -0700 scsi: target: Set response length for REPORT TARGET PORT GROUPS One more place where we can return the length we actually fill in. Signed-off-by: Roland Dreier Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen commit 3bf0fb6f33dd545693da5e65f5b1b9b9f0bfc35e Author: David Howells Date: Sat Oct 20 00:57:59 2018 +0100 afs: Probe multiple fileservers simultaneously Send probes to all the unprobed fileservers in a fileserver list on all addresses simultaneously in an attempt to find out the fastest route whilst not getting stuck for 20s on any server or address that we don't get a reply from. This alleviates the problem whereby attempting to access a new server can take a long time because the rotation algorithm ends up rotating through all servers and addresses until it finds one that responds. Signed-off-by: David Howells commit 18ac61853cc4e44eb30e125fc8344a3b25c7b6fe Author: David Howells Date: Sat Oct 20 00:57:59 2018 +0100 afs: Fix callback handling In some circumstances, the callback interest pointer is NULL, so in such a case we can't dereference it when checking to see if the callback is broken. This causes an oops in some circumstances. Fix this by replacing the function that worked out the aggregate break counter with one that actually does the comparison, and then make that return true (ie. broken) if there is no callback interest as yet (ie. the pointer is NULL). Fixes: 68251f0a6818 ("afs: Fix whole-volume callback handling") Signed-off-by: David Howells commit 2feeaf8433c8e68de3d0a06a0ffe7742bcd13c1a Author: David Howells Date: Sat Oct 20 00:57:59 2018 +0100 afs: Eliminate the address pointer from the address list cursor Eliminate the address pointer from the address list cursor as it's redundant (ac->addrs[ac->index] can be used to find the same address) and address lists must be replaced rather than being rearranged, so is of limited value. Signed-off-by: David Howells commit 744bcd713a4eabb248246f7deccfad30c579b7f5 Author: David Howells Date: Sat Oct 20 00:57:58 2018 +0100 afs: Allow dumping of server cursor on operation failure Provide an option to allow the file or volume location server cursor to be dumped if the rotation routine falls off the end without managing to contact a server. Signed-off-by: David Howells commit 30062bd13e3659a309d249a06d5f4ebb4a5c5251 Author: David Howells Date: Sat Oct 20 00:57:58 2018 +0100 afs: Implement YFS support in the fs client Implement support for talking to YFS-variant fileservers in the cache manager and the filesystem client. These implement upgraded services on the same port as their AFS services. YFS fileservers provide expanded capabilities over AFS. Signed-off-by: David Howells commit d4936803a92b7d088086b1d7b8ecb5739d52c03b Author: David Howells Date: Sat Oct 20 00:57:58 2018 +0100 afs: Expand data structure fields to support YFS Expand fields in various data structures to support the expanded information that YFS is capable of returning. Signed-off-by: David Howells commit f58db83fd3325a305cf615f4ffb0e6f60745ed8a Author: David Howells Date: Sat Oct 20 00:57:58 2018 +0100 afs: Get the target vnode in afs_rmdir() and get a callback on it Get the target vnode in afs_rmdir() and validate it before we attempt the deletion, The vnode pointer will be passed through to the delivery function in a later patch so that the delivery function can mark it deleted. Signed-off-by: David Howells commit 12d8e95a911eb3921a1fecf1e4d913654f6f4fb5 Author: David Howells Date: Sat Oct 20 00:57:58 2018 +0100 afs: Calc callback expiry in op reply delivery Calculate the callback expiration time at the point of operation reply delivery, using the reply time queried from AF_RXRPC on that call as a base. Signed-off-by: David Howells commit 36bb5f490a542f230beb982475b56d79d72033de Author: David Howells Date: Sat Oct 20 00:57:58 2018 +0100 afs: Fix FS.FetchStatus delivery from updating wrong vnode The FS.FetchStatus reply delivery function was updating inode of the directory in which a lookup had been done with the status of the looked up file. This corrupts some of the directory state. Fixes: 5cf9dd55a0ec ("afs: Prospectively look up extra files when doing a single lookup") Signed-off-by: David Howells commit 35dbfba3111a5ef0663bb89185ce8dfdbef63f8d Author: David Howells Date: Sat Oct 20 00:57:58 2018 +0100 afs: Implement the YFS cache manager service Implement the YFS cache manager service which gives extra capabilities on top of AFS. This is done by listening for an additional service on the same port and indicating that anyone requesting an upgrade should be upgraded to the YFS port. Signed-off-by: David Howells commit 06aeb2971457b33c1123af9f307a55f3dc4052c9 Author: David Howells Date: Sat Oct 20 00:57:58 2018 +0100 afs: Remove callback details from afs_callback_break struct Remove unnecessary details of a broken callback, such as version, expiry and type, from the afs_callback_break struct as they're not actually used and make the list take more memory. Signed-off-by: David Howells commit 0067191201de0d1870ff692368900da5207daf2c Author: David Howells Date: Sat Oct 20 00:57:57 2018 +0100 afs: Commit the status on a new file/dir/symlink Call the function to commit the status on a new file, dir or symlink so that the access rights for the caller's key are cached for that object. Without this, the next access to the file will cause a FetchStatus operation to be emitted to retrieve the access rights. Signed-off-by: David Howells commit 3b6492df4153b8550d347dfc581856138678a231 Author: David Howells Date: Sat Oct 20 00:57:57 2018 +0100 afs: Increase to 64-bit volume ID and 96-bit vnode ID for YFS Increase the sizes of the volume ID to 64 bits and the vnode ID (inode number equivalent) to 96 bits to allow the support of YFS. This requires the iget comparator to check the vnode->fid rather than i_ino and i_generation as i_ino is not sufficiently capacious. It also requires this data to be placed into the vnode cache key for fscache. For the moment, just discard the top 32 bits of the vnode ID when returning it though stat. Signed-off-by: David Howells commit 2a0b4f64c9edcdcb67306f26d9d08ef982cb0ccd Author: David Howells Date: Sat Oct 20 00:57:57 2018 +0100 afs: Don't invoke the server to read data beyond EOF When writing a new page, clear space in the page rather than attempting to load it from the server if the space is beyond the EOF. Signed-off-by: David Howells commit f51375cd9e1ad75e9e38186aa0d3749ade7d52a5 Author: David Howells Date: Sat Oct 20 00:57:57 2018 +0100 afs: Add a couple of tracepoints to log I/O errors Add a couple of tracepoints to log the production of I/O errors within the AFS filesystem. Signed-off-by: David Howells commit 4ac15ea53622272c01954461b4814892b7481b40 Author: David Howells Date: Sat Oct 20 00:57:57 2018 +0100 afs: Handle EIO from delivery function Fix afs_deliver_to_call() to handle -EIO being returned by the operation delivery function, indicating that the call found itself in the wrong state, by printing an error and aborting the call. Currently, an assertion failure will occur. This can happen, say, if the delivery function falls off the end without calling afs_extract_data() with the want_more parameter set to false to collect the end of the Rx phase of a call. The assertion failure looks like: AFS: Assertion failed 4 == 7 is false 0x4 == 0x7 is false ------------[ cut here ]------------ kernel BUG at fs/afs/rxrpc.c:462! and is matched in the trace buffer by a line like: kworker/7:3-3226 [007] ...1 85158.030203: afs_io_error: c=0003be0c r=-5 CM_REPLY Fixes: 98bf40cd99fc ("afs: Protect call->state changes against signals") Reported-by: Marc Dionne Signed-off-by: David Howells commit ded2f4c58ac24083c536aa7d2ff2b73752a88612 Author: David Howells Date: Sat Oct 20 00:57:57 2018 +0100 afs: Fix TTL on VL server and address lists Currently the TTL on VL server and address lists isn't set in all circumstances and may be set to poor choices in others, since the TTL is derived from the SRV/AFSDB DNS record if and when available. Fix the TTL by limiting the range to a minimum and maximum from the current time. At some point these can be made into sysctl knobs. Further, use the TTL we obtained from the upcall to set the expiry on negative results too; in future a mechanism can be added to force reloading of such data. Signed-off-by: David Howells commit 0a5143f2f89cc88d8a3eada8e8ccd86c1e988257 Author: David Howells Date: Sat Oct 20 00:57:57 2018 +0100 afs: Implement VL server rotation Track VL servers as independent entities rather than lumping all their addresses together into one set and implement server-level rotation by: (1) Add the concept of a VL server list, where each server has its own separate address list. This code is similar to the FS server list. (2) Use the DNS resolver to retrieve a set of servers and their associated addresses, ports, preference and weight ratings. (3) In the case of a legacy DNS resolver or an address list given directly through /proc/net/afs/cells, create a list containing just a dummy server record and attach all the addresses to that. (4) Implement a simple rotation policy, for the moment ignoring the priorities and weights assigned to the servers. (5) Show the address list through /proc/net/afs//vlservers. This also displays the source and status of the data as indicated by the upcall. Signed-off-by: David Howells commit e7f680f45bd1deb4ca479c2348b395e1a4d44b17 Author: David Howells Date: Sat Oct 20 00:57:57 2018 +0100 afs: Improve FS server rotation error handling Improve the error handling in FS server rotation by: (1) Cache the latest useful error value for the fs operation as a whole in struct afs_fs_cursor separately from the error cached in the afs_addr_cursor struct. The one in the address cursor gets clobbered occasionally. Copy over the error to the fs operation only when it's something we'd be interested in passing to userspace. (2) Make it so that EDESTADDRREQ is the default that is seen only if no addresses are available to be accessed. (3) When calling utility functions, such as checking a volume status or probing a fileserver, don't let a successful result clobber the cached error in the cursor; instead, stash the result in a temporary variable until it has been assessed. (4) Don't return ETIMEDOUT or ETIME if a better error, such as ENETUNREACH, is already cached. (5) On leaving the rotation loop, turn any remote abort code into a more useful error than ECONNABORTED. Fixes: d2ddc776a458 ("afs: Overhaul volume and server record caching and fileserver rotation") Signed-off-by: David Howells commit 12bdcf333fe13ece2a487a699b1a0f4c5dbb594b Author: David Howells Date: Sat Oct 20 00:57:56 2018 +0100 afs: Set up the iov_iter before calling afs_extract_data() afs_extract_data sets up a temporary iov_iter and passes it to AF_RXRPC each time it is called to describe the remaining buffer to be filled. Instead: (1) Put an iterator in the afs_call struct. (2) Set the iterator for each marshalling stage to load data into the appropriate places. A number of convenience functions are provided to this end (eg. afs_extract_to_buf()). This iterator is then passed to afs_extract_data(). (3) Use the new ITER_DISCARD iterator to discard any excess data provided by FetchData. Signed-off-by: David Howells commit 160cb9574b550426122422444b8f19d614505f81 Author: David Howells Date: Sat Oct 20 00:57:56 2018 +0100 afs: Better tracing of protocol errors Include the site of detection of AFS protocol errors in trace lines to better be able to determine what went wrong. Signed-off-by: David Howells commit 9ea9ce0427aab02a2fd88fc608267cf6952119f1 Author: David Howells Date: Sat Oct 20 00:57:56 2018 +0100 iov_iter: Add I/O discard iterator Add a new iterator, ITER_DISCARD, that can only be used in READ mode and just discards any data copied to it. This is useful in a network filesystem for discarding any unwanted data sent by a server. Signed-off-by: David Howells commit aa563d7bca6e882ec2bdae24603c8f016401a144 Author: David Howells Date: Sat Oct 20 00:57:56 2018 +0100 iov_iter: Separate type from direction and use accessor functions In the iov_iter struct, separate the iterator type from the iterator direction and use accessor functions to access them in most places. Convert a bunch of places to use switch-statements to access them rather then chains of bitwise-AND statements. This makes it easier to add further iterator types. Also, this can be more efficient as to implement a switch of small contiguous integers, the compiler can use ~50% fewer compare instructions than it has to use bitwise-and instructions. Further, cease passing the iterator type into the iterator setup function. The iterator function can set that itself. Only the direction is required. Signed-off-by: David Howells commit 00e23707442a75b404392cef1405ab4fd498de6b Author: David Howells Date: Mon Oct 22 13:07:28 2018 +0100 iov_iter: Use accessor function Use accessor functions to access an iterator's type and direction. This allows for the possibility of using some other method of determining the type of iterator than if-chains with bitwise-AND conditions. Signed-off-by: David Howells commit 1fcb748d187d0c7732a75a509e924ead6d070e04 Author: David Howells Date: Wed Oct 24 00:36:12 2018 +0100 amd-gpu: Don't undefine READ and WRITE Remove the undefinition of READ and WRITE because these constants may be used elsewhere in subsequently included header files, thus breaking them. These constants don't actually appear to be used in the driver, so the undefinition seems pointless. Fixes: 4562236b3bc0 ("drm/amd/dc: Add dc display driver (v2)") Signed-off-by: David Howells commit a90e90b7d55e789c71d85b946ffb5c1ab2f137ca Author: Michal Hocko Date: Thu Oct 18 10:56:17 2018 +0200 cgroup, netclassid: add a preemption point to write_classid We have seen a customer complaining about soft lockups on !PREEMPT kernel config with 4.4 based kernel [1072141.435366] NMI watchdog: BUG: soft lockup - CPU#21 stuck for 22s! [systemd:1] [1072141.444090] Modules linked in: mpt3sas raid_class binfmt_misc af_packet 8021q garp mrp stp llc xfs libcrc32c bonding iscsi_ibft iscsi_boot_sysfs msr ext4 crc16 jbd2 mbcache cdc_ether usbnet mii joydev hid_generic usbhid intel_rapl x86_pkg_temp_thermal intel_powerclamp coretemp crct10dif_pclmul crc32_pclmul ghash_clmulni_intel ipmi_ssif mgag200 i2c_algo_bit ttm ipmi_devintf drbg ixgbe drm_kms_helper vxlan ansi_cprng ip6_udp_tunnel drm aesni_intel udp_tunnel aes_x86_64 iTCO_wdt syscopyarea ptp xhci_pci lrw iTCO_vendor_support pps_core gf128mul ehci_pci glue_helper sysfillrect mdio pcspkr sb_edac ablk_helper cryptd ehci_hcd sysimgblt xhci_hcd fb_sys_fops edac_core mei_me lpc_ich ses usbcore enclosure dca mfd_core ipmi_si mei i2c_i801 scsi_transport_sas usb_common ipmi_msghandler shpchp fjes wmi processor button acpi_pad btrfs xor raid6_pq sd_mod crc32c_intel megaraid_sas sg dm_multipath dm_mod scsi_dh_rdac scsi_dh_emc scsi_dh_alua scsi_mod md_mod autofs4 [1072141.444146] Supported: Yes [1072141.444149] CPU: 21 PID: 1 Comm: systemd Not tainted 4.4.121-92.80-default #1 [1072141.444150] Hardware name: LENOVO Lenovo System x3650 M5 -[5462P4U]- -[5462P4U]-/01GR451, BIOS -[TCE136H-2.70]- 06/13/2018 [1072141.444151] task: ffff880191bd0040 ti: ffff880191bd4000 task.ti: ffff880191bd4000 [1072141.444153] RIP: 0010:[] [] update_classid_sock+0x29/0x40 [1072141.444157] RSP: 0018:ffff880191bd7d58 EFLAGS: 00000286 [1072141.444158] RAX: ffff883b177cb7c0 RBX: 0000000000000000 RCX: 0000000000000000 [1072141.444159] RDX: 00000000000009c7 RSI: ffff880191bd7d5c RDI: ffff8822e29bb200 [1072141.444160] RBP: ffff883a72230980 R08: 0000000000000101 R09: 0000000000000000 [1072141.444161] R10: 0000000000000008 R11: f000000000000000 R12: ffffffff815229d0 [1072141.444162] R13: 0000000000000000 R14: ffff881fd0a47ac0 R15: ffff880191bd7f28 [1072141.444163] FS: 00007f3e2f1eb8c0(0000) GS:ffff882000340000(0000) knlGS:0000000000000000 [1072141.444164] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [1072141.444165] CR2: 00007f3e2f200000 CR3: 0000001ffea4e000 CR4: 00000000001606f0 [1072141.444166] Stack: [1072141.444166] ffffffa800000246 00000000000009c7 ffffffff8121d583 ffff8818312a05c0 [1072141.444168] ffff8818312a1100 ffff880197c3b280 ffff881861422858 ffffffffffffffea [1072141.444170] ffffffff81522b1c ffffffff81d0ca20 ffff8817fa17b950 ffff883fdd8121e0 [1072141.444171] Call Trace: [1072141.444179] [] iterate_fd+0x53/0x80 [1072141.444182] [] write_classid+0x4c/0x80 [1072141.444187] [] cgroup_file_write+0x9b/0x100 [1072141.444193] [] kernfs_fop_write+0x11b/0x150 [1072141.444198] [] __vfs_write+0x26/0x100 [1072141.444201] [] vfs_write+0x9d/0x190 [1072141.444203] [] SyS_write+0x42/0xa0 [1072141.444207] [] entry_SYSCALL_64_fastpath+0x1e/0xca [1072141.445490] DWARF2 unwinder stuck at entry_SYSCALL_64_fastpath+0x1e/0xca If a cgroup has many tasks with many open file descriptors then we would end up in a large loop without any rescheduling point throught the operation. Add cond_resched once per task. Signed-off-by: Michal Hocko Signed-off-by: Tejun Heo commit 8bc7146a5b8bb4c9bfa32697f7208c70611845f9 Author: Rami Rosen Date: Tue Oct 23 18:01:06 2018 +0300 rdmacg: fix a typo in rdmacg documentation This patch fixes a typo in RDMA cgroup documentation. Signed-off-by: Rami Rosen Reviewed-by: Parav Pandit Signed-off-by: Tejun Heo commit 44786880df196a4200c178945c4d41675faf9fb7 Merge: 07171da26424 e543b3a62029 Author: Linus Torvalds Date: Tue Oct 23 20:02:03 2018 +0100 Merge branch 'parisc-4.20-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux Pull parisc updates from Helge Deller: "Lots of small fixes and enhancements, most noteably: - Many TLB and cache flush optimizations (Dave) - Fixed HPMC/crash handler on 64-bit kernel (Dave and myself) - Added alternative infrastructre. The kernel now live-patches itself for various situations, e.g. replace SMP code when running on one CPU only or drop cache flushes when system has no cache installed. - vmlinuz now contains a full copy of the compressed vmlinux file. This simplifies debugging the currently booted kernel. - Unused driver removal (Christoph) - Reduced warnings of Dino PCI bridge when running in qemu - Removed gcc version check (Masahiro)" * 'parisc-4.20-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: (23 commits) parisc: Retrieve and display the PDC PAT capabilities parisc: Optimze cache flush algorithms parisc: Remove pte_inserted define parisc: Add PDC PAT cell_info() and pd_get_pdc_revisions() functions parisc: Drop two instructions from pte lookup code parisc: Use zdep for shlw macro on PA1.1 and PA2.0 parisc: Add alternative coding infrastructure parisc: Include compressed vmlinux file in vmlinuz boot kernel extract-vmlinux: Check for uncompressed image as fallback parisc: Fix address in HPMC IVA parisc: Fix exported address of os_hpmc handler parisc: Fix map_pages() to not overwrite existing pte entries parisc: Purge TLB entries after updating page table entry and set page accessed flag in TLB handler parisc: Release spinlocks using ordered store parisc: Ratelimit dino stuck interrupt warnings parisc: dino: Utilize DINO_MASK_IRQ() macro parisc: Clean up crash header output parisc: Add SYSTEM_INFO and REGISTER TOC PAT functions parisc: Remove PTE load and fault check from L2_ptep macro parisc: Reorder TLB flush timing calculation ... commit 07171da26424bcdb5d8c4571544c8c7b11137d34 Merge: 034bda1cd5ab 3e98d240981a Author: Linus Torvalds Date: Tue Oct 23 19:32:10 2018 +0100 Merge branch 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm Pull ARM updates from Russell King: "The main item in this pull request are the Spectre variant 1.1 fixes from Julien Thierry. A few other patches to improve various areas, and removal of some obsolete mcount bits and a redundant kbuild conditional" * 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm: ARM: 8802/1: Call syscall_trace_exit even when system call skipped ARM: 8797/1: spectre-v1.1: harden __copy_to_user ARM: 8796/1: spectre-v1,v1.1: provide helpers for address sanitization ARM: 8795/1: spectre-v1.1: use put_user() for __put_user() ARM: 8794/1: uaccess: Prevent speculative use of the current addr_limit ARM: 8793/1: signal: replace __put_user_error with __put_user ARM: 8792/1: oabi-compat: copy oabi events using __copy_to_user() ARM: 8791/1: vfp: use __copy_to_user() when saving VFP state ARM: 8790/1: signal: always use __copy_to_user to save iwmmxt context ARM: 8789/1: signal: copy registers using __copy_to_user() ARM: 8801/1: makefile: use ARMv3M mode for RiscPC ARM: 8800/1: use choice for kernel unwinders ARM: 8798/1: remove unnecessary KBUILD_SRC ifeq conditional ARM: 8788/1: ftrace: remove old mcount support ARM: 8786/1: Debug kernel copy by printing commit 9844fb2e351311210e6660a9a1c62d17424a6145 Author: Johan Hovold Date: Mon Aug 27 10:21:53 2018 +0200 power: supply: twl4030-charger: fix OF sibling-node lookup Use the new of_get_compatible_child() helper to lookup the usb sibling node instead of using of_find_compatible_node(), which searches the entire tree from a given start node and thus can return an unrelated (non-sibling) node. This also addresses a potential use-after-free (e.g. after probe deferral) as the tree-wide helper drops a reference to its first argument (i.e. the parent device node). While at it, also fix the related phy-node reference leak. Fixes: f5e4edb8c888 ("power: twl4030_charger: find associated phy by more reliable means.") Cc: stable # 4.2 Cc: NeilBrown Cc: Felipe Balbi Cc: Sebastian Reichel Reviewed-by: Sebastian Reichel Signed-off-by: Johan Hovold Signed-off-by: Rob Herring commit 5bf59773aaf36dd62117dc83d50e1bbf9ef432da Author: Johan Hovold Date: Mon Aug 27 10:21:52 2018 +0200 NFC: nfcmrvl_uart: fix OF child-node lookup Use the new of_get_compatible_child() helper to lookup the nfc child node instead of using of_find_compatible_node(), which searches the entire tree from a given start node and thus can return an unrelated (i.e. non-child) node. This also addresses a potential use-after-free (e.g. after probe deferral) as the tree-wide helper drops a reference to its first argument (i.e. the parent node). Fixes: e097dc624f78 ("NFC: nfcmrvl: add UART driver") Fixes: d8e018c0b321 ("NFC: nfcmrvl: update device tree bindings for Marvell NFC") Cc: stable # 4.2 Cc: Vincent Cuissard Cc: Samuel Ortiz Signed-off-by: Johan Hovold Signed-off-by: Rob Herring commit ac63043d8cb5503c7e0fe110f947eacf2663804e Author: Johan Hovold Date: Mon Aug 27 10:21:51 2018 +0200 net: stmmac: dwmac-sun8i: fix OF child-node lookup Use the new of_get_compatible_child() helper to lookup the mdio-internal child node instead of using of_find_compatible_node(), which searches the entire tree from a given start node and thus can return an unrelated (i.e. non-child) node. This also addresses a potential use-after-free (e.g. after probe deferral) as the tree-wide helper drops a reference to its first argument (i.e. the mdio-mux node). Fortunately, this was inadvertently balanced by a failure to drop the mdio-mux reference after lookup. While at it, also fix the related mdio-internal- and phy-node reference leaks. Fixes: 634db83b8265 ("net: stmmac: dwmac-sun8i: Handle integrated/external MDIOs") Tested-by: Corentin Labbe Cc: Andrew Lunn Cc: Giuseppe Cavallaro Cc: Alexandre Torgue Cc: Jose Abreu Cc: David S. Miller Signed-off-by: Johan Hovold Signed-off-by: Rob Herring commit d397dbe606120a1ea1b11b0020c3f7a3852da5ac Author: Johan Hovold Date: Mon Aug 27 10:21:50 2018 +0200 net: bcmgenet: fix OF child-node lookup Use the new of_get_compatible_child() helper to lookup the mdio child node instead of using of_find_compatible_node(), which searches the entire tree from a given start node and thus can return an unrelated (i.e. non-child) node. This also addresses a potential use-after-free (e.g. after probe deferral) as the tree-wide helper drops a reference to its first argument (i.e. the node of the device being probed). Fixes: aa09677cba42 ("net: bcmgenet: add MDIO routines") Cc: stable # 3.15 Cc: David S. Miller Reviewed-by: Florian Fainelli Signed-off-by: Johan Hovold Signed-off-by: Rob Herring commit f9a7082327e26f54067a49cac2316d31e0cc8ba7 Author: Johan Hovold Date: Mon Aug 27 10:21:47 2018 +0200 drm/msm: fix OF child-node lookup Use the new of_get_compatible_child() helper to lookup the legacy pwrlevels child node instead of using of_find_compatible_node(), which searches the entire tree from a given start node and thus can return an unrelated (i.e. non-child) node. This also addresses a potential use-after-free (e.g. after probe deferral) as the tree-wide helper drops a reference to its first argument (i.e. the probed device's node). While at it, also fix the related child-node reference leak. Fixes: e2af8b6b0ca1 ("drm/msm: gpu: Use OPP tables if we can") Cc: stable # 4.12 Cc: Jordan Crouse Cc: Rob Clark Cc: David Airlie Signed-off-by: Johan Hovold Signed-off-by: Rob Herring commit ceff2f4dcd44abf35864d9a99f85ac619e89a01d Author: Johan Hovold Date: Mon Aug 27 10:21:46 2018 +0200 drm/mediatek: fix OF sibling-node lookup Use the new of_get_compatible_child() helper to lookup the sibling instead of using of_find_compatible_node(), which searches the entire tree from a given start node and thus can return an unrelated (i.e. non-sibling) node. This also addresses a potential use-after-free (e.g. after probe deferral) as the tree-wide helper drops a reference to its first argument (i.e. the parent device node). While at it, also fix the related cec-node reference leak. Fixes: 8f83f26891e1 ("drm/mediatek: Add HDMI support") Cc: stable # 4.8 Cc: Junzhi Zhao Cc: Philipp Zabel Cc: CK Hu Cc: David Airlie Signed-off-by: Johan Hovold Signed-off-by: Rob Herring commit 034bda1cd5abbe7b170ce76b618768d164030bbd Merge: d82924c3b8d0 99c19e6a8fe4 Author: Linus Torvalds Date: Tue Oct 23 19:07:25 2018 +0100 Merge branch 'x86-vdso-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 vdso updates from Ingo Molnar: "Two main changes: - Cleanups, simplifications and CLOCK_TAI support (Thomas Gleixner) - Improve code generation (Andy Lutomirski)" * 'x86-vdso-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/vdso: Rearrange do_hres() to improve code generation x86/vdso: Document vgtod_ts better x86/vdso: Remove "memory" clobbers in the vDSO syscall fallbacks x66/vdso: Add CLOCK_TAI support x86/vdso: Move cycle_last handling into the caller x86/vdso: Simplify the invalid vclock case x86/vdso: Replace the clockid switch case x86/vdso: Collapse coarse functions x86/vdso: Collapse high resolution functions x86/vdso: Introduce and use vgtod_ts x86/vdso: Use unsigned int consistently for vsyscall_gtod_data:: Seq x86/vdso: Enforce 64bit clocksource x86/time: Implement clocksource_arch_init() clocksource: Provide clocksource_arch_init() commit de7d83da84bdf0b5ec50b3b09249e608c0e4b81d Merge: 5e3cdecf7834 6be0f96d799f Author: Takashi Iwai Date: Tue Oct 23 20:07:07 2018 +0200 Merge tag 'asoc-v5.0-2' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Additional fixes for the next release A couple of fixes for build bot issues in the STM32 SAI driver. commit 68203a67a7024c5d0b8e545d3d370b1fec971551 Author: Rahul Verma Date: Tue Oct 23 08:04:24 2018 -0700 qed: Fix static checker warning Static Checker Warnings: drivers/net/ethernet/qlogic/qed/qed_main.c:1510 qed_fill_link_capability() error: uninitialized symbol 'tcvr_state'. drivers/net/ethernet/qlogic/qed/qed_mcp.c:1951 qed_mcp_trans_speed_mask() error: uninitialized symbol 'transceiver_state'. drivers/net/ethernet/qlogic/qed/qed_mcp.c:1951 qed_mcp_trans_speed_mask() error: uninitialized symbol 'transceiver_type'. Symbols tcvr_state, transceiver_state and transceiver_type are initialized with respective default state. Fixes: c56a8be7e7aa ("qed: Add supported link and advertise link to display in ethtool.") Reported-by: Dan Carpenter Signed-off-by: Rahul Verma Signed-off-by: David S. Miller commit 5ef79151c2fbc401cf38325e9a32e77b9fc593ae Author: Ivan Vecera Date: Tue Oct 23 16:40:26 2018 +0200 Revert "be2net: remove desc field from be_eq_obj" The mentioned commit needs to be reverted because we cannot pass string allocated on stack to request_irq(). This function stores uses this pointer for later use (e.g. /proc/interrupts) so we need to keep this string persistently. Fixes: d6d9704af8f4 ("be2net: remove desc field from be_eq_obj") Signed-off-by: Ivan Vecera Signed-off-by: David S. Miller commit 89ab066d4229acd32e323f1569833302544a4186 Author: Karsten Graul Date: Tue Oct 23 13:40:39 2018 +0200 Revert "net: simplify sock_poll_wait" This reverts commit dd979b4df817e9976f18fb6f9d134d6bc4a3c317. This broke tcp_poll for SMC fallback: An AF_SMC socket establishes an internal TCP socket for the initial handshake with the remote peer. Whenever the SMC connection can not be established this TCP socket is used as a fallback. All socket operations on the SMC socket are then forwarded to the TCP socket. In case of poll, the file->private_data pointer references the SMC socket because the TCP socket has no file assigned. This causes tcp_poll to wait on the wrong socket. Signed-off-by: Karsten Graul Signed-off-by: David S. Miller commit 6b7a02f7089b223317bf264b8fdfdaf74be35b5f Merge: 487e2e22ab79 8d5b0bf611ec Author: David S. Miller Date: Tue Oct 23 10:55:35 2018 -0700 Merge branch 'netsec-fixes' Masahisa Kojima says: ==================== Bugfix for the netsec driver This patch series include bugfix for the netsec ethernet controller driver, fix the problem in interface down/up. changes in v2: - change the place to perform the PHY power down - use the MACROs defiend in include/uapi/linux/mii.h - update commit comment ==================== Signed-off-by: David S. Miller commit 8d5b0bf611ec5b7618d5b772dddc93b8afa78cb8 Author: Masahisa Kojima Date: Tue Oct 23 20:24:28 2018 +0900 net: socionext: Reset tx queue in ndo_stop We observed that packets and bytes count are not reset when user performs interface down. Eventually, tx queue is exhausted and packets will not be sent out. To avoid this problem, resets tx queue in ndo_stop. Fixes: 533dd11a12f6 ("net: socionext: Add Synquacer NetSec driver") Signed-off-by: Masahisa Kojima Signed-off-by: Yoshitoyo Osaki Signed-off-by: David S. Miller commit a3241a91de6429051a211b5ce04d6946157caec7 Author: Masahisa Kojima Date: Tue Oct 23 20:24:27 2018 +0900 net: socionext: Add dummy PHY register read in phy_write() There is a compatibility issue between RTL8211E implemented in Developerbox and netsec ethernet controller IP. Our MDIO controller stops MDC clock right after the write access, but RTL8211E expects MDC clock must be kept toggling for several clock cycle with MDIO high before entering the IDLE state. Without keeping clock after write access, write access is not correctly handled and register is not updated. To meet this requirement, netsec driver needs to issue dummy read(e.g. read PHYID1(offset 0x2) register) right after write access, to keep MDC clock. We think this compatibility issue is a problem specific to our MDIO controller and RTL8211E. Fixes: 533dd11a12f6 ("net: socionext: Add Synquacer NetSec driver") Signed-off-by: Masahisa Kojima Signed-off-by: Yoshitoyo Osaki Signed-off-by: David S. Miller commit 8e850f25b5812aefedec6732732eb10e7b47cb5c Author: Masahisa Kojima Date: Tue Oct 23 20:24:26 2018 +0900 net: socionext: Stop PHY before resetting netsec In ndo_stop, driver resets the netsec ethernet controller IP. When the netsec IP is reset, HW running mode turns to NRM mode and driver has to wait until this mode transition completes. But mode transition to NRM will not complete if the PHY is in normal operation state. Netsec IP requires PHY is in power down state when it is reset. This modification stops the PHY before resetting netsec. Together with this modification, phy_addr is stored in netsec_priv structure because ndev->phydev is not yet ready in ndo_init. Fixes: 533dd11a12f6 ("net: socionext: Add Synquacer NetSec driver") Signed-off-by: Masahisa Kojima Signed-off-by: Yoshitoyo Osaki Signed-off-by: David S. Miller commit 76099f98aea4606f7c96b8d2366b46840529d08f Author: Adrian Hunter Date: Tue Oct 23 10:59:49 2018 +0300 perf scripts python: exported-sql-viewer.py: Add All branches report Add a report to display branches in a similar fashion to perf script. The main purpose of this report is to display disassembly, however, presently, the only supported disassembler is Intel XED, and additionally the object code must be present in perf build ID cache. To use Intel XED, libxed.so must be present. To build and install libxed.so: git clone https://github.com/intelxed/mbuild.git mbuild git clone https://github.com/intelxed/xed cd xed ./mfile.py --share sudo ./mfile.py --prefix=/usr/local install sudo ldconfig Signed-off-by: Adrian Hunter Cc: Andi Kleen Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20181023075949.18920-1-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit d82924c3b8d0607094b94fab290a33c5ad7d586c Merge: d7197a5ad852 bb4b3b776273 Author: Linus Torvalds Date: Tue Oct 23 18:43:04 2018 +0100 Merge branch 'x86-pti-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 pti updates from Ingo Molnar: "The main changes: - Make the IBPB barrier more strict and add STIBP support (Jiri Kosina) - Micro-optimize and clean up the entry code (Andy Lutomirski) - ... plus misc other fixes" * 'x86-pti-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/speculation: Propagate information about RSB filling mitigation to sysfs x86/speculation: Enable cross-hyperthread spectre v2 STIBP mitigation x86/speculation: Apply IBPB more strictly to avoid cross-process data leak x86/speculation: Add RETPOLINE_AMD support to the inline asm CALL_NOSPEC variant x86/CPU: Fix unused variable warning when !CONFIG_IA32_EMULATION x86/pti/64: Remove the SYSCALL64 entry trampoline x86/entry/64: Use the TSS sp2 slot for SYSCALL/SYSRET scratch space x86/entry/64: Document idtentry commit 8392b74b575c38fa5d50d1fe07fa9a4bcea93862 Author: Adrian Hunter Date: Mon Oct 1 09:28:50 2018 +0300 perf scripts python: exported-sql-viewer.py: Add ability to display all the database tables Displaying all the database tables can help make the database easier to understand. Committer testing: Opened all the tables, even the sqlite master table, which I selected everything and used control+C, lets see if it works... CREATE VIEW threads_view AS SELECT id,machine_id,(SELECT host_or_guest FROM machines_view WHERE id = machine_id) AS host_or_guest,process_id,pid,tid FROM threads Humm, nope, just one of the cells got copied, even with everything selected :-) Anyway, works as advertised, useful for perusing the data. Signed-off-by: Adrian Hunter Tested-by: Arnaldo Carvalho de Melo Cc: Andi Kleen Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20181001062853.28285-17-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 82f68e2898e634b8b0efc7ddd57e037ef75ea114 Author: Adrian Hunter Date: Mon Oct 1 09:28:49 2018 +0300 perf scripts python: exported-sql-viewer.py: Add ability to shrink / enlarge font Shrinking the font allows more information to display. Committer testing: Works, tested with the convenient Control+Shift+'+' and Control+'-' as well with the more cumbersome top menu "Edit" + "Enlarge/Shrink font" options. Signed-off-by: Adrian Hunter Tested-by: Arnaldo Carvalho de Melo Cc: Andi Kleen Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20181001062853.28285-16-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit ebd70c7dc2f5f57315e19d959ddc9cb05e9d48e1 Author: Adrian Hunter Date: Mon Oct 1 09:28:48 2018 +0300 perf scripts python: exported-sql-viewer.py: Add ability to find symbols in the call-graph Add a Find bar that appears at the bottom of the call-graph window. Committer testing: Using: python tools/perf/scripts/python/exported-sql-viewer.py pt_example branches calls Using the database built in the first "Committer Testing" section in this patch series I was able to: "Reports" "Context-Sensitive Call Graphs" Control+F or select "Edit" in the top menu then "Find" __poll and find the first place where the "__poll" function appears, then press the down arrow in the lower right corner and go to the next, etc. Signed-off-by: Adrian Hunter Tested-by: Arnaldo Carvalho de Melo Cc: Andi Kleen Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20181001062853.28285-15-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 1beb5c7b07040b70975a2ae0e90b87d412fabf06 Author: Adrian Hunter Date: Mon Oct 1 09:28:47 2018 +0300 perf scripts python: exported-sql-viewer.py: Add support for multiple sub-windows Use Qt MDI (multiple document interface) to support multiple sub-windows. Put the data model in a cache so that each sub-window can share the same data. This allows mutiple views of the call-graph at the same time and paves the way to add more reports. Committer testing: Starts with a "File Reports Windows" main menu, from the "Reports" I can get what was available up to now, the "Context-Sensitivi Call Graph" option. Signed-off-by: Adrian Hunter Tested-by: Arnaldo Carvalho de Melo Cc: Andi Kleen Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20181001062853.28285-14-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 031c2a004ba75a4f8f2a6d0a7ca6f2fe5912de22 Author: Adrian Hunter Date: Mon Oct 1 09:28:46 2018 +0300 perf scripts python: call-graph-from-sql.py: Rename to exported-sql-viewer.py Additional reports will be added to the script so rename to reflect the more general purpose. Signed-off-by: Adrian Hunter Cc: Andi Kleen Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20181001062853.28285-13-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 341e73cbd3019d350d1271803b45d84af88f2408 Author: Adrian Hunter Date: Mon Oct 1 09:28:45 2018 +0300 perf scripts python: call-graph-from-sql.py: Refactor TreeItem class class TreeItem represents items at all levels of the call-graph tree. However, not all the levels represent the same data i.e. the top-level is comms, the next level is threads, and subsequent levels are functions. Consequently it is simpler to have separate classes for different levels with commonality in a base class. Refactor TreeItem class accordingly. Signed-off-by: Adrian Hunter Cc: Andi Kleen Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20181001062853.28285-12-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 4be9ace7e1cdcb44c1fba1fb41ec2b92dda06732 Author: Adrian Hunter Date: Mon Oct 1 09:28:44 2018 +0300 perf scripts python: call-graph-from-sql.py: Add data helper functions Add helper functions for a few common cases. Signed-off-by: Adrian Hunter Cc: Andi Kleen Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20181001062853.28285-11-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 70d831e85c1bdd87d193e85666bf3aa39aab7f21 Author: Adrian Hunter Date: Mon Oct 1 09:28:43 2018 +0300 perf scripts python: call-graph-from-sql.py: Factor out CallGraphModel from TreeModel Factor out CallGraphModel from TreeModel, which paves the way to reuse TreeModel in future reports. Signed-off-by: Adrian Hunter Cc: Andi Kleen Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20181001062853.28285-10-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit e99ef8141a6d97abaf47647cfd0034769144d080 Author: Adrian Hunter Date: Mon Oct 1 09:28:42 2018 +0300 perf scripts python: call-graph-from-sql.py: Remove use of setObjectName() The object name is never used, so don't bother setting it. Signed-off-by: Adrian Hunter Cc: Andi Kleen Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20181001062853.28285-9-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 5f9dfef1bb7fadfb2d001244ef23359982fedd06 Author: Adrian Hunter Date: Mon Oct 1 09:28:41 2018 +0300 perf scripts python: call-graph-from-sql.py: Add a class for global data Keep global data in a single object that is easy to pass around as needed, without polluting the global namespace. Signed-off-by: Adrian Hunter Cc: Andi Kleen Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20181001062853.28285-8-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit b2556c46a69b4c0e6bbf690ac4ca2913cbe90e1e Author: Adrian Hunter Date: Mon Oct 1 09:28:40 2018 +0300 perf scripts python: call-graph-from-sql.py: Separate the database details into a class Separate the database details into a class that can provide different connections using the same connection information. That paves the way for sub-processes that require their own connection. Signed-off-by: Adrian Hunter Cc: Andi Kleen Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20181001062853.28285-7-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 7e4fc93e2ade2b0c453a97e307203ffe3f930c98 Author: Adrian Hunter Date: Mon Oct 1 09:28:39 2018 +0300 perf scripts python: call-graph-from-sql.py: Make a "Main" function Make a "Main" function so that the variables used do not pollute the global namespace. Signed-off-by: Adrian Hunter Cc: Andi Kleen Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20181001062853.28285-6-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 99a097c987c26c8c82293fcb92908d07009c925e Author: Adrian Hunter Date: Mon Oct 1 09:28:38 2018 +0300 perf scripts python: call-graph-from-sql.py: Change icon There are not many standard icons, but the computer icon looks slightly better than the information icon. Committer testing: Noticed the change on the icon on the gnome menu right next to the "Activities" menu, looks nicer indeed. Signed-off-by: Adrian Hunter Tested-by: Arnaldo Carvalho de Melo Cc: Andi Kleen Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20181001062853.28285-5-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 3c4ef451506897a15aff76ff141c995c6cd32f4d Author: Adrian Hunter Date: Mon Oct 1 09:28:37 2018 +0300 perf scripts python: call-graph-from-sql.py: Set a minimum window size Prevent weirdly small window size. Committer testing: Seems to work, but even before this patch, on my system, it always started with: xwininfo: Window id: 0x1e00002 "Call Graph: pt_example" Width: 800 Height: 600 Signed-off-by: Adrian Hunter Tested-by: Arnaldo Carvalho de Melo Cc: Andi Kleen Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20181001062853.28285-4-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit d7197a5ad8528642cb70f1d27d4d5c7332a2b395 Merge: f682a7920baf fa112cf1e8bc Author: Linus Torvalds Date: Tue Oct 23 18:17:11 2018 +0100 Merge branch 'x86-platform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 platform updates from Ingo Molnar: "Two minor OLPC changes: a build fix and a new quirk" * 'x86-platform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/olpc: Fix build error with CONFIG_MFD_CS5535=m x86/olpc: Indicate that legacy PC XO-1 platform should not register RTC commit 1d865c06f5715df94528f76d6bb7f6f98975e04e Author: Adrian Hunter Date: Mon Oct 1 09:28:36 2018 +0300 perf scripts python: call-graph-from-sql.py: Provide better default column sizes Set initial column sizes to improve initial display. Committer testing: Extended instructions on testing this, using the sqlite variant: Make sure you have the SQLite glue for python+Qt installed, on fedora 27 I used: # dnf install python-pyside Collect some PT samples, say 5-secs worth, system wide: # perf record -r 10 -e intel_pt//u -a sleep 5 [ perf record: Woken up 49 times to write data ] [ perf record: Captured and wrote 96.131 MB perf.data ] This results in this perf.data file: # ls -larth perf.data -rw-------. 1 root root 97M Oct 23 10:11 perf.data With the following attributes: # perf evlist -v intel_pt//u: type: 8, size: 112, config: 0x300e601, { sample_period, sample_freq }: 1, sample_type: IP|TID|TIME|CPU|IDENTIFIER, read_format: ID, disabled: 1, inherit: 1, exclude_kernel: 1, exclude_hv: 1, sample_id_all: 1 dummy:u: type: 1, size: 112, config: 0x9, { sample_period, sample_freq }: 1, sample_type: IP|TID|TIME|CPU|IDENTIFIER, read_format: ID, inherit: 1, exclude_kernel: 1, exclude_hv: 1, mmap: 1, comm: 1, task: 1, sample_id_all: 1, mmap2: 1, comm_exec: 1, context_switch: 1 # Then generate the "pt_example" tables using: # perf script -s ~/libexec/perf-core/scripts/python/export-to-sqlite.py pt_example branches calls 2018-10-23 10:56:59.177711 Creating database... 2018-10-23 10:56:59.195842 Writing records... instruction trace error type 1 cpu 2 pid 1644 tid 1644 ip 0x263984516750 code 5: Failed to get instruction instruction trace error type 1 cpu 2 pid 1644 tid 1644 ip 0x7f26e116fd20 code 6: Trace doesn't match instruction instruction trace error type 1 cpu 2 pid 1644 tid 1644 ip 0x7f26e162c9ee code 6: Trace doesn't match instruction instruction trace error type 1 cpu 2 pid 1644 tid 1644 ip 0x7f26e9ce831a code 6: Trace doesn't match instruction instruction trace error type 1 cpu 0 pid 1644 tid 1644 ip 0x7f26e13d07b4 code 6: Trace doesn't match instruction Warning: 132 instruction trace errors 2018-10-23 11:25:25.015717 Adding indexes 2018-10-23 11:25:28.788061 Done # In my example, that perf.data file generated this db: # file pt_example pt_example: SQLite 3.x database, last written using SQLite version 3020001 [root@seventh perf]# ls -lah pt_example -rw-r--r--. 1 root root 6.6G Oct 23 11:25 pt_example # Then use this python script to use that db and provide a GUI: $ python tools/perf/scripts/python/call-graph-from-sql.py pt_example branches calls I compared the column widths before this patch and after applying it, the visual results match the patch intent. The following patches will refer to this set of instructions in the "Committer Testing" section. Signed-off-by: Adrian Hunter Tested-by: Arnaldo Carvalho de Melo Cc: Andi Kleen Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20181001062853.28285-3-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit f682a7920baf7b721d01dd317f3b532265357cbb Merge: 99792e0cea1e 3a025de64bf8 Author: Linus Torvalds Date: Tue Oct 23 17:54:58 2018 +0100 Merge branch 'x86-paravirt-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 paravirt updates from Ingo Molnar: "Two main changes: - Remove no longer used parts of the paravirt infrastructure and put large quantities of paravirt ops under a new config option PARAVIRT_XXL=y, which is selected by XEN_PV only. (Joergen Gross) - Enable PV spinlocks on Hyperv (Yi Sun)" * 'x86-paravirt-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/hyperv: Enable PV qspinlock for Hyper-V x86/hyperv: Add GUEST_IDLE_MSR support x86/paravirt: Clean up native_patch() x86/paravirt: Prevent redefinition of SAVE_FLAGS macro x86/xen: Make xen_reservation_lock static x86/paravirt: Remove unneeded mmu related paravirt ops bits x86/paravirt: Move the Xen-only pv_mmu_ops under the PARAVIRT_XXL umbrella x86/paravirt: Move the pv_irq_ops under the PARAVIRT_XXL umbrella x86/paravirt: Move the Xen-only pv_cpu_ops under the PARAVIRT_XXL umbrella x86/paravirt: Move items in pv_info under PARAVIRT_XXL umbrella x86/paravirt: Introduce new config option PARAVIRT_XXL x86/paravirt: Remove unused paravirt bits x86/paravirt: Use a single ops structure x86/paravirt: Remove clobbers from struct paravirt_patch_site x86/paravirt: Remove clobbers parameter from paravirt patch functions x86/paravirt: Make paravirt_patch_call() and paravirt_patch_jmp() static x86/xen: Add SPDX identifier in arch/x86/xen files x86/xen: Link platform-pci-unplug.o only if CONFIG_XEN_PVHVM x86/xen: Move pv specific parts of arch/x86/xen/mmu.c to mmu_pv.c x86/xen: Move pv irq related functions under CONFIG_XEN_PV umbrella commit 331bc71cb1751d78f6807ad8e6162b07c67cdd1b Author: Trond Myklebust Date: Sun Oct 14 10:40:29 2018 -0400 SUNRPC: Convert the auth cred cache to use refcount_t Signed-off-by: Trond Myklebust commit 79b181810285a6b9b7a1aed25c365c9e1782e22a Author: Trond Myklebust Date: Sun Oct 14 10:34:31 2018 -0400 SUNRPC: Convert auth creds to use refcount_t Signed-off-by: Trond Myklebust commit 07d02a67b7faae56e184f6c35f78de47f06da37f Author: Trond Myklebust Date: Fri Oct 12 13:28:26 2018 -0400 SUNRPC: Simplify lookup code We no longer need to worry about whether or not the entry is hashed in order to figure out if the contents are valid. We only care whether or not the refcount is non-zero. Signed-off-by: Trond Myklebust commit 95cd623250adce2269e71cfeaf1d487cf4b0d088 Author: Trond Myklebust Date: Thu Oct 11 16:11:09 2018 -0400 SUNRPC: Clean up the AUTH cache code Signed-off-by: Trond Myklebust commit 86bbd7422ae6a33735df6846fd685e46686da714 Author: Frank Sorenson Date: Tue Oct 23 10:34:57 2018 -0500 NFS: change sign of nfs_fh length The filehandle has a length which is defined as a 32-bit "unsigned integer". Change sign of the length appropriately. Signed-off-by: Frank Sorenson Signed-off-by: Trond Myklebust commit 99792e0cea1ed733cdc8d0758677981e0cbebfed Merge: 382d72a9aa52 977e4be5eb71 Author: Linus Torvalds Date: Tue Oct 23 17:05:28 2018 +0100 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: "Lots of changes in this cycle: - Lots of CPA (change page attribute) optimizations and related cleanups (Thomas Gleixner, Peter Zijstra) - Make lazy TLB mode even lazier (Rik van Riel) - Fault handler cleanups and improvements (Dave Hansen) - kdump, vmcore: Enable kdumping encrypted memory with AMD SME enabled (Lianbo Jiang) - Clean up VM layout documentation (Baoquan He, Ingo Molnar) - ... plus misc other fixes and enhancements" * 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (51 commits) x86/stackprotector: Remove the call to boot_init_stack_canary() from cpu_startup_entry() x86/mm: Kill stray kernel fault handling comment x86/mm: Do not warn about PCI BIOS W+X mappings resource: Clean it up a bit resource: Fix find_next_iomem_res() iteration issue resource: Include resource end in walk_*() interfaces x86/kexec: Correct KEXEC_BACKUP_SRC_END off-by-one error x86/mm: Remove spurious fault pkey check x86/mm/vsyscall: Consider vsyscall page part of user address space x86/mm: Add vsyscall address helper x86/mm: Fix exception table comments x86/mm: Add clarifying comments for user addr space x86/mm: Break out user address space handling x86/mm: Break out kernel address space handling x86/mm: Clarify hardware vs. software "error_code" x86/mm/tlb: Make lazy TLB mode lazier x86/mm/tlb: Add freed_tables element to flush_tlb_info x86/mm/tlb: Add freed_tables argument to flush_tlb_mm_range smp,cpumask: introduce on_each_cpu_cond_mask smp: use __cpumask_set_cpu in on_each_cpu_cond ... commit 382d72a9aa525b56ab8453ce61751fa712414d3d Merge: ac73e08eda88 5140a6f47113 Author: Linus Torvalds Date: Tue Oct 23 16:47:41 2018 +0100 Merge branch 'x86-hyperv-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 hyperv updates from Ingo Molnar: "Two small changes: a boot warning removal and a minor cleanup" * 'x86-hyperv-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/hyperv: Remove unused include x86/hyperv: Suppress "PCI: Fatal: No config space access function found" commit ac73e08eda885a6723593c45d634b59c63365986 Merge: fec98069fb72 e7b66d16fe41 Author: Linus Torvalds Date: Tue Oct 23 16:31:33 2018 +0100 Merge branch 'x86-grub2-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 grub2 updates from Ingo Molnar: "This extends the x86 boot protocol to include an address for the RSDP table - utilized by Xen currently. Matching Grub2 patches are pending as well. (Juergen Gross)" * 'x86-grub2-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/acpi, x86/boot: Take RSDP address for boot params if available x86/boot: Add ACPI RSDP address to setup_header x86/xen: Fix boot loader version reported for PVH guests commit fec98069fb72fb656304a3e52265e0c2fc9adf87 Merge: 04ce7fae3d4e 995d5f64b62f Author: Linus Torvalds Date: Tue Oct 23 16:16:40 2018 +0100 Merge branch 'x86-cpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 cpu updates from Ingo Molnar: "The main changes in this cycle were: - Add support for the "Dhyana" x86 CPUs by Hygon: these are licensed based on the AMD Zen architecture, and are built and sold in China, for domestic datacenter use. The code is pretty close to AMD support, mostly with a few quirks and enumeration differences. (Pu Wen) - Enable CPUID support on Cyrix 6x86/6x86L processors" * 'x86-cpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: tools/cpupower: Add Hygon Dhyana support cpufreq: Add Hygon Dhyana support ACPI: Add Hygon Dhyana support x86/xen: Add Hygon Dhyana support to Xen x86/kvm: Add Hygon Dhyana support to KVM x86/mce: Add Hygon Dhyana support to the MCA infrastructure x86/bugs: Add Hygon Dhyana to the respective mitigation machinery x86/apic: Add Hygon Dhyana support x86/pci, x86/amd_nb: Add Hygon Dhyana support to PCI and northbridge x86/amd_nb: Check vendor in AMD-only functions x86/alternative: Init ideal_nops for Hygon Dhyana x86/events: Add Hygon Dhyana support to PMU infrastructure x86/smpboot: Do not use BSP INIT delay and MWAIT to idle on Dhyana x86/cpu/mtrr: Support TOP_MEM2 and get MTRR number x86/cpu: Get cache info and setup cache cpumap for Hygon Dhyana x86/cpu: Create Hygon Dhyana architecture support file x86/CPU: Change query logic so CPUID is enabled before testing x86/CPU: Use correct macros for Cyrix calls commit 04ce7fae3d4ed1b045d20da071b96f7dcb93bda8 Merge: 642116d4ac58 b3569d3a4b4f Author: Linus Torvalds Date: Tue Oct 23 16:04:22 2018 +0100 Merge branch 'x86-build-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 build update from Ingo Molnar: "A small cleanup to x86 Kconfigs" * 'x86-build-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/kconfig: Remove redundant 'default n' lines from all x86 Kconfig's commit 642116d4ac58745b8058d32a20ca733020feb290 Merge: e1d20beae70e 44060e8a5189 Author: Linus Torvalds Date: Tue Oct 23 15:54:42 2018 +0100 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 and a bugfix for a rare boot option combination" * 'x86-boot-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/boot/KASLR: Remove return value from handle_mem_options() x86/corruption-check: Use pr_*() instead of printk() x86/corruption-check: Fix panic in memory_corruption_check() when boot option without value is provided commit f9dcf08e2017cad12d771cdd862c8c314b885615 Author: Radim Krčmář Date: Tue Oct 23 16:31:38 2018 +0200 Revert "kvm: x86: optimize dr6 restore" This reverts commit 0e0a53c551317654e2d7885fdfd23299fee99b6b. As Christian Ehrhardt noted: The most common case is that vcpu->arch.dr6 and the host's %dr6 value are not related at all because ->switch_db_regs is zero. To do this all correctly, we must handle the case where the guest leaves an arbitrary unused value in vcpu->arch.dr6 before disabling breakpoints again. However, this means that vcpu->arch.dr6 is not suitable to detect the need for a %dr6 clear. Signed-off-by: Radim Krčmář commit e1d20beae70eb918cca7f07a77ce199fd148fdd2 Merge: cbbfb0ae2ca9 ec3a94188df7 Author: Linus Torvalds Date: Tue Oct 23 15:24:22 2018 +0100 Merge branch 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 asm updates from Ingo Molnar: "The main changes in this cycle were the fsgsbase related preparatory patches from Chang S. Bae - but there's also an optimized memcpy_flushcache() and a cleanup for the __cmpxchg_double() assembly glue" * 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/fsgsbase/64: Clean up various details x86/segments: Introduce the 'CPUNODE' naming to better document the segment limit CPU/node NR trick x86/vdso: Initialize the CPU/node NR segment descriptor earlier x86/vdso: Introduce helper functions for CPU and node number x86/segments/64: Rename the GDT PER_CPU entry to CPU_NUMBER x86/fsgsbase/64: Factor out FS/GS segment loading from __switch_to() x86/fsgsbase/64: Convert the ELF core dump code to the new FSGSBASE helpers x86/fsgsbase/64: Make ptrace use the new FS/GS base helpers x86/fsgsbase/64: Introduce FS/GS base helper functions x86/fsgsbase/64: Fix ptrace() to read the FS/GS base accurately x86/asm: Use CC_SET()/CC_OUT() in __cmpxchg_double() x86/asm: Optimize memcpy_flushcache() commit cbbfb0ae2ca979222297062647ced653682a6cc7 Merge: 42f52e1c59bd 76f99ae5b54d Author: Linus Torvalds Date: Tue Oct 23 15:15:20 2018 +0100 Merge branch 'x86-apic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 apic updates from Ingo Molnar: "Improve the spreading of managed IRQs at allocation time" * 'x86-apic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: irq/matrix: Spread managed interrupts on allocation irq/matrix: Split out the CPU selection code into a helper commit 42f52e1c59bdb78cad945b2dd34fa1f892239a39 Merge: 0d1b82cd8ac2 11e13696a08e Author: Linus Torvalds Date: Tue Oct 23 15:00:03 2018 +0100 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 are: - Migrate CPU-intense 'misfit' tasks on asymmetric capacity systems, to better utilize (much) faster 'big core' CPUs. (Morten Rasmussen, Valentin Schneider) - Topology handling improvements, in particular when CPU capacity changes and related load-balancing fixes/improvements (Morten Rasmussen) - ... plus misc other improvements, fixes and updates" * 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (28 commits) sched/completions/Documentation: Add recommendation for dynamic and ONSTACK completions sched/completions/Documentation: Clean up the document some more sched/completions/Documentation: Fix a couple of punctuation nits cpu/SMT: State SMT is disabled even with nosmt and without "=force" sched/core: Fix comment regarding nr_iowait_cpu() and get_iowait_load() sched/fair: Remove setting task's se->runnable_weight during PELT update sched/fair: Disable LB_BIAS by default sched/pelt: Fix warning and clean up IRQ PELT config sched/topology: Make local variables static sched/debug: Use symbolic names for task state constants sched/numa: Remove unused numa_stats::nr_running field sched/numa: Remove unused code from update_numa_stats() sched/debug: Explicitly cast sched_feat() to bool sched/core: Disable SD_PREFER_SIBLING on asymmetric CPU capacity domains sched/fair: Don't move tasks to lower capacity CPUs unless necessary sched/fair: Set rq->rd->overload when misfit sched/fair: Wrap rq->rd->overload accesses with READ/WRITE_ONCE() sched/core: Change root_domain->overload type to int sched/fair: Change 'prefer_sibling' type to bool sched/fair: Kick nohz balance if rq->misfit_task_load ... commit 14fdc2c5318ae420e68496975f48dc1dbef52649 Author: Will Deacon Date: Mon Oct 22 16:39:01 2018 +0100 Documentation/security-bugs: Clarify treatment of embargoed information The Linux kernel security team has been accused of rejecting the idea of security embargoes. This is incorrect, and could dissuade people from reporting security issues to us under the false assumption that the issue would leak prematurely. Clarify the handling of embargoed information in our process documentation. Co-developed-by: Ingo Molnar Acked-by: Kees Cook Acked-by: Peter Zijlstra Acked-by: Laura Abbott Signed-off-by: Will Deacon Signed-off-by: Ingo Molnar Signed-off-by: Greg Kroah-Hartman commit 0d1b82cd8ac2e8856ae9045c97782ac1c359929c Merge: c05f3642f430 711f76a328cb Author: Linus Torvalds Date: Tue Oct 23 13:46:36 2018 +0100 Merge branch 'ras-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull RAS updates from Ingo Molnar: "Misc smaller fixes and cleanups" * 'ras-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/mcelog: Remove one mce_helper definition x86/mce: Add macros for the corrected error count bit field x86/mce: Use BIT_ULL(x) for bit mask definitions x86/mce-inject: Reset injection struct after injection commit c05f3642f4304dd081876e77a68555b6aba4483f Merge: 0200fbdd4315 dda93b45389f Author: Linus Torvalds Date: Tue Oct 23 13:32:18 2018 +0100 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 updates in this cycle were: - Lots of perf tooling changes too voluminous to list (big perf trace and perf stat improvements, lots of libtraceevent reorganization, etc.), so I'll list the authors and refer to the changelog for details: Benjamin Peterson, Jérémie Galarneau, Kim Phillips, Peter Zijlstra, Ravi Bangoria, Sangwon Hong, Sean V Kelley, Steven Rostedt, Thomas Gleixner, Ding Xiang, Eduardo Habkost, Thomas Richter, Andi Kleen, Sanskriti Sharma, Adrian Hunter, Tzvetomir Stoyanov, Arnaldo Carvalho de Melo, Jiri Olsa. ... with the bulk of the changes written by Jiri Olsa, Tzvetomir Stoyanov and Arnaldo Carvalho de Melo. - Continued intel_rdt work with a focus on playing well with perf events. This also imported some non-perf RDT work due to dependencies. (Reinette Chatre) - Implement counter freezing for Arch Perfmon v4 (Skylake and newer). This allows to speed up the PMI handler by avoiding unnecessary MSR writes and make it more accurate. (Andi Kleen) - kprobes cleanups and simplification (Masami Hiramatsu) - Intel Goldmont PMU updates (Kan Liang) - ... plus misc other fixes and updates" * 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (155 commits) kprobes/x86: Use preempt_enable() in optimized_callback() x86/intel_rdt: Prevent pseudo-locking from using stale pointers kprobes, x86/ptrace.h: Make regs_get_kernel_stack_nth() not fault on bad stack perf/x86/intel: Export mem events only if there's PEBS support x86/cpu: Drop pointless static qualifier in punit_dev_state_show() x86/intel_rdt: Fix initial allocation to consider CDP x86/intel_rdt: CBM overlap should also check for overlap with CDP peer x86/intel_rdt: Introduce utility to obtain CDP peer tools lib traceevent, perf tools: Move struct tep_handler definition in a local header file tools lib traceevent: Separate out tep_strerror() for strerror_r() issues perf python: More portable way to make CFLAGS work with clang perf python: Make clang_has_option() work on Python 3 perf tools: Free temporary 'sys' string in read_event_files() perf tools: Avoid double free in read_event_file() perf tools: Free 'printk' string in parse_ftrace_printk() perf tools: Cleanup trace-event-info 'tdata' leak perf strbuf: Match va_{add,copy} with va_end perf test: S390 does not support watchpoints in test 22 perf auxtrace: Include missing asm/bitsperlong.h to get BITS_PER_LONG tools include: Adopt linux/bits.h ... commit 0200fbdd431519d730b5d399a12840ec832b27cc Merge: de3fbb2aa802 01a14bda11ad Author: Linus Torvalds Date: Tue Oct 23 13:08:53 2018 +0100 Merge branch 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull locking and misc x86 updates from Ingo Molnar: "Lots of changes in this cycle - in part because locking/core attracted a number of related x86 low level work which was easier to handle in a single tree: - Linux Kernel Memory Consistency Model updates (Alan Stern, Paul E. McKenney, Andrea Parri) - lockdep scalability improvements and micro-optimizations (Waiman Long) - rwsem improvements (Waiman Long) - spinlock micro-optimization (Matthew Wilcox) - qspinlocks: Provide a liveness guarantee (more fairness) on x86. (Peter Zijlstra) - Add support for relative references in jump tables on arm64, x86 and s390 to optimize jump labels (Ard Biesheuvel, Heiko Carstens) - Be a lot less permissive on weird (kernel address) uaccess faults on x86: BUG() when uaccess helpers fault on kernel addresses (Jann Horn) - macrofy x86 asm statements to un-confuse the GCC inliner. (Nadav Amit) - ... and a handful of other smaller changes as well" * 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (57 commits) locking/lockdep: Make global debug_locks* variables read-mostly locking/lockdep: Fix debug_locks off performance problem locking/pvqspinlock: Extend node size when pvqspinlock is configured locking/qspinlock_stat: Count instances of nested lock slowpaths locking/qspinlock, x86: Provide liveness guarantee x86/asm: 'Simplify' GEN_*_RMWcc() macros locking/qspinlock: Rework some comments locking/qspinlock: Re-order code locking/lockdep: Remove duplicated 'lock_class_ops' percpu array x86/defconfig: Enable CONFIG_USB_XHCI_HCD=y futex: Replace spin_is_locked() with lockdep locking/lockdep: Make class->ops a percpu counter and move it under CONFIG_DEBUG_LOCKDEP=y x86/jump-labels: Macrofy inline assembly code to work around GCC inlining bugs x86/cpufeature: Macrofy inline assembly code to work around GCC inlining bugs x86/extable: Macrofy inline assembly code to work around GCC inlining bugs x86/paravirt: Work around GCC inlining bugs when compiling paravirt ops x86/bug: Macrofy the BUG table section handling, to work around GCC inlining bugs x86/alternatives: Macrofy lock prefixes to work around GCC inlining bugs x86/refcount: Work around GCC inlining bug x86/objtool: Use asm macros to work around GCC inlining bugs ... commit de3fbb2aa802a267dee2213ae7d5a1e19eb4294a Merge: cee1352f7926 fa70f0d2ce96 Author: Linus Torvalds Date: Tue Oct 23 13:04:03 2018 +0100 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 are: - Add support for enlisting the help of the EFI firmware to create memory reservations that persist across kexec. - Add page fault handling to the runtime services support code on x86 so we can more gracefully recover from buggy EFI firmware. - Fix command line handling on x86 for the boot path that omits the stub's PE/COFF entry point. - Other assorted fixes and updates" * 'efi-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86: boot: Fix EFI stub alignment efi/x86: Call efi_parse_options() from efi_main() efi/x86: earlyprintk - Add 64bit efi fb address support efi/x86: drop task_lock() from efi_switch_mm() efi/x86: Handle page faults occurring while running EFI runtime services efi: Make efi_rts_work accessible to efi page fault handler efi/efi_test: add exporting ResetSystem runtime service efi/libstub: arm: support building with clang efi: add API to reserve memory persistently across kexec reboot efi/arm: libstub: add a root memreserve config table efi: honour memory reservations passed via a linux specific config table commit 84db119f5a83e1bf9cffbc6d9cf16487eda1c056 Author: Ding Xiang Date: Fri Aug 24 01:15:05 2018 -0400 ubifs: Remove unneeded semicolon delete redundant semicolon Signed-off-by: Ding Xiang Signed-off-by: Richard Weinberger commit e453fa60e086786fe89ba15ee8fef80bc2e6ecc3 Author: Sascha Hauer Date: Fri Sep 7 14:36:46 2018 +0200 Documentation: ubifs: Add authentication whitepaper Signed-off-by: Sascha Hauer Signed-off-by: Richard Weinberger commit d8a22773a12c6d78ee758c9e530f3a488bb7cb29 Author: Sascha Hauer Date: Fri Sep 7 14:36:45 2018 +0200 ubifs: Enable authentication support With the preparations all being done this patch now enables authentication support for UBIFS. Authentication is enabled when the newly introduced auth_key and auth_hash_name mount options are passed. auth_key provides the key which is used for authentication whereas auth_hash_name provides the hashing algorithm used for this FS. Passing these options make authentication mandatory and only UBIFS images that can be authenticated with the given key are allowed. Signed-off-by: Sascha Hauer Signed-off-by: Richard Weinberger commit 1e76592f2c3208ac635c2758aa8326d82fa64a72 Author: Sascha Hauer Date: Fri Sep 7 14:36:44 2018 +0200 ubifs: Do not update inode size in-place in authenticated mode In authenticated mode we cannot fixup the inode sizes in-place during recovery as this would invalidate the hashes and HMACs we stored for this inode. Instead, we just write the updated inodes to the journal. We can only do this after ubifs_rcvry_gc_commit() is done though, so for authenticated mode call ubifs_recover_size() after ubifs_rcvry_gc_commit() and not vice versa as normally done. Calling ubifs_recover_size() after ubifs_rcvry_gc_commit() has the drawback that after a commit the size fixup information is gone, so when a powercut happens while recovering from another powercut we may lose some data written right before the first powercut. This is why we only do this in authenticated mode and leave the behaviour for unauthenticated mode untouched. Signed-off-by: Sascha Hauer Signed-off-by: Richard Weinberger commit 104115a3eb54e7e804cd4ef1d6426c0b8aaaeb60 Author: Sascha Hauer Date: Fri Sep 7 14:36:43 2018 +0200 ubifs: Add hashes and HMACs to default filesystem This patch calculates the necessary hashes and HMACs for the default filesystem so that the dynamically created default fs can be authenticated. Signed-off-by: Sascha Hauer Signed-off-by: Richard Weinberger commit e158e02ff70038936d374928a5484f16daa4c7d4 Author: Sascha Hauer Date: Fri Sep 7 14:36:42 2018 +0200 ubifs: authentication: Authenticate super block node This adds a HMAC covering the super block node and adds the logic that decides if a filesystem shall be mounted unauthenticated or authenticated. Signed-off-by: Sascha Hauer Signed-off-by: Richard Weinberger commit b5b1f08369222394540fb4b3b947fe26a2557d1d Author: Sascha Hauer Date: Fri Sep 7 14:36:41 2018 +0200 ubifs: Create hash for default LPT During creation of the default filesystem on an empty flash the default LPT is created. With this patch a hash over the default LPT is calculated which can be added to the default filesystems master node. Signed-off-by: Sascha Hauer Signed-off-by: Richard Weinberger commit 625700ccb5069ec81d15aae3b47282ecc59d63b5 Author: Sascha Hauer Date: Fri Sep 7 14:36:40 2018 +0200 ubfis: authentication: Authenticate master node The master node contains hashes over the root index node and the LPT. This patch adds a HMAC to authenticate the master node itself. Signed-off-by: Sascha Hauer Signed-off-by: Richard Weinberger commit a1dc58140f7e63e3b23050eb43b4e5581cb28c88 Author: Sascha Hauer Date: Fri Sep 7 14:36:39 2018 +0200 ubifs: authentication: Authenticate LPT The LPT needs to be authenticated aswell. Since the LPT is only written during commit it is enough to authenticate the whole LPT with a single hash which is stored in the master node. Only the leaf nodes (pnodes) are hashed which makes the implementation much simpler than it would be to hash the complete LPT. Signed-off-by: Sascha Hauer Signed-off-by: Richard Weinberger commit da8ef65f9573952c717d86f8f501773daf29bd10 Author: Sascha Hauer Date: Fri Sep 7 14:36:38 2018 +0200 ubifs: Authenticate replayed journal Make sure that during replay all buds can be authenticated. To do this we calculate the hash chain until we find an authentication node and check the HMAC in that node against the current status of the hash chain. After a power cut it can happen that some nodes have been written, but not yet the authentication node for them. These nodes have to be discarded during replay. Signed-off-by: Sascha Hauer Signed-off-by: Richard Weinberger commit 6f06d96fdf624be3e1d65c6100704a1fd79a30b7 Author: Sascha Hauer Date: Fri Sep 7 14:36:37 2018 +0200 ubifs: Add auth nodes to garbage collector journal head To be able to authenticate the garbage collector journal head add authentication nodes to the buds the garbage collector creates. Signed-off-by: Sascha Hauer Signed-off-by: Richard Weinberger commit 6a98bc4614de8fac8c6d520a6b20b194e23c9936 Author: Sascha Hauer Date: Fri Sep 7 14:36:36 2018 +0200 ubifs: Add authentication nodes to journal Nodes that are written to flash can only be authenticated through the index after the next commit. When a journal replay is necessary the nodes are not yet referenced by the index and thus can't be authenticated. This patch overcomes this situation by creating a hash over all nodes beginning from the commit start node over the reference node(s) and the buds themselves. From time to time we insert authentication nodes. Authentication nodes contain a HMAC from the current hash state, so that they can be used to authenticate a journal replay up to the point where the authentication node is. The hash is continued afterwards so that theoretically we would only have to check the HMAC of the last authentication node we find. Overall we get this picture: ,,,,,,,, ,......,........................................... ,. CS , hash1.----. hash2.----. ,. | , . |hmac . |hmac ,. v , . v . v ,.REF#0,-> bud -> bud -> bud.-> auth -> bud -> bud.-> auth ... ,..|...,........................................... , | , , | ,,,,,,,,,,,,,,, . | hash3,----. , | , |hmac , v , v , REF#1 -> bud -> bud,-> auth ... ,,,|,,,,,,,,,,,,,,,,,, v REF#2 -> ... | V ... Note how hash3 covers CS, REF#0 and REF#1 so that it is not possible to exchange or skip any reference nodes. Unlike the picture suggests the auth nodes themselves are not hashed. With this it is possible for an offline attacker to cut each journal head or to drop the last reference node(s), but not to skip any journal heads or to reorder any operations. Signed-off-by: Sascha Hauer Signed-off-by: Richard Weinberger commit 16a26b20d2afd0cf063816725b45b12e78d5bb31 Author: Sascha Hauer Date: Fri Sep 7 14:36:35 2018 +0200 ubifs: authentication: Add hashes to index nodes With this patch the hashes over the index nodes stored in the tree node cache are written to flash and are checked when read back from flash. The hash of the root index node is stored in the master node. During journal replay the hashes are regenerated from the read nodes and stored in the tree node cache. This means the nodes must previously be authenticated by other means. This is done in a later patch. Signed-off-by: Sascha Hauer Signed-off-by: Richard Weinberger commit 823838a486888cf484e739ab37df14cb04dfddb5 Author: Sascha Hauer Date: Fri Sep 7 14:36:34 2018 +0200 ubifs: Add hashes to the tree node cache As part of the UBIFS authentication support every branch in the index gets a hash covering the referenced node. To make that happen the tree node cache needs hashes over the nodes. This patch adds a hash argument to ubifs_tnc_add() and ubifs_tnc_add_nm(). The hashes are calculated from the callers of these functions which actually prepare the nodes. With this patch all the leaf nodes of the index tree get hashes, but currently nothing is done with these hashes, this is left for a later patch. Signed-off-by: Sascha Hauer Signed-off-by: Richard Weinberger commit a384b47e4954a0f834749fcbe1c096c40ff5eb35 Author: Sascha Hauer Date: Fri Sep 7 14:36:33 2018 +0200 ubifs: Create functions to embed a HMAC in a node With authentication support some nodes (master node, super block node) get a HMAC embedded into them. This patch adds functions to prepare and write such a node. The difficulty is that besides the HMAC the nodes also have a CRC which must stay valid. This means we first have to initialize all fields in the node, then calculate the HMAC (not covering the CRC) and finally calculate the CRC. Signed-off-by: Sascha Hauer Signed-off-by: Richard Weinberger commit 49525e5eecca5e1b4a83ac217868e8d8b843539f Author: Sascha Hauer Date: Fri Sep 7 14:36:32 2018 +0200 ubifs: Add helper functions for authentication support This patch adds the various helper functions needed for authentication support. We need functions to hash nodes, to embed HMACs into a node and to compare hashes and HMACs. Most functions first check if this filesystem is authenticated and bail out early if not, which makes the functions safe to be called with disabled authentication. Signed-off-by: Sascha Hauer Signed-off-by: Richard Weinberger commit dead97266f1034d1cabd9a50641163d909559816 Author: Sascha Hauer Date: Fri Sep 7 14:36:31 2018 +0200 ubifs: Add separate functions to init/crc a node When adding authentication support we will embed a HMAC into some nodes. To prepare these nodes we have to first initialize the nodes, then add a HMAC and finally add a CRC. To accomplish this add separate ubifs_init_node/ubifs_crc_node functions. Signed-off-by: Sascha Hauer Signed-off-by: Richard Weinberger commit 5125cfdff13a4da4c34a053cd67e99083aece028 Author: Sascha Hauer Date: Fri Sep 7 14:36:30 2018 +0200 ubifs: Format changes for authentication support This patch adds the changes to the on disk format needed for authentication support. We'll add: * a HMAC covering super block node * a HMAC covering the master node * a hash over the root index node to the master node * a hash over the LPT to the master node * a flag to the filesystem flag indicating the filesystem is authenticated * an authentication node necessary to authenticate the nodes written to the journal heads while they are written. * a HMAC of a well known message to the super block node to be able to check if the correct key is provided And finally, not visible in this patch, nevertheless explained here: * hashes over the referenced child nodes in each branch of a index node Signed-off-by: Sascha Hauer Signed-off-by: Richard Weinberger commit fd6150051becd3a9f8039046e3af91fd9ef01e57 Author: Sascha Hauer Date: Fri Sep 7 14:36:29 2018 +0200 ubifs: Store read superblock node The superblock node is read/modified/written several times throughout the UBIFS code. Instead of reading it from the device each time just keep a copy in memory and write back the modified copy when necessary. This patch helps for authentication support, here we not only have to read the superblock node, but also have to authenticate it, which is easier if we do it once during initialization. Signed-off-by: Sascha Hauer Signed-off-by: Richard Weinberger commit 83407437bbeae39551195861e51608c9638ffda4 Author: Sascha Hauer Date: Fri Sep 7 14:36:28 2018 +0200 ubifs: Drop write_node write_node() is used only once and can easily be replaced with calls to ubifs_prepare_node()/write_head() which makes the code a bit shorter. Signed-off-by: Sascha Hauer Signed-off-by: Richard Weinberger commit e635cf8c3bbd7b9bd3e282156c6cc4f818b72ee9 Author: Sascha Hauer Date: Fri Sep 7 14:36:27 2018 +0200 ubifs: Implement ubifs_lpt_lookup using ubifs_pnode_lookup ubifs_lpt_lookup() starts by looking up the nth pnode in the LPT. We already have this functionality in ubifs_pnode_lookup(). Use this function rather than open coding its functionality. Signed-off-by: Sascha Hauer Signed-off-by: Richard Weinberger commit 0e26b6e2551e21df72c140e46819523e1b686009 Author: Sascha Hauer Date: Fri Sep 7 14:36:26 2018 +0200 ubifs: Export pnode_lookup as ubifs_pnode_lookup ubifs_lpt_lookup could be implemented using pnode_lookup. To make that possible move pnode_lookup from lpt.c to lpt_commit.c. Rename it to ubifs_pnode_lookup since it's now exported. Signed-off-by: Sascha Hauer Signed-off-by: Richard Weinberger commit 22ceaa8c688d0c8a6fc6eb7ebf32c01914220d0a Author: Sascha Hauer Date: Fri Sep 7 14:36:25 2018 +0200 ubifs: Pass ubifs_zbranch to read_znode() read_znode() takes len, lnum and offs arguments which the caller all extracts from the same struct ubifs_zbranch *. When adding authentication support we would have to add a pointer to a hash to the arguments which is also part of struct ubifs_zbranch. Pass the ubifs_zbranch * instead so that we do not have to add another argument. Signed-off-by: Sascha Hauer Signed-off-by: Richard Weinberger commit 545bc8f6b0c60eee789a91ac1f8c9a16467b2fc5 Author: Sascha Hauer Date: Fri Sep 7 14:36:24 2018 +0200 ubifs: Pass ubifs_zbranch to try_read_node() try_read_node() takes len, lnum and offs arguments which the caller all extracts from the same struct ubifs_zbranch *. When adding authentication support we would have to add a pointer to a hash to the arguments which is also part of struct ubifs_zbranch. Pass the ubifs_zbranch * instead so that we do not have to add another argument. Signed-off-by: Sascha Hauer Signed-off-by: Richard Weinberger commit c4de6d7e4319ffb52d6db3138057712749540191 Author: Sascha Hauer Date: Fri Sep 7 14:36:23 2018 +0200 ubifs: Refactor create_default_filesystem() create_default_filesystem() allocates memory for a node, writes that node and frees the memory directly afterwards. With this patch we allocate memory for all nodes at the beginning of the function and free the memory at the end. This makes it easier to implement authentication support since with authentication support we'll need the contents of some nodes when creating other nodes. Signed-off-by: Sascha Hauer Signed-off-by: Richard Weinberger commit 7e5583fd77194b45eef04835576a4fe7f3f235c8 Author: Gustavo A. R. Silva Date: Fri Oct 5 10:29:31 2018 +0200 ubi: Mark expected switch fall-throughs In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 1373884 ("Missing break in switch") Addresses-Coverity-ID: 114869 ("Missing break in switch") Addresses-Coverity-ID: 114870 ("Missing break in switch") Signed-off-by: Gustavo A. R. Silva Signed-off-by: Richard Weinberger commit 46011e9755e9af6ef90bb59522d315d781d2307b Merge: 5099bc83ba11 7ffa13be4945 Author: Jiri Kosina Date: Tue Oct 23 13:36:28 2018 +0200 Merge branch 'for-4.20/multitouch' into for-linus hid-multitouch driver cleanup commit 5099bc83ba11ff38a530ebebed678f23877a2b2d Merge: 276e722761a1 830e82aa48f3 Author: Jiri Kosina Date: Tue Oct 23 13:36:05 2018 +0200 Merge branch 'for-4.20/microsoft' into for-linus Rumble support for Xbox One S commit 276e722761a1c7903fbfb065420fd1850b00f1dd Merge: 4e7be68e8d0f d9ca1c990a7f Author: Jiri Kosina Date: Tue Oct 23 13:35:22 2018 +0200 Merge branch 'for-4.20/logitech-highres' into for-linus High-resolution support for hid-logitech commit 4e7be68e8d0f7bb3c030cdfa442d298457197751 Merge: a600ffe6ec60 9ee3e06610fd Author: Jiri Kosina Date: Tue Oct 23 13:34:28 2018 +0200 Merge branch 'for-4.20/i2c-hid' into for-linus - general cleanups of hid-i2c driver - SPIODEV device descriptor fixes commit cee1352f792646ae87e65f8bfb0ae91ff3d2cb95 Merge: e2b623fbe6a3 d0346559a7c3 Author: Linus Torvalds Date: Tue Oct 23 12:31:17 2018 +0100 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 change in this cycle is the conclusion of the big 'simplify RCU to two primary flavors' consolidation work - i.e. there's a single RCU flavor for any kernel variant (PREEMPT and !PREEMPT): - Consolidate the RCU-bh, RCU-preempt, and RCU-sched flavors into a single flavor similar to RCU-sched in !PREEMPT kernels and into a single flavor similar to RCU-preempt (but also waiting on preempt-disabled sequences of code) in PREEMPT kernels. This branch also includes a refactoring of rcu_{nmi,irq}_{enter,exit}() from Byungchul Park. - Now that there is only one RCU flavor in any given running kernel, the many "rsp" pointers are no longer required, and this cleanup series removes them. - This branch carries out additional cleanups made possible by the RCU flavor consolidation, including inlining now-trivial functions, updating comments and definitions, and removing now-unneeded rcutorture scenarios. - Now that there is only one flavor of RCU in any running kernel, there is also only on rcu_data structure per CPU. This means that the rcu_dynticks structure can be merged into the rcu_data structure, a task taken on by this branch. This branch also contains a -rt-related fix from Mike Galbraith. There were also other updates: - Documentation updates, including some good-eye catches from Joel Fernandes. - SRCU updates, most notably changes enabling call_srcu() to be invoked very early in the boot sequence. - Torture-test updates, including some preliminary work towards making rcutorture better able to find problems that result in insufficient grace-period forward progress. - Initial changes to RCU to better promote forward progress of grace periods, including fixing a bug found by Marius Hillenbrand and David Woodhouse, with the fix suggested by Peter Zijlstra" * 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (140 commits) srcu: Make early-boot call_srcu() reuse workqueue lists rcutorture: Test early boot call_srcu() srcu: Make call_srcu() available during very early boot rcu: Convert rcu_state.ofl_lock to raw_spinlock_t rcu: Remove obsolete ->dynticks_fqs and ->cond_resched_completed rcu: Switch ->dynticks to rcu_data structure, remove rcu_dynticks rcu: Switch dyntick nesting counters to rcu_data structure rcu: Switch urgent quiescent-state requests to rcu_data structure rcu: Switch lazy counts to rcu_data structure rcu: Switch last accelerate/advance to rcu_data structure rcu: Switch ->tick_nohz_enabled_snap to rcu_data structure rcu: Merge rcu_dynticks structure into rcu_data structure rcu: Remove unused rcu_dynticks_snap() from Tiny RCU rcu: Convert "1UL << x" to "BIT(x)" rcu: Avoid resched_cpu() when rescheduling the current CPU rcu: More aggressively enlist scheduler aid for nohz_full CPUs rcu: Compute jiffies_till_sched_qs from other kernel parameters rcu: Provide functions for determining if call_rcu() has been invoked rcu: Eliminate ->rcu_qs_ctr from the rcu_dynticks structure rcu: Motivate Tiny RCU forward progress ... commit a600ffe6ec609b0600ec590236f97f8d430e0984 Merge: d19031d32cd7 23e542e5ba5e Author: Jiri Kosina Date: Tue Oct 23 13:19:54 2018 +0200 Merge branch 'for-4.20/google' into for-linus Whisker device specific fixes to hid-google driver commit d19031d32cd77b2878a006040e0f8e4183ca59ef Merge: d93af50ed68c 75f1f19bdd60 Author: Jiri Kosina Date: Tue Oct 23 13:19:03 2018 +0200 Merge branch 'for-4.20/cougar' into for-linus Functional fixes for hid-cougar driver commit d93af50ed68c0f079fa10491c6bd56daf74d601b Merge: 037ad063f797 8473a93d1ba5 Author: Jiri Kosina Date: Tue Oct 23 13:17:27 2018 +0200 Merge branch 'for-4.20/core' into for-linus Fixes and new features for driver core. Highlights: - maximum global item tag report size gets increased to 256 - improved INPUT_PROP reporting for Digitizer devices commit 037ad063f7977176323da9299102e706674486e5 Merge: 472475000979 256a90ed9e46 Author: Jiri Kosina Date: Tue Oct 23 13:17:00 2018 +0200 Merge branch 'for-4.20/bigbenff' into for-linus Driver for BigBen Interactive PS3OFMINIPAD commit 472475000979a156bc32cd75caa59737f5a1caa5 Merge: 712fca63f50a 9d7b18668956 Author: Jiri Kosina Date: Tue Oct 23 13:16:33 2018 +0200 Merge branch 'for-4.20/apple' into for-linus Support for Apple Magic Trackpad 2 commit 712fca63f50a87780ca6dc105370557a945a7ee8 Merge: 9ff3541e3ddf ce9d58d3eafc Author: Jiri Kosina Date: Tue Oct 23 13:15:57 2018 +0200 Merge branch 'for-4.19/fixes' into for-linus A few device ID-specific quirks commit dda93b45389f025fd3422d22cc31cc1ea6040305 Merge: 2e62024c265a b61b8bba18fe Author: Ingo Molnar Date: Tue Oct 23 12:30:19 2018 +0200 Merge branch 'x86/cache' into perf/core, to pick up fixes Signed-off-by: Ingo Molnar commit e2b623fbe6a34bce1332584212ae101ebc2508f5 Merge: 70408a9987d1 f822ad2c2c03 Author: Linus Torvalds Date: Tue Oct 23 11:14:47 2018 +0100 Merge tag 's390-4.20-1' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 updates from Martin Schwidefsky: - Improved access control for the zcrypt driver, multiple device nodes can now be created with different access control lists - Extend the pkey API to provide random protected keys, this is useful for encrypted swap device with ephemeral protected keys - Add support for virtually mapped kernel stacks - Rework the early boot code, this moves the memory detection into the boot code that runs prior to decompression. - Add KASAN support - Bug fixes and cleanups * tag 's390-4.20-1' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (83 commits) s390/pkey: move pckmo subfunction available checks away from module init s390/kasan: support preemptible kernel build s390/pkey: Load pkey kernel module automatically s390/perf: Return error when debug_register fails s390/sthyi: Fix machine name validity indication s390/zcrypt: fix broken zcrypt_send_cprb in-kernel api function s390/vmalloc: fix VMALLOC_START calculation s390/mem_detect: add missing include s390/dumpstack: print psw mask and address again s390/crypto: Enhance paes cipher to accept variable length key material s390/pkey: Introduce new API for transforming key blobs s390/pkey: Introduce new API for random protected key verification s390/pkey: Add sysfs attributes to emit secure key blobs s390/pkey: Add sysfs attributes to emit protected key blobs s390/pkey: Define protected key blob format s390/pkey: Introduce new API for random protected key generation s390/zcrypt: add ap_adapter_mask sysfs attribute s390/zcrypt: provide apfs failure code on type 86 error reply s390/zcrypt: zcrypt device driver cleanup s390/kasan: add support for mem= kernel parameter ... commit 70408a9987d1ffac006e21b965f0c30dd22b0af2 Merge: a4648c75b95d 02b4da5f84d1 Author: Linus Torvalds Date: Tue Oct 23 11:06:43 2018 +0100 Merge tag 'please-pull-next' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux Pull ia64 updates from Tony Luck: "Miscellaneous ia64 fixes from Christoph" * tag 'please-pull-next' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux: intel-iommu: mark intel_dma_ops static ia64: remove machvec_dma_sync_{single,sg} ia64/sn2: remove no-ops dma sync methods ia64: remove the unused iommu_dma_init function ia64: remove the unused pci_iommu_shutdown function ia64: remove the unused bad_dma_address symbol ia64: remove iommu_dma_supported ia64: remove the dead iommu_sac_force variable ia64: remove the kern_mem_attribute export commit a4648c75b95d972e08f84529c4e8ee4f81cf09e4 Merge: 58a022870787 7250f422da04 Author: Linus Torvalds Date: Tue Oct 23 11:02:05 2018 +0100 Merge branch 'stable/for-linus-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/swiotlb Pull xen swiotlb fix from Konrad Rzeszutek Wilk: "One tiny fix for the Xen SWIOTLB mechanism that occasionally happened with devices that didn't allocate size in power of two but rather some odd sizes. We neglected to make the memory coherent leading to all kinds of fun crashes" * 'stable/for-linus-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/swiotlb: xen-swiotlb: use actually allocated size on check physical continuous commit 6be0f96d799f487f05eb412d362d5a1747d665c2 Author: Olivier Moysan Date: Mon Oct 22 17:10:46 2018 +0200 ASoC: stm32: sai: fix master clock naming Fixes: 8307b2afd386 ("ASoC: stm32: sai: set sai as mclk clock provider") Fix warning issued by strncat when bound equals to source length. Signed-off-by: Olivier Moysan Signed-off-by: Mark Brown commit e6d7942ce602e99d506a7c08f1935a274645dfda Author: Olivier Moysan Date: Mon Oct 22 17:10:45 2018 +0200 ASoC: stm32: add clock dependency for sai Fixes: 8307b2afd386 ("ASoC: stm32: sai: set sai as mclk clock provider") Add COMMON_CLK dependency for STM32 SAI, as it is required by clock provider. Signed-off-by: Olivier Moysan Signed-off-by: Mark Brown commit 58a0228707870c8330917f919804986855443a19 Merge: 12dd08fa954f 0a1875ad29ef Author: Linus Torvalds Date: Tue Oct 23 10:33:16 2018 +0100 Merge tag 'acpi-4.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI updates from Rafael Wysocki: "These fix ACPICA issues related to the handling of module-level AML, fix an ordering issue during ACPI initialization, update ACPICA to upstream revision 20181003 (including fixes mostly), fix issues with system-wide suspend/resume related to the ACPI driver for Intel SoCs (LPSS), fix device enumeration issues on boards with Dollar Cove or Whiskey Cove Intel PMICs, prevent ACPICA from calling ktime_get() in unsuitable conditions, update a few drivers and clean up some code in several places. Specifics: - Fix ACPICA issues related to the handling of module-level AML and make the ACPI initialization code parse ECDT before loading the definition block tables (Erik Schmauss). - Update ACPICA to upstream revision 20181003 including fixes related to the ill-defined "generic serial bus" and the handling of the _REG object (Bob Moore). - Fix some issues with system-wide suspend/resume on Intel BYT/CHT related to the handling of I2C controllers in the ACPI LPSS driver for Intel SoCs (Hans de Goede). - Modify the ACPI namespace scanning code to enumerate INT33FE HID devices as platform devices with I2C resources to avoid device enumeration problems on boards with Dollar Cove or Whiskey Cove Intel PMICs (Hans de Goede). - Prevent ACPICA from using ktime_get() during early resume from system-wide suspend before resuming the timekeeping which generally is unsafe and triggers a warning from the timekeeping code (Bart Van Assche). - Add low-level real time clock support to the ACPI Time and Aalarm Device (TAD) driver (Rafael Wysocki). - Fix the ACPI SBS driver to avoid GPE storms on MacBook Pro and Oopses when removing modules (Ronald Tschalär). - Fix the ACPI PPTT parsing code to handle architecturally unknown cache types properly (Jeffrey Hugo). - Fix initialization issue in the ACPI processor driver (Dou Liyang). - Clean up the code in several places (Andy Shevchenko, Bartlomiej Zolnierkiewicz, David Arcari, zhong jiang)" * tag 'acpi-4.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (33 commits) ACPI / scan: Create platform device for INT33FE ACPI nodes ACPI / OSL: Use 'jiffies' as the time bassis for acpi_os_get_timer() ACPI: probe ECDT before loading AML tables regardless of module-level code flag ACPICA: Remove acpi_gbl_group_module_level_code and only use acpi_gbl_execute_tables_as_methods instead ACPICA: AML Parser: fix parse loop to correctly skip erroneous extended opcodes ACPICA: AML interpreter: add region addresses in global list during initialization ACPI: TAD: Add low-level support for real time capability ACPI: remove redundant 'default n' from Kconfig ACPI / SBS: Fix rare oops when removing modules ACPI / SBS: Fix GPE storm on recent MacBookPro's ACPI/PPTT: Handle architecturally unknown cache types drivers: base: cacheinfo: Do not populate sysfs for unknown cache types ACPICA: Update version to 20181003 ACPICA: Never run _REG on system_memory and system_IO ACPICA: Split large interpreter file ACPICA: Update for field unit access ACPICA: Rename some of the Field Attribute defines ACPICA: Update for generic_serial_bus and attrib_raw_process_bytes protocol ACPI / processor: Fix the return value of acpi_processor_ids_walk() ACPI / LPSS: Resume BYT/CHT I2C controllers from resume_noirq ... commit 12dd08fa954fb7c327382ead3bb9ac861f9b9b69 Merge: 72f86d080560 cc19b05e3883 Author: Linus Torvalds Date: Tue Oct 23 10:28:21 2018 +0100 Merge tag 'pm-4.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management updates from Rafael Wysocki: "These make hibernation on 32-bit x86 systems work in all of the cases in which it works on 64-bit x86 ones, update the menu cpuidle governor and the "polling" state to make them more efficient, add more hardware support to cpufreq drivers and fix issues with some of them, fix a bug in the conservative cpufreq governor, fix the operating performance points (OPP) framework and make it more stable, update the devfreq subsystem to take changes in the APIs used by into account and clean up some things all over. Specifics: - Backport hibernation bug fixes from x86-64 to x86-32 and consolidate hibernation handling on x86 to allow 32-bit systems to work in all of the cases in which 64-bit ones work (Zhimin Gu, Chen Yu). - Fix hibernation documentation (Vladimir D. Seleznev). - Update the menu cpuidle governor to fix a couple of issues with it, make it more efficient in some cases and clean it up (Rafael Wysocki). - Rework the cpuidle polling state implementation to make it more efficient (Rafael Wysocki). - Clean up the cpuidle core somewhat (Fieah Lim). - Fix the cpufreq conservative governor to take policy limits into account properly in some cases (Rafael Wysocki). - Add support for retrieving guaranteed performance information to the ACPI CPPC library and make the intel_pstate driver use it to expose the CPU base frequency via sysfs on systems with the hardware-managed P-states (HWP) feature enabled (Srinivas Pandruvada). - Fix clang warning in the CPPC cpufreq driver (Nathan Chancellor). - Get rid of device_node.name printing from cpufreq (Rob Herring). - Remove unnecessary unlikely() from the cpufreq core (Igor Stoppa). - Add support for the r8a7744 SoC to the cpufreq-dt driver (Biju Das). - Update the dt-platdev cpufreq driver to allow RK3399 to have separate tunables per cluster (Dmitry Torokhov). - Fix the dma_alloc_coherent() usage in the tegra186 cpufreq driver (Christoph Hellwig). - Make the imx6q cpufreq driver read OCOTP through nvmem for imx6ul/imx6ull (Anson Huang). - Fix several bugs in the operating performance points (OPP) framework and make it more stable (Viresh Kumar, Dave Gerlach). - Update the devfreq subsystem to take changes in the APIs used by into account, fix some issues with it and make it stop print device_node.name directly (Bjorn Andersson, Enric Balletbo i Serra, Matthias Kaehlcke, Rob Herring, Vincent Donnefort, zhong jiang). - Prepare the generic power domains (genpd) framework for dealing with domains containing CPUs (Ulf Hansson). - Prevent sysfs attributes representing low-power S0 residency counters from being exposed if low-power S0 support is not indicated in ACPI FADT (Rajneesh Bhardwaj). - Get rid of custom CPU features macros for Intel CPUs from the intel_idle and RAPL drivers (Andy Shevchenko). - Update the tasks freezer to list tasks that refused to freeze and caused a system transition to a sleep state to be aborted (Todd Brandt). - Update the pm-graph set of tools to v5.2 (Todd Brandt). - Fix some issues in the cpupower utility (Anders Roxell, Prarit Bhargava)" * tag 'pm-4.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (73 commits) PM / Domains: Document flags for genpd PM / Domains: Deal with multiple states but no governor in genpd PM / Domains: Don't treat zero found compatible idle states as an error cpuidle: menu: Avoid computations when result will be discarded cpuidle: menu: Drop redundant comparison cpufreq: tegra186: don't pass GFP_DMA32 to dma_alloc_coherent() cpufreq: conservative: Take limits changes into account properly Documentation: intel_pstate: Add base_frequency information cpufreq: intel_pstate: Add base_frequency attribute ACPI / CPPC: Add support for guaranteed performance cpuidle: menu: Simplify checks related to the polling state PM / tools: sleepgraph and bootgraph: upgrade to v5.2 PM / tools: sleepgraph: first batch of v5.2 changes cpupower: Fix coredump on VMWare cpupower: Fix AMD Family 0x17 msr_pstate size cpufreq: imx6q: read OCOTP through nvmem for imx6ul/imx6ull cpufreq: dt-platdev: allow RK3399 to have separate tunables per cluster cpuidle: poll_state: Revise loop termination condition cpuidle: menu: Move the latency_req == 0 special case check cpuidle: menu: Avoid computations for very close timers ... commit 72f86d080560d77069dd67b067a69578731320e4 Merge: c403993a41d5 95691e3eddc4 Author: Linus Torvalds Date: Tue Oct 23 10:22:33 2018 +0100 Merge branch 'pcmcia-next' of git://git.kernel.org/pub/scm/linux/kernel/git/brodo/linux Pull pcmcia fixes from Dominik Brodowski: "These are just a few odd fixes and improvements to the PCMCIA core and to a few PCMCIA device drivers" * 'pcmcia-next' of git://git.kernel.org/pub/scm/linux/kernel/git/brodo/linux: pcmcia: Implement CLKRUN protocol disabling for Ricoh bridges pcmcia: pcmcia_resource: Replace mdelay() with msleep() pcmcia: add error handling for pcmcia_enable_device in qlogic_stub char: pcmcia: cm4000_cs: Replace mdelay with usleep_range in set_protocol pcmcia: Use module_pcmcia_driver for scsi drivers pcmcia: remove KERN_INFO level from debug message commit c403993a41d50db1e7d9bc2d43c3c8498162312f Merge: 6fd577cd4b25 0711e8c1b457 Author: Linus Torvalds Date: Tue Oct 23 09:42:05 2018 +0100 Merge tag 'for-linus-4.20' of https://github.com/cminyard/linux-ipmi Pull IPMI updates from Corey Minyard: "Lots of small changes to the IPMI driver. Most of the changes are logging cleanup and style fixes. There are a few smaller bug fixes" * tag 'for-linus-4.20' of https://github.com/cminyard/linux-ipmi: (21 commits) ipmi: Fix timer race with module unload ipmi:ssif: Add support for multi-part transmit messages > 2 parts MAINTAINERS: Add file patterns for ipmi device tree bindings ipmi: Remove platform driver overrides and use the id_table ipmi: Free the address list on module cleanup ipmi: Don't leave holes in the I2C address list in the ssif driver ipmi: fix return value of ipmi_set_my_LUN ipmi: Convert pr_xxx() to dev_xxx() in the BT code ipmi:dmi: Ignore IPMI SMBIOS entries with a zero base address ipmi:dmi: Use pr_fmt in the IPMI DMI code ipmi: Change to ktime_get_ts64() ipmi_si: fix potential integer overflow on large shift ipmi_si_pci: fix NULL device in ipmi_si error message ipmi: Convert printk(KERN_ to pr_( ipmi: Use more common logging styles ipmi: msghandler: Add and use pr_fmt and dev_fmt, remove PFX pci:ipmi: Move IPMI PCI class id defines to pci_ids.h ipmi: Finally get rid of ipmi_user_t and ipmi_smi_t ipmi:powernv: Convert ipmi_smi_t to struct ipmi_smi hwmon:ibm: Change ipmi_user_t to struct ipmi_user * ... commit 6eb357844373f833f085e63e6c8c026a61568c57 Author: Nathan Chancellor Date: Wed Sep 26 20:33:17 2018 -0700 mfd: cros_ec: Avoid unneeded internal declaration warning Clang warns: drivers/mfd/cros_ec_dev.c:509:40: warning: variable 'cros_ec_id' is not needed and will not be emitted [-Wunneeded-internal-declaration] static const struct platform_device_id cros_ec_id[] = { ^ 1 warning generated. Avoid this warning by adding it to the cros_ec_dev_driver definition under the id_table member like all other platform drivers. Signed-off-by: Nathan Chancellor Signed-off-by: Lee Jones commit 697894b9b8478764d59e1e1ae6caa4e9dd11eb51 Author: Pavel Machek Date: Tue Sep 11 23:06:50 2018 +0200 mfd: ti-lmu: Use of_device_get_match_data() helper Replace of_match_device() with of_device_get_match_data(), which slightly decreases lines of code and allows to move the DT table next to the I2C table. Signed-off-by: Sebastian Reichel Signed-off-by: Pavel Machek Signed-off-by: Lee Jones commit 7891d37509cca01f383e8349831ee0adc0724e77 Author: Pavel Machek Date: Tue Sep 11 23:03:44 2018 +0200 mfd: ti-lmu: Use managed resource for everything This replaces all remaining unmanaged resources with device managed ones, so that the remove function is no longer needed. This makes the code slightly shorter and fixes two problems: 1. The hardware is disabled after the child devices have been removed. Previously there was a potential race condition. 2. The hardware is disabled when mfd_add_devices fails during probe. Signed-off-by: Sebastian Reichel Signed-off-by: Pavel Machek Signed-off-by: Lee Jones commit 7a6a395b16c3fdcd2ede2b0ce4bf63f6dafc1fea Author: Pavel Machek Date: Tue Sep 11 23:01:33 2018 +0200 mfd: ti-lmu: Switch to GPIOD Use new descriptor based API instead of the legacy one. Signed-off-by: Sebastian Reichel Signed-off-by: Pavel Machek Signed-off-by: Lee Jones commit 5b6850fa90c581f3743bb369861074d23d0e9f3c Author: Sebastian Reichel Date: Wed Aug 29 11:31:09 2018 +0200 mfd: ti-lmu: constify mfd_cell tables Add const attribute to all mfd_cell structures. Signed-off-by: Sebastian Reichel Signed-off-by: Pavel Machek Signed-off-by: Lee Jones commit c1aaaa1cb7c82fe53463fba4928405fddcc4ea27 Author: Marek Szyprowski Date: Wed Sep 5 16:36:06 2018 +0200 mfd: max8997: Disable interrupt handling for suspend/resume cycle Disable IRQs during suspend/resume cycle to ensure handling of wakeup interrupts (i.e. RTC wake alarm) after max8997_resume(). This way it can be properly handled when I2C bus is finally available. This pattern is also used in other MAX PMIC MFD drivers. Signed-off-by: Marek Szyprowski Reviewed-by: Krzysztof Kozlowski Signed-off-by: Lee Jones commit efddff27c886e729a7f84a7205bd84d7d4af7336 Author: Marek Szyprowski Date: Wed Sep 5 13:54:07 2018 +0200 mfd: max8997: Enale irq-wakeup unconditionally IRQ wake up support for MAX8997 driver was initially configured by respective property in pdata. However, after the driver conversion to device-tree, setting it was left as 'todo'. Nowadays most of other PMIC MFD drivers initialized from device-tree assume that they can be an irq wakeup source, so enable it also for MAX8997. This fixes support for wakeup from MAX8997 RTC alarm. Signed-off-by: Marek Szyprowski Reviewed-by: Krzysztof Kozlowski Signed-off-by: Lee Jones commit 8e27a5638ab5c1b5434a0c22bc43ec6c3f7f5b6b Author: Colin Ian King Date: Tue Sep 4 15:15:53 2018 +0100 mfd: arizona: Make array mclk_name static, shrinks object size Don't populate the array mclk_name on the stack but instead make it static. Makes the object code smaller by 23 bytes: Before: text data bss dec hex filename 38050 11604 64 49718 c236 linux/drivers/mfd/arizona-core.o After: text data bss dec hex filename 38027 11604 64 49695 c21f linux/drivers/mfd/arizona-core.o (gcc version 8.2.0 x86_64) Signed-off-by: Colin Ian King Acked-by: Charles Keepax Signed-off-by: Lee Jones commit 1e984d6d3b3f150a7344fb16b8d52cad7298713c Author: Andy Shevchenko Date: Thu Aug 30 19:52:55 2018 +0300 MAINTAINERS: Add myself as designated reviewer of Intel MFD PMIC There are few Intel MFD PMIC device drivers which I would like to review. Note, Intel MSIC is old system controller that based mostly on PMIC integrated in it. Thus, I included it as well. Signed-off-by: Andy Shevchenko Reviewed-by: Mika Westerberg Signed-off-by: Lee Jones commit 26c7e05a69d3843abb0e5389e7f538cd175c0f09 Author: Andy Shevchenko Date: Thu Aug 30 19:52:54 2018 +0300 mfd: Convert Intel PMIC drivers to use SPDX identifier 1;5201;0c Reduce size of duplicated comments by switching to use SPDX identifier. No functional change. Signed-off-by: Andy Shevchenko Reviewed-by: Mika Westerberg Signed-off-by: Lee Jones commit 51eeee8e4e41b110b1afa374a9e7a532f4fb3e24 Author: Andy Shevchenko Date: Thu Aug 30 19:52:53 2018 +0300 mfd: Sort headers alphabetically for Intel PMIC drivers Sort headers alphabetically for better maintenance. No functional change. Signed-off-by: Andy Shevchenko Reviewed-by: Mika Westerberg Signed-off-by: Lee Jones commit 9f8ddee1dab836ca758ca8fc555ab5a3aaa5d3fd Author: Andy Shevchenko Date: Thu Aug 30 19:52:52 2018 +0300 mfd: intel_soc_pmic_bxtwc: Chain power button IRQs as well Power button IRQ actually has a second level of interrupts to distinguish between UI and POWER buttons. Moreover, current implementation looks awkward in approach to handle second level IRQs by first level related IRQ chip. To address above issues, split power button IRQ to be chained as well. Signed-off-by: Andy Shevchenko Reviewed-by: Mika Westerberg Signed-off-by: Lee Jones commit 8bd2d03e54bbe2c75802c81f5635ebb4c36f7a2c Author: Andy Shevchenko Date: Thu Aug 30 19:52:51 2018 +0300 mfd: intel_soc_pmic_crc: Use REGMAP_IRQ_REG() macro Instead of open coding each data structure with regmap IRQresources, use dedicated macro. No functional change intended. Signed-off-by: Andy Shevchenko Reviewed-by: Mika Westerberg Signed-off-by: Lee Jones commit 0ce8ea71fae006fce5ddd7fc6f22d1a6c72375a6 Author: Andy Shevchenko Date: Thu Aug 30 19:52:50 2018 +0300 mfd: intel_soc_pmic_crc: Use DEFINE_RES_IRQ_NAMED() macro Instead of open coding each data structure with IRQ resources, use dedicated macro. No functional change intended. Signed-off-by: Andy Shevchenko Reviewed-by: Mika Westerberg Signed-off-by: Lee Jones commit 95d617b4d66cd783f643cb763c096c2ce5f6b490 Author: Andy Shevchenko Date: Thu Aug 30 19:52:49 2018 +0300 mfd: intel_msic: Use DEFINE_RES_IRQ() macro Instead of open coding each data structure with IRQ resources, use dedicated macro. In one case use DEFINE_RES_IRQ_NAMED() and DEFINE_RES_MEM_NAMED(). No functional change intended. Signed-off-by: Andy Shevchenko Reviewed-by: Mika Westerberg Signed-off-by: Lee Jones commit 86f955d29ff83e15da62ad5de53a5480309da078 Author: Sebastian Reichel Date: Wed Aug 29 11:31:04 2018 +0200 mfd: motorola-cpcap: Add audio-codec support Add support for the audio-codec node by converting from devm_of_platform_populate() to devm_mfd_add_devices(). Tested-by: Pavel Machek Acked-by: Tony Lindgren Signed-off-by: Sebastian Reichel Signed-off-by: Pavel Machek Signed-off-by: Lee Jones commit 55143439b7b501882bea9d95a54adfe00ffc79a3 Author: Fabio Estevam Date: Tue Aug 28 17:02:40 2018 -0300 mfd: mc13xxx-core: Fix PMIC shutdown when reading ADC values When trying to read any MC13892 ADC channel on a imx51-babbage board: The MC13892 PMIC shutdowns completely. After debugging this issue and comparing the MC13892 and MC13783 initializations done in the vendor kernel, it was noticed that the CHRGRAWDIV bit of the ADC0 register was not being set. This bit is set by default after power on, but the driver was clearing it. After setting this bit it is possible to read the ADC values correctly. Signed-off-by: Fabio Estevam Tested-by: Chris Healy Signed-off-by: Lee Jones commit 6360e40f421fba0a11bbabaa211c9c22c5cf5e61 Author: Richard Fitzgerald Date: Tue Aug 28 09:41:58 2018 +0100 mfd: madera: Remove unused forward reference The madera_irqchip_pdata struct was replaced by the irq_flags member of struct madera_pdata so the forward reference is obsolete. Signed-off-by: Richard Fitzgerald Signed-off-by: Lee Jones commit 75a11072c462e69b7b2392b181ec1752a05f620d Author: Rob Herring Date: Mon Aug 27 20:52:31 2018 -0500 mfd: max77620: 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: Rob Herring Signed-off-by: Lee Jones commit b04e68d16605dcde1c21b5df5f86a5372e53ae97 Author: Richard Fitzgerald Date: Mon Aug 27 14:51:15 2018 +0100 mfd: madera: Don't use regmap_read_poll_timeout to poll for BOOT_DONE While polling for BOOT_DONE the chip could NAK a read because it is still booting, which would terminate the regmap_read_poll_timeout() with an error. Instead implement a polling loop that ignores read errors so we always poll until the chip signals boot or the loop times out. Signed-off-by: Richard Fitzgerald Signed-off-by: Lee Jones commit 6b269a41a4520f7eb639e61a45ebbb9c9267d5e0 Author: Sapthagiri Baratam Date: Tue Aug 21 19:52:44 2018 +0530 mfd: arizona: Correct calling of runtime_put_sync Don't call runtime_put_sync when clk32k_ref is ARIZONA_32KZ_MCLK2 as there is no corresponding runtime_get_sync call. MCLK1 is not in the AoD power domain so if it is used as 32kHz clock source we need to hold a runtime PM reference to keep the device from going into low power mode. Fixes: cdd8da8cc66b ("mfd: arizona: Add gating of external MCLKn clocks") Signed-off-by: Sapthagiri Baratam Acked-by: Charles Keepax Signed-off-by: Lee Jones commit 3d51ec93a564a0f87d1276f067732be904816a53 Author: Paul Cercueil Date: Tue Aug 21 19:16:12 2018 +0200 mfd: Add ingenic-tcu.h header This header contains macros for the registers that are present in the regmap shared by all the drivers related to the TCU (Timer Counter Unit) of the Ingenic JZ47xx SoCs. Signed-off-by: Paul Cercueil Signed-off-by: Lee Jones commit 61cc15dac01ae84281222452e338ca060179d8b1 Author: RaviChandra Sadineni Date: Mon Aug 20 08:34:19 2018 -0700 mfd: cros_ec: Check for mkbp events on resume only if supported. Currently on every resume we check for mkbp events and notify the clients. This helps in identifying the wakeup sources. But on devices that do not support mkbp protocol, we might end up querying key state of the keyboard in a loop which blocks the resume. Instead check for events only if mkbp is supported. Signed-off-by: RaviChandra Sadineni Reported-by: Marek Szyprowski Tested-by: Marek Szyprowski Signed-off-by: Lee Jones commit 4ded11d1cf128db8b5d5b57db3a50dd124358520 Author: Michael Hennerich Date: Tue Aug 14 13:31:59 2018 +0200 mfd: adp5520: Update MODULE AUTHOR email address No functional changes Signed-off-by: Michael Hennerich Signed-off-by: Lee Jones commit eef0594aee29f289b0ddda02be7ccdbc5dd5956a Author: Krzysztof Kozlowski Date: Tue Aug 7 18:11:25 2018 +0200 mfd: sec-core: Allow building as module The main MFD driver for Samsung PMICs (S2MPSXX, S5M876X) used with Exynos SoCs can be compiled and used as a module. The dependent clock, regulator and RTC drivers already can be built as a module. Building entire set of drivers as modules might require using initial ramdisk and can make booting process longer (due to probe deferrals). However adding such option is useful for testing and for multi-platform configurations. This also add required module authors to sec-irq.c file based on recent main contributors. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Lee Jones commit 838a724072d37c45d717ca38252496253d4c09bc Author: Krzysztof Kozlowski Date: Tue Aug 7 18:11:24 2018 +0200 mfd: sec-core: Fix indentation of Kconfig description The indentation should be a tab followed by two spaces. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Lee Jones commit d7d8d7a2405f8b6296660648e893fc3442269d81 Author: Krzysztof Kozlowski Date: Tue Aug 7 18:11:23 2018 +0200 mfd: maxim: Add SPDX license identifiers Replace GPL v2.0+ license statements with SPDX license identifiers. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Lee Jones commit 39b27ad9c71cb72b07c9cd85191a8fe723e5b21a Author: Krzysztof Kozlowski Date: Tue Aug 7 18:11:22 2018 +0200 mfd: sec-core: Add SPDX license identifiers Replace GPL v2.0+ license statements with SPDX license identifiers. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Lee Jones commit 92af5c130c207b2b0d07e2a223a4901f16be1536 Merge: 7a39915b723a d31ca7e5d0fa 9612f8f50380 65b80dfffeab Author: Lee Jones Date: Tue Oct 23 08:58:01 2018 +0100 Merge branches 'ib-mfd-iio-input-4.20', 'ib-mfd-irqchip-4.20', 'ib-mfd-rtc-4.20' and 'ib-mfd-spi-tty-4.20-1' into ibs-for-mfd-merged commit 6fd577cd4b257ce5cb761adcdedeea55501d84d9 Merge: 114b5f8f7efc 8dbac65f5c18 Author: Linus Torvalds Date: Tue Oct 23 08:55:03 2018 +0100 Merge tag 'leds-for-4.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds Pull LED updates from Jacek Anaszewski: "We introduce LED pattern trigger - the idea that was proposed three years ago now received enough attention and determination to drive it to the successful end. There is also one new LED class driver and couple of improvements to the existing ones. New LED class driver: - add support for Panasonic AN30259A with related DT bindings New LED trigger: - introduce LED pattern trigger leds-sc27xx-bltc: - implement pattern_set/clear ops to enable support for pattern trigger's hw_pattern sysfs file Improvements to existing LED class drivers: - leds-pwm: don't print error message on -EPROBE_DEFER - leds-gpio: try to lookup gpiod from device - leds-as3645a: convert to using %pOFn instead of device_node.name" * tag 'leds-for-4.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds: leds: sc27xx: Add pattern_set/clear interfaces for LED controller leds: core: Introduce LED pattern trigger leds: add Panasonic AN30259A support dt-bindings: leds: document Panasonic AN30259A bindings leds: gpio: Try to lookup gpiod from device leds: pwm: silently error out on EPROBE_DEFER leds: Convert to using %pOFn instead of device_node.name commit 114b5f8f7efc036dd7dd16efb0f218a88e6c6c02 Merge: b0b6a28bc4b2 40f5ff4f9f23 Author: Linus Torvalds Date: Tue Oct 23 08:45:05 2018 +0100 Merge tag 'gpio-v4.20-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.20 series: Core changes: - A patch series from Hans Verkuil to make it possible to enable/disable IRQs on a GPIO line at runtime and drive GPIO lines as output without having to put/get them from scratch. The irqchip callbacks have been improved so that they can use only the fastpatch callbacks to enable/disable irqs like any normal irqchip, especially the gpiod_lock_as_irq() has been improved to be callable in fastpath context. A bunch of rework had to be done to achieve this but it is a big win since I never liked to restrict this to slowpath. The only call requireing slowpath was try_module_get() and this is kept at the .request_resources() slowpath callback. In the GPIO CEC driver this is a big win sine a single line is used for both outgoing and incoming traffic, and this needs to use IRQs for incoming traffic while actively driving the line for outgoing traffic. - Janusz Krzysztofik improved the GPIO array API to pass a "cookie" (struct gpio_array) and a bitmap for setting or getting multiple GPIO lines at once. This improvement orginated in a specific need to speed up an OMAP1 driver and has led to a much better API and real performance gains when the state of the array can be used to bypass a lot of checks and code when we want things to go really fast. The previous code would minimize the number of calls down to the driver callbacks assuming the CPU speed was orders of magnitude faster than the I/O latency, but this assumption was wrong on several platforms: what we needed to do was to profile and improve the speed on the hot path of the array functions and this change is now completed. - Clean out the painful and hard to grasp BNF experiments from the device tree bindings. Future approaches are looking into using JSON schema for this purpose. (Rob Herring is floating a patch series.) New drivers: - The RCAR driver now supports r8a774a1 (RZ/G2M). - Synopsys GPIO via CREGs driver. Major improvements: - Modernization of the EP93xx driver to use irqdomain and other contemporary concepts. - The ingenic driver has been merged into the Ingenic pin control driver and removed from the GPIO subsystem. - Debounce support in the ftgpio010 driver" * tag 'gpio-v4.20-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: (116 commits) gpio: Clarify kerneldoc on gpiochip_set_chained_irqchip() gpio: Remove unused 'irqchip' argument to gpiochip_set_cascaded_irqchip() gpio: Drop parent irq assignment during cascade setup mmc: pwrseq_simple: Fix incorrect handling of GPIO bitmap gpio: fix SNPS_CREG kconfig dependency warning gpiolib: Initialize gdev field before is used gpio: fix kernel-doc after devres.c file rename gpio: fix doc string for devm_gpiochip_add_data() to not talk about irq_chip gpio: syscon: Fix possible NULL ptr usage gpiolib: Show correct direction from the beginning pinctrl: msm: Use init_valid_mask exported function gpiolib: Add init_valid_mask exported function GPIO: add single-register GPIO via CREG driver dt-bindings: Document the Synopsys GPIO via CREG bindings gpio: mockup: use device properties instead of platform_data gpio: Slightly more helpful debugfs gpio: omap: Remove set but not used variable 'dev' gpio: omap: drop omap_gpio_list Accept partial 'gpio-line-names' property. gpio: omap: get rid of the conditional PM runtime calls ... commit b0b6a28bc4b265aa56cbf4fa8fd27c0a4fa3a49c Merge: 1650ac530665 a93a676b0791 Author: Linus Torvalds Date: Tue Oct 23 08:40:16 2018 +0100 Merge tag 'pinctrl-v4.20-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl Pull pin control updates from Linus Walleij: "This is the bulk of pin control changes for the v4.20 series: There were no significant changes to the core this time! Bur the new Qualcomm, Mediatek and Broadcom drivers are quite interesting as they will be used in a few million embedded devices the coming years as it seems. New drivers: - Broadcom Northstar pin control driver. - Mediatek MT8183 subdriver. - Mediatek MT7623 subdriver. - Mediatek MT6765 subdriver. - Meson g12a subdriver. - Nuvoton NPCM7xx pin control and GPIO driver. - Qualcomm QCS404 pin control and GPIO subdriver. - Qualcomm SDM660 pin control and GPIO subdriver. - Renesas R8A7744 PFC subdriver. - Renesas R8A774C0 PFC subdriver. - Renesas RZ/N1 pinctrl driver Major improvements: - Pulled the GPIO support for Ingenic over from the GPIO subsystem and consolidated it all in the Ingenic pin control driver. - Major cleanups and consolidation work in all Intel drivers. - Major cleanups and consolidation work in all Mediatek drivers. - Lots of incremental improvements to the Renesas PFC pin controller family. - All drivers doing GPIO now include and nothing else" * tag 'pinctrl-v4.20-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: (153 commits) pinctrl: sunxi: Fix a memory leak in 'sunxi_pinctrl_build_state()' gpio: uniphier: include instead of pinctrl: uniphier: include instead of dt-bindings: pinctrl: bcm4708-pinmux: improve example binding pinctrl: geminilake: Sort register offsets by value pinctrl: geminilake: Get rid of unneeded ->probe() stub pinctrl: geminilake: Update pin list for B0 stepping pinctrl: renesas: Fix platform_no_drv_owner.cocci warnings pinctrl: mediatek: Make eint_m u16 pinctrl: bcm: ns: Use uintptr_t for casting data pinctrl: madera: Fix uninitialized variable bug in madera_mux_set_mux pinctrl: gemini: Fix up TVC clock group pinctrl: gemini: Drop noisy debug prints pinctrl: gemini: Mask and set properly pinctrl: mediatek: select GPIOLIB pinctrl: rza1: don't manually release devm managed resources MAINTAINERS: update entry for Mediatek pin controller pinctrl: bcm: add Northstar driver dt-bindings: pinctrl: document Broadcom Northstar pin mux controller pinctrl: qcom: fix 'const' pointer handling ... commit 1650ac53066577a5e83fe3e9d992c9311597ff8c Merge: ca9eb48fe01f fd82cc3020a0 Author: Linus Torvalds Date: Tue Oct 23 08:36:15 2018 +0100 Merge tag 'mmc-v4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull MMC updates from Ulf Hansson: "MMC core: - Introduce a host helper function to share re-tuning progress MMC host: - sdhci: Add support for v4 host mode - sdhci-of-arasan: Add Support for AM654 MMC and PHY - sdhci-sprd: Add support for Spreadtrum's host controller - sdhci-tegra: Add support for HS400 enhanced strobe - sdhci-tegra: Enable UHS/HS200 modes for Tegra186/210 - sdhci-tegra: Add support for HS400 delay line calibration - sdhci-tegra: Add support for pad calibration - sdhci-of-dwcmshc: Address 128MB DMA boundary limitation - sdhci-of-esdhc: Add support for tuning erratum A008171 - sdhci-iproc: Add ACPI support - mediatek: Add support for MT8183 - mediatek: Improve the support for tuning - mediatek: Add bus clock control for MT2712 - jz4740: Add support for the JZ4725B - mmci: Add support for the stm32 sdmmc variant - mmci: Add support for an optional reset control - mmci: Add some new variant specific properties/callbacks - mmci: Re-structure DMA code to prepare for new variants - renesas_sdhi: Add support for r8a77470, r8a7744 and r8a774a1 - renesas_sdhi_internal_dmac: Whitelist r8a77970 and r8a774a1 - tmio/uniphier-sd: Add new UniPhier SD/eMMC controller driver - tmio/renesas_sdhi: Deal properly with SCC detection during re-tune - tmio/renesas_sdhi: Refactor/consolidate clock management - omap_hsmmc: Drop cover detection and some unused platform data - dw_mmc-exynos: Enable tuning for more speed modes - sunxi: Clarify the new timing mode and enable it for the A64 controller - various: Convert to slot GPIO descriptors" * tag 'mmc-v4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: (129 commits) mmc: mediatek: drop too much code of tuning method mmc: mediatek: add MT8183 MMC driver support mmc: mediatek: tune CMD/DATA together mmc: mediatek: fix cannot receive new request when msdc_cmd_is_ready fail mmc: mediatek: fill the actual clock for mmc debugfs mmc: dt-bindings: add support for MT8183 SoC mmc: uniphier-sd: avoid using broken DMA RX channel mmc: uniphier-sd: fix DMA disabling mmc: tmio: simplify the DMA mode test mmc: tmio: remove TMIO_MMC_HAVE_HIGH_REG flag mmc: tmio: move MFD variant reset to a platform hook mmc: renesas_sdhi: Add r8a77470 SDHI1 support dt-bindings: mmc: renesas_sdhi: Add r8a77470 support mmc: mmci: add stm32 sdmmc variant dt-bindings: mmci: add stm32 sdmmc variant mmc: mmci: add stm32 sdmmc registers mmc: mmci: add clock divider for stm32 sdmmc mmc: mmci: add optional reset property dt-bindings: mmci: add optional reset property mmc: mmci: add variant property to not read datacnt ... commit 487e2e22ab7968f2c0c82f37b5ca5883efd1a354 Author: Thor Thayer Date: Mon Oct 22 17:22:26 2018 -0500 net: stmmac: Set OWN bit for jumbo frames Ping with Jumbo packet does not reply and get a watchdog timeout [ 46.059616] ------------[ cut here ]------------ [ 46.064268] NETDEV WATCHDOG: eth0 (socfpga-dwmac): transmit queue 0 timed out [ 46.071471] WARNING: CPU: 1 PID: 0 at net/sched/sch_generic.c:461 dev_watchdog+0x2cc/0x2d8 [ 46.079708] Modules linked in: [ 46.082761] CPU: 1 PID: 0 Comm: swapper/1 Not tainted 4.18.0-00115-gc262be665854-dirty #264 [ 46.091082] Hardware name: SoCFPGA Stratix 10 SoCDK (DT) [ 46.096377] pstate: 20000005 (nzCv daif -PAN -UAO) [ 46.101152] pc : dev_watchdog+0x2cc/0x2d8 [ 46.105149] lr : dev_watchdog+0x2cc/0x2d8 [ 46.109144] sp : ffff00000800bd80 [ 46.112447] x29: ffff00000800bd80 x28: ffff80007a9b4940 [ 46.117744] x27: 00000000ffffffff x26: ffff80007aa183b0 [ 46.123040] x25: 0000000000000001 x24: 0000000000000140 [ 46.128336] x23: ffff80007aa1839c x22: ffff80007aa17fb0 [ 46.133632] x21: ffff80007aa18000 x20: ffff0000091a7000 [ 46.138927] x19: 0000000000000000 x18: ffffffffffffffff [ 46.144223] x17: 0000000000000000 x16: 0000000000000000 [ 46.149519] x15: ffff0000091a96c8 x14: 07740775076f0720 [ 46.154814] x13: 07640765076d0769 x12: 0774072007300720 [ 46.160110] x11: 0765077507650775 x10: 0771072007740769 [ 46.165406] x9 : 076d0773076e0761 x8 : 077207740720073a [ 46.170702] x7 : 072907630761076d x6 : ffff80007ff9a0c0 [ 46.175997] x5 : ffff80007ff9a0c0 x4 : 0000000000000002 [ 46.181293] x3 : 0000000000000000 x2 : ffff0000091ac180 [ 46.186589] x1 : e6a742ebe628e800 x0 : 0000000000000000 [ 46.191885] Call trace: [ 46.194326] dev_watchdog+0x2cc/0x2d8 [ 46.197980] call_timer_fn+0x20/0x78 [ 46.201544] expire_timers+0xa4/0xb0 [ 46.205108] run_timer_softirq+0xe4/0x198 [ 46.209107] __do_softirq+0x114/0x210 [ 46.212760] irq_exit+0xd0/0xd8 [ 46.215895] __handle_domain_irq+0x60/0xb0 [ 46.219977] gic_handle_irq+0x58/0xa8 [ 46.223628] el1_irq+0xb0/0x128 [ 46.226761] arch_cpu_idle+0x10/0x18 [ 46.230326] do_idle+0x1d4/0x288 [ 46.233544] cpu_startup_entry+0x24/0x28 [ 46.237457] secondary_start_kernel+0x17c/0x1c0 [ 46.241971] ---[ end trace 57048cd1372cd828 ]--- Inspection of queue showed Jumbo packets were not sent out. The ring Jumbo packet function needs to set the OWN bit so the packet is sent. Signed-off-by: Thor Thayer Signed-off-by: David S. Miller commit a27460c9768ee19949c5b91f3d959ccd88c2a64a Author: Thor Thayer Date: Mon Oct 22 17:22:25 2018 -0500 arm64: dts: stratix10: Support Ethernet Jumbo frame Properly specify the RX and TX FIFO size which is important for Jumbo frames. Update the max-frame-size to support Jumbo frames. Signed-off-by: Thor Thayer Signed-off-by: David S. Miller commit 807192deb876d7550b5de7bf7a40ea3a4421ae0b Merge: e929ceb66ac0 a3fb3698cadf Author: David S. Miller Date: Mon Oct 22 20:21:30 2018 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf Pablo Neira Ayuso says: ==================== Netfilter fixes for net The following patchset contains Netfilter fixes for your net tree: 1) rbtree lookup from control plane returns the left-hand side element of the range when the interval end flag is set on. 2) osf extension is not supported from the input path, reject this from the control plane, from Fernando Fernandez Mancera. 3) xt_TEE is leaving output interface unset due to a recent incorrect netns rework, from Taehee Yoo. 4) xt_TEE allows to select an interface which does not belong to this netnamespace, from Taehee Yoo. 5) Zero private extension area in nft_compat, just like we do in x_tables, otherwise we leak kernel memory to userspace. 6) Missing .checkentry and .destroy entries in new DNAT extensions breaks it since we never load nf_conntrack dependencies, from Paolo Abeni. 7) Do not remove flowtable hook from netns exit path, the netdevice handler already deals with this, also from Taehee Yoo. 8) Only cleanup flowtable entries that reside in this netnamespace, also from Taehee Yoo. ==================== Signed-off-by: David S. Miller commit e929ceb66ac0faa3508702efbc5ea028387c6bb1 Author: Dave Watson Date: Mon Oct 22 19:36:37 2018 +0000 tls: Add maintainers Add John and Daniel as additional tls co-maintainers to help review patches and fix syzbot reports. Acked-by: John Fastabend Acked-by: Daniel Borkmann Signed-off-by: Dave Watson Signed-off-by: David S. Miller commit 9737cc99dd14b5b8b9d267618a6061feade8ea68 Author: Ivan Khoronzhuk Date: Mon Oct 22 21:51:36 2018 +0300 net: ethernet: ti: cpsw: unsync mcast entries while switch promisc mode After flushing all mcast entries from the table, the ones contained in mc list of ndev are not restored when promisc mode is toggled off, because they are considered as synched with ALE, thus, in order to restore them after promisc mode - reset syncing info. This fix touches only switch mode devices, including single port boards like Beagle Bone. Fixes: commit 5da1948969bc ("net: ethernet: ti: cpsw: fix lost of mcast packets while rx_mode update") Signed-off-by: Ivan Khoronzhuk Reviewed-by: Grygorii Strashko Signed-off-by: David S. Miller commit 1fad1fe40e1636f2acd87468b6ee3a3748b4a588 Merge: 604d415e2bd6 d6f092ca928f Author: David S. Miller Date: Mon Oct 22 20:15:39 2018 -0700 Merge branch 'octeontx2-af-NPC-parser-and-NIX-blocks-initialization' Sunil Goutham says: ==================== octeontx2-af: NPC parser and NIX blocks initialization This patchset is a continuation to earlier submitted two 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 This patch series adds more NIX block configuration logic and additionally adds NPC block parser profile configuration. In brief below is what this series adds. NIX block: - Support for PF/VF to allocate/free transmit scheduler queues, maintenance and their configuration. - Adds support for packet replication lists, only broadcast packets is covered for now. - Defines few RSS flow algorithms for HW to distribute packets. This is not the hash algorithsm (i.e toeplitz or crc32), here SW defines what fields in packet should HW take and calculate the hash. - Support for PF/VF to configure VTAG strip and capture capabilities. - Reset NIXLF statastics. NPC block: This block has multiple parser engines which support packet parsing at multiple layers and generates a parse result which is further used to generate a key. Based on packet field offsets in the key, SW can install packet forwarding rules. This patch series adds - Initial parser profile to be programmed into parser engines. - Default forwarding rules to forward packets to different logical interfaces having a NIXLF attached. - Support for promiscuous and multicast modes. Changes from v1: 1 Fixed kernel build failure when compiled with BIG_ENDIAN enabled. - Reported by Kbuild test robot 2 Fixed a warning observed when kernel is built with -Wunused-but-set-variable ==================== Signed-off-by: David S. Miller commit d6f092ca928f4ed615c11b40f5856ebe1f3d4dd2 Author: Sunil Goutham Date: Mon Oct 22 23:26:04 2018 +0530 octeontx2-af: Support for NIXLF's UCAST/PROMISC/ALLMULTI modes By default NIXLF is set in UCAST mode. This patch adds a new mailbox message which when sent by a RVU PF changes this default mode. When promiscuous mode is needed, the reserved promisc entry for each of RVU PF is setup to match against ingress channel number only, so that all pkts on that channel are accepted and forwarded to the mode change requesting PF_FUNC's NIXLF. PROMISC and ALLMULTI modes are supported only for PFs, for VFs only UCAST mode is supported. Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit 6f03cf10fcdf56fd72777c60e9dbd75bd4228dae Author: Sunil Goutham Date: Mon Oct 22 23:26:03 2018 +0530 octeontx2-af: Support for setting MAC address Added a new mailbox message for a PF/VF to set/update it's NIXLF's MAC address. Also updates unicast NPC MCAM entry with this address as matching DMAC. Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit cc96b0e9b4c66e9dee02456e918541da91bdd4e3 Author: Sunil Goutham Date: Mon Oct 22 23:26:02 2018 +0530 octeontx2-af: Support for changing RSS algorithm This patch adds support for a RVU PF/VF to change NIX Rx flowkey algorithm index in NPC RX RSS_ACTION. eg: a ethtool command changing RSS algorithm for a netdev interface would trigger this change in NPC. If PF/VF doesn't specify any MCAM entry index then default UCAST entry of the NIXLF attached to PF/VF will be updated with RSS_ACTION and flowkey index. Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit 41a7aa7b800dd0a12d3bedc1947451e503dfee74 Author: Sunil Goutham Date: Mon Oct 22 23:26:01 2018 +0530 octeontx2-af: NIX Rx flowkey configuration for RSS Configure NIX RX flowkey algorithm configuration to support RSS (receive side scaling). Currently support for only L3/L4 2-tuple and 4-tuple hash of IPv4/v6/TCP/UDP/SCTP is added. HW supports upto 32 different flowkey algorithms which SW can define, this patch defines 9. NPC RX ACTION has to point to one of these flowkey indices for RSS to work. The configuration is dependent on NPC parse result's layer info. So if NPC KPU profile changes suchthat LID/LTYPE values of above said protocols change then this configuration will most likely be effected. Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit 759001406654f4ec8738a1149ed2729306bd335d Author: Sunil Goutham Date: Mon Oct 22 23:26:00 2018 +0530 octeontx2-af: Install ucast and bcast pkt forwarding rules Upon NIXLF_ALLOC install a unicast forwarding rule in NPC MCAM like below - Match pkt DMAC with NIXLF attached PF/VF's MAC address. - Ingress channel - Action is UCAST - Forward to PF_FUNC of this NIXLF And broadcast pkt forwarding rule as - Match L2B bit in MCAM search key - Ingress channel - Action is UCAST, for now, later it will be changed to MCAST. Only PFs can install this rule Upon NIXLF_FREE disable all MCAM entries in use by that NIXLF. Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit f5721f76a4376eacbbcc260d318872d2008fffbb Author: Stanislaw Kardach Date: Mon Oct 22 23:25:59 2018 +0530 octeontx2-af: Add LMAC channel info to NIXLF_ALLOC response Add LMAC channel info like Rx/Tx channel base and count to NIXLF_ALLOC mailbox message response. This info is used by NIXLF attached RVU PF/VF to configure SQ's default channel, TL3_TL2_LINKX_CFG and to install MCAM rules in NPC based on matching ingress channel number. Signed-off-by: Stanislaw Kardach Signed-off-by: Tomasz Duszynski Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit fefefd99ae8a8723ad6e324bd084968379f63607 Author: Sunil Goutham Date: Mon Oct 22 23:25:58 2018 +0530 octeontx2-af: NPC MCAM and LDATA extract minimal configuration This patch adds some minimal configuration for NPC MCAM and LDATA extraction which is sufficient enough to install ucast/bcast/promiscuous forwarding rules. Below is the config done - LDATA extraction config to extract DMAC from pkt to offset 64bit in MCAM search key. - Set MCAM lookup keysize to 224bits - Set MCAM TX miss action to UCAST_DEFAULT - Set MCAM RX miss action to DROP Also inorder to have guaranteed space in MCAM to install ucast forwarding rule for each of RVU PF/VF, reserved one MCAM entry for each of NIXLF for ucast rule. And two entries for each of RVU PF. One for bcast pkt replication and other for promiscuous mode which allows all pkts received on a HW CGX/LBK channel. Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit 6b3321bacc5a1342e6f3f843234a902f65786b4b Author: Sunil Goutham Date: Mon Oct 22 23:25:57 2018 +0530 octeontx2-af: Enable packet length and csum validation Config NPC layer info from KPU profile into protocol checker to identify outer L2/IPv4/TCP/UDP headers in a packet. And enable IPv4 checksum validation. L3/L4 and L4 CSUM validation will be enabled by PF/VF drivers by configuring NIX_AF_LF(0..127)_RX_CFG via mbox i.e 'nix_lf_alloc_req->rx_cfg' Also enable setting of NPC_RESULT_S[L2B] when an outer L2 broadcast address is detected. This will help in installing NPC MCAM rules for broadcast packets. Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit d02913d91657941a86208691258837a0fe9a4cd7 Author: Vamsi Attunuru Date: Mon Oct 22 23:25:56 2018 +0530 octeontx2-af: Support for VTAG strip and capture Added support for PF/VF drivers to configure NIX to capture and/or strip VLAN tag from ingress packets. Signed-off-by: Vamsi Attunuru Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit 4b05528ebf0c3ffd61543cfcca78844f05d8eb9d Author: Sunil Goutham Date: Mon Oct 22 23:25:55 2018 +0530 octeontx2-af: Update bcast list upon NIXLF alloc/free Upon NIXLF ALLOC/FREE, add or remove corresponding PF_FUNC from the broadcast packet replication list of the CGX LMAC mapped RVU PF. Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit 52d3d327a2595be7b69c956b45ad44de4ea6f692 Author: Sunil Goutham Date: Mon Oct 22 23:25:54 2018 +0530 octeontx2-af: Broadcast packet replication support Allocate memory for mcast/bcast/mirror replication entry contexts, replication buffers (used by HW) and config HW with corresponding memory bases. Added support for installing MCEs via NIX AQ mbox. For now support is restricted to broadcast pkt replication, hence MCE table size and number of replication buffers allocated are less. Each CGX LMAC mapped RVU PF is assigned a MCE table of size 'num VFs of that PF + PF'. Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit 94d942c5fb970ac2166216838b278613decfa9a0 Author: Geetha sowjanya Date: Mon Oct 22 23:25:53 2018 +0530 octeontx2-af: Config pkind for CGX mapped PFs For each CGX LMAC that is mapped to a RVU PF, allocate a pkind and config the same in CGX. For a received packet at CGX LMAC interface this pkind is used by NPC block to start parsing of packet. Signed-off-by: Geetha sowjanya Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit 23923ea4b144ed43ad8f6e5110b06221d0ff1656 Author: Sunil Goutham Date: Mon Oct 22 23:25:52 2018 +0530 octeontx2-af: Config NPC KPU engines with parser profile This patch configures all 16 KPUs and iKPU (pkinds) with the KPU parser profile defined in npc_profile.h. Each KPU engine has a 128 entry CAM, only CAM entries which are listed in the profile are enabled and rest are left disabled. Also - Memory is allocated for pkind's bitmap and PFFUNC, interface channel mapping. - Added all CSR offsets of NPC HW block. Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit 21e6699e5cd60f634002ecc6b60a690ab9c21947 Author: Hao Zheng Date: Mon Oct 22 23:25:51 2018 +0530 octeontx2-af: Add NPC KPU profile NPC block is responsible for parsing and forwarding packets to different NIXLFs. NPC has 16 KPU engines (Kangaroo parse engine) and one iKPU which represents pkinds. Each physical port either CGX/LBK is assigned a pkind and upon receiving a packet HW takes that port's pkind and starts parsing as per the KPU engines config. This patch adds header files which contain configuration profile/array for each of the iKPU and 16 KPU engines. Signed-off-by: Hao Zheng Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit 42349661780e893537205f9c4c27b1bae060d96a Author: Vamsi Attunuru Date: Mon Oct 22 23:25:50 2018 +0530 octeontx2-af: Reset NIXLF's Rx/Tx stats This patch adds a new mailbox message to reset a NIXLF's receive and transmit HW stats. Signed-off-by: Vamsi Attunuru Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit b279bbb3314e114609983b02c4253aff6b4be976 Author: Sunil Goutham Date: Mon Oct 22 23:25:49 2018 +0530 octeontx2-af: NIX Tx scheduler queue config support This patch adds support for a PF/VF driver to configure NIX transmit scheduler queues via mbox. Since PF/VF doesn't know the absolute HW index of the NIXLF attached to it, AF traps the register config and overwrites with the correct NIXLF index. HW supports shaping, colouring and policing of packets with these multilevel traffic scheduler queues. Instead of introducing different mbox message formats for different configurations and making both AF & PF/VF driver implementation cumbersome, access to the scheduler queue's CSRs is provided via mbox. AF checks whether the sender PF/VF has the corresponding queue allocated or not and dumps the config to HW. With a single mbox msg 20 registers can be configured. Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit a3e7121c704470e2c33a4b91bb218205947cd531 Author: Sunil Goutham Date: Mon Oct 22 23:25:48 2018 +0530 octeontx2-af: NIX Tx scheduler queues alloc/free Added support for a PF/VF to allocate or free NIX transmit scheduler queues via mbox. For setting up pkt transmission priorities between queues, the scheduler queues have to be contiguous w.r.t their HW indices. So both contiguous and non-contiguous allocations are supported. Upon receiving NIX_TXSCH_FREE mbox msg all scheduler queues allocated to sending PFFUNC (PF/VF) will be freed. Selective free is not supported. Signed-off-by: Sunil Goutham Signed-off-by: Nithin Dabilpuram Signed-off-by: David S. Miller commit 604d415e2bd642b7e02c80e719e0396b9d4a77a6 Author: Eric Dumazet Date: Mon Oct 22 09:24:27 2018 -0700 llc: do not use sk_eat_skb() syzkaller triggered a use-after-free [1], caused by a combination of skb_get() in llc_conn_state_process() and usage of sk_eat_skb() sk_eat_skb() is assuming the skb about to be freed is only used by the current thread. TCP/DCCP stacks enforce this because current thread holds the socket lock. llc_conn_state_process() wants to make sure skb does not disappear, and holds a reference on the skb it manipulates. But as soon as this skb is added to socket receive queue, another thread can consume it. This means that llc must use regular skb_unlink() and kfree_skb() so that both producer and consumer can safely work on the same skb. [1] BUG: KASAN: use-after-free in atomic_read include/asm-generic/atomic-instrumented.h:21 [inline] BUG: KASAN: use-after-free in refcount_read include/linux/refcount.h:43 [inline] BUG: KASAN: use-after-free in skb_unref include/linux/skbuff.h:967 [inline] BUG: KASAN: use-after-free in kfree_skb+0xb7/0x580 net/core/skbuff.c:655 Read of size 4 at addr ffff8801d1f6fba4 by task ksoftirqd/1/18 CPU: 1 PID: 18 Comm: ksoftirqd/1 Not tainted 4.19.0-rc8+ #295 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+0x1c4/0x2b6 lib/dump_stack.c:113 print_address_description.cold.8+0x9/0x1ff mm/kasan/report.c:256 kasan_report_error mm/kasan/report.c:354 [inline] 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 kasan_check_read+0x11/0x20 mm/kasan/kasan.c:272 atomic_read include/asm-generic/atomic-instrumented.h:21 [inline] refcount_read include/linux/refcount.h:43 [inline] skb_unref include/linux/skbuff.h:967 [inline] kfree_skb+0xb7/0x580 net/core/skbuff.c:655 llc_sap_state_process+0x9b/0x550 net/llc/llc_sap.c:224 llc_sap_rcv+0x156/0x1f0 net/llc/llc_sap.c:297 llc_sap_handler+0x65e/0xf80 net/llc/llc_sap.c:438 llc_rcv+0x79e/0xe20 net/llc/llc_input.c:208 __netif_receive_skb_one_core+0x14d/0x200 net/core/dev.c:4913 __netif_receive_skb+0x2c/0x1e0 net/core/dev.c:5023 process_backlog+0x218/0x6f0 net/core/dev.c:5829 napi_poll net/core/dev.c:6249 [inline] net_rx_action+0x7c5/0x1950 net/core/dev.c:6315 __do_softirq+0x30c/0xb03 kernel/softirq.c:292 run_ksoftirqd+0x94/0x100 kernel/softirq.c:653 smpboot_thread_fn+0x68b/0xa00 kernel/smpboot.c:164 kthread+0x35a/0x420 kernel/kthread.c:246 ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:413 Allocated by task 18: save_stack+0x43/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] kasan_kmalloc+0xc7/0xe0 mm/kasan/kasan.c:553 kasan_slab_alloc+0x12/0x20 mm/kasan/kasan.c:490 kmem_cache_alloc_node+0x144/0x730 mm/slab.c:3644 __alloc_skb+0x119/0x770 net/core/skbuff.c:193 alloc_skb include/linux/skbuff.h:995 [inline] llc_alloc_frame+0xbc/0x370 net/llc/llc_sap.c:54 llc_station_ac_send_xid_r net/llc/llc_station.c:52 [inline] llc_station_rcv+0x1dc/0x1420 net/llc/llc_station.c:111 llc_rcv+0xc32/0xe20 net/llc/llc_input.c:220 __netif_receive_skb_one_core+0x14d/0x200 net/core/dev.c:4913 __netif_receive_skb+0x2c/0x1e0 net/core/dev.c:5023 process_backlog+0x218/0x6f0 net/core/dev.c:5829 napi_poll net/core/dev.c:6249 [inline] net_rx_action+0x7c5/0x1950 net/core/dev.c:6315 __do_softirq+0x30c/0xb03 kernel/softirq.c:292 Freed by task 16383: save_stack+0x43/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/kasan.c:521 kasan_slab_free+0xe/0x10 mm/kasan/kasan.c:528 __cache_free mm/slab.c:3498 [inline] kmem_cache_free+0x83/0x290 mm/slab.c:3756 kfree_skbmem+0x154/0x230 net/core/skbuff.c:582 __kfree_skb+0x1d/0x20 net/core/skbuff.c:642 sk_eat_skb include/net/sock.h:2366 [inline] llc_ui_recvmsg+0xec2/0x1610 net/llc/af_llc.c:882 sock_recvmsg_nosec net/socket.c:794 [inline] sock_recvmsg+0xd0/0x110 net/socket.c:801 ___sys_recvmsg+0x2b6/0x680 net/socket.c:2278 __sys_recvmmsg+0x303/0xb90 net/socket.c:2390 do_sys_recvmmsg+0x181/0x1a0 net/socket.c:2466 __do_sys_recvmmsg net/socket.c:2484 [inline] __se_sys_recvmmsg net/socket.c:2480 [inline] __x64_sys_recvmmsg+0xbe/0x150 net/socket.c:2480 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff8801d1f6fac0 which belongs to the cache skbuff_head_cache of size 232 The buggy address is located 228 bytes inside of 232-byte region [ffff8801d1f6fac0, ffff8801d1f6fba8) The buggy address belongs to the page: page:ffffea000747dbc0 count:1 mapcount:0 mapping:ffff8801d9be7680 index:0xffff8801d1f6fe80 flags: 0x2fffc0000000100(slab) raw: 02fffc0000000100 ffffea0007346e88 ffffea000705b108 ffff8801d9be7680 raw: ffff8801d1f6fe80 ffff8801d1f6f0c0 000000010000000b 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8801d1f6fa80: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ffff8801d1f6fb00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8801d1f6fb80: fb fb fb fb fb fc fc fc fc fc fc fc fc fc fc fc ^ ffff8801d1f6fc00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8801d1f6fc80: fb fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Eric Dumazet Reported-by: syzbot Signed-off-by: David S. Miller commit ba59d5705825fb9cab3ff092552802f4fefc3635 Author: Mathias Thore Date: Mon Oct 22 14:55:50 2018 +0200 net/wan/fsl_ucc_hdlc: error counters Extract error information from rx and tx buffer descriptors, and update error counters. Signed-off-by: Mathias Thore Signed-off-by: David S. Miller commit 2af1ccd58107d65f87b747c90a965b2ba97b4feb Author: Wolfram Sang Date: Sun Oct 21 22:01:05 2018 +0200 net: dsa: legacy: 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: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit c0bfdae013e809b209ac325a9895b9ba22599c93 Author: Wolfram Sang Date: Sun Oct 21 22:00:39 2018 +0200 ptp: ptp_dte: 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: Richard Cochran Signed-off-by: David S. Miller commit 00f17a8219f02139119d8b4547e032bf4888fa0d Author: Arthur Kiyanovski Date: Sun Oct 21 18:07:14 2018 +0300 net: ena: fix compilation error in xtensa architecture linux/prefetch.h is never explicitly included in ena_com, although functions from it, such as prefetchw(), are used throughout ena_com. This is an inclusion bug, and we fix it here by explicitly including linux/prefetch.h. The bug was exposed when the driver was compiled for the xtensa architecture. Fixes: 689b2bdaaa14 ("net: ena: add functions for handling Low Latency Queues in ena_com") Fixes: 8c590f977638 ("ena: Fix Kconfig dependency on X86") Signed-off-by: Arthur Kiyanovski Signed-off-by: David S. Miller commit 424c22fb62427362f1f660cd83fbdc41aec488b6 Author: Vito Caputo Date: Sun Oct 21 04:33:03 2018 -0700 af_unix.h: trivial whitespace cleanup Replace spurious spaces with a tab and remove superfluous tab from unix_sock struct. Signed-off-by: Vito Caputo Signed-off-by: David S. Miller commit cc3a4cd3f016a081a29b938f1ad17669bfacc9b2 Author: Dan Carpenter Date: Sun Oct 21 14:05:49 2018 +0300 net/mlx5: Allocate enough space for the FDB sub-namespaces FDB_MAX_CHAIN is three. We wanted to allocate enough memory to hold four structs but there are missing parentheses so we only allocate enough memory for three structs and the first byte of the fourth one. Fixes: 328edb499f99 ("net/mlx5: Split FDB fast path prio to multiple namespaces") Signed-off-by: Dan Carpenter Reviewed-by: Or Gerlitz Signed-off-by: David S. Miller commit ec7f0ee2c10539c6ae1e87be8711562ffbea1563 Merge: 92c9d5627a79 246e886d22e2 Author: David S. Miller Date: Mon Oct 22 19:42:58 2018 -0700 Merge branch 'forbid-goto_chain-fallback' Davide Caratti says: ==================== net/sched: forbid 'goto_chain' on fallback actions the following command: # tc actions add action police rate 1mbit burst 1k conform-exceed \ > pass / goto chain 42 generates a NULL pointer dereference when packets exceed the configured rate. Similarly, the following command: # tc actions add action pass random determ goto chain 42 2 makes the kernel crash with NULL dereference when the first packet does not match the 'pass' action. gact and police allow users to specify a fallback control action, that is stored in the action private data. 'goto chain x' never worked for these cases, since a->goto_chain handle was never initialized. There is only one goto_chain handle per TC action, and it is designed to be non-NULL only if tcf_action contains a 'goto chain' command. So, let's forbid 'goto chain' on fallback actions. Patch 1/4 and 2/4 change the .init() functions of police and gact, to let them return an error when users try to set 'goto chain x' in the fallback action. Patch 3/4 and 4/4 add TDC selftest coverage to this new behavior. ==================== Acked-by: Jamal Hadi Salim Signed-off-by: David S. Miller commit 246e886d22e2a8ceceec1f4f66138f93eafddbaa Author: Davide Caratti Date: Sat Oct 20 23:33:10 2018 +0200 tc-tests: test denial of 'goto chain' for exceed traffic in police.json add test to verify if act_police forbids 'goto chain' control actions for 'exceed' traffic. Signed-off-by: Davide Caratti Signed-off-by: David S. Miller commit 88c2e3b4a97277399ceb80d630e9838330b2146a Author: Davide Caratti Date: Sat Oct 20 23:33:09 2018 +0200 tc-tests: test denial of 'goto chain' on 'random' traffic in gact.json add test to verify if act_gact forbids 'goto chain' control actions on 'random' traffic in gact.json. Signed-off-by: Davide Caratti Signed-off-by: David S. Miller commit c08f5ed5d625926f38552b734b587a28e947b55c Author: Davide Caratti Date: Sat Oct 20 23:33:08 2018 +0200 net/sched: act_police: disallow 'goto chain' on fallback control action in the following command: # tc action add action police rate burst conform-exceed / 'goto chain x' is allowed only for c1: setting it for c2 makes the kernel crash with NULL pointer dereference, since TC core doesn't initialize the chain handle. Signed-off-by: Davide Caratti Acked-by: Cong Wang Acked-by: Jiri Pirko Signed-off-by: David S. Miller commit 9469f375ab0900075bd3f1f58083c19b0224d978 Author: Davide Caratti Date: Sat Oct 20 23:33:07 2018 +0200 net/sched: act_gact: disallow 'goto chain' on fallback control action in the following command: # tc action add action random 'goto chain x' is allowed only for c1: setting it for c2 makes the kernel crash with NULL pointer dereference, since TC core doesn't initialize the chain handle. Signed-off-by: Davide Caratti Acked-by: Cong Wang Acked-by: Jiri Pirko Signed-off-by: David S. Miller commit 92c9d5627a79b02299dd13e3e0ec695475726cf8 Author: Andrew Lunn Date: Sat Oct 20 22:41:28 2018 +0200 net: phy: phy_support_sym_pause: Clear Asym Pause When indicating the MAC supports Symmetric Pause, clear the Asymmetric Pause bit, which could of been already set is the PHY supports it. Reported-by: Labbe Corentin Fixes: c306ad36184f ("net: ethernet: Add helper for MACs which support pause") Signed-off-by: Andrew Lunn Tested-by: Corentin Labbe Signed-off-by: David S. Miller commit 4b78030b8f2ca29c267b4ca38e900d92428c412e Author: Olivier Brunel Date: Sat Oct 20 19:39:57 2018 +0200 net: bpfilter: Set user mode helper's command line Signed-off-by: Olivier Brunel Signed-off-by: David S. Miller commit 876dcf2f3aaa0f68d437b368b93a4c4b81521191 Author: Olivier Brunel Date: Sat Oct 20 19:39:56 2018 +0200 umh: Add command line to user mode helpers User mode helpers were spawned without a command line, and because an empty command line is used by many tools to identify processes as kernel threads, this could cause some issues. Notably during killing spree on shutdown, since such helper would then be skipped (i.e. not killed) which would result in the process remaining alive, and thus preventing unmouting of the rootfs (as experienced with the bpfilter umh). Fixes: 449325b52b7a ("umh: introduce fork_usermode_blob() helper") Signed-off-by: Olivier Brunel Signed-off-by: David S. Miller commit c94f026fb742b2d3199422751dbc4f6fc0e753d8 Author: Dan Carpenter Date: Fri Oct 19 23:11:11 2018 +0300 qlcnic: fix a return in qlcnic_dcb_get_capability() These functions are supposed to return one on failure and zero on success. Returning a zero here could cause uninitialized variable bugs in several of the callers. For example: drivers/scsi/cxgbi/cxgb4i/cxgb4i.c:1660 get_iscsi_dcb_priority() error: uninitialized symbol 'caps'. Fixes: 48365e485275 ("qlcnic: dcb: Add support for CEE Netlink interface.") Signed-off-by: Dan Carpenter Signed-off-by: David S. Miller commit de46e92af4461decff2288a1e97e47cd9e82f783 Merge: 8df591f35e96 6371a71f3a3b Author: David S. Miller Date: Mon Oct 22 19:33:29 2018 -0700 Merge branch 'net-Add-support-for-dumping-addresses-for-a-specific-device' David Ahern says: ==================== net: Add support for dumping addresses for a specific device Use the recently added kernel side filter infrastructure to add support for dumping addresses only for a specific device. Patch 1 creates an IPv4 version similar to IPv6's in6_dump_addrs function. Patch 2 simplifies in6_dump_addrs by moving index tracking of IP addresses from inet6_dump_addr to in6_dump_addrs. Patches 3 and 4 use the device-based address dump helpers to limit a dump to just the addresses on a specific device. ==================== Signed-off-by: David S. Miller commit 6371a71f3a3b2bc47880dd76c2f176495802d0df Author: David Ahern Date: Fri Oct 19 12:45:30 2018 -0700 net/ipv6: Add support for dumping addresses for a specific device If an RTM_GETADDR dump request has ifa_index set in the ifaddrmsg header, then return only the addresses for that device. Since inet6_dump_addr is reused for multicast and anycast addresses, this adds support for device specfic dumps of RTM_GETMULTICAST and RTM_GETANYCAST as well. Signed-off-by: David Ahern Signed-off-by: David S. Miller commit 5fcd266a9f64bc75707f7ddc96427f2e8caaacd5 Author: David Ahern Date: Fri Oct 19 12:45:29 2018 -0700 net/ipv4: Add support for dumping addresses for a specific device If an RTM_GETADDR dump request has ifa_index set in the ifaddrmsg header, then return only the addresses for that device. Signed-off-by: David Ahern Signed-off-by: David S. Miller commit fe884c2be0b329042eaf0371ebdbb636ba3ccc39 Author: David Ahern Date: Fri Oct 19 12:45:28 2018 -0700 net/ipv6: Remove ip_idx arg to in6_dump_addrs ip_idx is always 0 going into in6_dump_addrs; it is passed as a pointer to save the last good index into cb. Since cb is already argument to in6_dump_addrs, just save the value there. Signed-off-by: David Ahern Signed-off-by: David S. Miller commit 1c98eca412e1f183070e76d103a296d7afccfd64 Author: David Ahern Date: Fri Oct 19 12:45:27 2018 -0700 net/ipv4: Move loop over addresses on a device into in_dev_dump_addr Similar to IPv6 move the logic that walks over the ipv4 address list for a device into a helper. Signed-off-by: David Ahern Signed-off-by: David S. Miller commit 8df591f35e9651b955d21f43828f54c106cf4807 Merge: aeb5e02aca91 01865a50d78f Author: David S. Miller Date: Mon Oct 22 19:31:14 2018 -0700 Merge branch 'hns3-next' Salil Mehta says: ==================== Adds support of RAS Error Handling in HNS3 Driver This patch-set adds support related to RAS Error handling to the HNS3 Ethernet PF Driver. Set of errors occurred in the HNS3 hardware are reported to the driver through the PCIe AER interface. The received error information is then used to classify the received errors and then decide the appropriate receovery action depending on the type of error. ==================== Signed-off-by: David S. Miller commit 01865a50d78f515423422b8c55e8b6f6bf4c2cd4 Author: Shiju Jose Date: Fri Oct 19 20:15:32 2018 +0100 net: hns3: Add enable and process hw errors of TM scheduler This patch enables and process hw errors of TM scheduler and QCN(Quantized Congestion Control). Signed-off-by: Shiju Jose Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit da2d072a9ea75dd5babebcfd71144fb5b3aa9913 Author: Shiju Jose Date: Fri Oct 19 20:15:31 2018 +0100 net: hns3: Add enable and process hw errors from PPP This patch enables and process hw errors from the PPP(Programmable Packet Process) block. Signed-off-by: Shiju Jose Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit bf1faf9415ddbfaa6d6a56a4bc594c92ca0f7309 Author: Shiju Jose Date: Fri Oct 19 20:15:30 2018 +0100 net: hns3: Add enable and process hw errors from IGU, EGU and NCSI This patch adds enable and processing of hw errors from IGU(Ingress Unit), EGU(Egress Unit) and NCSI(Network Controller Sideband Interface). Signed-off-by: Shiju Jose Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit 6d67ee9a273bbb5d3f7d66eedb924aee21c2b2cd Author: Shiju Jose Date: Fri Oct 19 20:15:29 2018 +0100 net: hns3: Add enable and process common ecc errors This patch adds enable and processing of ecc errors from common HNS blocks, CMDQ(Command Queue), IMP(Integrated Management Processor) and TQP(Task Queue Pair). Signed-off-by: Shiju Jose Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit 997141950380931073e13f7db8daf0c27b79af16 Author: Shiju Jose Date: Fri Oct 19 20:15:28 2018 +0100 net: hns3: Add support to enable and disable hw errors This patch adds functions to enable and disable hw errors. Signed-off-by: Shiju Jose Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit 6ae4e733cdd4e0e6e7069abe40197fc456e2eeea Author: Shiju Jose Date: Fri Oct 19 20:15:27 2018 +0100 net: hns3: Add PCIe AER error recovery This patch adds the error recovery for the HNS hw errors. Signed-off-by: Shiju Jose Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit 5a9f0eac935b3edbcb3155301cc8aa1e22c04ccd Author: Shiju Jose Date: Fri Oct 19 20:15:26 2018 +0100 net: hns3: Add PCIe AER callback error_detected Set of hw errors occurred in the HNS3 are reported to the hns3 driver through PCIe AER and RAS.The error info will be processed and appropriately recovered. This patch adds error_detected callback and error processing. Signed-off-by: Shiju Jose Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit aeb5e02aca91522733eb1db595ac607d30c87767 Author: Nathan Chancellor Date: Fri Oct 19 11:00:30 2018 -0700 mISDN: Fix type of switch control variable in ctrl_teimanager Clang warns (trimmed for brevity): drivers/isdn/mISDN/tei.c:1193:7: warning: overflow converting case value to switch condition type (2147764552 to 18446744071562348872) [-Wswitch] case IMHOLD_L1: ^ drivers/isdn/mISDN/tei.c:1187:7: warning: overflow converting case value to switch condition type (2147764550 to 18446744071562348870) [-Wswitch] case IMCLEAR_L2: ^ 2 warnings generated. The root cause is that the _IOC macro can generate really large numbers, which don't find into type int. My research into how GCC and Clang are handling this at a low level didn't prove fruitful and surveying the kernel tree shows that aside from here and a few places in the scsi subsystem, everything that uses _IOC is at least of type 'unsigned int'. Make that change here because as nothing in this function cares about the signedness of the variable and it removes ambiguity, which is never good when dealing with compilers. While we're here, remove the unnecessary local variable ret (just return -EINVAL and 0 directly). Link: https://github.com/ClangBuiltLinux/linux/issues/67 Signed-off-by: Nathan Chancellor Signed-off-by: David S. Miller commit 988f3f1603d4650409db5334355cbf7b13ef50c3 Author: Jon Maloy Date: Fri Oct 19 19:55:40 2018 +0200 tipc: eliminate message disordering during binding table update We have seen the following race scenario: 1) named_distribute() builds a "bulk" message, containing a PUBLISH item for a certain publication. This is based on the contents of the binding tables's 'cluster_scope' list. 2) tipc_named_withdraw() removes the same publication from the list, bulds a WITHDRAW message and distributes it to all cluster nodes. 3) tipc_named_node_up(), which was calling named_distribute(), sends out the bulk message built under 1) 4) The WITHDRAW message arrives at the just detected node, finds no corresponding publication, and is dropped. 5) The PUBLISH item arrives at the same node, is added to its binding table, and remains there forever. This arrival disordering was earlier taken care of by the backlog queue, originally added for a different purpose, which was removed in the commit referred to below, but we now need a different solution. In this commit, we replace the rcu lock protecting the 'cluster_scope' list with a regular RW lock which comprises even the sending of the bulk message. This both guarantees both the list integrity and the message sending order. We will later add a commit which cleans up this code further. Note that this commit needs recently added commit d3092b2efca1 ("tipc: fix unsafe rcu locking when accessing publication list") to apply cleanly. Fixes: 37922ea4a310 ("tipc: permit overlapping service ranges in name table") Reported-by: Tuong Lien Tong Acked-by: Ying Xue Signed-off-by: Jon Maloy Signed-off-by: David S. Miller commit eec6f752f7241cc914cef0b832e1c99f81ba166a Author: YueHaibing Date: Fri Oct 19 13:03:06 2018 +0000 octeontx2-af: Remove set but not used variables 'devnum, is_pf' Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/ethernet/marvell/octeontx2/af/rvu.c: In function 'rvu_detach_rsrcs': drivers/net/ethernet/marvell/octeontx2/af/rvu.c:855:6: warning: variable 'devnum' set but not used [-Wunused-but-set-variable] drivers/net/ethernet/marvell/octeontx2/af/rvu.c:853:7: warning: variable 'is_pf' set but not used [-Wunused-but-set-variable] drivers/net/ethernet/marvell/octeontx2/af/rvu.c: In function 'rvu_mbox_handler_ATTACH_RESOURCES': drivers/net/ethernet/marvell/octeontx2/af/rvu.c:1054:7: warning: variable 'is_pf' set but not used [-Wunused-but-set-variable] drivers/net/ethernet/marvell/octeontx2/af/rvu.c:1053:6: warning: variable 'devnum' set but not used [-Wunused-but-set-variable] It never used since introduction in commit 746ea74241fa ("octeontx2-af: Add RVU block LF provisioning support") Signed-off-by: YueHaibing Signed-off-by: David S. Miller commit 665fc901b59ba336bb084ec0a0606ad8fc7d673f Author: YueHaibing Date: Fri Oct 19 12:51:28 2018 +0000 octeontx2-af: Remove set but not used variable 'block' Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/ethernet/marvell/octeontx2/af/rvu_npa.c: In function 'rvu_npa_init': drivers/net/ethernet/marvell/octeontx2/af/rvu_npa.c:446:20: warning: variable 'block' set but not used [-Wunused-but-set-variable] It never used since introduction in commit 7a37245ef23f ("octeontx2-af: NPA block admin queue init") Signed-off-by: YueHaibing Signed-off-by: David S. Miller commit 627d39c397999668557f6268b48ec8a74b6d2b0b Merge: 29e270fc3219 6acb47d1a318 Author: David S. Miller Date: Mon Oct 22 19:27:15 2018 -0700 Merge branch 'phy-ocelot-serdes-fix-out-of-bounds-read' Gustavo A. R. Silva says: ==================== phy: ocelot-serdes: fix out-of-bounds read This patchset aims to fix an out-of-bounds bug in the phy-ocelot-serdes driver. Currently, there is an out-of-bounds read on array ctrl->phys, once variable i reaches the maximum array size of SERDES_MAX in the for loop. Quentin Schulz pointed out that SERDES_MAX is a valid value to index ctrl->phys. So, I updated SERDES_MAX to be SERDES6G_MAX + 1 in include/dt-bindings/phy/phy-ocelot-serdes.h. Then I changed the condition in the for loop from i <= SERDES_MAX to i < SERDES_MAX in order to complete the fix. The reason I'm sending this fix as series is because checkpatch reported an error when I first tried to integrate the whole solution into a singe patch. So, changes to dt-bindings should be sent as a separate patch. Changes in v3: - Post the series to netdev, so Dave can take it. Changes in v2: - Send the whole series to Kishon Vijay Abraham I, so it can be taken into the PHY tree. - Add Quentin's Reviewed-by to commit log in both patches. ==================== Signed-off-by: David S. Miller commit 6acb47d1a318e5b3b7115354ebc4ea060c59d3a1 Author: Gustavo A. R. Silva Date: Fri Oct 19 11:21:38 2018 +0200 phy: ocelot-serdes: fix out-of-bounds read Currently, there is an out-of-bounds read on array ctrl->phys, once variable i reaches the maximum array size of SERDES_MAX in the for loop. Fix this by changing the condition in the for loop from i <= SERDES_MAX to i < SERDES_MAX. Addresses-Coverity-ID: 1473966 ("Out-of-bounds read") Addresses-Coverity-ID: 1473959 ("Out-of-bounds read") Fixes: 51f6b410fc22 ("phy: add driver for Microsemi Ocelot SerDes muxing") Reviewed-by: Quentin Schulz Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller commit 81fa7a69c2174ed8de314b9c231ef30a8718e5e1 Author: Gustavo A. R. Silva Date: Fri Oct 19 11:19:13 2018 +0200 dt-bindings: phy: Update SERDES_MAX to be SERDES_MAX + 1 SERDES_MAX is a valid value to index ctrl->phys in drivers/phy/mscc/phy-ocelot-serdes.c. But, currently, there is an out-of-bounds bug in the mentioned driver when reading from ctrl->phys, because the size of array ctrl->phys is SERDES_MAX. Partially fix this by updating SERDES_MAX to be SERDES6G_MAX + 1. Notice that this is the first part of the solution to the out-of-bounds bug mentioned above. Although this change is not dependent on any other one. Suggested-by: Quentin Schulz Reviewed-by: Quentin Schulz Acked-by: Rob Herring Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller commit 29e270fc32192e7729057963ae7120663856c93e Author: Guoqing Jiang Date: Fri Oct 19 12:08:22 2018 +0800 tipc: use destination length for copy string Got below warning with gcc 8.2 compiler. net/tipc/topsrv.c: In function ‘tipc_topsrv_start’: net/tipc/topsrv.c:660:2: warning: ‘strncpy’ specified bound depends on the length of the source argument [-Wstringop-overflow=] strncpy(srv->name, name, strlen(name) + 1); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ net/tipc/topsrv.c:660:27: note: length computed here strncpy(srv->name, name, strlen(name) + 1); ^~~~~~~~~~~~ So change it to correct length and use strscpy. Signed-off-by: Guoqing Jiang Acked-by: Ying Xue Signed-off-by: David S. Miller commit a1930a9877d66e9333fc1b1ceeec1ab54591a91f Author: Nathan Chancellor Date: Thu Oct 18 18:11:04 2018 -0700 isdn: hfc_{pci,sx}: Avoid empty body if statements Clang warns: drivers/isdn/hisax/hfc_pci.c:131:34: error: if statement has empty body [-Werror,-Wempty-body] if (Read_hfc(cs, HFCPCI_INT_S1)); ^ drivers/isdn/hisax/hfc_pci.c:131:34: note: put the semicolon on a separate line to silence this warning In my attempt to hide the warnings because I thought they didn't serve any purpose[1], Masahiro Yamada pointed out that {Read,Write}_hfc in hci_pci.c should be using a standard register access method; otherwise, the compiler will just remove the if statements. For hfc_pci, use the versions of {Read,Write}_hfc found in drivers/isdn/hardware/mISDN/hfc_pCI.h while converting pci_io to be 'void __iomem *' (and clean up ioremap) then remove the empty if statements. For hfc_sx, {Read,Write}_hfc are already use a proper register accessor (inb, outb) so just remove the unnecessary if statements. [1]: https://lore.kernel.org/lkml/20181016021454.11953-1-natechancellor@gmail.com/ Link: https://github.com/ClangBuiltLinux/linux/issues/66 Suggested-by: Masahiro Yamada Signed-off-by: Nathan Chancellor Signed-off-by: David S. Miller commit 8dbc450f76dc8f3b47fe117cd0cde166e1f21b64 Merge: 46b8306480fb 19832d244954 Author: David S. Miller Date: Mon Oct 22 19:14:24 2018 -0700 Merge branch 'sparc-vdso' sparc: VDSO improvements I started out on these changes with the goal of improving perf annotations when the VDSO is in use. Due to lack of inlining the helper functions are typically hit when profiling instead of __vdso_gettimeoday() or __vdso_vclock_gettime(). The only symbols available by default are the dyanmic symbols, which therefore doesn't cover the helper functions. So the perf output looks terrible, because the symbols cannot be resolved and all show up as "Unknown". The sparc VDSO code forces no inlining because of the way the simplistic %tick register read code patching works. So fixing that was the first order of business. Tricks were taken from how x86 implements alternates. The crucial factor is that if you want to refer to locations (for the original and patch instruction(s)) you have to do so in a way that is resolvable at link time even for a shared object. So you have to do this by storing PC-relative values, and not in executable sections. Next, we sanitize the Makefile so that the cflags et al. make more sense. And LDFLAGS are applied actually to invocations of LD instead of CC. We also add some sanity checking, specifically in a post-link check that makes sure we don't have any unexpected unresolved symbols in the VDSO. This is essential because the dynamic linker cannot resolve symbols in the VDSO because it cannot write to it. Finally some very minor optimizations are preformed to the vclock_gettime.c code. One thing which is tricky with this code on sparc is that struct timeval and struct timespec are layed out differently on 64-bit. This is because, unlike other architectures, sparc defined suseconds_t as 'int' even on 64-bit. This is why we have all of the "union" tstv_t" business and the weird assignments in __vdso_gettimeofday(). Performance wise we do gain some cycle shere, specifically here are cycle counts for a user application calling gettimeofday(): no-VDSO VDSO-orig VDSO-new ================================================ 64-bit 853 cycles 112 cycles 125 cycles 32-bit 849 cycles 134 cycles 141 cycles These results are with current glibc sources. To get better we'd need to implement this in assembler, and I might just do that at some point. Signed-off-by: David S. Miller commit 304d9b486b3c6994c193b6693c601b463987e6ac Author: Biju Das Date: Tue Sep 25 18:01:04 2018 +0100 dt-bindings: thermal: rcar: Add device tree support for r8a7744 Add thermal sensor support for r8a7744 SoC. The Renesas RZ/G1N (r8a7744) thermal sensor module is identical to the R-Car Gen2 family. No driver change is needed due to the fallback compatible value "renesas,rcar-gen2-thermal". Signed-off-by: Biju Das Reviewed-by: Chris Paterson Reviewed-by: Daniel Lezcano Reviewed-by: Simon Horman Reviewed-by: Geert Uytterhoeven Signed-off-by: Eduardo Valentin commit 78130819695f17f5c042d8ba097802639478faf5 Author: Chao Yu Date: Tue Sep 25 15:36:02 2018 +0800 f2fs: fix to keep project quota consistent This patch does below changes to keep consistence of project quota data in sudden power-cut case: - update inode.i_projid and project quota atomically under lock_op() in f2fs_ioc_setproject() - recover inode.i_projid and project quota in recover_inode() Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit af033b2aa8a874fd5737fafe90d159136527b5b4 Author: Chao Yu Date: Thu Sep 20 20:05:00 2018 +0800 f2fs: guarantee journalled quota data by checkpoint For journalled quota mode, let checkpoint to flush dquot dirty data and quota file data to guarntee persistence of all quota sysfile in last checkpoint, by this way, we can avoid corrupting quota sysfile when encountering SPO. The implementation is as below: 1. add a global state SBI_QUOTA_NEED_FLUSH to indicate that there is cached dquot metadata changes in quota subsystem, and later checkpoint should: a) flush dquot metadata into quota file. b) flush quota file to storage to keep file usage be consistent. 2. add a global state SBI_QUOTA_NEED_REPAIR to indicate that quota operation failed due to -EIO or -ENOSPC, so later, a) checkpoint will skip syncing dquot metadata. b) CP_QUOTA_NEED_FSCK_FLAG will be set in last cp pack to give a hint for fsck repairing. 3. add a global state SBI_QUOTA_SKIP_FLUSH, in checkpoint, if quota data updating is very heavy, it may cause hungtask in block_operation(). To avoid this, if our retry time exceed threshold, let's just skip flushing and retry in next checkpoint(). Signed-off-by: Weichao Guo Signed-off-by: Chao Yu [Jaegeuk Kim: avoid warnings and set fsck flag] Signed-off-by: Jaegeuk Kim commit 26b5a079197c8cb6725565968b7fd3299bd1877b Author: Sheng Yong Date: Fri Oct 12 18:49:26 2018 +0800 f2fs: cleanup dirty pages if recover failed During recover, we will try to create new dentries for inodes with dentry_mark. But if the parent is missing (e.g. killed by fsck), recover will break. But those recovered dirty pages are not cleanup. This will hit f2fs_bug_on: [ 53.519566] F2FS-fs (loop0): Found nat_bits in checkpoint [ 53.539354] F2FS-fs (loop0): recover_inode: ino = 5, name = file, inline = 3 [ 53.539402] F2FS-fs (loop0): recover_dentry: ino = 5, name = file, dir = 0, err = -2 [ 53.545760] F2FS-fs (loop0): Cannot recover all fsync data errno=-2 [ 53.546105] F2FS-fs (loop0): access invalid blkaddr:4294967295 [ 53.546171] WARNING: CPU: 1 PID: 1798 at fs/f2fs/checkpoint.c:163 f2fs_is_valid_blkaddr+0x26c/0x320 [ 53.546174] Modules linked in: [ 53.546183] CPU: 1 PID: 1798 Comm: mount Not tainted 4.19.0-rc2+ #1 [ 53.546186] Hardware name: innotek GmbH VirtualBox/VirtualBox, BIOS VirtualBox 12/01/2006 [ 53.546191] RIP: 0010:f2fs_is_valid_blkaddr+0x26c/0x320 [ 53.546195] Code: 85 bb 00 00 00 48 89 df 88 44 24 07 e8 ad a8 db ff 48 8b 3b 44 89 e1 48 c7 c2 40 03 72 a9 48 c7 c6 e0 01 72 a9 e8 84 3c ff ff <0f> 0b 0f b6 44 24 07 e9 8a 00 00 00 48 8d bf 38 01 00 00 e8 7c a8 [ 53.546201] RSP: 0018:ffff88006c067768 EFLAGS: 00010282 [ 53.546208] RAX: 0000000000000000 RBX: ffff880068844200 RCX: ffffffffa83e1a33 [ 53.546211] RDX: 0000000000000000 RSI: 0000000000000008 RDI: ffff88006d51e590 [ 53.546215] RBP: 0000000000000005 R08: ffffed000daa3cb3 R09: ffffed000daa3cb3 [ 53.546218] R10: 0000000000000001 R11: ffffed000daa3cb2 R12: 00000000ffffffff [ 53.546221] R13: ffff88006a1f8000 R14: 0000000000000200 R15: 0000000000000009 [ 53.546226] FS: 00007fb2f3646840(0000) GS:ffff88006d500000(0000) knlGS:0000000000000000 [ 53.546229] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 53.546234] CR2: 00007f0fd77f0008 CR3: 00000000687e6002 CR4: 00000000000206e0 [ 53.546237] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 53.546240] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 53.546242] Call Trace: [ 53.546248] f2fs_submit_page_bio+0x95/0x740 [ 53.546253] read_node_page+0x161/0x1e0 [ 53.546271] ? truncate_node+0x650/0x650 [ 53.546283] ? add_to_page_cache_lru+0x12c/0x170 [ 53.546288] ? pagecache_get_page+0x262/0x2d0 [ 53.546292] __get_node_page+0x200/0x660 [ 53.546302] f2fs_update_inode_page+0x4a/0x160 [ 53.546306] f2fs_write_inode+0x86/0xb0 [ 53.546317] __writeback_single_inode+0x49c/0x620 [ 53.546322] writeback_single_inode+0xe4/0x1e0 [ 53.546326] sync_inode_metadata+0x93/0xd0 [ 53.546330] ? sync_inode+0x10/0x10 [ 53.546342] ? do_raw_spin_unlock+0xed/0x100 [ 53.546347] f2fs_sync_inode_meta+0xe0/0x130 [ 53.546351] f2fs_fill_super+0x287d/0x2d10 [ 53.546367] ? vsnprintf+0x742/0x7a0 [ 53.546372] ? f2fs_commit_super+0x180/0x180 [ 53.546379] ? up_write+0x20/0x40 [ 53.546385] ? set_blocksize+0x5f/0x140 [ 53.546391] ? f2fs_commit_super+0x180/0x180 [ 53.546402] mount_bdev+0x181/0x200 [ 53.546406] mount_fs+0x94/0x180 [ 53.546411] vfs_kern_mount+0x6c/0x1e0 [ 53.546415] do_mount+0xe5e/0x1510 [ 53.546420] ? fs_reclaim_release+0x9/0x30 [ 53.546424] ? copy_mount_string+0x20/0x20 [ 53.546428] ? fs_reclaim_acquire+0xd/0x30 [ 53.546435] ? __might_sleep+0x2c/0xc0 [ 53.546440] ? ___might_sleep+0x53/0x170 [ 53.546453] ? __might_fault+0x4c/0x60 [ 53.546468] ? _copy_from_user+0x95/0xa0 [ 53.546474] ? memdup_user+0x39/0x60 [ 53.546478] ksys_mount+0x88/0xb0 [ 53.546482] __x64_sys_mount+0x5d/0x70 [ 53.546495] do_syscall_64+0x65/0x130 [ 53.546503] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [ 53.547639] ---[ end trace b804d1ea2fec893e ]--- So if recover fails, we need to drop all recovered data. Signed-off-by: Sheng Yong Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 1e78e8bd9d107c351930cdb1e11202caec01b311 Author: Sahitya Tummala Date: Wed Oct 10 10:56:22 2018 +0530 f2fs: fix data corruption issue with hardware encryption Direct IO can be used in case of hardware encryption. The following scenario results into data corruption issue in this path - Thread A - Thread B- -> write file#1 in direct IO -> GC gets kicked in -> GC submitted bio on meta mapping for file#1, but pending completion -> write file#1 again with new data in direct IO -> GC bio gets completed now -> GC writes old data to the new location and thus file#1 is corrupted. Fix this by submitting and waiting for pending io on meta mapping for direct IO case in f2fs_map_blocks(). Signed-off-by: Sahitya Tummala Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 0c093b590efb5c1ccdc835868dc2ae94bd2e14dc Author: Chao Yu Date: Sun Oct 7 03:03:38 2018 +0800 f2fs: fix to recover inode->i_flags of inode block during POR Testcase to reproduce this bug: 1. mkfs.f2fs /dev/sdd 2. mount -t f2fs /dev/sdd /mnt/f2fs 3. touch /mnt/f2fs/file 4. sync 5. chattr +a /mnt/f2fs/file 6. xfs_io -a /mnt/f2fs/file -c "fsync" 7. godown /mnt/f2fs 8. umount /mnt/f2fs 9. mount -t f2fs /dev/sdd /mnt/f2fs 10. xfs_io /mnt/f2fs/file There is no error when opening this file w/o O_APPEND, but actually, we expect the correct result should be: /mnt/f2fs/file: Operation not permitted The root cause is, in recover_inode(), we recover inode->i_flags more than F2FS_I(inode)->i_flags, so fix it. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 9149a5eb606152df158eb7d7da5a34e84b574189 Author: Chao Yu Date: Sun Oct 7 19:06:15 2018 +0800 f2fs: spread f2fs_set_inode_flags() This patch changes codes as below: - use f2fs_set_inode_flags() to update i_flags atomically to avoid potential race. - synchronize F2FS_I(inode)->i_flags to inode->i_flags in f2fs_new_inode(). - use f2fs_set_inode_flags() to simply codes in f2fs_quota_{on,off}. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 2baf07818549c8bb8d7b3437e889b86eab56d38e Author: Chao Yu Date: Fri Jul 27 18:15:16 2018 +0800 f2fs: fix to spread clear_cold_data() We need to drop PG_checked flag on page as well when we clear PG_uptodate flag, in order to avoid treating the page as GCing one later. Signed-off-by: Weichao Guo Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 164a63fa6b384e30ceb96ed80bc7dc3379bc0960 Author: Jaegeuk Kim Date: Tue Oct 16 19:30:13 2018 -0700 Revert "f2fs: fix to clear PG_checked flag in set_page_dirty()" This reverts commit 66110abc4c931f879d70e83e1281f891699364bf. If we clear the cold data flag out of the writeback flow, we can miscount -1 by end_io, which incurs a deadlock caused by all I/Os being blocked during heavy GC. Balancing F2FS Async: - IO (CP: 1, Data: -1, Flush: ( 0 0 1), Discard: ( ... GC thread: IRQ - move_data_page() - set_page_dirty() - clear_cold_data() - f2fs_write_end_io() - type = WB_DATA_TYPE(page); here, we get wrong type - dec_page_count(sbi, type); - f2fs_wait_on_page_writeback() Cc: Reported-and-Tested-by: Park Ju Hyung Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 5f9abab42b60e67846cd13dafc6a61d70d7a2682 Author: Jaegeuk Kim Date: Tue Oct 16 10:20:53 2018 -0700 f2fs: account read IOs and use IO counts for is_idle This patch adds issued read IO counts which is under block layer. Chao modified a bit, since: Below race can cause reversed reference on F2FS_RD_DATA, there is the same issue in f2fs_submit_page_bio(), fix them by relocate __submit_bio() and inc_page_count. Thread A Thread B - f2fs_write_begin - f2fs_submit_page_read - __submit_bio - f2fs_read_end_io - __read_end_io - dec_page_count(, F2FS_RD_DATA) - inc_page_count(, F2FS_RD_DATA) Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit ca9eb48fe01fa7fa60ff9f2196b1bd0d84dc81af Merge: b537149a2fb4 f35b1e53a66a Author: Linus Torvalds Date: Tue Oct 23 01:54:44 2018 +0100 Merge tag 'regulator-v5.0' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator Pull regulator updates from Mark Brown: "The biggest chunk of the regulator changes for this release outside of the new drivers is the conversion of the fixed regulator to use the GPIO descriptor API, there's a small addition to the GPIO API plus a bunch of updates to board files to implement it. This is some really welcome work from Linus Walleij that's had a bunch of review and has been sitting in -next for a while so I'm fairly happy there's no major issues. - Helpers for overlapping linear ranges. - Display opmode and consumer requested load in the regualtor_summary file in debugfs, plus a fix there. - Support for the fun and entertaining power off mechanism that the pfuze100 hardware implements. - Conversion of the fixed regulator API to use GPIO descriptors, including pulling in a bunch of patches to a bunch of board files. - New drivers for Cirrus Logic Lochnagar, Qualcomm PMS405, Rohm BD71847, ST PMIC1, and TI LM363x devices" * tag 'regulator-v5.0' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: (36 commits) regulator: lochnagar: Use a consisent comment style for SPDX header regulator: bd718x7: Remove struct bd718xx_pmic regulator: Fetch enable gpiods nonexclusive regulator/gpio: Allow nonexclusive GPIO access regulator: lochnagar: Add support for the Cirrus Logic Lochnagar regulator: stpmic1: Return REGULATOR_MODE_INVALID for invalid mode regulator: stpmic1: add stpmic1 regulator driver dt-bindings: regulator: document stpmic1 pmic regulators regulator: axp20x: Mark expected switch fall-throughs regulator: bd718xx: fix build warning on x86_64 regulator: fixed: Default enable high on DT regulators regulator: bd718xx: rename bd71837 to 718xx regulator: bd718XX use pickable ranges regulator/mfd: bd718xx: rename bd71837/bd71847 common instances regulator: Support regulators where voltage ranges are selectable mfd: dt bindings: add BD71847 device-tree binding documentation regulator: dt bindings: add BD71847 device-tree binding documentation regulator/mfd: Support ROHM BD71847 power management IC regulator: da905{2,5}: Remove unnecessary array check regulator: qcom: Add PMS405 regulators ... commit 78efac537de33faab9a4302cc05a70bb4a8b3b63 Author: Chao Yu Date: Mon Oct 22 23:24:28 2018 +0800 f2fs: fix to account IO correctly for cgroup writeback Now, we have supported cgroup writeback, it depends on correctly IO account of specified filesystem. But in commit d1b3e72d5490 ("f2fs: submit bio of in-place-update pages"), we split write paths from f2fs_submit_page_mbio() to two: - f2fs_submit_page_bio() for IPU path - f2fs_submit_page_bio() for OPU path But still we account write IO only in f2fs_submit_page_mbio(), result in incorrect IO account, fix it by adding missing IO account in IPU path. Fixes: d1b3e72d5490 ("f2fs: submit bio of in-place-update pages") Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 4c58ed076875f36dae0f240da1e25e99e5d4afb8 Author: Chao Yu Date: Mon Oct 22 09:12:51 2018 +0800 f2fs: fix to account IO correctly Below race can cause reversed reference on dirty count, fix it by relocating __submit_bio() and inc_page_count(). Thread A Thread B - f2fs_inplace_write_data - f2fs_submit_page_bio - __submit_bio - f2fs_write_end_io - dec_page_count - inc_page_count Cc: Fixes: d1b3e72d5490 ("f2fs: submit bio of in-place-update pages") Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 8c6c36846f1174784bcf90627341ede7ce9a0b36 Author: Daniel Lezcano Date: Tue Sep 25 11:03:12 2018 +0200 thermal/drivers/hisi: Add the dual clusters sensors for hi3660 The code is ready to support multiple sensors on the hi3660. The DT defines a thermal zone per cluster. Add the little cluster sensor and let it bind with the thermal zone. Signed-off-by: Daniel Lezcano Signed-off-by: Eduardo Valentin commit ce8c0700dcf905333733f83a06cd956496e0a661 Author: Daniel Lezcano Date: Tue Sep 25 11:03:10 2018 +0200 thermal/drivers/hisi: Add more sensors channel Add the sensor channels id for the little, g3d and modem. Signed-off-by: Daniel Lezcano Signed-off-by: Eduardo Valentin commit a18e83e77217b63e4138470aa49d8269a201f76d Author: Daniel Lezcano Date: Tue Sep 25 11:03:09 2018 +0200 thermal/drivers/hisi: Remove pointless irq field The irq field in the data structure is pointless as the scope of its usage is just to request the interrupt. It can be replaced by a local variable. Use the 'ret' variable to get the interrupt number. Signed-off-by: Daniel Lezcano Signed-off-by: Eduardo Valentin commit 2cffaeff083fafeefb1daee7b443f7381eca5b2f Author: Daniel Lezcano Date: Tue Sep 25 11:03:07 2018 +0200 thermal/drivers/hisi: Use platform_get_irq_byname As we have the interrupt names defines, replace platform_get_irq() by platform_get_irq_byname(), so no confusion can be made when getting the interrupt with the sensor id. Signed-off-by: Daniel Lezcano Signed-off-by: Eduardo Valentin commit a849eecee7ee70db47c4f7e2976432ef16c081e1 Author: Daniel Lezcano Date: Tue Sep 25 11:03:05 2018 +0200 thermal/drivers/hisi: Replace macro name with relevant sensor location Change the macro name in order to give a better indication of the sensor location. Signed-off-by: Daniel Lezcano Signed-off-by: Eduardo Valentin commit 7edc5e406f2637ba1f9c93b1e72e0e37f446304b Author: Daniel Lezcano Date: Tue Sep 25 11:03:04 2018 +0200 thermal/drivers/hisi: Add multiple sensors support Change the code as it is dealing with several sensors. For git-bisect compatibility (compilation and booting), assume the DT is not yet changed and we have a single interrupt. Next changes will support multiple interrupt sorted by their name. Signed-off-by: Daniel Lezcano Signed-off-by: Eduardo Valentin commit 8c0ffc8f9a76b2007258f146a4ff22ef14e68590 Author: Daniel Lezcano Date: Tue Sep 25 11:03:03 2018 +0200 thermal/drivers/hisi: Prepare to support multiple sensors Convert the 'sensor' field to a pointer and propagate the change in the file. Havintg a pointer, gives us the opportunity to define multiple sensors. Signed-off-by: Daniel Lezcano Signed-off-by: Eduardo Valentin commit 9bb4ec8d9e93f0d1a94e8aa9100c5f42fd364078 Author: Daniel Lezcano Date: Tue Sep 25 11:03:02 2018 +0200 thermal/drivers/hisi: Factor out the probe functions The hi6220 and the hi3660 probe functions are doing almost the same operations, they can share 90% of their code. Factor out the probe functions by moving the common code in the common probe function. Signed-off-by: Daniel Lezcano Signed-off-by: Eduardo Valentin commit 49e778d1c750d5b1f773edeb93dfef963bef3f21 Author: Daniel Lezcano Date: Tue Sep 25 11:03:01 2018 +0200 thermal/drivers/hisi: Set the thermal zone private data to the sensor pointer Store the sensor pointer in the thermal zone private data and use it in the callback functions. That allows to continue the conversion to sensor oriented code where the pointers are the sensors. Signed-off-by: Daniel Lezcano Signed-off-by: Eduardo Valentin commit 9c9ae8da710639790f1d45b1a55d28ee70734c11 Author: Daniel Lezcano Date: Tue Sep 25 11:03:00 2018 +0200 thermal/drivers/hisi: Change the driver to be sensor oriented In order to support multiple sensors, we have to change the code to deal with sensors and not the hisi thermal structure. Add a back pointer to the hisi thermal structure (containerof is not a good option because later we convert the sensor field to a pointer). Change the functions parameters to take a sensor instead of this hisi thermal 'data' structure. Signed-off-by: Daniel Lezcano Signed-off-by: Eduardo Valentin commit 19832d244954189c851d8492718607a14734679c Author: David S. Miller Date: Sun Oct 21 22:38:56 2018 -0700 sparc: Several small VDSO vclock_gettime.c improvements. Almost entirely borrowed from the x86 code. Main improvement is to avoid having to initialize ts->tv_nsec to zero before the sequence loops, by expanding timespec_add_ns(). Signed-off-by: David S. Miller commit c90aaeccc7c6a8967f3efd43048eeae51072251c Author: Daniel Lezcano Date: Tue Sep 25 11:02:59 2018 +0200 thermal/drivers/hisi: Change the platform data pointer to sensor ops Group the temperature sensor specific ops into a single structure and assign it to hisi thermal data structure. Change the platform data pointer to reference the specific sensor ops instead of the probe functions. Moving out those allow to split the code to self-encapsulate the sensor object. Signed-off-by: Daniel Lezcano Signed-off-by: Eduardo Valentin commit d26c4bbf992463c043fdee4b3e5efa3f08990862 Merge: a6de21baf637 8b20d2db0a6d Author: Palmer Dabbelt Date: Mon Oct 22 17:39:29 2018 -0700 RISC-V: SMP cleanup and new features This patch series now has evolved to contain several related changes. 1. Updated the assorted cleanup series by Palmer. The original cleanup patch series can be found here. http://lists.infradead.org/pipermail/linux-riscv/2018-August/001232.html 2. Implemented decoupling linux logical CPU ids from hart id. Some of the work has been inspired from ARM64. Tested on QEMU & HighFive Unleashed board with/without SMP enabled. 3. Included Anup's cleanup and IPI stat patch. All the patch series have been combined to avoid conflicts as a lot of common code is changed different patch sets. Atish has mostly addressed review comments and fixed checkpatch errors from Palmer's and Anup's series. Signed-off-by: Palmer Dabbelt commit a6de21baf6373ac1ddd5c52e8fbd959f164ef9cf Merge: 4e4101cfefd3 827a438156e4 Author: Palmer Dabbelt Date: Mon Oct 22 17:39:08 2018 -0700 RISC-V: Fix some RV32 bugs and build failures This patch set fixes up various failures in the RV32I port. The fixes are all nominally independent, but are really only testable together because the RV32I port fails to build without all of them. The patch set includes: * The removal of tishift on RV32I targets, as 128-bit integers are not supported by the toolchain. * The removal of swiotlb from RV32I targets, since all physical addresses can be mapped by all hardware on all existing RV32I targets. * The addition of ummodi3 and udivmoddi4 from an old version of GCC that was licensed under GPLv2 as generic code, along with their use on RV32I targets. * A fix to our page alignment logic within ioremap for RV32I targets. Signed-off-by: Palmer Dabbelt commit 4e4101cfefd382176b05356c5ef112561ae10384 Merge: aef53f97b505 9411ec60c23d Author: Palmer Dabbelt Date: Mon Oct 22 17:38:26 2018 -0700 riscv: Add support to no-FPU systems This patchset adds an option, CONFIG_FPU, to enable/disable floating- point support within the kernel. The kernel's new behavior will be as follows: * with CONFIG_FPU=y All FPU codes are reserved. If no FPU is found during booting, a global flag will be set, and those functions will be bypassed with condition check to that flag. * with CONFIG_FPU=n No floating-point instructions in kernel and all related settings are excluded. Signed-off-by: Palmer Dabbelt commit d1d2c290b3c04b65fa6132eeebe50a070746d8f6 Author: Dan Carpenter Date: Wed Sep 19 13:35:00 2018 +0300 thermal: armada: fix a test in probe() The platform_get_resource() function doesn't return error pointers, it returns NULL on error. Fixes: 3d4e51844a4e ("thermal: armada: convert driver to syscon register accesses") Signed-off-by: Dan Carpenter Reviewed-by: Miquel Raynal Signed-off-by: Eduardo Valentin commit aef53f97b505ff94190ce3a06dcd0ded6cf5c0ca Author: Nick Kossifidis Date: Thu Sep 20 01:48:15 2018 +0300 RISC-V: Cosmetic menuconfig changes * Move the built-in cmdline configuration on a new menu entry "Boot options", it doesn't make much sense to be part of the debuging menu. * Rename "Kernel Type" menu to "Kernel features" to be more consistent with what other architectures are using, plus "type" is a bit misleading here. Signed-off-by: Nick Kossifidis Signed-off-by: Palmer Dabbelt commit ee5928843a93c7d246bbe17c5eed95918ed0ddb1 Author: Masahiro Yamada Date: Fri Aug 24 17:33:53 2018 +0900 riscv: move GCC version check for ARCH_SUPPORTS_INT128 to Kconfig This becomes much neater in Kconfig. Signed-off-by: Masahiro Yamada Signed-off-by: Palmer Dabbelt commit f31b8de98853091e86a6391f9cd7948a2397287e Author: Christoph Hellwig Date: Fri Sep 21 08:43:21 2018 +0200 RISC-V: remove the unused return_to_handler export This export is not only not needed, but also breaks symbol versioning due to being an undeclared assembly export. Signed-off-by: Christoph Hellwig Signed-off-by: Palmer Dabbelt commit b90edb33010bcfb9a0d74681be2cdd52300f1e69 Author: Jim Wilson Date: Tue Oct 16 14:42:59 2018 -0700 RISC-V: Add futex support. Here is an attempt to add the missing futex support. I started with the MIPS version of futex.h and modified it until I got it working. I tested it on a HiFive Unleashed running Fedora Core 29 using the fc29 4.15 version of the kernel. This was tested against the glibc testsuite, where it fixes 14 nptl related testsuite failures. That unfortunately only tests the cmpxchg support, so I also used the testcase at the end of https://lwn.net/Articles/148830/ which tests the atomic_op functionality, except that it doesn't verify that the operations are atomic, which they obviously are. This testcase runs successfully with the patch and fails without it. I'm not a kernel expert, so there could be details I got wrong here. I wasn't sure about the memory model support, so I used aqrl which seemed safest, and didn't add fences which seemed unnecessary. I'm not sure about the copyright statements, I left in Ralf Baechle's line because I started with his code. Checkpatch reports some style problems, but it is the same style as the MIPS futex.h, and the uses of ENOSYS appear correct even though it complains about them. I don't know if any of that matters. This patch was tested on qemu with the glibc nptl/tst-cond-except testcase, and the wake_op testcase from above. Signed-off-by: Jim Wilson Reviewed-by: Christoph Hellwig Signed-off-by: Palmer Dabbelt commit b8c8a9590e4fde82f8c3ee06a521763e6f21e9c8 Author: Jim Wilson Date: Wed Oct 17 17:59:05 2018 -0700 RISC-V: Add FP register ptrace support for gdb. Add a variable and a macro to describe FP registers, assuming only D is supported. FP code is conditional on CONFIG_FPU. The FP regs and FCSR are copied separately to avoid copying struct padding. Tested by hand and with the gdb testsuite. Signed-off-by: Jim Wilson Signed-off-by: Palmer Dabbelt commit 86e581e310785782e2025a076dc9a3f5138e5bf3 Author: Palmer Dabbelt Date: Mon Aug 27 14:42:53 2018 -0700 RISC-V: Mask out the F extension on systems without D The RISC-V Linux port doesn't support systems that have the F extension but don't have the D extension -- we actually don't support systems without D either, but Alan's patch set is rectifying that soon. For now I think we can leave this in a semi-broken state and just wait for Alan's patch set to get merged for proper non-FPU support -- the patch set is starting to look good, so doing something in-between doesn't seem like it's worth the work. I don't think it's worth fretting about support for systems with F but not D for now: our glibc ABIs are IMAC and IMAFDC so they probably won't end up being popular. We can always extend this in the future. CC: Alan Kao Signed-off-by: Palmer Dabbelt commit 1760debb51f73ed3e089c8d4e847554901dee4bb Author: Palmer Dabbelt Date: Tue Jul 24 17:17:14 2018 -0700 RISC-V: Don't set cacheinfo.{physical_line_partition,attributes} These are just hard coded in the RISC-V port, which doesn't make any sense. We should probably be setting these from device tree entries when they exist, but for now I think it's saner to just leave them all as their default values. Reviewed-by: Jeremy Linton Signed-off-by: Palmer Dabbelt commit b6ad3981ff94b415d48399e949db0bdfbe360736 Author: Anson Huang Date: Thu Sep 13 17:13:06 2018 +0800 thermal: imx: handle error path in one place to save duplicated code During probe phase, the error path can be handled in one place and use goto method to save many duplicated code. Signed-off-by: Anson Huang Reviewed-by: Daniel Lezcano Signed-off-by: Eduardo Valentin commit 337a4aecdaf8fa53b16fbf48a73d328fb44ffb75 Author: Anson Huang Date: Thu Sep 13 17:13:05 2018 +0800 thermal: imx: improve error message Remove the duplicated "from" to improve the error message. Signed-off-by: Anson Huang Reviewed-by: Daniel Lezcano Signed-off-by: Eduardo Valentin commit 36d83c6662450e13a2fa5792b34afff6f8bdba50 Author: Amit Kucheria Date: Wed Sep 12 15:22:58 2018 +0530 dt-bindings: thermal: Fix a typo in documentation c(1) + x(1) was actually meant to be c(1) * x(1). Signed-off-by: Amit Kucheria Reviewed-by: Matthias Kaehlcke Acked-by: Rob Herring Reviewed-by: Bjorn Andersson Signed-off-by: Eduardo Valentin commit c8c3b091b65c55ed950cb1601b21eea59c3117c0 Author: Amit Kucheria Date: Wed Sep 12 15:22:53 2018 +0530 thermal: tsens: Check if the IP is correctly enabled by firmware The SROT registers are initialised by the secure firmware at boot. We don't have write access to the registers. Check if the block is enabled before continuing. Signed-off-by: Amit Kucheria Reviewed-by: Bjorn Andersson Signed-off-by: Eduardo Valentin commit c130a7602e3bc2c6fd896c1d56478fca47a38c02 Author: Amit Kucheria Date: Wed Sep 12 15:22:52 2018 +0530 thermal: tsens: Pass register offsets as private data Registers have moved around across TSENS generations. For example, the CTRL register was at offset 0x0 in the SROT region on msm8916 but is at offset 0x4 in newer v2 based TSENS HW blocks. Allow passing offsets of important registers so that we can continue to use common functions. Signed-off-by: Amit Kucheria Reviewed-by: Bjorn Andersson Signed-off-by: Eduardo Valentin commit a15525b5d9ac37fec559d140b2e24c4ce4defa54 Author: Amit Kucheria Date: Wed Sep 12 15:22:50 2018 +0530 thermal: tsens: Add the SROT address map On platforms whose device trees specify two address spaces for TSENS, the second one points to the SROT registers. Initialise the SROT map on those platforms. Signed-off-by: Amit Kucheria Reviewed-by: Matthias Kaehlcke Reviewed-by: Bjorn Andersson Signed-off-by: Eduardo Valentin commit 67b0f5e064cd7fb3ac79c49dcbf7720fa5dc4acd Author: Amit Kucheria Date: Wed Sep 12 15:22:49 2018 +0530 thermal: tsens: Rename map field in order to add a second address map The TSENS driver currently only uses a limited set of registers from the TM address space. So it was ok to map just that set of registers and call it "map". We'd now like to map a second set: SROT registers to introduce new functionality. Rename the "map" field to a more appropriate "tm_map". The 8960 doesn't have a clear split between TM and SROT registers. To avoid complicating the data structure, it will switchover to using tm_map for its maps. There is no functional change with this patch. Signed-off-by: Amit Kucheria Reviewed-by: Matthias Kaehlcke Reviewed-by: Bjorn Andersson Signed-off-by: Eduardo Valentin commit caac52bce61116c4d645d80e38ed07e47a81a2e9 Author: Amit Kucheria Date: Wed Sep 12 15:22:48 2018 +0530 thermal: tsens: Get rid of dead code hw_id is dynamically allocated but not used anywhere. Get rid of dead code. Signed-off-by: Amit Kucheria Reviewed-by: Matthias Kaehlcke Reviewed-by: Bjorn Andersson Signed-off-by: Eduardo Valentin commit 2d71d8ded5f48b23ae46fec44811fe33da639fc9 Author: Amit Kucheria Date: Wed Sep 12 15:22:47 2018 +0530 thermal: tsens: Add SPDX license identifiers The TSENS drivers use a GPL-2.0 license. Replace with equivalent SPDX tags and delete the full license text. Signed-off-by: Amit Kucheria Reviewed-by: Matthias Kaehlcke Reviewed-by: Bjorn Andersson Signed-off-by: Eduardo Valentin commit bd7557f55a4514bf277dcc80ed66985eadab5719 Author: Amit Kucheria Date: Wed Sep 12 15:22:46 2018 +0530 thermal: tsens: Prepare 8916 and 8974 tsens to use SROT and TM address space We've already converted over the devicetree of platforms using v2 version of the TSENS IP to use two address spaces. Now prepare to convert over the 8916 and 8974 platforms to use separate SROT and TM address spaces. This patch will work with device trees with one or two address spaces because we set the tm_offset in commit 5b1283984fa3 ("thermal: tsens: Add support to split up register address space into two"). Signed-off-by: Amit Kucheria Reviewed-by: Matthias Kaehlcke Signed-off-by: Eduardo Valentin commit 6017e2a9d727809bfae9a4decfe8d00e2a0f0242 Author: Anson Huang Date: Thu Aug 30 10:14:46 2018 +0800 thermal: qoriq: add i.mx8mq support Add i.mx8mq specific compatible string. Signed-off-by: Anson Huang Signed-off-by: Eduardo Valentin commit 9b96566063c5511982c33df747e239e77cb75f78 Author: Rob Herring Date: Mon Aug 27 20:52:46 2018 -0500 thermal: 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: Zhang Rui Cc: Eduardo Valentin Cc: Daniel Lezcano Cc: linux-pm@vger.kernel.org Signed-off-by: Rob Herring Acked-by: Daniel Lezcano Signed-off-by: Eduardo Valentin commit b537149a2fb45ef9936b7a55aa801fbab8ea2a8a Merge: 6214a9fe2aec 7b9734dbc5b0 Author: Linus Torvalds Date: Tue Oct 23 01:26:05 2018 +0100 Merge tag 'spi-v5.0' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi updates from Mark Brown: "One new core feature here, a small collection of new drivers and a bunch of small improvements in existing drivers: - A new CS_WORD flag for transfers where the chip select is toggled at every word, with both a generic implementation and the ability for controllers to do this automatically (including a DaVinci one). - New drivers for Mediatek MT2712, Qualcomm GENI and QSPI, Spreadtrum SPI and ST STM32 QSPI plus new IDs for several existing ones" * tag 'spi-v5.0' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: (86 commits) spi: lpspi: add imx8qxp compatible string spi: Allow building SPI_BCM63XX_HSSPI on ARM-based SoCs spi: omap2-mcspi: Add slave mode support spi: omap2-mcspi: Set FIFO DMA trigger level to word length spi: omap2-mcspi: Switch to readl_poll_timeout() spi: spi-mem: add stm32 qspi controller dt-bindings: spi: add stm32 qspi controller spi: sh-msiof: document R8A779{7|8}0 bindings spi: pic32-sqi: don't pass GFP_DMA32 to dma_alloc_coherent MAINTAINERS: Add entry for Broadcom SPI controller spi: sh-msiof: fix deferred probing spi: imx: use PIO mode if size is small spi: imx: correct wml as the last sg length spi: imx: move wml setting to later than setup_transfer PCI: Provide pci_match_id() with CONFIG_PCI=n spi: Make GPIO CSs honour the SPI_NO_CS flag spi/spi-pxa2xx: add PXA2xx SSP SPI Controller spi: pxa2xx: Add devicetree support spi: pxa2xx: Use an enum for type spi: spi-geni-qcom: Add SPI driver support for GENI based QUP ... commit 6214a9fe2aeca5e22184b20954774424e2efc1f6 Merge: a36cf6865120 ae2399c48c02 Author: Linus Torvalds Date: Tue Oct 23 01:17:27 2018 +0100 Merge tag 'regmap-v5.0' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap Pull regmap updates from Mark Brown: "A small update with a couple of new APIs that are useful for some small sets of devices: - Split up the single_rw flagging to map read and write separately as some devices support bulk operations for only read or only write. - Add a write version of the noinc API. - Clean up the code for LOG_DEVICE a bit" * tag 'regmap-v5.0' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap: regmap: use less #ifdef for LOG_DEVICE regmap: Add regmap_noinc_write API regmap: split up regmap_config.use_single_rw regmap: fix comment for regmap.use_single_write commit b6ae3550c8e2ca8f7ce1b7f04585dc12a0eb5cbd Author: Christophe Leroy Date: Thu Oct 18 05:22:27 2018 +0000 powerpc/8xx: add missing header in 8xx_mmu.c arch/powerpc/mm/8xx_mmu.c:174:6: error: no previous prototype for ‘set_context’ [-Werror=missing-prototypes] void set_context(unsigned long id, pgd_t *pgd) Signed-off-by: Christophe Leroy Signed-off-by: Scott Wood commit e738c5f15562635c02a03365cb62cad35051babe Author: Christophe Leroy Date: Thu Oct 18 13:57:22 2018 +0000 powerpc/8xx: Add DT node for using the SEC engine of the MPC885 The MPC885 has SEC engine version 1.2 with the following details: - Number of Crypto channels: 1 - Exec Units: DEU, MDEU and AESU - Available descriptors: 00010, 00100, 00110, 01000, 11000, 11010 It is also supposed to have descriptor 00000, but it doesn't work properly so we keep it out for the moment. Signed-off-by: Christophe Leroy Signed-off-by: Scott Wood commit a36cf6865120d7534fcb132d311f03e5159f2da7 Merge: b8e445b6895c 042c1a5a6021 Author: Linus Torvalds Date: Tue Oct 23 01:09:22 2018 +0100 Merge tag 'mtd/for-4.20' of git://git.infradead.org/linux-mtd Pull mtd updates from Boris Brezillon: "SPI NOR core changes: - Support non-uniform erase size - Support controllers with limited TX fifo size Driver changes: - m25p80: Re-issue a WREN command after each write access - cadence: Pass a proper dir value to dma_[un]map_single() - fsl-qspi: Check fsl_qspi_get_seqid() return val make sure 4B addressing opcodes are properly handled - intel-spi: Add a new PCI entry for Ice Lake Raw NAND core changes: - Two batchs of cleanups of the NAND API, including: * Deprecating a lot of interfaces (now replaced by ->exec_op()). * Moving code in separate drivers (JEDEC, ONFI), in private files (internals), in platform drivers, etc. * Functions/structures reordering. * Exclusive use of the nand_chip structure instead of the MTD one all across the subsystem. - Addition of the nand_wait_readrdy/rdy_op() helpers. Raw NAND controllers drivers changes: - Various coccinelle patches. - Marvell: * Use regmap_update_bits() for syscon access. * More documentation. * BCH failure path rework. * More layouts to be supported. * IRQ handler complete() condition fixed. - Fsl_ifc: * SRAM initialization fixed for newer controller versions. - Denali: * Fix licenses mismatch and use a SPDX tag. * Set SPARE_AREA_SKIP_BYTES register to 8 if unset. - Qualcomm: * Do not include dma-direct.h. - Docg4: * Removed. - Ams-delta: * Use of a GPIO lookup table * Internal machinery changes. Raw NAND chip drivers changes: - Toshiba: * Add support for Toshiba memory BENAND * Pass a single nand_chip object to the status helper. - ESMT: * New driver to retrieve the ECC requirements from the 5th ID byte. MTD changes: - physmap cleanups/fixe - gpio-addr-flash cleanups/fixes" * tag 'mtd/for-4.20' of git://git.infradead.org/linux-mtd: (93 commits) jffs2: free jffs2_sb_info through jffs2_kill_sb() mtd: spi-nor: fsl-quadspi: fix read error for flash size larger than 16MB mtd: spi-nor: intel-spi: Add support for Intel Ice Lake SPI serial flash mtd: maps: gpio-addr-flash: Convert to gpiod mtd: maps: gpio-addr-flash: Replace array with an integer mtd: maps: gpio-addr-flash: Use order instead of size mtd: spi-nor: fsl-quadspi: Don't let -EINVAL on the bus mtd: devices: m25p80: Make sure WRITE_EN is issued before each write mtd: spi-nor: Support controllers with limited TX FIFO size mtd: spi-nor: cadence-quadspi: Use proper enum for dma_[un]map_single mtd: spi-nor: parse SFDP Sector Map Parameter Table mtd: spi-nor: add support to non-uniform SFDP SPI NOR flash memories mtd: rawnand: marvell: fix the IRQ handler complete() condition mtd: rawnand: denali: set SPARE_AREA_SKIP_BYTES register to 8 if unset mtd: rawnand: r852: fix spelling mistake "card_registred" -> "card_registered" mtd: rawnand: toshiba: Pass a single nand_chip object to the status helper mtd: maps: gpio-addr-flash: Use devm_* functions mtd: maps: gpio-addr-flash: Fix ioremapped size mtd: maps: gpio-addr-flash: Replace custom printk mtd: physmap_of: Release resources on error ... commit 8b20d2db0a6d2761e0fc156eb74f7a55b92b3147 Author: Anup Patel Date: Tue Oct 2 12:15:07 2018 -0700 RISC-V: Show IPI stats This patch provides arch_show_interrupts() implementation to show IPI stats via /proc/interrupts. Now the contents of /proc/interrupts" will look like below: CPU0 CPU1 CPU2 CPU3 8: 17 7 6 14 SiFive PLIC 8 virtio0 10: 10 10 9 11 SiFive PLIC 10 ttyS0 IPI0: 170 673 251 79 Rescheduling interrupts IPI1: 1 12 27 1 Function call interrupts Signed-off-by: Anup Patel [Atish - Fixed checkpatch errors] Signed-off-by: Atish Patra Reviewed-by: Palmer Dabbelt Changes since v2: - Remove use of IPI_CALL_WAKEUP because it's being removed Changes since v1: - Add stub inline show_ipi_stats() function for !CONFIG_SMP - Make ipi_names[] dynamically sized at compile time - Minor beautification of ipi_names[] using tabs Signed-off-by: Palmer Dabbelt commit 4b26d22fdff1e39647cc5952b01d329e83dedfe1 Author: Anup Patel Date: Tue Oct 2 12:15:06 2018 -0700 RISC-V: Show CPU ID and Hart ID separately in /proc/cpuinfo Currently, /proc/cpuinfo show logical CPU ID as Hart ID which is in-correct. This patch shows CPU ID and Hart ID separately in /proc/cpuinfo using cpuid_to_hardid_map(). With this patch, contents of /proc/cpuinfo looks as follows: processor : 0 hart : 1 isa : rv64imafdc mmu : sv48 processor : 1 hart : 0 isa : rv64imafdc mmu : sv48 processor : 2 hart : 2 isa : rv64imafdc mmu : sv48 processor : 3 hart : 3 isa : rv64imafdc mmu : sv48 Signed-off-by: Anup Patel Signed-off-by: Atish Patra Signed-off-by: Palmer Dabbelt commit f99fb607fb2bc0d4ce6b9adb764c65e37f40a92b Author: Atish Patra Date: Tue Oct 2 12:15:05 2018 -0700 RISC-V: Use Linux logical CPU number instead of hartid Setup the cpu_logical_map during boot. Moreover, every SBI call and PLIC context are based on the physical hartid. Use the logical CPU to hartid mapping to pass correct hartid to respective functions. Signed-off-by: Atish Patra Reviewed-by: Anup Patel Reviewed-by: Christoph Hellwig Signed-off-by: Palmer Dabbelt commit 6825c7a80f1863b975a00042abe140ea24813af2 Author: Atish Patra Date: Tue Oct 2 12:15:04 2018 -0700 RISC-V: Add logical CPU indexing for RISC-V Currently, both Linux CPU id and hart id are same. This is not recommended as it will lead to discontinuous CPU indexing in Linux. Moreover, kdump kernel will run from CPU0 which would be absent if we follow existing scheme. Implement a logical mapping between Linux CPU id and hart id to decouple these two. Always mark the boot processor as CPU0 and all other CPUs get the logical CPU id based on their booting order. Signed-off-by: Atish Patra Reviewed-by: Anup Patel Reviewed-by: Christoph Hellwig Signed-off-by: Palmer Dabbelt commit a37d56fc401108f39dec9ba83ed923a453937a26 Author: Atish Patra Date: Tue Oct 2 12:15:03 2018 -0700 RISC-V: Use WRITE_ONCE instead of direct access The secondary harts spin on couple of per cpu variables until both of these are non-zero so it's not necessary to have any ordering here. However, WRITE_ONCE should be used to avoid tearing. Signed-off-by: Atish Patra Reviewed-by: Christoph Hellwig Signed-off-by: Palmer Dabbelt commit 46373cb442c56d2f8a4c8b3f777c89d20546c9d5 Author: Palmer Dabbelt Date: Tue Oct 2 12:15:02 2018 -0700 RISC-V: Use mmgrab() commit f1f1007644ff ("mm: add new mmgrab() helper") added a helper that we missed out on. Signed-off-by: Palmer Dabbelt Reviewed-by: Christoph Hellwig Signed-off-by: Atish Patra Signed-off-by: Palmer Dabbelt commit 177fae4515889e2407810c5167a5227da8b37cce Author: Palmer Dabbelt Date: Tue Oct 2 12:15:01 2018 -0700 RISC-V: Rename im_okay_therefore_i_am to found_boot_cpu The old name was a bit odd. Signed-off-by: Palmer Dabbelt Signed-off-by: Atish Patra Reviewed-by: Christoph Hellwig Signed-off-by: Palmer Dabbelt commit b2f8cfa7ac34202e5fd9551b6507fcd424634c1b Author: Palmer Dabbelt Date: Tue Oct 2 12:15:00 2018 -0700 RISC-V: Rename riscv_of_processor_hart to riscv_of_processor_hartid It's a bit confusing exactly what this function does: it actually returns the hartid of an OF processor node, failing with -1 on invalid nodes. I've changed the name to _hartid() in order to make that a bit more clear, as well as adding a comment. Signed-off-by: Palmer Dabbelt [Atish: code comment formatting update] Signed-off-by: Atish Patra Reviewed-by: Christoph Hellwig Signed-off-by: Palmer Dabbelt commit 9639a44394b9859a5576cb36630105733a552bd6 Author: Palmer Dabbelt Date: Tue Oct 2 12:14:59 2018 -0700 RISC-V: Provide a cleaner raw_smp_processor_id() I'm not sure how I managed to miss this the first time, but this is much better. Signed-off-by: Palmer Dabbelt [Atish: code comment formatting and other fixes] Signed-off-by: Atish Patra Reviewed-by: Christoph Hellwig Signed-off-by: Palmer Dabbelt commit 6db170ff4c088caaf7806c00b29a55f6df07d7b6 Author: Atish Patra Date: Tue Oct 2 12:14:58 2018 -0700 RISC-V: Disable preemption before enabling interrupts Currently, irq is enabled before preemption disabling happens. If the scheduler fired right here and cpu is scheduled then it may blow up. Signed-off-by: Palmer Dabbelt [Atish: Commit text and code comment formatting update] Signed-off-by: Atish Patra Reviewed-by: Christoph Hellwig Signed-off-by: Palmer Dabbelt commit b18d6f05252d6b3f725c08d8831a46b003df5b6b Author: Palmer Dabbelt Date: Tue Oct 2 12:14:57 2018 -0700 RISC-V: Comment on the TLB flush in smp_callin() This isn't readily apparent from reading the code. Signed-off-by: Palmer Dabbelt [Atish: code comment formatting update] Signed-off-by: Atish Patra Reviewed-by: Christoph Hellwig Signed-off-by: Palmer Dabbelt commit 19ccf29bb18f08a4583aa899a8cc8c11e5ea85a6 Author: Palmer Dabbelt Date: Tue Oct 2 12:14:56 2018 -0700 RISC-V: Filter ISA and MMU values in cpuinfo We shouldn't be directly passing device tree values to userspace, both because there could be mistakes in device trees and because the kernel doesn't support arbitrary ISAs. Signed-off-by: Palmer Dabbelt [Atish: checkpatch fix and code comment formatting update] Signed-off-by: Atish Patra Reviewed-by: Christoph Hellwig Signed-off-by: Palmer Dabbelt commit 566d6c428eadf9dc06df8b2195dff58d9a97c9e6 Author: Palmer Dabbelt Date: Tue Oct 2 12:14:55 2018 -0700 RISC-V: Don't set cacheinfo.{physical_line_partition,attributes} These are just hard coded in the RISC-V port, which doesn't make any sense. We should probably be setting these from device tree entries when they exist, but for now I think it's saner to just leave them all as their default values. Signed-off-by: Palmer Dabbelt Reviewed-by: Christoph Hellwig Reviewed-by: Jeremy Linton Signed-off-by: Palmer Dabbelt commit 1ed4237ab616a05225e11d07bf42d5474deec905 Author: Anup Patel Date: Tue Oct 2 12:14:54 2018 -0700 RISC-V: No need to pass scause as arg to do_IRQ() The scause is already part of pt_regs so no need to pass scause as separate arg to do_IRQ(). Reviewed-by: Christoph Hellwig Signed-off-by: Anup Patel Signed-off-by: Palmer Dabbelt commit 827a438156e4c423b6875a092e272933952a2910 Author: Vincent Chen Date: Tue Oct 2 16:52:31 2018 +0800 RISC-V: Avoid corrupting the upper 32-bit of phys_addr_t in ioremap For 32bit, the upper 32-bit of phys_addr_t will be flushed to zero after AND with PAGE_MASK because the data type of PAGE_MASK is unsigned long. To fix this problem, the page alignment is done by subtracting the page offset instead of AND with PAGE_MASK. Signed-off-by: Vincent Chen Reviewed-by: Christoph Hellwig Signed-off-by: Palmer Dabbelt commit 757331db921428295948fed5e7377a436e66d34e Author: Zong Li Date: Tue Oct 2 16:52:30 2018 +0800 RISC-V: Select GENERIC_LIB_UMODDI3 on RV32 On 32-bit, it need to use __umoddi3 by some drivers. Signed-off-by: Zong Li Signed-off-by: Palmer Dabbelt commit 6315730e9eab7de5fa9864bb13a352713f48aef1 Author: Zong Li Date: Tue Oct 2 16:52:29 2018 +0800 lib: Add umoddi3 and udivmoddi4 of GCC library routines Add umoddi3 and udivmoddi4 support for 32-bit. The RV32 need the umoddi3 to do modulo when the operands are long long type, like other libraries implementation such as ucmpdi2, lshrdi3 and so on. I encounter the undefined reference 'umoddi3' when I use the in house dma driver, although it is in house driver, but I think that umoddi3 is a common function for RV32. The udivmoddi4 and umoddi3 are copies from libgcc in gcc. There are other functions use the udivmoddi4 in libgcc, so I separate the umoddi3 and udivmoddi4 for flexible extension in the future. Signed-off-by: Zong Li Signed-off-by: Palmer Dabbelt commit 51858aaf9bea3ddf166bf9d252a1fc351260b497 Author: Zong Li Date: Tue Oct 2 16:52:28 2018 +0800 RISC-V: Use swiotlb on RV64 only Only RV64 supports swiotlb. On RV32, it don't select the SWIOTLB. Signed-off-by: Zong Li Reviewed-by: Christoph Hellwig Signed-off-by: Palmer Dabbelt commit 7f47c73b355f300cf162f3a664e43d557d2cb30d Author: Zong Li Date: Tue Oct 2 16:52:27 2018 +0800 RISC-V: Build tishift only on 64-bit Only RV64 supports 128 integer size. Signed-off-by: Zong Li Reviewed-by: Christoph Hellwig Signed-off-by: Palmer Dabbelt commit 9411ec60c23d868124d9c1b1d491937aebe07afa Author: Alan Kao Date: Tue Oct 9 10:18:34 2018 +0800 Auto-detect whether a FPU exists We expect that a kernel with CONFIG_FPU=y can still support no-FPU machines. To do so, the kernel should first examine the existence of a FPU, then do nothing if a FPU does exist; otherwise, it should disable/bypass all FPU-related functions. In this patch, a new global variable, has_fpu, is created and determined when parsing the hardware capability from device tree during booting. This variable is used in those FPU-related functions. Signed-off-by: Alan Kao Cc: Greentime Hu Cc: Vincent Chen Cc: Zong Li Cc: Nick Hu Signed-off-by: Palmer Dabbelt commit 9671f7061433e2c58b9894093eada1898595b85d Author: Alan Kao Date: Tue Oct 9 10:18:33 2018 +0800 Allow to disable FPU support FPU codes have been separated from common part in previous patches. This patch add the CONFIG_FPU option and some stubs, so that a no-FPU configuration is allowed. Signed-off-by: Alan Kao Cc: Greentime Hu Cc: Vincent Chen Cc: Zong Li Cc: Nick Hu Reviewed-by: Christoph Hellwig Signed-off-by: Palmer Dabbelt commit e8be5302330281bd9f77834600f63e8cc4560d3d Author: Alan Kao Date: Tue Oct 9 10:18:32 2018 +0800 Cleanup ISA string setting This patch cleanup the MARCH string passing to both compiler and assembler. Note that the CFLAGS should not contain "fd" before we have mechnisms like kernel_fpu_begin/end in other architectures. Signed-off-by: Alan Kao Cc: Greentime Hu Cc: Vincent Chen Cc: Zong Li Cc: Nick Hu Signed-off-by: Palmer Dabbelt commit 007f5c35895786fdc797f13313b9493fe5d5e655 Author: Alan Kao Date: Tue Oct 9 10:18:31 2018 +0800 Refactor FPU code in signal setup/return procedures FPU-related logic is separated from normal signal handling path in this patch. Kernel can easily be configured to exclude those procedures for no-FPU systems. Signed-off-by: Alan Kao Cc: Greentime Hu Cc: Vincent Chen Cc: Zong Li Cc: Nick Hu Reviewed-by: Christoph Hellwig Signed-off-by: Palmer Dabbelt commit e68ad867f77e1a839ad496ffcbd88b9c96769b5b Author: Alan Kao Date: Tue Oct 9 10:18:30 2018 +0800 Extract FPU context operations from entry.S We move __fstate_save and __fstate_restore to a new source file, fpu.S. Signed-off-by: Alan Kao Cc: Greentime Hu Cc: Vincent Chen Cc: Zong Li Cc: Nick Hu Reviewed-by: Christoph Hellwig Signed-off-by: Palmer Dabbelt commit b8e445b6895cfe76c5959a7135a3216703fe32d4 Merge: cff229491af5 e7c6a55606b5 Author: Linus Torvalds Date: Tue Oct 23 00:58:12 2018 +0100 Merge tag 'hwmon-for-v4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging Pull hwmon updates from Guenter Roeck: - Add support for trace events to hwmon core - Add support for NCT6797D, NCT6798D, MAX31725/6, LTM4686 - Support all AMD Family 15h Model 6xh and Model 7xh processors in k10temp driver - Convert ina3221 driver to _info API - Fixes, cleanups, and improvements in various drivers * tag 'hwmon-for-v4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: (46 commits) hwmon: (pmbus) Fix page count auto-detection. hwmon: (pmbus) remove redundant 'default n' from Kconfig hwmon: (core) Add trace events to _attr_show/store functions hwmon: (ina3221) Use _info API to register hwmon device hwmon: (npcm-750-pwm-fan) Change initial pwm target to 255 hwmon: (ina3221) Validate shunt resistor value from DT hwmon: (tmp421) make const array 'names' static hwmon: (core) Add hwmon_in_enable attribute hwmon: (ina3221) mark PM functions as __maybe_unused hwmon: (ina3221) Read channel input source info from DT dt-bindings: hwmon: Add ina3221 documentation hwmon: (ina3221) Add suspend and resume functions hwmon: (ina3221) Fix INA3221_CONFIG_MODE macros hwmon: (ina3221) Add INA3221_CONFIG to volatile_table MAINTAINERS: Update PMBUS maintainer entry hwmon: (pwm-fan) Set fan speed to 0 on suspend hwmon: (pwm-fan) Silence error on probe deferral hwmon: (scpi-hwmon) remove redundant continue hwmon: (nct6775) Add support for NCT6798D hwmon: (nct6775) Add support for NCT6797D ... commit ecd4c19f3df7f3687867a2183934efb54a7d3c14 Author: David S. Miller Date: Sun Oct 21 22:36:17 2018 -0700 sparc: Validate VDSO for undefined symbols. There should be no undefined symbols in the resulting VDSO image(s). On sparc, fixed register usage can result in undefined symbols ending up in the image. To combat this, we do two things: 1) Define current_thread_info() specially when BUILD_DSO. 2) Ignore "#scratch" register undefined symbols in the output. Signed-off-by: David S. Miller commit 3c2b2d9408b11022614bf656ae56c8fc12001ecc Author: David S. Miller Date: Sun Oct 21 22:33:07 2018 -0700 sparc: Really use linker with LDFLAGS. Rather than funneling through CC. Also, use --hash-style=both just like other VDSO architectures and glibc do. Signed-off-by: David S. Miller commit 5615edcca99a0ceb47940fb8e89d1f72bc35398b Author: David S. Miller Date: Sun Oct 21 22:22:54 2018 -0700 sparc: Improve VDSO CFLAGS. Do not set any special register usage options, use the default which is exactly what we should use for userspace code. Make sure we remove the gcc plugin options from the 64-bit build. The 32-bit cflags got it right already. Signed-off-by: David S. Miller commit 44231b7fee3f086cf367588c7c79ec3b5d7619b2 Author: David S. Miller Date: Sun Oct 21 22:14:01 2018 -0700 sparc: Set DISABLE_BRANCH_PROFILING in VDSO CFLAGS. Not in vclock_gettime.c itself. Signed-off-by: David S. Miller commit 3fe5d7e861286c0b80573f094e32dd9736370d69 Author: David S. Miller Date: Sun Oct 21 22:10:51 2018 -0700 sparc: Don't bother masking out TICK_PRIV_BIT in VDSO code. If the TICK_PRIV_BIT was set, we would not be able to read the tick register in user space, which is where this code runs. Signed-off-by: David S. Miller commit 794b88e047588965ad8f716245857b452f118e13 Author: David S. Miller Date: Sun Oct 21 22:09:40 2018 -0700 sparc: Inline VDSO gettime code aggressively. One interesting thing we need to do is stop using __builtin_return_address() in get_vvar_data(). Simply read the %pc register instead. Signed-off-by: David S. Miller commit 2f6c9bf31a0b16aeccb42b73f8d0ddf9bea88f3f Author: David S. Miller Date: Sun Oct 21 21:44:33 2018 -0700 sparc: Improve VDSO instruction patching. The current VDSO patch mechanism has several problems: 1) It assumes how gcc will emit a function, with a register window, an initial save instruction and then immediately the %tick read when compiling vread_tick(). There is no such guarantees, code generation could change at any time, gcc could put a nop between the save and the %tick read, etc. So this is extremely fragile and would fail some day. 2) It disallows us to properly inline vread_tick() into the callers and thus get the best possible code sequences. So fix this to patch properly, with location based annotations. We have to be careful because we cannot do it the way we do patches elsewhere in the kernel. Those use a sequence like: 1: insn .section .whatever_patch, "ax" .word 1b replacement_insn .previous This is a dynamic shared object, so that .word cannot be resolved at build time, and thus cannot be used to execute the patches when the kernel initializes the images. Even trying to use label difference equations doesn't work in the above kind of scheme: 1: insn .section .whatever_patch, "ax" .word . - 1b replacement_insn .previous The assembler complains that it cannot resolve that computation. The issue is that this is contained in an executable section. Borrow the sequence used by x86 alternatives, which is: 1: insn .pushsection .whatever_patch, "a" .word . - 1b, . - 1f .popsection .pushsection .whatever_patch_replacements, "ax" 1: replacement_insn .previous This works, allows us to inline vread_tick() as much as we like, and can be used for arbitrary kinds of VDSO patching in the future. Also, reverse the condition for patching. Most systems are %stick based, so if we only patch on %tick systems the patching code will get little or no testing. Signed-off-by: David S. Miller commit 5e3cdecf7834a764b9d24f6e696adf3e03813fab Merge: b5a229350b72 65dfb6d6dd28 Author: Takashi Iwai Date: Mon Oct 22 23:26:37 2018 +0200 Merge tag 'asoc-v5.0' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Updates for v5.0/v4.20 As ever there's a lot of small and driver specific changes going on here, but we do also have some relatively large changes in the core thanks to the hard work of Charles and Morimoto-san: - More component transitions from Morimoto-san, I think we're about finished with this. Thanks for all the hard work! - Morimoto-san also added a bunch of for_each_foo macros - A bunch of cleanups and fixes for DAPM from Charles. - MCLK support for several different devices, including CS42L51, STM32 SAI, and MAX98373. - Support for Allwinner A64 CODEC analog, Intel boards with DA7219 and MAX98927, Meson AXG PDM inputs, Nuvoton NAU8822, Renesas R8A7744 and TI PCM3060. commit 3b2ad16dc4288dab05862aeacf1e124c4662d475 Author: Evan Quan Date: Fri Oct 19 15:41:20 2018 +0800 drm/amd/powerplay: bump the PPtable version supported As the matching VBIOS is already ready. Also drop the temporary workarounds applied before. Signed-off-by: Evan Quan Reviewed-by: Feifei Xu Signed-off-by: Alex Deucher commit b44ec6a3eb386d398c6c8b8c60d1c8473ff9cb7e Author: Evan Quan Date: Thu Oct 18 17:54:06 2018 +0800 drm/amd/powerplay: drop highest UCLK setting after display configuration change The UCLK is forced to highest at the start of display configuration change. Downgrade the UCLK from highest after display configuration change. Otherwise, we may see the UCLK stuck in the highest in some cases. Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit f7becf9a0803030ae125189823328e2d62b90f7b Author: Joseph Greathouse Date: Thu Oct 18 14:57:45 2018 -0500 drm/amd/pp: enable power limit increase in OD mode OverDrive mode allows users to increase the maximum SCLK and MCLK frequencies beyond the default on the GPU. However, this may not results in large performance gains if the GPU then runs into its TDP power limit. This patch adds the capability to increase the power limit of a GPU above its default maximum. This is only allowed when overdrive is enabled in the ppfeaturemask, since this is an overdrive feature. The TDPODLimit value from the VBIOS describes how how much higher the TDP should be allowed to go over its default, in percentage. v2: Moved dereference of hwmgr to after its validity check Signed-off-by: Joseph Greathouse Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit f191415b24a3ad3fa22088af7cd7fc328a2f469f Author: David Francis Date: Thu Oct 18 11:21:15 2018 -0400 powerplay: Respect units on max dcfclk watermark In a refactor, the watermark clock inputs to powerplay from DC were changed from units of 10kHz to kHz clocks. One division by 100 was not converted into a division by 1000. Signed-off-by: David Francis Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher commit 91eec27ebbc4f4e7cf4ee6a589d2f060ba9d0d79 Author: Emily Deng Date: Thu Oct 18 15:01:05 2018 +0800 drm/amdgpu: Fix null pointer amdgpu_device_fw_loading Need to check adev->powerplay.pp_funcs. Signed-off-by: Emily Deng Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 241dbbb1fb21bfff0c46c6873cee5c7923d05378 Author: Evan Quan Date: Wed Oct 17 16:36:02 2018 +0800 drm/amd/powerplay: error out when force clock level under auto dpm mode V2 Forcing clock level is supported under manual dpm mode only. Error out when trying to set under manual mode. Instead of doing nothing and reporting success. V2: update for mclk/pcie clock level settings also Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit cacd9759eea2f1c7e8792ecd91ed4602f963b1a5 Merge: 13c1c5e4d7f8 f39f8688888a Author: Dmitry Torokhov Date: Mon Oct 22 12:04:33 2018 -0700 Merge branch 'next' into for-linus Prepare input updates for 4.20 merge window. commit 9084cb6a24bf5838a665af92ded1af8363f9e563 Author: Filipe Manana Date: Mon Oct 22 10:43:06 2018 +0100 Btrfs: fix use-after-free when dumping free space We were iterating a block group's free space cache rbtree without locking first the lock that protects it (the free_space_ctl->free_space_offset rbtree is protected by the free_space_ctl->tree_lock spinlock). KASAN reported an use-after-free problem when iterating such a rbtree due to a concurrent rbtree delete: [ 9520.359168] ================================================================== [ 9520.359656] BUG: KASAN: use-after-free in rb_next+0x13/0x90 [ 9520.359949] Read of size 8 at addr ffff8800b7ada500 by task btrfs-transacti/1721 [ 9520.360357] [ 9520.360530] CPU: 4 PID: 1721 Comm: btrfs-transacti Tainted: G L 4.19.0-rc8-nbor #555 [ 9520.360990] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1ubuntu1 04/01/2014 [ 9520.362682] Call Trace: [ 9520.362887] dump_stack+0xa4/0xf5 [ 9520.363146] print_address_description+0x78/0x280 [ 9520.363412] kasan_report+0x263/0x390 [ 9520.363650] ? rb_next+0x13/0x90 [ 9520.363873] __asan_load8+0x54/0x90 [ 9520.364102] rb_next+0x13/0x90 [ 9520.364380] btrfs_dump_free_space+0x146/0x160 [btrfs] [ 9520.364697] dump_space_info+0x2cd/0x310 [btrfs] [ 9520.364997] btrfs_reserve_extent+0x1ee/0x1f0 [btrfs] [ 9520.365310] __btrfs_prealloc_file_range+0x1cc/0x620 [btrfs] [ 9520.365646] ? btrfs_update_time+0x180/0x180 [btrfs] [ 9520.365923] ? _raw_spin_unlock+0x27/0x40 [ 9520.366204] ? btrfs_alloc_data_chunk_ondemand+0x2c0/0x5c0 [btrfs] [ 9520.366549] btrfs_prealloc_file_range_trans+0x23/0x30 [btrfs] [ 9520.366880] cache_save_setup+0x42e/0x580 [btrfs] [ 9520.367220] ? btrfs_check_data_free_space+0xd0/0xd0 [btrfs] [ 9520.367518] ? lock_downgrade+0x2f0/0x2f0 [ 9520.367799] ? btrfs_write_dirty_block_groups+0x11f/0x6e0 [btrfs] [ 9520.368104] ? kasan_check_read+0x11/0x20 [ 9520.368349] ? do_raw_spin_unlock+0xa8/0x140 [ 9520.368638] btrfs_write_dirty_block_groups+0x2af/0x6e0 [btrfs] [ 9520.368978] ? btrfs_start_dirty_block_groups+0x870/0x870 [btrfs] [ 9520.369282] ? do_raw_spin_unlock+0xa8/0x140 [ 9520.369534] ? _raw_spin_unlock+0x27/0x40 [ 9520.369811] ? btrfs_run_delayed_refs+0x1b8/0x230 [btrfs] [ 9520.370137] commit_cowonly_roots+0x4b9/0x610 [btrfs] [ 9520.370560] ? commit_fs_roots+0x350/0x350 [btrfs] [ 9520.370926] ? btrfs_run_delayed_refs+0x1b8/0x230 [btrfs] [ 9520.371285] btrfs_commit_transaction+0x5e5/0x10e0 [btrfs] [ 9520.371612] ? btrfs_apply_pending_changes+0x90/0x90 [btrfs] [ 9520.371943] ? start_transaction+0x168/0x6c0 [btrfs] [ 9520.372257] transaction_kthread+0x21c/0x240 [btrfs] [ 9520.372537] kthread+0x1d2/0x1f0 [ 9520.372793] ? btrfs_cleanup_transaction+0xb50/0xb50 [btrfs] [ 9520.373090] ? kthread_park+0xb0/0xb0 [ 9520.373329] ret_from_fork+0x3a/0x50 [ 9520.373567] [ 9520.373738] Allocated by task 1804: [ 9520.373974] kasan_kmalloc+0xff/0x180 [ 9520.374208] kasan_slab_alloc+0x11/0x20 [ 9520.374447] kmem_cache_alloc+0xfc/0x2d0 [ 9520.374731] __btrfs_add_free_space+0x40/0x580 [btrfs] [ 9520.375044] unpin_extent_range+0x4f7/0x7a0 [btrfs] [ 9520.375383] btrfs_finish_extent_commit+0x15f/0x4d0 [btrfs] [ 9520.375707] btrfs_commit_transaction+0xb06/0x10e0 [btrfs] [ 9520.376027] btrfs_alloc_data_chunk_ondemand+0x237/0x5c0 [btrfs] [ 9520.376365] btrfs_check_data_free_space+0x81/0xd0 [btrfs] [ 9520.376689] btrfs_delalloc_reserve_space+0x25/0x80 [btrfs] [ 9520.377018] btrfs_direct_IO+0x42e/0x6d0 [btrfs] [ 9520.377284] generic_file_direct_write+0x11e/0x220 [ 9520.377587] btrfs_file_write_iter+0x472/0xac0 [btrfs] [ 9520.377875] aio_write+0x25c/0x360 [ 9520.378106] io_submit_one+0xaa0/0xdc0 [ 9520.378343] __se_sys_io_submit+0xfa/0x2f0 [ 9520.378589] __x64_sys_io_submit+0x43/0x50 [ 9520.378840] do_syscall_64+0x7d/0x240 [ 9520.379081] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 9520.379387] [ 9520.379557] Freed by task 1802: [ 9520.379782] __kasan_slab_free+0x173/0x260 [ 9520.380028] kasan_slab_free+0xe/0x10 [ 9520.380262] kmem_cache_free+0xc1/0x2c0 [ 9520.380544] btrfs_find_space_for_alloc+0x4cd/0x4e0 [btrfs] [ 9520.380866] find_free_extent+0xa99/0x17e0 [btrfs] [ 9520.381166] btrfs_reserve_extent+0xd5/0x1f0 [btrfs] [ 9520.381474] btrfs_get_blocks_direct+0x60b/0xbd0 [btrfs] [ 9520.381761] __blockdev_direct_IO+0x10ee/0x58a1 [ 9520.382059] btrfs_direct_IO+0x25a/0x6d0 [btrfs] [ 9520.382321] generic_file_direct_write+0x11e/0x220 [ 9520.382623] btrfs_file_write_iter+0x472/0xac0 [btrfs] [ 9520.382904] aio_write+0x25c/0x360 [ 9520.383172] io_submit_one+0xaa0/0xdc0 [ 9520.383416] __se_sys_io_submit+0xfa/0x2f0 [ 9520.383678] __x64_sys_io_submit+0x43/0x50 [ 9520.383927] do_syscall_64+0x7d/0x240 [ 9520.384165] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 9520.384439] [ 9520.384610] The buggy address belongs to the object at ffff8800b7ada500 which belongs to the cache btrfs_free_space of size 72 [ 9520.385175] The buggy address is located 0 bytes inside of 72-byte region [ffff8800b7ada500, ffff8800b7ada548) [ 9520.385691] The buggy address belongs to the page: [ 9520.385957] page:ffffea0002deb680 count:1 mapcount:0 mapping:ffff880108a1d700 index:0x0 compound_mapcount: 0 [ 9520.388030] flags: 0x8100(slab|head) [ 9520.388281] raw: 0000000000008100 ffffea0002deb608 ffffea0002728808 ffff880108a1d700 [ 9520.388722] raw: 0000000000000000 0000000000130013 00000001ffffffff 0000000000000000 [ 9520.389169] page dumped because: kasan: bad access detected [ 9520.389473] [ 9520.389658] Memory state around the buggy address: [ 9520.389943] ffff8800b7ada400: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 9520.390368] ffff8800b7ada480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 9520.390796] >ffff8800b7ada500: fb fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc [ 9520.391223] ^ [ 9520.391461] ffff8800b7ada580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 9520.391885] ffff8800b7ada600: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 9520.392313] ================================================================== [ 9520.392772] BTRFS critical (device vdc): entry offset 2258497536, bytes 131072, bitmap no [ 9520.393247] BUG: unable to handle kernel NULL pointer dereference at 0000000000000011 [ 9520.393705] PGD 800000010dbab067 P4D 800000010dbab067 PUD 107551067 PMD 0 [ 9520.394059] Oops: 0000 [#1] SMP DEBUG_PAGEALLOC KASAN PTI [ 9520.394378] CPU: 4 PID: 1721 Comm: btrfs-transacti Tainted: G B L 4.19.0-rc8-nbor #555 [ 9520.394858] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1ubuntu1 04/01/2014 [ 9520.395350] RIP: 0010:rb_next+0x3c/0x90 [ 9520.396461] RSP: 0018:ffff8801074ff780 EFLAGS: 00010292 [ 9520.396762] RAX: 0000000000000000 RBX: 0000000000000001 RCX: ffffffff81b5ac4c [ 9520.397115] RDX: 0000000000000000 RSI: 0000000000000008 RDI: 0000000000000011 [ 9520.397468] RBP: ffff8801074ff7a0 R08: ffffed0021d64ccc R09: ffffed0021d64ccc [ 9520.397821] R10: 0000000000000001 R11: ffffed0021d64ccb R12: ffff8800b91e0000 [ 9520.398188] R13: ffff8800a3ceba48 R14: ffff8800b627bf80 R15: 0000000000020000 [ 9520.398555] FS: 0000000000000000(0000) GS:ffff88010eb00000(0000) knlGS:0000000000000000 [ 9520.399007] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 9520.399335] CR2: 0000000000000011 CR3: 0000000106b52000 CR4: 00000000000006a0 [ 9520.399679] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 9520.400023] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 9520.400400] Call Trace: [ 9520.400648] btrfs_dump_free_space+0x146/0x160 [btrfs] [ 9520.400974] dump_space_info+0x2cd/0x310 [btrfs] [ 9520.401287] btrfs_reserve_extent+0x1ee/0x1f0 [btrfs] [ 9520.401609] __btrfs_prealloc_file_range+0x1cc/0x620 [btrfs] [ 9520.401952] ? btrfs_update_time+0x180/0x180 [btrfs] [ 9520.402232] ? _raw_spin_unlock+0x27/0x40 [ 9520.402522] ? btrfs_alloc_data_chunk_ondemand+0x2c0/0x5c0 [btrfs] [ 9520.402882] btrfs_prealloc_file_range_trans+0x23/0x30 [btrfs] [ 9520.403261] cache_save_setup+0x42e/0x580 [btrfs] [ 9520.403570] ? btrfs_check_data_free_space+0xd0/0xd0 [btrfs] [ 9520.403871] ? lock_downgrade+0x2f0/0x2f0 [ 9520.404161] ? btrfs_write_dirty_block_groups+0x11f/0x6e0 [btrfs] [ 9520.404481] ? kasan_check_read+0x11/0x20 [ 9520.404732] ? do_raw_spin_unlock+0xa8/0x140 [ 9520.405026] btrfs_write_dirty_block_groups+0x2af/0x6e0 [btrfs] [ 9520.405375] ? btrfs_start_dirty_block_groups+0x870/0x870 [btrfs] [ 9520.405694] ? do_raw_spin_unlock+0xa8/0x140 [ 9520.405958] ? _raw_spin_unlock+0x27/0x40 [ 9520.406243] ? btrfs_run_delayed_refs+0x1b8/0x230 [btrfs] [ 9520.406574] commit_cowonly_roots+0x4b9/0x610 [btrfs] [ 9520.406899] ? commit_fs_roots+0x350/0x350 [btrfs] [ 9520.407253] ? btrfs_run_delayed_refs+0x1b8/0x230 [btrfs] [ 9520.407589] btrfs_commit_transaction+0x5e5/0x10e0 [btrfs] [ 9520.407925] ? btrfs_apply_pending_changes+0x90/0x90 [btrfs] [ 9520.408262] ? start_transaction+0x168/0x6c0 [btrfs] [ 9520.408582] transaction_kthread+0x21c/0x240 [btrfs] [ 9520.408870] kthread+0x1d2/0x1f0 [ 9520.409138] ? btrfs_cleanup_transaction+0xb50/0xb50 [btrfs] [ 9520.409440] ? kthread_park+0xb0/0xb0 [ 9520.409682] ret_from_fork+0x3a/0x50 [ 9520.410508] Dumping ftrace buffer: [ 9520.410764] (ftrace buffer empty) [ 9520.411007] CR2: 0000000000000011 [ 9520.411297] ---[ end trace 01a0863445cf360a ]--- [ 9520.411568] RIP: 0010:rb_next+0x3c/0x90 [ 9520.412644] RSP: 0018:ffff8801074ff780 EFLAGS: 00010292 [ 9520.412932] RAX: 0000000000000000 RBX: 0000000000000001 RCX: ffffffff81b5ac4c [ 9520.413274] RDX: 0000000000000000 RSI: 0000000000000008 RDI: 0000000000000011 [ 9520.413616] RBP: ffff8801074ff7a0 R08: ffffed0021d64ccc R09: ffffed0021d64ccc [ 9520.414007] R10: 0000000000000001 R11: ffffed0021d64ccb R12: ffff8800b91e0000 [ 9520.414349] R13: ffff8800a3ceba48 R14: ffff8800b627bf80 R15: 0000000000020000 [ 9520.416074] FS: 0000000000000000(0000) GS:ffff88010eb00000(0000) knlGS:0000000000000000 [ 9520.416536] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 9520.416848] CR2: 0000000000000011 CR3: 0000000106b52000 CR4: 00000000000006a0 [ 9520.418477] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 9520.418846] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 9520.419204] Kernel panic - not syncing: Fatal exception [ 9520.419666] Dumping ftrace buffer: [ 9520.419930] (ftrace buffer empty) [ 9520.420168] Kernel Offset: disabled [ 9520.420406] ---[ end Kernel panic - not syncing: Fatal exception ]--- Fix this by acquiring the respective lock before iterating the rbtree. Reported-by: Nikolay Borisov CC: stable@vger.kernel.org # 4.4+ Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit ef0f02fd69a02b50e468a4ddbe33e3d81671e248 Author: Nathan Chancellor Date: Fri Oct 19 13:43:45 2018 -0700 rtc: s35390a: Change buf's type to u8 in s35390a_init Clang warns: drivers/rtc/rtc-s35390a.c:124:27: warning: implicit conversion from 'int' to 'char' changes value from 192 to -64 [-Wconstant-conversion] buf = S35390A_FLAG_RESET | S35390A_FLAG_24H; ~ ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ 1 warning generated. Update buf to be an unsigned 8-bit integer, which matches the buf member in struct i2c_msg. https://github.com/ClangBuiltLinux/linux/issues/145 Signed-off-by: Nathan Chancellor Signed-off-by: Alexandre Belloni commit 3e71c70c946b5d5e7b21397c621b14951e5c0fcf Author: Adrian Hunter Date: Mon Oct 1 09:28:35 2018 +0300 perf scripts python: call-graph-from-sql.py: Use SPDX license identifier Use SPDX license identifier in call-graph-from-sql.py. Signed-off-by: Adrian Hunter Cc: Andi Kleen Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20181001062853.28285-2-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit a9c5e6c1e9bff42ca5f01ceb3092a27a010755fb Author: Arnaldo Carvalho de Melo Date: Mon Oct 22 14:14:16 2018 -0300 perf trace: Introduce per-event maximum number of events property Call it 'nr', as in this context it should be expressive enough, i.e.: # perf trace -e sched:*waking/nr=8,call-graph=fp/ 0.000 :0/0 sched:sched_waking:comm=rcu_sched pid=10 prio=120 target_cpu=001 try_to_wake_up ([kernel.kallsyms]) sched_clock ([kernel.kallsyms]) 3.933 :0/0 sched:sched_waking:comm=rcu_sched pid=10 prio=120 target_cpu=001 try_to_wake_up ([kernel.kallsyms]) sched_clock ([kernel.kallsyms]) 3.970 IPDL Backgroun/3622 sched:sched_waking:comm=Gecko_IOThread pid=3569 prio=120 target_cpu=003 try_to_wake_up ([kernel.kallsyms]) __libc_write (/usr/lib64/libpthread-2.26.so) 20.069 IPDL Backgroun/3622 sched:sched_waking:comm=Gecko_IOThread pid=3569 prio=120 target_cpu=003 try_to_wake_up ([kernel.kallsyms]) __libc_write (/usr/lib64/libpthread-2.26.so) 37.170 IPDL Backgroun/3622 sched:sched_waking:comm=Gecko_IOThread pid=3569 prio=120 target_cpu=003 try_to_wake_up ([kernel.kallsyms]) __libc_write (/usr/lib64/libpthread-2.26.so) 53.267 IPDL Backgroun/3622 sched:sched_waking:comm=Gecko_IOThread pid=3569 prio=120 target_cpu=003 try_to_wake_up ([kernel.kallsyms]) __libc_write (/usr/lib64/libpthread-2.26.so) 70.365 IPDL Backgroun/3622 sched:sched_waking:comm=Gecko_IOThread pid=3569 prio=120 target_cpu=003 try_to_wake_up ([kernel.kallsyms]) __libc_write (/usr/lib64/libpthread-2.26.so) 75.781 Web Content/3649 sched:sched_waking:comm=JS Helper pid=3670 prio=120 target_cpu=000 try_to_wake_up ([kernel.kallsyms]) try_to_wake_up ([kernel.kallsyms]) wake_up_q ([kernel.kallsyms]) futex_wake ([kernel.kallsyms]) do_futex ([kernel.kallsyms]) __x64_sys_futex ([kernel.kallsyms]) do_syscall_64 ([kernel.kallsyms]) entry_SYSCALL_64_after_hwframe ([kernel.kallsyms]) pthread_cond_signal@@GLIBC_2.3.2 (/usr/lib64/libpthread-2.26.so) # # perf trace -e sched:*switch/nr=2/,block:*_plug/nr=4/,block:*_unplug/nr=1/,net:*dev_queue/nr=3,max-stack=16/ 0.000 :0/0 sched:sched_switch:swapper/0:0 [120] S ==> trace:3367 [120] 0.046 :0/0 sched:sched_switch:swapper/1:0 [120] S ==> kworker/u16:58:2722 [120] 570.670 irq/50-iwlwifi/680 net:net_dev_queue:dev=wlp3s0 skbaddr=0xffff93498051ef00 len=66 __dev_queue_xmit ([kernel.kallsyms]) 1106.141 jbd2/dm-0-8/476 block:block_plug:[jbd2/dm-0-8] 1106.175 jbd2/dm-0-8/476 block:block_unplug:[jbd2/dm-0-8] 1 1618.088 kworker/u16:30/2694 block:block_plug:[kworker/u16:30] 1810.000 :0/0 net:net_dev_queue:dev=vnet0 skbaddr=0xffff93498051ef00 len=52 __dev_queue_xmit ([kernel.kallsyms]) 3857.974 :0/0 net:net_dev_queue:dev=vnet0 skbaddr=0xffff93498051f900 len=52 __dev_queue_xmit ([kernel.kallsyms]) 4790.277 jbd2/dm-2-8/748 block:block_plug:[jbd2/dm-2-8] 4790.448 jbd2/dm-2-8/748 block:block_plug:[jbd2/dm-2-8] # The global --max-events has precendence: # trace --max-events 3 -e sched:*switch/nr=2/,block:*_plug/nr=4/,block:*_unplug/nr=1/,net:*dev_queue/nr=3,max-stack=16/ 0.000 :0/0 sched:sched_switch:swapper/0:0 [120] S ==> qemu-system-x86:2252 [120] 0.029 qemu-system-x8/2252 sched:sched_switch:qemu-system-x86:2252 [120] D ==> swapper/0:0 [120] 58.047 DNS Res~er #14/31661 net:net_dev_queue:dev=wlp3s0 skbaddr=0xffff9346966af100 len=84 __dev_queue_xmit ([kernel.kallsyms]) __libc_send (/usr/lib64/libpthread-2.26.so) # Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-s4jswltvh660ughvg9nwngah@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 7ee40678af935fb489b0c6cf0f75808175214cd7 Author: Milian Wolff Date: Sun Oct 21 21:14:24 2018 +0200 perf script: Flush output stream after events in verbose mode When the perf script output is written to a terminal stream, the normal output of `perf script` would get buffered, but its debug output would be written directly. This made it quite hard to figure out where a given debug output is coming from. We can improve on this by flushing the output buffer after processing an event. To see the value, compare the following output for a `perf script -v` run: Before this patch: ``` unwind: reg 16, val 7faf7dfdc000 unwind: reg 7, val 7ffc80811e30 unwind: find_proc_info dso /usr/lib/ld-2.28.so unwind: reg 6, val 0 unwind: _start:ip = 0x7faf7dfdc000 (0x2000) unwind: reg 16, val 7faf7dfdc000 unwind: reg 7, val 7ffc80811e30 unwind: find_proc_info dso /usr/lib/ld-2.28.so unwind: reg 6, val 0 unwind: _start:ip = 0x7faf7dfdc000 (0x2000) unwind: reg 16, val 7faf7dfdc000 unwind: reg 7, val 7ffc80811e30 unwind: find_proc_info dso /usr/lib/ld-2.28.so unwind: reg 6, val 0 unwind: _start:ip = 0x7faf7dfdc000 (0x2000) unwind: reg 16, val 7faf7dfdc000 unwind: reg 7, val 7ffc80811e30 ... lots and lots of verbose debug output cpp-inlining 24617 90229.122036534: 1 cycles:uppp: 7faf7dfdc000 _start+0x0 (/usr/lib/ld-2.28.so) cpp-inlining 24617 90229.122043974: 1 cycles:uppp: 7faf7dfdc000 _start+0x0 (/usr/lib/ld-2.28.so) ... ``` After this patch: ``` ... unwind: reg 16, val 7faf7dfdc000 unwind: reg 7, val 7ffc80811e30 unwind: find_proc_info dso /usr/lib/ld-2.28.so unwind: reg 6, val 0 unwind: _start:ip = 0x7faf7dfdc000 (0x2000) cpp-inlining 24617 90229.122036534: 1 cycles:uppp: 7faf7dfdc000 _start+0x0 (/usr/lib/ld-2.28.so) unwind: reg 16, val 7faf7dfdc000 unwind: reg 7, val 7ffc80811e30 unwind: find_proc_info dso /usr/lib/ld-2.28.so unwind: reg 6, val 0 unwind: _start:ip = 0x7faf7dfdc000 (0x2000) cpp-inlining 24617 90229.122043974: 1 cycles:uppp: 7faf7dfdc000 _start+0x0 (/usr/lib/ld-2.28.so) ... ``` This new output format makes it much easier to use perf script output for debugging purposes, e.g. to investigate broken dwarf unwinding. Signed-off-by: Milian Wolff Acked-by: Jiri Olsa Link: http://lkml.kernel.org/r/20181021191424.16183-2-milian.wolff@kdab.com Signed-off-by: Arnaldo Carvalho de Melo commit cff229491af5df946781edfbeafd43e9cf66a3b4 Merge: 13775dacca5c b9fd04262a8a Author: Linus Torvalds Date: Mon Oct 22 18:16:03 2018 +0100 Merge tag 'dma-mapping-4.20' of git://git.infradead.org/users/hch/dma-mapping Pull dma mapping updates from Christoph Hellwig: "First batch of dma-mapping changes for 4.20. There will be a second PR as some big changes were only applied just before the end of the merge window, and I want to give them a few more days in linux-next. Summary: - mostly more consolidation of the direct mapping code, including converting over hexagon, and merging the coherent and non-coherent code into a single dma_map_ops instance (me) - cleanups for the dma_configure/dma_unconfigure callchains (me) - better handling of dma_masks in odd setups (me, Alexander Duyck) - better debugging of passing vmalloc address to the DMA API (Stephen Boyd) - CMA command line parsing fix (He Zhe)" * tag 'dma-mapping-4.20' of git://git.infradead.org/users/hch/dma-mapping: (27 commits) dma-direct: respect DMA_ATTR_NO_WARN dma-mapping: translate __GFP_NOFAIL to DMA_ATTR_NO_WARN dma-direct: document the zone selection logic dma-debug: Check for drivers mapping invalid addresses in dma_map_single() dma-direct: fix return value of dma_direct_supported dma-mapping: move dma_default_get_required_mask under ifdef dma-direct: always allow dma mask <= physiscal memory size dma-direct: implement complete bus_dma_mask handling dma-direct: refine dma_direct_alloc zone selection dma-direct: add an explicit dma_direct_get_required_mask dma-mapping: make the get_required_mask method available unconditionally unicore32: remove swiotlb support Revert "dma-mapping: clear dev->dma_ops in arch_teardown_dma_ops" dma-mapping: support non-coherent devices in dma_common_get_sgtable dma-mapping: consolidate the dma mmap implementations dma-mapping: merge direct and noncoherent ops dma-mapping: move the dma_coherent flag to struct device MIPS: don't select DMA_MAYBE_COHERENT from DMA_PERDEV_COHERENT dma-mapping: add the missing ARCH_HAS_SYNC_DMA_FOR_CPU_ALL declaration dma-mapping: fix panic caused by passing empty cma command line argument ... commit 13775dacca5c158a257320f4b47e1220b82e3b21 Merge: 6ab9e09238fd b3cd92db6ecd Author: Linus Torvalds Date: Mon Oct 22 18:03:31 2018 +0100 Merge tag 'for-4.20/libata-20181021' of git://git.kernel.dk/linux-block Pull libata updates from Jens Axboe: "Here are the libata changes queued up for 4.20: - %pOFn device_node.name conversion (Rob Herring) - Use LBAM/LBAH password defines instead of hardcoding (Linus Walleij) - Series adding support for the allwinner R40 AHCI controller (Corentin Labbe) - Disable ALPM for Ampere Computing device (Suman Tripathi) - ahci bcrm fixes (Florian Fainelli) - Redundant Kconfig defaults (Bartlomiej Zolnierkiewicz) - Code cleanups (Nathan Chancellor)" * tag 'for-4.20/libata-20181021' of git://git.kernel.dk/linux-block: ata: remove redundant 'default n' from Kconfig ata: ep93xx: Use proper enums for directions ata: ahci_brcm: Allow using driver or DSL SoCs ata: ahci_brcm: Match BCM63138 compatible strings ata: ahci_brcm: Allow optional reset controller to be used dt-bindings: ata: Document BCM63138 compatible string pata_atiixp: Remove unnecessary parentheses ata: Disable AHCI ALPM feature for Ampere Computing eMAG SATA dt-bindings: ata: update ahci_sunxi bindings ata: ahci_sunxi: add support for r40 dt-bindings: ata: ahci-platform: document phy-supply ata: ahci_platform: add support for PHY controller regulator dt-bindings: ata: ahci-platform: document ahci-supply ata: ahci_platform: add support for AHCI controller regulator dt-bindings: ata: ahci-platform: fix indentation of target-supply libata: Use SMART LBAM/LBAH password defines ata: ahci: Convert to using %pOFn instead of device_node.name commit 6ab9e09238fdfd742fe23b81e2d385a1cab49d9b Merge: 528985117126 52990a5fb0c9 Author: Linus Torvalds Date: Mon Oct 22 17:46:08 2018 +0100 Merge tag 'for-4.20/block-20181021' of git://git.kernel.dk/linux-block Pull block layer updates from Jens Axboe: "This is the main pull request for block changes for 4.20. This contains: - Series enabling runtime PM for blk-mq (Bart). - Two pull requests from Christoph for NVMe, with items such as; - Better AEN tracking - Multipath improvements - RDMA fixes - Rework of FC for target removal - Fixes for issues identified by static checkers - Fabric cleanups, as prep for TCP transport - Various cleanups and bug fixes - Block merging cleanups (Christoph) - Conversion of drivers to generic DMA mapping API (Christoph) - Series fixing ref count issues with blkcg (Dennis) - Series improving BFQ heuristics (Paolo, et al) - Series improving heuristics for the Kyber IO scheduler (Omar) - Removal of dangerous bio_rewind_iter() API (Ming) - Apply single queue IPI redirection logic to blk-mq (Ming) - Set of fixes and improvements for bcache (Coly et al) - Series closing a hotplug race with sysfs group attributes (Hannes) - Set of patches for lightnvm: - pblk trace support (Hans) - SPDX license header update (Javier) - Tons of refactoring patches to cleanly abstract the 1.2 and 2.0 specs behind a common core interface. (Javier, Matias) - Enable pblk to use a common interface to retrieve chunk metadata (Matias) - Bug fixes (Various) - Set of fixes and updates to the blk IO latency target (Josef) - blk-mq queue number updates fixes (Jianchao) - Convert a bunch of drivers from the old legacy IO interface to blk-mq. This will conclude with the removal of the legacy IO interface itself in 4.21, with the rest of the drivers (me, Omar) - Removal of the DAC960 driver. The SCSI tree will introduce two replacement drivers for this (Hannes)" * tag 'for-4.20/block-20181021' of git://git.kernel.dk/linux-block: (204 commits) block: setup bounce bio_sets properly blkcg: reassociate bios when make_request() is called recursively blkcg: fix edge case for blk_get_rl() under memory pressure nvme-fabrics: move controller options matching to fabrics nvme-rdma: always have a valid trsvcid mtip32xx: fully switch to the generic DMA API rsxx: switch to the generic DMA API umem: switch to the generic DMA API sx8: switch to the generic DMA API sx8: remove dead IF_64BIT_DMA_IS_POSSIBLE code skd: switch to the generic DMA API ubd: remove use of blk_rq_map_sg nvme-pci: remove duplicate check drivers/block: Remove DAC960 driver nvme-pci: fix hot removal during error handling nvmet-fcloop: suppress a compiler warning nvme-core: make implicit seed truncation explicit nvmet-fc: fix kernel-doc headers nvme-fc: rework the request initialization code nvme-fc: introduce struct nvme_fcp_op_w_sgl ... commit 528985117126f11beea339cf39120ee99da04cd2 Merge: 84df9525b0c2 4debef551007 Author: Linus Torvalds Date: Mon Oct 22 17:30:06 2018 +0100 Merge tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 updates from Catalin Marinas: "Apart from some new arm64 features and clean-ups, this also contains the core mmu_gather changes for tracking the levels of the page table being cleared and a minor update to the generic compat_sys_sigaltstack() introducing COMPAT_SIGMINSKSZ. Summary: - Core mmu_gather changes which allow tracking the levels of page-table being cleared together with the arm64 low-level flushing routines - Support for the new ARMv8.5 PSTATE.SSBS bit which can be used to mitigate Spectre-v4 dynamically without trapping to EL3 firmware - Introduce COMPAT_SIGMINSTKSZ for use in compat_sys_sigaltstack - Optimise emulation of MRS instructions to ID_* registers on ARMv8.4 - Support for Common Not Private (CnP) translations allowing threads of the same CPU to share the TLB entries - Accelerated crc32 routines - Move swapper_pg_dir to the rodata section - Trap WFI instruction executed in user space - ARM erratum 1188874 workaround (arch_timer) - Miscellaneous fixes and clean-ups" * tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: (78 commits) arm64: KVM: Guests can skip __install_bp_hardening_cb()s HYP work arm64: cpufeature: Trap CTR_EL0 access only where it is necessary arm64: cpufeature: Fix handling of CTR_EL0.IDC field arm64: cpufeature: ctr: Fix cpu capability check for late CPUs Documentation/arm64: HugeTLB page implementation arm64: mm: Use __pa_symbol() for set_swapper_pgd() arm64: Add silicon-errata.txt entry for ARM erratum 1188873 Revert "arm64: uaccess: implement unsafe accessors" arm64: mm: Drop the unused cpu parameter MAINTAINERS: fix bad sdei paths arm64: mm: Use #ifdef for the __PAGETABLE_P?D_FOLDED defines arm64: Fix typo in a comment in arch/arm64/mm/kasan_init.c arm64: xen: Use existing helper to check interrupt status arm64: Use daifflag_restore after bp_hardening arm64: daifflags: Use irqflags functions for daifflags arm64: arch_timer: avoid unused function warning arm64: Trap WFI executed in userspace arm64: docs: Document SSBS HWCAP arm64: docs: Fix typos in ELF hwcaps arm64/kprobes: remove an extra semicolon in arch_prepare_kprobe ... commit af9b926de9c5986ab009e64917de87c9758bab10 Author: Xiao Ni Date: Sat Oct 20 08:09:25 2018 +0800 MD: Memory leak when flush bio size is zero flush_pool is leaked when flush bio size is zero Fixes: 5a409b4f56d5 ("MD: fix lock contention for flush bios") Signed-off-by: David Jeffery Signed-off-by: Xiao Ni Signed-off-by: Shaohua Li commit 6aaa58c994277647f8b05ffef3b9b225a2d08f36 Author: Jack Wang Date: Fri Oct 19 16:21:31 2018 +0200 md: fix memleak for mempool I noticed kmemleak report memory leak when run create/stop md in a loop, backtrace: [<000000001ca975e7>] mempool_create_node+0x86/0xd0 [<0000000095576bcd>] md_run+0x1057/0x1410 [md_mod] [<000000007b45c5fc>] do_md_run+0x15/0x130 [md_mod] [<000000001ede9ec0>] md_ioctl+0x1f49/0x25d0 [md_mod] [<000000004142cacf>] blkdev_ioctl+0x680/0xd00 The root cause is we alloc mddev->flush_pool and mddev->flush_bio_pool in md_run, but from do_md_stop will not call into md_stop but __md_stop, move the mempool_destroy to __md_stop fixes the problem for me. The bug was introduced in 5a409b4f56d5, the fixes should go to 4.18+ Fixes: 5a409b4f56d5 ("MD: fix lock contention for flush bios") Signed-off-by: Jack Wang Reviewed-by: Xiao Ni Signed-off-by: Shaohua Li commit 7dceef78f310f5351735060d78a1777c69606016 Author: Soeren Moch Date: Mon Oct 22 14:38:12 2018 +0200 rtc: ds1307: fix ds1339 wakealarm support Commit 51ed73eb998a1c79a2b0e9bed68f75a8a2c93b9b ("rtc: ds1340: Add support for trickle charger.") breaks ds1339 wakealarm support by limiting accessible registers. Fix this. Fixes: 51ed73eb998a ("rtc: ds1340: Add support for trickle charger.") Cc: stable@vger.kernel.org Signed-off-by: Soeren Moch Signed-off-by: Alexandre Belloni commit 6f5b390b3abe690ac3875a226e96a1528647f948 Author: Wolfram Sang Date: Sun Oct 21 22:00:41 2018 +0200 rtc: ds1685: 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: Alexandre Belloni commit c1c9b9695cc8868048f45c7e2559f65bc0be7382 Author: Milian Wolff Date: Sun Oct 21 21:14:23 2018 +0200 perf script: Allow extended console debug output The script tool isn't using a browser, yet use_browser wasn't set explicitly to zero. This in turn lead to confusing output such as: ``` $ perf script -vvv ... ... overlapping maps in /home/milian/foobar (disable tui for more info) ... ``` Explicitly set use_browser to 0 now, which gives us the extended debug information now in perf script as expected. Signed-off-by: Milian Wolff Acked-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Link: http://lkml.kernel.org/r/20181021191424.16183-1-milian.wolff@kdab.com Signed-off-by: Arnaldo Carvalho de Melo commit cbb5df7e96070f1f728ff7885443646ebba703d4 Author: Jiri Olsa Date: Mon Oct 22 11:30:15 2018 +0200 perf stat: Poll for monitored tasks being alive Adding the check for tasks we monitor via -p/-t options, and finish stat if there's no longer task to monitor. Requested-by: Stephane Eranian Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Jin Yao Cc: Namhyung Kim Cc: Peter Zijlstra Tested-by: Arnaldo Carvalho de Melo Link: http://lkml.kernel.org/r/20181022093015.9106-1-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit a937c6658b8e77e1f65cde2be9970811752121bb Author: Arnaldo Carvalho de Melo Date: Sat Oct 20 09:27:52 2018 -0300 perf trace: Drop thread refcount in trace__event_handler() We must pair: thread = machine__findnew_thread(); with thread__put(thread). Fix it. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Fixes: c4191e55b874 ("perf trace: Show comm and tid for tracepoint events") Link: https://lkml.kernel.org/n/tip-dkxsb8cwg87rmkrzrbns1o4z@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 4291bf5cb93918232f88a3a70d8f70a72fbb6ab0 Author: Arnaldo Carvalho de Melo Date: Sat Oct 20 09:18:50 2018 -0300 perf trace: Drop addr_location refcounts When we use machine__resolve() we grab a reference to addr_location.thread (and in the future to other elements there) via machine__findnew_thread(), so we must pair that with addr_location__put(), else we'll never drop that thread when it exits and no other remaining data structures have pointers to it. Fix it. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-ivg9hifzeuokb1f5jxc2wob4@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit b7e8452b860c299f342a012922bdd9ab8f2bb722 Author: Arnaldo Carvalho de Melo Date: Sat Oct 20 09:04:41 2018 -0300 perf evsel: Mark a evsel as disabled when asking the kernel do disable it Because there may be more such events in the ring buffer that should be discarded when an app decides to stop considering them. At some point we'll do this with eBPF, this way we stop them at origin, before they are placed in the ring buffer. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-uzufuxws4hufigx07ue1dpv6@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit da4ad3a23af3d7f357b24b33e9fec7531b59ee49 Author: Mike Snitzer Date: Mon Oct 22 10:59:52 2018 -0400 dm writecache: remove disabled code in memory_entry() This dead branch was missed during review. It only makes memory_entry() more inefficient due to needless call to is_power_of_2(), etc. Reported-by: shenghui Signed-off-by: Mike Snitzer commit 1227daa43bce1318ff6fb54e6cd862b4f60245c7 Author: Kees Cook Date: Wed Oct 17 17:20:35 2018 -0700 pstore/ram: Clarify resource reservation labels When ramoops reserved a memory region in the kernel, it had an unhelpful label of "persistent_memory". When reading /proc/iomem, it would be repeated many times, did not hint that it was ramoops in particular, and didn't clarify very much about what each was used for: 400000000-407ffffff : Persistent Memory (legacy) 400000000-400000fff : persistent_memory 400001000-400001fff : persistent_memory ... 4000ff000-4000fffff : persistent_memory Instead, this adds meaningful labels for how the various regions are being used: 400000000-407ffffff : Persistent Memory (legacy) 400000000-400000fff : ramoops:dump(0/252) 400001000-400001fff : ramoops:dump(1/252) ... 4000fc000-4000fcfff : ramoops:dump(252/252) 4000fd000-4000fdfff : ramoops:console 4000fe000-4000fe3ff : ramoops:ftrace(0/3) 4000fe400-4000fe7ff : ramoops:ftrace(1/3) 4000fe800-4000febff : ramoops:ftrace(2/3) 4000fec00-4000fefff : ramoops:ftrace(3/3) 4000ff000-4000fffff : ramoops:pmsg Signed-off-by: Kees Cook Reviewed-by: Joel Fernandes (Google) Tested-by: Sai Prakash Ranjan Tested-by: Guenter Roeck commit 95047b0519c17a28e09df5f38750f5354e3db4c4 Author: Kees Cook Date: Wed Oct 17 14:00:12 2018 -0700 pstore: Refactor compression initialization This refactors compression initialization slightly to better handle getting potentially called twice (via early pstore_register() calls and later pstore_init()) and improves the comments and reporting to be more verbose. Signed-off-by: Kees Cook Tested-by: Guenter Roeck commit 416031653eb55f844e3547fb8f8576399a800da0 Author: Joel Fernandes (Google) Date: Wed Oct 17 03:13:55 2018 -0700 pstore: Allocate compression during late_initcall() ramoops's call of pstore_register() was recently moved to run during late_initcall() because the crypto backend may not have been ready during postcore_initcall(). This meant early-boot crash dumps were not getting caught by pstore any more. Instead, lets allow calls to pstore_register() earlier, and once crypto is ready we can initialize the compression. Reported-by: Sai Prakash Ranjan Signed-off-by: Joel Fernandes (Google) Tested-by: Sai Prakash Ranjan Fixes: cb3bee0369bc ("pstore: Use crypto compress API") [kees: trivial rebase] Signed-off-by: Kees Cook Tested-by: Guenter Roeck commit cb095afd44768bf495894b9ad063bd078e4bb201 Author: Kees Cook Date: Thu Oct 18 11:17:42 2018 -0700 pstore: Centralize init/exit routines In preparation for having additional actions during init/exit, this moves the init/exit into platform.c, centralizing the logic to make call outs to the fs init/exit. Signed-off-by: Kees Cook Tested-by: Guenter Roeck commit 173ee3962959a1985a109f81539a403b5cd07ae7 Author: Rob Herring Date: Mon Oct 22 09:03:54 2018 -0500 of: Add missing exports of node name compare functions Commit f42b0e18f2e5 ("of: add node name compare helper functions") failed to add the module exports to of_node_name_eq() and of_node_name_prefix(). Add them now. Fixes: f42b0e18f2e5 ("of: add node name compare helper functions") Signed-off-by: Rob Herring commit ea4cdc548e5e74a529cdd1aea885d74b4aa8f1b3 Author: Luis Henriques Date: Mon Oct 15 16:46:00 2018 +0100 ceph: new mount option to disable usage of copy-from op Add a new mount option 'nocopyfrom' that will prevent the usage of the RADOS 'copy-from' operation in cephfs. This could be useful, for example, for an administrator to temporarily mitigate any possible bugs in the 'copy-from' implementation. Currently, only copy_file_range uses this RADOS operation. Setting this mount option will result in this syscall reverting to the default VFS implementation, i.e. to perform the copies locally instead of doing remote object copies. Signed-off-by: Luis Henriques Reviewed-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov commit 503f82a9932d311c12430779627f7a130bbe462a Author: Luis Henriques Date: Mon Oct 15 16:45:59 2018 +0100 ceph: support copy_file_range file operation This commit implements support for the copy_file_range syscall in cephfs. It is implemented using the RADOS 'copy-from' operation, which allows to do a remote object copy, without the need to download/upload data from/to the OSDs. Some manual copy may however be required if the source/destination file offsets aren't object aligned or if the copy length is smaller than the object size. Signed-off-by: Luis Henriques Reviewed-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov commit 23ddf9bea900b4ce39e5707e1ddf66062cfe6d91 Author: Luis Henriques Date: Mon Oct 15 16:45:58 2018 +0100 libceph: support the RADOS copy-from operation Add support for performing remote object copies using the 'copy-from' operation. [ Add COPY_FROM to get_num_data_items(). ] Signed-off-by: Luis Henriques Reviewed-by: Ilya Dryomov Signed-off-by: Ilya Dryomov commit 2ee9dd958d474252510b8c4dc216aa1dab7ad272 Author: Luis Henriques Date: Mon Oct 15 16:45:57 2018 +0100 ceph: add non-blocking parameter to ceph_try_get_caps() ceph_try_get_caps currently calls try_get_cap_refs with the nonblock parameter always set to 'true'. This change adds a new parameter that allows to set it's value. This will be useful for a follow-up patch that will need to get two sets of capabilities for two different inodes without risking a deadlock. Signed-off-by: Luis Henriques Reviewed-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov commit 98c4bfe9d89b22d7bfddf6469241658920b6fafe Author: Ilya Dryomov Date: Wed Oct 17 14:23:04 2018 +0200 libceph: check reply num_data_items in setup_request_data() setup_request_data() adds message data items to both request and reply messages, but only checks request num_data_items before proceeding with the loop. This is wrong because if an op doesn't have any request data items but has a reply data item (e.g. read), a duplicate data item gets added to the message on every resend attempt. This went unnoticed for years but now that message data items are preallocated, it promptly crashes in ceph_msg_data_add(). Amend the signature to make it clear that setup_request_data() operates on both request and reply messages. Also, remove data_len assert -- we have another one in prepare_write_message(). Signed-off-by: Ilya Dryomov commit 0d9c1ab3be4c0187663096a6a084421d0a1e45c6 Author: Ilya Dryomov Date: Mon Oct 15 17:38:23 2018 +0200 libceph: preallocate message data items Currently message data items are allocated with ceph_msg_data_create() in setup_request_data() inside send_request(). send_request() has never been allowed to fail, so each allocation is followed by a BUG_ON: data = ceph_msg_data_create(...); BUG_ON(!data); It's been this way since support for multiple message data items was added in commit 6644ed7b7e04 ("libceph: make message data be a pointer") in 3.10. There is no reason to delay the allocation of message data items until the last possible moment and we certainly don't need a linked list of them as they are only ever appended to the end and never erased. Make ceph_msg_new2() take max_data_items and adapt the rest of the code. Reported-by: Jerry Lee Signed-off-by: Ilya Dryomov commit 26f887e0a3c43f67b550e2e5d8a76e86ca11d188 Author: Ilya Dryomov Date: Mon Oct 15 16:11:37 2018 +0200 libceph, rbd, ceph: move ceph_osdc_alloc_messages() calls The current requirement is that ceph_osdc_alloc_messages() should be called after oid and oloc are known. In preparation for preallocating message data items, move ceph_osdc_alloc_messages() further down, so that it is called when OSD op codes are known. Signed-off-by: Ilya Dryomov commit 39e58c3425b1816c84724e8a77f9f9daa0143263 Author: Ilya Dryomov Date: Mon Oct 15 15:26:27 2018 +0200 libceph: introduce alloc_watch_request() ceph_osdc_alloc_messages() call will be moved out of alloc_linger_request() in the next commit, which means that ceph_osdc_watch() will need to call ceph_osdc_alloc_messages() twice. Add a helper for that. Signed-off-by: Ilya Dryomov commit 81c65213d73cc51f2f2e4326d602e107c07afb05 Author: Ilya Dryomov Date: Thu Oct 11 12:58:33 2018 +0200 libceph: assign cookies in linger_submit() Register lingers directly in linger_submit(). This avoids allocating memory for notify pagelist while holding osdc->lock and simplifies both callers of linger_submit(). Signed-off-by: Ilya Dryomov commit 3b83f60da6dd1becd865c1e2745123a8ae378c25 Author: Ilya Dryomov Date: Thu Oct 11 17:04:33 2018 +0200 libceph: enable fallback to ceph_msg_new() in ceph_msgpool_get() ceph_msgpool_get() can fall back to ceph_msg_new() when it is asked for a message whose front portion is larger than pool->front_len. However the caller always passes 0, effectively disabling that code path. The allocation goes to the message pool and returns a message with a front that is smaller than requested, setting us up for a crash. One example of this is a directory with a large number of snapshots. If its snap context doesn't fit, we oops in encode_request_partial(). Signed-off-by: Ilya Dryomov commit 61d2f855042cfcce9b78fa10fe7cd2020598263b Author: Ilya Dryomov Date: Thu Oct 11 16:15:38 2018 +0200 ceph: num_ops is off by one in ceph_aio_retry_work() Two OSD op slots are allocated, but only one is ever used. Signed-off-by: Ilya Dryomov commit 41a264e1b30ccde9ac83a314559ddacb78a85e91 Author: Ilya Dryomov Date: Sat Oct 13 11:36:52 2018 +0200 libceph: no need to call osd_req_opcode_valid() in osd_req_encode_op() Any uninitialized or unknown ops will be caught by the default clause anyway. Signed-off-by: Ilya Dryomov commit 668028844174aa7069da1f8ea89a5dbc93e86216 Author: Xuehan Xu Date: Thu Oct 11 17:55:39 2018 +0800 ceph: set timeout conditionally in __cap_delay_requeue __cap_delay_requeue could be invoked through ceph_check_caps when there exists caps that needs to be sent and are delayed by "i_hold_caps_min" or "i_hold_caps_max". If __cap_delay_requeue sets timeout unconditionally, there could be a chance that some "wanted" caps can not be release for a long since their timeouts are reset every time they get delayed. Fixes: http://tracker.ceph.com/issues/36369 Signed-off-by: Xuehan Xu Reviewed-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov commit 894868330a1e038ea4a65dbb81741eef70ad71b1 Author: Ilya Dryomov Date: Fri Sep 28 16:02:53 2018 +0200 libceph: don't consume a ref on pagelist in ceph_msg_data_add_pagelist() Because send_mds_reconnect() wants to send a message with a pagelist and pass the ownership to the messenger, ceph_msg_data_add_pagelist() consumes a ref which is then put in ceph_msg_data_destroy(). This makes managing pagelists in the OSD client (where they are wrapped in ceph_osd_data) unnecessarily hard because the handoff only happens in ceph_osdc_start_request() instead of when the pagelist is passed to ceph_osd_data_pagelist_init(). I counted several memory leaks on various error paths. Fix up ceph_msg_data_add_pagelist() and carry a pagelist ref in ceph_osd_data. Signed-off-by: Ilya Dryomov commit 33165d472310262d8c79c7e4d1a17dc60cea7e35 Author: Ilya Dryomov Date: Fri Sep 28 15:38:34 2018 +0200 libceph: introduce ceph_pagelist_alloc() struct ceph_pagelist cannot be embedded into anything else because it has its own refcount. Merge allocation and initialization together. Signed-off-by: Ilya Dryomov commit 24639ce56040a8ea890ad8836068c1ad8bd177c7 Author: Ilya Dryomov Date: Wed Sep 26 19:12:07 2018 +0200 libceph: osd_req_op_cls_init() doesn't need to take opcode Signed-off-by: Ilya Dryomov commit 94e6992bb560be8bffb47f287194adf070b57695 Author: Ilya Dryomov Date: Wed Sep 26 18:03:16 2018 +0200 libceph: bump CEPH_MSG_MAX_DATA_LEN If the read is large enough, we end up spinning in the messenger: libceph: osd0 192.168.122.1:6801 io error libceph: osd0 192.168.122.1:6801 io error libceph: osd0 192.168.122.1:6801 io error This is a receive side limit, so only reads were affected. Cc: stable@vger.kernel.org Signed-off-by: Ilya Dryomov commit bddff633ab7bc60a18a86ac8b322695b6f8594d0 Author: Luis Henriques Date: Tue Oct 9 18:54:28 2018 +0100 ceph: only allow punch hole mode in fallocate Current implementation of cephfs fallocate isn't correct as it doesn't really reserve the space in the cluster, which means that a subsequent call to a write may actually fail due to lack of space. In fact, it is currently possible to fallocate an amount space that is larger than the free space in the cluster. It has behaved this way since the initial commit ad7a60de882a ("ceph: punch hole support"). Since there's no easy solution to fix this at the moment, this patch simply removes support for all fallocate operations but FALLOC_FL_PUNCH_HOLE (which implies FALLOC_FL_KEEP_SIZE). Link: https://tracker.ceph.com/issues/36317 Signed-off-by: Luis Henriques Reviewed-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov commit fce7a9744bdf3baa9d08c52d2c78f53ab49918a4 Author: Yan, Zheng Date: Sat Sep 29 16:02:19 2018 +0800 ceph: refactor ceph_sync_read() Avoid allocating memory for the entire user request: striped_read() does a synchronous OSD request per object, so it doesn't need more than object size worth of pages at a time. [ Preserve the comment, changelog. ] Signed-off-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov commit 74c9e6bf4c888e41bc7db340fb94fade96394038 Author: Yan, Zheng Date: Fri Sep 28 11:34:42 2018 +0800 ceph: check if LOOKUPNAME request was aborted when filling trace d_lookup()/d_alloc() require parent inode locked. Parent inode is not locked if request is aborted. Signed-off-by: "Yan, Zheng" Reviewed-by: Jeff Layton Signed-off-by: Ilya Dryomov commit c58f450bd61511d897efc2ea472c69630635b557 Author: Yan, Zheng Date: Fri Sep 28 09:10:29 2018 +0800 ceph: fix dentry leak in ceph_readdir_prepopulate Signed-off-by: "Yan, Zheng" Reviewed-by: Jeff Layton Signed-off-by: Ilya Dryomov commit efe328230dc01aa0b1269aad0b5fae73eea4677a Author: Yan, Zheng Date: Thu Sep 27 21:16:05 2018 +0800 Revert "ceph: fix dentry leak in splice_dentry()" This reverts commit 8b8f53af1ed9df88a4c0fbfdf3db58f62060edf3. splice_dentry() is used by three places. For two places, req->r_dentry is passed to splice_dentry(). In the case of error, req->r_dentry does not get updated. So splice_dentry() should not drop reference. Cc: stable@vger.kernel.org # 4.18+ Signed-off-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov commit 5da207993e396f445d813338dd3540ddd6d26816 Author: Chengguang Xu Date: Sun Sep 2 23:21:09 2018 +0800 ceph: check snap first in ceph_set_acl() Do the snap check first in ceph_set_acl(), so we can avoid unnecessary operations when the inode has snap. Signed-off-by: Chengguang Xu Reviewed-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov commit 7d8dc53414c5770afb8b83db096ecab0cd53ec93 Author: Chengguang Xu Date: Sun Aug 12 23:06:54 2018 +0800 rbd: add __init/__exit annotations Add __init/__exit annotation to init/cleanup helpers which are only called once in the module. Signed-off-by: Chengguang Xu Reviewed-by: Ilya Dryomov Signed-off-by: Ilya Dryomov commit 3167893ae60e847b5a44d582fedb544cd0ae7ef5 Author: Chengguang Xu Date: Mon Jul 30 23:55:36 2018 +0800 ceph: reset cap hold timeout only for requeued inode __cap_delay_requeue() only requeue inode which does not have CEPH_I_FLUSH flag, so avoid reset cap hold timeout for that inode. Signed-off-by: Chengguang Xu Reviewed-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov commit cd6ba41c192deca20d9add5554bc8c51d0f07de2 Author: Alexey Khoroshilov Date: Sat Oct 13 23:51:03 2018 +0300 watchdog: ts4800: release syscon device node in ts4800_wdt_probe() Put syscon device node when it is not needed anymore. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit f822ad2c2c03af85a531c5174136b6d5b1abc566 Author: Harald Freudenberger Date: Fri Oct 19 10:36:28 2018 +0200 s390/pkey: move pckmo subfunction available checks away from module init The init of the pkey module currently fails if the pckmo instruction or the subfunctions are not available. However, customers may restrict their LPAR to switch off exactly these functions and work with secure key only. So it is a valid case to have the pkey module active and use it for secure key to protected key transfer only. This patch moves the pckmo subfunction check from the pkey module init function into the internal function where the pckmo instruction is called. So now only on invocation of the pckmo instruction the check for the required subfunction is done. If not available EOPNOTSUPP is returned to the caller. The check for having the pckmo instruction available is still done during module init. This instruction came in with MSA 3 together with the basic set of kmc instructions needed to work with protected keys. Signed-off-by: Harald Freudenberger Reviewed-by: Ingo Franzki Signed-off-by: Martin Schwidefsky commit cf3dbe5dacb3a95d497ace9c714306d17cb05b11 Author: Vasily Gorbik Date: Fri Oct 19 12:13:58 2018 +0200 s390/kasan: support preemptible kernel build When the kernel is built with: CONFIG_PREEMPT=y CONFIG_PREEMPT_COUNT=y "stfle" function used by kasan initialization code makes additional call to preempt_count_add/preempt_count_sub. To avoid removing kasan instrumentation from sched code where those functions leave split stfle function and provide __stfle variant without preemption handling to be used by Kasan. Reported-by: Benjamin Block Acked-by: Heiko Carstens Signed-off-by: Vasily Gorbik Signed-off-by: Martin Schwidefsky commit a19c59cc10a5ebc6b5a542e56bfd9f427ce01d74 Merge: 92303c86b7e9 fe8ecccc10b3 Author: David S. Miller Date: Sun Oct 21 21:11:46 2018 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next Daniel Borkmann says: ==================== pull-request: bpf-next 2018-10-21 The following pull-request contains BPF updates for your *net-next* tree. The main changes are: 1) Implement two new kind of BPF maps, that is, queue and stack map along with new peek, push and pop operations, from Mauricio. 2) Add support for MSG_PEEK flag when redirecting into an ingress psock sk_msg queue, and add a new helper bpf_msg_push_data() for insert data into the message, from John. 3) Allow for BPF programs of type BPF_PROG_TYPE_CGROUP_SKB to use direct packet access for __skb_buff, from Song. 4) Use more lightweight barriers for walking perf ring buffer for libbpf and perf tool as well. Also, various fixes and improvements from verifier side, from Daniel. 5) Add per-symbol visibility for DSO in libbpf and hide by default global symbols such as netlink related functions, from Andrey. 6) Two improvements to nfp's BPF offload to check vNIC capabilities in case prog is shared with multiple vNICs and to protect against mis-initializing atomic counters, from Jakub. 7) Fix for bpftool to use 4 context mode for the nfp disassembler, also from Jakub. 8) Fix a return value comparison in test_libbpf.sh and add several bpftool improvements in bash completion, documentation of bpf fs restrictions and batch mode summary print, from Quentin. 9) Fix a file resource leak in BPF selftest's load_kallsyms() helper, from Peng. 10) Fix an unused variable warning in map_lookup_and_delete_elem(), from Alexei. 11) Fix bpf_skb_adjust_room() signature in BPF UAPI helper doc, from Nicolas. 12) Add missing executables to .gitignore in BPF selftests, from Anders. ==================== Signed-off-by: David S. Miller commit 92303c86b7e9b7d3895ccafb441a0354143e2a18 Merge: 21ea1d36f6df 2c67e33de2d3 Author: David S. Miller Date: Sun Oct 21 21:10:12 2018 -0700 Merge branch 'net-simplify-getting-driver_data' Wolfram Sang says: ==================== net: simplify getting .driver_data I got tired of fixing this in Renesas drivers manually, so I took the big hammer. Remove this cumbersome code pattern which got copy-pasted too much already: - struct platform_device *pdev = to_platform_device(dev); - struct ep93xx_keypad *keypad = platform_get_drvdata(pdev); + struct ep93xx_keypad *keypad = dev_get_drvdata(dev); A branch, tested by buildbot, can be found here: git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git coccinelle/get_drvdata I have been asked if it couldn't be done for dev_set_drvdata as well. I checked it and did not find one occasion where it could be simplified like this. Not much of a surprise because driver_data is usually set in probe() functions which access struct platform_device in many other ways. I am open for other comments, suggestions, too, of course. Here is the cocci-script I created: @@ struct device* d; identifier pdev; expression *ptr; @@ ( - struct platform_device *pdev = to_platform_device(d); | - struct platform_device *pdev; ... - pdev = to_platform_device(d); ) <... when != pdev - &pdev->dev + d ...> ptr = - platform_get_drvdata(pdev) + dev_get_drvdata(d) <... when != pdev - &pdev->dev + d ...> ==================== Signed-off-by: David S. Miller commit 2c67e33de2d3f2350cff2e131f5aa8d7f1ff6f9f Author: Wolfram Sang Date: Sun Oct 21 22:00:20 2018 +0200 net: phy: mdio-mux-bcm-iproc: 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: Andrew Lunn Signed-off-by: David S. Miller commit 44f5ccdbc97debd03d10c1b0fde3f60e2294f001 Author: Wolfram Sang Date: Sun Oct 21 22:00:19 2018 +0200 net: ethernet: wiznet: w5300: 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: David S. Miller commit 762b9e9abb58375ba7eb06c3522c777debebe289 Author: Wolfram Sang Date: Sun Oct 21 22:00:18 2018 +0200 net: ethernet: ti: davinci_emac: 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: David S. Miller commit 4e13c252276d3aa56f028cada2bd7cb41694d03f Author: Wolfram Sang Date: Sun Oct 21 22:00:17 2018 +0200 net: ethernet: ti: cpsw: 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: David S. Miller commit 9dd8360c763af52a8c6357f509c9a700ea3fc0bf Author: Wolfram Sang Date: Sun Oct 21 22:00:16 2018 +0200 net: ethernet: smsc: smc91x: 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: David S. Miller commit 3fcdaad316f204d6280a65cf80a7c21c9fd499c3 Author: Wolfram Sang Date: Sun Oct 21 22:00:15 2018 +0200 net: ethernet: davicom: dm9000: 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: David S. Miller commit ce886a4748aa58fd12280d793305b3d844f202c4 Author: Wolfram Sang Date: Sun Oct 21 22:00:14 2018 +0200 net: ethernet: cadence: macb_main: 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: David S. Miller commit 717de3705dc4cf37d88392e1bdfb0135bd3ac2df Author: Wolfram Sang Date: Sun Oct 21 22:00:13 2018 +0200 net: dsa: qca8k: 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: Andrew Lunn Signed-off-by: David S. Miller commit 63382e0afeda1da79fe0c1ebcfbb6fb38e530fa1 Author: Wolfram Sang Date: Sun Oct 21 22:00:12 2018 +0200 net: dsa: bcm_sf2: 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: Andrew Lunn Signed-off-by: David S. Miller commit 977e4be5eb714c48a67afc26a6c477f24130a1f2 Author: Christophe Leroy Date: Sat Oct 20 09:26:49 2018 +0200 x86/stackprotector: Remove the call to boot_init_stack_canary() from cpu_startup_entry() The following commit: d7880812b359 ("idle: Add the stack canary init to cpu_startup_entry()") ... added an x86 specific boot_init_stack_canary() call to the generic cpu_startup_entry() as a temporary hack, with the intention to remove the #ifdef CONFIG_X86 later. More than 5 years later let's finally realize that plan! :-) While implementing stack protector support for PowerPC, we found that calling boot_init_stack_canary() is also needed for PowerPC which uses per task (TLS) stack canary like the X86. However, calling boot_init_stack_canary() would break architectures using a global stack canary (ARM, SH, MIPS and XTENSA). Instead of modifying the #ifdef CONFIG_X86 to an even messier: #if defined(CONFIG_X86) || defined(CONFIG_PPC) PowerPC implemented the call to boot_init_stack_canary() in the function calling cpu_startup_entry(). Let's try the same cleanup on the x86 side as well. On x86 we have two functions calling cpu_startup_entry(): - start_secondary() - cpu_bringup_and_idle() start_secondary() already calls boot_init_stack_canary(), so it's good, and this patch adds the call to boot_init_stack_canary() in cpu_bringup_and_idle(). I.e. now x86 catches up to the rest of the world and the ugly init sequence in init/main.c can be removed from cpu_startup_entry(). As a final benefit we can also remove the dependency from . [ mingo: Improved the changelog a bit, added language explaining x86 borkage and sched.h change. ] Signed-off-by: Christophe Leroy Reviewed-by: Juergen Gross Cc: Boris Ostrovsky Cc: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linuxppc-dev@lists.ozlabs.org Cc: xen-devel@lists.xenproject.org Link: http://lkml.kernel.org/r/20181020072649.5B59310483E@pc16082vm.idsi0.si.c-s.fr Signed-off-by: Ingo Molnar commit 2e62024c265aa69315ed02835623740030435380 Author: Masami Hiramatsu Date: Sat Oct 20 18:47:53 2018 +0900 kprobes/x86: Use preempt_enable() in optimized_callback() The following commit: a19b2e3d7839 ("kprobes/x86: Remove IRQ disabling from ftrace-based/optimized kprobes”) removed local_irq_save/restore() from optimized_callback(), the handler might be interrupted by the rescheduling interrupt and might be rescheduled - so we must not use the preempt_enable_no_resched() macro. Use preempt_enable() instead, to not lose preemption events. [ mingo: Improved the changelog. ] Reported-by: Nadav Amit Signed-off-by: Masami Hiramatsu Acked-by: Peter Zijlstra (Intel) Cc: Cc: Alexei Starovoitov Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Linus Torvalds Cc: Oleg Nesterov Cc: Thomas Gleixner Cc: dwmw@amazon.co.uk Fixes: a19b2e3d7839 ("kprobes/x86: Remove IRQ disabling from ftrace-based/optimized kprobes”) Link: http://lkml.kernel.org/r/154002887331.7627.10194920925792947001.stgit@devbox Signed-off-by: Ingo Molnar commit b5a229350b72b929edac5ba77c825f8ebb413533 Author: Connor McAdams Date: Sun Oct 21 13:53:03 2018 -0400 ALSA: hda/ca0132 - Actually fix microphone issue This patch fixes the microphone issue for all cards. The previous fix worked on the ZxR, but not on the AE-5 or Z. This patch has been tested to work for all cards. Signed-off-by: Connor McAdams Signed-off-by: Takashi Iwai commit cfb347979e71d3ce6be59a988b3357f541c9eacf Author: Gustavo A. R. Silva Date: Thu Oct 4 15:56:36 2018 +0200 power: max8925: mark expected switch fall-through In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 201510 ("Missing break in switch") Signed-off-by: Gustavo A. R. Silva Signed-off-by: Sebastian Reichel commit 415d602b226b3ed7b24edd8f0c2bfc111684d2b1 Author: Colin Ian King Date: Sat Oct 13 16:27:27 2018 +0100 power: supply: fix spelling mistake "Gauage" -> "Gauge" Trivial fix to spelling mistake in MODULE_DESCRIPTION text Signed-off-by: Colin Ian King Signed-off-by: Sebastian Reichel commit 21ea1d36f6dfcb1d59184937c672022d5d01902a Merge: d92060bc6923 23469de647c4 Author: David S. Miller Date: Sun Oct 21 11:54:28 2018 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net David Ahern's dump indexing bug fix in 'net' overlapped the change of the function signature of inet6_fill_ifaddr() in 'net-next'. Trivially resolved. Signed-off-by: David S. Miller commit fe8ecccc10b3adc071de05ca7af728ca1a4ac9aa Author: Quentin Monnet Date: Sat Oct 20 23:01:50 2018 +0100 tools: bpftool: fix completion for "bpftool map update" When trying to complete "bpftool map update" commands, the call to printf would print an error message that would show on the command line if no map is found to complete the command line. Fix it by making sure we have map ids to complete the line with, before we try to print something. Signed-off-by: Quentin Monnet Reviewed-by: Jakub Kicinski Signed-off-by: Daniel Borkmann commit 06ee9da6a8b49e0e12b7a825dbe6ad243d5463e2 Author: Quentin Monnet Date: Sat Oct 20 23:01:49 2018 +0100 tools: bpftool: print nb of cmds to stdout (not stderr) for batch mode When batch mode is used and all commands succeeds, bpftool prints the number of commands processed to stderr. There is no particular reason to use stderr for this, we could as well use stdout. It would avoid getting unnecessary output on stderr if the standard ouptut is redirected, for example. Reported-by: David Beckett Signed-off-by: Quentin Monnet Reviewed-by: Jakub Kicinski Signed-off-by: Daniel Borkmann commit 882731e06c669a8626f2d4bfb351ca19264be029 Author: Quentin Monnet Date: Sat Oct 20 23:01:48 2018 +0100 tools: bpftool: document restriction on '.' in names to pin in bpffs Names used to pin eBPF programs and maps under the eBPF virtual file system cannot contain a dot character, which is reserved for future extensions of this file system. Document this in bpftool man pages to avoid users getting confused if pinning fails because of a dot. Signed-off-by: Quentin Monnet Reviewed-by: Jakub Kicinski Signed-off-by: Daniel Borkmann commit 52990a5fb0c991ecafebdab43138b5ed41376852 Author: Jens Axboe Date: Sun Oct 21 12:02:36 2018 -0600 block: setup bounce bio_sets properly We're only setting up the bounce bio sets if we happen to need bouncing for regular HIGHMEM, not if we only need it for ISA devices. Protect the ISA bounce setup with a mutex, since it's being invoked from driver init functions and can thus be called in parallel. Cc: stable@vger.kernel.org Reported-by: Ondrej Zary Tested-by: Ondrej Zary Signed-off-by: Jens Axboe commit 7b9734dbc5b042bb8d8d930797f346b280057c4e Merge: 4b51c747e4a5 5f143af7501e Author: Mark Brown Date: Sun Oct 21 17:00:17 2018 +0100 Merge remote-tracking branch 'spi/topic/of' into spi-next commit 4b51c747e4a52175e63d125db8365b38b06f0343 Merge: 92d58fd13af2 0c903aafc852 Author: Mark Brown Date: Sun Oct 21 17:00:14 2018 +0100 Merge branch 'spi-4.20' into spi-next commit 92d58fd13af269552b65853d2c3a63970c4090bf Merge: 35a7f35ad1b1 4585add948b1 Author: Mark Brown Date: Sun Oct 21 17:00:10 2018 +0100 Merge branch 'spi-4.19' into spi-linus commit f35b1e53a66ab06e6d04cdff96f686e8b88959ef Merge: 4fd1f509e89f eb108c3611dd db6565af68db Author: Mark Brown Date: Sun Oct 21 17:00:05 2018 +0100 Merge remote-tracking branches 'regulator/topic/bd718xx' and 'regulator/topic/pfuze100' into regulator-next commit 4fd1f509e89f0e8ea28b1baa41d314636ae2064e Merge: 35a7f35ad1b1 d8b2a8e9c06b Author: Mark Brown Date: Sun Oct 21 17:00:02 2018 +0100 Merge branch 'regulator-4.20' into regulator-next commit 65dfb6d6dd2850f3f99f08536d2b14190350c854 Merge: 576b354ac25b 7f91e2af1a4a Author: Mark Brown Date: Sun Oct 21 16:59:23 2018 +0100 Merge branch 'asoc-4.20' into asoc-next commit 576b354ac25b544a31f27c365410d59fcbfee064 Merge: 35a7f35ad1b1 747df19747bc Author: Mark Brown Date: Sun Oct 21 16:59:19 2018 +0100 Merge branch 'asoc-4.19' into asoc-linus commit 0c903aafc8529f64d24d2cd6df32f2bf16aad20b Author: A.s. Dong Date: Thu Oct 18 18:19:34 2018 +0000 spi: lpspi: add imx8qxp compatible string Add imx8qxp compatible string Signed-off-by: Dong Aisheng Reviewed-by: Rob Herring Signed-off-by: Mark Brown commit 7f91e2af1a4a2c34fc2e8fb046c722e1a9c85399 Author: Vasily Khoruzhick Date: Sun Oct 21 08:39:11 2018 -0700 ASoC: sun4i-i2s: move code from startup/shutdown hooks into pm_runtime hooks startup() and shutdown() hooks are called for both substreams, so stopping either substream when another is running breaks the latter. E.g. playback breaks if capture is stopped when playback is running. Move code from startup() and shutdown() to resume() and suspend() hooks respectively to fix this issue Signed-off-by: Vasily Khoruzhick Acked-by: Maxime Ripard Signed-off-by: Mark Brown commit 3a08cd52c37c793ffc199f6fc2ecfc368e284b2d Author: Matthew Wilcox Date: Sat Sep 22 16:14:30 2018 -0400 radix tree: Remove multiorder support All users have now been converted to the XArray. Removing the support reduces code size and ensures new users will use the XArray instead. Signed-off-by: Matthew Wilcox commit 542980aa9318edcfb68aa7bf6eacf2814dc137dd Author: Matthew Wilcox Date: Sat Sep 22 16:12:41 2018 -0400 radix tree test: Convert multiorder tests to XArray This is the last remaining user of the multiorder functionality of the radix tree. Test the XArray instead. Signed-off-by: Matthew Wilcox commit b66b5a48b8a0e43dc114573da11c1a9c586a2d4f Author: Matthew Wilcox Date: Sat Sep 22 15:34:28 2018 -0400 radix tree tests: Convert item_delete_rcu to XArray In preparation for the removal of the multiorder radix tree code, convert item_delete_rcu() to use the XArray so it can still be called for XArrays containing multi-index entries. Signed-off-by: Matthew Wilcox commit ccc89e30fac790e3a175dbfc863c67286fce96b0 Author: Matthew Wilcox Date: Thu Sep 13 10:15:41 2018 -0400 radix tree tests: Convert item_kill_tree to XArray In preparation for the removal of the multiorder radix tree code, convert item_kill_tree() to use the XArray so it can still be called for XArrays containing multi-index entries. Signed-off-by: Matthew Wilcox commit 4bb53bdda0d1e061035774ed4868bdeb4d889044 Author: Matthew Wilcox Date: Wed Sep 12 23:29:32 2018 -0400 radix tree tests: Move item_insert_order The remaining tests are not suitable for moving in-kernel, so move item_insert_order() into multiorder.c, make it static and make it use the XArray. Signed-off-by: Matthew Wilcox commit 879a9ae7b5bc046f195a725d62bbc96258e5d0c8 Author: Matthew Wilcox Date: Wed Sep 12 23:12:47 2018 -0400 radix tree test suite: Remove multiorder benchmarking The multiorder radix tree code is being removed, so remove the benchmarking of its performance. Signed-off-by: Matthew Wilcox commit 9076b33d7dad8e316c90918845417e85347f682c Author: Matthew Wilcox Date: Wed Sep 12 12:52:45 2018 -0400 radix tree test suite: Remove __item_insert Inline it into its one caller Signed-off-by: Matthew Wilcox commit bcfa4b72111c9a4d483024cb1f877803b354aa11 Author: Matthew Wilcox Date: Wed Aug 15 14:22:16 2018 -0400 memremap: Convert to XArray Use the new xa_store_range function instead of the radix tree. Signed-off-by: Matthew Wilcox commit 0e9446c35a80931044b6d8d2d74a9cabd248539f Author: Matthew Wilcox Date: Wed Aug 15 14:13:29 2018 -0400 xarray: Add range store functionality This version of xa_store_range() really only supports load and store. Our only user only needs basic load and store functionality, so there's no need to do the extra work to support marking and overlapping stores correctly yet. Signed-off-by: Matthew Wilcox commit 4f06d6302da682157890f72c0573e12a73536814 Author: Matthew Wilcox Date: Sun Sep 9 01:52:17 2018 -0400 xarray: Move multiorder_check to in-kernel tests This version is a little less thorough in order to be a little quicker, but tests the important edge cases. Also test adding a multiorder entry at a non-canonical index, and erasing it. Signed-off-by: Matthew Wilcox commit 93eb07f72c8d86f8fe5e90907df1cc037f6ffbb7 Author: Matthew Wilcox Date: Sat Sep 8 12:09:52 2018 -0400 xarray: Move multiorder_shrink to kernel tests Test this functionality inside the kernel as well as in userspace. Also remove insert_bug() as there's no comparable thing to test in the XArray code. Signed-off-by: Matthew Wilcox commit d6427f8179b5dd65eb468c61fc8cc24657c336c9 Author: Matthew Wilcox Date: Tue Aug 28 16:13:16 2018 -0400 xarray: Move multiorder account test in-kernel Move this test to the in-kernel test suite, and enhance it to test several different orders. Signed-off-by: Matthew Wilcox commit 47e0fab2b15155e33fdff777c791bebfd5855bbc Author: Matthew Wilcox Date: Mon Aug 20 15:48:46 2018 -0400 radix tree test suite: Convert iteration test to XArray With no code left in the kernel using the multiorder radix tree, convert the iteration test from the radix tree to the XArray. It's unlikely to suffer the same bug as the radix tree, but this test will prevent that bug from ever creeping into the XArray implementation. Signed-off-by: Matthew Wilcox commit 372266ba0267803564824b1c09f1bb7f3f3fc761 Author: Matthew Wilcox Date: Sat Aug 18 07:09:22 2018 -0400 radix tree test suite: Convert tag_tagged_items to XArray The tag_tagged_items() function is supposed to test the page-writeback tagging code. Since that has been converted to the XArray, there's not much point in testing the radix tree's tagging code. This requires using the pthread mutex embedded in the xarray instead of an external lock, so remove the pthread mutexes which protect xarrays/radix trees. Also remove radix_tree_iter_tag_set() as this was the last user. Signed-off-by: Matthew Wilcox commit adb9d9c4ccb1ff0bf1d376e65f36aa5573c75c1a Author: Matthew Wilcox Date: Mon Apr 9 16:52:21 2018 -0400 radix tree: Remove radix_tree_clear_tags The page cache was the only user of this interface and it has now been converted to the XArray. Transform the test into a test of xas_init_marks(). Signed-off-by: Matthew Wilcox commit 8cf2f98411e3a0865026a1061af637161b16d32b Author: Matthew Wilcox Date: Sat May 19 16:47:47 2018 -0400 radix tree: Remove radix_tree_maybe_preload_order This function was only used by the page cache which is now converted to the XArray. Signed-off-by: Matthew Wilcox commit 2956c6644bfd9aab9f6b21a12e1bd75876d9dd73 Author: Matthew Wilcox Date: Sat May 19 16:47:47 2018 -0400 radix tree: Remove split/join code radix_tree_split and radix_tree_join were never used upstream. Remove them; if they're needed in future they will be replaced by XArray equivalents. Signed-off-by: Matthew Wilcox commit 1cf56f9d670b88b2e947a7ccdb8ba32e6477915d Author: Matthew Wilcox Date: Mon Apr 9 16:24:45 2018 -0400 radix tree: Remove radix_tree_update_node_t The only user of this functionality was the workingset code, and it's now been converted to the XArray. Remove __radix_tree_delete_node() entirely as it was also only used by the workingset code. Signed-off-by: Matthew Wilcox commit a28334862993b5c6a8766f6963ee69048403817c Author: Matthew Wilcox Date: Tue Dec 5 19:04:20 2017 -0500 page cache: Finish XArray conversion With no more radix tree API users left, we can drop the GFP flags and use xa_init() instead of INIT_RADIX_TREE(). Signed-off-by: Matthew Wilcox commit b15cd800682fcaf27048b05e42f5c208e4c756c0 Author: Matthew Wilcox Date: Thu Mar 29 22:58:27 2018 -0400 dax: Convert page fault handlers to XArray This is the last part of DAX to be converted to the XArray so remove all the old helper functions. Signed-off-by: Matthew Wilcox commit 9f32d221301c3e754b24c77ab11bf793b19f51b5 Author: Matthew Wilcox Date: Tue Jun 12 09:46:30 2018 -0400 dax: Convert dax_lock_mapping_entry to XArray Instead of always retrying when we slept, only retry if the page has moved. Signed-off-by: Matthew Wilcox commit 9fc747f68d49f4b63029e3a1e87c49d23771a199 Author: Matthew Wilcox Date: Wed Mar 28 16:03:45 2018 -0400 dax: Convert dax writeback to XArray Use XArray iteration instead of a pagevec. Signed-off-by: Matthew Wilcox commit 07f2d89cc270936ac314e7cc4ac57077d7f08aef Author: Matthew Wilcox Date: Wed Mar 28 15:40:41 2018 -0400 dax: Convert __dax_invalidate_entry to XArray Avoids walking the radix tree multiple times looking for tags. Signed-off-by: Matthew Wilcox commit 084a899008cec6db91dbf06453b2e3a36ceed02d Author: Matthew Wilcox Date: Thu May 17 13:03:48 2018 -0400 dax: Convert dax_layout_busy_page to XArray Instead of using a pagevec, just use the XArray iterators. Add a conditional rescheduling point which probably should have been there in the original. Signed-off-by: Matthew Wilcox commit cfc93c6c6c963d96ef7081c17fb95d2738a75f55 Author: Matthew Wilcox Date: Wed Mar 28 11:48:03 2018 -0400 dax: Convert dax_insert_pfn_mkwrite to XArray Add some XArray-based helper functions to replace the radix tree based metaphors currently in use. The biggest change is that converted code doesn't see its own lock bit; get_unlocked_entry() always returns an entry with the lock bit clear. So we don't have to mess around loading the current entry and clearing the lock bit; we can just store the unlocked entry that we already have. Signed-off-by: Matthew Wilcox commit ec4907ff69fb16161d9d9370260303a73dd5acde Author: Matthew Wilcox Date: Wed Mar 28 11:01:43 2018 -0400 dax: Hash on XArray instead of mapping Since the XArray is embedded in the struct address_space, its address contains exactly as much entropy as the address of the mapping. This patch is purely preparatory for later patches which will simplify the wait/wake interfaces. Signed-off-by: Matthew Wilcox commit a77d19f46a37c0fed48676739e8e0277f43d74e6 Author: Matthew Wilcox Date: Tue Mar 27 13:39:38 2018 -0400 dax: Rename some functions Remove mentions of 'radix' and 'radix tree'. Simplify some names by dropping the word 'mapping'. Signed-off-by: Matthew Wilcox commit 5ec2d99de7427c84bb7250d23f5acf49a3670a63 Author: Matthew Wilcox Date: Mon Dec 4 20:25:25 2017 -0500 f2fs: Convert to XArray This is a straightforward conversion. Signed-off-by: Matthew Wilcox commit f611ff63751afa421edc1eddf4281de13e082c51 Author: Matthew Wilcox Date: Mon Dec 4 19:33:30 2017 -0500 nilfs2: Convert to XArray This is close to a 1:1 replacement of radix tree APIs with their XArray equivalents. It would be possible to optimise nilfs_copy_back_pages(), but that doesn't seem to be in the performance path. Also, I think it has a pre-existing bug, and I've added a note to that effect in the source code. Signed-off-by: Matthew Wilcox commit 04edf02cdd37a7e2e23ce8de77cb06d22ef2f503 Author: Matthew Wilcox Date: Mon Dec 4 10:46:23 2017 -0500 fs: Convert writeback to XArray A couple of short loops. Signed-off-by: Matthew Wilcox commit ec82e1c1c89ce02d7703b841e6ee7d429feed609 Author: Matthew Wilcox Date: Mon Dec 4 10:40:41 2017 -0500 fs: Convert buffer to XArray Mostly comment fixes, but one use of __xa_set_mark. Signed-off-by: Matthew Wilcox commit 0a943c65e7d7207dce2a63e9d14a925c0d9a7d96 Author: Matthew Wilcox Date: Mon Dec 4 10:37:22 2017 -0500 btrfs: Convert page cache to XArray Signed-off-by: Matthew Wilcox Acked-by: David Sterba commit 7f4446eefe9fbbe68e9543946c9a20f67897ff9b Author: Matthew Wilcox Date: Mon Dec 4 03:31:13 2017 -0500 shmem: Comment fixups Remove the last mentions of radix tree from various comments. Signed-off-by: Matthew Wilcox commit ef3038a573aa8bf2f3797b110f7244b55a0e519c Author: Matthew Wilcox Date: Wed Nov 22 08:37:38 2017 -0500 memfd: Convert memfd_tag_pins to XArray Switch to a batch-processing model like memfd_wait_for_pins() and use the xa_state previously set up by memfd_wait_for_pins(). Signed-off-by: Matthew Wilcox Reviewed-by: Mike Kravetz commit 2313216f861f955c2091f1593ea95d5dc88493f4 Author: Matthew Wilcox Date: Wed Nov 22 11:11:31 2017 -0500 memfd: Convert memfd_wait_for_pins to XArray Simplify the locking by taking the spinlock while we walk the tree on the assumption that many acquires and releases of the lock will be worse than holding the lock while we process an entire batch of pages. Signed-off-by: Matthew Wilcox Reviewed-by: Mike Kravetz commit 7ae3424fb4b5587d9b2db12a4b1040c52073dd5c Author: Matthew Wilcox Date: Mon Dec 4 03:28:00 2017 -0500 shmem: Convert shmem_partial_swap_usage to XArray Simpler code because the xarray takes care of things like the limit and dereferencing the slot. Signed-off-by: Matthew Wilcox commit c121d3bb717ee932caf031c6a7923547f7f83163 Author: Matthew Wilcox Date: Mon Dec 4 03:13:54 2017 -0500 shmem: Convert shmem_free_swap to XArray Since we are conditionally storing NULL in the XArray, we do not need to allocate memory and the GFP flags will be unused. Signed-off-by: Matthew Wilcox commit 7b8d046fba91d62beb8a8f78244aaa3c23a60cdd Author: Matthew Wilcox Date: Fri Dec 1 22:13:06 2017 -0500 shmem: Convert shmem_alloc_hugepage to XArray xa_find() is a slightly easier API to use than radix_tree_gang_lookup_slot() because it contains its own RCU locking. This commit removes the last user of radix_tree_gang_lookup_slot() so remove the function too. Signed-off-by: Matthew Wilcox commit 552446a4166189a8c2515571dd6e25fd64a2dc78 Author: Matthew Wilcox Date: Fri Dec 1 13:25:14 2017 -0500 shmem: Convert shmem_add_to_page_cache to XArray We can use xas_find_conflict() instead of radix_tree_gang_lookup_slot() to find any conflicting entry and combine the three paths through this function into one. Signed-off-by: Matthew Wilcox commit e21a29552fa3f44ea41c53488875015ae70fd7f8 Author: Matthew Wilcox Date: Wed Nov 22 08:36:00 2017 -0500 shmem: Convert find_swap_entry to XArray This is a 1:1 conversion. The major part of this patch is converting the test framework from userspace to kernel space and mirroring the algorithm now used in find_swap_entry(). Signed-off-by: Matthew Wilcox commit a12831bf4293d38518e41b80dd897af0122bb268 Author: Matthew Wilcox Date: Wed Nov 22 08:34:58 2017 -0500 shmem: Convert shmem_confirm_swap to XArray xa_load has its own RCU locking, so we can eliminate it here. Signed-off-by: Matthew Wilcox commit 62f945b6a7b8cda6d1f35941eb374276f7b8749a Author: Matthew Wilcox Date: Fri Nov 17 10:22:37 2017 -0500 shmem: Convert shmem_radix_tree_replace to XArray Rename shmem_radix_tree_replace() to shmem_replace_entry() and convert it to use the XArray API. Signed-off-by: Matthew Wilcox commit 10bbd235859bf483f9a8a4ebe95463d700bae394 Author: Matthew Wilcox Date: Tue Dec 5 17:30:38 2017 -0500 pagevec: Use xa_mark_t Removes sparse warnings. Signed-off-by: Matthew Wilcox commit 67891ffff2f5cf10e89e348207f687a05c8bd2d6 Author: Matthew Wilcox Date: Sun Jun 10 07:34:39 2018 -0400 mm: Convert is_page_cache_freeable to XArray This is just a variable rename and comment change. Signed-off-by: Matthew Wilcox commit 85b392dbace77bf91050e6e07f3dd0f262e4babf Author: Matthew Wilcox Date: Mon Dec 4 15:06:23 2017 -0500 mm: Convert khugepaged_scan_shmem to XArray Slightly shorter and easier to read code. Signed-off-by: Matthew Wilcox commit 77da9389b9d5f07d54fda092d1ab56002ec0019a Author: Matthew Wilcox Date: Mon Dec 4 14:56:08 2017 -0500 mm: Convert collapse_shmem to XArray I found another victim of the radix tree being hard to use. Because there was no call to radix_tree_preload(), khugepaged was allocating radix_tree_nodes using GFP_ATOMIC. I also converted a local_irq_save()/restore() pair to disable()/enable(). Signed-off-by: Matthew Wilcox commit aa5dc07f70c50a3c56bf3fa07bde0b22a95aa381 Author: Matthew Wilcox Date: Mon Dec 4 10:16:10 2017 -0500 mm: Convert huge_memory to XArray Quite a straightforward conversion. Signed-off-by: Matthew Wilcox commit 89eb946a7432be639b452fac295c0c2e5186c4a4 Author: Matthew Wilcox Date: Mon Dec 4 04:35:16 2017 -0500 mm: Convert page migration to XArray Signed-off-by: Matthew Wilcox commit 560d454bae08b5d5a132c5520177dede066334b7 Author: Matthew Wilcox Date: Mon Dec 4 04:30:18 2017 -0500 mm: Convert __do_page_cache_readahead to XArray This one is trivial. Signed-off-by: Matthew Wilcox commit 4e17ec250fce0eba9b70a91c9622da2748a3ec50 Author: Matthew Wilcox Date: Wed Nov 29 08:32:39 2017 -0500 mm: Convert delete_from_swap_cache to XArray Both callers of __delete_from_swap_cache have the swp_entry_t already, so pass that in to make constructing the XA_STATE easier. Signed-off-by: Matthew Wilcox commit 8d93b41c09d1b74f376e3b9779eb3badeb550301 Author: Matthew Wilcox Date: Mon Nov 27 15:46:54 2017 -0500 mm: Convert add_to_swap_cache to XArray Combine __add_to_swap_cache and add_to_swap_cache into one function since there is no more need to preload. Signed-off-by: Matthew Wilcox commit 69b6c1319b6588b65d853055d5336f662f6cb1a2 Author: Matthew Wilcox Date: Sat Nov 25 22:52:46 2017 -0500 mm: Convert truncate to XArray This is essentially xa_cmpxchg() with the locking handled above us, and it doesn't have to handle replacing a NULL entry. Signed-off-by: Matthew Wilcox commit a97e7904c0806309fd77103005bb7820c3f1c5e4 Author: Matthew Wilcox Date: Fri Nov 24 14:24:59 2017 -0500 mm: Convert workingset to XArray We construct an XA_STATE and use it to delete the node with xas_store() rather than adding a special function for this unique use case. Includes a test that simulates this usage for the test suite. Signed-off-by: Matthew Wilcox commit ff9c745b81ff1e482167fd73558450e66ad43a33 Author: Matthew Wilcox Date: Wed Nov 22 11:41:23 2017 -0500 mm: Convert page-writeback to XArray Includes moving mapping_tagged() to fs.h as a static inline, and changing it to return bool. Signed-off-by: Matthew Wilcox commit 8fa8e538e4be359e9042573737632dda35a8700d Author: Matthew Wilcox Date: Tue Jan 16 06:26:49 2018 -0500 page cache: Convert filemap_range_has_page to XArray Instead of calling find_get_pages_range() and putting any reference, use xas_find() to iterate over any entries in the range, skipping the shadow/swap entries. Signed-off-by: Matthew Wilcox commit 22ecdb4f8b7dbfefa3deaf6b144093b5c4cd2aff Author: Matthew Wilcox Date: Mon Dec 4 04:02:00 2017 -0500 page cache: Remove stray radix comment Signed-off-by: Matthew Wilcox commit ef8e5717db01bfa4f425d2cda551a6fccc85529d Author: Matthew Wilcox Date: Mon Dec 4 03:59:45 2017 -0500 page cache: Convert delete_batch to XArray Rename the function from page_cache_tree_delete_batch to just page_cache_delete_batch. Signed-off-by: Matthew Wilcox commit a332125fc3223e1092f765db442b7afb9fd4ecde Author: Matthew Wilcox Date: Thu May 17 00:13:27 2018 -0400 radix tree test suite: Convert regression1 to XArray Now the page cache lookup is using the XArray, let's convert this regression test from the radix tree API to the XArray so it's testing roughly the same thing it was testing before. Signed-off-by: Matthew Wilcox commit 070e807c690bf9a648d4a878f3c68ea9f5f5ce14 Author: Matthew Wilcox Date: Thu May 17 00:08:30 2018 -0400 page cache: Convert filemap_map_pages to XArray Slight change of strategy here; if we have trouble getting hold of a page for whatever reason (eg a compound page is split underneath us), don't spin to stabilise the page, just continue the iteration, like we would if we failed to trylock the page. Since this is a speculative optimisation, it feels like we should allow the process to take an extra fault if it turns out to need this page instead of spending time to pin down a page it may not need. Signed-off-by: Matthew Wilcox commit c1901cd33cf407d77a181f8dd4ffff98041ef480 Author: Matthew Wilcox Date: Wed May 16 23:56:04 2018 -0400 page cache: Convert find_get_entries_tag to XArray Slightly shorter and simpler code. Signed-off-by: Matthew Wilcox commit a6906972fe67fb6f73ba04088f7897227fd1cd8f Author: Matthew Wilcox Date: Wed May 16 18:12:54 2018 -0400 page cache; Convert find_get_pages_range_tag to XArray The 'end' parameter of the xas_for_each iterator avoids a useless iteration at the end of the range. Signed-off-by: Matthew Wilcox commit 3ece58a270cd1e5026282abe778bd50db7a11d08 Author: Matthew Wilcox Date: Wed May 16 18:00:33 2018 -0400 page cache: Convert find_get_pages_contig to XArray There's no direct replacement for radix_tree_for_each_contig() in the XArray API as it's an unusual thing to do. Instead, open-code a loop using xas_next(). This removes the only user of radix_tree_for_each_contig() so delete the iterator from the API and the test suite code for it. Signed-off-by: Matthew Wilcox commit fd1b3cee2a867868d39bb8cbcc4b00c36d07cc01 Author: Matthew Wilcox Date: Wed May 16 17:38:56 2018 -0400 page cache: Convert find_get_pages_range to XArray The 'end' parameter of the xas_for_each iterator avoids a useless iteration at the end of the range. Signed-off-by: Matthew Wilcox commit f280bf092d48ff2db12b4a01127cd855c9e0ffb0 Author: Matthew Wilcox Date: Wed May 16 17:20:45 2018 -0400 page cache: Convert find_get_entries to XArray Slightly shorter and simpler code. Signed-off-by: Matthew Wilcox commit 4c7472c0df2f889df417a37571e622e02b5058fe Author: Matthew Wilcox Date: Wed May 16 16:12:50 2018 -0400 page cache: Convert find_get_entry to XArray Slightly shorter and simpler code. Signed-off-by: Matthew Wilcox commit 5c024e6a4ebc1740db9f0f075aaa476210108a97 Author: Matthew Wilcox Date: Tue Nov 21 09:17:59 2017 -0500 page cache: Convert page deletion to XArray The code is slightly shorter and simpler. Signed-off-by: Matthew Wilcox commit 74d609585d8bd6083bd9d75bc1fd2c0d3851bcc5 Author: Matthew Wilcox Date: Fri Nov 17 10:01:45 2017 -0500 page cache: Add and replace pages using the XArray Use the XArray APIs to add and replace pages in the page cache. This removes two uses of the radix tree preload API and is significantly shorter code. It also removes the last user of __radix_tree_create() outside radix-tree.c itself, so make it static. Signed-off-by: Matthew Wilcox commit 0d3f92966629e536b0c5c2355c1ada8e21c245f6 Author: Matthew Wilcox Date: Tue Nov 21 14:07:06 2017 -0500 page cache: Convert hole search to XArray The page cache offers the ability to search for a miss in the previous or next N locations. Rather than teach the XArray about the page cache's definition of a miss, use xas_prev() and xas_next() to search the page array. This should be more efficient as it does not have to start the lookup from the top for each index. Signed-off-by: Matthew Wilcox commit eb797a8ee0ab4cd03df556980ce7bf167cadaa50 Author: Matthew Wilcox Date: Mon Mar 5 22:46:03 2018 -0500 page cache: Rearrange address_space Change i_pages from a radix_tree_root to an xarray, convert the documentation into kernel-doc format and change the order of the elements to pack them better on 64-bit systems. Signed-off-by: Matthew Wilcox commit f32f004cddf86d63a9c42994bbce9f4e2f07c9fa Author: Matthew Wilcox Date: Wed Jul 4 15:42:46 2018 -0400 ida: Convert to XArray Use the XA_TRACK_FREE ability to track which entries have a free bit, similarly to how it uses the radix tree's IDR_FREE tag. This eliminates the per-cpu ida_bitmap preload, and fixes the memory consumption regression I introduced when making the IDR able to store any pointer. Signed-off-by: Matthew Wilcox commit 371c752dc66948714ee3b66c3306f3ff1ff71d2e Author: Matthew Wilcox Date: Wed Jul 4 10:50:12 2018 -0400 xarray: Track free entries in an XArray Add the optional ability to track which entries in an XArray are free and provide xa_alloc() to replace most of the functionality of the IDR. Signed-off-by: Matthew Wilcox commit 3d5bd6e1a04ae779bc5e0de9ba2e92aa55c40fe8 Author: Matthew Wilcox Date: Mon Nov 27 15:32:05 2017 -0500 xarray: Add MAINTAINERS entry Add myself as XArray and IDR maintainer. Signed-off-by: Matthew Wilcox commit 9f14d4f1f1045f161fd4db8a8e194b7825c2874a Author: Matthew Wilcox Date: Mon Oct 1 14:54:59 2018 -0400 xarray: Add xa_reserve and xa_release This function reserves a slot in the XArray for users which need to acquire multiple locks before storing their entry in the tree and so cannot use a plain xa_store(). Signed-off-by: Matthew Wilcox commit 2264f5132fe45571139727ebdeb78696b35d1506 Author: Matthew Wilcox Date: Mon Dec 4 00:11:48 2017 -0500 xarray: Add xas_create_range This hopefully temporary function is useful for users who have not yet been converted to multi-index entries. Signed-off-by: Matthew Wilcox commit 4e99d4e9579d3b950bf4b38d0d64eb1b9be78761 Author: Matthew Wilcox Date: Fri Jun 1 22:46:02 2018 -0400 xarray: Add xas_for_each_conflict This iterator iterates over each entry that is stored in the index or indices specified by the xa_state. This is intended for use for a conditional store of a multiindex entry, or to allow entries which are about to be removed from the xarray to be disposed of properly. Signed-off-by: Matthew Wilcox commit 64d3e9a9e0cc51957d243dd2b0adc5d74ff5e128 Author: Matthew Wilcox Date: Fri Dec 1 00:06:52 2017 -0500 xarray: Step through an XArray The xas_next and xas_prev functions move the xas index by one position, and adjust the rest of the iterator state to match it. This is more efficient than calling xas_set() as it keeps the iterator at the leaves of the tree instead of walking the iterator from the root each time. Signed-off-by: Matthew Wilcox commit 687149fca1f37c447e5d161e0a4a04cb2c880cb6 Author: Matthew Wilcox Date: Fri Nov 17 08:16:34 2017 -0500 xarray: Destroy an XArray This function frees all the internal memory allocated to the xarray and reinitialises it to be empty. Signed-off-by: Matthew Wilcox commit 80a0a1a9a3cde9b23851e8eb7160e2786549306a Author: Matthew Wilcox Date: Tue Nov 14 16:42:22 2017 -0500 xarray: Extract entries from an XArray The xa_extract function combines the functionality of radix_tree_gang_lookup() and radix_tree_gang_lookup_tagged(). It extracts entries matching the specified filter into a normal array. Signed-off-by: Matthew Wilcox commit b803b42823d0d9e8b6deccf01ffc2aba5d0738df Author: Matthew Wilcox Date: Tue Nov 14 08:30:11 2017 -0500 xarray: Add XArray iterators The xa_for_each iterator allows the user to efficiently walk a range of the array, executing the loop body once for each entry in that range that matches the filter. This commit also includes xa_find() and xa_find_after() which are helper functions for xa_for_each() but may also be useful in their own right. In the xas family of functions, we have xas_for_each(), xas_find(), xas_next_entry(), xas_for_each_tagged(), xas_find_tagged(), xas_next_tagged() and xas_pause(). Signed-off-by: Matthew Wilcox commit 41aec91f55985e7f14ee75fe2f6e7bcfff0d0fae Author: Matthew Wilcox Date: Fri Nov 10 15:34:55 2017 -0500 xarray: Add XArray conditional store operations Like cmpxchg(), xa_cmpxchg will only store to the index if the current entry matches the old entry. It returns the current entry, which is usually more useful than the errno returned by radix_tree_insert(). For the users who really only want the errno, the xa_insert() wrapper provides a more convenient calling convention. Signed-off-by: Matthew Wilcox commit 58d6ea3085f2e53714810a513c61629f6d2be0a6 Author: Matthew Wilcox Date: Fri Nov 10 15:15:08 2017 -0500 xarray: Add XArray unconditional store operations xa_store() differs from radix_tree_insert() in that it will overwrite an existing element in the array rather than returning an error. This is the behaviour which most users want, and those that want more complex behaviour generally want to use the xas family of routines anyway. For memory allocation, xa_store() will first attempt to request memory from the slab allocator; if memory is not immediately available, it will drop the xa_lock and allocate memory, keeping a pointer in the xa_state. It does not use the per-CPU cache, although those will continue to exist until all radix tree users are converted to the xarray. This patch also includes xa_erase() and __xa_erase() for a streamlined way to store NULL. Since there is no need to allocate memory in order to store a NULL in the XArray, we do not need to trouble the user with deciding what memory allocation flags to use. Signed-off-by: Matthew Wilcox commit 9b89a0355144685a787b0dc5bcf7bdd6f2d02968 Author: Matthew Wilcox Date: Fri Nov 10 09:34:31 2017 -0500 xarray: Add XArray marks XArray marks are like the radix tree tags, only slightly more strongly typed. They are renamed in order to distinguish them from tagged pointers. This commit adds the basic get/set/clear operations. Signed-off-by: Matthew Wilcox commit ad3d6c7263e368abdc151e1cc13dc78aa39cc7a7 Author: Matthew Wilcox Date: Tue Nov 7 14:57:46 2017 -0500 xarray: Add XArray load operation The xa_load function brings with it a lot of infrastructure; xa_empty(), xa_is_err(), and large chunks of the XArray advanced API that are used to implement xa_load. As the test-suite demonstrates, it is possible to use the XArray functions on a radix tree. The radix tree functions depend on the GFP flags being stored in the root of the tree, so it's not possible to use the radix tree functions on an XArray. Signed-off-by: Matthew Wilcox commit 992a8e60e3fea77c55589fc1c5af2304e78a5baa Author: Matthew Wilcox Date: Thu Nov 23 22:57:20 2017 -0500 xarray: Add documentation This is documentation on how to use the XArray, not details about its internal implementation. Signed-off-by: Matthew Wilcox Acked-by: Josef Bacik commit 01959dfe771c6893365482ec78dc1d9cbbbe6de8 Author: Matthew Wilcox Date: Thu Nov 9 09:23:56 2017 -0500 xarray: Define struct xa_node This is a direct replacement for struct radix_tree_node. A couple of struct members have changed name, so convert those. Use a #define so that radix tree users continue to work without change. Signed-off-by: Matthew Wilcox Reviewed-by: Josef Bacik commit f8d5d0cc145cc21bfc56ef807dc28102aebbf228 Author: Matthew Wilcox Date: Tue Nov 7 16:30:10 2017 -0500 xarray: Add definition of struct xarray This is a direct replacement for struct radix_tree_root. Some of the struct members have changed name; convert those, and use a #define so that radix_tree users continue to work without change. Signed-off-by: Matthew Wilcox Reviewed-by: Josef Bacik commit 79a15f4974ce9613134648e6e1dd0eb7ca199de6 Author: Florian Fainelli Date: Fri Oct 19 11:12:32 2018 -0700 spi: Allow building SPI_BCM63XX_HSSPI on ARM-based SoCs ARM-based 63xx DSL platforms have the spi-bcm63xx-hsspi controller present, allow using this driver there as well. Signed-off-by: Florian Fainelli Signed-off-by: Mark Brown commit ae2399c48c023ef8a6e0d260950420296252b3e9 Merge: 9ef688410506 cdf6b11daa77 1c96a2f67cd9 Author: Mark Brown Date: Sun Oct 21 12:07:26 2018 +0100 Merge remote-tracking branches 'regmap/topic/noinc' and 'regmap/topic/single-rw' into regmap-next commit 9ef688410506b8702010765e98a5c20a93561d2e Merge: 35a7f35ad1b1 950937624079 Author: Mark Brown Date: Sun Oct 21 12:07:24 2018 +0100 Merge branch 'regmap-4.20' into regmap-next commit c5d09485def41cab9e75ba23abbf87080183183c Author: Lucas Tanure Date: Fri Oct 19 17:44:22 2018 +0100 ASoC: wm2000: Remove wm2000_read helper function The return type "unsigned int" was used by the wm2000_read() function despite of the aspect that it will eventually return a negative error code. The resulting function doesn't add much to the code, so replace wm2000_read with regmap_read. Signed-off-by: Lucas Tanure Acked-by: Charles Keepax Signed-off-by: Mark Brown commit 574c0cfbc7159c5a5a59d5608e422c95917a9b7c Merge: cbe3f898d159 6e301a8e56e4 Author: Paolo Bonzini Date: Sun Oct 21 11:47:01 2018 +0200 Merge tag 'kvm-ppc-next-4.20-2' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc into HEAD Second PPC KVM update for 4.20. Two commits; one is an optimization for PCI pass-through, and the other disables nested HV-KVM on early POWER9 chips that need a particular hardware bug workaround. commit 162041425193602b15774c61740ad8e7dc157df3 Author: Dave Hansen Date: Fri Oct 19 07:08:42 2018 -0700 x86/mm: Kill stray kernel fault handling comment I originally had matching user and kernel comments, but the kernel one got improved. Some errant conflict resolution kicked the commment somewhere wrong. Kill it. Reported-by: Eric W. Biederman Signed-off-by: Dave Hansen Cc: Andy Lutomirski Cc: Jann Horn Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Sean Christopherson Cc: Thomas Gleixner Fixes: aa37c51b94 ("x86/mm: Break out user address space handling") Link: http://lkml.kernel.org/r/20181019140842.12F929FA@viggo.jf.intel.com Signed-off-by: Ingo Molnar commit 0f99153def98134403c9149128e59d3e1786cf04 Author: Christophe Leroy Date: Fri Oct 19 06:12:50 2018 +0000 powerpc/msi: Fix compile error on mpc83xx mpic_get_primary_version() is not defined when not using MPIC. The compile error log like: arch/powerpc/sysdev/built-in.o: In function `fsl_of_msi_probe': fsl_msi.c:(.text+0x150c): undefined reference to `fsl_mpic_primary_get_version' Signed-off-by: Jia Hongtao Signed-off-by: Scott Wood Reported-by: Radu Rendec Fixes: 807d38b73b6 ("powerpc/mpic: Add get_version API both for internal and external use") Cc: stable@vger.kernel.org Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman commit b6aeddea74b08518289fc86545297cf18a0b53a7 Author: Michael Ellerman Date: Fri Oct 19 16:19:10 2018 +1100 powerpc: Fix stack protector crashes on CPU hotplug Recently in commit 7241d26e8175 ("powerpc/64: properly initialise the stackprotector canary on SMP.") we fixed a crash with stack protector on SMP by initialising the stack canary in cpu_idle_thread_init(). But this can also causes crashes, when a CPU comes back online after being offline: Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: pnv_smp_cpu_kill_self+0x2a0/0x2b0 CPU: 1 PID: 0 Comm: swapper/1 Not tainted 4.19.0-rc3-gcc-7.3.1-00168-g4ffe713b7587 #94 Call Trace: dump_stack+0xb0/0xf4 (unreliable) panic+0x144/0x328 __stack_chk_fail+0x2c/0x30 pnv_smp_cpu_kill_self+0x2a0/0x2b0 cpu_die+0x48/0x70 arch_cpu_idle_dead+0x20/0x40 do_idle+0x274/0x390 cpu_startup_entry+0x38/0x50 start_secondary+0x5e4/0x600 start_secondary_prolog+0x10/0x14 Looking at the stack we see that the canary value in the stack frame doesn't match the canary in the task/paca. That is because we have reinitialised the task/paca value, but then the CPU coming online has returned into a function using the old canary value. That causes the comparison to fail. Instead we can call boot_init_stack_canary() from start_secondary() which never returns. This is essentially what the generic code does in cpu_startup_entry() under #ifdef X86, we should make that non-x86 specific in a future patch. Fixes: 7241d26e8175 ("powerpc/64: properly initialise the stackprotector canary on SMP.") Reported-by: Joel Stanley Signed-off-by: Michael Ellerman Reviewed-by: Christophe Leroy commit c5fa5d602221362f8341ecd9e32d83194abf5bd9 Author: Quentin Monnet Date: Sat Oct 20 22:58:44 2018 +0100 selftests/bpf: fix return value comparison for tests in test_libbpf.sh The return value for each test in test_libbpf.sh is compared with if (( $? == 0 )) ; then ... This works well with bash, but not with dash, that /bin/sh is aliased to on some systems (such as Ubuntu). Let's replace this comparison by something that works on both shells. Signed-off-by: Quentin Monnet Reviewed-by: Jakub Kicinski Signed-off-by: Alexei Starovoitov commit 76b5e30397ebe9f9dd58511d32945018f8196be9 Merge: 2576b96757e4 3dca21156b5f Author: Alexei Starovoitov Date: Sat Oct 20 23:13:33 2018 -0700 Merge branch 'misc-improvements' Daniel Borkmann says: ==================== Last batch of misc patches I had in queue: first one removes some left-over bits from ULP, second is a fix in the verifier where we wrongly use register number as type to fetch the string for the dump, third disables xadd on flow keys and subsequent one removes the flow key type from check_helper_mem_access() as they cannot be passed into any helper as of today. Next one lets map push, pop, peek avoid having to go through retpoline, and last one has a couple of minor fixes and cleanups for the ring buffer walk. ==================== Signed-off-by: Alexei Starovoitov commit 3dca21156b5f809510e8c3efe7f1046e27242e3d Author: Daniel Borkmann Date: Sun Oct 21 02:09:28 2018 +0200 bpf, libbpf: simplify and cleanup perf ring buffer walk Simplify bpf_perf_event_read_simple() a bit and fix up some minor things along the way: the return code in the header is not of type int but enum bpf_perf_event_ret instead. Once callback indicated to break the loop walking event data, it also needs to be consumed in data_tail since it has been processed already. Moreover, bpf_perf_event_print_t callback should avoid void * as we actually get a pointer to struct perf_event_header and thus applications can make use of container_of() to have type checks. The walk also doesn't have to use modulo op since the ring size is required to be power of two. Signed-off-by: Daniel Borkmann Signed-off-by: Alexei Starovoitov commit 84430d4232c36cb858564374f839d233fd6f623a Author: Daniel Borkmann Date: Sun Oct 21 02:09:27 2018 +0200 bpf, verifier: avoid retpoline for map push/pop/peek operation Extend prior work from 09772d92cd5a ("bpf: avoid retpoline for lookup/update/delete calls on maps") to also apply to the recently added map helpers that perform push/pop/peek operations so that the indirect call can be avoided. Signed-off-by: Daniel Borkmann Signed-off-by: Alexei Starovoitov commit ad38911dcdb6978a415db65b3e00e0f3fcd9edfc Author: Daniel Borkmann Date: Sun Oct 21 02:09:26 2018 +0200 bpf, verifier: remove unneeded flow key in check_helper_mem_access They PTR_TO_FLOW_KEYS is not used today to be passed into a helper as memory, so it can be removed from check_helper_mem_access(). Signed-off-by: Daniel Borkmann Signed-off-by: Alexei Starovoitov commit 4b5defdec398491c5b301a6255cdf468eedfb228 Author: Daniel Borkmann Date: Sun Oct 21 02:09:25 2018 +0200 bpf, verifier: reject xadd on flow key memory We should not enable xadd operation for flow key memory if not needed there anyway. There is no such issue as described in the commit f37a8cb84cce ("bpf: reject stores into ctx via st and xadd") since there's no context rewriter for flow keys today, but it also shouldn't become part of the user facing behavior to allow for it. After patch: 0: (79) r7 = *(u64 *)(r1 +144) 1: (b7) r3 = 4096 2: (db) lock *(u64 *)(r7 +0) += r3 BPF_XADD stores into R7 flow_keys is not allowed Signed-off-by: Daniel Borkmann Signed-off-by: Alexei Starovoitov commit 2a159c6f82381a458bc56e7e202b6bee57a2ccb7 Author: Daniel Borkmann Date: Sun Oct 21 02:09:24 2018 +0200 bpf, verifier: fix register type dump in xadd and st Using reg_type_str[insn->dst_reg] is incorrect since insn->dst_reg contains the register number but not the actual register type. Add a small reg_state() helper and use it to get to the type. Also fix up the test_verifier test cases that have an incorrect errstr. Fixes: 9d2be44a7f33 ("bpf: Reuse canonical string formatter for ctx errs") Signed-off-by: Daniel Borkmann Signed-off-by: Alexei Starovoitov commit c16ee04c9b305d57719344922c4d48379e206a79 Author: Daniel Borkmann Date: Sun Oct 21 02:09:23 2018 +0200 ulp: remove uid and user_visible members They are not used anymore and therefore should be removed. Signed-off-by: Daniel Borkmann Signed-off-by: Alexei Starovoitov commit 0400d65501930e6e99848572b3818914c3b94256 Author: Camelia Groza Date: Thu Sep 20 14:47:01 2018 +0300 powerpc/dts/fsl: t2080rdb: reorder the Cortina PHY XFI lanes According to the T2080RDB schematics, for the CS4315 PHY, the XFI 1 lane is connected to SFP 2 and the XFI 2 lane is connected to SFP 1. Change the device tree to reflect the correct PHY order and port association. Signed-off-by: Camelia Groza Signed-off-by: Scott Wood commit d459d853c2edc793135e4bfa4e345c758f1cc859 Author: Dennis Zhou Date: Sat Oct 20 14:56:12 2018 -0400 blkcg: reassociate bios when make_request() is called recursively When submitting a bio, multiple recursive calls to make_request() may occur. This causes the initial associate done in blkcg_bio_issue_check() to be incorrect and reference the prior request_queue. This introduces a helper to do reassociation when make_request() is recursively called. Fixes: a7b39b4e961c ("blkcg: always associate a bio with a blkg") Reported-by: Valdis Kletnieks Signed-off-by: Dennis Zhou Tested-by: Valdis Kletnieks Signed-off-by: Jens Axboe commit b2c3fa546705944e748666b474ffdaebaec0569f Author: Dennis Zhou Date: Sat Oct 20 14:56:11 2018 -0400 blkcg: fix edge case for blk_get_rl() under memory pressure It is possible for blkg creation to fail when in blk_get_rl(). In this situation, the fallback logic returns the nearest created blkg. There is however special handling for the request_list for the root blkcg. This fixes the missing edge case from the earlier series changing blk_get_rl(). Fixes: e2b0989954ae ("blkcg: cleanup and make blk_get_rl use blkg_lookup_create") Signed-off-by: Dennis Zhou Signed-off-by: Jens Axboe commit 2576b96757e481fb40f097517763ccf75f935037 Merge: 5032d079909d 84fbfe026aca Author: Daniel Borkmann Date: Sat Oct 20 21:37:12 2018 +0200 Merge branch 'bpf-msg-push-data' John Fastabend says: ==================== This series adds a new helper bpf_msg_push_data to be used by sk_msg programs. The helper can be used to insert extra bytes into the message that can then be used by the program as metadata tags among other things. The first patch adds the helper, second patch the libbpf support, and last patch updates test_sockmap to run msg_push_data tests. v2: rebase after queue map and in filter.c convert int -> u32 ==================== Signed-off-by: Daniel Borkmann commit 84fbfe026acaa6d91e2f71f1635992bf472e2496 Author: John Fastabend Date: Fri Oct 19 19:56:51 2018 -0700 bpf: test_sockmap add options to use msg_push_data Add options to run msg_push_data, this patch creates two more flags in test_sockmap that can be used to specify the offset and length of bytes to be added. The new options are --txmsg_start_push to specify where bytes should be inserted and --txmsg_end_push to specify how many bytes. This is analagous to the options that are used to pull data, --txmsg_start and --txmsg_end. In addition to adding the options tests are added to the test suit to run the tests similar to what was done for msg_pull_data. Signed-off-by: John Fastabend Signed-off-by: Daniel Borkmann commit f908d26b2c41d9a924371099c4979e4b5d385165 Author: John Fastabend Date: Fri Oct 19 19:56:50 2018 -0700 bpf: libbpf support for msg_push_data Add support for new bpf_msg_push_data in libbpf. Signed-off-by: John Fastabend Signed-off-by: Daniel Borkmann commit 6fff607e2f14bd7c63c06c464a6f93b8efbabe28 Author: John Fastabend Date: Fri Oct 19 19:56:49 2018 -0700 bpf: sk_msg program helper bpf_msg_push_data This allows user to push data into a msg using sk_msg program types. The format is as follows, bpf_msg_push_data(msg, offset, len, flags) this will insert 'len' bytes at offset 'offset'. For example to prepend 10 bytes at the front of the message the user can, bpf_msg_push_data(msg, 0, 10, 0); This will invalidate data bounds so BPF user will have to then recheck data bounds after calling this. After this the msg size will have been updated and the user is free to write into the added bytes. We allow any offset/len as long as it is within the (data, data_end) range. However, a copy will be required if the ring is full and its possible for the helper to fail with ENOMEM or EINVAL errors which need to be handled by the BPF program. This can be used similar to XDP metadata to pass data between sk_msg layer and lower layers. Signed-off-by: John Fastabend Signed-off-by: Daniel Borkmann commit d92060bc69233a8175a0c2bfa0d2bce123cace2d Author: Florian Westphal Date: Sat Oct 20 12:25:27 2018 +0200 r8169: add support for Byte Queue Limits This patch is basically a resubmit of 1e918876853a ("r8169: add support for Byte Queue Limits") which was reverted later. The problems causing the revert seem to have been fixed in the meantime. Only change to the original patch is that the call to netdev_reset_queue was moved to rtl8169_tx_clear. The Tested-by refers to a system using the RTL8168evl chip version. Signed-off-by: Florian Westphal Signed-off-by: Heiner Kallweit Tested-by: Holger Hoffstätte Signed-off-by: David S. Miller commit 38caff5a445bf7cc6b312b9925320ae969b796c2 Author: Heiner Kallweit Date: Thu Oct 18 22:19:28 2018 +0200 r8169: handle all interrupt events in the hard irq handler Having a separate "slow event" handler isn't needed because all interrupt events trigger asynchronous activity. And in case of SYSErr we have bigger problems than performance anyway. This patch also allows to get rid of acking interrupt events in the NAPI poll callback. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 342149c557e16d72aefa440143abc8560dc687cc Merge: a4efbaf62255 c614ca3f7476 Author: David S. Miller Date: Sat Oct 20 12:33:48 2018 -0700 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-10-20 Here's one more bluetooth-next pull request for the 4.20 kernel. - Added new USB ID for QCA_ROME controller - Added debug trace support from QCA wcn3990 controllers - Updated L2CAP to conform to latest Errata Service Release - Fix binding to non-removable BCM43430 devices Please let me know if there are any issues pulling. Thanks. ==================== Signed-off-by: David S. Miller commit a4efbaf6225577fd40940a4542d69bb5e79f88ad Merge: 4c16128b6271 af510ebd8913 Author: David S. Miller Date: Sat Oct 20 12:32:44 2018 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next Pablo Neira Ayuso says: ==================== Netfilter updates for net-next The following patchset contains Netfilter updates for your net-next tree: 1) Use lockdep_is_held() in ipset_dereference_protected(), from Lance Roy. 2) Remove unused variable in cttimeout, from YueHaibing. 3) Add ttl option for nft_osf, from Fernando Fernandez Mancera. 4) Use xfrm family to deal with IPv6-in-IPv4 packets from nft_xfrm, from Florian Westphal. 5) Simplify xt_osf_match_packet(). 6) Missing ct helper alias definition in snmp_trap helper, from Taehee Yoo. 7) Remove unnecessary parameter in nf_flow_table_cleanup(), from Taehee Yoo. 8) Remove unused variable definitions in nft_{dup,fwd}, from Weongyo Jeong. 9) Remove empty net/netfilter/nfnetlink_log.h file, from Taehee Yoo. 10) Revert xt_quota updates remain option due to problems in the listing path for 32-bit arches, from Maze. ==================== Signed-off-by: David S. Miller commit e543b3a620296a18aaf0d66475b68d6a85e8fcd4 Author: Helge Deller Date: Fri Oct 19 22:13:49 2018 +0200 parisc: Retrieve and display the PDC PAT capabilities Signed-off-by: Helge Deller commit 4c5fe5db1ac6420ec9c0a62ab764572ef79472b3 Author: John David Anglin Date: Fri Oct 19 20:48:12 2018 -0400 parisc: Optimze cache flush algorithms The attached patch implements three optimizations: 1) Loops in flush_user_dcache_range_asm, flush_kernel_dcache_range_asm, purge_kernel_dcache_range_asm, flush_user_icache_range_asm, and flush_kernel_icache_range_asm are unrolled to reduce branch overhead. 2) The static branch prediction for cmpb instructions in pacache.S have been reviewed and the operand order adjusted where necessary. 3) For flush routines in cache.c, we purge rather flush when we have no context. The pdc instruction at level 0 is not required to write back dirty lines to memory. This provides a performance improvement over the fdc instruction if the feature is implemented. Version 2 adds alternative patching. The patch provides an average improvement of about 2%. Signed-off-by: John David Anglin Signed-off-by: Helge Deller commit 5a23237f14c5f35afbbf9d4a5bdfb2421a7af665 Author: John David Anglin Date: Fri Oct 19 20:33:29 2018 -0400 parisc: Remove pte_inserted define The attached change removes the pte_inserted from pgtable.h. As a result, we always flush the TLB entry when the associated page table entry is changed. This change doesn't impact performance signifcantly and it may catch some cases where the TLB needs flushing but wasn't. Signed-off-by: John David Anglin Signed-off-by: Helge Deller commit 663569db6476795c7955289529ea0154e3d768bf Merge: 7e4e95897663 1ce78ce09430 Author: Bjorn Helgaas Date: Sat Oct 20 11:45:56 2018 -0500 Merge branch 'remotes/lorenzo/pci/tools' - Convert pcitest build process to that used by other tools (iio, perf, etc) (Gustavo Pimentel) * remotes/lorenzo/pci/tools: tools: PCI: Change pcitest compiling process tools: PCI: Fix compilation warnings commit 7e4e95897663595323f3bbcf5b75d5bcaf5c1401 Merge: 4dd4d9963677 dc8af3a827df Author: Bjorn Helgaas Date: Sat Oct 20 11:45:55 2018 -0500 Merge branch 'remotes/lorenzo/pci/vmd' - Detach VMD resources after stopping root bus to prevent orphan resources (Jon Derrick) * remotes/lorenzo/pci/vmd: PCI: vmd: Detach resources after stopping root bus commit 4dd4d99636778ab610ad7ccb96a20b015991bdcf Merge: fc23af0cb1ef 031337ace2d1 Author: Bjorn Helgaas Date: Sat Oct 20 11:45:53 2018 -0500 Merge branch 'remotes/lorenzo/pci/mediatek' - Fix Mediatek unchecked return value from devm_pci_remap_iospace() (Gustavo A. R. Silva) - Fix Mediatek endpoint/port matching logic (Honghui Zhang) - Change Mediatek Root Port Class Code to PCI_CLASS_BRIDGE_PCI (Honghui Zhang) - Remove redundant Mediatek PM domain check (Honghui Zhang) - Convert Mediatek to pci_host_probe() (Honghui Zhang) - Fix Mediatek MSI enablement (Honghui Zhang) - Add Mediatek system PM support for MT2712 and MT7622 (Honghui Zhang) - Add Mediatek loadable module support (Honghui Zhang) * remotes/lorenzo/pci/mediatek: PCI: mediatek: Add loadable kernel module support PCI: mediatek: Add system PM support for MT2712 and MT7622 PCI: mediatek: Fixup MSI enablement logic by enabling MSI before clocks PCI: mediatek: Convert to use pci_host_probe() PCI: mediatek: Remove the redundant dev->pm_domain check PCI: mediatek: Fix class type for MT7622 to PCI_CLASS_BRIDGE_PCI PCI: mediatek: Fix mtk_pcie_find_port() endpoint/port matching logic PCI: mediatek: Fix unchecked return value commit fc23af0cb1efa4c5b0c7ecd226d827e4824a4dcf Merge: deab1f261cd3 261de72f0169 Author: Bjorn Helgaas Date: Sat Oct 20 11:45:51 2018 -0500 Merge branch 'remotes/lorenzo/pci/keystone' - Quirk Keystone K2G to limit MRRS to 256 (Kishon Vijay Abraham I) - Update Keystone to use MRRS quirk for host bridge instead of open coding (Kishon Vijay Abraham I) - Refactor Keystone link establishment (Kishon Vijay Abraham I) - Simplify and speed up Keystone link training (Kishon Vijay Abraham I) - Remove unused Keystone host_init argument (Kishon Vijay Abraham I) - Merge Keystone driver files into one (Kishon Vijay Abraham I) - Remove redundant Keystone platform_set_drvdata() (Kishon Vijay Abraham I) - Rename Keystone functions for uniformity (Kishon Vijay Abraham I) - Add Keystone device control module DT binding (Kishon Vijay Abraham I) - Use SYSCON API to get Keystone control module device IDs (Kishon Vijay Abraham I) - Clean up Keystone PHY handling (Kishon Vijay Abraham I) - Use runtime PM APIs to enable Keystone clock (Kishon Vijay Abraham I) - Clean up Keystone config space access checks (Kishon Vijay Abraham I) - Get Keystone outbound window count from DT (Kishon Vijay Abraham I) - Clean up Keystone outbound window configuration (Kishon Vijay Abraham I) - Clean up Keystone DBI setup (Kishon Vijay Abraham I) - Clean up Keystone ks_pcie_link_up() (Kishon Vijay Abraham I) - Fix Keystone IRQ status checking (Kishon Vijay Abraham I) - Add debug messages for all Keystone errors (Kishon Vijay Abraham I) - Clean up Keystone includes and macros (Kishon Vijay Abraham I) * remotes/lorenzo/pci/keystone: PCI: keystone: Cleanup macros defined in pci-keystone.c PCI: keystone: Reorder header file in alphabetical order PCI: keystone: Add debug error message for all errors PCI: keystone: Use ERR_IRQ_STATUS instead of ERR_IRQ_STATUS_RAW to get interrupt status PCI: keystone: Cleanup ks_pcie_link_up() PCI: keystone: Cleanup set_dbi_mode() and get_dbi_mode() PCI: keystone: Cleanup outbound window configuration PCI: keystone: Get number of outbound windows from DT PCI: keystone: Cleanup configuration space access PCI: keystone: Invoke runtime PM APIs to enable clock PCI: keystone: Cleanup PHY handling PCI: keystone: Use SYSCON APIs to get device ID from control module dt-bindings: PCI: keystone: Add bindings to get device control module PCI: keystone: Use uniform function naming convention PCI: keystone: Remove redundant platform_set_drvdata() invocation PCI: keystone: Merge pci-keystone-dw.c and pci-keystone.c PCI: keystone: Remove unused argument from ks_dw_pcie_host_init() PCI: keystone: Do not initiate link training multiple times PCI: keystone: Move dw_pcie_setup_rc() out of ks_pcie_establish_link() PCI: keystone: Use quirk to set MRRS for PCI host bridge PCI: keystone: Use quirk to limit MRRS for K2G commit deab1f261cd34ed1c0d9b6558c6ce90fd49a431e Merge: 525fde075039 4da6b4480766 Author: Bjorn Helgaas Date: Sat Oct 20 11:45:50 2018 -0500 Merge branch 'remotes/lorenzo/pci/iproc' - Remove iproc PAXC slot check to allow VF support (Jitendra Bhivare) * remotes/lorenzo/pci/iproc: PCI: iproc: Remove PAXC slot check to allow VF support commit 525fde0750394dd3874937361570764f6a368e33 Merge: b7c18dc06ad1 f4e833ba2a95 Author: Bjorn Helgaas Date: Sat Oct 20 11:45:49 2018 -0500 Merge branch 'remotes/lorenzo/pci/dwc' - Support 100MHz/200MHz refclocks for i.MX6 (Lucas Stach) - Add initial power management for i.MX7 (Leonard Crestez) - Add PME_Turn_Off support for i.MX7 (Leonard Crestez) - Fix qcom runtime power management error handling (Bjorn Andersson) - Update TI dra7xx unaligned access errata workaround for host mode as well as endpoint mode (Vignesh R) - Fix kirin section mismatch warning (Nathan Chancellor) * remotes/lorenzo/pci/dwc: PCI: imx: Add PME_Turn_Off support ARM: dts: imx7d: Add turnoff reset dt-bindings: imx6q-pcie: Add turnoff reset for imx7d reset: imx7: Add PCIE_CTRL_APPS_TURNOFF PCI: kirin: Fix section mismatch warning PCI: dwc: pci-dra7xx: Enable errata i870 for both EP and RC mode dt-bindings: PCI: dra7xx: Add bindings for unaligned access in host mode PCI: qcom: Fix error handling in runtime PM support PCI: imx: Initial imx7d pm support PCI: imx6: Support MPLL reconfiguration for 100MHz and 200MHz refclock commit b7c18dc06ad12059abc0961522d446553f8a755b Merge: 61ce5809570b 8a3ebd8de328 Author: Bjorn Helgaas Date: Sat Oct 20 11:45:47 2018 -0500 Merge branch 'remotes/lorenzo/pci/controller-misc' - Remove redundant controller tests for "device_type == pci" (Rob Herring) - Document R-Car E3 (R8A77990) bindings (Tho Vu) - Add device tree support for R-Car r8a7744 (Biju Das) - Drop unused mvebu PCIe capability code (Thomas Petazzoni) - Add shared PCI bridge emulation code (Thomas Petazzoni) - Convert mvebu to use shared PCI bridge emulation (Thomas Petazzoni) - Add aardvark Root Port emulation (Thomas Petazzoni) * remotes/lorenzo/pci/controller-misc: PCI: aardvark: Implement emulated root PCI bridge config space PCI: mvebu: Convert to PCI emulated bridge config space PCI: mvebu: Drop unused PCI express capability code PCI: Introduce PCI bridge emulated config space common logic dt-bindings: PCI: rcar: Add device tree support for r8a7744 dt-bindings: PCI: rcar: Add device tree support for r8a7744 DT: pci: rcar-pci: document R8A77990 bindings PCI: Remove unnecessary check of device_type == pci commit 61ce5809570b38710f08ebfcd44a5b067eeee77d Merge: 6aa0459e75b7 e81e36a96bb5 Author: Bjorn Helgaas Date: Sat Oct 20 11:45:45 2018 -0500 Merge branch 'remotes/lorenzo/pci/cadence' - Fix Cadence PHY handling during probe (Alan Douglas) - Signal Cadence Endpoint interrupts via AXI region 0 instead of last region (Alan Douglas) - Write Cadence Endpoint MSI interrupts with 32 bits of data (Alan Douglas) * remotes/lorenzo/pci/cadence: PCI: cadence: Write MSI data with 32bits PCI: cadence: Use AXI region 0 to signal interrupts from EP PCI: cadence: Correct probe behaviour when failing to get PHY commit 6aa0459e75b71eee94c91f414c45a2d724997154 Merge: eff81b6f7b1e 4f475e8e0a6d Author: Bjorn Helgaas Date: Sat Oct 20 11:45:44 2018 -0500 Merge branch 'pci/host-vmd' - Fix VMD AERSID quirk Device ID matching (Jon Derrick) * pci/host-vmd: x86/PCI: Apply VMD's AERSID fixup generically commit eff81b6f7b1ecad7e8cdf4f44b010b54ef438864 Merge: 1734715493e0 4c243716e77d Author: Bjorn Helgaas Date: Sat Oct 20 11:45:35 2018 -0500 Merge branch 'pci/virtualization' - Cache VF config space size to optimize enumeration of many VFs (KarimAllah Ahmed) - Remove unnecessary include (Bjorn Helgaas) * pci/virtualization: PCI/IOV: Remove unnecessary include of PCI/IOV: Use VF0 cached config space size for other VFs commit 1734715493e010d034ae8d65c9a228ee7ad24a08 Merge: 0af616639513 c6925093d0b2 Author: Bjorn Helgaas Date: Sat Oct 20 11:45:33 2018 -0500 Merge branch 'pci/peer-to-peer' - Add PCI support for peer-to-peer DMA (Logan Gunthorpe) - Add sysfs group for PCI peer-to-peer memory statistics (Logan Gunthorpe) - Add PCI peer-to-peer DMA scatterlist mapping interface (Logan Gunthorpe) - Add PCI configfs/sysfs helpers for use by peer-to-peer users (Logan Gunthorpe) - Add PCI peer-to-peer DMA driver writer's documentation (Logan Gunthorpe) - Add block layer flag to indicate driver support for PCI peer-to-peer DMA (Logan Gunthorpe) - Map Infiniband scatterlists for peer-to-peer DMA if they contain P2P memory (Logan Gunthorpe) - Register nvme-pci CMB buffer as PCI peer-to-peer memory (Logan Gunthorpe) - Add nvme-pci support for PCI peer-to-peer memory in requests (Logan Gunthorpe) - Use PCI peer-to-peer memory in nvme (Stephen Bates, Steve Wise, Christoph Hellwig, Logan Gunthorpe) * pci/peer-to-peer: nvmet: Optionally use PCI P2P memory nvmet: Introduce helper functions to allocate and free request SGLs nvme-pci: Add support for P2P memory in requests nvme-pci: Use PCI p2pmem subsystem to manage the CMB IB/core: Ensure we map P2P memory correctly in rdma_rw_ctx_[init|destroy]() block: Add PCI P2P flag for request queue PCI/P2PDMA: Add P2P DMA driver writer's documentation docs-rst: Add a new directory for PCI documentation PCI/P2PDMA: Introduce configfs/sysfs enable attribute helpers PCI/P2PDMA: Add PCI p2pmem DMA mappings to adjust the bus offset PCI/P2PDMA: Add sysfs group to display p2pmem stats PCI/P2PDMA: Support peer-to-peer memory commit 0af6166395130b87713550c84c9518332f27cc28 Merge: ee8360fdafac 4c1ef72e9b71 Author: Bjorn Helgaas Date: Sat Oct 20 11:45:31 2018 -0500 Merge branch 'pci/msi' - Avoid panic when drivers enable MSI/MSI-X twice (Tonghao Zhang) * pci/msi: PCI/MSI: Warn and return error if driver enables MSI/MSI-X twice commit ee8360fdafac54eefd0df69fbd99338896cf806b Merge: 20634dc361e1 fe73c23d7a09 Author: Bjorn Helgaas Date: Sat Oct 20 11:45:30 2018 -0500 Merge branch 'pci/misc' - Remove unused Netronome NFP32xx Device IDs (Jakub Kicinski) - Use bitmap_zalloc() for dma_alias_mask (Andy Shevchenko) - Add switch fall-through annotations (Gustavo A. R. Silva) - Remove unused Switchtec quirk variable (Joshua Abraham) - Fix pci.c kernel-doc warning (Randy Dunlap) - Remove trivial PCI wrappers for DMA APIs (Christoph Hellwig) - Add Intel GPU device IDs to spurious interrupt quirk (Bin Meng) - Run Switchtec DMA aliasing quirk only on NTB endpoints to avoid useless dmesg errors (Logan Gunthorpe) - Update Switchtec NTB documentation (Wesley Yung) - Remove redundant "default n" from Kconfig (Bartlomiej Zolnierkiewicz) * pci/misc: PCI: pcie: Remove redundant 'default n' from Kconfig NTB: switchtec_ntb: Update switchtec documentation with prerequisites for NTB PCI: Fix Switchtec DMA aliasing quirk dmesg noise PCI: Add macro for Switchtec quirk declarations PCI: Add Device IDs for Intel GPU "spurious interrupt" quirk PCI: Remove pci_set_dma_max_seg_size() PCI: Remove pci_set_dma_seg_boundary() PCI: Remove pci_unmap_addr() wrappers for DMA API PCI / ACPI: Mark expected switch fall-through PCI: Remove set but unused variable PCI: Fix pci.c kernel-doc parameter warning PCI: Allocate dma_alias_mask with bitmap_zalloc() PCI: Remove unused NFP32xx IDs commit 20634dc361e1c5fe2dae380a7d0a21ca7f32c4f7 Merge: de468b755464 e51cd9ce5dd3 Author: Bjorn Helgaas Date: Sat Oct 20 11:45:29 2018 -0500 Merge branch 'pci/hotplug' - Differentiate between pciehp surprise and safe removal (Lukas Wunner) - Remove unnecessary pciehp includes (Lukas Wunner) - Drop pciehp hotplug_slot_ops wrappers (Lukas Wunner) - Tolerate PCIe Slot Presence Detect being hardwired to zero to workaround broken hardware, e.g., the Wilocity switch/wireless device (Lukas Wunner) - Unify pciehp controller & slot structs (Lukas Wunner) - Constify hotplug_slot_ops (Lukas Wunner) - Drop hotplug_slot_info (Lukas Wunner) - Embed hotplug_slot struct into users instead of allocating it separately (Lukas Wunner) - Initialize PCIe port service drivers directly instead of relying on initcall ordering (Keith Busch) - Restore PCI config state after a slot reset (Keith Busch) - Save/restore DPC config state along with other PCI config state (Keith Busch) - Reference count devices during AER handling to avoid race issue with concurrent hot removal (Keith Busch) - If an Upstream Port reports ERR_FATAL, don't try to read the Port's config space because it is probably unreachable (Keith Busch) - During error handling, use slot-specific reset instead of secondary bus reset to avoid link up/down issues on hotplug ports (Keith Busch) - Restore previous AER/DPC handling that does not remove and re-enumerate devices on ERR_FATAL (Keith Busch) - Notify all drivers that may be affected by error recovery resets (Keith Busch) - Always generate error recovery uevents, even if a driver doesn't have error callbacks (Keith Busch) - Make PCIe link active reporting detection generic (Keith Busch) - Support D3cold in PCIe hierarchies during system sleep and runtime, including hotplug and Thunderbolt ports (Mika Westerberg) - Handle hpmemsize/hpiosize kernel parameters uniformly, whether slots are empty or occupied (Jon Derrick) - Remove duplicated include from pci/pcie/err.c and unused variable from cpqphp (YueHaibing) - Remove driver pci_cleanup_aer_uncorrect_error_status() calls (Oza Pawandeep) - Uninline PCI bus accessors for better ftracing (Keith Busch) - Remove unused AER Root Port .error_resume method (Keith Busch) - Use kfifo in AER instead of a local version (Keith Busch) - Use threaded IRQ in AER bottom half (Keith Busch) - Use managed resources in AER core (Keith Busch) - Reuse pcie_port_find_device() for AER injection (Keith Busch) - Abstract AER interrupt handling to disconnect error injection (Keith Busch) - Refactor AER injection callbacks to simplify future improvments (Keith Busch) * pci/hotplug: PCI/AER: Refactor error injection fallbacks PCI/AER: Abstract AER interrupt handling PCI/AER: Reuse existing pcie_port_find_device() interface PCI/AER: Use managed resource allocations PCI/AER: Use threaded IRQ for bottom half PCI/AER: Use kfifo_in_spinlocked() to insert locked elements PCI/AER: Use kfifo for tracking events instead of reimplementing it PCI/AER: Remove error source from AER struct aer_rpc PCI/AER: Remove unused aer_error_resume() PCI: Uninline PCI bus accessors for better ftracing PCI/AER: Remove pci_cleanup_aer_uncorrect_error_status() calls PCI: pnv_php: Use kmemdup() PCI: cpqphp: Remove set but not used variable 'physical_slot' PCI/ERR: Remove duplicated include from err.c PCI: Equalize hotplug memory and io for occupied and empty slots PCI / ACPI: Whitelist D3 for more PCIe hotplug ports ACPI / property: Allow multiple property compatible _DSD entries PCI/PME: Implement runtime PM callbacks PCI: pciehp: Implement runtime PM callbacks PCI/portdrv: Add runtime PM hooks for port service drivers PCI/portdrv: Resume upon exit from system suspend if left runtime suspended PCI: pciehp: Do not handle events if interrupts are masked PCI: pciehp: Disable hotplug interrupt during suspend PCI / ACPI: Enable wake automatically for power managed bridges PCI: Do not skip power-managed bridges in pci_enable_wake() PCI: Make link active reporting detection generic PCI: Unify device inaccessible PCI/ERR: Always report current recovery status for udev PCI/ERR: Simplify broadcast callouts PCI/ERR: Run error recovery callbacks for all affected devices PCI/ERR: Handle fatal error recovery PCI/ERR: Use slot reset if available PCI/AER: Don't read upstream ports below fatal errors PCI/AER: Take reference on error devices PCI/DPC: Save and restore config state PCI: portdrv: Restore PCI config state on slot reset PCI: portdrv: Initialize service drivers directly PCI: hotplug: Document TODOs PCI: hotplug: Embed hotplug_slot PCI: hotplug: Drop hotplug_slot_info PCI: hotplug: Constify hotplug_slot_ops PCI: pciehp: Reshuffle controller struct for clarity PCI: pciehp: Rename controller struct members for clarity PCI: pciehp: Unify controller and slot structs PCI: pciehp: Tolerate Presence Detect hardwired to zero PCI: pciehp: Drop hotplug_slot_ops wrappers PCI: pciehp: Drop unnecessary includes PCI: pciehp: Differentiate between surprise and safe removal PCI: Simplify disconnected marking commit de468b755464426c276df2daf1e54bcd64186020 Merge: b1801bf05964 d6112f8def51 Author: Bjorn Helgaas Date: Sat Oct 20 11:45:28 2018 -0500 Merge branch 'pci/enumeration' - Remove x86 and arm64 node-local allocation for host bridge structures (Punit Agrawal) - Pay attention to device-specific _PXM node values (Jonathan Cameron) - Support new Immediate Readiness bit (Felipe Balbi) * pci/enumeration: PCI: Add support for Immediate Readiness ACPI/PCI: Pay attention to device-specific _PXM node values x86/PCI: Remove node-local allocation when initialising host controller arm64: PCI: Remove node-local allocations when initialising host controller commit b1801bf05964321d79fbbeae96c8ab09da2e2e49 Merge: 7876320f8880 17c91487364f Author: Bjorn Helgaas Date: Sat Oct 20 11:45:27 2018 -0500 Merge branch 'pci/aspm' - Fix ASPM link_state teardown on removal (Lukas Wunner) - Fix misleading _OSC ASPM message (Sinan Kaya) - Make _OSC optional for PCI (Sinan Kaya) - Don't initialize ASPM link state when ACPI_FADT_NO_ASPM is set (Patrick Talbert) * pci/aspm: PCI/ASPM: Do not initialize link state when aspm_disabled is set PCI/ACPI: Allow _OSC presence to be optional for PCI PCI/ACPI: Correct error message for ASPM disabling PCI/ASPM: Fix link_state teardown on device removal commit 6e301a8e56e429d6b01d83d427a9e54fdbb0fa60 Author: Alexey Kardashevskiy Date: Mon Oct 15 21:08:41 2018 +1100 KVM: PPC: Optimize clearing TCEs for sparse tables The powernv platform maintains 2 TCE tables for VFIO - a hardware TCE table and a table with userspace addresses. These tables are radix trees, we allocate indirect levels when they are written to. Since the memory allocation is problematic in real mode, we have 2 accessors to the entries: - for virtual mode: it allocates the memory and it is always expected to return non-NULL; - fr real mode: it does not allocate and can return NULL. Also, DMA windows can span to up to 55 bits of the address space and since we never have this much RAM, such windows are sparse. However currently the SPAPR TCE IOMMU driver walks through all TCEs to unpin DMA memory. Since we maintain a userspace addresses table for VFIO which is a mirror of the hardware table, we can use it to know which parts of the DMA window have not been mapped and skip these so does this patch. The bare metal systems do not have this problem as they use a bypass mode of a PHB which maps RAM directly. This helps a lot with sparse DMA windows, reducing the shutdown time from about 3 minutes per 1 billion TCEs to a few seconds for 32GB sparse guest. Just skipping the last level seems to be good enough. As non-allocating accessor is used now in virtual mode as well, rename it from IOMMU_TABLE_USERSPACE_ENTRY_RM (real mode) to _RO (read only). Signed-off-by: Alexey Kardashevskiy Signed-off-by: Paul Mackerras commit 4c16128b6271e70c8743178e90cccee147858503 Author: Eric Dumazet Date: Fri Oct 19 19:11:26 2018 -0700 net: loopback: clear skb->tstamp before netif_rx() At least UDP / TCP stacks can now cook skbs with a tstamp using MONOTONIC base (or arbitrary values with SCM_TXTIME) Since loopback driver does not call (directly or indirectly) skb_scrub_packet(), we need to clear skb->tstamp so that net_timestamp_check() can eventually resample the time, using ktime_get_real(). Fixes: 80b14dee2bea ("net: Add a new socket option for a future transmit time.") Fixes: fb420d5d91c1 ("tcp/fq: move back to CLOCK_MONOTONIC") Signed-off-by: Eric Dumazet Cc: Willem de Bruijn Cc: Soheil Hassas Yeganeh Acked-by: Soheil Hassas Yeganeh Signed-off-by: David S. Miller commit daf00ae71dad8aa05965713c62558aeebf2df48e Author: Christophe Leroy Date: Sat Oct 13 09:16:22 2018 +0000 powerpc/traps: restore recoverability of machine_check interrupts commit b96672dd840f ("powerpc: Machine check interrupt is a non- maskable interrupt") added a call to nmi_enter() at the beginning of machine check restart exception handler. Due to that, in_interrupt() always returns true regardless of the state before entering the exception, and die() panics even when the system was not already in interrupt. This patch calls nmi_exit() before calling die() in order to restore the interrupt state we had before calling nmi_enter() Fixes: b96672dd840f ("powerpc: Machine check interrupt is a non-maskable interrupt") Signed-off-by: Christophe Leroy Reviewed-by: Nicholas Piggin Signed-off-by: Michael Ellerman commit b851ba02a6f3075f0f99c60c4bc30a4af80cf428 Author: Nicholas Piggin Date: Wed Aug 29 21:56:56 2018 +1000 powerpc/64/module: REL32 relocation range check The recent module relocation overflow crash demonstrated that we have no range checking on REL32 relative relocations. This patch implements a basic check, the same kernel that previously oopsed and rebooted now continues with some of these errors when loading the module: module_64: x_tables: REL32 527703503449812 out of range! Possibly other relocations (ADDR32, REL16, TOC16, etc.) should also have overflow checks. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman commit dd76ff5af35350fd6d5bb5b069e73b6017f66893 Author: Nicholas Piggin Date: Tue Aug 28 18:11:27 2018 +1000 powerpc/64s/radix: Fix radix__flush_tlb_collapsed_pmd double flushing pmd Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman commit b7683fc66eba91674e52c30f4d8e596bfb5cbcf4 Author: Michael Ellerman Date: Tue Jul 24 15:53:22 2018 +1000 selftests/powerpc: Add a test of wild bctr This tests that a bctr (Branch to counter and link), ie. a function call, to a wildly out-of-bounds address is handled correctly. Some old kernel versions didn't handle it correctly, see eg: "powerpc/slb: Force a full SLB flush when we insert for a bad EA" https://lists.ozlabs.org/pipermail/linuxppc-dev/2017-April/157397.html Signed-off-by: Michael Ellerman commit 0d923962ab69c27cca664a2d535e90ef655110ca Author: Michael Ellerman Date: Wed Aug 15 21:29:45 2018 +1000 powerpc/mm: Fix page table dump to work on Radix When we're running on Book3S with the Radix MMU enabled the page table dump currently prints the wrong addresses because it uses the wrong start address. Fix it to use PAGE_OFFSET rather than KERN_VIRT_START. Signed-off-by: Michael Ellerman commit afb6d0647fd250a068efd985987b5ff2c0d1b853 Author: Michael Ellerman Date: Wed Oct 17 23:53:38 2018 +1100 powerpc/mm/radix: Display if mappings are exec or not At boot we print the ranges we've mapped for the linear mapping and what page size we've used. Also track whether the range is mapped executable or not and display that as well. Signed-off-by: Michael Ellerman commit 232aa407633cef2b43806c1603fc8689aecf826c Author: Michael Ellerman Date: Tue Aug 14 22:37:32 2018 +1000 powerpc/mm/radix: Simplify split mapping logic If we look closely at the logic in create_physical_mapping(), when we're doing STRICT_KERNEL_RWX, we do the following steps: - determine the gap from where we are to the end of the range - choose an appropriate mapping_size based on the gap - check if that mapping_size would overlap the __init_begin boundary, and if not choose an appropriate mapping_size We can simplify the logic by taking the __init_begin boundary into account when we calculate the initial gap. So add a next_boundary() function which tells us what the next boundary is, either the __init_begin boundary or end. In future we can add more boundaries. Signed-off-by: Michael Ellerman commit 57306c663d53f2e4fd856950703dc6bcfc98f7cb Author: Michael Ellerman Date: Tue Aug 14 22:01:44 2018 +1000 powerpc/mm/radix: Remove the retry in the split mapping logic When we have CONFIG_STRICT_KERNEL_RWX enabled, we want to split the linear mapping at the text/data boundary so we can map the kernel text read only. The current logic uses a goto inside the for loop, which works, but is hard to reason about. When we hit the goto retry case we set max_mapping_size to PMD_SIZE and go back to the start. Setting max_mapping_size means we skip the PUD case and go to the PMD case. We know we will pass the alignment and gap checks because the only reason we are there is we hit the goto retry, and that is guarded by mapping_size == PUD_SIZE, which means addr is PUD aligned and gap is greater or equal to PUD_SIZE. So the only part of the check that can fail is the mmu_psize_defs check for the 2M page size. If we just duplicate that check we can avoid the goto, and we get the same result. Signed-off-by: Michael Ellerman commit 81d1b54dec95209ab5e5be2cf37182885f998753 Author: Michael Ellerman Date: Tue Aug 14 21:05:20 2018 +1000 powerpc/mm/radix: Fix small page at boundary when splitting When we have CONFIG_STRICT_KERNEL_RWX enabled, we want to split the linear mapping at the text/data boundary so we can map the kernel text read only. Currently we always use a small page at the text/data boundary, even when that's not necessary: Mapped 0x0000000000000000-0x0000000000e00000 with 2.00 MiB pages Mapped 0x0000000000e00000-0x0000000001000000 with 64.0 KiB pages Mapped 0x0000000001000000-0x0000000040000000 with 2.00 MiB pages This is because the check that the mapping crosses the __init_begin boundary is too strict, it also returns true when we map exactly up to the boundary. So fix it to check that the mapping would actually map past __init_begin, and with that we see: Mapped 0x0000000000000000-0x0000000040000000 with 2.00 MiB pages Mapped 0x0000000040000000-0x0000000100000000 with 1.00 GiB pages Signed-off-by: Michael Ellerman commit 3b5657ed5b4e27ccf593a41ff3c5aa27dae8df18 Author: Michael Ellerman Date: Tue Aug 14 20:48:22 2018 +1000 powerpc/mm/radix: Fix overuse of small pages in splitting logic When we have CONFIG_STRICT_KERNEL_RWX enabled, we want to split the linear mapping at the text/data boundary so we can map the kernel text read only. But the current logic uses small pages for the entire text section, regardless of whether a larger page size would fit. eg. with the boundary at 16M we could use 2M pages, but instead we use 64K pages up to the 16M boundary: Mapped 0x0000000000000000-0x0000000001000000 with 64.0 KiB pages Mapped 0x0000000001000000-0x0000000040000000 with 2.00 MiB pages Mapped 0x0000000040000000-0x0000000100000000 with 1.00 GiB pages This is because the test is checking if addr is < __init_begin and addr + mapping_size is >= _stext. But that is true for all pages between _stext and __init_begin. Instead what we want to check is if we are crossing the text/data boundary, which is at __init_begin. With that fixed we see: Mapped 0x0000000000000000-0x0000000000e00000 with 2.00 MiB pages Mapped 0x0000000000e00000-0x0000000001000000 with 64.0 KiB pages Mapped 0x0000000001000000-0x0000000040000000 with 2.00 MiB pages Mapped 0x0000000040000000-0x0000000100000000 with 1.00 GiB pages ie. we're correctly using 2MB pages below __init_begin, but we still drop down to 64K pages unnecessarily at the boundary. Signed-off-by: Michael Ellerman commit 5c6499b7041b43807dfaeda28aa87fc0e62558f7 Author: Michael Ellerman Date: Fri Aug 10 22:29:26 2018 +1000 powerpc/mm/radix: Fix off-by-one in split mapping logic When we have CONFIG_STRICT_KERNEL_RWX enabled, we try to split the kernel linear (1:1) mapping so that the kernel text is in a separate page to kernel data, so we can mark the former read-only. We could achieve that just by always using 64K pages for the linear mapping, but we try to be smarter. Instead we use huge pages when possible, and only switch to smaller pages when necessary. However we have an off-by-one bug in that logic, which causes us to calculate the wrong boundary between text and data. For example with the end of the kernel text at 16M we see: radix-mmu: Mapped 0x0000000000000000-0x0000000001200000 with 64.0 KiB pages radix-mmu: Mapped 0x0000000001200000-0x0000000040000000 with 2.00 MiB pages radix-mmu: Mapped 0x0000000040000000-0x0000000100000000 with 1.00 GiB pages ie. we mapped from 0 to 18M with 64K pages, even though the boundary between text and data is at 16M. With the fix we see we're correctly hitting the 16M boundary: radix-mmu: Mapped 0x0000000000000000-0x0000000001000000 with 64.0 KiB pages radix-mmu: Mapped 0x0000000001000000-0x0000000040000000 with 2.00 MiB pages radix-mmu: Mapped 0x0000000040000000-0x0000000100000000 with 1.00 GiB pages Signed-off-by: Michael Ellerman commit 67361cf80712867329a9cd3ff0e3171545cfc867 Author: Naveen N. Rao Date: Wed Oct 17 01:55:00 2018 +0530 powerpc/ftrace: Handle large kernel configs Currently, we expect to be able to reach ftrace_caller() from all ftrace-enabled functions through a single relative branch. With large kernel configs, we see functions outside of 32MB of ftrace_caller() causing ftrace_init() to bail. In such configurations, gcc/ld emits two types of trampolines for mcount(): 1. A long_branch, which has a single branch to mcount() for functions that are one hop away from mcount(): c0000000019e8544 <00031b56.long_branch._mcount>: c0000000019e8544: 4a 69 3f ac b c00000000007c4f0 <._mcount> 2. A plt_branch, for functions that are farther away from mcount(): c0000000051f33f8 <0008ba04.plt_branch._mcount>: c0000000051f33f8: 3d 82 ff a4 addis r12,r2,-92 c0000000051f33fc: e9 8c 04 20 ld r12,1056(r12) c0000000051f3400: 7d 89 03 a6 mtctr r12 c0000000051f3404: 4e 80 04 20 bctr We can reuse those trampolines for ftrace if we can have those trampolines go to ftrace_caller() instead. However, with ABIv2, we cannot depend on r2 being valid. As such, we use only the long_branch trampolines by patching those to instead branch to ftrace_caller or ftrace_regs_caller. In addition, we add additional trampolines around .text and .init.text to catch locations that are covered by the plt branches. This allows ftrace to work with most large kernel configurations. For now, we always patch the trampolines to go to ftrace_regs_caller, which is slightly inefficient. This can be optimized further at a later point. Signed-off-by: Naveen N. Rao Signed-off-by: Michael Ellerman commit dd0e144a632bcf2b5a6f04e2628e32b16d499277 Author: Aneesh Kumar K.V Date: Sat Oct 13 22:18:15 2018 +0530 powerpc/mm: Fix WARN_ON with THP NUMA migration WARNING: CPU: 12 PID: 4322 at /arch/powerpc/mm/pgtable-book3s64.c:76 set_pmd_at+0x4c/0x2b0 Modules linked in: CPU: 12 PID: 4322 Comm: qemu-system-ppc Tainted: G W 4.19.0-rc3-00758-g8f0c636b0542 #36 NIP: c0000000000872fc LR: c000000000484eec CTR: 0000000000000000 REGS: c000003fba876fe0 TRAP: 0700 Tainted: G W (4.19.0-rc3-00758-g8f0c636b0542) MSR: 900000010282b033 CR: 24282884 XER: 00000000 CFAR: c000000000484ee8 IRQMASK: 0 GPR00: c000000000484eec c000003fba877268 c000000001f0ec00 c000003fbd229f80 GPR04: 00007c8fe8e00000 c000003f864c5a38 860300853e0000c0 0000000000000080 GPR08: 0000000080000000 0000000000000001 0401000000000080 0000000000000001 GPR12: 0000000000002000 c000003fffff5400 c000003fce292000 00007c9024570000 GPR16: 0000000000000000 0000000000ffffff 0000000000000001 c000000001885950 GPR20: 0000000000000000 001ffffc0004807c 0000000000000008 c000000001f49d05 GPR24: 00007c8fe8e00000 c0000000020f2468 ffffffffffffffff c000003fcd33b090 GPR28: 00007c8fe8e00000 c000003fbd229f80 c000003f864c5a38 860300853e0000c0 NIP [c0000000000872fc] set_pmd_at+0x4c/0x2b0 LR [c000000000484eec] do_huge_pmd_numa_page+0xb1c/0xc20 Call Trace: [c000003fba877268] [c00000000045931c] mpol_misplaced+0x1bc/0x230 (unreliable) [c000003fba8772c8] [c000000000484eec] do_huge_pmd_numa_page+0xb1c/0xc20 [c000003fba877398] [c00000000040d344] __handle_mm_fault+0x5e4/0x2300 [c000003fba8774d8] [c00000000040f400] handle_mm_fault+0x3a0/0x420 [c000003fba877528] [c0000000003ff6f4] __get_user_pages+0x2e4/0x560 [c000003fba877628] [c000000000400314] get_user_pages_unlocked+0x104/0x2a0 [c000003fba8776c8] [c000000000118f44] __gfn_to_pfn_memslot+0x284/0x6a0 [c000003fba877748] [c0000000001463a0] kvmppc_book3s_radix_page_fault+0x360/0x12d0 [c000003fba877838] [c000000000142228] kvmppc_book3s_hv_page_fault+0x48/0x1300 [c000003fba877988] [c00000000013dc08] kvmppc_vcpu_run_hv+0x1808/0x1b50 [c000003fba877af8] [c000000000126b44] kvmppc_vcpu_run+0x34/0x50 [c000003fba877b18] [c000000000123268] kvm_arch_vcpu_ioctl_run+0x288/0x2d0 [c000003fba877b98] [c00000000011253c] kvm_vcpu_ioctl+0x1fc/0x8c0 [c000003fba877d08] [c0000000004e9b24] do_vfs_ioctl+0xa44/0xae0 [c000003fba877db8] [c0000000004e9c44] ksys_ioctl+0x84/0xf0 [c000003fba877e08] [c0000000004e9cd8] sys_ioctl+0x28/0x80 We removed the pte_protnone check earlier with the understanding that we mark the pte invalid before the set_pte/set_pmd usage. But the huge pmd autonuma still use the set_pmd_at directly. This is ok because a protnone pte won't have translation cache in TLB. Fixes: da7ad366b497 ("powerpc/mm/book3s: Update pmd_present to look at _PAGE_PRESENT bit") Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman commit d8a2fe29d3c97038c8efcc328d5e7940c5310565 Author: Michael Ellerman Date: Fri Oct 19 00:11:33 2018 +1100 selftests/powerpc: Fix out-of-tree build errors Some of our Makefiles don't do the right thing when building the selftests with O=, fix them up. Signed-off-by: Michael Ellerman commit 51eeef9e135ac00cf706fad1a3bde775ca578462 Author: Christophe Leroy Date: Thu Aug 2 07:54:01 2018 +0000 powerpc/time: no steal_time when CONFIG_PPC_SPLPAR is not selected If CONFIG_PPC_SPLPAR is not selected, steal_time will always be NUL, so accounting it is pointless Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman commit abcff86df2d2ec0a0ca9470fa5d2a184af18928a Author: Christophe Leroy Date: Thu Aug 2 07:53:59 2018 +0000 powerpc/time: Only set CONFIG_ARCH_HAS_SCALED_CPUTIME on PPC64 scaled cputime is only meaningfull when the processor has SPURR and/or PURR, which means only on PPC64. Removing it on PPC32 significantly reduces the size of vtime_account_system() and vtime_account_idle() on an 8xx: Before: 00000000 l F .text 000000a8 vtime_delta 00000280 g F .text 0000010c vtime_account_system 0000038c g F .text 00000048 vtime_account_idle After: (vtime_delta gets inlined inside the two functions) 000001d8 g F .text 000000a0 vtime_account_system 00000278 g F .text 00000038 vtime_account_idle In terms of performance, we also get approximatly 7% improvement on task switch. The following small benchmark app is run with perf stat: void *thread(void *arg) { int i; for (i = 0; i < atoi((char*)arg); i++) pthread_yield(); } int main(int argc, char **argv) { pthread_t th1, th2; pthread_create(&th1, NULL, thread, argv[1]); pthread_create(&th2, NULL, thread, argv[1]); pthread_join(th1, NULL); pthread_join(th2, NULL); return 0; } Before the patch: Performance counter stats for 'chrt -f 98 ./sched 100000' (50 runs): 8228.476465 task-clock (msec) # 0.954 CPUs utilized ( +- 0.23% ) 200004 context-switches # 0.024 M/sec ( +- 0.00% ) After the patch: Performance counter stats for 'chrt -f 98 ./sched 100000' (50 runs): 7649.070444 task-clock (msec) # 0.955 CPUs utilized ( +- 0.27% ) 200004 context-switches # 0.026 M/sec ( +- 0.00% ) Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman commit b38a181c11d0b5e84b40732dbb06cc9d68140d60 Author: Christophe Leroy Date: Thu Aug 2 07:53:57 2018 +0000 powerpc/time: isolate scaled cputime accounting in dedicated functions. scaled cputime is only meaningfull when the processor has SPURR and/or PURR, which means only on PPC64. In preparation of the following patch that will remove CONFIG_ARCH_HAS_SCALED_CPUTIME on PPC32, this patch moves all scaled cputing accounting logic into dedicated functions. This patch doesn't change any functionality. It's only code reorganisation. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman commit fb978ca207743badfe7efd9eebe68bcbb4969f79 Author: Christophe Leroy Date: Tue Sep 18 09:26:03 2018 +0000 powerpc/kgdb: add kgdb_arch_set/remove_breakpoint() Generic implementation fails to remove breakpoints after init when CONFIG_STRICT_KERNEL_RWX is selected: [ 13.251285] KGDB: BP remove failed: c001c338 [ 13.259587] kgdbts: ERROR PUT: end of test buffer on 'do_fork_test' line 8 expected OK got $E14#aa [ 13.268969] KGDB: re-enter exception: ALL breakpoints killed [ 13.275099] CPU: 0 PID: 1 Comm: init Not tainted 4.18.0-g82bbb913ffd8 #860 [ 13.282836] Call Trace: [ 13.285313] [c60e1ba0] [c0080ef0] kgdb_handle_exception+0x6f4/0x720 (unreliable) [ 13.292618] [c60e1c30] [c000e97c] kgdb_handle_breakpoint+0x3c/0x98 [ 13.298709] [c60e1c40] [c000af54] program_check_exception+0x104/0x700 [ 13.305083] [c60e1c60] [c000e45c] ret_from_except_full+0x0/0x4 [ 13.310845] [c60e1d20] [c02a22ac] run_simple_test+0x2b4/0x2d4 [ 13.316532] [c60e1d30] [c0081698] put_packet+0xb8/0x158 [ 13.321694] [c60e1d60] [c00820b4] gdb_serial_stub+0x230/0xc4c [ 13.327374] [c60e1dc0] [c0080af8] kgdb_handle_exception+0x2fc/0x720 [ 13.333573] [c60e1e50] [c000e928] kgdb_singlestep+0xb4/0xcc [ 13.339068] [c60e1e70] [c000ae1c] single_step_exception+0x90/0xac [ 13.345100] [c60e1e80] [c000e45c] ret_from_except_full+0x0/0x4 [ 13.350865] [c60e1f40] [c000e11c] ret_from_syscall+0x0/0x38 [ 13.356346] Kernel panic - not syncing: Recursive entry to debugger This patch creates powerpc specific version of kgdb_arch_set_breakpoint() and kgdb_arch_remove_breakpoint() using patch_instruction() Fixes: 1e0fc9d1eb2b ("powerpc/Kconfig: Enable STRICT_KERNEL_RWX for some configs") Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman commit 6beb3381b12793726783a5e9428250743659c6cf Author: Christophe Leroy Date: Mon Aug 27 08:27:27 2018 +0000 powerpc/sysdev/ipic: check primary_ipic NULL pointer before using it ipic_get_mcp_status() is used by targets implementing NMI watchdog in target specific machine check handler in order to known whether a machine check results from a watchdog NMI reset. In case of very early machine check, primary_ipic pointer might not have been set yet, so ipic_get_mcp_status() needs to check it for nullity before using it. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman commit 37e9c674e7e6f445e12cb1151017bd4bacdd1e2d Author: Christophe Leroy Date: Thu Aug 2 09:25:55 2018 +0000 powerpc/mm: fix always true/false warning in slice.c This patch fixes the following warnings (obtained with make W=1). arch/powerpc/mm/slice.c: In function 'slice_range_to_mask': arch/powerpc/mm/slice.c:73:12: error: comparison is always true due to limited range of data type [-Werror=type-limits] if (start < SLICE_LOW_TOP) { ^ arch/powerpc/mm/slice.c:81:20: error: comparison is always false due to limited range of data type [-Werror=type-limits] if ((start + len) > SLICE_LOW_TOP) { ^ arch/powerpc/mm/slice.c: In function 'slice_mask_for_free': arch/powerpc/mm/slice.c:136:17: error: comparison is always true due to limited range of data type [-Werror=type-limits] if (high_limit <= SLICE_LOW_TOP) ^ arch/powerpc/mm/slice.c: In function 'slice_check_range_fits': arch/powerpc/mm/slice.c:185:12: error: comparison is always true due to limited range of data type [-Werror=type-limits] if (start < SLICE_LOW_TOP) { ^ arch/powerpc/mm/slice.c:195:39: error: comparison is always false due to limited range of data type [-Werror=type-limits] if (SLICE_NUM_HIGH && ((start + len) > SLICE_LOW_TOP)) { ^ arch/powerpc/mm/slice.c: In function 'slice_scan_available': arch/powerpc/mm/slice.c:306:11: error: comparison is always true due to limited range of data type [-Werror=type-limits] if (addr < SLICE_LOW_TOP) { ^ arch/powerpc/mm/slice.c: In function 'get_slice_psize': arch/powerpc/mm/slice.c:709:11: error: comparison is always true due to limited range of data type [-Werror=type-limits] if (addr < SLICE_LOW_TOP) { ^ Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman commit aa5456abdc20568f5da348209148a9c75a32468a Author: Christophe Leroy Date: Fri Jun 22 13:49:48 2018 +0000 powerpc/mm: fix missing prototypes in slice.c This patch fixes the following warnings (obtained with make W=1). arch/powerpc/mm/slice.c: At top level: arch/powerpc/mm/slice.c:682:15: error: no previous prototype for 'arch_get_unmapped_area' [-Werror=missing-prototypes] unsigned long arch_get_unmapped_area(struct file *filp, ^ arch/powerpc/mm/slice.c:692:15: error: no previous prototype for 'arch_get_unmapped_area_topdown' [-Werror=missing-prototypes] unsigned long arch_get_unmapped_area_topdown(struct file *filp, ^ Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman commit 8114c36ea6486aba2269d0590c5d553108ee9558 Author: Christophe Leroy Date: Wed Mar 21 15:17:00 2018 +0100 powerpc/mm: Trace tlbia instruction Add a trace point for tlbia (Translation Lookaside Buffer Invalidate All) instruction. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman commit cf4a6085151ae3f4e78dd91981833e65aaae8bc6 Author: Christophe Leroy Date: Wed Mar 21 15:16:58 2018 +0100 powerpc/mm: Add missing tracepoint for tlbie commit 0428491cba927 ("powerpc/mm: Trace tlbie(l) instructions") added tracepoints for tlbie calls, but _tlbil_va() was forgotten Fixes: 0428491cba927 ("powerpc/mm: Trace tlbie(l) instructions") Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman commit 3ff38e1874863827374b02b4f31c73faa3744e1c Author: Christophe Leroy Date: Mon Oct 15 06:37:41 2018 +0000 powerpc/book3s64: fix dump_linuxpagetables "present" flag Since commit bd0dbb73e013 ("powerpc/mm/books3s: Add new pte bit to mark pte temporarily invalid."), _PAGE_PRESENT doesn't mean exactly that a page is present. A page is also considered preset when _PAGE_INVALID is set. This patch changes the meaning of "present" and adds a status "valid" associated to the _PAGE_PRESENT flag. Fixes: bd0dbb73e013 ("powerpc/mm/books3s: Add new pte bit to mark pte temporarily invalid.") Signed-off-by: Christophe Leroy Reviewed-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman commit c6c26fb55e8e4b3fc376be5611685990a17de27a Author: Aravinda Prasad Date: Tue Oct 16 17:20:05 2018 +0530 powerpc/pseries: Export raw per-CPU VPA data via debugfs This patch exports the raw per-CPU VPA data via debugfs. A per-CPU file is created which exports the VPA data of that CPU to help debug some of the VPA related issues or to analyze the per-CPU VPA related statistics. v3: Removed offline CPU check. v2: Included offline CPU check and other review comments. Signed-off-by: Aravinda Prasad Signed-off-by: Michael Ellerman commit d2bf793237b3aa9c4275a466eef3893eef593691 Author: Naveen N. Rao Date: Mon May 21 20:43:57 2018 +0530 selftests/powerpc: Add test to verify rfi flush across a system call This adds a test to verify proper functioning of the rfi flush capability implemented to mitigate meltdown. The test works by measuring the number of L1d cache misses encountered while loading data from memory. Across a system call, since the L1d cache is flushed when rfi_flush is enabled, the number of cache misses is expected to be relative to the number of cachelines corresponding to the data being loaded. The current system setting is reflected via powerpc/rfi_flush under debugfs (assumed to be /sys/kernel/debug/). This test verifies the expected result with rfi_flush enabled as well as when it is disabled. Signed-off-by: Anton Blanchard Signed-off-by: Michael Ellerman Signed-off-by: Naveen N. Rao [mpe: Add SPDX tags, clang format, skip if the debugfs is missing, use __u64 and SANE_USERSPACE_TYPES to avoid printf() build errors.] Signed-off-by: Michael Ellerman commit db3848515aff369404c31ef5a63699799913518f Author: Naveen N. Rao Date: Mon May 21 20:43:56 2018 +0530 selftests/powerpc: Move UCONTEXT_NIA() into utils.h ... so that it can be used by others. Signed-off-by: Naveen N. Rao Signed-off-by: Michael Ellerman commit 59fe7eaf3598a89cbcd72e645b1d08afd76f7b29 Author: Naveen N. Rao Date: Tue May 29 12:21:00 2018 +0530 powerpc64/module elfv1: Set opd addresses after module relocation module_frob_arch_sections() is called before the module is moved to its final location. The function descriptor section addresses we are setting here are thus invalid. Fix this by processing opd section during module_finalize() Fixes: 5633e85b2c313 ("powerpc64: Add .opd based function descriptor dereference") Cc: stable@vger.kernel.org # v4.16 Signed-off-by: Naveen N. Rao Signed-off-by: Michael Ellerman commit 7cd01b08d35f1b7d55686ed8cd57c94d3406ec8f Author: Naveen N. Rao Date: Thu Jun 7 15:22:02 2018 +0530 powerpc: Add support for function error injection We implement regs_set_return_value() and override_function_with_return() for this purpose. On powerpc, a return from a function (blr) just branches to the location contained in the link register. So, we can just update pt_regs rather than redirecting execution to a dummy function that returns. Signed-off-by: Naveen N. Rao Reviewed-by: Samuel Mendoza-Jonas Signed-off-by: Michael Ellerman commit b5b4185cfb61485e34c674c2a524d71531dc52e5 Author: Vladimir Zapolskiy Date: Fri Oct 19 02:25:11 2018 +0300 net: ethernet: lpc_eth: add device and device node local variables Trivial non-functional change added to simplify getting multiple references to device pointer in lpc_eth_drv_probe(). Signed-off-by: Vladimir Zapolskiy Signed-off-by: David S. Miller commit 081a1b123c4dfea09562bf5f66f7c2ae20b554a3 Author: Vladimir Zapolskiy Date: Fri Oct 19 02:06:53 2018 +0300 net: ethernet: lpc_eth: remove unused local variable A trivial change which removes an unused local variable, the issue is reported as a compile time warning: drivers/net/ethernet/nxp/lpc_eth.c: In function 'lpc_eth_drv_probe': drivers/net/ethernet/nxp/lpc_eth.c:1250:21: warning: variable 'phydev' set but not used [-Wunused-but-set-variable] struct phy_device *phydev; ^~~~~~ Signed-off-by: Vladimir Zapolskiy Signed-off-by: David S. Miller commit 643d813a0efd7e6fd78b49f69643af66731e05c8 Author: Vladimir Zapolskiy Date: Fri Oct 19 01:58:41 2018 +0300 net: ethernet: lpc_eth: remove CONFIG_OF guard from the driver The MAC controller device is available on NXP LPC32xx platform only, and the LPC32xx platform supports OF builds only, so additional checks in the device driver are not needed. Signed-off-by: Vladimir Zapolskiy Signed-off-by: David S. Miller commit 1d9482092d248272d8279450717b426b2a4fea0f Author: Vladimir Zapolskiy Date: Fri Oct 19 01:53:25 2018 +0300 net: ethernet: lpc_eth: clean up the list of included headers The change removes all unnecessary included headers from the driver source code, the remaining list is sorted in alphabetical order. Signed-off-by: Vladimir Zapolskiy Signed-off-by: David S. Miller commit c8baae840fd1d5f871b674e7f99e9fcc405c910e Merge: c9fbd71f7309 806700bab41e Author: David S. Miller Date: Fri Oct 19 17:02:24 2018 -0700 Merge branch 'Microchip-Technology-KSZ9131' Yuiko Oshino says: ==================== Add support for Microchip Technology KSZ9131 10/100/1000 Ethernet PHY This is the initial driver for Microchip KSZ9131 10/100/1000 Ethernet PHY v3: - KSZ9131 uses picosecond units for values of devicetree properties. - rewrite micrel.c and micrel-ksz90x1.txt to use the picosecond values. v2: - Creating a series from two related patches. ==================== Signed-off-by: David S. Miller commit 806700bab41e9297c6ace1d1d0cabd77b020ad72 Author: Yuiko Oshino Date: Thu Oct 18 15:06:02 2018 -0400 dt-bindings: net: add support for Microchip KSZ9131 Add support for Microchip Technology KSZ9131 10/100/1000 Ethernet PHY Signed-off-by: Yuiko Oshino Reviewed-by: Rob Herring Signed-off-by: David S. Miller commit bff5b4b3737219195ca0caef4ff7884303cb5dc1 Author: Yuiko Oshino Date: Thu Oct 18 15:06:01 2018 -0400 net: phy: micrel: add Microchip KSZ9131 initial driver Add support for Microchip Technology KSZ9131 10/100/1000 Ethernet PHY Signed-off-by: Yuiko Oshino Signed-off-by: David S. Miller commit c9fbd71f73094311b31ee703a918e9e0df502cef Author: Debabrata Banerjee Date: Thu Oct 18 11:18:26 2018 -0400 netpoll: allow cleanup to be synchronous This fixes a problem introduced by: commit 2cde6acd49da ("netpoll: Fix __netpoll_rcu_free so that it can hold the rtnl lock") When using netconsole on a bond, __netpoll_cleanup can asynchronously recurse multiple times, each __netpoll_free_async call can result in more __netpoll_free_async's. This means there is now a race between cleanup_work queues on multiple netpoll_info's on multiple devices and the configuration of a new netpoll. For example if a netconsole is set to enable 0, reconfigured, and enable 1 immediately, this netconsole will likely not work. Given the reason for __netpoll_free_async is it can be called when rtnl is not locked, if it is locked, we should be able to execute synchronously. It appears to be locked everywhere it's called from. Generalize the design pattern from the teaming driver for current callers of __netpoll_free_async. CC: Neil Horman CC: "David S. Miller" Signed-off-by: Debabrata Banerjee Signed-off-by: David S. Miller commit 5032d079909d1ac5c2535acc32d5f01cd245d8ea Author: John Fastabend Date: Thu Oct 18 13:58:35 2018 -0700 bpf: skmsg, fix psock create on existing kcm/tls port Before using the psock returned by sk_psock_get() when adding it to a sockmap we need to ensure it is actually a sockmap based psock. Previously we were only checking this after incrementing the reference counter which was an error. This resulted in a slab-out-of-bounds error when the psock was not actually a sockmap type. This moves the check up so the reference counter is only used if it is a sockmap psock. Eric reported the following KASAN BUG, BUG: KASAN: slab-out-of-bounds in atomic_read include/asm-generic/atomic-instrumented.h:21 [inline] BUG: KASAN: slab-out-of-bounds in refcount_inc_not_zero_checked+0x97/0x2f0 lib/refcount.c:120 Read of size 4 at addr ffff88019548be58 by task syz-executor4/22387 CPU: 1 PID: 22387 Comm: syz-executor4 Not tainted 4.19.0-rc7+ #264 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+0x1c4/0x2b4 lib/dump_stack.c:113 print_address_description.cold.8+0x9/0x1ff mm/kasan/report.c:256 kasan_report_error mm/kasan/report.c:354 [inline] 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 kasan_check_read+0x11/0x20 mm/kasan/kasan.c:272 atomic_read include/asm-generic/atomic-instrumented.h:21 [inline] refcount_inc_not_zero_checked+0x97/0x2f0 lib/refcount.c:120 sk_psock_get include/linux/skmsg.h:379 [inline] sock_map_link.isra.6+0x41f/0xe30 net/core/sock_map.c:178 sock_hash_update_common+0x19b/0x11e0 net/core/sock_map.c:669 sock_hash_update_elem+0x306/0x470 net/core/sock_map.c:738 map_update_elem+0x819/0xdf0 kernel/bpf/syscall.c:818 Signed-off-by: John Fastabend Reported-by: Eric Dumazet Fixes: 604326b41a6f ("bpf, sockmap: convert to generic sk_msg interface") Signed-off-by: Daniel Borkmann commit a0db8a7516d9eb9ebb7400df21fc061fe472b8ad Author: Dan Carpenter Date: Fri Oct 19 12:18:19 2018 +0300 scsi: myrs: Fix the processor absent message in processor_show() If both processors are absent then it's supposed to print that, but instead we print that just the second processor is absent. Fixes: 77266186397c ("scsi: myrs: Add Mylex RAID controller (SCSI interface)") Signed-off-by: Dan Carpenter Signed-off-by: Martin K. Petersen commit 9a231caa77c3afdf775bcc9b7c403244deb3d539 Author: Dan Carpenter Date: Fri Oct 19 12:16:28 2018 +0300 scsi: myrs: Fix a logical vs bitwise bug The || was supposed to be |. The original code just sets ->result to 1. Fixes: 77266186397c ("scsi: myrs: Add Mylex RAID controller (SCSI interface)") Signed-off-by: Dan Carpenter Signed-off-by: Martin K. Petersen commit f4445bb93d82a984657b469e63118c2794a4c3d3 Author: Gustavo A. R. Silva Date: Thu Oct 18 18:59:39 2018 +0200 scsi: hisi_sas: Fix NULL pointer dereference There is a NULL pointer dereference in case *slot* happens to be NULL at lines 1053 and 1878: struct hisi_sas_cq *cq = &hisi_hba->cq[slot->dlvry_queue]; Notice that *slot* is being NULL checked at lines 1057 and 1881: if (slot), which implies it may be NULL. Fix this by placing the declaration and definition of variable cq, which contains the pointer dereference slot->dlvry_queue, after slot has been properly NULL checked. Addresses-Coverity-ID: 1474515 ("Dereference before null check") Addresses-Coverity-ID: 1474520 ("Dereference before null check") Fixes: 584f53fe5f52 ("scsi: hisi_sas: Fix the race between IO completion and timeout for SMP/internal IO") Signed-off-by: Gustavo A. R. Silva Reviewed-by: Xiang Chen Signed-off-by: Martin K. Petersen commit d592dd64006f8026e2639e81b9705b20824b73fc Author: James Bottomley Date: Thu Oct 18 16:50:56 2018 -0700 scsi: myrs: fix build failure on 32 bit For 32 bit versions we have to be careful about divisions of 64 bit quantities so use do_div() instead of a direct division. This fixes a warning about _uldivmod being undefined in certain configurations Fixes: 77266186397c ("scsi: myrs: Add Mylex RAID controller") Reported-by: kbuild test robot Signed-off-by: James Bottomley Reviewed-by: Hannes Reinecke Tested-by: Randy Dunlap # build-tested Signed-off-by: Martin K. Petersen commit 540fefc08f75aedb517acbf525d393b8efddabd9 Author: Alexei Starovoitov Date: Fri Oct 19 13:52:38 2018 -0700 bpf: remove unused variable fix the following warning ../kernel/bpf/syscall.c: In function ‘map_lookup_and_delete_elem’: ../kernel/bpf/syscall.c:1010:22: warning: unused variable ‘ptr’ [-Wunused-variable] void *key, *value, *ptr; ^~~ Fixes: bd513cd08f10 ("bpf: add MAP_LOOKUP_AND_DELETE_ELEM syscall") Signed-off-by: Alexei Starovoitov commit d375e344781d099697cdc0fb4ee8b9170558f272 Merge: 2929ad29a301 2cb494a36c98 Author: Alexei Starovoitov Date: Fri Oct 19 13:49:35 2018 -0700 Merge branch 'cg_skb_direct_pkt_access' Song Liu says: ==================== Changes v7 -> v8: 1. Dynamically allocate the dummy sk to avoid race conditions. Changes v6 -> v7: 1. Make dummy sk a global variable (test_run_sk). Changes v5 -> v6: 1. Fixed dummy sk in bpf_prog_test_run_skb() as suggested by Eric Dumazet. Changes v4 -> v5: 1. Replaced bpf_compute_and_save_data_pointers() with bpf_compute_and_save_data_end(); Replaced bpf_restore_data_pointers() with bpf_restore_data_end(). 2. Fixed indentation in test_verifier.c Changes v3 -> v4: 1. Fixed crash issue reported by Alexei. Changes v2 -> v3: 1. Added helper function bpf_compute_and_save_data_pointers() and bpf_restore_data_pointers(). Changes v1 -> v2: 1. Updated the list of read-only fields, and read-write fields. 2. Added dummy sk to bpf_prog_test_run_skb(). This set enables BPF program of type BPF_PROG_TYPE_CGROUP_SKB to access some __skb_buff data directly. ==================== Signed-off-by: Alexei Starovoitov commit 2cb494a36c98279c5c6ce8e99cf9776f15449ade Author: Song Liu Date: Fri Oct 19 09:57:58 2018 -0700 bpf: add tests for direct packet access from CGROUP_SKB Tests are added to make sure CGROUP_SKB cannot access: tc_classid, data_meta, flow_keys and can read and write: mark, prority, and cb[0-4] and can read other fields. To make selftest with skb->sk work, a dummy sk is added in bpf_prog_test_run_skb(). Signed-off-by: Song Liu Signed-off-by: Alexei Starovoitov commit b39b5f411dcfce28ff954e5d6acb2c11be3cb0ec Author: Song Liu Date: Fri Oct 19 09:57:57 2018 -0700 bpf: add cg_skb_is_valid_access for BPF_PROG_TYPE_CGROUP_SKB BPF programs of BPF_PROG_TYPE_CGROUP_SKB need to access headers in the skb. This patch enables direct access of skb for these programs. Two helper functions bpf_compute_and_save_data_end() and bpf_restore_data_end() are introduced. There are used in __cgroup_bpf_run_filter_skb(), to compute proper data_end for the BPF program, and restore original data afterwards. Signed-off-by: Song Liu Signed-off-by: Alexei Starovoitov commit 2929ad29a3015120ab64c86f362fc2a590ceb69c Merge: 78de35460a5c a64af0ef1c1d Author: Alexei Starovoitov Date: Fri Oct 19 13:43:09 2018 -0700 Merge branch 'improve_perf_barriers' Daniel Borkmann says: ==================== This set first adds smp_* barrier variants to tools infrastructure and updates perf and libbpf to make use of them. For details, please see individual patches, thanks! Arnaldo, if there are no objections, could this be routed via bpf-next with Acked-by's due to later dependencies in libbpf? Alternatively, I could also get the 2nd patch out during merge window, but perhaps it's okay to do in one go as there shouldn't be much conflict in perf itself. Thanks! v1 -> v2: - add common helper and switch to acquire/release variants when possible, thanks Peter! ==================== Signed-off-by: Alexei Starovoitov commit a64af0ef1c1dbd1e8be65a6ebbf5950305b27e48 Author: Daniel Borkmann Date: Fri Oct 19 15:51:03 2018 +0200 bpf, libbpf: use correct barriers in perf ring buffer walk Given libbpf is a generic library and not restricted to x86-64 only, the compiler barrier in bpf_perf_event_read_simple() after fetching the head needs to be replaced with smp_rmb() at minimum. Also, writing out the tail we should use WRITE_ONCE() to avoid store tearing. Now that we have the logic in place in ring_buffer_read_head() and ring_buffer_write_tail() helper also used by perf tool which would select the correct and best variant for a given architecture (e.g. x86-64 can avoid CPU barriers entirely), make use of these in order to fix bpf_perf_event_read_simple(). Fixes: d0cabbb021be ("tools: bpf: move the event reading loop to libbpf") Fixes: 39111695b1b8 ("samples: bpf: add bpf_perf_event_output example") Signed-off-by: Daniel Borkmann Cc: Peter Zijlstra Cc: "Paul E. McKenney" Cc: Will Deacon Cc: Arnaldo Carvalho de Melo Signed-off-by: Alexei Starovoitov commit 09d62154f61316f7e97eae3f31ef8770c7e4b386 Author: Daniel Borkmann Date: Fri Oct 19 15:51:02 2018 +0200 tools, perf: add and use optimized ring_buffer_{read_head, write_tail} helpers Currently, on x86-64, perf uses LFENCE and MFENCE (rmb() and mb(), respectively) when processing events from the perf ring buffer which is unnecessarily expensive as we can do more lightweight in particular given this is critical fast-path in perf. According to Peter rmb()/mb() were added back then via a94d342b9cb0 ("tools/perf: Add required memory barriers") at a time where kernel still supported chips that needed it, but nowadays support for these has been ditched completely, therefore we can fix them up as well. While for x86-64, replacing rmb() and mb() with smp_*() variants would result in just a compiler barrier for the former and LOCK + ADD for the latter (__sync_synchronize() uses slower MFENCE by the way), Peter suggested we can use smp_{load_acquire,store_release}() instead for architectures where its implementation doesn't resolve in slower smp_mb(). Thus, e.g. in x86-64 we would be able to avoid CPU barrier entirely due to TSO. For architectures where the latter needs to use smp_mb() e.g. on arm, we stick to cheaper smp_rmb() variant for fetching the head. This work adds helpers ring_buffer_read_head() and ring_buffer_write_tail() for tools infrastructure that either switches to smp_load_acquire() for architectures where it is cheaper or uses READ_ONCE() + smp_rmb() barrier for those where it's not in order to fetch the data_head from the perf control page, and it uses smp_store_release() to write the data_tail. Latter is smp_mb() + WRITE_ONCE() combination or a cheaper variant if architecture allows for it. Those that rely on smp_rmb() and smp_mb() can further improve performance in a follow up step by implementing the two under tools/arch/*/include/asm/barrier.h such that they don't have to fallback to rmb() and mb() in tools/include/asm/barrier.h. Switch perf to use ring_buffer_read_head() and ring_buffer_write_tail() so it can make use of the optimizations. Later, we convert libbpf as well to use the same helpers. Side note [0]: the topic has been raised of whether one could simply use the C11 gcc builtins [1] for the smp_load_acquire() and smp_store_release() instead: __atomic_load_n(ptr, __ATOMIC_ACQUIRE); __atomic_store_n(ptr, val, __ATOMIC_RELEASE); Kernel and (presumably) tooling shipped along with the kernel has a minimum requirement of being able to build with gcc-4.6 and the latter does not have C11 builtins. While generally the C11 memory models don't align with the kernel's, the C11 load-acquire and store-release alone /could/ suffice, however. Issue is that this is implementation dependent on how the load-acquire and store-release is done by the compiler and the mapping of supported compilers must align to be compatible with the kernel's implementation, and thus needs to be verified/tracked on a case by case basis whether they match (unless an architecture uses them also from kernel side). The implementations for smp_load_acquire() and smp_store_release() in this patch have been adapted from the kernel side ones to have a concrete and compatible mapping in place. [0] http://patchwork.ozlabs.org/patch/985422/ [1] https://gcc.gnu.org/onlinedocs/gcc/_005f_005fatomic-Builtins.html Signed-off-by: Daniel Borkmann Acked-by: Peter Zijlstra (Intel) Cc: "Paul E. McKenney" Cc: Will Deacon Cc: Arnaldo Carvalho de Melo Signed-off-by: Alexei Starovoitov commit 78de35460a5cc206d42a239cb215c966a83ac283 Author: Anders Roxell Date: Fri Oct 19 16:24:36 2018 +0200 selftests/bpf: add missing executables to .gitignore Fixes: 371e4fcc9d96 ("selftests/bpf: cgroup local storage-based network counters") Fixes: 370920c47b26 ("selftests/bpf: Test libbpf_{prog,attach}_type_by_name") Signed-off-by: Anders Roxell Acked-by: Yonghong Song Signed-off-by: Alexei Starovoitov commit 43ed375ff249e9f2fc986f77ed9746561895aeb3 Merge: 3ddeac6705ab 43b987d23d6b Author: Alexei Starovoitov Date: Fri Oct 19 13:24:31 2018 -0700 Merge branch 'queue_stack_maps' Mauricio Vasquez says: ==================== In some applications this is needed have a pool of free elements, for example the list of free L4 ports in a SNAT. None of the current maps allow to do it as it is not possible to get any element without having they key it is associated to, even if it were possible, the lack of locking mecanishms in eBPF would do it almost impossible to be implemented without data races. This patchset implements two new kind of eBPF maps: queue and stack. Those maps provide to eBPF programs the peek, push and pop operations, and for userspace applications a new bpf_map_lookup_and_delete_elem() is added. Signed-off-by: Mauricio Vasquez B v2 -> v3: - Remove "almost dead code" in syscall.c - Remove unnecessary copy_from_user in bpf_map_lookup_and_delete_elem - Rebase v1 -> v2: - Put ARG_PTR_TO_UNINIT_MAP_VALUE logic into a separated patch - Fix missing __this_cpu_dec & preempt_enable calls in kernel/bpf/syscall.c RFC v4 -> v1: - Remove roundup to power of 2 in memory allocation - Remove count and use a free slot to check if queue/stack is empty - Use if + assigment for wrapping indexes - Fix some minor style issues - Squash two patches together RFC v3 -> RFC v4: - Revert renaming of kernel/bpf/stackmap.c - Remove restriction on value size - Remove len arguments from peek/pop helpers - Add new ARG_PTR_TO_UNINIT_MAP_VALUE RFC v2 -> RFC v3: - Return elements by value instead that by reference - Implement queue/stack base on array and head + tail indexes - Rename stack trace related files to avoid confusion and conflicts RFC v1 -> RFC v2: - Create two separate maps instead of single one + flags - Implement bpf_map_lookup_and_delete syscall - Support peek operation - Define replacement policy through flags in the update() method - Add eBPF side tests ==================== Acked-by: Daniel Borkmann Signed-off-by: Alexei Starovoitov commit 43b987d23d6bd08db41a9c4a85aacfb3f0b2a94c Author: Mauricio Vasquez B Date: Thu Oct 18 15:16:41 2018 +0200 selftests/bpf: add test cases for queue and stack maps test_maps: Tests that queue/stack maps are behaving correctly even in corner cases test_progs: Tests new ebpf helpers Signed-off-by: Mauricio Vasquez B Acked-by: Song Liu Signed-off-by: Alexei Starovoitov commit da4e1b15f67613eca7ae998abd996cfee7cff1ba Author: Mauricio Vasquez B Date: Thu Oct 18 15:16:36 2018 +0200 Sync uapi/bpf.h to tools/include Sync both files. Signed-off-by: Mauricio Vasquez B Acked-by: Song Liu Signed-off-by: Alexei Starovoitov commit bd513cd08f10cbe28856f99ae951e86e86803861 Author: Mauricio Vasquez B Date: Thu Oct 18 15:16:30 2018 +0200 bpf: add MAP_LOOKUP_AND_DELETE_ELEM syscall The previous patch implemented a bpf queue/stack maps that provided the peek/pop/push functions. There is not a direct relationship between those functions and the current maps syscalls, hence a new MAP_LOOKUP_AND_DELETE_ELEM syscall is added, this is mapped to the pop operation in the queue/stack maps and it is still to implement in other kind of maps. Signed-off-by: Mauricio Vasquez B Acked-by: Song Liu Signed-off-by: Alexei Starovoitov commit f1a2e44a3aeccb3ff18d3ccc0b0203e70b95bd92 Author: Mauricio Vasquez B Date: Thu Oct 18 15:16:25 2018 +0200 bpf: add queue and stack maps Queue/stack maps implement a FIFO/LIFO data storage for ebpf programs. These maps support peek, pop and push operations that are exposed to eBPF programs through the new bpf_map[peek/pop/push] helpers. Those operations are exposed to userspace applications through the already existing syscalls in the following way: BPF_MAP_LOOKUP_ELEM -> peek BPF_MAP_LOOKUP_AND_DELETE_ELEM -> pop BPF_MAP_UPDATE_ELEM -> push Queue/stack maps are implemented using a buffer, tail and head indexes, hence BPF_F_NO_PREALLOC is not supported. As opposite to other maps, queue and stack do not use RCU for protecting maps values, the bpf_map[peek/pop] have a ARG_PTR_TO_UNINIT_MAP_VALUE argument that is a pointer to a memory zone where to save the value of a map. Basically the same as ARG_PTR_TO_UNINIT_MEM, but the size has not be passed as an extra argument. Our main motivation for implementing queue/stack maps was to keep track of a pool of elements, like network ports in a SNAT, however we forsee other use cases, like for exampling saving last N kernel events in a map and then analysing from userspace. Signed-off-by: Mauricio Vasquez B Acked-by: Song Liu Signed-off-by: Alexei Starovoitov commit 2ea864c58f19bf70a0e2415f9f1c53814e07f1b4 Author: Mauricio Vasquez B Date: Thu Oct 18 15:16:20 2018 +0200 bpf/verifier: add ARG_PTR_TO_UNINIT_MAP_VALUE ARG_PTR_TO_UNINIT_MAP_VALUE argument is a pointer to a memory zone used to save the value of a map. Basically the same as ARG_PTR_TO_UNINIT_MEM, but the size has not be passed as an extra argument. This will be used in the following patch that implements some new helpers that receive a pointer to be filled with a map value. Signed-off-by: Mauricio Vasquez B Acked-by: Song Liu Signed-off-by: Alexei Starovoitov commit c9d29f4658a5a6d2c2ba2afeb20ff763fc6286f9 Author: Mauricio Vasquez B Date: Thu Oct 18 15:16:14 2018 +0200 bpf/syscall: allow key to be null in map functions This commit adds the required logic to allow key being NULL in case the key_size of the map is 0. A new __bpf_copy_key function helper only copies the key from userpsace when key_size != 0, otherwise it enforces that key must be null. Signed-off-by: Mauricio Vasquez B Acked-by: Song Liu Signed-off-by: Alexei Starovoitov commit 144991602e6a14d667b295f1b099e609ce857772 Author: Mauricio Vasquez B Date: Thu Oct 18 15:16:09 2018 +0200 bpf: rename stack trace map operations In the following patches queue and stack maps (FIFO and LIFO datastructures) will be implemented. In order to avoid confusion and a possible name clash rename stack_map_ops to stack_trace_map_ops Signed-off-by: Mauricio Vasquez B Acked-by: Song Liu Signed-off-by: Alexei Starovoitov commit fe8376dbbd6ac1febb0fd6389e3ec4f349e70c71 Author: Helge Deller Date: Fri Oct 19 22:06:36 2018 +0200 parisc: Add PDC PAT cell_info() and pd_get_pdc_revisions() functions Add wrappers for the PDC_PAT_CELL_GET_INFO and PDC_PAT_PD_GET_PDC_INTERF_REV PAT PDC subfunctions. Both provide access to the PAT capability bitfield which can guide us if simultaneous PTLBs are allowed on the bus, and if firmware will rendezvous all processors within PDCE_Check in case of an HPMC. Signed-off-by: Helge Deller commit 32c1ceeabda3e37dd94129f915823e7cf0441fc9 Author: Helge Deller Date: Fri Oct 19 20:36:15 2018 +0200 parisc: Drop two instructions from pte lookup code Remove two instruction from the hot path. The temporary move to %r9 is unneccessary, and the zero-inialization of pte happens twice. Signed-off-by: Helge Deller commit a45a01160f1d46a3021755a2cf2f433aec008e38 Author: Helge Deller Date: Fri Oct 19 20:31:20 2018 +0200 parisc: Use zdep for shlw macro on PA1.1 and PA2.0 The zdep and depw,z mnemonics generate the same code. The assembler will accept the depw,z mnemonic when generating PA 1.x code. The zdep mnemonic is okay when generating PA 2.0 code. This patch changes depw,z to zdep in the current shlw macro, while the binary code will be the same. Signed-off-by: Helge Deller Signed-off-by: John David Anglin commit f18b7e914fd2ed5e8b5733644cefcf62f7582679 Author: Sibi Sankar Date: Wed Oct 17 19:25:27 2018 +0530 remoteproc: qcom: q6v5-mss: Register segments/dumpfn for coredump Register the MDT segments, custom dumpfn and private data with the remoteproc core dump functionality. Signed-off-by: Sibi Sankar Signed-off-by: Bjorn Andersson commit 7dd8ade24dc2a35e683c5eccdb81ee9e279b0348 Author: Sibi Sankar Date: Wed Oct 17 19:25:26 2018 +0530 remoteproc: qcom: q6v5-mss: Add custom dump function for modem The per segment dump function is responsible for loading the mba before device memory segments associated with coredump can be populated and for cleaning up the resources post coredump. Signed-off-by: Sibi Sankar Signed-off-by: Bjorn Andersson commit 0304530ddd29300aed7ef6e5b2fd409c7a0162e6 Author: Sibi Sankar Date: Wed Oct 17 19:25:25 2018 +0530 remoteproc: qcom: q6v5-mss: Refactor mba load/unload sequence Refactor re-useable parts of mba load/unload sequence into mba_load and mba_reclaim respectively. This is done in order to prevent code duplication for modem coredump, which requires the mba to be loaded before dumping the segments. The following changes in functionality are intended: * Add software bypass to avoid high MX current in mpss error path. * Remove the proxy votes of clk/regs only after the active/reset clks/regs. * Reclaim MBA memory after mpss_load failure in mba_reclaim func. * Set/Unset the dump_mba_loaded flag on mba_load/mba_reclaim respectively. Signed-off-by: Sibi Sankar Signed-off-by: Bjorn Andersson commit ab8f873bb90da7bbe40e2f41c92a4971c4f0dc76 Author: Sibi Sankar Date: Wed Oct 17 19:25:24 2018 +0530 remoteproc: Add mechanism for custom dump function assignment This patch adds a mechanism for assigning each rproc dump segment with a custom dump function and private data. The dump function is to be called for each rproc segment during coredump if assigned. Signed-off-by: Sibi Sankar [bjorn: reordred arguments to rproc_coredump_add_custom_segment()] Signed-off-by: Bjorn Andersson commit 2fda5ada07f36f6cde39a52e7f05d86ea8ffdc33 Author: Arnaldo Carvalho de Melo Date: Fri Oct 19 15:47:34 2018 -0300 perf evsel: Introduce per event max_events property This simply adds the field to 'struct perf_evsel' and allows setting it via the event parser, to test it lets trace trace: First look at where in a function that receives an evsel we can put a probe to read how evsel->max_events was setup: # perf probe -x ~/bin/perf -L trace__event_handler 0 static int trace__event_handler(struct trace *trace, struct perf_evsel *evsel, union perf_event *event __maybe_unused, struct perf_sample *sample) 3 { 4 struct thread *thread = machine__findnew_thread(trace->host, sample->pid, sample->tid); 5 int callchain_ret = 0; 7 if (sample->callchain) { 8 callchain_ret = trace__resolve_callchain(trace, evsel, sample, &callchain_cursor); 9 if (callchain_ret == 0) { 10 if (callchain_cursor.nr < trace->min_stack) 11 goto out; 12 callchain_ret = 1; } } See what variables we can probe at line 7: # perf probe -x ~/bin/perf -V trace__event_handler:7 Available variables at trace__event_handler:7 @ int callchain_ret struct perf_evsel* evsel struct perf_sample* sample struct thread* thread struct trace* trace union perf_event* event Add a probe at that line asking for evsel->max_events to be collected and named as "max_events": # perf probe -x ~/bin/perf trace__event_handler:7 'max_events=evsel->max_events' Added new event: probe_perf:trace__event_handler (on trace__event_handler:7 in /home/acme/bin/perf with max_events=evsel->max_events) You can now use it in all perf tools, such as: perf record -e probe_perf:trace__event_handler -aR sleep 1 Now use 'perf trace', here aliased to just 'trace' and trace trace, i.e. the first 'trace' is tracing just that 'probe_perf:trace__event_handler' event, while the traced trace is tracing all scheduler tracepoints, will stop at two events (--max-events 2) and will just set evsel->max_events for all the sched tracepoints to 9, we will see the output of both traces intermixed: # trace -e *perf:*event_handler trace --max-events 2 -e sched:*/nr=9/ 0.000 :0/0 sched:sched_waking:comm=rcu_sched pid=10 prio=120 target_cpu=000 0.009 :0/0 sched:sched_wakeup:comm=rcu_sched pid=10 prio=120 target_cpu=000 0.000 trace/23949 probe_perf:trace__event_handler:(48c34a) max_events=0x9 0.046 trace/23949 probe_perf:trace__event_handler:(48c34a) max_events=0x9 # Now, if the traced trace sends its output to /dev/null, we'll see just what the first level trace outputs: that evsel->max_events is indeed being set to 9: # trace -e *perf:*event_handler trace -o /dev/null --max-events 2 -e sched:*/nr=9/ 0.000 trace/23961 probe_perf:trace__event_handler:(48c34a) max_events=0x9 0.030 trace/23961 probe_perf:trace__event_handler:(48c34a) max_events=0x9 # Now that we can set evsel->max_events, we can go to the next step, honour that per-event property in 'perf trace'. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Milian Wolff Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-og00yasj276joem6e14l1eas@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 4ab7e05dd070600833680bd318d6d962f010caa2 Author: Laurence Rochfort Date: Wed Oct 10 22:24:26 2018 +0100 staging: gasket: Fix sparse "incorrect type in assignment" warnings. Remove the coherent buffer __iomem cookie because the buffer is allocated from dma_alloc_coherent(). warning: incorrect type in assignment (different address spaces) expected unsigned char [noderef] [usertype] *virt_base got void *[assigned] mem warning: incorrect type in argument 3 (different address spaces) expected void *cpu_addr got unsigned char [noderef] [usertype] *virt_base Signed-off-by: Laurence Rochfort Reviewed-by: Todd Poynor Signed-off-by: Greg Kroah-Hartman commit 8ae925f02553240a4c15a1e80a6dfc5c0fa95e67 Author: Todd Poynor Date: Tue Oct 16 05:03:07 2018 -0700 staging: gasket: remove debug logs for callback invocation Debug logs for device-specific callback invocation aren't very useful, remove. Signed-off-by: Todd Poynor Signed-off-by: Greg Kroah-Hartman commit e21d5cca3a1bc1e7c1f61796e71c060704bfe863 Author: Todd Poynor Date: Tue Oct 16 05:03:08 2018 -0700 staging: gasket: remove debug logs in page table mapping calls Remove very noisy debug logs that also contain typos and incorrect output formats. Signed-off-by: Todd Poynor Signed-off-by: Greg Kroah-Hartman commit 95f7ed6b7d29052c30cfed47b838f39bf432a910 Author: Mamta Shukla Date: Sat Oct 13 12:26:06 2018 +0530 staging: rtl8188eu: core: Use sizeof(*p) instead of sizeof(struct P) for memory allocation Use sizeof(*ptr) instead of sizeof(ptr_type) makes memory allocation easy in case the type of pointer changes. Fix all checkpatch reported issues for "CHECK: Prefer kzalloc(sizeof(*

)...) over kzalloc(sizeof(struct

)...)". Signed-off-by: Mamta Shukla Reviewed-by: Daniel Vetter Signed-off-by: Greg Kroah-Hartman commit 8b8429b00086d0d2a4eb6dd0ec96d4020d5fe8c8 Author: Maya Nakamura Date: Tue Oct 16 00:53:09 2018 -0700 staging: ks7010: Remove extra blank line Remove extra blank line. Issue found by checkpatch.pl. Signed-off-by: Maya Nakamura Acked-by: Julia Lawall Reviewed-by: Vaishali Thakkar Signed-off-by: Greg Kroah-Hartman commit d6de4674d369c2af3a797a208a35ed53b39dc556 Author: Maya Nakamura Date: Tue Oct 16 23:15:21 2018 -0700 staging: gasket: Remove extra blank line Remove extra blank line. Issue found by checkpatch.pl. Signed-off-by: Maya Nakamura Reviewed-by: Vaishali Thakkar Acked-by: Todd Poynor Signed-off-by: Greg Kroah-Hartman commit bfff520b54ab04d6bc94220b4e028872442ea643 Author: Kimberly Brown Date: Wed Oct 17 21:14:27 2018 -0400 staging: media: davinci_vpfe: Fix spelling mistake in enum Fix the spelling mistake in enumerator identifier RESIZER_MODE_CONTINIOUS. 'CONTINIOUS' should be 'CONTINUOUS'. Issue found by checkpatch. Signed-off-by: Kimberly Brown Reviewed-by: Vaishali Thakkar Signed-off-by: Greg Kroah-Hartman commit 02e6b5ebeda1136f82ad685124918bab70e5107b Author: Maya Nakamura Date: Wed Oct 17 18:16:00 2018 -0700 staging: speakup: Add a pair of braces Add a pair of braces to make all arms of the if statement consistent. Issue found by checkpatch.pl. Signed-off-by: Maya Nakamura Acked-by: Samuel Thibault Signed-off-by: Greg Kroah-Hartman commit 2bc51572aa6ce39cb2e21b73e5278bb7cd98762b Author: Maya Nakamura Date: Thu Oct 18 01:29:42 2018 -0700 staging: wlan-ng: Replace long int with long Replace long int with long as int is unnecessary according to the checkpatch.pl warning. K&R write, 'The word int can be omitted... and typically is.' Signed-off-by: Maya Nakamura Signed-off-by: Greg Kroah-Hartman commit 3952105df4723abbd36b57e88c8dad42cf6c8b59 Author: Sibi Sankar Date: Wed Oct 17 19:25:23 2018 +0530 remoteproc: Introduce custom dump function for each remoteproc segment Introduce custom dump function and private data per remoteproc dump segment. The dump function is responsible for filling the device memory segment associated with coredump Signed-off-by: Sibi Sankar Signed-off-by: Bjorn Andersson commit 2e2d6f0342be7f73a34526077fa96f42f0e8c661 Merge: 9333f2079203 48995423143a Author: David S. Miller Date: Fri Oct 19 11:03:06 2018 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net net/sched/cls_api.c has overlapping changes to a call to nlmsg_parse(), one (from 'net') added rtm_tca_policy instead of NULL to the 5th argument, and another (from 'net-next') added cb->extack instead of NULL to the 6th argument. net/ipv4/ipmr_base.c is a case of a bug fix in 'net' being done to code which moved (to mr_table_dump)) in 'net-next'. Thanks to David Ahern for the heads up. Signed-off-by: David S. Miller commit 46b8306480fb424abd525acc1763da1c63a27d8a Author: David S. Miller Date: Fri Oct 19 10:52:52 2018 -0700 sparc: Fix parport build warnings. If PARPORT_PC_FIFO is not enabled, do not provide the dma lock macros and lock definition. Otherwise: ./arch/sparc/include/asm/parport.h:24:24: warning: ‘dma_spin_lock’ defined but not used [-Wunused-variable] static DEFINE_SPINLOCK(dma_spin_lock); ^~~~~~~~~~~~~ ./include/linux/spinlock_types.h:81:39: note: in definition of macro ‘DEFINE_SPINLOCK’ #define DEFINE_SPINLOCK(x) spinlock_t x = __SPIN_LOCK_UNLOCKED(x) Signed-off-by: David S. Miller commit 9333f207920336575cba4ed60603c1cdb79ace4f Author: YueHaibing Date: Fri Oct 19 12:02:59 2018 +0000 rocker: Drop pointless static qualifier There is no need to have the 'struct rocker_desc_info *desc_info' variable static since new value always be assigned before use it. Signed-off-by: YueHaibing Acked-by: Jiri Pirko Signed-off-by: David S. Miller commit f39f8688888ae74fa8deae2d01289b69b4727394 Author: Dmitry Torokhov Date: Tue Oct 16 17:07:35 2018 -0700 Input: synaptics - avoid using uninitialized variable when probing synaptics_detect() does not check whether sending commands to the device succeeds and instead relies on getting unique data from the device. Let's make sure we seed entire buffer with zeroes to make sure we will not use garbage on stack that just happen to be 0x47. Reported-by: syzbot+13cb3b01d0784e4ffc3f@syzkaller.appspotmail.com Reviewed-by: Benjamin Tissoires Reviewed-by: Peter Hutterer Signed-off-by: Dmitry Torokhov commit cbe3f898d159f4a6ed12121672c823b780df32d3 Author: Vitaly Kuznetsov Date: Fri Oct 19 16:16:03 2018 +0200 x86/kvm/nVMX: tweak shadow fields It seems we have some leftovers from times when 'unrestricted guest' wasn't exposed to L1. Stop shadowing GUEST_CS_{BASE,LIMIT,AR_SELECTOR} and GUEST_ES_BASE, shadow GUEST_SS_AR_BYTES as it was found that some hypervisors (e.g. Hyper-V without Enlightened VMCS) access it pretty often. Suggested-by: Paolo Bonzini Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini commit 8e31582a9ab18093c0b7708b52d7f79eed9a8688 Author: Bob Peterson Date: Fri Oct 19 11:31:06 2018 -0500 gfs2: Fix minor typo: couln't versus couldn't. Signed-off-by: Bob Peterson commit 01b6b7e6e01e18b2b54bba478fd16b787f3635dd Author: Hans de Goede Date: Wed Oct 10 15:16:40 2018 +0200 platform/x86: touchscreen_dmi: Add info for the Onda V80 Plus v3 tablet Add touchscreen platform data for the Onda V80 Plus v3 tablet. Signed-off-by: Hans de Goede Signed-off-by: Andy Shevchenko commit 30394a8e8c5601eb6936402c0f94f619d002fa97 Author: Marian Cepok Date: Mon Oct 8 09:25:05 2018 +0200 platform/x86: touchscreen_dmi: Add info for the Trekstor Primetab T13B tablet Add touchscreen info for the Trekstor Primetab T13B tablet. Reviewed-by: Hans de Goede Signed-off-by: Marian Cepok Signed-off-by: Andy Shevchenko commit 1a7938a632ce476b01a2dd7676246ca319eb295a Author: Andy Shevchenko Date: Fri Aug 31 11:34:31 2018 +0300 platform/x86: intel_telemetry: Get rid of custom macro Replace custom grown macro with generic INTEL_CPU_FAM6() one. No functional change intended. Signed-off-by: Andy Shevchenko commit 8d98b1ef368feeb7720b8b9b6f3bd93f2ad892bc Author: Rajneesh Bhardwaj Date: Sat Oct 6 12:21:13 2018 +0530 platform/x86: intel_telemetry: report debugfs failure On some Goldmont based systems such as ASRock J3455M the BIOS may not enable the IPC1 device that provides access to the PMC and PUNIT. In such scenarios, the IOSS and PSS resources from the platform device can not be obtained and result in a invalid telemetry_plt_config which is an internal data structure that holds platform config and is maintained by the telemetry platform driver. This is also applicable to the platforms where the BIOS supports IPC1 device under debug configurations but IPC1 is disabled by user or the policy. This change allows user to know the reason for not seeing entries under /sys/kernel/debug/telemetry/* when there is no apparent failure at boot. Cc: Matt Turner Cc: Len Brown Cc: Souvik Kumar Chakravarty Cc: Kuppuswamy Sathyanarayanan Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=198779 Acked-by: Matt Turner Signed-off-by: Rajneesh Bhardwaj Signed-off-by: Andy Shevchenko commit 504f7e82d0a43b4fbf5ab34270aa80335ccb2b0b Author: David E. Box Date: Fri Oct 12 09:28:16 2018 -0700 MAINTAINERS: intel_telemetry: Update maintainers info Remove Souvik who has left this role. Add Rajneesh and David who work jointly on telemetry updates for new platforms. Signed-off-by: David E. Box Signed-off-by: Rajneesh Bhardwaj Signed-off-by: Andy Shevchenko commit dbf0c5a6b1f8e7bec5e17baa60a1e04c28d90f9b Author: Matan Ziv-Av Date: Fri Sep 28 17:34:06 2018 +0300 platform/x86: Add LG Gram laptop special features driver A driver for LG Gram laptop supporting features not available through the standard interfaces: - Support for the 5 Fn keys that generate ACPI or WMI events. - Two software controlled LEDs: keyboard backlight (also controlled by hardware) and touchpad LED. - Extra features: reader mode, Fn lock, cooling mode, USB charge mode, and maximal battery charging level. Signed-off-by: Matan Ziv-Av Signed-off-by: Andy Shevchenko commit f15ac811e80b857a443476de60ce70d3e6049ae5 Author: Anders Roxell Date: Fri Oct 19 16:38:16 2018 +0200 selftests/kvm: add missing executables to .gitignore Fixes: 18178ff86217 ("KVM: selftests: add Enlightened VMCS test") Signed-off-by: Anders Roxell Signed-off-by: Paolo Bonzini commit 318e741ee13b5a72f3051d9bb6852b1f4d02d0bb Author: Olivier Moysan Date: Fri Oct 19 17:56:35 2018 +0200 ASoC: cs42l51: fix mclk support The MCLK clock is made optional for cs42l51 codec. However, ASoC DAPM clock supply widget, expects the clock to be defined unconditionally. Register MCLK DAPM conditionally in codec driver, depending on clock presence in DT. Fixes: 5e8d63a726f8 ("ASoC: cs42l51: add mclk support") Signed-off-by: Olivier Moysan Signed-off-by: Mark Brown commit bbc152825afc869ed6e0b58fdc5e3e477a6c15d5 Merge: ee75fa2ae0e2 b7c7be6f6bd2 Author: Jens Axboe Date: Fri Oct 19 09:47:19 2018 -0600 Merge branch 'nvme-4.20' of git://git.infradead.org/nvme into for-4.20/block Pull NVMe updates from Christoph: "The second batch of updates for Linux 4.20: - lot of fixes for issues found by static type checkers from Bart - two small fixes from Keith - fabrics cleanups in preparation of the TCP transport from Sagi - more cleanups from Chaitanya" * 'nvme-4.20' of git://git.infradead.org/nvme: nvme-fabrics: move controller options matching to fabrics nvme-rdma: always have a valid trsvcid nvme-pci: remove duplicate check nvme-pci: fix hot removal during error handling nvmet-fcloop: suppress a compiler warning nvme-core: make implicit seed truncation explicit nvmet-fc: fix kernel-doc headers nvme-fc: rework the request initialization code nvme-fc: introduce struct nvme_fcp_op_w_sgl nvme-fc: fix kernel-doc headers nvmet: avoid integer overflow in the discard code nvmet-rdma: declare local symbols static nvmet: use strlcpy() instead of strcpy() nvme-pci: fix nvme_suspend_queue() kernel-doc header nvme-core: rework a NQN copying operation nvme-core: declare local symbols static nvmet-rdma: check for timeout in nvme_rdma_wait_for_cm() nvmet: use strcmp() instead of strncmp() for subsystem lookup nvmet: remove unreachable code nvme: update node paths after adding new path commit 746a923b863a1065ef77324e1e43f19b1a3eab5c Author: Lukas Wunner Date: Thu Oct 18 15:15:05 2018 +0200 genirq: Fix race on spurious interrupt detection Commit 1e77d0a1ed74 ("genirq: Sanitize spurious interrupt detection of threaded irqs") made detection of spurious interrupts work for threaded handlers by: a) incrementing a counter every time the thread returns IRQ_HANDLED, and b) checking whether that counter has increased every time the thread is woken. However for oneshot interrupts, the commit unmasks the interrupt before incrementing the counter. If another interrupt occurs right after unmasking but before the counter is incremented, that interrupt is incorrectly considered spurious: time | irq_thread() | irq_thread_fn() | action->thread_fn() | irq_finalize_oneshot() | unmask_threaded_irq() /* interrupt is unmasked */ | | /* interrupt fires, incorrectly deemed spurious */ | | atomic_inc(&desc->threads_handled); /* counter is incremented */ v This is observed with a hi3110 CAN controller receiving data at high volume (from a separate machine sending with "cangen -g 0 -i -x"): The controller signals a huge number of interrupts (hundreds of millions per day) and every second there are about a dozen which are deemed spurious. In theory with high CPU load and the presence of higher priority tasks, the number of incorrectly detected spurious interrupts might increase beyond the 99,900 threshold and cause disablement of the interrupt. In practice it just increments the spurious interrupt count. But that can cause people to waste time investigating it over and over. Fix it by moving the accounting before the invocation of irq_finalize_oneshot(). [ tglx: Folded change log update ] Fixes: 1e77d0a1ed74 ("genirq: Sanitize spurious interrupt detection of threaded irqs") Signed-off-by: Lukas Wunner Signed-off-by: Thomas Gleixner Cc: Mathias Duckeck Cc: Akshay Bhat Cc: Casey Fitzpatrick Cc: stable@vger.kernel.org # v3.16+ Link: https://lkml.kernel.org/r/1dfd8bbd16163940648045495e3e9698e63b50ad.1539867047.git.lukas@wunner.de commit 5067a8cdd4ce3588fca2e0ee554f0f081650de8f Author: Arnaldo Carvalho de Melo Date: Thu Oct 18 16:38:27 2018 -0300 perf trace: Introduce --max-events Allow stopping tracing after a number of events take place, considering strace-like syscalls formatting as one event per enter/exit pair or when in a multi-process tracing session a syscall is interrupted and printed ending with '...'. Examples included in the documentation: Trace the first 4 open, openat or open_by_handle_at syscalls (in the future more syscalls may match here): $ perf trace -e open* --max-events 4 [root@jouet perf]# trace -e open* --max-events 4 2272.992 ( 0.037 ms): gnome-shell/1370 openat(dfd: CWD, filename: /proc/self/stat) = 31 2277.481 ( 0.139 ms): gnome-shell/3039 openat(dfd: CWD, filename: /proc/self/stat) = 65 3026.398 ( 0.076 ms): gnome-shell/3039 openat(dfd: CWD, filename: /proc/self/stat) = 65 4294.665 ( 0.015 ms): sed/15879 openat(dfd: CWD, filename: /etc/ld.so.cache, flags: CLOEXEC) = 3 $ Trace the first minor page fault when running a workload: # perf trace -F min --max-stack=7 --max-events 1 sleep 1 0.000 ( 0.000 ms): sleep/18006 minfault [__clear_user+0x1a] => 0x5626efa56080 (?k) __clear_user ([kernel.kallsyms]) load_elf_binary ([kernel.kallsyms]) search_binary_handler ([kernel.kallsyms]) __do_execve_file.isra.33 ([kernel.kallsyms]) __x64_sys_execve ([kernel.kallsyms]) do_syscall_64 ([kernel.kallsyms]) entry_SYSCALL_64 ([kernel.kallsyms]) # Trace the next min page page fault to take place on the first CPU: # perf trace -F min --call-graph=dwarf --max-events 1 --cpu 0 0.000 ( 0.000 ms): Web Content/17136 minfault [js::gc::Chunk::fetchNextDecommittedArena+0x4b] => 0x7fbe6181b000 (?.) js::gc::FreeSpan::initAsEmpty (inlined) js::gc::Arena::setAsNotAllocated (inlined) js::gc::Chunk::fetchNextDecommittedArena (/usr/lib64/firefox/libxul.so) js::gc::Chunk::allocateArena (/usr/lib64/firefox/libxul.so) js::gc::GCRuntime::allocateArena (/usr/lib64/firefox/libxul.so) js::gc::ArenaLists::allocateFromArena (/usr/lib64/firefox/libxul.so) js::gc::GCRuntime::tryNewTenuredThing (inlined) js::AllocateString (/usr/lib64/firefox/libxul.so) js::Allocate (inlined) JSThinInlineString::new_<(js::AllowGC)1> (inlined) AllocateInlineString<(js::AllowGC)1, unsigned char> (inlined) js::ConcatStrings<(js::AllowGC)1> (/usr/lib64/firefox/libxul.so) [0x18b26e6bc2bd] (/tmp/perf-17136.map) Tracing the next four ext4 operations on a specific CPU: # perf trace -e ext4:*/call-graph=fp/ --max-events 4 --cpu 3 0.000 mutt/3849 ext4:ext4_es_lookup_extent_enter:dev 253,2 ino 57277 lblk 0 ext4_es_lookup_extent ([kernel.kallsyms]) read (/usr/lib64/libc-2.26.so) 0.097 mutt/3849 ext4:ext4_es_lookup_extent_exit:dev 253,2 ino 57277 found 0 [0/0) 0 ext4_es_lookup_extent ([kernel.kallsyms]) read (/usr/lib64/libc-2.26.so) 0.141 mutt/3849 ext4:ext4_ext_map_blocks_enter:dev 253,2 ino 57277 lblk 0 len 1 flags ext4_ext_map_blocks ([kernel.kallsyms]) read (/usr/lib64/libc-2.26.so) 0.184 mutt/3849 ext4:ext4_ext_load_extent:dev 253,2 ino 57277 lblk 1516511 pblk 18446744071750013657 __read_extent_tree_block ([kernel.kallsyms]) __read_extent_tree_block ([kernel.kallsyms]) ext4_find_extent ([kernel.kallsyms]) ext4_ext_map_blocks ([kernel.kallsyms]) ext4_map_blocks ([kernel.kallsyms]) ext4_mpage_readpages ([kernel.kallsyms]) read_pages ([kernel.kallsyms]) __do_page_cache_readahead ([kernel.kallsyms]) ondemand_readahead ([kernel.kallsyms]) generic_file_read_iter ([kernel.kallsyms]) __vfs_read ([kernel.kallsyms]) vfs_read ([kernel.kallsyms]) ksys_read ([kernel.kallsyms]) do_syscall_64 ([kernel.kallsyms]) entry_SYSCALL_64 ([kernel.kallsyms]) read (/usr/lib64/libc-2.26.so) # Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Milian Wolff Cc: Namhyung Kim Cc: Rudá Moura Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-sweh107bs7ol5bzls0m4tqdz@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 4ba8b3ebf4f8f583c2c01da20e4d110a5881ffdd Author: Arnaldo Carvalho de Melo Date: Thu Oct 18 15:24:07 2018 -0300 tools lib subcmd: Introduce OPTION_ULONG For completeness, will be used in 'perf trace --max-events'. Cc: Adrian Hunter Cc: Andi Kleen Cc: David Ahern Cc: Jiri Olsa Cc: Josh Poimboeuf Cc: Kim Phillips Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-glaj3pwespxfj2fdjs9a20b6@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 389373d3306553896a9e218493e5b6175c844eb0 Author: Hongxu Jia Date: Thu Oct 18 16:26:13 2018 +0800 perf arm64: Fix generate system call table failed with /tmp mounted with noexec When /tmp is mounted with noexec, mksyscalltbl fails. [snip] |perf-1.0/tools/perf/arch/arm64/entry/syscalls//mksyscalltbl: /tmp/create-table-6VGPSt: Permission denied [snip] Add variable TMPDIR as prefix dir of the temporary file, if it is set, replace default /tmp. Signed-off-by: Hongxu Jia Cc: Alexander Shishkin Cc: Hendrik Brueckner Cc: Jiri Olsa Cc: Kim Phillips Cc: Michael Ellerman Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Sébastien Boisvert Cc: Thomas Richter Fixes: 2b5882435606 ("perf arm64: Generate system call table from asm/unistd.h") LPU-Reference: 1539851173-14959-1-git-send-email-hongxu.jia@windriver.com Link: https://lkml.kernel.org/n/tip-1qrgq840ci0c5cy4oww957ge@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 4debef5510071032c6d5dace31ca1cc42a120073 Author: James Morse Date: Fri Sep 21 21:49:19 2018 +0100 arm64: KVM: Guests can skip __install_bp_hardening_cb()s HYP work enable_smccc_arch_workaround_1() passes NULL as the hyp_vecs start and end if the HVC conduit is in use, and ARM_SMCCC_ARCH_WORKAROUND_1 is detected. If the guest kernel happened to be built with KVM_INDIRECT_VECTORS, we go on to allocate a slot, memcpy() the empty workaround in and do the appropriate cache maintenance. This works as we always tell memcpy() the range is 0, so it never accesses the NULL src pointer, but we still do the cache maintenance. If hyp_vecs_start is NULL we know we're a guest, just update the fn like the !KVM_INDIRECT_VECTORS version. Reviewed-by: Julien Thierry Acked-by: Marc Zyngier Signed-off-by: James Morse Signed-off-by: Catalin Marinas commit d8b2a8e9c06bc389659716e81d1c2b1f147611d1 Author: Charles Keepax Date: Fri Oct 19 13:44:38 2018 +0100 regulator: lochnagar: Use a consisent comment style for SPDX header Update the rest of the comment at the start of the file to also use C++ style comments to match the required style of the SPDX header. Signed-off-by: Charles Keepax Signed-off-by: Mark Brown commit e42b4a507efa19a90c63e7968c93c4f82d3bc805 Merge: 1e58e5e59148 e4e11cc0f81e Author: Paolo Bonzini Date: Fri Oct 19 15:24:24 2018 +0200 Merge tag 'kvmarm-for-v4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD KVM/arm updates for 4.20 - Improved guest IPA space support (32 to 52 bits) - RAS event delivery for 32bit - PMU fixes - Guest entry hardening - Various cleanups commit b61b8bba18fe2b63d38fdaf9b83de25e2d787dfe Author: Jithu Joseph Date: Fri Oct 12 15:51:01 2018 -0700 x86/intel_rdt: Prevent pseudo-locking from using stale pointers When the last CPU in an rdt_domain goes offline, its rdt_domain struct gets freed. Current pseudo-locking code is unaware of this scenario and tries to dereference the freed structure in a few places. Add checks to prevent pseudo-locking code from doing this. While further work is needed to seamlessly restore resource groups (not just pseudo-locking) to their configuration when the domain is brought back online, the immediate issue of invalid pointers is addressed here. Fixes: f4e80d67a5274 ("x86/intel_rdt: Resctrl files reflect pseudo-locked information") Fixes: 443810fe61605 ("x86/intel_rdt: Create debugfs files for pseudo-locking testing") Fixes: 746e08590b864 ("x86/intel_rdt: Create character device exposing pseudo-locked region") Fixes: 33dc3e410a0d9 ("x86/intel_rdt: Make CPU information accessible for pseudo-locked regions") Signed-off-by: Jithu Joseph Signed-off-by: Reinette Chatre Signed-off-by: Thomas Gleixner Cc: fenghua.yu@intel.com Cc: tony.luck@intel.com Cc: gavin.hindman@intel.com Cc: hpa@zytor.com Link: https://lkml.kernel.org/r/231f742dbb7b00a31cc104416860e27dba6b072d.1539384145.git.reinette.chatre@intel.com commit 99c228a994ec8b1580c43631866fd2c5440f5bfd Author: Amir Goldstein Date: Thu Oct 18 14:22:55 2018 +0300 fs: group frequently accessed fields of struct super_block together Kernel test robot reported [1] a 6% performance regression in a concurrent unlink(2) workload on commit 60f7ed8c7c4d ("fsnotify: send path type events to group with super block marks"). The performance test was run with no fsnotify marks at all on the data set, so the only extra instructions added by the offending commit are tests of the super_block fields s_fsnotify_{marks,mask} and these tests happen on almost every single inode access. When adding those fields to the super_block struct, we did not give much thought of placing them on a hot cache lines (we just placed them at the end of the struct). Re-organize struct super_block to try and keep some frequently accessed fields on the same cache line. Move the frequently accessed fields s_fsnotify_{marks,mask} near the frequently accessed fields s_fs_info,s_time_gran, while filling a 64bit alignment hole after s_time_gran. Move the seldom accessed fields s_id,s_uuid,s_max_links,s_mode near the seldom accessed fields s_vfs_rename_mutex,s_subtype. Rong Chen confirmed that this patch solved the reported problem. [1] https://lkml.org/lkml/2018/9/30/206 Reported-by: kernel test robot Tested-by: kernel test robot Fixes: 1e6cb72399 ("fsnotify: add super block object type") Signed-off-by: Amir Goldstein Signed-off-by: Jan Kara commit 89e8b9cb846515e4435eb42df7009b824cf3405a Author: Vignesh R Date: Mon Oct 15 12:08:29 2018 +0530 spi: omap2-mcspi: Add slave mode support Add support to use McSPI controller as SPI slave. In slave mode, DMA TX completion does not mean entire data has been shifted out as data might still be stuck in FIFO waiting for master to clock the bus. Therefore, add an IRQ handler for slave mode to know when entire data in FIFO has been shifted out. Signed-off-by: Vignesh R Signed-off-by: Mark Brown commit b682cffa3ac6d9d9e16e9b413c45caee3b391fab Author: Vignesh R Date: Mon Oct 15 12:08:28 2018 +0530 spi: omap2-mcspi: Set FIFO DMA trigger level to word length McSPI has 32 byte FIFO in Transmit-Receive mode. Current code tries to configuration FIFO watermark level for DMA trigger to be GCD of transfer length and max FIFO size which would mean trigger level may be set to 32 for transmit-receive mode if length is aligned. This does not work in case of SPI slave mode where FIFO always needs to have data ready whenever master starts the clock. With DMA trigger size of 32 there will be a small window during slave TX where DMA is still putting data into FIFO but master would have started clock for next byte, resulting in shifting out of stale data. Similarly, on Slave RX side there may be RX FIFO overflow Fix this by setting FIFO watermark for DMA trigger to word length. This means DMA is triggered as soon as FIFO has space for word length bytes and DMA would make sure FIFO is almost always full therefore improving FIFO occupancy in both master and slave mode. Signed-off-by: Vignesh R Signed-off-by: Mark Brown commit 13d515c796adc49a49b0cd2212ccd7f43a37fc5a Author: Vignesh R Date: Mon Oct 15 12:08:27 2018 +0530 spi: omap2-mcspi: Switch to readl_poll_timeout() Use standard readl_poll_timeout() macro for polling on status bits. Signed-off-by: Vignesh R Signed-off-by: Mark Brown commit c530cd1d9d5e7741c641c5c366ddb4e23aa5caec Author: Ludovic Barre Date: Fri Oct 5 09:43:03 2018 +0200 spi: spi-mem: add stm32 qspi controller The qspi controller is a specialized communication interface targeting single, dual or quad SPI Flash memories (NOR/NAND). It can operate in any of the following modes: -indirect mode: all the operations are performed using the quadspi registers -read memory-mapped mode: the external Flash memory is mapped to the microcontroller address space and is seen by the system as if it was an internal memory tested on: -NOR: mx66l51235l -NAND: MT29F2G01ABAGD Signed-off-by: Ludovic Barre Signed-off-by: Mark Brown commit c3e6845ea0dd52f26675ad32d6a45e3991ba20a6 Author: Ludovic Barre Date: Fri Oct 5 09:43:02 2018 +0200 dt-bindings: spi: add stm32 qspi controller This patch adds the documentation of device tree bindings for the STM32 QSPI controller. It is a specialized communication interface targeting single, dual or quad SPI Flash memories (NOR/NAND). Signed-off-by: Ludovic Barre Reviewed-by: Rob Herring Signed-off-by: Mark Brown commit 7ece50c9f790270e82b77589d34e54547c895a66 Merge: e3a360b8cded 747df19747bc Author: Mark Brown Date: Fri Oct 19 13:31:41 2018 +0100 Merge remote-tracking branch 'asoc/for-4.19' into asoc-4.20 commit e3a360b8cdede74d25807fc405e5d8bfb025692f Author: Richard Fitzgerald Date: Fri Oct 19 13:25:16 2018 +0100 ASoC: wm_adsp: Log addresses as 8 digits in wm_adsp_buffer_populate Increase the address value width in the debug log from 4 digits to 8 digits to allow for DSP cores with larger memory address ranges. Signed-off-by: Richard Fitzgerald Signed-off-by: Mark Brown commit 2a2aefa41ce48ace8e1e963cb10c3f5ff43aa994 Author: Richard Fitzgerald Date: Fri Oct 19 13:25:15 2018 +0100 ASoC: wm_adsp: Rename memory fields in wm_adsp_buffer The wm_adsp_buffer struct is the control header of a circular buffer used to transfer data from the firmware over the control interface to an ALSA compressed stream. The original names of the fields pointing to the data buffer were based on ADSP2V2 memory layout where they correspond to {XM, XM, YM}. But this circular buffer could be used on other types of DSP core that have different memory region types. Also the names and description of the size fields were not very clear. The field names and descriptions have been changed to be generic and not imply any particular memory types. This patch updates the wm_adsp driver to the new field names. Signed-off-by: Richard Fitzgerald Signed-off-by: Mark Brown commit bcb047ebf28453da56f0265aeeb9edc52b797ea7 Author: Axel Lin Date: Thu Oct 4 15:25:58 2018 +0800 regulator: bd718x7: Remove struct bd718xx_pmic All the fields in struct bd718xx_pmic are not really necessary. Remove struct bd718xx_pmic to simplify the code. Signed-off-by: Axel Lin Reviewed-by: Matti Vaittinen Signed-off-by: Mark Brown commit b7c7be6f6bd28ffea7f608ac2d806b8a4bdc82fe Author: Sagi Grimberg Date: Thu Oct 18 17:40:40 2018 -0700 nvme-fabrics: move controller options matching to fabrics IP transports will most likely use the same controller options matching when detecting a duplicate connect. Move it to fabrics. Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit 950937624079f8ab78939f1effbe21df8e39d420 Author: Ben Dooks Date: Tue Oct 2 11:42:05 2018 +0100 regmap: use less #ifdef for LOG_DEVICE Move the checking of the LOG_DEVICE into a function to reduce the number of #ifdefs and ensure more of the code gets compiled/checked, and make it easier to change this for internal debugging purposes (such as checking >1 device). Signed-off-by: Ben Dooks Signed-off-by: Mark Brown commit bb59b8e57493465fac8658bba103f7c4cc5d874a Author: Sagi Grimberg Date: Fri Oct 19 00:50:29 2018 -0700 nvme-rdma: always have a valid trsvcid If not passed, we set the default trsvcid. We can rely on having trsvcid and can simplify the controller matching logic. Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit 5e8d63a726f8f2fef089515e9a501785cc67dcdc Author: Olivier Moysan Date: Mon Oct 15 16:03:36 2018 +0200 ASoC: cs42l51: add mclk support Add MCLK dapm to allow configuration of cirrus CS42l51 codec as a master clock consumer. Signed-off-by: Olivier Moysan Signed-off-by: Mark Brown commit 8307b2afd386ccce369821daa2196068c47fe8cd Author: Olivier Moysan Date: Mon Oct 15 16:03:35 2018 +0200 ASoC: stm32: sai: set sai as mclk clock provider Add master clock generation support in STM32 SAI. The master clock provided by SAI can be used to feed a codec. Signed-off-by: Olivier Moysan Signed-off-by: Mark Brown commit 1c5083b37deaa99e07cc3082e190a509efd2a225 Author: Olivier Moysan Date: Mon Oct 15 16:03:34 2018 +0200 ASoC: dt-bindings: add mclk support to cs42l51 Add clocks properties to cs42l51 Cirrus codec, to support master clock provider. Signed-off-by: Olivier Moysan Signed-off-by: Mark Brown commit af16112457d8175b444baa9aac02558a1e1154b5 Author: Olivier Moysan Date: Mon Oct 15 16:03:33 2018 +0200 ASoC: dt-bindings: add mclk provider support to stm32 sai add mclk provider support to stm32 sai Signed-off-by: Olivier Moysan Signed-off-by: Mark Brown commit 2c7b696a7589ab14854c132dc732973fbd498d5a Author: Marcel Ziswiler Date: Thu Oct 18 13:18:28 2018 +0200 ASoC: soc-core: fix trivial checkpatch issues Fix a few trivial aka cosmetic only checkpatch issues like long lines, wrong indentations, spurious blanks and newlines, missing newlines, multi-line comments etc. Signed-off-by: Marcel Ziswiler Signed-off-by: Mark Brown commit 3c01b0e129e9486c8004e43eba3a70de7393f645 Author: Charles Keepax Date: Thu Oct 11 17:28:28 2018 +0100 ASoC: dapm: Add support for hw_free on CODEC to CODEC links Currently, on power down for a CODEC to CODEC DAI link we only call digital_mute and shutdown. Provide a little more flexibility for drivers by adding a call to hw_free as well. Signed-off-by: Charles Keepax Signed-off-by: Mark Brown commit 3b796aa60af087f5fec75aee9b17f2130f2b9adc Author: Mauro Carvalho Chehab Date: Fri Oct 19 08:33:02 2018 -0300 media: rename soc_camera I2C drivers Those drivers are part of the legacy SoC camera framework. They're being converted to not use it, but sometimes we're keeping both legacy any new driver. This time, for example, we have two drivers on media with the same name: ov772x. That's bad. So, in order to prevent that to happen, let's prepend the SoC legacy drivers with soc_. No functional changes. Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit af510ebd8913bee016492832f532ed919b51c09c Author: Pablo Neira Ayuso Date: Fri Oct 19 11:48:24 2018 +0200 Revert "netfilter: xt_quota: fix the behavior of xt_quota module" This reverts commit e9837e55b0200da544a095a1fca36efd7fd3ba30. When talking to Maze and Chenbo, we agreed to keep this back by now due to problems in the ruleset listing path with 32-bit arches. Signed-off-by: Maciej Żenczykowski Signed-off-by: Pablo Neira Ayuso commit 468c041cff57e87f18e1022cacf9f5c98bf00b58 Author: Taehee Yoo Date: Thu Oct 18 22:29:59 2018 +0900 netfilter: nfnetlink_log: remove empty nfnetlink_log.h header file /include/net/netfilter/nfnetlink_log.h file is empty. so that it can be removed. Signed-off-by: Taehee Yoo Signed-off-by: Pablo Neira Ayuso commit da8a705ccbe1957c30bc6b6d2160a0fd0bb01c4d Author: Weongyo Jeong Date: Wed Oct 17 21:45:17 2018 +0900 netfilter: remove two unused variables. nft_dup_netdev_ingress_ops and nft_fwd_netdev_ingress_ops variables are no longer used at the code. Signed-off-by: Weongyo Jeong Signed-off-by: Pablo Neira Ayuso commit cdf6b11daa77d4b55ddf0530842a551cc5562a93 Author: Ben Whitten Date: Fri Oct 19 10:33:50 2018 +0100 regmap: Add regmap_noinc_write API The regmap API had a noinc_read function added for instances where devices supported returning data from an internal FIFO in a single read. This commit adds the noinc_write variant to allow writing to a non incrementing register, this is used in devices such as the sx1301 for loading firmware. Signed-off-by: Ben Whitten Signed-off-by: Mark Brown commit 9fe44fc98ce45fe42004be9fd282775030c6b147 Author: Jian-Hong Pan Date: Thu Sep 27 16:50:09 2018 +0800 platform/x86: asus-wmi: Simplify the keyboard brightness updating process The original asus-wmi queues a work which calls the ACPI/WMI methods to update the keyboard LED brightness. Similar drivers - acer-wmi, dell-wmi-led just call the ACPI/WMI methods directly without workqueues. This patch simplifies the keyboard brightness updating process which calls the kbd_led_update function directly without workqueue in asus-wmi. Signed-off-by: Jian-Hong Pan Signed-off-by: Andy Shevchenko commit 9ab2a1bd81f7eaef4b496168dd93e0f23e8906fe Author: Dan Carpenter Date: Thu Oct 18 10:34:30 2018 +0300 ASoC: Intel: kbl_da7219_max98927: minor white space clean up I just added a couple missing tabs. Signed-off-by: Dan Carpenter Signed-off-by: Mark Brown commit a3fb3698cadf27dc142b24394c401625e14d80d0 Author: Taehee Yoo Date: Fri Oct 12 03:46:29 2018 +0900 netfilter: nf_flow_table: do not remove offload when other netns's interface is down When interface is down, offload cleanup function(nf_flow_table_do_cleanup) is called and that checks whether interface index of offload and index of link down interface is same. but only interface index checking is not enough because flowtable is not pernet list. So that, if other netns's interface that has index is same with offload is down, that offload will be removed. This patch adds netns checking code to the offload cleanup routine. Fixes: 59c466dd68e7 ("netfilter: nf_flow_table: add a new flow state for tearing down offloading") Signed-off-by: Taehee Yoo Signed-off-by: Pablo Neira Ayuso commit 5f1be84aad4b520a36246d0c289ad73641277630 Author: Taehee Yoo Date: Fri Oct 12 03:01:54 2018 +0900 netfilter: nf_flow_table: remove unnecessary parameter of nf_flow_table_cleanup() parameter net of nf_flow_table_cleanup() is not used. So that it can be removed. Signed-off-by: Taehee Yoo Signed-off-by: Pablo Neira Ayuso commit b7f1a16d29b2e28d3dcbb070511bd703e306281b Author: Taehee Yoo Date: Tue Oct 2 02:17:14 2018 +0900 netfilter: nf_flow_table: remove flowtable hook flush routine in netns exit routine When device is unregistered, flowtable flush routine is called by notifier_call(nf_tables_flowtable_event). and exit callback of nftables pernet_operation(nf_tables_exit_net) also has flowtable flush routine. but when network namespace is destroyed, both notifier_call and pernet_operation are called. hence flowtable flush routine in pernet_operation is unnecessary. test commands: %ip netns add vm1 %ip netns exec vm1 nft add table ip filter %ip netns exec vm1 nft add flowtable ip filter w \ { hook ingress priority 0\; devices = { lo }\; } %ip netns del vm1 splat looks like: [ 265.187019] WARNING: CPU: 0 PID: 87 at net/netfilter/core.c:309 nf_hook_entry_head+0xc7/0xf0 [ 265.187112] Modules linked in: nf_flow_table_ipv4 nf_flow_table nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 nf_tables nfnetlink ip_tables x_tables [ 265.187390] CPU: 0 PID: 87 Comm: kworker/u4:2 Not tainted 4.19.0-rc3+ #5 [ 265.187453] Workqueue: netns cleanup_net [ 265.187514] RIP: 0010:nf_hook_entry_head+0xc7/0xf0 [ 265.187546] Code: 8d 81 68 03 00 00 5b c3 89 d0 83 fa 04 48 8d 84 c7 e8 11 00 00 76 81 0f 0b 31 c0 e9 78 ff ff ff 0f 0b 48 83 c4 08 31 c0 5b c3 <0f> 0b 31 c0 e9 65 ff ff ff 0f 0b 31 c0 e9 5c ff ff ff 48 89 0c 24 [ 265.187573] RSP: 0018:ffff88011546f098 EFLAGS: 00010246 [ 265.187624] RAX: ffffffff8d90e135 RBX: 1ffff10022a8de1c RCX: 0000000000000000 [ 265.187645] RDX: 0000000000000000 RSI: 0000000000000005 RDI: ffff880116298040 [ 265.187645] RBP: ffff88010ea4c1a8 R08: 0000000000000000 R09: 0000000000000000 [ 265.187645] R10: ffff88011546f1d8 R11: ffffed0022c532c1 R12: ffff88010ea4c1d0 [ 265.187645] R13: 0000000000000005 R14: dffffc0000000000 R15: ffff88010ea4c1c4 [ 265.187645] FS: 0000000000000000(0000) GS:ffff88011b200000(0000) knlGS:0000000000000000 [ 265.187645] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 265.187645] CR2: 00007fdfb8d00000 CR3: 0000000057a16000 CR4: 00000000001006f0 [ 265.187645] Call Trace: [ 265.187645] __nf_unregister_net_hook+0xca/0x5d0 [ 265.187645] ? nf_hook_entries_free.part.3+0x80/0x80 [ 265.187645] ? save_trace+0x300/0x300 [ 265.187645] nf_unregister_net_hooks+0x2e/0x40 [ 265.187645] nf_tables_exit_net+0x479/0x1340 [nf_tables] [ 265.187645] ? find_held_lock+0x39/0x1c0 [ 265.187645] ? nf_tables_abort+0x30/0x30 [nf_tables] [ 265.187645] ? inet_frag_destroy_rcu+0xd0/0xd0 [ 265.187645] ? trace_hardirqs_on+0x93/0x210 [ 265.187645] ? __bpf_trace_preemptirq_template+0x10/0x10 [ 265.187645] ? inet_frag_destroy_rcu+0xd0/0xd0 [ 265.187645] ? inet_frag_destroy_rcu+0xd0/0xd0 [ 265.187645] ? __mutex_unlock_slowpath+0x17f/0x740 [ 265.187645] ? wait_for_completion+0x710/0x710 [ 265.187645] ? bucket_table_free+0xb2/0x1f0 [ 265.187645] ? nested_table_free+0x130/0x130 [ 265.187645] ? __lock_is_held+0xb4/0x140 [ 265.187645] ops_exit_list.isra.10+0x94/0x140 [ 265.187645] cleanup_net+0x45b/0x900 [ ... ] This WARNING means that hook unregisteration is failed because all flowtables hooks are already unregistered by notifier_call. Network namespace exit routine guarantees that all devices will be unregistered first. then, other exit callbacks of pernet_operations are called. so that removing flowtable flush routine in exit callback of pernet_operation(nf_tables_exit_net) doesn't make flowtable leak. Signed-off-by: Taehee Yoo Signed-off-by: Pablo Neira Ayuso commit 421f0922a2cfb0c75acd9746454aaa576c711a65 Author: Filipe Manana Date: Fri Oct 12 13:02:48 2018 +0100 Btrfs: fix use-after-free during inode eviction At inode.c:evict_inode_truncate_pages(), when we iterate over the inode's extent states, we access an extent state record's "state" field after we unlocked the inode's io tree lock. This can lead to a use-after-free issue because after we unlock the io tree that extent state record might have been freed due to being merged into another adjacent extent state record (a previous inflight bio for a read operation finished in the meanwhile which unlocked a range in the io tree and cause a merge of extent state records, as explained in the comment before the while loop added in commit 6ca0709756710 ("Btrfs: fix hang during inode eviction due to concurrent readahead")). Fix this by keeping a copy of the extent state's flags in a local variable and using it after unlocking the io tree. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=201189 Fixes: b9d0b38928e2 ("btrfs: Add handler for invalidate page") CC: stable@vger.kernel.org # 4.4+ Reviewed-by: Qu Wenruo Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit c495144bc6962186feae31d687596d2472000e45 Author: Josef Bacik Date: Fri Oct 12 15:32:32 2018 -0400 btrfs: move the dio_sem higher up the callchain We're getting a lockdep splat because we take the dio_sem under the log_mutex. What we really need is to protect fsync() from logging an extent map for an extent we never waited on higher up, so just guard the whole thing with dio_sem. ====================================================== WARNING: possible circular locking dependency detected 4.18.0-rc4-xfstests-00025-g5de5edbaf1d4 #411 Not tainted ------------------------------------------------------ aio-dio-invalid/30928 is trying to acquire lock: 0000000092621cfd (&mm->mmap_sem){++++}, at: get_user_pages_unlocked+0x5a/0x1e0 but task is already holding lock: 00000000cefe6b35 (&ei->dio_sem){++++}, at: btrfs_direct_IO+0x3be/0x400 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #5 (&ei->dio_sem){++++}: lock_acquire+0xbd/0x220 down_write+0x51/0xb0 btrfs_log_changed_extents+0x80/0xa40 btrfs_log_inode+0xbaf/0x1000 btrfs_log_inode_parent+0x26f/0xa80 btrfs_log_dentry_safe+0x50/0x70 btrfs_sync_file+0x357/0x540 do_fsync+0x38/0x60 __ia32_sys_fdatasync+0x12/0x20 do_fast_syscall_32+0x9a/0x2f0 entry_SYSENTER_compat+0x84/0x96 -> #4 (&ei->log_mutex){+.+.}: lock_acquire+0xbd/0x220 __mutex_lock+0x86/0xa10 btrfs_record_unlink_dir+0x2a/0xa0 btrfs_unlink+0x5a/0xc0 vfs_unlink+0xb1/0x1a0 do_unlinkat+0x264/0x2b0 do_fast_syscall_32+0x9a/0x2f0 entry_SYSENTER_compat+0x84/0x96 -> #3 (sb_internal#2){.+.+}: lock_acquire+0xbd/0x220 __sb_start_write+0x14d/0x230 start_transaction+0x3e6/0x590 btrfs_evict_inode+0x475/0x640 evict+0xbf/0x1b0 btrfs_run_delayed_iputs+0x6c/0x90 cleaner_kthread+0x124/0x1a0 kthread+0x106/0x140 ret_from_fork+0x3a/0x50 -> #2 (&fs_info->cleaner_delayed_iput_mutex){+.+.}: lock_acquire+0xbd/0x220 __mutex_lock+0x86/0xa10 btrfs_alloc_data_chunk_ondemand+0x197/0x530 btrfs_check_data_free_space+0x4c/0x90 btrfs_delalloc_reserve_space+0x20/0x60 btrfs_page_mkwrite+0x87/0x520 do_page_mkwrite+0x31/0xa0 __handle_mm_fault+0x799/0xb00 handle_mm_fault+0x7c/0xe0 __do_page_fault+0x1d3/0x4a0 async_page_fault+0x1e/0x30 -> #1 (sb_pagefaults){.+.+}: lock_acquire+0xbd/0x220 __sb_start_write+0x14d/0x230 btrfs_page_mkwrite+0x6a/0x520 do_page_mkwrite+0x31/0xa0 __handle_mm_fault+0x799/0xb00 handle_mm_fault+0x7c/0xe0 __do_page_fault+0x1d3/0x4a0 async_page_fault+0x1e/0x30 -> #0 (&mm->mmap_sem){++++}: __lock_acquire+0x42e/0x7a0 lock_acquire+0xbd/0x220 down_read+0x48/0xb0 get_user_pages_unlocked+0x5a/0x1e0 get_user_pages_fast+0xa4/0x150 iov_iter_get_pages+0xc3/0x340 do_direct_IO+0xf93/0x1d70 __blockdev_direct_IO+0x32d/0x1c20 btrfs_direct_IO+0x227/0x400 generic_file_direct_write+0xcf/0x180 btrfs_file_write_iter+0x308/0x58c aio_write+0xf8/0x1d0 io_submit_one+0x3a9/0x620 __ia32_compat_sys_io_submit+0xb2/0x270 do_int80_syscall_32+0x5b/0x1a0 entry_INT80_compat+0x88/0xa0 other info that might help us debug this: Chain exists of: &mm->mmap_sem --> &ei->log_mutex --> &ei->dio_sem Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&ei->dio_sem); lock(&ei->log_mutex); lock(&ei->dio_sem); lock(&mm->mmap_sem); *** DEADLOCK *** 1 lock held by aio-dio-invalid/30928: #0: 00000000cefe6b35 (&ei->dio_sem){++++}, at: btrfs_direct_IO+0x3be/0x400 stack backtrace: CPU: 0 PID: 30928 Comm: aio-dio-invalid Not tainted 4.18.0-rc4-xfstests-00025-g5de5edbaf1d4 #411 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.11.0-2.el7 04/01/2014 Call Trace: dump_stack+0x7c/0xbb print_circular_bug.isra.37+0x297/0x2a4 check_prev_add.constprop.45+0x781/0x7a0 ? __lock_acquire+0x42e/0x7a0 validate_chain.isra.41+0x7f0/0xb00 __lock_acquire+0x42e/0x7a0 lock_acquire+0xbd/0x220 ? get_user_pages_unlocked+0x5a/0x1e0 down_read+0x48/0xb0 ? get_user_pages_unlocked+0x5a/0x1e0 get_user_pages_unlocked+0x5a/0x1e0 get_user_pages_fast+0xa4/0x150 iov_iter_get_pages+0xc3/0x340 do_direct_IO+0xf93/0x1d70 ? __alloc_workqueue_key+0x358/0x490 ? __blockdev_direct_IO+0x14b/0x1c20 __blockdev_direct_IO+0x32d/0x1c20 ? btrfs_run_delalloc_work+0x40/0x40 ? can_nocow_extent+0x490/0x490 ? kvm_clock_read+0x1f/0x30 ? can_nocow_extent+0x490/0x490 ? btrfs_run_delalloc_work+0x40/0x40 btrfs_direct_IO+0x227/0x400 ? btrfs_run_delalloc_work+0x40/0x40 generic_file_direct_write+0xcf/0x180 btrfs_file_write_iter+0x308/0x58c aio_write+0xf8/0x1d0 ? kvm_clock_read+0x1f/0x30 ? __might_fault+0x3e/0x90 io_submit_one+0x3a9/0x620 ? io_submit_one+0xe5/0x620 __ia32_compat_sys_io_submit+0xb2/0x270 do_int80_syscall_32+0x5b/0x1a0 entry_INT80_compat+0x88/0xa0 CC: stable@vger.kernel.org # 4.14+ Reviewed-by: Filipe Manana Signed-off-by: Josef Bacik Signed-off-by: David Sterba commit 30928e9baac238a7330085a1c5747f0b5df444b4 Author: Josef Bacik Date: Thu Oct 11 15:54:31 2018 -0400 btrfs: don't run delayed_iputs in commit This could result in a really bad case where we do something like evict evict_refill_and_join btrfs_commit_transaction btrfs_run_delayed_iputs evict evict_refill_and_join btrfs_commit_transaction ... forever We have plenty of other places where we run delayed iputs that are much safer, let those do the work. CC: stable@vger.kernel.org # 4.4+ Reviewed-by: Filipe Manana Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 80ee54bfe8a3850015585ebc84e8d207fcae6831 Author: Josef Bacik Date: Thu Oct 11 15:54:22 2018 -0400 btrfs: fix insert_reserved error handling We were not handling the reserved byte accounting properly for data references. Metadata was fine, if it errored out the error paths would free the bytes_reserved count and pin the extent, but it even missed one of the error cases. So instead move this handling up into run_one_delayed_ref so we are sure that both cases are properly cleaned up in case of a transaction abort. CC: stable@vger.kernel.org # 4.18+ Reviewed-by: Nikolay Borisov Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 49940bdd57779c78462da7aa5a8650b2fea8c2ff Author: Josef Bacik Date: Thu Oct 11 15:54:21 2018 -0400 btrfs: only free reserved extent if we didn't insert it When we insert the file extent once the ordered extent completes we free the reserved extent reservation as it'll have been migrated to the bytes_used counter. However if we error out after this step we'll still clear the reserved extent reservation, resulting in a negative accounting of the reserved bytes for the block group and space info. Fix this by only doing the free if we didn't successfully insert a file extent for this extent. CC: stable@vger.kernel.org # 4.14+ Reviewed-by: Omar Sandoval Reviewed-by: Filipe Manana Signed-off-by: Josef Bacik Signed-off-by: David Sterba commit fb5c39d7a887108087de6ff93d3f326b01b4ef41 Author: Josef Bacik Date: Thu Oct 11 15:54:09 2018 -0400 btrfs: don't use ctl->free_space for max_extent_size max_extent_size is supposed to be the largest contiguous range for the space info, and ctl->free_space is the total free space in the block group. We need to keep track of these separately and _only_ use the max_free_space if we don't have a max_extent_size, as that means our original request was too large to search any of the block groups for and therefore wouldn't have a max_extent_size set. CC: stable@vger.kernel.org # 4.14+ Reviewed-by: Filipe Manana Signed-off-by: Josef Bacik Signed-off-by: David Sterba commit ad22cf6ea47fa20fbe11ac324a0a15c0a9a4a2a9 Author: Josef Bacik Date: Fri Oct 12 15:32:33 2018 -0400 btrfs: set max_extent_size properly We can't use entry->bytes if our entry is a bitmap entry, we need to use entry->max_extent_size in that case. Fix up all the logic to make this consistent. CC: stable@vger.kernel.org # 4.4+ Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 21a94f7acf0f748599ea552af5d9ee7d7e41c72f Author: Josef Bacik Date: Thu Oct 11 15:54:03 2018 -0400 btrfs: reset max_extent_size properly If we use up our block group before allocating a new one we'll easily get a max_extent_size that's set really really low, which will result in a lot of fragmentation. We need to make sure we're resetting the max_extent_size when we add a new chunk or add new space. CC: stable@vger.kernel.org # 4.4+ Reviewed-by: Filipe Manana Signed-off-by: Josef Bacik Signed-off-by: David Sterba commit b2b5b6502c3ddc448be825974036ef4d8966e888 Author: Josef Bacik Date: Thu Oct 11 15:54:24 2018 -0400 MAINTAINERS: update my email address for btrfs My work email is completely useless, switch it to my personal address so I get emails on a account I actually pay attention to. Signed-off-by: Josef Bacik Signed-off-by: David Sterba commit e4e11cc0f81ee7be17d6f6fb96128a6d51c0e838 Author: Christoffer Dall Date: Wed Oct 17 20:21:16 2018 +0200 KVM: arm64: Safety check PSTATE when entering guest and handle IL This commit adds a paranoid check when entering the guest to make sure we don't attempt running guest code in an equally or more privilged mode than the hypervisor. We also catch other accidental programming of the SPSR_EL2 which results in an illegal exception return and report this safely back to the user. Signed-off-by: Christoffer Dall Signed-off-by: Marc Zyngier commit 8d9fcacff9dc4445de4ced2dbe63b792174206d5 Author: Paul Mackerras Date: Fri Oct 19 20:44:04 2018 +1100 KVM: PPC: Book3S HV: Don't use streamlined entry path on early POWER9 chips This disables the use of the streamlined entry path for radix guests on early POWER9 chips that need the workaround added in commit a25bd72badfa ("powerpc/mm/radix: Workaround prefetch issue with KVM", 2017-07-24), because the streamlined entry path does not include that workaround. This also means that we can't do nested HV-KVM on those chips. Since the chips that need that workaround are the same ones that can't run both radix and HPT guests at the same time on different threads of a core, we use the existing 'no_mixing_hpt_and_radix' variable that identifies those chips to identify when we can't use the new guest entry path, and when we can't do nested virtualization. Signed-off-by: Paul Mackerras commit 7b0f61e91b6056c71649efa3204112a4b6cf5fc8 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 (cherry picked from commit e87b0bbc9f0380d403f8f2f6abba0d51c74d944f) Signed-off-by: Joonas Lahtinen commit de9f8eea5a44b0b756d3d6345af7f8e630a3c8c0 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 (cherry picked from commit 39b50c603878f4f8ae541ac4088a805d588abc79) Fixes: e96550956fbc ("drm/atomic_helper: Disallow new modesets on unregistered connectors") Fixes: 34ca26a98ad6 ("drm/atomic_helper: Allow DPMS On<->Off changes for unregistered connectors") Cc: stable@vger.kernel.org Signed-off-by: Joonas Lahtinen commit 34ca26a98ad67edd6e4870fe2d4aa047d41a51dd 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 (cherry picked from commit b5d29843d8ef86d4cde4742e095b81b7fd41e688) Fixes: e96550956fbc ("drm/atomic_helper: Disallow new modesets on unregistered connectors") Signed-off-by: Joonas Lahtinen commit e96550956fbcd090629c0e2b5b8cded2eded2adf 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 (cherry picked from commit 4d80273976bf880c4bed9359b8f2d45663140c86) Signed-off-by: Joonas Lahtinen commit 042c1a5a6021f73c10dc84958c287eb2a2a26f7c Merge: 5cc1b66e63ec 53c83b59759c Author: Boris Brezillon Date: Fri Oct 19 09:20:09 2018 +0200 Merge tag 'nand/for-4.20' of git://git.infradead.org/linux-mtd into mtd/next NAND core changes: - Two batchs of cleanups of the NAND API, including: * Deprecating a lot of interfaces (now replaced by ->exec_op()). * Moving code in separate drivers (JEDEC, ONFI), in private files (internals), in platform drivers, etc. * Functions/structures reordering. * Exclusive use of the nand_chip structure instead of the MTD one all across the subsystem. - Addition of the nand_wait_readrdy/rdy_op() helpers. Raw NAND controllers drivers changes: - Various coccinelle patches. - Marvell: * Use regmap_update_bits() for syscon access. * More documentation. * BCH failure path rework. * More layouts to be supported. * IRQ handler complete() condition fixed. - Fsl_ifc: * SRAM initialization fixed for newer controller versions. - Denali: * Fix licenses mismatch and use a SPDX tag. * Set SPARE_AREA_SKIP_BYTES register to 8 if unset. - Qualcomm: * Do not include dma-direct.h. - Docg4: * Removed. - Ams-delta: * Use of a GPIO lookup table * Internal machinery changes. Raw NAND chip drivers changes: - Toshiba: * Add support for Toshiba memory BENAND * Pass a single nand_chip object to the status helper. - ESMT: * New driver to retrieve the ECC requirements from the 5th ID byte. commit 5cc1b66e63ecb0661c00b26a733406eef7386da7 Merge: 92e2921f7eee 41fe242979e4 Author: Boris Brezillon Date: Fri Oct 19 09:16:55 2018 +0200 Merge tag 'spi-nor/for-4.20' of git://git.infradead.org/linux-mtd into mtd/next Core changes: * Support non-uniform erase size * Support controllers with limited TX fifo size Driver changes: * m25p80: Re-issue a WREN command after each write access * cadence: Pass a proper dir value to dma_[un]map_single() * fsl-qspi: Check fsl_qspi_get_seqid() return val make sure 4B addressing opcodes are properly handled * intel-spi: Add a new PCI entry for Ice Lake commit 886643b766321f15f63bd950be618cbb6dd22bbc Author: Christoph Hellwig Date: Mon Oct 8 09:12:01 2018 +0200 arm64: use the generic swiotlb_dma_ops Now that the generic swiotlb code supports non-coherent DMA we can switch to it for arm64. For that we need to refactor the existing alloc/free/mmap/pgprot helpers to be used as the architecture hooks, and implement the standard arch_sync_dma_for_{device,cpu} hooks for cache maintaincance in the streaming dma hooks, which also implies using the generic dma_coherent flag in struct device. Note that we need to keep the old is_device_dma_coherent function around for now, so that the shared arm/arm64 Xen code keeps working. Signed-off-by: Christoph Hellwig Acked-by: Catalin Marinas commit a4a4330db46a17289cf2ca5f9fb153d536267b97 Author: Christoph Hellwig Date: Fri Oct 19 08:51:53 2018 +0200 swiotlb: add support for non-coherent DMA Handle architectures that are not cache coherent directly in the main swiotlb code by calling arch_sync_dma_for_{device,cpu} in all the right places from the various dma_map/unmap/sync methods when the device is non-coherent. Because swiotlb now uses dma_direct_alloc for the coherent allocation that side is already taken care of by the dma-direct code calling into arch_dma_{alloc,free} for devices that are non-coherent. Signed-off-by: Christoph Hellwig Acked-by: Konrad Rzeszutek Wilk commit fafadcd16595c1df82df399f62421718ec9bf70a Author: Christoph Hellwig Date: Sun Sep 30 16:13:33 2018 -0700 swiotlb: don't dip into swiotlb pool for coherent allocations All architectures that support swiotlb also have a zone that backs up these less than full addressing allocations (usually ZONE_DMA32). Because of that it is rather pointless to fall back to the global swiotlb buffer if the normal dma direct allocation failed - the only thing this will do is to eat up bounce buffers that would be more useful to serve streaming mappings. Signed-off-by: Christoph Hellwig Acked-by: Catalin Marinas Acked-by: Konrad Rzeszutek Wilk commit 1ff2fea5e30ca15752777441ecb64a169fe22e9e Author: ndesaulniers@google.com Date: Mon Oct 15 14:24:27 2018 -0700 compiler-gcc: remove comment about gcc 4.5 from unreachable() Remove the comment about being unable to detect __builtin_unreachable. __builtin_unreachable was implemented in the GCC 4.5 timeframe. The kernel's minimum supported version of GCC is 4.6 since commit cafa0010cd51 ("Raise the minimum required gcc version to 4.6"). Commit cb984d101b30 ("compiler-gcc: integrate the various compiler-gcc[345].h files") shows that unreachable() had different guards based on GCC version. Suggested-by: Miguel Ojeda Signed-off-by: Nick Desaulniers Signed-off-by: Miguel Ojeda commit fe0640eb30b7da261ae84d252ed9ed3c7e68dfd8 Author: ndesaulniers@google.com Date: Mon Oct 15 10:22:21 2018 -0700 compiler.h: update definition of unreachable() Fixes the objtool warning seen with Clang: arch/x86/mm/fault.o: warning: objtool: no_context()+0x220: unreachable instruction Fixes commit 815f0ddb346c ("include/linux/compiler*.h: make compiler-*.h mutually exclusive") Josh noted that the fallback definition was meant to work around a pre-gcc-4.6 bug. GCC still needs to work around https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82365, so compiler-gcc.h defines its own version of unreachable(). Clang and ICC can use this shared definition. Link: https://github.com/ClangBuiltLinux/linux/issues/204 Suggested-by: Andy Lutomirski Suggested-by: Josh Poimboeuf Tested-by: Nathan Chancellor Signed-off-by: Nick Desaulniers Signed-off-by: Miguel Ojeda commit c4dae366925f929749b2a26efa53b561904a9a4f Author: Christoph Hellwig Date: Mon Aug 20 16:21:10 2018 +0200 swiotlb: refactor swiotlb_map_page Remove the somewhat useless map_single function, and replace it with a swiotlb_bounce_page handler that handles everything related to actually bouncing a page. Signed-off-by: Christoph Hellwig Reviewed-by: Robin Murphy Reviewed-by: Konrad Rzeszutek Wilk commit 4803b44e68fc08e76f00dec90074d199a11ad6f5 Author: Christoph Hellwig Date: Mon Aug 20 15:56:05 2018 +0200 swiotlb: use swiotlb_map_page in swiotlb_map_sg_attrs No need to duplicate the code - map_sg is equivalent to map_page for each page in the scatterlist. Signed-off-by: Christoph Hellwig Reviewed-by: Robin Murphy Reviewed-by: Konrad Rzeszutek Wilk commit 27744e0077f4c8b40aaa3126256708c21e56655d Author: Christoph Hellwig Date: Thu Apr 12 09:56:56 2018 +0200 swiotlb: merge swiotlb_unmap_page and unmap_single Signed-off-by: Christoph Hellwig Reviewed-by: Robin Murphy Reviewed-by: Konrad Rzeszutek Wilk commit dff8d6c1ed584de65aac40494d3e7468c50980c3 Author: Christoph Hellwig Date: Thu Aug 16 15:30:39 2018 +0300 swiotlb: remove the overflow buffer Like all other dma mapping drivers just return an error code instead of an actual memory buffer. The reason for the overflow buffer was that at the time swiotlb was invented there was no way to check for dma mapping errors, but this has long been fixed. Signed-off-by: Christoph Hellwig Acked-by: Catalin Marinas Reviewed-by: Robin Murphy Reviewed-by: Konrad Rzeszutek Wilk commit 8088546832aa2c0d8f99dd56edf6384f8a9b63b3 Author: Christoph Hellwig Date: Thu Apr 12 10:38:08 2018 +0200 swiotlb: do not panic on mapping failures All properly written drivers now have error handling in the dma_map_single / dma_map_page callers. As swiotlb_tbl_map_single already prints a useful warning when running out of swiotlb pool space we can also remove swiotlb_full entirely as it serves no purpose now. Signed-off-by: Christoph Hellwig Reviewed-by: Robin Murphy commit b65125c6acf38388d3342b37c18c3b6cc97eeb75 Author: Christoph Hellwig Date: Thu Apr 12 14:49:23 2018 +0200 swiotlb: mark is_swiotlb_buffer static Signed-off-by: Christoph Hellwig Reviewed-by: Robin Murphy Reviewed-by: Konrad Rzeszutek Wilk commit 21bb9d64c5adc0a87c3736bc9a2d386023b88a5b Author: Christoph Hellwig Date: Thu Apr 12 10:46:01 2018 +0200 swiotlb: remove a pointless comment This comments describes an aspect of the map_sg interface that isn't even exploited by swiotlb. Signed-off-by: Christoph Hellwig Reviewed-by: Robin Murphy Reviewed-by: Konrad Rzeszutek Wilk commit 63c19be095d0f8eb8992674991e44b4228bd4179 Author: Ingo Franzki Date: Wed Oct 17 17:24:43 2018 +0200 s390/pkey: Load pkey kernel module automatically With the recent enhancements of the pkey kernel module, the pkey kernel module should be loaded automatically during system startup, if MSA is available. When used for swap device encryption with random protected keys, pkey must be loaded before /etc/crypttab is processed, otherwise the sysfs attributes to read the key from are not available. Signed-off-by: Ingo Franzki Reviewed-by: Hendrik Brueckner Reviewed-by: Harald Freudenberger Signed-off-by: Martin Schwidefsky commit ec0c0bb489727de0d4dca6a00be6970ab8a3b30a Author: Thomas Richter Date: Mon Oct 15 14:39:29 2018 +0100 s390/perf: Return error when debug_register fails Return an error when the function debug_register() fails allocating the debug handle. Also remove the registered debug handle when the initialization fails later on. Signed-off-by: Thomas Richter Reviewed-by: Hendrik Brueckner Signed-off-by: Martin Schwidefsky commit 01a14bda11add9dcd4a59200f13834d634559935 Author: Waiman Long Date: Thu Oct 18 21:45:18 2018 -0400 locking/lockdep: Make global debug_locks* variables read-mostly Make the frequently used lockdep global variable debug_locks read-mostly. As debug_locks_silent is sometime used together with debug_locks, it is also made read-mostly so that they can be close together. With false cacheline sharing, cacheline contention problem can happen depending on what get put into the same cacheline as debug_locks. Signed-off-by: Waiman Long Cc: Andrew Morton Cc: Linus Torvalds Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Will Deacon Link: http://lkml.kernel.org/r/1539913518-15598-2-git-send-email-longman@redhat.com Signed-off-by: Ingo Molnar commit 9506a7425b094d2f1d9c877ed5a78f416669269b Author: Waiman Long Date: Thu Oct 18 21:45:17 2018 -0400 locking/lockdep: Fix debug_locks off performance problem It was found that when debug_locks was turned off because of a problem found by the lockdep code, the system performance could drop quite significantly when the lock_stat code was also configured into the kernel. For instance, parallel kernel build time on a 4-socket x86-64 server nearly doubled. Further analysis into the cause of the slowdown traced back to the frequent call to debug_locks_off() from the __lock_acquired() function probably due to some inconsistent lockdep states with debug_locks off. The debug_locks_off() function did an unconditional atomic xchg to write a 0 value into debug_locks which had already been set to 0. This led to severe cacheline contention in the cacheline that held debug_locks. As debug_locks is being referenced in quite a few different places in the kernel, this greatly slow down the system performance. To prevent that trashing of debug_locks cacheline, lock_acquired() and lock_contended() now checks the state of debug_locks before proceeding. The debug_locks_off() function is also modified to check debug_locks before calling __debug_locks_off(). Signed-off-by: Waiman Long Cc: Andrew Morton Cc: Linus Torvalds Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Will Deacon Link: http://lkml.kernel.org/r/1539913518-15598-1-git-send-email-longman@redhat.com Signed-off-by: Ingo Molnar commit f2bfc71aee75feff33ca659322b72ffeed5a243d Merge: c13bbf4a78aa 835fe6d75d14 Author: Dave Airlie Date: Fri Oct 19 14:28:10 2018 +1000 Merge tag 'drm-intel-next-fixes-2018-10-18' of git://anongit.freedesktop.org/drm/drm-intel into drm-next - Fix GPU hang on MacBook2,1 when booting in EFI mode (Bugzilla #105637) - Fix garbled console on Y tiled BIOS framebuffer configs (Bugzilla #108264) - Fix black screen on certain eDP panels eg. Dell XPS 9350 (Bugzilla #107489 and #105338) - MST fixes that Rodrigo dropped from drm-intel-fixes and bunch of Icelake fixes - Then assorted proactive code fixes caught by CI or developers Signed-off-by: Dave Airlie From: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20181018165725.GA2281@jlahtine-desk.ger.corp.intel.com commit b4d16ab58c41ff0125822464bdff074cebd0fe47 Author: Michael Ellerman Date: Wed Oct 17 23:39:41 2018 +1100 powerpc/time: Fix clockevent_decrementer initalisation for PR KVM In the recent commit 8b78fdb045de ("powerpc/time: Use clockevents_register_device(), fixing an issue with large decrementer") we changed the way we initialise the decrementer clockevent(s). We no longer initialise the mult & shift values of decrementer_clockevent itself. This has the effect of breaking PR KVM, because it uses those values in kvmppc_emulate_dec(). The symptom is guest kernels spin forever mid-way through boot. For now fix it by assigning back to decrementer_clockevent the mult and shift values. Fixes: 8b78fdb045de ("powerpc/time: Use clockevents_register_device(), fixing an issue with large decrementer") Signed-off-by: Michael Ellerman commit 6ce7bff045f6a0eaa94c63617d73ad0bc66ce40c Author: Michael Ellerman Date: Mon Oct 15 23:01:43 2018 +1100 powerpc/aout: Fix struct user definition to use user_pt_regs I'm pretty sure this is dead code, it's only used by the a.out core dump code, and we don't support a.out. We should remove it. But while it's in the tree it should be using the ABI version of pt_regs which is called user_pt_regs in the kernel, because the whole struct is written to the core dump and so its size shouldn't change. Note this isn't a uapi header so we don't need an ifdef. Fixes: 002af9391bfb ("powerpc: Split user/kernel definitions of struct pt_regs") Signed-off-by: Michael Ellerman commit 22a3d03d69dfd3bfc606d1996969820d619b7c27 Author: Michael Ellerman Date: Mon Oct 15 23:01:42 2018 +1100 powerpc/uapi: Fix sigcontext definition to use user_pt_regs My recent patch to split pt_regs between user and kernel missed the usage in struct sigcontext. Because this is a user visible struct it should be using the user visible definition, which when we're building for the kernel is called struct user_pt_regs. As far as I can see this hasn't actually caused a bug (yet), because we don't use the sizeof() the sigcontext->regs anywhere. But we should still fix it to avoid confusion and future bugs. Fixes: 002af9391bfb ("powerpc: Split user/kernel definitions of struct pt_regs") Reported-by: Madhavan Srinivasan Signed-off-by: Michael Ellerman commit 7d0ea2524202db5cb3f5bde9c0cdd6dea61bc0e3 Author: Masahiro Yamada Date: Wed Oct 10 00:05:39 2018 +0900 kbuild: use 'else ifeq' for checksrc to improve readability 'ifeq ... else ifeq ... endif' notation is supported by GNU Make 3.81 or later, which is the requirement for building the kernel since commit 37d69ee30808 ("docs: bump minimal GNU Make version to 3.81"). Use it to improve the readability. Signed-off-by: Masahiro Yamada commit 69ea912fda74a673d330d23595385e5b73e3a2b9 Author: Masahiro Yamada Date: Thu Oct 4 13:25:19 2018 +0900 kbuild: remove unneeded link_multi_deps Since commit c8589d1e9e01 ("kbuild: handle multi-objs dependency appropriately"), $^ really represents all the prerequisite of the composite object being built. Hence, $(filter %.o,$^) contains all the objects to link together, which is much simpler than link_multi_deps calculation. Please note $(filter-out FORCE,$^) does not work here. When a single object module is turned into a multi object module, $^ will contain header files that were previously included for building the single object, and recorded in the .*.cmd file. To filter out such headers, $(filter %.o,$^) should be used here. Signed-off-by: Masahiro Yamada commit 9df3e7a7d7d6d92df7c58fb17f900fdc2d8b5031 Author: Masahiro Yamada Date: Tue Oct 2 10:32:23 2018 +0900 kbuild: add -Wno-unused-but-set-variable flag unconditionally We have raised the compiler requirement from time to time. With commit cafa0010cd51 ("Raise the minimum required gcc version to 4.6"), the minimum for GCC is 4.6 now. This flag was added by GCC 4.6, and it is recognized by ICC as well. It is true that Clang does not support this flag but this commit is just touching the else part of the "ifeq ($(cc-name),clang)" check. Hence, Clang build is not affected. Let's rip off the cc-disable-warning switch, and see if somebody complains about it. Signed-off-by: Masahiro Yamada Reviewed-by: Nick Desaulniers commit a33e7ae295d5bc20568c48ac217d07f011091c32 Author: Masahiro Yamada Date: Mon Oct 1 18:44:37 2018 +0900 kbuild: add -Wdeclaration-after-statement flag unconditionally We have raised the compiler requirement from time to time. With commit cafa0010cd51 ("Raise the minimum required gcc version to 4.6"), the minimum for GCC is 4.6 now. This flag has been here since the pre-git era. It is documented in the GCC 4.6 manual, and it is recognized by Clang and ICC as well. Let's rip off the cc-option switch, and see if somebody complains about it. Signed-off-by: Masahiro Yamada Tested-by: Nick Desaulniers commit fb073a4b473e5b854312dc819c66ded9d103e824 Author: Masahiro Yamada Date: Mon Oct 1 18:44:36 2018 +0900 kbuild: add -Wno-pointer-sign flag unconditionally We have raised the compiler requirement from time to time. With commit cafa0010cd51 ("Raise the minimum required gcc version to 4.6"), the minimum for GCC is 4.6 now. The -Wno-pointer-sign has been here since the pre-git era. It is documented in the GCC 4.6 manual, and it is recognized by Clang and ICC as well. Let's rip off the cc-disable-warning switch, and see if somebody complains about it. Signed-off-by: Masahiro Yamada Tested-by: Nick Desaulniers commit 153e04b373dd5a4fdb841a727e47c40b1ad10ffc Author: Masahiro Yamada Date: Fri Sep 28 15:21:55 2018 +0900 modpost: remove leftover symbol prefix handling for module device table Blackfin and metag were the only architectures that prefix symbols with an underscore. They were removed by commit 4ba66a976072 ("arch: remove blackfin port"), commit bb6fb6dfcc17 ("metag: Remove arch/metag/"), respectively. It is no longer necessary to handle part of module device table symbols. Signed-off-by: Masahiro Yamada commit e51cd9ce5dd3b10f9e67a30a4dc00fc1fa80c673 Author: Keith Busch Date: Thu Oct 11 12:34:12 2018 -0600 PCI/AER: Refactor error injection fallbacks Move the bus ops fallback into separate functions. No functional change here. Signed-off-by: Keith Busch Signed-off-by: Bjorn Helgaas commit 390e2db8248075ae2f31a7046a88eda0f9784310 Author: Keith Busch Date: Thu Oct 11 12:34:11 2018 -0600 PCI/AER: Abstract AER interrupt handling The aer_inject module was directly calling aer_irq(). This required the AER driver export its private IRQ handler for no other reason than to support error injection. A driver should not have to expose its private interfaces, so use the IRQ subsystem to route injection to the AER driver, and make aer_irq() a private interface. This provides additional benefits: First, directly calling the IRQ handler bypassed the IRQ subsytem so the injection wasn't really synthesizing what happens if a shared AER interrupt occurs. The error injection had to provide the callback data directly, which may be racing with a removal that is freeing that structure. The IRQ subsystem can handle that race. Finally, using the IRQ subsystem automatically reacts to threaded IRQs, keeping the error injection abstracted from that implementation detail. Signed-off-by: Keith Busch Signed-off-by: Bjorn Helgaas commit 0e98db259fd8760fde556e640b447dadeceefc96 Author: Keith Busch Date: Thu Oct 11 12:34:10 2018 -0600 PCI/AER: Reuse existing pcie_port_find_device() interface The port services driver already provides a method to find the pcie_device for a service. Export that function, use it from the aer_inject module, and remove the duplicate functionality. Signed-off-by: Keith Busch Signed-off-by: Bjorn Helgaas commit 369fd7b00fce169570d6a74cb369e60dbfc95fb4 Author: Keith Busch Date: Tue Sep 18 17:58:47 2018 -0600 PCI/AER: Use managed resource allocations Use the managed device resource allocations for the service data so the AER driver doesn't need to manage it, further simplifying this driver. Link: https://lore.kernel.org/linux-pci/20180918235848.26694-12-keith.busch@intel.com Signed-off-by: Keith Busch Signed-off-by: Bjorn Helgaas commit 85a585918fb4122ad26b6febaec5c3c90bf2535c Merge: 3f6caaf5ff33 13523bef1e21 Author: James Morris Date: Thu Oct 18 17:20:08 2018 -0700 Merge tag 'loadpin-security-next' of https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux into next-loadpin LoadPin: report improvement and parameter renaming - Report human-readable device name during init - Change boot parameter and Kconfig "enabled" to "enforce" commit 1107a674cc0499ba9b6b65cef0632ac7a0fa771c Author: Colin Ian King Date: Thu Oct 18 22:47:10 2018 +0100 qed: fix spelling mistake "transcevier" -> "transceiver" Trivial fix to spelling mistake in DP_INFO message. Signed-off-by: Colin Ian King Signed-off-by: David S. Miller commit 02e6dae61e705485e23d1e4bbc62faa4f8cb7e28 Merge: 79861919b889 4cb4e98e5bba Author: David S. Miller Date: Thu Oct 18 17:01:12 2018 -0700 Merge tag 'mlx5-updates-2018-10-18' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5-updates-2018-10-18 This series provides misc updates to mlx5 core and netdevice driver. 1) From Tariq Toukan: Refactor fragmented buffer struct fields and init flow. 2) From Vlad Buslov, Flow counters cache improvements and fixes follow up. as a follow up work for the previous series of the mlx5 flow counters, Vlad provides two fixes: 2.1) Take fs_counters dellist before addlist Fixes: 6e5e22839136 ("net/mlx5: Add new list to store deleted flow counters") 2.2) Remove counter from idr after removing it from list Fixes: 12d6066c3b29 ("net/mlx5: Add flow counters idr") From Shay Agroskin, 3) Add FEC set/get FW commands and FEC ethtool callbacks support 4) Add new ethtool statistics to cover errors on rx, such as FEC errors. ==================== Signed-off-by: David S. Miller commit 7250f422da0480d8512b756640f131b9b893ccda Author: Joe Jin Date: Tue Oct 16 15:21:16 2018 -0700 xen-swiotlb: use actually allocated size on check physical continuous xen_swiotlb_{alloc,free}_coherent() allocate/free memory based on the order of the pages and not size argument (bytes). This is inconsistent with range_straddles_page_boundary and memset which use the 'size' value, which may lead to not exchanging memory with Xen (range_straddles_page_boundary() returned true). And then the call to xen_swiotlb_free_coherent() would actually try to exchange the memory with Xen, leading to the kernel hitting an BUG (as the hypercall returned an error). This patch fixes it by making the 'size' variable be of the same size as the amount of memory allocated. CC: stable@vger.kernel.org Signed-off-by: Joe Jin Cc: Konrad Rzeszutek Wilk Cc: Boris Ostrovsky Cc: Christoph Helwig Cc: Dongli Zhang Cc: John Sobecki Signed-off-by: Konrad Rzeszutek Wilk commit 79861919b8896e14b8e5707242721f2312c57ae4 Author: Eric Dumazet Date: Thu Oct 18 09:12:19 2018 -0700 tcp: fix TCP_REPAIR xmit queue setup Andrey reported the following warning triggered while running CRIU tests: tcp_clean_rtx_queue() ... last_ackt = tcp_skb_timestamp_us(skb); WARN_ON_ONCE(last_ackt == 0); This is caused by 5f6188a8003d ("tcp: do not change tcp_wstamp_ns in tcp_mstamp_refresh"), as we end up having skbs in retransmit queue with a zero skb->skb_mstamp_ns field. We could fix this bug in different ways, like making sure tp->tcp_wstamp_ns is not zero at socket creation, but as Neal pointed out, we also do not want that pacing status of a repaired socket could push tp->tcp_wstamp_ns far ahead in the future. So we prefer changing tcp_write_xmit() to not call tcp_update_skb_after_send() and instead do what is requested by TCP_REPAIR logic. Fixes: 5f6188a8003d ("tcp: do not change tcp_wstamp_ns in tcp_mstamp_refresh") Signed-off-by: Eric Dumazet Reported-by: Andrey Vagin Acked-by: Soheil Hassas Yeganeh Acked-by: Neal Cardwell Signed-off-by: David S. Miller commit cc18a7543d2f63a2c93fc61cfa7fd8be5464f75e Author: Zhao Chen Date: Thu Oct 18 15:02:51 2018 +0000 net-next/hinic: add checksum offload and TSO support This patch adds checksum offload and TSO support for the HiNIC driver. Perfomance test (Iperf) shows more than 100% improvement in TCP streams. Signed-off-by: Zhao Chen Signed-off-by: Xue Chaojing Signed-off-by: David S. Miller commit 40b06553c906a56ae31677b3ecbd49546947698d Author: Ganesh Goudar Date: Thu Oct 18 19:34:19 2018 +0530 cxgb4: fix the error path of cxgb4_uld_register() On multi adapter setup if the uld registration fails even on one adapter, the allocated resources for the uld on all the adapters are freed, rendering the functioning adapters unusable. This commit fixes the issue by freeing the allocated resources only for the failed adapter. Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller commit 35b842f25b603028fab7ff11b54a4410ee345c8a Author: Dan Carpenter Date: Thu Oct 18 11:02:39 2018 +0300 bnxt_en: Copy and paste bug in extended tx_stats The struct type was copied from the line before but it should be "tx" instead of "rx". I have reviewed the code and I can't immediately see that this bug causes a runtime issue. Fixes: 36e53349b60b ("bnxt_en: Add additional extended port statistics.") Signed-off-by: Dan Carpenter Acked-by: Michael Chan Signed-off-by: David S. Miller commit 817e929091e9a92cd7086ba816438a6c73e42543 Merge: 64b9d16e2d02 828092ef77ea Author: David S. Miller Date: Thu Oct 18 15:44:55 2018 -0700 Merge branch '10GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue Jeff Kirsher says: ==================== Intel Wired LAN Doc Updates 2018-10-18 This series contains documentation fixes and updates for Intel wired LAN drivers. The following was done: - Updated incorrect URLs - removed document references which did not apply to the current in-kernel drivers - added documentation for fm10k driver - added missing documentation on existing or new features - added SPDX headers to all the documentation files Lastly, the documentation was converted over to the RST (reStructured Text) format, so that 'make htmldocs' produces pretty html driver documentation for our drivers. ==================== Signed-off-by: David S. Miller commit 9a1d6b232bed2117fa9608873be044a5e8965e76 Merge: 1578968f77e6 52091c256bdc 82a4de6f11dc Author: Stephen Boyd Date: Thu Oct 18 15:44:13 2018 -0700 Merge branches 'clk-fixed-rate-remove' and 'clk-qcom-cleanup' into clk-next * clk-fixed-rate-remove: clk: fixed-rate: fix of_node_get-put imbalance * clk-qcom-cleanup: clk: qcom: Remove unused arrays in SDM845 GCC commit 1578968f77e6759afe4882dc20882639eacb2977 Merge: 1fe7c040b61e 341ce3563e52 77612720a236 1b4d990b19d2 9c940bbe2bb4 Author: Stephen Boyd Date: Thu Oct 18 15:44:01 2018 -0700 Merge branches 'clk-imx6-mmdc', 'clk-qcom-krait', 'clk-rockchip' and 'clk-smp2s11-match' into clk-next - iMX6 MMDC clks - Qualcomm Krait CPU clk support * clk-imx6-mmdc: clk: imx6q: add mmdc0 ipg clock clk: imx6sl: add mmdc ipg clocks clk: imx6sll: add mmdc1 ipg clock clk: imx6sx: add mmdc1 ipg clock clk: imx6ul: add mmdc1 ipg clock * clk-qcom-krait: clk: qcom: Add safe switch hook for krait mux clocks dt-bindings: clock: Document qcom,krait-cc clk: qcom: Add Krait clock controller driver dt-bindings: arm: Document qcom,kpss-gcc clk: qcom: Add KPSS ACC/GCC driver clk: qcom: Add support for Krait clocks clk: qcom: Add IPQ806X's HFPLLs clk: qcom: Add MSM8960/APQ8064's HFPLLs dt-bindings: clock: Document qcom,hfpll clk: qcom: Add HFPLL driver clk: qcom: Add support for High-Frequency PLLs (HFPLLs) ARM: Add Krait L2 register accessor functions * clk-rockchip: clk: rockchip: Fix static checker warning in rockchip_ddrclk_get_parent call clk: rockchip: use the newly added clock-id for hdmi on RK3066 clk: rockchip: add clock-id for HCLK_HDMI on rk3066 clk: rockchip: fix wrong mmc sample phase shift for rk3328 clk: rockchip: improve rk3288 pll rates for better hdmi output * clk-smp2s11-match: clk: s2mps11: Add used attribute to s2mps11_dt_match clk: s2mps11: Fix matching when built as module and DT node contains compatible commit 1fe7c040b61ebcc72a6b3c29136937f1b9191988 Merge: c1f74dbe59b7 5ddf0cdf9395 0d09e668b70b 4917fb90eec7 62061d357c7f Author: Stephen Boyd Date: Thu Oct 18 15:43:48 2018 -0700 Merge branches 'clk-actions-reset', 'clk-imx7-init-critical', 'clk-mmp2-ids' and 'clk-at91-pmc-rework' into clk-next - Reset Controller (RMU) support for Actions Semi Owl S900 and S700 SoCs - Rework at91 PMC clock driver for new DT bindings * clk-actions-reset: clk: actions: Add Actions Semi S900 SoC Reset Management Unit support clk: actions: Add Actions Semi S700 SoC Reset Management Unit support clk: actions: Add Actions Semi Owl SoCs Reset Management Unit support dt-bindings: reset: Add binding constants for Actions Semi S900 RMU dt-bindings: reset: Add binding constants for Actions Semi S700 RMU dt-bindings: clock: Add reset controller bindings for Actions Semi Owl SoCs clk: actions: Cache regmap info in private clock descriptor * clk-imx7-init-critical: clk: imx7d: remove CLK_IS_CRITICAL flag for arm_a7_root_clk clk: imx: cpu clock should be always critical clk: imx: imx7d: remove clks_init_on array clk: imx: imx7d: remove unnecessary clocks from clks_init_on array * clk-mmp2-ids: clk: mmp2: fix the clock id for sdh2_clk and sdh3_clk * clk-at91-pmc-rework: clk: at91: move DT compatibility code to its own file clk: at91: add at91sam9rl PMC driver clk: at91: add at91sam9x5 PMCs driver clk: at91: add at91sam9260 PMC driver clk: at91: add sama5d2 PMC driver clk: at91: add sama5d4 pmc driver clk: at91: add new DT lookup function dt-bindings: clk: at91: Document new PMC binding clk: at91: add pmc_data struct and helpers clk: at91: allow clock registration from C code clk: at91: generated: set audio_pll_allowed in at91_clk_register_generated() clk: at91: audio-pll: separate registration from DT parsing clk: at91: h32mx: separate registration from DT parsing clk: at91: generated: SSCs don't have a gclk clk: at91: audio-pll: fix audio pmc type commit c1f74dbe59b74016adb8f96667fe27f135c5247f Merge: 19ef24654f2e c8da78e8a1da f08c2e2865f6 Author: Stephen Boyd Date: Thu Oct 18 15:43:38 2018 -0700 Merge branches 'clk-tegra' and 'clk-bulk-get-all' into clk-next - Nvidia Tegra clk driver MBIST workaround fix - clk_bulk_get_all() API and friends to get all the clks for a device * clk-tegra: clk: tegra210: Include size.h for compilation ease clk: tegra: Fixes for MBIST work around clk: tegra: probe deferral error reporting * clk-bulk-get-all: clk: add managed version of clk_bulk_get_all clk: add new APIs to operate on all available clocks clk: bulk: add of_clk_bulk_get() commit 19ef24654f2ef3f4392a8df431eccf8f42ac4878 Merge: fa4c0e490387 226dfa4726eb Author: Stephen Boyd Date: Thu Oct 18 15:43:24 2018 -0700 Merge branch 'clk-ingenic-jz4725b' into clk-next - Ingenic jz4725b CGU * clk-ingenic-jz4725b: clk: Add Ingenic jz4725b CGU driver dt-bindings: clock: Add jz4725b-cgu.h header dt-bindings: clock: ingenic: Explicitly list compatible strings clk: ingenic: Add proper Kconfig entries commit fa4c0e490387fc1eec6a7109450a7dfde24e419a Merge: 37163726e1fd 652f1813c113 Author: Stephen Boyd Date: Thu Oct 18 15:42:42 2018 -0700 Merge branch 'clk-qcom-qcs404' into clk-next - Qualcomm QCS404 GCC support * clk-qcom-qcs404: clk: qcom: gcc: Add global clock controller driver for QCS404 clk: qcom: Export clk_alpha_pll_configure() commit 37163726e1fdfbc428c3e01a1f1a16407228510a Merge: ffd3b1c880a9 2725991eca5c Author: Stephen Boyd Date: Thu Oct 18 15:41:51 2018 -0700 Merge branch 'clk-qcom-sdm660' into clk-next - Qualcomm SDM660 GCC support * clk-qcom-sdm660: clk: qcom: gcc-sdm660: Add MODULE_LICENSE clk: qcom: Add Global Clock controller (GCC) driver for SDM660 commit ffd3b1c880a9c5b5bfd977b4b33e61b6584ad943 Merge: 8a69f1d4707a 6df9543da2b2 c1a3308a0629 0f5cb0e6225c Author: Stephen Boyd Date: Thu Oct 18 15:41:36 2018 -0700 Merge branches 'clk-samsung', 'clk-hisi3670' and 'clk-at91-div-0' into clk-next - Hisilicon 3670 SoC support * clk-samsung: dt-bindings: clock: samsung: Add SPDX license identifiers clk: samsung: Use clk_hw API for calling clk framework from clk notifiers clk: samsung: exynos5420: Enable PERIS clocks for suspend clk: samsung: exynos5420: Define CLK_SECKEY gate clock only or Exynos5420 clk: samsung: exynos5433: Keep sclk_uart clocks enabled in suspend clk: samsung: Remove obsolete code for Exynos4412 ISP clocks clk: samsung: exynos5433: Add suspend state for TOP, CPIF & PERIC CMUs clk: samsung: Use NOIRQ stage for Exynos5433 clocks suspend/resume clk: samsung: exynos5420: Use generic helper for handling suspend/resume clk: samsung: exynos4: Use generic helper for handling suspend/resume clk: samsung: Add support for setting registers state before suspend clk: samsung: exynos5250: Use generic helper for handling suspend/resume clk: samsung: s5pv210: Use generic helper for handling suspend/resume clk: samsung: s3c64xx: Use generic helper for handling suspend/resume clk: samsung: s3c2443: Use generic helper for handling suspend/resume clk: samsung: s3c2412: Use generic helper for handling suspend/resume clk: samsung: s3c2410: Use generic helper for handling suspend/resume clk: samsung: Remove excessive include * clk-hisi3670: clk: hisilicon: Add clock driver for Hi3670 SoC dt-bindings: clk: hisilicon: Add bindings for Hi3670 clk * clk-at91-div-0: clk: at91: Fix division by zero in PLL recalc_rate() commit 8a69f1d4707a69faab58d9735c2cb1898140124a Merge: cc2adbe370f1 a72d785021cb Author: Stephen Boyd Date: Thu Oct 18 15:41:21 2018 -0700 Merge branch 'clk-ti' into clk-next * clk-ti: clk: ti: Prepare for remove of OF node name clk: Clean up suspend/resume coding style clk: ti: Add functions to save/restore clk context clk: clk: Add clk_gate_restore_context function clk: Add functions to save/restore clock context en-masse clk: ti: dra7: add new clkctrl data clk: ti: dra7xx: rename existing clkctrl data as compat data clk: ti: am43xx: add new clkctrl data for am43xx clk: ti: am43xx: rename existing clkctrl data as compat data clk: ti: am33xx: add new clkctrl data for am33xx clk: ti: am33xx: rename existing clkctrl data as compat data clk: ti: clkctrl: replace dashes from clkdm name with underscore clk: ti: clkctrl: support multiple clkctrl nodes under a cm node dt-bindings: clock: dra7xx: add clkctrl indices for new data layout dt-bindings: clock: am43xx: add clkctrl indices for new data layout dt-bindings: clock: am33xx: add clkctrl indices for new data layout commit cc2adbe370f190fb13531ba1f55a9b0d9dc8828a Merge: cd8ca3005269 9e6dbc3d5cfc Author: Stephen Boyd Date: Thu Oct 18 15:40:10 2018 -0700 Merge branch 'clk-k3-tisci' into clk-next - TI SCI clks on K3 SoCs * clk-k3-tisci: clk: keystone: add missing MODULE_LICENSE clk: keystone: Enable TISCI clocks if K3_ARCH commit 64b9d16e2d02ca6e5dc8fcd30cfd52b0ecaaa8f4 Author: Nathan Chancellor Date: Wed Oct 17 11:04:19 2018 -0700 atm: zatm: Fix empty body Clang warnings Clang warns: drivers/atm/zatm.c:513:7: error: while loop has empty body [-Werror,-Wempty-body] zwait; ^ drivers/atm/zatm.c:513:7: note: put the semicolon on a separate line to silence this warning Get rid of this warning by using an empty do-while loop. While we're at it, add parentheses to make it clear that this is a function-like macro. Link: https://github.com/ClangBuiltLinux/linux/issues/42 Suggested-by: Masahiro Yamada Signed-off-by: Nathan Chancellor Signed-off-by: David S. Miller commit cd8ca3005269ec327643b3cc39681a6fcde16b0d Merge: 5d3a48fe2cee 5beb1e60dba9 148edd50c807 e15d598b5c6f 6ffeddd6bca4 e3aaadb0f0d6 Author: Stephen Boyd Date: Thu Oct 18 15:39:08 2018 -0700 Merge branches 'clk-mvebu-periph-pm', 'clk-meson', 'clk-allwinner', 'clk-mvebu-dup' and 'clk-davinci' into clk-next - S2RAM support for Marvell mvebu periph clks * clk-mvebu-periph-pm: clk: mvebu: armada-37xx-periph: add suspend/resume support clk: mvebu: armada-37xx-periph: save the IP base address in the driver data * clk-meson: clk: meson: meson8b: use the regmap in the internal reset controller clk: meson: meson8b: register the clock controller early clk: meson-axg: pcie: drop the mpll3 clock parent clk: meson: axg: round audio system master clocks down clk: meson: clk-pll: drop hard-coded rates from pll tables clk: meson: clk-pll: remove od parameters clk: meson: clk-pll: drop CLK_GET_RATE_NOCACHE where unnecessary clk: meson: clk-pll: add enable bit * clk-allwinner: dt-bindings: clock: sun50i-a64-ccu: Add PLL_VIDEO0 macro clk: sunxi-ng: a64: Add max. rate constraint to video PLLs clk: sunxi-ng: a64: Add minimal rate for video PLLs clk: sunxi-ng: sun50i: h6: Add 2x fixed post-divider to MMC module clocks clk: sunxi-ng: a83t: Add max. rate constraint to video PLLs clk: sunxi-ng: nkmp: Add constraint for maximum rate clk: sunxi-ng: r40: Add max. rate constraint to video PLLs clk: sunxi-ng: h3/h5: Add max. rate constraint to pll-video clk: sunxi-ng: Add maximum rate constraint to NM PLLs clk: sunxi-ng: h6: fix PWM gate/reset offset clk: sunxi-ng: h6: fix bus clocks' divider position * clk-mvebu-dup: clk: mvebu: ap806: Remove superfluous of_clk_add_provider * clk-davinci: clk: davinci: kill davinci_clk_reset_assert/deassert() commit 5d3a48fe2cee0d9fde91b6552362e86a8efca298 Merge: faff3d8e852b 78412c262004 1adb0a9faabb Author: Stephen Boyd Date: Thu Oct 18 15:39:01 2018 -0700 Merge branches 'clk-qcom-sdm845-camcc' and 'clk-mtk-unused' into clk-next - Qualcomm SDM845 camera clock controller * clk-qcom-sdm845-camcc: clk: qcom: Add camera clock controller driver for SDM845 dt-bindings: clock: Introduce QCOM Camera clock bindings * clk-mtk-unused: clk: mediatek: remove unused array audio_parents commit faff3d8e852b1450e0e8e8f60c4e9af98549548a Merge: 9710ee14bec9 be783cc8d72b Author: Stephen Boyd Date: Thu Oct 18 15:38:51 2018 -0700 Merge branch 'clk-renesas' into clk-next * clk-renesas: (36 commits) clk: renesas: r7s9210: Add SPI clocks clk: renesas: r7s9210: Move table update to separate function clk: renesas: r7s9210: Convert some clocks to early clk: renesas: cpg-mssr: Add early clock support clk: renesas: r8a77970: Add TPU clock clk: renesas: r8a77990: Fix incorrect PLL0 divider in comment dt-bindings: clock: renesas: cpg-mssr: Document r8a774c0 clk: renesas: cpg-mssr: Add r8a774c0 support clk: renesas: Add r8a774c0 CPG Core Clock Definitions clk: renesas: r8a7743: Add r8a7744 support clk: renesas: Add r8a7744 CPG Core Clock Definitions dt-bindings: clock: renesas: cpg-mssr: Document r8a7744 binding dt-bindings: clock: renesas: Convert to SPDX identifiers clk: renesas: cpg-mssr: Add R7S9210 support clk: renesas: r8a77970: Add TMU clocks clk: renesas: r8a77970: Add CMT clocks clk: renesas: r9a06g032: Fix UART34567 clock rate clk: renesas: r8a77970: Add SD0H/SD0 clocks for SDHI clk: renesas: r8a77980: Add CMT clocks clk: renesas: r8a77990: Add missing I2C7 clock ... commit 3e73cc5cd8c03ebc930f1799cc984e746780414a Author: Nathan Chancellor Date: Wed Oct 17 11:03:34 2018 -0700 atm: eni: Move semicolon to a new line after empty for loop Clang warns: drivers/atm/eni.c:244:48: error: for loop has empty body [-Werror,-Wempty-body] for (order = 0; (1 << order) < *size; order++); ^ drivers/atm/eni.c:244:48: note: put the semicolon on a separate line to silence this warning In this case, that loop is expected to be empty so silence the warning in the way that Clang suggests. Link: https://github.com/ClangBuiltLinux/linux/issues/42 Suggested-by: Masahiro Yamada Signed-off-by: Nathan Chancellor Signed-off-by: David S. Miller commit 9710ee14bec9a7ffa385342ffb03f91d274b3d07 Merge: 1affdc35e0a6 e665f029a283 00a461cc32ec 480d99fdc3ee Author: Stephen Boyd Date: Thu Oct 18 15:33:52 2018 -0700 Merge branches 'clk-dt-name', 'clk-ti-of-node' and 'clk-sa' into clk-next - Use updated printk format for OF node names - Fix TI code to only search DT subnodes - Various static analysis finds * clk-dt-name: clk: Convert to using %pOFn instead of device_node.name * clk-ti-of-node: clk: ti: fix OF child-node lookup * clk-sa: clk: mvebu: armada-37xx-tbg: Switch to clk_get and balance it in probe reset: hisilicon: fix potential NULL pointer dereference clk: cdce925: release child device nodes clk: qcom: clk-branch: Use true and false for boolean values commit 1affdc35e0a69dc503fff6b8c02bc21bb97ac900 Merge: c3828949a21d 2bdb2a1cca86 8748b4a786a9 b567752144e3 4f83d9b848f6 Author: Stephen Boyd Date: Thu Oct 18 15:33:28 2018 -0700 Merge branches 'clk-spdx', 'clk-qcom-dfs', 'clk-smp2s11-include', 'clk-qcom-8996-missing' and 'clk-qcom-qspi' into clk-next - Tag various drivers with SPDX license tags - Support dynamic frequency switching (DFS) on qcom SDM845 GCC - Only use s2mps11 dt-binding defines instead of redefining them in the driver - Add some more missing clks to qcom MSM8996 GCC - Quad SPI clks on qcom SDM845 * clk-spdx: clk: mvebu: use SPDX-License-Identifier clk: renesas: Convert to SPDX identifiers clk: renesas: use SPDX identifier for Renesas drivers clk: s2mps11,s3c64xx: Add SPDX license identifiers clk: max77686: Add SPDX license identifiers * clk-qcom-dfs: clk: qcom: Allocate space for NULL terimation in DFS table clk: qcom: gcc: Register QUPv3 RCGs for DFS on SDM845 clk: qcom: Add support for RCG to register for DFS * clk-smp2s11-include: clk: s2mps11: Use existing defines from bindings for clock IDs * clk-qcom-8996-missing: clk: qcom: Add some missing gcc clks for msm8996 * clk-qcom-qspi: clk: qcom: Add qspi (Quad SPI) clocks for sdm845 clk: qcom: Add qspi (Quad SPI) clock defines for sdm845 to header commit 82a4de6f11dc8ecf4ca8b9d207bcae6484b8f261 Author: Evan Green Date: Thu Oct 18 15:03:50 2018 -0700 clk: qcom: Remove unused arrays in SDM845 GCC This change removes a parent map and parent name array that appear to be completely unreferenced. Signed-off-by: Evan Green Signed-off-by: Stephen Boyd commit 13523bef1e2154b6d02836cd0f6c0ffc89b2eae6 Author: Kees Cook Date: Mon Sep 24 14:43:59 2018 -0700 LoadPin: Rename boot param "enabled" to "enforce" LoadPin's "enabled" setting is really about enforcement, not whether or not the LSM is using LSM hooks. Instead, split this out so that LSM enabling can be logically distinct from whether enforcement is happening (for example, the pinning happens when the LSM is enabled, but the pin is only checked when "enforce" is set). This allows LoadPin to continue to operate sanely in test environments once LSM enable/disable is centrally handled (i.e. we want LoadPin to be enabled separately from its enforcement). Signed-off-by: Kees Cook Reviewed-by: Casey Schaufler Reviewed-by: John Johansen commit f4b626d6de15149329332796e96709e0c4c84577 Author: Kees Cook Date: Wed Oct 3 17:38:37 2018 -0700 LoadPin: Report friendly block device name Instead of only reporting major/minor, include the actual block device name, at least as seen by the kernel. Signed-off-by: Kees Cook commit d93adca7a807cf4a33f3ec96402f645cd8fbe158 Author: David Ahern Date: Thu Oct 18 13:15:49 2018 -0600 MAINTAINERS: Update contact info for VRF entry Update Shrijeet's email address for the VRF entry. Signed-off-by: David Ahern Signed-off-by: David S. Miller commit 93bdcf9fdb89646e9446fab25aec76a754969619 Merge: 826799e66e86 470443e0b379 Author: Trond Myklebust Date: Thu Oct 18 17:29:00 2018 -0400 Merge tag 'nfs-rdma-for-4.20-1' of git://git.linux-nfs.org/projects/anna/linux-nfs NFS RDMA client updates for Linux 4.20 Stable bugfixes: - Reset credit grant properly after a disconnect Other bugfixes and cleanups: - xprt_release_rqst_cong is called outside of transport_lock - Create more MRs at a time and toss out old ones during recovery - Various improvements to the RDMA connection and disconnection code: - Improve naming of trace events, functions, and variables - Add documenting comments - Fix metrics and stats reporting - Fix a tracepoint sparse warning Signed-off-by: Trond Myklebust commit 826799e66e8683e5698e140bb9ef69afc8c0014e Author: J. Bruce Fields Date: Thu Oct 18 15:27:02 2018 -0400 sunrpc: safely reallow resvport min/max inversion Commits ffb6ca33b04b and e08ea3a96fc7 prevent setting xprt_min_resvport greater than xprt_max_resvport, but may also break simple code that sets one parameter then the other, if the new range does not overlap the old. Also it looks racy to me, unless there's some serialization I'm not seeing. Granted it would probably require malicious privileged processes (unless there's a chance these might eventually be settable in unprivileged containers), but still it seems better not to let userspace panic the kernel. Simpler seems to be to allow setting the parameters to whatever you want but interpret xprt_min_resvport > xprt_max_resvport as the empty range. Fixes: ffb6ca33b04b "sunrpc: Prevent resvport min/max inversion..." Fixes: e08ea3a96fc7 "sunrpc: Prevent rexvport min/max inversion..." Signed-off-by: J. Bruce Fields Signed-off-by: Trond Myklebust commit fc187514d8af3a676c7bd7922439f9f5e5c6223f Author: Benjamin Coddington Date: Thu Oct 18 15:01:49 2018 -0400 nfs: remove redundant call to nfs_context_set_write_error() We don't need to call this in the direct, read, or pnfs resend paths and the only other caller is the write path in nfs_page_async_flush() which already checks and sets the pg_error on the context. Signed-off-by: Benjamin Coddington Signed-off-by: Trond Myklebust commit fdbd1a2e4a71adcb1ae219fcfd964930d77a7f84 Author: Benjamin Coddington Date: Thu Oct 18 15:01:48 2018 -0400 nfs: Fix a missed page unlock after pg_doio() We must check pg_error and call error_cleanup after any call to pg_doio. Currently, we are skipping the unlock of a page if we encounter an error in nfs_pageio_complete() before handing off the work to the RPC layer. Signed-off-by: Benjamin Coddington Cc: stable@vger.kernel.org Signed-off-by: Trond Myklebust commit ee75fa2ae0e23f575630923bc598e7dedbb8b21c Author: Christoph Hellwig Date: Thu Oct 18 15:15:16 2018 +0200 mtip32xx: fully switch to the generic DMA API The mtip32xx used an odd mix of the old PCI and the generic DMA API, so switch it over to the generic API entirely. Note that this also removes a weird fallback to just a 32-bit coherent dma mask if the 64-bit dma mask doesn't work, as that can't even happen. Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 77a12e51fcf8c6200818e29fe1e90d944bb1af4a Author: Christoph Hellwig Date: Thu Oct 18 15:15:15 2018 +0200 rsxx: switch to the generic DMA API The PCI DMA API is deprecated, switch to the generic DMA API instead. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit b46d40daba968f6bac901b50e8fbc016b9c18c00 Author: Christoph Hellwig Date: Thu Oct 18 15:15:14 2018 +0200 umem: switch to the generic DMA API The PCI DMA API is deprecated, switch to the generic DMA API instead. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 931da2f7a56b7e84a75f40472edf96a5689734a7 Author: Christoph Hellwig Date: Thu Oct 18 15:15:13 2018 +0200 sx8: switch to the generic DMA API The PCI DMA API is deprecated, switch to the generic DMA API instead. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 64ab1fa5da058960fdd930b768c6c7b441d53d17 Author: Christoph Hellwig Date: Thu Oct 18 15:15:12 2018 +0200 sx8: remove dead IF_64BIT_DMA_IS_POSSIBLE code This code has effectively been commented out since the first commit, so remove it. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 138126214868a741691edec92d4c94d428213302 Author: Christoph Hellwig Date: Thu Oct 18 15:15:11 2018 +0200 skd: switch to the generic DMA API The PCI DMA API is deprecated, switch to the generic DMA API instead. Also make use of the dma_set_mask_and_coherent helper to easily set the streaming an coherent DMA masks together. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit ecb0a83e3198f2c1142901687afacbc73602a13b Author: Christoph Hellwig Date: Thu Oct 18 22:55:03 2018 +0200 ubd: remove use of blk_rq_map_sg There is no good reason to create a scatterlist in the ubd driver, it can just iterate the request directly. Signed-off-by: Christoph Hellwig [rw: Folded in improvements as discussed with hch and jens] Signed-off-by: Richard Weinberger Signed-off-by: Jens Axboe commit e732f4485a150492b286f3efc06f9b34dd6b9995 Author: Trond Myklebust Date: Thu Oct 18 17:03:56 2018 -0400 SUNRPC: Fix a compile warning for cmpxchg64() Signed-off-by: Trond Myklebust commit 52091c256bdcad0d01e2852a63f19cd2cce6af96 Author: Alan Tull Date: Thu Oct 18 14:54:11 2018 -0500 clk: fixed-rate: fix of_node_get-put imbalance When the fixed rate clock is created by devicetree, of_clk_add_provider is called. Add a call to of_clk_del_provider in the remove function to balance it out. Signed-off-by: Alan Tull Fixes: 435779fe1336 ("clk: fixed-rate: Convert into a module platform driver") Signed-off-by: Stephen Boyd commit 9c940bbe2bb47e03ca5e937d30b6a50bf9c0e671 Author: Nathan Chancellor Date: Thu Oct 18 12:13:40 2018 -0700 clk: s2mps11: Add used attribute to s2mps11_dt_match Clang warns after commit 8985167ecf57 ("clk: s2mps11: Fix matching when built as module and DT node contains compatible"): drivers/clk/clk-s2mps11.c:242:34: warning: variable 's2mps11_dt_match' is not needed and will not be emitted [-Wunneeded-internal-declaration] static const struct of_device_id s2mps11_dt_match[] = { ^ 1 warning generated. This warning happens when a variable is used in some construct that doesn't require a reference to that variable to be emitted in the symbol table; in this case, it's MODULE_DEVICE_TABLE, which only needs to hold the data of the variable, not the variable itself. $ nm -S drivers/clk/clk-s2mps11.o | rg s2mps11_dt_match 00000078 000003d4 R __mod_of__s2mps11_dt_match_device_table Normally, with device ID table variables, it means that the variable just needs to be tied to the device declaration at the bottom of the file, like s2mps11_clk_id: $ nm -S drivers/clk/clk-s2mps11.o | rg s2mps11_clk_id 00000000 00000078 R __mod_platform__s2mps11_clk_id_device_table 00000000 00000078 r s2mps11_clk_id However, because the comment above this deliberately doesn't want this variable added to .of_match_table, we need to mark s2mps11_dt_match as __used to silence this warning. This makes it clear to Clang that the variable is used for something, even if a reference to it isn't being emitted. Signed-off-by: Nathan Chancellor Fixes: 8985167ecf57 ("clk: s2mps11: Fix matching when built as module and DT node contains compatible") Signed-off-by: Stephen Boyd commit 4cb4e98e5bba6dce058582d78cc993fef6f0755a Author: Shay Agroskin Date: Mon Oct 8 10:28:29 2018 +0300 net/mlx5e: Added 'raw_errors_laneX' fields to ethtool statistics These are counters for errors received on rx side, such as FEC errors. Signed-off-by: Shay Agroskin Reviewed-by: Eran Ben Elisha Signed-off-by: Saeed Mahameed commit 67daf1186086ad4b2ec09b8078b835936977d06a Author: Shay Agroskin Date: Sun Sep 30 09:58:08 2018 +0300 net/mlx5: Added "per_lane_error_counters" cap bit to PCAM Added "Per lane raw errors" capability bit in Ports Capabilities Mask (PCAM) enhanced features layout. This bit determines if the fields "phy_raw_errors_laneX" in "Physical Layer statistical" counters group are supported. Signed-off-by: Shay Agroskin Reviewed-by: Eran Ben Elisha Signed-off-by: Saeed Mahameed commit 3ddeac6705aba31b7528c7d7a528eabb74475622 Author: Jakub Kicinski Date: Thu Oct 18 11:34:55 2018 -0700 tools: bpftool: use 4 context mode for the NFP disasm The nfp driver is currently always JITing the BPF for 4 context/thread mode of the NFP flow processors. Tell this to the disassembler, otherwise some registers may be incorrectly decoded. Signed-off-by: Jakub Kicinski Reviewed-by: Jiong Wang Signed-off-by: Daniel Borkmann commit 6cfa94605091b65cb2895a826750a30fbed99770 Author: Shay Agroskin Date: Tue Aug 28 10:37:52 2018 +0300 net/mlx5e: Ethtool driver callback for query/set FEC policy Driver callback function for 'ethtool --show-fec', 'ethtool --set-fec' commands. The query function returns active and configured FEC policy for current link speed. The set function sets FEC policy for all supported link speeds. 1) If current link speed doesn't support requested FEC policy, the function fails. 2) If a different link speed doesn't support requested FEC policy, FEC capbilities for this speed are turned off. Signed-off-by: Shay Agroskin Reviewed-by: Eran Ben Elisha Signed-off-by: Saeed Mahameed commit 2095b264147753eee0f122b8c0c9f035a32f0a25 Author: Shay Agroskin Date: Wed Oct 10 14:50:34 2018 +0300 net/mlx5e: Add port FEC get/set functions Added functions to query and set link FEC policy. To get/set FEC capabilities in PPLM reg we need to query current link speed. 'mlx5_get_fec_speed_field' queries current link speed and returns correct field offset. FEC Query's return value is divided into 'active FEC policy', which is the FEC policy used by the link, and 'configured FEC policy', which is the FEC policy requested by the user. The two values may differ if: 1) FEC policy was configured to 'auto', in which case the active FEC policy would be the default FEC policy for current link speed. 2) FEC policy was changed, but no link reset is performed. In which case, the active FEC policy would become the configured one after a link reset. FEC set function sets FEC policy for all link speeds and perform link reset. 1) If current link speed doesn't support requested FEC policy, the function fails. 2) If a different link speed doesn't support requested FEC policy, FEC capbilities for this speed are turned off and a warning message is printed. Signed-off-by: Shay Agroskin Reviewed-by: Eran Ben Elisha Signed-off-by: Saeed Mahameed commit 4b5b9c7d972e8a7b1e7691c7c921ec0d6dec33b9 Author: Shay Agroskin Date: Tue Oct 9 14:16:43 2018 +0300 net/mlx5: Add FEC fields to Port Phy Link Mode (PPLM) reg Added FEC related fields to PPLM layout. These fields are needed to set and query FEC policy for different link speeds. Signed-off-by: Shay Agroskin Reviewed-by: Eran Ben Elisha Signed-off-by: Saeed Mahameed commit 2a4c4298025084ba61788dfa27bcf6ea3f3c789e Author: Vlad Buslov Date: Wed Sep 26 15:19:19 2018 +0300 net/mlx5: Remove counter from idr after removing it from list Fs_counters list can temporary become unsorted when new counters are created/deleted concurrently. Idr is used to quickly lookup position to insert new counter in logarithmic time. However, if new flows are concurrently inserted during time window when flows with adjacent ids are already removed from idr but are still present in counters list, mlx5_fc_stats_work() observes counters list in inconsistent state, which results following warning: [ 1839.561955] mlx5_core 0000:81:00.0: mlx5_cmd_fc_bulk_get:587:(pid 729): Flow counter id (0x102d5) out of range (0x1c0a8..0x1c10b). Counter ignored. Move idr_remove() call to be executed synchronously with counter deletion from list. Extract this code to mlx5_fc_stats_remove() helper function that is called by workqueue job handler mlx5_fc_stats_work(). Fixes: 12d6066c3b29 ("net/mlx5: Add flow counters idr") Signed-off-by: Vlad Buslov Reviewed-by: Roi Dayan commit fd3307130344ef5fa5af0089d343ca4fc074322e Author: Vlad Buslov Date: Wed Sep 26 13:09:44 2018 +0300 net/mlx5: Take fs_counters dellist before addlist In fs_counters elements from both addlist and dellist are removed by mlx5_fc_stats_work() without any locking. This introduces race condition when batch of new rules is created and then immediately deleted (for example, when error occurred during flow creation). In such case some of the rules might be in dellist, but not in addlist when mlx5_fc_stats_work() is executed concurrently with tc, which will result rule deletion and use-after-free on next iteration because deleted rules are still in addlist. Always take dellist first to guarantee that rules can only be deleted after they were removed from addlist. Fixes: 6e5e22839136 ("net/mlx5: Add new list to store deleted flow counters") Signed-off-by: Vlad Buslov Reported-by: Chris Mi Reviewed-by: Roi Dayan commit 4972e6fa3a04032830bc3d6bb343d08ab3546773 Author: Tariq Toukan Date: Wed Sep 12 15:36:41 2018 +0300 net/mlx5: Refactor fragmented buffer struct fields and init flow Take struct mlx5_frag_buf out of mlx5_frag_buf_ctrl, as it is not needed to manage and control the datapath of the fragmented buffers API. struct mlx5_frag_buf contains control info to manage the allocation and de-allocation of the fragmented buffer. Its fields are not relevant for datapath, so here I take them out of the struct mlx5_frag_buf_ctrl, except for the fragments array itself. In addition, modified mlx5_fill_fbc to initialise the frags pointers as well. This implies that the buffer must be allocated before the function is called. A set of type-specific *_get_byte_size() functions are replaced by a generic one. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 1bd70d2eba9d90eb787634361f0f6fa2c86b3f6d Author: Peng Hao Date: Thu Oct 18 23:18:36 2018 +0800 selftests/bpf: fix file resource leak in load_kallsyms FILE pointer variable f is opened but never closed. Signed-off-by: Peng Hao Signed-off-by: Daniel Borkmann commit 828092ef77eacc6d8e344be1738dee3070719a45 Author: Jeff Kirsher Date: Wed Oct 10 12:16:13 2018 -0700 Documentation: intel: Convert to RST format Now that the documents have been updated to conform to the reStructured Text guidelines, we can now change the file extensions and update the other related references. This converts all of the Intel wired LAN driver documentation to *.rst. Signed-off-by: Jeff Kirsher Tested-by: Andrew Bowers Tested-by: Aaron Brown commit f12a84a9f650283551915e2dc65f282b9f2b8b76 Author: Jeff Kirsher Date: Wed Oct 10 12:16:12 2018 -0700 Documentation: fm10k: Add kernel documentation Added the fm10k kernel documentation, which apparently was missing. Signed-off-by: Jeff Kirsher Tested-by: Andrew Bowers Tested-by: Aaron Brown commit 1fae869bcf3dbb934d3550591eaf601b149a57a7 Author: Jeff Kirsher Date: Wed Oct 10 12:16:11 2018 -0700 Documentation: ice: Prepare documentation for RST conversion Before making the conversion to the RST (reStructured Text) format, there are changes needed to the documentation so that there are no build errors. Also fixed old/broken URLs to the correct or updated URL. Signed-off-by: Jeff Kirsher Tested-by: Andrew Bowers Tested-by: Aaron Brown commit 7bacc01d3e597fb29d874e60eb2e0c6fd6f01ec0 Author: Jeff Kirsher Date: Wed Oct 10 12:16:10 2018 -0700 Documentation: iavf: Prepare documentation for RST conversion Before making the conversion to the RST (reStructured Text) format, there are changes needed to the documentation so that there are no build errors. Also fixed old/broken URLs to the correct or updated URL. Signed-off-by: Jeff Kirsher Tested-by: Andrew Bowers Tested-by: Aaron Brown commit 1e06edcc2f22c6c637fe4cf77365c3e4595b2247 Author: Jeff Kirsher Date: Wed Oct 17 08:21:53 2018 -0700 Documentation: i40e: Prepare documentation for RST conversion Before making the conversion to the RST (reStructured Text) format, there are changes needed to the documentation so that there are no build errors. Also fixed old/broken URLs to the correct or updated URL. Signed-off-by: Jeff Kirsher Tested-by: Andrew Bowers Acked-by: Shannon Nelson commit 63e2ea2f89a4193a8e3ba2e63511a59778bcd038 Author: Jeff Kirsher Date: Wed Oct 10 12:16:08 2018 -0700 Documentation: ixgbevf: Prepare documentation for RST conversion Before making the conversion to the RST (reStructured Text) format, there are changes needed to the documentation so that there are no build errors. Also fixed old/broken URLs to the correct or updated URL. Signed-off-by: Jeff Kirsher Tested-by: Andrew Bowers Tested-by: Aaron Brown commit 4d256e4d8ae98ec824f60bcf98e5131e59d08337 Author: Jeff Kirsher Date: Wed Oct 10 12:16:07 2018 -0700 Documentation: ixgbe: Prepare documentation for RST conversion Before making the conversion to the RST (reStructured Text) format, there are changes needed to the documentation so that there are no build errors. Also fixed old/broken URLs to the correct or updated URL. Signed-off-by: Jeff Kirsher Tested-by: Andrew Bowers Tested-by: Aaron Brown commit 413548de58075cbae069669b3aca8fb9bead1c1b Author: Jeff Kirsher Date: Wed Oct 10 12:16:06 2018 -0700 Documentation: igbvf: Prepare documentation for RST conversion Before making the conversion to the RST (reStructured Text) format, there are changes needed to the documentation so that there are no build errors. Also fixed old/broken URLs to the correct or updated URL. Signed-off-by: Jeff Kirsher Tested-by: Andrew Bowers Tested-by: Aaron Brown commit cf673eee906788c6b2f2370d7cda67b62b00f946 Author: Jeff Kirsher Date: Wed Oct 10 12:16:05 2018 -0700 Documentation: igb: Prepare documentation for RST conversion Before making the conversion to the RST (reStructured Text) format, there are changes needed to the documentation so that there are no build errors. Also fixed old/broken URLs to the correct or updated URL. Signed-off-by: Jeff Kirsher Tested-by: Andrew Bowers Tested-by: Aaron Brown commit b87e7f246898d0ccd676fbac5cb3fe41b1735cf9 Author: Jeff Kirsher Date: Wed Oct 10 12:16:04 2018 -0700 Documentation: e1000e: Prepare documentation for RST conversion Before making the conversion to the RST (reStructured Text) format, there are changes needed to the documentation so that there are no build errors. Also fixed old/broken URLs to the correct or updated URL. Signed-off-by: Jeff Kirsher Tested-by: Andrew Bowers Tested-by: Aaron Brown commit 8d59045f11e3a001ae9b83d8feaab9d3a82dbfbc Author: Jeff Kirsher Date: Wed Oct 10 12:16:03 2018 -0700 Documentation: ixgb: Prepare documentation for RST conversion Before making the conversion to the RST (reStructured Text) format, there are changes needed to the documentation so that there are no build errors. Also fixed old/broken URLs to the correct or updated URL. Signed-off-by: Jeff Kirsher Tested-by: Andrew Bowers Tested-by: Aaron Brown commit 3d4e738311327bc4ba1d55fbe2f1da3de4a475f9 Author: Damien Le Moal Date: Wed Oct 17 18:05:08 2018 +0900 dm zoned: fix various dmz_get_mblock() issues dmz_fetch_mblock() called from dmz_get_mblock() has a race since the allocation of the new metadata block descriptor and its insertion in the cache rbtree with the READING state is not atomic. Two different contexts requesting the same block may end up each adding two different descriptors of the same block to the cache. Another problem for this function is that the BIO for processing the block read is allocated after the metadata block descriptor is inserted in the cache rbtree. If the BIO allocation fails, the metadata block descriptor is freed without first being removed from the rbtree. Fix the first problem by checking again if the requested block is not in the cache right before inserting the newly allocated descriptor, atomically under the mblk_lock spinlock. The second problem is fixed by simply allocating the BIO before inserting the new block in the cache. Finally, since dmz_fetch_mblock() also increments a block reference counter, rename the function to dmz_get_mblock_slow(). To be symmetric and clear, also rename dmz_lookup_mblock() to dmz_get_mblock_fast() and increment the block reference counter directly in that function rather than in dmz_get_mblock(). Fixes: 3b1a94c88b79 ("dm zoned: drive-managed zoned block device target") Cc: stable@vger.kernel.org Signed-off-by: Damien Le Moal Signed-off-by: Mike Snitzer commit 27642facf1b7428c37dc9972f39bdd746cbf9177 Author: Jeff Kirsher Date: Wed Oct 10 12:16:02 2018 -0700 Documentation: e100, e1000: Add missing SPDX header Add the SPDX-Lincense-Identifier to the Intel wired Ethernet *.rst kernel documentation. Signed-off-by: Jeff Kirsher Tested-by: Andrew Bowers Tested-by: Aaron Brown commit 33c2865f8d011a2ca9f67124ddab9dc89382e9f1 Author: Damien Le Moal Date: Wed Oct 17 18:05:07 2018 +0900 dm zoned: fix metadata block ref counting Since the ref field of struct dmz_mblock is always used with the spinlock of struct dmz_metadata locked, there is no need to use an atomic_t type. Change the type of the ref field to an unsigne integer. Fixes: 3b1a94c88b79 ("dm zoned: drive-managed zoned block device target") Cc: stable@vger.kernel.org Signed-off-by: Damien Le Moal Signed-off-by: Mike Snitzer commit d857ad75edf3c0066fcd920746f9dc75382b3324 Author: Heinz Mauelshagen Date: Fri Oct 12 20:24:25 2018 +0200 dm raid: avoid bitmap with raid4/5/6 journal device With raid4/5/6, journal device and write intent bitmap are mutually exclusive. Signed-off-by: Heinz Mauelshagen Signed-off-by: Mike Snitzer commit fe73c23d7a094f391dd358358f7dc358d430e7e1 Author: Bartlomiej Zolnierkiewicz Date: Thu Oct 18 14:05:29 2018 -0500 PCI: pcie: 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: Bjorn Helgaas commit c0e6f052f40b2d4a5e7792c21cbfb866e5e2ad0b Author: Corentin Labbe Date: Mon Jan 29 12:17:54 2018 +0000 Documentation: networking: ixgb: Remove reference to IXGB_NAPI NAPI is enabled by default and IXGB_NAPI was removed since commit 6d37ab282e24 ("ixgb: make NAPI the only option and the default") Update the doc accordingly. Signed-off-by: Corentin Labbe Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher commit aea74de4b216cdacda797d54220b8ac19daa1bf7 Author: Masanari Iida Date: Sat Oct 13 10:30:57 2018 +0900 docs: Fix typos in histogram.rst This patch fixes some spelling typos. Signed-off-by: Masanari Iida Acked-by: Randy Dunlap Acked-by: Steven Rostedt (VMware) Signed-off-by: Jonathan Corbet commit 3a3295bfa6f484bba91de0a804c1d0bf7d31dbd3 Merge: 2d0f0ca2c7b5 cd305c74b0f8 Author: David S. Miller Date: Thu Oct 18 11:23:47 2018 -0700 Merge branch 'sctp-fix-sk_wmem_queued-and-use-it-to-check-for-writable-space' Xin Long says: ==================== sctp: fix sk_wmem_queued and use it to check for writable space sctp doesn't count and use asoc sndbuf_used, sk sk_wmem_alloc and sk_wmem_queued properly, which also causes some problem. This patchset is to improve it. ==================== Signed-off-by: David S. Miller commit cd305c74b0f8b49748a79a8f67fc8e5e3e0c4794 Author: Xin Long Date: Wed Oct 17 03:07:51 2018 +0800 sctp: use sk_wmem_queued to check for writable space sk->sk_wmem_queued is used to count the size of chunks in out queue while sk->sk_wmem_alloc is for counting the size of chunks has been sent. sctp is increasing both of them before enqueuing the chunks, and using sk->sk_wmem_alloc to check for writable space. However, sk_wmem_alloc is also increased by 1 for the skb allocked for sending in sctp_packet_transmit() but it will not wake up the waiters when sk_wmem_alloc is decreased in this skb's destructor. If msg size is equal to sk_sndbuf and sendmsg is waiting for sndbuf, the check 'msg_len <= sctp_wspace(asoc)' in sctp_wait_for_sndbuf() will keep waiting if there's a skb allocked in sctp_packet_transmit, and later even if this skb got freed, the waiting thread will never get waked up. This issue has been there since very beginning, so we change to use sk->sk_wmem_queued to check for writable space as sk_wmem_queued is not increased for the skb allocked for sending, also as TCP does. SOCK_SNDBUF_LOCK check is also removed here as it's for tx buf auto tuning which I will add in another patch. Signed-off-by: Xin Long Signed-off-by: David S. Miller commit 605c0ac182c34867bda71bfbcc74958aabbe2fe0 Author: Xin Long Date: Wed Oct 17 03:07:50 2018 +0800 sctp: count both sk and asoc sndbuf with skb truesize and sctp_chunk size Now it's confusing that asoc sndbuf_used is doing memory accounting with SCTP_DATA_SNDSIZE(chunk) + sizeof(sk_buff) + sizeof(sctp_chunk) while sk sk_wmem_alloc is doing that with skb->truesize + sizeof(sctp_chunk). It also causes sctp_prsctp_prune to count with a wrong freed memory when sndbuf_policy is not set. To make this right and also keep consistent between asoc sndbuf_used, sk sk_wmem_alloc and sk_wmem_queued, use skb->truesize + sizeof(sctp_chunk) for them. Signed-off-by: Xin Long Signed-off-by: David S. Miller commit 84253c8be37d5f0b54d624be1bd1b90bbbfe14b3 Author: Kees Cook Date: Wed Oct 17 16:45:32 2018 -0700 docs: Introduce deprecated APIs list As discussed in the "API replacement/deprecation" thread[1], this makes an effort to document what things shouldn't get (re)added to the kernel, by introducing Documentation/process/deprecated.rst. [1] https://lists.linuxfoundation.org/pipermail/ksummit-discuss/2018-September/005282.html Signed-off-by: Kees Cook Signed-off-by: Jonathan Corbet commit 2725991eca5cc261d787b312d4d8518c42bd5e98 Author: Stephen Boyd Date: Thu Oct 18 11:20:11 2018 -0700 clk: qcom: gcc-sdm660: Add MODULE_LICENSE Add a module license to match the license at the top of this file and silence a build warning. Reported-by: Stephen Rothwell Signed-off-by: Stephen Boyd commit cf419d542f1d3de80034ebb0462d9ed9b1ae9277 Author: Randy Dunlap Date: Wed Oct 17 21:07:27 2018 -0700 kernel-doc: fix declaration type determination Make declaration type determination more robust. When scripts/kernel-doc is deciding if some kernel-doc notation contains an enum, a struct, a union, a typedef, or a function, it does a pattern match on the beginning of the string, looking for a match with one of "struct", "union", "enum", or "typedef", and otherwise defaults to a function declaration type. However, if a function or a function-like macro has a name that begins with "struct" (e.g., struct_size()), then kernel-doc incorrectly decides that this is a struct declaration. Fix this by looking for the declaration type keywords having an ending word boundary (\b), so that "struct_size" will not match a struct declaration. I compared lots of html before/after output from core-api, driver-api, and networking. There were no differences in any of the files that I checked. Signed-off-by: Randy Dunlap Acked-by: Jani Nikula Tested-by: Kees Cook Signed-off-by: Jonathan Corbet commit eef3dc34a1e0b01d53328b88c25237bcc7323777 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 22fc9db296fcf7ac30151c52765a7fba10870ab7 Author: Mike Marshall Date: Thu Oct 18 14:05:46 2018 -0400 orangefs: no need to check for service_operation returns > 0 service_operation returns > 0 is undefined. Signed-off-by: Mike Marshall commit 418ca3de75cd5e4130a6f2d5bd76ccb8e3f6e461 Author: Guillaume Dore Date: Thu Oct 18 17:47:50 2018 +0200 doc: fix a typo in adding-syscalls.rst There was a typo in adding-syscalls.rst that could mislead developers to add a C filename in a makefile instead of an object filename. This error, while not keeping developers from contributing could slow the development process down by introducing build errors. Signed-off-by: Guillaume Dore Signed-off-by: Jonathan Corbet commit 34e6148a2c75abdde44071d1605d009d0ad92e5e Author: Mike Marshall Date: Thu Oct 18 13:58:25 2018 -0400 orangefs: some error code paths missed kmem_cache_free If a slab cache object is allocated, it needs to be freed eventually, certainly before anyone unloads the module that allocated it. Signed-off-by: Mike Marshall commit b5d72cdc53bd13a363943a67a8c5537b9524c94d Author: Mike Marshall Date: Thu Oct 18 13:52:23 2018 -0400 orangefs: don't let orangefs_iget return NULL. Suggested by Dan Carpenter. Signed-off-by: Mike Marshall commit 56249998b25f602f8dedbe916ec5494b71da113d Author: Mike Marshall Date: Thu Oct 18 13:47:16 2018 -0400 orangefs: don't let orangefs_new_inode return NULL Suggested by Dan Carpenter Signed-off-by: Mike Marshall commit b8d9ee24493d862fbfeb3d209c032647f6073d5d Author: Dan Carpenter Date: Thu Oct 18 11:04:00 2018 +0300 usb: phy: ab8500: silence some uninitialized variable warnings Smatch complains that "reg" can be uninitialized if the abx500_get_register_interruptible() call fails. It's an interruptable function, so we should check if the user presses CTRL-C. Signed-off-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman commit 6494a9ad86de921766afe91066f53a794f6c52ea Author: Jon Hunter Date: Tue Oct 16 14:22:43 2018 +0300 usb: xhci: tegra: Add genpd support The generic power-domain framework has been updated to allow devices that require more than one power-domain to create a new device for each power-domain required and then link these new power-domain devices to the consumer device. Update the Tegra xHCI driver to use the new APIs provided by the generic power-domain framework so we can use the generic power-domain framework for managing the xHCI controllers power-domains. Please note that to maintain backward compatibility with older device-tree blobs these new generic power-domain APIs are only used if the 'power-domains' property is present and otherwise we fall back to using the legacy Tegra APIs for managing the power-domains. Signed-off-by: Jon Hunter Acked-by: Thierry Reding Reviewed-by: Ulf Hansson Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman commit 8c14796b6b2485a31a50318d76d6bc4518dc9d39 Author: Jon Hunter Date: Tue Oct 16 14:22:42 2018 +0300 usb: xhci: tegra: Power-off power-domains on removal Currently the XUSB power domains used by the Tegra xHCI controller are never powered off on the removal of the driver, however, they will be powered off on probe failure. Update the removal code to be consistent with the probe failure path to power off the XUSB power domains. Signed-off-by: Jon Hunter Acked-by: Thierry Reding Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman commit e28fd56ad5273be67d0fae5bedc7e1680e729952 Author: Shuah Khan (Samsung OSG) Date: Thu Oct 18 10:19:29 2018 -0600 usbip:vudc: BUG kmalloc-2048 (Not tainted): Poison overwritten In rmmod path, usbip_vudc does platform_device_put() twice once from platform_device_unregister() and then from put_vudc_device(). The second put results in: BUG kmalloc-2048 (Not tainted): Poison overwritten error or BUG: KASAN: use-after-free in kobject_put+0x1e/0x230 if KASAN is enabled. [ 169.042156] calling init+0x0/0x1000 [usbip_vudc] @ 1697 [ 169.042396] ============================================================================= [ 169.043678] probe of usbip-vudc.0 returned 1 after 350 usecs [ 169.044508] BUG kmalloc-2048 (Not tainted): Poison overwritten [ 169.044509] ----------------------------------------------------------------------------- ... [ 169.057849] INFO: Freed in device_release+0x2b/0x80 age=4223 cpu=3 pid=1693 [ 169.057852] kobject_put+0x86/0x1b0 [ 169.057853] 0xffffffffc0c30a96 [ 169.057855] __x64_sys_delete_module+0x157/0x240 Fix it to call platform_device_del() instead and let put_vudc_device() do the platform_device_put(). Reported-by: Randy Dunlap Signed-off-by: Shuah Khan (Samsung OSG) Cc: Signed-off-by: Greg Kroah-Hartman commit e325808c0051b16729ffd472ff887c6cae5c6317 Author: Colin Ian King Date: Tue Oct 16 19:03:43 2018 +0100 usbip: tools: fix atoi() on non-null terminated string Currently the call to atoi is being passed a single char string that is not null terminated, so there is a potential read overrun along the stack when parsing for an integer value. Fix this by instead using a 2 char string that is initialized to all zeros to ensure that a 1 char read into the string is always terminated with a \0. Detected by cppcheck: "Invalid atoi() argument nr 1. A nul-terminated string is required." Fixes: 3391ba0e2792 ("usbip: tools: Extract generic code to be shared with vudc backend") Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman commit 090158555ff8d194a98616034100b16697dd80d0 Author: Mattias Jacobsson <2pi@mok.nu> Date: Tue Oct 16 14:20:08 2018 +0200 USB: misc: appledisplay: fix backlight update_status return code Upon success the update_status handler returns a positive number corresponding to the number of bytes transferred by usb_control_msg. However the return code of the update_status handler should indicate if an error occurred(negative) or how many bytes of the user's input to sysfs that was consumed. Return code zero indicates all bytes were consumed. The bug can for example result in the update_status handler being called twice, the second time with only the "unconsumed" part of the user's input to sysfs. Effectively setting an incorrect brightness. Change the update_status handler to return zero for all successful transactions and forward usb_control_msg's error code upon failure. Signed-off-by: Mattias Jacobsson <2pi@mok.nu> Signed-off-by: Greg Kroah-Hartman commit 644930cbad32c0a850aaeed11eb2a49b492bf51a Author: Lubomir Rintel Date: Mon Oct 15 16:45:38 2018 +0200 phy: phy-pxa-usb: add a new driver Turned from arch/arm/mach-mmp/devices.c into a proper PHY driver, so that in can be instantiated from a DT. Acked-by: Kishon Vijay Abraham I Signed-off-by: Lubomir Rintel Signed-off-by: Greg Kroah-Hartman commit 2d0f0ca2c7b56c1df29429dd5a768fc49e79ffae Merge: 99e9acd85ccb 208983f099d9 Author: David S. Miller Date: Thu Oct 18 10:27:20 2018 -0700 Merge branch '1GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue Jeff Kirsher says: ==================== 1GbE Intel Wired LAN Driver Updates 2018-10-17 This series adds support for the new igc driver. The igc driver is the new client driver supporting the Intel I225 Ethernet Controller, which supports 2.5GbE speeds. The reason for creating a new client driver, instead of adding support for the new device in e1000e, is that the silicon behaves more like devices supported in igb driver. It also did not make sense to add a client part, to the igb driver which supports only 1GbE server parts. This initial set of patches is designed for basic support (i.e. link and pass traffic). Follow-on patch series will add more advanced support like VLAN, Wake-on-LAN, etc.. ==================== Signed-off-by: David S. Miller commit 99e9acd85ccbdc8f5785f9e961d4956e96bd6aa5 Merge: 8f18da472115 bf07aa730a04 Author: David S. Miller Date: Thu Oct 18 10:25:37 2018 -0700 Merge tag 'mlx5-updates-2018-10-17' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux mlx5-updates-2018-10-17 ======================================================================== From Or Gerlitz : This series from Paul adds support to mlx5 e-switch tc offloading of multiple priorities and chains. This is made of four building blocks (along with few minor driver refactors): [1] Split FDB fast path prio to multiple namespaces Currently the FDB name-space contains two priorities, fast path (p0) and slow path (p1). The slow path contains the per representor SQ send-to-vport TX rule and the match-all RX miss rule. As a pre-step to support multi-chains and priorities, we split the FDB fast path to multiple namespaces (sub namespaces), each with multiple priorities. [2] E-Switch chains and priorities A chain is a group of priorities. We use the fdb parallel sub-namespaces to implement chains, and a flow table for each priority in them. Because these namespaces are parallel and in series to the slow path fdb, the chains aren't connected to each other (but to the slow path), and one must use a explicit goto action to reach a different chain. Flow tables for the priorities are created on demand and destroyed once not used. [3] Add a no-append flow insertion mode, use it for TC offloads Enhance the driver fs core, such that if a no-append flag is set by the caller, we add a new FTE, instead of appending the actions of the inserted rule when the same match already exists. For encap rules, we defer the HW offloading till we have a valid neighbor. This can result in the packet hitting a lower priority rule in the HW DP. Use the no-append API to push these packets to the slow path FDB table, so they go to the TC kernel DP as done before priorities where supported. [4] Offloading tc priorities and chains for eswitch flows Using [1], [2] and [3] above we add the support for offloading both chains and priorities. To get to a new chain, use the tc goto action. We support a fixed prio range 1-16, and chains 0-3. ============================================================================= Signed-off-by: David S. Miller commit 1b4d990b19d2de186b188da5b033110949c118fe Merge: 5b394b2ddf03 665636b2940d Author: Stephen Boyd Date: Thu Oct 18 10:15:37 2018 -0700 Merge tag 'v4.20-rockchip-clk1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into clk-rockchip Pull Rockchip clk driver updates from Heiko Stuebner: Fixes for static checker warning and a wrong shift value for the mmc on rk3328, as well as setting a hdmi-id on rk3066 for a later driver for the hdmi encoder on it and some adapted rk3288 pll rates to support more and better hdmi rates. * tag 'v4.20-rockchip-clk1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: clk: rockchip: Fix static checker warning in rockchip_ddrclk_get_parent call clk: rockchip: use the newly added clock-id for hdmi on RK3066 clk: rockchip: add clock-id for HCLK_HDMI on rk3066 clk: rockchip: fix wrong mmc sample phase shift for rk3328 clk: rockchip: improve rk3288 pll rates for better hdmi output commit 8f18da47211554f1ef674fef627c05f23b75a8e0 Merge: 82385b0d2d25 8d4b6bce2559 Author: David S. Miller Date: Thu Oct 18 09:57:42 2018 -0700 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-10-18 1) Remove an unnecessary dev->tstats check in xfrmi_get_stats64. From Li RongQing. 2) We currently do a sizeof(element) instead of a sizeof(array) check when initializing the ovec array of the secpath. Currently this array can have only one element, so code is OK but error-prone. Change this to do a sizeof(array) check so that we can add more elements in future. From Li RongQing. 3) Improve xfrm IPv6 address hashing by using the complete IPv6 addresses for a hash. From Michal Kubecek. Please pull or let me know if there are problems. ==================== Signed-off-by: David S. Miller commit 8a3ebd8de328301aacbe328650a59253be2ac82c Author: Zachary Zhang Date: Thu Oct 18 17:37:19 2018 +0200 PCI: aardvark: Implement emulated root PCI bridge config space The PCI controller in the Marvell Armada 3720 does not implement a software-accessible root port PCI bridge configuration space. This causes a number of problems when using PCIe switches or when the Max Payload size needs to be aligned between the root complex and the endpoint. Implementing an emulated root PCI bridge, like is already done in the pci-mvebu driver for older Marvell platforms allows to solve those issues, and also to support features such as ASR, PME, VC, HP. Signed-off-by: Zachary Zhang [Thomas: convert to the common emulated PCI bridge logic.] Signed-off-by: Thomas Petazzoni Signed-off-by: Lorenzo Pieralisi commit 1f08673eef1236f7d02d93fcf596bb8531ef0d12 Author: Thomas Petazzoni Date: Thu Oct 18 17:37:18 2018 +0200 PCI: mvebu: Convert to PCI emulated bridge config space Convert the pci-mvebu driver to use the pci-bridge-emul logic, that helps emulating a root port PCI bridge configuration space. Signed-off-by: Thomas Petazzoni [lorenzo.pieralisi@arm.com: updated commit log] Signed-off-by: Lorenzo Pieralisi commit eae6aaf8488ebbf0fd6e1588f0923db0462e4c5c Author: Thomas Petazzoni Date: Thu Oct 18 17:37:17 2018 +0200 PCI: mvebu: Drop unused PCI express capability code Commit dc0352ab0b2a0 ("PCI: mvebu: Add PCI Express root complex capability block") added support for emulating the PCI Express capability block. As part of this, the pcie_sltcap, pcie_devctl and pcie_rtctl fields were added to the mvebu_sw_pci_bridge structure, and used when reading the corresponding PCI Express capability block registers. However, those structure members are never set to any value other than zero. This makes them unneeded because: - pcie_devctl is used to OR *value, so with pcie_devctl always zero, it has no effect. - for pcie_sltcap and pcie_rtstl, the mvebu_sw_pci_bridge_read() function always returns 0 for registers that are not explicitly handled. In preparation for reworking the PCI bridge emulation logic in pci-mvebu, let's simplify the code by dropping those structure members. Signed-off-by: Thomas Petazzoni Signed-off-by: Lorenzo Pieralisi commit 23a5fba4d9411787c8e86ff5808e7d8e41bf3935 Author: Thomas Petazzoni Date: Thu Oct 18 17:37:16 2018 +0200 PCI: Introduce PCI bridge emulated config space common logic Some PCI host controllers do not expose a configuration space for the root port PCI bridge. Due to this, the Marvell Armada 370/38x/XP PCI controller driver (pci-mvebu) emulates a root port PCI bridge configuration space, and uses that to (among other things) dynamically create the memory windows that correspond to the PCI MEM and I/O regions. Since we now need to add a very similar logic for the Marvell Armada 37xx PCI controller driver (pci-aardvark), instead of duplicating the code, we create in this commit a common logic called pci-bridge-emul. The idea of this logic is to emulate a root port PCI bridge configuration space by providing configuration space read/write operations, and faking behind the scenes the configuration space of a PCI bridge. A PCI host controller driver simply has to call pci_bridge_emul_conf_read() and pci_bridge_emul_conf_write() to read/write the configuration space of the bridge. By default, the PCI bridge configuration space is simply emulated by a chunk of memory, but the PCI host controller can override the behavior of the read and write operations on a per-register basis to do additional actions if needed. We take care of complying with the behavior of the PCI configuration space registers in terms of bits that are read-write, read-only, reserved and write-1-to-clear. Signed-off-by: Thomas Petazzoni Signed-off-by: Lorenzo Pieralisi Acked-by: Bjorn Helgaas Reviewed-by: Russell King commit ea89238c0a7b346bc90552e0244e87edf3311920 Author: Guoqing Jiang Date: Thu Oct 18 16:37:48 2018 +0800 md-cluster: remove suspend_info Previously, we allow multiple nodes can resync device, but we had changed it to only support one node can do resync at one time, but suspend_info is still used. Now, let's remove the structure and use suspend_lo/hi to record the range. Reviewed-by: NeilBrown Signed-off-by: Guoqing Jiang Signed-off-by: Shaohua Li commit cb9ee154317b084a96a7c2b771d1688f39fc714c Author: Guoqing Jiang Date: Thu Oct 18 16:37:47 2018 +0800 md-cluster: send BITMAP_NEEDS_SYNC message if reshaping is interrupted We need to continue the reshaping if it was interrupted in original node. So original node should call resync_bitmap in case reshaping is aborted. Then BITMAP_NEEDS_SYNC message is broadcasted to other nodes, node which continues the reshaping should restart reshape from mddev->reshape_position instead of from the first beginning. Reviewed-by: NeilBrown Signed-off-by: Guoqing Jiang Signed-off-by: Shaohua Li commit cbce6863b6d04f6eac6b144bcfaaf11a189d6533 Author: Guoqing Jiang Date: Thu Oct 18 16:37:46 2018 +0800 md-cluster/bitmap: don't call md_bitmap_sync_with_cluster during reshaping stage When reshape is happening in one node, other nodes could receive lots of RESYNCING messages, so md_bitmap_sync_with_cluster is called. Since the resyncing window is typically small in these RESYNCING messages, so WARN is always triggered, so we should not call the func when reshape is happening. Reviewed-by: NeilBrown Signed-off-by: Guoqing Jiang Signed-off-by: Shaohua Li commit ca1e98e04a8d6cefbe8ad138df806434de6de7f3 Author: Guoqing Jiang Date: Thu Oct 18 16:37:45 2018 +0800 md-cluster/raid10: don't call remove_and_add_spares during reshaping stage remove_and_add_spares is not needed if reshape is happening in another node, because raid10_add_disk called inside raid10_start_reshape would handle the role changes of disk. Plus, remove_and_add_spares can't deal with the role change due to reshape. Reviewed-by: NeilBrown Signed-off-by: Guoqing Jiang Signed-off-by: Shaohua Li commit aefb2e5fc2be590e6bef8985f3d175c3d38b0b77 Author: Guoqing Jiang Date: Thu Oct 18 16:37:44 2018 +0800 md-cluster/raid10: call update_size in md_reap_sync_thread We need to change the capacity in all nodes after one node finishs reshape. And as we did before, we can't change the capacity directly in md_do_sync, instead, the capacity should be only changed in update_size or received CHANGE_CAPACITY msg. So master node calls update_size after completes reshape in md_reap_sync_thread, but we need to skip ops->update_size if MD_CLOSING is set since reshaping could not be finish. Reviewed-by: NeilBrown Signed-off-by: Guoqing Jiang Signed-off-by: Shaohua Li commit 5ebaf80bc8d5826edcc2d1cea26a7d5a4b8f01dd Author: Guoqing Jiang Date: Thu Oct 18 16:37:43 2018 +0800 md-cluster: introduce resync_info_get interface for sanity check Since the resync region from suspend_info means one node is reshaping this area, so the position of reshape_progress should be included in the area. Reviewed-by: NeilBrown Signed-off-by: Guoqing Jiang Signed-off-by: Shaohua Li commit 7564beda19b3646d781934d04fc382b738053e6f Author: Guoqing Jiang Date: Thu Oct 18 16:37:42 2018 +0800 md-cluster/raid10: support add disk under grow mode For clustered raid10 scenario, we need to let all the nodes know about that a new disk is added to the array, and the reshape caused by add new member just need to be happened in one node, but other nodes should know about the change. Since reshape means read data from somewhere (which is already used by array) and write data to unused region. Obviously, it is awful if one node is reading data from address while another node is writing to the same address. Considering we have implemented suspend writes in the resyncing area, so we can just broadcast the reading address to other nodes to avoid the trouble. For master node, it would call reshape_request then update sb during the reshape period. To avoid above trouble, we call resync_info_update to send RESYNC message in reshape_request. Then from slave node's view, it receives two type messages: 1. RESYNCING message Slave node add the address (where master node reading data from) to suspend list. 2. METADATA_UPDATED message Once slave nodes know the reshaping is started in master node, it is time to update reshape position and call start_reshape to follow master node's step. After reshape is done, only reshape position is need to be updated, so the majority task of reshaping is happened on the master node. Reviewed-by: NeilBrown Signed-off-by: Guoqing Jiang Signed-off-by: Shaohua Li commit afd75628608337cf427a1f9ca0e46698a74f25d8 Author: Guoqing Jiang Date: Thu Oct 18 16:37:41 2018 +0800 md-cluster/raid10: resize all the bitmaps before start reshape To support add disk under grow mode, we need to resize all the bitmaps of each node before reshape, so that we can ensure all nodes have the same view of the bitmap of the clustered raid. So after the master node resized the bitmap, it broadcast a message to other slave nodes, and it checks the size of each bitmap are same or not by compare pages. We can only continue the reshaping after all nodes update the bitmap to the same size (by checking the pages), otherwise revert bitmap size to previous value. The resize_bitmaps interface and BITMAP_RESIZE message are introduced in md-cluster.c for the purpose. Reviewed-by: NeilBrown Signed-off-by: Guoqing Jiang Signed-off-by: Shaohua Li commit dc8af3a827df6d4bb925d3b81b7ec94a7cce9482 Author: Jon Derrick Date: Mon Oct 15 18:48:07 2018 -0600 PCI: vmd: Detach resources after stopping root bus The VMD removal path calls pci_stop_root_busi(), which tears down the pcie tree, including detaching all of the attached drivers. During driver detachment, devices may use pci_release_region() to release resources. This path relies on the resource being accessible in resource tree. By detaching the child domain from the parent resource domain prior to stopping the bus, we are preventing the list traversal from finding the resource to be freed. If we instead detach the resource after stopping the bus, we will have properly freed the resource and detaching is simply accounting at that point. Without this order, the resource is never freed and is orphaned on VMD removal, leading to a warning: [ 181.940162] Trying to free nonexistent resource Fixes: 2c2c5c5cd213 ("x86/PCI: VMD: Attach VMD resources to parent domain's resource tree") Signed-off-by: Jon Derrick [lorenzo.pieralisi@arm.com: updated commit log] Signed-off-by: Lorenzo Pieralisi Reviewed-by: Keith Busch commit ed0302e83098db9b3a8c27f36c93deeafd6963d8 Author: Michał Mirosław Date: Tue Oct 9 22:13:43 2018 +0200 dm crypt: make workqueue names device-specific Make cpu-usage debugging easier by naming workqueues per device. Example ps output: root 413 0.0 0.0 0 0 ? I< paź02 0:00 [kcryptd_io/253:0] root 414 0.0 0.0 0 0 ? I< paź02 0:00 [kcryptd/253:0] root 415 0.0 0.0 0 0 ? S paź02 1:10 [dmcrypt_write/253:0] root 465 0.0 0.0 0 0 ? I< paź02 0:00 [kcryptd_io/253:2] root 466 0.0 0.0 0 0 ? I< paź02 0:00 [kcryptd/253:2] root 467 0.0 0.0 0 0 ? S paź02 2:06 [dmcrypt_write/253:2] root 15359 0.2 0.0 0 0 ? I< 19:43 0:25 [kworker/u17:8-kcryptd/253:0] root 16563 0.2 0.0 0 0 ? I< 20:10 0:18 [kworker/u17:0-kcryptd/253:2] root 23205 0.1 0.0 0 0 ? I< 21:21 0:04 [kworker/u17:4-kcryptd/253:0] root 13383 0.1 0.0 0 0 ? I< 21:32 0:02 [kworker/u17:2-kcryptd/253:2] root 2610 0.1 0.0 0 0 ? I< 21:42 0:01 [kworker/u17:12-kcryptd/253:2] root 20124 0.1 0.0 0 0 ? I< 21:56 0:01 [kworker/u17:1-kcryptd/253:2] Signed-off-by: Michał Mirosław Signed-off-by: Mike Snitzer commit e45506ac0af9b56b221863e9649fe122d8bb42ff Author: Yangtao Li Date: Thu Oct 18 10:21:33 2018 -0400 softirq: Fix typo in __do_softirq() comments s/s/as [ mingo: Also add a missing 'the', add proper punctuation and clarify what 'swap' means here. ] Signed-off-by: Yangtao Li Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: alexander.levin@verizon.com Cc: frederic@kernel.org Cc: joel@joelfernandes.org Cc: paulmck@linux.vnet.ibm.com Cc: rostedt@goodmis.org Link: http://lkml.kernel.org/r/20181018142133.12341-1-tiny.windzz@gmail.com Signed-off-by: Ingo Molnar commit f349b0a3e1f0d184374936f1b2a49352f8a4b1c8 Author: Michał Mirosław Date: Tue Oct 9 22:13:42 2018 +0200 dm: add dm_table_device_name() Add a shortcut for dm_device_name(dm_table_get_md(t)). Signed-off-by: Michał Mirosław Signed-off-by: Mike Snitzer commit 800a7340ab7dd667edf95e74d8e4f23a17e87076 Author: Wenwen Wang Date: Wed Oct 3 11:43:59 2018 -0500 dm ioctl: harden copy_params()'s copy_from_user() from malicious users In copy_params(), the struct 'dm_ioctl' is first copied from the user space buffer 'user' to 'param_kernel' and the field 'data_size' is checked against 'minimum_data_size' (size of 'struct dm_ioctl' payload up to its 'data' member). If the check fails, an error code EINVAL will be returned. Otherwise, param_kernel->data_size is used to do a second copy, which copies from the same user-space buffer to 'dmi'. After the second copy, only 'dmi->data_size' is checked against 'param_kernel->data_size'. Given that the buffer 'user' resides in the user space, a malicious user-space process can race to change the content in the buffer between the two copies. This way, the attacker can inject inconsistent data into 'dmi' (versus previously validated 'param_kernel'). Fix redundant copying of 'minimum_data_size' from user-space buffer by using the first copy stored in 'param_kernel'. Also remove the 'data_size' check after the second copy because it is now unnecessary. Cc: stable@vger.kernel.org Signed-off-by: Wenwen Wang Signed-off-by: Mike Snitzer commit d6afa561e1471ccfdaf7191230c0c59a37e45a5b Author: David Miller Date: Wed Oct 17 12:08:59 2018 -0700 perf symbols: Set PLT entry/header sizes properly on Sparc Using the sh_entsize for both values isn't correct. It happens to be correct on x86... For both 32-bit and 64-bit sparc, there are four PLT entries in the PLT section. Signed-off-by: David S. Miller Cc: Alexander Shishkin Cc: Alexis Berlemont Cc: David Tolnay Cc: Hanjun Guo Cc: Hemant Kumar Cc: Li Bin Cc: Masami Hiramatsu Cc: Milian Wolff Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Wang Nan Cc: zhangmengting@huawei.com Fixes: b2f7605076d6 ("perf symbols: Fix plt entry calculation for ARM and AARCH64") Link: http://lkml.kernel.org/r/20181017.120859.2268840244308635255.davem@davemloft.net Signed-off-by: Arnaldo Carvalho de Melo commit d87b9790b3deb7601872d34fd05af3da78147583 Author: David Miller Date: Tue Oct 16 21:15:45 2018 -0700 perf jitdump: Add Sparc support. Signed-off-by: David S. Miller Link: http://lkml.kernel.org/r/20181016.211545.1487970139012324624.davem@davemloft.net Signed-off-by: Arnaldo Carvalho de Melo commit 0ab41886648bb75b951bd41d8b5cecaca8e0ad66 Author: David Miller Date: Tue Oct 16 20:55:55 2018 -0700 perf annotate: Add Sparc support E.g.: $ perf annotate --stdio2 Samples: 7K of event 'cycles:ppp', 4000 Hz, Event count (approx.): 3086733887 __gettimeofday /lib32/libc-2.27.so [Percent: local period] Percent│ │ │ │ Disassembly of section .text: │ │ 000a6fa0 <__gettimeofday@@GLIBC_2.0>: 0.47 │ save %sp, -96, %sp 0.73 │ sethi %hi(0xe9000), %l7 │ → call __frame_state_for@@GLIBC_2.0+0x480 0.30 │ add %l7, 0x58, %l7 ! e9058 1.33 │ mov %i0, %o0 │ mov %i1, %o1 0.43 │ mov 0x74, %g1 │ ta 0x10 88.92 │ ↓ bcc 30 2.95 │ clr %g1 │ neg %o0 │ mov 1, %g1 0.31 │30: cmp %g1, 0 │ bne,pn %icc, a6fe4 <__gettimeofday@@GLIBC_2.0+0x44> │ mov %o0, %i0 1.96 │ ← return %i7 + 8 2.62 │ nop │ sethi %hi(0), %g1 │ neg %o0, %g2 │ add %g1, 0x160, %g1 │ ld [ %l7 + %g1 ], %g1 │ st %g2, [ %g7 + %g1 ] │ ← return %i7 + 8 │ mov -1, %o0 Signed-off-by: David S. Miller Link: http://lkml.kernel.org/r/20181016.205555.1070918198627611771.davem@davemloft.net Signed-off-by: Arnaldo Carvalho de Melo commit cf7905165fee15fe26ac4a91ee0a35b966249430 Author: Alexey Budankov Date: Tue Oct 9 17:36:24 2018 +0300 perf record: Encode -k clockid frequency into Perf trace Store -k clockid frequency into Perf trace to enable timestamps derived metrics conversion into wall clock time on reporting stage. Below is the example of perf report output: tools/perf/perf record -k raw -- ../../matrix/linux/matrix.gcc ... [ perf record: Captured and wrote 31.222 MB perf.data (818054 samples) ] tools/perf/perf report --header # ======== ... # event : name = cycles:ppp, , size = 112, { sample_period, sample_freq } = 4000, sample_type = IP|TID|TIME|PERIOD, disabled = 1, inherit = 1, mmap = 1, comm = 1, freq = 1, enable_on_exec = 1, task = 1, precise_ip = 3, sample_id_all = 1, exclude_guest = 1, mmap2 = 1, comm_exec = 1, use_clockid = 1, clockid = 4 ... # clockid frequency: 1000 MHz ... # ======== 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/23a4a1dc-b160-85a0-347d-40a2ed6d007b@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit ce6c9da1113ad681bff27a3e376d2017f7f8a59c Merge: d4ae552982de 20e8e72d0fa8 Author: Arnaldo Carvalho de Melo Date: Thu Oct 18 11:13:01 2018 -0300 Merge remote-tracking branch 'tip/perf/urgent' into perf/core To pick up fixes. Signed-off-by: Arnaldo Carvalho de Melo commit a0e102914aa3f619a5bc68a0d33e17d1788cdf4c Author: Christophe Leroy Date: Tue Oct 16 12:33:40 2018 +0000 powerpc/io: remove old GCC version implementation GCC 4.6 is the minimum supported now. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman commit 23ad1a2700725d46ee7760920974c68be81ab82d Author: Michael Ellerman Date: Wed Oct 10 16:13:06 2018 +1100 powerpc: Add -Werror at arch/powerpc level Back when I added -Werror in commit ba55bd74360e ("powerpc: Add configurable -Werror for arch/powerpc") I did it by adding it to most of the arch Makefiles. At the time we excluded math-emu, because apparently it didn't build cleanly. But that seems to have been fixed somewhere in the interim. So move the -Werror addition to the top-level of the arch, this saves us from repeating it in every Makefile and means we won't forget to add it to any new sub-dirs. Signed-off-by: Michael Ellerman commit c47ca98d32a22a412ddbc69916cf62bdcdfa1a4e Author: Michael Ellerman Date: Wed Oct 10 16:13:05 2018 +1100 powerpc: Move core kernel logic into arch/powerpc/Kbuild This is a nice cleanup, arch/powerpc/Makefile is long and messy so moving this out helps a little. It also allows us to do: $ make arch/powerpc Which can be helpful if you just want to compile test some changes to arch code and not link everything. Finally it also gives us a single place to do subdir-cc-flags assignments which affect the whole of arch/powerpc, which we will do in a future patch. Signed-off-by: Michael Ellerman commit fc0c8b36d379a046525eacb9c3323ca635283757 Author: Benjamin Herrenschmidt Date: Mon Oct 15 11:18:49 2018 +1100 macintosh/windfarm_smu_sat: Fix debug output There's some antiquated debug output that's trying to do a hand-made hexdump and turning into horrible 1-byte-per-line output these days. Use print_hex_dump() instead Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Michael Ellerman commit bd03fd84a53ac9ddaeb0a0fc4c4c9836e12f3ab9 Author: Christophe Leroy Date: Mon Oct 15 07:38:10 2018 +0000 powerpc/traps: remove redundant in_interrupt panic in die() do_exit() already includes a test to panic() is in_interrupt() This patch removes powerpc one which is redundant. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman commit f1f208e54d08ccf00121c700a9bb1fe3e55b3a51 Author: Benjamin Herrenschmidt Date: Mon Oct 15 13:50:00 2018 +1100 powerpc/prom_init: Generate "phandle" instead of "linux, phandle" When creating the boot-time FDT from an actual Open Firmware live tree, let's generate "phandle" properties for the phandles instead of the old deprecated "linux,phandle". Signed-off-by: Benjamin Herrenschmidt [mpe: Unsplit warning printf()] Signed-off-by: Michael Ellerman commit 2c51d97ee88da897db8405f659d1735ffe86ad7c Author: Benjamin Herrenschmidt Date: Mon Oct 15 13:49:59 2018 +1100 powerpc: Check prom_init for disallowed sections prom_init.c must not modify the kernel image outside of the .bss.prominit section. Thus make sure that prom_init.o doesn't have anything in any of these: .data .bss .init.data Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Michael Ellerman commit 5f69e38885c3483a1838dd946aaf0166b727ecbd Author: Benjamin Herrenschmidt Date: Mon Oct 15 13:49:58 2018 +1100 powerpc/prom_init: Move __prombss to it's own section and store it in .bss This makes __prombss its own section, and for now store it in .bss. This will give us the ability later to store it elsewhere and/or free it after boot (it's about 8KB). Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Michael Ellerman commit 8ca2d5151e7f5cbef42eda780eac56acc0eab47a Author: Benjamin Herrenschmidt Date: Mon Oct 15 13:49:57 2018 +1100 powerpc/prom_init: Move a few remaining statics to appropriate sections Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Michael Ellerman commit d00e34b92cd7d8f1c10c2f0a8c10368bfca1a5dc Author: Benjamin Herrenschmidt Date: Mon Oct 15 13:49:56 2018 +1100 powerpc/prom_init: Move const structures to __initconst As they are no longer used past the end of prom_init Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Michael Ellerman commit a614f52e75bd69b513707b4adc672149c4903995 Author: Benjamin Herrenschmidt Date: Mon Oct 15 13:49:55 2018 +1100 powerpc/prom_init: Move ibm_arch_vec to __prombss Make the existing initialized definition constant and copy it to a __prombss copy Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Michael Ellerman commit c886087caee759790db47f345f8382d653015de3 Author: Benjamin Herrenschmidt Date: Mon Oct 15 13:49:54 2018 +1100 powerpc/prom_init: Move prom_radix_disable to __prombss Initialize it dynamically instead of statically Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Michael Ellerman commit 11fdb309341ca1ba2e3d03fd1c9c0c6aedaea0b6 Author: Benjamin Herrenschmidt Date: Mon Oct 15 13:49:53 2018 +1100 powerpc/prom_init: Remove support for OPAL v2 We removed support for running under any OPAL version earlier than v3 in 2015 (they never saw the light of day anyway), but we kept some leftovers of this support in prom_init.c, so let's take it out. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Michael Ellerman commit e63334e556d9286fc30bec1050360824bcd2d990 Author: Benjamin Herrenschmidt Date: Mon Oct 15 13:49:52 2018 +1100 powerpc/prom_init: Replace __initdata with __prombss when applicable This replaces all occurrences of __initdata for uninitialized data with a new __prombss Currently __promdata is defined to be __initdata but we'll eventually change that. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Michael Ellerman commit b5beae5e224f1c72c4482b0ab36fc3d89481a6b2 Author: Oliver O'Halloran Date: Mon Oct 15 10:18:28 2018 +1100 powerpc/pseries: Add driver for PAPR SCM regions Adds a driver that implements support for enabling and accessing PAPR SCM regions. Unfortunately due to how the PAPR interface works we can't use the existing of_pmem driver (yet) because: a) The guest is required to use the H_SCM_BIND_MEM h-call to add add the SCM region to it's physical address space, and b) There is currently no mechanism for relating a bare of_pmem region to the backing DIMM (or not-a-DIMM for our case). Both of these are easily handled by rolling the functionality into a seperate driver so here we are... Acked-by: Dan Williams Signed-off-by: Oliver O'Halloran Signed-off-by: Michael Ellerman commit 4c5d87db497832c493ed296157bd1749dddc69f1 Author: Oliver O'Halloran Date: Mon Oct 15 10:18:27 2018 +1100 powerpc/pseries: PAPR persistent memory support This patch implements support for discovering storage class memory devices at boot and for handling hotplug of new regions via RTAS hotplug events. Signed-off-by: Oliver O'Halloran [mpe: Fix CONFIG_MEMORY_HOTPLUG=n build] Signed-off-by: Michael Ellerman commit 422123ccb9a13dcea2e008194ae6c262fbb64604 Author: Christophe Leroy Date: Mon Oct 15 07:20:45 2018 +0000 powerpc/traps: fix machine check handlers to use pr_cont() When printing the machine check cause, the cause appears on the following line due to bad use of printk without \n: [ 33.663993] Machine check in kernel mode. [ 33.664011] Caused by (from SRR1=9032): [ 33.664036] Data access error at address c90c8000 This patch fixes it by using pr_cont() for the second part: [ 133.258131] Machine check in kernel mode. [ 133.258146] Caused by (from SRR1=9032): Data access error at address c90c8000 Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman commit bde1a1335c5031758d3917d83dd5b85b761bbebd Author: Christophe Leroy Date: Wed Oct 17 13:03:22 2018 +0000 powerpc/book3e: redefine pte_mkprivileged() and pte_mkuser() Book3e defines both _PAGE_USER and _PAGE_PRIVILEGED, so the nohash default pte_mkprivileged() and pte_mkuser() are not usable. This patch redefines them for book3e. In theorie, only pte_mkprivileged() needs to be redefined because _PAGE_USER includes _PAGE_PRIVILEGED, but it is less confusing to redefine both. Fixes: a0da4bc166f2 ("powerpc/mm: Allow platforms to redefine some helpers") Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman commit b9fb4480a3af85552d88561a2fea9c4d5f54c917 Author: Aneesh Kumar K.V Date: Wed Oct 17 15:09:21 2018 +0530 powerpc/mm: Make pte_pgprot return all pte bits Other archs do the same and instead of adding required pte bits (which got masked out) in __ioremap_at(), make sure we filter only pfn bits out. Fixes: 26973fa5ac0e ("powerpc/mm: use pte helpers in generic code") Reviewed-by: Christophe Leroy Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman commit eb7ebfa3c1989aa8e59d5e68ab3cddd7df1bfb27 Author: Philipp Klocke Date: Thu Oct 18 12:33:02 2018 +0200 ALSA: i2c/cs8427: Fix int to char conversion Compiling with clang yields the following warning: sound/i2c/cs8427.c:140:31: warning: implicit conversion from 'int' to 'char' changes value from 160 to -96 [-Wconstant-conversion] data[0] = CS8427_REG_AUTOINC | CS8427_REG_CORU_DATABUF; ~ ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~ Because CS8427_REG_AUTOINC is defined as 128, it is too big for a char field. So change data from char to unsigned char, that it can hold the value. This patch does not change the generated code. Signed-off-by: Philipp Klocke Signed-off-by: Takashi Iwai commit 89303c7ea770b6010943ef4ed73eb92bdc5a7ec8 Merge: ef1a2a62cc48 17c42e34997a Author: Greg Kroah-Hartman Date: Thu Oct 18 14:59:04 2018 +0200 Merge tag 'usb-serial-4.20-rc1' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-next Johan writes: USB-serial updates for v4.20-rc1 Here are the USB-serial updates for 4.20-rc1, including: - support for CBUS GPIO on FTDI devices (FTX and FT232R) - fix of a long-standing transfer-length bug Included are also various clean ups. All have been in linux-next with no reported issues. Signed-off-by: Johan Hovold * tag 'usb-serial-4.20-rc1' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial: USB: serial: cypress_m8: remove set but not used variable 'iflag' USB: serial: cypress_m8: fix interrupt-out transfer length USB: serial: ftdi_sio: add support for FT232R CBUS gpios USB: serial: ftdi_sio: fix gpio name collisions USB: serial: ftdi_sio: implement GPIO support for FT-X devices USB: serial: cypress_m8: fix spelling mistake "retreiving" -> "retrieving" commit 0a1875ad29ef6436da3c184494b509697c8e0cf7 Merge: 1f825f74c113 d030fd0ec5c7 757c968c4423 Author: Rafael J. Wysocki Date: Thu Oct 18 12:37:51 2018 +0200 Merge branches 'acpi-property' and 'acpi-sbs' * acpi-property: ACPI / property: Switch to bitmap_zalloc() * acpi-sbs: ACPI / SBS: Fix rare oops when removing modules ACPI / SBS: Fix GPE storm on recent MacBookPro's commit 1f825f74c1132cea03a9edf02475ffb7715731dc Merge: bd371e088bd3 48402cee6889 d0381bf4f80c 78cd96f0504b afd0b1fb2226 3230b2b3c1ab Author: Rafael J. Wysocki Date: Thu Oct 18 12:37:27 2018 +0200 Merge branches 'acpi-soc', 'acpi-processor', 'acpi-pmic', 'acpi-cppc' and 'acpi-tad' * acpi-soc: ACPI / LPSS: Resume BYT/CHT I2C controllers from resume_noirq ACPI / LPSS: Add a device link from the GPU to the BYT I2C5 controller ACPI / LPSS: Add a device link from the GPU to the CHT I2C7 controller ACPI / LPSS: Make acpi_lpss_find_device() also find PCI devices ACPI / LPSS: Make hid_uid_match helper accept a NULL uid argument ACPI / LPSS: Make hid_uid_match helper take an acpi_device as first argument ACPI / LPSS: Exclude I2C busses shared with PUNIT from pmc_atom_d3_mask ACPI / LPSS: Add alternative ACPI HIDs for Cherry Trail DMA controllers * acpi-processor: ACPI / processor: Fix the return value of acpi_processor_ids_walk() * acpi-pmic: ACPI / PMIC: Convert drivers to use SPDX identifier ACPI / PMIC: Sort headers alphabetically * acpi-cppc: mailbox: PCC: handle parse error * acpi-tad: ACPI: TAD: Add low-level support for real time capability commit bd371e088bd39d31cf9fa8cb91858a87df404e7f Merge: 3c88a889b4ec d737f333b211 83b2348e2755 719cf71cada1 59bbff3775c0 56f57c07fd08 Author: Rafael J. Wysocki Date: Thu Oct 18 12:37:11 2018 +0200 Merge branches 'acpi-init', 'acpi-osl', 'acpi-bus', 'acpi-tables' and 'acpi-misc' * acpi-init: ACPI: probe ECDT before loading AML tables regardless of module-level code flag * acpi-osl: ACPI / OSL: Use 'jiffies' as the time bassis for acpi_os_get_timer() * acpi-bus: ACPI / glue: Split dev_is_platform() out of module for wide use * acpi-tables: ACPI/PPTT: Handle architecturally unknown cache types drivers: base: cacheinfo: Do not populate sysfs for unknown cache types * acpi-misc: ACPI: remove redundant 'default n' from Kconfig ACPI: custom_method: remove meaningless null check before debugfs_remove() commit cc19b05e3883efbbfd525747a86d0567b12c4d12 Merge: 5d113aa679b8 8fa387494928 9a69e3ac41a5 Author: Rafael J. Wysocki Date: Thu Oct 18 12:28:12 2018 +0200 Merge branches 'pm-devfreq' and 'pm-tools' * pm-devfreq: PM / devfreq: remove redundant null pointer check before kfree PM / devfreq: stopping the governor before device_unregister() PM / devfreq: Convert to using %pOFn instead of device_node.name PM / devfreq: Make update_devfreq() public PM / devfreq: Don't adjust to user limits in governors PM / devfreq: Fix handling of min/max_freq == 0 PM / devfreq: Drop custom MIN/MAX macros PM / devfreq: Fix devfreq_add_device() when drivers are built as modules. * pm-tools: PM / tools: sleepgraph and bootgraph: upgrade to v5.2 PM / tools: sleepgraph: first batch of v5.2 changes cpupower: Fix coredump on VMWare cpupower: Fix AMD Family 0x17 msr_pstate size cpupower: remove stringop-truncation waring commit 5d113aa679b855e03629cc79c7b7a5faf2ce2b89 Merge: 3f858ae02c19 c2dc121c6499 17ed15183c24 Author: Rafael J. Wysocki Date: Thu Oct 18 12:27:51 2018 +0200 Merge branches 'pm-opp' and 'powercap' * pm-opp: PM / OPP: _of_add_opp_table_v2(): increment count only if OPP is added cpufreq: dt: Try freeing static OPPs only if we have added them OPP: Return error on error from dev_pm_opp_get_opp_count() OPP: Improve error handling in dev_pm_opp_of_cpumask_add_table() OPP: Pass OPP table to _of_add_opp_table_v{1|2}() OPP: Prevent creating multiple OPP tables for devices sharing OPP nodes OPP: Use a single mechanism to free the OPP table OPP: Don't remove dynamic OPPs from _dev_pm_opp_remove_table() cpufreq: mvebu: Remove OPPs using dev_pm_opp_remove() OPP: Create separate kref for static OPPs list OPP: Don't take OPP table's kref for static OPPs OPP: Parse OPP table's DT properties from _of_init_opp_table() OPP: Pass index to _of_init_opp_table() OPP: Protect dev_list with opp_table lock OPP: Don't try to remove all OPP tables on failure OPP: Free OPP table properly on performance state irregularities * powercap: powercap: RAPL: Get rid of custom RAPL_CPU() macro commit 3f858ae02c196c1f97b88f56a28ff0263ac909f8 Merge: d1551f7a5aed 1cdda9486f51 1fca4ba0b14d Author: Rafael J. Wysocki Date: Thu Oct 18 12:27:30 2018 +0200 Merge branches 'acpi-pm' and 'pm-sleep' * acpi-pm: ACPI / PM: LPIT: Register sysfs attributes based on FADT * pm-sleep: x86-32, hibernate: Adjust in_suspend after resumed on 32bit system x86-32, hibernate: Set up temporary text mapping for 32bit system x86-32, hibernate: Switch to relocated restore code during resume on 32bit system x86-32, hibernate: Switch to original page table after resumed x86-32, hibernate: Use the page size macro instead of constant value x86-32, hibernate: Use temp_pgt as the temporary page table x86, hibernate: Rename temp_level4_pgt to temp_pgt x86-32, hibernate: Enable CONFIG_ARCH_HIBERNATION_HEADER on 32bit system x86, hibernate: Extract the common code of 64/32 bit system x86-32/asm/power: Create stack frames in hibernate_asm_32.S PM / hibernate: Check the success of generating md5 digest before hibernation x86, hibernate: Fix nosave_regions setup for hibernation PM / sleep: Show freezing tasks that caused a suspend abort PM / hibernate: Documentation: fix image_size default value commit d1551f7a5aed809bb1e912da9faf36927e739ca0 Merge: 41fd838cda4c a3ade38d5a8b Author: Rafael J. Wysocki Date: Thu Oct 18 12:26:11 2018 +0200 Merge branch 'pm-cpufreq' * pm-cpufreq: cpufreq: tegra186: don't pass GFP_DMA32 to dma_alloc_coherent() cpufreq: conservative: Take limits changes into account properly Documentation: intel_pstate: Add base_frequency information cpufreq: intel_pstate: Add base_frequency attribute ACPI / CPPC: Add support for guaranteed performance cpufreq: imx6q: read OCOTP through nvmem for imx6ul/imx6ull cpufreq: dt-platdev: allow RK3399 to have separate tunables per cluster cpufreq / CPPC: Mark acpi_ids as used cpufreq: dt: Add support for r8a7744 cpufreq: Convert to using %pOFn instead of device_node.name cpufreq: remove unnecessary unlikely() commit 41fd838cda4ca3e2c87820efc18e04c88fe4b12d Merge: e5089c2c73a1 f1c8e410cdac Author: Rafael J. Wysocki Date: Thu Oct 18 12:26:00 2018 +0200 Merge branch 'pm-cpuidle' * pm-cpuidle: cpuidle: menu: Avoid computations when result will be discarded cpuidle: menu: Drop redundant comparison cpuidle: menu: Simplify checks related to the polling state cpuidle: poll_state: Revise loop termination condition cpuidle: menu: Move the latency_req == 0 special case check cpuidle: menu: Avoid computations for very close timers cpuidle: menu: Do not update last_state_idx in menu_select() cpuidle: menu: Get rid of first_idx from menu_select() cpuidle: menu: Compute first_idx when latency_req is known cpuidle: menu: Fix wakeup statistics updates for polling state cpuidle: menu: Replace data->predicted_us with local variable cpuidle: enter_state: Don't needlessly calculate diff time cpuidle: Remove unnecessary wrapper cpuidle_get_last_residency() intel_idle: Get rid of custom ICPU() macro commit e5089c2c73a157997eb6ecca982adea9d0673075 Author: Ulf Hansson Date: Wed Oct 3 16:38:16 2018 +0200 PM / Domains: Document flags for genpd The current documented description of the GENPD_FLAG_* flags, are too simplified, so let's extend them. Signed-off-by: Ulf Hansson Signed-off-by: Rafael J. Wysocki commit 2c9b7f8772033cc8bafbd4eefe2ca605bf3eb094 Author: Ulf Hansson Date: Wed Oct 3 16:38:15 2018 +0200 PM / Domains: Deal with multiple states but no governor in genpd A caller of pm_genpd_init() that provides some states for the genpd via the ->states pointer in the struct generic_pm_domain, should also provide a governor. This because it's the job of the governor to pick a state that satisfies the constraints. Therefore, let's print a warning to inform the user about such bogus configuration and avoid to bail out, by instead picking the shallowest state before genpd invokes the ->power_off() callback. Signed-off-by: Ulf Hansson Reviewed-by: Lina Iyer Signed-off-by: Rafael J. Wysocki commit 2c361684803e0129007806b1ce42cbf9c52f8cd0 Author: Ulf Hansson Date: Wed Oct 3 16:38:14 2018 +0200 PM / Domains: Don't treat zero found compatible idle states as an error Instead of returning -EINVAL from of_genpd_parse_idle_states() in case none compatible states was found, let's return 0 to indicate success. Assign also the out-parameter *states to NULL and *n to 0, to indicate to the caller that zero states have been found/allocated. This enables the caller of of_genpd_parse_idle_states() to easier act on the returned error code. Signed-off-by: Ulf Hansson Reviewed-by: Lina Iyer Signed-off-by: Rafael J. Wysocki commit 3c88a889b4ec8d1ba36cc2d317ed7563677d1d46 Merge: 589edb56b424 08930d56c76a Author: Rafael J. Wysocki Date: Thu Oct 18 12:20:59 2018 +0200 Merge branch 'acpica' * acpica: ACPICA: Remove acpi_gbl_group_module_level_code and only use acpi_gbl_execute_tables_as_methods instead ACPICA: AML Parser: fix parse loop to correctly skip erroneous extended opcodes ACPICA: AML interpreter: add region addresses in global list during initialization ACPICA: Update version to 20181003 ACPICA: Never run _REG on system_memory and system_IO ACPICA: Split large interpreter file ACPICA: Update for field unit access ACPICA: Rename some of the Field Attribute defines ACPICA: Update for generic_serial_bus and attrib_raw_process_bytes protocol commit 58bf437ff64eac8aca606e42d7e4623e40b61fa1 Author: Dongjiu Geng Date: Sat Oct 13 00:12:49 2018 +0800 arm/arm64: KVM: Enable 32 bits kvm vcpu events support The commit 539aee0edb9f ("KVM: arm64: Share the parts of get/set events useful to 32bit") shares the get/set events helper for arm64 and arm32, but forgot to share the cap extension code. User space will check whether KVM supports vcpu events by checking the KVM_CAP_VCPU_EVENTS extension Acked-by: James Morse Reviewed-by : Suzuki K Poulose Signed-off-by: Dongjiu Geng Signed-off-by: Marc Zyngier commit 375bdd3b5d4f7cf146f0df1488b4671b141dd799 Author: Dongjiu Geng Date: Sat Oct 13 00:12:48 2018 +0800 arm/arm64: KVM: Rename function kvm_arch_dev_ioctl_check_extension() Rename kvm_arch_dev_ioctl_check_extension() to kvm_arch_vm_ioctl_check_extension(), because it does not have any relationship with device. Renaming this function can make code readable. Cc: James Morse Reviewed-by: Suzuki K Poulose Signed-off-by: Dongjiu Geng Signed-off-by: Marc Zyngier commit f90afe7955141d122883b27e56e27b686033db22 Author: Takashi Iwai Date: Thu Sep 20 16:42:09 2018 +0200 ALSA: doc: Brush up the old writing-an-alsa-driver Slightly brushing up and throw the old dust away from my ancient writing-an-alsa-driver document. The contents aren't changed so much but the obsoleted parts are dropped. Also, remove the date and the version number. It's useless. Reviewed-by: Takashi Sakamoto Signed-off-by: Takashi Iwai commit c614ca3f7476934de54dd731e09d094ad822696c Author: Balakrishna Godavarthi Date: Tue Oct 16 19:51:35 2018 +0530 Bluetooth: hci_qca: Add support for controller debug logs. This patch will prevent error messages splashing on console. [ 78.426697] Bluetooth: hci_core.c:hci_acldata_packet() hci0: ACL packet for unknown connection handle 3804 [ 78.436682] Bluetooth: hci_core.c:hci_acldata_packet() hci0: ACL packet for unknown connection handle 3804 [ 78.446639] Bluetooth: hci_core.c:hci_acldata_packet() hci0: ACL packet for unknown connection handle 3804 [ 78.456596] Bluetooth: hci_core.c:hci_acldata_packet() hci0: ACL packet for unknown connection handle 3804 QCA wcn3990 will send the debug logs in the form of ACL packets. While decoding packet in qca_recv(), marking the received debug log packet as diagnostic packet. Signed-off-by: Harish Bandi Signed-off-by: Balakrishna Godavarthi Signed-off-by: Marcel Holtmann commit 835fe6d75d14c1513910ed7f5665127fee12acc8 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 (cherry picked from commit 00e5d8b1eb47378924f3de3435450650f426b02a) Signed-off-by: Joonas Lahtinen commit f1c8e410cdac5df42a7806e49efde2859a10fecd Author: Rafael J. Wysocki Date: Mon Oct 15 13:53:25 2018 +0200 cpuidle: menu: Avoid computations when result will be discarded If the minimum interval taken into account in the average computation loop in get_typical_interval() is less than the expected idle duration determined so far, the resultant average cannot be greater than that value as well and the entire return result of the function is going to be discarded anyway going forward. In that case, it is a waste of time to carry out the remaining computations in get_typical_interval(), so avoid that by returning early if the minimum interval is not below the expected idle duration. No intentional changes of behavior. Signed-off-by: Rafael J. Wysocki commit 12b65eadf0bd41cf0dbf460f13bcd310a81afe2b Author: Rafael J. Wysocki Date: Mon Oct 15 13:51:45 2018 +0200 cpuidle: menu: Drop redundant comparison Since the correction factor cannot be greater than RESOLUTION * DECAY, the result of the predicted_us computation in menu_select() cannot be greater than data->next_timer_us, so it is not necessary to compare the "typical interval" value coming from get_typical_interval() with data->next_timer_us separately. It is sufficient to copmare predicted_us with the return value of get_typical_interval() directly, so do that and drop the now redundant expected_interval variable. No intentional changes of behavior. Signed-off-by: Rafael J. Wysocki commit 3045c0d05e728134aefb8adbbc56a4d876a0bdce Author: Chaitanya Kulkarni Date: Wed Oct 17 11:34:15 2018 -0700 nvme-pci: remove duplicate check This is a cleanup patch doesn't change any functionality. It removes the duplicate call to the blk_integrity_rq() in the nvme_map_data(). Signed-off-by: Chaitanya Kulkarni Reviewed-by: Keith Busch Signed-off-by: Christoph Hellwig commit b4ec5f39e4a0bc9844634faa88dd08ca94dca39d 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 (cherry picked from commit 61cdfb9e194d2a327eef301e8fc80b63e3e1dc7a) Signed-off-by: Joonas Lahtinen commit 1411a26053f492b7cef95f09898624544e4701d4 Author: Owen Lin Date: Thu Oct 18 04:37:57 2018 +0000 Bluetooth: btusb: Add support for 0cf3:535b QCA_ROME device T: Bus=01 Lev=01 Prnt=01 Port=03 Cnt=02 Dev#= 3 Spd=12 MxCh= 0 D: Ver= 2.01 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=0cf3 ProdID=535b 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= 16 Ivl=1ms E: Ad=82(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms E: Ad=02(O) 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=83(I) Atr=01(Isoc) MxPS= 0 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 0 Ivl=1ms Signed-off-by: Owen Lin Signed-off-by: Marcel Holtmann commit 589edb56b424876cbbf61547b987a1f57d7ea99d Author: Hans de Goede Date: Wed Oct 17 10:59:28 2018 +0200 ACPI / scan: Create platform device for INT33FE ACPI nodes Bay and Cherry Trail devices with a Dollar Cove or Whiskey Cove PMIC have an ACPI node with a HID of INT33FE which is a "virtual" battery device implementing a standard ACPI battery interface which depends upon a proprietary, undocument OpRegion called BMOP. Since we do have docs for the actual fuel-gauges used on these boards we instead use native fuel-gauge drivers talking directly to the fuel-gauge ICs on boards which rely on this INT33FE device for their battery monitoring. On boards with a Dollar Cove PMIC the INT33FE device's resources (_CRS) describe a non-existing I2C client at address 0x6b with a bus-speed of 100KHz. This is a problem on some boards since there are actual devices on that same bus which need a speed of 400KHz to function properly. This commit adds the INT33FE HID to the list of devices with I2C resources which should be enumerated as a platform-device rather then letting the i2c-core instantiate an i2c-client matching the first I2C resource, so that its bus-speed will not influence the max speed of the I2C bus. This fixes e.g. the touchscreen not working on the Teclast X98 II Plus. The INT33FE device on boards with a Whiskey Cove PMIC is somewhat special. Its first I2C resource is for a secondary I2C address of the PMIC itself, which is already described in an ACPI device with an INT34D3 HID. But it has 3 more I2C resources describing 3 other chips for which we do need to instantiate I2C clients and which need device-connections added between them for things to work properly. This special case is handled by the drivers/platform/x86/intel_cht_int33fe.c code. Before this commit that code was binding to the i2c-client instantiated for the secondary I2C address of the PMIC, since we now instantiate a platform device for the INT33FE device instead, this commit also changes the intel_cht_int33fe driver from an i2c driver to a platform driver. This also brings the intel_cht_int33fe drv inline with how we instantiate multiple i2c clients from a single ACPI device in other cases, as done by the drivers/platform/x86/i2c-multi-instantiate.c code. Reported-and-tested-by: Alexander Meiler Signed-off-by: Hans de Goede Acked-by: Andy Shevchenko Signed-off-by: Rafael J. Wysocki commit 83db37385306072eca403ed80c0a8cf7b0d39e05 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 (cherry picked from commit bb1c7edc6d4d5cc6917814d858d47b22d2e93cde) Signed-off-by: Joonas Lahtinen commit a9b84b4492774668237b19aa65536e934df51567 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 (cherry picked from commit 176597a12d61709727d1639836e5d68a6e7c437b) Signed-off-by: Joonas Lahtinen commit 83b2348e2755db48fa8f40fdb791f366fabc0ba0 Author: Bart Van Assche Date: Wed Oct 17 13:24:56 2018 -0700 ACPI / OSL: Use 'jiffies' as the time bassis for acpi_os_get_timer() Since acpi_os_get_timer() may be called after the timer subsystem has been suspended, use the jiffies counter instead of ktime_get(). This patch avoids that the following warning is reported during hibernation: WARNING: CPU: 0 PID: 612 at kernel/time/timekeeping.c:751 ktime_get+0x116/0x120 RIP: 0010:ktime_get+0x116/0x120 Call Trace: acpi_os_get_timer+0xe/0x30 acpi_ds_exec_begin_control_op+0x175/0x1de acpi_ds_exec_begin_op+0x2c7/0x39a acpi_ps_create_op+0x573/0x5e4 acpi_ps_parse_loop+0x349/0x1220 acpi_ps_parse_aml+0x25b/0x6da acpi_ps_execute_method+0x327/0x41b acpi_ns_evaluate+0x4e9/0x6f5 acpi_ut_evaluate_object+0xd9/0x2f2 acpi_rs_get_method_data+0x8f/0x114 acpi_walk_resources+0x122/0x1b6 acpi_pci_link_get_current.isra.2+0x157/0x280 acpi_pci_link_set+0x32f/0x4a0 irqrouter_resume+0x58/0x80 syscore_resume+0x84/0x380 hibernation_snapshot+0x20c/0x4f0 hibernate+0x22d/0x3a6 state_store+0x99/0xa0 kobj_attr_store+0x37/0x50 sysfs_kf_write+0x87/0xa0 kernfs_fop_write+0x1a5/0x240 __vfs_write+0xd2/0x410 vfs_write+0x101/0x250 ksys_write+0xab/0x120 __x64_sys_write+0x43/0x50 do_syscall_64+0x71/0x220 entry_SYSCALL_64_after_hwframe+0x49/0xbe Fixes: 164a08cee135 (ACPICA: Dispatcher: Introduce timeout mechanism for infinite loop detection) Reported-by: Fengguang Wu References: https://lists.01.org/pipermail/lkp/2018-April/008406.html Signed-off-by: Bart Van Assche Cc: 4.16+ # 4.16+ Signed-off-by: Rafael J. Wysocki commit d737f333b211361b6e239fc753b84c3be2634aaa Author: Erik Schmauss Date: Wed Oct 17 15:41:21 2018 -0700 ACPI: probe ECDT before loading AML tables regardless of module-level code flag It was discovered that AML tables were loaded before or after the ECDT depending on acpi_gbl_execute_tables_as_methods. According to the ACPI spec, the ECDT should be loaded before the namespace is populated by loading AML tables (DSDT and SSDT). Since the ECDT should be loaded early in the boot process, this change moves the ECDT probing to acpi_early_init. Signed-off-by: Erik Schmauss Signed-off-by: Rafael J. Wysocki commit 08930d56c76a69716ba56eb111379a559a9b9f42 Author: Erik Schmauss Date: Wed Oct 17 15:41:20 2018 -0700 ACPICA: Remove acpi_gbl_group_module_level_code and only use acpi_gbl_execute_tables_as_methods instead acpi_gbl_group_module_level_code and acpi_gbl_execute_tables_as_methods were used to enable different table load behavior. The different table load behaviors are as follows: A.) acpi_gbl_group_module_level_code enabled the legacy approach where ASL if statements are executed after the namespace object has been loaded. B.) acpi_gbl_execute_tables_as_methods is currently used to enable the table load to be a method invocation. This meaning that ASL If statements are executed in-line rather than deferred until after the ACPI namespace has been populated. This is the correct behavior and option A will be removed in the future. We do not support a table load behavior where these variables are assigned the same value. In otherwords, we only support option A or B and do not need acpi_gbl_group_module_level_code to enable A. From now on, acpi_gbl_execute_tables_as_methods == 0 enables option A and acpi_gbl_execute_tables_as_methods == 1 enables option B. Note: option A is expected to be removed in the future and option B will become the only supported table load behavior. Signed-off-by: Erik Schmauss Signed-off-by: Rafael J. Wysocki commit c64baa3a6fa207d112706bc5e7fd645cd8a8663f Author: Erik Schmauss Date: Wed Oct 17 14:20:51 2018 -0700 ACPICA: AML Parser: fix parse loop to correctly skip erroneous extended opcodes AML opcodes come in two lengths: 1-byte opcodes and 2-byte, extended opcodes. If an error occurs due to illegal opcodes during table load, the AML parser needs to continue loading the table. In order to do this, it needs to skip parsing of the offending opcode and operands associated with that opcode. This change fixes the AML parse loop to correctly skip parsing of incorrect extended opcodes. Previously, only the short opcodes were skipped correctly. Signed-off-by: Erik Schmauss Cc: All applicable Signed-off-by: Rafael J. Wysocki commit 4abb951b73ff0a8a979113ef185651aa3c8da19b Author: Erik Schmauss Date: Wed Oct 17 14:09:35 2018 -0700 ACPICA: AML interpreter: add region addresses in global list during initialization The table load process omitted adding the operation region address range to the global list. This omission is problematic because the OS queries the global list to check for address range conflicts before deciding which drivers to load. This commit may result in warning messages that look like the following: [ 7.871761] ACPI Warning: system_IO range 0x00000428-0x0000042F conflicts with op_region 0x00000400-0x0000047F (\PMIO) (20180531/utaddress-213) [ 7.871769] ACPI: If an ACPI driver is available for this device, you should use it instead of the native driver However, these messages do not signify regressions. It is a result of properly adding address ranges within the global address list. Link: https://bugzilla.kernel.org/show_bug.cgi?id=200011 Tested-by: Jean-Marc Lenoir Signed-off-by: Erik Schmauss Cc: All applicable Signed-off-by: Rafael J. Wysocki commit 3230b2b3c1ab5a0d3f99d5850bfdc4bf48d11cdd Author: Rafael J. Wysocki Date: Mon Oct 15 13:56:02 2018 +0200 ACPI: TAD: Add low-level support for real time capability Add low-level support for the (optional) real time capability of the ACPI Time and Alarm Device (TAD) to the ACPI TAD driver. This allows the real time to be acquired or set via sysfs with the help of the _GRT and _SRT methods of the TAD, respectively. Signed-off-by: Rafael J. Wysocki Tested-by: Mika Westerberg commit c2712b858187f5bcd7b042fe4daa3ba3a12635c0 Author: Steven Rostedt (VMware) Date: Wed Oct 17 16:59:51 2018 -0400 kprobes, x86/ptrace.h: Make regs_get_kernel_stack_nth() not fault on bad stack Andy had some concerns about using regs_get_kernel_stack_nth() in a new function regs_get_kernel_argument() as if there's any error in the stack code, it could cause a bad memory access. To be on the safe side, call probe_kernel_read() on the stack address to be extra careful in accessing the memory. A helper function, regs_get_kernel_stack_nth_addr(), was added to just return the stack address (or NULL if not on the stack), that will be used to find the address (and could be used by other functions) and read the address with kernel_probe_read(). Requested-by: Andy Lutomirski Signed-off-by: Steven Rostedt (VMware) Reviewed-by: Joel Fernandes (Google) Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Masami Hiramatsu Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20181017165951.09119177@gandalf.local.home Signed-off-by: Ingo Molnar commit 96987eea537d6ccd98704a71958f9ba02da80843 Author: Christoph Hellwig Date: Thu Oct 18 17:21:55 2018 +1100 xfs: cancel COW blocks before swapext We need to make sure we have no outstanding COW blocks before we swap extents, as there is nothing preventing us from having preallocated COW delalloc on either inode that swapext is called on. That case can easily be reproduced by running generic/324 in always_cow mode: [ 620.760572] XFS: Assertion failed: tip->i_delayed_blks == 0, file: fs/xfs/xfs_bmap_util.c, line: 1669 [ 620.761608] ------------[ cut here ]------------ [ 620.762171] kernel BUG at fs/xfs/xfs_message.c:102! [ 620.762732] invalid opcode: 0000 [#1] SMP PTI [ 620.763272] CPU: 0 PID: 24153 Comm: xfs_fsr Tainted: G W 4.19.0-rc1+ #4182 [ 620.764203] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.11.1-1 04/01/2014 [ 620.765202] RIP: 0010:assfail+0x20/0x28 [ 620.765646] Code: 31 ff e8 83 fc ff ff 0f 0b c3 48 89 f1 41 89 d0 48 c7 c6 48 ca 8d 82 48 89 fa 38 [ 620.767758] RSP: 0018:ffffc9000898bc10 EFLAGS: 00010202 [ 620.768359] RAX: 0000000000000000 RBX: ffff88012f14ba40 RCX: 0000000000000000 [ 620.769174] RDX: 00000000ffffffc0 RSI: 000000000000000a RDI: ffffffff828560d9 [ 620.769982] RBP: ffff88012f14b300 R08: 0000000000000000 R09: 0000000000000000 [ 620.770788] R10: 000000000000000a R11: f000000000000000 R12: ffffc9000898bc98 [ 620.771638] R13: ffffc9000898bc9c R14: ffff880130b5e2b8 R15: ffff88012a1fa2a8 [ 620.772504] FS: 00007fdc36e0fbc0(0000) GS:ffff88013ba00000(0000) knlGS:0000000000000000 [ 620.773475] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 620.774168] CR2: 00007fdc3604d000 CR3: 0000000132afc000 CR4: 00000000000006f0 [ 620.774978] Call Trace: [ 620.775274] xfs_swap_extent_forks+0x2a0/0x2e0 [ 620.775792] xfs_swap_extents+0x38b/0xab0 [ 620.776256] xfs_ioc_swapext+0x121/0x140 [ 620.776709] xfs_file_ioctl+0x328/0xc90 [ 620.777154] ? rcu_read_lock_sched_held+0x50/0x60 [ 620.777694] ? xfs_iunlock+0x233/0x260 [ 620.778127] ? xfs_setattr_nonsize+0x3be/0x6a0 [ 620.778647] do_vfs_ioctl+0x9d/0x680 [ 620.779071] ? ksys_fchown+0x47/0x80 [ 620.779552] ksys_ioctl+0x35/0x70 [ 620.780040] __x64_sys_ioctl+0x11/0x20 [ 620.780530] do_syscall_64+0x4b/0x190 [ 620.780927] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 620.781467] RIP: 0033:0x7fdc364d0f07 [ 620.781900] Code: b3 66 90 48 8b 05 81 5f 2c 00 64 c7 00 26 00 00 00 48 c7 c0 ff ff ff ff c3 66 28 [ 620.784044] RSP: 002b:00007ffe2a766038 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 620.784896] RAX: ffffffffffffffda RBX: 0000000000000025 RCX: 00007fdc364d0f07 [ 620.785667] RDX: 0000560296ca2fc0 RSI: 00000000c0c0586d RDI: 0000000000000005 [ 620.786398] RBP: 0000000000000025 R08: 0000000000001200 R09: 0000000000000000 [ 620.787283] R10: 0000000000000432 R11: 0000000000000246 R12: 0000000000000005 [ 620.788051] R13: 0000000000000000 R14: 0000000000001000 R15: 0000000000000006 [ 620.788927] Modules linked in: [ 620.789340] ---[ end trace 9503b7417ffdbdb0 ]--- [ 620.790065] RIP: 0010:assfail+0x20/0x28 [ 620.790642] Code: 31 ff e8 83 fc ff ff 0f 0b c3 48 89 f1 41 89 d0 48 c7 c6 48 ca 8d 82 48 89 fa 38 [ 620.793038] RSP: 0018:ffffc9000898bc10 EFLAGS: 00010202 [ 620.793609] RAX: 0000000000000000 RBX: ffff88012f14ba40 RCX: 0000000000000000 [ 620.794317] RDX: 00000000ffffffc0 RSI: 000000000000000a RDI: ffffffff828560d9 [ 620.795025] RBP: ffff88012f14b300 R08: 0000000000000000 R09: 0000000000000000 [ 620.795778] R10: 000000000000000a R11: f000000000000000 R12: ffffc9000898bc98 [ 620.796675] R13: ffffc9000898bc9c R14: ffff880130b5e2b8 R15: ffff88012a1fa2a8 [ 620.797782] FS: 00007fdc36e0fbc0(0000) GS:ffff88013ba00000(0000) knlGS:0000000000000000 [ 620.798908] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 620.799594] CR2: 00007fdc3604d000 CR3: 0000000132afc000 CR4: 00000000000006f0 [ 620.800424] Kernel panic - not syncing: Fatal exception [ 620.801191] Kernel Offset: disabled [ 620.801597] ---[ end Kernel panic - not syncing: Fatal exception ]--- Signed-off-by: Christoph Hellwig Reviewed-by: Dave Chinner Signed-off-by: Dave Chinner commit efc3289cf8d39c34502a7cc9695ca2fa125aad0c Author: Brian Foster Date: Thu Oct 18 17:21:49 2018 +1100 xfs: clear ail delwri queued bufs on unmount of shutdown fs In the typical unmount case, the AIL is forced out by the unmount sequence before the xfsaild task is stopped. Since AIL items are removed on writeback completion, this means that the AIL ->ail_buf_list delwri queue has been drained. This is not always true in the shutdown case, however. It's possible for buffers to sit on a delwri queue for a period of time across submission attempts if said items are locked or have been relogged and pinned since first added to the queue. If the attempt to log such an item results in a log I/O error, the error processing can shutdown the fs, remove the item from the AIL, stale the buffer (dropping the LRU reference) and clear its delwri queue state. The latter bit means the buffer will be released from a delwri queue on the next submission attempt, but this might never occur if the filesystem has shutdown and the AIL is empty. This means that such buffers are held indefinitely by the AIL delwri queue across destruction of the AIL. Aside from being a memory leak, these buffers can also hold references to in-core perag structures. The latter problem manifests as a generic/475 failure, reproducing the following asserts at unmount time: XFS: Assertion failed: atomic_read(&pag->pag_ref) == 0, file: fs/xfs/xfs_mount.c, line: 151 XFS: Assertion failed: atomic_read(&pag->pag_ref) == 0, file: fs/xfs/xfs_mount.c, line: 132 To prevent this problem, clear the AIL delwri queue as a final step before xfsaild() exit. The !empty state should never occur in the normal case, so add an assert to catch unexpected problems going forward. [dgc: add comment explaining need for xfs_buf_delwri_cancel() after calling xfs_buf_delwri_submit_nowait().] Signed-off-by: Brian Foster Reviewed-by: Dave Chinner Signed-off-by: Dave Chinner commit 26ca39015ef210d728df53d66c1ae85e8b48b2f3 Author: Carlos Maiolino Date: Thu Oct 18 17:21:39 2018 +1100 xfs: use offsetof() in place of offset macros for __xfsstats Most offset macro mess is used in xfs_stats_format() only, and we can simply get the right offsets using offsetof(), instead of several macros to mark the offsets inside __xfsstats structure. Replace all XFSSTAT_END_* macros by a single helper macro to get the right offset into __xfsstats, and use this helper in xfs_stats_format() directly. The quota stats code, still looks a bit cleaner when using XFSSTAT_* macros, so, this patch also defines XFSSTAT_START_XQMSTAT and XFSSTAT_END_XQMSTAT locally to that code. This also should prevent offset mistakes when updates are done into __xfsstats. Signed-off-by: Carlos Maiolino Reviewed-by: Darrick J. Wong Signed-off-by: Dave Chinner commit 41657e5507b13e963be906d5d874f4f02374fd5c Author: Carlos Maiolino Date: Thu Oct 18 17:21:34 2018 +1100 xfs: Fix xqmstats offsets in /proc/fs/xfs/xqmstat The addition of FIBT, RMAP and REFCOUNT changed the offsets into __xfssats structure. This caused xqmstat_proc_show() to display garbage data via /proc/fs/xfs/xqmstat, once it relies on the offsets marked via macros. Fix it. Fixes: 00f4e4f9 xfs: add rmap btree stats infrastructure Fixes: aafc3c24 xfs: support the XFS_BTNUM_FINOBT free inode btree type Fixes: 46eeb521 xfs: introduce refcount btree definitions Signed-off-by: Carlos Maiolino Reviewed-by: Eric Sandeen Signed-off-by: Dave Chinner commit 37fd1678245f7a5898c1b05128bc481fb403c290 Author: Dave Chinner Date: Thu Oct 18 17:21:29 2018 +1100 xfs: fix use-after-free race in xfs_buf_rele When looking at a 4.18 based KASAN use after free report, I noticed that racing xfs_buf_rele() may race on dropping the last reference to the buffer and taking the buffer lock. This was the symptom displayed by the KASAN report, but the actual issue that was reported had already been fixed in 4.19-rc1 by commit e339dd8d8b04 ("xfs: use sync buffer I/O for sync delwri queue submission"). Despite this, I think there is still an issue with xfs_buf_rele() in this code: release = atomic_dec_and_lock(&bp->b_hold, &pag->pag_buf_lock); spin_lock(&bp->b_lock); if (!release) { ..... If two threads race on the b_lock after both dropping a reference and one getting dropping the last reference so release = true, we end up with: CPU 0 CPU 1 atomic_dec_and_lock() atomic_dec_and_lock() spin_lock(&bp->b_lock) spin_lock(&bp->b_lock) b_lru_ref = 0> freebuf = true spin_unlock(&bp->b_lock) xfs_buf_free(bp) spin_unlock(&bp->b_lock) IOWs, we can't safely take bp->b_lock after dropping the hold reference because the buffer may go away at any time after we drop that reference. However, this can be fixed simply by taking the bp->b_lock before we drop the reference. It is safe to nest the pag_buf_lock inside bp->b_lock as the pag_buf_lock is only used to serialise against lookup in xfs_buf_find() and no other locks are held over or under the pag_buf_lock there. Make this clear by documenting the buffer lock orders at the top of the file. Signed-off-by: Dave Chinner Reviewed-by: Brian Foster Reviewed-by: Carlos Maiolino commit 068f985a9e5ec70fde58d8f679994fdbbd093a36 Author: Allison Henderson Date: Thu Oct 18 17:21:23 2018 +1100 xfs: Add attibute remove and helper functions This patch adds xfs_attr_remove_args. These sub-routines remove the attributes specified in @args. We will use this later for setting parent pointers as a deferred attribute operation. Signed-off-by: Allison Henderson Reviewed-by: Dave Chinner Signed-off-by: Dave Chinner commit 2f3cd8091963810d85e6a5dd6ed1247e10e9e6f2 Author: Allison Henderson Date: Thu Oct 18 17:21:16 2018 +1100 xfs: Add attibute set and helper functions This patch adds xfs_attr_set_args and xfs_bmap_set_attrforkoff. These sub-routines set the attributes specified in @args. We will use this later for setting parent pointers as a deferred attribute operation. [dgc: remove attr fork init code from xfs_attr_set_args().] [dgc: xfs_attr_try_sf_addname() NULLs args.trans after commit.] [dgc: correct sf add error handling.] Signed-off-by: Allison Henderson Reviewed-by: Dave Chinner Signed-off-by: Dave Chinner commit 4c74a56b9de76bb6b581274b76b52535ad77c2a7 Author: Allison Henderson Date: Thu Oct 18 17:20:50 2018 +1100 xfs: Add helper function xfs_attr_try_sf_addname This patch adds a subroutine xfs_attr_try_sf_addname used by xfs_attr_set. This subrotine will attempt to add the attribute name specified in args in shortform, as well and perform error handling previously done in xfs_attr_set. This patch helps to pre-simplify xfs_attr_set for reviewing purposes and reduce indentation. New function will be added in the next patch. [dgc: moved commit to helper function, too.] Signed-off-by: Allison Henderson Reviewed-by: Dave Chinner Signed-off-by: Dave Chinner commit e2421f0b5ff3ce279573036f5cfcb0ce28b422a9 Author: Allison Henderson Date: Thu Oct 18 17:20:45 2018 +1100 xfs: Move fs/xfs/xfs_attr.h to fs/xfs/libxfs/xfs_attr.h This patch moves fs/xfs/xfs_attr.h to fs/xfs/libxfs/xfs_attr.h since xfs_attr.c is in libxfs. We will need these later in xfsprogs. Signed-off-by: Allison Henderson Reviewed-by: Dave Chinner Signed-off-by: Dave Chinner commit 56668a5cc420818b8e9c2197281d068552f80e46 Author: Dave Chinner Date: Thu Oct 18 17:20:39 2018 +1100 xfs: issue log message on user force shutdown The kernel only issues a log message that it's been shut down when the filesystem triggers a shutdown itself. Hence there is no trace in the log when a shutdown is triggered manually from userspace. This can make it hard to see sequence of events in the log when things go wrong, so make sure we always log a message when a shutdown is run. While there, clean up the logic flow so we don't have to continually check if the shutdown trigger was user initiated before logging shutdown messages. Signed-off-by: Dave Chinner Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Dave Chinner commit 38b6238eb6b4f4b7fe5442670156c81b21516bee Author: Darrick J. Wong Date: Thu Oct 18 17:20:35 2018 +1100 xfs: fix buffer state management in xrep_findroot_block We don't handle buffer state properly in online repair's findroot routine. If a buffer already has b_ops set, we don't ever want to touch that, and we don't want to call the read verifiers on a buffer that could be dirty (CRCs are only recomputed during log checkpoints). Therefore, be more careful about what we do with a buffer -- if someone else already attached ops that are not the ones for this btree type, just ignore the buffer. We only attach our btree type's buf ops if it matches the magic/uuid and structure checks. We also modify xfs_buf_read_map to allow callers to set buffer ops on a DONE buffer with NULL ops so that repair doesn't leave behind buffers which won't have buffers attached to them. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster Signed-off-by: Dave Chinner commit 1aff5696f3e03099a4a3e9a0d965ef9b345265a6 Author: Darrick J. Wong Date: Thu Oct 18 17:20:30 2018 +1100 xfs: always assign buffer verifiers when one is provided If a caller supplies buffer ops when trying to read a buffer and the buffer doesn't already have buf ops assigned, ensure that the ops are assigned to the buffer and the verifier is run on that buffer. Note that current XFS code is careful to assign buffer ops after a xfs_{trans_,}buf_read call in which ops were not supplied. However, we should apply ops defensively in case there is ever a coding mistake; and an upcoming repair patch will need to be able to read a buffer without assigning buf ops. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster Reviewed-by: Christoph Hellwig Signed-off-by: Dave Chinner commit 1002ff45eff5cb70b0f2da28df488c789af2aeab Author: Darrick J. Wong Date: Thu Oct 18 17:20:26 2018 +1100 xfs: xrep_findroot_block should reject root blocks with siblings In xrep_findroot_block, if we find a candidate root block with sibling pointers or sibling blocks on the same tree level, we should not return that block as a tree root because root blocks cannot have siblings. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster Signed-off-by: Dave Chinner commit dddde68b8f06dd83486124b8d245e7bfb15c185d Author: Adam Borowski Date: Thu Oct 18 17:20:19 2018 +1100 xfs: add a define for statfs magic to uapi Needed by userspace programs that call fstatfs(). It'd be natural to publish XFS_SB_MAGIC in uapi, but while these two have identical values, they have different semantic meaning: one is an enum cookie meant for statfs, the other a signature of the on-disk format. Signed-off-by: Adam Borowski Reviewed-by: Darrick J. Wong Signed-off-by: Dave Chinner commit 4831822ff12e9f2bc084da892045551fdf3d112c Author: Christoph Hellwig Date: Thu Oct 18 17:20:11 2018 +1100 xfs: print dangling delalloc extents Instead of just asserting that we have no delalloc space dangling in an inode that gets freed print the actual offenders for debug mode. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Reviewed-by: Brian Foster Signed-off-by: Dave Chinner commit 032dc923b2baef87db6c812f6e8bebcb7638cab8 Author: Christoph Hellwig Date: Thu Oct 18 17:19:58 2018 +1100 xfs: fix fork selection in xfs_find_trim_cow_extent We should want to write directly into the data fork for blocks that don't have an extent in the COW fork covering them yet. Signed-off-by: Christoph Hellwig Reviewed-by: Brian Foster Signed-off-by: Dave Chinner commit d392bc81bb7c26ea6225d088ead344ed6486b495 Author: Christoph Hellwig Date: Thu Oct 18 17:19:48 2018 +1100 xfs: remove the unused trimmed argument from xfs_reflink_trim_around_shared Signed-off-by: Christoph Hellwig Reviewed-by: Brian Foster Signed-off-by: Dave Chinner commit fc439464e3ee299d8a3d502d7d24d4d6a5686879 Author: Christoph Hellwig Date: Thu Oct 18 17:19:37 2018 +1100 xfs: remove the unused shared argument to xfs_reflink_reserve_cow Signed-off-by: Christoph Hellwig Reviewed-by: Brian Foster Signed-off-by: Dave Chinner commit 0365c5d6c3d4bcf17a1aa38719e48351932c62b6 Author: Christoph Hellwig Date: Thu Oct 18 17:19:26 2018 +1100 xfs: handle zeroing in xfs_file_iomap_begin_delay We only need to allocate blocks for zeroing for reflink inodes, and for we currently have a special case for reflink files in the otherwise direct I/O path that I'd like to get rid of. Signed-off-by: Christoph Hellwig Reviewed-by: Brian Foster Signed-off-by: Dave Chinner commit daa79baefc47293c753fed191d722f7ef605a303 Author: Christoph Hellwig Date: Thu Oct 18 17:18:58 2018 +1100 xfs: remove suport for filesystems without unwritten extent flag The option to enable unwritten extents was made default in 2003, removed from mkfs in 2007, and cannot be disabled in v5. We also rely on it for a lot of common functionality, so filesystems without it will run a completely untested and buggy code path. Enabling the support also is a simple bit flip using xfs_db, so legacy file systems can still be brought forward. Signed-off-by: Christoph Hellwig Reviewed-by: Brian Foster Signed-off-by: Dave Chinner commit 97e5a6e6dc44b9ea660f85de084f6e38cb5cf39c Author: Christoph Hellwig Date: Thu Oct 18 17:17:50 2018 +1100 xfs: remove XFS_IO_INVALID The invalid state isn't any different from a hole, so merge the two states. Use the more descriptive hole name, but keep it as the first value of the enum to catch uninitialized fields. Signed-off-by: Christoph Hellwig Reviewed-by: Brian Foster Signed-off-by: Dave Chinner commit 3642b29a63674020401e41185ed5b0e3c056ab4a Author: Chengguang Xu Date: Wed Jun 13 12:05:14 2018 +0800 fs/exofs: only use true/false for asignment of bool type variable Signed-off-by: Chengguang Xu Signed-off-by: Al Viro commit 515f1867addaba49c1c6ac73abfaffbc192c1db4 Author: Chengguang Xu Date: Wed Jun 13 12:05:13 2018 +0800 fs/exofs: fix potential memory leak in mount option parsing There are some cases can cause memory leak when parsing option 'osdname'. Signed-off-by: Chengguang Xu Signed-off-by: Al Viro commit 55338ac2a9839557516b00661e6a05daf996fda0 Author: nixiaoming Date: Sun Jul 22 16:37:08 2018 +0800 Delete invalid assignment statements in do_sendfile Assigning value -EINVAL to "retval" here, but that stored value is overwritten before it can be used. retval = -EINVAL; .... retval = rw_verify_area(WRITE, out.file, &out_pos, count); value_overwrite: Overwriting previous write to "retval" with value from rw_verify_area delete invalid assignment statements Signed-off-by: n00202754 Signed-off-by: Al Viro commit 82385b0d2d2504aee51aa3fb40ebfb03603f64c3 Author: Gustavo A. R. Silva Date: Wed Oct 17 15:01:37 2018 +0200 net: skbuff.h: Mark expected switch fall-throughs In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Acked-by: Kees Cook Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller commit 9fd255928d7ffb56d8466fab3331d0b2f40aa8c7 Author: Arthur Kiyanovski Date: Wed Oct 17 15:33:23 2018 +0300 net: ena: enable Low Latency Queues Use the new API to enable usage of LLQ. Signed-off-by: Arthur Kiyanovski Signed-off-by: David S. Miller commit 8c590f9776386b8f697fd0b7ed6142ae6e3de79e Author: Netanel Belgazal Date: Wed Oct 17 10:04:21 2018 +0000 net: ena: Fix Kconfig dependency on X86 The Kconfig limitation of X86 is to too wide. The ENA driver only requires a little endian dependency. Change the dependency to be on little endian CPU. Signed-off-by: Netanel Belgazal Signed-off-by: David S. Miller commit a58598a49788f562a462c962abec98c8998089cc Merge: cb10c7c0dfd9 cf33e25c0dcf Author: David S. Miller Date: Wed Oct 17 22:22:54 2018 -0700 Merge branch 'tcp_bbr-TCP-BBR-changes-for-EDT-pacing-model' Neal Cardwell says: ==================== tcp_bbr: TCP BBR changes for EDT pacing model Two small patches for TCP BBR to follow up with Eric's recent work to change the TCP and fq pacing machinery to an "earliest departure time" (EDT) model: - The first patch adjusts the TCP BBR logic to work with the new "earliest departure time" (EDT) pacing model. - The second patch adjusts the TCP BBR logic to centralize the setting of gain values, to simplify the code and prepare for future changes. ==================== Signed-off-by: David S. Miller commit cf33e25c0dcfed4ef1b1735d2bf966d56936097b Author: Neal Cardwell Date: Tue Oct 16 20:16:45 2018 -0400 tcp_bbr: centralize code to set gains Centralize the code that sets gains used for computing cwnd and pacing rate. This simplifies the code and makes it easier to change the state machine or (in the future) dynamically change the gain values and ensure that the correct gain values are always used. Signed-off-by: Neal Cardwell Signed-off-by: Yuchung Cheng Signed-off-by: Soheil Hassas Yeganeh Signed-off-by: Priyaranjan Jha Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit a87c83d5ee25cf7208279819642ae7bd218e3782 Author: Neal Cardwell Date: Tue Oct 16 20:16:44 2018 -0400 tcp_bbr: adjust TCP BBR for departure time pacing Adjust TCP BBR for the new departure time pacing model in the recent commit ab408b6dc7449 ("tcp: switch tcp and sch_fq to new earliest departure time model"). With TSQ and pacing at lower layers, there are often several skbs queued in the pacing layer, and thus there is less data "in the network" than "in flight". With departure time pacing at lower layers (e.g. fq or potential future NICs), the data in the pacing layer now has a pre-scheduled ("baked-in") departure time that cannot be changed, even if the congestion control algorithm decides to use a new pacing rate. This means that there can be a non-trivial lag between when BBR makes a pacing rate change and when the inter-skb pacing delays change. After a pacing rate change, the number of packets in the network can gradually evolve to be higher or lower, depending on whether the sending rate is higher or lower than the delivery rate. Thus ignoring this lag can cause significant overshoot, with the flow ending up with too many or too few packets in the network. This commit changes BBR to adapt its pacing rate based on the amount of data in the network that it estimates has already been "baked in" by previous departure time decisions. We estimate the number of our packets that will be in the network at the earliest departure time (EDT) for the next skb scheduled as: in_network_at_edt = inflight_at_edt - (EDT - now) * bw If we're increasing the amount of data in the network ("in_network"), then we want to know if the transmit of the EDT skb will push in_network above the target, so our answer includes bbr_tso_segs_goal() from the skb departing at EDT. If we're decreasing in_network, then we want to know if in_network will sink too low just before the EDT transmit, so our answer does not include the segments from the skb departing at EDT. Why do we treat pacing_gain > 1.0 case and pacing_gain < 1.0 case differently? The in_network curve is a step function: in_network goes up on transmits, and down on ACKs. To accurately predict when in_network will go beyond our target value, this will happen on different events, depending on whether we're concerned about in_network potentially going too high or too low: o if pushing in_network up (pacing_gain > 1.0), then in_network goes above target upon a transmit event o if pushing in_network down (pacing_gain < 1.0), then in_network goes below target upon an ACK event This commit changes the BBR state machine to use this estimated "packets in network" value to make its decisions. Signed-off-by: Neal Cardwell Signed-off-by: Yuchung Cheng Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit d65b1f20292425b798ec74e313a7ad3f11b8af0d Author: Yue Haibing Date: Thu Sep 6 01:54:07 2018 +0000 iomap: remove duplicated include from iomap.c Remove duplicated include. Signed-off-by: Yue Haibing Signed-off-by: Al Viro commit cb10c7c0dfd9e6fd3d69ced98b05cbd198c48cf6 Author: Vijay Khemka Date: Tue Oct 16 12:13:19 2018 -0700 net/ncsi: Add NCSI Broadcom OEM command This patch adds OEM Broadcom commands and response handling. It also defines OEM Get MAC Address handler to get and configure the device. ncsi_oem_gma_handler_bcm: This handler send NCSI broadcom command for getting mac address. ncsi_rsp_handler_oem_bcm: This handles response received for all broadcom OEM commands. ncsi_rsp_handler_oem_bcm_gma: This handles get mac address response and set it to device. Signed-off-by: Vijay Khemka Reviewed-by: Samuel Mendoza-Jonas Signed-off-by: David S. Miller commit 1010c17ec5b496b54785dfb96f739d0f880484b3 Merge: 33c4368ee258 47d20212aa1c Author: David S. Miller Date: Wed Oct 17 22:08:56 2018 -0700 Merge branch 'mscc-fixes' Gustavo A. R. Silva says: ==================== fix signedness bug and memory leak in mscc driver This patchset aims to fix a signedness bug in function vsc85xx_downshift_get() and a memory leak in function vsc8574_config_pre_init(). Changes in v3: - Add Quentin's Reviewed-by to commit log in patch 2/2. - Post the series to netdev. Changes in v2: - Add Quentin's Reviewed-by to commit log in patch 1/2. - Jump to out label so all functions in the driver exit with the PHY set to access the standard page. Thanks to Quentin Schulz for pointing this out. ==================== Signed-off-by: David S. Miller commit 47d20212aa1c64f52aba0c5409d03c22bf25cd66 Author: Gustavo A. R. Silva Date: Tue Oct 16 19:37:35 2018 +0200 net: phy: mscc: fix memory leak in vsc8574_config_pre_init In case memory resources for *fw* were successfully allocated, release them before return. Addresses-Coverity-ID: 1473968 ("Resource leak") Fixes: 00d70d8e0e78 ("net: phy: mscc: add support for VSC8574 PHY") Reviewed-by: Quentin Schulz Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller commit e519869af368fe1da218b43bdb3a553d66f4fcd0 Author: Gustavo A. R. Silva Date: Tue Oct 16 19:35:11 2018 +0200 net: phy: mscc: fix signedness bug in vsc85xx_downshift_get Currently, the error handling for the call to function phy_read_paged() doesn't work because *reg_val* is of type u16 (16 bits, unsigned), which makes it impossible for it to hold a value less than 0. Fix this by changing the type of variable *reg_val* to int. Addresses-Coverity-ID: 1473970 ("Unsigned compared against 0") Fixes: 6a0bfbbe20b0 ("net: phy: mscc: migrate to phy_select/restore_page functions") Reviewed-by: Quentin Schulz Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller commit 33c4368ee2589c165aebd8d388cbd91e9adb9688 Author: Kyeongdon Kim Date: Tue Oct 16 14:57:26 2018 +0900 net: fix warning in af_unix This fixes the "'hash' may be used uninitialized in this function" net/unix/af_unix.c:1041:20: warning: 'hash' may be used uninitialized in this function [-Wmaybe-uninitialized] addr->hash = hash ^ sk->sk_type; Signed-off-by: Kyeongdon Kim Signed-off-by: David S. Miller commit 26422340da467538cd65eaa9c65538039ee99c8c Author: Marek Behún Date: Sat Oct 13 14:40:31 2018 +0200 net: dsa: mv88e6xxx: Fix 88E6141/6341 2500mbps SERDES speed This is a fix for the port_set_speed method for the Topaz family. Currently the same method is used as for the Peridot family, but this is wrong for the SERDES port. On Topaz, the SERDES port is port 5, not 9 and 10 as in Peridot. Moreover setting alt_bit on Topaz only makes sense for port 0 (for (differentiating 100mbps vs 200mbps). The SERDES port does not support more than 2500mbps, so alt_bit does not make any difference. Signed-off-by: Marek Behún Signed-off-by: David S. Miller commit b55cbc8d9b44aaee94f19e995a5f241d453763ee Author: Nicolas Dichtel Date: Wed Oct 17 16:24:48 2018 +0200 bpf: fix doc of bpf_skb_adjust_room() in uapi len_diff is signed. Fixes: fa15601ab31e ("bpf: add documentation for eBPF helpers (33-41)") CC: Quentin Monnet Signed-off-by: Nicolas Dichtel Reviewed-by: Quentin Monnet Signed-off-by: Alexei Starovoitov commit e943d94e4b7c54ee7b51852d91f9699e041bffd7 Merge: 53e50a6ec24d 557dd485eaeb Author: David S. Miller Date: Wed Oct 17 21:33:43 2018 -0700 Merge branch 'octeontx2-af-NPA-and-NIX-blocks-initialization' Sunil Goutham says: ==================== octeontx2-af: NPA and NIX blocks initialization This patchset is a continuation to earlier submitted patch series to add a new driver for Marvell's OcteonTX2 SOC's Resource virtualization unit (RVU) admin function driver. octeontx2-af: Add RVU Admin Function driver https://www.spinics.net/lists/netdev/msg528272.html This patch series adds logic for the following. - Modified register polling loop to use time_before(jiffies, timeout), as suggested by Arnd Bergmann. - Support to forward interface link status notifications sent by firmware to registered PFs mapped to a CGX::LMAC. - Support to set CGX LMAC in loopback mode, retrieve stats, configure DMAC filters at CGX level etc. - Network pool allocator (NPA) functional block initialization, admin queue support, NPALF aura/pool contexts memory allocation, init and deinit. - Network interface controller (NIX) functional block basic init, admin queue support, NIXLF RQ/CQ/SQ HW contexts memory allocation, init and deinit. ==================== Signed-off-by: David S. Miller commit 557dd485eaebdc8a447ce1d5c8916ada739f66b4 Author: Geetha sowjanya Date: Tue Oct 16 16:57:20 2018 +0530 octeontx2-af: Support for disabling NIX RQ/SQ/CQ contexts This patch adds support for a RVU PF/VF to disable all RQ/SQ/CQ contexts of a NIX LF via mbox. This will be used by PF/VF drivers upon teardown or while freeing up HW resources. A HW context which is not INIT'ed cannot be modified and a RVU PF/VF driver may or may not INIT all the RQ/SQ/CQ contexts. So a bitmap is introduced to keep track of enabled NIX RQ/SQ/CQ contexts, so that only enabled hw contexts are disabled upon LF teardown. Signed-off-by: Geetha sowjanya Signed-off-by: Stanislaw Kardach Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit ffb0abd7e9cb22714d86ad8a60babd7b05ebdc06 Author: Sunil Goutham Date: Tue Oct 16 16:57:19 2018 +0530 octeontx2-af: NIX AQ instruction enqueue support Add support for a RVU PF/VF to submit instructions to NIX AQ via mbox. Instructions can be to init/write/read RQ/SQ/CQ/RSS contexts. In case of read, context will be returned as part of response to the mbox msg received. Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit 709a4f0c254c06289283593b92b233451656bac3 Author: Sunil Goutham Date: Tue Oct 16 16:57:18 2018 +0530 octeontx2-af: Alloc bitmaps for NIX Tx scheduler queues Allocate bitmaps and memory for PFVF mapping info for maintaining NIX transmit scheduler queues maintenance. PF/VF drivers will request for alloc, free e.t.c of Tx schedulers via mailbox. Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit 59360e9809daecb59c3c42ee10918155bfded615 Author: Sunil Goutham Date: Tue Oct 16 16:57:17 2018 +0530 octeontx2-af: NIX LSO config for TSOv4/v6 offload Config LSO formats for TSOv4 and TSOv6 offloads. These formats tell HW which fields in the TCP packet's headers have to be updated while performing segmentation offload. Also report PF/VF drivers the LSO format indices as part of response to NIX_LF_ALLOC mbox msg. These indices are used in SQE extension headers while framing SQE for pkt transmission with TSO offload. Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit cb30711a6c7aa4956f3fea8bfe2d6adeac4f55c0 Author: Sunil Goutham Date: Tue Oct 16 16:57:16 2018 +0530 octeontx2-af: NIX block LF initialization Upon receiving NIX_LF_ALLOC mbox message allocate memory for NIXLF's CQ, SQ, RQ, CINT, QINT and RSS HW contexts and configure respective base iova HW. Enable caching of contexts into NIX NDC. Return SQ buffer (SQB) size, this PF/VF MAC address etc info e.t.c to the mbox msg sender. Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit aba53d5dbceabd36786a2a2f63ebbfe40cc343ad Author: Sunil Goutham Date: Tue Oct 16 16:57:15 2018 +0530 octeontx2-af: NIX block admin queue init Initialize NIX admin queue (AQ) i.e alloc memory for AQ instructions and for the results. All NIX LFs will submit instructions to AQ to init/write/read RQ/SQ/CQ/RSS contexts and in case of read, get context from result memory. Also before configuring/using NIX block calibrate X2P bus and check if NIX interfaces like CGX and LBK are in active and working state. Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit 57856dde119590462315ddb5b4bf5fd2d981cb36 Author: Geetha sowjanya Date: Tue Oct 16 16:57:14 2018 +0530 octeontx2-af: Support for disabling NPA Aura/Pool contexts This patch adds support for a RVU PF/VF to disable all Aura/Pool contexts of a NPA LF via mbox. This will be used by PF/VF drivers upon teardown or while freeing up HW resources. A HW context which is not INIT'ed cannot be modified and a RVU PF/VF driver may or may not INIT all the Aura/Pool contexts. So a bitmap is introduced to keep track of enabled NPA Aura/Pool contexts, so that only enabled hw contexts are disabled upon LF teardown. Signed-off-by: Geetha sowjanya Signed-off-by: Stanislaw Kardach Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit 4a3581cd5995d86721b3a38e1e2799b2137b4d77 Author: Sunil Goutham Date: Tue Oct 16 16:57:13 2018 +0530 octeontx2-af: NPA AQ instruction enqueue support Add support for a RVU PF/VF to submit instructions to NPA AQ via mbox. Instructions can be to init/write/read Aura/Pool/Qint contexts. In case of read, context will be returned as part of response to the mbox msg received. Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit 3fa4c3232ac9da57f1ad10ddc971f521e62edc69 Author: Sunil Goutham Date: Tue Oct 16 16:57:12 2018 +0530 octeontx2-af: NPA block LF initialization Upon receiving NPA_LF_ALLOC mbox message allocate memory for NPALF's aura, pool and qint contexts and configure the same to HW. Enable caching of contexts into NPA NDC. Return pool related info like stack size, num pointers per stack page e.t.c to the mbox msg sender. Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit 7a37245ef23f75223263930e086aa0a8678e161f Author: Sunil Goutham Date: Tue Oct 16 16:57:11 2018 +0530 octeontx2-af: NPA block admin queue init Initialize NPA admin queue (AQ) i.e alloc memory for AQ instructions and for the results. All NPA LFs will submit instructions to AQ to init/write/read Aura/Pool contexts and in case of read, get context from result memory. Added some common APIs for allocating memory for a queue and get IOVA in return, these APIs will be used by NIX AQ and for other purposes. Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit 23999b30ae67a1baef78ed5b2c3edb6928fcb225 Author: Geetha sowjanya Date: Tue Oct 16 16:57:10 2018 +0530 octeontx2-af: Enable or disable CGX internal loopback Add support to enable or disable internal loopback mode in CGX. New mbox IDs CGX_INTLBK_ENABLE/DISABLE added for this. Signed-off-by: Geetha sowjanya Signed-off-by: Linu Cherian Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit 61071a871ea6eb2125ece91c1a0dbb124a318c8a Author: Linu Cherian Date: Tue Oct 16 16:57:09 2018 +0530 octeontx2-af: Forward CGX link notifications to PFs Upon receiving notification from firmware the CGX event handler in the AF driver gets the current link info such as status, speed, duplex etc from CGX driver and sends it across to PFs who have registered to receive such notifications. To support above - Mbox messaging support for sending msgs from AF to PF has been added. - Added mbox msgs so that PFs can register/unregister for link events. - Link notifications are sent to PF under two scenarioss. 1. When a asynchronous link change notification is received from firmware with notification flag turned on for that PF. 2. Upon notification turn on request, the current link status is send to the PF. Also added a new mailbox msg using which RVU PF/VF can retrieve their mapped CGX LMAC's current link info. Link info includes status, speed, duplex and lmac type. Signed-off-by: Linu Cherian Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit 96be2e0da85eb1c26e8d1d38ed4855a9c4eba167 Author: Vidhya Raman Date: Tue Oct 16 16:57:08 2018 +0530 octeontx2-af: Support for MAC address filters in CGX This patch adds support for setting MAC address filters in CGX for PF interfaces. Also PF interfaces can be put in promiscuous mode. Dataplane PFs access this functionality using mailbox messages to the AF driver. Signed-off-by: Vidhya Raman Signed-off-by: Stanislaw Kardach Signed-off-by: David S. Miller commit 66208910e57afda24ef37be64d413d354f9b523f Author: Christina Jacob Date: Tue Oct 16 16:57:07 2018 +0530 octeontx2-af: Support to retrieve CGX LMAC stats This patch adds support for a RVU PF/VF driver to retrieve it's mapped CGX LMAC Rx and Tx stats from AF via mbox. New mailbox msg is added is added. Signed-off-by: Christina Jacob Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit 1435f66a28b44ac6b82f8601ee217d2eb55df4f2 Author: Sunil Goutham Date: Tue Oct 16 16:57:06 2018 +0530 octeontx2-af: CGX Rx/Tx enable/disable mbox handlers Added new mailbox msgs for RVU PF/VFs to request AF to enable/disable their mapped CGX::LMAC Rx & Tx. Signed-off-by: Sunil Goutham Signed-off-by: Linu Cherian Signed-off-by: David S. Miller commit 6ca3ee2f7d3a4b6063c14f5ebd1c6076035310ef Author: Sunil Goutham Date: Tue Oct 16 16:57:05 2018 +0530 octeontx2-af: Improve register polling loop Instead of looping on a integer timeout, use time_before(jiffies), so that maximum poll time is capped. Signed-off-by: Sunil Goutham Suggested-by: Arnd Bergmann Signed-off-by: David S. Miller commit 4d5b4ac1eae471bcd0fa381ab4099cc33e94e15d Author: Jens Axboe Date: Tue Oct 16 08:37:23 2018 -0600 scsi: fnic: replace gross legacy tag hack with blk-mq hack Would be nice to fix up the SCSI midlayer instead, but this will do for now. Cc: Christoph Hellwig Cc: Satish Kharat Cc: linux-scsi@vger.kernel.org Signed-off-by: Jens Axboe Signed-off-by: Martin K. Petersen commit c13bbf4a78aafed144de0250a3c71265672c9bda Merge: 28b32b9f61fe 8e16695b4eb8 Author: Dave Airlie Date: Thu Oct 18 12:05:08 2018 +1000 Merge branch 'drm-next-4.20' of git://people.freedesktop.org/~agd5f/linux into drm-next Fixes for 4.20. Highlights: - VCN DPG fixes for Picasso - Add support for the latest vega20 vbios - Scheduler timeout fix - License fixes for radeon and amdgpu - Misc other fixes Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20181017215427.2804-1-alexander.deucher@amd.com commit 28b32b9f61fe73e7625ed30c35afd6d8a0ed2b6e Merge: ca4b869240d5 0e8afefd5da4 Author: Dave Airlie Date: Thu Oct 18 12:04:41 2018 +1000 Merge tag 'drm-misc-next-fixes-2018-10-17' of git://anongit.freedesktop.org/drm/drm-misc into drm-next - Add quirk to fix orientation of Acer One 10 (S1003) panel (Hans) Cc: Hans de Goede Signed-off-by: Dave Airlie From: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20181017200741.GA240649@art_vandelay commit 6c714d44259494b4d593dd88d2b5a43ff1730680 Author: Christoph Hellwig Date: Thu Oct 11 10:17:35 2018 +0200 scsi: mesh: switch to generic DMA API Switch from the legacy PCI DMA API to the generic DMA API. Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen commit 32e76961dd63ebb2882f8a478889cc7f42fbfb4c Author: Christoph Hellwig Date: Thu Oct 11 10:15:35 2018 +0200 scsi: ips: switch to generic DMA API Switch from the legacy PCI DMA API to the generic DMA API. Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen commit 6917a9cc28181b37d142f1c5813a6888f41572e7 Author: Christoph Hellwig Date: Thu Oct 11 09:47:59 2018 +0200 scsi: smartpqi: fully convert to the generic DMA API The driver is currently using an odd mix of legacy PCI DMA API and generic DMA API calls, switch it over to the generic API entirely. Signed-off-by: Christoph Hellwig Tested-by: Don Brace Acked-by: Don Brace Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen commit 9b7ca6c24cb4bef2a704f34b4e11c471360d02a0 Author: Christoph Hellwig Date: Wed Oct 10 20:22:40 2018 +0200 scsi: vmw_pscsi: switch to generic DMA API Switch from the legacy PCI DMA API to the generic DMA API. Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen commit cecfed31fda849767799e5521064796a21c5164c Author: Christoph Hellwig Date: Wed Oct 10 20:16:41 2018 +0200 scsi: snic: switch to generic DMA API Switch from the legacy PCI DMA API to the generic DMA API. Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen commit ec44a6762fc57c82acdf2c12ec9b542d9f308300 Author: Christoph Hellwig Date: Thu Oct 11 09:56:58 2018 +0200 scsi: qla4xxx: fully convert to the generic DMA API The driver is currently using an odd mix of legacy PCI DMA API and generic DMA API calls, switch it over to the generic API entirely. Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen commit e7d0bb774699be4542ec09e903a9cce38cea33d4 Author: Christoph Hellwig Date: Thu Oct 11 09:42:07 2018 +0200 scsi: qla2xxx: fully convert to the generic DMA API The driver is currently using an odd mix of legacy PCI DMA API and generic DMA API calls, switch it over to the generic API entirely. Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen commit 60ea4fb138a66f8e08bc165225b89dfb942d0790 Author: Christoph Hellwig Date: Wed Oct 10 20:09:04 2018 +0200 scsi: qla1280: switch to generic DMA API Switch from the legacy PCI DMA API to the generic DMA API. Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen commit 7ae7ce0bbefff16d24d932f650b9bd9e8c08c0da Author: Christoph Hellwig Date: Wed Oct 10 20:06:13 2018 +0200 scsi: qedi: fully convert to the generic DMA API The driver is currently using an odd mix of legacy PCI DMA API and generic DMA API calls, switch it over to the generic API entirely. Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Acked-by: Manish Rangankar Signed-off-by: Martin K. Petersen commit 332d84f7f6378d6f595449f02c3552c22a77bd86 Author: Christoph Hellwig Date: Wed Oct 10 20:04:15 2018 +0200 scsi: qedf: fully convert to the generic DMA API The driver is currently using an odd mix of legacy PCI DMA API and generic DMA API calls, switch it over to the generic API entirely. Signed-off-by: Christoph Hellwig Acked-by: Chad Dupuis Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen commit f73bdebdf020a31ad43ce4de590ec7a09e383abd Author: Christoph Hellwig Date: Wed Oct 10 19:59:50 2018 +0200 scsi: pm8001: switch to generic DMA API Switch from the legacy PCI DMA API to the generic DMA API. Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Reviewed-by: Jack Wang Signed-off-by: Martin K. Petersen commit 03676e1d31fa0e156df0caecbacf20b488f7bd3a Author: Christoph Hellwig Date: Wed Oct 10 19:55:59 2018 +0200 scsi: nsp32: switch to generic DMA API Switch from the legacy PCI DMA API to the generic DMA API. Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen commit 4179a0619ad2f60eda275b6bd55f24c980e4efae Author: Christoph Hellwig Date: Thu Oct 11 09:54:21 2018 +0200 scsi: mvsas: fully convert to the generic DMA API The driver is currently using an odd mix of legacy PCI DMA API and generic DMA API calls, switch it over to the generic API entirely. Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen commit ab8e7f4bdfeac57074c8a8a9ca12bcd101fdf1ca Author: Christoph Hellwig Date: Wed Oct 10 19:53:14 2018 +0200 scsi: mvumi: switch to generic DMA API Switch from the legacy PCI DMA API to the generic DMA API. Also reuse an existing helper (after fixing the error return) to set the DMA mask instead of having three copies of the code. Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen commit 1c2048bdc3f4ff3337613c27519cf608916e95a9 Author: Christoph Hellwig Date: Thu Oct 11 09:35:25 2018 +0200 scsi: mpt3sas: switch to generic DMA API Switch from the legacy PCI DMA API to the generic DMA API. Also simplify setting the DMA mask a bit. Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen commit 60ee6529511601e9a8660627e7ef9f8c8edaef0c Author: Christoph Hellwig Date: Wed Oct 10 19:31:25 2018 +0200 scsi: megaraid_sas: switch to generic DMA API Switch from the legacy PCI DMA API to the generic DMA API. Signed-off-by: Christoph Hellwig Acked-by: Sumit Saxena Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen commit 66e3a2418b025871aee14ccf366a9841e0ae7ee0 Author: Christoph Hellwig Date: Thu Oct 11 09:34:24 2018 +0200 scsi: megaraid_mbox: switch to generic DMA API Switch from the legacy PCI DMA API to the generic DMA API. Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen commit 8bc8f47ea3964ef141e91ffff912538a66a55d5f Author: Christoph Hellwig Date: Wed Oct 10 18:56:15 2018 +0200 scsi: hpsa: switch to generic DMA API Switch from the legacy PCI DMA API to the generic DMA API. Signed-off-by: Christoph Hellwig Tested-by: Don Brace Acked-by: Don Brace Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen commit 7f9b0f774fdf26a5d76363d889ba587e242a497b Author: Christoph Hellwig Date: Wed Oct 10 18:40:56 2018 +0200 scsi: fnic: switch to generic DMA API Switch from the legacy PCI DMA API to the generic DMA API. Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen commit c22b332d811b90448e090c7fb487448afb039fcc Author: Christoph Hellwig Date: Wed Oct 10 18:34:51 2018 +0200 scsi: csiostor: switch to generic DMA API Switch from the legacy PCI DMA API to the generic DMA API. Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen commit 26a4c991af99f1f6632c0cf253a332a29edd2681 Author: Christoph Hellwig Date: Wed Oct 10 18:22:24 2018 +0200 scsi: be2iscsi: switch to generic DMA API Switch from the legacy PCI DMA API to the generic DMA API. Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen commit 48ecddb41b741d4e530d88903757d26058fce2a5 Author: Christoph Hellwig Date: Wed Oct 10 18:14:14 2018 +0200 scsi: atp870u: switch to generic DMA API Switch from the legacy PCI DMA API to the generic DMA API. Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen commit 4d431b182e67da090f6bbe092281f49cab1a55f2 Author: Christoph Hellwig Date: Wed Oct 10 18:09:42 2018 +0200 scsi: a100u2w: switch to generic DMA API Switch from the legacy PCI DMA API to the generic DMA API. Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen commit 17a361b20a0f908ca3952778b063994435164fe8 Author: Christoph Hellwig Date: Wed Oct 10 18:03:24 2018 +0200 scsi: BusLogic: switch to generic DMA API Switch from the legacy PCI DMA API to the generic DMA API. Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen commit b1fa122930c4ceeb265f02202c8f42a53a188a88 Author: Christoph Hellwig Date: Wed Oct 10 18:06:50 2018 +0200 scsi: 3w-sas: fully convert to the generic DMA API The driver is currently using an odd mix of legacy PCI DMA API and generic DMA API calls, switch it over to the generic API entirely. Signed-off-by: Christoph Hellwig Acked-by: Adam Radford Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen commit bd6cf46b046fd4bbfec128617600e85c431d2853 Author: Christoph Hellwig Date: Wed Oct 10 17:58:50 2018 +0200 scsi: 3w-xxx: fully convert to the generic DMA API The driver is currently using an odd mix of legacy PCI DMA API and generic DMA API calls, switch it over to the generic API entirely. Signed-off-by: Christoph Hellwig Acked-by: Adam Radford Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen commit b000bced57395e4f2f6a48d7b4b9cb2b2517bdfc Author: Christoph Hellwig Date: Wed Oct 10 17:53:41 2018 +0200 scsi: 3w-9xxx: fully convert to the generic DMA API The driver is currently using an odd mix of legacy PCI DMA API and generic DMA API calls, switch it over to the generic API entirely. Signed-off-by: Christoph Hellwig Acked-by: Adam Radford Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen commit 3a21986f1a5974d3d4d1489840188e2349ec7911 Author: Christoph Hellwig Date: Thu Oct 11 10:02:55 2018 +0200 scsi: aic94xx: fully convert to the generic DMA API The driver is currently using an odd mix of legacy PCI DMA API and generic DMA API calls, switch it over to the generic API entirely. Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen commit 8c6f803fd66e28dfe01f51d1c0b5b9188980ba58 Author: Finn Thain Date: Tue Oct 16 16:31:25 2018 +1100 scsi: esp_scsi: Optimize PIO loops Avoid function calls in the inner PIO loops. On a Centris 660av this improves throughput for sequential read transfers by about 40% and sequential write by about 10%. Unfortunately it is not possible to have methods like .esp_write8 placed inline so this is always going to be slow, even with LTO. Tested-by: Stan Johnson Signed-off-by: Finn Thain Tested-by: Michael Schmitz Signed-off-by: Martin K. Petersen commit 53dce332db507a2bd9797adc938fa293d1f1acc6 Author: Finn Thain Date: Tue Oct 16 16:31:25 2018 +1100 scsi: esp_scsi: De-duplicate PIO routines As a temporary measure, the code to implement PIO transfers was duplicated in zorro_esp and mac_esp. Now that it has stabilized move the common code into the core driver but don't build it unless needed. This replaces the inline assembler with more portable writesb() calls. Optimizing the m68k writesb() implementation is a separate patch. [mkp: applied by hand] Signed-off-by: Finn Thain Tested-by: Stan Johnson Tested-by: Michael Schmitz Signed-off-by: Martin K. Petersen commit 8bca2143335116af838305440d94539367382555 Author: Finn Thain Date: Tue Oct 16 16:31:25 2018 +1100 scsi: esp_scsi: Eliminate ESP_FLAG_DOING_SLOWCMD The concept of a 'slow command' as it appears in esp_scsi is confusing because it could refer to an ESP command or a SCSI command. It turns out that it refers to a particular ESP select command which the driver also tracks as 'ESP_SELECT_MSGOUT'. For readability, it is better to use the terminology from the datasheets. The global ESP_FLAG_DOING_SLOWCMD flag is redundant anyway, as it can be inferred from esp->select_state. Remove the ESP_FLAG_DOING_SLOWCMD cruft and just use a boolean local variable. Tested-by: Stan Johnson Signed-off-by: Finn Thain Tested-by: Michael Schmitz Signed-off-by: Martin K. Petersen commit 87c58ef5a57f46b1d78117317a7d8806ad16f404 Author: Finn Thain Date: Tue Oct 16 16:31:25 2018 +1100 scsi: esp_scsi: Grant disconnect privilege for untagged commands A SCSI device is not granted disconnect privilege by an esp_scsi host unless that device has its simple_tags flag set. However, a device may support disconnect/reselect and not support command queueing. Allow such devices to disconnect and thereby improve bus utilization. Drop the redundant 'lp' check. The mid-layer invokes .slave_alloc and .slave_destroy in such a way that we may rely on scmd->device->hostdata for as long as scmd belongs to the low-level driver. Tested-by: Stan Johnson Signed-off-by: Finn Thain Tested-by: Michael Schmitz Signed-off-by: Martin K. Petersen commit fd47d919d0c336e7c22862b51ee94927ffea227a Author: Finn Thain Date: Tue Oct 16 16:31:25 2018 +1100 scsi: esp_scsi: Track residual for PIO transfers If a target disconnects during a PIO data transfer the command may fail when the target reconnects: scsi host1: DMA length is zero! scsi host1: cur adr[04380000] len[00000000] The scsi bus is then reset. This happens because the residual reached zero before the transfer was completed. The usual residual calculation relies on the Transfer Count registers. That works for DMA transfers but not for PIO transfers. Fix the problem by storing the PIO transfer residual and using that to correctly calculate bytes_sent. Fixes: 6fe07aaffbf0 ("[SCSI] m68k: new mac_esp scsi driver") Tested-by: Stan Johnson Signed-off-by: Finn Thain Tested-by: Michael Schmitz Signed-off-by: Martin K. Petersen commit b7ded0e8b0d11b6df1c4e5aa23a26e6629c21985 Author: Finn Thain Date: Tue Oct 16 16:31:25 2018 +1100 scsi: zorro_esp: Limit DMA transfers to 65535 bytes The core driver, esp_scsi, does not use the ESP_CONFIG2_FENAB bit, so the chip's Transfer Counter register is only 16 bits wide (not 24). A larger transfer cannot work and will theoretically result in a failed command and a "DMA length is zero" error. Fixes: 3109e5ae0311 ("scsi: zorro_esp: New driver for Amiga Zorro NCR53C9x boards") Signed-off-by: Finn Thain Cc: Michael Schmitz Tested-by: Michael Schmitz Reviewed-by: Michael Schmitz Signed-off-by: Martin K. Petersen commit dfda5e21c93a3441e8a54a38000cff95f9515d34 Author: Christoph Hellwig Date: Thu Oct 11 16:17:16 2018 +0200 scsi: dc395x: use generic DMA API Convert the driver from the legacy pci_* DMA API to the generic DMA API. Signed-off-by: Christoph Hellwig Signed-off-by: Martin K. Petersen commit 6c404a68bf83b4135a8a9aa1c388ebdf98e8ba7f Author: Christoph Hellwig Date: Thu Oct 11 16:17:15 2018 +0200 scsi: dc395x: fix DMA API usage in sg_update_list We need to transfer device ownership to the CPU before we can manipulate the mapped data. Signed-off-by: Christoph Hellwig Signed-off-by: Martin K. Petersen commit 3a5bd7021184dec2946f2a4d7a8943f8a5713e52 Author: Christoph Hellwig Date: Thu Oct 11 16:17:14 2018 +0200 scsi: dc395x: fix dma API usage in srb_done We can't just transfer ownership to the CPU and then unmap, as this will break with swiotlb. Instead unmap the command and sense buffer a little earlier in the I/O completion handler and get rid of the pci_dma_sync_sg_for_cpu call entirely. Signed-off-by: Christoph Hellwig Signed-off-by: Martin K. Petersen commit cd29660dc8675ec235db23e38435fad833158e1c Author: Christoph Hellwig Date: Thu Oct 11 16:17:13 2018 +0200 scsi: dc395x: simplify list handling Remove the list wrappers, including the pointless list iteration before deletion. Signed-off-by: Christoph Hellwig Signed-off-by: Martin K. Petersen commit d9a515867bdba59ebf196a6ade10faae8e8be36a 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 (cherry picked from commit 914a4fd8cd28016038ce749a818a836124a8d270) Signed-off-by: Rodrigo Vivi commit ab0d6a141843e0b4b2709dfd37b53468b5452c3a 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 (cherry picked from commit a5e856a5348f6cd50889d125c40bbeec7328e466) Signed-off-by: Rodrigo Vivi commit e3118a038dfd1d6d902ea966e0ce3ce4e91e503b 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 (cherry picked from commit 0b4bf7ca9be824dde6ff63dd2ceba2d1367f8a58) Signed-off-by: Rodrigo Vivi commit 041444458835d7fb2c9f042598bfe16bf375b15d 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 (cherry picked from commit 1e712535c51ab025ebc776d4405683d81521996d) Signed-off-by: Rodrigo Vivi commit 4bbf0d4749e707b6b262d576a9a9ef5c63b52dd4 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 (cherry picked from commit a9f9ca33d1fe9325f414914be526c0fc4ba5281c) Signed-off-by: Rodrigo Vivi commit c02ba4ef16eefe663fdefcccaa57fad32d5481bf 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 (cherry picked from commit f67207d78ceaf98b7531bc22df6f21328559c8d4) Signed-off-by: Rodrigo Vivi commit 80c188695a77eddaa6e8885510ff4ef59fd478c3 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 (cherry picked from commit 6ed5bb1fbad34382c8cfe9a9bf737e9a43053df5) Signed-off-by: Rodrigo Vivi commit 708ea872601e56ef9ea8398c5a11938482bcbb4d 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 (cherry picked from commit 88a83f3c2d7a87ce7c9c4171dec8e2fb48070288) Signed-off-by: Rodrigo Vivi commit 9b27390139dbe0dc10d1899545248862fe826b61 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 (cherry picked from commit 62358aa4ee86481ce044bef04859820e1bc7c1d9) Signed-off-by: Rodrigo Vivi commit 7cada4d0b7a0fb813dbc9777fec092e9ed0546e9 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 (cherry picked from commit 68bc30deac625b8be8d3950b30dc93d09a3645f5) Signed-off-by: Rodrigo Vivi commit 3f6d5ba173da9a41c799146a3ad999da2158716a 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 (cherry picked from commit fc3fed5d297b51f9e2c7d4f969c95c0d6e50ca57) Signed-off-by: Rodrigo Vivi commit 85c95f208f481ab3c34c4622f508272cd4803afd Author: Mark Fasheh Date: Mon Sep 10 16:21:18 2018 -0700 vfs: dedupe should return EPERM if permission is not granted Right now we return EINVAL if a process does not have permission to dedupe a file. This was an oversight on my part. EPERM gives a true description of the nature of our error, and EINVAL is already used for the case that the filesystem does not support dedupe. Signed-off-by: Mark Fasheh Reviewed-by: Darrick J. Wong Acked-by: David Sterba Signed-off-by: Al Viro commit 5de4480ae7f8f1969065aa88be98111e36075bb0 Author: Mark Fasheh Date: Mon Sep 10 16:21:17 2018 -0700 vfs: allow dedupe of user owned read-only files The permission check in vfs_dedupe_file_range_one() is too coarse - We only allow dedupe of the destination file if the user is root, or they have the file open for write. This effectively limits a non-root user from deduping their own read-only files. In addition, the write file descriptor that the user is forced to hold open can prevent execution of files. As file data during a dedupe does not change, the behavior is unexpected and this has caused a number of issue reports. For an example, see: https://github.com/markfasheh/duperemove/issues/129 So change the check so we allow dedupe on the target if: - the root or admin is asking for it - the process has write access - the owner of the file is asking for the dedupe - the process could get write access That way users can open read-only and still get dedupe. Signed-off-by: Mark Fasheh Signed-off-by: Al Viro commit 77266186397c6c782a3f670d32808a9671806ec5 Author: Hannes Reinecke Date: Wed Oct 17 17:25:12 2018 +0200 scsi: myrs: Add Mylex RAID controller (SCSI interface) This patch adds support for the Mylex DAC960 RAID controller, supporting the newer, SCSI-based interface. The driver is a re-implementation of the original DAC960 driver. Signed-off-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen commit 081ff398c56cc1052091e299aae6f7f7de680853 Author: Hannes Reinecke Date: Wed Oct 17 17:25:11 2018 +0200 scsi: myrb: Add Mylex RAID controller (block interface) This patch adds support for the Mylex DAC960 RAID controller, supporting the older, block-based interface only. The driver is a re-implementation of the original DAC960 driver. Signed-off-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen commit e6760cc43e689ea29dce046c9fa1b10982e6b2b5 Author: YueHaibing Date: Wed Oct 17 20:34:32 2018 +0800 scsi: advansys: remove unused variable 'srb_tag' in adv_isr_callback drivers/scsi/advansys.c: In function 'adv_isr_callback': drivers/scsi/advansys.c:5952:6: warning: variable 'srb_tag' set but not used [-Wunused-but-set-variable] It never used since introduction in commit 9c17c62aedb0 ("advansys: use shared host tag map for command lookup") Signed-off-by: YueHaibing Signed-off-by: Martin K. Petersen commit 37208bee6a75574f66b28ae6bb536d9f9b6f22bf Author: Laurence Oberman Date: Tue Oct 16 16:39:16 2018 -0400 scsi: core: Remove scsi_block_when_processing_errors: message This message floods the log when enabling mask 0x7 for /proc/sys/dev/scsi/logging_level: xxxxxxxx kernel: scsi_block_when_processing_errors: rtn: 1 It's not needed and makes tracing just scsi_eh* messages way too verbose so get rid of it. [mkp: mangled patch, applied by hand] Signed-off-by: Laurence Oberman Reviewed-by: Hannes Reinecke Reviewed-by: Chad Dupuis Reviewed-by: Ewan D. Milne Signed-off-by: Martin K. Petersen commit a1ad38a61e34a67bce75c01702d056f051feaf04 Author: Bryant G. Ly Date: Tue Oct 16 17:34:26 2018 +0000 scsi: ibmvscsi_tgt: Remove target_wait_for_sess_cmd() There is currently a bug with the driver where there is never a call to target_sess_cmd_list_set_waiting(), it only called target_wait_for_sess_cmd(), which basically means that the sess_wait_list would always be empty. Thus, list_empty(&sess->sess_wait_list) = true, (eg: no se_cmd I/O is quiesced, because no se_cmd in sess_wait_list), since commit 712db3eb2c35 ("scsi: ibmvscsis: Properly deregister target sessions") in 4.9.y code. ibmvscsi_tgt does not remove the I_T Nexus when a VM is active so we can fix this issue by removing the call to target_wait_for_sess_cmd() altogether. Signed-off-by: Bryant G. Ly Reviewed-by: Mike Christie Signed-off-by: Martin K. Petersen commit f4bb7704699beee9edfbee875daa9089c86cf724 Author: Evan Green Date: Fri Oct 5 10:27:32 2018 -0700 scsi: ufs: Schedule clk gating work on correct queue With commit 10e5e37581fc ("scsi: ufs: Add clock ungating to a separate workqueue"), clock gating work was moved to a separate work queue with WQ_MEM_RECLAIM set, since clock gating could occur from a memory reclaim context. Unfortunately, clk_gating.gate_work was left queued via schedule_delayed_work, which is a system workqueue that does not have WQ_MEM_RECLAIM set. Because ufshcd_ungate_work attempts to cancel gate_work, the following warning appears: [ 14.174170] workqueue: WQ_MEM_RECLAIM ufs_clk_gating_0:ufshcd_ungate_work is flushing !WQ_MEM_RECLAIM events:ufshcd_gate_work [ 14.174179] WARNING: CPU: 4 PID: 173 at kernel/workqueue.c:2440 check_flush_dependency+0x110/0x118 [ 14.205725] CPU: 4 PID: 173 Comm: kworker/u16:3 Not tainted 4.14.68 #1 [ 14.212437] Hardware name: Google Cheza (rev1) (DT) [ 14.217459] Workqueue: ufs_clk_gating_0 ufshcd_ungate_work [ 14.223107] task: ffffffc0f6a40080 task.stack: ffffff800a490000 [ 14.229195] PC is at check_flush_dependency+0x110/0x118 [ 14.234569] LR is at check_flush_dependency+0x110/0x118 [ 14.239944] pc : [] lr : [] pstate: 60c001c9 [ 14.333050] Call trace: [ 14.427767] [] check_flush_dependency+0x110/0x118 [ 14.434219] [] start_flush_work+0xac/0x1fc [ 14.440046] [] flush_work+0x40/0x94 [ 14.445246] [] __cancel_work_timer+0x11c/0x1b8 [ 14.451433] [] cancel_delayed_work_sync+0x20/0x30 [ 14.457886] [] ufshcd_ungate_work+0x24/0xd0 [ 14.463800] [] process_one_work+0x32c/0x690 [ 14.469713] [] worker_thread+0x218/0x338 [ 14.475361] [] kthread+0x120/0x130 [ 14.480470] [] ret_from_fork+0x10/0x18 The simple solution is to put the gate_work on the same WQ_MEM_RECLAIM work queue as the ungate_work. Fixes: 10e5e37581fc ("scsi: ufs: Add clock ungating to a separate workqueue") Signed-off-by: Evan Green Reviewed-by: Douglas Anderson Reviewed-by: Stephen Boyd Signed-off-by: Martin K. Petersen commit 53e50a6ec24d83e9d79e6a95a33b7adcd610f772 Merge: aadd4355918f 1231e04f5bba Author: David S. Miller Date: Wed Oct 17 17:45:08 2018 -0700 Merge branch 'mlxsw-Add-VxLAN-support' Ido Schimmel says: ==================== mlxsw: Add VxLAN support This patchset adds support for VxLAN offload in the mlxsw driver. With regards to the forwarding plane, VxLAN support is composed from two main parts: Encapsulation and decapsulation. In the device, NVE encapsulation (and VxLAN in particular) takes place in the bridge. A packet can be encapsulated using VxLAN either because it hit an FDB entry that forwards it to the router with the IP of the remote VTEP or because it was flooded, in which case it is sent to a list of remote VTEPs (in addition to local ports). In either case, the VNI is derived from the filtering identifier (FID) the packet was classified to at ingress and the underlay source IP is taken from a device global configuration. VxLAN decapsulation takes place in the underlay router, where packets that hit a local route that corresponds to the source IP of the local VTEP are decapsulated and injected to the bridge. The packets are classified to a FID based on the VNI they came with. The first six patches export the required APIs in the VxLAN and mlxsw drivers in order to allow for the introduction of the NVE core in the next two patches. The NVE core is designed to support a variety of NVE encapsulations (e.g., VxLAN, NVGRE) and different ASICs, but currently only VxLAN and Spectrum are supported. Spectrum-2 support will be added in the future. The last 10 patches add support for VxLAN decapsulation and encapsulation and include the addition of the required switchdev APIs in the VxLAN driver. These APIs allow capable drivers to get a notification about the addition / deletion of FDB entries to / from the VxLAN's FDB. Subsequent patchset will add selftests (generic and mlxsw-specific), data plane learning, FDB extack and vetoing and support for VLAN-aware bridges (one VNI per VxLAN device model). v2: * Implement netif_is_vxlan() using rtnl_link_ops->kind (Jakub & Stephen) ==================== Signed-off-by: David S. Miller commit 1231e04f5bba47f87d0b690a2d58c771a59f93aa Author: Ido Schimmel Date: Wed Oct 17 08:53:32 2018 +0000 mlxsw: spectrum_switchdev: Add support for VxLAN encapsulation In the device, VxLAN encapsulation takes place in the FDB table where certain {MAC, FID} entries are programmed with an underlay unicast IP. MAC addresses that are not programmed in the FDB are flooded to the relevant local ports and also to a list of underlay unicast IPs that are programmed using the all zeros MAC address in the VxLAN driver. One difference between the hardware and software data paths is the fact that in the software data path there are two FDB lookups prior to the encapsulation of the packet. First in the bridge's FDB table using {MAC, VID} and another in the VxLAN's FDB table using {MAC, VNI}. Therefore, when a new VxLAN FDB entry is notified, it is only programmed to the device if there is a corresponding entry in the bridge's FDB table. Similarly, when a new bridge FDB entry pointing to the VxLAN device is notified, it is only programmed to the device if there is a corresponding entry in the VxLAN's FDB table. Note that the above scheme will result in a discrepancy between both data paths if only one FDB table is populated in the software data path. For example, if only the bridge's FDB is populated with an entry pointing to a VxLAN device, then a packet hitting the entry will only be flooded by the kernel to remote VTEPs whereas the device will also flood the packets to other local ports member in the VLAN. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit 1c30d1836aebdfa2b0a18952f0a906dcf49c66fc Author: Ido Schimmel Date: Wed Oct 17 08:53:31 2018 +0000 mlxsw: spectrum: Enable VxLAN enslavement to bridges Enslavement of VxLAN devices to offloaded bridges was never forbidden by mlxsw, but this patch makes sure the required configuration is performed in order to allow VxLAN encapsulation and decapsulation to take place in the device. The patch handles both the case where a VxLAN device is enslaved to an already offloaded bridge and the case where the first mlxsw port is enslaved to a bridge that already has VxLAN device configured. Invalid configurations are sanitized and an error string is returned via extack. Since encapsulation and decapsulation do not occur when the VxLAN device is down, the driver makes sure to enable / disable these functionalities based on NETDEV_PRE_UP and NETDEV_DOWN events. Note that NETDEV_PRE_UP is used in favor of NETDEV_UP, as the former allows to veto the operation, if necessary. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit e9ba0fbc7dd23a74e77960c98c988f59a1ff75aa Author: Ido Schimmel Date: Wed Oct 17 08:53:29 2018 +0000 bridge: switchdev: Allow clearing FDB entry offload indication Currently, an FDB entry only ceases being offloaded when it is deleted. This changes with VxLAN encapsulation. Devices capable of performing VxLAN encapsulation usually have only one FDB table, unlike the software data path which has two - one in the bridge driver and another in the VxLAN driver. Therefore, bridge FDB entries pointing to a VxLAN device are only offloaded if there is a corresponding entry in the VxLAN FDB. Allow clearing the offload indication in case the corresponding entry was deleted from the VxLAN FDB. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit 045a5a99141d96e6254664783e8afb4e298ae2c9 Author: Petr Machata Date: Wed Oct 17 08:53:27 2018 +0000 vxlan: Notify for each remote of a removed FDB entry When notifications are sent about FDB activity, and an FDB entry with several remotes is removed, the notification is sent only for the first destination. That makes it impossible to distinguish between the case where only this first remote is removed, and the one where the FDB entry is removed as a whole. Therefore send one notification for each remote of a removed FDB entry. Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 0efe11733356273d734cc2c5ab2dc6f5865cbeb6 Author: Petr Machata Date: Wed Oct 17 08:53:26 2018 +0000 vxlan: Support marking RDSTs as offloaded Offloaded bridge FDB entries are marked with NTF_OFFLOADED. Implement a similar mechanism for VXLAN, where a given remote destination can be marked as offloaded. To that end, introduce a new event, SWITCHDEV_VXLAN_FDB_OFFLOADED, through which the marking is communicated to the vxlan driver. To identify which RDST should be marked as offloaded, an switchdev_notifier_vxlan_fdb_info is passed to the listeners. The "offloaded" flag in that object determines whether the offloaded mark should be set or cleared. When sending offloaded FDB entries over netlink, mark them with NTF_OFFLOADED. Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 1941f1d6453a527ae8df59891da0319646608444 Author: Petr Machata Date: Wed Oct 17 08:53:24 2018 +0000 vxlan: Add vxlan_fdb_find_uc() for FDB querying A switchdev-capable driver that is aware of VXLAN may need to query VXLAN FDB. In the particular case of mlxsw, this functionality is limited to querying UC FDBs. Those being easier to deal with than the general case of RDST chain traversal, introduce an interface to query specifically UC FDBs: vxlan_fdb_find_uc(). Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 9a99735317866e821c75f957fc85c63d049d330c Author: Petr Machata Date: Wed Oct 17 08:53:22 2018 +0000 vxlan: Add switchdev notifications When offloading VXLAN devices, drivers need to know about events in VXLAN FDB database. Since VXLAN models a bridge, it is natural to distribute the VXLAN FDB notifications using the pre-existing switchdev notification mechanism. To that end, introduce two new notification types: SWITCHDEV_VXLAN_FDB_ADD_TO_DEVICE and SWITCHDEV_VXLAN_FDB_DEL_TO_DEVICE. Introduce a new function, vxlan_fdb_switchdev_call_notifiers() to send the new notifier types, and a struct switchdev_notifier_vxlan_fdb_info to communicate the details of the FDB entry under consideration. Invoke the new function from vxlan_fdb_notify(). Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 5ff4ff4fe8c4e7d0de1d837e489056f0c470667b Author: Ido Schimmel Date: Wed Oct 17 08:53:20 2018 +0000 net: Add netif_is_vxlan() Add the ability to determine whether a netdev is a VxLAN netdev by calling the above mentioned function that checks the netdev's rtnl_link_ops. This will allow modules to identify netdev events involving a VxLAN netdev and act accordingly. For example, drivers capable of VxLAN offload will need to configure the underlying device when a VxLAN netdev is being enslaved to an offloaded bridge. Convert nfp to use the newly introduced helper. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Acked-by: Jakub Kicinski Signed-off-by: David S. Miller commit 4cf178d7b9dc3c821ccc16b7acf9937b95a2b837 Author: Ido Schimmel Date: Wed Oct 17 08:53:19 2018 +0000 mlxsw: spectrum_router: Configure matching local routes for NVE decap When a local route that matches the source IP of an offloaded NVE tunnel is notified, the driver needs to program it to perform NVE decapsulation instead of merely trapping packets to the CPU. This patch complements "mlxsw: spectrum_router: Enable local routes promotion to perform NVE decap" where existing local routes were promoted to perform NVE decapsulation. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit 498790befb5f68213d418c2f064ca21168fdc8da Author: Ido Schimmel Date: Wed Oct 17 08:53:17 2018 +0000 mlxsw: spectrum_fid: Clear NVE configuration when destroying 802.1D FIDs 802.1D FIDs are used to represent VLAN-unaware bridges and currently this is the only type of FID that supports NVE configuration. Since the NVE tunnel device does not take a reference on the FID, it is possible for the FID to be destroyed when it still has NVE configuration. Therefore, when destroying the FID make sure to disable its NVE configuration. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit 369529115475e3c3eb520a8ace83c983535aef54 Author: Ido Schimmel Date: Wed Oct 17 08:53:16 2018 +0000 mlxsw: spectrum_nve: Implement VxLAN operations The common NVE core expects each encapsulation type to implement a certain set of operations that are specific to this type and the currently used ASIC. These operations include things such as the ability to determine whether a certain NVE configuration can be offloaded and ASIC-specific initialization for this type. Implement these operations for VxLAN on the Spectrum ASIC. Spectrum-2 support will be added by a future patchset. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit 6e6030bd5412182e064139821ffb09c373e46829 Author: Ido Schimmel Date: Wed Oct 17 08:53:14 2018 +0000 mlxsw: spectrum_nve: Implement common NVE core The Spectrum ASIC supports different types of NVE encapsulations (e.g., VxLAN, NVGRE) with more types to be supported by future ASICs. Despite being different, all these encapsulations share some common functionality such as the enablement of NVE encapsulation on a given filtering identifier (FID) and the addition of remote VTEPs to the linked-list of VTEPs that traffic should be flooded to. Implement this common core and allow different ASICs to register different operations for different encapsulation types. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit 28e450333d4d1328710e258d38793c61658d4c95 Author: Ido Schimmel Date: Wed Oct 17 08:53:12 2018 +0000 inet: Refactor INET_ECN_decapsulate() Drivers that support tunnel decapsulation (IPinIP or NVE) need to configure the underlying device to conform to the behavior outlined in RFC 6040 with respect to the ECN bits. This behavior is implemented by INET_ECN_decapsulate() which requires an skb to be passed where the ECN CE bit can be potentially set. Since these drivers do not need to mark an skb, but only configure the device to do so, factor out the business logic to __INET_ECN_decapsulate() and potentially perform the marking in INET_ECN_decapsulate(). This allows drivers to invoke __INET_ECN_decapsulate() and configure the device. Signed-off-by: Ido Schimmel Suggested-by: Petr Machata Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit cca45e054ce55c06046a37bf4d3fd7c17edd57da Author: Ido Schimmel Date: Wed Oct 17 08:53:10 2018 +0000 vxlan: Export address checking functions Drivers that support VxLAN offload need to be able to sanitize the configuration of the VxLAN device and accept / reject its offload. For example, mlxsw requires that the local IP of the VxLAN device be set and that packets be flooded to unicast IP(s) and not to a multicast group. Expose the functions that perform such checks. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit 88782f75f93f62928c26d7e7e5c1649f85dd1469 Author: Ido Schimmel Date: Wed Oct 17 08:53:08 2018 +0000 mlxsw: spectrum_router: Allow querying VR ID based on table ID In the device, different VRFs (routing tables) are represented using different virtual routers (VRs) and thus the kernel's table IDs are mapped to VR IDs. Allow internal users of the IP router to query the VR ID based on a kernel table ID. This is needed - for example - when configuring the underlay VR where VxLAN encapsulated packets will undergo an L3 lookup. In this case, the kernel's table ID is derived from the VxLAN device's configuration. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit 0c69e0fcd3b1a5c73a3faaae2df76a3e0e74f122 Author: Ido Schimmel Date: Wed Oct 17 08:53:07 2018 +0000 mlxsw: spectrum_router: Enable local routes promotion to perform NVE decap When an NVE tunnel with an IP underlay (e.g., VxLAN) is configured the local route to the tunnel's source IP needs to be promoted to perform NVE decapsulation. Expose an API in the unicast IP router to promote / demote local routes. The case where a local route is configured after the creation of the NVE tunnel will be handled in a subsequent patch in the set. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit 564c6d727aca31735662b944311efda0d9465820 Author: Ido Schimmel Date: Wed Oct 17 08:53:05 2018 +0000 mlxsw: spectrum_fid: Add APIs to lookup FID without creating it Current APIs only allow looking for a FID and creating it in case it does not exist. With VxLAN, in case the bridge to which the VxLAN device was enslaved does not already have a corresponding FID, then it means that something went wrong that we need to be aware of. Add an API to look up a FID, but without creating it in order to catch above-mentioned situation. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit d3d19d4b8ca2efbcf4fc543ef5d2367999a89862 Author: Ido Schimmel Date: Wed Oct 17 08:53:03 2018 +0000 mlxsw: spectrum_fid: Allow setting and clearing NVE properties on FID In the device, the VNI and the list of remote VTEPs a packet should be flooded to is a property of the filtering identifier (FID). During encapsulation, the VNI is taken from the FID the packet was classified to. During decapsulation, the overlay packet is injected into a bridge and classified to a FID based on the VNI it came with. Allow NVE configuration for a FID. Currently, this is only supported with 802.1D FIDs which are used for VLAN-unaware bridges. However, NVE configuration is going to be supported with 802.1Q FIDs which is why the related fields are placed in the common FID struct. Since the device requires a 1:1 mapping between FID and VNI, the driver maintains a hashtable keyed by VNI and checks if the VNI is already associated with an existing FID. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit 711f76a328cbe5b49164bb14bcb593fa52102051 Author: Sebastian Andrzej Siewior Date: Wed Oct 17 19:05:53 2018 +0200 x86/mcelog: Remove one mce_helper definition Commit 5de97c9f6d85f ("x86/mce: Factor out and deprecate the /dev/mcelog driver") moved the old interface into one file including mce_helper definition as static and "extern". Remove one. Fixes: 5de97c9f6d85f ("x86/mce: Factor out and deprecate the /dev/mcelog driver") Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Borislav Petkov CC: "H. Peter Anvin" CC: Ingo Molnar CC: Thomas Gleixner CC: Tony Luck CC: linux-edac CC: x86-ml Link: http://lkml.kernel.org/r/20181017170554.18841-3-bigeasy@linutronix.de commit bf07aa730a04a375bc10d09df1e81357af1d4477 Author: Paul Blakey Date: Sun Sep 2 10:19:14 2018 +0300 net/mlx5e: Support offloading tc priorities and chains for eswitch flows Currently we fail when user specify a non-zero chain, this patch adds the support for it and tc priorities. To get to a new chain, use the tc goto action. Currently we support a fixed prio range 1-16, and chain range 0-3. Signed-off-by: Paul Blakey Reviewed-by: Or Gerlitz Signed-off-by: Saeed Mahameed commit 5dbe906ff1d5040013d30df1e8c769d28af7e0f9 Author: Paul Blakey Date: Wed Aug 1 11:09:10 2018 +0300 net/mlx5e: Use a slow path rule instead if vxlan neighbour isn't available When adding a vxlan tc rule, and a neighbour isn't available, we don't insert any rule to hardware. Once we enable offloading flows with multiple priorities, a packet that should have matched this rule will continue in hardware pipeline and might match a wrong one. This is unlike in tc software path where it will be matched and forwarded to the vxlan device (which will cause a ARP lookup eventually) and stop processing further tc filters. To address that, when when a neighbour isn't available (EAGAIN from attach_encap), or gets deleted, change the original action to be a forward to slow path instead. Neighbour update will restore the original action once the neighbour becomes available. This will be done atomically so at any given time we will have a the correct match. Signed-off-by: Paul Blakey Reviewed-by: Or Gerlitz Signed-off-by: Saeed Mahameed commit c92a0b9457a4e44e1e7f53785490a5482eedfe2d Author: Paul Blakey Date: Tue Sep 4 20:32:07 2018 +0300 net/mlx5: E-Switch, Enable setting goto slow path chain action A pre-step for the tc offloads code to use this when a neigh is not available for encap rules. Signed-off-by: Paul Blakey Reviewed-by: Or Gerlitz Signed-off-by: Saeed Mahameed commit 6d2a3ed011e84287c634ec2b6e4a856ce95fd729 Author: Or Gerlitz Date: Tue Sep 4 19:12:10 2018 +0300 net/mlx5e: Avoid duplicated code for tc offloads add/del fdb rule The code for adding/deleting fdb flow is repeated when user-space does flow add/del and when we add/del from the neigh update path - unify them to avoid the duplication. Signed-off-by: Or Gerlitz Signed-off-by: Paul Blakey Signed-off-by: Saeed Mahameed commit 42f7ad6760077e125eb7849c5499b7b77a54c2f3 Author: Paul Blakey Date: Sun Sep 2 09:23:24 2018 +0300 net/mlx5e: For TC offloads, always add new flow instead of appending the actions When replacing a tc flower rule, flower first requests to add the new rule (new action), then deletes the old one. But currently when asked to add a new tc flower flow, we append the actions (and counters to it). This can result in a fte with two flow counters or conflicting actions (drop and encap action) which firmware complains/errs about and isn't achieving what the user aimed for. Instead, insert the flow using the new no-append flag which will add a new HW rule, the old flow and rule will be deleted later by flower Signed-off-by: Paul Blakey Reviewed-by: Or Gerlitz Signed-off-by: Saeed Mahameed commit d5634fee245f9e92787e3a34ef621fc12b2cbf16 Author: Paul Blakey Date: Thu Sep 20 12:17:48 2018 +0200 net/mlx5: Add a no-append flow insertion mode If no-append flag is set, we will add a new FTE, instead of appending the actions of the inserted rule when the same match already exists. While here, move the has_flow_tag boolean indicator to be a flag too. This patch doesn't change any functionality. Signed-off-by: Paul Blakey Reviewed-by: Or Gerlitz Reviewed-by: Mark Bloch Signed-off-by: Saeed Mahameed commit e52c2802400831389c773bc5bb119ab4b96fde3b Author: Paul Blakey Date: Tue Jul 3 12:14:30 2018 +0300 net/mlx5: E-Switch, Add chains and priorities A chain is a group of priorities, so use the fdb parallel sub namespaces to implement chains, and a flow table for each priority in them. Because these namespaces are parallel and in series to the slow path fdb, the chains aren't connected to one another (but to the slow path), and one must use a explicit goto action to reach a different chain. Flow tables for the priorities will be created on demand and destroyed once not used. The Firmware has four pools of tables for sizes S/XS/M/L (4k, 64k, 1m, 4m). We maintain ghost copies of the pools occupancy. When a new table is to be created, we scan the pools from large to small and find the 1st table size which can be now created. When a table is destroyed, we update the relevant pool. Multi chain/prio isn't enabled yet by this patch, for now all flows will use the default chain 0, and prio 1. Signed-off-by: Paul Blakey Reviewed-by: Or Gerlitz Signed-off-by: Saeed Mahameed commit 482650069a2b84c9c87ea85b56d7b310c6005c6f Author: Or Gerlitz Date: Thu Sep 20 17:09:57 2018 +0200 net/mlx5: E-Switch, Have explicit API to delete fwd rules Be symmetric with the e-switch API to add rules which has a specific function to add fwd rules which are used as part of vport mirroring. This patch doesn't change any functionality. Signed-off-by: Or Gerlitz Reviewed-by: Paul Blakey Signed-off-by: Saeed Mahameed commit 328edb499f99126946845ece477c9c1afe8631af Author: Paul Blakey Date: Tue Jul 3 11:13:00 2018 +0300 net/mlx5: Split FDB fast path prio to multiple namespaces Towards supporting multi-chains and priorities, split the FDB fast path to multiple namespaces (sub namespaces), each with multiple priorities. This patch adds a new flow steering type, FS_TYPE_PRIO_CHAINS, which is like current FS_TYPE_PRIO, but may contain only namespaces, and those will be in parallel to one another in terms of managing of the flow tables connections inside them. Meaning, while searching for the next or previous flow table to connect for a new table inside such namespace we skip the parallel namespaces in the same level under the FS_TYPE_PRIO_CHAINS prio we originated from. We use this new type for splitting the fast path prio into multiple parallel namespaces, each containing normal prios. The prios inside them (and their tables) will be connected to one another, but not from one parallel namespace to another, instead the last prio in each namespace will be connected to the next prio in the containing FDB namespace, which is the slow path prio. Signed-off-by: Paul Blakey Acked-by: Or Gerlitz Signed-off-by: Saeed Mahameed commit b9aa0ba17af5afa13605eb6ea91f1974da97a2e2 Author: Paul Blakey Date: Thu May 31 11:50:23 2018 +0300 net/mlx5: Add cap bits for multi fdb encap If set, the firmware supports creating of flow tables with encap enabled while VFs are configured, if we already created one (restriction still applies on the first creation). Signed-off-by: Paul Blakey Reviewed-by: Or Gerlitz Signed-off-by: Saeed Mahameed commit a88780a9499a3bc845f4c8c020a006cd4c973070 Author: Roi Dayan Date: Tue May 15 12:08:12 2018 +0300 net/mlx5e: Split TC add rule path for nic vs e-switch Move to have clear separation on the code path to add nic vs e-switch flows. While here we break the code that deals with adding offloaded TC tool to few smaller stages, each on helper function. Besides getting us simpler and readable code, these are pre-steps for being able to have two HW flows serving one SW TC flow for some e-switch use cases. Signed-off-by: Roi Dayan Reviewed-by: Or Gerlitz Signed-off-by: Saeed Mahameed commit c83954abb221718e961802136078ba04d563cf3a Author: Rabie Loulou Date: Sun Oct 15 15:48:41 2017 +0300 net/mlx5e: Change return type of tc add flow functions Refactor the flow add utility functions to return err code instead of rule pointers. This will allow for simpler logic when one tc rule is duplicated to two HW rules in downstream patches. Signed-off-by: Rabie Loulou Signed-off-by: Shahar Klein Reviewed-by: Roi Dayan Reviewed-by: Or Gerlitz Signed-off-by: Saeed Mahameed commit 171c7625bef999848ee6032c6dde96e7330c4d15 Author: Mark Bloch Date: Wed Oct 3 00:03:35 2018 +0000 net/mlx5: Use flow counter IDs and not the wrapping cache object Currently, when a flow rule is created using the FS core layer, the caller has to pass the entire flow counter object and not just the counter HW handle (ID). This requires both the FS core and the caller to have knowledge about the inner implementation of the FS layer flow counters cache and limits the possible users. Move to use the counter ID across the place when dealing with flows. Doing this decoupling, now can we privatize the inner implementation of the flow counters. Signed-off-by: Mark Bloch Reviewed-by: Or Gerlitz Signed-off-by: Saeed Mahameed commit b8aee82250b7d90a32b11ba208656f52dbaca342 Author: Mark Bloch Date: Tue Oct 2 22:57:24 2018 +0000 net/mlx5: E-Switch, Get counters for offloaded flows from callers There's no real reason for the e-switch logic to manage the creation of counters for offloaded flows. The API already has the directive for the caller to denote they want to attach a counter to the created flow. As such, we go and move the management of flow counters to the mlx5e tc offload logic. This also lets us remove an inelegant interface where the FS layer had to provide a way to retrieve a counter from a flow rule. Signed-off-by: Mark Bloch Reviewed-by: Or Gerlitz Signed-off-by: Saeed Mahameed commit 186daf0c20507072e72a3c74db4ac50a5b6dae07 Merge: aadd4355918f 94a04d1d3d36 Author: Saeed Mahameed Date: Wed Oct 17 14:13:36 2018 -0700 Merge branch 'mlx5-next' of git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux into net-next mlx5 updates for both net-next and rdma-next * 'mlx5-next' of git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux: (21 commits) net/mlx5: Expose DC scatter to CQE capability bit net/mlx5: Update mlx5_ifc with DEVX UID bits net/mlx5: Set uid as part of DCT commands net/mlx5: Set uid as part of SRQ commands net/mlx5: Set uid as part of SQ commands net/mlx5: Set uid as part of RQ commands net/mlx5: Set uid as part of QP commands net/mlx5: Set uid as part of CQ commands net/mlx5: Rename incorrect naming in IFC file net/mlx5: Export packet reformat alloc/dealloc functions net/mlx5: Pass a namespace for packet reformat ID allocation net/mlx5: Expose new packet reformat capabilities {net, RDMA}/mlx5: Rename encap to reformat packet net/mlx5: Move header encap type to IFC header file net/mlx5: Break encap/decap into two separated flow table creation flags net/mlx5: Add support for more namespaces when allocating modify header net/mlx5: Export modify header alloc/dealloc functions net/mlx5: Add proper NIC TX steering flow tables support net/mlx5: Cleanup flow namespace getter switch logic net/mlx5: Add memic command opcode to command checker ... Signed-off-by: Saeed Mahameed commit 8e16695b4eb819881774b8c06eb164dc1fb74275 Author: James Zhu Date: Tue Oct 16 10:06:00 2018 -0400 drm/amdgpu/vcn:Fix uninitialized symbol error ret_code should be initialized with 0. The check of read/write ptr should be activate when UVD_POWER_STATUS_TILES is off. Signed-off-by: James Zhu Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 594861215c834e4b59a30d4b794f6372717bc197 Author: Dan Williams Date: Mon Oct 15 12:57:31 2018 -0700 acpi, nfit: Further restrict userspace ARS start requests In addition to not allowing ARS start while the background thread is actively running, prevent ARS start while any scrub request is pending. This aligns the window for ARS start submission with the status of ARS reported via sysfs. Previously userspace could sneak its own ARS start requests in while sysfs reported -EBUSY. Reviewed-by: Dave Jiang Signed-off-by: Dan Williams commit 208983f099d975b5da27907245b4c4ea5146210e Author: Sasha Neftin Date: Thu Oct 11 10:17:36 2018 +0300 igc: Add watchdog Code completion, remove obsolete code Add watchdog methods Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher commit d3abaf43bab8d5b0a3c6b982100d9e2be96de4ad Author: Dan Williams Date: Sat Oct 13 20:32:17 2018 -0700 acpi, nfit: Fix Address Range Scrub completion tracking The Address Range Scrub implementation tried to skip running scrubs against ranges that were already scrubbed by the BIOS. Unfortunately that support also resulted in early scrub completions as evidenced by this debug output from nfit_test: nd_region region9: ARS: range 1 short complete nd_region region3: ARS: range 1 short complete nd_region region4: ARS: range 2 ARS start (0) nd_region region4: ARS: range 2 short complete ...i.e. completions without any indications that the scrub was started. This state of affairs was hard to see in the code due to the proliferation of state bits and mistakenly trying to track done state per-range when the completion is a global property of the bus. So, kill the four ARS state bits (ARS_REQ, ARS_REQ_REDO, ARS_DONE, and ARS_SHORT), and replace them with just 2 request flags ARS_REQ_SHORT and ARS_REQ_LONG. The implementation will still complete and reap the results of BIOS initiated ARS, but it will not attempt to use that information to affect the completion status of scrubbing the ranges from a Linux perspective. Instead, try to synchronously run a short ARS per range at init time and schedule a long scrub in the background. If ARS is busy with an ARS request, schedule both a short and a long scrub for when ARS returns to idle. This logic also satisfies the intent of what ARS_REQ_REDO was trying to achieve. The new rule is that the REQ flag stays set until the next successful ars_start() for that range. With the new policy that the REQ flags are not cleared until the next start, the implementation no longer loses requests as can be seen from the following log: nd_region region3: ARS: range 1 ARS start short (0) nd_region region9: ARS: range 1 ARS start short (0) nd_region region3: ARS: range 1 complete nd_region region4: ARS: range 2 ARS start short (0) nd_region region9: ARS: range 1 complete nd_region region9: ARS: range 1 ARS start long (0) nd_region region4: ARS: range 2 complete nd_region region3: ARS: range 1 ARS start long (0) nd_region region9: ARS: range 1 complete nd_region region3: ARS: range 1 complete nd_region region4: ARS: range 2 ARS start long (0) nd_region region4: ARS: range 2 complete ...note that the nfit_test emulated driver provides 2 buses, that is why some of the range indices are duplicated. Notice that each range now successfully completes a short and long scrub. Cc: Fixes: 14c73f997a5e ("nfit, address-range-scrub: introduce nfit_spa->ars_state") Fixes: cc3d3458d46f ("acpi/nfit: queue issuing of ars when an uc error...") Reported-by: Jacek Zloch Reported-by: Krzysztof Rusocki Reviewed-by: Dave Jiang Signed-off-by: Dan Williams commit f366d322aea782cf786aa821d5accdc1609f9e10 Author: David Howells Date: Thu Sep 6 10:19:30 2018 +0100 UAPI: ndctl: Remove use of PAGE_SIZE The macro PAGE_SIZE isn't valid outside of the kernel, so it should not appear in UAPI headers. Furthermore, the actual machine page size could theoretically change from an application's point of view if it's running in a container that gets migrated to another machine (say 4K/ppc64 to 64K/ppc64). Fixes: f2ba5a5baecf ("libnvdimm, namespace: make min namespace size 4K") Signed-off-by: David Howells Signed-off-by: Dan Williams commit 4eb8080143a9d9fd513bacc65b2466c57983aaae Author: Sasha Neftin Date: Thu Oct 11 10:17:34 2018 +0300 igc: Add setup link functionality Add link establishment methods Add auto negotiation methods Add read MAC address method Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher commit 9607871f37dc3e717639694b8d0dc738f2a68efc Author: David Howells Date: Thu Sep 6 10:19:24 2018 +0100 UAPI: ndctl: Fix g++-unsupported initialisation in headers The following code in the linux/ndctl header file: static inline const char *nvdimm_bus_cmd_name(unsigned cmd) { static const char * const names[] = { [ND_CMD_ARS_CAP] = "ars_cap", [ND_CMD_ARS_START] = "ars_start", [ND_CMD_ARS_STATUS] = "ars_status", [ND_CMD_CLEAR_ERROR] = "clear_error", [ND_CMD_CALL] = "cmd_call", }; if (cmd < ARRAY_SIZE(names) && names[cmd]) return names[cmd]; return "unknown"; } is broken in a number of ways: (1) ARRAY_SIZE() is not generally defined. (2) g++ does not support "non-trivial" array initialisers fully yet. (3) Every file that calls this function will acquire a copy of names[]. The same goes for nvdimm_cmd_name(). Fix all three by converting to a switch statement where each case returns a string. That way if cmd is a constant, the compiler can trivially reduce it and, if not, the compiler can use a shared lookup table if it thinks that is more efficient. A better way would be to remove these functions and their arrays from the header entirely. Signed-off-by: David Howells Signed-off-by: Dan Williams commit 5586838fe9ced0980e210b39d635ff3842297448 Author: Sasha Neftin Date: Thu Oct 11 10:17:31 2018 +0300 igc: Add code for PHY support Add PHY's ID support Add support for initialization, acquire and release of PHY Enable register access Signed-off-by: Sasha Neftin Signed-off-by: Alexander Duyck Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher commit ab4056126813c889ee6c8fb24ca8f75b84c981ab Author: Sasha Neftin Date: Thu Oct 11 10:17:28 2018 +0300 igc: Add NVM support Add code for NVM support and get MAC address, complete probe method. Signed-off-by: Sasha Neftin Signed-off-by: Alexander Duyck Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher commit c0071c7aa5fe0a6aa4cfc8426af893307ccd276d Author: Sasha Neftin Date: Thu Oct 11 10:17:26 2018 +0300 igc: Add HW initialization code Add code for hardware initialization and reset Add code for semaphore handling Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher commit 0507ef8a0372b80c30555bbeec7215f2cf874ecd Author: Sasha Neftin Date: Thu Oct 11 10:17:22 2018 +0300 igc: Add transmit and receive fastpath and interrupt handlers This patch adds support for allocating, configuring, and freeing Tx/Rx ring resources. With these changes in place the descriptor queues are in a state where they are ready to transmit or receive if provided buffers. This also adds the transmit and receive fastpath and interrupt handlers. With this code in place the network device is now able to send and receive frames over the network interface using a single queue. Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher commit 13b5b7fd6a4a96dffe604f25e7b64cfbd9520924 Author: Sasha Neftin Date: Thu Oct 11 10:17:19 2018 +0300 igc: Add support for Tx/Rx rings This change adds the defines and structures necessary to support both Tx and Rx descriptor rings. Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher commit 3df25e4c1e66a69097bde99990fb095b26125c82 Author: Sasha Neftin Date: Thu Oct 11 10:17:16 2018 +0300 igc: Add interrupt support This patch set adds interrupt support for the igc interfaces. Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher commit 77612720a2362230af726baa4149c40ec7a7fb05 Author: Sricharan R Date: Tue Aug 14 17:42:31 2018 +0530 clk: qcom: Add safe switch hook for krait mux clocks When the Hfplls are reprogrammed during the rate change, the primary muxes which are sourced from the same hfpll for higher frequencies, needs to be switched to the 'safe secondary mux' as the parent for that small window. This is done by registering a clk notifier for the muxes and switching to the safe parent in the PRE_RATE_CHANGE notifier and back to the original parent in the POST_RATE_CHANGE notifier. Signed-off-by: Sricharan R Tested-by: Craig Tatlor Signed-off-by: Stephen Boyd commit bf4503ccf321811192cb07f9711556237c3cf668 Author: Stephen Boyd Date: Tue Aug 14 17:42:30 2018 +0530 dt-bindings: clock: Document qcom,krait-cc The Krait clock controller controls the krait CPU and the L2 clocks consisting a primary mux and secondary mux. Add document for that. Reviewed-by: Rob Herring Signed-off-by: Stephen Boyd Signed-off-by: Sricharan R Tested-by: Craig Tatlor Signed-off-by: Stephen Boyd commit bb5c4a85051e5e0be39c775b6df85521f2ae807d Author: Stephen Boyd Date: Tue Aug 14 17:42:29 2018 +0530 clk: qcom: Add Krait clock controller driver The Krait CPU clocks are made up of a primary mux and secondary mux for each CPU and the L2, controlled via cp15 accessors. For Kraits within KPSSv1 each secondary mux accepts a different aux source, but on KPSSv2 each secondary mux accepts the same aux source. Cc: Signed-off-by: Stephen Boyd Signed-off-by: Sricharan R Tested-by: Craig Tatlor Signed-off-by: Stephen Boyd commit 40e5ddf4f84869815129551f4a8cfc2c223ebeae Author: Stephen Boyd Date: Tue Aug 14 17:42:28 2018 +0530 dt-bindings: arm: Document qcom,kpss-gcc The ACC and GCC regions present in KPSSv1 contain registers to control clocks and power to each Krait CPU and L2. Documenting the bindings here. Reviewed-by: Rob Herring Signed-off-by: Stephen Boyd Signed-off-by: Sricharan R Tested-by: Craig Tatlor Signed-off-by: Stephen Boyd commit 3ddc3564d3c9f097986bd4ccbe34152413811335 Author: Stephen Boyd Date: Tue Aug 14 17:42:27 2018 +0530 clk: qcom: Add KPSS ACC/GCC driver The ACC and GCC regions present in KPSSv1 contain registers to control clocks and power to each Krait CPU and L2. For CPUfreq purposes probe these devices and expose a mux clock that chooses between PXO and PLL8. Cc: Signed-off-by: Stephen Boyd Signed-off-by: Sricharan R Tested-by: Craig Tatlor Signed-off-by: Stephen Boyd commit 4d7dc77babfef1d6cb8fd825e2f17dc3384c3272 Author: Stephen Boyd Date: Tue Aug 14 17:42:26 2018 +0530 clk: qcom: Add support for Krait clocks The Krait clocks are made up of a series of muxes and a divider that choose between a fixed rate clock and dedicated HFPLLs for each CPU. Instead of using mmio accesses to remux parents, the Krait implementation exposes the remux control via cp15 registers. Support these clocks. Signed-off-by: Stephen Boyd Signed-off-by: Sricharan R Tested-by: Craig Tatlor [sboyd@kernel.org: Move hidden config to top outside of the visible qcom config zone so that menuconfig looks nice] Signed-off-by: Stephen Boyd commit 1f79131bfd512f322c16b58dca581ce39beafab9 Author: Stephen Boyd Date: Tue Aug 14 17:42:25 2018 +0530 clk: qcom: Add IPQ806X's HFPLLs Describe the HFPLLs present on IPQ806X devices. Signed-off-by: Stephen Boyd Signed-off-by: Sricharan R Tested-by: Craig Tatlor Signed-off-by: Stephen Boyd commit 72ad7207954dd622a662ba884dc6c30a820123f2 Author: Stephen Boyd Date: Tue Aug 14 17:42:24 2018 +0530 clk: qcom: Add MSM8960/APQ8064's HFPLLs Describe the HFPLLs present on MSM8960 and APQ8064 devices. Acked-by: Rob Herring (bindings) Signed-off-by: Stephen Boyd Signed-off-by: Sricharan R Tested-by: Craig Tatlor Signed-off-by: Stephen Boyd commit 1f924faa8b1e4789ecc06ed0dd58ca3487c89012 Author: Stephen Boyd Date: Tue Aug 14 17:42:23 2018 +0530 dt-bindings: clock: Document qcom,hfpll Adds bindings document for qcom,hfpll instantiated within the Krait processor subsystem as separate register region. Reviewed-by: Rob Herring Signed-off-by: Stephen Boyd Signed-off-by: Sricharan R Tested-by: Craig Tatlor Signed-off-by: Stephen Boyd commit cb546b797a0da4dbb1a0c76a2a357921887b6189 Author: Stephen Boyd Date: Tue Aug 14 17:42:22 2018 +0530 clk: qcom: Add HFPLL driver On some devices (MSM8974 for example), the HFPLLs are instantiated within the Krait processor subsystem as separate register regions. Add a driver for these PLLs so that we can provide HFPLL clocks for use by the system. Cc: Signed-off-by: Stephen Boyd Signed-off-by: Sricharan R Tested-by: Craig Tatlor Signed-off-by: Stephen Boyd commit b3f2f10693aadeacf83ab5be03810941a4b77612 Author: Stephen Boyd Date: Tue Aug 14 17:42:21 2018 +0530 clk: qcom: Add support for High-Frequency PLLs (HFPLLs) HFPLLs are the main frequency source for Krait CPU clocks. Add support for changing the rate of these PLLs. Signed-off-by: Stephen Boyd Signed-off-by: Sricharan R Tested-by: Craig Tatlor Signed-off-by: Stephen Boyd commit 36d68f64c411e09788687d5919886aadeb92adca Author: Stephen Boyd Date: Tue Aug 14 17:42:20 2018 +0530 ARM: Add Krait L2 register accessor functions Krait CPUs have a handful of L2 cache controller registers that live behind a cp15 based indirection register. First you program the indirection register (l2cpselr) to point the L2 'window' register (l2cpdr) at what you want to read/write. Then you read/write the 'window' register to do what you want. The l2cpselr register is not banked per-cpu so we must lock around accesses to it to prevent other CPUs from re-pointing l2cpdr underneath us. Cc: Mark Rutland Cc: Russell King Acked-by: Bjorn Andersson Signed-off-by: Stephen Boyd Signed-off-by: Sricharan R Tested-by: Craig Tatlor Signed-off-by: Stephen Boyd commit c9a11c23ceb65db7ecc5735e7428311d70e74ba9 Author: Sasha Neftin Date: Thu Oct 11 10:17:13 2018 +0300 igc: Add netdev Now that we have the ability to configure the basic settings on the device we can start allocating and configuring a netdev for the interface. Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher commit 146740f9abc4976e4f0af1aa302efee1c699d2e4 Author: Sasha Neftin Date: Thu Oct 11 10:17:10 2018 +0300 igc: Add support for PF This patch adds the basic defines and structures needed by the PF for operation. With this it is possible to bring up the interface, but without being able to configure any of the filters on the interface itself. Add skeleton for a function pointers. Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher commit d89f88419f999f03af2282789f2d2eea6468c00a Author: Sasha Neftin Date: Thu Oct 11 10:17:08 2018 +0300 igc: Add skeletal frame for Intel(R) 2.5G Ethernet Controller support This patch adds the beginning framework onto which I am going to add the igc driver which supports the Intel(R) I225-LM/I225-V 2.5G Ethernet Controller. Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher commit a27ee74d0d51697ce1664faefc5834fade4fef49 Author: Sergei Shtylyov Date: Tue Oct 16 22:22:05 2018 +0300 spi: sh-msiof: document R8A779{7|8}0 bindings Document the R-Car V3{M|H} (R8A779{7|8}0) SoCs in the Renesas MSIOF bindings. Signed-off-by: Sergei Shtylyov Reviewed-by: Simon Horman Signed-off-by: Mark Brown commit 2eaa6e233091f51d8a629e423ad0bc080ffcb5d6 Author: Kuninori Morimoto Date: Wed Oct 17 01:55:57 2018 +0000 ASoC: rsnd: tidyup SSICR::SWSP for TDM R-Car datasheet is indicating that WS output settings of SSICR::SWSP is inverted on TDM mode from non TDM mode settings. But, it is meaning that TDM should use 0 here. Without this patch, sound input/output 1ch will be 2ch, 2ch will be 3ch ..., be jumbled on I2S + TDM settings. This patch fixup it. 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 6817d7593f3e3c8a9c11e7a07cb5646c70371f0a Author: Kuninori Morimoto Date: Wed Oct 17 01:55:37 2018 +0000 ASoC: rsnd: enable TDM settings for SSI parent Some SSIs are sharing each pins (= WS/CLK pin for playback/capture). Then, SSI parent needs control WS/CLK setting for SSI slave. In such case, SSI parent needs TDM settings if SSI slave is working as TDM mode. But it is not cared in current driver. It can't capture TDM sound without this patch if SSIs were pin sharing. This patch is tested on R-Car H3 ulcb-kf board, SSI3/4 with TDM sound. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit 4e9e07c5675706983ed649cfb92521a4d8aa1d6d Author: Kuninori Morimoto Date: Wed Oct 17 01:54:33 2018 +0000 ASoC: pcm3168a: add hw constraint for capture channel LEFT_J / I2S only can use TDM. commit 594680ea4a394 ("ASoC: pcm3168a: add hw constraint for channel") commit 3809688980205 ("ASoC: pcm3168a: add HW constraint for non RIGHT_J") added channel constraint for it, but, it was only for playback. This patch adds constraint for capture. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit fce9ec954a8af7e04cbf5b9daa8bec9c1df5cfe6 Author: Daniel Mack Date: Wed Oct 17 13:37:03 2018 +0200 ASoC: sta32x: Add support for XTI clock The STA32x chips feature an XTI clock input that needs to be stable before the reset signal is released. Therefore, the chip driver needs to get a handle to the clock. Instead of relying on other parts of the system to enable the clock, let the codec driver grab a handle itself. In order to keep existing boards working, clock support is made optional. Signed-off-by: Daniel Mack Signed-off-by: Mark Brown commit 1e3cb6c321be2e5295dcaa94c2bf42a43a47a067 Author: David Lin Date: Fri Sep 28 11:10:04 2018 +0800 ASoC: nau8822: new codec driver Add driver for NAU88C22. Signed-off-by: David Lin Signed-off-by: Mark Brown commit a85227da2dcc291b762c8482a505bc7d0d2d4b07 Author: Marcel Ziswiler Date: Tue Oct 16 12:47:29 2018 +0200 ASoC: tegra_sgtl5000: fix device_node refcounting Similar to the following: commit 4321723648b0 ("ASoC: tegra_alc5632: fix device_node refcounting") commit 7c5dfd549617 ("ASoC: tegra: fix device_node refcounting") Signed-off-by: Marcel Ziswiler Acked-by: Jon Hunter Signed-off-by: Mark Brown commit 885882a493c5c53b70bb71c920dc8a3d3ee006c6 Author: Lubomir Rintel Date: Wed Oct 10 18:38:24 2018 +0200 dt-bindings: Add OLPC vendor prefix One Laptop Per Child is a non-profit that produced the XO series of eductional laptops for children. Signed-off-by: Lubomir Rintel Signed-off-by: Rob Herring commit 341ce3563e52d6adc69095f65d57d2c9b8c68a65 Author: Anson Huang Date: Fri Aug 31 15:53:17 2018 +0800 clk: imx6q: add mmdc0 ipg clock i.MX6Q has MMDC0 ipg clock in CCM CCGR, add it into clock tree for clock management. Signed-off-by: Anson Huang Reviewed-by: Rob Herring Signed-off-by: Stephen Boyd commit 09d47620d0f839bc4bf3d3061aabee0c9539407a Author: Anson Huang Date: Fri Aug 31 15:53:16 2018 +0800 clk: imx6sl: add mmdc ipg clocks i.MX6SL has MMDC0 and MMDC1 ipg clock in CCM CCGR, add them into clock tree for clock management. Signed-off-by: Anson Huang Reviewed-by: Rob Herring Signed-off-by: Stephen Boyd commit aac7ff2048a881975fceb41ae6545730dee310d2 Author: Anson Huang Date: Fri Aug 31 15:53:15 2018 +0800 clk: imx6sll: add mmdc1 ipg clock i.MX6SLL has MMDC1 ipg clock in CCM CCGR, add it into clock tree for clock management. Signed-off-by: Anson Huang Reviewed-by: Rob Herring Signed-off-by: Stephen Boyd commit 891f30bf603ba49ac1cf1778fedef4e9d4ee3483 Author: Anson Huang Date: Fri Aug 31 15:53:14 2018 +0800 clk: imx6sx: add mmdc1 ipg clock i.MX6SX has MMDC1 ipg clock in CCM CCGR, add it into clock tree for clock management. Signed-off-by: Anson Huang Reviewed-by: Rob Herring Signed-off-by: Stephen Boyd commit acc4f98d44bfc7cccfcb866e991db755f2062e6f Author: Anson Huang Date: Fri Aug 31 15:53:13 2018 +0800 clk: imx6ul: add mmdc1 ipg clock i.MX6UL has MMDC1 ipg clock in CCM CCGR, add it into clock tree for clock management. Signed-off-by: Anson Huang Reviewed-by: Rob Herring Signed-off-by: Stephen Boyd commit f110176633d74bbac1f80ab9b9c6b83ea3e1cc23 Author: Dan Williams Date: Wed Oct 17 10:47:19 2018 -0700 tools/testing/nvdimm: Populate dirty shutdown data Allow the unit tests to verify the retrieval of the dirty shutdown count via smart commands, and allow the driver-load-time retrieval of the smart health payload to be simulated by nfit_test. Reviewed-by: Keith Busch Signed-off-by: Dan Williams commit 62061d357c7f40dad558414895a182e70391513f Author: Alexandre Belloni Date: Tue Oct 16 16:21:53 2018 +0200 clk: at91: move DT compatibility code to its own file Move all the DT backward compatibility code to its own file so it can be deleted later. Signed-off-by: Alexandre Belloni Signed-off-by: Stephen Boyd commit ecd0bf3377c809c98d69c8bc989344f085980bed Author: Alexandre Belloni Date: Tue Oct 16 16:21:52 2018 +0200 clk: at91: add at91sam9rl PMC driver Add a driver for the PMC clocks of the at91sam9rl SoC. Signed-off-by: Alexandre Belloni [sboyd@kernel.org: Make i signed to fix signedness bug] Signed-off-by: Stephen Boyd commit 1eabdc2f9dd8f1bca1b985fd2b1243be836b30ad Author: Alexandre Belloni Date: Tue Oct 16 16:21:51 2018 +0200 clk: at91: add at91sam9x5 PMCs driver Add a driver for the PMC clocks of the at91sam9x5 SoCs Signed-off-by: Alexandre Belloni [sboyd@kernel.org: Make i signed to fix signedness bug] Signed-off-by: Stephen Boyd commit c8923236a2894cc4b27010639e98e1a3086c0987 Author: Alexandre Belloni Date: Tue Oct 16 16:21:50 2018 +0200 clk: at91: add at91sam9260 PMC driver Add a driver for the PMC clocks of the at91sam9260, at91sam9261, at91am9263 and at91sam9g20 SoCs. Signed-off-by: Alexandre Belloni [sboyd@kernel.org: Make i signed to fix signedness bug] Signed-off-by: Stephen Boyd commit a2038077de9a9e35f14a72612e2885193d4490d4 Author: Alexandre Belloni Date: Tue Oct 16 16:21:49 2018 +0200 clk: at91: add sama5d2 PMC driver Add a driver for the PMC clocks of the sama5d2 Signed-off-by: Alexandre Belloni [sboyd@kernel.org: Make i signed to fix signedness bug] Signed-off-by: Stephen Boyd commit 084b696bb509d5943d94e282a4e349426ac85dc6 Author: Alexandre Belloni Date: Tue Oct 16 16:21:48 2018 +0200 clk: at91: add sama5d4 pmc driver Add a driver for the PMC clocks of the sama5d4 Signed-off-by: Alexandre Belloni [sboyd@kernel.org: Make i signed to fix signedness bug] Signed-off-by: Stephen Boyd commit d387ff5427be6b93e11986c6ab6d7a8e6031e976 Author: Alexandre Belloni Date: Tue Oct 16 16:21:47 2018 +0200 clk: at91: add new DT lookup function Add a new DT lookup function to lookup for PMC clocks. Note that the #ifndef AT91_PMC_MOSCS section will be removed once all the platforms are converted. Signed-off-by: Alexandre Belloni Acked-by: Rob Herring Signed-off-by: Stephen Boyd commit d425ad81eacda2df98f063c4ca93b0f5a4690206 Author: Alexandre Belloni Date: Tue Oct 16 16:21:46 2018 +0200 dt-bindings: clk: at91: Document new PMC binding Document the new PMC binding with only one PMC node for all the PMC clocks instead of one node per clock as this proved to be problematic. Reviewed-by: Rob Herring Signed-off-by: Alexandre Belloni Signed-off-by: Stephen Boyd commit b00cd8e41979267e067ad858b62b5e8b1b94c945 Author: Alexandre Belloni Date: Tue Oct 16 16:21:45 2018 +0200 clk: at91: add pmc_data struct and helpers Add a new strut to handle references to all the PMC clocks and implement allocation/free helpers. Signed-off-by: Alexandre Belloni Signed-off-by: Stephen Boyd commit b2e39dc0bb8107341f6f704472e79fd32d0cef25 Author: Alexandre Belloni Date: Tue Oct 16 16:21:44 2018 +0200 clk: at91: allow clock registration from C code Remove static keyword to allow functions to be used from other units. Also move some struct and function declarations to pmc.h Signed-off-by: Alexandre Belloni [sboyd@kernel.org: Include pmc.h] Signed-off-by: Stephen Boyd commit c1e4580a1d0ff510d56268c1fc7fcfeec366fe70 Author: Alexandre Belloni Date: Tue Oct 16 16:21:43 2018 +0200 clk: at91: generated: set audio_pll_allowed in at91_clk_register_generated() Set gck->audio_pll_allowed in at91_clk_register_generated. This makes it easier to do it from code that is not parsing device tree. Also, this fixes an issue where the resulting clk_hw can be dereferenced before being tested for error. Fixes: 1a1a36d72e3d ("clk: at91: clk-generated: make gclk determine audio_pll rate") Signed-off-by: Alexandre Belloni Signed-off-by: Stephen Boyd commit 08979ee55a9f2983265bc46b237576fc7986d56d Author: Alexandre Belloni Date: Tue Oct 16 16:21:42 2018 +0200 clk: at91: audio-pll: separate registration from DT parsing Separate registration out of of_sama5d2_clk_audio_pll*_setup to allow other code to use it. Signed-off-by: Alexandre Belloni [sboyd@kernel.org: Include pmc.h] Signed-off-by: Stephen Boyd commit 0ead11181fe0c9538b185e46a494df21dc7de23a Author: Dan Williams Date: Wed Sep 26 10:47:15 2018 -0700 acpi, nfit: Collect shutdown status Some NVDIMMs, in addition to providing an indication of whether the previous shutdown was clean, also provide a running count of lifetime dirty-shutdown events for the device. In anticipation of this functionality appearing on more devices arrange for the nfit driver to retrieve / cache this data at DIMM discovery time, and export it via sysfs. Reviewed-by: Keith Busch Signed-off-by: Dan Williams commit da5a3ce66b8bb51b0ea8a89f42aac153903f90fb Author: Mark Rutland Date: Wed Oct 17 17:42:10 2018 +0100 KVM: arm64: Fix caching of host MDCR_EL2 value At boot time, KVM stashes the host MDCR_EL2 value, but only does this when the kernel is not running in hyp mode (i.e. is non-VHE). In these cases, the stashed value of MDCR_EL2.HPMN happens to be zero, which can lead to CONSTRAINED UNPREDICTABLE behaviour. Since we use this value to derive the MDCR_EL2 value when switching to/from a guest, after a guest have been run, the performance counters do not behave as expected. This has been observed to result in accesses via PMXEVTYPER_EL0 and PMXEVCNTR_EL0 not affecting the relevant counters, resulting in events not being counted. In these cases, only the fixed-purpose cycle counter appears to work as expected. Fix this by always stashing the host MDCR_EL2 value, regardless of VHE. Cc: Christopher Dall Cc: James Morse Cc: Will Deacon Cc: stable@vger.kernel.org Fixes: 1e947bad0b63b351 ("arm64: KVM: Skip HYP setup when already running in HYP") Tested-by: Robin Murphy Signed-off-by: Mark Rutland Signed-off-by: Marc Zyngier commit 0a9df0df17a011fa4d17277a8c8dd662668c6426 Author: Lu Fengqi Date: Mon Oct 15 14:25:38 2018 +0800 btrfs: delayed-ref: extract find_first_ref_head from find_ref_head The find_ref_head shouldn't return the first entry even if no exact match is found. So move the hidden behavior to higher level. Besides, remove the useless local variables in the btrfs_select_ref_head. Reviewed-by: Nikolay Borisov Signed-off-by: Lu Fengqi [ reformat comment ] Signed-off-by: David Sterba commit c6925093d0b28329ad3a486f5b0345c2c192ae9a Author: Logan Gunthorpe Date: Thu Oct 4 15:27:47 2018 -0600 nvmet: Optionally use PCI P2P memory Create a configfs attribute in each nvme-fabrics namespace to enable P2P memory use. The attribute may be enabled (with a boolean) or a specific P2P device may be given (with the device's PCI name). When enabled, the namespace will ensure the underlying block device supports P2P and is compatible with any specified P2P device. If no device was specified it will ensure there is compatible P2P memory somewhere in the system. Enabling a namespace with P2P memory will fail with EINVAL (and an appropriate dmesg error) if any of these conditions are not met. Once a controller is set up on a specific port, the P2P device to use for each namespace will be found and stored in a radix tree by namespace ID. When memory is allocated for a request, the tree is used to look up the P2P device to allocate memory against. If no device is in the tree (because no appropriate device was found), or if allocation of P2P memory fails, fall back to using regular memory. Signed-off-by: Stephen Bates Signed-off-by: Steve Wise [hch: partial rewrite of the initial code] Signed-off-by: Christoph Hellwig Signed-off-by: Logan Gunthorpe Signed-off-by: Bjorn Helgaas commit 5b2322e48c978fd91d50873491b1c3b0a3b0266b Author: Logan Gunthorpe Date: Thu Oct 4 15:27:46 2018 -0600 nvmet: Introduce helper functions to allocate and free request SGLs Add helpers to allocate and free the SGL in a struct nvmet_req: int nvmet_req_alloc_sgl(struct nvmet_req *req) void nvmet_req_free_sgl(struct nvmet_req *req) This will be expanded in a future patch to implement peer-to-peer memory DMAs and should be common with all target drivers. The new helpers are used in nvmet-rdma. Seeing we use req.transfer_len as the length of the SGL it is set earlier and cleared on any error. It also seems to be unnecessary to accumulate the length as the map_sgl functions should only ever be called once per request. Signed-off-by: Logan Gunthorpe Signed-off-by: Bjorn Helgaas Reviewed-by: Christoph Hellwig Acked-by: Sagi Grimberg commit e0596ab2900dfa64c0538e4aef8eec3c6f0f38eb Author: Logan Gunthorpe Date: Thu Oct 4 15:27:44 2018 -0600 nvme-pci: Add support for P2P memory in requests For P2P requests, we must use the pci_p2pmem_map_sg() function instead of the dma_map_sg functions. With that, we can then indicate PCI_P2P support in the request queue. For this, we create an NVME_F_PCI_P2P flag which tells the core to set QUEUE_FLAG_PCI_P2P in the request queue. Signed-off-by: Logan Gunthorpe Signed-off-by: Bjorn Helgaas Reviewed-by: Sagi Grimberg Reviewed-by: Christoph Hellwig Reviewed-by: Keith Busch commit 0f238ff5cc92554fe8ddc6c3776386f31a4d38fa Author: Logan Gunthorpe Date: Thu Oct 4 15:27:43 2018 -0600 nvme-pci: Use PCI p2pmem subsystem to manage the CMB Register the CMB buffer as p2pmem and use the appropriate allocation functions to create and destroy the IO submission queues. If the CMB supports WDS and RDS, publish it for use as P2P memory by other devices. Kernels without CONFIG_PCI_P2PDMA will also no longer support NVMe CMB. However, seeing the main use-cases for the CMB is P2P operations, this seems like a reasonable dependency. We drop the __iomem safety on the buffer seeing that, by convention, it's safe to directly access memory mapped by memremap()/devm_memremap_pages(). Architectures where this is not safe will not be supported by memremap() and therefore will not support PCI P2P and have no support for CMB. Signed-off-by: Logan Gunthorpe Signed-off-by: Bjorn Helgaas Reviewed-by: Keith Busch Reviewed-by: Christoph Hellwig commit 50b7d22079f74571a0fa73420586a7ad1ffebe2f Author: Logan Gunthorpe Date: Thu Oct 4 15:27:42 2018 -0600 IB/core: Ensure we map P2P memory correctly in rdma_rw_ctx_[init|destroy]() In order to use PCI P2P memory the pci_p2pmem_map_sg() function must be called to map the correct PCI bus address. To do this, check the first page in the scatter list to see if it is P2P memory or not. At the moment, scatter lists that contain P2P memory must be homogeneous so if the first page is P2P the entire SGL should be P2P. Signed-off-by: Logan Gunthorpe Signed-off-by: Bjorn Helgaas Reviewed-by: Christoph Hellwig Reviewed-by: Sagi Grimberg commit 49d92c0dd64ae769c2d67fe27ac260ae31259ba6 Author: Logan Gunthorpe Date: Thu Oct 4 15:27:41 2018 -0600 block: Add PCI P2P flag for request queue Add QUEUE_FLAG_PCI_P2P, meaning a driver's request queue supports targeting P2P memory. This will be used by P2P providers and orchestrators (in subsequent patches) to ensure block devices can support P2P memory before submitting P2P-backed pages to submit_bio(). Signed-off-by: Logan Gunthorpe Signed-off-by: Bjorn Helgaas Reviewed-by: Christoph Hellwig Acked-by: Jens Axboe commit e4f7a9480337543efaae137536ed686d0cd48ff7 Author: Logan Gunthorpe Date: Thu Oct 4 15:27:40 2018 -0600 PCI/P2PDMA: Add P2P DMA driver writer's documentation Add a restructured text file describing how to write drivers with support for P2P DMA transactions. The document describes how to use the APIs that were added in the previous few commits. Also adds an index for the PCI documentation tree even though this is the only PCI document that has been converted to restructured text at this time. Signed-off-by: Logan Gunthorpe Signed-off-by: Bjorn Helgaas Cc: Jonathan Corbet commit fcc78f9c22474d60c65d522e50ea07006ec1b9fc Author: Logan Gunthorpe Date: Thu Oct 4 15:27:39 2018 -0600 docs-rst: Add a new directory for PCI documentation Add a new directory in the driver API guide for PCI-specific documentation. This is in preparation for adding a new PCI P2P DMA driver writers guide which will go in this directory. Signed-off-by: Logan Gunthorpe Signed-off-by: Bjorn Helgaas Cc: Jonathan Corbet Cc: Mauro Carvalho Chehab Cc: Greg Kroah-Hartman Cc: Vinod Koul Cc: Linus Walleij Cc: Logan Gunthorpe Cc: Thierry Reding Cc: Sanyog Kale Cc: Sagar Dharia commit 2d7bc010f450d803db9fed1a25da6144ff6140d3 Author: Logan Gunthorpe Date: Thu Oct 4 15:27:38 2018 -0600 PCI/P2PDMA: Introduce configfs/sysfs enable attribute helpers Users of the P2PDMA infrastructure will typically need a way for the user to tell the kernel to use P2P resources. Typically this will be a simple on/off boolean operation but sometimes it may be desirable for the user to specify the exact device to use for the P2P operation. Add new helpers for attributes which take a boolean or a PCI device. Any boolean as accepted by strtobool() turn P2P on or off (such as 'y', 'n', '1', '0', etc). Specifying a full PCI device name/BDF will select the specific device. Signed-off-by: Logan Gunthorpe Signed-off-by: Bjorn Helgaas Reviewed-by: Christoph Hellwig commit 977196b8c5b20b901acb0042579e30d7fa55790a Author: Logan Gunthorpe Date: Thu Oct 4 15:27:37 2018 -0600 PCI/P2PDMA: Add PCI p2pmem DMA mappings to adjust the bus offset The DMA address used when mapping PCI P2P memory must be the PCI bus address. Thus, introduce pci_p2pmem_map_sg() to map the correct addresses when using P2P memory. Memory mapped in this way does not need to be unmapped and thus if we provided pci_p2pmem_unmap_sg() it would be empty. This breaks the expected balance between map/unmap but was left out as an empty function doesn't really provide any benefit. In the future, if this call becomes necessary it can be added without much difficulty. For this, we assume that an SGL passed to these functions contain all P2P memory or no P2P memory. Signed-off-by: Logan Gunthorpe Signed-off-by: Bjorn Helgaas Reviewed-by: Christoph Hellwig commit cbb8ca69fcbb2c82f70abcbb75b6ea8579236210 Author: Logan Gunthorpe Date: Thu Oct 4 15:27:36 2018 -0600 PCI/P2PDMA: Add sysfs group to display p2pmem stats Add a sysfs group to display statistics about P2P memory that is registered in each PCI device. Attributes in the group display the total amount of P2P memory, the amount available and whether it is published or not. Signed-off-by: Logan Gunthorpe Signed-off-by: Bjorn Helgaas Reviewed-by: Christoph Hellwig commit 1e58e5e59148916fa43444a406335a990783fb78 Author: Paolo Bonzini Date: Wed Oct 17 00:55:22 2018 +0200 KVM: VMX: enable nested virtualization by default With live migration support and finally a good solution for exception event injection, nested VMX should be ready for having a stable userspace ABI. The results of syzkaller fuzzing are not perfect but not horrible either (and might be partially due to running on GCE, so that effectively we're testing three-level nesting on a fork of upstream KVM!). Enabling it by default seems like a nice way to conclude the 4.20 pull request. :) Unfortunately, enabling nested SVM in 2009 (commit 4b6e4dca701) was a bit premature. However, until live migration support is in place we can reasonably expect that it does not offer much in terms of ABI guarantees. Therefore we are still in time to break things and conform as much as possible to the interface used for VMX. Suggested-by: Jim Mattson Suggested-by: Liran Alon Reviewed-by: Liran Alon Celebrated-by: Liran Alon Celebrated-by: Wanpeng Li Celebrated-by: Wincy Van Signed-off-by: Paolo Bonzini commit 43ce76ce731ff7f9cff51124fee738018c18a864 Author: Uros Bizjak Date: Wed Oct 17 16:46:57 2018 +0200 KVM/x86: Use 32bit xor to clear registers in svm.c x86_64 zero-extends 32bit xor operation to a full 64bit register. Also add a comment and remove unnecessary instruction suffix in vmx.c Signed-off-by: Uros Bizjak Signed-off-by: Paolo Bonzini commit c4f55198c7c2b87909b166ffc2f6b68d9af6766c Author: Jim Mattson Date: Tue Oct 16 14:29:24 2018 -0700 kvm: x86: Introduce KVM_CAP_EXCEPTION_PAYLOAD This is a per-VM capability which can be enabled by userspace so that the faulting linear address will be included with the information about a pending #PF in L2, and the "new DR6 bits" will be included with the information about a pending #DB in L2. With this capability enabled, the L1 hypervisor can now intercept #PF before CR2 is modified. Under VMX, the L1 hypervisor can now intercept #DB before DR6 and DR7 are modified. When userspace has enabled KVM_CAP_EXCEPTION_PAYLOAD, it should generally provide an appropriate payload when injecting a #PF or #DB exception via KVM_SET_VCPU_EVENTS. However, to support restoring old checkpoints, this payload is not required. Note that bit 16 of the "new DR6 bits" is set to indicate that a debug exception (#DB) or a breakpoint exception (#BP) occurred inside an RTM region while advanced debugging of RTM transactional regions was enabled. This is the reverse of DR6.RTM, which is cleared in this scenario. This capability also enables exception.pending in struct kvm_vcpu_events, which allows userspace to distinguish between pending and injected exceptions. Reported-by: Jim Mattson Suggested-by: Paolo Bonzini Signed-off-by: Jim Mattson Signed-off-by: Paolo Bonzini commit f10c729ff965283d2086aa03d139dcf82da86a96 Author: Jim Mattson Date: Tue Oct 16 14:29:23 2018 -0700 kvm: vmx: Defer setting of DR6 until #DB delivery When exception payloads are enabled by userspace (which is not yet possible) and a #DB is raised in L2, defer the setting of DR6 until later. Under VMX, this allows the L1 hypervisor to intercept the fault before DR6 is modified. Under SVM, DR6 is modified before L1 can intercept the fault (as has always been the case with DR7). Note that the payload associated with a #DB exception includes only the "new DR6 bits." When the payload is delievered, DR6.B0-B3 will be cleared and DR6.RTM will be set prior to merging in the new DR6 bits. Also note that bit 16 in the "new DR6 bits" is set to indicate that a debug exception (#DB) or a breakpoint exception (#BP) occurred inside an RTM region while advanced debugging of RTM transactional regions was enabled. Though the reverse of DR6.RTM, this makes the #DB payload field compatible with both the pending debug exceptions field under VMX and the exit qualification for #DB exceptions under VMX. Reported-by: Jim Mattson Suggested-by: Paolo Bonzini Signed-off-by: Jim Mattson Signed-off-by: Paolo Bonzini commit da998b46d244767505e41d050dcac5e4d03ba96f Author: Jim Mattson Date: Tue Oct 16 14:29:22 2018 -0700 kvm: x86: Defer setting of CR2 until #PF delivery When exception payloads are enabled by userspace (which is not yet possible) and a #PF is raised in L2, defer the setting of CR2 until the #PF is delivered. This allows the L1 hypervisor to intercept the fault before CR2 is modified. For backwards compatibility, when exception payloads are not enabled by userspace, kvm_multiple_exception modifies CR2 when the #PF exception is raised. Reported-by: Jim Mattson Suggested-by: Paolo Bonzini Signed-off-by: Jim Mattson Signed-off-by: Paolo Bonzini commit 91e86d225ef3da80d33a8fd7695316c31c0810c9 Author: Jim Mattson Date: Tue Oct 16 14:29:21 2018 -0700 kvm: x86: Add payload operands to kvm_multiple_exception kvm_multiple_exception now takes two additional operands: has_payload and payload, so that updates to CR2 (and DR6 under VMX) can be delayed until the exception is delivered. This is necessary to properly emulate VMX or SVM hardware behavior for nested virtualization. The new behavior is triggered by vcpu->kvm->arch.exception_payload_enabled, which will (later) be set by a new per-VM capability, KVM_CAP_EXCEPTION_PAYLOAD. Reported-by: Jim Mattson Suggested-by: Paolo Bonzini Signed-off-by: Jim Mattson Signed-off-by: Paolo Bonzini commit 59073aaf6de0d2dacc2603cee6d1d6cd5592ac08 Author: Jim Mattson Date: Tue Oct 16 14:29:20 2018 -0700 kvm: x86: Add exception payload fields to kvm_vcpu_events The per-VM capability KVM_CAP_EXCEPTION_PAYLOAD (to be introduced in a later commit) adds the following fields to struct kvm_vcpu_events: exception_has_payload, exception_payload, and exception.pending. With this capability set, all of the details of vcpu->arch.exception, including the payload for a pending exception, are reported to userspace in response to KVM_GET_VCPU_EVENTS. With this capability clear, the original ABI is preserved, and the exception.injected field is set for either pending or injected exceptions. When userspace calls KVM_SET_VCPU_EVENTS with KVM_CAP_EXCEPTION_PAYLOAD clear, exception.injected is no longer translated to exception.pending. KVM_SET_VCPU_EVENTS can now only establish a pending exception when KVM_CAP_EXCEPTION_PAYLOAD is set. Reported-by: Jim Mattson Suggested-by: Paolo Bonzini Signed-off-by: Jim Mattson Signed-off-by: Paolo Bonzini commit 61170a9373ee3cc8e86b033a34d71c16c13473c5 Author: Alexandre Belloni Date: Tue Oct 16 16:21:41 2018 +0200 clk: at91: h32mx: separate registration from DT parsing Separate registration out of of_sama5d4_clk_h32mx_setup to allow other code to use it. Signed-off-by: Alexandre Belloni Signed-off-by: Stephen Boyd commit 6d631027b807cf2721dd38de4711a2528a5e0008 Author: Alexandre Belloni Date: Tue Oct 16 16:21:40 2018 +0200 clk: at91: generated: SSCs don't have a gclk As the SSCs don't have gclk, don't check for their ID to allow them to set the audio pll rate. Signed-off-by: Alexandre Belloni Signed-off-by: Stephen Boyd commit 7fa75007b7d7421aea59ff2b12ab1bd65a5abfa6 Author: Alexandre Belloni Date: Tue Oct 16 16:21:39 2018 +0200 clk: at91: audio-pll: fix audio pmc type The allocation for the audio pmc is using the size of struct clk_audio_pad instead of struct clk_audio_pmc. This works fine because the former is larger than the latter but it is safer to be correct. Fixes: ("0865805d82d4 clk: at91: add audio pll clock drivers") Signed-off-by: Alexandre Belloni Signed-off-by: Stephen Boyd commit 4917fb90eec7c26dac1497ada3bd4a325f670fcc Author: Lubomir Rintel Date: Mon Sep 10 14:01:44 2018 +0200 clk: mmp2: fix the clock id for sdh2_clk and sdh3_clk A typo that makes it impossible to get the correct clocks for MMP2_CLK_SDH2 and MMP2_CLK_SDH3. Signed-off-by: Lubomir Rintel Fixes: 1ec770d92a62 ("clk: mmp: add mmp2 DT support for clock driver") Signed-off-by: Stephen Boyd commit a60109dc9a954ef9eddba6577e2d2e9e7952e487 Author: Yonatan Cohen Date: Wed Oct 10 09:25:16 2018 +0300 IB/mlx5: Add support for extended atomic operations Extended atomic operations cmp&swp and fetch&add is a Mellanox feature extending the standard atomic operation to use, varied operand sizes, as apposed to normal atomic operation that use an 8 byte operand only. Extended atomics allows masking the results and arguments. This patch configures QP to support extended atomic operation with the maximum size possible, as exposed by HCA capabilities. Signed-off-by: Yonatan Cohen Reviewed-by: Guy Levi Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford commit 5ce555578e0919237fa4bda92b4670e2dd176f85 Author: Filipe Manana Date: Fri Oct 12 10:03:55 2018 +0100 Btrfs: fix deadlock when writing out free space caches When writing out a block group free space cache we can end deadlocking with ourselves on an extent buffer lock resulting in a warning like the following: [245043.379979] WARNING: CPU: 4 PID: 2608 at fs/btrfs/locking.c:251 btrfs_tree_lock+0x1be/0x1d0 [btrfs] [245043.392792] CPU: 4 PID: 2608 Comm: btrfs-transacti Tainted: G W I 4.16.8 #1 [245043.395489] RIP: 0010:btrfs_tree_lock+0x1be/0x1d0 [btrfs] [245043.396791] RSP: 0018:ffffc9000424b840 EFLAGS: 00010246 [245043.398093] RAX: 0000000000000a30 RBX: ffff8807e20a3d20 RCX: 0000000000000001 [245043.399414] RDX: 0000000000000001 RSI: 0000000000000002 RDI: ffff8807e20a3d20 [245043.400732] RBP: 0000000000000001 R08: ffff88041f39a700 R09: ffff880000000000 [245043.402021] R10: 0000000000000040 R11: ffff8807e20a3d20 R12: ffff8807cb220630 [245043.403296] R13: 0000000000000001 R14: ffff8807cb220628 R15: ffff88041fbdf000 [245043.404780] FS: 0000000000000000(0000) GS:ffff88082fc80000(0000) knlGS:0000000000000000 [245043.406050] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [245043.407321] CR2: 00007fffdbdb9f10 CR3: 0000000001c09005 CR4: 00000000000206e0 [245043.408670] Call Trace: [245043.409977] btrfs_search_slot+0x761/0xa60 [btrfs] [245043.411278] btrfs_insert_empty_items+0x62/0xb0 [btrfs] [245043.412572] btrfs_insert_item+0x5b/0xc0 [btrfs] [245043.413922] btrfs_create_pending_block_groups+0xfb/0x1e0 [btrfs] [245043.415216] do_chunk_alloc+0x1e5/0x2a0 [btrfs] [245043.416487] find_free_extent+0xcd0/0xf60 [btrfs] [245043.417813] btrfs_reserve_extent+0x96/0x1e0 [btrfs] [245043.419105] btrfs_alloc_tree_block+0xfb/0x4a0 [btrfs] [245043.420378] __btrfs_cow_block+0x127/0x550 [btrfs] [245043.421652] btrfs_cow_block+0xee/0x190 [btrfs] [245043.422979] btrfs_search_slot+0x227/0xa60 [btrfs] [245043.424279] ? btrfs_update_inode_item+0x59/0x100 [btrfs] [245043.425538] ? iput+0x72/0x1e0 [245043.426798] write_one_cache_group.isra.49+0x20/0x90 [btrfs] [245043.428131] btrfs_start_dirty_block_groups+0x102/0x420 [btrfs] [245043.429419] btrfs_commit_transaction+0x11b/0x880 [btrfs] [245043.430712] ? start_transaction+0x8e/0x410 [btrfs] [245043.432006] transaction_kthread+0x184/0x1a0 [btrfs] [245043.433341] kthread+0xf0/0x130 [245043.434628] ? btrfs_cleanup_transaction+0x4e0/0x4e0 [btrfs] [245043.435928] ? kthread_create_worker_on_cpu+0x40/0x40 [245043.437236] ret_from_fork+0x1f/0x30 [245043.441054] ---[ end trace 15abaa2aaf36827f ]--- This is because at write_one_cache_group() when we are COWing a leaf from the extent tree we end up allocating a new block group (chunk) and, because we have hit a threshold on the number of bytes reserved for system chunks, we attempt to finalize the creation of new block groups from the current transaction, by calling btrfs_create_pending_block_groups(). However here we also need to modify the extent tree in order to insert a block group item, and if the location for this new block group item happens to be in the same leaf that we were COWing earlier, we deadlock since btrfs_search_slot() tries to write lock the extent buffer that we locked before at write_one_cache_group(). We have already hit similar cases in the past and commit d9a0540a79f8 ("Btrfs: fix deadlock when finalizing block group creation") fixed some of those cases by delaying the creation of pending block groups at the known specific spots that could lead to a deadlock. This change reworks that commit to be more generic so that we don't have to add similar logic to every possible path that can lead to a deadlock. This is done by making __btrfs_cow_block() disallowing the creation of new block groups (setting the transaction's can_flush_pending_bgs to false) before it attempts to allocate a new extent buffer for either the extent, chunk or device trees, since those are the trees that pending block creation modifies. Once the new extent buffer is allocated, it allows creation of pending block groups to happen again. This change depends on a recent patch from Josef which is not yet in Linus' tree, named "btrfs: make sure we create all new block groups" in order to avoid occasional warnings at btrfs_trans_release_chunk_metadata(). Fixes: d9a0540a79f8 ("Btrfs: fix deadlock when finalizing block group creation") CC: stable@vger.kernel.org # 4.4+ Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=199753 Link: https://lore.kernel.org/linux-btrfs/CAJtFHUTHna09ST-_EEiyWmDH6gAqS6wa=zMNMBsifj8ABu99cw@mail.gmail.com/ Reported-by: E V Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit 7ed586d0a8241e81d58c656c5b315f781fa6fc97 Author: Filipe Manana Date: Mon Oct 15 09:51:00 2018 +0100 Btrfs: fix assertion on fsync of regular file when using no-holes feature When using the NO_HOLES feature and logging a regular file, we were expecting that if we find an inline extent, that either its size in RAM (uncompressed and unenconded) matches the size of the file or if it does not, that it matches the sector size and it represents compressed data. This assertion does not cover a case where the length of the inline extent is smaller than the sector size and also smaller the file's size, such case is possible through fallocate. Example: $ mkfs.btrfs -f -O no-holes /dev/sdb $ mount /dev/sdb /mnt $ xfs_io -f -c "pwrite -S 0xb60 0 21" /mnt/foobar $ xfs_io -c "falloc 40 40" /mnt/foobar $ xfs_io -c "fsync" /mnt/foobar In the above example we trigger the assertion because the inline extent's length is 21 bytes while the file size is 80 bytes. The fallocate() call merely updated the file's size and did not touch the existing inline extent, as expected. So fix this by adjusting the assertion so that an inline extent length smaller than the file size is valid if the file size is smaller than the filesystem's sector size. A test case for fstests follows soon. Reported-by: Anatoly Trosinenko Fixes: a89ca6f24ffe ("Btrfs: fix fsync after truncate when no_holes feature is enabled") CC: stable@vger.kernel.org # 4.14+ Link: https://lore.kernel.org/linux-btrfs/CAE5jQCfRSBC7n4pUTFJcmHh109=gwyT9mFkCOL+NKfzswmR=_Q@mail.gmail.com/ Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit 76d865b87c327b34c0e24f23e75828878022f899 Author: Parav Pandit Date: Wed Oct 17 13:21:08 2018 +0300 RDMA/core: Fix comment for hw stats init for port == 0 When add_port() is done for port == 0, it indicates that ports hardware counters initialization should be skipped. Reflect so in the comment. Signed-off-by: Parav Pandit Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford commit 548cb4fbe80d68b9d1b8b30aca179636e74bec36 Author: Parav Pandit Date: Wed Oct 17 13:20:20 2018 +0300 RDMA/core: Refactor ib_register_device() function ib_register_device() does several allocation and initialization steps. Split it into smaller more readable functions for easy review and maintenance. Signed-off-by: Parav Pandit Reviewed-by: Daniel Jurgens Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford commit 67fecaf8e9cc28812042f61194ac0e0a9737f897 Author: Parav Pandit Date: Wed Oct 17 13:19:27 2018 +0300 RDMA/core: Fix unwinding flow in case of error to register device If port pkey list initialization fails, free the port_immutable memory during cleanup path. Currently it is missed out. If cache setup fails, free the pkey list during cleanup path. Fixes: d291f1a65 ("IB/core: Enforce PKey security on QPs") Signed-off-by: Parav Pandit Reviewed-by: Daniel Jurgens Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford commit 56e027a604c80b1106786f8426e7cc5dbacb53b2 Author: Hannes Reinecke Date: Wed Oct 17 09:20:04 2018 +0200 ib_srp: Remove WARN_ON in srp_terminate_io() The WARN_ON() is pointless as the rport is placed in SDEV_TRANSPORT_OFFLINE at that time, so no new commands can be submitted via srp_queuecommand() Signed-off-by: Hannes Reinecke Reviewed-by: Jens Axboe Reviewed-by: Johannes Thumshirn Acked-by: Bart Van Assche Signed-off-by: Doug Ledford commit 3527a018c00e5dbada2f9d7ed5576437b6dd5cfb Author: Filipe Manana Date: Sat Oct 13 00:37:25 2018 +0100 Btrfs: fix null pointer dereference on compressed write path error At inode.c:compress_file_range(), under the "free_pages_out" label, we can end up dereferencing the "pages" pointer when it has a NULL value. This case happens when "start" has a value of 0 and we fail to allocate memory for the "pages" pointer. When that happens we jump to the "cont" label and then enter the "if (start == 0)" branch where we immediately call the cow_file_range_inline() function. If that function returns 0 (success creating an inline extent) or an error (like -ENOMEM for example) we jump to the "free_pages_out" label and then access "pages[i]" leading to a NULL pointer dereference, since "nr_pages" has a value greater than zero at that point. Fix this by setting "nr_pages" to 0 when we fail to allocate memory for the "pages" pointer. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=201119 Fixes: 771ed689d2cd ("Btrfs: Optimize compressed writeback and reads") CC: stable@vger.kernel.org # 4.4+ Reviewed-by: Liu Bo Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 6956b956934f10c19eca2a1d44f50a3bee860531 Author: Hannes Reinecke Date: Wed Oct 17 17:25:13 2018 +0200 drivers/block: Remove DAC960 driver The DAC960 driver has been obsoleted by the myrb/myrs drivers, so it can be dropped. Signed-off-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 0d09e668b70ba687ed07976a33a09b19e9416488 Author: Anson Huang Date: Wed Oct 17 06:12:04 2018 +0000 clk: imx7d: remove CLK_IS_CRITICAL flag for arm_a7_root_clk i.MX7D uses virtual cpu clock of "arm" clock to be child clock of "arm_a7_root_clk" and it is with CLK_IS_CRITICAL flag set, so no need to add CLK_IS_CRITICAL flag for keeping "arm_a7_root_clk" use count correct, latest clock tree is as below in clk_summary: pll_arm_main 1 1 0 792000000 0 pll_arm_main_bypass 1 1 0 792000000 0 pll_arm_main_clk 1 1 0 792000000 0 arm_a7_src 1 1 0 792000000 0 arm_a7_cg 1 1 0 792000000 0 arm_a7_div 1 1 0 792000000 0 arm_a7_root_clk 1 1 0 792000000 0 arm 1 1 0 792000000 Signed-off-by: Anson Huang Signed-off-by: Stephen Boyd commit ec1893922df19ab69153e21ee4154a937e8a8eeb Author: Anson Huang Date: Wed Oct 17 06:11:59 2018 +0000 clk: imx: cpu clock should be always critical Add CLK_IS_CRITICAL flag for cpu clock type to make cpu clock use count correct, as cpu clock should be always critical. Signed-off-by: Anson Huang Signed-off-by: Stephen Boyd commit 6f4bc0ea682b59d7013cbc5ced2d4dd73067a33f Author: Yonatan Cohen Date: Tue Oct 9 12:05:15 2018 +0300 IB/mlx5: Allow scatter to CQE without global signaled WRs Requester scatter to CQE is restricted to QPs configured to signal all WRs. This patch adds ability to enable scatter to cqe (force enable) in the requester without sig_all, for users who do not want all WRs signaled but rather just the ones whose data found in the CQE. Signed-off-by: Yonatan Cohen Reviewed-by: Guy Levi Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford commit 2e43bb31b8df662f591a7e80270ca3acda44bb48 Author: Yonatan Cohen Date: Tue Oct 9 12:05:14 2018 +0300 IB/mlx5: Verify that driver supports user flags Flags sent down from user might not be supported by running driver. This might lead to unwanted bugs. To solve this, added macro to test for unsupported flags. Signed-off-by: Yonatan Cohen Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford commit 5d6ff1babe78034f0cf8e5f7bf312a257e5574cc Author: Yonatan Cohen Date: Tue Oct 9 12:05:13 2018 +0300 IB/mlx5: Support scatter to CQE for DC transport type Scatter to CQE is a HW offload that saves PCI writes by scattering the payload to the CQE. This patch extends already existing functionality to support DC transport type. Signed-off-by: Yonatan Cohen Reviewed-by: Guy Levi Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford commit 5a8336d99a81ae7492d41b5a13dc2717b0d39565 Merge: 508a523f6bc6 94a04d1d3d36 Author: Doug Ledford Date: Wed Oct 17 11:23:37 2018 -0400 Merge remote-tracking branch 'mlx5-next' into for-next Pick up changes to mlx5_ifc.h needed for direct Scatter to CQE support series to come next. Signed-off-by: Doug Ledford commit 3847dab77421867fbc77faacb2f377d44e729e1b Author: Helge Deller Date: Tue Oct 16 22:38:22 2018 +0200 parisc: Add alternative coding infrastructure This patch adds the necessary code to patch a running kernel at runtime to improve performance. The current implementation offers a few optimizations variants: - When running a SMP kernel on a single UP processor, unwanted assembler statements like locking functions are overwritten with NOPs. When multiple instructions shall be skipped, one branch instruction is used instead of multiple nop instructions. - In the UP case, some pdtlb and pitlb instructions are patched to become pdtlb,l and pitlb,l which only flushes the CPU-local tlb entries instead of broadcasting the flush to other CPUs in the system and thus may improve performance. - fic and fdc instructions are skipped if no I- or D-caches are installed. This should speed up qemu emulation and cacheless systems. - If no cache coherence is needed for IO operations, the relevant fdc and sync instructions in the sba and ccio drivers are replaced by nops. - On systems which share I- and D-TLBs and thus don't have a seperate instruction TLB, the pitlb instruction is replaced by a nop. Live-patching is done early in the boot process, just after having run the system inventory. No drivers are running and thus no external interrupts should arrive. So the hope is that no TLB exceptions will occur during the patching. If this turns out to be wrong we will probably need to do the patching in real-mode. Signed-off-by: Helge Deller commit 031337ace2d1c22a447da6390716fe92592cdd6e Author: Honghui Zhang Date: Mon Oct 15 16:08:59 2018 +0800 PCI: mediatek: Add loadable kernel module support Implement remove() callback function for the Mediatek PCIe controller driver to add loadable kernel module support. Save the PCIe's GIC IRQ at probe so that it can be retrieved to call dispose_irq() to tear down the IRQ upon module removal. Signed-off-by: Honghui Zhang [lorenzo.pieralisi@arm.com: updated commit log] Signed-off-by: Lorenzo Pieralisi Reviewed-by: Ryder Lee commit 97d2932fee4b0607bad4f71a8d2c0938f596b1c3 Author: Honghui Zhang Date: Mon Oct 15 16:08:58 2018 +0800 PCI: mediatek: Add system PM support for MT2712 and MT7622 In order to reduce the PCIe power consumption in system suspend, the PCI bus physical layer should be gated. On system resume, the PCIe link should be re-established and the related control register values should be restored. Define suspend_noirq & resume_noirq callback functions to implement PM system syspend hooks for the PCI host controller. Signed-off-by: Honghui Zhang [lorenzo.pieralisi@arm.com: updated commit log] Signed-off-by: Lorenzo Pieralisi Acked-by: Ryder Lee commit 3828d60fd2ef99f97a677c1f95af2ab3e65e2576 Author: Honghui Zhang Date: Mon Oct 15 16:08:56 2018 +0800 PCI: mediatek: Fixup MSI enablement logic by enabling MSI before clocks Commit 43e6409db64d ("PCI: mediatek: Add MSI support for MT2712 and MT7622") added MSI support but enabled MSI in the wrong place, at a step in the probe sequence where clocks were not still enabled. Fix this issue by calling mtk_pcie_enable_msi() in mtk_pcie_startup_port_v2() since clocks are enabled when mtk_pcie_startup_port_v2() is called. To avoid forward declaration of mtk_pcie_enable_msi(), move the mtk_pcie_startup_port_v2() function definition in the file. Fixes: 43e6409db64d ("PCI: mediatek: Add MSI support for MT2712 and MT7622") Signed-off-by: Honghui Zhang [lorenzo.pieralisi@arm.com: squashed commit and adapted log] Signed-off-by: Lorenzo Pieralisi Acked-by: Ryder Lee commit 57cb3152b360eabf30d498515dcf9049f3c7b9df Author: Honghui Zhang Date: Mon Oct 15 16:08:55 2018 +0800 PCI: mediatek: Convert to use pci_host_probe() Part of mtk_pcie_register_host() is an open-coded version of pci_host_probe(). So instead of duplicating this code, use pci_host_probe() directly and remove mtk_pcie_register_host(). Signed-off-by: Honghui Zhang [lorenzo.pieralisi@arm.com: commit log changes] Signed-off-by: Lorenzo Pieralisi Acked-by: Ryder Lee commit 88c0e230bb4a79680ee5f05ddba879d436f98f13 Author: Honghui Zhang Date: Mon Oct 15 16:08:54 2018 +0800 PCI: mediatek: Remove the redundant dev->pm_domain check There is no need to check whether device have a PM domain attached before calling the PM runtime methods. Remove it. Signed-off-by: Honghui Zhang [lorenzo.pieralisi@arm.com: commit log changes] Signed-off-by: Lorenzo Pieralisi Acked-by: Ryder Lee commit 665636b2940d0897c4130253467f5e8c42eea392 Author: Enric Balletbo i Serra Date: Tue Oct 16 15:41:44 2018 +0200 clk: rockchip: Fix static checker warning in rockchip_ddrclk_get_parent call Fixes the signedness bug returning '(-22)' on the return type by removing the sanity checker in rockchip_ddrclk_get_parent(). The function should return and unsigned value only and it's safe to remove the sanity checker as the core functions that call get_parent like clk_core_get_parent_by_index already ensures the validity of the clk index returned (index >= core->num_parents). Fixes: a4f182bf81f18 ("clk: rockchip: add new clock-type for the ddrclk") Cc: stable@vger.kernel.org Signed-off-by: Enric Balletbo i Serra Reviewed-by: Stephen Boyd Signed-off-by: Heiko Stuebner commit 0e8afefd5da4875ddea9aa4ad17a2540a2bf9736 Author: Hans de Goede Date: Fri Oct 12 12:16:10 2018 +0200 drm: panel-orientation-quirks: Add quirk for Acer One 10 (S1003) The Acer One 10 uses a clamshell design with a detachable keyboard. As such in normal operating mode, with the keyboard attach the device is in landscape mode (and the Acer logo at boot also shows in landscape mode). But the device uses a portrait screen rotated 90 degrees (sigh). This commit adds a quirk for this device so that we shown the fbcon the right way up and that we hint userspace to also show e.g. plymouth and gdm the right way up. Cc: stable@vger.kernel.org Acked-by: Daniel Vetter Signed-off-by: Hans de Goede Link: https://patchwork.freedesktop.org/patch/msgid/20181012101610.29100-1-hdegoede@redhat.com commit ec506e9246bf42795f1fa8a5cd00740e5686ba73 Author: Christoph Hellwig Date: Sat Oct 13 17:17:02 2018 +0200 spi: pic32-sqi: don't pass GFP_DMA32 to dma_alloc_coherent The DMA API does its own zone decisions based on the coherent_dma_mask. Signed-off-by: Christoph Hellwig Signed-off-by: Mark Brown commit 7e95aac96b554193760aaeb64e263da58127bf27 Author: Vasily Khoruzhick Date: Wed Oct 17 00:38:10 2018 -0700 ASoC: sunxi: allow the sun8i-codec driver to be built on ARM64 Allwinner A64 uses the same digital codec part as in A33, so we need to build this driver on ARM64 as well. Signed-off-by: Vasily Khoruzhick Acked-by: Maxime Ripard Signed-off-by: Mark Brown commit 42371f327df0b8e9d479b929c5cd301846dd0f70 Author: Vasily Khoruzhick Date: Wed Oct 17 00:38:09 2018 -0700 ASoC: sunxi: Add new driver for Allwinner A64 codec's analog path controls The internal codec on A64 is split into 2 parts. The analog path controls are routed through an embedded custom register bus accessed through the PRCM block. Add an ASoC component driver for it. This should be tied to the codec audio card as an auxiliary device. Signed-off-by: Vasily Khoruzhick Acked-by: Maxime Ripard Signed-off-by: Mark Brown commit af2c06c41970eb0110a03696fd7f8f07854719db Author: Vasily Khoruzhick Date: Wed Oct 17 00:38:08 2018 -0700 ASoC: dt-binding: Add bindings for Allwinner A64 codec's analog path controls The internal codec on Allwinner A64 is split into 2 parts. The analog path controls are routed through an embedded custom register bus accessed through the PRCM block just as on A23/A33/H3. Add a binding for this hardware. Signed-off-by: Vasily Khoruzhick Acked-by: Maxime Ripard Signed-off-by: Mark Brown commit 55b407f6468c481edc4a26b21c9f567ae57f01a4 Author: Vasily Khoruzhick Date: Wed Oct 17 00:38:07 2018 -0700 ASoC: sun8i-codec-analog: split regmap code into separate driver It will be reused by sun50i-codec-analog later. Signed-off-by: Vasily Khoruzhick Acked-by: Maxime Ripard Signed-off-by: Mark Brown commit 13c3bf174becfb8b55adcfeb6f01724dc99347f0 Author: Vasily Khoruzhick Date: Wed Oct 17 00:38:06 2018 -0700 ASoC: sun8i-codec: Don't hardcode BCLK / LRCK ratio BCLK / LRCK ratio should be sample size * channels, but it was hardcoded to 32 (0x1 is 32 as per A33 and A64 datasheets). Calculate it basing on sample size and number of channels. Signed-off-by: Vasily Khoruzhick Acked-by: Maxime Ripard Signed-off-by: Mark Brown commit 66ecce3325383c8304063e7d5a30f4374ef5a33e Author: Marcus Cooper Date: Wed Oct 17 00:38:05 2018 -0700 ASoC: sun4i-i2s: Add compatibility with A64 codec I2S The I2S block used for the audio codec in the A64 differs from other 3 I2S modules in A64 and isn't compatible with H3. But it is very similar to what is found in A10(sun4i). However, its TX FIFO is located at a different address. Signed-off-by: Marcus Cooper Signed-off-by: Vasily Khoruzhick Acked-by: Maxime Ripard Signed-off-by: Mark Brown commit 3b991038498bc5011b063d6a804503c577a79434 Author: Christoph Hellwig Date: Sat Oct 13 17:17:04 2018 +0200 ASoC: intel: don't pass GFP_DMA32 to dma_alloc_coherent The DMA API does its own zone decisions based on the coherent_dma_mask. Signed-off-by: Christoph Hellwig Reviewed-by: Takashi Iwai Signed-off-by: Mark Brown commit 508a523f6bc6cdfbf7031d66559d4ad24956b741 Author: Parav Pandit Date: Thu Oct 11 22:31:54 2018 +0300 RDMA/drivers: Use core provided API for registering device attributes Use rdma_set_device_sysfs_group() to register device attributes and simplify the driver. Signed-off-by: Parav Pandit Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 261de72f0169fd9e5bf7113ad9b52e8678f2fdf0 Author: Kishon Vijay Abraham I Date: Wed Oct 17 13:11:14 2018 +0530 PCI: keystone: Cleanup macros defined in pci-keystone.c No functional change. Cleanup macros defined in pci-keystone.c by removing unused macros, grouping the macros and aligning it properly. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Lorenzo Pieralisi commit c0b8558648c29a86c036de89fc3cc7909587aefd Author: Kishon Vijay Abraham I Date: Wed Oct 17 13:11:13 2018 +0530 PCI: keystone: Reorder header file in alphabetical order No functional change. Reorder header file in alphabetical order. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Lorenzo Pieralisi commit daaaa665ca01753da1b557323702f13c26f7c552 Author: Kishon Vijay Abraham I Date: Wed Oct 17 13:11:12 2018 +0530 PCI: keystone: Add debug error message for all errors commit 025dd3daeda77f61a280da87ae701 ("PCI: keystone: Add error IRQ handler") added dev_err() message only for ERR_AXI and ERR_FATAL. Add debug error message for ERR_SYS, ERR_NONFATAL, ERR_CORR and ERR_AER here. While at that avoid using ERR_IRQ_STATUS_RAW and use ERR_IRQ_STATUS instead. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Lorenzo Pieralisi commit 0523cdc6e775494900c878af5f7eb7e90bb03f20 Author: Kishon Vijay Abraham I Date: Wed Oct 17 13:11:11 2018 +0530 PCI: keystone: Use ERR_IRQ_STATUS instead of ERR_IRQ_STATUS_RAW to get interrupt status Use ERR_IRQ_STATUS instead of ERR_IRQ_STATUS_RAW to get interrupt status. ERR_IRQ_STATUS_RAW has the status of the interrupts before masking whereas ERR_IRQ_STATUS has the status of the interrupts after masking. Since all the interrupts are unmasked here, use ERR_IRQ_STATUS. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Lorenzo Pieralisi commit 23fe5bd4be90099e760fe0d00665ab1e465255b3 Author: Kishon Vijay Abraham I Date: Wed Oct 17 13:11:10 2018 +0530 PCI: keystone: Cleanup ks_pcie_link_up() ks_pcie_link_up() uses registers from the designware core to get the status of the link. Move the register defines to pcie-designware.h and cleanup ks_pcie_link_up(). Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Lorenzo Pieralisi commit f9127db9fbadd079c6b88974001cb036057c8afc Author: Kishon Vijay Abraham I Date: Wed Oct 17 13:11:09 2018 +0530 PCI: keystone: Cleanup set_dbi_mode() and get_dbi_mode() No functional change. Use BIT() macro for DBI_CS2 and cleanup set_dbi_mode() and get_dbi_mode(). Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Lorenzo Pieralisi commit e75043ad9792596916ed0e1910b44f34b181c3b7 Author: Kishon Vijay Abraham I Date: Wed Oct 17 13:11:08 2018 +0530 PCI: keystone: Cleanup outbound window configuration Outbound translation window is configured in order to access the PCIe card's MEM space. Cleanup outbound translation configuration here by using BIT() macros, adding a macro for window size and using lower_32_bits/upper_32_bits macros for configuring the 64 bit offset in the outbound translation region. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Lorenzo Pieralisi commit b4f1af8352fda6926831b52caff37709bc895d05 Author: Kishon Vijay Abraham I Date: Wed Oct 17 13:11:07 2018 +0530 PCI: keystone: Get number of outbound windows from DT Instead of having a fixed outbound window count, get the number of outbound windows from the device tree. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Lorenzo Pieralisi commit 44c747af2be7065d5a6417beacbab8f8a52b5556 Author: Kishon Vijay Abraham I Date: Wed Oct 17 13:11:06 2018 +0530 PCI: keystone: Cleanup configuration space access Cleanup configuration space access by removing ks_pcie_cfg_setup() which has an unncessary check of "if (bus == 0)" which will never be the case of *_other_conf() and adding macros for configuring the CFG_SETUP register required for accessing the configuration space of the device. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Lorenzo Pieralisi commit 8047eb55129ababe38dd2f1608c4fdc6d3e75aaf Author: Kishon Vijay Abraham I Date: Wed Oct 17 13:11:05 2018 +0530 PCI: keystone: Invoke runtime PM APIs to enable clock Invoke runtime PM APIs to enable clocks and remove explicit clock enabling using clk_prepare_enable(). Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Lorenzo Pieralisi commit 49229238ab47fa1852a89ee55d1e7fb251ee4eb0 Author: Kishon Vijay Abraham I Date: Wed Oct 17 13:11:04 2018 +0530 PCI: keystone: Cleanup PHY handling Cleanup PHY handling by using devm_phy_optional_get() to get PHYs if the PHYs are optional, creating a device link between the PHY device and the controller device and disable PHY on error cases here. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Lorenzo Pieralisi commit b51a625b784aa9cdac4a177560e19f0a0041ce19 Author: Kishon Vijay Abraham I Date: Wed Oct 17 13:11:03 2018 +0530 PCI: keystone: Use SYSCON APIs to get device ID from control module Control module registers should be read using syscon APIs. pci-keystone.c uses platform_get_resource() to get control module registers. Fix it here by using syscon APIs to get device id from control module. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Lorenzo Pieralisi commit 03d178386477cb58031b31efe2403071a01868fd Author: Kishon Vijay Abraham I Date: Wed Oct 17 13:11:02 2018 +0530 dt-bindings: PCI: keystone: Add bindings to get device control module Add bindings to get device control module which has the device id and vendor id to be configured in the keystone PCIe controller. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring commit a1cabd2b42fd7710f75dda4ef504ded9ddae612c Author: Kishon Vijay Abraham I Date: Wed Oct 17 13:11:01 2018 +0530 PCI: keystone: Use uniform function naming convention No functional change. Some function names begin with ks_dw_pcie_* and some function names begin with ks_pcie_*. Modify it so that all function names begin with ks_pcie_*. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Lorenzo Pieralisi commit c81ab80136727e11ad76a601b179d4dc84b08120 Author: Kishon Vijay Abraham I Date: Wed Oct 17 13:11:00 2018 +0530 PCI: keystone: Remove redundant platform_set_drvdata() invocation No functional change. Remove redundant platform_set_drvdata() invocation in ks_pcie_probe(). Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Lorenzo Pieralisi commit b492aca35c982011500377797d2e85b36fffda22 Author: Kishon Vijay Abraham I Date: Wed Oct 17 13:10:59 2018 +0530 PCI: keystone: Merge pci-keystone-dw.c and pci-keystone.c No functional change. Having two different files for keystone PCI driver doesn't serve any purpose. Merge pci-keystone-dw.c and pci-keystone.c into a single pci-keystone.c file and remove pci-keystone.h. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Lorenzo Pieralisi commit 1f79f98f0575521df1a3921f30948b6cd8317ee4 Author: Kishon Vijay Abraham I Date: Wed Oct 17 13:10:58 2018 +0530 PCI: keystone: Remove unused argument from ks_dw_pcie_host_init() No functional change. Remove unused "msi_intc_np" argument from ks_dw_pcie_host_init(). Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Lorenzo Pieralisi commit 2433a182ad9c6b1febac75825cbf81f358fec474 Author: Kishon Vijay Abraham I Date: Wed Oct 17 13:10:57 2018 +0530 PCI: keystone: Do not initiate link training multiple times commit 886bc5ceb5cc3ad4b219502d72 ("PCI: designware: Add generic dw_pcie_wait_for_link()") while adding a generic dw_pcie_wait_for_link() performed a special handling (initiate link training multiple times) for keystone which is not required. This also resulted in unncessarily waiting for more time to establish the link even when no PCI device is connected. Remove it and make it look similar to other dwc based PCIe drivers. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Lorenzo Pieralisi commit 1e10f73e4cb033e73a3f47b0cc6080c0e3cf28f2 Author: Kishon Vijay Abraham I Date: Wed Oct 17 13:10:56 2018 +0530 PCI: keystone: Move dw_pcie_setup_rc() out of ks_pcie_establish_link() No functional change. Move dw_pcie_setup_rc() out of ks_pcie_establish_link() so that ks_pcie_establish_linki() can be used only to start the link. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Lorenzo Pieralisi commit 00a2c4094f8edb07ef03a307c2a5b211e9065165 Author: Kishon Vijay Abraham I Date: Wed Oct 17 13:10:55 2018 +0530 PCI: keystone: Use quirk to set MRRS for PCI host bridge Reuse the already existing quirk to set MRRS for PCI host bridge instead of explicitly setting MRRS in ks_pcie_host_init(). Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Lorenzo Pieralisi commit 148e340c0696369fadbbddc8f4bef801ed247d71 Author: Kishon Vijay Abraham I Date: Wed Oct 17 13:10:54 2018 +0530 PCI: keystone: Use quirk to limit MRRS for K2G PCI controller in K2G also has a limitation that memory read request size (MRRS) must not exceed 256 bytes. Use the quirk to limit MRRS (added for K2HK, K2L and K2E) for K2G as well. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Lorenzo Pieralisi commit a3ade38d5a8b101eed7b8ebfd427534404943b8a Author: Christoph Hellwig Date: Sat Oct 13 17:17:00 2018 +0200 cpufreq: tegra186: don't pass GFP_DMA32 to dma_alloc_coherent() The DMA API does its own zone decisions based on the coherent_dma_mask. Signed-off-by: Christoph Hellwig Signed-off-by: Rafael J. Wysocki commit d4122f5abef844112799d2056fdc7bbedbc913f3 Author: Parav Pandit Date: Thu Oct 11 22:31:53 2018 +0300 RDMA/core: Allow existing drivers to set one sysfs group per device Currently many rdma drivers are creating device attribute files using device_create_file() with device specific attributes. Device specific attributes should be exposed via well defined netlink device attributes in future. Introduce an API rdma_set_device_sysfs_group() for existing drivers to set a group for sysfs attributes for legacy. This API is only for exposing legacy attributes which existed for sometime now. New drivers should not be using this API and rather follow netlink path. Signed-off-by: Parav Pandit Reviewed-by: Daniel Jurgens Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit cb4bfda62afa25b4eee3d635d33fccdd9485dd7c Author: Keith Busch Date: Mon Oct 15 10:19:06 2018 -0600 nvme-pci: fix hot removal during error handling A removal waits for the reset_work to complete. If a surprise removal occurs around the same time as an error triggered controller reset, and reset work happened to dispatch a command to the removed controller, the command won't be recovered since the timeout work doesn't do anything during error recovery. We wouldn't want to wait for timeout handling anyway, so this patch fixes this by disabling the controller and killing admin queues prior to syncing with the reset_work. Signed-off-by: Keith Busch Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit 1216e9ef18b84f4fb5934792368fb01eb3540520 Author: Bart Van Assche Date: Wed Oct 10 08:08:20 2018 -0700 nvmet-fcloop: suppress a compiler warning Building with W=1 enables the compiler warning -Wimplicit-fallthrough=3. That option does not recognize the fall-through comment in the fcloop driver. Add a fall-through comment that is recognized for -Wimplicit-fallthrough=3. This patch avoids that the compiler reports the following warning when building with W=1: drivers/nvme/target/fcloop.c:647:6: warning: this statement may fall through [-Wimplicit-fallthrough=] if (op == NVMET_FCOP_READDATA) ^ Signed-off-by: Bart Van Assche Reviewed-by: James Smart Signed-off-by: Christoph Hellwig commit 202359c007f6b1d6247a062c0682d6d5bcd3e7d7 Author: Bart Van Assche Date: Wed Oct 10 08:08:19 2018 -0700 nvme-core: make implicit seed truncation explicit The nvme_user_io.slba field is 64 bits wide. That value is copied into the 32-bit bio_integrity_payload.bip_iter.bi_sector field. Make that truncation explicit to avoid that Coverity complains about implicit truncation. See also Coverity ID 1056486 on http://scan.coverity.com/projects/linux. Signed-off-by: Bart Van Assche Reviewed-by: Keith Busch Signed-off-by: Christoph Hellwig commit 1c4665272ca73335a662a0fb6a9604ec76983756 Author: Bart Van Assche Date: Mon Oct 8 14:28:47 2018 -0700 nvmet-fc: fix kernel-doc headers This patch avoids that the kernel-doc tool complains about two function headers when building with W=1. Signed-off-by: Bart Van Assche Reviewed-by: James Smart Signed-off-by: Christoph Hellwig commit 0d2bdf9f4134582bc7c4b82cb516cb27952127d0 Author: Bart Van Assche Date: Mon Oct 8 14:28:46 2018 -0700 nvme-fc: rework the request initialization code Instead of setting and then clearing the first_sgl pointer for AEN requests, leave that pointer zero. This patch does not change how requests are initialized but avoids that Coverity reports the following complaint for nvme_fc_init_aen_ops(): CID 1418400 (#1 of 1): Out-of-bounds access (OVERRUN) 4. overrun-buffer-val: Overrunning buffer pointed to by aen_op of 312 bytes by passing it to a function which accesses it at byte offset 312. Signed-off-by: Bart Van Assche Reviewed-by: James Smart Signed-off-by: Christoph Hellwig commit d3d0bc78be300098104d9fde9ca1330694a70f45 Author: Bart Van Assche Date: Mon Oct 8 14:28:45 2018 -0700 nvme-fc: introduce struct nvme_fcp_op_w_sgl This patch does not change any functionality but makes the intent of the code more clear. Signed-off-by: Bart Van Assche Reviewed-by: James Smart Signed-off-by: Christoph Hellwig commit 76c910c7cf6d2d325c24439855a606cf1d414d29 Author: Bart Van Assche Date: Mon Oct 8 14:28:44 2018 -0700 nvme-fc: fix kernel-doc headers This patch avoids that the kernel-doc tool complains about several multiple function headers when building with W=1. Signed-off-by: Bart Van Assche Reviewed-by: James Smart Signed-off-by: Christoph Hellwig commit 8eacd1bd21d6913ec27e6120e9a8733352e191d3 Author: Bart Van Assche Date: Mon Oct 8 14:28:52 2018 -0700 nvmet: avoid integer overflow in the discard code Although I'm not sure whether it is a good idea to support large discard commands, I think integer overflow for discard ranges larger than 4 GB should be avoided. This patch avoids that smatch reports the following: drivers/nvme/target/io-cmd-file.c:249:1 nvmet_file_execute_discard() warn: should '((range.nlb)) << req->ns->blksize_shift' be a 64 bit type? Fixes: d5eff33ee6f8 ("nvmet: add simple file backed ns support") Signed-off-by: Bart Van Assche Reviewed-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit 0d3ebdec9394c984f3aa59ea97541f2243952b55 Author: Bart Van Assche Date: Mon Oct 8 14:28:53 2018 -0700 nvmet-rdma: declare local symbols static This patch avoids that sparse complains about missing declarations. Signed-off-by: Bart Van Assche Reviewed-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit 5eadc9cce17100caef88e972abeeeca7ef6d8a92 Author: Bart Van Assche Date: Mon Oct 8 14:28:51 2018 -0700 nvmet: use strlcpy() instead of strcpy() Although the code modified by this patch looks fine to me, this patch avoids that Coverity reports the following complaint (ID 1364971 and ID 1364973): "You might overrun the 256-character fixed-size string id->subnqn". Signed-off-by: Bart Van Assche Reviewed-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit 40581d1a91a1527e1e15350e479156810a389a96 Author: Bart Van Assche Date: Mon Oct 8 14:28:43 2018 -0700 nvme-pci: fix nvme_suspend_queue() kernel-doc header This patch avoids that the kernel-doc tool complains about the nvme_suspend_queue() function header when building with W=1. Signed-off-by: Bart Van Assche Reviewed-by: Keith Busch Signed-off-by: Christoph Hellwig commit bb2a1d4e804aa41eef0003a192a674f844dbca23 Author: Bart Van Assche Date: Mon Oct 8 14:28:41 2018 -0700 nvme-core: rework a NQN copying operation Although it is easy to see that the code in nvme_init_subnqn() guarantees that the subsys->nqn string is '\0'-terminated, apparently Coverity is not smart enough to see this. Make it easier for Coverity to analyze this code by changing the strncpy() call into a strlcpy() call. This patch does not change the behavior of the code but fixes Coveritiy ID 1423720. Signed-off-by: Bart Van Assche Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig commit eb090c4c948ccc7a051451261cf1426edf83f3eb Author: Bart Van Assche Date: Mon Oct 8 14:28:39 2018 -0700 nvme-core: declare local symbols static This patch avoids that sparse complains about missing declarations. Signed-off-by: Bart Van Assche Reviewed-by: Chaitanya Kulkarni Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig commit 35da77d556c17980f9bd6892828a70d7a1a8a145 Author: Bart Van Assche Date: Mon Oct 8 14:28:54 2018 -0700 nvmet-rdma: check for timeout in nvme_rdma_wait_for_cm() Check whether queue->cm_error holds a value before reading it. This patch addresses Coverity ID 1373774: unchecked return value. Signed-off-by: Bart Van Assche Signed-off-by: Christoph Hellwig commit 43a6f8fb619730fe5989e2430669626b2b5e13a0 Author: Bart Van Assche Date: Mon Oct 8 14:28:49 2018 -0700 nvmet: use strcmp() instead of strncmp() for subsystem lookup 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. Since that is the case in nvmet_find_get_subsys(), change strncmp() into strcmp(). This patch avoids that the following warning is reported by smatch: drivers/nvme/target/core.c:940:1 nvmet_find_get_subsys() error: strncmp() '"nqn.2014-08.org.nvmexpress.discovery"' too small (37 vs 223) Signed-off-by: Bart Van Assche Signed-off-by: Christoph Hellwig commit 48440ab6dc275a3144474e8c5f45fab854d6e20f Author: Chaitanya Kulkarni Date: Wed Aug 22 19:58:45 2018 -0700 nvmet: remove unreachable code Get rid of the unreachable code in the nvmet_parse_discovery_cmd(). Keep the error message identical to the admin-cmd.c and io-cmd*.c Signed-off-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit 886fabf693263e8651c0c4ab84fc626ad6d3a6e7 Author: Keith Busch Date: Fri Oct 5 09:49:37 2018 -0600 nvme: update node paths after adding new path The nvme namespace paths were being updated only when the current path was not set or nonoptimized. If a new path comes online that is a better path for its NUMA node, the multipath selector may continue using the previously set path on a potentially further node. This patch re-runs the path assignment after successfully adding a new optimized path. Signed-off-by: Keith Busch Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit b3569d3a4b4fe93ee33eaa3c69ec3ed2cd3b276a Author: Bartlomiej Zolnierkiewicz Date: Tue Oct 16 15:42:16 2018 +0200 x86/kconfig: Remove redundant 'default n' lines from all x86 Kconfig's '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 Cc: Boris Ostrovsky Cc: Borislav Petkov Cc: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: xen-devel@lists.xenproject.org Link: http://lkml.kernel.org/r/20181016134217eucas1p2102984488b89178a865162553369025b%7EeGpI5NlJo0851008510eucas1p2D@eucas1p2.samsung.com Signed-off-by: Ingo Molnar commit 0fa809ca7f81c47bea6706bc689e941eb25d7e89 Author: Waiman Long Date: Tue Oct 16 09:45:07 2018 -0400 locking/pvqspinlock: Extend node size when pvqspinlock is configured The qspinlock code supports up to 4 levels of slowpath nesting using four per-CPU mcs_spinlock structures. For 64-bit architectures, they fit nicely in one 64-byte cacheline. For para-virtualized (PV) qspinlocks it needs to store more information in the per-CPU node structure than there is space for. It uses a trick to use a second cacheline to hold the extra information that it needs. So PV qspinlock needs to access two extra cachelines for its information whereas the native qspinlock code only needs one extra cacheline. Freshly added counter profiling of the qspinlock code, however, revealed that it was very rare to use more than two levels of slowpath nesting. So it doesn't make sense to penalize PV qspinlock code in order to have four mcs_spinlock structures in the same cacheline to optimize for a case in the native qspinlock code that rarely happens. Extend the per-CPU node structure to have two more long words when PV qspinlock locks are configured to hold the extra data that it needs. As a result, the PV qspinlock code will enjoy the same benefit of using just one extra cacheline like the native counterpart, for most cases. [ mingo: Minor changelog edits. ] Signed-off-by: Waiman Long Cc: Andrew Morton Cc: Linus Torvalds Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Will Deacon Link: http://lkml.kernel.org/r/1539697507-28084-2-git-send-email-longman@redhat.com Signed-off-by: Ingo Molnar commit 1222109a53637f96c581224198b86856d503f892 Author: Waiman Long Date: Tue Oct 16 09:45:06 2018 -0400 locking/qspinlock_stat: Count instances of nested lock slowpaths Queued spinlock supports up to 4 levels of lock slowpath nesting - user context, soft IRQ, hard IRQ and NMI. However, we are not sure how often the nesting happens. So add 3 more per-CPU stat counters to track the number of instances where nesting index goes to 1, 2 and 3 respectively. On a dual-socket 64-core 128-thread Zen server, the following were the new stat counter values under different circumstances: State slowpath index1 index2 index3 ----- -------- ------ ------ ------- After bootup 1,012,150 82 0 0 After parallel build + perf-top 125,195,009 82 0 0 So the chance of having more than 2 levels of nesting is extremely low. [ mingo: Minor changelog edits. ] Signed-off-by: Waiman Long Cc: Andrew Morton Cc: Linus Torvalds Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Will Deacon Link: http://lkml.kernel.org/r/1539697507-28084-1-git-send-email-longman@redhat.com Signed-off-by: Ingo Molnar commit 11e13696a08e838ba48c72404c2b3f41429b5b20 Author: Nicholas Mc Guire Date: Tue Oct 16 15:45:39 2018 +0200 sched/completions/Documentation: Add recommendation for dynamic and ONSTACK completions To prevent dynamic completion objects from being de-allocated while still in use, add a recommendation to embed them in long lived data structures. Also add a note for the on-stack case that emphasizes the dangers of the limited scope, and recommends dynamic allocation if scope limitations are not clearly understood. [ mingo: Minor touch-ups of the text, expanded it a bit to make the warnings Nicholas added more prominent. ] Signed-off-by: Nicholas Mc Guire Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: john.garry@huawei.com Link: http://lkml.kernel.org/r/1539697539-24055-1-git-send-email-hofrat@osadl.org Signed-off-by: Ingo Molnar commit 0797e6f1a85872ab48cb4986a06ebdcae22ecf1a Author: Nathan Chancellor Date: Wed Sep 26 22:12:23 2018 -0700 IB/rxe: Remove unnecessary enum values Clang warns when an emumerated type is implicitly converted to another. drivers/infiniband/sw/rxe/rxe.c:106:27: warning: implicit conversion from enumeration type 'enum rxe_device_param' to different enumeration type 'enum ib_atomic_cap' [-Wenum-conversion] rxe->attr.atomic_cap = RXE_ATOMIC_CAP; ~ ^~~~~~~~~~~~~~ drivers/infiniband/sw/rxe/rxe.c:131:22: warning: implicit conversion from enumeration type 'enum rxe_port_param' to different enumeration type 'enum ib_port_state' [-Wenum-conversion] port->attr.state = RXE_PORT_STATE; ~ ^~~~~~~~~~~~~~ drivers/infiniband/sw/rxe/rxe.c:132:24: warning: implicit conversion from enumeration type 'enum rxe_port_param' to different enumeration type 'enum ib_mtu' [-Wenum-conversion] port->attr.max_mtu = RXE_PORT_MAX_MTU; ~ ^~~~~~~~~~~~~~~~ drivers/infiniband/sw/rxe/rxe.c:133:27: warning: implicit conversion from enumeration type 'enum rxe_port_param' to different enumeration type 'enum ib_mtu' [-Wenum-conversion] port->attr.active_mtu = RXE_PORT_ACTIVE_MTU; ~ ^~~~~~~~~~~~~~~~~~~ drivers/infiniband/sw/rxe/rxe.c:151:24: warning: implicit conversion from enumeration type 'enum rxe_port_param' to different enumeration type 'enum ib_mtu' [-Wenum-conversion] ib_mtu_enum_to_int(RXE_PORT_ACTIVE_MTU); ~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~ 5 warnings generated. Use the appropriate values from the expected enumerated type so no conversion needs to happen then remove the unneeded definitions. Reported-by: Nick Desaulniers Signed-off-by: Nathan Chancellor Reviewed-by: Nick Desaulniers Signed-off-by: Jason Gunthorpe commit 34c201ae49fe9e0bf3b389da5869d810f201c740 Author: Helge Deller Date: Mon Oct 15 22:14:01 2018 +0200 parisc: Include compressed vmlinux file in vmlinuz boot kernel Change the parisc vmlinuz boot code to include and process the real compressed vmlinux.gz ELF file instead of a compressed memory dump. This brings parisc in sync on how it's done on x86_64. The benefit of this change is that, e.g. for debugging purposes, one can then extract the vmlinux file out of the vmlinuz which was booted which wasn't possible before. This can be archieved with the existing scripts/extract-vmlinux script, which just needs a small tweak to prefer to extract a compressed file before trying the existing given binary. The downside of this approach is that due to the extra round of decompression/ELF processing we need more physical memory installed to be able to boot a kernel. Signed-off-by: Helge Deller commit db139d71c4c377c56a67ae219f120186ce9934d1 Author: Helge Deller Date: Tue Oct 16 08:03:24 2018 +0200 extract-vmlinux: Check for uncompressed image as fallback As on x86-64 and other architectures, the boot kernel on parisc (vmlinuz and bzImage) contains a full compressed copy of the final kernel executable (vmlinux.bin.gz), which one should be able to extract with the extract-vmlinux script. But on parisc extracting the kernel with extract-vmlinux fails. Currently the script first checks if the given file is an ELF file (which is true on parisc) and if so returns it. Thus on parisc we unexpectedly get back the vmlinuz boot file instead of the uncompressed vmlinux image. This patch fixes this issue by reverting the logic. It now first tries to find a compression signature in the given file and if that fails it checks the file itself as fallback. Signed-off-by: Helge Deller commit 1138b6718ff74d2a934459643e3754423d23b5e2 Author: John David Anglin Date: Sat Oct 6 13:11:30 2018 -0400 parisc: Fix address in HPMC IVA Helge noticed that the address of the os_hpmc handler was not being correctly calculated in the hpmc macro. As a result, PDCE_CHECK would fail to call os_hpmc: e800009802e00000 0000000000000000 CC_ERR_CHECK_HPMC 37000f7302e00000 8040004000000000 CC_ERR_CPU_CHECK_SUMMARY f600105e02e00000 fffffff0f0c00000 CC_MC_HPMC_MONARCH_SELECTED 140003b202e00000 000000000000000b CC_ERR_HPMC_STATE_ENTRY 5600100b02e00000 00000000000001a0 CC_MC_OS_HPMC_LEN_ERR 5600106402e00000 fffffff0f0438e70 CC_MC_BR_TO_OS_HPMC_FAILED e800009802e00000 0000000000000000 CC_ERR_CHECK_HPMC 37000f7302e00000 8040004000000000 CC_ERR_CPU_CHECK_SUMMARY 4000109f02e00000 0000000000000000 CC_MC_HPMC_INITIATED 4000101902e00000 0000000000000000 CC_MC_MULTIPLE_HPMCS 030010d502e00000 0000000000000000 CC_CPU_STOP The address problem can be seen by dumping the fault vector: 0000000040159000 : 40159000: 63 6f 77 73 stb r15,-2447(dp) 40159004: 20 63 61 6e ldil L%b747000,r3 40159008: 20 66 6c 79 ldil L%-1c3b3000,r3 ... 40159020: 08 00 02 40 nop 40159024: 20 6e 60 02 ldil L%15d000,r3 40159028: 34 63 00 00 ldo 0(r3),r3 4015902c: e8 60 c0 02 bv,n r0(r3) 40159030: 08 00 02 40 nop 40159034: 00 00 00 00 break 0,0 40159038: c0 00 70 00 bb,*< r0,sar,40159840 4015903c: 00 00 00 00 break 0,0 Location 40159038 should contain the physical address of os_hpmc: 000000004015d000 : 4015d000: 08 1a 02 43 copy r26,r3 4015d004: 01 c0 08 a4 mfctl iva,r4 4015d008: 48 85 00 68 ldw 34(r4),r5 This patch moves the address setup into initialize_ivt to resolve the above problem. I tested the change by dumping the HPMC entry after setup: 0000000040209020: 8000240 0000000040209024: 206a2004 0000000040209028: 34630ac0 000000004020902c: e860c002 0000000040209030: 8000240 0000000040209034: 1bdddce6 0000000040209038: 15d000 000000004020903c: 1a0 Signed-off-by: John David Anglin Cc: Signed-off-by: Helge Deller commit 99a3ae51d557d8e38a7aece65678a31f9db215ee Author: Helge Deller Date: Sun Oct 14 21:58:00 2018 +0200 parisc: Fix exported address of os_hpmc handler In the C-code we need to put the physical address of the hpmc handler in the interrupt vector table (IVA) in order to get HPMCs working. Since on parisc64 function pointers are indirect (in fact they are function descriptors) we instead export the address as variable and not as function. This reverts a small part of commit f39cce654f9a ("parisc: Add cfi_startproc and cfi_endproc to assembly code"). Signed-off-by: Helge Deller Cc: [4.9+] commit 3c229b3f2dd8133f61bb81d3cb018be92f4bba39 Author: Helge Deller Date: Fri Oct 12 22:37:46 2018 +0200 parisc: Fix map_pages() to not overwrite existing pte entries Fix a long-existing small nasty bug in the map_pages() implementation which leads to overwriting already written pte entries with zero, *if* map_pages() is called a second time with an end address which isn't aligned on a pmd boundry. This happens for example if we want to remap only the text segment read/write in order to run alternative patching on the code. Exiting the loop when we reach the end address fixes this. Cc: stable@vger.kernel.org Signed-off-by: Helge Deller commit 4dd5b673fa625d647447ae4c477bf946ae877711 Author: John David Anglin Date: Thu Sep 20 22:31:48 2018 -0400 parisc: Purge TLB entries after updating page table entry and set page accessed flag in TLB handler This patch may resolve some races in TLB handling.  Hopefully, TLB inserts are accesses and protected by spin lock. If not, we may need to IPI calls and do local purges on PA 2.0. Signed-off-by: John David Anglin Signed-off-by: Helge Deller commit d27dfa13b9f77ae7e6ed09d70a0426ed26c1a8f9 Author: John David Anglin Date: Tue Oct 16 21:07:59 2018 -0400 parisc: Release spinlocks using ordered store This patch updates the spin unlock code to use an ordered store with release semanatics. All prior accesses are guaranteed to be performed before an ordered store is performed. Using an ordered store is significantly faster than using the sync memory barrier. Signed-off-by: John David Anglin Signed-off-by: Helge Deller commit 2e37787df0ed0047848dba2eba53510a9185b991 Author: Helge Deller Date: Sun Oct 7 23:28:45 2018 +0200 parisc: Ratelimit dino stuck interrupt warnings While playing with qemu with an emulated RT8139cp NIC, I faced lots of the following warnings: Dino 0x00810000: stuck interrupt 2 This patch ratelimits this warning and reports back that the IRQ was handled. Signed-off-by: Helge Deller commit 35d8be9c563c9b2d6550833ad494f90bffde7ff0 Author: Helge Deller Date: Sun Oct 7 22:59:13 2018 +0200 parisc: dino: Utilize DINO_MASK_IRQ() macro Signed-off-by: Helge Deller commit e98bc5ee9793742eca1129366109603010dc9389 Author: Helge Deller Date: Sun Oct 7 22:29:29 2018 +0200 parisc: Clean up crash header output On kernel crash, this is the current output: Kernel Fault: Code=26 (Data memory access rights trap) regs=(ptrval) (Addr=00000004) Drop the address of regs, it's of no use for debugging, and show the faulty address without parenthesis. Signed-off-by: Helge Deller commit 8dbac7746e55e0c83fe818c137b1235c9fa1bd75 Author: Helge Deller Date: Sat Oct 6 21:14:56 2018 +0200 parisc: Add SYSTEM_INFO and REGISTER TOC PAT functions Signed-off-by: Helge Deller commit 32a7901f6d1d518ce25290c78553428110399212 Author: John David Anglin Date: Sat Sep 29 16:34:59 2018 -0400 parisc: Remove PTE load and fault check from L2_ptep macro This change removes the PTE load and present check from the L2_ptep macro. The load and check for kernel pages is now done in the tlb_lock macro. This avoids a double load and check for user pages. The load and check for user pages is now done inside the lock so the fault handler can't be called while the entry is being updated. This version uses an ordered store to release the lock when the page table entry isn't present. It also corrects the check in the non SMP case. Signed-off-by: John David Anglin Signed-off-by: Helge Deller commit a886c9791aed64d73f8c0038cc1506741ba216fa Author: John David Anglin Date: Tue Oct 16 20:49:56 2018 -0400 parisc: Reorder TLB flush timing calculation On boot (mostly reboot), my c8000 sometimes crashes after it prints the TLB flush threshold. The lockup is hard. The front LED flashes red and the box must be unplugged to reset the error. I noticed that when the crash occurs the TLB flush threshold is about one quarter what it is on a successful boot. If I disabled the calculation, the crash didn't occur. There also seemed to be a timing dependency affecting the crash. I finally realized that the flush_tlb_all() timing test runs just after the secondary CPUs are started. There seems to be a problem with running flush_tlb_all() too soon after the CPUs are started. The timing for the range test always seemed okay. So, I reversed the order of the two timing tests and I haven't had a crash at this point so far. I added a couple of information messages which I have left to help with diagnosis if the problem should appear on another machine. This version reduces the minimum TLB flush threshold to 16 KiB. Signed-off-by: John David Anglin Signed-off-by: Helge Deller commit 7c4ba3d38a3b013b79c3c07a639504cdc68fefdf Author: Christoph Hellwig Date: Mon Aug 27 11:00:28 2018 +0200 parisc: remove the dead ccio-rm-dma driver This driver has never been wired up due to the life of the Linux git tree, and has severely bitrotted. Signed-off-by: Christoph Hellwig Signed-off-by: Helge Deller commit c9dfa0c796f2c21255c45fe85a72657a192e1a49 Author: Masahiro Yamada Date: Mon Aug 27 11:28:08 2018 +0900 parisc: remove check for minimum required GCC version Commit cafa0010cd51 ("Raise the minimum required gcc version to 4.6") bumped the minimum GCC version to 4.6 for all architectures. The version check in arch/parisc/Makefile is obsolete now. Signed-off-by: Masahiro Yamada Signed-off-by: Helge Deller commit cd2b8520681a57dec6986f5ba62b2b23e831b98c Author: Helge Deller Date: Thu Aug 23 23:06:25 2018 +0200 parisc: Use PARISC_ITLB_TRAP constant in entry.S Fixes: 5b00ca0b8035 ("parisc: Restore possibility to execute 64-bit applications") Signed-off-by: Helge Deller commit a1c6fd4308d37f072e939a2782f24214115fc7e8 Author: Harsh Jain Date: Sat Oct 13 13:46:56 2018 +0530 crypto: chelsio - Update ntx queue received from cxgb4 Update cxgb4 to send No. of Tx Queue created in lldinfo struct and use the same ntxq in chcr driver. This patch depends on following commit commit add92a817e60e308a419693413a38d9d1e663aff "Fix memory corruption in DMA Mapped buffers" v2: Free txq_info in error case as pointed by Lino Sanfilippo. Signed-off-by: Harsh Jain Signed-off-by: Herbert Xu commit 18e732b8035d175181aae2ded127994cb01694f7 Author: Nathan Chancellor Date: Wed Oct 10 14:40:07 2018 -0700 crypto: ccree - avoid implicit enum conversion Clang warns when one enumerated type is implicitly converted to another and this happens in several locations in this driver, ultimately related to the set_cipher_{mode,config0} functions. set_cipher_mode expects a mode of type drv_cipher_mode and set_cipher_config0 expects a mode of type drv_crypto_direction. drivers/crypto/ccree/cc_ivgen.c:58:35: warning: implicit conversion from enumeration type 'enum cc_desc_direction' to different enumeration type 'enum drv_crypto_direction' [-Wenum-conversion] set_cipher_config0(&iv_seq[idx], DESC_DIRECTION_ENCRYPT_ENCRYPT); drivers/crypto/ccree/cc_hash.c:99:28: warning: implicit conversion from enumeration type 'enum cc_hash_conf_pad' to different enumeration type 'enum drv_crypto_direction' [-Wenum-conversion] set_cipher_config0(desc, HASH_DIGEST_RESULT_LITTLE_ENDIAN); drivers/crypto/ccree/cc_aead.c:1643:30: warning: implicit conversion from enumeration type 'enum drv_hash_hw_mode' to different enumeration type 'enum drv_cipher_mode' [-Wenum-conversion] set_cipher_mode(&desc[idx], DRV_HASH_HW_GHASH); Since this fundamentally isn't a problem because these values just represent simple integers for a shift operation, make it clear to Clang that this is okay by making the mode parameter in both functions an int. Link: https://github.com/ClangBuiltLinux/linux/issues/46 Signed-off-by: Nathan Chancellor Acked-by: Gilad Ben-Yossef Reviewed-by: Nick Desaulniers Signed-off-by: Herbert Xu commit 618b5dc48365cecc03daffa46800f20ab11e3f80 Author: Horia Geantă Date: Wed Oct 10 14:26:48 2018 +0300 crypto: caam - add SPDX license identifier to all files Previously, a tree-wide change added SPDX license identifiers to files lacking licensing information: b24413180f56 ("License cleanup: add SPDX GPL-2.0 license identifier to files with no license") To be consistent update the rest of the files: -files with license specified by means of MODULE_LICENSE() -files with complete license text -Kconfig Signed-off-by: Horia Geantă Signed-off-by: Herbert Xu commit 29e83c757006fd751966bdc53392bb22d74179c6 Author: Horia Geantă Date: Mon Oct 8 14:09:37 2018 +0300 crypto: caam/qi - simplify CGR allocation, freeing CGRs (Congestion Groups) have to be freed by the same CPU that initialized them. This is why currently the driver takes special measures; however, using set_cpus_allowed_ptr() is incorrect - as reported by Sebastian. Instead of the generic solution of replacing set_cpus_allowed_ptr() with work_on_cpu_safe(), we use the qman_delete_cgr_safe() QBMan API instead of qman_delete_cgr() - which internally takes care of proper CGR deletion. Link: https://lkml.kernel.org/r/20181005125443.dfhd2asqktm22ney@linutronix.de Reported-by: Sebastian Andrzej Siewior Signed-off-by: Horia Geantă Signed-off-by: Herbert Xu commit 58c8a863550b19ab3559dd5f5e27cc698c03e53b Merge: ce4e45842de3 ba439a6cbfa2 Author: Herbert Xu Date: Wed Oct 17 14:14:06 2018 +0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 Merge crypto tree to pick up chelsio bug fix. commit b93f654d73fa09088041efa77972b1d616a75fcb Author: Jens Axboe Date: Tue Oct 16 08:34:50 2018 -0600 f2fs: remove request_list check in is_idle() This doesn't work on stacked devices, and it doesn't work on blk-mq devices. The request_list is only used on legacy, which we don't have much of anymore, and soon won't have any of. Kill the check. Cc: Jaegeuk Kim Cc: linux-f2fs-devel@lists.sourceforge.net Signed-off-by: Jens Axboe Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit d021613ee3acb0d9a45038204e5699727719fe8a Author: YueHaibing Date: Thu Oct 4 10:51:02 2018 +0000 scsi: lpfc: Remove set but not used variables 'tgtp' Fixes gcc '-Wunused-but-set-variable' warning: drivers/scsi/lpfc/lpfc_debugfs.c: In function 'lpfc_debugfs_nodelist_data': drivers/scsi/lpfc/lpfc_debugfs.c:553:29: warning: variable 'tgtp' set but not used [-Wunused-but-set-variable] It never used since 2b65e18202fd ("scsi: lpfc: NVME Target: Add debugfs support") Signed-off-by: YueHaibing Signed-off-by: Martin K. Petersen commit 6940d12b3b02fadd9c8cfce551772470976c7ffc Author: Gustavo A. R. Silva Date: Thu Oct 4 09:10:09 2018 +0200 scsi: aic94xx: mark expected switch fall-throughs In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 114988 ("Missing break in switch") Addresses-Coverity-ID: 114989 ("Missing break in switch") Addresses-Coverity-ID: 114990 ("Missing break in switch") Addresses-Coverity-ID: 114991 ("Missing break in switch") Addresses-Coverity-ID: 114992 ("Missing break in switch") Signed-off-by: Gustavo A. R. Silva Signed-off-by: Martin K. Petersen commit 20054597f169090109fc3f0dfa1a48583f4178a4 Author: Nathan Chancellor Date: Wed Oct 3 18:06:15 2018 -0700 scsi: iscsi_tcp: Explicitly cast param in iscsi_sw_tcp_host_get_param Clang warns when one enumerated type is implicitly converted to another. drivers/scsi/iscsi_tcp.c:803:15: warning: implicit conversion from enumeration type 'enum iscsi_host_param' to different enumeration type 'enum iscsi_param' [-Wenum-conversion] &addr, param, buf); ^~~~~ 1 warning generated. iscsi_conn_get_addr_param handles ISCSI_HOST_PARAM_IPADDRESS just fine so add an explicit cast to iscsi_param to make it clear to Clang that this is expected behavior. Link: https://github.com/ClangBuiltLinux/linux/issues/153 Signed-off-by: Nathan Chancellor Reviewed-by: Nick Desaulniers Signed-off-by: Martin K. Petersen commit f41d84d44a1d7538f15ced316fc7040da2886b80 Author: YueHaibing Date: Sat Sep 29 13:53:07 2018 +0000 scsi: lpfc: Remove set but not used variable 'psli' Fixes gcc '-Wunused-but-set-variable' warning: drivers/scsi/lpfc/lpfc_hbadisc.c: In function 'lpfc_free_tx': drivers/scsi/lpfc/lpfc_hbadisc.c:5431:19: warning: variable 'psli' set but not used [-Wunused-but-set-variable] Since commit 895427bd012c ("scsi: lpfc: NVME Initiator: Base modifications") 'psli' is not used any more. Signed-off-by: YueHaibing Signed-off-by: Martin K. Petersen commit 761c830ec7b3d0674b3ad89cefd77a692634e305 Author: Nathan Chancellor Date: Thu Sep 27 16:56:52 2018 -0700 scsi: bfa: Avoid implicit enum conversion in bfad_im_post_vendor_event Clang warns when one enumerated type is implicitly converted to another. drivers/scsi/bfa/bfa_fcs_lport.c:379:26: warning: implicit conversion from enumeration type 'enum bfa_lport_aen_event' to different enumeration type 'enum bfa_ioc_aen_event' [-Wenum-conversion] BFA_AEN_CAT_LPORT, event); ^~~~~ The root cause of these warnings is the bfad_im_post_vendor_event function, which expects a value from enum bfa_ioc_aen_event but there are multiple instances of values from enums bfa_port_aen_event, bfa_audit_aen_event, and bfa_lport_aen_event being used in this function. Given that this doesn't appear to be a problem since cat helps with differentiating the events, just change evt's type to int so that no conversion needs to happen and Clang won't warn. Update aen_type's type in bfa_aen_entry_s as members that hold enumerated types should be int. Link: https://github.com/ClangBuiltLinux/linux/issues/147 Signed-off-by: Nathan Chancellor Reviewed-by: Nick Desaulniers Signed-off-by: Martin K. Petersen commit 362b5da3dfceada6e74ecdd7af3991bbe42c0c0f Author: Nathan Chancellor Date: Wed Sep 26 17:12:00 2018 -0700 scsi: isci: Change sci_controller_start_task's return type to sci_status Clang warns when an enumerated type is implicitly converted to another. drivers/scsi/isci/request.c:3476:13: warning: implicit conversion from enumeration type 'enum sci_task_status' to different enumeration type 'enum sci_status' [-Wenum-conversion] status = sci_controller_start_task(ihost, ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/scsi/isci/host.c:2744:10: warning: implicit conversion from enumeration type 'enum sci_status' to different enumeration type 'enum sci_task_status' [-Wenum-conversion] return SCI_SUCCESS; ~~~~~~ ^~~~~~~~~~~ drivers/scsi/isci/host.c:2753:9: warning: implicit conversion from enumeration type 'enum sci_status' to different enumeration type 'enum sci_task_status' [-Wenum-conversion] return status; ~~~~~~ ^~~~~~ Avoid all of these implicit conversion by just making sci_controller_start_task use sci_status. This silences Clang and has no functional change since sci_task_status has all of its values mapped to something in sci_status. Link: https://github.com/ClangBuiltLinux/linux/issues/153 Signed-off-by: Nathan Chancellor Signed-off-by: Martin K. Petersen commit e9e9a103528c7e199ead6e5374c9c52cf16b5802 Author: Nathan Chancellor Date: Wed Sep 26 17:11:50 2018 -0700 scsi: isci: Use proper enumerated type in atapi_d2h_reg_frame_handler Clang warns when one enumerated type is implicitly converted to another. drivers/scsi/isci/request.c:1629:13: warning: implicit conversion from enumeration type 'enum sci_io_status' to different enumeration type 'enum sci_status' [-Wenum-conversion] status = SCI_IO_FAILURE_RESPONSE_VALID; ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/scsi/isci/request.c:1631:12: warning: implicit conversion from enumeration type 'enum sci_io_status' to different enumeration type 'enum sci_status' [-Wenum-conversion] status = SCI_IO_FAILURE_RESPONSE_VALID; ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ status is of type sci_status but SCI_IO_FAILURE_RESPONSE_VALID is of type sci_io_status. Use SCI_FAILURE_IO_RESPONSE_VALID, which is from sci_status and has SCI_IO_FAILURE_RESPONSE_VALID's exact value since that is what SCI_IO_FAILURE_RESPONSE_VALID is mapped to in the isci.h file. Link: https://github.com/ClangBuiltLinux/linux/issues/153 Signed-off-by: Nathan Chancellor Signed-off-by: Martin K. Petersen commit feb59a34135cbc76c04767467a1cbdc0944b0dc1 Author: YueHaibing Date: Fri Sep 14 10:41:44 2018 +0000 scsi: lpfc: Remove set but not used variables 'fc_hdr' and 'hw_page_size' Fixes gcc '-Wunused-but-set-variable' warning: drivers/scsi/lpfc/lpfc_sli.c: In function 'lpfc_sli4_sp_handle_rcqe': drivers/scsi/lpfc/lpfc_sli.c:13430:26: warning: variable 'fc_hdr' set but not used [-Wunused-but-set-variable] drivers/scsi/lpfc/lpfc_sli.c: In function 'lpfc_cq_create': drivers/scsi/lpfc/lpfc_sli.c:14852:11: warning: variable 'hw_page_size' set but not used [-Wunused-but-set-variable] Signed-off-by: YueHaibing Signed-off-by: Martin K. Petersen commit b5a5fe4ef7fdfd00ac3937756d5f2fbb4e4be3a1 Author: Varun Prakash Date: Thu Sep 13 21:26:00 2018 +0530 scsi: cxgb4i: add DCB support for iSCSI connections Add IEEE and CEE DCBX support for iSCSI connections. Signed-off-by: Rohit Maheshwari Signed-off-by: Varun Prakash Signed-off-by: Martin K. Petersen commit 6f07f86c494074a0755930473f67cc8916654221 Author: Dan Williams Date: Wed Sep 26 10:48:38 2018 -0700 acpi, nfit: Introduce nfit_mem flags In preparation for adding a flag to indicate whether a DIMM publishes a dirty-shutdown count, convert the existing flags to a bit field. Reviewed-by: Keith Busch Signed-off-by: Dan Williams commit 44d520eb17cd5fd7a3ac28b9d872e655c3920021 Merge: 3f4c3127d332 753fb2ee0934 Author: Daniel Borkmann Date: Wed Oct 17 02:30:32 2018 +0200 Merge branch 'bpf-sk-msg-peek' John Fastabend says: ==================== This adds support for the MSG_PEEK flag when redirecting into an ingress psock sk_msg queue. The first patch adds some base support to the helpers, then the feature, and finally we add an option for the test suite to do a duplicate MSG_PEEK call on every recv to test the feature. With duplicate MSG_PEEK call all tests continue to PASS. ==================== Acked-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann commit 753fb2ee09345e0730e610b2ee3a01964fe22a63 Author: John Fastabend Date: Tue Oct 16 11:08:09 2018 -0700 bpf: sockmap, add msg_peek tests to test_sockmap Add tests that do a MSG_PEEK recv followed by a regular receive to test flag support. Signed-off-by: John Fastabend Signed-off-by: Daniel Borkmann commit 02c558b2d5d679fbbcaa5b9689484c7e0f8abb7b Author: John Fastabend Date: Tue Oct 16 11:08:04 2018 -0700 bpf: sockmap, support for msg_peek in sk_msg with redirect ingress This adds support for the MSG_PEEK flag when doing redirect to ingress and receiving on the sk_msg psock queue. Previously the flag was being ignored which could confuse applications if they expected the flag to work as normal. Signed-off-by: John Fastabend Signed-off-by: Daniel Borkmann commit 8734a162c13b1a893e7dff8de0df81fed04c51a6 Author: John Fastabend Date: Tue Oct 16 11:07:59 2018 -0700 bpf: skmsg, improve sk_msg_used_element to work in cork context Currently sk_msg_used_element is only called in zerocopy context where cork is not possible and if this case happens we fallback to copy mode. However the helper is more useful if it works in all contexts. This patch resolved the case where if end == head indicating a full or empty ring the helper always reports an empty ring. To fix this add a test for the full ring case to avoid reporting a full ring has 0 elements. This additional functionality will be used in the next patches from recvmsg context where end = head with a full ring is a valid case. Signed-off-by: John Fastabend Signed-off-by: Daniel Borkmann commit 3f4c3127d332000530349db4843deece27fe5e0c Author: John Fastabend Date: Tue Oct 16 10:36:01 2018 -0700 bpf: sockmap, fix skmsg recvmsg handler to track size correctly When converting sockmap to new skmsg generic data structures we missed that the recvmsg handler did not correctly use sg.size and instead was using individual elements length. The result is if a sock is closed with outstanding data we omit the call to sk_mem_uncharge() and can get the warning below. [ 66.728282] WARNING: CPU: 6 PID: 5783 at net/core/stream.c:206 sk_stream_kill_queues+0x1fa/0x210 To fix this correct the redirect handler to xfer the size along with the scatterlist and also decrement the size from the recvmsg handler. Now when a sock is closed the remaining 'size' will be decremented with sk_mem_uncharge(). Signed-off-by: John Fastabend Acked-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann commit 9023705192242a77f05c1647b9f0c6b55c955ecf Author: Gustavo A. R. Silva Date: Tue Oct 16 17:11:48 2018 -0700 Input: xen-kbdfront - 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 placed the "fall through" part at the beginning of the code comment, which is what GCC is expecting to find. Addresses-Coverity-ID: 114757 ("Missing break in switch") Signed-off-by: Gustavo A. R. Silva Signed-off-by: Dmitry Torokhov commit 480d99fdc3eee31a23c317927a335e9a71c2904f Author: Gregory CLEMENT Date: Wed Oct 10 20:18:38 2018 +0200 clk: mvebu: armada-37xx-tbg: Switch to clk_get and balance it in probe The parent clock is get only to have its name, and then the clock is no more used, so we can safely free it using clk_put. Furthermore as between the successful devm_clk_get() and the devm_clk_put() call we don't exit the probe function in error so I can use non managed version of clk_get() and clk_put(). Signed-off-by: Gregory CLEMENT Signed-off-by: Stephen Boyd commit f08c2e2865f6f9b172f37d7bbf24716f9ebad553 Author: Dong Aisheng Date: Fri Aug 31 12:45:55 2018 +0800 clk: add managed version of clk_bulk_get_all This patch introduces the managed version of clk_bulk_get_all. Cc: Michael Turquette Cc: Stephen Boyd Tested-by: Thor Thayer Signed-off-by: Dong Aisheng Signed-off-by: Stephen Boyd commit 616e45df7c4aa71279c07cc803a1d51f43f89f37 Author: Dong Aisheng Date: Fri Aug 31 12:45:54 2018 +0800 clk: add new APIs to operate on all available clocks This patch introduces of_clk_bulk_get_all and clk_bulk_x_all APIs to users who just want to handle all available clocks from device tree without need to know the detailed clock information likes clock numbers and names. This is useful in writing some generic drivers to handle clock part. Cc: Stephen Boyd Cc: Masahiro Yamada Tested-by: Thor Thayer Signed-off-by: Dong Aisheng Signed-off-by: Stephen Boyd commit cfdc0411cf01aff7bb44a4edcbaa578ad363ab77 Author: Dong Aisheng Date: Fri Aug 31 12:45:53 2018 +0800 clk: bulk: add of_clk_bulk_get() 'clock-names' property is optional in DT, so of_clk_bulk_get() is introduced here to handle this for DT users without 'clock-names' specified. Later clk_bulk_get_all() will be implemented on top of it and this API will be kept private until someone proves they need it because they don't have a struct device pointer. Cc: Stephen Boyd Cc: Michael Turquette Cc: Russell King Reported-by: Shawn Guo Tested-by: Thor Thayer Signed-off-by: Dong Aisheng Signed-off-by: Stephen Boyd commit 13eb34b669b8ac38fa4f3ea290237e936047d88b Author: YueHaibing Date: Wed Sep 26 19:09:40 2018 +0800 scsi: megaraid_mbox: remove set but not used variables Fixes gcc '-Wunused-but-set-variable' warning: drivers/scsi/megaraid/megaraid_mbox.c: In function 'megaraid_reset_handler': drivers/scsi/megaraid/megaraid_mbox.c:2580:7: warning: variable 'recovering' set but not used [-Wunused-but-set-variable] drivers/scsi/megaraid/megaraid_mbox.c: In function 'mbox_post_sync_cmd': drivers/scsi/megaraid/megaraid_mbox.c:2728:12: warning: variable 'mbox64' set but not used [-Wunused-but-set-variable] drivers/scsi/megaraid/megaraid_mbox.c: In function 'megaraid_mbox_support_random_del': drivers/scsi/megaraid/megaraid_mbox.c:3138:11: warning: variable 'mbox' set but not used [-Wunused-but-set-variable] drivers/scsi/megaraid/megaraid_mbox.c: In function 'megaraid_mbox_flush_cache': drivers/scsi/megaraid/megaraid_mbox.c:3266:10: warning: variable 'mbox' set but not used [-Wunused-but-set-variable] drivers/scsi/megaraid/megaraid_mbox.c: In function 'megaraid_mbox_fire_sync_cmd': drivers/scsi/megaraid/megaraid_mbox.c:3302:12: warning: variable 'mbox64' set but not used [-Wunused-but-set-variable] drivers/scsi/megaraid/megaraid_mbox.c: In function 'gather_hbainfo': drivers/scsi/megaraid/megaraid_mbox.c:3797:10: warning: variable 'dmajor' set but not used [-Wunused-but-set-variable] [mkp: applied by hand due to conflict with hch's DMA cleanup] Signed-off-by: YueHaibing Signed-off-by: Martin K. Petersen commit c8da78e8a1da5dc726b38db6cdb8bd992b3826ed Author: Stephen Boyd Date: Tue Oct 16 15:33:01 2018 -0700 clk: tegra210: Include size.h for compilation ease You can't compile this file by itself because it uses SZ_64K from sizes.h but doesn't include it. Instead it relies on some certain configuration pulling that in implicitly somewhere else. Just add the include to make random compile testing easier. Signed-off-by: Stephen Boyd commit a4dbbceeee3e0ba670875a147237d6566de78840 Author: Joseph Lo Date: Thu Sep 27 10:32:03 2018 +0800 clk: tegra: Fixes for MBIST work around Fix some incorrect data in LVL2 offset and bit mask. Fixes: e403d0057343 ("clk: tegra: MBIST work around for Tegra210") Signed-off-by: Joseph Lo Signed-off-by: Peter De Schrijver Acked-by: Jon Hunter Acked-by: Peter De Schrijver Signed-off-by: Stephen Boyd commit c851436a34cad09388f1303e11ccb6b9420e5692 Author: Jim Mattson Date: Tue Oct 16 14:29:19 2018 -0700 kvm: x86: Add has_payload and payload to kvm_queued_exception The payload associated with a #PF exception is the linear address of the fault to be loaded into CR2 when the fault is delivered. The payload associated with a #DB exception is a mask of the DR6 bits to be set (or in the case of DR6.RTM, cleared) when the fault is delivered. Add fields has_payload and payload to kvm_queued_exception to track payloads for pending exceptions. The new fields are introduced here, but for now, they are just cleared. Reported-by: Jim Mattson Suggested-by: Paolo Bonzini Signed-off-by: Jim Mattson Signed-off-by: Paolo Bonzini commit edbb4233e7efc37dbebb10f7774b38c64080dd66 Author: Paul Burton Date: Mon Oct 15 18:26:12 2018 +0000 MIPS: Cleanup DSP ASE detection Currently we hardcode a list of files for which we specify that the toolchain has DSP ASE support when building for MIPSr2 only. This has a number of problems: 1) It doesn't actually ensure that the toolchain supports the DSP ASE at all. 2) It's fragile if we try to use DSP ASE macros in other files. 3) It makes no provision for MIPSr6 & later systems which also support the DSP ASE & end up using the .word directive implementation of the DSP macros. Fix this by detecting assembler support for the DSP ASE globally, not just for a small set of files, and not just for MIPSr2. This now exposes use of toolchain DSP support to kernel builds targeting MIPSr1 and older, so we add .set MIPS_ISA_LEVEL directives prior to all .set dsp directives in order to prevent the assembler from complaining that the DSP ASE is only supported with MIPSr2 & higher. Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/20901/ Cc: linux-mips@linux-mips.org commit bba9ce58d9cb7ba9e121627108eca986760ad0e8 Author: Jim Mattson Date: Tue Oct 16 14:29:18 2018 -0700 KVM: Documentation: Fix omission in struct kvm_vcpu_events The header file indicates that there are 36 reserved bytes at the end of this structure. Adjust the documentation to agree with the header file. Signed-off-by: Jim Mattson Signed-off-by: Paolo Bonzini commit 18178ff862170ee4c9fd7450173c6fba9e3c4c3a Author: Vitaly Kuznetsov Date: Tue Oct 16 18:50:11 2018 +0200 KVM: selftests: add Enlightened VMCS test Modify test library and add eVMCS test. This includes nVMX save/restore testing. Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini commit c939989d74e27f44229a51d8fe96b5c297965bfa Author: Vitaly Kuznetsov Date: Tue Oct 16 18:50:10 2018 +0200 tools/headers: update kvm.h Pick up the latest kvm.h definitions. Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini commit 8cab6507f64eff0ccfea01fccbc7e3e05e2aaf7e Author: Vitaly Kuznetsov Date: Tue Oct 16 18:50:09 2018 +0200 x86/kvm/nVMX: nested state migration for Enlightened VMCS Add support for get/set of nested state when Enlightened VMCS is in use. A new KVM_STATE_NESTED_EVMCS flag to indicate eVMCS on the vCPU was enabled is added. Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini commit 1e7ecd1b3d21a6302f3ee4a3720f682eb2467a3c Author: Vitaly Kuznetsov Date: Tue Oct 16 18:50:08 2018 +0200 KVM: selftests: state_test: test bare VMXON migration Split prepare_for_vmx_operation() into prepare_for_vmx_operation() and load_vmcs() so we can inject GUEST_SYNC() in between. Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini commit a1b0c1c64dfef0cff8555bb708bfc5d7c66c6ca4 Author: Vitaly Kuznetsov Date: Tue Oct 16 18:50:07 2018 +0200 x86/kvm/nVMX: allow bare VMXON state migration It is perfectly valid for a guest to do VMXON and not do VMPTRLD. This state needs to be preserved on migration. Cc: stable@vger.kernel.org Fixes: 8fcc4b5923af5de58b80b53a069453b135693304 Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini commit a7c42bb6da6b1b54b2e7bd567636d72d87b10a79 Author: Vitaly Kuznetsov Date: Tue Oct 16 18:50:06 2018 +0200 x86/kvm/lapic: preserve gfn_to_hva_cache len on cache reinit vcpu->arch.pv_eoi is accessible through both HV_X64_MSR_VP_ASSIST_PAGE and MSR_KVM_PV_EOI_EN so on migration userspace may try to restore them in any order. Values match, however, kvm_lapic_enable_pv_eoi() uses different length: for Hyper-V case it's the whole struct hv_vp_assist_page, for KVM native case it is 8. In case we restore KVM-native MSR last cache will be reinitialized with len=8 so trying to access VP assist page beyond 8 bytes with kvm_read_guest_cached() will fail. Check if we re-initializing cache for the same address and preserve length in case it was greater. Signed-off-by: Vitaly Kuznetsov Cc: stable@vger.kernel.org Signed-off-by: Paolo Bonzini commit 12e0c6186ba44bb6194cf5d2eda8f46880126587 Author: Vitaly Kuznetsov Date: Tue Oct 16 18:50:05 2018 +0200 x86/kvm/hyperv: don't clear VP assist pages on init VP assist pages may hold valuable data which needs to be preserved across migration. Clean PV EOI portion of the data on init, the guest is responsible for making sure there's no garbage in the rest. This will be used for nVMX migration, eVMCS address needs to be preserved. Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini commit c4ebd6295ab730bf922c96d3c4045c3a84fd1cf7 Author: Vitaly Kuznetsov Date: Tue Oct 16 18:50:04 2018 +0200 KVM: nVMX: optimize prepare_vmcs02{,_full} for Enlightened VMCS case When Enlightened VMCS is in use by L1 hypervisor we can avoid vmwriting VMCS fields which did not change. Our first goal is to achieve minimal impact on traditional VMCS case so we're not wrapping each vmwrite() with an if-changed checker. We also can't utilize static keys as Enlightened VMCS usage is per-guest. This patch implements the simpliest solution: checking fields in groups. We skip single vmwrite() statements as doing the check will cost us something even in non-evmcs case and the win is tiny. Unfortunately, this makes prepare_vmcs02_full{,_full}() code Enlightened VMCS-dependent (and a bit ugly). Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini commit b8bbab928fb187530d6bb0932b86661f99e3a01d Author: Vitaly Kuznetsov Date: Tue Oct 16 18:50:03 2018 +0200 KVM: nVMX: implement enlightened VMPTRLD and VMCLEAR Per Hyper-V TLFS 5.0b: "The L1 hypervisor may choose to use enlightened VMCSs by writing 1 to the corresponding field in the VP assist page (see section 7.8.7). Another field in the VP assist page controls the currently active enlightened VMCS. Each enlightened VMCS is exactly one page (4 KB) in size and must be initially zeroed. No VMPTRLD instruction must be executed to make an enlightened VMCS active or current. After the L1 hypervisor performs a VM entry with an enlightened VMCS, the VMCS is considered active on the processor. An enlightened VMCS can only be active on a single processor at the same time. The L1 hypervisor can execute a VMCLEAR instruction to transition an enlightened VMCS from the active to the non-active state. Any VMREAD or VMWRITE instructions while an enlightened VMCS is active is unsupported and can result in unexpected behavior." Keep Enlightened VMCS structure for the current L2 guest permanently mapped from struct nested_vmx instead of mapping it every time. Suggested-by: Ladi Prosek Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini commit 945679e301ea0de1148b64c7c3273d92059e7231 Author: Vitaly Kuznetsov Date: Tue Oct 16 18:50:02 2018 +0200 KVM: nVMX: add enlightened VMCS state Adds hv_evmcs pointer and implement copy_enlightened_to_vmcs12() and copy_enlightened_to_vmcs12(). prepare_vmcs02()/prepare_vmcs02_full() separation is not valid for Enlightened VMCS, do full sync for now. Suggested-by: Ladi Prosek Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini commit 57b119da3594f5145a64fdebe0ac9ee0cc65f371 Author: Vitaly Kuznetsov Date: Tue Oct 16 18:50:01 2018 +0200 KVM: nVMX: add KVM_CAP_HYPERV_ENLIGHTENED_VMCS capability Enlightened VMCS is opt-in. The current version does not contain all fields supported by nested VMX so we must not advertise the corresponding VMX features if enlightened VMCS is enabled. Userspace is given the enlightened VMCS version supported by KVM as part of enabling KVM_CAP_HYPERV_ENLIGHTENED_VMCS. The version is to be advertised to the nested hypervisor, currently done via a cpuid leaf for Hyper-V. Suggested-by: Ladi Prosek Signed-off-by: Vitaly Kuznetsov Reviewed-by: Liran Alon Signed-off-by: Paolo Bonzini commit 5d7a6443368e48ca041fea086e345420c027a8cd Author: Vitaly Kuznetsov Date: Tue Oct 16 18:50:00 2018 +0200 KVM: VMX: refactor evmcs_sanitize_exec_ctrls() Split off EVMCS1_UNSUPPORTED_* macros so we can re-use them when enabling Enlightened VMCS for Hyper-V on KVM. Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini commit 72bbf9358c3676bd89dc4bd8fb0b1f2a11c288fc Author: Ladi Prosek Date: Tue Oct 16 18:49:59 2018 +0200 KVM: hyperv: define VP assist page helpers The state related to the VP assist page is still managed by the LAPIC code in the pv_eoi field. Signed-off-by: Ladi Prosek Signed-off-by: Vitaly Kuznetsov Reviewed-by: Liran Alon Signed-off-by: Paolo Bonzini commit 970c0d4b94efcba5610b37f0118cb1a2286ba962 Author: Wei Yang Date: Tue Oct 9 10:41:15 2018 +0800 KVM: refine the comment of function gfn_to_hva_memslot_prot() The original comment is little hard to understand. No functional change, just amend the comment a little. Signed-off-by: Wei Yang Signed-off-by: Paolo Bonzini commit e7912386ede89d2aa1f72ebb74969e48e9d5f56c Author: Wei Yang Date: Thu Oct 4 10:04:23 2018 +0800 KVM: x86: reintroduce pte_list_remove, but including mmu_spte_clear_track_bits rmap_remove() removes the sptep after locating the correct rmap_head but, in several cases, the caller has already known the correct rmap_head. This patch introduces a new pte_list_remove(); because it is known that the spte is present (or it would not have an rmap_head), it is safe to remove the tracking bits without any previous check. Signed-off-by: Wei Yang Signed-off-by: Paolo Bonzini commit 8daf346226b22e565baf27ccaec58fed9e108b42 Author: Wei Yang Date: Thu Oct 4 10:04:22 2018 +0800 KVM: x86: rename pte_list_remove to __pte_list_remove This is a patch preparing for further change. Signed-off-by: Wei Yang Signed-off-by: Paolo Bonzini commit 0804c849f1df0992d39a37c4fc259f7f8b16f385 Author: Peng Hao Date: Sun Oct 14 07:09:55 2018 +0800 kvm/x86 : add coalesced pio support Coalesced pio is based on coalesced mmio and can be used for some port like rtc port, pci-host config port and so on. Specially in case of rtc as coalesced pio, some versions of windows guest access rtc frequently because of rtc as system tick. guest access rtc like this: write register index to 0x70, then write or read data from 0x71. writing 0x70 port is just as index and do nothing else. So we can use coalesced pio to handle this scene to reduce VM-EXIT time. When starting and closing a virtual machine, it will access pci-host config port frequently. So setting these port as coalesced pio can reduce startup and shutdown time. without my patch, get the vm-exit time of accessing rtc 0x70 and piix 0xcf8 using perf tools: (guest OS : windows 7 64bit) IO Port Access Samples Samples% Time% Min Time Max Time Avg time 0x70:POUT 86 30.99% 74.59% 9us 29us 10.75us (+- 3.41%) 0xcf8:POUT 1119 2.60% 2.12% 2.79us 56.83us 3.41us (+- 2.23%) with my patch IO Port Access Samples Samples% Time% Min Time Max Time Avg time 0x70:POUT 106 32.02% 29.47% 0us 10us 1.57us (+- 7.38%) 0xcf8:POUT 1065 1.67% 0.28% 0.41us 65.44us 0.66us (+- 10.55%) Signed-off-by: Peng Hao Signed-off-by: Paolo Bonzini commit 9943450b7b8831c5045362eed45f6fefd1986d72 Author: Peng Hao Date: Sun Oct 14 07:09:56 2018 +0800 kvm/x86 : add document for coalesced mmio Signed-off-by: Peng Hao Signed-off-by: Paolo Bonzini commit 39337ad1a783b8f2d3a708d62dc094dc5d8c9f29 Author: Peng Hao Date: Thu Oct 4 11:45:00 2018 -0400 kvm/x86 : fix some typo Signed-off-by: Peng Hao Signed-off-by: Paolo Bonzini commit a5c214dad1985092bd21c38c2a78befed9b02294 Author: Lan Tianyu Date: Sat Oct 13 22:54:05 2018 +0800 KVM/VMX: Change hv flush logic when ept tables are mismatched. If ept table pointers are mismatched, flushing tlb for each vcpus via hv flush interface still helps to reduce vmexits which are triggered by IPI and INEPT emulation. Signed-off-by: Lan Tianyu Signed-off-by: Paolo Bonzini commit 44c2d667ce3fa6933ac30a726f148f0c6d84ce5f Author: Uros Bizjak Date: Thu Oct 11 19:40:45 2018 +0200 KVM/x86: Use 32bit xor to clear register x86_64 zero-extends 32bit xor to a full 64bit register. Use %k asm operand modifier to force 32bit register and save 268 bytes in kvm.o Signed-off-by: Uros Bizjak Signed-off-by: Paolo Bonzini commit 4b1e54786e4862d3110bbfb27999c2c795013007 Author: Uros Bizjak Date: Thu Oct 11 19:40:44 2018 +0200 KVM/x86: Use assembly instruction mnemonics instead of .byte streams Recently the minimum required version of binutils was changed to 2.20, which supports all VMX instruction mnemonics. The patch removes all .byte #defines and uses real instruction mnemonics instead. The compiler is now able to pass memory operand to the instruction, so there is no need for memory clobber anymore. Also, the compiler adds CC register clobber automatically to all extended asm clauses, so the patch also removes explicit CC clobber. The immediate benefit of the patch is removal of many unnecesary register moves, resulting in 1434 saved bytes in vmx.o: text data bss dec hex filename 151257 18246 8500 178003 2b753 vmx.o 152691 18246 8500 179437 2bced vmx-old.o Some examples of improvement include removal of unneeded moves of %rsp to %rax in front of invept and invvpid instructions: a57e: b9 01 00 00 00 mov $0x1,%ecx a583: 48 89 04 24 mov %rax,(%rsp) a587: 48 89 e0 mov %rsp,%rax a58a: 48 c7 44 24 08 00 00 movq $0x0,0x8(%rsp) a591: 00 00 a593: 66 0f 38 80 08 invept (%rax),%rcx to: a45c: 48 89 04 24 mov %rax,(%rsp) a460: b8 01 00 00 00 mov $0x1,%eax a465: 48 c7 44 24 08 00 00 movq $0x0,0x8(%rsp) a46c: 00 00 a46e: 66 0f 38 80 04 24 invept (%rsp),%rax and the ability to use more optimal registers and memory operands in the instruction: 8faa: 48 8b 44 24 28 mov 0x28(%rsp),%rax 8faf: 4c 89 c2 mov %r8,%rdx 8fb2: 0f 79 d0 vmwrite %rax,%rdx to: 8e7c: 44 0f 79 44 24 28 vmwrite 0x28(%rsp),%r8 Signed-off-by: Uros Bizjak Signed-off-by: Paolo Bonzini commit 5ebb272b2ea7e02911a03a893f8d922d49f9bb4a Author: Uros Bizjak Date: Thu Oct 11 19:40:43 2018 +0200 KVM/x86: Fix invvpid and invept register operand size in 64-bit mode Register operand size of invvpid and invept instruction in 64-bit mode has always 64 bits. Adjust inline function argument type to reflect correct size. Signed-off-by: Uros Bizjak Signed-off-by: Paolo Bonzini commit bf627a9288372d065f157ea445d11b900575193e Author: Vitaly Kuznetsov Date: Mon Oct 8 21:28:13 2018 +0200 x86/kvm/mmu: check if MMU reconfiguration is needed in init_kvm_nested_mmu() We don't use root page role for nested_mmu, however, optimizing out re-initialization in case nothing changed is still valuable as this is done for every nested vmentry. Signed-off-by: Vitaly Kuznetsov Reviewed-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit 7dcd575520082f186231777f4ac9f59ce14d6961 Author: Vitaly Kuznetsov Date: Mon Oct 8 21:28:12 2018 +0200 x86/kvm/mmu: check if tdp/shadow MMU reconfiguration is needed MMU reconfiguration in init_kvm_tdp_mmu()/kvm_init_shadow_mmu() can be avoided if the source data used to configure it didn't change; enhance MMU extended role with the required fields and consolidate common code in kvm_calc_mmu_role_common(). Signed-off-by: Vitaly Kuznetsov Reviewed-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit a336282d7753a92ced7b8e52ff959929f6e550ff Author: Vitaly Kuznetsov Date: Mon Oct 8 21:28:11 2018 +0200 x86/kvm/nVMX: introduce source data cache for kvm_init_shadow_ept_mmu() MMU re-initialization is expensive, in particular, update_permission_bitmask() and update_pkru_bitmask() are. Cache the data used to setup shadow EPT MMU and avoid full re-init when it is unchanged. Signed-off-by: Vitaly Kuznetsov Sean Christopherson Signed-off-by: Paolo Bonzini commit 36d9594dfbf22a59adb986d85e0543886ab898f2 Author: Vitaly Kuznetsov Date: Mon Oct 8 21:28:10 2018 +0200 x86/kvm/mmu: make space for source data caching in struct kvm_mmu In preparation to MMU reconfiguration avoidance we need a space to cache source data. As this partially intersects with kvm_mmu_page_role, create 64bit sized union kvm_mmu_role holding both base and extended data. No functional change. Signed-off-by: Vitaly Kuznetsov Reviewed-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit e173299101affc677db085b2894a43be4a17a94b Author: Paolo Bonzini Date: Mon Oct 8 21:28:09 2018 +0200 x86/kvm/mmu: get rid of redundant kvm_mmu_setup() Just inline the contents into the sole caller, kvm_init_mmu is now public. Suggested-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini Reviewed-by: Sean Christopherson commit 14c07ad89f4d728a468caaea6a769c018c2b8dd6 Author: Vitaly Kuznetsov Date: Mon Oct 8 21:28:08 2018 +0200 x86/kvm/mmu: introduce guest_mmu When EPT is used for nested guest we need to re-init MMU as shadow EPT MMU (nested_ept_init_mmu_context() does that). When we return back from L2 to L1 kvm_mmu_reset_context() in nested_vmx_load_cr3() resets MMU back to normal TDP mode. Add a special 'guest_mmu' so we can use separate root caches; the improved hit rate is not very important for single vCPU performance, but it avoids contention on the mmu_lock for many vCPUs. On the nested CPUID benchmark, with 16 vCPUs, an L2->L1->L2 vmexit goes from 42k to 26k cycles. Signed-off-by: Vitaly Kuznetsov Reviewed-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit 6a82cd1c7b1e38d3b940fcb35a81e902dd52fb35 Author: Vitaly Kuznetsov Date: Mon Oct 8 21:28:07 2018 +0200 x86/kvm/mmu.c: add kvm_mmu parameter to kvm_mmu_free_roots() Add an option to specify which MMU root we want to free. This will be used when nested and non-nested MMUs for L1 are split. Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini Reviewed-by: Sean Christopherson commit 3dc773e745234d904b09da37075200ec46af4e7a Author: Vitaly Kuznetsov Date: Mon Oct 8 21:28:06 2018 +0200 x86/kvm/mmu.c: set get_pdptr hook in kvm_init_shadow_ept_mmu() kvm_init_shadow_ept_mmu() doesn't set get_pdptr() hook and is this not a problem just because MMU context is already initialized and this hook points to kvm_pdptr_read(). As we're intended to use a dedicated MMU for shadow EPT MMU set this hook explicitly. Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini Reviewed-by: Sean Christopherson commit 44dd3ffa7bb31126e0fc4f6f30398546eb494388 Author: Vitaly Kuznetsov Date: Mon Oct 8 21:28:05 2018 +0200 x86/kvm/mmu: make vcpu->mmu a pointer to the current MMU As a preparation to full MMU split between L1 and L2 make vcpu->arch.mmu a pointer to the currently used mmu. For now, this is always vcpu->arch.root_mmu. No functional change. Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini Reviewed-by: Sean Christopherson commit 0e0a53c551317654e2d7885fdfd23299fee99b6b Author: Paolo Bonzini Date: Wed Aug 22 19:59:33 2018 +0200 kvm: x86: optimize dr6 restore The quote from the comment almost says it all: we are currently zeroing the guest dr6 in kvm_arch_vcpu_put, because do_debug expects it. However, the host %dr6 is either: - zero because the guest hasn't run after kvm_arch_vcpu_load - written from vcpu->arch.dr6 by vcpu_enter_guest - written by the guest and copied to vcpu->arch.dr6 by ->sync_dirty_debug_regs(). Therefore, we can skip the write if vcpu->arch.dr6 is already zero. We may do extra useless writes if vcpu->arch.dr6 is nonzero but the guest hasn't run; however that is less important for performance. Signed-off-by: Paolo Bonzini commit f21dd494506ad002a5b6b32e50a5d4ccac6929fe Author: Vitaly Kuznetsov Date: Wed Oct 10 17:14:38 2018 +0200 KVM: x86: hyperv: optimize sparse VP set processing Rewrite kvm_hv_flush_tlb()/send_ipi_vcpus_mask() making them cleaner and somewhat more optimal. hv_vcpu_in_sparse_set() is converted to sparse_set_to_vcpu_mask() which copies sparse banks u64-at-a-time and then, depending on the num_mismatched_vp_indexes value, returns immediately or does vp index to vcpu index conversion by walking all vCPUs. To support the change and make kvm_hv_send_ipi() look similar to kvm_hv_flush_tlb() send_ipi_vcpus_mask() is introduced. Suggested-by: Roman Kagan Signed-off-by: Vitaly Kuznetsov Reviewed-by: Roman Kagan Signed-off-by: Paolo Bonzini commit e6b6c483ebe9b3f82710fc39eff5531b4d80b089 Author: Vitaly Kuznetsov Date: Mon Oct 8 19:19:04 2018 +0200 KVM: x86: hyperv: fix 'tlb_lush' typo Regardless of whether your TLB is lush or not it still needs flushing. Reported-by: Roman Kagan Reviewed-by: Roman Kagan Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini commit 2768c0cc4ad591d846568a989bcdf2c49660a97e Author: Sean Christopherson Date: Wed Sep 26 09:23:58 2018 -0700 KVM: nVMX: WARN if nested run hits VMFail with early consistency checks enabled When early consistency checks are enabled, all VMFail conditions should be caught by nested_vmx_check_vmentry_hw(). Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit 52017608da33182d0c8b397b21c95f8afab37784 Author: Sean Christopherson Date: Wed Sep 26 09:23:57 2018 -0700 KVM: nVMX: add option to perform early consistency checks via H/W KVM defers many VMX consistency checks to the CPU, ostensibly for performance reasons[1], including checks that result in VMFail (as opposed to VMExit). This behavior may be undesirable for some users since this means KVM detects certain classes of VMFail only after it has processed guest state, e.g. emulated MSR load-on-entry. Because there is a strict ordering between checks that cause VMFail and those that cause VMExit, i.e. all VMFail checks are performed before any checks that cause VMExit, we can detect (almost) all VMFail conditions via a dry run of sorts. The almost qualifier exists because some state in vmcs02 comes from L0, e.g. VPID, which means that hardware will never detect an invalid VPID in vmcs12 because it never sees said value. Software must (continue to) explicitly check such fields. After preparing vmcs02 with all state needed to pass the VMFail consistency checks, optionally do a "test" VMEnter with an invalid GUEST_RFLAGS. If the VMEnter results in a VMExit (due to bad guest state), then we can safely say that the nested VMEnter should not VMFail, i.e. any VMFail encountered in nested_vmx_vmexit() must be due to an L0 bug. GUEST_RFLAGS is used to induce VMExit as it is unconditionally loaded on all implementations of VMX, has an invalid value that is writable on a 32-bit system and its consistency check is performed relatively early in all implementations (the exact order of consistency checks is micro-architectural). Unfortunately, since the "passing" case causes a VMExit, KVM must be extra diligent to ensure that host state is restored, e.g. DR7 and RFLAGS are reset on VMExit. Failure to restore RFLAGS.IF is particularly fatal. And of course the extra VMEnter and VMExit impacts performance. The raw overhead of the early consistency checks is ~6% on modern hardware (though this could easily vary based on configuration), while the added latency observed from the L1 VMM is ~10%. The early consistency checks do not occur in a vacuum, e.g. spending more time in L0 can lead to more interrupts being serviced while emulating VMEnter, thereby increasing the latency observed by L1. Add a module param, early_consistency_checks, to provide control over whether or not VMX performs the early consistency checks. In addition to standard on/off behavior, the param accepts a value of -1, which is essentialy an "auto" setting whereby KVM does the early checks only when it thinks it's running on bare metal. When running nested, doing early checks is of dubious value since the resulting behavior is heavily dependent on L0. In the future, the "auto" setting could also be used to default to skipping the early hardware checks for certain configurations/platforms if KVM reaches a state where it has 100% coverage of VMFail conditions. [1] To my knowledge no one has implemented and tested full software emulation of the VMFail consistency checks. Until that happens, one can only speculate about the actual performance overhead of doing all VMFail consistency checks in software. Obviously any code is slower than no code, but in the grand scheme of nested virtualization it's entirely possible the overhead is negligible. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit 5a5e8a15d76e6dd62e3a94fea499057bd048abbc Author: Sean Christopherson Date: Wed Sep 26 09:23:56 2018 -0700 KVM: vmx: write HOST_IA32_EFER in vmx_set_constant_host_state() EFER is constant in the host and writing it once during setup means we can skip writing the host value in add_atomic_switch_msr_special(). Signed-off-by: Sean Christopherson Reviewed-by: Jim Mattson Signed-off-by: Paolo Bonzini commit 09abb5e3e5e50eef72b09adaa798b7ef0ce9239b Author: Sean Christopherson Date: Wed Sep 26 09:23:55 2018 -0700 KVM: nVMX: call kvm_skip_emulated_instruction in nested_vmx_{fail,succeed} ... as every invocation of nested_vmx_{fail,succeed} is immediately followed by a call to kvm_skip_emulated_instruction(). This saves a bit of code and eliminates some silly paths, e.g. nested_vmx_run() ended up with a goto label purely used to call and return kvm_skip_emulated_instruction(). Signed-off-by: Sean Christopherson Reviewed-by: Jim Mattson Signed-off-by: Paolo Bonzini commit c37a6116d85c7eda541769a2b3ba4c6c9164002e Author: Sean Christopherson Date: Wed Sep 26 09:23:54 2018 -0700 KVM: nVMX: do not call nested_vmx_succeed() for consistency check VMExit EFLAGS is set to a fixed value on VMExit, calling nested_vmx_succeed() is unnecessary and wrong. Signed-off-by: Sean Christopherson Reviewed-by: Jim Mattson Signed-off-by: Paolo Bonzini commit cb61de2f4819b248dfb3f1380e046ab1276c5227 Author: Sean Christopherson Date: Wed Sep 26 09:23:53 2018 -0700 KVM: nVMX: do not skip VMEnter instruction that succeeds A successful VMEnter is essentially a fancy indirect branch that pulls the target RIP from the VMCS. Skipping the instruction is unnecessary (RIP will get overwritten by the VMExit handler) and is problematic because it can incorrectly suppress a #DB due to EFLAGS.TF when a VMFail is detected by hardware (happens after we skip the instruction). Now that vmx_nested_run() is not prematurely skipping the instr, use the full kvm_skip_emulated_instruction() in the VMFail path of nested_vmx_vmexit(). We also need to explicitly update the GUEST_INTERRUPTIBILITY_INFO when loading vmcs12 host state. Signed-off-by: Sean Christopherson Reviewed-by: Jim Mattson Signed-off-by: Paolo Bonzini commit 16fb9a46c54d1617dbc9b6baf0538abf9c004421 Author: Sean Christopherson Date: Wed Sep 26 09:23:52 2018 -0700 KVM: nVMX: do early preparation of vmcs02 before check_vmentry_postreqs() In anticipation of using vmcs02 to do early consistency checks, move the early preparation of vmcs02 prior to checking the postreqs. The downside of this approach is that we'll unnecessary load vmcs02 in the case that check_vmentry_postreqs() fails, but that is essentially our slow path anyways (not actually slow, but it's the path we don't really care about optimizing). Signed-off-by: Sean Christopherson Reviewed-by: Jim Mattson Signed-off-by: Paolo Bonzini commit 9d6105b2b59fbe899eb07ff03d3993ba910f8b85 Author: Sean Christopherson Date: Wed Sep 26 09:23:51 2018 -0700 KVM: nVMX: initialize vmcs02 constant exactly once (per VMCS) Add a dedicated flag to track if vmcs02 has been initialized, i.e. the constant state for vmcs02 has been written to the backing VMCS. The launched flag (in struct loaded_vmcs) gets cleared on logical CPU migration to mirror hardware behavior[1], i.e. using the launched flag to determine whether or not vmcs02 constant state needs to be initialized results in unnecessarily re-initializing the VMCS when migrating between logical CPUS. [1] The active VMCS needs to be VMCLEARed before it can be migrated to a different logical CPU. Hardware's VMCS cache is per-CPU and is not coherent between CPUs. VMCLEAR flushes the cache so that any dirty data is written back to memory. A side effect of VMCLEAR is that it also clears the VMCS's internal launch flag, which KVM must mirror because VMRESUME must be used to run a previously launched VMCS. Suggested-by: Jim Mattson Signed-off-by: Sean Christopherson Reviewed-by: Jim Mattson Signed-off-by: Paolo Bonzini commit 09abe32002665f97e61b42af0a045080663e9e7d Author: Sean Christopherson Date: Wed Sep 26 09:23:50 2018 -0700 KVM: nVMX: split pieces of prepare_vmcs02() to prepare_vmcs02_early() Add prepare_vmcs02_early() and move pieces of prepare_vmcs02() to the new function. prepare_vmcs02_early() writes the bits of vmcs02 that a) must be in place to pass the VMFail consistency checks (assuming vmcs12 is valid) and b) are needed recover from a VMExit, e.g. host state that is loaded on VMExit. Splitting the functionality will enable KVM to leverage hardware to do VMFail consistency checks via a dry run of VMEnter and recover from a potential VMExit without having to fully initialize vmcs02. Add prepare_vmcs02_constant_state() to handle writing vmcs02 state that comes from vmcs01 and never changes, i.e. we don't need to rewrite any of the vmcs02 that is effectively constant once defined. Signed-off-by: Sean Christopherson Reviewed-by: Jim Mattson Signed-off-by: Paolo Bonzini commit 860ff2aa84d386ba3576ef5c6e2b6dcb7de26a05 Author: Sean Christopherson Date: Wed Sep 26 09:23:49 2018 -0700 KVM: VMX: remove ASSERT() on vmx->pml_pg validity vmx->pml_pg is allocated by vmx_create_vcpu() and is only nullified when the vCPU is destroyed by vmx_free_vcpu(). Remove the ASSERTs on vmx->pml_pg, there is no need to carry debug code that provides no value to the current code base. Signed-off-by: Sean Christopherson Reviewed-by: Jim Mattson Signed-off-by: Paolo Bonzini commit 39f9c3885c70fd08ff0f8031d32d6fb1098f0118 Author: Sean Christopherson Date: Wed Sep 26 09:23:48 2018 -0700 KVM: vVMX: rename label for post-enter_guest_mode consistency check Rename 'fail' to 'vmentry_fail_vmexit_guest_mode' to make it more obvious that it's simply a different entry point to the VMExit path, whose purpose is unwind the updates done prior to calling prepare_vmcs02(). Signed-off-by: Sean Christopherson Reviewed-by: Jim Mattson Signed-off-by: Paolo Bonzini commit a633e41e736279c6d3174f52deeb9b8b5fa85e13 Author: Sean Christopherson Date: Wed Sep 26 09:23:47 2018 -0700 KVM: nVMX: assimilate nested_vmx_entry_failure() into nested_vmx_enter_non_root_mode() Handling all VMExits due to failed consistency checks on VMEnter in nested_vmx_enter_non_root_mode() consolidates all relevant code into a single location, and removing nested_vmx_entry_failure() eliminates a confusing function name and label. For a VMEntry, "fail" and its derivatives has a very specific meaning due to the different behavior of a VMEnter VMFail versus VMExit, i.e. it wasn't obvious that nested_vmx_entry_failure() handled VMExit scenarios. Signed-off-by: Sean Christopherson Reviewed-by: Jim Mattson Signed-off-by: Paolo Bonzini commit 7671ce21b13b9596163a29f4712cb2451a9b97dc Author: Sean Christopherson Date: Wed Sep 26 09:23:46 2018 -0700 KVM: nVMX: move check_vmentry_postreqs() call to nested_vmx_enter_non_root_mode() In preparation of supporting checkpoint/restore for nested state, commit ca0bde28f2ed ("kvm: nVMX: Split VMCS checks from nested_vmx_run()") modified check_vmentry_postreqs() to only perform the guest EFER consistency checks when nested_run_pending is true. But, in the normal nested VMEntry flow, nested_run_pending is only set after check_vmentry_postreqs(), i.e. the consistency check is being skipped. Alternatively, nested_run_pending could be set prior to calling check_vmentry_postreqs() in nested_vmx_run(), but placing the consistency checks in nested_vmx_enter_non_root_mode() allows us to split prepare_vmcs02() and interleave the preparation with the consistency checks without having to change the call sites of nested_vmx_enter_non_root_mode(). In other words, the rest of the consistency check code in nested_vmx_run() will be joining the postreqs checks in future patches. Fixes: ca0bde28f2ed ("kvm: nVMX: Split VMCS checks from nested_vmx_run()") Signed-off-by: Sean Christopherson Cc: Jim Mattson Reviewed-by: Jim Mattson Signed-off-by: Paolo Bonzini commit d63907dc7dd11d98c8ffbdaf8311987e5a508744 Author: Sean Christopherson Date: Wed Sep 26 09:23:45 2018 -0700 KVM: nVMX: rename enter_vmx_non_root_mode to nested_vmx_enter_non_root_mode ...to be more consistent with the nested VMX nomenclature. Signed-off-by: Sean Christopherson Reviewed-by: Jim Mattson Signed-off-by: Paolo Bonzini commit 3df5c37e55c8f9e20d0e9bf01a4e875f72a738f3 Author: Sean Christopherson Date: Wed Sep 26 09:23:44 2018 -0700 KVM: nVMX: try to set EFER bits correctly when initializing controls VM_ENTRY_IA32E_MODE and VM_{ENTRY,EXIT}_LOAD_IA32_EFER will be explicitly set/cleared as needed by vmx_set_efer(), but attempt to get the bits set correctly when intializing the control fields. Setting the value correctly can avoid multiple VMWrites. Signed-off-by: Sean Christopherson Reviewed-by: Jim Mattson Signed-off-by: Paolo Bonzini commit 02343cf207022ba349a9d66562659fce87144369 Author: Sean Christopherson Date: Wed Sep 26 09:23:43 2018 -0700 KVM: vmx: do not unconditionally clear EFER switching Do not unconditionally call clear_atomic_switch_msr() when updating EFER. This adds up to four unnecessary VMWrites in the case where guest_efer != host_efer, e.g. if the load_on_{entry,exit} bits were already set. Signed-off-by: Sean Christopherson Reviewed-by: Jim Mattson Signed-off-by: Paolo Bonzini commit b7031fd40fcc741b0f9b0c04c8d844e445858b84 Author: Sean Christopherson Date: Wed Sep 26 09:23:42 2018 -0700 KVM: nVMX: reset cache/shadows when switching loaded VMCS Reset the vm_{entry,exit}_controls_shadow variables as well as the segment cache after loading a new VMCS in vmx_switch_vmcs(). The shadows/cache track VMCS data, i.e. they're stale every time we switch to a new VMCS regardless of reason. This fixes a bug where stale control shadows would be consumed after a nested VMExit due to a failed consistency check. Suggested-by: Jim Mattson Signed-off-by: Sean Christopherson Reviewed-by: Jim Mattson Signed-off-by: Paolo Bonzini commit 1abf23fb42f55eece2eefeea1b32aca865a14099 Author: Sean Christopherson Date: Wed Sep 26 09:23:41 2018 -0700 KVM: nVMX: use vm_exit_controls_init() to write exit controls for vmcs02 Write VM_EXIT_CONTROLS using vm_exit_controls_init() when configuring vmcs02, otherwise vm_exit_controls_shadow will be stale. EFER in particular can be corrupted if VM_EXIT_LOAD_IA32_EFER is not updated due to an incorrect shadow optimization, which can crash L0 due to EFER not being loaded on exit. This does not occur with the current code base simply because update_transition_efer() unconditionally clears VM_EXIT_LOAD_IA32_EFER before conditionally setting it, and because a nested guest always starts with VM_EXIT_LOAD_IA32_EFER clear, i.e. we'll only ever unnecessarily clear the bit. That is, until someone optimizes update_transition_efer()... Signed-off-by: Sean Christopherson Reviewed-by: Jim Mattson Signed-off-by: Paolo Bonzini commit 923ca1323196fe727907d4d9e704d7d32a1adbd3 Author: Marcel Ziswiler Date: Tue Aug 14 11:18:05 2018 +0200 clk: tegra: probe deferral error reporting Actually report the error code from devm_regulator_get() which may as well just be a probe deferral. Signed-off-by: Marcel Ziswiler Reviewed-by: Stefan Agner Signed-off-by: Stephen Boyd commit 5b8ba41dafd789a64cdfb2b5ab6b0eb71f821cfc Author: Sean Christopherson Date: Wed Sep 26 09:23:40 2018 -0700 KVM: nVMX: move vmcs12 EPTP consistency check to check_vmentry_prereqs() An invalid EPTP causes a VMFail(VMXERR_ENTRY_INVALID_CONTROL_FIELD), not a VMExit. Signed-off-by: Sean Christopherson Reviewed-by: Jim Mattson Signed-off-by: Paolo Bonzini commit 64a919f7b5d0593227d0ea7976949c1248ec36ba Author: Sean Christopherson Date: Wed Sep 26 09:23:39 2018 -0700 KVM: nVMX: move host EFER consistency checks to VMFail path Invalid host state related to loading EFER on VMExit causes a VMFail(VMXERR_ENTRY_INVALID_HOST_STATE_FIELD), not a VMExit. Signed-off-by: Sean Christopherson Reviewed-by: Jim Mattson Signed-off-by: Paolo Bonzini commit 31fc4f95dddc4ebc9f9596a2720662e15e5d444e Author: Wei Yang Date: Wed Aug 22 21:57:11 2018 +0800 KVM: leverage change to adjust slots->used_slots in update_memslots() update_memslots() is only called by __kvm_set_memory_region(), in which "change" is calculated and indicates how to adjust slots->used_slots * increase by one if it is KVM_MR_CREATE * decrease by one if it is KVM_MR_DELETE * not change for others This patch adjusts slots->used_slots in update_memslots() based on "change" value instead of re-calculate those states again. Signed-off-by: Wei Yang Signed-off-by: Paolo Bonzini commit 3c6e099fa15fdb6fb1892199ed8709012e1294f2 Author: Jim Mattson Date: Thu Sep 13 11:54:48 2018 -0700 KVM: nVMX: Always reflect #NM VM-exits to L1 When bit 3 (corresponding to CR0.TS) of the VMCS12 cr0_guest_host_mask field is clear, the VMCS12 guest_cr0 field does not necessarily hold the current value of the L2 CR0.TS bit, so the code that checked for L2's CR0.TS bit being set was incorrect. Moreover, I'm not sure that the CR0.TS check was adequate. (What if L2's CR0.EM was set, for instance?) Fortunately, lazy FPU has gone away, so L0 has lost all interest in intercepting #NM exceptions. See commit bd7e5b0899a4 ("KVM: x86: remove code for lazy FPU handling"). Therefore, there is no longer any question of which hypervisor gets first dibs. The #NM VM-exit should always be reflected to L1. (Note that the corresponding bit must be set in the VMCS12 exception_bitmap field for there to be an #NM VM-exit at all.) Fixes: ccf9844e5d99c ("kvm, vmx: Really fix lazy FPU on nested guest") Reported-by: Abhiroop Dabral Signed-off-by: Jim Mattson Reviewed-by: Peter Shier Tested-by: Abhiroop Dabral Reviewed-by: Liran Alon Signed-off-by: Paolo Bonzini commit 214ff83d4473a7757fa18a64dc7efe3b0e158486 Author: Vitaly Kuznetsov Date: Wed Sep 26 19:02:59 2018 +0200 KVM: x86: hyperv: implement PV IPI send hypercalls Using hypercall for sending IPIs is faster because this allows to specify any number of vCPUs (even > 64 with sparse CPU set), the whole procedure will take only one VMEXIT. Current Hyper-V TLFS (v5.0b) claims that HvCallSendSyntheticClusterIpi hypercall can't be 'fast' (passing parameters through registers) but apparently this is not true, Windows always uses it as 'fast' so we need to support that. Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini commit 2cefc5feb80cf4237890a6a4582a0d20e50d9ced Author: Vitaly Kuznetsov Date: Wed Sep 26 19:02:58 2018 +0200 KVM: x86: hyperv: optimize kvm_hv_flush_tlb() for vp_index == vcpu_idx case VP inedx almost always matches VCPU and when it does it's faster to walk the sparse set instead of all vcpus. Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini commit 0b0a31badb2d98967175c6812ac81db20f9a67fc Author: Vitaly Kuznetsov Date: Wed Sep 26 19:02:57 2018 +0200 KVM: x86: hyperv: valid_bank_mask should be 'u64' This probably doesn't matter much (KVM_MAX_VCPUS is much lower nowadays) but valid_bank_mask is really u64 and not unsigned long. Signed-off-by: Vitaly Kuznetsov Reviewed-by: Roman Kagan Signed-off-by: Paolo Bonzini commit 87ee613d076351950b74383215437f841ebbeb75 Author: Vitaly Kuznetsov Date: Wed Sep 26 19:02:56 2018 +0200 KVM: x86: hyperv: keep track of mismatched VP indexes In most common cases VP index of a vcpu matches its vcpu index. Userspace is, however, free to set any mapping it wishes and we need to account for that when we need to find a vCPU with a particular VP index. To keep search algorithms optimal in both cases introduce 'num_mismatched_vp_indexes' counter showing how many vCPUs with mismatching VP index we have. In case the counter is zero we can assume vp_index == vcpu_idx. Signed-off-by: Vitaly Kuznetsov Reviewed-by: Roman Kagan Signed-off-by: Paolo Bonzini commit 1779a39f786397760ae7a7cc03cf37697d8ae58d Author: Vitaly Kuznetsov Date: Wed Sep 26 19:02:55 2018 +0200 KVM: x86: hyperv: consistently use 'hv_vcpu' for 'struct kvm_vcpu_hv' variables Rename 'hv' to 'hv_vcpu' in kvm_hv_set_msr/kvm_hv_get_msr(); 'hv' is 'reserved' for 'struct kvm_hv' variables across the file. Signed-off-by: Vitaly Kuznetsov Reviewed-by: Roman Kagan Signed-off-by: Paolo Bonzini commit a812297c4fd9c2c9337b451ad8d66083c5b24ceb Author: Vitaly Kuznetsov Date: Wed Aug 22 12:18:29 2018 +0200 KVM: x86: hyperv: optimize 'all cpus' case in kvm_hv_flush_tlb() We can use 'NULL' to represent 'all cpus' case in kvm_make_vcpus_request_mask() and avoid building vCPU mask with all vCPUs. Suggested-by: Radim Krčmář Signed-off-by: Vitaly Kuznetsov Reviewed-by: Roman Kagan Signed-off-by: Paolo Bonzini commit 9170200ec0ebad70e5b9902bc93e2b1b11456a3b Author: Vitaly Kuznetsov Date: Wed Aug 22 12:18:28 2018 +0200 KVM: x86: hyperv: enforce vp_index < KVM_MAX_VCPUS Hyper-V TLFS (5.0b) states: > Virtual processors are identified by using an index (VP index). The > maximum number of virtual processors per partition supported by the > current implementation of the hypervisor can be obtained through CPUID > leaf 0x40000005. A virtual processor index must be less than the > maximum number of virtual processors per partition. Forbid userspace to set VP_INDEX above KVM_MAX_VCPUS. get_vcpu_by_vpidx() can now be optimized to bail early when supplied vpidx is >= KVM_MAX_VCPUS. Signed-off-by: Vitaly Kuznetsov Reviewed-by: Roman Kagan Signed-off-by: Paolo Bonzini commit 0624fca9512d08cbd9b5d098d904c840d3432404 Author: Paolo Bonzini Date: Mon Oct 1 16:07:18 2018 +0200 kvm/x86: return meaningful value from KVM_SIGNAL_MSI If kvm_apic_map_get_dest_lapic() finds a disabled LAPIC, it will return with bitmap==0 and (*r == -1) will be returned to userspace. QEMU may then record "KVM: injection failed, MSI lost (Operation not permitted)" in its log, which is quite puzzling. Reported-by: Peng Hao Signed-off-by: Paolo Bonzini commit 4fef0f491347785dfd4cca206b80f75c4ec2dc9f Author: Wei Yang Date: Fri Sep 28 22:08:50 2018 +0800 KVM: x86: move definition PT_MAX_HUGEPAGE_LEVEL and KVM_NR_PAGE_SIZES together Currently, there are two definitions related to huge page, but a little bit far from each other and seems loosely connected: * KVM_NR_PAGE_SIZES defines the number of different size a page could map * PT_MAX_HUGEPAGE_LEVEL means the maximum level of huge page The number of different size a page could map equals the maximum level of huge page, which is implied by current definition. While current implementation may not be kind to readers and further developers: * KVM_NR_PAGE_SIZES looks like a stand alone definition at first sight * in case we need to support more level, two places need to change This patch tries to make these two definition more close, so that reader and developer would feel more comfortable to manipulate. Signed-off-by: Wei Yang Signed-off-by: Paolo Bonzini commit aaa45da24e5d8f3906a6500a3e0da64877d69f04 Author: Tianyu Lan Date: Fri Sep 28 12:45:16 2018 +0000 KVM/VMX: Remve unused function is_external_interrupt(). is_external_interrupt() is not used now and so remove it. Signed-off-by: Lan Tianyu Signed-off-by: Paolo Bonzini commit daefb7949e661e2ee5e40dc5ca51e5bf42f6c823 Author: Wei Yang Date: Tue Sep 4 23:57:32 2018 +0800 KVM: x86: return 0 in case kvm_mmu_memory_cache has min number of objects The code tries to pre-allocate *min* number of objects, so it is ok to return 0 when the kvm_mmu_memory_cache meets the requirement. Signed-off-by: Wei Yang Signed-off-by: Paolo Bonzini commit 55c1dcd80bdf0e9cf30a963fffd3131145f26938 Author: Krish Sadhukhan Date: Thu Sep 27 14:33:27 2018 -0400 nVMX x86: Make nested_vmx_check_pml_controls() concise Suggested-by: Jim Mattson Signed-off-by: Krish Sadhukhan Reviewed-by: Mark Kanda Reviewed-by: Jim Mattson Signed-off-by: Paolo Bonzini commit 3ff519f29d98ecdc1961d825d105d68711093b6b Author: Wei Yang Date: Thu Sep 6 05:58:16 2018 +0800 KVM: x86: adjust kvm_mmu_page member to save 8 bytes On a 64bits machine, struct is naturally aligned with 8 bytes. Since kvm_mmu_page member *unsync* and *role* are less then 4 bytes, we can rearrange the sequence to compace the struct. As the comment shows, *role* and *gfn* are used to key the shadow page. In order to keep the comment valid, this patch moves the *unsync* up and exchange the position of *role* and *gfn*. From /proc/slabinfo, it shows the size of kvm_mmu_page is 8 bytes less and with one more object per slap after applying this patch. # name kvm_mmu_page_header 0 0 168 24 kvm_mmu_page_header 0 0 160 25 Signed-off-by: Wei Yang Signed-off-by: Paolo Bonzini commit bd18bffca35397214ae68d85cf7203aca25c3c1d Author: Sean Christopherson Date: Wed Aug 22 14:57:07 2018 -0700 KVM: nVMX: restore host state in nested_vmx_vmexit for VMFail A VMEnter that VMFails (as opposed to VMExits) does not touch host state beyond registers that are explicitly noted in the VMFail path, e.g. EFLAGS. Host state does not need to be loaded because VMFail is only signaled for consistency checks that occur before the CPU starts to load guest state, i.e. there is no need to restore any state as nothing has been modified. But in the case where a VMFail is detected by hardware and not by KVM (due to deferring consistency checks to hardware), KVM has already loaded some amount of guest state. Luckily, "loaded" only means loaded to KVM's software model, i.e. vmcs01 has not been modified. So, unwind our software model to the pre-VMEntry host state. Not restoring host state in this VMFail path leads to a variety of failures because we end up with stale data in vcpu->arch, e.g. CR0, CR4, EFER, etc... will all be out of sync relative to vmcs01. Any significant delta in the stale data is all but guaranteed to crash L1, e.g. emulation of SMEP, SMAP, UMIP, WP, etc... will be wrong. An alternative to this "soft" reload would be to load host state from vmcs12 as if we triggered a VMExit (as opposed to VMFail), but that is wildly inconsistent with respect to the VMX architecture, e.g. an L1 VMM with separate VMExit and VMFail paths would explode. Note that this approach does not mean KVM is 100% accurate with respect to VMX hardware behavior, even at an architectural level (the exact order of consistency checks is microarchitecture specific). But 100% emulation accuracy isn't the goal (with this patch), rather the goal is to be consistent in the information delivered to L1, e.g. a VMExit should not fall-through VMENTER, and a VMFail should not jump to HOST_RIP. This technically reverts commit "5af4157388ad (KVM: nVMX: Fix mmu context after VMLAUNCH/VMRESUME failure)", but retains the core aspects of that patch, just in an open coded form due to the need to pull state from vmcs01 instead of vmcs12. Restoring host state resolves a variety of issues introduced by commit "4f350c6dbcb9 (kvm: nVMX: Handle deferred early VMLAUNCH/VMRESUME failure properly)", which remedied the incorrect behavior of treating VMFail like VMExit but in doing so neglected to restore arch state that had been modified prior to attempting nested VMEnter. A sample failure that occurs due to stale vcpu.arch state is a fault of some form while emulating an LGDT (due to emulated UMIP) from L1 after a failed VMEntry to L3, in this case when running the KVM unit test test_tpr_threshold_values in L1. L0 also hits a WARN in this case due to a stale arch.cr4.UMIP. L1: BUG: unable to handle kernel paging request at ffffc90000663b9e PGD 276512067 P4D 276512067 PUD 276513067 PMD 274efa067 PTE 8000000271de2163 Oops: 0009 [#1] SMP CPU: 5 PID: 12495 Comm: qemu-system-x86 Tainted: G W 4.18.0-rc2+ #2 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 0.0.0 02/06/2015 RIP: 0010:native_load_gdt+0x0/0x10 ... Call Trace: load_fixmap_gdt+0x22/0x30 __vmx_load_host_state+0x10e/0x1c0 [kvm_intel] vmx_switch_vmcs+0x2d/0x50 [kvm_intel] nested_vmx_vmexit+0x222/0x9c0 [kvm_intel] vmx_handle_exit+0x246/0x15a0 [kvm_intel] kvm_arch_vcpu_ioctl_run+0x850/0x1830 [kvm] kvm_vcpu_ioctl+0x3a1/0x5c0 [kvm] do_vfs_ioctl+0x9f/0x600 ksys_ioctl+0x66/0x70 __x64_sys_ioctl+0x16/0x20 do_syscall_64+0x4f/0x100 entry_SYSCALL_64_after_hwframe+0x44/0xa9 L0: WARNING: CPU: 2 PID: 3529 at arch/x86/kvm/vmx.c:6618 handle_desc+0x28/0x30 [kvm_intel] ... CPU: 2 PID: 3529 Comm: qemu-system-x86 Not tainted 4.17.2-coffee+ #76 Hardware name: Intel Corporation Kabylake Client platform/KBL S RIP: 0010:handle_desc+0x28/0x30 [kvm_intel] ... Call Trace: kvm_arch_vcpu_ioctl_run+0x863/0x1840 [kvm] kvm_vcpu_ioctl+0x3a1/0x5c0 [kvm] do_vfs_ioctl+0x9f/0x5e0 ksys_ioctl+0x66/0x70 __x64_sys_ioctl+0x16/0x20 do_syscall_64+0x49/0xf0 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Fixes: 5af4157388ad (KVM: nVMX: Fix mmu context after VMLAUNCH/VMRESUME failure) Fixes: 4f350c6dbcb9 (kvm: nVMX: Handle deferred early VMLAUNCH/VMRESUME failure properly) Cc: Jim Mattson Cc: Krish Sadhukhan Cc: Paolo Bonzini Cc: Radim KrÄmář Cc: Wanpeng Li Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit cfb634fe3052aefc4e1360fa322018c9a0b49755 Author: Jim Mattson Date: Fri Sep 21 10:36:17 2018 -0700 KVM: nVMX: Clear reserved bits of #DB exit qualification According to volume 3 of the SDM, bits 63:15 and 12:4 of the exit qualification field for debug exceptions are reserved (cleared to 0). However, the SDM is incorrect about bit 16 (corresponding to DR6.RTM). This bit should be set if a debug exception (#DB) or a breakpoint exception (#BP) occurred inside an RTM region while advanced debugging of RTM transactional regions was enabled. Note that this is the opposite of DR6.RTM, which "indicates (when clear) that a debug exception (#DB) or breakpoint exception (#BP) occurred inside an RTM region while advanced debugging of RTM transactional regions was enabled." There is still an issue with stale DR6 bits potentially being misreported for the current debug exception. DR6 should not have been modified before vectoring the #DB exception, and the "new DR6 bits" should be available somewhere, but it was and they aren't. Fixes: b96fb439774e1 ("KVM: nVMX: fixes to nested virt interrupt injection") Signed-off-by: Jim Mattson Reviewed-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit 5b8ee8792f6bda46978e6e86fda4650bcbae07ab Author: Andrew Jones Date: Tue Sep 18 19:54:36 2018 +0200 kvm: selftests: support high GPAs in dirty_log_test Signed-off-by: Andrew Jones Signed-off-by: Paolo Bonzini commit e28934e661c1d9425f1cc41b405dcd8626507206 Author: Andrew Jones Date: Tue Sep 18 19:54:35 2018 +0200 kvm: selftests: stop lying to aarch64 tests about PA-bits Let's add the 40 PA-bit versions of the VM modes, that AArch64 should have been using, so we can extend the dirty log test without breaking things. Signed-off-by: Andrew Jones Signed-off-by: Paolo Bonzini commit e1b376f140ad9cbb1e1976f347377b8ef08a5bc9 Author: Andrew Jones Date: Tue Sep 18 19:54:34 2018 +0200 kvm: selftests: dirty_log_test: also test 64K pages on aarch64 Signed-off-by: Andrew Jones Signed-off-by: Paolo Bonzini commit fff8dcd7b4a242e3752d6f316967b02f933031d0 Author: Andrew Jones Date: Tue Sep 18 19:54:32 2018 +0200 kvm: selftests: port dirty_log_test to aarch64 While we're messing with the code for the port and to support guest page sizes that are less than the host page size, we also make some code formatting cleanups and apply sync_global_to_guest(). Signed-off-by: Andrew Jones Signed-off-by: Paolo Bonzini commit 81d1cca0c062a589953eef7e98f1e68b8222a918 Author: Andrew Jones Date: Tue Sep 18 19:54:33 2018 +0200 kvm: selftests: introduce new VM mode for 64K pages Rename VM_MODE_FLAT48PG to be more descriptive of its config and add a new config that has the same parameters, except with 64K pages. Signed-off-by: Andrew Jones Signed-off-by: Paolo Bonzini commit febb6548498f6c22dfb40d48c7c52b03a4263407 Author: Anson Huang Date: Wed Aug 8 12:39:27 2018 +0800 clk: imx: imx7d: remove clks_init_on array Clock framework will enable those clocks registered with CLK_IS_CRITICAL flag, so no need to have clks_init_on array during clock initialization now. Signed-off-by: Anson Huang Signed-off-by: Stephen Boyd commit 686b8b8c7f99cc9f6c340b14935ccaa8bf1b99af Author: Anson Huang Date: Wed Aug 8 12:39:26 2018 +0800 clk: imx: imx7d: remove unnecessary clocks from clks_init_on array On i.MX7D, IMX7D_NAND_USDHC_BUS_ROOT_CLK is NOT necessary for system, and IMX7D_AHB_CHANNEL_ROOT_CLK is NOT existing at all, remove them from clks_init_on array. Signed-off-by: Anson Huang Signed-off-by: Stephen Boyd commit 0bec140fb6c106a70aac183e5fa99de0ef1d161a Author: Andrew Jones Date: Tue Sep 18 19:54:31 2018 +0200 kvm: selftests: add vcpu support for aarch64 This code adds VM and VCPU setup code for the VM_MODE_FLAT48PG mode. The VM_MODE_FLAT48PG isn't yet fully supportable, as it defines the guest physical address limit as 52-bits, and KVM currently only supports guests with up to 40-bit physical addresses (see KVM_PHYS_SHIFT). VM_MODE_FLAT48PG will work fine, though, as long as no >= 40-bit physical addresses are used. Signed-off-by: Andrew Jones Signed-off-by: Paolo Bonzini commit 7a6629ef746d1a50cc9247bd7c92ce6b38b8ed68 Author: Andrew Jones Date: Tue Sep 18 19:54:30 2018 +0200 kvm: selftests: add virt mem support for aarch64 Signed-off-by: Andrew Jones Signed-off-by: Paolo Bonzini commit d5106539cfef362e3870b6aa8b5ca587cd67e93d Author: Andrew Jones Date: Tue Sep 18 19:54:29 2018 +0200 kvm: selftests: add vm_phy_pages_alloc Signed-off-by: Andrew Jones Signed-off-by: Paolo Bonzini commit eabe7881d264fd8ee074636fe50c8a8af08fedfd Author: Andrew Jones Date: Tue Sep 18 19:54:28 2018 +0200 kvm: selftests: tidy up kvm_util Tidy up kvm-util code: code/comment formatting, remove unused code, and move x86 specific code out. We also move vcpu_dump() out of common code, because not all arches (AArch64) have KVM_GET_REGS. Signed-off-by: Andrew Jones Signed-off-by: Paolo Bonzini commit eea192bfd96db157151d27dd9c5e3e6a50c5d6be Author: Andrew Jones Date: Tue Sep 18 19:54:27 2018 +0200 kvm: selftests: add cscope make target Signed-off-by: Andrew Jones Signed-off-by: Paolo Bonzini commit cc68765d418721ab854a03626c01e8eb82711922 Author: Andrew Jones Date: Tue Sep 18 19:54:26 2018 +0200 kvm: selftests: move arch-specific files to arch-specific locations Signed-off-by: Andrew Jones Signed-off-by: Paolo Bonzini commit 14c47b7530e2db1ab1d42ebbe99b2a58b8443ce7 Author: Andrew Jones Date: Tue Sep 18 19:54:25 2018 +0200 kvm: selftests: introduce ucall Rework the guest exit to userspace code to generalize the concept into what it is, a "hypercall to userspace", and provide two implementations of it: the PortIO version currently used, but only useable by x86, and an MMIO version that other architectures (except s390) can use. Signed-off-by: Andrew Jones Signed-off-by: Paolo Bonzini commit 6c930268bcc4cef62194daf151097d2b94f67718 Author: Andrew Jones Date: Tue Sep 18 19:54:24 2018 +0200 kvm: selftests: vcpu_setup: set cr4.osfxsr Guest code may want to call functions that have variable arguments. To do so, we either need to compile with -mno-sse or enable SSE in the VCPUs. As it should be pretty safe to turn on the feature, and -mno-sse would make linking test code with standard libraries difficult, we choose the feature enabling. Signed-off-by: Andrew Jones Signed-off-by: Paolo Bonzini commit 3b8a5df6c4dc6df2ab17d099fb157032f80bdca2 Author: Wanpeng Li Date: Tue Oct 9 09:02:08 2018 +0800 KVM: LAPIC: Tune lapic_timer_advance_ns automatically In cloud environment, lapic_timer_advance_ns is needed to be tuned for every CPU generations, and every host kernel versions(the kvm-unit-tests/tscdeadline_latency.flat is 5700 cycles for upstream kernel and 9600 cycles for our 3.10 product kernel, both preemption_timer=N, Skylake server). This patch adds the capability to automatically tune lapic_timer_advance_ns step by step, the initial value is 1000ns as 'commit d0659d946be0 ("KVM: x86: add option to advance tscdeadline hrtimer expiration")' recommended, it will be reduced when it is too early, and increased when it is too late. The guest_tsc and tsc_deadline are hard to equal, so we assume we are done when the delta is within a small scope e.g. 100 cycles. This patch reduces latency (kvm-unit-tests/tscdeadline_latency, busy waits, preemption_timer enabled) from ~2600 cyles to ~1200 cyles on our Skylake server. Cc: Paolo Bonzini Cc: Radim Krčmář Cc: Liran Alon Signed-off-by: Wanpeng Li Signed-off-by: Paolo Bonzini commit 0bfe7d3cae58f02a05c39fba6829d6e7b50802f5 Author: Nathan Chancellor Date: Thu Sep 20 17:27:23 2018 -0700 scsi: qla2xxx: Simplify conditional check Clang generates a warning when it sees a logical not followed by a conditional operator like ==, >, or < because it thinks that the logical not should be applied to the whole statement: drivers/scsi/qla2xxx/qla_nx.c:3702:7: warning: logical not is only applied to the left hand side of this comparison [-Wlogical-not-parentheses] if (!qla2x00_eh_wait_for_pending_commands(vha, 0, 0, ^ drivers/scsi/qla2xxx/qla_nx.c:3702:7: note: add parentheses after the '!' to evaluate the comparison first if (!qla2x00_eh_wait_for_pending_commands(vha, 0, 0, ^ ( drivers/scsi/qla2xxx/qla_nx.c:3702:7: note: add parentheses around left hand side expression to silence this warning if (!qla2x00_eh_wait_for_pending_commands(vha, 0, 0, ^ ( 1 warning generated. It assumes the author might have made a mistake in their logic: if (!a == b) -> if (!(a == b)) Sometimes that is the case; other times, it's just a super convoluted way of saying 'if (a)' when b = 0: if (!1 == 0) -> if (0 == 0) -> if (true) Alternatively: if (!1 == 0) -> if (!!1) -> if (1) Simplify this comparison so that Clang doesn't complain. Link: https://github.com/ClangBuiltLinux/linux/issues/80 Signed-off-by: Nathan Chancellor Signed-off-by: Martin K. Petersen commit 9032c10e94fc44bb3245dc7f0d52aeeb3e8715b6 Merge: ab9e08482122 44b6fed0c16e Author: Alexei Starovoitov Date: Tue Oct 16 15:23:59 2018 -0700 Merge branch 'nfp-improve-bpf-offload' Jakub Kicinski says: ==================== this set adds check to make sure offload behaviour is correct. First when atomic counters are used, we must make sure the map does not already contain data we did not prepare for holding atomics. Second patch double checks vNIC capabilities for program offload in case program is shared by multiple vNICs with different constraints. ==================== Signed-off-by: Alexei Starovoitov commit 44b6fed0c16ea0057292d57c381a31e8986fa7a7 Author: Jakub Kicinski Date: Tue Oct 16 15:19:10 2018 -0700 nfp: bpf: double check vNIC capabilities after object sharing Program translation stage checks that program can be offloaded to the netdev which was passed during the load (bpf_attr->prog_ifindex). After program sharing was introduced, however, the netdev on which program is loaded can theoretically be different, and therefore we should recheck the program size and max stack size at load time. This was found by code inspection, AFAIK today all vNICs have identical caps. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet Signed-off-by: Alexei Starovoitov commit 527db74b71ee5a279f818aae51f2c26b4e5c7648 Author: Jakub Kicinski Date: Tue Oct 16 15:19:09 2018 -0700 nfp: bpf: protect against mis-initializing atomic counters Atomic operations on the NFP are currently always in big endian. The driver keeps track of regions of memory storing atomic values and byte swaps them accordingly. There are corner cases where the map values may be initialized before the driver knows they are used as atomic counters. This can happen either when the datapath is performing the update and the stack contents are unknown or when map is updated before the program which will use it for atomic values is loaded. To avoid situation where user initializes the value to 0 1 2 3 and then after loading a program which uses the word as an atomic counter starts reading 3 2 1 0 - only allow atomic counters to be initialized to endian-neutral values. For updates from the datapath the stack information may not be as precise, so just allow initializing such values to 0. Example code which would break: struct bpf_map_def SEC("maps") rxcnt = { .type = BPF_MAP_TYPE_HASH, .key_size = sizeof(__u32), .value_size = sizeof(__u64), .max_entries = 1, }; int xdp_prog1() { __u64 nonzeroval = 3; __u32 key = 0; __u64 *value; value = bpf_map_lookup_elem(&rxcnt, &key); if (!value) bpf_map_update_elem(&rxcnt, &key, &nonzeroval, BPF_ANY); else __sync_fetch_and_add(value, 1); return XDP_PASS; } $ offload bpftool map dump key: 00 00 00 00 value: 00 00 00 03 00 00 00 00 should be: $ offload bpftool map dump key: 00 00 00 00 value: 03 00 00 00 00 00 00 00 Reported-by: David Beckett Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet Signed-off-by: Alexei Starovoitov commit 6498cbc57f258bc3d079cdae6c22583ce3c174d0 Author: Nathan Chancellor Date: Thu Sep 20 16:02:12 2018 -0700 scsi: bfa: Remove unused functions Clang warns when a variable is assigned to itself. drivers/scsi/bfa/bfa_fcbuild.c:199:6: warning: explicitly assigning value of variable of type 'int' to itself [-Wself-assign] len = len; ~~~ ^ ~~~ drivers/scsi/bfa/bfa_fcbuild.c:838:6: warning: explicitly assigning value of variable of type 'int' to itself [-Wself-assign] len = len; ~~~ ^ ~~~ drivers/scsi/bfa/bfa_fcbuild.c:917:6: warning: explicitly assigning value of variable of type 'int' to itself [-Wself-assign] len = len; ~~~ ^ ~~~ drivers/scsi/bfa/bfa_fcbuild.c:981:6: warning: explicitly assigning value of variable of type 'int' to itself [-Wself-assign] len = len; ~~~ ^ ~~~ drivers/scsi/bfa/bfa_fcbuild.c:1008:6: warning: explicitly assigning value of variable of type 'int' to itself [-Wself-assign] len = len; ~~~ ^ ~~~ 5 warnings generated. This construct is usually used to avoid unused variable warnings, which I assume is the case here. -Wunused-parameter is hidden behind -Wextra with GCC 4.6, which is the minimum version to compile the kernel as of commit cafa0010cd51 ("Raise the minimum required gcc version to 4.6"). However, upon further inspection, these functions aren't actually used anywhere; they're just defined. Rather than just removing the self assignments, remove all of this dead code. Link: https://github.com/ClangBuiltLinux/linux/issues/148 Signed-off-by: Nathan Chancellor Signed-off-by: Martin K. Petersen commit 226dfa4726ebb102479d668e01160a1dc77485e8 Author: Paul Cercueil Date: Thu Aug 23 15:17:44 2018 +0200 clk: Add Ingenic jz4725b CGU driver Add support for the clocks provided by the CGU in the Ingenic JZ4725B SoC. Signed-off-by: Paul Cercueil Signed-off-by: Stephen Boyd commit 3e59790e07a94dc3bef541aa044dde36fdb61714 Author: Nathan Chancellor Date: Thu Sep 20 15:17:06 2018 -0700 scsi: qla2xxx: Remove unnecessary self assignment Clang warns when a variable is assigned to itself. drivers/scsi/qla2xxx/qla_mbx.c:1514:4: warning: explicitly assigning value of variable of type 'uint64_t' (aka 'unsigned long long') to itself [-Wself-assign] l = l; ~ ^ ~ 1 warning generated. This construct is usually used to avoid unused variable warnings, which I assume is the case here. -Wunused-parameter is hidden behind -Wextra with GCC 4.6, which is the minimum version to compile the kernel as of commit cafa0010cd51 ("Raise the minimum required gcc version to 4.6"). Just remove this line to silence Clang. Link: https://github.com/ClangBuiltLinux/linux/issues/83 Signed-off-by: Nathan Chancellor Signed-off-by: Martin K. Petersen commit 2fdecde7752be5696c0ae301a0d1b1884081a0f1 Author: Paul Cercueil Date: Thu Aug 23 15:17:43 2018 +0200 dt-bindings: clock: Add jz4725b-cgu.h header This will be used from the devicetree bindings to specify the clocks that should be obtained from the jz4725b-cgu driver. Signed-off-by: Paul Cercueil Reviewed-by: Rob Herring Signed-off-by: Stephen Boyd commit 067b6dedeb34ffda811ebbadf8bbad9311f28dc4 Author: Paul Cercueil Date: Thu Aug 23 15:17:42 2018 +0200 dt-bindings: clock: ingenic: Explicitly list compatible strings This is better than letting the other developers wondering what are the supported strings. Signed-off-by: Paul Cercueil Reviewed-by: Rob Herring Signed-off-by: Stephen Boyd commit 0880fb86608acf1bbf4df9b3580e5a1b58fe8ba6 Author: Paul Cercueil Date: Thu Aug 23 15:17:41 2018 +0200 clk: ingenic: Add proper Kconfig entries Previously, the CGU code corresponding to the SoC for which we're compiling the kernel was the only one enabled, which made it impossible to build one kernel that supports them all. Now, it is possible to select more than one SoC to support. Signed-off-by: Paul Cercueil Signed-off-by: Stephen Boyd commit ab9e084821221b2eda57a512535fe35b49e672d8 Author: Andrey Ignatov Date: Mon Oct 15 22:50:34 2018 -0700 libbpf: Per-symbol visibility for DSO Make global symbols in libbpf DSO hidden by default with -fvisibility=hidden and export symbols that are part of ABI explicitly with __attribute__((visibility("default"))). This is common practice that should prevent from accidentally exporting a symbol, that is not supposed to be a part of ABI what, in turn, improves both libbpf developer- and user-experiences. See [1] for more details. Export control becomes more important since more and more projects use libbpf. The patch doesn't export a bunch of netlink related functions since as agreed in [2] they'll be reworked. That doesn't break bpftool since bpftool links libbpf statically. [1] https://www.akkadia.org/drepper/dsohowto.pdf (2.2 Export Control) [2] https://www.mail-archive.com/netdev@vger.kernel.org/msg251434.html Signed-off-by: Andrey Ignatov Signed-off-by: Alexei Starovoitov commit 242b4a39be7364979cbccf5bc446d8db45cb2014 Author: YueHaibing Date: Fri Oct 12 10:36:23 2018 +0000 scsi: arcmsr: Remove set but not used variables 'id, lun' Fixes gcc '-Wunused-but-set-variable' warning: drivers/scsi/arcmsr/arcmsr_hba.c: In function 'arcmsr_drain_donequeue': drivers/scsi/arcmsr/arcmsr_hba.c:1320:10: warning: variable 'lun' set but not used [-Wunused-but-set-variable] drivers/scsi/arcmsr/arcmsr_hba.c:1320:6: warning: variable 'id' set but not used [-Wunused-but-set-variable] Never used since introduction in commit ae52e7f09ff5 ("arcmsr: Support 1024 scatter-gather list entries and improve AP while FW trapped and behaviors of EHs"). Signed-off-by: YueHaibing Signed-off-by: Martin K. Petersen commit 652f1813c113a3f5169cd1325201fdf9b2d22ded Author: Shefali Jain Date: Wed Oct 10 20:21:38 2018 +0530 clk: qcom: gcc: Add global clock controller driver for QCS404 Add the clocks supported in global clock controller which clock the peripherals like BLSPs, SDCC, USB, MDSS etc. Register all the clocks to the clock framework for the clients to be able to request for them. Signed-off-by: Shefali Jain Signed-off-by: Taniya Das Co-developed-by: Taniya Das Signed-off-by: Anu Ramanathan [bamse, vkoul: rebase and tidyup for upstream] Signed-off-by: Bjorn Andersson Signed-off-by: Vinod Koul Acked-by: Rob Herring [sboyd@kernel.org: Lowercase hex] Signed-off-by: Stephen Boyd commit a3d152e40ed9061d085f405bc71eba81fce63ad6 Author: Bjorn Andersson Date: Wed Oct 10 20:21:37 2018 +0530 clk: qcom: Export clk_alpha_pll_configure() This is used by the QCS404 GCC driver, export it to allow that driver to be compiled as a module.. Signed-off-by: Bjorn Andersson Signed-off-by: Vinod Koul Signed-off-by: Stephen Boyd commit f2a76a2955c0eb7514cdb5885e3d60a973301ae0 Author: Taniya Das Date: Tue Sep 25 18:35:58 2018 +0100 clk: qcom: Add Global Clock controller (GCC) driver for SDM660 Add support for the global clock controller found on SDM660 based devices. This should allow most non-multimedia device drivers to probe and control their clocks. Based on CAF implementation. Signed-off-by: Taniya Das [craig: rename parents to fit upstream, and other cleanups] Signed-off-by: Craig Tatlor Acked-by: Rob Herring [sboyd@kernel.org: Rename gcc_660 to gcc_sdm660 and fix numbering of defines to avoid duplicates] Signed-off-by: Stephen Boyd commit 47db7873136a9c57c45390a53b57019cf73c8259 Author: Wenwen Wang Date: Sat Oct 6 13:34:21 2018 -0500 scsi: megaraid_sas: fix a missing-check bug In megasas_mgmt_compat_ioctl_fw(), to handle the structure compat_megasas_iocpacket 'cioc', a user-space structure megasas_iocpacket 'ioc' is allocated before megasas_mgmt_ioctl_fw() is invoked to handle the packet. Since the two data structures have different fields, the data is copied from 'cioc' to 'ioc' field by field. In the copy process, 'sense_ptr' is prepared if the field 'sense_len' is not null, because it will be used in megasas_mgmt_ioctl_fw(). To prepare 'sense_ptr', the user-space data 'ioc->sense_off' and 'cioc->sense_off' are copied and saved to kernel-space variables 'local_sense_off' and 'user_sense_off' respectively. Given that 'ioc->sense_off' is also copied from 'cioc->sense_off', 'local_sense_off' and 'user_sense_off' should have the same value. However, 'cioc' is in the user space and a malicious user can race to change the value of 'cioc->sense_off' after it is copied to 'ioc->sense_off' but before it is copied to 'user_sense_off'. By doing so, the attacker can inject different values into 'local_sense_off' and 'user_sense_off'. This can cause undefined behavior in the following execution, because the two variables are supposed to be same. This patch enforces a check on the two kernel variables 'local_sense_off' and 'user_sense_off' to make sure they are the same after the copy. In case they are not, an error code EINVAL will be returned. Signed-off-by: Wenwen Wang Acked-by: Sumit Saxena Signed-off-by: Martin K. Petersen commit fd13f0517d2f99cfac6a82fe4654aa62ec14284c Author: Colin Ian King Date: Tue Oct 16 18:46:32 2018 +0100 scsi: be2iscsi: fix spelling mistake "Retreiving" -> "Retrieving" Trivial fix to spelling mistake in beiscsi_log message. Signed-off-by: Colin Ian King Signed-off-by: Martin K. Petersen commit c4dba187e69ecb1a1dc390c055325e3752d090fe Author: Colin Ian King Date: Tue Oct 16 18:28:53 2018 +0100 scsi: lpfc: fix spelling mistake "Resrouce" -> "Resource" Trivial fix to spelling mistake in lpfc_printf_log message text. Signed-off-by: Colin Ian King Signed-off-by: Martin K. Petersen commit fe5fb42de36227c1c2dbb1e7403329ec8a915c20 Author: John Garry Date: Tue Oct 16 23:00:36 2018 +0800 scsi: hisi_sas: Fix spin lock management in slot_index_alloc_quirk_v2_hw() Currently a spin_unlock_irqrestore() call is missing on the error path, so add it. Reported-by: Julia Lawall Signed-off-by: John Garry Signed-off-by: Martin K. Petersen commit abaf75dd610ccfe1d085cb17061ac8862aabd2ea Author: Jens Axboe Date: Tue Oct 16 08:38:47 2018 -0600 scsi: sg: remove bad blk_end_request_all() call We just need to free the request here. Additionally, this is currently wrong for a queue that's using MQ currently, it'll crash. Cc: Doug Gilbert Cc: linux-scsi@vger.kernel.org Signed-off-by: Jens Axboe Acked-by: Douglas Gilbert Signed-off-by: Martin K. Petersen commit 0f5cb0e6225cae2f029944cb8c74617aab6ddd49 Author: Ronald Wahl Date: Wed Oct 10 15:54:54 2018 +0200 clk: at91: Fix division by zero in PLL recalc_rate() Commit a982e45dc150 ("clk: at91: PLL recalc_rate() now using cached MUL and DIV values") removed a check that prevents a division by zero. This now causes a stacktrace when booting the kernel on a at91 platform if the PLL DIV register contains zero. This commit reintroduces this check. Fixes: a982e45dc150 ("clk: at91: PLL recalc_rate() now using cached...") Cc: Signed-off-by: Ronald Wahl Acked-by: Ludovic Desroches Signed-off-by: Stephen Boyd commit 8d849275dce493837792a70f710f6bd83c8db5c0 Author: Jens Axboe Date: Tue Oct 16 08:33:16 2018 -0600 scsi: osd: initiator should use mq variant of request ending This is currently wrong since it isn't dependent on if we're using mq or not. At least now it'll be correct when we force mq. Cc: linux-scsi@vger.kernel.org Signed-off-by: Jens Axboe Signed-off-by: Martin K. Petersen commit c1a3308a0629f6467994959aa617c2a31038befa Author: Manivannan Sadhasivam Date: Thu Sep 20 23:01:03 2018 -0700 clk: hisilicon: Add clock driver for Hi3670 SoC Add clock driver for HiSilicon Hi3670 SoC utilizing HiSilicon's common clk code. Signed-off-by: Manivannan Sadhasivam Signed-off-by: Stephen Boyd commit 3b6b13ede0e3129e4449a83dced7d7fd1cd32e8a Author: Manivannan Sadhasivam Date: Thu Sep 20 23:01:00 2018 -0700 dt-bindings: clk: hisilicon: Add bindings for Hi3670 clk Add devicetree bindings for HiSilicon Hi3670 clock controller. Signed-off-by: Manivannan Sadhasivam Reviewed-by: Rob Herring Signed-off-by: Stephen Boyd commit 8985167ecf57f97061599a155bb9652c84ea4913 Author: Krzysztof Kozlowski Date: Wed Aug 29 21:20:10 2018 +0200 clk: s2mps11: Fix matching when built as module and DT node contains compatible When driver is built as module and DT node contains clocks compatible (e.g. "samsung,s2mps11-clk"), the module will not be autoloaded because module aliases won't match. The modalias from uevent: of:NclocksTCsamsung,s2mps11-clk The modalias from driver: platform:s2mps11-clk The devices are instantiated by parent's MFD. However both Device Tree bindings and parent define the compatible for clocks devices. In case of module matching this DT compatible will be used. The issue will not happen if this is a built-in (no need for module matching) or when clocks DT node does not contain compatible (not correct from bindings perspective but working for driver). Note when backporting to stable kernels: adjust the list of device ID entries. Cc: Fixes: 53c31b3437a6 ("mfd: sec-core: Add of_compatible strings for clock MFD cells") Signed-off-by: Krzysztof Kozlowski Acked-by: Stephen Boyd Signed-off-by: Stephen Boyd commit 5d25ff7a544889bc4b749fda31778d6a18dddbcb Author: Gustavo A. R. Silva Date: Tue Oct 16 11:12:23 2018 +0200 scsi: ips: fix missing break in switch Add missing break statement in order to prevent the code from falling through to case TEST_UNIT_READY. Addresses-Coverity-ID: 1357338 ("Missing break in switch") Suggested-by: Martin K. Petersen Signed-off-by: Gustavo A. R. Silva Signed-off-by: Martin K. Petersen commit 5ddf0cdf9395b0f58ec863cefd497626c9ff0ad8 Author: Manivannan Sadhasivam Date: Fri Aug 10 15:21:13 2018 +0530 clk: actions: Add Actions Semi S900 SoC Reset Management Unit support Add Reset Management Unit (RMU) support for Actions Semi S900 SoC. Signed-off-by: Manivannan Sadhasivam Signed-off-by: Stephen Boyd commit c4dd4a2eb6b99f06cf395e22ac8326cf54bd4e07 Author: Manivannan Sadhasivam Date: Fri Aug 10 15:21:12 2018 +0530 clk: actions: Add Actions Semi S700 SoC Reset Management Unit support Add Reset Management Unit (RMU) support for Actions Semi S700 SoC. Signed-off-by: Manivannan Sadhasivam Signed-off-by: Stephen Boyd commit 09dbde0154ab1edbcaef4fef5f9ab12b5449d7fa Author: Manivannan Sadhasivam Date: Fri Aug 10 15:21:11 2018 +0530 clk: actions: Add Actions Semi Owl SoCs Reset Management Unit support Add Reset Management Unit (RMU) support for Actions Semi Owl SoCs. Signed-off-by: Manivannan Sadhasivam Signed-off-by: Stephen Boyd commit a35bcf7c7f28623271c733dd4d41f24a79237754 Author: Manivannan Sadhasivam Date: Fri Aug 10 15:21:08 2018 +0530 dt-bindings: reset: Add binding constants for Actions Semi S900 RMU Add device tree binding constants for Actions Semi S900 SoC Reset Management Unit (RMU). Signed-off-by: Manivannan Sadhasivam Reviewed-by: Rob Herring Signed-off-by: Stephen Boyd commit 73a5e67efa0822ce1773718d7ae24c80bf816c1e Author: Manivannan Sadhasivam Date: Fri Aug 10 15:21:07 2018 +0530 dt-bindings: reset: Add binding constants for Actions Semi S700 RMU Add device tree binding constants for Actions Semi S700 SoC Reset Management Unit (RMU). Signed-off-by: Manivannan Sadhasivam Reviewed-by: Rob Herring Signed-off-by: Stephen Boyd commit 46b5dfab75eea06b84480d0b6fcecbfc7120801f Author: Manivannan Sadhasivam Date: Fri Aug 10 15:21:06 2018 +0530 dt-bindings: clock: Add reset controller bindings for Actions Semi Owl SoCs Add Reset Controller bindings to clock bindings for Actions Semi Owl SoCs, S700 and S900. Signed-off-by: Manivannan Sadhasivam Reviewed-by: Rob Herring Signed-off-by: Stephen Boyd commit 3a23eb725b5c37dae17d1b7e2a2f9dc276ec767c Author: Manivannan Sadhasivam Date: Fri Aug 10 15:21:05 2018 +0530 clk: actions: Cache regmap info in private clock descriptor In order to support the reset controller, regmap info needs to be cached in the private clock descriptor, owl_clk_desc. Hence, save that and also make the clock descriptor struct non const. Signed-off-by: Manivannan Sadhasivam Signed-off-by: Stephen Boyd commit d344b21bf405eed05963627bfed6dd3df422623c Author: Dan Carpenter Date: Thu Jun 14 17:45:23 2018 +0300 drm/amd/amdgpu: Fix debugfs error handling The error handling is wrong and "ent" could be NULL we when dereference it to get "ent->d_inode". The thing is that normally debugfs_create_file() is not supposed to require (or have) any error handling. That function does return error pointers if debugfs is turned off but we know it's enable here. When it's enabled, then it returns NULL on error. So what I did was I stripped out all the error handling except around the i_size_write(). I could have just used a NULL check instead of an IS_ERR_OR_NULL() but I figured this was more clear because that way you don't have to look at the surrounding code to see whether debugfs is enabled or not. Signed-off-by: Dan Carpenter Reviewed-by: Christian König Signed-off-by: Alex Deucher commit c55045adf7210d246a016c961916f078ed31a951 Author: Feifei Xu Date: Tue Oct 16 14:54:46 2018 +0800 drm/amdgpu: Update gc_9_0 golden settings. Add mmDB_DEBUG3 settings. Signed-off-by: Feifei Xu Reviewed-by: Evan Quan Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit e26f70a6539cc9d4b1d2589d1c50b2a2c8b22bea Author: Evan Quan Date: Mon Oct 8 12:41:19 2018 +0800 drm/amd/powerplay: update PPtable with DC BTC and Tvr SocLimit fields Update the PPtable structure to fit the latest SMC firmware. Signed-off-by: Evan Quan Reviewed-by: Feifei Xu Signed-off-by: Alex Deucher commit d579fd827000dfe3c45635fded8bbbbdc78eb5ff Author: Evan Quan Date: Fri Sep 28 16:19:08 2018 +0800 drm/amd/powerplay: added I2C controller configuration PPTABLE structure is stretched to add I2C controller configuration. Hold on the PPTABLE_V20_SMU_VERSION bump until the VBIOS is ready. Signed-off-by: Evan Quan Reviewed-by: Feifei Xu Signed-off-by: Alex Deucher commit dd46e5f0f732cac6746609f54a5f013118e27116 Author: Evan Quan Date: Fri Oct 12 09:37:29 2018 +0800 drm/amdgpu: update Vega20 SDMA golden setting Update SDMA golden settings. Signed-off-by: Evan Quan Reviewed-by: Feifei Xu Signed-off-by: Alex Deucher commit 3df27645395e8f79c0dc20a15cf1da61f376000d Author: Rex Zhu Date: Fri Oct 12 22:26:11 2018 +0800 drm/amdgpu: Fix typo in amdgpu_vmid_mgr_init fix a typo in for loop: i->j Reviewed-by: Christian König Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit aadd4355918fe6e9044a9042fa5968e0a0901681 Author: Daniel Borkmann Date: Tue Oct 16 21:31:35 2018 +0200 tcp, ulp: remove socket lock assertion on ULP cleanup Eric reported that syzkaller triggered a splat in tcp_cleanup_ulp() where assertion sock_owned_by_me() failed. This happened through inet_csk_prepare_forced_close() first releasing the socket lock, then calling into tcp_done(newsk) which is called after the inet_csk_prepare_forced_close() and therefore without the socket lock held. The sock_owned_by_me() assertion can generally be removed as the only place where tcp_cleanup_ulp() is called from now is out of inet_csk_destroy_sock() -> sk->sk_prot->destroy() where socket is in dead state and unreachable. Therefore, add a comment why the check is not needed instead. Fixes: 8b9088f806e1 ("tcp, ulp: enforce sock_owned_by_me upon ulp init and cleanup") Reported-by: Eric Dumazet Signed-off-by: Daniel Borkmann Signed-off-by: David S. Miller commit 94a04d1d3d3681adde1a3e022b25dbac7b345b7e Author: Yonatan Cohen Date: Tue Oct 9 12:05:12 2018 +0300 net/mlx5: Expose DC scatter to CQE capability bit dc_req_scat_data_cqe capability bit determines if requester scatter to cqe is available for 64 bytes CQE over DC transport type. Signed-off-by: Yonatan Cohen Reviewed-by: Guy Levi Signed-off-by: Leon Romanovsky commit 551d315e34a5e6961f8deaf2d6f37ad24fccaa08 Author: Leon Romanovsky Date: Tue Oct 2 11:13:30 2018 +0300 RDMA/umad: Use kernel API to allocate umad indexes Replace custom code to allocate indexes to generic kernel API. Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford commit 90f6e41cc03a4055d56e94ad7c97df4b1add7f61 Author: Leon Romanovsky Date: Tue Oct 2 11:13:29 2018 +0300 RDMA/uverbs: Use kernel API to allocate uverbs indexes Replace custom code to allocate indexes to generic kernel API. Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford commit 7d65cbf0b0ac7d7eebf397ff9af6645b2b3004c2 Author: Leon Romanovsky Date: Tue Oct 2 11:13:28 2018 +0300 RDMA/core: Increase total number of RDMA ports across all devices IDA adds overhead to store IDs bitmap with maximal value of IDA can be upto 2099202 (IDA_MAX = 0x80000000U / IDA_BITMAP_BITS - 1). However, there is no need to add such enormous number of devices and it is enough for now to limit it to be 8192. Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford commit bab5d988841e58fec6ae22f486905ddde2d715f4 Author: Igor Stoppa Date: Fri Sep 7 20:03:37 2018 +0300 dm: remove unnecessary unlikely() around WARN_ON_ONCE() WARN_ON() already contains an unlikely(), so it's not necessary to wrap it into another. Signed-off-by: Igor Stoppa Signed-off-by: Mike Snitzer commit 4585add948b14b45b45b104f2a9653c543819ec4 Author: Florian Fainelli Date: Tue Oct 16 11:31:28 2018 -0700 MAINTAINERS: Add entry for Broadcom SPI controller Add an entry for the Broadcom SPI controller in the MAINTAINERS file. Signed-off-by: Florian Fainelli Signed-off-by: Mark Brown commit 092b5648760a23656f6dcc83b74f4cf661094aca Author: John Pittman Date: Thu Aug 23 13:35:57 2018 -0400 dm zoned: target: use refcount_t for dm zoned reference counters The API surrounding refcount_t should be used in place of atomic_t when variables are being used as reference counters. This API can prevent issues such as counter overflows and use-after-free conditions. Within the dm zoned target stack, the atomic_t API is used for bioctx->ref and cw->refcount. Change these to use refcount_t, avoiding the issues mentioned. Signed-off-by: John Pittman Reviewed-by: Damien Le Moal Tested-by: Damien Le Moal Signed-off-by: Mike Snitzer commit 22d4c291f58752d14efb8a185b772a3fc3e947d2 Author: John Pittman Date: Thu Aug 23 13:35:55 2018 -0400 dm thin: use refcount_t for thin_c reference counting The API surrounding refcount_t should be used in place of atomic_t when variables are being used as reference counters. It can potentially prevent reference counter overflows and use-after-free conditions. In the dm thin layer, one such example is tc->refcount. Change this from the atomic_t API to the refcount_t API to prevent mentioned conditions. Signed-off-by: John Pittman Signed-off-by: Mike Snitzer commit b4c542df5ae83f079f867011a8f7721fb8a1f44c Author: Håkon Bugge Date: Tue Oct 9 15:27:40 2018 +0200 IB/mlx4: Add port and TID to MAD debug print Add said information and make the debug print format consistent. Signed-off-by: Håkon Bugge Acked-by: Leon Romanovsky Signed-off-by: Doug Ledford commit 0a094ff0619607a36c18d07a81d2ea62e6cdf074 Author: Håkon Bugge Date: Tue Oct 9 15:27:39 2018 +0200 IB/mlx4: Enable debug print of SMPs IB Subnet Management Packets (SMPs) were excluded from debug prints. Fixed by enabling print even on QP0 MADs. Signed-off-by: Håkon Bugge Signed-off-by: Doug Ledford commit 1ae4cfa03902c83d1d77123e5ac8f0812c61b90e Author: Parav Pandit Date: Sun Oct 7 12:12:41 2018 +0300 RDMA/core: Rename ports_parent to ports_kobj Normally kobj objects have kobj suffix to reflect it. Rename ports_parent to ports_kobj. Signed-off-by: Parav Pandit Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford commit 0f6ef65d1c6ec8deb5d0f11f86631ec4cfe8f22e Author: Parav Pandit Date: Sun Oct 7 12:12:40 2018 +0300 RDMA/core: Do not expose unsupported counters If the provider driver (such as rdma_rxe) doesn't support pma counters, avoid exposing its directory similar to optional hw_counters directory. If core fails to read the PMA counter, return an error so that user can retry later if needed. Fixes: 35c4cbb17811 ("IB/core: Create get_perf_mad function in sysfs.c") Reported-by: Holger Hoffstätte Tested-by: Holger Hoffstätte Signed-off-by: Parav Pandit Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford commit 60f1fc204940fc0352394866b2af0987fd5b2563 Author: Parav Pandit Date: Sun Oct 7 12:12:39 2018 +0300 IB/mlx4: Refer to the device kobject instead of ports_parent iov sysfs tree is created under ib device at /sys/class/infiniband/mlx4_0/iov. And, ibdev->ports_parent->parent = &ibdev->dev. Therefore, refer to device's kobject directly instead of indirect access to it. Additionally, iov entries are created under device kobject and deleted before device is removed. There is no need to hold additional reference to device kobject in provider driver. Signed-off-by: Parav Pandit Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford commit 05d940d3a3ec4e6d5d6a726aae4d73c5c64603c6 Author: Leon Romanovsky Date: Wed Oct 10 09:19:12 2018 +0300 RDMA/nldev: Allow IB device rename through RDMA netlink Provide an option to rename IB device name through RDMA netlink and limit it to users with ADMIN capability only. Signed-off-by: Leon Romanovsky Reviewed-by: Parav Pandit Signed-off-by: Doug Ledford commit d21943dd19b5c79dc09bb0e8bf80cd5ee09c41c2 Author: Leon Romanovsky Date: Wed Oct 10 09:19:11 2018 +0300 RDMA/core: Implement IB device rename function Generic implementation of IB device rename function. Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford commit cb20f2d2c0507d60d94ef896991e95708f051dd1 Author: Paolo Abeni Date: Tue Oct 16 16:52:05 2018 +0200 netfilter: xt_nat: fix DNAT target for shifted portmap ranges The commit 2eb0f624b709 ("netfilter: add NAT support for shifted portmap ranges") did not set the checkentry/destroy callbacks for the newly added DNAT target. As a result, rulesets using only such nat targets are not effective, as the relevant conntrack hooks are not enabled. The above affect also nft_compat rulesets. Fix the issue adding the missing initializers. Fixes: 2eb0f624b709 ("netfilter: add NAT support for shifted portmap ranges") Signed-off-by: Paolo Abeni Signed-off-by: Pablo Neira Ayuso commit dbace111e5b320682eee63d7173959a2b2bd9ccb Author: Leon Romanovsky Date: Thu Oct 11 17:30:05 2018 +0300 RDMA/core: Annotate timeout as unsigned long The ucma users supply timeout in u32 format, it means that any number with most significant bit set will be converted to negative value by various rdma_*, cma_* and sa_query functions, which treat timeout as int. In the lowest level, the timeout is converted back to be unsigned long. Remove this ambiguous conversion by updating all function signatures to receive unsigned long. Reported-by: Noa Osherovich Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford commit 9549c2bd094f0f54b8827d64886f5b1de370dff3 Author: Leon Romanovsky Date: Thu Oct 11 17:30:04 2018 +0300 RDMA/core: Align multiple functions to kernel coding style This patch changes the small number of functions to be aligned to kernel coding style. It is needed to minimize the diffstat of the following patch. It doesn't change any functionality. Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford commit d6f9125207902ace40d36d6571cda251b43a8f95 Author: Leon Romanovsky Date: Thu Oct 11 17:30:03 2018 +0300 RDMA/cma: Remove unused timeout_ms parameter from cma_resolve_iw_route() cma_resolve_iw_route() doesn't use timeout_ms parameter, so let's remove it. Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford commit 29ce85f349c2f77a3c035f70fafeaa8b22608328 Merge: eb385146f90d bcdb12b70c52 Author: David S. Miller Date: Tue Oct 16 10:09:59 2018 -0700 Merge branch 'hns3-Some-cleanup-and-bugfix-for-desc-filling' Yunsheng Lin says: ==================== Some cleanup and bugfix for desc filling When retransmiting packets, skb_cow_head which is called in hns3_set_tso may clone a new header. And driver will clear the checksum of the header after doing DMA map, so HW will read the old header whose L3 checksum is not cleared and calculate a wrong L3 checksum. Also When sending a big fragment using multiple buffer descriptor, hns3 does one maping, but do multiple unmapping when tx is done, which may cause unmapping problem. This patchset does some cleanup before fixing the above problem. ==================== Signed-off-by: David S. Miller commit bcdb12b70c5266a78430a248e57c8c122839b951 Author: Fuyun Liang Date: Tue Oct 16 19:58:52 2018 +0800 net: hns3: fix for multiple unmapping DMA problem When sending a big fragment using multiple buffer descriptor, hns3 does one maping, but do multiple unmapping when tx is done, which may cause unmapping problem. To fix it, this patch makes sure the value of desc_cb.length of the non-first bd is zero. If desc_cb.length is zero, we do not unmap the buffer. Fixes: 76ad4f0ee747 ("net: hns3: Add support of HNS3 Ethernet Driver for hip08 SoC") Signed-off-by: Fuyun Liang Signed-off-by: Peng Li Signed-off-by: Yunsheng Lin Signed-off-by: David S. Miller commit ba3f808f5cc15882e5aa565d253522e179148c64 Author: Fuyun Liang Date: Tue Oct 16 19:58:51 2018 +0800 net: hns3: rename hns_nic_dma_unmap To keep symmetrical, this patch renames hns_nic_dma_unmap to hns3_clear_desc. Signed-off-by: Fuyun Liang Signed-off-by: Peng Li Signed-off-by: Yunsheng Lin Signed-off-by: David S. Miller commit 1e8a7977d09ffb487f7327f1e10df48e5294aaa5 Author: Fuyun Liang Date: Tue Oct 16 19:58:50 2018 +0800 net: hns3: add handling for big TX fragment This patch unifies big tx fragment handling for tso and non-tso case. Signed-off-by: Fuyun Liang Signed-off-by: Peng Li Signed-off-by: Yunsheng Lin Signed-off-by: David S. Miller commit 5188f218fc860da15755bfa5cc357baf2114d586 Author: Peng Li Date: Tue Oct 16 19:58:49 2018 +0800 net: hns3: move DMA map into hns3_fill_desc To solve the L3 checksum error problem which happens when driver does not clear L3 checksum, DMA map should be done after calling skb_cow_head. This patch moves DMA map into hns3_fill_desc to ensure that DMA map is done after calling skb_cow_head. Fixes: 76ad4f0ee747 ("net: hns3: Add support of HNS3 Ethernet Driver for hip08 SoC") Signed-off-by: Fuyun Liang Signed-off-by: Peng Li Signed-off-by: Yunsheng Lin Signed-off-by: David S. Miller commit 0bbbf15dea4ffec4206cea22e8b54e61203a42a2 Author: Peng Li Date: Tue Oct 16 19:58:48 2018 +0800 net: hns3: remove hns3_fill_desc_tso This patch removes hns3_fill_desc_tso in preparation for fixing some desc filling bug, because for tso or non-tso case, we will use the unified hns3_fill_desc. Signed-off-by: Fuyun Liang Signed-off-by: Peng Li Signed-off-by: Yunsheng Lin Signed-off-by: David S. Miller commit eb385146f90da429a94fb448905a32d7235e6fbf Merge: 0ba4ad32de3f 1c90eabcbdfb Author: David S. Miller Date: Tue Oct 16 10:04:29 2018 -0700 Merge branch 'qed-Align-PTT-and-add-various-link-modes' Rahul Verma says: ==================== Align PTT and add various link modes. This series aligns the ptt propagation as local ptt or global ptt. Adds new transceiver modes, speed capabilities and board config, which is utilized to display the enhanced link modes, media types and speed. Enhances the link with detailed information. ==================== Signed-off-by: David S. Miller commit 1c90eabcbdfb513c20460a9f3254479af48ee30b Author: Rahul Verma Date: Tue Oct 16 03:59:22 2018 -0700 qed: Prevent link getting down in case of autoneg-off. Newly added link modes are required to be added during setting link modes. If the new link mode is not available during qed_set_link, it may cause link getting down due to empty supported capability, being passed to MFW, after setting autoneg off/on with current/supported speed. Signed-off-by: Rahul Verma Signed-off-by: Ariel Elior Signed-off-by: David S. Miller commit 1e6e2ded0f3c86c5ccee6ae9d78d01c7017f3a2e Author: Rahul Verma Date: Tue Oct 16 03:59:21 2018 -0700 qede: Check available link modes before link set from ethtool. Set link mode after checking available "supported" link caps of the port. Signed-off-by: Rahul Verma Signed-off-by: Ariel Elior Signed-off-by: David S. Miller commit c56a8be7e7aa855ebcccf0e9d9eba2216514d399 Author: Rahul Verma Date: Tue Oct 16 03:59:20 2018 -0700 qed: Add supported link and advertise link to display in ethtool. Added transceiver type, speed capability and board types in HSI, are utilizing to display the accurate link information in ethtool. Signed-off-by: Rahul Verma Signed-off-by: Ariel Elior Signed-off-by: David S. Miller commit e292b636f9403ade30a501e5803ed6776e717a35 Author: Rahul Verma Date: Tue Oct 16 03:59:19 2018 -0700 qed: Added supported transceiver modes, speed capability and board config to HSI. Added transceiver modes with different speed and media type, speed capability and supported board types in HSI, which will be utilizing to display correct specification of link modes and speed type. Signed-off-by: Rahul Verma Signed-off-by: Ariel Elior Signed-off-by: David S. Miller commit 706d08913d1f68610c32b4a001026aa989878dd9 Author: Rahul Verma Date: Tue Oct 16 03:59:18 2018 -0700 qed: Align local and global PTT to propagate through the APIs. Align the use of local PTT to propagate through the qed_mcp* API's. Global ptt should not be used. Register access should be done through layers. Register address is mapped into a PTT, PF translation table. Several interface functions require a PTT to direct read/write into register. There is a pool of PTT maintained, and several PTT are used simultaneously to access device registers in different flows. Same PTT should not be used in flows that can run concurrently. To avoid running out of PTT resources, too many PTT should not be acquired without releasing them. Every PF has a global PTT, which is used throughout the life of PF, in most important flows for register access. Generic functions acquire the PTT locally and release after the use. This patch aligns the use of Global PTT and Local PTT accordingly. Signed-off-by: Rahul Verma Signed-off-by: Ariel Elior Signed-off-by: David S. Miller commit 0ba4ad32de3fda12eb608faea6e7c57012ecc050 Author: YueHaibing Date: Tue Oct 16 18:50:56 2018 +0800 net: aquantia: make function aq_fw2x_update_stats static Fixes the following sparse warning: drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils_fw2x.c:282:5: warning: symbol 'aq_fw2x_update_stats' was not declared. Should it be static? Signed-off-by: YueHaibing Signed-off-by: David S. Miller commit c61c7def1fa0a722610d89790e0255b74f3c07dd Author: Huacai Chen Date: Tue Oct 16 09:20:42 2018 +0800 MIPS: VDSO: Reduce VDSO_RANDOMIZE_SIZE to 64MB for 64bit Commit ea7e0480a4b6 ("MIPS: VDSO: Always map near top of user memory") set VDSO_RANDOMIZE_SIZE to 256MB for 64bit kernel. But take a look at arch/mips/mm/mmap.c we can see that MIN_GAP is 128MB, which means the mmap_base may be at (user_address_top - 128MB). This make the stack be surrounded by mmaped areas, then stack expanding fails and causes a segmentation fault. Therefore, VDSO_RANDOMIZE_SIZE should be less than MIN_GAP and this patch reduce it to 64MB. Signed-off-by: Huacai Chen Signed-off-by: Paul Burton Fixes: ea7e0480a4b6 ("MIPS: VDSO: Always map near top of user memory") Patchwork: https://patchwork.linux-mips.org/patch/20910/ Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@linux-mips.org Cc: Fuxin Zhang Cc: Zhangjin Wu Cc: Huacai Chen commit 730746ce88da943088fe9aeb845a5daf6e315d98 Author: Jaegeuk Kim Date: Tue Oct 2 17:20:58 2018 -0700 f2fs: allow to mount, if quota is failed Since we can use the filesystem without quotas till next boot. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 6390398ec78fa527dd8346f126eca06129155668 Author: Sahitya Tummala Date: Fri Oct 5 10:47:40 2018 +0530 f2fs: update REQ_TIME in f2fs_cross_rename() Update REQ_TIME in the missing path - f2fs_cross_rename(). Signed-off-by: Sahitya Tummala [Jaegeuk Kim: add it in f2fs_rename()] Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit c75f2feb80eb8cbb579a3677dce4c165f3102a04 Author: Sahitya Tummala Date: Fri Oct 5 10:47:39 2018 +0530 f2fs: do not update REQ_TIME in case of error conditions The REQ_TIME should be updated only in case of success cases as followed at all other places in the file system. Signed-off-by: Sahitya Tummala Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 3b30eb19dcf1f79d1c3283da8c5f064be6175fbe Author: Chao Yu Date: Thu Oct 4 11:15:20 2018 +0800 f2fs: remove unneeded disable_nat_bits() Commit 7735730d39d7 ("f2fs: fix to propagate error from __get_meta_page()") added disable_nat_bits() in error path of __get_nat_bitmaps(), but it's unneeded, beause we will fail mount, we won't have chance to change nid usage status w/o nat full/empty bitmaps. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 850971b23f0cabb5103a2de9f4b9fe7177c96a9d Author: Chao Yu Date: Thu Oct 4 11:15:19 2018 +0800 f2fs: remove unused sbi->trigger_ssr_threshold Commit a2a12b679f36 ("f2fs: export SSR allocation threshold") introduced two threshold .min_ssr_sections and .trigger_ssr_threshold, but only .min_ssr_sections is used, so just remove redundant one for cleanup. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit ed15ba14155962c328ceb69712164aea8c444a82 Author: Chao Yu Date: Thu Oct 4 11:15:18 2018 +0800 f2fs: shrink sbi->sb_lock coverage in set_file_temperature() file_set_{cold,hot} doesn't need holding sbi->sb_lock, so moving them out of the lock. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 4dada3fd7025e9dbc56c93d9996cba6e47915c62 Author: Chao Yu Date: Thu Oct 4 11:18:30 2018 +0800 f2fs: use rb_*_cached friends As rbtree supports caching leftmost node natively, update f2fs codes to use rb_*_cached helpers to speed up leftmost node visiting. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit ef2a007134b4eaa39264c885999f296577bc87d2 Author: Chao Yu Date: Wed Oct 3 22:32:44 2018 +0800 f2fs: fix to recover cold bit of inode block during POR Testcase to reproduce this bug: 1. mkfs.f2fs /dev/sdd 2. mount -t f2fs /dev/sdd /mnt/f2fs 3. touch /mnt/f2fs/file 4. sync 5. chattr +A /mnt/f2fs/file 6. xfs_io -f /mnt/f2fs/file -c "fsync" 7. godown /mnt/f2fs 8. umount /mnt/f2fs 9. mount -t f2fs /dev/sdd /mnt/f2fs 10. chattr -A /mnt/f2fs/file 11. xfs_io -f /mnt/f2fs/file -c "fsync" 12. umount /mnt/f2fs 13. mount -t f2fs /dev/sdd /mnt/f2fs 14. lsattr /mnt/f2fs/file -----------------N- /mnt/f2fs/file But actually, we expect the corrct result is: -------A---------N- /mnt/f2fs/file The reason is in step 9) we missed to recover cold bit flag in inode block, so later, in fsync, we will skip write inode block due to below condition check, result in lossing data in another SPOR. f2fs_fsync_node_pages() if (!IS_DNODE(page) || !is_cold_node(page)) continue; Note that, I guess that some non-dir inode has already lost cold bit during POR, so in order to reenable recovery for those inode, let's try to recover cold bit in f2fs_iget() to save more fsynced data. Fixes: c56675750d7c ("f2fs: remove unneeded set_cold_node()") Cc: 4.17+ Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 48018b4cfd07dd2df9a067fb3a6a3221c19eed11 Author: Chao Yu Date: Thu Sep 13 07:40:53 2018 +0800 f2fs: submit cached bio to avoid endless PageWriteback When migrating encrypted block from background GC thread, we only add them into f2fs inner bio cache, but forget to submit the cached bio, it may cause potential deadlock when we are waiting page writebacked, fix it. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 4354994f097d068a894aa1a0860da54571df3582 Author: Daniel Rosenberg Date: Mon Aug 20 19:21:43 2018 -0700 f2fs: checkpoint disabling Note that, it requires "f2fs: return correct errno in f2fs_gc". This adds a lightweight non-persistent snapshotting scheme to f2fs. To use, mount with the option checkpoint=disable, and to return to normal operation, remount with checkpoint=enable. If the filesystem is shut down before remounting with checkpoint=enable, it will revert back to its apparent state when it was first mounted with checkpoint=disable. This is useful for situations where you wish to be able to roll back the state of the disk in case of some critical failure. Signed-off-by: Daniel Rosenberg [Jaegeuk Kim: use SB_RDONLY instead of MS_RDONLY] Signed-off-by: Jaegeuk Kim commit 0585b75437d335c6580066c1ab9ea3092139df32 Author: Jens Axboe Date: Mon Oct 15 08:53:45 2018 -0600 sx8: convert to blk-mq Convert from the old request_fn style driver to blk-mq. Signed-off-by: Jens Axboe commit 8535fd6f702a4b3e225258a86dcbf5dd93b73d51 Author: Jens Axboe Date: Mon Oct 15 09:02:45 2018 -0600 z2ram: convert to blk-mq Straight forward conversion to blk-mq, nothing special about this driver. Signed-off-by: Jens Axboe commit ad5fc6bb72214615f300af1f4ed57f71bc3be510 Author: Jens Axboe Date: Mon Oct 15 09:01:40 2018 -0600 gdrom: convert to blk-mq Ditch the deffered list, lock, and workqueue handling. Just mark the set as being blocking, so we are invoked from a workqueue already. Signed-off-by: Jens Axboe commit a9f38e1dec107af70d81338332494bf0a1e76597 Author: Omar Sandoval Date: Mon Oct 15 09:21:34 2018 -0600 floppy: convert to blk-mq This driver likes to fetch requests from all over the place, so make queue_rq put requests on a list so that the logic stays the same. Tested with QEMU. Signed-off-by: Omar Sandoval Converted to blk_mq_init_sq_queue() and fixed a few spots where the tag_set leaked on cleanup. Signed-off-by: Jens Axboe commit 6ec3938cff95fe792a05fdf4ba14f92977e5e31d Author: Omar Sandoval Date: Mon Oct 15 09:18:24 2018 -0600 ataflop: convert to blk-mq This driver is already pretty broken, in that it has two wait_events() (one in stdma_lock()) in request_fn. Get rid of the first one by freezing/quiescing the queue on format, and the second one by replacing it with stdma_try_lock(). The rest is straightforward. Compile-tested only and probably incorrect. Cc: Laurent Vivier Signed-off-by: Omar Sandoval Converted to blk_mq_init_sq_queue() Signed-off-by: Jens Axboe commit 71327f547ee3a46ec5c39fdbbd268401b2578d0e Author: Omar Sandoval Date: Thu Oct 11 12:20:49 2018 -0700 ataflop: fix error handling during setup Move queue allocation next to disk allocation to fix a couple of issues: - If add_disk() hasn't been called, we should clear disk->queue before calling put_disk(). - If we fail to allocate a request queue, we still need to put all of the disks, not just the ones that we allocated queues for. Signed-off-by: Omar Sandoval Signed-off-by: Jens Axboe commit 3e6b8c3c4b14f4f0c4a74027156eb31544c0b0da Author: Omar Sandoval Date: Thu Oct 11 12:20:48 2018 -0700 ataflop: fold headers into C file atafd.h and atafdreg.h are only used from ataflop.c, so merge them in there. Signed-off-by: Omar Sandoval Signed-off-by: Jens Axboe commit 21b07f35544af5e2c11f079057e8fb4263d35dd3 Author: Omar Sandoval Date: Mon Oct 15 09:16:37 2018 -0600 amiflop: convert to blk-mq Straightforward conversion, just use the existing amiflop_lock to serialize access to the controller. Compile-tested only. Cc: Laurent Vivier Signed-off-by: Omar Sandoval Converted to blk_mq_init_sq_queue() Signed-off-by: Jens Axboe commit 53d0f8dbde89cf6c862c7a62e00c6123e02cba41 Author: Omar Sandoval Date: Thu Oct 11 12:20:46 2018 -0700 amiflop: clean up on errors during setup The error handling in fd_probe_drives() doesn't clean up at all. Fix it up in preparation for converting to blk-mq. While we're here, get rid of the commented out amiga_floppy_remove(). Signed-off-by: Omar Sandoval Signed-off-by: Jens Axboe commit c87228f16f0acdf242dee62f139013212208473f Author: Omar Sandoval Date: Thu Oct 11 12:20:45 2018 -0700 amiflop: fold headers into C file amifd.h and amifdreg.h are only used from amiflop.c, and they're pretty small, so move the contents to amiflop.c and get rid of the .h files. This is preparation for adding a struct blk_mq_tag_set to struct amiga_floppy_struct. Signed-off-by: Omar Sandoval Signed-off-by: Jens Axboe commit 8ccb8cb1892b27655247ff42867665763793ffe8 Author: Omar Sandoval Date: Mon Oct 15 09:14:46 2018 -0600 swim3: convert to blk-mq Pretty simple conversion. grab_drive() could probably be replaced by some freeze/quiesce incantation, but I left it alone, and just used freeze/quiesce for eject. Compile-tested only. Cc: Benjamin Herrenschmidt Signed-off-by: Omar Sandoval Converted to blk_mq_init_sq_queue(). Signed-off-by: Jens Axboe commit dbaa54b65e7a06e6ff2192f8fe92ecd51accc766 Author: Omar Sandoval Date: Thu Oct 11 12:20:43 2018 -0700 swim3: add real error handling in setup The driver doesn't have support for removing a device that has already been configured, but with more careful ordering we can avoid the need for that and make sure that we don't leak generic resources. Signed-off-by: Omar Sandoval Signed-off-by: Jens Axboe commit e3896d77b7025c39150eb5ada33ec2c88f4ad445 Author: Omar Sandoval Date: Mon Oct 15 09:12:12 2018 -0600 swim: convert to blk-mq The only interesting thing here is that there may be two floppies (i.e., request queues) sharing the same controller, so we use the global struct swim_priv->lock to check whether the controller is busy. Compile-tested only. Tested-by: Finn Thain Acked-by: Laurent Vivier Signed-off-by: Omar Sandoval Converted to blk_mq_init_sq_queue() Signed-off-by: Jens Axboe commit 1448a2a5360ae06f25e2edc61ae070dff5c0beb4 Author: Omar Sandoval Date: Thu Oct 11 12:20:41 2018 -0700 swim: fix cleanup on setup error If we fail to allocate the request queue for a disk, we still need to free that disk, not just the previous ones. Additionally, we need to cleanup the previous request queues. Signed-off-by: Omar Sandoval Signed-off-by: Jens Axboe commit a72d785021cb92cc0abd4bb3d75607c82150fade Author: Stephen Boyd Date: Mon Oct 15 16:38:33 2018 -0700 clk: ti: Prepare for remove of OF node name Another patch is going to change this code to use %pOFn for DT node names. Fix up the code to make this easy to pick this side of the merge instead of fixing it up in a merge commit later. Cc: Tero Kristo Cc: Rob Herring Signed-off-by: Stephen Boyd commit 7aa54be2976550f17c11a1c3e3630002dea39303 Author: Peter Zijlstra Date: Wed Sep 26 13:01:20 2018 +0200 locking/qspinlock, x86: Provide liveness guarantee On x86 we cannot do fetch_or() with a single instruction and thus end up using a cmpxchg loop, this reduces determinism. Replace the fetch_or() with a composite operation: tas-pending + load. Using two instructions of course opens a window we previously did not have. Consider the scenario: CPU0 CPU1 CPU2 1) lock trylock -> (0,0,1) 2) lock trylock /* fail */ 3) unlock -> (0,0,0) 4) lock trylock -> (0,0,1) 5) tas-pending -> (0,1,1) load-val <- (0,1,0) from 3 6) clear-pending-set-locked -> (0,0,1) FAIL: _2_ owners where 5) is our new composite operation. When we consider each part of the qspinlock state as a separate variable (as we can when _Q_PENDING_BITS == 8) then the above is entirely possible, because tas-pending will only RmW the pending byte, so the later load is able to observe prior tail and lock state (but not earlier than its own trylock, which operates on the whole word, due to coherence). To avoid this we need 2 things: - the load must come after the tas-pending (obviously, otherwise it can trivially observe prior state). - the tas-pending must be a full word RmW instruction, it cannot be an XCHGB for example, such that we cannot observe other state prior to setting pending. On x86 we can realize this by using "LOCK BTS m32, r32" for tas-pending followed by a regular load. Note that observing later state is not a problem: - if we fail to observe a later unlock, we'll simply spin-wait for that store to become visible. - if we observe a later xchg_tail(), there is no difference from that xchg_tail() having taken place before the tas-pending. Suggested-by: Will Deacon Reported-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Will Deacon Cc: Linus Torvalds Cc: Peter Zijlstra Cc: andrea.parri@amarulasolutions.com Cc: longman@redhat.com Fixes: 59fb586b4a07 ("locking/qspinlock: Remove unbounded cmpxchg() loop from locking slowpath") Link: https://lkml.kernel.org/r/20181003130957.183726335@infradead.org Signed-off-by: Ingo Molnar commit 288e4521f0f6717909933116563e66bb894ae2af Author: Peter Zijlstra Date: Wed Oct 3 12:34:10 2018 +0200 x86/asm: 'Simplify' GEN_*_RMWcc() macros Currently the GEN_*_RMWcc() macros include a return statement, which pretty much mandates we directly wrap them in a (inline) function. Macros with return statements are tricky and, as per the above, limit use, so remove the return statement and make them statement-expressions. This allows them to be used more widely. Also, shuffle the arguments a bit. Place the @cc argument as 3rd, this makes it consistent between UNARY and BINARY, but more importantly, it makes the @arg0 argument last. Since the @arg0 argument is now last, we can do CPP trickery and make it an optional argument, simplifying the users; 17 out of 18 occurences do not need this argument. Finally, change to asm symbolic names, instead of the numeric ordering of operands, which allows us to get rid of __BINARY_RMWcc_ARG and get cleaner code overall. Signed-off-by: Peter Zijlstra (Intel) Cc: JBeulich@suse.com Cc: Linus Torvalds Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: bp@alien8.de Cc: hpa@linux.intel.com Link: https://lkml.kernel.org/r/20181003130957.108960094@infradead.org Signed-off-by: Ingo Molnar commit 756b1df4c2c82a1cdffeafa9d2aa76c92e7fb405 Author: Peter Zijlstra Date: Wed Sep 26 13:01:19 2018 +0200 locking/qspinlock: Rework some comments While working my way through the code again; I felt the comments could use help. Signed-off-by: Peter Zijlstra (Intel) Acked-by: Will Deacon Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: andrea.parri@amarulasolutions.com Cc: longman@redhat.com Link: https://lkml.kernel.org/r/20181003130257.156322446@infradead.org Signed-off-by: Ingo Molnar commit 53bf57fab7321fb42b703056a4c80fc9d986d170 Author: Peter Zijlstra Date: Wed Sep 26 13:01:18 2018 +0200 locking/qspinlock: Re-order code Flip the branch condition after atomic_fetch_or_acquire(_Q_PENDING_VAL) such that we loose the indent. This also result in a more natural code flow IMO. Signed-off-by: Peter Zijlstra (Intel) Acked-by: Will Deacon Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: andrea.parri@amarulasolutions.com Cc: longman@redhat.com Link: https://lkml.kernel.org/r/20181003130257.156322446@infradead.org Signed-off-by: Ingo Molnar commit ec57e2f0acb01710cd465bc04495ed03a9e0fea1 Merge: 4766ab5677a2 72a9c673636b Author: Ingo Molnar Date: Tue Oct 16 17:30:11 2018 +0200 Merge branch 'x86/build' into locking/core, to pick up dependent patches and unify jump-label work Signed-off-by: Ingo Molnar commit d4ae552982de39417d17f823df1f06b1cbc3686c Author: Jiri Olsa Date: Thu Sep 6 15:57:48 2018 +0200 perf/x86/intel: Export mem events only if there's PEBS support Memory events depends on PEBS support and access to LDLAT MSR, but we display them in /sys/devices/cpu/events even if the CPU does not provide those, like for KVM guests. That brings the false assumption that those events should be available, while they fail event to open. Separating the mem-* events attributes and merging them with cpu_events only if there's PEBS support detected. We could also check if LDLAT MSR is available, but the PEBS check seems to cover the need now. Suggested-by: Peter Zijlstra Signed-off-by: Jiri Olsa Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Michael Petlan Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Link: http://lkml.kernel.org/r/20180906135748.GC9577@krava Signed-off-by: Ingo Molnar commit 421f4292f46e871cdcf8bdc3e6fdfcefe2e81a9d Author: Daniel Borkmann Date: Tue Oct 16 15:59:36 2018 +0200 bpf, tls: add tls header to tools infrastructure Andrey reported a build error for the BPF kselftest suite when compiled on a machine which does not have tls related header bits installed natively: test_sockmap.c:120:23: fatal error: linux/tls.h: No such file or directory #include ^ compilation terminated. Fix it by adding the header to the tools include infrastructure and add definitions such as SOL_TLS that could potentially be missing. Fixes: e9dd904708c4 ("bpf: add tls support for testing in test_sockmap") Reported-by: Andrey Ignatov Signed-off-by: Daniel Borkmann Signed-off-by: Alexei Starovoitov commit 27d8d2d7a9b7eb05c4484b74b749eaee7b50b845 Author: Christian Lamparter Date: Sun Oct 14 23:28:50 2018 +0200 dmaengine: ppc4xx: fix off-by-one build failure There are two poly_store, but one should have been poly_show. |adma.c:4382:16: error: conflicting types for 'poly_store' | static ssize_t poly_store(struct device_driver *dev, const char *buf, | ^~~~~~~~~~ |adma.c:4363:16: note: previous definition of 'poly_store' was here | static ssize_t poly_store(struct device_driver *dev, char *buf) | ^~~~~~~~~~ CC: stable@vger.kernel.org Fixes: 13efe1a05384 ("dmaengine: ppc4xx: remove DRIVER_ATTR() usage") Signed-off-by: Christian Lamparter Signed-off-by: Vinod Koul commit 013c2403bf32e48119aeb13126929f81352cc7ac Author: Artemy Kovalyov Date: Mon Oct 15 14:13:35 2018 +0300 IB/mlx5: Fix MR cache initialization Schedule MR cache work only after bucket was initialized. Cc: # 4.10 Fixes: 49780d42dfc9 ("IB/mlx5: Expose MR cache for mlx5_ib") Signed-off-by: Artemy Kovalyov Reviewed-by: Majd Dibbiny Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit e54b6a3bcd1ec972b25a164bdf495d9e7120b107 Author: Leon Romanovsky Date: Thu Oct 11 22:36:10 2018 +0300 RDMA/cm: Respect returned status of cm_init_av_by_path Add missing check for failure of cm_init_av_by_path Fixes: e1444b5a163e ("IB/cm: Fix automatic path migration support") Reported-by: Slava Shwartsman Reviewed-by: Parav Pandit Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 4d6e4d12da2c308f8f976d3955c45ee62539ac98 Author: Denis Drozdov Date: Thu Oct 11 22:33:57 2018 +0300 IB/ipoib: Clear IPCB before icmp_send IPCB should be cleared before icmp_send, since it may contain data from previous layers and the data could be misinterpreted as ip header options, which later caused the ihl to be set to an invalid value and resulted in the following stack corruption: [ 1083.031512] ib0: packet len 57824 (> 2048) too long to send, dropping [ 1083.031843] ib0: packet len 37904 (> 2048) too long to send, dropping [ 1083.032004] ib0: packet len 4040 (> 2048) too long to send, dropping [ 1083.032253] ib0: packet len 63800 (> 2048) too long to send, dropping [ 1083.032481] ib0: packet len 23960 (> 2048) too long to send, dropping [ 1083.033149] ib0: packet len 63800 (> 2048) too long to send, dropping [ 1083.033439] ib0: packet len 63800 (> 2048) too long to send, dropping [ 1083.033700] ib0: packet len 63800 (> 2048) too long to send, dropping [ 1083.034124] ib0: packet len 63800 (> 2048) too long to send, dropping [ 1083.034387] ================================================================== [ 1083.034602] BUG: KASAN: stack-out-of-bounds in __ip_options_echo+0xf08/0x1310 [ 1083.034798] Write of size 4 at addr ffff880353457c5f by task kworker/u16:0/7 [ 1083.034990] [ 1083.035104] CPU: 7 PID: 7 Comm: kworker/u16:0 Tainted: G O 4.19.0-rc5+ #1 [ 1083.035316] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Ubuntu-1.8.2-1ubuntu2 04/01/2014 [ 1083.035573] Workqueue: ipoib_wq ipoib_cm_skb_reap [ib_ipoib] [ 1083.035750] Call Trace: [ 1083.035888] dump_stack+0x9a/0xeb [ 1083.036031] print_address_description+0xe3/0x2e0 [ 1083.036213] kasan_report+0x18a/0x2e0 [ 1083.036356] ? __ip_options_echo+0xf08/0x1310 [ 1083.036522] __ip_options_echo+0xf08/0x1310 [ 1083.036688] icmp_send+0x7b9/0x1cd0 [ 1083.036843] ? icmp_route_lookup.constprop.9+0x1070/0x1070 [ 1083.037018] ? netif_schedule_queue+0x5/0x200 [ 1083.037180] ? debug_show_all_locks+0x310/0x310 [ 1083.037341] ? rcu_dynticks_curr_cpu_in_eqs+0x85/0x120 [ 1083.037519] ? debug_locks_off+0x11/0x80 [ 1083.037673] ? debug_check_no_obj_freed+0x207/0x4c6 [ 1083.037841] ? check_flags.part.27+0x450/0x450 [ 1083.037995] ? debug_check_no_obj_freed+0xc3/0x4c6 [ 1083.038169] ? debug_locks_off+0x11/0x80 [ 1083.038318] ? skb_dequeue+0x10e/0x1a0 [ 1083.038476] ? ipoib_cm_skb_reap+0x2b5/0x650 [ib_ipoib] [ 1083.038642] ? netif_schedule_queue+0xa8/0x200 [ 1083.038820] ? ipoib_cm_skb_reap+0x544/0x650 [ib_ipoib] [ 1083.038996] ipoib_cm_skb_reap+0x544/0x650 [ib_ipoib] [ 1083.039174] process_one_work+0x912/0x1830 [ 1083.039336] ? wq_pool_ids_show+0x310/0x310 [ 1083.039491] ? lock_acquire+0x145/0x3a0 [ 1083.042312] worker_thread+0x87/0xbb0 [ 1083.045099] ? process_one_work+0x1830/0x1830 [ 1083.047865] kthread+0x322/0x3e0 [ 1083.050624] ? kthread_create_worker_on_cpu+0xc0/0xc0 [ 1083.053354] ret_from_fork+0x3a/0x50 For instance __ip_options_echo is failing to proceed with invalid srr and optlen passed from another layer via IPCB [ 762.139568] IPv4: __ip_options_echo rr=0 ts=0 srr=43 cipso=0 [ 762.139720] IPv4: ip_options_build: IPCB 00000000f3cd969e opt 000000002ccb3533 [ 762.139838] IPv4: __ip_options_echo in srr: optlen 197 soffset 84 [ 762.139852] IPv4: ip_options_build srr=0 is_frag=0 rr_needaddr=0 ts_needaddr=0 ts_needtime=0 rr=0 ts=0 [ 762.140269] ================================================================== [ 762.140713] IPv4: __ip_options_echo rr=0 ts=0 srr=0 cipso=0 [ 762.141078] BUG: KASAN: stack-out-of-bounds in __ip_options_echo+0x12ec/0x1680 [ 762.141087] Write of size 4 at addr ffff880353457c7f by task kworker/u16:0/7 Signed-off-by: Denis Drozdov Reviewed-by: Erez Shitrit Reviewed-by: Feras Daoud Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit fe9bc1644918aa1d02a889b4ca788bfb67f90816 Author: Leon Romanovsky Date: Thu Oct 11 22:10:10 2018 +0300 RDMA/restrack: Protect from reentry to resource return path Nullify the resource task struct pointer to ensure that subsequent calls won't try to release task_struct again. ------------[ cut here ]------------ ODEBUG: free active (active state 1) object type: rcu_head hint: (null) WARNING: CPU: 0 PID: 6048 at lib/debugobjects.c:329 debug_print_object+0x16a/0x210 lib/debugobjects.c:326 Kernel panic - not syncing: panic_on_warn set ... CPU: 0 PID: 6048 Comm: syz-executor022 Not tainted 4.19.0-rc7-next-20181008+ #89 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+0x244/0x3ab lib/dump_stack.c:113 panic+0x238/0x4e7 kernel/panic.c:184 __warn.cold.8+0x163/0x1ba kernel/panic.c:536 report_bug+0x254/0x2d0 lib/bug.c:186 fixup_bug arch/x86/kernel/traps.c:178 [inline] do_error_trap+0x11b/0x200 arch/x86/kernel/traps.c:271 do_invalid_op+0x36/0x40 arch/x86/kernel/traps.c:290 invalid_op+0x14/0x20 arch/x86/entry/entry_64.S:969 RIP: 0010:debug_print_object+0x16a/0x210 lib/debugobjects.c:326 Code: 41 88 48 89 fa 48 c1 ea 03 80 3c 02 00 0f 85 92 00 00 00 48 8b 14 dd 60 02 41 88 4c 89 fe 48 c7 c7 00 f8 40 88 e8 36 2f b4 fd <0f> 0b 83 05 a9 f4 5e 06 01 48 83 c4 18 5b 41 5c 41 5d 41 5e 41 5f RSP: 0018:ffff8801d8c3eda8 EFLAGS: 00010086 RAX: 0000000000000000 RBX: 0000000000000003 RCX: 0000000000000000 RDX: 0000000000000000 RSI: ffffffff8164d235 RDI: 0000000000000005 RBP: ffff8801d8c3ede8 R08: ffff8801d70aa280 R09: ffffed003b5c3eda R10: ffffed003b5c3eda R11: ffff8801dae1f6d7 R12: 0000000000000001 R13: ffffffff8939a760 R14: 0000000000000000 R15: ffffffff8840fca0 __debug_check_no_obj_freed lib/debugobjects.c:786 [inline] debug_check_no_obj_freed+0x3ae/0x58d lib/debugobjects.c:818 kmem_cache_free+0x202/0x290 mm/slab.c:3759 free_task_struct kernel/fork.c:163 [inline] free_task+0x16e/0x1f0 kernel/fork.c:457 __put_task_struct+0x2e6/0x620 kernel/fork.c:730 put_task_struct include/linux/sched/task.h:96 [inline] finish_task_switch+0x66c/0x900 kernel/sched/core.c:2715 context_switch kernel/sched/core.c:2834 [inline] __schedule+0x8d7/0x21d0 kernel/sched/core.c:3480 schedule+0xfe/0x460 kernel/sched/core.c:3524 freezable_schedule include/linux/freezer.h:172 [inline] futex_wait_queue_me+0x3f9/0x840 kernel/futex.c:2530 futex_wait+0x45c/0xa50 kernel/futex.c:2645 do_futex+0x31a/0x26d0 kernel/futex.c:3528 __do_sys_futex kernel/futex.c:3589 [inline] __se_sys_futex kernel/futex.c:3557 [inline] __x64_sys_futex+0x472/0x6a0 kernel/futex.c:3557 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x446549 Code: e8 2c b3 02 00 48 83 c4 18 c3 0f 1f 80 00 00 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 0f 83 2b 09 fc ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f3a998f5da8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca RAX: ffffffffffffffda RBX: 00000000006dbc38 RCX: 0000000000446549 RDX: 0000000000000000 RSI: 0000000000000080 RDI: 00000000006dbc38 RBP: 00000000006dbc30 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000006dbc3c R13: 2f646e6162696e69 R14: 666e692f7665642f R15: 00000000006dbd2c Kernel Offset: disabled Reported-by: syzbot+71aff6ea121ffefc280f@syzkaller.appspotmail.com Fixes: ed7a01fd3fd7 ("RDMA/restrack: Release task struct which was hold by CM_ID object") Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 891b7c5fbf619d2a314e424775b3c232eb227e90 Author: Jens Axboe Date: Tue Oct 16 08:09:58 2018 -0600 mtd_blkdevs: convert to blk-mq Straight forward conversion, using an internal list to enable the driver to pull requests at will. Dynamically allocate the tag set to avoid having to pull in the block headers for blktrans.h, since various mtd drivers use block conflicting names for defines and functions. Cc: David Woodhouse Cc: linux-mtd@lists.infradead.org Tested-by: Richard Weinberger Signed-off-by: Jens Axboe commit 93048c0944150b316a15f92c41a4d626c8df37fd Author: Alexander Shishkin Date: Tue Oct 16 14:13:40 2018 +0300 lib: Fix ia64 bootloader linkage kbuild robot reports that since commit ce76d938dd98 ("lib: Add memcat_p(): paste 2 pointer arrays together") the ia64/hp/sim/boot fails to link: > LD arch/ia64/hp/sim/boot/bootloader > lib/string.o: In function `__memcat_p': > string.c:(.text+0x1f22): undefined reference to `__kmalloc' > string.c:(.text+0x1ff2): undefined reference to `__kmalloc' > make[1]: *** [arch/ia64/hp/sim/boot/Makefile:37: arch/ia64/hp/sim/boot/bootloader] Error 1 The reason is, the above commit, via __memcat_p(), adds a call to __kmalloc to string.o, which happens to be used in the bootloader, but there's no kmalloc or slab or anything. Since the linker would only pull in objects that contain referenced symbols, moving __memcat_p() to a different compilation unit solves the problem. Fixes: ce76d938dd98 ("lib: Add memcat_p(): paste 2 pointer arrays together") Signed-off-by: Alexander Shishkin Reported-by: kbuild test robot Cc: Fenghua Yu Cc: Tony Luck Cc: Joe Perches Signed-off-by: Greg Kroah-Hartman commit 2153bbc12f77fb2203276befc0f0dddbfb023bb1 Author: Hans de Goede Date: Sun Oct 14 17:12:02 2018 +0200 pwm: lpss: Only set update bit if we are actually changing the settings According to the datasheet the update bit must be set if the on-time-div or the base-unit changes. Now that we properly order device resume on Cherry Trail so that the GFX0 _PS0 method no longer exits with an error, we end up with a sequence of events where we are writing the same values twice in a row. First the _PS0 method restores the duty cycle of 0% the GPU driver set on suspend and then the GPU driver first updates just the enabled bit in the pwm_state from 0 to 1, causing us to write the same values again, before restoring the pre-suspend duty-cycle in a separate pwm_apply call. When writing the update bit the second time, without changing any of the values the update bit clears immediately / instantly, instead of staying 1 for a while as usual. After this the next setting of the update bit seems to be ignored, causing the restoring of the pre-suspend duty-cycle to not get applied. This makes the backlight come up with a 0% dutycycle after suspend/resume. Any further brightness changes after this do work. This commit moves the setting of the update bit into pwm_lpss_prepare() and only sets the bit if we have actually changed any of the values. This avoids the setting of the update bit the second time we configure the PWM to 0% dutycycle, this fixes the backlight coming up with 0% duty-cycle after a suspend/resume. Signed-off-by: Hans de Goede Signed-off-by: Thierry Reding commit 4743765babb278a7d399df5733fc8a6b6bbedf3e Author: Hans de Goede Date: Sun Oct 14 17:12:01 2018 +0200 pwm: lpss: Force runtime-resume on suspend on Cherry Trail On Cherry Trail devices under Windows the PWM controller used for the backlight is considered part of the GPU even though it is part of the LPSS block and thus is an entirely different independent hardware unit. Because of this on Cherry Trail the GPU's (GFX0 ACPI node) _PS3 and _PS0 methods save and restore the PWM controller registers. If userspace blanks the screen before suspending, such as e.g. GNOME does, then the PWM controller will be runtime-suspended when the suspend starts. This causes the GFX0 _PS? methods to save a value of 0xffffffff for the PWM control register and to restore this value on resume. 0xffffffff is not a valid value for the register and writing this causes problems such as e.g. a flickering backlight. This commit adds a prepare method to the dev_pm_ops and makes it return 0 on Cherry Trail devices forcing a runtime-resume before other device's suspend methods run. This fixes the reading and writing back of 0xffffffff. Since we now always runtime-resume the device on suspend, it will be resumed on resume too and we no longer need to check for the GFX0 _PS0 method having resumed it underneath us, so this commit removes the now no longer necessary complete dev_pm_op. Signed-off-by: Hans de Goede Signed-off-by: Thierry Reding commit 6f37709fb0a61f09ca96348044c5bb13e333e518 Author: Vignesh R Date: Tue Oct 16 11:34:02 2018 +0530 pwm: Enable TI ECAP driver for ARCH_K3 K3 devices have the same ECAP IP as OMAP SoCs. Enable driver to be built for K3 devices. Also, drop reference to AM33xx in help text, as IP is found on multiple TI SoCs. Signed-off-by: Vignesh R Signed-off-by: Thierry Reding commit 3c413e7e39224d171ef697277cd4629b59103101 Author: Vignesh R Date: Tue Oct 16 11:34:01 2018 +0530 dt-bindings: pwm: tiecap: Add TI AM654 SoC specific compatible Add a new compatible string "ti,am654-ecap" to support PWM ECAP IP of TI AM654 SoC. Signed-off-by: Vignesh R Reviewed-by: Rob Herring Signed-off-by: Thierry Reding commit c3e04915b8674a748916db6f7adf92da03b68bef Author: Gustavo A. R. Silva Date: Thu Oct 4 15:07:01 2018 +0200 rtc: m41t80: 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" with a proper "Fall through" comment. Addresses-Coverity-ID: 1373875 ("Missing break in switch") Signed-off-by: Gustavo A. R. Silva Signed-off-by: Alexandre Belloni commit fe0b5cedc2b73c9b005e1812c0ae5b922a96243a Author: Thierry Reding Date: Fri Sep 21 12:12:09 2018 +0200 rtc: tegra: Propagate errors from platform_get_irq() Instead of confusingly returning -EBUSY on failure to obtain an interrupt, propagate the real error code. While at it, let the user know why the interrupt could not be acquired. Signed-off-by: Thierry Reding Signed-off-by: Alexandre Belloni commit 4afe8e79da920bdf6698b01bc668fffc6758f37b Author: Suzuki K Poulose Date: Tue Oct 9 14:47:07 2018 +0100 arm64: cpufeature: Trap CTR_EL0 access only where it is necessary When there is a mismatch in the CTR_EL0 field, we trap access to CTR from EL0 on all CPUs to expose the safe value. However, we could skip trapping on a CPU which matches the safe value. Cc: Mark Rutland Cc: Will Deacon Signed-off-by: Suzuki K Poulose Signed-off-by: Catalin Marinas commit 1602df02f33f61fe0de1bbfeba0d1c97c14bff19 Author: Suzuki K Poulose Date: Tue Oct 9 14:47:06 2018 +0100 arm64: cpufeature: Fix handling of CTR_EL0.IDC field CTR_EL0.IDC reports the data cache clean requirements for instruction to data coherence. However, if the field is 0, we need to check the CLIDR_EL1 fields to detect the status of the feature. Currently we don't do this and generate a warning with tainting the kernel, when there is a mismatch in the field among the CPUs. Also the userspace doesn't have a reliable way to check the CLIDR_EL1 register to check the status. This patch fixes the problem by checking the CLIDR_EL1 fields, when (CTR_EL0.IDC == 0) and updates the kernel's copy of the CTR_EL0 for the CPU with the actual status of the feature. This would allow the sanity check infrastructure to do the proper checking of the fields and also allow the CTR_EL0 emulation code to supply the real status of the feature. Now, if a CPU has raw CTR_EL0.IDC == 0 and effective IDC == 1 (with overall system wide IDC == 1), we need to expose the real value to the user. So, we trap CTR_EL0 access on the CPU which reports incorrect CTR_EL0.IDC. Fixes: commit 6ae4b6e057888 ("arm64: Add support for new control bits CTR_EL0.DIC and CTR_EL0.IDC") Cc: Shanker Donthineni Cc: Philip Elcan Cc: Will Deacon Cc: Mark Rutland Signed-off-by: Suzuki K Poulose Signed-off-by: Catalin Marinas commit 8ab66cbe63aeaf9e5970fb4aaef1c660fca59321 Author: Suzuki K Poulose Date: Tue Oct 9 14:47:05 2018 +0100 arm64: cpufeature: ctr: Fix cpu capability check for late CPUs The matches() routine for a capability must honor the "scope" passed to it and return the proper results. i.e, when passed with SCOPE_LOCAL_CPU, it should check the status of the capability on the current CPU. This is used by verify_local_cpu_capabilities() on a late secondary CPU to make sure that it's compliant with the established system features. However, ARM64_HAS_CACHE_{IDC/DIC} always checks the system wide registers and this could mean that a late secondary CPU could return "true" (since the CPU hasn't updated the system wide registers yet) and thus lead the system in an inconsistent state, where the system assumes it has IDC/DIC feature, while the new CPU doesn't. Fixes: commit 6ae4b6e0578886eb36 ("arm64: Add support for new control bits CTR_EL0.DIC and CTR_EL0.IDC") Cc: Philip Elcan Cc: Shanker Donthineni Cc: Mark Rutland Cc: Will Deacon Signed-off-by: Suzuki K Poulose Signed-off-by: Catalin Marinas commit 09d1ea1c7309c8ca91151778bb3efe514f2e03ed Author: Bartosz Golaszewski Date: Sun Oct 14 17:20:09 2018 +0200 devres: provide devm_kstrdup_const() Provide a resource managed version of kstrdup_const(). This variant internally calls devm_kstrdup() on pointers that are outside of .rodata section and returns the string as is otherwise. Make devm_kfree() check if the passed pointer doesn't point to .rodata and if so - don't actually destroy the resource. Signed-off-by: Bartosz Golaszewski Reviewed-by: Bjorn Andersson Acked-by: Mike Rapoport Acked-by: Rasmus Villemoes Reviewed-by: Geert Uytterhoeven Reviewed-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman commit 59c3f82ad1d6ed83fde9d7608afb9fb221a211ab Author: Bartosz Golaszewski Date: Sun Oct 14 17:20:08 2018 +0200 mm: move is_kernel_rodata() to asm-generic/sections.h Export this routine so that we can use it later in devm_kstrdup_const() and devm_kfree(). Signed-off-by: Bartosz Golaszewski Reviewed-by: Bjorn Andersson Acked-by: Mike Rapoport Acked-by: Rasmus Villemoes Reviewed-by: Geert Uytterhoeven Reviewed-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman commit 0571967dfb5d2573c2a06871517d748932a899d1 Author: Bartosz Golaszewski Date: Sun Oct 14 17:20:07 2018 +0200 devres: constify p in devm_kfree() Make devm_kfree() signature uniform with that of kfree(). To avoid compiler warnings: cast p to (void *) when calling devres_destroy(). Signed-off-by: Bartosz Golaszewski Reviewed-by: Bjorn Andersson Reviewed-by: Geert Uytterhoeven Acked-by: Rasmus Villemoes Reviewed-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman commit 8514c470dc18e58f27dee10a787175ef8f31162f Author: Greg Kroah-Hartman Date: Wed Jul 11 15:20:32 2018 +0200 driver core: add BUS_ATTR_WO() macro Many bus attributes are write-only, so provide a simple macro for that to be able to match the other driver core attribute macros. Cc: "Rafael J. Wysocki" Cc: Ioana Ciornei Signed-off-by: Greg Kroah-Hartman commit dd71c89b2c1ae049d2018107e9d7a41261db3f7b Author: Greg Kroah-Hartman Date: Tue Oct 16 12:45:13 2018 +0200 staging: MAINTAINERS: remove obsolete IPX staging directory The IPX code was removed from staging back in November 2017, but the MAINTAINERS entry stuck around. Remove the invalid directory from the file as it does not actually point to anything anymore. Reported-by: Joe Perches Signed-off-by: Greg Kroah-Hartman commit 5c1cea8c2da056d2d4dbad73455be71d88367c3c Author: Greg Kroah-Hartman Date: Tue Oct 16 12:42:50 2018 +0200 staging: MAINTAINERS: remove NCP filesystem entry The ncp filesystem got removed in November of 2017, yet the MAINTAINERS entry persisted. Remove that now. Reported-by: Joe Perches Cc: Petr Vandrovec Signed-off-by: Greg Kroah-Hartman commit 9793c1fd1775859450ac18fa645e31902e4b0173 Author: Dan Williams Date: Fri Oct 12 21:35:15 2018 -0700 MAINTAINERS: Clarify UIO vs UIOVEC maintainer The UIO file mask in MAINTAINERS was incorrectly directing UIOVEC (include/linux/uio.h) patches to Greg. Tag Al as the UIOVEC maintainer as Ingo and others have explicitly required his ack before taking architecture patches that touch lib/iov_iter.c. Cc: Al Viro Reported-by: Greg Kroah-Hartman Signed-off-by: Dan Williams Signed-off-by: Greg Kroah-Hartman commit 5cb6b5fc013ee711d19bfc4e9deb8d6ae80741db Author: Hans de Goede Date: Tue Oct 16 12:18:21 2018 +0200 ALSA: hda: Add 2 more models to the power_save blacklist Power-saving is causing plops on audio start/stop on Dell Precision T3600 laptops and Intel DZ77BH boards, add these to the power_save blacklist. BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1525104 Signed-off-by: Hans de Goede Cc: Signed-off-by: Takashi Iwai commit da5e79bc70b84971d2b3a55fb252e34e51d81d48 Author: Rafael J. Wysocki Date: Mon Oct 15 23:21:05 2018 +0200 cpufreq: conservative: Take limits changes into account properly If the policy limits change between invocations of cs_dbs_update(), the requested frequency value stored in dbs_info may not be updated and the function may use a stale value of it next time. Moreover, if idle periods are takem into account by cs_dbs_update(), the requested frequency value stored in dbs_info may be below the min policy limit, which is incorrect. To fix these problems, always update the requested frequency value in dbs_info along with the local copy of it when the previous requested frequency is beyond the policy limits and avoid decreasing the requested frequency below the min policy limit when taking idle periods into account. Fixes: abb6627910a1 (cpufreq: conservative: Fix next frequency selection) Fixes: 00bfe05889e9 (cpufreq: conservative: Decrease frequency faster for deferred updates) Reported-by: Waldemar Rymarkiewicz Cc: All applicable Signed-off-by: Rafael J. Wysocki Acked-by: Waldemar Rymarkiewicz Acked-by: Viresh Kumar commit 19b201705445d967f95d45ad1e907b94c9b92d57 Author: Will Korteland Date: Tue Oct 16 08:57:44 2018 +0000 docs/uio: fix a grammar nitpick This patch fixes a minor, incorrect piece of grammar in the UIO howto. Signed-off-by: Will Korteland Acked-by: Randy Dunlap Signed-off-by: Greg Kroah-Hartman commit 4a6ff3c9a6fadd98ca4ba8e78820a06ad3e50863 Author: Alan Tull Date: Mon Oct 15 17:20:04 2018 -0500 docs: fpga: document programming fpgas using regions Clarify the intention that interfaces and upper layers use regions rather than managers directly. Rearrange API documentation to better group the API functions used to create FPGA mgr/bridge/regions and the API used for programming FPGAs. Signed-off-by: Alan Tull Suggested-by: Federico Vaga Acked-by: Moritz Fischer Signed-off-by: Greg Kroah-Hartman commit fea82b7f6670002ff36bf1bc77d0345b0b2f2d1c Author: Alan Tull Date: Mon Oct 15 17:20:03 2018 -0500 fpga: add devm_fpga_region_create Add devm_fpga_region_create() which is the managed version of fpga_region_create(). Change current region drivers to use devm_fpga_region_create(). Signed-off-by: Alan Tull Suggested-by: Federico Vaga Acked-by: Moritz Fischer Signed-off-by: Greg Kroah-Hartman commit 213befe049c70cfcfcbb4f6010bd5276dbc1f7b9 Author: Alan Tull Date: Mon Oct 15 17:20:02 2018 -0500 fpga: bridge: add devm_fpga_bridge_create Add devm_fpga_bridge_create() which is the managed version of fpga_bridge_create(). Change current bridge drivers to use devm_fpga_bridge_create(). Signed-off-by: Alan Tull Suggested-by: Federico Vaga Acked-by: Moritz Fischer Signed-off-by: Greg Kroah-Hartman commit 084181fe8cc7472695b907f0018f4cd00934cb12 Author: Alan Tull Date: Mon Oct 15 17:20:01 2018 -0500 fpga: mgr: add devm_fpga_mgr_create Add devm_fpga_mgr_create() which is the managed version of fpga_mgr_create(). Change current FPGA manager drivers to use devm_fpga_mgr_create() Signed-off-by: Alan Tull Suggested-by: Federico Vaga Acked-by: Moritz Fischer Signed-off-by: Greg Kroah-Hartman commit 92e2921f7eee63450a5f953f4b15dc6210219430 Author: Hou Tao Date: Sat Oct 6 17:09:35 2018 +0800 jffs2: free jffs2_sb_info through jffs2_kill_sb() When an invalid mount option is passed to jffs2, jffs2_parse_options() will fail and jffs2_sb_info will be freed, but then jffs2_sb_info will be used (use-after-free) and freeed (double-free) in jffs2_kill_sb(). Fix it by removing the buggy invocation of kfree() when getting invalid mount options. Fixes: 92abc475d8de ("jffs2: implement mount option parsing and compression overriding") Cc: stable@kernel.org Signed-off-by: Hou Tao Reviewed-by: Richard Weinberger Signed-off-by: Boris Brezillon commit 4b73d334c50dcde25437be52a01e2f5cbf5f9e21 Author: Srinivas Pandruvada Date: Mon Oct 15 10:37:21 2018 -0700 Documentation: intel_pstate: Add base_frequency information Updated documentation to explain base_frequency attribute. Suggested-by: Rafael J. Wysocki Signed-off-by: Srinivas Pandruvada Signed-off-by: Rafael J. Wysocki commit 86d333a8cc7f66c2314ab1e147834a1cd95ec2de Author: Srinivas Pandruvada Date: Mon Oct 15 10:37:20 2018 -0700 cpufreq: intel_pstate: Add base_frequency attribute Expose base_frequency to user space via cpufreq sysfs when HWP is in use. This HWP base frequency is read from the ACPI _CPC object if present, or from the HWP Capabilities MSR otherwise. On the majority of the HWP platforms the _CPC object will point to the HWP Capabilities MSR using the "Functional Fixed Hardware" address space type. The address space type also can simply be ACPI_TYPE_INTEGER, however, in which case the platform firmware can set its value at the initialization time based on the system constraints. Signed-off-by: Srinivas Pandruvada [ rjw: Changelog ] Signed-off-by: Rafael J. Wysocki commit 29523f095397637edca60c627bc3e5c25a02c40f Author: Srinivas Pandruvada Date: Mon Oct 15 10:37:19 2018 -0700 ACPI / CPPC: Add support for guaranteed performance The Continuous Performance Control package may contain an optional guaranteed performance field. Add support to read guaranteed performance from _CPC. Signed-off-by: Srinivas Pandruvada Signed-off-by: Rafael J. Wysocki commit 9a69e3ac41a5ab2daf230cf8503ed1aea3419a0f Merge: 18d3f8fc0c2c f69ffc5d3db8 Author: Rafael J. Wysocki Date: Tue Oct 16 10:10:35 2018 +0200 Merge tag 'linux-cpupower-4.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux into pm-tools Pull cpupower utility changes for 4.20 from Shuah Khan: "This cpupower update consists of fixes for bugs and compile warnings from Prarit Bhargava and Anders Roxell." * tag 'linux-cpupower-4.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux: cpupower: Fix coredump on VMWare cpupower: Fix AMD Family 0x17 msr_pstate size cpupower: remove stringop-truncation waring commit a93a676b079144009f55fff2ab0e34c3b7258c8a Author: Christophe JAILLET Date: Tue Oct 16 08:22:28 2018 +0200 pinctrl: sunxi: Fix a memory leak in 'sunxi_pinctrl_build_state()' If 'krealloc()' fails, 'pctl->functions' is set to NULL. We should instead use a temp variable in order to be able to free the previously allocated memeory, in case of OOM. Signed-off-by: Christophe JAILLET Acked-by: Maxime Ripard Signed-off-by: Linus Walleij commit 4cf841e398503990df640f7a7c5b2ea56f11c08c Author: Tony Luck Date: Mon Oct 15 16:11:31 2018 -0700 ACPI/ADXL: Add address translation interface using an ACPI DSM Some new Intel servers provide an interface so that the OS can ask the BIOS to translate a system physical address to a memory address (socket, memory controller, channel, rank, dimm, etc.). This is useful for EDAC drivers that want to take the address of an error reported in a machine check bank and let the user know which DIMM may need to be replaced. Specification for this interface is available at: https://cdrdv2.intel.com/v1/dl/getContent/603354 [ Based on earlier code by Qiuxu Zhuo . ] [ bp: Make the first pr_info() in adxl_init() pr_debug() so that it doesn't pollute every dmesg. ] Signed-off-by: Tony Luck Signed-off-by: Borislav Petkov Acked-by: Rafael J. Wysocki Tested-by: Qiuxu Zhuo CC: Len Brown CC: linux-acpi@vger.kernel.org CC: linux-edac@vger.kernel.org Link: http://lkml.kernel.org/r/20181015202620.23610-1-tony.luck@intel.com commit ee8edbf8ca6bfde89bb2a9e6efe261b9ea622ee7 Author: Masahiro Yamada Date: Tue Oct 16 13:11:33 2018 +0900 gpio: uniphier: 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 Signed-off-by: Linus Walleij commit e24cf513cb9801c72a9c461806b62cea430dd28a Author: Masahiro Yamada Date: Tue Oct 16 13:09:58 2018 +0900 pinctrl: uniphier: include instead of The reason of including here is just for BIT() macro. 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 Signed-off-by: Linus Walleij commit 95c97998aa9fc7992f2f9d3a70f518c4b9abca9e Author: Taehee Yoo Date: Sun Oct 7 00:17:07 2018 +0900 netfilter: nf_nat_snmp_basic: add missing helper alias name In order to upload helper module automatically, helper alias name is needed. so that MODULE_ALIAS_NFCT_HELPER() should be added. And unlike other nat helper modules, the nf_nat_snmp_basic can be used independently. helper name is "snmp_trap" so that alias name will be "nfct-helper-snmp_trap" by MODULE_ALIAS_NFCT_HELPER(snmp_trap) test command: %iptables -t raw -I PREROUTING -p udp -j CT --helper snmp_trap %lsmod | grep nf_nat_snmp_basic We can see nf_nat_snmp_basic module is uploaded automatically. Signed-off-by: Taehee Yoo Signed-off-by: Pablo Neira Ayuso commit e891e50a8ad9cbed68c9a90d8879faf7c1d8318a Author: Pablo Neira Ayuso Date: Thu Oct 11 10:58:26 2018 +0200 netfilter: xt_osf: simplify xt_osf_match_packet() info area in match is always available, and remove unneeded variables. Signed-off-by: Pablo Neira Ayuso commit 1321a6af30e45e467d0a5da00e8480c48cb627ee Author: Florian Westphal Date: Wed Oct 10 17:25:47 2018 +0200 netfilter: nft_xfrm: use state family, not hook one Eyal says: doesn't the use of nft_pf(pkt) in this context limit the matching of encapsulated packets to the same family? IIUC when an e.g. IPv6-in-IPv4 packet is matched, the nft_pf(pkt) will be the decapsulated packet family - IPv6 - whereas the state may be IPv4. So this check would not allow matching the 'underlay' address in such cases. I know this was a limitation in xt_policy. but is this intentional in this matcher? or is it possible to use state->props.family when validating the match instead of nft_pf(pkt)? Userspace already tells us which address family it expects to match, so we can just use the real state family rather than the hook family. so change it as suggested above. Reported-by: Eyal Birger Suggested-by: Eyal Birger Fixes: 6c47260250fc6 ("netfilter: nf_tables: add xfrm expression") Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit a218dc82f0b5c6c8ad3d58c9870ed69e26c08b3e Author: Fernando Fernandez Mancera Date: Wed Oct 10 09:57:13 2018 +0200 netfilter: nft_osf: Add ttl option support Add ttl option support to the nftables "osf" expression. Signed-off-by: Fernando Fernandez Mancera Signed-off-by: Pablo Neira Ayuso commit ea9cf2a55a7bb84ba862a0fc13044a4311c9bbfe Author: YueHaibing Date: Wed Oct 10 02:14:12 2018 +0000 netfilter: cttimeout: remove set but not used variable 'l3num' Fixes gcc '-Wunused-but-set-variable' warning: net/netfilter/nfnetlink_cttimeout.c: In function 'cttimeout_default_set': net/netfilter/nfnetlink_cttimeout.c:353:8: warning: variable 'l3num' set but not used [-Wunused-but-set-variable] It not used any more after commit dd2934a95701 ("netfilter: conntrack: remove l3->l4 mapping information") Signed-off-by: YueHaibing Signed-off-by: Pablo Neira Ayuso commit 4b87dd54be21ad611a1c740f9df0c4376d496e09 Author: Lance Roy Date: Tue Oct 2 22:39:00 2018 -0700 netfilter: 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 Cc: Pablo Neira Ayuso Cc: Jozsef Kadlecsik Cc: Florian Westphal Cc: "David S. Miller" Cc: Cc: Cc: Acked-by: Jozsef Kadlecsik Signed-off-by: Pablo Neira Ayuso commit 93d39737b29eaf1974bf850ccdc903b2418c800b Author: Rafał Miłecki Date: Mon Oct 15 11:30:13 2018 +0200 dt-bindings: pinctrl: bcm4708-pinmux: improve example binding Broadcom SoC pins are controlled using CRU ("Clock and Reset Unit" or "Central Resource Unit") registers. There are more CRU registers and functions so CRU should be represented as a separated block in DT. Moreover CRU is a sub-block of DMU ("Device Management Unit") so that one should also get its own node. Signed-off-by: Rafał Miłecki Signed-off-by: Linus Walleij commit 40f5ff4f9f23a849ad135cb736d4d448d810ac17 Author: Stephen Boyd Date: Mon Oct 8 09:32:16 2018 -0700 gpio: Clarify kerneldoc on gpiochip_set_chained_irqchip() This doesn't support nested anymore, so drivers shouldn't call it with the handler set to NULL. Cc: Evan Green Cc: Thierry Reding Cc: Grygorii Strashko Signed-off-by: Stephen Boyd Signed-off-by: Linus Walleij commit 3c1f6b2d116c74f96691989258cad90dfe454d8d Author: Stephen Boyd Date: Mon Oct 8 09:32:15 2018 -0700 gpio: Remove unused 'irqchip' argument to gpiochip_set_cascaded_irqchip() This argument hasn't ever been used since it was introduced in commit 1425052097b5 ("gpio: add IRQ chip helpers in gpiolib"). Let's drop it to reduce reading confusion. Cc: Evan Green Cc: Thierry Reding Cc: Grygorii Strashko Signed-off-by: Stephen Boyd Signed-off-by: Linus Walleij commit 9cb7cf9c4ebb19981cfa156cc60e2a75a51ccf1b Author: Stephen Boyd Date: Mon Oct 8 09:32:14 2018 -0700 gpio: Drop parent irq assignment during cascade setup We want to set the irq parent for interrupts that we're setting up to be cascaded from another interrupt controller, but we may or may not have already mapped the gpiochip irqs into the kernel's virtual irq number space at this point. If we have mapped irqs before calling here, then we've gone through gpiochip_irq_map() and called irq_set_parent() already. If we haven't mapped irqs, then the gpiochip is dynamically mapping irqs and we can rely on gpiochip_irq_map() or the gpio driver's irqdomain ops to setup the irq parent properly. Either way, setting the parent here when cascading the gpiochip doesn't make much sense because it should be done at irq mapping time. In the dynamic mapping case, this code is mapping virq 0 to some parent virq in a loop. While that's benign, let's drop this code to simplify. Cc: Evan Green Cc: Thierry Reding Cc: Grygorii Strashko Signed-off-by: Stephen Boyd Signed-off-by: Linus Walleij commit ce96a3a04130b8b6294e1d66e167d88577cf9746 Author: Andy Shevchenko Date: Thu Oct 4 18:33:21 2018 +0300 pinctrl: geminilake: Sort register offsets by value No functional change. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg Signed-off-by: Linus Walleij commit 2b3445c7eb72f377e335a83e91327da4104adf22 Author: Andy Shevchenko Date: Thu Oct 4 18:33:20 2018 +0300 pinctrl: geminilake: 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. This patch converts the driver accordingly. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg Signed-off-by: Linus Walleij commit 08a3e5dca04ada02516102acf8cbd77f89baee6d Author: Andy Shevchenko Date: Thu Oct 4 18:33:18 2018 +0300 pinctrl: geminilake: Update pin list for B0 stepping According to an updated pin list few names of the pins can be spelled better, taking into account their primary functions. Thus, update a pin list to cover B0 stepping. Note, SPI numbering had been fixed even in A0 public documentation. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg Signed-off-by: Linus Walleij commit 2c59f06cc0442862d589c36bd2f29667f96c35e7 Merge: e85679511e48 e4e92fb160d7 Author: David S. Miller Date: Tue Oct 16 00:14:18 2018 -0700 Merge branch 'net-Kernel-side-filtering-for-route-dumps' David Ahern says: ==================== net: Kernel side filtering for route dumps Implement kernel side filtering of route dumps by protocol (e.g., which routing daemon installed the route), route type (e.g., unicast), table id and nexthop device. iproute2 has been doing this filtering in userspace for years; pushing the filters to the kernel side reduces the amount of data the kernel sends and reduces wasted cycles on both sides processing unwanted data. These initial options provide a huge improvement for efficiently examining routes on large scale systems. v2 - better handling of requests for a specific table. Rather than walking the hash of all tables, lookup the specific table and dump it - refactor mr_rtm_dumproute moving the loop over the table into a helper that can be invoked directly - add hook to return NLM_F_DUMP_FILTERED in DONE message to ensure it is returned even when the dump returns nothing ==================== Signed-off-by: David S. Miller commit e4e92fb160d7bef689c6ad00108b4e52599ca05e Author: David Ahern Date: Mon Oct 15 18:56:51 2018 -0700 net/ipv4: Bail early if user only wants prefix entries Unlike IPv6, IPv4 does not have routes marked with RTF_PREFIX_RT. If the flag is set in the dump request, just return. In the process of this change, move the CLONE check to use the new filter flags. Signed-off-by: David Ahern Signed-off-by: David S. Miller commit 08e814c9e8eb5a982cbd1e8f6bd255d97c51026f Author: David Ahern Date: Mon Oct 15 18:56:50 2018 -0700 net/ipv6: Bail early if user only wants cloned entries Similar to IPv4, IPv6 fib no longer contains cloned routes. If a user requests a route dump for only cloned entries, no sense walking the FIB and returning everything. Signed-off-by: David Ahern Signed-off-by: David S. Miller commit 196cfebf897266c3450519e916bab9daff74e52c Author: David Ahern Date: Mon Oct 15 18:56:49 2018 -0700 net/mpls: Handle kernel side filtering of route dumps Update the dump request parsing in MPLS for the non-INET case to enable kernel side filtering. If INET is disabled the only filters that make sense for MPLS are protocol and nexthop device. Signed-off-by: David Ahern Signed-off-by: David S. Miller commit effe6792662495ad9c175bf0d9c53459a51fdbbd Author: David Ahern Date: Mon Oct 15 18:56:48 2018 -0700 net: Enable kernel side filtering of route dumps Update parsing of route dump request to enable kernel side filtering. Allow filtering results by protocol (e.g., which routing daemon installed the route), route type (e.g., unicast), table id and nexthop device. These amount to the low hanging fruit, yet a huge improvement, for dumping routes. ip_valid_fib_dump_req is called with RTNL held, so __dev_get_by_index can be used to look up the device index without taking a reference. From there filter->dev is only used during dump loops with the lock still held. Set NLM_F_DUMP_FILTERED in the answer_flags so the user knows the results have been filtered should no entries be returned. Signed-off-by: David Ahern Signed-off-by: David S. Miller commit cb167893f41e21e6bd283d78e53489289dc0592d Author: David Ahern Date: Mon Oct 15 18:56:47 2018 -0700 net: Plumb support for filtering ipv4 and ipv6 multicast route dumps Implement kernel side filtering of routes by egress device index and table id. If the table id is given in the filter, lookup table and call mr_table_dump directly for it. Signed-off-by: David Ahern Signed-off-by: David S. Miller commit e1cedae1ba6b09ae8376c1486712bf91ea0dfc41 Author: David Ahern Date: Mon Oct 15 18:56:46 2018 -0700 ipmr: Refactor mr_rtm_dumproute Move per-table loops from mr_rtm_dumproute to mr_table_dump and export mr_table_dump for dumps by specific table id. Signed-off-by: David Ahern Signed-off-by: David S. Miller commit bae9a78b17b87a7cef56cf492916007a58f65172 Author: David Ahern Date: Mon Oct 15 18:56:45 2018 -0700 net/mpls: Plumb support for filtering route dumps Implement kernel side filtering of routes by egress device index and protocol. MPLS uses only a single table and route type. Signed-off-by: David Ahern Signed-off-by: David S. Miller commit 13e38901d46ca60156c53c0d5e0b8bb58db66da5 Author: David Ahern Date: Mon Oct 15 18:56:44 2018 -0700 net/ipv6: Plumb support for filtering route dumps Implement kernel side filtering of routes by table id, egress device index, protocol, and route type. If the table id is given in the filter, lookup the table and call fib6_dump_table directly for it. Move the existing route flags check for prefix only routes to the new filter. Signed-off-by: David Ahern Signed-off-by: David S. Miller commit 18a8021a7be3207686851208f91a2f105b2d4703 Author: David Ahern Date: Mon Oct 15 18:56:43 2018 -0700 net/ipv4: Plumb support for filtering route dumps Implement kernel side filtering of routes by table id, egress device index, protocol and route type. If the table id is given in the filter, lookup the table and call fib_table_dump directly for it. Signed-off-by: David Ahern Signed-off-by: David S. Miller commit 4724676d551c0961659b1da3fb4b5928169fb184 Author: David Ahern Date: Mon Oct 15 18:56:42 2018 -0700 net: Add struct for fib dump filter Add struct fib_dump_filter for options on limiting which routes are returned in a dump request. The current list is table id, protocol, route type, rtm_flags and nexthop device index. struct net is needed to lookup the net_device from the index. Declare the filter for each route dump handler and plumb the new arguments from dump handlers to ip_valid_fib_dump_req. Signed-off-by: David Ahern Signed-off-by: David S. Miller commit 22e6c58b8c2843337ec4e8464b1ce6e869ca5bf4 Author: David Ahern Date: Mon Oct 15 18:56:41 2018 -0700 netlink: Add answer_flags to netlink_callback With dump filtering we need a way to ensure the NLM_F_DUMP_FILTERED flag is set on a message back to the user if the data returned is influenced by some input attributes. Normally this can be done as messages are added to the skb, but if the filter results in no data being returned, the user could be confused as to why. This patch adds answer_flags to the netlink_callback allowing dump handlers to set the NLM_F_DUMP_FILTERED at a minimum in the NLMSG_DONE message ensuring the flag gets back to the user. The netlink_callback space is initialized to 0 via a memset in __netlink_dump_start, so init of the new answer_flags is covered. Signed-off-by: David Ahern Signed-off-by: David S. Miller commit ba4a41198324be2e6fbb06c270fdc8500c0e38de Author: Mark Bloch Date: Wed Oct 10 09:55:10 2018 +0300 RDMA/mlx5: Add support for flow tag to raw create flow A user can provide a hint which will be attached to the packet and written to the CQE on receive. This can be used as a way to offload operations into the HW, for example parsing a packet which is a tunneled packet, and if so, pass 0x1 as the hint. The software can use that hint to decapsulate the packet and parse only the inner headers thus saving CPU cycles. Signed-off-by: Mark Bloch Reviewed-by: Yishai Hadas Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 645ba5970c0766c610920fd5e8dd34e62766af5a Author: Gal Pressman Date: Mon Oct 8 19:44:03 2018 +0300 RDMA/mlx5: Remove extraneous error check Remove double error check from create user RQ error flow. Fixes: 79b20a6c3014 ("IB/mlx5: Add receive Work Queue verbs") Signed-off-by: Gal Pressman Reviewed-by: Majd Dibbiny Signed-off-by: Jason Gunthorpe commit 4766ab5677a2842834f9bc4a21587256a811531c Author: Waiman Long Date: Fri Oct 12 17:42:27 2018 -0400 locking/lockdep: Remove duplicated 'lock_class_ops' percpu array Remove the duplicated 'lock_class_ops' percpu array that is not used anywhere. Signed-off-by: Waiman Long Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Will Deacon Fixes: 8ca2b56cd7da ("locking/lockdep: Make class->ops a percpu counter and move it under CONFIG_DEBUG_LOCKDEP=y") Link: http://lkml.kernel.org/r/1539380547-16726-1-git-send-email-longman@redhat.com Signed-off-by: Ingo Molnar commit e85679511e48168b0f066b6ae585556b5e0d8f5b Merge: c45d7150656f 0b592b5a01be Author: David S. Miller Date: Mon Oct 15 23:21:07 2018 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next Daniel Borkmann says: ==================== pull-request: bpf-next 2018-10-16 The following pull-request contains BPF updates for your *net-next* tree. The main changes are: 1) Convert BPF sockmap and kTLS to both use a new sk_msg API and enable sk_msg BPF integration for the latter, from Daniel and John. 2) Enable BPF syscall side to indicate for maps that they do not support a map lookup operation as opposed to just missing key, from Prashant. 3) Add bpftool map create command which after map creation pins the map into bpf fs for further processing, from Jakub. 4) Add bpftool support for attaching programs to maps allowing sock_map and sock_hash to be used from bpftool, from John. 5) Improve syscall BPF map update/delete path for map-in-map types to wait a RCU grace period for pending references to complete, from Daniel. 6) Couple of follow-up fixes for the BPF socket lookup to get it enabled also when IPv6 is compiled as a module, from Joe. 7) Fix a generic-XDP bug to handle the case when the Ethernet header was mangled and thus update skb's protocol and data, from Jesper. 8) Add a missing BTF header length check between header copies from user space, from Wenwen. 9) Minor fixups in libbpf to use __u32 instead u32 types and include proper perf_event.h uapi header instead of perf internal one, from Yonghong. 10) Allow to pass user-defined flags through EXTRA_CFLAGS and EXTRA_LDFLAGS to bpftool's build, from Jiri. 11) BPF kselftest tweaks to add LWTUNNEL to config fragment and to install with_addr.sh script from flow dissector selftest, from Anders. ==================== Signed-off-by: David S. Miller commit 2351776e87a18318b5f4732e7790f0c726cc37a0 Author: Yishai Hadas Date: Sun Oct 7 12:06:34 2018 +0300 IB/mlx5: Verify DEVX object type Verify that the input DEVX object type matches the created object. As the obj_id in the firmware is not globally unique the object type must be considered upon checking for a valid object id. Once both the type and the id match we know that the lock was taken on the correct object by the uverbs layer. Fixes: e662e14d801b ("IB/mlx5: Add DEVX support for modify and query commands") Signed-off-by: Yishai Hadas Reviewed-by: Artemy Kovalyov Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 68a997c5d28c581ae23594eb8a1420d834c30d24 Author: Yixian Liu Date: Fri Oct 5 17:53:24 2018 +0800 RDMA/hns: Add FRMR support for hip08 This patch adds fast register physical memory region (FRMR) support for hip08. Signed-off-by: Yixian Liu Signed-off-by: Jason Gunthorpe commit c45d7150656fc33181af5806c94bfe0e8f90c1a6 Author: Heiner Kallweit Date: Mon Oct 15 21:25:13 2018 +0200 net: phy: merge phy_start_aneg and phy_start_aneg_priv After commit 9f2959b6b52d ("net: phy: improve handling delayed work") the sync parameter isn't needed any longer in phy_start_aneg_priv(). This allows to merge phy_start_aneg() and phy_start_aneg_priv(). Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 965f22bc425298b619c5463e8af49aa98f744462 Author: Songjun Wu Date: Mon Sep 24 18:27:50 2018 +0800 MIPS: dts: Change upper case to lower case All the upper case in unit-address and hex constants are changed to lower case according to the DT conventions. Signed-off-by: Songjun Wu Signed-off-by: Paul Burton Reviewed-by: Rob Herring Patchwork: https://patchwork.linux-mips.org/patch/20768/ Cc: yixin.zhu@linux.intel.com Cc: chuanhua.lei@linux.intel.com Cc: hauke.mehrtens@intel.com Cc: devicetree@vger.kernel.org Cc: James Hogan Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Cc: Thomas Gleixner Cc: Philippe Ombredanne Cc: Rob Herring Cc: Kate Stewart Cc: Greg Kroah-Hartman Cc: Mark Rutland Cc: Ralf Baechle commit 0e557a3e061399820f15c92f5ac62b6d0000e84b Author: Alexandre Belloni Date: Fri Aug 31 17:04:34 2018 +0200 MIPS: generic: Add Network, SPI and I2C to ocelot_defconfig Add support for the integrated switch, and the SPI and I2C controller found on MSCC Ocelot. Signed-off-by: Alexandre Belloni Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/20345/ Cc: James Hogan Cc: Ralf Baechle Cc: linux-kernel@vger.kernel.org Cc: linux-mips@linux-mips.org commit 360fe725f8849aaddc53475fef5d4a0c439b05ae Author: Huacai Chen Date: Wed Sep 5 17:33:09 2018 +0800 MIPS: Loongson-3: Fix BRIDGE irq delivery problem After commit e509bd7da149dc349160 ("genirq: Allow migration of chained interrupts by installing default action") Loongson-3 fails at here: setup_irq(LOONGSON_HT1_IRQ, &cascade_irqaction); This is because both chained_action and cascade_irqaction don't have IRQF_SHARED flag. This will cause Loongson-3 resume fails because HPET timer interrupt can't be delivered during S3. So we set the irqchip of the chained irq to loongson_irq_chip which doesn't disable the chained irq in CP0.Status. Cc: stable@vger.kernel.org Signed-off-by: Huacai Chen Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/20434/ Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@linux-mips.org Cc: Fuxin Zhang Cc: Zhangjin Wu Cc: Huacai Chen commit d06f8a2f1befb5a3d0aa660ab1c05e9b744456ea Author: Huacai Chen Date: Wed Sep 5 17:33:08 2018 +0800 MIPS: Loongson-3: Fix CPU UART irq delivery problem Masking/unmasking the CPU UART irq in CP0_Status (and redirecting it to other CPUs) may cause interrupts be lost, especially in multi-package machines (Package-0's UART irq cannot be delivered to others). So make mask_loongson_irq() and unmask_loongson_irq() be no-ops. The original problem (UART IRQ may deliver to any core) is also because of masking/unmasking the CPU UART irq in CP0_Status. So it is safe to remove all of the stuff. Signed-off-by: Huacai Chen Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/20433/ Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@linux-mips.org Cc: Fuxin Zhang Cc: Zhangjin Wu Cc: Huacai Chen commit 7f8502a539bbfca7c3027e0279060eb46dfde59f Author: Paul Burton Date: Mon Oct 15 18:33:23 2018 +0000 MIPS: Remove unused PREF, PREFE & PREFX macros asm/asm.h provides PREF(), PREFE() & PREFX() macros which are now entirely unused. Delete the dead code. Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/20908/ Cc: linux-mips@linux-mips.org commit 1d6fb222bd23696a25b9b256a3e076b9c60677b8 Author: Paul Burton Date: Mon Oct 15 18:33:22 2018 +0000 MIPS: lib: Use kernel_pref & user_pref in memcpy() memcpy() is the only user of the PREF() & PREFE() macros from asm/asm.h. Switch to using the kernel_pref() & user_pref() macros from asm/asm-eva.h which fit more consistently with other abstractions of EVA vs non-EVA instructions. Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/20907/ Cc: linux-mips@linux-mips.org commit e2b405439903b20675de30090aab0fcadef5bbba Author: Paul Burton Date: Mon Oct 15 18:33:21 2018 +0000 MIPS: Remove unused CAT macro asm/asm.h provides a CAT macro which is unused throughout the tree, and if anyone wanted it the generic CONCATENATE macro in linux/kernel.h provides the same functionality. Delete the dead code. Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/20905/ Cc: linux-mips@linux-mips.org commit 4021c30a86ec7c2e51738eaa065317ce321d9798 Author: Paul Burton Date: Mon Oct 15 18:33:21 2018 +0000 MIPS: Add kernel_pref & user_pref helpers Add kernel_pref & user_pref macros to asm/asm-eva.h, providing an abstraction around EVA & non-EVA pref instructions consistent with the existing macros we have for cache & load/store instructions. Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/20906/ Cc: linux-mips@linux-mips.org commit da1d25e79a46fab38c73570bd7c3a0f545fbbb9d Author: Paul Burton Date: Mon Oct 15 18:33:20 2018 +0000 MIPS: Remove unused TTABLE macro asm/asm.h contains a TTABLE macro to generate "text tables" which would appear to be arrays of pointers to strings. It is unused throughout the kernel tree, so delete the dead code. Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/20904/ Cc: linux-mips@linux-mips.org commit fce362c7fc3f89687b4b0eecefd7de8baa91a679 Author: Paul Burton Date: Mon Oct 15 18:33:19 2018 +0000 MIPS: Remove unused PIC macros asm/asm.h contains CPRESTORE, CPADD & CPLOAD macros that are intended for use with position independent code, but are not used anywhere in the kernel - along with a comment to that effect. Remove the dead code. Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/20903/ Cc: linux-mips@linux-mips.org commit 7b2d13f2e24002c5113d30993c5297cb4fea1437 Author: Paul Burton Date: Mon Oct 15 18:33:19 2018 +0000 MIPS: Remove unused MOVN & MOVZ macros We have macros in asm/asm.h to allow for use of the MOVN & MOVZ instructions with compare-and-branch sequences providing compatibility for ISA versions which don't include those instructions. However the macros are unused, and appear to have always been unused. Delete the dead code. Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/20909/ Cc: linux-mips@linux-mips.org commit 5df950994934814a8b91f0cf9f653842d2ba082d Author: Selvin Xavier Date: Mon Oct 8 03:28:04 2018 -0700 RDMA/bnxt_re: Avoid resource leak in case the NQ registration fails In case the NQ alloc/enable fails, free up the already allocated/enabled NQ before reporting failure. Also, track the alloc/enable using proper state checking. Signed-off-by: Selvin Xavier Signed-off-by: Jason Gunthorpe commit a08b9e9a705675ba05fa44f0342e2875fd1bda28 Author: Selvin Xavier Date: Mon Oct 8 03:28:03 2018 -0700 RDMA/bnxt_re: Wait for delayed work to finish before device removal Delayed work bnxt_re_worker would be still running even after cancel_delayed_work returns. This causes crash as the driver proceeds with device removal. To make sure that the work is finished before returning, use cancel_delayed_work_sync. Signed-off-by: Selvin Xavier Signed-off-by: Jason Gunthorpe commit 854a202001171594df8988b335410adebac641d5 Author: Devesh Sharma Date: Mon Oct 8 03:28:02 2018 -0700 RDMA/bnxt_re: Limit max_pkey to 16 bit value Some FW versios return pkey values more than 0xFFFF. pkey_tbl_len of ib_port_attr is 16bit value. So restricting max_pkeys to 0xFFFF. Signed-off-by: Devesh Sharma Signed-off-by: Selvin Xavier Signed-off-by: Jason Gunthorpe commit 4c01f2e3a906a0d2d798be5751c331cf501bc129 Author: Devesh Sharma Date: Mon Oct 8 03:28:01 2018 -0700 RDMA/bnxt_re: Fix qp async event reporting Reports affiliated async event on the qp-async event channel instead of global event channel. Signed-off-by: Devesh Sharma Signed-off-by: Selvin Xavier Signed-off-by: Jason Gunthorpe commit 316dd2825db1396304fb3003fad6cf1fef1883a0 Author: Selvin Xavier Date: Mon Oct 8 03:28:00 2018 -0700 RDMA/bnxt_re: Report out of sequence hw counters Expose out of sequence errors received from FW. This counter is a 32 bit counter and driver has to accumulate the counter. Stores the previous value for calculating the difference in the next query. Also, update the HW statistics structure with new fields. Signed-off-by: Selvin Xavier Signed-off-by: Jason Gunthorpe commit 5c80c9138e28f600e185d0f23fca5ea7fe45bd95 Author: Selvin Xavier Date: Mon Oct 8 03:27:59 2018 -0700 RDMA/bnxt_re: Expose rx discards and drop counters Expose the RoCE discard and drop counters from the HW statistics context Signed-off-by: Selvin Xavier Signed-off-by: Jason Gunthorpe commit bb22c36cbaaeff351b8a6956d88be98497cc14aa Author: Somnath Kotur Date: Mon Oct 8 03:27:58 2018 -0700 RDMA/bnxt_re: Prevent driver crash due to NULL pointer in error message print crsqe->resp would be NULL in case the host command timed out before getting a response from HW. Check for NULL pointer to avoid a potential crash while printing the error message. Signed-off-by: Somnath Kotur Signed-off-by: Selvin Xavier Signed-off-by: Jason Gunthorpe commit f2bd4d096eb4e0074b476452789a3b10a31af162 Author: Devesh Sharma Date: Mon Oct 8 03:27:57 2018 -0700 RDMA/bnxt_re: Drop L2 async events silently In some FW versions, RoCE driver also receives an async notification which was directed to L2 driver. RoCE driver does not handle this and print a message to syslog. Drop these notifications silently. Signed-off-by: Devesh Sharma Signed-off-by: Selvin Xavier Signed-off-by: Jason Gunthorpe commit ed51efd2ce44091a858ad829f666727e7c95695e Author: Selvin Xavier Date: Mon Oct 8 03:27:56 2018 -0700 RDMA/bnxt_re: Avoid accessing nq->bar_reg_iomem in failure case In the failure path, nq->bar_reg_iomem gets accessed without initializing. Avoid this by calling the bnxt_qplib_nq_stop_irq only if the initialization is complete. Reported-by: Dan Carpenter Fixes: 1ac5a4047975 ("RDMA/bnxt_re: Add bnxt_re RoCE driver") Fixes: 6e04b1035689 ("RDMA/bnxt_re: Fix broken RoCE driver due to recent L2 driver changes") Signed-off-by: Selvin Xavier Signed-off-by: Jason Gunthorpe commit eae4ad1b0c9a77ef0cbac212d58d46976eaacfc1 Author: Selvin Xavier Date: Mon Oct 8 03:27:55 2018 -0700 RDMA/bnxt_re: Avoid NULL check after accessing the pointer This is reported by smatch check. rcfw->creq_bar_reg_iomem is accessed in bnxt_qplib_rcfw_stop_irq and this variable check afterwards doesn't make sense. Also, rcfw->creq_bar_reg_iomem will never be NULL. So Removing this check. Reported-by: Dan Carpenter Fixes: 6e04b1035689 ("RDMA/bnxt_re: Fix broken RoCE driver due to recent L2 driver changes") Signed-off-by: Selvin Xavier Signed-off-by: Jason Gunthorpe commit 1b7042d7a586a4b8c9d257ceba6f40390bcd21ee Author: Selvin Xavier Date: Mon Oct 8 03:27:54 2018 -0700 RDMA/bnxt_re: Remove the unnecessary version macro definition Version macro is not required as the driver is not maintaining the version. Removing the references of this macro too. Signed-off-by: Selvin Xavier Signed-off-by: Jason Gunthorpe commit d455f29f6d76a5f94881ca1289aaa1e90617ff5d Author: Selvin Xavier Date: Mon Oct 8 03:27:53 2018 -0700 RDMA/bnxt_re: Fix recursive lock warning in debug kernel Fix possible recursive lock warning. Its a false warning as the locks are part of two differnt HW Queue data structure - cmdq and creq. Debug kernel is throwing the following warning and stack trace. [ 783.914967] ============================================ [ 783.914970] WARNING: possible recursive locking detected [ 783.914973] 4.19.0-rc2+ #33 Not tainted [ 783.914976] -------------------------------------------- [ 783.914979] swapper/2/0 is trying to acquire lock: [ 783.914982] 000000002aa3949d (&(&hwq->lock)->rlock){..-.}, at: bnxt_qplib_service_creq+0x232/0x350 [bnxt_re] [ 783.914999] but task is already holding lock: [ 783.915002] 00000000be73920d (&(&hwq->lock)->rlock){..-.}, at: bnxt_qplib_service_creq+0x2a/0x350 [bnxt_re] [ 783.915013] other info that might help us debug this: [ 783.915016] Possible unsafe locking scenario: [ 783.915019] CPU0 [ 783.915021] ---- [ 783.915034] lock(&(&hwq->lock)->rlock); [ 783.915035] lock(&(&hwq->lock)->rlock); [ 783.915037] *** DEADLOCK *** [ 783.915038] May be due to missing lock nesting notation [ 783.915039] 1 lock held by swapper/2/0: [ 783.915040] #0: 00000000be73920d (&(&hwq->lock)->rlock){..-.}, at: bnxt_qplib_service_creq+0x2a/0x350 [bnxt_re] [ 783.915044] stack backtrace: [ 783.915046] CPU: 2 PID: 0 Comm: swapper/2 Not tainted 4.19.0-rc2+ #33 [ 783.915047] Hardware name: Dell Inc. PowerEdge R730/0599V5, BIOS 1.0.4 08/28/2014 [ 783.915048] Call Trace: [ 783.915049] [ 783.915054] dump_stack+0x90/0xe3 [ 783.915058] __lock_acquire+0x106c/0x1080 [ 783.915061] ? sched_clock+0x5/0x10 [ 783.915063] lock_acquire+0xbd/0x1a0 [ 783.915065] ? bnxt_qplib_service_creq+0x232/0x350 [bnxt_re] [ 783.915069] _raw_spin_lock_irqsave+0x4a/0x90 [ 783.915071] ? bnxt_qplib_service_creq+0x232/0x350 [bnxt_re] [ 783.915073] bnxt_qplib_service_creq+0x232/0x350 [bnxt_re] [ 783.915078] tasklet_action_common.isra.17+0x197/0x1b0 [ 783.915081] __do_softirq+0xcb/0x3a6 [ 783.915084] irq_exit+0xe9/0x100 [ 783.915085] do_IRQ+0x6a/0x120 [ 783.915087] common_interrupt+0xf/0xf [ 783.915088] Use nested notation for the spin_lock to avoid this warning. Signed-off-by: Selvin Xavier Signed-off-by: Jason Gunthorpe commit 5a23e0b1dd51fe0efae666b03fdb15e1301f437a Author: Selvin Xavier Date: Mon Oct 8 03:27:52 2018 -0700 RDMA/bnxt_re: Add missing spin lock initialization Add the missing initalization of the cq_lock and qplib.flush_lock. Fixes: 942c9b6ca8de ("RDMA/bnxt_re: Avoid Hard lockup during error CQE processing") Signed-off-by: Selvin Xavier Signed-off-by: Jason Gunthorpe commit 59bfc59a68286c5e6824ec3dddcf5232a73c217e Merge: ed7a01fd3fd7 dd9a40349570 Author: Jason Gunthorpe Date: Tue Oct 16 00:01:02 2018 -0600 Merge branch 'for-rc' into rdma.git for-next From git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git This is required to resolve dependencies of the next series of RDMA patches. The code motion conflicts in drivers/infiniband/core/cache.c were resolved. Signed-off-by: Jason Gunthorpe commit 005479556197f80139771960dda0dfdcd2d2aad5 Author: Haiyang Zhang Date: Mon Oct 15 19:06:15 2018 +0000 hv_netvsc: fix vf serial matching with pci slot info The VF device's serial number is saved as a string in PCI slot's kobj name, not the slot->number. This patch corrects the netvsc driver, so the VF device can be successfully paired with synthetic NIC. Fixes: 00d7ddba1143 ("hv_netvsc: pair VF based on serial number") Reported-by: Vitaly Kuznetsov Signed-off-by: Haiyang Zhang Reviewed-by: Stephen Hemminger Signed-off-by: David S. Miller commit b13949678b0abd374214dfd1472b4087a0898562 Merge: 1a3aea2534f4 825e1c523d50 Author: David S. Miller Date: Mon Oct 15 22:56:42 2018 -0700 Merge branch 'tcp-second-round-for-EDT-conversion' Eric Dumazet says: ==================== tcp: second round for EDT conversion First round of EDT patches left TCP stack in a non optimal state. - High speed flows suffered from loss of performance, addressed by the first patch of this series. - Second patch brings pacing to the current state of networking, since we now reach ~100 Gbit on a single TCP flow. - Third patch implements a mitigation for scheduling delays, like the one we did in sch_fq in the past. - Fourth patch removes one special case in sch_fq for ACK packets. - Fifth patch removes a serious perfomance cost for TCP internal pacing. We should setup the high resolution timer only if really needed. - Sixth patch fixes a typo in BBR. - Last patch is one minor change in cdg congestion control. Neal Cardwell also has a patch series fixing BBR after EDT adoption. ==================== Signed-off-by: David S. Miller commit 825e1c523d5000f067a1614e4a66bb282a2d373c Author: Eric Dumazet Date: Mon Oct 15 09:37:58 2018 -0700 tcp: cdg: use tcp high resolution clock cache We store in tcp socket a cache of most recent high resolution clock, there is no need to call local_clock() again, since this cache is good enough. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit 97ec3eb33dd300764ca5fa8923e5430dc4dbac13 Author: Neal Cardwell Date: Mon Oct 15 09:37:57 2018 -0700 tcp_bbr: fix typo in bbr_pacing_margin_percent There was a typo in this parameter name. Signed-off-by: Neal Cardwell Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit 864e5c090749448e879e86bec06ee396aa2c19c5 Author: Eric Dumazet Date: Mon Oct 15 09:37:56 2018 -0700 tcp: optimize tcp internal pacing When TCP implements its own pacing (when no fq packet scheduler is used), it is arming high resolution timer after a packet is sent. But in many cases (like TCP_RR kind of workloads), this high resolution timer expires before the application attempts to write the following packet. This overhead also happens when the flow is ACK clocked and cwnd limited instead of being limited by the pacing rate. This leads to extra overhead (high number of IRQ) Now tcp_wstamp_ns is reserved for the pacing timer only (after commit "tcp: do not change tcp_wstamp_ns in tcp_mstamp_refresh"), we can setup the timer only when a packet is about to be sent, and if tcp_wstamp_ns is in the future. This leads to a ~10% performance increase in TCP_RR workloads. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit 7baf33bdac37da65ddce3adf4daa8c7805802174 Author: Eric Dumazet Date: Mon Oct 15 09:37:55 2018 -0700 net_sched: sch_fq: no longer use skb_is_tcp_pure_ack() With the new EDT model, sch_fq no longer has to special case TCP pure acks, since their skb->tstamp will allow them being sent without pacing delay. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit a7a2563064e963bc5e3f39f533974f2730c0ff56 Author: Eric Dumazet Date: Mon Oct 15 09:37:54 2018 -0700 tcp: mitigate scheduling jitter in EDT pacing model In commit fefa569a9d4b ("net_sched: sch_fq: account for schedule/timers drifts") we added a mitigation for scheduling jitter in fq packet scheduler. This patch does the same in TCP stack, now it is using EDT model. Note that this mitigation is valid for both external (fq packet scheduler) or internal TCP pacing. This uses the same strategy than the above commit, allowing a time credit of half the packet currently sent. Consider following case : An skb is sent, after an idle period of 300 usec. The air-time (skb->len/pacing_rate) is 500 usec Instead of setting the pacing timer to now+500 usec, it will use now+min(500/2, 300) -> now+250usec This is like having a token bucket with a depth of half an skb. Tested: tc qdisc replace dev eth0 root pfifo_fast Before netperf -P0 -H remote -- -q 1000000000 # 8000Mbit 540000 262144 262144 10.00 7710.43 After : netperf -P0 -H remote -- -q 1000000000 # 8000 Mbit 540000 262144 262144 10.00 7999.75 # Much closer to 8000Mbit target Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit 76a9ebe811fb3d0605cb084f1ae6be5610541865 Author: Eric Dumazet Date: Mon Oct 15 09:37:53 2018 -0700 net: extend sk_pacing_rate to unsigned long sk_pacing_rate has beed introduced as a u32 field in 2013, effectively limiting per flow pacing to 34Gbit. We believe it is time to allow TCP to pace high speed flows on 64bit hosts, as we now can reach 100Gbit on one TCP flow. This patch adds no cost for 32bit kernels. The tcpi_pacing_rate and tcpi_max_pacing_rate were already exported as 64bit, so iproute2/ss command require no changes. Unfortunately the SO_MAX_PACING_RATE socket option will stay 32bit and we will need to add a new option to let applications control high pacing rates. State Recv-Q Send-Q Local Address:Port Peer Address:Port ESTAB 0 1787144 10.246.9.76:49992 10.246.9.77:36741 timer:(on,003ms,0) ino:91863 sk:2 <-> skmem:(r0,rb540000,t66440,tb2363904,f605944,w1822984,o0,bl0,d0) ts sack bbr wscale:8,8 rto:201 rtt:0.057/0.006 mss:1448 rcvmss:536 advmss:1448 cwnd:138 ssthresh:178 bytes_acked:256699822585 segs_out:177279177 segs_in:3916318 data_segs_out:177279175 bbr:(bw:31276.8Mbps,mrtt:0,pacing_gain:1.25,cwnd_gain:2) send 28045.5Mbps lastrcv:73333 pacing_rate 38705.0Mbps delivery_rate 22997.6Mbps busy:73333ms unacked:135 retrans:0/157 rcv_space:14480 notsent:2085120 minrtt:0.013 Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit 5f6188a8003d080e3753b8f14f4a5a2325ae1ff6 Author: Eric Dumazet Date: Mon Oct 15 09:37:52 2018 -0700 tcp: do not change tcp_wstamp_ns in tcp_mstamp_refresh In EDT design, I made the mistake of using tcp_wstamp_ns to store the last tcp_clock_ns() sample and to store the pacing virtual timer. This causes major regressions at high speed flows. Introduce tcp_clock_cache to store last tcp_clock_ns(). This is needed because some arches have slow high-resolution kernel time service. tcp_wstamp_ns is only updated when a packet is sent. Note that we can remove tcp_mstamp in the future since tcp_mstamp is essentially tcp_clock_cache/1000, so the apparent socket size increase is temporary. Fixes: 9799ccb0e984 ("tcp: add tcp_wstamp_ns socket field") Signed-off-by: Eric Dumazet Acked-by: Soheil Hassas Yeganeh Signed-off-by: David S. Miller commit 1a3aea2534f4f3083f29b2b047aa83a9d6c777a4 Author: Li RongQing Date: Mon Oct 15 19:00:31 2018 +0800 net: bridge: fix a possible memory leak in __vlan_add After per-port vlan stats, vlan stats should be released when fail to add vlan Fixes: 9163a0fc1f0c0 ("net: bridge: add support for per-port vlan stats") CC: bridge@lists.linux-foundation.org cc: Nikolay Aleksandrov CC: Roopa Prabhu Signed-off-by: Zhang Yu Signed-off-by: Li RongQing Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit bc0e7cf43370a8e229224623f516c9b0396e08b9 Author: David Howells Date: Mon Oct 15 11:31:03 2018 +0100 rxrpc: Add /proc/net/rxrpc/peers to display peer list Add /proc/net/rxrpc/peers to display the list of peers currently active. Signed-off-by: David Howells Signed-off-by: David S. Miller commit d275444cc36130313119777fefd077b7d575d040 Author: Wei Yongjun Date: Mon Oct 15 03:07:16 2018 +0000 fore200e: fix missing unlock on error in bsq_audit() Add the missing unlock before return from function bsq_audit() in the error handling case. Fixes: 1d9d8be91788 ("fore200e: check for dma mapping failures") Signed-off-by: Wei Yongjun Signed-off-by: David S. Miller commit 65f2247d615532ab1909e0892cc01d04c5262032 Merge: 9e983c589853 1ab968d2f1d6 Author: David S. Miller Date: Mon Oct 15 22:44:33 2018 -0700 Merge branch 'bnxt_en-Add-support-for-new-57500-chips' Michael Chan says: ==================== bnxt_en: Add support for new 57500 chips. This patch-set is larger than normal because I wanted a complete series to add basic support for the new 57500 chips. The new chips have the following main differences compared to legacy chips: 1. Requires the PF driver to allocate DMA context memory as a backing store. 2. New NQ (notification queue) for interrupt events. 3. One or more CP rings can be associated with an NQ. 4. 64-bit doorbells. Most other structures and firmware APIs are compatible with legacy devices with some exceptions. For example, ring groups are no longer used and RSS table format has changed. The patch-set includes the usual firmware spec. update, some refactoring and restructuring, and adding the new code to add basic support for the new class of devices. ==================== Signed-off-by: David S. Miller commit 1ab968d2f1d6d654052dbbf95f9461a6428a5487 Author: Michael Chan Date: Sun Oct 14 07:02:59 2018 -0400 bnxt_en: Add PCI ID for BCM57508 device. Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 0fcec9854ab478551debaef11e9c7875fc837906 Author: Michael Chan Date: Sun Oct 14 07:02:58 2018 -0400 bnxt_en: Add new NAPI poll function for 57500 chips. Add a new poll function that polls for NQ events. If the NQ event is a CQ notification, we locate the CP ring from the cq_handle and call __bnxt_poll_work() to handle RX/TX events on the CP ring. Add a new has_more_work field in struct bnxt_cp_ring_info to indicate budget has been reached. __bnxt_poll_cqs_done() is called to update or ARM the CP rings if budget has not been reached or not. If budget has been reached, the next bnxt_poll_p5() call will continue to poll from the CQ rings directly. Otherwise, the NQ will be ARMed for the next IRQ. Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 3675b92fa70ece4c9263b812fc8cbf3bd606398c Author: Michael Chan Date: Sun Oct 14 07:02:57 2018 -0400 bnxt_en: Refactor bnxt_poll_work(). Separate the CP ring polling logic in bnxt_poll_work() into 2 separate functions __bnxt_poll_work() and __bnxt_poll_work_done(). Since the logic is separated, we need to add tx_pkts and events fields to struct bnxt_napi to keep track of the events to handle between the 2 functions. We also add had_work_done field to struct bnxt_cp_ring_info to indicate whether some work was performed on the CP ring. This is needed to better support the 57500 chips. We need to poll up to 2 separate CP rings before we update or ARM the CP rings on the 57500 chips. Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 58590c8d9044dd6ff1757d9e9af63a253cc15101 Author: Michael Chan Date: Sun Oct 14 07:02:56 2018 -0400 bnxt_en: Add coalescing setup for 57500 chips. On legacy chips, the CP ring may be shared between RX and TX and so only setup the RX coalescing parameters in such a case. On 57500 chips, we always have a dedicated CP ring for TX so we can always set up the TX coalescing parameters in bnxt_hwrm_set_coal(). Also, the min_timer coalescing parameter applies to the NQ on the new chips and a separate firmware call needs to be made to set it up. Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit e44758b78ae81461a3269e7958653f1af0f78989 Author: Michael Chan Date: Sun Oct 14 07:02:55 2018 -0400 bnxt_en: Use bnxt_cp_ring_info struct pointer as parameter for RX path. In the RX code path, we current use the bnxt_napi struct pointer to identify the associated RX/CP rings. Change it to use the struct bnxt_cp_ring_info pointer instead since there are now up to 2 CP rings per MSIX. Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 7b3af4f75b81bec06ed5bf411039fbd0646da44e Author: Michael Chan Date: Sun Oct 14 07:02:54 2018 -0400 bnxt_en: Add RSS support for 57500 chips. RSS context allocation and RSS indirection table setup are very different on the new chip. Refactor bnxt_setup_vnic() to call 2 different functions to set up RSS for the vnic based on chip type. On the new chip, the number of RSS contexts and the indirection table size depends on the number of RX rings. Each indirection table entry is also different on the new chip since ring groups are no longer used. Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 44c6f72a4c30496c7378a62e13605b217e49f991 Author: Michael Chan Date: Sun Oct 14 07:02:53 2018 -0400 bnxt_en: Increase RSS context array count and skip ring groups on 57500 chips. On the new 57500 chips, we need to allocate one RSS context for every 64 RX rings. In previous chips, only one RSS context per vnic is required regardless of the number of RX rings. So increase the max RSS context array count to 8. Hardware ring groups are not used on the new chips. Note that the software ring group structure is still maintained in the driver to keep track of the rings associated with the vnic. Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 3e08b1841bc8debf6b3d722b9d355093a1537b1e Author: Michael Chan Date: Sun Oct 14 07:02:52 2018 -0400 bnxt_en: Allocate/Free CP rings for 57500 series chips. On the new 57500 chips, we allocate/free one CP ring for each RX ring or TX ring separately. Using separate CP rings for RX/TX is an improvement as TX events will no longer be stuck behind RX events. Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 23aefdd761599e42d7f1f6504ff38c558e18de2a Author: Michael Chan Date: Sun Oct 14 07:02:51 2018 -0400 bnxt_en: Modify bnxt_ring_alloc_send_msg() to support 57500 chips. Firmware ring allocation semantics are slightly different for most ring types on 57500 chips. Allocation/deallocation for NQ rings are also added for the new chips. A CP ring handle is also added so that from the NQ interrupt event, we can locate the CP ring. Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 2c61d2117ecb065aaad9e9ea9bc8bc4a6c30ec24 Author: Michael Chan Date: Sun Oct 14 07:02:50 2018 -0400 bnxt_en: Add helper functions to get firmware CP ring ID. On the new 57500 chips, getting the associated CP ring ID associated with an RX ring or TX ring is different than before. On the legacy chips, we find the associated ring group and look up the CP ring ID. On the 57500 chips, each RX ring and TX ring has a dedicated CP ring even if they share the MSIX. Use these helper functions at appropriate places to get the CP ring ID. Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 50e3ab7836b5efdc25e935316b3a156de3ff972e Author: Michael Chan Date: Sun Oct 14 07:02:49 2018 -0400 bnxt_en: Allocate completion ring structures for 57500 series chips. On 57500 chips, the original bnxt_cp_ring_info struct now refers to the NQ. bp->cp_nr_rings refer to the number of NQs on 57500 chips. There are now 2 pointers for the CP rings associated with RX and TX rings. Modify bnxt_alloc_cp_rings() and bnxt_free_cp_rings() accordingly. With multiple CP rings per NAPI, we need to add a pointer in bnxt_cp_ring_info struct to point back to the bnxt_napi struct. Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 41e8d7983752f2a0ada01fac11cbac7413e7beec Author: Michael Chan Date: Sun Oct 14 07:02:48 2018 -0400 bnxt_en: Modify the ring reservation functions for 57500 series chips. The ring reservation functions have to be modified for P5 chips in the following ways: - bnxt_cp_ring_info structs map to internal NQs as well as CP rings. - Ring groups are not used. - 1 CP ring must be available for each RX or TX ring. - number of RSS contexts to reserve is multiples of 64 RX rings. - RFS currently not supported. Also, RX AGG rings are only used for jumbo frames, so we need to unconditionally call bnxt_reserve_rings() in __bnxt_open_nic() to see if we need to reserve AGG rings in case MTU has changed. Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 9c1fabdf424f27370790f1e0868b35cf63b70981 Author: Michael Chan Date: Sun Oct 14 07:02:47 2018 -0400 bnxt_en: Adjust MSIX and ring groups for 57500 series chips. Store the maximum MSIX capability in PCIe config. space earlier. When we call firmware to query capability, we need to compare the PCIe MSIX max count with the firmware count and use the smaller one as the MSIX count for 57500 (P5) chips. The new chips don't use ring groups. But previous chips do and the existing logic limits the available rings based on resource calculations including ring groups. Setting the max ring groups to the max rx rings will work on the new chips without changing the existing logic. Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 697197e5a1735325c0e1ef85dde2b2986354beb9 Author: Michael Chan Date: Sun Oct 14 07:02:46 2018 -0400 bnxt_en: Re-structure doorbells. The 57500 series chips have a new 64-bit doorbell format. Use a new bnxt_db_info structure to unify the new and the old 32-bit doorbells. Add a new bnxt_set_db() function to set up the doorbell addreses and doorbell keys ahead of time. Modify and introduce new doorbell helpers to help abstract and unify the old and new doorbells. Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit e38287b72ec5455eb1e16b1de0ba4ed54e2a748c Author: Michael Chan Date: Sun Oct 14 07:02:45 2018 -0400 bnxt_en: Add 57500 new chip ID and basic structures. 57500 series is a new chip class (P5) that requires some driver changes in the next several patches. This adds basic chip ID, doorbells, and the notification queue (NQ) structures. Each MSIX is associated with an NQ instead of a CP ring in legacy chips. Each NQ has up to 2 associated CP rings for RX and TX. The same bnxt_cp_ring_info struct will be used for the NQ. Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 1b9394e5a2ad48be7906557ea6a500c5e8e91ee1 Author: Michael Chan Date: Sun Oct 14 07:02:44 2018 -0400 bnxt_en: Configure context memory on new devices. Call firmware to configure the DMA addresses of all context memory pages on new devices requiring context memory. Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 98f04cf0f1fc26ee8401e7c06b422508acc8374c Author: Michael Chan Date: Sun Oct 14 07:02:43 2018 -0400 bnxt_en: Check context memory requirements from firmware. New device requires host context memory as a backing store. Call firmware to check for context memory requirements and store the parameters. Allocate host pages accordingly. We also need to move the call bnxt_hwrm_queue_qportcfg() earlier so that all the supported hardware queues and the IDs are known before checking and allocating context memory. Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 66cca20abcf742e2e39ec437144e7787ecefa037 Author: Michael Chan Date: Sun Oct 14 07:02:42 2018 -0400 bnxt_en: Add new flags to setup new page table PTE bits on newer devices. Newer chips require the PTU_PTE_VALID bit to be set for every page table entry for context memory and rings. Additional bits are also required for page table entries for all rings. Add a flags field to bnxt_ring_mem_info struct to specify these additional bits to be used when setting up the pages tables as needed. Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 6fe19886858f1c7f96a5da3420bd040c58bcaca6 Author: Michael Chan Date: Sun Oct 14 07:02:41 2018 -0400 bnxt_en: Refactor bnxt_ring_struct. Move the DMA page table and vmem fields in bnxt_ring_struct to a new bnxt_ring_mem_info struct. This will allow context memory management for a new device to re-use some of the existing infrastructure. Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 74706afa712d3d2aa497585af44f11319b2b6348 Author: Michael Chan Date: Sun Oct 14 07:02:40 2018 -0400 bnxt_en: Update interrupt coalescing logic. New firmware spec. allows interrupt coalescing parameters, such as maximums, timer units, supported features to be queried. Update the driver to make use of the new call to query these parameters and provide the legacy defaults if the call is not available. Replace the hard-coded values with these parameters. Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 1dfddc41ae4990b991059de8dfc8e802ab67244c Author: Michael Chan Date: Sun Oct 14 07:02:39 2018 -0400 bnxt_en: Add maximum extended request length fw message support. Support the max_ext_req_len field from the HWRM_VER_GET_RESPONSE. If this field is valid and greater than the mailbox size, use the short command format to send firmware messages greater than the mailbox size. Newer devices use this method to send larger messages to the firmware. Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 36e53349b60bc6c629949e041567a376c9c42228 Author: Michael Chan Date: Sun Oct 14 07:02:38 2018 -0400 bnxt_en: Add additional extended port statistics. Latest firmware spec. has some additional rx extended port stats and new tx extended port stats added. We now need to check the size of the returned rx and tx extended stats and determine how many counters are valid. New counters added include CoS byte and packet counts for rx and tx. Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 31d357c0697dadb760bf682bf1ffd9fd7053ed59 Author: Michael Chan Date: Sun Oct 14 07:02:37 2018 -0400 bnxt_en: Update firmware interface spec. to 1.10.0.3. Among the new changes are trusted VF support, 200Gbps support, and new API to dump ring information on the new chips. Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 9e983c589853bc4052631f43e328543a3d6097bd Merge: 2527e4037f92 bb059fb20447 Author: David S. Miller Date: Mon Oct 15 22:37:28 2018 -0700 Merge branch 'selftests-pmtu-Add-test-choice-and-captures' Stefano Brivio says: ==================== selftests: pmtu: Add test choice and captures This series adds a couple of features useful for debugging: 1/2 allows selecting single tests and 2/2 adds optional traffic captures. Semantics for current invocation of test script are preserved. ==================== Signed-off-by: David S. Miller commit bb059fb20447c869970ebd296010c1a822706c58 Author: Stefano Brivio Date: Fri Oct 12 23:54:14 2018 +0200 selftests: pmtu: Add optional traffic captures for single tests If --trace is passed as an option and tcpdump is available, capture traffic for all relevant interfaces to per-test pcap files named _.pcap. Signed-off-by: Stefano Brivio Reviewed-by: Sabrina Dubroca Signed-off-by: David S. Miller commit 55bbc8ff4987d05b7d2f2d513caabd0a58fec021 Author: Stefano Brivio Date: Fri Oct 12 23:54:13 2018 +0200 selftests: pmtu: Allow selection of single tests As number of tests is growing, it's quite convenient to allow single tests to be run. Display usage when the script is run with any invalid argument, keep existing semantics when no arguments are passed so that automated runs won't break. Instead of just looping on the list of requested tests, if any, check first that they exist, and go through them in a nested loop to keep the existing way to display test descriptions. Signed-off-by: Stefano Brivio Reviewed-by: Sabrina Dubroca Signed-off-by: David S. Miller commit 2527e4037f92d4ac70a843cf602236846b693262 Author: Heiner Kallweit Date: Fri Oct 12 23:30:52 2018 +0200 r8169: remove unneeded call to netif_stop_queue in rtl8169_net_suspend netif_device_detach() stops all tx queues already, so we don't need this call. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 34bc009543c052da3c9771311274babf568f0233 Author: Heiner Kallweit Date: Fri Oct 12 23:23:57 2018 +0200 r8169: simplify rtl8169_set_magic_reg Simplify this function, no functional change intended. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 44eb385bc5f315c3707ffdaffd5cb9d3e78c1839 Author: Arnd Bergmann Date: Fri Oct 12 21:52:22 2018 +0200 octeontx2-af: remove unused cgx_fwi_link_change The newly added driver causes a warning about a function that is not used anywhere: drivers/net/ethernet/marvell/octeontx2/af/cgx.c:320:12: error: 'cgx_fwi_link_change' defined but not used [-Werror=unused-function] Remove it for now, until a user gets added. If we want to use this function from another module, we also need a declaration in a header file, which is currently missing, so it would have to change anyway. Fixes: 1463f382f58d ("octeontx2-af: Add support for CGX link management") Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller commit 5948185b97fa1f83d7855e638a72982a1073ebf5 Author: Ryan C Goodfellow Date: Fri Oct 12 11:09:01 2018 -0700 nfp: devlink port split support for 1x100G CXP NIC This commit makes it possible to use devlink to split the 100G CXP Netronome into two 40G interfaces. Currently when you ask for 2 interfaces, the math in src/nfp_devlink.c:nfp_devlink_port_split calculates that you want 5 lanes per port because for some reason eth_port.port_lanes=10 (shouldn't this be 12 for CXP?). What we really want when asking for 2 breakout interfaces is 4 lanes per port. This commit makes that happen by calculating based on 8 lanes if 10 are present. Signed-off-by: Ryan C Goodfellow Reviewed-by: Jakub Kicinski Reviewed-by: Greg Weeks Signed-off-by: David S. Miller commit ca0f32d5d9746e1d8db65d4b52bbda0208c307ca Merge: 5b3a5a14f84c b948c8c6a779 Author: David S. Miller Date: Mon Oct 15 22:23:20 2018 -0700 Merge branch 'dpaa2-eth-code-cleanup' Ioana Ciornei says: ==================== dpaa2-eth: code cleanup There are no functional changes in this patch set, only some cleanup changes such as: unused parameters, uninitialized variables and unnecessary Kconfig dependencies. ==================== Signed-off-by: David S. Miller commit b948c8c6a77944486ea4de909bc6790c334ebf07 Author: Ioana Radulescu Date: Fri Oct 12 16:27:40 2018 +0000 dpaa2-eth: remove unused FD field According to the hardware ArchDef, the PTV1 field in FD[CTRL] is ignored by WRIOP, so setting it for Tx FDs is pointless. Remove all references to it from the code. Signed-off-by: Ioana Radulescu Signed-off-by: Ioana Ciornei Signed-off-by: David S. Miller commit b00c898c00e11dd98516f31810013be4b768130f Author: Ioana Ciornei Date: Fri Oct 12 16:27:38 2018 +0000 dpaa2-eth: mark unused parameter in dpaa2_eth_tx_conf The ch parameter is never used in the dpaa2_eth_tx_conf function but since its prototype must match the type defined in the consume field of struct dpaa2_eth_fq, just mark it as __always_unused. Signed-off-by: Ioana Ciornei Signed-off-by: David S. Miller commit fdb6ca9e46745c24d4a9c23d05c4188957721f27 Author: Ioana Ciornei Date: Fri Oct 12 16:27:35 2018 +0000 dpaa2-eth: remove unused priv parameter The priv parameter is never used in the build_linear_skb and drain_channel function. Remove it from the function definitions. Signed-off-by: Ioana Ciornei Signed-off-by: David S. Miller commit 85b7a342baf58c42199795cbb2d60ab98ef298ad Author: Ioana Ciornei Date: Fri Oct 12 16:27:33 2018 +0000 dpaa2-eth: fix uninitialized variable warnings All 3 cases of possible uninitialized variables are false positives since they are used only as output parameters. Nonetheless, fix the warnings. Signed-off-by: Ioana Ciornei Signed-off-by: David S. Miller commit 3233c1514f757350c17fa8ba929ee91165fc854c Author: Ioana Ciornei Date: Fri Oct 12 16:27:29 2018 +0000 dpaa2-eth: make dpaa2_eth_set_dist_key static The dpaa2_eth_set_dist_key function is only used in a single file. Make it static. Signed-off-by: Ioana Ciornei Signed-off-by: David S. Miller commit b12cef51b537d869f423c0f4bb2d2245ce2e5619 Author: Ioana Radulescu Date: Fri Oct 12 16:27:25 2018 +0000 dpaa2-eth: Fix Kconfig dependencies Both ARCH_LAYERSCAPE and COMPILE_TEST dependencies are already implied through the FSL_MC_BUS dep, so there's no need to state it explicitly. Also, the fsl-mc bus depends on COMPILE_TEST only for some architectures (arm, arm64, ppc, x86), so it's not correct to claim build support unconditionally. Signed-off-by: Ioana Radulescu Signed-off-by: Ioana Ciornei Signed-off-by: David S. Miller commit 5b3a5a14f84c326413d00a213ad4c950d43af2c8 Author: Ivan Khoronzhuk Date: Fri Oct 12 19:06:29 2018 +0300 net: ethernet: ti: cpsw: use for mcast entries only host port In dual-emac mode the cpsw driver sends directed packets, that means that packets go to the directed port, but an ALE lookup is performed to determine untagged egress only. It means that on tx side no need to add port bit for ALE mcast entry mask, and basically ALE entry for port identification is needed only on rx side. So, add only host port in dual_emac mode as used directed transmission, and no need in one more port. For single port boards and switch mode all ports used, as usual, so no changes for them. Also it simplifies farther changes. In other words, mcast entries for dual-emac should behave exactly like unicast. It also can help avoid leaking packets between ports with same vlan on h/w level if ports could became members of same vid. So now, for instance, if mcast address 33:33:00:00:00:01 is added then entries in ALE table: vid = 1, addr = 33:33:00:00:00:01, port_mask = 0x1 vid = 2, addr = 33:33:00:00:00:01, port_mask = 0x1 Instead of: vid = 1, addr = 33:33:00:00:00:01, port_mask = 0x3 vid = 2, addr = 33:33:00:00:00:01, port_mask = 0x5 With the same considerations, set only host port for unregistered mcast for dual-emac mode in case of IFF_ALLMULTI is set, exactly like it's done in cpsw_ale_set_allmulti(). Signed-off-by: Ivan Khoronzhuk Reviewed-by: Grygorii Strashko Signed-off-by: David S. Miller commit ba722f9b6f9870bdf85bcfe5828bd4c6ab1118c4 Merge: 5985d5631dc3 5da1948969bc Author: David S. Miller Date: Mon Oct 15 22:21:28 2018 -0700 Merge branch 'net-ethernet-ti-cpsw-fix-mcast-packet-lost' Ivan Khoronzhuk says: ==================== net: ethernet: ti: cpsw fix mcast packet lost The patchset omits redundant refresh of mcast address table and prevents mcast packet lost. Based on net-next/master tested on am572x evm ==================== Signed-off-by: David S. Miller commit 5da1948969bc1991920987ce4361ea56046e5a98 Author: Ivan Khoronzhuk Date: Fri Oct 12 18:28:15 2018 +0300 net: ethernet: ti: cpsw: fix lost of mcast packets while rx_mode update Whenever kernel or user decides to call rx mode update, it clears every multicast entry from forwarding table and in some time adds it again. This time can be enough to drop incoming multicast packets. That's why clear only staled multicast entries and update or add new one afterwards. Signed-off-by: Ivan Khoronzhuk Signed-off-by: David S. Miller commit 58bdeac8b0e7ba6a5b60339fe3c197a52715abbf Author: Ivan Khoronzhuk Date: Fri Oct 12 18:28:14 2018 +0300 net: ethernet: ti: cpsw_ale: use const for API having pointer on mac address It allows to use function under callbacks with same const qualifier of mac address for farther changes. Signed-off-by: Ivan Khoronzhuk Signed-off-by: David S. Miller commit aa73237dcb2d96d7a3292af8ca943dd149fd39af Author: Bart Van Assche Date: Mon Oct 15 08:51:39 2018 -0700 scsi: target/core: Always call transport_complete_callback() upon failure COMPARE AND WRITE command execution starts with a call of sbc_compare_and_write(). That function locks the caw_sem member in the backend device data structure and submits a read request to the backend driver. Upon successful completion of the read compare_and_write_callback() gets called. That last function compares the data that has been read. If it matches transport_complete_callback is set to compare_and_write_post and a write request is submitted. compare_and_write_post() submits a write request to the backend driver. XDWRITEREAD command execution starts with sbc_execute_rw() submitting a read to the backend device. Upon successful completion of the read the xdreadwrite_callback() gets called. That function xors the data that has been read with the data in the data-out buffer and stores the result in the data-in buffer. Call transport_complete_callback() not only if COMPARE AND WRITE fails but also if XDWRITEREAD fails. This makes the code more systematic. Make sure that the callback functions handle (cmd, false, NULL) argument triples fine. Reviewed-by: Christoph Hellwig Reviewed-by: Nicholas Bellinger Cc: Mike Christie Cc: Hannes Reinecke Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 81b6ca6dbada186d0d41c67db8d8eb223a64a56f Author: Bart Van Assche Date: Mon Oct 15 08:51:38 2018 -0700 scsi: target/core: Use sg_alloc_table() instead of open-coding it The purpose of sg_alloc_table() is to allocate and initialize an sg-list. Use that function instead of open-coding it. This patch will make it easier to share code for caching sg-list allocations between the SCSI and NVMe target cores. Signed-off-by: Bart Van Assche Cc: Nicholas Bellinger Cc: Mike Christie Cc: Christoph Hellwig Cc: Hannes Reinecke Signed-off-by: Martin K. Petersen commit 80b045b385cfef10939c913fbfeb19ce5491c1f2 Author: Bart Van Assche Date: Mon Oct 15 08:51:37 2018 -0700 scsi: target/core: Use the SECTOR_SHIFT constant Instead of duplicating the SECTOR_SHIFT definition from , use it. This patch does not change any functionality. Reviewed-by: Christoph Hellwig Cc: Nicholas Bellinger Cc: Mike Christie Cc: Hannes Reinecke Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 5e568d22fc7963a1cfe0d7d87c46c2ed6a934369 Author: Bart Van Assche Date: Mon Oct 15 08:51:36 2018 -0700 scsi: target/core: Remove the SCF_COMPARE_AND_WRITE_POST flag Commit 057085e522f8 ("target: Fix race for SCF_COMPARE_AND_WRITE_POST checking") removed the code that checks the SCF_COMPARE_AND_WRITE_POST flag. Hence also remove the flag itself. 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 c1fbff863595a3ca9bbb93ec4abec7c05cb0839c Author: Bart Van Assche Date: Mon Oct 15 08:51:35 2018 -0700 scsi: target/core: Remove an unused data member from struct xcopy_pt_cmd A value is assigned to the xcopy_op member of struct xcopy_pt_cmd but that value is never used. Hence remove the xcopy_op member. Reviewed-by: Christoph Hellwig Cc: Nicholas Bellinger Cc: Mike Christie Cc: Hannes Reinecke Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 4240d448a483e8c2811dc914a1408f606fe13347 Author: Bart Van Assche Date: Mon Oct 15 08:51:34 2018 -0700 scsi: target/core: Fix spelling in two source code comments Change one occurrence of "aleady" into "already" and one occurrence of "is" into "if". Reviewed-by: Christoph Hellwig Cc: Nicholas Bellinger Cc: Mike Christie Cc: Hannes Reinecke Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 5985d5631dc352dadd34b692b962a3f3cb2a5088 Merge: 0813e95760f1 eb4c470a154d Author: David S. Miller Date: Mon Oct 15 22:06:38 2018 -0700 Merge branch 'net-phy-improve-and-simplify-state-machine' Heiner Kallweit says: ==================== net: phy: improve and simplify state machine Improve / simplify handling of states PHY_RUNNING and PHY_RESUMING in phylib state machine. ==================== Signed-off-by: David S. Miller commit eb4c470a154d2d3176d08155c3136973661f69ad Author: Heiner Kallweit Date: Thu Oct 11 22:37:38 2018 +0200 net: phy: simplify handling of PHY_RESUMING in state machine Simplify code for handling state PHY_RESUMING, no functional change intended. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 74fb5e25a3e925286e80eb2e0253f88f2b44ec96 Author: Heiner Kallweit Date: Thu Oct 11 22:36:56 2018 +0200 net: phy: improve handling of PHY_RUNNING in state machine Handling of state PHY_RUNNING seems to be more complex than it needs to be. If not polling, then we don't have to do anything, we'll receive an interrupt and go to state PHY_CHANGELINK once the link goes down. If polling and link is down, we don't have to go the extra mile over PHY_CHANGELINK and call phy_read_status() again but can set status PHY_NOLINK directly. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 0813e95760f1963c3ca0c47b4bb3583f07147a2e Author: Roopa Prabhu Date: Thu Oct 11 12:35:13 2018 -0700 vxlan: support NTF_USE refresh of fdb entries This makes use of NTF_USE in vxlan driver consistent with bridge driver. Signed-off-by: Roopa Prabhu Acked-by: Stephen Hemminger Signed-off-by: David S. Miller commit 9771b8ccdfa6dcb1ac5128ca7fe8649f3092d392 Author: Justin.Lee1@Dell.com Date: Thu Oct 11 18:07:37 2018 +0000 net/ncsi: Extend NC-SI Netlink interface to allow user space to send NC-SI command The new command (NCSI_CMD_SEND_CMD) is added to allow user space application to send NC-SI command to the network card. Also, add a new attribute (NCSI_ATTR_DATA) for transferring request and response. The work flow is as below. Request: User space application -> Netlink interface (msg) -> new Netlink handler - ncsi_send_cmd_nl() -> ncsi_xmit_cmd() Response: Response received - ncsi_rcv_rsp() -> internal response handler - ncsi_rsp_handler_xxx() -> ncsi_rsp_handler_netlink() -> ncsi_send_netlink_rsp () -> Netlink interface (msg) -> user space application Command timeout - ncsi_request_timeout() -> ncsi_send_netlink_timeout () -> Netlink interface (msg with zero data length) -> user space application Error: Error detected -> ncsi_send_netlink_err () -> Netlink interface (err msg) -> user space application Signed-off-by: Justin Lee Reviewed-by: Samuel Mendoza-Jonas Signed-off-by: David S. Miller commit 6384e483239fd07a2d4393f888027118fecd4c6e Author: Heiner Kallweit Date: Thu Oct 11 19:31:47 2018 +0200 net: phy: trigger state machine immediately in phy_start_machine When starting the state machine there may be work to be done immediately, e.g. if the initial state is PHY_UP then the state machine may trigger an autonegotiation. Having said that I see no need to wait a second until the state machine is run first time. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit a75d1801a9fc12e43a26b366b1a7494083cdf5ba Merge: acad76a5f616 d397b9682c1c Author: David S. Miller Date: Mon Oct 15 21:58:46 2018 -0700 Merge branch 'veth-XDP-stats-improvement' Toshiaki Makita says: ==================== veth: XDP stats improvement ndo_xdp_xmit in veth did not update packet counters as described in [1]. Also, current implementation only updates counters on tx side so rx side events like XDP_DROP were not collected. This series implements the missing accounting as well as support for ethtool per-queue stats in veth. Patch 1: Update drop counter in ndo_xdp_xmit. Patch 2: Update packet and byte counters for all XDP path, and drop counter on XDP_DROP. Patch 3: Support per-queue ethtool stats for XDP counters. Note that counters are maintained on per-queue basis for XDP but not otherwise (per-cpu and atomic as before). This is because 1) tx path in veth is essentially lockless so we cannot update per-queue stats on tx, and 2) rx path is net core routine (process_backlog) which cannot update per-queue based stats when XDP is disabled. On the other hand there are real rxqs and napi handlers for veth XDP, so update per-queue stats on rx for XDP packets, and use them to calculate tx counters as well, contrary to the existing non-XDP counters. [1] https://patchwork.ozlabs.org/cover/953071/#1967449 ==================== Signed-off-by: Toshiaki Makita Signed-off-by: David S. Miller commit d397b9682c1c808344dd93b43de8750fa4d9f581 Author: Toshiaki Makita Date: Thu Oct 11 18:36:50 2018 +0900 veth: Add ethtool statistics support for XDP Expose per-queue stats for ethtool -S. As there are only rx queues, and rx queues are used only when XDP is used, per-queue counters are only rx XDP ones. Example: $ ethtool -S veth0 NIC statistics: peer_ifindex: 11 rx_queue_0_xdp_packets: 28601434 rx_queue_0_xdp_bytes: 1716086040 rx_queue_0_xdp_drops: 28601434 rx_queue_1_xdp_packets: 17873050 rx_queue_1_xdp_bytes: 1072383000 rx_queue_1_xdp_drops: 17873050 Signed-off-by: Toshiaki Makita Signed-off-by: David S. Miller commit 4195e54aaf1c8d465666333f47662088c9e63672 Author: Toshiaki Makita Date: Thu Oct 11 18:36:49 2018 +0900 veth: Account for XDP packet statistics on rx side On XDP path veth has napi handler so we can collect statistics on per-queue basis for XDP. By this change now we can collect XDP_DROP drop count as well as packets and bytes coming through ndo_xdp_xmit. Packet counters shown by "ip -s link", sysfs stats or /proc/net/dev is now correct for XDP. Signed-off-by: Toshiaki Makita Signed-off-by: David S. Miller commit 2131479df66d320e327341ccf0be97924f108327 Author: Toshiaki Makita Date: Thu Oct 11 18:36:48 2018 +0900 veth: Account for packet drops in ndo_xdp_xmit Use existing atomic drop counter. Since drop path is really an exceptional case here, I'm thinking atomic ops would not hurt the performance. XDP packets and bytes are not counted in ndo_xdp_xmit, but will be accounted on rx side by the following commit. Signed-off-by: Toshiaki Makita Signed-off-by: David S. Miller commit acad76a5f6165dc451c5f35edb35d77def1f2e15 Author: Hoang Le Date: Thu Oct 11 08:43:08 2018 +0700 tipc: support binding to specific ip address when activating UDP bearer INADDR_ANY is hard-coded when activating UDP bearer. So, we could not bind to a specific IP address even with replicast mode using - given remote ip address instead of using multicast ip address. In this commit, we fixed it by checking and switch to use appropriate local ip address. before: $netstat -plu Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address udp 0 0 **0.0.0.0:6118** 0.0.0.0:* after: $netstat -plu Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address udp 0 0 **10.0.0.2:6118** 0.0.0.0:* Acked-by: Ying Xue Acked-by: Jon Maloy Signed-off-by: Hoang Le Signed-off-by: David S. Miller commit 1986647c2fc369b1865fb9bc9a213b48444580cb Merge: 3325cf9e51bc 779d986d60de Author: David S. Miller Date: Mon Oct 15 21:49:56 2018 -0700 Merge tag 'mlx5e-updates-2018-10-10' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5e-updates-2018-10-10 IPoIB netlink support and mlx5e pre-allocated netdevice initialization IP link was broken due to the changes in IPoIB for the rdma_netdev support after commit cd565b4b51e5 ("IB/IPoIB: Support acceleration options callbacks"). This patchset fixes IPoIB pkey creation and removal using rtnetlink by adding support in both IPoIB ULP layer and mlx5 layer: From Jason and Denis: 1) Introduces changes in the RDMA netdev code in order to allow allocation of the netdev to be done by the rtnl netdev code. 2) Reworks IPoIB initialization to use the two step rdma_netdev creation. From Feras and Saeed, mlx5e netdev layer refactoring to allow accepting pre-allocated netdevs: 3) Adds support to initialize/cleanup netdevs that are not created by mlx5 driver. 4) Change mlx5e netdevice layer to accept the pre-allocated netdevice queue number. 5) Initialize mlx5e generic structures in one place to be used for all netdevs types NIC/representors/IPoIB (both mlx5 allocated and pre-allocted). ==================== Signed-off-by: David S. Miller commit 3325cf9e51bc7c44e296343557251a74fde10b33 Merge: df52eab23d70 9f9a742db40f Author: David S. Miller Date: Mon Oct 15 21:46:07 2018 -0700 Merge branch 'defza-fddi' Maciej W. Rozycki says: ==================== FDDI: DEC FDDIcontroller 700 TURBOchannel adapter support This is an update to . I believe I have addressed all the requests made in the previous review round. There is still one `checkpatch.pl' warning remaining: WARNING: quoted string split across lines + pr_info("%s: ROM rev. %.4s, firmware rev. %.4s, RMC rev. %.4s, " + "SMT ver. %u\n", fp->name, rom_rev, fw_rev, rmc_rev, smt_ver); total: 0 errors, 1 warnings, 2458 lines checked however I think the value of staying within 80 columns is higher than the value of having the string on a single line. This is because with all the formatting specifiers there it is not directly greppable based on the final output produced to the kernel log on one hand, e.g.: tc2: ROM rev. 1.0, firmware rev. 1.2, RMC rev. A, SMT ver. 1 while it can be easily tracked down by grepping for an obvious substring such as "RMC rev" on the other. The issue with MMIO barriers I discussed in the course of the original review turned out mostly irrelevant to this driver, because as I have learnt in a recent Alpha/Linux discussion starting here: our MMIO API mandates the `readX' and `writeX' accessors to be strongly ordered with respect to each other, even if that is not implicitly enforced by hardware. Consequently I have removed all the explicit ordering barriers and instead submitted a fix for MIPS MMIO implementation, which currently does not guarantee strong ordering (the MIPS architecture does not define bus ordering rules except in terms of SYNC barriers), as recorded here: . Enforcing strong MMIO ordering can be costly however and is often unnecessary, e.g. when using PIO to access network frame data in onboard packet memory. I have therefore retained the information that would be lost by the removal of barriers, by defining accessor wrappers suffixed by `_o' and `_u', for accesses that have to be ordered and can be unordered respectively. If we ever have an API defined for weakly-ordered MMIO accesses, then these wrappers can be redefined accordingly. Right now they all expand to the respective `_relaxed' accessors, because, again, enforcing the ordering WRT DMA transfers can be costly and we don't need it here except in one place, where I chose to use explicit `dma_rmb' instead. Similarly I have replaced the completion barriers with a read back from the respective MMIO location (all adapter MMIO registers can be read with no side effects incurred), which will serve its purpose on the basis of MMIO being strongly ordered (although a read from TURBOchannel is going to be slower than `iob', making the delay incurred unnecessarily longer). And last but not least, I have split off the SMT Tx network tap support to a separate change, 2/2 in this series, so that it does not block the driver proper and can be discussed separately. I think it has value in that it makes the view of the outgoing network traffic complete, as if one actually physically tapped into the outgoing line of the ring, between the station being examined and its downstream neighbour. Without this part only traffic passed from applications through the whole protocol stack can be captured and this is only a part of the view. With the `dev_queue_xmit_nit' interface now exported it's only `ptype_all' that remains private, and to define a properly abstracted API I propose to provide am exported `dev_nit_active' predicate that tells whether any taps are active. This predicate is then used accordingly. NB if there is a long-term maintenance concern about the `dev_nit_active' predicate, then well, corresponding inline code currently present in `xmit_one' has to be maintained anyway, and if the resulting changes require `defza' to be updated accordingly, then I am going to handle it; after some 20 years with Linux it's not that I am going to disappear anywhere anytime. And once I am dead, which is inevitably going to happen sooner or later, then the driver can simply be ripped from the kernel. Though I suspect that at that point no DECstation Linux users may survive anymore, even though hardware, being as sturdy as it is, likely will. I have a patch for `tcpdump' to actually decode SMT frames, which I plan to upstream sometime. Here's a sample of SMT traffic captured through the `defza' driver in a small network of 4 stations and no concentrators, printed in the most verbose mode: 01:16:59.138381 4f 00:60:b0:58:41:e7 00:60:b0:58:41:e7 73: SMT NIF ann vid:1 tid:00000270 sid:00-00-00-60-b0-58-41-e7 len:40: UNA: 00 00 00 06 0d 1a 02 ae StationDescr: 00 01 02 00 StationState: 00 00 30 00 MACFrameStatusFunctions.3: 00 00 00 01 01:17:00.332750 4f 08:00:2b:a3:a3:29 08:00:2b:a3:a3:29 73: SMT NIF ann vid:1 tid:0000013b sid:00-00-08-00-2b-a3-a3-29 len:40: UNA: 00 00 00 06 0d 1a 82 e7 StationDescr: 00 01 02 00 StationState: 00 00 30 00 MACFrameStatusFunctions.3: 00 00 00 01 01:17:00.354479 4f 00:60:b0:58:40:75 00:60:b0:58:40:75 73: SMT NIF ann vid:1 tid:0000029c sid:00-00-00-60-b0-58-40-75 len:40: UNA: 00 00 10 00 d4 74 b6 ae StationDescr: 00 01 02 00 StationState: 00 00 31 00 MACFrameStatusFunctions.3: 00 00 00 01 01:17:00.442175 4f 00:60:b0:58:41:e7 Broadcast 73: SMT NIF req vid:1 tid:00000271 sid:00-00-00-60-b0-58-41-e7 len:40: UNA: 00 00 00 06 0d 1a 02 ae StationDescr: 00 01 02 00 StationState: 00 00 30 00 MACFrameStatusFunctions.3: 00 00 00 01 01:17:00.448657 41 08:00:2b:a3:a3:29 00:60:b0:58:41:e7 73: SMT NIF rsp vid:1 tid:00000271 sid:00-00-08-00-2b-a3-a3-29 len:40: UNA: 00 00 00 06 0d 1a 82 e7 StationDescr: 00 01 02 00 StationState: 00 00 30 00 MACFrameStatusFunctions.3: 00 00 00 01 01:17:01.015152 4f 08:00:2b:a3:a3:29 Broadcast 73: SMT NIF req vid:1 tid:0000013c sid:00-00-08-00-2b-a3-a3-29 len:40: UNA: 00 00 00 06 0d 1a 82 e7 StationDescr: 00 01 02 00 StationState: 00 00 30 00 MACFrameStatusFunctions.3: 00 00 00 01 01:17:01.111644 41 08:00:2b:2e:6d:75 08:00:2b:a3:a3:29 73: SMT NIF rsp vid:1 tid:0000013c sid:00-00-08-00-2b-2e-6d-75 len:40: UNA: 00 00 10 00 d4 c5 c5 94 StationDescr: 00 01 01 00 StationState: 00 00 11 00 MACFrameStatusFunctions.2: 00 00 00 01 01:17:04.814603 4f 08:00:2b:2e:6d:75 Broadcast 73: SMT NIF req vid:1 tid:0000013c sid:00-00-08-00-2b-2e-6d-75 len:40: UNA: 00 00 10 00 d4 c5 c5 94 StationDescr: 00 01 01 00 StationState: 00 00 11 00 MACFrameStatusFunctions.2: 00 00 00 01 01:17:04.814939 4f 08:00:2b:2e:6d:75 Broadcast 73: SMT NIF req vid:1 tid:0000013c sid:00-00-08-00-2b-2e-6d-75 len:40: UNA: 00 00 10 00 d4 c5 c5 94 StationDescr: 00 01 01 00 StationState: 00 00 11 00 MACFrameStatusFunctions.2: 00 00 00 01 01:17:04.820960 4f 08:00:2b:2e:6d:75 08:00:2b:2e:6d:75 73: SMT NIF ann vid:1 tid:0000013b sid:00-00-08-00-2b-2e-6d-75 len:40: UNA: 00 00 10 00 d4 c5 c5 94 StationDescr: 00 01 01 00 StationState: 00 00 11 00 MACFrameStatusFunctions.2: 00 00 00 01 Questions, comments? Otherwise, please apply. ==================== Signed-off-by: David S. Miller commit 9f9a742db40f95f4dc20fc7293de4ea6ddb24e47 Author: Maciej W. Rozycki Date: Tue Oct 9 23:57:49 2018 +0100 FDDI: defza: Support capturing outgoing SMT traffic DEC FDDIcontroller 700 (DEFZA) uses a Tx/Rx queue pair to communicate SMT frames with adapter's firmware. Any SMT frame received from the RMC via the Rx queue is queued back by the driver to the SMT Rx queue for the firmware to process. Similarly the firmware uses the SMT Tx queue to supply the driver with SMT frames which are queued back to the Tx queue for the RMC to send to the ring. When a network tap is attached to an FDDI interface handled by `defza' any incoming SMT frames captured are queued to our usual processing of network data received, which in turn delivers them to any listening taps. However the outgoing SMT frames produced by the firmware bypass our network protocol stack and are therefore not delivered to taps. This in turn means that taps are missing a part of network traffic sent by the adapter, which may make it more difficult to track down network problems or do general traffic analysis. Call `dev_queue_xmit_nit' then in the SMT Tx path, having checked that a network tap is attached, with a newly-created `dev_nit_active' helper wrapping the usual condition used in the transmit path. Signed-off-by: Maciej W. Rozycki Signed-off-by: David S. Miller commit 61414f5ec9834df8aa4f55c90de16b71a3d6ca8d Author: Maciej W. Rozycki Date: Tue Oct 9 23:57:43 2018 +0100 FDDI: defza: Add support for DEC FDDIcontroller 700 TURBOchannel adapter Add support for the DEC FDDIcontroller 700 (DEFZA), Digital Equipment Corporation's first-generation FDDI network interface adapter, made for TURBOchannel and based on a discrete version of what eventually became Motorola's widely used CAMEL chipset. The CAMEL chipset is present for example in the DEC FDDIcontroller TURBOchannel, EISA and PCI adapters (DEFTA/DEFEA/DEFPA) that we support with the `defxx' driver, however the host bus interface logic and the firmware API are different in the DEFZA and hence a separate driver is required. There isn't much to say about the driver except that it works, but there is one peculiarity to mention. The adapter implements two Tx/Rx queue pairs. Of these one pair is the usual network Tx/Rx queue pair, in this case used by the adapter to exchange frames with the ring, via the RMC (Ring Memory Controller) chip. The Tx queue is handled directly by the RMC chip and resides in onboard packet memory. The Rx queue is maintained via DMA in host memory by adapter's firmware copying received data stored by the RMC in onboard packet memory. The other pair is used to communicate SMT frames with adapter's firmware. Any SMT frame received from the RMC via the Rx queue must be queued back by the driver to the SMT Rx queue for the firmware to process. Similarly the firmware uses the SMT Tx queue to supply the driver with SMT frames that must be queued back to the Tx queue for the RMC to send to the ring. This solution was chosen because the designers ran out of PCB space and could not squeeze in more logic onto the board that would be required to handle this SMT frame traffic without the need to involve the driver, as with the later DEFTA/DEFEA/DEFPA adapters. Finally the driver does some Frame Control byte decoding, so to avoid magic numbers some macros are added to . Signed-off-by: Maciej W. Rozycki Signed-off-by: David S. Miller commit df52eab23d703142c766ac00bdb8db19d71238d0 Author: Serhey Popovych Date: Tue Oct 9 21:21:01 2018 +0300 tun: Consistently configure generic netdev params via rtnetlink Configuring generic network device parameters on tun will fail in presence of IFLA_INFO_KIND attribute in IFLA_LINKINFO nested attribute since tun_validate() always return failure. This can be visualized with following ip-link(8) command sequences: # ip link set dev tun0 group 100 # ip link set dev tun0 group 100 type tun RTNETLINK answers: Invalid argument with contrast to dummy and veth drivers: # ip link set dev dummy0 group 100 # ip link set dev dummy0 type dummy # ip link set dev veth0 group 100 # ip link set dev veth0 group 100 type veth Fix by returning zero in tun_validate() when @data is NULL that is always in case since rtnl_link_ops->maxtype is zero in tun driver. Fixes: f019a7a594d9 ("tun: Implement ip link del tunXXX") Signed-off-by: Serhey Popovych Signed-off-by: David S. Miller commit 33b3f8ca510a2181574d6dcbd312c2b07dd9f0fa Author: David Disseldorp Date: Fri Oct 12 12:01:20 2018 +0200 scsi: target: stash sess_err_stats on Data-Out timeout sess_err_stats are currently filled on NOP ping timeout, but not Data-Out timeout. Stash details of Data-Out timeouts using a ISCSI_SESS_ERR_CXN_TIMEOUT value for last_sess_failure_type. Signed-off-by: David Disseldorp Signed-off-by: Martin K. Petersen commit dce6190ca78adf7cf6fe794833653e4cb1cb2b73 Author: David Disseldorp Date: Sun Oct 14 01:13:54 2018 +0200 scsi: target: split out helper for cxn timeout error stashing Replace existing nested code blocks with helper function calls. Signed-off-by: David Disseldorp Signed-off-by: Martin K. Petersen commit c62ae3005b3551078a8cf959de8018a2852708bd Author: David Disseldorp Date: Fri Oct 12 12:01:18 2018 +0200 scsi: target: log NOP ping timeouts as errors Events resulting in connection outages like this should be logged as errors. Include the I_T Nexus in the message to aid path identification. Signed-off-by: David Disseldorp Signed-off-by: Martin K. Petersen commit d9a771fd42712cd530544674b04bc3e42cc7927a Author: David Disseldorp Date: Fri Oct 12 12:01:17 2018 +0200 scsi: target: log Data-Out timeouts as errors Data-Out timeouts resulting in connection outages should be logged as errors. Include the I_T Nexus in the message to aid path identification. Signed-off-by: David Disseldorp Signed-off-by: Martin K. Petersen commit df711553f4440e16af5b731ed41841dee1e2abb4 Author: David Disseldorp Date: Fri Oct 12 12:01:16 2018 +0200 scsi: target: use ISCSI_IQN_LEN in iscsi_target_stat Move the ISCSI_IQN_LEN definition up, so that it can be used in more places instead of a hardcoded value. Signed-off-by: David Disseldorp Signed-off-by: Martin K. Petersen commit 3bccfba8312762becfb05b35d698ba8cffd440f2 Author: Xiang Chen Date: Mon Sep 24 23:06:34 2018 +0800 scsi: hisi_sas: Update v3 hw AIP_LIMIT and CFG_AGING_TIME register values Update registers as follows: - Default value of AIP timer is 1ms, and it is easy for some expanders to cause IO error. Change the value to max value 65ms to avoid IO error for those expanders. - A CQ completion will be reported by HW when 4 CQs have occurred or the aging timer expires, whichever happens first. Sor serial IO scenario, it will still wait 8us for every IO before it is reported. So in the situation, the performance is poor. So to improve it, change the limit time to the least value. For other scenario, it does little affect to the performance. Signed-off-by: Xiang Chen Signed-off-by: John Garry Signed-off-by: Martin K. Petersen commit 784b46b7cba0ae914dd293f23848c5057c6ba017 Author: Xiang Chen Date: Mon Sep 24 23:06:33 2018 +0800 scsi: hisi_sas: Use block layer tag instead for IPTT Currently we use the IPTT defined in LLDD to identify IOs. Actually for IOs which are from the block layer, they have tags to identify them. So for those IOs, use tag of the block layer directly, and for IOs which is not from the block layer (such as internal IOs from libsas/LLDD), reserve 96 IPTTs for them. Signed-off-by: Xiang Chen Signed-off-by: John Garry Signed-off-by: Martin K. Petersen commit 6ecf5ba13cd5959eb75f617ff32c93bb67790e48 Author: Xiang Chen Date: Mon Sep 24 23:06:32 2018 +0800 scsi: hisi_sas: unmask interrupts ent72 and ent74 The interrupts of ent72 and ent74 are not processed by PCIe AER handling, so we need to unmask the interrupts and process them first in the driver. Signed-off-by: Xiang Chen Signed-off-by: John Garry Signed-off-by: Martin K. Petersen commit 3e178f3ecfcf91a258e832b0f0843a4cfd9059ac Author: Xiang Chen Date: Mon Sep 24 23:06:31 2018 +0800 scsi: hisi_sas: Free slot later in slot_complete_vx_hw() If an SSP/SMP IO times out, it may be actually in reality be simultaneously processing completion of the slot in slot_complete_vx_hw(). Then if the slot is freed in slot_complete_vx_hw() (this IPTT is freed and it may be re-used by other slot), and we may abort the wrong slot in hisi_sas_abort_task(). So to solve the issue, free the slot after the check of SAS_TASK_STATE_ABORTED in slot_complete_vx_hw(). Signed-off-by: Xiang Chen Signed-off-by: John Garry Signed-off-by: Martin K. Petersen commit 584f53fe5f529d877968c711a095923c1ed12307 Author: Xiang Chen Date: Mon Sep 24 23:06:30 2018 +0800 scsi: hisi_sas: Fix the race between IO completion and timeout for SMP/internal IO If SMP/internal IO times out, we will possibly free the task immediately. However if the IO actually completes at the same time, the IO completion may refer to task which has been freed. So to solve the issue, flush the tasklet to finish IO completion before free'ing slot/task. Signed-off-by: Xiang Chen Signed-off-by: John Garry Signed-off-by: Martin K. Petersen commit 1668e3b6f8f8ed2ce685691c92b90dfadeaa3f2f Author: Luo Jiaxing Date: Mon Sep 24 23:06:29 2018 +0800 scsi: hisi_sas: Move evaluation of hisi_hba in hisi_sas_task_prep() In evaluating hisi_hba, the sas_port may be NULL, so for safety relocate the the check to value possible NULL deference. Signed-off-by: Luo Jiaxing Signed-off-by: John Garry Signed-off-by: Martin K. Petersen commit 5a54691f874ab29ec82f08bc6936866a3ccdaa91 Author: Luo Jiaxing Date: Mon Sep 24 23:06:28 2018 +0800 scsi: hisi_sas: Feed back linkrate(max/min) when re-attached At directly attached situation, if the user modifies the sysfs interface of maximum_linkrate and minimum_linkrate to renegotiate the linkrate between SAS controller and target, the value of both files mentioned above should have change to user setting after renegotiate is over, but it remains unchanged. To fix this bug, maximum_linkrate and minimum_linkrate will be directly fed back to relevant sas_phy structure. Signed-off-by: Luo Jiaxing Signed-off-by: John Garry Signed-off-by: Martin K. Petersen commit 38fe73cc2c96fbc9942b07220f2a4f1bab37392d Author: Nicholas Bellinger Date: Wed Oct 10 03:23:10 2018 +0000 scsi: target: Fix target_wait_for_sess_cmds breakage with active signals With the addition of commit 00d909a10710 ("scsi: target: Make the session shutdown code also wait for commands that are being aborted") in v4.19-rc, it incorrectly assumes no signals will be pending for task_struct executing the normal session shutdown and I/O quiesce code-path. For example, iscsi-target and iser-target issue SIGINT to all kthreads as part of session shutdown. This has been the behaviour since day one. As-is when signals are pending with se_cmds active in se_sess->sess_cmd_list, wait_event_interruptible_lock_irq_timeout() returns a negative number and immediately kills the machine because of the do while (ret <= 0) loop that was added in commit 00d909a107 to spin while backend I/O is taking any amount of extended time (say 30 seconds) to complete. Here's what it looks like in action with debug plus delayed backend I/O completion: [ 4951.909951] se_sess: 000000003e7e08fa before target_wait_for_sess_cmds [ 4951.914600] target_wait_for_sess_cmds: signal_pending: 1 [ 4951.918015] wait_event_interruptible_lock_irq_timeout ret: -512 signal_pending: 1 loop count: 0 [ 4951.921639] wait_event_interruptible_lock_irq_timeout ret: -512 signal_pending: 1 loop count: 1 [ 4951.921944] wait_event_interruptible_lock_irq_timeout ret: -512 signal_pending: 1 loop count: 2 [ 4951.921944] wait_event_interruptible_lock_irq_timeout ret: -512 signal_pending: 1 loop count: 3 [ 4951.921944] wait_event_interruptible_lock_irq_timeout ret: -512 signal_pending: 1 loop count: 4 [ 4951.921944] wait_event_interruptible_lock_irq_timeout ret: -512 signal_pending: 1 loop count: 5 [ 4951.921944] wait_event_interruptible_lock_irq_timeout ret: -512 signal_pending: 1 loop count: 6 [ 4951.921944] wait_event_interruptible_lock_irq_timeout ret: -512 signal_pending: 1 loop count: 7 [ 4951.921944] wait_event_interruptible_lock_irq_timeout ret: -512 signal_pending: 1 loop count: 8 [ 4951.921944] wait_event_interruptible_lock_irq_timeout ret: -512 signal_pending: 1 loop count: 9 ... followed by the usual RCU CPU stalls and deadlock. There was never a case pre commit 00d909a107 where wait_for_complete(&se_cmd->cmd_wait_comp) was able to be interrupted, so to address this for v4.19+ moving forward go ahead and use wait_event_lock_irq_timeout() instead so new code works with all fabric drivers. Also for commit 00d909a107, fix a minor regression in target_release_cmd_kref() to only wake_up the new se_sess->cmd_list_wq only when shutdown has actually been triggered via se_sess->sess_tearing_down. Fixes: 00d909a10710 ("scsi: target: Make the session shutdown code also wait for commands that are being aborted") Cc: # v4.19+ Cc: Bart Van Assche Cc: Mike Christie Cc: Hannes Reinecke Cc: Christoph Hellwig Cc: Sagi Grimberg Cc: Bryant G. Ly Tested-by: Nicholas Bellinger Signed-off-by: Nicholas Bellinger Reviewed-by: Bryant G. Ly Signed-off-by: Martin K. Petersen commit 25ab0bc334b43bbbe4eabc255006ce42a9424da2 Author: Nicholas Bellinger Date: Wed Oct 10 03:23:09 2018 +0000 scsi: sched/wait: Add wait_event_lock_irq_timeout for TASK_UNINTERRUPTIBLE usage Short of reverting commit 00d909a10710 ("scsi: target: Make the session shutdown code also wait for commands that are being aborted") for v4.19, target-core needs a wait_event_t macro can be executed using TASK_UNINTERRUPTIBLE to function correctly with existing fabric drivers that expect to run with signals pending during session shutdown and active se_cmd I/O quiesce. The most notable is iscsi-target/iser-target, while ibmvscsi_tgt invokes session shutdown logic from userspace via configfs attribute that could also potentially have signals pending. So go ahead and introduce wait_event_lock_irq_timeout() to achieve this, and update + rename __wait_event_lock_irq_timeout() to make it accept 'state' as a parameter. Fixes: 00d909a10710 ("scsi: target: Make the session shutdown code also wait for commands that are being aborted") Cc: # v4.19+ Cc: Bart Van Assche Cc: Mike Christie Cc: Hannes Reinecke Cc: Christoph Hellwig Cc: Sagi Grimberg Cc: Bryant G. Ly Cc: Peter Zijlstra (Intel) Tested-by: Nicholas Bellinger Signed-off-by: Nicholas Bellinger Reviewed-by: Bryant G. Ly Acked-by: Peter Zijlstra (Intel) Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 0b4aafc332e49e143d3ee1c2460367ba0f07da1a Author: Hannes Reinecke Date: Sun Oct 7 10:35:37 2018 +0200 scsi: libfc: retry PRLI if we cannot analyse the payload When we fail to analyse the payload of a PRLI response we should reset the state machine to retry the PRLI; eventually we will be getting a proper frame. Not doing so will result in a stuck state machine and the port never to be presented to the systsm. Suggested-by: Chad Dupuis Signed-off-by: Hannes Reinecke Reviewed-by: Arun Easi Signed-off-by: Martin K. Petersen commit aad1271a4845f948b2721c0ab243baa74786916e Author: Thomas Abraham Date: Sun Oct 7 10:35:36 2018 +0200 scsi: libfc: check fc_frame_payload_get() return value for null We should not assume the payload of a PRLI or PLOGI respons is always present. Signed-off-by: Thomas Abraham Reviewed-by: Hannes Reinecke Reviewed-by: Arun Easi Signed-off-by: Martin K. Petersen commit a33e5bfb29721015349a3864c91abe11f6195d5c Author: Hannes Reinecke Date: Sun Oct 7 10:35:35 2018 +0200 scsi: core: Allow state transitions from OFFLINE to BLOCKED When an RSCN gets delayed (or not being sent at all), the transport class will detect an error, EH kicks in, and eventually will be setting the device to offline. If we receive an RSCN after that, the device will stay in 'offline'. This patch allows for an 'offline' to 'blocked' transition, thereby allowing the device to become active again. Signed-off-by: Hannes Reinecke Signed-off-by: Martin K. Petersen commit 86117d7f9569820795c8f6b9a1c9b911cb5037c7 Author: Christoph Hellwig Date: Sat Oct 13 09:26:28 2018 +0200 scsi: esp_scsi: remove union in esp_cmd_priv The dma_addr_t member is unused ever since we switched the SCSI layer to send down single-segement command using a scatterlist as well many years ago. Signed-off-by: Christoph Hellwig Tested-by: Finn Thain Signed-off-by: Martin K. Petersen commit 3f9295b65ea44194252d60376036a3618d822152 Author: Christoph Hellwig Date: Sat Oct 13 09:26:27 2018 +0200 scsi: esp_scsi: move dma mapping into the core code Except for the mac_esp driver, which uses PIO or pseudo DMA, all drivers share the same dma mapping calls. Move the dma mapping into the core code using the scsi_dma_map / scsi_dma_unmap helpers, with a special identify mapping variant triggered off a new ESP_FLAG_NO_DMA_MAP flag for mac_esp. Signed-off-by: Christoph Hellwig Tested-by: Finn Thain Signed-off-by: Martin K. Petersen commit 44b1b4d24b2d65134efeccb3cc2341c61227f0f9 Author: Christoph Hellwig Date: Sat Oct 13 09:26:26 2018 +0200 scsi: esp_scsi: remove the dev argument to scsi_esp_register We can simplify use esp->dev now. Signed-off-by: Christoph Hellwig Tested-by: Finn Thain Signed-off-by: Martin K. Petersen commit 98cda6a2e0d46507c084bf1488f5627b9e487a2a Author: Christoph Hellwig Date: Sat Oct 13 09:26:25 2018 +0200 scsi: esp_scsi: use strong typing for the dev field esp->dev is a void pointer that points either to a struct device, or a struct platform_device. As we can easily get from the device to the platform_device if needed change it to always point to a struct device and properly type the pointer to avoid errors. Signed-off-by: Christoph Hellwig Tested-by: Finn Thain Signed-off-by: Martin K. Petersen commit 10c0cd38ce4cd2015a683e296596738adab9221f Author: Christoph Hellwig Date: Sat Oct 13 09:26:24 2018 +0200 scsi: sun_esp: don't use GFP_ATOMIC for command block allocation esp_sbus_map_command_block is called straight from the probe routine without any locks held, so we can safely use GFP_KERNEL here. Signed-off-by: Christoph Hellwig Tested-by: Finn Thain Signed-off-by: Martin K. Petersen commit d47b3bd797f158366a4b2193ae82e191a21c45f3 Author: Christoph Hellwig Date: Sat Oct 13 09:26:23 2018 +0200 scsi: am53c974: use the generic DMA API Remove usage of the legacy PCI DMA API. To make this easier we also store a struct device instead of pci_dev in the dev field of struct esp. Signed-off-by: Christoph Hellwig Tested-by: Finn Thain Signed-off-by: Martin K. Petersen commit 5adaf1e8d5e56cd7c06f0e4fa0c6b5148220e6ad Author: Venkat Gopalakrishnan Date: Fri Oct 12 19:25:02 2018 -0700 scsi: ufs: make UFS Tx lane1 clock optional for QCOM platforms Per Qcom's UFS host controller HW design, the UFS Tx lane1 clock could be muxed with Tx lane0 clock, hence keep Tx lane1 clock optional by ignoring it if it is not provided in device tree. This change also performs some cleanup to lanes per direction checks when enable/disable lane clocks just for symmetry. Signed-off-by: Venkat Gopalakrishnan Signed-off-by: Subhash Jadavani Signed-off-by: Can Guo Reviewed-by: Vivek Gautam Reviewed-by: Douglas Anderson Tested-by: Douglas Anderson Signed-off-by: Martin K. Petersen commit 664e68bcab5b3e59479494246db980a75822e963 Author: Arnd Bergmann Date: Fri Oct 12 12:41:28 2018 +0200 scsi: ufs: fix integer type usage in uapi header We get a warning from 'make headers_check' about a newly introduced usage of integer types in the scsi/scsi_bsg_ufs.h uapi header: usr/include/scsi/scsi_bsg_ufs.h:18: found __[us]{8,16,32,64} type without #include Aside from the missing linux/types.h inclusion, I also noticed that it uses the wrong types: 'u32' is not available at all in user space, and 'uint32_t' depends on the inclusion of a standard header that we should not include from kernel headers. Change the all to __u32 and similar types here. I also note the usage of '__be32' and '__be16' that seems unfortunate for a user space API. I wonder if it would be better to define the interface in terms of a CPU-endian structure and convert it in kernel space. Fixes: e77044c5a842 ("scsi: ufs-bsg: Add support for uic commands in ufs_bsg_request()") Fixes: df032bf27a41 ("scsi: ufs: Add a bsg endpoint that supports UPIUs") Signed-off-by: Arnd Bergmann Reviewed-by: Avri Altman Signed-off-by: Martin K. Petersen commit 416c461372b3fe635e5f9a8fbf32f629d3b22c13 Author: Christoph Hellwig Date: Thu Oct 11 09:16:13 2018 +0200 scsi: lpfc: remove a bogus pci_dma_sync_single_for_device call dma_alloc_coherent allocates memory that can be used by the cpu and the device at the same time, calls to pci_dma_sync_* are not required, and in fact actively harmful on some architectures like arm. Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen commit 67d98f0a83f8d5eafe8f584fef70b1d790a36411 Author: Christoph Hellwig Date: Thu Oct 11 09:15:35 2018 +0200 scsi: megaraid_mbox: remove bogus use of pci_dma_sync_sg_* APIs The dma_map_sg / dma_unmap_sg APIs called from scsi_dma_map / scsi_dma_unmap already transfer memory ownership to the device or cpu respectively. Adding additional calls to pci_dma_sync_sg_* will in fact lead to data corruption if we end up using swiotlb for some reason. Also remove the now pointless megaraid_mbox_sync_scb function. Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen commit 804186fa95c871aba621da280284d3bc46746d50 Author: Jens Axboe Date: Mon Oct 15 09:05:59 2018 -0600 xsysace: convert to blk-mq Straight forward conversion, using an internal list to enable the driver to pull requests at will. Acked-by: Michal Simek Signed-off-by: Jens Axboe commit 77218ddf46d8d71161776a37739cd1723706ec95 Author: Jens Axboe Date: Mon Oct 15 08:38:08 2018 -0600 paride: convert pf to blk-mq Tested-by: Ondrej Zary Signed-off-by: Jens Axboe commit 99fe8b02a82597a8fa8add6455d0a3037ca16e06 Author: Jens Axboe Date: Mon Oct 15 13:53:50 2018 -0600 paride: convert pd to blk-mq Tested-by: Ondrej Zary Signed-off-by: Jens Axboe commit 89c6b16509693332fe13d4bb6b812134de56c16f Author: Jens Axboe Date: Mon Oct 15 08:38:52 2018 -0600 paride: convert pcd to blk-mq Tested-by: Ondrej Zary Signed-off-by: Jens Axboe commit fab1adcf9503ccf191aec9ee42580f7dc1eb6237 Author: Jens Axboe Date: Mon Oct 15 13:32:01 2018 -0600 ps3disk: convert to blk-mq Convert from the old request_fn style driver to blk-mq. Cc: Benjamin Herrenschmidt Tested-by: Geoff Levand Signed-off-by: Jens Axboe commit 9316a9ed6895c4ad2f0cde171d486f80c55d8283 Author: Jens Axboe Date: Mon Oct 15 08:40:37 2018 -0600 blk-mq: provide helper for setting up an SQ queue and tag set This pattern is repeated throughout all the blk-mq conversions. Provide a basic helper to get it done. Reviewed-by: Ming Lei Signed-off-by: Jens Axboe commit de038597be8809619c4f17d70e86dab936bb1a10 Author: YueHaibing Date: Tue Oct 16 01:45:26 2018 +0000 null_blk: remove set but not used variable 'q' Fixes gcc '-Wunused-but-set-variable' warning: drivers/block/null_blk_main.c: In function 'end_cmd': drivers/block/null_blk_main.c:609:24: warning: variable 'q' set but not used [-Wunused-but-set-variable] It not used any more after commit e50b1e327aeb ("null_blk: remove legacy IO path") Signed-off-by: YueHaibing Signed-off-by: Jens Axboe commit 381fdd62c38344a771aed06adaf14aae65c47454 Author: Angelo Dureghello Date: Fri Sep 7 14:44:25 2018 +0200 m68k: fix command-line parsing when passed from u-boot This patch fixes command_line array zero-terminated one byte over the end of the array, causing boot to hang. Signed-off-by: Angelo Dureghello Signed-off-by: Greg Ungerer commit 0b592b5a01bef5416472ec610d3191e019c144a5 Author: Jakub Kicinski Date: Mon Oct 15 16:30:36 2018 -0700 tools: bpftool: add map create command Add a way of creating maps from user space. The command takes as parameters most of the attributes of the map creation system call command. After map is created its pinned to bpffs. This makes it possible to easily and dynamically (without rebuilding programs) test various corner cases related to map creation. Map type names are taken from bpftool's array used for printing. In general these days we try to make use of libbpf type names, but there are no map type names in libbpf as of today. As with most features I add the motivation is testing (offloads) :) Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet Signed-off-by: Alexei Starovoitov commit 2f1d774f7d356a7e95ac7c41373d518cf0d716c7 Merge: 7d1f12b8b2ab c034a177d3c8 Author: Alexei Starovoitov Date: Mon Oct 15 16:13:15 2018 -0700 Merge branch 'bpftool_sockmap' John Fastabend says: ==================== The first patch adds support for attaching programs to maps. This is needed to support sock{map|hash} use from bpftool. Currently, I carry around custom code to do this so doing it using standard bpftool will be great. The second patch adds a compat mode to ignore non-zero entries in the map def. This allows using bpftool with maps that have a extra fields that the user knows can be ignored. This is needed to work correctly with maps being loaded by other tools or directly via syscalls. v3: add bash completion and doc updates for --mapcompat ==================== Signed-off-by: Alexei Starovoitov commit c034a177d3c898f370f52877e7252da8c4f8235c Author: John Fastabend Date: Mon Oct 15 11:19:55 2018 -0700 bpf: bpftool, add flag to allow non-compat map definitions Multiple map definition structures exist and user may have non-zero fields in their definition that are not recognized by bpftool and libbpf. The normal behavior is to then fail loading the map. Although this is a good default behavior users may still want to load the map for debugging or other reasons. This patch adds a --mapcompat flag that can be used to override the default behavior and allow loading the map even when it has additional non-zero fields. For now the only user is 'bpftool prog' we can switch over other subcommands as needed. The library exposes an API that consumes a flags field now but I kept the original API around also in case users of the API don't want to expose this. The flags field is an int in case we need more control over how the API call handles errors/features/etc in the future. Signed-off-by: John Fastabend Acked-by: Jakub Kicinski Signed-off-by: Alexei Starovoitov commit b7d3826c2ed6c3e626e7ae796c5df2c0d2551c6a Author: John Fastabend Date: Mon Oct 15 11:19:50 2018 -0700 bpf: bpftool, add support for attaching programs to maps Sock map/hash introduce support for attaching programs to maps. To date I have been doing this with custom tooling but this is less than ideal as we shift to using bpftool as the single CLI for our BPF uses. This patch adds new sub commands 'attach' and 'detach' to the 'prog' command to attach programs to maps and then detach them. Signed-off-by: John Fastabend Reviewed-by: Jakub Kicinski Signed-off-by: Alexei Starovoitov commit 7d1f12b8b2abab0a7af240b89b5ad68bf7f183e7 Merge: d04fb13c9fcd 5ef0ae84f02a Author: Alexei Starovoitov Date: Mon Oct 15 16:08:39 2018 -0700 Merge branch 'ipv6_sk_lookup_fixes' Joe Stringer says: ==================== This series includes a couple of fixups for the IPv6 socket lookup helper, to make the API more consistent (always supply all arguments in network byte-order) and to allow its use when IPv6 is compiled as a module. ==================== Acked-by: Daniel Borkmann Signed-off-by: Alexei Starovoitov commit 5ef0ae84f02a4dbe0e09f89c6481ac13649cb19b Author: Joe Stringer Date: Mon Oct 15 10:27:46 2018 -0700 bpf: Fix IPv6 dport byte-order in bpf_sk_lookup Commit 6acc9b432e67 ("bpf: Add helper to retrieve socket in BPF") mistakenly passed the destination port in network byte-order to the IPv6 TCP/UDP socket lookup functions, which meant that BPF writers would need to either manually swap the byte-order of this field or otherwise IPv6 sockets could not be located via this helper. Fix the issue by swapping the byte-order appropriately in the helper. This also makes the API more consistent with the IPv4 version. Fixes: 6acc9b432e67 ("bpf: Add helper to retrieve socket in BPF") Signed-off-by: Joe Stringer Signed-off-by: Alexei Starovoitov commit 8a615c6b0352a9ec56151b6c95d68e0a2eef5cf0 Author: Joe Stringer Date: Mon Oct 15 10:27:45 2018 -0700 bpf: Allow sk_lookup with IPv6 module This is a more complete fix than d71019b54bff ("net: core: Fix build with CONFIG_IPV6=m"), so that IPv6 sockets may be looked up if the IPv6 module is loaded (not just if it's compiled in). Signed-off-by: Joe Stringer Signed-off-by: Alexei Starovoitov commit 43c3ff27a47d83d153c4adc088243ba594582bf5 Author: Su Sung Chung Date: Thu Sep 20 15:03:27 2018 -0400 drm/amd/display: fix bug of accessing invalid memory [Why] A loop inside of build_evenly_distributed_points function that traverse through the array of points become an infinite loop when m_GammaUpdates does not get assigned to any value. [How] In DMColor, clear m_gammaIsValid bit just before writting all Zeromem for m_GammaUpdates, to prevent calling build_evenly_distributed_points before m_GammaUpdates gets assigned to some value. Signed-off-by: Su Sung Chung Reviewed-by: Aric Cyr Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 46924030475b6d44061a9a393f4e3b82b713f820 Author: Jonathan Gray Date: Mon Oct 15 15:47:01 2018 +1100 drm/radeon: change SPDX identifier to MIT Commit b24413180f5600bcb3bb70fbed5cf186b60864bd added "SPDX-License-Identifier: GPL-2.0" to files which previously had no license, change this to MIT for radeon matching the license text of the other radeon files. Signed-off-by: Jonathan Gray Signed-off-by: Alex Deucher commit 4c450f056cae111a48bb33c3ddb33296a206faad Author: Jonathan Gray Date: Mon Oct 15 15:45:49 2018 +1100 drm/amdgpu: correct SPDX identifier in amdgpu_trace_points.c Commit b24413180f5600bcb3bb70fbed5cf186b60864bd 'License cleanup: add SPDX GPL-2.0 license identifier to files with no license' incorrectly added "SPDX-License-Identifier: GPL-2.0" to a file with MIT license text. Change the SPDX identifier to match the license text. Signed-off-by: Jonathan Gray Signed-off-by: Alex Deucher commit e7c6a55606b5c46b449d76588968b4d8caae903f Author: Dmitry Bazhenov Date: Mon Oct 15 14:21:22 2018 +0500 hwmon: (pmbus) Fix page count auto-detection. Devices with compatible="pmbus" field have zero initial page count, and pmbus_clear_faults() being called before the page count auto- detection does not actually clear faults because it depends on the page count. Non-cleared faults in its turn may fail the subsequent page count auto-detection. This patch fixes this problem by calling pmbus_clear_fault_page() for currently set page and calling pmbus_clear_faults() after the page count was detected. Cc: stable@vger.kernel.org Signed-off-by: Dmitry Bazhenov Signed-off-by: Guenter Roeck commit fe278d1a959283c185ceef0703d8570bf907b95d Author: Christoph Hellwig Date: Sun Oct 14 20:13:04 2018 +0200 xtensa: remove ZONE_DMA ZONE_DMA is intended for magic < 32-bit pools (usually ISA DMA), which isn't required on xtensa. Move all the non-highmem memory into ZONE_NORMAL instead to match other architectures. Signed-off-by: Christoph Hellwig Signed-off-by: Max Filippov commit d04fb13c9fcdad850c0fcaeb155863de3d8169a0 Merge: 67e89ac32828 eea0d2adcf11 Author: Alexei Starovoitov Date: Mon Oct 15 12:23:20 2018 -0700 Merge branch 'sockmap_and_ktls' Daniel Borkmann says: ==================== This work adds a generic sk_msg layer and converts both sockmap and later ktls over to make use of it as a common data structure for application data (similarly as sk_buff for network packets). With that in place the sk_msg framework spans accross ULP layer in the kernel and allows for introspection or filtering of L7 data with the help of BPF programs operating on a common input context. In a second step, we enable the latter for ktls which was previously not possible, meaning, ktls and sk_msg verdict programs were mutually exclusive in the ULP layer which created challenges for the orchestrator when trying to apply TCP based policy, for example. Leveraging the prior consolidation we can finally overcome this limitation. Note, there's no change in behavior when ktls is not used in combination with BPF, and also no change in behavior for stand alone sockmap. The kselftest suites for ktls, sockmap and ktls with sockmap combined also runs through successfully. For further details please see individual patches. Thanks! v1 -> v2: - Removed leftover comment spotted by Alexei - Improved commit messages, rebase ==================== Signed-off-by: Alexei Starovoitov commit eea0d2adcf112dd9e5d9a13779c0ab262583444d Author: Daniel Borkmann Date: Sat Oct 13 02:46:03 2018 +0200 bpf, doc: add maintainers entry to related files Add a MAINTAINERS entry to the skmsg and related files such that patches, features, bug reports land with the right Cc. Signed-off-by: Daniel Borkmann Signed-off-by: John Fastabend Signed-off-by: Alexei Starovoitov commit e9dd904708c463ff57d019f4482c48d057fa4d7e Author: John Fastabend Date: Sat Oct 13 02:46:02 2018 +0200 bpf: add tls support for testing in test_sockmap This adds a --ktls option to test_sockmap in order to enable the combination of ktls and sockmap to run, which makes for another batch of 648 test cases for both in combination. Signed-off-by: John Fastabend Signed-off-by: Daniel Borkmann Signed-off-by: Alexei Starovoitov commit d3b18ad31f93d0b6bae105c679018a1ba7daa9ca Author: John Fastabend Date: Sat Oct 13 02:46:01 2018 +0200 tls: add bpf support to sk_msg handling This work adds BPF sk_msg verdict program support to kTLS allowing BPF and kTLS to be combined together. Previously kTLS and sk_msg verdict programs were mutually exclusive in the ULP layer which created challenges for the orchestrator when trying to apply TCP based policy, for example. To resolve this, leveraging the work from previous patches that consolidates the use of sk_msg, we can finally enable BPF sk_msg verdict programs so they continue to run after the kTLS socket is created. No change in behavior when kTLS is not used in combination with BPF, the kselftest suite for kTLS also runs successfully. Joint work with Daniel. Signed-off-by: John Fastabend Signed-off-by: Daniel Borkmann Signed-off-by: Alexei Starovoitov commit 924ad65ed01ee0eec5d2a3280c01c394343d6df7 Author: John Fastabend Date: Sat Oct 13 02:46:00 2018 +0200 tls: replace poll implementation with read hook Instead of re-implementing poll routine use the poll callback to trigger read from kTLS, we reuse the stream_memory_read callback which is simpler and achieves the same. This helps to align sockmap and kTLS so we can more easily embed BPF in kTLS. Joint work with Daniel. Signed-off-by: John Fastabend Signed-off-by: Daniel Borkmann Signed-off-by: Alexei Starovoitov commit d829e9c4112b52f4f00195900fd4c685f61365ab Author: Daniel Borkmann Date: Sat Oct 13 02:45:59 2018 +0200 tls: convert to generic sk_msg interface Convert kTLS over to make use of sk_msg interface for plaintext and encrypted scattergather data, so it reuses all the sk_msg helpers and data structure which later on in a second step enables to glue this to BPF. This also allows to remove quite a bit of open coded helpers which are covered by the sk_msg API. Recent changes in kTLs 80ece6a03aaf ("tls: Remove redundant vars from tls record structure") and 4e6d47206c32 ("tls: Add support for inplace records encryption") changed the data path handling a bit; while we've kept the latter optimization intact, we had to undo the former change to better fit the sk_msg model, hence the sg_aead_in and sg_aead_out have been brought back and are linked into the sk_msg sgs. Now the kTLS record contains a msg_plaintext and msg_encrypted sk_msg each. In the original code, the zerocopy_from_iter() has been used out of TX but also RX path. For the strparser skb-based RX path, we've left the zerocopy_from_iter() in decrypt_internal() mostly untouched, meaning it has been moved into tls_setup_from_iter() with charging logic removed (as not used from RX). Given RX path is not based on sk_msg objects, we haven't pursued setting up a dummy sk_msg to call into sk_msg_zerocopy_from_iter(), but it could be an option to prusue in a later step. Joint work with John. Signed-off-by: Daniel Borkmann Signed-off-by: John Fastabend Signed-off-by: Alexei Starovoitov commit 604326b41a6fb9b4a78b6179335decee0365cd8c Author: Daniel Borkmann Date: Sat Oct 13 02:45:58 2018 +0200 bpf, sockmap: convert to generic sk_msg interface Add a generic sk_msg layer, and convert current sockmap and later kTLS over to make use of it. While sk_buff handles network packet representation from netdevice up to socket, sk_msg handles data representation from application to socket layer. This means that sk_msg framework spans across ULP users in the kernel, and enables features such as introspection or filtering of data with the help of BPF programs that operate on this data structure. Latter becomes in particular useful for kTLS where data encryption is deferred into the kernel, and as such enabling the kernel to perform L7 introspection and policy based on BPF for TLS connections where the record is being encrypted after BPF has run and came to a verdict. In order to get there, first step is to transform open coding of scatter-gather list handling into a common core framework that subsystems can use. The code itself has been split and refactored into three bigger pieces: i) the generic sk_msg API which deals with managing the scatter gather ring, providing helpers for walking and mangling, transferring application data from user space into it, and preparing it for BPF pre/post-processing, ii) the plain sock map itself where sockets can be attached to or detached from; these bits are independent of i) which can now be used also without sock map, and iii) the integration with plain TCP as one protocol to be used for processing L7 application data (later this could e.g. also be extended to other protocols like UDP). The semantics are the same with the old sock map code and therefore no change of user facing behavior or APIs. While pursuing this work it also helped finding a number of bugs in the old sockmap code that we've fixed already in earlier commits. The test_sockmap kselftest suite passes through fine as well. Joint work with John. Signed-off-by: Daniel Borkmann Signed-off-by: John Fastabend Signed-off-by: Alexei Starovoitov commit 1243a51f6c05ecbb2c5c9e02fdcc1e7a06f76f26 Author: Daniel Borkmann Date: Sat Oct 13 02:45:57 2018 +0200 tcp, ulp: remove ulp bits from sockmap In order to prepare sockmap logic to be used in combination with kTLS we need to detangle it from ULP, and further split it in later commits into a generic API. Joint work with John. Signed-off-by: Daniel Borkmann Signed-off-by: John Fastabend Signed-off-by: Alexei Starovoitov commit 8b9088f806e1ccd10c3d48b3b6d3d5d7855d92c5 Author: Daniel Borkmann Date: Sat Oct 13 02:45:56 2018 +0200 tcp, ulp: enforce sock_owned_by_me upon ulp init and cleanup Whenever the ULP data on the socket is mangled, enforce that the caller has the socket lock held as otherwise things may race with initialization and cleanup callbacks from ulp ops as both would mangle internal socket state. Joint work with John. Signed-off-by: Daniel Borkmann Signed-off-by: John Fastabend Signed-off-by: Alexei Starovoitov commit 1c87dc897b8c8ace3aa4480fa29ef6439dabb3ab Author: Lance Roy Date: Tue Oct 2 22:38:48 2018 -0700 hv_balloon: 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 Cc: "K. Y. Srinivasan" Cc: Haiyang Zhang Cc: Stephen Hemminger Reviewed-by: Vitaly Kuznetsov Signed-off-by: Greg Kroah-Hartman commit f21996255f42eee28048ede652a592d6048b06b3 Author: Lance Roy Date: Tue Oct 2 22:38:49 2018 -0700 sgi-xp: 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 Cc: Cliff Whickman Cc: Arnd Bergmann Acked-by: Robin Holt Signed-off-by: Greg Kroah-Hartman commit 3b7584a296c4fac45e59ab3a264880e1a2fedbfe Author: Jean Delvare Date: Sun Oct 7 19:05:00 2018 +0200 eeprom: New ee1004 driver for DDR4 memory The EEPROMs which hold the SPD data on DDR4 memory modules are no longer standard AT24C02-compatible EEPROMs. They are 512-byte EEPROMs which use only 1 I2C address for data access. You need to switch between the lower page and the upper page of data by sending commands on the SMBus. Signed-off-by: Jean Delvare Signed-off-by: Greg Kroah-Hartman commit 5fe9f6ccbb7bc82a92e5d32b3eb68eebb3ea4a93 Author: YueHaibing Date: Fri Oct 5 06:19:12 2018 +0000 eeprom: at25: remove unneeded 'at25_remove' Fixes gcc '-Wunused-but-set-variable' warning: drivers/misc/eeprom/at25.c: In function 'at25_remove': drivers/misc/eeprom/at25.c:384:20: warning: variable 'at25' set but not used [-Wunused-but-set-variable] Since commit 96d08fb43e30 ("eeprom: at25: use devm_nvmem_register()"), at25_remove is do nothing, so can be removed. Signed-off-by: YueHaibing Acked-by: Arnd Bergmann Reviewed-by: Geert Uytterhoeven Signed-off-by: Greg Kroah-Hartman commit 6eaafbb6998e999467cf78a76e155ee00e372b14 Author: Julien Folly Date: Tue Oct 9 19:47:45 2018 +0200 w1: IAD Register is yet readable trough iad sys file. Fix snprintf (%u for unsigned, count for max size). IAD Register is yet readable trough the "iad" sys file. A write to the "iad" sys file enables or disables the current measurement, but it was not possible to get the measured value by reading it. Fix: %u in snprintf for unsigned values (vdd and vad) Fix: Avoid possibles overflows (Usage of the 'count' variables) Signed-off-by: Julien Folly Acked-by: Evgeniy Polyakov Signed-off-by: Greg Kroah-Hartman commit 3c3f76248e79d69f3b8ceaa31b68051dad45e92b Author: YueHaibing Date: Fri Oct 12 03:25:56 2018 +0000 misc: mic: scif: remove set but not used variables 'src_dma_addr, dst_dma_addr' Fixes gcc '-Wunused-but-set-variable' warning: drivers/misc/mic/scif/scif_dma.c: In function 'scif_rma_list_dma_copy_wrapper': drivers/misc/mic/scif/scif_dma.c:1558:27: warning: variable 'dst_dma_addr' set but not used [-Wunused-but-set-variable] drivers/misc/mic/scif/scif_dma.c:1558:13: warning: variable 'src_dma_addr' set but not used [-Wunused-but-set-variable] They never used since introduction in commit 7cc31cd27752 ("misc: mic: SCIF DMA and CPU copy interface") Signed-off-by: YueHaibing Signed-off-by: Greg Kroah-Hartman commit 6b995f4eec34745f6cb20d66d5277611f0b3c3fa Author: Wenwen Wang Date: Wed Oct 10 18:38:28 2018 -0500 misc: mic: fix a DMA pool free failure In _scif_prog_signal(), the boolean variable 'x100' is used to indicate whether the MIC Coprocessor is X100. If 'x100' is true, the status descriptor will be used to write the value to the destination. Otherwise, a DMA pool will be allocated for this purpose. Specifically, if the DMA pool is allocated successfully, two memory addresses will be returned. One is for the CPU and the other is for the device to access the DMA pool. The former is stored to the variable 'status' and the latter is stored to the variable 'src'. After the allocation, the address in 'src' is saved to 'status->src_dma_addr', which is actually in the DMA pool, and 'src' is then modified. Later on, if an error occurs, the execution flow will transfer to the label 'dma_fail', which will check 'x100' and free up the allocated DMA pool if 'x100' is false. The point here is that 'status->src_dma_addr' is used for freeing up the DMA pool. As mentioned before, 'status->src_dma_addr' is in the DMA pool. And thus, the device is able to modify this data. This can potentially cause failures when freeing up the DMA pool because of the modified device address. This patch avoids the above issue by using the variable 'src' (with necessary calculation) to free up the DMA pool. Signed-off-by: Wenwen Wang Signed-off-by: Greg Kroah-Hartman commit 8d452721628db190964ab44e302c3e3fb3bdb8ef Author: Lukasz Majewski Date: Fri Sep 28 00:26:55 2018 +0200 dt-bindings: misc: bk4: Add device tree binding for Liebherr's BK4 SPI bus Add Device Tree binding document for Liebherr's BK4 external SPI bus. Signed-off-by: Lukasz Majewski Signed-off-by: Rob Herring commit 6d7d725b2e62b00f6b0b36639ba597efe9cc8ea9 Author: Roman Kiryanov Date: Wed Oct 3 10:17:13 2018 -0700 platform: goldfish: pipe: Add a blank line to separate varibles and code checkpacth: Missing a blank line after declarations Signed-off-by: Roman Kiryanov Signed-off-by: Greg Kroah-Hartman commit e6fb3193307dc6bd1de9354a7937385e73fd06cb Author: Roman Kiryanov Date: Wed Oct 3 10:17:10 2018 -0700 platform: goldfish: pipe: Remove redundant casting This casting is not required. Signed-off-by: Roman Kiryanov Signed-off-by: Greg Kroah-Hartman commit 60a6e5233fcbe82a89b5b83b95b5d87e04b3be60 Author: Roman Kiryanov Date: Wed Oct 3 10:17:09 2018 -0700 platform: goldfish: pipe: Call misc_deregister if init fails Undo effects of misc_register if driver's init fails after misc_register. Signed-off-by: Roman Kiryanov Signed-off-by: Greg Kroah-Hartman commit 08360e26f2a8eba0105ca7cd598547a1749b1c68 Author: Roman Kiryanov Date: Wed Oct 3 10:17:08 2018 -0700 platform: goldfish: pipe: Move the file-scope goldfish_pipe_dev variable into the driver state This is the last patch in the series of patches to move file-scope variables into the driver state. This change will help to introduce another version of the pipe driver (with different state) for the older host interface or having several instances of this device. Signed-off-by: Roman Kiryanov Signed-off-by: Greg Kroah-Hartman commit 43c2cc2864bca0cceff331f27fe762fcf0d804b2 Author: Roman Kiryanov Date: Wed Oct 3 10:17:07 2018 -0700 platform: goldfish: pipe: Move the file-scope goldfish_pipe_miscdev variable into the driver state This is a series of patches to move mutable file-scope variables into the driver state. This change will help to introduce another version of the pipe driver (with different state) for the older host interface or having several instances of this device. Signed-off-by: Roman Kiryanov Signed-off-by: Greg Kroah-Hartman commit c394cc3b470c0adfee2dff4b8b2a907a73a0ee81 Author: Roman Kiryanov Date: Wed Oct 3 10:17:06 2018 -0700 platform: goldfish: pipe: Move the file-scope goldfish_interrupt_tasklet variable into the driver state This is a series of patches to move mutable file-scope variables into the driver state. This change will help to introduce another version of the pipe driver (with different state) for the older host interface or having several instances of this device. Signed-off-by: Roman Kiryanov Signed-off-by: Greg Kroah-Hartman commit 40970f7a43d6bddb5e47baf16449d6f5fd329531 Author: Krzysztof Kozlowski Date: Thu Sep 27 19:04:40 2018 +0200 dt-bindings: thermal: samsung: Add SPDX license identifier Replace GPL license statement with SPDX license identifier (GPL-2.0+). Signed-off-by: Krzysztof Kozlowski Signed-off-by: Rob Herring commit cd9102e9add8ec1f5a01cfbcad52cac8c2c380b7 Author: Krzysztof Kozlowski Date: Thu Sep 27 19:03:47 2018 +0200 dt-bindings: clock: samsung: Add SPDX license identifiers Replace GPL license statements with SPDX license identifiers (GPL-2.0). Signed-off-by: Krzysztof Kozlowski Acked-by: Chanwoo Choi Reviewed-by: Rob Herring Signed-off-by: Rob Herring commit 8942b2d5094b01e4509f0118a7940bb07350e128 Author: Furquan Shaikh Date: Fri Oct 12 10:04:48 2018 -0600 gsmi: Add GSMI commands to log S0ix info Add new GSMI commands (GSMI_CMD_LOG_S0IX_SUSPEND = 0xa, GSMI_CMD_LOG_S0IX_RESUME = 0xb) that allow firmware to log any information during S0ix suspend/resume paths. Traditional ACPI suspend S3 involves BIOS both during the suspend and the resume paths. However, modern suspend type like S0ix does not involve firmware on either of the paths. This command gives the firmware an opportunity to log any required information about the suspend and resume operations e.g. wake sources. Additionally, this change adds a module parameter to allow platforms to specifically enable S0ix logging if required. This prevents any other platforms from unnecessarily making a GSMI call which could have any side-effects. Tested by verifying that wake sources are correctly logged in eventlog. Signed-off-by: Furquan Shaikh Reviewed-by: Aaron Durbin Reviewed-by: Rajat Jain Signed-off-by: Furquan Shaikh Tested-by: Furquan Shaikh Reviewed-by: Aaron Durbin [zwisler: update changelog for upstream] Signed-off-by: Ross Zwisler Reviewed-by: Guenter Roeck Signed-off-by: Greg Kroah-Hartman commit d31655ba89575a2d1559a345642338eecd49c96d Author: Duncan Laurie Date: Fri Oct 12 10:04:47 2018 -0600 gsmi: Remove autoselected dependency on EFI and EFI_VARS Instead of selecting EFI and EFI_VARS automatically when GSMI is enabled let that portion of the driver be conditionally compiled if EFI and EFI_VARS are enabled. This allows the rest of the driver (specifically event log) to be used if EFI_VARS is not enabled. To test: 1) verify that EFI_VARS is not automatically selected when CONFIG_GOOGLE_GSMI is enabled 2) verify that the kernel boots on Link and that GSMI event log is still available and functional 3) specifically boot the kernel on Alex to ensure it does not try to load efivars and that gsmi also does not load because it is not in the supported DMI table Signed-off-by: Duncan Laurie Reviewed-by: Olof Johansson Signed-off-by: Benson Leung Signed-off-by: Ben Zhang Signed-off-by: Filipe Brandenburger Signed-off-by: Furquan Shaikh Tested-by: Furquan Shaikh Reviewed-by: Aaron Durbin [zwisler: update changelog for upstream] Signed-off-by: Ross Zwisler Reviewed-by: Guenter Roeck Signed-off-by: Greg Kroah-Hartman commit 255d7447cf92821ded63079ffe4019d9f0fa0a6c Author: Duncan Laurie Date: Fri Oct 12 10:04:46 2018 -0600 gsmi: Add coreboot to list of matching BIOS vendors In order to use this coreboot needs board support for: CONFIG_ELOG=y CONFIG_ELOG_GSMI=y And the kernel driver needs enabled: CONFIG_GOOGLE_GSMI=y To test, verify that clean shutdown event is added to the log: > mosys eventlog list | grep 'Clean Shutdown' 11 | 2012-06-25 09:49:24 | Kernl Event | Clean Shutdown Signed-off-by: Duncan Laurie Reviewed-by: Vadim Bendebury Reviewed-by: Stefan Reinauer Signed-off-by: Furquan Shaikh Tested-by: Furquan Shaikh Reviewed-by: Aaron Durbin Reviewed-by: Justin TerAvest [zwisler: update changelog for upstream] Signed-off-by: Ross Zwisler Reviewed-by: Guenter Roeck Signed-off-by: Greg Kroah-Hartman commit 655603de68469adaff16842ac17a5aec9c9ce89b Author: Duncan Laurie Date: Fri Oct 12 10:04:45 2018 -0600 gsmi: Fix bug in append_to_eventlog sysfs handler The sysfs handler should return the number of bytes consumed, which in the case of a successful write is the entire buffer. Also fix a bug where param.data_len was being set to (count - (2 * sizeof(u32))) instead of just (count - sizeof(u32)). The latter is correct because we skip over the leading u32 which is our param.type, but we were also incorrectly subtracting sizeof(u32) on the line where we were actually setting param.data_len: param.data_len = count - sizeof(u32); This meant that for our example event.kernel_software_watchdog with total length 10 bytes, param.data_len was just 2 prior to this change. To test, successfully append an event to the log with gsmi sysfs. This sample event is for a "Kernel Software Watchdog" > xxd -g 1 event.kernel_software_watchdog 0000000: 01 00 00 00 ad de 06 00 00 00 > cat event.kernel_software_watchdog > /sys/firmware/gsmi/append_to_eventlog > mosys eventlog list | tail -1 14 | 2012-06-25 10:14:14 | Kernl Event | Software Watchdog Signed-off-by: Duncan Laurie Reviewed-by: Vadim Bendebury Reviewed-by: Stefan Reinauer Signed-off-by: Furquan Shaikh Tested-by: Furquan Shaikh Reviewed-by: Aaron Durbin Reviewed-by: Justin TerAvest [zwisler: updated changelog for 2nd bug fix and upstream] Signed-off-by: Ross Zwisler Reviewed-by: Guenter Roeck Signed-off-by: Greg Kroah-Hartman commit 22be0c6cec357ba4e15655a695d8abd9bab1290c Author: Chris Brandt Date: Thu Sep 27 09:12:58 2018 -0500 dt-bindings: timer: ostm: Add R7S9210 support The R7S9210 belongs to the RZ/A2 SoC series Signed-off-by: Chris Brandt Reviewed-by: Simon Horman Signed-off-by: Rob Herring commit b3da72593e14511967a5f96f5e329b022239a90e Author: Biju Das Date: Thu Sep 27 13:23:34 2018 +0100 dt-bindings: phy: rcar-gen2: Add r8a7744 support Add USB PHY support for r8a7744 SoC. Renesas RZ/G1N (R8A7744) USB PHY is identical to the R-Car Gen2 family. Signed-off-by: Biju Das Reviewed-by: Chris Paterson Reviewed-by: Simon Horman Signed-off-by: Rob Herring commit 4a2b2662e9d21648502e5be10dcd312b8fe85bca Author: Joel Fernandes (Google) Date: Thu Oct 4 18:49:52 2018 -0700 MAINTAINERS: Add me to Android drivers I am one of the main engineers working on ashmem. I have been fixing bugs in the driver and have been involved in the memfd conversion discussions and sending patches about that. I also have an understanding of the binder driver and was involved with some of the development on finer grained locking. So I would like to be added to the MAINTAINERS file for android drivers for review and maintenance of ashmem and other Android drivers. Signed-off-by: Joel Fernandes (Google) Acked-by: Todd Kjos Signed-off-by: Greg Kroah-Hartman commit 700992d361c7912923d1e570681eed65b54a6d9b Author: Biju Das Date: Thu Sep 27 13:08:48 2018 +0100 dt-bindings: can: rcar_can: Add r8a7744 support Document RZ/G1N (r8a7744) SoC specific bindings. Signed-off-by: Biju Das Reviewed-by: Chris Paterson Reviewed-by: Simon Horman Signed-off-by: Rob Herring commit 03bf67817ec1b8eb3017d2884486ef1bac128764 Author: Gustavo A. R. Silva Date: Mon Oct 15 11:21:47 2018 -0700 Input: atmel_mxt_ts - 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: Dmitry Torokhov commit 15ee2992c07eb67576bab2d764f34d76aabb9143 Author: Gustavo A. R. Silva Date: Mon Oct 15 11:21:18 2018 -0700 Input: cyapa - 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 the "Fallthrough state" commern with a proper "Fall through", which is what GCC is expecting to find. Addresses-Coverity-ID: 114758 ("Missing break in switch") Addresses-Coverity-ID: 114759 ("Missing break in switch") Signed-off-by: Gustavo A. R. Silva Signed-off-by: Dmitry Torokhov commit a3f7c3fcf60868c1e90671df5d0cf9be5900a09b Author: Randy Dunlap Date: Mon Oct 15 11:16:58 2018 -0700 Input: wm97xx-ts - fix exit path Loading then unloading wm97xx-ts.ko when CONFIG_AC97_BUS=m causes a WARNING: from drivers/base/driver.c: Unexpected driver unregister! WARNING: CPU: 0 PID: 1709 at ../drivers/base/driver.c:193 driver_unregister+0x30/0x40 Fix this by only calling driver_unregister() with the same condition that driver_register() is called. Fixes: ae9d1b5fbd7b ("Input: wm97xx: add new AC97 bus support") Signed-off-by: Randy Dunlap Signed-off-by: Dmitry Torokhov commit c9e58fb2aad5231e7c49d90d059caa3c67a3ff31 Author: Bob Peterson Date: Mon Oct 15 12:17:30 2018 -0500 gfs2: write revokes should traverse sd_ail1_list in reverse All the other functions that deal with the sd_ail_list run the list from the tail back to the head, iow, in reverse. We should do the same while writing revokes, otherwise we might miss removing entries properly from the list when we hit the limit of how many revokes we can write at one time (based on block size, which determines how many block pointers will fit in the revoke block). Signed-off-by: Bob Peterson commit a3e403161fe1cc87bdbcfb8a4a4eab7aa6ac1a96 Author: Manivannan Sadhasivam Date: Mon Oct 8 22:46:31 2018 +0530 dmaengine: owl: Fix warnings generated during build Following warnings are generated when compiled with W=1, drivers/dma/owl-dma.c:170: warning: Function parameter or member 'cyclic' not described in 'owl_dma_txd' drivers/dma/owl-dma.c:198: warning: Function parameter or member 'cfg' not described in 'owl_dma_vchan' drivers/dma/owl-dma.c:198: warning: Function parameter or member 'drq' not described in 'owl_dma_vchan' drivers/dma/owl-dma.c:225: warning: Function parameter or member 'irq' not described in 'owl_dma' Fix this by adding comments for relevant struct members to appear in kernel-doc. Fixes: d64e1b3f5cce ("dmaengine: owl: Add Slave and Cyclic mode support for Actions Semi Owl S900 SoC") Reported-by: Vinod Koul Signed-off-by: Manivannan Sadhasivam Reviewed-by: Andreas Färber Signed-off-by: Vinod Koul commit 6df9543da2b2a2f98f8a6ebbf9530bd3546b7268 Merge: 5b394b2ddf03 9dbcfe1ace4e Author: Stephen Boyd Date: Mon Oct 15 10:01:41 2018 -0700 Merge tag 'clk-v4.20-samsung' of git://git.kernel.org/pub/scm/linux/kernel/git/snawrocki/clk into clk-samsung Pull Samsung clk driver updates from Sylwester Nawrocki: - consolidation of system suspend related code in Exynos, S5P, S3C SoC clk drivers, - fixes of system suspend support on Exynos542x (Odroid boards) and Exynos5433 SoC, - removal of obsoleted Exynos4212 ISP clock definitions, - correction of Exynos CPU clock implementation, - addition of SPDX license identifiers. * tag 'clk-v4.20-samsung' of git://git.kernel.org/pub/scm/linux/kernel/git/snawrocki/clk: dt-bindings: clock: samsung: Add SPDX license identifiers clk: samsung: Use clk_hw API for calling clk framework from clk notifiers clk: samsung: exynos5420: Enable PERIS clocks for suspend clk: samsung: exynos5420: Define CLK_SECKEY gate clock only or Exynos5420 clk: samsung: exynos5433: Keep sclk_uart clocks enabled in suspend clk: samsung: Remove obsolete code for Exynos4412 ISP clocks clk: samsung: exynos5433: Add suspend state for TOP, CPIF & PERIC CMUs clk: samsung: Use NOIRQ stage for Exynos5433 clocks suspend/resume clk: samsung: exynos5420: Use generic helper for handling suspend/resume clk: samsung: exynos4: Use generic helper for handling suspend/resume clk: samsung: Add support for setting registers state before suspend clk: samsung: exynos5250: Use generic helper for handling suspend/resume clk: samsung: s5pv210: Use generic helper for handling suspend/resume clk: samsung: s3c64xx: Use generic helper for handling suspend/resume clk: samsung: s3c2443: Use generic helper for handling suspend/resume clk: samsung: s3c2412: Use generic helper for handling suspend/resume clk: samsung: s3c2410: Use generic helper for handling suspend/resume clk: samsung: Remove excessive include commit 7c4189c75b0b40bfe559b185e30847398e9ac206 Author: Biju Das Date: Tue Sep 25 18:18:16 2018 +0100 dt-bindings: timer: renesas, cmt: Document r8a7744 CMT support Document SoC specific compatible strings for r8a7744. No driver change is needed as the fallback strings will activate the right code. Signed-off-by: Biju Das Reviewed-by: Chris Paterson Reviewed-by: Simon Horman Reviewed-by: Geert Uytterhoeven Signed-off-by: Rob Herring commit c54ed7c02bd79abe7a62943d308ecb51cf1d4ffe Author: Biju Das Date: Tue Sep 25 18:07:21 2018 +0100 dt-bindings: watchdog: renesas-wdt: Document r8a7744 support RZ/G1N (R8A7744) watchdog implementation is compatible with R-Car Gen2, therefore add relevant documentation. Signed-off-by: Biju Das Reviewed-by: Chris Paterson Reviewed-by: Simon Horman Reviewed-by: Geert Uytterhoeven Reviewed-by: Guenter Roeck Signed-off-by: Rob Herring commit 4583af182007d3f0779b8ca3c83fb2325c12d4d7 Author: Biju Das Date: Tue Sep 25 18:01:04 2018 +0100 dt-bindings: thermal: rcar: Add device tree support for r8a7744 Add thermal sensor support for r8a7744 SoC. The Renesas RZ/G1N (r8a7744) thermal sensor module is identical to the R-Car Gen2 family. No driver change is needed due to the fallback compatible value "renesas,rcar-gen2-thermal". Signed-off-by: Biju Das Reviewed-by: Chris Paterson Reviewed-by: Daniel Lezcano Reviewed-by: Simon Horman Reviewed-by: Geert Uytterhoeven Signed-off-by: Rob Herring commit d9352794dad9f28535439d85a815978878c141ab Author: Lu Fengqi Date: Thu Oct 11 13:40:38 2018 +0800 btrfs: switch return_bigger to bool in find_ref_head Using bool is more suitable than int here, and add the comment about the return_bigger. Signed-off-by: Lu Fengqi Reviewed-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 7c8616278b19c42141ff4617573cbf950f4a456b Author: Lu Fengqi Date: Thu Oct 11 13:40:36 2018 +0800 btrfs: remove fs_info from btrfs_should_throttle_delayed_refs The avg_delayed_ref_runtime can be referenced from the transaction handle. Signed-off-by: Lu Fengqi Reviewed-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit af9b8a0e2085fc90dca85acd85ee83ece7c05130 Author: Lu Fengqi Date: Thu Oct 11 13:40:35 2018 +0800 btrfs: remove fs_info from btrfs_check_space_for_delayed_refs It can be referenced from the transaction handle. Signed-off-by: Lu Fengqi Reviewed-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 9e920a6f03e40b1eb712f38b29ad5880153754e2 Author: Lu Fengqi Date: Thu Oct 11 13:40:34 2018 +0800 btrfs: delayed-ref: pass delayed_refs directly to btrfs_delayed_ref_lock Since trans is only used for referring to delayed_refs, there is no need to pass it instead of delayed_refs to btrfs_delayed_ref_lock(). No functional change. Reviewed-by: Nikolay Borisov Signed-off-by: Lu Fengqi Reviewed-by: David Sterba Signed-off-by: David Sterba commit 5637c74b01458d4bc392c2bb721bd102f316ad2d Author: Lu Fengqi Date: Thu Oct 11 13:40:33 2018 +0800 btrfs: delayed-ref: pass delayed_refs directly to btrfs_select_ref_head Since trans is only used for referring to delayed_refs, there is no need to pass it instead of delayed_refs to btrfs_select_ref_head(). No functional change. Signed-off-by: Lu Fengqi Reviewed-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit b90e22ba4804d31160f6cd625efa599ba9d286af Author: Lu Fengqi Date: Thu Oct 11 13:42:56 2018 +0800 btrfs: qgroup: move the qgroup->members check out from (!qgroup)'s else branch There is no reason to put this check in (!qgroup)'s else branch because if qgroup is null, it will goto out directly. So move it out to reduce indentation level. No functional change. Signed-off-by: Lu Fengqi Reviewed-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 06bbf67244fc63c66340bd31f4b2b60d797e886e Author: Qu Wenruo Date: Fri Sep 21 15:20:30 2018 +0800 btrfs: relocation: Remove redundant tree level check Commit 581c1760415c ("btrfs: Validate child tree block's level and first key") has made tree block level check mandatory. So if tree block level doesn't match, we won't get a valid extent buffer. The extra WARN_ON() check can be removed completely. Reviewed-by: Nikolay Borisov Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 98ff7b94e4daca8d7ea4352a9a7905cced597a4c Author: Qu Wenruo Date: Fri Sep 21 15:20:29 2018 +0800 btrfs: relocation: Cleanup while loop using rbtree_postorder_for_each_entry_safe And add one line comment explaining what we're doing for each loop. Reviewed-by: Nikolay Borisov Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 3628b4ca64f24a4ec55055597d0cb1c814729f8b Author: Qu Wenruo Date: Tue Oct 9 14:36:45 2018 +0800 btrfs: qgroup: Avoid calling qgroup functions if qgroup is not enabled Some qgroup trace events like btrfs_qgroup_release_data() and btrfs_qgroup_free_delayed_ref() can still be triggered even if qgroup is not enabled. This is caused by the lack of qgroup status check before calling some qgroup functions. Thankfully the functions can handle quota disabled case well and just do nothing for qgroup disabled case. This patch will do earlier check before triggering related trace events. And for enabled <-> disabled race case: 1) For enabled->disabled case Disable will wipe out all qgroups data including reservation and excl/rfer. Even if we leak some reservation or numbers, it will still be cleared, so nothing will go wrong. 2) For disabled -> enabled case Current btrfs_qgroup_release_data() will use extent_io tree to ensure we won't underflow reservation. And for delayed_ref we use head->qgroup_reserved to record the reserved space, so in that case head->qgroup_reserved should be 0 and we won't underflow. CC: stable@vger.kernel.org # 4.14+ Reported-by: Chris Murphy Link: https://lore.kernel.org/linux-btrfs/CAJCQCtQau7DtuUUeycCkZ36qjbKuxNzsgqJ7+sJ6W0dK_NLE3w@mail.gmail.com/ Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 0f375eed92b5a407657532637ed9652611a682f5 Author: Filipe Manana Date: Tue Oct 9 15:05:29 2018 +0100 Btrfs: fix wrong dentries after fsync of file that got its parent replaced In a scenario like the following: mkdir /mnt/A # inode 258 mkdir /mnt/B # inode 259 touch /mnt/B/bar # inode 260 sync mv /mnt/B/bar /mnt/A/bar mv -T /mnt/A /mnt/B fsync /mnt/B/bar After replaying the log we end up with file bar having 2 hard links, both with the name 'bar' and one in the directory with inode number 258 and the other in the directory with inode number 259. Also, we end up with the directory inode 259 still existing and with the directory inode 258 still named as 'A', instead of 'B'. In this scenario, file 'bar' should only have one hard link, located at directory inode 258, the directory inode 259 should not exist anymore and the name for directory inode 258 should be 'B'. This incorrect behaviour happens because when attempting to log the old parents of an inode, we skip any parents that no longer exist. Fix this by forcing a full commit if an old parent no longer exists. A test case for fstests follows soon. CC: stable@vger.kernel.org # 4.4+ Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit f2d72f42d5fa3bf33761d9e47201745f624fcff5 Author: Filipe Manana Date: Mon Oct 8 11:12:55 2018 +0100 Btrfs: fix warning when replaying log after fsync of a tmpfile When replaying a log which contains a tmpfile (which necessarily has a link count of 0) we end up calling inc_nlink(), at fs/btrfs/tree-log.c:replay_one_buffer(), which produces a warning like the following: [195191.943673] WARNING: CPU: 0 PID: 6924 at fs/inode.c:342 inc_nlink+0x33/0x40 [195191.943723] CPU: 0 PID: 6924 Comm: mount Not tainted 4.19.0-rc6-btrfs-next-38 #1 [195191.943724] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.11.2-0-gf9626ccb91-prebuilt.qemu-project.org 04/01/2014 [195191.943726] RIP: 0010:inc_nlink+0x33/0x40 [195191.943728] RSP: 0018:ffffb96e425e3870 EFLAGS: 00010246 [195191.943730] RAX: 0000000000000000 RBX: ffff8c0d1e6af4f0 RCX: 0000000000000006 [195191.943731] RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff8c0d1e6af4f0 [195191.943731] RBP: 0000000000000097 R08: 0000000000000001 R09: 0000000000000000 [195191.943732] R10: 0000000000000000 R11: 0000000000000000 R12: ffffb96e425e3a60 [195191.943733] R13: ffff8c0d10cff0c8 R14: ffff8c0d0d515348 R15: ffff8c0d78a1b3f8 [195191.943735] FS: 00007f570ee24480(0000) GS:ffff8c0dfb200000(0000) knlGS:0000000000000000 [195191.943736] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [195191.943737] CR2: 00005593286277c8 CR3: 00000000bb8f2006 CR4: 00000000003606f0 [195191.943739] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [195191.943740] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [195191.943741] Call Trace: [195191.943778] replay_one_buffer+0x797/0x7d0 [btrfs] [195191.943802] walk_up_log_tree+0x1c1/0x250 [btrfs] [195191.943809] ? rcu_read_lock_sched_held+0x3f/0x70 [195191.943825] walk_log_tree+0xae/0x1d0 [btrfs] [195191.943840] btrfs_recover_log_trees+0x1d7/0x4d0 [btrfs] [195191.943856] ? replay_dir_deletes+0x280/0x280 [btrfs] [195191.943870] open_ctree+0x1c3b/0x22a0 [btrfs] [195191.943887] btrfs_mount_root+0x6b4/0x800 [btrfs] [195191.943894] ? rcu_read_lock_sched_held+0x3f/0x70 [195191.943899] ? pcpu_alloc+0x55b/0x7c0 [195191.943906] ? mount_fs+0x3b/0x140 [195191.943908] mount_fs+0x3b/0x140 [195191.943912] ? __init_waitqueue_head+0x36/0x50 [195191.943916] vfs_kern_mount+0x62/0x160 [195191.943927] btrfs_mount+0x134/0x890 [btrfs] [195191.943936] ? rcu_read_lock_sched_held+0x3f/0x70 [195191.943938] ? pcpu_alloc+0x55b/0x7c0 [195191.943943] ? mount_fs+0x3b/0x140 [195191.943952] ? btrfs_remount+0x570/0x570 [btrfs] [195191.943954] mount_fs+0x3b/0x140 [195191.943956] ? __init_waitqueue_head+0x36/0x50 [195191.943960] vfs_kern_mount+0x62/0x160 [195191.943963] do_mount+0x1f9/0xd40 [195191.943967] ? memdup_user+0x4b/0x70 [195191.943971] ksys_mount+0x7e/0xd0 [195191.943974] __x64_sys_mount+0x21/0x30 [195191.943977] do_syscall_64+0x60/0x1b0 [195191.943980] entry_SYSCALL_64_after_hwframe+0x49/0xbe [195191.943983] RIP: 0033:0x7f570e4e524a [195191.943986] RSP: 002b:00007ffd83589478 EFLAGS: 00000206 ORIG_RAX: 00000000000000a5 [195191.943989] RAX: ffffffffffffffda RBX: 0000563f335b2060 RCX: 00007f570e4e524a [195191.943990] RDX: 0000563f335b2240 RSI: 0000563f335b2280 RDI: 0000563f335b2260 [195191.943992] RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000020 [195191.943993] R10: 00000000c0ed0000 R11: 0000000000000206 R12: 0000563f335b2260 [195191.943994] R13: 0000563f335b2240 R14: 0000000000000000 R15: 00000000ffffffff [195191.944002] irq event stamp: 8688 [195191.944010] hardirqs last enabled at (8687): [] console_unlock+0x503/0x640 [195191.944012] hardirqs last disabled at (8688): [] trace_hardirqs_off_thunk+0x1a/0x1c [195191.944018] softirqs last enabled at (8638): [] __set_page_dirty_nobuffers+0x101/0x150 [195191.944020] softirqs last disabled at (8634): [] wb_wakeup_delayed+0x2e/0x60 [195191.944022] ---[ end trace 5d6e873a9a0b811a ]--- This happens because the inode does not have the flag I_LINKABLE set, which is a runtime only flag, not meant to be persisted, set when the inode is created through open(2) if the flag O_EXCL is not passed to it. Except for the warning, there are no other consequences (like corruptions or metadata inconsistencies). Since it's pointless to replay a tmpfile as it would be deleted in a later phase of the log replay procedure (it has a link count of 0), fix this by not logging tmpfiles and if a tmpfile is found in a log (created by a kernel without this change), skip the replay of the inode. A test case for fstests follows soon. Fixes: 471d557afed1 ("Btrfs: fix loss of prealloc extents past i_size after fsync log replay") CC: stable@vger.kernel.org # 4.18+ Reported-by: Martin Steigerwald Link: https://lore.kernel.org/linux-btrfs/3666619.NTnn27ZJZE@merkaba/ Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit ad80cf50c3f09a88eed918feeb95edaaf8d72b0a Author: Josef Bacik Date: Fri Sep 28 07:18:19 2018 -0400 btrfs: drop min_size from evict_refill_and_join We don't need it, rsv->size is set once and never changes throughout its lifetime, so just use that for the reserve size. Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit e187831e1875b2754a3ba3c683bd277d4a5f7be8 Author: Josef Bacik Date: Fri Sep 28 07:18:03 2018 -0400 btrfs: assert on non-empty delayed iputs I ran into an issue where there was some reference being held on an inode that I couldn't track. This assert wasn't triggered, but it at least rules out we're doing something stupid. Reviewed-by: Omar Sandoval Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 545e3366db823dc3342ca9d7fea803f829c9062f Author: Josef Bacik Date: Fri Sep 28 07:18:02 2018 -0400 btrfs: make sure we create all new block groups Allocating new chunks modifies both the extent and chunk tree, which can trigger new chunk allocations. So instead of doing list_for_each_safe, just do while (!list_empty()) so we make sure we don't exit with other pending bg's still on our list. CC: stable@vger.kernel.org # 4.4+ Reviewed-by: Omar Sandoval Reviewed-by: Liu Bo Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 553cceb49681d60975d00892877d4c871bf220f9 Author: Josef Bacik Date: Fri Sep 28 07:18:00 2018 -0400 btrfs: reset max_extent_size on clear in a bitmap We need to clear the max_extent_size when we clear bits from a bitmap since it could have been from the range that contains the max_extent_size. CC: stable@vger.kernel.org # 4.4+ Reviewed-by: Liu Bo Signed-off-by: Josef Bacik Signed-off-by: David Sterba commit 84de76a2fb217dc1b6bc2965cc397d1648aa1404 Author: Josef Bacik Date: Fri Sep 28 07:17:49 2018 -0400 btrfs: protect space cache inode alloc with GFP_NOFS If we're allocating a new space cache inode it's likely going to be under a transaction handle, so we need to use memalloc_nofs_save() in order to avoid deadlocks, and more importantly lockdep messages that make xfstests fail. CC: stable@vger.kernel.org # 4.4+ Reviewed-by: Omar Sandoval Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit f45c752b65af46bf42963295c332865d95f97fff Author: Josef Bacik Date: Fri Sep 28 07:17:48 2018 -0400 btrfs: release metadata before running delayed refs We want to release the unused reservation we have since it refills the delayed refs reserve, which will make everything go smoother when running the delayed refs if we're short on our reservation. CC: stable@vger.kernel.org # 4.4+ Reviewed-by: Omar Sandoval Reviewed-by: Liu Bo Reviewed-by: Nikolay Borisov Signed-off-by: Josef Bacik Signed-off-by: David Sterba commit 523983401644ebeb331c923c28c9591c07430a7d Author: Liu Bo Date: Wed Aug 22 05:54:37 2018 +0800 Btrfs: kill btrfs_clear_path_blocking Btrfs's btree locking has two modes, spinning mode and blocking mode, while searching btree, locking is always acquired in spinning mode and then converted to blocking mode if necessary, and in some hot paths we may switch the locking back to spinning mode by btrfs_clear_path_blocking(). When acquiring locks, both of reader and writer need to wait for blocking readers and writers to complete before doing read_lock()/write_lock(). The problem is that btrfs_clear_path_blocking() needs to switch nodes in the path to blocking mode at first (by btrfs_set_path_blocking) to make lockdep happy before doing its actual clearing blocking job. When switching to blocking mode from spinning mode, it consists of step 1) bumping up blocking readers counter and step 2) read_unlock()/write_unlock(), this has caused serious ping-pong effect if there're a great amount of concurrent readers/writers, as waiters will be woken up and go to sleep immediately. 1) Killing this kind of ping-pong results in a big improvement in my 1600k files creation script, MNT=/mnt/btrfs mkfs.btrfs -f /dev/sdf mount /dev/def $MNT time fsmark -D 10000 -S0 -n 100000 -s 0 -L 1 -l /tmp/fs_log.txt \ -d $MNT/0 -d $MNT/1 \ -d $MNT/2 -d $MNT/3 \ -d $MNT/4 -d $MNT/5 \ -d $MNT/6 -d $MNT/7 \ -d $MNT/8 -d $MNT/9 \ -d $MNT/10 -d $MNT/11 \ -d $MNT/12 -d $MNT/13 \ -d $MNT/14 -d $MNT/15 w/o patch: real 2m27.307s user 0m12.839s sys 13m42.831s w/ patch: real 1m2.273s user 0m15.802s sys 8m16.495s 1.1) latency histogram from funclatency[1] Overall with the patch, there're ~50% less write lock acquisition and the 95% max latency that write lock takes also reduces to ~100ms from >500ms. -------------------------------------------- w/o patch: -------------------------------------------- Function = btrfs_tree_lock msecs : count distribution 0 -> 1 : 2385222 |****************************************| 2 -> 3 : 37147 | | 4 -> 7 : 20452 | | 8 -> 15 : 13131 | | 16 -> 31 : 3877 | | 32 -> 63 : 3900 | | 64 -> 127 : 2612 | | 128 -> 255 : 974 | | 256 -> 511 : 165 | | 512 -> 1023 : 13 | | Function = btrfs_tree_read_lock msecs : count distribution 0 -> 1 : 6743860 |****************************************| 2 -> 3 : 2146 | | 4 -> 7 : 190 | | 8 -> 15 : 38 | | 16 -> 31 : 4 | | -------------------------------------------- w/ patch: -------------------------------------------- Function = btrfs_tree_lock msecs : count distribution 0 -> 1 : 1318454 |****************************************| 2 -> 3 : 6800 | | 4 -> 7 : 3664 | | 8 -> 15 : 2145 | | 16 -> 31 : 809 | | 32 -> 63 : 219 | | 64 -> 127 : 10 | | Function = btrfs_tree_read_lock msecs : count distribution 0 -> 1 : 6854317 |****************************************| 2 -> 3 : 2383 | | 4 -> 7 : 601 | | 8 -> 15 : 92 | | 2) dbench also proves the improvement, dbench -t 120 -D /mnt/btrfs 16 w/o patch: Throughput 158.363 MB/sec w/ patch: Throughput 449.52 MB/sec 3) xfstests didn't show any additional failures. One thing to note is that callers may set path->leave_spinning to have all nodes in the path stay in spinning mode, which means callers are ready to not sleep before releasing the path, but it won't cause problems if they don't want to sleep in blocking mode. [1]: https://github.com/iovisor/bcc/blob/master/tools/funclatency.py Signed-off-by: Liu Bo Signed-off-by: David Sterba commit 9b142115ed3593480b813a9331593e9f199da340 Author: David Sterba Date: Thu Apr 5 01:19:50 2018 +0200 btrfs: dev-replace: remove pointless assert in write unlock The value of blocking_readers is increased only when the lock is taken for read, no way we can fail the condition with the write lock. Reviewed-by: Anand Jain Signed-off-by: David Sterba commit 7f8d236ae132a8886a0186008c828e21f7460474 Author: David Sterba Date: Thu Apr 5 01:04:49 2018 +0200 btrfs: dev-replace: move replace members out of fs_info The replace_wait and bio_counter were mistakenly added to fs_info in commit c404e0dc2c843b154f ("Btrfs: fix use-after-free in the finishing procedure of the device replace"), but they logically belong to fs_info::dev_replace. Besides, bio_counter is a very generic name and is confusing in bare fs_info context. Reviewed-by: Anand Jain Signed-off-by: David Sterba commit aa144bfeaa7f87c536ab323edfe2692285343e68 Author: David Sterba Date: Fri Aug 24 17:44:05 2018 +0200 btrfs: dev-replace: avoid useless lock on error handling path The exit sequence in btrfs_dev_replace_start does not allow to simply add a label to the right place so the error handling after starting transaction failure jumps there. Currently there's a lock that pairs with the unlock in the section, which is unnecessary and only raises questions. Add a variable to track the locking status and avoid the extra locking. Reviewed-by: Omar Sandoval Reviewed-by: Anand Jain Signed-off-by: David Sterba commit 9f6cbcbb09d0f2a73ccb9998f6ac34606da9c938 Author: David Sterba Date: Fri Aug 24 17:41:17 2018 +0200 btrfs: open code btrfs_after_dev_replace_commit Too trivial, the purpose can be simply documented in a comment. Reviewed-by: Omar Sandoval Reviewed-by: Anand Jain Signed-off-by: David Sterba commit e37abe9725bf45b292d5653cc02bbd791773c205 Author: David Sterba Date: Wed Apr 4 17:20:52 2018 +0200 btrfs: open code btrfs_dev_replace_stats_inc The wrapper is too trivial, open coding does not make it less readable. Reviewed-by: Omar Sandoval Reviewed-by: Anand Jain Signed-off-by: David Sterba commit 7fb2eced105f67676eb86473d5b1ce6a96f6eab4 Author: David Sterba Date: Fri Aug 24 17:33:58 2018 +0200 btrfs: open code btrfs_dev_replace_clear_lock_blocking There's a single caller and the function name does not say it's actually taking the lock, so open coding makes it more explicit. For now, btrfs_dev_replace_read_lock is used instead of read_lock so it's paired with the unlocking wrapper in the same block. Reviewed-by: Anand Jain Signed-off-by: David Sterba commit 3280f874576d31b03fe19cbcc23585d96feb4ceb Author: David Sterba Date: Fri Aug 24 17:32:29 2018 +0200 btrfs: remove btrfs_dev_replace::read_locks This member seems to be copied from the extent_buffer locking scheme and is at least used to assert that the read lock/unlock is properly nested. In some way. While the _inc/_dec are called inside the read lock section, the asserts are both inside and outside, so the ordering is not guaranteed and we can see read/inc/dec ordered in any way (theoretically). A missing call of btrfs_dev_replace_clear_lock_blocking could cause unexpected read_locks count, so this at least looks like a valid assertion, but this will become unnecessary with later updates. Reviewed-by: Anand Jain Signed-off-by: David Sterba commit f556faa46eb4e96d0d0772e74ecf66781e132f72 Author: Qu Wenruo Date: Fri Sep 28 07:59:34 2018 +0800 btrfs: tree-checker: Check level for leaves and nodes Although we have tree level check at tree read runtime, it's completely based on its parent level. We still need to do accurate level check to avoid invalid tree blocks sneak into kernel space. The check itself is simple, for leaf its level should always be 0. For nodes its level should be in range [1, BTRFS_MAX_LEVEL - 1]. Signed-off-by: Qu Wenruo Reviewed-by: Su Yue Reviewed-by: David Sterba Signed-off-by: David Sterba commit 3d0174f78e72301324a5b0ba7d67676474e36fff Author: Qu Wenruo Date: Thu Sep 27 14:42:35 2018 +0800 btrfs: qgroup: Only trace data extents in leaves if we're relocating data block group For qgroup_trace_extent_swap(), if we find one leaf that needs to be traced, we will also iterate all file extents and trace them. This is OK if we're relocating data block groups, but if we're relocating metadata block groups, balance code itself has ensured that both subtree of file tree and reloc tree contain the same contents. That's to say, if we're relocating metadata block groups, all file extents in reloc and file tree should match, thus no need to trace them. This should reduce the total number of dirty extents processed in metadata block group balance. [[Benchmark]] (with all previous enhancement) Hardware: VM 4G vRAM, 8 vCPUs, disk is using 'unsafe' cache mode, backing device is SAMSUNG 850 evo SSD. Host has 16G ram. Mkfs parameter: --nodesize 4K (To bump up tree size) Initial subvolume contents: 4G data copied from /usr and /lib. (With enough regular small files) Snapshots: 16 snapshots of the original subvolume. each snapshot has 3 random files modified. balance parameter: -m So the content should be pretty similar to a real world root fs layout. | v4.19-rc1 | w/ patchset | diff (*) --------------------------------------------------------------- relocated extents | 22929 | 22851 | -0.3% qgroup dirty extents | 227757 | 140886 | -38.1% time (sys) | 65.253s | 37.464s | -42.6% time (real) | 74.032s | 44.722s | -39.6% Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit 2cd86d309bd1203241ceb833effe90787f3564a1 Author: Qu Wenruo Date: Thu Sep 27 14:42:33 2018 +0800 btrfs: qgroup: Don't trace subtree if we're dropping reloc tree Reloc tree doesn't contribute to qgroup numbers, as we have accounted them at balance time (see replace_path()). Skipping the unneeded subtree tracing should reduce the overhead. [[Benchmark]] Hardware: VM 4G vRAM, 8 vCPUs, disk is using 'unsafe' cache mode, backing device is SAMSUNG 850 evo SSD. Host has 16G ram. Mkfs parameter: --nodesize 4K (To bump up tree size) Initial subvolume contents: 4G data copied from /usr and /lib. (With enough regular small files) Snapshots: 16 snapshots of the original subvolume. each snapshot has 3 random files modified. balance parameter: -m So the content should be pretty similar to a real world root fs layout. | v4.19-rc1 | w/ patchset | diff (*) --------------------------------------------------------------- relocated extents | 22929 | 22900 | -0.1% qgroup dirty extents | 227757 | 167139 | -26.6% time (sys) | 65.253s | 50.123s | -23.2% time (real) | 74.032s | 52.551s | -29.0% Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit 5f527822be40104e9056c981ff06c7750153a10a Author: Qu Wenruo Date: Thu Sep 27 14:42:32 2018 +0800 btrfs: qgroup: Use generation-aware subtree swap to mark dirty extents Before this patch, with quota enabled during balance, we need to mark the whole subtree dirty for quota. E.g. OO = Old tree blocks (from file tree) NN = New tree blocks (from reloc tree) File tree (src) Reloc tree (dst) OO (a) NN (a) / \ / \ (b) OO OO (c) (b) NN NN (c) / \ / \ / \ / \ OO OO OO OO (d) OO OO OO NN (d) For old balance + quota case, quota will mark the whole src and dst tree dirty, including all the 3 old tree blocks in reloc tree. It's doable for small file tree or new tree blocks are all located at lower level. But for large file tree or new tree blocks are all located at higher level, this will lead to mark the whole tree dirty, and be unbelievably slow. This patch will change how we handle such balance with quota enabled case. Now we will search from (b) and (c) for any new tree blocks whose generation is equal to @last_snapshot, and only mark them dirty. In above case, we only need to trace tree blocks NN(b), NN(c) and NN(d). (NN(a) will be traced when COW happens for nodeptr modification). And also for tree blocks OO(b), OO(c), OO(d). (OO(a) will be traced when COW happens for nodeptr modification.) For above case, we could skip 3 tree blocks, but for larger tree, we can skip tons of unmodified tree blocks, and hugely speed up balance. This patch will introduce a new function, btrfs_qgroup_trace_subtree_swap(), which will do the following main work: 1) Read out real root eb And setup basic dst_path for later calls 2) Call qgroup_trace_new_subtree_blocks() To trace all new tree blocks in reloc tree and their counter parts in the file tree. Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit ea49f3e73c4b7252c1569906c1b2cd54605af3c9 Author: Qu Wenruo Date: Thu Sep 27 14:42:31 2018 +0800 btrfs: qgroup: Introduce function to find all new tree blocks of reloc tree Introduce new function, qgroup_trace_new_subtree_blocks(), to iterate all new tree blocks in a reloc tree. So that qgroup could skip unrelated tree blocks during balance, which should hugely speedup balance speed when quota is enabled. The function qgroup_trace_new_subtree_blocks() itself only cares about new tree blocks in reloc tree. All its main works are: 1) Read out tree blocks according to parent pointers 2) Do recursive depth-first search Will call the same function on all its children tree blocks, with search level set to current level -1. And will also skip all children whose generation is smaller than @last_snapshot. 3) Call qgroup_trace_extent_swap() to trace tree blocks So although we have parameter list related to source file tree, it's not used at all, but only passed to qgroup_trace_extent_swap(). Thus despite the tree read code, the core should be pretty short and all about recursive depth-first search. Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit 25982561db7f43f29305704f9f24ff36ea7d5671 Author: Qu Wenruo Date: Thu Sep 27 14:42:30 2018 +0800 btrfs: qgroup: Introduce function to trace two swaped extents Introduce a new function, qgroup_trace_extent_swap(), which will be used later for balance qgroup speedup. The basis idea of balance is swapping tree blocks between reloc tree and the real file tree. The swap will happen in highest tree block, but there may be a lot of tree blocks involved. For example: OO = Old tree blocks NN = New tree blocks allocated during balance File tree (257) Reloc tree for 257 L2 OO NN / \ / \ L1 OO OO (a) OO NN (a) / \ / \ / \ / \ L0 OO OO OO OO OO OO NN NN (b) (c) (b) (c) When calling qgroup_trace_extent_swap(), we will pass: @src_eb = OO(a) @dst_path = [ nodes[1] = NN(a), nodes[0] = NN(c) ] @dst_level = 0 @root_level = 1 In that case, qgroup_trace_extent_swap() will search from OO(a) to reach OO(c), then mark both OO(c) and NN(c) as qgroup dirty. The main work of qgroup_trace_extent_swap() can be split into 3 parts: 1) Tree search from @src_eb It should acts as a simplified btrfs_search_slot(). The key for search can be extracted from @dst_path->nodes[dst_level] (first key). 2) Mark the final tree blocks in @src_path and @dst_path qgroup dirty NOTE: In above case, OO(a) and NN(a) won't be marked qgroup dirty. They should be marked during preivous (@dst_level = 1) iteration. 3) Mark file extents in leaves dirty We don't have good way to pick out new file extents only. So we still follow the old method by scanning all file extents in the leave. This function can free us from keeping two pathes, thus later we only need to care about how to iterate all new tree blocks in reloc tree. Signed-off-by: Qu Wenruo [ copy changelog to function comment ] Signed-off-by: David Sterba commit c337e7b02f71c4b2f6f2138807a284d2c4e1ac5e Author: Qu Wenruo Date: Thu Sep 27 14:42:29 2018 +0800 btrfs: qgroup: Introduce trace event to analyse the number of dirty extents accounted Number of qgroup dirty extents is directly linked to the performance overhead, so add a new trace event, trace_qgroup_num_dirty_extents(), to record how many dirty extents is processed in btrfs_qgroup_account_extents(). This will be pretty handy to analyze later balance performance improvement. Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit fa6ac71524f206c33accfc12294fd35e17478fe0 Author: Qu Wenruo Date: Tue Sep 25 14:37:46 2018 +0800 btrfs: relocation: Add basic extent backref related comments for build_backref_tree fs/btrfs/relocation.c:build_backref_tree() is some code from 2009 era, although it works pretty fine, it's not that easy to understand. Especially combined with the complex btrfs backref format. This patch adds some basic comment for the backref build part of the code, making it less hard to read, at least for backref searching part. Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit 4779cc04248deff676c56ff9f3b2c679388a7d5e Author: Omar Sandoval Date: Mon Sep 24 15:16:55 2018 -0700 Btrfs: get rid of btrfs_symlink_aops The only aops we define for symlinks are identical to the aops for regular files. This has been the case since symlink support was added in commit 2b8d99a723a3 ("Btrfs: symlinks and hard links"). As far as I can tell, there wasn't a good reason to have separate aops then, and there isn't now, so let's just do what most other filesystems do and reuse the same structure. Signed-off-by: Omar Sandoval Reviewed-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 7703bdd8d23e6ef057af3253958a793ec6066b28 Author: Chris Mason Date: Wed Jun 20 07:56:11 2018 -0700 Btrfs: don't clean dirty pages during buffered writes During buffered writes, we follow this basic series of steps: again: lock all the pages wait for writeback on all the pages Take the extent range lock wait for ordered extents on the whole range clean all the pages if (copy_from_user_in_atomic() hits a fault) { drop our locks goto again; } dirty all the pages release all the locks The extra waiting, cleaning and locking are there to make sure we don't modify pages in flight to the drive, after they've been crc'd. If some of the pages in the range were already dirty when the write began, and we need to goto again, we create a window where a dirty page has been cleaned and unlocked. It may be reclaimed before we're able to lock it again, which means we'll read the old contents off the drive and lose any modifications that had been pending writeback. We don't actually need to clean the pages. All of the other locking in place makes sure we don't start IO on the pages, so we can just leave them dirty for the duration of the write. Fixes: 73d59314e6ed (the original btrfs merge) CC: stable@vger.kernel.org # v4.4+ Signed-off-by: Chris Mason Reviewed-by: David Sterba Signed-off-by: David Sterba commit 818255feece6e2a432328020d78c8a81a153ce65 Author: David Sterba Date: Fri Sep 21 14:26:34 2018 +0200 btrfs: use common helper instead of open coding a bit test The helper does the same math and we take care about the special case when flags is 0 too. Reviewed-by: Nikolay Borisov Signed-off-by: David Sterba commit 0110a4c43451533de1ea1bbdc57b5d452f9d8b25 Author: Nikolay Borisov Date: Wed Aug 15 10:39:56 2018 +0300 btrfs: refactor __btrfs_run_delayed_refs loop Refactor the delayed refs loop by using the newly introduced btrfs_run_delayed_refs_for_head function. This greatly simplifies __btrfs_run_delayed_refs and makes it more obvious what is happening. We now have 1 loop which iterates the existing delayed_heads and then each selected ref head is processed by the new helper. All existing semantics of the code are preserved so no functional changes. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit e726138676f896146a55a98305665e81d34d038c Author: Nikolay Borisov Date: Wed Aug 15 10:39:55 2018 +0300 btrfs: Factor out loop processing all refs of a head This patch introduces a new helper encompassing the implicit inner loop in __btrfs_run_delayed_refs which processes all the refs for a given head. The code is mostly copy/paste, the only difference is that if we detect a newer reference then -EAGAIN is returned so that callers can react correctly. Also, at the end of the loop the head is relocked and btrfs_merge_delayed_refs is run again to retain the pre-refactoring semantics. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit b1cdbcb53a6edd84d50b72117d49a350575bbe6a Author: Nikolay Borisov Date: Wed Aug 15 10:39:54 2018 +0300 btrfs: Factor out ref head locking code in __btrfs_run_delayed_refs This is in preparation to refactor the giant loop in __btrfs_run_delayed_refs. As a first step define a new function which implements acquiring a reference to a btrfs_delayed_refs_head and use it. No functional changes. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit b2fa11547bc1693a8dd8e7379dd4e43d31f49c50 Author: David Sterba Date: Fri Aug 17 17:48:13 2018 +0200 btrfs: tests: polish ifdefs around testing helper Avoid the inline ifdefs and use two sections for self-tests enabled and disabled. Though there could be no ifdef and unconditional test_bit of BTRFS_FS_STATE_DUMMY_FS_INFO, the static inline can help to optimize out any code that would depend on conditions using btrfs_is_testing. As this is only for the testing code, drop unlikely(). Reviewed-by: Omar Sandoval Signed-off-by: David Sterba commit a654666a3474312ee76aa2bb9744376a46da3307 Author: David Sterba Date: Fri Aug 17 17:44:13 2018 +0200 btrfs: tests: group declarations of self-test helpers Reviewed-by: Omar Sandoval Signed-off-by: David Sterba commit 57ec5fb478a3c27073ebc8f8f47a91eaaa083c13 Author: David Sterba Date: Fri Aug 17 17:38:12 2018 +0200 btrfs: tests: move testing members of struct btrfs_root to the end The data used only for tests are better placed at the end of the structure so that they don't change the structure layout. All new members of btrfs_root should be placed before. Reviewed-by: Omar Sandoval Signed-off-by: David Sterba commit 9c36396c2a788facd4282a2b0646a1c4ac19847a Author: David Sterba Date: Fri Aug 17 17:28:06 2018 +0200 btrfs: tests: add separate stub for find_lock_delalloc_range The helper find_lock_delalloc_range is now conditionally built static, dpending on whether the self-tests are enabled or not. There's a macro that is supposed to hide the export, used only once. To discourage further use, drop it an add a public wrapper for the helper needed by tests. Reviewed-by: Omar Sandoval Signed-off-by: David Sterba commit ecf160b424ee648a14116079ff72d7d1241e377d Author: Liu Bo Date: Thu Aug 23 03:51:53 2018 +0800 Btrfs: preftree: use rb_first_cached rb_first_cached() trades an extra pointer "leftmost" for doing the same job as rb_first() but in O(1). While resolving indirect refs and missing refs, it always looks for the first rb entry in a while loop, it's helpful to use rb_first_cached instead. For more details about the optimization see patch "Btrfs: delayed-refs: use rb_first_cached for href_root". Tested-by: Holger Hoffstätte Signed-off-by: Liu Bo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 07e1ce096db3605f3e0c98695df66a51e2be9f05 Author: Liu Bo Date: Thu Aug 23 03:51:52 2018 +0800 Btrfs: extent_map: use rb_first_cached rb_first_cached() trades an extra pointer "leftmost" for doing the same job as rb_first() but in O(1). As evict_inode_truncate_pages() removes all extent mapping by always looking for the first rb entry, it's helpful to use rb_first_cached instead. For more details about the optimization see patch "Btrfs: delayed-refs: use rb_first_cached for href_root". Tested-by: Holger Hoffstätte Signed-off-by: Liu Bo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 03a1d4c891634dd5b98da865fb783e8b22d4d027 Author: Liu Bo Date: Thu Aug 23 03:51:51 2018 +0800 Btrfs: delayed-inode: use rb_first_cached for ins_root and del_root rb_first_cached() trades an extra pointer "leftmost" for doing the same job as rb_first() but in O(1). Functions manipulating delayed_item need to get the first entry, this converts it to use rb_first_cached(). For more details about the optimization see patch "Btrfs: delayed-refs: use rb_first_cached for href_root". Tested-by: Holger Hoffstätte Signed-off-by: Liu Bo Reviewed-by: David Sterba Signed-off-by: David Sterba commit e3d039656384288bbe952413d8d404b3035fe7d7 Author: Liu Bo Date: Thu Aug 23 03:51:50 2018 +0800 Btrfs: delayed-refs: use rb_first_cached for ref_tree rb_first_cached() trades an extra pointer "leftmost" for doing the same job as rb_first() but in O(1). Functions manipulating href->ref_tree need to get the first entry, this converts href->ref_tree to use rb_first_cached(). For more details about the optimization see patch "Btrfs: delayed-refs: use rb_first_cached for href_root". Tested-by: Holger Hoffstätte Signed-off-by: Liu Bo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 5c9d028b3b174e5cf3678a7b0c14e21e51665793 Author: Liu Bo Date: Thu Aug 23 03:51:49 2018 +0800 Btrfs: delayed-refs: use rb_first_cached for href_root rb_first_cached() trades an extra pointer "leftmost" for doing the same job as rb_first() but in O(1). Functions manipulating href_root need to get the first entry, this converts href_root to use rb_first_cached(). This patch is first in the sequenct of similar updates to other rbtrees and this is analysis of the expected behaviour and improvements. There's a common pattern: while (node = rb_first) { entry = rb_entry(node) next = rb_next(node) rb_erase(node) cleanup(entry) } rb_first needs to traverse the tree up to logN depth, rb_erase can completely reshuffle the tree. With the caching we'll skip the traversal in rb_first. That's a cached memory access vs looped pointer dereference trade-off that IMHO has a clear winner. Measurements show there's not much difference in a sample tree with 10000 nodes: 4.5s / rb_first and 4.8s / rb_first_cached. Real effects of caching and pointer chasing are unpredictable though. Further optimzations can be done to avoid the expensive rb_erase step. In some cases it's ok to process the nodes in any order, so the tree can be traversed in post-order, not rebalancing the children nodes and just calling free. Care must be taken regarding the next node. Tested-by: Holger Hoffstätte Signed-off-by: Liu Bo Reviewed-by: David Sterba [ update changelog from mail discussions ] Signed-off-by: David Sterba commit 3aa7c7a31c26321696b92841d5103461c6f3f517 Author: Josef Bacik Date: Wed Sep 12 10:45:45 2018 -0400 btrfs: wait on caching when putting the bg cache While testing my backport I noticed there was a panic if I ran generic/416 generic/417 generic/418 all in a row. This just happened to uncover a race where we had outstanding IO after we destroy all of our workqueues, and then we'd go to queue the endio work on those free'd workqueues. This is because we aren't waiting for the caching threads to be done before freeing everything up, so to fix this make sure we wait on any outstanding caching that's being done before we free up the block group, so we're sure to be done with all IO by the time we get to btrfs_stop_all_workers(). This fixes the panic I was seeing consistently in testing. ------------[ cut here ]------------ kernel BUG at fs/btrfs/volumes.c:6112! SMP PTI Modules linked in: CPU: 1 PID: 27165 Comm: kworker/u4:7 Not tainted 4.16.0-02155-g3553e54a578d-dirty #875 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.11.0-2.el7 04/01/2014 Workqueue: btrfs-cache btrfs_cache_helper RIP: 0010:btrfs_map_bio+0x346/0x370 RSP: 0000:ffffc900061e79d0 EFLAGS: 00010202 RAX: 0000000000000000 RBX: ffff880071542e00 RCX: 0000000000533000 RDX: ffff88006bb74380 RSI: 0000000000000008 RDI: ffff880078160000 RBP: 0000000000000001 R08: ffff8800781cd200 R09: 0000000000503000 R10: ffff88006cd21200 R11: 0000000000000000 R12: 0000000000000000 R13: 0000000000000000 R14: ffff8800781cd200 R15: ffff880071542e00 FS: 0000000000000000(0000) GS:ffff88007fd00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000000000817ffc4 CR3: 0000000078314000 CR4: 00000000000006e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: btree_submit_bio_hook+0x8a/0xd0 submit_one_bio+0x5d/0x80 read_extent_buffer_pages+0x18a/0x320 btree_read_extent_buffer_pages+0xbc/0x200 ? alloc_extent_buffer+0x359/0x3e0 read_tree_block+0x3d/0x60 read_block_for_search.isra.30+0x1a5/0x360 btrfs_search_slot+0x41b/0xa10 btrfs_next_old_leaf+0x212/0x470 caching_thread+0x323/0x490 normal_work_helper+0xc5/0x310 process_one_work+0x141/0x340 worker_thread+0x44/0x3c0 kthread+0xf8/0x130 ? process_one_work+0x340/0x340 ? kthread_bind+0x10/0x10 ret_from_fork+0x35/0x40 RIP: btrfs_map_bio+0x346/0x370 RSP: ffffc900061e79d0 ---[ end trace 827eb13e50846033 ]--- Kernel panic - not syncing: Fatal exception Kernel Offset: disabled ---[ end Kernel panic - not syncing: Fatal exception CC: stable@vger.kernel.org # 4.4+ Signed-off-by: Josef Bacik Reviewed-by: Omar Sandoval Signed-off-by: David Sterba commit fee7acc361314df6561208c2d3c0882d663dd537 Author: Jeff Mahoney Date: Thu Sep 6 17:18:16 2018 -0400 btrfs: keep trim from interfering with transaction commits Commit 499f377f49f08 (btrfs: iterate over unused chunk space in FITRIM) fixed free space trimming, but introduced latency when it was running. This is due to it pinning the transaction using both a incremented refcount and holding the commit root sem for the duration of a single trim operation. This was to ensure safety but it's unnecessary. We already hold the the chunk mutex so we know that the chunk we're using can't be allocated while we're trimming it. In order to check against chunks allocated already in this transaction, we need to check the pending chunks list. To to that safely without joining the transaction (or attaching than then having to commit it) we need to ensure that the dev root's commit root doesn't change underneath us and the pending chunk lists stays around until we're done with it. We can ensure the former by holding the commit root sem and the latter by pinning the transaction. We do this now, but the critical section covers the trim operation itself and we don't need to do that. This patch moves the pinning and unpinning logic into helpers and unpins the transaction after performing the search and check for pending chunks. Limiting the critical section of the transaction pinning improves the latency substantially on slower storage (e.g. image files over NFS). Fixes: 499f377f49f08 ("btrfs: iterate over unused chunk space in FITRIM") CC: stable@vger.kernel.org # 4.4+ Signed-off-by: Jeff Mahoney Reviewed-by: David Sterba Signed-off-by: David Sterba commit 0be88e367fd8fbdb45257615d691f4675dda062f Author: Jeff Mahoney Date: Thu Sep 6 17:18:15 2018 -0400 btrfs: don't attempt to trim devices that don't support it We check whether any device the file system is using supports discard in the ioctl call, but then we attempt to trim free extents on every device regardless of whether discard is supported. Due to the way we mask off EOPNOTSUPP, we can end up issuing the trim operations on each free range on devices that don't support it, just wasting time. Fixes: 499f377f49f08 ("btrfs: iterate over unused chunk space in FITRIM") CC: stable@vger.kernel.org # 4.4+ Signed-off-by: Jeff Mahoney Reviewed-by: David Sterba Signed-off-by: David Sterba commit d4e329de5e5e21594df2e0dd59da9acee71f133b Author: Jeff Mahoney Date: Thu Sep 6 17:18:14 2018 -0400 btrfs: iterate all devices during trim, instead of fs_devices::alloc_list btrfs_trim_fs iterates over the fs_devices->alloc_list while holding the device_list_mutex. The problem is that ->alloc_list is protected by the chunk mutex. We don't want to hold the chunk mutex over the trim of the entire file system. Fortunately, the ->dev_list list is protected by the dev_list mutex and while it will give us all devices, including read-only devices, we already just skip the read-only devices. Then we can continue to take and release the chunk mutex while scanning each device. Fixes: 499f377f49f ("btrfs: iterate over unused chunk space in FITRIM") CC: stable@vger.kernel.org # 4.4+ Signed-off-by: Jeff Mahoney Reviewed-by: David Sterba Signed-off-by: David Sterba commit 6ba9fc8e628becf0e3ec94083450d089b0dec5f5 Author: Qu Wenruo Date: Fri Sep 7 14:16:24 2018 +0800 btrfs: Ensure btrfs_trim_fs can trim the whole filesystem [BUG] fstrim on some btrfs only trims the unallocated space, not trimming any space in existing block groups. [CAUSE] Before fstrim_range passed to btrfs_trim_fs(), it gets truncated to range [0, super->total_bytes). So later btrfs_trim_fs() will only be able to trim block groups in range [0, super->total_bytes). While for btrfs, any bytenr aligned to sectorsize is valid, since btrfs uses its logical address space, there is nothing limiting the location where we put block groups. For filesystem with frequent balance, it's quite easy to relocate all block groups and bytenr of block groups will start beyond super->total_bytes. In that case, btrfs will not trim existing block groups. [FIX] Just remove the truncation in btrfs_ioctl_fitrim(), so btrfs_trim_fs() can get the unmodified range, which is normally set to [0, U64_MAX]. Reported-by: Chris Murphy Fixes: f4c697e6406d ("btrfs: return EINVAL if start > total_bytes in fitrim ioctl") CC: # v4.4+ Signed-off-by: Qu Wenruo Reviewed-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 93bba24d4b5ad1e5cd8b43f64e66ff9d6355dd20 Author: Qu Wenruo Date: Fri Sep 7 14:16:23 2018 +0800 btrfs: Enhance btrfs_trim_fs function to handle error better Function btrfs_trim_fs() doesn't handle errors in a consistent way. If error happens when trimming existing block groups, it will skip the remaining blocks and continue to trim unallocated space for each device. The return value will only reflect the final error from device trimming. This patch will fix such behavior by: 1) Recording the last error from block group or device trimming The return value will also reflect the last error during trimming. Make developer more aware of the problem. 2) Continuing trimming if possible If we failed to trim one block group or device, we could still try the next block group or device. 3) Report number of failures during block group and device trimming It would be less noisy, but still gives user a brief summary of what's going wrong. Such behavior can avoid confusion for cases like failure to trim the first block group and then only unallocated space is trimmed. Reported-by: Chris Murphy CC: stable@vger.kernel.org # 4.4+ Signed-off-by: Qu Wenruo Reviewed-by: David Sterba [ add bg_ret and dev_ret to the messages ] Signed-off-by: David Sterba commit 5c06147128fbbdf7a84232c5f0d808f53153defe Author: Jeff Mahoney Date: Thu Sep 6 15:52:17 2018 -0400 btrfs: fix error handling in btrfs_dev_replace_start When we fail to start a transaction in btrfs_dev_replace_start, we leave dev_replace->replace_start set to STARTED but clear ->srcdev and ->tgtdev. Later, that can result in an Oops in btrfs_dev_replace_progress when having state set to STARTED or SUSPENDED implies that ->srcdev is valid. Also fix error handling when the state is already STARTED or SUSPENDED while starting. That, too, will clear ->srcdev and ->tgtdev even though it doesn't own them. This should be an impossible case to hit since we should be protected by the BTRFS_FS_EXCL_OP bit being set. Let's add an ASSERT there while we're at it. Fixes: e93c89c1aaaaa (Btrfs: add new sources for device replace code) CC: stable@vger.kernel.org # 4.4+ Signed-off-by: Jeff Mahoney Reviewed-by: David Sterba Signed-off-by: David Sterba commit c1766dd7829802b3a451682234497a8539763bd1 Author: zhong jiang Date: Thu Sep 13 11:01:15 2018 +0800 btrfs: change remove_extent_mapping to return void remove_extent_mapping uses the variable "ret" for return value, but it is not modified after initialzation. Further, I find that any of the callers do not handle the return value and the callees are only simple functions so the return values does not need to be passed. Signed-off-by: zhong jiang Reviewed-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 315bed43fea532650933e7bba316a7601d439edf Author: Nikolay Borisov Date: Thu Sep 13 11:35:10 2018 +0300 btrfs: handle error of get_old_root In btrfs_search_old_slot get_old_root is always used with the assumption it cannot fail. However, this is not true in rare circumstance it can fail and return null. This will lead to null point dereference when the header is read. Fix this by checking the return value and properly handling NULL by setting ret to -EIO and returning gracefully. Coverity-id: 1087503 Signed-off-by: Nikolay Borisov Reviewed-by: Lu Fengqi Reviewed-by: David Sterba Signed-off-by: David Sterba commit 28bee489828ca7da9f9a0247a3fbe695fc0df6b4 Author: Nikolay Borisov Date: Thu Sep 13 11:35:00 2018 +0300 btrfs: Remove logically dead code from btrfs_orphan_cleanup In btrfs_orphan_cleanup the final 'if (ret) goto out' cannot ever be executed. This is due to the last assignment to 'ret' depending on the return value of btrfs_iget. If an error other than -ENOENT is returned then the loop is prematurely terminated by 'goto out'. On the other hand, if the error value is ENOENT then a subsequent if branch is executed that always re-assigns 'ret' and in case it's an error just terminates the loop. No functional changes. Coverity-id: 1437392 Signed-off-by: Nikolay Borisov Reviewed-by: Lu Fengqi Reviewed-by: David Sterba Signed-off-by: David Sterba commit 4183c52ce8871544ea94054ee47c685ecae714f6 Author: Liu Bo Date: Wed Sep 12 06:06:22 2018 +0800 Btrfs: remove wait_ordered_range in btrfs_evict_inode When we delete an inode, btrfs_evict_inode() { truncate_inode_pages_final() truncate_inode_pages_range() lock_page() truncate_cleanup_page() btrfs_invalidatepage() wait_on_page_writeback btrfs_lookup_ordered_range() cancel_dirty_page() unlock_page() ... btrfs_wait_ordered_range() ... As VFS has called ->invalidatepage() to get all ordered extents done (if there are any) and truncated all page cache pages (no dirty pages to writeback after this step), wait_ordered_range() is just a noop. Signed-off-by: Liu Bo Reviewed-by: David Sterba Signed-off-by: David Sterba commit abb57ef3ff9720c42bbc06bcd1788da9ce1a3eb8 Author: Liu Bo Date: Fri Sep 14 01:44:42 2018 +0800 Btrfs: skip set_page_dirty if eb pages are already dirty As long as @eb is marked with EXTENT_BUFFER_DIRTY, all of its pages are dirty, so no need to set pages dirty again. Ftrace showed that the loop took 10us on my dev box, so removing this can save us at least 10us if eb is already dirty and otherwise avoid a potentially expensive calls to set_page_dirty. Signed-off-by: Liu Bo Reviewed-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 51995c399b73dacb9d84375ad5a8fda3aced03ab Author: Liu Bo Date: Fri Sep 14 01:46:08 2018 +0800 Btrfs: assert page dirty bit on extent buffer pages Just in case that someone breaks the rule that pages are dirty as long as eb is dirty. The next patch will dirty the pages conditionally. Signed-off-by: Liu Bo Reviewed-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 98e6b1eb4022f2eb9845f0da5f16c179e5f32b9f Author: Liu Bo Date: Wed Sep 12 06:06:23 2018 +0800 Btrfs: remove unnecessary level check in balance_level In the callchain: btrfs_search_slot() if (level != 0) setup_nodes_for_search() balance_level() It is just impossible to have level=0 in balance_level, we can drop the check. Signed-off-by: Liu Bo Reviewed-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 3cf5068f3d068d788871b0da1a0348048e68b9d6 Author: Liu Bo Date: Wed Sep 12 06:06:26 2018 +0800 Btrfs: unify error handling of btrfs_lookup_dir_item Unify the error handling of directory item lookups using IS_ERR_OR_NULL. No functional changes. Signed-off-by: Liu Bo Reviewed-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 3b2fd8016069de59f73caca06f7ad60c25f3eb92 Author: Liu Bo Date: Sat Sep 8 04:41:40 2018 +0800 Btrfs: use args in the correct order for kcalloc in btrfsic_read_block kcalloc is defined as: kcalloc(size_t n, size_t size, gfp_t flags) Although this won't cause problems in practice, btrfsic_read_block() uses kcalloc with n and size in the opposite order. Reviewed-by: Omar Sandoval Signed-off-by: Liu Bo Reviewed-by: David Sterba Signed-off-by: David Sterba commit a27a94c2b0c727517c17cf2ca3a9f7291caadfbc Author: Nikolay Borisov Date: Mon Sep 3 12:46:14 2018 +0300 btrfs: Make btrfs_find_device_by_devspec return btrfs_device directly Instead of returning an error value and using one of the parameters for returning the actual object we are interested in just refactor the function to directly return btrfs_device *. Also bubble up the error handling for the special BTRFS_ERROR_DEV_MISSING_NOT_FOUND value into btrfs_rm_device. No functional changes. Signed-off-by: Nikolay Borisov Reviewed-by: Qu Wenruo Signed-off-by: David Sterba commit 6c05040702e7793e8ee63bb8384ac2f9235c926e Author: Nikolay Borisov Date: Mon Sep 3 12:46:13 2018 +0300 btrfs: Make btrfs_find_device_missing_or_by_path return directly a device This function returns a numeric error value and additionally the device found in one of its input parameters. Simplify this by making the function directly return a pointer to btrfs_device. Additionally adjust the caller to handle the case when we want to remove the 'missing' device and ENOENT is returned to return the expected positive error value, parsed by progs. Finally, unexport the function since it's not called outside of volume.c. No functional changes. Signed-off-by: Nikolay Borisov Reviewed-by: Qu Wenruo Signed-off-by: David Sterba commit b444ad46b2db4f8c682c99ffb994e532a4713012 Author: Nikolay Borisov Date: Mon Sep 3 12:46:12 2018 +0300 btrfs: Make btrfs_find_device_by_path return struct btrfs_device Currently this function returns an error code as well as uses one of its arguments as a return value for struct btrfs_device. Change the function so that it returns btrfs_device directly and use the usual "encode error in pointer" mechanics if something goes wrong. No functional changes. Signed-off-by: Nikolay Borisov Reviewed-by: Qu Wenruo Signed-off-by: David Sterba commit 374b0e2d6ba5da7fd1cadb3247731ff27d011f6f Author: Jeff Mahoney Date: Thu Sep 6 16:59:33 2018 -0400 btrfs: fix error handling in free_log_tree When we hit an I/O error in free_log_tree->walk_log_tree during file system shutdown we can crash due to there not being a valid transaction handle. Use btrfs_handle_fs_error when there's no transaction handle to use. BUG: unable to handle kernel NULL pointer dereference at 0000000000000060 IP: free_log_tree+0xd2/0x140 [btrfs] PGD 0 P4D 0 Oops: 0000 [#1] SMP DEBUG_PAGEALLOC PTI Modules linked in: CPU: 2 PID: 23544 Comm: umount Tainted: G W 4.12.14-kvmsmall #9 SLE15 (unreleased) Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.0.0-prebuilt.qemu-project.org 04/01/2014 task: ffff96bfd3478880 task.stack: ffffa7cf40d78000 RIP: 0010:free_log_tree+0xd2/0x140 [btrfs] RSP: 0018:ffffa7cf40d7bd10 EFLAGS: 00010282 RAX: 00000000fffffffb RBX: 00000000fffffffb RCX: 0000000000000002 RDX: 0000000000000000 RSI: ffff96c02f07d4c8 RDI: 0000000000000282 RBP: ffff96c013cf1000 R08: ffff96c02f07d4c8 R09: ffff96c02f07d4d0 R10: 0000000000000000 R11: 0000000000000002 R12: 0000000000000000 R13: ffff96c005e800c0 R14: ffffa7cf40d7bdb8 R15: 0000000000000000 FS: 00007f17856bcfc0(0000) GS:ffff96c03f600000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000060 CR3: 0000000045ed6002 CR4: 00000000003606e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: ? wait_for_writer+0xb0/0xb0 [btrfs] btrfs_free_log+0x17/0x30 [btrfs] btrfs_drop_and_free_fs_root+0x9a/0xe0 [btrfs] btrfs_free_fs_roots+0xc0/0x130 [btrfs] ? wait_for_completion+0xf2/0x100 close_ctree+0xea/0x2e0 [btrfs] ? kthread_stop+0x161/0x260 generic_shutdown_super+0x6c/0x120 kill_anon_super+0xe/0x20 btrfs_kill_super+0x13/0x100 [btrfs] deactivate_locked_super+0x3f/0x70 cleanup_mnt+0x3b/0x70 task_work_run+0x78/0x90 exit_to_usermode_loop+0x77/0xa6 do_syscall_64+0x1c5/0x1e0 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RIP: 0033:0x7f1784f90827 RSP: 002b:00007ffdeeb03118 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 0000556a60c62970 RCX: 00007f1784f90827 RDX: 0000000000000001 RSI: 0000000000000000 RDI: 0000556a60c62b50 RBP: 0000000000000000 R08: 0000000000000005 R09: 00000000ffffffff R10: 0000556a60c63900 R11: 0000000000000246 R12: 0000556a60c62b50 R13: 00007f17854a81c4 R14: 0000000000000000 R15: 0000000000000000 RIP: free_log_tree+0xd2/0x140 [btrfs] RSP: ffffa7cf40d7bd10 CR2: 0000000000000060 Fixes: 681ae50917df9 ("Btrfs: cleanup reserved space when freeing tree log on error") CC: # v3.13 Signed-off-by: Jeff Mahoney Reviewed-by: David Sterba Signed-off-by: David Sterba commit 380fd06640a7afe972e45310012c3e22d9c4783d Author: Misono Tomohiro Date: Thu Aug 30 10:59:16 2018 +0900 btrfs: remove redundant variable from btrfs_cross_ref_exist Since commit d7df2c796d7e ("Btrfs attach delayed ref updates to delayed ref heads"), check_delayed_ref() won't return -ENOENT. In btrfs_cross_ref_exist(), two variables 'ret' and 'ret2' are originally used to handle -ENOENT error case. Since the code is not needed anymore, let's just remove 'ret2'. Signed-off-by: Misono Tomohiro Reviewed-by: David Sterba Signed-off-by: David Sterba commit e49aabd973fd0b3e8e949bd9e7e05acbb9008244 Author: Liu Bo Date: Sat Aug 25 13:47:09 2018 +0800 Btrfs: set leave_spinning in btrfs_get_extent Unless it's going to read inline extents from btree leaf to page, btrfs_get_extent won't sleep during the period of holding path lock. This sets leave_spinning at first and sets path to blocking mode right before reading inline extent if that's the case. The benefit is that a path in spinning mode typically has lower impact (faster) on waiters rather than that in the blocking mode. Signed-off-by: Liu Bo Reviewed-by: David Sterba Signed-off-by: David Sterba commit de2c6615dcddf2af868c5cbd1db2e9e73b4beb58 Author: Liu Bo Date: Sat Aug 25 13:47:59 2018 +0800 Btrfs: fix alignment in declaration and prototype of btrfs_get_extent This fixes btrfs_get_extent to be consistent with our existing declaration style. Note: For the record, indentation styles that are accepted are both, aligning under the opening ( and tab or double tab indentation on the next line. Preferrably not spliting the type or long expressions in the argument lists. Signed-off-by: Liu Bo [ add note ] Signed-off-by: David Sterba commit 29c5e5d4966d8d56e18e008da01108167d8d6fd1 Author: Colin Ian King Date: Tue Aug 28 14:21:01 2018 +0100 btrfs: remove unused pointer 'tree' in btrfs_submit_compressed_read Pointer 'tree' is being assigned but is never used hence it is redundant and can be removed. This is a leftover from cleanup patch 00032d38eaa89c76de7 ("btrfs: drop extent_io_ops::merge_bio_hook callback"). Cleans up clang warning: warning: variable 'tree' set but not used [-Wunused-but-set-variable] Signed-off-by: Colin Ian King Reviewed-by: David Sterba Signed-off-by: David Sterba commit d005dbeca0814551ed243fc2d51480d0cd925d67 Author: Colin Ian King Date: Tue Aug 28 11:45:21 2018 +0100 btrfs: remove unused pointer inode in relink_file_extents Pointer inode is being assigned but is never used hence it is redundant and can be removed. It's been unused since the introduction in 38c227d87c49a ("Btrfs: snapshot-aware defrag"). Cleans up clang warning: variable ‘inode’ set but not used [-Wunused-but-set-variable] Signed-off-by: Colin Ian King Reviewed-by: David Sterba Signed-off-by: David Sterba commit 28c4a3e21ad030d7571ee9b1b246a5cbfd886627 Author: Su Yue Date: Wed Sep 5 11:07:33 2018 +0800 btrfs: defrag: use btrfs_mod_outstanding_extents in cluster_pages_for_defrag Since commit 8b62f87bad9c ("Btrfs: rework outstanding_extents"), manual operations of outstanding_extent in btrfs_inode are replaced by btrfs_mod_outstanding_extents(). The one in cluster_pages_for_defrag seems to be lost, so replace it of btrfs_mod_outstanding_extents(). Fixes: 8b62f87bad9c ("Btrfs: rework outstanding_extents") Signed-off-by: Su Yue Reviewed-by: David Sterba Signed-off-by: David Sterba commit 6aadd9eb74877a004687a5f70ec20797e5b03c5a Author: Liu Bo Date: Wed Sep 5 09:55:27 2018 +0800 Btrfs: remove confusing tracepoint in btrfs_add_reserved_bytes Here we're not releasing any space, but transferring bytes from ->bytes_may_use to ->bytes_reserved. The last change to the code in commit 18513091af9483ba8 ("btrfs: update btrfs_space_info's bytes_may_use timely") removed a conditional tracepoint and the logic changed too but the tracepiont remained. Signed-off-by: Liu Bo Reviewed-by: Nikolay Borisov Reviewed-by: David Sterba [ update changelog ] Signed-off-by: David Sterba commit c64142807f5a4dcff5c69bfb0868df844b2e87c7 Author: Liu Bo Date: Thu Aug 23 07:36:17 2018 +0800 btrfs: free path at an earlier point in btrfs_get_extent trace_btrfs_get_extent() has nothing to do with path, place btrfs_free_path ahead so that we can unlock path on error. Signed-off-by: Liu Bo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 9688e9a99e4b2d60d78fbaa270e7e0c70d90f6c2 Author: Liu Bo Date: Thu Aug 23 03:14:53 2018 +0800 Btrfs: use next_state in find_first_extent_bit As next_state() is already defined to get the next state, use it in find_first_extent_bit. No functional changes. Signed-off-by: Liu Bo Reviewed-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit b72c3aba09a53fc7c1824250d71180ca154517a7 Author: Qu Wenruo Date: Tue Aug 21 09:53:47 2018 +0800 btrfs: locking: Add extra check in btrfs_init_new_buffer() to avoid deadlock [BUG] For certain crafted image, whose csum root leaf has missing backref, if we try to trigger write with data csum, it could cause deadlock with the following kernel WARN_ON(): WARNING: CPU: 1 PID: 41 at fs/btrfs/locking.c:230 btrfs_tree_lock+0x3e2/0x400 CPU: 1 PID: 41 Comm: kworker/u4:1 Not tainted 4.18.0-rc1+ #8 Workqueue: btrfs-endio-write btrfs_endio_write_helper RIP: 0010:btrfs_tree_lock+0x3e2/0x400 Call Trace: btrfs_alloc_tree_block+0x39f/0x770 __btrfs_cow_block+0x285/0x9e0 btrfs_cow_block+0x191/0x2e0 btrfs_search_slot+0x492/0x1160 btrfs_lookup_csum+0xec/0x280 btrfs_csum_file_blocks+0x2be/0xa60 add_pending_csums+0xaf/0xf0 btrfs_finish_ordered_io+0x74b/0xc90 finish_ordered_fn+0x15/0x20 normal_work_helper+0xf6/0x500 btrfs_endio_write_helper+0x12/0x20 process_one_work+0x302/0x770 worker_thread+0x81/0x6d0 kthread+0x180/0x1d0 ret_from_fork+0x35/0x40 [CAUSE] That crafted image has missing backref for csum tree root leaf. And when we try to allocate new tree block, since there is no EXTENT/METADATA_ITEM for csum tree root, btrfs consider it's free slot and use it. The extent tree of the image looks like: Normal image | This fuzzed image ----------------------------------+-------------------------------- BG 29360128 | BG 29360128 One empty slot | One empty slot 29364224: backref to UUID tree | 29364224: backref to UUID tree Two empty slots | Two empty slots 29376512: backref to CSUM tree | One empty slot (bad type) <<< 29380608: backref to D_RELOC tree | 29380608: backref to D_RELOC tree ... | ... Since bytenr 29376512 has no METADATA/EXTENT_ITEM, when btrfs try to alloc tree block, it's an valid slot for btrfs. And for finish_ordered_write, when we need to insert csum, we try to CoW csum tree root. By accident, empty slots at bytenr BG_OFFSET, BG_OFFSET + 8K, BG_OFFSET + 12K is already used by tree block COW for other trees, the next empty slot is BG_OFFSET + 16K, which should be the backref for CSUM tree. But due to the bad type, btrfs can recognize it and still consider it as an empty slot, and will try to use it for csum tree CoW. Then in the following call trace, we will try to lock the new tree block, which turns out to be the old csum tree root which is already locked: btrfs_search_slot() called on csum tree root, which is at 29376512 |- btrfs_cow_block() |- btrfs_set_lock_block() | |- Now locks tree block 29376512 (old csum tree root) |- __btrfs_cow_block() |- btrfs_alloc_tree_block() |- btrfs_reserve_extent() | Now it returns tree block 29376512, which extent tree | shows its empty slot, but it's already hold by csum tree |- btrfs_init_new_buffer() |- btrfs_tree_lock() | Triggers WARN_ON(eb->lock_owner == current->pid) |- wait_event() Wait lock owner to release the lock, but it's locked by ourself, so it will deadlock [FIX] This patch will do the lock_owner and current->pid check at btrfs_init_new_buffer(). So above deadlock can be avoided. Since such problem can only happen in crafted image, we will still trigger kernel warning for later aborted transaction, but with a little more meaningful warning message. Link: https://bugzilla.kernel.org/show_bug.cgi?id=200405 Reported-by: Xu Wen CC: stable@vger.kernel.org # 4.4+ Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 65c6e82becec33731f48786e5a30f98662c86b16 Author: Qu Wenruo Date: Tue Aug 21 09:42:03 2018 +0800 btrfs: Handle owner mismatch gracefully when walking up tree [BUG] When mounting certain crafted image, btrfs will trigger kernel BUG_ON() when trying to recover balance: kernel BUG at fs/btrfs/extent-tree.c:8956! invalid opcode: 0000 [#1] PREEMPT SMP NOPTI CPU: 1 PID: 662 Comm: mount Not tainted 4.18.0-rc1-custom+ #10 RIP: 0010:walk_up_proc+0x336/0x480 [btrfs] RSP: 0018:ffffb53540c9b890 EFLAGS: 00010202 Call Trace: walk_up_tree+0x172/0x1f0 [btrfs] btrfs_drop_snapshot+0x3a4/0x830 [btrfs] merge_reloc_roots+0xe1/0x1d0 [btrfs] btrfs_recover_relocation+0x3ea/0x420 [btrfs] open_ctree+0x1af3/0x1dd0 [btrfs] btrfs_mount_root+0x66b/0x740 [btrfs] mount_fs+0x3b/0x16a vfs_kern_mount.part.9+0x54/0x140 btrfs_mount+0x16d/0x890 [btrfs] mount_fs+0x3b/0x16a vfs_kern_mount.part.9+0x54/0x140 do_mount+0x1fd/0xda0 ksys_mount+0xba/0xd0 __x64_sys_mount+0x21/0x30 do_syscall_64+0x60/0x210 entry_SYSCALL_64_after_hwframe+0x49/0xbe [CAUSE] Extent tree corruption. In this particular case, reloc tree root's owner is DATA_RELOC_TREE (should be TREE_RELOC), thus its backref is corrupted and we failed the owner check in walk_up_tree(). [FIX] It's pretty hard to take care of every extent tree corruption, but at least we can remove such BUG_ON() and exit more gracefully. And since in this particular image, DATA_RELOC_TREE and TREE_RELOC share the same root (which is obviously invalid), we needs to make __del_reloc_root() more robust to detect such invalid sharing to avoid possible NULL dereference as root->node can be NULL in this case. Link: https://bugzilla.kernel.org/show_bug.cgi?id=200411 Reported-by: Xu Wen CC: stable@vger.kernel.org # 4.4+ Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 45128b08f74131753a10a584e3e5c4496b279269 Author: zhong jiang Date: Fri Aug 17 00:37:15 2018 +0800 btrfs: change btrfs_pin_log_trans to return void btrfs_pin_log_trans defines the variable "ret" for return value, but it is not modified after initialization. Further, I find that none of the callers do handles the return value, so it is safe to drop the unneeded "ret" and make it return void. Signed-off-by: zhong jiang Reviewed-by: David Sterba Signed-off-by: David Sterba commit 556f3ca88ecb7087e7e3144e429414c60a300984 Author: zhong jiang Date: Fri Aug 17 00:37:14 2018 +0800 btrfs: change btrfs_free_reserved_bytes to return void btrfs_free_reserved_bytes uses the variable "ret" for return value, but it is not modified after initialzation. Further, I find that any of the callers do not handle the return value, so it is safe to drop the unneeded "ret" and return void. There are no callees that would need the function to handle or pass the value either. Signed-off-by: zhong jiang Reviewed-by: David Sterba [ update changelog ] Signed-off-by: David Sterba commit bee6ec822a6a686d1b8ac65298b07765a48aefad Author: Liu Bo Date: Fri Aug 17 05:05:28 2018 +0800 Btrfs: remove always true if branch in btrfs_get_extent @path is always NULL when it comes to the if branch. Signed-off-by: Liu Bo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 9c7b0c2e8dbfbcd80a71e2cbfe02704f26c185c6 Author: Qu Wenruo Date: Fri Aug 10 10:20:26 2018 +0800 btrfs: qgroup: Dirty all qgroups before rescan [BUG] In the following case, rescan won't zero out the number of qgroup 1/0: $ mkfs.btrfs -fq $DEV $ mount $DEV /mnt $ btrfs quota enable /mnt $ btrfs qgroup create 1/0 /mnt $ btrfs sub create /mnt/sub $ btrfs qgroup assign 0/257 1/0 /mnt $ dd if=/dev/urandom of=/mnt/sub/file bs=1k count=1000 $ btrfs sub snap /mnt/sub /mnt/snap $ btrfs quota rescan -w /mnt $ btrfs qgroup show -pcre /mnt qgroupid rfer excl max_rfer max_excl parent child -------- ---- ---- -------- -------- ------ ----- 0/5 16.00KiB 16.00KiB none none --- --- 0/257 1016.00KiB 16.00KiB none none 1/0 --- 0/258 1016.00KiB 16.00KiB none none --- --- 1/0 1016.00KiB 16.00KiB none none --- 0/257 So far so good, but: $ btrfs qgroup remove 0/257 1/0 /mnt WARNING: quotas may be inconsistent, rescan needed $ btrfs quota rescan -w /mnt $ btrfs qgroup show -pcre /mnt qgoupid rfer excl max_rfer max_excl parent child -------- ---- ---- -------- -------- ------ ----- 0/5 16.00KiB 16.00KiB none none --- --- 0/257 1016.00KiB 16.00KiB none none --- --- 0/258 1016.00KiB 16.00KiB none none --- --- 1/0 1016.00KiB 16.00KiB none none --- --- ^^^^^^^^^^ ^^^^^^^^ not cleared [CAUSE] Before rescan we call qgroup_rescan_zero_tracking() to zero out all qgroups' accounting numbers. However we don't mark all qgroups dirty, but rely on rescan to do so. If we have any high level qgroup without children, it won't be marked dirty during rescan, since we cannot reach that qgroup. This will cause QGROUP_INFO items of childless qgroups never get updated in the quota tree, thus their numbers will stay the same in "btrfs qgroup show" output. [FIX] Just mark all qgroups dirty in qgroup_rescan_zero_tracking(), so even if we have childless qgroups, their QGROUP_INFO items will still get updated during rescan. Reported-by: Misono Tomohiro CC: stable@vger.kernel.org # 4.4+ Signed-off-by: Qu Wenruo Reviewed-by: Misono Tomohiro Tested-by: Misono Tomohiro Signed-off-by: David Sterba commit 32934280967d00dc2b5c4d3b63b21a9c8638326e Author: Omar Sandoval Date: Tue Aug 14 11:09:52 2018 -0700 Btrfs: clean up scrub is_dev_replace parameter struct scrub_ctx has an ->is_dev_replace member, so there's no point in passing around is_dev_replace where sctx is available. Signed-off-by: Omar Sandoval Signed-off-by: David Sterba commit 1da739678e0b7a764a0f1ef46886f919f19f6446 Author: Anand Jain Date: Fri Aug 10 13:53:21 2018 +0800 btrfs: add helper to obtain number of devices with ongoing dev-replace When the replace is running the fs_devices::num_devices also includes the replaced device, however in some operations like device delete and balance it needs the actual num_devices without the repalced devices. The function btrfs_num_devices() just provides that. And here is a scenario how balance and repalce items could co-exist: Consider balance is started and paused, now start the replace followed by a unmount or system power-cycle. During following mount, the open_ctree() first restarts the balance so it must check for the device replace otherwise our num_devices calculation will be wrong. Signed-off-by: Anand Jain Reviewed-by: David Sterba [ update changelog ] Signed-off-by: David Sterba commit 16220c467ad34c8f103566a79ac047ed391f51f2 Author: Anand Jain Date: Fri Aug 10 13:53:20 2018 +0800 btrfs: add assertions where number of devices could go below 0 In preparation to add helper function to deduce the num_devices with replace running, use assert instead of BUG_ON or WARN_ON. The number of devices would not normally drop to 0 due to other checks so the assert is sufficient. Signed-off-by: Anand Jain Reviewed-by: David Sterba [ update changelog, adjust the assert condition ] Signed-off-by: David Sterba commit f8b00e0f06e54efed0dc919518841ad0dd2199cd Author: zhong jiang Date: Mon Aug 13 14:06:08 2018 +0800 btrfs: remove unneeded NULL checks before kfree Kfree has taken the NULL pointer into account. So remove the check before kfree. The issue is detected with the help of Coccinelle. Signed-off-by: zhong jiang Reviewed-by: Nikolay Borisov Signed-off-by: David Sterba commit 4b6f8e9695da65e29f9f8ee84b39e0ba5b45e8e9 Author: Liu Bo Date: Tue Aug 14 10:46:53 2018 +0800 Btrfs: do not unnecessarily pass write_lock_level when processing leaf As we're going to return right after the call, it's not necessary to get update the new write_lock_level from unlock_up. Signed-off-by: Liu Bo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 4fd786e6c3d67b1348e0ad4f450efe9fc9d7a306 Author: Misono Tomohiro Date: Mon Aug 6 14:25:24 2018 +0900 btrfs: Remove 'objectid' member from struct btrfs_root There are two members in struct btrfs_root which indicate root's objectid: objectid and root_key.objectid. They are both set to the same value in __setup_root(): static void __setup_root(struct btrfs_root *root, struct btrfs_fs_info *fs_info, u64 objectid) { ... root->objectid = objectid; ... root->root_key.objectid = objecitd; ... } and not changed to other value after initialization. grep in btrfs directory shows both are used in many places: $ grep -rI "root->root_key.objectid" | wc -l 133 $ grep -rI "root->objectid" | wc -l 55 (4.17, inc. some noise) It is confusing to have two similar variable names and it seems that there is no rule about which should be used in a certain case. Since ->root_key itself is needed for tree reloc tree, let's remove 'objecitd' member and unify code to use ->root_key.objectid in all places. Signed-off-by: Misono Tomohiro Reviewed-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 5a2cb25ab9da5046f10e773c9ecfdb3339f3dd7c Author: Lu Fengqi Date: Sat Aug 4 21:10:56 2018 +0800 btrfs: remove a useless return statement in btrfs_block_rsv_add Since ret must be 0 here, don't have to return. No functional change and code readability is not hurt. Signed-off-by: Lu Fengqi Reviewed-by: David Sterba Signed-off-by: David Sterba commit 684572df940181b070760bf027a6ded6b7b55c3d Author: Lu Fengqi Date: Sat Aug 4 21:10:57 2018 +0800 btrfs: Remove root parameter from btrfs_insert_dir_item All callers pass the root tree of dir, we can push that down to the function itself. Signed-off-by: Lu Fengqi Reviewed-by: David Sterba Signed-off-by: David Sterba commit 3a58417486ca99a3bfef40e309f38adb45a5171d Author: Lu Fengqi Date: Sat Aug 4 21:10:55 2018 +0800 btrfs: switch update_size to bool in btrfs_block_rsv_migrate and btrfs_rsv_add_bytes Using true and false here is closer to the expected semantic than using 0 and 1. No functional change. Signed-off-by: Lu Fengqi Reviewed-by: David Sterba Signed-off-by: David Sterba commit a7176f74fa570c83a48e66435b77651ad8fc5aee Author: Lu Fengqi Date: Sat Aug 4 21:10:53 2018 +0800 btrfs: simplify the send_in_progress check in btrfs_delete_subvolume Only when send_in_progress, we have to do something different such as btrfs_warn() and return -EPERM. Therefore, we could check send_in_progress first and process error handling, after the root_item_lock has been got. Just for better readability. No functional change. Signed-off-by: Lu Fengqi Reviewed-by: David Sterba Signed-off-by: David Sterba commit bbf2f71e061a47e57e2c61abe406f2348be5058e Author: Michael Straube Date: Sun Oct 14 21:09:33 2018 +0200 staging: rtl8188eu: cleanup comparsions to false Cleanup remaining comparsions to false. if(x == false) -> if(!x) Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit c2aed5648fe02324f8a4567bb611c289202d9f07 Author: Nick Ewalt Date: Sun Oct 14 21:59:27 2018 -0700 staging: gasket: Update device virtual address comment Add that number of page table entries and extended address bit offset are configurable. Update example virtual address format to be more consistent with typical usage. Signed-off-by: Nick Ewalt Signed-off-by: Todd Poynor Signed-off-by: Greg Kroah-Hartman commit df5f470de0f5b57e9a169253a800bb4a69e4d742 Author: Nick Ewalt Date: Sun Oct 14 21:59:26 2018 -0700 staging: gasket: sysfs: fix attribute release comment Comments for gasket_sysfs_get_attr() incorrectly describe reference release procedure. Signed-off-by: Nick Ewalt Signed-off-by: Todd Poynor Signed-off-by: Greg Kroah-Hartman commit 9edcf710ab0f58d4ab47a7f9aba5dbc9ad0c7900 Author: Nick Ewalt Date: Sun Oct 14 21:59:25 2018 -0700 staging: gasket: apex: fix sysfs_show sysfs_show was incorrectly extracting the sysfs_attribute_type from the gasket_sysfs_attribute. This prevented dispatch from working properly. Signed-off-by: Nick Ewalt Signed-off-by: Todd Poynor Signed-off-by: Greg Kroah-Hartman commit 4a966fa24a5a7e236db8ac1e58e04107db1c1930 Author: Nick Ewalt Date: Sun Oct 14 21:59:24 2018 -0700 staging: gasket: page_table: simplify gasket_components_to_dev_address Refactor gasket_components_to_dev_address to be faster and easier to understand. The old implementation was unnecessarily complex and masked the page_index for simple addresses but not extended ones. It makes the most sense for this function to perform no such masking. Signed-off-by: Nick Ewalt Signed-off-by: Todd Poynor Signed-off-by: Greg Kroah-Hartman commit bae54fb8121da9d52cd6919758defb24639901cf Author: Nick Ewalt Date: Sun Oct 14 21:59:23 2018 -0700 staging: gasket: page_table: fix comment in components_to_dev_address Comments in components_to_dev_address() describing examples are inconsistent, fix these to be accurate. Signed-off-by: Nick Ewalt Signed-off-by: Todd Poynor Signed-off-by: Greg Kroah-Hartman commit 54be7ec98875e3061e6ae788d6e7088cffa5ed2e Author: Nick Ewalt Date: Sun Oct 14 21:59:22 2018 -0700 staging: gasket: page table: fixup error path allocating coherent mem Correctly clean up data structure state in gasket_alloc_coherent_memory error path, to ensure no double free on the stale pointer value. Signed-off-by: Nick Ewalt Signed-off-by: Todd Poynor Signed-off-by: Greg Kroah-Hartman commit 53f8a81d465b10aabaf6e0ffc99e7ea2c25bef5a Author: Nick Ewalt Date: Sun Oct 14 21:59:21 2018 -0700 staging: gasket: page_table: rearrange gasket_page_table_entry Rearrange gasket_page_table entry to reduce padding slop. Signed-off-by: Nick Ewalt Signed-off-by: Todd Poynor Signed-off-by: Greg Kroah-Hartman commit efa5dcfa8f9ded669da15e29e69e13f56b6bb524 Author: Nick Ewalt Date: Sun Oct 14 21:59:20 2018 -0700 staging: gasket: page_table: remove unnecessary PTE status set to free Remove unnecessary ptes[i].status update in gasket_perform_unmapping. The vaaue will be cleared in the following memset. Signed-off-by: Nick Ewalt Signed-off-by: Todd Poynor Signed-off-by: Greg Kroah-Hartman commit 02d37186331d389bb19257e330c1ed47afe178ba Author: Todd Poynor Date: Sun Oct 14 21:59:19 2018 -0700 staging: gasket: page table: remove dead code in coherent mem alloc gasket_alloc_coherent_memory() has some unnecessary code related to out of memory checking that will never hit the condition checked, remove. Signed-off-by: Todd Poynor Signed-off-by: Greg Kroah-Hartman commit b1004491c9c2a62a8ca4d939e35b3c21abc8f28a Author: Todd Poynor Date: Sun Oct 14 21:59:18 2018 -0700 staging: gasket: page table: return valid error code on map fail Return -EINVAL on mapping failures, instead of -1, which triggers a checkpatch error. Signed-off-by: Todd Poynor Signed-off-by: Greg Kroah-Hartman commit 9c9f1ddee729846506b5d671ef5084f6e16dd1d1 Author: Janusz Krzysztofik Date: Fri Oct 12 21:09:01 2018 +0200 mmc: pwrseq_simple: Fix incorrect handling of GPIO bitmap Commit b9762bebc633 ("gpiolib: Pass bitmaps, not integer arrays, to get/set array") changed the way GPIO values are passed to gpiod_get/set_array_value() and friends. The new code introduced into mmc_pwrseq_simple_set_gpios_value() incorrectly interpretes the 'value' argument as a bitmap of GPIO values and assigns it directly to the 'values' bitmap variable passed to gpiod_set_array_value_cansleep() instead of filling that bitmap with bits equal to the 'value' argument. As a result, only member 0 of the array is handled correctly. Moreover, wrong assumption is taken about the 'values' bitmap size not exceding the number of bits of the 'value' argument type. Fix it. Signed-off-by: Janusz Krzysztofik Tested-by: Marek Szyprowski Acked-by: Ulf Hansson Signed-off-by: Linus Walleij commit a7c0b4b80f02d748031c785e30d380cfa7fd41ee Author: Randy Dunlap Date: Fri Oct 12 20:46:29 2018 -0700 gpio: fix SNPS_CREG kconfig dependency warning Fix kconfig warning for GPIO_SNPS_CREG: WARNING: unmet direct dependencies detected for OF_GPIO Depends on [n]: GPIOLIB [=y] && OF [=n] && HAS_IOMEM [=y] Selected by [y]: - GPIO_SNPS_CREG [=y] && GPIOLIB [=y] && HAS_IOMEM [=y] && (ARC || COMPILE_TEST [=y]) Drivers in drivers/gpio/Kconfig depend on OF_GPIO, not select it. This prevents attempting to build when OF is not enabled. Signed-off-by: Randy Dunlap Cc: Linus Walleij Cc: linux-gpio@vger.kernel.org Cc: Eugeniy Paltsev Signed-off-by: Linus Walleij commit 202dc3cc10b4d37e5251431acf8d5040a8876c7d Author: Geert Uytterhoeven Date: Tue Oct 9 19:41:58 2018 +0200 serial: sh-sci: Fix receive on SCIFA/SCIFB variants with DMA On SCIFA and SCIFB serial ports with DMA support (i.e. some ports on R-Car Gen2 and RZ/G1 SoCs), receive DMA operations are submitted before the DMA channel pointer is initialized. Hence this fails, and the driver tries to fall back to PIO. However, at this early phase in the initialization sequence, fallback to PIO does not work, leading to a serial port that cannot receive any data. Fix this by calling sci_submit_rx() after initialization of the DMA channel pointer. Reported-by: Yoshihiro Shimoda Fixes: 2c4ee23530ffc022 ("serial: sh-sci: Postpone DMA release when falling back to PIO") Signed-off-by: Geert Uytterhoeven Reviewed-by: Wolfram Sang Tested-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman commit 2b9ea543fa433689301cf16c5b391e1e552ac73d Author: YueHaibing Date: Fri Oct 12 09:33:28 2018 +0000 pinctrl: renesas: 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: Linus Walleij commit 28e0603c4df4b327aa1f92ccfbc3733323d898ba Author: Manivannan Sadhasivam Date: Tue Oct 9 00:44:10 2018 +0530 pinctrl: mediatek: Make eint_m u16 For SoC's which lacks EINT support, U16_MAX is assigned to both eint_m and eint_n through macro NO_EINT_SUPPORT. This will generate integer overflow warning because eint_m is declared as u8 type. Hence modify the eint_m type to u16. Signed-off-by: Manivannan Sadhasivam Reviewed-by: Matthias Brugger Signed-off-by: Linus Walleij commit 59eaeba63a171127a90bb76187536ba66076af40 Author: Michal Simek Date: Fri Oct 12 07:43:11 2018 +0200 of: base: Change logic in of_alias_get_alias_list() Check compatible string first before setting up bit in bitmap to also cover cases that allocated bitfield is not big enough. Show warning about it but let driver to continue to work with allocated bitfield to keep at least some devices (included console which is commonly close to serial0) to work. Fixes: b1078c355d76 ("of: base: Introduce of_alias_get_alias_list() to check alias IDs") Fixes: ae1cca3fa347 ("serial: uartps: Change uart ID port allocation") Signed-off-by: Michal Simek Reviewed-by: Rob Herring Signed-off-by: Greg Kroah-Hartman commit 7acf79b6b2160540af87f47a55d7e3e5637ddeb5 Author: Michal Simek Date: Mon Oct 8 13:58:47 2018 +0200 of: base: Fix english spelling in of_alias_get_alias_list() Fix english spelling in of_alias_get_alias_list(). Reported-by: Geert Uytterhoeven Reported-by: Randy Dunlap Fixes: b1078c355d76 ("of: base: Introduce of_alias_get_alias_list() to check alias IDs") Signed-off-by: Michal Simek Acked-by: Rob Herring Signed-off-by: Greg Kroah-Hartman commit c58a3ae58bce99d20fdbc5d97beecf31cc19f3dd Author: Ulrich Hecht Date: Fri Oct 12 15:47:49 2018 +0200 serial: sh-sci: do not warn if DMA transfers are not supported Not all (H)SCIF devices support DMA, and failure to set it up is not normally a cause for concern. This patch demotes the associated warning to debug output. Inspired by BSP patch "sci: sh-sci: Fix transfer sequence of unsupport DMA transfer" (6beb1f98d3bd30) by Hiromitsu Yamasaki. Signed-off-by: Ulrich Hecht Reviewed-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman commit a7f172ab6a8e755e60311f27512034b0441ef421 Author: Honghui Zhang Date: Mon Oct 15 16:08:53 2018 +0800 PCI: mediatek: Fix class type for MT7622 to PCI_CLASS_BRIDGE_PCI commit 101c92dc80c8 ("PCI: mediatek: Set up vendor ID and class type for MT7622") erroneously set the class type for MT7622 to PCI_CLASS_BRIDGE_HOST. The PCIe controller of MT7622 integrates a Root Port that has type 1 configuration space header and related bridge windows. The HW default value of this bridge's class type is invalid. Fix its class type and set it to PCI_CLASS_BRIDGE_PCI to match the hardware implementation. Fixes: 101c92dc80c8 ("PCI: mediatek: Set up vendor ID and class type for MT7622") Signed-off-by: Honghui Zhang [lorenzo.pieralisi@arm.com: reworked the commit log] Signed-off-by: Lorenzo Pieralisi Acked-by: Ryder Lee commit 490d84f6d73c12f4204241cff8651eed60aae914 Author: Hans Verkuil Date: Mon Oct 15 06:14:22 2018 -0400 media: cec: forgot to cancel delayed work If the wait for completion was interrupted, then make sure to cancel any delayed work. This can only happen if a transmit is waiting for a reply, and you press Ctrl-C or reboot/poweroff or something like that which interrupts the thread waiting for the reply and then proceeds to delete the CEC message. Since the delayed work wasn't canceled, once it would trigger it referred to stale data and resulted in a kernel oops. Fixes: 7ec2b3b941a6 ("cec: add new tx/rx status bits to detect aborts/timeouts") Signed-off-by: Hans Verkuil Cc: # for v4.18 and up Signed-off-by: Mauro Carvalho Chehab commit ef1a2a62cc48c81c68599ff56cc0a97b954c87fe Author: Hans Ulli Kroll Date: Thu Oct 11 21:35:20 2018 +0200 usb: host: add DT bindings for faraday fotg2 This adds device tree bindings for the Faraday FOTG2 dual-mode host controller. Cc: devicetree@vger.kernel.org Signed-off-by: Hans Ulli Kroll Acked-by: Rob Herring Signed-off-by: Linus Walleij Signed-off-by: Greg Kroah-Hartman commit 325b9313ec3be56c8e2fe03f977fee19cec75820 Author: Tudor.Ambarus@microchip.com Date: Mon Oct 15 09:00:54 2018 +0000 usb: host: ohci-at91: fix request of irq for optional gpio atmel,oc-gpio is optional. Request its irq only when atmel,oc is set in device tree. devm_gpiod_get_index_optional returns NULL if -ENOENT. Check its return value for NULL before error, because it is more probable that atmel,oc is not set. This fixes the following errors on boards where atmel,oc is not set in device tree: [ 0.960000] at91_ohci 500000.ohci: failed to request gpio "overcurrent" IRQ [ 0.960000] at91_ohci 500000.ohci: failed to request gpio "overcurrent" IRQ [ 0.970000] at91_ohci 500000.ohci: failed to request gpio "overcurrent" IRQ Signed-off-by: Tudor Ambarus Acked-by: Nicolas Ferre Signed-off-by: Greg Kroah-Hartman commit 3c53e2352a9bf87128e7a8ddb69c7543941a3092 Author: Arnd Bergmann Date: Tue Oct 2 23:11:12 2018 +0200 nvmem: hide unused nvmem_find_cell_by_index function nvmem_find_cell_by_index() is only called from inside an #ifdef, so we get a build warning without CONFIG_OF: drivers/nvmem/core.c:496:1: error: 'nvmem_find_cell_by_index' defined but not used [-Werror=unused-function] Move it into the same #ifdef as the caller to avoid the warning. Fixes: e888d445ac33 ("nvmem: resolve cells from DT at registration time") Signed-off-by: Arnd Bergmann Acked-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman commit 098ec84f1ad2f7b9a4c88bf61fab021ac2876173 Author: Bartosz Golaszewski Date: Wed Oct 3 09:24:30 2018 +0200 nvmem: lpc18xx_eeprom: remove unused variable Remove a variable that's no longer used from lpc18xx_eeprom_remove(). Signed-off-by: Bartosz Golaszewski Reported-by: Stephen Rothwell Acked-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman commit cccb3b19e762edc8ef0481be506967555cb9e317 Author: Bartosz Golaszewski Date: Wed Oct 3 09:31:11 2018 +0200 nvmem: fix nvmem_cell_get_from_lookup() We check if the pointer returned by __nvmem_device_get() is not NULL while we should actually check if it is not IS_ERR(nvmem). Fix it. While we're at it: fix the next error path where we should assign an error value to cell before returning. Signed-off-by: Bartosz Golaszewski Reported-by: Stephen Rothwell Acked-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman commit badcdff107cbfd7fef5f089260177efc56fe1a9f Author: Rob Herring Date: Wed Oct 3 18:47:04 2018 +0100 nvmem: 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: Srinivas Kandagatla Signed-off-by: Rob Herring [srinivas: rebased on top of next] Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman commit 074d6f32689ce05a084b6fa3db38445745bf11cc Author: Honghui Zhang Date: Mon Oct 15 16:08:52 2018 +0800 PCI: mediatek: Fix mtk_pcie_find_port() endpoint/port matching logic The Mediatek's host controller has two slots, each with its own control registers. The host driver needs to identify what slot is connected to what port in order to access the device's configuration space. Current code retrieving slot connected to a given endpoint device. Assuming each slot is connected to one endpoint device as below: host bridge bus 0 --> __________|_______ | | | | slot 0 slot 1 bus 1 -->| bus 2 --> | | | EP 0 EP 1 During PCI enumeration, system software will scan all the PCI devices on every bus starting from devfn 0. Using PCI_SLOT(devfn) for matching an endpoint to its slot is erroneous in that the devfn does not contain the hierarchical bus numbering in it. In order to match an endpoint with its slot (and related port), the PCI tree must be walked up to the root bus (where the root ports are situated) and then the PCI_SLOT(devfn) matching logic can be correctly applied for matching. This patch fixes the mtk_pcie_find_port() slot matching logic by adding appropriate PCI tree walking code to retrieve the slot/port a given endpoint is connected to. Signed-off-by: Honghui Zhang [lorenzo.pieralisi@arm.com: rewrote the commit log] Signed-off-by: Lorenzo Pieralisi Acked-by: Ryder Lee commit 5571f1e65486be025f73fa6aa30fb03725d362a2 Author: Dan Schatzberg Date: Thu Oct 11 08:17:00 2018 -0700 fuse: enable caching of symlinks FUSE file reads are cached in the page cache, but symlink reads are not. This patch enables FUSE READLINK operations to be cached which can improve performance of some FUSE workloads. In particular, I'm working on a FUSE filesystem for access to source code and discovered that about a 10% improvement to build times is achieved with this patch (there are a lot of symlinks in the source tree). Signed-off-by: Miklos Szeredi commit 9a2eb24d1a349f53e20f3d4503568551561eed23 Author: Miklos Szeredi Date: Mon Oct 15 15:43:06 2018 +0200 fuse: only invalidate atime in direct read After sending a synchronous READ request from __fuse_direct_read() we only need to invalidate atime; none of the other attributes should be changed by a read(). Signed-off-by: Miklos Szeredi commit 802dc0497be2b538ca4300704b45b59bffe29585 Author: Miklos Szeredi Date: Mon Oct 15 15:43:06 2018 +0200 fuse: don't need GETATTR after every READ If 'auto_inval_data' mode is active, then fuse_file_read_iter() will call fuse_update_attributes(), which will check the attribute validity and send a GETATTR request if some of the attributes are no longer valid. The page cache is then invalidated if the size or mtime have changed. Then, if a READ request was sent and reply received (which is the case if the data wasn't cached yet, or if the file is opened for O_DIRECT), the atime attribute is invalidated. This will result in the next read() also triggering a GETATTR, ... This can be fixed by only sending GETATTR if the mode or size are invalid, we don't need to do a refresh if only atime is invalid. More generally, none of the callers of fuse_update_attributes() need an up-to-date atime value, so for now just remove STATX_ATIME from the request mask when attributes are updated for internal use. Signed-off-by: Miklos Szeredi commit 2f1e81965fd0f672c3246e751385cdfe8f86bbee Author: Miklos Szeredi Date: Mon Oct 15 15:43:06 2018 +0200 fuse: allow fine grained attr cache invaldation This patch adds the infrastructure for more fine grained attribute invalidation. Currently only 'atime' is invalidated separately. The use of this infrastructure is extended to the statx(2) interface, which for now means that if only 'atime' is invalid and STATX_ATIME is not specified in the mask argument, then no GETATTR request will be generated. Signed-off-by: Miklos Szeredi commit edfa87281f4fa1b78a21f6db999935a2faa2f6b8 Author: Miklos Szeredi Date: Mon Oct 15 15:43:06 2018 +0200 bitops: protect variables in bit_clear_unless() macro Unprotected naming of local variables within bit_clear_unless() can easily lead to using the wrong scope. Noticed this by code review after having hit this issue in set_mask_bits() Signed-off-by: Miklos Szeredi Fixes: 85ad1d13ee9b ("md: set MD_CHANGE_PENDING in a atomic region") Cc: Guoqing Jiang commit 18127429a854e7607b859484880b8e26cee9ddab Author: Miklos Szeredi Date: Mon Oct 15 15:43:06 2018 +0200 bitops: protect variables in set_mask_bits() macro Unprotected naming of local variables within the set_mask_bits() can easily lead to using the wrong scope. Noticed this when "set_mask_bits(&foo->bar, 0, mask)" behaved as no-op. Signed-off-by: Miklos Szeredi Fixes: 00a1a053ebe5 ("ext4: atomically set inode->i_flags in ext4_set_inode_flags()") Cc: Theodore Ts'o commit fd82cc3020a024fc97fbc0a5242c26d06bb5e203 Author: Chaotian Jing Date: Sat Oct 13 15:20:50 2018 +0800 mmc: mediatek: drop too much code of tuning method the tuning code is becoming more and more bloated, let's make the set cmd/data delay to inline function to avoid too much redundant code. Signed-off-by: Chaotian Jing Signed-off-by: Ulf Hansson commit a2e6d1f6b30dc8f51456ace6132a243f77cde686 Author: Chaotian Jing Date: Sat Oct 13 15:20:49 2018 +0800 mmc: mediatek: add MT8183 MMC driver support MT8183 puts the tune register at top layer, so need add new code to support it. Signed-off-by: Chaotian Jing Signed-off-by: Ulf Hansson commit 86601d0eac2de45f86a908e5b3591d86878e3143 Author: Chaotian Jing Date: Sat Oct 13 15:20:48 2018 +0800 mmc: mediatek: tune CMD/DATA together for MSDC IP which supports both data tune and async fifo, it can tune cmd/data together. which can save the time and make the tune result of CMD more stable as data line are 4bit or 8bit. Signed-off-by: Chaotian Jing Signed-off-by: Ulf Hansson commit f38a9774ddde9d79b3487dd888edd8b8623552af Author: Chaotian Jing Date: Sat Oct 13 15:20:47 2018 +0800 mmc: mediatek: fix cannot receive new request when msdc_cmd_is_ready fail when msdc_cmd_is_ready return fail, the req_timeout work has not been inited and cancel_delayed_work() will return false, then, the request return directly and never call mmc_request_done(). so need call mod_delayed_work() before msdc_cmd_is_ready() Signed-off-by: Chaotian Jing Signed-off-by: Ulf Hansson commit 56f6cbbed0463f1c78d602b17c315916cc1cd238 Author: Chaotian Jing Date: Sat Oct 13 15:20:46 2018 +0800 mmc: mediatek: fill the actual clock for mmc debugfs as the mmc core layer has the mmc->actual_clock, so fill it and drop msdc_host->sclk. Signed-off-by: Chaotian Jing Signed-off-by: Ulf Hansson commit 0b1a69fd8394b3ce62045b2012489c3870f06763 Author: Chaotian Jing Date: Sat Oct 13 15:20:45 2018 +0800 mmc: dt-bindings: add support for MT8183 SoC Add the devicetree binding for MT8183 SoC Signed-off-by: Chaotian Jing Signed-off-by: Ulf Hansson commit 90f835414067b104d9249e279413dfa65abb99b6 Author: Masahiro Yamada Date: Fri Oct 12 23:57:38 2018 +0900 mmc: uniphier-sd: avoid using broken DMA RX channel host->chan_rx is NULL when UNIPHIER_SD_CAP_BROKEN_DMA_RX quirk flag is set. In this case, it should not set up DMA. Signed-off-by: Masahiro Yamada Acked-by: Wolfram Sang Signed-off-by: Ulf Hansson commit b7ced87746ebaad2ce2306061293be268575ed44 Author: Masahiro Yamada Date: Fri Oct 12 23:57:37 2018 +0900 mmc: uniphier-sd: fix DMA disabling Once DMA is enabled, it is not possible to disable it because uniphier_sd_dma_endisable() always sets the DMA_ENABLE_DMASDRW bit regardless of the argument 'enable'. It should disable DMA when 'enable' is false. Signed-off-by: Masahiro Yamada Acked-by: Wolfram Sang Signed-off-by: Ulf Hansson commit d3dd5db0c1b904e71690ef8cfaebd562d8e865b1 Author: Masahiro Yamada Date: Sat Oct 13 00:03:08 2018 +0900 mmc: tmio: simplify the DMA mode test host->chan_{rx,tx} represents the DMA capability of the platform. Even if DMA is supported, there are cases where we want to use PIO, for example, data length is short enough as commit 5f52c3552946 ("mmc: tmio: use PIO for short transfers") mentioned. Regarding the hardware control flow, we are interested in whether DMA is currently enabled or not, instead of whether the platform has the DMA capability. Hence, the several conditionals in tmio_mmc_core.c end up with checking host->chan_{rx,tx} and !host->force_pio. This is not nice. Let's flip the flag host->force_pio into host->dma_on. host->dma_on represents whether the DMA is currently enabled or not. This flag is set false in the beginning of each command, then should be set true by tmio_mmc_start_dma() when the DMA is turned on. Signed-off-by: Masahiro Yamada Reviewed-by: Wolfram Sang Tested-by: Wolfram Sang Signed-off-by: Ulf Hansson commit 722fb61e2ed39473297157839ec7230b77fd6940 Author: Masahiro Yamada Date: Wed Oct 10 12:51:32 2018 +0900 mmc: tmio: remove TMIO_MMC_HAVE_HIGH_REG flag TMIO_MMC_HAVE_HIGH_REG is confusing due to its counter-intuitive name. All the TMIO MMC variants (TMIO MMC, Renesas SDHI, UniPhier SD) actually have high registers. It is just that each of them implements its own registers there. The original IP from Panasonic only defines registers 0x00-0xff in the bus_shift=1 review. The register area above them is platform-dependent. In fact, TMIO_MMC_HAVE_HIGH_REG is set only by tmio-mmc.c and used to test the accessibility of CTL_SDIO_REGS. Because it is specific to the TMIO MFD variant, the right thing to do is to move such registers to tmio_mmc.c and delete the TMIO_MMC_HAVE_HIGH_REG flag. Signed-off-by: Masahiro Yamada Reviewed-by: Wolfram Sang Tested-by: Wolfram Sang Signed-off-by: Ulf Hansson commit acb9fce7309a38d25be7331375012b9481f20b27 Author: Masahiro Yamada Date: Wed Oct 10 12:51:31 2018 +0900 mmc: tmio: move MFD variant reset to a platform hook CTL_RESET_SDIO register is specific to the TMIO MFD (tmio_mmc.c). Add a new hook host->reset() for performing a platform-specific reset sequence, and move CTL_RESET_SDIO over there. Signed-off-by: Masahiro Yamada Reviewed-by: Wolfram Sang Tested-by: Wolfram Sang Signed-off-by: Ulf Hansson commit 60ab43ba6b6e0f888aab3ce0f84a8aaf15d15079 Author: Fabrizio Castro Date: Mon Oct 8 09:51:49 2018 +0100 mmc: renesas_sdhi: Add r8a77470 SDHI1 support The RZ/G1C (a.k.a. R8A77470) comes with three SDHI interfaces, SDHI0 and SDHI2 are compatible with the R-Car Gen2 SDHIs, SDHI1 is compatible with R-Car Gen3 SDHIs and it can be used as eMMC as well. This patch adds driver compatibility, and makes sure both drivers get compiled for the R8A77470. Signed-off-by: Fabrizio Castro Reviewed-by: Biju Das Signed-off-by: Ulf Hansson commit be6f8db406a49511a8d213f9443ae79fe5b086c3 Author: Fabrizio Castro Date: Mon Oct 8 09:51:47 2018 +0100 dt-bindings: mmc: renesas_sdhi: Add r8a77470 support The RZ/G1C (a.k.a. R8A77470) comes with three SDHI interfaces, SDHI0 and SDHI2 are compatible with R-Car Gen2 SDHIs, and SDHI1 is compatible with R-Car Gen3 SDHIs, as it comes with an internal DMAC, therefore SDHI1 is fully compatible with driver renesas_sdhi_internal_dmac driver. As a result, the compatible strings for the R8A77470 SDHI interfaces are a little bit special. Document SDHI support for the RZ/G1C SoC. Signed-off-by: Fabrizio Castro Reviewed-by: Biju Das Reviewed-by: Geert Uytterhoeven Reviewed-by: Simon Horman Reviewed-by: Rob Herring Signed-off-by: Ulf Hansson commit f34c6e6257aa477cdfe7e9bbbecd3c5648ecda69 Author: Sergei Shtylyov Date: Fri Oct 12 22:48:22 2018 +0300 spi: sh-msiof: fix deferred probing Since commit 9ec36cafe43b ("of/irq: do irq resolution in platform_get_irq") platform_get_irq() can return -EPROBE_DEFER. However, the driver overrides an error returned by that function with -ENOENT which breaks the deferred probing. Propagate upstream an error code returned by platform_get_irq() and remove the bogus "platform" from the error message, while at it... Fixes: 9ec36cafe43b ("of/irq: do irq resolution in platform_get_irq") Signed-off-by: Sergei Shtylyov Signed-off-by: Mark Brown commit 6530adeaaf5018cd13437dc82adcd9349657a00e Author: Mac Chiang Date: Tue Oct 9 15:37:08 2018 +0800 ASoC: Intel: common: Add Kabylake Dialog+Maxim machine driver entry This patch adds da7219_max98927 machine driver entry into machine table Signed-off-by: Mac Chiang Signed-off-by: Mark Brown commit bca0ac1d96739c07ee1a158e4b1202260ad7480e Author: Mac Chiang Date: Tue Oct 9 15:35:47 2018 +0800 ASoC: Intel: Boards: Add KBL Dialog Maxim I2S machine driver This patch adds Kabylake I2S machine driver with: DA7219 audio codec(SSP1) and MAXIM98927(SSP0) speaker amplifier. Signed-off-by: Mac Chiang Signed-off-by: Mark Brown commit 2657c6a9037df1c98eb5dae10dd554ac8c37d38f Author: Akshu Agrawal Date: Mon Oct 15 12:24:44 2018 +0530 ASoC: AMD: Add SND_JACK_LINEOUT jack type Some 3 pole connectors report impedance greater than threshold of 1000Ohm. Thus, da7219 reports them as LINEOUT. Adding the SND_JACK_LINEOUT type so that we don't fail to detect any 3 pole jack type. Also, changing SND_JACK_HEADPHONE | SND_JACK_MICROPHONE -> SND_JACK_HEADSET Signed-off-by: Akshu Agrawal Signed-off-by: Mark Brown commit b5130dc2224d1881f24224c0590c6d97f2168d6a Author: Janosch Frank Date: Tue Oct 2 10:57:52 2018 +0200 s390/sthyi: Fix machine name validity indication When running as a level 3 guest with no host provided sthyi support sclp_ocf_cpc_name_copy() will only return zeroes. Zeroes are not a valid group name, so let's not indicate that the group name field is valid. Also the group name is not dependent on stsi, let's not return based on stsi before setting it. Fixes: 95ca2cb57985 ("KVM: s390: Add sthyi emulation") Signed-off-by: Janosch Frank Signed-off-by: Martin Schwidefsky commit 9434f5d3bef97c7212ef6d96d7783e3a3a6c1cb5 Author: Harald Freudenberger Date: Fri Oct 12 08:35:24 2018 +0200 s390/zcrypt: fix broken zcrypt_send_cprb in-kernel api function With the new multi zcrypt device node support there came in a code rework which broke the in-kernel api function zcrypt_send_cprb(). This function is used by the pkey kernel module and as an effect, transforming a secure key into a protected key did not work any more. Signed-off-by: Harald Freudenberger Signed-off-by: Martin Schwidefsky commit 63239e4bf7eff394d2bcba95999d6e3eae2be6a6 Author: Linus Walleij Date: Mon Oct 15 11:02:40 2018 +0200 regulator: Fetch enable gpiods nonexclusive Since the core regulator code is treating GPIO descriptors as nonexclusive, i.e. it assumes that the enable GPIO line may be shared with several regulators, let's add the flag introduced for fixing this problem on fixed regulators to all drivers fetching GPIO descriptors to avoid possible regressions. Reported-by: Mark Brown Signed-off-by: Linus Walleij Signed-off-by: Mark Brown commit 8d4b6bce2559755cf2db6513a267fccdfbf7c3ab Author: Michal Kubecek Date: Fri Oct 12 14:24:44 2018 +0200 xfrm: use complete IPv6 addresses for hash In some environments it is common that many hosts share the same lower half of their IPv6 addresses (in particular ::1). As __xfrm6_addr_hash() and __xfrm6_daddr_saddr_hash() calculate the hash only from the lower halves, as much as 1/3 of the hosts ends up in one hashtable chain which harms the performance. Use complete IPv6 addresses when calculating the hashes. Rather than just adding two more words to the xor, use jhash2() for consistency with __xfrm6_pref_hash() and __xfrm6_dpref_spref_hash(). Signed-off-by: Michal Kubecek Signed-off-by: Steffen Klassert commit c6aed238b7a9b15a5c90a0c31f1d36577b5d2cbe Author: Loic Pallardy Date: Fri Jul 27 15:14:47 2018 +0200 remoteproc: modify vring allocation to rely on centralized carveout allocator Current version of rproc_alloc_vring function supports only dynamic vring allocation. This patch allows to allocate vrings based on memory region declatation. Vrings are now manage like memory carveouts, to communize memory management code in rproc_alloc_registered_carveouts(). Allocated buffer is retrieved in rp_find_vq() thanks to rproc_find_carveout_by_name() functions for. This patch sets vrings names to vdev"x"vring"y" with x vdev index in resource table and y vring index in vdev. This will be updated when name will be associated to vdev in firmware resource table. Signed-off-by: Loic Pallardy Signed-off-by: Bjorn Andersson commit 9e753ba9b9b405e3902d9f08aec5f2ea58a0c317 Author: Shaohua Li Date: Sun Oct 14 17:05:07 2018 -0700 MD: fix invalid stored role for a disk - try2 Commit d595567dc4f0 (MD: fix invalid stored role for a disk) broke linear hotadd. Let's only fix the role for disks in raid1/10. Based on Guoqing's original patch. Reported-by: kernel test robot Cc: Gioh Kim Cc: Guoqing Jiang Signed-off-by: Shaohua Li commit 921060ccdae9756f645bcf42ca27fd3ad3a352ff Merge: d864991b220b f95cd52476de Author: David S. Miller Date: Sun Oct 14 13:04:54 2018 -0700 Merge tag 'wireless-drivers-next-for-davem-2018-10-14' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next Kalle Valo says: ==================== wireless-drivers-next patches for 4.20 Third set of patches for 4.20. Most notable is finalising ath10k wcn3990 support, all components should be implemented now. Major changes: ath10k * support NET_DETECT WoWLAN feature * wcn3990 basic functionality now working after we got QMI support mt76 * mt76x0e improvements (should be usable now) * more mt76x0/mt76x2 unification work brcmsmac * fix a problem on AP mode with clients using power save mode iwlwifi * support for a new scan type: fast balance ==================== Signed-off-by: David S. Miller commit 8f94004e2a51a3ea195cf3447eb5d5906f36d8b3 Author: Jens Axboe Date: Sun Oct 14 13:20:48 2018 -0600 cdrom: don't attempt to fiddle with cdo->capability We can't modify cdo->capability as it is defined as a const. Change the modification hack to just WARN_ON_ONCE() if we hit any of the invalid combinations. This fixes a regression for pcd, which doesn't work after the constify patch. Fixes: 853fe1bf7554 ("cdrom: Make device operations read-only") Tested-by: Ondrej Zary Signed-off-by: Jens Axboe commit 5e27891e88555fecd8262e110e1a29feca4b0166 Author: Jens Axboe Date: Fri Oct 12 09:24:57 2018 -0600 block: remove bogus check for queue_lock assignment We just allocated the queue and haven't even set it up yet, hence we know that checking if ->mq_ops is NULL is always going to be true. In fact we do need to assign a lock to ->queue_lock always, as we need it for the queue flags modifications. Signed-off-by: Jens Axboe commit e50b1e327aeb4b224364aa6f85c1713ff8b3654b Author: Jens Axboe Date: Thu Oct 11 17:58:17 2018 -0600 null_blk: remove legacy IO path We're planning on removing this code completely, kill the old path. Signed-off-by: Jens Axboe commit 4e6da0fe8058df9bfa937902fcd9cb2b7b89b2df Author: Richard Weinberger Date: Sun Nov 26 13:33:11 2017 +0100 um: Convert ubd driver to blk-mq Convert the driver to the modern blk-mq framework. As byproduct we get rid of our open coded restart logic and let blk-mq handle it. Signed-off-by: Richard Weinberger Signed-off-by: Jens Axboe commit 6d1f9dfde7343c4ebfb8f84dcb333af571bb3b22 Author: Jens Axboe Date: Thu Oct 11 14:56:14 2018 -0600 skd: fixup usage of legacy IO API We need to be using the mq variant of request requeue here. Fixes: ca33dd92968b ("skd: Convert to blk-mq") Signed-off-by: Jens Axboe commit 3582dd291788e9441c3ba9047e55089edb98da5c Author: Jens Axboe Date: Fri Oct 12 10:03:14 2018 -0600 aoe: convert aoeblk to blk-mq Straight forward conversion - instead of rewriting the internal buffer retrieval logic, just replace the previous elevator peeking with an internal list of requests. Reviewed-by: "Ed L. Cashin" Signed-off-by: Jens Axboe commit 7fa3069dfcf82d9c84197f7dae2759cc9bf80667 Author: Michael Straube Date: Sun Oct 14 12:17:42 2018 +0200 staging: rtl8188eu: remove whitespace - style Remove extra space in variable declaration. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit 18e1aec85941bbc767c59a8cbe08cebfee22d507 Author: Michael Straube Date: Sun Oct 14 12:17:41 2018 +0200 staging: rtl8188eu: rename Hal_MappingOutPipe() - style Rename Hal_MappingOutPipe() to avoid CamelCase. Hal_MappingOutPipe -> hal_mapping_out_pipe Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit 30d046f2a7932dcef346949296065edae95d6ede Author: Michael Straube Date: Sun Oct 14 12:17:40 2018 +0200 staging: rtl8188eu: rename parameters of Hal_MappingOutPipe() - style Rename parameters of Hal_MappingOutPipe() in header to avoid CamelCase and match the names used in the function definition in hal_com.c. pAdapter -> adapter NumOutPipe -> numoutpipe Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit b96ec4e874e6a91980277d231062c693235a1c72 Author: Michael Straube Date: Sun Oct 14 12:17:39 2018 +0200 staging: rtl8188eu: rename parameter of hal_com_get_channel_plan() - style Rename parameter of hal_com_get_channel_plan() in header to avoid CamelCase and match the name used in the function definition in hal_com.c. AutoLoadFail -> load_fail Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit b4a6b11cd2a83062fe3da5d2ef060f3feda9c05d Author: Michael Straube Date: Sun Oct 14 12:17:38 2018 +0200 staging: rtl8188eu: remove unused parameter of hal_com_get_channel_plan() The parameter 'struct adapter *padapter' of hal_com_get_channel_plan() is unused, so remove it. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit aa906bb630157fc772d26b70b58d43c79715d4ef Author: Michael Straube Date: Sun Oct 14 12:17:37 2018 +0200 staging: rtl8188eu: rename HalSetBrateCfg() - style Rename HalSetBrateCfg() to avoid CamelCase. HalSetBrateCfg -> hal_set_brate_cfg Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit a7ce32d1430e3b365ad196b66adabbf723b3d4c6 Author: Michael Straube Date: Sun Oct 14 12:17:36 2018 +0200 staging: rtl8188eu: rename parameters of HalSetBrateCfg() - style Rename parameters of HalSetBrateCfg() in header to avoid CamelCase and match the names used in the function definition in hal_com.c. mBratesOS -> brates BrateCfg -> rate_cfg Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit 6d475d38e6a5a32ac8f840cc6e351db1806c1404 Author: Michael Straube Date: Sun Oct 14 12:17:35 2018 +0200 staging: rtl8188eu: remove unused parameter of HalSetBrateCfg() The parameter 'struct adapter *adapt' of HalSetBrateCfg() is unused, so remove it. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit 8525589130e8a37b63bacec8ef6dbea2dab01216 Author: Michael Straube Date: Thu Oct 11 21:57:12 2018 +0200 staging: rtl8188eu: remove whitespace in qos_acm() Remove whitespace in qos_acm() to improve readability. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit e0437819db68e060f11bcec3f79b92b0382bfbdb Author: Michael Straube Date: Thu Oct 11 21:57:11 2018 +0200 staging: rtl8188eu: cleanup long lines in stop_sta_xmit() Line break lines over 80 characters in stop_sta_xmit() to clear checkpatch warnings. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit d7c252002b53498f8f30147730ed39a0551762b3 Author: Michael Straube Date: Thu Oct 11 21:57:10 2018 +0200 staging: rtl8188eu: cleanup long lines in rtw_get_sta_pending() Line break lines over 80 characters in rtw_get_sta_pending() to clear checkpatch warnings. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit 909495c8db610d840ddcefb08c212d6e319574ee Author: Michael Straube Date: Thu Oct 11 21:57:09 2018 +0200 staging: rtl8188eu: cleanup block comments Cleanup block comments to clear 'please, no space before tabs' and 'line over 80 characters' checkpatch warnings. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit 1330c795c57368d4259402aa4b9ae6fdea5858e1 Author: Michael Straube Date: Thu Oct 11 21:57:08 2018 +0200 staging: rtl8188eu: remove commented code Remove unused commented code in the file core/rte_xmit.c. Clears 'please, no space before tabs' and 'line over 80 characters' checkpatch warnings. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit f996f37471d89a3c3ec6e52b9cef6413665fddd0 Author: Michael Straube Date: Thu Oct 11 21:57:07 2018 +0200 staging: rtl8188eu: cleanup alignment issue Clear a 'Alignment should match open parenthesis' checkpatch issue. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit cac04b1fc6a41c26f81713a115dcc16ecde65118 Author: Michael Straube Date: Thu Oct 11 21:57:06 2018 +0200 staging: rtl8188eu: use __func__ in qos_acm() Use __func__ instead of hardcoded name in qos_acm(). Reported by checkpatch. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit a66ecb24f24251e55a74070d0a025157411377a3 Author: Michael Straube Date: Thu Oct 11 21:57:05 2018 +0200 staging: rtl8188eu: cleanup missing spaces around operators Clear all missing spaces around operators checkpatch issues in the file core/rtw_xmit.c. Use '+=' or '-=' where possible. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit fde54ecea2be9506fc25f62dd3d9dd6dda0f761f Author: Colin Ian King Date: Fri Oct 12 23:31:37 2018 +0100 staging: rtl8188eu: fix spelling mistake "EINPROGESS" -> "EINPROGRESS" Trivial fix to spelling mistake in RT_TRACE message text. Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman commit 9e269dcdec5bbbe6680c1a5473e1788f88db1b08 Author: Colin Ian King Date: Fri Oct 12 16:07:27 2018 +0100 staging: rtlwifi: phydm: fix spelling mistake "Abnrormal" -> "Abnormal" Trivial fix to spelling mistake in message text Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman commit 2a5b8d97c67cdc9c18f98950948e41ed4fdb11dc Author: Colin Ian King Date: Fri Oct 12 16:02:36 2018 +0100 staging: rtl8188eu: fix spelling mistake "Abnornally" -> "Abnormally" Trivial fix to spelling mistake in ODM_RT_TRACE trace message Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman commit a7ed5b3e7dca197de4da6273940a7ca6d1d756a1 Author: Gustavo A. R. Silva Date: Thu Oct 11 21:05:20 2018 +0200 staging: comedi: tio: fix multiple missing break in switch bugs Currently, there are multiple missing break statements in two switch code blocks. This makes the execution path to fall all the way down through to the default cases, which makes the function ni_tio_set_gate_src() to always return -EINVAL. Fix this by adding the missing break statements. Also, notice that due to the absence of the break statements, the following pieces of code are unreachable: 1078 if (ret) 1079 return ret; 1080 /* 3. reenable & set mode to starts things back up */ 1081 ni_tio_set_gate_mode(counter, src); 1098 if (ret) 1099 return ret; 1100 /* 3. reenable & set mode to starts things back up */ 1101 ni_tio_set_gate2_mode(counter, src); So, by adding the missing breaks, this patch also fixes the problem above. Addresses-Coverity-ID: 1474165 ("Missing break in switch") Addresses-Coverity-ID: 1474162 ("Structurally dead code") Fixes: 347e244884c3 ("staging: comedi: tio: implement global tio/ctr routing") Signed-off-by: Gustavo A. R. Silva Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman commit 370a1b573d1d70c7adcdc1cb3da772337fe0a286 Author: Nishad Kamdar Date: Thu Oct 11 21:39:29 2018 +0530 staging: mt7621-mmc: Use BIT macro instead of explicit shifting in dbg.h Replace explicit shifting with BIT macro in dbg.h. Issue found by checkpatch. Signed-off-by: Nishad Kamdar Signed-off-by: Greg Kroah-Hartman commit 23f5fb5d87bd6dc85ccd042f7d531bd50b928988 Author: Nishad Kamdar Date: Thu Oct 11 21:37:57 2018 +0530 staging: mt7621-mmc: Fix lines over 80 characters in dbg.h This patch fixes lines over 80 characters in dbg.h. Issue found by checkpatch. Signed-off-by: Nishad Kamdar Signed-off-by: Greg Kroah-Hartman commit 01378deb37d46fa05061ec7cca09e8b75fbdc1a7 Author: Nishad Kamdar Date: Thu Oct 11 21:36:19 2018 +0530 staging: mt7621-mmc: Fix lines over 80 characters in dbg.c This patch fixes lines over 80 characters in dbg.c. Issue found by checkpatch. Signed-off-by: Nishad Kamdar Signed-off-by: Greg Kroah-Hartman commit d840eb63baed31af29e8d9993944808854837bf9 Author: Mamta Shukla Date: Fri Oct 12 23:01:07 2018 +0530 staging: rtl8723bs: os_dep: 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 Acked-by:Larry Finger Signed-off-by: Greg Kroah-Hartman commit 90b217a74be46f9a99eb053b886c63c1547477ef Author: Colin Ian King Date: Fri Oct 12 16:05:32 2018 +0100 staging: rtl8723bs: fix spelling mistake "Abnrormal" -> "Abnormal" Trivial fix to spelling mistake in message text Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman commit f95cd52476dee761a1a8ebe617dd01793e0eb39c Merge: 6bfa6975f1b7 ba94c753ccb4 Author: Kalle Valo Date: Sun Oct 14 12:21:43 2018 +0300 Merge ath-next from git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git ath.git patches for 4.20. Major changes: ath10k * support NET_DETECT WoWLAN feature * wcn3990 basic functionality now working after we got QMI support commit 6bfa6975f1b72e3e65fb27eedabbe8348322f20a Merge: 03ce6f8a6776 bbd10586f0df Author: Kalle Valo Date: Sun Oct 14 11:40:41 2018 +0300 Merge tag 'mt76-for-kvalo-2018-10-13' of https://github.com/nbd168/wireless mt76 patches for 4.20 * mt76x0 fixes * mt76x0e improvements (should be usable now) * usb support improvements * more mt76x0/mt76x2 unification work * minor fix for aggregation + powersave clients commit d17010bf6301b62df09f7878f3474f42ee0754eb Author: Colin Ian King Date: Wed Oct 10 15:37:31 2018 +0100 Bluetooth: Remove redundant check on status The check on status is redundant as a status has to be zero at the point it is being checked because of a previous check and return path via label 'unlock'. Remove the redundant check and the deadcode that can never be reached. Detected by CoverityScan, CID#1471710 ("Logically dead code") Signed-off-by: Colin Ian King Signed-off-by: Marcel Holtmann commit dd1a8f8a88eecbc903f9ffff12332bec6d3f3be3 Author: Mallikarjun Phulari Date: Fri Oct 5 14:48:13 2018 +0530 Bluetooth: Errata Service Release 8, Erratum 3253 L2CAP: New result values 0x0006 - Connection refused – Invalid Source CID 0x0007 - Connection refused – Source CID already allocated As per the ESR08_V1.0.0, 1.11.2 Erratum 3253, Page No. 54, "Remote CID invalid Issue". Applies to Core Specification versions: V5.0, V4.2, v4.1, v4.0, and v3.0 + HS Vol 3, Part A, Section 4.2, 4.3, 4.14, 4.15. Core Specification Version 5.0, Page No.1753, Table 4.6 and Page No. 1767, Table 4.14 New result values are added to l2cap connect/create channel response as 0x0006 - Connection refused – Invalid Source CID 0x0007 - Connection refused – Source CID already allocated Signed-off-by: Mallikarjun Phulari Signed-off-by: Marcel Holtmann commit 571f739083e2544b343b5998608de679519de4e9 Author: Mallikarjun Phulari Date: Fri Oct 5 14:48:12 2018 +0530 Bluetooth: Use separate L2CAP LE credit based connection result values Add the result values specific to L2CAP LE credit based connections and change the old result values wherever they were used. Signed-off-by: Mallikarjun Phulari Signed-off-by: Marcel Holtmann commit 70ecdd3d8b36cd2bb960bc4e7ae047fbb94c031b Author: Cho, Yu-Chen Date: Tue Oct 2 17:57:04 2018 +0800 Bluetooth: btsdio: Do not bind to non-removable BCM43430 BCM43430 devices soldered onto the PCB (non-removable) use an UART connection for bluetooth. But also advertise btsdio support on their 3th sdio function. Signed-off-by: Cho, Yu-Chen Signed-off-by: Marcel Holtmann commit 23fdf223bbe4bd42bbb3f0f5b9d5e64a58956ef7 Author: Christoph Hellwig Date: Sat Oct 13 17:17:03 2018 +0200 ALSA: asihpi: don't pass GFP_DMA32 to dma_alloc_coherent The DMA API does its own zone decisions based on the coherent_dma_mask. [ Note: as the driver doesn't set the DMA coherent mask, we can assume the default 32bit DMA, hence it should be safe to drop the flag here -- tiwai ] Signed-off-by: Christoph Hellwig Signed-off-by: Takashi Iwai commit 4ffe713b7587b14695c9bec26a000fc88ef54895 Author: Aneesh Kumar K.V Date: Thu Sep 20 14:03:58 2018 +0530 powerpc/mm: Increase the max addressable memory to 2PB Currently we limit the max addressable memory to 128TB. This patch increase the limit to 2PB. We can have devices like nvdimm which adds memory above 512TB limit. We still don't support regular system ram above 512TB. One of the challenge with that is the percpu allocator, that allocates per node memory and use the max distance between them as the percpu offsets. This means with large gap in address space ( system ram above 1PB) we will run out of vmalloc space to map the percpu allocation. In order to support addressable memory above 512TB, kernel should be able to linear map this range. To do that with hash translation we now add 4 context to kernel linear map region. Our per context addressable range is 512TB. We still keep VMALLOC and VMEMMAP region to old size. SLB miss handlers is updated to validate these limit. We also limit this update to SPARSEMEM_VMEMMAP and SPARSEMEM_EXTREME Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman commit c9f80734cd552ddba50567bc43b0ff250a4b2c17 Author: Aneesh Kumar K.V Date: Thu Sep 20 14:03:57 2018 +0530 powerpc/mm/hash: Rename get_ea_context to get_user_context We will be adding get_kernel_context later. Update function name to indicate this handle context allocation user space address. Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman commit e15a4fea4dee2771c6989862527546b2b3326799 Author: Nicholas Piggin Date: Wed Oct 3 00:27:59 2018 +1000 powerpc/64s/hash: Add some SLB debugging tests This adds CONFIG_DEBUG_VM checks to ensure: - The kernel stack is in the SLB after it's flushed and bolted. - We don't insert an SLB for an address that is aleady in the SLB. - The kernel SLB miss handler does not take an SLB miss. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman commit 94ee42727ce06522787a28476465becace1c238b Author: Nicholas Piggin Date: Wed Oct 3 00:27:58 2018 +1000 powerpc/64s/hash: Simplify slb_flush_and_rebolt() slb_flush_and_rebolt() is misleading, it is called in virtual mode, so it can not possibly change the stack, so it should not be touching the shadow area. And since vmalloc is no longer bolted, it should not change any bolted mappings at all. Change the name to slb_flush_and_restore_bolted(), and have it just load the kernel stack from what's currently in the shadow SLB area. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman commit 5434ae74629af58ad0fc27143a9ea435f7734410 Author: Nicholas Piggin Date: Sat Sep 15 01:30:56 2018 +1000 powerpc/64s/hash: Add a SLB preload cache When switching processes, currently all user SLBEs are cleared, and a few (exec_base, pc, and stack) are preloaded. In trivial testing with small apps, this tends to miss the heap and low 256MB segments, and it will also miss commonly accessed segments on large memory workloads. Add a simple round-robin preload cache that just inserts the last SLB miss into the head of the cache and preloads those at context switch time. Every 256 context switches, the oldest entry is removed from the cache to shrink the cache and require fewer slbmte if they are unused. Much more could go into this, including into the SLB entry reclaim side to track some LRU information etc, which would require a study of large memory workloads. But this is a simple thing we can do now that is an obvious win for common workloads. With the full series, process switching speed on the context_switch benchmark on POWER9/hash (with kernel speculation security masures disabled) increases from 140K/s to 178K/s (27%). POWER8 does not change much (within 1%), it's unclear why it does not see a big gain like POWER9. Booting to busybox init with 256MB segments has SLB misses go down from 945 to 69, and with 1T segments 900 to 21. These could almost all be eliminated by preloading a bit more carefully with ELF binary loading. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman commit 425d33146260a4a2e8a1ba64003d6c8ff3bdfcc4 Author: Nicholas Piggin Date: Sat Sep 15 01:30:55 2018 +1000 powerpc/64s/hash: Provide arch_setup_exec() hooks for hash slice setup This will be used by the SLB code in the next patch, but for now this sets the slb_addr_limit to the correct size for 32-bit tasks. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman commit 126b11b294d15a90e38eb2dcded2433619b2c794 Author: Nicholas Piggin Date: Sat Sep 15 01:30:53 2018 +1000 powerpc/64s/hash: Add SLB allocation status bitmaps Add 32-entry bitmaps to track the allocation status of the first 32 SLB entries, and whether they are user or kernel entries. These are used to allocate free SLB entries first, before resorting to the round robin allocator. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman commit 48e7b76957457f9a6f086ca2bbe49ec1ffd75f84 Author: Nicholas Piggin Date: Sat Sep 15 01:30:51 2018 +1000 powerpc/64s/hash: Convert SLB miss handlers to C This patch moves SLB miss handlers completely to C, using the standard exception handler macros to set up the stack and branch to C. This can be done because the segment containing the kernel stack is always bolted, so accessing it with relocation on will not cause an SLB exception. Arbitrary kernel memory must not be accessed when handling kernel space SLB misses, so care should be taken there. However user SLB misses can access any kernel memory, which can be used to move some fields out of the paca (in later patches). User SLB misses could quite easily reconcile IRQs and set up a first class kernel environment and exit via ret_from_except, however that doesn't seem to be necessary at the moment, so we only do that if a bad fault is encountered. [ Credit to Aneesh for bug fixes, error checks, and improvements to bad address handling, etc ] Signed-off-by: Nicholas Piggin [mpe: Disallow tracing for all of slb.c for now.] Signed-off-by: Michael Ellerman commit 4c2de74cc8696154b283f241d74ec0bb24438e22 Author: Nicholas Piggin Date: Sat Oct 13 00:15:16 2018 +1100 powerpc/64: Interrupts save PPR on stack rather than thread_struct PPR is the odd register out when it comes to interrupt handling, it is saved in current->thread.ppr while all others are saved on the stack. The difficulty with this is that accessing thread.ppr can cause a SLB fault, but the SLB fault handler implementation in C change had assumed the normal exception entry handlers would not cause an SLB fault. Fix this by allocating room in the interrupt stack to save PPR. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman commit 3eeacd9f4ea33546f272fcf131d6a11edbe3b4a6 Author: Michael Ellerman Date: Sat Oct 13 00:39:31 2018 +1100 powerpc/ptrace: Don't use sizeof(struct pt_regs) in ptrace code Now that we've split the user & kernel versions of pt_regs we need to be more careful in the ptrace code. For now we've ensured the location of the fields in both structs is the same, so most of the ptrace code doesn't need updating. But there are a few places where we use sizeof(pt_regs), and these will be wrong as soon as we increase the size of the kernel structure. So flip them all to use sizeof(user_pt_regs). Signed-off-by: Michael Ellerman commit 002af9391bfbe84f8e491bb10bd9c6001a6becee Author: Michael Ellerman Date: Fri Oct 12 23:13:17 2018 +1100 powerpc: Split user/kernel definitions of struct pt_regs We use a shared definition for struct pt_regs in uapi/asm/ptrace.h. That means the layout of the structure is ABI, ie. we can't change it. That would be fine if it was only used to describe the user-visible register state of a process, but it's also the struct we use in the kernel to describe the registers saved in an interrupt frame. We'd like more flexibility in the content (and possibly layout) of the kernel version of the struct, but currently that's not possible. So split the definition into a user-visible definition which remains unchanged, and a kernel internal one. At the moment they're still identical, and we check that at build time. That's because we have code (in ptrace etc.) that assumes that they are the same. We will fix that code in future patches, and then we can break the strict symmetry between the two structs. Signed-off-by: Michael Ellerman commit 7f995d3ba6f2bfbe274f5a012f5b549f881e78fe Author: Benjamin Herrenschmidt Date: Thu May 31 14:33:41 2018 +1000 powerpc/prom_init: Make "default_colors" const It's never modified. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Michael Ellerman commit 30c69ca0486fd73f2e5d40096ee68bfaed469b76 Author: Benjamin Herrenschmidt Date: Thu May 31 14:33:40 2018 +1000 powerpc/prom_init: Make "fake_elf" const It is never modified Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Michael Ellerman commit 3bad719b495467a7e7023c5b26f0f5a523a4a193 Author: Benjamin Herrenschmidt Date: Thu May 31 14:33:39 2018 +1000 powerpc/prom_init: Make of_workarounds static It's not used anywhere else. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Michael Ellerman commit 1b2443a547f91cf7f89eed6bddb07394dafae24e Author: Christophe Leroy Date: Tue Oct 9 13:52:20 2018 +0000 powerpc/book3s64: Avoid multiple endian conversion in pte helpers In the same spirit as already done in pte query helpers, this patch changes pte setting helpers to perform endian conversions on the constants rather than on the pte value. In the meantime, it changes pte_access_permitted() to use pte helpers for the same reason. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman commit ff00552578ba30e2e1625fb559b43f8d082b6522 Author: Christophe Leroy Date: Tue Oct 9 13:52:18 2018 +0000 powerpc/8xx: change name of a few page flags to avoid confusion _PAGE_PRIVILEGED corresponds to the SH bit which doesn't protect against user access but only disables ASID verification on kernel accesses. User access is controlled with _PMD_USER flag. Name it _PAGE_SH instead of _PAGE_PRIVILEGED _PAGE_HUGE corresponds to the SPS bit which doesn't really tells that's it is a huge page but only that it is not a 4k page. Name it _PAGE_SPS instead of _PAGE_HUGE Reviewed-by: Aneesh Kumar K.V Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman commit 5662315384fcb3d81125562124cf4e1743aa2c3a Author: Christophe Leroy Date: Tue Oct 9 13:52:16 2018 +0000 powerpc/mm: Get rid of pte-common.h Do not include pte-common.h in nohash/32/pgtable.h As that was the last includer, get rid of pte-common.h Reviewed-by: Aneesh Kumar K.V Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman commit cbcbbf4afd6d38272bf0119d890caa5ebba6fe4c Author: Christophe Leroy Date: Tue Oct 9 13:52:14 2018 +0000 powerpc/mm: Define platform default caches related flags Cache related flags like _PAGE_COHERENT and _PAGE_WRITETHRU are defined on most platforms. The platforms not defining them don't define any alternative. So we can give them a NUL value directly for those platforms directly. Reviewed-by: Aneesh Kumar K.V Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman commit a0da4bc166f21d88400ec91e01b815054561804e Author: Christophe Leroy Date: Tue Oct 9 13:52:12 2018 +0000 powerpc/mm: Allow platforms to redefine some helpers The 40xx defines _PAGE_HWWRITE while others don't. The 8xx defines _PAGE_RO instead of _PAGE_RW. The 8xx defines _PAGE_PRIVILEGED instead of _PAGE_USER. The 8xx defines _PAGE_HUGE and _PAGE_NA while others don't. Lets those platforms redefine pte_write(), pte_wrprotect() and pte_mkwrite() and get _PAGE_RO and _PAGE_HWWRITE off the common helpers. Lets the 8xx redefine pte_user(), pte_mkprivileged() and pte_mkuser() and get rid of _PAGE_PRIVILEGED and _PAGE_USER default values. Lets the 8xx redefine pte_mkhuge() and get rid of _PAGE_HUGE default value. Reviewed-by: Aneesh Kumar K.V Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman commit 6c5d2d3fd376c6b4b8d8624b53dbdda966ce762b Author: Christophe Leroy Date: Tue Oct 9 13:52:10 2018 +0000 powerpc/nohash/64: do not include pte-common.h nohash/64 only uses book3e PTE flags, so it doesn't need pte-common.h This also allows to drop PAGE_SAO and H_PAGE_4K_PFN from pte_common.h as they are only used by PPC64 Reviewed-by: Aneesh Kumar K.V Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman commit d82fd29c5a8caafdc88c6c59c18019a7a5975d99 Author: Christophe Leroy Date: Tue Oct 9 13:52:08 2018 +0000 powerpc/mm: Distribute platform specific PAGE and PMD flags and definitions The base kernel PAGE_XXXX definition sets are more or less platform specific. Lets distribute them close to platform _PAGE_XXX flags definition, and customise them to their exact platform flags. Also defines _PAGE_PSIZE and _PTE_NONE_MASK for each platform allthough they are defined as 0. Do the same with _PMD flags like _PMD_USER and _PMD_PRESENT_MASK Reviewed-by: Aneesh Kumar K.V Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman commit e0f57031ca0b52f7db4bad57db4037a7daa546c3 Author: Christophe Leroy Date: Tue Oct 9 13:52:06 2018 +0000 powerpc/mm: Move pte_user() into nohash/pgtable.h Now the pte-common.h is only for nohash platforms, lets move pte_user() helper out of pte-common.h to put it together with other helpers. Reviewed-by: Aneesh Kumar K.V Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman commit b2133bd7a553ae22c5cd849e3229197d4517fdb0 Author: Christophe Leroy Date: Tue Oct 9 13:52:04 2018 +0000 powerpc/book3s/32: do not include pte-common.h As done for book3s/64, add necessary flags/defines in book3s/32/pgtable.h and do not include pte-common.h It allows in the meantime to remove all related hash definitions from pte-common.h and to also remove _PAGE_EXEC default as _PAGE_EXEC is defined on all platforms except book3s/32. Reviewed-by: Aneesh Kumar K.V Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman commit f4805785f068a29f3be757d837cfc05903a8afe8 Author: Christophe Leroy Date: Tue Oct 9 13:52:02 2018 +0000 powerpc/mm: move __P and __S tables in the common pgtable.h __P and __S flags are the same for all platform and should remain as is in the future, so avoid duplication. Reviewed-by: Aneesh Kumar K.V Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman commit 093d7ca22920c79ecdda87614ac4c5e3786068d6 Author: Christophe Leroy Date: Tue Oct 9 13:52:00 2018 +0000 powerpc/mm: drop unused page flags The following page flags in pte-common.h can be dropped: _PAGE_ENDIAN is only used in mm/fsl_booke_mmu.c and is defined in asm/nohash/32/pte-fsl-booke.h _PAGE_4K_PFN is nowhere defined nor used _PAGE_READ, _PAGE_WRITE and _PAGE_PTE are only defined and used in book3s/64 The following page flags in book3s/64/pgtable.h can be dropped as they are not used on this platform nor by common code. _PAGE_NA, _PAGE_RO, _PAGE_USER and _PAGE_PSIZE Reviewed-by: Aneesh Kumar K.V Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman commit 97026b5a5ac26541b3d294146f5c941491a9e609 Author: Christophe Leroy Date: Tue Oct 9 13:51:58 2018 +0000 powerpc/mm: Split dump_pagelinuxtables flag_array table To reduce the complexity of flag_array, and allow the removal of default 0 value of non existing flags, lets have one flag_array table for each platform family with only the really existing flags. Reviewed-by: Aneesh Kumar K.V Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman commit 26973fa5ac0e3b88d0d476caccfc10839b26098b Author: Christophe Leroy Date: Tue Oct 9 13:51:56 2018 +0000 powerpc/mm: use pte helpers in generic code Get rid of platform specific _PAGE_XXXX in powerpc common code and use helpers instead. mm/dump_linuxpagetables.c will be handled separately Reviewed-by: Aneesh Kumar K.V Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman commit 34eb138ed74dc95285478903148a53bd034829be Author: Christophe Leroy Date: Tue Oct 9 13:51:54 2018 +0000 powerpc/mm: don't use _PAGE_EXEC for calling hash_preload() The 'access' parameter of hash_preload() is either 0 or _PAGE_EXEC. Among the two versions of hash_preload(), only the PPC64 one is doing something with this 'access' parameter. In order to remove the use of _PAGE_EXEC outside platform code, 'access' parameter is replaced by 'is_exec' which will be either true of false, and the PPC64 version of hash_preload() creates the access flag based on 'is_exec'. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman commit daba790242dfbdf6ef1bcabf3d6ed4c88cccf59a Author: Christophe Leroy Date: Tue Oct 9 13:51:52 2018 +0000 powerpc/mm: add pte helpers to query and change pte flags In order to avoid using generic _PAGE_XXX flags in powerpc core functions, define helpers for all needed flags: - pte_mkuser() and pte_mkprivileged() to set/unset and/or unset/set _PAGE_USER and/or _PAGE_PRIVILEGED - pte_hashpte() to check if _PAGE_HASHPTE is set. - pte_ci() check if cache is inhibited (already existing on book3s/64) - pte_exprotect() to protect against execution - pte_exec() and pte_mkexec() to query and set page execution - pte_mkpte() to set _PAGE_PTE flag. - pte_hw_valid() to check _PAGE_PRESENT since pte_present does something different on book3s/64. On book3s/32 there is no exec protection, so pte_mkexec() and pte_exprotect() are nops and pte_exec() returns always true. Reviewed-by: Aneesh Kumar K.V Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman commit aa9cd505e39d63034243c9c1ea8b0a984a6b201f Author: Christophe Leroy Date: Tue Oct 9 13:51:50 2018 +0000 powerpc/mm: move some nohash pte helpers in nohash/[32:64]/pgtable.h In order to allow their use in nohash/32/pgtable.h, we have to move the following helpers in nohash/[32:64]/pgtable.h: - pte_mkwrite() - pte_mkdirty() - pte_mkyoung() - pte_wrprotect() Reviewed-by: Aneesh Kumar K.V Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman commit d81e6f8b7c6600c891cd133312061d23d4e6690c Author: Christophe Leroy Date: Tue Oct 9 13:51:47 2018 +0000 powerpc/mm: don't use _PAGE_EXEC in book3s/32 book3s/32 doesn't define _PAGE_EXEC, so no need to use it. All other platforms define _PAGE_EXEC so no need to check it is not NUL when not book3s/32. Reviewed-by: Aneesh Kumar K.V Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman commit c766ee72235d09b0080f77474085fc17d6ae2fb1 Author: Christophe Leroy Date: Tue Oct 9 13:51:45 2018 +0000 powerpc: handover page flags with a pgprot_t parameter In order to avoid multiple conversions, handover directly a pgprot_t to map_kernel_page() as already done for radix. Do the same for __ioremap_caller() and __ioremap_at(). Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman commit 56f3c1413f5cce0c8f4d6f1ab79d790da5aa61af Author: Christophe Leroy Date: Tue Oct 9 13:51:43 2018 +0000 powerpc/mm: properly set PAGE_KERNEL flags in ioremap() Set PAGE_KERNEL directly in the caller and do not rely on a hack adding PAGE_KERNEL flags when _PAGE_PRESENT is not set. As already done for PPC64, use pgprot_cache() helpers instead of _PAGE_XXX flags in PPC32 ioremap() derived functions. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman commit aa91796ec46339f2ed53da311bd3ea77a3e4dfe1 Author: Christophe Leroy Date: Tue Oct 9 13:51:41 2018 +0000 powerpc: don't use ioremap_prot() nor __ioremap() unless really needed. In many places, ioremap_prot() and __ioremap() can be replaced with higher level functions like ioremap(), ioremap_coherent(), ioremap_cache(), ioremap_wc() ... Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman commit 402a5698b4462a3dcfcf9bdafabed7f63c9be7d8 Author: Christophe Leroy Date: Tue Oct 9 13:51:39 2018 +0000 soc/fsl/qbman: use ioremap_cache() instead of ioremap_prot(0) ioremap_prot() with flag set to 0 relies on a hack in __ioremap_caller() which adds PAGE_KERNEL flags when the handed flags don't look like a valid set of flags (ie don't include _PAGE_PRESENT) The intention being to map cached memory, use ioremap_cache() instead. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman commit 67e89ac32828a29adc74e5c9bd59bd70943466f0 Author: Joe Stringer Date: Fri Oct 12 14:50:53 2018 -0700 bpf: Fix dev pointer dereference from sk_skb Dan Carpenter reports: The patch 6acc9b432e67: "bpf: Add helper to retrieve socket in BPF" from Oct 2, 2018, leads to the following Smatch complaint: net/core/filter.c:4893 bpf_sk_lookup() error: we previously assumed 'skb->dev' could be null (see line 4885) Fix this issue by checking skb->dev before using it. Signed-off-by: Joe Stringer Signed-off-by: Alexei Starovoitov commit e01ad46d53b59720c6ae69963ee1756506954c85 Author: Jianchao Wang Date: Fri Oct 12 18:07:28 2018 +0800 blk-mq: fallback to previous nr_hw_queues when updating fails When we try to increate the nr_hw_queues, we may fail due to shortage of memory or other reason, then blk_mq_realloc_hw_ctxs stops and some entries in q->queue_hw_ctx are left with NULL. However, because queue map has been updated with new nr_hw_queues, some cpus have been mapped to hw queue which just encounters allocation failure, thus blk_mq_map_queue could return NULL. This will cause panic in following blk_mq_map_swqueue. To fix it, when increase nr_hw_queues fails, fallback to previous nr_hw_queues and post warning. At the same time, driver's .map_queues usually use completion irq affinity to map hw and cpu, fallback nr_hw_queues will cause lack of some cpu's map to hw, so use default blk_mq_map_queues to do that. Reported-by: syzbot+83e8cbe702263932d9d4@syzkaller.appspotmail.com Signed-off-by: Jianchao Wang Signed-off-by: Jens Axboe commit 34d11ffac1f56c3895dad32153abd6814452dc77 Author: Jianchao Wang Date: Fri Oct 12 18:07:27 2018 +0800 blk-mq: realloc hctx when hw queue is mapped to another node When the hw queues and mq_map are updated, a hctx could be mapped to a different numa node. At this moment, we need to realloc the hctx. If fail to do that, go on using previous hctx. Signed-off-by: Jianchao Wang Signed-off-by: Jens Axboe commit 5b202853ffbc54b29f23c4b1b5f3948efab489a2 Author: Jianchao Wang Date: Fri Oct 12 18:07:26 2018 +0800 blk-mq: change gfp flags to GFP_NOIO in blk_mq_realloc_hw_ctxs blk_mq_realloc_hw_ctxs could be invoked during update hw queues. At the momemt, IO is blocked. Change the gfp flags from GFP_KERNEL to GFP_NOIO to avoid forever hang during memory allocation in blk_mq_realloc_hw_ctxs. Signed-off-by: Jianchao Wang Signed-off-by: Jens Axboe commit 477e19dedc9d3e1f4443a1d4ae00572a988120ea Author: Jianchao Wang Date: Fri Oct 12 18:07:25 2018 +0800 blk-mq: adjust debugfs and sysfs register when updating nr_hw_queues blk-mq debugfs and sysfs entries need to be removed before updating queue map, otherwise, we get get wrong result there. This patch fixes it and remove the redundant debugfs and sysfs register/unregister operations during __blk_mq_update_nr_hw_queues. Signed-off-by: Jianchao Wang Reviewed-by: Ming Lei Signed-off-by: Jens Axboe commit 2d29c9f89fcd9bf408fcdaaf515c90a169f22ecd Author: Federico Motta Date: Fri Oct 12 11:55:57 2018 +0200 block, bfq: improve asymmetric scenarios detection bfq defines as asymmetric a scenario where an active entity, say E (representing either a single bfq_queue or a group of other entities), has a higher weight than some other entities. If the entity E does sync I/O in such a scenario, then bfq plugs the dispatch of the I/O of the other entities in the following situation: E is in service but temporarily has no pending I/O request. In fact, without this plugging, all the times that E stops being temporarily idle, it may find the internal queues of the storage device already filled with an out-of-control number of extra requests, from other entities. So E may have to wait for the service of these extra requests, before finally having its own requests served. This may easily break service guarantees, with E getting less than its fair share of the device throughput. Usually, the end result is that E gets the same fraction of the throughput as the other entities, instead of getting more, according to its higher weight. Yet there are two other more subtle cases where E, even if its weight is actually equal to or even lower than the weight of any other active entities, may get less than its fair share of the throughput in case the above I/O plugging is not performed: 1. other entities issue larger requests than E; 2. other entities contain more active child entities than E (or in general tend to have more backlog than E). In the first case, other entities may get more service than E because they get larger requests, than those of E, served during the temporary idle periods of E. In the second case, other entities get more service because, by having many child entities, they have many requests ready for dispatching while E is temporarily idle. This commit addresses this issue by extending the definition of asymmetric scenario: a scenario is asymmetric when - active entities representing bfq_queues have differentiated weights, as in the original definition or (inclusive) - one or more entities representing groups of entities are active. This broader definition makes sure that I/O plugging will be performed in all the above cases, provided that there is at least one active group. Of course, this definition is very coarse, so it will trigger I/O plugging also in cases where it is not needed, such as, e.g., multiple active entities with just one child each, and all with the same I/O-request size. The reason for this coarse definition is just that a finer-grained definition would be rather heavy to compute. On the opposite end, even this new definition does not trigger I/O plugging in all cases where there is no active group, and all bfq_queues have the same weight. So, in these cases some unfairness may occur if there are asymmetries in I/O-request sizes. We made this choice because I/O plugging may lower throughput, and probably a user that has not created any group cares more about throughput than about perfect fairness. At any rate, as for possible applications that may care about service guarantees, bfq already guarantees a high responsiveness and a low latency to soft real-time applications automatically. Signed-off-by: Federico Motta Signed-off-by: Paolo Valente Signed-off-by: Jens Axboe commit ba94c753ccb471bafe8bd824b744fda6fee0001e Author: Govind Singh Date: Thu Oct 11 13:16:26 2018 +0300 ath10k: add QMI message handshake for wcn3990 client Add WCN3990 QMI client handshakes for Q6 integrated WLAN connectivity subsystem. This layer is responsible for communicating qmi control messages to wifi fw QMI service using QMI messaging protocol. Qualcomm MSM Interface(QMI) is a messaging format used to communicate between components running between remote processors with underlying transport layer based on integrated chipset(shared memory) or discrete chipset(PCI/USB/SDIO/UART). Signed-off-by: Govind Singh Reviewed-by: Bjorn Andersson Acked-by: Niklas Cassel Reviewed-by: Brian Norris Signed-off-by: Kalle Valo commit 35a6657667375d1564f9e9b75491c9e41b04c51f Author: Govind Singh Date: Thu Oct 11 13:16:14 2018 +0300 ath10k: add debug mask for QMI layer Add debug mask to control debug info of ath10k qmi messaging layer. Signed-off-by: Govind Singh Acked-by: Niklas Cassel Reviewed-by: Brian Norris Signed-off-by: Kalle Valo commit cc53aabcc283c36274d3f3ce9adc4b40c21d4838 Author: Govind Singh Date: Thu Oct 11 13:16:01 2018 +0300 firmware: qcom: scm: Add WLAN VMID for Qualcomm SCM interface Add WLAN related VMID's to support wlan driver to set up the remote's permissions call via TrustZone. Signed-off-by: Govind Singh Reviewed-by: Bjorn Andersson Acked-by: Niklas Cassel Reviewed-by: Brian Norris Signed-off-by: Kalle Valo commit 2b741a8aaa342fc0694b84e16245090e32594db2 Author: Govind Singh Date: Thu Oct 11 13:15:49 2018 +0300 dt: bindings: add bindings for msa memory region Add device tree binding documentation details of msa memory region for ath10k qmi client for SDM845/APQ8098 SoC into "qcom,ath10k.txt". Signed-off-by: Govind Singh Reviewed-by: Bjorn Andersson Acked-by: Niklas Cassel Reviewed-by: Brian Norris Reviewed-by: Rob Herring Signed-off-by: Kalle Valo commit 22e8a46027387b4e8db75f73ede9bbf337115e9c Author: Rakesh Pillai Date: Thu Oct 11 13:11:45 2018 +0300 ath10k: add support to create boardname for non-bmi target Add support to create the boardname for non-bmi targets like WCN3990, which uses qmi for bdf download. This boardname is used to parse the board data from board-2.bin. Signed-off-by: Rakesh Pillai Signed-off-by: Govind Singh Acked-by: Niklas Cassel Reviewed-by: Brian Norris Signed-off-by: Kalle Valo commit bc17d4b90cdd3e557d195937c0003260dfce67d6 Author: Govind Singh Date: Thu Oct 11 13:11:32 2018 +0300 ath10k: add qmi service helpers for wcn3990 qmi client WLAN qmi server running in Q6 exposes host to target cold boot qmi handshakes. Add WLAN QMI service helpers for ath10k wcn3990 qmi client. Signed-off-by: Govind Singh Reviewed-by: Bjorn Andersson Acked-by: Niklas Cassel Reviewed-by: Brian Norris Signed-off-by: Kalle Valo commit f9dca154a4e4d185bad15a431f0ff095cd931df6 Author: YueHaibing Date: Fri Oct 5 11:07:26 2018 +0000 wil6210: 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: Kalle Valo commit 72569b7be461ad563c8118c50f26692e53a189bc Author: Arnd Bergmann Date: Tue Oct 9 18:03:06 2018 +0200 ath9k: fix RX_STAT_INC() etc macros A couple of macros that deal with statistics in ath9k rely on the declaration of the 'sc' variable, which they dereference. However, when the statistics are disabled, the new instance in ath_cmn_process_fft() causes a warning for an unused variable: drivers/net/wireless/ath/ath9k/common-spectral.c: In function 'ath_cmn_process_fft': drivers/net/wireless/ath/ath9k/common-spectral.c:474:20: error: unused variable 'sc' [-Werror=unused-variable] It's better if those macros only operate on their arguments instead of known variable names, and adding a cast to (void) kills off that warning. Fixes: 03224678c013 ("ath9k: add counters for good and errorneous FFT/spectral frames") Signed-off-by: Arnd Bergmann Signed-off-by: Kalle Valo commit e3bfecd5cd37a93c47c146c41d5f1fde7405b592 Author: Dan Carpenter Date: Thu Oct 11 11:09:20 2018 +0300 ath10k: htt: remove some dead code We added an unnecessary condition here in commit a904417fc876 ("ath10k: add extended per sta tx statistics support"). "legacy_rate_idx" is a u8 so it can't be negative. The caller doesn't pass negatives either. I have deleted this code. Signed-off-by: Dan Carpenter Signed-off-by: Kalle Valo commit 0738b4998c6d1caf9ca2447b946709a7278c70f1 Author: Carl Huang Date: Thu Oct 11 15:55:26 2018 +0800 ath10k: allocate small size dma memory in ath10k_pci_diag_write_mem ath10k_pci_diag_write_mem may allocate big size of the dma memory based on the parameter nbytes. Take firmware diag download as example, the biggest size is about 500K. In some systems, the allocation is likely to fail because it can't acquire such a large contiguous dma memory. The fix is to allocate a small size dma memory. In the loop, driver copies the data to the allocated dma memory and writes to the destination until all the data is written. Tested with QCA6174 PCI with firmware-6.bin_WLAN.RM.4.4.1-00119-QCARMSWP-1, this also affects QCA9377 PCI. Signed-off-by: Carl Huang Reviewed-by: Brian Norris Signed-off-by: Kalle Valo commit 9de4162f099948ad85871b8b2ed61e84f139cb5a Author: Wen Gong Date: Mon Oct 8 17:02:43 2018 +0800 ath10k: add peer flush in ath10k_flush for STATION In the noisy environment, if there are packets in the queue and can't send out, the suspend timing will be more than 5 seconds due to the wait, flush the queue to optimize the suspend timing, and let the upper layer to retry the packets after resume. Tested with QCA6174 PCI with firmware WLAN.RM.4.4.1-00109-QCARMSWPZ-1, but this will also affect QCA9377 PCI. It's not a regression with new firmware releases. Signed-off-by: Wen Gong Signed-off-by: Kalle Valo commit 7bfd82bff60ef572b9acef8ca32669ace1f50664 Author: Gustavo A. R. Silva Date: Fri Oct 5 20:56:23 2018 +0200 ath10k: remove unnecessary comparison of unsigned integer with < 0 There is no need to compare *ps_state_enable* with < 0 because such variable is of type u8 (8 bits, unsigned), making it impossible to hold a negative value. Fix this by removing such comparison. Addresses-Coverity-ID: 1473921 ("Unsigned compared against 0") Signed-off-by: Gustavo A. R. Silva Signed-off-by: Kalle Valo commit 9d9cdbf3f9edbcc0d4f2b4d17f3329315c5f84ad Author: Gustavo A. R. Silva Date: Fri Oct 5 20:42:45 2018 +0200 ath10k: htt_rx: fix signedness bug in ath10k_update_per_peer_tx_stats Currently, the error handling for the call to function ath10k_get_legacy_rate_idx() doesn't work because *rate_idx* is of type u8 (8 bits, unsigned), which makes it impossible for it to hold a value less than 0. Fix this by changing the type of variable *rate_idx* to s8 (8 bits, signed). Addresses-Coverity-ID: 1473914 ("Unsigned compared against 0") Fixes: 0189dbd71cbd ("ath10k: get the legacy rate index to update the txrate table") Signed-off-by: Gustavo A. R. Silva Signed-off-by: Kalle Valo commit 6bc17950f4b2459f8d50b999ace6b30b505aee50 Author: Balaji Pothunoori Date: Mon Sep 10 11:54:30 2018 +0530 ath10k: management tx ack rssi capability check Adding WMI service check for management tx ack rssi support; this is done to maintain common avg ack signal in user level for both data and management tx ack packet. Tested on QCA4019(fw version-10.4-3.2.1-00063). Signed-off-by: Balaji Pothunoori Signed-off-by: Kalle Valo commit ce834e280f2f8753ab0432fb5b1912547abc5330 Author: Wen Gong Date: Thu Oct 4 08:45:31 2018 +0300 ath10k: support NET_DETECT WoWLAN feature For WoWLAN support it is expected to support wake up based on discovery of one or more known SSIDs. This is the WIPHY_WOWLAN_NET_DETECT feature, which shows up as an NL80211 feature flag. This shows up in 'iw phy' as: WoWLAN support: * wake up on network detection, up to 16 match sets And it can be enabled with command: iw phy0 wowlan enable net-detect interval 5000 delay 30 freqs 2412 matches ssid foo Firmware will do scan by the configured parameters after suspend and wakeup if it found matched SSIDs. Tested with QCA6174 hw3.0 with firmware WLAN.RM.4.4.1-00110-QCARMSWPZ-1. Signed-off-by: Wen Gong [kvalo@codeaurora.org: fix lots of endian bugs, whitespace, commit log and style cleanup] Signed-off-by: Kalle Valo commit f1157695c527d4ee949ac83f743f80107751a70c Author: Rakesh Pillai Date: Tue Oct 2 23:33:13 2018 +0530 ath10k: set probe request oui during driver start Currently the wmi command for setting probe request oui, needed for mac randomization, is sent during the mac register. At this time, during the driver init the wmi has already been detached. This can cause unexpected behavior since the firmware is already down and the wmi has been detached. Send the wmi command for setting probe request oui during the driver start. This will make sure that the firmware is started and wmi is initialized before we send this command. Tested HW: WCN3990 Tested FW: WLAN.HL.2.0-01188-QCAHLSWMTPLZ-1 Fixes: 60e1d0fb290197fe505dff6e4e3b7e4d258dbf60 Signed-off-by: Rakesh Pillai Signed-off-by: Kalle Valo commit 34e141eea7dd8525dd1ef7a925459e455b4d307f Author: Sriram R Date: Wed Oct 3 08:43:50 2018 +0530 ath10k: fix possible out of bound access of ath10k_rates array While using 'ath10k_mac_get_rate_hw_value()' to obtain the hw value from the passed bitrate, there is a chance of out of bound array access when wrong bitrate is passed. This is fixed by comparing the bitrates within the correct size of the ath10k_rates array. Fixes commit f279294e9ee2 ("ath10k: add support for configuring management packet rate"). Also correction made to some indents used in the above commit. Signed-off-by: Sriram R Signed-off-by: Kalle Valo commit 03ce6f8a677692e4e5d5196b4e337555285b8996 Author: YueHaibing Date: Mon Oct 8 14:16:59 2018 +0000 rtl8xxxu: Remove set but not used variables 'usedesc40' and 'seq_number' Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c: In function 'rtl8xxxu_tx': drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c:4925:7: warning: variable 'usedesc40' set but not used [-Wunused-but-set-variable] drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c:4921:6: warning: variable 'seq_number' set but not used [-Wunused-but-set-variable] 'usedesc40' and 'seq_number' are not used any more after commit b59415c2dd08 ("rtl8xxxu: Split filling of TX descriptors into separate functions") Signed-off-by: YueHaibing Signed-off-by: Kalle Valo commit 4cb5054957b24dd83f5747cd1771c790726d7836 Author: Sergey Matyukevich Date: Mon Oct 8 09:56:03 2018 +0000 qtnfmac_pcie: cleanup Pearl platform headers Remove redundant information from Pearl platform headers. Signed-off-by: Sergey Matyukevich Signed-off-by: Kalle Valo commit b458a033ca2fc19115790b2b583dcdc7c1e43886 Author: Sergey Matyukevich Date: Mon Oct 8 09:56:02 2018 +0000 qtnfmac: use SPDX identifier for pcie bus layer files Change pcie bus layer licensing information to SPDX format. Signed-off-by: Sergey Matyukevich Signed-off-by: Kalle Valo commit db62abe51853e2fb3853bd1c3a3f7050cacaa239 Author: Sergey Matyukevich Date: Mon Oct 8 09:56:00 2018 +0000 qtnfmac: use 'help' in Kconfig Fix checkpatch warning: use preferred 'help' option in Kconfig. Signed-off-by: Sergey Matyukevich Signed-off-by: Kalle Valo commit bbc2a101f06beef093dda87bd7de47ad532e5448 Author: Lubomir Rintel Date: Sun Oct 7 02:33:27 2018 +0200 libertas: return errno from lbs_add_card() This makes the error handling somewhat cleaner -- lbs_add_card() does no logner throw away the errno and lets its callers propagate it. Signed-off-by: Lubomir Rintel Signed-off-by: Kalle Valo commit 6528d88047801b80d2a5370ad46fb6eff2f509e0 Author: Lubomir Rintel Date: Sat Oct 6 22:12:32 2018 +0200 libertas: don't set URB_ZERO_PACKET on IN USB transfer The USB core gets rightfully upset: usb 1-1: BOGUS urb flags, 240 --> 200 WARNING: CPU: 0 PID: 60 at drivers/usb/core/urb.c:503 usb_submit_urb+0x2f8/0x3ed Modules linked in: CPU: 0 PID: 60 Comm: kworker/0:3 Not tainted 4.19.0-rc6-00319-g5206d00a45c7 #39 Hardware name: OLPC XO/XO, BIOS OLPC Ver 1.00.01 06/11/2014 Workqueue: events request_firmware_work_func EIP: usb_submit_urb+0x2f8/0x3ed Code: 75 06 8b 8f 80 00 00 00 8d 47 78 89 4d e4 89 55 e8 e8 35 1c f6 ff 8b 55 e8 56 52 8b 4d e4 51 50 68 e3 ce c7 c0 e8 ed 18 c6 ff <0f> 0b 83 c4 14 80 7d ef 01 74 0a 80 7d ef 03 0f 85 b8 00 00 00 8b EAX: 00000025 EBX: ce7d4980 ECX: 00000000 EDX: 00000001 ESI: 00000200 EDI: ce7d8800 EBP: ce7f5ea8 ESP: ce7f5e70 DS: 007b ES: 007b FS: 0000 GS: 00e0 SS: 0068 EFLAGS: 00210292 CR0: 80050033 CR2: 00000000 CR3: 00e80000 CR4: 00000090 Call Trace: ? if_usb_fw_timeo+0x64/0x64 __if_usb_submit_rx_urb+0x85/0xe6 ? if_usb_fw_timeo+0x64/0x64 if_usb_submit_rx_urb_fwload+0xd/0xf if_usb_prog_firmware+0xc0/0x3db ? _request_firmware+0x54/0x47b ? _request_firmware+0x89/0x47b ? if_usb_probe+0x412/0x412 lbs_fw_loaded+0x55/0xa6 ? debug_smp_processor_id+0x12/0x14 helper_firmware_cb+0x3c/0x3f request_firmware_work_func+0x37/0x6f process_one_work+0x164/0x25a worker_thread+0x1c4/0x284 kthread+0xec/0xf1 ? cancel_delayed_work_sync+0xf/0xf ? kthread_create_on_node+0x1a/0x1a ret_from_fork+0x2e/0x38 ---[ end trace 3ef1e3b2dd53852f ]--- Cc: stable@vger.kernel.org Signed-off-by: Lubomir Rintel Signed-off-by: Kalle Valo commit 52a312673aff9baac0d677e0aee068d65dc30467 Author: Jia-Ju Bai Date: Fri Oct 5 21:55:46 2018 +0800 iwlegacy: Add a lock assertion in il4965_send_rxon_assoc() The variables il->staging.filter_flags, rxon1->filter_flags and rxon2->filter_flags need to be protected by the mutex lock il->mutex. This patch adds a lock assertion of il->mutex to check whether this lock is held. Signed-off-by: Jia-Ju Bai Acked-by: Stanislaw Gruszka Signed-off-by: Kalle Valo commit 2258ee58baa554609a3cc3996276e4276f537b6d Author: Ali MJ Al-Nasrawy Date: Wed Oct 3 19:21:39 2018 +0300 brcmsmac: AP mode: update beacon when TIM changes Beacons are not updated to reflect TIM changes. This is not compliant with power-saving client stations as the beacons do not have valid TIM and can cause the network to stall at random occasions and to have highly variable latencies. Fix it by updating beacon templates on mac80211 set_tim callback. Addresses an issue described in: https://marc.info/?i=20180911163534.21312d08%20()%20manjaro Signed-off-by: Ali MJ Al-Nasrawy Signed-off-by: Kalle Valo commit bbd10586f0df1a3ff6abda39c9542458fdfc5686 Author: Lorenzo Bianconi Date: Fri Oct 12 12:16:28 2018 +0200 mt76x0: phy: do not run calibration during channel switch Do not perform phy/vga calibration during channel switch. Moreover remove mt76x0_agc_save and mt76x0_agc_restore routines since they are no longer necessary. Furthermore run mt76_set_channel in order to check if there are pending frames during channel switch Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 4636a2544c3b79b95115bd612455de7c176dadcf Author: Lorenzo Bianconi Date: Fri Oct 12 12:16:27 2018 +0200 mt76x0: phy: 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 e48797e9b6810383badfec429904a369c3e830da Author: Lorenzo Bianconi Date: Fri Oct 12 12:16:26 2018 +0200 mt76: introduce mt76x02_init_agc_gain routine Add mt76x02_init_agc_gain routine in mt76x02-lib moudule in order to be reused by mt76x0 for vga initalization Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 9f884f0f9d000998a3e413232e9efcdbb5901139 Author: Lorenzo Bianconi Date: Fri Oct 12 12:16:25 2018 +0200 mt76: move mt76x02_phy_adjust_vga_gain in mt76/mt76x02_phy.c Move mt76x02_phy_adjust_vga_gain routine in mt76x02-lib module in order to be reused by mt76x0 driver for vga calibration Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit b225a9b6c27ef2a0ea4a5e7fce647c6017b8affb Author: Lorenzo Bianconi Date: Fri Oct 12 12:16:24 2018 +0200 mt76: move rssi_gain_thresh routines in mt76x02-lib module Move mt76x2_get_rssi_gain_thresh and mt76x2_get_low_rssi_gain_thresh routines in mt76x02-lib module in order to be reused by mt76x0 driver for dynamic vga calibration Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 66a34c66e0cbf53c9e5c8b8f4445bf6f271c4571 Author: Lorenzo Bianconi Date: Fri Oct 12 12:16:23 2018 +0200 mt76x0: phy: add phy/vco temperature compensation Introduce phy/vco temperature calibration. Moreover fix configuration of register 67 on bank0 during temperature reading and use mt76_poll utility routine to poll core34 register. Furthermore temperature compensation needs to be disabled if the device supports tssi compensation. This issue has never been hit since temperature reading is not actually used by usb code. Fixes: 10de7a8b4ab9 ("mt76x0: phy files") Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 4afeb39624f376a6eb1e4e7d5f189a5cf82cfd33 Author: Lorenzo Bianconi Date: Fri Oct 12 12:16:22 2018 +0200 mt76x0: eeprom: introduce mt76x0_tssi_enabled routine Add mt76x0_tssi_enabled in order to check if tssi compensation is enabled since mt76x0 condition differs from mt76x2 one. Moreover move back mt76x02_temp_tx_alc_enabled and mt76x02_tssi_enabled routines in mt76x2/eeprom.h since they are mt76x2 specific Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 592ebc9cc6e0e00eeca7e60d534f219ee1f64d6c Author: Lorenzo Bianconi Date: Fri Oct 12 12:16:21 2018 +0200 mt76x0: phy: update set_channel for mt76x0e devices Do not run mt76x0_vco_cal and mt76x0_bbp_set_bw routines and configure MT_TX_SW_CFG0 register for pcie devices in mt76x0_phy_set_channel function. Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 9aec146d0f6b532446b81f3fb3f8b7545b436dc5 Author: Lorenzo Bianconi Date: Fri Oct 12 12:16:20 2018 +0200 mt76x0: pci: introduce mt76x0_phy_calirate routine Add mt76x0_phy_calirate routine in order to perform phy calibration for mt76x0e devices. Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 3eaf05de1b35dbdd9fee2e7ad1b04ee424846814 Author: Lorenzo Bianconi Date: Fri Oct 12 12:16:19 2018 +0200 mt76x0: pci: rename mt76x0_phy_calibrate Rename mt76x0_phy_calibrate routine in mt76x0_phy_calibration_work in order to not collide with calibration routine for mt76x0e Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 370c6415ef34404d4d0b430039da8b0ed30bedf1 Author: Lorenzo Bianconi Date: Fri Oct 12 12:16:18 2018 +0200 mt76: move mt76x02_phy_set_band in mt76x02-lib module Move mt76x02_phy_set_band routine in mt76x02_phy.c since it is shared between mt76x0 and mt76x2 drivers and remove duplicated code Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 032c08f4c675b9a61888055703eca06118a92a3f Author: Lorenzo Bianconi Date: Fri Oct 12 12:16:17 2018 +0200 mt76: move mt76x02_phy_set_bw in mt76x02-lib module Move mt76x02_phy_set_bw routine in mt76x02_phy.c since it is shared between mt76x0 and mt76x2 drivers and remove duplicated code Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 7859c543b65d4621d22dbfd7d884fc0d417a1722 Author: Lorenzo Bianconi Date: Wed Oct 10 12:31:13 2018 +0200 mt76x0: phy: remove channel parameter from mt76x0_phy_set_chan_bbp_params Remove unused channel parameter from mt76x0_phy_set_chan_bbp_params routine signature Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 4df942733fd26d9378a4a00619be348c771e0190 Author: Lorenzo Bianconi Date: Tue Oct 9 10:57:06 2018 +0200 mt76x0: phy: fix restore phase in mt76x0_phy_recalibrate_after_assoc Fix restore value configured in MT_BBP(IBI, 9) register in mt76x0_phy_recalibrate_after_assoc routine. Fixes: 10de7a8b4ab9 ("mt76x0: phy files") Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit ebb632db0f0789d2216fc0e78dd950681b569036 Author: Felix Fietkau Date: Tue Oct 9 10:44:36 2018 +0200 mt76: mt76x0e: another fix for the external PA current setting - Use the register number define instead of a magic value - Fix inverted bit test (override needs to be applied if the bit is not set) Fixes: 2b2cb40bcd7d ("mt76x0: pci: add hw initialization at bootstrap") Signed-off-by: Felix Fietkau commit 69585ef9bb9f326baaad27d7579b3dfaf42bf1e7 Author: YueHaibing Date: Mon Oct 8 13:21:49 2018 +0000 mt76x0: pci: fix set external PA I/O current Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/wireless/mediatek/mt76/mt76x0/pci.c: In function 'mt76x0e_register_device': drivers/net/wireless/mediatek/mt76/mt76x0/pci.c:107:8: warning: variable 'data' set but not used [-Wunused-but-set-variable] It seems correct value to write is 'data' Fixes: 2b2cb40bcd7d ("mt76x0: pci: add hw initialization at bootstrap") Acked-by: Lorenzo Bianconi Signed-off-by: YueHaibing Signed-off-by: Felix Fietkau commit 5155938d8a0fe0e0251435cae02539e81fb8e407 Author: Felix Fietkau Date: Mon Oct 8 10:39:24 2018 +0200 mt76: do not store aggregation sequence number for null-data frames Fixes a rare corner case where a BlockAckReq might get the wrong sequence number. Signed-off-by: Felix Fietkau commit 09580a1ec4e9c3d62c7386e2b227b4a6b586e6b8 Author: Stanislaw Gruszka Date: Mon Oct 8 13:22:20 2018 +0200 mt76x0: remove dma.h dma.h is not used any longer. Signed-off-by: Stanislaw Gruszka Signed-off-by: Felix Fietkau commit f3727daed83279bc1571b23222e7937949e978c6 Author: Stanislaw Gruszka Date: Mon Oct 8 13:22:00 2018 +0200 mt76: reserve enough room for USB tx skbs Reserve enough room for USB skb, so we don not need to check the room every time we send frame. Signed-off-by: Stanislaw Gruszka Signed-off-by: Felix Fietkau commit 4ce78b048c4908118cfd5345f16241f58b85e5c6 Author: Lorenzo Bianconi Date: Sun Oct 7 11:57:22 2018 +0200 mt76x0: pci: add mt76x0_register_device in mt76x0e_register_device Run mt76x0_register_device routine in mt76x0e_register_device in order to register the device to the mac80211 layer. Moreover init mt76_driver_ops data structure and register interrupt line Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 320c85e6d038e75c0b895dde8c10c5d1bf9aab5f Author: Lorenzo Bianconi Date: Sun Oct 7 11:57:21 2018 +0200 mt76: disable ldpc coding for mt76x0 devices Disable ldpc coding for mt76x0 devices. Morover remove mt76x02_mac_fill_txwi routine since it is used just in mt76x02_mac_write_txwi Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 78e62de3227f99d0e18714f49f8a58f3f9a98af6 Author: Lorenzo Bianconi Date: Sun Oct 7 11:57:20 2018 +0200 mt76x0: pci: add missing mac80211 callbacks Add missing mac80211 callbacks in mt76x0e_ops data structure Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 127aa72691ff567ea220c095843bf8d66f84e9af Author: Lorenzo Bianconi Date: Sun Oct 7 11:51:16 2018 +0200 mt76x0: pci: report firmware version using ethtool Report via ethtool fw_ver and build_ver members of mt76x02_fw_header data structure similarly to what is reported in the syslog Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 26a9daa69123f599b95e01c31313e6bbc4047bdb Author: Lorenzo Bianconi Date: Sun Oct 7 11:45:24 2018 +0200 mt76: use mt76x02_dev instead of mt76_dev in mt76x02_eeprom.c Use mt76x02_dev data structure as reference in mt76x02_eeprom.c instead of mt76_dev Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 91be8e8a2c4f72cf5aedaddb27a716bf9b1d0625 Author: Lorenzo Bianconi Date: Sun Oct 7 11:45:23 2018 +0200 mt76: use mt76x02_dev instead of mt76_dev in mt76x02_txrx.c Use mt76x02_dev data structure as reference in mt76x02_txrx.c instead of mt76_dev Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 8d66af49a3db9a74c34c0bbf9b47e376fc1f7019 Author: Lorenzo Bianconi Date: Sun Oct 7 11:45:22 2018 +0200 mt76: use mt76x02_dev instead of mt76_dev in mt76x02_mac.c Use mt76x02_dev data structure as reference in mt76x02_mac.c instead of mt76_dev Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 95c3e451e6277462790b56aac568414c067a11f8 Author: Lorenzo Bianconi Date: Sun Oct 7 11:45:21 2018 +0200 mt76: use mt76x02_dev instead of mt76_dev in mt76x02_usb_mcu.c Use mt76x02_dev data structure as reference in mt76x02_usb_mcu.c instead of mt76_dev Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit d87cf75f11118367f2e85dd049be9cab22ae0138 Author: Lorenzo Bianconi Date: Sun Oct 7 11:45:20 2018 +0200 mt76: use mt76x02_dev instead of mt76_dev in mt76x02_util.c Use mt76x02_dev data structure as reference in mt76x02_util.c instead of mt76_dev Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit bfdff5d03e9bc6837acd0bad574cb263d6e345c3 Author: Lorenzo Bianconi Date: Sun Oct 7 11:45:19 2018 +0200 mt76: use mt76x02_dev instead of mt76_dev in mt76x02_phy.c Use mt76x02_dev data structure as reference in mt76x02_phy.c instead of mt76_dev Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 499cd0aa3ba60e202abf233d7a7b5e8a4b725d37 Author: Lorenzo Bianconi Date: Sun Oct 7 11:45:18 2018 +0200 mt76: use mt76x02_dev instead of mt76_dev in mt76x02_mcu.c Use mt76x02_dev data structure as reference in mt76x02_mcu.c instead of mt76_dev Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit a14054ce0b8ada03a7ddea14e51812e2fd583c94 Author: Lorenzo Bianconi Date: Sun Oct 7 11:37:40 2018 +0200 mt76x0: phy: fix bank check in mt76x0_rf_csr_{wr,rr} Fix typo in bank check in mt76x0_rf_csr_{wr,rr} routines. This issue has never been hit since mt76x0_rf_csr_{wr,rr} are actually used just by pci code Fixes: 10de7a8b4ab9 ("mt76x0: phy files") Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 69cacac3b3ffdd9495e83bc34674d3fab34aaa44 Author: Stanislaw Gruszka Date: Thu Oct 4 12:04:55 2018 +0200 mt76x0: use bus helper to identify rf access method Use mt76_is_usb() to identify RF access method instead of MT76_STATE_MCU_RUNNING flag and add warning since MCU has to be initialized before we can access RF registers via MCU. Signed-off-by: Stanislaw Gruszka Signed-off-by: Felix Fietkau commit f2761e53d69fb851f54429c030fcc6c42ed68a51 Author: Stanislaw Gruszka Date: Thu Oct 4 12:04:54 2018 +0200 mt76x0: correct RF reg pairs write for PCIe We have to use RF CSR method for PCIe. Signed-off-by: Stanislaw Gruszka Signed-off-by: Felix Fietkau commit c50479fa7a9e3379359d188aefc90f17fea216fe Author: Stanislaw Gruszka Date: Thu Oct 4 12:04:53 2018 +0200 mt76: allow to identify bus Add helpers to identify bus type. Signed-off-by: Stanislaw Gruszka Signed-off-by: Felix Fietkau commit 6f223a3dab94b9f39ea89ab9d912dec9bcbca666 Author: Stanislaw Gruszka Date: Thu Oct 4 12:04:52 2018 +0200 mt76x0: correct RF access via RF_CSR register. PCIe version don't use MCU for RF registers access. We need to correct RF CSR method to support up to 127 RF registers. Signed-off-by: Stanislaw Gruszka Signed-off-by: Felix Fietkau commit bed259051dc3ae5754f63fa18b0c5e383b5c1314 Author: Stanislaw Gruszka Date: Thu Oct 4 12:04:51 2018 +0200 mt76x0: print BBP version only for debug Use dev_dbg to print BBP version. Signed-off-by: Stanislaw Gruszka Signed-off-by: Felix Fietkau commit c8ca6e70fb74cd3bb6fc0738aed40991b9de0b87 Author: Marek Behún Date: Wed Oct 10 17:17:27 2018 +0200 watchdog: armada_37xx_wdt: use do_div for u64 division When the driver is built on 32 bit architectures during compile test, the linker complains about "__udivdi3" being undefined. We have to use do_div macro instead of the division operator when dividing u64 value. Signed-off-by: Marek Behún Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit cd69606ad05e1d6a930e2d29ac277c00108ef908 Author: Marek Behún Date: Mon Sep 24 13:06:53 2018 +0200 documentation: watchdog: add documentation for armada-37xx-wdt Add documentation for the kernel module parameters accepted by armada-37xx-wdt. Signed-off-by: Marek Behún Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 8562205592a69dd8817f9ff361fc0ffc55f5e9fe Author: Marek Behún Date: Mon Sep 24 13:06:52 2018 +0200 dt-bindings: watchdog: Document armada-37xx-wdt binding This adds device tree binding documentation for the CPU watchdog found on Armada 37xx SOCs (EspressoBin, Turris Mox). Signed-off-by: Marek Behún Cc: Rob Herring Cc: devicetree@vger.kernel.org Reviewed-by: Rob Herring Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 54e3d9b518c8a2a7a3acb14a5912fafd8ef38f40 Author: Marek Behún Date: Mon Sep 24 13:06:51 2018 +0200 watchdog: Add support for Armada 37xx CPU watchdog This adds support for the CPU watchdog found on Marvell Armada 37xx SoCs. There are 4 counters which can be set as CPU watchdog counters. This driver uses the second counter (ID 1, counting from 0) as watchdog counter, and first counter (ID 0) to implement pinging on the second counter without the need to disable it. Since counters IDs 2 and 3 are enabled already before even U-Boot starts, this driver does not use them at all, for example by adding a device tree property for counter selection. Signed-off-by: Marek Behún Reviewed-by: Guenter Roeck Tested-by: Miquel Raynal Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 270c4265f259e4f9695b86b1ded00f7f202ecba4 Author: Christophe Leroy Date: Mon Sep 17 06:22:53 2018 +0000 dt-bindings: watchdog: add mpc8xxx-wdt support Add description of DT bindings for mpc8xxx-wdt driver which handles the CPU watchdog timer on the mpc83xx, mpc86xx and mpc8xx. Signed-off-by: Christophe Leroy Reviewed-by: Rob Herring Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 38e48b718934d32d45bb9f917b3430822fca76bb Author: Christophe Leroy Date: Mon Sep 17 06:22:50 2018 +0000 watchdog: mpc8xxx: provide boot status mpc8xxx watchdog driver supports the following platforms: - mpc8xx - mpc83xx - mpc86xx Those three platforms have a 32 bits register which provides the reason of the last boot, including whether it was caused by the watchdog. mpc8xx: Register RSR, bit SWRS (bit 3) mpc83xx: Register RSR, bit SWRS (bit 28) mpc86xx: Register RSTRSCR, bit WDT_RR (bit 11) This patch maps the register as defined in the device tree and updates wdt.bootstatus based on the value of the watchdog related bit. Then the information can be retrieved via the WDIOC_GETBOOTSTATUS ioctl. Hereunder is an example of devicetree for mpc8xx, the Reset Status Register being at offset 0x288: WDT: watchdog@0 { compatible = "fsl,mpc823-wdt"; reg = <0x0 0x10 0x288 0x4>; }; On the mpc83xx, RSR is at offset 0x910 On the mpc86xx, RSTRSCR is at offset 0xe0094 Suggested-by: Radu Rendec Tested-by: Christophe Leroy # On mpc885 Signed-off-by: Christophe Leroy Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit ed18e423a3d9b2dc9db801358b754e722fcabaff Author: Christophe Leroy Date: Tue Oct 9 13:51:37 2018 +0000 drivers/block/z2ram: use ioremap_wt() instead of __ioremap(_PAGE_WRITETHRU) _PAGE_WRITETHRU is a target specific flag. Prefer generic functions. Acked-by: Geert Uytterhoeven Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman commit e04e39507c3c3da9cba31ee2e52f51b10b6350d0 Author: Christophe Leroy Date: Tue Oct 9 13:51:35 2018 +0000 drivers/video/fbdev: use ioremap_wc/wt() instead of __ioremap() _PAGE_NO_CACHE is a platform specific flag. In addition, this flag is misleading because one would think it requests a noncached page whereas a noncached page is _PAGE_NO_CACHE | _PAGE_GUARDED _PAGE_NO_CACHE alone means write combined noncached page, so lets use ioremap_wc() instead. _PAGE_WRITETHRU is also platform specific flag. Use ioremap_wt() instead. Signed-off-by: Christophe Leroy Acked-by: Daniel Vetter Acked-by: Bartlomiej Zolnierkiewicz Signed-off-by: Michael Ellerman commit c894696188d5c2af1e636e458190e80c53fb893d Author: Colin Ian King Date: Mon Oct 8 09:50:28 2018 +0100 rtlwifi: rtl8821ae: replace _rtl8821ae_mrate_idx_to_arfr_id with generic version Function _rtl8821ae_mrate_idx_to_arfr_id is functionally identical to the generic version rtl_mrate_idx_to_arfr_id, so remove _rtl8821ae_mrate_idx_to_arfr_id and use the generic one instead. This also fixes a missing break statement found by CoverityScan in _rtl8821ae_mrate_idx_to_arfr_id, namely: CID#1167237 ("Missing break in switch") Thanks to Joe Perches for spotting this when I submitted an earlier patch. Fixes: 3c05bedb5fef ("Staging: rtl8812ae: Add Realtek 8821 PCI WIFI driver") Signed-off-by: Colin Ian King ACKed-by: Larry Finger Signed-off-by: Kalle Valo commit d8c27ba86a2fd806d3957e5a9b30e66dfca2a61d Author: Dan Carpenter Date: Sat Oct 13 13:28:43 2018 +0300 EDAC, thunderx: Fix memory leak in thunderx_l2c_threaded_isr() Fix memory leak in L2c threaded interrupt handler. [ bp: Rewrite commit message. ] Fixes: 41003396f932 ("EDAC, thunderx: Add Cavium ThunderX EDAC driver") Signed-off-by: Dan Carpenter Signed-off-by: Borislav Petkov CC: David Daney CC: Jan Glauber CC: Mauro Carvalho Chehab CC: Sergey Temerkhanov CC: linux-edac Link: http://lkml.kernel.org/r/20181013102843.GG16086@mwanda commit 3d71c3f1f50cf309bd20659422af549bc784bfff Author: Luca Coelho Date: Sat Oct 13 09:46:08 2018 +0300 iwlwifi: mvm: check return value of rs_rate_from_ucode_rate() The rs_rate_from_ucode_rate() function may return -EINVAL if the rate is invalid, but none of the callsites check for the error, potentially making us access arrays with index IWL_RATE_INVALID, which is larger than the arrays, causing an out-of-bounds access. This will trigger KASAN warnings, such as the one reported in the bugzilla issue mentioned below. This fixes https://bugzilla.kernel.org/show_bug.cgi?id=200659 Cc: stable@vger.kernel.org Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo commit 12f7a1867467e44507e5da5fc01c0479ce9a14b3 Merge: d864991b220b 724fe7710ac5 Author: Kalle Valo Date: Sat Oct 13 14:47:09 2018 +0300 Merge tag 'iwlwifi-next-for-kalle-2018-10-12' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next Fourth set of iwlwifi patches intended for 4.20 * Support for a new scan type; * Clean-up in the queue handling code; * A few bug fixes; commit 86c391bd5f47101acf1f3e0abd9fe0616ae2a4fb Author: Christophe Leroy Date: Tue Oct 9 13:51:33 2018 +0000 powerpc/32: Add ioremap_wt() and ioremap_coherent() Other arches have ioremap_wt() to map IO areas write-through. Implement it on PPC as well in order to avoid drivers using __ioremap(_PAGE_WRITETHRU) Also implement ioremap_coherent() to avoid drivers using __ioremap(_PAGE_COHERENT) Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman commit dfd718a2ed1f678e66749ffe41bdeafedf3f4314 Author: Gautham R. Shenoy Date: Mon Oct 1 16:10:39 2018 +0530 powerpc/rtas: Fix a potential race between CPU-Offline & Migration Live Partition Migrations require all the present CPUs to execute the H_JOIN call, and hence rtas_ibm_suspend_me() onlines any offline CPUs before initiating the migration for this purpose. The commit 85a88cabad57 ("powerpc/pseries: Disable CPU hotplug across migrations") disables any CPU-hotplug operations once all the offline CPUs are brought online to prevent any further state change. Once the CPU-Hotplug operation is disabled, the code assumes that all the CPUs are online. However, there is a minor window in rtas_ibm_suspend_me() between onlining the offline CPUs and disabling CPU-Hotplug when a concurrent CPU-offline operations initiated by the userspace can succeed thereby nullifying the the aformentioned assumption. In this unlikely case these offlined CPUs will not call H_JOIN, resulting in a system hang. Fix this by verifying that all the present CPUs are actually online after CPU-Hotplug has been disabled, failing which we restore the state of the offline CPUs in rtas_ibm_suspend_me() and return an -EBUSY. Cc: Nathan Fontenot Cc: Tyrel Datwyler Suggested-by: Michael Ellerman Signed-off-by: Gautham R. Shenoy Reviewed-by: Nathan Fontenot Signed-off-by: Michael Ellerman commit 500fe5f550ec6dbc1d7d3154d8eccc7cb834d434 Author: Gautham R. Shenoy Date: Thu Oct 11 11:03:03 2018 +0530 powerpc/cacheinfo: Report the correct shared_cpu_map on big-cores Currently on POWER9 SMT8 cores systems, in sysfs, we report the shared_cache_map for L1 caches (both data and instruction) to be the cpu-ids of the threads in SMT8 cores. This is incorrect since on POWER9 SMT8 cores there are two groups of threads, each of which shares its own L1 cache. This patch addresses this by reporting the shared_cpu_map correctly in sysfs for L1 caches. Before the patch /sys/devices/system/cpu/cpu0/cache/index0/shared_cpu_map : 000000ff /sys/devices/system/cpu/cpu0/cache/index1/shared_cpu_map : 000000ff /sys/devices/system/cpu/cpu1/cache/index0/shared_cpu_map : 000000ff /sys/devices/system/cpu/cpu1/cache/index1/shared_cpu_map : 000000ff After the patch /sys/devices/system/cpu/cpu0/cache/index0/shared_cpu_map : 00000055 /sys/devices/system/cpu/cpu0/cache/index1/shared_cpu_map : 00000055 /sys/devices/system/cpu/cpu1/cache/index0/shared_cpu_map : 000000aa /sys/devices/system/cpu/cpu1/cache/index1/shared_cpu_map : 000000aa Signed-off-by: Gautham R. Shenoy Signed-off-by: Michael Ellerman commit 8e8a31d7fd54d68fc9c6c1e69f52ccdaf43b01ea Author: Gautham R. Shenoy Date: Thu Oct 11 11:03:02 2018 +0530 powerpc: Use cpu_smallcore_sibling_mask at SMT level on bigcores POWER9 SMT8 cores consist of two groups of threads, where threads in each group shares L1-cache. The scheduler is not aware of this distinction as the current sched-domain hierarchy has all the threads of the core defined at the SMT domain. SMT [Thread siblings of the SMT8 core] DIE [CPUs in the same die] NUMA [All the CPUs in the system] Due to this, we can observe run-to-run variance when we run a multi-threaded benchmark bound to a single core based on how the scheduler spreads the software threads across the two groups in the core. We fix this in this patch by defining each group of threads which share L1-cache to be the SMT level. The group of threads in the SMT8 core is defined to be the CACHE level. The sched-domain hierarchy after this patch will be : SMT [Thread siblings in the core that share L1 cache] CACHE [Thread siblings that are in the SMT8 core] DIE [CPUs in the same die] NUMA [All the CPUs in the system] Signed-off-by: Gautham R. Shenoy Signed-off-by: Michael Ellerman commit 425752c63b6f3fed7b5a9cba2b8101a92cf36995 Author: Gautham R. Shenoy Date: Thu Oct 11 11:03:01 2018 +0530 powerpc: Detect the presence of big-cores via "ibm, thread-groups" On IBM POWER9, the device tree exposes a property array identifed by "ibm,thread-groups" which will indicate which groups of threads share a particular set of resources. As of today we only have one form of grouping identifying the group of threads in the core that share the L1 cache, translation cache and instruction data flow. This patch adds helper functions to parse the contents of "ibm,thread-groups" and populate a per-cpu variable to cache information about siblings of each CPU that share the L1, traslation cache and instruction data-flow. It also defines a new global variable named "has_big_cores" which indicates if the cores on this configuration have multiple groups of threads that share L1 cache. For each online CPU, it maintains a cpu_smallcore_mask, which indicates the online siblings which share the L1-cache with it. Signed-off-by: Gautham R. Shenoy Signed-off-by: Michael Ellerman commit bf6cbd0c87f30d0e4401be91a8161ce11079027a Author: Michael Ellerman Date: Fri Oct 12 22:09:09 2018 +1100 powerpc: Fix stackprotector detection for non-glibc toolchains If GCC is not built with glibc support then we must explicitly tell it which register to use for TLS mode stack protector, otherwise it will error out and the cc-option check will fail. Signed-off-by: Michael Ellerman commit 50530f5eac0c023cfc313d7ed342d4f1731becdb Author: Michael Ellerman Date: Fri Oct 12 13:58:52 2018 +1100 powerpc/xmon: Show the stack protector canary in xmon This is helpful for debugging stack protector crashes. Signed-off-by: Michael Ellerman commit ed9e84a4d703243a232e6549a13dedfaf0d5d2d8 Author: Joel Stanley Date: Fri Oct 12 13:14:06 2018 +1030 powerpc: Use SWITCH_FRAME_SIZE for prom and rtas entry Commit 6c1719942e19 ("powerpc/of: Remove useless register save/restore when calling OF back") removed the saving of srr0 and srr1 when calling into OpenFirmware. Commit e31aa453bbc4 ("powerpc: Use LOAD_REG_IMMEDIATE only for constants on 64-bit") did the same for rtas. This means we don't need to save the extra stack space and can use the common SWITCH_FRAME_SIZE. There were already no users of _SRR0 and _SRR1 so we can remove them too. Link: https://github.com/linuxppc/linux/issues/83 Signed-off-by: Joel Stanley Signed-off-by: Michael Ellerman commit 65b9fdadfc4d87e2577b791fb3495cd39c93d8c0 Author: Michael Bringmann Date: Tue Oct 9 15:12:14 2018 -0500 powerpc/pseries/mobility: Extend start/stop topology update scope The powerpc mobility code may receive RTAS requests to perform PRRN (Platform Resource Reassignment Notification) topology changes at any time, including during LPAR migration operations. In some configurations where the affinity of CPUs or memory is being changed on that platform, the PRRN requests may apply or refer to outdated information prior to the complete update of the device-tree. This patch changes the duration for which topology updates are suppressed during LPAR migrations from just the rtas_ibm_suspend_me() / 'ibm,suspend-me' call(s) to cover the entire migration_store() operation to allow all changes to the device-tree to be applied prior to accepting and applying any PRRN requests. For tracking purposes, pr_info notices are added to the functions start_topology_update() and stop_topology_update() of 'numa.c'. Signed-off-by: Michael Bringmann Reviewed-by: Nathan Fontenot Signed-off-by: Michael Ellerman commit 960e30029863db95ec79a71009272d4661db5991 Author: Joel Stanley Date: Thu Oct 11 13:13:03 2018 +1030 powerpc/Makefile: Fix PPC_BOOK3S_64 ASFLAGS Ever since commit 15a3204d24a3 ("powerpc/64s: Set assembler machine type to POWER4") we force -mpower4 to be passed to the assembler irrespective of the CFLAGS used (for Book3s 64). When building a powerpc64 kernel with clang, clang will not add -many to the assembler flags, so any instructions that the compiler has generated that are not available on power4 will cause an error: /usr/bin/as -a64 -mppc64 -mlittle-endian -mpower8 \ -I ./arch/powerpc/include -I ./arch/powerpc/include/generated \ -I ./include -I ./arch/powerpc/include/uapi \ -I ./arch/powerpc/include/generated/uapi -I ./include/uapi \ -I ./include/generated/uapi -I arch/powerpc -I arch/powerpc \ -maltivec -mpower4 -o init/do_mounts.o /tmp/do_mounts-3b0a3d.s /tmp/do_mounts-51ce54.s:748: Error: unrecognized opcode: `isel' GCC does include -many, so the GCC driven gas call will succeed: as -v -I ./arch/powerpc/include -I ./arch/powerpc/include/generated -I ./include -I ./arch/powerpc/include/uapi -I ./arch/powerpc/include/generated/uapi -I ./include/uapi -I ./include/generated/uapi -I arch/powerpc -I arch/powerpc -a64 -mpower8 -many -mlittle -maltivec -mpower4 -o init/do_mounts.o Note that isel is power7 and above for IBM CPUs. GCC only generates it for Power9 and above, but the above test was run against the clang generated assembly. Peter Bergner explains: When using -many -mpower4, gas will first try and find a matching power4 mnemonic and failing that, it will then allow any valid mnemonic that gas knows about. GCC's use of -many predates me though. IIRC, Alan looked at trying to remove it, but I forget why he didn't. Could be either a gcc or gas issue at the time. I'm not sure whether issue still exists or not. He and I have modified how gas works internally a fair amount since he tried removing gcc use of -many. I will also note that when using -many, gas will choose the first mnemonic that matches in the mnemonic table and we have (mostly) sorted the table so that server mnemonics show up earlier in the table than other mnemonics, so they'll be seen/chosen first. By explicitly setting -many we can build with Clang and GCC while retaining the -mpower4 option. Signed-off-by: Joel Stanley Signed-off-by: Michael Ellerman commit b45e9d761ba2d60044b610297e3ef9f947ac157f Author: YueHaibing Date: Tue Oct 9 21:59:13 2018 +0800 powerpc/pseries/memory-hotplug: Fix return value type of find_aa_index The variable 'aa_index' is defined as an unsigned value in update_lmb_associativity_index(), but find_aa_index() may return -1 when dlpar_clone_property() fails. So change find_aa_index() to return a bool, which indicates whether 'aa_index' was found or not. Fixes: c05a5a40969e ("powerpc/pseries: Dynamic add entires to associativity lookup array") Signed-off-by: YueHaibing Reviewed-by: Nathan Fontenot nfont@linux.vnet.ibm.com> [mpe: Tweak changelog, rename is_found to just found] Signed-off-by: Michael Ellerman commit b90484ec1137424f606832a22f24d6cfc62a1427 Author: Sam Bobroff Date: Wed Sep 12 11:23:33 2018 +1000 powerpc/eeh: Cleanup control flow in eeh_handle_normal_event() Rather than mixing "if (state)" blocks and gotos, convert entirely to "if (state)" blocks to make the state machine behaviour clearer. Signed-off-by: Sam Bobroff Signed-off-by: Michael Ellerman commit fef7f905523fb96b431e5e73487a689c10c77875 Author: Sam Bobroff Date: Wed Sep 12 11:23:32 2018 +1000 powerpc/eeh: Cleanup eeh_ops.wait_state() The wait_state member of eeh_ops does not need to be platform dependent; it's just logic around eeh_ops.get_state(). Therefore, merge the two (slightly different!) platform versions into a new function, eeh_wait_state() and remove the eeh_ops member. While doing this, also correct: * The wait logic, so that it never waits longer than max_wait. * The wait logic, so that it never waits less than EEH_STATE_MIN_WAIT_TIME. * One call site where the result is treated like a bit field before it's checked for negative error values. * In pseries_eeh_get_state(), rename the "state" parameter to "delay" because that's what it is. Signed-off-by: Sam Bobroff Signed-off-by: Michael Ellerman commit e762bb891a294af00b83f54062dae4e24565edf8 Author: Sam Bobroff Date: Wed Sep 12 11:23:31 2018 +1000 powerpc/eeh: Cleanup eeh_pe_state_mark() Currently, eeh_pe_state_mark() marks a PE (and it's children) with a state and then performs additional processing if that state included EEH_PE_ISOLATED. The state parameter is always a constant at the call site, so rearrange eeh_pe_state_mark() into two functions and just call the appropriate one at each site. Signed-off-by: Sam Bobroff Signed-off-by: Michael Ellerman commit eed4bdbeecd0b59d3e487d1a2b726d51810015ab Author: Sam Bobroff Date: Wed Sep 12 11:23:30 2018 +1000 powerpc/eeh: Cleanup unnecessary eeh_pe_state_mark_with_cfg() The function eeh_pe_state_mark_with_cfg() just performs the work of eeh_pe_state_mark() and then, conditionally, the work of eeh_pe_state_clear(). However it is only ever called with a constant state such that the condition is always true, so replace it by direct calls. Signed-off-by: Sam Bobroff Signed-off-by: Michael Ellerman commit 54644927a01d53b69e0e27e4778d329049c1c335 Author: Sam Bobroff Date: Wed Sep 12 11:23:29 2018 +1000 powerpc/eeh: Cleanup eeh_enabled() Signed-off-by: Sam Bobroff Signed-off-by: Michael Ellerman commit 9a3eda266fb55fee0e19f2afbbc57607fa379d23 Author: Sam Bobroff Date: Wed Sep 12 11:23:28 2018 +1000 powerpc/eeh: Cleanup logic in eeh_rmv_from_parent_pe() Move the call to eeh_dev_to_pe() up, so that later it's clear that "pe" isn't NULL. Signed-off-by: Sam Bobroff Signed-off-by: Michael Ellerman commit 1c5c533b149f02d0ce00fc7ab5810766398acc11 Author: Sam Bobroff Date: Wed Sep 12 11:23:27 2018 +1000 powerpc/eeh: Cleanup field names in eeh_rmv_data Change the name of the fields in eeh_rmv_data to clarify their usage. Change "edev_list" to "removed_vf_list" because it does not contain generic edevs, but rather only edevs that contain virtual functions (which need to be removed during recovery). Similarly, change "removed" to "removed_dev_count" because it is a count of any removed devices, not just those in the above list. Signed-off-by: Sam Bobroff Signed-off-by: Michael Ellerman commit 80e65b009413e3d36eb7f24cbcab49a201c3088d Author: Sam Bobroff Date: Wed Sep 12 11:23:26 2018 +1000 powerpc/eeh: Cleanup list_head field names Instances of struct eeh_pe are placed in a tree structure using the fields "child_list" and "child", so place these next to each other in the definition. The field "child" is a list entry, so remove the unnecessary and misleading use of the list initializer, LIST_HEAD(), on it. The eeh_dev struct contains two list entry fields, called "list" and "rmv_list". Rename them to "entry" and "rmv_entry" and, as above, stop initializing them with LIST_HEAD(). Signed-off-by: Sam Bobroff Signed-off-by: Michael Ellerman commit bf773df9d12f73daaa60584b43d6deb21f9c9fc1 Author: Sam Bobroff Date: Wed Sep 12 11:23:25 2018 +1000 powerpc/eeh: Cleanup eeh_add_virt_device() Remove the unnecessary cast through void * on the first parameter and remove the unused second parameter (always NULL). Signed-off-by: Sam Bobroff Signed-off-by: Michael Ellerman commit b95a46062bd44ae7d5685d467c39fb3181b05798 Author: Sam Bobroff Date: Wed Sep 12 11:23:24 2018 +1000 powerpc/eeh: Cleanup unused field in eeh_dev The 'bus' member of struct eeh_dev is assigned to once but never used, so remove it. Signed-off-by: Sam Bobroff Signed-off-by: Michael Ellerman commit bffc0176e7d0ae0f560aaa9b702dd9264433d780 Author: Sam Bobroff Date: Wed Sep 12 11:23:23 2018 +1000 powerpc/eeh: Cleanup EEH_POSTPONED_PROBE Currently a flag, EEH_POSTPONED_PROBE, is used to prevent an incorrect message "EEH: No capable adapters found" from being displayed during the boot of powernv systems. It is necessary because, on powernv, the call to eeh_probe_devices() made from eeh_init() is too early and EEH can't yet be enabled. A second call is made later from eeh_pnv_post_init(), which succeeds. (On pseries, the first call succeeds because PCI devices are set up early enough and no second call is made.) This can be simplified by moving the early call to eeh_probe_devices() from eeh_init() (where it's seen by both platforms) to pSeries_final_fixup(), so that each platform only calls eeh_probe_devices() once, at a point where it can succeed. This is slightly later in the boot sequence, but but still early enough and it is now in the same place in the sequence for both platforms (the pcibios_fixup hook). The display of the message can be cleaned up as well, by moving it into eeh_probe_devices(). Signed-off-by: Sam Bobroff Signed-off-by: Michael Ellerman commit 473af09b56dc4be68e4af33220ceca6be67aa60d Author: Sam Bobroff Date: Wed Sep 12 11:23:22 2018 +1000 powerpc/eeh: Fix use of EEH_PE_KEEP on wrong field eeh_add_to_parent_pe() sometimes removes the EEH_PE_KEEP flag, but it incorrectly removes it from pe->type, instead of pe->state. However, rather than clearing it from the correct field, remove it. Inspection of the code shows that it can't ever have had any effect (even if it had been cleared from the correct field), because the field is never tested after it is cleared by the statement in question. The clear statement was added by commit 807a827d4e74 ("powerpc/eeh: Keep PE during hotplug"), but it didn't explain why it was necessary. Signed-off-by: Sam Bobroff Signed-off-by: Michael Ellerman commit bcbe3730531239abd45ab6c6af4a18078b37dd47 Author: Sam Bobroff Date: Wed Sep 12 11:23:21 2018 +1000 powerpc/eeh: Fix null deref for devices removed during EEH If a device is removed during EEH processing (either by a driver's handler or as part of recovery), it can lead to a null dereference in eeh_pe_report_edev(). To handle this, skip devices that have been removed. Signed-off-by: Sam Bobroff Signed-off-by: Michael Ellerman commit f9bc28aedfb5bbd572d2d365f3095c1becd7209b Author: Sam Bobroff Date: Wed Sep 12 11:23:20 2018 +1000 powerpc/eeh: Fix possible null deref in eeh_dump_dev_log() If an error occurs during an unplug operation, it's possible for eeh_dump_dev_log() to be called when edev->pdn is null, which currently leads to dereferencing a null pointer. Handle this by skipping the error log for those devices. Signed-off-by: Sam Bobroff Signed-off-by: Michael Ellerman commit 747b21760822957750d41a430b4f3974852895f5 Author: Joel Stanley Date: Wed Oct 10 13:15:23 2018 +1030 powerpc/boot: Build boot wrapper with optimisations The boot wrapper is currently built with -Os. By building with O2 we can meaningfully reduce the time decompressing the kernel. I tested by comparing 10 runs of each option in Qemu and on hardware. The kernel is compressed with KERNEL_XZ built with GCC 8.2.0-7ubuntu1. The values are counts of the timebase. Qemu TCG powernv Power8: Os O2 O3 median 10221123889 6201518438 6568186825 stddev 1361267211 429090641 657930076 improvement 39.33% 35.74% Palmetto Power8: Os O2 O3 median 50279 50599 35790 stddev 992144533 627130655 623721078 improvement 36.79% 37.13% Romulus Power9: Os O2 O3 median 670312391 454733720 448881398 stddev 157569 107276 108760 improvement 32.16% 33.03% TCG was quite noisy, with every few runs producing an outlier. Even so, O2 is faster than O3. On hardware the numbers were less noisy and O3 is slightly faster than O2. The wrapper size increases when moving from Os. Comparing zImage.epapr to the existing Os build using bloat-o-meter: Before=43401, After=56837 (13KB), chg +30.96% Before=43401, After=64305 (20KB), chg +48.16% I chose O2 for a balance between Qemu and hardware speed up. Signed-off-by: Joel Stanley Signed-off-by: Michael Ellerman commit e8e132e6885962582784b6fa16a80d07ea739c0f Author: Joel Stanley Date: Wed Oct 10 13:15:22 2018 +1030 powerpc/boot: Disable vector instructions This will avoid auto-vectorisation when building with higher optimisation levels. We don't know if the machine can support VSX and even if it's present it's probably not going to be enabled at this point in boot. These flag were both added prior to GCC 4.6 which is the minimum compiler version supported by upstream, thanks to Segher for the details. Signed-off-by: Joel Stanley Signed-off-by: Michael Ellerman commit 1a855eaccf353f7ed1d51a3d4b3af727ccbd81ca Author: Joel Stanley Date: Wed Oct 10 09:58:03 2018 +1030 powerpc/boot: Fix opal console in boot wrapper As of commit 10c77dba40ff ("powerpc/boot: Fix build failure in 32-bit boot wrapper") the opal code is hidden behind CONFIG_PPC64_BOOT_WRAPPER, but the boot wrapper avoids include/linux, so it does not get the normal Kconfig flags. We can drop the guard entirely as in commit f8e8e69cea49 ("powerpc/boot: Only build OPAL code when necessary") the makefile only includes opal.c in the build if CONFIG_PPC64_BOOT_WRAPPER is set. Fixes: 10c77dba40ff ("powerpc/boot: Fix build failure in 32-bit boot wrapper") Signed-off-by: Joel Stanley Signed-off-by: Michael Ellerman commit 5e9dcb6188a40e604e66dc30fab30c2be89aa1cc Author: Joel Stanley Date: Wed Oct 10 09:58:02 2018 +1030 powerpc/boot: Expose Kconfig symbols to wrapper Currently the wrapper is built without including anything in $(src)/include/, which means there are no CONFIG_ symbols defined. This means the platform specific serial drivers were never enabled. We now copy the definitions into the boot directory, so any C file can now include autoconf.h to depend on configuration options. Fixes: 866bfc75f40e ("powerpc: conditionally compile platform-specific serial drivers") Signed-off-by: Joel Stanley [mpe: Fix to use $(objtree) to find autoconf.h] Signed-off-by: Michael Ellerman commit 719736e1cc12b2fc28eba2122893a449eee66d08 Author: Bartlomiej Zolnierkiewicz Date: Tue Oct 9 17:39:46 2018 +0200 powerpc: remove redundant 'default n' from Kconfig-s '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: Michael Ellerman commit b27e5f939b6d50e1b83e9febfee1c3f8de7789d7 Author: Oliver O'Halloran Date: Wed Oct 10 16:23:02 2018 +1100 powerpc/rtasd: Improve unknown error logging Currently when we get an unknown RTAS event it prints the type as "Unknown" and no other useful information. Add the raw type code to the log message so that we have something to work off. Signed-off-by: Oliver O'Halloran Reviewed-by: Vasant Hegde Signed-off-by: Michael Ellerman commit aea447141c7e7824b81b49acd1bc785506fba46e Author: Joel Stanley Date: Mon Sep 17 17:16:21 2018 +0930 powerpc: Disable -Wbuiltin-requires-header when setjmp is used The powerpc kernel uses setjmp which causes a warning when building with clang: In file included from arch/powerpc/xmon/xmon.c:51: ./arch/powerpc/include/asm/setjmp.h:15:13: error: declaration of built-in function 'setjmp' requires inclusion of the header [-Werror,-Wbuiltin-requires-header] extern long setjmp(long *); ^ ./arch/powerpc/include/asm/setjmp.h:16:13: error: declaration of built-in function 'longjmp' requires inclusion of the header [-Werror,-Wbuiltin-requires-header] extern void longjmp(long *, long); ^ This *is* the header and we're not using the built-in setjump but rather the one in arch/powerpc/kernel/misc.S. As the compiler warning does not make sense, it for the files where setjmp is used. Signed-off-by: Joel Stanley Reviewed-by: Nick Desaulniers [mpe: Move subdir-ccflags in xmon/Makefile to not clobber -Werror] Signed-off-by: Michael Ellerman commit 014704e6f54189a203cc14c7c0bb411b940241bc Author: Dan Carpenter Date: Mon Oct 1 19:44:58 2018 +0300 powerpc: Fix signedness bug in update_flash_db() The "count < sizeof(struct os_area_db)" comparison is type promoted to size_t so negative values of "count" are treated as very high values and we accidentally return success instead of a negative error code. This doesn't really change runtime much but it fixes a static checker warning. Signed-off-by: Dan Carpenter Acked-by: Geoff Levand Signed-off-by: Michael Ellerman commit 6233b6da0c00a9768bdab1c502115b960929889a Author: Joel Stanley Date: Tue Oct 9 16:50:38 2018 +1030 powerpc/perf: Quiet IMC PMU registration message On a Power9 box we get a few screens full of these on boot. Drop them to pr_debug. [ 5.993645] nest_centaur6_imc performance monitor hardware support registered [ 5.993728] nest_centaur7_imc performance monitor hardware support registered [ 5.996510] core_imc performance monitor hardware support registered [ 5.996569] nest_mba0_imc performance monitor hardware support registered [ 5.996631] nest_mba1_imc performance monitor hardware support registered [ 5.996685] nest_mba2_imc performance monitor hardware support registered Signed-off-by: Joel Stanley Reviewed-by: Madhavan Srinivasan Reviewed-by: Stewart Smith Signed-off-by: Michael Ellerman commit df13102f82f1c8d0a1f43505275bf18246d7f9a0 Author: Christophe Leroy Date: Sat Oct 6 16:51:16 2018 +0000 powerpc/process: Constify the number of insns printed by show instructions functions. instructions_to_print var is assigned value 16 and there is no way to change it. This patch replaces it by a constant. Reviewed-by: Murilo Opsfelder Araujo Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman commit fb2d9505c0dbd4f5e00db70f7ca0ca7a3d75ca63 Author: Christophe Leroy Date: Sat Oct 6 16:51:14 2018 +0000 powerpc/process: Fix interleaved output in show_user_instructions() When two processes crash at the same time, we sometimes encounter interleaving in the middle of a line: init[1]: segfault (11) at 0 nip 0 lr 0 code 1 init[1]: code: XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX init[74]: segfault (11) at 10a74 nip 1000c198 lr 100078c8 code 1 in sh[10000000+14000] XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX init[1]: code: XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX init[74]: code: 90010024 bf61000c 91490a7c 3fa01002 3be00000 7d3e4b78 3bbd0c20 3b600000 init[74]: code: 3b9d0040 7c7fe02e 2f830000 419e0028 <89230000> 2f890000 41be001c 4b7f6e79 This patch fixes it by preparing complete lines in a buffer and printing it at once. Fixes: 88b0fe1757359 ("powerpc: Add show_user_instructions()") Reviewed-by: Murilo Opsfelder Araujo Signed-off-by: Christophe Leroy [mpe: Use seq_buf_printf() not seq_buf_puts() which doesn't NULL terminate] Signed-off-by: Michael Ellerman commit c9386bfd37d37f29588de9ea9add455510049c33 Author: Christophe Leroy Date: Tue Oct 9 16:46:25 2018 +1100 powerpc/process: Add missing include of stacktrace.h As spotted by sparse: arch/powerpc/kernel/process.c:1302:6: warning: symbol 'show_user_instructions' was not declared. Should it be static? Fixes: 88b0fe1757359 ("powerpc: Add show_user_instructions()") Reviewed-by: Murilo Opsfelder Araujo Signed-off-by: Christophe Leroy [mpe: Split out of larger patch] Signed-off-by: Michael Ellerman commit 3b35bd48b8a06e02a25af84baba782876b8a6572 Author: Christophe Leroy Date: Sat Oct 6 16:51:12 2018 +0000 powerpc/process: Fix sparse address space warnings This patch fixes the following warnings, which are leftovers from when __get_user() was replaced by probe_kernel_address(). arch/powerpc/kernel/process.c:1287:22: warning: incorrect type in argument 2 (different address spaces) arch/powerpc/kernel/process.c:1287:22: expected void const *src arch/powerpc/kernel/process.c:1287:22: got unsigned int [noderef] * arch/powerpc/kernel/process.c:1319:21: warning: incorrect type in argument 2 (different address spaces) arch/powerpc/kernel/process.c:1319:21: expected void const *src arch/powerpc/kernel/process.c:1319:21: got unsigned int [noderef] * Fixes: 7b051f665c32d ("powerpc: Use probe_kernel_address in show_instructions") Reviewed-by: Murilo Opsfelder Araujo Signed-off-by: Christophe Leroy [mpe: Split out of larger patch] Signed-off-by: Michael Ellerman commit 7241d26e8175e95290a6549a470c330dbfc63442 Author: Christophe Leroy Date: Sat Oct 13 09:45:12 2018 +0000 powerpc/64: properly initialise the stackprotector canary on SMP. commit 06ec27aea9fc ("powerpc/64: add stack protector support") doesn't initialise the stack canary on SMP secondary CPU's paca, leading to the following false positive report from the stack protector. smp: Bringing up secondary CPUs ... Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: __schedule+0x978/0xa80 CPU: 1 PID: 0 Comm: swapper/1 Not tainted 4.19.0-rc7-next-20181010-autotest-autotest #1 Call Trace: [c000001fed5b3bf0] [c000000000a0ef3c] dump_stack+0xb0/0xf4 (unreliable) [c000001fed5b3c30] [c0000000000f9d68] panic+0x140/0x308 [c000001fed5b3cc0] [c0000000000f9844] __stack_chk_fail+0x24/0x30 [c000001fed5b3d20] [c000000000a2c3a8] __schedule+0x978/0xa80 [c000001fed5b3e00] [c000000000a2c9b4] schedule_idle+0x34/0x60 [c000001fed5b3e30] [c00000000013d344] do_idle+0x224/0x3d0 [c000001fed5b3ec0] [c00000000013d6e0] cpu_startup_entry+0x30/0x50 [c000001fed5b3ef0] [c000000000047f34] start_secondary+0x4d4/0x520 [c000001fed5b3f90] [c00000000000b370] start_secondary_prolog+0x10/0x14 This patch properly initialises the stack_canary of the secondary idle tasks. Reported-by: Abdul Haleem Fixes: 06ec27aea9fc ("powerpc/64: add stack protector support") Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman commit efebf0aaec3de4df2bdb2949ebaacacd82de37db Author: Liran Alon Date: Mon Oct 8 23:42:20 2018 +0300 KVM: nVMX: Do not flush TLB on L1<->L2 transitions if L1 uses VPID and EPT If L1 uses VPID, it expects TLB to not be flushed on L1<->L2 transitions. However, code currently flushes TLB nonetheless if we didn't allocate a vpid02 for L2. As in this case, vmcs02->vpid == vmcs01->vpid == vmx->vpid. But, if L1 uses EPT, TLB entires populated by L2 are tagged with EPTP02 while TLB entries populated by L1 are tagged with EPTP01. Therefore, we can also avoid TLB flush if L1 uses VPID and EPT. Reviewed-by: Mihai Carabas Reviewed-by: Darren Kenny Reviewed-by: Nikita Leshenko Signed-off-by: Liran Alon Signed-off-by: Paolo Bonzini commit 327c072187f7af4e4a371b635099f615c14082a7 Author: Liran Alon Date: Mon Oct 8 23:42:19 2018 +0300 KVM: nVMX: Flush linear and combined mappings on VPID02 related flushes All VPID12s used on a given L1 vCPU is translated to a single VPID02 (vmx->nested.vpid02 or vmx->vpid). Therefore, on L1->L2 VMEntry, we need to invalidate linear and combined mappings tagged by VPID02 in case L1 uses VPID and vmcs12->vpid was changed since last L1->L2 VMEntry. However, current code invalidates the wrong mappings as it calls __vmx_flush_tlb() with invalidate_gpa parameter set to true which will result in invalidating combined and guest-physical mappings tagged with active EPTP which is EPTP01. Similarly, INVVPID emulation have the exact same issue. Fix both issues by just setting invalidate_gpa parameter to false which will result in invalidating linear and combined mappings tagged with given VPID02 as required. Reviewed-by: Nikita Leshenko Reviewed-by: Mark Kanda Signed-off-by: Liran Alon Signed-off-by: Paolo Bonzini commit 3d5bdae8b16418781ec2c34a024aceee66267322 Author: Liran Alon Date: Mon Oct 8 23:42:18 2018 +0300 KVM: nVMX: Use correct VPID02 when emulating L1 INVVPID In case L0 didn't allocate vmx->nested.vpid02 for L2, vmcs02->vpid is set to vmx->vpid. Consider this case when emulating L1 INVVPID in L0. Reviewed-by: Nikita Leshenko Reviewed-by: Mark Kanda Signed-off-by: Liran Alon Signed-off-by: Paolo Bonzini commit 1438921c6dc1bbdce800bfc7db04bd15cb260fc0 Author: Liran Alon Date: Mon Oct 8 23:42:17 2018 +0300 KVM: nVMX: Flush TLB entries tagged by dest EPTP on L1<->L2 transitions If L1 and L2 share VPID (because L1 don't use VPID or we haven't allocated a vpid02), we need to flush TLB on L1<->L2 transitions. Before this patch, this TLB flushing was done by vmx_flush_tlb(). If L0 use EPT, this will translate into INVEPT(active_eptp); However, if L1 use EPT, in L1->L2 VMEntry, active EPTP is EPTP01 but TLB entries populated by L2 are tagged with EPTP02. Therefore we should delay vmx_flush_tlb() until active_eptp is EPTP02. To achieve this, instead of directly calling vmx_flush_tlb() we request it to be called by KVM_REQ_TLB_FLUSH which is evaluated after KVM_REQ_LOAD_CR3 which sets the active_eptp to EPTP02 as required. Similarly, on L2->L1 VMExit, active EPTP is EPTP02 but TLB entries populated by L1 are tagged with EPTP01 and therefore we should delay vmx_flush_tlb() until active_eptp is EPTP01. Reviewed-by: Mihai Carabas Reviewed-by: Darren Kenny Reviewed-by: Nikita Leshenko Signed-off-by: Liran Alon Signed-off-by: Paolo Bonzini commit 3de6347bf96abead5c5257b43a58ca0a057df894 Author: Sean Christopherson Date: Fri Jul 13 08:42:30 2018 -0700 KVM: vmx: rename KVM_GUEST_CR0_MASK tp KVM_VM_CR0_ALWAYS_OFF The KVM_GUEST_CR0_MASK macro tracks CR0 bits that are forced to zero by the VMX architecture, i.e. CR0.{NW,CD} must always be zero in the hardware CR0 post-VMXON. Rename the macro to clarify its purpose, be consistent with KVM_VM_CR0_ALWAYS_ON and avoid confusion with the CR0_GUEST_HOST_MASK field. Signed-off-by: Sean Christopherson Reviewed-by: Jim Mattson Signed-off-by: Paolo Bonzini commit 3d0d0d9b1d805e39456a9d49443d847092cb21ab Merge: 7dd2157cb61a ed3054a30258 Author: Paolo Bonzini Date: Sat Oct 13 12:00:26 2018 +0200 Merge tag 'kvm-s390-next-4.20-2' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux into HEAD KVM: s390/vfio-ap: Fixes and enhancements for vfio-ap - add tracing - fix a locking bug - make local functions and data static commit ce5a983191ce466cbe35e240ac09e28cca3e50c9 Author: Al Viro Date: Fri Sep 14 14:46:18 2018 -0400 kill TIOCSERGSTRUCT Once upon a time a bunch of serial drivers used to provide that; today it's only amiserial and it's FUBAR - the structure being copied to userland includes kernel pointers, fields with config-dependent size, etc. No userland code using it could possibly survive - e.g. enabling lockdep definitely changes the layout. Besides, it's a massive infoleak. Kill it. If somebody needs that data for debugging purposes, they can bloody well expose it saner ways. Assuming anyone does debugging of amiserial in the first place, that is. Signed-off-by: Al Viro commit f0193d3ea73b966b5dbfa272c8228d743b8856ef Author: Al Viro Date: Thu Sep 13 22:12:15 2018 -0400 change semantics of ldisc ->compat_ioctl() First of all, make it return int. Returning long when native method had never allowed that is ridiculous and inconvenient. More importantly, change the caller; if ldisc ->compat_ioctl() is NULL or returns -ENOIOCTLCMD, tty_compat_ioctl() will try to feed cmd and compat_ptr(arg) to ldisc's native ->ioctl(). That simplifies ->compat_ioctl() instances quite a bit - they only need to deal with ioctls that are neither generic tty ones (those would get shunted off to tty_ioctl()) nor simple compat pointer ones. Note that something like TCFLSH won't reach ->compat_ioctl(), even if ldisc ->ioctl() does handle it - it will be recognized earlier and passed to tty_ioctl() (and ultimately - ldisc ->ioctl()). For many ldiscs it means that NULL ->compat_ioctl() does the right thing. Those where it won't serve (see e.g. n_r3964.c) are also easily dealt with - we need to handle the numeric-argument ioctls (calling the native instance) and, if such would exist, the ioctls that need layout conversion, etc. All in-tree ldiscs dealt with. Signed-off-by: Al Viro commit 7ee329655189f32f0c17e0bad60c23a69b003e9e Author: Al Viro Date: Thu Sep 13 16:39:58 2018 -0400 kill TIOCSER[SG]WILD the only user is very old setserial rc script and even that (as far back as MCC Interim, AFAICS) doesn't actually fail - just gives one message during the boot ("Cannot scan for wild interrupts") and proceeds past that just fine. Signed-off-by: Al Viro commit 27230e51349fde075598c1b59d15e1ff802f3f6e Author: Al Viro Date: Wed Sep 12 20:57:18 2018 -0400 synclink_gt(): fix compat_ioctl() compat_ptr() for pointer-taking ones... Signed-off-by: Al Viro commit 50f45326afab723df529eca54095e2feac24da2d Author: Al Viro Date: Wed Sep 12 20:53:46 2018 -0400 pty: fix compat ioctls pointer-taking ones need compat_ptr(); int-taking one doesn't. Signed-off-by: Al Viro commit 82a6857bf9efa8f66e2476f248021c17cd423159 Author: Al Viro Date: Wed Sep 12 20:18:09 2018 -0400 compat_ioctl - kill keyboard ioctl handling all of those are provided only by vt and s390 tty3270; both have proper ->compat_ioctl() Signed-off-by: Al Viro commit 969ec01e992009200ecf7ba760f9fe8a95abf32a Author: Al Viro Date: Wed Sep 12 20:02:50 2018 -0400 gigaset: add ->compat_ioctl() ... and get rid of COMPAT_IOCTL() for its private ioctls Signed-off-by: Al Viro commit 9d1807daefc00c7b3a4ecca02e3a783263c1e00d Author: Al Viro Date: Wed Sep 12 19:02:10 2018 -0400 vt_compat_ioctl(): clean up, use compat_ptr() properly we need it for "convert the structure" cases too Signed-off-by: Al Viro commit 09d88c85769262aadc85a49d6d4e91d35c115db1 Author: Al Viro Date: Wed Sep 12 18:45:29 2018 -0400 gigaset: don't try to printk userland buffer contents especially when you've just copied it in... Signed-off-by: Al Viro commit 7ebec8d235419a92af42b2d20e0d6cb6dac07dd8 Author: Al Viro Date: Wed Sep 12 18:41:46 2018 -0400 dgnc: don't bother with (empty) stub for TCXONC for pity sake, that case is identical to their default: _and_ bears an explicit comment re leaving to ldisc. Which is what default is doing, obviously... Signed-off-by: Al Viro commit 88d50890b78f68ff047e4deee651ec4e256cefea Author: Al Viro Date: Wed Sep 12 18:40:04 2018 -0400 dgnc: leave TIOC[GS]SOFTCAR to ldisc no point duplicating that in tty_operations ->ioctl() Signed-off-by: Al Viro commit a3096199226c2e4dc019f21c1bed6e96092d4a71 Author: Al Viro Date: Wed Sep 12 18:37:18 2018 -0400 remove fallback to drivers for TIOCGICOUNT none of them handles it anyway. Reviewed-by: Johan Hovold Signed-off-by: Al Viro commit b413f00ab1a99ccb239fc5afd4b8e0c7ada6c9db Author: Al Viro Date: Wed Sep 12 18:32:47 2018 -0400 dgnc: break-related ioctls won't reach ->ioctl() kill the dead code, especially since ->break_ctl() will do the right thing anyway. Signed-off-by: Al Viro commit 6bbf265892241f540d3465c074c04a39b7f127ec Author: Al Viro Date: Wed Sep 12 18:05:07 2018 -0400 kill the rest of tty COMPAT_IOCTL() entries TIOCLINUX is handled by ->compat_ioctl() in the only place that has native ->ioctl() recognizing it, TIOC{START,STOP} are simply useless these days - unrecognized compat ioctl won't spew into syslog anymore. Signed-off-by: Al Viro commit 04ec1c8c7411d4bbb80d7ac93e93b2a5d2824842 Author: Al Viro Date: Wed Sep 12 18:00:47 2018 -0400 dgnc: TIOCM... won't reach ->ioctl() bury the dead code (and ->tiocmget()/->tiocmset() are there, so I really wonder why have they kept the stuff that became unreachable with the introduction of those...) Signed-off-by: Al Viro commit e67504c5958f122944d4b9316d1cfc737027c466 Author: Al Viro Date: Wed Sep 12 17:54:22 2018 -0400 isdn_tty: TCSBRK{,P} won't reach ->ioctl() kill the long-dead code - it's been unreachable since 2008. Redundant, as well - generic will do exact same thing, since ->break_ctl is NULL here... Signed-off-by: Al Viro commit 864e880de59ecd891260f264d2884eabb9d6760c Author: Al Viro Date: Wed Sep 12 17:52:23 2018 -0400 kill capinc_tty_ioctl() NULL ->ioctl() in tty_operations is treated as "returns -ENOIOCTLCMD"... Signed-off-by: Al Viro commit 77654350306accb55efa73eaa2b1424a639595fc Author: Al Viro Date: Wed Sep 12 11:28:34 2018 -0400 take compat TIOC[SG]SERIAL treatment into tty_compat_ioctl() Signed-off-by: Al Viro commit f82fc0fedf28ba09b0abd0533202447846d48fb9 Author: Al Viro Date: Wed Sep 12 07:49:44 2018 -0400 synclink: reduce pointless checks in ->ioctl() it's never getting called with TIOC[SG]SERIAL anymore (nor has it ever supported those, while we are at it) Signed-off-by: Al Viro commit 930236a30897532653a61ed22ae7eca13154accd Author: Al Viro Date: Wed Sep 12 07:46:51 2018 -0400 complete ->[sg]et_serial() switchover Reviewed-by: Johan Hovold Signed-off-by: Al Viro commit 15cc7bad48977582a35c06f5afa0cfc1d4975bd9 Author: Al Viro Date: Wed Sep 12 07:45:23 2018 -0400 usb_wwan: switch to ->[sg]et_serial() Reviewed-by: Johan Hovold Signed-off-by: Al Viro commit fc6cc979e42264efbff6c01a8c6af144cc3e43e4 Author: Al Viro Date: Wed Sep 12 07:34:34 2018 -0400 whiteheat: switch to ->get_serial() ... and fix the return value - on success it used to have ioctl(2) fill the user-supplied struct serial_struct and return -ENOTTY. Reviewed-by: Johan Hovold Signed-off-by: Al Viro commit 57e5723611bb1598bb1cb11a5ec8a4d257f69bb3 Author: Al Viro Date: Wed Sep 12 07:31:12 2018 -0400 ti_usb_3410_5052: switch to ->[sg]et_serial() Reviewed-by: Johan Hovold Signed-off-by: Al Viro commit ee08cefbb5bd261676c6e7965dffd8ee2ad5e1e8 Author: Al Viro Date: Wed Sep 12 07:26:07 2018 -0400 ssu100: switch to ->get_serial() Reviewed-by: Johan Hovold Signed-off-by: Al Viro commit 8fbde7984e7f84aa98c6bf9eff11c6c8b72c2517 Author: Al Viro Date: Wed Sep 12 07:24:37 2018 -0400 quatech2: switch to ->get_serial() Reviewed-by: Johan Hovold Signed-off-by: Al Viro commit 9326ec59ec64399e031aa2fe3ab6404d24423630 Author: Al Viro Date: Wed Sep 12 07:23:18 2018 -0400 pl2303: switch to ->get_serial() Reviewed-by: Johan Hovold Signed-off-by: Al Viro commit 30296aa419f8caec24e31cc2e6e3e6081460e97d Author: Al Viro Date: Wed Sep 12 07:21:40 2018 -0400 opticon: switch to ->get_serial() Reviewed-by: Johan Hovold Signed-off-by: Al Viro commit b27ef409b415099aa2c540630db03ea84f45c5cc Author: Al Viro Date: Wed Sep 12 07:20:09 2018 -0400 mos7840: switch to ->get_serial() Reviewed-by: Johan Hovold Signed-off-by: Al Viro commit 7cf3e600a07bc73823bf0ae0309e59dafd303817 Author: Al Viro Date: Wed Sep 12 00:20:17 2018 -0400 mos7720: switch to ->get_serial() Reviewed-by: Johan Hovold Signed-off-by: Al Viro commit 2a5357e56360a076867a21b4914a5340399eff5b Author: Al Viro Date: Wed Sep 12 00:17:54 2018 -0400 io_ti: switch to ->get_serial() Reviewed-by: Johan Hovold Signed-off-by: Al Viro commit e27235eda550a58ab8884836a190b3c1b3940e92 Author: Al Viro Date: Tue Sep 11 23:45:02 2018 -0400 io_edgeport: switch to ->get_serial() Reviewed-by: Johan Hovold Signed-off-by: Al Viro commit 3ae36bed3a93f5b871341be9b2e39aaff0d2559f Author: Al Viro Date: Tue Sep 11 23:42:36 2018 -0400 fdti_sio: switch to ->[sg]et_serial() Reviewed-by: Johan Hovold Signed-off-by: Al Viro commit c8f97e77d53ff0717a1175b3cdefa497127347f9 Author: Al Viro Date: Tue Sep 11 23:38:49 2018 -0400 f81534: switch to ->get_serial() Reviewed-by: Johan Hovold Signed-off-by: Al Viro commit 056abede09a779acda8e24b941d62bf0fed33f64 Author: Al Viro Date: Tue Sep 11 23:37:01 2018 -0400 f81232: switch to ->get_serial() Reviewed-by: Johan Hovold Signed-off-by: Al Viro commit aadcd0a178be1770394259d2c345b91b9b6be048 Author: Al Viro Date: Tue Sep 11 23:35:20 2018 -0400 ark3116: switch to ->get_serial() Reviewed-by: Johan Hovold Signed-off-by: Al Viro commit 99f75a1fcd865d39b5f2b99ce067bf5a2259e03a Author: Al Viro Date: Tue Sep 11 23:33:40 2018 -0400 cdc-acm: switch to ->[sg]et_serial() Signed-off-by: Al Viro commit 81732b26e05994552f347746eb11762e986079a0 Author: Al Viro Date: Tue Sep 11 23:28:07 2018 -0400 usb-serial: begin switching to ->[sg]et_serial() add such methods for usb_serial_driver, provide tty_operations ->[sg]et_serial() calling those. For now the lack of methods in driver means ENOIOCTLCMD from usb-serial ->[sg]et_serial(), making tty_ioctl() fall back to calling ->ioctl(). Once all drivers are converted, we'll be returning -ENOTTY instead, completing the switchover. Reviewed-by: Johan Hovold Signed-off-by: Al Viro commit 6a9daed31cc8dc1ca0b3d25f85426adbd2112293 Author: Al Viro Date: Tue Sep 11 23:22:59 2018 -0400 rfcomm: get rid of mentioning TIOC[SG]SERIAL no support there Signed-off-by: Al Viro commit 5099d234a52a0a9a9c6acbe8c9ee286a73ac1aed Author: Al Viro Date: Tue Sep 11 22:29:55 2018 -0400 serial_core: switch to ->[sg]et_serial() Signed-off-by: Al Viro commit 6da5b587631cb729de917a0ba629b139781cb3ef Author: Al Viro Date: Tue Sep 11 22:22:06 2018 -0400 mxser: switch to ->[sg]et_serial() Signed-off-by: Al Viro commit 1c729ab15a0eeff57aafab704161f8d3663b2854 Author: Al Viro Date: Tue Sep 11 22:01:00 2018 -0400 moxa: switch to ->[sg]et_serial() Pointless dead assignments in moxa_set_serial_info() killed off; they would've been a bug, if not for the fact that user-settable flags had never been used in that driver. Bogus from day 1, though... Signed-off-by: Al Viro commit b60f38c6640f3b0e15f37c63167df9560fe00e6a Author: Al Viro Date: Tue Sep 11 22:00:37 2018 -0400 isicom: switch to ->[sg]et_serial() Signed-off-by: Al Viro commit a7b06fcf2ecef39b37979ac8b8838a182ba569e2 Author: Al Viro Date: Tue Sep 11 22:00:08 2018 -0400 ipwireless: switch to ->[sg]et_serial() Acked-by: David Sterba Signed-off-by: Al Viro commit 6fbf9582548105e7548a2342f67b32977fe8a43a Author: Al Viro Date: Tue Sep 11 21:59:48 2018 -0400 cyclades: switch to ->[sg]et_serial() Signed-off-by: Al Viro commit b129cbc99b2d09a4c4c5de60f91118ecb380e2fa Author: Al Viro Date: Tue Sep 11 21:59:13 2018 -0400 amiserial: switch to ->[sg]et_serial() Signed-off-by: Al Viro commit d864991b220b7c62e81d21209e1fd978fd67352c Merge: a688c53a0277 bab5c80b2110 Author: David S. Miller Date: Fri Oct 12 21:38:46 2018 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Conflicts were easy to resolve using immediate context mostly, except the cls_u32.c one where I simply too the entire HEAD chunk. Signed-off-by: David S. Miller commit 3df629d873f8683af6f0d34dfc743f637966d483 Author: Al Viro Date: Sat Oct 13 00:19:13 2018 -0400 gfs2_meta: ->mount() can get NULL dev_name get in sync with mount_bdev() handling of the same Reported-by: syzbot+c54f8e94e6bba03b04e9@syzkaller.appspotmail.com Cc: stable@vger.kernel.org Signed-off-by: Al Viro commit 995f608e7a349c837d6c0b3ffa7d1a94d01f7203 Author: Al Viro Date: Fri Oct 12 22:46:50 2018 -0400 ntfs: don't open-code ERR_CAST Signed-off-by: Al Viro commit 1ae80cf31938c8f77c37a29bbe29e7f1cd492be8 Author: Daniel Colascione Date: Fri Oct 12 03:54:27 2018 -0700 bpf: wait for running BPF programs when updating map-in-map The map-in-map frequently serves as a mechanism for atomic snapshotting of state that a BPF program might record. The current implementation is dangerous to use in this way, however, since userspace has no way of knowing when all programs that might have retrieved the "old" value of the map may have completed. This change ensures that map update operations on map-in-map map types always wait for all references to the old map to drop before returning to userspace. Signed-off-by: Daniel Colascione Reviewed-by: Joel Fernandes (Google) Signed-off-by: Alexei Starovoitov commit e1af4779617928efa84562de4de5dc071e7deb08 Author: Arnd Bergmann Date: Fri Oct 5 18:11:47 2018 +0200 apparmor: add #ifdef checks for secmark filtering The newly added code fails to build when either SECMARK or NETFILTER are disabled: security/apparmor/lsm.c: In function 'apparmor_socket_sock_rcv_skb': security/apparmor/lsm.c:1138:12: error: 'struct sk_buff' has no member named 'secmark'; did you mean 'mark'? security/apparmor/lsm.c:1671:21: error: 'struct nf_hook_state' declared inside parameter list will not be visible outside of this definition or declaration [-Werror] Add a set of #ifdef checks around it to only enable the code that we can compile and that makes sense in that configuration. Fixes: ab9f2115081a ("apparmor: Allow filtering based on secmark policy") Signed-off-by: Arnd Bergmann Signed-off-by: John Johansen commit 63625899c6eba697fdbefcdcdc2cb27549df9e43 Author: Mike Rapoport Date: Sun Oct 7 19:32:44 2018 +0300 docs/admin-guide: memory-hotplug: remove table of contents Remove "manual" table of contents and leave only the ReST tag so that Sphinx will take care of TOC generation. Signed-off-by: Mike Rapoport Signed-off-by: Jonathan Corbet commit 22a7488c54a03773ef7cf0dc952047c75cc1446a Author: Jerome Forissier Date: Mon Oct 8 18:16:42 2018 +0800 Documentation: dt: Add binding for /secure-chosen/stdout-path Some platforms may use a single device tree to describe two address spaces, as described in d9f43babb998 ("Documentation: dt: Add bindings for Secure-only devices"). For these platforms it makes sense to define a secure counterpart of /chosen, namely: /secure-chosen. This new node is meant to be used by the secure firmware to pass data to the secure OS. Only the stdout-path property is supported for now. Signed-off-by: Jerome Forissier Signed-off-by: Rob Herring commit a688c53a0277d8ea21d86a5c56884892e3442c5e Merge: 139ce90a4570 0aef8392d257 Author: David S. Miller Date: Fri Oct 12 11:27:01 2018 -0700 Merge branch 's390-qeth-next' Julian Wiedmann says: ==================== s390/qeth: updates 2018-10-12 please apply one more patchset for net-next. This extends the TSO support in qeth. ==================== Signed-off-by: David S. Miller commit 0aef8392d257288a7b6a905d19d126bc98f14474 Author: Julian Wiedmann Date: Fri Oct 12 17:27:15 2018 +0200 s390/qeth: add TSO support for L2 devices Except for the new HW header id, this works just like TSO6 on L3 devices and reuses all the existing data path support in qeth_xmit(). Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit 82bf5c0867f66440a98341441fb593fe019ea361 Author: Julian Wiedmann Date: Fri Oct 12 17:27:14 2018 +0200 s390/qeth: add support for IPv6 TSO This adds TSO6 support for L3 qeth devices. Just like for standard IPv6 traffic, TSO6 doesn't use IP offload and thus runs over the normal qeth_xmit() path. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit 4666d7fb1a90280d8d3fa8766b7cdaf822d41a40 Author: Julian Wiedmann Date: Fri Oct 12 17:27:13 2018 +0200 s390/qeth: enhance TSO control sequence TSO6 requires the full programming sequence, and not just a simple START command. This implements the additional ENABLE command, and adds some sanity checks that were missing for the START command. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit 1f83b817d0f14ac06ab593b47fdd6f51238cd73e Author: Julian Wiedmann Date: Fri Oct 12 17:27:12 2018 +0200 s390/qeth: make TSO controls protocol-agnostic In preparation for IPv6 TSO, turn the protocol version into a parameter for the TSO control code. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit 139ce90a45700234fdd78bec1ffe780085989f52 Merge: 5886d932e52a 829edbd8d45e Author: David S. Miller Date: Fri Oct 12 11:23:45 2018 -0700 Merge branch 'hns3-promisc-next' Salil Mehta says: ==================== Fixes & small enhancements related to the promisc mode in HNS3 This patch-set presents some fixes and enhancements related to promiscuous mode and MAC VLAN Table full condition in HNS3 Ethernet Driver. ==================== Signed-off-by: David S. Miller commit 829edbd8d45e2f5c384a0b6c741cde46e0fa02a8 Author: Jian Shen Date: Fri Oct 12 15:34:06 2018 +0100 net: hns3: Resume promisc mode and vlan filter status after loopback test This patch resumes promisc mode and vlan filter status after loopback test. Fixes: 3b75c3df599d ("net: hns3: net: hns3: Add support for IFF_ALLMULTI flag") Signed-off-by: Jian Shen Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit 7325523ab616791c418e2edc67d18e21958fb3ce Author: Jian Shen Date: Fri Oct 12 15:34:05 2018 +0100 net: hns3: Resume promisc mode and vlan filter status after reset This patch resumes promisc mode and vlan filter status after reset. Signed-off-by: Jian Shen Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit c60edc17df391e33c9c3cd6e319eb1f32ce26730 Author: Jian Shen Date: Fri Oct 12 15:34:04 2018 +0100 net: hns3: Enable promisc mode when mac vlan table is full Currently, the driver does nothing when mac vlan table is full. In this case, the packet with new mac address will be dropped by hardware. This patch adds check for the result of sync mac address, and enable promisc mode when mac vlan table is full. Furtherly, disable vlan filter when enable promisc by user command. Fixes: 46a3df9f9718 ("net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support") Signed-off-by: Jian Shen Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit 5886d932e52acfbe12ea5aac8e7c3ad6f16364d1 Author: Johannes Berg Date: Fri Oct 12 12:53:00 2018 +0200 netlink: replace __NLA_ENSURE implementation We already have BUILD_BUG_ON_ZERO() which I just hadn't found before, so we should use it here instead of open-coding another implementation thereof. Signed-off-by: Johannes Berg Signed-off-by: David S. Miller commit e32cf9a386236523be005a66dbee7cdcb5148b4d Merge: 9163a0fc1f0c f8252e7b5a83 Author: David S. Miller Date: Fri Oct 12 10:56:56 2018 -0700 Merge tag 'mac80211-next-for-davem-2018-10-12' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next Johannes Berg says: ==================== Highlights: * merge net-next, so I can finish the hwsim workqueue removal * fix TXQ NULL pointer issue that was reported multiple times * minstrel cleanups from Felix * simplify lib80211 code by not using skcipher, note that this will conflict with the crypto tree (and this new code here should be used) * use new netlink policy validation in nl80211 * fix up SAE (part of WPA3) in client-mode * FTM responder support in the stack ==================== Signed-off-by: David S. Miller commit 9fc9c9b83a463ebe5f7f2666632da364d974f5d1 Author: James Zhu Date: Tue Oct 9 17:06:56 2018 -0400 drm/amdgpu/vcn:Update SPG mode UVD status clear Update Static Power Gate mode UVD status clear Signed-off-by: James Zhu Acked-by: Leo Liu Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 10b66b2c65a271998042259b7fffafdd76809ad1 Author: James Zhu Date: Tue Oct 9 16:59:57 2018 -0400 drm/amdgpu/vcn:Set VCPU busy after gate power during vcn SPG start Set VCPU busy after gate power during vcn Static Power Gate start Signed-off-by: James Zhu Acked-by: Leo Liu Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 3d904ee4c30e5a91bdad363624f46bf484fd604a Author: James Zhu Date: Tue Oct 9 16:57:26 2018 -0400 drm/amdgpu/vcn:Apply new UMC enable for VNC DPG mode Apply new UMC enable for VNC Dynamic Power Gate mode Signed-off-by: James Zhu Acked-by: Leo Liu Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit ad7187bfe130ddd51128e1f7068fbc930c9eccf4 Author: James Zhu Date: Tue Oct 9 16:53:42 2018 -0400 drm/amdgpu/vcn:Remove SPG mode unused steps during vcn start Remove Sitatic Power Gate mode unused steps during vcn start Signed-off-by: James Zhu Acked-by: Leo Liu Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 3d022a01fe369329adc859ab6f8e015340040905 Author: James Zhu Date: Tue Oct 9 16:48:29 2018 -0400 drm/amdgpu/vcn:Add SPG mode Register XX check Add Static Power Gate mode Register XX check Signed-off-by: James Zhu Acked-by: Leo Liu Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit a1584957ffe17a43fb6b6a825187bc01b4fa22bd Author: James Zhu Date: Tue Oct 9 16:46:53 2018 -0400 drm/amdgpu/vcn:Move SPG mode mc resume after MPC control Move Static Power Gate mode mc resume after MPC control Signed-off-by: James Zhu Acked-by: Leo Liu Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 92bbdaeb9109b2c31681d24d28d9030f2d862851 Author: James Zhu Date: Tue Oct 9 16:43:32 2018 -0400 drm/amdgpu/vcn:Update SPG mode VCN global tiling Update Static Power Gate mode VCN global tiling Signed-off-by: James Zhu Acked-by: Leo Liu Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 298dc39a3a203697d959dc086cf81f90959582da Author: James Zhu Date: Tue Oct 9 16:40:56 2018 -0400 drm/amdgpu/vcn:Update SPG mode VCN memory control Update Static Power Gate mode VCN memory control Signed-off-by: James Zhu Acked-by: Leo Liu Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit f5c5451fefceb24f2969d9f3ad6ef4c591d0272e Author: James Zhu Date: Tue Oct 9 13:05:15 2018 -0400 drm/amdgpu/vcn:Apply new UMC enable for VNC DPG mode start Apply new UMC enable for VNC Dynamic Power Gate mode start Signed-off-by: James Zhu Acked-by: Leo Liu Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit fe146873f545f28b6c53e1d2405fc6816d5301ea Author: James Zhu Date: Thu Oct 4 16:09:33 2018 -0400 drm/amdgpu/vcn:Remove DPG mode unused steps during vcn start Remove Dynamic Power Gate mode unused steps during VCN start Signed-off-by: James Zhu Acked-by: Leo Liu Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 368d0dd81a506365f0c899cef731889ee712cae6 Author: James Zhu Date: Thu Oct 4 16:02:51 2018 -0400 drm/amdgpu/vcn:Add DPG mode Register XX check Add Dynamic Power Gate mode Register XX check Signed-off-by: James Zhu Acked-by: Leo Liu Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit abd2d47c5152878649c3c1077a9594e34793339b Author: James Zhu Date: Thu Oct 4 15:42:51 2018 -0400 drm/amdgpu/vcn:Update DPG mode VCN global tiling registers Update Dynamic Power Gate mode VCN global tiling registers Signed-off-by: James Zhu Acked-by: Leo Liu Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 6747c2021ccda6df5e19bcb37c5584266b68fa75 Author: James Zhu Date: Thu Oct 4 15:10:52 2018 -0400 drm/amdgpu/vcn:Update DPG mode VCN memory control Update Dynamic Power Gate mode VCN memory control Signed-off-by: James Zhu Acked-by: Leo Liu Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit cce9d555858899eb4b919ec6a65d6e4d47e8ba4e Author: James Zhu Date: Thu Oct 4 09:29:22 2018 -0400 drm/amdgpu/vcn:Reduce unnecessary local variable Reduce unnecessary local variable. Signed-off-by: James Zhu Acked-by: Leo Liu Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 15296db70619984157e60666da5da8994a66870e Author: James Zhu Date: Wed Oct 3 17:36:58 2018 -0400 drm/amdgpu/vcn:Add ring W/R PTR check for VCN DPG mode stop Add ring write/read pointer check for VCN dynamic power gate mode stop,to make sure that no job is left in ring before turn off DPG mode. Signed-off-by: James Zhu Acked-by: Leo Liu Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 5866fb929c90e3189c1abd4d6518712ad56c90b4 Author: James Zhu Date: Wed Oct 3 10:24:43 2018 -0400 drm/amdgpu/vcn:Update latest spg mode stop for VCN Update latest static power gate mode stop function for VCN Signed-off-by: James Zhu Acked-by: Leo Liu Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 5327f025dc3c1dd87716839d5a1a3a9635591725 Author: James Zhu Date: Tue Oct 2 14:55:46 2018 -0400 drm/amdgpu/vcn:Update latest UVD_MPC register for VCN Update latest UVD_MPC register for VCN. Use defined macro to replace value for readability. Signed-off-by: James Zhu Acked-by: Leo Liu Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit b53d3049d258fe731ebc510cd631ceffc7abfc91 Author: James Zhu Date: Tue Oct 2 14:38:18 2018 -0400 drm/amdgpu/vcn:Add new register offset/mask for VCN Add new register offset/mask for VCN to support latest VCN implementation. Signed-off-by: James Zhu Acked-by: Leo Liu Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 8c6259bedab1681382b7829b1e8fc4f12fc4a215 Author: hersen wu Date: Thu Oct 4 09:28:20 2018 -0400 drm/amdgpu/display: dm/amdgpu: make dp phy debugfs for eDP [WHY] dp debugfs file does not exist for eDP under /sys/kernel/debug/dri/0/eDP-1. the root is phy debugfs is created for dp connector only. [HOW] for eDP connector, create phy debugfs too. Signed-off-by: Hersen Wu Reviewed-by: David Francis Acked-by: Leo Li Signed-off-by: Alex Deucher commit 8bda1013ddb1dffdee7f9a1912f9845b9cf529cb Author: Emily Deng Date: Fri Oct 12 18:14:32 2018 +0800 drm/amdgpu: Set the default value about gds vmid0 size For sriov, when first run windows guest, then run linux guest, the gds vmid0 size will be reset to 0 by windows guest. So if the value has been reset to 0, then set the value to the default value in linux guest. v2: Fixed value instead of reading mmGDS_VMID0_SIZE. v3: Set the default value of the switch. Signed-off-by: Emily Deng Reviewed-by: Junwei Zhang Signed-off-by: Alex Deucher commit 0efd2d2f68cd5dbddf4ecd974c33133257d16a8e Author: Christian König Date: Mon Oct 8 13:30:12 2018 +0200 drm/sched: fix timeout handling v2 We need to make sure that we don't race between job completion and timeout. v2: put revert label after calling the handling manually Signed-off-by: Christian König Reviewed-by: Nayan Deshmukh Signed-off-by: Alex Deucher commit b981c86f03068ca63391bb54ac4686e7ac419fa3 Author: Christian König Date: Fri Oct 5 19:56:39 2018 +0200 drm/sched: add drm_sched_start_timeout helper Cleanup starting the timeout a bit. Signed-off-by: Christian König Reviewed-by: Nayan Deshmukh Signed-off-by: Alex Deucher commit 94ac8f2074b22465f75e93ecbb98060d7960f4b6 Author: Geert Uytterhoeven Date: Mon Oct 8 13:08:48 2018 +0200 doc: printk-formats: Remove bogus kobject references for device nodes When converting from text to rst, the kobjects section and its sole subsection about device tree nodes were coalesced into a single section, yielding an inconsistent result. Remove all references to kobjects, as 1. Device tree object pointers are not compatible to kobject pointers (the former may embed the latter, though), and 2. there are no printk formats defined for kobject types. Update the vsprintf() source code comments to match the above. Fixes: b3ed23213eab1e08 ("doc: convert printk-formats.txt to rst") Signed-off-by: Geert Uytterhoeven Signed-off-by: Jonathan Corbet commit 44280690ced5dacd3004d4966ef9b15f940f34e0 Author: Andrew Murray Date: Mon Oct 8 14:15:15 2018 +0100 Documentation: preempt-locking: Use better example The existing wording implies that the use of spin_unlock whilst irqs are disabled might trigger a reschedule. However the preemptible() test in preempt_schedule will prevent a reschedule if irqs are disabled. Lets improve the clarity of this wording to change the example from spin_unlock to cond_resched() and cond_resched_lock() as these are functions that will trigger a reschedule if the preempt count is 0 without testing that irqs are disabled. Also remove the 'Last Updated' line as this is not up to date and better tracked via GIT. Signed-off-by: Andrew Murray Signed-off-by: Jonathan Corbet commit 0c6c987f3706fedff42eee5384c7ede8a910c4ed Author: Nikolay Borisov Date: Tue Oct 9 11:31:31 2018 +0300 dm flakey: Document "error_writes" feature Commit ef548c551e72 ("dm flakey: introduce "error_writes" feature") added the ability to dm flakey to error out writes in contrast to silently dropping it with 'drop_writes'. Unfortunately this feature is not currently documented and one has to be either familiar with the source code of dm flakey or check out xfstests sources to know of this parameter. So document it. Signed-off-by: Nikolay Borisov Signed-off-by: Jonathan Corbet commit bc0e5262d3a06cd48a5aed90a817623ec16dc5c4 Author: John Garry Date: Wed Oct 10 22:56:32 2018 +0800 docs/completion.txt: Fix a couple of punctuation nits This patch fixes a couple of punctuation nits which can make the document more correct and readable. Also missing "()" are added to some function references for consistency. Signed-off-by: John Garry Acked-by: Randy Dunlap Signed-off-by: Jonathan Corbet commit 9dc84ee6e5361e65de37b459c80ee4800d2cf87d Author: Hans de Goede Date: Wed Oct 10 22:15:09 2018 +0200 LICENSES: Add ISC license text Add the full text of the ISC license to the kernel tree. It was copied directly from: https://spdx.org/licenses/ISC.html With the mention of "ISC" in the warranty disclaimer replaced with "THE AUTHOR" as done in the ISC license headers used in the ath10k and brcmfmac wifi drivers. Cc: Kalle Valo Signed-off-by: Hans de Goede Signed-off-by: Jonathan Corbet commit 8639a0c790add196bdd457c98437fec299cde60e Author: Hans de Goede Date: Wed Oct 10 22:15:08 2018 +0200 LICENSES: Add note to CDDL-1.0 license that it should not be used The only reason we have the CDDL-1.0 license text around is for some dual-licensed files from virtualbox. New code should not use this license. Add a note about this and change the example tag to be dual-licensed. Signed-off-by: Hans de Goede Signed-off-by: Jonathan Corbet commit 7a862028b95a54adf9b3b88a1415e15478c257be Author: Evan Quan Date: Wed Oct 10 15:24:59 2018 +0800 drm/amd/powerplay: hint when power profile setting is not supported Give user some hints when the power profile setting is not supported. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 73d0a446690e342667dace1964b3238140fa4763 Author: Evan Quan Date: Wed Oct 10 15:00:28 2018 +0800 drm/amd/powerplay: translate power_profile mode to pplib workload type Correctly translate the power profile specified by user to workload type accepted by SMU fw. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 9163a0fc1f0c0980f117cc25f4fa6ba9b0750a36 Author: Nikolay Aleksandrov Date: Fri Oct 12 13:41:16 2018 +0300 net: bridge: add support for per-port vlan stats This patch adds an option to have per-port vlan stats instead of the default global stats. The option can be set only when there are no port vlans in the bridge since we need to allocate the stats if it is set when vlans are being added to ports (and respectively free them when being deleted). Also bump RTNL_MAX_TYPE as the bridge is the largest user of options. The current stats design allows us to add these without any changes to the fast-path, it all comes down to the per-vlan stats pointer which, if this option is enabled, will be allocated for each port vlan instead of using the global bridge-wide one. CC: bridge@lists.linux-foundation.org CC: Roopa Prabhu Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit 3a7452c5a72bd8098f6d4b37341e25a8725d790b Author: David Hildenbrand Date: Thu Oct 11 07:58:17 2018 +0300 docs/core-api: memory-hotplug: add some details about locking internals Let's document the magic a bit, especially why device_hotplug_lock is required when adding/removing memory and how it all play together with requests to online/offline memory from user space. [ rppt: moved the text to Documentation/core-api/memory-hotplug.rst ] Link: http://lkml.kernel.org/r/20180925091457.28651-7-david@redhat.com Signed-off-by: David Hildenbrand Reviewed-by: Pavel Tatashin Reviewed-by: Rashmica Gupta Cc: Jonathan Corbet Cc: Michal Hocko Cc: Balbir Singh Cc: Benjamin Herrenschmidt Cc: Boris Ostrovsky Cc: Dan Williams Cc: Greg Kroah-Hartman Cc: Haiyang Zhang Cc: Heiko Carstens Cc: John Allen Cc: Joonsoo Kim Cc: Juergen Gross Cc: Kate Stewart Cc: "K. Y. Srinivasan" Cc: Len Brown Cc: Martin Schwidefsky Cc: Mathieu Malaterre Cc: Michael Ellerman Cc: Michael Neuling Cc: Nathan Fontenot Cc: Oscar Salvador Cc: Paul Mackerras Cc: Philippe Ombredanne Cc: Rafael J. Wysocki Cc: "Rafael J. Wysocki" Cc: Stephen Hemminger Cc: Thomas Gleixner Cc: Vlastimil Babka Cc: YASUAKI ISHIMATSU Signed-off-by: Andrew Morton Signed-off-by: Mike Rapoport Signed-off-by: Jonathan Corbet commit 52d7e21fd5677829353f7490723adf5f61999d84 Author: Mike Rapoport Date: Thu Oct 11 07:58:16 2018 +0300 docs/core-api: rename memory-hotplug-notifier to memory-hotplug to allow additions of new documentation about memory hotplug under the same roof. Signed-off-by: Mike Rapoport Reviewed-by: David Hildenbrand Signed-off-by: Jonathan Corbet commit 684e07ed39ddd12731eda9933a946c7424e91c14 Author: Biju Das Date: Thu Oct 4 17:07:47 2018 +0100 dt-bindings: PCI: rcar: Add device tree support for r8a7744 Add support for r8a7744. The Renesas RZ/G1N (R8A7744) PCIe controller is identical to the R-Car Gen2 family. Signed-off-by: Biju Das Signed-off-by: Lorenzo Pieralisi Reviewed-by: Chris Paterson Reviewed-by: Simon Horman commit b0ce7b29bfcd090ddba476f45a75ec0a797b048a Author: Linus Walleij Date: Fri Oct 12 14:54:12 2018 +0200 regulator/gpio: Allow nonexclusive GPIO access This allows nonexclusive (simultaneous) access to a single GPIO line for the fixed regulator enable line. This happens when several regulators use the same GPIO for enabling and disabling a regulator, and all need a handle on their GPIO descriptor. This solution with a special flag is not entirely elegant and should ideally be replaced by something more careful as this makes it possible for several consumers to enable/disable the same GPIO line to the left and right without any consistency. The current use inside the regulator core should however be fine as it takes special care to handle this. For the state of the GPIO backend, this is still the lesser evil compared to going back to global GPIO numbers. Cc: Marek Szyprowski Cc: Jon Hunter Fixes: efdfeb079cc3 ("regulator: fixed: Convert to use GPIO descriptor only") Reported-by: Marek Szyprowski Tested-by: Jon Hunter Tested-by: Marek Szyprowski Signed-off-by: Linus Walleij Signed-off-by: Mark Brown commit 133eb8e38b02c6c63a039523fca12737009a6686 Author: Robin Gong Date: Wed Oct 10 10:32:48 2018 +0000 spi: imx: use PIO mode if size is small Use PIO mode instead if size is smaller than fifo size, since dma may be less efficient. Signed-off-by: Robin Gong Signed-off-by: Mark Brown commit 5ba5a3730639caddf42af11c60f3f3d99d9a5f00 Author: Robin Gong Date: Wed Oct 10 10:32:45 2018 +0000 spi: imx: correct wml as the last sg length Correct wml as the last rx sg length instead of the whole transfer length. Otherwise, mtd_stresstest will be failed as below: insmod mtd_stresstest.ko dev=0 ================================================= mtd_stresstest: MTD device: 0 mtd_stresstest: not NAND flash, assume page size is 512 bytes. mtd_stresstest: MTD device size 4194304, eraseblock size 65536, page size 512, count of eraseblocks 64, pa0 mtd_stresstest: doing operations mtd_stresstest: 0 operations done mtd_test: mtd_read from 1ff532, size 880 mtd_test: mtd_read from 20c267, size 64998 spi_master spi0: I/O Error in DMA RX m25p80 spi0.0: SPI transfer failed: -110 spi_master spi0: failed to transfer one message from queue mtd_test: error: read failed at 0x20c267 mtd_stresstest: error -110 occurred ================================================= insmod: ERROR: could not insert module mtd_stresstest.ko: Connection timed out Signed-off-by: Robin Gong Signed-off-by: Mark Brown commit 987a2dfe3f0485a82d87106e7e1c43f35c1d3b09 Author: Robin Gong Date: Wed Oct 10 10:32:42 2018 +0000 spi: imx: move wml setting to later than setup_transfer Current dynamic burst length is based on the whole transfer length, that's ok if there is only one sg, but is not right in case multi sgs in one transfer,because the tail data should be based on the last sg length instead of the whole transfer length. Move wml setting for DMA to the later place, thus, the next patch could get the right last sg length for wml setting. This patch is a preparation one, no any function change involved. Signed-off-by: Robin Gong Signed-off-by: Mark Brown commit bef9391cbec547351c6a13e52f3a26bb2d271ec7 Author: Charles Keepax Date: Mon Oct 8 14:25:41 2018 +0100 regulator: lochnagar: Add support for the Cirrus Logic Lochnagar 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. The Lochnagar board provides power supplies for the attached CODEC/Amp device. Currently this driver supports the microphone supplies and the digital core voltage for the attached device. There are some additional supplies that will be added in time but these supplies are sufficient for most systems/use-cases. Signed-off-by: Charles Keepax Signed-off-by: Mark Brown commit 471a7ba89158c6d52dae69636c94c4aa1a6b7b22 Author: Kuninori Morimoto Date: Fri Oct 12 06:31:49 2018 +0000 ASoC: pcm3168a: add I2S/Left_J TDM support pcm3168a is supporting TDM on I2S/Left_J, but there is no settings for it. This patch add it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit 594680ea4a394f19d38a39a7d7c673fbad02a3d6 Author: Kuninori Morimoto Date: Fri Oct 12 06:31:18 2018 +0000 ASoC: pcm3168a: add hw constraint for channel LEFT_J / I2S only can use TDM. This patch adds channel constraint for it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit 3809688980205622f75ed5d5890759430da4e7e4 Author: Kuninori Morimoto Date: Fri Oct 12 06:31:00 2018 +0000 ASoC: pcm3168a: add HW constraint for non RIGHT_J RIGHT_J only can handle 16bit data bits. Current driver just errored if user requests non RIGHT_J + 16bit combination. But it is not useful for user. This patch adds HW constraint for it, and avoid error on such situation. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit bf173ca92da97863e1579a982d500da98f2e7a3f Author: Steven Rostedt (VMware) Date: Fri Oct 12 12:50:22 2018 -0400 tracing: probeevent: Fix uninitialized used of offset in parse args Dan's smatch utility found an uninitialized use of offset in a path in parse_probe_args(). Unless an offset is specifically specified for commands that allow them, it should default to zero. Link: http://lkml.kernel.org/r/20181012134246.5doqaobxunlqqs53@mwanda Fixes: 533059281ee5 ("tracing: probeevent: Introduce new argument fetching code") Reported-by: Dan Carpenter (smatch) Signed-off-by: Steven Rostedt (VMware) commit 9c2120090586d7e509faa885988d4eb2441fabc2 Author: Lubomir Rintel Date: Wed Oct 10 19:09:27 2018 +0200 PCI: Provide pci_match_id() with CONFIG_PCI=n This spares drivers from #ifdef-ing on CONFIG_PCI if the driver can be optionally built on machines without PCI bus. Consistent with acpi_driver_match_device() and similar. Acked-by: Bjorn Helgaas Signed-off-by: Lubomir Rintel Signed-off-by: Mark Brown commit 666046418d5c07469f9b1c0e3f515c1ea8126207 Author: Christoph Hellwig Date: Fri Oct 12 10:17:51 2018 +0200 fore200e: fix sbus compile Fix a stupid typo introduced in the refactoring. Fixes: 0efe5523 ("fore200e: simplify fore200e_bus usage") Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit 747df19747bc9752cd40b9cce761e17a033aa5c2 Author: Daniel Mack Date: Thu Oct 11 20:32:05 2018 +0200 ASoC: sta32x: set ->component pointer in private struct The ESD watchdog code in sta32x_watchdog() dereferences the pointer which is never assigned. This is a regression from a1be4cead9b950 ("ASoC: sta32x: Convert to direct regmap API usage.") which went unnoticed since nobody seems to use that ESD workaround. Fixes: a1be4cead9b950 ("ASoC: sta32x: Convert to direct regmap API usage.") Signed-off-by: Daniel Mack Signed-off-by: Mark Brown Cc: stable@vger.kernel.org commit 859bd2ef1fc1110a8031b967ee656c53a6260a76 Author: David Ahern Date: Thu Oct 11 20:33:49 2018 -0700 net: Evict neighbor entries on carrier down When a link's carrier goes down it could be a sign of the port changing networks. If the new network has overlapping addresses with the old one, then the kernel will continue trying to use neighbor entries established based on the old network until the entries finally age out - meaning a potentially long delay with communications not working. This patch evicts neighbor entries on carrier down with the exception of those marked permanent. Permanent entries are managed by userspace (either an admin or a routing daemon such as FRR). Signed-off-by: David Ahern Signed-off-by: David S. Miller commit 25972d0c33deb5c49708baa48e7796c8d0348e98 Author: Phil Elwell Date: Fri Oct 12 10:23:18 2018 +0100 spi: Make GPIO CSs honour the SPI_NO_CS flag The SPI configuration state includes an SPI_NO_CS flag that disables all CS line manipulation, for applications that want to manage their own chip selects. However, this flag is ignored by the GPIO CS code in the SPI framework. Correct this omission with a trivial patch. Signed-off-by: Phil Elwell Signed-off-by: Mark Brown commit 7c6bb7d2faaf1ed7d78bafd712476e4cf2cf0d7d Author: David Ahern Date: Thu Oct 11 20:17:21 2018 -0700 net/ipv6: Add knob to skip DELROUTE message on device down Another difference between IPv4 and IPv6 is the generation of RTM_DELROUTE notifications when a device is taken down (admin down) or deleted. IPv4 does not generate a message for routes evicted by the down or delete; IPv6 does. A NOS at scale really needs to avoid these messages and have IPv4 and IPv6 behave similarly, relying on userspace to handle link notifications and evict the routes. At this point existing user behavior needs to be preserved. Since notifications are a global action (not per app) the only way to preserve existing behavior and allow the messages to be skipped is to add a new sysctl (net/ipv6/route/skip_notify_on_dev_down) which can be set to disable the notificatioons. IPv6 route code already supports the option to skip the message (it is used for multipath routes for example). Besides the new sysctl we need to pass the skip_notify setting through the generic fib6_clean and fib6_walk functions to fib6_clean_node and to set skip_notify on calls to __ip_del_rt for the addrconf_ifdown path. Signed-off-by: David Ahern Signed-off-by: David S. Miller commit 7cc2d504daa0454d2c7c1a0c15a6a21df0ac3c8a Author: YueHaibing Date: Fri Oct 12 10:37:41 2018 +0800 net: fddi: skfp: Remove unused macros 'PNMI_GET_ID' and 'PNMI_SET_ID' The two PNMI macros are never used Signed-off-by: YueHaibing Signed-off-by: David S. Miller commit 1b8530bf6a69d5021a1f44ca30681b3914c099f3 Author: YueHaibing Date: Fri Oct 12 01:49:13 2018 +0000 net: cdc_ncm: remove set but not used variable 'ctx' Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/usb/cdc_ncm.c: In function 'cdc_ncm_status': drivers/net/usb/cdc_ncm.c:1603:22: warning: variable 'ctx' set but not used [-Wunused-but-set-variable] struct cdc_ncm_ctx *ctx; It not used any more after commit fa83dbeee558 ("net: cdc_ncm: remove redundant "disconnected" flag") Signed-off-by: YueHaibing Signed-off-by: David S. Miller commit 97052c1c31d5bcf08823ce1ea272447edd2d52de Author: Dan Williams Date: Thu Oct 11 18:25:20 2018 -0700 libnvdimm, label: Fix sparse warning The kbuild robot reports: drivers/nvdimm/label.c:500:32: warning: restricted __le32 degrades to integer ...read 'nslot' into a local u32. Reported-by: kbuild test robot Acked-by: Alexander Duyck Signed-off-by: Dan Williams commit 7d47aad4570e5e6e9a8162bb417ca9b74132f27c Author: Alexander Duyck Date: Wed Oct 10 16:39:35 2018 -0700 nvdimm: Use namespace index data to reduce number of label reads needed This patch adds logic that is meant to make use of the namespace index data to reduce the number of reads that are needed to initialize a given namespace. The general idea is that once we have enough data to validate the namespace index we do so and then proceed to fetch only those labels that are not listed as being "free". By doing this I am seeing a total time reduction from about 4-5 seconds to 2-3 seconds for 24 NVDIMM modules each with 128K of label config area. Reviewed-by: Toshi Kani Signed-off-by: Alexander Duyck Signed-off-by: Dan Williams commit 2d657d17f72d2ae70c02f0d0ea6a04ad0f016b57 Author: Alexander Duyck Date: Wed Oct 10 16:39:20 2018 -0700 nvdimm: Split label init out from the logic for getting config data This patch splits the initialization of the label data into two functions. One for doing the init, and another for reading the actual configuration data. The idea behind this is that by doing this we create a symmetry between the getting and setting of config data in that we have a function for both. In addition it will make it easier for us to identify the bits that are related to init versus the pieces that are a wrapper for reading data from the ACPI interface. So for example by splitting things out like this it becomes much more obvious that we were performing checks that weren't necessarily related to the set/get operations such as relying on ndd->data being present when the set and get ops should not care about a locally cached copy of the label area. Reviewed-by: Toshi Kani Signed-off-by: Alexander Duyck Signed-off-by: Dan Williams commit 19418b024427ec60ba6084addf691a8d93670398 Author: Alexander Duyck Date: Wed Oct 10 16:39:06 2018 -0700 nvdimm: Remove empty if statement This patch removes an empty statement from an if expression and promotes the else statement to the if expression with the expression logic reversed. I feel this is more readable as the empty statement can lead to issues if any additional logic was ever added. Reviewed-by: Toshi Kani Signed-off-by: Alexander Duyck Signed-off-by: Dan Williams commit 1cfeb66e8e137be8e01b88bb4d416e987abda4a4 Author: Alexander Duyck Date: Wed Oct 10 16:38:55 2018 -0700 nvdimm: Clarify comment in sizeof_namespace_index When working on the label code I found it rather confusing to see several spots that reference a minimum label size of 256 while working with labels that are 128 bytes in size. This patch is meant to provide a clarification on one of the comments that was at the heart of the issue. Specifically for version 1.2 and later of the namespace specification the minimum label size is 256, prior to that the minimum label size was 128. So we should state that as such to avoid confusion. Reviewed-by: Toshi Kani Signed-off-by: Alexander Duyck Signed-off-by: Dan Williams commit d86d4d63d88861107d3bfc84be7294552231ecd0 Author: Alexander Duyck Date: Wed Oct 10 16:38:41 2018 -0700 nvdimm: Sanity check labeloff This patch adds validation for the labeloff field in the indexes. Reviewed-by: Toshi Kani Signed-off-by: Alexander Duyck Signed-off-by: Dan Williams commit 33458eaba4dfe778a426df6a19b7aad2ff9f7eec Author: Theodore Ts'o Date: Fri Oct 12 09:28:09 2018 -0400 ext4: fix use-after-free race in ext4_remount()'s error path It's possible for ext4_show_quota_options() to try reading s_qf_names[i] while it is being modified by ext4_remount() --- most notably, in ext4_remount's error path when the original values of the quota file name gets restored. Reported-by: syzbot+a2872d6feea6918008a9@syzkaller.appspotmail.com Signed-off-by: Theodore Ts'o Cc: stable@kernel.org # 3.2+ commit 0ddeded4ae768882e5c3a5558f77f27e4e445a6a Author: Andreas Gruenbacher Date: Thu Oct 4 15:36:02 2018 +0100 gfs2: Pass resource group to rgblk_free Function rgblk_free can only deal with one resource group at a time, so pass that resource group is as a parameter. Several of the callers already have the resource group at hand, so we only need additional lookup code in a few places. Signed-off-by: Andreas Gruenbacher Signed-off-by: Bob Peterson Reviewed-by: Steven Whitehouse commit c3abc29e54a14953ddb26feeb62dd02d57925e52 Author: Bob Peterson Date: Thu Oct 4 00:06:23 2018 +0100 gfs2: Remove unnecessary gfs2_rlist_alloc parameter The state parameter of gfs2_rlist_alloc is set to LM_ST_EXCLUSIVE in all calls, so remove it and hardcode that state in gfs2_rlist_alloc instead. Signed-off-by: Andreas Gruenbacher Signed-off-by: Bob Peterson Reviewed-by: Steven Whitehouse commit ec23df2b0cf3e1620f5db77972b7fb735f267eff Author: Andreas Gruenbacher Date: Thu Sep 27 15:30:25 2018 +0100 gfs2: Fix marking bitmaps non-full Reservations in gfs can span multiple gfs2_bitmaps (but they won't span multiple resource groups). When removing a reservation, we want to clear the GBF_FULL flags of all involved gfs2_bitmaps, not just that of the first bitmap. Signed-off-by: Andreas Gruenbacher Signed-off-by: Bob Peterson Reviewed-by: Steven Whitehouse commit 243fea4df910ca1463a1114321823082b5440991 Author: Andreas Gruenbacher Date: Tue Oct 2 10:22:41 2018 +0100 gfs2: Fix some minor typos Signed-off-by: Andreas Gruenbacher Signed-off-by: Bob Peterson Reviewed-by: Steven Whitehouse commit 281b4952d185a3ba0340b412faa47fd745565552 Author: Andreas Gruenbacher Date: Wed Sep 26 23:32:46 2018 +0100 gfs2: Rename bitmap.bi_{len => bytes} This field indicates the size of the bitmap in bytes, similar to how the bi_blocks field indicates the size of the bitmap in blocks. In count_unlinked, replace an instance of bi_bytes * GFS2_NBBY by bi_blocks. Signed-off-by: Andreas Gruenbacher Signed-off-by: Bob Peterson Reviewed-by: Steven Whitehouse commit ad8994581815ac08123c7eeceb2ef160a96d186d Author: Andreas Gruenbacher Date: Tue Sep 25 12:59:31 2018 +0100 gfs2: Remove unused RGRP_RSRV_MINBYTES definition This definition is only used to define RGRP_RSRV_MINBLKS, with no benefit over defining RGRP_RSRV_MINBLKS directly. In addition, instead of forcing RGRP_RSRV_MINBLKS to be of type u32, cast it to that type where that type is required. Signed-off-by: Andreas Gruenbacher Signed-off-by: Bob Peterson Reviewed-by: Steven Whitehouse commit 21f09c4395c95dfaa0598d20d41cb2a669e1967e Author: Andreas Gruenbacher Date: Thu Aug 30 16:01:50 2018 +0100 gfs2: Move rs_{sizehint, rgd_gh} fields into the inode Move the rs_sizehint and rs_rgd_gh fields from struct gfs2_blkreserv into the inode: they are more closely related to the inode than to a particular reservation. Signed-off-by: Andreas Gruenbacher Signed-off-by: Bob Peterson Reviewed-by: Steven Whitehouse commit 3548fce1645bafbeb2256caaa3635a21bafd1621 Author: Andreas Gruenbacher Date: Thu Oct 11 19:35:50 2018 +0200 gfs2: Clean up out-of-bounds check in gfs2_rbm_from_block We already have a function that checks if a block is within a resource group, so use that in gfs2_rbm_from_block as well. Signed-off-by: Andreas Gruenbacher Signed-off-by: Bob Peterson Reviewed-by: Steven Whitehouse commit 786e0cfa9d6fc1cc8856c1864c988d233649348c Author: Fabrizio Castro Date: Tue Aug 21 17:03:46 2018 +0100 dt-bindings: pwm: rcar: Add r8a774a1 support Document RZ/G2M (R8A774A1) SoC bindings. Signed-off-by: Fabrizio Castro Reviewed-by: Biju Das Reviewed-by: Simon Horman Reviewed-by: Rob Herring Signed-off-by: Thierry Reding commit f654683dae0d6c4e02eb7126b14f19fd945c3569 Author: Andreas Gruenbacher Date: Mon Sep 10 17:31:47 2018 +0100 gfs2: Always check the result of gfs2_rbm_from_block When gfs2_rbm_from_block fails, the rbm it returns is undefined, so we always want to make sure gfs2_rbm_from_block has succeeded before looking at the rbm. Signed-off-by: Andreas Gruenbacher Signed-off-by: Bob Peterson Reviewed-by: Steven Whitehouse commit 552c02e3e7cfe2744b59de285aaea70021ae95c9 Author: Fabrice Gasnier Date: Mon Oct 1 15:23:57 2018 +0200 pwm: Send a uevent on the pwmchip device upon channel sysfs (un)export This patch sends a uevent (KOBJ_CHANGE) on the pwmchipN device, everytime a pwmX channel has been exported/unexported via sysfs. This allows udev to implement rules on such events, like: SUBSYSTEM=="pwm*", PROGRAM="/bin/sh -c '\ chown -R root:gpio /sys/class/pwm && chmod -R 770 /sys/class/pwm;\ chown -R root:gpio /sys/devices/platform/soc/*.pwm/pwm/pwmchip* && chmod -R 770 /sys/devices/platform/soc/*.pwm/pwm/pwmchip*\ '" This is a replacement patch for commit 7e5d1fd75c3d ("pwm: Set class for exported channels in sysfs"), see [1]. basic testing: $ udevadm monitor --environment & $ echo 0 > /sys/class/pwm/pwmchip0/export KERNEL[197.321736] change /devices/.../pwm/pwmchip0 (pwm) ACTION=change DEVPATH=/devices/.../pwm/pwmchip0 EXPORT=pwm0 SEQNUM=2045 SUBSYSTEM=pwm [1] https://lkml.org/lkml/2018/9/25/713 Signed-off-by: Fabrice Gasnier Tested-by: Gottfried Haider Tested-by: Michal Vokáč Signed-off-by: Thierry Reding commit c289d6625237aa785b484b4e94c23b3b91ea7e60 Author: Fabrice Gasnier Date: Mon Oct 1 15:23:56 2018 +0200 Revert "pwm: Set class for exported channels in sysfs" This reverts commit 7e5d1fd75c3dde9fc10c4472b9368089d1b81d00 ("pwm: Set class for exported channels in sysfs") as it causes regression with multiple pwm chip[1], when exporting a pwm channel (echo X > export): - ABI (Documentation/ABI/testing/sysfs-class-pwm) states pwmX should be created in /sys/class/pwm/pwmchipN/pwmX - Reverted patch causes new entry to be also created directly in /sys/class/pwm/pwmX - 1st time, exporting pwmX will create an entry in /sys/class/pwm/pwmX - class attributes are added under pwmX folder, such as export, unexport npwm, symlinks. This is wrong as it belongs to pwmchipN. It may cause bad behavior and report wrong values. - when another export happens on another pwmchip, it can't be created (e.g. -EEXIST). This is causing the issue with multiple pwmchip. Example on stm32 (stm32429i-eval) platform: $ ls /sys/class/pwm pwmchip0 pwmchip4 $ cd /sys/class/pwm/pwmchip0/ $ echo 0 > export $ ls /sys/class/pwm pwm0 pwmchip0 pwmchip4 $ cd /sys/class/pwm/pwmchip4/ $ echo 0 > export sysfs: cannot create duplicate filename '/class/pwm/pwm0' ...Exception stack follows... This is also seen on other platform [2] [1] https://lkml.org/lkml/2018/9/25/713 [2] https://lkml.org/lkml/2018/9/25/447 Signed-off-by: Fabrice Gasnier Tested-by: Gottfried Haider Tested-by: Michal Vokáč Signed-off-by: Thierry Reding commit d5a7060022cd443cc6a054bc73383acac6a8f53d Author: Biju Das Date: Thu Oct 4 17:21:34 2018 +0100 dt-bindings: pwm: renesas-tpu: Document r8a7744 support Document r8a7744 specific compatible strings. No driver change is needed as the fallback compatible string "renesas,tpu" activates the right code in the driver. Signed-off-by: Biju Das Reviewed-by: Chris Paterson Reviewed-by: Simon Horman Signed-off-by: Thierry Reding commit a4675881ed71f73f5ea96afda6a1ddc1526fde4d Author: Biju Das Date: Thu Oct 4 17:17:19 2018 +0100 dt-bindings: pwm: rcar: Add r8a7744 support Document RZ/G1N (R8A7744) SoC bindings. Signed-off-by: Biju Das Reviewed-by: Chris Paterson Reviewed-by: Simon Horman Signed-off-by: Thierry Reding commit 136d822a9e4e947609d2fbf8d3fa5f15b8c20970 Author: Sergei Shtylyov Date: Sat Sep 22 22:57:29 2018 +0300 dt-bindings: pwm: renesas: tpu: Document R8A779{7|8}0 bindings Document the R-Car V3{M|H} (R8A779{7|8}0) SoC in the Renesas TPU bindings; the TPU hardware in those is the Renesas standard 4-channel timer pulse unit. Signed-off-by: Sergei Shtylyov Reviewed-by: Geert Uytterhoeven Reviewed-by: Simon Horman Signed-off-by: Thierry Reding commit 2360fc6a704e8dc1f8183a048980052bfe64388b Author: Sergei Shtylyov Date: Mon Oct 1 22:57:39 2018 +0300 dt-bindings: pwm: renesas: pwm-rcar: Document R8A779{7|8}0 bindings Document the R-Car V3{M|H} (R8A779{7|8}0) SoC in the Renesas R-Car PWM bindings. R8A77970's hardware is a generic R-Car gen3 PWM, while R8A77980 has an extra error injection register... Signed-off-by: Sergei Shtylyov Reviewed-by: Geert Uytterhoeven Reviewed-by: Simon Horman Signed-off-by: Thierry Reding commit 01e194bbd64a7c65af428561fa97653be8b74564 Author: Sergei Shtylyov Date: Sat Sep 22 22:43:24 2018 +0300 dt-bindings: pwm: renesas: tpu: Fix "compatible" prop description The "compatible" property description contradicts even the example given: it only says that there must be a single value while the example has the fallback value too -- which makes much more sense. Moreover, the generic property value is misdocumented as being R-Car (and RZ/G1) specific... Fixes: 382457e562bb ("pwm: renesas-tpu: Add DT support") Fixes: 3ba111a01822 ("dt-bindings: pwm: renesas-tpu: Document r8a774[35] support") Signed-off-by: Sergei Shtylyov Signed-off-by: Thierry Reding commit e4ab5172ea6be4d3a95411d7a7867f3c2be12754 Author: Wolfram Sang Date: Wed Aug 22 00:02:21 2018 +0200 pwm: Use SPDX identifier for Renesas drivers Signed-off-by: Wolfram Sang Reviewed-by: Simon Horman Signed-off-by: Thierry Reding commit e81e36a96bb56f243b5ac1d114c37c086761595b Author: Alan Douglas Date: Thu Oct 11 17:15:54 2018 +0100 PCI: cadence: Write MSI data with 32bits According to the PCIe specification, although the MSI data is only 16bits, the upper 16bits should be written as 0. Use writel instead of writew when writing the MSI data to the host. Fixes: 37dddf14f1ae ("PCI: cadence: Add EndPoint Controller driver for Cadence PCIe controller") Signed-off-by: Alan Douglas Signed-off-by: Lorenzo Pieralisi commit 0652d4b6b56f73c81abbdbc7e26f772cb2dfe370 Author: Alan Douglas Date: Thu Oct 11 17:15:43 2018 +0100 PCI: cadence: Use AXI region 0 to signal interrupts from EP The IRQ physical address is allocated from region 0, rather than the highest region. Update the driver to reserve this region in the bitmap and to use region 0 for all types of interrupt. This corrects a problem which prevents the interrupt being signalled correctly if using the first address in the AXI region, since an offset of zero will always be mapped to region 0. Fixes: 37dddf14f1ae ("PCI: cadence: Add EndPoint Controller driver for Cadence PCIe controller") Signed-off-by: Alan Douglas Signed-off-by: Lorenzo Pieralisi commit f8252e7b5a83deee0e477fc1e31e3f06ceb35d28 Author: Anilkumar Kolli Date: Thu Oct 11 18:15:03 2018 +0530 mac80211: implement ieee80211_tx_rate_update to update rate Current mac80211 has provision to update tx status through ieee80211_tx_status() and ieee80211_tx_status_ext(). But drivers like ath10k updates the tx status from the skb except txrate, txrate will be updated from a different path, peer stats. Using ieee80211_tx_status_ext() in two different paths (one for the stats, one for the tx rate) would duplicate the stats instead. To avoid this stats duplication, ieee80211_tx_rate_update() is implemented. Signed-off-by: Anilkumar Kolli [minor commit message editing, use initializers in code] Signed-off-by: Johannes Berg commit 0d4e14a32dcab9c4bd559d02874120fbb86b1322 Author: Ankita Bajaj Date: Thu Sep 27 18:01:57 2018 +0300 nl80211: Add per peer statistics to compute FCS error rate Add support for drivers to report the total number of MPDUs received and the number of MPDUs received with an FCS error from a specific peer. These counters will be incremented only when the TA of the frame matches the MAC address of the peer irrespective of FCS error. It should be noted that the TA field in the frame might be corrupted when there is an FCS error and TA matching logic would fail in such cases. Hence, FCS error counter might not be fully accurate, but it can provide help in detecting bad RX links in significant number of cases. This FCS error counter without full accuracy can be used, e.g., to trigger a kick-out of a connected client with a bad link in AP mode to force such a client to roam to another AP. Signed-off-by: Ankita Bajaj Signed-off-by: Jouni Malinen Signed-off-by: Johannes Berg commit f703fd374ef8fb06e46713b326d255e20d6278ad Author: YueHaibing Date: Fri Oct 12 10:40:22 2018 +0000 x86/cpu: Drop pointless static qualifier in punit_dev_state_show() There is no need to have the 'struct dentry *dev_state' variable static since new value always be assigned before use it. Signed-off-by: YueHaibing Cc: Andy Shevchenko Cc: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: kernel-janitors@vger.kernel.org Link: http://lkml.kernel.org/r/1539340822-117563-1-git-send-email-yuehaibing@huawei.com Signed-off-by: Ingo Molnar commit bc847970f43281cb07c9f7d0897ee08cd1e08cf3 Author: Pradeep Kumar Chitrapu Date: Wed Oct 3 20:19:20 2018 -0700 mac80211: support FTM responder configuration/statistics New bss param ftm_responder is used to notify the driver to enable fine timing request (FTM) responder role in AP mode. Plumb the new cfg80211 API for FTM responder statistics through to the driver API in mac80211. Signed-off-by: David Spinadel Signed-off-by: Johannes Berg Signed-off-by: Pradeep Kumar Chitrapu Signed-off-by: Johannes Berg commit 280fec4c3ad6701567d7d840506b9b1463a48b71 Author: Hans de Goede Date: Fri Oct 12 12:12:29 2018 +0200 pwm: lpss: Add get_state callback Add a get_state callback so that the initial state correctly reflects the actual hardware state. Cc: Andy Shevchenko Acked-by: Jani Nikula Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Thierry Reding commit 42885551cedb45961879d2fc3dc3c4dc545cc23e Author: Hans de Goede Date: Fri Oct 12 12:12:28 2018 +0200 pwm: lpss: Release runtime-pm reference from the driver's remove callback For each pwm output which gets enabled through pwm_lpss_apply(), we do a pm_runtime_get_sync(). This commit adds pm_runtime_put() calls to pwm_lpss_remove() to balance these when the driver gets removed with some of the outputs still enabled. Fixes: f080be27d7d9 ("pwm: lpss: Add support for runtime PM") Acked-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Thierry Reding commit 6a425ecd19a2c0e19a501323216ecf987de07841 Author: Hans de Goede Date: Fri Oct 12 12:12:27 2018 +0200 pwm: lpss: Check PWM powerstate after resume on Cherry Trail devices The _PS0 method for the integrated graphics on some Cherry Trail devices (observed on a HP Pavilion X2 10-p0XX) turns on the PWM chip (puts it in D0), causing an inconsistency between the state the pm-core thinks it is in (left runtime suspended as it was before the suspend/resume) and the state it actually is in. Interestingly enough this is done on a device where the pwm controller is not used for the backlight at all, since it uses an eDP panel. On devices where the PWM is used this is not a problem since we will resume it ourselves anyways. This inconsistency causes us to never suspend the pwm controller again, which causes the device to not be able to reach S0ix states when suspended. This commit adds a resume-complete handler, which when we think the device is still run-time suspended checks the actual power-state and if necessary updates the rpm-core's internal state. This fixes the Pavilion X2 10-p0XX not reaching S0ix states when suspended. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Thierry Reding commit 9dc419b6c7e4bb67c0966758c1e4c9a9c9a4309d Author: Hans de Goede Date: Fri Oct 12 12:12:26 2018 +0200 pwm: lpss: Move struct pwm_lpss_chip definition to the header file Move struct pwm_lpss_chip definition from pwm-lpss.c to pwm-lpss.h, so that the pci/platform drivers can access the info member (struct pwm_lpss_boardinfo *). This is a preparation patch for adding platform specific quirks, which the drivers need access to, to pwm_lpss_boardinfo. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Thierry Reding commit 1688c8717118f37191d824862a006c8373d261de Author: Hans de Goede Date: Fri Oct 12 12:12:25 2018 +0200 pwm: lpss: Add ACPI HID for second PWM controller on Cherry Trail devices The second PWM controller on Cherry Trail devices uses a separate ACPI HID: "80862289", add this so that the driver will properly bind to the second PWM controller. The second PWM controller is usually not used, the main thing gained by this is properly putting the PWM controller in D3 on suspend. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Thierry Reding commit fe650c8ba7c9dde2816d09e335b0be37757e49df Author: Hans de Goede Date: Fri Oct 12 12:12:24 2018 +0200 ACPI / PM: Export acpi_device_get_power() for use by modular build drivers Export acpi_device_get_power() for use by modular build drivers. Reviewed-by: Andy Shevchenko Acked-by: Rafael J. Wysocki Signed-off-by: Hans de Goede Signed-off-by: Thierry Reding commit 41fe242979e463d6ad251077ded01b825a330b7e Author: Liu Xiang Date: Tue Aug 28 22:32:57 2018 +0800 mtd: spi-nor: fsl-quadspi: fix read error for flash size larger than 16MB If the size of spi-nor flash is larger than 16MB, the read_opcode is set to SPINOR_OP_READ_1_1_4_4B, and fsl_qspi_get_seqid() will return -EINVAL when cmd is SPINOR_OP_READ_1_1_4_4B. This can cause read operation fail. Fixes: e46ecda764dc ("mtd: spi-nor: Add Freescale QuadSPI driver") Cc: Signed-off-by: Liu Xiang Signed-off-by: Boris Brezillon commit 42460c31ae96cbad5ae226ee6c10bd8d70d764ae Author: Mika Westerberg Date: Thu Aug 30 11:42:57 2018 +0300 mtd: spi-nor: intel-spi: Add support for Intel Ice Lake SPI serial flash Intel Ice Lake exposes the SPI serial flash controller as a PCI device in the same way than Intel Denverton. Add Ice Lake SPI serial flash PCI ID to the driver list of supported devices. Signed-off-by: Mika Westerberg Acked-by: Marek Vasut Cc: stable@vger.kernel.org Signed-off-by: Boris Brezillon commit 431bca24308c5a82575571023a7128a881f716b2 Author: Geert Uytterhoeven Date: Thu Oct 11 10:42:49 2018 +0200 lib/vsprintf: Hash printed address for netdev bits fallback The handler for "%pN" falls back to printing the raw pointer value when using a different format than the (sole supported) special format "%pNF", potentially leaking sensitive information regarding the kernel layout in memory. Avoid this leak by printing the hashed address instead. Note that there are no in-tree users of the fallback. Fixes: ad67b74d2469d9b8 ("printk: hash addresses printed with %p") Link: http://lkml.kernel.org/r/20181011084249.4520-4-geert+renesas@glider.be To: "Tobin C . Harding" To: Andrew Morton To: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Geert Uytterhoeven Reviewed-by: Andy Shevchenko Signed-off-by: Petr Mladek commit ec12bc2909f9759747ab5ad3709472353c43a750 Author: Geert Uytterhoeven Date: Thu Oct 11 10:42:48 2018 +0200 lib/vsprintf: Hash legacy clock addresses On platforms using the Common Clock Framework, "%pC" prints the clock's name. On legacy platforms, it prints the unhashed clock's address, potentially leaking sensitive information regarding the kernel layout in memory. Avoid this leak by printing the hashed address instead. To distinguish between clocks, a 32-bit unique identifier is as good as an actual pointer value. Fixes: ad67b74d2469d9b8 ("printk: hash addresses printed with %p") Link: http://lkml.kernel.org/r/20181011084249.4520-3-geert+renesas@glider.be To: "Tobin C . Harding" To: Andrew Morton To: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Geert Uytterhoeven Reviewed-by: Andy Shevchenko Signed-off-by: Petr Mladek commit 9073dac14e397f26603b14d5c0929186a0404a53 Author: Geert Uytterhoeven Date: Thu Oct 11 10:42:47 2018 +0200 lib/vsprintf: Prepare for more general use of ptr_to_id() Move the function and its dependencies up so it can be called from special pointer type formatting routines. Link: http://lkml.kernel.org/r/20181011084249.4520-2-geert+renesas@glider.be To: "Tobin C . Harding" To: Andrew Morton To: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Geert Uytterhoeven Reviewed-by: Andy Shevchenko [pmladek@suse.com: Split into separate patch] Signed-off-by: Petr Mladek commit ce7bdb957b8e3f1cbf0a3358f1deef385dff6502 Author: Rafał Miłecki Date: Thu Oct 11 13:23:40 2018 +0200 pinctrl: bcm: ns: Use uintptr_t for casting data Fix up a compiler error on 64bit architectures where pointers and integers differ in size. Suggested-by: Arnd Bergmann Signed-off-by: Rafał Miłecki Signed-off-by: Linus Walleij commit 4fe81669df50889ff1072c030c59df5f1fa6534e Author: Gustavo A. R. Silva Date: Wed Oct 10 17:13:13 2018 +0200 pinctrl: madera: Fix uninitialized variable bug in madera_mux_set_mux There is a potential execution path in which variable *ret* is checked in an IF statement, and then its value is used to report an error at line 659 without being properly initialized previously: 659 if (ret) 660 dev_err(priv->dev, "Failed to write to 0x%x (%d)\n", reg, ret); Fix this by initializing variable *ret* to 0 in order to avoid unpredictable or unintended results. Addresses-Coverity-ID: 1471969 ("Uninitialized scalar variable") Fixes: 218d72a77b0b ("pinctrl: madera: Add driver for Cirrus Logic Madera codecs") Signed-off-by: Gustavo A. R. Silva Acked-by: Charles Keepax Signed-off-by: Linus Walleij commit f31b224c14fdf97ea371d52de9a26ad246820fb4 Author: Geert Uytterhoeven Date: Thu Oct 11 10:42:47 2018 +0200 lib/vsprintf: Make ptr argument conts in ptr_to_id() Make the ptr argument const to avoid adding casts in future callers. Link: http://lkml.kernel.org/r/20181011084249.4520-2-geert+renesas@glider.be To: "Tobin C . Harding" To: Andrew Morton To: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Geert Uytterhoeven Reviewed-by: Andy Shevchenko [pmladek@suse.com: split into separate patch] Signed-off-by: Petr Mladek commit bde091ece2ad3f78d0896870f041bc52761ea3c1 Author: Rafael J. Wysocki Date: Wed Oct 10 14:16:38 2018 +0200 cpuidle: menu: Simplify checks related to the polling state After some recent menu governor changes, the promotion of the "polling" state to a physical one is mostly controlled by the latency limit (resulting from the "interactivity" factor) and not by the time to the closest timer event, so it should be sufficient to check the exit latency of that state for this purpose (of course, its target residency still needs to be within the next timer event range for energy-efficiency). Also, the physical state the "polling" one is promoted to need not be the next one in principle (in case the next state is disabled, for example). For these reasons, simplify the checks made to decide whether or not to promote the "polling" state to a physical one and update the target idle duration when it is promoted in case the residency of the new state turns out to be above the tick boundary (in which case there is no reason to stop the tick). Tested-by: Doug Smythies Signed-off-by: Rafael J. Wysocki commit d2130e82e9454304e9b91ba9da551b5989af8c27 Author: Sergey Senozhatsky Date: Wed Oct 10 20:33:08 2018 +0900 printk: fix integer overflow in setup_log_buf() The way we calculate logbuf free space percentage overflows signed integer: int free; free = __LOG_BUF_LEN - log_next_idx; pr_info("early log buf free: %u(%u%%)\n", free, (free * 100) / __LOG_BUF_LEN); We support LOG_BUF_LEN of up to 1<<25 bytes. Since setup_log_buf() is called during early init, logbuf is mostly empty, so __LOG_BUF_LEN - log_next_idx is close to 1<<25. Thus when we multiply it by 100, we overflow signed integer value range: 100 is 2^6 + 2^5 + 2^2. Example, booting with LOG_BUF_LEN 1<<25 and log_buf_len=2G boot param: [ 0.075317] log_buf_len: -2147483648 bytes [ 0.075319] early log buf free: 33549896(-28%) Make "free" unsigned integer and use appropriate printk() specifier. Link: http://lkml.kernel.org/r/20181010113308.9337-1-sergey.senozhatsky@gmail.com To: Steven Rostedt Cc: linux-kernel@vger.kernel.org Cc: Sergey Senozhatsky Signed-off-by: Sergey Senozhatsky Signed-off-by: Petr Mladek commit 56f57c07fd084093597f227f4181cf743f582490 Author: Bartlomiej Zolnierkiewicz Date: Wed Oct 10 16:41:30 2018 +0200 ACPI: 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: Rafael J. Wysocki commit 767cd17a5cc5ce2d5342f5c4bd6c5d36b812c7a7 Author: Ricardo Ribalda Delgado Date: Fri Oct 12 08:11:36 2018 +0200 gpiolib: Initialize gdev field before is used gpio_hog depends on gdev field being initialized. This patch fixes an OOPs during initialization of TI's AM335x-ICEv2. Fixes: 3edfb7bd76bd1cba ("gpiolib: Show correct direction from the beginning") Tested-by: Vignesh R Signed-off-by: Ricardo Ribalda Delgado Signed-off-by: Linus Walleij commit 0e96a19c4450253c3ddcff69140b1096f2c2adaf Author: Sergey Senozhatsky Date: Tue Oct 2 11:38:36 2018 +0900 printk: do not preliminary split up cont buffer We have a proper 'overflow' check which tells us that we need to split up existing cont buffer in separate records: if (cont.len + len > sizeof(cont.buf)) cont_flush(); At the same time we also have one extra flush: "if cont buffer is 80% full then split it up" in cont_add(): if (cont.len > (sizeof(cont.buf) * 80) / 100) cont_flush(); This looks to be redundant, since the existing "overflow" check should work just fine, so remove this 80% check and wait for either a normal cont termination \n, for preliminary flush due to possible buffer overflow or for preliminary flush due to cont race. Link: http://lkml.kernel.org/r/20181002023836.4487-4-sergey.senozhatsky@gmail.com To: Steven Rostedt Cc: Andrew Morton Cc: Dmitriy Vyukov Cc: Tetsuo Handa Cc: Tejun Heo Cc: Peter Zijlstra Cc: LKML Cc: Sergey Senozhatsky Signed-off-by: Sergey Senozhatsky Signed-off-by: Petr Mladek commit 3ac37a93fa9217e576bebfd4ba3e80edaaeb2289 Author: Sergey Senozhatsky Date: Tue Oct 2 11:38:35 2018 +0900 printk: lock/unlock console only for new logbuf entries Prior to commit 5c2992ee7fd8a29 ("printk: remove console flushing special cases for partial buffered lines") we would do console_cont_flush() for each pr_cont() to print cont fragments, so console_unlock() would actually print data: pr_cont(); console_lock(); console_unlock() console_cont_flush(); // print cont fragment ... pr_cont(); console_lock(); console_unlock() console_cont_flush(); // print cont fragment We don't do console_cont_flush() anymore, so when we do pr_cont() console_unlock() does nothing (unless we flushed the cont buffer): pr_cont(); console_lock(); console_unlock(); // noop ... pr_cont(); console_lock(); console_unlock(); // noop ... pr_cont(); cont_flush(); console_lock(); console_unlock(); // print data We also wakeup klogd purposelessly for pr_cont() output - un-flushed cont buffer is not stored in log_buf; there is nothing to pull. Thus we can console_lock()/console_unlock()/wake_up_klogd() only when we know that we log_store()-ed a message and there is something to print to the consoles/syslog. Link: http://lkml.kernel.org/r/20181002023836.4487-3-sergey.senozhatsky@gmail.com To: Steven Rostedt Cc: Andrew Morton Cc: Dmitriy Vyukov Cc: Tetsuo Handa Cc: Tejun Heo Cc: Peter Zijlstra Cc: LKML Cc: Sergey Senozhatsky Signed-off-by: Sergey Senozhatsky Signed-off-by: Petr Mladek commit 9627808d2d409279cea3fb334212d04a83ff6371 Author: Sergey Senozhatsky Date: Tue Oct 2 11:38:34 2018 +0900 printk: keep kernel cont support always enabled Since commit 5c2992ee7fd8a29 ("printk: remove console flushing special cases for partial buffered lines") we don't print cont fragments to the consoles; cont lines are now proper log_buf entries and there is no "consecutive continuation flag" anymore: we either have 'c' entries that mark continuation lines without fragments; or '-' entries that mark normal logbuf entries. There are no '+' entries anymore. However, we still have a small leftover - presence of ext_console drivers disables kernel cont support and we flush each pr_cont() and store it as a separate log_buf entry. Previously, it worked because msg_print_ext_header() had that "an optional external merge of the records" functionality: if (msg->flags & LOG_CONT) cont = (prev_flags & LOG_CONT) ? '+' : 'c'; We don't do this as of now, so keep kernel cont always enabled. Note from pmladek: The original purpose was to get full information including the metadata and dictionary via extended console drivers, see commit 6fe29354befe4c46e ("printk: implement support for extended console drivers"). The dictionary probably was the most important part but it was actually lost: static void cont_flush(void) { [...] log_store(cont.facility, cont.level, cont.flags, cont.ts_nsec, NULL, 0, cont.buf, cont.len); Nobody noticed because the only dictionary user is dev_printk() and dev_cont() is _not_ defined. Link: http://lkml.kernel.org/r/20181002023836.4487-2-sergey.senozhatsky@gmail.com To: Steven Rostedt Cc: Andrew Morton Cc: Dmitriy Vyukov Cc: Tetsuo Handa Cc: Tejun Heo Cc: Peter Zijlstra Cc: LKML Cc: Sergey Senozhatsky Signed-off-by: Sergey Senozhatsky [pmladek@suse.com: Updated commit message] Signed-off-by: Petr Mladek commit 68da4fa51af4ea9d10099e48351b3cdaae7b1d23 Author: Takashi Iwai Date: Thu Oct 4 20:04:38 2018 +0200 ALSA: au88xx: Add fall-through annotations As a preparatory patch for the upcoming -Wimplicit-fallthrough compiler checks, add the "fall through" annotation in au88xx driver. Although the usages in both both functions vortex_adbdma_setbuffers() and vortex_wtdma_setbuffers() look a bit suspicious, we keep the behavior as before, just to be safer. If it were broken, we should have already received bug reports. Signed-off-by: Takashi Iwai commit 74ce5a46bb7b0298dc0be11bae944fca5d1f18a7 Author: Takashi Iwai Date: Thu Oct 4 20:02:06 2018 +0200 ALSA: opti92xx-ad1848: Use the standard fall-through annotation As a preparatory patch for the upcoming -Wimplicit-fallthrough compiler checks, replace with the standard "fall through" annotation at the right places. They have to be put right before the next labels. Signed-off-by: Takashi Iwai commit e8c92251a8351f9550a9e20a47364d0a20f28d95 Author: Takashi Iwai Date: Thu Oct 4 19:59:41 2018 +0200 ALSA: seq: oss: Use the standard fall-through annotation As a preparatory patch for the upcoming -Wimplicit-fallthrough compiler checks, replace with the standard "fall through" annotation. Unfortunately gcc doesn't understand a chattier text. Signed-off-by: Takashi Iwai commit 590b516e25636c696550b44b11fcfed42167adfd Author: Takashi Iwai Date: Thu Oct 4 19:58:23 2018 +0200 ALSA: caiaq: Add fall-through annotation As a preparatory patch for the upcoming -Wimplicit-fallthrough compiler checks, add the "fall through" annotation in caiaq driver. Note that this seems necessary to be put exactly before the next label, so it's outside the ifdef block. Signed-off-by: Takashi Iwai commit 3c4cfa7bf6075be035cff3cac0986395f6fca32b Author: Takashi Iwai Date: Thu Oct 4 19:54:51 2018 +0200 ALSA: memalloc: Add fall-through annotation As a preparatory patch for the upcoming -Wimplicit-fallthrough compiler checks, add the "fall through" annotation in snd_dma_alloc_pages(). Note that this seems necessary to be put exactly before the next label, so it's outside the ifdef block. Signed-off-by: Takashi Iwai commit e953c7ecdf07f23310cd631913ee829c38de3aa2 Author: Takashi Sakamoto Date: Fri Oct 12 16:08:59 2018 +0900 ALSA: firewire-motu: add missing entries to Kconfig MOTU Traveler and Audio Express are supported as well. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai commit ce4e45842de3eb54b8dd6e081765d741f5b92b56 Author: Wei Yongjun Date: Thu Oct 11 01:49:48 2018 +0000 crypto: mxs-dcp - make symbols 'sha1_null_hash' and 'sha256_null_hash' static Fixes the following sparse warnings: drivers/crypto/mxs-dcp.c:39:15: warning: symbol 'sha1_null_hash' was not declared. Should it be static? drivers/crypto/mxs-dcp.c:43:15: warning: symbol 'sha256_null_hash' was not declared. Should it be static? Fixes: c709eebaf5c5 ("crypto: mxs-dcp - Fix SHA null hashes and output length") Signed-off-by: Wei Yongjun Signed-off-by: Herbert Xu commit cc3cc48972371b3c2e94f16b6ac7bdad7fdfc93c Author: Ard Biesheuvel Date: Mon Oct 8 13:16:59 2018 +0200 crypto: arm64/aes-blk - ensure XTS mask is always loaded Commit 2e5d2f33d1db ("crypto: arm64/aes-blk - improve XTS mask handling") optimized away some reloads of the XTS mask vector, but failed to take into account that calls into the XTS en/decrypt routines will take a slightly different code path if a single block of input is split across different buffers. So let's ensure that the first load occurs unconditionally, and move the reload to the end so it doesn't occur needlessly. Fixes: 2e5d2f33d1db ("crypto: arm64/aes-blk - improve XTS mask handling") Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 22a8118d329334833cd30f2ceb36d28e8cae8a4f Author: Michael Schupikov Date: Sun Oct 7 13:58:10 2018 +0200 crypto: testmgr - fix sizeof() on COMP_BUF_SIZE After allocation, output and decomp_output both point to memory chunks of size COMP_BUF_SIZE. Then, only the first bytes are zeroed out using sizeof(COMP_BUF_SIZE) as parameter to memset(), because sizeof(COMP_BUF_SIZE) provides the size of the constant and not the size of allocated memory. Instead, the whole allocated memory is meant to be zeroed out. Use COMP_BUF_SIZE as parameter to memset() directly in order to accomplish this. Fixes: 336073840a872 ("crypto: testmgr - Allow different compression results") Signed-off-by: Michael Schupikov Reviewed-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit cb1af1f5991648e33dfae1f0194accc42b6fbf73 Author: YueHaibing Date: Fri Oct 5 06:43:27 2018 +0000 crypto: chtls - remove set but not used variable 'csk' Fixes gcc '-Wunused-but-set-variable' warning: drivers/crypto/chelsio/chtls/chtls_cm.c: In function 'chtls_disconnect': drivers/crypto/chelsio/chtls/chtls_cm.c:408:21: warning: variable 'csk' set but not used [-Wunused-but-set-variable] drivers/crypto/chelsio/chtls/chtls_cm.c: In function 'chtls_recv_sock': drivers/crypto/chelsio/chtls/chtls_cm.c:1016:23: warning: variable 'tcph' set but not used [-Wunused-but-set-variable] 'csk' and 'tcph' are never used since introduce in commit cc35c88ae4db ("crypto : chtls - CPL handler definition") Signed-off-by: YueHaibing Signed-off-by: Herbert Xu commit 68138b5d583a8dd8b88570caed46e3efab219797 Author: YueHaibing Date: Fri Oct 5 06:42:44 2018 +0000 crypto: axis - 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: Herbert Xu commit 51e68fb0929c29e47e9074ca3e99ffd6021a1c5a Author: Takashi Sakamoto Date: Fri Oct 12 14:25:22 2018 +0900 ALSA: isight: fix leak of reference to firewire unit in error path of .probe callback In some error paths, reference count of firewire unit is not decreased. This commit fixes the bug. Fixes: 5b14ec25a79b('ALSA: firewire: release reference count of firewire unit in .remove callback of bus driver') Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai commit e7bb6ad5685f05685dd8a6a5eda7bfcd14d5f95b Author: Jeremy Cline Date: Thu Oct 11 15:49:17 2018 -0400 ALSA: hda - Add mic quirk for the Lenovo G50-30 (17aa:3905) The Lenovo G50-30, like other G50 models, has a Conexant codec that requires a quirk for its inverted stereo dmic. Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1249364 Reported-by: Alexander Ploumistos Tested-by: Alexander Ploumistos Cc: stable@vger.kernel.org Signed-off-by: Jeremy Cline Signed-off-by: Takashi Iwai commit 04e79eb704b20ec330e96e93727ac27e66f66dcb Author: Bartlomiej Zolnierkiewicz Date: Wed Oct 10 16:35:57 2018 +0200 hwmon: (pmbus) 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: Guenter Roeck commit 61b8ab2c5481dc48e8df9a13c297636c1d369554 Author: Nicolin Chen Date: Tue Oct 9 14:42:19 2018 -0700 hwmon: (core) Add trace events to _attr_show/store functions Trace events are useful for people who collect data from the Ftrace outputs. There're people who analyse the relationship of cpufreq, thermal and hwmon (power/voltage/current) using the convenient and timestamped Ftrace outputs, while unlike cpufreq and thermal subsystems the hwmon does not have trace events supported yet. So this patch adds initial trace events for the hwmon core. To call hwmon_attr_base() for aligned attr index numbers, it also moves the function upward. Ftrace outputs: ...: hwmon_attr_show_string: index=2, attr_name=in2_label, val=VDD_5V ...: hwmon_attr_show: index=2, attr_name=in2_input, val=5112 ...: hwmon_attr_show: index=2, attr_name=curr2_input, val=440 Note that the _attr_show and _attr_store functions are tied to the _with_info API. So a hwmon driver requiring the trace events feature should use _with_info API to register a hwmon device. Signed-off-by: Nicolin Chen Signed-off-by: Guenter Roeck commit 0711e8c1b4572d076264e71b0002d223f2666ed7 Author: Jan Glauber Date: Thu Oct 11 12:13:01 2018 +0200 ipmi: Fix timer race with module unload Please note that below oops is from an older kernel, but the same race seems to be present in the upstream kernel too. ---8<--- The following panic was encountered during removing the ipmi_ssif module: [ 526.352555] Unable to handle kernel paging request at virtual address ffff000006923090 [ 526.360464] Mem abort info: [ 526.363257] ESR = 0x86000007 [ 526.366304] Exception class = IABT (current EL), IL = 32 bits [ 526.372221] SET = 0, FnV = 0 [ 526.375269] EA = 0, S1PTW = 0 [ 526.378405] swapper pgtable: 4k pages, 48-bit VAs, pgd = 000000008ae60416 [ 526.385185] [ffff000006923090] *pgd=000000bffcffe803, *pud=000000bffcffd803, *pmd=0000009f4731a003, *pte=0000000000000000 [ 526.396141] Internal error: Oops: 86000007 [#1] SMP [ 526.401008] Modules linked in: nls_iso8859_1 ipmi_devintf joydev input_leds ipmi_msghandler shpchp sch_fq_codel ib_iser rdma_cm iw_cm ib_cm ib_core iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi ip_tables x_tables autofs4 btrfs zstd_compress raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx xor raid6_pq libcrc32c raid1 raid0 multipath linear i2c_smbus hid_generic usbhid uas hid usb_storage ast aes_ce_blk i2c_algo_bit aes_ce_cipher qede ttm crc32_ce ptp crct10dif_ce drm_kms_helper ghash_ce syscopyarea sha2_ce sysfillrect sysimgblt pps_core fb_sys_fops sha256_arm64 sha1_ce mpt3sas qed drm raid_class ahci scsi_transport_sas libahci gpio_xlp i2c_xlp9xx aes_neon_bs aes_neon_blk crypto_simd cryptd aes_arm64 [last unloaded: ipmi_ssif] [ 526.468085] CPU: 125 PID: 0 Comm: swapper/125 Not tainted 4.15.0-35-generic #38~lp1775396+build.1 [ 526.476942] Hardware name: To be filled by O.E.M. Saber/Saber, BIOS 0ACKL022 08/14/2018 [ 526.484932] pstate: 00400009 (nzcv daif +PAN -UAO) [ 526.489713] pc : 0xffff000006923090 [ 526.493198] lr : call_timer_fn+0x34/0x178 [ 526.497194] sp : ffff000009b0bdd0 [ 526.500496] x29: ffff000009b0bdd0 x28: 0000000000000082 [ 526.505796] x27: 0000000000000002 x26: ffff000009515188 [ 526.511096] x25: ffff000009515180 x24: ffff0000090f1018 [ 526.516396] x23: ffff000009519660 x22: dead000000000200 [ 526.521696] x21: ffff000006923090 x20: 0000000000000100 [ 526.526995] x19: ffff809eeb466a40 x18: 0000000000000000 [ 526.532295] x17: 000000000000000e x16: 0000000000000007 [ 526.537594] x15: 0000000000000000 x14: 071c71c71c71c71c [ 526.542894] x13: 0000000000000000 x12: 0000000000000000 [ 526.548193] x11: 0000000000000001 x10: ffff000009b0be88 [ 526.553493] x9 : 0000000000000000 x8 : 0000000000000005 [ 526.558793] x7 : ffff80befc1f8528 x6 : 0000000000000020 [ 526.564092] x5 : 0000000000000040 x4 : 0000000020001b20 [ 526.569392] x3 : 0000000000000000 x2 : ffff809eeb466a40 [ 526.574692] x1 : ffff000006923090 x0 : ffff809eeb466a40 [ 526.579992] Process swapper/125 (pid: 0, stack limit = 0x000000002eb50acc) [ 526.586854] Call trace: [ 526.589289] 0xffff000006923090 [ 526.592419] expire_timers+0xc8/0x130 [ 526.596070] run_timer_softirq+0xec/0x1b0 [ 526.600070] __do_softirq+0x134/0x328 [ 526.603726] irq_exit+0xc8/0xe0 [ 526.606857] __handle_domain_irq+0x6c/0xc0 [ 526.610941] gic_handle_irq+0x84/0x188 [ 526.614679] el1_irq+0xe8/0x180 [ 526.617822] cpuidle_enter_state+0xa0/0x328 [ 526.621993] cpuidle_enter+0x34/0x48 [ 526.625564] call_cpuidle+0x44/0x70 [ 526.629040] do_idle+0x1b8/0x1f0 [ 526.632256] cpu_startup_entry+0x2c/0x30 [ 526.636174] secondary_start_kernel+0x11c/0x130 [ 526.640694] Code: bad PC value [ 526.643800] ---[ end trace d020b0b8417c2498 ]--- [ 526.648404] Kernel panic - not syncing: Fatal exception in interrupt [ 526.654778] SMP: stopping secondary CPUs [ 526.658734] Kernel Offset: disabled [ 526.662211] CPU features: 0x5800c38 [ 526.665688] Memory Limit: none [ 526.668768] ---[ end Kernel panic - not syncing: Fatal exception in interrupt Prevent mod_timer from arming a timer that was already removed by del_timer during module unload. Signed-off-by: Jan Glauber Cc: # 3.19 Signed-off-by: Corey Minyard commit d9265e8a878aa19898667ab32f6b8936170cf1f9 Author: Hans de Goede Date: Thu Oct 11 17:04:13 2018 -0700 Input: of_touchscreen - add support for touchscreen-min-x|y Some touchscreens, depending on the firmware and/or the digitizer, report coordinates which never reach 0 along one or both of their axis. This has been seen for example on the Silead touchscreens on a Onda V891w and a Point of View mobii TAB-P800w(v2.0). This commit adds support for touchscreen-min-x and touchscreen-min-y device-properties which can be set to communicate the actual start coordinates (rather then 0,0) to userspace. This commit also drop the "(in pixels)" comment from the documentation of the touchscreen-size-x and touchscreen-size-y properties. The comment suggested that there is a relation between the range of reported coordinates and the display resolution, which is only true for some devices. The "(in pixels)" comment is replaced with "(maximum x coordinate reported + 1)" to mirror the language describing the new touchscreen-min-x and -min-y properties. When set this fixes e.g. not being able to click things in the GNOME3 top-bar on the 2 example tablets. Signed-off-by: Hans de Goede Reviewed-by: Rob Herring Signed-off-by: Dmitry Torokhov commit cef6f55a9fb4f6d6f9df0f772aa64cf159997466 Author: Mike Snitzer Date: Thu Oct 11 17:44:04 2018 -0400 dm table: require that request-based DM be layered on blk-mq devices Now that request-based DM (multipath) is blk-mq only: this restriction is required while the legacy request-based IO path still exists. Signed-off-by: Mike Snitzer commit a676973e4501991e2ede959ee69c6553caa29038 Author: Stephen Boyd Date: Mon Sep 24 16:52:35 2018 -0700 i2c: i2c-qcom-geni: Simplify irq handler We don't need to use goto here, we can just collapse the if statement and goto chain into multiple branches and then combine some duplicate completion calls into one big if statement. Let's do it to clean up code some more. Signed-off-by: Stephen Boyd Reviewed-by: Douglas Anderson Reviewed-by: Alok Chauhan Signed-off-by: Wolfram Sang commit ef8d1639f2b71c683277cc2b27354541792f6ecf Author: Stephen Boyd Date: Mon Sep 24 16:52:34 2018 -0700 i2c: i2c-qcom-geni: Simplify tx/rx functions We never really look at the 'ret' local variable in these functions, so let's remove it to make way for shorter and simpler code. Furthermore, we can shorten some lines by adding two local variables for the SE and the message length so that everything fits in 80 columns and testing the 'dma_buf' local variable in lieu of the 'mode' local variable. And kernel style is to leave the return statement by itself, detached from the rest of the function. Signed-off-by: Stephen Boyd Reviewed-by: Douglas Anderson Reviewed-by: Alok Chauhan Signed-off-by: Wolfram Sang commit 90fb814b6c025da45f71db1703cffe3fe87f575c Merge: b30f2f65568f 0238df646e62 Author: Wolfram Sang Date: Thu Oct 11 23:07:30 2018 +0200 Merge tag 'v4.19-rc7' into i2c/for-4.20 This is the 4.19-rc7 release commit b30f2f65568f840e5ca522d98ba2ad73b8f59cde Author: Hans de Goede Date: Sat Oct 6 10:25:39 2018 +0200 i2c: designware: Set IRQF_NO_SUSPEND flag for all BYT and CHT controllers On some Cherry Trail systems the GPU ACPI fwnode has power-resources which point to the PMIC, which is connected over a LPSS I2C controller. The GPU is a PCI device and PCI devices are powered-on at the resume_noirq resume phase. Since the GPU power-resources need the I2C controller, recent acpi_lpss.c changes now also power-up the LPSS I2C controllers on BYT and CHT devices in the resume_noirq resume phase. But during this phase the IRQ of the controller is disabled leading to these errors: i2c_designware 808622C1:06: controller timed out ACPI Error: AE_ERROR, Returned by Handler for [UserDefinedRegion] ACPI Error: Method parse/execution failed \_SB.P18W._ON, AE_ERROR video LNXVIDEO:00: Failed to change power state to D0 This commit makes the i2c-designware controller set the IRQF_NO_SUSPEND flag when requesting the interrupt on BYT and CHT devices, so that the IRQ is left enabled during the noirq phase, fixing this. Tested-by: Jarkko Nikula Acked-by: Jarkko Nikula Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Reviewed-by: Mika Westerberg Signed-off-by: Wolfram Sang commit ce9d58d3eafcb2d452a69bdcc1c5f8b8ff640de5 Author: Kai-Heng Feng Date: Thu Oct 11 15:56:33 2018 +0800 HID: usbhid: Add quirk for Redragon/Dragonrise Seymur 2 Redragon Seymur 2 stops working since commit 190d7f02ce8e ("HID: input: do not increment usages when a duplicate is found"). Use quirk HID_QUIRK_INCREMENT_USAGE_ON_DUPLICATE suggested by the commit can solve the issue. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=200995 BugLink: https://bugs.launchpad.net/bugs/1793846 Signed-off-by: Kai-Heng Feng Reviewed-by: Benjamin Tissoires Signed-off-by: Jiri Kosina commit 8dbac65f5c181e4723586ab738b703bb23bc3f2a Author: Baolin Wang Date: Thu Oct 11 12:07:15 2018 +0800 leds: sc27xx: Add pattern_set/clear interfaces for LED controller This patch implements the 'pattern_set'and 'pattern_clear' interfaces to support SC27XX LED breathing mode. Signed-off-by: Baolin Wang Acked-by: Pavel Machek Signed-off-by: Jacek Anaszewski commit 5fd752b6b3a2233972ce1726df8bdb40886113a9 Author: Baolin Wang Date: Thu Oct 11 12:07:14 2018 +0800 leds: core: Introduce LED pattern trigger This patch adds a new LED trigger that LED device can configure to employ software or hardware pattern engine. Consumers can write 'pattern' file to enable the software pattern which alters the brightness for the specified duration with one software timer. Moreover consumers can write 'hw_pattern' file to enable the hardware pattern for some LED controllers which can autonomously control brightness over time, according to some preprogrammed hardware patterns. Signed-off-by: Raphael Teysseyre Signed-off-by: Baolin Wang Signed-off-by: Jacek Anaszewski commit d81cc4a8e47219fbe60d49446f04ed3e9c1657d9 Author: Rob Herring Date: Tue May 15 08:58:29 2018 -0500 dt-bindings: arm: zte: Move sysctrl bindings to their own doc In preparation to convert board-level bindings to json-schema, move various misc SoC bindings out to their own file. Cc: Mark Rutland Cc: Jun Nie Cc: Baoyou Xie Cc: devicetree@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Acked-by: Shawn Guo Signed-off-by: Rob Herring commit 157b4129ded8ba756ef17c058192e734889673e4 Author: Rob Herring Date: Tue May 15 08:49:52 2018 -0500 dt-bindings: arm: fsl: Move DCFG and SCFG bindings to their own docs In preparation to convert board-level bindings to json-schema, move various misc SoC bindings out to their own file. Acked-by: Shawn Guo Cc: Mark Rutland Cc: devicetree@vger.kernel.org Signed-off-by: Rob Herring commit 79fbf76dc334813d72b92c8b97d081f2df63d81e Author: Rob Herring Date: Tue May 15 08:44:35 2018 -0500 dt-bindings: arm: atmel: Move various sys registers out of SoC binding doc In preparation to convert board-level bindings to json-schema, move various misc SoC bindings out to their own file. Cc: Mark Rutland Cc: Nicolas Ferre Cc: Alexandre Belloni Cc: devicetree@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Rob Herring commit 4c243716e77d4f54e37834757ee5067e56099219 Author: Bjorn Helgaas Date: Thu Oct 11 11:51:36 2018 -0500 PCI/IOV: Remove unnecessary include of iov.c uses nothing declared in , so remove the include of it. No functional change intended. Signed-off-by: Bjorn Helgaas commit 96de25060d192523fa3c75110dc6348df47fa078 Author: Jakub Kicinski Date: Thu Oct 11 08:57:42 2018 -0700 nfp: replace long license headers with SPDX Replace the repeated license text with SDPX identifiers. While at it bump the Copyright dates for files we touched this year. Signed-off-by: Edwin Peer Signed-off-by: Jakub Kicinski Signed-off-by: Nic Viljoen Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 8cc1da96d1c92aad27b7dfd689b3cdcc6a2bcc18 Author: Ben Dooks Date: Thu Oct 11 14:03:32 2018 +0100 net: cdc_ncm: use tasklet_init() for tasklet_struct init The tasklet initialisation would be better done by tasklet_init() instead of assuming all the fields are in an ok state by default. This does not fix any actual know bug. Signed-off-by: Ben Dooks Signed-off-by: David S. Miller commit 54da60beab7fe0a5d2ed075a8cd93494ea950c13 Author: Mamta Shukla Date: Thu Oct 11 23:16:26 2018 +0530 staging: rtl8723bs: os_dep: Remove space after cast Remove space after cast to fix checkpatch issue. CHECK: No space is necessary after a cast Signed-off-by: Mamta Shukla ACKed-by: Larry Finger Signed-off-by: Greg Kroah-Hartman commit e2b13595ae86476ff6774570a755b5ecd3989ec3 Author: Mamta Shukla Date: Thu Oct 11 23:14:42 2018 +0530 staging: rtl8723bs: os_dep: Remove true and false comparison Remove comparison to true and false in if statement. Issue found with checkpatch.pl CHECK: Using comparison to true is error prone CHECK: Using comparison to false is error prone Signed-off-by: Mamta Shukla ACKed-by: Larry Finger Signed-off-by: Greg Kroah-Hartman commit 2088cfd882d0403609bdf426e9b24372fe1b8337 Author: Michal Simek Date: Mon Oct 8 14:17:19 2018 +0200 serial: uartps: Do not allow use aliases >= MAX_UART_INSTANCES Aliases >= MAX_UART_INSTANCES is no problem to find out and use but in error path is necessary skip clearing bits in bitmap to ensure that only bits in allocated bitmap are handled and nothing beyond that. Without this patch when for example serial90 alias is used then in error patch bit 90 is clear in 32bit wide bitmap. Fixes: ae1cca3fa347 ("serial: uartps: Change uart ID port allocation") Signed-off-by: Michal Simek Signed-off-by: Greg Kroah-Hartman commit 33a1a7be198657c8ca26ad406c4d2a89b7162bcc Author: Miles Chen Date: Mon Oct 8 10:39:17 2018 +0800 tty: check name length in tty_find_polling_driver() The issue is found by a fuzzing test. If tty_find_polling_driver() recevies an incorrect input such as ',,' or '0b', the len becomes 0 and strncmp() always return 0. In this case, a null p->ops->poll_init() is called and it causes a kernel panic. Fix this by checking name length against zero in tty_find_polling_driver(). $echo ,, > /sys/module/kgdboc/parameters/kgdboc [ 20.804451] WARNING: CPU: 1 PID: 104 at drivers/tty/serial/serial_core.c:457 uart_get_baud_rate+0xe8/0x190 [ 20.804917] Modules linked in: [ 20.805317] CPU: 1 PID: 104 Comm: sh Not tainted 4.19.0-rc7ajb #8 [ 20.805469] Hardware name: linux,dummy-virt (DT) [ 20.805732] pstate: 20000005 (nzCv daif -PAN -UAO) [ 20.805895] pc : uart_get_baud_rate+0xe8/0x190 [ 20.806042] lr : uart_get_baud_rate+0xc0/0x190 [ 20.806476] sp : ffffffc06acff940 [ 20.806676] x29: ffffffc06acff940 x28: 0000000000002580 [ 20.806977] x27: 0000000000009600 x26: 0000000000009600 [ 20.807231] x25: ffffffc06acffad0 x24: 00000000ffffeff0 [ 20.807576] x23: 0000000000000001 x22: 0000000000000000 [ 20.807807] x21: 0000000000000001 x20: 0000000000000000 [ 20.808049] x19: ffffffc06acffac8 x18: 0000000000000000 [ 20.808277] x17: 0000000000000000 x16: 0000000000000000 [ 20.808520] x15: ffffffffffffffff x14: ffffffff00000000 [ 20.808757] x13: ffffffffffffffff x12: 0000000000000001 [ 20.809011] x11: 0101010101010101 x10: ffffff880d59ff5f [ 20.809292] x9 : ffffff880d59ff5e x8 : ffffffc06acffaf3 [ 20.809549] x7 : 0000000000000000 x6 : ffffff880d59ff5f [ 20.809803] x5 : 0000000080008001 x4 : 0000000000000003 [ 20.810056] x3 : ffffff900853e6b4 x2 : dfffff9000000000 [ 20.810693] x1 : ffffffc06acffad0 x0 : 0000000000000cb0 [ 20.811005] Call trace: [ 20.811214] uart_get_baud_rate+0xe8/0x190 [ 20.811479] serial8250_do_set_termios+0xe0/0x6f4 [ 20.811719] serial8250_set_termios+0x48/0x54 [ 20.811928] uart_set_options+0x138/0x1bc [ 20.812129] uart_poll_init+0x114/0x16c [ 20.812330] tty_find_polling_driver+0x158/0x200 [ 20.812545] configure_kgdboc+0xbc/0x1bc [ 20.812745] param_set_kgdboc_var+0xb8/0x150 [ 20.812960] param_attr_store+0xbc/0x150 [ 20.813160] module_attr_store+0x40/0x58 [ 20.813364] sysfs_kf_write+0x8c/0xa8 [ 20.813563] kernfs_fop_write+0x154/0x290 [ 20.813764] vfs_write+0xf0/0x278 [ 20.813951] __arm64_sys_write+0x84/0xf4 [ 20.814400] el0_svc_common+0xf4/0x1dc [ 20.814616] el0_svc_handler+0x98/0xbc [ 20.814804] el0_svc+0x8/0xc [ 20.822005] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000 [ 20.826913] Mem abort info: [ 20.827103] ESR = 0x84000006 [ 20.827352] Exception class = IABT (current EL), IL = 16 bits [ 20.827655] SET = 0, FnV = 0 [ 20.827855] EA = 0, S1PTW = 0 [ 20.828135] user pgtable: 4k pages, 39-bit VAs, pgdp = (____ptrval____) [ 20.828484] [0000000000000000] pgd=00000000aadee003, pud=00000000aadee003, pmd=0000000000000000 [ 20.829195] Internal error: Oops: 84000006 [#1] SMP [ 20.829564] Modules linked in: [ 20.829890] CPU: 1 PID: 104 Comm: sh Tainted: G W 4.19.0-rc7ajb #8 [ 20.830545] Hardware name: linux,dummy-virt (DT) [ 20.830829] pstate: 60000085 (nZCv daIf -PAN -UAO) [ 20.831174] pc : (null) [ 20.831457] lr : serial8250_do_set_termios+0x358/0x6f4 [ 20.831727] sp : ffffffc06acff9b0 [ 20.831936] x29: ffffffc06acff9b0 x28: ffffff9008d7c000 [ 20.832267] x27: ffffff900969e16f x26: 0000000000000000 [ 20.832589] x25: ffffff900969dfb0 x24: 0000000000000000 [ 20.832906] x23: ffffffc06acffad0 x22: ffffff900969e160 [ 20.833232] x21: 0000000000000000 x20: ffffffc06acffac8 [ 20.833559] x19: ffffff900969df90 x18: 0000000000000000 [ 20.833878] x17: 0000000000000000 x16: 0000000000000000 [ 20.834491] x15: ffffffffffffffff x14: ffffffff00000000 [ 20.834821] x13: ffffffffffffffff x12: 0000000000000001 [ 20.835143] x11: 0101010101010101 x10: ffffff880d59ff5f [ 20.835467] x9 : ffffff880d59ff5e x8 : ffffffc06acffaf3 [ 20.835790] x7 : 0000000000000000 x6 : ffffff880d59ff5f [ 20.836111] x5 : c06419717c314100 x4 : 0000000000000007 [ 20.836419] x3 : 0000000000000000 x2 : 0000000000000000 [ 20.836732] x1 : 0000000000000001 x0 : ffffff900969df90 [ 20.837100] Process sh (pid: 104, stack limit = 0x(____ptrval____)) [ 20.837396] Call trace: [ 20.837566] (null) [ 20.837816] serial8250_set_termios+0x48/0x54 [ 20.838089] uart_set_options+0x138/0x1bc [ 20.838570] uart_poll_init+0x114/0x16c [ 20.838834] tty_find_polling_driver+0x158/0x200 [ 20.839119] configure_kgdboc+0xbc/0x1bc [ 20.839380] param_set_kgdboc_var+0xb8/0x150 [ 20.839658] param_attr_store+0xbc/0x150 [ 20.839920] module_attr_store+0x40/0x58 [ 20.840183] sysfs_kf_write+0x8c/0xa8 [ 20.840183] sysfs_kf_write+0x8c/0xa8 [ 20.840440] kernfs_fop_write+0x154/0x290 [ 20.840702] vfs_write+0xf0/0x278 [ 20.840942] __arm64_sys_write+0x84/0xf4 [ 20.841209] el0_svc_common+0xf4/0x1dc [ 20.841471] el0_svc_handler+0x98/0xbc [ 20.841713] el0_svc+0x8/0xc [ 20.842057] Code: bad PC value [ 20.842764] ---[ end trace a8835d7de79aaadf ]--- [ 20.843134] Kernel panic - not syncing: Fatal exception [ 20.843515] SMP: stopping secondary CPUs [ 20.844289] Kernel Offset: disabled [ 20.844634] CPU features: 0x0,21806002 [ 20.844857] Memory Limit: none [ 20.845172] ---[ end Kernel panic - not syncing: Fatal exception ]--- Signed-off-by: Miles Chen Signed-off-by: Greg Kroah-Hartman commit 05156e0a1261c056e58c8c6e53442f324af8293b Author: Hiromitsu Yamasaki Date: Wed Oct 3 13:12:19 2018 +0200 serial: sh-sci: Add r8a77990 support This patch adds the R-Car E3 serial documentation. Signed-off-by: Hiromitsu Yamasaki Signed-off-by: Wolfram Sang Reviewed-by: Geert Uytterhoeven Reviewed-by: Simon Horman Signed-off-by: Greg Kroah-Hartman commit b97b3d9fb57860a60592859e332de7759fd54c2e Author: Greg KH Date: Thu Oct 4 11:06:14 2018 -0700 tty: wipe buffer if not echoing data If we are not echoing the data to userspace or the console is in icanon mode, then perhaps it is a "secret" so we should wipe it once we are done with it. This mirrors the logic that the audit code has. Reported-by: aszlig Tested-by: Milan Broz Tested-by: Daniel Zatovic Tested-by: aszlig Cc: Willy Tarreau Signed-off-by: Greg Kroah-Hartman commit c9a8e5fce009e3c601a43c49ea9dbcb25d1ffac5 Author: Linus Torvalds Date: Thu Oct 4 11:06:13 2018 -0700 tty: wipe buffer. After we are done with the tty buffer, zero it out. Reported-by: aszlig Tested-by: Milan Broz Tested-by: Daniel Zatovic Tested-by: aszlig Cc: Willy Tarreau Signed-off-by: Greg Kroah-Hartman commit a2fa8a19b75b5a649db2a6bec892ff5e03a23e76 Author: Maciej S. Szmigiero Date: Wed Oct 10 23:16:50 2018 +0200 cfq: clear queue pointers from cfqg after unpinning them in cfq_pd_offline BFQ is already doing a similar thing in its .pd_offline_fn() method implementation. While it seems that after commit 4c6994806f70 ("blk-throttle: fix race between blkcg_bio_issue_check() and cgroup_rmdir()") was reverted leaving these pointers intact no longer causes crashes clearing them is still a sensible thing to do to make the code more robust. Signed-off-by: Maciej S. Szmigiero Signed-off-by: Jens Axboe commit 9dffa76c21268f6188b04b966089b5110a7447ef Author: Paolo Abeni Date: Thu Oct 11 11:17:37 2018 +0200 selftests: use posix-style redirection in ip_defrag.sh The ip_defrag.sh script requires bash-style output redirection but use the default shell. This may cause random failures if the default shell is not bash. Address the above using posix compliant output redirection. Fixes: 02c7f38b7ace ("selftests/net: add ip_defrag selftest") Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller commit e70a57fa59bb7fefe063780a49e063d0d0f61863 Author: Arnd Bergmann Date: Thu Oct 11 10:57:57 2018 +0200 cxgb4: fix thermal configuration dependencies With CONFIG_THERMAL=m, we get a build error: drivers/net/ethernet/chelsio/cxgb4/cxgb4_thermal.c: In function 'cxgb4_thermal_get_trip_type': drivers/net/ethernet/chelsio/cxgb4/cxgb4_thermal.c:48:11: error: 'struct adapter' has no member named 'ch_thermal' Once that is fixed by using IS_ENABLED() checks, we get a link error against the thermal subsystem when cxgb4 is built-in: drivers/net/ethernet/chelsio/cxgb4/cxgb4_thermal.o: In function `cxgb4_thermal_init': cxgb4_thermal.c:(.text+0x180): undefined reference to `thermal_zone_device_register' drivers/net/ethernet/chelsio/cxgb4/cxgb4_thermal.o: In function `cxgb4_thermal_remove': cxgb4_thermal.c:(.text+0x1e0): undefined reference to `thermal_zone_device_unregister' Finally, since CONFIG_THERMAL can be =m, the Makefile fails to pick up the extra file into built-in.a, and we get another link failure against the cxgb4_thermal_init/cxgb4_thermal_remove files, so the Makefile has to be adapted as well to work for both CONFIG_THERMAL=y and =m. Fixes: b18719157762 ("cxgb4: Add thermal zone support") Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller commit 1f41dc5e8756f444a66cc47a7d3a58ae78b5c0cd Merge: 7b68b8361452 be26667cb394 Author: David S. Miller Date: Thu Oct 11 10:13:52 2018 -0700 Merge branch 'ena-next' Arthur Kiyanovski says: ==================== Improving performance and reducing latencies, by using latest capabilities exposed in ENA device This patchset introduces the following: 1. A new placement policy of Tx headers and descriptors, which takes advantage of an option to place headers + descriptors in device memory space. This is sometimes referred to as LLQ - low latency queue. The patch set defines the admin capability, maps the device memory as write-combined, and adds a mode in transmit datapath to do header + descriptor placement on the device. 2. Support for RX checksum offloading 3. Miscelaneous small improvements and code cleanups Note: V1 of this patchset was created as if patches e2a322a 248ab77 from net were applied to net-next before applying the patchset. This V2 version does not assume this, and should be applyed directly on net-next without the aformentioned patches. ==================== Signed-off-by: David S. Miller commit be26667cb3947c90322467f1d15ad86b02350e00 Author: Arthur Kiyanovski Date: Thu Oct 11 11:26:27 2018 +0300 net: ena: fix indentations in ena_defs for better readability Signed-off-by: Arthur Kiyanovski Signed-off-by: David S. Miller commit 3a7b9d8ddd200bdafaa3ef75b8544d2403eaa03b Author: Arthur Kiyanovski Date: Thu Oct 11 11:26:26 2018 +0300 net: ena: update driver version to 2.0.1 Signed-off-by: Arthur Kiyanovski Signed-off-by: David S. Miller commit f1e90f6e2c1fb0e491f910540314015324fed1e2 Author: Arthur Kiyanovski Date: Thu Oct 11 11:26:25 2018 +0300 net: ena: remove redundant parameter in ena_com_admin_init() Remove redundant spinlock acquire parameter from ena_com_admin_init() Signed-off-by: Arthur Kiyanovski Signed-off-by: David S. Miller commit 87731f0c681c9682c5521e5197d89e561b7da395 Author: Arthur Kiyanovski Date: Thu Oct 11 11:26:24 2018 +0300 net: ena: change rx copybreak default to reduce kernel memory pressure Improves socket memory utilization when receiving packets larger than 128 bytes (the previous rx copybreak) and smaller than 256 bytes. Signed-off-by: Arthur Kiyanovski Signed-off-by: David S. Miller commit 0574bb806dad29a3dada0ee42b01645477d48282 Author: Arthur Kiyanovski Date: Thu Oct 11 11:26:23 2018 +0300 net: ena: limit refill Rx threshold to 256 to avoid latency issues Currently Rx refill is done when the number of required descriptors is above 1/8 queue size. With a default of 1024 entries per queue the threshold is 128 descriptors. There is intention to increase the queue size to 8196 entries. In this case threshold of 1024 descriptors is too large and can hurt latency. Add another limitation to Rx threshold to be at most 256 descriptors. Signed-off-by: Arthur Kiyanovski Signed-off-by: David S. Miller commit bd791175a6432d24fc5d7b348304276027372545 Author: Arthur Kiyanovski Date: Thu Oct 11 11:26:22 2018 +0300 net: ena: explicit casting and initialization, and clearer error handling Signed-off-by: Arthur Kiyanovski Signed-off-by: David S. Miller commit cb36bb36e1f17d2a7b9a9751e5cfec4235b46c93 Author: Arthur Kiyanovski Date: Thu Oct 11 11:26:21 2018 +0300 net: ena: use CSUM_CHECKED device indication to report skb's checksum status Set skb->ip_summed to the correct value as reported by the device. Add counter for the case where rx csum offload is enabled but device didn't check it. Signed-off-by: Arthur Kiyanovski Signed-off-by: David S. Miller commit 38005ca816a7ef5516dc8e59ae95716739aa75b0 Author: Arthur Kiyanovski Date: Thu Oct 11 11:26:20 2018 +0300 net: ena: add functions for handling Low Latency Queues in ena_netdev This patch includes all code changes necessary in ena_netdev to enable packet sending via the LLQ placemnt mode. Signed-off-by: Arthur Kiyanovski Signed-off-by: David S. Miller commit 689b2bdaaa1480ad2c14bdc4c6eaf38284549022 Author: Arthur Kiyanovski Date: Thu Oct 11 11:26:19 2018 +0300 net: ena: add functions for handling Low Latency Queues in ena_com This patch introduces APIs for detection, initialization, configuration and actual usage of low latency queues(LLQ). It extends transmit API with creation of LLQ descriptors in device memory (which include host buffers descriptors as well as packet header) Signed-off-by: Arthur Kiyanovski Signed-off-by: David S. Miller commit a7982b8ec947052df6d4467b3a81571f02f528e0 Author: Arthur Kiyanovski Date: Thu Oct 11 11:26:18 2018 +0300 net: ena: introduce Low Latency Queues data structures according to ENA spec Low Latency Queues(LLQ) allow usage of device's memory for descriptors and headers. Such queues decrease processing time since data is already located on the device when driver rings the doorbell. Signed-off-by: Arthur Kiyanovski Signed-off-by: David S. Miller commit 095f2f1facba0c78f23750dba65c78cef722c1ea Author: Arthur Kiyanovski Date: Thu Oct 11 11:26:17 2018 +0300 net: ena: complete host info to match latest ENA spec Add new fields and definitions to host info and fill them according to the latest ENA spec version. Signed-off-by: Arthur Kiyanovski Signed-off-by: David S. Miller commit 0e575f8542d1f4d74df30b5a9ba419c5373d01a1 Author: Arthur Kiyanovski Date: Thu Oct 11 11:26:16 2018 +0300 net: ena: minor performance improvement Reduce fastpath overhead by making ena_com_tx_comp_req_id_get() inline. Also move it to ena_eth_com.h file with its dependency function ena_com_cq_inc_head(). Signed-off-by: Arthur Kiyanovski Signed-off-by: David S. Miller commit 7b68b8361452e710f383bef408174309c773e953 Merge: df92062e495a b02597d513a9 Author: David S. Miller Date: Thu Oct 11 10:08:24 2018 -0700 Merge branch 'mlxsw-Preparations-for-VxLAN-support' Ido Schimmel says: ==================== mlxsw: Preparations for VxLAN support This patchset prepares mlxsw for VxLAN support. It contains small and mostly non-functional changes. The first eight patches perform small changes in the code to make it more receptive towards the actual VxLAN changes in the next patchset. Patches 9-17 add the registers used to configure the device for VxLAN offload. Last two patches add the required resources and trap IDs. The next patchset is available here [1]. 1. https://github.com/idosch/linux/tree/vxlan ==================== Signed-off-by: David S. Miller commit b02597d513a9df5a3e661a74f40ff26e4057ec9c Author: Ido Schimmel Date: Thu Oct 11 07:48:11 2018 +0000 mlxsw: spectrum: Add NVE packet traps The DECAP_ECN0 trap will be used to trap packets where the overlay packet is marked with Non-ECT, but the underlay packet is marked with either ECT(0), ECT(1) or CE. When trapped, such packets will be counted as errors by the VxLAN driver and thus provide better visibility. The NVE_ENCAP_ARP trap will be used to trap ARP packets undergoing NVE encapsulation. This is needed in order to support E-VPN ARP suppression, where the Linux bridge does not flood ARP packets through tunnel ports in case it can answer the ARP request itself. Note that all the packets trapped via these traps are marked with 'offload_fwd_mark', so as to not be re-flooded by the Linux bridge through the ASIC ports. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit 2bd414aef6a833bed610aa7f76d6f610178c13f4 Author: Ido Schimmel Date: Thu Oct 11 07:48:09 2018 +0000 mlxsw: resources: Add NVE resources Add the following resources to be used by the NVE code: * Number of IPv4 underlay destination IPs in a single TNUMT record * Number of IPv6 underlay destination IPs in a single TNUMT record Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit 27f68c0850aa4565b3f126441fdc0fb3f1f2f8db Author: Ido Schimmel Date: Thu Oct 11 07:48:08 2018 +0000 mlxsw: reg: Add Monitoring Parsing State Register This register is used for setting up the parsing for hash, policy-engine and routing. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit 0933781f11e71350e60ba4466fab5cae6fab4293 Author: Ido Schimmel Date: Thu Oct 11 07:48:07 2018 +0000 mlxsw: reg: Add definition of unicast tunnel record for SFD register Will be used to program the device with FDB records pointing to a NVE tunnel. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit 8efcf6bb48e52c7ee679e7f441d52dfc5dd3dc16 Author: Ido Schimmel Date: Thu Oct 11 07:48:06 2018 +0000 mlxsw: reg: Add Tunneling NVE QoS Default Register The TNQDR register configures the default QoS settings for NVE encapsulation. It will be used to set the default DSCP of each port to 0, so that when DSCP is set to inherit and the overlay packet does not have an IP header the outer DSCP will be set to 0, in accordance with the software data path. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit fd6db27cacd29a9d11616f76456e574c8e3a6db3 Author: Ido Schimmel Date: Thu Oct 11 07:48:04 2018 +0000 mlxsw: reg: Add Tunneling NVE QoS Configuration Register The register configures how QoS is set in Encapsulation into the underlay network. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit a77d5f0bde4e95eb9c95bf416fa03d996b16ed67 Author: Ido Schimmel Date: Thu Oct 11 07:48:03 2018 +0000 mlxsw: reg: Add Tunneling NVE Decapsulation ECN Mapping Register This register configures the actions that are done during NVE decapsulation based on the ECN bits. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit 4a8d1860ed5d7ad6ecd8e5a4c0d6f076e8275521 Author: Ido Schimmel Date: Thu Oct 11 07:48:02 2018 +0000 mlxsw: reg: Add Tunneling NVE Encapsulation ECN Mapping Register This register performs mapping from overlay ECN to underlay ECN during NVE encapsulation. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit c723d19fadb138710a17833bd725a053246242b5 Author: Ido Schimmel Date: Thu Oct 11 07:48:01 2018 +0000 mlxsw: reg: Add Tunneling NVE Underlay Multicast Table Register This register builds the linked list of underlay destination IPs used for BUM traffic on the overlay. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit 50e6eb2a634e6c03bed4128fe1ab5044f8561b1d Author: Ido Schimmel Date: Thu Oct 11 07:48:00 2018 +0000 mlxsw: reg: Add Tunnel Port Configuration Register This register enables / disables learning on different types of tunnel ports (e.g., NVE, VPLS). Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit 710dd1a0ec3f1afac393c4f85d164ffe0e6132e2 Author: Ido Schimmel Date: Thu Oct 11 07:47:59 2018 +0000 mlxsw: reg: Add Tunneling NVE General Configuration Register This register configures global NVE configuration such as source IP of the NVE tunnel and UDP source port calculation. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit beda7f72c36ab4f156e14d785a4bc50ddc2df657 Author: Ido Schimmel Date: Thu Oct 11 07:47:57 2018 +0000 mlxsw: spectrum: Seed LAG hash function Currently, the seed of the LAG hash function is always set to 0, which means it is identical across all switches. Instead, use a random number. This is especially important now that VxLAN is supported, as the LAG hash function is used to calculate the UDP source port of the encapsulated packet. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit a682a3024fe1d21653876fe2f0b231d011f6a72d Author: Ido Schimmel Date: Thu Oct 11 07:47:56 2018 +0000 mlxsw: reg: Extend FDB flush types for NVE The device has the ability to flush all the FDB records that perform NVE encapsulation or only a subset of these with a specific filtering identifier (FID). Expose these types so that they could be used by subsequent patches where we need to flush the FDB records when an NVE device is unlinked from a bridge (FID). Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit 90ea0bb551155dccb93158637edea4db5feffabd Author: Ido Schimmel Date: Thu Oct 11 07:47:55 2018 +0000 mlxsw: spectrum: Add a new type of KVD linear record When the device needs to flood an overlay packet to remote VTEPs it retrieves a pointer to the head of a linked-list of records that store the IP addresses of these VTEPs. These records are stored in the KVD linear memory and configured via the Tunneling NVE Underlay Multicast Table (TNUMT) register. Add a new KVD linear entry type for these records, so that we will be able to allocate and free them. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit 12066d612b22001829fa378ca127956ee72e13c1 Author: Ido Schimmel Date: Thu Oct 11 07:47:54 2018 +0000 mlxsw: spectrum: Move L3 protocol and address definitions to global header file The L3 protocol and address definitions are going to be used by the NVE code, so move them to the global header file from the one private to the router. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit 9c73b1d120aadf26a3bbf34841ddac73b29c0326 Author: Ido Schimmel Date: Thu Oct 11 07:47:53 2018 +0000 mlxsw: spectrum_switchdev: Do not assume notifier information type VxLAN notifications are going to use a different notifier information type, so cast to the correct type based on the received event. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit 5050f6ae253ad1307af3486c26fc4f94287078b7 Author: Ido Schimmel Date: Thu Oct 11 07:47:52 2018 +0000 mlxsw: spectrum_switchdev: Check notification relevance based on upper device VxLAN FDB updates are sent with the VxLAN device which is not our upper and will therefore be ignored by current code. Solve this by checking whether the upper device (bridge) is our upper. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit ab74c3a1274c5ec0711de23b232c35c0f1ac8ba5 Author: Ido Schimmel Date: Thu Oct 11 07:47:50 2018 +0000 mlxsw: spectrum_switchdev: Prepare for VxLAN FDB notifications VxLAN FDB notifications need to be handled differently than bridge FDB notifications, so initialize the work item based on the received notification and rename the invoked function accordingly. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit bf341eb895411f36582a905d4a646b387a0d1fc3 Author: Ido Schimmel Date: Thu Oct 11 07:47:49 2018 +0000 mlxsw: spectrum: Remove misuses of private header file The spectrum_router.h header file is private to the router block and should only be included by direct consumers of it, such as dpipe and the multicast routing code. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit df92062e495a0ffcebe8c14af5309aa5a145bc8a Author: YueHaibing Date: Thu Oct 11 07:37:07 2018 +0000 octeontx2-af: Remove set but not used variable 'dev' Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/ethernet/marvell/octeontx2/af/cgx.c: In function 'cgx_fwi_event_handler': drivers/net/ethernet/marvell/octeontx2/af/cgx.c:257:17: warning: variable 'dev' set but not used [-Wunused-but-set-variable] It never be used since introduction in commit 1463f382f58d ("octeontx2-af: Add support for CGX link management") Signed-off-by: YueHaibing Signed-off-by: David S. Miller commit 4822e902f9bdffaea2817471365e000966f0d1a1 Author: Konstantin Khlebnikov Date: Thu Oct 11 10:07:06 2018 +0300 block: describe difference between flags IO_STAT and STATS This adds reasonable comments, but they definitely needs better names. Signed-off-by: Konstantin Khlebnikov Signed-off-by: Jens Axboe commit 60f8e67d980a5c4d3520378141f4d422f5f7231b Author: Antoine Tenart Date: Thu Oct 11 09:12:24 2018 +0200 net: mscc: allow extracting the FCS into the skb This patch adds support for the NETIF_F_RXFCS feature in the Mscc Ethernet driver. This feature is disabled by default and allow a user to request the driver not to drop the FCS and to extract it into the skb for debugging purposes. Signed-off-by: Antoine Tenart Reviewed-by: Alexandre Belloni Signed-off-by: David S. Miller commit 975bb8b4dc93364bb47fcdb58812fa6cb0accc81 Author: KarimAllah Ahmed Date: Thu Oct 11 11:49:58 2018 -0500 PCI/IOV: Use VF0 cached config space size for other VFs Cache the config space size from VF0 and use it for all other VFs instead of reading it from the config space of each VF. We assume that it will be the same across all associated VFs. This is an optimization when enabling SR-IOV on a device with many VFs. Signed-off-by: KarimAllah Ahmed [bhelgaas: use CONFIG_PCI_IOV (not CONFIG_PCI_ATS)] Signed-off-by: Bjorn Helgaas commit fb513f60ea58f096be7006f899e2181762af37cb Author: Wesley Yung Date: Wed Oct 10 22:42:55 2018 +0800 NTB: switchtec_ntb: Update switchtec documentation with prerequisites for NTB The ntb_hw_switchtec driver has requirements on kernel configuration so add these notes to the documentation and also clean up a few other sentences in the documentation. Signed-off-by: Wesley Yung Signed-off-by: Kelvin Cao Signed-off-by: Wesley Sheng Signed-off-by: Bjorn Helgaas Reviewed-by: Logan Gunthorpe commit 742bbe1ee35b5699c092541f97c7cec326556bb1 Author: Logan Gunthorpe Date: Fri Oct 5 09:49:40 2018 -0600 PCI: Fix Switchtec DMA aliasing quirk dmesg noise Currently the Switchtec quirk runs on all endpoints in the switch, including all the upstream and downstream ports. These other functions do not contain BARs, so the quirk fails when trying to map the BAR and prints the error "Cannot iomap Switchtec device". The user will see a few of these useless and scary errors, one for each port in the switch. At most, the quirk should only run on either a management endpoint (PCI_CLASS_MEMORY_OTHER) or an NTB endpoint (PCI_CLASS_BRIDGE_OTHER). However, the quirk is useless except in NTB applications, so we will only run it when the class is PCI_CLASS_BRIDGE_OTHER. Switch to using DECLARE_PCI_FIXUP_CLASS_FINAL and only match PCI_CLASS_BRIDGE_OTHER. Reported-by: Stephen Bates Fixes: ad281ecf1c7d ("PCI: Add DMA alias quirk for Microsemi Switchtec NTB") Signed-off-by: Logan Gunthorpe [bhelgaas: split SWITCHTEC_QUIRK() introduction to separate patch] Signed-off-by: Bjorn Helgaas Cc: Doug Meyer Cc: Kurt Schwemmer commit 01d5d7fa8376c6b5acda86e16fcad22de6bba486 Author: Logan Gunthorpe Date: Wed Oct 10 15:55:05 2018 -0500 PCI: Add macro for Switchtec quirk declarations Add SWITCHTEC_QUIRK() to reduce redundancy in declaring devices that use quirk_switchtec_ntb_dma_alias(). By itself, this is no functional change, but a subsequent patch updates SWITCHTEC_QUIRK() to fix ad281ecf1c7d ("PCI: Add DMA alias quirk for Microsemi Switchtec NTB"). Fixes: ad281ecf1c7d ("PCI: Add DMA alias quirk for Microsemi Switchtec NTB") Signed-off-by: Logan Gunthorpe [bhelgaas: split to separate patch] Signed-off-by: Bjorn Helgaas commit d0c9606b31a21028fb5b753c8ad79626292accfd Author: Bin Meng Date: Wed Sep 26 08:14:01 2018 -0700 PCI: Add Device IDs for Intel GPU "spurious interrupt" quirk Add Device IDs to the Intel GPU "spurious interrupt" quirk table. For these devices, unplugging the VGA cable and plugging it in again causes spurious interrupts from the IGD. Linux eventually disables the interrupt, but of course that disables any other devices sharing the interrupt. The theory is that this is a VGA BIOS defect: it should have disabled the IGD interrupt but failed to do so. See f67fd55fa96f ("PCI: Add quirk for still enabled interrupts on Intel Sandy Bridge GPUs") and 7c82126a94e6 ("PCI: Add new ID for Intel GPU "spurious interrupt" quirk") for some history. [bhelgaas: See link below for discussion about how to fix this more generically instead of adding device IDs for every new Intel GPU. I hope this is the last patch to add device IDs.] Link: https://lore.kernel.org/linux-pci/1537974841-29928-1-git-send-email-bmeng.cn@gmail.com Signed-off-by: Bin Meng [bhelgaas: changelog] Signed-off-by: Bjorn Helgaas Cc: stable@vger.kernel.org # v3.4+ commit 9be766274db4c446e54bc0c2f0c1fbcbb4a2bd1e Author: Stephen Boyd Date: Thu Oct 11 09:28:13 2018 -0700 clk: Clean up suspend/resume coding style The normal style is to use 'core' for struct clk_core pointers and to directly access the core pointer from the clk_hw pointer when we're within the common clk framework. Update the patches to make it a bit easier to handle. Signed-off-by: Stephen Boyd commit 104c7405a64d937254b6a154938e6151f91c9e0d Author: Gerd Hoffmann Date: Fri Sep 21 10:30:13 2018 +0200 vfio: add edid support to mbochs sample driver Signed-off-by: Gerd Hoffmann Signed-off-by: Alex Williamson commit 3cdf752506b29ace75b6e1318abac06073d600e4 Author: Gerd Hoffmann Date: Fri Sep 21 10:30:12 2018 +0200 vfio: add edid api for display (vgpu) devices. This allows to set EDID monitor information for the vgpu display, for a more flexible display configuration, using a special vfio region. Check the comment describing struct vfio_region_gfx_edid for more details. Signed-off-by: Gerd Hoffmann Signed-off-by: Alex Williamson commit 3f2aa244ee1a0d17ed5b6c86564d2c1b24d1c96b Author: Maciej W. Rozycki Date: Wed Oct 3 13:21:07 2018 +0100 TC: Set DMA masks for devices Fix a TURBOchannel support regression with commit 205e1b7f51e4 ("dma-mapping: warn when there is no coherent_dma_mask") that caused coherent DMA allocations to produce a warning such as: defxx: v1.11 2014/07/01 Lawrence V. Stefani and others tc1: DEFTA at MMIO addr = 0x1e900000, IRQ = 20, Hardware addr = 08-00-2b-a3-a3-29 ------------[ cut here ]------------ WARNING: CPU: 0 PID: 1 at ./include/linux/dma-mapping.h:516 dfx_dev_register+0x670/0x678 Modules linked in: CPU: 0 PID: 1 Comm: swapper Not tainted 4.19.0-rc6 #2 Stack : ffffffff8009ffc0 fffffffffffffec0 0000000000000000 ffffffff80647650 0000000000000000 0000000000000000 ffffffff806f5f80 ffffffffffffffff 0000000000000000 0000000000000000 0000000000000001 ffffffff8065d4e8 98000000031b6300 ffffffff80563478 ffffffff805685b0 ffffffffffffffff 0000000000000000 ffffffff805d6720 0000000000000204 ffffffff80388df8 0000000000000000 0000000000000009 ffffffff8053efd0 ffffffff806657d0 0000000000000000 ffffffff803177f8 0000000000000000 ffffffff806d0000 9800000003078000 980000000307b9e0 000000001e900000 ffffffff80067940 0000000000000000 ffffffff805d6720 0000000000000204 ffffffff80388df8 ffffffff805176c0 ffffffff8004dc78 0000000000000000 ffffffff80067940 ... Call Trace: [] show_stack+0xa0/0x130 [] __warn+0x128/0x170 ---[ end trace b1d1e094f67f3bb2 ]--- This is because the TURBOchannel bus driver fails to set the coherent DMA mask for devices enumerated. Set the regular and coherent DMA masks for TURBOchannel devices then, observing that the bus protocol supports a 34-bit (16GiB) DMA address space, by interpreting the value presented in the address cycle across the 32 `ad' lines as a 32-bit word rather than byte address[1]. The architectural size of the TURBOchannel DMA address space exceeds the maximum amount of RAM any actual TURBOchannel system in existence may have, hence both masks are the same. This removes the warning shown above. References: [1] "TURBOchannel Hardware Specification", EK-369AA-OD-007B, Digital Equipment Corporation, January 1993, Section "DMA", pp. 1-15 -- 1-17 Signed-off-by: Maciej W. Rozycki Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/20835/ Fixes: 205e1b7f51e4 ("dma-mapping: warn when there is no coherent_dma_mask") Cc: stable@vger.kernel.org # 4.16+ Cc: Ralf Baechle commit 34bccd61b139dbb452421aebf480e7af5f7a12ed Author: Mimi Zohar Date: Thu Oct 11 09:23:02 2018 -0400 MAINTAINERS: add Jarkko as maintainer for trusted keys Trusted keys are variable length random numbers generated by the TPM, which are used as symmetric keys. The trusted key is never exported to userspace in the clear. Adding Jarrko, the TPM maintainer. Signed-off-by: Mimi Zohar commit 953923c09fe83255ae11845db1c9eb576ba73df8 Author: Mike Snitzer Date: Thu Oct 11 11:06:29 2018 -0400 dm: rename DM_TYPE_MQ_REQUEST_BASED to DM_TYPE_REQUEST_BASED Now that request-based DM is only using blk-mq, there is no need to differentiate between legacy "rq" and new "mq". We're back to a single request-based DM -- and there was much rejoicing! Signed-off-by: Mike Snitzer commit 6a23e05c2fe3c64ec012fd81e51e3ab51e4f2f9f Author: Jens Axboe Date: Wed Oct 10 20:49:26 2018 -0600 dm: remove legacy request-based IO path dm supports both, and since we're killing off the legacy path in general, get rid of it in dm. Signed-off-by: Jens Axboe Signed-off-by: Mike Snitzer commit 0bb95f80a38f82884693194ea720e9cca5e12ada Author: Kees Cook Date: Mon Jun 25 15:59:34 2018 -0700 Makefile: Globally enable VLA warning Now that Variable Length Arrays (VLAs) have been entirely removed[1] from the kernel, enable the VLA warning globally. The only exceptions to this are the KASan an UBSan tests which are explicitly checking that VLAs trigger their respective tests. [1] https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qPXydAacU1RqZWA@mail.gmail.com Cc: Masahiro Yamada Cc: Andrew Morton Cc: David Airlie Cc: linux-kbuild@vger.kernel.org Cc: intel-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Kees Cook commit 81b45683487a51b0f4d3b29d37f20d6d078544e4 Author: Masahiro Yamada Date: Sun Aug 26 03:16:29 2018 +0900 compiler.h: give up __compiletime_assert_fallback() __compiletime_assert_fallback() is supposed to stop building earlier by using the negative-array-size method in case the compiler does not support "error" attribute, but has never worked like that. You can simply try: BUILD_BUG_ON(1); GCC immediately terminates the build, but Clang does not report anything because Clang does not support the "error" attribute now. It will later fail at link time, but __compiletime_assert_fallback() is not working at least. The root cause is commit 1d6a0d19c855 ("bug.h: prevent double evaluation of `condition' in BUILD_BUG_ON"). Prior to that commit, BUILD_BUG_ON() was checked by the negative-array-size method *and* the link-time trick. Since that commit, the negative-array-size is not effective because '__cond' is no longer constant. As the comment in says, GCC (and Clang as well) only emits the error for obvious cases. When '__cond' is a variable, ((void)sizeof(char[1 - 2 * __cond])) ... is not obvious for the compiler to know the array size is negative. Reverting that commit would break BUILD_BUG() because negative-size-array is evaluated before the code is optimized out. Let's give up __compiletime_assert_fallback(). This commit does not change the current behavior since it just rips off the useless code. Signed-off-by: Masahiro Yamada Reviewed-by: Kees Cook Reviewed-by: Nick Desaulniers Signed-off-by: Kees Cook commit 5eaf436e0e5b7ce05ef9371e82f87319bc9a5173 Author: Mikhail Zaslonko Date: Wed Oct 10 13:44:45 2018 +0200 s390/vmalloc: fix VMALLOC_START calculation With the introduction of the module area on top of the vmalloc area, the calculation of VMALLOC_START in setup_memory_end() function hasn't been adjusted. As a result we got vmalloc area 2 Gb (MODULES_LEN) smaller than it should be and the preceding vmemmap area got extra memory instead. The patch fixes this calculation error although there were no visible negative effects. Apart from that, change 'tmp' variable to 'vmemmap' in memory_end calculation for better readability. Reviewed-by: Heiko Carstens Signed-off-by: Mikhail Zaslonko Signed-off-by: Martin Schwidefsky commit a23f5dc8448694a0ffe2127a04aa5787b9cf9e5f Author: Ryan Lee Date: Wed Oct 10 23:26:17 2018 +0000 ASoC: max98373: Sort DHT Rot Pnt Volume in reverse order Signed-off-by: Ryan Lee Signed-off-by: Mark Brown commit d34c8f37c75b739efc26383145a43497143ada88 Author: Ryan Lee Date: Wed Oct 10 23:26:13 2018 +0000 ASoC: max98373: Sort max98373_bde_gain_tlv in reverse order Signed-off-by: Ryan Lee Signed-off-by: Mark Brown commit 6c3beeca424a0c8d6c79184a880a8954bd498d57 Author: Ryan Lee Date: Wed Oct 10 23:26:10 2018 +0000 ASoC: max98373: Sort BDE Limiter Thresh Volume in reverse order Signed-off-by: Ryan Lee Signed-off-by: Mark Brown commit 4cbbc91609846c09a8350080cd7e6f7764fb2ec1 Author: Ryan Lee Date: Wed Oct 10 23:26:06 2018 +0000 ASoC: max98373: Sort Digital Volume in reverse order Signed-off-by: Ryan Lee Signed-off-by: Mark Brown commit 44221ebae2da9daad053e383240d8aeacacaa43e Author: Lubomir Rintel Date: Wed Oct 10 19:09:26 2018 +0200 spi/spi-pxa2xx: add PXA2xx SSP SPI Controller This is the SPI controller found on Marvel MMP2 and perhaps more platforms. Reviewed-by: Rob Herring Signed-off-by: Lubomir Rintel Signed-off-by: Mark Brown commit 87ae1d2d70772d661162de03e56c8d1cc5f12650 Author: Lubomir Rintel Date: Wed Oct 10 19:09:29 2018 +0200 spi: pxa2xx: Add devicetree support The MMP2 platform, that uses device tree, has this controller. Let's add devicetree alongside platform & PCI. Signed-off-by: Lubomir Rintel Signed-off-by: Mark Brown commit 55ef8262f2b1b31762b045b14182db3cc8f607d1 Author: Lubomir Rintel Date: Wed Oct 10 19:09:28 2018 +0200 spi: pxa2xx: Use an enum for type That seems to be the correct type. Signed-off-by: Lubomir Rintel Signed-off-by: Mark Brown commit 561de45f72bd5f9b3f166bdd6151d4d0fe9e6534 Author: Girish Mahadevan Date: Wed Oct 3 19:14:25 2018 +0530 spi: spi-geni-qcom: Add SPI driver support for GENI based QUP This driver supports GENI based SPI Controller in the Qualcomm SOCs. The Qualcomm Generic Interface (GENI) is a programmable module supporting a wide range of serial interfaces including SPI. This driver supports SPI operations using FIFO mode of transfer. Signed-off-by: Girish Mahadevan Signed-off-by: Dilip Kota Signed-off-by: Alok Chauhan Reviewed-by: Douglas Anderson Tested-by: Douglas Anderson Reviewed-by: Stephen Boyd Signed-off-by: Mark Brown commit 4b8ce2f707778f436b8f976cecfdcd984d9d546e Author: Dilip Kota Date: Wed Oct 3 19:14:24 2018 +0530 spi: soc: qcom: GENI SE SPI controller device tree binding Move GENI SE SPI controller device-tree bindings from devicetree/bindings/soc/qcom/qcom,geni-se.txt to devicetree/bindings/spi/qcom,spi-geni-qcom.txt. Signed-off-by: Dilip Kota Reviewed-by: Douglas Anderson Reviewed-by: Stephen Boyd Reviewed-by: Rob Herring Signed-off-by: Alok Chauhan Signed-off-by: Mark Brown commit f4f9554f16d0a14b8ced9b3b91bd4e545fca5d66 Author: Vladimir Zapolskiy Date: Thu Oct 11 15:31:16 2018 +0300 MAINTAINERS: Assign myself as a maintainer of ARM/LPC18XX architecture To all appearance Joachim Eastwood abandoned the maintenance of NXP LPC18xx/LPC43xx archtecture about two years ago, and for me it would be possible to continue the support, fortunately the quality of platform drivers written by Joachim is exceptionally high. The change is based on https://lkml.org/lkml/2018/9/24/1398 discussion. At the same time two redundant explicit driver file paths are dropped from the list, clk-lpc18xx* drivers are covered by "lpc18xx" search pattern and timer-lpc32xx driver is covered by "lpc32xx" pattern and it goes into ARM/LPC32XX entry, which is also under my wing, in other words LPC18xx/LPC43xx clocksource and CCF drivers will remain maintained. Signed-off-by: Vladimir Zapolskiy Cc: Joachim Eastwood Acked-by: Daniel Lezcano Signed-off-by: Arnd Bergmann commit a8a398b833f33a1efb8352fcd9f03a354fb387d9 Author: Dilip Kota Date: Wed Oct 3 19:14:23 2018 +0530 dt-bindings: soc: qcom: Remove SPI controller maximum frequency binding SPI controller driver should maintain the maximum frequency of the controller instead of relying on device tree bindings. Because maximum frequency is specific property of SPI controller. Signed-off-by: Dilip Kota Reviewed-by: Douglas Anderson Reviewed-by: Stephen Boyd Reviewed-by: Rob Herring Signed-off-by: Alok Chauhan Signed-off-by: Mark Brown commit a3c174021ce780f5d2e9b2105e2cb4903a37226d Author: Emil Renner Berthing Date: Wed Oct 10 11:00:38 2018 +0200 spi: rockchip: simplify spi enable logic Let the dma/non-dma code paths handle the spi enable flag themselves. This removes some logic to determine if the flag should be turned on before or after dma and also don't leave the spi enabled if the dma path fails. Signed-off-by: Emil Renner Berthing Signed-off-by: Mark Brown commit d9071b7e9fc474e474e3b865428a8d30d88daaf4 Author: Emil Renner Berthing Date: Wed Oct 10 11:00:37 2018 +0200 spi: rockchip: directly use direction constants The dma direction for the tx and rx dma channels never change, so just use the constants directly rather than storing them in device data. Signed-off-by: Emil Renner Berthing Signed-off-by: Mark Brown commit f340b920511a666b02d371e88801d3817ea7a880 Author: Emil Renner Berthing Date: Wed Oct 10 11:00:36 2018 +0200 spi: rockchip: mark use_dma as bool The driver data has a u32 field use_dma which is only ever used as a boolean, so change its type to reflect that. Signed-off-by: Emil Renner Berthing Signed-off-by: Mark Brown commit 058f7c509e84abd36f988d4e16432366bd793d8f Author: Emil Renner Berthing Date: Wed Oct 10 11:00:35 2018 +0200 spi: rockchip: remove unneeded dma_caps We no longer need the dma_caps since the dma driver already clamps the burst length to the hardware limit, so don't request and store dma_caps in device data. Signed-off-by: Emil Renner Berthing Signed-off-by: Mark Brown commit dcfc861d24ec19f0d0d3d55bb016646794571fbb Author: Huibin Hong Date: Wed Oct 10 11:00:33 2018 +0200 spi: rockchip: adjust dma watermark and burstlen Signal tx dma when spi fifo is less than half full, and limit tx bursts to half the fifo length. Clamp rx burst length to 1 to avoid alignment issues. Signed-off-by: Huibin Hong Signed-off-by: Emil Renner Berthing Signed-off-by: Mark Brown commit dd8fd2cbc73f8650f651da71fc61a6e4f30c1566 Author: Huibin Hong Date: Wed Oct 10 11:00:32 2018 +0200 spi: rockchip: initialize dma_slave_config properly The rxconf and txconf structs are allocated on the stack, so make sure we zero them before filling out the relevant fields. Signed-off-by: Huibin Hong Signed-off-by: Emil Renner Berthing Signed-off-by: Mark Brown commit 04000dc6f7e3ce24677f2895ea41746ed29a4498 Author: Girish Mahadevan Date: Tue Oct 2 14:47:08 2018 -0700 spi: Introduce new driver for Qualcomm QuadSPI controller New driver for Qualcomm QuadSPI(QSPI) controller that is used to communicate with slaves such as flash memory devices. The QSPI controller can operate in 2 or 4 wire mode but only supports SPI Mode 0. The controller can also operate in Single or Dual data rate modes. Signed-off-by: Girish Mahadevan Signed-off-by: Ryan Case Reviewed-by: Douglas Anderson Reviewed-by: Stephen Boyd Signed-off-by: Mark Brown commit db117f5f424829d54db32b1eddbb54b881a4f2e5 Author: Girish Mahadevan Date: Tue Oct 2 14:47:07 2018 -0700 spi: Qualcomm Quad SPI(QSPI) documentation Bindings for Qualcomm Quad SPI used on SoCs such as sdm845. Signed-off-by: Girish Mahadevan Signed-off-by: Ryan Case Reviewed-by: Douglas Anderson Reviewed-by: Rob Herring Reviewed-by: Stephen Boyd Signed-off-by: Mark Brown commit f2d704794864a4bb486f2a0eaed40f25dd87303f Author: Talel Shenhar Date: Thu Oct 11 14:20:07 2018 +0300 dw: spi: add support for Amazon's Alpine spi controller Add support for a new devicetree compatible string called 'amazon,alpine-apb-ssi', which is necessary for the Amazon Alpine spi controller. 'amazon,alpine-dw-apb-ssi' is used in the dw spi driver if specified in the devicetree. Otherwise, fall back to driver default behavior, i.e. original dw IP hw driver behavior. Signed-off-by: Talel Shenhar Signed-off-by: David Woodhouse Signed-off-by: Mark Brown commit d49a30366793210cd64759edcdf7099a2e32efd6 Author: Talel Shenhar Date: Thu Oct 11 14:20:06 2018 +0300 spi: dw: add compatible for Amazon's Alpine spi controller This compatible adds the ability for dw spi controller driver to work with the dw spi controller found on Alpine chips. The dw spi controller has an auto-deselect of Chip-Select, in case there is no data inside the Tx FIFO. While working on platforms with Alpine chips, auto-deselect mode causes an issue for some spi devices that can't handle the Chip-Select deselect in the middle of a transaction. It is a normal behavior for a Tx FIFO to be empty in the middle of a transaction, due to busy cpu. In the Alpine chip family an option to change the default behavior was added to the original dw spi controller to prevent this issue of de-asserting Chip-Select once TX FIFO is empty. The change was to allow SW manual control of the Chip-Select. With this change, as long as the Slave Enable Register is asserted, the Chip-Select will be asserted. As a result, it is necessary to deselect the Slave Select Register once the transaction is done. This feature is enabled via a new device compatible string called 'amazon,alpine-dw-apb-ssi'. Once the driver identifies the new compatible string, it enables the hw fixup logic, by writing to a dedicated register found in the IP reserved area and will start manual deselecting the Slave Select Register when the transfer ends. Signed-off-by: Talel Shenhar Signed-off-by: David Woodhouse Signed-off-by: Mark Brown commit be59a3282cf8e0c9c82e8835ffca98dfd2cd98e1 Merge: ce57b60f38c8 2a44d6511a01 Author: Arnd Bergmann Date: Thu Oct 11 16:06:23 2018 +0200 Merge tag 'socfpga_updates_for_v4.20_part3' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux into next/dt SoCFPGA DTS updates for v4.20, part 3 - Add ethernet aliases for Stratix10 - Move ethernet aliases from socfpga dtsi - Correct system manager register size for Stratix10 - Correct SDRAM node address for Arria10 * tag 'socfpga_updates_for_v4.20_part3' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux: ARM: dts: socfgpa: remove ethernet aliases from dtsi arm64: dts: stratix10: add ethernet aliases arm64: dts: stratix10: Correct System Manager register size ARM: dts: socfpga: Fix SDRAM node address for Arria10 Signed-off-by: Arnd Bergmann commit ce57b60f38c82f2b0fb3eeea12245b504d781723 Merge: b483792c9ea8 2352ae130697 Author: Arnd Bergmann Date: Thu Oct 11 16:05:22 2018 +0200 Merge tag 'samsung-dt64-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into next/dt Samsung DTS ARM64 changes for v4.20 1. Use graph between USB-PHY and MUIC. 2. Cleanup of SD card detect pin level. * tag 'samsung-dt64-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: arm64: ARM: dts: exynos: Remove double SD card detect pin inversion on TM2 arm64: dts: exynos: Add OF graph between USB-PHY and MUIC Signed-off-by: Arnd Bergmann commit b483792c9ea8d8bf898261d148e1dd5590bf3ae4 Merge: 7e6a361d17b2 48ab742ce3b0 Author: Arnd Bergmann Date: Thu Oct 11 16:03:38 2018 +0200 Merge tag 'samsung-dt-4.20-3' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into next/dt Samsung DTS ARM changes for v4.20, second round Add proper configuration for Odroid XU SD write-protect pin. * tag 'samsung-dt-4.20-3' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: ARM: dts: exynos: Add pin configuration for SD write protect on Odroid XU Signed-off-by: Arnd Bergmann commit 93043b674910ea7f7e03f7e801a478efcd931865 Merge: 605b3bec73cb 969fc78c37c3 Author: Mark Brown Date: Thu Oct 11 15:01:24 2018 +0100 Merge tag 'qcom-geni-immutable-for-mark-brown' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux into spi-4.20 Immutable branch for QCOM Geni patches commit efb543e61cc3a2e75ffbe52f9b4cfcb850d812fd Author: Jouni Malinen Date: Thu Oct 11 00:21:21 2018 +0300 mac80211: Extend SAE authentication in infra BSS STA mode Previous implementation of SAE authentication in infrastructure BSS was somewhat restricting and not exactly clean way of handling the two auth() operations. This ended up removing and re-adding the STA entry for the AP in the middle of authentication and also messing up authentication state tracking through the sequence of four Authentication frames. Furthermore, this did not work if the AP ended up sending out SAE Confirm (auth trans #2) immediately after SAE Commit (auth trans #1) before the station had time to transmit its SAE Confirm. Clean up authentication state handling for the SAE case to allow two rounds of auth() calls without dropping all state between those operations. Track peer Confirmed status and mark authentication completed only once both ends have confirmed. ieee80211_mgd_auth() check for EBUSY cases is now handling only the pending association (ifmgd->assoc_data) while all pending authentication (ifmgd->auth_data) cases are allowed to proceed to allow user space to start a new connection attempt from scratch even if the previously requested authentication is still waiting completion. This is needed to avoid making SAE error cases with retries take excessive amount of time with no means for the user space to stop that (apart from setting the netdev down). As an extra bonus, the end of ieee80211_rx_mgmt_auth() can be cleaned up to avoid the extra copy of the cfg80211_rx_mlme_mgmt() call for ongoing SAE authentication since the new ieee80211_mark_sta_auth() helper function can handle both completion of authentication and updates to the STA entry under the same condition and there is no need to return from the function between those operations. Signed-off-by: Jouni Malinen Signed-off-by: Johannes Berg commit 8d7432a2f53bc283148062955cbe7ffbf713e646 Author: Jouni Malinen Date: Thu Oct 11 00:21:20 2018 +0300 mac80211: Move ieee80211_mgd_auth() EBUSY check to be before allocation This makes it easier to conditionally replace full allocation of auth_data to use reallocation for the case of continuing SAE authentication. Furthermore, there was not really any point in having this check done so late in the function after having already completed number of steps that cannot be used anyway in the error case. Signed-off-by: Jouni Malinen Signed-off-by: Johannes Berg commit fc107a93307165d5bf966767e4456832ef3940ef Author: Jouni Malinen Date: Thu Oct 11 00:21:19 2018 +0300 mac80211: Helper function for marking STA authenticated Authentication exchange can be completed in both TX and RX paths for SAE, so move this common functionality into a helper function to avoid having to implement practically the same operations in two places when extending SAE implementation in the following commits. Signed-off-by: Jouni Malinen Signed-off-by: Johannes Berg commit 506dbf90c1ba98d998b26e17a2e3e69bffef52f4 Author: Felix Fietkau Date: Sat Oct 6 19:35:07 2018 +0200 mac80211: rc80211_minstrel: remove variance / stddev calculation When there are few packets (e.g. for sampling attempts), the exponentially weighted variance is usually vastly overestimated, making the resulting data essentially useless. As far as I know, there has not been any practical use for this, so let's not waste any cycles on it. Signed-off-by: Felix Fietkau Signed-off-by: Johannes Berg commit f4ec7cb0f9ea65a7622b001bb48dbac1a7e6ad1e Author: Felix Fietkau Date: Sat Oct 6 19:35:06 2018 +0200 mac80211: minstrel: do not sample rates 3 times slower than max_prob_rate These rates are highly unlikely to be used quickly, even if the link deteriorates rapidly. This improves throughput in cases where CCK rates are not reliable enough to be skipped entirely during sampling. Sampling these rates regularly can cost a lot of airtime. Signed-off-by: Felix Fietkau Signed-off-by: Johannes Berg commit 972b66b86f85f4e8201db454f4c3e9d990cf9836 Author: Felix Fietkau Date: Sat Oct 6 19:35:05 2018 +0200 mac80211: minstrel: fix sampling/reporting of CCK rates in HT mode Long/short preamble selection cannot be sampled separately, since it depends on the BSS state. Because of that, sampling attempts to currently not used preamble modes are not counted in the statistics, which leads to CCK rates being sampled too often. Fix statistics accounting for long/short preamble by increasing the index where necessary. Fix excessive CCK rate sampling by dropping unsupported sample attempts. This improves throughput on 2.4 GHz channels Signed-off-by: Felix Fietkau Signed-off-by: Johannes Berg commit 80df9be67c44cb636bbc92caeddad8caf334c53c Author: Felix Fietkau Date: Sat Oct 6 19:35:04 2018 +0200 mac80211: minstrel: fix CCK rate group streams value Fixes a harmless underflow issue when CCK rates are actively being used Signed-off-by: Felix Fietkau Signed-off-by: Johannes Berg commit 37439f2d6e43ae79e22be9be159f0af157468f82 Author: Felix Fietkau Date: Sat Oct 6 19:35:03 2018 +0200 mac80211: minstrel: fix using short preamble CCK rates on HT clients mi->supported[MINSTREL_CCK_GROUP] needs to be updated short preamble rates need to be marked as supported regardless of whether it's currently enabled. Its state can change at any time without a rate_update call. Fixes: 782dda00ab8e ("mac80211: minstrel_ht: move short preamble check out of get_rate") Signed-off-by: Felix Fietkau Signed-off-by: Johannes Berg commit 202df504d7dea489ce74a913d4b529531bdff312 Author: Felix Fietkau Date: Sat Oct 6 19:35:02 2018 +0200 mac80211: minstrel: reduce minstrel_mcs_groups size By storing a shift value for all duration values of a group, we can reduce precision by a neglegible amount to make it fit into a u16 value. This improves cache footprint and reduces size: Before: text data bss dec hex filename 10024 116 0 10140 279c rc80211_minstrel_ht.o After: text data bss dec hex filename 9368 116 0 9484 250c rc80211_minstrel_ht.o Signed-off-by: Felix Fietkau Signed-off-by: Johannes Berg commit b1c4f68337fa6b7c09154bb2bf2ec6f0d30ab652 Author: Felix Fietkau Date: Sat Oct 6 19:35:01 2018 +0200 mac80211: minstrel: merge with minstrel_ht, always enable VHT support Legacy-only devices are not very common and the overhead of the extra code for HT and VHT rates is not big enough to justify all those extra lines of code to make it optional. Signed-off-by: Felix Fietkau Signed-off-by: Johannes Berg commit 5b5e87314efb558f2ff4b027b4d1ba386893e908 Author: Felix Fietkau Date: Sat Oct 6 19:35:00 2018 +0200 mac80211: minstrel: remove unnecessary debugfs cleanup code debugfs entries are cleaned up by debugfs_remove_recursive already. Signed-off-by: Felix Fietkau Signed-off-by: Johannes Berg commit f458e832ba510f843807fc2c2906a8fb59554c9f Author: Chaitanya T K Date: Sat Oct 6 19:34:59 2018 +0200 mac80211: minstrel: Enable STBC and LDPC for VHT Rates If peer support reception of STBC and LDPC, enable them for better performance. Signed-off-by: Chaitanya TK Signed-off-by: Felix Fietkau Signed-off-by: Johannes Berg commit 42dca5ef24fc846ff133796980e21e5788ddfb70 Author: Johannes Berg Date: Tue Oct 9 10:00:21 2018 +0200 mac80211: avoid reflecting frames back to the client I'm not really sure exactly _why_ I've been carrying a note for what's probably _years_ to check that we don't do this, but we clearly do reflect frames back to the station itself if it sends such. One way or the other, it's useless since the station doesn't really need the AP to talk to itself, so suppress it. While at it, clarify some of the logic by removing skb->data references in favour of the destination address (pointer) we already have separately. Signed-off-by: Johannes Berg commit 3d7af878357acd9e37fc156928106f1a969c8942 Author: Johannes Berg Date: Tue Oct 2 10:00:08 2018 +0200 nl80211: use netlink policy validation function for elements Instead of open-coding a lot of calls to is_valid_ie_attr(), add this validation directly to the policy, now that we can. Signed-off-by: Johannes Berg commit ab0d76f6823cc3a4e277c888abd344e3b977e279 Author: Johannes Berg Date: Tue Oct 2 10:00:07 2018 +0200 nl80211: use policy range validation where applicable Many range checks can be done in the policy, move them there. A few in mesh are added in the code (taken out of the macros) because they don't fit into the s16 range in the policy validation. Signed-off-by: Johannes Berg commit 940ec770c295682993d1cccce3081fd7c74fece8 Author: Rafał Miłecki Date: Thu Oct 11 09:42:17 2018 +0200 spi: bcm-qspi: switch back to reading flash using smaller chunks Fixing/optimizing bcm_qspi_bspi_read() performance introduced two changes: 1) It added a loop to read all requested data using multiple BSPI ops. 2) It bumped max size of a single BSPI block request from 256 to 512 B. The later change resulted in occasional BSPI timeouts causing a regression. For some unknown reason hardware doesn't always handle reads as expected when using 512 B chunks. In such cases it may happen that BSPI returns amount of requested bytes without the last 1-3 ones. It provides the remaining bytes later but doesn't raise an interrupt until another LR start. Switching back to 256 B reads fixes that problem and regression. Fixes: 345309fa7c0c ("spi: bcm-qspi: Fix bcm_qspi_bspi_read() performance") Signed-off-by: Rafał Miłecki Signed-off-by: Mark Brown Cc: stable@vger.kernel.org commit 0976eda7915507fe94e07870c19d717c9994b57a Author: Rafał Miłecki Date: Thu Oct 11 09:40:22 2018 +0200 spi: bcm-qspi: fix calculation of address length During implementation of the new API bcm_qspi_bspi_set_flex_mode() has been modified breaking calculation of address length. An unnecessary multiplication was added breaking flash reads. Fixes: 5f195ee7d830 ("spi: bcm-qspi: Implement the spi_mem interface") Signed-off-by: Rafał Miłecki Reviewed-by: Boris Brezillon Signed-off-by: Mark Brown Cc: stable@vger.kernel.org commit 6ba3f37f6223ceacf17240c849a5a489fc4adb0b Merge: 5220a73a409d 6862fdf2201a Author: Arnd Bergmann Date: Thu Oct 11 15:27:55 2018 +0200 Merge tag 'samsung-soc-4.20-2' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into next/soc Samsung mach/soc changes for v4.20, second round 1. Disable SAMSUNG_PM_CHECK Kconfig feature incompatible with Exynos. * tag 'samsung-soc-4.20-2' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: ARM: samsung: Limit SAMSUNG_PM_CHECK config option to non-Exynos platforms ARM: s3c24xx: Restore proper usage of pr_info/pr_cont ARM: s3c24xx: Correct SD card write protect detection on Mini2440 ARM: s3c24xx: Consistently use tab for indenting member assignments ARM: s3c24xx: formatting cleanup in mach-mini2440.c ARM: s3c24xx: Remove empty gta02_pmu children probe ARM: exynos: Fix imprecise abort during Exynos5422 suspend to RAM ARM: exynos: Store Exynos5420 register state in one variable Signed-off-by: Arnd Bergmann commit 5220a73a409d9d31b42aa6624d5e901a612ec584 Author: Marek Szyprowski Date: Wed Oct 10 20:25:58 2018 +0200 arm64: exynos: Enable generic power domain support Generic power domains are needed to enable support for Exynos power domains. Signed-off-by: Marek Szyprowski Signed-off-by: Krzysztof Kozlowski Signed-off-by: Arnd Bergmann commit c1a92909dbc2090753ff6224971d9b8ae5f93c97 Merge: e4c080a10a23 00cba11fab58 Author: Arnd Bergmann Date: Thu Oct 11 15:25:42 2018 +0200 Merge tag 'tegra-for-4.20-firmware-2' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into next/drivers firmware: tegra: Changes for v4.20-rc1 This contains a fix for suspend/resume support for the BPMP found on Tegra186 and Tegra194. * tag 'tegra-for-4.20-firmware-2' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: firmware: tegra: bpmp: Implement suspend/resume support Signed-off-by: Arnd Bergmann commit e8c3f6322cc853084a6d63244c15fb0251090327 Merge: d59c774496a2 35d3cbe84544 Author: Arnd Bergmann Date: Thu Oct 11 15:21:40 2018 +0200 Merge tag 'imx-defconfig-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into next/defconfig i.MX defconfig update for 4.20: - A series from Fabio to synchronize i.MX defconfig files with savedefconfig. - Enable CONFIG_TMPFS_POSIX_ACL to fix ACL applying failures seen with starting weston from sddm as unprivileged user. - Enable MC13783/MC13892 ADC driver by default. - Select CONFIG_ARM_CPUIDLE by default to support generic ARM cpuidle driver which is useful for i.MX platforms like i.MX7S/D. - Built in usbnet drivers to support NFS mount via USB Ethernet dongle on SoCs which have no native Ethernet controller, such as i.MX6 SLL and i.MX7 ULP. * tag 'imx-defconfig-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: ARM: imx_v6_v7_defconfig: Select CONFIG_TMPFS_POSIX_ACL ARM: imx_v4_v5_defconfig: Remove unneeded options ARM: imx_v4_v5_defconfig: Re-sync defconfig ARM: mxs_defconfig: Remove unneeded options ARM: mxs_defconfig: Re-sync defconfig ARM: imx_v6_v7_defconfig: Remove unneeded options ARM: imx_v6_v7_defconfig: Re-sync defconfig ARM: imx_v6_v7_defconfig: select CONFIG_ARM_CPUIDLE by default ARM: imx_v6_v7_defconfig: Make usbnet drivers builtin for boot ARM: imx_v6_v7_defconfig: add CONFIG_FW_LOADER_USER_HELPER ARM: imx_v6_v7_defconfig: Select CONFIG_SENSORS_MC13783_ADC Signed-off-by: Arnd Bergmann commit cca8196bdfc2273df057e162bad58085d1c81a01 Author: Heiko Stuebner Date: Sat Jan 27 23:25:32 2018 +0100 clk: rockchip: use the newly added clock-id for hdmi on RK3066 Export the clock for devicetree usage via the newly added id. Signed-off-by: Heiko Stuebner commit 5f697a0e311c1e8e3cf56edaf1b757027f5275b0 Author: Heiko Stuebner Date: Sat Jan 27 23:21:12 2018 +0100 clk: rockchip: add clock-id for HCLK_HDMI on rk3066 RK3066 and RK3188 share most of the clock controller but the rk3066 does have an internal hdmi encoder and associated clock. Therefore add a clock-id so that this clock can be used. Signed-off-by: Heiko Stuebner commit 82f4b67f018c88a7cc9337f0067ed3d6ec352648 Author: Ziyuan Xu Date: Thu Oct 11 15:26:43 2018 +0800 clk: rockchip: fix wrong mmc sample phase shift for rk3328 mmc sample shift is 0 for RK3328 referring to the TRM. So fix them. Fixes: fe3511ad8a1c ("clk: rockchip: add clock controller for rk3328") Cc: stable@vger.kernel.org Signed-off-by: Ziyuan Xu Signed-off-by: Shawn Lin Signed-off-by: Heiko Stuebner commit 11db8173dbab7a94cf5ba5225fcedbfc0f3b7e54 Author: Jason Gerecke Date: Wed Oct 10 13:40:26 2018 -0700 HID: wacom: Work around HID descriptor bug in DTK-2451 and DTH-2452 The DTK-2451 and DTH-2452 have a buggy HID descriptor which incorrectly contains a Cintiq-like report, complete with pen tilt, rotation, twist, serial number, etc. The hardware doesn't actually support this data but our driver duitifully sets up the device as though it does. To ensure userspace has a correct view of devices without updated firmware, we clean up this incorrect data in wacom_setup_device_quirks. We're also careful to clear the WACOM_QUIRK_TOOLSERIAL flag since its presence causes the driver to wait for serial number information (via wacom_wac_pen_serial_enforce) that never comes, resulting in the pen being non-responsive. Signed-off-by: Jason Gerecke Fixes: 8341720642 ("HID: wacom: Queue events with missing type/serial data for later processing") Cc: stable@vger.kernel.org # v4.16+ Signed-off-by: Jiri Kosina commit 3dac3583bf1a61db6aaf31dfd752c677a4400afd Author: zhong jiang Date: Thu Oct 4 13:02:53 2018 +0800 misc: cxl: Fix possible null pointer dereference It is not safe to dereference an object before a null test. It is not needed and just remove them. Ftrace can be used instead. Signed-off-by: zhong jiang Acked-by: Andrew Donnellan Acked-by: Frederic Barrat Signed-off-by: Greg Kroah-Hartman commit e862faa968400206aae3bf8de0d4beb766498657 Author: Colin Ian King Date: Sat Oct 6 22:56:58 2018 +0100 misc: mic: scif: remove redundant check on ret < 0 The check for ret < 0 is redundant as any places prior to this point where ret is set to an error value the code will exit out of the loop to the error exit label 'err'. Remove this redundant dead code. Detected by CoverityScan, CID#1339528 ("Logically dead code") Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman commit a23bbec205b9b9b5f75af1811fe89d0598104b88 Author: Alexander Shishkin Date: Fri Oct 5 15:43:06 2018 +0300 stm class: Use memcat_p() Instead of a local copy, use the memcat_p() helper to merge policy node attributes. Signed-off-by: Alexander Shishkin Tested-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman commit ce76d938dd98817f998c905e01fbb99b072c0bf6 Author: Alexander Shishkin Date: Fri Oct 5 15:43:05 2018 +0300 lib: Add memcat_p(): paste 2 pointer arrays together This adds a helper to paste 2 pointer arrays together, useful for merging various types of attribute arrays. There are a few places in the kernel tree where this is open coded, and I just added one more in the STM class. The naming is inspired by memset_p() and memcat(), and partial credit for it goes to Andy Shevchenko. This patch adds the function wrapped in a type-enforcing macro and a test module. Signed-off-by: Alexander Shishkin Reviewed-by: Andy Shevchenko Tested-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman commit 6c7e4b6882ad080dad623ba2f4c1a4db578313cb Author: Alexander Shishkin Date: Fri Oct 5 15:43:04 2018 +0300 stm class: heartbeat: Fix whitespace Fix whitespace in the code for better readability, no functional changes. Signed-off-by: Alexander Shishkin Tested-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman commit 60e6f6d50f21f0a1a39d221ed62de0542be25f03 Author: Alexander Shishkin Date: Fri Oct 5 15:43:03 2018 +0300 stm class: SPDX-ify the documentation Add the SPDX header to the STM class documentation. Signed-off-by: Alexander Shishkin Tested-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman commit 3ef230370e05a7a9606377cfcd983b0133bc1ac4 Author: Alexander Shishkin Date: Fri Oct 5 15:43:02 2018 +0300 stm class: Update documentation to match the new identification rules The rules and order of identification of trace sources against the "stp-policy" have changed; update the documentation to reflect that. Signed-off-by: Alexander Shishkin Signed-off-by: Greg Kroah-Hartman commit 4cb3653df0cd0214798dc79fc13db026fbc8aa39 Author: Alexander Shishkin Date: Fri Oct 5 15:43:01 2018 +0300 stm class: Document the MIPI SyS-T protocol usage Add a document describing MIPI SyS-T protocol driver usage. Signed-off-by: Alexander Shishkin Tested-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman commit 95323943b791617c892738e8d2762c6661bd4382 Author: Alexander Shishkin Date: Fri Oct 5 15:43:00 2018 +0300 stm class: p_sys-t: Document the configfs interface This adds ABI documentation for the new configfs attributes that come with the MIPI SyS-T protocol driver. Signed-off-by: Alexander Shishkin Tested-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman commit 39f10239df751e4ec5190ef851a3e71c052c2539 Author: Alexander Shishkin Date: Fri Oct 5 15:42:59 2018 +0300 stm class: p_sys-t: Add support for CLOCKSYNC packets This adds support for CLOCKSYNC SyS-T packets, that establish correlation between the transport clock (STP timestamps) and SyS-T timestamps. These packets are sent periodically to allow the decoder to keep both time sources in sync. Signed-off-by: Alexander Shishkin Tested-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman commit d69d5e83110fedd15ff463ed2d5320ab3dec75f1 Author: Alexander Shishkin Date: Fri Oct 5 15:42:58 2018 +0300 stm class: Add MIPI SyS-T protocol support This adds support for MIPI SyS-T protocol as specified in an open standard [1]. In addition to marking message boundaries, it also supports tagging messages with the source UUID, to provide better distinction between trace sources, including payload length and timestamp in the message's metadata. This driver adds attributes to STP policy nodes to control/configure these metadata features. [1] https://www.mipi.org/specifications/sys-t Signed-off-by: Alexander Shishkin Tested-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman commit 24c7bcb6a74914b529859a07fde27a1a55e13ade Author: Alexander Shishkin Date: Fri Oct 5 15:42:57 2018 +0300 stm class: Switch over to the protocol driver Now that the default framing protocol is factored out into its own driver, switch over to using the driver for writing data. To that end, make the policy code require a valid protocol name (or absence thereof, which is equivalent to "p_basic"). Also, to make transition easier, make stm class request "p_basic" module at initialization time. Signed-off-by: Alexander Shishkin Tested-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman commit a02509f301c68c9a7f01d75d7d326f7a9b81a630 Author: Alexander Shishkin Date: Fri Oct 5 15:42:56 2018 +0300 stm class: Factor out default framing protocol The STP framing pattern that the stm class implicitly applies to the data payload is, in fact, a protocol. This patch moves the relevant code out of the stm core into its own driver module. Signed-off-by: Alexander Shishkin Tested-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman commit d279a38020d2483cb75f5f82f5e4ab5f73bc94f2 Author: Alexander Shishkin Date: Fri Oct 5 15:42:55 2018 +0300 stm class: Add a helper for writing data packets Add a helper to write a sequence of bytes as STP data packets. This is used by protocol drivers to output their metadata, as well as the actual data payload. Signed-off-by: Alexander Shishkin Tested-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman commit c7fd62bc69d0224877a49383e606f0fe52cba741 Author: Alexander Shishkin Date: Fri Oct 5 15:42:54 2018 +0300 stm class: Introduce framing protocol drivers At the moment, the stm class applies a certain STP framing pattern to the data as it is written to the underlying STM device. In order to allow different framing patterns (aka protocols), this patch introduces the concept of STP protocol drivers, defines data structures and APIs for the protocol drivers to use. Signed-off-by: Alexander Shishkin Tested-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman commit e967b8bdd462def829b1722ea2f0babdc9806bc2 Author: Alexander Shishkin Date: Fri Oct 5 15:42:53 2018 +0300 stm class: Clean up stp_configfs_init Minor code shortening, no functional changes. Signed-off-by: Alexander Shishkin Tested-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman commit 25e3c0062a089544a861f72287a1fa3ce34b00b7 Author: Alexander Shishkin Date: Fri Oct 5 15:42:52 2018 +0300 stm class: Clarify configfs root type/operations names The current naming of stp-policy root type and group ops is confusing, rename them for better readability. Signed-off-by: Alexander Shishkin Tested-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman commit cb6102bd99efe35f016dc6d7282e681e6dbde154 Author: Alexander Shishkin Date: Fri Oct 5 15:42:51 2018 +0300 stm class: Rework policy node fallback Currently, if no matching policy node can be found for a trace source, we'll try to use "default" policy node, then, if that doesn't exist, we'll pick the first node, in order of creation. If that also fails, we'll allocate M/C range from the beginning of the device's M/C range. This makes it difficult to know which node (if any) was used in any particular case. In order to make things more deterministic, the new order is as follows: * if they supply ID string, use that and nothing else, * if they are a task, use their task name (comm), * use "default", if it exists, * return failure, to let them know there is no suitable rule. This should provide enough convenience with the "default" catch-all node, while not leaving *everything* to chance. As a side effect, this relaxes the requirement of using ioctl() for identification with the possibility of using task names as policy nodes. Signed-off-by: Alexander Shishkin Tested-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman commit b4fc4e8340784e000030c5a59bf0791f9c3ce15e Author: Rasmus Villemoes Date: Fri Oct 5 16:28:24 2018 +0200 staging: greybus: loopback.c: remove unused gb_loopback::lbid It's not obvious how the code prevents adding more than 31 elements to the list and thus invoking undefined behaviour in the 1 << new_lbid expression, and in practice causing ->lbid values to repeat every 32 elements. But the definition of struct gb_loopback is local to loopback.c, and the lbid field is entirely unused outside of this function, so it seems we can just drop it entirely. Signed-off-by: Rasmus Villemoes Reviewed-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman commit aa5a54a06b3e7c39348ac4a17aaeb36af9375353 Author: Ioannis Valasakis Date: Wed Oct 10 15:47:56 2018 +0100 staging: wilc1000: prefer 'help' in KConfig Fix for a style warning using the help without the deprecated help included between dashes. Reported by checkpatch. Signed-off-by: Ioannis Valasakis Signed-off-by: Greg Kroah-Hartman commit 84ac86fbbe00678151f8fe106dbbd684eb4d6f31 Author: Craig Kewley Date: Wed Oct 10 20:17:05 2018 +0000 staging: vboxvideo: make a couple of funcs static Fix Sparse warnings: drivers/staging/vboxvideo/vbox_mode.c:309:6: warning: symbol 'vbox_primary_atomic_disable' was not declared. Should it be static? drivers/staging/vboxvideo/vbox_mode.c:452:6: warning: symbol 'vbox_cursor_atomic_disable' was not declared. Should it be static? Signed-off-by: Craig Kewley Reviewed-by: Hans de Goede Signed-off-by: Greg Kroah-Hartman commit c00e1d09e3053c6af6a7f6d405b5b455f247d5d4 Author: Dan Carpenter Date: Thu Oct 11 10:59:41 2018 +0300 staging: vboxvideo: unlock on error in vbox_cursor_atomic_update() We need to unlock before returning on this error path. Fixes: 35f3288c453e ("staging: vboxvideo: Atomic phase 1: convert cursor to universal plane") Signed-off-by: Dan Carpenter Reviewed-by: Hans de Goede Signed-off-by: Greg Kroah-Hartman commit d701d8117200399d85e63a737d2e4e897932f3b6 Author: Pablo Neira Ayuso Date: Tue Oct 9 20:06:36 2018 +0200 netfilter: nft_compat: do not dump private area Zero pad private area, otherwise we expose private kernel pointer to userspace. This patch also zeroes the tail area after the ->matchsize and ->targetsize that results from XT_ALIGN(). Fixes: 0ca743a55991 ("netfilter: nf_tables: add compatibility layer for x_tables") Reported-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 18c0ab87364ac5128a152055fdcb1d27e01caf01 Author: Taehee Yoo Date: Sun Oct 7 00:09:32 2018 +0900 netfilter: xt_TEE: add missing code to get interface index in checkentry. checkentry(tee_tg_check) should initialize priv->oif from dev if possible. But only netdevice notifier handler can set that. Hence priv->oif is always -1 until notifier handler is called. Fixes: 9e2f6c5d78db ("netfilter: Rework xt_TEE netdevice notifier") Signed-off-by: Taehee Yoo Signed-off-by: Pablo Neira Ayuso commit f24d2d4f9586985509320f90308723d3d0c4e47f Author: Taehee Yoo Date: Sun Oct 7 00:09:18 2018 +0900 netfilter: xt_TEE: fix wrong interface selection TEE netdevice notifier handler checks only interface name. however each netns can have same interface name. hence other netns's interface could be selected. test commands: %ip netns add vm1 %iptables -I INPUT -p icmp -j TEE --gateway 192.168.1.1 --oif enp2s0 %ip link set enp2s0 netns vm1 Above rule is in the root netns. but that rule could get enp2s0 ifindex of vm1 by notifier handler. After this patch, TEE rule is added to the per-netns list. Fixes: 9e2f6c5d78db ("netfilter: Rework xt_TEE netdevice notifier") Signed-off-by: Taehee Yoo Signed-off-by: Pablo Neira Ayuso commit 4a3e71b7b7dbaf3562be9d508260935aa13cb48b Author: Fernando Fernandez Mancera Date: Wed Oct 10 09:56:09 2018 +0200 netfilter: nft_osf: usage from output path is not valid The nft_osf extension, like xt_osf, is not supported from the output path. Fixes: b96af92d6eaf ("netfilter: nf_tables: implement Passive OS fingerprint module in nft_osf") Signed-off-by: Fernando Fernandez Mancera Signed-off-by: Pablo Neira Ayuso commit 3b18d5eba491b2328b31efa4235724a2354af010 Author: Pablo Neira Ayuso Date: Mon Oct 1 13:27:32 2018 +0200 netfilter: nft_set_rbtree: allow loose matching of closing element in interval Allow to find closest matching for the right side of an interval (end flag set on) so we allow lookups in inner ranges, eg. 10-20 in 5-25. Fixes: ba0e4d9917b4 ("netfilter: nf_tables: get set elements via netlink") Reported-by: Phil Sutter Signed-off-by: Pablo Neira Ayuso commit 0c373344b5c1eaa9e186368a32a169a2802be3ca Author: Ingo Molnar Date: Thu Oct 11 10:36:23 2018 +0200 sched/completions/Documentation: Clean up the document some more Refresh the document: - Remove unnecessary liguistic complexity and improve the clarity of the text - Improve the explanations all around - Remove unnecessary and stale version info - Fix whitespace noise - Make pseudo-code match kernel style - Fix minor syntax errors in pseudo-code - Use consistent denotation - Mark multi-CPU sequences more explicitly - Unbreak line breaks - Use quotes to refer to 'struct completion' - Use 'IRQ context' and 'IRQs' consistently - Improve grammar - etc. Cc: John Garry Cc: Linus Torvalds Cc: Nicholas Mc Guire Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: corbet@lwn.net Cc: linux-doc@vger.kernel.org Link: http://lkml.kernel.org/r/1539183392-239389-1-git-send-email-john.garry@huawei.com Signed-off-by: Ingo Molnar commit 7b6abce7e1e69b6d8dc5d40a8cb9ddaeb400427c Author: John Garry Date: Wed Oct 10 22:56:32 2018 +0800 sched/completions/Documentation: Fix a couple of punctuation nits This patch fixes a couple of punctuation nits which can make the document more correct and readable. Also missing "()" are added to some function references for consistency. Signed-off-by: John Garry Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: corbet@lwn.net Cc: linux-doc@vger.kernel.org Link: http://lkml.kernel.org/r/1539183392-239389-1-git-send-email-john.garry@huawei.com Signed-off-by: Ingo Molnar commit ef4ab8447aa2639d7a80a50f23d9f27c5c0db276 Author: Anders Roxell Date: Wed Oct 10 16:27:04 2018 +0200 selftests: bpf: install script with_addr.sh When test_flow_dissector.sh runs it complains that it can't find script with_addr.sh: ./test_flow_dissector.sh: line 81: ./with_addr.sh: No such file or directory Rework so that with_addr.sh gets installed, add it to TEST_PROGS_EXTENDED variable. Fixes: 50b3ed57dee9 ("selftests/bpf: test bpf flow dissection") Signed-off-by: Anders Roxell Acked-by: Song Liu Signed-off-by: Daniel Borkmann commit d3c72d7a20d8ebb0618d06fc49e83a4d74d96205 Author: Anders Roxell Date: Wed Oct 10 11:21:23 2018 +0200 selftests: bpf: add config fragment LWTUNNEL When test_lwt_seg6local.sh was added commit c99a84eac026 ("selftests/bpf: test for seg6local End.BPF action") config fragment wasn't added, and without CONFIG_LWTUNNEL enabled we see this: Error: CONFIG_LWTUNNEL is not enabled in this kernel. selftests: test_lwt_seg6local [FAILED] Signed-off-by: Anders Roxell Acked-by: Song Liu Signed-off-by: Daniel Borkmann commit c85061657e1c45d7063d718c7e21b880e3b1411e Author: Jiri Olsa Date: Mon Oct 8 10:22:59 2018 +0200 bpftool: Allow add linker flags via EXTRA_LDFLAGS variable Adding EXTRA_LDFLAGS allowing user to specify extra flags for LD_FLAGS variable. Also adding LDFLAGS to build command line. Signed-off-by: Jiri Olsa Acked-by: Song Liu Signed-off-by: Daniel Borkmann commit 0ef6bf39f09832866fd581cbafafbad9b2469eb3 Author: Jiri Olsa Date: Mon Oct 8 10:22:58 2018 +0200 bpftool: Allow to add compiler flags via EXTRA_CFLAGS variable Adding EXTRA_CFLAGS allowing user to specify extra flags for CFLAGS variable. Signed-off-by: Jiri Olsa Acked-by: Song Liu Signed-off-by: Daniel Borkmann commit 3d3062214367a8f8e623466d1eb78e82ee9751ef Merge: 5b394b2ddf03 d6e7bbc148f9 Author: Stephen Boyd Date: Thu Oct 11 00:22:55 2018 -0700 Merge tag 'clk-ti-for-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/kristo/linux into clk-ti Pull TI clock driver updates from Tero Kristo: This tag adds changes for the Texas Instruments clock driver. Included changes are: - clkctrl driver changes switching the layout from CM based to clockdomain based. Needed for ongoing hwmod transition towards sysc driver. Changed SoCs for this include am3,am4,am5,dra7. - RTC+DDR sleep mode support code for clock save/restore. The deep sleep states will wipe the clock register space on the SoC, requiring save/ restore support so that the state can be retained over the sleep state. * tag 'clk-ti-for-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/kristo/linux: clk: ti: Add functions to save/restore clk context clk: clk: Add clk_gate_restore_context function clk: Add functions to save/restore clock context en-masse clk: ti: dra7: add new clkctrl data clk: ti: dra7xx: rename existing clkctrl data as compat data clk: ti: am43xx: add new clkctrl data for am43xx clk: ti: am43xx: rename existing clkctrl data as compat data clk: ti: am33xx: add new clkctrl data for am33xx clk: ti: am33xx: rename existing clkctrl data as compat data clk: ti: clkctrl: replace dashes from clkdm name with underscore clk: ti: clkctrl: support multiple clkctrl nodes under a cm node dt-bindings: clock: dra7xx: add clkctrl indices for new data layout dt-bindings: clock: am43xx: add clkctrl indices for new data layout dt-bindings: clock: am33xx: add clkctrl indices for new data layout clk: ti: fix OF child-node lookup commit b7ec45a868af36d0aaffbfed9de4ce53b5eecb22 Merge: 9047fa5d3294 232fc64b6e62 Author: David S. Miller Date: Wed Oct 10 22:59:08 2018 -0700 Merge branch 'hns3-next' Salil Mehta says: ==================== Adds support of RSS to HNS3 Driver for Rev 2(=0x21) H/W This patch-set mainly adds new additions related to RSS for the new hardware Revision 0x21. It also adds support to use RSS hash value provided by the hardware along with descriptor. ==================== Signed-off-by: David S. Miller commit 232fc64b6e629010f5c08fbe005882eb692d557b Author: Peng Li Date: Wed Oct 10 20:05:37 2018 +0100 net: hns3: Add HW RSS hash information to RX skb Drivers should call skb_set_hash to set the hash and its type in an skbuff. Signed-off-by: Peng Li Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit d97b307213014780976ede70dac88776b673b938 Author: Jian Shen Date: Wed Oct 10 20:05:36 2018 +0100 net: hns3: Add RSS tuples support for VF This patch adds RSS tuple support for VF in revision 0x21. Signed-off-by: Jian Shen Signed-off-by: Peng Li Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit 374ad291762a24b7ed3118129aca7fcfe4f1ba9d Author: Jian Shen Date: Wed Oct 10 20:05:35 2018 +0100 net: hns3: Add RSS general configuration support for VF This patch adds RSS key, hash algorithm configuration support for VF in revision 0x21. Signed-off-by: Jian Shen Signed-off-by: Peng Li Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit 775501a1aabab99c5fd0864f42c7a48cdc521db7 Author: Jian Shen Date: Wed Oct 10 20:05:34 2018 +0100 net: hns3: Add new RSS hash algorithm support for PF This patch adds ETH_RSS_HASH_XOR hash algorithm supports, which is supported by hw revision 0x21. Signed-off-by: Jian Shen Signed-off-by: Peng Li Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit 9047fa5d32942acbc017d2c2e2d0af3e6ce833ed Author: Wei Yongjun Date: Wed Oct 10 02:00:24 2018 +0000 phy: phy-ocelot-serdes: fix return value check in serdes_probe() In case of error, the function syscon_node_to_regmap() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Fixes: 51f6b410fc22 ("phy: add driver for Microsemi Ocelot SerDes muxing") Signed-off-by: Wei Yongjun Reviewed-by: Quentin Schulz Signed-off-by: David S. Miller commit 302d20e57ac91d7a15e3da28d40b85cd5bd5bb7f Merge: f98ebd47fd0d abd01ba2f7d7 Author: David S. Miller Date: Wed Oct 10 22:53:03 2018 -0700 Merge branch 'net-dsa-bcm_sf2-Couple-of-fixes' Florian Fainelli says: ==================== net: dsa: bcm_sf2: Couple of fixes Here are two fixes for the bcm_sf2 driver that were found during testing unbind and analysing another issue during system suspend/resume. ==================== Signed-off-by: David S. Miller commit abd01ba2f7d74bf138ce2404a76714ecbc175dc9 Author: Florian Fainelli Date: Tue Oct 9 16:48:58 2018 -0700 net: dsa: bcm_sf2: Call setup during switch resume There is no reason to open code what the switch setup function does, in fact, because we just issued a switch reset, we would make all the register get their default values, including for instance, having unused port be enabled again and wasting power and leading to an inappropriate switch core clock being selected. Fixes: 8cfa94984c9c ("net: dsa: bcm_sf2: add suspend/resume callbacks") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller commit 448765e1cfa6b9b286dc45b0224b9a641b05eeb9 Author: Florian Fainelli Date: Tue Oct 9 16:48:57 2018 -0700 net: dsa: bcm_sf2: Fix unbind ordering The order in which we release resources is unfortunately leading to bus errors while dismantling the port. This is because we set priv->wol_ports_mask to 0 to tell bcm_sf2_sw_suspend() that it is now permissible to clock gate the switch. Later on, when dsa_slave_destroy() comes in from dsa_unregister_switch() and calls dsa_switch_ops::port_disable, we perform the same dismantling again, and this time we hit registers that are clock gated. Make sure that dsa_unregister_switch() is the first thing that happens, which takes care of releasing all user visible resources, then proceed with clock gating hardware. We still need to set priv->wol_ports_mask to 0 to make sure that an enabled port properly gets disabled in case it was previously used as part of Wake-on-LAN. Fixes: d9338023fb8e ("net: dsa: bcm_sf2: Make it a real platform device driver") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller commit f98ebd47fd0da1717267ce1583a105d8cc29a16a Author: Eric Dumazet Date: Tue Oct 9 15:20:50 2018 -0700 net: sched: avoid writing on noop_qdisc While noop_qdisc.gso_skb and noop_qdisc.skb_bad_txq are not used in other places, it seems not correct to overwrite their fields in dev_init_scheduler_queue(). noop_qdisc is essentially a shared and read-only object, even if it is not marked as const because of some implementation detail. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit d8a66aa25405e4e3015e4e4e856ef716585d59df Author: David Ahern Date: Tue Oct 9 11:10:43 2018 -0700 net/mpls: Implement handler for strict data checking on dumps Without CONFIG_INET enabled compiles fail with: net/mpls/af_mpls.o: In function `mpls_dump_routes': af_mpls.c:(.text+0xed0): undefined reference to `ip_valid_fib_dump_req' The preference is for MPLS to use the same handler as ipv4 and ipv6 to allow consistency when doing a dump for AF_UNSPEC which walks all address families invoking the route dump handler. If INET is disabled then fallback to an MPLS version which can be tighter on the data checks. Fixes: e8ba330ac0c5 ("rtnetlink: Update fib dumps for strict data checking") Reported-by: Randy Dunlap Reported-by: Arnd Bergmann Signed-off-by: David Ahern Signed-off-by: David S. Miller commit 83b59b46c8efe35756cdbf7f520728d4bb95f9a6 Merge: 4b035271fe87 1d9d8be91788 Author: David S. Miller Date: Wed Oct 10 22:38:50 2018 -0700 Merge branch 'fore200e-DMA-cleanups-and-fixes' Christoph Hellwig says: ==================== fore200e DMA cleanups and fixes The fore200e driver came up during some dma-related audits, so here is the fallout. Compile tested (x86 & sparc) only. ==================== Signed-off-by: David S. Miller commit 1d9d8be91788416d17862ec5a30fff33281ddef6 Author: Christoph Hellwig Date: Tue Oct 9 16:57:20 2018 +0200 fore200e: check for dma mapping failures The driver was lacking any handling for failures from the DMA mapping routines. With an iommu or swiotlb this can be fatal. Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit 0e21b2258a0f8ab5537387b3f1a43b672ce62670 Author: Christoph Hellwig Date: Tue Oct 9 16:57:19 2018 +0200 fore200e: don't use GFP_DMA The driver properly uses the DMA mapping API, so it should not pointlessly dip into the GFP_DMA pool, which is only 16MB on x86. Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit 1335d6fd65da11e9576c0a5dc6b8d65aadbfc9b6 Author: Christoph Hellwig Date: Tue Oct 9 16:57:18 2018 +0200 fore200e: devirtualize dma alloc calls There is no need for an indirection before calling the dma alloc routines now that we store a struct device in struct fore200e. Also remove the pointless GFP_ATOMIC for the sbus case, and fix the up the error handling by removing the 0 dma_addr test - some iommus can return 0 as a perfectly valid bus address. Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit f3fadcb5644aa94c8197f1699798d95baa5d59a8 Author: Christoph Hellwig Date: Tue Oct 9 16:57:17 2018 +0200 fore200e: devirtualize dma mapping calls There is no need for an indirection before calling the dma mapping routines now that we store a struct device in struct fore200e. Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit 8b08adbd87a66c7844481efa70e061c9efae277b Author: Christoph Hellwig Date: Tue Oct 9 16:57:16 2018 +0200 fore200e: remove the align_size field of struct chunk There is no need for this field, as the only user of it can just use the local size variable instead. Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit aff9d262fbf02184f1b79b264f29e9ae0bc1b77b Author: Christoph Hellwig Date: Tue Oct 9 16:57:15 2018 +0200 fore200e: store a struct device in struct fore200e This can be used much better than the untyped void pointer containing either a PCI or platform device. Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit 0efe5523894a2677269d56ef5ae2f0f6747240fb Author: Christoph Hellwig Date: Tue Oct 9 16:57:14 2018 +0200 fore200e: simplify fore200e_bus usage There is no need to have a global array of the ops, instead PCI and sbus can have their own instances assigned in *_probe. Also switch to C99 initializers. Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit 4b035271fe87855f73a882632fe4de1bab88c1b5 Author: Wang Li Date: Tue Oct 9 10:32:04 2018 +0800 net: tun: remove useless codes of tun_automq_select_queue Because the function __skb_get_hash_symmetric always returns non-zero. Signed-off-by: Zhang Yu Signed-off-by: Wang Li Signed-off-by: David S. Miller commit 0c465be183c7c57a26446df6ea96d8676b865f92 Author: Jason Wang Date: Tue Oct 9 10:06:26 2018 +0800 virtio_net: ethtool tx napi configuration Implement ethtool .set_coalesce (-C) and .get_coalesce (-c) handlers. Interrupt moderation is currently not supported, so these accept and display the default settings of 0 usec and 1 frame. Toggle tx napi through setting tx-frames. So as to not interfere with possible future interrupt moderation, value 1 means tx napi while value 0 means not. Only allow the switching when device is down for simplicity. Link: https://patchwork.ozlabs.org/patch/948149/ Suggested-by: Jason Wang Signed-off-by: Willem de Bruijn Signed-off-by: Jason Wang Signed-off-by: David S. Miller commit 1a21cc507bb75954bd8618f193179e2a3f8d9069 Merge: 7579d84be12c 12ecf61529dc Author: David S. Miller Date: Wed Oct 10 22:32:45 2018 -0700 Merge branch 'nfp-flower-speed-up-stats-update-loop' Jakub Kicinski says: ==================== nfp: flower: speed up stats update loop This set from Pieter improves performance of processing FW stats update notifications. The FW seems to send those at relatively high rate (roughly ten per second per flow), therefore if we want to approach the million flows mark we have to be very careful about our data structures. We tried rhashtable for stat updates, but according to our experiments rhashtable lookup on a u32 takes roughly 60ns on an Xeon E5-2670 v3. Which translate to a hard limit of 16M lookups per second on this CPU, and, according to perf record jhash and memcmp account for 60% of CPU usage on the core handling the updates. Given that our statistic IDs are already array indices, and considering each statistic is only 24B in size, we decided to forego the use of hashtables and use a directly indexed array. The CPU savings are considerable. With the recent improvements in TC core and with our own bottlenecks out of the way Pieter removes the artificial limit of 128 flows, and allows the driver to install as many flows as FW supports. ==================== Signed-off-by: David S. Miller commit 12ecf61529dc51b4dd03a15bed34c7d317c137ae Author: Pieter Jansen van Vuuren Date: Mon Oct 8 18:57:36 2018 -0700 nfp: flower: use host context count provided by firmware Read the host context count symbols provided by firmware and use it to determine the number of allocated stats ids. Previously it won't be possible to offload more than 2^17 filter even if FW was able to do so. Signed-off-by: Pieter Jansen van Vuuren Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller commit 7fade1077c5056a9a489110516143bbdf5a013c8 Author: Pieter Jansen van Vuuren Date: Mon Oct 8 18:57:35 2018 -0700 nfp: flower: use stats array instead of storing stats per flow Make use of an array stats instead of storing stats per flow which would require a hash lookup at critical times. Signed-off-by: Pieter Jansen van Vuuren Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller commit c01d0efa5136c3eaec3ae26d1e0c8c25d3a69c65 Author: Pieter Jansen van Vuuren Date: Mon Oct 8 18:57:34 2018 -0700 nfp: flower: use rhashtable for flow caching Make use of relativistic hash tables for tracking flows instead of fixed sized hash tables. Signed-off-by: Pieter Jansen van Vuuren Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller commit 7579d84be12c4645672deeac5bb0eace7dbd6cb5 Author: Nathan Chancellor Date: Mon Oct 8 15:59:05 2018 -0700 isdn/hisax: amd7930_fn: Remove unnecessary parentheses Clang warns when multiple sets of parentheses are used for a single conditional statement. drivers/isdn/hisax/amd7930_fn.c:628:32: warning: equality comparison with extraneous parentheses [-Wparentheses-equality] if ((cs->dc.amd7930.ph_state == 8)) { ~~~~~~~~~~~~~~~~~~~~~~~~^~~~ drivers/isdn/hisax/amd7930_fn.c:628:32: note: remove extraneous parentheses around the comparison to silence this warning if ((cs->dc.amd7930.ph_state == 8)) { ~ ^ ~ drivers/isdn/hisax/amd7930_fn.c:628:32: note: use '=' to turn this equality comparison into an assignment if ((cs->dc.amd7930.ph_state == 8)) { ^~ = 1 warning generated. Signed-off-by: Nathan Chancellor Signed-off-by: David S. Miller commit ffd177dea5c1ee5b717961d041df0778d58f50c0 Author: Yuchung Cheng Date: Mon Oct 8 15:32:20 2018 -0700 tcp: refactor DCTCP ECN ACK handling DCTCP has two parts - a new ECN signalling mechanism and the response function to it. The first part can be used by other congestion control for DCTCP-ECN deployed networks. This patch moves that part into a separate tcp_dctcp.h to be used by other congestion control module (like how Yeah uses Vegas algorithmas). For example, BBR is experimenting such ECN signal currently https://tinyurl.com/ietf-102-iccrg-bbr2 Signed-off-by: Yuchung Cheng Signed-off-by: Yousuk Seung Signed-off-by: Neal Cardwell Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit ed792e28c4bd09e9a319d2ad914aa62982cb4c4a Author: David Ahern Date: Mon Oct 8 14:06:34 2018 -0700 net/ipv6: Make ipv6_route_table_template static ipv6_route_table_template is exported but there are no users outside of route.c. Make it static. Signed-off-by: David Ahern Signed-off-by: David S. Miller commit e75fa0735cae006736ac868ffffd337cb7422877 Author: David Ahern Date: Mon Oct 8 13:58:07 2018 -0700 rtnetlink: Update comment in rtnl_stats_dump regarding strict data checking The NLM_F_DUMP_PROPER_HDR netlink flag was replaced by a setsockopt. Update the comment in rtnl_stats_dump. Fixes: 841891ec0c65 ("rtnetlink: Update rtnl_stats_dump for strict data checking") Reported-by: Christian Brauner Signed-off-by: David Ahern Signed-off-by: David S. Miller commit 4565d7e5a300fcc3a41d40dbcf7ff9d1fe316814 Author: David Ahern Date: Mon Oct 8 13:57:24 2018 -0700 rtnetlink: Move ifm in valid_fdb_dump_legacy to closer to use Move setting of local variable ifm to after the message parsing in valid_fdb_dump_legacy. Avoid potential future use of unchecked variable. Fixes: 8dfbda19a21b ("rtnetlink: Move input checking for rtnl_fdb_dump to helper") Reported-by: Christian Brauner Signed-off-by: David Ahern Signed-off-by: David S. Miller commit 66077060f82a69e8dde0262a20a37622a6e1af8c Merge: a26b0b53cc38 970152591d55 Author: David S. Miller Date: Wed Oct 10 22:22:40 2018 -0700 Merge branch 'mlxsw-selftests-Few-small-updates' Ido Schimmel says: ==================== mlxsw: selftests: Few small updates First patch fixes a typo in mlxsw. Second patch fixes a race in a recent test. Third patch makes a recent test executable. ==================== Signed-off-by: David S. Miller commit 970152591d5552fb52ddbf50af8d26b61f02bf39 Author: Petr Machata Date: Mon Oct 8 18:50:42 2018 +0000 selftests: mlxsw: qos_mc_aware: Make executable This is a self-standing test and as such should be itself executable. Fixes: b5638d46c90a ("selftests: mlxsw: Add a test for UC behavior under MC flood") Signed-off-by: Petr Machata Reviewed-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 372809055f6c830ff978564e09f58bcb9e9b937c Author: Petr Machata Date: Mon Oct 8 18:50:41 2018 +0000 selftests: forwarding: Have lldpad_app_wait_set() wait for unknown, too Immediately after mlxsw module is probed and lldpad started, added APP entries are briefly in "unknown" state before becoming "pending". That's the state that lldpad_app_wait_set() typically sees, and since there are no pending entries at that time, it bails out. However the entries have not been pushed to the kernel yet at that point, and thus the test case fails. Fix by waiting for both unknown and pending entries to disappear before proceeding. Fixes: d159261f3662 ("selftests: mlxsw: Add test for trust-DSCP") Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 9e664316408ad4dd2e6e6a7fa735a1691a1e04d1 Author: Nir Dotan Date: Mon Oct 8 18:50:40 2018 +0000 mlxsw: pci: Fix a typo Signed-off-by: Nir Dotan Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit a26b0b53cc38eb414c1d7a327bfd63cb357cebf9 Author: Colin Ian King Date: Mon Oct 8 14:35:58 2018 +0100 net: aquantia: remove some redundant variable initializations There are several variables being initialized that are being set later and hence the initialization is redundant and can be removed. Remove then. Signed-off-by: Colin Ian King Signed-off-by: David S. Miller commit ca4b869240d5810ebac6b1570ad7beffcfbac2f5 Merge: 46972c03ab66 df2fc43d09d3 Author: Dave Airlie Date: Thu Oct 11 14:53:40 2018 +1000 Merge branch 'drm-next-4.20' of git://people.freedesktop.org/~agd5f/linux into drm-next Add a new list.h helper for doing bulk updates. Used by ttm. - Fixes for display underflow on VI APUs at 4K with UVD running - Endian fixes for powerplay on vega - DC fixes for interlaced video - Vega20 powerplay fixes - RV/RV2/PCO powerplay fixes - Fix for spurious ACPI events on HG laptops - Fix a memory leak in DC on driver unload - Fixes for manual fan control mode switching - Suspend/resume robustness fixes - Fix display handling on RV2 - VCN fixes for DPG on PCO - Misc code cleanups and warning fixes Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20181011014739.3117-1-alexander.deucher@amd.com commit 46972c03ab667dc298cad0c9db517fb9b1521b5f Merge: 66c9e573ea75 7372fd049aa8 Author: Dave Airlie Date: Thu Oct 11 14:51:52 2018 +1000 Merge tag 'drm-misc-next-fixes-2018-10-10' of git://anongit.freedesktop.org/drm/drm-misc into drm-next - Fix build failure without CONFIG_DRM_FBDEV_EMULATION (Arnd) - Add Maxime to drm-misc maintainer group (Sean) Cc: Arnd Bergmann Cc: Sean Paul Signed-off-by: Dave Airlie From: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20181010203951.GA229456@art_vandelay commit d11cf4a7321b538563b0ab30dc0d1f18f9c56226 Author: Dan Williams Date: Wed Oct 10 16:38:24 2018 -0700 libnvdimm, dimm: Maximize label transfer size Use kvzalloc() to bypass the arbitrary PAGE_SIZE limit of label transfer operations. Given the expense of calling into firmware, maximize the amount of label data we transfer per call to be up to the total label space if allowed by the firmware. Instead of limiting based on PAGE_SIZE we can instead simply limit the maximum size based on either the config_size int he case of the get operation, or the length of the write based on the set operation. On a system with 24 NVDIMM modules each with a config_size of 128K and a maximum transfer size of 64K - 4, this patch reduces the init time for the label data from around 24 seconds down to between 4-5 seconds. Reviewed-by: Toshi Kani Signed-off-by: Alexander Duyck Signed-off-by: Dan Williams commit 3f6caaf5ff33073ca1a3a0b82edacab3c57c38f9 Author: Kees Cook Date: Wed Oct 10 17:18:26 2018 -0700 LSM: Don't ignore initialization failures LSM initialization failures have traditionally been ignored. We should at least WARN when something goes wrong. Signed-off-by: Kees Cook Reviewed-by: Casey Schaufler Reviewed-by: John Johansen Signed-off-by: James Morris commit 9b8c7c14059af801637a818882159145c370d6f1 Author: Kees Cook Date: Wed Oct 10 17:18:25 2018 -0700 LSM: Provide init debugging infrastructure Booting with "lsm.debug" will report future details on how LSM ordering decisions are being made. Signed-off-by: Kees Cook Reviewed-by: Casey Schaufler Reviewed-by: John Johansen Reviewed-by: James Morris Signed-off-by: James Morris commit 07aed2f2af5a5892ced035dbcf3993f630825fc3 Author: Kees Cook Date: Wed Oct 10 17:18:24 2018 -0700 LSM: Record LSM name in struct lsm_info In preparation for making LSM selections outside of the LSMs, include the name of LSMs in struct lsm_info. Signed-off-by: Kees Cook Reviewed-by: Casey Schaufler Signed-off-by: James Morris commit 3d6e5f6dcf6561e57b6466e43e14029fb196028d Author: Kees Cook Date: Wed Oct 10 17:18:23 2018 -0700 LSM: Convert security_initcall() into DEFINE_LSM() Instead of using argument-based initializers, switch to defining the contents of struct lsm_info on a per-LSM basis. This also drops the final use of the now inaccurate "initcall" naming. Signed-off-by: Kees Cook Reviewed-by: Casey Schaufler Reviewed-by: James Morris Signed-off-by: James Morris commit 3ac946d12e344a48c1192ef8910c6095a0d6a8ac Author: Kees Cook Date: Wed Oct 10 17:18:22 2018 -0700 vmlinux.lds.h: Move LSM_TABLE into INIT_DATA Since the struct lsm_info table is not an initcall, we can just move it into INIT_DATA like all the other tables. Signed-off-by: Kees Cook Reviewed-by: Casey Schaufler Reviewed-by: John Johansen Reviewed-by: James Morris Signed-off-by: James Morris commit 5b89c1bd4c7e5c5ca8c5374fde35ecee6e16496c Author: Kees Cook Date: Wed Oct 10 17:18:21 2018 -0700 LSM: Convert from initcall to struct lsm_info In preparation for doing more interesting LSM init probing, this converts the existing initcall system into an explicit call into a function pointer from a section-collected struct lsm_info array. Signed-off-by: Kees Cook Reviewed-by: Casey Schaufler Reviewed-by: James Morris Reviewed-by: John Johansen Signed-off-by: James Morris commit 6907e3746fa1b9b685230098266bbeba99b93c7d Author: Kees Cook Date: Wed Oct 10 17:18:20 2018 -0700 LSM: Remove initcall tracing This partially reverts commit 58eacfffc417 ("init, tracing: instrument security and console initcall trace events") since security init calls are about to no longer resemble regular init calls. Signed-off-by: Kees Cook Reviewed-by: Casey Schaufler Reviewed-by: James Morris Signed-off-by: James Morris commit b048ae6e6c7062809e4398f4d0bfe80870715d3c Author: Kees Cook Date: Wed Oct 10 17:18:19 2018 -0700 LSM: Rename .security_initcall section to .lsm_info In preparation for switching from initcall to just a regular set of pointers in a section, rename the internal section name. Signed-off-by: Kees Cook Reviewed-by: Casey Schaufler Reviewed-by: James Morris Reviewed-by: John Johansen Signed-off-by: James Morris commit 1e80cd1672bc77c96fa72205ba6db78dc10825b4 Author: Kees Cook Date: Wed Oct 10 17:18:18 2018 -0700 vmlinux.lds.h: Avoid copy/paste of security_init section Avoid copy/paste by defining SECURITY_INIT in terms of SECURITY_INITCALL. Signed-off-by: Kees Cook Reviewed-by: Casey Schaufler Reviewed-by: James Morris Reviewed-by: John Johansen Signed-off-by: James Morris commit 98d291708cbaab06efec195d0810a7ef60f7603a Author: Kees Cook Date: Wed Oct 10 17:18:17 2018 -0700 LSM: Correctly announce start of LSM initialization For a while now, the LSM core has said it was "initializED", rather than "initializING". This adjust the report to be more accurate (i.e. before this was reported before any LSMs had been initialized.) Signed-off-by: Kees Cook Reviewed-by: Casey Schaufler Reviewed-by: James Morris Reviewed-by: John Johansen Signed-off-by: James Morris commit d4b0166d28a8966ab6938d8bb7360c383b519256 Author: Nicolin Chen Date: Mon Oct 8 13:14:24 2018 -0700 hwmon: (ina3221) Use _info API to register hwmon device The hwmon core has a newer API which abstracts most of common things in the core so as to simplify the hwmon device drivers. This patch implements this _info API to ina3221 hwmon driver. It also reduces the binary size: text data bss dec hex filename 5114 1712 0 6826 1aaa drivers/hwmon/ina3221_before.o 4456 440 0 4896 1320 drivers/hwmon/ina3221.o Signed-off-by: Nicolin Chen Signed-off-by: Guenter Roeck commit f21c8e753b1dcb8f9e5b096db1f7f4e6fdfa7258 Author: Kun Yi Date: Mon Oct 8 14:49:25 2018 -0700 hwmon: (npcm-750-pwm-fan) Change initial pwm target to 255 Change initial PWM target to 255 to prevent overheating, for example when BMC hangs in userspace or when userspace fan control application is not implemented yet. Signed-off-by: Kun Yi Signed-off-by: Guenter Roeck commit a6e43263ed01fa617e0a0c13ea8a5f1538573380 Author: Nicolin Chen Date: Mon Oct 8 14:24:51 2018 -0700 hwmon: (ina3221) Validate shunt resistor value from DT The input->shunt_resistor is int type while the value from DT is unsigned int. Meanwhile, a divide-by-zero error would happen if the value is 0. So this patch just simply validates the value. Signed-off-by: Nicolin Chen Signed-off-by: Guenter Roeck commit 8b9bf554dd530a40cd06a709edb8ec96b4de1d1a Author: Colin Ian King Date: Tue Oct 9 13:11:57 2018 +0100 hwmon: (tmp421) make const array 'names' static The const array 'names' can be made static, saves populating it on the stack and will make it read-only. Signed-off-by: Colin Ian King Signed-off-by: Guenter Roeck commit 68c0d69dee594e1488aebe12aa50fd79a3e5e5b5 Author: Nicolin Chen Date: Fri Oct 5 16:59:04 2018 -0700 hwmon: (core) Add hwmon_in_enable attribute According to hwmon ABI, in%d_enable is a sysfs interface that allows user space to enable and disable the input sensor. So this patch just simply adds the attribute to the list. Signed-off-by: Nicolin Chen Signed-off-by: Guenter Roeck commit ead21c77d709cfba593c42f4d71c09e469a19448 Author: Arnd Bergmann Date: Tue Oct 2 23:10:47 2018 +0200 hwmon: (ina3221) mark PM functions as __maybe_unused When CONFIG_PM_SLEEP is disabled, we get a warning about unused suspend/resume functions: drivers/hwmon/ina3221.c:451:12: error: 'ina3221_resume' defined but not used [-Werror=unused-function] static int ina3221_resume(struct device *dev) drivers/hwmon/ina3221.c:428:12: error: 'ina3221_suspend' defined but not used [-Werror=unused-function] static int ina3221_suspend(struct device *dev) Picking the correct #ifdef check is hard, so let's remove that check and instead mark the functions as __maybe_unused to let the compiler silently drop them instead. Fixes: 7de1ab9dac8e ("hwmon: (ina3221) Add suspend and resume functions") Signed-off-by: Arnd Bergmann Signed-off-by: Guenter Roeck commit a9e9dd9c6de5d80c244fcb39086cfece54519150 Author: Nicolin Chen Date: Mon Oct 1 18:05:23 2018 -0700 hwmon: (ina3221) Read channel input source info from DT An ina3221 chip has three input ports. Each port is used to measure the voltage and current of its input source. The DT binding now has defined bindings for their input sources, so the driver should read these information and handle accordingly. This patch adds a new structure of input source specific information including input source label, shunt resistor value and its connection status. It exposes these labels via in[123]_label sysfs nodes upon available, and also disables those channels where there are no input source being connected. Meanwhile, it also adds in[123]_enable sysfs nodes for users to get control of three channels, and returns -ENODATA code for any sensor read according to hwmon ABI. Signed-off-by: Nicolin Chen Signed-off-by: Guenter Roeck commit 8b949c64d014c28b00472cb8eb9af78b95fc1d8c Author: Nicolin Chen Date: Mon Oct 1 18:05:22 2018 -0700 dt-bindings: hwmon: Add ina3221 documentation Texas Instruments INA3221 is a triple-channel shunt and bus voltage monitor. This patch adds a DT binding doc for it. Signed-off-by: Nicolin Chen Reviewed-by: Rob Herring Signed-off-by: Guenter Roeck commit 59d608e152e582604e384beebbd607686e4265cf Author: Nicolin Chen Date: Sat Sep 29 14:44:07 2018 -0700 hwmon: (ina3221) Add suspend and resume functions Depending on the hardware design, an INA3221 chip might lose its power during system suspend/resume. So this patch adds a set of suspend and resume functions to cache the register values including config register value and limit settings. Signed-off-by: Nicolin Chen [groeck: Moved call to dev_set_drvdata()] Signed-off-by: Guenter Roeck commit 791ebc9d34e9d212fc03742c31654b017d385926 Author: Nicolin Chen Date: Sat Sep 29 14:44:06 2018 -0700 hwmon: (ina3221) Fix INA3221_CONFIG_MODE macros The three INA3221_CONFIG_MODE macros are not correctly defined here. The MODE3-1 bits are located at BIT 2-0 according to the datasheet. So this patch just fixes them by shifting all of them with a correct offset. However, this isn't a crital bug fix as the driver does not use any of them at this point. Signed-off-by: Nicolin Chen Signed-off-by: Guenter Roeck commit c20217b30d675bb8ce3f55768c3cff629641a868 Author: Nicolin Chen Date: Sat Sep 29 14:44:05 2018 -0700 hwmon: (ina3221) Add INA3221_CONFIG to volatile_table The MSB (15th bit) of INA3221_CONFIG is a self-clear reset bit. So this register should be added to the volatile_table of the regmap_config. Otherwise, we will see this bit is sticky in the regcache which might accidentally reset the chip when an actual write happens to the register. This might not be a severe bug for the current code line since there's no second place touching the INA3221_CONFIG except the reset routine in the probe(). Signed-off-by: Nicolin Chen Signed-off-by: Guenter Roeck commit cbc2a23803193f6cbc415bf79f3ec162f3cfc52a Author: Guenter Roeck Date: Fri Sep 28 18:58:36 2018 -0700 MAINTAINERS: Update PMBUS maintainer entry MAX20751 is a PMBUS driver, which has its own maintainer entry. On top of that, the entry for MAX20751 points to a non-existing file. Drop it. Add various missing driver documentation files. Reported-by: Joe Perches Cc: Joe Perches Signed-off-by: Guenter Roeck commit 95dcd64bc5a27080beaa344edfe5bdcca3d2e7dc Author: Thierry Reding Date: Fri Sep 21 12:10:48 2018 +0200 hwmon: (pwm-fan) Set fan speed to 0 on suspend Technically this is not required because disabling the PWM should be enough. However, when support for atomic operations was implemented in the PWM subsystem, only actual changes to the PWM channel are applied during pwm_config(), which means that during after resume from suspend the old settings won't be applied. One possible solution is for the PWM driver to implement its own PM operations such that settings from before suspend get applied on resume. This has the disadvantage of completely ignoring any particular ordering requirements that PWM user drivers might have, so it is best to leave it up to the user drivers to apply the settings that they want at the appropriate time. Another way to solve this would be to read back the current state of the PWM at the time of resume. That way, in case the configuration was lost during suspend, applying the old settings in PWM user drivers would actually get them applied because they differ from the current settings. However, not all PWM drivers support reading the hardware state, and not all hardware may support it. The best workaround at this point seems to be to let PWM user drivers tell the PWM subsystem that the PWM is turned off by, in addition to disabling it, also setting the duty cycle to 0. This causes the resume operation to apply a configuration that is different from the current configuration, resulting in the proper state from before suspend getting restored. Signed-off-by: Thierry Reding Signed-off-by: Guenter Roeck commit 9f67f7583e77fe5dc57aab3a6159c2642544eaad Author: Thierry Reding Date: Fri Sep 21 12:10:47 2018 +0200 hwmon: (pwm-fan) Silence error on probe deferral Probe deferrals aren't actual errors, so silence the error message in case the PWM cannot yet be acquired. Signed-off-by: Thierry Reding Signed-off-by: Guenter Roeck commit 3045b5d61a60b606f89e3f26ae8e126a8f12b531 Author: zhong jiang Date: Fri Sep 21 09:30:03 2018 +0800 hwmon: (scpi-hwmon) remove redundant continue The continue will not truely skip any code. hence it is safe to remove it. Signed-off-by: zhong jiang Signed-off-by: Guenter Roeck commit 0599682b826ff7bbf9d5804fa37bcef36b0c9404 Author: Guenter Roeck Date: Wed Sep 19 20:26:16 2018 -0700 hwmon: (nct6775) Add support for NCT6798D NCT6798D is, with the exception of fan and pwm channel configuration registers, similar to other chips of the series. One interesting difference is the chip ID, which is now extended to 13 bit (the 12-bit chip ID value overlaps with the chip ID of NCT6797D). Signed-off-by: Guenter Roeck commit e41da286a2fd9a5459d7a02203f776aef5e2bd8a Author: Guenter Roeck Date: Tue Sep 18 20:48:29 2018 -0700 hwmon: (nct6775) Add support for NCT6797D Add support for NCT6797D. With the exception of fan/pwm configuration registers, it is mostly compatible with NCT6795D. Signed-off-by: Guenter Roeck commit 3be8c9d103534fadc72b3e174613f37aa19fa423 Author: Guenter Roeck Date: Wed Sep 19 21:52:49 2018 -0700 hwmon: (nct6775) Fix names of DIMM temperature sources For NCT6795D and NCT6796D, the DIMM temperature sources are named "Agent[01] Dimm [01]" per datasheet. Match names in datasheets to avoid confusion. Signed-off-by: Guenter Roeck commit 3fdb06aff5044ad4ac3c2895d7869b85dadb23b6 Author: Guenter Roeck Date: Tue Sep 18 20:21:40 2018 -0700 hwmon: (nct6796) Clean up and amend fan/pwm configuration for NCT6796D Now that everything is separated, clean up fan and pwm configuration for NCT6796D. While doing that, take the forgotten configuration register cre0 into account to determine if AUXFANIN2 (fan5) and AUXFANOUT2 (pwm5) are connected. Signed-off-by: Guenter Roeck commit b75a806389901efa93c355238f787d922ba074b3 Author: Guenter Roeck Date: Tue Sep 18 11:18:30 2018 -0700 hwmon: (nct6775) Separate fan/pwm configuration detection for NCT6795D Separate fan/pwm configuration detection for NCT6795D into separate case statement to make the code easier to read. No functional change. Signed-off-by: Guenter Roeck commit 2d99925a15b639026b67bd96419df6f9d760b212 Author: Guenter Roeck Date: Tue Sep 18 11:03:25 2018 -0700 hwmon: (nct6775) Separate fan/pwm configuration detection for NCT6793D While detecting the configuration for multiple chips in one go reduces code size, it also increases code complexity. Separate chip detection to improve code readability. As first step, separate detection for NCT6793D. No functional change. Signed-off-by: Guenter Roeck commit 7dcdbdeb1b45b9071ad986bf20d8c2da6a057eb6 Author: Guenter Roeck Date: Tue Sep 18 10:52:55 2018 -0700 hwmon: (nct6775) Fix fan6/pwm6 detection for NCT6792D Per datasheet, AUXFANIN3 (fan6) and AUXFANOUT3 (pwm6) are only connected if DSW_EN is false. Signed-off-by: Guenter Roeck commit b2833f397dc1443b4db8c7b363d8dc41af805054 Author: Guenter Roeck Date: Tue Sep 18 09:57:11 2018 -0700 hwmon: (nct6775) Improve instruction grouping When determining support for a given fan or pwm control, the code is easier to read if the necessary instructions are grouped together. No functional change. Signed-off-by: Guenter Roeck commit a4e0a080cad80bb2522eb541868cc48c5e68ba72 Author: Guenter Roeck Date: Tue Sep 18 09:53:06 2018 -0700 hwmon: (nct6775) Use logical or instead of if statements where possible Use boolean |= ; instead of if (!boolean) boolean = ; to assign values to boolean variables. No functional change. Signed-off-by: Guenter Roeck commit 2d888c5f22b49bba174e0343f8e4ddfb374fa816 Author: Guenter Roeck Date: Tue Sep 18 09:49:29 2018 -0700 hwmon: (nct6775) Declare and initialize LDN specific config variables earlier Declare and initialize LDN / chip specific configuration variables earlier. This simplifies re-using the configuration variables for multiple chips and makes the code easier to read. Signed-off-by: Guenter Roeck commit 97ce6df46874331b46e279ae18bd07365e6cd586 Author: Guenter Roeck Date: Tue Sep 18 09:46:24 2018 -0700 hwmon: (nct6775) Move config variable declarations and initializations Group configuration variable declarations and initialization together. While this results in reading more registers than necessary for a given chip, it improves code readability and simplifies extending the code. Signed-off-by: Guenter Roeck commit a6c54f2cde3c80b7bc0d247fc9d161bad64b53a9 Author: Guenter Roeck Date: Tue Sep 18 09:34:06 2018 -0700 hwmon: (nct6775) Replace 'regval' with variables named after config registers Using variables named after configuration registers makes it more obvious which configuration register value is used, especially if more than one configuration register value is used to determine a configuration detail. No functional change. Signed-off-by: Guenter Roeck commit 0085a5108de17dc0bfd97abb2ab3354f5c7be08e Author: Guenter Roeck Date: Tue Sep 18 09:31:21 2018 -0700 hwmon: (nct6775) Rename configuration register variables Use variable names from chip datasheets (crXX) instead of regval_XX for configuration register variables. This is shorter and, together with subsequent changes, makes the code easier to read. No functional change. Signed-off-by: Guenter Roeck commit 61b6c66a8f740b5025ac49ddf1c2e29091a1274e Author: Guenter Roeck Date: Mon Sep 17 09:24:11 2018 -0700 hwmon: (nct6775) Only display fan speed tolerance conditionally A fan speed tolerance only makes sense if a fan target speed has been configured in the first place. Otherwise we get odd output such as fan1_target:0 fan1_tolerance:337500 Only display values other than 0 if a fan target speed has been configured. Signed-off-by: Guenter Roeck commit 0665a1d6231207c363dd6068611121e76346f99f Author: Guenter Roeck Date: Sun Sep 16 07:45:21 2018 -0700 hwmon: (lm92) Fix whitespace issues Smatch complains: drivers/hwmon/lm92.c:209 set_temp_hyst() warn: inconsistent indenting While at it, fix various other whitespace issues reported by checkpatch (double empty lines, missing empty lines, whitespace at empty line). Signed-off-by: Guenter Roeck commit a31796c30e423f58d266df30a9bbf321fc071b30 Author: Nathan Chancellor Date: Sat Sep 15 17:05:07 2018 -0700 hwmon: (scmi) Remove redundant pointer check Clang warns when the address of a pointer is used in a boolean context as it will always return true. drivers/hwmon/scmi-hwmon.c:59:24: warning: address of array 'sensor->name' will always evaluate to 'true' [-Wpointer-bool-conversion] if (sensor && sensor->name) ~~ ~~~~~~~~^~~~ 1 warning generated. Remove the check as it isn't doing anything currently; if validation of the contents of the data structure was intended by the original author (since this line has been present from the first version of this driver), it can be added in a follow-up patch. Reported-by: Nick Desaulniers Signed-off-by: Nathan Chancellor Signed-off-by: Guenter Roeck commit 2738b767be548d6397a74141c18182fddd8abfc3 Author: zhong jiang Date: Tue Sep 11 20:03:37 2018 +0800 hwmon: (asus_atk0110) Use PTR_ERR_OR_ZERO instead of reimplementing its function PTR_ERR_OR_ZERO has implemented the same function. We prefer to use inlined function rather than code-opened implementation. Signed-off-by: zhong jiang Signed-off-by: Guenter Roeck commit a54ca77a98a311bf0488fd9004c5b691454ff917 Author: Kun Yi Date: Tue Sep 11 13:25:58 2018 -0700 hwmon: (lm75) Add MAX31725/6 support MAX31725/MAX31726 are local temperature sensors with +/- 0.5 degree Celsius accuracy and 16-bit (0.00390625 degrees Celsius) resolution. They have a register mapping and encoding compatible with the lm75 series drivers. Address scan and extended temperature range are not supported by this patch. Tested on real hardware and verified temperature readings are correct. Signed-off-by: Kun Yi Signed-off-by: Guenter Roeck commit 39ea6ea325dcd05daf65f3d9d8d205a55683668f Author: Fabio Estevam Date: Thu Sep 6 15:59:50 2018 -0300 hwmon: (sht15) Switch to SPDX identifier Adopt the SPDX license identifier headers to ease license compliance management. Signed-off-by: Fabio Estevam Signed-off-by: Guenter Roeck commit 9450f52cec784a93b93772bba3a158647ed9b4d8 Author: Fabio Estevam Date: Thu Sep 6 15:59:49 2018 -0300 hwmon: (mc13783-adc) Switch to SPDX identifier Adopt the SPDX license identifier headers to ease license compliance management. Signed-off-by: Fabio Estevam Signed-off-by: Guenter Roeck commit c3bf6076cc41659c7b0301d19f871a22e4633013 Author: Dan Carpenter Date: Wed Sep 5 10:46:55 2018 +0300 hwmon: (nct6775) Clean up a condition I removed the "dsw_en &&" chunk of the condition because we know that "dsw_en" is set. Signed-off-by: Dan Carpenter Signed-off-by: Guenter Roeck commit 53dfa0088edd2e2793afa21488532b12eb2dae48 Author: Guenter Roeck Date: Sun Sep 2 12:02:53 2018 -0700 hwmon: (k10temp) Support all Family 15h Model 6xh and Model 7xh processors BIOS developer guides refer to Family 15h Models 60h-6fh and Family 15h Models 70h-7fh. So far the driver only checked for Models 60h and 70h. However, there are now processors with other model numbers in the same families. Example is A10-9620P family 15h model 65h. Follow the developer guides and mask the lower 4 bit of the model number to determine the registers to use for reading temperatures and temperature limits. Reported-by: Guglielmo Fanini Cc: Guglielmo Fanini Acked-by: Clemens Ladisch Signed-off-by: Guenter Roeck commit e9d02c6414e1090c82c89df340d3516fbc09ddf4 Author: Rob Herring Date: Wed Aug 29 15:02:21 2018 -0500 hwmon: (ibmpowernv) drop unnecessary OF name NULL checks Checking the child node names is pointless as the DT node name can never be NULL, so remove it. Cc: Jean Delvare Cc: Guenter Roeck Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: linux-hwmon@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Rob Herring Signed-off-by: Guenter Roeck commit 86103cffe8834fef0a342fcac82585ff67cda569 Author: Guenter Roeck Date: Tue Aug 28 11:41:41 2018 -0700 hwmon: (iio_hwmon) Do not duplicate or sanitize fixed string Calling devm_kstrdup() on a fixed string is unnecessary, as is validating its contents. Rearrange the code to avoid both. Signed-off-by: Guenter Roeck commit 0debe4d0b86afa5eb9192595c820ed980cabe38b Author: Rob Herring Date: Mon Aug 27 20:52:21 2018 -0500 hwmon: 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 Cc: linux-hwmon@vger.kernel.org Signed-off-by: Rob Herring Signed-off-by: Guenter Roeck commit 23d3f131bf379b9460d2f079f0eb85ac669eded4 Author: Fabio Estevam Date: Sat Aug 25 00:27:56 2018 -0300 hwmon: (mc13783-adc) Use nxp.com URLs Use the nxp.com URLs for the MC13783 and MC13892 datasheets. The original URLs are still valid, but the nxp.com one is shorter and more up-to-date. Signed-off-by: Fabio Estevam Signed-off-by: Guenter Roeck commit 3d13aa37ba4d04909c481ada8ac36aaf0a8ce9b8 Author: Fabio Estevam Date: Sat Aug 25 00:27:55 2018 -0300 hwmon: (mc13783-adc) Remove the mention to 'Atlas' 'Atlas' was an internal name for the MC13783 PMIC only and does not apply to MC13892. To avoid confusion, remove the 'Atlas' term from the description. Signed-off-by: Fabio Estevam Signed-off-by: Guenter Roeck commit 4e15d05d9c439977e2f995b895e1701a8c47d800 Author: Michael Hennerich Date: Tue Aug 14 14:18:28 2018 +0200 drivers: hwmon: (pmbus/ltc2978) Add support for LTM4686 uModule This patch adds support for LTM4686 Ultrathin Dual 10A or Single 20A uModule Regulator with Digital Power System Management. Datasheet: http://www.analog.com/ltm4686 Signed-off-by: Michael Hennerich Signed-off-by: Guenter Roeck commit ca2ade24157693b4e533ccec69df00ef719d4aad Author: Colin Ian King Date: Mon Oct 1 00:03:07 2018 +0100 scsi: arcmsr: clean up clang warning on extraneous parentheses There are extraneous parantheses that are causing clang to produce a warning so remove these. Clean up 3 clang warnings: equality comparison with extraneous parentheses [-Wparentheses-equality] Signed-off-by: Colin Ian King Acked-by: Ching Huang Signed-off-by: Martin K. Petersen commit e77044c5a8422e4e139f0a2ac5d49f4075779594 Author: Avri Altman Date: Sun Oct 7 17:30:39 2018 +0300 scsi: ufs-bsg: Add support for uic commands in ufs_bsg_request() Make ufshcd_send_uic_cmd() public for that. Signed-off-by: Avri Altman Reviewed-by: Christoph Hellwig Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 95e34bf930eaee51dab23495342b148cd0ee2ba1 Author: Avri Altman Date: Sun Oct 7 17:30:38 2018 +0300 scsi: ufs-bsg: Add support for raw upiu in ufs_bsg_request() Do that for the currently supported UPIUs: query, nop out, and task management. We do not support UPIU of type scsi command yet, while we are using the job's request and reply pointers to hold the payload. We will look into it in later patches. We might need to elaborate the raw upiu api for that. We also still not supporting uic commands: For first phase, we plan to use the existing api, and send only uic commands that are already supported. Anyway, all that will come in the next patch. Signed-off-by: Avri Altman Reviewed-by: Christoph Hellwig Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 5e0a86eed84607432436766e3e1bb37f8318f7b2 Author: Avri Altman Date: Sun Oct 7 17:30:37 2018 +0300 scsi: ufs: Add API to execute raw upiu commands The UFS host software uses a combination of a host register set and Transfer Request Descriptors in system memory to communicate with host controller hardware. In its mmio space, a separate places are assigned to UTP Transfer Request Descriptor ("utrd") list, and to UTP Task Management Request Descriptor ("utmrd") list. The provided API supports utrd-typed requests: nop out and device management commands. It also supports utmrd-type requests: task management requests. Other UPIU types are not supported for now. We utilize the already existing code for tag and task work queues. That is, all utrd-typed UPIUs are "disguised" as device management commands. Similarly, the utmrd-typed UPUIs uses the task management infrastructure. It is up to the caller to fill the upiu request properly, as it will be copied without any further input validations. Signed-off-by: Avri Altman Reviewed-by: Christoph Hellwig Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 220d17a69de432e520461531cb569f75a43ed6f5 Author: Avri Altman Date: Sun Oct 7 17:30:36 2018 +0300 scsi: ufs: Use data structure size in pointer arithmetic Use the structure size in pointer arithmetic instead of an opaque 32 bytes for the over-allocation of descriptors. Signed-off-by: Avri Altman Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen commit df032bf27a414acf61c957ec2fad22a57d903b39 Author: Avri Altman Date: Sun Oct 7 17:30:35 2018 +0300 scsi: ufs: Add a bsg endpoint that supports UPIUs For now, just provide an API to allocate and remove ufs-bsg node. We will use this framework to manage ufs devices by sending UPIU transactions. For the time being, implements an empty bsg_request() - will add some more functionality in coming patches. Nonetheless, we reveal here the protocol we are planning to use: UFS Transport Protocol Transactions. UFS transactions consist of packets called UFS Protocol Information Units (UPIU). There are UPIU’s defined for UFS SCSI commands, responses, data in and data out, task management, utility functions, vendor functions, transaction synchronization and control, and more. By using UPIUs, we get access to the most fine-grained internals of this protocol, and able to communicate with the device in ways, that are sometimes beyond the capacity of the ufs driver. Moreover and as a result, our core structure - ufs_bsg_node has a pretty lean structure: using upiu transactions that contains the outmost detailed info, so we don't really need complex constructs to support it. Signed-off-by: Avri Altman Reviewed-by: Christoph Hellwig Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit a851b2bd363220feacbf36adb49616a49edc99fb Author: Avri Altman Date: Sun Oct 7 17:30:34 2018 +0300 scsi: uapi: ufs: Make utp_upiu_req visible to user space in preparation to send UPIU requests via bsg. Signed-off-by: Avri Altman Reviewed-by: Bart Van Assche Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen commit c6049cd98212dfe39f67fb411d18d53df0ad9436 Author: Christoph Hellwig Date: Sun Oct 7 17:30:33 2018 +0300 scsi: ufs: add a low-level __ufshcd_issue_tm_cmd helper Add a helper that takes a utp_task_req_desc and issues it, which will be useful for UFS bsg support. Rewrite ufshcd_issue_tm_cmd0x to use this new helper. Signed-off-by: Christoph Hellwig Signed-off-by: Avri Altman Signed-off-by: Martin K. Petersen commit 391e388f853dad5d1d7462a31bb50ff2446e37f0 Author: Christoph Hellwig Date: Sun Oct 7 17:30:32 2018 +0300 scsi: ufs: cleanup struct utp_task_req_desc Remove the pointless task_req_upiu and task_rsp_upiu indirections, which are __le32 arrays always cast to given structures and just add the members directly. Also clean up variables names in use in the callers a bit to make the code more readable. Signed-off-by: Christoph Hellwig Signed-off-by: Avri Altman Signed-off-by: Martin K. Petersen commit 51aef7161753b8222f589c94886dd1a706f2b42d Author: Lance Roy Date: Tue Oct 2 22:38:55 2018 -0700 scsi: snic: 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 Cc: Karan Tilak Kumar Cc: Sesidhar Baddela Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit a6682814f37124ec1e708cca8f44968445fa9dd7 Author: Masami Hiramatsu Date: Wed Aug 29 01:18:43 2018 +0900 tracing/kprobes: Allow kprobe-events to record module symbol Allow kprobe-events to record module symbols. Since data symbols in a non-loaded module doesn't exist, it fails to define such symbol as an argument of kprobe-event. But if the kprobe event is defined on that module, we can defer to resolve the symbol address. Note that if given symbol is not found, the event is kept unavailable. User can enable it but the event is not recorded. Link: http://lkml.kernel.org/r/153547312336.26502.11432902826345374463.stgit@devbox Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 59158ec4aef7d44be51a6f3e7e17fc64c32604eb Author: Masami Hiramatsu Date: Wed Aug 29 01:18:15 2018 +0900 tracing/kprobes: Check the probe on unloaded module correctly Current kprobe event doesn't checks correctly whether the given event is on unloaded module or not. It just checks the event has ":" in the name. That is not enough because if we define a probe on non-exist symbol on loaded module, it allows to define that (with warning message) To ensure it correctly, this searches the module name on loaded module list and only if there is not, it allows to define it. (this event will be available when the target module is loaded) Link: http://lkml.kernel.org/r/153547309528.26502.8300278470528281328.stgit@devbox Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit f3f58935edbcb33fd529fc46d554162a0660fd2d Author: Masami Hiramatsu Date: Wed Aug 29 01:17:47 2018 +0900 tracing/uprobes: Fix to return -EFAULT if copy_from_user failed Fix probe_mem_read() to return -EFAULT if copy_from_user() failed. The copy_from_user() returns remaining bytes when it failed, but probe_mem_read() caller expects it returns error code like as probe_kernel_read(). Link: http://lkml.kernel.org/r/153547306719.26502.8353484532699160223.stgit@devbox Reported-by: Dan Carpenter Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit a1303af5d79eb13a658633a9fb0ce3aed0f7decf Author: Masami Hiramatsu Date: Wed Apr 25 21:21:26 2018 +0900 tracing: probeevent: Add $argN for accessing function args Add $argN special fetch variable for accessing function arguments. This allows user to trace the Nth argument easily at the function entry. Note that this returns most probably assignment of registers and stacks. In some case, it may not work well. If you need to access correct registers or stacks you should use perf-probe. Link: http://lkml.kernel.org/r/152465888632.26224.3412465701570253696.stgit@devbox Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 3c88ee194c288205733d248b51f0aca516ff4940 Author: Masami Hiramatsu Date: Wed Apr 25 21:20:57 2018 +0900 x86: ptrace: Add function argument access API Add regs_get_argument() which returns N th argument of the function call. Note that this chooses most probably assignment, in some case it can be incorrect (e.g. passing data structure or floating point etc.) This is expected to be called from kprobes or ftrace with regs where the top of stack is the return address. Link: http://lkml.kernel.org/r/152465885737.26224.2822487520472783854.stgit@devbox Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 40b53b771806b1770837169cd32d1bf167fbccaf Author: Masami Hiramatsu Date: Wed Apr 25 21:21:55 2018 +0900 tracing: probeevent: Add array type support Add array type support for probe events. This allows user to get arraied types from memory address. The array type syntax is TYPE[N] Where TYPE is one of types (u8/16/32/64,s8/16/32/64, x8/16/32/64, symbol, string) and N is a fixed value less than 64. The string array type is a bit different from other types. For other base types, [1] is equal to (e.g. +0(%di):x32[1] is same as +0(%di):x32.) But string[1] is not equal to string. The string type itself represents "char array", but string array type represents "char * array". So, for example, +0(%di):string[1] is equal to +0(+0(%di)):string. Link: http://lkml.kernel.org/r/152465891533.26224.6150658225601339931.stgit@devbox Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 60c2e0cebfd01bd1bc5e8843f063264148d6b2bb Author: Masami Hiramatsu Date: Wed Apr 25 21:20:28 2018 +0900 tracing: probeevent: Add symbol type Add "symbol" type to probeevent, which is an alias of u32 or u64 (depends on BITS_PER_LONG). This shows the result value in symbol+offset style. This type is only available with kprobe events. Link: http://lkml.kernel.org/r/152465882860.26224.14779072294412467338.stgit@devbox Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 9b960a38835fcaf977f20dcc34ce9e54ff9563bd Author: Masami Hiramatsu Date: Wed Apr 25 21:19:59 2018 +0900 tracing: probeevent: Unify fetch_insn processing common part Unify the fetch_insn bottom process (from stage 2: dereference indirect data) from kprobe and uprobe events, since those are mostly same. Link: http://lkml.kernel.org/r/152465879965.26224.8547240824606804815.stgit@devbox Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 0a46c8549f8c775ed6afac57a8b9fd7c4b4d156f Author: Masami Hiramatsu Date: Wed Apr 25 21:19:30 2018 +0900 tracing: probeevent: Append traceprobe_ for exported function Append traceprobe_ for exported function set_print_fmt() as same as other functions. Link: http://lkml.kernel.org/r/152465877071.26224.11143125027282999726.stgit@devbox Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 9178412ddf5a98feba0ad3986111c5ad10eb9e59 Author: Masami Hiramatsu Date: Wed Apr 25 21:19:01 2018 +0900 tracing: probeevent: Return consumed bytes of dynamic area Cleanup string fetching routine so that returns the consumed bytes of dynamic area and store the string information as data_loc format instead of data_rloc. This simplifies the fetcharg loop. Link: http://lkml.kernel.org/r/152465874163.26224.12125143907501289031.stgit@devbox Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit f451bc89d8357f010304564728ba7c5d38a1d4d5 Author: Masami Hiramatsu Date: Wed Apr 25 21:18:32 2018 +0900 tracing: probeevent: Unify fetch type tables Unify {k,u}probe_fetch_type_table to probe_fetch_type_table because the main difference of those type tables (fetcharg methods) are gone. Now we can consolidate it. Link: http://lkml.kernel.org/r/152465871274.26224.13999436317830479698.stgit@devbox Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 533059281ee594f9fbb9e58042aaec77083ef251 Author: Masami Hiramatsu Date: Wed Apr 25 21:18:03 2018 +0900 tracing: probeevent: Introduce new argument fetching code Replace {k,u}probe event argument fetching framework with switch-case based. Currently that is implemented with structures, macros and chain of function-pointers, which is more complicated than necessary and may get a performance penalty by retpoline. This simplify that with an array of "fetch_insn" (opcode and oprands), and make process_fetch_insn() just interprets it. No function pointers are used. Link: http://lkml.kernel.org/r/152465868340.26224.2551120475197839464.stgit@devbox Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 7bfbc63eda08b8158c040d6882c807f62b0750bb Author: Masami Hiramatsu Date: Wed Apr 25 21:17:34 2018 +0900 tracing: probeevent: Remove NOKPROBE_SYMBOL from print functions Remove unneeded NOKPROBE_SYMBOL from print functions since the print functions are only used when printing out the trace data, and not from kprobe handler. Link: http://lkml.kernel.org/r/152465865422.26224.10111548170594014954.stgit@devbox Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit eeb07b0615004bce145015b704de85fd3ac6cce0 Author: Masami Hiramatsu Date: Wed Apr 25 21:17:05 2018 +0900 tracing: probeevent: Cleanup argument field definition Cleanup event argument definition code in one place for maintenancability. Link: http://lkml.kernel.org/r/152465862529.26224.9068605421476018902.stgit@devbox Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 56de763052792669d61d79a087611da9a7f04d4e Author: Masami Hiramatsu Date: Wed Apr 25 21:16:36 2018 +0900 tracing: probeevent: Cleanup print argument functions Cleanup the print-argument function to decouple it into print-name and print-value, so that it can support more flexible expression, like array type. Link: http://lkml.kernel.org/r/152465859635.26224.13452846788717102315.stgit@devbox Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit a6ca88b241d5e929e6e60b12ad8cd288f0ffa256 Author: Song Liu Date: Mon Oct 1 22:36:36 2018 -0700 trace_uprobe: support reference counter in fd-based uprobe This patch enables uprobes with reference counter in fd-based uprobe. Highest 32 bits of perf_event_attr.config is used to stored offset of the reference count (semaphore). Format information in /sys/bus/event_source/devices/uprobe/format/ is updated to reflect this new feature. Link: http://lkml.kernel.org/r/20181002053636.1896903-1-songliubraving@fb.com Cc: Oleg Nesterov Acked-by: Peter Zijlstra (Intel) Reviewed-and-tested-by: Ravi Bangoria Signed-off-by: Song Liu Signed-off-by: Steven Rostedt (VMware) commit b51d577a51296fc6967fbab5d857986617c4f276 Author: Nathan Chancellor Date: Thu Sep 20 13:10:02 2018 -0700 scsi: mpt3sas: Remove unnecessary parentheses and simplify null checks Clang warns when multiple pairs of parentheses are used for a single conditional statement. drivers/scsi/mpt3sas/mpt3sas_base.c:535:11: warning: equality comparison with extraneous parentheses [-Wparentheses-equality] if ((ioc == NULL)) ~~~~^~~~~~~ drivers/scsi/mpt3sas/mpt3sas_base.c:535:11: note: remove extraneous parentheses around the comparison to silence this warning if ((ioc == NULL)) ~ ^ ~ drivers/scsi/mpt3sas/mpt3sas_base.c:535:11: note: use '=' to turn this equality comparison into an assignment if ((ioc == NULL)) ^~ = drivers/scsi/mpt3sas/mpt3sas_base.c:539:12: warning: equality comparison with extraneous parentheses [-Wparentheses-equality] if ((pdev == NULL)) ~~~~~^~~~~~~ drivers/scsi/mpt3sas/mpt3sas_base.c:539:12: note: remove extraneous parentheses around the comparison to silence this warning if ((pdev == NULL)) ~ ^ ~ drivers/scsi/mpt3sas/mpt3sas_base.c:539:12: note: use '=' to turn this equality comparison into an assignment if ((pdev == NULL)) ^~ = 2 warnings generated. Remove them and while we're at it, simplify the NULL checks as '!var' is used more than 'var == NULL'. Signed-off-by: Nathan Chancellor Signed-off-by: Martin K. Petersen commit c39a4d755393936d406516e32faf925f167bcfe5 Author: Souptick Joarder Date: Tue Oct 2 11:18:04 2018 +0530 scsi: mpt3sas: Use dma_pool_zalloc Replaced dma_pool_alloc + memset with dma_pool_zalloc. Signed-off-by: Brajeswar Ghosh Signed-off-by: Souptick Joarder Acked-by: Suganath Prabu Signed-off-by: Martin K. Petersen commit 16e8b9631a28f2707eda59963e2ffe6f80eecd48 Author: Joe Perches Date: Mon Sep 17 08:01:14 2018 -0700 scsi: mpt3sas: Remove unused macro MPT3SAS_FMT All the uses have been removed, delete the macro. Signed-off-by: Joe Perches Acked-by: Suganath Prabu Signed-off-by: Martin K. Petersen commit 1f95a47eec979e4f3a2baf73ff411ae9c3a60ac5 Author: Joe Perches Date: Mon Sep 17 08:01:13 2018 -0700 scsi: mpt3sas: Convert logging uses with MPT3SAS_FMT without logging levels Convert these uses to ioc_ where appropriate. Signed-off-by: Joe Perches Acked-by: Suganath Prabu Signed-off-by: Martin K. Petersen commit 506f7f6b265c4e2961851d08dc4ab6a008f2bc01 Author: Joe Perches Date: Mon Sep 17 08:01:12 2018 -0700 scsi: mpt3sas: Remove KERN_WARNING from panic uses Remove the logging level as panic calls stop the machine and should always be emitted regardless of requested logging level. These existing panic uses are perhaps inappropriate. Miscellanea: o Coalesce formats and convert MPT3SAS_FMT to "%s: " to improve clarity Signed-off-by: Joe Perches Acked-by: Suganath Prabu Signed-off-by: Martin K. Petersen commit fc7d510ec4c8ff8801cb4ff5ba1a9841d80edb7c Author: Joe Perches Date: Mon Sep 17 08:01:11 2018 -0700 scsi: mpt3sas: Convert logging uses with MPT3SAS_FMT and reply_q_name to %s: Convert the existing 2 uses to make the format and arguments matching more obvious. Miscellanea: o Move the word "enabled" into the format to trivially reduce object size o Remove unnecessary parentheses Signed-off-by: Joe Perches Acked-by: Suganath Prabu Signed-off-by: Martin K. Petersen commit 4dc74b2eb9ea780a1a97d603e9c0baa0cd6ccf8c Author: Joe Perches Date: Mon Sep 17 08:01:10 2018 -0700 scsi: mpt3sas: Convert mlsleading uses of pr_ with MPT3SAS_FMT These have misordered uses of __func__ and ioc->name that could mismatch MPT3SAS_FMT and "%s: ". Convert them to ioc_. Signed-off-by: Joe Perches Acked-by: Suganath Prabu Signed-off-by: Martin K. Petersen commit 919d8a3f3fef9910fda7e0549004cbd4243cf744 Author: Joe Perches Date: Mon Sep 17 08:01:09 2018 -0700 scsi: mpt3sas: Convert uses of pr_ with MPT3SAS_FMT to ioc_ Use a more common logging style. Done using the perl script below and some typing $ git grep --name-only -w MPT3SAS_FMT -- "*.c" | \ xargs perl -i -e 'local $/; while (<>) { s/\bpr_(info|err|notice|warn)\s*\(\s*MPT3SAS_FMT\s*("[^"]+"(?:\s*\\?\s*"[^"]+"\s*){0,5}\s*),\s*ioc->name\s*/ioc_\1(ioc, \2/g; print;}' Miscellanea for these conversions: o Coalesce formats o Realign arguments o Remove unnecessary parentheses o Use casts to u64 instead of unsigned long long where appropriate o Convert broken pr_info uses to pr_cont o Fix broken format string concatenation with line continuations and excess whitespace Signed-off-by: Joe Perches Acked-by: Suganath Prabu Signed-off-by: Martin K. Petersen commit 645a20c6821cd1ab58af8a1f99659e619c216efd Author: Joe Perches Date: Mon Sep 17 08:01:08 2018 -0700 scsi: mpt3sas: Add ioc_ logging macros These macros can help identify specific logging uses and eventually perhaps reduce object sizes. Signed-off-by: Joe Perches Acked-by: Suganath Prabu Signed-off-by: Martin K. Petersen commit 3bf31de7120670c96e87d8fa909efbf3734c1ae5 Author: Matthew R. Ochs Date: Mon Oct 1 11:26:10 2018 -0500 scsi: MAINTAINERS: Fix typo in cxlflash stanza The uapi header file listed in the cxlflash stanza has a typo. Removed the trailing 's' from the filename. Reported-by: Joe Perches Signed-off-by: Matthew R. Ochs Acked-by: Uma Krishnan Signed-off-by: Martin K. Petersen commit 66c9e573ea75b63602cf4d3e1fb52fad2dd29be0 Merge: 7e6191d4360a 84dacb9cad28 Author: Dave Airlie Date: Thu Oct 11 11:44:01 2018 +1000 Merge branch 'mediatek-drm-next-4.20' of https://github.com/ckhu-mediatek/linux.git-tags into drm-next This include hdmi output support for mt2701 and mt7623. Signed-off-by: Dave Airlie From: CK Hu Link: https://patchwork.freedesktop.org/patch/msgid/1538616148.28906.1.camel@mtksdaap41 commit a36700589b85443e28170be59fa11c8a104130a5 Author: Eric W. Biederman Date: Wed Oct 10 20:29:44 2018 -0500 signal: Guard against negative signal numbers in copy_siginfo_from_user32 While fixing an out of bounds array access in known_siginfo_layout reported by the kernel test robot it became apparent that the same bug exists in siginfo_layout and affects copy_siginfo_from_user32. The straight forward fix that makes guards against making this mistake in the future and should keep the code size small is to just take an unsigned signal number instead of a signed signal number, as I did to fix known_siginfo_layout. Cc: stable@vger.kernel.org Fixes: cc731525f26a ("signal: Remove kernel interal si_code magic") Signed-off-by: "Eric W. Biederman" commit b2a2ab527d6de02fbf2331bae4a299d58ab52266 Author: Eric W. Biederman Date: Wed Oct 10 20:11:25 2018 -0500 signal: Guard against negative signal numbers in copy_siginfo_from_user The bounds checks in known_siginfo_layout only guards against positive numbers that are too large, large negative can slip through and can cause out of bounds accesses. Ordinarily this is not a concern because early in signal processing the signal number is filtered with valid_signal which ensures it is a small positive signal number, but copy_siginfo_from_user is called before this check is performed. [ 73.031126] BUG: unable to handle kernel paging request at ffffffff6281bcb6 [ 73.032038] PGD 3014067 P4D 3014067 PUD 0 [ 73.032565] Oops: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC PTI [ 73.033287] CPU: 0 PID: 732 Comm: trinity-c3 Tainted: G W T 4.19.0-rc1-00077-g4ce5f9c #1 [ 73.034423] RIP: 0010:copy_siginfo_from_user+0x4d/0xd0 [ 73.034908] Code: 00 8b 53 08 81 fa 80 00 00 00 0f 84 90 00 00 00 85 d2 7e 2d 48 63 0b 83 f9 1f 7f 1c 8d 71 ff bf d8 04 01 50 48 0f a3 f7 73 0e <0f> b6 8c 09 20 bb 81 82 39 ca 7f 15 eb 68 31 c0 83 fa 06 7f 0c eb [ 73.036665] RSP: 0018:ffff88001b8f7e20 EFLAGS: 00010297 [ 73.037160] RAX: 0000000000000000 RBX: ffff88001b8f7e90 RCX: fffffffff00000cb [ 73.037865] RDX: 0000000000000001 RSI: 00000000f00000ca RDI: 00000000500104d8 [ 73.038546] RBP: ffff88001b8f7e80 R08: 0000000000000000 R09: 0000000000000000 [ 73.039201] R10: 0000000000000001 R11: 0000000000000000 R12: 0000000000000008 [ 73.039874] R13: 00000000000002dc R14: 0000000000000000 R15: 0000000000000000 [ 73.040613] FS: 000000000104a880(0000) GS:ffff88001f000000(0000) knlGS:0000000000000000 [ 73.041649] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 73.042405] CR2: ffffffff6281bcb6 CR3: 000000001cb52003 CR4: 00000000001606b0 [ 73.043351] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 73.044286] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000600 [ 73.045221] Call Trace: [ 73.045556] __x64_sys_rt_tgsigqueueinfo+0x34/0xa0 [ 73.046199] do_syscall_64+0x1a4/0x390 [ 73.046708] ? vtime_user_enter+0x61/0x80 [ 73.047242] ? __context_tracking_enter+0x4e/0x60 [ 73.047714] ? __context_tracking_enter+0x4e/0x60 [ 73.048278] entry_SYSCALL_64_after_hwframe+0x44/0xa9 Therefore fix known_siginfo_layout to take an unsigned signal number instead of a signed signal number. All valid signal numbers are small positive numbers so they will not be affected, but invalid negative signal numbers will now become large positive signal numbers and will not be used as indices into the sig_sicodes array. Making the signal number unsigned makes it difficult for similar mistakes to happen in the future. Fixes: 4ce5f9c9e754 ("signal: Use a smaller struct siginfo in the kernel") Inspired-by: Sean Christopherson Reported-by: kernel test robot Signed-off-by: "Eric W. Biederman" commit 779d986d60de51aabc3bec385f92b832089c5c01 Author: Feras Daoud Date: Thu Sep 6 14:56:56 2018 +0300 net/mlx5e: Do not ignore netdevice TX/RX queues number The current design of mlx5e driver ignores the netdevice TX/RX queues number for netdevices that RDMA IPoIB ULP creates. Instead, the queue number is initialized to the maximum number that mlx5 thinks best for performance. As a result, ULP drivers that choose to create a netdevice with queue number that is less than the maximum channels mlx5 creates, will get a memory corruption. This fix changes the mlx5e netdev logic to respect ULP netdevices TX/RX queue number and use it when creating resources instead of the maximum channel number. Fixes: cd565b4b51e5 ("IB/IPoIB: Support acceleration options callbacks") Signed-off-by: Feras Daoud Signed-off-by: Saeed Mahameed commit cdeef2b1528b6faa7a7e60de7a56c48bc6838ae6 Author: Saeed Mahameed Date: Tue Sep 11 23:45:33 2018 -0700 net/mlx5e: Use non-delayed work for update stats Convert mlx5e update stats work to a normal work structure, since it is never used delayed. Add a helper function to queue update stats work on demand which checks for some conditions and reduce code duplication to have a better abstraction. Fixes: ed56c5193ad8 ("net/mlx5e: Update NIC HW stats on demand only") Signed-off-by: Saeed Mahameed commit 519a0bf5b20c370fb05ee05ea6c00e1377c13229 Author: Saeed Mahameed Date: Wed Sep 12 15:02:05 2018 -0700 net/mlx5e: Initialize all netdev common structures in one place Move all mlx5e generic structures initializations to mlx5e_netdev_init. The common structure new initializer function will be used to initialize mlx5 context for netlink created netdevs such as IPoIB mlx5 accelerated child netdevs. Fixes: cd565b4b51e5 ("IB/IPoIB: Support acceleration options callbacks") Signed-off-by: Saeed Mahameed Signed-off-by: Feras Daoud commit 303211b44ce3faa4456f78ed725d80e0212aa842 Author: Feras Daoud Date: Tue Oct 9 13:06:02 2018 +0300 net/mlx5e: Always initialize update stats delayed work mlx5e_detach_netdev cancels update_stats work which was not initialized in ipoib netdevice profile, as a result, the following assert occurs: ODEBUG: assert_init not available (active state 0) object type: timer_list hint:(null) This change moves the update stats work to be initialized for all mlx5e netdevices. Fixes: cd565b4b51e5 ("IB/IPoIB: Support acceleration options callbacks") Signed-off-by: Feras Daoud Signed-off-by: Saeed Mahameed commit 182570b26223deea0eaf09ba384c79a29d0a328f Author: Feras Daoud Date: Tue Oct 2 09:54:59 2018 +0300 net/mlx5e: Gather common netdev init/cleanup functionality in one place Introduce a helper init/cleanup function that initializes mlx5e generic netdev private structure, and use them from all profiles init/cleanup callbacks. This patch will also be helpful to initialize/cleanup netdevs that are not created by mlx5 driver, e.g: accelerated ipoib child netdevs. Fixes: 26e59d8077a3 ("net/mlx5e: Implement mlx5e interface attach/detach callbacks") Signed-off-by: Feras Daoud Signed-off-by: Saeed Mahameed commit 5d6b0cb3369df425de75c94c98eb3f1a86659022 Author: Denis Drozdov Date: Tue Aug 14 14:22:35 2018 +0300 RDMA/netdev: Fix netlink support in IPoIB IPoIB netlink support was broken by the below commit since integrating the rdma_netdev support relies on an allocation flow for netdevs that was controlled by the ipoib driver while netdev's rtnl_newlink implementation assumes that the netdev will be allocated by netlink. Such situation leads to crash in __ipoib_device_add, once trying to reuse netlink device. This patch fixes the kernel oops for both mlx4 and mlx5 devices triggered by the following command: Fixes: cd565b4b51e5 ("IB/IPoIB: Support acceleration options callbacks") Signed-off-by: Denis Drozdov Signed-off-by: Jason Gunthorpe Signed-off-by: Feras Daoud Signed-off-by: Saeed Mahameed commit f6a8a19bb11b46d60250ddc4e3e1ba6aa166f488 Author: Denis Drozdov Date: Tue Aug 14 14:08:51 2018 +0300 RDMA/netdev: Hoist alloc_netdev_mqs out of the driver netdev has several interfaces that expect to call alloc_netdev_mqs from the core code, with the driver only providing the arguments. This is incompatible with the rdma_netdev interface that returns the netdev directly. Thus re-organize the API used by ipoib so that the verbs core code calls alloc_netdev_mqs for the driver. This is done by allowing the drivers to provide the allocation parameters via a 'get_params' callback and then initializing an allocated netdev as a second step. Fixes: cd565b4b51e5 ("IB/IPoIB: Support acceleration options callbacks") Signed-off-by: Jason Gunthorpe Signed-off-by: Denis Drozdov Signed-off-by: Saeed Mahameed commit 291e2ba9054e96b33544d67deee252b3a370ebda Author: Linus Walleij Date: Wed Oct 10 17:12:31 2018 -0700 Input: Fix DIR-685 touchkeys MAINTAINERS entry The path was incomplete, fix it. Reported-by: Joe Perches Signed-off-by: Linus Walleij Signed-off-by: Dmitry Torokhov commit 7e6191d4360a2df6cf2a2613dcb79680cb943df8 Merge: 62e681f7dcab 74a07c0a59fa Author: Dave Airlie Date: Thu Oct 11 10:23:11 2018 +1000 Merge branch 'linux-4.20' of git://github.com/skeggsb/linux into drm-next Just initial HDMI 2.0 support, and a bunch of other cleanups. Signed-off-by: Dave Airlie From: Ben Skeggs Link: https://patchwork.freedesktop.org/patch/msgid/CABDvA=mgEm9JxP7AX7Sff-AEs7a75M4SqwFHmLPZhJojm4k=OA@mail.gmail.com commit 00f73f97527f6ea8b4bc2bc63c44299bcc2f5cab Author: Stephen Boyd Date: Wed Oct 10 15:50:50 2018 -0700 Input: elants_i2c - use DMA safe i2c when possible To avoid bounce buffer when an i2c controller decides to use DMA for a transaction, let's make out buffer that we use for reads DMA-safe and let the master know that DMAing into it is safe. Signed-off-by: Stephen Boyd Signed-off-by: Dmitry Torokhov commit 74a07c0a59fa372b069d879971ba4d9e341979cf Author: Gustavo A. R. Silva Date: Tue Jul 24 08:27:19 2018 -0500 drm/nouveau/secboot/acr: fix memory leak In case memory resources for *bl_desc* were allocated, release them before return. Addresses-Coverity-ID: 1472021 ("Resource leak") Fixes: 0d466901552a ("drm/nouveau/secboot/acr: Remove VLA usage") Signed-off-by: Gustavo A. R. Silva Reviewed-by: John Hubbard Reviewed-by: Kees Cook Signed-off-by: Ben Skeggs commit 9340d77f5327ea673a7f95f58139123d7a278243 Author: Ilia Mirkin Date: Mon Sep 3 20:57:37 2018 -0400 drm/nouveau/disp: take sink support into account for exposing 594mhz Scrambling is required for supporting any mode over 340MHz. If it's not supported, reject any modes that would require it. Signed-off-by: Ilia Mirkin Signed-off-by: Ben Skeggs commit 7a406f8a62ff0a3647f96f0cfdb518a99a01bf3f Author: Ilia Mirkin Date: Mon Sep 3 20:57:36 2018 -0400 drm/nouveau/disp: add support for setting scdc parameters for high modes When SCDC is supported, make sure that we configure the GPU and monitor to the same parameters. Signed-off-by: Ilia Mirkin Signed-off-by: Ben Skeggs commit a971558c298755d2c07bc5508c65d689471763c8 Author: Ilia Mirkin Date: Mon Sep 3 20:57:35 2018 -0400 drm/nouveau/disp: keep track of high-speed state, program into clock The register programmed by the clock method needs to contain a different setting for the link speed as well as special divider settings. Signed-off-by: Ilia Mirkin Signed-off-by: Ben Skeggs commit 4834e05049c9c807c38d0727ab422898fdfe2996 Author: Ilia Mirkin Date: Mon Sep 3 20:57:34 2018 -0400 drm/nouveau/disp/gm200-: add scdc parameter setter Signed-off-by: Ilia Mirkin Signed-off-by: Ben Skeggs commit 4126b99e744b7a29746e201e2be6644d2edf3c56 Author: Ilia Mirkin Date: Mon Sep 3 20:57:33 2018 -0400 drm/nouveau/disp: add a way to configure scrambling/tmds for hdmi 2.0 High pixel clocks are required to use a 40 TMDS divider instead of 10, and even low ones may optionally use scrambling depending on device support. Signed-off-by: Ilia Mirkin Signed-off-by: Ben Skeggs commit cfea88a4d86632f28cf80be97079f131645b7869 Author: Lyude Paul Date: Wed Aug 22 21:40:07 2018 -0400 drm/nouveau: Start using new drm_dev initialization helpers Per the documentation in drm_get_pci_dev(), this function is deprecated and shouldn't be used anymore. As it turns out, we're going to need to stop using drm_get_pci_dev() anyway in order to allow us to turn off the card before full system shutdowns, otherwise we'll hit race conditions with userspace while trying to tear down the card on shutdown. So, start using drm_dev_get() and drm_dev_put(), and just turn our load/unload callbacks into open coded init/fini() functions. Signed-off-by: Lyude Paul Cc: Karol Herbst Signed-off-by: Ben Skeggs commit c4cee69a4497d9c6ad8868d63568b30e50cac9e9 Author: Lyude Paul Date: Wed Aug 22 21:40:06 2018 -0400 drm/nouveau: Fix potential memory leak in nouveau_drm_load() We forget to free drm in all instances of failure, and additionally also forget to destroy the master client if the other client fails initialization. Signed-off-by: Lyude Paul Cc: Karol Herbst Signed-off-by: Ben Skeggs commit e15e4c13e5b77e8b8e8c5e6d23831b1180249788 Author: Lyude Paul Date: Thu Sep 6 17:43:26 2018 -0400 drm/nouveau: Refactor nvXX_backlight_init() There's literally no difference between any of the backlight init functions besides the backlight properties they set and the backlight callbacks that they set, so move all of the duplicated backlight init code out of there and into nouveau_backlight_init(). This gets rid of a lot of copy pasta! Changes since v1: - Some of the pre-refactor callbacks were storing nv_encoder in callback data for the backlight devices that they registered, as opposed to nouveau_drm. This got missed and caused some bugs that didn't originally appear on my setup (NULL kernel derefs) for some reason. So, fix this by finding the nouveau_encoder in nouveau_backlight_init(), and using that as the callback data for all gens instead even if they don't care about the encoder. Signed-off-by: Lyude Paul Cc: Jeffery Miller Cc: Karol Herbst Signed-off-by: Ben Skeggs commit f76e174bd30a8a43f5c50a33f2988f84ee5d57de Author: Lyude Paul Date: Thu Sep 6 17:43:25 2018 -0400 drm/nouveau: Cleanup indenting in nouveau_backlight.c Still no functional changes. Signed-off-by: Lyude Paul Reviewed-by: Karol Herbst Signed-off-by: Ben Skeggs commit a4e05f415e2fb22b1804c86bbf84cc1d5d29b9f1 Author: Lyude Paul Date: Thu Sep 6 17:43:24 2018 -0400 drm/nouveau/drm/nouveau: s/nouveau_backlight_exit/nouveau_backlight_fini/ More consistent with the rest of the codebase, no functional changes here. Signed-off-by: Lyude Paul Reviewed-by: Karol Herbst Signed-off-by: Ben Skeggs commit 6d757753cef8d523342fe544299068d30b5be490 Author: Lyude Paul Date: Thu Sep 6 17:43:23 2018 -0400 drm/nouveau: Move backlight device into nouveau_connector Currently module unloading is broken in nouveau due to a rather annoying race condition resulting from nouveau_backlight.c having gone a bit stale over time: [ 1960.791143] ================================================================== [ 1960.791394] BUG: KASAN: use-after-free in nouveau_backlight_exit+0x112/0x150 [nouveau] [ 1960.791460] Read of size 4 at addr ffff88075accf350 by task zsh/11185 [ 1960.791521] [ 1960.791545] CPU: 7 PID: 11185 Comm: zsh Kdump: loaded Tainted: G O 4.18.0Lyude-Test+ #4 [ 1960.791580] Hardware name: LENOVO 20EQS64N0B/20EQS64N0B, BIOS N1EET79W (1.52 ) 07/13/2018 [ 1960.791628] Call Trace: [ 1960.791680] dump_stack+0xa4/0xfd [ 1960.791721] print_address_description+0x71/0x239 [ 1960.791833] ? nouveau_backlight_exit+0x112/0x150 [nouveau] [ 1960.791877] kasan_report.cold.6+0x242/0x2fe [ 1960.791919] __asan_report_load4_noabort+0x19/0x20 [ 1960.792012] nouveau_backlight_exit+0x112/0x150 [nouveau] [ 1960.792081] nouveau_display_destroy+0x76/0x150 [nouveau] [ 1960.792150] nouveau_drm_device_fini+0xb7/0x190 [nouveau] [ 1960.792265] nouveau_drm_device_remove+0x14b/0x1d0 [nouveau] [ 1960.792347] ? nouveau_cli_work_queue+0x2e0/0x2e0 [nouveau] [ 1960.792378] ? trace_hardirqs_on_caller+0x38b/0x570 [ 1960.792406] ? trace_hardirqs_on+0xd/0x10 [ 1960.792472] nouveau_drm_remove+0x37/0x50 [nouveau] [ 1960.792502] pci_device_remove+0x112/0x2d0 [ 1960.792530] ? pcibios_free_irq+0x10/0x10 [ 1960.792558] ? kasan_check_write+0x14/0x20 [ 1960.792587] device_release_driver_internal+0x35c/0x650 [ 1960.792617] device_release_driver+0x12/0x20 [ 1960.792643] pci_stop_bus_device+0x172/0x1e0 [ 1960.792671] pci_stop_and_remove_bus_device_locked+0x1a/0x30 [ 1960.792715] remove_store+0xcb/0xe0 [ 1960.792753] ? sriov_numvfs_store+0x2e0/0x2e0 [ 1960.792779] ? __lock_is_held+0xb5/0x140 [ 1960.792808] ? component_add+0x530/0x530 [ 1960.792834] dev_attr_store+0x3f/0x70 [ 1960.792859] ? sysfs_file_ops+0x11d/0x170 [ 1960.792885] sysfs_kf_write+0x104/0x150 [ 1960.792915] ? sysfs_file_ops+0x170/0x170 [ 1960.792940] kernfs_fop_write+0x24f/0x400 [ 1960.792978] ? __lock_acquire+0x6ea/0x47f0 [ 1960.793021] __vfs_write+0xeb/0x760 [ 1960.793048] ? kernel_read+0x130/0x130 [ 1960.793076] ? __lock_is_held+0xb5/0x140 [ 1960.793107] ? rcu_read_lock_sched_held+0xdd/0x110 [ 1960.793135] ? rcu_sync_lockdep_assert+0x78/0xb0 [ 1960.793162] ? __sb_start_write+0x183/0x220 [ 1960.793189] vfs_write+0x14d/0x4a0 [ 1960.793229] ksys_write+0xd2/0x1b0 [ 1960.793255] ? __ia32_sys_read+0xb0/0xb0 [ 1960.793298] ? fput+0x1d/0x120 [ 1960.793324] ? filp_close+0xf3/0x130 [ 1960.793349] ? entry_SYSCALL_64_after_hwframe+0x59/0xbe [ 1960.793380] __x64_sys_write+0x73/0xb0 [ 1960.793407] do_syscall_64+0xaa/0x400 [ 1960.793433] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 1960.793460] RIP: 0033:0x7f59df433164 [ 1960.793486] Code: 89 02 48 c7 c0 ff ff ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 48 8d 05 81 38 2d 00 8b 00 85 c0 75 13 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 54 c3 0f 1f 00 41 54 49 89 d4 55 48 89 f5 53 [ 1960.793541] RSP: 002b:00007ffd70ee2fb8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 [ 1960.793576] RAX: ffffffffffffffda RBX: 0000000000000002 RCX: 00007f59df433164 [ 1960.793620] RDX: 0000000000000002 RSI: 00005578088640c0 RDI: 0000000000000001 [ 1960.793665] RBP: 00005578088640c0 R08: 00007f59df7038c0 R09: 00007f59e0995b80 [ 1960.793696] R10: 000000000000000a R11: 0000000000000246 R12: 00007f59df702760 [ 1960.793730] R13: 0000000000000002 R14: 00007f59df6fd760 R15: 0000000000000002 [ 1960.793768] [ 1960.793790] Allocated by task 11167: [ 1960.793816] save_stack+0x43/0xd0 [ 1960.793841] kasan_kmalloc+0xc4/0xe0 [ 1960.793880] kasan_slab_alloc+0x11/0x20 [ 1960.793905] kmem_cache_alloc+0xd7/0x270 [ 1960.793944] getname_flags+0xbd/0x520 [ 1960.793969] user_path_at_empty+0x23/0x50 [ 1960.793994] do_faccessat+0x1fc/0x5d0 [ 1960.794018] __x64_sys_access+0x59/0x80 [ 1960.794043] do_syscall_64+0xaa/0x400 [ 1960.794067] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 1960.794093] [ 1960.794127] Freed by task 11167: [ 1960.794152] save_stack+0x43/0xd0 [ 1960.794190] __kasan_slab_free+0x139/0x190 [ 1960.794215] kasan_slab_free+0xe/0x10 [ 1960.794239] kmem_cache_free+0xcb/0x2c0 [ 1960.794264] putname+0xad/0xe0 [ 1960.794287] filename_lookup.part.59+0x1f1/0x360 [ 1960.794313] user_path_at_empty+0x3e/0x50 [ 1960.794338] do_faccessat+0x1fc/0x5d0 [ 1960.794362] __x64_sys_access+0x59/0x80 [ 1960.794393] do_syscall_64+0xaa/0x400 [ 1960.794421] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 1960.794461] [ 1960.794483] The buggy address belongs to the object at ffff88075acceac0 [ 1960.794483] which belongs to the cache names_cache of size 4096 [ 1960.794540] The buggy address is located 2192 bytes inside of [ 1960.794540] 4096-byte region [ffff88075acceac0, ffff88075accfac0) [ 1960.794581] The buggy address belongs to the page: [ 1960.794609] page:ffffea001d6b3200 count:1 mapcount:0 mapping:ffff880778e4b1c0 index:0x0 compound_mapcount: 0 [ 1960.794651] flags: 0x8000000000008100(slab|head) [ 1960.794679] raw: 8000000000008100 ffffea001d39e808 ffffea001d39ea08 ffff880778e4b1c0 [ 1960.794739] raw: 0000000000000000 0000000000070007 00000001ffffffff 0000000000000000 [ 1960.794785] page dumped because: kasan: bad access detected [ 1960.794813] [ 1960.794834] Memory state around the buggy address: [ 1960.794861] ffff88075accf200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 1960.794894] ffff88075accf280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 1960.794925] >ffff88075accf300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 1960.794956] ^ [ 1960.794985] ffff88075accf380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 1960.795017] ffff88075accf400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 1960.795061] ================================================================== [ 1960.795106] Disabling lock debugging due to kernel taint [ 1960.795131] ------------[ cut here ]------------ [ 1960.795148] ida_remove called for id=1802201963 which is not allocated. [ 1960.795193] WARNING: CPU: 7 PID: 11185 at lib/idr.c:521 ida_remove+0x184/0x210 [ 1960.795213] Modules linked in: nouveau(O) mxm_wmi ttm i2c_algo_bit drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops drm joydev vfat fat intel_rapl x86_pkg_temp_thermal coretemp crc32_pclmul iTCO_wdt psmouse wmi_bmof mei_me tpm_tis mei tpm_tis_core tpm i2c_i801 thinkpad_acpi pcc_cpufreq crc32c_intel serio_raw xhci_pci xhci_hcd wmi video i2c_dev i2c_core [ 1960.795305] CPU: 7 PID: 11185 Comm: zsh Kdump: loaded Tainted: G B O 4.18.0Lyude-Test+ #4 [ 1960.795330] Hardware name: LENOVO 20EQS64N0B/20EQS64N0B, BIOS N1EET79W (1.52 ) 07/13/2018 [ 1960.795352] RIP: 0010:ida_remove+0x184/0x210 [ 1960.795370] Code: 4c 89 f7 e8 ae c8 00 00 eb 22 41 83 c4 02 4c 89 e8 41 83 fc 3f 0f 86 64 ff ff ff 44 89 fe 48 c7 c7 20 94 1e 83 e8 54 ed 81 fe <0f> 0b 48 b8 00 00 00 00 00 fc ff df 48 01 c3 c7 03 00 00 00 00 c7 [ 1960.795402] RSP: 0018:ffff88074d4df7b8 EFLAGS: 00010082 [ 1960.795421] RAX: 0000000000000000 RBX: 1ffff100e9a9befa RCX: ffffffff81479975 [ 1960.795440] RDX: 0000000000000000 RSI: 0000000000000008 RDI: ffff88077c1de690 [ 1960.795460] RBP: ffff88074d4df878 R08: ffffed00ef83bcd3 R09: ffffed00ef83bcd2 [ 1960.795479] R10: ffffed00ef83bcd2 R11: ffff88077c1de697 R12: 000000000000036b [ 1960.795498] R13: 0000000000000202 R14: ffffffffa0aa7fa0 R15: 000000006b6b6b6b [ 1960.795518] FS: 00007f59e0995b80(0000) GS:ffff88077c1c0000(0000) knlGS:0000000000000000 [ 1960.795553] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 1960.795571] CR2: 00007f59e09a2010 CR3: 00000004a1a70005 CR4: 00000000003606e0 [ 1960.795596] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 1960.795629] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 1960.795649] Call Trace: [ 1960.795667] ? ida_destroy+0x1d0/0x1d0 [ 1960.795686] ? kasan_check_write+0x14/0x20 [ 1960.795704] ? do_raw_spin_lock+0xc2/0x1c0 [ 1960.795724] ida_simple_remove+0x26/0x40 [ 1960.795794] nouveau_backlight_exit+0x9d/0x150 [nouveau] [ 1960.795867] nouveau_display_destroy+0x76/0x150 [nouveau] [ 1960.795930] nouveau_drm_device_fini+0xb7/0x190 [nouveau] [ 1960.795989] nouveau_drm_device_remove+0x14b/0x1d0 [nouveau] [ 1960.796047] ? nouveau_cli_work_queue+0x2e0/0x2e0 [nouveau] [ 1960.796067] ? trace_hardirqs_on_caller+0x38b/0x570 [ 1960.796089] ? trace_hardirqs_on+0xd/0x10 [ 1960.796146] nouveau_drm_remove+0x37/0x50 [nouveau] [ 1960.796167] pci_device_remove+0x112/0x2d0 [ 1960.796186] ? pcibios_free_irq+0x10/0x10 [ 1960.796218] ? kasan_check_write+0x14/0x20 [ 1960.796237] device_release_driver_internal+0x35c/0x650 [ 1960.796257] device_release_driver+0x12/0x20 [ 1960.796289] pci_stop_bus_device+0x172/0x1e0 [ 1960.796308] pci_stop_and_remove_bus_device_locked+0x1a/0x30 [ 1960.796328] remove_store+0xcb/0xe0 [ 1960.796345] ? sriov_numvfs_store+0x2e0/0x2e0 [ 1960.796364] ? __lock_is_held+0xb5/0x140 [ 1960.796383] ? component_add+0x530/0x530 [ 1960.796401] dev_attr_store+0x3f/0x70 [ 1960.796419] ? sysfs_file_ops+0x11d/0x170 [ 1960.796436] sysfs_kf_write+0x104/0x150 [ 1960.796454] ? sysfs_file_ops+0x170/0x170 [ 1960.796471] kernfs_fop_write+0x24f/0x400 [ 1960.796488] ? __lock_acquire+0x6ea/0x47f0 [ 1960.796520] __vfs_write+0xeb/0x760 [ 1960.796538] ? kernel_read+0x130/0x130 [ 1960.796556] ? __lock_is_held+0xb5/0x140 [ 1960.796590] ? rcu_read_lock_sched_held+0xdd/0x110 [ 1960.796608] ? rcu_sync_lockdep_assert+0x78/0xb0 [ 1960.796626] ? __sb_start_write+0x183/0x220 [ 1960.796648] vfs_write+0x14d/0x4a0 [ 1960.796666] ksys_write+0xd2/0x1b0 [ 1960.796684] ? __ia32_sys_read+0xb0/0xb0 [ 1960.796701] ? fput+0x1d/0x120 [ 1960.796732] ? filp_close+0xf3/0x130 [ 1960.796749] ? entry_SYSCALL_64_after_hwframe+0x59/0xbe [ 1960.796768] __x64_sys_write+0x73/0xb0 [ 1960.796800] do_syscall_64+0xaa/0x400 [ 1960.796818] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 1960.796836] RIP: 0033:0x7f59df433164 [ 1960.796854] Code: 89 02 48 c7 c0 ff ff ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 48 8d 05 81 38 2d 00 8b 00 85 c0 75 13 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 54 c3 0f 1f 00 41 54 49 89 d4 55 48 89 f5 53 [ 1960.796884] RSP: 002b:00007ffd70ee2fb8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 [ 1960.796906] RAX: ffffffffffffffda RBX: 0000000000000002 RCX: 00007f59df433164 [ 1960.796926] RDX: 0000000000000002 RSI: 00005578088640c0 RDI: 0000000000000001 [ 1960.796946] RBP: 00005578088640c0 R08: 00007f59df7038c0 R09: 00007f59e0995b80 [ 1960.796966] R10: 000000000000000a R11: 0000000000000246 R12: 00007f59df702760 [ 1960.796985] R13: 0000000000000002 R14: 00007f59df6fd760 R15: 0000000000000002 [ 1960.797008] irq event stamp: 509990 [ 1960.797026] hardirqs last enabled at (509989): [] flush_work+0x4b8/0x6d0 [ 1960.797063] hardirqs last disabled at (509990): [] _raw_spin_lock_irqsave+0x25/0x60 [ 1960.797085] softirqs last enabled at (509744): [] __do_softirq+0x5ad/0x8c0 [ 1960.797121] softirqs last disabled at (509735): [] irq_exit+0x1a5/0x1e0 [ 1960.797142] ---[ end trace fb1342325f1846b8 ]--- While I haven't actually gone into the details of what's causing this to happen (maybe the kernel removes the backlight device in the device core before we get to it?), it doesn't really matter anyway because the way nouveau handles backlights has long since been deprecated. According to the documentation on the drm_connector->late_register() hook, the ->late_register() hook should be used for adding extra connector-related devices. Vice versa, the ->early_unregister() hook is meant to be used for removing those devices. So: gut nouveau_drm->bl_list and nouveau_drm->backlight, and replace them with per-connector backlight structures. Additionally, move backlight registration/teardown into the ->late_register() and ->early_unregister() hooks so that DRM can give us a chance to remove the backlight before the connector is even removed. This appears to fix the problem once and for all. Changes since v2: - Use NV_INFO_ONCE for printing GMUX information, since otherwise this will end up printing that message for as many times as we have connectors Signed-off-by: Lyude Paul Reviewed-by: Karol Herbst Signed-off-by: Ben Skeggs commit 4c497075042897ad287b1119c3c394812b292238 Author: Lyude Paul Date: Thu Sep 6 17:43:22 2018 -0400 drm/nouveau: Add NV_PRINTK_ONCE and variants Since we're about to use this in nouveau_backlight.c. Same thing as DRM_WARN_ONCE, DRM_INFO_ONCE, etc... Signed-off-by: Lyude Paul Cc: Karol Herbst Signed-off-by: Ben Skeggs commit dc854914999d5d52ac1b31740cb0ea8d89d0372e Author: Lyude Paul Date: Thu Sep 6 17:43:21 2018 -0400 drm/nouveau: Check backlight IDs are >= 0, not > 0 Remember, ida IDs start at 0, not 1! Signed-off-by: Lyude Paul Reviewed-by: Karol Herbst Cc: stable@vger.kernel.org Signed-off-by: Ben Skeggs commit 1a16dbaf798c5b68ac767444eb045e6f3adaa16d Author: Al Viro Date: Wed Oct 10 16:52:37 2018 -0400 Document d_splice_alias() calling conventions for ->lookup() users. Short version: it does the right thing when given NULL or ERR_PTR(...) and its calling conventions are chosen to have minimal PITA when used in ->lookup() instances. Signed-off-by: Al Viro commit b0da3498c587c20e64799c4c7ba65a31314b2182 Author: Christoph Hellwig Date: Tue Oct 9 16:08:24 2018 +0200 PCI: Remove pci_set_dma_max_seg_size() The few callers can just use dma_set_max_seg_size ()directly. Signed-off-by: Christoph Hellwig Signed-off-by: Bjorn Helgaas commit a6f44cf9f5cc60471cf06f3d5391fc6041eb37a5 Author: Christoph Hellwig Date: Tue Oct 9 16:08:23 2018 +0200 PCI: Remove pci_set_dma_seg_boundary() The two callers can just use dma_set_seg_boundary() directly. Signed-off-by: Christoph Hellwig Signed-off-by: Bjorn Helgaas commit 18b01b16e8bae9cd227909f6e6d2783d74855f65 Author: Christoph Hellwig Date: Tue Oct 9 16:08:22 2018 +0200 PCI: Remove pci_unmap_addr() wrappers for DMA API Only some of these were still used by the cxgb4 driver, and that despite the fact that the driver otherwise uses the generic DMA API. Signed-off-by: Christoph Hellwig Signed-off-by: Bjorn Helgaas commit e884bce1d9321047ea002b97699e4f7a74c3fae3 Author: Al Viro Date: Wed Oct 10 16:41:40 2018 -0400 ext4: don't open-code ERR_CAST Signed-off-by: Al Viro commit 3837d208d8fe7437475c4a1c53fa5e517b16ceb0 Author: Al Viro Date: Wed Oct 10 16:38:27 2018 -0400 simplify btrfs_lookup() d_splice_alias() is fine with ERR_PTR(-E...) for inode Signed-off-by: Al Viro commit 8300807f9e2dffb6552514763ad60e005c12eb94 Author: Al Viro Date: Wed Oct 10 16:37:39 2018 -0400 clean erofs_lookup() d_splice_alias() does the right thing when given ERR_PTR(-E...) for inode. No need for gotos, multiple returns, etc. in there. Signed-off-by: Al Viro commit df2fc43d09d3ee5ede82cab9299df5e78aa427b5 Author: Christian König Date: Thu Sep 13 11:17:23 2018 +0200 list: introduce list_bulk_move_tail helper Move all entries between @first and including @last before @head. This is useful for LRU lists where a whole block of entries should be moved to the end of the list. Used as a band aid in TTM, but better placed in the common list headers. Acked-by: Dave Airlie Signed-off-by: Christian König Reviewed-by: Huang Rui Reviewed-by: Junwei Zhang Signed-off-by: Alex Deucher commit b3cd92db6ecde0a1c3651771a23f45b708533de4 Author: Bartlomiej Zolnierkiewicz Date: Tue Oct 9 16:45:20 2018 +0200 ata: 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: Jens Axboe commit 486c6fba90f64d8d6e09f5a36aa722af6b52828c Author: Bartlomiej Zolnierkiewicz Date: Tue Oct 9 16:41:01 2018 +0200 drivers/block: remove redundant 'default n' from Kconfig-s '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: Jens Axboe commit 1306ad4e60de57022a90b1904870763a39adcb42 Author: Bartlomiej Zolnierkiewicz Date: Tue Oct 9 16:32:54 2018 +0200 block: remove redundant 'default n' from Kconfig-s '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: Jens Axboe commit a553c19d158535a62b513f5a9ef9f036a54b511f Author: Alex Deucher Date: Tue Oct 9 16:03:53 2018 -0500 drm/amdgpu/powerplay: factor out some pptable helpers Move copy_array helpers to smu_helper.c and share between vega12 and vega20. Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit 99e219521da5c1bfa9f36ca4fae3fe1a3718cf24 Author: Alex Deucher Date: Tue Oct 9 15:50:38 2018 -0500 drm/amdgpu/powerplay: endian fixes for vega20_processpptables.c Properly swap data from vbios. Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit d97a7ab394800d41eb3b043a5692bfee0634f5c9 Author: Alex Deucher Date: Tue Oct 9 15:33:16 2018 -0500 drm/amdgpu/powerplay: endian fixes for vega12_processpptables.c Properly swap data from vbios. Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit de501763304b7cdcc1d8d04ec32ad58f0cb598b1 Author: Alex Deucher Date: Tue Oct 9 15:23:15 2018 -0500 drm/amdgpu/powerplay: endian fixes for vega10_processpptables.c Properly swap data from vbios. Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit f667dc38aacf353b017aac165d488404253f3c74 Author: YueHaibing Date: Wed Sep 26 14:15:34 2018 +0000 drm/amdgpu: remove set but not used variable 'header' Fixes gcc '-Wunused-but-set-variable' warning: drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c: In function 'amdgpu_ucode_init_bo': drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c:431:39: warning: variable 'header' set but not used [-Wunused-but-set-variable] Signed-off-by: YueHaibing Signed-off-by: Alex Deucher commit 50325c0be109c7f2f21d6d66f31baed46a0c3443 Author: YueHaibing Date: Sat Sep 29 11:39:14 2018 +0000 drm/amdgpu: remove set but not used variable 'ring' in psp_v11_0_ring_stop Fixes gcc '-Wunused-but-set-variable' warning: drivers/gpu/drm/amd/amdgpu/psp_v11_0.c: In function 'psp_v11_0_ring_stop': drivers/gpu/drm/amd/amdgpu/psp_v11_0.c:309:19: warning: variable 'ring' set but not used [-Wunused-but-set-variable] Signed-off-by: YueHaibing Signed-off-by: Alex Deucher commit ae5c59a83b84b46aeabde95495a50dfec101d7d6 Author: YueHaibing Date: Tue Oct 9 01:53:00 2018 +0000 drm/amdkfd: Remove set but not used variable 'preempt_all_queues' Fixes gcc '-Wunused-but-set-variable' warning: drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c: In function 'destroy_queue_cpsch': drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c:1366:7: warning: variable 'preempt_all_queues' set but not used [-Wunused-but-set-variable] It never used since introduct in commit 992839ad64f2 ("drm/amdkfd: Add static user-mode queues support") Signed-off-by: YueHaibing Signed-off-by: Alex Deucher commit 14b284832e7dea6f54f0adfd7bed105548b94e57 Author: Colin Ian King Date: Mon Oct 8 17:22:28 2018 +0100 drm/amdgpu/powerplay: fix missing break in switch statements There are several switch statements that are missing break statements. Add missing breaks to handle any fall-throughs corner cases. Detected by CoverityScan, CID#1457175 ("Missing break in switch") Fixes: 18aafc59b106 ("drm/amd/powerplay: implement fw related smu interface for iceland.") Acked-by: Huang Rui Signed-off-by: Colin Ian King Signed-off-by: Alex Deucher commit 582f58de36834096a91cc1de2540c2f7269f850d Author: Lyude Paul Date: Fri Sep 21 20:43:44 2018 -0400 drm/amdgpu: Suppress keypresses from ACPI_VIDEO events Currently we return NOTIFY_DONE for any event which we don't think is ours. However, many laptops will send more then just an ATIF event and will also send an ACPI_VIDEO_NOTIFY_PROBE event as well. Since we don't check for this, we return NOTIFY_DONE which causes a keypress for the ACPI event to be propogated to userspace. This is the equivalent of someone pressing the display key on a laptop every time there's a hotplug event. So, check for ACPI_VIDEO_NOTIFY_PROBE events and suppress keypresses from them. Signed-off-by: Lyude Paul Cc: stable@vger.kernel.org Signed-off-by: Alex Deucher commit 800516480652e5ffbd4d7721de1fce484328e158 Author: Rex Zhu Date: Tue Oct 9 18:46:12 2018 +0800 drm/amdgpu: Remove the direct fw loading support for sdma2.4 sdma2.4 is only for iceland. For Vi, we don't maintain the direct fw loading. Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher commit b19caa17b5a728845832353337510fcb3cccddf6 Author: Rex Zhu Date: Wed Oct 10 21:04:14 2018 +0800 drm/amdgpu: Remove wrong fw loading type warning Remove the warning message: "-1 is not supported on VI" the -1 is the default fw load type, mean auto. Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher commit 7a3e0bb2a57428456948614d8fe94930832903b6 Author: Rex Zhu Date: Wed Oct 10 20:41:32 2018 +0800 drm/amdgpu: Load fw between hw_init/resume_phase1 and phase2 Extract the function of fw loading out of powerplay. Do fw loading between hw_init/resuem_phase1 and phase2 Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher commit 0a4f25205ec32d2918325d651cdaba9746764a24 Author: Rex Zhu Date: Wed Oct 10 19:28:30 2018 +0800 drm/amdgpu: split ip hw_init into 2 phases We need to do some IPs earlier to deal with ordering issues similar to how resume is split into two phases. Will do fw loading via smu/psp between the two phases. Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher commit 735f654e5dd1c55d28aa04d49a9b7fcd3d5cccd0 Author: Rex Zhu Date: Tue Oct 9 14:22:04 2018 +0800 drm/amdgpu: Remove amdgpu_ucode_fini_bo The variable clean is unnecessary. Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher commit c8963ea4ce1783034e1f9cf0d702fa490eb77836 Author: Rex Zhu Date: Tue Oct 9 13:55:49 2018 +0800 drm/amdgpu: Split amdgpu_ucode_init/fini_bo into two functions 1. one is for create/free bo when init/fini 2. one is for fill the bo before fw loading the ucode bo only need to be created when load driver and free when driver unload. when resume/reset, driver only need to re-fill the bo if the bo is allocated in vram. Suggested by Christian. v2: Return error when bo create failed. Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher commit a2d31dc3cfab29f79c1cda2876d32b909ae26e25 Author: Rex Zhu Date: Wed Oct 3 16:19:50 2018 +0800 drm/amdgpu: Check late_init status before set cg/pg state Fix cg/pg unexpected set in hw init failed case. Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher commit 73f847dbab26cd9b962ce03e413612d7a2b2b47d Author: Rex Zhu Date: Wed Oct 3 16:10:45 2018 +0800 drm/amdgpu: Refine function amdgpu_device_ip_late_init 1. only call late_init when hw_init successful, so check status.hw instand of status.valid in late_init. 2. set status.late_initialized true if late_init was not implemented. Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher commit 009d9ed6c4b7b84dbff8314d74233da9237a4560 Author: Rex Zhu Date: Sun Sep 30 17:37:27 2018 +0800 drm/amdgpu: Change AI gfx/sdma/smu init sequence initialize gfx/sdma before dpm features enabled. Acked-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher commit 3089aa2248943e62a875840862c0103b47e8420c Author: Rex Zhu Date: Sun Sep 30 17:32:36 2018 +0800 drm/amdgpu: Change SI/CI gfx/sdma/smu init sequence initialize gfx/sdma before dpm features enabled. Acked-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher commit f2d9bbc9968997c139d906162b3da9d97ffbed6f Author: Emily Deng Date: Wed Oct 10 15:43:47 2018 +0800 drm/amdgpu: Limit the max mc address to hole start For the vram_start is 0 case, the gart range will be from 0x0000FFFF00000000 to 0x0000FFFF1FFFFFFF, which will cause the engine hang. So to avoid the hole, limit the max mc address to AMDGPU_GMC_HOLE_START.:wq Signed-off-by: Emily Deng Reviewed-by: Christian König Signed-off-by: Alex Deucher commit f9f97e3c7fe681bc8dcb9625856a559e2c7e11d8 Author: Tao Zhou Date: Tue Oct 9 11:40:31 2018 +0800 drm/amdgpu: fix CPDMA hang in PRT mode Fix CPDMA hang in PRT mode, set CPF_INT_DMA in reg CP_MECx_F32_INT_DIS for Compute and set DISABLE_GFX_HALT_ON_UTCL1_ERROR in reg CP_DEBUG for GFX Affected ASICs: Vega10 Vega12 Raven Signed-off-by: Tao Zhou Tested-by: Yukun.Li Tested-by: Maciej.Jesionowski Acked-by: Christian König Signed-off-by: Alex Deucher commit 04e7580f892688aff140c574dbefa707977375e7 Author: Tao Zhou Date: Tue Oct 9 11:30:36 2018 +0800 drm/amdgpu: add CP_DEBUG register definition for GC9.0 Add CP_DEBUG register definition. Signed-off-by: Tao Zhou Acked-by: Christian König Signed-off-by: Alex Deucher commit 66f34aeec2510b755e8b928b0d8aec8a4095a227 Author: Hersen Wu Date: Tue Oct 9 13:50:10 2018 -0400 drm/amd/display: RV2 DP MST 2nd display within daisy chain not light up RV2 resource is limit to 3 pipes. Limitation should apply to all HW blocks instead of front pipe. Signed-off-by: Hersen Wu Acked-by: Alex Deucher Reviewed-by: Huang Rui Signed-off-by: Huang Rui Signed-off-by: Alex Deucher commit d567cc55c0a9bd2744d5f32e3090e55f9e0c0a40 Author: Roman Li Date: Tue Oct 9 13:50:09 2018 -0400 drm/amd/display: Fix warning storm on Raven2 [Why] Wrong index for pstate debug test register [How] Add correct index value for dcn1_01 in hubbub1_construct() Signed-off-by: Hersen Wu Signed-off-by: Roman Li Acked-by: Alex Deucher Reviewed-by: Huang Rui Signed-off-by: Huang Rui Signed-off-by: Alex Deucher commit a408e4a86b36bf98ad15b9ada531cf0e5118ac67 Author: Goldwyn Rodrigues Date: Tue Oct 9 10:12:33 2018 -0500 ima: open a new file instance if no read permissions Open a new file instance as opposed to changing file->f_mode when the file is not readable. This is done to accomodate overlayfs stacked file operations change. The real struct file is hidden behind the overlays struct file. So, any file->f_mode manipulations are not reflected on the real struct file. Open the file again in read mode if original file cannot be read, read and calculate the hash. Signed-off-by: Goldwyn Rodrigues Cc: stable@vger.kernel.org (linux-4.19) Signed-off-by: Mimi Zohar commit a85c928f6a7856a09e47d9b37faa3407c7ac6a8e Author: Linus Walleij Date: Wed Oct 10 20:39:18 2018 +0200 pinctrl: gemini: Fix up TVC clock group The previous fix made the TVC clock get muxed in on the D-Link DIR-685 instead of giving nagging warnings of this not working. Not good. We didn't want that, as it breaks video. Create a specific group for the TVC CLK, and break out a specific GPIO group for it on the SL3516 so we can use that line as GPIO if we don't need the TVC CLK. Fixes: d17f477c5bc6 ("pinctrl: gemini: Mask and set properly") Signed-off-by: Linus Walleij commit 52916982af48d9f9fc01ad825259de1eb3a9b25e Author: Logan Gunthorpe Date: Thu Oct 4 15:27:35 2018 -0600 PCI/P2PDMA: Support peer-to-peer memory Some PCI devices may have memory mapped in a BAR space that's intended for use in peer-to-peer transactions. To enable such transactions the memory must be registered with ZONE_DEVICE pages so it can be used by DMA interfaces in existing drivers. Add an interface for other subsystems to find and allocate chunks of P2P memory as necessary to facilitate transfers between two PCI peers: struct pci_dev *pci_p2pmem_find[_many](); int pci_p2pdma_distance[_many](); void *pci_alloc_p2pmem(); The new interface requires a driver to collect a list of client devices involved in the transaction then call pci_p2pmem_find() to obtain any suitable P2P memory. Alternatively, if the caller knows a device which provides P2P memory, they can use pci_p2pdma_distance() to determine if it is usable. With a suitable p2pmem device, memory can then be allocated with pci_alloc_p2pmem() for use in DMA transactions. Depending on hardware, using peer-to-peer memory may reduce the bandwidth of the transfer but can significantly reduce pressure on system memory. This may be desirable in many cases: for example a system could be designed with a small CPU connected to a PCIe switch by a small number of lanes which would maximize the number of lanes available to connect to NVMe devices. The code is designed to only utilize the p2pmem device if all the devices involved in a transfer are behind the same PCI bridge. This is because we have no way of knowing whether peer-to-peer routing between PCIe Root Ports is supported (PCIe r4.0, sec 1.3.1). Additionally, the benefits of P2P transfers that go through the RC is limited to only reducing DRAM usage and, in some cases, coding convenience. The PCI-SIG may be exploring adding a new capability bit to advertise whether this is possible for future hardware. This commit includes significant rework and feedback from Christoph Hellwig. Signed-off-by: Christoph Hellwig Signed-off-by: Logan Gunthorpe [bhelgaas: fold in fix from Keith Busch : https://lore.kernel.org/linux-pci/20181012155920.15418-1-keith.busch@intel.com, to address comment from Dan Carpenter , fold in https://lore.kernel.org/linux-pci/20181017160510.17926-1-logang@deltatee.com] Signed-off-by: Bjorn Helgaas commit f8f83d8ffeb47041ff0937ecac6d10bcb388cd9f Author: Jack Wang Date: Mon Oct 8 17:24:03 2018 +0200 md/bitmap: use mddev_suspend/resume instead of ->quiesce() After 9e1cc0a54556 ("md: use mddev_suspend/resume instead of ->quiesce()") We still have similar left in bitmap functions. Replace quiesce() with mddev_suspend/resume. Also move md_bitmap_create out of mddev_suspend. and move mddev_resume after md_bitmap_destroy. as we did in set_bitmap_file. Signed-off-by: Jack Wang Reviewed-by: Gioh Kim Signed-off-by: Shaohua Li commit 116d99adf59314924adae0cb691e4d289b5f2407 Author: Colin Ian King Date: Mon Oct 8 22:16:09 2018 +0100 md: remove redundant code that is no longer reachable And earlier commit removed the error label to two statements that are now never reachable. Since this code is now dead code, remove it. Detected by CoverityScan, CID#1462409 ("Structurally dead code") Fixes: d5d885fd514f ("md: introduce new personality funciton start()") Signed-off-by: Colin Ian King Signed-off-by: Shaohua Li commit a6deaa99591098a3e558978c6cec0054fd1d3b97 Merge: e40a826a6cbc 1f2cf1b39b93 Author: David S. Miller Date: Wed Oct 10 10:06:03 2018 -0700 Merge branch 'octeontx2-af-Add-RVU-Admin-Function-driver' Sunil Goutham says: ==================== octeontx2-af: Add RVU Admin Function driver Resource virtualization unit (RVU) on Marvell's OcteonTX2 SOC maps HW resources from the network, crypto and other functional blocks into PCI-compatible physical and virtual functions. Each functional block again has multiple local functions (LFs) for provisioning to PCI devices. RVU supports multiple PCIe SRIOV physical functions (PFs) and virtual functions (VFs). PF0 is called the administrative / admin function (AF) and has privileges to provision RVU functional block's LFs to each of the PF/VF. RVU managed networking functional blocks - Network pool allocator (NPA) - Network interface controller (NIX) - Network parser CAM (NPC) - Schedule/Synchronize/Order unit (SSO) RVU managed non-networking functional blocks - Crypto accelerator (CPT) - Scheduled timers unit (TIM) - Schedule/Synchronize/Order unit (SSO) Used for both networking and non networking usecases - Compression (upcoming in future variants of the silicons) Resource provisioning examples - A PF/VF with NIX-LF & NPA-LF resources works as a pure network device - A PF/VF with CPT-LF resource works as a pure cyrpto offload device. This admin function driver neither receives any data nor processes it i.e no I/O, a configuration only driver. PF/VFs communicates with AF via a shared memory region (mailbox). Upon receiving requests from PF/VF, AF does resource provisioning and other HW configuration. AF is always attached to host, but PF/VFs may be used by host kernel itself, or attached to VMs or to userspace applications like DPDK etc. So AF has to handle provisioning/configuration requests sent by any device from any domain. This patch series adds logic for the following - RVU AF driver with functional blocks provisioning support. - Mailbox infrastructure for communication between AF and PFs. - CGX (MAC controller) driver which communicates with firmware for managing physical ethernet interfaces. AF collects info from this driver and forwards the same to the PF/VFs uaing these interfaces. This is the first set of patches out of 80+ patches. Changes from v8: 1 Removed unnecessary typecasts in entire series - Suggested by David Miller 2 Added COMPILE_TEST to AF driver - Suggested by Arnd Bergmann 3 Changed udelay() to usleep_range() in rvu_poll_reg - Suggested by Arnd Bergmann 4 MSIX vector base IOMMU mapping is done using dma_map_resource() API instead of dma_map_single() as it accepts physical address. - Issue pointed by Arnd Bergmann Changes from v7: 1 Removed unnecessary typecasts in mbox infra code. - Suggested by David Miller 2 Fixed MAINTAINERS patch - Suggested by Joe Perches Changes from v6: Fixed ordering of local variables from longest to shortest line. - Suggested by David Miller Changes from v5: Modified bitfield based command structures to bitmasks for communication with firmware, to address endianness issues. - Suggested by Arnd Bergmann Changes from v4: 1 Removed module author/version/description from CGX driver as it's now merged with AF driver module. - Suggested by Arnd Bergmann 2 Added big-endian bitfields for CGX's kernel <=> firmware communication command structures. - Suggested by Arnd Bergmann Changes from v3: Moved driver from drivers/soc to drivers/net/ethernet - Suggested by Arnd Bergmann https://patchwork.kernel.org/cover/10587635/ Changes from v2: No changes, submitted again with netdev mailing list in loop. - Suggested by Arnd Bergmann and Andrew Lunn Changes from v1: 1 Merged RVU admin function and CGX drivers into a single module - Suggested by Arnd Bergmann 2 Pulled mbox communication APIs into a separate module to remove admin function driver dependency in a VM where AF is not attached. - Suggested by Arnd Bergmann ==================== Reviewed-by: Arnd Bergmann Signed-off-by: David S. Miller commit 0c09d4856462bf71e37ccd26d0deb53aad6cee6a Author: Punit Agrawal Date: Mon Oct 8 11:03:55 2018 +0100 Documentation/arm64: HugeTLB page implementation Arm v8 architecture supports multiple page sizes - 4k, 16k and 64k. Based on the active page size, the Linux port supports corresponding hugepage sizes at PMD and PUD(4k only) levels. In addition, the architecture also supports caching larger sized ranges (composed of multiple entries) at the PTE and PMD level in the TLBs using the contiguous bit. The Linux port makes use of this architectural support to enable additional hugepage sizes. Describe the two different types of hugepages supported by the arm64 kernel and the hugepage sizes enabled by each. Acked-by: Randy Dunlap Acked-by: Will Deacon Cc: Jonathan Corbet Signed-off-by: Punit Agrawal Signed-off-by: Catalin Marinas commit 1f2cf1b39b9372f9604b53dcd4b48140f139a109 Author: Sunil Goutham Date: Wed Oct 10 18:14:35 2018 +0530 MAINTAINERS: Add entry for Marvell OcteonTX2 Admin Function driver Added maintainers entry for Marvell OcteonTX2 SOC's RVU admin function driver. Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit afb8902c46277ed6f05de36b760aca07fd78868c Author: Linu Cherian Date: Wed Oct 10 18:14:34 2018 +0530 octeontx2-af: Register for CGX lmac events Added support in RVU AF driver to register for CGX LMAC link status change events from firmware and managing them. Processing part will be added in followup patches. - Introduced eventqueue for posting events from cgx lmac. Queueing mechanism will ensure that events can be posted and firmware can be acked immediately and hence event reception and processing are decoupled. - Events gets added to the queue by notification callback. Notification callback is expected to be atomic, since it is called from interrupt context. - Events are dequeued and processed in a worker thread. Signed-off-by: Linu Cherian Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit 1463f382f58d539f4f6245f13731c19d967fdea2 Author: Linu Cherian Date: Wed Oct 10 18:14:33 2018 +0530 octeontx2-af: Add support for CGX link management CGX LMAC initialization, link status polling etc is done by low level secure firmware. For link management this patch adds a interface or communication mechanism between firmware and this kernel CGX driver. - Firmware interface specification is defined in cgx_fw_if.h. - Support to send/receive commands/events to/form firmware. - events/commands implemented * link up * link down * reading firmware version Signed-off-by: Linu Cherian Signed-off-by: Nithya Mani Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit 3a4fa841b0397e156f2e8828913b50b672b89037 Author: Linu Cherian Date: Wed Oct 10 18:14:32 2018 +0530 octeontx2-af: Set RVU PFs to CGX LMACs mapping Each of the enabled CGX LMAC is considered a physical interface and RVU PFs are mapped to these. VFs of these SRIOV PFs will be virtual interfaces and share CGX LMAC along with PF. This mapping info will be used later on for Rx/Tx pkt steering. Signed-off-by: Linu Cherian Signed-off-by: Geetha sowjanya Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit 8e22f040828f0d25fedce8c19bc9561a08ab38cd Author: Sunil Goutham Date: Wed Oct 10 18:14:31 2018 +0530 octeontx2-af: Add Marvell OcteonTX2 CGX driver This patch adds basic template for Marvell OcteonTX2's CGX ethernet interface driver. Just the probe. RVU AF driver will use APIs exported by this driver for various things like PF to physical interface mapping, loopback mode, interface stats etc. Hence marged both drivers into a single module. Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit 34b34ee07d89d8211bc72c68bafd0176a2e6e8cb Author: Geetha sowjanya Date: Wed Oct 10 18:14:30 2018 +0530 octeontx2-af: Reconfig MSIX base with IOVA HW interprets RVU_AF_MSIXTR_BASE address as an IOVA, hence create a IOMMU mapping for the physcial address configured by firmware and reconfig RVU_AF_MSIXTR_BASE with IOVA. Signed-off-by: Geetha sowjanya Signed-off-by: Sunil Goutham Reviewed-by: Arnd Bergmann Signed-off-by: David S. Miller commit 756051e23cce593ced6c637c1b5a793d68164597 Author: Sunil Goutham Date: Wed Oct 10 18:14:29 2018 +0530 octeontx2-af: Configure block LF's MSIX vector offset Firmware configures a certain number of MSIX vectors to each of enabled RVU PF/VF. When a block LF is attached to a PF/VF, number of MSIX vectors needed by that LF are set aside (out of PF/VF's total MSIX vectors) and LF's msix_offset is configured in HW. Also added support for a RVU PF/VF to retrieve that block LF's MSIX vector offset information from AF via mbox. Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit 746ea74241fa04f7a8c3146adc08b618d88681e2 Author: Sunil Goutham Date: Wed Oct 10 18:14:28 2018 +0530 octeontx2-af: Add RVU block LF provisioning support Added support for a RVU PF/VF to request AF via mailbox to attach or detach NPA/NIX/SSO/SSOW/TIM/CPT block LFs. Also supports partial detachment and modifying current LF attached count of a certian block type. Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit 114a767e8b24bf5d5be5101c1713ff2eb0149657 Author: Sunil Goutham Date: Wed Oct 10 18:14:27 2018 +0530 octeontx2-af: Scan blocks for LFs provisioned to PF/VF Scan all RVU blocks to find any 'LF to RVU PF/VF' mapping done by low level firmware. If found any, mark them as used in respective block's LF bitmap and also save mapped PF/VF's PF_FUNC info. This is done to avoid reattaching a block LF to a different RVU PF/VF. Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit 1f15462539829cd05510c053538aad27a8f1fac8 Author: Aleksey Makarov Date: Wed Oct 10 18:14:26 2018 +0530 octeontx2-af: Convert mbox msg id check to a macro With 10's of mailbox messages expected to be handled in future, checking for message id could become a lengthy switch case. Hence added a macro to auto generate the switch case for each msg id. Signed-off-by: Aleksey Makarov Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit 7304ac4567bcb72fd57cc79582bf53ca7840136f Author: Sunil Goutham Date: Wed Oct 10 18:14:25 2018 +0530 octeontx2-af: Add mailbox IRQ and msg handlers This patch adds support for mailbox interrupt and message handling. Mapped mailbox region and registered a workqueue for message handling. Enabled mailbox IRQ of RVU PFs and registered a interrupt handler. When IRQ is triggered work is added to the mbox workqueue for msgs to get processed. Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit 021e2e53b8c891a9d95860a318e5f30c76bf8b0d Author: Aleksey Makarov Date: Wed Oct 10 18:14:24 2018 +0530 octeontx2-af: Add mailbox support infra This patch adds mailbox support infrastructure APIs. Each RVU device has a dedicated 64KB mailbox region shared with it's peer for communication. RVU AF has a separate mailbox region shared with each of RVU PFs and a RVU PF has a separate region shared with each of it's VF. These set of APIs are used by this driver (RVU AF) and other RVU PF/VF drivers eg netdev, crypto e.t.c. Signed-off-by: Aleksey Makarov Signed-off-by: Sunil Goutham Signed-off-by: Lukasz Bartosik Signed-off-by: David S. Miller commit 1054a6227c296af18e027d726203d6e67aa405fe Author: Sunil Goutham Date: Wed Oct 10 18:14:23 2018 +0530 octeontx2-af: Gather RVU blocks HW info This patch gathers NPA/NIX/SSO/SSOW/TIM/CPT RVU blocks's HW info like number of LFs. Important register offsets saved for later use to avoid code duplication for each block. A bitmap is allocated for each of the blocks which later on will be used to allocate a LF for a RVU PF/VF. Also added RVU NIX/NPA block registers and few registers of other blocks. Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit 54d557815e15ab8c28b559e493604478605f9e6b Author: Sunil Goutham Date: Wed Oct 10 18:14:22 2018 +0530 octeontx2-af: Reset all RVU blocks Go through all BLKADDRs and check which ones are implemented on this silicon and do a HW reset of each implemented block. Also added all RVU AF and PF register offsets. Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit 54494aa5d1e68945dc79feb7c8461cd382e11d8a Author: Sunil Goutham Date: Wed Oct 10 18:14:21 2018 +0530 octeontx2-af: Add Marvell OcteonTX2 RVU AF driver This patch adds basic template for Marvell OcteonTX2's resource virtualization unit (RVU) admin function (AF) driver. Just the driver registration and probe. Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit e40a826a6cbc23e63a769e50dc71eb34ba6ddabf Author: Sudarsana Reddy Kalluru Date: Wed Oct 10 05:00:12 2018 -0700 qed: Add support for virtual link. Currently driver registers to physical link notifications (of the device) from Management firmware (MFW). Driver doesn't get notified if there's a change in the virtual link e.g., link-flap on the peer PF interface. Virtual link indication from MFW reflects the per PF link status instead of the physical link. The patch adds driver support for, - Advertising the virtual link support to MFW. - Handling the virtual link notification from MFW. Please consider applying it to 'net-next'. Signed-off-by: Sudarsana Reddy Kalluru Signed-off-by: Tomer Tayar Signed-off-by: David S. Miller commit 26a6f87ef596e612ab79e456155e195f2fa9b891 Author: James Morse Date: Wed Oct 10 15:43:22 2018 +0100 arm64: mm: Use __pa_symbol() for set_swapper_pgd() commit 2330b7ca78350efcb ("arm64/mm: use fixmap to modify swapper_pg_dir") modifies the swapper_pg_dir via the fixmap as the kernel page tables have been moved to a read-only part of the kernel mapping. Using __pa() to setup the fixmap causes CONFIG_DEBUG_VIRTUAL to fire, as this function is used on the kernel-image swapper address. The in_swapper_pgdir() test before each call of this function means set_swapper_pgd() will only ever be called when pgdp points somewhere in the kernel-image mapping of swapper_pd_dir. Use __pa_symbol(). Reported-by: Geert Uytterhoeven Acked-by: Will Deacon Cc: Jun Yao Tested-by: Geert Uytterhoeven Signed-off-by: James Morse Signed-off-by: Catalin Marinas commit 1e4c8dafbb6bf72fb5eca035b861e39c5896c2b7 Author: Eric Biggers Date: Fri Sep 7 14:33:24 2018 -0700 ima: fix showing large 'violations' or 'runtime_measurements_count' The 12 character temporary buffer is not necessarily long enough to hold a 'long' value. Increase it. Signed-off-by: Eric Biggers Cc: stable@vger.kernel.org Signed-off-by: Mimi Zohar commit 2ab5daf867d1f7898327962d59d3039206294d3a Author: Eric Biggers Date: Wed Oct 3 17:15:44 2018 -0700 security/integrity: remove unnecessary 'init_keyring' variable The 'init_keyring' variable actually just gave the value of CONFIG_INTEGRITY_TRUSTED_KEYRING. We should check the config option directly instead. No change in behavior; this just simplifies the code. Signed-off-by: Eric Biggers Signed-off-by: Mimi Zohar commit b2724d5802a77b7fb47e84d9b88b80370eccbc64 Author: Eric Biggers Date: Fri Sep 7 13:22:23 2018 -0700 security/integrity: constify some read-only data Constify some static data that is never modified, so that it is placed in .rodata. Signed-off-by: Eric Biggers Signed-off-by: Mimi Zohar commit 691115c3513ec83edf68ba6575ae85630bc94b8b Author: Eric Biggers Date: Fri Sep 7 12:16:24 2018 -0700 vfs: require i_size <= SIZE_MAX in kernel_read_file() On 32-bit systems, the buffer allocated by kernel_read_file() is too small if the file size is > SIZE_MAX, due to truncation to size_t. Fortunately, since the 'count' argument to kernel_read() is also truncated to size_t, only the allocated space is filled; then, -EIO is returned since 'pos != i_size' after the read loop. But this is not obvious and seems incidental. We should be more explicit about this case. So, fail early if i_size > SIZE_MAX. Signed-off-by: Eric Biggers Signed-off-by: Mimi Zohar commit e03a4e5bb7430f9294c12f02c69eb045d010e942 Author: Marc Zyngier Date: Wed Oct 10 17:25:51 2018 +0100 arm64: Add silicon-errata.txt entry for ARM erratum 1188873 Document that we actually work around ARM erratum 1188873 Fixes: 95b861a4a6d9 ("arm64: arch_timer: Add workaround for ARM erratum 1188873") Signed-off-by: Marc Zyngier Signed-off-by: Catalin Marinas commit 3b82a6ea23277f56c4f005872bb73c8ce29779d7 Author: James Morse Date: Wed Oct 10 16:55:44 2018 +0100 Revert "arm64: uaccess: implement unsafe accessors" This reverts commit a1f33941f7e103bcf471eaf8461b212223c642d6. The unsafe accessors allow the PAN enable/disable calls to be made once for a group of accesses. Adding these means we can now have sequences that look like this: | user_access_begin(); | unsafe_put_user(static-value, x, err); | unsafe_put_user(helper-that-sleeps(), x, err); | user_access_end(); Calling schedule() without taking an exception doesn't switch the PSTATE or TTBRs. We can switch out of a uaccess-enabled region, and run other code with uaccess enabled for a different thread. We can also switch from uaccess-disabled code back into this region, meaning the unsafe_put_user()s will fault. For software-PAN, threads that do this will get stuck as handle_mm_fault() will determine the page has already been mapped in, but we fault again as the page tables aren't loaded. To solve this we need code in __switch_to() that save/restores the PAN state. Acked-by: Julien Thierry Acked-by: Mark Rutland Signed-off-by: James Morse Signed-off-by: Catalin Marinas commit 7dd2157cb61a38bee83e3bc4f9bc3311f7053b4b Merge: dd5bd0a65ff6 901f8c3f6feb Author: Paolo Bonzini Date: Wed Oct 10 18:38:32 2018 +0200 Merge tag 'kvm-ppc-next-4.20-1' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc into HEAD PPC KVM update for 4.20. The major new feature here is nested HV KVM support. This allows the HV KVM module to load inside a radix guest on POWER9 and run radix guests underneath it. These nested guests can run in supervisor mode and don't require any additional instructions to be emulated, unlike with PR KVM, and so performance is much better than with PR KVM, and is very close to the performance of a non-nested guest. A nested hypervisor (a guest with nested guests) can be migrated to another host and will bring all its nested guests along with it. A nested guest can also itself run guests, and so on down to any desired depth of nesting. Apart from that there are a series of updates for IOMMU handling from Alexey Kardashevskiy, a "one VM per core" mode for HV KVM for security-paranoid applications, and a small fix for PR KVM. commit 2f2fbfb71ecc221352d84ae6430b42031ae5b654 Merge: 0238df646e62 a089845b3ed2 5e731073bc0a bc46c229b6af 18f99c9b9dec e84b7cc457f9 35449adce847 Author: Joerg Roedel Date: Wed Oct 10 18:09:37 2018 +0200 Merge branches 'arm/renesas', 'arm/smmu', 'ppc/pamu', 'x86/vt-d', 'x86/amd' and 'core' into next commit 5e731073bc0a4a53a213412dbd33982d829560f1 Author: Andrew Murray Date: Wed Oct 10 11:29:27 2018 +0100 iommu/arm-smmu-v3: Remove unnecessary wrapper function Simplify the code by removing an unnecessary wrapper function. This was left behind by commit 2f657add07a8 ("iommu/arm-smmu-v3: Specialise CMD_SYNC handling") Signed-off-by: Andrew Murray Reviewed-by: Robin Murphy Signed-off-by: Joerg Roedel commit 2d7ca2c4b1991667f8ae142208046a12c8493f91 Author: Andrew Murray Date: Wed Oct 10 11:29:26 2018 +0100 iommu/arm-smmu-v3: Add SPDX header Replace license text with SDPX header Signed-off-by: Andrew Murray Acked-by: Robin Murphy Signed-off-by: Joerg Roedel commit 00cba11fab58407a0017fc55476ea764161c5f07 Author: Thierry Reding Date: Fri Sep 21 12:08:56 2018 +0200 firmware: tegra: bpmp: Implement suspend/resume support When returning from a system sleep state, the BPMP driver needs to reinitialize the IVC channels used to communicate with the BPMP to restore proper functionality. Signed-off-by: Thierry Reding commit 2978d873471005577e7b68a528b4f256a529b030 Author: Colin Ian King Date: Wed Sep 5 15:54:01 2018 +0100 orangefs: rate limit the client not running info message Currently accessing various /sys/fs/orangefs files will spam the kernel log with the following info message when the client is not running: [ 491.489284] sysfs_service_op_show: Client not running :-5: Rate limit this info message to make it less spammy. Signed-off-by: Colin Ian King Signed-off-by: Mike Marshall commit 052d12766b7147500d9d5017bb90d4524f01e731 Author: Chengguang Xu Date: Fri Aug 31 22:33:52 2018 +0800 orangefs: cache NULL when both default_acl and acl are NULL default_acl and acl of newly created inode will be initiated as ACL_NOT_CACHED in vfs function inode_init_always() and later will be updated by calling xxx_init_acl() in specific filesystems. Howerver, when default_acl and acl are NULL then they keep the value of ACL_NOT_CACHED, this patch tries to cache NULL for acl/default_acl in this case. Signed-off-by: Chengguang Xu Signed-off-by: Mike Marshall commit c2b59d279dbbac750958f6a1bc4841e431d934e3 Author: Jeson Gao Date: Tue Sep 4 15:14:08 2018 +0800 thermal: core: using power_efficient_wq for thermal worker For SMP systems, thermal worker should use power_efficient_wq in power saving mode, that will make scheduler more flexible on selecting an active core for running work handler to avoid keeping work handler always running on a single core, that will save some power. Even if 'power_efficient_wq' relevant configs are disabled 'system_freezable_power_efficient_wq' is identical to system_freezable_wq, behavior is unchanged. Signed-off-by: Jeson Gao Signed-off-by: Chunyan Zhang Signed-off-by: Zhang Rui commit c200dac78fec66d87ef262cac38cfe4feabdf737 Author: Thomas Gleixner Date: Mon Oct 8 21:53:48 2018 +0200 x86/mm: Do not warn about PCI BIOS W+X mappings PCI BIOS requires the BIOS area 0x0A0000-0x0FFFFFF to be mapped W+X for various legacy reasons. When CONFIG_DEBUG_WX is enabled, this triggers the WX warning, but this is misleading because the mapping is required and is not a result of an accidental oversight. Prevent the full warning when PCI BIOS is enabled and the detected WX mapping is in the BIOS area. Just emit a pr_warn() which denotes the fact. This is partially duplicating the info which the PCI BIOS code emits when it maps the area as executable, but that info is not in the context of the WX checking output. Remove the extra %p printout in the WARN_ONCE() while at it. %pS is enough. Reported-by: Paul Menzel Signed-off-by: Thomas Gleixner Tested-by: Borislav Petkov Cc: Joerg Roedel Cc: Kees Cook Cc: Bjorn Helgaas Link: https://lkml.kernel.org/r/alpine.DEB.2.21.1810082151160.2455@nanos.tec.linutronix.de commit 3e98d240981a33290afc9435d01ec248e5880354 Merge: 3a58ac65e2d7 f18aef742c8f a1d09e074250 Author: Russell King Date: Wed Oct 10 13:53:33 2018 +0100 Merge branches 'fixes', 'misc' and 'spectre' into for-next commit f18aef742c8fbd68e280dff0a63ba0ca6ee8ad85 Author: Timothy E Baldwin Date: Mon Oct 8 19:26:48 2018 +0100 ARM: 8802/1: Call syscall_trace_exit even when system call skipped On at least x86 and ARM64, and as documented in the ptrace man page a skipped system call will still cause a syscall exit ptrace stop. Previous to this commit 32-bit ARM did not, resulting in strace being confused when seccomp skips system calls. This change also impacts programs that use ptrace to skip system calls. Fixes: ad75b51459ae ("ARM: 7579/1: arch/allow a scno of -1 to not cause a SIGILL") Signed-off-by: Timothy E Baldwin Signed-off-by: Eugene Syromyatnikov Reviewed-by: Kees Cook Tested-by: Kees Cook Tested-by: Eugene Syromyatnikov Signed-off-by: Russell King commit 605b3bec73cbd74b4ac937b580cd0b47d1300484 Author: Trent Piepho Date: Thu Sep 20 19:18:34 2018 +0000 spi: spidev: Fix OF tree warning logic spidev will make a big fuss if a device tree node binds a device by using "spidev" as the node's compatible property. However, the logic for this isn't looking for "spidev" in the compatible, but rather checking that the device is NOT compatible with spidev's list of devices. This causes a false positive if a device not named "rohm,dh2228fv", etc. binds to spidev, even if a means other than putting "spidev" in the device tree was used. E.g., the sysfs driver_override attribute. Signed-off-by: Trent Piepho Reviewed-by: Jan Kundrát Tested-by: Jan Kundrát Reviewed-by: Geert Uytterhoeven Signed-off-by: Mark Brown commit b802a5d6f345d207a5dd120149f6d2fdff2e4fcc Author: Johannes Berg Date: Mon Oct 1 09:16:08 2018 +0200 lib80211: don't use skcipher Using skcipher just makes the code longer, and mac80211 also "open-codes" the WEP encrypt/decrypt. Signed-off-by: Johannes Berg commit 5039563e7c25eccd7fec1de6706011009d1c5665 Author: Trent Piepho Date: Thu Sep 20 19:18:32 2018 +0000 spi: Add driver_override SPI device attribute This attribute works the same was as the identically named attribute for PCI, AMBA, and platform devices. For reference, see: commit 3cf385713460 ("ARM: 8256/1: driver coamba: add device binding path 'driver_override'") commit 3d713e0e382e ("driver core: platform: add device binding path 'driver_override'") commit 782a985d7af2 ("PCI: Introduce new device binding path using pci_dev.driver_override") If the name of a driver is written to this attribute, then the device will bind to the named driver and only the named driver. The device will bind to the driver even if the driver does not list the device in its id table. This behavior is different than the driver's bind attribute, which only allows binding to devices that are listed as supported by the driver. It can be used to bind a generic driver, like spidev, to a device. Signed-off-by: Trent Piepho Reviewed-by: Jan Kundrát Tested-by: Jan Kundrát Reviewed-by: Geert Uytterhoeven Signed-off-by: Mark Brown commit 8036dbc490d16dc3d998246e14c9507ec8272ae2 Author: Kuninori Morimoto Date: Wed Oct 10 02:22:29 2018 +0000 ASoC: audio-graph-card: enable mclk-fs on codec node Current audio-graph-card is supporting mclk-fs on CPU node side only. But having Codec node also is good idea. It will be just ignored if not defined. "rcpu_ep" is same as "cpu_ep", This patch tidyup it, too. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit 82ab7e9a4d3fcec27f745be04063e17da1881dda Author: Kuninori Morimoto Date: Wed Oct 10 02:20:42 2018 +0000 ASoC: rsnd: use 32bit TDM width as default commit fb2815f44a9e ("ASoC: rsnd: add support for 16/24 bit slot widths") added TDM width check, and return error if it was not 16/24/32 bit. But it is too strict. This patch uses 32bit same as default. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit 9641faa2db7e856f50a6d1169e1b9f01e7fcb2b0 Author: Arnd Bergmann Date: Wed Oct 10 10:37:13 2018 +0200 ASoC: max98988: add I2C dependency max98988 only builds with I2C support enabled, otherwise we get a build error: sound/soc/codecs/max98088.c:1789:1: error: data definition has no type or storage class [-Werror] module_i2c_driver(max98088_i2c_driver); ^~~~~~~~~~~~~~~~~ sound/soc/codecs/max98088.c:1789:1: error: type defaults to 'int' in declaration of 'module_i2c_driver' [-Werror=implicit-int] sound/soc/codecs/max98088.c:1789:1: error: parameter names (without types) in function declaration [-Werror] sound/soc/codecs/max98088.c:1780:26: error: 'max98088_i2c_driver' defined but not used [-Werror=unused-variable] Fixes: 24ae67c58250 ("ASoC: max98988: make it selectable") Signed-off-by: Arnd Bergmann Reviewed-by: Marco Felsch Signed-off-by: Mark Brown commit b7503e3dd8f1e5b28c3d79317afb010b29f9e979 Merge: a7d247f5fb3a 4f666675cdff Author: Ulf Hansson Date: Wed Oct 10 14:03:19 2018 +0200 Merge branch 'fixes' into next commit dab6558f57c8632d90dd75e00da78877a1dcf243 Author: Linus Walleij Date: Tue Oct 9 10:13:18 2018 +0200 pinctrl: gemini: Drop noisy debug prints The dev_info() in the pin control driver is really just good for debug, so drop it. Signed-off-by: Linus Walleij commit d17f477c5bc6b4a5dd9f51ae263870da132a8e89 Author: Linus Walleij Date: Tue Oct 9 10:11:53 2018 +0200 pinctrl: gemini: Mask and set properly The code was written under the assumption that the regmap_update_bits() would mask the bits in the mask and set the bits in the value. It missed the points that it will not set bits in the value unless these are also masked in the mask. Set value bits that are not in the mask will simply be ignored. Fixes: 06351d133dea ("pinctrl: add a Gemini SoC pin controller") Signed-off-by: Linus Walleij commit 71a9d395aa12279e53d411ef3345fddc840347c6 Author: Arnd Bergmann Date: Mon Oct 8 17:57:43 2018 +0200 pinctrl: mediatek: select GPIOLIB Removing the linux/gpio.h include means we no longer have a declaration of gpiochip_lock_as_irq() when CONFIG_GPIOLIB is disabled: drivers/pinctrl/mediatek/mtk-eint.c: In function 'mtk_eint_irq_request_resources': drivers/pinctrl/mediatek/mtk-eint.c:247:8: error: implicit declaration of function 'gpiochip_lock_as_irq'; did you mean 'spin_lock_irq'? [-Werror=implicit-function-declaration] drivers/pinctrl/mediatek/mtk-eint.c: In function 'mtk_eint_irq_release_resources': drivers/pinctrl/mediatek/mtk-eint.c:272:2: error: implicit declaration of function 'gpiochip_unlock_as_irq'; did you mean 'spin_unlock_irq'? [-Werror=implicit-function-declaration] Select it explictly instead. Fixes: 1c5fb66afa2a ("pinctrl: Include nothing else") Signed-off-by: Arnd Bergmann Signed-off-by: Linus Walleij commit 7a42781eee87e45c378e71688824da137a7afbf7 Author: Randy Dunlap Date: Sun Oct 7 15:57:00 2018 -0700 gpio: fix kernel-doc after devres.c file rename Fix gpio kernel-doc generation after rename of the devres.c file. Fixes these errors & warning: Error: Cannot open file ../drivers/gpio/devres.c Error: Cannot open file ../drivers/gpio/devres.c WARNING: kernel-doc '../scripts/kernel-doc -rst -enable-lineno -export ../drivers/gpio/devres.c' failed with return code 2 Signed-off-by: Randy Dunlap Signed-off-by: Linus Walleij commit bed2e8f4e851e26680234e4e1e9eaba62a9f0846 Author: Axel Lin Date: Tue Oct 2 18:00:27 2018 +0800 spi: rb4xx: Use SPI_BPW_MASK to set bits_per_word_mask Improve readability a bit. Signed-off-by: Axel Lin Signed-off-by: Mark Brown commit e4c080a10a23577303c0ef05c37c18661f758f34 Merge: f7d87826fe48 3fde0e16d016 Author: Arnd Bergmann Date: Wed Oct 10 13:46:19 2018 +0200 Merge tag 'zynqmp-soc-clk-for-v4.20' of https://github.com/Xilinx/linux-xlnx into next/drivers arm64: zynqmp: SoC CLK changes for v4.20 This patchset adds CCF compliant clock driver for ZynqMP. Clock driver queries supported clock information from firmware and regiters pll and output clocks with CCF. * tag 'zynqmp-soc-clk-for-v4.20' of https://github.com/Xilinx/linux-xlnx: drivers: clk: Add ZynqMP clock driver dt-bindings: clock: Add bindings for ZynqMP clock driver firmware: xilinx: Add zynqmp IOCTL API for device control Documentation: xilinx: Add documentation for eemi APIs Signed-off-by: Arnd Bergmann commit de8978c388c66b8fca192213ec9f0727e964c652 Author: Hieu Tran Dang Date: Tue Oct 2 18:06:36 2018 +0700 spi: fsl-lpspi: Prevent FIFO under/overrun by default Certain devices don't work well when a transmit FIFO underrun or receive FIFO overrun occurs. Example is the SAF400x radio chip when running at high speed which leads to garbage being sent to/received from the chip. In which case, it should stall waiting for further data to be available before proceeding. This patch unset the NOSTALL bit in CFGR1 by default to prevent this issue. Signed-off-by: Hieu Tran Dang Signed-off-by: Mark Brown commit f7d87826fe482dbe4b0675f99c1eae2890a2d8fb Merge: b0a2cea5eb63 b790c8ea5593 Author: Arnd Bergmann Date: Wed Oct 10 13:41:16 2018 +0200 Merge tag 'reset-for-4.20' of git://git.pengutronix.de/git/pza/linux into next/drivers Reset controller changes for v4.20 This adds a new driver for the PDC Global (Power Domain Controller) reset controller found on Qualcomm SDM845 SoCs, fixes a potential use-after-free issue in reset_controller_dev.of_xlate() callbacks from __of_reset_control_get(), and trivially fixes a documentation grammar issue. * tag 'reset-for-4.20' of git://git.pengutronix.de/git/pza/linux: reset: Fix potential use-after-free in __of_reset_control_get() reset: qcom: PDC Global (Power Domain Controller) reset controller dt-bindings: reset: Add PDC Global binding for SDM845 SoCs reset: Grammar s/more then once/more than once/ Signed-off-by: Arnd Bergmann commit b0a2cea5eb637d540ba86fd31dfd750f26ee0161 Merge: 75bda3609f94 b912de514a87 Author: Arnd Bergmann Date: Wed Oct 10 13:35:29 2018 +0200 Merge tag 'imx-drivers-4.20-2' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into next/drivers i.MX drivers change for 4.20, round 2: - A series from Aisheng Dong to add SCU firmware driver for i.MX8 SoCs. It implements IPC mechanism based on mailbox for message exchange between AP and SCU firmware, and a set of SCU IPC service APIs used by clients like i.MX8 power domain and clock drivers. * tag 'imx-drivers-4.20-2' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: MAINTAINERS: imx: include drivers/firmware/imx path firmware: imx: add misc svc support firmware: imx: add SCU firmware driver support dt-bindings: arm: fsl: add scu binding doc Signed-off-by: Arnd Bergmann commit 3925b90fa4622b708fc609c98a3f346ee6641e8c Author: Uwe Kleine-König Date: Mon Oct 8 11:34:03 2018 +0200 gpio: fix doc string for devm_gpiochip_add_data() to not talk about irq_chip The function is about adding a gpio_chip so dev has to belong to this one. Fix wording to be more grammatically correct (but attention, I'm not a native speaker). Signed-off-by: Uwe Kleine-König Signed-off-by: Linus Walleij commit c18fb34ae185ad3b2444cd5e308ef5f91d8c9a46 Author: Axel Lin Date: Tue Oct 9 16:52:21 2018 +0800 regulator: stpmic1: Return REGULATOR_MODE_INVALID for invalid mode -EINVAL is not a valid return value for .of_map_mode, return REGULATOR_MODE_INVALID instead. Signed-off-by: Axel Lin Signed-off-by: Mark Brown commit 3bc3206e1c0f3f8891b544df02caae0e6d844f7d Author: Vabhav Sharma Date: Wed Oct 10 03:56:16 2018 +0530 serial: fsl_lpuart: Remove the alias node dependence Numbering the ttyLPn space should not depend on the generic name "serial". If don't add the alias node like:"serial0 = &lpuart0;", then lpuart will probe failed: [ 0.773410] fsl-lpuart 2950000.serial: failed to get alias id, errno -19 So remove the alias node dependence, and add the support for allocate the line port automatically. Signed-off-by: Yuan Yao Signed-off-by: Vabhav Sharma Signed-off-by: Greg Kroah-Hartman commit a2d6e3e60abddbd0b949841611140c614957f6d5 Author: Bhanusree Pola Date: Wed Oct 10 06:40:35 2018 +0530 staging: mt7621-dma: Delete unused define delete unused '#define GDMA_REG_CTRL1_CONTINOUS BIT(14)' Signed-off-by: Bhanusree Pola Signed-off-by: Greg Kroah-Hartman commit 2abd7814138774eb56319e9dcc0abd08ece45424 Author: Gao Xiang Date: Tue Oct 9 22:07:13 2018 +0800 staging: erofs: harden inode lookup for 32-bit platforms This patch introduces inode hash function, test and set callbacks, and iget5_locked to find the right inode for 32-bit platforms. Reviewed-by: Chao Yu Signed-off-by: Gao Xiang Signed-off-by: Greg Kroah-Hartman commit 10844575cc1224b7697d5b430e361c287c406d3f Author: Michael Straube Date: Tue Oct 9 17:48:54 2018 +0200 staging: rtl8188eu: remove whitespace - style Replace tabs with spaces and/or remove extra spaces where appropriate. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit f8f4e529f3725849e2f74f47f7c5e54b331de32b Author: Michael Straube Date: Tue Oct 9 17:48:53 2018 +0200 staging: rtl8188eu: cleanup lines over 80 characters - style Clear 'line over 80 characters' checkpatch warnings by adding appropriate line breaks and moving a comment. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit 847a648e15f66a782649c0593eb7e698f57b9328 Author: Michael Straube Date: Tue Oct 9 17:48:52 2018 +0200 staging: rtl8188eu: add spaces around operators - style Add spaces around '*' and '/' to follow kernel coding style. Reported by checkpatch. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit f4256fc7f2a88e2f52ef2ca1a0fd729bded7021a Author: Michael Straube Date: Tue Oct 9 17:48:51 2018 +0200 staging: rtl8188eu: use __func__ instead of hardcoded name - style Use __func__ instead of hardcoded function name in rtw_xmit_entry(). Reported by checkpatch. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit 3babca4555b20fc80aff4776662fb237257d9afd Author: Takashi Sakamoto Date: Wed Oct 10 15:35:02 2018 +0900 ALSA: firewire: simplify cleanup process when failing to register sound card In former commits, .private_free callback releases resources just for data transmission. This release function can be called without the resources are actually allocated in error paths. This commit applies a small refactoring to clean up codes in error paths. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai commit 873608dc6b5da7a2571419bfa10e0d088d39cee0 Author: Takashi Sakamoto Date: Wed Oct 10 15:35:01 2018 +0900 ALSA: bebob/fireworks: simplify handling of local device entry table In drivers of ALSA firewire stack, bebob and fireworks drivers have local device entry table. At present, critical section to operate the table is from the beginning/end of 'do_registration' call. This can be more narrow and simplify codes. This commit applies small refactoring for the above purpose. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai commit 5b14ec25a79bf60fc9a663fe579a500b6ac9d8ab Author: Takashi Sakamoto Date: Wed Oct 10 15:35:00 2018 +0900 ALSA: firewire: release reference count of firewire unit in .remove callback of bus driver In a previous commit, drivers in ALSA firewire stack blocks .remove callback of bus driver. This enables to release members of private data in the callback after releasing device of sound card. This commit simplifies codes to release the members. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai commit 61ccc6f6b27c03bb32ca38a3c580d49ce1612d43 Author: Takashi Sakamoto Date: Wed Oct 10 15:34:59 2018 +0900 ALSA: firewire: block .remove callback of bus driver till all of ALSA character devices are released At present, in .remove callback of bus driver just decrease reference count of device for ALSA card instance. This delegates release of the device to a process in which the last of ALSA character device is released. On the other hand, the other drivers such as for devices on PCIe are programmed to block .remove callback of bus driver till all of ALSA character devices are released. For consistency of behaviour for whole drivers, this probably confuses users. This commit takes drivers in ALSA firewire stack to imitate the above behaviour. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai commit 5fd8d05191e6bca88b6d6d016757c30bded9fe61 Author: Uwe Kleine-König Date: Fri Oct 5 21:42:05 2018 +0200 pinctrl: rza1: don't manually release devm managed resources If the probe function fails the driver core cares to return the allocated resources automatically. So the driver can be simplified accordingly. Signed-off-by: Uwe Kleine-König Acked-by: Jacopo Mondi Signed-off-by: Linus Walleij commit d59e0ba19481c0046d2ea2bd0e5344eeaf45aace Author: Peng Hao Date: Tue Oct 9 11:43:35 2018 -0400 tick/sched : Remove redundant cpu_online() check can_stop_idle_tick() checks cpu_online() twice. The first check leaves the function when the CPU is not online, so the second check it redundant. Remove it. Signed-off-by: Peng Hao Signed-off-by: Thomas Gleixner Cc: fweisbec@gmail.com Link: https://lkml.kernel.org/r/1539099815-2943-1-git-send-email-penghao122@sina.com.cn commit b0b378acde3da08663c580897ea91845489ecfc4 Merge: 693ecc7d0307 ef26d96023a4 Author: Linus Walleij Date: Wed Oct 10 11:15:33 2018 +0200 Merge tag 'sh-pfc-for-v4.20-tag3' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into devel pinctrl: sh-pfc: Updates for v4.20 (take three) - Add support for the new RZ/N1D (R9A06G032) and RZ/N1S (R9A06G033) SoCs, - Add INTC-EX pin groups on R-Car E3. commit 693ecc7d03079fa7f6e15bdc3df77dc351799a10 Author: Sean Wang Date: Thu Oct 4 19:40:38 2018 +0800 MAINTAINERS: update entry for Mediatek pin controller Add all source files under drivers/pinctrl/mediatek for the entry and change the address to a permanent one since I have a personal leave over the next few months and the address would be suspended for a while. Cc: Linus Walleij Signed-off-by: Sean Wang Signed-off-by: Sean Wang Signed-off-by: Linus Walleij commit e7b66d16fe41722350ba87f5788052ef53ee28bb Author: Juergen Gross Date: Wed Oct 10 08:14:56 2018 +0200 x86/acpi, x86/boot: Take RSDP address for boot params if available In case the RSDP address in struct boot_params is specified don't try to find the table by searching, but take the address directly as set by the boot loader. Signed-off-by: Juergen Gross Cc: Andy Lutomirski Cc: Andy Shevchenko Cc: Baoquan He Cc: Borislav Petkov Cc: Jia Zhang Cc: Len Brown Cc: Linus Torvalds Cc: Pavel Machek Cc: Pavel Tatashin Cc: Peter Zijlstra Cc: Rafael J. Wysocki Cc: Thomas Gleixner Cc: boris.ostrovsky@oracle.com Cc: linux-kernel@vger.kernel.org Cc: linux-pm@vger.kernel.org Cc: xen-devel@lists.xenproject.org Link: http://lkml.kernel.org/r/20181010061456.22238-4-jgross@suse.com Signed-off-by: Ingo Molnar commit ae7e1238e68f2a472a125673ab506d49158c1889 Author: Juergen Gross Date: Wed Oct 10 08:14:55 2018 +0200 x86/boot: Add ACPI RSDP address to setup_header Xen PVH guests receive the address of the RSDP table from Xen. In order to support booting a Xen PVH guest via Grub2 using the standard x86 boot entry we need a way for Grub2 to pass the RSDP address to the kernel. For this purpose expand the struct setup_header to hold the physical address of the RSDP address. Being zero means it isn't specified and has to be located the legacy way (searching through low memory or EBDA). While documenting the new setup_header layout and protocol version 2.14 add the missing documentation of protocol version 2.13. There are Grub2 versions in several distros with a downstream patch violating the boot protocol by writing past the end of setup_header. This requires another update of the boot protocol to enable the kernel to distinguish between a specified RSDP address and one filled with garbage by such a broken Grub2. From protocol 2.14 on Grub2 will write the version it is supporting (but never a higher value than found to be supported by the kernel) ored with 0x8000 to the version field of setup_header. This enables the kernel to know up to which field Grub2 has written information to. All fields after that are supposed to be clobbered. Signed-off-by: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: boris.ostrovsky@oracle.com Cc: bp@alien8.de Cc: corbet@lwn.net Cc: linux-doc@vger.kernel.org Cc: xen-devel@lists.xenproject.org Link: http://lkml.kernel.org/r/20181010061456.22238-3-jgross@suse.com Signed-off-by: Ingo Molnar commit 357d291ce035d1b757568058f3c9898c60d125b1 Author: Juergen Gross Date: Wed Oct 10 08:14:54 2018 +0200 x86/xen: Fix boot loader version reported for PVH guests The boot loader version reported via sysfs is wrong in case of the kernel being booted via the Xen PVH boot entry. it should be 2.12 (0x020c), but it is reported to be 2.18 (0x0212). As the current way to set the version is error prone use the more readable variant (2 << 8) | 12. Signed-off-by: Juergen Gross Cc: # 4.12 Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: boris.ostrovsky@oracle.com Cc: bp@alien8.de Cc: corbet@lwn.net Cc: linux-doc@vger.kernel.org Cc: xen-devel@lists.xenproject.org Link: http://lkml.kernel.org/r/20181010061456.22238-2-jgross@suse.com Signed-off-by: Ingo Molnar commit 70728c29465bc4bfa7a8c14304771eab77e923c7 Author: Marek Vasut Date: Thu Oct 4 00:52:52 2018 +0200 gpio: syscon: Fix possible NULL ptr usage The priv->data->set can be NULL while flags contains GPIO_SYSCON_FEAT_OUT and chip->set is valid pointer. This happens in case the controller uses the default GPIO setter. Always use chip->set to access the setter to avoid possible NULL pointer dereferencing. Signed-off-by: Marek Vasut Signed-off-by: Linus Walleij commit 3edfb7bd76bd1cba6b917736943dffd799deed8a Author: Ricardo Ribalda Delgado Date: Fri Oct 5 08:53:00 2018 +0200 gpiolib: Show correct direction from the beginning Current code assumes that the direction is input if direction_input function is set. This might not be the case on GPIOs with programmable direction. Signed-off-by: Ricardo Ribalda Delgado Tested-by: Jeffrey Hugo Signed-off-by: Linus Walleij commit 6f0ec09afe278ea2a5d63f31b754db6655c69078 Author: Ricardo Ribalda Delgado Date: Fri Oct 5 08:52:59 2018 +0200 pinctrl: msm: Use init_valid_mask exported function The current code produces XPU violation if get_direction is called just after the initialization. Signed-off-by: Ricardo Ribalda Delgado Acked-by: Timur Tabi Tested-by: Jeffrey Hugo Signed-off-by: Linus Walleij commit f8ec92a9f63b3b11e399409141b7868bb405e6b5 Author: Ricardo Ribalda Delgado Date: Fri Oct 5 08:52:58 2018 +0200 gpiolib: Add init_valid_mask exported function Add a function that allows initializing the valid_mask from gpiochip_add_data. This prevents race conditions during gpiochip initialization. If the function is not exported, then the old behaviour is respected, this is, set all gpios as valid. Signed-off-by: Ricardo Ribalda Delgado Tested-by: Jeffrey Hugo Signed-off-by: Linus Walleij commit 2505c7b0128f63289a59d77ee39cacd08aacf779 Author: Eugeniy Paltsev Date: Fri Sep 28 16:15:30 2018 +0300 GPIO: add single-register GPIO via CREG driver Add single-register MMIO GPIO driver for complex cases where only several fields in register belong to GPIO lines and each GPIO line owns a field with different length and on/off value. Such CREG GPIOs are used in Synopsys AXS10x and HSDK boards. Signed-off-by: Eugeniy Paltsev Signed-off-by: Linus Walleij commit 29f55cc664f48cfeee661b2dbea39cd72a311e7e Author: Eugeniy Paltsev Date: Fri Sep 28 16:15:31 2018 +0300 dt-bindings: Document the Synopsys GPIO via CREG bindings This patch adds documentation of device tree bindings for the Synopsys GPIO via CREG driver. Reviewed-by: Rob Herring Reviewed-by: Linus Walleij Signed-off-by: Eugeniy Paltsev Signed-off-by: Linus Walleij commit c12fb1774deaa9c9408b19db8d43d3612f6e47a0 Author: Rafał Miłecki Date: Wed Sep 26 21:31:03 2018 +0200 pinctrl: bcm: add Northstar driver This driver provides support for Northstar mux controller. It differs from Northstar Plus one so a new binding and driver were needed. Signed-off-by: Rafał Miłecki Signed-off-by: Linus Walleij commit 3f9f82b3ffb8bfe01988c890e3a24328e9e1c1df Author: Rafał Miłecki Date: Wed Sep 26 21:31:02 2018 +0200 dt-bindings: pinctrl: document Broadcom Northstar pin mux controller Northstar has mux controller just like Northstar Plus and Northstar2. It's a bit different though (different registers & pins) so it requires its own binding. It's needed to allow other block bindings specify required mux setup. Signed-off-by: Rafał Miłecki Reviewed-by: Florian Fainelli Signed-off-by: Linus Walleij commit d06fb562bff5d14defdacbd92449bacbaedd5cdf Author: Hui Wang Date: Wed Oct 10 11:57:25 2018 +0800 ALSA: hda/realtek - Fix the problem of the front MIC on the Lenovo M715 The front MIC on the Lenovo M715 can't record sound, after applying the ALC294_FIXUP_LENOVO_MIC_LOCATION, the problem is fixed. So add the pin configuration of this machine to the pin quirk table. Cc: Signed-off-by: Hui Wang Signed-off-by: Takashi Iwai commit 62e681f7dcab746412dce22d4b75b32c5ea38cdb Merge: d995052cade4 16f37102181e Author: Dave Airlie Date: Wed Oct 10 16:49:37 2018 +1000 Merge tag 'drm-msm-fixes-2018-10-09' of git://people.freedesktop.org/~robclark/linux into drm-next Fix 32-bit arm build. Signed-off-by: Dave Airlie From: Rob Clark Link: https://patchwork.freedesktop.org/patch/msgid/CAF6AEGt7s20e4aJmnOFM-uZHfYSsicy0E=ssse1D7LTXX4jnWQ@mail.gmail.com commit d995052cade4f4e2700f6e2045cd5db400986b17 Merge: 6952e3a1dffc 3ce36b4542b5 Author: Dave Airlie Date: Mon Oct 8 16:45:56 2018 +1000 Merge tag 'drm-msm-next-2018-10-07' of git://people.freedesktop.org/~robclark/linux into drm-next This time mostly further refinement of dpu1+a6xx for sdm845 and beyond.. and hurray for more negative diffstat :-) - Misc cleanups and fixes - GPU preemption optimization - a6xx perf improvements and clock fixes (ie. lets actually not run at minimum clks) - a6xx devfreq/DCVS - Lots of code cleanup across dpu (Bruce, Jeykumar, Sean) - Fixed a few crashes on startup relating to dsi (Sean) - Add cursor support (Sravanthi, Sean) - Properly free mdss irq on destroy (Jordan) - Use correct encoder_type when initializing, fixes crash on boot (Stephen) Signed-off-by: Dave Airlie From: Rob Clark Link: https://patchwork.freedesktop.org/patch/msgid/CAF6AEGsNevCzMiLuNW1EVN6gtP3JZSir6PfnWvnCavSZM+bUFQ@mail.gmail.com commit 72a9c673636b779e370983fea08e40f97039b981 Author: Adam Borowski Date: Tue Oct 9 08:28:03 2018 +0200 x86/defconfig: Enable CONFIG_USB_XHCI_HCD=y A spanking new machine I just got has all but one USB ports wired as 3.0. Booting defconfig resulted in no keyboard or mouse, which was pretty uncool. Let's enable that -- USB3 is ubiquitous rather than an oddity. As 'y' not 'm' -- recovering from initrd problems needs a keyboard. Also add it to the 32-bit defconfig. Signed-off-by: Adam Borowski Cc: Greg Kroah-Hartman Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-usb@vger.kernel.org Link: http://lkml.kernel.org/r/20181009062803.4332-1-kilobyte@angband.pl Signed-off-by: Ingo Molnar commit 1e2517d126171a41f801738ffd19687836cd178a Author: Brian Norris Date: Tue Oct 9 15:25:27 2018 -0700 remoteproc: qcom: q6v5: shore up resource probe handling Commit d5269c4553a6 ("remoteproc: qcom: q6v5: Propagate EPROBE_DEFER") fixed up our probe code to handle -EPROBE_DEFER, but it ignored one of our interrupts, and it also didn't really handle all the other error codes you might get (e.g., with a bad DT definition). Handle those all explicitly. Fixes: d5269c4553a6 ("remoteproc: qcom: q6v5: Propagate EPROBE_DEFER") Reviewed-by: Douglas Anderson Signed-off-by: Brian Norris Signed-off-by: Bjorn Andersson commit 6e6b1ada0c6a745b0190016b1f50b699a625a944 Author: Wei Yongjun Date: Wed Oct 10 03:59:39 2018 +0000 remoteproc: qcom: qcom_q6v5_adsp: Fix some return value check In case of error, the functions devm_kcalloc() and devm_ioremap() returns NULL pointer not ERR_PTR(). The IS_ERR() test in the return value check should be replaced with NULL test. Also removed -EPROBE_DEFER check since devm_kcalloc never return this error. Fixes: dc160e449122 ("remoteproc: qcom: Introduce Non-PAS ADSP PIL driver") Signed-off-by: Wei Yongjun Signed-off-by: Bjorn Andersson commit ffa5f9c84810ea175226863f66a51bb2d4502f5b Author: Loic Pallardy Date: Fri Jul 27 15:14:46 2018 +0200 remoteproc: modify rproc_handle_carveout to support pre-registered region In current version rproc_handle_carveout() function registers carveout for allocation. This patch extends rproc_handle_carveout() function to support pre-registered region. Match is done on region name, then requested device address and length are checked. If match found, pre-registered region is associated with resource table request. If no name match found, new carveout is registered for allocation. Signed-off-by: Loic Pallardy Signed-off-by: Bjorn Andersson commit c874bf59add0e6ed1d5d8c1753b9b66d51e3f640 Author: Loic Pallardy Date: Fri Jul 27 15:14:45 2018 +0200 remoteproc: add helper function to check carveout device address This patch introduces a function to verify that a specified carveout is fitting request device address and associated length Signed-off-by: Loic Pallardy Signed-off-by: Bjorn Andersson commit bc3f4b5c60db2a835e68bfdce23b6ae75df7e295 Author: Nathan Chancellor Date: Mon Oct 8 15:20:41 2018 -0700 platform/chrome: chromeos_tbmc - Remove unneeded const Clang warns: drivers/platform/chrome/chromeos_tbmc.c:102:14: warning: duplicate 'const' declaration specifier [-Wduplicate-decl-specifier] static const SIMPLE_DEV_PM_OPS(chromeos_tbmc_pm_ops, NULL, ^ ./include/linux/pm.h:365:56: note: expanded from macro 'SIMPLE_DEV_PM_OPS' ^ 1 warning generated. SIMPLE_DEV_PM_OPS is already declared as const, this one is unnecessary so remove it. Signed-off-by: Nathan Chancellor Signed-off-by: Benson Leung commit 1429cca1175f4cb64dd5d61ffd6037895a41d672 Author: Loic Pallardy Date: Fri Jul 27 15:14:44 2018 +0200 remoteproc: add helper function to allocate rproc_mem_entry from reserved memory This patch introduces rproc_res_mem_entry_init() helper function to allocate a rproc_mem_entry structure from a reserved memory region. In that case, rproc_mem_entry structure has no alloc and release ops. It will be used to assigned the specified reserved memory to any rproc sub device. Relation between rproc_mem_entry and rproc sub device will be done by name. Signed-off-by: Loic Pallardy Signed-off-by: Bjorn Andersson commit d7c51706d0956472b7c0530b1bf8fba32d82ee6b Author: Loic Pallardy Date: Fri Jul 27 15:14:43 2018 +0200 remoteproc: add alloc ops in rproc_mem_entry struct Memory entry could be allocated in different ways (ioremap, dma_alloc_coherent, internal RAM allocator...). This patch introduces an alloc ops in rproc_mem_entry structure to associate dedicated allocation mechanism to each memory entry descriptor in order to do remote core agnostic from memory allocators. The introduction of this ops allows to perform allocation of all registered carveout at the same time, just before calling rproc_start(). It simplifies and makes uniform carveout management whatever origin. Signed-off-by: Loic Pallardy Signed-off-by: Bjorn Andersson commit b0019ccd7e90178929ce1afe944ab85d8a39d7a4 Author: Loic Pallardy Date: Fri Jul 27 15:14:42 2018 +0200 remoteproc: introduce rproc_find_carveout_by_name function This patch provides a new function to find a carveout according to a name. If match found, this function returns a pointer on the corresponding carveout (rproc_mem_entry structure). Signed-off-by: Loic Pallardy Signed-off-by: Bjorn Andersson commit 15c0b0258e4f1c3c817f34d092d2cc6ff5178bdd Author: Loic Pallardy Date: Fri Jul 27 15:14:41 2018 +0200 remoteproc: introduce rproc_add_carveout function This patch introduces a new API to allow platform driver to register platform specific carveout regions. Signed-off-by: Loic Pallardy Acked-by: Bjorn Andersson Signed-off-by: Bjorn Andersson commit 72029c901a0244ca2e1eb09e1c453413a17f5787 Author: Loic Pallardy Date: Fri Jul 27 15:14:40 2018 +0200 remoteproc: add helper function to allocate and init rproc_mem_entry struct This patch introduces rproc_mem_entry_init helper function to simplify rproc_mem_entry structure allocation and filling by client. Signed-off-by: Loic Pallardy Signed-off-by: Bjorn Andersson commit 3265230c5b05fe919291d09e266a8aedc85ebad0 Author: Loic Pallardy Date: Fri Jul 27 15:14:39 2018 +0200 remoteproc: add name in rproc_mem_entry struct Add name field in struct rproc_mem_entry. This new field will be used to match memory area requested in resource table with pre-registered carveout. Signed-off-by: Loic Pallardy Acked-by: Bjorn Andersson Signed-off-by: Bjorn Andersson commit f2e74abfaad446765ce0350aed1d9c5eed5b1b36 Author: Loic Pallardy Date: Fri Jul 27 15:14:38 2018 +0200 remoteproc: add release ops in rproc_mem_entry struct Memory entry could be allocated in different ways (ioremap, dma_alloc_coherent, internal RAM allocator...). This patch introduces a release ops in rproc_mem_entry structure to associate dedicated release mechanism to each memory entry descriptor in order to keep remoteproc core generic. Signed-off-by: Loic Pallardy Acked-by: Bjorn Andersson Signed-off-by: Bjorn Andersson commit eb30596eae947ce9072507a3ca112a9dd4601d85 Author: Loic Pallardy Date: Fri Jul 27 15:14:37 2018 +0200 remoteproc: add rproc_va_to_pa function This new function translates CPU virtual address in CPU physical one according to virtual address location. Signed-off-by: Loic Pallardy Acked-by: Bjorn Andersson Signed-off-by: Bjorn Andersson commit 3bc8140b157c973f3746cc72d31b3fe0fa7a4117 Author: Loic Pallardy Date: Fri Jul 27 15:14:36 2018 +0200 remoteproc: configure IOMMU only if device address requested If there is no IOMMU associate to remote processor device, remoteproc_core won't be able to satisfy device address requested in firmware resource table. Return an error as configuration won't be coherent. Signed-off-by: Loic Pallardy Signed-off-by: Bjorn Andersson commit c72251ad879056d096d39db21c08cb52e481eb2d Author: Heiko Carstens Date: Tue Oct 9 12:23:43 2018 +0200 s390/mem_detect: add missing include Fix this allnoconfig build breakage: arch/s390/boot/mem_detect.c: In function 'tprot': arch/s390/boot/mem_detect.c:122:12: error: 'EFAULT' undeclared (first use in this function) Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky commit e494990e7b74c55862b8b19c28ce38628a282cef Author: Heiko Carstens Date: Tue Oct 9 12:32:56 2018 +0200 s390/dumpstack: print psw mask and address again With pointer obfuscation the output of show_registers() became quite useless: Krnl PSW : (____ptrval____) (____ptrval____) (__list_add_valid+0x98/0xa8) In order to print the psw mask and address use %px instead of %p. And the output looks again like this: Krnl PSW : 0404d00180000000 00000000007c0dd0 (__list_add_valid+0x98/0xa8) Reviewed-by: Martin Schwidefsky Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky commit 52a34b34d4ff9a61bc6da9740541d8f08a40438c Author: Ingo Franzki Date: Mon Aug 27 10:40:10 2018 +0200 s390/crypto: Enhance paes cipher to accept variable length key material Enhance the paes_s390 kernel module to allow the paes cipher to accept variable length key material. The key material accepted by the paes cipher is a key blob of various types. As of today, two key blob types are supported: CCA secure key blobs and protected key blobs. Signed-off-by: Ingo Franzki Reviewed-by: Harald Freudenberger Reviewed-by: Hendrik Brueckner Signed-off-by: Martin Schwidefsky commit fb1136d6580c93af3ec33bf7a5621d980a711f24 Author: Ingo Franzki Date: Fri Aug 24 11:29:15 2018 +0200 s390/pkey: Introduce new API for transforming key blobs Introduce a new ioctl API and in-kernel API to transform a variable length key blob of any supported type into a protected key. Transforming a secure key blob uses the already existing function pkey_sec2protk(). Transforming a protected key blob also verifies if the protected key is still valid. If not, -ENODEV is returned. Both APIs are described in detail in the header files arch/s390/include/asm/pkey.h and arch/s390/include/uapi/asm/pkey.h. Signed-off-by: Ingo Franzki Reviewed-by: Harald Freudenberger Reviewed-by: Hendrik Brueckner Signed-off-by: Martin Schwidefsky commit cb26b9ff7187ea79698f5e872d713f30affcc0a3 Author: Ingo Franzki Date: Thu Aug 23 17:49:38 2018 +0200 s390/pkey: Introduce new API for random protected key verification Introduce a new ioctl API and in-kernel API to verify if a random protected key is still valid. A protected key is invalid when its wrapping key verification pattern does not match the verification pattern of the LPAR. Each time an LPAR is activated, a new LPAR wrapping key is generated and the wrapping key verification pattern is updated. Both APIs are described in detail in the header files arch/s390/include/asm/pkey.h and arch/s390/include/uapi/asm/pkey.h. Signed-off-by: Ingo Franzki Reviewed-by: Harald Freudenberger Reviewed-by: Hendrik Brueckner Signed-off-by: Martin Schwidefsky commit af504452d10ece7c6d68bc9f90f478ebecd7ce76 Author: Ingo Franzki Date: Fri Aug 24 10:29:43 2018 +0200 s390/pkey: Add sysfs attributes to emit secure key blobs Add binary read-only sysfs attributes for the pkey module that can be used to read random ccadata secure keys from. Keys are read from these attributes using a cat-like interface. A typical use case for those keys is to encrypt a swap device using the paes cipher. During processing of /etc/crypttab, the random random ccadata secure key to encrypt the swap device is read from one of the attributes. The following attributes are added: ccadata/aes_128 ccadata/aes_192 ccadata/aes_256 ccadata/aes_128_xts ccadata/aes_256_xts Each attribute emits a secure key blob for the corresponding key size and cipher mode. Signed-off-by: Ingo Franzki Reviewed-by: Harald Freudenberger Reviewed-by: Hendrik Brueckner Signed-off-by: Martin Schwidefsky commit d632c0478d64427cfbca999955e02b26986ae09e Author: Ingo Franzki Date: Thu Aug 23 16:59:30 2018 +0200 s390/pkey: Add sysfs attributes to emit protected key blobs Add binary read-only sysfs attributes for the pkey module that can be used to read random protected keys from. Keys are read from these attributes using a cat-like interface. A typical use case for those keys is to encrypt a swap device using the paes cipher. During processing of /etc/crypttab, the random protected key to encrypt the swap device is read from one of the attributes. The following attributes are added: protkey/aes_128 protkey/aes_192 protkey/aes_256 protkey/aes_128_xts protkey/aes_256_xts Each attribute emits a protected key blob for the corresponding key size and cipher mode. Signed-off-by: Ingo Franzki Reviewed-by: Harald Freudenberger Reviewed-by: Hendrik Brueckner Signed-off-by: Martin Schwidefsky commit 438363c0feb831ac3f66646939b3833362750d94 Author: Yonghong Song Date: Tue Oct 9 16:14:47 2018 -0700 tools/bpf: use proper type and uapi perf_event.h header for libbpf Use __u32 instead u32 in libbpf.c and also use uapi perf_event.h instead of tools/perf/perf-sys.h. Signed-off-by: Yonghong Song Acked-by: Song Liu Signed-off-by: Alexei Starovoitov commit a0f99e67969b372b9a2871c32fd97e2757021afe Merge: e0aa5cf5919e 97396ff0bc2d Author: Alexei Starovoitov Date: Tue Oct 9 21:59:09 2018 -0700 Merge branch 'xdp-vlan' Jesper Dangaard Brouer says: ==================== While implementing PoC building blocks for eBPF code XDP+TC that can manipulate VLANs headers, I discovered a bug in generic-XDP. The fix should be backported to stable kernels. Even-though generic-XDP was introduced in v4.12, I think the bug is not exposed until v4.14 in the mentined fixes commit. ==================== Acked-by: Song Liu Signed-off-by: Alexei Starovoitov commit 97396ff0bc2d31f8fcb29cbb57d2e0bbcb96d6c5 Author: Jesper Dangaard Brouer Date: Tue Oct 9 12:04:53 2018 +0200 selftests/bpf: add XDP selftests for modifying and popping VLAN headers This XDP selftest also contain a small TC-bpf component. It provoke the generic-XDP bug fixed in previous commit. The selftest itself shows how to do VLAN manipulation from XDP and TC. The test demonstrate how XDP ingress can remove a VLAN tag, and how TC egress can add back a VLAN tag. This use-case originates from a production need by ISP (kviknet.dk), who gets DSL-lines terminated as VLAN Q-in-Q tagged packets, and want to avoid having an net_device for every end-customer on the box doing the L2 to L3 termination. The test-setup is done via a veth-pair and creating two network namespaces (ns1 and ns2). The 'ns1' simulate the ISP network that are loading the BPF-progs stripping and adding VLAN IDs. The 'ns2' simulate the DSL-customer that are using VLAN tagged packets. Running the script with --interactive, will simply not call the cleanup function. This gives the effect of creating a testlab, that the users can inspect and play with. The --verbose option will simply request that the shell will print input lines as they are read, this include comments, which in effect make the comments visible docs. Reported-by: Yoel Caspersen Signed-off-by: Jesper Dangaard Brouer Signed-off-by: Alexei Starovoitov commit 4f775448f4d79e2db5791fcc3aa708373497d7e6 Author: Jesper Dangaard Brouer Date: Tue Oct 9 12:04:48 2018 +0200 bpf: make TC vlan bpf_helpers avail to selftests The helper bpf_skb_vlan_push is needed by next patch, and the helper bpf_skb_vlan_pop is added for completeness, regarding VLAN helpers. Signed-off-by: Jesper Dangaard Brouer Signed-off-by: Alexei Starovoitov commit 2972495699320229b55b8e5065a310be5c81485b Author: Jesper Dangaard Brouer Date: Tue Oct 9 12:04:43 2018 +0200 net: fix generic XDP to handle if eth header was mangled XDP can modify (and resize) the Ethernet header in the packet. There is a bug in generic-XDP, because skb->protocol and skb->pkt_type are setup before reaching (netif_receive_)generic_xdp. This bug was hit when XDP were popping VLAN headers (changing eth->h_proto), as skb->protocol still contains VLAN-indication (ETH_P_8021Q) causing invocation of skb_vlan_untag(skb), which corrupt the packet (basically popping the VLAN again). This patch catch if XDP changed eth header in such a way, that SKB fields needs to be updated. V2: on request from Song Liu, use ETH_HLEN instead of mac_len, in __skb_push() as eth_type_trans() use ETH_HLEN in paired skb_pull_inline(). Fixes: d445516966dc ("net: xdp: support xdp generic on virtual devices") Signed-off-by: Jesper Dangaard Brouer Signed-off-by: Alexei Starovoitov commit e0aa5cf5919ee272732fce9576222e58e48622ab Merge: 8af03d1ae2e1 7c85c448e7d7 Author: Alexei Starovoitov Date: Tue Oct 9 21:52:21 2018 -0700 Merge branch 'unsupported-map-lookup' Prashant Bhole says: ==================== Currently when map a lookup fails, user space API can not make any distinction whether given key was not found or lookup is not supported by particular map. In this series we modify return value of maps which do not support lookup. Lookup on such map implementation will return -EOPNOTSUPP. bpf() syscall with BPF_MAP_LOOKUP_ELEM command will set EOPNOTSUPP errno. We also handle this error in bpftool to print appropriate message. Patch 1: adds handling of BPF_MAP_LOOKUP ELEM command of bpf syscall such that errno will set to EOPNOTSUPP when map doesn't support lookup Patch 2: Modifies the return value of map_lookup_elem() to EOPNOTSUPP for maps which do not support lookup Patch 3: Splits do_dump() in bpftool/map.c. Element printing code is moved out into new function dump_map_elem(). This was done in order to reduce deep indentation and accomodate further changes. Patch 4: Changes in bpftool to print strerror() message when lookup error is occured. This will result in appropriate message like "Operation not supported" when map doesn't support lookup. Patch 5: test_verifier: change fixup map naming convention as suggested by Alexei Patch 6: Added verifier tests to check whether verifier rejects call to bpf_map_lookup_elem from bpf program. For all map types those do not support map lookup. ==================== Signed-off-by: Alexei Starovoitov commit 7c85c448e7d74c4ddd759440a2141eab663567cf Author: Prashant Bhole Date: Tue Oct 9 10:04:54 2018 +0900 selftests/bpf: test_verifier, check bpf_map_lookup_elem access in bpf prog map_lookup_elem isn't supported by certain map types like: - BPF_MAP_TYPE_PROG_ARRAY - BPF_MAP_TYPE_STACK_TRACE - BPF_MAP_TYPE_XSKMAP - BPF_MAP_TYPE_SOCKMAP/BPF_MAP_TYPE_SOCKHASH Let's add verfier tests to check whether verifier prevents bpf_map_lookup_elem call on above programs from bpf program. Signed-off-by: Prashant Bhole Acked-by: Alexei Starovoitov Acked-by: Song Liu Signed-off-by: Alexei Starovoitov commit 908142e61b2e9c2411e8bc4e5092a6ab06eca8e4 Author: Prashant Bhole Date: Tue Oct 9 10:04:53 2018 +0900 selftests/bpf: test_verifier, change names of fixup maps Currently fixup map are named like fixup_map1, fixup_map2, and so on. As suggested by Alexei let's change change map names such that we can identify map type by looking at the name. This patch is basically a find and replace change: fixup_map1 -> fixup_map_hash_8b fixup_map2 -> fixup_map_hash_48b fixup_map3 -> fixup_map_hash_16b fixup_map4 -> fixup_map_array_48b Suggested-by: Alexei Starovoitov Signed-off-by: Prashant Bhole Acked-by: Alexei Starovoitov Acked-by: Song Liu Signed-off-by: Alexei Starovoitov commit 8ec92dc22e0e3460cfd29263731c6214d283ea28 Author: Prashant Bhole Date: Tue Oct 9 10:04:52 2018 +0900 tools/bpf: bpftool, print strerror when map lookup error occurs Since map lookup error can be ENOENT or EOPNOTSUPP, let's print strerror() as error message in normal and JSON output. This patch adds helper function print_entry_error() to print entry from lookup error occurs Example: Following example dumps a map which does not support lookup. Output before: root# bpftool map -jp dump id 40 [ "key": ["0x0a","0x00","0x00","0x00" ], "value": { "error": "can\'t lookup element" }, "key": ["0x0b","0x00","0x00","0x00" ], "value": { "error": "can\'t lookup element" } ] root# bpftool map dump id 40 can't lookup element with key: 0a 00 00 00 can't lookup element with key: 0b 00 00 00 Found 0 elements Output after changes: root# bpftool map dump -jp id 45 [ "key": ["0x0a","0x00","0x00","0x00" ], "value": { "error": "Operation not supported" }, "key": ["0x0b","0x00","0x00","0x00" ], "value": { "error": "Operation not supported" } ] root# bpftool map dump id 45 key: 0a 00 00 00 value: Operation not supported key: 0b 00 00 00 value: Operation not supported Found 0 elements Signed-off-by: Prashant Bhole Acked-by: Jakub Kicinski Acked-by: Alexei Starovoitov Acked-by: Song Liu Signed-off-by: Alexei Starovoitov commit 18a781daa93e67b795976353a6b5d120939c50bc Author: Prashant Bhole Date: Tue Oct 9 10:04:51 2018 +0900 tools/bpf: bpftool, split the function do_dump() do_dump() function in bpftool/map.c has deep indentations. In order to reduce deep indent, let's move element printing code out of do_dump() into dump_map_elem() function. Signed-off-by: Prashant Bhole Acked-by: Jakub Kicinski Acked-by: Alexei Starovoitov Acked-by: Song Liu Signed-off-by: Alexei Starovoitov commit 3b4a63f674e94795c9b76a41b36364b8aec232e1 Author: Prashant Bhole Date: Tue Oct 9 10:04:50 2018 +0900 bpf: return EOPNOTSUPP when map lookup isn't supported Return ERR_PTR(-EOPNOTSUPP) from map_lookup_elem() methods of below map types: - BPF_MAP_TYPE_PROG_ARRAY - BPF_MAP_TYPE_STACK_TRACE - BPF_MAP_TYPE_XSKMAP - BPF_MAP_TYPE_SOCKMAP/BPF_MAP_TYPE_SOCKHASH Signed-off-by: Prashant Bhole Acked-by: Alexei Starovoitov Acked-by: Song Liu Signed-off-by: Alexei Starovoitov commit 509db2833e0ddac7faf6e7d2dd6e7f85c98fbee0 Author: Prashant Bhole Date: Tue Oct 9 10:04:49 2018 +0900 bpf: error handling when map_lookup_elem isn't supported The error value returned by map_lookup_elem doesn't differentiate whether lookup was failed because of invalid key or lookup is not supported. Lets add handling for -EOPNOTSUPP return value of map_lookup_elem() method of map, with expectation from map's implementation that it should return -EOPNOTSUPP if lookup is not supported. The errno for bpf syscall for BPF_MAP_LOOKUP_ELEM command will be set to EOPNOTSUPP if map lookup is not supported. Signed-off-by: Prashant Bhole Acked-by: Alexei Starovoitov Acked-by: Song Liu Signed-off-by: Alexei Starovoitov commit da1cf5a1cf124fc0a0b50c4ec78d5e97ee68bae2 Author: Enrico Granata Date: Tue Oct 9 10:56:46 2018 -0700 platform/chrome: Add a new interrupt path for cros_ec_lpc This commit allows cros_ec_lpc to register a direct IRQ instead of relying on the ACPI notification chain to receive MKBP events. This change is done in the interest of allowing reduced jitter in the communication path between the CrOS EC and the host for receiving sensor data. Signed-off-by: Enrico Granata Signed-off-by: Benson Leung commit 8af03d1ae2e154a8be3631e8694b87007e1bdbc2 Author: Wenwen Wang Date: Sun Oct 7 15:23:15 2018 -0500 bpf: btf: Fix a missing check bug In btf_parse_hdr(), the length of the btf data header is firstly copied from the user space to 'hdr_len' and checked to see whether it is larger than 'btf_data_size'. If yes, an error code EINVAL is returned. Otherwise, the whole header is copied again from the user space to 'btf->hdr'. However, after the second copy, there is no check between 'btf->hdr->hdr_len' and 'hdr_len' to confirm that the two copies get the same value. Given that the btf data is in the user space, a malicious user can race to change the data between the two copies. By doing so, the user can provide malicious data to the kernel and cause undefined behavior. This patch adds a necessary check after the second copy, to make sure 'btf->hdr->hdr_len' has the same value as 'hdr_len'. Otherwise, an error code EINVAL will be returned. Signed-off-by: Wenwen Wang Acked-by: Song Liu Signed-off-by: Alexei Starovoitov commit 2c42dd6e0e3b0f5949924c8251a9d34ab373d2e0 Merge: d4d2313a3c17 e2bbf91cad09 Author: Benson Leung Date: Tue Oct 9 21:29:51 2018 -0700 Merge remote-tracking branch 'origin/ib-chrome-platform-mfd-move-cros_ec_lpc' into working-branch-for-4.20 commit 3c587768271e9c20276522025729e4ebca51583b Author: Dmitry Osipenko Date: Mon Aug 13 20:14:00 2018 +0300 thermal: core: Fix use-after-free in thermal_cooling_device_destroy_sysfs This patch fixes use-after-free that was detected by KASAN. The bug is triggered on a CPUFreq driver module unload by freeing 'cdev' on device unregister and then using the freed structure during of the cdev's sysfs data destruction. The solution is to unregister the sysfs at first, then destroy sysfs data and finally release the cooling device. Cc: # v4.17+ Fixes: 8ea229511e06 ("thermal: Add cooling device's statistics in sysfs") Signed-off-by: Dmitry Osipenko Acked-by: Viresh Kumar Acked-by: Eduardo Valentin Signed-off-by: Zhang Rui commit 74dd7c97ea2ab08b41925ab2f472db573accda89 Author: Al Viro Date: Tue Oct 9 23:32:41 2018 -0400 ecryptfs_rename(): verify that lower dentries are still OK after lock_rename() We get lower layer dentries, find their parents, do lock_rename() and proceed to vfs_rename(). However, we do not check that dentries still have the same parents and are not unlinked. Need to check that... Signed-off-by: Al Viro commit fb488fc1f2b4c5128540b032892ddec91edaf8d9 Author: Dominique Martinet Date: Tue Oct 9 11:38:00 2018 +0900 9p/trans_fd: put worker reqs on destroy p9_read_work/p9_write_work might still hold references to a req after having been cancelled; make sure we put any of these to avoid potential request leak on disconnect. Fixes: 728356dedeff8 ("9p: Add refcount to p9_req_t") Link: http://lkml.kernel.org/r/1539057956-23741-2-git-send-email-asmadeus@codewreck.org Signed-off-by: Dominique Martinet Cc: Eric Van Hensbergen Cc: Latchesar Ionkov Reviewed-by: Tomas Bortoli commit e4ca13f7d075e551dc158df6af18fb412a1dba0a Author: Dominique Martinet Date: Tue Oct 9 11:18:52 2018 +0900 9p/trans_fd: abort p9_read_work if req status changed p9_read_work would try to handle an errored req even if it got put to error state by another thread between the lookup (that worked) and the time it had been fully read. The request itself is safe to use because we hold a ref to it from the lookup (for m->rreq, so it was safe to read into the request data buffer until this point), but the req_list has been deleted at the same time status changed, and client_cb already has been called as well, so we should not do either. Link: http://lkml.kernel.org/r/1539057956-23741-1-git-send-email-asmadeus@codewreck.org Signed-off-by: Dominique Martinet Reported-by: syzbot+2222c34dc40b515f30dc@syzkaller.appspotmail.com Cc: Eric Van Hensbergen Cc: Latchesar Ionkov commit 72ea0321088df2c41eca8cc6160c24bcceb56ac7 Author: Dan Carpenter Date: Wed Sep 26 13:39:34 2018 +0300 9p: potential NULL dereference p9_tag_alloc() is supposed to return error pointers, but we accidentally return a NULL here. It would cause a NULL dereference in the caller. Link: http://lkml.kernel.org/m/20180926103934.GA14535@mwanda Fixes: 996d5b4db4b1 ("9p: Use a slab for allocating requests") Signed-off-by: Dan Carpenter Signed-off-by: Dominique Martinet commit 71195ba670bc6070b5db406c4fc12c69efb9f7e4 Author: Rex Zhu Date: Sun Sep 30 17:35:12 2018 +0800 drm/amdgpu: Change VI gfx/sdma/smu init sequence initialize gfx/sdma before dpm features enabled. Acked-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher commit 9d5aa2ef3862197eb31e2df7c5d6b9b6dadcaf8a Author: Rex Zhu Date: Sat Sep 29 15:57:31 2018 +0800 drm/amdgpu: Add fw load in gfx_v8 and sdma_v3 gfx and sdma can be initialized before smu. Reviewed-by: Evan Quan Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher commit 9c8bc8d3394963c9bd4b5bcce03303c56dc3104b Author: Rex Zhu Date: Sat Sep 29 20:28:14 2018 +0800 drm/amd/pp: Implement load_firmware interface with this interface, gfx/sdma can be initialized before smu. Reviewed-by: Evan Quan Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher commit 744a522794bdc64391039177153ef973cbff1297 Author: Rex Zhu Date: Sat Sep 29 15:42:52 2018 +0800 drm/amd/pp: Allocate ucode bo in request_smu_load_fw ucode bo is needed by request_smu_load_fw, the request_smu_load_fw maybe called by gfx/sdma before smu hw init. so move amdgpu_ucode_bo_init to request_smu_lowd_fw from smu hw init. Reviewed-by: Evan Quan Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher commit 07da6aa47f84150ec6476e670b48e3e7158a4b15 Author: Rex Zhu Date: Sat Sep 29 15:30:11 2018 +0800 drm/amdgpu: Don't reallocate ucode bo when suspend driver don't release the ucode memory when suspend. so don't need to allocate bo when resume back. Reviewed-by: Evan Quan Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher commit 9b008fb7ede3ad293647e4ebdc8e0419c07e8aba Author: Rex Zhu Date: Sat Sep 29 20:09:00 2018 +0800 drm/amdgpu: Remove FW_LOAD_DIRECT type support on VI AMDGPU_FW_LOAD_DIRECT is used for bring up. Now it don't work any more. so remove the support. v2: Add warning message if user select AMDGPU_FW_LOAD_DIRECT/AMDGPU_FW_LOAD_PSP on VI. Reviewed-by: Evan Quan Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher commit 825da4d925984de6e1497c2d5e1cbc7b6bbcf07b Author: James Zhu Date: Tue Oct 2 13:31:31 2018 -0400 drm/amdgpu/vcn:Correct VCN cache window definition Correct VCN cache window definition. The old one is reused from UVD, and it is not fully correct. Signed-off-by: James Zhu Acked-by: Leo Liu Signed-off-by: Alex Deucher commit b17c524922d65f3ce527277a030d505da3c7b754 Author: James Zhu Date: Tue Oct 2 12:56:32 2018 -0400 drm/amdgpu/vcn:Replace value with defined macro Replace value with defined macro to make code more readable Signed-off-by: James Zhu Acked-by: Leo Liu Signed-off-by: Alex Deucher commit 2dc4aa523b538f55e38bd4c7b6d704162b5728ac Author: James Zhu Date: Tue Oct 2 11:44:50 2018 -0400 drm/amdgpu/vcn:fix dpg pause mode hang issue Use mmUVD_SCRATCH2 tracking decode write point. It will help avoid dpg pause mode hang issue. Signed-off-by: James Zhu Acked-by: Leo Liu Signed-off-by: Alex Deucher commit 9332ddc91537cb739b8ee2cc17aebb3253cf8cde Author: James Zhu Date: Mon Oct 1 18:18:59 2018 -0400 drm/amdgpu/vcn:Remove unused code The following WREG32_SOC15_DPG_MODE will overwrite register mmUVD_CGC_CTRL. This code can be removed. Signed-off-by: James Zhu Reviewed-by: Leo Liu Signed-off-by: Alex Deucher commit 59d76d6bc206af2a00625094ff5b0d16cc69c779 Author: Nick Alcock Date: Thu Oct 4 20:58:09 2018 +0100 drm/radeon: ratelimit bo warnings So a few days ago I started getting sprays of these warnings -- sorry, but because it was a few days ago I'm not sure what I was running at the time (but it was probably either Stellaris or Chromium). Sep 25 22:06:34 mutilate err: : [ 544.718905] [drm:radeon_cs_parser_relocs] *ERROR* gem object lookup failed 0xc Sep 25 22:06:34 mutilate err: : [ 544.718909] [drm:radeon_cs_ioctl] *ERROR* Failed to parse relocation -2! Sep 25 22:06:34 mutilate err: : [ 544.719710] [drm:radeon_cs_parser_relocs] *ERROR* gem object lookup failed 0xc Sep 25 22:06:34 mutilate err: : [ 544.719714] [drm:radeon_cs_ioctl] *ERROR* Failed to parse relocation -2! Sep 25 22:06:34 mutilate err: : [ 544.719862] [drm:radeon_cs_parser_relocs] *ERROR* gem object lookup failed 0xc Sep 25 22:06:34 mutilate err: : [ 544.719865] [drm:radeon_cs_ioctl] *ERROR* Failed to parse relocation -2! Sep 25 22:06:34 mutilate err: : [ 544.720772] [drm:radeon_cs_parser_relocs] *ERROR* gem object lookup failed 0xc Sep 25 22:06:34 mutilate err: : [ 544.720778] [drm:radeon_cs_ioctl] *ERROR* Failed to parse relocation -2! Sep 25 22:06:34 mutilate warning: : [ 544.721415] radeon 0000:01:00.0: vbo resource seems too big for the bo followed by a massive stream of "vbo resource seems too big for the bo". The most extreme flood ran from 23:01:58 to 23:02:47 and emitted 91,000 lines of log in that time. This... seems excessive, given that each log message after the first contains more or less no information. So ratelimit these messages. (We probably want to see at least *some* so that the underlying bug can be fixed -- always assuming the bug isn't in unfixable closed-source game code somewhere.) Signed-off-by: Nick Alcock Reviewed-by: Michel Dänzer Signed-off-by: Alex Deucher commit 4eb10b5be799c45e71f9e01e01fc88e84062426c Author: Christian König Date: Wed Sep 26 16:15:44 2018 +0200 drm/amdgpu: fix incorrect use of amdgpu_irq_add_id in si_dma.c Adding a second irq source because of a different src_id is actually a bug. Signed-off-by: Christian König Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 2ccecaf661e0b686a99ad0990e5ce14447942718 Author: Christian König Date: Thu Oct 4 10:27:48 2018 +0200 drm/amdgpu: fix AGP location with VRAM at 0x0 That also simplifies handling quite a bit. Signed-off-by: Christian König Reviewed-by: Junwei Zhang Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit bdbb4d6e96bc9558e404bf709480ac2f7783c843 Author: Shirish S Date: Fri Oct 5 10:54:21 2018 +0530 drm/amdgpu: remove the intterupt handling for the KIQ events [Why] 1. we never submit IBs to the KIQ 2. there seems to be ~500ms delay during amdgpu resume spent in KIQ, hence pointing toward interrupts are not working correctly. [How] remove interrupt handling for KIQ. Signed-off-by: Shirish S Reviewed-by: Christian König i Signed-off-by: Alex Deucher commit 1b19aa5aa8c9394850a5e769abd4df12b3bdd1b7 Author: Felix Kuehling Date: Wed Aug 22 15:28:44 2018 -0400 drm/amdkfd: Fix incorrect use of process->mm This mm_struct pointer should never be dereferenced. If running in a user thread, just use current->mm. If running in a kernel worker use get_task_mm to get a safe reference to the mm_struct. Signed-off-by: Felix Kuehling Reviewed-by: Oded Gabbay Acked-by: Christian König Signed-off-by: Alex Deucher commit 158b594a96529d895df943a4764609438a01d687 Author: Pratik Vishwakarma Date: Wed Oct 3 20:45:11 2018 +0530 drm/amdgpu: skip IB tests for KIQ in general [Why] 1. We never submit IBs to KIQ. 2. Ring test pass without KIQ's ring also. 3. By skipping we see an improvement of around 500ms in the amdgpu's resume time. [How] skip IB tests for KIQ ring type. Signed-off-by: Shirish S Signed-off-by: Pratik Vishwakarma Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit c1f0320e03207255ef618d1bbfe0939d03c7cfac Author: Nathan Chancellor Date: Mon Oct 1 23:41:24 2018 -0700 drm/scheduler: Simplify spsc_queue_count check in drm_sched_entity_select_rq Clang generates a warning when it sees a logical not followed by a conditional operator like ==, >, or <. drivers/gpu/drm/scheduler/sched_entity.c:470:6: warning: logical not is only applied to the left hand side of this comparison [-Wlogical-not-parentheses] if (!spsc_queue_count(&entity->job_queue) == 0 || ^ ~~ drivers/gpu/drm/scheduler/sched_entity.c:470:6: note: add parentheses after the '!' to evaluate the comparison first if (!spsc_queue_count(&entity->job_queue) == 0 || ^ ( ) drivers/gpu/drm/scheduler/sched_entity.c:470:6: note: add parentheses around left hand side expression to silence this warning if (!spsc_queue_count(&entity->job_queue) == 0 || ^ ( ) 1 warning generated. It assumes the author might have made a mistake in their logic: if (!a == b) -> if (!(a == b)) Sometimes that is the case; other times, it's just a super convoluted way of saying 'if (a)' when b = 0: if (!1 == 0) -> if (0 == 0) -> if (true) Alternatively: if (!1 == 0) -> if (!!1) -> if (1) Simplify this comparison so that Clang doesn't complain. Fixes: 35e160e781a0 ("drm/scheduler: change entities rq even earlier") Signed-off-by: Nathan Chancellor Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 5e161e5442a8a209404542c91eb889487b1239f4 Author: Rex Zhu Date: Sat Sep 29 13:54:33 2018 +0800 drm/amd/pp: Refine smu7/8 request_smu_load_fw callback function The request_smu_load_fw of VI is used to load gfx/sdma ip's firmware. Check whether the gfx/sdma firmware have been loaded successfully in this callback function. if failed, driver can exit to avoid gpu hard hung. if successful, clean the flag reload_fw to avoid duplicated fw load. when suspend/resume, driver need to reload fw. so in suspend, reset the reload_fw flag to true to enable load fw when resume. Reviewed-by: Evan Quan Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher commit 0a821579a2ed44855d63d9a2d2acb61b38ce6354 Author: Rex Zhu Date: Sat Sep 29 14:32:47 2018 +0800 drm/amd/pp: Setup SoftRegsStart before request smu load fw need to know SoftRegsStart value to visit the register UcodeLoadStatus to check fw loading state. Reviewed-by: Evan Quan Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher commit bcb7c4e8b434d35697024cd47083c3aa0ef19b8b Author: Rex Zhu Date: Sat Sep 29 13:28:20 2018 +0800 drm/amd/pp: Refine function iceland_start_smu if upload firmware failed, no matter how many times the function runs again, the same error will be encountered. so remove the duplicated code. Reviewed-by: Evan Quan Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher commit 44779b43f15977885a0e3b45bf6deb6be18725e5 Author: Rex Zhu Date: Sat Sep 29 15:27:02 2018 +0800 drm/amdgpu: Move gfx flag in_suspend to adev Move in_suspend flag to adev from gfx, so can be used in other ip blocks, also keep consistent with gpu_in_reset flag. Reviewed-by: Evan Quan Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher commit 3023015f791639838ec5d80e5c14851238a1a7d9 Author: Rex Zhu Date: Sat Sep 29 14:52:31 2018 +0800 drm/amd/pp: Fix memory leak on CI/AI On CI/AI, fw was not loaded by smu, but smu's fw still need to be released when driver fini. Reviewed-by: Evan Quan Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher commit e5081e30eba1493f098b6e65e22124e36b2de743 Author: Rex Zhu Date: Sat Sep 29 17:07:48 2018 +0800 drm/amdgpu: Drop dead define in amdgpu.h the struct was not in use any more. Reviewed-by: Evan Quan Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher commit a57ba84b149cfeca133ea11f253049eac5f9c1a9 Author: Rex Zhu Date: Sat Oct 6 00:11:25 2018 +0800 drm/amdgpu: Always enable fan sensors for read don't need to set fan1_enable to read fan sensors. Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher commit b8a9c003679ea3619cef4092b10390224f09fbaa Author: Rex Zhu Date: Fri Sep 28 16:01:48 2018 +0800 drm/amdgpu: Disable sysfs pwm1 if not in manual fan control Following lm-sensors 3.0.0, Only enable pwm1 sysfs when fan control mode(pwm1_enable) in manual Reviewed-by: Evan Quan Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher commit c2870527f700e919fbb543baef36032be5d626e0 Author: Rex Zhu Date: Thu Sep 20 14:30:55 2018 +0800 drm/amdgpu: Add fan RPM setting via sysfs Add fan1_target for get/set fan speed in RPM unit Add fan1_min/fan1_max for get min, max fan speed in RPM unit Add fan1_enable to enable/disable the fan1 sensor v3: drop the hardcode value of min/max rpm in comments pointed out by Alex. v2: query the min/max rpm gpu support instand of hardcode value. Reviewed-by: Evan Quan Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher commit d5f480372ca485806443afca50ef024623f8eb03 Author: Rex Zhu Date: Sun Sep 30 13:19:00 2018 +0800 drm/amd/pp: Implement AMDGPU_PP_SENSOR_MIN/MAX_FAN_RPM so user can query the RPM range Reviewed-by: Evan Quan Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher commit 862cd98029d5f31db326e007aff5fec784807941 Author: Rex Zhu Date: Sun Sep 30 13:18:17 2018 +0800 drm/amdgpu: Add new AMDGPU_PP_SENSOR_MIN/MAX_FAN_RPM sensor For getting the min/max fan speed in RPM units. Reviewed-by: Evan Quan Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher commit ec442fd3a9756d489009a23cdb0b8a789eedf94e Author: Rex Zhu Date: Fri Sep 28 15:25:06 2018 +0800 drm/amdgpu: Refine uvd_v6/7_0_enc_get_destroy_msg 1. make uvd_v7_0_enc_get_destroy_msg static 2. drop a function variable that always true Reviewed-by: Evan Quan Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher commit 717276b9256f5d97b43e53adca1670cee2c45db2 Author: Shirish S Date: Mon Sep 24 19:01:47 2018 +0530 drm/amd/display: Signal hw_done() after waiting for flip_done() In amdgpu_dm_commit_tail(), wait until flip_done() is signaled before we signal hw_done(). [Why] This is to temporarily address a paging error that occurs when a nonblocking commit contends with another commit, particularly in a mirrored display configuration where at least 2 CRTCs are updated. The error occurs in drm_atomic_helper_wait_for_flip_done(), when we attempt to access the contents of new_crtc_state->commit. Here's the sequence for a mirrored 2 display setup (irrelevant steps left out for clarity): **THREAD 1** | **THREAD 2** | Initialize atomic state for flip | | Queue worker | ... | Do work for flip | | Signal hw_done() on CRTC 1 | Signal hw_done() on CRTC 2 | | Wait for flip_done() on CRTC 1 <---- **PREEMPTED BY THREAD 1** Initialize atomic state for cursor | update (1) | | Do cursor update work on both CRTCs | | Clear atomic state (2) | **DONE** | ... | | Wait for flip_done() on CRTC 2 | *ERROR* | The issue starts with (1). When the atomic state is initialized, the current CRTC states are duplicated to be the new_crtc_states, and referenced to be the old_crtc_states. (The new_crtc_states are to be filled with update data.) Some things to note: * Due to the mirrored configuration, the cursor updates on both CRTCs. * At this point, the pflip IRQ has already been handled, and flip_done signaled on all CRTCs. The cursor commit can therefore continue. * The old_crtc_states used by the cursor update are the **same states** as the new_crtc_states used by the flip worker. At (2), the old_crtc_state is freed (*), and the cursor commit completes. We then context switch back to the flip worker, where we attempt to access the new_crtc_state->commit object. This is problematic, as this state has already been freed. (*) Technically, 'state->crtcs[i].state' is freed, which was made to reference old_crtc_state in drm_atomic_helper_swap_state() [How] By moving hw_done() after wait_for_flip_done(), we're guaranteed that the new_crtc_state (from the flip worker's perspective) still exists. This is because any other commit will be blocked, waiting for the hw_done() signal. Note that both the i915 and imx drivers have this sequence flipped already, masking this problem. Signed-off-by: Shirish S Signed-off-by: Leo Li Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher commit dd330d8c27864494d863caf3cf867e53415fa56e Author: Nathan Chancellor Date: Thu Sep 27 11:06:33 2018 -0700 drm/amd/display: Use proper enums in process_channel_reply Clang warns when one enumerated type is implicitly converted to another. drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_aux.c:315:19: warning: implicit conversion from enumeration type 'enum aux_channel_operation_result' to different enumeration type 'enum aux_transaction_reply' [-Wenum-conversion] reply->status = AUX_CHANNEL_OPERATION_FAILED_HPD_DISCON; ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/i2caux/dce110/aux_engine_dce110.c:349:19: warning: implicit conversion from enumeration type 'enum aux_channel_operation_result' to different enumeration type 'enum aux_transaction_reply' [-Wenum-conversion] reply->status = AUX_CHANNEL_OPERATION_FAILED_HPD_DISCON; ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The current enum is incorrect, it should be from aux_transaction_reply, so use AUX_TRANSACTION_REPLY_HPD_DISCON. Reported-by: Nick Desaulniers Suggested-by: Nick Desaulniers Signed-off-by: Nathan Chancellor Reviewed-by: Nick Desaulniers Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher commit 6c0984d53b073d42ba44c92a1a721840f90bda60 Author: Nicholas Kazlauskas Date: Fri Sep 21 09:35:24 2018 -0400 drm/amd/display: Raise dispclk value for dce_update_clocks [Why] The DISPCLK value was previously requested to be 15% higher for all ASICS that went through the dce110 bandwidth code path. As part of a refactoring of dce_clocks and dce110 set_bandwidth this was removed for power saving considerations. This changed caused corruption under certain display configurations. Originally thought to be Vega specific, it was also observed on Polaris. [How] The 15% is brought back but its placement differs from the original patch. This boost should only be enable while DFS bypass is inactive. This (like the Vega patch) is also a workaround that should be removed after the root cause is identified. Signed-off-by: Nicholas Kazlauskas Reviewed-by: Harry Wentland Acked-by: Leo Li Signed-off-by: Alex Deucher commit a37786abc3bbbbd3a6dc470665af083b9a492cf7 Author: Murton Liu Date: Wed Sep 19 14:31:12 2018 -0400 drm/amd/display: HLK Periodic Frame Notification test failed [Why] Due to a small pre-fetch window, the active vline timing is a couple of lines off when compared to what it should be. [How] Changed the calculation for the start vline to account for this window. Signed-off-by: Murton Liu Reviewed-by: Aric Cyr Acked-by: Leo Li Signed-off-by: Alex Deucher commit 4a0ad70d690c9bc13f691993da0f38b8634d7eeb Author: Charlene Liu Date: Tue Sep 18 13:23:42 2018 -0400 drm/amd/display: fix Interlace video timing. [Description] interlace mode shows wrong vertical timing. Interface timing in Edid is half vertical timing as progressive timing. driver doubled the vertical timing in edid_paser, no need to double in optc again. Signed-off-by: Charlene Liu Reviewed-by: Chris Park Acked-by: Leo Li Signed-off-by: Alex Deucher commit a7fbf17aa8bfaab9abd50168e81034f834165d29 Author: Leo Li Date: Tue Sep 18 10:21:35 2018 -0400 drm/amd/display: Flatten irq handler data struct [Why] There is no reason why the common data needs to be kept separate. [How] Flatten the struct by moving common data into the DM IRQ struct. Signed-off-by: Leo Li Reviewed-by: David Francis Acked-by: Leo Li Signed-off-by: Alex Deucher commit 88ed9fb77ef420cf2e4ec1624f3e638685e28c8d Author: Jun Lei Date: Tue Sep 18 09:38:20 2018 -0400 drm/amd/display: fix memory leak in resource pools [why] ddc engines were recently changed to be independently tracked from pipe count. the change was reflected in resource constructor but not in destructor. this manifests as a memory leak when pipe harvesting is enabled, since not all constructed ddc engines are freed [how] make destructor symmetric with constructor for all dcX_resource Signed-off-by: Jun Lei Reviewed-by: Aric Cyr Acked-by: Leo Li Signed-off-by: Alex Deucher commit 5e174ce63ed7da4807ee86913fda35229d60cdab Author: Tony Cheng Date: Mon Sep 10 11:30:52 2018 -0400 drm/amd/display: dc 3.1.68 Signed-off-by: Tony Cheng Reviewed-by: Steven Chiu Acked-by: Leo Li Signed-off-by: Alex Deucher commit ceb9831dd6e5dfb79f94b205eade4ecc29e26d60 Author: Yongqiang Sun Date: Mon Sep 17 10:05:51 2018 -0400 drm/amd/display: WA for DF keeps awake after S0i3. [Why] DF keeps awake after S0i3 resume due to DRAM_STATE_CNTL is set by bios command table during dcn init_hw. [How] As a work around, check STATE_CNTL status before init_hw, if it is 0 before init_hw and set to 1 after init_hw, change it to 0. Signed-off-by: Yongqiang Sun Reviewed-by: Tony Cheng Acked-by: Leo Li Signed-off-by: Alex Deucher commit e15fc81f11854451ec8a8ed9168b8247e4e9a10b Author: Eric Yang Date: Fri Sep 14 15:55:01 2018 -0400 drm/amd/display: clean up encoding checks [Why] All ASICS we support has YCbCr support, so the check is unnecessary, the currently logic in validate output also returns true all the time, so the unneccessary logic is removed Signed-off-by: Eric Yang Reviewed-by: Tony Cheng Acked-by: Leo Li Signed-off-by: Alex Deucher commit b7cd6487a52484bed5ba5424177f7a90166bcaac Author: Eric Yang Date: Fri Sep 14 13:53:14 2018 -0400 drm/amd/display: block DP YCbCr420 modes [why] Currently not supported, will black screen when set. [How] Fail validate timing helper for those modes. Signed-off-by: Eric Yang Reviewed-by: Tony Cheng Acked-by: Leo Li Signed-off-by: Alex Deucher commit 8ab2180f96f5334974a84f54e794b3bc5912f4d1 Author: Eryk Brol Date: Fri Sep 7 13:24:28 2018 -0400 drm/amd/display: Add function to fetch clock requirements Also add dram clock to clocks struct, for systems that uses them. Signed-off-by: Eryk Brol Reviewed-by: Jun Lei Acked-by: Leo Li Signed-off-by: Alex Deucher commit 74eac5f3b43eda8b518662b011d1f18d5560e144 Author: Su Sung Chung Date: Thu Sep 13 15:26:08 2018 -0400 drm/amd/display: Calculate swizzle mode using bpp during validation [Why] Previously bandwidth validation was failing because swizzle mode was not initialized during plane_state allocation. The swizzle mode was calculated using pixed format which is how swizzle mode is initially calculated in addrlib. [How] * Set default swizzle mode for validation to DC_SW_UNKNOWN * Created new function in dcn10_assign_swizzle_mode which sets the plane swizzle mode based on selected pixed format * Added the call of assign_swizzle_mode into dc_validate_global_state * Set failsafe swizzle mode back to DC_SW_LINEAR Signed-off-by: Su Sung Chung Reviewed-by: Eric Yang Acked-by: Leo Li Signed-off-by: Alex Deucher commit cbad73147fe20be018d976ea59c82bdf26e46151 Author: Nikola Cornij Date: Wed Sep 12 15:17:51 2018 -0400 drm/amd/display: Add a check-function for virtual signal type [why] Same functions exist for all other signal types. [how] Add a function that checks against virtual signal type. Signed-off-by: Nikola Cornij Reviewed-by: Leo Li Signed-off-by: Alex Deucher commit 23e542e5ba5e4298a1475f94750317ec1662ba21 Author: Dmitry Torokhov Date: Tue Oct 9 10:52:30 2018 -0700 HID: google: add dependency on Cros EC for Hammer Whiskers tablet mode support needs access to Chrome Embedded Controller, so we need to add dependency on MFD_CROS_EC. Reported-by: kbuild test robot Fixes: eb1aac4c8744 ("HID: google: add support tablet mode switch for Whiskers") Signed-off-by: Dmitry Torokhov Signed-off-by: Jiri Kosina commit 39c03e0032ff839e62aae7d85a541451444a3198 Author: Charlene Liu Date: Wed Sep 12 18:22:16 2018 -0400 drm/amd/display: fix 4K stereo screen flash issue [Why] HDMI_scramber is not enabled for pixel rate >340Mhz. [How] Calculate the phy clock to include the Hw frame packing factor. Signed-off-by: Charlene Liu Reviewed-by: Chris Park Acked-by: Leo Li Signed-off-by: Alex Deucher commit be61df574256ae8c0dbd45ac148ca7260a0483c0 Author: Jun Lei Date: Thu Sep 13 09:32:26 2018 -0400 drm/amd/display: Add DC build_id to determine build type [why] Sometimes there are indications that the incorrect driver is being loaded in automated tests. This change adds the ability for builds to be tagged with a string, and picked up by the test infrastructure. [how] dc.c will allocate const for build id, which is init-ed with default value, indicating production build. For test builds, build server will find/replace this value. The test machine will then verify this value. Signed-off-by: Jun Lei Reviewed-by: Tony Cheng Acked-by: Leo Li Signed-off-by: Alex Deucher commit 51ef434a15b450bfbef1e06cc87ee4e98a224486 Author: Akshu Agrawal Date: Mon Sep 24 15:48:02 2018 +0530 drm/amd/powerplay: 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. Multiple runs of power measurement shows no imapct. Signed-off-by: Akshu Agrawal Signed-off-by: Satyajit Sahu Acked-by: Alex Deucher Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 479afffe214759276afece3797b1677c7e1b39d4 Author: Rex Zhu Date: Wed Sep 26 12:17:52 2018 +0800 drm/amd/pp: Remove wrong code in fiji_start_smu HW CG feature will be enabled after hw ip initialized Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher commit e5a4059ceb4c353b1b151f5f7f7b00fd399e4ceb Author: Rex Zhu Date: Fri Sep 28 16:57:34 2018 +0800 drm/amd/pp: Remove uncessary extra vcn pg cntl in smu the vcn power will be controlled by VCN. Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher commit d09ae92de858d0650441a47f4578e0509186e5d8 Author: Rex Zhu Date: Tue Sep 25 19:53:30 2018 +0800 drm/amdgpu: Move out power up/down sdma out of smu smu only expose interface to other ip blocks. in order to reduce dependence between smu and other ip blocks Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher commit 40bea02f4a1414f0163c5380423f578b3507e69f Author: Rex Zhu Date: Tue Sep 25 19:45:46 2018 +0800 drm/amd/pp: Expose the smu support for SDMA PG cntl SDMA IP can be power up/down via smu message Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher commit c52dcf49195d06319189c7f1dd8b62bfca545197 Author: Rex Zhu Date: Thu Sep 20 11:50:26 2018 +0800 drm/amd/pp: Avoid divide-by-zero in fan_ctrl_set_fan_speed_rpm The minRPM speed maybe equal to zero. so need to check input RPM not equal to 0, otherwise cause divide-by-zero driver crash. Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher commit b3ca0f397ead2d794921ec3a08c132dadb37874e Author: Rex Zhu Date: Thu Sep 20 15:11:08 2018 +0800 drm/amd/pp: Fix fan's RPM setting not work on VI/Vega10 set the target rpm value to wrong register. Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher commit 8f97829e5c20b2486771c42b8adc4f513f90b3e4 Author: Rex Zhu Date: Tue Sep 25 13:27:00 2018 +0800 drm/amdgpu: Fix comments error in sdma_v4_1_update_power_gating Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher commit 8010f2886a63a7bd7ebade1ffb13c0cf41b36233 Author: Evan Quan Date: Thu Sep 27 13:48:45 2018 +0800 drm/amd/powerplay: enable MGPU fan boost feature on Vega20 Added Vega20 specific implementation for MGPU fan boost feature. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit b55c9e7a11f9993328a46b43f3c9e4ca1962c352 Author: Evan Quan Date: Thu Sep 27 13:43:16 2018 +0800 drm/amd/powerplay: helper interfaces for MGPU fan boost feature MGPU fan boost feature is enabled only when two or more dGPUs in the system. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 62d73fbcfb367104db57253a186f410020289517 Author: Evan Quan Date: Thu Sep 27 13:26:58 2018 +0800 drm/amdgpu: added AMD GPU instance counting V2 Count all GPU instances from AMD(including iGPUs and dGPUs) in the system. V2: drop unnecessary initialization for other gpu_info members except mutex Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit e92b83e50839eced31aede94a39901581b71bada Author: Alex Deucher Date: Wed Sep 26 22:55:47 2018 -0500 drm/amdgpu/vega20: make power profile output more consistent Make the profile name line match previous generations more closely. E.g., 0 3D_FULL_SCREEN : vs: 0(3D_FULL_SCREEN ) Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit b989531b1f192a77c739a2976953e241d78229a3 Author: Evan Quan Date: Wed Sep 19 19:07:19 2018 +0800 drm/amdgpu: change Raven always on CUs to 4 For Vega10 and Vega20, the always on CUs are 12. For Raven, it's 4. Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 989b68232c7906ab4fb49f6ed5fd451ee22fc41e Author: Evan Quan Date: Fri Aug 24 16:40:03 2018 +0800 drm/amdgpu: added vega20 LBPW support v2 Enable LBPW support on vega20. v2: squash in warning fix (Alex) Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 031db09017da532d4dc7bbba8c734cfc80f49f34 Author: Evan Quan Date: Tue Sep 18 18:04:44 2018 +0800 drm/amd/powerplay/vega20: enable fan RPM and pwm settings V2 Manual fan RPM and pwm setting on vega20 are available now. V2: correct the register for fan speed setting and avoid divide-by-zero Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Reviewed-by: Rex Zhu Signed-off-by: Alex Deucher commit 42fae99520090423ad639af889d7376774df7fdf Author: Evan Quan Date: Mon Sep 17 18:41:28 2018 +0800 drm/amd/powerplay/vega20: tell the correct gfx voltage V2 Export the correct gfx voltage by hwmon interface. V2: update the register naming for consistency Signed-off-by: Evan Quan Reviewed-by: Rex Zhu Signed-off-by: Alex Deucher commit 3546916f426f3bac6487d37446d8cc743c53554d Author: Evan Quan Date: Mon Sep 17 15:05:54 2018 +0800 drm/amd/powerplay/vega20: correct the hwmon interface ppt limit output The ppt limit read out by hwmon interface is always 0. Correct this hwmon interface output. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Reviewed-by: Rex Zhu Signed-off-by: Alex Deucher commit 7372fd049aa8836310f84da5f82dc9eb146915c8 Author: Sean Paul Date: Fri Oct 5 12:02:22 2018 -0400 MAINTAINERS: Add Maxime Ripard as drm-misc maintainer Unfortunately Gustavo has decided to step down as drm-misc maintainer to focus on other projects. Thanks Gustavo for your dedication and hard work! Fortunately for us, we have a wealth of people qualified to assume a -misc maintainer role. Maxime has done an outstanding job with sun4i and in the community in general. I'm really excited that he agreed to take on this responsibility and I look forward to working with him! Cc: Dave Airlie Cc: Gustavo Padovan Cc: Maarten Lankhorst Cc: Maxime Ripard Acked-by: Maarten Lankhorst Acked-by: Maxime Ripard Acked-by: Dave Airlie Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20181005160256.200162-1-sean@poorly.run commit e6123c524064a571616ec978b1317f1696eff0ae Author: Randy Dunlap Date: Mon Oct 8 17:46:04 2018 -0700 security: fix LSM description location Acked-by: Kees Cook Fix Documentation location reference for where LSM descriptions should be placed. Suggested-by: Kees Cook Signed-off-by: Randy Dunlap Cc: James Morris Cc: "Serge E. Hallyn" Cc: linux-security-module@vger.kernel.org Signed-off-by: James Morris commit 2a44d6511a0104e9ff628e73cf4381e5664a8219 Author: Dinh Nguyen Date: Tue Oct 9 13:14:48 2018 -0500 ARM: dts: socfgpa: remove ethernet aliases from dtsi Not all boards use two ethernet devices and/or use them in different order. As almost all in-tree boards already define their own ethernet aliases, remove them from the dtsi and add the aliases to the two boards, that are missing their own definition. Signed-off-by: Steffen Trumtrar [dinguyen@kernel.org: rebased to latest dts changes] Signed-off-by: Dinh Nguyen commit b187191577629b5358acf4e234809ee8d441ceb4 Author: Ganesh Goudar Date: Tue Oct 9 19:14:13 2018 +0530 cxgb4: Add thermal zone support Add thermal zone support to monitor ASIC's temperature. Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller commit 27055454b43009b6775a7ce70907bb298f4fab1e Author: Alaa Hleihel Date: Tue Oct 9 12:06:52 2018 +0300 net/mlx4_en: Use minimal rx and tx ring sizes on kdump kernel When memory is limited (on kdump kernel), reduce size of rx and tx rings. Also reduce the number of rx rings. Signed-off-by: Alaa Hleihel Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller commit 8b656253a7a4526f413f6b5ad0b03e11daa1d62d Author: Maciej W. Rozycki Date: Mon Oct 8 01:37:23 2018 +0100 MIPS: Provide actually relaxed MMIO accessors Improve performance for the relevant systems and remove the DMA ordering barrier from `readX_relaxed' and `writeX_relaxed' MMIO accessors, where it is not needed according to our requirements[1]. For consistency make the same arrangement with low-level port I/O accessors, but do not actually provide any accessors making use of it. References: [1] "LINUX KERNEL MEMORY BARRIERS", Documentation/memory-barriers.txt, Section "KERNEL I/O BARRIER EFFECTS" Signed-off-by: Maciej W. Rozycki Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/20865/ Cc: Ralf Baechle commit 3d474dacae72ac0f28228b328cfa953b05484b7f Author: Maciej W. Rozycki Date: Mon Oct 8 01:37:16 2018 +0100 MIPS: Enforce strong ordering for MMIO accessors Architecturally the MIPS ISA does not specify ordering requirements for uncached bus accesses such as MMIO operations normally use and therefore explicit barriers have to be inserted between MMIO accesses where unspecified ordering of operations would cause unpredictable results. For example the R2020 write buffer implements write gathering and combining[1] and as used with the DECstation models 2100 and 3100 for MMIO accesses it bypasses the read buffer entirely, because conflicts are resolved by the memory controller for DRAM accesses only[2] (NB the R2020 and R3020 buffers are the same except for the maximum clock rate). Consequently if a device has say a 16-bit control register at offset 0, a 16-bit event mask register at offset 2 and a 16-bit reset register at offset 4, and the initial value of the control register is 0x1111, then in the absence of barriers a hypothetical code sequence like this: u16 init_dev(u16 __iomem *dev); u16 x; write16(dev + 2, 0xffff); write16(dev + 0, 0x2222); x = read16(dev + 0); write16(dev + 1, 0x3333); write16(dev + 0, 0x4444); return x; } will return 0x1111 and issue a single 32-bit write of 0x33334444 (in the little-endian bus configuration) to offset 0 on the system bus. This is because the read to set `x' from offset 0 bypasses the write of 0x2222 that is still in the write buffer pending the completion of the write of 0xffff to the reset register. Then the write of 0x3333 to the event mask register is merged with the preceding write to the control register as they share the same word address, making it a 32-bit write of 0x33332222 to offset 0. Finally the write of 0x4444 to the control register is combined with the outstanding 32-bit write of 0x33332222 to offset 0, because, again, it shares the same address. This is an example from a legacy system, given here because it is well documented and affects a machine we actually support. But likewise modern MIPS systems may implement weak MMIO ordering, possibly even without having it clearly documented except for being compliant with the architecture specification with respect to the currently defined SYNC instruction variants[3]. Considering the above and that we are required to implement MMIO accessors such that individual accesses made with them are strongly ordered with respect to each other[4], add the necessary barriers to our `inX', `outX', `readX' and `writeX' handlers, as well the associated special use variants. It's up to platforms then to possibly define the respective barriers so as to expand to nil if no ordering enforcement is actually needed for a given system; SYNC is supposed to be as cheap as a NOP on strongly ordered MIPS implementations though. Retain the option to generate weakly-ordered accessors, so that the arrangement for `war_io_reorder_wmb' is not lost in case we need it for fully raw accessors in the future. The reason for this is that it is unclear from commit 1e820da3c9af ("MIPS: Loongson-3: Introduce CONFIG_LOONGSON3_ENHANCEMENT") and especially commit 8faca49a6731 ("MIPS: Modify core io.h macros to account for the Octeon Errata Core-301.") why they are needed there under the previous assumption that these accessors can be weakly ordered. References: [1] "LR3020 Write Buffer", LSI Logic Corporation, September 1988, Section "Byte Gathering", pp. 6-7 [2] "DECstation 3100 Desktop Workstation Functional Specification", Digital Equipment Corporation, Revision 1.3, August 28, 1990, Section 6.1 "Processor", p. 4 [3] "MIPS Architecture For Programmers, Volume II-A: The MIPS32 Instruction Set Manual", Imagination Technologies LTD, Document Number: MD00086, Revision 6.06, December 15, 2016, Table 5.5 "Encodings of the Bits[10:6] of the SYNC instruction; the SType Field", p. 409 [4] "LINUX KERNEL MEMORY BARRIERS", Documentation/memory-barriers.txt, Section "KERNEL I/O BARRIER EFFECTS" Signed-off-by: Maciej W. Rozycki References: 8faca49a6731 ("MIPS: Modify core io.h macros to account for the Octeon Errata Core-301.") References: 1e820da3c9af ("MIPS: Loongson-3: Introduce CONFIG_LOONGSON3_ENHANCEMENT") Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/20864/ Cc: Ralf Baechle commit a711d43cbbaa4800a15885c1044348982b6c0c4b Author: Maciej W. Rozycki Date: Mon Oct 8 01:37:07 2018 +0100 MIPS: Correct `mmiowb' barrier for `wbflush' platforms Redefine `mmiowb' in terms of `iobarrier_w' so that it works correctly for MIPS I platforms, which have no SYNC machine instruction and use a call to `wbflush' instead. This doesn't change the semantics for CONFIG_CPU_CAVIUM_OCTEON, because `iobarrier_w' expands to `wmb', which is ultimately the same as the current arrangement. For MIPS I platforms this not only makes any code that would happen to use `mmiowb' build and run, but it actually enforces the ordering required as well, as `iobarrier_w' has it already covered with the use of `wmb'. Signed-off-by: Maciej W. Rozycki Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/20863/ Cc: Ralf Baechle commit 4ae0452bddca8b59e9258759123a652161d07871 Author: Maciej W. Rozycki Date: Mon Oct 8 01:37:01 2018 +0100 MIPS: Define MMIO ordering barriers Define MMIO ordering barriers as separate operations so as to allow making places where such a barrier is required distinct from places where a memory or a DMA barrier is needed. Architecturally MIPS does not specify ordering requirements for uncached bus accesses such as MMIO operations normally use and therefore explicit barriers have to be inserted between MMIO accesses where unspecified ordering of operations would cause unpredictable results. MIPS MMIO ordering barriers are implemented using the same underlying mechanism that memory or a DMA barrier ordering barriers use, that is either a suitable SYNC instruction or a platform-specific `wbflush' call. However platforms may implement different ordering rules for different kinds of bus activity, so having a separate API makes it possible to remove unnecessary barriers and avoid a performance hit they may cause due to unrelated bus activity by making their implementation expand to nil while keeping the necessary ones. Also having distinct barriers for each kind of use makes it easier for the reader to understand what code has been intended to do. Signed-off-by: Maciej W. Rozycki Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/20862/ Cc: Ralf Baechle commit 39249d776ca752f84a66ea29e16534aaaba6078e Author: Quentin Schulz Date: Mon Oct 8 12:14:45 2018 +0200 MIPS: mscc: add PCB120 to the ocelot fitImage PCB120 and PCB123 are both development boards based on Microsemi Ocelot so let's use the same fitImage for both. Reviewed-by: Alexandre Belloni Signed-off-by: Quentin Schulz Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/20871/ Cc: ralf@linux-mips.org Cc: jhogan@kernel.org Cc: robh+dt@kernel.org Cc: mark.rutland@arm.com Cc: davem@davemloft.net Cc: andrew@lunn.ch Cc: f.fainelli@gmail.com Cc: allan.nielsen@microchip.com Cc: linux-mips@linux-mips.org Cc: devicetree@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: netdev@vger.kernel.org Cc: thomas.petazzoni@bootlin.com Cc: antoine.tenart@bootlin.com commit 116edf6e5239ee834ae4a8c122f319a298ef052b Author: Quentin Schulz Date: Mon Oct 8 12:14:44 2018 +0200 MIPS: mscc: add DT for Ocelot PCB120 The Ocelot PCB120 evaluation board is different from the PCB123 in that it has 4 external VSC8584 (or VSC8574) PHYs. It uses the SoC's second MDIO bus for external PHYs which have a reversed address on the bus (i.e. PHY4 is on address 3, PHY5 is on address 2, PHY6 on 1 and PHY7 on 0). Here is how the PHYs are connected to the switch ports: port 0: phy0 (internal) port 1: phy1 (internal) port 2: phy2 (internal) port 3: phy3 (internal) port 4: phy7 port 5: phy4 port 6: phy6 port 9: phy5 Reviewed-by: Alexandre Belloni Signed-off-by: Quentin Schulz Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/20869/ Cc: ralf@linux-mips.org Cc: jhogan@kernel.org Cc: robh+dt@kernel.org Cc: mark.rutland@arm.com Cc: davem@davemloft.net Cc: andrew@lunn.ch Cc: f.fainelli@gmail.com Cc: allan.nielsen@microchip.com Cc: linux-mips@linux-mips.org Cc: devicetree@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: netdev@vger.kernel.org Cc: thomas.petazzoni@bootlin.com Cc: antoine.tenart@bootlin.com commit 68dec269ee29c3abfd09596fbee7e40d875a6ab3 Author: Maciej W. Rozycki Date: Tue Oct 2 12:50:16 2018 +0100 MIPS: memset: Limit excessive `noreorder' assembly mode use Rewrite to use the `reorder' assembly mode and remove manually scheduled delay slots except where GAS cannot schedule a delay-slot instruction due to a data dependency or a section switch (as is the case with the EX macro). No change in machine code produced. Signed-off-by: Maciej W. Rozycki [paul.burton@mips.com: Fix conflict with commit 932afdeec18b ("MIPS: Add Kconfig variable for CPUs with unaligned load/store instructions")] Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/20834/ Cc: Ralf Baechle commit 8f18973877204dc8ca4ce1004a5d28683b9a7086 Author: Qiuxu Zhuo Date: Tue Oct 9 10:20:25 2018 -0700 EDAC, skx_edac: Fix logical channel intermediate decoding The code "lchan = (lchan << 1) | ~lchan" for logical channel intermediate decoding is wrong. The wrong intermediate decoding result is {0xffffffff, 0xfffffffe}. Fix it by replacing '~' with '!'. The correct intermediate decoding result is {0x1, 0x2}. Signed-off-by: Qiuxu Zhuo Signed-off-by: Tony Luck Signed-off-by: Borislav Petkov CC: Aristeu Rozanski CC: Mauro Carvalho Chehab CC: linux-edac Cc: stable@vger.kernel.org Link: http://lkml.kernel.org/r/20181009172025.18594-1-tony.luck@intel.com commit 2f7619ae90bf78cf576b5e72087aab0435266fdb Author: Maciej W. Rozycki Date: Tue Oct 2 12:50:11 2018 +0100 MIPS: memset: Fix CPU_DADDI_WORKAROUNDS `small_fixup' regression Fix a commit 8a8158c85e1e ("MIPS: memset.S: EVA & fault support for small_memset") regression and remove assembly warnings: arch/mips/lib/memset.S: Assembler messages: arch/mips/lib/memset.S:243: Warning: Macro instruction expanded into multiple instructions in a branch delay slot triggering with the CPU_DADDI_WORKAROUNDS option set and this code: PTR_SUBU a2, t1, a0 jr ra PTR_ADDIU a2, 1 This is because with that option in place the DADDIU instruction, which the PTR_ADDIU CPP macro expands to, becomes a GAS macro, which in turn expands to an LI/DADDU (or actually ADDIU/DADDU) sequence: 13c: 01a4302f dsubu a2,t1,a0 140: 03e00008 jr ra 144: 24010001 li at,1 148: 00c1302d daddu a2,a2,at ... Correct this by switching off the `noreorder' assembly mode and letting GAS schedule this jump's delay slot, as there is nothing special about it that would require manual scheduling. With this change in place correct code is produced: 13c: 01a4302f dsubu a2,t1,a0 140: 24010001 li at,1 144: 03e00008 jr ra 148: 00c1302d daddu a2,a2,at ... Signed-off-by: Maciej W. Rozycki Signed-off-by: Paul Burton Fixes: 8a8158c85e1e ("MIPS: memset.S: EVA & fault support for small_memset") Patchwork: https://patchwork.linux-mips.org/patch/20833/ Cc: Ralf Baechle Cc: stable@vger.kernel.org # 4.17+ commit 742fafa50b62cb9f379ba14a13443f52afdc0c5d Author: Shaokun Zhang Date: Sat Oct 6 16:49:04 2018 +0800 arm64: mm: Drop the unused cpu parameter Cpu parameter is never used in flush_context, remove it. Acked-by: Will Deacon Signed-off-by: Shaokun Zhang Signed-off-by: Catalin Marinas commit b69c2e20f6e4046da84ce5b33ba1ef89cb087b40 Author: Borislav Petkov Date: Tue Oct 9 16:11:21 2018 +0200 resource: Clean it up a bit - Drop BUG_ON()s and do normal error handling instead, in find_next_iomem_res(). - Align function arguments on opening braces. - Get rid of local var sibling_only in find_next_iomem_res(). - Shorten unnecessarily long first_level_children_only arg name. Signed-off-by: Borislav Petkov CC: Andrew Morton CC: Bjorn Helgaas CC: Brijesh Singh CC: Dan Williams CC: H. Peter Anvin CC: Lianbo Jiang CC: Takashi Iwai CC: Thomas Gleixner CC: Tom Lendacky CC: Vivek Goyal CC: Yaowei Bai CC: bhe@redhat.com CC: dan.j.williams@intel.com CC: dyoung@redhat.com CC: kexec@lists.infradead.org CC: mingo@redhat.com Link: commit 010a93bf97c72f43aac664d0a685942f83d1a103 Author: Bjorn Helgaas Date: Thu Sep 27 09:22:09 2018 -0500 resource: Fix find_next_iomem_res() iteration issue Previously find_next_iomem_res() used "*res" as both an input parameter for the range to search and the type of resource to search for, and an output parameter for the resource we found, which makes the interface confusing. The current callers use find_next_iomem_res() incorrectly because they allocate a single struct resource and use it for repeated calls to find_next_iomem_res(). When find_next_iomem_res() returns a resource, it overwrites the start, end, flags, and desc members of the struct. If we call find_next_iomem_res() again, we must update or restore these fields. The previous code restored res.start and res.end, but not res.flags or res.desc. Since the callers did not restore res.flags, if they searched for flags IORESOURCE_MEM | IORESOURCE_BUSY and found a resource with flags IORESOURCE_MEM | IORESOURCE_BUSY | IORESOURCE_SYSRAM, the next search would incorrectly skip resources unless they were also marked as IORESOURCE_SYSRAM. Fix this by restructuring the interface so it takes explicit "start, end, flags" parameters and uses "*res" only as an output parameter. Based on a patch by Lianbo Jiang . [ bp: While at it: - make comments kernel-doc style. - Originally-by: http://lore.kernel.org/lkml/20180921073211.20097-2-lijiang@redhat.com Signed-off-by: Bjorn Helgaas Signed-off-by: Borislav Petkov CC: Andrew Morton CC: Brijesh Singh CC: Dan Williams CC: H. Peter Anvin CC: Lianbo Jiang CC: Takashi Iwai CC: Thomas Gleixner CC: Tom Lendacky CC: Vivek Goyal CC: Yaowei Bai CC: bhe@redhat.com CC: dan.j.williams@intel.com CC: dyoung@redhat.com CC: kexec@lists.infradead.org CC: mingo@redhat.com CC: x86-ml Link: http://lkml.kernel.org/r/153805812916.1157.177580438135143788.stgit@bhelgaas-glaptop.roam.corp.google.com commit a98959fdbda1849a01b2150bb635ed559ec06700 Author: Bjorn Helgaas Date: Thu Sep 27 09:22:02 2018 -0500 resource: Include resource end in walk_*() interfaces find_next_iomem_res() finds an iomem resource that covers part of a range described by "start, end". All callers expect that range to be inclusive, i.e., both start and end are included, but find_next_iomem_res() doesn't handle the end address correctly. If it finds an iomem resource that contains exactly the end address, it skips it, e.g., if "start, end" is [0x0-0x10000] and there happens to be an iomem resource [mem 0x10000-0x10000] (the single byte at 0x10000), we skip it: find_next_iomem_res(...) { start = 0x0; end = 0x10000; for (p = next_resource(...)) { # p->start = 0x10000; # p->end = 0x10000; # we *should* return this resource, but this condition is false: if ((p->end >= start) && (p->start < end)) break; Adjust find_next_iomem_res() so it allows a resource that includes the single byte at the end of the range. This is a corner case that we probably don't see in practice. Fixes: 58c1b5b07907 ("[PATCH] memory hotadd fixes: find_next_system_ram catch range fix") Signed-off-by: Bjorn Helgaas Signed-off-by: Borislav Petkov CC: Andrew Morton CC: Brijesh Singh CC: Dan Williams CC: H. Peter Anvin CC: Lianbo Jiang CC: Takashi Iwai CC: Thomas Gleixner CC: Tom Lendacky CC: Vivek Goyal CC: Yaowei Bai CC: bhe@redhat.com CC: dan.j.williams@intel.com CC: dyoung@redhat.com CC: kexec@lists.infradead.org CC: mingo@redhat.com CC: x86-ml Link: http://lkml.kernel.org/r/153805812254.1157.16736368485811773752.stgit@bhelgaas-glaptop.roam.corp.google.com commit 51fbf14f2528a8c6401290e37f1c893a2412f1d3 Author: Bjorn Helgaas Date: Thu Sep 27 09:21:55 2018 -0500 x86/kexec: Correct KEXEC_BACKUP_SRC_END off-by-one error The only use of KEXEC_BACKUP_SRC_END is as an argument to walk_system_ram_res(): int crash_load_segments(struct kimage *image) { ... walk_system_ram_res(KEXEC_BACKUP_SRC_START, KEXEC_BACKUP_SRC_END, image, determine_backup_region); walk_system_ram_res() expects "start, end" arguments that are inclusive, i.e., the range to be walked includes both the start and end addresses. KEXEC_BACKUP_SRC_END was previously defined as (640 * 1024UL), which is the first address *past* the desired 0-640KB range. Define KEXEC_BACKUP_SRC_END as (640 * 1024UL - 1) so the KEXEC_BACKUP_SRC region is [0-0x9ffff], not [0-0xa0000]. Fixes: dd5f726076cc ("kexec: support for kexec on panic using new system call") Signed-off-by: Bjorn Helgaas Signed-off-by: Borislav Petkov CC: "H. Peter Anvin" CC: Andrew Morton CC: Brijesh Singh CC: Greg Kroah-Hartman CC: Ingo Molnar CC: Lianbo Jiang CC: Takashi Iwai CC: Thomas Gleixner CC: Tom Lendacky CC: Vivek Goyal CC: baiyaowei@cmss.chinamobile.com CC: bhe@redhat.com CC: dan.j.williams@intel.com CC: dyoung@redhat.com CC: kexec@lists.infradead.org Link: http://lkml.kernel.org/r/153805811578.1157.6948388946904655969.stgit@bhelgaas-glaptop.roam.corp.google.com commit 367e3f1d3fc9bbf1e626da7aea527f40babf8079 Author: Dave Hansen Date: Fri Sep 28 09:02:31 2018 -0700 x86/mm: Remove spurious fault pkey check Spurious faults only ever occur in the kernel's address space. They are also constrained specifically to faults with one of these error codes: X86_PF_WRITE | X86_PF_PROT X86_PF_INSTR | X86_PF_PROT So, it's never even possible to reach spurious_kernel_fault_check() with X86_PF_PK set. In addition, the kernel's address space never has pages with user-mode protections. Protection Keys are only enforced on pages with user-mode protection. This gives us lots of reasons to not check for protection keys in our sprurious kernel fault handling. But, let's also add some warnings to ensure that these assumptions about protection keys hold true. Cc: x86@kernel.org Cc: Jann Horn Cc: Sean Christopherson Cc: Thomas Gleixner Cc: Andy Lutomirski Signed-off-by: Dave Hansen Signed-off-by: Peter Zijlstra (Intel) Link: http://lkml.kernel.org/r/20180928160231.243A0D6A@viggo.jf.intel.com commit 3ae0ad92f53e0f05cf6ab781230b7902b88f73cd Author: Dave Hansen Date: Fri Sep 28 09:02:30 2018 -0700 x86/mm/vsyscall: Consider vsyscall page part of user address space The vsyscall page is weird. It is in what is traditionally part of the kernel address space. But, it has user permissions and we handle faults on it like we would on a user page: interrupts on. Right now, we handle vsyscall emulation in the "bad_area" code, which is used for both user-address-space and kernel-address-space faults. Move the handling to the user-address-space code *only* and ensure we get there by "excluding" the vsyscall page from the kernel address space via a check in fault_in_kernel_space(). Since the fault_in_kernel_space() check is used on 32-bit, also add a 64-bit check to make it clear we only use this path on 64-bit. Also move the unlikely() to be in is_vsyscall_vaddr() itself. This helps clean up the kernel fault handling path by removing a case that can happen in normal[1] operation. (Yeah, yeah, we can argue about the vsyscall page being "normal" or not.) This also makes sanity checks easier, like the "we never take pkey faults in the kernel address space" check in the next patch. Cc: x86@kernel.org Cc: Jann Horn Cc: Sean Christopherson Cc: Thomas Gleixner Cc: Andy Lutomirski Signed-off-by: Dave Hansen Signed-off-by: Peter Zijlstra (Intel) Link: http://lkml.kernel.org/r/20180928160230.6E9336EE@viggo.jf.intel.com commit 02e983b760c0d4183c28d625a3c99016e2cd8a7f Author: Dave Hansen Date: Fri Sep 28 09:02:28 2018 -0700 x86/mm: Add vsyscall address helper We will shortly be using this check in two locations. Put it in a helper before we do so. Let's also insert PAGE_MASK instead of the open-coded ~0xfff. It is easier to read and also more obviously correct considering the implicit type conversion that has to happen when it is not an implicit 'unsigned long'. Cc: x86@kernel.org Cc: Jann Horn Cc: Sean Christopherson Cc: Thomas Gleixner Cc: Andy Lutomirski Signed-off-by: Dave Hansen Signed-off-by: Peter Zijlstra (Intel) Link: http://lkml.kernel.org/r/20180928160228.C593509B@viggo.jf.intel.com commit 88259744e253777e898c186f08670c86dd8199bf Author: Dave Hansen Date: Fri Sep 28 09:02:27 2018 -0700 x86/mm: Fix exception table comments The comments here are wrong. They are too absolute about where faults can occur when running in the kernel. The comments are also a bit hard to match up with the code. Trim down the comments, and make them more precise. Also add a comment explaining why we are doing the bad_area_nosemaphore() path here. Cc: x86@kernel.org Cc: Jann Horn Cc: Sean Christopherson Cc: Thomas Gleixner Cc: Andy Lutomirski Signed-off-by: Dave Hansen Signed-off-by: Peter Zijlstra (Intel) Link: http://lkml.kernel.org/r/20180928160227.077DDD7A@viggo.jf.intel.com commit 5b0c2cac54d44ea40d5c5aec7cbf14353b2a903e Author: Dave Hansen Date: Fri Sep 28 09:02:25 2018 -0700 x86/mm: Add clarifying comments for user addr space The SMAP and Reserved checking do not have nice comments. Add some to clarify and make it match everything else. Cc: x86@kernel.org Cc: Jann Horn Cc: Sean Christopherson Cc: Thomas Gleixner Cc: Andy Lutomirski Signed-off-by: Dave Hansen Signed-off-by: Peter Zijlstra (Intel) Link: http://lkml.kernel.org/r/20180928160225.FFD44B8D@viggo.jf.intel.com commit aa37c51b9421d66f7931c5fdcb9ce80c450974be Author: Dave Hansen Date: Fri Sep 28 09:02:23 2018 -0700 x86/mm: Break out user address space handling The last patch broke out kernel address space handing into its own helper. Now, do the same for user address space handling. Cc: x86@kernel.org Cc: Jann Horn Cc: Sean Christopherson Cc: Thomas Gleixner Cc: Andy Lutomirski Signed-off-by: Dave Hansen Signed-off-by: Peter Zijlstra (Intel) Link: http://lkml.kernel.org/r/20180928160223.9C4F6440@viggo.jf.intel.com commit 8fed62000039058adfd8b663344e2f448aed1e7a Author: Dave Hansen Date: Fri Sep 28 09:02:22 2018 -0700 x86/mm: Break out kernel address space handling The page fault handler (__do_page_fault()) basically has two sections: one for handling faults in the kernel portion of the address space and another for faults in the user portion of the address space. But, these two parts don't stick out that well. Let's make that more clear from code separation and naming. Pull kernel fault handling into its own helper, and reflect that naming by renaming spurious_fault() -> spurious_kernel_fault(). Also, rewrite the vmalloc() handling comment a bit. It was a bit stale and also glossed over the reserved bit handling. Cc: x86@kernel.org Cc: Jann Horn Cc: Sean Christopherson Cc: Thomas Gleixner Cc: Andy Lutomirski Signed-off-by: Dave Hansen Signed-off-by: Peter Zijlstra (Intel) Link: http://lkml.kernel.org/r/20180928160222.401F4E10@viggo.jf.intel.com commit 164477c2331be75d9bd57fb76704e676b2bcd1cd Author: Dave Hansen Date: Fri Sep 28 09:02:20 2018 -0700 x86/mm: Clarify hardware vs. software "error_code" We pass around a variable called "error_code" all around the page fault code. Sounds simple enough, especially since "error_code" looks like it exactly matches the values that the hardware gives us on the stack to report the page fault error code (PFEC in SDM parlance). But, that's not how it works. For part of the page fault handler, "error_code" does exactly match PFEC. But, during later parts, it diverges and starts to mean something a bit different. Give it two names for its two jobs. The place it diverges is also really screwy. It's only in a spot where the hardware tells us we have kernel-mode access that occurred while we were in usermode accessing user-controlled address space. Add a warning in there. Cc: x86@kernel.org Cc: Jann Horn Cc: Sean Christopherson Cc: Thomas Gleixner Cc: Andy Lutomirski Signed-off-by: Dave Hansen Signed-off-by: Peter Zijlstra (Intel) Link: http://lkml.kernel.org/r/20180928160220.4A2272C9@viggo.jf.intel.com commit 145f573b89a62bf53cfc0144fa9b1c56b0f70b45 Author: Rik van Riel Date: Tue Sep 25 23:58:44 2018 -0400 x86/mm/tlb: Make lazy TLB mode lazier Lazy TLB mode can result in an idle CPU being woken up by a TLB flush, when all it really needs to do is reload %CR3 at the next context switch, assuming no page table pages got freed. Memory ordering is used to prevent race conditions between switch_mm_irqs_off, which checks whether .tlb_gen changed, and the TLB invalidation code, which increments .tlb_gen whenever page table entries get invalidated. The atomic increment in inc_mm_tlb_gen is its own barrier; the context switch code adds an explicit barrier between reading tlbstate.is_lazy and next->context.tlb_gen. CPUs in lazy TLB mode remain part of the mm_cpumask(mm), both because that allows TLB flush IPIs to be sent at page table freeing time, and because the cache line bouncing on the mm_cpumask(mm) was responsible for about half the CPU use in switch_mm_irqs_off(). We can change native_flush_tlb_others() without touching other (paravirt) implementations of flush_tlb_others() because we'll be flushing less. The existing implementations flush more and are therefore still correct. Cc: npiggin@gmail.com Cc: mingo@kernel.org Cc: will.deacon@arm.com Cc: kernel-team@fb.com Cc: luto@kernel.org Cc: hpa@zytor.com Tested-by: Song Liu Signed-off-by: Rik van Riel Signed-off-by: Peter Zijlstra (Intel) Link: http://lkml.kernel.org/r/20180926035844.1420-8-riel@surriel.com commit 97807813fe7074ee865d6bc1df1d0f8fb878ee9d Author: Rik van Riel Date: Tue Sep 25 23:58:43 2018 -0400 x86/mm/tlb: Add freed_tables element to flush_tlb_info Pass the information on to native_flush_tlb_others. No functional changes. Cc: npiggin@gmail.com Cc: mingo@kernel.org Cc: will.deacon@arm.com Cc: songliubraving@fb.com Cc: kernel-team@fb.com Cc: hpa@zytor.com Cc: luto@kernel.org Signed-off-by: Rik van Riel Signed-off-by: Peter Zijlstra (Intel) Link: http://lkml.kernel.org/r/20180926035844.1420-7-riel@surriel.com commit 016c4d92cd16f569c6485ae62b076c1a4b779536 Author: Rik van Riel Date: Tue Sep 25 23:58:42 2018 -0400 x86/mm/tlb: Add freed_tables argument to flush_tlb_mm_range Add an argument to flush_tlb_mm_range to indicate whether page tables are about to be freed after this TLB flush. This allows for an optimization of flush_tlb_mm_range to skip CPUs in lazy TLB mode. No functional changes. Cc: npiggin@gmail.com Cc: mingo@kernel.org Cc: will.deacon@arm.com Cc: songliubraving@fb.com Cc: kernel-team@fb.com Cc: luto@kernel.org Cc: hpa@zytor.com Signed-off-by: Rik van Riel Signed-off-by: Peter Zijlstra (Intel) Link: http://lkml.kernel.org/r/20180926035844.1420-6-riel@surriel.com commit 7d49b28a80b830c3ca876d33bedc58d62a78e16f Author: Rik van Riel Date: Tue Sep 25 23:58:41 2018 -0400 smp,cpumask: introduce on_each_cpu_cond_mask Introduce a variant of on_each_cpu_cond that iterates only over the CPUs in a cpumask, in order to avoid making callbacks for every single CPU in the system when we only need to test a subset. Cc: npiggin@gmail.com Cc: mingo@kernel.org Cc: will.deacon@arm.com Cc: songliubraving@fb.com Cc: kernel-team@fb.com Cc: hpa@zytor.com Cc: luto@kernel.org Signed-off-by: Rik van Riel Signed-off-by: Peter Zijlstra (Intel) Link: http://lkml.kernel.org/r/20180926035844.1420-5-riel@surriel.com commit c3f7f2c7eba1a53d2e5ffbc2dcc9a20c5f094890 Author: Rik van Riel Date: Tue Sep 25 23:58:40 2018 -0400 smp: use __cpumask_set_cpu in on_each_cpu_cond The code in on_each_cpu_cond sets CPUs in a locally allocated bitmask, which should never be used by other CPUs simultaneously. There is no need to use locked memory accesses to set the bits in this bitmap. Switch to __cpumask_set_cpu. Cc: npiggin@gmail.com Cc: mingo@kernel.org Cc: will.deacon@arm.com Cc: songliubraving@fb.com Cc: kernel-team@fb.com Cc: hpa@zytor.com Suggested-by: Peter Zijlstra Signed-off-by: Rik van Riel Reviewed-by: Andy Lutomirski Signed-off-by: Peter Zijlstra (Intel) Link: http://lkml.kernel.org/r/20180926035844.1420-4-riel@surriel.com commit 12c4d978fd170ccdd7260ec11f93b11e46904228 Author: Rik van Riel Date: Tue Sep 25 23:58:39 2018 -0400 x86/mm/tlb: Restructure switch_mm_irqs_off() Move some code that will be needed for the lazy -> !lazy state transition when a lazy TLB CPU has gotten out of date. No functional changes, since the if (real_prev == next) branch always returns. (cherry picked from commit 61d0beb5796ab11f7f3bf38cb2eccc6579aaa70b) Cc: npiggin@gmail.com Cc: efault@gmx.de Cc: will.deacon@arm.com Cc: Linus Torvalds Cc: Thomas Gleixner Cc: songliubraving@fb.com Cc: kernel-team@fb.com Cc: hpa@zytor.com Suggested-by: Andy Lutomirski Signed-off-by: Rik van Riel Acked-by: Dave Hansen Signed-off-by: Ingo Molnar Signed-off-by: Peter Zijlstra (Intel) Link: http://lkml.kernel.org/r/20180716190337.26133-4-riel@surriel.com commit 5462bc3a9a3c38328bbbd276d51164c7cf21d6a8 Author: Rik van Riel Date: Tue Sep 25 23:58:38 2018 -0400 x86/mm/tlb: Always use lazy TLB mode On most workloads, the number of context switches far exceeds the number of TLB flushes sent. Optimizing the context switches, by always using lazy TLB mode, speeds up those workloads. This patch results in about a 1% reduction in CPU use on a two socket Broadwell system running a memcache like workload. Cc: npiggin@gmail.com Cc: efault@gmx.de Cc: will.deacon@arm.com Cc: Linus Torvalds Cc: Thomas Gleixner Cc: kernel-team@fb.com Cc: hpa@zytor.com Cc: luto@kernel.org Tested-by: Song Liu Signed-off-by: Rik van Riel (cherry picked from commit 95b0e6357d3e4e05349668940d7ff8f3b7e7e11e) Acked-by: Dave Hansen Signed-off-by: Ingo Molnar Signed-off-by: Peter Zijlstra (Intel) Link: http://lkml.kernel.org/r/20180716190337.26133-7-riel@surriel.com commit a31acd3ee8f7dbc0370bdf4a4bfef7a8c13c7542 Author: Peter Zijlstra Date: Sun Aug 26 12:56:48 2018 +0200 x86/mm: Page size aware flush_tlb_mm_range() Use the new tlb_get_unmap_shift() to determine the stride of the INVLPG loop. Cc: Nick Piggin Cc: Will Deacon Cc: "Aneesh Kumar K.V" Cc: Andrew Morton Cc: Dave Hansen Signed-off-by: Peter Zijlstra (Intel) commit a5b966ae42a70b194b03eaa5eaea70d8b3790c40 Merge: cf089611f4c4 7526aa54b261 Author: Peter Zijlstra Date: Tue Oct 9 16:50:43 2018 +0200 Merge branch 'tlb/asm-generic' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux into x86/mm Pull in the generic mmu_gather changes from the ARM64 tree such that we can put x86 specific things on top as well. commit 8caec72e8cbff65afa38928197bea5a393b67975 Author: Keiichi Watanabe Date: Tue Oct 9 09:43:39 2018 -0400 media: vivid: Support 480p for webcam capture Support 640x480 as a frame size for video input devices of vivid. Signed-off-by: Keiichi Watanabe Acked-by: Hans Verkuil Reviewed-by: Kieran Bingham Signed-off-by: Mauro Carvalho Chehab commit 766c8ceb16fce904d6b8985ca2c0a547e053d1d5 Author: Javier González Date: Tue Oct 9 13:12:15 2018 +0200 lightnvm: pblk: guarantee that backpointer is respected on writer stall pblk's write buffer must guarantee that it respects the device's constrains for reads (i.e., mw_cunits). This is done by maintaining a backpointer that updates the L2P table as entries wrap up, making them point to the media instead of pointing to the write buffer. This mechanism can race in case that the write thread stalls, as the write pointer will protect the last written entry, thus disregarding the read constrains. This patch adds an extra check on wrap up, making sure that the threshold is respected at all times, preventing new entries to overwrite committed data, also in case of write thread stall. Reported-by: Heiner Litz Signed-off-by: Javier González Reviewed-by: Heiner Litz Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe commit 8a57fc3823d08edb1661a06d9e0a8c2365ac561e Author: Zhoujie Wu Date: Tue Oct 9 13:12:14 2018 +0200 lightnvm: pblk: consider max hw sectors supported for max_write_pgs When do GC, the number of read/write sectors are determined by max_write_pgs(see gc_rq preparation in pblk_gc_line_prepare_ws). Due to max_write_pgs doesn't consider max hw sectors supported by nvme controller(128K), which leads to GC tries to read 64 * 4K in one command, and see below error caused by pblk_bio_map_addr in function pblk_submit_read_gc. [ 2923.005376] pblk: could not add page to bio [ 2923.005377] pblk: could not allocate GC bio (18446744073709551604) Signed-off-by: Zhoujie Wu Reviewed-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe commit a70985f83c625a5eaf618be81621e5e4521a66c6 Author: Wei Yongjun Date: Tue Oct 9 13:12:13 2018 +0200 lightnvm: pblk: fix error handling of pblk_lines_init() In the too many bad blocks error handling case, we should release all the allocated resources, otherwise it will cause memory leak. Fixes: 2deeefc02dff ("lightnvm: pblk: fail gracefully on line alloc. failure") Signed-off-by: Wei Yongjun Reviewed-by: Hans Holmberg Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe commit 6fd05cad5ee1290b276dd8ed90a1e019b1fa577a Author: Javier González Date: Tue Oct 9 13:12:12 2018 +0200 lightnvm: do no update csecs and sos on 1.2 1.2 devices exposes their data and metadata size through the separate identify command. Make sure that the NVMe LBA format does not override these values. Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe commit d672d92d9c433c365fd6cdb4da1c02562b5f1178 Author: Javier González Date: Tue Oct 9 13:12:11 2018 +0200 lightnvm: pblk: guarantee mw_cunits on read buffer OCSSD 2.0 defines the amount of data that the host must buffer per chunk to guarantee reads through the geometry field mw_cunits. This value is the base that pblk uses to determine the size of its read buffer. Currently, this size is set to be the closes power-of-2 to mw_cunits times the number of parallel units available to the pblk instance for each open line (currently one). When an entry (4KB) is put in the buffer, the L2P table points to it. As the buffer wraps up, the L2P is updated to point to addresses on the device, thus guaranteeing mw_cunits at a chunk level. However, given that pblk cannot write to the device under ws_min (normally ws_opt), there might be a window in which the buffer starts wrapping up and updating L2P entries before the mw_cunits value in a chunk has been surpassed. In order not to violate the mw_cunits constrain in this case, account for ws_opt on the read buffer creation. Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe commit 9bd1f875c047a8a619a3e5233c1eb23eace02f31 Author: Javier González Date: Tue Oct 9 13:12:10 2018 +0200 lightnvm: pblk: move ring buffer alloc/free rb init pblk's read/write buffer currently takes a buffer and its size and uses it to create the metadata around it to use it as a ring buffer. This puts the responsibility of allocating/freeing ring buffer memory on the ring buffer user. Instead, move it inside of the ring buffer helpers (pblk-rb.c). This simplifies creation/destruction routines. Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe commit 40b8657dcc0bbd4a293cac1acd4b0b01c0359416 Author: Javier González Date: Tue Oct 9 13:12:09 2018 +0200 lightnvm: pblk: encapsulate rb pointer operations pblk's read/write buffer is always a power-of-2, thus wrapping up the buffer can be done with a bit mask. Since this is an implementation detail internal to the write buffer, make a helper that hides pointer increment + wrap, and allows to transparently relax this assumption in the future. Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe commit dde4aac20babee040875f76842a31b14b76dd369 Author: Javier González Date: Tue Oct 9 13:12:08 2018 +0200 lightnvm: pblk: remove unused function Removed unused function in pblk-rb.c Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe commit 44cdbdc657b23f75736eca3e88b781f009104363 Author: Javier González Date: Tue Oct 9 13:12:07 2018 +0200 lightnvm: pblk: fix race on sysfs line state pblk exposes a sysfs interface that represents its internal state. Part of this state is the map bitmap for the current open line, which should be protected by the line lock to avoid a race when freeing the line metadata. Currently, it is not. This patch makes sure that the line state is consistent and NULL bitmap pointers are not dereferenced. Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe commit 02a1520d56d11982ccc8eab56e4c562fd05d2c86 Author: Javier González Date: Tue Oct 9 13:12:06 2018 +0200 lightnvm: pblk: add SPDX license tag Add GLP-2.0 SPDX license tag to all pblk files Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe commit 6ad2f619b2b278467242e7a084c4f77d79c31a63 Author: Javier González Date: Tue Oct 9 13:12:05 2018 +0200 lightnvm: pblk: recover open lines on 2.0 devices In the OCSSD 2.0 spec, each chunk reports its write pointer. This means that pblk does not need to scan open lines to find the write pointer, but instead, it can retrieve it directly (and verify it). This patch uses the write pointer on open lines to (i) recover the line up until the last written lba and (ii) reconstruct the map bitmap and rest of line metadata so that the line can be used for new data. Since the 1.2 path in lightnvm core has been re-implemented to populate the chunk structure and thus recover the write pointer on initialization, this patch removes 1.2 specific recovery, as the 2.0 path can be reused. Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe commit 253babc3f677461a9f73b707bbbd56d2962e48c0 Author: Javier González Date: Tue Oct 9 13:12:04 2018 +0200 lightnvm: pblk: take write semaphore on metadata pblk guarantees write ordering at a chunk level through a per open chunk semaphore. At this point, since we only have an open I/O stream for both user and GC data, the semaphore is per parallel unit. For the metadata I/O that is synchronous, the semaphore is not needed as ordering is guaranteed. However, if the metadata scheme changes or multiple streams are open, this guarantee might not be preserved. This patch makes sure that all writes go through the semaphore, even for synchronous I/O. This is consistent with pblk's write I/O model. It also simplifies maintenance since changes in the metadata scheme could cause ordering issues. Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe commit af3fac1664b978f70a838571f3f35298ce1786da Author: Javier González Date: Tue Oct 9 13:12:03 2018 +0200 lightnvm: pblk: refactor metadata paths pblk maintains two different metadata paths for smeta and emeta, which store metadata at the start of the line and at the end of the line, respectively. Until now, these path has been common for writing and retrieving metadata, however, as these paths diverge, the common code becomes less clear and unnecessary complicated. In preparation for further changes to the metadata write path, this patch separates the write and read paths for smeta and emeta and removes the synchronous emeta path as it not used anymore (emeta is scheduled asynchronously to prevent jittering due to internal I/Os). Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe commit 45dcf29b98377bbdc40aa4a23a79ade60295dbaf Author: Javier González Date: Tue Oct 9 13:12:02 2018 +0200 lightnvm: pblk: encapsulate rqd dma allocations dma allocations for ppa_list and meta_list in rqd are replicated in several places across the pblk codebase. Make helpers to encapsulate creation and deletion to simplify the code. Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe commit 090ee26fd51270cc3bd54a0efbc716ede320ad27 Author: Javier González Date: Tue Oct 9 13:12:01 2018 +0200 lightnvm: use internal allocation for chunk log page The lightnvm subsystem provides helpers to retrieve chunk metadata, where the target needs to provide a buffer to store the metadata. An implicit assumption is that this buffer is contiguous and can be used to retrieve the data from the device. If the device exposes too many chunks, then kmalloc might fail, thus failing instance creation. This patch removes this assumption by implementing an internal buffer in the lightnvm subsystem to retrieve chunk metadata. Targets can then use virtual memory allocations. Since this is a target API change, adapt pblk accordingly. Signed-off-by: Javier González Reviewed-by: Hans Holmberg Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe commit 7325b4bbe5952e3e939f15de812f2ee0c0d33ca9 Author: Jia-Ju Bai Date: Tue Oct 9 13:12:00 2018 +0200 lightnvm: pblk: fix two sleep-in-atomic-context bugs The driver may sleep with holding a spinlock. The function call paths (from bottom to top) in Linux-4.16 are: [FUNC] nvm_dev_dma_alloc(GFP_KERNEL) drivers/lightnvm/pblk-core.c, 754: nvm_dev_dma_alloc in pblk_line_submit_smeta_io drivers/lightnvm/pblk-core.c, 1048: pblk_line_submit_smeta_io in pblk_line_init_bb drivers/lightnvm/pblk-core.c, 1434: pblk_line_init_bb in pblk_line_replace_data drivers/lightnvm/pblk-recovery.c, 980: pblk_line_replace_data in pblk_recov_l2p drivers/lightnvm/pblk-recovery.c, 976: spin_lock in pblk_recov_l2p [FUNC] bio_map_kern(GFP_KERNEL) drivers/lightnvm/pblk-core.c, 762: bio_map_kern in pblk_line_submit_smeta_io drivers/lightnvm/pblk-core.c, 1048: pblk_line_submit_smeta_io in pblk_line_init_bb drivers/lightnvm/pblk-core.c, 1434: pblk_line_init_bb in pblk_line_replace_data drivers/lightnvm/pblk-recovery.c, 980: pblk_line_replace_data in pblk_recov_l2p drivers/lightnvm/pblk-recovery.c, 976: spin_lock in pblk_recov_l2p To fix these bugs, the call to pblk_line_replace_data() is moved out of the spinlock protection. These bugs are found by my static analysis tool DSAC. Signed-off-by: Jia-Ju Bai Reviewed-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe commit bf82fa2f584f1c6e12df8c04fca715d53e7f32d5 Author: Hans Holmberg Date: Tue Oct 9 13:11:59 2018 +0200 lightnvm: pblk: fix mapping issue on failed writes On 1.2-devices, the mapping-out of remaning sectors in the failed-write's block can result in an infinite loop, stalling the write pipeline, fix this. Fixes: 6a3abf5beef6 ("lightnvm: pblk: rework write error recovery path") Signed-off-by: Hans Holmberg Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe commit 1864de94ec9d6e1ae4d481212847374df9b1be41 Author: Hans Holmberg Date: Tue Oct 9 13:11:58 2018 +0200 lightnvm: pblk: stop recreating global caches Pblk should not create a set of global caches every time a pblk instance is created. The global caches should be made available only when there is one or more pblk instances. This patch bundles the global caches together with a kref keeping track of whether the caches should be available or not. Also, turn the global pblk lock into a mutex that explicitly protects the caches (as this was the only purpose of the lock). Signed-off-by: Hans Holmberg Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe commit 63dee3a6c39a5bfa5f299ebb314f2e3e0273092b Author: Javier González Date: Tue Oct 9 13:11:57 2018 +0200 lightnvm: pblk: calculate line pad distance in helper If a line is padded, calculate the pad distance directly on the helper being used for this purpose. Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe commit 7f985f9a691dc25ddcfc9dc7ff21199f5ee1569c Author: Javier González Date: Tue Oct 9 13:11:56 2018 +0200 lightnvm: move ppa transformations to core Continuing the effort of moving 1.2 and 2.0 specific code to core, move 64_to_32 and 32_to_64 ppa helpers from pblk to core. Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe commit 4209c31c0c5cc0787e63b977dacc30e37378eb28 Author: Hans Holmberg Date: Tue Oct 9 13:11:55 2018 +0200 lightnvm: pblk: add tracing for chunk resets Trace state of chunk resets. Signed-off-by: Hans Holmberg Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe commit 1b0dd0bf3dc8e9fb974d61139c182be15e43caf9 Author: Hans Holmberg Date: Tue Oct 9 13:11:54 2018 +0200 lightnvm: pblk: add trace events for pblk state changes Add trace events for tracking pblk state changes. Signed-off-by: Hans Holmberg Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe commit f29372322e415999f429d3e3883b865c87860b46 Author: Hans Holmberg Date: Tue Oct 9 13:11:53 2018 +0200 lightnvm: pblk: add trace events for line state changes Add trace events for logging for line state changes. Signed-off-by: Hans Holmberg Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe commit 4c44abf43d00d81f5c648f376c436a9405980efc Author: Hans Holmberg Date: Tue Oct 9 13:11:52 2018 +0200 lightnvm: pblk: add trace events for chunk states Introduce trace points for tracking chunk states in pblk - this is useful for inspection of the entire state of the drive, and real handy for both fw and pblk debugging. Signed-off-by: Hans Holmberg Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe commit 43241cfe470850a590913a86e590fd4ad9939d59 Author: Matias Bjørling Date: Tue Oct 9 13:11:51 2018 +0200 lightnvm: pblk: remove debug from pblk_[down/up]_page Remove the debug only iteration within __pblk_down_page, which then allows us to reduce the number of arguments down to pblk and the parallel unit from the functions that calls it. Simplifying the callers logic considerably. Also, rename the functions pblk_[down/up]_page to pblk_[down/up]_chunk, to communicate that it manages the write pointer of the chunk. Note that it also protects the parallel unit such that at most one chunk is active per parallel unit. Signed-off-by: Matias Bjørling Reviewed-by: Javier González Signed-off-by: Jens Axboe commit 765462fa4c4d0fd3eb718f2ba14cb04c35219854 Author: Hans Holmberg Date: Tue Oct 9 13:11:50 2018 +0200 lightnvm: pblk: fix write amplificiation calculation When the user data counter exceeds 32 bits, the write amplification calculation does not provide the right value. Fix this by using div64_u64 in stead of div64. Fixes: 76758390f83e ("lightnvm: pblk: export write amplification counters to sysfs") Signed-off-by: Hans Holmberg Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe commit ea1d24bc3ac0a0a544db0686d1ff8bb0c31ad683 Author: Hans Holmberg Date: Tue Oct 9 13:11:49 2018 +0200 lightnvm: pblk: fix up prints in pblk_read_check_rand The prefix when printing ppas in pblk_read_check_rand should be "rnd" not "seq", so fix this so we can differentiate between lba missmatches in random and sequential reads. Also change the print order so we align with pblk_read_check_seq, printing read lba first. Signed-off-by: Hans Holmberg Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe commit e99e802fc640b273cd070a9342a21635aa8a1f77 Author: Hans Holmberg Date: Tue Oct 9 13:11:48 2018 +0200 lightnvm: pblk: remove unused parameters in pblk_up_rq The parameters nr_ppas and ppa_list are not used, so remove them. Signed-off-by: Hans Holmberg Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe commit 53d82db693fe1fd1926066583fd24285fb5aae16 Author: Hans Holmberg Date: Tue Oct 9 13:11:47 2018 +0200 lightnvm: pblk: allocate line map bitmaps using a mempool Line map bitmap allocations are fairly large and can fail. Allocation failures are fatal to pblk, stopping the write pipeline. To avoid this, allocate the bitmaps using a mempool instead. Mempool allocations never fail if called from a process context, and pblk *should* only allocate map bitmaps in process context, but keep the failure handling for robustness sake. Signed-off-by: Hans Holmberg Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe commit d68a9344041b6dd304ff382d0c7805869f09944f Author: Hans Holmberg Date: Tue Oct 9 13:11:46 2018 +0200 lightnvm: introduce nvm_rq_to_ppa_list There is a number of places in the lightnvm subsystem where the user iterates over the ppa list. Before iterating, the user must know if it is a single or multiple LBAs due to vector commands using either the nvm_rq ->ppa_addr or ->ppa_list fields on command submission, which leads to open-coding the if/else statement. Instead of having multiple if/else's, move it into a function that can be called by its users. A nice side effect of this cleanup is that this patch fixes up a bunch of cases where we don't consider the single-ppa case in pblk. Signed-off-by: Hans Holmberg Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe commit 9cc85bc761f83da41935cdd6edcdb7c122bc90bf Author: Javier González Date: Tue Oct 9 13:11:45 2018 +0200 lightnvm: pblk: guarantee emeta on line close If a line is recovered from open chunks, the memory structures for emeta have not necessarily been properly set on line initialization. When closing a line, make sure that emeta is consistent so that the line can be recovered on the fast path on next reboot. Also, remove a couple of empty lines at the end of the function. Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe commit 7a7d6f9b48cce82a1a666ec958125f257e5786fc Author: Javier González Date: Tue Oct 9 13:11:44 2018 +0200 lightnvm: pblk: remove unused variable. Removed unused struct ppa_addr variable. Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe commit 2e696f9093d0778d66d486c42577d651b60534ab Author: Javier González Date: Tue Oct 9 13:11:43 2018 +0200 lightnvm: pblk: fix comment typo Fix comment typo Decrese -> Decrease Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe commit cb21665c8d13bb7e1f6e211442c53f4675f1569d Author: Javier González Date: Tue Oct 9 13:11:42 2018 +0200 lightnvm: pblk: improve line helpers The current helper to obtain a line from a ppa returns the line id, which requires its users to explicitly retrieve the pointer to the line with the id. Make 2 different helpers: one returning the line id and one returning the line directly. Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe commit 2cf99bbd106f89fc72f778e8ad9d5538f1ef939b Author: Javier González Date: Tue Oct 9 13:11:41 2018 +0200 lightnvm: pblk: add helpers for chunk addresses Implement helpers to go from ppas to a chunk within a line and an address within a chunk. These helpers will be used on the patches adding trace support in pblk, which will be sent in this window. Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe commit ae14cc044b5988148d819c377fd0cc1c7504bc3c Author: Matias Bjørling Date: Tue Oct 9 13:11:40 2018 +0200 lightnvm: pblk: refactor put line fn on read completion The read completion path uses the put_line variable to decide whether the reference on a line should be released. The function name used for that is pblk_read_put_rqd_kref, which could lead one to believe that it is the rqd that is releasing the reference, while it is the line reference that is put. Rename and also split the function in two to account for either rqd or single ppa callers and move it to core, such that it later can be used in the write path as well. Signed-off-by: Matias Bjørling Reviewed-by: Javier González Reviewed-by: Heiner Litz Signed-off-by: Jens Axboe commit d20be90ae0bb938ee0dfc8277d531191341d8e39 Author: Matias Bjørling Date: Tue Oct 9 13:11:39 2018 +0200 lightnvm: pblk: remove size and out of bounds read check The I/O size and capacity checks are already done by the block layer. Signed-off-by: Matias Bjørling Reviewed-by: Javier González Signed-off-by: Jens Axboe commit 8bbd45d02a118cbefdf4e1a6274bd965a6aa3c59 Author: Matias Bjørling Date: Tue Oct 9 13:11:38 2018 +0200 lightnvm: pblk: fix incorrect min_write_pgs The calculation of pblk->min_write_pgs should only use the optimal write size attribute provided by the drive, it does not correlate to the memory page size of the system, which can be smaller or larger than the LBA size reported. Signed-off-by: Matias Bjørling Reviewed-by: Javier González Signed-off-by: Jens Axboe commit afdc23c91e085c56d1b0c119563c202b07255599 Author: Matias Bjørling Date: Tue Oct 9 13:11:37 2018 +0200 lightnvm: pblk: unify vector max req constants Both NVM_MAX_VLBA and PBLK_MAX_REQ_ADDRS define how many LBAs that are available in a vector command. pblk uses them interchangeably in its implementation. Use NVM_MAX_VLBA as the main one and remove usages of PBLK_MAX_REQ_ADDRS. Also remove the power representation that only has one user, and instead calculate it at runtime. Signed-off-by: Matias Bjørling Reviewed-by: Javier González Signed-off-by: Jens Axboe commit aff3fb18f957de93e629c7d3d2c4ef1f360aa511 Author: Matias Bjørling Date: Tue Oct 9 13:11:36 2018 +0200 lightnvm: move bad block and chunk state logic to core pblk implements two data paths for recovery line state. One for 1.2 and another for 2.0, instead of having pblk implement these, combine them in the core to reduce complexity and make available to other targets. The new interface will adhere to the 2.0 chunk definition, including managing open chunks with an active write pointer. To provide this interface, a 1.2 device recovers the state of the chunks by manually detecting if a chunk is either free/open/close/offline, and if open, scanning the flash pages sequentially to find the next writeable page. This process takes on average ~10 seconds on a device with 64 dies, 1024 blocks and 60us read access time. The process can be parallelized but is left out for maintenance simplicity, as the 1.2 specification is deprecated. For 2.0 devices, the logic is maintained internally in the drive and retrieved through the 2.0 interface. Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe commit d8adaa3b86324c6186d0adf74bc256bdacfffdb6 Author: Javier González Date: Tue Oct 9 13:11:35 2018 +0200 lightnvm: pblk: fix race condition on metadata I/O In pblk, when a new line is allocated, metadata for the previously written line is scheduled. This is done through a fixed memory region that is shared through time and contexts across different lines and therefore protected by a lock. Unfortunately, this lock is not properly covering all the metadata used for sharing this memory regions, resulting in a race condition. This patch fixes this race condition by protecting this metadata properly. Fixes: dd2a43437337 ("lightnvm: pblk: sched. metadata on write thread") Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe commit 656e33ca3d405196f94133babc4e38454a49cb73 Author: Matias Bjørling Date: Tue Oct 9 13:11:34 2018 +0200 lightnvm: move device L2P detection to core A 1.2 device is able to manage the logical to physical mapping table internally or leave it to the host. A target only supports one of those approaches, and therefore must check on initialization. Move this check to core to avoid each target implement the check. Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe commit 4b5d56edb8fc565c5db029aecaea598eadfba7f6 Author: Matias Bjørling Date: Tue Oct 9 13:11:33 2018 +0200 lightnvm: pblk: fix rqd.error return value in pblk_blk_erase_sync rqd.error is masked by the return value of pblk_submit_io_sync. The rqd structure is then passed on to the end_io function, which assumes that any error should lead to a chunk being marked offline/bad. Since the pblk_submit_io_sync can fail before the command is issued to the device, the error value maybe not correspond to a media failure, leading to chunks being immaturely retired. Also, the pblk_blk_erase_sync function prints an error message in case the erase fails. Since the caller prints an error message by itself, remove the error message in this function. Signed-off-by: Matias Bjørling Reviewed-by: Javier González Reviewed-by: Hans Holmberg Signed-off-by: Jens Axboe commit d7b6801673f95e5f72efd3ffba1bcbb606883049 Author: Matias Bjørling Date: Tue Oct 9 13:11:32 2018 +0200 lightnvm: combine 1.2 and 2.0 command flags Add nvm_set_flags helper to enable core to appropriately set the command flags for read/write/erase depending on which version a drive supports. The flags arguments can be distilled into the access hint, scrambling, and program/erase suspend. Replace the access hint with a "is_seq" parameter. The rest of the flags are dependent on the command opcode, which is trivial to detect and set. Signed-off-by: Matias Bjørling Reviewed-by: Javier González Signed-off-by: Jens Axboe commit 73569e11032fc5a9b314b6351632cfca7793afd5 Author: Matias Bjørling Date: Tue Oct 9 13:11:31 2018 +0200 lightnvm: remove dependencies on BLK_DEV_NVME and PCI No need to force NVMe device driver to be compiled in if the lightnvm subsystem is selected. Also no need for PCI to be selected as well, as it would be selected by the device driver that hooks into the subsystem. Signed-off-by: Matias Bjørling Reviewed-by: Javier González Signed-off-by: Jens Axboe commit 5b7c5e1f4c36b99d0f694f38b9ad910f520cb7ef Author: Takashi Iwai Date: Tue Oct 9 14:20:17 2018 +0200 ALSA: hda - Fix headphone pin config for ASUS G751 BIOS on ASUS G751 doesn't seem to map the headphone pin (NID 0x16) correctly. Add a quirk to address it, as well as chaining to the previous fix for the microphone. Reported-by: Håvard Cc: Signed-off-by: Takashi Iwai commit 7a2dc84fc480aec4f8f96e152327423014edf668 Author: Connor McAdams Date: Mon Oct 8 15:40:00 2018 -0400 ALSA: hda/ca0132 - Fix input effect controls for desktop cards This patch removes the echo cancellation control for desktop cards, and makes use of the special 0x47 SCP command for noise reduction. Signed-off-by: Connor McAdams Reviewed-by: Takashi Sakamoto Signed-off-by: Takashi Iwai commit 1502b432781ea5ab5a769f6d217503166ad775cc Author: Connor McAdams Date: Mon Oct 8 15:39:59 2018 -0400 ALSA: hda/ca0132 - Add error checking in ca0132_build_controls() This patch adds error checking to functions creating controls inside of ca0132_build_controls(). Signed-off-by: Connor McAdams Reviewed-by: Takashi Sakamoto Signed-off-by: Takashi Iwai commit ebabde1e1841780d2faf5b1e8a07111753063796 Author: Connor McAdams Date: Mon Oct 8 15:39:58 2018 -0400 ALSA: hda/ca0132 - Clean up patch_ca0132() This patch cleans up the patch_ca0132() function with suggestions from Takashi Sakamoto. Signed-off-by: Connor McAdams Reviewed-by: Takashi Sakamoto Signed-off-by: Takashi Iwai commit a88bcc8d96817ec0329b9cb402749e3d0d59698f Author: Connor McAdams Date: Mon Oct 8 15:39:57 2018 -0400 ALSA: hda/ca0132 - Fix microphone inconsistency issues This patch fixes microphone inconsistency issues by adding a delay to each setup_defaults function. Without this, the microphone only works intermittently. Signed-off-by: Connor McAdams Reviewed-by: Takashi Sakamoto Signed-off-by: Takashi Iwai commit 24f5975f3aff03cb24026c768fdad0772304009b Author: YueHaibing Date: Sat Oct 6 02:23:01 2018 +0000 usb/early: remove set but not used variable 'remain_length' Fixes gcc '-Wunused-but-set-variable' warning: drivers/usb/early/xhci-dbc.c: In function 'xdbc_handle_tx_event': drivers/usb/early/xhci-dbc.c:720:9: warning: variable 'remain_length' set but not used [-Wunused-but-set-variable] It never be used since introduction in commit aeb9dd1de98c ("usb/early: Add driver for xhci debug capability") Signed-off-by: YueHaibing Signed-off-by: Greg Kroah-Hartman commit f65861c645ceb59f7325f696f0e8fa195dde575d Author: Stephen Boyd Date: Sun Oct 7 16:46:12 2018 -0700 usb: typec: Fix copy/paste on typec_set_vconn_role() kerneldoc This must have been copy pasted from the function above. Fix it. Signed-off-by: Stephen Boyd Acked-by: Heikki Krogerus Signed-off-by: Greg Kroah-Hartman commit 554fab6dbf20ee7298ed2d4e8398b85e6058abb7 Author: Adam Thomson Date: Mon Oct 8 13:53:59 2018 +0100 usb: typec: tcpm: Report back negotiated PPS voltage and current Currently when requesting a specific voltage or current through the psy interface, for PPS, when reading back from that interface the values will always be the same as previously given, if the request was successful. However PPS only allows for 20mV voltage steps and 50mA current steps, and the psy class expects microvolt and micro amp requests, so inbetween values can be provided through this interface. Really when reading back the true values negotiated should be given, and not the ones originally asked for. To report the actual values negotiated with the Source, the values stored are now rounded down to the relevant step units prior to building the PPS request, so that those values are later correctly reported through the psy interface. In addition this improves the adjustments made to meet the operating power requirements of the platform, which previously could have been slightly out due to not using valid PPS units of voltage and current. Signed-off-by: Adam Thomson Reviewed-by: Guenter Roeck Signed-off-by: Greg Kroah-Hartman commit c36e96bd259d5ec1e73c2cbfdc3ef935e6b0f830 Author: YueHaibing Date: Thu Oct 4 03:06:12 2018 +0000 USB: core: remove set but not used variable 'udev' Fixes gcc '-Wunused-but-set-variable' warning: drivers/usb/core/driver.c: In function 'usb_driver_claim_interface': drivers/usb/core/driver.c:513:21: warning: variable 'udev' set but not used [-Wunused-but-set-variable] Since commit c183813fcee44a24 ("USB: remove LPM management from usb_driver_claim_interface()"), 'udev' is not used. Signed-off-by: YueHaibing Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit bf7f547ecdd707e7b4fcbc467b4f9ddb29915391 Author: Colin Ian King Date: Wed Oct 3 10:59:57 2018 +0100 usb: core: fix memory leak on port_dev_path allocation Currently the allocation of port_dev_path from the call to kobject_get_path is not being kfree'd, causing a memory leak. Fix this by kfree'ing this at the end of the function. Add an extra error exit path to fix one of the early leaks when envp[0] fails to be allocated. Detected by CoverityScan, CID#1473771 ("Resource Leak") Fixes: 201af55da8a3 ("usb: core: added uevent for over-current") Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman commit 0a0b7e62525fa0ad778439acc28bf2f53967453e Author: Gao Xiang Date: Tue Oct 9 21:43:53 2018 +0800 staging: erofs: add the missing __init tags Append __init to `erofs_init_inode_cache', `z_erofs_init_zip_subsystem' and move these declarations to internal.h. Signed-off-by: Gao Xiang Signed-off-by: Greg Kroah-Hartman commit fa86c00799ee1fb851261a0ef904200ecd9c8215 Author: Spencer E. Olson Date: Wed Oct 3 14:56:12 2018 -0600 staging: comedi: ni_660x: add device-global routing Provides the device-global routing interface for ni_660x devices. Using the device-global names in comedi_cmd structures for commands was already supported through the ni_tio module. Signed-off-by: Spencer E. Olson Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman commit a0c5e8460011506978c833d72496ce0147d82b2f Author: Spencer E. Olson Date: Wed Oct 3 14:56:11 2018 -0600 staging: comedi: ni_660x: clean up pfi routing Cleans up the pfi routing code to make it easier to follow, read, and also to prepare to use this cleaned up code for enabling the device-global routing interface for ni_660x devices. Signed-off-by: Spencer E. Olson Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman commit 51c4ba6407ef9f5735bc6bf566211bb839892e4b Author: Spencer E. Olson Date: Wed Oct 3 14:56:10 2018 -0600 staging: comedi: ni_660x: Add NI PCI-6608 to list of supported devices Previously, only the PXI version of the NI-6608 board was supported. This change adds support for the PCI version as well. Signed-off-by: Spencer E. Olson Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman commit 713ebc593978e67d9e6d708f34fa6c66470be536 Author: Spencer E. Olson Date: Wed Oct 3 14:56:09 2018 -0600 staging: comedi: ni_mio_common: create device-global access to tio Adds tio sub-devices of ni_mio_common supported hardware to the implementation of test_route, connect_route, disconnect_route. This change delegates the actual functionality to the ni_tio module. Signed-off-by: Spencer E. Olson Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman commit 347e244884c3be1f5bce1d93730f0c32efabba99 Author: Spencer E. Olson Date: Wed Oct 3 14:56:08 2018 -0600 staging: comedi: tio: implement global tio/ctr routing Adds ability to use device-global names in command args, in particular cmd->start_arg (for NI_CtrArmStartTrigger), and cmd->scan_begin_arg or cmd->convert_arg (either is used to specify NI_CtrGate, with preference given to cmd->scan_begin_arg, if it is set). The actual arguments of cmd->start_arg are not fully checked against known register values for the particular devices because these are not documented or currently known. This follows the precedence of prior versions of the tio driver. Should these become known, they should be annotated in the route_values tables and the set of lines in ni_tio_cmdtest should be uncommented to allow the tests to be made. This patch also adds interface functions that allow routes for particular counter route destinations to be made/queried/unmade. This allows overseer modules to implement test_route, connect_route, and disconnect_route. As a part of these changes, various functions were cleaned up and clarified. These new interface functions allow direct writing/reading of register values. This is an example of exactly what the new device-global access was intended to solve: the old interface was not consistent with other portions of the ni_* drivers--it did not allow full register values to be given for various MUXes. Instead, the old interface _did_ abstract away some of the actual hardware from the underlying devices, but it was not consistent with any other NI hardware. Allowing the device-global identifiers to be used, the new patch provides for consistency across all ni_* drivers. One final note: these changes provide for backwards compatibility by allowing the older values to still be used in through the pre-existing kernel interfaces--though not in the new device-global test/dis/connect/route interfaces. Signed-off-by: Spencer E. Olson Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman commit 02d1c6e827073ebb65d9f92c169c024ae2d20ddc Author: Spencer E. Olson Date: Wed Oct 3 14:56:07 2018 -0600 staging: comedi: ni_mio_common: implement output selection of GPFO_{0, 1} Implement the ability to route various signals to NI_CtrOut(x) pin. This pin is also known as GPFO_{0,1} in the DAQ STC. Signed-off-by: Spencer E. Olson Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman commit d4961bb3d99f895fe8cf368b9765405a3f829198 Author: Spencer E. Olson Date: Wed Oct 3 14:56:06 2018 -0600 staging: comedi: ni_mio_common: implement global pfi, rtsi routing Implement device-global config interface for ni_mio devices. In particular, this patch implements: INSN_DEVICE_CONFIG_TEST_ROUTE, INSN_DEVICE_CONFIG_CONNECT_ROUTE, INSN_DEVICE_CONFIG_DISCONNECT_ROUTE, INSN_DEVICE_CONFIG_GET_ROUTES for the ni mio devices. This means that the new abstracted signal/terminal names can be used to define signal routing with regards to the PFI terminals and RTSI trigger bus lines. This also adds ability to identify PFI and RTSI channels on the PFI and RTSI subdevices using the new device-global names. This does not change the values that are set for channel output selections using the subdevice interfaces--these still require direct register values. Annotates and updates tables of register values to reflect this new implementation status. Signed-off-by: Spencer E. Olson Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman commit 56d0b826d39f5b04dc5df7e270539361627684de Author: Spencer E. Olson Date: Wed Oct 3 14:56:05 2018 -0600 staging: comedi: ni_mio_common: implement new routing for TRIG_EXT Use new signal routing capability for all comedi command *_src == TRIG_EXT options. This new interface allows the user specify signals and terminals as TRIG_EXT sources using a very consistent naming convention. Furthermore, the interface allows backwards compatibility to prior behavior of specifying register-level (or near register-level) values as *_arg options when *_src == TRIG_EXT. Annotates and updates tables of register values to reflect this new implementation status. Signed-off-by: Spencer E. Olson Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman commit 4bb90c87abbe21ea469a242c8b350ea39a459c84 Author: Spencer E. Olson Date: Wed Oct 3 14:56:04 2018 -0600 staging: comedi: add interface to ni routing table information Adds interface and associated unittests for accessing/looking-up/validating the new ni routing table information. Signed-off-by: Spencer E. Olson Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman commit ba932fcfee28b6a23bb8a903ce5a2210ac861721 Author: Spencer E. Olson Date: Wed Oct 3 14:56:03 2018 -0600 staging: comedi: ni_routing: Add NI signal routing info See README for a thorough discussion of this content. Adds tables of all register values for routing various signals to various terminals on National Instruments hardware. This information is directly compared to and taken from register-level programming documentation and/or register-level programming examples as provided by National Instruments. Furthermore, this information was mostly compared (favorably) to the register values already used in the comedi drivers for NI hardware. Adds tables of valid routes for many devices. This information is not consistent from device to device, nor entirely consistent within device families. One additional major challenge is that this information does not seem to be obtainable in any programmatic fashion, neither through the proprietary NIDAQmx(-base) c-libraries, nor with register level programming, _nor_ through any documentation. In fact, the only consistent source of this information is through the proprietary NI-MAX software, which currently only runs on Windows platforms. A further challenge is that this information cannot be exported from NI-MAX, except by screenshot. The collection and maintenance of this information is somewhat tedious and requires frequent re-examination and comparison of NI-MAX and/or the NI-MHDDK documentation (register programming information) and NI-MHDDK examples. Tools are added with this patch to facilitate generating CSV files from the data tables. These CSV files can be used with a spreadsheet program to provide better visual comparision with screenshots gathered from NI-MAX. Tools are also added to regenerate the data tables from CSV content--this greatly enhances updating data tables with large changes (such as when adding devices). Signed-off-by: Spencer E. Olson Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman commit d7569ad766511fe708a8bd7476baa305d1510daf Author: Spencer E. Olson Date: Wed Oct 3 14:56:02 2018 -0600 staging: comedi: add new device-global config interface Adds interface for configuring options that are global to all sub-devices. For now, only options to configure device-globally identified signal routes have been defined. Signed-off-by: Spencer E. Olson Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman commit 5912827dfe78a0befae8a5e44f419eaf3deced72 Author: Spencer E. Olson Date: Wed Oct 3 14:56:01 2018 -0600 staging: comedi: add abstracted NI signal/terminal named constants This change adds abstracted constants for National Instruments terminal/signal names. Some background: There have been significant confusions over the past many years for users when trying to understand how to connect to/from signals and terminals on NI hardware using comedi. The major reason for this is that the actual register values were exposed and required to be used by users. Several major reasons exist why this caused major confusion for users: 1) The register values are _NOT_ in user documentation, but rather in arcane locations, such as a few register programming manuals that are increasingly hard to find and the NI-MHDDK (comments in in example code). There is no one place to find the various valid values of the registers. 2) The register values are _NOT_ completely consistent. There is no way to gain any sense of intuition of which values, or even enums one should use for various registers. There was some attempt in prior use of comedi to name enums such that a user might know which enums should be used for varying purposes, but the end-user had to gain a knowledge of register values to correctly wield this approach. 3) The names for signals and registers found in the various register level programming manuals and vendor-provided documentation are _not_ even close to the same names that are in the end-user documentation. Similar confusion, albeit less, plagued NI's previous version of their own proprietary drivers. Earlier than 2003, NI greatly simplified the situation for users by releasing a new API that abstracted the names of signals/terminals to a common and intuitive set of names. In addition, this new API provided a much more common interface to use for most of NI hardware. The names added here mirror the names chosen and well documented by NI. These names are exposed to the user via the comedilib user library. By keeping the names in this format, in spite of the use of CamelScript, maintenance will be greatly eased and confusion for users _and_ comedi developers will be greatly reduced. Signed-off-by: Spencer E. Olson Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman commit 040e9e4dfa14de632824b9368462c1bd20d05733 Author: Spencer E. Olson Date: Wed Oct 3 14:56:00 2018 -0600 staging: comedi: tests: add unittest framework for comedi Adds a framework for unittests for comedi drivers. It was certainly possible to write some unit tests before and test various aspects of a particular driver, but this framework makes this a bit easier and hopefully inspires more unittest modules to be written. Signed-off-by: Spencer E. Olson Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman commit e0b2ca8979c4b923d28eb4daa3a783463debd31c Author: Spencer E. Olson Date: Wed Sep 19 10:51:06 2018 -0600 staging: comedi: comedi_test: implement INSN_CONFIG_GET_CMD_TIMING_CONSTRAINTS Adds implementation of the new INSN_CONFIG_GET_CMD_TIMING_CONSTRAINTS instruction. Signed-off-by: Spencer E. Olson Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman commit 3ad53c40902005c50122be34e2b60dd763314180 Author: Spencer E. Olson Date: Wed Sep 19 10:51:05 2018 -0600 staging: comedi: ni_pcidio: implement INSN_CONFIG_GET_CMD_TIMING_CONSTRAINTS Adds implementation of the new INSN_CONFIG_GET_CMD_TIMING_CONSTRAINTS instruction. This patch also adds data for this implementation, based on spec sheets from NI. Signed-off-by: Spencer E. Olson Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman commit 51fd3673838396844f15de0e906be5333bfbbc8d Author: Spencer E. Olson Date: Wed Sep 19 10:51:04 2018 -0600 staging: comedi: ni_mio_common: implement INSN_CONFIG_GET_CMD_TIMING_CONSTRAINTS Adds implementation of the new INSN_CONFIG_GET_CMD_TIMING_CONSTRAINTS instruction. This patch also adds data for digital subdevices that are streaming capable (within the ni_mio_* family). Mostly, only the m-series devices are capable of digital streaming. Signed-off-by: Spencer E. Olson Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman commit 832f33366c771855951313a9bab4926f2a0d37a1 Author: Spencer E. Olson Date: Wed Sep 19 10:51:03 2018 -0600 staging: comedi: add facility to directly query subdevice timing constraints Adds facility to directly query the hardware speed limits of subdevices, in particular for scan_begin and convert signals. This information can be critical for integrating comedi with other hardware modules, and also comedi modules together with software where software requires specific timing capabilities in order to properly coordinate multiple devices. Currently, comedi_command_test almost satisfies this need, but really only for when *_src == TRIG_TIMER. For *_src == TRIG_EXT, comedi_command_test does not help at all. For many subdevices, one might simply use *_src==TRIG_TIMER in command_test in order to determine these limits. For other subdevices, this tactic does not work since *_src == TRIG_TIMER might not be valid. There is also the possibility that the timing limits are different between the TRIG_TIMER and TRIG_EXT modes. Signed-off-by: Spencer E. Olson Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman commit 20438d93d4304c0fc6e063c0e1f8d6580e88a29b Author: John Whitmore Date: Sun Oct 7 22:40:25 2018 +0100 staging:rtl8192u: Correct comparison with NULL - Style Correct code to remote comparison with NULL, this clears the resulting checkpatch issue. This is a coding style change which should not impact runtime code execution. Signed-off-by: John Whitmore Signed-off-by: Greg Kroah-Hartman commit 6e67e8f0f0d26e01528a6e97a0228ac5d9457244 Author: John Whitmore Date: Sun Oct 7 22:40:24 2018 +0100 staging:rtl8192u: Correct code alignment - Style Correct the alignment of a function, this clears checkpatch issue. This is a simple coding style change which should not impact runtime code execution. Signed-off-by: John Whitmore Signed-off-by: Greg Kroah-Hartman commit 5f70a818ed2f46afbed1c3a8a99ae8c0554189fe Author: John Whitmore Date: Sun Oct 7 22:40:23 2018 +0100 staging:rtl8192u: Remove unnecessary line continuation - Style Remove the unnecessary line continuation character to clear checkpatch issue. This is a simple coding style change which should not impact runtime code execution. Signed-off-by: John Whitmore Signed-off-by: Greg Kroah-Hartman commit 28181d53db8270506dcde75df415908f755336b8 Author: John Whitmore Date: Sun Oct 7 22:40:22 2018 +0100 staging:rtl8192u: Add missing blank lines - Style Add missing blank lines after declarations. This clears the resulting checkpatch issue. This is a simple coding style change which should not impact runtime code execution. Signed-off-by: John Whitmore Signed-off-by: Greg Kroah-Hartman commit 98d48ef26313b5bd2e5c6f87a3587e0ce3ce8b57 Author: John Whitmore Date: Sun Oct 7 22:40:21 2018 +0100 staging:rtl8192u: Correct code indentation - Style Rewrite code block to correct the indentation of code. This clears the resulting checkpatch issue. This is a coding style change which should not impact runtime code execution. Signed-off-by: John Whitmore Signed-off-by: Greg Kroah-Hartman commit 31bd9b21dcf43ba14146dd7f8f2d43931f732c10 Author: John Whitmore Date: Sun Oct 7 22:40:19 2018 +0100 staging:rtl8192u: Add spaces around + operator - Style Add spaces around '+' operator to clear the checkpatch issue. This is a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore Signed-off-by: Greg Kroah-Hartman commit 009cf451d42101a919bbe160cb6624301996e78e Author: John Whitmore Date: Sun Oct 7 22:40:18 2018 +0100 staging:rtl8192u: Remove extra blank lines - Style Remove the extra blank lines to clear checkpatch issue. This is a simple coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore Signed-off-by: Greg Kroah-Hartman commit bff9df7d45d3b30e42657c9e48d46036941b5b6b Author: John Whitmore Date: Sun Oct 7 22:40:17 2018 +0100 staging:rtl8192u: Clear error with line ending ( - Style Rewrite function call to clear the checkpatch issue with lines ending with a '(' character. This is a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore Signed-off-by: Greg Kroah-Hartman commit a631b95feeaa2cc70565072307ddae1f80793f70 Author: John Whitmore Date: Sun Oct 7 22:40:16 2018 +0100 staging:rtl8192u: Removed commented out include - Style Remove commented out #include directive. Additionally shorted a block comment to clear the checkpatch issue with line length. These are coding style changes which should have no impact on runtime code execution. Signed-off-by: John Whitmore Signed-off-by: Greg Kroah-Hartman commit 8ad0f087e46c83078f0010e97014c787dcba5f5b Author: John Whitmore Date: Sun Oct 7 22:40:15 2018 +0100 staging:rtl8192u: Add missing SPDX-License-Identifier - Style Add the missing SPDX-License-Identifier tag to file to clear the checkpatch issue. This is a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore Signed-off-by: Greg Kroah-Hartman commit 4d6958484830d6e60c6bae060a84b6e9a1678956 Author: Tuomas Tynkkynen Date: Thu Oct 4 12:37:47 2018 +0300 staging: vc04_services: Drop no longer needed headers Previously, connection.h was only required for the definition of VCHI_CONNECTION_T, but now all usages of it are gone. Remove this unused header. After connection.h is gone, message.h and vchi_cfg_internal.h are no longer referenced by anything either. Drop them as well. Signed-off-by: Tuomas Tynkkynen Acked-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman commit 96abfeca6898f497efcea7630a6cf67c63273ede Author: Tuomas Tynkkynen Date: Thu Oct 4 12:37:46 2018 +0300 staging: vc04_services: Drop unused parameters from vchi_connect() Remove two parameters which are never used and all where all callers just pass in dummy values anyway. Signed-off-by: Tuomas Tynkkynen Acked-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman commit 5bc4ab85eaff1f56f32454f8bd032212e79c194e Author: Tuomas Tynkkynen Date: Thu Oct 4 12:37:45 2018 +0300 staging: vc04_services: Drop VCHI_SERVICE_INIT and SERVICE_INFO_T These types are not used anywhere, remove them. Signed-off-by: Tuomas Tynkkynen Acked-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman commit 9c74c630b9d977edf74868da95366f5b6215dffe Author: Tuomas Tynkkynen Date: Thu Oct 4 12:37:44 2018 +0300 staging: vc04_services: Drop declaration of vchi_crc_control() There is no definition for this unused function, so drop its prototype. Signed-off-by: Tuomas Tynkkynen Acked-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman commit 67aa291ba575a7c1b7f967a2e6d3e5b97cc398e2 Author: Tuomas Tynkkynen Date: Thu Oct 4 12:37:43 2018 +0300 staging: vc04_services: Drop trivially unused fields from SERVICE_CREATION_T These fields are only initialized with constants and never read. Drop them. Signed-off-by: Tuomas Tynkkynen Acked-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman commit 22ad7f6baaa7e05347e980cd5ce967e813556cf8 Author: Tuomas Tynkkynen Date: Thu Oct 4 12:37:42 2018 +0300 staging: vc04_services: Drop 'connection' field from SERVICE_CREATION_T The connection field of SERVICE_CREATION_T is assigned to but its value is never read. Drop the field and the resulting no longer needed code from bcm2835-audio and bcm2835-camera. Signed-off-by: Tuomas Tynkkynen Acked-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman commit 3deb90fef568c7a430e0ea5c5dee735fa433afc4 Author: Tuomas Tynkkynen Date: Thu Oct 4 12:37:41 2018 +0300 staging: vc04_services: Drop pointless stub functions These functions do nothing besides returning NULL and are unused. Just drop them. Signed-off-by: Tuomas Tynkkynen Acked-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman commit 1cbca5852d6c16e85a21487a15d211195aacd4a1 Author: Spencer E. Olson Date: Wed Oct 3 14:54:16 2018 -0600 staging: comedi: ni_mio_common: protect register write overflow Fixes two problems introduced as early as commit 03aef4b6dc12 ("Staging: comedi: add ni_mio_common code"): (1) Ensures that the last four bits of NISTC_RTSI_TRIGB_OUT_REG register is not unduly overwritten on e-series devices. On e-series devices, the first three of the last four bits are reserved. The last bit defines the output selection of the RGOUT0 pin, otherwise known as RTSI_Sub_Selection. For m-series devices, these last four bits are indeed used as the output selection of the RTSI7 pin (and the RTSI_Sub_Selection bit for the RGOUT0 pin is moved to the RTSI_Trig_Direction register. (2) Allows all 4 RTSI_BRD lines to be treated as valid sources for RTSI lines. This patch also cleans up the ni_get_rtsi_routing command for readability. Fixes: 03aef4b6dc12 ("Staging: comedi: add ni_mio_common code") Signed-off-by: Spencer E. Olson Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman commit 64f83a816b27c7b5e026a74ecb5c61dbabfae997 Author: Bartlomiej Zolnierkiewicz Date: Tue Oct 9 15:18:42 2018 +0200 Revert "video: ssd1307fb: Do not hard code active-low reset sequence" This reverts commit 9827f26374fb85e1811f2adbcc25c8a3992dbe7f. On 10/09/2018 02:20 AM, Shawn Guo wrote: > Well, it means the change breaks the ABI between kernel and device tree, > e.g. the new kernel will not work with existing/installed DTBs. Revert the change until DTB compatibility issue is resolved. Signed-off-by: Bartlomiej Zolnierkiewicz commit 0f80b1c9f4a919707a8be0400905dac9912637ac Author: Michael Straube Date: Sat Oct 6 15:02:31 2018 +0200 staging: rtl8188eu: add spaces around operators in odm_rtl8188e.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 9fd3ad9d8a54caf12b291c9c2f134ce88b11ffd4 Author: Michael Straube Date: Sat Oct 6 15:02:30 2018 +0200 staging: rtl8188eu: remove dead code from dm_fast_training_init() The variable AntCombination is initialized to 2 and never changed. So the else if path is never used. Remove the dead code and the variable AntCombination. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit 12f388a6ae453dd649a60d1ae9441185631a413e Author: Michael Straube Date: Thu Oct 4 19:57:00 2018 +0200 staging: rtl8188eu: remove whitespace in rtw_mlme_ext.h Remove spaces and/or replace tabs with spaces in some declarations in rtw_mlme_ext.h. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit c1ff246a8d62eee5bfbd83b605692c6adf92915a Author: Michael Straube Date: Thu Oct 4 19:56:59 2018 +0200 staging: rtl8188eu: make struct field of action_handler const The strings in the use of struct action_handler are constant. Change the type of field str from 'char *' to 'const char *'. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit 98962eb6d679985696571262fb6b14f1182e7a8c Author: Michael Straube Date: Thu Oct 4 19:56:58 2018 +0200 staging: rtl8188eu: make struct field of mlme_handler const The strings in the uses of struct mlme_handler are constant. Change the type of field str from 'char *' to 'const char *'. Suggested-by: Joe Perches Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit e6d9855dd3f3a0068cb9f6264303209b5e2affcd Author: Michael Straube Date: Thu Oct 4 19:56:57 2018 +0200 staging: rtl8188eu: change array type to const u8 Change the type of MCS_rate_1R from unsigned char to const u8. Suggested-by: Joe Perches Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit 304643019226b51b3dc77b603667c84400847010 Author: Michael Straube Date: Wed Oct 3 22:43:59 2018 +0200 staging: rtl8188eu: rewrite if tests - style Rewrite if tests to clear a 'line over 80 characters' and 'Comparisons should place the constant on the right side of the test' checkpatch warning. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit e157c44a830d7f00d5b4689d61f040a9a6f971f7 Author: Michael Straube Date: Wed Oct 3 22:43:58 2018 +0200 staging: rtl8188eu: cleanup array declaration - style Cleanup array declaration to clear two 'line over 80 characters' checkpatch warnings and improve readability. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit 06b17ed6c060b9744ceb0947c35a73f58d3d4f49 Author: Michael Straube Date: Wed Oct 3 22:43:57 2018 +0200 staging: rtl8188eu: fix line over 80 characters - style Line break array declaration to clear a 'line over 80 characters' checkpatch warning. For consistency replace 0x0 with 0x00. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit 6b8b5fa2af32629bd2a65a2f719aa1d2ae836236 Author: Jaakko Tyynismaa Date: Tue Oct 9 05:06:48 2018 +0000 staging: mt7621-mmc: Add blank line after declaration Add blank line after declaration. Reported by checkpatch. Signed-off-by: Jaakko Tyynismaa Signed-off-by: Greg Kroah-Hartman commit 97972ccc083c3c682796ebe2436938efaf19f7ad Author: Nathan Chancellor Date: Wed Oct 3 22:56:00 2018 -0700 staging: emxx_udc: Remove unused device_desc declaration Clang warns: drivers/staging/emxx_udc/emxx_udc.c:1373:37: warning: variable 'device_desc' is not needed and will not be emitted [-Wunneeded-internal-declaration] static struct usb_device_descriptor device_desc = { ^ 1 warning generated. This definition hasn't been attached to anything since the driver was introduced in commit 33aa8d45a4fe ("staging: emxx_udc: Add Emma Mobile USB Gadget driver") and neither GCC nor Clang emit any reference to the variable in the final assembly. The only reason GCC doesn't warn about this variable being unused is the sizeof function. Reported-by: Nick Desaulniers Signed-off-by: Nathan Chancellor Signed-off-by: Greg Kroah-Hartman commit 961d1935b5d77a30ab9e3ffa4d221a217beba722 Author: Nathan Chancellor Date: Wed Oct 3 18:32:51 2018 -0700 staging: rtl8723bs: Remove unnecessary parentheses and dead commented code Clang warns when multiple pairs of parentheses are used for a single conditional statement. drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c:3351:20: warning: equality comparison with extraneous parentheses [-Wparentheses-equality] The commented code is pointless since _HW_STATE_AP_ is handled right below this block. Link: https://github.com/ClangBuiltLinux/linux/issues/168 Signed-off-by: Nathan Chancellor Signed-off-by: Greg Kroah-Hartman commit ecfbc770dfde4e1fc3d0e75848a71d9efde377a6 Author: Nishad Kamdar Date: Thu Oct 4 22:07:26 2018 +0530 staging: mt7621-mmc: Remove #if 0 blocks in dbg.h This patch removes #if 0 code blocks and usages of functions defined in the #if 0 blocks in dbg.h. Signed-off-by: Nishad Kamdar Signed-off-by: Greg Kroah-Hartman commit c668906916ceb48869a9ba13ffc13b10248591c2 Author: Nishad Kamdar Date: Thu Oct 4 22:06:36 2018 +0530 staging: mt7621-mmc: Remove #if 0 blocks in dbg.c This patch removes #if 0 code blocks and usages of functions defined in the #if 0 blocks in dbg.c Signed-off-by: Nishad Kamdar Signed-off-by: Greg Kroah-Hartman commit 2a54e3259e2aedcebf7932db47b141844353eb10 Author: Nishad Kamdar Date: Thu Oct 4 22:05:38 2018 +0530 staging: mt7621-mmc: Remove #if 0 blocks in sd.c This patch removes #if 0 code blocks and usages of functions defined in the #if 0 blocks in sd.c. Signed-off-by: Nishad Kamdar Signed-off-by: Greg Kroah-Hartman commit b99e0ce20fc0aec6169ecc8a7067dcdf8f20c1ec Author: Nathan Chancellor Date: Wed Oct 3 18:21:25 2018 -0700 staging: rtlwifi: Remove unnecessary parentheses Clang warns when multiple pairs of parentheses are used for a single conditional statement. drivers/staging/rtlwifi/phydm/phydm_adc_sampling.c:558:33: warning: equality comparison with extraneous parentheses [-Wparentheses-equality] } else if ((is_enable_la_mode == 1)) { ~~~~~~~~~~~~~~~~~~^~~~ drivers/staging/rtlwifi/phydm/phydm_adc_sampling.c:558:33: note: remove extraneous parentheses around the comparison to silence this warning } else if ((is_enable_la_mode == 1)) { ~ ^ ~ drivers/staging/rtlwifi/phydm/phydm_adc_sampling.c:558:33: note: use '=' to turn this equality comparison into an assignment } else if ((is_enable_la_mode == 1)) { ^~ = 1 warning generated. Link: https://github.com/ClangBuiltLinux/linux/issues/172 Signed-off-by: Nathan Chancellor Signed-off-by: Greg Kroah-Hartman commit a30e94b1e1283fb35bdbc41aebc2bec640bc0dce Author: YueHaibing Date: Fri Oct 5 11:23:54 2018 +0000 staging: axis-fifo: remove duplicated include from axis-fifo.c Remove duplicated include. Signed-off-by: YueHaibing Signed-off-by: Greg Kroah-Hartman commit b9fd04262a8abc366f40a9e97598e94591352c26 Author: Christoph Hellwig Date: Mon Sep 24 13:10:34 2018 +0200 dma-direct: respect DMA_ATTR_NO_WARN Respect the DMA_ATTR_NO_WARN flags for allocations in dma-direct. Signed-off-by: Christoph Hellwig Acked-by: Robin Murphy commit 7ed1d91a9ed61afe438ba51cbf49cb567ab7dca8 Author: Christoph Hellwig Date: Mon Sep 24 13:06:58 2018 +0200 dma-mapping: translate __GFP_NOFAIL to DMA_ATTR_NO_WARN This allows all dma_map_ops instances to entirely rely on DMA_ATTR_NO_WARN going forward. Signed-off-by: Christoph Hellwig Acked-by: Robin Murphy commit 106eb4d5f5be0fe4efbff0cadcbb4655c1cf44d5 Author: Mamta Shukla Date: Sun Oct 7 03:58:19 2018 +0530 staging: media: davinci_vpfe: Use __func__ instead of function name Access current function name using __func__. Use %s and __func__ instead of function name. Use of predefined identifier __func__ prevents typo error in function name in print calls. Issue found with checkpatch.pl Signed-off-by: Mamta Shukla Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman commit 0cbe40eb2ba3cdd94eaaf6cf8227dd740d7719ef Author: Mamta Shukla Date: Sat Oct 6 17:01:35 2018 +0530 staging: vt6655: Remove space after cast Remove space after cast to fix checkpatch issue. CHECK: No space is necessary after a cast Signed-off-by: Mamta Shukla Reviewed-by: Himanshu Jha Signed-off-by: Greg Kroah-Hartman commit fd0ce395e681f94a440a48a243056f6e5abfa2bf Author: Mamta Shukla Date: Sat Oct 6 17:00:00 2018 +0530 staging: vt6655: Add spaces around operators Add spaces around '*' and '-' to fix checkpatch issue. Signed-off-by: Mamta Shukla Reviewed-by: Himanshu Jha Signed-off-by: Greg Kroah-Hartman commit 52277450902d4ec5c88637904f2b378a8d501362 Author: Mamta Shukla Date: Sat Oct 6 16:56:36 2018 +0530 staging: vt6655: Add blank line after function/struct/union/enum declarations Add blank line after function/struct/union/enum declarations to fix checkpatch issue. CHECK: Please use a blank line after function/struct/union/enum declarations Signed-off-by: Mamta Shukla Reviewed-by: Himanshu Jha Signed-off-by: Greg Kroah-Hartman commit 984e165b8a4b7170d945bd1d7f26df895411adda Author: Mamta Shukla Date: Fri Oct 5 13:02:06 2018 +0530 staging: mt7621-pci: Prefer using the BIT macro Replace all occurrences of (1< Signed-off-by: Greg Kroah-Hartman commit 5cfa4f700771b4252dd08935b8d0e69a4325d22b Author: Mamta Shukla Date: Fri Oct 5 12:58:08 2018 +0530 staging: mt7621-pci: Add spaces around '<<' Add spaces around '<<' to fix checkpatch issue. CHECK: spaces preferred around that '<<' (ctx:VxV) Signed-off-by: Mamta Shukla Signed-off-by: Greg Kroah-Hartman commit 0c5ca367ad4160864de3accc4d1ca8f1a47b2f0e Author: Mamta Shukla Date: Fri Oct 5 12:53:34 2018 +0530 staging: mt7621-pci: Add spaces around '|' Add spaces around '|' to fix checkpatch issue CHECK: spaces preferred around that '|' (ctx:VxV) Signed-off-by: Mamta Shukla Signed-off-by: Greg Kroah-Hartman commit 8f36481fbb00f70546a63018543519130187fa4e Author: Mamta Shukla Date: Fri Oct 5 12:51:41 2018 +0530 staging: mt7621-pci: Add spaces around '&' Add spaces around '&' to fix checkpatch issue. CHECK: spaces preferred around that '&' (ctx:VxV) Signed-off-by: Mamta Shukla Signed-off-by: Greg Kroah-Hartman commit 101c82f23957d5772553787fdffa292aa3195bbd Author: Mamta Shukla Date: Fri Oct 5 12:49:38 2018 +0530 staging: mt7621-pci: Do not initialise statics to 0 Remove initialisation for static global variable to fix checkpatch issue. ERROR: do not initialise statics to 0 Signed-off-by: Mamta Shukla Signed-off-by: Greg Kroah-Hartman commit cef70f6b041d03b9e2d3cd97bdf659ab4cc99a00 Author: Mamta Shukla Date: Tue Oct 9 00:30:10 2018 +0530 staging: rtl8723bs: core: Remove true and false comparison Remove comparison to true and false in if statement. Issue found with checkpatch.pl. CHECK: Using comparison to true is error prone CHECK: Using comparison to false is error prone Signed-off-by: Mamta Shukla ACKed-by: Larry Finger Signed-off-by: Greg Kroah-Hartman commit 8bf42b28d55bc0cfc0cff4bc2ca3f181a86134fd Author: Mamta Shukla Date: Fri Oct 5 19:28:20 2018 +0530 staging: sm750fb: Remove space after cast Remove space after cast to fix checkpatch issue. CHECK: No space is necessary after a cast Signed-off-by: Mamta Shukla Signed-off-by: Greg Kroah-Hartman commit d5213236151ba6968b04f4da0e03f66c56a18587 Author: Ioannis Valasakis Date: Thu Oct 4 13:41:01 2018 +0100 staging: clocking-wizard: match parenthesis indentation Match parenthesis indentation after line end, and fixed alignment to conform to the coding style guidelines. Reported by checkpatch. Signed-off-by: Ioannis Valasakis Signed-off-by: Greg Kroah-Hartman commit 34ff787136b2e83e79bc7d9481395439028de82d Author: Ioannis Valasakis Date: Thu Oct 4 11:13:21 2018 +0100 staging: axis-fifo: Remove parentheses in axis-fifo.c staging: axis-fifo: remove parentheses in axis-fifo.c Remove parentheses from the end of line and conform to the coding style guidelines. Reported by checkpatch. Add an extra space to the function arguments to fix indentation. Signed-off-by: Ioannis Valasakis Signed-off-by: Greg Kroah-Hartman commit 3a025de64bf89c84a79909069e3c24ad9e710d27 Author: Yi Sun Date: Mon Oct 8 16:29:34 2018 +0800 x86/hyperv: Enable PV qspinlock for Hyper-V Implement the required wait and kick callbacks to support PV spinlocks in Hyper-V guests. [ tglx: Document the requirement for disabling interrupts in the wait() callback. Remove goto and unnecessary includes. Add prototype for hv_vcpu_is_preempted(). Adapted to pending paravirt changes. ] Signed-off-by: Yi Sun Signed-off-by: Thomas Gleixner Reviewed-by: Juergen Gross Cc: "K. Y. Srinivasan" Cc: Haiyang Zhang Cc: Stephen Hemminger Cc: Michael Kelley (EOSG) Cc: chao.p.peng@intel.com Cc: chao.gao@intel.com Cc: isaku.yamahata@intel.com Cc: tianyu.lan@microsoft.com Link: https://lkml.kernel.org/r/1538987374-51217-3-git-send-email-yi.y.sun@linux.intel.com commit f726c4620df39055f060537a8ed183c18a2c504b Author: Yi Sun Date: Thu Sep 27 14:01:43 2018 +0800 x86/hyperv: Add GUEST_IDLE_MSR support Hyper-V may expose a HV_X64_MSR_GUEST_IDLE MSR via HYPERV_CPUID_FEATURES. Reading this MSR triggers the host to transition the guest vCPU into an idle state. This state can be exited via an IPI even if the read in the guest happened from an interrupt disabled section. Signed-off-by: Yi Sun Signed-off-by: Thomas Gleixner Reviewed-by: Michael Kelley Cc: chao.p.peng@intel.com Cc: chao.gao@intel.com Cc: isaku.yamahata@intel.com Cc: tianyu.lan@microsoft.com Cc: "K. Y. Srinivasan" Cc: Haiyang Zhang Cc: Stephen Hemminger Link: https://lkml.kernel.org/r/1538028104-114050-2-git-send-email-yi.y.sun@linux.intel.com commit 250854eed5d45a73d81e4137dfd85180af6f2ec3 Author: Hans Verkuil Date: Mon Oct 8 15:08:27 2018 -0400 media: v4l2-tpg: fix kernel oops when enabling HFLIP and OSD When the OSD is on (i.e. vivid displays text on top of the test pattern), and you enable hflip, then the driver crashes. The cause turned out to be a division of a negative number by an unsigned value. You expect that -8 / 2U would be -4, but in reality it is 2147483644 :-( Fixes: 3e14e7a82c1ef ("vivid-tpg: add hor/vert downsampling support to tpg_gen_text") Signed-off-by: Hans Verkuil Reported-by: Mauro Carvalho Chehab Cc: # for v4.1 and up Signed-off-by: Mauro Carvalho Chehab commit 2db3e15243dce41318f5de4595bbb80c390a2d04 Author: Bård Eirik Winther Date: Mon Oct 8 08:29:07 2018 -0400 media: vivid: Add 16-bit bayer to format list New 16-bit bayer options are available in tpg so enable them in vivid. Signed-off-by: Bård Eirik Winther Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 9b48daa7bb8f8ae52fc7f50b80a55a33edb2275e Author: Bård Eirik Winther Date: Mon Oct 8 08:29:06 2018 -0400 media: v4l2-tpg-core: Add 16-bit bayer Add 16-bit bayer formats to the test pattern generator, namely V4L2_PIX_FMT_SRGGB16 V4L2_PIX_FMT_SGRBG16 V4L2_PIX_FMT_SGBRG16 V4L2_PIX_FMT_SBGGR16 Signed-off-by: Bård Eirik Winther Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 8f845c63313f017737a22a60706af70aca20471a Author: Dafna Hirschfeld Date: Mon Oct 8 08:06:47 2018 -0400 media: pvrusb2: replace `printk` with `pr_*` Replace calls to `printk` with the appropriate `pr_*` macro. Signed-off-by: Dafna Hirschfeld Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit ce32c0a530bd955206fe45c2eff77e581202d699 Author: Vikash Garodia Date: Mon Oct 8 07:09:04 2018 -0400 media: venus: vdec: fix decoded data size Existing code returns the max of the decoded size and buffer size. It turns out that buffer size is always greater due to hardware alignment requirement. As a result, payload size given to client is incorrect. This change ensures that the bytesused is assigned to actual payload size, when available. Signed-off-by: Vikash Garodia Acked-by: Stanimir Varbanov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 6ddc5c3ddf256a7a0906732681a337f0452ac67a Author: Steve Whitehouse Date: Mon Oct 8 14:32:35 2018 -0500 gfs2: getlabel support Add support for the GETFSLABEL ioctl in gfs2. I tested this patch and it works as expected. Signed-off-by: Steve Whitehouse Tested-by: Abhi Das Signed-off-by: Bob Peterson commit 32ae592036d7aeaabcccb2b1715373a68639a768 Author: Colin Ian King Date: Sat Oct 6 14:01:42 2018 -0400 media: cx231xx: fix potential sign-extension overflow on large shift Shifting the u8 value[3] by an int can lead to sign-extension overflow. For example, if value[3] is 0xff and the shift is 24 then it is promoted to int and then the top bit is sign-extended so that all upper 32 bits are set. Fix this by casting value[3] to a u32 before the shift. Detected by CoverityScan, CID#1016522 ("Unintended sign extension") Fixes: e0d3bafd0258 ("V4L/DVB (10954): Add cx231xx USB driver") Signed-off-by: Colin Ian King Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 1eb8d7387908022951792a46fa040ad3942b3b08 Author: Tim Smith Date: Mon Oct 8 12:15:40 2018 -0500 GFS2: Flush the GFS2 delete workqueue before stopping the kernel threads Flushing the workqueue can cause operations to happen which might call gfs2_log_reserve(), or get stuck waiting for locks taken by such operations. gfs2_log_reserve() can io_schedule(). If this happens, it will never wake because the only thing which can wake it is gfs2_logd() which was already stopped. This causes umount of a gfs2 filesystem to wedge permanently if, for example, the umount immediately follows a large delete operation. When this occured, the following stack trace was obtained from the umount command [] flush_workqueue+0x1c8/0x520 [] gfs2_make_fs_ro+0x69/0x160 [gfs2] [] gfs2_put_super+0xa9/0x1c0 [gfs2] [] generic_shutdown_super+0x6f/0x100 [] kill_block_super+0x27/0x70 [] gfs2_kill_sb+0x71/0x80 [gfs2] [] deactivate_locked_super+0x3b/0x70 [] deactivate_super+0x59/0x60 [] cleanup_mnt+0x58/0x80 [] __cleanup_mnt+0x12/0x20 [] task_work_run+0x7d/0xa0 [] exit_to_usermode_loop+0x73/0x98 [] syscall_return_slowpath+0x41/0x50 [] int_ret_from_sys_call+0x25/0x8f [] 0xffffffffffffffff Signed-off-by: Tim Smith Signed-off-by: Mark Syms Signed-off-by: Bob Peterson commit d07d9195c950d1cd16ec32a0819b2b98084c0753 Author: Biju Das Date: Thu Oct 4 11:58:11 2018 -0400 media: dt-bindings: media: rcar_vin: add device tree support for r8a7744 Add compatible strings for r8a7744. No driver change is needed as "renesas,rcar-gen2-vin" will activate the right code.However, it is good practice to document compatible strings for the specific SoC as this allows SoC specific changes to the driver if needed, in addition to document SoC support and therefore allow checkpatch.pl to validate compatible string values. Signed-off-by: Biju Das Reviewed-by: Chris Paterson Acked-by: Niklas Söderlund Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit a26ac6c1bed951b2066cc4b2257facd919e35c0b Author: Wenwen Wang Date: Thu Oct 4 11:44:02 2018 -0400 media: isif: fix a NULL pointer dereference bug In isif_probe(), there is a while loop to get the ISIF base address and linearization table0 and table1 address. In the loop body, the function platform_get_resource() is called to get the resource. If platform_get_resource() returns NULL, the loop is terminated and the execution goes to 'fail_nobase_res'. Suppose the loop is terminated at the first iteration because platform_get_resource() returns NULL and the execution goes to 'fail_nobase_res'. Given that there is another while loop at 'fail_nobase_res' and i equals to 0, one iteration of the second while loop will be executed. However, the second while loop does not check the return value of platform_get_resource(). This can cause a NULL pointer dereference bug if the return value is a NULL pointer. This patch avoids the above issue by adding a check in the second while loop after the call to platform_get_resource(). Signed-off-by: Wenwen Wang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d4dc26ebcd6a9cf2bfdac9921a731790f686a74e Author: Colin Ian King Date: Thu Oct 4 10:20:27 2018 -0400 media: exynos4-is: make const array config_ids static The const array config_ids can be made static, saves populating it on the stack and will make it read-only. Signed-off-by: Colin Ian King Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 9a265b30646f33d0e74c3de7a8d6b011e4e0a39b Author: Colin Ian King Date: Thu Oct 4 10:15:35 2018 -0400 media: cx23885: make const array addr_list static The const array addr_list can be made static, saves populating it on the stack and will make it read-only. Signed-off-by: Colin Ian King Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit e6fe3e5b7d16e8f146a4ae7fe481bc6e97acde1e Author: He Zhe Date: Sun Sep 30 00:45:53 2018 +0800 printk: Give error on attempt to set log buffer length to over 2G The current printk() is ready to handle log buffer size up to 2G. Give an explicit error for users who want to use larger log buffer. Also fix printk formatting to show the 2G as a positive number. Link: http://lkml.kernel.org/r/20181008135916.gg4kkmoki5bgtco5@pathway.suse.cz Cc: rostedt@goodmis.org Cc: linux-kernel@vger.kernel.org Suggested-by: Sergey Senozhatsky Signed-off-by: He Zhe Reviewed-by: Sergey Senozhatsky [pmladek: Fixed to the really safe limit 2GB.] Signed-off-by: Petr Mladek commit db6df013c3fbf3a87e2fbf675bd900b5e1167f00 Author: Colin Ian King Date: Thu Oct 4 10:02:14 2018 -0400 media: ivtv: make const array addr_list static The const array addr_list can be made static, saves populating it on the stack and will make it read-only. Signed-off-by: Colin Ian King Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit c93d541d3d9d3258a803de960bb830dbe8598cc8 Author: Colin Ian King Date: Thu Oct 4 09:59:06 2018 -0400 media: bttv-input: make const array addr_list static The const array addr_list can be made static, saves populating it on the stack and will make it read-only. Signed-off-by: Colin Ian King Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 14f39921c906357391d634864d627c7bf8a18c30 Author: Colin Ian King Date: Thu Sep 27 15:00:52 2018 +0100 HID: elan: fix spelling mistake "registred" -> "registered" Trivial fix to spelling mistake in hid_err error message Signed-off-by: Colin Ian King Signed-off-by: Jiri Kosina commit 3fde0e16d016ecb273f0fa404b5d56b947fc0576 Author: Jolly Shah Date: Mon Oct 8 11:21:46 2018 -0700 drivers: clk: Add ZynqMP clock driver This patch adds CCF compliant clock driver for ZynqMP. Clock driver queries supported clock information from firmware and regiters pll and output clocks with CCF. Signed-off-by: Rajan Vaja Signed-off-by: Tejas Patel Signed-off-by: Shubhrajyoti Datta Signed-off-by: Jolly Shah Acked-by: Olof Johansson Reviewed-by: Stephen Boyd Signed-off-by: Michal Simek commit 26372d0973febfc62f20a4afd38fc51623682459 Author: Rajan Vaja Date: Mon Oct 8 11:21:45 2018 -0700 dt-bindings: clock: Add bindings for ZynqMP clock driver Add documentation to describe Xilinx ZynqMP clock driver bindings. Signed-off-by: Rajan Vaja Signed-off-by: Jolly Shah Reviewed-by: Rob Herring Reviewed-by: Stephen Boyd Signed-off-by: Michal Simek commit 3b0296b8c893adb17b422179b9e779e4c32aa347 Author: Rajan Vaja Date: Mon Oct 8 11:21:44 2018 -0700 firmware: xilinx: Add zynqmp IOCTL API for device control Add ZynqMP firmware IOCTL API to control and configure devices like PLLs, SD, Gem, etc. Signed-off-by: Rajan Vaja Signed-off-by: Jolly Shah Acked-by: Olof Johansson Signed-off-by: Michal Simek commit 8cc7bc8ee21f539ffabf4ff7f30a0c6be9ac5ba9 Author: Rajan Vaja Date: Mon Oct 8 11:21:43 2018 -0700 Documentation: xilinx: Add documentation for eemi APIs Add documentation for embedded energy management interface (EEMI) APIs. It includes information about eemi ops and how to use them. It also includes API information and supported IOCTL IDs which can be used for device and control configuration. Signed-off-by: Rajan Vaja Signed-off-by: Jolly Shah Acked-by: Olof Johansson Signed-off-by: Michal Simek commit 4de1a293a08bdf8ec1530e02163930ac86f80ea2 Author: Lance Roy Date: Tue Oct 2 22:38:57 2018 -0700 futex: Replace spin_is_locked() with lockdep lockdep_assert_held() is better suited for checking locking requirements, since it won't get confused when the lock is held by some other task. This is also a step towards possibly removing spin_is_locked(). Signed-off-by: Lance Roy Signed-off-by: Thomas Gleixner Cc: "Paul E. McKenney" Cc: Peter Zijlstra Cc: Darren Hart Link: https://lkml.kernel.org/r/20181003053902.6910-12-ldr709@gmail.com commit 7a39915b723ae46e78c5189dfb3fc889df976a8d Author: Vignesh R Date: Sat Jun 30 16:03:18 2018 +0530 Input: ti_am335x_tsc: Mark IRQ as wakeup capable On AM335x, ti_am335x_tsc can wake up the system from suspend, mark the IRQ as wakeup capable, so that device irq is not disabled during system suspend. Signed-off-by: Vignesh R Acked-by: Dmitry Torokhov Signed-off-by: Lee Jones commit 9eea8326f4e6862637b94f09deb2ec9f2b50e1bc Author: Vignesh R Date: Sat Jun 30 16:03:17 2018 +0530 iio: adc: ti_am335x_adc: Disable ADC during suspend unconditionally Parent MFD device takes care of enabling ADC interface whenever touchscreen is marked wakeup capable. Therefore, unconditionally disable ADC interface during system suspend to save power in case of system with just ADC and no TSC. Signed-off-by: Vignesh R Acked-by: Jonathan Cameron Signed-off-by: Lee Jones commit c974ac771479327b5424f60d58845e31daddadea Author: Vignesh R Date: Sat Jun 30 16:03:16 2018 +0530 mfd: ti_am335x_tscadc: Keep ADC interface on if child is wakeup capable If a child device like touchscreen is wakeup capable, then keep ADC interface on, so that a touching resistive screen will generate wakeup event to the system. Signed-off-by: Vignesh R Signed-off-by: Lee Jones commit 333e07ec4b3397f16f34b2eabae703a2885f3558 Author: Vignesh R Date: Sat Jun 30 16:03:15 2018 +0530 Input: ti_am335x_tsc: Mark TSC device as wakeup source Instead of TSCADC MFD device, mark TSC as wakeup source and change all wakeup related PM calls to operate on TSC device. Signed-off-by: Vignesh R Acked-by: Dmitry Torokhov Signed-off-by: Lee Jones commit cec945c293fb52ac1a1ac88703422d3bc1d8f10a Author: Vignesh R Date: Sat Jun 30 16:03:14 2018 +0530 mfd: ti_am335x_tscadc: Don't mark TSCADC MFD as wakeup capable Currently tscadc MFD is marked as wakeup capable which incorrect because, its actually touch event by child TSC device that wakes up the system. Therefore, remove device_init_wakeup() call that marks TSCADC device as wakeup capable in favor of moving to mark TSC input device as wakeup capable later. Signed-off-by: Vignesh R Signed-off-by: Lee Jones commit e1c9f2eaa0fbfda0ca0d958e98fe0c458ecfa96d Author: Krzysztof Kozlowski Date: Thu Sep 27 18:55:41 2018 +0200 backlight: Remove ld9040 driver The driver for LD9040 AMOLED LCD panel was superseded with DRM driver panel-samsung-ld9040.c. It does not support DeviceTree and respective possible user (Exynos4210 Universal C210) is DeviceTree-only and uses DRM version of driver. Suggested-by: Marek Szyprowski Signed-off-by: Krzysztof Kozlowski Acked-by: Jingoo Han Acked-by: Daniel Thompson Signed-off-by: Lee Jones commit 64c03ab0d509d8edf6f331105b19c400b72f0832 Author: Krzysztof Kozlowski Date: Thu Sep 27 18:55:40 2018 +0200 backlight: Remove s6e63m0 driver The driver for S6E63M0 AMOLED LCD panel is not used. It does not support DeviceTree and respective possible users (S5Pv210 Aquila and Goni boards) are DeviceTree-only. Suggested-by: Marek Szyprowski Signed-off-by: Krzysztof Kozlowski Acked-by: Jingoo Han Acked-by: Daniel Thompson Signed-off-by: Lee Jones commit 7cea645ae9c5a54aa7904fddb2cdf250acd63a6c Author: Nathan Chancellor Date: Fri Sep 21 13:21:31 2018 -0700 backlight: lm3639: Unconditionally call led_classdev_unregister Clang warns that the address of a pointer will always evaluated as true in a boolean context. drivers/video/backlight/lm3639_bl.c:403:14: warning: address of 'pchip->cdev_torch' will always evaluate to 'true' [-Wpointer-bool-conversion] if (&pchip->cdev_torch) ~~ ~~~~~~~^~~~~~~~~~ drivers/video/backlight/lm3639_bl.c:405:14: warning: address of 'pchip->cdev_flash' will always evaluate to 'true' [-Wpointer-bool-conversion] if (&pchip->cdev_flash) ~~ ~~~~~~~^~~~~~~~~~ 2 warnings generated. These statements have been present since 2012, introduced by commit 0f59858d5119 ("backlight: add new lm3639 backlight driver"). Given that they have been called unconditionally since then presumably without any issues, removing the always true if statements to fix the warnings without any real world changes. Link: https://github.com/ClangBuiltLinux/linux/issues/119 Signed-off-by: Nathan Chancellor Reviewed-by: Daniel Thompson Signed-off-by: Lee Jones commit e6bcca0890b96a3c2c5e72169de72ba4d2b01b78 Author: Enric Balletbo i Serra Date: Tue Aug 14 18:50:59 2018 +0200 backlight: pwm_bl: Switch to using "atomic" PWM API The "atomic" API allows us to configure PWM period and duty_cycle and enable it in one call. The patch also moves the pwm_init_state just before any use of the pwm_state struct, this fixes a potential bug where pwm_get_state can be called before pwm_init_state. Signed-off-by: Enric Balletbo i Serra Reviewed-by: Daniel Thompson Tested-by: Heiko Stuebner Signed-off-by: Lee Jones commit cf089611f4c446285046fcd426d90c18f37d2905 Author: Borislav Petkov Date: Mon Oct 8 10:05:20 2018 +0200 proc/vmcore: Fix i386 build error of missing copy_oldmem_page_encrypted() Lianbo reported a build error with a particular 32-bit config, see Link below for details. Provide a weak copy_oldmem_page_encrypted() function which architectures can override, in the same manner other functionality in that file is supplied. Reported-by: Lianbo Jiang Signed-off-by: Borislav Petkov CC: x86@kernel.org Link: http://lkml.kernel.org/r/710b9d95-2f70-eadf-c4a1-c3dc80ee4ebb@redhat.com commit 0534bde7de19a2e66c2b2bf05fcfd00a7cc849fa Author: Ingo Franzki Date: Thu Aug 23 16:28:16 2018 +0200 s390/pkey: Define protected key blob format Define a new protected key blob format. Protected key blobs use a type of 0x00, to be distinguished from other CCA key blobs. CCA defines type 0x00 as NULL key blob, but pkey will never use NULL keys anyway, so it is save to reuse this type. Using another so far undefined type value would introduce the risk that sometimes in the future CCA defines this so far unassigned type for a future key blob. Also add defines for the key token types and versions, and use them instead of hard coded hex values. Signed-off-by: Ingo Franzki Reviewed-by: Harald Freudenberger Reviewed-by: Hendrik Brueckner Signed-off-by: Martin Schwidefsky commit a45a5c7d36a53646094c2ba4970777a20ec0ec42 Author: Ingo Franzki Date: Thu Aug 23 10:06:26 2018 +0200 s390/pkey: Introduce new API for random protected key generation This patch introduces a new ioctl API and in-kernel API to generate a random protected key. The protected key is generated in a way that the effective clear key is never exposed in clear. Both APIs are described in detail in the header files arch/s390/include/asm/pkey.h and arch/s390/include/uapi/asm/pkey.h. Signed-off-by: Ingo Franzki Reviewed-by: Harald Freudenberger Reviewed-by: Hendrik Brueckner Signed-off-by: Martin Schwidefsky commit aa55bf5f022271903fe8a71e08be3e217e1b6363 Author: Harald Freudenberger Date: Mon Oct 1 15:29:01 2018 +0200 s390/zcrypt: add ap_adapter_mask sysfs attribute This patch provides a new sysfs attribute file /sys/bus/ap/ap_adapter_mask. This read-only attribute refrects the apm field as it is found in the PQAP(QCI) crypto info. Signed-off-by: Harald Freudenberger Signed-off-by: Martin Schwidefsky commit a17b92e0487f0bfbb1c5d0bdf26c64dddfc31ac4 Author: Harald Freudenberger Date: Thu Oct 4 15:37:49 2018 +0200 s390/zcrypt: provide apfs failure code on type 86 error reply The apfs field (AP final status) is set on transport protocol failures (reply code 0x90) for type 86 replies. For CCA cprbs this value is copied into the xcrb status field which gives userspace a hint for the failure reason. However, for EP11 cprbs there is no such status field in the xcrb struct. So now regardless of the request type, if a reply type 86 with transport protocol failure is seen, the apfs value is printed as part of the debug message. So the user has a chance to see the apfs value without using a special build kernel. Signed-off-by: Harald Freudenberger Signed-off-by: Martin Schwidefsky commit ee410de890cdf8fc94f6235dd9ef323a101511ab Author: Harald Freudenberger Date: Thu Oct 4 15:30:24 2018 +0200 s390/zcrypt: zcrypt device driver cleanup Some cleanup in the s390 zcrypt device driver: - Removed fragments of pcixx crypto card code. This code can't be reached anymore because the hardware detection function does not recognize crypto cards < CEX2 since commit f56545430736 ("s390/zcrypt: Introduce QACT support for AP bus devices.") - Rename of some files and driver names which where still reflecting pcixx support to cex2a/cex2c. - Removed all the zcrypt version strings in the file headers. There is only one place left - the zcrypt.h header file is now the only place for zcrypt device driver version info. - Zcrypt version pump up from 2.2.0 to 2.2.1. Signed-off-by: Harald Freudenberger Signed-off-by: Martin Schwidefsky commit 78333d1f908a25c9565d7518966cef717279fe32 Author: Vasily Gorbik Date: Wed Sep 26 13:46:26 2018 +0200 s390/kasan: add support for mem= kernel parameter Handle mem= kernel parameter in kasan to limit physical memory. Reviewed-by: Martin Schwidefsky Signed-off-by: Vasily Gorbik Signed-off-by: Martin Schwidefsky commit 12e55fa1944d2f2f15c580a94eda80cb7623f89d Author: Vasily Gorbik Date: Thu Sep 13 16:09:52 2018 +0200 s390/kasan: optimize kasan vmemmap allocation Kasan implementation now supports memory hotplug operations. For that reason regions of initially standby memory are now skipped from shadow mapping and are mapped/unmapped dynamically upon bringing memory online/offline. Signed-off-by: Vasily Gorbik Signed-off-by: Martin Schwidefsky commit 296352397db68313a189e65a3513960a2c844632 Author: Vasily Gorbik Date: Thu Sep 13 10:59:25 2018 +0200 s390/kasan: avoid kasan crash with standby memory defined Kasan early memory allocator simply chops off memory blocks from the end of the physical memory. Reuse mem_detect info to identify actual online memory end rather than using max_physmem_end. This allows to run the kernel with kasan enabled and standby memory defined. Signed-off-by: Vasily Gorbik Signed-off-by: Martin Schwidefsky commit 19733fe8721b8d91b799c91082ebb9c139ca6710 Author: Vasily Gorbik Date: Fri Jan 12 12:46:00 2018 +0100 s390/head: avoid doubling early boot stack size under KASAN Early boot stack uses predefined 4 pages of memory 0x8000-0xC000. This stack is used to run not instumented decompressor/facilities verification C code. It doesn't make sense to double its size when the kernel is built with KASAN support. BOOT_STACK_ORDER is introduced to avoid that. Signed-off-by: Vasily Gorbik Signed-off-by: Martin Schwidefsky commit 6cad0eb561357dfde382b8d8c03c6ee30c0bff48 Author: Vasily Gorbik Date: Fri Nov 17 17:55:07 2017 +0100 s390/mm: improve debugfs ptdump markers walking This allows to print multiple markers when they happened to have the same value. ... 0x001bfffff0100000-0x001c000000000000 255M PMD I ---[ Kasan Shadow End ]--- ---[ vmemmap Area ]--- 0x001c000000000000-0x001c000002000000 32M PMD RW X ... Reviewed-by: Martin Schwidefsky Signed-off-by: Vasily Gorbik Signed-off-by: Martin Schwidefsky commit e006222b57508d58b55d36c6ae6663f5729dad2b Author: Vasily Gorbik Date: Fri Nov 17 17:59:53 2017 +0100 s390/mm: optimize debugfs ptdump kasan zero page walking Kasan zero p4d/pud/pmd/pte are always filled in with corresponding kasan zero entries. Walking kasan zero page backed area is time consuming and unnecessary. When kasan zero p4d/pud/pmd is encountered, it eventually points to the kasan zero page always with the same attributes and nothing but it, therefore zero p4d/pud/pmd could be jumped over. Also adds a space between address range and pages number to separate them from each other when pages number is huge. 0x0018000000000000-0x0018000010000000 256M PMD RW X 0x0018000010000000-0x001bfffff0000000 1073741312M PTE RO X 0x001bfffff0000000-0x001bfffff0001000 4K PTE RW X Reviewed-by: Martin Schwidefsky Signed-off-by: Vasily Gorbik Signed-off-by: Martin Schwidefsky commit 5dff03813f46f267bc1ecb334901e916346692ff Author: Vasily Gorbik Date: Sun Nov 19 11:54:14 2017 +0100 s390/kasan: add option for 4-level paging support By default 3-level paging is used when the kernel is compiled with kasan support. Add 4-level paging option to support systems with more then 3TB of physical memory and to cover 4-level paging specific code with kasan as well. Reviewed-by: Martin Schwidefsky Signed-off-by: Vasily Gorbik Signed-off-by: Martin Schwidefsky commit 135ff163939294f5573927ca890699ed619c0031 Author: Vasily Gorbik Date: Mon Nov 20 12:56:10 2017 +0100 s390/kasan: free early identity mapping structures Kasan initialization code is changed to populate persistent shadow first, save allocator position into pgalloc_freeable and proceed with early identity mapping creation. This way early identity mapping paging structures could be freed at once after switching to swapper_pg_dir when early identity mapping is not needed anymore. Reviewed-by: Martin Schwidefsky Signed-off-by: Vasily Gorbik Signed-off-by: Martin Schwidefsky commit 5e785963298b7923e28817d20868882fbefc863c Author: Vasily Gorbik Date: Sun Nov 19 11:39:39 2017 +0100 s390/kasan: enable stack and global variables access checks By defining KASAN_SHADOW_OFFSET in Kconfig stack and global variables memory access check instrumentation is enabled. gcc version 4.9.2 or newer is also required. Reviewed-by: Martin Schwidefsky Signed-off-by: Vasily Gorbik Signed-off-by: Martin Schwidefsky commit f4f0d32bfb273537fcea9febc7081dac0252dcc0 Author: Vasily Gorbik Date: Mon Nov 20 12:17:19 2017 +0100 s390/dumpstack: disable __dump_trace kasan instrumentation Walking async_stack produces false positives. Disable __dump_trace function instrumentation for now. Signed-off-by: Vasily Gorbik Signed-off-by: Martin Schwidefsky commit ac1256f82619724357242eb514f162c40d5b64d8 Author: Vasily Gorbik Date: Mon Nov 20 12:15:10 2017 +0100 s390/kasan: reipl and kexec support Some functions from both arch/s390/kernel/ipl.c and arch/s390/kernel/machine_kexec.c are called without DAT enabled (or with and without DAT enabled code paths). There is no easy way to partially disable kasan for those files without a substantial rework. Disable kasan for both files for now. To avoid disabling kasan for arch/s390/kernel/diag.c DAT flag is enabled in diag308 call. pcpu_delegate which disables DAT is marked with __no_sanitize_address to disable instrumentation for that one function. Signed-off-by: Vasily Gorbik Signed-off-by: Martin Schwidefsky commit 9e8df6daed9e59153624e52aa4832ddaf39f1ae8 Author: Vasily Gorbik Date: Mon Nov 20 12:13:52 2017 +0100 s390/smp: kasan stack instrumentation support smp_start_secondary function is called without DAT enabled. To avoid disabling kasan instrumentation for entire arch/s390/kernel/smp.c smp_start_secondary has been split in 2 parts. smp_start_secondary has instrumentation disabled, it does minimal setup and enables DAT. Then instrumentated __smp_start_secondary is called to do the rest. __load_psw_mask function instrumentation has been disabled as well to be able to call it from smp_start_secondary. Reviewed-by: Martin Schwidefsky Signed-off-by: Vasily Gorbik Signed-off-by: Martin Schwidefsky commit dde709d1361ab50d3b9f2824f72b4374f5582e84 Author: Vasily Gorbik Date: Mon Nov 20 11:16:14 2017 +0100 compiler: introduce __no_sanitize_address_or_inline Due to conflict between kasan instrumentation and inlining https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67368 functions which are defined as inline could not be called from functions defined with __no_sanitize_address. Introduce __no_sanitize_address_or_inline which would expand to __no_sanitize_address when the kernel is built with kasan support and to inline otherwise. This helps to avoid disabling kasan instrumentation for entire files. Reviewed-by: Martin Schwidefsky Signed-off-by: Vasily Gorbik Signed-off-by: Martin Schwidefsky commit d58106c3ec9abcf2f9882171d6230eccfd6dc52e Author: Vasily Gorbik Date: Fri Nov 17 18:44:28 2017 +0100 s390/kasan: use noexec and large pages To lower memory footprint and speed up kasan initialisation detect EDAT availability and use large pages if possible. As we know how much memory is needed for initialisation, another simplistic large page allocator is introduced to avoid memory fragmentation. Since facilities list is retrieved anyhow, detect noexec support and adjust pages attributes. Handle noexec kernel option to avoid inconsistent kasan shadow memory pages flags. Signed-off-by: Vasily Gorbik Signed-off-by: Martin Schwidefsky commit 793213a82de4ccc96f394ea5deaaf57c0bb01f0b Author: Vasily Gorbik Date: Fri Nov 17 18:22:24 2017 +0100 s390/kasan: dynamic shadow mem allocation for modules Move from modules area entire shadow memory preallocation to dynamic allocation per module load. This behaivior has been introduced for x86 with bebf56a1b: "This patch also forces module_alloc() to return 8*PAGE_SIZE aligned address making shadow memory handling ( kasan_module_alloc()/kasan_module_free() ) more simple. Such alignment guarantees that each shadow page backing modules address space correspond to only one module_alloc() allocation" Signed-off-by: Vasily Gorbik Signed-off-by: Martin Schwidefsky commit 0dac8f6bc3699f28d807ad3a5ec575e18da8ba62 Author: Vasily Gorbik Date: Fri Nov 17 17:40:16 2017 +0100 s390/mm: add kasan shadow to the debugfs pgtable dump This change adds address space markers for kasan shadow memory. Reviewed-by: Martin Schwidefsky Signed-off-by: Vasily Gorbik Signed-off-by: Martin Schwidefsky commit b6cbe3e8bdff6f21f1b58b08a55f479cdcf98282 Author: Vasily Gorbik Date: Fri Nov 17 17:20:28 2017 +0100 s390/kasan: avoid user access code instrumentation Kasan instrumentation adds "store" check for variables marked as modified by inline assembly. With user pointers containing addresses from another address space this produces false positives. static inline unsigned long clear_user_xc(void __user *to, ...) { asm volatile( ... : "+a" (to) ... User space access functions are wrapped by manually instrumented functions in kasan common code, which should be sufficient to catch errors. So, we just disable uaccess.o instrumentation altogether. Reviewed-by: Martin Schwidefsky Signed-off-by: Vasily Gorbik Signed-off-by: Martin Schwidefsky commit 7fef92ccadd744492526d7749eebfe24dd8dcc48 Author: Vasily Gorbik Date: Fri Nov 17 16:52:22 2017 +0100 s390/kasan: double the stack size Kasan stack instrumentation pads stack variables with redzones, which increases stack frames size significantly. Stack sizes are increased from 16k to 32k in the code, as well as for the kernel stack overflow detection option (CHECK_STACK). Reviewed-by: Martin Schwidefsky Signed-off-by: Vasily Gorbik Signed-off-by: Martin Schwidefsky commit 42db5ed86090d8e57ca08bfd162a10be6320cc49 Author: Vasily Gorbik Date: Fri Nov 17 14:29:13 2017 +0100 s390/kasan: add initialization code and enable it Kasan needs 1/8 of kernel virtual address space to be reserved as the shadow area. And eventually it requires the shadow memory offset to be known at compile time (passed to the compiler when full instrumentation is enabled). Any value picked as the shadow area offset for 3-level paging would eat up identity mapping on 4-level paging (with 1PB shadow area size). So, the kernel sticks to 3-level paging when kasan is enabled. 3TB border is picked as the shadow offset. The memory layout is adjusted so, that physical memory border does not exceed KASAN_SHADOW_START and vmemmap does not go below KASAN_SHADOW_END. Due to the fact that on s390 paging is set up very late and to cover more code with kasan instrumentation, temporary identity mapping and final shadow memory are set up early. The shadow memory mapping is later carried over to init_mm.pgd during paging_init. For the needs of paging structures allocation and shadow memory population a primitive allocator is used, which simply chops off memory blocks from the end of the physical memory. Kasan currenty doesn't track vmemmap and vmalloc areas. Current memory layout (for 3-level paging, 2GB physical memory). ---[ Identity Mapping ]--- 0x0000000000000000-0x0000000000100000 ---[ Kernel Image Start ]--- 0x0000000000100000-0x0000000002b00000 ---[ Kernel Image End ]--- 0x0000000002b00000-0x0000000080000000 2G <- physical memory border 0x0000000080000000-0x0000030000000000 3070G PUD I ---[ Kasan Shadow Start ]--- 0x0000030000000000-0x0000030010000000 256M PMD RW X <- shadow for 2G memory 0x0000030010000000-0x0000037ff0000000 523776M PTE RO NX <- kasan zero ro page 0x0000037ff0000000-0x0000038000000000 256M PMD RW X <- shadow for 2G modules ---[ Kasan Shadow End ]--- 0x0000038000000000-0x000003d100000000 324G PUD I ---[ vmemmap Area ]--- 0x000003d100000000-0x000003e080000000 ---[ vmalloc Area ]--- 0x000003e080000000-0x000003ff80000000 ---[ Modules Area ]--- 0x000003ff80000000-0x0000040000000000 2G Acked-by: Martin Schwidefsky Signed-off-by: Vasily Gorbik Signed-off-by: Martin Schwidefsky commit d0e2eb0a36ac0a3b27a968abb66eae17448458fb Author: Vasily Gorbik Date: Thu Sep 13 10:59:43 2018 +0200 s390: add pgd_page primitive Add pgd_page primitive which is required by kasan common code. Also fixes typo in p4d_page definition. Reviewed-by: Martin Schwidefsky Signed-off-by: Vasily Gorbik Signed-off-by: Martin Schwidefsky commit 34377d3cfba71be187422b70f72fd72d3a14d088 Author: Vasily Gorbik Date: Wed Sep 12 13:23:58 2018 +0200 s390: introduce MAX_PTRS_PER_P4D Kasan common code requires MAX_PTRS_PER_P4D definition, which in case of s390 is always PTRS_PER_P4D. Reviewed-by: Martin Schwidefsky Signed-off-by: Vasily Gorbik Signed-off-by: Martin Schwidefsky commit fb594ec13ea89151e7a79933119ccd7b40d5d313 Author: Vasily Gorbik Date: Fri Nov 17 13:17:24 2017 +0100 s390/kasan: replace some memory functions Follow the common kasan approach: "KASan replaces memory functions with manually instrumented variants. Original functions declared as weak symbols so strong definitions in mm/kasan/kasan.c could replace them. Original functions have aliases with '__' prefix in name, so we could call non-instrumented variant if needed." Signed-off-by: Vasily Gorbik Signed-off-by: Martin Schwidefsky commit 0a9b40911baffac6fc9cc2d88e893585870a97f7 Author: Vasily Gorbik Date: Fri Nov 17 13:10:33 2017 +0100 s390/kasan: avoid instrumentation of early C code Instrumented C code cannot run without the kasan shadow area. Exempt source code files from kasan which are running before / used during kasan initialization. Reviewed-by: Martin Schwidefsky Signed-off-by: Vasily Gorbik Signed-off-by: Martin Schwidefsky commit 348498458505e202df41b6b9a78da448d39298b7 Author: Vasily Gorbik Date: Fri Nov 17 13:02:36 2017 +0100 s390/kasan: avoid vdso instrumentation vdso is mapped into user space processes, which won't have kasan shodow mapped. Reviewed-by: Martin Schwidefsky Signed-off-by: Vasily Gorbik Signed-off-by: Martin Schwidefsky commit 75f195420a987490d3ce79db2d06c70fbfce4ac4 Author: Vasily Gorbik Date: Fri Nov 17 11:21:49 2017 +0100 s390/mm: add missing pfn_to_kaddr helper kasan common code uses pfn_to_kaddr, which is defined by many other architectures. Adding it as well to avoid a build error. Reviewed-by: Martin Schwidefsky Signed-off-by: Vasily Gorbik Signed-off-by: Martin Schwidefsky commit 49698745e53c417370ac5cfe8b849bb65d62f129 Author: Vasily Gorbik Date: Tue May 15 13:28:53 2018 +0200 s390: move ipl block and cmd line handling to early boot phase To distinguish zfcpdump case and to be able to parse some of the kernel command line arguments early (e.g. mem=) ipl block retrieval and command line construction code is moved to the early boot phase. "memory_end" is set up correctly respecting "mem=" and hsa_size in case of the zfcpdump. arch/s390/boot/string.c is introduced to provide string handling and command line parsing functions to early boot phase code for the compressed kernel image case. Signed-off-by: Vasily Gorbik Signed-off-by: Martin Schwidefsky commit b09decfd99f8258408decfaa07c5cce6c06fe2cf Author: Vasily Gorbik Date: Fri Apr 13 17:37:28 2018 +0200 s390/sclp: introduce sclp_early_get_hsa_size Introduce sclp_early_get_hsa_size function to be used during early memory detection. This function allows to find a memory limit imposed during zfcpdump. Reviewed-by: Heiko Carstens Reviewed-by: Martin Schwidefsky Signed-off-by: Vasily Gorbik Signed-off-by: Martin Schwidefsky commit f01b8bca088a6fae82fe55cfc95ca9c2096126e8 Author: Vasily Gorbik Date: Mon Sep 24 15:27:30 2018 +0200 s390/mem_detect: add info source debug print Print mem_detect info source when memblock=debug is specified. Reviewed-by: Martin Schwidefsky Signed-off-by: Vasily Gorbik Signed-off-by: Martin Schwidefsky commit 54c57795e848100a2502b7a39b12b784292f4576 Author: Vasily Gorbik Date: Wed Apr 11 19:15:24 2018 +0200 s390/mem_detect: replace tprot loop with binary search In a situation when other memory detection methods are not available (no SCLP and no z/VM diag260), continuous online memory is assumed. Replacing tprot loop with faster binary search, as only online memory end has to be found. Reviewed-by: Heiko Carstens Reviewed-by: Martin Schwidefsky Signed-off-by: Vasily Gorbik Signed-off-by: Martin Schwidefsky commit cd45c995610420755c5fe0d09afee3106c586e26 Author: Vasily Gorbik Date: Wed Apr 11 18:54:40 2018 +0200 s390/mem_detect: use SCLP info for continuous memory detection When neither SCLP storage info, nor z/VM diag260 "storage configuration" are available assume a continuous online memory of size specified by SCLP info. Reviewed-by: Heiko Carstens Reviewed-by: Martin Schwidefsky Signed-off-by: Vasily Gorbik Signed-off-by: Martin Schwidefsky commit 6e98e6432995a3094a88bf6024187c3c235be976 Author: Vasily Gorbik Date: Wed Apr 11 18:48:20 2018 +0200 s390/mem_detect: introduce z/VM specific diag260 call In the case when z/VM memory is defined with "define storage config" command, SCLP storage info is not available. Utilize diag260 "storage configuration" call, to get information about z/VM specific guest memory definitions with potential memory holes. Reviewed-by: Martin Schwidefsky Signed-off-by: Vasily Gorbik Signed-off-by: Martin Schwidefsky commit fddbaa5c423f7ca0a187f88e0b1d98a5c8b4edcf Author: Vasily Gorbik Date: Wed Apr 11 18:42:37 2018 +0200 s390/mem_detect: introduce SCLP storage info SCLP storage info allows to detect continuous and non-continuous online memory under LPAR, z/VM and KVM, when standby memory is defined. Reviewed-by: Heiko Carstens Reviewed-by: Martin Schwidefsky Signed-off-by: Vasily Gorbik Signed-off-by: Martin Schwidefsky commit 251b72a440fa8c550d64d9a9f35e6e1b5b9637df Author: Vasily Gorbik Date: Tue Apr 10 14:24:40 2018 +0200 s390: introduce .boot.data section compile time validation Make sure that .boot.data sections of vmlinux and arch/s390/compressed/vmlinux match before producing the compressed kernel image. Symbols presence, order and sizes are cross-checked. Reviewed-by: Martin Schwidefsky Signed-off-by: Vasily Gorbik Signed-off-by: Martin Schwidefsky commit 6966d604e2ec4ecf5691aea953538f63597a250d Author: Vasily Gorbik Date: Wed Apr 11 11:56:55 2018 +0200 s390/mem_detect: move tprot loop to early boot phase Move memory detection to early boot phase. To store online memory regions "struct mem_detect_info" has been introduced together with for_each_mem_detect_block iterator. mem_detect_info is later converted to memblock. Also introduces sclp_early_get_meminfo function to get maximum physical memory and maximum increment number. Reviewed-by: Heiko Carstens Reviewed-by: Martin Schwidefsky Signed-off-by: Vasily Gorbik Signed-off-by: Martin Schwidefsky commit 17aacfbfa1ae386d3e54d12a13b88b7981e04896 Author: Vasily Gorbik Date: Wed May 23 11:07:13 2018 +0200 s390/sclp: move sclp_early_read_info to sclp_early_core.c To enable early online memory detection sclp_early_read_info has been moved to sclp_early_core.c. sclp_info_sccb has been made a part of .boot.data, which allows to reuse it later during early kernel startup and make sclp_early_read_info call just once. Reviewed-by: Heiko Carstens Reviewed-by: Martin Schwidefsky Signed-off-by: Vasily Gorbik Signed-off-by: Martin Schwidefsky commit d1b52a4388ffdcff47fb53de7fffe052fe766a9f Author: Vasily Gorbik Date: Tue Apr 10 14:14:02 2018 +0200 s390: introduce .boot.data section Introduce .boot.data section which is "shared" between the decompressor code and the decompressed kernel. The decompressor will store values in it, and copy over to the decompressed image before starting it. This method allows to avoid using pre-defined addresses and other hacks to pass values between those boot phases. .boot.data section is a part of init data, and will be freed after kernel initialization is complete. For uncompressed kernel image, .boot.data section is basically the same as .init.data Reviewed-by: Martin Schwidefsky Signed-off-by: Vasily Gorbik Signed-off-by: Martin Schwidefsky commit 7516fc11e44e73f1fcf8a3808dd88f82142e6585 Author: Vasily Gorbik Date: Wed Jul 25 15:01:11 2018 +0200 s390/decompressor: clean up and rename compressed/misc.c Since compressed/misc.c is conditionally compiled move error reporting code to boot/main.c. With that being done compressed/misc.c has no "miscellaneous" functions left and is all about plain decompression now. Rename it accordingly. Reviewed-by: Martin Schwidefsky Signed-off-by: Vasily Gorbik Signed-off-by: Martin Schwidefsky commit 15426ca43d888e79f2dc4012bce0cbd6be96baf1 Author: Vasily Gorbik Date: Wed Apr 11 11:56:55 2018 +0200 s390: rescue initrd as early as possible To avoid multi-stage initrd rescue operation and to simplify assumptions during early memory allocations move initrd at some final safe destination as early as possible. This would also allow us to drop .bss usage restrictions for some files. Reviewed-by: Martin Schwidefsky Signed-off-by: Vasily Gorbik Signed-off-by: Martin Schwidefsky commit 3b076dca14c50f61c89a3dc51b3150656272b0f8 Author: Vasily Gorbik Date: Mon Apr 9 10:40:39 2018 +0200 s390/sclp: simplify early hsa_size detection Architecture documentation suggests that hsa_size has been available in the read info since the list-directed ipl dump has been introduced. By using this value few early sclp calls could be avoided. Reviewed-by: Heiko Carstens Reviewed-by: Martin Schwidefsky Signed-off-by: Vasily Gorbik Signed-off-by: Martin Schwidefsky commit a2ac1bb1f3ddbad8388b0ba4edf28ff501009cea Author: Vasily Gorbik Date: Wed Jul 25 13:27:27 2018 +0200 s390/decompressor: get rid of .bss usage Using .bss in early code should be avoided. It might overlay initrd image or not yet be initialized. Clean up the last couple of places in the decompressor's code where .bss is used and enfore no .bss usage check on boot/compressed/misc.c. In particular: - initializing free_mem_ptr and free_mem_end_ptr with values guarantee that these variables won't end up in the .bss section. - define STATIC_RW_DATA to go into .data section. Reviewed-by: Martin Schwidefsky Signed-off-by: Vasily Gorbik Signed-off-by: Martin Schwidefsky commit 369f91c374514f9491d52fec12f7ee9ef6d44b23 Author: Vasily Gorbik Date: Thu Jul 19 16:51:25 2018 +0200 s390/decompressor: rework uncompressed image info collection The kernel decompressor has to know several bits of information about uncompressed image. Currently this info is collected by running "nm" on uncompressed vmlinux + "sed" and producing sizes.h file. This method worked well, but it has several disadvantages. Obscure symbols name pattern matching is fragile. Adding new values makes pattern even longer. Logic is spread across code and make file. Limited ability to adjust symbols values (currently magic lma value of 0x100000 is always subtracted). Apart from that same pieces of information (and more) would be needed for early memory detection and features like KASLR outside of boot/compressed/ folder where sizes.h is generated. To overcome limitations new "struct vmlinux_info" has been introduced to include values needed for the decompressor and the rest of the boot code. The only static instance of vmlinux_info is produced during vmlinux link step by filling in struct fields by the linker (like it is done with input_data in boot/compressed/vmlinux.scr.lds.S). This way individual values could be adjusted with all the knowledge linker has and arithmetic it supports. Later .vmlinux.info section (which contains struct vmlinux_info) is transplanted into the decompressor image and dropped from uncompressed image altogether. While doing that replace "compressed/vmlinux.scr.lds.S" linker script (whose purpose is to rename .data section in piggy.o to .rodata.compressed) with plain objcopy command. And simplify decompressor's linker script. Reviewed-by: Martin Schwidefsky Signed-off-by: Vasily Gorbik Signed-off-by: Martin Schwidefsky commit 8f75582a2fb6e2c5afc5252b6d6932f61a79c939 Author: Vasily Gorbik Date: Thu Jul 19 13:11:28 2018 +0200 s390: remove decompressor's head.S Decompressor's head.S provided "data mover" sole purpose of which has been to safely move uncompressed kernel at 0x100000 and jump to it. With current bzImage layout entire decompressor's code guaranteed to be in a safe location under 0x100000, and hence could not be overwritten during kernel move. For that reason head.S could be replaced with simple memmove function. To do so introduce early boot code phase which is executed from arch/s390/boot/head.S after "verify_facilities" and takes care of optional kernel image decompression and transition to it. Reviewed-by: Martin Schwidefsky Signed-off-by: Vasily Gorbik Signed-off-by: Martin Schwidefsky commit 32ce55a6592fc3e117e70953001a9ea1931f7941 Author: Vasily Gorbik Date: Tue Sep 18 18:23:40 2018 +0200 s390: unify stack size definitions Remove STACK_ORDER and STACK_SIZE in favour of identical THREAD_SIZE_ORDER and THREAD_SIZE definitions. THREAD_SIZE and THREAD_SIZE_ORDER naming is misleading since it is used as general kernel stack size information. But both those definitions are used in the common code and throughout architectures specific code, so changing the naming is problematic. Reviewed-by: Martin Schwidefsky Signed-off-by: Vasily Gorbik Signed-off-by: Martin Schwidefsky commit ce3dc447493ff4186b192b38d723ab5e8c1eb52f Author: Martin Schwidefsky Date: Tue Sep 12 16:37:33 2017 +0200 s390: add support for virtually mapped kernel stacks With virtually mapped kernel stacks the kernel stack overflow detection is now fault based, every stack has a guard page in the vmalloc space. The panic_stack is renamed to nodat_stack and is used for all function that need to run without DAT, e.g. memcpy_real or do_start_kdump. The main effect is a reduction in the kernel image size as with vmap stacks the old style overflow checking that adds two instructions per function is not needed anymore. Result from bloat-o-meter: add/remove: 20/1 grow/shrink: 13/26854 up/down: 2198/-216240 (-214042) In regard to performance the micro-benchmark for fork has a hit of a few microseconds, allocating 4 pages in vmalloc space is more expensive compare to an order-2 page allocation. But with real workload I could not find a noticeable difference. Acked-by: Heiko Carstens Signed-off-by: Martin Schwidefsky commit ff340d2472ec7618443913928af9fb85a7009270 Author: Martin Schwidefsky Date: Thu Sep 7 17:03:19 2017 +0200 s390: add stack switch helper Reviewed-by: Heiko Carstens Signed-off-by: Martin Schwidefsky commit 53c99bd665a2649341ed6aed358ab56a3eedcd00 Author: Martin Schwidefsky Date: Fri Aug 31 10:42:24 2018 +0200 init: add arch_call_rest_init to allow stack switching With CONFIG_VMAP_STACK=y the kernel stack of all tasks should be allocated in the vmalloc space. The initial stack used for all the early init code is in the init_thread_union. To be able to switch from this early stack to a properly allocated stack from vmalloc the architecture needs a switch-over point. Introduce the arch_call_rest_init() function with a weak definition in init/main.c with the only purpose to call rest_init() from the end of start_kernel(). The architecture override can then do the necessary magic to switch to the new vmalloc'ed stack. Signed-off-by: Martin Schwidefsky commit 00e9e6645adc2c02c9ec5b42fd39d2a7f0880e6a Author: Martin Schwidefsky Date: Fri Sep 7 11:20:08 2018 +0200 s390/pfault: do not use stack buffers for hardware data With CONFIG_VMAP_STACK=y the stack is allocated from the vmalloc space. Data structures passed to a hardware or a hypervisor interface that requires V=R can not be allocated on the stack anymore. Make the init and fini pfault parameter blocks static variables. Signed-off-by: Martin Schwidefsky commit c0f07ff93bffae8c4252e4945ad82bc98f82a60e Author: Martin Schwidefsky Date: Thu Sep 6 10:31:59 2018 +0200 s390/monwriter: do not use stack buffers for hardware data With CONFIG_VMAP_STACK=y the stack is allocated from the vmalloc space. Data structures passed to a hardware or a hypervisor interface that requires V=R can not be allocated on the stack anymore. Use kmalloc to get memory for the appldata_parameter_list and appldata_product_id structures. Reviewed-by: Gerald Schaefer Signed-off-by: Martin Schwidefsky commit 8ef9eda0188c2e904ef257f67cefcc3371a0c98e Author: Martin Schwidefsky Date: Thu Sep 6 10:06:57 2018 +0200 s390/hypfs: do not use stack buffers for hardware data With CONFIG_VMAP_STACK=y the stack is allocated from the vmalloc space. Data structures passed to a hardware or a hypervisor interface that requires V=R can not be allocated on the stack anymore. Use kmalloc to get memory for the hypsfs_diag304 structure. Signed-off-by: Martin Schwidefsky commit d36a9281399700f3b573f61b845367cfc3e12cb1 Author: Martin Schwidefsky Date: Thu Sep 6 10:47:26 2018 +0200 s390/appldata: do not use stack buffers for hardware data With CONFIG_VMAP_STACK=y the stack is allocated from the vmalloc space. Data structures passed to a hardware or a hypervisor interface that requires V=R can not be allocated on the stack anymore. Use kmalloc to get memory for the appldata_product_id and the appldata_parameter_list structures. Reviewed-by: Gerald Schaefer Signed-off-by: Martin Schwidefsky commit f689789a288e297451869c0770b3351c80c85b15 Author: Martin Schwidefsky Date: Thu Sep 6 10:43:27 2018 +0200 s390/appldata: pass parameter list pointer to appldata_asm In preparation for CONFIG_VMAP_STACK=y move the allocation of the struct appldata_parameter_list to the caller of appldata_asm(). Reviewed-by: Gerald Schaefer Signed-off-by: Martin Schwidefsky commit 0e819e3564c0d79e296d3fc851bb4f78fda22ac2 Author: Vinod Koul Date: Sun Oct 7 19:42:56 2018 +0530 dmaengine: fsl-edma: 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 Tested-by: Krzysztof Kozlowski Tested-by: Angelo Dureghello Signed-off-by: Vinod Koul commit 8f35260e0b6cc09d77bcbbc21554342aa79ceb2f Author: Jiri Kosina Date: Tue Oct 9 10:43:39 2018 +0200 HID: google: drop superfluous const before SIMPLE_DEV_PM_OPS() SIMPLE_DEV_PM_OPS() already implies const for the type; drop the extra modifier. Fixes: eb1aac4c8744f75460c34d71b0c73bebf3e8ee5c ("HID: google: add support tablet mode switch for Whiskers") Signed-off-by: Jiri Kosina commit eb1aac4c8744f75460c34d71b0c73bebf3e8ee5c Author: Dmitry Torokhov Date: Fri Oct 5 11:41:14 2018 -0700 HID: google: add support tablet mode switch for Whiskers Whiskers is a foldable base, and thus requires combining "base presence" signal coming from EC with base state signal (folded/unfolded) coming from USB/HID interface to produce proper SW_TABLET_MODE event. Signed-off-by: Nicolas Boichat Signed-off-by: Dmitry Torokhov Reviewed-by: Benjamin Tissoires Signed-off-by: Jiri Kosina commit 78d8f8f1a1800cf6068ffcac7a14cda19ae693d8 Author: Dmitry Torokhov Date: Fri Oct 5 11:41:13 2018 -0700 mfd: cros: add "base attached" MKBP switch definition This adds a "base attached" switch definition to the MKBP protocol that is used by Whiskers driver to properly determine device state (clamshell vs tablet mode). Signed-off-by: Dmitry Torokhov Acked-by: Lee Jones Signed-off-by: Jiri Kosina commit 8ca2b56cd7da98fc8f8d787bb706b9d6c8674a3b Author: Waiman Long Date: Wed Oct 3 13:07:18 2018 -0400 locking/lockdep: Make class->ops a percpu counter and move it under CONFIG_DEBUG_LOCKDEP=y A sizable portion of the CPU cycles spent on the __lock_acquire() is used up by the atomic increment of the class->ops stat counter. By taking it out from the lock_class structure and changing it to a per-cpu per-lock-class counter, we can reduce the amount of cacheline contention on the class structure when multiple CPUs are trying to acquire locks of the same class simultaneously. To limit the increase in memory consumption because of the percpu nature of that counter, it is now put back under the CONFIG_DEBUG_LOCKDEP config option. So the memory consumption increase will only occur if CONFIG_DEBUG_LOCKDEP is defined. The lock_class structure, however, is reduced in size by 16 bytes on 64-bit archs after ops removal and a minor restructuring of the fields. This patch also fixes a bug in the increment code as the counter is of the 'unsigned long' type, but atomic_inc() was used to increment it. Signed-off-by: Waiman Long Acked-by: Peter Zijlstra Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Will Deacon Link: http://lkml.kernel.org/r/d66681f3-8781-9793-1dcf-2436a284550b@redhat.com Signed-off-by: Ingo Molnar commit 18d3f8fc0c2c5a55d40d1bedcf46865ecb87d84e Author: Todd Brandt Date: Mon Oct 8 15:56:32 2018 -0700 PM / tools: sleepgraph and bootgraph: upgrade to v5.2 bootgraph & sleepgraph: - funnel all prints through the pprint function - remove superfluous print calls, arrange them in single blocks - flush stdout on every print, enables log capture on hang sleepgraph: - in -summary, if all tests have the same host+kernel+mode, add to title - update verbose device detail print to include machine suspend/resume - match tKernSus and tKernRes to pm_prepare/restore_console - fully support multiple suspend/resumes in a single timeline - enable various disk modes (disk-suspend, disk-test_resume, etc) - add warnings when -display (xset) fails Signed-off-by: Todd Brandt Signed-off-by: Rafael J. Wysocki commit 5484f0334439701900121a107709c461215cadb6 Author: Todd Brandt Date: Mon Oct 8 15:56:31 2018 -0700 PM / tools: sleepgraph: first batch of v5.2 changes general: - add battery charge data before and after test - remove special s0i3 handling - remove melding of dmesg & ftrace data in old kernels, use one only - updates to various kprobes in trace (ksys_sync, etc) - enable pm_debug_messages during the test - instrument more subsystems with dev functions (phy0) error handling: - return codes for tool show the status of the test run - 0: success, 1: general error (no timeline), 2: fail (suspend aborted) - monitor output of /sys/power/state, mark as failure if exception occurs - add signal handler when using -result to catch tool exceptions display control - add -x commands for testing xset with mode settings and status - allow display setting to on, off, suspend, standby - add display mode change info to the log, along with a warning on fail s2idle (freeze) - remove fixed 10-phase dependency, allow any phase order & any count - multiple phase occurences show as phase_nameN e.g. suspend_noirq3 - if multiple freezes occur, print multiple time values in header summary: - add new columns to summary output: issues, worst suspend/resume devices - worst device: includes summation of all phases of suspend or resume - issues: includes WARNING/ERROR/BUG from dmesg log, and other issues - s2idle: multiple freezes show as FREEZExN in the issues column Signed-off-by: Todd Brandt Signed-off-by: Rafael J. Wysocki commit a7d247f5fb3a8c95e70c726bc3f02d55ef6aaeea Merge: 46b723dd867d 41591b38f5f8 Author: Ulf Hansson Date: Tue Oct 9 09:25:08 2018 +0200 Merge branch 'fixes' into next commit 46b723dd867d599420fb640c0eaf2a866ef721d4 Author: Ludovic Barre Date: Mon Oct 8 14:08:55 2018 +0200 mmc: mmci: add stm32 sdmmc variant This patch adds a stm32 sdmmc variant, rev 1.1. Introduces a new Manufacturer id "0x53, ascii 'S' to define new stm32 sdmmc family with clean range of amba revision/configurations bits (corresponding to sdmmc_ver register with major/minor fields). Add 2 variants properties: -dma_lli, to enable link list support. -stm32_idmabsize_mask, defines the range of SDMMC_IDMABSIZER register which specify the number bytes per buffer. DT properties for sdmmc: -Indicate signal directions (only one property for d0dir, d123dir, cmd_dir) -Select command and data phase relation. -Select "clock in" from an external driver. Signed-off-by: Ludovic Barre Signed-off-by: Ulf Hansson commit 62022894cd42c6bedc19ead51e91cdfb742cb5a6 Author: Ludovic Barre Date: Mon Oct 8 14:08:54 2018 +0200 dt-bindings: mmci: add stm32 sdmmc variant This patch adds properties for stm32 sdmmc variant. Signed-off-by: Ludovic Barre Acked-by: Rob Herring Signed-off-by: Ulf Hansson commit f3f6433468bd206bafd853f0a5b99e259d620e67 Author: Ludovic Barre Date: Mon Oct 8 14:08:53 2018 +0200 mmc: mmci: add stm32 sdmmc registers This patch adds stm32 sdmmc specific registers. Signed-off-by: Ludovic Barre Signed-off-by: Ulf Hansson commit 00e930d87d196ae70e225eee88957441c10ff872 Author: Ludovic Barre Date: Mon Oct 8 14:08:52 2018 +0200 mmc: mmci: add clock divider for stm32 sdmmc The STM32 sdmmc variant has a different clock divider. Signed-off-by: Ludovic Barre Signed-off-by: Ulf Hansson commit 15878e58461bbb4def541b72b835be410e1a9cf4 Author: Ludovic Barre Date: Mon Oct 8 14:08:51 2018 +0200 mmc: mmci: add optional reset property This patch adds a optional reset management. STM32 sdmmc variant needs to reset hardware block during the power cycle procedure (for re-initialization). Signed-off-by: Ludovic Barre Signed-off-by: Ulf Hansson commit c86a9888850e3f423e09610628fdcc84d30f6647 Author: Ludovic Barre Date: Mon Oct 8 14:08:50 2018 +0200 dt-bindings: mmci: add optional reset property This patch adds a optional reset management. Signed-off-by: Ludovic Barre Acked-by: Rob Herring Signed-off-by: Ulf Hansson commit b79220b3e0af5037b2ae90a5d2c32bc1a1e627fb Author: Ludovic Barre Date: Mon Oct 8 14:08:49 2018 +0200 mmc: mmci: add variant property to not read datacnt This patch adds a boolean property to not read datacnt register. Needed to support the STM32 sdmmc variant. MMCIDATACNT register should be read only after the data transfer is completed. When reading after an error event the read data count value may be different from the real number of data bytes transferred. Signed-off-by: Ludovic Barre Signed-off-by: Ulf Hansson commit d2141547f594d396f85010ba0b37d0e9491943b6 Author: Ludovic Barre Date: Mon Oct 8 14:08:48 2018 +0200 mmc: mmci: add variant property to write datactrl before command This patch adds a boolean property to allow to write datactrl before to send command, whatever the command type (read or write). Needed to support the STM32 sdmmc variant. Signed-off-by: Ludovic Barre Signed-off-by: Ulf Hansson commit 59db5e2d7f9d85ac7d62c1a67d18dc1993c935bd Author: Ludovic Barre Date: Mon Oct 8 14:08:47 2018 +0200 mmc: mmci: add variant property to define irq pio mask This patch allows to define specific pio mask for variants. Needed to support the STM32 sdmmc variant which has some bits with different meaning (bits: 21,20,13,12,9) Signed-off-by: Ludovic Barre Signed-off-by: Ulf Hansson commit 9b279941244ce4eaa76d079314e9c174c80fabc3 Author: Ludovic Barre Date: Mon Oct 8 14:08:46 2018 +0200 mmc: mmci: add variant property to define dpsm bit This patch adds datactrl variant property to define dpsm enable bit. Needed to support the STM32 variant (STM32 has no dpsm enable bit). Signed-off-by: Ludovic Barre Signed-off-by: Ulf Hansson commit 0f2448043eab644a939fc206e93032225d3ab6ce Author: Ludovic Barre Date: Mon Oct 8 14:08:45 2018 +0200 mmc: mmci: add variant properties to define cpsm & cmdresp bits This patch adds command variant properties to define cpsm enable bit and responses. Needed to support the STM32 variant (shift of cpsm bit, specific definition of commands response). Signed-off-by: Ludovic Barre Signed-off-by: Ulf Hansson commit daf9713c5ef8c3ffb0bdf7de11b53b2b2756c4f1 Author: Ludovic Barre Date: Mon Oct 8 14:08:44 2018 +0200 mmc: mmci: expand startbiterr to irqmask and error check All variants don't pretend to have a startbiterr. -While data error check, if status register return an error (like MCI_DATACRCFAIL) we must avoid to check MCI_STARTBITERR (if not desired). -expand start_err to MCI_IRQENABLE to avoid to set this bit by default. Signed-off-by: Ludovic Barre Signed-off-by: Ulf Hansson commit c931d495cd3d5f01eba5da958207d37c63edbf10 Author: Ludovic Barre Date: Mon Oct 8 14:08:43 2018 +0200 mmc: mmci: add datactrl block size variant property This patch allows to define a datactrl block size by variant, requested by STM32 sdmmc variant. Signed-off-by: Ludovic Barre Signed-off-by: Ulf Hansson commit cd3ee8c532ad05dac71681e0ecfa91606d0e145e Author: Ludovic Barre Date: Mon Oct 8 14:08:42 2018 +0200 mmc: mmci: add set_clk/pwrreg callbacks This patch adds set_clkreg and set_pwrreg callbacks at mmci_host_ops to allow to call specific variant. extends visibility of mmci_write_clk/pwrreg functions to be used into specific file variant. Signed-off-by: Ludovic Barre Signed-off-by: Ulf Hansson commit e0da1721211b9016be1a1d994d97eb53c3ca29fe Author: Ludovic Barre Date: Mon Oct 8 14:08:41 2018 +0200 mmc: mmci: add validate_data callback This patch adds validate_data callback at mmci_host_ops to check specific constraints of variant. Move mmci_validate_data function to regroup mmci_host_ops interfaces. Signed-off-by: Ludovic Barre Signed-off-by: Ulf Hansson commit cfccc6ac005425c4fcb44a4c48a183652751812b Author: Ludovic Barre Date: Mon Oct 8 14:08:40 2018 +0200 mmc: mmci: add dma_error callback This patch adds dma_error callback at mmci_host_ops to allow to call specific variant. Signed-off-by: Ludovic Barre Signed-off-by: Ulf Hansson commit 5a9f10c359e67403e87c48c73eda297d6e5581bf Author: Ludovic Barre Date: Mon Oct 8 14:08:39 2018 +0200 mmc: mmci: add dma_finalize callback This patch adds dma_finalize callback at mmci_host_ops to allow to call specific variant. Signed-off-by: Ludovic Barre Signed-off-by: Ulf Hansson commit 135ea30e231295b0045072b48203055d6605e18b Author: Ludovic Barre Date: Mon Oct 8 14:08:38 2018 +0200 mmc: mmci: add dma_start callback This patch adds dma_start callback to mmci_host_ops. Create a generic mmci_dma_start function which regroup common action between variant. Signed-off-by: Ludovic Barre Signed-off-by: Ulf Hansson commit 02769968d95b32e1d14e30b54dc57fe525c06d2b Author: Ludovic Barre Date: Mon Oct 8 14:08:37 2018 +0200 mmc: mmci: add get_next_data callback This patch adds get_next_data callback to mmci_host_ops. Generic mmci_get_next_data factorizes next_cookie check and the host ops call. Signed-off-by: Ludovic Barre Signed-off-by: Ulf Hansson commit 4798351018a72deffc98cc70624dd812eff01455 Author: Ludovic Barre Date: Mon Oct 8 14:08:36 2018 +0200 mmc: mmci: add prepare/unprepare_data callbacks This patch adds prepare/unprepare callbacks to mmci_host_ops. Like this mmci_pre/post_request can be generic, mmci_prepare_data and mmci_unprepare_data provide common next_cookie management. Signed-off-by: Ludovic Barre Signed-off-by: Ulf Hansson commit ad7b8918dbb2ded346e7f4372e476ab79eefadca Author: Ludovic Barre Date: Mon Oct 8 14:08:35 2018 +0200 mmc: mmci: merge prepare data functions This patch merges the prepare data functions. This allows to define a single access to prepare data service. This prepares integration for mmci host ops. Signed-off-by: Ludovic Barre Signed-off-by: Ulf Hansson commit a813f2a2bccedb2c07fca66f4a67fc0093d35366 Author: Ludovic Barre Date: Mon Oct 8 14:08:34 2018 +0200 mmc: mmci: introduce dma_priv pointer to mmci_host -Introduces dma_priv pointer to define specific needs for each dma engine. This patch is needed to prepare sdmmc variant with internal dma which not use dmaengine API. -Moves next cookie to mmci host structure to share same cookie management between all variants. Signed-off-by: Ludovic Barre Signed-off-by: Ulf Hansson commit c3647fdc6a5a48699a1248a7f3d9a0429369e939 Author: Ludovic Barre Date: Mon Oct 8 14:08:33 2018 +0200 mmc: mmci: create common mmci_dma_setup/release This patch creates a common mmci_dma_setup/release which calls dma_setup/release callbacks of mmci_host_ops and manages common features like use_dma... If there is a fallbacks to pio mode, dma functions must check use_dma. error management: -mmci_dmae_setup fail if Tx and Rx dma channels are not defined -qcom_dma_setup fail if one of both dma channels is not defined, Qcom has no specific resource to release, just mmci dmae resource. Signed-off-by: Ludovic Barre Signed-off-by: Ulf Hansson commit 91ed7ac444ef749603a95629a5ec483988c4f14b Author: Dan Williams Date: Thu Oct 4 16:32:08 2018 -0700 libnvdimm, pmem: Fix badblocks population for 'raw' namespaces The driver is only initializing bb_res in the devm_memremap_pages() paths, but the raw namespace case is passing an uninitialized bb_res to nvdimm_badblocks_populate(). Fixes: e8d513483300 ("memremap: change devm_memremap_pages interface...") Cc: Cc: Christoph Hellwig Reported-by: Jacek Zloch Reported-by: Krzysztof Rusocki Reviewed-by: Vishal Verma Signed-off-by: Dan Williams commit f0061fed1f8a9f86ddec303a3f94742a71b20cb7 Author: Faiz Abbas Date: Thu Oct 4 16:44:50 2018 +0530 mmc: sdhci-of-arasan: Add Support for AM654 MMC and PHY The current arasan sdhci PHY configuration isn't compatible with the PHY on TI's AM654 devices. Therefore, add a new compatible, AM654 specific quirks and a new AM654 specific set_clock function which configures the PHY in a sane way. Signed-off-by: Faiz Abbas Signed-off-by: Sekhar Nori Signed-off-by: Ulf Hansson commit 06b23ca021c425bb828a66b68704efe5febadb2a Author: Faiz Abbas Date: Thu Oct 4 16:44:49 2018 +0530 mmc: sdhci-of-arasan: Add a single data structure to incorporate pdata and soc_ctl_map Currently, the driver passes platform data as a global structure and uses the .data of of_device_id to pass the soc_ctl_map. To make the implementation more flexible add a single data structure that incorporates both of the above and pass it in the .data of of_device_id. Signed-off-by: Faiz Abbas Signed-off-by: Sekhar Nori Signed-off-by: Ulf Hansson commit 26a4f38d1316ddef05d50e5c205057385187a7e4 Author: Faiz Abbas Date: Thu Oct 4 16:44:48 2018 +0530 dt-bindings: mmc: sdhci-of-arasan: Add new compatible for AM654 MMC PHY Add a new compatible to use the host controller driver with the MMC PHY on TI's AM654 SOCs Signed-off-by: Faiz Abbas Signed-off-by: Sekhar Nori Signed-off-by: Ulf Hansson commit 2a7adf6ce643fdeec051dc88e5250b08c83bbb67 Author: Reinette Chatre Date: Wed Oct 3 15:17:03 2018 -0700 x86/intel_rdt: Fix initial allocation to consider CDP When a new resource group is created it is initialized with a default allocation that considers which portions of cache are currently available for sharing across all resource groups or which portions of cache are currently unused. If a CDP allocation forms part of a resource group that is in exclusive mode then it should be ensured that no new allocation overlaps with any resource that shares the underlying hardware. The current initial allocation does not take this sharing of hardware into account and a new allocation in a resource that shares the same hardware would affect the exclusive resource group. Fix this by considering the allocation of a peer RDT domain - a RDT domain sharing the same hardware - as part of the test to determine which portion of cache is in use and available for use. Fixes: 95f0b77efa57 ("x86/intel_rdt: Initialize new resource group with sane defaults") Signed-off-by: Reinette Chatre Signed-off-by: Thomas Gleixner Acked-by: Fenghua Yu Cc: tony.luck@intel.com Cc: jithu.joseph@intel.com Cc: gavin.hindman@intel.com Cc: dave.hansen@intel.com Cc: hpa@zytor.com Link: https://lkml.kernel.org/r/b1f7ec08b1695be067de416a4128466d49684317.1538603665.git.reinette.chatre@intel.com Signed-off-by: Ingo Molnar commit e5f3530c391105fdd6174852e3ea6136d073b45a Author: Reinette Chatre Date: Wed Oct 3 15:17:02 2018 -0700 x86/intel_rdt: CBM overlap should also check for overlap with CDP peer The CBM overlap test is used to manage the allocations of RDT resources where overlap is possible between resource groups. When a resource group is in exclusive mode then there should be no overlap between resource groups. The current overlap test only considers overlap between the same resources, for example, that usage of a RDT_RESOURCE_L2DATA resource in one resource group does not overlap with usage of a RDT_RESOURCE_L2DATA resource in another resource group. The problem with this is that it allows overlap between a RDT_RESOURCE_L2DATA resource in one resource group with a RDT_RESOURCE_L2CODE resource in another resource group - even if both resource groups are in exclusive mode. This is a problem because even though these appear to be different resources they end up sharing the same underlying hardware and thus does not fulfill the user's request for exclusive use of hardware resources. Fix this by including the CDP peer (if there is one) in every CBM overlap test. This does not impact the overlap between resources within the same exclusive resource group that is allowed. Fixes: 49f7b4efa110 ("x86/intel_rdt: Enable setting of exclusive mode") Reported-by: Jithu Joseph Signed-off-by: Reinette Chatre Signed-off-by: Thomas Gleixner Tested-by: Jithu Joseph Acked-by: Fenghua Yu Cc: tony.luck@intel.com Cc: gavin.hindman@intel.com Cc: dave.hansen@intel.com Cc: hpa@zytor.com Link: https://lkml.kernel.org/r/e538b7f56f7ca15963dce2e00ac3be8edb8a68e1.1538603665.git.reinette.chatre@intel.com Signed-off-by: Ingo Molnar commit 521348b011d64cf3febb10b64ba5b472681bef94 Author: Reinette Chatre Date: Wed Oct 3 15:17:01 2018 -0700 x86/intel_rdt: Introduce utility to obtain CDP peer Introduce a utility that, when provided with a RDT resource and an instance of this RDT resource (a RDT domain), would return pointers to the RDT resource and RDT domain that share the same hardware. This is specific to the CDP resources that share the same hardware. For example, if a pointer to the RDT_RESOURCE_L2DATA resource (struct rdt_resource) and a pointer to an instance of this resource (struct rdt_domain) is provided, then it will return a pointer to the RDT_RESOURCE_L2CODE resource as well as the specific instance that shares the same hardware as the provided rdt_domain. This utility is created in support of the "exclusive" resource group mode where overlap of resource allocation between resource groups need to be avoided. The overlap test need to consider not just the matching resources, but also the resources that share the same hardware. Temporarily mark it as unused in support of patch testing to avoid compile warnings until it is used. Fixes: 49f7b4efa110 ("x86/intel_rdt: Enable setting of exclusive mode") Signed-off-by: Reinette Chatre Signed-off-by: Thomas Gleixner Tested-by: Jithu Joseph Acked-by: Fenghua Yu Cc: tony.luck@intel.com Cc: gavin.hindman@intel.com Cc: dave.hansen@intel.com Cc: hpa@zytor.com Link: https://lkml.kernel.org/r/9b4bc4d59ba2e903b6a3eb17e16ef41a8e7b7c3e.1538603665.git.reinette.chatre@intel.com Signed-off-by: Ingo Molnar commit fc8eaa85681fa72dc6a4e46f01c92e4fba83d0ab Merge: 2cc81c699224 49e00eee0061 Author: Ingo Molnar Date: Tue Oct 9 08:50:10 2018 +0200 Merge branch 'x86/urgent' into x86/cache, to pick up dependent fix Signed-off-by: Ingo Molnar commit 071a234ad744ab9a1e9c948874d5f646a2964734 Merge: 9000a457a0c8 df3f94a0bbeb Author: David S. Miller Date: Mon Oct 8 23:42:44 2018 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next Alexei Starovoitov says: ==================== pull-request: bpf-next 2018-10-08 The following pull-request contains BPF updates for your *net-next* tree. The main changes are: 1) sk_lookup_[tcp|udp] and sk_release helpers from Joe Stringer which allow BPF programs to perform lookups for sockets in a network namespace. This would allow programs to determine early on in processing whether the stack is expecting to receive the packet, and perform some action (eg drop, forward somewhere) based on this information. 2) per-cpu cgroup local storage from Roman Gushchin. Per-cpu cgroup local storage is very similar to simple cgroup storage except all the data is per-cpu. The main goal of per-cpu variant is to implement super fast counters (e.g. packet counters), which don't require neither lookups, neither atomic operations in a fast path. The example of these hybrid counters is in selftests/bpf/netcnt_prog.c 3) allow HW offload of programs with BPF-to-BPF function calls from Quentin Monnet 4) support more than 64-byte key/value in HW offloaded BPF maps from Jakub Kicinski 5) rename of libbpf interfaces from Andrey Ignatov. libbpf is maturing as a library and should follow good practices in library design and implementation to play well with other libraries. This patch set brings consistent naming convention to global symbols. 6) relicense libbpf as LGPL-2.1 OR BSD-2-Clause from Alexei Starovoitov to let Apache2 projects use libbpf 7) various AF_XDP fixes from Björn and Magnus ==================== Signed-off-by: David S. Miller commit bbcda30271752bb7490f2e2aef5411dbcae69116 Author: Brian Norris Date: Mon Oct 8 19:08:05 2018 -0700 remoteproc: qcom: q6v5-mss: add SCM probe dependency The memory ownership transfer request is performed using SCM, ensure that SCM is available before we probe the driver if memory protection is needed by the subsystem. Fixes: 6c5a9dc2481b ("remoteproc: qcom: Make secure world call for mem ownership switch") Cc: stable@vger.kernel.org Signed-off-by: Brian Norris [bjorn: Added condition for need_mem_protection, updated commit message] Signed-off-by: Bjorn Andersson commit 9b7e4d601baac83a7104652042107ce94f245524 Merge: 47fd2060660e ac1788cc7da4 Author: Michael Ellerman Date: Tue Oct 9 16:51:05 2018 +1100 Merge branch 'fixes' into next Merge our fixes branch. It has a few important fixes that are needed for futher testing and also some commits that will conflict with content in next. commit b8d62f33b7b225935649ab165d901fe8dd7f95e5 Author: Geert Uytterhoeven Date: Mon Oct 8 13:17:26 2018 +0200 genirq: Fix grammar s/an /a / Fix a grammar mistake in . [ mingo: While at it also fix another similar error in another comment as well. ] Signed-off-by: Geert Uytterhoeven Cc: Jiri Kosina Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20181008111726.26286-1-geert%2Brenesas@glider.be Signed-off-by: Ingo Molnar commit 79ac32a427f5d1211fa417021fd04c36f63ab917 Author: Christoph Hellwig Date: Mon Oct 1 07:40:53 2018 -0700 dma-direct: document the zone selection logic What we are doing here isn't quite obvious, so add a comment explaining it. Signed-off-by: Christoph Hellwig commit 8f51ba8e604e6b35105f120cd69018b14ade84d2 Merge: 6364cb221834 bb3dd7e7c4d5 Author: Ingo Molnar Date: Tue Oct 9 07:22:04 2018 +0200 Merge tag 'perf-core-for-mingo-4.20-20181008' 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: - Fix building the python bindings with python3, which fixes some problems with building with clang on Clear Linux (Eduardo Habkost) - Fix coverity warnings, fixing up some error paths and plugging some temporary small buffer leaks (Sanskriti Sharma) - Adopt a wrapper for strerror_r() for the same reasons as recently for libbpf (Steven Rostedt) - S390 does not support watchpoints in perf test 22', check if that test is supported by the arch. (Thomas Richter) Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit 6364cb2218348cd5fba975e1ab5b7f37dee9adc4 Merge: 7c5314b88da6 c1883f10cfe0 Author: Ingo Molnar Date: Tue Oct 9 07:21:19 2018 +0200 Merge branch 'perf/urgent' into perf/core, to pick up fixes Signed-off-by: Ingo Molnar commit 901f8c3f6feb0225c14b3bc6237850fb921d2f2d Author: Paul Mackerras Date: Mon Oct 8 14:24:30 2018 +1100 KVM: PPC: Book3S HV: Add NO_HASH flag to GET_SMMU_INFO ioctl result This adds a KVM_PPC_NO_HASH flag to the flags field of the kvm_ppc_smmu_info struct, and arranges for it to be set when running as a nested hypervisor, as an unambiguous indication to userspace that HPT guests are not supported. Reporting the KVM_CAP_PPC_MMU_HASH_V3 capability as false could be taken as indicating only that the new HPT features in ISA V3.0 are not supported, leaving it ambiguous whether pre-V3.0 HPT features are supported. Reviewed-by: David Gibson Signed-off-by: Paul Mackerras commit aa069a996951f3e2e38437ef0316685a5893fc7e Author: Paul Mackerras Date: Fri Sep 21 20:02:01 2018 +1000 KVM: PPC: Book3S HV: Add a VM capability to enable nested virtualization With this, userspace can enable a KVM-HV guest to run nested guests under it. The administrator can control whether any nested guests can be run; setting the "nested" module parameter to false prevents any guests becoming nested hypervisors (that is, any attempt to enable the nested capability on a guest will fail). Guests which are already nested hypervisors will continue to be so. Reviewed-by: David Gibson Signed-off-by: Paul Mackerras commit 9d67121a4fce20e0f7f127d40cd824fbbf5297dc Merge: aa2278644ae5 83a055104eaf Author: Paul Mackerras Date: Tue Oct 9 16:13:20 2018 +1100 Merge remote-tracking branch 'remotes/powerpc/topic/ppc-kvm' into kvm-ppc-next This merges in the "ppc-kvm" topic branch of the powerpc tree to get a series of commits that touch both general arch/powerpc code and KVM code. These commits will be merged both via the KVM tree and the powerpc tree. Signed-off-by: Paul Mackerras commit 83a055104eaf89589582659737ff5bf6eed63ac4 Author: Paul Mackerras Date: Mon Oct 8 16:31:17 2018 +1100 KVM: PPC: Book3S HV: Add nested shadow page tables to debugfs This adds a list of valid shadow PTEs for each nested guest to the 'radix' file for the guest in debugfs. This can be useful for debugging. Reviewed-by: David Gibson Signed-off-by: Paul Mackerras Signed-off-by: Michael Ellerman commit de760db4d9d7b3e735dbc7e4e3fa2c00909abe7c Author: Paul Mackerras Date: Mon Oct 8 16:31:16 2018 +1100 KVM: PPC: Book3S HV: Allow HV module to load without hypervisor mode With this, the KVM-HV module can be loaded in a guest running under KVM-HV, and if the hypervisor supports nested virtualization, this guest can now act as a nested hypervisor and run nested guests. This also adds some checks to inform userspace that HPT guests are not supported by nested hypervisors (by returning false for the KVM_CAP_PPC_MMU_HASH_V3 capability), and to prevent userspace from configuring a guest to use HPT mode. Signed-off-by: Paul Mackerras Reviewed-by: David Gibson Signed-off-by: Michael Ellerman commit 10b5022db7861a98f3d9a87eed8405f2d4e37ed6 Author: Suraj Jitindar Singh Date: Mon Oct 8 16:31:15 2018 +1100 KVM: PPC: Book3S HV: Handle differing endianness for H_ENTER_NESTED The hcall H_ENTER_NESTED takes two parameters: the address in L1 guest memory of a hv_regs struct and the address of a pt_regs struct. The hcall requests the L0 hypervisor to use the register values in these structs to run a L2 guest and to return the exit state of the L2 guest in these structs. These are in the endianness of the L1 guest, rather than being always big-endian as is usually the case for PAPR hypercalls. This is convenient because it means that the L1 guest can pass the address of the regs field in its kvm_vcpu_arch struct. This also improves performance slightly by avoiding the need for two copies of the pt_regs struct. When reading/writing these structures, this patch handles the case where the endianness of the L1 guest differs from that of the L0 hypervisor, by byteswapping the structures after reading and before writing them back. Since all the fields of the pt_regs are of the same type, i.e., unsigned long, we treat it as an array of unsigned longs. The fields of struct hv_guest_state are not all the same, so its fields are byteswapped individually. Reviewed-by: David Gibson Signed-off-by: Suraj Jitindar Singh Signed-off-by: Paul Mackerras Signed-off-by: Michael Ellerman commit 73937deb4b2d7f08ac48e9125de889c757a7a9b3 Author: Suraj Jitindar Singh Date: Mon Oct 8 16:31:14 2018 +1100 KVM: PPC: Book3S HV: Sanitise hv_regs on nested guest entry restore_hv_regs() is used to copy the hv_regs L1 wants to set to run the nested (L2) guest into the vcpu structure. We need to sanitise these values to ensure we don't let the L1 guest hypervisor do things we don't want it to. We don't let data address watchpoints or completed instruction address breakpoints be set to match in hypervisor state. We also don't let L1 enable features in the hypervisor facility status and control register (HFSCR) for L2 which we have disabled for L1. That is L2 will get the subset of features which the L0 hypervisor has enabled for L1 and the features L1 wants to enable for L2. This could mean we give L1 a hypervisor facility unavailable interrupt for a facility it thinks it has enabled, however it shouldn't have enabled a facility it itself doesn't have for the L2 guest. We sanitise the registers when copying in the L2 hv_regs. We don't need to sanitise when copying back the L1 hv_regs since these shouldn't be able to contain invalid values as they're just what was copied out. Reviewed-by: David Gibson Signed-off-by: Suraj Jitindar Singh Signed-off-by: Paul Mackerras Signed-off-by: Michael Ellerman commit 3032341853daf07c723084a086ebe7a9bdf8f90b Author: Paul Mackerras Date: Mon Oct 8 16:31:13 2018 +1100 KVM: PPC: Book3S HV: Add one-reg interface to virtual PTCR register This adds a one-reg register identifier which can be used to read and set the virtual PTCR for the guest. This register identifies the address and size of the virtual partition table for the guest, which contains information about the nested guests under this guest. Migrating this value is the only extra requirement for migrating a guest which has nested guests (assuming of course that the destination host supports nested virtualization in the kvm-hv module). Reviewed-by: David Gibson Signed-off-by: Paul Mackerras Signed-off-by: Michael Ellerman commit f3c99f97a3cda284418af6e242e06b351b83f647 Author: Paul Mackerras Date: Mon Oct 8 16:31:12 2018 +1100 KVM: PPC: Book3S HV: Don't access HFSCR, LPIDR or LPCR when running nested When running as a nested hypervisor, this avoids reading hypervisor privileged registers (specifically HFSCR, LPIDR and LPCR) at startup; instead reasonable default values are used. This also avoids writing LPIDR in the single-vcpu entry/exit path. Also, this removes the check for CPU_FTR_HVMODE in kvmppc_mmu_hv_init() since its only caller already checks this. Reviewed-by: David Gibson Signed-off-by: Paul Mackerras Signed-off-by: Michael Ellerman commit 9d0b048da788c1df927d808bb60e7fd4f19a3a12 Author: Suraj Jitindar Singh Date: Mon Oct 8 16:31:11 2018 +1100 KVM: PPC: Book3S HV: Invalidate TLB when nested vcpu moves physical cpu This is only done at level 0, since only level 0 knows which physical CPU a vcpu is running on. This does for nested guests what L0 already did for its own guests, which is to flush the TLB on a pCPU when it goes to run a vCPU there, and there is another vCPU in the same VM which previously ran on this pCPU and has now started to run on another pCPU. This is to handle the situation where the other vCPU touched a mapping, moved to another pCPU and did a tlbiel (local-only tlbie) on that new pCPU and thus left behind a stale TLB entry on this pCPU. This introduces a limit on the the vcpu_token values used in the H_ENTER_NESTED hcall -- they must now be less than NR_CPUS. [paulus@ozlabs.org - made prev_cpu array be short[] to reduce memory consumption.] Reviewed-by: David Gibson Signed-off-by: Suraj Jitindar Singh Signed-off-by: Paul Mackerras Signed-off-by: Michael Ellerman commit 690ed4cad87a34781a7f3c34a6cebda6cc2cc06c Author: Paul Mackerras Date: Mon Oct 8 16:31:10 2018 +1100 KVM: PPC: Book3S HV: Use hypercalls for TLB invalidation when nested This adds code to call the H_TLB_INVALIDATE hypercall when running as a guest, in the cases where we need to invalidate TLBs (or other MMU caches) as part of managing the mappings for a nested guest. Calling H_TLB_INVALIDATE lets the nested hypervisor inform the parent hypervisor about changes to partition-scoped page tables or the partition table without needing to do hypervisor-privileged tlbie instructions. Reviewed-by: David Gibson Signed-off-by: Paul Mackerras Signed-off-by: Michael Ellerman commit e3b6b4661527e821ffbe3db83952fdb1e6e47c49 Author: Suraj Jitindar Singh Date: Mon Oct 8 16:31:09 2018 +1100 KVM: PPC: Book3S HV: Implement H_TLB_INVALIDATE hcall When running a nested (L2) guest the guest (L1) hypervisor will use the H_TLB_INVALIDATE hcall when it needs to change the partition scoped page tables or the partition table which it manages. It will use this hcall in the situations where it would use a partition-scoped tlbie instruction if it were running in hypervisor mode. The H_TLB_INVALIDATE hcall can invalidate different scopes: Invalidate TLB for a given target address: - This invalidates a single L2 -> L1 pte - We need to invalidate any L2 -> L0 shadow_pgtable ptes which map the L2 address space which is being invalidated. This is because a single L2 -> L1 pte may have been mapped with more than one pte in the L2 -> L0 page tables. Invalidate the entire TLB for a given LPID or for all LPIDs: - Invalidate the entire shadow_pgtable for a given nested guest, or for all nested guests. Invalidate the PWC (page walk cache) for a given LPID or for all LPIDs: - We don't cache the PWC, so nothing to do. Invalidate the entire TLB, PWC and partition table for a given/all LPIDs: - Here we re-read the partition table entry and remove the nested state for any nested guest for which the first doubleword of the partition table entry is now zero. The H_TLB_INVALIDATE hcall takes as parameters the tlbie instruction word (of which only the RIC, PRS and R fields are used), the rS value (giving the lpid, where required) and the rB value (giving the IS, AP and EPN values). [paulus@ozlabs.org - adapted to having the partition table in guest memory, added the H_TLB_INVALIDATE implementation, removed tlbie instruction emulation, reworded the commit message.] Reviewed-by: David Gibson Signed-off-by: Suraj Jitindar Singh Signed-off-by: Paul Mackerras Signed-off-by: Michael Ellerman commit 8cf531ed48cfc76f370369a372802a65361df27c Author: Suraj Jitindar Singh Date: Mon Oct 8 16:31:08 2018 +1100 KVM: PPC: Book3S HV: Introduce rmap to track nested guest mappings When a host (L0) page which is mapped into a (L1) guest is in turn mapped through to a nested (L2) guest we keep a reverse mapping (rmap) so that these mappings can be retrieved later. Whenever we create an entry in a shadow_pgtable for a nested guest we create a corresponding rmap entry and add it to the list for the L1 guest memslot at the index of the L1 guest page it maps. This means at the L1 guest memslot we end up with lists of rmaps. When we are notified of a host page being invalidated which has been mapped through to a (L1) guest, we can then walk the rmap list for that guest page, and find and invalidate all of the corresponding shadow_pgtable entries. In order to reduce memory consumption, we compress the information for each rmap entry down to 52 bits -- 12 bits for the LPID and 40 bits for the guest real page frame number -- which will fit in a single unsigned long. To avoid a scenario where a guest can trigger unbounded memory allocations, we scan the list when adding an entry to see if there is already an entry with the contents we need. This can occur, because we don't ever remove entries from the middle of a list. A struct nested guest rmap is a list pointer and an rmap entry; ---------------- | next pointer | ---------------- | rmap entry | ---------------- Thus the rmap pointer for each guest frame number in the memslot can be either NULL, a single entry, or a pointer to a list of nested rmap entries. gfn memslot rmap array ------------------------- 0 | NULL | (no rmap entry) ------------------------- 1 | single rmap entry | (rmap entry with low bit set) ------------------------- 2 | list head pointer | (list of rmap entries) ------------------------- The final entry always has the lowest bit set and is stored in the next pointer of the last list entry, or as a single rmap entry. With a list of rmap entries looking like; ----------------- ----------------- ------------------------- | list head ptr | ----> | next pointer | ----> | single rmap entry | ----------------- ----------------- ------------------------- | rmap entry | | rmap entry | ----------------- ------------------------- Signed-off-by: Suraj Jitindar Singh Signed-off-by: Paul Mackerras Reviewed-by: David Gibson Signed-off-by: Michael Ellerman commit fd10be257312b5d883f89d62d691443e95678fdd Author: Suraj Jitindar Singh Date: Mon Oct 8 16:31:07 2018 +1100 KVM: PPC: Book3S HV: Handle page fault for a nested guest Consider a normal (L1) guest running under the main hypervisor (L0), and then a nested guest (L2) running under the L1 guest which is acting as a nested hypervisor. L0 has page tables to map the address space for L1 providing the translation from L1 real address -> L0 real address; L1 | | (L1 -> L0) | ----> L0 There are also page tables in L1 used to map the address space for L2 providing the translation from L2 real address -> L1 read address. Since the hardware can only walk a single level of page table, we need to maintain in L0 a "shadow_pgtable" for L2 which provides the translation from L2 real address -> L0 real address. Which looks like; L2 L2 | | | (L2 -> L1) | | | ----> L1 | (L2 -> L0) | | | (L1 -> L0) | | | ----> L0 --------> L0 When a page fault occurs while running a nested (L2) guest we need to insert a pte into this "shadow_pgtable" for the L2 -> L0 mapping. To do this we need to: 1. Walk the pgtable in L1 memory to find the L2 -> L1 mapping, and provide a page fault to L1 if this mapping doesn't exist. 2. Use our L1 -> L0 pgtable to convert this L1 address to an L0 address, or try to insert a pte for that mapping if it doesn't exist. 3. Now we have a L2 -> L0 mapping, insert this into our shadow_pgtable Once this mapping exists we can take rc faults when hardware is unable to automatically set the reference and change bits in the pte. On these we need to: 1. Check the rc bits on the L2 -> L1 pte match, and otherwise reflect the fault down to L1. 2. Set the rc bits in the L1 -> L0 pte which corresponds to the same host page. 3. Set the rc bits in the L2 -> L0 pte. As we reuse a large number of functions in book3s_64_mmu_radix.c for this we also needed to refactor a number of these functions to take an lpid parameter so that the correct lpid is used for tlb invalidations. The functionality however has remained the same. Reviewed-by: David Gibson Signed-off-by: Suraj Jitindar Singh Signed-off-by: Paul Mackerras Signed-off-by: Michael Ellerman commit 4bad77799fede9d95abaf499fff385608ee14877 Author: Paul Mackerras Date: Mon Oct 8 16:31:06 2018 +1100 KVM: PPC: Book3S HV: Handle hypercalls correctly when nested When we are running as a nested hypervisor, we use a hypercall to enter the guest rather than code in book3s_hv_rmhandlers.S. This means that the hypercall handlers listed in hcall_real_table never get called. There are some hypercalls that are handled there and not in kvmppc_pseries_do_hcall(), which therefore won't get processed for a nested guest. To fix this, we add cases to kvmppc_pseries_do_hcall() to handle those hypercalls, with the following exceptions: - The HPT hypercalls (H_ENTER, H_REMOVE, etc.) are not handled because we only support radix mode for nested guests. - H_CEDE has to be handled specially because the cede logic in kvmhv_run_single_vcpu assumes that it has been processed by the time that kvmhv_p9_guest_entry() returns. Therefore we put a special case for H_CEDE in kvmhv_p9_guest_entry(). For the XICS hypercalls, if real-mode processing is enabled, then the virtual-mode handlers assume that they are being called only to finish up the operation. Therefore we turn off the real-mode flag in the XICS code when running as a nested hypervisor. Reviewed-by: David Gibson Signed-off-by: Paul Mackerras Signed-off-by: Michael Ellerman commit f3c18e9342a443528137a303f3c391d42d3bb394 Author: Paul Mackerras Date: Mon Oct 8 16:31:05 2018 +1100 KVM: PPC: Book3S HV: Use XICS hypercalls when running as a nested hypervisor This adds code to call the H_IPI and H_EOI hypercalls when we are running as a nested hypervisor (i.e. without the CPU_FTR_HVMODE cpu feature) and we would otherwise access the XICS interrupt controller directly or via an OPAL call. Reviewed-by: David Gibson Signed-off-by: Paul Mackerras Signed-off-by: Michael Ellerman commit 360cae313702cdd0b90f82c261a8302fecef030a Author: Paul Mackerras Date: Mon Oct 8 16:31:04 2018 +1100 KVM: PPC: Book3S HV: Nested guest entry via hypercall This adds a new hypercall, H_ENTER_NESTED, which is used by a nested hypervisor to enter one of its nested guests. The hypercall supplies register values in two structs. Those values are copied by the level 0 (L0) hypervisor (the one which is running in hypervisor mode) into the vcpu struct of the L1 guest, and then the guest is run until an interrupt or error occurs which needs to be reported to L1 via the hypercall return value. Currently this assumes that the L0 and L1 hypervisors are the same endianness, and the structs passed as arguments are in native endianness. If they are of different endianness, the version number check will fail and the hcall will be rejected. Nested hypervisors do not support indep_threads_mode=N, so this adds code to print a warning message if the administrator has set indep_threads_mode=N, and treat it as Y. Reviewed-by: David Gibson Signed-off-by: Paul Mackerras Signed-off-by: Michael Ellerman commit 8e3f5fc1045dc49fd175b978c5457f5f51e7a2ce Author: Paul Mackerras Date: Mon Oct 8 16:31:03 2018 +1100 KVM: PPC: Book3S HV: Framework and hcall stubs for nested virtualization This starts the process of adding the code to support nested HV-style virtualization. It defines a new H_SET_PARTITION_TABLE hypercall which a nested hypervisor can use to set the base address and size of a partition table in its memory (analogous to the PTCR register). On the host (level 0 hypervisor) side, the H_SET_PARTITION_TABLE hypercall from the guest is handled by code that saves the virtual PTCR value for the guest. This also adds code for creating and destroying nested guests and for reading the partition table entry for a nested guest from L1 memory. Each nested guest has its own shadow LPID value, different in general from the LPID value used by the nested hypervisor to refer to it. The shadow LPID value is allocated at nested guest creation time. Nested hypervisor functionality is only available for a radix guest, which therefore means a radix host on a POWER9 (or later) processor. Signed-off-by: Paul Mackerras Reviewed-by: David Gibson Signed-off-by: Michael Ellerman commit f0f825f0e20abe9ba6eb71b7c1eebd891fb4375c Author: Paul Mackerras Date: Mon Oct 8 16:31:02 2018 +1100 KVM: PPC: Book3S HV: Use kvmppc_unmap_pte() in kvm_unmap_radix() kvmppc_unmap_pte() does a sequence of operations that are open-coded in kvm_unmap_radix(). This extends kvmppc_unmap_pte() a little so that it can be used by kvm_unmap_radix(), and makes kvm_unmap_radix() call it. Reviewed-by: David Gibson Signed-off-by: Paul Mackerras Signed-off-by: Michael Ellerman commit 04bae9d5b4c09ac7e9a4941c0e555f7e5e335efd Author: Suraj Jitindar Singh Date: Mon Oct 8 16:31:01 2018 +1100 KVM: PPC: Book3S HV: Refactor radix page fault handler The radix page fault handler accounts for all cases, including just needing to insert a pte. This breaks it up into separate functions for the two main cases; setting rc and inserting a pte. This allows us to make the setting of rc and inserting of a pte generic for any pgtable, not specific to the one for this guest. [paulus@ozlabs.org - reduced diffs from previous code] Reviewed-by: David Gibson Signed-off-by: Suraj Jitindar Singh Signed-off-by: Paul Mackerras Signed-off-by: Michael Ellerman commit 9811c78e968f26ca040c53f6180ff2018939ae24 Author: Suraj Jitindar Singh Date: Mon Oct 8 16:31:00 2018 +1100 KVM: PPC: Book3S HV: Make kvmppc_mmu_radix_xlate process/partition table agnostic kvmppc_mmu_radix_xlate() is used to translate an effective address through the process tables. The process table and partition tables have identical layout. Exploit this fact to make the kvmppc_mmu_radix_xlate() function able to translate either an effective address through the process tables or a guest real address through the partition tables. [paulus@ozlabs.org - reduced diffs from previous code] Reviewed-by: David Gibson Signed-off-by: Suraj Jitindar Singh Signed-off-by: Paul Mackerras Signed-off-by: Michael Ellerman commit 89329c0be8bdab7b8dfb0c6da777951d4cef06c0 Author: Suraj Jitindar Singh Date: Mon Oct 8 16:30:59 2018 +1100 KVM: PPC: Book3S HV: Clear partition table entry on vm teardown When destroying a VM we return the LPID to the pool, however we never zero the partition table entry. This is instead done when we reallocate the LPID. Zero the partition table entry on VM teardown before returning the LPID to the pool. This means if we were running as a nested hypervisor the real hypervisor could use this to determine when it can free resources. Reviewed-by: David Gibson Signed-off-by: Suraj Jitindar Singh Signed-off-by: Paul Mackerras Signed-off-by: Michael Ellerman commit fd0944baad806dfb4c777124ec712c55b714ff51 Author: Paul Mackerras Date: Mon Oct 8 16:30:58 2018 +1100 KVM: PPC: Use ccr field in pt_regs struct embedded in vcpu struct When the 'regs' field was added to struct kvm_vcpu_arch, the code was changed to use several of the fields inside regs (e.g., gpr, lr, etc.) but not the ccr field, because the ccr field in struct pt_regs is 64 bits on 64-bit platforms, but the cr field in kvm_vcpu_arch is only 32 bits. This changes the code to use the regs.ccr field instead of cr, and changes the assembly code on 64-bit platforms to use 64-bit loads and stores instead of 32-bit ones. Reviewed-by: David Gibson Signed-off-by: Paul Mackerras Signed-off-by: Michael Ellerman commit 9a94d3ee2d159927c0f8e5078228eadbce8dda43 Author: Paul Mackerras Date: Mon Oct 8 16:30:57 2018 +1100 KVM: PPC: Book3S HV: Add a debugfs file to dump radix mappings This adds a file called 'radix' in the debugfs directory for the guest, which when read gives all of the valid leaf PTEs in the partition-scoped radix tree for a radix guest, in human-readable format. It is analogous to the existing 'htab' file which dumps the HPT entries for a HPT guest. Reviewed-by: David Gibson Signed-off-by: Paul Mackerras Signed-off-by: Michael Ellerman commit 32eb150aee8dce5076638ebafe53732276c9f28e Author: Paul Mackerras Date: Mon Oct 8 16:30:56 2018 +1100 KVM: PPC: Book3S HV: Handle hypervisor instruction faults better Currently the code for handling hypervisor instruction page faults passes 0 for the flags indicating the type of fault, which is OK in the usual case that the page is not mapped in the partition-scoped page tables. However, there are other causes for hypervisor instruction page faults, such as not being to update a reference (R) or change (C) bit. The cause is indicated in bits in HSRR1, including a bit which indicates that the fault is due to not being able to write to a page (for example to update an R or C bit). Not handling these other kinds of faults correctly can lead to a loop of continual faults without forward progress in the guest. In order to handle these faults better, this patch constructs a "DSISR-like" value from the bits which DSISR and SRR1 (for a HISI) have in common, and passes it to kvmppc_book3s_hv_page_fault() so that it knows what caused the fault. Reviewed-by: David Gibson Signed-off-by: Paul Mackerras Signed-off-by: Michael Ellerman commit 95a6432ce903858a2f285d611275340aa574c6ac Author: Paul Mackerras Date: Mon Oct 8 16:30:55 2018 +1100 KVM: PPC: Book3S HV: Streamlined guest entry/exit path on P9 for radix guests This creates an alternative guest entry/exit path which is used for radix guests on POWER9 systems when we have indep_threads_mode=Y. In these circumstances there is exactly one vcpu per vcore and there is no coordination required between vcpus or vcores; the vcpu can enter the guest without needing to synchronize with anything else. The new fast path is implemented almost entirely in C in book3s_hv.c and runs with the MMU on until the guest is entered. On guest exit we use the existing path until the point where we are committed to exiting the guest (as distinct from handling an interrupt in the low-level code and returning to the guest) and we have pulled the guest context from the XIVE. At that point we check a flag in the stack frame to see whether we came in via the old path and the new path; if we came in via the new path then we go back to C code to do the rest of the process of saving the guest context and restoring the host context. The C code is split into separate functions for handling the OS-accessible state and the hypervisor state, with the idea that the latter can be replaced by a hypercall when we implement nested virtualization. Signed-off-by: Paul Mackerras Reviewed-by: David Gibson [mpe: Fix CONFIG_ALTIVEC=n build] Signed-off-by: Michael Ellerman commit 53655ddd7771f703071ac81cc5823eae509b6653 Author: Paul Mackerras Date: Mon Oct 8 16:30:54 2018 +1100 KVM: PPC: Book3S HV: Call kvmppc_handle_exit_hv() with vcore unlocked Currently kvmppc_handle_exit_hv() is called with the vcore lock held because it is called within a for_each_runnable_thread loop. However, we already unlock the vcore within kvmppc_handle_exit_hv() under certain circumstances, and this is safe because (a) any vcpus that become runnable and are added to the runnable set by kvmppc_run_vcpu() have their vcpu->arch.trap == 0 and can't actually run in the guest (because the vcore state is VCORE_EXITING), and (b) for_each_runnable_thread is safe against addition or removal of vcpus from the runnable set. Therefore, in order to simplify things for following patches, let's drop the vcore lock in the for_each_runnable_thread loop, so kvmppc_handle_exit_hv() gets called without the vcore lock held. Reviewed-by: David Gibson Signed-off-by: Paul Mackerras Signed-off-by: Michael Ellerman commit 7854f7545bff69567fc3fcd8831752138b892483 Author: Paul Mackerras Date: Mon Oct 8 16:30:53 2018 +1100 KVM: PPC: Book3S: Rework TM save/restore code and make it C-callable This adds a parameter to __kvmppc_save_tm and __kvmppc_restore_tm which allows the caller to indicate whether it wants the nonvolatile register state to be preserved across the call, as required by the C calling conventions. This parameter being non-zero also causes the MSR bits that enable TM, FP, VMX and VSX to be preserved. The condition register and DSCR are now always preserved. With this, kvmppc_save_tm_hv and kvmppc_restore_tm_hv can be called from C code provided the 3rd parameter is non-zero. So that these functions can be called from modules, they now include code to set the TOC pointer (r2) on entry, as they can call other built-in C functions which will assume the TOC to have been set. Also, the fake suspend code in kvmppc_save_tm_hv is modified here to assume that treclaim in fake-suspend state does not modify any registers, which is the case on POWER9. This enables the code to be simplified quite a bit. _kvmppc_save_tm_pr and _kvmppc_restore_tm_pr become much simpler with this change, since they now only need to save and restore TAR and pass 1 for the 3rd argument to __kvmppc_{save,restore}_tm. Reviewed-by: David Gibson Signed-off-by: Paul Mackerras Signed-off-by: Michael Ellerman commit df709a296ef7c493a074609019b0e074cde5c0d0 Author: Paul Mackerras Date: Mon Oct 8 16:30:52 2018 +1100 KVM: PPC: Book3S HV: Simplify real-mode interrupt handling This streamlines the first part of the code that handles a hypervisor interrupt that occurred in the guest. With this, all of the real-mode handling that occurs is done before the "guest_exit_cont" label; once we get to that label we are committed to exiting to host virtual mode. Thus the machine check and HMI real-mode handling is moved before that label. Also, the code to handle external interrupts is moved out of line, as is the code that calls kvmppc_realmode_hmi_handler(). Signed-off-by: Paul Mackerras Reviewed-by: David Gibson Signed-off-by: Michael Ellerman commit 41f4e631daf80d16d818ac17c4144bd5b9a11f33 Author: Paul Mackerras Date: Mon Oct 8 16:30:51 2018 +1100 KVM: PPC: Book3S HV: Extract PMU save/restore operations as C-callable functions This pulls out the assembler code that is responsible for saving and restoring the PMU state for the host and guest into separate functions so they can be used from an alternate entry path. The calling convention is made compatible with C. Reviewed-by: David Gibson Signed-off-by: Paul Mackerras Reviewed-by: Madhavan Srinivasan Signed-off-by: Michael Ellerman commit f7035ce9f1dfb1042c4acedf5cca6f9af395f110 Author: Paul Mackerras Date: Mon Oct 8 16:30:50 2018 +1100 KVM: PPC: Book3S HV: Move interrupt delivery on guest entry to C code This is based on a patch by Suraj Jitindar Singh. This moves the code in book3s_hv_rmhandlers.S that generates an external, decrementer or privileged doorbell interrupt just before entering the guest to C code in book3s_hv_builtin.c. This is to make future maintenance and modification easier. The algorithm expressed in the C code is almost identical to the previous algorithm. Reviewed-by: David Gibson Signed-off-by: Paul Mackerras Signed-off-by: Michael Ellerman commit 966eba9316d429404bdc9a0b8cf45b4d6dd46e8f Author: Paul Mackerras Date: Mon Oct 8 16:30:49 2018 +1100 KVM: PPC: Book3S HV: Remove left-over code in XICS-on-XIVE emulation This removes code that clears the external interrupt pending bit in the pending_exceptions bitmap. This is left over from an earlier iteration of the code where this bit was set when an escalation interrupt arrived in order to wake the vcpu from cede. Currently we set the vcpu->arch.irq_pending flag instead for this purpose. Therefore there is no need to do anything with the pending_exceptions bitmap. Reviewed-by: David Gibson Signed-off-by: Paul Mackerras Signed-off-by: Michael Ellerman commit d24ea8a7336a2c392728e2cf909d607a680feb7b Author: Paul Mackerras Date: Mon Oct 8 16:30:48 2018 +1100 KVM: PPC: Book3S: Simplify external interrupt handling Currently we use two bits in the vcpu pending_exceptions bitmap to indicate that an external interrupt is pending for the guest, one for "one-shot" interrupts that are cleared when delivered, and one for interrupts that persist until cleared by an explicit action of the OS (e.g. an acknowledge to an interrupt controller). The BOOK3S_IRQPRIO_EXTERNAL bit is used for one-shot interrupt requests and BOOK3S_IRQPRIO_EXTERNAL_LEVEL is used for persisting interrupts. In practice BOOK3S_IRQPRIO_EXTERNAL never gets used, because our Book3S platforms generally, and pseries in particular, expect external interrupt requests to persist until they are acknowledged at the interrupt controller. That combined with the confusion introduced by having two bits for what is essentially the same thing makes it attractive to simplify things by only using one bit. This patch does that. With this patch there is only BOOK3S_IRQPRIO_EXTERNAL, and by default it has the semantics of a persisting interrupt. In order to avoid breaking the ABI, we introduce a new "external_oneshot" flag which preserves the behaviour of the KVM_INTERRUPT ioctl with the KVM_INTERRUPT_SET argument. Reviewed-by: David Gibson Signed-off-by: Paul Mackerras Signed-off-by: Michael Ellerman commit e7b17d50471a8bfddf7c976c7d3a68104272b2f3 Author: Paul Mackerras Date: Mon Oct 8 16:30:47 2018 +1100 powerpc: Turn off CPU_FTR_P9_TM_HV_ASSIST in non-hypervisor mode When doing nested virtualization, it is only necessary to do the transactional memory hypervisor assist at level 0, that is, when we are in hypervisor mode. Nested hypervisors can just use the TM facilities as architected. Therefore we should clear the CPU_FTR_P9_TM_HV_ASSIST bit when we are not in hypervisor mode, along with the CPU_FTR_HVMODE bit. Doing this will not change anything at this stage because the only code that tests CPU_FTR_P9_TM_HV_ASSIST is in HV KVM, which currently can only be used when when CPU_FTR_HVMODE is set. Reviewed-by: David Gibson Signed-off-by: Paul Mackerras Signed-off-by: Michael Ellerman commit a3ac077b75c5a922dcbafd7e689ee09beefae0f6 Author: Alexey Kardashevskiy Date: Mon Sep 10 18:29:12 2018 +1000 KVM: PPC: Remove redundand permission bits removal The kvmppc_gpa_to_ua() helper itself takes care of the permission bits in the TCE and yet every single caller removes them. This changes semantics of kvmppc_gpa_to_ua() so it takes TCEs (which are GPAs + TCE permission bits) to make the callers simpler. This should cause no behavioural change. Signed-off-by: Alexey Kardashevskiy Reviewed-by: David Gibson Signed-off-by: Michael Ellerman commit 2691f0ff3d96b471a69c7ef29f3340b91056845d Author: Alexey Kardashevskiy Date: Mon Sep 10 18:29:11 2018 +1000 KVM: PPC: Propagate errors to the guest when failed instead of ignoring At the moment if the PUT_TCE{_INDIRECT} handlers fail to update the hardware tables, we print a warning once, clear the entry and continue. This is so as at the time the assumption was that if a VFIO device is hotplugged into the guest, and the userspace replays virtual DMA mappings (i.e. TCEs) to the hardware tables and if this fails, then there is nothing useful we can do about it. However the assumption is not valid as these handlers are not called for TCE replay (VFIO ioctl interface is used for that) and these handlers are for new TCEs. This returns an error to the guest if there is a request which cannot be processed. By now the only possible failure must be H_TOO_HARD. Signed-off-by: Alexey Kardashevskiy Reviewed-by: David Gibson Signed-off-by: Michael Ellerman commit 42de7b9e216728edbe53e0c4513e06fe3d566c5d Author: Alexey Kardashevskiy Date: Mon Sep 10 18:29:10 2018 +1000 KVM: PPC: Validate TCEs against preregistered memory page sizes The userspace can request an arbitrary supported page size for a DMA window and this works fine as long as the mapped memory is backed with the pages of the same or bigger size; if this is not the case, mm_iommu_ua_to_hpa{_rm}() fail and tables do not populated with dangerously incorrect TCEs. However since it is quite easy to misconfigure the KVM and we do not do reverts to all changes made to TCE tables if an error happens in a middle, we better do the acceptable page size validation before we even touch the tables. This enhances kvmppc_tce_validate() to check the hardware IOMMU page sizes against the preregistered memory page sizes. Since the new check uses real/virtual mode helpers, this renames kvmppc_tce_validate() to kvmppc_rm_tce_validate() to handle the real mode case and mirrors it for the virtual mode under the old name. The real mode handler is not used for the virtual mode as: 1. it uses _lockless() list traversing primitives instead of RCU; 2. realmode's mm_iommu_ua_to_hpa_rm() uses vmalloc_to_phys() which virtual mode does not have to use and since on POWER9+radix only virtual mode handlers actually work, we do not want to slow down that path even a bit. This removes EXPORT_SYMBOL_GPL(kvmppc_tce_validate) as the validators are static now. From now on the attempts on mapping IOMMU pages bigger than allowed will result in KVM exit. Signed-off-by: Alexey Kardashevskiy Reviewed-by: David Gibson [mpe: Fix KVM_HV=n build] Signed-off-by: Michael Ellerman commit 9000a457a0c84883874a844ef94adf26f633f3b4 Merge: 68049a5f4dce ffa0a9a5903e Author: David S. Miller Date: Mon Oct 8 21:28:55 2018 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next Pablo Neira Ayuso says: ==================== Netfilter updates for net-next The following patchset contains Netfilter updates for your net-next tree: 1) Support for matching on ipsec policy already set in the route, from Florian Westphal. 2) Split set destruction into deactivate and destroy phase to make it fit better into the transaction infrastructure, also from Florian. This includes a patch to warn on imbalance when setting the new activate and deactivate interfaces. 3) Release transaction list from the workqueue to remove expensive synchronize_rcu() from configuration plane path. This speeds up configuration plane quite a bit. From Florian Westphal. 4) Add new xfrm/ipsec extension, this new extension allows you to match for ipsec tunnel keys such as source and destination address, spi and reqid. From Máté Eckl and Florian Westphal. 5) Add secmark support, this includes connsecmark too, patches from Christian Gottsche. 6) Allow to specify remaining bytes in xt_quota, from Chenbo Feng. One follow up patch to calm a clang warning for this one, from Nathan Chancellor. 7) Flush conntrack entries based on layer 3 family, from Kristian Evensen. 8) New revision for cgroups2 to shrink the path field. 9) Get rid of obsolete need_conntrack(), as a result from recent demodularization works. 10) Use WARN_ON instead of BUG_ON, from Florian Westphal. 11) Unused exported symbol in nf_nat_ipv4_fn(), from Florian. 12) Remove superfluous check for timeout netlink parser and dump functions in layer 4 conntrack helpers. 13) Unnecessary redundant rcu read side locks in NAT redirect, from Taehee Yoo. 14) Pass nf_hook_state structure to error handlers, patch from Florian Westphal. 15) Remove ->new() interface from layer 4 protocol trackers. Place them in the ->packet() interface. From Florian. 16) Place conntrack ->error() handling in the ->packet() interface. Patches from Florian Westphal. 17) Remove unused parameter in the pernet initialization path, also from Florian. 18) Remove additional parameter to specify layer 3 protocol when looking up for protocol tracker. From Florian. 19) Shrink array of layer 4 protocol trackers, from Florian. 20) Check for linear skb only once from the ALG NAT mangling codebase, from Taehee Yoo. 21) Use rhashtable_walk_enter() instead of deprecated rhashtable_walk_init(), also from Taehee. 22) No need to flush all conntracks when only one single address is gone, from Tan Hu. 23) Remove redundant check for NAT flags in flowtable code, from Taehee Yoo. 24) Use rhashtable_lookup() instead of rhashtable_lookup_fast() from netfilter codebase, since rcu read lock side is already assumed in this path. ==================== Signed-off-by: David S. Miller commit 16f37102181e23ec4bec88fe1cfdd6c3c24dd1ed Author: Sean Paul Date: Mon Oct 8 14:24:14 2018 -0400 drm/msm: a6xx: Fix improper u64 division This patch uses the proper do_div() macro to perform u64 division and guards against overflow if the result is too large for the unsigned long return type Fixes: a2c3c0a54d4c drm/msm/a6xx: Add devfreq support for a6xx Cc: Sharat Masetty Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit 0f5427219bdf3e3d0ba94e4fbefe623a57616825 Author: Sean Paul Date: Mon Oct 8 14:24:13 2018 -0400 drm/msm: a5xx: Remove unneeded parens A small fixup I posted with my v2 patch [1] that was dropped. [1]- https://lists.freedesktop.org/archives/freedreno/2018-October/003647.html Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit a1108c7b2efb892350ba6a0e932dfd45622f4e2b Author: Nathan Chancellor Date: Mon Oct 8 11:08:47 2018 -0700 spi: spi-ep93xx: Use dma_data_direction for ep93xx_spi_dma_{finish,prepare} Clang warns when one enumerated type is implicitly converted to another. drivers/spi/spi-ep93xx.c:342:62: warning: implicit conversion from enumeration type 'enum dma_transfer_direction' to different enumeration type 'enum dma_data_direction' [-Wenum-conversion] nents = dma_map_sg(chan->device->dev, sgt->sgl, sgt->nents, dir); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~ ./include/linux/dma-mapping.h:428:58: note: expanded from macro 'dma_map_sg' #define dma_map_sg(d, s, n, r) dma_map_sg_attrs(d, s, n, r, 0) ~~~~~~~~~~~~~~~~ ^ drivers/spi/spi-ep93xx.c:348:57: warning: implicit conversion from enumeration type 'enum dma_transfer_direction' to different enumeration type 'enum dma_data_direction' [-Wenum-conversion] dma_unmap_sg(chan->device->dev, sgt->sgl, sgt->nents, dir); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~ ./include/linux/dma-mapping.h:429:62: note: expanded from macro 'dma_unmap_sg' #define dma_unmap_sg(d, s, n, r) dma_unmap_sg_attrs(d, s, n, r, 0) ~~~~~~~~~~~~~~~~~~ ^ drivers/spi/spi-ep93xx.c:377:56: warning: implicit conversion from enumeration type 'enum dma_transfer_direction' to different enumeration type 'enum dma_data_direction' [-Wenum-conversion] dma_unmap_sg(chan->device->dev, sgt->sgl, sgt->nents, dir); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~ ./include/linux/dma-mapping.h:429:62: note: expanded from macro 'dma_unmap_sg' #define dma_unmap_sg(d, s, n, r) dma_unmap_sg_attrs(d, s, n, r, 0) ~~~~~~~~~~~~~~~~~~ ^ 3 warnings generated. dma_{,un}map_sg expect an enum of type dma_data_direction but this driver uses dma_transfer_direction for everything. Convert the driver to use dma_data_direction for these two functions. There are two places that strictly require an enum of type dma_transfer_direction: the direction member in struct dma_slave_config and the direction parameter in dmaengine_prep_slave_sg. To avoid using an explicit cast, add a simple function, ep93xx_dma_data_to_trans_dir, to safely map between the two types because they are not 1 to 1 in meaning. Signed-off-by: Nathan Chancellor Reviewed-by: Nick Desaulniers Reviewed-by: Mika Westerberg Signed-off-by: Mark Brown commit df3f94a0bbeb6cb6a02eb16b8e76f16b33cb2f8f Author: Arnd Bergmann Date: Mon Oct 8 11:30:01 2018 -0700 bpf: fix building without CONFIG_INET The newly added TCP and UDP handling fails to link when CONFIG_INET is disabled: net/core/filter.o: In function `sk_lookup': filter.c:(.text+0x7ff8): undefined reference to `tcp_hashinfo' filter.c:(.text+0x7ffc): undefined reference to `tcp_hashinfo' filter.c:(.text+0x8020): undefined reference to `__inet_lookup_established' filter.c:(.text+0x8058): undefined reference to `__inet_lookup_listener' filter.c:(.text+0x8068): undefined reference to `udp_table' filter.c:(.text+0x8070): undefined reference to `udp_table' filter.c:(.text+0x808c): undefined reference to `__udp4_lib_lookup' net/core/filter.o: In function `bpf_sk_release': filter.c:(.text+0x82e8): undefined reference to `sock_gen_put' Wrap the related sections of code in #ifdefs for the config option. Furthermore, sk_lookup() should always have been marked 'static', this also avoids a warning about a missing prototype when building with 'make W=1'. Fixes: 6acc9b432e67 ("bpf: Add helper to retrieve socket in BPF") Signed-off-by: Arnd Bergmann Signed-off-by: Joe Stringer Acked-by: Song Liu Signed-off-by: Daniel Borkmann commit ffa0a9a5903e9fcfde71a0200af30692ac223ef7 Author: Nathan Chancellor Date: Sat Oct 6 16:33:31 2018 -0700 netfilter: xt_quota: Don't use aligned attribute in sizeof Clang warns: net/netfilter/xt_quota.c:47:44: warning: 'aligned' attribute ignored when parsing type [-Wignored-attributes] BUILD_BUG_ON(sizeof(atomic64_t) != sizeof(__aligned_u64)); ^~~~~~~~~~~~~ Use 'sizeof(__u64)' instead, as the alignment doesn't affect the size of the type. Fixes: e9837e55b020 ("netfilter: xt_quota: fix the behavior of xt_quota module") Signed-off-by: Nathan Chancellor Signed-off-by: Pablo Neira Ayuso commit 7451dc608564f9f2077c6c895f9c94a815d401e5 Author: Luca Ceresoli Date: Wed Oct 3 17:50:24 2018 +0200 i2c: mux: mlxcpld: simplify code to reach the adapter struct i2c_client has a direct pointer to the adapter, no need to dig it out of the struct device tree. Suggested-by: Peter Rosin Signed-off-by: Luca Ceresoli Acked-by: Wolfram Sang Signed-off-by: Peter Rosin commit df6dd24f76641ba4216a6008a38956e245c6129b Author: Luca Ceresoli Date: Wed Oct 3 17:50:23 2018 +0200 i2c: mux: ltc4306: simplify code to reach the adapter struct i2c_client has a direct pointer to the adapter, no need to dig it out of the struct device tree. Suggested-by: Peter Rosin Signed-off-by: Luca Ceresoli Acked-by: Wolfram Sang Signed-off-by: Peter Rosin commit f2e0821377a37a74fe219d8c38f886d88425794b Author: Luca Ceresoli Date: Wed Oct 3 17:50:22 2018 +0200 i2c: mux: pca954x: simplify code to reach the adapter struct i2c_client has a direct pointer to the adapter, no need to dig it out of the struct device tree. Signed-off-by: Luca Ceresoli Acked-by: Wolfram Sang Signed-off-by: Peter Rosin commit 299b43535d3895bcde93cc7310b95b92b4fd8129 Author: Ricardo Ribalda Delgado Date: Thu Oct 4 15:01:08 2018 +0200 mtd: maps: gpio-addr-flash: Convert to gpiod Convert from legacy gpio API to gpiod. Board files will have to use gpiod_lookup_tables. Signed-off-by: Ricardo Ribalda Delgado Suggested-by: Boris Brezillon Signed-off-by: Boris Brezillon commit 0304f8eaa3aebc0480787139a26c7a19ac9936bd Author: Ricardo Ribalda Delgado Date: Thu Oct 4 15:01:07 2018 +0200 mtd: maps: gpio-addr-flash: Replace array with an integer By replacing the array with an integer we can avoid completely the bit comparison loop if the value has not changed (by far the most common case). Signed-off-by: Ricardo Ribalda Delgado Signed-off-by: Boris Brezillon commit 460cdeca546fc75f2450914c96e701f990396285 Author: Ricardo Ribalda Delgado Date: Thu Oct 4 15:01:06 2018 +0200 mtd: maps: gpio-addr-flash: Use order instead of size By using the order of the window instead of the size, we can replace a lot of expensive division and modulus on the code with simple bit operations. Signed-off-by: Ricardo Ribalda Delgado Signed-off-by: Boris Brezillon commit 000412276370a9bcfec73b3752ceefd9a927f1db Author: Ahmad Fatoum Date: Fri Sep 21 11:32:53 2018 +0200 mtd: spi-nor: fsl-quadspi: Don't let -EINVAL on the bus fsl_qspi_get_seqid() may return -EINVAL, but fsl_qspi_init_ahb_read() doesn't check for error codes with the result that -EINVAL could find itself signalled over the bus. In conjunction with the LS1046A SoC's A-009283 errata ("Illegal accesses to SPI flash memory can result in a system hang") this illegal access to SPI flash memory results in a system hang if userspace attempts reading later on. Avoid this by always checking fsl_qspi_get_seqid()'s return value and bail out otherwise. Fixes: e46ecda764dc ("mtd: spi-nor: Add Freescale QuadSPI driver") Cc: stable@vger.kernel.org Signed-off-by: Ahmad Fatoum Signed-off-by: Boris Brezillon commit 3baa8ec88c2feb902328e59a4dcf0f0aaab7d2ff Author: Yogesh Gaur Date: Wed Jun 13 11:39:18 2018 +0530 mtd: devices: m25p80: Make sure WRITE_EN is issued before each write Some SPI controllers can't write nor->page_size bytes in a single step because their TX FIFO is too small, but when that happens we should make sure a WRITE_EN command before each write access and READ_SR command after each write access is issued. The core is already taking care of that, so all we have to do here is return the actual number of bytes that were written during the spi_mem_exec_op() operation. Signed-off-by: Yogesh Gaur Signed-off-by: Boris Brezillon commit 630d6bd8a3b4964e8a4ccced97f7f1819c92b588 Author: Yogesh Gaur Date: Wed Jun 13 11:38:12 2018 +0530 mtd: spi-nor: Support controllers with limited TX FIFO size Some SPI controllers can't write nor->page_size bytes in a single step because their TX FIFO is too small. Allow nor->write() to return a size that is smaller than the requested write size to gracefully handle this case. Signed-off-by: Yogesh Gaur Signed-off-by: Boris Brezillon commit 900f5e0d8c9edc5dacc57873d22aee2ae699a8e1 Author: Nathan Chancellor Date: Tue Sep 25 00:32:03 2018 -0700 mtd: spi-nor: cadence-quadspi: Use proper enum for dma_[un]map_single Clang warns when one enumerated type is converted implicitly to another. drivers/mtd/spi-nor/cadence-quadspi.c:962:47: warning: implicit conversion from enumeration type 'enum dma_transfer_direction' to different enumeration type 'enum dma_data_direction' [-Wenum-conversion] dma_dst = dma_map_single(nor->dev, buf, len, DMA_DEV_TO_MEM); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~ ./include/linux/dma-mapping.h:428:66: note: expanded from macro 'dma_map_single' ~~~~~~~~~~~~~~~~~~~~ ^ drivers/mtd/spi-nor/cadence-quadspi.c:997:43: warning: implicit conversion from enumeration type 'enum dma_transfer_direction' to different enumeration type 'enum dma_data_direction' [-Wenum-conversion] dma_unmap_single(nor->dev, dma_dst, len, DMA_DEV_TO_MEM); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~ ./include/linux/dma-mapping.h:429:70: note: expanded from macro 'dma_unmap_single' ~~~~~~~~~~~~~~~~~~~~~~ ^ 2 warnings generated. Use the proper enums from dma_data_direction to satisfy Clang. DMA_FROM_DEVICE = DMA_DEV_TO_MEM = 2 Link: https://github.com/ClangBuiltLinux/linux/issues/108 Signed-off-by: Nathan Chancellor Signed-off-by: Boris Brezillon commit b038e8e3be724dd293a0849f5fe267fdddcca9dd Author: Tudor Ambarus Date: Tue Sep 11 18:40:07 2018 +0300 mtd: spi-nor: parse SFDP Sector Map Parameter Table Add support for the SFDP (JESD216B) Sector Map Parameter Table. This table is optional, but when available, we parse it to identify the location and size of sectors within the main data array of the flash memory device and to identify which Erase Types are supported by each sector. Signed-off-by: Tudor Ambarus Reviewed-by: Marek Vasut Signed-off-by: Boris Brezillon commit 5390a8df769ec9ba9c995191bb0867430f602ebb Author: Tudor Ambarus Date: Tue Sep 11 18:40:06 2018 +0300 mtd: spi-nor: add support to non-uniform SFDP SPI NOR flash memories Based on Cyrille Pitchen's patch https://lkml.org/lkml/2017/3/22/935. This patch is a transitional patch in introducing the support of SFDP SPI memories with non-uniform erase sizes like Spansion s25fs512s. Non-uniform erase maps will be used later when initialized based on the SFDP data. Introduce the memory erase map which splits the memory array into one or many erase regions. Each erase region supports up to 4 erase types, as defined by the JEDEC JESD216B (SFDP) specification. To be backward compatible, the erase map of uniform SPI NOR flash memories is initialized so it contains only one erase region and this erase region supports only one erase command. Hence a single size is used to erase any sector/block of the memory. Besides, since the algorithm used to erase sectors on non-uniform SPI NOR flash memories is quite expensive, when possible, the erase map is tuned to come back to the uniform case. The 'erase with the best command, move forward and repeat' approach was suggested by Cristian Birsan in a brainstorm session, so: Suggested-by: Cristian Birsan Signed-off-by: Tudor Ambarus Reviewed-by: Marek Vasut Signed-off-by: Boris Brezillon commit 24ae67c5825004bcbce90e7c89fed63f25d96260 Author: Marco Felsch Date: Fri Oct 5 09:58:12 2018 +0200 ASoC: max98988: make it selectable Currently the driver will build only if SND_SOC_ALL_CODECS is set. Adding a Kconfig menu description to build the driver standalone. Signed-off-by: Marco Felsch Signed-off-by: Mark Brown commit 62a7fc32a6289dce88787da03f893deab08158c3 Author: Andreas Färber Date: Fri Oct 5 09:58:11 2018 +0200 ASoC: max98088: Add master clock handling If master clock is provided through device tree, then update the master clock frequency during set_sysclk. Cc: Tushar Behera Signed-off-by: Andreas Färber Acked-by: Tushar Behera Reviewed-by: Javier Martinez Canillas [m.felsch@pengutronix.de: move mclk request to i2c_probe] [m.felsch@pengutronix.de: make use of snd_soc_component_get_bias_level()] Signed-off-by: Marco Felsch Signed-off-by: Mark Brown commit d6ed11edab5dd10ddf5548c02a9a1132ec728640 Author: Marco Felsch Date: Fri Oct 5 09:58:10 2018 +0200 ASoC: dt-bindings: max98088: add external clock binding Allow setting the clock provider for the external clock called "mclk". Signed-off-by: Marco Felsch Signed-off-by: Mark Brown commit bb3dd7e7c4d5e024d607c0ec06c2a2fb9408cc99 Author: Tzvetomir Stoyanov Date: Fri Oct 5 12:22:25 2018 -0400 tools lib traceevent, perf tools: Move struct tep_handler definition in a local header file As traceevent is going to be transferred into a proper library, its local data should be protected from the library users. This patch encapsulates struct tep_handler into a local header, not visible outside of the library. It implements also a bunch of new APIs, which library users can use to access tep_handler members. Signed-off-by: Tzvetomir Stoyanov Cc: Jiri Olsa Cc: Namhyung Kim Cc: linux trace devel Cc: tzvetomir stoyanov Link: http://lkml.kernel.org/r/20181005122225.522155df@gandalf.local.home Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Arnaldo Carvalho de Melo commit 68049a5f4dcefdad248f37201a30461f687b0719 Author: Ioana Ciocoi Radulescu Date: Mon Oct 8 14:16:31 2018 +0000 dpaa2-eth: Don't account Tx confirmation frames on NAPI poll Until now, both Rx and Tx confirmation frames handled during NAPI poll were counted toward the NAPI budget. However, Tx confirmations are lighter to process than Rx frames, which can skew the amount of work actually done inside one NAPI cycle. Update the code to only count Rx frames toward the NAPI budget and set a separate threshold on how many Tx conf frames can be processed in one poll cycle. The NAPI poll routine stops when either the budget is consumed by Rx frames or when Tx confirmation frames reach this threshold. Signed-off-by: Ioana Radulescu Signed-off-by: David S. Miller commit 9e19dabc0559306eed523835dd00376d681ee866 Author: YueHaibing Date: Mon Oct 8 14:07:50 2018 +0000 net: mscc: ocelot: remove set but not used variable 'phy_mode' Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/ethernet/mscc/ocelot_board.c: In function 'mscc_ocelot_probe': drivers/net/ethernet/mscc/ocelot_board.c:262:17: warning: variable 'phy_mode' set but not used [-Wunused-but-set-variable] enum phy_mode phy_mode; It never used since introduction in commit 71e32a20cfbf ("net: mscc: ocelot: make use of SerDes PHYs for handling their configuration") Signed-off-by: YueHaibing Signed-off-by: David S. Miller commit ee9615be250d47ee16a6f51d7886b361a84512b0 Merge: 062f97a31435 e44e428f59e4 Author: David S. Miller Date: Mon Oct 8 11:00:24 2018 -0700 Merge branch 'more-pmtu-selftests' Sabrina Dubroca says: ==================== selftests: add more PMTU tests The current selftests for PMTU cover VTI tunnels, but there's nothing about the generation and handling of PMTU exceptions by intermediate routers. This series adds and improves existing helpers, then adds IPv4 and IPv6 selftests with a setup involving an intermediate router. Joint work with Stefano Brivio. ==================== Signed-off-by: David S. Miller commit e44e428f59e4299bd060ac5c1618c4ac8e77c75a Author: Sabrina Dubroca Date: Mon Oct 8 14:37:05 2018 +0200 selftests: pmtu: add basic IPv4 and IPv6 PMTU tests Commit d1f1b9cbf34c ("selftests: net: Introduce first PMTU test") and follow-ups introduced some PMTU tests, but they all rely on tunneling, and, particularly, on VTI. These new tests use simple routing to exercise the generation and update of PMTU exceptions in IPv4 and IPv6. Signed-off-by: Sabrina Dubroca Signed-off-by: Stefano Brivio Reviewed-by: David Ahern Signed-off-by: David S. Miller commit 72ebddd7fff81e03a0617754d3f5c45ae49cea43 Author: Sabrina Dubroca Date: Mon Oct 8 14:37:04 2018 +0200 selftests: pmtu: extend MTU parsing helper to locked MTU The mtu_parse helper introduced in commit f2c929feeccd ("selftests: pmtu: Factor out MTU parsing helper") can only handle "mtu 1234", but not "mtu lock 1234". Extend it, so that we can do IPv4 tests with PMTU smaller than net.ipv4.route.min_pmtu Signed-off-by: Sabrina Dubroca Reviewed-by: David Ahern Signed-off-by: David S. Miller commit 1e0a720779531cd2860777534e3674b518ac0a69 Author: Stefano Brivio Date: Mon Oct 8 14:37:03 2018 +0200 selftests: pmtu: Introduce check_pmtu_value() Introduce and use a function that checks PMTU values against expected values and logs error messages, to remove some clutter. Signed-off-by: Stefano Brivio Signed-off-by: Sabrina Dubroca Reviewed-by: David Ahern Signed-off-by: David S. Miller commit 062f97a314355c3f0021cfa1454726cfe12432fa Author: Gustavo A. R. Silva Date: Mon Oct 8 14:15:39 2018 +0200 isdn/gigaset/isocdata: mark expected switch fall-through Notice that in this particular case, I replaced the "--v-- fall through --v--" comment with a proper "fall through", which is what GCC is expecting to find. This fix is part of the ongoing efforts to enabling -Wimplicit-fallthrough Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller commit cd7f7df6ca3366be4ac79e824fdaa8d482270015 Merge: 272a66173bbc 8c6e137fbc7f Author: David S. Miller Date: Mon Oct 8 10:39:06 2018 -0700 Merge branch 'rtnetlink-Add-support-for-rigid-checking-of-data-in-dump-request' David Ahern says: ==================== rtnetlink: Add support for rigid checking of data in dump request There are many use cases where a user wants to influence what is returned in a dump for some rtnetlink command: one is wanting data for a different namespace than the one the request is received and another is limiting the amount of data returned in the dump to a specific set of interest to userspace, reducing the cpu overhead of both kernel and userspace. Unfortunately, the kernel has historically not been strict with checking for the proper header or checking the values passed in the header. This lenient implementation has allowed iproute2 and other packages to pass any struct or data in the dump request as long as the family is the first byte. For example, ifinfomsg struct is used by iproute2 for all generic dump requests - links, addresses, routes and rules when it is really only valid for link requests. There is 1 is example where the kernel deals with the wrong struct: link dumps after VF support was added. Older iproute2 was sending rtgenmsg as the header instead of ifinfomsg so a patch was added to try and detect old userspace vs new: e5eca6d41f53 ("rtnetlink: fix userspace API breakage for iproute2 < v3.9.0") The latest example is Christian's patch set wanting to return addresses for a target namespace. It guesses the header struct is an ifaddrmsg and if it guesses wrong a netlink warning is generated in the kernel log on every address dump which is unacceptable. Another example where the kernel is a bit lenient is route dumps: iproute2 can send either a request with either ifinfomsg or a rtmsg as the header struct, yet the kernel always treats the header as an rtmsg (see inet_dump_fib and rtm_flags check). The header inconsistency impacts the ability to add kernel side filters for route dumps - a necessary feature for scale setups with 100k+ routes. How to resolve the problem of not breaking old userspace yet be able to move forward with new features such as kernel side filtering which are crucial for efficient operation at high scale? This patch set addresses the problem by adding a new socket flag, NETLINK_DUMP_STRICT_CHK, that userspace can use with setsockopt to request strict checking of headers and attributes on dump requests and hence unlock the ability to use kernel side filters as they are added. Kernel side, the dump handlers are updated to verify the message contains at least the expected header struct: RTM_GETLINK: ifinfomsg RTM_GETADDR: ifaddrmsg RTM_GETMULTICAST: ifaddrmsg RTM_GETANYCAST: ifaddrmsg RTM_GETADDRLABEL: ifaddrlblmsg RTM_GETROUTE: rtmsg RTM_GETSTATS: if_stats_msg RTM_GETNEIGH: ndmsg RTM_GETNEIGHTBL: ndtmsg RTM_GETNSID: rtgenmsg RTM_GETRULE: fib_rule_hdr RTM_GETNETCONF: netconfmsg RTM_GETMDB: br_port_msg And then every field in the header struct should be 0 with the exception of the family. There are a few exceptions to this rule where the kernel already influences the data returned by values in the struct. Next the message should not contain attributes unless the kernel implements filtering for it. Any unexpected data causes the dump to fail with EINVAL. If the new flag is honored by the kernel and the dump contents adjusted by any data passed in the request, the dump handler can set the NLM_F_DUMP_FILTERED flag in the netlink message header. For old userspace on new kernel there is no impact as all checks are wrapped in a check on the new strict flag. For new userspace on old kernel, the data in the headers and any appended attributes are silently ignored though the setsockopt failing is the clue to userspace the feature is not supported. New userspace on new kernel gets the requested data dump. iproute2 patches can be found here: https://github.com/dsahern/iproute2 dump-enhancements Major changes since v1 - inner header is supposed to be 4-bytes aligned. So for dumps that should not have attributes appended changed the check to use: if (nlmsg_attrlen(nlh, sizeof(hdr))) Only impacts patches with headers that are not multiples of 4-bytes (rtgenmsg, netconfmsg), but applied the change to all patches not calling nlmsg_parse for consistency. - Added nlmsg_parse_strict and nla_parse_strict for tighter control on attribute parsing. There should be no unknown attribute types or extra bytes. - Moved validation to a helper in most cases Changes since rfc-v2 - dropped the NLM_F_DUMP_FILTERED flag from target nsid dumps per Jiri's objections - changed the opt-in uapi from a netlink message flag to a socket flag. setsockopt provides an api for userspace to definitively know if the kernel supports strict checking on dumps. - re-ordered patches to peel off the extack on dumps if needed to keep this set size within limits - misc cleanups in patches based on testing ==================== Acked-by: Christian Brauner Signed-off-by: David S. Miller commit 8c6e137fbc7f207cd1e3f3080bfad0d4fd538254 Author: David Ahern Date: Sun Oct 7 20:16:44 2018 -0700 rtnetlink: Update rtnl_fdb_dump for strict data checking Update rtnl_fdb_dump for strict data checking. If the flag is set, the dump request is expected to have an ndmsg struct as the header potentially followed by one or more attributes. Any data passed in the header or as an attribute is taken as a request to influence the data returned. Only values supported by the dump handler are allowed to be non-0 or set in the request. At the moment only the NDA_IFINDEX and NDA_MASTER attributes are supported. Signed-off-by: David Ahern Acked-by: Christian Brauner Signed-off-by: David S. Miller commit 8dfbda19a21b30475b7e6dcf2141a98ed2a19af5 Author: David Ahern Date: Sun Oct 7 20:16:43 2018 -0700 rtnetlink: Move input checking for rtnl_fdb_dump to helper Move the existing input checking for rtnl_fdb_dump into a helper, valid_fdb_dump_legacy. This function will retain the current logic that works around the 2 headers that userspace has been allowed to send up to this point. Signed-off-by: David Ahern Acked-by: Christian Brauner Signed-off-by: David S. Miller commit c77b93641e7dc88ef4919d8126949e3ec3ffe407 Author: David Ahern Date: Sun Oct 7 20:16:42 2018 -0700 net/bridge: Update br_mdb_dump for strict data checking Update br_mdb_dump for strict data checking. If the flag is set, the dump request is expected to have a br_port_msg struct as the header. All elements of the struct are expected to be 0 and no attributes can be appended. Signed-off-by: David Ahern Acked-by: Christian Brauner Signed-off-by: David S. Miller commit addd383f5a0ba9bf8336be3cc8b7a2916c08a77a Author: David Ahern Date: Sun Oct 7 20:16:41 2018 -0700 net: Update netconf dump handlers for strict data checking Update inet_netconf_dump_devconf, inet6_netconf_dump_devconf, and mpls_netconf_dump_devconf for strict data checking. If the flag is set, the dump request is expected to have an netconfmsg struct as the header. The struct only has the family member and no attributes can be appended. Signed-off-by: David Ahern Acked-by: Christian Brauner Signed-off-by: David S. Miller commit f2ae64bb6ba5b6a6e2271094a03d098821f4a699 Author: David Ahern Date: Sun Oct 7 20:16:40 2018 -0700 net/ipv6: Update ip6addrlbl_dump for strict data checking Update ip6addrlbl_dump for strict data checking. If the flag is set, the dump request is expected to have an ifaddrlblmsg struct as the header. All elements of the struct are expected to be 0 and no attributes can be appended. Signed-off-by: David Ahern Acked-by: Christian Brauner Signed-off-by: David S. Miller commit 4a73e5e56d667e354926fe3f5f1aa75ff18bca51 Author: David Ahern Date: Sun Oct 7 20:16:39 2018 -0700 net/fib_rules: Update fib_nl_dumprule for strict data checking Update fib_nl_dumprule for strict data checking. If the flag is set, the dump request is expected to have fib_rule_hdr struct as the header. All elements of the struct are expected to be 0 and no attributes can be appended. Signed-off-by: David Ahern Acked-by: Christian Brauner Signed-off-by: David S. Miller commit f80f14c3649f491e23712a30f86b20b6069fb72e Author: David Ahern Date: Sun Oct 7 20:16:38 2018 -0700 net/namespace: Update rtnl_net_dumpid for strict data checking Update rtnl_net_dumpid for strict data checking. If the flag is set, the dump request is expected to have an rtgenmsg struct as the header which has the family as the only element. No data may be appended. Signed-off-by: David Ahern Signed-off-by: David S. Miller commit 9632d47f6a88f7f075347b66b88c60df7e9eae05 Author: David Ahern Date: Sun Oct 7 20:16:37 2018 -0700 net/neighbor: Update neightbl_dump_info for strict data checking Update neightbl_dump_info for strict data checking. If the flag is set, the dump request is expected to have an ndtmsg struct as the header. All elements of the struct are expected to be 0 and no attributes can be appended. Signed-off-by: David Ahern Acked-by: Christian Brauner Signed-off-by: David S. Miller commit 51183d233b5a5f1cfe2a782c86d6fcfc187173fe Author: David Ahern Date: Sun Oct 7 20:16:36 2018 -0700 net/neighbor: Update neigh_dump_info for strict data checking Update neigh_dump_info for strict data checking. If the flag is set, the dump request is expected to have an ndmsg struct as the header potentially followed by one or more attributes. Any data passed in the header or as an attribute is taken as a request to influence the data returned. Only values supported by the dump handler are allowed to be non-0 or set in the request. At the moment only the NDA_IFINDEX and NDA_MASTER attributes are supported. Existing code does not fail the dump if nlmsg_parse fails. That behavior is kept for non-strict checking. Signed-off-by: David Ahern Acked-by: Christian Brauner Signed-off-by: David S. Miller commit e8ba330ac0c55004e775eab53fa1e748e5d71bdb Author: David Ahern Date: Sun Oct 7 20:16:35 2018 -0700 rtnetlink: Update fib dumps for strict data checking Add helper to check netlink message for route dumps. If the strict flag is set the dump request is expected to have an rtmsg struct as the header. All elements of the struct are expected to be 0 with the exception of rtm_flags (which is used by both ipv4 and ipv6 dumps) and no attributes can be appended. rtm_flags can only have RTM_F_CLONED and RTM_F_PREFIX set. Update inet_dump_fib, inet6_dump_fib, mpls_dump_routes, ipmr_rtm_dumproute, and ip6mr_rtm_dumproute to call this helper if strict data checking is enabled. Signed-off-by: David Ahern Signed-off-by: David S. Miller commit 14fc5bb29fe78aaa1777cfee248339497e30c02e Author: David Ahern Date: Sun Oct 7 20:16:34 2018 -0700 rtnetlink: Update ipmr_rtm_dumplink for strict data checking Update ipmr_rtm_dumplink for strict data checking. If the flag is set, the dump request is expected to have an ifinfomsg struct as the header. All elements of the struct are expected to be 0 and no attributes can be appended. Signed-off-by: David Ahern Acked-by: Christian Brauner Signed-off-by: David S. Miller commit 786e0007e29a58f563bce744e958c692c7cbd435 Author: David Ahern Date: Sun Oct 7 20:16:33 2018 -0700 rtnetlink: Update inet6_dump_ifinfo for strict data checking Update inet6_dump_ifinfo for strict data checking. If the flag is set, the dump request is expected to have an ifinfomsg struct as the header. All elements of the struct are expected to be 0 and no attributes can be appended. Signed-off-by: David Ahern Acked-by: Christian Brauner Signed-off-by: David S. Miller commit 841891ec0c65d9ec81b3c56975d61ecc5b6ca365 Author: David Ahern Date: Sun Oct 7 20:16:32 2018 -0700 rtnetlink: Update rtnl_stats_dump for strict data checking Update rtnl_stats_dump for strict data checking. If the flag is set, the dump request is expected to have an if_stats_msg struct as the header. All elements of the struct are expected to be 0 except filter_mask which must be non-0 (legacy behavior). No attributes are supported. Signed-off-by: David Ahern Signed-off-by: David S. Miller commit 2d011be8c07b50e8b3699d06ee11af5f5914b09a Author: David Ahern Date: Sun Oct 7 20:16:31 2018 -0700 rtnetlink: Update rtnl_bridge_getlink for strict data checking Update rtnl_bridge_getlink for strict data checking. If the flag is set, the dump request is expected to have an ifinfomsg struct as the header potentially followed by one or more attributes. Any data passed in the header or as an attribute is taken as a request to influence the data returned. Only values supported by the dump handler are allowed to be non-0 or set in the request. At the moment only the IFLA_EXT_MASK attribute is supported. Signed-off-by: David Ahern Acked-by: Christian Brauner Signed-off-by: David S. Miller commit 905cf0abe8c2c892313f08e38d808eee4e794987 Author: David Ahern Date: Sun Oct 7 20:16:30 2018 -0700 rtnetlink: Update rtnl_dump_ifinfo for strict data checking Update rtnl_dump_ifinfo for strict data checking. If the flag is set, the dump request is expected to have an ifinfomsg struct as the header potentially followed by one or more attributes. Any data passed in the header or as an attribute is taken as a request to influence the data returned. Only values supported by the dump handler are allowed to be non-0 or set in the request. At the moment only the IFA_TARGET_NETNSID, IFLA_EXT_MASK, IFLA_MASTER, and IFLA_LINKINFO attributes are supported. Existing code does not fail the dump if nlmsg_parse fails. That behavior is kept for non-strict checking. Signed-off-by: David Ahern Acked-by: Christian Brauner Signed-off-by: David S. Miller commit ed6eff11790a5bf1ce9b0421667e46ab1cf368f4 Author: David Ahern Date: Sun Oct 7 20:16:29 2018 -0700 net/ipv6: Update inet6_dump_addr for strict data checking Update inet6_dump_addr for strict data checking. If the flag is set, the dump request is expected to have an ifaddrmsg struct as the header potentially followed by one or more attributes. Any data passed in the header or as an attribute is taken as a request to influence the data returned. Only values suppored by the dump handler are allowed to be non-0 or set in the request. At the moment only the IFA_TARGET_NETNSID attribute is supported. Follow on patches can add support for other fields (e.g., honor ifa_index and only return data for the given device index). Signed-off-by: David Ahern Acked-by: Christian Brauner Signed-off-by: David S. Miller commit c33078e3dfb194489b2f0875f078dc76647cfecf Author: David Ahern Date: Sun Oct 7 20:16:28 2018 -0700 net/ipv4: Update inet_dump_ifaddr for strict data checking Update inet_dump_ifaddr for strict data checking. If the flag is set, the dump request is expected to have an ifaddrmsg struct as the header potentially followed by one or more attributes. Any data passed in the header or as an attribute is taken as a request to influence the data returned. Only values supported by the dump handler are allowed to be non-0 or set in the request. At the moment only the IFA_TARGET_NETNSID attribute is supported. Follow on patches can support for other fields (e.g., honor ifa_index and only return data for the given device index). Signed-off-by: David Ahern Acked-by: Christian Brauner Signed-off-by: David S. Miller commit 89d35528d17d25819a755a2b52931e911baebc66 Author: David Ahern Date: Sun Oct 7 20:16:27 2018 -0700 netlink: Add new socket option to enable strict checking on dumps Add a new socket option, NETLINK_DUMP_STRICT_CHK, that userspace can use via setsockopt to request strict checking of headers and attributes on dump requests. To get dump features such as kernel side filtering based on data in the header or attributes appended to the dump request, userspace must call setsockopt() for NETLINK_DUMP_STRICT_CHK and a non-zero value. Since the netlink sock and its flags are private to the af_netlink code, the strict checking flag is passed to dump handlers via a flag in the netlink_callback struct. For old userspace on new kernel there is no impact as all of the data checks in later patches are wrapped in a check on the new strict flag. For new userspace on old kernel, the setsockopt will fail and even if new userspace sets data in the headers and appended attributes the kernel will silently ignore it. Moving forward when the setsockopt succeeds, the new userspace on old kernel means the dump request can pass an attribute the kernel does not understand. The dump will then fail as the older kernel does not understand it. New userspace on new kernel setting the socket option gets the benefit of the improved data dump. Kernel side the NETLINK_DUMP_STRICT_CHK uapi is converted to a generic NETLINK_F_STRICT_CHK flag which can potentially be leveraged for tighter checking on the NEW, DEL, and SET commands. Signed-off-by: David Ahern Acked-by: Christian Brauner Signed-off-by: David S. Miller commit 6ba1e6e856ab0531c5e0a5ecefc9fff8490d9a04 Author: David Ahern Date: Sun Oct 7 20:16:26 2018 -0700 net/ipv6: Refactor address dump to push inet6_fill_args to in6_dump_addrs Pull the inet6_fill_args arg up to in6_dump_addrs and move netnsid into it. Signed-off-by: David Ahern Acked-by: Christian Brauner Signed-off-by: David S. Miller commit a5f6cba291654168e6ab73c3e7ff5b27371c4cb9 Author: David Ahern Date: Sun Oct 7 20:16:25 2018 -0700 netlink: Add strict version of nlmsg_parse and nla_parse nla_parse is currently lenient on message parsing, allowing type to be 0 or greater than max expected and only logging a message "netlink: %d bytes leftover after parsing attributes in process `%s'." if the netlink message has unknown data at the end after parsing. What this could mean is that the header at the front of the attributes is actually wrong and the parsing is shifted from what is expected. Add a new strict version that actually fails with EINVAL if there are any bytes remaining after the parsing loop completes, if the atttrbitue type is 0 or greater than max expected. Signed-off-by: David Ahern Acked-by: Christian Brauner Signed-off-by: David S. Miller commit dac9c9790e542777079999900594fd069ba10489 Author: David Ahern Date: Sun Oct 7 20:16:24 2018 -0700 net: Add extack to nlmsg_parse Make sure extack is passed to nlmsg_parse where easy to do so. Most of these are dump handlers and leveraging the extack in the netlink_callback. Signed-off-by: David Ahern Acked-by: Christian Brauner Signed-off-by: David S. Miller commit 3d0d4337d7a105c5e8ba85c6e7b75437b4c6745e Author: David Ahern Date: Sun Oct 7 20:16:23 2018 -0700 netlink: Add extack message to nlmsg_parse for invalid header length Give a user a reason why EINVAL is returned in nlmsg_parse. Signed-off-by: David Ahern Acked-by: Christian Brauner Signed-off-by: David S. Miller commit 4a19edb60d0203cd5bf95a8b46ea8f63fd41194c Author: David Ahern Date: Sun Oct 7 20:16:22 2018 -0700 netlink: Pass extack to dump handlers Declare extack in netlink_dump and pass to dump handlers via netlink_callback. Add any extack message after the dump_done_errno allowing error messages to be returned. This will be useful when strict checking is done on dump requests, returning why the dump fails EINVAL. Signed-off-by: David Ahern Acked-by: Christian Brauner Signed-off-by: David S. Miller commit 272a66173bbc300abbb10d013fd80bb7ba6f43f0 Author: Gustavo A. R. Silva Date: Mon Oct 8 13:40:46 2018 +0200 isdn/gigaset: mark expected switch fall-throughs Replace "--v-- fall through --v--" with a proper "fall through" annotation. Also, change "bad cid: fall through" to "fall through - bad cid". This fix is part of the ongoing efforts to enabling -Wimplicit-fallthrough Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller commit 3f2122bbb2dfbb5a75b3cd3fdd0e0f9423187cc7 Merge: 67db8c3ebe92 a030598690c6 Author: David S. Miller Date: Mon Oct 8 10:33:36 2018 -0700 Merge branch 'net-sched-cls_u32-Various-improvements' Jamal Hadi Salim says: ==================== net: sched: cls_u32 Various improvements Various improvements from Al. Changes from version 1: Add missing commit ==================== Signed-off-by: David S. Miller commit a030598690c604c17b5288160d9d7b40274b2f79 Author: Al Viro Date: Mon Oct 8 06:22:44 2018 -0400 net: sched: cls_u32: simplify the hell out u32_delete() emptiness check Now that we have the knode count, we can instantly check if any hnodes are non-empty. And that kills the check for extra references to root hnode - those could happen only if there was a knode to carry such a link. Signed-off-by: Al Viro Signed-off-by: Jamal Hadi Salim Signed-off-by: David S. Miller commit b245d32c995868879f361d252f32bb8a2ca33deb Author: Al Viro Date: Mon Oct 8 06:22:43 2018 -0400 net: sched: cls_u32: keep track of knodes count in tc_u_common allows to simplify u32_delete() considerably Signed-off-by: Al Viro Signed-off-by: Jamal Hadi Salim Signed-off-by: David S. Miller commit 8a8065f6836b4be114ff193248386f339a0c28f3 Author: Al Viro Date: Mon Oct 8 06:22:42 2018 -0400 net: sched: cls_u32: get rid of tp_c Both hnode ->tp_c and tp_c argument of u32_set_parms() the latter is redundant, the former - never read... Signed-off-by: Al Viro Signed-off-by: Jamal Hadi Salim Signed-off-by: David S. Miller commit db04ff4863bf439500036b1882a9f2236f3c1d76 Author: Al Viro Date: Mon Oct 8 06:22:41 2018 -0400 net: sched: cls_u32: the tp_c argument of u32_set_parms() is always tp->data It must be tc_u_common associated with that tp (i.e. tp->data). Proof: * both ->ht_up and ->tp_c are assign-once * ->tp_c of anything inserted into tp_c->hlist is tp_c * hnodes never get reinserted into the lists or moved between those, so anything found by u32_lookup_ht(tp->data, ...) will have ->tp_c equal to tp->data. * tp->root->tp_c == tp->data. * ->ht_up of anything inserted into hnode->ht[...] is equal to hnode. * knodes never get reinserted into hash chains or moved between those, so anything returned by u32_lookup_key(ht, ...) will have ->ht_up equal to ht. * any knode returned by u32_get(tp, ...) will have ->ht_up->tp_c point to tp->data Signed-off-by: Al Viro Signed-off-by: Jamal Hadi Salim Signed-off-by: David S. Miller commit 18512f5c255fcdf5589b8f59a97aa0f3fc19aaa5 Author: Al Viro Date: Mon Oct 8 06:22:40 2018 -0400 net: sched: cls_u32: pass tc_u_common to u32_set_parms() instead of tc_u_hnode the only thing we used ht for was ht->tp_c and callers can get that without going through ->tp_c at all; start with lifting that into the callers, next commits will massage those, eventually removing ->tp_c altogether. Signed-off-by: Al Viro Signed-off-by: Jamal Hadi Salim Signed-off-by: David S. Miller commit 4895c42f62f20d4eb7c4c8bd40a7b294506154ec Author: Al Viro Date: Mon Oct 8 06:22:39 2018 -0400 net: sched: cls_u32: clean tc_u_common hashtable * calculate key *once*, not for each hash chain element * let tc_u_hash() return the pointer to chain head rather than index - callers are cleaner that way. Signed-off-by: Al Viro Signed-off-by: Jamal Hadi Salim Signed-off-by: David S. Miller commit 07743ca5c9695f0d5e8079f82d2f2f3b92cc138d Author: Al Viro Date: Mon Oct 8 06:22:38 2018 -0400 net: sched: cls_u32: get rid of tc_u_common ->rcu unused Signed-off-by: Al Viro Signed-off-by: Jamal Hadi Salim Signed-off-by: David S. Miller commit ec17caf078c7e4c39dcd7d46a13e31640dc60a19 Author: Al Viro Date: Mon Oct 8 06:22:37 2018 -0400 net: sched: cls_u32: get rid of tc_u_knode ->tp not used anymore Signed-off-by: Al Viro Signed-off-by: Jamal Hadi Salim Signed-off-by: David S. Miller commit dc07c5736325fbc771133394b92c47212367cd03 Author: Al Viro Date: Mon Oct 8 06:22:36 2018 -0400 net: sched: cls_u32: get rid of unused argument of u32_destroy_key() Signed-off-by: Al Viro Signed-off-by: Jamal Hadi Salim Signed-off-by: David S. Miller commit 2f0c982df7b146f9aa695ede91b48392ab4c3217 Author: Al Viro Date: Mon Oct 8 06:22:35 2018 -0400 net: sched: cls_u32: make sure that divisor is a power of 2 Tested by modifying iproute2 to allow sending a divisor > 255 Tested-by: Jamal Hadi Salim Signed-off-by: Al Viro Signed-off-by: Jamal Hadi Salim Signed-off-by: David S. Miller commit 27594ec4b6a7035450ba43624d1648cbd2c0aaea Author: Al Viro Date: Mon Oct 8 06:22:34 2018 -0400 net: sched: cls_u32: disallow linking to root hnode Operation makes no sense. Nothing will actually break if we do so (depth limit in u32_classify() will prevent infinite loops), but according to maintainers it's best prohibited outright. NOTE: doing so guarantees that u32_destroy() will trigger the call of u32_destroy_hnode(); we might want to make that unconditional. Test: tc qdisc add dev eth0 ingress tc filter add dev eth0 parent ffff: protocol ip prio 100 u32 \ link 800: offset at 0 mask 0f00 shift 6 plus 0 eat match ip protocol 6 ff should fail with Error: cls_u32: Not linking to root node Signed-off-by: Al Viro Signed-off-by: Jamal Hadi Salim Signed-off-by: David S. Miller commit b44ef84542dd79aeacd09d43e073e25a1bb1f407 Author: Al Viro Date: Mon Oct 8 06:22:33 2018 -0400 net: sched: cls_u32: mark root hnode explicitly ... and produce consistent error on attempt to delete such. Existing check in u32_delete() is inconsistent - after tc qdisc add dev eth0 ingress tc filter add dev eth0 parent ffff: protocol ip prio 100 handle 1: u32 \ divisor 1 tc filter add dev eth0 parent ffff: protocol ip prio 200 handle 2: u32 \ divisor 1 both tc filter delete dev eth0 parent ffff: protocol ip prio 100 handle 801: u32 and tc filter delete dev eth0 parent ffff: protocol ip prio 100 handle 800: u32 will fail (at least with refcounting fixes), but the former will complain about an attempt to remove a busy table, while the latter will recognize it as root and yield "Not allowed to delete root node" instead. The problem with the existing check is that several tcf_proto instances might share the same tp->data and handle-to-hnode lookup will be the same for all of them. So comparing an hnode to be deleted with tp->root won't catch the case when one tp is used to try deleting the root of another. Solution is trivial - mark the root hnodes explicitly upon allocation and check for that. Signed-off-by: Al Viro Signed-off-by: Jamal Hadi Salim Signed-off-by: David S. Miller commit 67db8c3ebe92e74e138754162c78276fd263ee50 Merge: 26faf0e7bd31 00d70d8e0e78 Author: David S. Miller Date: Mon Oct 8 10:31:28 2018 -0700 Merge branch 'net-phy-mscc-add-support-for-VSC8584-and-VSC8574-Microsemi-quad-port-PHYs' Quentin Schulz says: ==================== net: phy: mscc: add support for VSC8584 and VSC8574 Microsemi quad-port PHYs RESEND: rebased on top of latest net-next and on top of latest version of "net: phy: mscc: various improvements to Microsemi PHY driver" patch series. Both PHYs are 4-port PHY that are 10/100/1000BASE-T, 100BASE-FX, 1000BASE-X and triple-speed copper SFP capable, can communicate with the MAC via SGMII, QSGMII or 1000BASE-X, supports downshifting and can set the blinking pattern of each of its 4 LEDs, supports SyncE as well as HP Auto-MDIX detection. VSC8574 supports WOL and VSC8584 supports hardware offloading of MACsec. This patch series add support for 10/100/1000BASE-T, SGMII/QSGMII link with the MAC, downshifting, HP Auto-MDIX detection and blinking pattern for their 4 LEDs. They have also an internal Intel 8051 microcontroller whose firmware needs to be patched when the PHY is reset. If the 8051's firmware has the expected CRC, its patching can be skipped. The microcontroller can be accessed from any port of the PHY, though the CRC function can only be done through the PHY that is the base PHY of the package (internal address 0) due to a limitation of the firmware. The GPIO register bank is a set of registers that are common to all PHYs in the package. So any modification in any register of this bank affects all PHYs of the package. If the PHYs haven't been reset before booting the Linux kernel and were configured to use interrupts for e.g. link status updates, it is required to clear the interrupts mask register of all PHYs before being able to use interrupts with any PHY. The first PHY of the package that will be init will take care of clearing all PHYs interrupts mask registers. Thus, we need to keep track of the init sequence in the package, if it's already been done or if it's to be done. Most of the init sequence of a PHY of the package is common to all PHYs in the package, thus we use the SMI broadcast feature which enables us to propagate a write in one register of one PHY to all PHYs in the same package. We also introduce a new development board called PCB120 which exists in variants for VSC8584 and VSC8574 (and that's the only difference to the best of my knowledge). I suggest patches 1 to 3 go through net tree and patches 4 and 5 go through MIPS tree. Patches going through net tree and those going through MIPS tree do not depend on one another. This patch series depends on this patch series: (https://lore.kernel.org/lkml/20181008100728.24959-1-quentin.schulz@bootlin.com/) ==================== Signed-off-by: David S. Miller commit 00d70d8e0e7811ed8acba24e04b9f193c3b84beb Author: Quentin Schulz Date: Mon Oct 8 12:14:43 2018 +0200 net: phy: mscc: add support for VSC8574 PHY The VSC8574 PHY is a 4-ports PHY that is 10/100/1000BASE-T, 100BASE-FX, 1000BASE-X and triple-speed copper SFP capable, can communicate with the MAC via SGMII, QSGMII or 1000BASE-X, supports WOL, downshifting and can set the blinking pattern of each of its 4 LEDs, supports SyncE as well as HP Auto-MDIX detection. This adds support for 10/100/1000BASE-T, SGMII/QSGMII link with the MAC, WOL, downshifting, HP Auto-MDIX detection and blinking pattern for its 4 LEDs. The VSC8574 has also an internal Intel 8051 microcontroller whose firmware needs to be patched when the PHY is reset. If the 8051's firmware has the expected CRC, its patching can be skipped. The microcontroller can be accessed from any port of the PHY, though the CRC function can only be done through the PHY that is the base PHY of the package (internal address 0) due to a limitation of the firmware. The GPIO register bank is a set of registers that are common to all PHYs in the package. So any modification in any register of this bank affects all PHYs of the package. If the PHYs haven't been reset before booting the Linux kernel and were configured to use interrupts for e.g. link status updates, it is required to clear the interrupts mask register of all PHYs before being able to use interrupts with any PHY. The first PHY of the package that will be init will take care of clearing all PHYs interrupts mask registers. Thus, we need to keep track of the init sequence in the package, if it's already been done or if it's to be done. Most of the init sequence of a PHY of the package is common to all PHYs in the package, thus we use the SMI broadcast feature which enables us to propagate a write in one register of one PHY to all PHYs in the same package. Signed-off-by: Quentin Schulz Signed-off-by: David S. Miller commit a5afc1678044a3eea48f0295ae7bc2b13d59b128 Author: Quentin Schulz Date: Mon Oct 8 12:14:42 2018 +0200 net: phy: mscc: add support for VSC8584 PHY The VSC8584 PHY is a 4-ports PHY that is 10/100/1000BASE-T, 100BASE-FX, 1000BASE-X and triple-speed copper SFP capable, can communicate with the MAC via SGMII, QSGMII or 1000BASE-X, supports downshifting and can set the blinking pattern of each of its 4 LEDs, supports hardware offloading of MACsec and supports SyncE as well as HP Auto-MDIX detection. This adds support for 10/100/1000BASE-T, SGMII/QSGMII link with the MAC, downshifting, HP Auto-MDIX detection and blinking pattern for its 4 LEDs. The VSC8584 has also an internal Intel 8051 microcontroller whose firmware needs to be patched when the PHY is reset. If the 8051's firmware has the expected CRC, its patching can be skipped. The microcontroller can be accessed from any port of the PHY, though the CRC function can only be done through the PHY that is the base PHY of the package (internal address 0) due to a limitation of the firmware. The GPIO register bank is a set of registers that are common to all PHYs in the package. So any modification in any register of this bank affects all PHYs of the package. If the PHYs haven't been reset before booting the Linux kernel and were configured to use interrupts for e.g. link status updates, it is required to clear the interrupts mask register of all PHYs before being able to use interrupts with any PHY. The first PHY of the package that will be init will take care of clearing all PHYs interrupts mask registers. Thus, we need to keep track of the init sequence in the package, if it's already been done or if it's to be done. Most of the init sequence of a PHY of the package is common to all PHYs in the package, thus we use the SMI broadcast feature which enables us to propagate a write in one register of one PHY to all PHYs in the same package. The revA of the VSC8584 PHY (which is not and will not be publicly released) should NOT patch the firmware of the microcontroller or it'll make things worse, the easiest way is just to not support it. Signed-off-by: Quentin Schulz Signed-off-by: David S. Miller commit 9494a6c2e4f6ce21a1e6885145171f90c4492131 Author: Quentin Schulz Date: Mon Oct 8 12:14:41 2018 +0200 dt-bindings: net: vsc8531: add two additional LED modes for VSC8584 The VSC8584 (and most likely other PHYs in the same generation) has two additional LED modes that can be picked, so let's add them. Reviewed-by: Rob Herring Reviewed-by: Florian Fainelli Reviewed-by: Andrew Lunn Signed-off-by: Quentin Schulz Signed-off-by: David S. Miller commit bbbab191c2c474d183e93799d008b412e97f5936 Author: Steven Rostedt (VMware) Date: Fri Oct 5 12:18:16 2018 -0400 tools lib traceevent: Separate out tep_strerror() for strerror_r() issues While working on having PowerTop use libtracevent as a shared object library, Tzvetomir hit "str_error_r not defined". This was added by commit c3cec9e68f12d ("tools lib traceevent: Use str_error_r()") because strerror_r() has two definitions, where one is GNU specific, and the other is XSI complient. The strerror_r() is in a wrapper str_error_r() to keep the code from having to worry about which compiler is being used. The problem is that str_error_r() is external to libtraceevent, and not part of the library. If it is used as a shared object then the tools using it will need to define that function. I do not want that function defined in libtraceevent itself, as it is out of scope for that library. As there's only a single instance of this call, and its in the traceevent library's own tep_strerror() function, we can copy what was done in perf, and create yet another external file that undefs _GNU_SOURCE to use the more portable version of the function. We don't need to worry about the errors that strerror_r() returns. If the buffer isn't big enough, we simply truncate it. Reported-by: Tzvetomir Stoyanov Signed-off-by: Steven Rostedt (VMware) Cc: Jiri Olsa Cc: Namhyung Kim Cc: Tzvetomir Stoyanov (VMware) Cc: linux trace devel Link: http://lkml.kernel.org/r/20181005121816.484e654f@gandalf.local.home Signed-off-by: Arnaldo Carvalho de Melo commit 8b2f245faa6238e28a1d801e8633515251d1acfc Author: Eduardo Habkost Date: Fri Oct 5 17:40:58 2018 -0300 perf python: More portable way to make CFLAGS work with clang The existing code that tries to make CFLAGS compatible with clang doesn't work with Python 3. Instead of trying to touch _sysconfigdata.build_time_vars directly, change the dictionary returned by disutils.sysconfig.get_config_vars(). This works on both Python 2 and Python 3. Signed-off-by: Eduardo Habkost Reported-by: Arnaldo Carvalho de Melo Tested-by: Arnaldo Carvalho de Melo Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/r/20181005204058.7966-3-ehabkost@redhat.com Signed-off-by: Arnaldo Carvalho de Melo commit e13a5d69c31d35538e80176d54d95b6addf4dcbf Author: Eduardo Habkost Date: Fri Oct 5 17:40:57 2018 -0300 perf python: Make clang_has_option() work on Python 3 Use a bytes literal so it works with Python 3's version of Popen(). Note that the b"..." syntax requires Python 2.6+. Signed-off-by: Eduardo Habkost Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/r/20181005204058.7966-2-ehabkost@redhat.com Signed-off-by: Arnaldo Carvalho de Melo commit 26faf0e7bd316c6a6a5d3b74356424e4c25e2c9f Merge: 590ac2ffde32 629ea0f14080 Author: David S. Miller Date: Mon Oct 8 10:29:21 2018 -0700 Merge branch 'net-phy-mscc-various-improvements-to-Microsemi-PHY-driver' Quentin Schulz says: ==================== net: phy: mscc: various improvements to Microsemi PHY driver The Microsemi PHYs have multiple banks of registers (called pages). Registers can only be accessed from one page, if we need a register from another page, we need to switch the page and the registers of all other pages are not accessible anymore. Basically, to read register 5 from page 0, 1, 2, etc., you do the same phy_read(phydev, 5); but you need to set the desired page beforehand. In order to guarantee that two concurrent functions do not change the page, we need to do some locking per page. This can be achieved with the use of phy_select_page and phy_restore_page functions but phy_write/read calls in-between those two functions shall be replaced by their lock-free alternative __phy_write/read. The Microsemi PHYs have several counters so let's make them available as PHY statistics. The VSC 8530/31/40/41 also need to update their EEE init sequence in order to avoid packet losses and improve performance. This patch series also makes some minor cosmetic changes to the driver. v3: - add reviewed-by, - use phy_read/write/modify_paged whenever possible instead of the combo phy_select_page, __phy_read/write/modify, phy_restore_page when only one __phy_read/write/modify was executed, v2: - add patch to migrate MSCC driver to use phy_restore/select_page, - migrate all patches from v1 to use those two functions, - put the multiple lines of constants writes in an array and iterate over it to write the values, - add reviewed-bys, ==================== Signed-off-by: David S. Miller commit 629ea0f14080ce1393219904ed1ecbaacf70ab22 Author: Quentin Schulz Date: Mon Oct 8 12:07:28 2018 +0200 net: phy: mscc: remove unneeded temporary variable Here, the rc variable is either used only for the condition right after the assignment or right before being used as the return value of the function it's being used in. So let's remove this unneeded temporary variable whenever possible. Reviewed-by: Florian Fainelli Reviewed-by: Andrew Lunn Signed-off-by: Quentin Schulz Signed-off-by: David S. Miller commit 6f0430c78c05ce288f0ead7d440233a0fb9cac31 Author: Quentin Schulz Date: Mon Oct 8 12:07:27 2018 +0200 net: phy: mscc: shorten `x != 0` condition to `x` `if (x != 0)` is basically a more verbose version of `if (x)` so let's use the latter so it's consistent throughout the whole driver. Reviewed-by: Florian Fainelli Reviewed-by: Andrew Lunn Signed-off-by: Quentin Schulz Signed-off-by: David S. Miller commit b7d373c500cf4009d78db62329c3b7cfba111713 Author: Quentin Schulz Date: Mon Oct 8 12:07:26 2018 +0200 net: phy: mscc: remove unneeded parenthesis The == operator precedes the || operator, so we can remove the parenthesis around (a == b) || (c == d). The condition is rather explicit and short so removing the parenthesis definitely does not make it harder to read. Reviewed-by: Florian Fainelli Reviewed-by: Andrew Lunn Signed-off-by: Quentin Schulz Signed-off-by: David S. Miller commit 96dae01f27fea4e67aabc1f77e78f0333f73e0a7 Author: Raju Lakkaraju Date: Mon Oct 8 12:07:25 2018 +0200 net: phy: mscc: Add EEE init sequence Microsemi PHYs (VSC 8530/31/40/41) need to update the Energy Efficient Ethernet initialization sequence. In order to avoid certain link state errors that could result in link drops and packet loss, the physical coding sublayer (PCS) must be updated with settings related to EEE in order to improve performance. Reviewed-by: Florian Fainelli Signed-off-by: Raju Lakkaraju Signed-off-by: Quentin Schulz Signed-off-by: David S. Miller commit f76178dc5218a135726fdad45074413381d1bfca Author: Raju Lakkaraju Date: Mon Oct 8 12:07:24 2018 +0200 net: phy: mscc: add ethtool statistics counters There are a few counters available in the PHY: receive errors, false carriers, link disconnects, media CRC errors and valids counters. So let's expose those in the PHY driver. Use the priv structure as the next PHY to be supported has a few additional counters. Reviewed-by: Andrew Lunn Signed-off-by: Raju Lakkaraju Signed-off-by: Quentin Schulz Signed-off-by: David S. Miller commit 6a0bfbbe20b0ce8bb0ee149ecea620a56fe038e4 Author: Quentin Schulz Date: Mon Oct 8 12:07:23 2018 +0200 net: phy: mscc: migrate to phy_select/restore_page functions The Microsemi PHYs have multiple banks of registers (called pages). Registers can only be accessed from one page, if we need a register from another page, we need to switch the page and the registers of all other pages are not accessible anymore. Basically, to read register 5 from page 0, 1, 2, etc., you do the same phy_read(phydev, 5); but you need to set the desired page beforehand. In order to guarantee that two concurrent functions do not change the page, we need to do some locking per page. This can be achieved with the use of phy_select_page and phy_restore_page functions but phy_write/read calls in-between those two functions shall be replaced by their lock-free alternative __phy_write/read. Let's migrate this driver to those functions. Suggested-by: Andrew Lunn Signed-off-by: Quentin Schulz Signed-off-by: David S. Miller commit ca55b7185b74e73d2b39dc40efaf96100a2582cd Author: pascal paillet Date: Mon Oct 8 16:29:40 2018 +0000 regulator: stpmic1: add stpmic1 regulator driver The stpmic1 PMIC embeds several regulators and switches with different capabilities. Signed-off-by: pascal paillet Signed-off-by: Mark Brown commit 1e44224fb0528b4c0cc176bde2bb31e9127eb14b Author: Sanskriti Sharma Date: Tue Oct 2 10:29:14 2018 -0400 perf tools: Free temporary 'sys' string in read_event_files() For each system in a given pevent, read_event_files() reads in a temporary 'sys' string. Be sure to free this string before moving onto to the next system and/or leaving read_event_files(). Fixes the following coverity complaints: Error: RESOURCE_LEAK (CWE-772): tools/perf/util/trace-event-read.c:343: overwrite_var: Overwriting "sys" in "sys = read_string()" leaks the storage that "sys" points to. tools/perf/util/trace-event-read.c:353: leaked_storage: Variable "sys" going out of scope leaks the storage it points to. Signed-off-by: Sanskriti Sharma Reviewed-by: Jiri Olsa Cc: Joe Lawrence Link: http://lkml.kernel.org/r/1538490554-8161-6-git-send-email-sansharm@redhat.com Signed-off-by: Arnaldo Carvalho de Melo commit 470c8f7c88de013d266e1b61044efe8937728b7f Author: Sanskriti Sharma Date: Tue Oct 2 10:29:13 2018 -0400 perf tools: Avoid double free in read_event_file() The temporary 'buf' buffer allocated in read_event_file() may be freed twice. Move the free() call to the common function exit point. Fixes the following coverity complaints: Error: USE_AFTER_FREE (CWE-825): tools/perf/util/trace-event-read.c:309: double_free: Calling "free" frees pointer "buf" which has already been freed. Signed-off-by: Sanskriti Sharma Reviewed-by: Jiri Olsa Cc: Joe Lawrence Link: http://lkml.kernel.org/r/1538490554-8161-5-git-send-email-sansharm@redhat.com Signed-off-by: Arnaldo Carvalho de Melo commit 9c8a182e5a73e01afd11742a2ab887bf338fdafd Author: Sanskriti Sharma Date: Tue Oct 2 10:29:12 2018 -0400 perf tools: Free 'printk' string in parse_ftrace_printk() parse_ftrace_printk() tokenizes and parses a line, calling strdup() each iteration. Add code to free this temporary format string duplicate. Fixes the following coverity complaints: Error: RESOURCE_LEAK (CWE-772): tools/perf/util/trace-event-parse.c:158: overwrite_var: Overwriting "printk" in "printk = strdup(fmt + 1)" leaks the storage that "printk" points to. tools/perf/util/trace-event-parse.c:162: leaked_storage: Variable "printk" going out of scope leaks the storage it points to. Signed-off-by: Sanskriti Sharma Reviewed-by: Jiri Olsa Cc: Joe Lawrence Link: http://lkml.kernel.org/r/1538490554-8161-4-git-send-email-sansharm@redhat.com Signed-off-by: Arnaldo Carvalho de Melo commit faedbf3fd19f2511a39397f76359e4cc6ee93072 Author: Sanskriti Sharma Date: Tue Oct 2 10:29:11 2018 -0400 perf tools: Cleanup trace-event-info 'tdata' leak Free tracing_data structure in tracing_data_get() error paths. Fixes the following coverity complaint: Error: RESOURCE_LEAK (CWE-772): leaked_storage: Variable "tdata" going out of scope leaks the storage Signed-off-by: Sanskriti Sharma Reviewed-by: Jiri Olsa Cc: Joe Lawrence Link: http://lkml.kernel.org/r/1538490554-8161-3-git-send-email-sansharm@redhat.com Signed-off-by: Arnaldo Carvalho de Melo commit ce49d8436cffa9b7a6a5f110879d53e89dbc6746 Author: Sanskriti Sharma Date: Tue Oct 2 10:29:10 2018 -0400 perf strbuf: Match va_{add,copy} with va_end Ensure that all code paths in strbuf_addv() call va_end() on the ap_saved copy that was made. Fixes the following coverity complaint: Error: VARARGS (CWE-237): [#def683] tools/perf/util/strbuf.c:106: missing_va_end: va_end was not called for "ap_saved". Signed-off-by: Sanskriti Sharma Reviewed-by: Jiri Olsa Cc: Joe Lawrence Link: http://lkml.kernel.org/r/1538490554-8161-2-git-send-email-sansharm@redhat.com Signed-off-by: Arnaldo Carvalho de Melo commit 0e24147d69c9357b1ccb54a9bc028eb9a9f9ed1a Author: Thomas Richter Date: Fri Sep 28 12:53:35 2018 +0200 perf test: S390 does not support watchpoints in test 22 S390 does not support the perf_event_open system call for attribute type PERF_TYPE_BREAKPOINT. This results in test failure for test 22: [root@s8360046 perf]# ./perf test 22 22: Watchpoint : 22.1: Read Only Watchpoint : FAILED! 22.2: Write Only Watchpoint : FAILED! 22.3: Read / Write Watchpoint : FAILED! 22.4: Modify Watchpoint : FAILED! [root@s8360046 perf]# Add s390 support to avoid these tests being executed on s390 platform: [root@s8360046 perf]# ./perf test 22 [root@s8360046 perf]# ./perf test -v 22 22: Watchpoint : Disabled [root@s8360046 perf]# Signed-off-by: Thomas Richter Reviewed-by: Ravi Bangoria Cc: Heiko Carstens Cc: Hendrik Brueckner Cc: Martin Schwidefsky Link: http://lkml.kernel.org/r/20180928105335.67179-1-tmricht@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo commit 291ed51deee49ff35d0824fb7050538b449964d6 Author: Arnaldo Carvalho de Melo Date: Tue Sep 25 11:52:10 2018 -0300 perf auxtrace: Include missing asm/bitsperlong.h to get BITS_PER_LONG The auxtrace.h header references BITS_PER_LONG without including the header where it is defined, getting it by luck from some other header, fix it. Cc: Adrian Hunter Cc: Alexander Sverdlin Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-v04ydmbh7tvpcctf3zld9j9s@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit ba4aa02b417f08a0bee5e7b8ed70cac788a7c854 Author: Arnaldo Carvalho de Melo Date: Tue Sep 25 10:55:59 2018 -0300 tools include: Adopt linux/bits.h So that we reduce the difference of tools/include/linux/bitops.h to the original kernel file, include/linux/bitops.h, trying to remove the need to define BITS_PER_LONG, to avoid clashes with asm/bitsperlong.h. And the things removed from tools/include/linux/bitops.h are really in linux/bits.h, so that we can have a copy and then tools/perf/check_headers.sh will tell us when new stuff gets added to linux/bits.h so that we can check if it is useful and if any adjustment needs to be done to the tools/{include,arch}/ copies. Cc: Adrian Hunter Cc: Alexander Sverdlin Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-y1sqyydvfzo0bjjoj4zsl562@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 590ac2ffde325da25371e169fc71826f2d118b6b Author: Yangbo Lu Date: Mon Oct 8 15:44:30 2018 +0800 net: dpaa2: fix and improve dpaa2-ptp driver This patch is to fix and improve dpaa2-ptp driver in some places. - Fixed the return for some functions. - Replaced kzalloc with devm_kzalloc. - Removed dev_set_drvdata(dev, NULL). - Made ptp_dpaa2_caps const. Signed-off-by: Yangbo Lu Signed-off-by: David S. Miller commit 15b49f360c7a4f91eace4f601b4d669a1b248c7c Author: Yangbo Lu Date: Mon Oct 8 15:44:29 2018 +0800 net: dpaa2: remove unused code for dprtc This patch is to removed unused code for dprtc. This code will be re-added along with more features of dpaa2-ptp added. Signed-off-by: Yangbo Lu Signed-off-by: David S. Miller commit 180f539d751a7a96da3f266e5dc8d167df77e3fa Author: Yangbo Lu Date: Mon Oct 8 15:44:28 2018 +0800 net: dpaa2: rename rtc as ptp in dpaa2-ptp driver In dpaa2-ptp driver, it's odd to use rtc in names of some functions and structures except these dprtc APIs. This patch is to use ptp instead of rtc in names. Signed-off-by: Yangbo Lu Signed-off-by: David S. Miller commit 58b1e729b33acc558f2abb9e1e0178f060685c57 Author: Yangbo Lu Date: Mon Oct 8 15:44:27 2018 +0800 net: dpaa2: fix dependency of config FSL_DPAA2_ETH The NETDEVICES dependency and ETHERNET dependency hadn't been required since dpaa2-eth was moved out of staging. Also allowed COMPILE_TEST for dpaa2-eth. Signed-off-by: Yangbo Lu Signed-off-by: David S. Miller commit 82beb598650080a34554b816a2805b40c73ff713 Author: Yangbo Lu Date: Mon Oct 8 15:44:26 2018 +0800 MAINTAINERS: update files maintained under DPAA2 PTP/ETHERNET The files maintained under DPAA2 PTP/ETHERNET needs to be updated since dpaa2 ptp driver had been moved into drivers/net/ethernet/freescale/dpaa2/. Signed-off-by: Yangbo Lu Signed-off-by: David S. Miller commit 0a006a2f894018c9042772833a0ca077c31d4f78 Author: Yangbo Lu Date: Mon Oct 8 15:44:25 2018 +0800 net: dpaa2: move DPAA2 PTP driver out of staging/ This patch is to move DPAA2 PTP driver out of staging/ since the dpaa2-eth had been moved out. Signed-off-by: Yangbo Lu Signed-off-by: David S. Miller commit dbd1709f7697932c8e24883dbf6025adc9fe6ff9 Author: pascal paillet Date: Mon Oct 8 16:29:40 2018 +0000 dt-bindings: regulator: document stpmic1 pmic regulators The STPMIC1 regulators supply power to the application processor as well as to the external system peripherals such as DDR, Flash memories and system devices. Signed-off-by: pascal paillet Signed-off-by: Mark Brown commit 6200cc5ee2baa573e7ac4dbcfca750e0b777c37d Author: Keith Busch Date: Tue Sep 18 17:58:46 2018 -0600 PCI/AER: Use threaded IRQ for bottom half The threaded IRQ is naturally single threaded as desired, so use that to simplify the AER bottom half handler. Since the root port structure has much less to do now, remove the rpc construction helper routine. Signed-off-by: Keith Busch Signed-off-by: Bjorn Helgaas commit ecae65e133f2e0647e6364d691130ff551382d91 Author: Keith Busch Date: Tue Sep 18 17:58:44 2018 -0600 PCI/AER: Use kfifo_in_spinlocked() to insert locked elements Use the recommended kernel API for writing to a concurrently-accessed kfifo. No functional change here. Signed-off-by: Keith Busch Signed-off-by: Bjorn Helgaas commit 27c1ce8bbed7e7f0e4a87cf4a93f09be26d62ada Author: Keith Busch Date: Tue Sep 18 17:58:43 2018 -0600 PCI/AER: Use kfifo for tracking events instead of reimplementing it The kernel provides a generic FIFO implementation, so no need to reinvent that capability in a driver. Replace the AER-specific implementation with the kernel-provided kfifo. Since the interrupt handler producer and work queue consumer run single threaded, there is no need for additional locking, so remove that lock, too. Signed-off-by: Keith Busch Signed-off-by: Bjorn Helgaas commit fcd4d369034a819aa393f65c3a8f58db9ab5ed2a Author: Keith Busch Date: Tue Sep 18 17:58:42 2018 -0600 PCI/AER: Remove error source from AER struct aer_rpc The AER struct aer_rpc was carrying a copy of the error source simply as a temperary variable. Remove that from the structure and use a stack variable for the purpose. Signed-off-by: Keith Busch Signed-off-by: Bjorn Helgaas commit 3e41a317ae456bbd7ae08d03746024ec29a7bf31 Author: Keith Busch Date: Tue Sep 18 17:58:41 2018 -0600 PCI/AER: Remove unused aer_error_resume() The error recovery callbacks are only run on child devices. A Root Port is never a child device, so this error resume callback was never invoked. Signed-off-by: Keith Busch Signed-off-by: Bjorn Helgaas commit 36e765392e48e0322222347c4d21078c0b94758c Author: Ming Lei Date: Fri Sep 28 16:42:20 2018 +0800 blk-mq: complete req in softirq context in case of single queue Lot of controllers may have only one irq vector for completing IO request. And usually affinity of the only irq vector is all possible CPUs, however, on most of ARCH, there may be only one specific CPU for handling this interrupt. So if all IOs are completed in hardirq context, it is inevitable to degrade IO performance because of increased irq latency. This patch tries to address this issue by allowing to complete request in softirq context, like the legacy IO path. IOPS is observed as ~13%+ in the following randread test on raid0 over virtio-scsi. mdadm --create --verbose /dev/md0 --level=0 --chunk=1024 --raid-devices=8 /dev/sdb /dev/sdc /dev/sdd /dev/sde /dev/sdf /dev/sdg /dev/sdh /dev/sdi fio --time_based --name=benchmark --runtime=30 --filename=/dev/md0 --nrfiles=1 --ioengine=libaio --iodepth=32 --direct=1 --invalidate=1 --verify=0 --verify_fatal=0 --numjobs=32 --rw=randread --blocksize=4k Cc: Dongli Zhang Cc: Zach Marano Cc: Christoph Hellwig Cc: Bart Van Assche Cc: Jianchao Wang Signed-off-by: Ming Lei Signed-off-by: Jens Axboe commit eb1ca9a428fdc3f98be4898f6cd8bcb803878619 Author: Nathan Chancellor Date: Mon Oct 1 11:21:11 2018 -0400 media: cx18: Don't check for address of video_dev Clang warns that the address of a pointer will always evaluated as true in a boolean context. drivers/media/pci/cx18/cx18-driver.c:1255:23: warning: address of 'cx->streams[i].video_dev' will always evaluate to 'true' [-Wpointer-bool-conversion] if (&cx->streams[i].video_dev) ~~ ~~~~~~~~~~~~~~~^~~~~~~~~ 1 warning generated. Check whether v4l2_dev is null, not the address, so that the statement doesn't fire all the time. This check has been present since 2009, introduced by commit 21a278b85d3c ("V4L/DVB (11619): cx18: Simplify the work handler for outgoing mailbox commands") Reported-by: Nick Desaulniers Signed-off-by: Nathan Chancellor Reviewed-by: Nick Desaulniers Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 9e5b5081fa117ae34eca94b63b1cb6d43dc28f10 Author: Sakari Ailus Date: Fri Oct 5 17:20:09 2018 -0400 media: dw9807-vcm: Fix probe error handling v4l2_async_unregister_subdev() may not be called without v4l2_async_register_subdev() being called first. Fix this. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 1c55ecab313321405b3cf8594df79f829f32dfaf Author: Sakari Ailus Date: Fri Oct 5 17:19:38 2018 -0400 media: dw9714: Remove useless error message If probe fails, the kernel will print the error code. There's no need to driver to do that. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit f9a0b14240a2d0bd196d35e8aac73df6eabd6382 Author: Rajmohan Mani Date: Fri Oct 5 12:22:17 2018 -0400 media: dw9714: Fix error handling in probe function Fixed the case where v4l2_async_unregister_subdev() is called unnecessarily in the error handling path in probe function. Signed-off-by: Rajmohan Mani Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit f69ffc5d3db8f1f03fd6d1df5930f9a1fbd787b6 Author: Prarit Bhargava Date: Mon Oct 8 11:06:19 2018 -0400 cpupower: Fix coredump on VMWare cpupower crashes on VMWare guests. The guests have the AMD PStateDef MSR (0xC0010064 + state number) set to zero. As a result fid and did are zero and the crash occurs because of a divide by zero (cof = fid/did). This can be prevented by checking the enable bit in the PStateDef MSR before calculating cof. By doing this the value of pstate[i] remains zero and the value can be tested before displaying the active Pstates. Check the enable bit in the PstateDef register for all supported families and only print out enabled Pstates. Signed-off-by: Prarit Bhargava Cc: Shuah Khan Cc: Stafford Horne Signed-off-by: Shuah Khan (Samsung OSG) commit 8c22e2f695920ebd94f9a53bcf2a65eb36d4dba1 Author: Prarit Bhargava Date: Mon Oct 8 11:06:18 2018 -0400 cpupower: Fix AMD Family 0x17 msr_pstate size The msr_pstate data is only 63 bits long and should be 64 bits. Add in the missing bit from res1 for AMD Family 0x17. Reference: https://www.amd.com/system/files/TechDocs/54945_PPR_Family_17h_Models_00h-0Fh.pdf, page 138. Signed-off-by: Prarit Bhargava Cc: Shuah Khan Cc: Stafford Horne Signed-off-by: Shuah Khan (Samsung OSG) commit cacad0b2e395b12a05487f57b2e716698443e6ae Author: Hans de Goede Date: Thu Oct 4 14:34:45 2018 +0200 platform/x86: touchscreen_dmi: Add info for the Trekstor Primebook C11 convertible Add touchscreen info for the Trekstor Primebook C11 convertible. Cc: Alicia Hormann Suggested-by: Alicia Hormann Signed-off-by: Hans de Goede Signed-off-by: Andy Shevchenko commit 8289c4b6f2e53750de78bd38cecb6bce4d7a988c Author: Nathan Chancellor Date: Tue Sep 25 22:21:15 2018 -0700 platform/x86: mlx-platform: Properly use mlxplat_mlxcpld_msn201x_items Clang warns that mlxplat_mlxcpld_msn201x_items is not going to be emitted in the final assembly because it's only used in ARRAY_SIZE right now, which is a compile time evaluation since the array's size is known. drivers/platform/x86/mlx-platform.c:555:32: warning: variable 'mlxplat_mlxcpld_msn201x_items' is not needed and will not be emitted [-Wunneeded-internal-declaration] static struct mlxreg_core_item mlxplat_mlxcpld_msn201x_items[] = { ^ 1 warning generated. It appears this was a copy and paste mistake from when this item was first added. Use the definition in mlxplat_mlxcpld_msn201x_data so that Clang no longer warns. Link: https://github.com/ClangBuiltLinux/linux/issues/141 Fixes: a49a41482f61 ("platform/x86: mlx-platform: Add support for new msn201x system type") Signed-off-by: Nathan Chancellor Acked-by: Vadim Pasternak Signed-off-by: Andy Shevchenko commit e84b7cc457f99ff5d034914e78e1c329df89ebee Author: Lu Baolu Date: Mon Oct 8 10:24:19 2018 +0800 iommu/amd: Add default branch in amd_iommu_capable() Recent gcc warns about switching on an enumeration, but not having an explicit case statement for all members of the enumeration. To show the compiler this is intentional, we simply add a default case with nothing more than a break statement. Signed-off-by: Lu Baolu Signed-off-by: Joerg Roedel commit a089845b3ed26bab5be07ed20493e8576bb86b9c Author: Biju Das Date: Thu Oct 4 17:25:47 2018 +0100 dt-bindings: iommu: ipmmu-vmsa: Add r8a7744 support Document RZ/G1N (R8A7744) SoC bindings. Signed-off-by: Biju Das Reviewed-by: Chris Paterson Reviewed-by: Simon Horman Signed-off-by: Joerg Roedel commit 6503016ea5d3945f9af1eeac23ba99f408f3af1e Merge: 8aff4eaa1de7 59739131e0ca Author: Greg Kroah-Hartman Date: Mon Oct 8 16:27:14 2018 +0200 Merge tag 'usb-ci-v4.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb into usb-testing Peter writes: - Add pinctrl support for dual-role switch at chipidea-core - improve overcorrent handling for imx - some small code restructure (no function affect) * tag 'usb-ci-v4.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb: usb: chipidea: Fix otg event handler usb: chipidea: Prevent unbalanced IRQ disable doc: usb: ci-hdrc-usb2: Add pinctrl properties definition usb: chipidea: Add dynamic pinctrl selection usb: chipidea: imx: make MODULE_LICENCE and SPDX-identifier match usb: chipidea: imx: enable OTG overcurrent in case USB subsystem is already started usb: chipidea: imx: do not use preprocessor conditionals for PM commit 3a646fd77684dd5fbe20748bb04e12077bbecddc Author: Dongbo Cao Date: Mon Oct 8 20:41:21 2018 +0800 bcache: panic fix for making cache device when the nbuckets of cache device is smaller than 1024, making cache device will trigger BUG_ON in kernel, add a condition to avoid this. Reported-by: nitroxis Signed-off-by: Dongbo Cao Signed-off-by: Coly Li Signed-off-by: Jens Axboe commit f6027bca9e382efc4d4f28a2d9678e0a07428363 Author: Dongbo Cao Date: Mon Oct 8 20:41:20 2018 +0800 bcache: split combined if-condition code into separate ones Split the combined '||' statements in if() check, to make the code easier for debug. Signed-off-by: Dongbo Cao Signed-off-by: Coly Li Signed-off-by: Jens Axboe commit 8792099f9ad487cf381f4e8199ff2158ba0f6eb5 Author: Shenghui Wang Date: Mon Oct 8 20:41:19 2018 +0800 bcache: use MAX_CACHES_PER_SET instead of magic number 8 in __bch_bucket_alloc_set Current cache_set has MAX_CACHES_PER_SET caches most, and the macro is used for " struct cache *cache_by_alloc[MAX_CACHES_PER_SET]; " in the define of struct cache_set. Use MAX_CACHES_PER_SET instead of magic number 8 in __bch_bucket_alloc_set. Signed-off-by: Shenghui Wang Signed-off-by: Coly Li Signed-off-by: Jens Axboe commit 149d0efada7777ad5a5242b095692af142f533d8 Author: Coly Li Date: Mon Oct 8 20:41:18 2018 +0800 bcache: replace hard coded number with BUCKET_GC_GEN_MAX In extents.c:bch_extent_bad(), number 96 is used as parameter to call btree_bug_on(). The purpose is to check whether stale gen value exceeds BUCKET_GC_GEN_MAX, so it is better to use macro BUCKET_GC_GEN_MAX to make the code more understandable. Signed-off-by: Coly Li Signed-off-by: Jens Axboe commit 91bafdf081b8ad8ab4977918ee45dffe3d744060 Author: Dongbo Cao Date: Mon Oct 8 20:41:17 2018 +0800 bcache: remove useless parameter of bch_debug_init() Parameter "struct kobject *kobj" in bch_debug_init() is useless, remove it in this patch. Signed-off-by: Dongbo Cao Signed-off-by: Coly Li Signed-off-by: Jens Axboe commit 3fd3c5c02b2865e506bee1212c8423eac0d4cddf Author: Shenghui Wang Date: Mon Oct 8 20:41:16 2018 +0800 bcache: remove unused bch_passthrough_cache struct kmem_cache *bch_passthrough_cache is not used in bcache code. Remove it. Signed-off-by: Shenghui Wang Signed-off-by: Coly Li Signed-off-by: Jens Axboe commit 46010141da6677b81cc77f9b47f8ac62bd1cbfd3 Author: Shenghui Wang Date: Mon Oct 8 20:41:15 2018 +0800 bcache: recal cached_dev_sectors on detach Recal cached_dev_sectors on cached_dev detached, as recal done on cached_dev attached. Update the cached_dev_sectors before bcache_device_detach called as bcache_device_detach will set bcache_device->c to NULL. Signed-off-by: Shenghui Wang Signed-off-by: Coly Li Signed-off-by: Jens Axboe commit 2d6cb6edd2c7fb4f40998895bda45006281b1ac5 Author: Tang Junhui Date: Mon Oct 8 20:41:14 2018 +0800 bcache: fix miss key refill->end in writeback refill->end record the last key of writeback, for example, at the first time, keys (1,128K) to (1,1024K) are flush to the backend device, but the end key (1,1024K) is not included, since the bellow code: if (bkey_cmp(k, refill->end) >= 0) { ret = MAP_DONE; goto out; } And in the next time when we refill writeback keybuf again, we searched key start from (1,1024K), and got a key bigger than it, so the key (1,1024K) missed. This patch modify the above code, and let the end key to be included to the writeback key buffer. Signed-off-by: Tang Junhui Cc: stable@vger.kernel.org Signed-off-by: Coly Li Signed-off-by: Jens Axboe commit 7567c2a2ad9e80a2ce977eef535e64b61899633e Author: Ben Peddell Date: Mon Oct 8 20:41:13 2018 +0800 bcache: Populate writeback_rate_minimum attribute Forgot to include the maintainers with my first email. Somewhere between Michael Lyle's original "bcache: PI controller for writeback rate V2" patch dated 07 Sep 2017 and 1d316e6 bcache: implement PI controller for writeback rate, the mapping of the writeback_rate_minimum attribute was dropped. Re-add the missing sysfs writeback_rate_minimum attribute mapping to "allow the user to specify a minimum rate at which dirty blocks are retired." Fixes: 1d316e6 ("bcache: implement PI controller for writeback rate") Signed-off-by: Ben Peddell Signed-off-by: Coly Li Signed-off-by: Jens Axboe commit 2e17a262a2371d38d2ec03614a2675a32cef9912 Author: Tang Junhui Date: Mon Oct 8 20:41:12 2018 +0800 bcache: correct dirty data statistics When bcache device is clean, dirty keys may still exist after journal replay, so we need to count these dirty keys even device in clean status, otherwise after writeback, the amount of dirty data would be incorrect. Signed-off-by: Tang Junhui Cc: stable@vger.kernel.org Signed-off-by: Coly Li Signed-off-by: Jens Axboe commit 4516da427fcf214af7d826273ab275f1d6e56ef0 Author: Coly Li Date: Mon Oct 8 20:41:11 2018 +0800 bcache: fix typo in code comments of closure_return_with_destructor() The code comments of closure_return_with_destructor() in closure.h makrs function name as closure_return(). This patch fixes this type with the correct name - closure_return_with_destructor. Signed-off-by: Coly Li Signed-off-by: Jens Axboe commit dd0c91793b7c2658ea32c6b3a2247a8ceca45dc0 Author: Tang Junhui Date: Mon Oct 8 20:41:10 2018 +0800 bcache: fix ioctl in flash device When doing ioctl in flash device, it will call ioctl_dev() in super.c, then we should not to get cached device since flash only device has no backend device. This patch just move the jugement dc->io_disable to cached_dev_ioctl() to make ioctl in flash device correctly. Fixes: 0f0709e6bfc3c ("bcache: stop bcache device when backing device is offline") Signed-off-by: Tang Junhui Cc: stable@vger.kernel.org Signed-off-by: Coly Li Signed-off-by: Jens Axboe commit 752f66a75abad2ae40b4570b3c77b422389cffcf Author: Coly Li Date: Mon Oct 8 20:41:09 2018 +0800 bcache: use REQ_PRIO to indicate bio for metadata In cached_dev_cache_miss() and check_should_bypass(), REQ_META is used to check whether a bio is for metadata request. REQ_META is used for blktrace, the correct REQ_ flag should be REQ_PRIO. This flag means the bio should be prior to other bio, and frequently be used to indicate metadata io in file system code. This patch replaces REQ_META with correct flag REQ_PRIO. CC Adam Manzanares because he explains to me what REQ_PRIO is for. Signed-off-by: Coly Li Cc: Adam Manzanares Signed-off-by: Jens Axboe commit 502b291568fc7faf1ebdb2c2590f12851db0ff76 Author: Tang Junhui Date: Mon Oct 8 20:41:08 2018 +0800 bcache: trace missed reading by cache_missed Missed reading IOs are identified by s->cache_missed, not the s->cache_miss, so in trace_bcache_read() using trace_bcache_read to identify whether the IO is missed or not. Signed-off-by: Tang Junhui Cc: stable@vger.kernel.org Signed-off-by: Coly Li Signed-off-by: Jens Axboe commit 7a55948d38eb9b274cbbdd56dc1dd4b96ebfbe04 Author: Shenghui Wang Date: Mon Oct 8 20:41:07 2018 +0800 bcache: account size of buckets used in uuid write to ca->meta_sectors_written UUIDs are considered as metadata. __uuid_write should add the number of buckets (in sectors) written to disk to ca->meta_sectors_written. Currently only 1 bucket is used in uuid write. Steps to test: 1) create a fresh backing device and a fresh cache device separately. The backing device didn't attach to any cache set. 2) cd /sys/block//bcache cat metadata_written // record the output value cat bucket_size 3) attach the backing device to cache set 4) cat metadata_written The output value is almost the same as the value in step 2 before the change. After the change, the value is bigger about 1 bucket size. Signed-off-by: Shenghui Wang Reviewed-by: Tang Junhui Signed-off-by: Coly Li Signed-off-by: Jens Axboe commit b912de514a8759ef558096d7f1c3a0000e0e37f0 Author: Dong Aisheng Date: Mon Oct 8 18:25:07 2018 +0800 MAINTAINERS: imx: include drivers/firmware/imx path Due to newly added IMX SCU firmware support, let's add drivers/firmware/imx into maintainership. Cc: Shawn Guo Cc: Arnd Bergmann Cc: linux-kernel@vger.kernel.org Signed-off-by: Dong Aisheng Signed-off-by: Shawn Guo commit 15e1f2bc8b3b2d238b9e06b128d4a09d28f11733 Author: Dong Aisheng Date: Sun Oct 7 21:04:43 2018 +0800 firmware: imx: add misc svc support Add SCU MISC SVC support which provides misc control get/set functions. Cc: Shawn Guo Reviewed-by: Sascha Hauer Signed-off-by: Dong Aisheng Signed-off-by: Shawn Guo commit edbee095fafb4b727b51032bdc41e345f95bbc20 Author: Dong Aisheng Date: Sun Oct 7 21:04:42 2018 +0800 firmware: imx: add SCU firmware driver support The System Controller Firmware (SCFW) is a low-level system function which runs on a dedicated Cortex-M core to provide power, clock, and resource management. It exists on some i.MX8 processors. e.g. i.MX8QM (QM, QP), and i.MX8QX (QXP, DX). This patch implements the SCU firmware IPC function and the common message sending API sc_call_rpc. Cc: Shawn Guo Cc: Fabio Estevam Cc: Jassi Brar Reviewed-by: Sascha Hauer Signed-off-by: Dong Aisheng Signed-off-by: Shawn Guo commit 4e1a606d552de03aec2b1fd157011bf012fcc870 Merge: 8ebfe885c65e 0238df646e62 Author: Greg Kroah-Hartman Date: Mon Oct 8 15:43:12 2018 +0200 Merge 4.19-rc7 into tty-next We want the fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit 8aff4eaa1de7a0ba70af8447ed08127ef0e8e45d Merge: e7a2c3fa2857 0238df646e62 Author: Greg Kroah-Hartman Date: Mon Oct 8 15:40:42 2018 +0200 Merge 4.19-rc7 into usb-next We want the USB fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit ba1cb318dcbfc9754acda9656262aea97ebe77e6 Merge: 8f523d6db7ed 0238df646e62 Author: Greg Kroah-Hartman Date: Mon Oct 8 15:33:21 2018 +0200 Merge 4.19-rc7 into char-misc-next We want the fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit b790c8ea5593d6dc3580adfad8e117eeb56af874 Author: Geert Uytterhoeven Date: Mon Oct 8 13:14:35 2018 +0200 reset: Fix potential use-after-free in __of_reset_control_get() Calling of_node_put() decreases the reference count of a device tree object, and may free some data. However, the of_phandle_args structure embedding it is passed to reset_controller_dev.of_xlate() after that, so it may still be accessed. Move the call to of_node_put() down to fix this. Signed-off-by: Geert Uytterhoeven [p.zabel@pengutronix.de: moved of_node_put after mutex_unlock] Signed-off-by: Philipp Zabel commit 5e9feb3544a72321553d17fcfa0c7e88435ea7ad Author: Lukasz Majewski Date: Fri Sep 28 00:31:52 2018 +0200 spidev: Enable the Liebherr's BK4 board to work with spidev driver With this commit the DSPI driver on the BK4 board can be used for SPI transmission managed from user space (via /dev/spidev0.0). Example usage/testing: insmod ./spi-fsl-dspi.ko ./spidev_test -D /dev/spidev0.0 -s 3000000 -v -H -b 8 -p "\xCC\x11\x22\x74" Signed-off-by: Lukasz Majewski Signed-off-by: Mark Brown commit 4c62bd9cea7bcf10292f7e4c57a2bca332942697 Author: Andrew Price Date: Mon Oct 8 07:52:43 2018 -0500 gfs2: Don't leave s_fs_info pointing to freed memory in init_sbd When alloc_percpu() fails, sdp gets freed but sb->s_fs_info still points to the same address. Move the assignment after that error check so that s_fs_info can only point to a valid sdp or NULL, which is checked for later in the error path, in gfs2_kill_super(). Reported-by: syzbot+dcb8b3587445007f5808@syzkaller.appspotmail.com Signed-off-by: Andrew Price Signed-off-by: Bob Peterson commit 01e98ee0b3b4d5096b40b87ad3988894fd5de39e Author: Shawn Guo Date: Mon Oct 8 15:14:58 2018 +0800 MAINTAINERS: remove non-exsiting email address of Baoyou We keep getting bounces from Baoyou Xie . We do not know Baoyou's new email address, nor his interest to stay as the co-maintainer. Let's remove the non-exsiting email first, and we can add his new email back if we heard back from him later. Cc: Jun Nie Signed-off-by: Shawn Guo Signed-off-by: Arnd Bergmann commit 75bda3609f94a24a213fa56235bf369056565299 Merge: e51e8d5de999 6d06009cb216 Author: Arnd Bergmann Date: Mon Oct 8 14:44:40 2018 +0200 Merge tag 'soc-fsl-next-v4.20-2' of git://git.kernel.org/pub/scm/linux/kernel/git/leo/linux into next/drivers NXP/FSL SoC drivers updates for v4.20 take 2 - Update qbman driver to better work with CPU hotplug - Add Kconfig dependency of 64-bit DMA addressing for qbman driver - Use last reponse to determine valid bit for qbman driver - Defer bman_portals probe if bman is not probed - Add interrupt coalescing APIs to qbman driver * tag 'soc-fsl-next-v4.20-2' of git://git.kernel.org/pub/scm/linux/kernel/git/leo/linux: soc: fsl: qbman: add interrupt coalesce changing APIs soc: fsl: bman_portals: defer probe after bman's probe soc: fsl: qbman: Use last response to determine valid bit soc: fsl: qbman: Add 64 bit DMA addressing requirement to QBMan soc: fsl: qbman: replace CPU 0 with any online CPU in hotplug handlers soc: fsl: qbman: Check if CPU is offline when initializing portals soc: fsl: qman_portals: defer probe after qman's probe soc: fsl: qbman: add APIs to retrieve the probing status soc: fsl: qe: Fix copy/paste bug in ucc_get_tdm_sync_shift() soc: fsl: qbman: qman: avoid allocating from non existing gen_pool Signed-off-by: Arnd Bergmann commit 47fd2060660e62b169990a6fcd9eb61bc1a85c5c Author: Finn Thain Date: Tue Sep 11 20:18:44 2018 -0400 macintosh/via-macii, macintosh/adb-iop: Clean up whitespace Signed-off-by: Finn Thain Signed-off-by: Michael Ellerman commit 351e5ad327d078386144af9a34346eaeb3e1ea1e Author: Finn Thain Date: Tue Sep 11 20:18:44 2018 -0400 macintosh/via-macii, macintosh/adb-iop: Modernize printk calls Add missing severity level to log messages. Signed-off-by: Finn Thain Signed-off-by: Michael Ellerman commit 5ce6185c2ef4e5bcb268f0fdbfca90e787e1bf6d Author: Finn Thain Date: Tue Sep 11 20:18:44 2018 -0400 macintosh/via-macii: Simplify locking Modifying the request queue or changing the current state requires mutual exclusion. Use local_irq_disable() consistently for this rather than disabling the ADB interrupt. This simplifies the locking scheme and brings via-macii into line with the other ADB drivers. Tested-by: Stan Johnson Signed-off-by: Finn Thain Signed-off-by: Michael Ellerman commit 5f93d7081a47e1972031ccf57c4b2779eee162fb Author: Finn Thain Date: Tue Sep 11 20:18:44 2018 -0400 macintosh/via-macii: Remove BUG_ON assertions The BUG_ON assertions I added to the via-macii driver over a decade ago haven't fired AFAIK. Some can never fire (by inspection). One assertion checks for a NULL pointer, but that would merely substitute a BUG crash for an Oops crash. Remove the pointless BUG_ON assertions and replace the others with a WARN_ON and an array bounds check. Tested-by: Stan Johnson Signed-off-by: Finn Thain Signed-off-by: Michael Ellerman commit b52dce87389385aad54f5680329b41257ee0f7ac Author: Finn Thain Date: Tue Sep 11 20:18:44 2018 -0400 macintosh/via-macii: Synchronous bus reset Make the reset operation synchronous, like the other ADB drivers. The reset request is static data but callers may not know that. This way the struct is not in use when the reset method returns. Tested-by: Stan Johnson Signed-off-by: Finn Thain Signed-off-by: Michael Ellerman commit 2341629eadc4a40aa46103c7f1ff5f38459688d3 Author: Finn Thain Date: Tue Sep 11 20:18:44 2018 -0400 macintosh/adb: Rework printk output again Avoid the KERN_CONT problem by avoiding message fragments. The problem arises during async ADB bus probing, when ADB messages may get mixed up with other messages. See also, commit 4bcc595ccd80 ("printk: reinstate KERN_CONT for printing continuation lines"). Remove a number of printk() continuation lines by logging handler changes in adb_try_handler_change() instead. This patch addresses the problematic use of "\n" at the beginning of pr_cont() messages, which got overlooked in commit f2be6295684b ("macintosh/adb: Properly mark continued kernel messages"). That commit also changed printk(KERN_DEBUG ...) to pr_debug(...), which hinders work on low-level ADB driver bugs. Revert that change. Cc: Andreas Schwab Tested-by: Stan Johnson Signed-off-by: Finn Thain Signed-off-by: Michael Ellerman commit 0792a2c8e0bbda3605b8d42c6b9635be7b19982a Author: Finn Thain Date: Tue Sep 11 20:18:44 2018 -0400 macintosh: Use common code to access RTC Now that the 68k Mac port has adopted the via-pmu driver, the same RTC code can be shared between m68k and powerpc. Replace duplicated code in arch/powerpc and arch/m68k with common RTC accessors for Cuda and PMU. Drop the problematic WARN_ON which was introduced in commit 22db552b50fa ("powerpc/powermac: Fix rtc read/write functions"). Tested-by: Stan Johnson Signed-off-by: Finn Thain Cc: Geert Uytterhoeven Cc: Arnd Bergmann Acked-by: Geert Uytterhoeven Signed-off-by: Michael Ellerman commit d0a6a87e40da49cfc7954c491d3065a25a641b29 Author: Amir Goldstein Date: Thu Oct 4 00:25:38 2018 +0300 fanotify: support reporting thread id instead of process id In order to identify which thread triggered the event in a multi-threaded program, add the FAN_REPORT_TID flag in fanotify_init to opt-in for reporting the event creator's thread id information. Signed-off-by: nixiaoming Signed-off-by: Amir Goldstein Signed-off-by: Jan Kara commit 97037597d6702f4446dd79af8bdb6959a35586b8 Author: Gustavo A. R. Silva Date: Mon Oct 8 12:57:37 2018 +0200 video: fbdev: arcfb: mark expected switch fall-through In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 115017 ("Missing break in switch") Signed-off-by: Gustavo A. R. Silva Cc: Jaya Kumar Signed-off-by: Bartlomiej Zolnierkiewicz commit b19f682e4abb728bcb5ab4468288b26d1b70b774 Author: YueHaibing Date: Mon Oct 8 12:57:37 2018 +0200 pxa168fb: remove set but not used variables 'mi' Fixes gcc '-Wunused-but-set-variable' warning: drivers/video/fbdev/pxa168fb.c: In function 'pxa168fb_set_par': drivers/video/fbdev/pxa168fb.c:408:29: warning: variable 'mi' set but not used [-Wunused-but-set-variable] Signed-off-by: YueHaibing Cc: Lubomir Rintel Signed-off-by: Bartlomiej Zolnierkiewicz commit 9827f26374fb85e1811f2adbcc25c8a3992dbe7f Author: Michal Vokáč Date: Mon Oct 8 12:57:37 2018 +0200 video: ssd1307fb: Do not hard code active-low reset sequence The SSD130x OLED display reset signal is active low. Now the reset sequence is implemented in such a way that users are forced to define reset-gpios as GPIO_ACTIVE_HIGH in DT to make the reset work. Do not hard code the active-low sequence into the driver but instead allow the user to specify the gpio as GPIO_ACTIVE_LOW to reflect the real world. Signed-off-by: Michal Vokáč Cc: Shawn Guo Cc: Rob Herring Signed-off-by: Bartlomiej Zolnierkiewicz commit 7d1b8d7a858024bd6a1dca206646fbcab5785220 Author: Michal Vokáč Date: Mon Oct 8 12:57:36 2018 +0200 video: ssd1307fb: Use gpiod_set_value_cansleep() for reset The reset signal can be produced by GPIO expander that can sleep. In that case the probe function fails. Allow using GPIO expanders for the reset signal by using the non-atomic gpiod_set_value_cansleep() function. Signed-off-by: Michal Vokáč Reviewed-by: Fabio Estevam Cc: Shawn Guo Cc: Rob Herring Signed-off-by: Bartlomiej Zolnierkiewicz commit aae3394ef0ef90cf00a21133357448385f13a5d4 Author: Randy Dunlap Date: Mon Oct 8 12:57:36 2018 +0200 fbdev: fix broken menu dependencies The framebuffer options and devices menu is unintentionally split or broken because some items in it do not depend on FB (including several under omap and mmp). Fix this by moving FB_CMDLINE, FB_NOTIFY, and FB_CLPS711X_OLD to just before the FB Kconfig symbol definition and by moving the omap, omap2, and mmp menus to last, following FB_SM712. Also, the FB_VIA dependencies are duplicated by both being inside an "if FB_VIA/endif" block and "depends on FB_VIA", so drop the "depends on FB_VIA" lines since they are redundant. Fixes: ea6763c104c9 ("video/fbdev: Always built-in video= cmdline parsing") Fixes: 5ec9653806ba ("fbdev: Make fb-notify a no-op if CONFIG_FB=n") Fixes: ef74d46a4ef3 ("video: clps711x: Add new Cirrus Logic CLPS711X framebuffer driver") Signed-off-by: Randy Dunlap Cc: Ezequiel Garcia Cc: Daniel Vetter Cc: Alexander Shiyan Signed-off-by: Bartlomiej Zolnierkiewicz commit 864eb1afc60cb43e7df879b97f8ca0d719bbb735 Author: Nathan Chancellor Date: Mon Oct 8 12:57:36 2018 +0200 video: fbdev: sis: Remove unnecessary parentheses and commented code Clang warns when multiple pairs of parentheses are used for a single conditional statement. drivers/video/fbdev/sis/init301.c:851:42: warning: equality comparison with extraneous parentheses [-Wparentheses-equality] } else if((SiS_Pr->SiS_IF_DEF_LVDS == 1) /* || ~~~~~~~~~~~~~~~~~~~~~~~~^~~~ drivers/video/fbdev/sis/init301.c:851:42: note: remove extraneous parentheses around the comparison to silence this warning } else if((SiS_Pr->SiS_IF_DEF_LVDS == 1) /* || ~ ^ ~ drivers/video/fbdev/sis/init301.c:851:42: note: use '=' to turn this equality comparison into an assignment } else if((SiS_Pr->SiS_IF_DEF_LVDS == 1) /* || ^~ = 1 warning generated. Remove the parentheses and while we're at it, clean up the commented code, which has been here since the beginning of git history. Link: https://github.com/ClangBuiltLinux/linux/issues/118 Signed-off-by: Nathan Chancellor Cc: Thomas Winischhofer Signed-off-by: Bartlomiej Zolnierkiewicz commit 02f17ffd34885ddf5afcab4d5e201b596156f862 Author: Janusz Krzysztofik Date: Mon Oct 8 12:57:36 2018 +0200 video: fbdev: omapfb: lcd_ams_delta: use GPIO lookup table Now as Amstrad Delta board - the only user of this driver - provides GPIO lookup tables, switch from GPIO numbers to GPIO descriptors and use the table to locate required GPIO pins. Declare static variables for storing GPIO descriptors and replace gpio_ function calls with their gpiod_ equivalents. Move GPIO lookup to the driver probe function so device initialization can be deferred instead of aborted if a GPIO pin is not yet available. Pin naming used by the driver should be followed while respective GPIO lookup table is initialized by a board init code. Signed-off-by: Janusz Krzysztofik Reviewed-by: Linus Walleij Cc: Tony Lindgren Cc: Aaro Koskinen Cc: Boris Brezillon Cc: Miquel Raynal Cc: Richard Weinberger Cc: David Woodhouse Cc: Brian Norris Cc: Marek Vasut Signed-off-by: Bartlomiej Zolnierkiewicz commit e5017716adb8aa5c01c52386c1b7470101ffe9c5 Author: Dan Carpenter Date: Mon Oct 8 12:57:36 2018 +0200 fbdev: sbuslib: integer overflow in sbusfb_ioctl_helper() The "index + count" addition can overflow. Both come directly from the user. This bug leads to an information leak. Signed-off-by: Dan Carpenter Cc: Peter Malone Cc: Philippe Ombredanne Cc: Mathieu Malaterre Signed-off-by: Bartlomiej Zolnierkiewicz commit d8bad911e5e55e228d59c0606ff7e6b8131ca7bf Author: Dan Carpenter Date: Mon Oct 8 12:57:36 2018 +0200 fbdev: sbuslib: use checked version of put_user() I'm not sure why the code assumes that only the first put_user() needs an access_ok() check. I have made all the put_user() and get_user() calls checked. Signed-off-by: Dan Carpenter Cc: Philippe Ombredanne Cc: Mathieu Malaterre Cc: Peter Malone , Signed-off-by: Bartlomiej Zolnierkiewicz commit 5c63e407aaabb0464236cfc6279a2d79aede7073 Author: Rob Herring Date: Mon Oct 8 12:57:36 2018 +0200 fbdev: 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: Rob Herring Signed-off-by: Bartlomiej Zolnierkiewicz commit 60e5e48dba72c6b59a7a9c7686ba320766913368 Author: Sam Ravnborg Date: Mon Oct 8 12:57:35 2018 +0200 atmel_lcdfb: support native-mode display-timings When a device tree set a display-timing using native-mode then according to the bindings doc this should: native-mode: The native mode for the display, in case multiple modes are provided. When omitted, assume the first node is the native. The atmel_lcdfb used the last timing subnode and did not respect the timing mode specified with native-mode. Introduce use of of_get_videomode() which allowed a nice simplification of the code while also added support for native-mode. As a nice side-effect this fixes a memory leak where the data used for timings and the display_np was not freed. Signed-off-by: Sam Ravnborg Cc: Nicolas Ferre Cc: Alexandre Belloni Signed-off-by: Bartlomiej Zolnierkiewicz commit 811ab8db890714e6644dae09366ef2820ca11272 Author: Mehdi Bounya Date: Mon Oct 8 12:57:35 2018 +0200 Video: vgastate: fixed a spacing coding style Removed a space between function name and open parant. Signed-off-by: Mehdi Bounya Signed-off-by: Bartlomiej Zolnierkiewicz commit ee6fbb20ab76a08c6623dc59a70db996f44b8ff9 Author: Mikulas Patocka Date: Mon Oct 8 12:57:35 2018 +0200 atyfb: fix debugging printks This patch fixes the debugging printks. Use pr_cont, so that the lines are not broken up. Use printk when starting a new line (a long string of pr_cont's without any printks causes missing characters in the console output on sparc). Signed-off-by: Mikulas Patocka Signed-off-by: Bartlomiej Zolnierkiewicz commit 01c40a17249727472da3f52e2f344cc2cc4138c4 Author: Mikulas Patocka Date: Mon Oct 8 12:57:35 2018 +0200 mach64: optimize wait_for_fifo This is a simple optimization for fifo waiting that improves scrolling performance by 5%. If the queue has more free entries that what we consume, we can skip the costly register read next time. Signed-off-by: Mikulas Patocka Reviewed-by: Ville Syrjälä Signed-off-by: Bartlomiej Zolnierkiewicz commit c09bcc91bb94ed91f1391bffcbe294963d605732 Author: Mikulas Patocka Date: Mon Oct 8 12:57:35 2018 +0200 mach64: fix image corruption due to reading accelerator registers Reading the registers without waiting for engine idle returns unpredictable values. These unpredictable values result in display corruption - if atyfb_imageblit reads the content of DP_PIX_WIDTH with the bit DP_HOST_TRIPLE_EN set (from previous invocation), the driver would never ever clear the bit, resulting in display corruption. We don't want to wait for idle because it would degrade performance, so this patch modifies the driver so that it never reads accelerator registers. HOST_CNTL doesn't have to be read, we can just write it with HOST_BYTE_ALIGN because no other part of the driver cares if HOST_BYTE_ALIGN is set. DP_PIX_WIDTH is written in the functions atyfb_copyarea and atyfb_fillrect with the default value and in atyfb_imageblit with the value set according to the source image data. Signed-off-by: Mikulas Patocka Reviewed-by: Ville Syrjälä Cc: stable@vger.kernel.org Signed-off-by: Bartlomiej Zolnierkiewicz commit 3c6c6a7878d00a3ac997a779c5b9861ff25dfcc8 Author: Mikulas Patocka Date: Mon Oct 8 12:57:34 2018 +0200 mach64: fix display corruption on big endian machines The code for manual bit triple is not endian-clean. It builds the variable "hostdword" using byte accesses, therefore we must read the variable with "le32_to_cpu". The patch also enables (hardware or software) bit triple only if the image is monochrome (image->depth). If we want to blit full-color image, we shouldn't use the triple code. Signed-off-by: Mikulas Patocka Reviewed-by: Ville Syrjälä Cc: stable@vger.kernel.org Signed-off-by: Bartlomiej Zolnierkiewicz commit ceadddde8875bda7af3824244de3d93e386d08c1 Author: Mikulas Patocka Date: Mon Oct 8 12:57:34 2018 +0200 mach64: detect the dot clock divider correctly on sparc On Sun Ultra 5, it happens that the dot clock is not set up properly for some videomodes. For example, if we set the videomode "r1024x768x60" in the firmware, Linux would incorrectly set a videomode with refresh rate 180Hz when booting (suprisingly, my LCD monitor can display it, although display quality is very low). The reason is this: Older mach64 cards set the divider in the register VCLK_POST_DIV. The register has four 2-bit fields (the field that is actually used is specified in the lowest two bits of the register CLOCK_CNTL). The 2 bits select divider "1, 2, 4, 8". On newer mach64 cards, there's another bit added - the top four bits of PLL_EXT_CNTL extend the divider selection, so we have possible dividers "1, 2, 4, 8, 3, 5, 6, 12". The Linux driver clears the top four bits of PLL_EXT_CNTL and never sets them, so it can work regardless if the card supports them. However, the sparc64 firmware may set these extended dividers during boot - and the mach64 driver detects incorrect dot clock in this case. This patch makes the driver read the additional divider bit from PLL_EXT_CNTL and calculate the initial refresh rate properly. Signed-off-by: Mikulas Patocka Acked-by: David S. Miller Reviewed-by: Ville Syrjälä Cc: stable@vger.kernel.org Signed-off-by: Bartlomiej Zolnierkiewicz commit 68a958a915ca912b8ce71b9eea7445996f6e681e Author: Mikulas Patocka Date: Mon Oct 8 12:57:34 2018 +0200 udlfb: handle unplug properly The udlfb driver maintained an open count and cleaned up itself when the count reached zero. But the console is also counted in the reference count - so, if the user unplugged the device, the open count would not drop to zero and the driver stayed loaded with console attached. If the user re-plugged the adapter, it would create a device /dev/fb1, show green screen and the access to the console would be lost. The framebuffer subsystem has reference counting on its own - in order to fix the unplug bug, we rely the framebuffer reference counting. When the user unplugs the adapter, we call unregister_framebuffer unconditionally. unregister_framebuffer will unbind the console, wait until all users stop using the framebuffer and then call the fb_destroy method. The fb_destroy cleans up the USB driver. This patch makes the following changes: * Drop dlfb->kref and rely on implicit framebuffer reference counting instead. * dlfb_usb_disconnect calls unregister_framebuffer, the rest of driver cleanup is done in the function dlfb_ops_destroy. dlfb_ops_destroy will be called by the framebuffer subsystem when no processes have the framebuffer open or mapped. * We don't use workqueue during initialization, but initialize directly from dlfb_usb_probe. The workqueue could race with dlfb_usb_disconnect and this racing would produce various kinds of memory corruption. * We use usb_get_dev and usb_put_dev to make sure that the USB subsystem doesn't free the device under us. Signed-off-by: Mikulas Patocka cc: Dave Airlie Cc: Bernie Thompson , Cc: Ladislav Michl Signed-off-by: Bartlomiej Zolnierkiewicz commit ad4366ad4831f9a42d86f19c43a482c7cb04cecb Author: Jia-Ju Bai Date: Mon Oct 8 12:57:34 2018 +0200 video: fbdev: add the dependency of broadsheetfb in Kconfig broadsheetfb is a platform driver and it should not be used on x86. It should be used only by single ARM PXA board so add the dependency in Kconfig. Signed-off-by: Jia-Ju Bai Signed-off-by: Bartlomiej Zolnierkiewicz commit 258bac4a61af9c4e7bc045ce2a17c9eb8c5fd9a5 Author: Chaotian Jing Date: Sat Sep 29 10:29:55 2018 +0800 mmc: mediatek: add bus_clk control when gate MSDC0_HCLK, access register will hang, even the MSDC driver will never accessing register after HCLK was gated, but for safety, need gate the bus_clk(which used to access register) too. Signed-off-by: Chaotian Jing Signed-off-by: Ulf Hansson commit 716b717ac07de239c6ad7bd3c38f2ef979280595 Author: Chaotian Jing Date: Sat Sep 29 10:29:54 2018 +0800 mmc: dt-bindings: add "bus-clk" for MT2712 On MT2712 MSDC0/3, HCLK/bus-clk need gate/ungate together, or will hang when access MSDC register. Signed-off-by: Chaotian Jing Signed-off-by: Ulf Hansson commit 7454a21c13f7ce9bf1a4f9b639039b78462cec09 Author: Daniel Mack Date: Wed Oct 3 21:34:36 2018 +0200 ASoC: wm8782: add support for regulators Lookup regulators for Vdd and Vdda during probe, and enable them when the component is linked. Signed-off-by: Daniel Mack Signed-off-by: Mark Brown commit cc65fb650c682e3b43d50202a0f01da7dc11e647 Author: Daniel Mack Date: Wed Oct 3 21:34:35 2018 +0200 ASoC: Add device tree documentation file for wm8782 stereo DAC Add a device tree documentation file for the wm8782 stereo DAC to describe the regulator handles. Signed-off-by: Daniel Mack Acked-by: Charles Keepax Signed-off-by: Mark Brown commit ed3054a3025879c7d3f64de7a58b7f6427e0d3a0 Merge: 55d09dd4c860 46623ab3194a Author: Christian Borntraeger Date: Mon Oct 8 12:14:54 2018 +0200 Merge branch 'apv11' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux into kernelorgnext commit 46623ab3194a3f37ea12da2964bca3b35fdd20ed Author: Christian Borntraeger Date: Fri Oct 5 19:22:38 2018 +0200 s390: vfio-ap: make local functions and data static no functional change, just hygiene. Signed-off-by: Christian Borntraeger Reviewed-by: Cornelia Huck Reviewed-by: David Hildenbrand commit 32b64b0397b440877c4707f3cc3f5b4494f0be3e Author: Anand Moon Date: Thu Sep 27 14:07:38 2018 +0000 mmc: dw_mmc-exynos: Add tuning for sdr and ddr timing for USH-I mode Add tuning for sdr and ddr timing for USH-I mode sdr104/sdr50/ddr50 for host controller. Cc: Jaehoon Chung Cc: Marek Szyprowski Signed-off-by: Anand Moon Signed-off-by: Ulf Hansson commit e0d81d92f7601c3dc63e5127bb77b6cd77f14a93 Merge: 7c968791f775 0238df646e62 Author: Bartlomiej Zolnierkiewicz Date: Mon Oct 8 11:58:00 2018 +0200 Merge tag 'v4.19-rc7' of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux into fbdev-for-next This is the 4.19-rc7 release Sync with upstream (which now contains fbdev-v4.19-rc7 changes) to prepare a base for fbdev-v4.20 changes. commit f42259ef810ce83f3e1a8ea4ce12dfda873fbe44 Author: Hang Yuan Date: Wed Sep 19 14:42:09 2018 +0800 drm/i915/gvt: invalidate old ggtt page when update ggtt entry Previously only cancelled dma map of a ggtt page when the ggtt entry was cleared. This patch will cancel dma map of an old ggtt page as well when the ggtt entry is updated with new page address. Fixes: 7598e8700e9a(drm/i915/gvt: Missed to cancel dma map for ggtt entries) Signed-off-by: Hang Yuan Signed-off-by: Zhenyu Wang commit d2681cd81b05f313bf6cda55b56c15cd46572034 Author: Gustavo A. R. Silva Date: Fri Oct 5 12:09:03 2018 +0200 mmc: meson-mx-sdio: 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 the "fall-through:" comment with a proper "fall through", which is what GCC is expecting to find. Addresses-Coverity-ID: 1373880 ("Missing break in switch") Signed-off-by: Gustavo A. R. Silva Signed-off-by: Ulf Hansson commit a5c83eb2bdc35af7fc7947fadf6e740a5792f08e Author: Gustavo A. R. Silva Date: Fri Oct 5 11:54:57 2018 +0200 mmc: tifm_sd: 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 the "deliberate fall-through" comment with a proper "fall through" at the bottom of the case, which is what GCC is expecting to find. Addresses-Coverity-ID: 1373887 ("Missing break in switch") Signed-off-by: Gustavo A. R. Silva Signed-off-by: Ulf Hansson commit 19a25d57ad39c7facc878d68feeb79867e037922 Author: Ludovic Barre Date: Tue Oct 2 14:09:03 2018 +0200 mmc: mmci: Change struct members from bool to u8 Recent versions of checkpatch have a new warning based on a documented preference of Linus to not use bool in structures due to wasted space and the size of bool is implementation dependent. For more information, see the email thread at https://lkml.org/lkml/2017/11/21/384 fix checkpatch --strict issues: -CHECK: Avoid using bool structure members because of possible alignment issues - see: https://lkml.org/lkml/2017/11/21/384 -WARNING: Avoid using bool as bitfield. Prefer bool bitfields as unsigned int or u<8|16|32> Signed-off-by: Ludovic Barre Signed-off-by: Ulf Hansson commit cdea194721929d025d40cfa6c2449d5c4cd366e6 Author: Ludovic Barre Date: Fri Sep 21 11:45:56 2018 +0200 mmc: mmci: internalize dma_inprogress into mmci dma functions This patch internalizes the dma_inprogress into mmci dma interfaces. This allows to simplify and prepare the next dma callbacks for mmci host ops. dma_inprogress is called in mmci_dma_data_error and mmci_dma_finalize. Signed-off-by: Ludovic Barre Signed-off-by: Ulf Hansson commit 7b2a6d518d0c9dc92910c089b75f859ec916b93a Author: Ludovic Barre Date: Fri Sep 21 11:45:55 2018 +0200 mmc: mmci: internalize dma map/unmap into mmci dma functions This patch internalizes the management of dma map/unmap into mmci dma interfaces. This allows to simplify and prepare the next dma callbacks for mmci host ops. mmci_dma_unmap was called in mmci_data_irq & mmci_cmd_irq functions and can be integrated in mmci_dma_data_error. Signed-off-by: Ludovic Barre Signed-off-by: Ulf Hansson commit 2ffca7a34df5ce95efff4a481cd79ec47abf3d6d Author: Biju Das Date: Tue Sep 25 18:27:24 2018 +0100 dt-bindings: mmc: sh_mmcif: Document r8a7744 DT bindings Add support for r8a7744 SoC. Renesas RZ/G1N (R8A7744) MMCIF is identical to the R-Car Gen2 family. Signed-off-by: Biju Das Reviewed-by: Chris Paterson Reviewed-by: Simon Horman Reviewed-by: Geert Uytterhoeven Signed-off-by: Ulf Hansson commit bd451c2df99bb5b7cd2b51fe05f7bb15ddf92791 Author: Biju Das Date: Tue Sep 25 18:23:07 2018 +0100 dt-bindings: mmc: renesas_sdhi: Add r8a7744 support Add support for r8a7744 SoC. Renesas RZ/G1N (R8A7744) SDHI is identical to the R-Car Gen2 family. Signed-off-by: Biju Das Reviewed-by: Chris Paterson Reviewed-by: Simon Horman Reviewed-by: Geert Uytterhoeven Signed-off-by: Ulf Hansson commit 5169894982bb67486d93cc1e10151712bb86bcb6 Author: Yu Zhao Date: Sun Sep 23 14:39:24 2018 -0600 mmc: sdhci-pci-o2micro: Add quirk for O2 Micro dev 0x8620 rev 0x01 This device reports SDHCI_CLOCK_INT_STABLE even though it's not ready to take SDHCI_CLOCK_CARD_EN. The symptom is that reading SDHCI_CLOCK_CONTROL after enabling the clock shows absence of the bit from the register (e.g. expecting 0x0000fa07 = 0x0000fa03 | SDHCI_CLOCK_CARD_EN but only observed the first operand). mmc1: Timeout waiting for hardware cmd interrupt. mmc1: sdhci: ============ SDHCI REGISTER DUMP =========== mmc1: sdhci: Sys addr: 0x00000000 | Version: 0x00000603 mmc1: sdhci: Blk size: 0x00000000 | Blk cnt: 0x00000000 mmc1: sdhci: Argument: 0x00000000 | Trn mode: 0x00000000 mmc1: sdhci: Present: 0x01ff0001 | Host ctl: 0x00000001 mmc1: sdhci: Power: 0x0000000f | Blk gap: 0x00000000 mmc1: sdhci: Wake-up: 0x00000000 | Clock: 0x0000fa03 mmc1: sdhci: Timeout: 0x00000000 | Int stat: 0x00000000 mmc1: sdhci: Int enab: 0x00ff0083 | Sig enab: 0x00ff0083 mmc1: sdhci: AC12 err: 0x00000000 | Slot int: 0x00000000 mmc1: sdhci: Caps: 0x25fcc8bf | Caps_1: 0x00002077 mmc1: sdhci: Cmd: 0x00000000 | Max curr: 0x005800c8 mmc1: sdhci: Resp[0]: 0x00000000 | Resp[1]: 0x00000000 mmc1: sdhci: Resp[2]: 0x00000000 | Resp[3]: 0x00000000 mmc1: sdhci: Host ctl2: 0x00000008 mmc1: sdhci: ADMA Err: 0x00000000 | ADMA Ptr: 0x00000000 mmc1: sdhci: ============================================ The problem happens during wakeup from S3. Adding a delay quirk after power up reliably fixes the problem. Signed-off-by: Yu Zhao Signed-off-by: Ulf Hansson commit e63201f19438372fcb45977d8e14c6ab5807d55b Author: Linus Walleij Date: Mon Sep 24 13:30:51 2018 +0200 mmc: omap_hsmmc: Delete platform data GPIO CD and WP The OMAP HSMMC driver has some elaborate and hairy handling for passing GPIO card detect and write protect lines from a boardfile into the driver: the machine defines a struct omap2_hsmmc_info that is copied into struct omap_hsmmc_platform_data by omap_hsmmc_pdata_init() in arch/arm/mach-omap2/hsmmc.c. However the .gpio_cd and .gpio_wp fields are not copied from omap2_hsmmc_info to omap_hsmmc_platform_data by omap_hsmmc_pdata_init() so they remain unused. The only platform defining omap2_hsmmc_info also define both to -1, unused. It turn out there are no boardfiles passing any valid GPIO lines into the OMAP HSMMC driver at all. And since we are not going to add any more OMAP2 boardfiles, we can delete this card detect and write protect handling altogether. This seems to also fix a bug: the card detect callback mmc_gpio_get_cd() in the slot GPIO core needs to be called by drivers utilizing slot GPIO. It appears the the boardfile quirks were not doing this right, so this would only get called for boardfiles, i.e. since no boardfile was using it, never. Just assign mmc_gpio_get_cd() unconditionally to omap_hsmmc_ops .get_cd() so card detects from the device tree works. AFAICT card detect with GPIO lines assigned from mmc_of_parse() are not working at the moment, but that is no regression since it probably never worked. Cc: Tony Lindgren Cc: linux-omap@vger.kernel.org Signed-off-by: Linus Walleij Acked-by: Tony Lindgren Signed-off-by: Ulf Hansson commit 7838a8ddc80b2aa82d364d39042ca422f7748885 Author: Linus Walleij Date: Mon Sep 24 13:30:50 2018 +0200 mmc: omap_hsmmc: Kill off cover detection Cover detection appears to be a feature protecting the SD card on mobile phones with a slide-cover, such as some Nokia phones. The idea seems to be to not allow access to the SD card when the cover is open. It is only usable with platform data from board files, but no board file in the kernel is using it, yet it takes up a sizeable chunk of code in the OMAP HSMMC driver. Since we do not add new board files for the OMAPs any target that need this should anyway reimplement it properly using the device tree, so delete this legacy code. The driver is marked as orphan in MAINTAINERS by the way. Cc: Tony Lindgren Cc: linux-omap@vger.kernel.org Signed-off-by: Linus Walleij Acked-by: Tony Lindgren Acked-by: Kishon Vijay Abraham I Signed-off-by: Ulf Hansson commit ac379b7ca1b0a664db2b36fc960f2e940698d4e4 Author: Lubomir Rintel Date: Mon Sep 24 10:56:32 2018 +0200 mmc: core: Allow building PWRSEQ_SD8787 with LIBERTAS_SDIO The sd8686 "libertas" SDIO adapter's power is controlled with WLAN_RST and WLAN_PD pins -- pretty much the same way as sd8787. Allow building the power sequencing driver along with the libertas Wi-Fi driver. Signed-off-by: Lubomir Rintel Signed-off-by: Ulf Hansson commit bbf57df8172a5334fcb586c8abf95d220eb99571 Author: Linus Walleij Date: Mon Sep 24 10:02:33 2018 +0200 mmc: sdhci: sirf: Use the slot GPIO descriptor This driver is complicating things for no reason: the "cd" GPIO can easily be retrieved from the device tree if present using just mmc_gpiod_request_cd(), which will fetch the descriptor from the device tree using the standard binding just fine. If the retrieveal is successful, we also request the IRQ. As a result the private subdriver data can be removed entirely. Cc: Weijun Yang Cc: Barry Song Cc: Adrian Hunter Signed-off-by: Linus Walleij Signed-off-by: Ulf Hansson commit 43b7358df63adff21aa81b349d9080954bf1c372 Author: Linus Walleij Date: Sun Sep 23 09:03:21 2018 +0200 mmc: sdhci: pxav3: Delete GPIO handling The platform data for the PXAv3 driver allows passing a card detect GPIO, but this code is not used in the kernel. In order to not encourage the use of the old global GPIO numberspace we need to remove this. Card detect (and write protect) GPIO can easily be added into the driver using machine descriptor tables instead, and the descriptor-based (gpiod) variants of the slot GPIO APIs. Cc: Jisheng Zhang Cc: Adrian Hunter Signed-off-by: Linus Walleij Reviewed-by: Jisheng Zhang Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson commit b007c4cec8ca169ce091600212b69e077ac0bd5d Author: Linus Walleij Date: Sun Sep 23 08:33:20 2018 +0200 mmc: sdhci: spear: Use the slot GPIO descriptor This driver is complicating things for no reason: the "cd" GPIO can easily be retrieved from the device tree if present using just mmc_gpiod_request_cd(), which will fetch the descriptor from the device tree using the standard binding just fine. Cc: Viresh Kumar Signed-off-by: Linus Walleij Signed-off-by: Ulf Hansson commit 9ef986a697c6d733d86e76d9870b4f1f60512b7a Author: Linus Walleij Date: Thu Sep 20 16:01:10 2018 -0700 mmc: mmci: Drop support for pdata GPIO numbers All the machines using the MMCI are passing GPIOs for the card detect and write protect using the device tree or descriptor table (one single case, Integrator/AP IM-PD1). Drop support for passing global GPIO numbers through platform data, noone is using it. Signed-off-by: Linus Walleij Signed-off-by: Ulf Hansson commit 07be55b567a556c7e4d421e5f4bb4248933bfe32 Author: Jisheng Zhang Date: Mon Sep 17 13:30:41 2018 +0800 mmc: sdhci: fix __sdhci_adma_write_desc If hosts provides ops->adma_write_desc, we should not fall back to the general sdhci_adma_write_desc(). Signed-off-by: Jisheng Zhang Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson commit 5a941898233c25a44bdcf799543842506cb77334 Author: jun qian Date: Tue Sep 11 07:47:01 2018 -0700 mmc: mxcmmc: 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: Vladimir Zapolskiy Signed-off-by: Ulf Hansson commit 54541815b43f4e49c82628bf28bbb31d86d2f58a Author: Niklas Söderlund Date: Thu Sep 13 16:47:08 2018 +0200 mmc: renesas_sdhi_internal_dmac: set scatter/gather max segment size Fix warning when running with CONFIG_DMA_API_DEBUG_SG=y by allocating a device_dma_parameters structure and filling in the max segment size. The size used is the result of a discussion with Renesas hardware engineers and unfortunately not found in the datasheet. renesas_sdhi_internal_dmac ee140000.sd: DMA-API: mapping sg segment longer than device claims to support [len=126976] [max=65536] Reported-by: Geert Uytterhoeven Signed-off-by: Niklas Söderlund [wsa: simplified some logic after validating intended dma_parms life cycle and added comment] Signed-off-by: Wolfram Sang Signed-off-by: Ulf Hansson commit 07bafc1e3536a4e3c422dbd13341688b54f159bb Author: Chen-Yu Tsai Date: Thu Sep 6 23:33:04 2018 +0800 mmc: sunxi: Use new timing mode for A64 eMMC controller The eMMC controller is also a new timing mode controller, but it doesn't have the timing mode switch. It does however have signal delay and calibration controls, typical of Allwinner MMC controllers that support the new timing mode. Enable the new timing mode setting for the A64 eMMC controller. This also enables MMC HS-DDR modes, which gives higher throughput for eMMC chips that support it, and can deliver such throughput. Signed-off-by: Chen-Yu Tsai Acked-by: Maxime Ripard Signed-off-by: Ulf Hansson commit 1ff9cabd545579257bbfc7f7e721c9be2e483558 Author: Chen-Yu Tsai Date: Thu Sep 6 23:31:07 2018 +0800 mmc: sunxi: Clarify new timing mode usage and implementation Newer sunxi mmc controller variants support what they call the "new timing mode". Support for this was implemented in two ways, according to the hardware that was seen at the time. The first type retained the old timing mode, and both the clock and mmc controllers had switches to select which mode was used. Both switches had to be set to the same setting. This variant was denoted with the .has_timings_switch field in the sunxi_mmc_cfg structure. This hardware is only seen on the A83T. The second type did away with the old timing mode. The clock controller no longer had the mode selection or clock delay setting bits. In some cases the mmc controller retained its mode selection bit, but this always needed to be set to the new mode, or instabilities would occur. In a few cases, such as the A64 and H6 eMMC controller, the mode selection bit is gone, but the controller still behaves like the new timing mode, requiring the module clock to be double the card clock in DDR transfer modes. This variant is denoted with the .needs_new_timings field. This patch adds more comments explaining the two fields, as well as the possibly nonexistent mode switch in the mmc controller. The .has_timings_switch is renamed to .ccu_has_timings_switch to clarify its meaning. Signed-off-by: Chen-Yu Tsai Acked-by: Maxime Ripard Signed-off-by: Ulf Hansson commit fb8bd90f83c4dd86bc7fdae406152d63c5852f92 Author: Chunyan Zhang Date: Thu Aug 30 16:21:44 2018 +0800 mmc: sdhci-sprd: Add Spreadtrum's initial host controller This patch adds the initial support of Secure Digital Host Controller Interface compliant controller found in some latest Spreadtrum chipsets. This patch has been tested on the version of SPRD-R11 controller. R11 is a variant based on SD v4.0 specification. With this driver, R11 mmc can be initialized, can be mounted, read and written. Original-by: Billows Wu Signed-off-by: Chunyan Zhang Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson commit d7f0570deefb25b9640fab20a8a9f3b35aefbf91 Author: Chunyan Zhang Date: Thu Aug 30 16:21:45 2018 +0800 dt-bindings: sdhci-sprd: Add bindings for the sdhci-sprd controller This patch adds the device-tree binding documentation for Spreadtrum SDHCI driver. Signed-off-by: Chunyan Zhang Signed-off-by: Ulf Hansson commit 7ed71a9df4baf60cfcb009b3503e19fc4964e564 Author: Chunyan Zhang Date: Thu Aug 30 16:21:43 2018 +0800 mmc: sdhci: SDMA may use Auto-CMD23 in v4 mode When Host Version 4 Enable is set to 1, SDMA uses ADMA System Address register (05Fh-058h) instead of using register (000h-004h) to indicate its system address of data location. The register (000h-004h) is re-assigned to 32-bit Block Count and Auto CMD23 argument, so then SDMA may use Auto CMD23. Signed-off-by: Chunyan Zhang Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson commit 427b6514d0953bfc1d3fd8c404dcf839bdd8196a Author: Chunyan Zhang Date: Thu Aug 30 16:21:42 2018 +0800 mmc: sdhci: Add Auto CMD Auto Select support As SD Host Controller Specification v4.10 documents: Host Controller Version 4.10 defines this "Auto CMD Auto Select" mode. Selection of Auto CMD depends on setting of CMD23 Enable in the Host Control 2 register which indicates whether card supports CMD23. If CMD23 Enable =1, Auto CMD23 is used and if CMD23 Enable =0, Auto CMD12 is used. In case of Version 4.10 or later, use of Auto CMD Auto Select is recommended rather than use of Auto CMD12 Enable or Auto CMD23 Enable. This patch add this new mode support. Signed-off-by: Chunyan Zhang Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson commit e65953d4a117a6e1d8a7abf9b59c0968da95dd6b Author: Chunyan Zhang Date: Thu Aug 30 16:21:41 2018 +0800 mmc: sdhci: Add 32-bit block count support for v4 mode Host Controller Version 4.10 re-defines SDMA System Address register as 32-bit Block Count for v4 mode, and SDMA uses ADMA System Address register (05Fh-058h) instead if v4 mode is enabled. Also when using 32-bit block count, 16-bit block count register need to be set to zero. Since using 32-bit Block Count would cause problems for auto-cmd23, it can be chosen via host->quirk2. Signed-off-by: Chunyan Zhang Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson commit 685e444bbaa0a5ed959f39dbb2f219eb44c30421 Author: Chunyan Zhang Date: Thu Aug 30 16:21:40 2018 +0800 mmc: sdhci: Add ADMA2 64-bit addressing support for V4 mode ADMA2 64-bit addressing support is divided into V3 mode and V4 mode. So there are two kinds of descriptors for ADMA2 64-bit addressing i.e. 96-bit Descriptor for V3 mode, and 128-bit Descriptor for V4 mode. 128-bit Descriptor is aligned to 8-byte. For V4 mode, ADMA2 64-bit addressing is enabled via Host Control 2 register. Signed-off-by: Chunyan Zhang Acked-by: Adrian Hunter [Ulf: Fixed conflict while applying] Signed-off-by: Ulf Hansson commit 917a0c52d6c3b47c071fa868e39689301aa9bc23 Author: Chunyan Zhang Date: Thu Aug 30 16:21:39 2018 +0800 mmc: sdhci: Change SDMA address register for v4 mode According to the SD host controller specification version 4.10, when Host Version 4 is enabled, SDMA uses ADMA System Address register (05Fh-058h) instead of using SDMA System Address register to support both 32-bit and 64-bit addressing. Signed-off-by: Chunyan Zhang Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson commit b3f80b434f7261c7ef8922f78589942d02e104f9 Author: Chunyan Zhang Date: Thu Aug 30 16:21:38 2018 +0800 mmc: sdhci: Add sd host v4 mode For SD host controller version 4.00 or later ones, there're two modes of implementation - Version 3.00 compatible mode or Version 4 mode. This patch introduced an interface to enable v4 mode. Signed-off-by: Chunyan Zhang Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson commit 18da1990d2ddc7a5a18bc22defd123edd3e9aa13 Author: Chunyan Zhang Date: Thu Aug 30 16:21:37 2018 +0800 mmc: sdhci: Add version V4 definition Added definitions for v400, v410, v420. Signed-off-by: Chunyan Zhang Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson commit e5378247fe25881b59f921485ceddf2b90260430 Author: YueHaibing Date: Tue Sep 4 10:59:09 2018 +0800 mmc: tegra: fix inconsistent IS_ERR and PTR_ERR Fix inconsistent IS_ERR and PTR_ERR in tegra_sdhci_init_pinctrl_info, the proper pointer to be passed as argument is 'pinctrl_state_1v8' Signed-off-by: YueHaibing Reviewed-by: Aapo Vienamo Signed-off-by: Ulf Hansson commit 61dad40eb955c577ae6a2cefd351c05770d67794 Author: Aapo Vienamo Date: Mon Aug 20 12:23:33 2018 +0300 mmc: tegra: Implement periodic pad calibration Rerun the pad calibration procedure before sdhci_request() if the 100 ms recalibration interval has been exceeded. Signed-off-by: Aapo Vienamo Acked-by: Adrian Hunter Acked-by: Thierry Reding Signed-off-by: Ulf Hansson commit bc5568bf4c3f5f4f73e1c0263064ca038a136649 Author: Aapo Vienamo Date: Fri Aug 10 21:14:01 2018 +0300 mmc: tegra: Implement HS400 delay line calibration Implement HS400 specific delay line calibration procedure. This is a Tegra specific procedure and has to be performed regardless whether enhanced strobe or HS400 tuning is used. Signed-off-by: Aapo Vienamo Acked-by: Adrian Hunter Acked-by: Thierry Reding Signed-off-by: Ulf Hansson commit dfc9700cef771fbafd654c93327d930585b9e44c Author: Aapo Vienamo Date: Fri Aug 10 21:14:00 2018 +0300 mmc: tegra: Implement HS400 enhanced strobe Implement eMMC HS400 enhanced strobe. Enhanced strobe is an alternative mechanism to the HS400 tuning procedure. Signed-off-by: Aapo Vienamo Acked-by: Adrian Hunter Acked-by: Thierry Reding Signed-off-by: Ulf Hansson commit f5313aaa9252eafa07c1bef81754b6377bafdbc1 Author: Aapo Vienamo Date: Fri Aug 10 21:13:59 2018 +0300 mmc: tegra: Parse and program DQS trim value Parse and program the HS400 DQS trim value from DT. Program a fallback value in case the property is missing. Signed-off-by: Aapo Vienamo Acked-by: Adrian Hunter Acked-by: Thierry Reding Signed-off-by: Ulf Hansson commit 3ecea59d27f87b0fe9ab09b0ce8262f5355ec243 Author: Aapo Vienamo Date: Fri Aug 10 21:13:58 2018 +0300 dt-bindings: mmc: Add DQS trim value to Tegra SDHCI Document HS400 DQS trim value device tree property. Signed-off-by: Aapo Vienamo Reviewed-by: Rob Herring Acked-by: Thierry Reding Signed-off-by: Ulf Hansson commit 2ad50051575c6556822c69a9053142462f2e8375 Author: Aapo Vienamo Date: Thu Aug 30 18:06:28 2018 +0300 mmc: tegra: Enable UHS and HS200 modes for Tegra186 Set nvquirks to enable higher speed modes. Signed-off-by: Aapo Vienamo Acked-by: Thierry Reding Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson commit 3559d4a6bb594b47a265c33e7f83cc56a52785b9 Author: Aapo Vienamo Date: Thu Aug 30 18:06:27 2018 +0300 mmc: tegra: Enable UHS and HS200 modes for Tegra210 Set nvquirks to enable higher speed modes. Signed-off-by: Aapo Vienamo Acked-by: Thierry Reding Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson commit 38a284d98cfed5a020915a48f2ad23f60bcf3a4c Author: Aapo Vienamo Date: Thu Aug 30 18:06:26 2018 +0300 mmc: tegra: Disable card clock during tuning cmd on Tegra210 Implement tegra210_sdhci_writew() to disable card clock and issue a reset when the tuning command is sent. This is done to prevent an intermittent hang with around 10 % failure rate during tuning. Add tegra186_sdhci_ops because this workaround is specific to Tegra210. Signed-off-by: Aapo Vienamo Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson commit f6a447fafa39c9a25c83c5dafae499e08be2eb51 Author: Aapo Vienamo Date: Thu Aug 30 18:06:25 2018 +0300 mmc: tegra: Remove tegra_sdhci_writew() from tegra210_sdhci_ops tegra_sdhci_writew() defers the write to SDHCI_TRANSFER_MODE until SDHCI_COMMAND is written. This is not necessary on Tegra210 and Tegra186 and it breaks read-modify-write operations on SDHCI_TRANSFER_MODE because writes to SDHCI_TRANSFER_MODE aren't visible until SDHCI_COMMAND has been written to. This results in tuning failures on Tegra210. Signed-off-by: Aapo Vienamo Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson commit 1070e83a346b2d775605c6c90dc60bba54029b52 Author: Aapo Vienamo Date: Thu Aug 30 18:06:24 2018 +0300 mmc: tegra: Use standard SDHCI tuning on Tegra210 and Tegra186 Add a new sdhci_ops struct for Tegra210 and Tegra186 which doesn't set the custom tuning callback used on previous SoC generations. Signed-off-by: Aapo Vienamo Acked-by: Thierry Reding Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson commit 41a0b8d748f917984e02c6a9dde7bdbad5fff036 Author: Aapo Vienamo Date: Thu Aug 30 18:06:23 2018 +0300 mmc: tegra: Configure default trim value on reset Program the outbound sampling trim value in tegra_sdhci_reset(). Unlike the outbound tap value this does not depend on the signaling mode and needs to be only programmed once. Signed-off-by: Aapo Vienamo Acked-by: Thierry Reding Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson commit c2c09678f849cec54a4783fde8db9ea2e5be7585 Author: Aapo Vienamo Date: Thu Aug 30 18:06:22 2018 +0300 mmc: tegra: Configure default tap values Set the default inbound timing adjustment tap value on reset and on non-tunable modes. The default tap value is not programmed on tunable modes because the tuning sequence is used instead to determine the tap value. Signed-off-by: Aapo Vienamo Acked-by: Thierry Reding Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson commit 85c0da1751fc1fab6f6cbf5414698a3c68d8330b Author: Aapo Vienamo Date: Thu Aug 30 18:06:21 2018 +0300 mmc: tegra: Parse default trim and tap from dt Parse the default inbound and outbound sampling trimmer values from the device tree. Signed-off-by: Aapo Vienamo Acked-by: Thierry Reding Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson commit d4501d8e884970dbe9ff1b48cf9424c97ede4cc7 Author: Aapo Vienamo Date: Thu Aug 30 18:06:20 2018 +0300 mmc: tegra: Add a workaround for tap value change glitch Add quirk to disable the card clock during configuration of the tap value in tegra_sdhci_set_tap() and issue sdhci_reset() after value change. This is a workaround to avoid propagation of a potential glitch caused by setting the tap value. Signed-off-by: Aapo Vienamo Acked-by: Thierry Reding Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson commit d943f6e91f0fe7edc4b7d21dc8cac80097a2fb9e Author: Aapo Vienamo Date: Thu Aug 30 18:06:19 2018 +0300 mmc: tegra: Enable pad calibration on Tegra210 and Tegra186 Set NVQUIRK_HAS_PADCALIB on Tegra210 and Tegra186 to enable automatic pad drive strength calibration. Signed-off-by: Aapo Vienamo Acked-by: Thierry Reding Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson commit 44babea2ea53dd8a98657fad9a5d9323522113eb Author: Aapo Vienamo Date: Thu Aug 30 18:06:18 2018 +0300 mmc: tegra: Perform pad calibration after voltage switch Run the automatic pad calibration after voltage switching if tegra_host->pad_calib_required is set. Signed-off-by: Aapo Vienamo Acked-by: Thierry Reding Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson commit 51b77c8ea784979b857ef3ef26b81c360e3a22a5 Author: Aapo Vienamo Date: Thu Aug 30 18:06:17 2018 +0300 mmc: tegra: Program pad autocal offsets from dt Parse the pad drive strength calibration offsets from the device tree. Program the calibration offsets in accordance with the current signaling mode. Signed-off-by: Aapo Vienamo Acked-by: Thierry Reding Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson commit 887bda8f21ee78b14678853ee6ecdd6569196054 Author: Aapo Vienamo Date: Thu Aug 30 18:06:16 2018 +0300 mmc: tegra: Disable card clock during pad calibration Disable the card clock during automatic pad drive strength calibration and re-enable it afterwards. Signed-off-by: Aapo Vienamo Acked-by: Thierry Reding Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson commit 212b0cf14178663576ea3c01f25abe2f83d23565 Author: Aapo Vienamo Date: Thu Aug 30 18:06:15 2018 +0300 mmc: tegra: Power on the calibration pad Automatic pad drive strength calibration is performed on a separate pad identical to the ones used for driving the actual bus. Power on the calibration pad during the calibration procedure and power it off afterwards to save power. Signed-off-by: Aapo Vienamo Reviewed-by: Mikko Perttunen Acked-by: Thierry Reding Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson commit 9d548f118f57900449743709e8ba492efbe54be0 Author: Aapo Vienamo Date: Thu Aug 30 18:06:14 2018 +0300 mmc: tegra: Set calibration pad voltage reference Configure the voltage reference used by the automatic pad drive strength calibration procedure. The value is a magic number from the TRM. Signed-off-by: Aapo Vienamo Acked-by: Thierry Reding Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson commit e7c071489ecc3d1bd8e24086fc617b23ea0adb34 Author: Aapo Vienamo Date: Thu Aug 30 18:06:13 2018 +0300 mmc: tegra: Poll for calibration completion Implement polling with 10 ms timeout for automatic pad drive strength calibration. Signed-off-by: Aapo Vienamo Acked-by: Thierry Reding Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson commit 86ac2f8bf90a7fe0381794bebf7c287e6333f65d Author: Aapo Vienamo Date: Thu Aug 30 18:06:12 2018 +0300 mmc: tegra: Reconfigure pad voltages during voltage switching Parse the pinctrl state and nvidia,only-1-8-v properties from the device tree. Validate the pinctrl and regulator configuration before unmasking UHS modes. Implement pad voltage state reconfiguration in the mmc start_signal_voltage_switch() callback. Add NVQUIRK_NEEDS_PAD_CONTROL and add set it for Tegra210 and Tegra186. The pad configuration is done in the mmc callback because the order of pad reconfiguration and sdhci voltage switch depend on the voltage to which the transition occurs. Signed-off-by: Aapo Vienamo Acked-by: Thierry Reding Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson commit b7783cfbd1589b877d3171ccb7bf2d526776ad7c Author: Aapo Vienamo Date: Thu Aug 30 18:06:05 2018 +0300 dt-bindings: mmc: Add Tegra SDHCI sampling trimmer values Document the Tegra SDHCI inbound and outbound sampling trimmer values. Signed-off-by: Aapo Vienamo Reviewed-by: Rob Herring Acked-by: Thierry Reding Signed-off-by: Ulf Hansson commit 1dd2a75809163a7f0db2ef180c9201a2fb71001e Author: Aapo Vienamo Date: Thu Aug 30 18:06:04 2018 +0300 dt-bindings: Add Tegra SDHCI pad pdpu offset bindings Add bindings documentation for pad pull up and pull down offset values to be programmed before executing automatic pad drive strength calibration. Signed-off-by: Aapo Vienamo Reviewed-by: Rob Herring Acked-by: Thierry Reding Signed-off-by: Ulf Hansson commit 3700cdf8e325ba693fc5010320ba01d638894365 Author: Aapo Vienamo Date: Thu Aug 30 18:06:03 2018 +0300 dt-bindings: mmc: tegra: Add pad voltage control properties Document the pinctrl bindings used by the SDHCI driver to reconfigure pad voltages on controllers supporting multiple voltage levels. Signed-off-by: Aapo Vienamo Reviewed-by: Mikko Perttunen Reviewed-by: Rob Herring Acked-by: Thierry Reding Signed-off-by: Ulf Hansson commit 75586bb94975ac3ae602001ff54ba56890cd823e Author: Wolfram Sang Date: Thu Aug 30 14:16:03 2018 +0200 mmc: tmio: remove now unused variable This variable is unused now after some refactoring. Signed-off-by: Wolfram Sang Signed-off-by: Ulf Hansson commit 4c595c057a2962642fb261fad8451d8b0264f5e1 Author: Wolfram Sang Date: Thu Aug 30 14:14:38 2018 +0200 mmc: tmio: more concise clk calculation Concise, but still readable. Signed-off-by: Wolfram Sang Signed-off-by: Ulf Hansson commit b85fb0a1c8aeaaa40d08945d51a6656b512173f0 Author: Masaharu Hayakawa Date: Thu Aug 30 01:32:07 2018 +0200 mmc: tmio: Fix SCC error detection SDR104, HS200 and HS400 need to check for SCC error. If SCC error is detected, retuning is necessary. Signed-off-by: Masaharu Hayakawa [Niklas: update commit message] Signed-off-by: Niklas Söderlund Reviewed-by: Wolfram Sang Tested-by: Wolfram Sang Signed-off-by: Ulf Hansson commit 75f349a153062d507b99b9ef35e9ad9531cc0fd0 Author: Masaharu Hayakawa Date: Thu Aug 30 01:32:06 2018 +0200 mmc: renesas_sdhi: skip SCC error check when retuning Checking for SCC error during retuning is unnecessary. Signed-off-by: Masaharu Hayakawa [Niklas: fix small style issue] Signed-off-by: Niklas Söderlund Reviewed-by: Wolfram Sang Tested-by: Wolfram Sang Signed-off-by: Ulf Hansson commit cbf6d82cad4a507475d92d380228302fe668dd94 Author: Niklas Söderlund Date: Thu Aug 30 01:32:05 2018 +0200 mmc: core: add helper to see if a host is doing a retune Add a helper to allow host drivers checking if a retune is in progress. Signed-off-by: Niklas Söderlund Reviewed-by: Wolfram Sang Tested-by: Wolfram Sang Signed-off-by: Ulf Hansson commit db4cea918e11d1cd1cb870049b2af17fe99d7b94 Author: Masahiro Yamada Date: Thu Aug 23 13:44:20 2018 +0900 mmc: tmio: refactor CLK_CTL bit calculation for (clk = 0x80000080; new_clock >= (clock << 1); clk >>= 1) clock <<= 1; ... is too tricky, hence I replaced with roundup_pow_of_two(divisor) >> 2 '(clk >> 22) & 0x1' is the bit test for the 1/1 divisor, but it is not clear. 'divisor <= 1' is easier to understand. Signed-off-by: Masahiro Yamada Reviewed-by: Wolfram Sang Tested-by: Wolfram Sang Signed-off-by: Ulf Hansson commit 68f83127fe750c8b270361f4353cc9d76b0286d6 Author: Masahiro Yamada Date: Thu Aug 23 13:44:19 2018 +0900 mmc: renesas_sdhi: merge clk_{start,stop} functions to set_clock renesas_sdhi_clk_start() and renesas_sdhi_clk_stop() are now only called from renesas_sdhi_set_clock(). Merge them. Signed-off-by: Masahiro Yamada Reviewed-by: Wolfram Sang Tested-by: Wolfram Sang Signed-off-by: Ulf Hansson commit b85c997d2cfefe7d1f706b85ae46e35a50e3131c Author: Jisheng Zhang Date: Tue Aug 28 17:48:14 2018 +0800 mmc: sdhci-of-dwcmshc: solve 128MB DMA boundary limitation When using DMA, if the DMA addr spans 128MB boundary, we have to split the DMA transfer into two so that each one doesn't exceed the boundary. Signed-off-by: Jisheng Zhang Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson commit 54552e4948cbfc87ba2fe81566cd4a8d7195a033 Author: Jisheng Zhang Date: Tue Aug 28 17:47:23 2018 +0800 mmc: sdhci: introduce adma_write_desc() hook to struct sdhci_ops Add this hook so that it can be overridden with driver specific implementations. We also let the original sdhci_adma_write_desc() accept &desc so that the function can set its new value. Then export the function so that it could be reused by driver's specific implementations. Signed-off-by: Jisheng Zhang Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson commit e93be38af15524a43437b23b01bcfe9cb789f4e3 Author: Jisheng Zhang Date: Tue Aug 28 17:46:35 2018 +0800 mmc: sdhci: add adma_table_cnt member to struct sdhci_host This patch adds adma_table_cnt member to struct sdhci_host to give more flexibility to drivers to control the ADMA table count. Default value of adma_table_cnt is set to (SDHCI_MAX_SEGS * 2 + 1). Signed-off-by: Jisheng Zhang Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson commit 1ff537bd5d7b7d608d61cadae28224202781ba5b Author: Rob Herring Date: Mon Aug 27 20:52:33 2018 -0500 mmc: 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: Adrian Hunter Cc: Hu Ziji Cc: Ulf Hansson Cc: linux-mmc@vger.kernel.org Signed-off-by: Rob Herring Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson commit d462c1b474529f004437e967bffb8e55471ef1fa Author: Aapo Vienamo Date: Mon Aug 20 12:23:32 2018 +0300 mmc: sdhci: Export sdhci_request() Allow SDHCI drivers to hook code before and after sdhci_request() by making it externally visible. Signed-off-by: Aapo Vienamo Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson commit 96ccb858093d397f77a4282ca98c87e28ae547ee Author: Wang Dongsheng Date: Thu Aug 16 12:48:43 2018 +0800 sdhci: acpi: add qcom sdhci host reset quirk fix After host requests RESET_FOR_ALL action, the hardware output an interrupt for OS and waiting for the OS to approve. Before writing this fix, ACPI GED has handled the interrupt. But the ACPI GED belongs to a slow process, and sometimes the handling process time is more than 100ms(Mutex wait more than 100ms). So drop the GED solution and add this quirk fix. Signed-off-by: Wang Dongsheng Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson commit c7eabbee3de99347105faa7fd925a500ccf43baf Author: Wang Dongsheng Date: Thu Aug 16 12:48:42 2018 +0800 sdhci: acpi: add free_slot callback The device specific resource can be free in free_slot after removing host controller. Signed-off-by: Wang Dongsheng Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson commit b1f378ab5334d96e661dd74586210a476b498802 Author: Yinbo Zhu Date: Thu Aug 23 16:48:32 2018 +0800 mmc: sdhci-of-esdhc: add erratum A008171 support In tuning mode of operation, when TBCTL[TB_EN] is set, eSDHC may report one of the following errors : 1)Tuning error while running tuning operation where SYSCTL2[SAMPCLKSEL] will not get set even when SYSCTL2[EXTN] is reset. OR 2)Data transaction error (e.g. IRQSTAT[DCE], IRQSTAT[DEBE]) during data transaction errors. This issue occurs when the data window sampled within eSDHC is in full cycle. So, in that case, eSDHC is not able to find out the start and end points of the data window and sets the sampling pointer at default location (which is middle of the internal SD clock). If this sampling point coincides with the data eye boundary, then it can result in the above mentioned errors. Impact: Tuning mode of operation for SDR50, SDR104 or HS200 speed modes may not work properly Workaround: In case eSDHC reports tuning error or data errors in tuning mode of operation, by add the erratum A008171 support to fix the issue. Signed-off-by: Yinbo Zhu Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson commit 7d8bb1f46e1360a5c16d8addfc33f08089f8989d Author: Yinbo Zhu Date: Thu Aug 23 16:48:31 2018 +0800 mmc: sdhci: add tuning error codes This patch is to add tuning error codes to judge tuning state Signed-off-by: Yinbo Zhu Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson commit 3fd784f745dd1747863775a99ec749619ee6759c Author: Masahiro Yamada Date: Thu Aug 23 13:44:18 2018 +0900 mmc: uniphier-sd: add UniPhier SD/eMMC controller driver Here is another TMIO MMC variant found in Socionext UniPhier SoCs. As commit b6147490e6aa ("mmc: tmio: split core functionality, DMA and MFD glue") said, these MMC controllers use the IP from Panasonic. However, the MMC controller in the TMIO (Toshiba Mobile IO) MFD chip was the first upstreamed user of this IP. The common driver code for this IP is now called 'tmio-mmc-core' in Linux although it is a historical misnomer. Anyway, this driver select's MMC_TMIO_CORE to borrow the common code from tmio-mmc-core.c Older UniPhier SoCs (LD4, Pro4, sLD8) support the external DMA engine like renesas_sdhi_sys_dmac.c. The difference is UniPhier SoCs use a single DMA channel whereas Renesas chips request separate channels for RX and TX. Newer UniPhier SoCs (Pro5 and later) support the internal DMA engine like renesas_sdhi_internal_dmac.c The register map is almost the same, so I guess Renesas and Socionext use the same internal DMA hardware. The main difference is, the register offsets are doubled for Renesas. Renesas Socionext SDHI UniPhier DM_CM_DTRAN_MODE 0x820 0x410 DM_CM_DTRAN_CTRL 0x828 0x414 DM_CM_RST 0x830 0x418 DM_CM_INFO1 0x840 0x420 DM_CM_INFO1_MASK 0x848 0x424 DM_CM_INFO2 0x850 0x428 DM_CM_INFO2_MASK 0x858 0x42c DM_DTRAN_ADDR 0x880 0x440 DM_DTRAN_ADDREX --- 0x444 This comes from the difference of host->bus_shift; 2 for Renesas SoCs, and 1 for UniPhier SoCs. Also, the datasheet for UniPhier SoCs defines DM_DTRAN_ADDR and DM_DTRAN_ADDREX as two separate registers. It could be possible to factor out the DMA common code by introducing some hooks to cope with platform quirks, but this patch does not touch that for now. Signed-off-by: Masahiro Yamada Acked-by: Wolfram Sang Signed-off-by: Ulf Hansson commit fb19fdf48ddc566055e8cd1aeb372299c6ea43e2 Author: Masahiro Yamada Date: Thu Aug 23 13:44:17 2018 +0900 dt-bindings: mmc: add DT binding for UniPhier SD/eMMC controller This SD/eMMC controller is used for UniPhier SoC family. Signed-off-by: Masahiro Yamada Reviewed-by: Rob Herring Acked-by: Wolfram Sang Signed-off-by: Ulf Hansson commit 0196c8db8363f7627df6f78615271ae0ba430500 Author: Masahiro Yamada Date: Thu Aug 23 13:44:16 2018 +0900 mmc: tmio: move tmio_mmc_set_clock() to platform hook tmio_mmc_set_clock() is full of quirks because different SoC vendors extended this in different ways. The original IP defines the divisor range 1/2 ... 1/512. bit 7 is set: 1/512 bit 6 is set: 1/256 ... bit 0 is set: 1/4 all bits clear: 1/2 It is platform-dependent how to achieve the 1/1 clock. I guess the TMIO-MFD variant uses the clock selector outside of this IP, as far as I see tmio_core_mmc_clk_div() in drivers/mfd/tmio_core.c I guess bit[7:0]=0xff is Renesas-specific extension. Socionext (and Panasonic) uses bit 10 (CLKSEL) for 1/1. Also, newer versions of UniPhier SoC variants use bit 16 for 1/1024. host->clk_update() is only used by the Renesas variants, whereas host->set_clk_div() is only used by the TMIO-MFD variants. To cope with this mess, promote tmio_mmc_set_clock() to a new platform hook ->set_clock(), and melt the old two hooks into it. Signed-off-by: Masahiro Yamada Reviewed-by: Wolfram Sang Signed-off-by: Ulf Hansson commit 74005a01f1ff66f98bf24163297932144d4da1ae Author: Masahiro Yamada Date: Thu Aug 23 13:44:15 2018 +0900 mmc: tmio: replace tmio_mmc_clk_stop() calls with tmio_mmc_set_clock() tmio_mmc_clk_stop(host) is equivalent to tmio_mmc_set_clock(host, 0). This replacement is needed for the next commit. Signed-off-by: Masahiro Yamada Reviewed-by: Wolfram Sang Signed-off-by: Ulf Hansson commit a0c938b5dd701ca36ef0eea8298bb5a36cc7d314 Author: Paul Cercueil Date: Tue Aug 21 17:21:51 2018 +0200 mmc: jz4740: Add support for the JZ4725B The JZ4725B is the first JZ SoC version that introduced a 32-bit IMASK register, not the JZ4750. Signed-off-by: Paul Cercueil Signed-off-by: Ulf Hansson commit f707079df8f7c254faa1eb63dcd7fd30afc3e217 Author: Wolfram Sang Date: Wed Aug 22 00:02:17 2018 +0200 mmc: use SPDX identifier for Renesas drivers Signed-off-by: Wolfram Sang Reviewed-by: Simon Horman Signed-off-by: Ulf Hansson commit 00c6527b8311e598ad9bfec8415fe96a94fa1b1b Author: Sergei Shtylyov Date: Tue Aug 21 22:14:12 2018 +0300 dt-bindings: mmc: tmio_mmc: document Renesas R8A77970 bindings Document the R-Car V3M (R8A77970) SoC in the R-Car SDHI bindings -- it's the usual R-Car gen3 compatible controller with the internal DMA engine. Signed-off-by: Sergei Shtylyov Signed-off-by: Ulf Hansson Reviewed-by: Simon Horman commit 16a129b3caacb9bf86187de8342986457e09faa9 Author: Sergei Shtylyov Date: Sat Aug 18 21:08:26 2018 +0300 mmc: renesas_sdhi_internal_dmac: add R8A77970 to whitelist I've successfully tested eMMC on the V3H Starter Kit board and since the R8A77970 SoC has a single SDHI core, it can't be a subject to the known RX DMA errata. Signed-off-by: Sergei Shtylyov Reviewed-by: Wolfram Sang Signed-off-by: Ulf Hansson Reviewed-by: Simon Horman commit c1ec8f866f0a04598247d8d9f612606a82b20ff2 Author: Sergei Shtylyov Date: Fri Aug 17 23:19:02 2018 +0300 mmc: renesas_sdhi_internal_dmac: Fix a few typos Remove the stray underscore in the DM_CM_DTRAN_MODE.BUS_WIDTH register field name and fix the typo in the comment of the #define DTRAN_MODE_CH_NUM_CH1. Signed-off-by: Sergei Shtylyov Reviewed-by: Wolfram Sang Reviewed-by: Simon Horman Signed-off-by: Ulf Hansson commit 685bc885b7f85e3215638b7064fcdaee9abecc87 Author: Paul Cercueil Date: Tue Aug 21 15:03:20 2018 +0200 mmc: jz4740: Drop dependency on MACH_JZ4740/80 Depending on MACH_JZ4740 | MACH_JZ4780 prevent us from creating a generic kernel that works on more than one MIPS board. Instead, we just depend on MIPS being set. Signed-off-by: Paul Cercueil Signed-off-by: Ulf Hansson commit ed3ae724003f063bffd1a9d2e37682243ee06923 Author: Igor Opaniuk Date: Mon Aug 20 16:04:57 2018 +0300 mmc: dw_mmc: hi3798cv200: add MMC_CAP_CMD23 cap Enable access to the RPMB on the on-board eMMC of the Poplar board. Signed-off-by: Igor Opaniuk Acked-by: Shawn Guo Signed-off-by: Ulf Hansson commit 722c68a52b486b470b8da89956cde99be5d413ac Author: Fabrizio Castro Date: Tue Aug 14 13:34:34 2018 +0100 mmc: renesas_sdhi: 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 Reviewed-by: Wolfram Sang Signed-off-by: Ulf Hansson commit 2e1501a8bdd49eaa0e967c0ad00e9dcd68d0b30f Author: Fabrizio Castro Date: Tue Aug 14 13:34:33 2018 +0100 mmc: renesas_sdhi_internal_dmac: Whitelist r8a774a1 We need r8a774a1 to be whitelisted for SDHI to work on the RZ/G2M, but we don't care about the revision of the SoC, so just whitelist the generic part number. Signed-off-by: Fabrizio Castro Reviewed-by: Biju Das Reviewed-by: Simon Horman Reviewed-by: Wolfram Sang Signed-off-by: Ulf Hansson commit 60208a267208c27fa3f23dfd36cbda180471fa98 Author: Michal Simek Date: Mon Aug 6 10:43:10 2018 +0200 mmc: sdhci-of-arasan: Do now show error message in case of deffered probe When mmc-pwrseq property is passed mmc_pwrseq_alloc() can return -EPROBE_DEFER because driver for power sequence provider is not probed yet. Do not show error message when this situation happens. Signed-off-by: Michal Simek Signed-off-by: Ulf Hansson commit 7c7ba4334e5cfedb5b93ffee216b67dfa9f4135d Author: Srinath Mannam Date: Sun Aug 5 13:22:52 2018 +0530 mmc: sdhci-iproc: Add ACPI support Add ACPI support to all IPROC SDHCI variants. Signed-off-by: Srinath Mannam Reviewed-by: Ray Jui Reviewed-by: Scott Branden Reviewed-by: Vladimir Olovyannikov Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson commit 8199d312dad790327cb290e5a856fdbfbc861a96 Author: Adrian Hunter Date: Sun Aug 5 13:22:51 2018 +0530 mmc: sdhci-pltfm: Convert DT properties to generic device properties Convert DT properties to generic device properties so that drivers can get properties from DT or ACPI. Signed-off-by: Adrian Hunter Tested-by: Srinath Mannam Signed-off-by: Ulf Hansson commit ec3a94188df7d28b374868d9a2a0face910e62ab Author: Ingo Molnar Date: Mon Oct 8 10:41:59 2018 +0200 x86/fsgsbase/64: Clean up various details So: - use 'extern' consistently for APIs - fix weird header guard - clarify code comments - reorder APIs by type Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Chang S. Bae Cc: Dave Hansen Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Markus T Metzger Cc: Peter Zijlstra Cc: Ravi Shankar Cc: Rik van Riel Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Link: http://lkml.kernel.org/r/1537312139-5580-2-git-send-email-chang.seok.bae@intel.com Signed-off-by: Ingo Molnar commit 22245bdf0ad805d6c29f82b6d5e977ee94bb2166 Author: Ingo Molnar Date: Mon Oct 8 10:41:59 2018 +0200 x86/segments: Introduce the 'CPUNODE' naming to better document the segment limit CPU/node NR trick We have a special segment descriptor entry in the GDT, whose sole purpose is to encode the CPU and node numbers in its limit (size) field. There are user-space instructions that allow the reading of the limit field, which gives us a really fast way to read the CPU and node IDs from the vDSO for example. But the naming of related functionality does not make this clear, at all: VDSO_CPU_SIZE VDSO_CPU_MASK __CPU_NUMBER_SEG GDT_ENTRY_CPU_NUMBER vdso_encode_cpu_node vdso_read_cpu_node There's a number of problems: - The 'VDSO_CPU_SIZE' doesn't really make it clear that these are number of bits, nor does it make it clear which 'CPU' this refers to, i.e. that this is about a GDT entry whose limit encodes the CPU and node number. - Furthermore, the 'CPU_NUMBER' naming is actively misleading as well, because the segment limit encodes not just the CPU number but the node ID as well ... So use a better nomenclature all around: name everything related to this trick as 'CPUNODE', to make it clear that this is something special, and add _BITS to make it clear that these are number of bits, and propagate this to every affected name: VDSO_CPU_SIZE => VDSO_CPUNODE_BITS VDSO_CPU_MASK => VDSO_CPUNODE_MASK __CPU_NUMBER_SEG => __CPUNODE_SEG GDT_ENTRY_CPU_NUMBER => GDT_ENTRY_CPUNODE vdso_encode_cpu_node => vdso_encode_cpunode vdso_read_cpu_node => vdso_read_cpunode This, beyond being less confusing, also makes it easier to grep for all related functionality: $ git grep -i cpunode arch/x86 Also, while at it, fix "return is not a function" style sloppiness in vdso_encode_cpunode(). Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Chang S. Bae Cc: Dave Hansen Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Markus T Metzger Cc: Peter Zijlstra Cc: Ravi Shankar Cc: Rik van Riel Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Link: http://lkml.kernel.org/r/1537312139-5580-2-git-send-email-chang.seok.bae@intel.com Signed-off-by: Ingo Molnar commit b2e2ba578e016a091eb31565849990fe68c7c599 Author: Chang S. Bae Date: Tue Sep 18 16:08:59 2018 -0700 x86/vdso: Initialize the CPU/node NR segment descriptor earlier Currently the CPU/node NR segment descriptor (GDT_ENTRY_CPU_NUMBER) is initialized relatively late during CPU init, from the vCPU code, which has a number of disadvantages, such as hotplug CPU notifiers and SMP cross-calls. Instead just initialize it much earlier, directly in cpu_init(). This reduces complexity and increases robustness. [ mingo: Wrote new changelog. ] Suggested-by: H. Peter Anvin Suggested-by: Andy Lutomirski Signed-off-by: Chang S. Bae Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Denys Vlasenko Cc: Linus Torvalds Cc: Markus T Metzger Cc: Peter Zijlstra Cc: Ravi Shankar Cc: Rik van Riel Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1537312139-5580-9-git-send-email-chang.seok.bae@intel.com Signed-off-by: Ingo Molnar commit ffebbaedc8616cffe648202e364dce6a045d65a2 Author: Chang S. Bae Date: Tue Sep 18 16:08:58 2018 -0700 x86/vdso: Introduce helper functions for CPU and node number Clean up the CPU/node number related code a bit, to make it more apparent how we are encoding/extracting the CPU and node fields from the segment limit. No change in functionality intended. [ mingo: Wrote new changelog. ] Suggested-by: Andy Lutomirski Suggested-by: Thomas Gleixner Signed-off-by: Chang S. Bae Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Markus T Metzger Cc: Peter Zijlstra Cc: Ravi Shankar Cc: Rik van Riel Link: http://lkml.kernel.org/r/1537312139-5580-8-git-send-email-chang.seok.bae@intel.com Signed-off-by: Ingo Molnar commit c4755613a1339ea77dbb15de75c9f74217209265 Author: Chang S. Bae Date: Tue Sep 18 16:08:57 2018 -0700 x86/segments/64: Rename the GDT PER_CPU entry to CPU_NUMBER The old 'per CPU' naming was misleading: 64-bit kernels don't use this GDT entry for per CPU data, but to store the CPU (and node) ID. [ mingo: Wrote new changelog. ] Suggested-by: H. Peter Anvin Signed-off-by: Chang S. Bae Reviewed-by: Thomas Gleixner Acked-by: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Denys Vlasenko Cc: Linus Torvalds Cc: Markus T Metzger Cc: Peter Zijlstra Cc: Ravi Shankar Cc: Rik van Riel Link: http://lkml.kernel.org/r/1537312139-5580-7-git-send-email-chang.seok.bae@intel.com Signed-off-by: Ingo Molnar commit f4550b52e495e1b634d1f2c1004bcea5dc3321ea Author: Chang S. Bae Date: Tue Sep 18 16:08:56 2018 -0700 x86/fsgsbase/64: Factor out FS/GS segment loading from __switch_to() Instead of open coding the calls to load_seg_legacy(), introduce x86_fsgsbase_load() to load FS/GS segments. This makes it more explicit that this is part of FSGSBASE functionality, and the new helper can be updated when FSGSBASE instructions are enabled. [ mingo: Wrote new changelog. ] Signed-off-by: Chang S. Bae Reviewed-by: Andi Kleen Reviewed-by: Andy Lutomirski Reviewed-by: Thomas Gleixner Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Markus T Metzger Cc: Peter Zijlstra Cc: Ravi Shankar Cc: Rik van Riel Link: http://lkml.kernel.org/r/1537312139-5580-6-git-send-email-chang.seok.bae@intel.com Signed-off-by: Ingo Molnar commit 824eea38d239fb2a6027e65e18a5daef23019b00 Author: Chang S. Bae Date: Tue Sep 18 16:08:55 2018 -0700 x86/fsgsbase/64: Convert the ELF core dump code to the new FSGSBASE helpers Replace open-coded rdmsr()'s with their API counterparts. No change in functionality intended. [ mingo: Wrote new changelog. ] Based-on-code-from: Andy Lutomirski Signed-off-by: Chang S. Bae Reviewed-by: Andi Kleen Reviewed-by: Andy Lutomirski Reviewed-by: Thomas Gleixner Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Markus T Metzger Cc: Peter Zijlstra Cc: Ravi Shankar Cc: Rik van Riel Link: http://lkml.kernel.org/r/1537312139-5580-5-git-send-email-chang.seok.bae@intel.com Signed-off-by: Ingo Molnar commit e696c231bebf5f17fe0c5e465c01511320668054 Author: Chang S. Bae Date: Tue Sep 18 16:08:54 2018 -0700 x86/fsgsbase/64: Make ptrace use the new FS/GS base helpers Use the new FS/GS base helper functions in in the platform specific ptrace implementation of the following APIs: PTRACE_ARCH_PRCTL, PTRACE_SETREG, PTRACE_GETREG, etc. The fsgsbase code is more abstracted out this way and the FS/GS-update mechanism will be easier to change this way. [ mingo: Wrote new changelog. ] Based-on-code-from: Andy Lutomirski Signed-off-by: Chang S. Bae Cc: 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: Markus T Metzger Cc: Peter Zijlstra Cc: Ravi Shankar Cc: Rik van Riel Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1537312139-5580-4-git-send-email-chang.seok.bae@intel.com Signed-off-by: Ingo Molnar commit b1378a561fd16afdd96ef0bc912b1bcd2b85a68e Author: Chang S. Bae Date: Tue Sep 18 16:08:53 2018 -0700 x86/fsgsbase/64: Introduce FS/GS base helper functions Introduce FS/GS base access functionality via , not yet used by anything directly. Factor out task_seg_base() from x86/ptrace.c and rename it to x86_fsgsbase_read_task() to make it part of the new helpers. This will allow us to enhance FSGSBASE support and eventually enable the FSBASE/GSBASE instructions. An "inactive" GS base refers to a base saved at kernel entry and being part of an inactive, non-running/stopped user-task. (The typical ptrace model.) Here are the new functions: x86_fsbase_read_task() x86_gsbase_read_task() x86_fsbase_write_task() x86_gsbase_write_task() x86_fsbase_read_cpu() x86_fsbase_write_cpu() x86_gsbase_read_cpu_inactive() x86_gsbase_write_cpu_inactive() As an advantage of the unified namespace we can now see all FS/GSBASE API use in the kernel via the following 'git grep' pattern: $ git grep x86_.*sbase [ mingo: Wrote new changelog. ] Based-on-code-from: Andy Lutomirski Suggested-by: Ingo Molnar Signed-off-by: Chang S. Bae Cc: 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: Markus T Metzger Cc: Peter Zijlstra Cc: Ravi Shankar Cc: Rik van Riel Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1537312139-5580-3-git-send-email-chang.seok.bae@intel.com Signed-off-by: Ingo Molnar commit 07e1d88adaaeab247b300926f78cc3f950dbeda3 Author: Andy Lutomirski Date: Tue Sep 18 16:08:52 2018 -0700 x86/fsgsbase/64: Fix ptrace() to read the FS/GS base accurately On 64-bit kernels ptrace can read the FS/GS base using the register access APIs (PTRACE_PEEKUSER, etc.) or PTRACE_ARCH_PRCTL. Make both of these mechanisms return the actual FS/GS base. This will improve debuggability by providing the correct information to ptracer such as GDB. [ chang: Rebased and revised patch description. ] [ mingo: Revised the changelog some more. ] Signed-off-by: Andy Lutomirski Signed-off-by: Chang S. Bae Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Markus T Metzger Cc: Peter Zijlstra Cc: Ravi Shankar Cc: Rik van Riel Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1537312139-5580-2-git-send-email-chang.seok.bae@intel.com Signed-off-by: Ingo Molnar commit edfbeecd92b0c4a648ed96a7e255bfc9a1bc4642 Merge: c808c09b527c fb1c592cf4c9 Author: Ingo Molnar Date: Mon Oct 8 10:40:34 2018 +0200 Merge branch 'linus' into x86/asm, to pick up fixes Signed-off-by: Ingo Molnar commit a2046de99193efd870eee4f2055c33bb4e5b4fe2 Merge: 31ce8c4a1ad2 e4052d06a519 Author: Daniel Borkmann Date: Mon Oct 8 10:24:14 2018 +0200 Merge branch 'bpf-to-bpf-calls-nfp' Quentin Monnet says: ==================== This patch series adds support for hardware offload of programs containing BPF-to-BPF function calls. First, a new callback is added to the kernel verifier, to collect information after the main part of the verification has been performed. Then support for BPF-to-BPF calls is incrementally added to the nfp driver, before offloading programs containing such calls is eventually allowed by lifting the restriction in the kernel verifier, in the last patch. Please refer to individual patches for details. Many thanks to Jiong and Jakub for their precious help and contribution on the main patches for the JIT-compiler, and everything related to stack accesses. ==================== Signed-off-by: Daniel Borkmann commit e4052d06a5195b29271a7af262711d69f9ecfd04 Author: Quentin Monnet Date: Sun Oct 7 12:56:58 2018 +0100 bpf: allow offload of programs with BPF-to-BPF function calls Now that there is at least one driver supporting BPF-to-BPF function calls, lift the restriction, in the verifier, on hardware offload of eBPF programs containing such calls. But prevent jit_subprogs(), still in the verifier, from being run for offloaded programs. Signed-off-by: Quentin Monnet Reviewed-by: Jiong Wang Reviewed-by: Jakub Kicinski Signed-off-by: Daniel Borkmann commit 7ff0ccde43664e3de9fe60edc19466f16cda6b7a Author: Quentin Monnet Date: Sun Oct 7 12:56:57 2018 +0100 nfp: bpf: support pointers to other stack frames for BPF-to-BPF calls Mark instructions that use pointers to areas in the stack outside of the current stack frame, and process them accordingly in mem_op_stack(). This way, we also support BPF-to-BPF calls where the caller passes a pointer to data in its own stack frame to the callee (typically, when the caller passes an address to one of its local variables located in the stack, as an argument). Thanks to Jakub and Jiong for figuring out how to deal with this case, I just had to turn their email discussion into this patch. Suggested-by: Jiong Wang Suggested-by: Jakub Kicinski Signed-off-by: Quentin Monnet Reviewed-by: Jiong Wang Reviewed-by: Jakub Kicinski Signed-off-by: Daniel Borkmann commit 445496231445aad46866a858a384b428cd073977 Author: Quentin Monnet Date: Sun Oct 7 12:56:56 2018 +0100 nfp: bpf: optimise save/restore for R6~R9 based on register usage When pre-processing the instructions, it is trivial to detect what subprograms are using R6, R7, R8 or R9 as destination registers. If a subprogram uses none of those, then we do not need to jump to the subroutines dedicated to saving and restoring callee-saved registers in its prologue and epilogue. This patch introduces detection of callee-saved registers in subprograms and prevents the JIT from adding calls to those subroutines whenever we can: we save some instructions in the translated program, and some time at runtime on BPF-to-BPF calls and returns. If no subprogram needs to save those registers, we can avoid appending the subroutines at the end of the program. Signed-off-by: Quentin Monnet Reviewed-by: Jakub Kicinski Signed-off-by: Daniel Borkmann commit 2178f3f0dc200557312e783aa683b87794084ae2 Author: Quentin Monnet Date: Sun Oct 7 12:56:55 2018 +0100 nfp: bpf: fix return address from register-saving subroutine to callee On performing a BPF-to-BPF call, we first jump to a subroutine that pushes callee-saved registers (R6~R9) to the stack, and from there we goes to the start of the callee next. In order to do so, the caller must pass to the subroutine the address of the NFP instruction to jump to at the end of that subroutine. This cannot be reliably implemented when translated the caller, as we do not always know the start offset of the callee yet. This patch implement the required fixup step for passing the start offset in the callee via the register used by the subroutine to hold its return address. Signed-off-by: Quentin Monnet Reviewed-by: Jakub Kicinski Signed-off-by: Daniel Borkmann commit bdf4c66faf5fa6fd5ffb0b59c39c7629103d6479 Author: Quentin Monnet Date: Sun Oct 7 12:56:54 2018 +0100 nfp: bpf: update fixup function for BPF-to-BPF calls support Relocation for targets of BPF-to-BPF calls are required at the end of translation. Update the nfp_fixup_branches() function in that regard. When checking that the last instruction of each bloc is a branch, we must account for the length of the instructions required to pop the return address from the stack. Signed-off-by: Quentin Monnet Signed-off-by: Jiong Wang Reviewed-by: Jakub Kicinski Signed-off-by: Daniel Borkmann commit fb1981654129e9c71af4c0f2782c5ffde8cbf37f Author: Quentin Monnet Date: Sun Oct 7 12:56:53 2018 +0100 nfp: bpf: account for additional stack usage when checking stack limit Offloaded programs using BPF-to-BPF calls use the stack to store the return address when calling into a subprogram. Callees also need some space to save eBPF registers R6 to R9. And contrarily to kernel verifier, we align stack frames on 64 bytes (and not 32). Account for all this when checking the stack size limit before JIT-ing the program. This means we have to recompute maximum stack usage for the program, we cannot get the value from the kernel. In addition to adapting the checks on stack usage, move them to the finalize() callback, now that we have it and because such checks are part of the verification step rather than translation. Signed-off-by: Quentin Monnet Reviewed-by: Jakub Kicinski Signed-off-by: Daniel Borkmann commit 389f263b60c9a3168d47eeb44b6a07bd2b8c66e2 Author: Quentin Monnet Date: Sun Oct 7 12:56:52 2018 +0100 nfp: bpf: add main logics for BPF-to-BPF calls support in nfp driver This is the main patch for the logics of BPF-to-BPF calls in the nfp driver. The functions called on BPF_JUMP | BPF_CALL and BPF_JUMP | BPF_EXIT were used to call helpers and exit from the program, respectively; make them usable for calling into, or returning from, a BPF subprogram as well. For all calls, push the return address as well as the callee-saved registers (R6 to R9) to the stack, and pop them upon returning from the calls. In order to limit the overhead in terms of instruction number, this is done through dedicated subroutines. Jumping to the callee actually consists in jumping to the subroutine, that "returns" to the callee: this will require some fixup for passing the address in a later patch. Similarly, returning consists in jumping to the subroutine, which pops registers and then return directly to the caller (but no fixup is needed here). Return to the caller is performed with the RTN instruction newly added to the JIT. For the few steps where we need to know what subprogram an instruction belongs to, the struct nfp_insn_meta is extended with a new subprog_idx field. Note that checks on the available stack size, to take into account the additional requirements associated to BPF-to-BPF calls (storing R6-R9 and return addresses), are added in a later patch. Signed-off-by: Quentin Monnet Signed-off-by: Jiong Wang Reviewed-by: Jakub Kicinski Signed-off-by: Daniel Borkmann commit e3b49dc69b320ba93059509ff2b31bde9242a7fa Author: Quentin Monnet Date: Sun Oct 7 12:56:51 2018 +0100 nfp: bpf: account for BPF-to-BPF calls when preparing nfp JIT Similarly to "exit" or "helper call" instructions, BPF-to-BPF calls will require additional processing before translation starts, in order to record and mark jump destinations. We also mark the instructions where each subprogram begins. This will be used in a following commit to determine where to add prologues for subprograms. Signed-off-by: Quentin Monnet Reviewed-by: Jiong Wang Reviewed-by: Jakub Kicinski Signed-off-by: Daniel Borkmann commit bcfdfb7c962d84ef07aa2b400ef1c9d70e1120e5 Author: Quentin Monnet Date: Sun Oct 7 12:56:50 2018 +0100 nfp: bpf: ignore helper-related checks for BPF calls in nfp verifier The checks related to eBPF helper calls are performed each time the nfp driver meets a BPF_JUMP | BPF_CALL instruction. However, these checks are not relevant for BPF-to-BPF call (same instruction code, different value in source register), so just skip the checks for such calls. While at it, rename the function that runs those checks to make it clear they apply to _helper_ calls only. Signed-off-by: Quentin Monnet Reviewed-by: Jiong Wang Reviewed-by: Jakub Kicinski Signed-off-by: Daniel Borkmann commit c5da54d93eb43461a5b79e1fdad8409abad83a77 Author: Quentin Monnet Date: Sun Oct 7 12:56:49 2018 +0100 nfp: bpf: copy eBPF subprograms information from kernel verifier In order to support BPF-to-BPF calls in offloaded programs, the nfp driver must collect information about the distinct subprograms: namely, the number of subprograms composing the complete program and the stack depth of those subprograms. The latter in particular is non-trivial to collect, so we copy those elements from the kernel verifier via the newly added post-verification hook. The struct nfp_prog is extended to store this information. Stack depths are stored in an array of dedicated structs. Subprogram start indexes are not collected. Instead, meta instructions associated to the start of a subprogram will be marked with a flag in a later patch. Signed-off-by: Quentin Monnet Reviewed-by: Jiong Wang Reviewed-by: Jakub Kicinski Signed-off-by: Daniel Borkmann commit 1a7e62e6329c210ff67c5706fbe91187f2452baf Author: Quentin Monnet Date: Sun Oct 7 12:56:48 2018 +0100 nfp: bpf: rename nfp_prog->stack_depth as nfp_prog->stack_frame_depth In preparation for support for BPF to BPF calls in offloaded programs, rename the "stack_depth" field of the struct nfp_prog as "stack_frame_depth". This is to make it clear that the field refers to the maximum size of the current stack frame (as opposed to the maximum size of the whole stack memory). Signed-off-by: Quentin Monnet Reviewed-by: Jakub Kicinski Signed-off-by: Daniel Borkmann commit c941ce9c282cc606e6517356fcc186a9da2b4ab9 Author: Quentin Monnet Date: Sun Oct 7 12:56:47 2018 +0100 bpf: add verifier callback to get stack usage info for offloaded progs In preparation for BPF-to-BPF calls in offloaded programs, add a new function attribute to the struct bpf_prog_offload_ops so that drivers supporting eBPF offload can hook at the end of program verification, and potentially extract information collected by the verifier. Implement a minimal callback (returning 0) in the drivers providing the structs, namely netdevsim and nfp. This will be useful in the nfp driver, in later commits, to extract the number of subprograms as well as the stack depth for those subprograms. Signed-off-by: Quentin Monnet Reviewed-by: Jiong Wang Reviewed-by: Jakub Kicinski Signed-off-by: Daniel Borkmann commit 31ce8c4a1ad26852c91de900ebf6888a4d53fc1a Author: Arthur Fabre Date: Sun Oct 7 09:45:19 2018 +0100 bpf, doc: Document Jump X addressing mode bpf_asm and the other classic BPF tools support jump conditions comparing register A to register X, in addition to comparing register A with constant K. Only the latter was documented in filter.txt, add two new addressing modes that describe the former. Signed-off-by: Arthur Fabre Signed-off-by: Daniel Borkmann commit 1bc38b8ff6cc54b1cd925525c0a9ffa7eef4d23b Author: Alexei Starovoitov Date: Fri Oct 5 16:40:00 2018 -0700 libbpf: relicense libbpf as LGPL-2.1 OR BSD-2-Clause libbpf is maturing as a library and gaining features that no other bpf libraries support (BPF Type Format, bpf to bpf calls, etc) Many Apache2 licensed projects (like bcc, bpftrace, gobpf, cilium, etc) would like to use libbpf, but cannot do this yet, since Apache Foundation explicitly states that LGPL is incompatible with Apache2. Hence let's relicense libbpf as dual license LGPL-2.1 or BSD-2-Clause, since BSD-2 is compatible with Apache2. Dual LGPL or Apache2 is invalid combination. Fix license mistake in Makefile as well. Signed-off-by: Alexei Starovoitov Acked-by: Andrey Ignatov Acked-by: Arnaldo Carvalho de Melo Acked-by: Björn Töpel Acked-by: Daniel Borkmann Acked-by: David Beckett Acked-by: Jakub Kicinski Acked-by: Joe Stringer Acked-by: John Fastabend Acked-by: Martin KaFai Lau Acked-by: Quentin Monnet Acked-by: Thomas Graf Acked-by: Roman Gushchin Acked-by: Wang Nan Acked-by: Yonghong Song Signed-off-by: Daniel Borkmann commit 541d7fdd7694560404c502f64298a90ffe017e6b Author: Björn Töpel Date: Fri Oct 5 13:25:15 2018 +0200 xsk: proper AF_XDP socket teardown ordering The AF_XDP socket struct can exist in three different, implicit states: setup, bound and released. Setup is prior the socket has been bound to a device. Bound is when the socket is active for receive and send. Released is when the process/userspace side of the socket is released, but the sock object is still lingering, e.g. when there is a reference to the socket in an XSKMAP after process termination. The Rx fast-path code uses the "dev" member of struct xdp_sock to check whether a socket is bound or relased, and the Tx code uses the struct xdp_umem "xsk_list" member in conjunction with "dev" to determine the state of a socket. However, the transition from bound to released did not tear the socket down in correct order. On the Rx side "dev" was cleared after synchronize_net() making the synchronization useless. On the Tx side, the internal queues were destroyed prior removing them from the "xsk_list". This commit corrects the cleanup order, and by doing so xdp_del_sk_umem() can be simplified and one synchronize_net() can be removed. Fixes: 965a99098443 ("xsk: add support for bind for Rx") Fixes: ac98d8aab61b ("xsk: wire upp Tx zero-copy functions") Reported-by: Jesper Dangaard Brouer Signed-off-by: Björn Töpel Acked-by: Song Liu Signed-off-by: Daniel Borkmann commit 53c83b59759c1ee213f5ffa194909daee8902a28 Author: Miquel Raynal Date: Wed Oct 3 11:05:04 2018 +0200 mtd: rawnand: marvell: fix the IRQ handler complete() condition With the current implementation, the complete() in the IRQ handler is supposed to be called only if the register status has one or the other RDY bit set. Other events might trigger an interrupt as well if enabled, but should not end-up with a complete() call. For this purpose, the code was checking if the other bits were set, in this case complete() was not called. This is wrong as two events might happen in a very tight time-frame and if the NDSR status read reports two bits set (eg. RDY(0) and RDDREQ) at the same time, complete() was not called. This logic would lead to timeouts in marvell_nfc_wait_op() and has been observed on PXA boards (NFCv1) in the Hamming write path. Fixes: 02f26ecf8c77 ("mtd: nand: add reworked Marvell NAND controller driver") Cc: stable@vger.kernel.org Reported-by: Daniel Mack Signed-off-by: Miquel Raynal Tested-by: Daniel Mack commit 0d55c668b218a1db68b5044bce4de74e1bd0f0c8 Author: Masahiro Yamada Date: Fri Sep 28 13:16:01 2018 +0900 mtd: rawnand: denali: set SPARE_AREA_SKIP_BYTES register to 8 if unset NAND devices need additional data area (OOB) for error correction, but it is also used for Bad Block Marker (BBM). In many cases, the first byte in OOB is used for BBM, but the location actually depends on chip vendors. The NAND controller should preserve the precious BBM to keep track of bad blocks. In Denali IP, the SPARE_AREA_SKIP_BYTES register is used to specify the number of bytes to skip from the start of OOB. The ECC engine will automatically skip the specified number of bytes when it gets access to OOB area. The same value for SPARE_AREA_SKIP_BYTES should be used between firmware and the operating system if you intend to use the NAND device across the control hand-off. In fact, the current denali.c code expects firmware to have already set the SPARE_AREA_SKIP_BYTES register, then reads the value out. If no firmware (or bootloader) has initialized the controller, the register value is zero, which is the default after power-on-reset. In other words, the Linux driver cannot initialize the controller by itself. Some possible solutions are: [1] Add a DT property to specify the skipped bytes in OOB [2] Associate the preferred value with compatible [3] Hard-code the default value in the driver My first attempt was [1], but in the review process, [3] was suggested as a counter-implementation. (https://lore.kernel.org/patchwork/patch/983055/) The default value 8 was chosen to match to the boot ROM of the UniPhier platform. The preferred value may vary by platform. If so, please trade up to a different solution. Signed-off-by: Masahiro Yamada Reviewed-by: Boris Brezillon Signed-off-by: Miquel Raynal commit ed8f0b23d92606bbc8f027df9164473636ac2b74 Author: Colin Ian King Date: Thu Sep 27 16:24:31 2018 +0100 mtd: rawnand: r852: fix spelling mistake "card_registred" -> "card_registered" Trivial fix to spelling mistake struct field name, rename it. Signed-off-by: Colin Ian King Signed-off-by: Miquel Raynal commit e9836761867519e1e5beb7486dc73c3d5b8877f5 Author: Miquel Raynal Date: Mon Sep 24 11:35:18 2018 +0200 mtd: rawnand: toshiba: Pass a single nand_chip object to the status helper Now that most of the raw NAND API is consistent and has almost all its helpers and hooks using a single nand_chip object instead of an mtd_info one (or both), let's do the same cleanup in the raw NAND vendors drivers. Apply this change to the Toshiba driver so that the internal helper to retrieve the ECC status does only take a nand_chip object. Suggested-by: Boris Brezillon Signed-off-by: Miquel Raynal Reviewed-by: Boris Brezillon commit 724fe7710ac5f4289886b90060ed67e3a4bdd584 Author: Johannes Berg Date: Wed Jul 4 23:02:14 2018 +0200 iwlwifi: mvm: kill INACTIVE queue state We don't really need this state: instead of having an inactive state where we can awaken zombie queues again if needed, just keep them in their normal state unless a new queue is actually needed and there's no other way of getting one. We do this here by making the inactivity check not free queues unless instructed that we now really need to allocate one to a specific station, and in that case it'll just free the queue immediately, without doing any inactivity step inbetween. The only downside is a little bit more processing in this case, but the code complexity is lower. Additionally, this fixes a corner case: due to the way the code worked, we could only ever reuse an inactive queue if it was the reserved queue for a station, as iwl_mvm_find_free_queue() would never consider returning an inactive queue. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho commit c20e08b0d6ed2a641a5217ccfaf8b616bbba869e Author: Johannes Berg Date: Wed Jul 4 22:59:52 2018 +0200 iwlwifi: mvm: move iwl_mvm_sta_alloc_queue() down We want to call iwl_mvm_inactivity_check() from here in the next patch, so need to move the code down to be able to. Fix a minor checkpatch complaint while at it. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho commit 1edcfc20c9d93c58500f1556da63284162487081 Author: Martin Willi Date: Tue Sep 25 09:41:15 2018 +0200 mac80211_hwsim: drop now unused work-queue from hwsim The work-queue was used for deferred destruction of hwsim radios; this does not work well with namespaces about to exit. The one remaining user has been migrated, so drop the now unused work-queue instance. Signed-off-by: Martin Willi Signed-off-by: Johannes Berg commit 6fe64d034ec927d9c0fa28176dd071741d4f2180 Author: Johannes Berg Date: Wed Jul 4 22:27:46 2018 +0200 iwlwifi: mvm: make iwl_mvm_scd_queue_redirect() static This function is only used in the file where it's declared, so just make it static. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho commit b3a87f11b0f708e65ab6289fb7f43737309f5175 Author: Johannes Berg Date: Wed Jul 4 22:13:18 2018 +0200 iwlwifi: mvm: make queue TID change more explicit Instead of iterating all the queues after having potentially changed some queue configurations, rechecking if that was done, mark the ones that do need a TID change explicitly in a bitmap and use that to send the change to the firmware. While at it, also rename iwl_mvm_change_queue_owner() to iwl_mvm_change_queue_tid() since that's more obvious - the "kind" of owner isn't immediately clear right now. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho commit 188de5dd80b2b7986e75821374efb67081049b6e Merge: 5207ca554bfc abf1a08ff323 Author: Johannes Berg Date: Mon Oct 8 09:48:31 2018 +0200 Merge remote-tracking branch 'net-next/master' into mac80211-next Merge net-next, which pulled in net, so I can merge a few more patches that would otherwise conflict. Signed-off-by: Johannes Berg commit 90d2d94c9184327703eec583890e2e0452003da8 Author: Johannes Berg Date: Wed Jul 4 21:57:58 2018 +0200 iwlwifi: mvm: remove RECONFIGURING queue state We set the queue to this state, only to pretty much immediately move it out of it again. However, we can't even hit any of the code that checks if the queue is reconfiguring, because all of this happens under mvm->mutex and we hold the all the way from marking the queue as RECONFIGURING to marking it as READY again. Additionally, the queue that became RECONFIGURING would've been in SHARED state before, and it can safely stay in that state. In case of errors, it previously would have stayed in RECONFIGURING which it could never have left again. Remove the state entirely and just track the queues that need to be reconfigured in a separate, local, bitmap. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho commit df2a2245db6b458f7ef0d9b38dc10684b90d2ece Author: Johannes Berg Date: Wed Jul 4 16:21:03 2018 +0200 iwlwifi: mvm: reconfigure queues during inactivity check We currently reconfigure the queues after the inactivity check, but only in one of the two callers. This might leave queues in a state where the TID owner is wrong, if called when reserving a queue for a new station. Clean this up and do the reconfiguration inside the inactivity check function. This requires changing the locking, but one of the two places already holds the mvm mutex and the other easily can. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho commit b342228d6bc51b920cb1d2f81f13c45735379507 Author: Johannes Berg Date: Wed Jul 4 16:11:14 2018 +0200 iwlwifi: mvm: move queue reconfiguration into new function If TVQM is used we skip over this, move the code into a new function to get rid of the label. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho commit 459ab045925d8a8e08d1faa54688dda654ef826f Author: Johannes Berg Date: Wed Jul 4 13:06:53 2018 +0200 iwlwifi: mvm: clean up iteration in iwl_mvm_inactivity_check() There's no need to build a bitmap first and then iterate, just do the iteration with the right locking directly. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho commit 1c14089e37835dd7a3494636175deddbde2cf43e Author: Johannes Berg Date: Wed Jul 4 11:58:28 2018 +0200 iwlwifi: mvm: remove per-queue hw refcount There's no need to have a hw refcount if we just mark the command queue with a (fake) TID; at that point, the refcount becomes equivalent to the hweight() of the TID bitmap. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho commit 99448a8c11456fe4721e326047db008e273c3de8 Author: Johannes Berg Date: Wed Jul 4 11:38:34 2018 +0200 iwlwifi: mvm: move queue management into sta.c None of these functions really need to be separate, they're all only used in sta.c, move them there and make them static. Fix a small typo in related code while at it. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho commit 08c2af621b870d4760b701dfe276876d5d24828b Author: Johannes Berg Date: Tue Jul 3 16:00:53 2018 +0200 iwlwifi: mvm: give TX queue info struct a name Make this a named struct rather than an anonymous one, we'll want to refer to it by name later. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho commit f57d104f00f21573d957d6576467f0c6c4d9ecfe Author: Shahar S Matityahu Date: Wed Jul 4 17:12:49 2018 +0300 iwlwifi: mvm: move rt status check to the start of the resume flow Move the rt status checking to the start of the resume flow in order to avoid sending D0I3_END_CMD to the FW. Also, collect dump if an assert was encountered. Signed-off-by: Shahar S Matityahu Signed-off-by: Luca Coelho commit 99c65fa7c59ff558e70db8aa61bbdece5d3a9588 Author: Stephen Boyd Date: Mon Oct 8 00:20:07 2018 -0700 dma-debug: Check for drivers mapping invalid addresses in dma_map_single() I recently debugged a DMA mapping oops where a driver was trying to map a buffer returned from request_firmware() with dma_map_single(). Memory returned from request_firmware() is mapped into the vmalloc region and this isn't a valid region to map with dma_map_single() per the DMA documentation's "What memory is DMA'able?" section. Unfortunately, we don't really check that in the DMA debugging code, so enabling DMA debugging doesn't help catch this problem. Let's add a new DMA debug function to check for a vmalloc address or an invalid virtual address and print a warning if this happens. This makes it a little easier to debug these sorts of problems, instead of seeing odd behavior or crashes when drivers attempt to map the vmalloc space for DMA. Cc: Marek Szyprowski Reviewed-by: Robin Murphy Signed-off-by: Stephen Boyd Signed-off-by: Christoph Hellwig commit 4244e7fc7037d247ed96f6e0bcddb4d72447ea73 Author: Shahar S Matityahu Date: Mon Jun 11 10:46:58 2018 +0300 iwlwifi: dump debug data before stop device Debug data dump is not working in flows that stop the device is used in their error handling. During these flows the op mode mutex is locked until the device stops. Because of that, any assert generated from the firmware can be handled only after the device already stopped. Since dumping cannot occour after stopping the device, split the the dump function to two parts, Part that handles locking, and the part that starts the actual dumping and call the second part in the op mode stop device function. Signed-off-by: Shahar S Matityahu Signed-off-by: Luca Coelho commit 2ec3ef4614c9d50425334b2f2cd146740d9352e8 Author: Ayala Beker Date: Wed Jul 4 12:08:23 2018 +0300 iwlwifi: mvm: use fast balance scan in case of DCM mode with P2P GO Currently in case of DCM with P2P GO where BSS DTIM interval < 220 msec the fw fails to allocate events for the P2P GO dtim due to long passive scan events. Fix this by requesting all scans in this scenario to be fragmented with fast balance scan time settings. The only exception is in case fragmented scan was planned to be set due to low latency or high throughput reason, set the scan timing as planned. Signed-off-by: Ayala Beker Signed-off-by: Luca Coelho commit 6ff80f18d539975ac5120f95b83b0fa0053d4fa8 Author: Ayala Beker Date: Wed Jul 4 12:00:27 2018 +0300 iwlwifi: mvm: introduce a new fragmented scan type: fast balance Fast balance scan is similar to SCAN_TYPE_MILD, but this scan is fragmented and has shorter out of operating channel time, and therefore better match low latency scenarios. Signed-off-by: Ayala Beker Signed-off-by: Luca Coelho commit bf77ee2e428f7b2a0f0e6be30b17b843ed0f6662 Author: Sara Sharon Date: Tue Jul 3 13:29:52 2018 +0300 iwlwifi: trace: change trace to trace one TB at a time Split TX tracing to be per TB. This is needed now that AMSDUs can be sent and skb can be larger than trace limit. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho commit 601d5abfeaf244b86bb68c1e05c6e0d57be2f6b0 Author: Eric W. Biederman Date: Fri Oct 5 09:02:48 2018 +0200 signal: In sigqueueinfo prefer sig not si_signo Andrei Vagin reported: > Accoding to the man page, the user should not set si_signo, it has to be set > by kernel. > > $ man 2 rt_sigqueueinfo > > The uinfo argument specifies the data to accompany the signal. This > argument is a pointer to a structure of type siginfo_t, described in > sigaction(2) (and defined by including ). The caller > should set the following fields in this structure: > > si_code > This must be one of the SI_* codes in the Linux kernel source > file include/asm-generic/siginfo.h, with the restriction that > the code must be negative (i.e., cannot be SI_USER, which is > used by the kernel to indicate a signal sent by kill(2)) and > cannot (since Linux 2.6.39) be SI_TKILL (which is used by the > kernel to indicate a signal sent using tgkill(2)). > > si_pid This should be set to a process ID, typically the process ID of > the sender. > > si_uid This should be set to a user ID, typically the real user ID of > the sender. > > si_value > This field contains the user data to accompany the signal. For > more information, see the description of the last (union sigval) > argument of sigqueue(3). > > Internally, the kernel sets the si_signo field to the value specified > in sig, so that the receiver of the signal can also obtain the signal > number via that field. > > On Tue, Sep 25, 2018 at 07:19:02PM +0200, Eric W. Biederman wrote: >> >> If there is some application that calls sigqueueinfo directly that has >> a problem with this added sanity check we can revisit this when we see >> what kind of crazy that application is doing. > > > I already know two "applications" ;) > > https://github.com/torvalds/linux/blob/master/tools/testing/selftests/ptrace/peeksiginfo.c > https://github.com/checkpoint-restore/criu/blob/master/test/zdtm/static/sigpending.c > > Disclaimer: I'm the author of both of them. Looking at the kernel code the historical behavior has alwasy been to prefer the signal number passed in by the kernel. So sigh. Implmenet __copy_siginfo_from_user and __copy_siginfo_from_user32 to take that signal number and prefer it. The user of ptrace will still use copy_siginfo_from_user and copy_siginfo_from_user32 as they do not and never have had a signal number there. Luckily this change has never made it farther than linux-next. Fixes: e75dc036c445 ("signal: Fail sigqueueinfo if si_signo != sig") Reported-by: Andrei Vagin Tested-by: Andrei Vagin Signed-off-by: "Eric W. Biederman" commit c6c2ee00fe2fb003cd95ac89526511a537103e2d Author: Dong Aisheng Date: Sun Oct 7 21:04:41 2018 +0800 dt-bindings: arm: fsl: add scu binding doc The System Controller Firmware (SCFW) is a low-level system function which runs on a dedicated Cortex-M core to provide power, clock, and resource management. It exists on some i.MX8 processors. e.g. i.MX8QM (QM, QP), and i.MX8QX (QXP, DX). Cc: Shawn Guo Cc: Sascha Hauer Cc: Fabio Estevam Cc: Mark Rutland Cc: devicetree@vger.kernel.org Reviewed-by: Rob Herring Reviewed-by: Sascha Hauer Signed-off-by: Dong Aisheng Signed-off-by: Shawn Guo commit ea74b19d7773eb09e34bce8a8a08ed3b4e5c4296 Author: Sara Sharon Date: Mon Jul 2 14:48:15 2018 +0300 iwlwifi: pcie: don't pad AMSDU packets When we TX AMSDU, we shouldn't pad the packet. In the past, we were building AMSDU only in transport layer, and gen2 functions are built based on this. However, now that op mode may build AMSDUs, we need to take care of padding also in gen2 "non-pcie-amsdu" path. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho commit 8c7fd6a365eb5b2647b2c01918730d0a485b9f85 Author: Sara Sharon Date: Sun Jul 1 14:52:06 2018 +0300 iwlwifi: mvm: don't send keys when entering D3 In the past, we needed to program the keys when entering D3. This was since we replaced the image. However, now that there is a single image, this is no longer needed. Note that RSC is sent separately in a new command. This solves issues with newer devices that support PN offload. Since driver re-sent the keys, the PN got zeroed and the receiver dropped the next packets, until PN caught up again. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho commit 346e485d42e2d8c9b5739e6f2acb5052be0fef9e Author: Julian Wiedmann Date: Fri Sep 14 13:47:41 2018 +0200 s390/ccwgroup: add get_ccwgroupdev_by_busid() Provide function to find a ccwgroup device by its busid. Acked-by: Sebastian Ott Signed-off-by: Julian Wiedmann Signed-off-by: Martin Schwidefsky commit 00fab2350e6b91e57b3cdcd5d9f01056775a921d Author: Harald Freudenberger Date: Mon Sep 17 16:18:41 2018 +0200 s390/zcrypt: multiple zcrypt device nodes support This patch is an extension to the zcrypt device driver to provide, support and maintain multiple zcrypt device nodes. The individual zcrypt device nodes can be restricted in terms of crypto cards, domains and available ioctls. Such a device node can be used as a base for container solutions like docker to control and restrict the access to crypto resources. The handling is done with a new sysfs subdir /sys/class/zcrypt. Echoing a name (or an empty sting) into the attribute "create" creates a new zcrypt device node. In /sys/class/zcrypt a new link will appear which points to the sysfs device tree of this new device. The attribute files "ioctlmask", "apmask" and "aqmask" in this directory are used to customize this new zcrypt device node instance. Finally the zcrypt device node can be destroyed by echoing the name into /sys/class/zcrypt/destroy. The internal structs holding the device info are reference counted - so a destroy will not hard remove a device but only marks it as removable when the reference counter drops to zero. The mask values are bitmaps in big endian order starting with bit 0. So adapter number 0 is the leftmost bit, mask is 0x8000... The sysfs attributes accept 2 different formats: * Absolute hex string starting with 0x like "0x12345678" does set the mask starting from left to right. If the given string is shorter than the mask it is padded with 0s on the right. If the string is longer than the mask an error comes back (EINVAL). * Relative format - a concatenation (done with ',') of the terms +[-] or -[-]. may be any valid number (hex, decimal or octal) in the range 0...255. Here are some examples: "+0-15,+32,-128,-0xFF" "-0-255,+1-16,+0x128" "+1,+2,+3,+4,-5,-7-10" A simple usage examples: # create new zcrypt device 'my_zcrypt': echo "my_zcrypt" >/sys/class/zcrypt/create # go into the device dir of this new device echo "my_zcrypt" >create cd my_zcrypt/ ls -l total 0 -rw-r--r-- 1 root root 4096 Jul 20 15:23 apmask -rw-r--r-- 1 root root 4096 Jul 20 15:23 aqmask -r--r--r-- 1 root root 4096 Jul 20 15:23 dev -rw-r--r-- 1 root root 4096 Jul 20 15:23 ioctlmask lrwxrwxrwx 1 root root 0 Jul 20 15:23 subsystem -> ../../../../class/zcrypt ... # customize this zcrypt node clone # enable only adapter 0 and 2 echo "0xa0" >apmask # enable only domain 6 echo "+6" >aqmask # enable all 256 ioctls echo "+0-255" >ioctls # now the /dev/my_zcrypt may be used # finally destroy it echo "my_zcrypt" >/sys/class/zcrypt/destroy Please note that a very similar 'filtering behavior' also applies to the parent z90crypt device. The two mask attributes apmask and aqmask in /sys/bus/ap act the very same for the z90crypt device node. However the implementation here is totally different as the ap bus acts on bind/unbind of queue devices and associated drivers but the effect is still the same. So there are two filters active for each additional zcrypt device node: The adapter/domain needs to be enabled on the ap bus level and it needs to be active on the zcrypt device node level. Signed-off-by: Harald Freudenberger Signed-off-by: Martin Schwidefsky commit 2733fb0d0699246711cf622e0e2faf02a05b69dc Author: Anson Huang Date: Mon Oct 8 14:07:34 2018 +0800 cpufreq: imx6q: read OCOTP through nvmem for imx6ul/imx6ull On i.MX6UL/i.MX6ULL, accessing OCOTP directly is wrong because the ocotp clock needs to be enabled first. Add support for reading OCOTP through the nvmem API, and keep the old method there to support old dtb. Signed-off-by: Anson Huang Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki commit 9d21d33cab2dd5aadd23ad51baf1dc49d544fcc0 Author: Dmitry Torokhov Date: Fri Oct 5 12:00:58 2018 -0700 cpufreq: dt-platdev: allow RK3399 to have separate tunables per cluster RK3899 has one cluster with 4 small cores, and another one with 2 big cores, with cores in different clusters having different OPPs and thus needing separate set of tunables. Let's enable this via "have_governor_per_policy" platform data. Signed-off-by: Dmitry Torokhov Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki commit 3bf62eb77c7918884d640a2ee25ddb542ac6d0ca Author: Sibi Sankar Date: Fri Jul 27 20:50:03 2018 +0530 remoteproc: qcom: q6v5-pil: Assign the relocated address Assign the relocated base of the modem image, as the offsets from the virtual memory might not be based on the physical address. Signed-off-by: Sibi Sankar Signed-off-by: Bjorn Andersson commit 6952e3a1dffcb931cf8625aa01642b9afac2af61 Merge: c530174b90fa fd99bd8b805c Author: Dave Airlie Date: Mon Oct 8 16:38:48 2018 +1000 Merge branch 'for-upstream/mali-dp' of git://linux-arm.org/linux-ld into drm-next I've realised that the commit 3dae1c0919d8 ("drm/arm/malidp: Implemented the size validation for AFBC framebuffers") got bungled up in the upstreaming process and it was missing an important line from the function that calculates the size of the AFBC framebuffer Signed-off-by: Dave Airlie From: Liviu Dudau Link: https://patchwork.freedesktop.org/patch/msgid/20181005152423.GF1156@e110455-lin.cambridge.arm.com commit c2dc121c6499080dba3df12e05fb1d27fe1c4e45 Merge: fb64207bf560 deac8703da5f Author: Rafael J. Wysocki Date: Mon Oct 8 08:44:55 2018 +0200 Merge branch 'opp/linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm into pm-opp Pull more operating performance points (OPP) framework updates for 4.20 from Viresh Kumar: "That contains some important fixes reported recently." * 'opp/linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm: PM / OPP: _of_add_opp_table_v2(): increment count only if OPP is added cpufreq: dt: Try freeing static OPPs only if we have added them OPP: Return error on error from dev_pm_opp_get_opp_count() OPP: Improve error handling in dev_pm_opp_of_cpumask_add_table() commit 757c968c442397f1249bb775a7c8c03842e3e0c7 Author: Ronald Tschalär Date: Sun Sep 30 19:53:13 2018 -0700 ACPI / SBS: Fix rare oops when removing modules There was a small race when removing the sbshc module where smbus_alarm() had queued acpi_smbus_callback() for deferred execution but it hadn't been run yet, so that when it did run hc had been freed and the module unloaded, resulting in an invalid paging request. A similar race existed when removing the sbs module with regards to acpi_sbs_callback() (which is called from acpi_smbus_callback()). We therefore need to ensure no callbacks are pending or executing before the cleanups are done and the modules are removed. Signed-off-by: Ronald Tschalär Signed-off-by: Rafael J. Wysocki commit ca1721c5bee77105829cbd7baab8ee0eab85b06d Author: Ronald Tschalär Date: Sun Sep 30 19:52:51 2018 -0700 ACPI / SBS: Fix GPE storm on recent MacBookPro's On Apple machines, plugging-in or unplugging the power triggers a GPE for the EC. Since these machines expose an SBS device, this GPE ends up triggering the acpi_sbs_callback(). This in turn tries to get the status of the SBS charger. However, on MBP13,* and MBP14,* machines, performing the smbus-read operation to get the charger's status triggers the EC's GPE again. The result is an endless re-triggering and handling of that GPE, consuming significant CPU resources (> 50% in irq). In the end this is quite similar to commit 3031cddea633 (ACPI / SBS: Don't assume the existence of an SBS charger), except that on the above machines a status of all 1's is returned. And like there, we just want ignore the charger here. Link: https://bugzilla.kernel.org/show_bug.cgi?id=198169 Signed-off-by: Ronald Tschalär Signed-off-by: Rafael J. Wysocki commit f1193e915748291fb205a908db33bd3debece6e2 Author: Li RongQing Date: Sun Oct 7 10:22:42 2018 +0800 xfrm: use correct size to initialise sp->ovec This place should want to initialize array, not a element, so it should be sizeof(array) instead of sizeof(element) but now this array only has one element, so no error in this condition that XFRM_MAX_OFFLOAD_DEPTH is 1 Signed-off-by: Li RongQing Signed-off-by: Steffen Klassert commit b7138fddd6893a455cc82249f3d12ae651023543 Author: Li RongQing Date: Sun Oct 7 09:56:15 2018 +0800 xfrm: remove unnecessary check in xfrmi_get_stats64 if tstats of a device is not allocated, this device is not registered correctly and can not be used. Signed-off-by: Li RongQing Signed-off-by: Steffen Klassert commit e0db9c48f1ad4398cd9ecb91191ff5e9f877df61 Author: Eric Biggers Date: Fri Oct 5 10:13:06 2018 -0700 crypto: x86/aes-ni - fix build error following fpu template removal aesni-intel_glue.c still calls crypto_fpu_init() and crypto_fpu_exit() to register/unregister the "fpu" template. But these functions don't exist anymore, causing a build error. Remove the calls to them. Fixes: 944585a64f5e ("crypto: x86/aes-ni - remove special handling of AES in PCBC mode") Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 7ff9036a62053995ff4bc7048dc176bdf9135d96 Author: Eric Biggers Date: Tue Oct 2 22:22:15 2018 -0700 crypto: arm64/aes - fix handling sub-block CTS-CBC inputs In the new arm64 CTS-CBC implementation, return an error code rather than crashing on inputs shorter than AES_BLOCK_SIZE bytes. Also set cra_blocksize to AES_BLOCK_SIZE (like is done in the cts template) to indicate the minimum input size. Fixes: dd597fb33ff0 ("crypto: arm64/aes-blk - add support for CTS-CBC mode") Signed-off-by: Eric Biggers Reviewed-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 52813ab249590595e43c8b03227adaa29ceceb33 Author: Arnd Bergmann Date: Tue Oct 2 22:56:19 2018 +0200 crypto: caam/qi2 - avoid double export Both the caam ctrl file and dpaa2_caam export a couple of flags. They use an #ifdef check to make sure that each flag is only built once, but this fails if they are both loadable modules: WARNING: drivers/crypto/caam/dpaa2_caam: 'caam_little_end' exported twice. Previous export was in drivers/crypto/caam/caam.ko WARNING: drivers/crypto/caam/dpaa2_caam: 'caam_imx' exported twice. Previous export was in drivers/crypto/caam/caam.ko Change the #ifdef to an IS_ENABLED() check in order to make it work in all configurations. It may be better to redesign this aspect of the two drivers in a cleaner way. Fixes: 8d818c105501 ("crypto: caam/qi2 - add DPAA2-CAAM driver") Signed-off-by: Arnd Bergmann Acked-by: Horia Geantă Signed-off-by: Herbert Xu commit fadd7a6e616b89c7f4f7bfa7b824f290bab32c3c Author: Radu Solea Date: Tue Oct 2 19:01:52 2018 +0000 crypto: mxs-dcp - Fix AES issues The DCP driver does not obey cryptlen, when doing android CTS this results in passing to hardware input stream lengths which are not multiple of block size. Add a check to prevent future erroneous stream lengths from reaching the hardware and adjust the scatterlist walking code to obey cryptlen. Also properly copy-out the IV for chaining. Signed-off-by: Radu Solea Signed-off-by: Franck LENORMAND Signed-off-by: Leonard Crestez Signed-off-by: Herbert Xu commit c709eebaf5c5faa8a0f140355f9cfe67e8f7afb1 Author: Radu Solea Date: Tue Oct 2 19:01:50 2018 +0000 crypto: mxs-dcp - Fix SHA null hashes and output length DCP writes at least 32 bytes in the output buffer instead of hash length as documented. Add intermediate buffer to prevent write out of bounds. When requested to produce null hashes DCP fails to produce valid output. Add software workaround to bypass hardware and return valid output. Signed-off-by: Radu Solea Signed-off-by: Leonard Crestez Signed-off-by: Herbert Xu commit ea9e7568f7a7f0a6695e046316132afe382969a8 Author: Dan Douglass Date: Tue Oct 2 19:01:48 2018 +0000 crypto: mxs-dcp - Implement sha import/export The mxs-dcp driver fails to probe if sha1/sha256 are supported: [ 2.455404] mxs-dcp 80028000.dcp: Failed to register sha1 hash! [ 2.464042] mxs-dcp: probe of 80028000.dcp failed with error -22 This happens because since commit 8996eafdcbad ("crypto: ahash - ensure statesize is non-zero") import/export is mandatory and ahash_prepare_alg fails on statesize == 0. A set of dummy import/export functions were implemented in commit 9190b6fd5db9 ("crypto: mxs-dcp - Add empty hash export and import") but statesize is still zero and the driver fails to probe. That change was apparently part of some unrelated refactoring. Fix by actually implementing import/export. Signed-off-by: Dan Douglass Signed-off-by: Leonard Crestez Signed-off-by: Herbert Xu commit 4a34e3c2f2f48f47213702a84a123af0fe21ad60 Author: Ard Biesheuvel Date: Mon Oct 1 10:36:38 2018 +0200 crypto: aegis/generic - fix for big endian systems Use the correct __le32 annotation and accessors to perform the single round of AES encryption performed inside the AEGIS transform. Otherwise, tcrypt reports: alg: aead: Test 1 failed on encryption for aegis128-generic 00000000: 6c 25 25 4a 3c 10 1d 27 2b c1 d4 84 9a ef 7f 6e alg: aead: Test 1 failed on encryption for aegis128l-generic 00000000: cd c6 e3 b8 a0 70 9d 8e c2 4f 6f fe 71 42 df 28 alg: aead: Test 1 failed on encryption for aegis256-generic 00000000: aa ed 07 b1 96 1d e9 e6 f2 ed b5 8e 1c 5f dc 1c Fixes: f606a88e5823 ("crypto: aegis - Add generic AEGIS AEAD implementations") Cc: # v4.18+ Signed-off-by: Ard Biesheuvel Reviewed-by: Ondrej Mosnacek Signed-off-by: Herbert Xu commit 5a8dedfa3276e88c5865f265195d63d72aec3e72 Author: Ard Biesheuvel Date: Mon Oct 1 10:36:37 2018 +0200 crypto: morus/generic - fix for big endian systems Omit the endian swabbing when folding the lengths of the assoc and crypt input buffers into the state to finalize the tag. This is not necessary given that the memory representation of the state is in machine native endianness already. This fixes an error reported by tcrypt running on a big endian system: alg: aead: Test 2 failed on encryption for morus640-generic 00000000: a8 30 ef fb e6 26 eb 23 b0 87 dd 98 57 f3 e1 4b 00000010: 21 alg: aead: Test 2 failed on encryption for morus1280-generic 00000000: 88 19 1b fb 1c 29 49 0e ee 82 2f cb 97 a6 a5 ee 00000010: 5f Fixes: 396be41f16fd ("crypto: morus - Add generic MORUS AEAD implementations") Cc: # v4.18+ Reviewed-by: Ondrej Mosnacek Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit abf1a08ff3237a27188ff8cc2904f2cea893af55 Author: Tonghao Zhang Date: Sun Oct 7 18:41:50 2018 -0700 net: vhost: remove bad code line Signed-off-by: Tonghao Zhang Signed-off-by: David S. Miller commit ac4a02c5ab86971b8c2f82b986d37df8e4c4a436 Author: Leslie Monis Date: Sun Oct 7 01:22:45 2018 +0530 net: sched: pie: fix coding style issues Fix 5 warnings and 14 checks issued by checkpatch.pl: CHECK: Logical continuations should be on the previous line + if ((q->vars.qdelay < q->params.target / 2) + && (q->vars.prob < MAX_PROB / 5)) WARNING: line over 80 characters + q->params.tupdate = usecs_to_jiffies(nla_get_u32(tb[TCA_PIE_TUPDATE])); CHECK: Blank lines aren't necessary after an open brace '{' +{ + CHECK: braces {} should be used on all arms of this statement + if (qlen < QUEUE_THRESHOLD) [...] + else { [...] CHECK: Unbalanced braces around else statement + else { CHECK: No space is necessary after a cast + if (delta > (s32) (MAX_PROB / (100 / 2)) && CHECK: Unnecessary parentheses around 'qdelay == 0' + if ((qdelay == 0) && (qdelay_old == 0) && update_prob) CHECK: Unnecessary parentheses around 'qdelay_old == 0' + if ((qdelay == 0) && (qdelay_old == 0) && update_prob) CHECK: Unnecessary parentheses around 'q->vars.prob == 0' + if ((q->vars.qdelay < q->params.target / 2) && + (q->vars.qdelay_old < q->params.target / 2) && + (q->vars.prob == 0) && + (q->vars.avg_dq_rate > 0)) CHECK: Unnecessary parentheses around 'q->vars.avg_dq_rate > 0' + if ((q->vars.qdelay < q->params.target / 2) && + (q->vars.qdelay_old < q->params.target / 2) && + (q->vars.prob == 0) && + (q->vars.avg_dq_rate > 0)) CHECK: Blank lines aren't necessary before a close brace '}' + +} CHECK: Comparison to NULL could be written "!opts" + if (opts == NULL) CHECK: No space is necessary after a cast + ((u32) PSCHED_TICKS2NS(q->params.target)) / WARNING: line over 80 characters + nla_put_u32(skb, TCA_PIE_TUPDATE, jiffies_to_usecs(q->params.tupdate)) || CHECK: Blank lines aren't necessary before a close brace '}' + +} CHECK: No space is necessary after a cast + .delay = ((u32) PSCHED_TICKS2NS(q->vars.qdelay)) / WARNING: Missing a blank line after declarations + struct sk_buff *skb; + skb = qdisc_dequeue_head(sch); WARNING: Missing a blank line after declarations + struct pie_sched_data *q = qdisc_priv(sch); + qdisc_reset_queue(sch); WARNING: Missing a blank line after declarations + struct pie_sched_data *q = qdisc_priv(sch); + q->params.tupdate = 0; Signed-off-by: Leslie Monis Signed-off-by: David S. Miller commit 5fc7c12ffa7fe463c4da2295cdc199da9663dce5 Author: Gustavo A. R. Silva Date: Fri Oct 5 22:12:09 2018 +0200 bnxt_en: Remove unnecessary unsigned integer comparison and initialize variable There is no need to compare *val.vu32* with < 0 because such variable is of type u32 (32 bits, unsigned), making it impossible to hold a negative value. Fix this by removing such comparison. Also, initialize variable *max_val* to -1, just in case it is not initialized to either BNXT_MSIX_VEC_MAX or BNXT_MSIX_VEC_MIN_MAX before using it in a comparison with val.vu32 at line 159: if (val.vu32 > max_val) Addresses-Coverity-ID: 1473915 ("Unsigned compared against 0") Addresses-Coverity-ID: 1473920 ("Uninitialized scalar variable") Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller commit 9e6dbc3d5cfc1afec5aefe87a7fffd5b9d44f09a Author: Arnd Bergmann Date: Fri Oct 5 18:11:15 2018 +0200 clk: keystone: add missing MODULE_LICENSE A randconfig build showed that two clk modules have no license tag: WARNING: modpost: missing MODULE_LICENSE() in drivers/clk/keystone/gate.o see include/linux/module.h for more information WARNING: modpost: missing MODULE_LICENSE() in drivers/clk/keystone/pll.o see include/linux/module.h for more information Add the appropriate information from the comment at the start of the two files. Signed-off-by: Arnd Bergmann Acked-by: Santosh Shilimkar Signed-off-by: Stephen Boyd commit 2f6affe35c1d79e3524a6475ea2267535a252258 Merge: 9414229c9c53 1f174a1a2cde Author: Thomas Gleixner Date: Sun Oct 7 21:56:29 2018 +0200 Merge branch 'clockevents/4.20' of https://git.linaro.org/people/daniel.lezcano/linux into timers/core Pull clockevent updates from Daniel Lezcano: - Prefix file names with timer-* (Daniel Lezcano) - Remove old CLOCKSOURCE_OF_DECLARE which was replaced by TIMER_OF_DECLARE (Daniel Lezcano) - Add reset control for dw_apb (Dinh Nguyen) - Add the SPDX identifiers for the renesas and sh timers (Kuninori Morimoto) - Use %pOFn instead of device_node.name (Rob Herring) - Fixup 64bits and clocksource width to 32b for sh_cmt (Sergei Shtylyov) - Add the R-Car gen3 support (Sergei Shtylyov) commit 3ce36b4542b585ed0231b175aee31020b2f289c2 Author: Jordan Crouse Date: Fri Oct 5 14:06:05 2018 -0600 drm/msm/a6xx: Remove CP perfcounter selects from the protected list The CP performance counter selects were accidentally marked as protected so they couldn't be written from PM4 streams. Remove the protection because user space does have an interest in setting up their own counters. Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark commit 82e223a5d854e1f19f46a1a1ad3fae311f337c9a Author: Sean Paul Date: Thu Oct 4 14:09:44 2018 -0400 drm/msm: dpu: Fix memory leak caused by dropped reference We are currently leaking a drm_crtc_commit struct for every atomic commit containing plane state. The dpu plane destroy function cleans up the fb reference manually, but fails to release the commit ref. As a result, we just keep allocating drm_crtc_commits without ever freeing them. Fortunately there's a helper function which will clean up all of our mess at once, so use that. Thanks to Doug Anderson for reporting the memory leak (and leaving breadcrumbs from kmemleak!). Reported-by: Doug Anderson Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit f926a2e1718edc28f59f1079ebb6832532810587 Author: Sean Paul Date: Thu Oct 4 15:24:04 2018 -0400 drm/msm: a5xx: Fix improper u64 division This patch uses the proper do_div() macro to perform u64 division and guards against overflow if the result is too large for the unsigned long return type Fixes: de0a3d094de0 drm/msm: re-factor devfreq code Cc: Sharat Masetty Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit a69c5ed25d71c6342fbc6a52fb09b679456394e3 Author: Rob Clark Date: Thu Oct 4 15:10:30 2018 -0400 drm/msm: update generated headers Signed-off-by: Rob Clark commit 5057ef7f566d31cbc7411f906745a37cfb4f18d9 Merge: 72438f8cef4e 5580d810560d Author: David S. Miller Date: Sun Oct 7 10:31:24 2018 -0700 Merge tag 'wireless-drivers-next-for-davem-2018-10-07' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next Kalle Valo says: ==================== wireless-drivers-next patches for 4.20 Second set of patches for 4.20. Heavy refactoring on mt76 continues and the usual drivers in active development (iwlwifi, qtnfmac, ath10k) getting new features. And as always, fixes and cleanup all over. Major changes: mt76 * more major refactoring to make it easier add new hardware support * more work on mt76x0e support * support for getting firmware version via ethtool * add mt7650 PCI ID iwlwifi * HE radiotap cleanup and improvements * reorder channel optimization for scans * bump the FW API version qtnfmac * fixes for 'iw' output: rates for enabled SGI, 'dump station' * expose more scan features to host: scan flush and dwell time * inform cfg80211 when OBSS is not supported by firmware wlcore * add support for optional wakeirq ath10k * retrieve MAC address from system firmware if provided * support extended board data download for dual-band QCA9984 * extended per sta tx statistics support via debugfs * average ack rssi support for data frames * speed up QCA6174 and QCA9377 firmware download using diag Copy Engine * HTT High Latency mode support needed by SDIO and USB support * get STA power save state via debugfs ath9k * add reset functionality for airtime station debugfs file ==================== Signed-off-by: David S. Miller commit 44ba0bb4f2ad96246cb1f20c041f4d062cf6c4c2 Author: Darrick J. Wong Date: Thu Oct 4 18:06:03 2018 -0700 docs: improve readability for people with poorer eyesight My eyesight is not in good shape, which means that I have difficulty reading the online Linux documentation. Specifically, body text is oddly small compared to list items and the contrast of various text elements is too low for me to be able to see easily. Therefore, alter the HTML theme overrides to make the text larger and increase the contrast for better visibility, and trust the typeface choices of the reader's browser. For the PDF output, increase the text size, use a sans-serif typeface for sans-serif text, and use a serif typeface for "roman" serif text. Signed-off-by: Darrick J. Wong Acked-by: Dave Chinner Signed-off-by: Jonathan Corbet commit 31527da5d673ed16255869b6d0f209285b8b0981 Author: Yves-Alexis Perez Date: Tue Oct 2 22:47:23 2018 +0200 yama: clarify ptrace_scope=2 in Yama documentation Current phrasing is ambiguous since it's unclear if attaching to a children through PTRACE_TRACEME requires CAP_SYS_PTRACE. Rephrase the sentence to make that clear. Signed-off-by: Yves-Alexis Perez Acked-by: Kees Cook Signed-off-by: Jonathan Corbet commit 98cee6742c80e35274bab06c5fa1141fe0abd910 Author: Mike Rapoport Date: Fri Oct 5 01:11:01 2018 +0300 docs/vm: split memory hotplug notifier description to Documentation/core-api The memory hotplug notifier description is about kernel internals rather than admin/user visible API. Place it appropriately. Signed-off-by: Mike Rapoport Signed-off-by: Jonathan Corbet commit 6bf53999a3a269d5d27bb636602f6788e1bb4dd0 Author: Mike Rapoport Date: Fri Oct 5 01:11:00 2018 +0300 docs: move memory hotplug description into admin-guide/mm The memory hotplug description in Documentation/memory-hotplug.txt is already formatted as ReST and can be easily added to admin-guide/mm section. While on it, slightly update formatting to make it consistent with the doc-guide. Signed-off-by: Mike Rapoport Signed-off-by: Jonathan Corbet commit 97d49c59e219acac576e16293a6b8cb99302f62f Author: Wolfram Sang Date: Fri Sep 14 17:43:28 2018 +0200 dmaengine: rcar-dmac: set scatter/gather max segment size Fix warning when running with CONFIG_DMA_API_DEBUG_SG=y by allocating a device_dma_parameters structure and filling in the max segment size. Signed-off-by: Wolfram Sang Signed-off-by: Vinod Koul commit 314448f0386f656aa0f695d8743cc1e8eacde3ac Author: Vinod Koul Date: Thu Jul 19 22:22:26 2018 +0530 dmaengine: mmp_tdma: 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 4e3c40408ab8dc4ac4ff5b2b5fe71bd4a8f97f85 Author: Vinod Koul Date: Thu Jul 19 22:22:26 2018 +0530 dmaengine: ep93xx_dma: 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 2ae1a237e58a4e1da4505274e687b37201020d50 Author: Vinod Koul Date: Thu Jul 19 22:22:26 2018 +0530 dmaengine: k3dma: 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 Tested-by: John Stultz Signed-off-by: Vinod Koul commit ad7756e7775e1af42ec0032ea0bea968b8f343a7 Author: Vinod Koul Date: Fri Oct 5 06:32:12 2018 +0530 dmaengine: k3dma: dont use direction for memcpy Memcpy has no direction (copy from memory to memory) so remove the check in prep_memcpy() Tested-by: John Stultz Signed-off-by: Vinod Koul commit dea7a9fbb009ba0629c44fcf105f2d8b0ff74e9f Author: Vinod Koul Date: Thu Jul 19 22:22:26 2018 +0530 dmaengine: imx-dma: 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 7f0c145089537125ba91852eddebe13b2c1266fb Author: Vinod Koul Date: Thu Jul 19 22:22:26 2018 +0530 dmaengine: idma: 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 Acked-by: Andy Shevchenko Signed-off-by: Vinod Koul commit fe6d3719970e5b6662dbdb6e10d71eac5d5b8236 Author: Vinod Koul Date: Thu Jul 19 22:22:26 2018 +0530 dmaengine: hsu: 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 Acked-by: Andy Shevchenko Signed-off-by: Vinod Koul commit 3d143c252ef014f38e6eacb548d5b9464c093e4c Author: Vinod Koul Date: Thu Jul 19 22:22:26 2018 +0530 dmaengine: dw: 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 Acked-by: Andy Shevchenko Signed-off-by: Vinod Koul commit 09347e3f26a56bd5abe931251547aac8d80f0e7e Author: Vinod Koul Date: Thu Jul 19 22:22:26 2018 +0530 dmaengine: jz4740: 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 80ade4beb7330f4c6c855619d21062190303a5a3 Author: Vinod Koul Date: Thu Jul 19 22:22:26 2018 +0530 dmaengine: coh901318: 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 Acked-by: Linus Walleij Signed-off-by: Vinod Koul commit 00648f4d0f4156b747de272e962991e5dca2d603 Author: Vinod Koul Date: Thu Jul 19 22:22:26 2018 +0530 dmaengine: bcm2835: 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 Acked-by: Scott Branden Signed-off-by: Vinod Koul commit 6235588705edbd207c23fb2cfc1795b9579797c1 Author: Vinod Koul Date: Thu Jul 19 22:22:26 2018 +0530 dmaengine: at_hdmac: 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 Acked-by: Ludovic Desroches Signed-off-by: Vinod Koul commit 1f174a1a2cdebc65138e6ed1448b842e73200bb5 Author: Dinh Nguyen Date: Mon Sep 17 09:52:14 2018 -0500 clocksource/drivers/dw_apb: Add reset control Add code to retrieve the reset property from the dw-apb timers and if the property is available, the safe operation is to assert the timer into reset, and followed by a deassert of the timer reset (brings the timer out of reset). This patch is needed for systems where the bootloader has left the timer not used in reset. - Trivial conflict with commit a74bd1ad7a: "Convert to using %pOFn instead of device_node.name" Reported-by: Marek Vasut Signed-off-by: Dinh Nguyen Signed-off-by: Daniel Lezcano commit 40c516757ba00bc17cae03fbb941c6fc131f698d Author: Takashi Iwai Date: Sun Oct 7 09:47:39 2018 +0200 ALSA: hda - Add ASUS G751 quirk model entry Add a corresponding model list entry for ASUS G751 so that user can test the quirk for another compatible machines more easily. Reported-and-tested-by: Håvard Signed-off-by: Takashi Iwai commit 11ba6111160290ccd35562f4e05cec08942a6c4c Author: Takashi Iwai Date: Sun Oct 7 09:44:17 2018 +0200 ALSA: hda - Add quirk for ASUS G751 laptop ASUS G751 requires the extra COEF initialization to make it microphone working properly. Reported-and-tested-by: Håvard Cc: Signed-off-by: Takashi Iwai commit 6fd941784b8ac3e74313f7112f0586076dc36544 Author: Chengguang Xu Date: Sat Oct 6 22:40:34 2018 -0400 ext4: cache NULL when both default_acl and acl are NULL default_acl and acl of newly created inode will be initiated as ACL_NOT_CACHED in vfs function inode_init_always() and later will be updated by calling xxx_init_acl() in specific filesystems. However, when default_acl and acl are NULL then they keep the value of ACL_NOT_CACHED. This patch changes the code to cache NULL for acl / default_acl in this case to save unnecessary ACL lookup attempt. Signed-off-by: Chengguang Xu Signed-off-by: Theodore Ts'o Reviewed-by: Jan Kara commit 72438f8cef4e75a22140853baa4c68392c721b22 Merge: fb4ee67529ff c1d84a1b42ef Author: David S. Miller Date: Sat Oct 6 14:43:42 2018 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net commit fa112cf1e8bc693d5a666b1c479a2859c8b6e0f1 Author: Borislav Petkov Date: Fri Oct 5 15:13:07 2018 +0200 x86/olpc: Fix build error with CONFIG_MFD_CS5535=m When building a 32-bit config which has the above MFD item as module but OLPC_XO1_PM is enabled =y - which is bool, btw - the kernel fails building with: ld: arch/x86/platform/olpc/olpc-xo1-pm.o: in function `xo1_pm_remove': /home/boris/kernel/linux/arch/x86/platform/olpc/olpc-xo1-pm.c:159: undefined reference to `mfd_cell_disable' ld: arch/x86/platform/olpc/olpc-xo1-pm.o: in function `xo1_pm_probe': /home/boris/kernel/linux/arch/x86/platform/olpc/olpc-xo1-pm.c:133: undefined reference to `mfd_cell_enable' make: *** [Makefile:1030: vmlinux] Error 1 Force MFD_CS5535 to y if OLPC_XO1_PM is enabled. Signed-off-by: Borislav Petkov Cc: Lubomir Rintel Cc: x86@kernel.org Link: http://lkml.kernel.org/r/20181005131750.GA5366@zn.tnic commit 32b89760ddf4477da436c272be2abc016e169031 Author: Ingo Molnar Date: Sat Oct 6 13:41:12 2018 +0200 x86/mm/doc: Enhance the x86-64 virtual memory layout descriptions After the cleanups from Baoquan He, make it even more readable: - Remove the 'bits' area size column: it's pretty pointless and was even wrong for some of the entries. Given that MB, GB, TB, PT are 10, 20, 30 and 40 bits, a "8 TB" size description makes it obvious that it's 43 bits. - Introduce an "offset" column: -------------------------------------------------------------------------------- start addr | offset | end addr | size | VM area description -----------------|------------|------------------|---------|-------------------- ... ffff880000000000 | -120 TB | ffffc7ffffffffff | 64 TB | direct mapping of all physical memory (page_offset_base), this is what limits max physical memory supported. The -120 TB notation makes it obvious where this particular virtual memory region starts: 120 TB down from the top of the 64-bit virtual memory space. Especially the layout of the kernel mappings is a *lot* more obvious when written this way, plus it's much easier to compare it with the size column and understand/check/validate and modify the kernel's layout in the future. - Mark the part from where the 47-bit and 56-bit kernel layouts are 100% identical, this starts at the -512 GB offset and the EFI region. - Re-shuffle the size desciptions to be continous blocks of sizes, instead of the often mixed size. I.e. write "0.5 TB" instead of "512 GB" if we are still in the TB-granular region of the map. - Make the 47-bit and 56-bit descriptions use the *exact* same layout and wording, and only differ where there's a material difference. This makes it easy to compare the two tables side by side by switching between two terminal tabs. - Plus enhance a lot of other stylistic/typographical details: make the tables explicitly tabular, add headers, enhance certain entries, etc. etc. Note that there are some apparent errors in the tables as well, but I'll fix them in a separate patch to make it easier to review/validate. Cc: Andy Lutomirski Cc: Baoquan He 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: corbet@lwn.net Cc: linux-doc@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: thgarnie@google.com Signed-off-by: Ingo Molnar commit 5bdcd510c2ac9efaf55c4cbd8d46421d8e2320cd Author: Nadav Amit Date: Fri Oct 5 13:27:18 2018 -0700 x86/jump-labels: Macrofy inline assembly code to work around GCC inlining bugs As described in: 77b0bf55bc67: ("kbuild/Makefile: Prepare for using macros in inline assembly code to work around asm() related GCC inlining bugs") GCC's inlining heuristics are broken with common asm() patterns used in kernel code, resulting in the effective disabling of inlining. The workaround is to set an assembly macro and call it from the inline assembly block - which is also a minor cleanup for the jump-label code. As a result the code size is slightly increased, but inlining decisions are better: text data bss dec hex filename 18163528 10226300 2957312 31347140 1de51c4 ./vmlinux before 18163608 10227348 2957312 31348268 1de562c ./vmlinux after (+1128) And functions such as intel_pstate_adjust_policy_max(), kvm_cpu_accept_dm_intr(), kvm_register_readl() are inlined. Tested-by: Kees Cook Signed-off-by: Nadav Amit Acked-by: Peter Zijlstra (Intel) Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: Greg Kroah-Hartman Cc: Kate Stewart Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Philippe Ombredanne Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20181005202718.229565-4-namit@vmware.com Link: https://lore.kernel.org/lkml/20181003213100.189959-11-namit@vmware.com/T/#u Signed-off-by: Ingo Molnar commit d5a581d84ae6b8a4a740464b80d8d9cf1e7947b2 Author: Nadav Amit Date: Fri Oct 5 13:27:17 2018 -0700 x86/cpufeature: Macrofy inline assembly code to work around GCC inlining bugs As described in: 77b0bf55bc67: ("kbuild/Makefile: Prepare for using macros in inline assembly code to work around asm() related GCC inlining bugs") GCC's inlining heuristics are broken with common asm() patterns used in kernel code, resulting in the effective disabling of inlining. The workaround is to set an assembly macro and call it from the inline assembly block - which is pretty pointless indirection in the static_cpu_has() case, but is worth it to improve overall inlining quality. The patch slightly increases the kernel size: text data bss dec hex filename 18162879 10226256 2957312 31346447 1de4f0f ./vmlinux before 18163528 10226300 2957312 31347140 1de51c4 ./vmlinux after (+693) And enables the inlining of function such as free_ldt_pgtables(). Tested-by: Kees Cook Signed-off-by: Nadav Amit Acked-by: Peter Zijlstra (Intel) Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20181005202718.229565-3-namit@vmware.com Link: https://lore.kernel.org/lkml/20181003213100.189959-10-namit@vmware.com/T/#u Signed-off-by: Ingo Molnar commit 0474d5d9d2f7f3b11262f7bf87d0e7314ead9200 Author: Nadav Amit Date: Fri Oct 5 13:27:16 2018 -0700 x86/extable: Macrofy inline assembly code to work around GCC inlining bugs As described in: 77b0bf55bc67: ("kbuild/Makefile: Prepare for using macros in inline assembly code to work around asm() related GCC inlining bugs") GCC's inlining heuristics are broken with common asm() patterns used in kernel code, resulting in the effective disabling of inlining. The workaround is to set an assembly macro and call it from the inline assembly block - which is also a minor cleanup for the exception table code. Text size goes up a bit: text data bss dec hex filename 18162555 10226288 2957312 31346155 1de4deb ./vmlinux before 18162879 10226256 2957312 31346447 1de4f0f ./vmlinux after (+292) But this allows the inlining of functions such as nested_vmx_exit_reflected(), set_segment_reg(), __copy_xstate_to_user() which is a net benefit. Tested-by: Kees Cook Signed-off-by: Nadav Amit Acked-by: Peter Zijlstra (Intel) Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20181005202718.229565-2-namit@vmware.com Link: https://lore.kernel.org/lkml/20181003213100.189959-9-namit@vmware.com/T/#u Signed-off-by: Ingo Molnar commit 02678a582392111928650f116b34091bfdb6441e Merge: bce6824cc8e8 77ac1c02d9f2 Author: Ingo Molnar Date: Sat Oct 6 15:51:56 2018 +0200 Merge branch 'core/core' into x86/build, to prevent conflicts Signed-off-by: Ingo Molnar commit a223464217737c6563c7986df67fe3b7a7aaff1e Merge: 94967b55ebf3 2130b789b3ef Author: Thomas Gleixner Date: Sat Oct 6 15:45:07 2018 +0200 Merge tag 'irqchip-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms into irq/core Pull irqchip updates from Marc Zyngier: - kexec/kdump support for EFI-based GICv3 platforms - Marvell SEI support - QC PDC fixes - GIC cleanups and optimizations - DT updates [ tglx: Dropped the madera driver as it breaks the build ] commit 5b12904065798fee8b153a506ac7b72d5ebbe26c Author: Baoquan He Date: Sat Oct 6 16:43:26 2018 +0800 x86/mm/doc: Clean up the x86-64 virtual memory layout descriptions In Documentation/x86/x86_64/mm.txt, the description of the x86-64 virtual memory layout has become a confusing hodgepodge of inconsistencies: - there's a hard to read mixture of 'TB' and 'bits' notation - the entries sometimes mention a size in the description and sometimes not - sometimes they list holes by address, sometimes only as an 'unused hole' line So make it all a coherent, readable, well organized description. Signed-off-by: Baoquan He Cc: 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: corbet@lwn.net Cc: linux-doc@vger.kernel.org Cc: thgarnie@google.com Link: http://lkml.kernel.org/r/20181006084327.27467-3-bhe@redhat.com Signed-off-by: Ingo Molnar commit 06d4a462e954756f3d3d54e6f3f1bdc2e6f592a9 Author: Baoquan He Date: Sat Oct 6 16:43:25 2018 +0800 x86/KASLR: Update KERNEL_IMAGE_SIZE description Currently CONFIG_RANDOMIZE_BASE=y is set by default, which makes some of the old comments above the KERNEL_IMAGE_SIZE definition out of date. Update them to the current state of affairs. Signed-off-by: Baoquan He Cc: 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: corbet@lwn.net Cc: linux-doc@vger.kernel.org Cc: thgarnie@google.com Link: http://lkml.kernel.org/r/20181006084327.27467-2-bhe@redhat.com Signed-off-by: Ingo Molnar commit 5580d810560da33804053ae3bca13110c9a8d5e8 Merge: 2a4550122653 9b43960b899c Author: Kalle Valo Date: Sat Oct 6 14:22:47 2018 +0300 Merge tag 'mt76-for-kvalo-2018-10-05' of https://github.com/nbd168/wireless mt76 patches for 4.20 * unify code between mt76x0, mt76x2 * mt76x0 fixes * another fix for rx buffer allocation regression on usb * move mt76x2 source files to mt76x2 folder * more work on mt76x0e support commit 992b649a3f013465d8128da02e5449def662a4c3 Author: Lianbo Jiang Date: Sun Sep 30 16:37:41 2018 +0800 kdump, proc/vmcore: Enable kdumping encrypted memory with SME enabled In the kdump kernel, the memory of the first kernel needs to be dumped into the vmcore file. If SME is enabled in the first kernel, the old memory has to be remapped with the memory encryption mask in order to access it properly. Split copy_oldmem_page() functionality to handle encrypted memory properly. [ bp: Heavily massage everything. ] Signed-off-by: Lianbo Jiang Signed-off-by: Borislav Petkov Cc: kexec@lists.infradead.org Cc: tglx@linutronix.de Cc: mingo@redhat.com Cc: hpa@zytor.com Cc: akpm@linux-foundation.org Cc: dan.j.williams@intel.com Cc: bhelgaas@google.com Cc: baiyaowei@cmss.chinamobile.com Cc: tiwai@suse.de Cc: brijesh.singh@amd.com Cc: dyoung@redhat.com Cc: bhe@redhat.com Cc: jroedel@suse.de Link: https://lkml.kernel.org/r/be7b47f9-6be6-e0d1-2c2a-9125bc74b818@redhat.com commit 8780158cf977ea5f9912931a30b3d575b36dba22 Author: Lianbo Jiang Date: Sun Sep 30 11:10:32 2018 +0800 iommu/amd: Remap the IOMMU device table with the memory encryption mask for kdump The kdump kernel copies the IOMMU device table from the old device table which is encrypted when SME is enabled in the first kernel. So remap the old device table with the memory encryption mask in the kdump kernel. [ bp: Massage commit message. ] Signed-off-by: Lianbo Jiang Signed-off-by: Borislav Petkov Reviewed-by: Tom Lendacky Acked-by: Joerg Roedel Cc: kexec@lists.infradead.org Cc: tglx@linutronix.de Cc: mingo@redhat.com Cc: hpa@zytor.com Cc: akpm@linux-foundation.org Cc: dan.j.williams@intel.com Cc: bhelgaas@google.com Cc: baiyaowei@cmss.chinamobile.com Cc: tiwai@suse.de Cc: brijesh.singh@amd.com Cc: dyoung@redhat.com Cc: bhe@redhat.com Link: https://lkml.kernel.org/r/20180930031033.22110-4-lijiang@redhat.com commit 9cf38d5559e813cccdba8b44c82cc46ba48d0896 Author: Lianbo Jiang Date: Sun Sep 30 11:10:31 2018 +0800 kexec: Allocate decrypted control pages for kdump if SME is enabled When SME is enabled in the first kernel, it needs to allocate decrypted pages for kdump because when the kdump kernel boots, these pages need to be accessed decrypted in the initial boot stage, before SME is enabled. [ bp: clean up text. ] Signed-off-by: Lianbo Jiang Signed-off-by: Borislav Petkov Reviewed-by: Tom Lendacky Cc: kexec@lists.infradead.org Cc: tglx@linutronix.de Cc: mingo@redhat.com Cc: hpa@zytor.com Cc: akpm@linux-foundation.org Cc: dan.j.williams@intel.com Cc: bhelgaas@google.com Cc: baiyaowei@cmss.chinamobile.com Cc: tiwai@suse.de Cc: brijesh.singh@amd.com Cc: dyoung@redhat.com Cc: bhe@redhat.com Cc: jroedel@suse.de Link: https://lkml.kernel.org/r/20180930031033.22110-3-lijiang@redhat.com commit c3a7a61c192ec350330128edb13db33a9bc0ace1 Author: Lianbo Jiang Date: Thu Sep 27 15:19:51 2018 +0800 x86/ioremap: Add an ioremap_encrypted() helper When SME is enabled, the memory is encrypted in the first kernel. In this case, SME also needs to be enabled in the kdump kernel, and we have to remap the old memory with the memory encryption mask. The case of concern here is if SME is active in the first kernel, and it is active too in the kdump kernel. There are four cases to be considered: a. dump vmcore It is encrypted in the first kernel, and needs be read out in the kdump kernel. b. crash notes When dumping vmcore, the people usually need to read useful information from notes, and the notes is also encrypted. c. iommu device table It's encrypted in the first kernel, kdump kernel needs to access its content to analyze and get information it needs. d. mmio of AMD iommu not encrypted in both kernels Add a new bool parameter @encrypted to __ioremap_caller(). If set, memory will be remapped with the SME mask. Add a new function ioremap_encrypted() to explicitly pass in a true value for @encrypted. Use ioremap_encrypted() for the above a, b, c cases. [ bp: cleanup commit message, extern defs in io.h and drop forgotten include. ] Signed-off-by: Lianbo Jiang Signed-off-by: Borislav Petkov Reviewed-by: Tom Lendacky Cc: kexec@lists.infradead.org Cc: tglx@linutronix.de Cc: mingo@redhat.com Cc: hpa@zytor.com Cc: akpm@linux-foundation.org Cc: dan.j.williams@intel.com Cc: bhelgaas@google.com Cc: baiyaowei@cmss.chinamobile.com Cc: tiwai@suse.de Cc: brijesh.singh@amd.com Cc: dyoung@redhat.com Cc: bhe@redhat.com Cc: jroedel@suse.de Link: https://lkml.kernel.org/r/20180927071954.29615-2-lijiang@redhat.com commit 2a4550122653e6342c9a4e05c4fe4216f12d96a0 Merge: e1c02eb16a9c ea7cb8293874 Author: Kalle Valo Date: Sat Oct 6 12:50:14 2018 +0300 Merge tag 'iwlwifi-next-for-kalle-2018-10-06' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next Third set of iwlwifi patches for 4.20 * Fix for a race condition that caused the FW to crash; * HE radiotap cleanup and improvements; * Reorder channel optimization for scans; * Bumped the FW API version supported after the last API change for this release; * Debugging improvements; * A few bug fixes; * Some cleanups in preparation for a new implementation; * Other small improvements, cleanups and fixes. commit 59c66636aec742abd7652fb4b4a4e5995ee7f444 Author: Guenter Roeck Date: Sun Sep 30 15:16:50 2018 -0700 MAINTAINERS: Fix file pattern for MEN Z069 watchdog driver The file name is menz69_wdt.c, not menz069_wdt.c. Reported-by: Joe Perches Cc: Joe Perches Cc: Johannes Thumshirn Signed-off-by: Guenter Roeck Reviewed-by: Wim Van Sebroeck Signed-off-by: Wim Van Sebroeck commit ea7cb8293874f8d9cf36c9e5387e2247f15373dc Author: Sara Sharon Date: Thu Jun 21 14:44:28 2018 +0300 iwlwifi: dbg: make trigger functions type agnostic As preparation for new trigger type, make iwl_fw_dbg_collect_desc agnostic to the trigger structure. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho commit af303252bffa8d0622e077dc9cb246695b47ad07 Author: Sara Sharon Date: Thu Jun 21 14:24:45 2018 +0300 iwlwifi: dbg: decrement occurrences for all triggers iwl_fw_dbg_collect can be called by any function that already has the error string ready. iwl_fw_dbg_collect_trig, on the other hand, does string formatting. The occurrences decrement is at iwl_fw_dbg_collect_trig, instead of iwl_fw_dbg_collect, which causes it to sometimes be skipped. Move it to the right location. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho commit 5bea4304eea790766dd45cdd328ee287df2ade75 Author: Yisheng Xie Date: Mon May 21 19:57:44 2018 +0800 iwlwifi: mvm: use match_string() helper match_string() returns the index of an array for a matching string, which can be used intead of open coded variant. Reviewed-by: Andy Shevchenko Signed-off-by: Yisheng Xie Signed-off-by: Luca Coelho commit 136521cb9c2fc8aa7db836c9d5de9c91ba4a0979 Author: Sara Sharon Date: Thu Jun 21 09:43:59 2018 +0300 iwlwifi: dbg: make iwl_fw_dbg_no_trig_window trigger agnostic As preparation for new trigger format, make the function agnostic to the trigger fomat. Instead it gets the relevant parameters - id and delay. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho commit 69f3ca8ed33dd39937ba0ea0c6643d78663db46a Author: Johannes Berg Date: Tue Jun 19 09:32:00 2018 +0200 iwlwifi: mvm: show more HE radiotap data for TB PPDUs For trigger-based PPDUs, most values aren't part of the HE-SIG-A because they're preconfigured by the trigger frame. However, we still have this information since we used the trigger frame to configure the hardware, so we can (and do) read it back out and can thus show it in radiotap. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho commit 8a07e8d4b7361d3eb522b1306e33f50e4836e340 Author: Johannes Berg Date: Tue Jun 19 09:21:58 2018 +0200 iwlwifi: mvm: decode HE information for MU (without ext info) When the info type is MU, we still have the data from the TSF overload words, so should decode that. When it's MU_EXT_INFO we additionally have the SIG-B common 0/1/2 fields. Also document the validity depending on the info type and fix the name of the regular TB PPDU info type accordingly. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho commit 755384b3778ddc33d168ef02547385e209775a7e Author: Shahar S Matityahu Date: Mon May 28 11:18:43 2018 +0300 iwlwifi: add debugfs to send host command Add debugfs to send host command in mvm and fmac op modes. Allows to send host command at runtime via send_hcmd debugfs file. The command is received as a string that represents hex values. The struct of the command is as follows: [cmd_id][flags][length][data] cmd_id and flags are 8 chars long each. length is 4 chars long. data is length * 2 chars long. Signed-off-by: Shahar S Matityahu Signed-off-by: Luca Coelho commit d3f4b6debcc04b601d23b0f9a93f10cb97f68068 Author: Shahar S Matityahu Date: Tue Jun 12 15:40:42 2018 +0300 iwlwifi: runtime: add send host command op to firmware runtime op struct Add send host command op to firmware runtime op struct to allow sending host commands to the op mode from the fw runtime context. Signed-off-by: Shahar S Matityahu Signed-off-by: Luca Coelho commit a19f015dea6053f9c5a55bc42da90bc5b28c4272 Author: Johannes Berg Date: Wed May 9 11:01:12 2018 +0200 iwlwifi: bump firmware API version for 9000 and 22000 series devices Bump the firmware API version to 41. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho commit 47fe2f8ed5ebe76411285994619f71d22519d550 Author: Haim Dreyfuss Date: Mon Jun 4 13:20:00 2018 +0300 iwlwifi: mvm Support new MCC update response Change MCC update response API to be compatible with new FW API. While at it change v2 which is not in use anymore to v3 and cleanup mcc_update v1 command and response which is obsolete. Signed-off-by: Haim Dreyfuss Signed-off-by: Luca Coelho commit 6e00a2376fb7d9974fa8ef791aabdca5314b91d3 Author: Johannes Berg Date: Mon Jun 18 09:53:36 2018 +0200 iwlwifi: pcie: check iwl_pcie_txq_build_tfd() return value If we use the iwl_pcie_txq_build_tfd() return value for BIT(), we should validate that it's not going to be negative, so do the check and bail out if we hit an error. We shouldn't, as we check if it'll fit beforehand, but better be safe. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho commit e00b7b8b91856215743f4e65ac199b41c2e2a3cb Author: Johannes Berg Date: Mon Jun 18 10:22:03 2018 +0200 iwlwifi: add fall through comment The fall-through to the MVM case is intended as we have to do *something* to continue, and can't easily clean up. So we'll just fail in mvm later, if this does happen. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho commit 76dd61d2c57e881020cd2ea61994bf2dc8aefd84 Author: Johannes Berg Date: Mon Jun 18 09:53:36 2018 +0200 iwlwifi: pcie gen2: check iwl_pcie_gen2_set_tb() return value If we use the iwl_pcie_gen2_set_tb() return value for BIT(), we should validate that it's not going to be negative, so do the check and bail out if we hit an error. We shouldn't, as we check if it'll fit beforehand, but better be safe. Fixes: ab6c644539e9 ("iwlwifi: pcie: copy TX functions to new transport") Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho commit e7eeee08434873c2f781dc1afaa42b03a014b95d Author: Naftali Goldstein Date: Tue Jun 12 09:08:40 2018 +0300 iwlwifi: nvm: get num of hw addresses from firmware With NICs that don't read the NVM directly and instead rely on getting the relevant data from the firmware, the number of reserved MAC addresses was not added to the API. This caused the driver to assume there is only one address which results in all interfaces getting the same address. Update the API to fix this. While at it, fix-up the comments with firmware api names to actually match what we have in the firmware. Fixes: e9e1ba3dbf00 ("iwlwifi: mvm: support getting nvm data from firmware") Signed-off-by: Naftali Goldstein Signed-off-by: Luca Coelho commit f38efdb29389cc3ac6a466896a01f0fbdb14f4c7 Author: Shahar S Matityahu Date: Sun May 27 17:17:07 2018 +0300 iwlwifi: add dump collection in case alive flow fails Trigger dump collection if the alive flow fails, regardless of the reason. Signed-off-by: Shahar S Matityahu Signed-off-by: Luca Coelho commit 868a1e863f95183f00809363fefba6d4f5bcd116 Author: Shaul Triebitz Date: Wed Jun 6 17:20:58 2018 +0300 iwlwifi: pcie: avoid empty free RB queue If all free RB queues are empty, the driver will never restock the free RB queue. That's because the restocking happens in the Rx flow, and if the free queue is empty there will be no Rx. Although there's a background worker (a.k.a. allocator) allocating memory for RBs so that the Rx handler can restock them, the worker may run only after the free queue has become empty (and then it is too late for restocking as explained above). There is a solution for that called 'emergency': If the number of used RB's reaches half the amount of all RB's, the Rx handler will not wait for the allocator but immediately allocate memory for the used RB's and restock the free queue. But, since the used RB's is per queue, it may happen that the used RB's are spread between the queues such that the emergency check will fail for each of the queues (and still run out of RBs, causing the above symptom). To fix it, move to emergency mode if the sum of *all* used RBs (for all Rx queues) reaches half the amount of all RB's Signed-off-by: Shaul Triebitz Signed-off-by: Luca Coelho commit 1eda295f54594257ba45bd370dabcde5bea0a3fd Author: Johannes Berg Date: Fri Jun 15 14:21:53 2018 +0200 iwlwifi: mvm: set max TX/RX A-MPDU subframes to HE limit In mac80211, the default remains for HT, so set the limit to HE for our driver. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho commit fed3c4ea6f8f12cb73010c969070f7dbed46ff3f Author: Johannes Berg Date: Thu Jun 14 16:30:52 2018 +0200 iwlwifi: mvm: add more information to HE radiotap For SU/SU-ER/MU PPDUs we have spatial reuse. For those where it's relevant we also know the pre-FEC padding factor, PE disambiguity bit, beam change bit and doppler bit. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho commit 750f43774eb43aa36465c2df5874dbeafb67c9bd Author: Johannes Berg Date: Thu Jun 14 14:58:24 2018 +0200 iwlwifi: mvm: add LDPC-XSYM to HE radiotap data Add information about the LDCP extra symbol segment to the HE data when applicable (not for trigger-based PPDUs). While at it, clean up the code for UL/DL a bit. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho commit 2b1476345fb6c837fae608c4fd9fddb48059c612 Author: Johannes Berg Date: Thu Jun 14 14:54:38 2018 +0200 iwlwifi: mvm: add TXOP to HE radiotap data We have this data available, so add it. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho commit 42d8a9d5783e4efdbdf746b139dc98e2b64f3ce3 Author: Johannes Berg Date: Thu Jun 14 14:52:19 2018 +0200 iwlwifi: mvm: move HE-MU LTF_NUM parsing to he_phy_data parsing This code gets shorter if it doesn't have to check all the conditions, so move it to an appropriate place that has all of them validated already. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho commit ffe9d734b8b556737c87acaa08666d0a6c1686ab Author: Johannes Berg Date: Thu Jun 14 14:48:27 2018 +0200 iwlwifi: mvm: clean up HE radiotap RU allocation parsing Split the code out into a separate routine, and move that to be called inside the previously introduced iwl_mvm_decode_he_phy_data() function. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho commit 59b8cf0cfb5ac508e362ae1ddf0dfb91744856fb Author: Johannes Berg Date: Thu Jun 14 14:36:22 2018 +0200 iwlwifi: mvm: pull some he_phy_data decoding into a separate function Pull some of the decoding of he_phy_data into a separate function so we don't need to check over and over again if it's valid. While at it, fix the UL/DL bit reporting to be for all but trigger- based frames. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho commit eb89c0fb9191e6ebd8f1af52624f1aa034b707b6 Author: Johannes Berg Date: Fri Jun 15 09:43:43 2018 +0200 iwlwifi: mvm: put HE SIG-B symbols/users data correctly As detected by Luca during code review when I move this in the next patch, the code here is putting the data into the wrong field (flags1 instead of flags2). Fix that. Fixes: e5721e3f770f ("iwlwifi: mvm: add radiotap data for HE") Reported-by: Luca Coelho Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho commit f9fe579386a84878eea9217c8e825a7d11335feb Author: Johannes Berg Date: Thu Jun 14 14:17:42 2018 +0200 iwlwifi: mvm: minor cleanups to HE radiotap code Remove a stray empty line, unbreak some lines that aren't really that long, and move on variable setting into the initializer to avoid initializing it twice. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho commit 07f62bb953e83f070df068589b391f74cc06ccca Author: Johannes Berg Date: Thu Jun 14 14:07:49 2018 +0200 iwlwifi: mvm: remove unnecessary overload variable This is equivalent to checking he_phy_data != HE_PHY_DATA_INVAL, which is already done in a number of places, so remove the extra 'overload' variable entirely. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho commit 155f7e0441cd121b1e673d465a35e99f4b9b2f0b Author: Emmanuel Grumbach Date: Wed Jun 13 11:49:20 2018 +0300 iwlwifi: mvm: clear HW_RESTART_REQUESTED when stopping the interface Fix a bug that happens in the following scenario: 1) suspend without WoWLAN 2) mac80211 calls drv_stop because of the suspend 3) __iwl_mvm_mac_stop deallocates the aux station 4) during drv_stop the firmware crashes 5) iwlmvm: * sets IWL_MVM_STATUS_HW_RESTART_REQUESTED * asks mac80211 to kick the restart flow 6) mac80211 puts the restart worker into a freezable queue which means that the worker will not run for now since the workqueue is already frozen 7) ... 8) resume 9) mac80211 runs ieee80211_reconfig as part of the resume 10) mac80211 detects that a restart flow has been requested and that we are now resuming from suspend and cancels the restart worker 11) mac80211 calls drv_start() 12) __iwl_mvm_mac_start checks that IWL_MVM_STATUS_HW_RESTART_REQUESTED clears it, sets IWL_MVM_STATUS_IN_HW_RESTART and calls iwl_mvm_restart_cleanup() 13) iwl_fw_error_dump gets called and accesses the device to get debug data 14) iwl_mvm_up adds the aux station 15) iwl_mvm_add_aux_sta() allocates an internal station for the aux station 16) iwl_mvm_allocate_int_sta() tests IWL_MVM_STATUS_IN_HW_RESTART and doesn't really allocate a station ID for the aux station 17) a new queue is added for the aux station Note that steps from 5 to 9 aren't really part of the problem but were described for the sake of completeness. Once the iwl_mvm_mac_stop() is called, the device is not accessible, meaning that step 12) can't succeed and we'll see the following: drivers/net/wireless/intel/iwlwifi/pcie/trans.c:2122 iwl_trans_pcie_grab_nic_access+0xc0/0x1d6 [iwlwifi]() Timeout waiting for hardware access (CSR_GP_CNTRL 0x080403d8) Call Trace: [] iwl_trans_pcie_grab_nic_access+0xc0/0x1d6 [iwlwifi] [] iwl_trans_pcie_dump_regs+0x3fd/0x3fd [iwlwifi] [] iwl_fw_error_dump+0x4f5/0xe8b [iwlwifi] [] __iwl_mvm_mac_start+0x5a/0x21a [iwlmvm] [] iwl_mvm_mac_start+0xd4/0x103 [iwlmvm] [] drv_start+0xa1/0xc5 [iwl7000_mac80211] [] ieee80211_reconfig+0x145/0xf50 [mac80211] [] ieee80211_resume+0x62/0x66 [mac80211] [] wiphy_resume+0xa9/0xc6 [cfg80211] The station id of the aux station is set to 0xff in step 3 and because we don't really allocate a new station id for the auxliary station (as explained in 16), we end up sending a command to the firmware asking to connect the queue to station id 0xff. This makes the firmware crash with the following information: 0x00002093 | ADVANCED_SYSASSERT 0x000002F0 | trm_hw_status0 0x00000000 | trm_hw_status1 0x00000B38 | branchlink2 0x0001978C | interruptlink1 0x00000000 | interruptlink2 0xFF080501 | data1 0xDEADBEEF | data2 0xDEADBEEF | data3 Firmware error during reconfiguration - reprobe! FW error in SYNC CMD SCD_QUEUE_CFG Fix this by clearing IWL_MVM_STATUS_HW_RESTART_REQUESTED in iwl_mvm_mac_stop(). We won't be able to collect debug data anyway and when we will brought up again, we will have a clean state from the firmware perspective. Since we won't have IWL_MVM_STATUS_IN_HW_RESTART set in step 12) we won't get to the 2093 ASSERT either. Fixes: bf8b286f86fc ("iwlwifi: mvm: defer setting IWL_MVM_STATUS_IN_HW_RESTART") Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho commit 6c042d7505d082b3bda0909c8a2c9817aa210ea2 Author: Sara Sharon Date: Tue Jun 12 10:41:35 2018 +0300 iwlwifi: dbg: group trigger condition to helper function The triplet of get trigger, is trigger enabled and is trigger stopped repeats itself. Group them in a function to avoid code duplication. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho commit 7339cc292c1df3b8f05a90088f8b4e5d2a02cc46 Author: Sara Sharon Date: Tue Jun 12 14:34:32 2018 +0300 iwlwifi: dbg: dump memory in a helper function The code that dumps various memory types repeats itself. Move it to a function to avoid duplication. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho commit 9c16e0bbe140623fa7a31d7f0dabbba7180658b7 Author: Ayala Beker Date: Thu May 17 10:05:17 2018 +0300 iwlwifi: mvm: allow channel reorder optimization during scan Allow the FW to reorder HB channels and first scan HB channels with assumed APs, in order to reduce the scan duration. Currently enable it for all scan requests types. Signed-off-by: Ayala Beker Signed-off-by: Luca Coelho commit a6820511f193a94c841122e71bcc4da7f33db499 Author: Sara Sharon Date: Mon Jun 11 15:30:07 2018 +0300 iwlwifi: dbg: split iwl_fw_error_dump to two functions Split iwl_fw_error_dump to two parts. The first part will dump the actual data, and second will do the file allocations, trans calls and actual file operations. This is done in order to enable reuse of the code for the new debug ini infrastructure. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho commit 68025d5f9bfe87cdfee31ca933edbfdbbd8f616a Author: Sara Sharon Date: Mon Jun 11 12:43:26 2018 +0300 iwlwifi: dbg: refactor dump code to improve readability Add a macro to replace all the conditions checking for valid dump length. In addition, move the fifo len calculation to a helper function. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho commit 17b809c9b22e34e17b1de6ff7c913127b7a249db Author: Sara Sharon Date: Mon Jun 11 11:43:09 2018 +0300 iwlwifi: dbg: move debug data to a struct The debug variables are bloating the iwl_fw struct. And the fields are out of order, missing docs and some are redundant. Clean this up. This serves as preparation for unionizing it for the new ini infra. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho commit 2e1976bb75263fbad918e82184b16a23bd721546 Author: Luca Coelho Date: Mon Jun 11 11:15:17 2018 +0300 iwlwifi: mvm: check for n_profiles validity in EWRD ACPI When reading the profiles from the EWRD table in ACPI, we loop over the data and set it into our internal table. We use the number of profiles specified in ACPI without checking its validity, so if the ACPI table is corrupted and the number is larger than our array size, we will try to make an out-of-bounds access. Fix this by making sure the value specified in the ACPI table is valid. Fixes: 6996490501ed ("iwlwifi: mvm: add support for EWRD (Dynamic SAR) ACPI table") Signed-off-by: Luca Coelho commit dc160e449122274e0acffa622cc937f90b76a5a4 Author: Rohit kumar Date: Mon Sep 24 16:37:50 2018 +0530 remoteproc: qcom: Introduce Non-PAS ADSP PIL driver This adds Non PAS ADSP PIL driver for Qualcomm Technologies Inc SoCs. Added initial support for SDM845 with ADSP bootup and shutdown operation handled from Application Processor SubSystem(APSS). Reviewed-by: Sibi Sankar Tested-by: Sibi Sankar Signed-off-by: Rohit kumar [bjorn: Renamed driver and Kconfig from qcom_adsp_pil to qcom_q6v5_adsp] Signed-off-by: Bjorn Andersson commit 159accc4d05de234f485366163e9084a73baa63b Author: Rohit kumar Date: Tue Sep 11 09:24:01 2018 +0530 dt-binding: remoteproc: Add QTI ADSP PIL bindings Add devicetree bindings documentation file for Qualcomm Technolgies Inc ADSP Peripheral Image Loader. Reviewed-by: Rob Herring Signed-off-by: Rohit kumar Signed-off-by: Bjorn Andersson commit d3ae96c0e6b042a883927493351b2af6ee05e92c Author: Sibi Sankar Date: Mon Oct 1 19:55:00 2018 +0530 remoteproc: qcom: q6v5: Fix a race condition on fatal crash Currently with GLINK_SSR enabled each fatal crash results in servicing a crash from wdog as well. This is due to a race that occurs in setting the running flag in the shutdown path. Fix this by moving the running flag to the end of fatal interrupt handler. Crash Logs: qcom-q6v5-pil 4080000.remoteproc: fatal error without message remoteproc remoteproc0: crash detected in 4080000.remoteproc: type fatal error remoteproc remoteproc0: handling crash #1 in 4080000.remoteproc remoteproc remoteproc0: recovering 4080000.remoteproc qcom-q6v5-pil 4080000.remoteproc: watchdog without message remoteproc remoteproc0: crash detected in 4080000.remoteproc: type watchdog remoteproc:glink-edge: intent request timed out qcom_glink_ssr remoteproc:glink-edge.glink_ssr.-1.-1: failed to send cleanup message qcom_glink_ssr remoteproc:glink-edge.glink_ssr.-1.-1: timeout waiting for cleanup done message qcom-q6v5-pil 4080000.remoteproc: timed out on wait qcom-q6v5-pil 4080000.remoteproc: port failed halt remoteproc remoteproc0: stopped remote processor 4080000.remoteproc qcom-q6v5-pil 4080000.remoteproc: MBA booted, loading mpss remoteproc remoteproc0: remote processor 4080000.remoteproc is now up remoteproc remoteproc0: handling crash #2 in 4080000.remoteproc remoteproc remoteproc0: recovering 4080000.remoteproc qcom-q6v5-pil 4080000.remoteproc: port failed halt remoteproc remoteproc0: stopped remote processor 4080000.remoteproc qcom-q6v5-pil 4080000.remoteproc: MBA booted, loading mpss remoteproc remoteproc0: remote processor 4080000.remoteproc is now up Suggested-by: Bjorn Andersson Signed-off-by: Sibi Sankar Signed-off-by: Bjorn Andersson commit 1bb89893d4fa8275333b3ed74fb0379d63025f9a Author: Suman Anna Date: Fri Sep 14 19:37:23 2018 -0500 remoteproc: Add missing kernel-doc comment for auto-boot The commit ddf711872c9d ("remoteproc: Introduce auto-boot flag") introduced the auto-boot flag but missed adding the corresponding kernel-doc comment. Add the same. Signed-off-by: Suman Anna Signed-off-by: Bjorn Andersson commit faeadbb64094757150a8c2a3175ca418dbdd472c Author: Suman Anna Date: Fri Sep 14 19:37:22 2018 -0500 remoteproc: Check for NULL firmwares in sysfs interface The remoteproc framework provides a sysfs file 'firmware' for modifying the firmware image name from userspace. Add an additional check to ensure NULL firmwares are errored out right away, rather than getting a delayed error while requesting a firmware during the start of a remoteproc later on. Tested-by: Arnaud Pouliquen Signed-off-by: Suman Anna Signed-off-by: Bjorn Andersson commit 8a98ec7c7b3901330a036af0f62f523c31d763da Author: Darrick J. Wong Date: Fri Oct 5 19:20:08 2018 -0400 docs: promote the ext4 data structures book to top level Move the ext4 data structures book to Documentation/filesystems/ext4/ since the administrative information moved elsewhere. Signed-off-by: Darrick J. Wong Signed-off-by: Theodore Ts'o commit d3091215921bd4b8fdf3129bf8f733b8ca48dc80 Author: Darrick J. Wong Date: Fri Oct 5 19:11:59 2018 -0400 docs: move ext4 administrative docs to admin-guide/ Move the ext4 mount option and other administrative stuff to the Linux administrator's guide. Signed-off-by: Darrick J. Wong Signed-off-by: Theodore Ts'o commit ccd3c4373eacb044eb3832966299d13d2631f66f Author: Jan Kara Date: Fri Oct 5 18:44:40 2018 -0400 jbd2: fix use after free in jbd2_log_do_checkpoint() The code cleaning transaction's lists of checkpoint buffers has a bug where it increases bh refcount only after releasing journal->j_list_lock. Thus the following race is possible: CPU0 CPU1 jbd2_log_do_checkpoint() jbd2_journal_try_to_free_buffers() __journal_try_to_free_buffer(bh) ... while (transaction->t_checkpoint_io_list) ... if (buffer_locked(bh)) { <-- IO completes now, buffer gets unlocked --> spin_unlock(&journal->j_list_lock); spin_lock(&journal->j_list_lock); __jbd2_journal_remove_checkpoint(jh); spin_unlock(&journal->j_list_lock); try_to_free_buffers(page); get_bh(bh) <-- accesses freed bh Fix the problem by grabbing bh reference before unlocking journal->j_list_lock. Fixes: dc6e8d669cf5 ("jbd2: don't call get_bh() before calling __jbd2_journal_remove_checkpoint()") Fixes: be1158cc615f ("jbd2: fold __process_buffer() into jbd2_log_do_checkpoint()") Reported-by: syzbot+7f4a27091759e2fe7453@syzkaller.appspotmail.com CC: stable@vger.kernel.org Reviewed-by: Lukas Czerner Signed-off-by: Jan Kara Signed-off-by: Theodore Ts'o commit ed7a01fd3fd77f40b4ef2562b966a5decd8928d2 Author: Leon Romanovsky Date: Tue Oct 2 11:48:03 2018 +0300 RDMA/restrack: Release task struct which was hold by CM_ID object Tracking CM_ID resource is performed in two stages: creation of cm_id and connecting it to the cma_dev. It is needed because rdma-cm protocol exports two separate user-visible calls rdma_create_id and rdma_accept. At the time of CM_ID creation, the real owner of that object is unknown yet and we need to grab task_struct. This task_struct is released or reassigned in attach phase later on. but call to rdma_destroy_id left this task_struct unreleased. Such separation is unique to CM_ID and other restrack objects initialize in one shot. It means that it is safe to use "res->valid" check to catch unfinished CM_ID flow and release task_struct for that object. Fixes: 00313983cda6 ("RDMA/nldev: provide detailed CM_ID information") Reported-by: Artemy Kovalyov Reviewed-by: Artemy Kovalyov Reviewed-by: Yossi Itigin Signed-off-by: Leon Romanovsky Reviewed-by: Steve Wise Signed-off-by: Jason Gunthorpe commit 2165fc264079ecb7fbfa5e8b330a92eb3f0fcbe1 Author: Leon Romanovsky Date: Tue Oct 2 11:48:02 2018 +0300 RDMA/restrack: Consolidate task name updates in one place Unify task update and kernel name set in one place. Reviewed-by: Artemy Kovalyov Reviewed-by: Yossi Itigin Signed-off-by: Leon Romanovsky Reviewed-by: Steve Wise Signed-off-by: Jason Gunthorpe commit 363ad35577de3a73cf97006ec5f00fccaee73172 Author: Leon Romanovsky Date: Tue Oct 2 11:48:01 2018 +0300 RDMA/restrack: Un-inline set task implementation Prepare rdma_restrack_set_task() call to accommodate more code by moving its implementation from *.h to *.c. Reviewed-by: Artemy Kovalyov Reviewed-by: Yossi Itigin Signed-off-by: Leon Romanovsky Reviewed-by: Steve Wise Signed-off-by: Jason Gunthorpe commit fb4ee67529ff3e4c5874768477887c2df5714c96 Author: Vijay Khemka Date: Fri Oct 5 10:46:01 2018 -0700 net/ncsi: Add NCSI OEM command support This patch adds OEM commands and response handling. It also defines OEM command and response structure as per NCSI specification along with its handlers. ncsi_cmd_handler_oem: This is a generic command request handler for OEM commands ncsi_rsp_handler_oem: This is a generic response handler for OEM commands Signed-off-by: Vijay Khemka Reviewed-by: Justin Lee Reviewed-by: Samuel Mendoza-Jonas Signed-off-by: David S. Miller commit 6f8474922b443fd4a89a5dd5b891a3c6a144b9c7 Author: Jakub Sitnicki Date: Fri Oct 5 10:19:57 2018 +0200 selftests: net: Clean up an unused variable Address compiler warning: ip_defrag.c: In function 'send_udp_frags': ip_defrag.c:206:16: warning: unused variable 'udphdr' [-Wunused-variable] struct udphdr udphdr; ^~~~~~ Signed-off-by: Jakub Sitnicki Signed-off-by: David S. Miller commit 4c2d39bd40c1f34975bec070a8e43fa573a9c327 Author: Davide Caratti Date: Thu Oct 4 18:34:39 2018 +0200 tc-testing: use a plugin to build eBPF program use a TDC plugin, instead of building eBPF programs in the 'setup' stage. '-B' argument can be used to build eBPF programs in $EBPFDIR directory, in the 'pre-suite' stage. Binaries are then cleaned in 'post-suite' stage. Signed-off-by: Davide Caratti Signed-off-by: David S. Miller commit cf5eafbfa586d030f9321cee516b91d089e38280 Author: Davide Caratti Date: Thu Oct 4 18:34:38 2018 +0200 tc-testing: fix build of eBPF programs rely on uAPI headers in the current kernel tree, rather than requiring the correct version installed on the test system. While at it, group all sections in a single binary and test the 'section' parameter. Reported-by: Lucas Bates Signed-off-by: Davide Caratti Signed-off-by: David S. Miller commit 4a84810eaa20337ffc033c299d35ab91877e3814 Merge: 068b88cc175d 71e32a20cfbf Author: David S. Miller Date: Fri Oct 5 14:36:45 2018 -0700 Merge branch 'mscc-ocelot-add-support-for-SerDes-muxing-configuration' Quentin Schulz says: ==================== mscc: ocelot: add support for SerDes muxing configuration The Ocelot switch has currently an hardcoded SerDes muxing that suits only a particular use case. Any other board setup will fail to work. To prepare for upcoming boards' support that do not have the same muxing, create a PHY driver that will handle all possible cases. A SerDes can work in SGMII, QSGMII or PCIe and is also muxed to use a given port depending on the selected mode or board design. The SerDes configuration is in the middle of an address space (HSIO) that is used to configure some parts in the MAC controller driver, that is why we need to use a syscon so that we can write to the same address space from different drivers safely using regmap. This breaks backward compatibility but it's fine because there's only one board at the moment that is using what's modified in this patch series. This will break git bisect. Even though this patch series is about SerDes __muxing__ configuration, the DT node is named serdes for the simple reason that I couldn't find any mention to SerDes anywhere else from the address space handled by this driver. v4: - add reviewed-by, - format the patch series with -M for identifying renamed files, - add parent info in DT binding of the SerDes IP, - move to macros SERDES[16]G(X) instead of multiple SERDES[16]G_[012345] constants, - move to SERDES[16]G_MAX being the last VALID macro of a type, so migrate to <= conditions instead of < when iterating, - create a SERDES_MUX_SGMII and SERDES_MUX_QSGMII macro so the muxing configurations are a tad more readable, - use a bunch of unsigned int instead of int, - return -EOPNOTSUPP for SERDES6G/PCIe until it's supported, - simplify condition when there is an error code returned by devm_of_phy_get, v3: - add Paul Burton's Acked-By on MIPS patches so that the patch series can be merged in the net tree in its entirety, v2: - use a switch case for setting the phy_mode in the SerDes driver as suggested by Andrew, - stop replacing the value of the error pointer in the SerDes driver, - use a dev_dbg for the deferring of the probe in the SerDes driver, - use constants in the Device Tree to select the SerDes macro in use with a port, - adapt the SerDes driver to use those constants, - add a header file in include/dt-bindings for the constants, - fix space/tab issue, ==================== Signed-off-by: David S. Miller commit 71e32a20cfbf0e53f43117337d355ea505f8f081 Author: Quentin Schulz Date: Thu Oct 4 14:22:08 2018 +0200 net: mscc: ocelot: make use of SerDes PHYs for handling their configuration Previously, the SerDes muxing was hardcoded to a given mode in the MAC controller driver. Now, the SerDes muxing is configured within the Device Tree and is enforced in the MAC controller driver so we can have a lot of different SerDes configurations. Make use of the SerDes PHYs in the MAC controller to set up the SerDes according to the SerDes<->switch port mapping and the communication mode with the Ethernet PHY. Signed-off-by: Quentin Schulz Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 51f6b410fc220d8a5a4fae00ebfd8243b6c11d4e Author: Quentin Schulz Date: Thu Oct 4 14:22:07 2018 +0200 phy: add driver for Microsemi Ocelot SerDes muxing The Microsemi Ocelot can mux SerDes lanes (aka macros) to different switch ports or even make it act as a PCIe interface. This adds support for the muxing of the SerDes. Signed-off-by: Quentin Schulz Signed-off-by: David S. Miller commit b68fc09be48edbc47de1a0f3d42ef8adf6c0ac55 Author: Quentin Schulz Date: Thu Oct 4 14:22:06 2018 +0200 dt-bindings: add constants for Microsemi Ocelot SerDes driver The Microsemi Ocelot has multiple SerDes and requires that the SerDes be muxed accordingly to the hardware representation. Let's add a constant for each SerDes available in the Microsemi Ocelot. Reviewed-by: Rob Herring Signed-off-by: Quentin Schulz Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 1d6a632c4754fd070f5390e284e74796c3ef0149 Author: Quentin Schulz Date: Thu Oct 4 14:22:05 2018 +0200 MIPS: mscc: ocelot: add SerDes mux DT node The Microsemi Ocelot has a set of register for SerDes/switch port muxing as well as PCIe muxing for a specific SerDes, so let's add the device and all SerDes in the Device Tree. Reviewed-by: Florian Fainelli Acked-by: Paul Burton Signed-off-by: Quentin Schulz Signed-off-by: David S. Miller commit 4b379fec4e86f7be1486990f55d9401c7d3b7d54 Author: Quentin Schulz Date: Thu Oct 4 14:22:04 2018 +0200 dt-bindings: phy: add DT binding for Microsemi Ocelot SerDes muxing Signed-off-by: Quentin Schulz Signed-off-by: David S. Miller commit c2a90025ad09d830c8d8ae69f485eac6aaaa2472 Author: Quentin Schulz Date: Thu Oct 4 14:22:03 2018 +0200 phy: add QSGMII and PCIE modes Prepare for upcoming phys that'll handle QSGMII or PCIe. Reviewed-by: Florian Fainelli Signed-off-by: Quentin Schulz Signed-off-by: David S. Miller commit 66c213233308ac94fabed80b09041eb14f8d787b Author: Quentin Schulz Date: Thu Oct 4 14:22:02 2018 +0200 net: mscc: ocelot: simplify register access for PLL5 configuration Since HSIO address space can be accessed by different drivers, let's simplify the register address definitions so that it can be easily used by all drivers and put the register address definition in the include/soc/mscc/ocelot_hsio.h header file. Reviewed-by: Florian Fainelli Acked-by: Alexandre Belloni Signed-off-by: Quentin Schulz Signed-off-by: David S. Miller commit 8afc978925ba0a0e8c7f76ebd0d764de0da2c0e9 Author: Quentin Schulz Date: Thu Oct 4 14:22:01 2018 +0200 net: mscc: ocelot: move the HSIO header to include/soc Since HSIO address space can be used by different drivers (PLL, SerDes muxing, temperature sensor), let's move it somewhere it can be included by all drivers. Reviewed-by: Florian Fainelli Acked-by: Alexandre Belloni Signed-off-by: Quentin Schulz Signed-off-by: David S. Miller commit 19aedfbe658326d6fe5b70347dc86eb7aee3d01a Author: Quentin Schulz Date: Thu Oct 4 14:22:00 2018 +0200 net: mscc: ocelot: get HSIO regmap from syscon HSIO address space was moved to a syscon, hence we need to get the regmap of this address space from there and no more from the device node. Reviewed-by: Florian Fainelli Acked-by: Alexandre Belloni Signed-off-by: Quentin Schulz Signed-off-by: David S. Miller commit 6afea95a80668b8e4fbde8ad21ba3949050e192f Author: Quentin Schulz Date: Thu Oct 4 14:21:59 2018 +0200 dt-bindings: net: ocelot: remove hsio from the list of register address spaces HSIO register address space should be handled outside of the MAC controller as there are some registers for PLL5 configuring, SerDes/switch port muxing and a thermal sensor IP, so let's remove it. Acked-by: Alexandre Belloni Signed-off-by: Quentin Schulz Signed-off-by: David S. Miller commit 3df0e6804f0e36e347882789fcaf70cdac890707 Author: Quentin Schulz Date: Thu Oct 4 14:21:58 2018 +0200 MIPS: mscc: ocelot: make HSIO registers address range a syscon HSIO contains registers for PLL5 configuration, SerDes/switch port muxing and a thermal sensor, hence we can't keep it in the switch DT node. Acked-by: Paul Burton Acked-by: Alexandre Belloni Signed-off-by: Quentin Schulz Signed-off-by: David S. Miller commit 068b88cc175d594393f501a137c7a4af9f356c39 Author: Jakub Sitnicki Date: Thu Oct 4 11:09:40 2018 +0200 socket: Tighten no-error check in bind() move_addr_to_kernel() returns only negative values on error, or zero on success. Rewrite the error check to an idiomatic form to avoid confusing the reader. Signed-off-by: Jakub Sitnicki Signed-off-by: David S. Miller commit 9a694c1de396e24565bfd05d0e36f72d10c3bce2 Author: Lance Roy Date: Thu Oct 4 00:46:57 2018 -0700 atm: nicstar: Replace spin_is_locked() with spin_trylock() ns_poll() used spin_is_locked() + spin_lock() to get achieve the same thing as a spin_trylock(), so simplify it by using that instead. This is also a step towards possibly removing spin_is_locked(). Signed-off-by: Lance Roy Cc: Chas Williams <3chas3@gmail.com> Cc: Cc: Signed-off-by: David S. Miller commit 6d06009cb216d071e955b3814086595851627910 Author: Madalin Bucur Date: Fri Sep 28 11:43:24 2018 +0300 soc: fsl: qbman: add interrupt coalesce changing APIs Add the APIs required to control the QMan portal interrupt coalescing settings. Signed-off-by: Madalin Bucur Signed-off-by: Li Yang commit 99c19e6a8fe4a95fa0dac191207a1d40461b1604 Author: Andy Lutomirski Date: Fri Oct 5 11:02:43 2018 -0700 x86/vdso: Rearrange do_hres() to improve code generation vgetcyc() is full of barriers, so fetching values out of the vvar page before vgetcyc() for use after vgetcyc() results in poor code generation. Put vgetcyc() first to avoid this problem. Also, pull the tv_sec division into the loop and put all the ts writes together. The old code wrote ts->tv_sec on each iteration before the syscall fallback check and then added in the offset afterwards, which forced the compiler to pointlessly copy base->sec to ts->tv_sec on each iteration. The new version seems to generate sensible code. Saves several cycles. With this patch applied, the result is faster than before the clock_gettime() rewrite. Signed-off-by: Andy Lutomirski Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/3c05644d010b72216aa286a6d20b5078d5fae5cd.1538762487.git.luto@kernel.org commit 9798594cb9829a4edabdc58ad1b0d43fe4728b4f Merge: 226407dd0311 701a6d6ac78c Author: David S. Miller Date: Fri Oct 5 12:01:55 2018 -0700 Merge branch 'hns3-Unicast-MAC-VLAN-table' Salil Mehta says: ==================== Fixes, minor changes & cleanups for the Unicast MAC VLAN table This patch-set presents necessary modifications, fixes & cleanups related to Unicast MAC Vlan Table to support revision 0x21 hardware. ==================== Signed-off-by: David S. Miller commit 701a6d6ac78c76083ddb7c6581fdbedd95093e11 Author: Jian Shen Date: Fri Oct 5 18:03:29 2018 +0100 net: hns3: Fix for rx vlan id handle to support Rev 0x21 hardware In revision 0x20, we use vlan id != 0 to check whether a vlan tag has been offloaded, so vlan id 0 is not supported. In revision 0x21, rx buffer descriptor adds two bits to indicate whether one or more vlan tags have been offloaded, so vlan id 0 is valid now. This patch seperates the handle for vlan id 0, add vlan id 0 support for revision 0x21. Fixes: 5b5455a9ed5a ("net: hns3: Add STRP_TAGP field support for hardware revision 0x21") Signed-off-by: Jian Shen Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit 64d114f0a7507ad479091d4ce469e85b49e76df6 Author: Zhongzhu Liu Date: Fri Oct 5 18:03:28 2018 +0100 net: hns3: Add egress/ingress vlan filter for revision 0x21 In revision 0x21, hw supports both ingress and egress vlan filter. This patch adds support for it. Signed-off-by: Zhongzhu Liu Signed-off-by: Jian Shen Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit 1f6db58973b0076d7fd7a3005f088ae985904f2f Author: Jian Shen Date: Fri Oct 5 18:03:27 2018 +0100 net: hns3: Drop depricated mta table support For mta table support has been dropped, remove the code for mta table. Signed-off-by: Zhongzhu Liu Signed-off-by: Jian Shen Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit 39932473b63ebbfdebe298cad09711349feddbc6 Author: Jian Shen Date: Fri Oct 5 18:03:26 2018 +0100 net: hns3: Optimize for unicast mac vlan table In previously implement for unicast mac vlan table, the space is shared by all the functions, driver does nothing when the space is exhausted. This patch preallocates the space of unicast mac vlan table for each function by software. Each function can only use its private space and available shared space, avoiding single function exhausts too much space, and other functions are unable to add unicast mac address. Signed-off-by: Jian Shen Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit f05e21097121b24cad92b15b570386bc68574d68 Author: Jian Shen Date: Fri Oct 5 18:03:25 2018 +0100 net: hns3: Clear mac vlan table entries when unload driver or function reset In original codes, the mac vlan table entries are not cleared when unload hns3 driver. The dirty mac vlan table entries will make the result of looking up mac vlan table being unexpected. When doing core reset or global reset, the firmware will clear all the tables for driver, and driver shouldn't send any commands to firmware during reset. But when doing function reset, the driver needs to clear the tables itself. This patch clears the mac vlan table entries for each client when unload driver or reset. Signed-off-by: Jian Shen Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit dd2b6ef950b0dc5ede23291fa7fb0c322e8c116b Author: Jian Shen Date: Fri Oct 5 18:03:24 2018 +0100 net: hns3: Remove the default mask configuration for mac vlan table The default mask configuration has been done by firmware, so the driver doesn't need to do it any more. Signed-off-by: Zhongzhu Liu Signed-off-by: Peng Li Signed-off-by: Jian Shen Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit e0940b34c40e95d1879691d2474d182c57aae0de Author: Laurentiu Tudor Date: Wed Sep 26 16:22:32 2018 +0300 soc: fsl: bman_portals: defer probe after bman's probe A crash in bman portal probing could not be triggered (as is the case with qman portals) but it does make calls [1] into the bman driver so lets make sure the bman portal probing happens after bman's. [1] bman_p_irqsource_add() (in bman) called by: init_pcfg() called by: bman_portal_probe() Signed-off-by: Laurentiu Tudor Signed-off-by: Li Yang commit f1c98ee699314c6512522703b2bc0ed0afd08ad1 Author: Roy Pledge Date: Fri Sep 28 11:43:23 2018 +0300 soc: fsl: qbman: Use last response to determine valid bit Use the last valid response when determining what valid bit to use next for management commands. This is needed in the case that the portal was previously used by other software like a bootloader or if the kernel is restarted without a hardware reset. Signed-off-by: Roy Pledge Signed-off-by: Madalin Bucur Signed-off-by: Li Yang commit 06cc59386c9aae8d88efb60af27efea34755c23c Author: Roy Pledge Date: Fri Sep 28 11:43:22 2018 +0300 soc: fsl: qbman: Add 64 bit DMA addressing requirement to QBMan The QBMan block is memory mapped on SoCs above a 32 bit (4 Gigabyte) boundary so enabling 64 bit DMA addressing is needed for QBMan to be usuable. Signed-off-by: Roy Pledge Signed-off-by: Madalin Bucur Signed-off-by: Li Yang commit d8bac81ed144cc5928efcbbf5f1f6301954e9e9b Author: Madalin Bucur Date: Fri Sep 28 11:43:21 2018 +0300 soc: fsl: qbman: replace CPU 0 with any online CPU in hotplug handlers The existing code sets portal IRQ affinity to CPU 0 in the offline hotplug handler. If CPU 0 is offline this is invalid. Use a different online CPU instead. Signed-off-by: Madalin Bucur Signed-off-by: Li Yang commit 9beaf661d6a72b7c05efb4b33d228032c7152f34 Author: Roy Pledge Date: Fri Sep 28 11:43:20 2018 +0300 soc: fsl: qbman: Check if CPU is offline when initializing portals If the CPU to affine the portal interrupt is offline at boot time affine the portal interrupt to another online CPU. If the CPU is later brought online the hotplug handler will correctly adjust the affinity. Moved common code in a function. Signed-off-by: Roy Pledge Signed-off-by: Madalin Bucur Signed-off-by: Li Yang commit 226407dd0311eebfb55a63deae9a9dcf71f920af Author: David Ahern Date: Fri Oct 5 10:01:19 2018 -0700 fib_tests: Add tests for invalid metric on route Add ipv4 and ipv6 test cases with an invalid metrics option causing ip_metrics_convert to fail. Tests clean up path during route add. Also, add nodad to to ipv6 address add. When running ipv6_route_metrics directly seeing an occasional failure on the "Using route with mtu metric" test case. Signed-off-by: David Ahern Signed-off-by: David S. Miller commit 56740a7167cbbbda99ebfd3e8b4e4d51ae39bd06 Merge: afa86d264a7c 5a1eb8b95428 Author: Li Yang Date: Fri Oct 5 13:58:35 2018 -0500 Merge tag 'soc-fsl-fix-v4.19-2' into HEAD NXP/FSL SoC driver fixes for v4.19 round 2 - Fix crash of qman_portal by deferring its probe if qman is not probed commit fda21d46cce2879dbce981978f8cb07b36035369 Author: Eric Dumazet Date: Fri Oct 5 09:17:50 2018 -0700 ipv6: do not leave garbage in rt->fib6_metrics In case ip_fib_metrics_init() returns an error, we better rewrite rt->fib6_metrics with &dst_default_metrics so that we do not crash later in ip_fib_metrics_put() Fixes: 767a2217533f ("net: common metrics init helper for FIB entries") Signed-off-by: Eric Dumazet Reported-by: syzbot Reviewed-by: David Ahern Signed-off-by: David S. Miller commit f2e9de210d50187d206989e60bc5a99c2b692209 Author: Willem de Bruijn Date: Fri Oct 5 11:31:40 2018 -0400 udp: gro behind static key Avoid the socket lookup cost in udp_gro_receive if no socket has a udp tunnel callback configured. udp_sk(sk)->gro_receive requires a registration with setup_udp_tunnel_sock, which enables the static key. Signed-off-by: Willem de Bruijn Acked-by: Paolo Abeni Signed-off-by: David S. Miller commit dde27443211062e841806feaf690674b7c3a599f Author: Julian Sax Date: Fri Oct 5 11:48:31 2018 -0700 Input: silead - try firmware reload after unsuccessful resume A certain silead controller (Chip ID: 0x56810000) loses its firmware after suspend, causing the resume to fail. This patch tries to load the firmware, should a resume error occur and retries the resuming. Signed-off-by: Julian Sax Acked-by: Hans de Goede Signed-off-by: Dmitry Torokhov commit 20bbb312079494a406c10c90932e3c80837c9d94 Author: Martin Kepplinger Date: Fri Oct 5 11:44:45 2018 -0700 Input: st1232 - set INPUT_PROP_DIRECT property This is how userspace checks for touchscreen devices most reliably. Signed-off-by: Martin Kepplinger Signed-off-by: Dmitry Torokhov commit 29a5f9aaf9d365c46f1f9058375061a51ccea4a2 Author: Sibi Sankar Date: Thu Aug 30 00:42:15 2018 +0530 remoteproc: qcom: q6v5-pil: Add PDC reset for modem on SDM845 SoCs In the presence of a PDC block working with subsystem RSC, assert/deassert PDC reset in modem start/stop path. Signed-off-by: Sibi Sankar Signed-off-by: Bjorn Andersson commit 9e483efd3470d1335ad1c7e10db527dca5c412a3 Author: Sibi Sankar Date: Thu Aug 30 00:42:14 2018 +0530 remoteproc: qcom: q6v5-pil: Explicitly get mss_restart line Explicitly get mss_restart to facilitate adding PDC reset line for modem on SDM845 SoCs Signed-off-by: Sibi Sankar Signed-off-by: Bjorn Andersson commit 9a6696155f0dd85173ec079000386935682773aa Author: Sibi Sankar Date: Thu Aug 30 00:42:13 2018 +0530 dt-bindings: remoteproc: Add PDC reset binding for Q6V5 PIL Add additional pdc_reset binding required for Q6V5 Modem PIL on SDM845 SoCs. Reviewed-by: Rob Herring Signed-off-by: Sibi Sankar Signed-off-by: Bjorn Andersson commit f861164526d99e0f161e709da56736d29d1b781c Author: Sibi Sankar Date: Thu Aug 30 00:42:12 2018 +0530 dt-bindings: remoteproc: qcom: Remove additional definition tag Remove the additional definition tag declared for WCSS sub-system under reset-names. Reviewed-by: Rob Herring Reviewed-by: Matthias Kaehlcke Signed-off-by: Sibi Sankar Signed-off-by: Bjorn Andersson commit b07581d2d5add23ae163e3fbfb2fa5d36076922f Author: Al Viro Date: Fri Oct 5 14:29:46 2018 -0400 cachefiles: fix the race between cachefiles_bury_object() and rmdir(2) the victim might've been rmdir'ed just before the lock_rename(); unlike the normal callers, we do not look the source up after the parents are locked - we know it beforehand and just recheck that it's still the child of what used to be its parent. Unfortunately, the check is too weak - we don't spot a dead directory since its ->d_parent is unchanged, dentry is positive, etc. So we sail all the way to ->rename(), with hosting filesystems _not_ expecting to be asked renaming an rmdir'ed subdirectory. The fix is easy, fortunately - the lock on parent is sufficient for making IS_DEADDIR() on child safe. Cc: stable@vger.kernel.org Fixes: 9ae326a69004 (CacheFiles: A cache that backs onto a mounted filesystem) Signed-off-by: Al Viro commit b8d7b758145252e60ea0198e531a8b00a75b8895 Merge: 2ecefa0a15fd e487a0f52301 Author: James Morris Date: Fri Oct 5 11:21:23 2018 -0700 Merge tag 'tpmdd-next-20181005' of git://git.infradead.org/users/jjs/linux-tpmdd into next-tpm tpmdd updates for Linux 4.20 From Jarkko: These are the updates to v4.20. The only new feature is non-blocking operation for /dev/tpm0. commit 9b43960b899c71c758209a58c7e8d7d6e481e272 Author: Lorenzo Bianconi Date: Fri Oct 5 10:28:38 2018 +0200 mt76: move irq handler in mt76x02-lib moudle Move mt76x02_irq_handler handler in mt76x02_mmio.c in order to be reused in mt76x0 driver. Move mt76x02_rx_poll_complete routine in mt76x02-lib module. Moreover remove pci_core.c and mt76x2/trace.{c,h} since are empty files Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 53d20fdb4670ae644f92a85eeabf50ea9b4d5ca6 Author: Lorenzo Bianconi Date: Fri Oct 5 10:28:37 2018 +0200 mt76: move tx_tasklet management in mt76x02-lib moudle Move tx_tasklet management in mt76x02_mmio.c in order to be reused by mt76x0 driver and remove duplicated code Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit a23fde09c2801bb06df637bfb7d8c352330ee898 Author: Lorenzo Bianconi Date: Fri Oct 5 10:28:36 2018 +0200 mt76: use mt76x02_dev instead of mt76_dev in mt76x02_mmio.c Use mt76x02_dev data structure as reference in mt76x02_mmio.c instead of mt76_dev Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 466495b1cf5ea36efc9dce5a600a41260a3fae1f Author: Lorenzo Bianconi Date: Fri Oct 5 10:28:35 2018 +0200 mt76: move mt76x02_tx_complete in mt76x02-lib module Move mt76x02_tx_complete mt76x02-lib module in order to be reused by mt76x0 drivers for irq unification. Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 3e2342ed934d87be92ad8b4c857198032de600f0 Author: Lorenzo Bianconi Date: Fri Oct 5 10:28:34 2018 +0200 mt76: move mt76x02_mac_poll_tx_status in mt76x02-lib moudle Move mt76x02_mac_poll_tx_status in mt76x02_mac.c in order to be reused by mt76x0 drivers for irq unification. Moreover introduce mt76x02_trace source file to define mt76x02 trace points Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit b38383e634351349bbcdad5236fb64c80cf74387 Author: Lorenzo Bianconi Date: Fri Oct 5 10:28:33 2018 +0200 mt76: usb: move mt76x02u_tx_complete_skb in mt76x02_usb_core.c Move mt76x02u_tx_complete_skb and mt76x02u_remove_dma_hdr since they are used just by usb code Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 5ec574859c77a68694e5737edb1b00fb897b749a Author: Lorenzo Bianconi Date: Fri Oct 5 10:28:32 2018 +0200 mt76: move mt76x02_tx_prepare_skb in mt76x02_txrx.c Move mt76x02_tx_prepare_skb routine in mt76x02-lib module in order to be reused by mt76x0 driver in tx datapath Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 1ea0a1b12aebfe5328563fc3a74261916260c210 Author: Lorenzo Bianconi Date: Fri Oct 5 10:28:31 2018 +0200 mt76: move tpc routines in mt76x02-lib module Move mt76x02_tx_get_txpwr_adj and mt76x02_tx_set_txpwr_auto routines in mt76x02-lib module since they are shared between mt76x0 and mt76x2 drivers. Moreover remove get_txpwr_adj function pointer Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 7cd79b8d9b28dbb5f1241160df7ce9defe3a180c Author: Lorenzo Bianconi Date: Fri Oct 5 10:00:34 2018 +0200 mt76x2: remove leftover function declatarions Remove following function declarations since they have been moved to mt76x02-lib module: - mt76x2_sta_add - mt76x2_sta_remove - mt76x2_remove_interface - mt76x2_conf_tx - mt76x2_txq_init Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 7a07adcdfff60cdebe32b13705e3b3117923a96f Author: Lorenzo Bianconi Date: Fri Oct 5 10:00:33 2018 +0200 mt76: rename mt76x02_util.h in mt76x02.h Rename mt76x02_util.h header file in mt76x02.h since now contains all mt76x02 related definitions and not just utility routines declarations Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 8e3ed0017bdd866a90eb9c19f67a4a8c06c892cc Author: Lorenzo Bianconi Date: Fri Oct 5 10:00:32 2018 +0200 mt76: move txrx shared routines in mt76x02_txrx.c Add mt76x02_txrx.c source file in order to contain tx/rx shared routines for mt76x0 and mt76x2 drivers Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 2f0308d0b19de89352d5e89589e4bfe8d1e7ef9f Author: Lorenzo Bianconi Date: Thu Oct 4 23:53:12 2018 +0200 mt76: move mt76x02_tx in mt76x02-lib module Move mt76x02_tx shared routine in mt76x02-lib module and remove duplicated code. Moreover remove mt76x0/tx.c since it is an empty file Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 9ba1e0e69cd5e2ca0c1f64cbe507af6061a32887 Author: Lorenzo Bianconi Date: Thu Oct 4 23:53:11 2018 +0200 mt76: unify rxwi parsing between mt76x2 and mt76x0 drivers Unify rxwi parsing between mt76x2 and mt76x0. Remove the following routines: - mt76x0_phy_get_rssi - mt76x0_queue_rx_skb - mt76x0_mac_process_rx Moreover remove mt76x2/common.c and mt76x0/mac.h since are empty files Enable CCMP PN sw validation Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit d9f8934ed147b334edbaf7688965a4365eedc288 Author: Lorenzo Bianconi Date: Thu Oct 4 23:53:10 2018 +0200 mt76: move mt76x02_mac_process_rx in mt76x02-lib module Move mt76x02_mac_process_rx utility routine in mt76x02-lib in order to by reused by mt76x0 driver for rxwi parsing. Add stream number check in mt76x02_mac_process_rx since mt76x0 chipsets are 1x1:1 Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit b2d871c049e0546141737f012cfb8efdaeacebe8 Author: Lorenzo Bianconi Date: Thu Oct 4 23:53:09 2018 +0200 mt76x0: merge mt76x0_dev in mt76x02_dev Merge mt76x0_dev data structure in mt76x02_dev one and remove duplicated code. Remove unused definition in mt76x0.h. Moreover merge mt76x0_caldata and mt76x02_rx_freq_cal data structures. This is a preliminary patch for rxwi unification. Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit e40803f2afa81d35aaa712217eda821e8806b32b Author: Lorenzo Bianconi Date: Thu Oct 4 23:53:08 2018 +0200 mt76x2: move mt76x2_dev in mt76x02_util.h Move mt76x2_dev in mt76x02_util.h and rename it in mt76x02_dev in order to be shared between mt76x2 and mt76x0 driver Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 46a7418761e59ea5fa98c8234924ec02dfc3a2b3 Author: Lorenzo Bianconi Date: Thu Oct 4 23:53:07 2018 +0200 mt76x0: remove hw_atomic_mutex mutex in mt76x0_dev Remove hw_atomic_mutex mutex in mt76x0_dev data structure since mt76x0_phy_set_channel is already protected by mt76_dev mutex while mt76x0_chip_onoff is used just at device probe or cleanup Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 63cc936b53d2e6b994226dae2276fa532d3d52a4 Author: Lorenzo Bianconi Date: Thu Oct 4 23:53:06 2018 +0200 mt76x0: remove unused variable in mt76x0_dev Remove no longer used mac_lock spinlock and data array in mt76x0_dev data structure Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit ac85ab8c08f377bb245ce477d2d4a3e6f34d7fe4 Author: Lorenzo Bianconi Date: Thu Oct 4 23:53:05 2018 +0200 mt76x0: mac: use sta ewma estimation for rssi tracking Use shared mt76x02 utility routines for rssi tracking. Moreover remove no longer used con_mon_lock spinlock and following variable: - ap_bssid - bcn_freq_off - bcn_phy_mode - avg_rssi Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 56e8d4dd5ce24cf534114c67de33861e86501981 Author: Lorenzo Bianconi Date: Thu Oct 4 23:53:04 2018 +0200 mt76: move mt76x02_rx_get_sta and mt76x02_rx_get_sta_wcid in mt76x02_util.h Move mt76x02_rx_get_sta and mt76x02_rx_get_sta_wcid utility routines in mt76x02-lib module since it will be used by mt76x0 driver in order to unify rxwi parsing Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 50b9e8d55a345a0742811e8135ecbcdde2727d44 Author: Lorenzo Bianconi Date: Thu Oct 4 23:53:03 2018 +0200 mt76: move mt76x02_phy_get_min_avg_rssi in mt76x02_phy.c Move mt76x02_phy_get_min_avg_rssi in mt76x02-lib module since it will be used by mt76x0 driver in order to unify rxwi parsing Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 5e6c49eca9cb7ab92c011906bc94cf367c60ea28 Author: Lorenzo Bianconi Date: Mon Oct 1 16:20:49 2018 +0200 mt76x0: init: remove unnecessary configurations Remove leftover configuration for legacy devices in mt76x0_init_mac_registers routine. Moreover remove unnecessary msleep delay Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit c4ed5088e44e275d1968a38c82d52663b44928e1 Author: Lorenzo Bianconi Date: Mon Oct 1 18:58:20 2018 +0200 mt76: usb: use mt76x02u_tx_prepare_skb to fill txwi Use mt76x02u_tx_prepare_skb routine to fill txwi in mt76x2u and mt76x0u driver and remove duplicated code. Moreover add static qualifier to mt76x02_mac_tx_rate_val and mt76x02_mac_fill_txwi routines Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 427f9ebec682f8fd44202f5582d745ead09d95ce Author: Lorenzo Bianconi Date: Mon Oct 1 18:58:19 2018 +0200 mt76: move mt76x02_mac_write_txwi in mt76x02-lib module Move mt76x02_mac_write_txwi in mt76x02_mac.c since it is shared between mt76x0 and mt76x2 drivers. This is a preliminary patch to unify txwi configuration between mt76x0 and mt76x2 drivers Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 1ef3aa88935b994e2e58a15d15ebe697e39a0b48 Author: Lorenzo Bianconi Date: Mon Oct 1 18:58:18 2018 +0200 mt76: add get_tx_txpwr_adj function pointer to mt76_driver_ops Add get_tx_txpwr_adj function pointer to mt76_driver_ops data structure as a preliminary patch to unify txwi configuration between mt76x0 and mt76x2 drivers since tpc is currently supported just by mt76x2 driver Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit d697b00b15f44e23080bca916294e61638e0b62d Author: Lorenzo Bianconi Date: Mon Oct 1 18:58:17 2018 +0200 mt76: move mt76x02_tx_get_max_txpwr_adj in mt76x02_util.c Move mt76x02_tx_get_max_txpwr_adj routine in mt76x02-lib module since now both mt76x0 and mt76x2 drivers read rate tx power gain from rate_power data structure. Moreover remove get_max_txpwr_adj function pointer from mt76_driver_ops data structure Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 14190227978e569254798c51e8802231285f4d81 Author: Lorenzo Bianconi Date: Wed Oct 3 12:52:26 2018 +0200 mt76x0: usb: stop cal/mac workqueues at hw stop Stop mac and calibration work stopping the hw even if the device has been removed Fixes: b11e19694dc9 ("mt76x0: add ieee80211_ops ops pointer to mt76x0_alloc_device signature") Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 0536478cba710bedf798602df85c28953b69cf76 Author: Lorenzo Bianconi Date: Wed Oct 3 12:52:25 2018 +0200 mt76: usb: fix hw initialization sequence mt76u_alloc_queues need to be called before mt76u_mcu_init_rx since it initializes rx_page_lock spinlock used in mt76u_buf_alloc routine. Fixes: b11e19694dc9 ("mt76x0: add ieee80211_ops ops pointer to mt76x0_alloc_device signature") Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit c87dff8cc39a2da52d98949cc1f3e9befd19cb83 Author: Stanislaw Gruszka Date: Wed Oct 3 12:52:24 2018 +0200 mt76: fix frag length allocation for usb This is correct fix for c12128ce44b0 ("mt76: use a per rx queue page fragment cache"). We use wrong length when we allocate segments for MCU transmissions, which require bigger segment size than e->buf_size. Commit 481bb0432414 ("mt76: usb: make rx page_frag_cache access atomic") partially solved the problem or actually mask it by changing mt76u_mcu_init_rx() and mt76u_alloc_queues() sequence, so e->buf_size become non zero any longer, but still not big enough to handle MCU data. Patch fixes memory corruption which can manifest itself as random, not easy to reproduce crashes, during mt76 driver load or unload. Fixes: c12128ce44b0 ("mt76: use a per rx queue page fragment cache") Signed-off-by: Stanislaw Gruszka Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit e3469c5ea79d545f64817d16e89249ab9e680927 Author: Colin Ian King Date: Sun Sep 30 23:57:15 2018 +0100 mt76: fix header guard macro define names The header guards that are #defined are different from those being checked. Fix this by #defining them to the correct name. Fixes clang warnings: drivers/net/wireless/mediatek/mt76/mt76x02_mcu.h:17:9: warning: '__MT76x02_MCU_H' is used as a header guard here, followed by #define of a different macro [-Wheader-guard] drivers/net/wireless/mediatek/mt76/mt76x02_usb.h:17:9: warning: '__MT76x02_USB_H' is used as a header guard here, followed by #define of a different macro [-Wheader-guard] Fixes: 905db7470199 ("mt76: usb: move mt76x02 mcu code in mt76x02-usb module") Fixes: edaa580bc830 ("mt76: move shared mcu_calibrate routine in mt76x02-lib module") Signed-off-by: Colin Ian King Signed-off-by: Felix Fietkau commit 1613c621e19416754beda19879d574cd149bf91e Author: Lorenzo Bianconi Date: Mon Oct 1 10:18:42 2018 +0200 mt76x2: move mt76x2 source files to mt76x2 folder Move mt76x2 and mt76x2u drivers to mt76x2 subfolder and leave just shared code in mt76 root folder Acked-by: Stanislaw Gruszka Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit d00efcf123871337c30b71d0cd2aaea6fa065cb8 Author: Lorenzo Bianconi Date: Mon Oct 1 10:55:54 2018 +0200 mt76x0: pci: add mt76x0e_cleanup routine Add mt76x0e_cleanup routine to tidy up the device during device removal Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 2b9156129f8ee7312287c4826fe4c34a5402d74e Author: Gustavo A. R. Silva Date: Fri Oct 5 15:29:09 2018 +0200 gigaset: asyncdata: 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 the " --v-- fall through --v-- " comment with a proper "fall through", which is what GCC is expecting to find. Addresses-Coverity-ID: 1364476 ("Missing break in switch") Addresses-Coverity-ID: 1364477 ("Missing break in switch") Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller commit a657dbf61731704104fd749d68e3e78f0b4b28e9 Author: Ganesh Goudar Date: Fri Oct 5 15:04:45 2018 +0530 cxgb4: use FW_PORT_ACTION_L1_CFG32 for 32 bit capability when 32 bit port capability is in use, use FW_PORT_ACTION_L1_CFG32 rather than FW_PORT_ACTION_L1_CFG. Signed-off-by: Casey Leedom Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller commit c20c650d9116a1e7be1b1d38810cbb2168a2ca98 Author: James Morse Date: Fri Oct 5 15:21:20 2018 +0100 MAINTAINERS: fix bad sdei paths The SDEI header files had an 'arm_' namespace added, but the patterns in the MAINTAINERS files were missed. Oops. Reported-by: Joe Perches Signed-off-by: James Morse Signed-off-by: Catalin Marinas commit e9ed821be48600ea3ec7f7b76e478c769729f83c Author: James Morse Date: Fri Oct 5 14:49:16 2018 +0100 arm64: mm: Use #ifdef for the __PAGETABLE_P?D_FOLDED defines __is_defined(__PAGETABLE_P?D_FOLDED) doesn't quite work as intended as these symbols are internal to asm-generic and aren't defined in the way kconfig expects. This makes them always evaluate to false. Switch to #ifdef. Acked-by: Mark Rutland Signed-off-by: James Morse Signed-off-by: Catalin Marinas commit e54c78a27fcdef406af799f360a93e6754adeefe Author: Bob Peterson Date: Wed Oct 3 08:47:36 2018 -0500 gfs2: Use fs_* functions instead of pr_* function where we can Before this patch, various errors and messages were reported using the pr_* functions: pr_err, pr_warn, pr_info, etc., but that does not tell you which gfs2 mount had the problem, which is often vital to debugging. This patch changes the calls from pr_* to fs_* in most of the messages so that the file system id is printed along with the message. Signed-off-by: Bob Peterson commit cc52612ec0f3b80c19126a36b8c1e12a8f5a8e78 Author: Wolfram Sang Date: Thu Sep 20 18:14:21 2018 +0200 i2c: core: remove level of indentation in i2c_transfer Using the common kernel pattern to bail out at the beginning if some conditions are not met, we can save a level of indentation. No functional change. Signed-off-by: Wolfram Sang Acked-by: Peter Rosin Signed-off-by: Wolfram Sang commit a7163dc2138d96b3593b7d4430d35e506696a62f Author: Wolfram Sang Date: Thu Sep 20 18:14:20 2018 +0200 i2c: core: remove outdated DEBUG output The usefulness of this debug output is questionable. It covers only direct i2c_transfer calls and no SMBUS calls, neither direct nor emulated ones. And the latter one is largely used in the kernel, so a lot of stuff is missed. False positives are also generated in case the locking later fails. Also, we have a proper tracing mechanism for all these kinds of transfers in place for years now. Remove this old one. Signed-off-by: Wolfram Sang Acked-by: Peter Rosin Signed-off-by: Wolfram Sang commit e2115ace4196bcd2126446fb874bcfc90cba79be Author: Wolfram Sang Date: Mon Jul 23 22:26:13 2018 +0200 i2c: zx2967: use core to detect 'no zero length' quirk And don't reimplement in the driver. Signed-off-by: Wolfram Sang Acked-by: Shawn Guo Signed-off-by: Wolfram Sang commit c96c0f2683804b710531e7b754dcd02b5ded6d4a Author: Wolfram Sang Date: Mon Jul 23 22:26:12 2018 +0200 i2c: tegra: use core to detect 'no zero length' quirk And don't reimplement in the driver. Signed-off-by: Wolfram Sang Acked-by: Jon Hunter Signed-off-by: Wolfram Sang commit de82bb431855580ad659bfed3e858bd9dd12efd0 Author: Wolfram Sang Date: Mon Jul 23 22:26:10 2018 +0200 i2c: qup: use core to detect 'no zero length' quirk And don't reimplement in the driver. Signed-off-by: Wolfram Sang Reviewed-by: Andy Gross Signed-off-by: Wolfram Sang commit f37b2bb6ac3e6ebf855d9d4f05cc6932a8e5b463 Author: Wolfram Sang Date: Mon Jul 23 22:26:08 2018 +0200 i2c: omap: use core to detect 'no zero length' quirk And don't reimplement in the driver. Signed-off-by: Wolfram Sang Reviewed-by: Grygorii Strashko Acked-by: Tony Lindgren Signed-off-by: Wolfram Sang commit b524abcc01483b2ac093cc6a8a2a7375558d2b64 Author: Bob Peterson Date: Thu Oct 4 10:21:07 2018 -0500 gfs2: slow the deluge of io error messages When an io error is hit, it calls gfs2_io_error_bh_i for every journal buffer it can't write. Since we changed gfs2_io_error_bh_i recently to withdraw later in the cycle, it sends a flood of errors to the console. This patch checks for the file system already being withdrawn, and if so, doesn't send more messages. It doesn't stop the flood of messages, but it slows it down and keeps it more reasonable. Signed-off-by: Bob Peterson commit d59c774496a2ee824836aaee1975ed23577edfd1 Author: Lokesh Vutla Date: Fri Oct 5 15:31:40 2018 +0530 arm64: defconfig: Enable SERIAL_8250_OMAP Enabling CONFIG_SERIAL_8250_OMAP that is used by TI's AM6 SoC. Signed-off-by: Lokesh Vutla Acked-by: Nishanth Menon Signed-off-by: Arnd Bergmann commit 41925a21cdb58d07d6cad4f30539d1cee7a25d7b Author: Lokesh Vutla Date: Fri Oct 5 15:33:30 2018 +0530 arm64: defconfig: Enable TI_SCI related configs Enable TI System Control Interface (TI_SCI) Message Protocol library and it's relevant power management drivers using this library. TI's AM6 SoC uses this TI_SCI library to communicate to its system controller(DMSC). While at it, enable TI_MESSAGE_MANAGER mailbox driver using which this communication happens. Signed-off-by: Lokesh Vutla Acked-by: Nishanth Menon Signed-off-by: Arnd Bergmann commit 7e6a361d17b2e7c8a195546a80d6755cb352ff4b Merge: 2caef763d8ad f5e489e6ee7a Author: Arnd Bergmann Date: Fri Oct 5 17:43:57 2018 +0200 Merge tag 'v4.19-next-dts32-2' of git://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux into next/dt Add binding description for devices from MT7623. Clock controller, iommu, JPEG Decoder and SMI conotroller. * tag 'v4.19-next-dts32-2' of git://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux: dt-bindings: mediatek: Add bindig for MT7623 IOMMU and SMI dt-bindings: mediatek: Add JPEG Decoder binding for MT7623 dt-bindings: iommu: mediatek: Add binding for MT7623 dt-bindings: clock: mediatek: add support for MT7623 Signed-off-by: Arnd Bergmann commit e7a2c3fa28576684d744e259a2fdb245f8bab0d7 Merge: 3c168909002e 3b766f453557 Author: Greg Kroah-Hartman Date: Fri Oct 5 08:32:01 2018 -0700 Merge tag 'usb-for-v4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next Felipe writes: USB for v4.20 With 63 non-merge commits, this is not a large merge window for USB peripheral. The largest changes go to the UVC gadget driver which a few folks have been improving. Apart from UVC changes, we have a few more devices being added to Renesas USB3 and DWC3 controller drivers and a couple minor bug fixes on other drivers. * tag 'usb-for-v4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb: (63 commits) USB: net2280: Remove ->disconnect() callback from net2280_pullup() usb: dwc2: disable power_down on rockchip devices usb: gadget: udc: renesas_usb3: add support for r8a77990 dt-bindings: usb: renesas_usb3: add bindings for r8a77990 usb: gadget: udc: renesas_usb3: Add r8a774a1 support usb: gadget: udc: renesas_usb3: Fix b-device mode for "workaround" usb: dwc2: gadget: Add handler for WkupAlert interrupt usb: dwc2: gadget: enable WKUP_ALERT interrupt usb: dwc2: gadget: Program GREFCLK register usb: dwc2: gadget: Add parameters for GREFCLK register usb: dwc2: Add definitions for new registers usb: dwc2: Update target (u)frame calculation usb: dwc2: Add dwc2_gadget_dec_frame_num_by_one() function usb: dwc2: Add core parameter for service interval support usb: dwc2: Update registers definitions to support service interval usb: renesas_usbhs: add support for R-Car E3 dt-bindings: usb: renesas_usbhs: add bindings for r8a77990 usb: renesas_usbhs: rcar3: Use OTG mode for R-Car D3 Revert "usb: renesas_usbhs: set the mode by using extcon state for non-otg channel" usb: gadget: f_uac2: disable IN/OUT ep if unused ... commit 74cad26d8d156406bca4ec0045f3147de4f6f918 Author: Dinh Nguyen Date: Fri Sep 28 14:31:49 2018 -0500 arm64: dts: stratix10: add ethernet aliases Add ethernet alias for all gmacs on the devkit. Signed-off-by: Dinh Nguyen --- v2: move ethernet aliases to board file commit 2caef763d8ad2cd1f8401a4eb45075432b288e45 Merge: 4e6a32e6eb30 5e72f5dc7e9d Author: Arnd Bergmann Date: Fri Oct 5 17:24:50 2018 +0200 Merge tag 'mvebu-dt-4.20-2' of git://git.infradead.org/linux-mvebu into next/dt mvebu dt for 4.20 (part 2) Auto-detect nand ECC on the armada-385 based board db-88f6820-amc instead of hard coded them in the device tree. * tag 'mvebu-dt-4.20-2' of git://git.infradead.org/linux-mvebu: ARM: dts: mvebu: armada-385-db-88f6820-amc: auto-detect nand ECC properites Signed-off-by: Arnd Bergmann commit 557c97b5133669297be561e6091da9ab6e488e65 Author: Sean Young Date: Thu Oct 4 18:21:13 2018 -0400 media: cec: name for RC passthrough device does not need 'RC for' An RC device is does not need to be called 'RC for'. Simply the name will suffice. Signed-off-by: Sean Young Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit c439d5c1e13dbf66cff53455432f21d4d0536c51 Author: Hans Verkuil Date: Fri Oct 5 08:51:45 2018 -0400 media: cec-gpio: select correct Signal Free Time If a receive is in progress or starts before the transmit has a chance, then lower the Signal Free Time of the upcoming transmit to no more than CEC_SIGNAL_FREE_TIME_NEW_INITIATOR. This is per the specification requirements. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 7d867a1b765e2b70815fec4964d7822a976ed349 Author: Hans Verkuil Date: Fri Oct 5 08:00:21 2018 -0400 media: cec: fix the Signal Free Time calculation The calculation of the Signal Free Time in the framework was not correct. If a message was received, then the next transmit should be considered a New Initiator and use a shorter SFT value. This was not done with the result that if both sides where continually sending messages, they both could use the same SFT value and one side could deny the other side access to the bus. Note that this fix does not take the corner case into account where a receive is in progress when you call adap_transmit. Signed-off-by: Hans Verkuil Cc: # for v4.18 and up Signed-off-by: Mauro Carvalho Chehab commit ab83203e181015b099720aff43ffabc1812e0fb3 Author: Hans Verkuil Date: Thu Oct 4 03:58:34 2018 -0400 media: adv7842: when the EDID is cleared, unconfigure CEC as well When there is no EDID the CEC adapter should be unconfigured as well. So call cec_phys_addr_invalidate() when this happens. Signed-off-by: Hans Verkuil Cc: # for v4.18 and up Signed-off-by: Mauro Carvalho Chehab commit e7da89926f6dc6cf855f5ffdf79ef99a1b115ca7 Author: Hans Verkuil Date: Thu Oct 4 03:57:06 2018 -0400 media: adv7604: when the EDID is cleared, unconfigure CEC as well When there is no EDID the CEC adapter should be unconfigured as well. So call cec_phys_addr_invalidate() when this happens. Signed-off-by: Hans Verkuil Cc: # for v4.18 and up Signed-off-by: Mauro Carvalho Chehab commit 4e6a32e6eb30bde332ba67373c6ba5d68abf7e43 Merge: 38764692af2c 91f84690b502 Author: Arnd Bergmann Date: Fri Oct 5 17:22:59 2018 +0200 Merge tag 'mvebu-dt64-4.20-2' of git://git.infradead.org/linux-mvebu into next/dt mvebu dt64 for 4.20 (part 2) - Add System Error Interrupt support to Armada SoCs (7K/8K) - Add CPU idle support on Armada 8K * tag 'mvebu-dt64-4.20-2' of git://git.infradead.org/linux-mvebu: arm64: dts: clearfog-gt-8k: add PCIe slot description arm64: dts: marvell: add CP110 ICU SEI subnode arm64: dts: marvell: use new bindings for CP110 interrupts arm64: dts: marvell: add AP806 SEI subnode arm64: dts: marvell: add CPU Idle power state support on Armada 7K/8K arm64: dts: marvell: Add node labels for the cpus Signed-off-by: Arnd Bergmann commit 7ec2b3b941a666a942859684281b5f6460a0c234 Author: Hans Verkuil Date: Thu Oct 4 03:28:21 2018 -0400 media: cec: add new tx/rx status bits to detect aborts/timeouts If the HDMI cable is disconnected or the CEC adapter is manually unconfigured, then all pending transmits and wait-for-replies are aborted. Signal this with new status bits (CEC_RX/TX_STATUS_ABORTED). If due to (usually) a driver bug a transmit never ends (i.e. the transmit_done was never called by the driver), then when this times out the message is marked with CEC_TX_STATUS_TIMEOUT. This should not happen and is an indication of a driver bug. Without a separate status bit for this it was impossible to detect this from userspace. The 'transmit timed out' kernel message is now a warning, so this should be more prominent in the kernel log as well. Signed-off-by: Hans Verkuil Cc: # for v4.18 and up Signed-off-by: Mauro Carvalho Chehab commit 81e33279d154599db64d608b2a1db619f3b56ce1 Author: Hans Verkuil Date: Fri Oct 5 08:58:12 2018 -0400 media: cec-core.rst: improve cec_transmit_done documentation Clarify that calling cec_transmit_done can start a new transmit and that you should put the hardware in a state that allows for a new transmit before calling this function. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 9afc82194de9a1ce298f0d77d7d779d585bf962c Author: Mauro Carvalho Chehab Date: Fri Oct 5 10:21:25 2018 -0400 Revert "media: dvbsky: use just one mutex for serializing device R/W ops" As pointed at: https://bugzilla.kernel.org/show_bug.cgi?id=199323 This patch causes a bad effect on RPi. I suspect that the root cause is at the USB out of tree RPi driver, with uses high priority interrupts instead of normal ones. Anyway, as this patch is mostly a cleanup, better to revert it. This reverts commit 7d95fb746c4eece67308f1642a666ea1ebdbd2cc. Cc: stable@vger.kernel.org # For Kernel 4.18 Signed-off-by: Mauro Carvalho Chehab commit 0929983e49c81c1d413702cd9b83bb06c4a2555c Author: Hugues Fruchet Date: Thu Oct 4 07:21:57 2018 -0400 media: ov5640: fix framerate update Changing framerate right before streamon had no effect, the new framerate value was taken into account only at next streamon, fix this. Signed-off-by: Hugues Fruchet Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 786fa584eda86d6598db3b87c61dc81f68808d11 Author: Lubomir Rintel Date: Thu Oct 4 17:29:03 2018 -0400 media: ov7670: make "xclk" clock optional When the "xclk" clock was added, it was made mandatory. This broke the driver on an OLPC plaform which doesn't know such clock. Make it optional. Tested on a OLPC XO-1 laptop. Fixes: 0a024d634cee ("[media] ov7670: get xclk") Cc: stable@vger.kernel.org # 4.11+ Signed-off-by: Lubomir Rintel Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 146c45ef1fec3e3217b78c5a606efe41150301ea Author: Arnd Bergmann Date: Wed Sep 26 08:51:01 2018 -0400 media: ov9650: avoid maybe-uninitialized warnings The regmap change causes multiple warnings like drivers/media/i2c/ov9650.c: In function 'ov965x_g_volatile_ctrl': drivers/media/i2c/ov9650.c:889:29: error: 'reg2' may be used uninitialized in this function [-Werror=maybe-uninitialized] exposure = ((reg2 & 0x3f) << 10) | (reg1 << 2) | ~~~~~~~~~~~~~~~^~~~~~ It is apparently hard for the compiler to see here if ov965x_read() returned successfully or not. Besides, we have a v4l2_dbg() statement that prints an uninitialized value if regmap_read() fails. Adding an 'else' clause avoids the ambiguity. Fixes: 361f3803adfe ("media: ov9650: use SCCB regmap") Signed-off-by: Arnd Bergmann Reviewed-by: Akinobu Mita Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 370d8e2a7570adb46ab5d90b19292c5c40129e24 Author: Mauro Carvalho Chehab Date: Fri Oct 5 10:18:05 2018 -0400 media: imx355: fix a few coding style issues Function alignments are off by 1 space, as reported by checkpatch.pl --strict. Fix those. Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit df0b5c4a7ddd898839508e087230e82c76792e35 Author: Bingbu Cao Date: Sat Sep 29 06:03:54 2018 -0400 media: add imx355 camera sensor driver Add a v4l2 sub-device driver for the Sony imx355 image sensor. This is a camera sensor using the i2c bus for control and the csi-2 bus for data. This driver supports following features: - manual exposure and analog/digital gain control support - vblank/hblank control support - 4 test patterns control support - vflip/hflip control support (will impact the output bayer order) - support following resolutions: - 3268x2448, 3264x2448, 3280x2464 @ 30fps - 1940x1096, 1936x1096, 1924x1080, 1920x1080 @ 60fps - 1640x1232, 1640x922, 1300x736, 1296x736, 1284x720, 1280x720 820x616 @ 120fps - support 4 bayer orders output (via change v/hflip) - SRGGB10(default), SGRBG10, SGBRG10, SBGGR10 [Sakari Ailus: Use do_div() for dividing 64-bit numbers, fix fwnode if usage] Cc: Tomasz Figa Signed-off-by: Tianshu Qiu Signed-off-by: Bingbu Cao Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 70d8fa7c4d689911ae6a0d585c35fda20884a33b Author: Mauro Carvalho Chehab Date: Fri Oct 5 10:11:43 2018 -0400 media: imx319: fix a few coding style issues Function alignments are off by 1 space, as reported by checkpatch.pl --strict. Fix those. Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit d64e1b3f5cce41dd878a3ea008dd696a4d7d07d9 Author: Manivannan Sadhasivam Date: Sat Sep 29 13:16:36 2018 +0530 dmaengine: owl: Add Slave and Cyclic mode support for Actions Semi Owl S900 SoC Add Slave and Cyclic mode support for Actions Semi Owl S900 SoC. The slave mode supports bus width of 4 bytes common for all peripherals and 1 byte specific for UART. The cyclic mode supports only block mode transfer. Signed-off-by: Manivannan Sadhasivam Signed-off-by: Vinod Koul commit fd99bd8b805c7c01af7dd66e22bb31c8cfe64310 Author: Liviu Dudau Date: Fri Oct 5 13:30:48 2018 +0100 drm: malidp: Add the size of the superblocks when calculating total size for AFBC buffers The size of the superblocks being added to the total AFBC buffer size got lost in the upstreaming process. Add it back. Reviewed-by: Ayan Kumar Halder Signed-off-by: Liviu Dudau commit f4d34aa8c887a8a2d23ef546da0efa10e3f77241 Author: Rami Rosen Date: Fri Oct 5 00:03:10 2018 +0300 dmaengine: ioat: fix prototype of ioat_enumerate_channels Signed-off-by: Rami Rosen Signed-off-by: Vinod Koul commit 6d8623a71135d8e2d397c1534f35e04dcf867749 Author: Bart Van Assche Date: Thu Oct 4 10:35:24 2018 -0700 blk-mq-debugfs: Also show requests that have not yet been started When debugging e.g. the SCSI timeout handler it is important that requests that have not yet been started or that already have completed are also reported through debugfs. Cc: Christoph Hellwig Cc: Ming Lei Cc: Martin K. Petersen Reviewed-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn Signed-off-by: Bart Van Assche Signed-off-by: Jens Axboe commit 4f5735f3884f9504fee5602aa8805d7695aa0f74 Merge: 9305455acfa6 2acf70ade79d Author: Jens Axboe Date: Fri Oct 5 08:15:12 2018 -0600 Merge branch 'nvme-4.20' of git://git.infradead.org/nvme into for-4.20/block Pull NVMe updates from Christoph: "A relatively boring merge window: - better AEN tracing (Chaitanya) - NUMA aware PCIe multipathing (me) - RDMA workqueue fixes (Sagi) - better bio usage in the target (Sagi) - FC rework for target removal (James) - better multipath handling of ->queue_rq failures (James) - various cleanups (Milan)" * 'nvme-4.20' of git://git.infradead.org/nvme: nvmet-rdma: use a private workqueue for delete nvme: take node locality into account when selecting a path nvmet: don't split large I/Os unconditionally nvme: call nvme_complete_rq when nvmf_check_ready fails for mpath I/O nvme-core: add async event trace helper nvme_fc: add 'nvme_discovery' sysfs attribute to fc transport device nvmet_fc: support target port removal with nvmet layer nvme-fc: fix for a minor typos nvmet: remove redundant module prefix nvme: fix typo in nvme_identify_ns_descs commit 8a89dc62f28c481f62e0a1329679304ec2145323 Author: Bingbu Cao Date: Tue Sep 25 22:42:18 2018 -0400 media: add imx319 camera sensor driver Add a v4l2 sub-device driver for the Sony imx319 image sensor. This is a camera sensor using the i2c bus for control and the csi-2 bus for data. This driver supports following features: - manual exposure and analog/digital gain control support - vblank/hblank control support - 4 test patterns control support - vflip/hflip control support (will impact the output bayer order) - support following resolutions: - 3264x2448, 3280x2464 @ 30fps - 1936x1096, 1920x1080 @ 60fps - 1640x1232, 1640x922, 1296x736, 1280x720 @ 120fps - support 4 bayer orders output (via change v/hflip) - SRGGB10(default), SGRBG10, SGBRG10, SBGGR10 [Sakari Ailus: Replace 64-bit division by do_div(), fix fwnode if usage] Cc: Tomasz Figa Signed-off-by: Bingbu Cao Signed-off-by: Tianshu Qiu Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 7a9b109d91cfc6089006378efd515cc287bdef67 Author: Sakari Ailus Date: Thu Jul 19 07:11:40 2018 -0400 media: v4l: ctrl: Provide unlocked variant of v4l2_ctrl_grab Sometimes it may be necessary to grab a control while holding the control handler's lock. Provide an unlocked variant of v4l2_ctrl_grab for the purpose --- it's called __v4l2_ctrl_grab. Signed-off-by: Sakari Ailus Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 9a8aaa28f54c209bd36ac798d4ed9f3ea925b275 Author: Sakari Ailus Date: Thu Jul 19 07:10:50 2018 -0400 media: v4l: ctrl: Remove old documentation from v4l2_ctrl_grab v4l2_ctrl_grab() is documented in the header; there's no need to have a comment explaining what the function does in the .c file. Signed-off-by: Sakari Ailus Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 44f411c353bf6d98d5a34f8f1b8605d43b2e50b8 Author: Olga Kornievskaia Date: Thu Oct 4 14:45:00 2018 -0400 NFSv4.x: fix lock recovery during delegation recall Running "./nfstest_delegation --runtest recall26" uncovers that client doesn't recover the lock when we have an appending open, where the initial open got a write delegation. Instead of checking for the passed in open context against the file lock's open context. Check that the state is the same. Signed-off-by: Olga Kornievskaia Signed-off-by: Trond Myklebust commit 21924765862a0871908a35cb0e53e2e1c169b888 Author: Arnd Bergmann Date: Tue Oct 2 22:57:46 2018 +0200 SUNRPC: use cmpxchg64() in gss_seq_send64_fetch_and_inc() The newly introduced gss_seq_send64_fetch_and_inc() fails to build on 32-bit architectures: net/sunrpc/auth_gss/gss_krb5_seal.c:144:14: note: in expansion of macro 'cmpxchg' seq_send = cmpxchg(&ctx->seq_send64, old, old + 1); ^~~~~~~ arch/x86/include/asm/cmpxchg.h:128:3: error: call to '__cmpxchg_wrong_size' declared with attribute error: Bad argument size for cmpxchg __cmpxchg_wrong_size(); \ As the message tells us, cmpxchg() cannot be used on 64-bit arguments, that's what cmpxchg64() does. Fixes: 571ed1fd2390 ("SUNRPC: Replace krb5_seq_lock with a lockless scheme") Signed-off-by: Arnd Bergmann Signed-off-by: Trond Myklebust commit dd5adbfbfc50ff998909660c6158c0488f7b6a2b Author: He Zhe Date: Sun Sep 30 00:45:52 2018 +0800 printk: Add KBUILD_MODNAME and remove a redundant print prefix Add KBUILD_MODNAME to make prints more clear. Link: http://lkml.kernel.org/r/1538239553-81805-3-git-send-email-zhe.he@windriver.com Cc: rostedt@goodmis.org Cc: linux-kernel@vger.kernel.org Signed-off-by: He Zhe Reviewed-by: Sergey Senozhatsky Signed-off-by: Petr Mladek commit 35d3cbe84544da74e39e1cec01374092467e3119 Author: Fabio Estevam Date: Mon Sep 10 14:45:23 2018 -0300 ARM: imx_v6_v7_defconfig: Select CONFIG_TMPFS_POSIX_ACL Andreas Müller reports: "Fixes: | Sep 04 09:05:10 imx6qdl-variscite-som systemd-udevd[220]: Failed to apply ACL on /dev/v4l-subdev0: Operation not supported | Sep 04 09:05:10 imx6qdl-variscite-som systemd-udevd[224]: Failed to apply ACL on /dev/v4l-subdev1: Operation not supported | Sep 04 09:05:10 imx6qdl-variscite-som systemd-udevd[215]: Failed to apply ACL on /dev/v4l-subdev10: Operation not supported | Sep 04 09:05:10 imx6qdl-variscite-som systemd-udevd[228]: Failed to apply ACL on /dev/v4l-subdev2: Operation not supported | Sep 04 09:05:10 imx6qdl-variscite-som systemd-udevd[232]: Failed to apply ACL on /dev/v4l-subdev5: Operation not supported | Sep 04 09:05:10 imx6qdl-variscite-som systemd-udevd[217]: Failed to apply ACL on /dev/v4l-subdev11: Operation not supported | Sep 04 09:05:10 imx6qdl-variscite-som systemd-udevd[214]: Failed to apply ACL on /dev/dri/card1: Operation not supported | Sep 04 09:05:10 imx6qdl-variscite-som systemd-udevd[216]: Failed to apply ACL on /dev/v4l-subdev8: Operation not supported | Sep 04 09:05:10 imx6qdl-variscite-som systemd-udevd[226]: Failed to apply ACL on /dev/v4l-subdev9: Operation not supported and nasty follow-ups: Starting weston from sddm as unpriviledged user fails with some hints on missing access rights." Select the CONFIG_TMPFS_POSIX_ACL option to fix these issues. Reported-by: Andreas Müller Signed-off-by: Fabio Estevam Acked-by: Otavio Salvador Signed-off-by: Shawn Guo commit 5ef78342edbd2bb51421115ae6777ac15982fa2e Author: Fabio Estevam Date: Wed Oct 3 11:13:53 2018 -0300 ARM: imx_v4_v5_defconfig: Remove unneeded options Remove the following unneeded config options: - CONFIG_USB_CHIPIDEA_ULPI and CONFIG_USB_ULPI_BUS have been removed since commit a930d8bd94d8d ("usb: chipidea: Always build ULPI code") Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit 264993a29af0ff57725098b1626243b5bdeaf813 Author: Fabio Estevam Date: Wed Oct 3 11:13:52 2018 -0300 ARM: imx_v4_v5_defconfig: Re-sync defconfig Re-sync the defconfig by doing: make savedefconfig cp defconfig arch/arm/configs/imx_v4_v5_defconfig and only keep the options that were moved around. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit 989801095792e4e248376f44321ea005461756b4 Author: Fabio Estevam Date: Wed Oct 3 11:13:51 2018 -0300 ARM: mxs_defconfig: Remove unneeded options Remove the following unneeded config options: - CONFIG_ARM_THUMB is selected by default - CONFIG_I2C is selected by default. - CONFIG_FRAMEBUFFER_CONSOLE is selected by default Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit 16c66c8f7eee3df15800dcb9093bf09e59184ad4 Author: Fabio Estevam Date: Wed Oct 3 11:13:50 2018 -0300 ARM: mxs_defconfig: Re-sync defconfig Re-sync the defconfig by doing: make savedefconfig cp defconfig arch/arm/configs/mxs_defconfig and only keep the options that were moved around. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit c29d541f590c49def93f23b26a408dbcd6f137e3 Author: Fabio Estevam Date: Wed Oct 3 11:13:49 2018 -0300 ARM: imx_v6_v7_defconfig: Remove unneeded options Remove the following unneeded config options: - CONFIG_USB_CHIPIDEA_ULPI and CONFIG_USB_ULPI_BUS have been removed since commit a930d8bd94d8d ("usb: chipidea: Always build ULPI code") - CONFIG_DEBUG_FS is selected by default. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit ef2384e3af8a2d374c6b585aab8d187eee69752e Author: Fabio Estevam Date: Wed Oct 3 11:13:48 2018 -0300 ARM: imx_v6_v7_defconfig: Re-sync defconfig Re-sync the defconfig by doing: make savedefconfig cp defconfig arch/arm/configs/imx_v6_v7_defconfig and only keep the options that were moved around. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit 70510b0813bbc51d64563a356eed2ba69317abe1 Author: Anson Huang Date: Wed Aug 29 13:00:47 2018 +0800 ARM: imx_v6_v7_defconfig: select CONFIG_ARM_CPUIDLE by default Some i.MX platforms like i.MX7S/D uses generic ARM cpuidle driver and psci method to support cpuidle feature, select CONFIG_ARM_CPUIDLE by default for such platforms. Signed-off-by: Anson Huang Signed-off-by: Shawn Guo commit 1a877f8bd35e5bcfb1207a2dc761047a7d364514 Author: Leonard Crestez Date: Mon Aug 27 15:32:39 2018 +0300 ARM: imx_v6_v7_defconfig: Make usbnet drivers builtin for boot Chips such as imx6sll and imx7ulp have no ethernet support so the common development usecase of nfs boot is supported via usb ethernet dongles. Add drivers for additional usbnet device directly into the kernel image produced by the imx defconfig. This list is based on the usbnet devices supported by uboot. Signed-off-by: Leonard Crestez Signed-off-by: Shawn Guo commit 30fdd51be161676642e354aeb2327963ab4f6224 Author: Robin Gong Date: Tue Aug 7 02:20:55 2018 +0800 ARM: imx_v6_v7_defconfig: add CONFIG_FW_LOADER_USER_HELPER To support loading sdma firmware automatically from rootfs, enable CONFIG_FW_LOADER_USER_HELPER/CONFIG_FW_LOADER_USER_HELPER_FALLBACK. Please get sdma firmware from below link and put it into rootfs entry -- /lib/firmware/imx/sdma/: https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/imx/sdma Signed-off-by: Robin Gong Signed-off-by: Shawn Guo commit b2b291bf3b7c1153a995e3314ade01ff85c54484 Author: Fabio Estevam Date: Thu Jul 26 13:05:22 2018 -0300 ARM: imx_v6_v7_defconfig: Select CONFIG_SENSORS_MC13783_ADC Select the MC13783/MC13892 ADC functionality by default. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit 51a72ab7372d85c96104e58036f1b49ba11e5d2b Author: He Zhe Date: Sun Sep 30 00:45:51 2018 +0800 printk: Correct wrong casting log_first_seq and console_seq are 64-bit unsigned integers. Correct a wrong casting that might cut off the output. Link: http://lkml.kernel.org/r/1538239553-81805-2-git-send-email-zhe.he@windriver.com Cc: rostedt@goodmis.org Cc: linux-kernel@vger.kernel.org Signed-off-by: He Zhe [sergey.senozhatsky@gmail.com: More descriptive commit message] Reviewed-by: Sergey Senozhatsky Signed-off-by: Petr Mladek commit f492fb4f5b41e8e62051e710369320e9ffa7a1ea Author: Sakari Ailus Date: Sat Sep 29 12:41:17 2018 -0400 media: MAINTAINERS: Fix entry for the renamed dw9807 driver The driver for the dw9807 voice coil was renamed as dw9807-vcm.c to reflect the fact that the chip also contains an EEPROM. While there is no EEPROM (nor MFD) driver yet and it may not be ever even needed, the driver was renamed accordingly. But the MAINTAINERS entry was not. Fix this. Fixes: e6c17ada3188 ("media: dw9807-vcm: Recognise this is just the VCM bit of the device") Reported-by: Joe Perches Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 5505dcaf133aa233b6e56704aec8aef966d8f114 Author: Marek Szyprowski Date: Fri Oct 5 04:01:41 2018 -0400 media: MAINTAINERS: update videobuf2 entry Commits 03fbdb2fc2b8 ("media: move videobuf2 to drivers/media/common") and 7952be9b6ece ("media: drivers/media/common/videobuf2: rename from videobuf") moved videobuf2 framework source code finally to drivers/media/common/videobuf2 directory, so update relevant paths in MAINTAINERS file. Reported-by: Joe Perches Signed-off-by: Marek Szyprowski Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 05552832204e37e038d550e1354300eb11a9e5ec Merge: 49d54abee9d1 9a9e295e7c5c Author: Wolfram Sang Date: Fri Oct 5 14:19:02 2018 +0200 Merge tag 'at24-4.20-updates-for-wolfram' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux into i2c/for-4.20 AT24 updates for 4.20 Single patch from Wang Xin improving the read/write loop in at24 under high load. commit 277fcdb2cfee38ccdbe07e705dbd4896ba0c9930 Author: He Zhe Date: Sun Sep 30 00:45:50 2018 +0800 printk: Fix panic caused by passing log_buf_len to command line log_buf_len_setup does not check input argument before passing it to simple_strtoull. The argument would be a NULL pointer if "log_buf_len", without its value, is set in command line and thus causes the following panic. PANIC: early exception 0xe3 IP 10:ffffffffaaeacd0d error 0 cr2 0x0 [ 0.000000] CPU: 0 PID: 0 Comm: swapper Not tainted 4.19.0-rc4-yocto-standard+ #1 [ 0.000000] RIP: 0010:_parse_integer_fixup_radix+0xd/0x70 ... [ 0.000000] Call Trace: [ 0.000000] simple_strtoull+0x29/0x70 [ 0.000000] memparse+0x26/0x90 [ 0.000000] log_buf_len_setup+0x17/0x22 [ 0.000000] do_early_param+0x57/0x8e [ 0.000000] parse_args+0x208/0x320 [ 0.000000] ? rdinit_setup+0x30/0x30 [ 0.000000] parse_early_options+0x29/0x2d [ 0.000000] ? rdinit_setup+0x30/0x30 [ 0.000000] parse_early_param+0x36/0x4d [ 0.000000] setup_arch+0x336/0x99e [ 0.000000] start_kernel+0x6f/0x4ee [ 0.000000] x86_64_start_reservations+0x24/0x26 [ 0.000000] x86_64_start_kernel+0x6f/0x72 [ 0.000000] secondary_startup_64+0xa4/0xb0 This patch adds a check to prevent the panic. Link: http://lkml.kernel.org/r/1538239553-81805-1-git-send-email-zhe.he@windriver.com Cc: stable@vger.kernel.org Cc: rostedt@goodmis.org Cc: linux-kernel@vger.kernel.org Signed-off-by: He Zhe Reviewed-by: Sergey Senozhatsky Signed-off-by: Petr Mladek commit 49d54abee9d1507e117a4218dc5baa3ebc5b93f1 Author: Rob Herring Date: Fri Sep 28 17:49:47 2018 -0500 i2c: 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. Reviewed-by: Peter Rosin Signed-off-by: Rob Herring Signed-off-by: Wolfram Sang commit e1eba2ea54a2de0e4c58d87270d25706bb77b844 Author: Florian Fainelli Date: Mon Oct 1 10:43:47 2018 -0700 i2c: brcmstb: Allow enabling the driver on DSL SoCs ARCH_BCM_63XX which is used by ARM-based DSL SoCs from Broadcom uses the same controller, make it possible to select the STB driver and update the Kconfig and help text a bit. Signed-off-by: Florian Fainelli Signed-off-by: Wolfram Sang commit d5a5dcd3f815c82e719fd6563f027673160f88e1 Author: Alexandru Ardelean Date: Tue Oct 2 15:06:30 2018 +0300 ASoC: dt-bindings: add dt bindings for adau1977 audio codec Add device-tree bindings documentation file for ADAU1977 audio codec. This describes device-tree fields that are already supported by the driver. The driver supports both I2C AND and SPI, and this doc covers both aspects of the DT configuration. Signed-off-by: Alexandru Ardelean Signed-off-by: Mark Brown commit 9c6c4d961e634413add345ee030e108e6d19cea2 Author: Takashi Iwai Date: Thu Oct 4 20:30:06 2018 +0200 ASoC: topology: Use the standard fall-through annotations As a preparatory patch for the upcoming -Wimplicit-fallthrough compiler checks, replace with the standard "fall through" annotation. gcc can't understand the mixed texts, unfortunately. Signed-off-by: Takashi Iwai Signed-off-by: Mark Brown commit e4bfd61571f5db5c69a7a49de401543cc7d6c87c Author: Takashi Iwai Date: Thu Oct 4 20:30:05 2018 +0200 ASoC: intel: skylake: Add fall-through annotation As a preparatory patch for the upcoming -Wimplicit-fallthrough compiler checks, add the "fall through" annotation in Intel SST skylake driver. Signed-off-by: Takashi Iwai Signed-off-by: Mark Brown commit 0beeb4baf56bd9deb920712a4034541fb33bbbe0 Author: Takashi Iwai Date: Thu Oct 4 20:30:04 2018 +0200 ASoC: rt274: Add fall-through annotations As a preparatory patch for the upcoming -Wimplicit-fallthrough compiler checks, add the "fall through" annotations in rt274 driver. Signed-off-by: Takashi Iwai Signed-off-by: Mark Brown commit 641f7f2195735b4fe93b541ea3a792fe4fee2415 Author: Takashi Iwai Date: Thu Oct 4 20:30:03 2018 +0200 ASoC: pcm186x: Use the standard fall-through annotation As a preparatory patch for the upcoming -Wimplicit-fallthrough compiler checks, replace with the standard "fall through" annotation. Unfortunately gcc doesn't understand the mixed comment lines. Signed-off-by: Takashi Iwai Signed-off-by: Mark Brown commit 7e29317928bd79a03a9c35816afa709988b5d31b Author: Takashi Iwai Date: Thu Oct 4 20:30:02 2018 +0200 ASoC: adau1761: Use the standard fall-through annotation As a preparatory patch for the upcoming -Wimplicit-fallthrough compiler checks, replace with the standard "fall through" annotation at the right place. It has to be put right before the next label. Signed-off-by: Takashi Iwai Signed-off-by: Mark Brown commit 9dbcfe1ace4e9c57b819df1054eaeceb9bfd34f5 Author: Krzysztof Kozlowski Date: Thu Sep 27 19:03:47 2018 +0200 dt-bindings: clock: samsung: Add SPDX license identifiers Replace GPL license statements with SPDX license identifiers (GPL-2.0). Signed-off-by: Krzysztof Kozlowski Acked-by: Chanwoo Choi Reviewed-by: Rob Herring Signed-off-by: Sylwester Nawrocki commit 1da220e3a5d22fccda0bc8542997abc1d1741268 Author: Marek Szyprowski Date: Tue Oct 2 13:52:10 2018 +0200 clk: samsung: Use clk_hw API for calling clk framework from clk notifiers clk_notifier_register() documentation states, that the provided notifier callbacks associated with the notifier must not re-enter into the clk framework by calling any top-level clk APIs. Fix this by replacing clk_get_rate() calls with clk_hw_get_rate(), which is safe in this context. Signed-off-by: Marek Szyprowski Signed-off-by: Sylwester Nawrocki commit b33228029d842269e17bba591609e83ed422005d Author: Marek Szyprowski Date: Mon Sep 24 13:01:20 2018 +0200 clk: samsung: exynos5420: Enable PERIS clocks for suspend Ensure that clocks for core SoC modules (including TZPC0..9 modules) are enabled for suspend/resume cycle. This fixes suspend/resume support on Exynos5422-based Odroid XU3/XU4 boards. Suggested-by: Joonyoung Shim Signed-off-by: Marek Szyprowski Signed-off-by: Sylwester Nawrocki commit d32dd2a1a0f80edad158c9a1ba5f47650d9504a0 Author: Joonyoung Shim Date: Mon Sep 24 13:00:56 2018 +0200 clk: samsung: exynos5420: Define CLK_SECKEY gate clock only or Exynos5420 The bit of GATE_BUS_PERIS1 for CLK_SECKEY is just reserved on exynos5422/5800, not exynos5420. Define gate clk for exynos5420 to handle the bit only on exynos5420. Signed-off-by: Joonyoung Shim [m.szyprow: rewrote commit subject] Signed-off-by: Marek Szyprowski Signed-off-by: Sylwester Nawrocki commit defadcc956cacfb36ecf9902bd56dc5a14fdec49 Author: Marek Szyprowski Date: Wed Sep 12 15:16:41 2018 +0200 clk: samsung: exynos5433: Keep sclk_uart clocks enabled in suspend All sclk_uart clocks in TOP CMU have to be kept enabled for suspend/resume cycle, otherwise TM2(e) boards hangs before entering the suspend mode. Signed-off-by: Marek Szyprowski Signed-off-by: Sylwester Nawrocki commit fa34efff75d4a853551c8154e0685d44a7a6a6aa Author: Marek Szyprowski Date: Wed Oct 11 11:25:15 2017 +0200 clk: samsung: Remove obsolete code for Exynos4412 ISP clocks Exynos4412 ISP clock are provided by separate Exynos4412 ISP clock driver, so support for them in Exynos4-clk driver can be removed. Signed-off-by: Marek Szyprowski Acked-by: Krzysztof Kozlowski Signed-off-by: Sylwester Nawrocki commit a766065279e2fd2c4ee6fe6b48d44386c000c940 Author: Marek Szyprowski Date: Thu Sep 6 18:02:36 2018 +0200 clk: samsung: exynos5433: Add suspend state for TOP, CPIF & PERIC CMUs Before entering system suspend, one has to ensure that some clocks from TOP, CPIF and PERIC CMUs are enabled. This is needed by the firmware to properly perform system suspend operation. Instead of adding more and more clocks with CRITICAL flag, simply enable those clocks directly in respective CMU registers using 'suspend_regs' feature. Signed-off-by: Marek Szyprowski Reviewed-by: Krzysztof Kozlowski Signed-off-by: Sylwester Nawrocki commit 70da9ee80228e6d98fd68e3c1db124c4461d283c Author: Marek Szyprowski Date: Thu Sep 6 18:02:35 2018 +0200 clk: samsung: Use NOIRQ stage for Exynos5433 clocks suspend/resume SoC clock drivers should suspend after every other drivers in the system, which are using clocks and resume before them. The last stage for calling suspend device callbacks is NOIRQ stage and there exists driver, which use that state (dwmmc-exynos), so Exynos5433 clocks driver should also use it. During the same stage, clocks driver will be always suspended after its clients as a direct result of proper device probe order (deferred probe reorders the suspend call sequence). Signed-off-by: Marek Szyprowski Acked-by: Chanwoo Choi Reviewed-by: Krzysztof Kozlowski Signed-off-by: Sylwester Nawrocki commit 2d77f77c0aaaa77ebfa8c4763816a8018d170111 Author: Marek Szyprowski Date: Thu Sep 6 17:55:32 2018 +0200 clk: samsung: exynos5420: Use generic helper for handling suspend/resume Replace common suspend/resume handling code by generic helper. Almost no functional change, the only difference is in handling of hypothetical memory allocation failure on boot. Signed-off-by: Marek Szyprowski Signed-off-by: Sylwester Nawrocki commit 9a4d8a8c4d2a4683874d242363f30dbdccd034c9 Author: Marek Szyprowski Date: Thu Sep 6 17:55:31 2018 +0200 clk: samsung: exynos4: Use generic helper for handling suspend/resume Replace common suspend/resume handling code by generic helper. Handling of PLLs is a bit different in generic code, as they are handled in the same way as other clock registers. Such approach was already used on later Exynos SoCs and worked fine. Tests have shown that it works also on Exynos4 SoCs and significantly simplifies the code. Signed-off-by: Marek Szyprowski Signed-off-by: Sylwester Nawrocki commit 8bf27eaa04a610c622fda45b715f90f1781c2abb Author: Marek Szyprowski Date: Thu Sep 6 17:55:30 2018 +0200 clk: samsung: Add support for setting registers state before suspend Some registers of clock controller have to be set to certain values before entering system suspend state. Till now drivers did that on their own, but it will be easier to handle it by generic code and let drivers simply to provide the list of registers and their state. Signed-off-by: Marek Szyprowski Signed-off-by: Sylwester Nawrocki commit c41b0ff2f627c654475a287a21b2f455430f0923 Author: Marek Szyprowski Date: Thu Sep 6 17:55:29 2018 +0200 clk: samsung: exynos5250: Use generic helper for handling suspend/resume Replace common suspend/resume handling code by generic helper. Almost no functional change, the only difference is in handling of hypothetical memory allocation failure on boot. Signed-off-by: Marek Szyprowski Acked-by: Chanwoo Choi Reviewed-by: Krzysztof Kozlowski Signed-off-by: Sylwester Nawrocki commit 3ac0b61578a6e9edcedeb6b4d7c53c6f3c7ae916 Author: Marek Szyprowski Date: Thu Sep 6 17:55:28 2018 +0200 clk: samsung: s5pv210: Use generic helper for handling suspend/resume Replace common suspend/resume handling code by generic helper. Almost no functional change, the only difference is in handling of hypothetical memory allocation failure on boot. Signed-off-by: Marek Szyprowski Acked-by: Chanwoo Choi Reviewed-by: Krzysztof Kozlowski Signed-off-by: Sylwester Nawrocki commit 3773ee423e726e1da2cb505ee3c990073c608968 Author: Marek Szyprowski Date: Thu Sep 6 17:55:27 2018 +0200 clk: samsung: s3c64xx: Use generic helper for handling suspend/resume Replace common suspend/resume handling code by generic helper. Almost no functional change, the only difference is in handling of hypothetical memory allocation failure on boot. [snawrocki@kernel.org: Whitespace correction] Signed-off-by: Marek Szyprowski Acked-by: Chanwoo Choi Reviewed-by: Krzysztof Kozlowski Signed-off-by: Sylwester Nawrocki commit 76c7829f5b8c7691b18929cdedd6d2e79db3c2b9 Author: Pierre Morel Date: Fri Oct 5 10:31:10 2018 +0200 s390: vfio-ap: setup APCB mask using KVM dedicated function We replace the vfio_ap_mdev_copy_masks() by the new kvm_arch_crypto_set_masks() to be able to use the standard KVM tracing system. Signed-off-by: Pierre Morel Message-Id: <1538728270-10340-3-git-send-email-pmorel@linux.ibm.com> Reviewed-by: Cornelia Huck Reviewed-by: David Hildenbrand Signed-off-by: Christian Borntraeger commit 0e237e44699465139c07f969b051f83066a2ec1d Author: Pierre Morel Date: Fri Oct 5 10:31:09 2018 +0200 KVM: s390: Tracing APCB changes kvm_arch_crypto_set_masks is a new function to centralize the setup the APCB masks inside the CRYCB SIE satellite. To trace APCB mask changes, we add KVM_EVENT() tracing to both kvm_arch_crypto_set_masks and kvm_arch_crypto_clear_masks. Signed-off-by: Pierre Morel Message-Id: <1538728270-10340-2-git-send-email-pmorel@linux.ibm.com> Reviewed-by: Cornelia Huck Signed-off-by: Christian Borntraeger commit e1c02eb16a9c742178874a7d1a08d300981715fb Author: Sergey Matyukevich Date: Fri Oct 5 10:11:46 2018 +0000 qtnfmac: implement dump_station support for STA mode Current implementation of dump_station cfg80211 callback supports AP mode only. Add support for STA mode as well: by default in STA mode this callback is supposed to return AP on managed interface. Signed-off-by: Sergey Matyukevich Signed-off-by: Kalle Valo commit 8804ea9e15a37a3dc732d88360a846e793091c03 Author: Sergey Matyukevich Date: Fri Oct 5 10:11:45 2018 +0000 qtnfmac: drop redundant data copy in control path Command responses and events from the firmware are copied twice in control path: at first in shm core (qtnf_shm_handle_new_data) and then in pcie bus drivers (qtnf_pcie_control_rx_callback). There is no need to copy this data twice, it can be done only once in rx callbacks. Signed-off-by: Sergey Matyukevich Signed-off-by: Kalle Valo commit 2525f188f7fd28fedc2c1093f02d74195f966f63 Author: Sergey Matyukevich Date: Fri Oct 5 10:11:43 2018 +0000 qtnfmac: add support for scan dwell time configuration Firmware supports scan dwell time tuning for various types of scans. Enable support for this feature: - advertise capability to configure channel dwell time to host - pass scan dwell parameters to wireless card in scan request Signed-off-by: Sergey Matyukevich Signed-off-by: Kalle Valo commit 6d85930f265393cde7dba5637eeaa60c2c7c72c8 Author: Sergey Matyukevich Date: Fri Oct 5 10:11:41 2018 +0000 qtnfmac: add support for scan flush Notify firmware to flush cache before scanning when needed. Signed-off-by: Sergey Matyukevich Signed-off-by: Kalle Valo commit 35da3fe63b8647ce3cc52fccdf186a60710815fb Author: Sergey Matyukevich Date: Fri Oct 5 10:11:40 2018 +0000 qtnfmac: drop error reports for out-of-bounds key indexes On disconnect wireless core attempts to remove all the supported keys. Following cfg80211_ops conventions, firmware returns -ENOENT code for the out-of-bound key indexes. This is a normal behavior, so no need to report errors for this case. Signed-off-by: Sergey Matyukevich Signed-off-by: Kalle Valo commit ab1c64a1d349cc7f1090a60ce85a53298e3d371d Author: Sergey Matyukevich Date: Fri Oct 5 10:11:38 2018 +0000 qtnfmac: inform wireless core about supported extended capabilities Driver retrieves information about supported extended capabilities from wireless card. However this information is not propagated further to Linux wireless core. Fix this by setting extended capabilities fields of wiphy structure. Signed-off-by: Sergey Matyukevich Signed-off-by: Kalle Valo commit d5657b709e2a92a0e581109010765d1d485580df Author: Sergey Matyukevich Date: Fri Oct 5 10:11:36 2018 +0000 qtnfmac: pass sgi rate info flag to wireless core SGI should be passed to wireless core as a part of rate structure. Otherwise wireless core performs incorrect rate calculation when SGI is enabled in hardware but not reported to host. Signed-off-by: Sergey Matyukevich Signed-off-by: Kalle Valo commit aaa981406f4febd20b6c192b22c37ded8fbfabad Author: Igor Mitsyanko Date: Fri Oct 5 10:11:35 2018 +0000 qtnfmac: do not cancel scan in disconnect callback Do not cancel scan in disconnect callback. If there is an active scan, it will be cancelled by firmware, then host driver will be properly notified by event. Cancelling scan in disconnect callback occasionally may lead to the following race issue. Host is able to queue one scan after scan abort in disconnect callback, and another scan after scan abort in event handler. As a result, firmware receives second scan before the first scan completes. Signed-off-by: Igor Mitsyanko Signed-off-by: Kalle Valo commit c6ed298ffe09fb2e1770705c9ff6d74b41581fbb Author: Sergey Matyukevich Date: Fri Oct 5 10:11:33 2018 +0000 qtnfmac: cleanup and unify command error handling Unify command error handling using qtnf_cmd_resp_result_decode function. Do not duplicate error messages in command handlers and cfg80211 callbacks: report 'cmd exec fail' only on control path internal failure. Remove redundant 'unlikely' macros. Signed-off-by: Sergey Matyukevich Signed-off-by: Kalle Valo commit 75001bbc07656466830e2d914ef5cc24784efbf7 Author: Igor Mitsyanko Date: Fri Oct 5 10:11:31 2018 +0000 qtnfmac: do not initialize per-MAC data multiple times Several members of pwr-MAC structure are re-initialized several times together with per-VIF initialization. Fix that and simplify the code. Signed-off-by: Igor Mitsyanko Signed-off-by: Kalle Valo commit 92246b126ebf66ab1fec9d631df78d7c675b66db Author: Igor Mitsyanko Date: Fri Oct 5 10:11:30 2018 +0000 qtnfmac: request userspace to do OBSS scanning if FW can not In case firmware reports that it can not do OBSS scanning for 40MHz 2.4GHz channels itself, tell userpsace to do that instead by setting NL80211_FEATURE_NEED_OBSS_SCAN flag. Signed-off-by: Igor mitsyanko Signed-off-by: Kalle Valo commit d5f693bc4bb925713d9afce09271cda7ee54f035 Author: Igor Mitsyanko Date: Fri Oct 5 10:11:28 2018 +0000 qtnfmac: generate local disconnect event in disconnect callback When cfg80211 disconnect callback is triggered and command is processed by firmware, disconnect event with local parameter set must be sent immediately. Indicating that it's a "local" event (not from AP) will help upper layers to process this event correctly. Signed-off-by: Igor Mitsyanko Signed-off-by: Kalle Valo commit 263ee96b77a755ebf119e5a61bcdfc761cef500e Author: Sergey Matyukevich Date: Fri Oct 5 10:11:27 2018 +0000 qtnfmac: do not track STA states in driver Remove STA connection states tracking from driver. Leave it wireless core on host and to firmware. Signed-off-by: Sergey Matyukevich Signed-off-by: Kalle Valo commit e4183d3256e3cd668e899d06af66da5aac3a51af Author: Ezequiel Garcia Date: Thu Oct 4 20:12:21 2018 -0400 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 f4e833ba2a955bc15c1ccaa5b0b3c2a0d7989bca Author: Leonard Crestez Date: Thu Jul 19 17:02:10 2018 +0300 PCI: imx: Add PME_Turn_Off support When the root complex suspends it must send a PME_Turn_Off TLP. Implement this by asserting the "turnoff" reset. On imx7d this functionality is part of the System Reset Controller (SRC) and is exposed through the linux reset-controller subsystem. On imx6 equivalent bits are in the IOMUXC pinmux controller General Purpose Register (GPR) area which the imx6-pcie driver accesses directly. This is only for imx7d right now but it's deliberately implemented as an optional reset, ignoring the chip variant: * Older dtbs won't have this reset so it will be ignored. * Future chips might also expose this as a reset controller. For example imx8m (not yet supported) has the exact same PCIE_CTRL_APPS_TURNOFF bit in the same location. Signed-off-by: Leonard Crestez [lorenzo.pieralisi@arm.com: updated commit log] Signed-off-by: Lorenzo Pieralisi Reviewed-by: Lucas Stach commit 158bc148a31ea22a2ef8cbaf4d968476bddefbc0 Author: Sean Young Date: Tue Sep 18 10:29:29 2018 -0400 media: rc: mce_kbd: input events via rc-core's input device There is no need to create another input device. Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 0ac5a603a732dda81de8e9b4ae67e79ba07bda55 Author: Sean Young Date: Sun Sep 16 07:35:58 2018 -0400 media: rc: imon: report mouse events using rc-core's input device There is no need to create another input device. Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit fec225a04330d0f222d24feb5bea045526031675 Author: Sean Young Date: Tue Sep 18 04:50:20 2018 -0400 media: rc: some events are dropped by userspace libevdev (which is used by libinput) gets a list of keycodes from the input device on creation. Any events with keycodes which are not in this list are silently dropped. So, set all keycodes on device creation since we do not know which will be used if the keymap changes. Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 0293c8ba807c8611ea5503f9511029dd9082025a Author: Kyrylo Tkachov Date: Thu Oct 4 17:06:46 2018 +0100 arm64: Fix typo in a comment in arch/arm64/mm/kasan_init.c "bellow" -> "below" The recommendation from kegel.com/kerspell is to only fix the howlers. "Bellow" is a synonym of "howl" so this should be appropriate. Signed-off-by: Kyrylo Tkachov Signed-off-by: Catalin Marinas commit be9c03e4120d42fcdb8debe3c6237629e51b8864 Author: Mauro Carvalho Chehab Date: Thu Oct 4 17:55:06 2018 -0400 media: v4l2-fwnode: simplify v4l2_fwnode_reference_parse_int_props() call The v4l2_fwnode_reference_parse_int_props() has a big name, causing it to cause coding style warnings. Also, it depends on a const struct embedded indide a function. Rearrange the logic in order to move the struct declaration out of such function and use it inside this function. That cleans up some coding style issues. Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit c1e630559f2636607c4ef094c061c67f302c4883 Author: Mauro Carvalho Chehab Date: Thu Oct 4 17:41:16 2018 -0400 media: v4l2-fwnode: cleanup functions that parse endpoints There is already a typedef for the parse endpoint function. However, instead of using it, it is redefined at the C file (and on one of the function headers). Replace them by the function typedef, in order to cleanup several related coding style warnings. Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 6087b21533fed7b8eaade86097b279591bf42638 Author: Mauro Carvalho Chehab Date: Thu Oct 4 17:10:46 2018 -0400 media: v4l2-core: cleanup coding style at V4L2 async/fwnode There are several coding style issues at those definitions, and the previous patchset added even more. Address the trivial ones by first calling: ./scripts/checkpatch.pl --strict --fix-inline include/media/v4l2-async.h include/media/v4l2-fwnode.h include/media/v4l2-mediabus.h drivers/media/v4l2-core/v4l2-async.c drivers/media/v4l2-core/v4l2-fwnode.c and then manually adjusting the style where needed. Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit e487a0f52301293152a6f8c4e217f2a11dd808e3 Author: Dr. Greg Wettstein Date: Mon Sep 17 18:53:33 2018 -0400 tpm: Restore functionality to xen vtpm driver. Functionality of the xen-tpmfront driver was lost secondary to the introduction of xenbus multi-page support in commit ccc9d90a9a8b ("xenbus_client: Extend interface to support multi-page ring"). In this commit pointer to location of where the shared page address is stored was being passed to the xenbus_grant_ring() function rather then the address of the shared page itself. This resulted in a situation where the driver would attach to the vtpm-stubdom but any attempt to send a command to the stub domain would timeout. A diagnostic finding for this regression is the following error message being generated when the xen-tpmfront driver probes for a device: <3>vtpm vtpm-0: tpm_transmit: tpm_send: error -62 <3>vtpm vtpm-0: A TPM error (-62) occurred attempting to determine the timeouts This fix is relevant to all kernels from 4.1 forward which is the release in which multi-page xenbus support was introduced. Daniel De Graaf formulated the fix by code inspection after the regression point was located. Fixes: ccc9d90a9a8b ("xenbus_client: Extend interface to support multi-page ring") Signed-off-by: Dr. Greg Wettstein [boris: Updated commit message, added Fixes tag] Signed-off-by: Boris Ostrovsky Cc: stable@vger.kernel.org # v4.1+ Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit 9e1b74a63f7760b525295161fc608b19b8ee19c4 Author: Tadeusz Struk Date: Mon Sep 10 10:18:33 2018 -0700 tpm: add support for nonblocking operation Currently the TPM driver only supports blocking calls, which doesn't allow asynchronous IO operations to the TPM hardware. This patch changes it and adds support for nonblocking write and a new poll function to enable applications, which want to take advantage of this. Tested-by: Philip Tricca Signed-off-by: Tadeusz Struk Reviewed-by: Jarkko Sakkinen Signed-off--by: Jarkko Sakkinen commit c3d477a725ef6b3d17609d5dafc644cccc070cb9 Author: Tadeusz Struk Date: Mon Sep 10 10:18:28 2018 -0700 tpm: add ptr to the tpm_space struct to file_priv Add a ptr to struct tpm_space to the file_priv and consolidate of the write operations for the two interfaces. Signed-off-by: Tadeusz Struk Tested-by: Philip Tricca Reviewed-by: Jarkko Sakkinen Signed-off--by: Jarkko Sakkinen commit 2f7d8dbb11287cbe9da6380ca14ed5d38c9ed91f Author: Peter Huewe Date: Mon Sep 3 21:51:51 2018 +0200 tpm: Make SECURITYFS a weak dependency While having SECURITYFS enabled for the tpm subsystem is beneficial in most cases, it is not strictly necessary to have it enabled at all. Especially on platforms without any boot firmware integration of the TPM (e.g. raspberry pi) it does not add any value for the tpm subsystem, as there is no eventlog present. By turning it from 'select' to 'imply' it still gets selected per default, but enables users who want to save some kb of ram by turning SECURITYFS off. Signed-off-by: Peter Huewe Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit 0d6d0d62d9505a9816716aa484ebd0b04c795063 Author: Javier Martinez Canillas Date: Thu Aug 30 16:40:05 2018 +0200 tpm: suppress transmit cmd error logs when TPM 1.2 is disabled/deactivated For TPM 1.2 chips the system setup utility allows to set the TPM device in one of the following states: * Active: Security chip is functional * Inactive: Security chip is visible, but is not functional * Disabled: Security chip is hidden and is not functional When choosing the "Inactive" state, the TPM 1.2 device is enumerated and registered, but sending TPM commands fail with either TPM_DEACTIVATED or TPM_DISABLED depending if the firmware deactivated or disabled the TPM. Since these TPM 1.2 error codes don't have special treatment, inactivating the TPM leads to a very noisy kernel log buffer that shows messages like the following: tpm_tis 00:05: 1.2 TPM (device-id 0x0, rev-id 78) tpm tpm0: A TPM error (6) occurred attempting to read a pcr value tpm tpm0: TPM is disabled/deactivated (0x6) tpm tpm0: A TPM error (6) occurred attempting get random tpm tpm0: A TPM error (6) occurred attempting to read a pcr value ima: No TPM chip found, activating TPM-bypass! (rc=6) tpm tpm0: A TPM error (6) occurred attempting get random tpm tpm0: A TPM error (6) occurred attempting get random tpm tpm0: A TPM error (6) occurred attempting get random tpm tpm0: A TPM error (6) occurred attempting get random Let's just suppress error log messages for the TPM_{DEACTIVATED,DISABLED} return codes, since this is expected when the TPM 1.2 is set to Inactive. In that case the kernel log is cleaner and less confusing for users, i.e: tpm_tis 00:05: 1.2 TPM (device-id 0x0, rev-id 78) tpm tpm0: TPM is disabled/deactivated (0x6) ima: No TPM chip found, activating TPM-bypass! (rc=6) Reported-by: Hans de Goede Signed-off-by: Javier Martinez Canillas Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit 84b59f6487d82d3ab4247a099aba66d4d17e8b08 Author: Jarkko Sakkinen Date: Mon Sep 3 04:01:26 2018 +0300 tpm: fix response size validation in tpm_get_random() When checking whether the response is large enough to be able to contain the received random bytes in tpm_get_random() and tpm2_get_random(), they fail to take account the header size, which should be added to the minimum size. This commit fixes this issue. Cc: stable@vger.kernel.org Fixes: c659af78eb7b ("tpm: Check size of response before accessing data") Signed-off-by: Jarkko Sakkinen commit 24d2c521749d8547765b555b7a85cca179bb2275 Author: Joerg Roedel Date: Fri Oct 5 12:32:46 2018 +0200 iommu/amd: Move iommu_init_pci() to .init section The function is only called from another __init function, so it should be moved to .init too. Signed-off-by: Joerg Roedel commit d92116b800fb79a72ad26121f5011f6aa3ad94c2 Author: Lubomir Rintel Date: Thu Oct 4 18:08:08 2018 +0200 x86/olpc: Indicate that legacy PC XO-1 platform should not register RTC On OLPC XO-1, the RTC is discovered via device tree from the arch initcall. Don't let the PC platform register another one from its device initcall, it's not going to work: sysfs: cannot create duplicate filename '/devices/platform/rtc_cmos' CPU: 0 PID: 1 Comm: swapper Not tainted 4.19.0-rc6 #12 Hardware name: OLPC XO/XO, BIOS OLPC Ver 1.00.01 06/11/2014 Call Trace: dump_stack+0x16/0x18 sysfs_warn_dup+0x46/0x58 sysfs_create_dir_ns+0x76/0x9b kobject_add_internal+0xed/0x209 ? __schedule+0x3fa/0x447 kobject_add+0x5b/0x66 device_add+0x298/0x535 ? insert_resource_conflict+0x2a/0x3e platform_device_add+0x14d/0x192 ? io_delay_init+0x19/0x19 platform_device_register+0x1c/0x1f add_rtc_cmos+0x16/0x31 do_one_initcall+0x78/0x14a ? do_early_param+0x75/0x75 kernel_init_freeable+0x152/0x1e0 ? rest_init+0xa2/0xa2 kernel_init+0x8/0xd5 ret_from_fork+0x2e/0x38 kobject_add_internal failed for rtc_cmos with -EEXIST, don't try to register things with the same name in the same directory. platform rtc_cmos: registered platform RTC device (no PNP device found) Signed-off-by: Lubomir Rintel Signed-off-by: Borislav Petkov Acked-by: Thomas Gleixner CC: "H. Peter Anvin" CC: Ingo Molnar CC: x86-ml Link: http://lkml.kernel.org/r/20181004160808.307738-1-lkundrak@v3.sk commit 8c1d1bb0f0bdebd174a6188ca345e44a03becda5 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 a1d09e074250fad24f1b993f327b18cc6812eb7a Author: Julien Thierry Date: Tue Sep 11 10:15:12 2018 +0100 ARM: 8797/1: spectre-v1.1: harden __copy_to_user Sanitize user pointer given to __copy_to_user, both for standard version and memcopy version of the user accessor. Signed-off-by: Julien Thierry Signed-off-by: Russell King commit afaf6838f4bc896a711180b702b388b8cfa638fc Author: Julien Thierry Date: Tue Sep 11 10:14:50 2018 +0100 ARM: 8796/1: spectre-v1,v1.1: provide helpers for address sanitization Introduce C and asm helpers to sanitize user address, taking the address range they target into account. Use asm helper for existing sanitization in __copy_from_user(). Signed-off-by: Julien Thierry Signed-off-by: Russell King commit e3aa6243434fd9a82e84bb79ab1abd14f2d9a5a7 Author: Julien Thierry Date: Tue Sep 11 10:13:39 2018 +0100 ARM: 8795/1: spectre-v1.1: use put_user() for __put_user() When Spectre mitigation is required, __put_user() needs to include check_uaccess. This is already the case for put_user(), so just make __put_user() an alias of put_user(). Signed-off-by: Julien Thierry Signed-off-by: Russell King commit 621afc677465db231662ed126ae1f355bf8eac47 Author: Julien Thierry Date: Tue Sep 11 10:13:23 2018 +0100 ARM: 8794/1: uaccess: Prevent speculative use of the current addr_limit A mispredicted conditional call to set_fs could result in the wrong addr_limit being forwarded under speculation to a subsequent access_ok check, potentially forming part of a spectre-v1 attack using uaccess routines. This patch prevents this forwarding from taking place, but putting heavy barriers in set_fs after writing the addr_limit. Porting commit c2f0ad4fc089cff8 ("arm64: uaccess: Prevent speculative use of the current addr_limit"). Signed-off-by: Julien Thierry Signed-off-by: Russell King commit 18ea66bd6e7a95bdc598223d72757190916af28b Author: Julien Thierry Date: Tue Sep 11 10:13:11 2018 +0100 ARM: 8793/1: signal: replace __put_user_error with __put_user With Spectre-v1.1 mitigations, __put_user_error is pointless. In an attempt to remove it, replace its references in frame setups with __put_user. Signed-off-by: Julien Thierry Signed-off-by: Russell King commit 319508902600c2688e057750148487996396e9ca Author: Julien Thierry Date: Tue Sep 11 10:12:49 2018 +0100 ARM: 8792/1: oabi-compat: copy oabi events using __copy_to_user() Copy events to user using __copy_to_user() rather than copy members of individually with __put_user_error(). This has the benefit of disabling/enabling PAN once per event intead of once per event member. Signed-off-by: Julien Thierry Signed-off-by: Russell King commit 3aa2df6ec2ca6bc143a65351cca4266d03a8bc41 Author: Julien Thierry Date: Tue Sep 11 10:12:18 2018 +0100 ARM: 8791/1: vfp: use __copy_to_user() when saving VFP state Use __copy_to_user() rather than __put_user_error() for individual members when saving VFP state. This has the benefit of disabling/enabling PAN once per copied struct intead of once per write. Signed-off-by: Julien Thierry Signed-off-by: Russell King commit 73839798af7ebc6c8d0c9271ebbbc148700e521f Author: Julien Thierry Date: Tue Sep 11 10:12:05 2018 +0100 ARM: 8790/1: signal: always use __copy_to_user to save iwmmxt context When setting a dummy iwmmxt context, create a local instance and use __copy_to_user both cases whether iwmmxt is being used or not. This has the benefit of disabling/enabling PAN once for the whole copy intead of once per write. Signed-off-by: Julien Thierry Signed-off-by: Russell King commit 5ca451cf6ed04443774bbb7ee45332dafa42e99f Author: Julien Thierry Date: Tue Sep 11 10:11:06 2018 +0100 ARM: 8789/1: signal: copy registers using __copy_to_user() When saving the ARM integer registers, use __copy_to_user() to copy them into user signal frame, rather than __put_user_error(). This has the benefit of disabling/enabling PAN once for the whole copy intead of once per write. Signed-off-by: Julien Thierry Signed-off-by: Russell King commit bce6824cc8e86619901265b7e77c59cc9d99e05b Merge: 494b5168f2de c0554d2d3db4 Author: Ingo Molnar Date: Fri Oct 5 11:27:23 2018 +0200 Merge branch 'x86/core' into x86/build, to avoid conflicts Signed-off-by: Ingo Molnar commit 3aedf7e135b55cb74a62c0be79a86384f76e5724 Author: Leonard Crestez Date: Wed Jul 11 22:41:38 2018 +0300 ARM: dts: imx7d: Add turnoff reset This is required for the imx pci driver to send the PME_Turn_Off TLP. Signed-off-by: Leonard Crestez Signed-off-by: Lorenzo Pieralisi Acked-by: Shawn Guo commit 3e3f50b148dd63caf66eabc7b2a9cd9dc485361f Author: Leonard Crestez Date: Tue Aug 14 15:59:12 2018 +0300 dt-bindings: imx6q-pcie: Add turnoff reset for imx7d This is documented as "required" but won't be present in old dtbs. These resets are also present on other imx chips but right now only imx7d implements them through the reset controller subsystem. Signed-off-by: Leonard Crestez Signed-off-by: Lorenzo Pieralisi Acked-by: Philipp Zabel Acked-by: Rob Herring commit de248327091e7ab02f751cb288fc7cf7edbb0461 Author: Leonard Crestez Date: Wed Jul 11 22:30:02 2018 +0300 reset: imx7: Add PCIE_CTRL_APPS_TURNOFF This is required for the imx pci driver to send the PME_Turn_Off TLP. Signed-off-by: Leonard Crestez Signed-off-by: Lorenzo Pieralisi Acked-by: Philipp Zabel Acked-by: Rob Herring commit a7dd5d7c2dd83e9a1444ac8ffa68b801c9a5d5f0 Author: YueHaibing Date: Fri Oct 5 04:15:45 2018 +0000 b43: remove set but not used variable 'wl' Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/wireless/broadcom/b43/main.c: In function 'b43_one_core_detach': drivers/net/wireless/broadcom/b43/main.c:5496:17: warning: variable 'wl' set but not used [-Wunused-but-set-variable] After commit 644aa4d62096 ("b43: remove list of IEEE 802.11 devices") 'wl' is not used any more. Signed-off-by: YueHaibing Signed-off-by: Kalle Valo commit 74aa3586c59906f9b76720416aee045db2f7b3b5 Author: Gustavo A. R. Silva Date: Wed Oct 3 14:01:02 2018 +0200 ssb: chipcommon: fix fall-through annotation Replace "Fallthough" with a proper "fall through" annotation. This fix is part of the ongoing efforts to enabling -Wimplicit-fallthrough Signed-off-by: Gustavo A. R. Silva Acked-by: Michael Buesch Signed-off-by: Kalle Valo commit 209e957b467b8db0a875763688fd965b5afff905 Author: Lance Roy Date: Tue Oct 2 22:38:54 2018 -0700 zd1211rw: 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 Cc: Daniel Drake Cc: Ulrich Kunitz Cc: Kalle Valo Cc: "David S. Miller" Cc: Cc: Signed-off-by: Kalle Valo commit eea2926b0a390969828e49ea96c45a2b1f007030 Author: Sibi Sankar Date: Thu Aug 30 00:42:11 2018 +0530 reset: qcom: PDC Global (Power Domain Controller) reset controller Add reset controller for SDM845 SoCs to control reset signals provided by PDC Global for Modem, Compute, Display, GPU, Debug, AOP, Sensors, Audio, SP and APPS Signed-off-by: Sibi Sankar Reviewed-by: Bjorn Andersson Signed-off-by: Philipp Zabel commit 3c83dd577c7f3f49420c661e693be7049bf0ca02 Author: Tony Lindgren Date: Mon Oct 1 14:41:10 2018 -0700 wlcore: Add support for optional wakeirq Now with wlcore using PM runtime, we can also add support for Linux generic wakeirq handling for it if configured in the dts file. The wakeirq can be configured as the second interrupt in the dts file with interrupts-extended property where it is the padconf irq of the OOB GPIO pin used for wlcore interrupt. Note that eventually we should also allow configuring wlcore to use the SDIO dat1 IRQ for wake-up, and in that case the the wakeirq should be configured to be the padconf interrupt of the dat1 pin and not the padconf interrupt of the OOB GPIO pin. Cc: Eyal Reizer Signed-off-by: Tony Lindgren Signed-off-by: Kalle Valo commit 032f11638ff8e0a02d9cd49ef85e185cd0326d03 Author: Sibi Sankar Date: Thu Aug 30 00:42:10 2018 +0530 dt-bindings: reset: Add PDC Global binding for SDM845 SoCs Add PDC Global (Power Domain Controller) binding for SDM845 SoCs. Reviewed-by: Bjorn Andersson Reviewed-by: Rob Herring Signed-off-by: Sibi Sankar Signed-off-by: Philipp Zabel commit 4e651bad848955d88b29a568bfbfb4b831270e16 Author: Tony Lindgren Date: Mon Oct 1 14:38:05 2018 -0700 wlcore: Fix BUG with clear completion on timeout We do not currently clear wl->elp_compl on ELP timeout and we have bogus lingering pointer that wlcore_irq then will try to access after recovery is done: BUG: spinlock bad magic on CPU#1, irq/255-wl12xx/580 ... (spin_dump) from [] (do_raw_spin_lock+0xc8/0x124) (do_raw_spin_lock) from [] (_raw_spin_lock_irqsave+0x68/0x74) (_raw_spin_lock_irqsave) from [] (complete+0x24/0x58) (complete) from [] (wlcore_irq+0x48/0x17c [wlcore]) (wlcore_irq [wlcore]) from [] (irq_thread_fn+0x2c/0x64) (irq_thread_fn) from [] (irq_thread+0x148/0x290) (irq_thread) from [] (kthread+0x160/0x17c) (kthread) from [] (ret_from_fork+0x14/0x20) ... After that the system will hang. Let's fix this by adding a flag for recovery and moving the recovery work call to to the error handling section. And we want to set WL1271_FLAG_INTENDED_FW_RECOVERY and actually clear it too in wl1271_recovery_work() and just downgrade the error to a warning to prevent overly verbose output. Cc: Eyal Reizer Signed-off-by: Tony Lindgren Signed-off-by: Kalle Valo commit 9c22211e1d719ade3d7a968c864a8f5e86163849 Author: Ping-Ke Shih Date: Mon Oct 1 17:25:14 2018 +0800 rtlwifi: Removed unused define and code efuse_re_pg* from wifi.h The following: bool efuse_re_pg_sec1flag; u8 efuse_re_pg_data[8]; are not referenced anywhere in the rtlwifi code. This patch is originally created by Rick Veens , and Joe Perches reminded to apply it to rtlwifi. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo commit fbf07000960d9c8a13fdc17c6de0230d681c7543 Author: Chung-Hsien Hsu Date: Thu Sep 27 14:59:49 2018 +0000 brcmfmac: fix full timeout waiting for action frame on-channel tx The driver sends an action frame down and waits for a completion signal triggered by the received BRCMF_E_ACTION_FRAME_OFF_CHAN_COMPLETE event to continue the process. However, the action frame could be transmitted either on the current channel or on an off channel. For the on-channel case, only BRCMF_E_ACTION_FRAME_COMPLETE event will be received when the frame is transmitted, which make the driver always wait a full timeout duration. This patch has the completion signal be triggered by receiving the BRCMF_E_ACTION_FRAME_COMPLETE event for the on-channel case. This change fixes WFA p2p certification 5.1.19 failure. Signed-off-by: Chung-Hsien Hsu Signed-off-by: Chi-Hsien Lin Signed-off-by: Kalle Valo commit edb6d6885bef82d1eac432dbeca9fbf4ec349d7e Author: Chung-Hsien Hsu Date: Thu Sep 27 14:59:44 2018 +0000 brcmfmac: reduce timeout for action frame scan Finding a common channel to send an action frame out is required for some action types. Since a loop with several scan retry is used to find the channel, a short wait time could be considered for each attempt. This patch reduces the wait time from 1500 to 450 msec for each action frame scan. This patch fixes the WFA p2p certification 5.1.20 failure caused by the long action frame send time. Signed-off-by: Chung-Hsien Hsu Signed-off-by: Chi-Hsien Lin Signed-off-by: Kalle Valo commit 4edc00adfd58768b065204968948c52f5e5b07b1 Author: Ricardo Ribalda Delgado Date: Thu Oct 4 15:01:05 2018 +0200 mtd: maps: gpio-addr-flash: Use devm_* functions By using devm functions we can make the code cleaner. Signed-off-by: Ricardo Ribalda Delgado Signed-off-by: Boris Brezillon commit 6c925b333368cda4e1b0513b07f72316c0e7edd7 Author: Ricardo Ribalda Delgado Date: Thu Oct 4 15:01:04 2018 +0200 mtd: maps: gpio-addr-flash: Fix ioremapped size We should only iomap the area of the chip that is memory mapped. Otherwise we could be mapping devices beyond the memory space or that belong to other devices. Signed-off-by: Ricardo Ribalda Delgado Fixes: ebd71e3a4861 ("mtd: maps: gpio-addr-flash: fix warnings and make more portable") Cc: Signed-off-by: Boris Brezillon commit d0e7d14455d41163126afecd0fcce935463cc512 Author: Borislav Petkov Date: Thu Oct 4 19:22:27 2018 +0200 cpu/SMT: State SMT is disabled even with nosmt and without "=force" When booting with "nosmt=force" a message is issued into dmesg to confirm that SMT has been force-disabled but such a message is not issued when only "nosmt" is on the kernel command line. Fix that. Signed-off-by: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20181004172227.10094-1-bp@alien8.de Signed-off-by: Ingo Molnar commit 34cb1e31890c97d0ee89755d5f2833737fa30a03 Author: Ricardo Ribalda Delgado Date: Thu Oct 4 15:01:03 2018 +0200 mtd: maps: gpio-addr-flash: Replace custom printk Use preferred print methods dev_* Signed-off-by: Ricardo Ribalda Delgado Signed-off-by: Boris Brezillon commit ef0de747f7ad179c7698a5b0e28db05f18ecbf57 Author: Ricardo Ribalda Delgado Date: Thu Oct 4 15:34:45 2018 +0200 mtd: physmap_of: Release resources on error During probe, if there was an error the memory region and the memory map were not properly released.This can lead a system unusable if deferred probe is in use. Replace mem_request and map with devm_ioremap_resource Signed-off-by: Ricardo Ribalda Delgado Signed-off-by: Boris Brezillon commit d39f1d68fe1de1f9dbe167a73f0f605226905e27 Author: Jussi Laako Date: Fri Oct 5 11:00:04 2018 +0300 ALSA: usb-audio: Add custom mixer status quirks for RME CC devices Adds several vendor specific mixer quirks for RME's Class Compliant USB devices. These provide extra status information from the device otherwise not available. These include AES/SPDIF rate and status information, current system sampling rate and measured frequency. This information is especially useful in cases where device's clock is slaved to external clock source. Signed-off-by: Jussi Laako Signed-off-by: Takashi Iwai commit bcc4a62a73cb65327d7268fbfa3a786d603f52dc Author: Andy Lutomirski Date: Thu Oct 4 14:44:45 2018 -0700 x86/vdso: Document vgtod_ts better After reading do_hres() and do_course() and scratching my head a bit, I figured out why the arithmetic is strange. Document it. Signed-off-by: Andy Lutomirski Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/f66f53d81150bbad47d7b282c9207a71a3ce1c16.1538689401.git.luto@kernel.org Signed-off-by: Ingo Molnar commit 89fe0a1f1c694a3b0b3cfa8c0952d603753f36df Author: Andy Lutomirski Date: Thu Oct 4 14:44:43 2018 -0700 x86/vdso: Remove "memory" clobbers in the vDSO syscall fallbacks When a vDSO clock function falls back to the syscall, no special barriers or ordering is needed, and the syscall fallbacks don't clobber any memory that is not explicitly listed in the asm constraints. Remove the "memory" clobber. This causes minor changes to the generated code, but otherwise has no obvious performance impact. I think it's nice to have, though, since it may help the optimizer in the future. Signed-off-by: Andy Lutomirski Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/3a7438f5fb2422ed881683d2ccffd7f987b2dc44.1538689401.git.luto@kernel.org Signed-off-by: Ingo Molnar commit f5e489e6ee7a7c8fb7c3ed3997597a109f0813aa Author: Matthias Brugger Date: Wed Oct 3 11:09:12 2018 +0200 dt-bindings: mediatek: Add bindig for MT7623 IOMMU and SMI This patch add the binding documentation for the iommu and smi devices on the MT7623 SoC. Signed-off-by: Matthias Brugger commit 1892e120e8ecac868f9ddde988152c3499c9b04b Author: Matthias Brugger Date: Wed Oct 3 11:09:11 2018 +0200 dt-bindings: mediatek: Add JPEG Decoder binding for MT7623 This patch adds a binding documentation for the JPEG Decoder of the MT7623 SoC. Signed-off-by: Matthias Brugger commit 0dd807f52e6fd225c19e26683406a6e5d475370e Author: Matthias Brugger Date: Wed Oct 3 11:09:10 2018 +0200 dt-bindings: iommu: mediatek: Add binding for MT7623 This patch adds binding documentation for MT7623 SoC. Signed-off-by: Matthias Brugger commit fd2a9f18fce11f09747f1807d1298a6d9dfe8f9b Author: Matthias Brugger Date: Wed Oct 3 11:09:09 2018 +0200 dt-bindings: clock: mediatek: add support for MT7623 This patch adds bindings for apmixedsys, audsys, bpsys, ethsys, hifsys, imgsys, infracfg, mmsys, pericfg, topckgen and vdecsys for MT6723. Signed-off-by: Matthias Brugger commit 8e41bd54317b04f2bf03012a4ca8ab7360c9beef Author: Christian Borntraeger Date: Thu Oct 4 14:42:43 2018 +0200 KVM: s390: fix locking for crypto setting error path We need to unlock the kvm->lock mutex in the error case. Reported-by: smatch Fixes: 37940fb0b6a2c4bf101 ("KVM: s390: device attrs to enable/disable AP interpretation") Signed-off-by: Christian Borntraeger Reviewed-by: Janosch Frank Reviewed-by: Pierre Morel Reviewed-by: David Hildenbrand Reviewed-by: Cornelia Huck Signed-off-by: Christian Borntraeger commit 3b766f45355775fc5c404b7ff88f3fd3e9d77f86 Author: Alan Stern Date: Tue Oct 2 10:18:40 2018 -0400 USB: net2280: Remove ->disconnect() callback from net2280_pullup() The net2280 UDC driver invokes the gadget driver's ->disconnect() callback routine when the net2280_pullup() routine turns off the D+ pullup. This is now unnecessary, because the gadget core performs the callback on our behalf. This patch removes the unneeded callback. Signed-off-by: Alan Stern Signed-off-by: Felipe Balbi commit c216765d3a1defda5e7e2dabd878f99f0cd2ebf2 Author: SolidHal Date: Tue Oct 2 20:58:16 2018 -0500 usb: dwc2: disable power_down on rockchip devices The bug would let the usb controller enter partial power down, which was formally known as hibernate, upon boot if nothing was plugged in to the port. Partial power down couldn't be exited properly, so any usb devices plugged in after boot would not be usable. Before the name change, params.hibernation was false by default, so _dwc2_hcd_suspend() would skip entering hibernation. With the rename, _dwc2_hcd_suspend() was changed to use params.power_down to decide whether or not to enter partial power down. Since params.power_down is non-zero by default, it needs to be set to 0 for rockchip devices to restore functionality. This bug was reported in the linux-usb thread: REGRESSION: usb: dwc2: USB device not seen after boot The commit that caused this regression is: 6d23ee9caa6790aea047f9aca7f3c03cb8d96eb6 Signed-off-by: SolidHal Acked-by: Minas Harutyunyan Signed-off-by: Felipe Balbi commit 30025efa8b5e75f545e38a592158c34b3169423b Author: Yoshihiro Shimoda Date: Tue Oct 2 20:58:27 2018 +0900 usb: gadget: udc: renesas_usb3: add support for r8a77990 Since r8a77990 (R-Car E3) doesn't have VBUS detect pin and number of ramif is 4, this patch adds a new renesas_usb3_priv variable for the SoC. Signed-off-by: Yoshihiro Shimoda Signed-off-by: Felipe Balbi commit c6d849e56212c3d59df3e3d42fdb16c05b4a572c Author: Yoshihiro Shimoda Date: Tue Oct 2 20:58:26 2018 +0900 dt-bindings: usb: renesas_usb3: add bindings for r8a77990 This patch adds bindings for r8a77990 (R-Car E3). Signed-off-by: Yoshihiro Shimoda Signed-off-by: Felipe Balbi commit a1acad03aa77bde2d7fda7b1391ee72a55a705da Author: Fabrizio Castro Date: Fri Aug 24 08:56:15 2018 +0100 usb: gadget: udc: renesas_usb3: Add r8a774a1 support Document RZ/G2M (R8A774A1) SoC bindings. Signed-off-by: Fabrizio Castro Reviewed-by: Biju Das Signed-off-by: Felipe Balbi commit 95278ddaa15cfa23e4a06ee9ed7b6ee0197c500b Author: Cong Wang Date: Tue Oct 2 12:50:19 2018 -0700 net_sched: convert idrinfo->lock from spinlock to a mutex In commit ec3ed293e766 ("net_sched: change tcf_del_walker() to take idrinfo->lock") we move fl_hw_destroy_tmplt() to a workqueue to avoid blocking with the spinlock held. Unfortunately, this causes a lot of troubles here: 1. tcf_chain_destroy() could be called right after we queue the work but before the work runs. This is a use-after-free. 2. The chain refcnt is already 0, we can't even just hold it again. We can check refcnt==1 but it is ugly. 3. The chain with refcnt 0 is still visible in its block, which means it could be still found and used! 4. The block has a refcnt too, we can't hold it without introducing a proper API either. We can make it working but the end result is ugly. Instead of wasting time on reviewing it, let's just convert the troubling spinlock to a mutex, which allows us to use non-atomic allocations too. Fixes: ec3ed293e766 ("net_sched: change tcf_del_walker() to take idrinfo->lock") Reported-by: Ido Schimmel Cc: Jamal Hadi Salim Cc: Vlad Buslov Cc: Jiri Pirko Signed-off-by: Cong Wang Tested-by: Ido Schimmel Signed-off-by: David S. Miller commit df1ea77bc51ddb571530fd1b765b4c132095c419 Merge: 7ccc4f188751 a41b4f3c58dd Author: Daniel Borkmann Date: Fri Oct 5 09:31:01 2018 +0200 Merge branch 'bpf-xsk-fix-mixed-mode' Magnus Karlsson says: ==================== Previously, the xsk code did not record which umem was bound to a specific queue id. This was not required if all drivers were zero-copy enabled as this had to be recorded in the driver anyway. So if a user tried to bind two umems to the same queue, the driver would say no. But if copy-mode was first enabled and then zero-copy mode (or the reverse order), we mistakenly enabled both of them on the same umem leading to buggy behavior. The main culprit for this is that we did not store the association of umem to queue id in the copy case and only relied on the driver reporting this. As this relation was not stored in the driver for copy mode (it does not rely on the AF_XDP NDOs), this obviously could not work. This patch fixes the problem by always recording the umem to queue id relationship in the netdev_queue and netdev_rx_queue structs. This way we always know what kind of umem has been bound to a queue id and can act appropriately at bind time. To make the bind semantics consistent with ethtool queue manipulations and to facilitate the implementation of drivers, we also forbid decreasing the number of queues/channels with ethtool if there is an active AF_XDP socket in the set of queues that are disabled. Jakub, please take a look at your patches. The last one I had to change slightly to make it fit with the new interface xdp_get_umem_from_qid(). An added bonus with this function is that we, in the future, can also use it from the driver to get a umem, thus simplifying driver implementations (and later remove the umem from the NDO completely). Björn will mail patches, at a later point in time, using this in the i40e and ixgbe drivers, that removes a good chunk of code from the ZC implementations. I also made your code aware of Tx queues. If we create a socket that only has a Tx queue, then the queue id will refer to a Tx queue id only and could be larger than the available amount of Rx queues. Please take a look at it. Differences against v1: * Included patches from Jakub that forbids decreasing the number of active queues if a queue to be deactivated has an AF_XDP socket. These have been adapted somewhat to the new interfaces in patch 2. * Removed redundant check against real_num_[rt]x_queue in xsk_bind * Only need to test against real_num_[rt]x_queues in xdp_clear_umem_at_qid. Patch 1: Introduces a umem reference in the netdev_rx_queue and netdev_queue structs. Patch 2: Records which queue_id is bound to which umem and make sure that you cannot bind two different umems to the same queue_id. Patch 3: Pre patch to ethtool_set_channels. Patch 4: Forbid decreasing the number of active queues if a deactivated queue has an AF_XDP socket. Patch 5: Simplify xdp_clear_umem_at_qid now when ethtool cannot deactivate the queue id we are running on. ==================== Signed-off-by: Daniel Borkmann commit a41b4f3c58dddcb39b7072a97ac8cb9036ce53f6 Author: Magnus Karlsson Date: Mon Oct 1 14:51:37 2018 +0200 xsk: simplify xdp_clear_umem_at_qid implementation As we now do not allow ethtool to deactivate the queue id we are running an AF_XDP socket on, we can simplify the implementation of xdp_clear_umem_at_qid(). Signed-off-by: Magnus Karlsson Signed-off-by: Daniel Borkmann commit 1661d346628115c364e2b7d5b15a64ca3bd0dbd4 Author: Jakub Kicinski Date: Mon Oct 1 14:51:36 2018 +0200 ethtool: don't allow disabling queues with umem installed We already check the RSS indirection table does not use queues which would be disabled by channel reconfiguration. Make sure user does not try to disable queues which have a UMEM and zero-copy AF_XDP socket installed. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet Signed-off-by: Daniel Borkmann commit b8c8a2e2e3758be93959587e6b19aadbb0ce7275 Author: Jakub Kicinski Date: Mon Oct 1 14:51:35 2018 +0200 ethtool: rename local variable max -> curr ethtool_set_channels() validates the config against driver's max settings. It retrieves the current config and stores it in a variable called max. This was okay when only max settings were accessed but we will soon want to access current settings as well, so calling the entire structure max makes the code less readable. While at it drop unnecessary parenthesis. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet Signed-off-by: Daniel Borkmann commit c9b47cc1fabca533fb8ebaeb417778036c1ce27d Author: Magnus Karlsson Date: Mon Oct 1 14:51:34 2018 +0200 xsk: fix bug when trying to use both copy and zero-copy on one queue id Previously, the xsk code did not record which umem was bound to a specific queue id. This was not required if all drivers were zero-copy enabled as this had to be recorded in the driver anyway. So if a user tried to bind two umems to the same queue, the driver would say no. But if copy-mode was first enabled and then zero-copy mode (or the reverse order), we mistakenly enabled both of them on the same umem leading to buggy behavior. The main culprit for this is that we did not store the association of umem to queue id in the copy case and only relied on the driver reporting this. As this relation was not stored in the driver for copy mode (it does not rely on the AF_XDP NDOs), this obviously could not work. This patch fixes the problem by always recording the umem to queue id relationship in the netdev_queue and netdev_rx_queue structs. This way we always know what kind of umem has been bound to a queue id and can act appropriately at bind time. Signed-off-by: Magnus Karlsson Signed-off-by: Daniel Borkmann commit 661b8d1b0e3a745e25f05adef2ebd00d830eeea7 Author: Magnus Karlsson Date: Mon Oct 1 14:51:33 2018 +0200 net: add umem reference in netdev{_rx}_queue These references to the umem will be used to store information on what kind of AF_XDP umem that is bound to a queue id, if any. Signed-off-by: Magnus Karlsson Signed-off-by: Daniel Borkmann commit 6f52f80e85309738121f2db51a3cac91b8195743 Author: David Ahern Date: Wed Oct 3 15:33:12 2018 -0700 net/neigh: Extend dump filter to proxy neighbor dumps Move the attribute parsing from neigh_dump_table to neigh_dump_info, and pass the filter arguments down to neigh_dump_table in a new struct. Add the filter option to proxy neigh dumps as well to make them consistent. Signed-off-by: David Ahern Signed-off-by: David S. Miller commit 2acf70ade79d26b97611a8df52eb22aa33814cd4 Author: Sagi Grimberg Date: Thu Sep 27 11:00:31 2018 -0700 nvmet-rdma: use a private workqueue for delete Queue deletion is done asynchronous when the last reference on the queue is dropped. Thus, in order to make sure we don't over allocate under a connect/disconnect storm, we let queue deletion complete before making forward progress. However, given that we flush the system_wq from rdma_cm context which runs from a workqueue context, we can have a circular locking complaint [1]. Fix that by using a private workqueue for queue deletion. [1]: ====================================================== WARNING: possible circular locking dependency detected 4.19.0-rc4-dbg+ #3 Not tainted ------------------------------------------------------ kworker/5:0/39 is trying to acquire lock: 00000000a10b6db9 (&id_priv->handler_mutex){+.+.}, at: rdma_destroy_id+0x6f/0x440 [rdma_cm] but task is already holding lock: 00000000331b4e2c ((work_completion)(&queue->release_work)){+.+.}, at: process_one_work+0x3ed/0xa20 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #3 ((work_completion)(&queue->release_work)){+.+.}: process_one_work+0x474/0xa20 worker_thread+0x63/0x5a0 kthread+0x1cf/0x1f0 ret_from_fork+0x24/0x30 -> #2 ((wq_completion)"events"){+.+.}: flush_workqueue+0xf3/0x970 nvmet_rdma_cm_handler+0x133d/0x1734 [nvmet_rdma] cma_ib_req_handler+0x72f/0xf90 [rdma_cm] cm_process_work+0x2e/0x110 [ib_cm] cm_req_handler+0x135b/0x1c30 [ib_cm] cm_work_handler+0x2b7/0x38cd [ib_cm] process_one_work+0x4ae/0xa20 nvmet_rdma:nvmet_rdma_cm_handler: nvmet_rdma: disconnected (10): status 0 id 0000000040357082 worker_thread+0x63/0x5a0 kthread+0x1cf/0x1f0 ret_from_fork+0x24/0x30 nvme nvme0: Reconnecting in 10 seconds... -> #1 (&id_priv->handler_mutex/1){+.+.}: __mutex_lock+0xfe/0xbe0 mutex_lock_nested+0x1b/0x20 cma_ib_req_handler+0x6aa/0xf90 [rdma_cm] cm_process_work+0x2e/0x110 [ib_cm] cm_req_handler+0x135b/0x1c30 [ib_cm] cm_work_handler+0x2b7/0x38cd [ib_cm] process_one_work+0x4ae/0xa20 worker_thread+0x63/0x5a0 kthread+0x1cf/0x1f0 ret_from_fork+0x24/0x30 -> #0 (&id_priv->handler_mutex){+.+.}: lock_acquire+0xc5/0x200 __mutex_lock+0xfe/0xbe0 mutex_lock_nested+0x1b/0x20 rdma_destroy_id+0x6f/0x440 [rdma_cm] nvmet_rdma_release_queue_work+0x8e/0x1b0 [nvmet_rdma] process_one_work+0x4ae/0xa20 worker_thread+0x63/0x5a0 kthread+0x1cf/0x1f0 ret_from_fork+0x24/0x30 Fixes: 777dc82395de ("nvmet-rdma: occasionally flush ongoing controller teardown") Reported-by: Bart Van Assche Signed-off-by: Sagi Grimberg Tested-by: Bart Van Assche Signed-off-by: Christoph Hellwig commit 1fc8e6423edb4bba365b0780c2fcddfb921b24b2 Author: Alexander Duyck Date: Wed Oct 3 16:48:07 2018 -0700 dma-direct: fix return value of dma_direct_supported It appears that in commit 9d7a224b463e ("dma-direct: always allow dma mask <= physiscal memory size") the logic of the test was changed from a "<" to a ">=" however I don't see any reason for that change. I am assuming that there was some additional change planned, specifically I suspect the logic was intended to be reversed and possibly used for a return. Since that is the case I have gone ahead and done that. This addresses issues I had on my system that prevented me from booting with the above mentioned commit applied on an x86_64 system w/ Intel IOMMU. Fixes: 9d7a224b463e ("dma-direct: always allow dma mask <= physiscal memory size") Signed-off-by: Alexander Duyck Acked-by: Robin Murphy Signed-off-by: Christoph Hellwig commit 17c42e34997ae172c794f84fefe47f00bec13f9a Author: YueHaibing Date: Thu Oct 4 07:09:53 2018 +0000 USB: serial: cypress_m8: remove set but not used variable 'iflag' Fixes gcc '-Wunused-but-set-variable' warning: drivers/usb/serial/cypress_m8.c: In function 'cypress_set_termios': drivers/usb/serial/cypress_m8.c:866:18: warning: variable 'iflag' set but not used [-Wunused-but-set-variable] Signed-off-by: YueHaibing Signed-off-by: Johan Hovold commit 56445eef55cb5904096fed7a73cf87b755dfffc7 Author: Johan Hovold Date: Sun Sep 30 18:03:11 2018 +0200 USB: serial: cypress_m8: fix interrupt-out transfer length Fix interrupt-out transfer length which was being set to the transfer-buffer length rather than the size of the outgoing packet. Note that no slab data was leaked as the whole transfer buffer is always cleared before each transfer. Fixes: 9aa8dae7b1fa ("cypress_m8: use usb_fill_int_urb where appropriate") Signed-off-by: Johan Hovold commit ff32d97e39e7053fdc1d316bd2e2eff70b77fdd2 Author: Johan Hovold Date: Sun Sep 30 14:27:03 2018 +0200 USB: serial: ftdi_sio: add support for FT232R CBUS gpios Enable support for cbus gpios on FT232R. The cbus configuration is stored in one word in the EEPROM at offset 0x0a (byte-offset 0x14) with the mux config for CBUS0, CBUS1, CBUS2 and CBUS3 in bits 0..3, 4..7, 8..11 and 12..15, respectively. Tested using FT232RL by configuring one cbus pin at a time. Signed-off-by: Johan Hovold commit e0658e3074231d68f6546be1c5916ba2f4dc1295 Author: Johan Hovold Date: Sun Sep 30 14:27:02 2018 +0200 USB: serial: ftdi_sio: fix gpio name collisions Drop the gpio line names, which cause gpiolib to complain loudly whenever a second ftdi gpiochip is registered: gpio gpiochip5: Detected name collision for GPIO name 'CBUS0' gpio gpiochip5: Detected name collision for GPIO name 'CBUS1' gpio gpiochip5: Detected name collision for GPIO name 'CBUS2' gpio gpiochip5: Detected name collision for GPIO name 'CBUS3' and also prevents the legacy sysfs interface from being used (as the line names are used as device names whenever they are set): sysfs: cannot create duplicate filename '/class/gpio/CBUS0' Until non-unique names are supported by gpiolib (without warnings and stack dumps), let's leave the gpio lines unnamed. Signed-off-by: Johan Hovold commit aa2278644ae54ff762ce33f9c9563d759e9cca9f Author: Paul Mackerras Date: Wed Sep 12 10:42:12 2018 +1000 KVM: PPC: Book3S HV: Provide mode where all vCPUs on a core must be the same VM This adds a mode where the vcore scheduling logic in HV KVM limits itself to scheduling only virtual cores from the same VM on any given physical core. This is enabled via a new module parameter on the kvm-hv module called "one_vm_per_core". For this to work on POWER9, it is necessary to set indep_threads_mode=N. (On POWER8, hardware limitations mean that KVM is never in independent threads mode, regardless of the indep_threads_mode setting.) Thus the settings needed for this to work are: 1. The host is in SMT1 mode. 2. On POWER8, the host is not in 2-way or 4-way static split-core mode. 3. On POWER9, the indep_threads_mode parameter is N. 4. The one_vm_per_core parameter is Y. With these settings, KVM can run up to 4 vcpus on a core at the same time on POWER9, or up to 8 vcpus on POWER8 (depending on the guest threading mode), and will ensure that all of the vcpus belong to the same VM. This is intended for use in security-conscious settings where users are concerned about possible side-channel attacks between threads which could perhaps enable one VM to attack another VM on the same core, or the host. Signed-off-by: Paul Mackerras commit 1006284c5e411872333967b1970c2ca46a9e225f Author: Cameron Kaiser Date: Tue Jul 31 07:39:21 2018 -0700 KVM: PPC: Book3S PR: Exiting split hack mode needs to fixup both PC and LR When an OS (currently only classic Mac OS) is running in KVM-PR and makes a linked jump from code with split hack addressing enabled into code that does not, LR is not correctly updated and reflects the previously munged PC. To fix this, this patch undoes the address munge when exiting split hack mode so that code relying on LR being a proper address will now execute. This does not affect OS X or other operating systems running on KVM-PR. Signed-off-by: Cameron Kaiser Signed-off-by: Paul Mackerras commit 2970f2a8e941265fb3a25128a6c016b52e27cb91 Merge: d26d4b194e58 a0e11da78f48 Author: David S. Miller Date: Thu Oct 4 21:54:45 2018 -0700 Merge branch 'net-metrics-consolidate' David Ahern says: ==================== net: Consolidate metrics handling for ipv4 and ipv6 As part of the IPv6 fib info refactoring, the intent was to make metrics handling for ipv6 identical to ipv4. One oversight in ip6_dst_destroy led to confusion and a couple of incomplete attempts at finding and fixing the resulting memory leak which was ultimately resolved by ce7ea4af0838 ("ipv6: fix memory leak on dst->_metrics"). Refactor metrics hanlding make the code really identical for v4 and v6, and add a few test cases. ==================== Signed-off-by: David S. Miller commit a0e11da78f487bc26ca7b14e4c9b40638623ebf6 Author: David Ahern Date: Thu Oct 4 20:07:55 2018 -0700 fib_tests: Add tests for metrics on routes Add ipv4 and ipv6 test cases for metrics (mtu) when fib entries are created. Can be used with kmemleak to see leaks with both fib entries and dst_entry. Signed-off-by: David Ahern Signed-off-by: David S. Miller commit 1620a33695d81611360d813a47ebde9386714036 Author: David Ahern Date: Thu Oct 4 20:07:54 2018 -0700 net: Move free of dst_metrics to helper Move the refcounting and potential free of dst metrics associated for ipv4 and ipv6 to a common helper. Signed-off-by: David Ahern Signed-off-by: David S. Miller commit e1255ed4b6dafd9966c99cde5105891cc1ac70df Author: David Ahern Date: Thu Oct 4 20:07:53 2018 -0700 net: common metrics init helper for dst_entry ipv4 and ipv6 both use refcounted metrics if FIB entries have metrics set. Move the common initialization code to a helper and use for both protocols. Signed-off-by: David Ahern Signed-off-by: David S. Miller commit cc5f0eb2164f9aa11fe631f8d905192e0233e262 Author: David Ahern Date: Thu Oct 4 20:07:52 2018 -0700 net: Move free of fib_metrics to helper Move the refcounting and potential free of dst metrics associated with a fib entry to a helper and use it in both ipv4 and ipv6. Signed-off-by: David Ahern Signed-off-by: David S. Miller commit 767a2217533fed696af0d06bee7746d34c4e00aa Author: David Ahern Date: Thu Oct 4 20:07:51 2018 -0700 net: common metrics init helper for FIB entries Consolidate initialization of ipv4 and ipv6 metrics when fib entries are created into a single helper, ip_fib_metrics_init, that handles the call to ip_metrics_convert. If no metrics are defined for the fib entry, then the metrics is set to dst_default_metrics. Signed-off-by: David Ahern Signed-off-by: David S. Miller commit d26d4b194e582c6f2070cc5f7f74a72124ad41ef Author: Jakub Kicinski Date: Thu Oct 4 17:07:51 2018 -0700 net: sched: remove unused helpers tcf_block_dev() doesn't seem to be used anywhere in the tree. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit fd27b571c9f6cf95ddbdf9de7cf0aa8c8cfe8066 Author: Ard Biesheuvel Date: Sun Sep 30 21:51:16 2018 +0200 crypto: lrw - fix rebase error after out of bounds fix Due to an unfortunate interaction between commit fbe1a850b3b1 ("crypto: lrw - Fix out-of bounds access on counter overflow") and commit c778f96bf347 ("crypto: lrw - Optimize tweak computation"), we ended up with a version of next_index() that always returns 127. Fixes: c778f96bf347 ("crypto: lrw - Optimize tweak computation") Signed-off-by: Ard Biesheuvel Reviewed-by: Ondrej Mosnacek Signed-off-by: Herbert Xu commit 5155e118dda982342c2d21ecb292c8cc8b566e8d Author: Srikanth Jampala Date: Sat Sep 29 13:49:10 2018 +0530 crypto: cavium/nitrox - use pci_alloc_irq_vectors() while enabling MSI-X. replace pci_enable_msix_exact() with pci_alloc_irq_vectors(). get the required vector count from pci_msix_vec_count(). use struct nitrox_q_vector as the argument to tasklets. Signed-off-by: Srikanth Jampala Reviewed-by: Gadam Sreerama Signed-off-by: Herbert Xu commit e7892dd6d8b0c9149ac2393b27f8913fa09227b5 Author: Srikanth Jampala Date: Sat Sep 29 13:49:09 2018 +0530 crypto: cavium/nitrox - NITROX command queue changes. Use node based allocations for queues. consider the dma address alignment changes, while calculating the queue base address. added checks in cleanup functions. Minor changes to queue variable names Signed-off-by: Srikanth Jampala Reviewed-by: Gadam Sreerama Signed-off-by: Herbert Xu commit 0b501e7a4fdc01b14930345b95c39b93f6472431 Author: Srikanth Jampala Date: Sat Sep 29 13:49:08 2018 +0530 crypto: cavium/nitrox - use pcie_flr instead of duplicating it check the flr capability using pcie_has_flr() and do the flr. Signed-off-by: Srikanth Jampala Reviewed-by: Gadam Sreerama Signed-off-by: Herbert Xu commit 80e73c8ad6e923a9839ba45f820b1346aafc793a Author: Srikanth Jampala Date: Sat Sep 29 13:49:07 2018 +0530 crypto: cavium/nitrox - fix warnings while printing atomic64_t types fix compilation warnings with nitrox_debugfs.c while printing atomic64_t types on arm64. typecast the atomic64_read() value to u64 This issue is reported by Ard Biesheuvel drivers/crypto/cavium/nitrox/nitrox_debugfs.c:62:30: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 3 has type ‘long int’ [-Wformat=] seq_printf(s, " Posted: %lld\n", atomic64_read(&ndev->stats.posted)); ^ Fixes: 2a8780be9c26 (crypto: cavium/nitrox - updated debugfs information) Cc: Ard Biesheuvel Reported-by: Ard Biesheuvel Signed-off-by: Srikanth Jampala Reviewed-by: Gadam Sreerama Signed-off-by: Herbert Xu commit 90a8c78b8b5e2c8537a170ee675127f02ca94532 Author: valdis.kletnieks@vt.edu Date: Wed Sep 26 18:49:38 2018 -0400 crypto/morus(640,1280) - make crypto_...-algs static sparse complains thusly: CHECK arch/x86/crypto/morus640-sse2-glue.c arch/x86/crypto/morus640-sse2-glue.c:38:1: warning: symbol 'crypto_morus640_sse2_algs' was not declared. Should it be static? CHECK arch/x86/crypto/morus1280-sse2-glue.c arch/x86/crypto/morus1280-sse2-glue.c:38:1: warning: symbol 'crypto_morus1280_sse2_algs' was not declared. Should it be static? CHECK arch/x86/crypto/morus1280-avx2-glue.c arch/x86/crypto/morus1280-avx2-glue.c:38:1: warning: symbol 'crypto_morus1280_avx2_algs' was not declared. Should it be static? and sparse is correct - these don't need to be global and polluting the namespace. Signed-off-by: Valdis Kletnieks Acked-by: Ondrej Mosnacek Signed-off-by: Herbert Xu commit 96808c596580a04a91e3e662ae2310e5ed421ecc Author: Arnd Bergmann Date: Wed Sep 26 15:00:34 2018 +0200 crypto: caam/qi2 - add CONFIG_NETDEVICES dependency This driver implements a (part of a) network driver, and fails to build if we have turned off networking support: drivers/crypto/caam/caamalg_qi2.o: In function `dpaa2_caam_fqdan_cb': caamalg_qi2.c:(.text+0x577c): undefined reference to `napi_schedule_prep' caamalg_qi2.c:(.text+0x578c): undefined reference to `__napi_schedule_irqoff' drivers/crypto/caam/caamalg_qi2.o: In function `dpaa2_dpseci_poll': caamalg_qi2.c:(.text+0x59b8): undefined reference to `napi_complete_done' drivers/crypto/caam/caamalg_qi2.o: In function `dpaa2_caam_remove': caamalg_qi2.c:(.text.unlikely+0x4e0): undefined reference to `napi_disable' caamalg_qi2.c:(.text.unlikely+0x4e8): undefined reference to `netif_napi_del' drivers/crypto/caam/caamalg_qi2.o: In function `dpaa2_dpseci_setup': caamalg_qi2.c:(.text.unlikely+0xc98): undefined reference to `netif_napi_add' From what I can tell, CONFIG_NETDEVICES is the correct dependency here, and adding it fixes the randconfig failures. Fixes: 8d818c105501 ("crypto: caam/qi2 - add DPAA2-CAAM driver") Signed-off-by: Arnd Bergmann Acked-by: Horia Geantă Signed-off-by: Herbert Xu commit cfa1d74495aa3cf240fd2b1fb45d43cc2a754a46 Author: Ard Biesheuvel Date: Wed Sep 26 11:51:59 2018 +0200 crypto: qat - move temp buffers off the stack Arnd reports that with Kees's latest VLA patches applied, the HMAC handling in the QAT driver uses a worst case estimate of 160 bytes for the SHA blocksize, allowing the compiler to determine the size of the stack frame at compile time and throw a warning: drivers/crypto/qat/qat_common/qat_algs.c: In function 'qat_alg_do_precomputes': drivers/crypto/qat/qat_common/qat_algs.c:257:1: error: the frame size of 1112 bytes is larger than 1024 bytes [-Werror=frame-larger-than=] Given that this worst case estimate is only 32 bytes larger than the actual block size of SHA-512, the use of a VLA here was hiding the excessive size of the stack frame from the compiler, and so we should try to move these buffers off the stack. So move the ipad/opad buffers and the various SHA state descriptors into the tfm context struct. Since qat_alg_do_precomputes() is only called in the context of a setkey() operation, this should be safe. Using SHA512_BLOCK_SIZE for the size of the ipad/opad buffers allows them to be used by SHA-1/SHA-256 as well. Reported-by: Arnd Bergmann Signed-off-by: Ard Biesheuvel Reviewed-by: Kees Cook Signed-off-by: Herbert Xu commit 5182f26f6f7437213adac8290ac746336c7709da Author: Wei Yongjun Date: Wed Sep 26 02:09:23 2018 +0000 crypto: ccp - Make function sev_get_firmware() static Fixes the following sparse warning: drivers/crypto/ccp/psp-dev.c:444:5: warning: symbol 'sev_get_firmware' was not declared. Should it be static? Fixes: e93720606efd ("crypto: ccp - Allow SEV firmware to be chosen based on Family and Model") Signed-off-by: Wei Yongjun Signed-off-by: Herbert Xu commit fae29f135ef4a86228d3ce13b61babf0d3031118 Author: Michael S. Tsirkin Date: Tue Sep 25 12:35:18 2018 -0400 hwrng: core - document the quality field quality field is currently documented as being 'per mill'. In fact the math involved is: add_hwgenerator_randomness((void *)rng_fillbuf, rc, rc * current_quality * 8 >> 10); thus the actual definition is "bits of entropy per 1024 bits of input". The current documentation seems to have confused multiple people in the past, let's fix the documentation to match code. An alternative is to change core to match driver expectations, replacing rc * current_quality * 8 >> 10 with rc * current_quality / 1000 but that has performance costs, so probably isn't a good option. Fixes: 0f734e6e768 ("hwrng: add per-device entropy derating") Reported-by: "Dr. David Alan Gilbert" Signed-off-by: Michael S. Tsirkin Signed-off-by: Herbert Xu commit 3512dcb4e6c64733871202c01f0ec6b5d84d32ac Author: Nathan Chancellor Date: Mon Sep 24 10:26:15 2018 -0700 crypto: ccp - Remove forward declaration Clang emits a warning about this construct: drivers/crypto/ccp/sp-platform.c:36:36: warning: tentative array definition assumed to have one element static const struct acpi_device_id sp_acpi_match[]; ^ 1 warning generated. Just remove the forward declarations and move the initializations up so that they can be used in sp_get_of_version and sp_get_acpi_version. Reported-by: Nick Desaulniers Signed-off-by: Nathan Chancellor Reviewed-by: Nick Desaulniers Acked-by: Gary R Hook Signed-off-by: Herbert Xu commit 944585a64f5e37d11ff274a905304b565a88e147 Author: Ard Biesheuvel Date: Mon Sep 24 14:48:16 2018 +0200 crypto: x86/aes-ni - remove special handling of AES in PCBC mode For historical reasons, the AES-NI based implementation of the PCBC chaining mode uses a special FPU chaining mode wrapper template to amortize the FPU start/stop overhead over multiple blocks. When this FPU wrapper was introduced, it supported widely used chaining modes such as XTS and CTR (as well as LRW), but currently, PCBC is the only remaining user. Since there are no known users of pcbc(aes) in the kernel, let's remove this special driver, and rely on the generic pcbc driver to encapsulate the AES-NI core cipher. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 7ac48a81980f9066e59e613b769d341df48cf4f1 Author: Rob Herring Date: Tue May 15 08:32:55 2018 -0500 dt-bindings: arm: alpine: Move CPU control related binding to cpu-enable-method/al,alpine-smp It is best practice to have 1 binding per file, so board level bindings should be separate for various misc SoC bindings. Move the Alpine CPU control to al,alpine-smp and we can also remove a cross reference. Cc: Tsahee Zidenberg Cc: Antoine Tenart Cc: Mark Rutland Cc: devicetree@vger.kernel.org Signed-off-by: Rob Herring commit 7ccc4f1887518a392752ad44c014fd6e1f526da7 Author: Konrad Djimeli Date: Thu Oct 4 18:01:32 2018 +0100 bpf: typo fix in Documentation/networking/af_xdp.rst Fix a simple typo: Completetion -> Completion Signed-off-by: Konrad Djimeli Acked-by: Björn Töpel Signed-off-by: Daniel Borkmann commit 5180fd913558825e910e255d879232c63aaa5c24 Author: Keith Busch Date: Tue Sep 18 17:58:37 2018 -0600 PCI: Uninline PCI bus accessors for better ftracing The PCI bus config accessors could be inlined into other accessor functions, which makes it so they can't be traced. Force them to never be inlined so that ftrace can hook into these functions. Signed-off-by: Keith Busch Signed-off-by: Bjorn Helgaas commit 59bbff3775c0951300f7b41345a54b999438f8d0 Author: Jeffrey Hugo Date: Thu Oct 4 09:20:06 2018 -0600 ACPI/PPTT: Handle architecturally unknown cache types The type of a cache might not be specified by architectural mechanisms (ie system registers), but its type might be specified in the PPTT. In this case, we should populate the type of the cache, rather than leave it undefined. This fixes the issue where the cacheinfo driver will not populate sysfs for such caches, resulting in the information missing from utilities like lstopo and lscpu, thus degrading the user experience. Fixes: 2bd00bcd73e5 (ACPI/PPTT: Add Processor Properties Topology Table parsing) Reported-by: Vijaya Kumar K Signed-off-by: Jeffrey Hugo Reviewed-by: Sudeep Holla Signed-off-by: Rafael J. Wysocki commit ca388e436f588a7fa88fcdefcb0b2c55aff6836c Author: Jeffrey Hugo Date: Thu Oct 4 09:20:05 2018 -0600 drivers: base: cacheinfo: Do not populate sysfs for unknown cache types If a cache has an unknown type because neither the hardware nor the firmware told us, an entry in the sysfs tree will be made, but the type file will not be present. lscpu depends on the type file being present for every entry, and will error out without printing system information if lscpu cannot open the type file. Presenting information about a cache without indicating its type is not useful, therefore if we hit a cache with an unknown type, stop populating sysfs so that userspace has the maximum amount of useful information. This addresses the following lscpu error, which prevents any output. lscpu: cannot open /sys/devices/system/cpu/cpu0/cache/index3/type: No such file or directory Suggested-by: Sudeep Holla Signed-off-by: Jeffrey Hugo Reviewed-by: Jeremy Linton Reviewed-by: Sudeep Holla Acked-by: Greg Kroah-Hartman Signed-off-by: Rafael J. Wysocki commit 315f28fa3a7bfbbb6233d800dffa327e87f96129 Author: Thomas Gleixner Date: Mon Sep 17 14:45:44 2018 +0200 x66/vdso: Add CLOCK_TAI support With the storage array in place it's now trivial to support CLOCK_TAI in the vdso. Extend the base time storage array and add the update code. Signed-off-by: Thomas Gleixner Tested-by: Matt Rickard Acked-by: Andy Lutomirski Cc: Peter Zijlstra Cc: Stephen Boyd Cc: John Stultz Cc: Florian Weimer Cc: "K. Y. Srinivasan" Cc: Vitaly Kuznetsov Cc: devel@linuxdriverproject.org Cc: virtualization@lists.linux-foundation.org Cc: Paolo Bonzini Cc: Arnd Bergmann Cc: Juergen Gross Link: https://lkml.kernel.org/r/20180917130707.823878601@linutronix.de commit 3e89bf35ebf59c12e8c1476f6681fae0ebdcb2a7 Author: Thomas Gleixner Date: Mon Sep 17 14:45:43 2018 +0200 x86/vdso: Move cycle_last handling into the caller Dereferencing gtod->cycle_last all over the place and foing the cycles < last comparison in the vclock read functions generates horrible code. Doing it at the call site is much better and gains a few cycles both for TSC and pvclock. Caveat: This adds the comparison to the hyperv vclock as well, but I have no way to test that. Signed-off-by: Thomas Gleixner Acked-by: Andy Lutomirski Cc: Peter Zijlstra Cc: Matt Rickard Cc: Stephen Boyd Cc: John Stultz Cc: Florian Weimer Cc: "K. Y. Srinivasan" Cc: Vitaly Kuznetsov Cc: devel@linuxdriverproject.org Cc: virtualization@lists.linux-foundation.org Cc: Paolo Bonzini Cc: Arnd Bergmann Cc: Juergen Gross Link: https://lkml.kernel.org/r/20180917130707.741440803@linutronix.de commit 4f72adc5068294268387a81a6bf91d9bb07ecc5c Author: Thomas Gleixner Date: Mon Sep 17 14:45:42 2018 +0200 x86/vdso: Simplify the invalid vclock case The code flow for the vclocks is convoluted as it requires the vclocks which can be invalidated separately from the vsyscall_gtod_data sequence to store the fact in a separate variable. That's inefficient. Restructure the code so the vclock readout returns cycles and the conversion to nanoseconds is handled at the call site. If the clock gets invalidated or vclock is already VCLOCK_NONE, return U64_MAX as the cycle value, which is invalid for all clocks and leave the sequence loop immediately in that case by calling the fallback function directly. This allows to remove the gettimeofday fallback as it now uses the clock_gettime() fallback and does the nanoseconds to microseconds conversion in the same way as it does when the vclock is functional. It does not make a difference whether the division by 1000 happens in the kernel fallback or in userspace. Generates way better code and gains a few cycles back. Signed-off-by: Thomas Gleixner Acked-by: Andy Lutomirski Cc: Peter Zijlstra Cc: Matt Rickard Cc: Stephen Boyd Cc: John Stultz Cc: Florian Weimer Cc: "K. Y. Srinivasan" Cc: Vitaly Kuznetsov Cc: devel@linuxdriverproject.org Cc: virtualization@lists.linux-foundation.org Cc: Paolo Bonzini Cc: Arnd Bergmann Cc: Juergen Gross Link: https://lkml.kernel.org/r/20180917130707.657928937@linutronix.de commit f3e839384164cf86faedd185b8f6024f73050f5e Author: Thomas Gleixner Date: Mon Sep 17 14:45:41 2018 +0200 x86/vdso: Replace the clockid switch case Now that the time getter functions use the clockid as index into the storage array for the base time access, the switch case can be replaced. - Check for clockid >= MAX_CLOCKS and for negative clockid (CPU/FD) first and call the fallback function right away. - After establishing that clockid is < MAX_CLOCKS, convert the clockid to a bitmask - Check for the supported high resolution and coarse functions by anding the bitmask of supported clocks and check whether a bit is set. This completely avoids jump tables, reduces the number of conditionals and makes the VDSO extensible for other clock ids. Signed-off-by: Thomas Gleixner Acked-by: Andy Lutomirski Cc: Peter Zijlstra Cc: Matt Rickard Cc: Stephen Boyd Cc: John Stultz Cc: Florian Weimer Cc: "K. Y. Srinivasan" Cc: Vitaly Kuznetsov Cc: devel@linuxdriverproject.org Cc: virtualization@lists.linux-foundation.org Cc: Paolo Bonzini Cc: Arnd Bergmann Cc: Juergen Gross Link: https://lkml.kernel.org/r/20180917130707.574315796@linutronix.de commit 6deec5bdef4518bd6524a47be9d621ff650d3ba4 Author: Thomas Gleixner Date: Mon Sep 17 14:45:40 2018 +0200 x86/vdso: Collapse coarse functions do_realtime_coarse() and do_monotonic_coarse() are now the same except for the storage array index. Hand the index in as an argument and collapse the functions. Signed-off-by: Thomas Gleixner Acked-by: Andy Lutomirski Cc: Peter Zijlstra Cc: Matt Rickard Cc: Stephen Boyd Cc: John Stultz Cc: Florian Weimer Cc: "K. Y. Srinivasan" Cc: Vitaly Kuznetsov Cc: devel@linuxdriverproject.org Cc: virtualization@lists.linux-foundation.org Cc: Paolo Bonzini Cc: Arnd Bergmann Cc: Juergen Gross Link: https://lkml.kernel.org/r/20180917130707.490733779@linutronix.de commit e9a62f76f93c6f28b6c7e908eb12e5f1313870a2 Author: Thomas Gleixner Date: Mon Sep 17 14:45:39 2018 +0200 x86/vdso: Collapse high resolution functions do_realtime() and do_monotonic() are now the same except for the storage array index. Hand the index in as an argument and collapse the functions. Signed-off-by: Thomas Gleixner Acked-by: Andy Lutomirski Cc: Peter Zijlstra Cc: Matt Rickard Cc: Stephen Boyd Cc: John Stultz Cc: Florian Weimer Cc: "K. Y. Srinivasan" Cc: Vitaly Kuznetsov Cc: devel@linuxdriverproject.org Cc: virtualization@lists.linux-foundation.org Cc: Paolo Bonzini Cc: Arnd Bergmann Cc: Juergen Gross Link: https://lkml.kernel.org/r/20180917130707.407955860@linutronix.de commit 49116f2081eeaf75316956705d46602b7eb735cc Author: Thomas Gleixner Date: Mon Sep 17 14:45:38 2018 +0200 x86/vdso: Introduce and use vgtod_ts It's desired to support more clocks in the VDSO, e.g. CLOCK_TAI. This results either in indirect calls due to the larger switch case, which then requires retpolines or when the compiler is forced to avoid jump tables it results in even more conditionals. To avoid both variants which are bad for performance the high resolution functions and the coarse grained functions will be collapsed into one for each. That requires to store the clock specific base time in an array. Introcude struct vgtod_ts for storage and convert the data store, the update function and the individual clock functions over to use it. The new storage does not longer use gtod_long_t for seconds depending on 32 or 64 bit compile because this needs to be the full 64bit value even for 32bit when a Y2038 function is added. No point in keeping the distinction alive in the internal representation. Signed-off-by: Thomas Gleixner Acked-by: Andy Lutomirski Cc: Peter Zijlstra Cc: Matt Rickard Cc: Stephen Boyd Cc: John Stultz Cc: Florian Weimer Cc: "K. Y. Srinivasan" Cc: Vitaly Kuznetsov Cc: devel@linuxdriverproject.org Cc: virtualization@lists.linux-foundation.org Cc: Paolo Bonzini Cc: Arnd Bergmann Cc: Juergen Gross Link: https://lkml.kernel.org/r/20180917130707.324679401@linutronix.de commit 77e9c678c54f2d9214796c1c5bd0c7c7ccedd932 Author: Thomas Gleixner Date: Mon Sep 17 14:45:37 2018 +0200 x86/vdso: Use unsigned int consistently for vsyscall_gtod_data:: Seq The sequence count in vgtod_data is unsigned int, but the call sites use unsigned long, which is a pointless exercise. Fix the call sites and replace 'unsigned' with unsinged 'int' while at it. Signed-off-by: Thomas Gleixner Acked-by: Andy Lutomirski Cc: Peter Zijlstra Cc: Matt Rickard Cc: Stephen Boyd Cc: John Stultz Cc: Florian Weimer Cc: "K. Y. Srinivasan" Cc: Vitaly Kuznetsov Cc: devel@linuxdriverproject.org Cc: virtualization@lists.linux-foundation.org Cc: Paolo Bonzini Cc: Arnd Bergmann Cc: Juergen Gross Link: https://lkml.kernel.org/r/20180917130707.236250416@linutronix.de commit a51e996d48ac9fa0a1260a3822a14f3d570d3be7 Author: Thomas Gleixner Date: Mon Sep 17 14:45:36 2018 +0200 x86/vdso: Enforce 64bit clocksource All VDSO clock sources are TSC based and use CLOCKSOURCE_MASK(64). There is no point in masking with all FF. Get rid of it and enforce the mask in the sanity checker. Signed-off-by: Thomas Gleixner Acked-by: Andy Lutomirski Cc: Peter Zijlstra Cc: Matt Rickard Cc: Stephen Boyd Cc: John Stultz Cc: Florian Weimer Cc: "K. Y. Srinivasan" Cc: Vitaly Kuznetsov Cc: devel@linuxdriverproject.org Cc: virtualization@lists.linux-foundation.org Cc: Paolo Bonzini Cc: Arnd Bergmann Cc: Juergen Gross Link: https://lkml.kernel.org/r/20180917130707.151963007@linutronix.de commit 2a21ad571b62440a4ad66d70b4b5d09c00029af4 Author: Thomas Gleixner Date: Mon Sep 17 14:45:35 2018 +0200 x86/time: Implement clocksource_arch_init() Runtime validate the VCLOCK_MODE in clocksource::archdata and disable VCLOCK if invalid, which disables the VDSO but keeps the system running. Signed-off-by: Thomas Gleixner Acked-by: Andy Lutomirski Cc: Peter Zijlstra Cc: Matt Rickard Cc: Stephen Boyd Cc: John Stultz Cc: Florian Weimer Cc: "K. Y. Srinivasan" Cc: Vitaly Kuznetsov Cc: devel@linuxdriverproject.org Cc: virtualization@lists.linux-foundation.org Cc: Paolo Bonzini Cc: Arnd Bergmann Cc: Juergen Gross Link: https://lkml.kernel.org/r/20180917130707.069167446@linutronix.de commit d67f34c19a679436dd2963b588015e119279e7a8 Author: Thomas Gleixner Date: Mon Sep 17 14:45:34 2018 +0200 clocksource: Provide clocksource_arch_init() Architectures have extra archdata in the clocksource, e.g. for VDSO support. There are no sanity checks or general initializations for this available. Add support for that. Signed-off-by: Thomas Gleixner Acked-by: Andy Lutomirski Acked-by: John Stultz Cc: Peter Zijlstra Cc: Matt Rickard Cc: Stephen Boyd Cc: Florian Weimer Cc: "K. Y. Srinivasan" Cc: Vitaly Kuznetsov Cc: devel@linuxdriverproject.org Cc: virtualization@lists.linux-foundation.org Cc: Paolo Bonzini Cc: Arnd Bergmann Cc: Juergen Gross Link: https://lkml.kernel.org/r/20180917130706.973042587@linutronix.de commit a97d97bac49da1b46b7e6a13806fc542430e2a80 Author: Hangbin Liu Date: Sat Sep 29 23:06:29 2018 +0800 geneve: allow to clear ttl inherit As Michal remaind, we should allow to clear ttl inherit. Then we will have three states: 1. set the flag, and do ttl inherit. 2. do not set the flag, use configured ttl value, or default ttl (0) if not set. 3. disable ttl inherit, use previous configured ttl value, or default ttl (0). Fixes: 52d0d404d39dd ("geneve: add ttl inherit support") CC: Michal Kubecek Signed-off-by: Hangbin Liu Signed-off-by: David S. Miller commit c369c8db15d51fa175d2ba85928f79d16af6b562 Author: Nicolas Huaman Date: Thu Oct 4 16:42:05 2018 +0200 ALSA: usb-audio: update quirk for B&W PX to remove microphone A quirk in snd-usb-audio was added to automate setting sample rate to 4800k and remove the previously exposed nonfunctional microphone for the Bowers & Wilkins PX: commit 240a8af929c7c57dcde28682725b29cf8474e8e5 https://lore.kernel.org/patchwork/patch/919689/ However the headphones where updated shortly after that to remove the unintentional microphone functionality. I guess because of this the headphones now crash when connecting them via USB while the quirk is active. Dmesg: snd-usb-audio: probe of 2-3:1.0 failed with error -22 usb 2-3: 2:1: cannot get min/max values for control 2 (id 2) This patch removes the microfone and allows the headphones to connect and work out of the box. It is based on the current mainline kernel and successfully applied an tested on my machine (4.18.10.arch1-1). Fixes: 240a8af929c7 ("ALSA: usb-audio: Add a quirck for B&W PX headphones") Signed-off-by: Nicolas Huaman Signed-off-by: Takashi Iwai commit 5a781ccbd19e4664babcbe4b4ead7aa2b9283d22 Author: Vinicius Costa Gomes Date: Fri Sep 28 17:59:43 2018 -0700 tc: Add support for configuring the taprio scheduler This traffic scheduler allows traffic classes states (transmission allowed/not allowed, in the simplest case) to be scheduled, according to a pre-generated time sequence. This is the basis of the IEEE 802.1Qbv specification. Example configuration: tc qdisc replace dev enp3s0 parent root handle 100 taprio \ num_tc 3 \ map 2 2 1 0 2 2 2 2 2 2 2 2 2 2 2 2 \ queues 1@0 1@1 2@2 \ base-time 1528743495910289987 \ sched-entry S 01 300000 \ sched-entry S 02 300000 \ sched-entry S 04 300000 \ clockid CLOCK_TAI The configuration format is similar to mqprio. The main difference is the presence of a schedule, built by multiple "sched-entry" definitions, each entry has the following format: sched-entry The only supported is "S", which means "SetGateStates", following the IEEE 802.1Qbv-2015 definition (Table 8-6). is a bitmask where each bit is a associated with a traffic class, so bit 0 (the least significant bit) being "on" means that traffic class 0 is "active" for that schedule entry. is a time duration in nanoseconds that specifies for how long that state defined by and should be held before moving to the next entry. This schedule is circular, that is, after the last entry is executed it starts from the first one, indefinitely. The other parameters can be defined as follows: - base-time: specifies the instant when the schedule starts, if 'base-time' is a time in the past, the schedule will start at base-time + (N * cycle-time) where N is the smallest integer so the resulting time is greater than "now", and "cycle-time" is the sum of all the intervals of the entries in the schedule; - clockid: specifies the reference clock to be used; The parameters should be similar to what the IEEE 802.1Q family of specification defines. Signed-off-by: Vinicius Costa Gomes Signed-off-by: David S. Miller commit fa295becc533234e4b1ea774caed2446a65ff695 Author: Gustavo A. R. Silva Date: Thu Oct 4 17:40:41 2018 +0200 PCI / ACPI: Mark expected switch fall-through In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 1472052 ("Missing break in switch") Signed-off-by: Gustavo A. R. Silva Signed-off-by: Bjorn Helgaas commit 34f8c58f47797efa25ba212001514ef31e153134 Merge: 8fa74e3c4920 53e233ea2fa9 Author: David S. Miller Date: Thu Oct 4 13:49:43 2018 -0700 Merge branch 'bnxt_en-devlink-param-updates' Vasundhara Volam says: ==================== bnxt_en: devlink param updates This patchset adds support for 3 generic and 1 driver-specific devlink parameters. Add documentation for these configuration parameters. Also, this patchset adds support to return proper error code if HWRM_NVM_GET/SET_VARIABLE commands return error code HWRM_ERR_CODE_RESOURCE_ACCESS_DENIED. v3->v4: -Remove extra definition of NVM_OFF_HW_TC_OFFLOAD from bnxt_devlink.h -Remove type information for generic parameters from devlink-params-bnxt.txt v2->v3: -Remove description of generic parameters from devlink-params-bnxt.txt v1->v2: -Remove hw_tc_offload parameter. -Update all patches with Cc of MAINTAINERS. -Add more description in commit message for device specific parameter. -Add a new Documentation/networking/devlink-params.txt with some generic devlink parameters information. -Add a new Documentation/networking/devlink-params-bnxt.txt with devlink parameters information that are supported by bnxt_en driver. ==================== Acked-by: Jiri Pirko Signed-off-by: David S. Miller commit 53e233ea2fa9fa7e2405e95070981f327d90e519 Author: Vasundhara Volam Date: Thu Oct 4 11:13:52 2018 +0530 devlink: Add Documentation/networking/devlink-params-bnxt.txt This patch adds a new file to add information about configuration parameters that are supported by bnxt_en driver via devlink. Cc: "David S. Miller" Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: Jiri Pirko Cc: Michael Chan Signed-off-by: Vasundhara Volam Signed-off-by: David S. Miller commit 9bff98bb35e1c9b36c7f5b77bde8a9d36e5ea708 Author: Vasundhara Volam Date: Thu Oct 4 11:13:51 2018 +0530 devlink: Add Documentation/networking/devlink-params.txt This patch adds a new file to add information about some of the generic configuration parameters set via devlink. Cc: "David S. Miller" Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: Jiri Pirko Cc: Michael Chan Signed-off-by: Vasundhara Volam Signed-off-by: David S. Miller commit 2dc0865e9ac7150e2d3b29afdc32d04b99f37902 Author: Vasundhara Volam Date: Thu Oct 4 11:13:50 2018 +0530 bnxt_en: Add a driver specific gre_ver_check devlink parameter. This patch adds following driver-specific permanent mode boolean parameter. gre_ver_check - Generic Routing Encapsulation(GRE) version check will be enabled in the device. If disabled, device skips version checking for GRE packets. Cc: Michael Chan Signed-off-by: Vasundhara Volam Signed-off-by: David S. Miller commit f399e8497826d35e4d83785cdff33ad779ffa62f Author: Vasundhara Volam Date: Thu Oct 4 11:13:49 2018 +0530 bnxt_en: Use msix_vec_per_pf_max and msix_vec_per_pf_min devlink params. This patch adds support for following generic permanent mode devlink parameters. They can be modified using devlink param commands. msix_vec_per_pf_max - This param sets the number of MSIX vectors that the device requests from the host on driver initialization. This value is set in the device which limits MSIX vectors per PF. msix_vec_per_pf_min - This param sets the number of minimal MSIX vectors required for the device initialization. Value 0 indicates a default value is selected. This value is set in the device which limits MSIX vectors per PF. Cc: Michael Chan Signed-off-by: Vasundhara Volam Signed-off-by: David S. Miller commit 3a1d52a54a6a4030b294e5f5732f0bfbae0e3815 Author: Vasundhara Volam Date: Thu Oct 4 11:13:48 2018 +0530 bnxt_en: return proper error when FW returns HWRM_ERR_CODE_RESOURCE_ACCESS_DENIED Return proper error code when Firmware returns HWRM_ERR_CODE_RESOURCE_ACCESS_DENIED for HWRM_NVM_GET/SET_VARIABLE commands. Cc: Michael Chan Signed-off-by: Vasundhara Volam Signed-off-by: David S. Miller commit 7d859234875d236a363101e90aaaf52a790f4590 Author: Vasundhara Volam Date: Thu Oct 4 11:13:47 2018 +0530 bnxt_en: Use ignore_ari devlink parameter This patch adds support for ignore_ari generic permanent mode devlink parameter. This parameter is disabled by default. It can be enabled using devlink param commands. ignore_ari - If enabled, device ignores ARI(Alternate Routing ID) capability, even when platforms has the support and creates same number of partitions when platform does not support ARI capability. Cc: Michael Chan Signed-off-by: Vasundhara Volam Signed-off-by: David S. Miller commit 16511789b9cc0a946611b1f9575b7a5b2b566301 Author: Vasundhara Volam Date: Thu Oct 4 11:13:46 2018 +0530 devlink: Add generic parameter msix_vec_per_pf_min msix_vec_per_pf_min - This param sets the number of minimal MSIX vectors required for the device initialization. This value is set in the device which limits MSIX vectors per PF. Cc: Jiri Pirko Cc: Michael Chan Signed-off-by: Vasundhara Volam Signed-off-by: David S. Miller commit f61cba4291c06c201b1b855a341b036caefdc2d6 Author: Vasundhara Volam Date: Thu Oct 4 11:13:45 2018 +0530 devlink: Add generic parameter msix_vec_per_pf_max msix_vec_per_pf_max - This param sets the number of MSIX vectors that the device requests from the host on driver initialization. This value is set in the device which is applicable per PF. Cc: Jiri Pirko Cc: Michael Chan Signed-off-by: Vasundhara Volam Signed-off-by: David S. Miller commit e3b5106162a3f73c7633ae6051fbf244584ab584 Author: Vasundhara Volam Date: Thu Oct 4 11:13:44 2018 +0530 devlink: Add generic parameter ignore_ari ignore_ari - Device ignores ARI(Alternate Routing ID) capability, even when platforms has the support and creates same number of partitions when platform does not support ARI capability. Cc: Jiri Pirko Cc: Michael Chan Signed-off-by: Vasundhara Volam Signed-off-by: David S. Miller commit cac0223c469027b57a2c58bd211241c05ddf0b4d Author: Jacopo Mondi Date: Thu Sep 13 09:59:51 2018 -0400 media: renesas-ceu: Use default mbus settings As the v4l2-fwnode now allows drivers to set defaults, and eventually override them by specifying properties in DTS, use defaults for the CEU driver. Also remove endpoint properties from the gr-peach-audiocamerashield as they match the defaults now specified in the driver code (h/vsync-active and bus-width) or are not relevant to the interface as they cannot be configured (pclk-sample). Signed-off-by: Jacopo Mondi Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 6a3da2e2a43aeb295f2d4541e7e7efb0b6349b3a Author: Jacopo Mondi Date: Thu Sep 13 09:59:50 2018 -0400 media: dt-bindings: media: renesas-ceu: Add more endpoint properties As the v4l2-fwnode framework now allows specifying defaults configurations, expand the description of the optional endpoint properties for the CEU interface to better explain which are their defaults values. Signed-off-by: Jacopo Mondi Reviewed-by: Rob Herring Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 59e7d5112799f32702f16fe388743c59e5513f08 Author: Jacopo Mondi Date: Thu Sep 13 09:59:49 2018 -0400 media: dt-bindings: media: renesas-ceu: Refer to video-interfaces.txt Refer to video-interfaces.txt when describing standard properties. Signed-off-by: Jacopo Mondi Reviewed-by: Rob Herring Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 4a2d1dc51bebeab3543c812c83e031a789e08e65 Author: Sakari Ailus Date: Mon Apr 16 16:56:51 2018 -0400 media: smiapp: Query the V4L2 endpoint for a specific bus type Instead of opportunistically trying to gather some information from the V4L2 endpoint, set the bus type and let the V4L2 fwnode framework figure out the configuration. Signed-off-by: Sakari Ailus Tested-by: Steve Longerbeam Tested-by: Jacopo Mondi Signed-off-by: Mauro Carvalho Chehab commit 2e6e39324aecd10dbf66819b137a5ee73298b931 Author: Sakari Ailus Date: Wed Jul 18 06:09:57 2018 -0400 media: v4l: fwnode: Update V4L2 fwnode endpoint parsing documentation The semantics of v4l2_fwnode_endpoint_parse() and v4l2_fwnode_endpoint_alloc_parse() have changed slightly: they now take the bus type from the user as well as a default configuration for the bus that shall reflect the DT binding defaults. Document this. Signed-off-by: Sakari Ailus Tested-by: Steve Longerbeam Tested-by: Jacopo Mondi Signed-off-by: Mauro Carvalho Chehab commit edc6d56c2e7ef33ed7391b73806100a76762c012 Author: Sakari Ailus Date: Mon Jul 23 09:09:28 2018 -0400 media: v4l: fwnode: Support parsing of CSI-2 C-PHY endpoints The V4L2 fwnode framework only parsed CSI-2 D-PHY endpoints while C-PHY support wasn't there. Also parse endpoints for media bus type V4L2_MBUS_CSI2_CPHY. Signed-off-by: Sakari Ailus Tested-by: Steve Longerbeam Tested-by: Jacopo Mondi Signed-off-by: Mauro Carvalho Chehab commit e7b2f5185e4cc44c11d01f0aac162837829b72f1 Author: Sakari Ailus Date: Thu Jul 19 11:22:49 2018 -0400 media: v4l: fwnode: Use V4L2 fwnode endpoint media bus type if set Use the given media bus type set by the caller. If none is given (i.e. the mbus type is V4L2_MBUS_UNKNOWN, or 0), fall back to the old behaviour. This is to obtain the information from the DT or try to guess the bus type. -ENXIO is returned if the caller sets the bus type but that does not match with what's in DT. Also return -ENXIO if bus type detection failed to separate this from the rest of the errors. Signed-off-by: Sakari Ailus Tested-by: Steve Longerbeam Tested-by: Jacopo Mondi Signed-off-by: Mauro Carvalho Chehab commit 3eb32c264d893156256c33bdfdfbd71dbb996b5b Author: Sakari Ailus Date: Tue Jan 2 10:44:34 2018 -0500 media: v4l: fwnode: Print bus type Print bus type either as set by the driver or as parsed from the bus-type property, as well as the guessed V4L2 media bus type. Signed-off-by: Sakari Ailus Tested-by: Steve Longerbeam Tested-by: Jacopo Mondi Signed-off-by: Mauro Carvalho Chehab commit e9be1b863e2c2948deb003df8edd9635b4611a8a Author: Sakari Ailus Date: Tue Jul 3 07:09:25 2018 -0400 media: v4l: fwnode: Use default parallel flags The caller may provide default flags for the endpoint. Change the configuration based on what is available through the fwnode property API. Signed-off-by: Sakari Ailus Tested-by: Steve Longerbeam Reviewed-by: Jacopo Mondi Tested-by: Jacopo Mondi Signed-off-by: Mauro Carvalho Chehab commit 26c1126c9b56f0d8b6b03d1c03f0cff3fdb3552b Author: Sakari Ailus Date: Tue Jul 17 12:17:02 2018 -0400 media: v4l: fwnode: Use media bus type for bus parser selection Use the media bus types instead of the fwnode bus types internally. This is the interface to the drivers as well, making the use of the fwnode bus types more localised to the V4L2 fwnode framework. Signed-off-by: Sakari Ailus Tested-by: Steve Longerbeam Tested-by: Jacopo Mondi Signed-off-by: Mauro Carvalho Chehab commit 9a5b4b76f3be34980571d11dce509a564c938318 Author: Sakari Ailus Date: Tue Jul 31 05:21:53 2018 -0400 media: v4l: fwnode: Only zero the struct if bus type is set to V4L2_MBUS_UNKNOWN In order to prepare for allowing drivers to set the defaults for a given bus, make zeroing the struct conditional based on detecting the bus. All callers now set the bus type to zero which allows only zeroing the remaining bus union. Signed-off-by: Sakari Ailus Tested-by: Steve Longerbeam Tested-by: Jacopo Mondi Signed-off-by: Mauro Carvalho Chehab commit 60359a28d59278e2a9e7558c15dc7be518d9beb8 Author: Sakari Ailus Date: Tue Jul 31 05:15:50 2018 -0400 media: v4l: fwnode: Initialise the V4L2 fwnode endpoints to zero Initialise the V4L2 fwnode endpoints to zero in all drivers using v4l2_fwnode_endpoint_parse(). This prepares for setting default endpoint flags as well as the bus type. Setting bus type to zero will continue to guess the bus among the guessable set (parallel, Bt.656 and CSI-2 D-PHY). Signed-off-by: Sakari Ailus Tested-by: Steve Longerbeam Tested-by: Jacopo Mondi Signed-off-by: Mauro Carvalho Chehab commit 32593dd0380929a871f49e1c5a401b2c8aff2823 Author: Sakari Ailus Date: Wed Jul 18 09:20:34 2018 -0400 media: v4l: fwnode: Parse the graph endpoint as last Parsing the graph endpoint is always successful; therefore parse it as last. Signed-off-by: Sakari Ailus Tested-by: Steve Longerbeam Tested-by: Jacopo Mondi Signed-off-by: Mauro Carvalho Chehab commit b4357d21d6744b76f8ab1dcaaa32d3bedb4ba565 Author: Sakari Ailus Date: Fri Jul 20 09:57:48 2018 -0400 media: v4l: fwnode: Support default CSI-2 lane mapping for drivers Most hardware doesn't support re-mapping of the CSI-2 lanes. Especially sensor drivers have a default number of lanes. Instead of requiring the caller (the driver) to provide such a unit mapping, provide one if no mapping is configured. Signed-off-by: Sakari Ailus Tested-by: Steve Longerbeam Tested-by: Jacopo Mondi Signed-off-by: Mauro Carvalho Chehab commit c2475aeb12d6fab3c1f9987df0fe1708cf587bf2 Author: Sakari Ailus Date: Fri Jul 20 06:14:14 2018 -0400 media: v4l: fwnode: Support driver-defined lane mapping defaults Make use of the default CSI-2 lane mapping from caller-passed configuration. Signed-off-by: Sakari Ailus Tested-by: Steve Longerbeam Tested-by: Jacopo Mondi Signed-off-by: Mauro Carvalho Chehab commit af11a74a04a57dfc050b48b67cc1e7f5b71e6a95 Author: Sakari Ailus Date: Tue Jul 3 07:06:20 2018 -0400 media: v4l: fwnode: Only assign configuration if there is no error Only assign endpoint configuration if the endpoint is parsed successfully. Signed-off-by: Sakari Ailus Tested-by: Steve Longerbeam Tested-by: Jacopo Mondi Signed-off-by: Mauro Carvalho Chehab commit 276565ed7e48453e16ff6b95774bd70843ec4eb1 Author: Sakari Ailus Date: Wed Jul 18 09:33:45 2018 -0400 media: v4l: fwnode: Read lane inversion information despite lane numbering Read the lane inversion independently of whether the "data-lanes" property exists. This makes sense since the caller may pass the number of lanes as the default configuration while the lane inversion configuration may still be available in firmware. Signed-off-by: Sakari Ailus Tested-by: Steve Longerbeam Tested-by: Jacopo Mondi Signed-off-by: Mauro Carvalho Chehab commit 175b18b82df8d1f475d6fc55fd0d2d4787824b08 Author: Sakari Ailus Date: Tue Jan 2 08:14:30 2018 -0500 media: v4l: fwnode: Make use of newly specified bus types Add support for parsing CSI-2 D-PHY, parallel or Bt.656 bus explicitly. Signed-off-by: Sakari Ailus Tested-by: Steve Longerbeam Reviewed-by: Jacopo Mondi Tested-by: Jacopo Mondi Signed-off-by: Mauro Carvalho Chehab commit 2835b5b15370ff1ed7671fd42e15c6e1ac0d1ebc Author: Sakari Ailus Date: Tue Jul 31 06:43:14 2018 -0400 media: v4l: fwnode: Detect bus type correctly In case the device supports multiple video bus types on an endpoint, the V4L2 fwnode framework attempts to detect the type based on the available information. This wasn't working really well, and sometimes could lead to the V4L2 fwnode endpoint struct as being mishandled between the bus types. Default to Bt.656 if no properties suggesting a bus type are found. Signed-off-by: Sakari Ailus Tested-by: Steve Longerbeam Tested-by: Jacopo Mondi Signed-off-by: Mauro Carvalho Chehab commit 6970d37cc97d77189d775fd16d47b2ac87d0e757 Author: Sakari Ailus Date: Sat Jun 2 12:19:35 2018 -0400 media: v4l: fwnode: Let the caller provide V4L2 fwnode endpoint Instead of allocating the V4L2 fwnode endpoint in v4l2_fwnode_endpoint_alloc_parse, let the caller to do this. This allows setting default parameters for the endpoint which is a very common need for drivers. Signed-off-by: Sakari Ailus Tested-by: Steve Longerbeam Tested-by: Jacopo Mondi Signed-off-by: Mauro Carvalho Chehab commit 2d95e7ed07ed29715a801a3d33b2ad2a6fb26ee3 Author: Sakari Ailus Date: Tue Jul 3 17:19:27 2018 -0400 media: v4l: mediabus: Recognise CSI-2 D-PHY and C-PHY The CSI-2 bus may use either D-PHY or C-PHY. Make this visible in media bus enum. Signed-off-by: Sakari Ailus Tested-by: Steve Longerbeam Tested-by: Jacopo Mondi Signed-off-by: Mauro Carvalho Chehab commit bf63856a48619453e0fdf093918e956e7896faca Author: Sakari Ailus Date: Tue Jul 3 17:40:37 2018 -0400 media: v4l: fwnode: Add definitions for CSI-2 D-PHY, parallel and Bt.656 busses Add definitions corresponding to DT bindings to the CSI-2 D-PHY, parallel and Bt.656 busses. Signed-off-by: Sakari Ailus Tested-by: Steve Longerbeam Tested-by: Jacopo Mondi Signed-off-by: Mauro Carvalho Chehab commit 7e84dd0b15e66a6962aae08c1e2c93075ef5c21d Author: Sakari Ailus Date: Tue Jan 2 08:12:35 2018 -0500 media: dt-bindings: media: Specify bus type for MIPI D-PHY, others, explicitly Allow specifying the bus type explicitly for MIPI D-PHY, parallel and Bt.656 busses. This is useful for devices that can make use of different bus types. There are CSI-2 transmitters and receivers but the PHY selection needs to be made between C-PHY and D-PHY; many devices also support parallel and Bt.656 interfaces but the means to pass that information to software wasn't there. Autodetection (value 0) is removed as an option as the property could be simply omitted in that case. Signed-off-by: Sakari Ailus Reviewed-by: Rob Herring Acked-by: Jacopo Mondi Signed-off-by: Mauro Carvalho Chehab commit d486532613a7627b009a1b5fb4260d38a08e08a7 Author: Sakari Ailus Date: Fri Jul 20 05:04:29 2018 -0400 media: v4l: fwnode: The CSI-2 clock is continuous if it's not non-continuous The continuous clock flag was only set if there was a clock or data lanes. This isn't needed as such a configuration is invalid to begin with. Always set the continuous clock flag if the non-continuous property is not found. Signed-off-by: Sakari Ailus Tested-by: Steve Longerbeam Tested-by: Jacopo Mondi Signed-off-by: Mauro Carvalho Chehab commit 106ee387f622bb5d32da0444f038ad4a8c48e228 Author: Sakari Ailus Date: Thu Dec 21 07:11:19 2017 -0500 media: v4l: fwnode: Use fwnode_graph_for_each_endpoint Use fwnode_graph_for_each_endpoint iterator for better readability. Signed-off-by: Sakari Ailus Reviewed-by: Niklas Söderlund Tested-by: Steve Longerbeam Tested-by: Jacopo Mondi Signed-off-by: Mauro Carvalho Chehab commit c8677aafb8299ff3110bfb6f4848081caf598b98 Author: Sakari Ailus Date: Mon Dec 4 16:25:06 2017 -0500 media: v4l: fwnode: Add debug prints for V4L2 endpoint property parsing Print debug info as standard V4L2 endpoint are parsed. Signed-off-by: Sakari Ailus Reviewed-by: Niklas Söderlund Tested-by: Steve Longerbeam Tested-by: Jacopo Mondi Signed-off-by: Mauro Carvalho Chehab commit c4a570179cf4eb19a75ee27debd541d2f442da44 Author: Steve Longerbeam Date: Sat Sep 29 15:54:20 2018 -0400 media: v4l2-subdev.rst: Update doc regarding subdev descriptors Update the doc to describe the new method of adding subdevice descriptors to async notifiers. Signed-off-by: Steve Longerbeam Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 66beb323e4a0cef0e1ee1277b609e3e242490bf1 Author: Steve Longerbeam Date: Sat Sep 29 15:54:19 2018 -0400 media: v4l2: async: Remove notifier subdevs array All platform drivers have been converted to use v4l2_async_notifier_add_subdev(), in place of adding asd's to the notifier subdevs array. So the subdevs array can now be removed from struct v4l2_async_notifier, and remove the backward compatibility support for that array in v4l2-async.c. Signed-off-by: Steve Longerbeam Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit d079f94c90469f413920b9f2b201537fac2ceb06 Author: Steve Longerbeam Date: Sat Sep 29 15:54:18 2018 -0400 media: platform: Switch to v4l2_async_notifier_add_subdev Switch all media platform drivers to call v4l2_async_notifier_add_subdev() to add asd's to a notifier, in place of referencing the notifier->subdevs[] array. These drivers also must now call v4l2_async_notifier_init() before adding asd's to their notifiers. There may still be cases where a platform driver maintains a list of asd's that is a duplicate of the notifier asd_list, in which case its possible the platform driver list can be removed, and can reference the notifier asd_list instead. One example of where a duplicate list has been removed in this patch is xilinx-vipp.c. If there are such cases remaining, those drivers should be optimized to remove the duplicate platform driver asd lists. None of the changes to the platform drivers in this patch have been tested. Verify that the async subdevices needed by the platform are bound at load time, and that the driver unloads and reloads correctly with no memory leaking of asd objects. Suggested-by: Sakari Ailus Signed-off-by: Steve Longerbeam Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit d5099f81803fc7a7831aa893097fab3cf8d15d3e Author: Steve Longerbeam Date: Sat Sep 29 15:54:17 2018 -0400 media: staging/imx: TODO: Remove one assumption about OF graph parsing The move to subdev notifiers fixes one assumption of OF graph parsing. If a subdevice has non-video related ports, the subdev driver knows not to follow those ports when adding remote devices to its subdev notifier. Signed-off-by: Steve Longerbeam Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit b803cd35983329ecefc5139457e7205450d786b5 Author: Steve Longerbeam Date: Sat Sep 29 15:54:16 2018 -0400 media: staging/imx: Switch to v4l2_async_notifier_add_*_subdev Switch to v4l2_async_notifier_add_*_subdev() when adding async subdevs to the imx-media root notifier. This removes the need to check for an already added asd, since v4l2_async_notifier_add_*_subdev() does this check. Also no need to allocate a subdevs array when registering the root notifier, or keeping an internal master asd_list, since this is moved to the notifier's asd_list. Signed-off-by: Steve Longerbeam Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 11e005f20f7717be13d6c730eebb34055c0d9760 Author: Steve Longerbeam Date: Sat Sep 29 15:54:15 2018 -0400 media: staging/imx: Rename root notifier Rename the imx-media root async notifier from "subdev_notifier" to simply "notifier", so as not to confuse it with true subdev notifiers. No functional changes. Signed-off-by: Steve Longerbeam Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 1488c3cf4f3ceaad1bad63898b4b4186f912f216 Author: Steve Longerbeam Date: Sat Sep 29 15:54:14 2018 -0400 media: staging/imx: Loop through all registered subdevs for media links The root imx-media notifier no longer sees all bound subdevices because some of them will be bound to subdev notifiers. So imx_media_create_links() now needs to loop through all subdevices registered with the v4l2-device, not just the ones in the root notifier's done list. This should be safe because imx_media_create_of_links() checks if a fwnode link already exists before creating. Signed-off-by: Steve Longerbeam Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 21711787045d8d39c01c6bb072c03ef02a10d3a4 Author: Steve Longerbeam Date: Sat Sep 29 15:54:13 2018 -0400 media: staging/imx: of: Remove recursive graph walk After moving to subdev notifiers, it's no longer necessary to recursively walk the OF graph, because the subdev notifiers will discover and add devices from the graph for us. So the recursive of_parse_subdev() function is gone, replaced with of_add_csi() which adds only the CSI port fwnodes to the imx-media root notifier. Signed-off-by: Steve Longerbeam Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit c5040f1b71d95b948bb20500cb4634d8293c9c61 Author: Steve Longerbeam Date: Sat Sep 29 15:54:12 2018 -0400 media: imx: mipi csi-2: Register a subdev notifier Parse neighbor remote devices on the MIPI CSI-2 input port, add them to a subdev notifier, and register the subdev notifier for the MIPI CSI-2 receiver, by calling v4l2_async_register_fwnode_subdev(). csi2_parse_endpoints() is modified to be the parse_endpoint callback. Signed-off-by: Steve Longerbeam Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit c893500a16baf51f17327a4af9a4ab686251d8ac Author: Steve Longerbeam Date: Sat Sep 29 15:54:11 2018 -0400 media: imx: csi: Register a subdev notifier Parse neighbor remote devices on the CSI port, and add them to a subdev notifier, by calling v4l2_async_notifier_parse_fwnode_endpoints_by_port() using the CSI's port id. And register the subdev notifier for the CSI. Signed-off-by: Steve Longerbeam Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit c5afc789bf306913c03b2cd6523d33e9d1f832cd Author: Steve Longerbeam Date: Sat Sep 29 15:54:10 2018 -0400 media: platform: video-mux: Register a subdev notifier Parse neighbor remote devices on the video muxes input ports, add them to a subdev notifier, and register the subdev notifier for the video mux, by calling v4l2_async_register_fwnode_subdev(). Signed-off-by: Steve Longerbeam Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 1634f0eded87d1f150e823fa56cd782ea0775eb2 Author: Steve Longerbeam Date: Sat Sep 29 15:54:09 2018 -0400 media: v4l2-fwnode: Add a convenience function for registering subdevs with notifiers Adds v4l2_async_register_fwnode_subdev(), which is a convenience function for parsing a sub-device's fwnode port endpoints for connected remote sub-devices, registering a sub-device notifier, and then registering the sub-device itself. Signed-off-by: Steve Longerbeam Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit eae2aed1eab9bf08146403ac702517d2e4fe932e Author: Steve Longerbeam Date: Sat Sep 29 15:54:08 2018 -0400 media: v4l2-fwnode: Switch to v4l2_async_notifier_add_subdev The fwnode endpoint and reference parsing functions in v4l2-fwnode.c are modified to make use of v4l2_async_notifier_add_subdev(). As a result the notifier->subdevs array is no longer allocated or re-allocated, and by extension the max_subdevs value is also no longer needed. Callers of the fwnode endpoint and reference parsing functions must now first initialize the notifier with a call to v4l2_async_notifier_init(). This includes the function v4l2_async_register_subdev_sensor_common(), and the intel-ipu3, omap3isp, and rcar-vin drivers. Since the notifier->subdevs array is no longer allocated in the fwnode endpoint and reference parsing functions, the callers of those functions must never reference that array, since it is now NULL. Of the drivers that make use of the fwnode/ref parsing, only the intel-ipu3 driver references the ->subdevs[] array, (in the notifier completion callback), so that driver has been modified to iterate through the notifier->asd_list instead. Signed-off-by: Steve Longerbeam Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit d153135e93a50cdb6f1b52e238909e9965b56056 Author: Michael Pobega Date: Thu Oct 4 14:58:21 2018 -0400 ALSA: hda/sigmatel - Disable automute for Elo VuPoint The Elo VuPoint 15MX has two headphone jacks of which neither work by default. Disabling automute allows ALSA to work normally with the speakers & left headphone jack. Future pin configuration changes may be required in the future to get the right headphone jack working in tandem. Signed-off-by: Michael Pobega Signed-off-by: Takashi Iwai commit 23989b43f1079fdb90a621cc554a516b3a012981 Author: Steve Longerbeam Date: Sat Sep 29 15:54:07 2018 -0400 media: v4l2: async: Add convenience functions to allocate and add asd's Add these convenience functions, which allocate an asd of match type fwnode, i2c, or device-name, of size asd_struct_size, and then adds them to the notifier asd_list. Signed-off-by: Steve Longerbeam Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit b47d7ff1ae8d40eef92abbe718316c8a56558744 Author: Steve Longerbeam Date: Sat Sep 29 15:54:06 2018 -0400 media: v4l2: async: Add v4l2_async_notifier_add_subdev v4l2_async_notifier_add_subdev() adds an asd to the notifier. It checks that no other equivalent asd's have already been added to this notifier's asd list, or to other registered notifier's waiting or done lists, and increments num_subdevs. v4l2_async_notifier_add_subdev() does not make use of the notifier subdevs array, otherwise it would have to re-allocate the array every time the function was called. In place of the subdevs array, the function adds the newly allocated asd to a new master asd_list. The function will return error with a WARN() if it is ever called with the subdevs array allocated. Drivers are now required to call a v4l2_async_notifier_init(), before the first call to v4l2_async_notifier_add_subdev(), in order to initialize the asd_list. In v4l2_async_notifier_has_async_subdev(), __v4l2_async_notifier_register(), and v4l2_async_notifier_cleanup(), maintain backward compatibility with the subdevs array, by alternatively operate on the subdevs array or a non-empty notifier->asd_list. Signed-off-by: Steve Longerbeam Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 4355151de47c2b4bc72c026ee743bd9ed7f71ba3 Merge: 5d5a0ab1a791 92f687f40ee5 Author: Rob Herring Date: Thu Oct 4 14:16:15 2018 -0500 Merge branch 'all-dtbs' into dt/next commit 5d5a0ab1a7918fce5ca5c0fb1871a3e2000f85de Author: Rob Herring Date: Mon Oct 1 10:54:51 2018 -0500 of: Fix property name in of_node_get_device_type Commit 0413bedabc88 ("of: Add device_type access helper functions") added a new helper not yet used in preparation for some treewide clean up of accesses to 'device_type' properties. Unfortunately, there's an error and 'type' was used for the property name. Fix this. Fixes: 0413bedabc88 ("of: Add device_type access helper functions") Cc: Frank Rowand Signed-off-by: Rob Herring commit dc37a25252717aab7efa4802dc1a1430392b145a Author: Rob Herring Date: Mon Aug 27 20:02:33 2018 -0500 soc: 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: Li Yang Cc: David Brown Cc: Jonathan Hunter Cc: Santosh Shilimkar Cc: linuxppc-dev@lists.ozlabs.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-soc@vger.kernel.org Acked-by: Thierry Reding Acked-by: Heiko Stuebner Acked-by: Qiang Zhao Acked-by: Andy Gross Signed-off-by: Rob Herring commit 75afbfc1156c8f7de5717a8d278a4da0d98a8532 Author: Rob Herring Date: Mon Aug 27 19:54:19 2018 -0500 firmware: 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: Sudeep Holla Signed-off-by: Rob Herring commit d9ca1c990a7ffee7e68ab8d64efacd6c73103203 Author: Benjamin Tissoires Date: Thu Oct 4 14:34:30 2018 +0200 Input: reserve 2 events code because of HID Prior to commit 190d7f02ce8e ("HID: input: do not increment usages when a duplicate is found") from the v4.18 kernel, HID used to shift the event codes if a duplicate usage was found. This ended up in a situation where a device would export a ton of ABS_MISC+n event codes, or a ton of REL_MISC+n event codes. This is now fixed, however userspace needs to detect those situation. Fortunately, ABS_MT_SLOT-1 (ABS_MISC+6) was never assigned a code, and so libinput can detect fake multitouch devices from genuine ones by checking if ABS_MT_SLOT-1 is set. Now that we have REL_WHEEL_HI_RES, libinput won't be able to differentiate true high res mice from some other device in a pre-v4.18 kernel. Set in stone that the ABS_MISC+6 and REL_MISC+1 are reserved and should not be used so userspace can properly work around those old kernels. Signed-off-by: Benjamin Tissoires Acked-by: Dmitry Torokhov Signed-off-by: Jiri Kosina commit a6e7003c35e185b0fe4245bdfd086021de9ec305 Author: Steve Longerbeam Date: Sat Sep 29 15:54:05 2018 -0400 media: v4l2: async: Allow searching for asd of any type Generalize v4l2_async_notifier_fwnode_has_async_subdev() to allow searching for any type of async subdev, not just fwnodes. Rename to v4l2_async_notifier_has_async_subdev() and pass it an asd pointer. Signed-off-by: Steve Longerbeam Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 4382f37b78e02bb9a9d68cf0aef7928f0aaeff73 Author: Steve Longerbeam Date: Sat Sep 29 15:54:04 2018 -0400 media: v4l2-fwnode: ignore endpoints that have no remote port parent Documentation/devicetree/bindings/media/video-interfaces.txt states that the 'remote-endpoint' property is optional. So v4l2_async_notifier_fwnode_parse_endpoint() should not return error if the endpoint has no remote port parent. Just ignore the endpoint, skip adding an asd to the notifier and return 0. __v4l2_async_notifier_parse_fwnode_endpoints() will then continue parsing the remaining port endpoints of the device. Signed-off-by: Steve Longerbeam Acked-by: Hans Verkuil Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit e7898055ad4034d235a92abf3acd79a346a183c4 Author: Niklas Söderlund Date: Mon Sep 17 21:45:09 2018 -0400 media: i2c: adv748x: fix typo in comment for TXB CSI-2 transmitter power down Fix copy-and-paste error in comment for TXB CSI-2 transmitter power down sequence. Signed-off-by: Niklas Söderlund Reviewed-by: Laurent Pinchart Signed-off-by: Kieran Bingham Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 1e2cb06f2ae7011b1bb8a9e74fb0884ae3b07a59 Author: Jacopo Mondi Date: Mon Sep 17 07:30:57 2018 -0400 media: i2c: adv748x: Register only enabled inputs The adv748x assumes input endpoints are always enabled, and registers a subdevice for each of them when the corresponding output subdevice is registered. Fix this by conditionally registering the input subdevice only if it is actually described in device tree. Tested-by: Laurent Pinchart Signed-off-by: Jacopo Mondi Signed-off-by: Kieran Bingham Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit a7f9d21e9e96dea2e41d82e08ea2a55afdadd741 Author: Jacopo Mondi Date: Mon Sep 17 07:30:56 2018 -0400 media: i2c: adv748x: Conditionally enable only CSI-2 outputs The ADV748x has two CSI-2 output port and one TTL input/output port for digital video reception/transmission. The TTL digital pad is unconditionally enabled during the device reset even if not used. Same goes for the TXA and TXB CSI-2 outputs, which are enabled by the initial settings blob programmed into the chip. In order to improve power saving, do not enable unused output interfaces: keep TTL output disabled, as it is not used, and drop CSI-2 output enabling from the initial settings list, as they get conditionally enabled later. Tested-by: Laurent Pinchart Signed-off-by: Jacopo Mondi Signed-off-by: Kieran Bingham Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 6bc3ea7a61897b5e4dbb937b75febb8d9c06b8a5 Author: Jacopo Mondi Date: Mon Sep 17 07:30:55 2018 -0400 media: i2c: adv748x: Handle TX[A|B] power management As the driver is now allowed to probe with a single output endpoint, power management routines shall now take into account the case a CSI-2 TX is not enabled. Unify the adv748x_tx_power() routine to handle transparently TXA and TXB, and enable the CSI-2 outputs conditionally. Tested-by: Laurent Pinchart Signed-off-by: Jacopo Mondi Signed-off-by: Kieran Bingham Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit eccf442ce156ec2b4e06b1239d5fdcb0c732f63f Author: Jacopo Mondi Date: Mon Sep 17 07:30:54 2018 -0400 media: i2c: adv748x: Support probing a single output Currently the adv748x driver will fail to probe unless both of its output endpoints (TXA and TXB) are connected. Make the driver support probing provided that there is at least one input, and one output connected and protect the clean-up function from accessing un-initialized fields. Following patches will fix other uses of un-initialized TXs in the driver, such as power management functions. Tested-by: Laurent Pinchart Signed-off-by: Jacopo Mondi Signed-off-by: Kieran Bingham Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit bf7464a7a81717518b0fc46b1af6dc9d9bf4ec90 Author: Benjamin Gaignard Date: Mon Oct 1 03:46:40 2018 -0400 media: MAINTAINERS: fix reference to STI CEC driver STI CEC driver has move from staging directory to media/platform/sti/cec/ Signed-off-by: Benjamin Gaignard Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 1efbdbf668a5532f4250c3f7d820a73ba85baa3a Author: Colin Ian King Date: Sat Sep 29 07:25:39 2018 -0400 media: zoran: fix spelling mistake "queing" -> "queuing" Trivial fix to spelling mistake in kernel warning message Signed-off-by: Colin Ian King Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 4e673ed4e2bfac00b3c3043a84e007874c17c84d Author: Niklas Söderlund Date: Wed Sep 26 17:40:06 2018 -0400 media: rcar-vin: fix redeclaration of symbol When adding support for parallel subdev for Gen3 it was missed that the symbol 'i' in rvin_group_link_notify() was already declared, remove the dupe as it's only used as a loop variable this have no functional change. This fixes warning: rcar-core.c:117:52: originally declared here rcar-core.c:173:30: warning: symbol 'i' shadows an earlier one Fixes: 1284605dc821cebd ("media: rcar-vin: Handle parallel subdev in link_notify") Signed-off-by: Niklas Söderlund Acked-by: Jacopo Mondi Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit a41d203a1d34a7546c57d8d449bc834cee4d6653 Author: Arnd Bergmann Date: Wed Sep 26 09:01:26 2018 -0400 media: imx-pxp: include linux/interrupt.h The newly added driver fails to build in some configurations due to a missing header inclusion: drivers/media/platform/imx-pxp.c:988:8: error: unknown type name 'irqreturn_t' static irqreturn_t pxp_irq_handler(int irq, void *dev_id) ^~~~~~~~~~~ drivers/media/platform/imx-pxp.c: In function 'pxp_irq_handler': drivers/media/platform/imx-pxp.c:1012:9: error: 'IRQ_HANDLED' undeclared (first use in this function); did you mean 'IRQ_MODE'? return IRQ_HANDLED; ^~~~~~~~~~~ IRQ_MODE drivers/media/platform/imx-pxp.c:1012:9: note: each undeclared identifier is reported only once for each function it appears in drivers/media/platform/imx-pxp.c: In function 'pxp_probe': drivers/media/platform/imx-pxp.c:1660:8: error: implicit declaration of function 'devm_request_threaded_irq'; did you mean 'devm_request_region'? [-Werror=implicit-function-declaration] ret = devm_request_threaded_irq(&pdev->dev, irq, NULL, pxp_irq_handler, ^~~~~~~~~~~~~~~~~~~~~~~~~ devm_request_region drivers/media/platform/imx-pxp.c:1661:4: error: 'IRQF_ONESHOT' undeclared (first use in this function); did you mean 'SA_ONESHOT'? IRQF_ONESHOT, dev_name(&pdev->dev), dev); Fixes: 51abcf7fdb70 ("media: imx-pxp: add i.MX Pixel Pipeline driver") Signed-off-by: Arnd Bergmann Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit b88ff59e7996974dec7975a7beba1418b48bcabf Author: Hugues Fruchet Date: Mon Sep 24 08:54:59 2018 -0400 media: stm32-dcmi: only enable IT frame on JPEG capture Only enable IT frame on JPEG capture, this saves some CPU interruptions and processing on all the other cases. Signed-off-by: Hugues Fruchet Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 44d7f1a77d8c84f8e42789b5475b74ae0e6d4758 Author: Nathan Chancellor Date: Fri Sep 21 06:00:45 2018 -0400 media: pxa_camera: Fix check for pdev->dev.of_node Clang warns that the address of a pointer will always evaluated as true in a boolean context. drivers/media/platform/pxa_camera.c:2400:17: warning: address of 'pdev->dev.of_node' will always evaluate to 'true' [-Wpointer-bool-conversion] if (&pdev->dev.of_node && !pcdev->pdata) { ~~~~~~~~~~^~~~~~~ ~~ 1 warning generated. Judging from the rest of the kernel, it seems like this was an error and just the value of of_node should be checked rather than the address. Reported-by: Nick Desaulniers Signed-off-by: Nathan Chancellor Reviewed-by: Nick Desaulniers Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit ab8ff650e57dc118c46e4c16921c5dbed9e95baf Author: zhong jiang Date: Thu Sep 20 23:30:20 2018 -0400 media: qcom: remove duplicated include file We include device.h twice in camss.h. It's unnecessary. hence just remove it. Signed-off-by: zhong jiang Acked-by: Todor Tomov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit c525350f6ed0014dd09447792ce1b8a8e30e6089 Author: Philipp Zabel Date: Tue Sep 18 05:42:31 2018 -0400 media: imx: use well defined 32-bit RGB pixel format The documentation in Documentation/media/uapi/v4l/pixfmt-packed-rgb.rst tells us that the V4L2_PIX_FMT_RGB32 format is deprecated and must not be used by new drivers. Replace it with V4L2_PIX_FMT_XRGB32. Signed-off-by: Philipp Zabel Acked-by: Steve Longerbeam Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit cd41986e76a2f227f79a54baf880e1cc4aac98cd Author: Dan Carpenter Date: Mon Sep 17 09:56:22 2018 -0400 media: VPU: mediatek: don't pass an unused parameter The load_requested_vpu() function returns a freed vpu_fw pointer. It's not used so it doesn't cause any problems, but Smatch complains about it: drivers/media/platform/mtk-vpu/mtk_vpu.c:578 vpu_load_firmware() warn: passing freed memory 'vpu_fw' We can clean up the code a bit and silence the static checker warning by not passing the parameter at all. Signed-off-by: Dan Carpenter Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 1611c686c1245408c3ddb451b2a5fff1dc088d6e Author: Hans Verkuil Date: Mon Sep 17 07:37:18 2018 -0400 media: vidioc-dqevent.rst: clarify V4L2_EVENT_SRC_CH_RESOLUTION Clarify that when you receive V4L2_EVENT_SOURCE_CHANGE with flag V4L2_EVENT_SRC_CH_RESOLUTION set, and the new resolution appears identical to the old resolution, then you still must restart the streaming I/O. Signed-off-by: Hans Verkuil Acked-by: Sakari Ailus Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 85e4af0a7ae2f146769b7475ae531bf8a3f3afb4 Author: Matthias Reichl Date: Tue Aug 28 09:49:42 2018 -0400 media: rc: ir-rc6-decoder: enable toggle bit for Kathrein RCU-676 remote The Kathrein RCU-676 remote uses the 32-bit rc6 protocol and toggles bit 15 (0x8000) on repeated button presses, like MCE remotes. Add it's customer code 0x80460000 to the 32-bit rc6 toggle handling code to get proper scancodes and toggle reports. Signed-off-by: Matthias Reichl Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 183e19f5b9ee18fc7bc4b3983a91b5d0dd6c7871 Author: Sean Young Date: Tue Aug 21 15:57:52 2018 -0400 media: rc: Remove init_ir_raw_event and DEFINE_IR_RAW_EVENT macros This can be done with c99 initializers, which makes the code cleaner and more transparent. It does require gcc 4.6, because of this bug in earlier versions: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=10676 Since commit cafa0010cd51 ("Raise the minimum required gcc version to 4.6"), this is the case. Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit c5f14af0d8b63a62dfde7ade372da0038507deeb Author: Sean Young Date: Tue Jul 17 17:33:05 2018 -0400 media: rc: nec keymaps should specify the nec variant they use The rc_proto field should list the exact variant used by the remote. This does not change the decoder used, but helps with using keymaps for transmit purposes. Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 6aea5702e27ebc85747d6e4943a0c378e1752be0 Author: Takashi Iwai Date: Thu Sep 13 08:20:43 2018 +0200 ALSA: rawmidi: A lightweight function to discard pending bytes For discarding the pending bytes on rawmidi, we process with a loop of snd_rawmidi_transmit() which is just a waste of CPU power. Implement a lightweight API function to discard the pending bytes and the proceed the ring buffer instantly, and use it instead of open codes. Signed-off-by: Takashi Iwai commit 8ebfe885c65ec82a0b1e955cf99ed62664e84414 Author: Lance Roy Date: Thu Oct 4 00:14:04 2018 -0700 TTY: sn_console: Replace spin_is_locked() with spin_trylock() sn_sal_console_write() used spin_is_locked() + spin_lock() to get achieve the same thing as a spin_trylock(), so simplify it by using that instead. This is also a step towards possibly removing spin_is_locked(). Signed-off-by: Lance Roy Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: Signed-off-by: Greg Kroah-Hartman commit 01bad1c6896db021db82042e71c2bf1f97cc026b Author: Rafael J. Wysocki Date: Tue Oct 2 23:50:30 2018 +0200 cpuidle: poll_state: Revise loop termination condition If need_resched() returns "false", breaking out of the loop in poll_idle() will cause a new idle state to be selected, so in fact it usually doesn't make sense to spin in it longer than the target residency of the second state. [Note that the "polling" state is used only if there is at least one "real" state defined in addition to it, so the second state is always there.] On the other hand, breaking out of it early (say in case the next state is disabled) shouldn't hurt as it is polling anyway. For this reason, make the loop in poll_idle() break if the CPU has been spinning longer than the target residency of the second state (the "polling" state can only be state[0]). Signed-off-by: Rafael J. Wysocki commit 53812cdc9100e19f2e782851964355f2db5583de Author: Rafael J. Wysocki Date: Tue Oct 2 23:47:43 2018 +0200 cpuidle: menu: Move the latency_req == 0 special case check It is better to always update data->bucket before returning from menu_select() to avoid updating the correction factor for a stale bucket, so combine the latency_req == 0 special check with the more general check below. Signed-off-by: Rafael J. Wysocki Acked-by: Peter Zijlstra (Intel) commit 8b007ebec9a5d120d25c00d9b771aadf45ac5177 Author: Rafael J. Wysocki Date: Tue Oct 2 23:46:28 2018 +0200 cpuidle: menu: Avoid computations for very close timers If the next timer event (not including the tick) is closer than the target residency of the second state or the PM QoS latency constraint is below its exit latency, state[0] will be used regardless of any other factors, so skip the computations in menu_select() then and return 0 straight away from it. Still, do that after the bucket has been determined to avoid updating the correction factor for a stale bucket. Signed-off-by: Rafael J. Wysocki Acked-by: Peter Zijlstra (Intel) commit eb40a380bff28f84b6583bba6786b46ef26ef548 Author: Rafael J. Wysocki Date: Tue Oct 2 23:45:07 2018 +0200 cpuidle: menu: Do not update last_state_idx in menu_select() It is not necessary to update data->last_state_idx in menu_select() as it only is used in menu_update() which only runs when data->needs_update is set and that is set only when updating data->last_state_idx in menu_reflect(). Accordingly, drop the update of data->last_state_idx from menu_select() and get rid of the (now redundant) "out" label from it. No intentional behavior changes. Signed-off-by: Rafael J. Wysocki Acked-by: Peter Zijlstra (Intel) Reviewed-by: Daniel Lezcano commit 96c3d11df15323e7f6e55242f7bda610c4bef402 Author: Rafael J. Wysocki Date: Tue Oct 2 23:44:06 2018 +0200 cpuidle: menu: Get rid of first_idx from menu_select() Rearrange the code in menu_select() so that the loop over idle states always starts from 0 and get rid of the first_idx variable. While at it, add two empty lines to separate conditional statements from one another. No intentional behavior changes. Signed-off-by: Rafael J. Wysocki Acked-by: Peter Zijlstra (Intel) Reviewed-by: Daniel Lezcano commit 23e8ceb9ce766c81d62434053aef6e7efea6fcc3 Author: Rafael J. Wysocki Date: Tue Oct 2 23:42:56 2018 +0200 cpuidle: menu: Compute first_idx when latency_req is known Since menu_select() can only set first_idx to 1 if the exit latency of the second state is not greater than the latency limit, it should first determine that limit. Thus first_idx should be computed after the "interactivity" factor has been taken into account. Signed-off-by: Rafael J. Wysocki Acked-by: Peter Zijlstra (Intel) Reviewedy-by: Daniel Lezcano commit 817e9bc8cc04e5c70592525b96812c46c1aa1c46 Author: Greg Kroah-Hartman Date: Thu Oct 4 09:57:23 2018 -0700 Revert "serial:serial_core: Allow use of CTS for PPS line discipline" This reverts commit c550f01c810f2197c98e6e3103f81797f5e063be. Turns out the samsung tty driver is mucking around in the "unused" port fields and this patch breaks that code :( So we need to fix that driver up before this can be accepted. Reported-by: Stephen Rothwell Cc: Steve Sakoman Signed-off-by: Greg Kroah-Hartman commit 8fa74e3c49204bdf788d99ef71840490cccc210d Author: Nathan Chancellor Date: Thu Oct 4 09:39:20 2018 -0700 qed: Avoid implicit enum conversion in qed_ooo_submit_tx_buffers Clang warns when one enumerated type is implicitly converted to another. drivers/net/ethernet/qlogic/qed/qed_ll2.c:799:32: warning: implicit conversion from enumeration type 'enum core_tx_dest' to different enumeration type 'enum qed_ll2_tx_dest' [-Wenum-conversion] tx_pkt.tx_dest = p_ll2_conn->tx_dest; ~ ~~~~~~~~~~~~^~~~~~~ 1 warning generated. Fix this by using a switch statement to convert between the enumerated values since they are not 1 to 1, which matches how the rest of the driver handles this conversion. Link: https://github.com/ClangBuiltLinux/linux/issues/125 Suggested-by: Tomer Tayar Signed-off-by: Nathan Chancellor Acked-by: Tomer Tayar Signed-off-by: David S. Miller commit 9e50727f0e710e25e9fd740c9f43f51b37757773 Merge: f0e834e17fec fcd29ad17c6f Author: David S. Miller Date: Thu Oct 4 09:48:37 2018 -0700 Merge tag 'mlx5-updates-2018-10-03' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5-updates-2018-10-03 mlx5 core driver and ethernet netdev updates, please note there is a small devlink releated update to allow extack argument to eswitch operations. From Eli Britstein, 1) devlink: Add extack argument to the eswitch related operations 2) net/mlx5e: E-Switch, return extack messages for failures in the e-switch devlink callbacks 3) net/mlx5e: Add extack messages for TC offload failures From Eran Ben Elisha, 4) mlx5e: Add counter for aRFS rule insertion failures From Feras Daoud 5) Fast teardown support for mlx5 device This change introduces the enhanced version of the "Force teardown" that allows SW to perform teardown in a faster way without the need to reclaim all the FW pages. Fast teardown provides the following advantages: 1- Fix a FW race condition that could cause command timeout 2- Avoid moving to polling mode 3- Close the vport to prevent PCI ACK to be sent without been scatter to memory ==================== Signed-off-by: David S. Miller commit f0e834e17fec9d3863cb46a8648ed54aa7f43781 Merge: bbb4c4323a4d e908bcf4f1a2 Author: David S. Miller Date: Thu Oct 4 09:44:15 2018 -0700 Merge tag 'rxrpc-next-20181004' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs David Howells says: ==================== rxrpc: Development Here are some development patches for AF_RXRPC. The most significant points are: (1) Change the tracepoint that indicates a packet has been transmitted into one that indicates a packet is about to be transmitted. Without this, the response tracepoint may occur first if the round trip is fast enough. (2) Sort out AFS address list handling to better enforce maximum capacity to use helper functions to fill them and to do an insertion sort to order them. This is here to make (3) easier. (3) Keep AF_INET addresses as AF_INET addresses rather than converting them to AF_INET6 in both AF_RXRPC and kAFS. I hadn't realised that a UDP6 socket would just call down into UDP4 if given an AF_INET address. (4) Allow the timestamp on the first DATA packet of a reply to be retrieved by a kernel service. This will give the kAFS a more accurate base from which to calculate the callback promise expiration. (5) Allow the rxrpc protocol epoch value to be retrieved from an incoming call. This will allow kAFS to determine if the fileserver restarted and if two addresses apparently assigned to the same fileserver actually are different boxes. ==================== Signed-off-by: David S. Miller commit bbb4c4323a4d9cb5ca04db904aa3050a7586839a Author: David Howells Date: Thu Oct 4 14:27:55 2018 +0100 dns: Allow the dns resolver to retrieve a server set Allow the DNS resolver to retrieve a set of servers and their associated addresses, ports, preference and weight ratings. In terms of communication with userspace, "srv=1" is added to the callout string (the '1' indicating the maximum data version supported by the kernel) to ask the userspace side for this. If the userspace side doesn't recognise it, it will ignore the option and return the usual text address list. If the userspace side does recognise it, it will return some binary data that begins with a zero byte that would cause the string parsers to give an error. The second byte contains the version of the data in the blob (this may be between 1 and the version specified in the callout data). The remainder of the payload is version-specific. In version 1, the payload looks like (note that this is packed): u8 Non-string marker (ie. 0) u8 Content (0 => Server list) u8 Version (ie. 1) u8 Source (eg. DNS_RECORD_FROM_DNS_SRV) u8 Status (eg. DNS_LOOKUP_GOOD) u8 Number of servers foreach-server { u16 Name length (LE) u16 Priority (as per SRV record) (LE) u16 Weight (as per SRV record) (LE) u16 Port (LE) u8 Source (eg. DNS_RECORD_FROM_NSS) u8 Status (eg. DNS_LOOKUP_GOT_NOT_FOUND) u8 Protocol (eg. DNS_SERVER_PROTOCOL_UDP) u8 Number of addresses char[] Name (not NUL-terminated) foreach-address { u8 Family (AF_INET{,6}) union { u8[4] ipv4_addr u8[16] ipv6_addr } } } This can then be used to fetch a whole cell's VL-server configuration for AFS, for example. Signed-off-by: David Howells Signed-off-by: David S. Miller commit 0aa63eb9a904d50527cc5eadb061d16e607dd4c6 Author: Colin Ian King Date: Thu Oct 4 13:11:18 2018 +0100 liquidio: fix a couple of spelling mistakes Trivial fix to spelling mistakes in dev_dbg warning messages "Reloade" -> "Reload" "chang" -> "change" Signed-off-by: Colin Ian King Signed-off-by: David S. Miller commit 6a5e6b118092dfddc545d95911d66d6562f05281 Merge: 6f41617bf23a 154113eb1773 Author: David S. Miller Date: Thu Oct 4 09:32:35 2018 -0700 Merge branch 'ieee802154-for-davem-2018-10-04' of git://git.kernel.org/pub/scm/linux/kernel/git/sschmidt/wpan-next Stefan Schmidt says: ==================== pull-request: ieee802154-next 2018-10-04 An update from ieee802154 for *net-next* A very quite cycle in the ieee802154 subsystem. We only have two cleanup patches for this pull request. Xue removed the platform_data struct handling from the mcr20a driver and Alexander cleaned up some left overs in the hwsim driver. Please pull, or let me know if there are any problems. ==================== Signed-off-by: David S. Miller commit 5e72f5dc7e9d2ccc53e63cf1e4285d3f0534b685 Author: Chris Packham Date: Wed Oct 3 10:12:33 2018 +1300 ARM: dts: mvebu: armada-385-db-88f6820-amc: auto-detect nand ECC properites This board has a Micron MT29F8G08ABACAWP chip which requires a ECC strength of 8/512. Rather than hard coding any particular strength the the nand controller auto-detect the ECC strength based on the ONFI data. Signed-off-by: Chris Packham Signed-off-by: Gregory CLEMENT commit afb8fb9ad9560401a964acebf2594f1dbf5f0216 Merge: 7ab78d02cae7 692dce77dfb7 Author: Arnd Bergmann Date: Thu Oct 4 17:35:13 2018 +0200 Merge tag 'renesas-arm64-soc-for-v4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/soc Renesas ARM64 Based SoC SoC Updates for v4.20 * Add support for RZ/G2E (r8a774c0) and RZ/G2M (r8a774a1) SoCs * Enable Compare Match Timer (CMT) and Timer Unit (TMU) for Renesas SoCs * Remove no longer needed ARCH_SHMOBILE Kconfig symbol * tag 'renesas-arm64-soc-for-v4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: arm64: Add Renesas R8A774C0 support arm64: Add Renesas R8A774A1 support arm64: enable CMT/TMU support for Renesas SoC arm64: renesas: Remove the ARCH_SHMOBILE Kconfig symbol Signed-off-by: Arnd Bergmann commit e51e8d5de999cafec922bdd11235812161e12a69 Merge: 9620135fe10a f5e80203dadc Author: Arnd Bergmann Date: Thu Oct 4 17:16:47 2018 +0200 Merge tag 'omap-for-v4.20/ti-sysc-take2-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/drivers 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. * tag 'omap-for-v4.20/ti-sysc-take2-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: bus: ti-sysc: Just use SET_NOIRQ_SYSTEM_SLEEP_PM_OPS bus: ti-sysc: Make some warnings debug only bus: ti-sysc: Detect devices for debug on dra7 bus: ti-sysc: Detect timer and gpio on dra7 bus: ti-sysc: Detect devices on am335x when DEBUG is enabled bus: ti-sysc: Detect more devices on am473x for debugging bus: ti-sysc: Update revision masks to support am437x bus: ti-sysc: Defer suspend as needed Signed-off-by: Arnd Bergmann commit 38764692af2ce6e4d1620169d95b2f26149dbe48 Merge: b062e5b79cc4 aea4762fb46e Author: Arnd Bergmann Date: Thu Oct 4 17:20:12 2018 +0200 Merge tag 'davinci-for-v4.20/dt' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci into next/dt DaVinci DT updates for v4.20 ---------------------------- - A non-critical fix to reduce errors on A/DC on Lego Mindstorms EV3 - Support for GPIO expander on DA850 EVM * tag 'davinci-for-v4.20/dt' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci: ARM: dts: da850-lego-ev3: slow down A/DC as much as possible ARM: dts: da850-evm: Enable tca6416 on baseboard Signed-off-by: Arnd Bergmann commit dd5bd0a65ff6f22a32b35ca3fa1bcf7a6bc7104f Merge: 7e7126846c95 55d09dd4c860 Author: Paolo Bonzini Date: Thu Oct 4 17:12:45 2018 +0200 Merge tag 'kvm-s390-next-4.20-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux into HEAD KVM: s390: Features for 4.20 - Initial version of AP crypto virtualization via vfio-mdev - Set the host program identifier - Optimize page table locking commit de5c3ace8cdcd8f4879fd91024ea149dfc2e3a0e Merge: 37b945f3f173 9485107ae880 Author: Arnd Bergmann Date: Thu Oct 4 17:12:22 2018 +0200 Merge tag 'v4.20-rockchip-defconfig64-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into next/defconfig Enablement of the newly added Innosilicon hdmiphy. * tag 'v4.20-rockchip-defconfig64-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: arm64: defconfig: enable Rockchip Innosilicon hdmiphy Signed-off-by: Arnd Bergmann commit 37b945f3f173de60a6a1b4101351941330780c10 Author: Masahiro Yamada Date: Wed Oct 3 09:18:22 2018 +0900 ARM: multi_v7_defconfig: enable CONFIG_MMC_UNIPHIER Enable the UniPhier SD controller driver. Signed-off-by: Masahiro Yamada Signed-off-by: Arnd Bergmann commit b6f8c4769fb0201950089fe49e2932cfdcabcc84 Author: Masahiro Yamada Date: Wed Oct 3 09:18:23 2018 +0900 arm64: defconfig: enable CONFIG_MMC_UNIPHIER Enable the UniPhier SD controller driver. Signed-off-by: Masahiro Yamada Signed-off-by: Arnd Bergmann commit b062e5b79cc4b2e45f637b4f98361320e57ff676 Merge: 86dc4eaf12cc 59d925ac203b Author: Arnd Bergmann Date: Thu Oct 4 17:08:47 2018 +0200 Merge tag 'amlogic-dt64-3' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic into next/dt arm64: dts: Amlogic updates for v4.20, round 3 - AXG: fix eMMC * tag 'amlogic-dt64-3' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic: arm64: dts: meson-axg: s400: disable emmc arm64: dts: meson-axg: s400: add missing emmc pwrseq Signed-off-by: Arnd Bergmann commit 86dc4eaf12cc7f794462a53f451d785e2a526641 Merge: b9734c59eaab 546cba0623df Author: Arnd Bergmann Date: Thu Oct 4 17:06:49 2018 +0200 Merge tag 'uniphier-dt-v4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-uniphier into next/dt UniPhier ARM SoC DT updates for v4.20 - Add more clocks to NAND controller nodes - Add SPI controller nodes - Add SD controller nodes - Add USB 3.0 and its PHY nodes - Add PHY nodes for USB 2.0 * tag 'uniphier-dt-v4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-uniphier: arm64: dts: uniphier: Add USB2 PHY nodes arm64: dts: uniphier: Add USB3 controller nodes ARM: dts: uniphier: Add USB2 PHY nodes ARM: dts: uniphier: Add USB3 controller nodes arm64: dts: uniphier: add SD controller nodes ARM: dts: uniphier: add SD/eMMC controller nodes arm64: dts: uniphier: add SPI node for LD20, LD11 and PXs3 ARM: dts: uniphier: add SPI node for UniPhier 32bit SoCs ARM: dts: uniphier: add SPI pin-mux node arm64: uniphier: dts: add more clocks to Denali NAND controller node ARM: uniphier: dts: add more clocks to Denali NAND controller node Signed-off-by: Arnd Bergmann commit b9734c59eaabb63145a7c60bad7ba29baaffb09b Merge: 3f8b181eb4ab 767466b63de3 Author: Arnd Bergmann Date: Thu Oct 4 17:04:53 2018 +0200 Merge tag 'at91-4.20-dt2' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux into next/dt AT91 DT for 4.20 #2 - fixes NAND size and partitions for some boards * tag 'at91-4.20-dt2' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux: ARM: dts: at91: sama5d4_xplained: even nand memory partitions ARM: dts: at91: sama5d3_xplained: even nand memory partitions ARM: dts: at91: at91sam9x5cm: even nand memory partitions ARM: dts: at91: sama5d2_ptc_ek: fix bootloader env offsets ARM: dts: at91: at91sam9x5cm: fix addressable nand flash size ARM: dts: at91: sama5d4_xplained: fix addressable nand flash size Signed-off-by: Arnd Bergmann commit 3f8b181eb4ab431509d6262ae99643667def5b24 Merge: 5140512d5be5 5646a2f6d584 Author: Arnd Bergmann Date: Thu Oct 4 16:41:38 2018 +0200 Merge tag 'v4.19-next-dts32' of git://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux into next/dt mt7623: - add pmu node - add subsystem clocks - add nodes needed for iommu - add node for the jpeg decoder * tag 'v4.19-next-dts32' of git://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux: arm: dts: mt7623: add jpeg decoder device node arm: dts: mt7623: add iommu/smi device nodes arm: dts: mt7623: update subsystem clock controller device nodes arm: dts: mt7623: add a performance counter unit device node Signed-off-by: Arnd Bergmann commit 5140512d5be501e09171deef16e03087f57ef980 Merge: 22b9292141aa 186b45657b24 Author: Arnd Bergmann Date: Thu Oct 4 16:41:12 2018 +0200 Merge tag 'v4.20-rockchip-dts32-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into next/dt Nodes for the newly support rk3188 display controller, a fix for a new dtc warning, gpio setting for the sdmmc regulator on radxarock and a new board the "S" variant of the rk3288-based Tinker board, that sports an added emmc. * tag 'v4.20-rockchip-dts32-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: ARM: dts: rockchip: add rk3288-based Tinker board S ARM: dts: rockchip: move shared tinker-board nodes to a common dtsi ARM: dts: rockchip: explicitly set vcc_sd0 pin to gpio on rk3188-radxarock ARM: dts: rockchip: Fix erroneous SPI bus dtc warnings on rk3036 ARM: dts: rockchip: add rk3188 lcd controller nodes Signed-off-by: Arnd Bergmann commit aea4762fb46e048c059ff49565ee33da07c8aeb3 Author: David Lechner Date: Sun Sep 23 20:31:46 2018 -0500 ARM: dts: da850-lego-ev3: slow down A/DC as much as possible Due to the electrical design of the A/DC circuits on LEGO MINDSTORMS EV3, if we are reading analog values as fast as possible (i.e. using DMA to service the SPI) the A/DC chip will read incorrect values - as much as 0.1V off when the SPI is running at 10MHz. (This has to do with the capacitor charge time when channels are muxed in the A/DC.) This patch slows down the SPI as much as possible (if CPU is at 456MHz, SPI runs at 1/2 of that, so 228MHz and has a max prescalar of 256, so we could get ~891kHz, but we're just rounding it to 1MHz). We also use the max allowable value for WDELAY to slow things down even more. These changes reduce the error of the analog values to about 5mV, which is tolerable. Commits a3762b13a596 ("spi: spi-davinci: Add support for SPI_CS_WORD") and e2540da86ef8 ("iio: adc: ti-ads7950: use SPI_CS_WORD to reduce CPU usage") introduce changes that allow DMA transfers to be used, so this slow down is needed now. Signed-off-by: David Lechner Signed-off-by: Sekhar Nori commit f5fefa0f7d540cce0822540771270fc17e5da16f Author: Adam Ford Date: Sun Sep 30 11:01:18 2018 -0500 ARM: dts: da850-evm: Enable tca6416 on baseboard There is a GPIO expander on both the UI board as well as the baseboard. This patch enables the second tca6416 and identifies it as being on the baseboard using _bb as the suffix. Signed-off-by: Adam Ford Signed-off-by: Sekhar Nori commit 2c1833767bd8d906489a91cbbcb151fe3b818b61 Author: Gustavo A. R. Silva Date: Wed Oct 3 17:55:22 2018 +0200 spi: pxa2xx: Rewrite switch code block in interrupt_transfer Rewrite switch code block to directly do the expected number of shifts in each case and have break statements. Addresses-Coverity-ID: 1056539 ("Missing break in switch") Suggested-by: Mark Brown Signed-off-by: Gustavo A. R. Silva Signed-off-by: Mark Brown commit 20cdeb5408da5149c39d577c91ad6f33c73d1b05 Author: Bo YU Date: Wed Oct 3 10:02:50 2018 -0400 bpf, tracex3_user: erase "ARRAY_SIZE" redefined There is a warning when compiling bpf sample programs in sample/bpf: make -C /home/foo/bpf/samples/bpf/../../tools/lib/bpf/ RM='rm -rf' LDFLAGS= srctree=/home/foo/bpf/samples/bpf/../../ O= HOSTCC /home/foo/bpf/samples/bpf/tracex3_user.o /home/foo/bpf/samples/bpf/tracex3_user.c:20:0: warning: "ARRAY_SIZE" redefined #define ARRAY_SIZE(x) (sizeof(x) / sizeof(*(x))) In file included from /home/foo/bpf/samples/bpf/tracex3_user.c:18:0: ./tools/testing/selftests/bpf/bpf_util.h:48:0: note: this is the location of the previous definition # define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) Signed-off-by: Bo YU Signed-off-by: Daniel Borkmann commit ab6ead7d07ca87e3e66e6d524c8aa311732878de Author: Janusz Krzysztofik Date: Tue Oct 2 11:45:29 2018 +0200 ARM: OMAP1: ams-delta: Fix impossible .irq < 0 Since the very beginning, unsigned int .irq member of struct plat_serial8250_port introduced by commit eff443df679e ("OMAP1: AMS_DELTA: add modem support") was statically initialized to a negative value -EINVAL. Moreover, commit 0812db943748 ("ARM: OMAP1: ams-delta: assign MODEM IRQ from GPIO descriptor") has introduced some new code which checks for that member carrying a negative value which is impossible. Use IRQ_NOTCONNECTED instead of -EINVAL. Also, drop the valueless check and let the modem device be registered regardless of .irq value, and the value handled by "serial8250" driver. Fixes: 0812db943748 ("ARM: OMAP1: ams-delta: assign MODEM IRQ from GPIO descriptor") Reported-by: Dan Carpenter Signed-off-by: Janusz Krzysztofik Acked-by: Aaro Koskinen Signed-off-by: Tony Lindgren commit 6adde4a36f1b6a562a1057fbb1065007851050e7 Author: Nathan Chancellor Date: Wed Oct 3 19:37:54 2018 -0700 ata: ep93xx: Use proper enums for directions Clang warns when one enumerated type is implicitly converted to another. drivers/ata/pata_ep93xx.c:662:36: warning: implicit conversion from enumeration type 'enum dma_data_direction' to different enumeration type 'enum dma_transfer_direction' [-Wenum-conversion] drv_data->dma_rx_data.direction = DMA_FROM_DEVICE; ~ ^~~~~~~~~~~~~~~ drivers/ata/pata_ep93xx.c:670:36: warning: implicit conversion from enumeration type 'enum dma_data_direction' to different enumeration type 'enum dma_transfer_direction' [-Wenum-conversion] drv_data->dma_tx_data.direction = DMA_TO_DEVICE; ~ ^~~~~~~~~~~~~ drivers/ata/pata_ep93xx.c:681:19: warning: implicit conversion from enumeration type 'enum dma_data_direction' to different enumeration type 'enum dma_transfer_direction' [-Wenum-conversion] conf.direction = DMA_FROM_DEVICE; ~ ^~~~~~~~~~~~~~~ drivers/ata/pata_ep93xx.c:692:19: warning: implicit conversion from enumeration type 'enum dma_data_direction' to different enumeration type 'enum dma_transfer_direction' [-Wenum-conversion] conf.direction = DMA_TO_DEVICE; ~ ^~~~~~~~~~~~~ Use the equivalent valued enums from the expected type so that Clang no longer warns about a conversion. DMA_TO_DEVICE = DMA_MEM_TO_DEV = 1 DMA_FROM_DEVICE = DMA_DEV_TO_MEM = 2 Acked-by: Bartlomiej Zolnierkiewicz Signed-off-by: Nathan Chancellor Signed-off-by: Jens Axboe commit 22b9292141aa791d8182514da9ba780e7ea09528 Merge: f84c933015ff e78d53c7b287 Author: Arnd Bergmann Date: Thu Oct 4 16:14:33 2018 +0200 Merge tag 'v4.20-rockchip-dts64-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into next/dt Some additional new boards, the rk3399-based RockPro64 from Pine64, as well as the Vamrs Rock960. Another big feature is display support including hdmi and the Innosilicon hdmiphy on the rk3328, right now enabled on the rock64. The rock64 also got its spi-nor and spdif enabled. On the px30 we can see dwc2-based usb support now and finally some misc fixes, like for a new dtc warning, missing address and size cells and microSD fix on sapphire. * tag 'v4.20-rockchip-dts64-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: arm64: dts: rockchip: enable display nodes on rk3328-rock64 arm64: dts: rockchip: add rk3328 display nodes arm64: dts: rockchip: add Innosilicon hdmi phy node to rk3328 arm64: dts: rockchip: add missing address and size cells for rk3399 mipi dsi arm64: dts: rockchip: Enable SPI NOR flash on Rock64 arm64: dts: rockchip: add initial dts support for Rockpro64 arm64: dts: rockchip: enable dwc2-based otg controller on px30-evb arm64: dts: rockchip: add dwc2 otg controller on px30 dt-bindings: usb: dwc2: add description for px30 arm64: dts: rockchip: Enable SD card detection for Rock960 boards arm64: dts: rockchip: Add support for Rock960 board dt-bindings: arm: rockchip: Add binding for Rock960 board arm64: dts: rockchip: Split out common nodes for Rock960 based boards arm64: dts: rockchip: add spdif sound node for rock64 arm64: dts: rockchip: Fix microSD in rk3399 sapphire board arm64: dts: rockchip: Fix I2C bus unit-address error on rk3399-puma-haikou Signed-off-by: Arnd Bergmann commit f84c933015fffb11847118c78b44502e371085e6 Merge: 8881ec527918 5f681f41fe17 Author: Arnd Bergmann Date: Thu Oct 4 16:13:04 2018 +0200 Merge tag 'omap-for-v4.20/dt-signed-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/dt More devicetree changes for omap variants There's a patch for previously merged dts changes to remove the last remaining use of legacy phy_id property. For dra7, we have a non-urgent PCIe dts fix, enable a PCIe errata for unaligned access. For omap5, we enable omap5 USB OTG mode for DWC3 controller. And we add support for am335x based Moxa UC-2100 series of industrial computers. * tag 'omap-for-v4.20/dt-signed-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: dts: am335x: Replace remaining legacy phy_id with phy-handle ARM: dts: am335x: add support for Moxa UC-2101 open platform ARM: dts: am335x: add common file for UC-2100 series ARM: dts: omap5: enable OTG role for DWC3 controller ARM: dts: dra7: Enable workaround for errata i870 in PCIe host mode ARM: dts: dra7: Fix up unaligned access setting for PCIe EP Signed-off-by: Arnd Bergmann commit fc1dc7665145e978216a2dbe06e2db6270fc7310 Merge: d71019b54bff e5b0863c2064 Author: Daniel Borkmann Date: Thu Oct 4 16:04:17 2018 +0200 Merge branch 'bpf-libbpf-consistent-iface' Andrey Ignatov says: ==================== This patch set renames a few interfaces in libbpf, mostly netlink related, so that all symbols provided by the library have only three possible prefixes: % nm -D tools/lib/bpf/libbpf.so | \ awk '$2 == "T" {sub(/[_\(].*/, "", $3); if ($3) print $3}' | \ sort | \ uniq -c 91 bpf 8 btf 14 libbpf libbpf is used more and more outside kernel tree. That means the library should follow good practices in library design and implementation to play well with third party code that uses it. One of such practices is to have a common prefix (or a few) for every interface, function or data structure, library provides. It helps to avoid name conflicts with other libraries and keeps API/ABI consistent. Inconsistent names in libbpf already cause problems in real life. E.g. an application can't use both libbpf and libnl due to conflicting symbols (specifically nla_parse, nla_parse_nested and a few others). Some of problematic global symbols are not part of ABI and can be restricted from export with either visibility attribute/pragma or export map (what is useful by itself and can be done in addition). That won't solve the problem for those that are part of ABI though. Also export restrictions would help only in DSO case. If third party application links libbpf statically it won't help, and people do it (e.g. Facebook links most of libraries statically, including libbpf). libbpf already uses the following prefixes for its interfaces: * bpf_ for bpf system call wrappers, program/map/elf-object abstractions and a few other things; * btf_ for BTF related API; * libbpf_ for everything else. The patch adds libbpf_ prefix to interfaces that use none of mentioned above prefixes and don't fit well into the first two categories. Long term benefits of having common prefix should outweigh possible inconvenience of changing API for those functions now. Patches 2-4 add libbpf_ prefix to libbpf interfaces: separate patch per header. Other patches are simple improvements in API. ==================== Signed-off-by: Daniel Borkmann commit e5b0863c2064f2d40de9de4862317f9db4ccffff Author: Andrey Ignatov Date: Wed Oct 3 15:26:43 2018 -0700 libbpf: Use __u32 instead of u32 in bpf_program__load Make bpf_program__load consistent with other interfaces: use __u32 instead of u32. That in turn fixes build of samples: In file included from ./samples/bpf/trace_output_user.c:21:0: ./tools/lib/bpf/libbpf.h:132:9: error: unknown type name ‘u32’ u32 kern_version); ^ Fixes: commit 29cd77f41620d ("libbpf: Support loading individual progs") Signed-off-by: Andrey Ignatov Acked-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann commit eff8190880c005e754d7d1bd315fc53a3ae9f876 Author: Andrey Ignatov Date: Wed Oct 3 15:26:42 2018 -0700 libbpf: Make include guards consistent Rename include guards to have consistent names "__LIBBPF_". Signed-off-by: Andrey Ignatov Acked-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann commit 24d6a8084259e22acf9a80d4de3606a031f42f6d Author: Andrey Ignatov Date: Wed Oct 3 15:26:41 2018 -0700 libbpf: Consistent prefixes for interfaces in str_error.h. libbpf is used more and more outside kernel tree. That means the library should follow good practices in library design and implementation to play well with third party code that uses it. One of such practices is to have a common prefix (or a few) for every interface, function or data structure, library provides. I helps to avoid name conflicts with other libraries and keeps API consistent. Inconsistent names in libbpf already cause problems in real life. E.g. an application can't use both libbpf and libnl due to conflicting symbols. Having common prefix will help to fix current and avoid future problems. libbpf already uses the following prefixes for its interfaces: * bpf_ for bpf system call wrappers, program/map/elf-object abstractions and a few other things; * btf_ for BTF related API; * libbpf_ for everything else. The patch renames function in str_error.h to have libbpf_ prefix since it misses one and doesn't fit well into the first two categories. Signed-off-by: Andrey Ignatov Acked-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann commit f04bc8a436e1b32f842a631ff889954bdf56b720 Author: Andrey Ignatov Date: Wed Oct 3 15:26:40 2018 -0700 libbpf: Consistent prefixes for interfaces in nlattr.h. libbpf is used more and more outside kernel tree. That means the library should follow good practices in library design and implementation to play well with third party code that uses it. One of such practices is to have a common prefix (or a few) for every interface, function or data structure, library provides. I helps to avoid name conflicts with other libraries and keeps API consistent. Inconsistent names in libbpf already cause problems in real life. E.g. an application can't use both libbpf and libnl due to conflicting symbols. Having common prefix will help to fix current and avoid future problems. libbpf already uses the following prefixes for its interfaces: * bpf_ for bpf system call wrappers, program/map/elf-object abstractions and a few other things; * btf_ for BTF related API; * libbpf_ for everything else. The patch adds libbpf_ prefix to interfaces in nlattr.h that use none of mentioned above prefixes and doesn't fit well into the first two categories. Since affected part of API is used in bpftool, the patch applies corresponding change to bpftool as well. Having it in a separate patch will cause a state of tree where bpftool is broken what may not be a good idea. Signed-off-by: Andrey Ignatov Acked-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann commit aae57780107d92de2463e605cb054656ebd233d1 Author: Andrey Ignatov Date: Wed Oct 3 15:26:39 2018 -0700 libbpf: Consistent prefixes for interfaces in libbpf.h. libbpf is used more and more outside kernel tree. That means the library should follow good practices in library design and implementation to play well with third party code that uses it. One of such practices is to have a common prefix (or a few) for every interface, function or data structure, library provides. I helps to avoid name conflicts with other libraries and keeps API consistent. Inconsistent names in libbpf already cause problems in real life. E.g. an application can't use both libbpf and libnl due to conflicting symbols. Having common prefix will help to fix current and avoid future problems. libbpf already uses the following prefixes for its interfaces: * bpf_ for bpf system call wrappers, program/map/elf-object abstractions and a few other things; * btf_ for BTF related API; * libbpf_ for everything else. The patch adds libbpf_ prefix to functions and typedef in libbpf.h that use none of mentioned above prefixes and doesn't fit well into the first two categories. Since affected part of API is used in bpftool, the patch applies corresponding change to bpftool as well. Having it in a separate patch will cause a state of tree where bpftool is broken what may not be a good idea. Signed-off-by: Andrey Ignatov Acked-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann commit 434fe9d4b4bfa8becb0959ef32b9b9fa628ef6fe Author: Andrey Ignatov Date: Wed Oct 3 15:26:38 2018 -0700 libbpf: Move __dump_nlmsg_t from API to implementation This typedef is used only by implementation in netlink.c. Nothing uses it in public API. Move it to netlink.c. Signed-off-by: Andrey Ignatov Acked-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann commit 757b1aa00259a44f94bd120b9637720b9aaf36eb Author: Tzung-Bi Shih Date: Thu Oct 4 18:43:01 2018 +0800 ASoC: ts3a227e: fix a typo in documentation There is no "MACBIAS". It should be "MICBIAS". Signed-off-by: Tzung-Bi Shih Signed-off-by: Mark Brown commit 4b03227a65dc7aa8c0c1f8f6b3726225ae529e47 Author: Gustavo A. R. Silva Date: Thu Oct 4 14:52:34 2018 +0200 regulator: axp20x: 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 moved the whole comment "Fall through to the check below.", which contains the "Fall through" comment, at the bottom of the case, which is what GCC is expecting to find. Addresses-Coverity-ID: 1436594 ("Missing break in switch") Addresses-Coverity-ID: 1364475 ("Missing break in switch") Signed-off-by: Gustavo A. R. Silva Signed-off-by: Mark Brown commit 80d0dda3a4e5ba00ae6a45fa840096dc9633aad7 Author: Masahiro Yamada Date: Tue Sep 18 17:45:54 2018 +0900 kbuild: simplify command line creation in scripts/mkmakefile Assuming we never invoke the generated Makefile from outside of the $(objtree) directory, $(CURDIR) points to the absolute path of $(objtree). BTW, 'lastword' is natively supported by GNU Make 3.81+, which is the current requirement for building the kernel. Signed-off-by: Masahiro Yamada commit 4fd61277f66278d7ce4a77accb662d00e800cce7 Author: Masahiro Yamada Date: Tue Sep 18 17:45:53 2018 +0900 kbuild: do not pass $(objtree) to scripts/mkmakefile Since $(objtree) is always '.', it is not useful to pass it to scripts/mkmakefile. I assume nobody wants to run this script directly. Signed-off-by: Masahiro Yamada commit 74bc0c09b2da005f028510b1ad21140c9d6c9b44 Author: Masahiro Yamada Date: Tue Sep 18 17:45:52 2018 +0900 kbuild: remove user ID check in scripts/mkmakefile This line was added by commit fd5f0cd6b0ce ("kbuild: Do not overwrite makefile as anohter user"). Its commit description says the intention was to prevent $(objtree)/Makefile from being owned by root when e.g. running 'make install'. However, as commit 19514fc665ff ("arm, kbuild: make "make install" not depend on vmlinux") stated, installation targets must not modify the source tree in the first place. If they do, we are already screwed up. We must fix the root cause. Installation targets should just copy files verbatim, hence we never expect $(objtree)/Makefile is touched by root. The user ID check in scripts/mkmakefile is unneeded. Signed-off-by: Masahiro Yamada commit 77ec0c20c7e012b5ebb22197c8a329611458cdf8 Author: Masahiro Yamada Date: Tue Sep 18 17:45:51 2018 +0900 kbuild: remove VERSION and PATCHLEVEL from $(objtree)/Makefile Neither VERSION nor PATCHLEVEL is used in any useful way. Signed-off-by: Masahiro Yamada commit 80463f1b7bf9f822fd3495139bcf3ef254fdca10 Author: Masahiro Yamada Date: Fri Sep 14 15:33:23 2018 +0900 kbuild: add --include-dir flag only for out-of-tree build The --include-dir flag is used to include check-in Makefiles from $(objtree) without $(srctree)/ prefix. Obviously, this is unneeded for in-tree build. Add the flag just before changing the working directory. This becomes effective after invoking sub-make. Add a little bit comments about it. Signed-off-by: Masahiro Yamada commit 8403bcb779a0be4080510c59b1a582e6ab7a748c Author: Jason A. Donenfeld Date: Tue Oct 2 15:01:24 2018 +0100 ARM: 8801/1: makefile: use ARMv3M mode for RiscPC The purpose of CONFIG_CPU_32v3 is to avoid ldrh/strh on the RiscPC, which is pretty much an ARMv4 device, except its bus will choke on the half-words. The way to make the C compiler not output ldrh/strh is with -march=armv3, which doesn't support them in the ISA. However, this prevents certain cryptography code from working that uses instructions like umull. Fortunately there's also -march=armv3m that does support those, making it possible to continue assembling optimized cryptography routines for our beloved RiscPC. Signed-off-by: Jason A. Donenfeld Acked-by: Ard Biesheuvel Acked-by: Arnd Bergmann Signed-off-by: Russell King commit f9b58e8c7d031b0daa5c9a9ee27f5a4028ba53ac Author: Stefan Agner Date: Sun Sep 30 23:02:33 2018 +0100 ARM: 8800/1: use choice for kernel unwinders While in theory multiple unwinders could be compiled in, it does not make sense in practise. Use a choice to make the unwinder selection mutually exclusive and mandatory. Already before this commit it has not been possible to deselect FRAME_POINTER. Remove the obsolete comment. Furthermore, to produce a meaningful backtrace with FRAME_POINTER enabled the kernel needs a specific function prologue: mov ip, sp stmfd sp!, {fp, ip, lr, pc} sub fp, ip, #4 To get to the required prologue gcc uses apcs and no-sched-prolog. This compiler options are not available on clang, and clang is not able to generate the required prologue. Make the FRAME_POINTER config symbol depending on !clang. Suggested-by: Arnd Bergmann Signed-off-by: Stefan Agner Reviewed-by: Arnd Bergmann Signed-off-by: Russell King commit a2c3c0a54d4cccb35e8071a11e203c4ac06f9e4e Author: Sharat Masetty Date: Thu Oct 4 15:11:43 2018 +0530 drm/msm/a6xx: Add devfreq support for a6xx Implement routines to estimate GPU busy time and fetching the current frequency for the polling interval. This is required by the devfreq framework which recommends a frequency change if needed. The driver code then tries to set this new frequency on the GPU by sending an Out Of Band(OOB) request to the GMU. Signed-off-by: Sharat Masetty Signed-off-by: Rob Clark commit 053c5a753e951c5dd1729af2cf4d8107f2e6e09b Author: Nicholas Piggin Date: Mon Aug 27 13:03:02 2018 +1000 powerpc/64s/radix: Explicitly flush ERAT with local LPID invalidation Local radix TLB flush operations that operate on congruence classes have explicit ERAT flushes for POWER9. The process scoped LPID flush did not have a flush, so add it. Signed-off-by: Nicholas Piggin Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman commit bc276ecba132caccb1fda5863a652c15def2b8c6 Author: Nicholas Piggin Date: Mon Aug 27 13:03:01 2018 +1000 powerpc/64s/hash: Do not use PPC_INVALIDATE_ERAT on CPUs before POWER9 PPC_INVALIDATE_ERAT is slbia IH=7 which is a new variant introduced with POWER9, and the result is undefined on earlier CPUs. Commits 7b9f71f974 ("powerpc/64s: POWER9 machine check handler") and d4748276ae ("powerpc/64s: Improve local TLB flush for boot and MCE on POWER9") caused POWER7/8 code to use this instruction. Remove it. An ERAT flush can be made by invalidatig the SLB, but before POWER9 that requires a flush and rebolt. Fixes: 7b9f71f974 ("powerpc/64s: POWER9 machine check handler") Fixes: d4748276ae ("powerpc/64s: Improve local TLB flush for boot and MCE on POWER9") Cc: stable@vger.kernel.org # v4.11+ Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman commit de0a3d094de0858f091cf353c437e912ca41a506 Author: Sharat Masetty Date: Thu Oct 4 15:11:42 2018 +0530 drm/msm: re-factor devfreq code The devfreq framework requires the drivers to provide busy time estimations. The GPU driver relies on the hardware performance counteres for the busy time estimations, but different hardware revisions have counters which can be sourced from different clocks. So the busy time estimation will be target dependent. Additionally on targets where the clocks are completely controlled by the on chip microcontroller, fetching and setting the current GPU frequency will be different. This patch aims to embrace these differences by re-factoring the devfreq code a bit. Signed-off-by: Sharat Masetty Signed-off-by: Rob Clark commit c28aa2031f64701d4a1a78f97147e93fc5eb0c04 Author: Sharat Masetty Date: Thu Oct 4 15:11:41 2018 +0530 drm/msm/a6xx: Add gmu_read64() register read op Add a simple function to read 64 registers in the GMU domain Signed-off-by: Sharat Masetty Signed-off-by: Rob Clark commit d3fa91c90931e6f3b26f7acbac84b44c6756fa08 Author: Sharat Masetty Date: Thu Oct 4 15:11:40 2018 +0530 drm/msm: suspend devfreq on init Devfreq turns on and starts recommending power level as soon as it is initialized. The GPU is still not powered on by the time the devfreq init happens and this leads to problems on GPU's where register access is needed to get/set power levels. So we start suspended and only restart devfreq when GPU is powered on. Signed-off-by: Sharat Masetty Signed-off-by: Rob Clark commit 817593604e5b244dc55344d298d96122457c20bd Author: Anton Blanchard Date: Tue Oct 2 09:01:05 2018 +1000 powerpc/time: Add set_state_oneshot_stopped decrementer callback If CONFIG_PPC_WATCHDOG is enabled we always cap the decrementer to 0x7fffffff: if (IS_ENABLED(CONFIG_PPC_WATCHDOG)) set_dec(0x7fffffff); else set_dec(decrementer_max); If there are no future events, we don't reprogram the decrementer after this and we end up with 0x7fffffff even on a large decrementer capable system. As suggested by Nick, add a set_state_oneshot_stopped callback so we program the decrementer with decrementer_max if there are no future events. Signed-off-by: Anton Blanchard Signed-off-by: Michael Ellerman commit 8b78fdb045de60a4eb35460092bbd3cffa925353 Author: Anton Blanchard Date: Tue Oct 2 09:01:04 2018 +1000 powerpc/time: Use clockevents_register_device(), fixing an issue with large decrementer We currently cap the decrementer clockevent at 4 seconds, even on systems with large decrementer support. Fix this by converting the code to use clockevents_register_device() which calculates the upper bound based on the max_delta passed in. Signed-off-by: Anton Blanchard Signed-off-by: Michael Ellerman commit e42e175ae319fd67b3969da7537e0ef7eab4fe6b Author: Ricardo Ribalda Delgado Date: Thu Oct 4 12:08:38 2018 +0200 mtd: physmap_of: Remove unused struct of_device_id This struct does not seem to be used anywhere on the code Signed-off-by: Ricardo Ribalda Delgado Signed-off-by: Boris Brezillon commit bdd5a46fe30653cb4d26c7c787a22159bf79eed9 Author: Amir Goldstein Date: Thu Oct 4 00:25:37 2018 +0300 fanotify: add BUILD_BUG_ON() to count the bits of fanotify constants Also define the FANOTIFY_EVENT_FLAGS consisting of the extra flags FAN_ONDIR and FAN_ON_CHILD. Signed-off-by: Amir Goldstein Signed-off-by: Jan Kara commit a39f7ec41766118bf836d266224505741570ada6 Author: Amir Goldstein Date: Thu Oct 4 00:25:36 2018 +0300 fsnotify: convert runtime BUG_ON() to BUILD_BUG_ON() The BUG_ON() statements to verify number of bits in ALL_FSNOTIFY_BITS and ALL_INOTIFY_BITS are converted to build time check of the constant. Signed-off-by: Amir Goldstein Signed-off-by: Jan Kara commit 23c9deeb3285d34fd243abb3d6b9f07db60c3cf4 Author: Amir Goldstein Date: Thu Oct 4 00:25:35 2018 +0300 fanotify: deprecate uapi FAN_ALL_* constants We do not want to add new bits to the FAN_ALL_* uapi constants because they have been exposed to userspace. If there are programs out there using these constants, those programs could break if re-compiled with modified FAN_ALL_* constants and run on an old kernel. We deprecate the uapi constants FAN_ALL_* and define new FANOTIFY_* constants for internal use to replace them. New feature bits will be added only to the new constants. Cc: Signed-off-by: Amir Goldstein Signed-off-by: Jan Kara commit a72fd224e37bf6a0630bce302deebbccbc236ba2 Author: Amir Goldstein Date: Thu Oct 4 00:25:34 2018 +0300 fanotify: simplify handling of FAN_ONDIR fanotify mark add/remove code jumps through hoops to avoid setting the FS_ISDIR in the commulative object mask. That was just papering over a bug in fsnotify() handling of the FS_ISDIR extra flag. This bug is now fixed, so all the hoops can be removed along with the unneeded internal flag FAN_MARK_ONDIR. Signed-off-by: Amir Goldstein Signed-off-by: Jan Kara commit 007d1e8395eaa59b0e7ad9eb2b53a40859446a88 Author: Amir Goldstein Date: Thu Oct 4 00:25:33 2018 +0300 fsnotify: generalize handling of extra event flags FS_EVENT_ON_CHILD gets a special treatment in fsnotify() because it is not a flag specifying an event type, but rather an extra flags that may be reported along with another event and control the handling of the event by the backend. FS_ISDIR is also an "extra flag" and not an "event type" and therefore desrves the same treatment. With inotify/dnotify backends it was never possible to set FS_ISDIR in mark masks, so it did not matter. With fanotify backend, mark adding code jumps through hoops to avoid setting the FS_ISDIR in the commulative object mask. Separate the constant ALL_FSNOTIFY_EVENTS to ALL_FSNOTIFY_FLAGS and ALL_FSNOTIFY_EVENTS, so the latter can be used to test for specific event types. Signed-off-by: Amir Goldstein Signed-off-by: Jan Kara commit b723a7911d028fb55f67a63c4c4d895f72e059d4 Author: Amir Goldstein Date: Thu Oct 4 00:25:32 2018 +0300 fanotify: fix collision of internal and uapi mark flags The new mark flag FAN_MARK_FILESYSTEMS collides with existing internal flag FAN_MARK_ONDIR. Change internal flag value to avoid the collision. Fixes: d54f4fba889b ("fanotify: add API to attach/detach super block mark") Signed-off-by: Amir Goldstein Signed-off-by: Jan Kara commit 466dee75b3364d05b43ddfe41ef2e8887b6a3ea7 Author: Daniel Mack Date: Wed Oct 3 21:32:34 2018 +0200 ASoC: add fault detect recovery property to DT bindings The driver already has support for setting the FDRB bit in the CONFA register through platform data, but there was no property to set it in the device-tree bindings. Signed-off-by: Daniel Mack Signed-off-by: Mark Brown commit cfe9ee5f2b7808ceec21df83a45e38afcc647153 Author: Daniel Mack Date: Wed Oct 3 21:36:27 2018 +0200 ASoC: pxa-ssp: enable and disable extclk if given If a "extclk" clock is given, enable and disable it when appropriate. Signed-off-by: Daniel Mack Signed-off-by: Mark Brown commit 8e9f7265eda9f3a662ca1ca47a69042a7840735b Author: Dan Carpenter Date: Mon Oct 1 19:44:30 2018 +0300 ASoC: qdsp6: q6asm-dai: checking NULL vs IS_ERR() The q6asm_audio_client_alloc() doesn't return NULL, it returns error pointers. Fixes: 2a9e92d371db ("ASoC: qdsp6: q6asm: Add q6asm dai driver") Signed-off-by: Dan Carpenter Signed-off-by: Mark Brown commit 9c80c5a8831471e0a3e139aad1b0d4c0fdc50b2f Author: Takashi Iwai Date: Wed Oct 3 19:31:44 2018 +0200 ASoC: intel: skylake: Add missing break in skl_tplg_get_token() skl_tplg_get_token() misses a break in the big switch() block for SKL_TKN_U8_CORE_ID entry. Spotted nicely by -Wimplicit-fallthrough compiler option. Fixes: 6277e83292a2 ("ASoC: Intel: Skylake: Parse vendor tokens to build module data") Cc: Signed-off-by: Takashi Iwai Signed-off-by: Mark Brown commit 6adb734bb9c72c0fdcb1868edcc5fde3b6333d11 Author: Biju Das Date: Thu Sep 27 13:28:51 2018 +0100 dt-bindings: PCI: rcar: Add device tree support for r8a7744 Add internal PCI bridge support for r8a7744 SoC. The Renesas RZ/G1N (R8A7744) internal PCI bridge is identical to the R-Car Gen2 family. This doesn't change the driver, so it does nothing by itself. But it does mean that checkpatch won't complain about a future patch that adds "renesas,pci-r8a7744" to a DT, which helps ensure that shipped DTs use documented compatibility strings. Signed-off-by: Biju Das Signed-off-by: Lorenzo Pieralisi Reviewed-by: Chris Paterson Reviewed-by: Simon Horman commit 34845c939082093354a6ffbb1ebff599e30b9b22 Author: Geert Uytterhoeven Date: Wed Sep 26 15:20:03 2018 +0200 reset: Grammar s/more then once/more than once/ Fix grammar in reset_control_get_exclusive() documentation comment. Signed-off-by: Geert Uytterhoeven Signed-off-by: Philipp Zabel commit 9c2298aad355d8c1957df3015448fef333526934 Author: Rafael J. Wysocki Date: Thu Oct 4 11:05:14 2018 +0200 sched/core: Fix comment regarding nr_iowait_cpu() and get_iowait_load() The comment related to nr_iowait_cpu() and get_iowait_load() confuses cpufreq with cpuidle and is not very useful for this reason, so fix it. Signed-off-by: Rafael J. Wysocki Acked-by: Peter Zijlstra Cc: Linus Torvalds Cc: Linux PM Cc: Tejun Heo Cc: Thomas Gleixner Fixes: e33a9bba85a8 "sched/core: move IO scheduling accounting from io_schedule_timeout() into scheduler" Link: http://lkml.kernel.org/r/3803514.xkx7zY50tF@aspire.rjw.lan Signed-off-by: Ingo Molnar commit 494b5168f2de009eb80f198f668da374295098dd Author: Nadav Amit Date: Wed Oct 3 14:30:57 2018 -0700 x86/paravirt: Work around GCC inlining bugs when compiling paravirt ops As described in: 77b0bf55bc67: ("kbuild/Makefile: Prepare for using macros in inline assembly code to work around asm() related GCC inlining bugs") GCC's inlining heuristics are broken with common asm() patterns used in kernel code, resulting in the effective disabling of inlining. The workaround is to set an assembly macro and call it from the inline assembly block. As a result GCC considers the inline assembly block as a single instruction. (Which it isn't, but that's the best we can get.) In this patch we wrap the paravirt call section tricks in a macro, to hide it from GCC. The effect of the patch is a more aggressive inlining, which also causes a size increase of kernel. text data bss dec hex filename 18147336 10226688 2957312 31331336 1de1408 ./vmlinux before 18162555 10226288 2957312 31346155 1de4deb ./vmlinux after (+14819) The number of static text symbols (non-inlined functions) goes down: Before: 40053 After: 39942 (-111) [ mingo: Rewrote the changelog. ] Tested-by: Kees Cook Signed-off-by: Nadav Amit Reviewed-by: Juergen Gross Acked-by: Peter Zijlstra (Intel) Cc: Alok Kataria Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: virtualization@lists.linux-foundation.org Link: http://lkml.kernel.org/r/20181003213100.189959-8-namit@vmware.com Signed-off-by: Ingo Molnar commit f81f8ad56fd1c7b99b2ed1c314527f7d9ac447c6 Author: Nadav Amit Date: Wed Oct 3 14:30:56 2018 -0700 x86/bug: Macrofy the BUG table section handling, to work around GCC inlining bugs As described in: 77b0bf55bc67: ("kbuild/Makefile: Prepare for using macros in inline assembly code to work around asm() related GCC inlining bugs") GCC's inlining heuristics are broken with common asm() patterns used in kernel code, resulting in the effective disabling of inlining. The workaround is to set an assembly macro and call it from the inline assembly block. As a result GCC considers the inline assembly block as a single instruction. (Which it isn't, but that's the best we can get.) This patch increases the kernel size: text data bss dec hex filename 18146889 10225380 2957312 31329581 1de0d2d ./vmlinux before 18147336 10226688 2957312 31331336 1de1408 ./vmlinux after (+1755) But enables more aggressive inlining (and probably better branch decisions). The number of static text symbols in vmlinux is much lower: Before: 40218 After: 40053 (-165) The assembly code gets harder to read due to the extra macro layer. [ mingo: Rewrote the changelog. ] Tested-by: Kees Cook Signed-off-by: Nadav Amit Acked-by: Peter Zijlstra (Intel) Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20181003213100.189959-7-namit@vmware.com Signed-off-by: Ingo Molnar commit 77f48ec28e4ccff94d2e5f4260a83ac27a7f3099 Author: Nadav Amit Date: Wed Oct 3 14:30:55 2018 -0700 x86/alternatives: Macrofy lock prefixes to work around GCC inlining bugs As described in: 77b0bf55bc67: ("kbuild/Makefile: Prepare for using macros in inline assembly code to work around asm() related GCC inlining bugs") GCC's inlining heuristics are broken with common asm() patterns used in kernel code, resulting in the effective disabling of inlining. The workaround is to set an assembly macro and call it from the inline assembly block - i.e. to macrify the affected block. As a result GCC considers the inline assembly block as a single instruction. This patch handles the LOCK prefix, allowing more aggresive inlining: text data bss dec hex filename 18140140 10225284 2957312 31322736 1ddf270 ./vmlinux before 18146889 10225380 2957312 31329581 1de0d2d ./vmlinux after (+6845) This is the reduction in non-inlined functions: Before: 40286 After: 40218 (-68) Tested-by: Kees Cook Signed-off-by: Nadav Amit Acked-by: Peter Zijlstra (Intel) Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20181003213100.189959-6-namit@vmware.com Signed-off-by: Ingo Molnar commit 9e1725b410594911cc5981b6c7b4cea4ec054ca8 Author: Nadav Amit Date: Wed Oct 3 14:30:54 2018 -0700 x86/refcount: Work around GCC inlining bug As described in: 77b0bf55bc67: ("kbuild/Makefile: Prepare for using macros in inline assembly code to work around asm() related GCC inlining bugs") GCC's inlining heuristics are broken with common asm() patterns used in kernel code, resulting in the effective disabling of inlining. The workaround is to set an assembly macro and call it from the inline assembly block. As a result GCC considers the inline assembly block as a single instruction. (Which it isn't, but that's the best we can get.) This patch allows GCC to inline simple functions such as __get_seccomp_filter(). To no-one's surprise the result is that GCC performs more aggressive (read: correct) inlining decisions in these senarios, which reduces the kernel size and presumably also speeds it up: text data bss dec hex filename 18140970 10225412 2957312 31323694 1ddf62e ./vmlinux before 18140140 10225284 2957312 31322736 1ddf270 ./vmlinux after (-958) 16 fewer static text symbols: Before: 40302 After: 40286 (-16) these got inlined instead. Functions such as kref_get(), free_user(), fuse_file_get() now get inlined. Hurray! [ mingo: Rewrote the changelog. ] Tested-by: Kees Cook Signed-off-by: Nadav Amit Acked-by: Peter Zijlstra (Intel) Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Jan Beulich Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20181003213100.189959-5-namit@vmware.com Signed-off-by: Ingo Molnar commit c06c4d8090513f2974dfdbed2ac98634357ac475 Author: Nadav Amit Date: Wed Oct 3 14:30:53 2018 -0700 x86/objtool: Use asm macros to work around GCC inlining bugs As described in: 77b0bf55bc67: ("kbuild/Makefile: Prepare for using macros in inline assembly code to work around asm() related GCC inlining bugs") GCC's inlining heuristics are broken with common asm() patterns used in kernel code, resulting in the effective disabling of inlining. In the case of objtool the resulting borkage can be significant, since all the annotations of objtool are discarded during linkage and never inlined, yet GCC bogusly considers most functions affected by objtool annotations as 'too large'. The workaround is to set an assembly macro and call it from the inline assembly block. As a result GCC considers the inline assembly block as a single instruction. (Which it isn't, but that's the best we can get.) This increases the kernel size slightly: text data bss dec hex filename 18140829 10224724 2957312 31322865 1ddf2f1 ./vmlinux before 18140970 10225412 2957312 31323694 1ddf62e ./vmlinux after (+829) The number of static text symbols (i.e. non-inlined functions) is reduced: Before: 40321 After: 40302 (-19) [ mingo: Rewrote the changelog. ] Tested-by: Kees Cook Signed-off-by: Nadav Amit Reviewed-by: Josh Poimboeuf Acked-by: Peter Zijlstra (Intel) Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Christopher Li Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-sparse@vger.kernel.org Link: http://lkml.kernel.org/r/20181003213100.189959-4-namit@vmware.com Signed-off-by: Ingo Molnar commit bc51098cdd9573bfdecfd02fc8ed474419d73ea0 Author: Maciej W. Rozycki Date: Tue Oct 2 02:09:05 2018 +0100 rtc: cmos: Remove the `use_acpi_alarm' module parameter for !ACPI Fix a problem with commit 311ee9c151ad ("rtc: cmos: allow using ACPI for RTC alarm instead of HPET") defining `use_acpi_alarm' module parameter even for non-ACPI platforms, which ignore it. Wrap the definition into #ifdef CONFIG_ACPI and use a static inline wrapper function, hardcoded to return 0 and consequently optimized away for !ACPI, following the existing pattern with HPET handling functions. Signed-off-by: Maciej W. Rozycki Fixes: 311ee9c151ad ("rtc: cmos: allow using ACPI for RTC alarm instead of HPET") Cc: stable@vger.kernel.org # 4.18+ Signed-off-by: Alexandre Belloni commit d197a253855d2d8e507a003880aab35c4e2473db Author: Maciej W. Rozycki Date: Tue Oct 2 02:08:49 2018 +0100 rtc: cmos: Fix non-ACPI undefined reference to `hpet_rtc_interrupt' Fix a commit 311ee9c151ad ("rtc: cmos: allow using ACPI for RTC alarm instead of HPET") `rtc-cmos' regression causing a link error: drivers/rtc/rtc-cmos.o: In function `cmos_platform_probe': rtc-cmos.c:(.init.text+0x33c): undefined reference to `hpet_rtc_interrupt' rtc-cmos.c:(.init.text+0x3f4): undefined reference to `hpet_rtc_interrupt' with non-ACPI platforms using this driver. The cause is the change of the condition guarding the use of `hpet_rtc_interrupt'. Previously it was a call to `is_hpet_enabled'. That function is static inline and has a hardcoded 0 result for non-ACPI platforms, which imply !HPET_EMULATE_RTC. Consequently the compiler optimized the whole block away including the reference to `hpet_rtc_interrupt', which never made it to the link stage. Now the guarding condition is a call to `use_hpet_alarm', which is not static inline and therefore the compiler may not be able to prove that it actually always returns 0 for non-ACPI platforms. Consequently the build breaks with an unsatisfied reference, because `hpet_rtc_interrupt' is nowhere defined at link time. Fix the problem by marking `use_hpet_alarm' inline. As the `inline' keyword serves as an optimization hint rather than a requirement the compiler is still free to choose whether inlining will be beneficial or not for ACPI platforms. Signed-off-by: Maciej W. Rozycki Fixes: 311ee9c151ad ("rtc: cmos: allow using ACPI for RTC alarm instead of HPET") Cc: stable@vger.kernel.org # 4.18+ Signed-off-by: Alexandre Belloni commit 77b0bf55bc675233d22cd5df97605d516d64525e Author: Nadav Amit Date: Wed Oct 3 14:30:52 2018 -0700 kbuild/Makefile: Prepare for using macros in inline assembly code to work around asm() related GCC inlining bugs Using macros in inline assembly allows us to work around bugs in GCC's inlining decisions. Compile macros.S and use it to assemble all C files. Currently only x86 will use it. Background: The inlining pass of GCC doesn't include an assembler, so it's not aware of basic properties of the generated code, such as its size in bytes, or that there are such things as discontiuous blocks of code and data due to the newfangled linker feature called 'sections' ... Instead GCC uses a lazy and fragile heuristic: it does a linear count of certain syntactic and whitespace elements in inlined assembly block source code, such as a count of new-lines and semicolons (!), as a poor substitute for "code size and complexity". Unsurprisingly this heuristic falls over and breaks its neck whith certain common types of kernel code that use inline assembly, such as the frequent practice of putting useful information into alternative sections. As a result of this fresh, 20+ years old GCC bug, GCC's inlining decisions are effectively disabled for inlined functions that make use of such asm() blocks, because GCC thinks those sections of code are "large" - when in reality they are often result in just a very low number of machine instructions. This absolute lack of inlining provess when GCC comes across such asm() blocks both increases generated kernel code size and causes performance overhead, which is particularly noticeable on paravirt kernels, which make frequent use of these inlining facilities in attempt to stay out of the way when running on baremetal hardware. Instead of fixing the compiler we use a workaround: we set an assembly macro and call it from the inlined assembly block. As a result GCC considers the inline assembly block as a single instruction. (Which it often isn't but I digress.) This uglifies and bloats the source code - for example just the refcount related changes have this impact: Makefile | 9 +++++++-- arch/x86/Makefile | 7 +++++++ arch/x86/kernel/macros.S | 7 +++++++ scripts/Kbuild.include | 4 +++- scripts/mod/Makefile | 2 ++ 5 files changed, 26 insertions(+), 3 deletions(-) Yay readability and maintainability, it's not like assembly code is hard to read and maintain ... We also hope that GCC will eventually get fixed, but we are not holding our breath for that. Yet we are optimistic, it might still happen, any decade now. [ mingo: Wrote new changelog describing the background. ] Tested-by: Kees Cook Signed-off-by: Nadav Amit Acked-by: Masahiro Yamada Acked-by: Peter Zijlstra (Intel) Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Michal Marek Cc: Peter Zijlstra Cc: Sam Ravnborg Cc: Thomas Gleixner Cc: linux-kbuild@vger.kernel.org Link: http://lkml.kernel.org/r/20181003213100.189959-3-namit@vmware.com Signed-off-by: Ingo Molnar commit e908bcf4f1a271e7c264dcbffc5881ced8bfacee Author: David Howells Date: Thu Oct 4 09:54:29 2018 +0100 rxrpc: Allow the reply time to be obtained on a client call Allow the epoch value to be queried on a server connection. This is in the rxrpc header of every packet for use in routing and is derived from the client's state. It's also not supposed to change unless the client gets restarted. AFS can make use of this information to deduce whether a fileserver has been restarted because the fileserver makes client calls to the filesystem driver's cache manager to send notifications (ie. callback breaks) about conflicting changes from other clients. These convey the fileserver's own epoch value back to the filesystem. Signed-off-by: David Howells commit 2070a3e44962212d6ef02c5def821b1b9744e496 Author: David Howells Date: Thu Oct 4 09:42:29 2018 +0100 rxrpc: Allow the reply time to be obtained on a client call Allow the timestamp on the sk_buff holding the first DATA packet of a reply to be queried. This can then be used as a base for the expiry time calculation on the callback promise duration indicated by an operation result. Signed-off-by: David Howells commit d71019b54bff4b8f52903e354bf3b8cb2b4dfa75 Author: Joe Stringer Date: Tue Oct 2 22:32:26 2018 -0700 net: core: Fix build with CONFIG_IPV6=m Stephen Rothwell reports the following link failure with IPv6 as module: x86_64-linux-gnu-ld: net/core/filter.o: in function `sk_lookup': (.text+0x19219): undefined reference to `__udp6_lib_lookup' Fix the build by only enabling the IPv6 socket lookup if IPv6 support is compiled into the kernel. Signed-off-by: Joe Stringer Signed-off-by: Daniel Borkmann commit 5a790b7375414cffb0f7e8ab0f175d2e02a0af0e Author: David Howells Date: Thu Oct 4 09:32:28 2018 +0100 rxrpc: Drop the local endpoint arg from rxrpc_extract_addr_from_skb() rxrpc_extract_addr_from_skb() doesn't use the argument that points to the local endpoint, so remove the argument. Signed-off-by: David Howells commit 46894a13599a977ac35411b536fb3e0b2feefa95 Author: David Howells Date: Thu Oct 4 09:32:28 2018 +0100 rxrpc: Use IPv4 addresses throught the IPv6 AF_RXRPC opens an IPv6 socket through which to send and receive network packets, both IPv6 and IPv4. It currently turns AF_INET addresses into AF_INET-as-AF_INET6 addresses based on an assumption that this was necessary; on further inspection of the code, however, it turns out that the IPv6 code just farms packets aimed at AF_INET addresses out to the IPv4 code. Fix AF_RXRPC to use AF_INET addresses directly when given them. Fixes: 7b674e390e51 ("rxrpc: Fix IPv6 support") Signed-off-by: David Howells commit 66be646bd9a7d50961afbf48c1d0df148e37d416 Author: David Howells Date: Thu Oct 4 09:32:28 2018 +0100 afs: Sort address lists so that they are in logical ascending order Sort address lists so that they are in logical ascending order rather than being partially in ascending order of the BE representations of those values. Signed-off-by: David Howells commit 4c19bbdc7f7c76da14a7192072c47c3b9b582e80 Author: David Howells Date: Thu Oct 4 09:32:27 2018 +0100 afs: Always build address lists using the helper functions Make the address list string parser use the helper functions for adding addresses to an address list so that they end up appropriately sorted. This will better handles overruns and make them easier to compare. It also reduces the number of places that addresses are handled, making it easier to fix the handling. Signed-off-by: David Howells commit 68eb64c3d2fd558c606dcff6d3e8a2701388a80f Author: David Howells Date: Thu Oct 4 09:32:27 2018 +0100 afs: Do better max capacity handling on address lists Note the maximum allocated capacity in an afs_addr_list struct and discard addresses that would exceed it in afs_merge_fs_addr{4,6}(). Also, since the current maximum capacity is less than 255, reduce the relevant members to bytes. Signed-off-by: David Howells commit b3cfb6f567be00450d33b68f743c066af017a012 Author: David Howells Date: Thu Oct 4 09:32:27 2018 +0100 rxrpc: Emit the data Tx trace line before transmitting Print the data Tx trace line before transmitting so that it appears before the trace lines indicating success or failure of the transmission. This makes the trace log less confusing. Signed-off-by: David Howells commit d2944b1c66a502ada8aa67f508cd29ecbf035892 Author: David Howells Date: Thu Oct 4 09:32:27 2018 +0100 rxrpc: Use rxrpc_free_skb() rather than rxrpc_lose_skb() rxrpc_lose_skb() is now exactly the same as rxrpc_free_skb(), so remove it and use the latter instead. Signed-off-by: David Howells commit 5f26bdceb9c0a5e6c696aa2899d077cd3ae93413 Author: Rafael J. Wysocki Date: Tue Oct 2 23:42:02 2018 +0200 cpuidle: menu: Fix wakeup statistics updates for polling state If the CPU exits the "polling" state due to the time limit in the loop in poll_idle(), this is not a real wakeup and it just means that the "polling" state selection was not adequate. The governor mispredicted short idle duration, but had a more suitable state been selected, the CPU might have spent more time in it. In fact, there is no reason to expect that there would have been a wakeup event earlier than the next timer in that case. Handling such cases as regular wakeups in menu_update() may cause the menu governor to make suboptimal decisions going forward, but ignoring them altogether would not be correct either, because every time menu_select() is invoked, it makes a separate new attempt to predict the idle duration taking distinct time to the closest timer event as input and the outcomes of all those attempts should be recorded. For this reason, make menu_update() always assume that if the "polling" state was exited due to the time limit, the next proper wakeup event for the CPU would be the next timer event (not including the tick). Fixes: a37b969a61c1 "cpuidle: poll_state: Add time limit to poll_idle()" Signed-off-by: Rafael J. Wysocki Acked-by: Peter Zijlstra (Intel) Reviewed-by: Daniel Lezcano commit 35e76b99ddf20405a6196bb7c9eb152675c93106 Author: Nadav Amit Date: Wed Oct 3 14:30:51 2018 -0700 kbuild/arch/xtensa: Define LINKER_SCRIPT for the linker script Define the LINKER_SCRIPT when building the linker script as being done in other architectures. This is required, because upcoming Makefile changes would otherwise break things. Signed-off-by: Nadav Amit Acked-by: Max Filippov Cc: Borislav Petkov Cc: Chris Zankel Cc: Linus Torvalds Cc: Masahiro Yamada Cc: Michal Marek Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-xtensa@linux-xtensa.org Link: http://lkml.kernel.org/r/20181003213100.189959-2-namit@vmware.com Signed-off-by: Ingo Molnar commit 995d5f64b62f20f05b8e0972f07ec4d6c23333c9 Author: Pu Wen Date: Thu Oct 4 09:21:43 2018 +0800 tools/cpupower: Add Hygon Dhyana support The tool cpupower is useful to get CPU frequency information and monitor power stats on the Hygon Dhyana platform. So add Hygon Dhyana support to it by checking vendor and family to share the code path of AMD family 17h. Signed-off-by: Pu Wen Signed-off-by: Borislav Petkov Acked-by: Shuah Khan (Samsung OSG) CC: Prarit Bhargava CC: Shuah Khan CC: Thomas Gleixner CC: Thomas Renninger CC: linux-pm@vger.kernel.org Link: http://lkml.kernel.org/r/5ce86123a7b9dad925ac583d88d2f921040e859b.1538583282.git.puwen@hygon.cn commit 069de633cefc5efd91b9023c6cfeff9914b59348 Author: Bob Moore Date: Wed Oct 3 11:45:39 2018 -0700 ACPICA: Update version to 20181003 Version 20181003 Signed-off-by: Bob Moore Signed-off-by: Erik Schmauss Signed-off-by: Rafael J. Wysocki commit 8b1cafdcb4b75c5027c52f1e82b47ebe727ad7ed Author: Bob Moore Date: Wed Oct 3 11:45:38 2018 -0700 ACPICA: Never run _REG on system_memory and system_IO These address spaces are defined by the ACPI spec to be "always available", and thus _REG should never be run on them. Provides compatibility with other ACPI implementations. Signed-off-by: Bob Moore Signed-off-by: Erik Schmauss Signed-off-by: Rafael J. Wysocki commit 9e9f8733a9a1f1375058b13421258fcd92aca75e Author: Bob Moore Date: Wed Oct 3 11:45:37 2018 -0700 ACPICA: Split large interpreter file New file: exserial.c Signed-off-by: Bob Moore Signed-off-by: Erik Schmauss Signed-off-by: Rafael J. Wysocki commit e324e10109fc4fdd3a7d63cbc4114da978dce835 Author: Bob Moore Date: Wed Oct 3 11:45:36 2018 -0700 ACPICA: Update for field unit access Mostly for access to Generic Serial Bus, but also cleanup for the other fields. Signed-off-by: Bob Moore Signed-off-by: Erik Schmauss Signed-off-by: Rafael J. Wysocki commit f8553720e103821504f86a2a21ffe4c188d47b2f Author: Bob Moore Date: Wed Oct 3 11:45:35 2018 -0700 ACPICA: Rename some of the Field Attribute defines Matches changes to iASL Signed-off-by: Bob Moore Signed-off-by: Erik Schmauss Signed-off-by: Rafael J. Wysocki commit f99b89eefeb635a675b2883fcd2148b7cfc77319 Author: Bob Moore Date: Wed Oct 3 11:45:34 2018 -0700 ACPICA: Update for generic_serial_bus and attrib_raw_process_bytes protocol Cleanup for this write-then-read protocol. The ACPI specification is rather unclear for the entire generic_serial_bus, but this change works correctly on the Surface 3. Reported-by: Hans de Goede Signed-off-by: Bob Moore Signed-off-by: Erik Schmauss Signed-off-by: Rafael J. Wysocki commit 1cdda9486f5103fb133f88e662e48c504adbb779 Author: Rajneesh Bhardwaj Date: Fri Sep 28 14:24:02 2018 +0530 ACPI / PM: LPIT: Register sysfs attributes based on FADT ACPI Low Power S0 Idle capabilities are announced via FADT table and can be used to inform the kernel about the presence of one or more Low Power Idle (LPI) entries as descried in LPIT table. LPIT table can exist independently even if the FADT S0 Idle flag is not set and thus it could confuse user since the following cpuidle attributes are created. /sys/devices/system/cpu/cpuidle/low_power_idle_cpu_residency_us /sys/devices/system/cpu/cpuidle/low_power_idle_system_residency_us Presence or absence of above attributes could mean that the given platform supports S0ix state or not. This change allows to create the above cpuidle attributes only if FADT table supports Low Power S0 Idle. Signed-off-by: Rajneesh Bhardwaj Signed-off-by: Rafael J. Wysocki commit d0381bf4f80c571dde1244fe5b85dc35e8b3f546 Author: Dou Liyang Date: Fri Aug 24 10:51:26 2018 +0800 ACPI / processor: Fix the return value of acpi_processor_ids_walk() ACPI driver should make sure all the processor IDs in their ACPI Namespace are unique. the driver performs a depth-first walk of the namespace tree and calls the acpi_processor_ids_walk() to check the duplicate IDs. But, the acpi_processor_ids_walk() mistakes the return value. If a processor is checked, it returns true which causes the walk break immediately, and other processors will never be checked. Repace the value with AE_OK which is the standard acpi_status value. And don't abort the namespace walk even on error. Fixes: 8c8cb30f49b8 (acpi/processor: Implement DEVICE operator for processor enumeration) Signed-off-by: Dou Liyang Signed-off-by: Rafael J. Wysocki commit f86ad3e0194b6964a058dc223ca80bf81b419cf0 Author: Mark Hairgrove Date: Wed Oct 3 11:51:34 2018 -0700 powerpc/powernv/npu: Remove atsd_threshold debugfs setting This threshold is no longer used now that all invalidates issue a single ATSD to each active NPU. Signed-off-by: Mark Hairgrove Reviewed-by: Alistair Popple Signed-off-by: Michael Ellerman commit 3689c37d23fceb786e74b1a71501f3583223ab39 Author: Mark Hairgrove Date: Wed Oct 3 11:51:33 2018 -0700 powerpc/powernv/npu: Use size-based ATSD invalidates Prior to this change only two types of ATSDs were issued to the NPU: invalidates targeting a single page and invalidates targeting the whole address space. The crossover point happened at the configurable atsd_threshold which defaulted to 2M. Invalidates that size or smaller would issue per-page invalidates for the whole range. The NPU supports more invalidation sizes however: 64K, 2M, 1G, and all. These invalidates target addresses aligned to their size. 2M is a common invalidation size for GPU-enabled applications because that is a GPU page size, so reducing the number of invalidates by 32x in that case is a clear improvement. ATSD latency is high in general so now we always issue a single invalidate rather than multiple. This will over-invalidate in some cases, but for any invalidation size over 2M it matches or improves the prior behavior. There's also an improvement for single-page invalidates since the prior version issued two invalidates for that case instead of one. With this change all issued ATSDs now perform a flush, so the flush parameter has been removed from all the helpers. To show the benefit here are some performance numbers from a microbenchmark which creates a 1G allocation then uses mprotect with PROT_NONE to trigger invalidates in strides across the allocation. One NPU (1 GPU): mprotect rate (GB/s) Stride Before After Speedup 64K 5.3 5.6 5% 1M 39.3 57.4 46% 2M 49.7 82.6 66% 4M 286.6 285.7 0% Two NPUs (6 GPUs): mprotect rate (GB/s) Stride Before After Speedup 64K 6.5 7.4 13% 1M 33.4 67.9 103% 2M 38.7 93.1 141% 4M 356.7 354.6 -1% Anything over 2M is roughly the same as before since both cases issue a single ATSD. Signed-off-by: Mark Hairgrove Reviewed-By: Alistair Popple Signed-off-by: Michael Ellerman commit 7ead15a1442b25e12a6f0791a7c7a5a72d1f3a0c Author: Mark Hairgrove Date: Wed Oct 3 11:51:32 2018 -0700 powerpc/powernv/npu: Reduce eieio usage when issuing ATSD invalidates There are two types of ATSDs issued to the NPU: invalidates targeting a specific virtual address and invalidates targeting the whole address space. In both cases prior to this change, the sequence was: for each NPU - Write the target address to the XTS_ATSD_AVA register - EIEIO - Write the launch value to issue the ATSD First, a target address is not required when invalidating the whole address space, so that write and the EIEIO have been removed. The AP (size) field in the launch is not needed either. Second, for per-address invalidates the above sequence is inefficient in the common case of multiple NPUs because an EIEIO is issued per NPU. This unnecessarily forces the launches of later ATSDs to be ordered with the launches of earlier ones. The new sequence only issues a single EIEIO: for each NPU - Write the target address to the XTS_ATSD_AVA register EIEIO for each NPU - Write the launch value to issue the ATSD Performance results were gathered using a microbenchmark which creates a 1G allocation then uses mprotect with PROT_NONE to trigger invalidates in strides across the allocation. With only a single NPU active (one GPU) the difference is in the noise for both types of invalidates (+/-1%). With two NPUs active (on a 6-GPU system) the effect is more noticeable: mprotect rate (GB/s) Stride Before After Speedup 64K 5.9 6.5 10% 1M 31.2 33.4 7% 2M 36.3 38.7 7% 4M 322.6 356.7 11% Signed-off-by: Mark Hairgrove Reviewed-by: Alistair Popple Signed-off-by: Michael Ellerman commit bad96de8d31ba65dc26645af5550135315ea0b19 Author: Masahiro Yamada Date: Mon Oct 1 15:10:24 2018 +0900 powerpc: remove leftover code of old GCC version checks Clean up the leftover of commit f2910f0e6835 ("powerpc: remove old GCC version checks"). Signed-off-by: Masahiro Yamada Acked-by: Nicholas Piggin Signed-off-by: Michael Ellerman commit f5e284803a7206d43e26f9ffcae5de9626d95e37 Author: Daniel Axtens Date: Mon Oct 1 16:21:51 2018 +1000 powerpc/nohash: fix undefined behaviour when testing page size support When enumerating page size definitions to check hardware support, we construct a constant which is (1U << (def->shift - 10)). However, the array of page size definitions is only initalised for various MMU_PAGE_* constants, so it contains a number of 0-initialised elements with def->shift == 0. This means we end up shifting by a very large number, which gives the following UBSan splat: ================================================================================ UBSAN: Undefined behaviour in /home/dja/dev/linux/linux/arch/powerpc/mm/tlb_nohash.c:506:21 shift exponent 4294967286 is too large for 32-bit type 'unsigned int' CPU: 0 PID: 0 Comm: swapper Not tainted 4.19.0-rc3-00045-ga604f927b012-dirty #6 Call Trace: [c00000000101bc20] [c000000000a13d54] .dump_stack+0xa8/0xec (unreliable) [c00000000101bcb0] [c0000000004f20a8] .ubsan_epilogue+0x18/0x64 [c00000000101bd30] [c0000000004f2b10] .__ubsan_handle_shift_out_of_bounds+0x110/0x1a4 [c00000000101be20] [c000000000d21760] .early_init_mmu+0x1b4/0x5a0 [c00000000101bf10] [c000000000d1ba28] .early_setup+0x100/0x130 [c00000000101bf90] [c000000000000528] start_here_multiplatform+0x68/0x80 ================================================================================ Fix this by first checking if the element exists (shift != 0) before constructing the constant. Signed-off-by: Daniel Axtens Signed-off-by: Michael Ellerman commit c0554d2d3db438623b4f2f9abc3d766b2b15d2fb Merge: bef459026b16 1d2ba7fee28b Author: Ingo Molnar Date: Thu Oct 4 08:23:03 2018 +0200 Merge branch 'linus' into x86/core, to pick up fixes Signed-off-by: Ingo Molnar commit cd3b7116b57527f659b96ff6988d2de3d448c5b3 Author: Takashi Sakamoto Date: Wed Oct 3 08:21:54 2018 +0900 ALSA: oxfw: use managed-resource to maintain cache of stream formats ALSA oxfw driver allocates memory objects for cache of stream formats. The objects are used to maintain packet streaming by components for ALSA rawMIDI/PCM interface. They can be released as managed-resource of 'struct snd_card.card_dev'. This commit uses managed-resource of the sound card device for this purpose. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai commit 72bc8c4378f82307ff09f0959011fef2c818146d Author: Takashi Sakamoto Date: Wed Oct 3 08:21:53 2018 +0900 ALSA: oxfw: use managed-resource to maintain model-specific data ALSA oxfw driver allocates memory objects for data specific to some models. These objects are used to maintain functionalities specific to the models for ALSA rawMIDI/control interfaces. They can be released as managed-resource of 'struct snd_card.card_dev'. This commit uses managed-resource of the sound card device for this purpose. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai commit 784fffbcfe117b508ff628cf296541ab70463140 Author: Takashi Sakamoto Date: Wed Oct 3 08:21:52 2018 +0900 ALSA: fireworks: use managed-resource to maintain response buffer ALSA fireworks driver allocates memory object to handle response from target unit. The object is used to initiate transaction unique to Fireworks board module. This can be released as managed-resource of 'struct snd_card.card_dev'. This commit uses managed-resource of the sound card device for this purpose. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai commit a3aaf7d2bd388caea2bd0fba266b815ac708c49d Author: Takashi Sakamoto Date: Wed Oct 3 08:21:51 2018 +0900 ALSA: bebob: use managed-resource to maintain data specific to M-Audio FW-1814/ProjectMix I/O ALSA bebob driver allocates memory object for data specific to M-Audio FW-1884/ProjectMix I/O. The object is to maintain format of isochronous packet payload for packet streaming by components for ALSA rawMIDI/PCM interfaces. The object can be released as managed-resource of 'struct snd_card.card_dev'. This commit uses managed-resource of the sound card device for this purpose. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai commit 366a20d7a75cff7f89dede6fdfd41bd491aaf8ac Author: Takashi Sakamoto Date: Wed Oct 3 08:21:50 2018 +0900 ALSA: firewire: use managed-resource of fw unit device for private data At present, private data of each driver in ALSA firewire stack is allocated/freed by kernel slab allocator for corresponding unit on IEEE 1394 bus. In this case, resource-managed slab allocator is available to release memory object automatically just before releasing device structure for the unit. This idea can prevent runtime from memory leak due to programming mistakes. This commit uses the allocator for the private data. These drivers already use reference counter to maintain lifetime of device structure for the unit by a pair of fw_unit_get()/fw_unit_put(). The private data is safely released in a callback of 'struct snd_card.private_free(). Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai commit 4a9a72e0db5e584267944f4d868f46419b2fab59 Merge: 2e75b676c328 709ae62e8e6d Author: Takashi Iwai Date: Thu Oct 4 07:52:58 2018 +0200 Merge branch 'for-linus' into for-next Back-merge 4.19-devel branch into 4.20 for applying FireWire patches cleanly. Signed-off-by: Takashi Iwai commit 9434dca95117c493575ab1bd255d323dabf4184a Merge: 09afaba1c3cc 5289976ad887 Author: Kalle Valo Date: Thu Oct 4 08:35:58 2018 +0300 Merge tag 'mt76-for-kvalo-2018-10-01' of https://github.com/nbd168/wireless mt76 patches for 4.20 * unify code between mt76x0, mt76x2 * mt76x0 fixes * tx power configuration fix for 76x2 * more progress on mt76x0e support * support for getting firmware version via ethtool * fix for rx buffer allocation regression on usb * fix for handling powersave responses * fix for mt76x2 beacon transmission commit 09afaba1c3cc83f0f29a3f7614dcef086d21cd3a Merge: 4e6d47206c32 6df0580be8bc Author: Kalle Valo Date: Thu Oct 4 08:33:42 2018 +0300 Merge ath-next from git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git ath.git patches for 4.20. Major changes: ath10k * retrieve MAC address from system firmware if provided * support extended board data download for dual-band QCA9984 * extended per sta tx statistics support via debugfs * average ack rssi support for data frames * speed up QCA6174 and QCA9377 firmware download using diag Copy Engine * HTT High Latency mode support needed by SDIO and USB support * get STA power save state via debugfs ath9k * add reset functionality for airtime station debugfs file commit 6f41617bf23a17d9cb7cc6ca8161534f05f80293 Merge: 7bdaae270cb5 cec4de302c5f Author: David S. Miller Date: Wed Oct 3 21:00:17 2018 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Minor conflict in net/core/rtnetlink.c, David Ahern's bug fix in 'net' overlapped the renaming of a netlink attribute in net-next. Signed-off-by: David S. Miller commit deac8703da5faafce96be3f91c668dcd5da931a5 Author: Dave Gerlach Date: Wed Oct 3 16:13:15 2018 +0530 PM / OPP: _of_add_opp_table_v2(): increment count only if OPP is added Currently the _of_add_opp_table_v2 call loops through the OPP nodes in the operating-points-v2 table in the device tree and calls _opp_add_static_v2 for each to add them to the table. It counts each iteration through this loop as an added OPP, however there are cases where _opp_add_static_v2() returns 0 but no new OPP is added to the list. This can happen while adding duplicate OPP or if the OPP isn't supported by hardware. Because of this the count variable will contain the number of OPP nodes in the table in device tree but not necessarily the ones that are actually added. As this count value is what is checked to determine if there are any valid OPPs, if a platform has an operating-points-v2 table with all OPP nodes containing opp-supported-hw values that are not currently supported, then _of_add_opp_table_v2 will fail to abort as it should due to an empty table. Additionally, since commit 3ba98324e81a ("PM / OPP: Get performance state using genpd helper"), the same count variable is compared against the number of OPPs containing performance states and requires that either all or none have pstates set, however in the case of any opp table that has any entries that do not get added by _opp_add_static_v2 due to incompatible opp-supported-hw fields, these numbers will not match and _of_add_opp_table_v2 will incorrectly fail. We need to clearly identify all the three cases (success, failure, unsupported/duplicate OPPs) and then increment count only on success case. Change return type of _opp_add_static_v2() to return the pointer to the newly added OPP instead of an integer. This routine now returns a valid pointer if the OPP is really added, NULL for unsupported or duplicate OPPs, and error value cased as a pointer on errors. Ideally the fixes tag in this commit should point back to the commit that introduced OPP v2 initially, as that's where we started incorrectly accounting for duplicate OPPs: commit 274659029c9d ("PM / OPP: Add support to parse "operating-points-v2" bindings") But it wasn't a real problem until recently as the count was only used to check if any OPPs are added or not. And so this commit points to a rather recent commit where we added more code that depends on the value of "count". Fixes: 3ba98324e81a ("PM / OPP: Get performance state using genpd helper") Reported-by: Dave Gerlach Reported-by: Niklas Cassel Tested-by: Niklas Cassel Signed-off-by: Dave Gerlach Signed-off-by: Viresh Kumar commit 51c99dd2c06b234575661fa1e0a1dea6c3ef566f Author: Viresh Kumar Date: Wed Oct 3 15:35:21 2018 +0530 cpufreq: dt: Try freeing static OPPs only if we have added them We can not call dev_pm_opp_of_cpumask_remove_table() freely anymore since the latest OPP core updates as that uses reference counting to free resources. There are cases where no static OPPs are added (using DT) for a platform and trying to remove the OPP table may end up decrementing refcount which is already zero and hence generating warnings. Lets track if we were able to add static OPPs or not and then only remove the table based on that. Some reshuffling of code is also done to do that. Reported-by: Niklas Cassel Tested-by: Niklas Cassel Signed-off-by: Viresh Kumar commit 09f662f95306f3e3d47ab6842bc4b0bb868a80ad Author: Viresh Kumar Date: Wed Oct 3 15:22:03 2018 +0530 OPP: Return error on error from dev_pm_opp_get_opp_count() Return error number instead of 0 on failures. Fixes: a1e8c13600bf ("PM / OPP: "opp-hz" is optional for power domains") Signed-off-by: Viresh Kumar commit 50b6b87c8484da8bb5dcce00f84ec80aee8fc2bd Author: Viresh Kumar Date: Wed Oct 3 15:12:06 2018 +0530 OPP: Improve error handling in dev_pm_opp_of_cpumask_add_table() The error handling wasn't appropriate in dev_pm_opp_of_cpumask_add_table(). For example it returns 0 on success and also for the case where cpumask is empty or cpu_device wasn't found for any of the CPUs. It should really return error on such cases, so that the callers can be aware of the outcome. Fix it. Signed-off-by: Viresh Kumar commit fe33507ec38a8b2e8b782b83669943b7a5fefd4c Author: Parav Pandit Date: Fri Sep 21 09:18:24 2018 -0500 RDMA/core: Check error status of rdma_find_ndev_for_src_ip_rcu rdma_find_ndev_for_src_ip_rcu() returns either valid netdev pointer or ERR_PTR(). Instead of checking for NULL, check for error. Fixes: caf1e3ae9fa6 ("RDMA/core Introduce and use rdma_find_ndev_for_src_ip_rcu") Reported-by: syzbot+20c32fa6ff84a2d28c36@syzkaller.appspotmail.com Signed-off-by: Parav Pandit Signed-off-by: Jason Gunthorpe commit c530174b90fa3bcaa83d168b001b574bcb2da021 Merge: 41050757fd5b 3dae1c0919d8 Author: Dave Airlie Date: Thu Oct 4 11:30:58 2018 +1000 Merge branch 'for-upstream/mali-dp' of git://linux-arm.org/linux-ld into drm-next misc mali-dp updates. Signed-off-by: Dave Airlie From: Liviu Dudau Link: https://patchwork.freedesktop.org/patch/msgid/20181003105009.GD1156@e110455-lin.cambridge.arm.com commit 41050757fd5bb063d45e3cc2cda4bca10d9b82b5 Merge: 6004f172b375 4fdce78ab901 Author: Dave Airlie Date: Thu Oct 4 11:28:54 2018 +1000 Merge tag 'tilcdc-4.20' of https://github.com/jsarha/linux into drm-next drm/tilcdc changes for Linux v4.20 suspend/resume update. Signed-off-by: Dave Airlie From: Jyri Sarha Link: https://patchwork.freedesktop.org/patch/msgid/bd8d6b40-d3d6-8e24-9d48-6201b860aceb@ti.com commit 6004f172b375f5747e89afc62ad3baaf1bebd58a Merge: 612c6bd5e3f8 17b57b1883c1 Author: Dave Airlie Date: Thu Oct 4 11:03:34 2018 +1000 BackMerge v4.19-rc6 into drm-next I have some pulls based on rc6, and I prefer to have an explicit backmerge. Signed-off-by: Dave Airlie commit 546cba0623df695ac84c10a821cf98fea24b2a18 Author: Kunihiko Hayashi Date: Tue Oct 2 20:12:02 2018 +0900 arm64: dts: uniphier: Add USB2 PHY nodes Add nodes of USB2 physical layer for UniPhier SoC. This supports LD11. Signed-off-by: Kunihiko Hayashi Signed-off-by: Masahiro Yamada commit d7b9beb830d7c94a7c75bdda46d1308328b0a66d Author: Kunihiko Hayashi Date: Tue Oct 2 20:12:01 2018 +0900 arm64: dts: uniphier: Add USB3 controller nodes Add USB3 controller nodes including usb-core, resets, regulator, ss-phy and hs-phy. This supports for LD20, PXs3 and the boards. This includes additional efuse nodes for obtaining PHY trimming values. Signed-off-by: Kunihiko Hayashi Signed-off-by: Masahiro Yamada commit 8bb2f53203a3925799cd4b557069be662413ac0b Author: Kunihiko Hayashi Date: Tue Oct 2 20:12:00 2018 +0900 ARM: dts: uniphier: Add USB2 PHY nodes Add nodes of USB2 physical layer for UniPhier SoC. This supports Pro4. Signed-off-by: Kunihiko Hayashi Signed-off-by: Masahiro Yamada commit 612c6bd5e3f8b67505316805dc15369598f6ff57 Merge: b20b515a5fe6 6ac99a328ee1 Author: Dave Airlie Date: Thu Oct 4 10:40:35 2018 +1000 Merge tag 'exynos-drm-next-for-v4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-next Add out-bridge support - This patch series enables out-bridge for LVDS bridge device support, and also includes two cleanups and one relevant dt binding update for this. Add Samsung 16x16 tiled format support - This patch series adds Samsung 16x16 tiled format to scaler and gsc drivers. As for this, it adds Samsung specific format to drm_forcc.h header. For the git-pull request with relevant patches, I requested ack-by[1] to relevant maintainers but there was no any response. I'm pretty sure no problem to go to mainline though Exynos tree because the only user of it is Exynos. (airlied: this looked fine to me) [1] https://patchwork.freedesktop.org/patch/243921/ Add configurable plane alpha and pixel blend mode support - This patch series makes mixer driver to be configuragle for pixel blend mode and plane alpha, which also includes one fixup to set all default values correctly after reset. One cleanup - This patch replaces drm_atomic_helper_suspend/resume() with drm_mode_config_helper_suspend/resume() to remove exynos specific suspend_state. Signed-off-by: Dave Airlie From: Inki Dae Link: https://patchwork.freedesktop.org/patch/msgid/1538380891-24040-1-git-send-email-inki.dae@samsung.com commit 45be1573ad1916bde112cc4d168ffa48a18e9b4e Author: Kunihiko Hayashi Date: Tue Oct 2 20:11:59 2018 +0900 ARM: dts: uniphier: Add USB3 controller nodes Add USB3 controller nodes including usb-core, resets, regulator, ss-phy and hs-phy. This supports for Pro4, PXs2 and the boards. Signed-off-by: Kunihiko Hayashi Signed-off-by: Masahiro Yamada commit b20b515a5fe66098efba42efa1d504512a3f029e Merge: 29b90203f827 2e65c7a6a15f Author: Dave Airlie Date: Thu Oct 4 10:38:23 2018 +1000 Merge tag 'omapdrm-4.20-2' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux into drm-next omapdrm fixes and cleanups for 4.20 - fix memory barrier bug in DMM driver - fix interrupt management in DMM driver - partial workaround for errata i878 - fix use of freed memory - some cleanups Signed-off-by: Dave Airlie From: Tomi Valkeinen Link: https://patchwork.freedesktop.org/patch/msgid/36bdd576-2b5c-d69e-24af-05572652b08e@ti.com commit 29b90203f8274d41b20719f5e91e4070a28685bf Merge: d04a836ea76c 4be9bd10e22d Author: Dave Airlie Date: Thu Oct 4 10:37:30 2018 +1000 Merge tag 'drm-misc-next-fixes-2018-10-03' of git://anongit.freedesktop.org/drm/drm-misc into drm-next - Add EXPERT config option to allow phys mem leak from fbdev for blob drivers (Neil) Cc: Neil Armstrong Signed-off-by: Dave Airlie From: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20181003195957.GA64584@art_vandelay commit bdacdcf20bb5373fb81ba842d36f0b41a7be69b1 Author: Jordan Crouse Date: Fri Sep 28 08:27:56 2018 -0600 drm/msm/a6xx: Add inactive_period for a6xx The target definition for a630 didn't set a reasonable value for inactive_period so it defaulted to zero and we were essentially powering down after every submission. Set it back to the default value to keep the GPU from bouncing too much during regular workloads. Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark commit 4d8dc2dfae2c486b54bb082918a398a22b97cf85 Author: Thomas Zimmermann Date: Wed Sep 26 13:48:59 2018 +0200 drm/msm: 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: Rob Clark commit 64686886bbffe47a0b390f2073364ca04f7c2c71 Author: Thomas Zimmermann Date: Wed Sep 26 13:48:58 2018 +0200 drm/msm: Replace drm_gem_object_{un/reference} with put, get functions 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. Signed-off-by: Thomas Zimmermann Reviewed-by: Jordan Crouse Signed-off-by: Rob Clark commit f2152d492ca4ff6d53b37edf1a137480c909f6ce Author: Thomas Zimmermann Date: Wed Sep 26 13:48:57 2018 +0200 drm/msm: Replace drm_framebuffer_{un/reference} with put, get functions This patch unifies the naming of DRM functions for reference counting of struct drm_framebuffer. The resulting code is more aligned with the rest of the Linux kernel interfaces. Signed-off-by: Thomas Zimmermann Signed-off-by: Rob Clark commit df0dff132905974697e2a19aa8bcc0ecc447c00e Author: Jordan Crouse Date: Thu Sep 20 17:04:43 2018 -0600 drm/msm/a6xx: Poll for HFI responses The only HFI communication with the GMU on sdm845 happens during initialization and all commands are synchronous. A fancy interrupt tasklet and associated infrastructure is entirely not eeded and puts us at the mercy of the scheduler. Instead poll for the message signal and handle the response immediately and go on our way. Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark commit 32aa27e15c28d3898ed6f9b3c98f95f34a81eab2 Author: Jordan Crouse Date: Fri Sep 14 09:03:46 2018 -0600 msm/gpu/a6xx: Force of_dma_configure to setup DMA for GMU The point of the 'force_dma' parameter for of_dma_configure is to force the device to be set up even if DMA capability is not described by the firmware which is exactly the use case we have for GMU - we need SMMU to get set up but we have no other dma capabilities since memory is managed by the GPU driver. Currently we pass false so of_dma_configure() fails and subsequently GMU and GPU probe does as well. Fixes: 4b565ca5a2c ("drm/msm: Add A6XX device support") Signed-off-by: Jordan Crouse Tested-by: Sibi Sankar Signed-off-by: Rob Clark commit fc6510ac4900db98851cabfd44a4a510b2d22db3 Author: Sharat Masetty Date: Fri Sep 14 14:08:55 2018 +0530 drm/msm/a5xx: Skip hardware preemption init if no preemption In the case where preemption is not enabled, this patch simply skips preemption related initialization in hardware init sequence. Signed-off-by: Sharat Masetty Reviewed-by: Jordan Crouse Signed-off-by: Rob Clark commit dfdb3be43ef1195c491e6c3760b922acb52e3575 Author: Colin Ian King Date: Tue Aug 21 12:55:19 2018 +0100 drm/msm: fix unsigned comparison with less than zero The return from the call to _mixer_stages can be a negative error code however this is being assigned to an unsigned variable 'stages' hence the check is always false. Fix this by making 'stages' an int. Detected by Coccinelle ("Unsigned expression compared with zero: stages < 0") Fixes: 25fdd5933e4c ("drm/msm: Add SDM845 DPU support") Signed-off-by: Colin Ian King Signed-off-by: Rob Clark commit f8fc924e088ef49da5ab99a227d176facf47c25c Author: Jordan Crouse Date: Wed Aug 8 16:39:38 2018 -0600 drm/msm/a6xx: Fix PDC register overlap The current design greedily takes a big chunk of the PDC register space instead of just the GPU specific sections which conflicts with other drivers and generally makes a mess of things. Furthermore we only need to map the GPU PDC sections just once during init so map the memory inside the function that uses it and adjust the pointers and register offsets accordingly. Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark commit 06feed5618e7cb0b3bf3e279f029f8ce1b7ea0b9 Author: Jordan Crouse Date: Wed Aug 8 16:38:52 2018 -0600 drm/msm/a6xx: Rename gmu phandle to qcom,gmu >From the review for the DT bindings for the GPU/GMU it was suggested that the phandle for the GMU be 'qcom,gmu' instead of just 'gmu'. Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark commit 6969019f65b43afb6da6a26f1d9e55bbdfeebcd5 Author: Anders Roxell Date: Tue Jul 31 22:45:32 2018 +0200 drm/msm/gpu: fix parameters in function msm_gpu_crashstate_capture When CONFIG_DEV_COREDUMP isn't defined msm_gpu_crashstate_capture doesn't pass the correct parameters. drivers/gpu/drm/msm/msm_gpu.c: In function ‘recover_worker’: drivers/gpu/drm/msm/msm_gpu.c:479:34: error: passing argument 2 of ‘msm_gpu_crashstate_capture’ from incompatible pointer type [-Werror=incompatible-pointer-types] msm_gpu_crashstate_capture(gpu, submit, comm, cmd); ^~~~~~ drivers/gpu/drm/msm/msm_gpu.c:388:13: note: expected ‘char *’ but argument is of type ‘struct msm_gem_submit *’ static void msm_gpu_crashstate_capture(struct msm_gpu *gpu, char *comm, ^~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/msm/msm_gpu.c:479:2: error: too many arguments to function ‘msm_gpu_crashstate_capture’ msm_gpu_crashstate_capture(gpu, submit, comm, cmd); ^~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/msm/msm_gpu.c:388:13: note: declared here static void msm_gpu_crashstate_capture(struct msm_gpu *gpu, char *comm, In current code the function msm_gpu_crashstate_capture parameters. Fixes: cdb95931dea3 ("drm/msm/gpu: Add the buffer objects from the submit to the crash dump") Signed-off-by: Anders Roxell Reviewed-By: Jordan Crouse Signed-off-by: Rob Clark commit 9fb4bfd0be010371d3fdd2280e9d99f315382379 Author: Sharat Masetty Date: Thu Sep 27 22:16:22 2018 +0530 drm/msm/a6xx: Send the right perf index value to GMU The index of the perf table was being set in the wrong bit position in the register. With this fix, the GPU clock can be seen running at desired frequency. Signed-off-by: Sharat Masetty Signed-off-by: Rob Clark commit b689a830f5264e3a53307ba468e376e9f95f15e0 Author: Rob Clark Date: Tue Sep 25 13:54:00 2018 -0400 drm/msm/rd: fix crash with long process cmdlines The [v]snprintf() functions return the size that *would have* been written into the buffer, rather than the size *actually* written. Which results in us trying to memcpy() past the end of the stack. What we really want is [v]scnprintf(). Signed-off-by: Rob Clark commit 9027b8719bd4f46b09c6b9d082715209c17971e2 Author: Sean Paul Date: Mon Sep 17 16:49:32 2018 -0400 drm/msm: dpu: Don't reset dpu_enc->cur_master on .disable() cur_master in dpu_encoder is assigned at modeset and cleared on .disable(). Unfortunately dpms (or enable/disable) does not guarantee a modeset, so cur_master is NULL when we try to re-enable it. This patch moves the NULL assignment to setup_display where it will be re-assigned later in the function. Tested-by: Bruce Wang Reviewed-by: Jeykumar Sankaran Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit 8527b2d836571c20c9ed0934668595f9bba8175e Author: Bruce Wang Date: Tue Sep 25 17:10:25 2018 -0400 drm/msm/dpu: Revise _dpu_plane_get_aspace Remove unneeded checks from _dpu_plane_get_aspace. v3: change _dpu_plane_get_aspace to return a struct *msm_gem_address_space instead passing in a pointer of the same type to edit. Remove uneeded arguments. Reviewed-by: Jordan Crouse Signed-off-by: Bruce Wang Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit 7b2e7adea732c68ae8bb3d232aacd9a6d4937585 Author: Bruce Wang Date: Mon Sep 24 12:22:27 2018 -0400 drm/msm/dpu: Make dpu_plane_danger_signal_ctrl void Removed all impossible checks from the function, which eliminates the need for a return value. This function is also never used outside of dpu_plane.c, so the function is made static. v3: Using helper function _dpu_plane_get_kms() instead of doing it locally. Signed-off-by: Bruce Wang Reviewed-by: Sean Paul Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit 1da03408e256435492bd33675aaa703699df37f1 Author: Bruce Wang Date: Mon Sep 24 12:22:26 2018 -0400 drm/msm/dpu: Change _dpu_crtc_vblank_enable_no_lock to void Removes redundant tests for _dpu_crtc_vblank_enable_no_lock. Function return type is now void and all function calls have been changed accordingly. Signed-off-by: Bruce Wang Reviewed-by: Sean Paul Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit 9a9ede3f719379c4edc7dcc60b00f44db77b9b74 Author: Bruce Wang Date: Wed Sep 26 17:28:59 2018 -0400 drm/msm/dpu: Remove _dpu_crtc_power_enable All checks for _dpu_crtc_power_enable are not true, so the function can never return an error code. This removes the need for the function as pm_runtime functions can be used instead. v3: Separated _dpu_crtc_power_enable into _dpu_crtc_power_enable and _dpu_crtc_power_disable for clarity. v4: Removed both _dpu_crtc_power_enable and _dpu_crtc_power_disable and called pm_runtime_get_sync and pm_runtime_put_sync from all call points Reviewed-by: Jordan Crouse Signed-off-by: Bruce Wang Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit 04b96b63c5640a305e30611def7a9c5fcd7a72cf Author: Bruce Wang Date: Mon Sep 24 12:22:24 2018 -0400 drm/msm/dpu: Remove unneeded checks in dpu_crtc.c Removes impossible checks in dpu_crtc.c. Variable assignments are moved up to be initializations where possible. Some variables are no longer used, these are removed. v3: reverted back to original patch Reviewed-by: Sean Paul Reviewed-by: Jordan Crouse Signed-off-by: Bruce Wang Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit ad444e55303c605d0d23b9b2a012a4e0c584834a Author: Bruce Wang Date: Mon Sep 24 12:22:23 2018 -0400 drm/msm/dpu: Clean up plane atomic disable/update Removes unnecessary checks from dpu_plane_atomic_disable, old_state argument for both dpu_plane_atomic_disable and dpu_plane_sspp_atomic_update is removed as it is no longer used. Reviewed-by: Sean Paul Reviewed-by: Jordan Crouse Signed-off-by: Bruce Wang Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit 1bd5a13b7986da7273eb26f117760b8331265e3b Author: Bruce Wang Date: Mon Sep 24 12:22:22 2018 -0400 drm/msm/dpu: Remove unneeded checks in dpu_plane.c Removes some checks from dpu_plane.c that will never result in an error. Subsequent variable assignments become part of the initialization wherever possible. Unused variables are removed. v3: removed additional impossible checks and called helper function _dpu_plane_get_kms() where possible. Reviewed-by: Sean Paul Reviewed-by: Jordan Crouse Signed-off-by: Bruce Wang Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit f65f035f197175ebebf002bcaad8974582c372f2 Author: Sean Paul Date: Wed Sep 19 14:33:50 2018 -0400 drm/msm: dpu: Don't store/deref pointers in trace ringbuffer TP_printk is not synchronous, so storing pointers and then later dereferencing them is a Bad Idea. This patch stores everything locally to avoid display stomped memory. Reviewed-by: Abhinav Kumar [seanpaul fixed up commit msg typo on apply] Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit 1bb4e701aad10a57bcab41e1996570c881aa6be7 Author: Sean Paul Date: Wed Sep 19 14:33:49 2018 -0400 drm/msm: dpu: Add extra_flush_bits to trigger_flush trace It's useful to know which bits of the flush come from extra_flush_bits Reviewed-by: Abhinav Kumar Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit b65bd0454258b07d4f6db9aa1eca55ae530c4802 Author: Sean Paul Date: Wed Sep 19 14:33:48 2018 -0400 drm/msm: dpu: Clear frame_busy_mask bit after trace We're printing the frame_busy_mask in a trace, but after it's been cleared. This, as it turns out, is pretty pointless. Reviewed-by: Abhinav Kumar Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit 5923005d6a62567a59db1ec3cffc317d46a25143 Author: Sean Paul Date: Wed Sep 12 09:54:59 2018 -0400 drm/msm: dpu: Don't continue after error in atomic_check There's no benefit in falling out of the if, just return directly. Changes in v2: - None Reviewed-by: Jeykumar Sankaran Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit 2682cefea4c8078adeba4d74b7286e38fb631208 Author: Sean Paul Date: Wed Sep 12 09:54:58 2018 -0400 drm/msm: dpu: Make dpu_plane_sspp_atomic_update() void All of the checks in dpu_plane_sspp_atomic_update() are impossible, so remove them and make the function void. This removes the need to error check in dpu_plane_atomic_update(). Additionally, remove impossible checks in dpu_plane_atomic_update(). Changes in v2: - None Reviewed-by: Jeykumar Sankaran Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit e1ba78fcee04de09f5da309600af8a6eb1086387 Author: Sean Paul Date: Wed Sep 12 09:54:57 2018 -0400 drm/msm: dpu: Remove dpu_plane_enabled() plane->state->visible encompasses all of these checks and more, so we can just check visible. Changes in v2: - None Reviewed-by: Jeykumar Sankaran Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit 31ab6bff07c47c1cee4aa8d0962fdd8229d9873c Author: Sean Paul Date: Wed Sep 12 09:54:56 2018 -0400 drm/msm: dpu: Remove dpu_plane_sspp_enabled() It's doing the same thing dpu_plane_enabled() is. Changes in v2: - None Reviewed-by: Jeykumar Sankaran Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit 2a7a92fc31c2c02d0d06fbcf178403cd5889f59b Author: Sean Paul Date: Wed Sep 12 09:54:55 2018 -0400 drm/msm: dpu: Consolidate atomic_check functions() dpu_plane_atomic_check() is a very thin wrapper around dpu_plane_sspp_atomic_check(). All it does is a NULL-check of state->fb, which is already done by drm_atomic_helper_check_plane_state(). Further, the helper sets state->visible = false when this is true. So remove dpu_plane_atomic_check() and just use dpu_plane_sspp_atomic_check() directly. Changes in v2: - Fix spelling mistake in Subject (Jeykumar) Reviewed-by: Jeykumar Sankaran Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit 8df14b3e6ab367bdd939d52871ad80faf70ae8db Author: Sean Paul Date: Wed Sep 12 09:54:54 2018 -0400 drm/msm: dpu: Move atomic_check_plane_state() call to atomic_check src/dst rects are checked in both atomic_check and atomic_update, with the more comprehensive check occurring in atomic_update, which is backwards. So consolodate the checks in atomic_check. Changes in v2: - Use the correct crtc state (Jeykumar) Cc: Jeykumar Sankaran Reviewed-by: Jeykumar Sankaran Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit 3d04dc1444be774d8b474962d01b65306756ec54 Author: Sean Paul Date: Wed Sep 12 09:54:53 2018 -0400 drm/msm: dpu: Remove impossible checks This patch removes some checks which are impossible to hit. As a result, we can move some of the local var assignments into the declarations. Changes in v2: - None Reviewed-by: Jeykumar Sankaran Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit a8141bdbb4c90d41b41005c664fb1b35d29a1b54 Author: Jordan Crouse Date: Thu Sep 13 10:46:15 2018 -0600 drm/msm/dpu: Remove an unused enum enum dpu_ad isn't used and can be safely removed. Reviewed-by: Jeykumar Sankaran Signed-off-by: Jordan Crouse Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit ad92af7ec4c89dce1538a73f0741ac134b50bb12 Author: Jeykumar Sankaran Date: Fri Sep 7 17:24:27 2018 -0700 drm/msm/dpu: remove RM topology definition RM maintained a redundant definition for display topology to identify the no. of hw blocks needed for a display and their hardware dependencies. This information can be implicitly deduced from the msm_display_topology structure available in RM reserve request. In addition to getting rid of the redundant topology, this change also removes the topology name enums and their usages. changes in v4: - remove the topology name enum entirely (Sean) changes in v5: - remove RM topology definition and their references (Sean) - Implement helper for dual mixer CRTC (Sean) changes in v6: - avoid heap memory for topology (Sean) Signed-off-by: Jeykumar Sankaran Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit 157b9ce7f12d788eec7aef33738e054624d40a8a Author: Jeykumar Sankaran Date: Fri Sep 7 17:24:26 2018 -0700 drm/msm/dpu: relax parameter validation in encoders DPU, being over protective, validates every parameter of a module. This change traces the call stack for some of encoder functions affected by previous set of clean up patches and cleans up unwanted validations. changes in v5: - Introduced in the series changes in v6: - none Signed-off-by: Jeykumar Sankaran Reviewed-by: Sean Paul Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit 32ecf92a3d0106d83478c223beb927bef2ab6df7 Author: Jeykumar Sankaran Date: Fri Sep 7 17:24:25 2018 -0700 drm/msm/dpu: remove RM dependency on connector state Connector states were passed around RM to update the custom topology connector property with chosen topology data. Now that we got rid of both custom properties and topology names, this change cleans up the mechanism to pass connector states across RM helpers and encoder functions. changes in v5: - Introduced in the series changes in v6: - remove parameter checking in rm reserve (Jordan) Signed-off-by: Jeykumar Sankaran Reviewed-by: Sean Paul Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit d0a1381612e0822e893dec6b242be2455c5ffb6d Author: Jeykumar Sankaran Date: Wed Sep 5 19:08:25 2018 -0700 drm/msm/dpu: remove display H_TILE from encoder Encoder H_TILE values are not used for allocating the hw blocks. no. of hw_intf blocks provides the info. changes in v4: - remove irrelevant changes (Sean) - retain log macros (Sean) changes in v5: - none Signed-off-by: Jeykumar Sankaran Reviewed-by: Sean Paul Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit 4a0dc640c550ebf8acddbc3c614f96da2cfdd7fb Author: Jeykumar Sankaran Date: Wed Sep 5 19:08:24 2018 -0700 drm/msm/dpu: remove LOCK/CLEAR support in RM DPU had the support to LOCK the hw resources in atomic check and CLEAR the locked resources explicitly through custom property values. Now that DPU is stripped off of all the custom properties, the RM handlers for this feature will be no-op's. This change gets rid of all its references. changes in v5: - Introduced in the series. Signed-off-by: Jeykumar Sankaran Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit 9816b2266567a075c9dbe97858334c17fd7303b7 Author: Jeykumar Sankaran Date: Wed Sep 5 19:08:23 2018 -0700 drm/msm/dpu: remove cdm block support from resource manager Support for CDM block is not present in DPU. Remove CDM handlers from resource manager. changes in v4: - Introduced in the series changes in v5: - Remove catalog references to CDM (Sean) Signed-off-by: Jeykumar Sankaran Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit b033def8741aab3fb58e4bf6c1d5cd73b3beb357 Author: Jeykumar Sankaran Date: Wed Sep 5 19:08:22 2018 -0700 drm/msm/dpu: clean up destination scaler residue Destination scaling(DS) is a Snapdragon hardware feature to scale up the display ROI after layer blending. DPU driver doesn't support programming of DS blocks yet. This change cleans up the residual code present in catalog and RM for DS block handling. Support for the same can be added back when the feature is formally implemented. changes in v5: - introduced in the series Signed-off-by: Jeykumar Sankaran Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit cf6916f461475bde76ecf4dfb0dc4d38bec579ef Author: Jeykumar Sankaran Date: Wed Sep 5 19:08:21 2018 -0700 drm/msm/dpu: rename hw_ctl to lm_ctl Rename hw_ctl to lm_ctl to mean the ctl associated with the hw layer mixer block. sed -i 's/\([*@.>]\)hw_ctl\([^s]\)/\1lm_ctl\2/g' dpu_crtc.c dpu_crtc.h changes in v4: - Specifiy shell command used for renaming (Sean) changes in v5: - none Signed-off-by: Jeykumar Sankaran Reviewed-by: Sean Paul Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit 9222cdd27e823cacac23fce7548413eebdaf0eb7 Author: Jeykumar Sankaran Date: Wed Sep 5 19:08:20 2018 -0700 drm/msm/dpu: move hw resource tracking to crtc state Prep changes for state based resource management. Moves all the hw block tracking for the crtc to the state object. changes in v4: - Serialize crtc state access in debugfs handlers (Sean) - Split the crtc width query as a separate change (Sean) changes in v5: - mode set lock all before crtc state access (Sean) - remove unwanted memset for hw mixer cache (Sean) Signed-off-by: Jeykumar Sankaran Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit 42331668786f5f65e90efb485a686fe456c04131 Author: Jeykumar Sankaran Date: Wed Sep 5 19:08:19 2018 -0700 drm/msm/dpu: make crtc get_mixer_width helper static Mark CRTC get_mixer_width helper API static as it is not used outside the file. changes in v4: - Patch introduced in the series changes in v5: - Simplify the inline function (Sean) Signed-off-by: Jeykumar Sankaran Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit 906216baa0a81a6bae17f8b7616757eeed3e44fa Author: Jeykumar Sankaran Date: Wed Sep 5 19:08:18 2018 -0700 drm/msm/dpu: avoid querying for hw intf before assignment Resource manager assigns hw_intf blocks for the encoder only on modeset. If queried for hw_intf objects during init, it will be NULL. Since hw_intf objects are needed only after encoder enable, defer the query to encoder enable which will be triggered after modeset. changes in v4: - Add details on commit text on why the change is needed (Sean) changes in v5: - Reword commit text on the usage of hw_intf objects (Sean) Signed-off-by: Jeykumar Sankaran Reviewed-by: Sean Paul Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit 3f4db2e2cc412811697a784d6e42759fe9ea974d Author: Jeykumar Sankaran Date: Wed Sep 5 19:08:17 2018 -0700 drm/msm/dpu: iterate for assigned hw ctl in virtual encoder In virtual encoder modeset, DPU makes RM request to assign hw blocks for the display. It is also expected in modeset to iterate and associate the physical encoders with their relevant hw blocks. Ping pong blocks are already handled here but hw ctl blocks are not. This change moves the hw_ctl iteration and mapping from physical encoder to virtual encoder. changes in v4: - Fix hw_ctl initialization (Sean) changes in v5: - Update commit text with details on why the change is needed (Sean) Signed-off-by: Jeykumar Sankaran Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit 57250ca5433306774e7f83b11503609ed1bf28cf Author: Jeykumar Sankaran Date: Wed Sep 5 19:08:16 2018 -0700 drm/msm/dpu: use kms stored hw mdp block Avoid querying RM for hw mdp block. Use the one stored in KMS during initialization. changes in v4: - none changes in v5: - none Signed-off-by: Jeykumar Sankaran Reviewed-by: Sean Paul Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit 86b89080368b4695909bd9d06de3b8a85518aadb Author: Jeykumar Sankaran Date: Wed Sep 5 19:08:15 2018 -0700 drm/msm/dpu: enable master-slave encoders explicitly Identify slave-master encoders during initialization and enable the encoders explicitly as the current logic has redundant and ambiguous loops. changes in v4: - identify master/slave encoder while adding adding physical encoders(Sean) changes in v5: - get rid of temporary variable for phys enc(Sean) Signed-off-by: Jeykumar Sankaran Reviewed-by: Sean Paul Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit cb307ba34026d34592789b37e2c34f36c8e97f21 Author: Jeykumar Sankaran Date: Wed Sep 5 19:08:14 2018 -0700 drm/msm/dpu: remove ping pong split topology variables removes left out variables of previous ping pong split topology cleanup. changes in v4: - none changes in v5: - none Signed-off-by: Jeykumar Sankaran Reviewed-by: Sean Paul Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit 726bcbb7d615334bff509a079456cbaf0736baed Author: Jeykumar Sankaran Date: Wed Sep 5 19:08:13 2018 -0700 drm/msm/dpu: remove resource pool manager resource pool manager utility was introduced to manage rotator sessions. Removing the support as the rotator feature doesn't exist. changes in v4: - none changes in v5: - none Signed-off-by: Jeykumar Sankaran Reviewed-by: Sean Paul Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit a9a0a61af8067e284b47042ba611689a4a26d8d3 Author: Jeykumar Sankaran Date: Wed Sep 5 19:08:12 2018 -0700 drm/msm/dpu: remove scalar config definitions cleans up left out scalar config definitions from headers changes in v4: - none changes in v5: - none Signed-off-by: Jeykumar Sankaran Reviewed-by: Sean Paul Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit a41a8ccc12441299621a8e049bfc51c64dfaaba1 Author: Jeykumar Sankaran Date: Wed Sep 5 19:08:11 2018 -0700 drm/msm/dpu: squash power handle event types DPU power handler maintained PRE/POST versions of power ENABLE/DISABLE events to accommodate tasks which need be handled before/after data bus voting. But since the bus voting API's are deprecated and removed from the driver, squash the events and their clients respective event handlers to handle only ENABLE/DISABLE events. changes in v5: - introduced in the series Signed-off-by: Jeykumar Sankaran [seanpaul converted #defines to BIT(x) in dpu_power_handle.h] Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit ad8e5c2d7729e2a6f0b5ce3c0e90ab68c40156b8 Author: Jeykumar Sankaran Date: Wed Sep 5 19:08:10 2018 -0700 drm/msm/dpu: remove debugfs support for misr MISR support is the debug feature present in Snapdragon chipsets. At the layer mixer and interfaces, MISR algorithm can generate CRC signatures of the pixel data which can be used for validating the frames generated. Since there are no clients for this feature, strip down the support from the driver. changes in v4: - changed introduced in the series changes in v5: - update commit text with the need for the change(Sean) Signed-off-by: Jeykumar Sankaran Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit d270bdf41e4ac05f16c53482a5769819b040806f Author: Jordan Crouse Date: Tue Aug 28 15:23:04 2018 -0600 drm/msm/dpu: Remove dpu_mdss_isr when dpu_mdss_destroy is called The MDSS device is created before the MSM driver attempts to bind the sub components. If any of the components return -EPROBE_DEFER the MDSS device is destroyed and tried again later. If this happens the dpu_mdss_isr interrupt created from the DPU MDSS is not freed when the MDSS device is destroyed and has a risk of triggering later and hitting a fault by accessing a mmio region that no longer exists. Even if the interrupt isn't triggered by accident when the device attempts to reprobe it would error out when it tries to re-register the interrupt so unconditionally removing it in the destroy is the right move. Switch the device managed dpu_mdss_isr to be unmanaged and add a free_irq() in the mdss destroy function. Reviewed-by: Sean Paul Signed-off-by: Jordan Crouse Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit 96fc56a775c1e44c0e3c0119f2cd3d77431c4569 Author: Sean Paul Date: Wed Aug 29 13:49:47 2018 -0400 drm/msm: dpu: Allow planes to extend past active display The atomic_check is a bit too aggressive with respect to planes which leave the active area. This caused a bunch of log spew when the cursor got to the edge of the screen and stopped it from going all the way. This patch removes the conservative bounds checks from atomic and clips the dst rect such that we properly display planes which go off the screen. Changes in v2: - Apply the clip to src as well (taking into account scaling) Changes in v3: - Use drm_atomic_helper_check_plane_state() to clip src/dst Cc: Sravanthi Kollukuduru Cc: Jeykumar Sankaran Cc: Ville Syrjälä Reviewed-by: Jeykumar Sankaran Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit 1e53ac9280a0ac48ea1024a9d02bc08e3220d842 Author: Jeykumar Sankaran Date: Tue Aug 28 16:02:18 2018 -0700 drm/msm/dpu: use encoder type to identify display type With patch [1], DPU is broken since it continues to use incorrect connector_type to identify the display type. Update DPU to use the encoder type to get the info. [1] https://patchwork.kernel.org/patch/10568269/ Acked-by: Jordan Crouse Signed-off-by: Jeykumar Sankaran Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit 48a8ef7209dba19b9932b375841ea21a69c4c0e2 Author: Jeykumar Sankaran Date: Tue Aug 28 16:02:17 2018 -0700 drm/msm/dpu: remove unwanted encoder type mapping This change gets rid of unwanted connector-encoder type mapping used for dsi-staging driver. Now that DPU will be using upstream DSI driver, remove the stale code. Signed-off-by: Jeykumar Sankaran Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit a2b4ae2924025f64fc619aa69bd260c6b40c2013 Author: Jeykumar Sankaran Date: Tue Aug 28 16:02:16 2018 -0700 drm/msm/dpu: remove stale display port programming Remove stale display port programming. It can be added back with DPU support for display port. Signed-off-by: Jeykumar Sankaran Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit 74593a28c221246bc59a34fbad5e14134a93fc6a Author: Sravanthi Kollukuduru Date: Wed Aug 22 23:19:57 2018 +0530 drm/msm/dpu: fix for cursor blend issue The current driver has the opaque blend mode set as the default causing the black box effect around the cursor. The fix enables choosing a different blend mode for alpha enabled formats. Changes in V2: - Use drm_get_format_name() in the logs (Sean) Signed-off-by: Sravanthi Kollukuduru Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit 07ca1fc0f8a09b9c920002d5c36378a2ddefe37c Author: Sravanthi Kollukuduru Date: Wed Aug 22 23:19:56 2018 +0530 drm/msm/dpu: enable cursor plane on dpu Reserve DMA pipe for cursor plane and attach it to the crtc during the initialization. Changes in V2: None Signed-off-by: Sravanthi Kollukuduru Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit 2c043eeffea4813b8f569e84b46035a08de5eb47 Author: Stephen Boyd Date: Thu Aug 16 16:36:16 2018 -0700 drm/msm/disp/dpu: Use proper define for drm_encoder_init() 'encoder_type' We got a bug report that this function oopses when trying to do a kasprintf(). PC is at string+0x2c/0x60 LR is at vsnprintf+0x28c/0x4ec pc : [] lr : [] pstate: a0c00049 sp : ffffff80095fb540 x29: ffffff80095fb540 x28: ffffff8008ad42bc x27: 00000000ffffffd8 x26: 0000000000000000 x25: ffffff8008c216c8 x24: 0000000000000000 x23: 0000000000000000 x22: ffffff80095fb720 x21: 0000000000000000 x20: ffffff80095fb720 x19: ffffff80095fb6f0 x18: 000000000000000a x17: 00000000b42ba473 x16: ffffff800805bbe8 x15: 00000000000a157d x14: 000000000000000c x13: 0000000000000000 x12: 0000ffff0000000f x11: 0000000000000003 x10: 0000000000000001 x9 : 0000000000000040 x8 : 000000000000001c x7 : ffffffffffffffff x6 : 0000000000000000 x5 : 0000000000000228 x4 : 0000000000000000 x3 : ffff0a00ffffff04 x2 : 0000000000007961 x1 : 0000000000000000 x0 : 0000000000000000 Process kworker/3:1 (pid: 61, stack limit = 0xffffff80095f8000) Call trace: Exception stack(0xffffff80095fb400 to 0xffffff80095fb540) b400: 0000000000000000 0000000000000000 0000000000007961 ffff0a00ffffff04 b420: 0000000000000000 0000000000000228 0000000000000000 ffffffffffffffff b440: 000000000000001c 0000000000000040 0000000000000001 0000000000000003 b460: 0000ffff0000000f 0000000000000000 000000000000000c 00000000000a157d b480: ffffff800805bbe8 00000000b42ba473 000000000000000a ffffff80095fb6f0 b4a0: ffffff80095fb720 0000000000000000 ffffff80095fb720 0000000000000000 b4c0: 0000000000000000 ffffff8008c216c8 0000000000000000 00000000ffffffd8 b4e0: ffffff8008ad42bc ffffff80095fb540 ffffff80088d5fc4 ffffff80095fb540 b500: ffffff80088d35d8 00000000a0c00049 ffffff80095fb550 ffffff80080d06a4 b520: ffffffffffffffff ffffff80088d5e0c ffffff80095fb540 ffffff80088d35d8 [] string+0x2c/0x60 [] vsnprintf+0x28c/0x4ec [] kvasprintf+0x68/0x100 [] kasprintf+0x60/0x80 [] drm_encoder_init+0x134/0x164 [] dpu_encoder_init+0x60/0x94 [] _dpu_kms_drm_obj_init+0xa0/0x424 [] dpu_kms_hw_init+0x61c/0x6bc [] msm_drm_bind+0x380/0x67c [] try_to_bring_up_master+0x228/0x264 [] component_master_add_with_match+0x90/0xc0 [] msm_pdev_probe+0x260/0x2c8 [] platform_drv_probe+0x58/0xa8 [] driver_probe_device+0x2d8/0x40c [] __device_attach_driver+0xd4/0x10c [] bus_for_each_drv+0xb4/0xd0 [] __device_attach+0xd0/0x160 [] device_initial_probe+0x24/0x30 [] bus_probe_device+0x38/0x98 [] deferred_probe_work_func+0x144/0x148 [] process_one_work+0x218/0x3bc [] process_scheduled_works+0x44/0x48 [] worker_thread+0x288/0x32c [] kthread+0x134/0x13c [] ret_from_fork+0x10/0x18 Code: 910003fd 2a0403e6 eb0400ff 54000060 (38646845) Looking at the code I see that drm_encoder_init() is called from the DPU code with 'DRM_MODE_CONNECTOR_DSI' passed in as the 'encoder_type' argument (follow from _dpu_kms_initialize_dsi()). That corresponds to the integer 16. That is then indexed into drm_encoder_enum_list in drm_encoder_init() to look up the name of the encoder. If you're still following along, that's an encoder not a connector! We really want to use DRM_MODE_ENCODER_DSI (integer 6) instead of DRM_MODE_CONNECTOR_DSI here, or we'll go out of bounds of the encoder array. Pass the right thing and everything is fine. Cc: Jeykumar Sankaran Cc: Jordan Crouse Cc: Sean Paul Fixes: 25fdd5933e4c (drm/msm: Add SDM845 DPU support) Tested-by: Sai Prakash Ranjan Reviewed-by: Jeykumar Sankaran Signed-off-by: Stephen Boyd Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit 9888495a14a80a0a229e13c293592da559c51e64 Author: Sean Paul Date: Mon Jul 30 11:26:55 2018 -0400 drm/msm: Don't fail bind if nothing connected to dsi If there is no bridge or panel connected to a dsi node, don't fail the entire msm bind. Just ignore the dsi block and move on. Cc: Doug Anderson Reviewed-by: Abhinav Kumar Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit feb085ec8a3dc186ed1e5e642b6568297c01cc4a Author: Sean Paul Date: Mon Jul 30 11:26:54 2018 -0400 drm/msm: dsi: Return errors whan dt parsing fails If dt parsing fails, we should return an error instead of pretending everything completed successfully. Cc: Doug Anderson Reviewed-by: Abhinav Kumar Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit aea24171c85edbff1e021016e8ea1bf64b89a4f8 Author: Sean Paul Date: Mon Jul 30 11:26:53 2018 -0400 drm/msm: dsi: Initialize msm_dsi->id to -1 Currently msm_dsi->id is initialized to 0 during kzalloc. If bind fails for a secondary dsi device before its id can be properly set (such as during dt parsing), the id will point to the primary dsi device, causing its reference to be removed from dsi_manager's global (msm_dsim_glb) array. This patch initializes the id to -1 and checks for negative in the manager cleanup. Cc: Doug Anderson Reviewed-by: Abhinav Kumar Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit d04a836ea76c49db8c5547612d9c9cbb97f0402d Merge: 87c2ee740c07 e8c66efbfe3a Author: Dave Airlie Date: Thu Oct 4 10:19:33 2018 +1000 Merge branch 'vmwgfx-next' of git://people.freedesktop.org/~thomash/linux into drm-next Mostly code reorganizations and optimizations for vmwgfx. - Move TTM code that's only used by vmwgfx to vmwgfx - Break out the vmwgfx buffer- and resource validation code to a separate source file - Get rid of a number of atomic operations during command buffer validation. From: Thomas Hellstrom Link: https://patchwork.freedesktop.org/patch/msgid/20180928131157.2810-1-thellstrom@vmware.com commit 928002a5e9dab2ddc1a0fe3e00739e89be30dc6b Author: Arun Kumar Neelakantam Date: Wed Oct 3 17:08:20 2018 +0530 rpmsg: glink: smem: Support rx peak for size less than 4 bytes The current rx peak function fails to read the data if size is less than 4bytes. Use memcpy_fromio to support data reads of size less than 4 bytes. Cc: stable@vger.kernel.org Fixes: f0beb4ba9b18 ("rpmsg: glink: Remove chunk size word align warning") Signed-off-by: Arun Kumar Neelakantam Signed-off-by: Bjorn Andersson commit fcd29ad17c6ff885dfae58f557e9323941e63ba2 Author: Feras Daoud Date: Thu Aug 9 09:55:21 2018 +0300 net/mlx5: Add Fast teardown support Today mlx5 devices support two teardown modes: 1- Regular teardown 2- Force teardown This change introduces the enhanced version of the "Force teardown" that allows SW to perform teardown in a faster way without the need to reclaim all the pages. Fast teardown provides the following advantages: 1- Fix a FW race condition that could cause command timeout 2- Avoid moving to polling mode 3- Close the vport to prevent PCI ACK to be sent without been scatter to memory Signed-off-by: Feras Daoud Reviewed-by: Majd Dibbiny Signed-off-by: Saeed Mahameed commit 94563847a8733c27b2f56ac82bad4c78e074e244 Author: Eran Ben Elisha Date: Sun Jul 8 14:43:19 2018 +0300 net/mlx5e: Add new counter for aRFS rule insertion failures Count aRFS rules insertion failure for ethtool output. In addition, move the error print into debug prints mechanism, as it could flood the dmesg and reduce system BW dramatically. Signed-off-by: Eran Ben Elisha Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit e98bedf5e61beb8ea4707e97ff9ef14d9deeb0c9 Author: Eli Britstein Date: Wed Aug 15 16:10:05 2018 +0300 net/mlx5e: Add extack messages for TC offload failures Return tc extack messages for failures to user space. Messages provide reasons for not being able to offload rules to HW. Signed-off-by: Eli Britstein Reviewed-by: Or Gerlitz Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed commit 8c98ee77d911bdb6f3b46a7dddc383445dd948d6 Author: Eli Britstein Date: Sun Aug 5 14:32:33 2018 +0300 net/mlx5e: E-Switch, Add extack messages to devlink callbacks Return extack messages for failures in the e-switch devlink callbacks. Messages provide reasons for not being able to issue the operation. Signed-off-by: Eli Britstein Reviewed-by: Or Gerlitz Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed commit db7ff19e7b119adb4618fbc6410b441d1c3b55c5 Author: Eli Britstein Date: Wed Aug 15 16:02:18 2018 +0300 devlink: Add extack for eswitch operations Add extack argument to the eswitch related operations. Signed-off-by: Eli Britstein Reviewed-by: Or Gerlitz Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed commit 15703461533a5ffd775722390431625daaae7618 Author: Venkata Sandeep Dhanalakota Date: Wed Sep 26 10:44:52 2018 -0700 IB/{hfi1, qib, rdmavt}: Move ruc_loopback to rdmavt This patch moves ruc_loopback() from hfi1 into rdmavt for code sharing with the qib driver. Reviewed-by: Brian Welty Reviewed-by: Mike Marciniszyn Reviewed-by: Dennis Dalessandro Signed-off-by: Venkata Sandeep Dhanalakota Signed-off-by: Harish Chegondi Signed-off-by: Dennis Dalessandro Signed-off-by: Jason Gunthorpe commit 116aa0330ec71b9872dfb3a3cc5202a72b5a1666 Author: Venkata Sandeep Dhanalakota Date: Wed Sep 26 10:44:42 2018 -0700 IB/{hfi1, qib, rdmavt}: Move send completion logic to rdmavt Moving send completion code into rdmavt in order to have shared logic between qib and hfi1 drivers. Reviewed-by: Mike Marciniszyn Reviewed-by: Brian Welty Signed-off-by: Venkata Sandeep Dhanalakota Signed-off-by: Harish Chegondi Signed-off-by: Dennis Dalessandro Signed-off-by: Jason Gunthorpe commit 019f118b94c895294debfaa394b267638fe2f648 Author: Brian Welty Date: Wed Sep 26 10:44:33 2018 -0700 IB/{hfi1, qib, rdmavt}: Move copy SGE logic into rdmavt This patch moves hfi1_copy_sge() into rdmavt for sharing with qib. This patch also moves all the wss_*() functions into rdmavt as several wss_*() functions are called from hfi1_copy_sge() When SGE copy mode is adaptive, cacheless copy may be done in some cases for performance reasons. In those cases, X86 cacheless copy function is called since the drivers that use rdmavt and may set SGE copy mode to adaptive are X86 only. For this reason, this patch adds "depends on X86_64" to rdmavt/Kconfig. Reviewed-by: Ashutosh Dixit Reviewed-by: Michael J. Ruhl Reviewed-by: Mike Marciniszyn Reviewed-by: Dennis Dalessandro Signed-off-by: Brian Welty Signed-off-by: Harish Chegondi Signed-off-by: Dennis Dalessandro Signed-off-by: Jason Gunthorpe commit b56511c15713ba6c7572e77a41f7ddba9c1053ec Author: Nathan Chancellor Date: Mon Sep 24 12:57:16 2018 -0700 IB/mlx4: Avoid implicit enumerated type conversion Clang warns when one enumerated type is implicitly converted to another. drivers/infiniband/hw/mlx4/mad.c:1811:41: warning: implicit conversion from enumeration type 'enum mlx4_ib_qp_flags' to different enumeration type 'enum ib_qp_create_flags' [-Wenum-conversion] qp_init_attr.init_attr.create_flags = MLX4_IB_SRIOV_TUNNEL_QP; ~ ^~~~~~~~~~~~~~~~~~~~~~~ drivers/infiniband/hw/mlx4/mad.c:1819:41: warning: implicit conversion from enumeration type 'enum mlx4_ib_qp_flags' to different enumeration type 'enum ib_qp_create_flags' [-Wenum-conversion] qp_init_attr.init_attr.create_flags = MLX4_IB_SRIOV_SQP; ~ ^~~~~~~~~~~~~~~~~ The type mlx4_ib_qp_flags explicitly provides supplemental values to the type ib_qp_create_flags. Make that clear to Clang by changing the create_flags type to u32. Reported-by: Nick Desaulniers Signed-off-by: Nathan Chancellor Signed-off-by: Jason Gunthorpe commit d9581bf358c0578600940fc8d1f3b8f069870225 Author: Lijun Ou Date: Sun Sep 30 17:00:38 2018 +0800 RDMA/hns: Bugfix for atomic operation The atomic operation not supported inline. Besides, the standard atomic operation only support a sge and the sge is placed in the wqe. Fix: 384f881("RDMA/hns: Add atomic support") Signed-off-by: Lijun Ou Signed-off-by: Jason Gunthorpe commit caf3e4064af086e2dda3fc5cf598a06708aa997c Author: Lijun Ou Date: Sun Sep 30 17:00:37 2018 +0800 RDMA/hns: Add vlan enable bit for hip08 In order to extend vlan device range, the design add two field of qp context for checking vlan packet in sender and in recevicer. Signed-off-by: Lijun Ou Signed-off-by: Jason Gunthorpe commit e93df01085791e5c8a079c94a15af2a677176b81 Author: Lijun Ou Date: Sun Sep 30 17:00:36 2018 +0800 RDMA/hns: Support local invalidate for hip08 in kernel space This patch adds local invalidate Memory Region (MR) support in the kernel space driver. Signed-off-by: Yangyang Li Signed-off-by: Lijun Ou Signed-off-by: Jason Gunthorpe commit 2362cceef3f4cbd382f338327097f98795f6b91e Author: Lijun Ou Date: Sun Sep 30 17:00:35 2018 +0800 RDMA/hns: Update some fields of qp context The hip08 hardware has two version. the version id are 0x20 and 0x21 according to the pci revision. It needs to adjust some fields for extending new features. The specific updates include: 1. Add some fields for supporting new features by enabling some reserved fields in 0x20 version. 2. remove some fields which the user is not visiable in order to support the extend features. 3. Init some fields with zero. These updates is compatible with 0x20 version. Signed-off-by: Lijun Ou Signed-off-by: Jason Gunthorpe commit b28ca7cceff8b2cfadebd34a907742cd396c2c33 Author: Lijun Ou Date: Sun Sep 30 17:00:34 2018 +0800 RDMA/hns: Limit extend sq sge num According to hip08 limit, the buffer size of extend sge needs to be an integer wqe_sge_buf_page size. For example, the value of sge_shift field of qp context is greater or equal to eight when buffer page size is 4K size. The value of sge_shift field of qp context assigned by hr_qp->sge.sge_cnt. Signed-off-by: Lijun Ou Signed-off-by: Jason Gunthorpe commit 3a63c964eaa168c4ada1076b7c6ffd6a53a9ef86 Author: Lijun Ou Date: Sun Sep 30 17:00:33 2018 +0800 RDMA/hns: Update some attributes of the RoCE device According to the IB protocol definition, the driver needs to show the correct device information and the information will be queryed by device attribute. Signed-off-by: Lijun Ou Signed-off-by: Jason Gunthorpe commit 157b52a08da68b650a6b5bcaf427d39a5d016a36 Author: Lijun Ou Date: Sun Sep 30 17:00:32 2018 +0800 RDMA/hns: Configure ecn field of ip header In order to compatible with the third party RoCE device, The hardware modify the set method for the ecn field of ip header in new hip08 version. The high 6bit of tclass be assigned for dscp field of packet. Signed-off-by: Lijun Ou Signed-off-by: Jason Gunthorpe commit 05ad5482a5904c416bcfd74afd7193e206e563ce Author: Lijun Ou Date: Sun Sep 30 17:00:31 2018 +0800 RDMA/hns: Limit the size of extend sge of sq The hip08 split two hardware version. The version id are 0x20 and 0x21 according to the PCI revison. The max size of extend sge of sq is limited to 2M for 0x20 version and 8M for 0x21 version. It may be exceeded to 2M according to the algorithm that compute the product of wqe count and extend sge number of every wqe. But the product always less than 8M. Signed-off-by: Lijun Ou Signed-off-by: Jason Gunthorpe commit 15fc056fba7b17b9abfbe80a12f188403fc949fb Author: Lijun Ou Date: Sun Sep 30 17:00:30 2018 +0800 RDMA/hns: Bugfix for CM test It will print the warning when the MSB bit of SLID is not zero running cm_req_handler function that test CM. It needs to fixed zero when test RoCE device. Signed-off-by: Lijun Ou Signed-off-by: Jason Gunthorpe commit c80e066100b5fed722c8da67c1bd2312e7bcf129 Author: Lijun Ou Date: Sun Sep 30 17:00:29 2018 +0800 RDMA/hns: Submit bad wr when post send wr exception When user issues a RDMA read and enables sq inline, it needs to report a bad wr to user. Signed-off-by: Lijun Ou Signed-off-by: Jason Gunthorpe commit 06ef0ee4b569101f3a07ce08335dbf29fd1404ef Author: Lijun Ou Date: Sun Sep 30 17:00:28 2018 +0800 RDMA/hns: Bugfix for reserved qp number It needs to include two special qps for every port. The hip08 have four ports and the all reserved qp numbers are eight. Signed-off-by: Lijun Ou Signed-off-by: Jason Gunthorpe commit 9305455acfa65a2749cd2329d027bf944b26e14c Author: Bart Van Assche Date: Wed Oct 3 13:56:25 2018 -0700 block: Finish renaming REQ_DISCARD into REQ_OP_DISCARD Some time ago REQ_DISCARD was renamed into REQ_OP_DISCARD. Some comments and documentation files were not updated however. Update these comments and documentation files. See also commit 4e1b2d52a80d ("block, fs, drivers: remove REQ_OP compat defs and related code"). Signed-off-by: Bart Van Assche Cc: Mike Christie Cc: Martin K. Petersen Cc: Philipp Reisner Cc: Lars Ellenberg Signed-off-by: Jens Axboe commit 38716732f161c3d107c4cc406a287f1201bed752 Author: Leon Romanovsky Date: Tue Oct 2 11:49:24 2018 +0300 RDMA/netlink: Simplify netlink listener existence check All users of rdma_nl_chk_listeners() are interested to get boolean answer if netlink socket has listeners, so update all places to boolean function. Signed-off-by: Leon Romanovsky Reviewed-by: Dennis Dalessandro Signed-off-by: Jason Gunthorpe commit d31131bba5a1630304c55ea775c48cc84912ab59 Author: Kamal Heib Date: Tue Oct 2 16:11:21 2018 +0300 RDMA: Remove unused parameter from ib_modify_qp_is_ok() The ll parameter is not used in ib_modify_qp_is_ok(), so remove it. Signed-off-by: Kamal Heib Reviewed-by: Dennis Dalessandro Signed-off-by: Jason Gunthorpe commit 03241627b222427917999c533f1a2f9d5beda2be Author: Kamal Heib Date: Tue Oct 2 11:03:10 2018 +0300 RDMA/rxe: Remove unused addr_same() This function is not in use - delete it. Signed-off-by: Kamal Heib Reviewed-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit aae0484e15f062ad2c2502e68e15dfb8b8f84608 Author: Zhu Yanjun Date: Sun Sep 30 02:27:16 2018 -0400 IB/rxe: avoid srq memory leak In rxe_queue_init, q and q->buf are allocated. In do_mmap_info, q->ip is allocated. When error occurs, rxe_srq_from_init and the later error handler do not free these allocated memories. This will make memory leak. Signed-off-by: Zhu Yanjun Signed-off-by: Jason Gunthorpe commit 39f2495618c5e980d2873ea3f2d1877dd253e07a Author: Wei Yongjun Date: Sat Sep 29 03:55:16 2018 +0000 IB/mthca: Fix error return code in __mthca_init_one() Fix to return a negative error code from the mthca_cmd_init() error handling case instead of 0, as done elsewhere in this function. Fixes: 80fd8238734c ("[PATCH] IB/mthca: Encapsulate command interface init") Signed-off-by: Wei Yongjun Signed-off-by: Jason Gunthorpe commit e73798f20ecb35f7d6c672d48d6b9da57c8cbf64 Author: Jason Gunthorpe Date: Fri Sep 28 16:28:02 2018 -0600 RDMA/uverbs: Fix RCU annotation for radix slot deference The uapi radix tree is a write-once data structure protected by kref. Once we get to the ioctl() fop it is not possible for anything else to be writing to it, so the access should use rcu_dereference_protected. Reported-by: Matthew Wilcox Signed-off-by: Jason Gunthorpe commit 914e5d7d4697fb9815fa237a4d42bfb952bf48d6 Author: Jason Gunthorpe Date: Fri Sep 28 15:20:23 2018 -0600 RDMA: Fix building with CONFIG_MMU=n The zap_vma_ptes() is declared but not defined on NOMMU kernels, causing a link error for the newly added uverbs code: drivers/infiniband/core/uverbs_main.o: In function `uverbs_user_mmap_disassociate': uverbs_main.c:(.text+0x114c): undefined reference to `zap_vma_ptes' drivers/infiniband/core/uverbs_main.o: In function `rdma_umap_open': uverbs_main.c:(.text+0x53c): undefined reference to `zap_vma_ptes' Since all user access for all of our drivers depend on remapping pages to user space disable USER_ACCESS when there is no mmu. Fixes: 5f9794dc94f5 ("RDMA/ucontext: Add a core API for mmaping driver IO memory") Reported-by: Arnd Bergmann Signed-off-by: Jason Gunthorpe commit 7bdaae270cb55d40b7fb73744c7e00a7108ee5b6 Merge: 072eff2d9e2d 37ebb5fa6fc9 Author: David S. Miller Date: Wed Oct 3 14:44:22 2018 -0700 Merge branch '10GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue Jeff Kirsher says: ==================== 10GbE Intel Wired LAN Driver Updates 2018-10-03 This series contains updates to ixgbe/ixgbevf and few fixes for i40e & iavf. Shannon Nelson fixes the message length for IPsec mailbox messages. Radoslaw fixes a transmit hang that occurs when XDP_TX exceeds the queue limit. Fixes a crash when we restor flow director filters after a reset. YueHaibing cleans up dead code, which did not have any callers. Dan Carpenter fixes an "off by one" error in IPsec for ixgbe. Nathan Chancellor fixes the i40e driver to use the correct enum for link speed. Also remove a debug statement since it was not producing useful information and equated to always "TRUE". Most notably, Björn introduces zero-copy AF_XDP support for the ixgbe driver. The ixgbe zero-copy code is located in its own file ixgbe_xsk.[ch], analogous to the i40e ZC support. Again, as in i40e, code paths have been copied from the XDP path to the zero-copy path. Going forward we will try to generalize more code between the AF_XDP ZC drivers, and also reduce the heavy C&P. ==================== Signed-off-by: David S. Miller commit 37ebb5fa6fc9be0eb80dcd3d17984cc36006a21c Author: Rami Rosen Date: Tue Sep 25 08:42:18 2018 -0700 iavf: fix a typo This trivial patch fixes a typo in iavf.h. Signed-off-by: Rami Rosen Acked-by: Jesse Brandeburg Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 8221c5eba8c13831d80860f6e0016d5c075695fb Author: Björn Töpel Date: Tue Oct 2 10:00:34 2018 +0200 ixgbe: add AF_XDP zero-copy Tx support This patch adds zero-copy Tx support for AF_XDP sockets. It implements the ndo_xsk_async_xmit netdev ndo and performs all the Tx logic from a NAPI context. This means pulling egress packets from the Tx ring, placing the frames on the NIC HW descriptor ring and completing sent frames back to the application via the completion ring. The regular XDP Tx ring is used for AF_XDP as well. This rationale for this is as follows: XDP_REDIRECT guarantees mutual exclusion between different NAPI contexts based on CPU id. In other words, a netdev can XDP_REDIRECT to another netdev with a different NAPI context, since the operation is bound to a specific core and each core has its own hardware ring. As the AF_XDP Tx action is running in the same NAPI context and using the same ring, it will also be protected from XDP_REDIRECT actions with the exact same mechanism. As with AF_XDP Rx, all AF_XDP Tx specific functions are added to ixgbe_xsk.c. Signed-off-by: Björn Töpel Tested-by: William Tu Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 2cc81c6992248ea37d0241bc325977bab310bc3b Author: Xiaochen Shen Date: Wed Sep 12 16:48:38 2018 -0700 x86/intel_rdt: Show missing resctrl mount options In resctrl filesystem, mount options exist to enable L3/L2 CDP and MBA Software Controller features if the platform supports them: mount -t resctrl resctrl [-o cdp[,cdpl2][,mba_MBps]] /sys/fs/resctrl But currently only "cdp" option is displayed in /proc/mounts. "cdpl2" and "mba_MBps" options are not shown even when they are active. Before: # mount -t resctrl resctrl -o cdp,mba_MBps /sys/fs/resctrl # grep resctrl /proc/mounts /sys/fs/resctrl /sys/fs/resctrl resctrl rw,relatime,cdp 0 0 After: # mount -t resctrl resctrl -o cdp,mba_MBps /sys/fs/resctrl # grep resctrl /proc/mounts /sys/fs/resctrl /sys/fs/resctrl resctrl rw,relatime,cdp,mba_MBps 0 0 Signed-off-by: Xiaochen Shen Signed-off-by: Fenghua Yu Signed-off-by: Thomas Gleixner Cc: "H Peter Anvin" Cc: "Tony Luck" Link: https://lkml.kernel.org/r/1536796118-60135-1-git-send-email-fenghua.yu@intel.com commit 82159876d32b7959c0b0ea8fe12c428f41502a6f Author: Andy Shevchenko Date: Thu Aug 30 14:50:39 2018 +0300 x86/intel_rdt: Switch to bitmap_zalloc() Switch to bitmap_zalloc() to show clearly what is allocated. Besides that it returns a pointer of bitmap type instead of opaque void *. Signed-off-by: Andy Shevchenko Signed-off-by: Thomas Gleixner Acked-by: Fenghua Yu Cc: "H. Peter Anvin" Link: https://lkml.kernel.org/r/20180830115039.63430-1-andriy.shevchenko@linux.intel.com commit 53ed74af05517cf5fe83d87c4bb7ab998adfd631 Author: Reinette Chatre Date: Wed Sep 19 10:29:11 2018 -0700 x86/intel_rdt: Re-enable pseudo-lock measurements Commit 4a7a54a55e72 ("x86/intel_rdt: Disable PMU access") disabled measurements of pseudo-locked regions because of incorrect usage of the performance monitoring hardware. Cache pseudo-locking measurements are now done correctly with the in-kernel perf API and its use can be re-enabled at this time. The adjustment to the in-kernel perf API also separated the L2 and L3 measurements that can be triggered separately from user space. The re-enabling of the measurements is thus not a simple revert of the original disable in order to accommodate the additional parameter possible. Signed-off-by: Reinette Chatre Signed-off-by: Thomas Gleixner Cc: fenghua.yu@intel.com Cc: tony.luck@intel.com Cc: peterz@infradead.org Cc: acme@kernel.org Cc: gavin.hindman@intel.com Cc: jithu.joseph@intel.com Cc: dave.hansen@intel.com Cc: hpa@zytor.com Link: https://lkml.kernel.org/r/bfb9fc31692e0c62d9ca39062e55eceb6a0635b5.1537377064.git.reinette.chatre@intel.com commit 05ae861450406a18f88a1350af10054c2c327069 Author: Björn Töpel Date: Tue Oct 2 10:00:33 2018 +0200 ixgbe: move common Tx functions to ixgbe_txrx_common.h This patch prepares for the upcoming zero-copy Tx functionality by moving common functions used both by the regular path and zero-copy path. Signed-off-by: Björn Töpel Tested-by: William Tu Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit d0bcacd0a130974f58a56318db7a5ca6a7ba1d5a Author: Björn Töpel Date: Tue Oct 2 10:00:32 2018 +0200 ixgbe: add AF_XDP zero-copy Rx support This patch adds zero-copy Rx support for AF_XDP sockets. Instead of allocating buffers of type MEM_TYPE_PAGE_SHARED, the Rx frames are allocated as MEM_TYPE_ZERO_COPY when AF_XDP is enabled for a certain queue. All AF_XDP specific functions are added to a new file, ixgbe_xsk.c. Note that when AF_XDP zero-copy is enabled, the XDP action XDP_PASS will allocate a new buffer and copy the zero-copy frame prior passing it to the kernel stack. Signed-off-by: Björn Töpel Tested-by: William Tu Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 46515fdb1adff1cc0ac3d0656a7c3492017dfe4f Author: Björn Töpel Date: Tue Oct 2 10:00:31 2018 +0200 ixgbe: move common Rx functions to ixgbe_txrx_common.h This patch prepares for the upcoming zero-copy Rx functionality, by moving/changing linkage of common functions, used both by the regular path and zero-copy path. Signed-off-by: Björn Töpel Tested-by: William Tu Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 024aa5800f3246875ac824fab4bee3b4dc82f499 Author: Björn Töpel Date: Tue Oct 2 10:00:30 2018 +0200 ixgbe: added Rx/Tx ring disable/enable functions Add functions for Rx/Tx ring enable/disable. Instead of resetting the whole device, only the affected ring is disabled or enabled. This plumbing is used in later commits, when zero-copy AF_XDP support is introduced. Signed-off-by: Björn Töpel Tested-by: William Tu Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 5d826d209164b0752c883607be4cdbbcf7cab494 Author: Radoslaw Tyl Date: Mon Sep 24 09:24:20 2018 +0200 ixgbe: Fix crash with VFs and flow director on interface flap This patch fix crash when we have restore flow director filters after reset adapter. In ixgbe_fdir_filter_restore() filter->action is outside of the rx_ring array, as it has a VF identifier in the upper 32 bits. Signed-off-by: Radoslaw Tyl Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 92fb7aaff8dd18636cb999a5878508124cc76ac5 Author: Nathan Chancellor Date: Fri Sep 21 12:39:07 2018 -0700 i40e: Remove unnecessary print statement Clang warns that the address of a pointer will always evaluated as true in a boolean context. drivers/net/ethernet/intel/i40e/i40e_debugfs.c:136:9: warning: address of array 'vsi->active_vlans' will always evaluate to 'true' [-Wpointer-bool-conversion] vsi->active_vlans ? "" : ""); ~~~~~^~~~~~~~~~~~ ~ ./include/linux/device.h:1431:33: note: expanded from macro 'dev_info' _dev_info(dev, dev_fmt(fmt), ##__VA_ARGS__) ^~~~~~~~~~~ 1 warning generated. Given that the statement shows that active_vlans is always valid, just remove the statement since it's not giving any useful information. Link: https://github.com/ClangBuiltLinux/linux/issues/82 Signed-off-by: Nathan Chancellor Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 43ade6ad18416b8fd5bb3c9e9789faa666527eec Author: Nathan Chancellor Date: Fri Sep 21 03:13:59 2018 -0700 i40e: Use proper enum in i40e_ndo_set_vf_link_state Clang warns when one enumerated type is converted implicitly to another. drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c:4214:42: warning: implicit conversion from enumeration type 'enum i40e_aq_link_speed' to different enumeration type 'enum virtchnl_link_speed' [-Wenum-conversion] pfe.event_data.link_event.link_speed = I40E_LINK_SPEED_40GB; ~ ^~~~~~~~~~~~~~~~~~~~ 1 warning generated. Use the proper enum from virtchnl_link_speed, which has the same value as I40E_LINK_SPEED_40GB, VIRTCHNL_LINK_SPEED_40GB. This appears to be missed by commit ff3f4cc267f6 ("virtchnl: finish conversion to virtchnl interface"). Link: https://github.com/ClangBuiltLinux/linux/issues/81 Signed-off-by: Nathan Chancellor Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 617cc646a7a09c7abf507981a81f441fc79b0511 Author: Dan Carpenter Date: Wed Sep 19 13:35:29 2018 +0300 ixgbevf: off by one in ixgbevf_ipsec_tx() The ipsec->tx_tbl[] array has IXGBE_IPSEC_MAX_SA_COUNT elements so the > should be a >=. Fixes: 0062e7cc955e ("ixgbevf: add VF IPsec offload code") Signed-off-by: Dan Carpenter Signed-off-by: Shannon Nelson Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 6b27f3de223fb83b4c2b41c5becb1c5be77fe49e Author: YueHaibing Date: Fri Sep 7 11:38:44 2018 +0800 ixgbe: remove redundant function ixgbe_fw_recovery_mode() There are no in-tree callers. Signed-off-by: YueHaibing Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 8d7179b1e2d64b3493c0114916486fe92e6109a9 Author: Radoslaw Tyl Date: Wed Sep 5 09:00:51 2018 +0200 ixgbe: Fix ixgbe TX hangs with XDP_TX beyond queue limit We have Tx hang when number Tx and XDP queues are more than 64. In XDP always is MTQC == 0x0 (64TxQs). We need more space for Tx queues. Signed-off-by: Radoslaw Tyl Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 4be9bd10e22dfc7fc101c5cf5969ef2d3a042d8a Author: Neil Armstrong Date: Fri Sep 28 14:05:55 2018 +0200 drm/fb_helper: Allow leaking fbdev smem_start Since "drm/fb: Stop leaking physical address", the default behaviour of the DRM fbdev emulation is to set the smem_base to 0 and pass the new FBINFO_HIDE_SMEM_START flag. The main reason is to avoid leaking physical addresse to user-space, and it follows a general move over the kernel code to avoid user-space to manipulate physical addresses and then use some other mechanisms like dma-buf to transfer physical buffer handles over multiple subsystems. But, a lot of devices depends on closed sources binaries to enable OpenGL hardware acceleration that uses this smem_start value to pass physical addresses to out-of-tree modules in order to render into these physical adresses. These should use dma-buf buffers allocated from the DRM display device instead and stop relying on fbdev overallocation to gather DMA memory (some HW vendors delivers GBM and Wayland capable binaries, but older unsupported devices won't have these new binaries and are doomed until an Open Source solution like Lima finalizes). Since these devices heavily depends on this kind of software and because the smem_start population was available for years, it's a breakage to stop leaking smem_start without any alternative solutions. This patch adds a Kconfig depending on the EXPERT config and an unsafe kernel module parameter tainting the kernel when enabled. A clear comment and Kconfig help text was added to clarify why and when this patch should be reverted, but in the meantime it's a necessary feature to keep. Cc: Dave Airlie Cc: Daniel Vetter Cc: Bartlomiej Zolnierkiewicz Cc: Noralf Trønnes Cc: Maxime Ripard Cc: Eric Anholt Cc: Lucas Stach Cc: Rob Clark Cc: Ben Skeggs Cc: Christian König Signed-off-by: Neil Armstrong Reviewed-by: Maxime Ripard Tested-by: Maxime Ripard Acked-by: Daniel Vetter Acked-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/1538136355-15383-1-git-send-email-narmstrong@baylibre.com commit 2c49d34f3b49812d4978a44b114b571fc421e2d0 Author: Shannon Nelson Date: Tue Sep 4 12:33:29 2018 -0700 ixgbevf: fix msglen for ipsec mbx messages Don't be fancy with message lengths, just set lengths to number of dwords, not bytes. Fixes: 0062e7cc955e ("ixgbevf: add VF IPsec offload code") Reported-by: Dan Carpenter Signed-off-by: Shannon Nelson Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit e24c1f8658c94c8d74f6d9f36066a6c573117e85 Author: Michael Straube Date: Wed Oct 3 16:17:16 2018 +0200 staging: rtl8712: add SPDX identifiers This satisfies a checkpatch warning and is the preferred method for notating the license. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit 48b775ca0f932c8f9e168d7a07417c8c2b830f5a Author: Mamta Shukla Date: Wed Oct 3 20:10:15 2018 +0530 staging: fbtft: Prefer using the BIT macro Replacing all occurrences of (1< Reviewed-by: Daniel Vetter Signed-off-by: Greg Kroah-Hartman commit 470443e0b379b070305629f911cc09562bdf324f Author: Chuck Lever Date: Mon Oct 1 14:26:51 2018 -0400 xprtrdma: Squelch a sparse warning linux/include/trace/events/rpcrdma.h:501:1: warning: expression using sizeof bool linux/include/trace/events/rpcrdma.h:501:1: warning: odd constant _Bool cast (ffffffffffffffff becomes 1) Fixes: ab03eff58eb5 ("xprtrdma: Add trace points in RPC Call ... ") Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit ad0911802cf6be48ddf5911ca1837d071b26e92d Author: Chuck Lever Date: Mon Oct 1 14:26:45 2018 -0400 xprtrdma: Clean up xprt_rdma_disconnect_inject Clean up: Use the appropriate C macro instead of open-coding container_of() . Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit f26c32fa5c6ab616e12d4ff0748c85927b092601 Author: Chuck Lever Date: Mon Oct 1 14:26:40 2018 -0400 xprtrdma: Add documenting comments Clean up: fill in or update documenting comments for transport switch entry points. For xprt_rdma_allocate: The first paragraph is no longer true since commit 5a6d1db45569 ("SUNRPC: Add a transport-specific private field in rpc_rqst"). The second paragraph is no longer true since commit 54cbd6b0c6b9 ("xprtrdma: Delay DMA mapping Send and Receive buffers"). Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit 61c208a5ca94c526143830253d56de6fdb95edc2 Author: Chuck Lever Date: Mon Oct 1 14:26:35 2018 -0400 xprtrdma: Report when there were zero posted Receives To show that a caller did attempt to allocate and post more Receive buffers, the trace point in rpcrdma_post_recvs() should report when rpcrdma_post_recvs() was invoked but no new Receive buffers were posted. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit 512ccfb61a9b7281345992620c73ffed20272526 Author: Chuck Lever Date: Mon Oct 1 14:26:29 2018 -0400 xprtrdma: Move rb_flags initialization Clean up: rb_flags might be used for other things besides RPCRDMA_BUF_F_EMPTY_SCQ, so initialize it in a generic spot instead of in a send-completion-queue-related helper. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit 059421e041eb461fb2b3e81c9adaec18ef03ca3c Author: NeilBrown Date: Wed Oct 3 15:04:41 2018 +1000 md: allow metadata updates while suspending an array - fix Commit 35bfc52187f6 ("md: allow metadata update while suspending.") added support for allowing md_check_recovery() to still perform metadata updates while the array is entering the 'suspended' state. This is needed to allow the processes of entering the state to complete. Unfortunately, the patch doesn't really work. The test for "mddev->suspended" at the start of md_check_recovery() means that the function doesn't try to do anything at all while entering suspend. This patch moves the code of updating the metadata while suspending to *before* the test on mddev->suspended. Reported-by: Jeff Mahoney Fixes: 35bfc52187f6 ("md: allow metadata update while suspending.") Signed-off-by: NeilBrown Signed-off-by: Shaohua Li commit 072eff2d9e2d64c3a95572f0326de3563f26c392 Merge: db3408a150db 5cc6c8b30c84 Author: David S. Miller Date: Wed Oct 3 09:39:42 2018 -0700 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-10-03 This series contains updates to ice and virtchnl. Yashaswini Raghuram adds a new virtchnl capability flag to support the exchange of additional supported speeds. Anirudh adds support for SR-IOV for the ice driver. Added code to initialize, configure and use mailbox queues for PF and VF communication. Updated the VSI and queue management to handle both PF and VF VSI type. Added "Adaptive Virtual Function (AVF)" support for the ice PF driver by implementing virtchnl commands. Extended the malicious driver detection logic to include the VF driver as well. Fixed the queue region size which needs to be log base 2 of the number of queues in region. Brett fixes an issue which was causing switch rules to be lost, by making a call to ice_update_pkt_fwd_rule() with the necessary changes. Fixed how the PF and VF assigned the ITR index by adding a struct member itr_idx to be used to dynamically program the correct ITR index. Dave fixed a potential NULL pointer dereference by adding checks in the filter handling. ==================== Signed-off-by: David S. Miller commit db3408a150dbe6da5117a25ce9937633166cd604 Author: Ganesh Goudar Date: Wed Oct 3 18:26:32 2018 +0530 cxgb4: remove the unneeded locks cxgb_set_tx_maxrate will be called holding rtnl lock, hence remove all unneeded locks. Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller commit e4f3aa2e1e67bb48dfbaaf1cad59013d5a5bc276 Author: Young_X Date: Wed Oct 3 12:54:29 2018 +0000 cdrom: fix improper type cast, which can leat to information leak. There is another cast from unsigned long to int which causes a bounds check to fail with specially crafted input. The value is then used as an index in the slot array in cdrom_slot_status(). This issue is similar to CVE-2018-16658 and CVE-2018-10940. Signed-off-by: Young_X Signed-off-by: Jens Axboe commit 182a79e0c17147d2c2d3990a9a7b6b58a1561c7a Author: Wang Shilong Date: Wed Oct 3 12:19:21 2018 -0400 ext4: propagate error from dquot_initialize() in EXT4_IOC_FSSETXATTR We return most failure of dquota_initialize() except inode evict, this could make a bit sense, for example we allow file removal even quota files are broken? But it dosen't make sense to allow setting project if quota files etc are broken. Signed-off-by: Wang Shilong Signed-off-by: Theodore Ts'o Cc: stable@kernel.org commit 5aa389aa29ce0fcdd39fa88245bcad6cea6af57c Author: Rajneesh Bhardwaj Date: Wed Oct 3 17:21:10 2018 +0530 MAINTAINERS: intel_pmc_core: Update MAINTAINERS This removes the entry for pmc_core.h file in the MAINTAINERS as the file is already removed by a previous commit. "platform/x86: intel_pmc_core: Remove unused header file" Reported-by: Joe Perches Signed-off-by: Rajneesh Bhardwaj Signed-off-by: Andy Shevchenko commit 5f108da55c6a928d0305163731bca2ac94ab233b Author: Ricardo Ribalda Delgado Date: Wed Sep 26 02:12:42 2018 -0400 media: smiapp: Remove unused loop The loop seemed to be made to calculate max, but max is not used in that function. Signed-off-by: Ricardo Ribalda Delgado Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit b791187b0080e963d0498a6c6fe6050acd7d2cc2 Author: Hugues Fruchet Date: Mon Sep 24 09:33:27 2018 -0400 media: ov5640: use JPEG mode 3 for 720p Change 720p JPEG mode to mode 3 as per other resolutions. Signed-off-by: Hugues Fruchet Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit af8e15620efdfe335a7cf9c0a4d8bd89c2402e2b Author: Sakari Ailus Date: Mon Sep 24 10:38:11 2018 -0400 media: v4l: Remove support for crop default target in subdev drivers The V4L2 sub-device API does not support the crop default target. A number of drivers apparently still did support this, likely as it was needed by the SoC camera framework. Drop support for the default crop rectaingle in sub-device drivers, and use the bounds rectangle in SoC camera instead. Reported-by: Helmut Grohne Suggested-by: Hans Verkuil Signed-off-by: Sakari Ailus Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 654be7dde76b1897450c49d526af11067601e5b9 Author: Sakari Ailus Date: Mon Sep 24 10:24:43 2018 -0400 media: v4l: i2c: Add a comment not to use static sub-device names in the future A number of sub-device drivers used a static name for the sub-device, and thus the media entity. As the entity name must be unique within a media device, this makes it impossible to have more than one instance of each device in a media device. This is a rather severe limitation. Instead of fixing these drivers, add a comment to the drivers noting that such static names may not be used in the future. The alternative of fixing the drivers is troublesome as the entity (as well as sub-device) name is part of the uAPI. Changing that is almost certain to break something. As these devices are old but no-one has encountered a problem with the static names, leave it as-is. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit b92a8fababa9d18910a54b957be55fef7f603531 Author: Trond Myklebust Date: Mon Oct 1 10:41:45 2018 -0400 SUNRPC: Refactor sunrpc_cache_lookup This is a trivial split into lookup and insert functions, no change in behavior. Signed-off-by: Trond Myklebust Signed-off-by: J. Bruce Fields commit 59d925ac203b4a3d6fae3e0dda183261fb81bf7a Author: Jerome Brunet Date: Tue Oct 2 10:43:41 2018 +0200 arm64: dts: meson-axg: s400: disable emmc While it is possible to rework the s400 board to solder an eMMC on it, it is not the default option and most boards are fitted with a NAND instead. Let's disable the emmc device by default to reflect this. The board equipped with an eMMC will just have to alter the DT in the bootloader, like we do for the reserved memory regions. Signed-off-by: Jerome Brunet Signed-off-by: Kevin Hilman commit 087e9a465c29543d57874b00b4cec67d13f1bb2b Author: Jerome Brunet Date: Tue Oct 2 10:43:40 2018 +0200 arm64: dts: meson-axg: s400: add missing emmc pwrseq eMMC pwrseq is defined in the s400 dts but not used in the emmc node. This is probably just a copy/paste error Fixes: 221cf34bac54 ("ARM64: dts: meson-axg: enable the eMMC controller") Signed-off-by: Jerome Brunet Signed-off-by: Kevin Hilman commit 2e75b676c3284930489a968d33b75e5d2b2c36c6 Author: Gustavo A. R. Silva Date: Wed Oct 3 12:38:36 2018 +0200 ALSA: intel8x0: Fix fall-through annotations Replace "fallthru" with a proper "fall through" annotation. This fix is part of the ongoing efforts to enabling -Wimplicit-fallthrough Signed-off-by: Gustavo A. R. Silva Signed-off-by: Takashi Iwai commit 608a0ab2f54ab0e301ad76a41aad979ea0d02670 Author: Trond Myklebust Date: Mon Oct 1 10:41:44 2018 -0400 SUNRPC: Add lockless lookup of the server's auth domain Avoid taking the global auth_domain_lock in most lookups of the auth domain by adding an RCU protected lookup. Signed-off-by: Trond Myklebust Signed-off-by: J. Bruce Fields commit 30382d6ce593f863292cd7c026a79077c4e7280f Author: Trond Myklebust Date: Mon Oct 1 10:41:43 2018 -0400 SUNRPC: Remove the server 'authtab_lock' and just use RCU Module removal is RCU safe by design, so we really have no need to lock the 'authtab[]' array. Signed-off-by: Trond Myklebust Signed-off-by: J. Bruce Fields commit c24bfa8f21b59283580043dada19a6e943b6e426 Author: Gustavo A. R. Silva Date: Wed Oct 3 14:33:28 2018 +0200 spi: slave: Fix missing break in switch Apparently, this code does not actually fall through to the next case because the machine restarts before it has a chance. However, for the sake of maintenance and readability, we better add the missing break statement. Addresses-Coverity-ID: 1437892 ("Missing break in switch") Signed-off-by: Gustavo A. R. Silva Signed-off-by: Mark Brown commit 91f84690b502075550ca01d853d5c49b319921eb Author: Baruch Siach Date: Wed Oct 3 16:23:01 2018 +0300 arm64: dts: clearfog-gt-8k: add PCIe slot description This adds support for the PCIe interface on the CON4 mini-PCIe connector. Signed-off-by: Baruch Siach Signed-off-by: Gregory CLEMENT commit b0506a8bbb42a859f6d25b3ecc4b6da93bae8d5a Author: Julien Thierry Date: Tue Aug 28 16:51:17 2018 +0100 arm64: xen: Use existing helper to check interrupt status The status of interrupts might depend on more than just pstate. Use interrupts_disabled() instead of raw_irqs_disabled_flags() to take the full context into account. Acked-by: Stefano Stabellini Signed-off-by: Julien Thierry Cc: Will Deacon Signed-off-by: Catalin Marinas commit 9a0c032825e073e002ee80cf2577431d7296a7f7 Author: Julien Thierry Date: Tue Aug 28 16:51:15 2018 +0100 arm64: Use daifflag_restore after bp_hardening For EL0 entries requiring bp_hardening, daif status is kept at DAIF_PROCCTX_NOIRQ until after hardening has been done. Then interrupts are enabled through local_irq_enable(). Before using local_irq_* functions, daifflags should be properly restored to a state where IRQs are enabled. Enable IRQs by restoring DAIF_PROCCTX state after bp hardening. Acked-by: James Morse Signed-off-by: Julien Thierry Cc: Will Deacon Cc: Mark Rutland Signed-off-by: Catalin Marinas commit f05692919bdd44ad2a1a1fe85222dec16fec7e80 Author: Julien Thierry Date: Tue Aug 28 16:51:14 2018 +0100 arm64: daifflags: Use irqflags functions for daifflags Some of the work done in daifflags save/restore is already provided by irqflags functions. Daifflags should always be a superset of irqflags (it handles irq status + status of other flags). Modifying behaviour of irqflags should alter the behaviour of daifflags. Use irqflags_save/restore functions for the corresponding daifflags operation. Reviewed-by: James Morse Signed-off-by: Julien Thierry Cc: Will Deacon Signed-off-by: Catalin Marinas commit 4ce5f9c9e7546915c559ffae594e6d73f918db00 Author: Eric W. Biederman Date: Tue Sep 25 12:59:31 2018 +0200 signal: Use a smaller struct siginfo in the kernel We reserve 128 bytes for struct siginfo but only use about 48 bytes on 64bit and 32 bytes on 32bit. Someday we might use more but it is unlikely to be anytime soon. Userspace seems content with just enough bytes of siginfo to implement sigqueue. Or in the case of checkpoint/restart reinjecting signals the kernel has sent. Reducing the stack footprint and the work to copy siginfo around from 2 cachelines to 1 cachelines seems worth doing even if I don't have benchmarks to show a performance difference. Suggested-by: Linus Torvalds Signed-off-by: "Eric W. Biederman" commit ae7795bc6187a15ec51cf258abae656a625f9980 Author: Eric W. Biederman Date: Tue Sep 25 11:27:20 2018 +0200 signal: Distinguish between kernel_siginfo and siginfo Linus recently observed that if we did not worry about the padding member in struct siginfo it is only about 48 bytes, and 48 bytes is much nicer than 128 bytes for allocating on the stack and copying around in the kernel. The obvious thing of only adding the padding when userspace is including siginfo.h won't work as there are sigframe definitions in the kernel that embed struct siginfo. So split siginfo in two; kernel_siginfo and siginfo. Keeping the traditional name for the userspace definition. While the version that is used internally to the kernel and ultimately will not be padded to 128 bytes is called kernel_siginfo. The definition of struct kernel_siginfo I have put in include/signal_types.h A set of buildtime checks has been added to verify the two structures have the same field offsets. To make it easy to verify the change kernel_siginfo retains the same size as siginfo. The reduction in size comes in a following change. Signed-off-by: "Eric W. Biederman" commit 4cd2e0e70af6897ca2247fa1ffb1553ca16b4903 Author: Eric W. Biederman Date: Wed Apr 18 17:30:19 2018 -0500 signal: Introduce copy_siginfo_from_user and use it's return value In preparation for using a smaller version of siginfo in the kernel introduce copy_siginfo_from_user and use it when siginfo is copied from userspace. Make the pattern for using copy_siginfo_from_user and copy_siginfo_from_user32 to capture the return value and return that value on error. This is a necessary prerequisite for using a smaller siginfo in the kernel than the kernel exports to userspace. Signed-off-by: "Eric W. Biederman" commit f28380185193610c716a90ec9b9e696638a495ce Author: Eric W. Biederman Date: Wed Apr 18 17:48:49 2018 -0500 signal: Remove the need for __ARCH_SI_PREABLE_SIZE and SI_PAD_SIZE Rework the defintion of struct siginfo so that the array padding struct siginfo to SI_MAX_SIZE can be placed in a union along side of the rest of the struct siginfo members. The result is that we no longer need the __ARCH_SI_PREAMBLE_SIZE or SI_PAD_SIZE definitions. Signed-off-by: "Eric W. Biederman" commit e75dc036c445b91b8b2ad4e6c9b05f04b6be6d3f Author: Eric W. Biederman Date: Tue Sep 25 12:04:47 2018 +0200 signal: Fail sigqueueinfo if si_signo != sig The kernel needs to validate that the contents of struct siginfo make sense as siginfo is copied into the kernel, so that the proper union members can be put in the appropriate locations. The field si_signo is a fundamental part of that validation. As such changing the contents of si_signo after the validation make no sense and can result in nonsense values in the kernel. As such simply fail if someone is silly enough to set si_signo out of sync with the signal number passed to sigqueueinfo. I don't expect a problem as glibc's sigqueue implementation sets "si_signo = sig" and CRIU just returns to the kernel what the kernel gave to it. If there is some application that calls sigqueueinfo directly that has a problem with this added sanity check we can revisit this when we see what kind of crazy that application is doing. Signed-off-by: "Eric W. Biederman" commit 5cc6c8b30c8476f308d2500a0fca35e316c6dc90 Author: Anirudh Venkataramanan Date: Wed Sep 19 17:43:08 2018 -0700 ice: Update version string Update version string to 0.7.2-k Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 124cd5479679d23a18c8ea67176c28be715ab678 Author: Dave Ertman Date: Wed Sep 19 17:43:06 2018 -0700 ice: Use the right function to enable/disable VSI The ice_ena/dis_vsi should have a single differentiating factor to determine if the netdev_ops call is used or a direct call to ice_vsi_open/close. This is if the netif is running or not. If netif is running, use ndo_open/ndo_close. Else, use ice_vsi_open/ice_vsi_close. Signed-off-by: Dave Ertman Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit d2b464a7ff6cda3e1d4eb070ed6558f0cd152d1c Author: Brett Creeley Date: Wed Sep 19 17:43:05 2018 -0700 ice: Add more flexibility on how we assign an ITR index This issue came about when looking at the VF function ice_vc_cfg_irq_map_msg. Currently we are assigning the itr_setting value to the itr_idx received from the AVF driver, which is not correct and is not used for the VF flow anyway. Currently the only way we set the ITR index for both the PF and VF driver is by hard coding ICE_TX_ITR or ICE_RX_ITR for the ITR index on each q_vector. To fix this, add the member itr_idx in struct ice_ring_container. This can then be used to dynamically program the correct ITR index. This change also affected the PF driver so make the necessary changes there as well. Also, removed the itr_setting member in struct ice_ring because it is not being used meaningfully and is going to be removed in a future patch that includes dynamic ITR. On another note, this will be useful moving forward if we decide to split Rx/Tx rings on different q_vectors instead of sharing them as queue pairs. Signed-off-by: Brett Creeley Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 072f0c3db9daf7b57dfe0a5e2a5ccf42f71982f4 Author: Dave Ertman Date: Wed Sep 19 17:43:04 2018 -0700 ice: Fix potential null pointer issues Add checks in the filter handling flow to avoid dereferencing NULL pointers. Signed-off-by: Dave Ertman Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit c60cdb13ec60c19ba3f2f25dd1d9792d8cec6aea Author: Brett Creeley Date: Wed Sep 19 17:43:03 2018 -0700 ice: Add code to go from ICE_FWD_TO_VSI_LIST to ICE_FWD_TO_VSI When a switch rule is initially created we set the filter action to ICE_FWD_TO_VSI. The filter action changes to ICE_FWD_TO_VSI_LIST whenever more than one VSI is subscribed to the same switch rule. When the switch rule goes from 2 VSIs in the list to 1 VSI we remove and delete the VSI list rule, but we currently don't update the switch rule in hardware. This is causing switch rules to be lost, so fix that by making a call to ice_update_pkt_fwd_rule() with the necessary changes. Signed-off-by: Brett Creeley Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit be8ff000bf83e658e63ab64cf4d2755abc5add5b Author: Anirudh Venkataramanan Date: Wed Sep 19 17:43:02 2018 -0700 ice: Fix forward to queue group logic When adding a rule, queue region size needs to be provided as log base 2 of the number of queues in region. Fix that. Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 7c4bc1f5762849c194e371b307d134d20241e1ec Author: Anirudh Venkataramanan Date: Wed Sep 19 17:43:01 2018 -0700 ice: Extend malicious operations detection logic This patch extends the existing malicious driver operation detection logic to cover malicious operations by the VF driver as well. Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 53b8decbb7c83bbfc810cc1b0794267ab98df38b Author: Anirudh Venkataramanan Date: Wed Sep 19 17:43:00 2018 -0700 ice: Notify VF of link status change When PF gets a link status change event, notify the VFs of the same. Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 1071a8358a286df4ca7d3baa2ccea8b4cfe33c7a Author: Anirudh Venkataramanan Date: Wed Sep 19 17:42:59 2018 -0700 ice: Implement virtchnl commands for AVF support virtchnl is a protocol/interface specification that allows the Intel "Adaptive Virtual Function (AVF)" driver (iavf.ko) to work with more than one physical function driver. The AVF driver sends "virtchnl commands" (control plane only) to the PF driver over mailbox queues and the PF driver executes these commands and returns a result to the VF, again over mailbox. This patch adds AVF support for the ice PF driver by implementing the following virtchnl commands: VIRTCHNL_OP_VERSION VIRTCHNL_OP_GET_VF_RESOURCES VIRTCHNL_OP_RESET_VF VIRTCHNL_OP_ADD_ETH_ADDR VIRTCHNL_OP_DEL_ETH_ADDR VIRTCHNL_OP_CONFIG_VSI_QUEUES VIRTCHNL_OP_ENABLE_QUEUES VIRTCHNL_OP_DISABLE_QUEUES VIRTCHNL_OP_ADD_ETH_ADDR VIRTCHNL_OP_DEL_ETH_ADDR VIRTCHNL_OP_CONFIG_VSI_QUEUES VIRTCHNL_OP_ENABLE_QUEUES VIRTCHNL_OP_DISABLE_QUEUES VIRTCHNL_OP_REQUEST_QUEUES VIRTCHNL_OP_CONFIG_IRQ_MAP VIRTCHNL_OP_CONFIG_RSS_KEY VIRTCHNL_OP_CONFIG_RSS_LUT VIRTCHNL_OP_GET_STATS VIRTCHNL_OP_ADD_VLAN VIRTCHNL_OP_DEL_VLAN VIRTCHNL_OP_ENABLE_VLAN_STRIPPING VIRTCHNL_OP_DISABLE_VLAN_STRIPPING Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 7c710869d64e0119cc190514c7425c1a9aa2277d Author: Anirudh Venkataramanan Date: Wed Sep 19 17:42:58 2018 -0700 ice: Add handlers for VF netdevice operations This patch implements handlers for the following NDO operations: .ndo_set_vf_spoofchk .ndo_set_vf_mac .ndo_get_vf_config .ndo_set_vf_trust .ndo_set_vf_vlan .ndo_set_vf_link_state Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 007676b4ac920d4ceb4e4aa8aa668ac32d4764ad Author: Anirudh Venkataramanan Date: Wed Sep 19 17:42:57 2018 -0700 ice: Add support for VF reset events Post VF initialization, there are a couple of different ways in which a VF reset can be triggered. One is when the underlying PF itself goes through a reset and other is via a VFLR interrupt. ice_reset_vf introduced in this patch handles both these cases. Also introduced in this patch is a helper function ice_aq_send_msg_to_vf to send messages to VF over the mailbox queue. The PF uses this to send reset notifications to VFs. Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 8ede01785f32269ef4766cf17a535e70ee3c1541 Author: Anirudh Venkataramanan Date: Wed Sep 19 17:42:56 2018 -0700 ice: Update VSI and queue management code to handle VF VSI Until now, all the VSI and queue management code supported only the PF VSI type (ICE_VSI_PF). Update these flows to handle the VF VSI type (ICE_VSI_VF) type as well. Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit ddf30f7ff840d4467ef45ec0b443575f9e95bec6 Author: Anirudh Venkataramanan Date: Wed Sep 19 17:42:55 2018 -0700 ice: Add handler to configure SR-IOV This patch implements parts of ice_sriov_configure and VF reset flow. To create virtual functions (VFs), the user sets a value in num_vfs through sysfs. This results in the kernel calling the handler for .sriov_configure which is ice_sriov_configure. VF setup first starts with a VF reset, followed by allocation of the VF VSI using ice_vf_vsi_setup. Once the VF setup is complete a state bit ICE_VF_STATE_INIT is set in the vf->states bitmap to indicate that the VF is ready to go. Also for VF reset to go into effect, it's necessary to issue a disable queue command (ice_aqc_opc_dis_txqs). So this patch updates multiple functions in the disable queue flow to take additional parameters that distinguish if queues are being disabled due to VF reset. Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 75d2b253026b8b1cb625f6ccdb9d54cdecae7935 Author: Anirudh Venkataramanan Date: Wed Sep 19 17:42:54 2018 -0700 ice: Add support to detect SR-IOV capability and mailbox queues Mailbox queue is a type of control queue that's used for communication between PF and VF. This patch adds code to initialize, configure and use mailbox queues. This patch also adds support to detect and parse SR-IOV capabilities returned by the hardware. Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 16fc087b9cb22c9a97307cc24a5413d0df68fe11 Author: Yashaswini Raghuram Prathivadi Bhayankaram Date: Fri Aug 10 00:17:44 2018 -0700 virtchnl: Added support to exchange additional speed values Introduced a new virtchnl capability flag and a struct to support exchange of additional supported speeds. Signed-off-by: Yashaswini Raghuram Prathivadi Bhayankaram Signed-off-by: Anirudh Venkataramanan Signed-off-by: Jeff Kirsher commit 018303a931a89b91dacd76140b8ebe51893dc5fe Author: Eric W. Biederman Date: Wed Apr 18 19:15:59 2018 -0500 signal/sparc: Move EMT_TAGOVF into the generic siginfo.h When moving all of the architectures specific si_codes into siginfo.h, I apparently overlooked EMT_TAGOVF. Move it now. Remove the now redundant test in siginfo_layout for SIGEMT as now NSIGEMT is always defined. Signed-off-by: "Eric W. Biederman" commit dc7ac6c4cae3b58724c2f1e21a7c05ce19ecd5a8 Author: Wang Shilong Date: Wed Oct 3 10:33:32 2018 -0400 ext4: fix setattr project check in fssetxattr ioctl Currently, project quota could be changed by fssetxattr ioctl, and existed permission check inode_owner_or_capable() is obviously not enough, just think that common users could change project id of file, that could make users to break project quota easily. This patch try to follow same regular of xfs project quota: "Project Quota ID state is only allowed to change from within the init namespace. Enforce that restriction only if we are trying to change the quota ID state. Everything else is allowed in user namespaces." Besides that, check and set project id'state should be an atomic operation, protect whole operation with inode lock, ext4_ioctl_setproject() is only used for ioctl EXT4_IOC_FSSETXATTR, we have held mnt_want_write_file() before ext4_ioctl_setflags(), and ext4_ioctl_setproject() is called after ext4_ioctl_setflags(), we could share codes, so remove it inside ext4_ioctl_setproject(). Signed-off-by: Wang Shilong Signed-off-by: Theodore Ts'o Reviewed-by: Andreas Dilger Cc: stable@kernel.org commit f7d4668155245d90470f591576b6593e0f077fcb Author: Chuck Lever Date: Mon Oct 1 14:26:24 2018 -0400 xprtrdma: Don't disable BH's in backchannel server Clean up: This code was copied from xprtsock.c and backchannel_rqst.c. For rpcrdma, the backchannel server runs exclusively in process context, thus disabling bottom-halves is unnecessary. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit b3541fbc3c25bf2ba6d03a450c07f824e318f9b9 Author: Takuya Yamamoto Date: Wed Aug 29 16:27:30 2018 +0900 x86/mm: Fix typo in comment Signed-off-by: Takuya Yamamoto Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/20180829072730.988-1-tkyymmt01@gmail.com commit 83e301dd1347bb98419103685e48c2b4835937db Author: Chuck Lever Date: Mon Oct 1 14:26:19 2018 -0400 xprtrdma: Remove memory address of "ep" from an error message Clean up: Replace the hashed memory address of the target rpcrdma_ep with the server's IP address and port. The server address is more useful in an administrative error message. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit 250f2da49cb8e582215a65c03f50e8ddf5cd119c Author: Zubin Mithra Date: Thu Sep 27 14:49:17 2018 -0700 apparmor: Fix uninitialized value in aa_split_fqname Syzkaller reported a OOB-read with the stacktrace below. This occurs inside __aa_lookupn_ns as `n` is not initialized. `n` is obtained from aa_splitn_fqname. In cases where `name` is invalid, aa_splitn_fqname returns without initializing `ns_name` and `ns_len`. Fix this by always initializing `ns_name` and `ns_len`. __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1c4/0x2b4 lib/dump_stack.c:113 print_address_description.cold.8+0x9/0x1ff mm/kasan/report.c:256 kasan_report_error mm/kasan/report.c:354 [inline] kasan_report.cold.9+0x242/0x309 mm/kasan/report.c:412 __asan_report_load1_noabort+0x14/0x20 mm/kasan/report.c:430 memcmp+0xe3/0x160 lib/string.c:861 strnstr+0x4b/0x70 lib/string.c:934 __aa_lookupn_ns+0xc1/0x570 security/apparmor/policy_ns.c:209 aa_lookupn_ns+0x88/0x1e0 security/apparmor/policy_ns.c:240 aa_fqlookupn_profile+0x1b9/0x1010 security/apparmor/policy.c:468 fqlookupn_profile+0x80/0xc0 security/apparmor/label.c:1844 aa_label_strn_parse+0xa3a/0x1230 security/apparmor/label.c:1908 aa_label_parse+0x42/0x50 security/apparmor/label.c:1943 aa_change_profile+0x513/0x3510 security/apparmor/domain.c:1362 apparmor_setprocattr+0xaa4/0x1150 security/apparmor/lsm.c:658 security_setprocattr+0x66/0xc0 security/security.c:1298 proc_pid_attr_write+0x301/0x540 fs/proc/base.c:2555 __vfs_write+0x119/0x9f0 fs/read_write.c:485 vfs_write+0x1fc/0x560 fs/read_write.c:549 ksys_write+0x101/0x260 fs/read_write.c:598 __do_sys_write fs/read_write.c:610 [inline] __se_sys_write fs/read_write.c:607 [inline] __x64_sys_write+0x73/0xb0 fs/read_write.c:607 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe Fixes: 3b0aaf5866bf ("apparmor: add lib fn to find the "split" for fqnames") Reported-by: syzbot+61e4b490d9d2da591b50@syzkaller.appspotmail.com Signed-off-by: Zubin Mithra Reviewed-by: Kees Cook Signed-off-by: John Johansen commit ca3fde5214e1d24f78269b337d3f22afd6bf445e Author: Jann Horn Date: Sat Sep 29 03:49:26 2018 +0200 apparmor: don't try to replace stale label in ptraceme check begin_current_label_crit_section() must run in sleepable context because when label_is_stale() is true, aa_replace_current_label() runs, which uses prepare_creds(), which can sleep. Until now, the ptraceme access check (which runs with tasklist_lock held) violated this rule. Fixes: b2d09ae449ced ("apparmor: move ptrace checks to using labels") Reported-by: Cyrill Gorcunov Reported-by: kernel test robot Signed-off-by: Jann Horn Signed-off-by: John Johansen commit 0fb871cc42537465e322f727bec6abfd375faa83 Author: Lance Roy Date: Tue Oct 2 22:39:01 2018 -0700 apparmor: 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 Cc: John Johansen Cc: James Morris Cc: "Serge E. Hallyn" Cc: Signed-off-by: John Johansen commit ab9f2115081ab7ba63b77a759e0f3eb5d6463d7f Author: Matthew Garrett Date: Thu May 24 13:27:47 2018 -0700 apparmor: Allow filtering based on secmark policy Add support for dropping or accepting packets based on their secmark tags. Signed-off-by: Matthew Garrett Signed-off-by: John Johansen commit 9caafbe2b4cf4c635826a2832e93cf648605de8b Author: Matthew Garrett Date: Thu May 24 13:27:46 2018 -0700 apparmor: Parse secmark policy Add support for parsing secmark policy provided by userspace, and store that in the overall policy. Signed-off-by: Matthew Garrett Signed-off-by: John Johansen commit 617a629c08bfffb05249131079d9a38322902e5b Author: Matthew Garrett Date: Thu May 24 13:27:45 2018 -0700 apparmor: Add a wildcard secid Reserve a secid value that we can use as a wildcard, allowing us to define policy that's expected to match against all secids. Signed-off-by: Matthew Garrett Signed-off-by: John Johansen commit f9521d53e804b9721c2829858f6d5bf6f470e734 Author: Chuck Lever Date: Mon Oct 1 14:26:13 2018 -0400 xprtrdma: Rename rpcrdma_qp_async_error_upcall Clean up: Use a function name that is consistent with the RDMA core API and with other consumers. Because this is a function that is invoked from outside the rpcrdma.ko module, add an appropriate documenting comment. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit 31e62d25b5b8155b2ff6a7c6d31256475dbbcc7a Author: Chuck Lever Date: Mon Oct 1 14:26:08 2018 -0400 xprtrdma: Simplify RPC wake-ups on connect Currently, when a connection is established, rpcrdma_conn_upcall invokes rpcrdma_conn_func and then wake_up_all(&ep->rep_connect_wait). The former wakes waiting RPCs, but the connect worker is not done yet, and that leads to races, double wakes, and difficulty understanding how this logic is supposed to work. Instead, collect all the "connection established" logic in the connect worker (xprt_rdma_connect_worker). A disconnect worker is retained to handle provider upcalls safely. Fixes: 254f91e2fa1f ("xprtrdma: RPC/RDMA must invoke ... ") Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit 316a616e7886583c03d00f8320458b713c1dd277 Author: Chuck Lever Date: Mon Oct 1 14:26:03 2018 -0400 xprtrdma: Re-organize the switch() in rpcrdma_conn_upcall Clean up: Eliminate the FALLTHROUGH into the default arm to make the switch easier to understand. Also, as long as I'm here, do not display the memory address of the target rpcrdma_ep. A hashed memory address is of marginal use here. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit 9414229c9c53d3604032aa80f3d2e9ba5770cd4a Author: Daniel Lezcano Date: Mon Sep 24 06:08:07 2018 +0200 clocksource: Remove obsolete CLOCKSOURCE_OF_DECLARE The macro CLOCKSOURCE_OF_DECLARE was renamed more TIMER_OF_DECLARE, and we kept an alias CLOCKSOURCE_OF_DECLARE in order to smooth the transition for drivers. This change was done 1.5 year ago, we can reasonably remove this backward compatible macro as it is no longer used anywhere. Signed-off-by: Daniel Lezcano commit 9d8d47ea6ec6048abc75ccc4486aff1a7db1ff4b Author: Daniel Lezcano Date: Mon Sep 24 05:59:23 2018 +0200 clocksource/drivers: Unify the names to timer-* format In order to make some housekeeping in the directory, this patch renames drivers to the timer-* format in order to unify their names. There is no functional changes. Acked-by: Uwe Kleine-König Acked-by: Vladimir Zapolskiy Acked-by: Liviu Dudau Signed-off-by: Daniel Lezcano commit ac142a7fd291f4230923f221a594ce0281a96a72 Author: Sergei Shtylyov Date: Wed Sep 12 23:17:37 2018 +0300 clocksource/drivers/sh_cmt: Add R-Car gen3 support Add support for the R-Car gen3 CMT types 0/1 -- they seem to be the same CMT types 0/1 as in R-Car gen2 SoCs. Signed-off-by: Sergei Shtylyov Reviewed-by: Geert Uytterhoeven Signed-off-by: Daniel Lezcano commit 9a199422b0d08efaaef2df006c34b0653591a4bf Author: Sergei Shtylyov Date: Wed Sep 12 23:15:28 2018 +0300 dt-bindings: timer: renesas: cmt: document R-Car gen3 support Document support for the R-Car gen3 CMT types 0/1 bindings -- they seem to be the same CMT types 0/1 as in the R-Car gen2 SoCs. Also document R8A779{7|8}0 bindings as these are the R-Car gen3 SoCs for which the initial support was done. Signed-off-by: Sergei Shtylyov Reviewed-by: Geert Uytterhoeven Signed-off-by: Daniel Lezcano commit eceb4c49aed0fafbc4967e788231b1eba42b7606 Author: Sergei Shtylyov Date: Wed Sep 12 23:14:14 2018 +0300 clocksource/drivers/sh_cmt: Properly line-wrap sh_cmt_of_table[] initializer There's no good reason for the sh_cmt_of_table[] initializer to violate the 80-column limit, especially after the commit 8d50e9476bb4 ("clocksource/drivers/sh_cmt: Mark "renesas,cmt-48-gen2" deprecated") partially fixed it -- fix the R-Car gen2 related entries as well. Signed-off-by: Sergei Shtylyov Reviewed-by: Chris Paterson Reviewed-by: Geert Uytterhoeven Signed-off-by: Daniel Lezcano commit 37e7742c55ba856eaec7e35673ee370f36eb17f3 Author: Sergei Shtylyov Date: Mon Sep 10 23:22:16 2018 +0300 clocksource/drivers/sh_cmt: Fix clocksource width for 32-bit machines The driver seems to abuse *unsigned long* not only for the (32-bit) register values but also for the 'sh_cmt_channel::total_cycles' which needs to always be 64-bit -- as a result, the clocksource's mask is needlessly clamped down to 32-bits on the 32-bit machines... Fixes: 19bdc9d061bc ("clocksource: sh_cmt clocksource support") Reported-by: Geert Uytterhoeven Signed-off-by: Sergei Shtylyov Reviewed-by: Simon Horman Reviewed-by: Geert Uytterhoeven Signed-off-by: Daniel Lezcano commit 22627c6f3ed3d9d0df13eec3c831b08f8186c38e Author: Sergei Shtylyov Date: Sat Sep 8 23:54:05 2018 +0300 clocksource/drivers/sh_cmt: Fixup for 64-bit machines When trying to use CMT for clockevents on R-Car gen3 SoCs, I noticed that 'max_delta_ns' for the broadcast timer (CMT) was shown as 1000 in /proc/timer_list. It turned out that when calculating it, the driver did 1 << 32 (causing what I think was undefined behavior) resulting in a zero delta, later clamped to 1000 by cev_delta2ns(). The root cause turned out to be that the driver abused *unsigned long* for the CMT register values (which are 16/32-bit), so that the calculation of 'ch->max_match_value' in sh_cmt_setup_channel() used the wrong branch. Using more proper 'u32' instead fixed 'max_delta_ns' and even fixed the switching an active clocksource to CMT (which caused the system to turn non-interactive before). Signed-off-by: Sergei Shtylyov Reviewed-by: Geert Uytterhoeven Signed-off-by: Daniel Lezcano commit 0b9294fe8dca4ab500e955cf06445134d228e493 Author: Kuninori Morimoto Date: Wed Aug 22 02:26:20 2018 +0000 clocksource/drivers/sh_tmu: 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: Daniel Lezcano commit ddb89642a24f37abc00fa363f840708400d365be Author: Kuninori Morimoto Date: Wed Aug 22 02:26:06 2018 +0000 clocksource/drivers/sh_mtu2: 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: Daniel Lezcano commit efad01173717b0d0ad8a7dc91cc447f19d8447f3 Author: Kuninori Morimoto Date: Wed Aug 22 02:25:53 2018 +0000 clocksource/drivers/sh_cmt: 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: Daniel Lezcano commit 274157a4f7027af432642ca22e84f052875b26b4 Author: Kuninori Morimoto Date: Wed Aug 22 02:25:38 2018 +0000 clocksource/drivers/renesas-ostm: 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: Daniel Lezcano commit 2a4849d2674b965cd9eb7e6c010b7c240fb9d218 Author: Rob Herring Date: Mon Aug 27 20:52:14 2018 -0500 clocksource: 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: Daniel Lezcano Cc: Thomas Gleixner Cc: Michal Simek Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Rob Herring Signed-off-by: Daniel Lezcano commit d6e7bbc148f9fbec8a0117b0d0f420c9710e6d81 Author: Russ Dill Date: Tue Sep 4 12:19:37 2018 +0530 clk: ti: Add functions to save/restore clk context SoCs like AM43XX lose clock registers context during RTC-only suspend. Hence add functions to save/restore the clock registers context. Signed-off-by: Keerthy Signed-off-by: Russ Dill Acked-by: Tony Lindgren Signed-off-by: Tero Kristo commit 435365485f40cf12747d1daa2253a4f4b46b8148 Author: Keerthy Date: Tue Sep 4 12:19:36 2018 +0530 clk: clk: Add clk_gate_restore_context function The clock gate restore context function enables or disables the gate clocks based on the enable_count. This is done in cases where the clock context is lost and based on the enable_count the clock either needs to be enabled/disabled. Signed-off-by: Keerthy Acked-by: Tony Lindgren Signed-off-by: Tero Kristo commit 8b95d1ce3300c411728954473316bd04d0ba9883 Author: Russ Dill Date: Tue Sep 4 12:19:35 2018 +0530 clk: Add functions to save/restore clock context en-masse Deep enough power saving mode can result into losing context of the clock registers also, and they need to be restored once coming back from the power saving mode. Hence add functions to save/restore clock context. Signed-off-by: Keerthy Signed-off-by: Russ Dill Acked-by: Tony Lindgren Signed-off-by: Tero Kristo commit dffa9051d54672a7d7f5951e074c4393672c03e9 Author: Tero Kristo Date: Mon Aug 13 14:30:49 2018 +0300 clk: ti: dra7: add new clkctrl data The new clkctrl data layout for dra7xx is split based on clockdomain boundaries. Previously the split was based on CM boundaries. This patch adds the new data as separate data entity, retaining the compatibility data also for now. The compatibility data can be removed once no longer needed. Signed-off-by: Tero Kristo Tested-by: Tony Lindgren commit 43c56e046cd8229315a466b079c53f4ab0f8dcf2 Author: Tero Kristo Date: Mon Aug 13 11:11:33 2018 +0300 clk: ti: dra7xx: rename existing clkctrl data as compat data Rename the existing clkctrl data in preparation of upcoming clkdm based split for it. Once the DT data has transitioned also, the compat data can be removed. Signed-off-by: Tero Kristo Tested-by: Tony Lindgren commit 76a1049b84dd57bad6260b51455bbd17053b2eb4 Author: Tero Kristo Date: Mon Aug 13 10:48:52 2018 +0300 clk: ti: am43xx: add new clkctrl data for am43xx The new clkctrl data layout for am43xx is split based on clockdomain boundaries. Previously the split was based on CM boundaries. This patch adds the new data as separate data entity, retaining the compatibility data also for now. The compatibility data can be removed once no longer needed. Signed-off-by: Tero Kristo Tested-by: Tony Lindgren commit 131ee08f3fba48fd39ceca9c785a908c37276667 Author: Tero Kristo Date: Mon Aug 13 10:38:40 2018 +0300 clk: ti: am43xx: rename existing clkctrl data as compat data Rename the existing clkctrl data in preparation of upcoming clkdm based split for it. Once the DT data has transitioned also, the compat data can be removed. Signed-off-by: Tero Kristo Tested-by: Tony Lindgren commit 296e583e9987e9f8e24dbc4e96692f987cfd6d95 Author: Tero Kristo Date: Fri Aug 10 18:35:03 2018 +0300 clk: ti: am33xx: add new clkctrl data for am33xx The new clkctrl data layout for am33xx is split based on clockdomain boundaries. Previously the split was based on CM boundaries. This patch adds the new data as separate data entity, retaining the compatibility data also for now. The compatibility data can be removed once no longer needed. Signed-off-by: Tero Kristo Tested-by: Tony Lindgren commit e97017f935fcb3d505d86738817230552f58a19a Author: Tero Kristo Date: Fri Aug 10 18:22:02 2018 +0300 clk: ti: am33xx: rename existing clkctrl data as compat data Rename the existing clkctrl data in preparation of upcoming clkdm based split for it. Once the DT data has transitioned also, the compat data can be removed. Signed-off-by: Tero Kristo Tested-by: Tony Lindgren commit 1dc88f78da594042b549f1ea70de2fb721990e3c Author: Tero Kristo Date: Thu Aug 30 09:58:31 2018 +0300 clk: ti: clkctrl: replace dashes from clkdm name with underscore The change in the DTS data node naming prevents using underscore within the node names and force usage of dash instead. On the other hand, clockdomains use underscore instead of dash, so this must be replaced within the driver code so that the mapping between the two can be done properly. Signed-off-by: Tero Kristo Tested-by: Tony Lindgren commit 47b00dcf141172c4c1c583701ec91923672cec39 Author: Tero Kristo Date: Fri Aug 10 11:29:09 2018 +0300 clk: ti: clkctrl: support multiple clkctrl nodes under a cm node Currently, only one clkctrl node can be added under a specific CM node due to limitation with the implementation. Modify the code to pick-up clockdomain name from the clkctrl node instead of CM node if provided. Also, add a new flag to the TI clock driver so that both modes can be supported simultaneously. Signed-off-by: Tero Kristo Tested-by: Tony Lindgren commit 8fa45095791813b0438c2604567e7e213804e66c Author: Tero Kristo Date: Fri Aug 31 17:44:09 2018 +0300 dt-bindings: clock: dra7xx: add clkctrl indices for new data layout The new data layout will be split based on clockdomain boundaries, instead of CM boundaries. This introduces a few new clkctrl providers, that have different indices for the clkctrl data. Signed-off-by: Tero Kristo Tested-by: Tony Lindgren commit 8cfbdbd9694ea41a33f991c608fce5d43b8b1cce Author: Tero Kristo Date: Fri Aug 31 17:42:31 2018 +0300 dt-bindings: clock: am43xx: add clkctrl indices for new data layout The new data layout will be split based on clockdomain boundaries, instead of CM boundaries. This introduces a few new clkctrl providers, that have different indices for the clkctrl data. Signed-off-by: Tero Kristo Tested-by: Tony Lindgren commit e358cf2e6efce1312f1b5bc97543f40dfd319633 Author: Tero Kristo Date: Fri Aug 31 17:38:57 2018 +0300 dt-bindings: clock: am33xx: add clkctrl indices for new data layout The new data layout will be split based on clockdomain boundaries, instead of CM boundaries. This introduces a few new clkctrl providers, that have different indices for the clkctrl data. Signed-off-by: Tero Kristo Tested-by: Tony Lindgren commit 8ff3c22688ff3616ee53c5c54b3ee66a73326175 Author: Nathan Chancellor Date: Tue Oct 2 15:34:57 2018 -0700 cpufreq / CPPC: Mark acpi_ids as used Clang warns: drivers/cpufreq/cppc_cpufreq.c:431:36: warning: variable 'cppc_acpi_ids' is not needed and will not be emitted [-Wunneeded-internal-declaration] static const struct acpi_device_id cppc_acpi_ids[] = { ^ 1 warning generated. Mark the definition as used so that Clang understands we don't want this warning while not inhibiting Clang's dead code elimination from removing the unreferenced internal symbol when moving the data it contains to the globally available symbol via MODULE_DEVICE_TABLE. $ nm -S drivers/cpufreq/cppc_cpufreq.o | grep acpi | tail -1 0000000000000000 0000000000000040 R __mod_acpi__cppc_acpi_ids_device_table Suggested-by: Nick Desaulniers Reviewed-by: Nick Desaulniers Signed-off-by: Nathan Chancellor Signed-off-by: Rafael J. Wysocki commit fd2ef358282c849c193aa36dadbf4f07f7dcd29b Author: Punit Agrawal Date: Mon Oct 1 16:54:35 2018 +0100 KVM: arm/arm64: Ensure only THP is candidate for adjustment PageTransCompoundMap() returns true for hugetlbfs and THP hugepages. This behaviour incorrectly leads to stage 2 faults for unsupported hugepage sizes (e.g., 64K hugepage with 4K pages) to be treated as THP faults. Tighten the check to filter out hugetlbfs pages. This also leads to consistently mapping all unsupported hugepage sizes as PTE level entries at stage 2. Signed-off-by: Punit Agrawal Reviewed-by: Suzuki Poulose Cc: Christoffer Dall Cc: Marc Zyngier Cc: stable@vger.kernel.org # v4.13+ Signed-off-by: Marc Zyngier commit f0725345e3e127032376e4fcb6b0fc893237fcef Author: zhong jiang Date: Thu Aug 9 22:20:41 2018 +0800 arm64: KVM: Remove some extra semicolon in kvm_target_cpu There are some extra semicolon in kvm_target_cpu, remove it. Signed-off-by: zhong jiang Signed-off-by: Marc Zyngier commit 9d47bb0d9ea8528373b4c6f9bca6c7f402900297 Author: Marc Zyngier Date: Mon Oct 1 13:41:32 2018 +0100 KVM: arm64: Drop __cpu_init_stage2 on the VHE path __cpu_init_stage2 doesn't do anything anymore on arm64, and is totally non-sensical if running VHE (as VHE is 64bit only). Reviewed-by: Eric Auger Reviewed-by: Suzuki K Poulose Signed-off-by: Marc Zyngier commit bca607ebc76af9540e4aad5b2241a7323354be43 Author: Marc Zyngier Date: Mon Oct 1 13:40:36 2018 +0100 KVM: arm/arm64: Rename kvm_arm_config_vm to kvm_arm_setup_stage2 VM tends to be a very overloaded term in KVM, so let's keep it to describe the virtual machine. For the virtual memory setup, let's use the "stage2" suffix. Reviewed-by: Eric Auger Reviewed-by: Suzuki K Poulose Signed-off-by: Marc Zyngier commit 233a7cb235318223df8133235383f4c595c654c1 Author: Suzuki K Poulose Date: Wed Sep 26 17:32:54 2018 +0100 kvm: arm64: Allow tuning the physical address size for VM Allow specifying the physical address size limit for a new VM via the kvm_type argument for the KVM_CREATE_VM ioctl. This allows us to finalise the stage2 page table as early as possible and hence perform the right checks on the memory slots without complication. The size is encoded as Log2(PA_Size) in bits[7:0] of the type field. For backward compatibility the value 0 is reserved and implies 40bits. Also, lift the limit of the IPA to host limit and allow lower IPA sizes (e.g, 32). The userspace could check the extension KVM_CAP_ARM_VM_IPA_SIZE for the availability of this feature. The cap check returns the maximum limit for the physical address shift supported by the host. Cc: Marc Zyngier Cc: Christoffer Dall Cc: Peter Maydell Cc: Paolo Bonzini Cc: Radim Krčmář Reviewed-by: Eric Auger Signed-off-by: Suzuki K Poulose Signed-off-by: Marc Zyngier commit 58b3efc820acd3219e89ff014e93346a734229b8 Author: Suzuki K Poulose Date: Wed Sep 26 17:32:53 2018 +0100 kvm: arm64: Limit the minimum number of page table levels Since we are about to remove the lower limit on the IPA size, make sure that we do not go to 1 level page table (e.g, with 32bit IPA on 64K host with concatenation) to avoid splitting the host PMD huge pages at stage2. Cc: Marc Zyngier Cc: Christoffer Dall Reviewed-by: Eric Auger Signed-off-by: Suzuki K Poulose Signed-off-by: Marc Zyngier commit 0f62f0e95be29200ab2ab98ca870e22c9b148dfa Author: Suzuki K Poulose Date: Wed Sep 26 17:32:52 2018 +0100 kvm: arm64: Set a limit on the IPA size So far we have restricted the IPA size of the VM to the default value (40bits). Now that we can manage the IPA size per VM and support dynamic stage2 page tables, we can allow VMs to have larger IPA. This patch introduces a the maximum IPA size supported on the host. This is decided by the following factors : 1) Maximum PARange supported by the CPUs - This can be inferred from the system wide safe value. 2) Maximum PA size supported by the host kernel (48 vs 52) 3) Number of levels in the host page table (as we base our stage2 tables on the host table helpers). Since the stage2 page table code is dependent on the stage1 page table, we always ensure that : Number of Levels at Stage1 >= Number of Levels at Stage2 So we limit the IPA to make sure that the above condition is satisfied. This will affect the following combinations of VA_BITS and IPA for different page sizes. Host configuration | Unsupported IPA ranges 39bit VA, 4K | [44, 48] 36bit VA, 16K | [41, 48] 42bit VA, 64K | [47, 52] Supporting the above combinations need independent stage2 page table manipulation code, which would need substantial changes. We could purse the solution independently and switch the page table code once we have it ready. Cc: Catalin Marinas Cc: Marc Zyngier Cc: Christoffer Dall Reviewed-by: Eric Auger Signed-off-by: Suzuki K Poulose Signed-off-by: Marc Zyngier commit 040f340134751d73bd03ee92fabb992946c55b3d Author: Arnd Bergmann Date: Tue Oct 2 23:11:44 2018 +0200 arm64: arch_timer: avoid unused function warning arm64_1188873_read_cntvct_el0() is protected by the correct CONFIG_ARM64_ERRATUM_1188873 #ifdef, but the only reference to it is also inside of an CONFIG_ARM_ARCH_TIMER_OOL_WORKAROUND section, and causes a warning if that is disabled: drivers/clocksource/arm_arch_timer.c:323:20: error: 'arm64_1188873_read_cntvct_el0' defined but not used [-Werror=unused-function] Since the erratum requires that we always apply the workaround in the timer driver, select that symbol as we do for SoC specific errata. Fixes: 95b861a4a6d9 ("arm64: arch_timer: Add workaround for ARM erratum 1188873") Acked-by: Marc Zyngier Signed-off-by: Arnd Bergmann Signed-off-by: Catalin Marinas commit 2130b789b3ef6a518b9c9c6f245642620e2b0c0c Author: Julien Thierry Date: Tue Aug 28 16:51:18 2018 +0100 irqchip/gic: Unify GIC priority definitions LPIs use the same priority value as other GIC interrupts. Make the GIC default priority definition visible to ITS implementation and use this same definition for LPI priorities. Tested-by: Daniel Thompson Signed-off-by: Julien Thierry Cc: Thomas Gleixner Cc: Jason Cooper Cc: Marc Zyngier Signed-off-by: Marc Zyngier commit 342677d70ab92142b483fc68bcade74cdf969785 Author: Julien Thierry Date: Tue Aug 28 16:51:29 2018 +0100 irqchip/gic-v3: Remove acknowledge loop Multiple interrupts pending for a CPU is actually rare. Doing an acknowledge loop does not give much better performance or even can deteriorate them. Do not loop when an interrupt has been acknowledged, just return from interrupt and wait for another one to be raised. Tested-by: Daniel Thompson Signed-off-by: Julien Thierry Cc: Thomas Gleixner Cc: Jason Cooper Cc: Marc Zyngier Signed-off-by: Marc Zyngier commit 1ce78ce09430a5ffb987015ab2e24d145690b9a3 Author: Gustavo Pimentel Date: Thu Aug 23 13:55:15 2018 +0200 tools: PCI: Change pcitest compiling process Change tool compiling process in order to be build using the same mechanism used in other linux tools (e.g. iio, perf, etc). This will allow in future the buildroot tool to build and integrate this tool in a more expeditious way. Update documentation accordingly. Signed-off-by: Gustavo Pimentel Signed-off-by: Lorenzo Pieralisi Reviewed-by: Kishon Vijay Abraham I commit fef31ecaaf2c5c54db85b35e893bf8abec96b93f Author: Gustavo Pimentel Date: Thu Aug 23 13:34:53 2018 +0200 tools: PCI: Fix compilation warnings Current compilation produces the following warnings: tools/pci/pcitest.c: In function 'run_test': tools/pci/pcitest.c:56:9: warning: unused variable 'time' [-Wunused-variable] double time; ^~~~ tools/pci/pcitest.c:55:25: warning: unused variable 'end' [-Wunused-variable] struct timespec start, end; ^~~ tools/pci/pcitest.c:55:18: warning: unused variable 'start' [-Wunused-variable] struct timespec start, end; ^~~~~ tools/pci/pcitest.c:146:1: warning: control reaches end of non-void function [-Wreturn-type] } ^ Fix them: - remove unused variables - change function return from int to void, since it's not used Signed-off-by: Gustavo Pimentel [lorenzo.pieralisi@arm.com: rewrote the commit log] Signed-off-by: Lorenzo Pieralisi Reviewed-by: Kishon Vijay Abraham I commit 03dba278043358bbbf4f029be169e1e73d2fbe2b Author: Rafael J. Wysocki Date: Mon Oct 1 11:56:21 2018 +0200 cpuidle: menu: Replace data->predicted_us with local variable The predicted_us field in struct menu_device is only accessed in menu_select(), so replace it with a local variable in that function. With that, stop using expected_interval instead of predicted_us to store the new predicted idle duration value if it is set to the selected state's target residency which is quite confusing. Signed-off-by: Rafael J. Wysocki Acked-by: Daniel Lezcano commit 1fca4ba0b14d79e8a43822f7b0c7288efba4c9fa Author: Zhimin Gu Date: Fri Sep 21 14:28:41 2018 +0800 x86-32, hibernate: Adjust in_suspend after resumed on 32bit system Update the in_suspend variable to reflect the actual hibernation status. Back-port from 64bit system. Signed-off-by: Zhimin Gu Acked-by: Pavel Machek Signed-off-by: Chen Yu Acked-by: Thomas Gleixner Signed-off-by: Rafael J. Wysocki commit 5331d2c7efbccab436aa11639d7fa00a1d58abe2 Author: Zhimin Gu Date: Fri Sep 21 14:28:32 2018 +0800 x86-32, hibernate: Set up temporary text mapping for 32bit system Set up the temporary text mapping for the final jump address so that the system could jump to the right address after all the pages have been copied back to their original address - otherwise the final mapping for the jump address is invalid. Analogous changes were made for 64-bit in commit 65c0554b73c9 (x86/power/64: Fix kernel text mapping corruption during image restoration). Signed-off-by: Zhimin Gu Acked-by: Pavel Machek Signed-off-by: Chen Yu Acked-by: Thomas Gleixner Signed-off-by: Rafael J. Wysocki commit 6bae499a0ad437efb67b7c378e6fb4abef1885a1 Author: Zhimin Gu Date: Fri Sep 21 14:28:22 2018 +0800 x86-32, hibernate: Switch to relocated restore code during resume on 32bit system On 64bit system, code should be executed in a safe page during page restoring, as the page where instruction is running during resume might be scribbled and causes issues. Although on 32 bit, we only suspend resuming by same kernel that did the suspend, we'd like to remove that restriction in the future. Porting corresponding code from 64bit system: Allocate a safe page, and copy the restore code to it, then jump to the safe page to run the code. Signed-off-by: Zhimin Gu Acked-by: Pavel Machek Signed-off-by: Chen Yu Acked-by: Thomas Gleixner Signed-off-by: Rafael J. Wysocki commit 32aa276437f6128df63111af13e57fe8f0272af3 Author: Zhimin Gu Date: Fri Sep 21 14:28:11 2018 +0800 x86-32, hibernate: Switch to original page table after resumed After all the pages are restored to previous address, the page table switches back to current swapper_pg_dir. However the swapper_pg_dir currently in used might not be consistent with previous page table, which might cause issue after resume. Fix this issue by switching to original page table after resume, and the address of the original page table is saved in the hibernation image header. Move the manipulation of restore_cr3 into common code blocks. Signed-off-by: Zhimin Gu Acked-by: Pavel Machek Signed-off-by: Chen Yu Acked-by: Thomas Gleixner Signed-off-by: Rafael J. Wysocki commit 0b0a6b1f76835cbaf746e7c72edd374ec0fe818b Author: Zhimin Gu Date: Fri Sep 21 14:28:01 2018 +0800 x86-32, hibernate: Use the page size macro instead of constant value Convert the hard code into PAGE_SIZE for better scalability. No functional change. Signed-off-by: Zhimin Gu Acked-by: Pavel Machek Signed-off-by: Chen Yu Acked-by: Thomas Gleixner Signed-off-by: Rafael J. Wysocki commit 7c0a982750b3f8bc6636e8086ac4d8b7775e90f6 Author: Zhimin Gu Date: Fri Sep 21 14:27:51 2018 +0800 x86-32, hibernate: Use temp_pgt as the temporary page table This is to reuse the temp_pgt for both 32bit and 64bit system. No intentional behavior change. Signed-off-by: Zhimin Gu Acked-by: Pavel Machek Signed-off-by: Chen Yu Acked-by: Thomas Gleixner Signed-off-by: Rafael J. Wysocki commit 72adf47764a0be66ea0c712c7d5a6b8a81e28449 Author: Zhimin Gu Date: Fri Sep 21 14:27:40 2018 +0800 x86, hibernate: Rename temp_level4_pgt to temp_pgt As 32bit system is not using 4-level page, rename it to temp_pgt so that it can be reused for both 32bit and 64bit hibernation. No functional change. Signed-off-by: Zhimin Gu Acked-by: Pavel Machek Signed-off-by: Chen Yu Acked-by: Thomas Gleixner Signed-off-by: Rafael J. Wysocki commit 445565303d19c75858004c129835fa418b740829 Author: Zhimin Gu Date: Fri Sep 21 14:27:29 2018 +0800 x86-32, hibernate: Enable CONFIG_ARCH_HIBERNATION_HEADER on 32bit system Enable CONFIG_ARCH_HIBERNATION_HEADER for 32bit system so that 1. arch_hibernation_header_save/restore() are invoked across hibernation on 32bit system. 2. The checksum handling as well as 'magic' number checking for 32bit system are enabled. Controlled by CONFIG_X86_64 in hibernate.c Signed-off-by: Zhimin Gu Signed-off-by: Chen Yu Acked-by: Thomas Gleixner Signed-off-by: Rafael J. Wysocki commit 25862a049e6f04cc982f4bed25ed3e6f0a0a5a61 Author: Zhimin Gu Date: Fri Sep 21 14:26:58 2018 +0800 x86, hibernate: Extract the common code of 64/32 bit system Reduce the hibernation code duplication between x86-32 and x86-64 by extracting the common code into hibernate.c. Currently only pfn_is_nosave() is the activated common function in hibernate.c No functional change. Acked-by: Pavel Machek Signed-off-by: Zhimin Gu Signed-off-by: Chen Yu Acked-by: Thomas Gleixner Signed-off-by: Rafael J. Wysocki commit 8e5b2a3c5a773f161b57eee7156a63089edd2c5c Author: Zhimin Gu Date: Fri Sep 21 14:26:47 2018 +0800 x86-32/asm/power: Create stack frames in hibernate_asm_32.S swsusp_arch_suspend() is callable non-leaf function which doesn't honor CONFIG_FRAME_POINTER, which can result in bad stack traces. Also it's not annotated as ELF callable function which can confuse tooling. Create a stack frame for it when CONFIG_FRAME_POINTER is enabled and give it proper ELF function annotation. Also in this patch introduces the restore_registers() symbol and gives it ELF function annotation, thus to prepare for later register restore. Analogous changes were made for 64bit before in commit ef0f3ed5a4ac (x86/asm/power: Create stack frames in hibernate_asm_64.S) and commit 4ce827b4cc58 (x86/power/64: Fix hibernation return address corruption). Signed-off-by: Zhimin Gu Signed-off-by: Chen Yu Acked-by: Thomas Gleixner Signed-off-by: Rafael J. Wysocki commit 749fa17093ff67b31dea864531a3698b6a95c26c Author: Chen Yu Date: Fri Sep 21 14:26:38 2018 +0800 PM / hibernate: Check the success of generating md5 digest before hibernation Currently if get_e820_md5() fails, then it will hibernate nevertheless. Actually the error code should be propagated to upper caller so that the hibernation could be aware of the result and terminates the process if md5 digest fails. Suggested-by: Thomas Gleixner Acked-by: Pavel Machek Signed-off-by: Chen Yu Acked-by: Thomas Gleixner Signed-off-by: Rafael J. Wysocki commit cc55f7537db6af371e9c1c6a71161ee40f918824 Author: Zhimin Gu Date: Fri Sep 21 14:26:24 2018 +0800 x86, hibernate: Fix nosave_regions setup for hibernation On 32bit systems, nosave_regions(non RAM areas) located between max_low_pfn and max_pfn are not excluded from hibernation snapshot currently, which may result in a machine check exception when trying to access these unsafe regions during hibernation: [ 612.800453] Disabling lock debugging due to kernel taint [ 612.805786] mce: [Hardware Error]: CPU 0: Machine Check Exception: 5 Bank 6: fe00000000801136 [ 612.814344] mce: [Hardware Error]: RIP !INEXACT! 60:<00000000d90be566> {swsusp_save+0x436/0x560} [ 612.823167] mce: [Hardware Error]: TSC 1f5939fe276 ADDR dd000000 MISC 30e0000086 [ 612.830677] mce: [Hardware Error]: PROCESSOR 0:306c3 TIME 1529487426 SOCKET 0 APIC 0 microcode 24 [ 612.839581] mce: [Hardware Error]: Run the above through 'mcelog --ascii' [ 612.846394] mce: [Hardware Error]: Machine check: Processor context corrupt [ 612.853380] Kernel panic - not syncing: Fatal machine check [ 612.858978] Kernel Offset: 0x18000000 from 0xc1000000 (relocation range: 0xc0000000-0xf7ffdfff) This is because on 32bit systems, pages above max_low_pfn are regarded as high memeory, and accessing unsafe pages might cause expected MCE. On the problematic 32bit system, there are reserved memory above low memory, which triggered the MCE: e820 memory mapping: [ 0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009d7ff] usable [ 0.000000] BIOS-e820: [mem 0x000000000009d800-0x000000000009ffff] reserved [ 0.000000] BIOS-e820: [mem 0x00000000000e0000-0x00000000000fffff] reserved [ 0.000000] BIOS-e820: [mem 0x0000000000100000-0x00000000d160cfff] usable [ 0.000000] BIOS-e820: [mem 0x00000000d160d000-0x00000000d1613fff] ACPI NVS [ 0.000000] BIOS-e820: [mem 0x00000000d1614000-0x00000000d1a44fff] usable [ 0.000000] BIOS-e820: [mem 0x00000000d1a45000-0x00000000d1ecffff] reserved [ 0.000000] BIOS-e820: [mem 0x00000000d1ed0000-0x00000000d7eeafff] usable [ 0.000000] BIOS-e820: [mem 0x00000000d7eeb000-0x00000000d7ffffff] reserved [ 0.000000] BIOS-e820: [mem 0x00000000d8000000-0x00000000d875ffff] usable [ 0.000000] BIOS-e820: [mem 0x00000000d8760000-0x00000000d87fffff] reserved [ 0.000000] BIOS-e820: [mem 0x00000000d8800000-0x00000000d8fadfff] usable [ 0.000000] BIOS-e820: [mem 0x00000000d8fae000-0x00000000d8ffffff] ACPI data [ 0.000000] BIOS-e820: [mem 0x00000000d9000000-0x00000000da71bfff] usable [ 0.000000] BIOS-e820: [mem 0x00000000da71c000-0x00000000da7fffff] ACPI NVS [ 0.000000] BIOS-e820: [mem 0x00000000da800000-0x00000000dbb8bfff] usable [ 0.000000] BIOS-e820: [mem 0x00000000dbb8c000-0x00000000dbffffff] reserved [ 0.000000] BIOS-e820: [mem 0x00000000dd000000-0x00000000df1fffff] reserved [ 0.000000] BIOS-e820: [mem 0x00000000f8000000-0x00000000fbffffff] reserved [ 0.000000] BIOS-e820: [mem 0x00000000fec00000-0x00000000fec00fff] reserved [ 0.000000] BIOS-e820: [mem 0x00000000fed00000-0x00000000fed03fff] reserved [ 0.000000] BIOS-e820: [mem 0x00000000fed1c000-0x00000000fed1ffff] reserved [ 0.000000] BIOS-e820: [mem 0x00000000fee00000-0x00000000fee00fff] reserved [ 0.000000] BIOS-e820: [mem 0x00000000ff000000-0x00000000ffffffff] reserved [ 0.000000] BIOS-e820: [mem 0x0000000100000000-0x000000041edfffff] usable Fix this problem by changing pfn limit from max_low_pfn to max_pfn. This fix does not impact 64bit system because on 64bit max_low_pfn is the same as max_pfn. Signed-off-by: Zhimin Gu Acked-by: Pavel Machek Signed-off-by: Chen Yu Acked-by: Thomas Gleixner Cc: All applicable Signed-off-by: Rafael J. Wysocki commit e9837e55b0200da544a095a1fca36efd7fd3ba30 Author: Chenbo Feng Date: Mon Oct 1 18:23:08 2018 -0700 netfilter: xt_quota: fix the behavior of xt_quota module A major flaw of the current xt_quota module is that quota in a specific rule gets reset every time there is a rule change in the same table. It makes the xt_quota module not very useful in a table in which iptables rules are changed at run time. This fix introduces a new counter that is visible to userspace as the remaining quota of the current rule. When userspace restores the rules in a table, it can restore the counter to the remaining quota instead of resetting it to the full quota. Signed-off-by: Chenbo Feng Suggested-by: Maciej Żenczykowski Reviewed-by: Maciej Żenczykowski Signed-off-by: Pablo Neira Ayuso commit 309600c14e36d0e78c22fe3df58317965b90f4d1 Author: Boris Brezillon Date: Tue Sep 4 16:23:28 2018 +0200 mtd: rawnand: Allow selection of ECC byte ordering at runtime Currently, the selection of ECC byte ordering for software hamming is done at compilation time, which doesn't make sense when ECC byte calculation is done in hardware and byte ordering is forced by the hardware engine. In this case, only the correction is done in software and we want to force the byte-ordering no matter the value of CONFIG_MTD_NAND_ECC_SMC. This is typically the case for the FSMC (Smart Media ordering), TMIO and TXX9NDFMC (regular byte ordering) blocks. For all other use cases (pure software implementation, SM FTL and nandecctest), we keep selecting the byte ordering based on the CONFIG_MTD_NAND_ECC_SMC value. It might not be ideal for SM FTL (I'd expect Smart Media ordering to be employed by the Smart Media FTL), but this option doesn't seem to be enabled in the existing _defconfig, so I can't tell setting sm_order to true is the right choice. Signed-off-by: Boris Brezillon Signed-off-by: Miquel Raynal commit e2bfa4ca23d9b5a7bdfcf21319fad9b59e38a05c Author: Nathan Chancellor Date: Thu Sep 20 16:30:25 2018 -0700 mtd: rawnand: sh_flctl: Use proper enum for flctl_dma_fifo0_transfer Clang warns when one enumerated type is converted implicitly to another: drivers/mtd/nand/raw/sh_flctl.c:483:46: warning: implicit conversion from enumeration type 'enum dma_transfer_direction' to different enumeration type 'enum dma_data_direction' [-Wenum-conversion] flctl_dma_fifo0_transfer(flctl, buf, rlen, DMA_DEV_TO_MEM) > 0) ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~ drivers/mtd/nand/raw/sh_flctl.c:542:46: warning: implicit conversion from enumeration type 'enum dma_transfer_direction' to different enumeration type 'enum dma_data_direction' [-Wenum-conversion] flctl_dma_fifo0_transfer(flctl, buf, rlen, DMA_MEM_TO_DEV) > 0) ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~ 2 warnings generated. Use the proper enums from dma_data_direction to satisfy Clang. DMA_MEM_TO_DEV = DMA_TO_DEVICE = 1 DMA_DEV_TO_MEM = DMA_FROM_DEVICE = 2 Reported-by: Nick Desaulniers Signed-off-by: Nathan Chancellor Reviewed-by: Nick Desaulniers Signed-off-by: Miquel Raynal commit 9c076d7e948773ac45cf1ec7ca2c7d6a5bddb8fa Author: Janusz Krzysztofik Date: Thu Sep 20 00:52:55 2018 +0200 mtd: rawnand: ams-delta: Set port direction when needed In its current shape, the driver sets data port direction before each byte read/write operation, even during multi-byte transfers. Improve performance of the driver by setting the port direction only when needed. This optimisation will become particularly important as soon as planned conversion of the driver to GPIO API for data I/O will be implemented. Reviewed-by: Boris Brezillon Signed-off-by: Janusz Krzysztofik Signed-off-by: Miquel Raynal commit 2b44af3ad6cc5e39267791215cfef974fb3f7be5 Author: Janusz Krzysztofik Date: Thu Sep 20 00:52:54 2018 +0200 mtd: rawnand: ams-delta: Use private structure Introduce a driver private structure and allocate it on device probe. Use it for storing nand_chip structure, GPIO descriptors prevoiusly stored in static variables as well as io_base pointer previously passed as nand controller data or platform driver data. Subsequent patches may populate the structure with more members as needed. Signed-off-by: Janusz Krzysztofik Reviewed-by: Boris Brezillon Signed-off-by: Miquel Raynal commit e5cd979994db7ab0d496fd9ccdf4744da5e2764b Author: Janusz Krzysztofik Date: Thu Sep 20 00:52:53 2018 +0200 mtd: rawnand: ams-delta: show parent device in sysfs Fix a bug where parent device symlinks aren't shown in sysfs. While at it, make use of the default owner set by mtdcore. Signed-off-by: Janusz Krzysztofik Reviewed-by: Boris Brezillon Signed-off-by: Miquel Raynal commit f1a97e0b78e378f43660930474113387a2af2aa3 Author: Janusz Krzysztofik Date: Thu Sep 20 00:17:29 2018 +0200 mtd: rawnand: ams-delta: use GPIO lookup table Now as Amstrad Delta board - the only user of this driver - provides GPIO lookup tables, switch from GPIO numbers to GPIO descriptors and use the table to locate required GPIO pins. Declare static variables for storing GPIO descriptors and replace gpio_ function calls with their gpiod_ equivalents. Pin naming used by the driver should be followed while respective GPIO lookup table is initialized by a board init code. Signed-off-by: Janusz Krzysztofik Acked-by: Boris Brezillon Reviewed-by: Linus Walleij Signed-off-by: Miquel Raynal commit fbed20280d912449cfb40c382cb55e3d11502587 Author: Gustavo A. R. Silva Date: Tue Sep 18 08:55:55 2018 -0500 mtd: rawnand: atmel: Fix potential NULL pointer dereference There is a potential execution path in which function of_find_compatible_node() returns NULL. In such a case, we end up having a NULL pointer dereference when accessing pointer *nfc_np* in function of_clk_get(). So, we better don't take any chances and fix this by null checking pointer *nfc_np* before calling of_clk_get(). Addresses-Coverity-ID: 1473052 ("Dereference null return value") Fixes: f88fc122cc34 ("mtd: nand: Cleanup/rework the atmel_nand driver") Signed-off-by: Gustavo A. R. Silva Reviewed-by: Boris Brezillon Acked-by: Tudor Ambarus Signed-off-by: Miquel Raynal commit e8237bfa21200f7c03a59503964cee47620ff3d7 Author: Konstantin Porotchkin Date: Fri Sep 7 16:34:36 2018 +0200 mtd: rawnand: marvell: Add support for 8kiB pages NAND chips layout Add support for two new layouts: 8kiB pages NAND chips, requesting either 4 or 8 bit of correctability per 512B step. Signed-off-by: Konstantin Porotchkin Reviewed-by: Boris Brezillon Signed-off-by: Miquel Raynal commit a68642adbb1a80d1a70a472d01a8a32aaa1a96c4 Author: Marcel Ziswiler Date: Wed Sep 19 13:40:49 2018 +0200 mtd: rawnand: ESMT: retrieve ECC requirements from 5th id byte This patch enables support to read the ECC level from the NAND flash using ESMT SLC NAND ID byte 5 information as documented e.g. in the following data sheet: https://www.esmt.com.tw/upload/pdf/ESMT/datasheets/F59L1G81LA(2Y).pdf Signed-off-by: Marcel Ziswiler Signed-off-by: Miquel Raynal commit 727d37826bd19905424d6f5cf8351fcb4be71206 Author: Marcel Ziswiler Date: Thu Sep 6 23:30:19 2018 +0200 mtd: rawnand: reorder NAND manufacturer IDs Reorder NAND manufacturer IDs for clarity. Signed-off-by: Marcel Ziswiler Signed-off-by: Miquel Raynal commit 8ae3fbf81b9cfdd1fec0451181213742b73fdf1a Author: Boris Brezillon Date: Fri Sep 7 00:38:51 2018 +0200 mtd: rawnand: Move JEDEC code to nand_jedec.c This moves JEDEC related code to nand_jedec.c and JEDEC related struct/macros to include/linux/mtd/jedec.h. Signed-off-by: Boris Brezillon Signed-off-by: Miquel Raynal commit 1c325cc5077a88510afc08b1d2c75bcf18681f21 Author: Boris Brezillon Date: Fri Sep 7 00:38:50 2018 +0200 mtd: rawnand: Move ONFI code to nand_onfi.c This moves ONFI related code to nand_onfi.c and ONFI related struct/macros to include/linux/mtd/onfi.h. Signed-off-by: Boris Brezillon Signed-off-by: Miquel Raynal commit 3d4af7c195850cfccaddc2cf03b010b95236b695 Author: Boris Brezillon Date: Fri Sep 7 00:38:49 2018 +0200 mtd: rawnand: Move legacy code to nand_legacy.c Allows us to move a few hundred lines of deprecated code out of the core file which is quite big. Signed-off-by: Boris Brezillon Signed-off-by: Miquel Raynal commit 348d56a8c6067f3b2f1799d6f050f3be4bf5904b Author: Boris Brezillon Date: Fri Sep 7 00:38:48 2018 +0200 mtd: rawnand: Keep all internal stuff private A lot of things defined in rawnand.h should not be exposed to NAND controller drivers and should only be shared by core files. Create the drivers/mtd/nand/raw/internals.h header to store such definitions, and move all private defs to this header. Also remove EXPORT_SYMBOLS() on functions that are not supposed to be exposed. Signed-off-by: Boris Brezillon Signed-off-by: Miquel Raynal commit 462f35d3e5e805657b48c76d3e7dd1c37e0ac62c Author: Boris Brezillon Date: Fri Sep 7 00:38:47 2018 +0200 mtd: rawnand: Inline onfi_get_async_timing_mode() onfi_get_async_timing_mode() is only used in one place inside nand_base.c. Let's inline the code and kill the helper. Signed-off-by: Boris Brezillon Signed-off-by: Miquel Raynal commit c7921bb32ab616462cefb9c2f3dd81d85d32b948 Author: Boris Brezillon Date: Fri Sep 7 00:38:46 2018 +0200 mtd: rawnand: Move platform_nand_xxx definitions out of rawnand.h platform_nand_xxx definitions are just used by the plat_nand driver. Let's move those definitions out of the core/driver-agnostic rawnand.h header. Signed-off-by: Boris Brezillon Signed-off-by: Miquel Raynal commit 4114f97c41cd3992724f450f595417e4432737a0 Author: Boris Brezillon Date: Fri Sep 7 00:38:45 2018 +0200 mtd: rawnand: Get rid of a few unused definitions Those definitions are not used, let's remove them. Signed-off-by: Boris Brezillon Signed-off-by: Miquel Raynal commit d16397d57a90d8c35bef3d8104460bf18e111fa7 Author: Boris Brezillon Date: Fri Sep 7 00:38:44 2018 +0200 mtd: rawnand: Get rid of the duplicate nand_chip forward declaration There's already a forward declaration of nand_chip at the beginning of the file. Get rid of this one. Signed-off-by: Boris Brezillon Signed-off-by: Miquel Raynal commit 394938eadff2b875c099529452ffb7f7303f1547 Author: Boris Brezillon Date: Fri Sep 7 00:38:43 2018 +0200 mtd: rawnand: Get rid of nand_flash_dev forward declation nand_scan[with_ids]() have been moved at the end of the file. We can now get rid of of the nand_flash_dev forward declaration. Signed-off-by: Boris Brezillon Signed-off-by: Miquel Raynal commit 0b4e61c1c26e0f34c9a5f6c35edee16cc26a72fd Author: Boris Brezillon Date: Fri Sep 7 00:38:42 2018 +0200 mtd: rawnand: Move function prototypes after struct declarations Move nand_scan[_with_ids]() and nand_wait_ready() at the end of the file where all function prototype lies. This will also allow us to get rid of the nand_flash_dev forward declaration. Signed-off-by: Boris Brezillon Signed-off-by: Miquel Raynal commit 3cece3abebda068e55e19302a6f0fa60cf553737 Author: Boris Brezillon Date: Fri Sep 7 00:38:41 2018 +0200 mtd: rawnand: Deprecate ->chip_delay The wait timeouts and delays are directly extracted from the NAND timings and ->chip_delay is only used in legacy path, so let's move it to the nand_legacy struct to make it clear. Signed-off-by: Boris Brezillon Signed-off-by: Miquel Raynal commit 45240367939b071b9957b970379cf64f9a2934ce Author: Boris Brezillon Date: Fri Sep 7 00:38:40 2018 +0200 mtd: rawnand: Deprecate ->{set,get}_features() hooks Those hooks should be replaced by a proper ->exec_op() implementation. Move them to the nand_legacy struct to make it clear. Signed-off-by: Boris Brezillon Signed-off-by: Miquel Raynal commit f9ebd1bb41031afc162e9acda7ad044a35bccf82 Author: Boris Brezillon Date: Fri Sep 7 00:38:39 2018 +0200 mtd: rawnand: Deprecate ->erase() The ->erase() hook have been overloaded by some drivers for bad reasons: either the driver was not fitting in the NAND framework and should have been an MTD driver (docg4), or the driver uses a specific path for the ERASE operation (denali), instead of implementing it generically. In any case, we should discourage people from overloading this method and encourage them to implement ->exec_op() instead. Move the ->erase() hook to the nand_legacy struct to make it clear. Signed-off-by: Boris Brezillon Signed-off-by: Miquel Raynal commit cdc784c743945f445a26f4c0bd60a50a1adb39c4 Author: Boris Brezillon Date: Fri Sep 7 00:38:38 2018 +0200 mtd: rawnand: Deprecate ->block_{bad,markbad}() hooks Those hooks have been overloaded by some drivers for bad reasons: either the driver was not fitting in the NAND framework and should have been an MTD driver (docg4), or it was not properly implementing the OOB read/write request or had a weird layout where BBM are trashed. In any case, we should discourage people from overloading those methods and encourage them to fix their driver instead. Move the ->block_{bad,markbad}() hooks to the nand_legacy struct to make it clear. Signed-off-by: Boris Brezillon Signed-off-by: Miquel Raynal commit 8395b753d7cad2beb03d374621cc8851f1cb4e01 Author: Boris Brezillon Date: Fri Sep 7 00:38:37 2018 +0200 mtd: rawnand: Deprecate ->dev_ready() and ->waitfunc() Those hooks have been replaced by ->exec_op(). Move them to the nand_legacy struct. Signed-off-by: Boris Brezillon Signed-off-by: Miquel Raynal commit bf6065c6c08fa3ed7bdf8d28b8062ce8e58c1543 Author: Boris Brezillon Date: Fri Sep 7 00:38:36 2018 +0200 mtd: rawnand: Deprecate ->cmd_ctrl() and ->cmdfunc() Those hooks have been replaced by ->exec_op(). Move them to the nand_legacy struct. Signed-off-by: Boris Brezillon Signed-off-by: Miquel Raynal commit 716bbbabcc68c2b0e1b805d369c0bd58f4fdea30 Author: Boris Brezillon Date: Fri Sep 7 00:38:35 2018 +0200 mtd: rawnand: Deprecate ->{read, write}_{byte, buf}() hooks All those hooks have been replaced by ->exec_op(). Move them to the nand_legacy struct. Signed-off-by: Boris Brezillon Signed-off-by: Miquel Raynal commit 82fc5099744e5f30cd8c9ee13075f28fb37e9518 Author: Boris Brezillon Date: Fri Sep 7 00:38:34 2018 +0200 mtd: rawnand: Create a legacy struct and move ->IO_ADDR_{R, W} there We regularly have new NAND controller drivers that are making use of fields/hooks that we want to get rid of but can't because of all the legacy drivers that we might break if we do. So, instead of removing those fields/hooks, let's move them to a sub-struct which is clearly documented as deprecated. We start with the ->IO_ADDR_{R,W] fields. Signed-off-by: Boris Brezillon Signed-off-by: Miquel Raynal commit 4ae94025171608e0661372cf846e17d062cb9620 Author: Boris Brezillon Date: Fri Sep 7 00:38:33 2018 +0200 mtd: rawnand: Leave chip->IO_ADDR_{R, W} to NULL when unused There's no point in poisoning the ->IO_ADDR_{R,W}, a NULL pointer is just as good to detect unexpected ->IO_ADDR_{R,W} usage. Signed-off-by: Boris Brezillon Signed-off-by: Miquel Raynal commit 800342de6349b333ef2ab921e590708a43ee4345 Author: Boris Brezillon Date: Sat Aug 4 22:59:23 2018 +0200 mtd: rawnand: Do not treat !maxchips specially in nand_scan_with_ids() The only reason we were skipping nand_scan_ident() when maxchips == 0 was to make the docg4 to work. Now that this driver is gone we can remove this special case and return an error when maxchips is 0. Suggested-by: Miquel Raynal Signed-off-by: Boris Brezillon Signed-off-by: Miquel Raynal commit 871a4073f438c61cc4cf7471476d9a8a29ccf620 Author: Boris Brezillon Date: Sat Aug 4 22:59:22 2018 +0200 mtd: rawnand: Make maxchips an unsigned int There's no good reason to make maxchips a signed integer, since only positive values are valid. Make it an unsigned int. Signed-off-by: Boris Brezillon Signed-off-by: Miquel Raynal commit 480bdd8b7ab6971f15258a73638cc3880ed7256d Author: Boris Brezillon Date: Sat Aug 4 22:59:21 2018 +0200 ARM: pxa: palmtreo: Drop docg4 specific init The docg4 driver has been removed. Remove the code that was registering a docg4 device. Suggested-by: Miquel Raynal Signed-off-by: Boris Brezillon Acked-by: Robert Jarzmik Signed-off-by: Miquel Raynal commit 64ddd5d8578f4bd431c3978437cf746bae35756b Author: Boris Brezillon Date: Sat Aug 4 22:59:20 2018 +0200 mtd: rawnand: Remove docg4 The diskonchip G4 driver does not fit very well in the raw/parallel NAND framework simply because such chips have an internal controller translating DoC-specific commands into NAND ones. Keeping such a driver in the raw NAND framework is a real burden for NAND maintainers. Not to mention that some parts of this driver are a bit worrisome: - writes are done by subpages, even though we're interfacing with an MLC chip which are known to not support subpage writes very well (it might be that the FTL handles the complexity for us though) - some part of the code are simply ignoring return codes of function that can fail in a few occasions - there's a hack to support OOB writes when no data is provided. This operation is not supported by the chip and should have been rejected, and nandwrite and other userspace tools should have been patched to deal with such devices - the driver is apparently broken when ignore_badblocks module param is not set to 1 and nobody noticed that (don't know since when this is the case, but it's not a recent change) http://lists.infradead.org/pipermail/linux-mtd/2018-July/082472.html Add to that the fact that we already have a docg3 driver in drivers/mtd/devices/docg3.c and, looking at the code (and regs), it seems docg3 and docg4 have a lot in common (even the author of this driver seemed to have realized that interfacing with the raw NAND framework might have been a bad idea http://lists.infradead.org/pipermail/linux-mtd/2012-January/039517.html). For all these reasons, I'm proposing to remove this driver. If anyone ever wants to add support for this chip back, I'd suggest extending the docg3 driver instead of adding a completely new driver. Signed-off-by: Boris Brezillon Cc: Mike Dunn Cc: Robert Jarzmik Cc: Sergey Larin Signed-off-by: Miquel Raynal commit 7fd130f7416f1c67c2b976d42c1b64371c3a7bd2 Author: Miquel Raynal Date: Thu Jul 19 12:21:19 2018 +0200 mtd: rawnand: marvell: support 8b/512B strength for 2kiB pages layout Add support for the layout used by 2kiB page NAND chips requesting at least 8-bit of correction per 512 bytes. This layout requires a bit of handling as: 1/ It can only fit if the NAND chip has at least 128 OOB bytes. 2/ The Bad Block Markers are located in the middle of the data bytes and shall not be used. 3/ It has been experimentally observed that, for certain layouts, the ECC engine tries to correct data while it should not because the errors are uncorrectable. While this is harmless for truly bad pages, it creates bitflips in empty pages. To avoid such scenario that augments artificially the number of bitflips we re-read in raw mode the entire page instead of just the ECC bytes. This is done only for this layout to avoid an unneeded penalty with other setups. Signed-off-by: Miquel Raynal Reviewed-by: Boris Brezillon commit dbfc671856b349d702d94ccb96d38569991122cf Author: Miquel Raynal Date: Thu Jul 19 16:54:23 2018 +0200 mtd: rawnand: marvell: rework BCH engine failure path We are about to support a new layout that triggers a faulty mechanism in BCH engine that creates bitflips in erased pages. Before adding the quirk that will workaround this issue, this patch just reworks a bit the section that handles ECC failures in BCH read path. Signed-off-by: Miquel Raynal Reviewed-by: Boris Brezillon commit e4cdf9cb3254b5b4d9b1064c275d8c40f2d82e03 Author: Boris Brezillon Date: Thu Sep 6 14:05:35 2018 +0200 mtd: rawnand: Pass a nand_chip object nand_erase_nand() Let's make the raw NAND API consistent by patching all helpers and hooks to take a nand_chip object instead of an mtd_info one or remove the mtd_info object when both are passed. Let's tackle the nand_erase_nand() helper. Signed-off-by: Boris Brezillon Signed-off-by: Miquel Raynal commit 5740d4c4f9bbc97270993147b4756587f92d44c3 Author: Boris Brezillon Date: Thu Sep 6 14:05:34 2018 +0200 mtd: rawnand: Pass a nand_chip object to all nand_xxx_bbt() helpers Let's make the raw NAND API consistent by patching all helpers and hooks to take a nand_chip object instead of an mtd_info one or remove the mtd_info object when both are passed. Let's tackle the nand_xxx_bbt() helpers. Signed-off-by: Boris Brezillon Signed-off-by: Miquel Raynal commit 858838b87ef542c35b5401a6469d162d103d1d8f Author: Boris Brezillon Date: Thu Sep 6 14:05:33 2018 +0200 mtd: rawnand: Pass a nand_chip object to chip->setup_data_interface() Let's make the raw NAND API consistent by patching all helpers and hooks to take a nand_chip object instead of an mtd_info one or remove the mtd_info object when both are passed. Let's tackle the chip->setup_data_interface() hook. Signed-off-by: Boris Brezillon Signed-off-by: Miquel Raynal commit 2e7f1cec271c209128d0535e0cc1c49d3cf03624 Author: Boris Brezillon Date: Thu Sep 6 14:05:32 2018 +0200 mtd: rawnand: Pass a nand_chip object to chip->setup_read_retry() Let's make the raw NAND API consistent by patching all helpers and hooks to take a nand_chip object instead of an mtd_info one or remove the mtd_info object when both are passed. Let's tackle the chip->setup_read_retry() hook. Signed-off-by: Boris Brezillon Signed-off-by: Miquel Raynal commit aa36ff25ffdea656c3b748a5cf141bc884e6275c Author: Boris Brezillon Date: Thu Sep 6 14:05:31 2018 +0200 mtd: rawnand: Pass a nand_chip object to chip->{get, set}_features() Let's make the raw NAND API consistent by patching all helpers and hooks to take a nand_chip object instead of an mtd_info one or remove the mtd_info object when both are passed. Let's tackle the chip->{get,set}_features() hooks. Signed-off-by: Boris Brezillon Signed-off-by: Miquel Raynal commit a2098a9e4f6704471c32230d48b905e51f0cba32 Author: Boris Brezillon Date: Thu Sep 6 14:05:30 2018 +0200 mtd: rawnand: Pass a nand_chip object to chip->erase() Let's make the raw NAND API consistent by patching all helpers and hooks to take a nand_chip object instead of an mtd_info one or remove the mtd_info object when both are passed. Let's tackle the chip->erase() hook. Signed-off-by: Boris Brezillon Signed-off-by: Miquel Raynal commit f1d46942e823ffdd8532409c9b1c1f87314bf20f Author: Boris Brezillon Date: Thu Sep 6 14:05:29 2018 +0200 mtd: rawnand: Pass a nand_chip object to chip->waitfunc() Let's make the raw NAND API consistent by patching all helpers and hooks to take a nand_chip object instead of an mtd_info one or remove the mtd_info object when both are passed. Let's tackle the chip->waitfunc() hook. Signed-off-by: Boris Brezillon Signed-off-by: Miquel Raynal commit 5295cf2e047cf60ac1e14d4789cdf698af45cf2f Author: Boris Brezillon Date: Thu Sep 6 14:05:28 2018 +0200 mtd: rawnand: Pass a nand_chip object to chip->cmdfunc() Let's make the raw NAND API consistent by patching all helpers and hooks to take a nand_chip object instead of an mtd_info one or remove the mtd_info object when both are passed. Let's tackle the chip->cmdfunc() hook. Signed-off-by: Boris Brezillon Signed-off-by: Miquel Raynal commit 50a487e7719caa07e951dfcfd983b2c5517e2f76 Author: Boris Brezillon Date: Thu Sep 6 14:05:27 2018 +0200 mtd: rawnand: Pass a nand_chip object to chip->dev_ready() Let's make the raw NAND API consistent by patching all helpers and hooks to take a nand_chip object instead of an mtd_info one or remove the mtd_info object when both are passed. Let's tackle the chip->dev_ready() hook. Signed-off-by: Boris Brezillon Signed-off-by: Miquel Raynal commit 0f808c1602bc75c74399989d47842197118f7e72 Author: Boris Brezillon Date: Thu Sep 6 14:05:26 2018 +0200 mtd: rawnand: Pass a nand_chip object to chip->cmd_ctrl() Let's make the raw NAND API consistent by patching all helpers and hooks to take a nand_chip object instead of an mtd_info one or remove the mtd_info object when both are passed. Let's tackle the chip->cmd_ctrl() hook. Signed-off-by: Boris Brezillon Signed-off-by: Miquel Raynal commit c17556f545c0283f53561c8a38d5cd4e91a35fe5 Author: Boris Brezillon Date: Thu Sep 6 14:05:25 2018 +0200 mtd: rawnand: Pass a nand_chip object to chip->block_xxx() hooks Let's make the raw NAND API consistent by patching all helpers and hooks to take a nand_chip object instead of an mtd_info one or remove the mtd_info object when both are passed. Let's tackle all chip->block_xxx() hooks at once. Signed-off-by: Boris Brezillon Signed-off-by: Miquel Raynal commit 758b56f58b66bebc5bc2e0e180e1904aafa2b523 Author: Boris Brezillon Date: Thu Sep 6 14:05:24 2018 +0200 mtd: rawnand: Pass a nand_chip object to chip->select_chip() Let's make the raw NAND API consistent by patching all helpers and hooks to take a nand_chip object instead of an mtd_info one or remove the mtd_info object when both are passed. Let's tackle the chip->select_chip() hook. Signed-off-by: Boris Brezillon Signed-off-by: Miquel Raynal commit c0739d85723a381302907f9613392d7ac8515176 Author: Boris Brezillon Date: Thu Sep 6 14:05:23 2018 +0200 mtd: rawnand: Pass a nand_chip object to chip->write_xxx() hooks Let's make the raw NAND API consistent by patching all helpers and hooks to take a nand_chip object instead of an mtd_info one or remove the mtd_info object when both are passed. Let's tackle all chip->write_xxx() hooks at once. Signed-off-by: Boris Brezillon Signed-off-by: Miquel Raynal commit 7e534323c416216e8ac45b5633fb0a5e5137e5b5 Author: Boris Brezillon Date: Thu Sep 6 14:05:22 2018 +0200 mtd: rawnand: Pass a nand_chip object to chip->read_xxx() hooks Let's make the raw NAND API consistent by patching all helpers and hooks to take a nand_chip object instead of an mtd_info one or remove the mtd_info object when both are passed. Let's tackle all chip->read_xxx() hooks at once. Signed-off-by: Boris Brezillon Signed-off-by: Miquel Raynal commit 767eb6fbdedb7d8b9c7a87d640a8bc8091eba002 Author: Boris Brezillon Date: Thu Sep 6 14:05:21 2018 +0200 mtd: rawnand: Pass a nand_chip object to ecc->write_xxx() hooks Let's make the raw NAND API consistent by patching all helpers and hooks to take a nand_chip object instead of an mtd_info one or remove the mtd_info object when both are passed. Let's tackle all ecc->write_xxx() hooks at once. Signed-off-by: Boris Brezillon Signed-off-by: Miquel Raynal commit b976168757f7f4adf05215884e8557aaa9f6792c Author: Boris Brezillon Date: Thu Sep 6 14:05:20 2018 +0200 mtd: rawnand: Pass a nand_chip object to ecc->read_xxx() hooks Let's make the raw NAND API consistent by patching all helpers and hooks to take a nand_chip object instead of an mtd_info one or remove the mtd_info object when both are passed. Let's tackle all ecc->read_xxx() hooks at once. Signed-off-by: Boris Brezillon Acked-by: Stefan Agner Signed-off-by: Miquel Raynal commit 00da2ea97229946450c8145d680db480b5da1f94 Author: Boris Brezillon Date: Thu Sep 6 14:05:19 2018 +0200 mtd: rawnand: Pass a nand_chip object to ecc->correct() Let's make the raw NAND API consistent by patching all helpers and hooks to take a nand_chip object instead of an mtd_info one. Now is ecc->correct()'s turn. Signed-off-by: Boris Brezillon Signed-off-by: Miquel Raynal commit af37d2c3a8c7a05cf5b0fe6b61e2a6b9e357928b Author: Boris Brezillon Date: Thu Sep 6 14:05:18 2018 +0200 mtd: rawnand: Pass a nand_chip object to ecc->calculate() Let's make the raw NAND API consistent by patching all helpers and hooks to take a nand_chip object instead of an mtd_info one. Now is ecc->calculate()'s turn. Signed-off-by: Boris Brezillon Signed-off-by: Miquel Raynal commit ec47636cd7e7b0dd53e526ec832ebb21b67ad9c6 Author: Boris Brezillon Date: Thu Sep 6 14:05:17 2018 +0200 mtd: rawnand: Pass a nand_chip object to ecc->hwctl() Let's make the raw NAND API consistent by patching all helpers and hooks to take a nand_chip object instead of an mtd_info one. Now is ecc->hwctl()'s turn. Signed-off-by: Boris Brezillon Signed-off-by: Miquel Raynal commit 2b356ab46ebe9b1bc63bda6708b81c9200382e78 Author: Boris Brezillon Date: Thu Sep 6 14:05:16 2018 +0200 mtd: rawnand: Pass a nand_chip object to nand_wait_ready() Let's make the raw NAND API consistent by patching all helpers to take a nand_chip object instead of an mtd_info one. Now is nand_wait_ready()'s turn. Signed-off-by: Boris Brezillon Signed-off-by: Miquel Raynal commit 59ac276f22270fb2094910f9a734c17f41c25e70 Author: Boris Brezillon Date: Thu Sep 6 14:05:15 2018 +0200 mtd: rawnand: Pass a nand_chip object to nand_release() Let's make the raw NAND API consistent by patching all helpers to take a nand_chip object instead of an mtd_info one. Now is nand_release()'s turn. Signed-off-by: Boris Brezillon Signed-off-by: Miquel Raynal commit 00ad378f304a091ab2e2df5f944892a6ed558610 Author: Boris Brezillon Date: Thu Sep 6 14:05:14 2018 +0200 mtd: rawnand: Pass a nand_chip object to nand_scan() Let's make the raw NAND API consistent by patching all helpers to take a nand_chip object instead of an mtd_info one. We start with nand_scan(). Signed-off-by: Boris Brezillon Signed-off-by: Miquel Raynal commit 47bd59e538d4e7b3ad9c18bef5c1052657bdff59 Author: Boris Brezillon Date: Thu Sep 6 14:05:13 2018 +0200 mtd: rawnand: plat_nand: Pass a nand_chip object to all platform_nand_ctrl hooks Let's make the raw NAND API consistent by patching all helpers and hooks to take a nand_chip object instead of an mtd_info one or remove the mtd_info object when both are passed. In order to do that, we first need to update the platform_nand_ctrl hooks to take a nand_chip object instead of an mtd_info. We add temporary plat_nand_xxx() wrappers to the do the mtd -> chip conversion, but those will be dropped when patching nand_chip hooks to take a nand_chip object. Signed-off-by: Boris Brezillon Reviewed-by: Alexander Sverdlin Acked-by: Alexander Sverdlin Acked-by: Robert Jarzmik Acked-by: Krzysztof Halasa Acked-by: Paul Burton Signed-off-by: Miquel Raynal commit 959e8b77bf9232a1956e03325837047b110553b2 Author: Alexandre Belloni Date: Tue Oct 2 00:05:25 2018 +0200 rtc: mv: let the core handle invalid alarms Instead of lying to the core when the alarm is invalid, let it handle that by returning the error. Signed-off-by: Alexandre Belloni Tested-by: Gregory CLEMENT (on Armada 375 DB) Signed-off-by: Alexandre Belloni commit 89e27ce49846a7dedbcaefccbb6cc885c5baae14 Author: Alexandre Belloni Date: Mon Oct 1 23:51:35 2018 +0200 rtc: vr41xx: switch to rtc_time64_to_tm/rtc_tm_to_time64 Call the 64bit versions of rtc_time_to_tm now that the range is enforced by the core. Also remove the open coded rtc_tm_to_time64. Signed-off-by: Alexandre Belloni commit 9d7b18668956c411a422d04c712994c5fdb23a4b Author: Sean O'Brien Date: Tue Oct 2 15:53:37 2018 -0700 HID: magicmouse: add support for Apple Magic Trackpad 2 USB device Vendor 05ac (Apple) Device 0265 (Magic Trackpad 2) Bluetooth device Vendor 004c (Apple) Device 0265 (Magic Trackpad 2) Add support for Apple Magic Trackpad 2 over USB and bluetooth, putting the device in multi-touch mode. Signed-off-by: Claudio Mettler Signed-off-by: Marek Wyborski Signed-off-by: Sean O'Brien Reviewed-by: Benjamin Tissoires Signed-off-by: Jiri Kosina commit 2991cc22966a712706c053ca3d3b03bd1ae384ae Author: Arnd Bergmann Date: Tue Oct 2 23:16:42 2018 +0200 firmware: dcdbas: include linux/io.h memremap() is declared in linux/io.h, not in asm/io.h, so we should include that header to avoid build errors: drivers/platform/x86/dcdbas.c: In function 'dcdbas_check_wsmt': drivers/platform/x86/dcdbas.c:572:15: error: implicit declaration of function 'memremap'; did you mean 'ioremap'? [-Werror=implicit-function-declaration] eps_buffer = memremap(eps->smm_comm_buff_addr, remap_size, MEMREMAP_WB); ^~~~~~~~ ioremap drivers/platform/x86/dcdbas.c:572:61: error: 'MEMREMAP_WB' undeclared (first use in this function) eps_buffer = memremap(eps->smm_comm_buff_addr, remap_size, MEMREMAP_WB); ^~~~~~~~~~~ drivers/platform/x86/dcdbas.c:572:61: note: each undeclared identifier is reported only once for each function it appears in drivers/platform/x86/dcdbas.c: In function 'dcdbas_exit': drivers/platform/x86/dcdbas.c:748:3: error: implicit declaration of function 'memunmap'; did you mean 'vm_munmap'? [-Werror=implicit-function-declaration] Fixes: 12c956c4f32e ("firmware: dcdbas: Add support for WSMT ACPI table") Signed-off-by: Arnd Bergmann Reported-by: Randy Dunlap Signed-off-by: Andy Shevchenko commit 767466b63de3368376323958b7777b9319bfa8d8 Author: Tudor Ambarus Date: Tue Oct 2 16:20:38 2018 +0300 ARM: dts: at91: sama5d4_xplained: even nand memory partitions sama5d4_xplained, ssam9x5cm, sama5d2_ptc_ek and sama5d3_xplained nand flashes have a common memory map. Even the nand memory partitions to match our NAND flash map available at: http://www.at91.com/linux4sam/pub/Linux4SAM/SambaSubsections//demo_nandflash_map_lnx4sam5x.png Signed-off-by: Tudor Ambarus Signed-off-by: Ludovic Desroches commit 0c9ba7a48e78b85fb427d8b9311b842a00e37d33 Author: Tudor Ambarus Date: Tue Oct 2 16:20:37 2018 +0300 ARM: dts: at91: sama5d3_xplained: even nand memory partitions sama5d3_xplained, sam9x5cm, sama5d2_ptc_ek and sama5d4_xplained nand flashes have a common memory map. Even the nand memory partitions to match our nand flash map available at: http://www.at91.com/linux4sam/pub/Linux4SAM/SambaSubsections//demo_nandflash_map_lnx4sam5x.png Signed-off-by: Tudor Ambarus Signed-off-by: Ludovic Desroches commit 30ab3684a6ccd13386467439c705eb289259ea5e Author: Tudor Ambarus Date: Tue Oct 2 16:20:36 2018 +0300 ARM: dts: at91: at91sam9x5cm: even nand memory partitions sam9x5cm, sama5d2_ptc_ek, sama5d3_xplained and sama5d4_xplained nand flashes have a common memory map. Even the nand memory partitions to match our nand flash map available at: http://www.at91.com/linux4sam/pub/Linux4SAM/SambaSubsections//demo_nandflash_map_lnx4sam5x.png Signed-off-by: Tudor Ambarus Signed-off-by: Ludovic Desroches commit f602b4871c5f7ac01d37d8b285ca947ba7613065 Author: Tudor Ambarus Date: Tue Oct 2 16:20:35 2018 +0300 ARM: dts: at91: sama5d2_ptc_ek: fix bootloader env offsets The offsets for the bootloader environment and its redundant partition were inverted. Fix the addresses to match our nand flash map available at: http://www.at91.com/linux4sam/pub/Linux4SAM/SambaSubsections//demo_nandflash_map_lnx4sam5x.png Signed-off-by: Tudor Ambarus Signed-off-by: Ludovic Desroches commit 6f270d88a0c4a11725afd8fd2001ae408733afbf Author: Tudor Ambarus Date: Tue Oct 2 16:00:36 2018 +0300 ARM: dts: at91: at91sam9x5cm: fix addressable nand flash size at91sam9x5cm comes with a 2Gb NAND flash. Fix the rootfs size to match this limit. Signed-off-by: Tudor Ambarus Signed-off-by: Ludovic Desroches commit df90fc64367ffdb6f1b5c0f0c4940d44832b0174 Author: Tudor Ambarus Date: Tue Oct 2 16:00:35 2018 +0300 ARM: dts: at91: sama5d4_xplained: fix addressable nand flash size sama5d4_xplained comes with a 4Gb NAND flash. Increase the rootfs size to match this limit. Signed-off-by: Tudor Ambarus Signed-off-by: Ludovic Desroches commit 3ea47b447da0b8e93735612f2b0d128dba4d7524 Author: Bartosz Golaszewski Date: Tue Sep 25 13:29:46 2018 +0200 gpio: mockup: use device properties instead of platform_data Some users want to introduce device tree support to the mockup driver. Let's make it easier by switching to using generic device properties. The driver stays compatible with previous use cases and after this conversion there'll be no need to change the way probing of mockup GPIO chips works. Tested with libgpiod test suite. Signed-off-by: Bartosz Golaszewski Signed-off-by: Linus Walleij commit b0e11e58c5cde29f904f60b2a973ba0314233979 Author: Miquel Raynal Date: Wed Oct 3 09:25:15 2018 +0200 arm64: dts: marvell: add CP110 ICU SEI subnode The ICU handles several interrupt groups, each of them being a subpart of the ICU node. Signed-off-by: Miquel Raynal Signed-off-by: Gregory CLEMENT commit f21bb56e8490073c55bbce06371f8eedc6a12ce2 Author: Miquel Raynal Date: Wed Oct 3 09:25:14 2018 +0200 arm64: dts: marvell: use new bindings for CP110 interrupts Create an ICU subnode for the NSR interrupts. This subnode becomes the CP110 interrupt parent, removing the need for the ICU_GRP_NSR parameter. Move all DT110 nodes to use these new bindings. Signed-off-by: Miquel Raynal Signed-off-by: Gregory CLEMENT commit c5ad04dd44437223cd7b6e6a7a9777bcb2762fff Author: Arnd Bergmann Date: Tue Oct 2 23:15:44 2018 +0200 pinctrl: qcom: fix 'const' pointer handling The 'tiles' array is initialized to a constant pointers to constant strings, but the declaration is only half as constant: drivers/pinctrl/qcom/pinctrl-qcs404.c:1660:11: error: initialization discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers] drivers/pinctrl/qcom/pinctrl-sdm660.c:1417:11: error: initialization discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers] Let's make it more constant. Fixes: 22eb8301dbc1 ("pinctrl: qcom: Add qcs404 pinctrl driver") Fixes: a46d5e98190d ("pinctrl: qcom: Support dispersed tiles") Signed-off-by: Arnd Bergmann Reviewed-by: Bjorn Andersson Signed-off-by: Linus Walleij commit 936a3a23becf8068c532c3c8af42dc52a3e54238 Author: Linus Walleij Date: Tue Oct 2 15:23:24 2018 +0200 pinctrl: nomadik: Fix debugfs The .to_irq() function obviously takes the per-chip offset as parameter, not the global GPIO number. Signed-off-by: Linus Walleij commit 946ffefcdc832c6e2812cb387ced55cffc1a2deb Author: Andy Shevchenko Date: Wed Sep 26 17:43:17 2018 +0300 pinctrl: intel: Fix a spelling typo in kernel documentation The parameter 'community' had been spelled incorrectly. Fix it here. As a side effect it satisfies static checkers that issue the following warnings: drivers/pinctrl/intel/pinctrl-intel.c:845: warning: Function parameter or member 'community' not described in 'intel_gpio_to_pin' drivers/pinctrl/intel/pinctrl-intel.c:845: warning: Excess function parameter 'commmunity' description in 'intel_gpio_to_pin' Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg Signed-off-by: Linus Walleij commit cd057a765f73d7d5eb24e28b0c1b1888fdba9783 Author: Andy Shevchenko Date: Wed Sep 26 17:50:29 2018 +0300 pinctrl: broxton: Convert unsigned to unsigned int Simple type conversion with no functional change implied. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg Signed-off-by: Linus Walleij commit 4e737af8c467b11e78c726d447a908a880a9d5ae Author: Andy Shevchenko Date: Wed Sep 26 17:50:28 2018 +0300 pinctrl: cherryview: Convert unsigned to unsigned int Simple type conversion with no functional change implied. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg Signed-off-by: Linus Walleij commit 939330d71e5d90dca532538aec0dbff500e4cb90 Author: Andy Shevchenko Date: Wed Sep 26 17:50:27 2018 +0300 pinctrl: baytrail: Convert unsigned to unsigned int Simple type conversion with no functional change implied. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg Signed-off-by: Linus Walleij commit 04035f7f59bd106219d062293234bba683f6db71 Author: Andy Shevchenko Date: Wed Sep 26 17:50:26 2018 +0300 pinctrl: intel: Convert unsigned to unsigned int Simple type conversion with no functional change implied. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg Signed-off-by: Linus Walleij commit 73ae1462b758f07d1209c913f4b1fbe47e0827b9 Author: Craig Tatlor Date: Wed Sep 26 17:26:43 2018 +0100 dt-bindings: pinctrl: qcom: Add SDM660 pinctrl binding Add the binding for the TLMM pinctrl block found in the SDM660 platform. Signed-off-by: Craig Tatlor Reviewed-by: Bjorn Andersson Reviewed-by: Rob Herring Signed-off-by: Linus Walleij commit ce52a18db45842f5b992851a552bd7f6acb2241b Author: Waiman Long Date: Tue Oct 2 16:19:18 2018 -0400 locking/lockdep: Add a faster path in __lock_release() When __lock_release() is called, the most likely unlock scenario is on the innermost lock in the chain. In this case, we can skip some of the checks and provide a faster path to completion. Signed-off-by: Waiman Long Acked-by: Peter Zijlstra Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Will Deacon Link: http://lkml.kernel.org/r/1538511560-10090-4-git-send-email-longman@redhat.com Signed-off-by: Ingo Molnar commit 8ee10862476ef8b9e81e5b521205fd5c620b4ffb Author: Waiman Long Date: Tue Oct 2 16:19:17 2018 -0400 locking/lockdep: Eliminate redundant IRQs check in __lock_acquire() The static __lock_acquire() function has only two callers: 1) lock_acquire() 2) reacquire_held_locks() In lock_acquire(), raw_local_irq_save() is called beforehand. So IRQs must have been disabled. So the check: DEBUG_LOCKS_WARN_ON(!irqs_disabled()) is kind of redundant in this case. So move the above check to reacquire_held_locks() to eliminate redundant code in the lock_acquire() path. Signed-off-by: Waiman Long Acked-by: Peter Zijlstra Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Will Deacon Link: http://lkml.kernel.org/r/1538511560-10090-3-git-send-email-longman@redhat.com Signed-off-by: Ingo Molnar commit 44318d5b07be7d7cfe718aa22ea3b2577361a0b5 Author: Waiman Long Date: Tue Oct 2 16:19:16 2018 -0400 locking/lockdep: Remove add_chain_cache_classes() The inline function add_chain_cache_classes() is defined, but has no caller. Just remove it. Signed-off-by: Waiman Long Acked-by: Peter Zijlstra Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Will Deacon Link: http://lkml.kernel.org/r/1538511560-10090-2-git-send-email-longman@redhat.com Signed-off-by: Ingo Molnar commit d90fe2acd9b2900790da01354dbca48dba37c20d Author: Christophe Leroy Date: Fri Sep 28 15:39:20 2018 +0000 powerpc: Wire up memtest Add call to early_memtest() so that kernel compiled with CONFIG_MEMTEST really perform memtest at startup when requested via 'memtest' boot parameter. Tested-by: Daniel Axtens Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman commit 4e6d47206c32d1bbb4931f1d851dae3870e0df81 Author: Vakul Garg Date: Sun Sep 30 08:04:35 2018 +0530 tls: Add support for inplace records encryption Presently, for non-zero copy case, separate pages are allocated for storing plaintext and encrypted text of records. These pages are stored in sg_plaintext_data and sg_encrypted_data scatterlists inside record structure. Further, sg_plaintext_data & sg_encrypted_data are passed to cryptoapis for record encryption. Allocating separate pages for plaintext and encrypted text is inefficient from both required memory and performance point of view. This patch adds support of inplace encryption of records. For non-zero copy case, we reuse the pages from sg_encrypted_data scatterlist to copy the application's plaintext data. For the movement of pages from sg_encrypted_data to sg_plaintext_data scatterlists, we introduce a new function move_to_plaintext_sg(). This function add pages into sg_plaintext_data from sg_encrypted_data scatterlists. tls_do_encryption() is modified to pass the same scatterlist as both source and destination into aead_request_set_crypt() if inplace crypto has been enabled. A new ariable 'inplace_crypto' has been introduced in record structure to signify whether the same scatterlist can be used. By default, the inplace_crypto is enabled in get_rec(). If zero-copy is used (i.e. plaintext data is not copied), inplace_crypto is set to '0'. Signed-off-by: Vakul Garg Reviewed-by: Dave Watson Signed-off-by: David S. Miller commit 6502f8562a531100028b8711f1b14b35ec6c2bcb Author: Hauke Mehrtens Date: Sat Sep 29 13:26:30 2018 +0200 net: dsa: lantiq: Fix path in MAINTAINERS file The MAINTAINERS file contained the wrong file name of the driver. Fixes: 14fceff4771e ("net: dsa: Add Lantiq / Intel DSA driver for vrx200") Reported-by: Joe Perches Signed-off-by: Hauke Mehrtens Signed-off-by: David S. Miller commit 2a7f8c3b1d3feedee3aa319ac220cbde3725b5d5 Author: Stephen Hemminger Date: Sat Sep 29 14:52:56 2018 +0200 hv_netvsc: remove ndo_poll_controller Similar to other patches from ERic. As diagnosed by Song Liu, ndo_poll_controller() can be very dangerous on loaded hosts, since the cpu calling ndo_poll_controller() might steal all NAPI contexts (for all RX/TX queues of the NIC). This capture can last for unlimited amount of time, since one cpu is generally not able to drain all the queues under load. In netvsc driver it uses NAPI for TX completions. The default poll_napi will do this for us now and avoid the capture. Signed-off-by: Stephen Hemminger Cc: Haiyang Zhang Cc: Eric Dumazet Reviewed-by: Haiyang Zhang Signed-off-by: David S. Miller commit d777f552fcc17b208e63df8b30293e01d9e4971f Author: Andrew Lunn Date: Sat Sep 29 21:57:02 2018 +0200 MAINTAINERS: Fix wrong include file path Fix the patch for the mv88e6xxx.h header file in MAINTAINERS Reported-by: Joe Perches Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller commit 803d690e68f0c5230183f1a42c7d50a41d16e380 Author: Christophe Leroy Date: Mon Aug 13 13:19:52 2018 +0000 powerpc/mm: Don't report hugepage tables as memory leaks when using kmemleak When a process allocates a hugepage, the following leak is reported by kmemleak. This is a false positive which is due to the pointer to the table being stored in the PGD as physical memory address and not virtual memory pointer. unreferenced object 0xc30f8200 (size 512): comm "mmap", pid 374, jiffies 4872494 (age 627.630s) hex dump (first 32 bytes): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace: [] huge_pte_alloc+0xdc/0x1f8 [<9e0df1e1>] hugetlb_fault+0x560/0x8f8 [<7938ec6c>] follow_hugetlb_page+0x14c/0x44c [] __get_user_pages+0x1c4/0x3dc [] __mm_populate+0xac/0x140 [<3215421e>] vm_mmap_pgoff+0xb4/0xb8 [] ksys_mmap_pgoff+0xcc/0x1fc [<4fcd760f>] ret_from_syscall+0x0/0x38 See commit a984506c542e2 ("powerpc/mm: Don't report PUDs as memory leaks when using kmemleak") for detailed explanation. To fix that, this patch tells kmemleak to ignore the allocated hugepage table. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman commit 306b1c06172424d496656ae5b668ebfdd54ed506 Author: Michael Neuling Date: Thu Sep 27 15:05:15 2018 +1000 powerpc/tm: Reformat comments The comments in this file don't conform to the coding style so take them to "Comment Formatting Re-Education Camp". Suggested-by: Michael "Camp Drill Sergeant" Ellerman Signed-off-by: Michael Neuling [mpe: Reflow some comments and add full stops, fix spelling of Sergeant.] Signed-off-by: Michael Ellerman commit 5bd9b4445d1f02639cb5e5b151ef40d0a5dc4b47 Author: Petr Vorel Date: Wed Sep 26 16:10:56 2018 +0200 powerpc/config: Enable CONFIG_PRINTK_TIME for 64bit configs which use for CONFIG_LOG_BUF_SHIFT the same or higher value than the default (currently 17). Signed-off-by: Petr Vorel Signed-off-by: Michael Ellerman commit 01b9870ea614518d48b6d2c787284b3a7d181a7c Author: YueHaibing Date: Sun Sep 23 08:12:08 2018 +0000 powerpc: Remove duplicated include from pci_32.c Remove duplicated include. Signed-off-by: YueHaibing Reviewed-by: Stephen Rothwell Signed-off-by: Michael Ellerman commit 8a03e81cb14712f986c5d5fa42a30ff2cbe3237c Author: Michal Suchanek Date: Wed Sep 26 14:24:30 2018 +0200 powerpc/64s: consolidate MCE counter increment. The code in machine_check_exception excludes 64s hvmode when incrementing the MCE counter only to call opal_machine_check to increment it specifically for this case. Remove the exclusion and special case. Fixes: a43c1590426c ("powerpc/pseries: Flush SLB contents on SLB MCE errors.") Signed-off-by: Michal Suchanek Signed-off-by: Michael Ellerman commit 51303113e32fd92d327b3c441c45e235642fa69c Author: Breno Leitao Date: Tue Aug 7 10:35:00 2018 -0300 powerpc/tm: Print 64-bits MSR On a kernel TM Bad thing program exception, the Machine State Register (MSR) is not being properly displayed. The exception code dumps a 32-bits value but MSR is a 64 bits register for all platforms that have HTM enabled. This patch dumps the MSR value as a 64-bits value instead of 32 bits. In order to do so, the 'reason' variable could not be used, since it trimmed MSR to 32-bits (int). Signed-off-by: Breno Leitao Signed-off-by: Michael Ellerman commit 5c784c8414fba11b62e12439f11e109fb5751f38 Author: Breno Leitao Date: Thu Aug 16 14:21:07 2018 -0300 powerpc/tm: Remove msr_tm_active() Currently msr_tm_active() is a wrapper around MSR_TM_ACTIVE() if CONFIG_PPC_TRANSACTIONAL_MEM is set, or it is just a function that returns false if CONFIG_PPC_TRANSACTIONAL_MEM is not set. This function is not necessary, since MSR_TM_ACTIVE() just do the same and could be used, removing the dualism and simplifying the code. This patchset remove every instance of msr_tm_active() and replaced it by MSR_TM_ACTIVE(). Signed-off-by: Breno Leitao Signed-off-by: Michael Ellerman commit 62dea077f56728979e40a741c8a0941dca7290e8 Author: Breno Leitao Date: Tue Sep 25 11:29:33 2018 -0300 powerpc/powernv: Mark function as __noreturn There is a mismatch between function pnv_platform_error_reboot() definition and declaration regarding function modifiers. In the declaration part, it contains the function attribute __noreturn, while function definition itself lacks it. This was reported by sparse tool as an error: arch/powerpc/platforms/powernv/opal.c:538:6: error: symbol 'pnv_platform_error_reboot' redeclared with different type (originally declared at arch/powerpc/platforms/powernv/powernv.h:11) - different modifiers I checked and the function is already being considered as being 'noreturn' by the compiler, thus, I understand this patch does not change any code being generated. Signed-off-by: Breno Leitao Signed-off-by: Michael Ellerman commit fc35ef12dc8ba8633a99c9d9df03a5bb53f1dda3 Author: Breno Leitao Date: Thu Sep 20 13:45:07 2018 -0300 selftests/powerpc: New PTRACE_SYSEMU test This patch adds a new test for the new PTRACE_SYSEMU ptrace request. This test also relies on PTRACE_GETREGS and PTRACE_SETREGS requests to run properly, since the trace instruction (gettid() syscall) is being modified at run-time (by PTRACE_SETREGS) and re-executed three times. PTRACE_GETREGS is being used to check that the registers are still sane. This test basically creates a child process that executes syscalls and the parent process check if it is being traced appropriately. The parent process guarantees that the SYSCALLs are being traced, with PTRACE_SYSEMU, and ptrace stops the child application before a syscall is executed. The way the tests validates it, is by guaranteeing that the system calls arguments, as argv[0] (r3) which is the same register that will have the syscall return value on powerpc, are not being corrupted on PTRACE_SYSEMU with a return value, i.e, it continues to have the current arguments instead, meaning that the registers where not clobbered. This test is basically the same test for x86 located at tools/testing/selftests/x86/ptrace_syscall.c, limited to test PTRACE_SYSEMU request, and ported to PowerPC. Signed-off-by: Breno Leitao Signed-off-by: Michael Ellerman commit 5521eb4bca2db733952f068c37bdf3cd656ad23c Author: Breno Leitao Date: Thu Sep 20 13:45:06 2018 -0300 powerpc/ptrace: Add support for PTRACE_SYSEMU This is a patch that adds support for PTRACE_SYSEMU ptrace request in PowerPC architecture. When ptrace(PTRACE_SYSEMU, ...) request is called, it will be handled by the arch independent function ptrace_resume(), which will tag the task with the TIF_SYSCALL_EMU flag. This flag needs to be handled from a platform dependent point of view, which is what this patch does. This patch adds this task's flag as part of the _TIF_SYSCALL_DOTRACE, which is the MACRO that is used to trace syscalls at entrance/exit. Since TIF_SYSCALL_EMU is now part of _TIF_SYSCALL_DOTRACE, if the task has _TIF_SYSCALL_DOTRACE set, it will hit do_syscall_trace_enter() at syscall entrance and do_syscall_trace_leave() at syscall leave. do_syscall_trace_enter() needs to handle the TIF_SYSCALL_EMU flag properly, which will interrupt the syscall executing if TIF_SYSCALL_EMU is set. The output values should not be changed, i.e. the return value (r3) should contain the original syscall argument on exit. With this flag set, the syscall is not executed fundamentally, because do_syscall_trace_enter() is returning -1 which is bigger than NR_syscall, thus, skipping the syscall execution and exiting userspace. Signed-off-by: Breno Leitao Signed-off-by: Michael Ellerman commit 16d7c69c898531210d13dbd1eb2053759ff0946d Author: Breno Leitao Date: Thu Sep 20 13:45:05 2018 -0300 powerpc: Redefine TIF_32BITS thread flag Moving TIF_32BIT to use bit 20 instead of 4 in the task flag field. This change is making room for an upcoming new task macro (_TIF_SYSCALL_EMU) which is preferred to set a bit in the lower 16-bits part of the word. This upcoming flag macro will take part in a composed macro (_TIF_SYSCALL_DOTRACE) which will contain other flags as well, and it is preferred that the whole _TIF_SYSCALL_DOTRACE macro only sets the lower 16 bits of a word, so, it could be handled using immediate operations (as load immediate, add immediate, ...) where the immediate operand (SI) is limited to 16-bits. Another possible solution would be using the LOAD_REG_IMMEDIATE() macro to load a full 64-bits word immediate, but it takes 5 operations instead of one. Having TIF_32BITS being redefined to use an upper bit is not a problem since there is only one place in the assembly code where TIF_32BIT is being used, and it could be replaced with an operation with right shift (addis), since it is used alone, i.e. not being part of a composed macro, which has different bits set, and would require LOAD_REG_IMMEDIATE(). Tested on a 64 bits Big Endian machine running a 32 bits task. Signed-off-by: Breno Leitao Signed-off-by: Michael Ellerman commit 06ec27aea9fc84d9c6d879eb64b5bcf28a8a1eb7 Author: Christophe Leroy Date: Thu Sep 27 07:05:55 2018 +0000 powerpc/64: add stack protector support On PPC64, as register r13 points to the paca_struct at all time, this patch adds a copy of the canary there, which is copied at task_switch. That new canary is then used by using the following GCC options: -mstack-protector-guard=tls -mstack-protector-guard-reg=r13 -mstack-protector-guard-offset=offsetof(struct paca_struct, canary)) Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman commit c3ff2a5193fa61b1b284cfb1d79628814ed0e95a Author: Christophe Leroy Date: Thu Sep 27 07:05:53 2018 +0000 powerpc/32: add stack protector support This functionality was tentatively added in the past (commit 6533b7c16ee5 ("powerpc: Initial stack protector (-fstack-protector) support")) but had to be reverted (commit f2574030b0e3 ("powerpc: Revert the initial stack protector support") because of GCC implementing it differently whether it had been built with libc support or not. Now, GCC offers the possibility to manually set the stack-protector mode (global or tls) regardless of libc support. This time, the patch selects HAVE_STACKPROTECTOR only if -mstack-protector-guard=tls is supported by GCC. On PPC32, as register r2 points to current task_struct at all time, the stack_canary located inside task_struct can be used directly by using the following GCC options: -mstack-protector-guard=tls -mstack-protector-guard-reg=r2 -mstack-protector-guard-offset=offsetof(struct task_struct, stack_canary)) The protector is disabled for prom_init and bootx_init as it is too early to handle it properly. $ echo CORRUPT_STACK > /sys/kernel/debug/provoke-crash/DIRECT [ 134.943666] Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: lkdtm_CORRUPT_STACK+0x64/0x64 [ 134.943666] [ 134.955414] CPU: 0 PID: 283 Comm: sh Not tainted 4.18.0-s3k-dev-12143-ga3272be41209 #835 [ 134.963380] Call Trace: [ 134.965860] [c6615d60] [c001f76c] panic+0x118/0x260 (unreliable) [ 134.971775] [c6615dc0] [c001f654] panic+0x0/0x260 [ 134.976435] [c6615dd0] [c032c368] lkdtm_CORRUPT_STACK_STRONG+0x0/0x64 [ 134.982769] [c6615e00] [ffffffff] 0xffffffff Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman commit cd5ff94577e004e0a4457e70d0ef3a030f4010b8 Author: zhong jiang Date: Wed Sep 26 20:09:32 2018 +0800 powerpc/xive: Move a dereference below a NULL test Move the dereference of xc below the NULL test. Signed-off-by: zhong jiang Signed-off-by: Michael Ellerman commit 9258227e9dd1da8feddb07ad9702845546a581c9 Author: Naveen N. Rao Date: Thu Sep 27 13:40:58 2018 +0530 powerpc/pseries: Fix how we iterate over the DTL entries When CONFIG_VIRT_CPU_ACCOUNTING_NATIVE is not set, we look up dtl_idx in the lppaca to determine the number of entries in the buffer. Since lppaca is in big endian, we need to do an endian conversion before using this in our calculation to determine the number of entries in the buffer. Without this, we do not iterate over the existing entries in the DTL buffer properly. Fixes: 7c105b63bd98 ("powerpc: Add CONFIG_CPU_LITTLE_ENDIAN kernel config option.") Signed-off-by: Naveen N. Rao Signed-off-by: Michael Ellerman commit db787af1b8a6b4be428ee2ea7d409dafcaa4a43c Author: Naveen N. Rao Date: Thu Sep 27 13:40:57 2018 +0530 powerpc/pseries: Fix DTL buffer registration When CONFIG_VIRT_CPU_ACCOUNTING_NATIVE is not set, we register the DTL buffer for a cpu when the associated file under powerpc/dtl in debugfs is opened. When doing so, we need to set the size of the buffer being registered in the second u32 word of the buffer. This needs to be in big endian, but we are not doing the conversion resulting in the below error showing up in dmesg: dtl_start: DTL registration for cpu 0 (hw 0) failed with -4 Fix this in the obvious manner. Fixes: 7c105b63bd98 ("powerpc: Add CONFIG_CPU_LITTLE_ENDIAN kernel config option.") Signed-off-by: Naveen N. Rao Signed-off-by: Michael Ellerman commit 51423a9c9b09352bea1c53b8324db78bf3b170d1 Author: Christophe Leroy Date: Tue Sep 25 14:10:04 2018 +0000 powerpc/traps: merge unrecoverable_exception() and nonrecoverable_exception() PPC32 uses nonrecoverable_exception() while PPC64 uses unrecoverable_exception(). Both functions are doing almost the same thing. This patch removes nonrecoverable_exception() Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman commit b9ef7b4b867f56114bedbe6bf104cfaba0ca818e Author: Rob Herring Date: Mon Aug 27 20:52:07 2018 -0500 powerpc: 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: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: Arnd Bergmann Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Rob Herring Signed-off-by: Michael Ellerman commit 0bdba867f01d69cffefee707504d3155a30f2d0f Author: Rob Herring Date: Tue Sep 4 16:27:44 2018 -0500 macintosh: 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: Rob Herring Signed-off-by: Michael Ellerman commit c417596d2409125b1814c05e994a21ef9282b894 Author: Rob Herring Date: Thu Feb 1 11:59:22 2018 -0600 powerpc/pseries: Use of_irq_get helper() in request_event_sources_irqs() Instead of calling both of_irq_parse_one() and irq_create_of_mapping(), call of_irq_get() instead which does essentially the same thing. of_irq_get() also calls irq_find_host() for deferred probe support, but this should be fine as irq_create_of_mapping() also calls that internally. This gets us closer to making the former 2 functions static. In the process of simplifying request_event_sources_irqs(), combine the the pr_err() and WARN_ON() calls to just a WARN(). Signed-off-by: Rob Herring Signed-off-by: Michael Ellerman commit 8c8933eba0c2853ecbd6a9ef7542b9058f8b5e11 Author: Rob Herring Date: Thu Jan 4 16:45:41 2018 -0600 powerpc/cell: Use irq_of_parse_and_map() helper Instead of calling both of_irq_parse_one() and irq_create_of_mapping(), call of_irq_parse_and_map() instead which does the same thing. This gets us closer to making the former 2 functions static. Signed-off-by: Rob Herring Acked-by: Arnd Bergmann Signed-off-by: Michael Ellerman commit a0820ff33451aa1a12ec66812e229ac58beb3f24 Author: Aneesh Kumar K.V Date: Thu Sep 20 23:39:47 2018 +0530 powerpc/mm:book3s: Enable THP migration support Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman commit 8890e03380d361f67fdd7f91758d93339fd66ca9 Author: Aneesh Kumar K.V Date: Thu Sep 20 23:39:46 2018 +0530 powerpc/mm/thp: update pmd_trans_huge to check for pmd_present We need to make sure pmd_trans_huge returns false for a pmd migration entry. We mark the migration entry by clearing the _PAGE_PRESENT bit. We keep the _PAGE_PTE bit set to indicate a leaf page table entry. Hence we need to make sure we check for pmd_present() so that pmd_trans_huge won't return true on pmd migration entry. Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman commit 75646c480fdeffbc246e9d45f29721ab5569f921 Author: Aneesh Kumar K.V Date: Thu Sep 20 23:39:45 2018 +0530 arch/powerpc/mm/hash: validate the pte entries before handling the hash fault Make sure we are operating on THP and hugetlb entries in the respective hash fault handling routines. No functional change in this patch. If we walked the table wrongly before, we will retry the access. Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman commit ae28f17b5eeb6702427ccb59e32e32a0c7e02f6b Author: Aneesh Kumar K.V Date: Thu Sep 20 23:39:44 2018 +0530 powerpc/mm/book3s: Check for pmd_large instead of pmd_trans_huge Update few code paths to check for pmd_large. set_pmd_at: We want to use this to store swap pte at pmd level. For swap ptes we don't want to set H_PAGE_THP_HUGE. Hence check for pmd_large in set_pmd_at. This remove the false WARN_ON when using this with swap pmd entry. pmd_page: We don't really use them on pmd migration entries. But they can also work with migration entries and we don't differentiate at the pte level. Hence update pmd_page to work with pmd migration entries too __find_linux_pte: lockless page table walk need to handle pmd migration entries. pmd_trans_huge check will return false on them. We don't set thp = 1 for such entries, but update hpage_shift correctly. Without this we will walk pmd migration entries as a pte page pointer which is wrong. Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman commit f1981b5b302f7f3b4c8b9b5e25ea8c48cebb1ae1 Author: Aneesh Kumar K.V Date: Thu Sep 20 23:39:43 2018 +0530 powerpc/mm/hugetlb/book3s: add _PAGE_PRESENT to hugepd pointer. This make hugetlb directory pointer similar to other page able entries. A hugepd entry is identified by lack of _PAGE_PTE bit set and directory size stored in HUGEPD_SHIFT_MASK. We update that to also look at _PAGE_PRESENT Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman commit da7ad366b497f5fc1d4a416f168057ba40bddb98 Author: Aneesh Kumar K.V Date: Thu Sep 20 23:39:42 2018 +0530 powerpc/mm/book3s: Update pmd_present to look at _PAGE_PRESENT bit With this patch we use 0x8000000000000000UL (_PAGE_PRESENT) to indicate a valid pgd/pud/pmd entry. We also switch the p**_present() to look at this bit. With pmd_present, we have a special case. We need to make sure we consider a pmd marked invalid during THP split as present. Right now we clear the _PAGE_PRESENT bit during a pmdp_invalidate. Inorder to consider this special case we add a new pte bit _PAGE_INVALID (mapped to _RPAGE_SW0). This bit is only used with _PAGE_PRESENT cleared. Hence we are not really losing a pte bit for this special case. pmd_present is also updated to look at _PAGE_INVALID. Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman commit 8139046a5a34787849df81f4a5875cf4b404a7a1 Author: Vaibhav Jain Date: Fri Sep 7 13:04:48 2018 +0530 powerpc/powernv: Make possible for user to force a full ipl cec reboot Ever since fast reboot is enabled by default in opal, opal_cec_reboot() will use fast-reset instead of full IPL to perform system reboot. This leaves the user with no direct way to force a full IPL reboot except changing an nvram setting that persistently disables fast-reset for all subsequent reboots. This patch provides a more direct way for the user to force a one-shot full IPL reboot by passing the command line argument 'full' to the reboot command. So the user will be able to tweak the reboot behavior via: $ sudo reboot full # Force a full ipl reboot skipping fast-reset or $ sudo reboot # default reboot path (usually fast-reset) The reboot command passes the un-parsed command argument to the kernel via the 'Reboot' syscall which is then passed on to the arch function pnv_restart(). The patch updates pnv_restart() to handle this cmd-arg and issues opal_cec_reboot2 with OPAL_REBOOT_FULL_IPL to force a full IPL reset. Signed-off-by: Vaibhav Jain Acked-by: Andrew Donnellan Signed-off-by: Michael Ellerman commit db6711b7a17f03921e734e11e3a1e9bccb28bf46 Author: Michael Ellerman Date: Thu Sep 20 19:41:11 2018 +1000 powerpc/perf: Add missing break in power7_marked_instr_event() In power7_marked_instr_event() there is a switch case that is missing a break or an explicit fallthrough, it's not immediately clear which it should be. The function determines based on the PMU event code, whether the event is a "marked" event (which then requires us to configure the PMU in a certain way). On Power7 there is no specific bit(s) in the event to tell us that, we just have to know. Rather than having a full list of every event and whether they are marked, we pull apart the event code and for events with certain values of certain fields we can say that those are all marked events. We take the psel (bits 0-7) of the event, and look at bits 4-7. For a value of 6 we say that if the entire psel == 0x64 then if the pmc == 3 the event is marked, else not, and otherwise we continue. It is then that we fallthrough to the 8 case, where we return true if the unit == 0xd. The question is should the 6 case also fallthrough and check for unit == 0xd, or should it return. Looking at the full list of events we see that there are zero events where (psel >> 4) == 0x6 and unit == 0xd. So the answer is it doesn't really matter, there are no valid event codes that will return a different result whether we fallthrough or break. But equally, testing the 6 case events against unit == 0xd is slightly bogus, as there are no such events. So to make the code clearer, and avoid any future confusion, have the 6 case break rather than falling through. Signed-off-by: Michael Ellerman Reviewed-by: Madhavan Srinivasan commit 00538ba915aac3fd30c1e3d3f1409e77dd5b3aff Merge: 258b6d141878 30d65e0804d5 Author: David S. Miller Date: Tue Oct 2 22:34:54 2018 -0700 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-09-30 Here's the first bluetooth-next pull request for the 4.20 kernel. - Fixes & cleanups to hci_qca driver - NULL dereference fix to debugfs - Improved L2CAP Connection-oriented Channel MTU & MPS handling - Added support for USB-based RTL8822C controller - Added device ID for BCM4335C0 UART-based controller - Various other smaller cleanups & fixes Please let me know if there are any issues pulling. Thanks. ==================== Signed-off-by: David S. Miller commit 54be0b9c7c9888ebe63b89a31a17ee3df6a68d61 Author: Michael Ellerman Date: Tue Oct 2 23:56:39 2018 +1000 Revert "convert SLB miss handlers to C" and subsequent commits This reverts commits: 5e46e29e6a97 ("powerpc/64s/hash: convert SLB miss handlers to C") 8fed04d0f6ae ("powerpc/64s/hash: remove user SLB data from the paca") 655deecf67b2 ("powerpc/64s/hash: SLB allocation status bitmaps") 2e1626744e8d ("powerpc/64s/hash: provide arch_setup_exec hooks for hash slice setup") 89ca4e126a3f ("powerpc/64s/hash: Add a SLB preload cache") This series had a few bugs, and the fixes are not all trivial. So revert most of it for now. Signed-off-by: Michael Ellerman commit 258b6d141878530ba1f8fc44db683822389de914 Author: Nathan Chancellor Date: Sun Sep 30 20:47:38 2018 -0700 cxgb4: Use proper enum in IEEE_FAUX_SYNC Clang warns when one enumerated type is implicitly converted to another. drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c:390:4: warning: implicit conversion from enumeration type 'enum cxgb4_dcb_state' to different enumeration type 'enum cxgb4_dcb_state_input' [-Wenum-conversion] IEEE_FAUX_SYNC(dev, dcb); ^~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.h:70:10: note: expanded from macro 'IEEE_FAUX_SYNC' CXGB4_DCB_STATE_FW_ALLSYNCED); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ Use the equivalent value of the expected type to silence Clang while resulting in no functional change. CXGB4_DCB_STATE_FW_ALLSYNCED = CXGB4_DCB_INPUT_FW_ALLSYNCED = 3 Signed-off-by: Nathan Chancellor Reviewed-by: Nick Desaulniers Signed-off-by: David S. Miller commit 3b0b8f0d9a259f6a428af63e7a77547325f8e081 Author: Nathan Chancellor Date: Sun Sep 30 20:51:43 2018 -0700 cxgb4: Use proper enum in cxgb4_dcb_handle_fw_update Clang warns when one enumerated type is implicitly converted to another. drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c:303:7: warning: implicit conversion from enumeration type 'enum cxgb4_dcb_state' to different enumeration type 'enum cxgb4_dcb_state_input' [-Wenum-conversion] ? CXGB4_DCB_STATE_FW_ALLSYNCED ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c:304:7: warning: implicit conversion from enumeration type 'enum cxgb4_dcb_state' to different enumeration type 'enum cxgb4_dcb_state_input' [-Wenum-conversion] : CXGB4_DCB_STATE_FW_INCOMPLETE); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2 warnings generated. Use the equivalent value of the expected type to silence Clang while resulting in no functional change. CXGB4_DCB_STATE_FW_INCOMPLETE = CXGB4_DCB_INPUT_FW_INCOMPLETE = 2 CXGB4_DCB_STATE_FW_ALLSYNCED = CXGB4_DCB_INPUT_FW_ALLSYNCED = 3 Signed-off-by: Nathan Chancellor Reviewed-by: Nick Desaulniers Signed-off-by: David S. Miller commit 0fd54807515c1ffa2b65ea06eeab72944445e120 Author: Nathan Chancellor Date: Sun Sep 30 21:10:29 2018 -0700 dpaa_eth: Remove useless declaration Clang warns: drivers/net/ethernet/freescale/dpaa/dpaa_eth.c:2734:34: warning: tentative array definition assumed to have one element static const struct of_device_id dpaa_match[]; ^ 1 warning generated. Turns out that since this driver was introduced in commit 9ad1a3749333 ("dpaa_eth: add support for DPAA Ethernet"), this declaration has been unused. Remove it to silence the warning. Signed-off-by: Nathan Chancellor Acked-by: Madalin Bucur Signed-off-by: David S. Miller commit e4a38c0c4b2761b2b6bc9d64352f1dc6f8402eee Author: Patrick Ruddy Date: Mon Oct 1 09:41:27 2018 +0100 ipv6: add vrf table handling code for ipv6 mcast The code to obtain the correct table for the incoming interface was missing for IPv6. This has been added along with the table creation notification to fib rules for the RTNL_FAMILY_IP6MR address family. Signed-off-by: Patrick Ruddy Signed-off-by: Mike Manning Reviewed-by: David Ahern Signed-off-by: David S. Miller commit 854da991733d1b4f60042423875e32be7f8f0421 Author: Robert Shearman Date: Mon Oct 1 09:40:23 2018 +0100 ipv4: Allow sending multicast packets on specific i/f using VRF socket It is useful to be able to use the same socket for listening in a specific VRF, as for sending multicast packets out of a specific interface. However, the bound device on the socket currently takes precedence and results in the packets not being sent. Relax the condition on overriding the output interface to use for sending packets out of UDP, raw and ping sockets to allow multicast packets to be sent using the specified multicast interface. Signed-off-by: Robert Shearman Signed-off-by: Mike Manning Reviewed-by: David Ahern Signed-off-by: David S. Miller commit 6919622af3a8d92ee73886ebfe22c69ecf4c650c Author: Ido Schimmel Date: Mon Oct 1 11:57:01 2018 +0300 bridge: mcast: Default back to multicast enabled state Commit 13cefad2f2c1 ("net: bridge: convert and rename mcast disabled") converted the 'multicast_disabled' field to an option bit named 'BROPT_MULTICAST_ENABLED'. While the old field was implicitly initialized to 0, the new field is not initialized, resulting in the bridge defaulting to multicast disabled state and breaking existing applications. Fix this by explicitly initializing the option. Fixes: 13cefad2f2c1 ("net: bridge: convert and rename mcast disabled") Signed-off-by: Ido Schimmel Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit 42fac7bd0c6863fc2c71effa07b58751f4f4b85c Merge: f3edc2dbe0ad afb90dbb5f78 Author: David S. Miller Date: Tue Oct 2 22:24:08 2018 -0700 Merge branch 'dpaa2-eth-Add-support-for-Rx-flow-classification' Ioana Radulescu says: ==================== dpaa2-eth: Add support for Rx flow classification The Management Complex (MC) firmware initially allowed the configuration of a single key to be used both for Rx flow hashing and flow classification. This prevented us from supporting Rx flow classification independently of the hash key configuration. Newer firmware versions expose separate commands for configuring the two types of keys, so we can use them to introduce Rx classification support. For frames that don't match any classification rule, we fall back to statistical distribution based on the current hash key. The first patch in this set updates the Rx hashing code to use the new firmware API for key config. Subsequent patches introduce the firmware API for configuring the classification and actual support for adding and deleting rules via ethtool. ==================== Signed-off-by: David S. Miller commit afb90dbb5f7813ead3324ddf056b8937f78c8bd2 Author: Ioana Radulescu Date: Mon Oct 1 13:44:58 2018 +0300 dpaa2-eth: Add ethtool support for flow classification Add support for inserting and deleting Rx flow classification rules through ethtool. We support classification based on some header fields for flow-types ether, ip4, tcp4, udp4 and sctp4. Rx queues are core affine, so the action argument effectively selects on which cpu the matching frame will be processed. Discarding the frame is also supported. Signed-off-by: Ioana Radulescu Signed-off-by: David S. Miller commit 4aaaf9b95abad9cfcd2ac9b07797bccdd4ec01c1 Author: Ioana Radulescu Date: Mon Oct 1 13:44:57 2018 +0300 dpaa2-eth: Configure Rx flow classification key For firmware versions that support it, configure an Rx flow classification key at probe time. Hardware expects all rules in the classification table to share the same key. So we setup a key containing all supported fields at driver init and when a user adds classification rules through ethtool, we will just mask out the unused header fields. Since the key composition process is the same for flow classification and hashing, reuse existing code where possible. Signed-off-by: Ioana Radulescu Signed-off-by: David S. Miller commit f76c483a0b373fdfaedafefe8e4da8beb614e1e9 Author: Ioana Radulescu Date: Mon Oct 1 13:44:56 2018 +0300 dpaa2-eth: Rename structure Since the array of supported header fields will be used for Rx flow classification as well, rename it from "hash_fields" to the more inclusive "dist_fields". Signed-off-by: Ioana Radulescu Signed-off-by: David S. Miller commit df85aeb9b6326e965f3c92315cf43b67006ccf3e Author: Ioana Radulescu Date: Mon Oct 1 13:44:55 2018 +0300 dpaa2-eth: Use new API for Rx flow hashing The Management Complex (MC) firmware initially allowed the configuration of a single key to be used both for Rx flow hashing and flow classification. This prevented us from supporting Rx flow classification through ethtool. Starting with version 10.7.0, the Management Complex(MC) offers a new set of APIs for separate configuration of Rx hashing and classification keys. Update the Rx flow hashing support to use the new API, if available. Signed-off-by: Ioana Radulescu Signed-off-by: David S. Miller commit f3edc2dbe0ad0bbbd8450cd37328f99acf215fd8 Author: Ben Dooks Date: Mon Oct 1 17:02:43 2018 +0100 net: usbnet: make driver_info const The driver_info field that is used for describing each of the usb-net drivers using the usbnet.c core all declare their information as const and the usbnet.c itself does not try and modify the struct. It is therefore a good idea to make this const in the usbnet.c structure in case anyone tries to modify it. Signed-off-by: Ben Dooks Signed-off-by: Ben Dooks Signed-off-by: David S. Miller commit 8873c064d1de579ea23412a6d3eee972593f142b Author: Eric Dumazet Date: Mon Oct 1 23:24:26 2018 -0700 tcp: do not release socket ownership in tcp_close() syzkaller was able to hit the WARN_ON(sock_owned_by_user(sk)); in tcp_close() While a socket is being closed, it is very possible other threads find it in rtnetlink dump. tcp_get_info() will acquire the socket lock for a short amount of time (slow = lock_sock_fast(sk)/unlock_sock_fast(sk, slow);), enough to trigger the warning. Fixes: 67db3e4bfbc9 ("tcp: no longer hold ehash lock while calling tcp_get_info()") Signed-off-by: Eric Dumazet Reported-by: syzbot Signed-off-by: David S. Miller commit 84dacb9cad2804a9f5434b775ccea6aa5d9fc6ca Author: Bibby Hsieh Date: Wed Oct 3 11:41:51 2018 +0800 drm/mediatek: add a error return value when clock driver has been prepared DRM driver get the comp->clk by of_clk_get(), we only assign NULL to comp->clk when error happened, but do not return the error number. Signed-off-by: Bibby Hsieh Signed-off-by: CK Hu commit 014e604196bddbd3a0186775e02bc5574bed18d4 Author: Bibby Hsieh Date: Wed Oct 3 11:41:50 2018 +0800 drm/mediatek: implement connection from BLS to DPI0 Modify display driver to support connection from BLS to DPI. Signed-off-by: Bibby Hsieh Signed-off-by: CK Hu commit 0fc721b2968e3cadec520c60d2fc63498d865055 Author: chunhui dai Date: Wed Oct 3 11:41:49 2018 +0800 drm/mediatek: add hdmi driver for MT2701 and MT7623 This patch adds hdmi dirver suppot for both MT2701 and MT7623. And also support other (existing or future) chips that use the same binding and driver. Signed-off-by: chunhui dai Signed-off-by: CK Hu commit d1ef028d95ffd0f114f2d42ef4f141664abbf1f6 Author: chunhui dai Date: Wed Oct 3 11:41:48 2018 +0800 drm/mediatek: add support for SPDIF audio in HDMI add support for SPDIF audio in HDMI Signed-off-by: chunhui dai Signed-off-by: CK Hu commit be28b6507c46050f5b7244d9d98a19c03b9cf074 Author: chunhui dai Date: Wed Oct 3 11:41:47 2018 +0800 drm/mediatek: separate hdmi phy to different file Different IC has different phy setting of HDMI. This patch separates the phy hardware relate part for mt8173. Signed-off-by: chunhui dai Signed-off-by: CK Hu commit d08b5ab972449b0ab494600fa985979e91e090ca Author: chunhui dai Date: Wed Oct 3 11:41:46 2018 +0800 drm/mediatek: add dpi driver for mt2701 and mt7623 This patch adds dpi dirver suppot for both mt2701 and mt7623. And also support other (existing or future) chips that use the same binding and driver. Signed-off-by: chunhui dai Signed-off-by: CK Hu commit bcc97daee6b8120d1ffeee0073b49bfbd3df026d Author: chunhui dai Date: Wed Oct 3 11:41:45 2018 +0800 drm/mediatek: convert dpi driver to use drm_of_find_panel_or_bridge Convert dpi driver to use drm_of_find_panel_or_bridge. This changes some error messages to debug messages (in the graph core). Graph connections are often "no connects" depending on the particular board, so we want to avoid spurious messages. Plus the kernel is not a DT validator. related links: [1] https://lkml.org/lkml/2017/2/3/716 [2] https://lkml.org/lkml/2017/2/3/719 Signed-off-by: chunhui dai Signed-off-by: CK Hu commit 55c78aa5c808ba7a95bf271a3486f0d14be519ce Author: chunhui dai Date: Wed Oct 3 11:41:44 2018 +0800 drm/mediatek: add clock factor for different IC different IC has different clock designed in HDMI, the factor for calculate clock should be different. Usinng the data in of_node to find this factor. Signed-off-by: chunhui dai Signed-off-by: CK Hu commit 79080159a7c1bcf7cd78713f920a42991bd3c871 Author: chunhui dai Date: Wed Oct 3 11:41:43 2018 +0800 drm/mediatek: adjust EDGE to match clock and data The default timing of DPI data and clock is not match. We could adjust this bit to make them match. Signed-off-by: chunhui dai Signed-off-by: CK Hu commit 0ace4b993c7a524962c6c17f3956a2d3cf2454e1 Author: chunhui dai Date: Wed Oct 3 11:41:42 2018 +0800 drm/mediatek: move hardware register to node data The address of register DPI_H_FRE_CON is different in different IC. Using of_node data to find this address. Signed-off-by: chunhui dai Signed-off-by: CK Hu commit 4e90a6eb769a2041a81efb3c288a087790ae885d Author: chunhui dai Date: Wed Oct 3 11:41:41 2018 +0800 drm/mediatek: add refcount for DPI power on/off After the kernel 4.4, the DRM disable flow was changed, if DPI was disableed before CRTC, it will cause warning message as following: ------------[ cut here ]------------ WARNING: CPU: 0 PID: 1339 at ../../linux/linux-4.4.24-mtk/drivers/gpu/drm/drm_irq.c:1326 drm_wait_one_vblank+0x188/0x18c() vblank wait timed out on crtc 0 Modules linked in: bridge mt8521p_ir_shim(O) i2c_eeprom(O) mtk_m4(O) fuse_ctrl(O) virtual_block(O) caamkeys(PO) chk(PO) amperctl(O) ledctl(O) apple_auth(PO) micctl(O) sensors(PO) lla(O) sdd(PO) ice40_fpga(O) psmon(O) event_queue(PO) utils(O) blackbox(O) CPU: 0 PID: 1339 Comm: kworker/0:1 Tainted: P W O 4.4.24 #1 Hardware name: Mediatek Cortex-A7 (Device Tree) Workqueue: events drm_mode_rmfb_work_fn [] (unwind_backtrace) from [] (show_stack+0x20/0x24) [] (show_stack) from [] (dump_stack+0x98/0xac) [] (dump_stack) from [] (warn_slowpath_common+0x94/0xc4) [] (warn_slowpath_common) from [] (warn_slowpath_fmt+0x40/0x48) [] (warn_slowpath_fmt) from [] (drm_wait_one_vblank+0x188/0x18c) [] (drm_wait_one_vblank) from [] (drm_crtc_wait_one_vblank+0x28/0x2c) [] (drm_crtc_wait_one_vblank) from [] (mtk_drm_crtc_disable+0x78/0x240) [] (mtk_drm_crtc_disable) from [] (drm_atomic_helper_commit_modeset_disables+0x128/0x3b8) [] (drm_atomic_helper_commit_modeset_disables) from [] (mtk_atomic_complete+0x74/0xb4) [] (mtk_atomic_complete) from [] (mtk_atomic_commit+0x68/0x98) [] (mtk_atomic_commit) from [] (drm_atomic_commit+0x54/0x74) [] (drm_atomic_commit) from [] (drm_atomic_helper_set_config+0x7c/0xa0) [] (drm_atomic_helper_set_config) from [] (drm_mode_set_config_internal+0x68/0xe4) [] (drm_mode_set_config_internal) from [] (drm_framebuffer_remove+0xe4/0x120) [] (drm_framebuffer_remove) from [] (drm_mode_rmfb_work_fn+0x48/0x58) [] (drm_mode_rmfb_work_fn) from [] (process_one_work+0x154/0x50c) [] (process_one_work) from [] (worker_thread+0x284/0x568) [] (worker_thread) from [] (kthread+0xec/0x104) [] (kthread) from [] (ret_from_fork+0x14/0x3c) ---[ end trace 12ae5358e992abd5 ]--- so, we add refcount for DPI power on/off to protect the flow. Signed-off-by: Bibby Hsieh Signed-off-by: chunhui dai Signed-off-by: CK Hu commit c0e3e0406a0c39044c7dc25f3386694542d50fcc Author: Darrick J. Wong Date: Tue Oct 2 22:45:25 2018 -0400 docs: make ext4 readme tables readable The tables in the ext4 readme are not particularly space efficient in the text or html outputs, and they're totally broken in the pdf output. Convert them into titled paragraphs so that they render more nicely. Signed-off-by: Darrick J. Wong Signed-off-by: Theodore Ts'o commit de7abd7bbb73d67f90c6fb48d4b2debe54f6f46e Author: Darrick J. Wong Date: Tue Oct 2 22:43:40 2018 -0400 docs: fix ext4 documentation table formatting problems It turns out that the latex table formatters lay out table columns with the exact proportional widths given in the table metadata, even if text overflows outside the box. This was not caught during the initial import because the HTML renderers are smart enough to fudge the table. Fix the table column width formatting problems in the data structures and algorithms documentation so that we don't have squashed columns. Signed-off-by: Darrick J. Wong Signed-off-by: Theodore Ts'o commit e5f0926115a4a40ed1cd0d3ce8b09bb88be73ab9 Author: Darrick J. Wong Date: Tue Oct 2 22:40:32 2018 -0400 docs: generate a separate ext4 pdf file from the documentation The documentation build scripts won't build a pdf for the ext4 documentation unless explicitly called for, so ask for a separate ext4.pdf to be generated with all the documentation. Signed-off-by: Darrick J. Wong Signed-off-by: Theodore Ts'o commit 401b25aa1a75e7fe4e3202a6336604269697d705 Author: Souptick Joarder Date: Tue Oct 2 22:20:50 2018 -0400 ext4: convert fault handler to use vm_fault_t type Return type of ext4_page_mkwrite and ext4_filemap_fault are changed to use vm_fault_t type. With this patch all the callers of block_page_mkwrite_return() are changed to handle vm_fault_t. So converting the return type of block_page_mkwrite_return() to vm_fault_t. Signed-off-by: Souptick Joarder Signed-off-by: Theodore Ts'o Reviewed-by: Matthew Wilcox commit 625ef8a3acd111d5f496d190baf99d1a815bd03e Author: Lukas Czerner Date: Tue Oct 2 21:18:45 2018 -0400 ext4: initialize retries variable in ext4_da_write_inline_data_begin() Variable retries is not initialized in ext4_da_write_inline_data_begin() which can lead to nondeterministic number of retries in case we hit ENOSPC. Initialize retries to zero as we do everywhere else. Signed-off-by: Lukas Czerner Signed-off-by: Theodore Ts'o Fixes: bc0ca9df3b2a ("ext4: retry allocation when inline->extent conversion failed") Cc: stable@kernel.org commit 33d9a7fd675678e7ea739ccb104abc1139caf19e Merge: 940656fb3f94 a610b665ec9e Author: Daniel Borkmann Date: Wed Oct 3 02:53:49 2018 +0200 Merge branch 'bpf-sk-lookup' Joe Stringer says: ==================== This series proposes a new helper for the BPF API which allows BPF programs to perform lookups for sockets in a network namespace. This would allow programs to determine early on in processing whether the stack is expecting to receive the packet, and perform some action (eg drop, forward somewhere) based on this information. The series is structured roughly into: * Misc refactor * Add the socket pointer type * Add reference tracking to ensure that socket references are freed * Extend the BPF API to add sk_lookup_xxx() / sk_release() functions * Add tests/documentation The helper proposed in this series includes a parameter for a tuple which must be filled in by the caller to determine the socket to look up. The simplest case would be filling with the contents of the packet, ie mapping the packet's 5-tuple into the parameter. In common cases, it may alternatively be useful to reverse the direction of the tuple and perform a lookup, to find the socket that initiates this connection; and if the BPF program ever performs a form of IP address translation, it may further be useful to be able to look up arbitrary tuples that are not based upon the packet, but instead based on state held in BPF maps or hardcoded in the BPF program. Currently, access into the socket's fields are limited to those which are otherwise already accessible, and are restricted to read-only access. Changes since v3: * New patch: "bpf: Reuse canonical string formatter for ctx errs" * Add PTR_TO_SOCKET to is_ctx_reg(). * Add a few new checks to prevent mixing of socket/non-socket pointers. * Swap order of checks in sock_filter_is_valid_access(). * Prefix register spill macros with "bpf_". * Add acks from previous round * Rebase Changes since v2: * New patch: "selftests/bpf: Generalize dummy program types". This enables adding verifier tests for socket lookup with tail calls. * Define the semantics of the new helpers more clearly in uAPI header. * Fix release of caller_net when netns is not specified. * Use skb->sk to find caller net when skb->dev is unavailable. * Fix build with !CONFIG_NET. * Replace ptr_id defensive coding when releasing reference state with an internal error (-EFAULT). * Remove flags argument to sk_release(). * Add several new assembly tests suggested by Daniel. * Add a few new C tests. * Fix typo in verifier error message. Changes since v1: * Limit netns_id field to 32 bits * Reuse reg_type_mismatch() in more places * Reduce the number of passes at convert_ctx_access() * Replace ptr_id defensive coding when releasing reference state with an internal error (-EFAULT) * Rework 'struct bpf_sock_tuple' to allow passing a packet pointer * Allow direct packet access from helper * Fix compile error with CONFIG_IPV6 enabled * Improve commit messages Changes since RFC: * Split up sk_lookup() into sk_lookup_tcp(), sk_lookup_udp(). * Only take references on the socket when necessary. * Make sk_release() only free the socket reference in this case. * Fix some runtime reference leaks: * Disallow BPF_LD_[ABS|IND] instructions while holding a reference. * Disallow bpf_tail_call() while holding a reference. * Prevent the same instruction being used for reference and other pointer type. * Simplify locating copies of a reference during helper calls by caching the pointer id from the caller. * Fix kbuild compilation warnings with particular configs. * Improve code comments describing the new verifier pieces. * Tested by Nitin ==================== Signed-off-by: Daniel Borkmann commit a610b665ec9ec9ba076e6dd8703750999c81eae4 Author: Joe Stringer Date: Tue Oct 2 13:35:41 2018 -0700 Documentation: Describe bpf reference tracking Document the new pointer types in the verifier and how the pointer ID tracking works to ensure that references which are taken are later released. Signed-off-by: Joe Stringer Acked-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann commit de375f4e91e3074a09ad337ac4b32a2f21c24d96 Author: Joe Stringer Date: Tue Oct 2 13:35:40 2018 -0700 selftests/bpf: Add C tests for reference tracking Add some tests that demonstrate and test the balanced lookup/free nature of socket lookup. Section names that start with "fail" represent programs that are expected to fail verification; all others should succeed. Signed-off-by: Joe Stringer Acked-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann commit 29cd77f41620dca22bdee092217c16b49ece8915 Author: Joe Stringer Date: Tue Oct 2 13:35:39 2018 -0700 libbpf: Support loading individual progs Allow the individual program load to be invoked. This will help with testing, where a single ELF may contain several sections, some of which denote subprograms that are expected to fail verification, along with some which are expected to pass verification. By allowing programs to be iterated and individually loaded, each program can be independently checked against its expected verification result. Signed-off-by: Joe Stringer Acked-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann commit b584ab8840fdc17f0d75ac62510396b8f657ed8f Author: Joe Stringer Date: Tue Oct 2 13:35:38 2018 -0700 selftests/bpf: Add tests for reference tracking reference tracking: leak potential reference reference tracking: leak potential reference on stack reference tracking: leak potential reference on stack 2 reference tracking: zero potential reference reference tracking: copy and zero potential references reference tracking: release reference without check reference tracking: release reference reference tracking: release reference twice reference tracking: release reference twice inside branch reference tracking: alloc, check, free in one subbranch reference tracking: alloc, check, free in both subbranches reference tracking in call: free reference in subprog reference tracking in call: free reference in subprog and outside reference tracking in call: alloc & leak reference in subprog reference tracking in call: alloc in subprog, release outside reference tracking in call: sk_ptr leak into caller stack reference tracking in call: sk_ptr spill into caller stack reference tracking: allow LD_ABS reference tracking: forbid LD_ABS while holding reference reference tracking: allow LD_IND reference tracking: forbid LD_IND while holding reference reference tracking: check reference or tail call reference tracking: release reference then tail call reference tracking: leak possible reference over tail call reference tracking: leak checked reference over tail call reference tracking: mangle and release sock_or_null reference tracking: mangle and release sock reference tracking: access member reference tracking: write to member reference tracking: invalid 64-bit access of member reference tracking: access after release reference tracking: direct access for lookup unpriv: spill/fill of different pointers stx - ctx and sock unpriv: spill/fill of different pointers stx - leak sock unpriv: spill/fill of different pointers stx - sock and ctx (read) unpriv: spill/fill of different pointers stx - sock and ctx (write) Signed-off-by: Joe Stringer Signed-off-by: Daniel Borkmann commit 0c586079f852187d19fea60c9a4981ad29e22ba8 Author: Joe Stringer Date: Tue Oct 2 13:35:37 2018 -0700 selftests/bpf: Generalize dummy program types Don't hardcode the dummy program types to SOCKET_FILTER type, as this prevents testing bpf_tail_call in conjunction with other program types. Instead, use the program type specified in the test case. Signed-off-by: Joe Stringer Signed-off-by: Daniel Borkmann commit 6acc9b432e6714d72d7d77ec7c27f6f8358d0c71 Author: Joe Stringer Date: Tue Oct 2 13:35:36 2018 -0700 bpf: Add helper to retrieve socket in BPF This patch adds new BPF helper functions, bpf_sk_lookup_tcp() and bpf_sk_lookup_udp() which allows BPF programs to find out if there is a socket listening on this host, and returns a socket pointer which the BPF program can then access to determine, for instance, whether to forward or drop traffic. bpf_sk_lookup_xxx() may take a reference on the socket, so when a BPF program makes use of this function, it must subsequently pass the returned pointer into the newly added sk_release() to return the reference. By way of example, the following pseudocode would filter inbound connections at XDP if there is no corresponding service listening for the traffic: struct bpf_sock_tuple tuple; struct bpf_sock_ops *sk; populate_tuple(ctx, &tuple); // Extract the 5tuple from the packet sk = bpf_sk_lookup_tcp(ctx, &tuple, sizeof tuple, netns, 0); if (!sk) { // Couldn't find a socket listening for this traffic. Drop. return TC_ACT_SHOT; } bpf_sk_release(sk, 0); return TC_ACT_OK; Signed-off-by: Joe Stringer Acked-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann commit fd978bf7fd312581a7ca454a991f0ffb34c4204b Author: Joe Stringer Date: Tue Oct 2 13:35:35 2018 -0700 bpf: Add reference tracking to verifier Allow helper functions to acquire a reference and return it into a register. Specific pointer types such as the PTR_TO_SOCKET will implicitly represent such a reference. The verifier must ensure that these references are released exactly once in each path through the program. To achieve this, this commit assigns an id to the pointer and tracks it in the 'bpf_func_state', then when the function or program exits, verifies that all of the acquired references have been freed. When the pointer is passed to a function that frees the reference, it is removed from the 'bpf_func_state` and all existing copies of the pointer in registers are marked invalid. Signed-off-by: Joe Stringer Acked-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann commit 84dbf3507349696b505b6a500722538b0683e4ac Author: Joe Stringer Date: Tue Oct 2 13:35:34 2018 -0700 bpf: Macrofy stack state copy An upcoming commit will need very similar copy/realloc boilerplate, so refactor the existing stack copy/realloc functions into macros to simplify it. Signed-off-by: Joe Stringer Acked-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann commit c64b7983288e636356f7f5f652de4813e1cfedac Author: Joe Stringer Date: Tue Oct 2 13:35:33 2018 -0700 bpf: Add PTR_TO_SOCKET verifier type Teach the verifier a little bit about a new type of pointer, a PTR_TO_SOCKET. This pointer type is accessed from BPF through the 'struct bpf_sock' structure. Signed-off-by: Joe Stringer Acked-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann commit 840b9615d6e9d134178b4dd4f3c30aa30643a379 Author: Joe Stringer Date: Tue Oct 2 13:35:32 2018 -0700 bpf: Generalize ptr_or_null regs check This check will be reused by an upcoming commit for conditional jump checks for sockets. Refactor it a bit to simplify the later commit. Signed-off-by: Joe Stringer Acked-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann commit 9d2be44a7f33d5ec4fbd3368317bcf5f404bb8f7 Author: Joe Stringer Date: Tue Oct 2 13:35:31 2018 -0700 bpf: Reuse canonical string formatter for ctx errs The array "reg_type_str" provides canonical formatting of register types, however a couple of places would previously check whether a register represented the context and write the name "context" directly. An upcoming commit will add another pointer type to these statements, so to provide more accurate error messages in the verifier, update these error messages to use "reg_type_str" instead. Signed-off-by: Joe Stringer Signed-off-by: Daniel Borkmann commit aad2eeaf46973a0968a75640cd1f8f1c650322a0 Author: Joe Stringer Date: Tue Oct 2 13:35:30 2018 -0700 bpf: Simplify ptr_min_max_vals adjustment An upcoming commit will add another two pointer types that need very similar behaviour, so generalise this function now. Signed-off-by: Joe Stringer Acked-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann commit f3709f69b7c5cba6323cc03c29b64293b93be817 Author: Joe Stringer Date: Tue Oct 2 13:35:29 2018 -0700 bpf: Add iterator for spilled registers Add this iterator for spilled registers, it concentrates the details of how to get the current frame's spilled registers into a single macro while clarifying the intention of the code which is calling the macro. Signed-off-by: Joe Stringer Acked-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann commit fb7d70db305a1446864227abf711b756568f8242 Author: Jaegeuk Kim Date: Tue Sep 25 13:54:33 2018 -0700 f2fs: clear PageError on the read path When running fault injection test, I hit somewhat wrong behavior in f2fs_gc -> gc_data_segment(): 0. fault injection generated some PageError'ed pages 1. gc_data_segment -> f2fs_get_read_data_page(REQ_RAHEAD) 2. move_data_page -> f2fs_get_lock_data_page() -> f2f_get_read_data_page() -> f2fs_submit_page_read() -> submit_bio(READ) -> return EIO due to PageError -> fail to move data Signed-off-by: Jaegeuk Kim commit 84a9c4d55907feece68c6012d3c030cf5c841ceb Author: Masahiro Yamada Date: Wed Oct 3 07:59:51 2018 +0900 arm64: dts: uniphier: add SD controller nodes Add SD controller nodes for LD20 and PXs3. LD20 does not support the UHS mode, while PXs3 supports it. Signed-off-by: Masahiro Yamada commit b0a6261fc074a7972ab795908746140c75942d80 Author: Masahiro Yamada Date: Wed Oct 3 07:59:50 2018 +0900 ARM: dts: uniphier: add SD/eMMC controller nodes Add SD controller nodes for LD4, Pro4, sLD8, Pro5, and PXs2. This is also used as an eMMC controller for LD4, Pro4, and sLD8. Signed-off-by: Masahiro Yamada commit 744486d426dce4e4dc25fd2ce750116a0025736c Author: Maciej Żenczykowski Date: Sat Sep 29 23:44:54 2018 -0700 net: inet6_rtm_getroute() - use new style struct initializer instead of memset Signed-off-by: Maciej Żenczykowski Reviewed-by: David Ahern Signed-off-by: David S. Miller commit 84db84071505e0e46f2faa05dedfa7a313d41859 Author: Maciej Żenczykowski Date: Sat Sep 29 23:44:53 2018 -0700 net: rtm_to_fib6_config() - use new style struct initializer instead of memset (allows for better compiler optimization) Signed-off-by: Maciej Żenczykowski Reviewed-by: David Ahern Signed-off-by: David S. Miller commit 8823a3acfd903d1558f45f155570f8eb3eb5a76f Author: Maciej Żenczykowski Date: Sat Sep 29 23:44:52 2018 -0700 net: rtmsg_to_fib6_config() - use new style struct initializer instead of memset (allows for better compiler optimization) Signed-off-by: Maciej Żenczykowski Reviewed-by: David Ahern Signed-off-by: David S. Miller commit dc92095dd92a955761b4779fed9618d407f8123b Author: Maciej Żenczykowski Date: Sat Sep 29 23:44:51 2018 -0700 net: ip6_update_pmtu() - use new style struct initializer instead of memset (allows for better compiler optimization) Signed-off-by: Maciej Żenczykowski Reviewed-by: David Ahern Signed-off-by: David S. Miller commit d456336d164886d9339aaa112d6595e1c142f8bc Author: Maciej Żenczykowski Date: Sat Sep 29 23:44:50 2018 -0700 net: remove 1 always zero parameter from ip6_redirect_no_header() (the parameter in question is mark) Signed-off-by: Maciej Żenczykowski Reviewed-by: David Ahern Signed-off-by: David S. Miller commit 0b26fb17cadf9df8f2e5a8feec4c2a850eabede0 Author: Maciej Żenczykowski Date: Sat Sep 29 23:44:49 2018 -0700 net: ip6_redirect_no_header() - use new style struct initializer instead of memset (allows for better compiler optimization) Signed-off-by: Maciej Żenczykowski Reviewed-by: David Ahern Signed-off-by: David S. Miller commit 1f7f10ac4aab5aadd89bdf6db177e3e753e0a69c Author: Maciej Żenczykowski Date: Sat Sep 29 23:44:48 2018 -0700 net: ip6_redirect() - use new style struct initializer instead of memset (allows for better compiler optimization) Signed-off-by: Maciej Żenczykowski Reviewed-by: David Ahern Signed-off-by: David S. Miller commit e8e3fbe92c49d1e031eca72542956606c43122ba Author: Maciej Żenczykowski Date: Sat Sep 29 23:44:47 2018 -0700 net: inet_rtm_getroute() - use new style struct initializer instead of memset Signed-off-by: Maciej Żenczykowski Reviewed-by: David Ahern Signed-off-by: David S. Miller commit e351bb6227fbe2bb5da6f38a4cf5bd18810b0557 Author: Maciej Żenczykowski Date: Sat Sep 29 23:44:46 2018 -0700 net: ip_rt_get_source() - use new style struct initializer instead of memset (allows for better compiler optimization) Signed-off-by: Maciej Żenczykowski Reviewed-by: David Ahern Signed-off-by: David S. Miller commit 8f523d6db7ed69f69720267af170c0719023f373 Author: YueHaibing Date: Thu Sep 27 11:01:19 2018 +0000 VMCI: remove set but not used variable 'cid' Fixes gcc '-Wunused-but-set-variable' warning: drivers/misc/vmw_vmci/vmci_host.c: In function 'vmci_host_do_alloc_queuepair': drivers/misc/vmw_vmci/vmci_host.c:450:6: warning: variable 'cid' set but not used [-Wunused-but-set-variable] u32 cid; ^ Signed-off-by: YueHaibing Signed-off-by: Greg Kroah-Hartman commit 52e2dc2ce2d88a1c588cca4fb8ce0c1608c8a7f9 Author: Rob Herring Date: Mon Oct 1 16:43:51 2018 -0500 uio: 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: Greg Kroah-Hartman Signed-off-by: Rob Herring Signed-off-by: Greg Kroah-Hartman commit ef8ec6e1f93df868e441101beb62733f09167764 Author: zhong jiang Date: Thu Sep 27 17:51:48 2018 +0800 misc: card_utils: remove duplicated include file delay.h and dma-mapping.h have duplicated include. hence just remove redundant file. Signed-off-by: zhong jiang Signed-off-by: Greg Kroah-Hartman commit f4608ce917d6f50824f4c609d52a3c8900c59164 Author: Wei Yongjun Date: Tue Sep 25 14:30:36 2018 +0000 binder: make symbol 'binder_free_buf' static Fixes the following sparse warning: drivers/android/binder.c:3312:1: warning: symbol 'binder_free_buf' was not declared. Should it be static? Signed-off-by: Wei Yongjun Signed-off-by: Greg Kroah-Hartman commit 15c6784c7cee3b653f127b41340210284dea66f6 Author: Mika Westerberg Date: Mon Oct 1 12:31:22 2018 +0300 thunderbolt: Add Intel as copyright holder Intel has done pretty major changes to the driver and we continue to do so in the future as well. Add Intel as copyright holder of the files we have done changes. While there drop "Cactus Ridge" from the headers because this driver works also with other Thunderbolt controllers. No functional changes intended. Signed-off-by: Mika Westerberg Acked-by: Yehezkel Bernat Signed-off-by: Greg Kroah-Hartman commit fd3b339cbb6047dacfa7ccc81c846efcb61032a9 Author: Mika Westerberg Date: Mon Oct 1 12:31:21 2018 +0300 thunderbolt: Convert rest of the driver files to use SPDX identifier This gets rid of the licence boilerplate duplicated in each file. While there fix doubled space in domain.c author line. No functional changes intended. Signed-off-by: Mika Westerberg Acked-by: Yehezkel Bernat Signed-off-by: Greg Kroah-Hartman commit a83bc4a5e8e08c15464f0b0b79934b834911cf9c Author: Mika Westerberg Date: Mon Oct 1 12:31:20 2018 +0300 thunderbolt: Print connected devices The previous patch made the driver less verbose meanining that all the switch structures and ports are now logged as debug level. However, we have been missing similar output that USB for intance prints when a new USB device is connected and disconnected. This information is useful for end users as well as developers because it immediately shows the actual device that was connected. This patch adds printing of the actual connected devices to the driver. Signed-off-by: Mika Westerberg Acked-by: Yehezkel Bernat Signed-off-by: Greg Kroah-Hartman commit daa5140f7e71f513606c2e4f394b9e8b8d679661 Author: Mika Westerberg Date: Mon Oct 1 12:31:19 2018 +0300 thunderbolt: Make the driver less verbose Currently the driver logs quite a lot to the system message buffer even when doing normal operations. This information is not useful for ordinary users and might even annoy some. For this reason convert most of the logs at info level to happen at debug level instead. The nice output formatting is untouched. Logging can be easily re-enabled by passing "thunderbolt.dyndbg" in the kernel command line (or using the corresponding control file runtime). Signed-off-by: Mika Westerberg Acked-by: Yehezkel Bernat Signed-off-by: Greg Kroah-Hartman commit 0bb5a1a28ee644798dc3ca167cf9e5ac2058863e Author: zhong jiang Date: Mon Oct 1 12:31:18 2018 +0300 thunderbolt: Remove a meaningless NULL pointer check before dma_pool_destroy dma_pool_destroy() already takes NULL pointer into account so there is no need to check that again in tb_ctl_free(). Signed-off-by: zhong jiang [mw: reword commit log a bit] Signed-off-by: Mika Westerberg Signed-off-by: Greg Kroah-Hartman commit 185647813cac080453cb73a2e034a8821049f2a7 Author: Dan Carpenter Date: Mon Oct 1 19:44:41 2018 +0300 mei: samples: fix a signedness bug in amt_host_if_call() "out_buf_sz" needs to be signed for the error handling to work. Signed-off-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman commit 03b2cbb6ea3c73e08fcf72d9ef8e286c4dcbd1fe Author: Tomas Winkler Date: Fri Sep 28 23:27:48 2018 +0300 mei: replace POLL* with EPOLL* for write queues. Looks like during merging the bulk POLL* -> EPOLL* replacement missed the patch 'commit af336cabe083 ("mei: limit the number of queued writes")' Fix sparse warning: drivers/misc/mei/main.c:602:13: warning: restricted __poll_t degrades to integer drivers/misc/mei/main.c:605:30: warning: invalid assignment: |= drivers/misc/mei/main.c:605:30: left side has type restricted __poll_t drivers/misc/mei/main.c:605:30: right side has type int Fixes: af336cabe083 ("mei: limit the number of queued writes") Signed-off-by: Tomas Winkler Signed-off-by: Greg Kroah-Hartman commit 6011002c1584d29c317e0895b9667d57f254537a Author: Wei Yongjun Date: Tue Sep 25 15:05:20 2018 +0000 uio: make symbol 'uio_class_registered' static Fixes the following sparse warning: drivers/uio/uio.c:277:6: warning: symbol 'uio_class_registered' was not declared. Should it be static? Fixes: ae61cf5b9913 ("uio: ensure class is registered before devices") Signed-off-by: Wei Yongjun Signed-off-by: Greg Kroah-Hartman commit 25355252607ca288f329ee033f387764883393f6 Author: Dexuan Cui Date: Sun Sep 23 21:10:44 2018 +0000 Drivers: hv: vmbus: Use cpumask_var_t for on-stack cpu mask A cpumask structure on the stack can cause a warning with CONFIG_NR_CPUS=8192 (e.g. Ubuntu 16.04 and 18.04 use this): drivers/hv//channel_mgmt.c: In function ‘init_vp_index’: drivers/hv//channel_mgmt.c:702:1: warning: the frame size of 1032 bytes is larger than 1024 bytes [-Wframe-larger-than=] Nowadays it looks most distros enable CONFIG_CPUMASK_OFFSTACK=y, and hence we can work around the warning by using cpumask_var_t. Signed-off-by: Dexuan Cui Cc: K. Y. Srinivasan Cc: Haiyang Zhang Cc: Stephen Hemminger Cc: Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman commit fc62c3b1977d62e6374fd6e28d371bb42dfa5c9d Author: Dexuan Cui Date: Sun Sep 23 21:10:43 2018 +0000 Drivers: hv: kvp: Fix two "this statement may fall through" warnings We don't need to call process_ib_ipinfo() if message->kvp_hdr.operation is KVP_OP_GET_IP_INFO in kvp_send_key(), because here we just need to pass on the op code from the host to the userspace; when the userspace returns the info requested by the host, we pass the info on to the host in kvp_respond_to_host() -> process_ob_ipinfo(). BTW, the current buggy code actually doesn't cause any harm, because only message->kvp_hdr.operation is used by the userspace, in the case of KVP_OP_GET_IP_INFO. The patch also adds a missing "break;" in kvp_send_key(). BTW, the current buggy code actually doesn't cause any harm, because in the case of KVP_OP_SET, the unexpected fall-through corrupts message->body.kvp_set.data.key_size, but that is not really used: see the definition of struct hv_kvp_exchg_msg_value. Signed-off-by: Dexuan Cui Cc: K. Y. Srinivasan Cc: Haiyang Zhang Cc: Stephen Hemminger Cc: Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman commit d544c22d6951be3386ac59bb9a99c9bc566b3f09 Author: Dexuan Cui Date: Sun Sep 23 21:10:42 2018 +0000 Drivers: hv: kvp: Fix the indentation of some "break" statements No functional change. 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 fe857bb40fb6788afe6b12b1df50b94e2d363c89 Author: Dexuan Cui Date: Sun Sep 23 21:10:41 2018 +0000 Drivers: hv: vmbus: Fix the descriptions of some function parameters No functional change. Added descriptions for some parameters. Fixed some typos. Removed some out-of-date comments. Signed-off-by: Dexuan Cui Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: K. Y. Srinivasan Cc: Haiyang Zhang Cc: Stephen Hemminger Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman commit a007734618fee1bf35556c04fa498d41d42c7301 Author: Andreas Kemnade Date: Sat Sep 22 21:20:54 2018 +0200 w1: omap-hdq: fix missing bus unregister at removal The bus master was not removed after unloading the module or unbinding the driver. That lead to oopses like this [ 127.842987] Unable to handle kernel paging request at virtual address bf01d04c [ 127.850646] pgd = 70e3cd9a [ 127.853698] [bf01d04c] *pgd=8f908811, *pte=00000000, *ppte=00000000 [ 127.860412] Internal error: Oops: 80000007 [#1] PREEMPT SMP ARM [ 127.866668] Modules linked in: bq27xxx_battery overlay [last unloaded: omap_hdq] [ 127.874542] CPU: 0 PID: 1022 Comm: w1_bus_master1 Not tainted 4.19.0-rc4-00001-g2d51da718324 #12 [ 127.883819] Hardware name: Generic OMAP36xx (Flattened Device Tree) [ 127.890441] PC is at 0xbf01d04c [ 127.893798] LR is at w1_search_process_cb+0x4c/0xfc [ 127.898956] pc : [] lr : [] psr: a0070013 [ 127.905609] sp : cf885f48 ip : bf01d04c fp : ddf1e11c [ 127.911132] r10: cf8fe040 r9 : c05f8d00 r8 : cf8fe040 [ 127.916656] r7 : 000000f0 r6 : cf8fe02c r5 : cf8fe000 r4 : cf8fe01c [ 127.923553] r3 : c05f8d00 r2 : 000000f0 r1 : cf8fe000 r0 : dde1ef10 [ 127.930450] Flags: NzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none [ 127.938018] Control: 10c5387d Table: 8f8f0019 DAC: 00000051 [ 127.944091] Process w1_bus_master1 (pid: 1022, stack limit = 0x9135699f) [ 127.951171] Stack: (0xcf885f48 to 0xcf886000) [ 127.955810] 5f40: cf8fe000 00000000 cf884000 cf8fe090 000003e8 c05f8d00 [ 127.964477] 5f60: dde5fc34 c05f9700 ddf1e100 ddf1e540 cf884000 cf8fe000 c05f9694 00000000 [ 127.973114] 5f80: dde5fc34 c01499a4 00000000 ddf1e540 c0149874 00000000 00000000 00000000 [ 127.981781] 5fa0: 00000000 00000000 00000000 c01010e8 00000000 00000000 00000000 00000000 [ 127.990447] 5fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [ 127.999114] 5fe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000 [ 128.007781] [] (w1_search_process_cb) from [] (w1_process+0x6c/0x118) [ 128.016479] [] (w1_process) from [] (kthread+0x130/0x148) [ 128.024047] [] (kthread) from [] (ret_from_fork+0x14/0x2c) [ 128.031677] Exception stack(0xcf885fb0 to 0xcf885ff8) [ 128.037017] 5fa0: 00000000 00000000 00000000 00000000 [ 128.045684] 5fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [ 128.054351] 5fe0: 00000000 00000000 00000000 00000000 00000013 00000000 [ 128.061340] Code: bad PC value [ 128.064697] ---[ end trace af066e33c0e14119 ]--- Cc: Signed-off-by: Andreas Kemnade Signed-off-by: Greg Kroah-Hartman commit 11924ba5e671d6caef1516923e2bd8c72929a3fe Author: Jorgen Hansen Date: Fri Sep 21 00:31:05 2018 -0700 VMCI: Resource wildcard match fixed When adding a VMCI resource, the check for an existing entry would ignore that the new entry could be a wildcard. This could result in multiple resource entries that would match a given handle. One disastrous outcome of this is that the refcounting used to ensure that delayed callbacks for VMCI datagrams have run before the datagram is destroyed can be wrong, since the refcount could be increased on the duplicate entry. This in turn leads to a use after free bug. This issue was discovered by Hangbin Liu using KASAN and syzkaller. Fixes: bc63dedb7d46 ("VMCI: resource object implementation") Reported-by: Hangbin Liu Reviewed-by: Adit Ranadive Reviewed-by: Vishnu Dasa Signed-off-by: Jorgen Hansen Signed-off-by: Greg Kroah-Hartman commit 18aded17492088962ef43f00825179598b3e8c58 Author: Theodore Ts'o Date: Tue Oct 2 18:21:19 2018 -0400 ext4: fix EXT4_IOC_SWAP_BOOT The code EXT4_IOC_SWAP_BOOT ioctl hasn't been updated in a while, and it's a bit broken with respect to more modern ext4 kernels, especially metadata checksums. Other problems fixed with this commit: * Don't allow installing a DAX, swap file, or an encrypted file as a boot loader. * Respect the immutable and append-only flags. * Wait until any DIO operations are finished *before* calling truncate_inode_pages(). * Don't swap inode->i_flags, since these flags have nothing to do with the inode blocks --- and it will give the IMA/audit code heartburn when the inode is evicted. Signed-off-by: Theodore Ts'o Cc: stable@kernel.org Reported-by: syzbot+e81ccd4744c6c4f71354@syzkaller.appspotmail.com commit 0f912f9de1179c58eedab0d27ef813ded35990fb Author: Michael Straube Date: Sun Sep 30 21:53:10 2018 +0200 staging: rtl8188eu: fix spelling mistake in comment Fix a spelling mistake reported by checkpatch. Caculate -> Calculate Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit f95268cb047d05e5976b044d3e45378fe85f69fa Author: Michael Straube Date: Sun Sep 30 21:53:09 2018 +0200 staging: rtl8188eu: remove braces from single if statement Remove braces from single line if statement. Reported by checkpatch. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit cea7a2481b25ea34a56707afa09df25db3032490 Author: Michael Straube Date: Sun Sep 30 21:53:08 2018 +0200 staging: rtl8188eu: remove unnecessary parentheses in odm_rtl8188e.c Remove unnecessary parentheses in odm_rtl8188e.c. Reported by checkpatch. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit 44b676a63529b3bc77819f24ba8507152125bc59 Author: Michael Straube Date: Sun Sep 30 21:53:07 2018 +0200 staging: rtl8188eu: add spaces around '+' in fw.c Add spaces around '+' in fw.c to follow kernel coding style. Reported by checkpatch. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit c34344c27437cce2f889a9757966ebb5a174c405 Author: Michael Straube Date: Sun Sep 30 21:53:06 2018 +0200 staging: rtl8188eu: simplify block comment in pwrseq.c Simplify block comment to a single line to clear a checkpatch warning. WARNING: Block comments use * on subsequent lines Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit bf80cee456c712167ecd835e7e5dfc73386c1180 Author: Michael Straube Date: Sun Sep 30 21:53:05 2018 +0200 staging: rtl8188eu: correct block comment in bb_cfg.c Correct block comment to clear a checkpatch warning. WARNING: Block comments should align the * on each line Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit d88eb137efea396e341de3c0d45973cbdd76b891 Author: Michael Straube Date: Sun Sep 30 21:53:04 2018 +0200 staging: rtl8188eu: rename odm_SignalScaleMapping() Rename odm_SignalScaleMapping to avoid CamelCase. odm_SignalScaleMapping -> odm_signal_scale_mapping Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit 2ac9464859592c6ac987355a6683c9c4592ec9d3 Author: Michael Straube Date: Sun Sep 30 21:53:03 2018 +0200 staging: rtl8188eu: rename variable in odm_SignalScaleMapping() Rename variable in odm_SignalScaleMapping() to avoid CamelCase. RetSig -> retsig Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit b8c8d487725e4b20027aaf9b92da45e13267d51b Author: Michael Straube Date: Sun Sep 30 21:53:02 2018 +0200 staging: rtl8188eu: rename parameter of odm_SignalScaleMapping() Rename parameter of odm_SignalScaleMapping() to avoid CamelCase. CurrSig -> currsig Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit af9c463da21ce2cb42e3a459df4d76acf753a676 Author: Michael Straube Date: Sun Sep 30 21:53:01 2018 +0200 staging: rtl8188eu: rename odm_EVMdbToPercentage() Rename odm_EVMdbToPercentage() to avoid CamelCase. odm_EVMdbToPercentage -> odm_evm_db_to_percentage Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit de3bb2872ea93945ae3f95b8dc0315882a7cf13a Author: Michael Straube Date: Sun Sep 30 21:53:00 2018 +0200 staging: rtl8188eu: rename parameter of odm_EVMdbToPercentage() Rename parameter of odm_EVMdbToPercentage() to avoid CamelCase. Value -> value Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit c8a2da5a2c3493a4ee5998001bb22fa179f03676 Author: Michael Straube Date: Sun Sep 30 21:52:59 2018 +0200 staging: rtl8188eu: rename odm_QueryRxPwrPercentage() Rename odm_QueryRxPwrPercentage() to avoid CamelCase. odm_QueryRxPwrPercentage -> odm_query_rxpwrpercentage Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit 5bd4658ff1ebc1182ed04cbb49c101b2ab4e0894 Author: Michael Straube Date: Sun Sep 30 21:52:58 2018 +0200 staging: rtl8188eu: rename parameter of odm_QueryRxPwrPercentage() Rename parameter of odm_QueryRxPwrPercentage() to avoid CamelCase. AntPower -> antpower Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit d80c4b19bcb9d5ac95969bd390f707ba48912c04 Author: Michael Straube Date: Sun Sep 30 21:52:57 2018 +0200 staging: rtl8188eu: replace tabs with spaces in odm_hwconfig.c Replace tabs with spaces in odm_hwconfig.c where appropriate. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit 079be54766638f5f1268206ad063873235bcefdf Author: Michael Straube Date: Sun Sep 30 21:52:56 2018 +0200 staging: rtl8188eu: add spaces around '*' in odm_hwconfig.c Add spaces around '*' in odm_hwconfig.c to follow kernel coding style. Reported by checkpatch. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit 195d62c331c41106f35746ce8a7a6e69eac31eee Author: Michael Straube Date: Sun Sep 30 21:52:55 2018 +0200 staging: rtl8188eu: add spaces around '+' in odm_hwconfig.c Add spaces around '+' in odm_hwconfig.c to follow kernel coding style. Reported by checkpatch. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit e208cc3a606848c2e8c0aa4fb17b2c9b0d675452 Author: Michael Straube Date: Sun Sep 30 21:52:54 2018 +0200 staging: rtl8188eu: remove wrapper odm_SignalScaleMapping() The function odm_SignalScaleMapping() is just a wrapper for odm_SignalScaleMapping_92CSeries(). Rename odm_SignalScaleMapping_92CSeries() to odm_SignalScaleMapping() and remove the wrapper. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit c7a248299a5ec60213df53d99d1650029240af54 Author: Michael Straube Date: Sun Sep 30 21:52:53 2018 +0200 staging: rtl8188eu: rename odm_HWConfig Rename source and header file to avoid CamelCase. odm_HWConfig.c -> odm_hwconfig.c odm_HWConfig.h -> odm_hwconfig.h Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit 859df6aa0d9795f3d556aeb46475f12bbfc35dbc Author: Michael Straube Date: Sun Sep 30 21:52:52 2018 +0200 staging: rtl8188eu: cleanup inconsistent indenting Cleanup all inconsistent indenting reported by smatch. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit e7f8f1df634c093e00a2611230b83150c81b0049 Author: Aymen Qader Date: Sun Sep 30 09:34:21 2018 +0100 staging: ks7010: Remove unnecessary null check Remove the unnecessary socket buffer null check in hostif_data_request. There is already an appropriate null check in the calling function: (ks_wlan_net.c) ks_wlan_start_xmit Signed-off-by: Aymen Qader Signed-off-by: Greg Kroah-Hartman commit 956666342a31dabb6b39e8fbbd9780d49ed2af13 Author: Aymen Qader Date: Sat Sep 29 18:38:07 2018 +0100 staging: sm750fb: Remove extra space character Remove an extra space in ddk750_mode.c to fix indentation Signed-off-by: Aymen Qader Signed-off-by: Greg Kroah-Hartman commit 111961840f922ff957508056f5822cebc961281c Author: Rick Veens Date: Sun Sep 30 20:29:19 2018 +0200 staging: rtlwifi: Removed unused define and code efuse_re_pg* from wifi.h The following: bool efuse_re_pg_sec1flag; u8 efuse_re_pg_data[8]; are not referenced anywhere in the rtlwifi code. Signed-off-by: Rick Veens Signed-off-by: Greg Kroah-Hartman commit a24b420bb30e4baea66f4467fdcdabb456e30993 Author: Alexey Khoroshilov Date: Sat Sep 29 00:25:27 2018 +0300 staging: axis-fifo: add error handling of class_create() Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov Signed-off-by: Greg Kroah-Hartman commit 869d3acd488c282421468b60b5c6ed205c1da1b0 Author: Christian Gromm Date: Fri Sep 28 23:37:19 2018 +0200 staging: most: usb: add release function for DCI device This patch adds the missing release function for the DCI device that frees the container structure it is embedded in. Signed-off-by: Christian Gromm Signed-off-by: Greg Kroah-Hartman commit 7a7e50b36dea2f1f516fa977c561d27dfde37dca Author: Deepa Dinamani Date: Fri Sep 28 18:41:40 2018 -0700 MAINTAINERS: removed staging/ft1000 driver Delete the ft1000 MAINTAINERS entry, concluding the earlier removal of the driver in commit 6512edec48b2 ("staging: ft1000: remove obsolete driver"). Reported-by: Joe Perches Signed-off-by: Deepa Dinamani Signed-off-by: Greg Kroah-Hartman commit 3e15dddeadcbe45adc654d11f38191e76feacd05 Author: Aymen Qader Date: Sat Sep 29 18:24:29 2018 +0100 staging: rtlwifi: Return -ENOMEM instead of -1 Use the ENOMEM constant instead of -1 for kzalloc failure checks in rtl_halmac.c Signed-off-by: Aymen Qader Signed-off-by: Greg Kroah-Hartman commit ee607b8fb54b566c3038c18264d3e8560d66b4ec Author: Nishad Kamdar Date: Mon Oct 1 20:18:31 2018 +0530 staging: mt7621-mmc: Remove unused single statement macros This patch removes unused single statement macros in sd.c Signed-off-by: Nishad Kamdar Signed-off-by: Greg Kroah-Hartman commit afa163e3f86d56eac89ae236c94edeccc63e2873 Author: Nishad Kamdar Date: Mon Oct 1 20:16:05 2018 +0530 staging: mt7621-mmc: Remove single statement macro msdc_irq_restore() This patch removes the macro msdc_irq_restore() and replaces its usage with call to the function called in the macro definition. Issue found by checkpatch. Signed-off-by: Nishad Kamdar Signed-off-by: Greg Kroah-Hartman commit 3268357865d6541f11c2e759525e090f79210793 Author: Greg Kroah-Hartman Date: Tue Oct 2 15:14:14 2018 -0700 staging: dgnc: delete the driver Digi does not support it, no one has hardware for it, and no one is working on it, so let's drop it for now. If anyone wants to pick it back up, then can revert this patch. Reported-by: Lidza Louina Reported-by: Mark Hounschell Signed-off-by: Greg Kroah-Hartman commit f3583dcd4d83803007ed6a8a09e58ee746a4ff99 Author: Sehro Rautenkranz Date: Tue Sep 25 17:41:59 2018 -0600 staging: dgnc: Fix Kconfig help header and text Replace Kconfig help header and text to match other modules. Issue found by checkpatch. Spacing adjusted to match Documentation/process/coding-style.rst. Issue reported by rdunlap@infradead.org. Reported-by: Randy Dunlap Signed-off-by: Sehro Rautenkranz Signed-off-by: Greg Kroah-Hartman commit 07523ee1ac4610f98b41ffd5b393ad632f4c723c Author: Colin Ian King Date: Mon Oct 1 00:10:51 2018 +0100 staging: rtl8723bs: clean up clang warning on extraneous parentheses There are extraneous parantheses that are causing clang to produce a warning so remove these. Clean up 3 clang warnings: equality comparison with extraneous parentheses [-Wparentheses-equality] Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman commit cbe5d64f429bc6e4ac24d8b22782a1f5378dde04 Author: Dafna Hirschfeld Date: Sat Sep 29 18:55:08 2018 +0300 staging: rtl8712: Remove unnecessary parentheses Remove unnecessary parentheses between 'address-of' operators and struct members. Issues found with checkpatch.pl Signed-off-by: Dafna Hirschfeld Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman commit e6d093719e22a09e778edde192dfd89a0cd77b5c Author: Nathan Chancellor Date: Wed Sep 26 16:20:55 2018 -0700 staging: rtl8723bs: Mark ACPI table declaration as used Clang emits the following warning: drivers/staging/rtl8723bs/os_dep/sdio_intf.c:25:36: warning: variable 'acpi_ids' is not needed and will not be emitted [-Wunneeded-internal-declaration] static const struct acpi_device_id acpi_ids[] = { ^ 1 warning generated. Mark acpi_ids with the attribute __used, which makes it clear to Clang that we don't want this warning while not inhibiting Clang's dead code elimination from removing the unreferenced internal symbol when moving the data to the globally available symbol with MODULE_DEVICE_TABLE. $ nm -S drivers/staging/rtl8723bs/os_dep/sdio_intf.o | grep acpi 0000000000000000 0000000000000040 R __mod_acpi__acpi_ids_device_table Link: https://github.com/ClangBuiltLinux/linux/issues/169 Suggested-by: Nick Desaulniers Signed-off-by: Nathan Chancellor Signed-off-by: Greg Kroah-Hartman commit 7b6e286c397f88b064b30d4ce020024e18dc55a7 Author: Dafna Hirschfeld Date: Sun Sep 30 22:04:04 2018 +0300 staging: mt7621-mmc: replace `printk` with preferred API Replace calls to `printk` with `dev_info` and `pr_err` Issues found with checkpatch.pl Signed-off-by: Dafna Hirschfeld Signed-off-by: Greg Kroah-Hartman commit ffa8ed13d9a55e7186324817a732722bf9c275dc Author: Dafna Hirschfeld Date: Sun Sep 30 22:04:03 2018 +0300 staging: mt7621-mmc: Fix comparison to NULL Replace comparisons of a variable 'x' to NULL with either 'x' or '!x'. Issues found with checkpatch.pl Signed-off-by: Dafna Hirschfeld Signed-off-by: Greg Kroah-Hartman commit f259e47af3ed47a39c36bb8cb17ba2f4ab4803f4 Author: Dafna Hirschfeld Date: Sun Sep 30 22:04:02 2018 +0300 staging: mt7621-mmc: remove unnecessary braces from 'if' statements Remove unnecessary braces from one line 'if' statements. Issues found with checkpatch.pl Signed-off-by: Dafna Hirschfeld Signed-off-by: Greg Kroah-Hartman commit 4f475e8e0a6d4f5d430350d1f74f7e4899fb1692 Author: Jon Derrick Date: Fri Sep 7 13:22:30 2018 -0600 x86/PCI: Apply VMD's AERSID fixup generically A root port Device ID changed between simulation and production. Rather than match Device IDs which may not be future-proof if left unmaintained, match all root ports which exist in a VMD domain. Signed-off-by: Jon Derrick Signed-off-by: Bjorn Helgaas commit 62b36c3ea664b34004b9d29bf541b6c6ce30e33c Author: Oza Pawandeep Date: Fri Sep 28 13:00:56 2018 -0500 PCI/AER: Remove pci_cleanup_aer_uncorrect_error_status() calls After bfcb79fca19d ("PCI/ERR: Run error recovery callbacks for all affected devices"), AER errors are always cleared by the PCI core and drivers don't need to do it themselves. Remove calls to pci_cleanup_aer_uncorrect_error_status() from device driver error recovery functions. Signed-off-by: Oza Pawandeep [bhelgaas: changelog, remove PCI core changes, remove unused variables] Signed-off-by: Bjorn Helgaas commit 74171e9dab62bd9ab616c1a8f9f1c13af71f4f5d Author: YueHaibing Date: Thu Sep 27 06:52:21 2018 +0000 PCI: pnv_php: Use kmemdup() Use kmemdup() rather than duplicating its implementation. Signed-off-by: YueHaibing Signed-off-by: Bjorn Helgaas Acked-by: Michael Ellerman commit 37f1c5868e457386950e7e27212bfdcd9f77f302 Author: YueHaibing Date: Wed Sep 26 11:06:02 2018 +0000 PCI: cpqphp: Remove set but not used variable 'physical_slot' Fixes gcc '-Wunused-but-set-variable' warning: drivers/pci/hotplug/cpqphp_core.c: In function 'init_SERR': drivers/pci/hotplug/cpqphp_core.c:124:5: warning: variable 'physical_slot' set but not used [-Wunused-but-set-variable] Signed-off-by: YueHaibing Signed-off-by: Bjorn Helgaas commit 479e01a402f006746324a04a72bd949ceca5e73d Author: YueHaibing Date: Wed Sep 26 11:00:10 2018 +0000 PCI/ERR: Remove duplicated include from err.c Remove duplicated include. Signed-off-by: YueHaibing Signed-off-by: Bjorn Helgaas commit de3ffa301142bf8802a7b0de17f9985acde5c223 Author: Jon Derrick Date: Tue Sep 25 12:39:06 2018 -0600 PCI: Equalize hotplug memory and io for occupied and empty slots Currently, a hotplug bridge will be given hpmemsize additional memory and hpiosize additional io if available, in order to satisfy any future hotplug allocation requirements. These calculations don't consider the current memory/io size of the hotplug bridge/slot, so hotplug bridges/slots which have downstream devices will be allocated their current allocation in addition to the hpmemsize value. This makes for possibly undesirable results with a mix of unoccupied and occupied slots (ex, with hpmemsize=2M): 02:03.0 PCI bridge: <-- Occupied Memory behind bridge: d6200000-d64fffff [size=3M] 02:04.0 PCI bridge: <-- Unoccupied Memory behind bridge: d6500000-d66fffff [size=2M] This change considers the current allocation size when using the hpmemsize/hpiosize parameters to make the reservations predictable for the mix of unoccupied and occupied slots: 02:03.0 PCI bridge: <-- Occupied Memory behind bridge: d6200000-d63fffff [size=2M] 02:04.0 PCI bridge: <-- Unoccupied Memory behind bridge: d6400000-d65fffff [size=2M] Signed-off-by: Jon Derrick Signed-off-by: Bjorn Helgaas commit 26ad34d510a87fc65caeb48fa85cce58d2477a88 Author: Mika Westerberg Date: Thu Sep 27 16:57:14 2018 -0500 PCI / ACPI: Whitelist D3 for more PCIe hotplug ports In order to have better power management for Thunderbolt PCIe chains, Windows enables power management for native PCIe hotplug ports if there is the following ACPI _DSD attached to the root port: Name (_DSD, Package () { ToUUID ("6211e2c0-58a3-4af3-90e1-927a4e0c55a4"), Package () { Package () {"HotPlugSupportInD3", 1} } }) This is also documented in: https://docs.microsoft.com/en-us/windows-hardware/drivers/pci/dsd-for-pcie-root-ports#identifying-pcie-root-ports-supporting-hot-plug-in-d3 Do the same in Linux by introducing new firmware PM callback (->bridge_d3()) and then implement it for ACPI based systems so that the above property is checked. There is one catch, though. The initial pci_dev->bridge_d3 is set before the root port has ACPI companion bound (the device is not added to the PCI bus either) so we need to look up the ACPI companion manually in that case in acpi_pci_bridge_d3(). Signed-off-by: Mika Westerberg Signed-off-by: Bjorn Helgaas Reviewed-by: Rafael J. Wysocki commit 5f5e4890d57a8af5da72c9d73a4efa9bad43a7a3 Author: Mika Westerberg Date: Thu Sep 27 16:57:05 2018 -0500 ACPI / property: Allow multiple property compatible _DSD entries It is possible to have _DSD entries where the data is compatible with device properties format but are using different GUID for various reasons. In addition to that there can be many such _DSD entries for a single device such as for PCIe root port used to host a Thunderbolt hierarchy: Scope (\_SB.PCI0.RP21) { Name (_DSD, Package () { ToUUID ("6211e2c0-58a3-4af3-90e1-927a4e0c55a4"), Package () { Package () {"HotPlugSupportInD3", 1} }, ToUUID ("efcc06cc-73ac-4bc3-bff0-76143807c389"), Package () { Package () {"ExternalFacingPort", 1}, Package () {"UID", 0 } } }) } More information about these new _DSD entries can be found in: https://docs.microsoft.com/en-us/windows-hardware/drivers/pci/dsd-for-pcie-root-ports To make these available for drivers via unified device property APIs, modify ACPI property core so that it supports multiple _DSD entries organized in a linked list. We also store GUID of each _DSD entry in struct acpi_device_properties in case there is need to differentiate between entries. The supported GUIDs are then listed in prp_guids array. Signed-off-by: Mika Westerberg Signed-off-by: Bjorn Helgaas Reviewed-by: Rafael J. Wysocki Acked-by: Sakari Ailus commit 0e157e52860441cb26051f131dd0b5ae3187a07b Author: Mika Westerberg Date: Thu Sep 27 16:56:49 2018 -0500 PCI/PME: Implement runtime PM callbacks Basically we need to do the same steps than what we do when system sleep is entered and disable PME interrupt when the root port is runtime suspended. This prevents spurious wakeups immediately when the port is transitioned into D3cold. Signed-off-by: Mika Westerberg Signed-off-by: Bjorn Helgaas Reviewed-by: Rafael J. Wysocki commit 9c62f0bfb83260cb2469eb84d3185c9728e36900 Author: Mika Westerberg Date: Thu Sep 27 16:41:49 2018 -0500 PCI: pciehp: Implement runtime PM callbacks Basically we need to do the same thing when runtime suspending than with system sleep so re-use those operations here. This makes sure hotplug interrupt does not trigger immediately when the link goes down. Signed-off-by: Mika Westerberg Signed-off-by: Bjorn Helgaas Reviewed-by: Rafael J. Wysocki commit 94c7993fb5bd1e3c20f67a2d24ba05bbdc938340 Author: Mika Westerberg Date: Thu Sep 27 16:41:48 2018 -0500 PCI/portdrv: Add runtime PM hooks for port service drivers When PCIe port is runtime suspended/resumed some extra steps might be needed to be executed from the port service driver side. For instance we may need to disable PCIe hotplug interrupt to prevent it from triggering immediately when PCIe link to the downstream component goes down. To make the above possible add optional ->runtime_suspend() and ->runtime_resume() callbacks to struct pcie_port_service_driver and call them for each port service in runtime suspend/resume callbacks of portdrv. Signed-off-by: Mika Westerberg [bhelgaas: adjust "slot->state" for 5790a9c78e78 ("PCI: pciehp: Unify controller and slot structs")] Signed-off-by: Bjorn Helgaas Reviewed-by: Rafael J. Wysocki commit 52be9464aa7edeeda35f7faecb162412ddb47e94 Author: Mika Westerberg Date: Thu Sep 27 16:41:47 2018 -0500 PCI/portdrv: Resume upon exit from system suspend if left runtime suspended Currently we try to keep PCIe ports runtime suspended over system suspend if possible. This mostly happens when entering suspend-to-idle because there is no need to re-configure wake settings. This causes problems if the parent port goes into D3cold and it gets resumed upon exit from system suspend. This may happen for example if the port is part of PCIe switch and the same switch is connected to a PCIe endpoint that needs to be resumed. The way exit from D3cold works according PCIe 4.0 spec 5.3.1.4.2 is that power is restored and cold reset is signaled. After this the device is in D0unitialized state keeping PME context if it supports wake from D3cold. The problem occurs when a PCIe hotplug port is left suspended and the parent port goes into D3cold and back to D0: the port keeps its PME context but since everything else is reset back to defaults (D0unitialized) it is not set to detect hotplug events anymore. For this reason change the PCIe portdrv power management logic so that it is fine to keep the port runtime suspended over system suspend but it needs to be resumed upon exit to make sure it gets properly re-initialized. Signed-off-by: Mika Westerberg Signed-off-by: Bjorn Helgaas commit 720d6a671a6e2cf2b9ed032279b7c21c122bed7e Author: Mika Westerberg Date: Thu Sep 27 16:41:46 2018 -0500 PCI: pciehp: Do not handle events if interrupts are masked PCIe native hotplug shares MSI vector with native PME so the interrupt handler might get called even the hotplug interrupt is masked. In that case we should not handle any events because the interrupt was not meant for us. Modify the PCIe hotplug interrupt handler to check this accordingly and bail out if it finds out that the interrupt was not about hotplug. Signed-off-by: Mika Westerberg Signed-off-by: Bjorn Helgaas Reviewed-by: Lukas Wunner commit eb34da60edee8cf7bac691a406a1ddaa4175e5bc Author: Mika Westerberg Date: Thu Sep 27 16:38:19 2018 -0500 PCI: pciehp: Disable hotplug interrupt during suspend When PCIe hotplug port is transitioned into D3hot, the link to the downstream component will go down. If hotplug interrupt generation is enabled when that happens, it will trigger immediately, waking up the system and bringing the link back up. To prevent this, disable hotplug interrupt generation when system suspend is entered. This does not prevent wakeup from low power states according to PCIe 4.0 spec section 6.7.3.4: Software enables a hot-plug event to generate a wakeup event by enabling software notification of the event as described in Section 6.7.3.1. Note that in order for software to disable interrupt generation while keeping wakeup generation enabled, the Hot-Plug Interrupt Enable bit must be cleared. So as long as we have set the slot event mask accordingly, wakeup should work even if slot interrupt is disabled. The port should trigger wake and then send PME to the root port when the PCIe hierarchy is brought back up. Limit this to systems using native PME mechanism to make sure older Apple systems depending on commit e3354628c376 ("PCI: pciehp: Support interrupts sent from D3hot") still continue working. Signed-off-by: Mika Westerberg Signed-off-by: Bjorn Helgaas Reviewed-by: Rafael J. Wysocki commit 6299cf9ec3985cac70bede8a855b5087b81a6640 Author: Mika Westerberg Date: Thu Sep 27 16:54:13 2018 -0500 PCI / ACPI: Enable wake automatically for power managed bridges We enable power management automatically for bridges where pci_bridge_d3_possible() returns true. However, these bridges may have ACPI methods such as _DSW that need to be called before D3 entry. For example in Lenovo Thinkpad X1 Carbon 6th _DSW method is used to prepare D3cold for the PCIe root port hosting Thunderbolt chain. Because wake is not enabled _DSW method is never called and the port does not enter D3cold properly consuming more power than necessary. Users can work this around by writing "enabled" to "wakeup" sysfs file under the device in question but that is not something an ordinary user is expected to do. Since we already automatically enable power management for PCIe ports with ->bridge_d3 set extend that to enable wake for them as well, assuming the port has any ACPI wakeup related objects implemented in the namespace (adev->wakeup.flags.valid is true). This ensures the necessary ACPI methods get called at appropriate times and allows the root port in Thinkpad X1 Carbon 6th to go into D3cold. Signed-off-by: Mika Westerberg Signed-off-by: Bjorn Helgaas Reviewed-by: Rafael J. Wysocki commit ac86e8eeb0542d1089d8cba55884eeeb9410f027 Author: Mika Westerberg Date: Thu Sep 27 16:53:53 2018 -0500 PCI: Do not skip power-managed bridges in pci_enable_wake() Commit baecc470d5fd ("PCI / PM: Skip bridges in pci_enable_wake()") changed pci_enable_wake() so that all bridges are skipped when wakeup is enabled (or disabled) with the reasoning that bridges can only signal wakeup on behalf of their subordinate devices. However, there are bridges that can signal wakeup themselves. For example PCIe downstream and root ports supporting hotplug may signal wakeup upon hotplug event. For this reason change pci_enable_wake() so that it skips all bridges except those that we power manage (->bridge_d3 is set). Those are the ones that can go into low power states and may need to signal wakeup. Signed-off-by: Mika Westerberg Signed-off-by: Bjorn Helgaas Reviewed-by: Rafael J. Wysocki commit f0157160b359b1d263ee9d4e0a435a7ad85bbcea Author: Keith Busch Date: Thu Sep 20 10:27:17 2018 -0600 PCI: Make link active reporting detection generic The spec has timing requirements when waiting for a link to become active after a conventional reset. Implement those hard delays when waiting for an active link so pciehp and dpc drivers don't need to duplicate this. For devices that don't support data link layer active reporting, wait the fixed time recommended by the PCIe spec. Signed-off-by: Keith Busch [bhelgaas: changelog] Signed-off-by: Bjorn Helgaas Reviewed-by: Sinan Kaya commit a6bd101b8f84f9b98768e9ab1e418c239e2e669f Author: Keith Busch Date: Thu Sep 20 10:27:16 2018 -0600 PCI: Unify device inaccessible Bring surprise removals and permanent failures together so we no longer need separate flags. The implementation enforces that error handling will not be able to override a surprise removal's permanent channel failure. Signed-off-by: Keith Busch Signed-off-by: Bjorn Helgaas Reviewed-by: Sinan Kaya commit 7b42d97e99d3a2babffd1b3456ded08b54981538 Author: Keith Busch Date: Thu Sep 20 10:27:15 2018 -0600 PCI/ERR: Always report current recovery status for udev A device still participates in error recovery even if it doesn't have the error callbacks. Always provide the status for user event watchers. Signed-off-by: Keith Busch Signed-off-by: Bjorn Helgaas Reviewed-by: Sinan Kaya commit 542aeb9c8f930e4099432cb0bec17b92c0175e08 Author: Keith Busch Date: Thu Sep 20 10:27:14 2018 -0600 PCI/ERR: Simplify broadcast callouts There is no point in having a generic broadcast function if it needs to have special cases for each callback it broadcasts. Abstract the error broadcast to only the necessary information and removes the now unnecessary helper to walk the bus. Signed-off-by: Keith Busch Signed-off-by: Bjorn Helgaas Reviewed-by: Sinan Kaya commit aad2d4952d24d8910d9fc64da9107df0fb780a09 Author: Dai Okamura Date: Fri Sep 28 11:05:09 2018 +0900 serial: 8250_uniphier: add auto-flow-control support Add selective auto-flow-control support for UniPhier serial driver. Signed-off-by: Dai Okamura Signed-off-by: Masahiro Yamada Reviewed-by: Rob Herring Signed-off-by: Greg Kroah-Hartman commit aca70d19c8e56a871e9a68c9b6b940656666b56a Author: Masahiro Yamada Date: Fri Sep 28 11:05:08 2018 +0900 serial: 8250_uniphier: flatten probe function Currently, the DT-related settings are split out to uniphier_of_serial_setup(), but it turned out to be not nice. The next commit will add a DT property, but it will not fit in the helper. Merge the helper into the probe function. Signed-off-by: Masahiro Yamada Signed-off-by: Greg Kroah-Hartman commit 2fd8e454189d580bcfc198fee60e51655945b986 Author: Masahiro Yamada Date: Fri Sep 28 11:05:07 2018 +0900 serial: 8250_uniphier: remove unused "fifo-size" property The FIFO size of the UART devices is 64 on almost all UniPhier SoCs with the exception Pro4TV SoC (MN2WS0235), which used 128 FIFO size. However, Pro4TV SoC was never upstreamed, and out of production. So, this property has never been used in a useful way. Let's remove old unused code. Signed-off-by: Masahiro Yamada Reviewed-by: Rob Herring Signed-off-by: Greg Kroah-Hartman commit 9e3eb4eabdb6f652ca8a99f58f3eccf29610839d Author: Biju Das Date: Fri Sep 21 15:45:54 2018 +0100 dt-bindings: serial: sh-sci: Document r8a7744 bindings RZ/G1N (R8A7744) SoC also has the R-Car gen2 compatible SCIF, SCIFA, SCIFB, and HSCIF ports, so document the SoC specific bindings. Signed-off-by: Biju Das Reviewed-by: Fabrizio Castro Reviewed-by: Simon Horman Reviewed-by: Geert Uytterhoeven Signed-off-by: Greg Kroah-Hartman commit 823f4e53f0f2beef4ae43b0a8b33e27b0761b840 Author: Wei Yongjun Date: Tue Sep 25 14:23:21 2018 +0000 serial: uartps: Fix missing unlock on error in cdns_get_id() Add the missing unlock before return from function cdns_get_id() in the error handling case. Fixes: ae1cca3fa347 ("serial: uartps: Change uart ID port allocation") Signed-off-by: Wei Yongjun Reviewed-by: Michal Simek Signed-off-by: Greg Kroah-Hartman commit 377fedd1866ae3979e4fe36193475b8acbc82784 Author: Nicolas Ferre Date: Wed Sep 26 14:58:48 2018 +0200 tty/serial: atmel: add ISO7816 support When mode is set in atmel_config_iso7816() we backup last RS232 mode for coming back to this mode if requested. Also allow setup of T=0 and T=1 parameter and basic support in set_termios function as well. Signed-off-by: Nicolas Ferre [ludovic.desroches@microchip.com: rebase, add check on fidi ratio, checkpatch fixes] Signed-off-by: Ludovic Desroches Acked-by: Richard Genoud Signed-off-by: Greg Kroah-Hartman commit ad8c0eaa0a418ae8ef3f9217638bb86439399eac Author: Nicolas Ferre Date: Wed Sep 26 14:58:47 2018 +0200 tty/serial_core: add ISO7816 infrastructure Add the ISO7816 ioctl and associated accessors and data structure. Drivers can then use this common implementation to handle ISO7816 (smart cards). Signed-off-by: Nicolas Ferre [ludovic.desroches@microchip.com: squash and rebase, removal of gpios, checkpatch fixes] Signed-off-by: Ludovic Desroches Signed-off-by: Greg Kroah-Hartman commit c550f01c810f2197c98e6e3103f81797f5e063be Author: Steve Sakoman Date: Thu Sep 20 09:20:34 2018 -1000 serial:serial_core: Allow use of CTS for PPS line discipline Add a "pps_4wire" file to serial ports in sysfs in case the kernel is configured with CONFIG_PPS_CLIENT_LDISC. Writing 1 to the file enables the use of CTS instead of DCD for PPS signal input. This is necessary in case a serial port is not completely wired. Though this affects PPS processing the patch is against the serial core as the source of the serial port PPS event dispatching has to be modified. Furthermore it should be possible to modify the source of serial port PPS event dispatching before changing the line discipline. Signed-off-by: Andreas Steinmetz Signed-off-by: Steve Sakoman Tested-by: Steve Sakoman Tested-by: Eric Gallimore Signed-off-by: Greg Kroah-Hartman commit aadc5a94483b138c8d9ade6e8416b089733a34dd Author: Chuck Lever Date: Mon Oct 1 14:25:57 2018 -0400 xprtrdma: Eliminate "connstate" variable from rpcrdma_conn_upcall() Clean up. Since commit 173b8f49b3af ("xprtrdma: Demote "connect" log messages") there has been no need to initialize connstat to zero. In fact, in this code path there's now no reason not to set rep_connected directly. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit ed97f1f79be9868692d115a72c379900231efeb5 Author: Chuck Lever Date: Mon Oct 1 14:25:52 2018 -0400 xprtrdma: Conventional variable names in rpcrdma_conn_upcall Clean up: The convention throughout other parts of xprtrdma is to name variables of type struct rpcrdma_xprt "r_xprt", not "xprt". This convention enables the use of the name "xprt" for a "struct rpc_xprt" type variable, as in other parts of the RPC client. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit ae38288eb73c52e45917fe7d05d34b84a14a7930 Author: Chuck Lever Date: Mon Oct 1 14:25:47 2018 -0400 xprtrdma: Rename rpcrdma_conn_upcall Clean up: Use a function name that is consistent with the RDMA core API and with other consumers. Because this is a function that is invoked from outside the rpcrdma.ko module, add an appropriate documenting comment. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit 8440a886112b46a8b402679dca9d8b5662a0d73e Author: Chuck Lever Date: Mon Oct 1 14:25:41 2018 -0400 sunrpc: Report connect_time in seconds The way connection-oriented transports report connect_time is wrong: it's supposed to be in seconds, not in jiffies. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit 3968a8a5310404c2f0b9e4d9f28cab13a12bc4fd Author: Chuck Lever Date: Mon Oct 1 14:25:36 2018 -0400 sunrpc: Fix connect metrics For TCP, the logic in xprt_connect_status is currently never invoked to record a successful connection. Commit 2a4919919a97 ("SUNRPC: Return EAGAIN instead of ENOTCONN when waking up xprt->pending") changed the way TCP xprt's are awoken after a connect succeeds. Instead, change connection-oriented transports to bump connect_count and compute connect_time the moment that XPRT_CONNECTED is set. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit d379eaa838f1813ca906b946ad3cbb77781d2be7 Author: Chuck Lever Date: Mon Oct 1 14:25:30 2018 -0400 xprtrdma: Name MR trace events consistently Clean up the names of trace events related to MRs so that it's easy to enable these with a glob. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit 2f149e6e14bcb5e581e49307b54aafcd6f74a74f Author: Nishanth Menon Date: Mon Aug 27 19:50:56 2018 -0500 clk: keystone: Enable TISCI clocks if K3_ARCH K3_ARCH uses TISCI for clocks as well. Enable the same for the driver support. Signed-off-by: Nishanth Menon Acked-by: Santosh Shilimkar Signed-off-by: Stephen Boyd commit 61da886bf74e738995d359fa14d77f72d14cfb87 Author: Chuck Lever Date: Mon Oct 1 14:25:25 2018 -0400 xprtrdma: Explicitly resetting MRs is no longer necessary When a memory operation fails, the MR's driver state might not match its hardware state. The only reliable recourse is to dereg the MR. This is done in ->ro_recover_mr, which then attempts to allocate a fresh MR to replace the released MR. Since commit e2ac236c0b651 ("xprtrdma: Allocate MRs on demand"), xprtrdma dynamically allocates MRs. It can add more MRs whenever they are needed. That makes it possible to simply release an MR when a memory operation fails, instead of "recovering" it. It will automatically be replaced by the on-demand MR allocator. This commit is a little larger than I wanted, but it replaces ->ro_recover_mr, rb_recovery_lock, rb_recovery_worker, and the rb_stale_mrs list with a generic work queue. Since MRs are no longer orphaned, the mrs_orphaned metric is no longer used. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit c421ece68f6952d4cc48ee81ebfc61ef0b83ad3b Author: Chuck Lever Date: Mon Oct 1 14:25:20 2018 -0400 xprtrdma: Create more MRs at a time Some devices require more than 3 MRs to build a single 1MB I/O. Ensure that rpcrdma_mrs_create() will add enough MRs to build that I/O. In a subsequent patch I'm changing the MR recovery logic to just toss out the MRs. In that case it's possible for ->send_request to loop acquiring some MRs, not getting enough, getting called again, recycling the previous MRs, then not getting enough, lather rinse repeat. Thus first we need to ensure enough MRs are created to prevent that loop. I'm "reusing" ia->ri_max_segs. All of its accessors seem to want the maximum number of data segments plus two, so I'm going to bake that into the initial calculation. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit ef739b2175dde9c05594f768cb78149f1ce2ac36 Author: Chuck Lever Date: Mon Oct 1 14:25:14 2018 -0400 xprtrdma: Reset credit grant properly after a disconnect On a fresh connection, an RPC/RDMA client is supposed to send only one RPC Call until it gets a credit grant in the first RPC Reply from the server [RFC 8166, Section 3.3.3]. There is a bug in the Linux client's credit accounting mechanism introduced by commit e7ce710a8802 ("xprtrdma: Avoid deadlock when credit window is reset"). On connect, it simply dumps all pending RPC Calls onto the new connection. Servers have been tolerant of this bad behavior. Currently no server implementation ever changes its credit grant over reconnects, and servers always repost enough Receives before connections are fully established. To correct this issue, ensure that the client resets both the credit grant _and_ the congestion window when handling a reconnect. Fixes: e7ce710a8802 ("xprtrdma: Avoid deadlock when credit ... ") Signed-off-by: Chuck Lever Cc: stable@kernel.org Signed-off-by: Anna Schumaker commit 91ca18660e195df426522b29190940abb3010425 Author: Chuck Lever Date: Mon Oct 1 14:25:09 2018 -0400 xprtrdma: xprt_release_rqst_cong is called outside of transport_lock Since commit ce7c252a8c74 ("SUNRPC: Add a separate spinlock to protect the RPC request receive list") the RPC/RDMA reply handler has been calling xprt_release_rqst_cong without holding xprt->transport_lock. I think the only way this call is ever made is if the credit grant increases and there are RPCs pending. Current server implementations do not change their credit grant during operation (except at connect time). Commit e7ce710a8802 ("xprtrdma: Avoid deadlock when credit window is reset") added the ->release_rqst call because UDP invokes xprt_adjust_cwnd(), which calls __xprt_put_cong() after adjusting xprt->cwnd. Both xprt_release() and ->xprt_release_xprt already wake another task in this case, so it is safe to remove this call from the reply handler. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit 3c168909002eac649fb8b803d6a9babe758ec7c2 Author: Colin Ian King Date: Sat Sep 29 12:43:13 2018 +0100 usb: gadget: fix spelling mistakeis "[En]queing" -> "[En]queuing" Trivial fix to spelling mistakes in debug warning messages Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman commit 8e4657c60c2bbb9918b33e226458cce3e5fa1d8c Author: YueHaibing Date: Sat Sep 29 09:53:16 2018 +0000 usb: typec: remove set but not used variables 'snk_ma, min_mv' Fixes gcc '-Wunused-but-set-variable' warning: drivers/usb/typec/tcpm/tcpm.c: In function 'tcpm_pd_select_pps_apdo': drivers/usb/typec/tcpm/tcpm.c:2212:39: warning: variable 'snk_ma' set but not used [-Wunused-but-set-variable] drivers/usb/typec/tcpm/tcpm.c: In function 'tcpm_pd_build_pps_request': drivers/usb/typec/tcpm/tcpm.c:2405:37: warning: variable 'min_mv' set but not used [-Wunused-but-set-variable] Signed-off-by: YueHaibing Reviewed-by: Guenter Roeck Signed-off-by: Greg Kroah-Hartman commit 355c74e55e9992126ec5e568a3edb8e280fe040d Author: Bjørn Mork Date: Fri Sep 28 15:40:31 2018 +0200 usb: export firmware port location in sysfs The platform firmware "location" data is used to find port peer relationships. But firmware is an unreliable source, and there are real world examples of errors leading to missing or wrong peer relationships. Debugging this is currently hard. Exporting the location attribute makes it easier to spot mismatches between the firmware data and the real world. Signed-off-by: Bjørn Mork Signed-off-by: Greg Kroah-Hartman commit bd0e6c9614b95352eb31d0207df16dc156c527fa Author: Zeng Tao Date: Fri Sep 28 19:27:52 2018 +0800 usb: hub: try old enumeration scheme first for high speed devices The new scheme is required just to support legacy low and full-speed devices. For high speed devices, it will slower the enumeration speed. So in this patch we try the "old" enumeration scheme first for high speed devices, and this is what Windows does since Windows 8. Signed-off-by: Zeng Tao Acked-by: Alan Stern Reviewed-by: Roger Quadros Signed-off-by: Greg Kroah-Hartman commit 2cfe8f864d0e2504dc2f68f0b04668d877f7c7b4 Author: Biju Das Date: Thu Sep 27 14:42:38 2018 +0100 dt-bindings: usb-xhci: Document r8a7744 support Document r8a7744 xhci support. The driver will use the fallback compatible string "renesas,rcar-gen2-xhci", therefore no driver change is needed. Signed-off-by: Biju Das Reviewed-by: Chris Paterson Reviewed-by: Simon Horman Signed-off-by: Greg Kroah-Hartman commit 77d3bf9391d40234cc764316e1d18aab6ad788d9 Author: Biju Das Date: Thu Sep 27 14:01:16 2018 +0100 dt-bindings: usb: renesas_usbhs: Add support for r8a7744 Document support for RZ/G1N (R8A7744) SoC. Signed-off-by: Biju Das Reviewed-by: Chris Paterson Reviewed-by: Simon Horman Signed-off-by: Greg Kroah-Hartman commit 1b6af2f58c2b1522e0804b150ca95e50a9e80ea7 Author: Adam Thomson Date: Fri Sep 21 16:04:11 2018 +0100 usb: typec: tcpm: Fix APDO PPS order checking to be based on voltage Current code mistakenly checks against max current to determine order but this should be max voltage. This commit fixes the issue so order is correctly determined, thus avoiding failure based on a higher voltage PPS APDO having a lower maximum current output, which is actually valid. Fixes: 2eadc33f40d4 ("typec: tcpm: Add core support for sink side PPS") Cc: Signed-off-by: Adam Thomson Reviewed-by: Heikki Krogerus Reviewed-by: Guenter Roeck Signed-off-by: Greg Kroah-Hartman commit e0a2e73e501c77037c8756137e87b12c7c3c9793 Author: Maciej Żenczykowski Date: Thu Sep 20 13:29:42 2018 -0700 usbip: fix vhci_hcd controller counting Without this usbip fails on a machine with devices that lexicographically come after vhci_hcd. ie. $ ls -l /sys/devices/platform ... drwxr-xr-x. 4 root root 0 Sep 19 16:21 serial8250 -rw-r--r--. 1 root root 4096 Sep 19 23:50 uevent drwxr-xr-x. 6 root root 0 Sep 20 13:15 vhci_hcd.0 drwxr-xr-x. 4 root root 0 Sep 19 16:22 w83627hf.656 Because it detects 'w83627hf.656' as another vhci_hcd controller, and then fails to be able to talk to it. Note: this doesn't actually fix usbip's support for multiple controllers... that's still broken for other reasons ("vhci_hcd.0" is hardcoded in a string macro), but is enough to actually make it work on the above machine. See also: https://bugzilla.redhat.com/show_bug.cgi?id=1631148 Cc: Jonathan Dieter Cc: Valentina Manea Cc: Shuah Khan Cc: linux-usb@vger.kernel.org Signed-off-by: Maciej Żenczykowski Acked-by: Shuah Khan (Samsung OSG) Tested-by: Jonathan Dieter Signed-off-by: Greg Kroah-Hartman commit d2266bbfa9e3e32e3b642965088ca461bd24a94f Author: Feng Tang Date: Wed Oct 3 00:49:21 2018 +0800 x86/earlyprintk: Add a force option for pciserial device The "pciserial" earlyprintk variant helps much on many modern x86 platforms, but unfortunately there are still some platforms with PCI UART devices which have the wrong PCI class code. In that case, the current class code check does not allow for them to be used for logging. Add a sub-option "force" which overrides the class code check and thus the use of such device can be enforced. [ bp: massage formulations. ] Suggested-by: Borislav Petkov Signed-off-by: Feng Tang Signed-off-by: Borislav Petkov Cc: "H. Peter Anvin" Cc: "Stuart R . Anderson" Cc: Bjorn Helgaas Cc: David Rientjes Cc: Feng Tang Cc: Frederic Weisbecker Cc: Greg Kroah-Hartman Cc: H Peter Anvin Cc: Ingo Molnar Cc: Jiri Kosina Cc: Jonathan Corbet Cc: Kai-Heng Feng Cc: Kate Stewart Cc: Konrad Rzeszutek Wilk Cc: Peter Zijlstra Cc: Philippe Ombredanne Cc: Thomas Gleixner Cc: Thymo van Beers Cc: alan@linux.intel.com Cc: linux-doc@vger.kernel.org Link: http://lkml.kernel.org/r/20181002164921.25833-1-feng.tang@intel.com commit d793fb46822ff7408a1767313ef6b12e811baa55 Merge: d5486377b8c5 08b0109eea36 Author: David S. Miller Date: Tue Oct 2 11:46:29 2018 -0700 Merge tag 'wireless-drivers-next-for-davem-2018-10-02' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next Kalle Valo says: ==================== wireless-drivers-next patches for 4.20 First set of new features for 4.20. mt76 driver is going through major refactoring and that's why there are so many mt76 patches. iwlwifi is also under heavy development and smaller changes to other drivers. Also wireless-drivers was merged to fix a conflict between the two trees. Major changes: ath10k * limit available channels via DT ieee80211-freq-limit wil6210 * add 802.11r Fast Roaming support for AP and station modes * add support for channel 4 iwlwifi * new FW API handling * some improvements in the PCI recovery mechanism * enable a new scanning feature; * continued work on HE (mostly radiotap) * TKIP implementation in new devices * work continues for new 22560 hardware mt76 * add support for Alfa AWUS036ACM * lots of refactoring to make it easier to add new hardware support * prepare for adding mt76x0e (pci-e variant) support * add CONFIG_MT76x0E kconfig symbol brcmfmac * add support CYW89342 mini-PCIe device * add 4-way handshake offload detection for FT-802.1X * enable NL80211_EXT_FEATURE_CQM_RSSI_LIST * fix for proper support of 160MHz bandwidth rtl8xxxu * add rtl8188ctv support ==================== Signed-off-by: David S. Miller commit d5486377b8c526e4f373ec0506c4c5398c99082e Merge: dd0bb7f902e6 81b23589f483 Author: David S. Miller Date: Tue Oct 2 11:39:09 2018 -0700 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-10-02 This series contains updates to ice driver only. Anirudh expands the use of VSI handles across the rest of the driver, which includes refactoring the code to correctly use VSI handles. After a reset, ensure that all configurations for a VSI get re-applied before moving on to rebuilding the next VSI. Dave fixed the driver to check the current link state after reset to ensure that the correct link state of a port is reported. Fixed an issue where if the driver is unloaded when traffic is in progress, errors are generated. Preethi breaks up the IRQ tracker into a software and hardware IRQ tracker, where the software IRQ tracker tracks only the PF's IRQ requests and does not play any role in the VF initialization. The hardware IRQ tracker represents the device's interrupt space and will be looked up to see if the device has run our of interrupts when a interrupt has to be allocated in the device for either PF or VF. Md Fahad adds support for enabling/disabling RSS via ethtool. Brett aligns the ice_reset_req enum values to the values that the hardware understands. Also added initial support for dynamic interrupt moderation in the ice driver. ==================== Signed-off-by: David S. Miller commit dd0bb7f902e60244f2e4fa27f2492499af655410 Merge: 3f60b03f7427 631b67072bb1 Author: David S. Miller Date: Tue Oct 2 11:29:41 2018 -0700 Merge branch 'qed-20g' Sudarsana Reddy Kalluru says: ==================== qed*: Driver support for 20G link speed. The patch series adds driver support for configuring/reading the 20G link speed. Please consider applying this to "net-next". ==================== Signed-off-by: David S. Miller commit 631b67072bb1c30101e67e6b5e6debd3c397a9fc Author: Sudarsana Reddy Kalluru Date: Tue Oct 2 06:16:12 2018 -0700 qede: Add driver support for 20G link speed. Add driver support for reading/configuring the 20G link speed via ethtool. Signed-off-by: Sudarsana Reddy Kalluru Signed-off-by: Michal Kalderon Signed-off-by: David S. Miller commit 5bf0961cc6a180c077793f2615a8fd842c655876 Author: Sudarsana Reddy Kalluru Date: Tue Oct 2 06:16:11 2018 -0700 qed: Add driver support for 20G link speed. Add driver support for configuring/reading the 20G link speed. Signed-off-by: Sudarsana Reddy Kalluru Signed-off-by: Michal Kalderon Signed-off-by: David S. Miller commit 3f60b03f74277a4971a42ee980b4e72b8e9e4751 Author: Gustavo A. R. Silva Date: Tue Oct 2 12:28:32 2018 +0200 isdn/hisax: Fix fall-through annotation Replace "fallthru" with a proper "fall through" annotation. This fix is part of the ongoing efforts to enabling -Wimplicit-fallthrough Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller commit cc16567e5a8a7bb9439ef61ab80069acdd33f76f Author: Paolo Abeni Date: Tue Oct 2 11:03:40 2018 +0200 net: drop unused skb_append_datato_frags() This helper is unused since commit 988cf74deb45 ("inet: Stop generating UFO packets.") Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller commit 799578ab16e86b074c184ec5abbda0bc698c7b0b Author: Gabriel Krisman Bertazi Date: Tue Oct 2 12:43:51 2018 -0400 ext4: fix build error when DX_DEBUG is defined Enabling DX_DEBUG triggers the build error below. info is an attribute of the dxroot structure. linux/fs/ext4/namei.c:2264:12: error: ‘info’ undeclared (first use in this function); did you mean ‘insl’? info->indirect_levels)); Fixes: e08ac99fa2a2 ("ext4: add largedir feature") Signed-off-by: Gabriel Krisman Bertazi Signed-off-by: Theodore Ts'o Reviewed-by: Lukas Czerner commit 018d52e8b589206149be6a929f418379d5c7102d Merge: 91c45a7a01e8 502c00d9c315 Author: Greg Kroah-Hartman Date: Tue Oct 2 09:38:04 2018 -0700 Merge tag 'soundwire-4.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire into char-misc-next Vinod writes: soundwire updates for 4.20-rc1 - support for multi-link streaming - updates in intel driver for multi-link streaming - Update Vinod's email - Fix rst formatting * tag 'soundwire-4.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire: Documentation: soundwire: fix stream.rst markup warnings soundwire: intel: Remove duplicate assignment MAINTAINERS: Update Vinod's email soundwire: intel: Fix uninitialized adev deref soundwire: intel: Add pre/post bank switch ops soundwire: keep track of Masters in a stream soundwire: Add support for multi link bank switch soundwire: Handle multiple master instances in a stream soundwire: Add support to lock across bus instances soundwire: Initialize completion for defer messages Documentation: soundwire: Add documentation for multi link commit e3aaadb0f0d64153674b9f81e3c12f95fa420e6d Author: Bartosz Golaszewski Date: Thu Jun 21 09:37:04 2018 +0200 clk: davinci: kill davinci_clk_reset_assert/deassert() This code is no longer used. Remove it. Signed-off-by: Bartosz Golaszewski Reviewed-by: David Lechner Signed-off-by: Stephen Boyd commit fe1a10bab242ef0184fdaea6d63905e5f49b6041 Author: Gustavo A. R. Silva Date: Tue Oct 2 11:56:36 2018 +0200 ALSA: sb8: Fix fall-through annotations Replace "fallthru" with a proper "fall through" annotation. This fix is part of the ongoing efforts to enabling -Wimplicit-fallthrough Signed-off-by: Gustavo A. R. Silva Signed-off-by: Takashi Iwai commit 5950229582bc4e5e332247dd9ec11e6fe85659e1 Author: Takashi Sakamoto Date: Mon Oct 1 04:11:49 2018 +0900 ALSA: firewire-lib: add PCM rules to obsolete PCM constraints based on LCM of SYT_INTERVAL In blocking mode of IEC 61883-1/6, when one isochronous packet includes data for events, the data is for the same number of events as SYT_INTERVAL decided according to sampling transmission frequency (SFC). IEC 61883-1/6 engine of ALSA firewire stack applies constraints of period and buffer size of PCM intermediate buffer of PCM substream. At present, this constraint is designed to round the size up/down to 32 frames. This value comes from the least common multiple (LCM) of SYT_INTERVAL. Although this looks to work well, in lower sampling rate, applications are not allowed to set size of period quite near period time constraint (at present 5 msec per period). This commit adds PCM rules for period/buffer size and rate to obsoletes the constraints based on LCM. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai commit 96395e86e3f4c7f520bb7c53c7eee41b1992ebc2 Author: Connor McAdams Date: Sat Sep 29 23:03:26 2018 -0400 ALSA: hda/ca0132 - Add ZxR exit commands This patch adds exit operations for the Sound Blaster ZxR. Signed-off-by: Connor McAdams Reviewed-by: Takashi Sakamoto Signed-off-by: Takashi Iwai commit d51434d43a2cbef2a656b780c7ab936105a30aaf Author: Connor McAdams Date: Sat Sep 29 23:03:25 2018 -0400 ALSA: hda/ca0132 - Add ZxR 600 ohm gain control This patch adds a control for 600 ohm gain on the Sound Blaster ZxR. Signed-off-by: Connor McAdams Reviewed-by: Takashi Sakamoto Signed-off-by: Takashi Iwai commit 76dea4dbf06bd49557a1dcc4c54f3ada88d8c8a0 Author: Connor McAdams Date: Sat Sep 29 23:03:24 2018 -0400 ALSA: hda/ca0132 - Remove input select enum for ZxR This patch removes the input select control for the ZxR, as it only has one input option, rear microphone. Signed-off-by: Connor McAdams Reviewed-by: Takashi Sakamoto Signed-off-by: Takashi Iwai commit 55845949428007841af18011128735fc8cccf0e6 Author: Connor McAdams Date: Sat Sep 29 23:03:23 2018 -0400 ALSA: hda/ca0132 - Add ZxR input/output select commands This patch adds commands for selecting input and output on the Sound Blaster ZxR. The ZxR has no front panel header, and has line-in on the separate daughter board, so it only does rear-mic. Signed-off-by: Connor McAdams Reviewed-by: Takashi Sakamoto Signed-off-by: Takashi Iwai commit c25c73e06a70765578c86569086965b61973283f Author: Connor McAdams Date: Sat Sep 29 23:03:22 2018 -0400 ALSA: hda/ca0132 - Add ZxR DSP post-download commands This patch adds commands for setting up the ZxR after the DSP is downloaded. The ZxR already shares most of the post-download commands from the regular Sound Blaster Z. Signed-off-by: Connor McAdams Reviewed-by: Takashi Sakamoto Signed-off-by: Takashi Iwai commit 2e492b8ee5da8ac1c9b31f728c9d9624e4345548 Author: Connor McAdams Date: Sat Sep 29 23:03:21 2018 -0400 ALSA: hda/ca0132 - Add ZxR init commands This patch adds init commands for the main Sound Blaster ZxR card. Signed-off-by: Connor McAdams Reviewed-by: Takashi Sakamoto Signed-off-by: Takashi Iwai commit 7675a2a9398af3d910df8f8aa96382b3bb6b696f Author: Connor McAdams Date: Sat Sep 29 23:03:20 2018 -0400 ALSA: hda/ca0132 - Add DBpro hda_codec_ops This patch adds separate hda_codec_ops for the DBPro daughter board, as it behaves more like a generic HDA codec than the other ca0132 cards, despite having a ca0132 on board. Signed-off-by: Connor McAdams Reviewed-by: Takashi Sakamoto Signed-off-by: Takashi Iwai commit 6dcd7244a2e27ccf4abbbdfe1ef437ba48af9c1f Author: Connor McAdams Date: Sat Sep 29 23:03:19 2018 -0400 ALSA: hda/ca0132 - Add ZxR pincfg This patch adds a pincfg for the ZxR, and defines which pins are used for both. Signed-off-by: Connor McAdams Reviewed-by: Takashi Sakamoto Signed-off-by: Takashi Iwai commit b29733db3b761684c90cb5ea195d9e47462059b2 Author: Connor McAdams Date: Sat Sep 29 23:03:18 2018 -0400 ALSA: hda/ca0132 - Add ZxR quirks + new quirk check function This patch adds quirk ID's for the ZxR and it's daughter board, the DBPro. It also adds a function for determining the quirk for each board through HDA subsytem ID's instead of PCI subsystem ID's. Signed-off-by: Connor McAdams Reviewed-by: Takashi Sakamoto Signed-off-by: Takashi Iwai commit 8e6bc6b3aab019896a08498e32fec3b577a9044a Author: Connor McAdams Date: Sat Sep 29 23:03:17 2018 -0400 ALSA: hda/ca0132 - Fix surround sound with output effects This patch fixes an issue where if surround sound was the selected output and output effects were enabled, the sound wasn't sent to all channels correctly. Signed-off-by: Connor McAdams Reviewed-by: Takashi Sakamoto Signed-off-by: Takashi Iwai commit 4b432ad4ca8cd63ab1c0b45d9af2d1fe7796944d Author: Connor McAdams Date: Sat Sep 29 23:03:16 2018 -0400 ALSA: hda/ca0132 - Fix AE-5 control type This patch corrects the control type of the additional AE-5 controls added in a previous patch from HDA_INPUT to HDA_OUTPUT. Signed-off-by: Connor McAdams Reviewed-by: Takashi Sakamoto Signed-off-by: Takashi Iwai commit a98401518def198e704b26d5d94f661f7561c140 Author: Takashi Sakamoto Date: Sat Sep 29 23:20:51 2018 +0900 ALSA: timer: fix wrong comment to refer to 'SNDRV_TIMER_PSFLG_*' ALSA timer core has a comment referring to 'SNDRV_MIXER_PSFLG_*' in a definition of 'struct snd_timer_params' of UAPI header. I can see this in initial state of ALSA timer core, at least in 'alsa-driver-0.4.0.tar.gz'. This commit fixes the comment. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai commit 154113eb17735197796ff5f477c6243d00f2c5dc Author: Alexander Aring Date: Sun Sep 30 17:41:29 2018 -0400 ieee802154: hwsim: remove not used ifup list This list is a leftover from fakelb driver which had always a full mesh topology. Idea was to remember all phy's which are currently used by the subsystem and deliver everything out. The hwsim driver works differently each phy has a list of other phy's to deliver frames which allows a own mesh topology. Signed-off-by: Alexander Aring Signed-off-by: Stefan Schmidt commit c32bf867cb6721d6ea04044d33f19c8bd81280c1 Author: Keyon Jie Date: Fri Sep 28 17:38:59 2018 +0800 ALSA: hda: Fix mismatch for register mask and value in ext controller. E.g. for snd_hdac_ext_bus_link_power_up(), we should set mask to be AZX_MLCTL_SPA(it was 0), and AZX_MLCTL_SPA as value to power up it, here correct it and several similar mismatches. Signed-off-by: Keyon Jie Signed-off-by: Takashi Iwai commit cc832dc8e32785a730ba07c3a357e17c201a5df8 Author: Pierre-Yves MORDRET Date: Tue Sep 11 09:31:16 2018 +0200 dmaengine: stm32-dma: check whether length is aligned on FIFO threshold When a period length is not multiple of FIFO some data may be stuck within FIFO. Burst/FIFO Threshold/Period or buffer length check has to be hardened In any case DMA will grant any request from client but will degraded any parameters whether awkward. Signed-off-by: Pierre-Yves MORDRET Signed-off-by: Vinod Koul commit 9a9e295e7c5c0409c020088b0ae017e6c2b7df6e Author: Wang Xin Date: Thu Aug 16 19:45:34 2018 +0200 eeprom: at24: fix unexpected timeout under high load Within at24_loop_until_timeout the timestamp used for timeout checking is recorded after the I2C transfer and sleep_range(). Under high CPU load either the execution time for I2C transfer or sleep_range() could actually be larger than the timeout value. Worst case the I2C transfer is only tried once because the loop will exit due to the timeout although the EEPROM is now ready. To fix this issue the timestamp is recorded at the beginning of each iteration. That is, before I2C transfer and sleep. Then the timeout is actually checked against the timestamp of the previous iteration. This makes sure that even if the timeout is reached, there is still one more chance to try the I2C transfer in case the EEPROM is ready. Example: If you have a system which combines high CPU load with repeated EEPROM writes you will run into the following scenario. - System makes a successful regmap_bulk_write() to EEPROM. - System wants to perform another write to EEPROM but EEPROM is still busy with the last write. - Because of high CPU load the usleep_range() will sleep more than 25 ms (at24_write_timeout). - Within the over-long sleeping the EEPROM finished the previous write operation and is ready again. - at24_loop_until_timeout() will detect timeout and won't try to write. Signed-off-by: Wang Xin Signed-off-by: Mark Jonas Signed-off-by: Bartosz Golaszewski commit eb108c3611dd21d5d058cee25fec1c29baf5b0c9 Author: Matti Vaittinen Date: Tue Oct 2 10:16:50 2018 +0300 regulator: bd718xx: fix build warning on x86_64 Casting address to unsigned int causes a warning on some 64 bit architectures. Fix the cast. Signed-off-by: Matti Vaittinen Reported-by: Stephen Rothwell Signed-off-by: Mark Brown commit cf1b2c309b47636b197805f522ed9657fcc7102c Author: Biju Das Date: Thu Sep 27 13:46:41 2018 +0100 dt-bindings: dmaengine: usb-dmac: Add binding for r8a7744 This patch adds binding for r8a7744 (RZ/G1N). Signed-off-by: Biju Das Reviewed-by: Chris Paterson Reviewed-by: Simon Horman Signed-off-by: Vinod Koul commit 6b1e23c93cba2d056a94d9837a17d420dae1f510 Author: Biju Das Date: Mon Sep 17 16:18:16 2018 +0100 dt-bindings: rcar-dmac: Document r8a7744 support Renesas RZ/G SoC also have the R-Car gen2/3 compatible DMA controllers. Document RZ/G1N (also known as R8A7744) SoC bindings. Signed-off-by: Biju Das Reviewed-by: Fabrizio Castro Reviewed-by: Simon Horman Reviewed-by: Geert Uytterhoeven Reviewed-by: Rob Herring Signed-off-by: Vinod Koul commit b9a5950fc52763401fc774dfb0fccc02f0c9baf5 Author: Miquel Raynal Date: Mon Oct 1 16:13:56 2018 +0200 arm64: dts: marvell: add AP806 SEI subnode Add the System Error Interrupt node, representing an IRQ chip which is part of the GIC. The SEI node aggregates interrupts from the AP through wired interrupts, and from the CPs through MSIs. Signed-off-by: Miquel Raynal Signed-off-by: Gregory CLEMENT commit 8ed46368776b3bc93d74c1f8f2bfb9fd8a9ad805 Author: orenbh Date: Fri Sep 21 18:09:16 2018 +0200 arm64: dts: marvell: add CPU Idle power state support on Armada 7K/8K This patch adds CPU deep Idle and Cluster deep Idle states BUT it defines the idle state for each cpu (defined under cpu-idle-states parameter) only for the quad version therefore it does NOT activate CPU Idle capability for the other version. [gregory: extract from a larger patch] Signed-off-by: orenbh Signed-off-by: Gregory CLEMENT commit 92e5d4e9398eabf997075bed2543d7fd783e1ab0 Author: Gregory CLEMENT Date: Fri Sep 21 18:09:15 2018 +0200 arm64: dts: marvell: Add node labels for the cpus Aligned with what we have done for the others nodes. It will also allow to easily modify the cpu configuration at board (or sub-SoC) level. Signed-off-by: Gregory CLEMENT commit 5e621f5d538985f010035c6f3e28c22829d36db1 Author: Nathan Chancellor Date: Tue Sep 11 16:20:25 2018 -0700 dmaengine: timb_dma: Use proper enum in td_prep_slave_sg Clang warns when implicitly converting from one enumerated type to another. Avoid this by using the equivalent value from the expected type. drivers/dma/timb_dma.c:548:27: warning: implicit conversion from enumeration type 'enum dma_transfer_direction' to different enumeration type 'enum dma_data_direction' [-Wenum-conversion] td_desc->desc_list_len, DMA_MEM_TO_DEV); ^~~~~~~~~~~~~~ 1 warning generated. Reported-by: Nick Desaulniers Signed-off-by: Nathan Chancellor Reviewed-by: Nick Desaulniers Signed-off-by: Vinod Koul commit 9524d6b265f9b2b9a61fceb2ee2ce1c2a83e39ca Author: Nathan Chancellor Date: Tue Sep 11 16:40:20 2018 -0700 dmaengine: ep93xx: Return proper enum in ep93xx_dma_chan_direction Clang warns when implicitly converting from one enumerated type to another. Avoid this by using the equivalent value from the expected type. In file included from drivers/dma/ep93xx_dma.c:30: ./include/linux/platform_data/dma-ep93xx.h:88:10: warning: implicit conversion from enumeration type 'enum dma_data_direction' to different enumeration type 'enum dma_transfer_direction' [-Wenum-conversion] return DMA_NONE; ~~~~~~ ^~~~~~~~ 1 warning generated. Reported-by: Nick Desaulniers Signed-off-by: Nathan Chancellor Reviewed-by: Nick Desaulniers Signed-off-by: Vinod Koul commit fb6360b1ef33b7799e6a81e1075a47e3b8ae01fd Author: Gustavo A. R. Silva Date: Tue Oct 2 12:24:40 2018 +0200 pktcdvd: fix fall-through annotation Replace "fallthru" with a proper "fall through" annotation. This fix is part of the ongoing efforts to enabling -Wimplicit-fallthrough Signed-off-by: Gustavo A. R. Silva Signed-off-by: Jens Axboe commit 92f687f40ee511e0ea6046bf63ceb48ff3ad1494 Author: Rob Herring Date: Wed Sep 5 17:26:52 2018 -0500 microblaze: enable building all dtbs Enable the 'dtbs' target for microblaze. As microblaze only has one dts file, always enable it. Cc: Michal Simek Signed-off-by: Rob Herring commit 626f92a00b7e4b43c8eebebb5d80817633342aab Author: Rob Herring Date: Tue Aug 21 15:41:19 2018 -0500 c6x: enable building all dtbs Enable the 'dtbs' target for c6x. This allows building all the dts files in arch/c6x/boot/dts/ for enabled platforms or when COMPILE_TEST and OF_ALL_DTBS are enabled. Cc: Mark Salter Cc: Aurelien Jacquiot Cc: linux-c6x-dev@linux-c6x.org Signed-off-by: Rob Herring commit 27e88af4e94ee853261972aca1a364c4c567123d Author: Rob Herring Date: Thu Aug 2 15:32:21 2018 -0600 powerpc: enable building all dtbs Enable the 'dtbs' target for powerpc. This allows building all the dts files in arch/powerpc/boot/dts/ when COMPILE_TEST and OF_ALL_DTBS are enabled. Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Rob Herring commit 37c8a5fafa3bb7dcdd51774be353be6cb2912b86 Author: Rob Herring Date: Wed Jan 10 15:19:37 2018 -0600 kbuild: consolidate Devicetree dtb build rules There is nothing arch specific about building dtb files other than their location under /arch/*/boot/dts/. Keeping each arch aligned is a pain. The dependencies and supported targets are all slightly different. Also, a cross-compiler for each arch is needed, but really the host compiler preprocessor is perfectly fine for building dtbs. Move the build rules to a common location and remove the arch specific ones. This is done in a single step to avoid warnings about overriding rules. The build dependencies had been a mixture of 'scripts' and/or 'prepare'. These pull in several dependencies some of which need a target compiler (specifically devicetable-offsets.h) and aren't needed to build dtbs. All that is really needed is dtc, so adjust the dependencies to only be dtc. This change enables support 'dtbs_install' on some arches which were missing the target. Acked-by: Will Deacon Acked-by: Paul Burton Acked-by: Ley Foon Tan Acked-by: Masahiro Yamada Cc: Michal Marek Cc: Vineet Gupta Cc: Russell King Cc: Catalin Marinas Cc: Yoshinori Sato Cc: Michal Simek Cc: Ralf Baechle Cc: James Hogan Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: Chris Zankel Cc: Max Filippov Cc: linux-kbuild@vger.kernel.org Cc: linux-snps-arc@lists.infradead.org Cc: linux-arm-kernel@lists.infradead.org Cc: uclinux-h8-devel@lists.sourceforge.jp Cc: linux-mips@linux-mips.org Cc: nios2-dev@lists.rocketboards.org Cc: linuxppc-dev@lists.ozlabs.org Cc: linux-xtensa@linux-xtensa.org Signed-off-by: Rob Herring commit be7cd2df1d22d29e5f23ce8744fc465cc07cc2bc Author: Rob Herring Date: Wed Aug 1 15:00:12 2018 -0600 c6x: use common built-in dtb support Using the common build support for built-in dtb files just requires adding a .dtb.o target to obj-y. The dtb now needs to be copied when unflattened because an init section is used now. Cc: Mark Salter Cc: Aurelien Jacquiot Cc: linux-c6x-dev@linux-c6x.org Signed-off-by: Rob Herring commit a91c614510478598051e8c49adb9863ee47959ec Author: Rob Herring Date: Wed Aug 1 11:49:58 2018 -0600 nios2: fix building all dtbs nios2 has a 'dtbs' target, but nothing is added to 'dtb-*' targets and no dtbs were getting built. This enables building all the dts files in arch/nios2/boot/dts/ when COMPILE_TEST and OF_ALL_DTBS are enabled. Cc: Ley Foon Tan Cc: nios2-dev@lists.rocketboards.org Signed-off-by: Rob Herring commit 1b4f9e2b0f48bb178a53ac515654caf3bba1b273 Author: Rob Herring Date: Wed Aug 1 14:14:12 2018 -0600 nios2: use common rules to build built-in dtb Using the common build support for built-in dtb files just requires adding a .dtb.o target to obj-y. This has the side effect that CONFIG_NIOS2_DTB_SOURCE should now be just the dts filename in arch/nios2/boot/dts/ directory. Before any path was supported, but if you want to build in your dtb to the kernel, it should be in the kernel tree. Cc: Ley Foon Tan Cc: nios2-dev@lists.rocketboards.org Signed-off-by: Rob Herring commit 118864869805123bf82d666062542440a0fda5dd Author: Rob Herring Date: Wed Oct 7 19:21:18 2015 -0500 nios2: build .dtb files in dts directory Align nios2 with other architectures which build the dtb files in the same directory as the dts files. This is also in line with most other build targets which are located in the same directory as the source. This move will help enable the 'dtbs' target which builds all the dtbs regardless of kernel config. This transition could break some scripts if they expect dtb files in the old location. Cc: Ley Foon Tan Cc: nios2-dev@lists.rocketboards.org Signed-off-by: Rob Herring commit 1acf1cf8638a801e67666425d8663f813e1dae8a Author: Rob Herring Date: Tue Oct 13 13:24:16 2015 -0500 powerpc: build .dtb files in dts directory Align powerpc with other architectures which build the dtb files in the same directory as the dts files. This is also in line with most other build targets which are located in the same directory as the source. This move will help enable the 'dtbs' target which builds all the dtbs regardless of kernel config. This transition could break some scripts if they expect dtb files in the old location. Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Rob Herring commit 6db37ad7c27bda2f62d1ef6ad0496e359c562c1a Author: Christoph Hellwig Date: Tue Oct 2 07:21:31 2018 -0700 dma-mapping: move dma_default_get_required_mask under ifdef This avoids a warning on powerpc. Signed-off-by: Christoph Hellwig Reported-by: Stephen Rothwell commit 81b23589f4830b672ffbad7162fc838c6791d22a Author: Dave Ertman Date: Wed Sep 19 17:43:07 2018 -0700 ice: Fix error on driver remove If the driver is unloaded when traffic is in progress, errors are generated. Fix this by releasing qvectors and NAPI handler on remove. Signed-off-by: Dave Ertman Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 9e4ab4c29a62d2ccbf4be42707669be2f42d391c Author: Brett Creeley Date: Wed Sep 19 17:23:19 2018 -0700 ice: Add support for dynamic interrupt moderation Currently there is no support for dynamic interrupt moderation. This patch adds some initial code to support this. The following changes were made: 1. Currently we are using multiple members to store the interrupt granularity (itr_gran_25/50/100/200). This is not necessary because we can query the device to determine what the interrupt granularity should be set to, done by a new function ice_get_itr_intrl_gran. 2. Added intrl to ice_q_vector structure to support interrupt rate limiting. 3. Added the function ice_intrl_usecs_to_reg for converting to a value in usecs that the device understands. 4. Added call to write to the GLINT_RATE register. Disable intrl by default for now. 5. Changed rx/tx_itr_setting to itr_setting because having both seems redundant because a ring is either Tx or Rx. 6. Initialize itr_setting for both Tx/Rx rings in ice_vsi_alloc_rings() Signed-off-by: Brett Creeley Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit ca4929b6df7c729c375c486c0ca53decb0eae9f5 Author: Brett Creeley Date: Wed Sep 19 17:23:18 2018 -0700 ice: Align ice_reset_req enum values to hardware reset values Currently the ice_reset_req enum values have to be translated into a different set of values that the hardware understands for the same reset types. Avoid this translation by aligning ice_reset_req enum values to the ones that the hardware understands. Also add and else if block to check for ICE_RESET_EMPR and put a dev_dbg message in the else case. Signed-off-by: Brett Creeley Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 492af0ab4f57136d19f0fa3a9c636f12ae70853c Author: Md Fahad Iqbal Polash Date: Wed Sep 19 17:23:17 2018 -0700 ice: Implement ethtool hook for RSS switch This patch implements ethtool hook for enabling/disabling RSS. While disabling RSS, the LUT should be cleared. And the LUT should be reconfigured while enabling RSS. Signed-off-by: Md Fahad Iqbal Polash Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit eb0208ec42d319bc09fead0e1afe2bc0c28aeca0 Author: Preethi Banala Date: Wed Sep 19 17:23:16 2018 -0700 ice: Split irq_tracker into sw_irq_tracker and hw_irq_tracker For the PF driver, when mapping interrupts to queues, we need to request IRQs from the kernel and we also have to allocate interrupts from the device. Similarly, when the VF driver (iavf.ko) initializes, it requests the kernel IRQs that it needs but it can't directly allocate interrupts in the device. Instead, it sends a mailbox message to the ice driver, which then allocates interrupts in the device on the VF driver's behalf. Currently both these cases end up having to reserve entries in pf->irq_tracker but irq_tracker itself is sized based on how many vectors the PF driver needs. Under the right circumstances, the VF driver can fail to get entries in irq_tracker, which will result in the VF driver failing probe. To fix this, sw_irq_tracker and hw_irq_tracker are introduced. The sw_irq_tracker tracks only the PF's IRQ request and doesn't play any role in VF init. hw_irq_tracker represents the device's interrupt space. When interrupts have to be allocated in the device for either PF or VF, hw_irq_tracker will be looked up to see if the device has run out of interrupts. Signed-off-by: Preethi Banala Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 5755143dd18d3b7fa97b419d18d9bb4764b7b46f Author: Dave Ertman Date: Wed Sep 19 17:23:15 2018 -0700 ice: Check for actual link state of port after reset We are currently replaying the link state of a port after a reset, but it is possible that the link state of a port can change during the reset process. So check for the current link state of a port during the rebuild process of a reset. Signed-off-by: Dave Ertman Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 334cb0626de1b793a26d693051060f8dbf0e5b90 Author: Anirudh Venkataramanan Date: Wed Sep 19 17:23:14 2018 -0700 ice: Implement VSI replay framework Currently, switch filters get replayed after reset. In addition to filters, other VSI attributes (like RSS configuration, Tx scheduler configuration, etc.) also need to be replayed after reset. Thus, instead of replaying based on functional blocks (i.e. replay all filters for all VSIs, followed by RSS configuration replay for all VSIs, and so on), it makes more sense to have the replay centered around a VSI. In other words, replay all configurations for a VSI before moving on to rebuilding the next VSI. To that effect, this patch introduces a VSI replay framework in a new function ice_vsi_replay_all. Currently it only replays switch filters, but it will be expanded in the future to replay additional VSI attributes. Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 4fb33f3107e194793bf947183f29ddce5d80a19f Author: Anirudh Venkataramanan Date: Wed Sep 19 17:23:13 2018 -0700 ice: Expand use of VSI handles part 2/2 This patch is a continuation of the previous patch where VSI handles are used instead of VSI numbers. Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 5726ca0e5eaad0f194979e66c29c1d22029f1041 Author: Anirudh Venkataramanan Date: Wed Sep 19 17:23:12 2018 -0700 ice: Expand use of VSI handles part 1/2 A VSI handle is just a number the driver maintains to uniquely identify a VSI. A VSI handle is backed by a VSI number in the hardware. When interacting when the hardware, VSI handles are converted into VSI numbers. In commit 0f9d5027a749 ("ice: Refactor VSI allocation, deletion and rebuild flow"), VSI handles were introduced but it was used only when creating and deleting VSIs. This patch is part one of two patches that expands the use of VSI handles across the rest of the driver. Also in this patch, certain parts of the code had to be refactored to correctly use VSI handles. Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 884e370ea88c109a3b982f4eb9ecd82510a3a1fe Author: Sergey Senozhatsky Date: Fri Sep 28 18:53:04 2018 +0900 printk: CON_PRINTBUFFER console registration is a bit racy CON_PRINTBUFFER console registration requires us to do several preparation steps: - Rollback console_seq to replay logbuf messages which were already seen on other consoles; - Set exclusive_console flag so console_unlock() will ->write() logbuf messages only to the exclusive_console driver. The way we do it, however, is a bit racy logbuf_lock_irqsave(flags); console_seq = syslog_seq; console_idx = syslog_idx; logbuf_unlock_irqrestore(flags); << preemption enabled << irqs enabled exclusive_console = newcon; console_unlock(); We rollback console_seq under logbuf_lock with IRQs disabled, but we set exclusive_console with local IRQs enabled and logbuf unlocked. If the system oops-es or panic-s before we set exclusive_console - and given that we have IRQs and preemption enabled there is such a possibility - we will re-play all logbuf messages to every registered console, which may be a bit annoying and time consuming. Move exclusive_console assignment to the same IRQs-disabled and logbuf_lock-protected section where we rollback console_seq. Link: http://lkml.kernel.org/r/20180928095304.9972-1-sergey.senozhatsky@gmail.com To: Steven Rostedt Cc: Sergey Senozhatsky Cc: linux-kernel@vger.kernel.org Signed-off-by: Sergey Senozhatsky Signed-off-by: Petr Mladek commit 28be5f15df2ee6882b0a122693159c96a28203c7 Author: Linus Walleij Date: Mon Oct 1 22:43:46 2018 +0200 regulator: fixed: Default enable high on DT regulators commit efdfeb079cc3 ("regulator: fixed: Convert to use GPIO descriptor only") switched to use gpiod_get() to look up the regulator from the gpiolib core whether that is device tree or boardfile. This meant that we activate the code in a603a2b8d86e ("gpio: of: Add special quirk to parse regulator flags") which means the descriptors coming from the device tree already have the right inversion and open drain semantics set up from the gpiolib core. As the fixed regulator was inspected again we got the inverted inversion and things broke. Fix it by ignoring the config in the device tree for now: the later patches in the series will push all inversion handling over to the gpiolib core and set it up properly in the boardfiles for legacy devices, but I did not finish that for this kernel cycle. Fixes: commit efdfeb079cc3 ("regulator: fixed: Convert to use GPIO descriptor only") Reported-by: Leonard Crestez Reported-by: Fabio Estevam Reported-by: John Stultz Reported-by: Anders Roxell Signed-off-by: Linus Walleij Tested-by: John Stultz Signed-off-by: Mark Brown commit f92b070f2dc89a8ff1a0cc8b608e20abef894c7d Author: Petr Mladek Date: Thu Sep 13 14:34:06 2018 +0200 printk: Do not miss new messages when replaying the log The variable "exclusive_console" is used to reply all existing messages on a newly registered console. It is cleared when all messages are out. The problem is that new messages might appear in the meantime. These are then visible only on the exclusive console. The obvious solution is to clear "exclusive_console" after we replay all messages that were already proceed before we started the reply. Reported-by: Sergey Senozhatsky Link: http://lkml.kernel.org/r/20180913123406.14378-1-pmladek@suse.com To: Steven Rostedt Cc: Peter Zijlstra Cc: Sergey Senozhatsky Cc: linux-kernel@vger.kernel.org Acked-by: Sergey Senozhatsky Signed-off-by: Petr Mladek commit f7960e299f13f069d6f3d4e157d91bfca2669677 Author: Alexey Kardashevskiy Date: Mon Sep 10 18:29:09 2018 +1000 KVM: PPC: Inform the userspace about TCE update failures We return H_TOO_HARD from TCE update handlers when we think that the next handler (realmode -> virtual mode -> user mode) has a chance to handle the request; H_HARDWARE/H_CLOSED otherwise. This changes the handlers to return H_TOO_HARD on every error giving the userspace an opportunity to handle any request or at least log them all. Signed-off-by: Alexey Kardashevskiy Reviewed-by: David Gibson Signed-off-by: Michael Ellerman commit e199ad2bf5cf7a6d15747a97da4ec1084bd6aae1 Author: Alexey Kardashevskiy Date: Mon Sep 10 18:29:08 2018 +1000 KVM: PPC: Validate all tces before updating tables The KVM TCE handlers are written in a way so they fail when either something went horribly wrong or the userspace did some obvious mistake such as passing a misaligned address. We are going to enhance the TCE checker to fail on attempts to map bigger IOMMU page than the underlying pinned memory so let's valitate TCE beforehand. This should cause no behavioral change. Signed-off-by: Alexey Kardashevskiy Reviewed-by: David Gibson Signed-off-by: Michael Ellerman commit b66081e25e2865464e3101bcc4a071bcc4e47dbb Merge: 11da3a7f84f1 71d29f43b633 Author: Michael Ellerman Date: Tue Oct 2 23:02:35 2018 +1000 Merge branch 'kvm-ppc-fixes' of paulus/powerpc into topic/ppc-kvm Some commits we'd like to share between the powerpc and kvm-ppc tree for next have dependencies on commits that went into 4.19 via the kvm-ppc-fixes branch and weren't merged before 4.19-rc3, which is our base commit. So merge the kvm-ppc-fixes branch into topic/ppc-kvm. commit 940656fb3f94b90b92a3fc5994614870b14866b9 Merge: cb86d0f878be 0c9864c05f34 Author: Daniel Borkmann Date: Tue Oct 2 14:39:59 2018 +0200 Merge branch 'bpf-big-map-entries' Jakub Kicinski says: ==================== This series makes the control message parsing for interacting with BPF maps more flexible. Up until now we had a hard limit in the ABI for key and value size to be 64B at most. Using TLV capability allows us to support large map entries. ==================== Signed-off-by: Daniel Borkmann commit 0c9864c05f34b0b29109dc5f94707e5943fcfda3 Author: Jakub Kicinski Date: Mon Oct 1 18:30:34 2018 -0700 nfp: bpf: allow control message sizing for map ops In current ABI the size of the messages carrying map elements was statically defined to at most 16 words of key and 16 words of value (NFP word is 4 bytes). We should not make this assumption and use the max key and value sizes from the BPF capability instead. To make sure old kernels don't get surprised with larger (or smaller) messages bump the FW ABI version to 3 when key/value size is different than 16 words. Signed-off-by: Jakub Kicinski Signed-off-by: Daniel Borkmann commit 9bbdd41b8a458d8a0bf1d9096bc1e704c7b46a00 Author: Jakub Kicinski Date: Mon Oct 1 18:30:33 2018 -0700 nfp: allow apps to request larger MTU on control vNIC Some apps may want to have higher MTU on the control vNIC/queue. Allow them to set the requested MTU at init time. Signed-off-by: Jakub Kicinski Signed-off-by: Daniel Borkmann commit 28264eb227422165d23a3efeff24735fdedb7410 Author: Jakub Kicinski Date: Mon Oct 1 18:30:32 2018 -0700 nfp: bpf: parse global BPF ABI version capability Up until now we only had per-vNIC BPF ABI version capabilities, which are slightly awkward to use because bulk of the resources and configuration does not relate to any particular vNIC. Add a new capability for global ABI version and check the per-vNIC version are equal to it. Assume the ABI version 2 if no explicit version capability is present. Signed-off-by: Jakub Kicinski Signed-off-by: Daniel Borkmann commit afc92514a34c7414b28047b1205a6b709103c699 Author: Yoshihiro Shimoda Date: Tue Oct 2 20:57:44 2018 +0900 usb: gadget: udc: renesas_usb3: Fix b-device mode for "workaround" If the "workaround_for_vbus" is true, the driver will not call usb_disconnect(). So, since the controller keeps some registers' value, the driver doesn't re-enumarate suitable speed after the b-device mode is disabled. To fix the issue, this patch adds usb_disconnect() calling in renesas_usb3_b_device_write() if workaround_for_vbus is true. Fixes: 43ba968b00ea ("usb: gadget: udc: renesas_usb3: add debugfs to set the b-device mode") Cc: # v4.14+ Signed-off-by: Yoshihiro Shimoda Signed-off-by: Felipe Balbi commit d72e8256c20971b12cddd71d87c32284de7108fa Author: Chris Brandt Date: Mon Sep 24 08:58:16 2018 -0500 dt-bindings: watchdog: renesas-wdt: Add support for R7S9210 Document support for RZ/A2 Signed-off-by: Chris Brandt Reviewed-by: Simon Horman Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 8e89130632c25f61137baa3d8e3ad861dcad179c Author: Chris Brandt Date: Mon Sep 24 08:58:15 2018 -0500 watchdog: rza_wdt: Support longer timeouts The RZ/A2 watchdog timer extends the clock source options in order to allow for longer timeouts. Signed-off-by: Chris Brandt Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 10d790d1fa2e9487053f9a3a289ff198736fa964 Author: Jerry Hoemann Date: Fri Sep 21 14:50:39 2018 -0600 watchdog: hpwdt: Disable PreTimeout when Timeout is smaller During module install, disable pretimeout if the requested timeout value is not greater than the minimal pretimeout value that is supported by hardware. This makes the module load handling of pretimeout consistent with the ioctl handling of pretimeout. Signed-off-by: Jerry Hoemann Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 57cbf0e3a0fd48e5ad8f3884562e8dde4827c1c8 Author: Guenter Roeck Date: Sun Sep 23 06:54:11 2018 -0700 watchdog: w83627hf_wdt: Support NCT6796D, NCT6797D, NCT6798D The watchdog controller on NCT6796D, NCT6797D, and NCT6798D is compatible with the wtachdog controller on other Nuvoton chips. Signed-off-by: Guenter Roeck Reviewed-by: Wim Van Sebroeck Signed-off-by: Wim Van Sebroeck commit 79b10e09bb52c3cf99be771953374249b1198352 Author: Christophe Leroy Date: Mon Sep 17 06:22:47 2018 +0000 watchdog: mpc8xxx: use dev_xxxx() instead of pr_xxxx() mpc8xxx watchdog driver is a platform device drivers, it is therefore possible to use dev_xxx() messaging rather than pr_xxx() Signed-off-by: Christophe Leroy Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit c99d9df1d3c312759c43a3da0d2f17b4aecc05c8 Author: Hauke Mehrtens Date: Thu Sep 13 23:32:11 2018 +0200 watchdog: lantiq: add get_timeleft callback This callback will provide the current time left. Signed-off-by: Hauke Mehrtens Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit dcd7e04e8e2f5f887dd9692f5ff3e0d0c26c8e3f Author: Hauke Mehrtens Date: Thu Sep 13 23:32:10 2018 +0200 watchdog: lantiq: Convert to watchdog_device Instead of doing the ioctl handling manually just use register a watchdog_device and let the watchdog framework do the ioctl handling. This also removes the ltq_wdt_bootstatus_set typedef and replaces it with a structure providing the chip specific functions pointer. The watchdog_init_timeout() function is now used and the initial timeout can be provided in device tree. If the watchdog was already activated it will not be stopped any more, but the settings from the driver will be used and the watchdog subsystem will take care. Signed-off-by: Hauke Mehrtens Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 1f59f8aff98f200af7a6882184add7b85f5da741 Author: Hauke Mehrtens Date: Thu Sep 13 23:32:09 2018 +0200 watchdog: lantiq: update register names to better match spec Some of the names of the bits were confusing to me. Now the bits share the same prefix as the register they are set on. The LTQ_WDT_CR_PWL register (bits 26:25) is the pre warning limit and it does not turn anything on. It has 4 possible divers 1/2, 1/4, 1/8 and 1/16, this drivers only uses 1/16. The LTQ_WDT_CR_CLKDIV register bits(25:24) is only configuring a clock divers and do not turn any thing on too, all possible values are valid dividers. Using the LTQ_WDT_SR prefix is also wrong these bits are used in the LTQ_WDT_CR registers, SR is the status register which is read only. This uses GENMASK where it is a mask and it uses shifts when a value is written to some bits. Signed-off-by: Hauke Mehrtens Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 2e0432f8f8ad11b4bd208445360220efa5b37d82 Author: Romain Izard Date: Fri Sep 14 12:13:38 2018 +0200 watchdog: sama5d4: fix timeout-sec usage When using watchdog_init_timeout to update the default timeout value, an error means that there is no "timeout-sec" in the relevant device tree node. This should not prevent binding of the driver to the device. Fixes: 976932e40036 ("watchdog: sama5d4: make use of timeout-secs provided in devicetree") Signed-off-by: Romain Izard Reviewed-by: Marcus Folkesson Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit d08ec7bea2795be008736a852e67949c162669ed Author: Robert P. J. Day Date: Sat Sep 8 06:20:05 2018 -0400 watchdog: fix a small number of "watchog" typos in comments All typos in comments, should not affect functionality. Signed-off-by: Robert P. J. Day Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit d674ee232b2d9480033df9107a04b4b5436040e6 Author: Kuninori Morimoto Date: Fri Sep 7 02:11:17 2018 +0000 watchdog: rza_wdt: 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: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 5a623ce0a55ed32fd999a80d0423cfae782893dc Author: Jean Delvare Date: Fri Aug 31 15:07:34 2018 +0200 watchdog: iTCO_wdt: Remove unused hooks As the only user of iTCO_vendor_pre_keepalive and iTCO_vendor_pre_set_heartbeat has just been removed, we can delete these 2 hooks. Signed-off-by: Jean Delvare Cc: Martin Wilck Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 2c05318ad5c390e65d6c819debeff3dfa262223e Author: Jean Delvare Date: Fri Aug 31 15:06:10 2018 +0200 watchdog: iTCO_wdt: Drop option vendorsupport=2 iTCO_vendor_support's option vendorsupport=2 is a gross hack. It claims to extend the existing iTCO_wdt driver, but in fact programs a watchdog on a completely different device (Super-I/O) without requesting its I/O ports and without checking the device ID. This is an utterly dangerous thing to do. It also turns out to be unnecessary, because as far as I can tell, the code in question is basically duplicating what the clean w83627hf_wdt driver is doing. My guess is that on these SuperMicro boards which sparkled the implementation of vendorsupport=2, the watchdog functionality of the Intel south bridge is not used, and the watchdog feature of some W83627HF-like Super-I/O chip is used instead. So we should point the users to the w83627hf_wdt driver. Signed-off-by: Jean Delvare Cc: Martin Wilck Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 14de99b44b34dbb9d0f64845b1cbb675e047767e Author: Wolfram Sang Date: Tue Aug 28 12:13:48 2018 +0200 watchdog: renesas_wdt: stop when unregistering We want to go into a sane state when unregistering. Currently, it happens that the watchdog stops when unbinding because of RuntimePM stopping the core clock. When rebinding, the core clock gets reactivated and the watchdog fires even though it hasn't been opened by userspace yet. Strange scenario, yes, but sane state is much preferred anyhow. 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 953b9dd7725bad55a922a35e75bff7bebf7b9978 Author: Wolfram Sang Date: Tue Aug 28 12:13:47 2018 +0200 watchdog: core: fix null pointer dereference when releasing cdev watchdog_stop() calls watchdog_update_worker() which needs a valid wdd->wd_data pointer. So, when unregistering the cdev, clear the pointers after we call watchdog_stop(), not before. Fixes: bb292ac1c602 ("watchdog: Introduce watchdog_stop_on_unregister helper") 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 3bed02a2966146b5876b366f4489e30af0547c66 Author: Wolfram Sang Date: Wed Aug 22 00:02:24 2018 +0200 watchdog: renesas_wdt: use SPDX identifier for Renesas drivers Signed-off-by: Wolfram Sang Reviewed-by: Simon Horman Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 18bd1963aef94e0186ad435f8a497b74c00b73de Author: Jerry Hoemann Date: Mon Aug 20 13:31:23 2018 -0600 watchdog: hpwdt: Update Driver Documentation. Remove references to deprecated features like NMI sourcing and obsoleted module parameters. Add details concerning new module parameter pretimeout and tips to programming it. Signed-off-by: Jerry Hoemann Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit e1c7f79ea54cac01d88e45f05a4c411cdb33e862 Author: Jerry Hoemann Date: Wed Aug 8 13:13:27 2018 -0600 watchdog: hpwdt: Update version number. Bump version number to reflect recent bug fixes. Signed-off-by: Jerry Hoemann Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 397a35d418a20453952d707d4b97bae6ac3053ca Author: Jerry Hoemann Date: Wed Aug 8 13:13:26 2018 -0600 watchdog: hpwdt: Module paramerter alias. Add module parameter "timeout" as an alias to "soft_margin." This aligns hpwdt usage more closely with other WDT while retaining backwards compatibility. Signed-off-by: Jerry Hoemann Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 923014619e3d893c66bb398fd2ef19db7dc383ff Author: Jerry Hoemann Date: Wed Aug 8 13:13:25 2018 -0600 watchdog: hpwdt: Display module parameters. Print module parameters when the driver is loaded. Signed-off-by: Jerry Hoemann Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 093d43858d1dec5114482daf02cc4901d46eb4d4 Author: Jerry Hoemann Date: Wed Aug 8 13:13:24 2018 -0600 watchdog: hpwdt: Claim NMI from iLO The hwpdt driver is overloaded for handling both the iLO watchdog and the explicit "Generate NMI to System" virutal button. Hence NMI handler needs to claim NMI resulting from the virutal button. Claim if iLO generated accommodating firmware that might set wrong bit. Signed-off-by: Jerry Hoemann Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 4d9186d01e7a6af1c02fcb639632fb97a8e140a6 Author: Jerry Hoemann Date: Wed Aug 8 13:13:23 2018 -0600 watchdog: hpwdt: Initialize pretimeout from module parameter. When the pretimeout is specified as a module parameter, the value should be reflected in hpwdt_dev.pretimeout. The default (on) case is correct. But, when disabling pretimeout, the value should be set to zero in hpwdt_dev. When compiling w/o CONFIG_HPWDT_NMI_DECODING defined, the pretimeout module parameter is ignored and the value internally will be 0. Signed-off-by: Jerry Hoemann Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 3dae1c0919d8c46710187df4fa1a43622289a1f5 Author: Ayan Kumar Halder Date: Tue Jul 10 14:18:55 2018 +0100 drm/arm/malidp: Implemented the size validation for AFBC framebuffers AFBC buffers include additional metadata which increases the required allocation size. Implement the appropriate size validation and sanity checking for AFBC buffers. Added malidp specific function for framebuffer creation. This checks if the framebuffer has AFBC modifiers and if so, it verifies the necessary constraints on the size, alignment, offsets and pitch. Changes from v2: - Replaced DRM_ERROR() with DRM_DEBUG_KMS() in malidp_verify_afbc_framebuffer_caps() and malidp_verify_afbc_framebuffer_size() Signed-off-by: Ayan Kumar halder Reviewed-by: Brian Starkey Reviewed-by: Liviu Dudau Signed-off-by: Liviu Dudau commit 66da13a519b33143932df5dc89973781c027c827 Author: Liviu Dudau Date: Tue Oct 2 12:11:00 2018 +0100 drm/arm/malidp: Validate rotations for compressed/uncompressed framebuffers for each layer Add support for compressed framebuffers that are described using the framebuffer's modifier field. Mali DP uses the rotation memory for the decompressor of the format, so we need to check for space when the modifiers are present. Signed-off-by: Ayan Kumar Halder Reviewed-by: Brian Starkey [re-worded commit, rebased, cleaned up duplicated checks for RGB888 and BGR888 and removed additional parameter for rotmem_required function hook] Signed-off-by: Liviu Dudau commit 079f4532008e21d40a2c43eb32df0fdf7d8dbddc Author: Miquel Raynal Date: Mon Oct 1 16:13:55 2018 +0200 dt-bindings/interrupt-controller: Add documentation for Marvell SEI controller Describe the System Error Interrupt (SEI) controller. It aggregates two types of interrupts, wired and MSIs from respectively the AP and the CPs, into a single SPI interrupt. Suggested-by: Haim Boot Reviewed-by: Rob Herring Signed-off-by: Miquel Raynal Signed-off-by: Marc Zyngier commit 548ce8156f9dc5ca3e09c18f4d5307918a2645b4 Author: Miquel Raynal Date: Mon Oct 1 16:13:54 2018 +0200 dt-bindings/interrupt-controller: Update Marvell ICU bindings Change the documentation to reflect the new bindings used for Marvell ICU. This involves describing each interrupt group as a subnode of the ICU node. Each of them having their own compatible. The DT binding documentation still documents the legacy binding, where there was a single node with no subnode. Reviewed-by: Rob Herring Signed-off-by: Miquel Raynal Signed-off-by: Marc Zyngier commit 175c98aa265b7ba45e81524075d28ff2725d8e83 Author: Miquel Raynal Date: Tue Oct 2 10:59:00 2018 +0200 irqchip/irq-mvebu-icu: Add support for System Error Interrupts (SEI) So far the ICU only handled NSR interrupts through GICP. An SEI driver provides an MSI domain through which it is possible to raise SEI, so let's add SEI support to the ICU driver. Handle the NSR probe function in a more generic way to support other type of interrupts. Each interrupt domain is a tree domain to avoid allocation the 207 entries each time. Signed-off-by: Miquel Raynal Signed-off-by: Marc Zyngier commit 228197c5694369b5d65a2b5f579fc443166bc3f8 Author: Miquel Raynal Date: Mon Oct 1 16:13:52 2018 +0200 arm64: marvell: Enable SEI driver Enable the newly introduced Marvell SEI driver for the 64-bit Marvell EBU platforms. Suggested-by: Haim Boot Reviewed-by: Gregory CLEMENT Signed-off-by: Miquel Raynal Signed-off-by: Marc Zyngier commit 61ce8d8d8a8168a714de80fc31b3d6ac160fc5b0 Author: Miquel Raynal Date: Mon Oct 1 16:13:51 2018 +0200 irqchip/irq-mvebu-sei: Add new driver for Marvell SEI This is a cascaded interrupt controller in the AP806 GIC that collapses SEIs (System Error Interrupt) coming from the AP and the CPs (through the ICU). The SEI handles up to 64 interrupts. The first 21 interrupts are wired from the AP. The next 43 interrupts are from the CPs and are triggered through MSI messages. To handle this complexity, the driver has to declare to the upper layer: one IRQ domain for the wired interrupts, one IRQ domain for the MSIs; and acts as a MSI controller ('parent') by declaring an MSI domain. Suggested-by: Haim Boot Suggested-by: Marc Zyngier Signed-off-by: Miquel Raynal Signed-off-by: Marc Zyngier commit 4f4c867c91e644fc9d461c8c5cf2f09d6d5bcac2 Author: Miquel Raynal Date: Tue Oct 2 10:54:16 2018 +0200 irqchip/irq-mvebu-icu: Support ICU subnodes The ICU can handle several type of interrupt, each of them being handled differently on AP side. On CP side, the ICU should be able to make the distinction between each interrupt group by pointing to the right parent. This is done through the introduction of new bindings, presenting the ICU node as the parent of multiple ICU sub-nodes, each of them being an interrupt type with a different interrupt parent. ICU interrupt 'clients' now directly point to the right sub-node, avoiding the need for the extra ICU_GRP_* parameter. ICU subnodes are probed automatically with devm_platform_populate(). If the node as no child, the probe function for NSRs will still be called 'manually' in order to preserve backward compatibility with DT using the old binding. Signed-off-by: Miquel Raynal Signed-off-by: Marc Zyngier commit 00885a77c8ffbeee58a9662c92d6a60a9b49f120 Author: Miquel Raynal Date: Mon Oct 1 16:13:49 2018 +0200 irqchip/irq-mvebu-icu: Disociate ICU and NSR NSR (non-secure interrupts) are handled in the ICU driver like if there was only this type of interrupt in the ICU. Change this behavior to prepare the introduction of SEI (System Error Interrupts) support by moving the NSR code in a separate function. This is done under the form of a 'probe' function to ease future migration to NSR/SEI being platform devices part of the ICU. The 'icu' structure is passed as driver data and not as a parameter for the same reason. Reviewed-by: Thomas Petazzoni Signed-off-by: Miquel Raynal Signed-off-by: Marc Zyngier commit 9770c66778489d5fdbb3ba4e807adac724a55397 Author: Miquel Raynal Date: Mon Oct 1 16:13:48 2018 +0200 irqchip/irq-mvebu-icu: Clarify the reset operation of configured interrupts Rewrite a small section to clarify the reset operation of interrupts already configured by ATF that we want to handle in the driver. This will simplify the introduction of System Error Interrupts support. Reviewed-by: Thomas Petazzoni Signed-off-by: Miquel Raynal Signed-off-by: Marc Zyngier commit 1f23a56a46b81de50eb8b898f06296ca06720a99 Author: Jamie Fox Date: Mon Oct 1 14:39:07 2018 +0100 drm/malidp: Enable MMU prefetch on Mali-DP650 Mali-DP650 supports warming up the SMMU translations, by sending requsts to the SMMU before a buffer is read. There are two modes supported: - PARTIAL: could be enabled when the buffer is composed of 4K or 64K pages, the display hardware will send a configurable number of requests before the actual reading. - FULL: could be enabled when the buffer is composed of 1M or 2M pages, the display hardware will send requests before reading for all pages composing the buffer. This patch adds a mechanism for detecting the page size and set the MMU prefetch mode if possible. Changes since v1: - For imported buffers use the already populated drm_gem_cma_object.sgt instead of calling driver.gem_prime_get_sg_table, which works just for buffers allocated through the gem_cma API. Signed-off-by: Jamie Fox Signed-off-by: Alexandru Gheorghe Acked-by: Liviu Dudau [rebased and re-ordered functions] Signed-off-by: Liviu Dudau commit 2b4dab69dcca13c5be2ddaf1337ae4accd087de6 Author: Miquel Raynal Date: Mon Oct 1 16:13:47 2018 +0200 irqchip/irq-mvebu-icu: Fix wrong private data retrieval The irq_domain structure has an host_data pointer that just stores private data. It is meant to not be touched by the IRQ core. However, when it comes to MSI, the MSI layer adds its own private data there with a structure that also has a host_data pointer. Because this IRQ domain is an MSI domain, to access private data we should do a d->host_data->host_data, also wrapped as 'platform_msi_get_host_data()'. This bug was lying there silently because the 'icu' structure retrieved this way was just called by dev_err(), only producing a '(NULL device *):' output on the console. Reviewed-by: Thomas Petazzoni Signed-off-by: Miquel Raynal Signed-off-by: Marc Zyngier commit 018ea8475b601a625ed2bdb8ab62f6b3aafecb9d Author: Miquel Raynal Date: Mon Oct 1 16:13:46 2018 +0200 dt-bindings/interrupt-controller: Fix Marvell ICU length in the example ICU size in CP110 is not 0x10 but at least 0x440 bytes long (from the specification). Reviewed-by: Rob Herring Reviewed-by: Thomas Petazzoni Signed-off-by: Miquel Raynal Signed-off-by: Marc Zyngier commit 187f7f21b2a268f6eb157bd8bb703de6b0064f17 Author: Lowry Li Date: Fri Aug 31 19:35:30 2018 +0800 drm/mali-dp: Implement plane alpha and pixel blend on malidp Checks the pixel blending mode and plane alpha value when do the plane_check. Mali DP supports blending the current plane with the background either based on the pixel alpha blending mode or by using the layer's alpha value, but not both at the same time. If both case, plane_check will return failed. Sets the HW when doing plane_update accordingly. If plane alpha is the 0xffff, set the pixel blending bits accordingly. If not we'd set ALPHA bit as zero and layer alpha value. Changes since v1: - Introduces to use it in the malidp driver, which depends on the plane alpha patch Changes since v2: - Refines the comments of drm/mali-dp patchset Changes since v3: - Adds hardware limitation check Changes since v4: - Updates on drm/malidp, hardware limitation check only when the format has alpha pixel. - Rebases on drm-misc-next. Signed-off-by: Lowry Li Acked-by: Liviu Dudau Signed-off-by: Liviu Dudau commit 791d54fa054d304636fa783f6f082a9dd934ec6a Author: Alexandru Gheorghe Date: Fri Sep 21 14:39:44 2018 +0100 drm/malidp: Fix smart layer when doing pm_suspend/resume Smart layer enable rectangles is set to 1 when the driver is probed, however when doing pm_suspend the value is lost and it's not set again making the SMART_LAYER unusable, fix that by initializing the number of rectangles everytime we do a plane update. Signed-off-by: Alexandru Gheorghe Acked-by: Liviu Dudau Signed-off-by: Liviu Dudau commit b11507815d1be0173e27990ffcae6da58eadbc10 Author: Alexandru Gheorghe Date: Wed Aug 22 16:18:19 2018 +0100 drm/malidp: Fix writeback in NV12 When we want to writeback to memory in NV12 format we need to program the RGB2YUV coefficients. Currently, we don't program the coefficients and NV12 doesn't work at all. This patchset fixes that by programming a sane default(bt709, limited range) as rgb2yuv coefficients. In the long run, probably we need to think of a way for userspace to be able to program that, but for now I think this is better than not working at all or not advertising NV12 as a supported format for memwrite. Changes since v1: - Write the rgb2yuv coefficients only once, since we don't change them at all, just write them the first time NV12 is programmed, suggested by Brian Starkey, here [1] [1] https://lists.freedesktop.org/archives/dri-devel/2018-August/186819.html Signed-off-by: Alexandru Gheorghe Acked-by: Liviu Dudau Signed-off-by: Liviu Dudau commit cabce6343fdff516f954c367d0d57dd566244942 Author: Alexandru Gheorghe Date: Mon Jul 16 11:07:07 2018 +0100 drm: mali-dp: Call drm_crtc_vblank_reset on device init Currently, if userspace calls drm_wait_vblank before the crtc is activated the crtc vblank_enable hook is called, which in case of malidp driver triggers some warninngs. This happens because on device init we don't inform the drm core about the vblank state by calling drm_crtc_vblank_on/off/reset which together with drm_vblank_get have some magic that prevents calling drm_vblank_enable when crtc is off. Signed-off-by: Alexandru Gheorghe Acked-by: Liviu Dudau Signed-off-by: Liviu Dudau commit ef26d96023a4c34b1bcc4294f570df2b63a1b952 Author: Geert Uytterhoeven Date: Fri Sep 28 13:19:16 2018 +0200 pinctrl: sh-pfc: r8a77990: Add INTC-EX pins, groups and function Add pins, groups, and function for the Interrupt Controller for External Devices (INTC-EX) on the R-Car E3 SoC. Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman commit 4e53b5004745ef26a37bca4933b2d3ea71313f2a Author: Phil Edworthy Date: Wed Sep 26 10:10:52 2018 +0100 pinctrl: renesas: Renesas RZ/N1 pinctrl driver This provides a pinctrl driver for the Renesas RZ/N1 device family. Based on a patch originally written by Michel Pollet at Renesas. Signed-off-by: Phil Edworthy Reviewed-by: Jacopo Mondi Signed-off-by: Geert Uytterhoeven commit d6381fbbf2bcfd85206501072511e43a80cfc65f Author: Phil Edworthy Date: Wed Sep 26 10:10:51 2018 +0100 dt-bindings: pinctrl: renesas,rzn1-pinctrl: documentation The Renesas RZ/N1 device family PINCTRL node description. Based on a patch originally written by Michel Pollet at Renesas. Signed-off-by: Phil Edworthy Reviewed-by: Jacopo Mondi Signed-off-by: Geert Uytterhoeven commit 1f83515bebc236d2acda59976a8e852f1a6d50b7 Author: Marc Zyngier Date: Mon Oct 1 16:13:45 2018 +0200 genirq/msi: Allow creation of a tree-based irqdomain for platform-msi platform_msi_create_device_domain() always creates a revmap-based irqdomain, which has the drawback of requiring the number of MSIs that can be allocated ahead of time. This is not always possible, and we sometimes need to use a tree-based irqdomain instead. Add a new platform_msi_create_device_tree_domain() helper to that effect. Reported-by: Miquel Raynal Signed-off-by: Marc Zyngier Signed-off-by: Miquel Raynal Signed-off-by: Marc Zyngier commit 7ab78d02cae7963da9abefa15464b53adf04bc64 Merge: 1c15f655d160 40ad192f9e88 Author: Arnd Bergmann Date: Mon Oct 1 16:02:56 2018 +0200 Merge tag 'mvebu-soc-4.20-1' of git://git.infradead.org/linux-mvebu into next/soc mvebu soc for 4.20 (part 1) - use dt_fixup to provide fallback for enable-method for Armada XP - document the marvell,prestera compatible string - update Thomas Petazzoni email in MAINTAINERS file * tag 'mvebu-soc-4.20-1' of git://git.infradead.org/linux-mvebu: dt-bindings: marvell,prestera: Add common compatible string MAINTAINERS: replace free-electrons.com by bootlin.com for Thomas Petazzoni ARM: mvebu: use dt_fixup to provide fallback for enable-method Signed-off-by: Arnd Bergmann commit 1c15f655d160cce3779a4c7a5862407a90e0313f Merge: 16a1548013a2 c90dec00cc84 Author: Arnd Bergmann Date: Mon Oct 1 16:01:23 2018 +0200 Merge tag 'imx-soc-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into next/soc i.MX SoC update for 4.20: - Add ipg clock support in MMDC driver for registers access, so that we will be safe even if the clock is not turned on by firmware. - Register pm_power_off handler to provide power off support for iMX6 based boards with external PMIC. - Add platform code support for i.MX 6ULZ SoC which is a derivative of i.MX6ULL with some modules removed. * tag 'imx-soc-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: ARM: imx: add i.mx6ulz msl support ARM: imx6: register pm_power_off handler if "fsl,pmic-stby-poweroff" is set ARM: imx: add mmdc ipg clock operation for mmdc Signed-off-by: Arnd Bergmann commit 16a1548013a221064368b8219c0292caa896cbcc Merge: fe1497c019af e0c27a1066a9 Author: Arnd Bergmann Date: Mon Oct 1 15:58:21 2018 +0200 Merge tag 'actions-arm64-soc-for-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/afaerber/linux-actions into next/soc Actions Semi arm64 SoC for v4.20 This updates and extends the MAINTAINERS entry, adding Mani. It also selects PINCTRL in Kconfig. * tag 'actions-arm64-soc-for-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/afaerber/linux-actions: arm64: actions: Enable PINCTRL in platforms Kconfig MAINTAINERS: Add entry for Actions Semi Owl SoCs DMA driver MAINTAINERS: Add entry for Actions Semiconductor Owl I2C driver MAINTAINERS: Update clock binding entry for Actions Semi Owl SoCs MAINTAINERS: Add Actions Semi S900 clk entries MAINTAINERS: Add reviewer for ACTIONS platforms Signed-off-by: Arnd Bergmann commit fe1497c019afb5398280379c29fd42827967174b Author: Jisheng Zhang Date: Sat Sep 29 13:00:03 2018 +0800 MAINTAINERS: fix pattern in ARM/Synaptics berlin SoC section Berlin SoC files has been moved from marvell dir to synaptics dir, but commit bc52497a595d ("MAINTAINERS: update entry for ARM/berlin") didn't update the dir accordingly. This patch fixes it. From another side, new derivative SoCs from Synaptics may not be named as berlin*, so let's update the entries accordingly. Fixes: bc52497a595d ("MAINTAINERS: update entry for ARM/berlin") Signed-off-by: Jisheng Zhang Reported-by: Joe Perches Signed-off-by: Arnd Bergmann commit 8abac18fecbd3e6694583227d9b5f337e397f942 Author: Nishanth Menon Date: Fri Sep 28 17:46:15 2018 -0500 MAINTAINERS: Drop dt-bindings/genpd/k2g.h Drop include/dt-bindings/genpd/k2g.h which disappeared from kernel tree some time back, however MAINTAINERS file was missed to be updated. Fixes: d16645054d2f ("dt-bindings: Drop k2g genpd device ID macros") Cc: Rob Herring Cc: Dave Gerlach Cc: Santosh Shilimkar Cc: Tero Kristo Reported-by: Joe Perches Signed-off-by: Nishanth Menon Acked-by: Santosh Shilimkar Signed-off-by: Arnd Bergmann commit 8881ec5279182017fd8f6dcdb3a1aabe62a5837b Merge: e9a4dd999917 20bcd4a4d76d Author: Arnd Bergmann Date: Tue Oct 2 12:03:40 2018 +0200 Merge tag 'omap-for-v4.20/dt-signed-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/dt Devicetree changes for omap variants This branch contains a series of improvments for omap3-gta04 phone, and a series of clean-up for am335x to remove the deprecated phy_id property. The rest is to configure am57xx-idk boards for leds, load trigger, and smps, am3517-evm audio configuration, beaglebone hdmi cec support, coresight binding update, and fixes for i2c and spi warnings. * tag 'omap-for-v4.20/dt-signed-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: (70 commits) ARM: dts: add omap3-gta04a5one to Makefile ARM: dts: omap3-gta04: add pulldown/up settings for twl4030 gpio ARM: dts: am335x-boneblack: add cec support ARM: dts: am3517-evm: Add support for UI board and Audio ARM: dts: gta04: add serial console wakeup irq ARM: dts: am57xx-idk-common: Hook smps12 regulator as cpu vdd-supply ARM: dts: omap: Update coresight bindings for hardware ports ARM: dts: ti: Fix SPI and I2C bus warnings ARM: dts: dra62x-j5eco-evm: get rid of phy_id property ARM: dts: dm8148-t410: get rid of phy_id property ARM: dts: dm8148-evm: get rid of phy_id property ARM: dts: am57xx-cl-som-am57x: get rid of phy_id property ARM: dts: am57xx-idk-common: get rid of phy_id property ARM: dts: dra7-evm: get rid of phy_id property ARM: dts: dra71-evm: get rid of phy_id property ARM: dts: dra72-evm-revc: get rid of phy_id property ARM: dts: dra72-evm: get rid of phy_id property ARM: dts: dra76-evm: get rid of phy_id property ARM: dts: am437x-cm-t43: get rid of phy_id property ARM: dts: am437x-gp-evm: get rid of phy_id property ... Signed-off-by: Arnd Bergmann commit 7ae76c4c5a2d36e74bceb4a7a38488f5919339ad Author: Tho Vu Date: Sat Sep 22 17:02:52 2018 +0200 DT: pci: rcar-pci: document R8A77990 bindings Document the R-Car E3 (R8A77990) SoC in the R-Car PCIe bindings. Signed-off-by: Tho Vu Signed-off-by: Kazuya Mizuguchi Signed-off-by: Marek Vasut Signed-off-by: Lorenzo Pieralisi Reviewed-by: Wolfram Sang Reviewed-by: Simon Horman Reviewed-by: Geert Uytterhoeven Cc: Geert Uytterhoeven Cc: Lorenzo Pieralisi Cc: Phil Edworthy Cc: Rob Herring Cc: Sergei Shtylyov Cc: Simon Horman Cc: Wolfram Sang Cc: linux-renesas-soc@vger.kernel.org commit e9a4dd999917006274b2479ec898a5385f5bc5a1 Merge: 3a7c41e59939 620cfb31bad4 Author: Arnd Bergmann Date: Tue Oct 2 11:47:21 2018 +0200 Merge tag 'mvebu-dt64-4.20-1' of git://git.infradead.org/linux-mvebu into next/dt mvebu dt64 for 4.20 (part 1) - Add watchdog node on Armada 37xx - Update PPv2 interrupts name - Add support for the SolidRun Clearfog GT 8K (Aramda 8040 based) - Add thermal-zone nodes for Aramda 7K/8K * tag 'mvebu-dt64-4.20-1' of git://git.infradead.org/linux-mvebu: arm64: dts: marvell: armada-37xx: add nodes to support watchdog arm64: dts: marvell: armada-cp110: describe more PPv2 interrupts arm64: dts: marvell: armada-cp110: change the PPv2 IRQ names arm64: dts: add support for SolidRun Clearfog GT 8K arm64: dts: marvell: add thermal-zone node in cp110 DTSI file arm64: dts: marvell: add macro to make distinction between node names arm64: dts: marvell: add thermal-zone node in ap806 DTSI file arm64: dts: marvell: move AP806/CP110 thermal nodes into a new syscon Signed-off-by: Arnd Bergmann commit 3a7c41e59939b1cfb08dcd4cfef51e5633ae0e19 Merge: ca2fbd9ad4d3 e807f0298144 Author: Arnd Bergmann Date: Tue Oct 2 11:43:24 2018 +0200 Merge tag 'mvebu-dt-4.20-1' of git://git.infradead.org/linux-mvebu into next/dt mvebu dt for 4.20 (part 1) - updates the armada-xp-98dx3236 SoC and related boards to use the new style dts bindings for nand - add db-88f6820-amc board: plugin card for some of Marvell's switch development kits - fix SPI and I2C bus warnings coming with the new checks in dtc - add new compatible string "marvell,prestera" to the armada-xp-98dx* - fix sdhci supply property name on the clearfog (the '-supply' suffix was missing) * tag 'mvebu-dt-4.20-1' of git://git.infradead.org/linux-mvebu: ARM: dts: clearfog: fix sdhci supply property name ARM: dts: mvebu: add "marvell,prestera" to PP nodes ARM: dts: marvell: Fix SPI and I2C bus warnings ARM: dts: mvebu: Add device tree for db-88f6820-amc board ARM: dts: mvebu: db-xc3-24g4: use new style nand binding ARM: dts: mvebu: db-dxbc2: use new style nand binding ARM: dts: mvebu: 98dx3236: Rename nand controller node Signed-off-by: Arnd Bergmann commit ca2fbd9ad4d3a0c340d7f13400d8e3277507cd35 Merge: 476ca77f0f13 b739c177e1ae Author: Arnd Bergmann Date: Tue Oct 2 11:41:43 2018 +0200 Merge tag 'imx-dt64-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into next/dt Freescale arm64 device tree update for 4.20: - Add the second Dual UART device for LS208xA SoCs. - Add necessary big-endian property for NOR device on LS104xA based boards, remove unneeded big-endian property from IFC controller. - DTC has new checks for I2C and SPI buses to land into 4.20. A patch from Rob to fix the bus node names and warnings in unit-addresses. * tag 'imx-dt64-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: arm64: dts: fsl: Fix I2C and SPI bus warnings arm64: dts: ls208xa: add second duart arm64: dts: fsl: remove big-endian field from IFC controller arm64: dts: Add big-endian in nor node for ls104xa Signed-off-by: Arnd Bergmann commit 476ca77f0f13d0dd30cdaf91d797cddab4976848 Merge: 55dc97235b65 04007fe4c65f Author: Arnd Bergmann Date: Tue Oct 2 11:36:53 2018 +0200 Merge tag 'imx-dt-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into next/dt i.MX device tree update for 4.20: - New board support: Engicam's i.Core MX6 CPU module v1.5; ConnectCore 6UL Single Board Computer (SBC) Pro; i.MX6 ULZ based EVK board. - Add Add SFF interface support for vf610-zii board. - Disable unneeded devices like VPU and internal watchdog for imx51-zii boards. - Add 'no-sdio' and 'no-sd' property for vf610-zii-cfu1 board. - Improve i.MX6 SLL GPIO support by adding gpio-ranges property and clocks information. - Update iomux header for i.MX7 Solo and i.MX6 ULL. - Enable GPIO buttons as wakeup source for imx7d-sdb and imx6sx-sdb. - Add GPIO keys and egalax touch screen support for imx6qdl-sabreauto. - Switch to use SPDX-License-Identifier for more boards - vf610-twr, imx7s-warp, Engicam boards. - Add device tree bindings of 'fsl,pmic-stby-poweroff' property and add the support for i.MX6 RIoTboard. - DTC has new checks for SPI buses which will be landed on 4.20. A patch from Rob to fix those 100+ warnings on i.MX boards. (Thanks!) - Switch i.MX7 device tree to use updated coresight binding for hardware ports. - Misc small or random update and cleanup. * tag 'imx-dt-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: (50 commits) ARM: dts: imx: add i.mx6ulz and i.mx6ulz 14x14 evk support dt-bindings: arm: add compatible for i.MX6ULZ 14x14 EVK board ARM: dts: imx53-ppd: Remove 'num-chipselects' property ARM: dts: vf610-twr: Switch to SPDX identifier ARM: dts: vf: Switch to SPDX identifier ARM: dts: imx6qdl-zii-rdu2: Disable the internal RTC ARM: dts: imx51-zii-rdu1: Fix the rtc compatible string ARM: dts: imx6ul: use nvmem-cells for cpu speed grading ARM: dts: imx: Fix SPI bus warnings ARM: dts: imx7: Update coresight binding for hardware ports ARM: dts: vf610-zii-cfu1: Pass the 'no-sd' property ARM: dts: vf610-zii-cfu1: Pass the 'no-sdio' property ARM: dts: imx51-zii-scu2-mezz: Disable the internal watchdog ARM: dts: imx51-zii-scu2-mezz: Disable VPU ARM: dts: imx51-zii-scu3-esb: Disable VPU ARM: dts: imx51: Add label for VPU node ARM: dts: imx6ull: update vdd_soc voltage for 900MHz operating point ARM: dts: imx6ul: Add DTS for ConnectCore 6UL SBC Pro ARM: dts: imx6: RIoTboard provide standby on power off option dt-bindings: imx6q-clock: add new fsl,pmic-stby-poweroff property ... Signed-off-by: Arnd Bergmann commit 0c4cb97d4ec9d98fc5e30317326f28ed206f3ac6 Author: Biju Das Date: Tue Sep 25 17:56:34 2018 +0100 dt-bindings: irqchip: renesas-irqc: Document r8a7744 support Document RZ/G1N (R8A7744) SoC bindings. Reviewed-by: Chris Paterson Reviewed-by: Simon Horman Reviewed-by: Geert Uytterhoeven Signed-off-by: Biju Das Signed-off-by: Marc Zyngier commit 339794e36d5e3c85f335bfdd3bd26e40c5f5e064 Author: Geert Uytterhoeven Date: Fri Sep 28 13:32:38 2018 +0200 dt-bindings: irqchip: renesas-irqc: Document R-Car E3 support Document support for the Interrupt Controller for External Devices (INTC-EX) in the Renesas E3 (r8a77990) SoC. No driver update is needed. Signed-off-by: Geert Uytterhoeven Signed-off-by: Marc Zyngier commit 7bae48b22c8d38c5cd50f52b6e15d134e2bb3935 Author: Lina Iyer Date: Thu Sep 27 11:18:10 2018 -0600 irqchip/pdc: Setup all edge interrupts as rising edge at GIC The PDC irqchp can convert a falling edge or level low interrupt to a rising edge or level high interrupt at the GIC. We just need to setup the GIC correctly. Set up the interrupt type for the IRQ_TYPE_EDGE_BOTH as IRQ_TYPE_EDGE_RISING at the GIC. Fixes: f55c73aef890 ("irqchip/pdc: Add PDC interrupt controller for QCOM SoCs") Reported-by: Evan Green Reviewed-by: Evan Green Signed-off-by: Lina Iyer Signed-off-by: Marc Zyngier commit 5e2c9f9a627772672accd80fa15359c0de6aa894 Author: Marc Zyngier Date: Fri Jul 27 16:23:18 2018 +0100 irqchip/gic-v3-its: Allow use of LPI tables in reserved memory If the LPI tables have been reserved with the EFI reservation mechanism, we assume that these tables are safe to use even when we find the redistributors to have LPIs enabled at boot time, meaning that kexec can now work with GICv3. You're welcome. Tested-by: Jeremy Linton Tested-by: Bhupesh Sharma Tested-by: Lei Zhang Signed-off-by: Marc Zyngier commit 3fb68faee8676900f896d1615442aeca36e5f940 Author: Marc Zyngier Date: Fri Jul 27 16:21:18 2018 +0100 irqchip/gic-v3-its: Register LPI tables with EFI config table Upon enabling a redistributor, let's register the allocated tables with the EFI table that tracks the memory reservations. Tested-by: Jeremy Linton Tested-by: Bhupesh Sharma Tested-by: Lei Zhang Signed-off-by: Marc Zyngier commit f842ca8e9c8a80d07f5589536311250d7d6018f9 Author: Marc Zyngier Date: Fri Jul 27 16:03:31 2018 +0100 irqchip/gic-v3-its: Check that all RDs have the same property table If booting with LPIs enabled, all the redistributors must have the exact same property table. No ifs, no buts. Tested-by: Jeremy Linton Tested-by: Bhupesh Sharma Tested-by: Lei Zhang Signed-off-by: Marc Zyngier commit c6e2ccb66d0c3b4fffc59932585e9f709ad59003 Author: Marc Zyngier Date: Tue Jun 26 11:21:11 2018 +0100 irqchip/gic-v3-its: Use pre-programmed redistributor tables with kdump kernels If using a kdump kernel, and that we cannot disable LPIs to install our own tables, let's switch to using the already allocated tables. This means that we'll change some of the initial kernel's memory, but at least we'll be able to have LPIs in this secondary kernel. Tested-by: Jeremy Linton Tested-by: Bhupesh Sharma Tested-by: Lei Zhang Signed-off-by: Marc Zyngier commit c440a9d9d113b9b3cd99bb5096c4aa47d515e463 Author: Marc Zyngier Date: Fri Jul 27 15:40:13 2018 +0100 irqchip/gic-v3-its: Allow use of pre-programmed LPI tables In order to cope with kexec and GICv3, let's try and spot when we're booting with LPIs already enabled, and the tables already programmed into the redistributors. This code is currently guarded by a predicate that is always false, meaning this is not functionnal just yet. Reviewed-by: Julien Thierry Tested-by: Jeremy Linton Tested-by: Bhupesh Sharma Tested-by: Lei Zhang Signed-off-by: Marc Zyngier commit e1a2e2010ba9d3c765b2e37a7ae8b332564716f1 Author: Marc Zyngier Date: Fri Jul 27 14:36:00 2018 +0100 irqchip/gic-v3-its: Keep track of property table's PA and VA We're currently only tracking the page allocated to contain the property table by its struct page. In the future, it is going to be convenient to track both PA and VA for that page instead. Let's do that. Tested-by: Jeremy Linton Tested-by: Bhupesh Sharma Tested-by: Lei Zhang Signed-off-by: Marc Zyngier commit 11e37d357f6ba7a9af850a872396082cc0a0001f Author: Marc Zyngier Date: Fri Jul 27 13:38:54 2018 +0100 irqchip/gic-v3-its: Move pending table allocation to init time Pending tables for the redistributors are currently allocated one at a time as each CPU boots. This is causing some grief for Linux/RT (allocation from within a CPU hotplug notifier is frown upon). Let's move this allocation to take place at init time, when we only have a single CPU. It means we're allocating memory for CPUs that are not online yet, but most system will boot all of their CPUs anyway, so that's not completely wasted. Tested-by: Jeremy Linton Tested-by: Bhupesh Sharma Tested-by: Lei Zhang Signed-off-by: Marc Zyngier commit 053be4854f9bcceba99cdfa0c89acc4696852c3f Author: Marc Zyngier Date: Fri Jul 27 15:02:27 2018 +0100 irqchip/gic-v3-its: Split property table clearing from allocation As we're going to reuse some pre-allocated memory for the property table, split out the zeroing of that table into a separate function for later use. Tested-by: Jeremy Linton Tested-by: Bhupesh Sharma Tested-by: Lei Zhang Signed-off-by: Marc Zyngier commit adaab500dd81a59d2b3b0ce3e995db5b9e3ee8a4 Author: Marc Zyngier Date: Tue Jul 17 18:06:39 2018 +0100 irqchip/gic-v3-its: Simplify LPI_PENDBASE_SZ usage LPI_PENDING_SZ is always used in conjunction with a max(), which doesn't make much sense, since we're guaranteed that LPI_PENDING_SZ is already aligned to 64K. Let's remove it. Tested-by: Jeremy Linton Tested-by: Bhupesh Sharma Tested-by: Lei Zhang Signed-off-by: Marc Zyngier commit d38a71c5452529fd3326b0ae488292e5fbd8d2a1 Author: Marc Zyngier Date: Fri Jul 27 14:51:04 2018 +0100 irqchip/gic-v3-its: Change initialization ordering for LPIs We currently initialize the LPIs (and the ITS) fairly early, even before the SMP support and the CPU interface. This is a bit odd (as LPIs are not exactly crutial for the early boot process), and is going to cause issues when reorganizing the probing code. Let's move this initialization later. Reviewed-by: Julien Thierry Tested-by: Jeremy Linton Tested-by: Bhupesh Sharma Tested-by: Lei Zhang Signed-off-by: Marc Zyngier commit 55dc97235b6553d27661ee1fb05d882c7c776b96 Merge: 5908704d98e0 ca02f96b95ca Author: Arnd Bergmann Date: Tue Oct 2 11:32:10 2018 +0200 Merge tag 'qcom-dts-for-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux into next/dt Qualcomm Device Tree Changes for v4.20 * Fix IRQ constants usage on MSM8974 * Add led, gpio-button, sdcc, and pcie nodes for IPQ8064 * Move/cleanup common nodes for IPQ8064 * Add i2c sensor nodes for MSM8974 Hammerhead * Fixes for SAW, kpss, opp, pci range, and space/tab on IPQ4019 * Update coresight bindings * tag 'qcom-dts-for-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux: ARM: dts: qcom: Update coresight bindings for hardware ports ARM: dts: qcom-msm8974: change invalid flag IRQ NONE to valid value ARM: dts: qcom: ipq4019: fix space vs tab indenting inside qcom-ipq4019.dtsi ARM: dts: qcom: ipq4019: fix PCI range ARM: dts: qcom: ipq4019: fix cpu0's qcom,saw2 reg value ARM: dts: qcom: ipq4019: add cpu operating points for cpufreq support ARM: dts: qcom: ipq4019: use v2 of the kpss bringup mechanism ARM: dts: qcom: msm8974-hammerhead: add device tree bindings for ALS / proximity ARM: dts: qcom: msm8974-hammerhead: add device tree bindings for mpu6515 ARM: dts: qcom: Add led and gpio-button nodes to ipq8064 boards ARM: dts: qcom: Move common nodes to ipq8064-v.1.0.dtsi ARM: dts: qcom: Add sdcc nodes for ipq8064 ARM: dts: qcom: Add pcie nodes for ipq8064 ARM: dts: qcom-msm8974: change invalid flag IRQ NONE to valid value ARM: dts: qcom-msm8974: use named constant for interrupt flag NONE ARM: dts: qcom-msm8974: use named constant for interrupt flag LEVEL HIGH ARM: dts: qcom-msm8974: use named constant for interrupt flag EDGE RISING ARM: dts: qcom-msm8974: use named constant for interrupt type GIC_SPI ARM: dts: qcom-msm8974: use named constant for interrupt type GIC_PPI Signed-off-by: Arnd Bergmann commit 5908704d98e0aca3765feca7824e90327bcfff5e Merge: 6a11b1804a10 6db0483cf622 Author: Arnd Bergmann Date: Tue Oct 2 11:21:52 2018 +0200 Merge tag 'qcom-arm64-for-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux into next/dt Qualcomm ARM64 Updates for v4.20 * Update Coresight for MSM8916 * Switch to use mailbox for smp2p and smd on MSM8996 * Add dispcc, dsp, USB, regulator, and other nodes for SDM845 * Drop model/compatible from MSM8916 and MSM8996 * Add compat for db820c * Add MSM8998 SoC and board support along with associated nodes * Add RESIN/PON for Qualcomm PM8916 and PM8994 * tag 'qcom-arm64-for-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux: (31 commits) Revert "dt-bindings: thermal: qcom-spmi-temp-alarm: Fix documentation of 'reg'" Revert "dt-bindings: iio: vadc: Fix documentation of 'reg'" arm64: dts: msm8916: Update coresight bindings for hardware ports arm64: dts: msm8996: Transition smp2p and smd to mailbox arm64: dts: qcom: pm8998: Add pm8998 thermal zone arm64: dts: qcom: pm8998: Add spmi-temp-alarm node dt-bindings: thermal: qcom-spmi-temp-alarm: Fix documentation of 'reg' arm64: dts: sdm845: Add dispcc node arm64: dts: qcom: sdm845: Add adsp, cdsp and slpi smp2p arm64: dts: qcom: sdm845-mtp: Add nodes for USB arm64: dts: qcom: sdm845-mtp: Add RPMh VRM/XOB regulators arm64: dts: qcom: sdm845: Add USB-related nodes arm64: dts: qcom: Add AOSS reset driver node for SDM845 arm64: dts: msm8996: Drop model arm64: dts: msm8916: Drop model and compatible arm64: dts: db820c: Add qcom,apq8096 to compatible string arm64: dts: qcom: Populate pm8998 with additional nodes arm64: dts: qcom: msm8998: Add smp2p nodes arm64: dts: qcom: msm8998: Add the qfprom node arm64: dts: qcom: msm8998: Add firmware node ... Signed-off-by: Arnd Bergmann commit 6a11b1804a1056c66b1308d8491204d2be1f00cf Merge: 6a2340c9d73c 01463ac63b53 Author: Arnd Bergmann Date: Tue Oct 2 11:18:24 2018 +0200 Merge tag 'actions-arm64-dt-for-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/afaerber/linux-actions into next/dt Actions Semi arm64 based SoC DT for v4.20 This updates SPDX headers for remaining files. For S900 it adds clock, pinctrl, i2c and dma nodes. S900 SPS is added via topic branch (shared with driver). For S700 it adds clock nodes. * tag 'actions-arm64-dt-for-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/afaerber/linux-actions: arm64: dts: actions: s700: Set UART clock references from CMU arm64: dts: actions: s700: Add Clock Management Unit arm64: dts: actions: s900: Add DMA Controller arm64: dts: actions: s900-bubblegum-96: Enable I2C1 and I2C2 arm64: dts: actions: s900: Add I2C controller nodes arm64: dts: actions: s900-bubblegum-96: Add gpio line names arm64: dts: actions: s900: Add gpio properties to pinctrl node arm64: dts: actions: s900: Add pinctrl node arm64: dts: actions: s900: Add SPS node arm64: dts: actions: s900: Source CMU clock for UARTs arm64: dts: actions: s900: Add Clock Management Unit nodes dt-bindings: power: Add Actions Semi S900 SPS arm64: dts: actions: Convert to new-style SPDX license identifiers Signed-off-by: Arnd Bergmann commit 6a2340c9d73cca3534b1b3a328e78f5bc8291317 Merge: 508b330b8210 54f884cfce07 Author: Arnd Bergmann Date: Tue Oct 2 11:16:16 2018 +0200 Merge tag 'actions-arm-dt-for-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/afaerber/linux-actions into next/dt Actions Semi arm based SoC DT for v4.20 This updates SPDX headers for remaining files. * tag 'actions-arm-dt-for-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/afaerber/linux-actions: ARM: dts: owl: Convert to new-style SPDX license identifiers Signed-off-by: Arnd Bergmann commit 508b330b8210adc7b48f5a9c0c04fb17ab60845d Merge: f6cfb9058238 3c2ac5b3ebcd Author: Arnd Bergmann Date: Tue Oct 2 11:13:38 2018 +0200 Merge tag 'v4.19-next-dts64' of git://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux into next/dt mt2712 - add spi slave node mt7622: - add timer node - add CCI node - add PMU node - add bluetooth node - add SPI slave node - fix reference board (rfb1) memory and sort node alphabetically - add support for Bananapi-R64 * tag 'v4.19-next-dts64' of git://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux: arm64: dts: Add spi slave dts arm64: dts: mt7622: add bananapi BPI-R64 board arm64: dts: mt7622: fix ram size for rfb1 arm64: dts: mt7622: add a bluetooth 5 device node arm64: dts: mt7622: add timer, CCI-400 and PMU nodes Signed-off-by: Arnd Bergmann commit bccb484b9a8d1695df1094991df2bdcf83a4b921 Author: Andrew Murray Date: Mon Oct 1 12:01:03 2018 +0100 Documentation/lockstat: Fix trivial typo Fix incorrect line number in example output Signed-off-by: Andrew Murray Cc: Jiri Kosina Cc: Jonathan Corbet Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Will Deacon Cc: linux-doc@vger.kernel.org Link: http://lkml.kernel.org/r/1538391663-54524-1-git-send-email-andrew.murray@arm.com Signed-off-by: Ingo Molnar commit de0c18a87cfa094cb23655624859e09da5146e2a Author: Stephen Boyd Date: Mon Oct 1 14:49:05 2018 -0700 pinctrl: msm: Actually use function 0 for gpio selection This code needs to select function #0, which is the first int in the array of functions, not the number 0 which may or may not be the function for "GPIO mode" per the enum mapping. We were getting lucky on SDM845, where this was tested, because the function 0 matched the enum value for "GPIO mode". On other platforms, e.g. MSM8996, the gpio enum value is the last one in the list so this code doesn't work and we see a warning at boot. Fix it by grabbing the first element out of the array of functions. Cc: Doug Anderson Cc: Bjorn Andersson Cc: Niklas Cassel Reported-by: Niklas Cassel Fixes: 1de7ddb3a15c ("pinctrl: msm: Mux out gpio function with gpio_request()") Signed-off-by: Stephen Boyd Reviewed-by: Bjorn Andersson Tested-by: Niklas Cassel Signed-off-by: Linus Walleij commit f6cfb90582388df120083ff2c5aa90f178787076 Merge: 26220da2ab08 679294497be3 Author: Arnd Bergmann Date: Tue Oct 2 10:28:14 2018 +0200 Merge tag 'sunxi-dt64-for-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into next/dt Allwinner arm64 DT changes for 4.20 Our usual set of DT changes for the arm64 Allwinner SoCs. The most notable things are: - HDMI support on the A64 - New boards: OrangePi One Plus * tag 'sunxi-dt64-for-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: (28 commits) arm64: dts: allwinner: a64: a64-olinuxino: set the PHY TX delay arm64: dts: allwinner: a64: Enable HDMI output on A64 boards w/ HDMI arm64: dts: allwinner: a64: Add display pipeline arm64: dts: allwinner: h6: add system controller device tree node arm64: dts: allwinner: h6: Add OrangePi One Plus initial support arm64: dts: allwinner: a64: Rename r_i2c_pins_a label to r_i2c_pl89_pins arm64: dts: allwinner: a64: Rename uart0_pins_a label to uart0_pb_pins arm64: dts: allwinner: a64: Split out data strobe pin from mmc2 pinmux arm64: dts: allwinner: a64: NanoPi-A64: Add blue status LED arm64: dts: allwinner: a64: NanoPi-A64: Add Wifi chip arm64: dts: allwinner: a64: NanoPi-A64: Add Ethernet arm64: dts: allwinner: a64: NanoPi-A64: Fix DCDC1 voltage arm64: dts: allwinner: a64: Olinuxino: enable USB arm64: dts: allwinner: a64: Olinuxino: add Ethernet nodes arm64: dts: allwinner: a64: Olinuxino: fix DRAM voltage arm64: dts: allwinner: a64: Orange Pi Win: Adjust CSI power rails arm64: dts: allwinner: a64: Orange Pi Win: Add SPI flash node arm64: dts: allwinner: a64: Orange Pi Win: Add SDIO node arm64: dts: allwinner: a64: Orange Pi Win: Add LED node arm64: dts: allwinner: a64: Orange Pi Win: Add UARTs ... Signed-off-by: Arnd Bergmann commit 2f359c7ea554ba9cb78a52c82bedff351cdabd2b Author: Andrea Parri Date: Wed Sep 26 11:29:20 2018 -0700 locking/memory-barriers: Replace smp_cond_acquire() with smp_cond_load_acquire() Amend the changes in commit: 1f03e8d2919270 ("locking/barriers: Replace smp_cond_acquire() with smp_cond_load_acquire()") ... by updating the documentation accordingly. Also remove some obsolete information related to the implementation. Signed-off-by: Andrea Parri Signed-off-by: Paul E. McKenney Acked-by: Will Deacon Acked-by: Alan Stern Cc: Akira Yokosawa Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Boqun Feng Cc: Daniel Lustig Cc: David Howells Cc: Jade Alglave Cc: Jiri Olsa Cc: Jonathan Corbet Cc: Linus Torvalds Cc: Luc Maranget Cc: Nicholas Piggin Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Cc: linux-arch@vger.kernel.org Cc: parri.andrea@gmail.com Link: http://lkml.kernel.org/r/20180926182920.27644-5-paulmck@linux.ibm.com Signed-off-by: Ingo Molnar commit d8fa25c4efde0e5f31a427202e583d73d3f021c4 Author: Paul E. McKenney Date: Wed Sep 26 11:29:19 2018 -0700 tools/memory-model: Add more LKMM limitations This commit adds more detail about compiler optimizations and not-yet-modeled Linux-kernel APIs. Signed-off-by: Paul E. McKenney Reviewed-by: Andrea Parri Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Cc: akiyks@gmail.com Cc: boqun.feng@gmail.com Cc: dhowells@redhat.com Cc: j.alglave@ucl.ac.uk Cc: linux-arch@vger.kernel.org Cc: luc.maranget@inria.fr Cc: npiggin@gmail.com Cc: parri.andrea@gmail.com Cc: stern@rowland.harvard.edu Cc: will.deacon@arm.com Link: http://lkml.kernel.org/r/20180926182920.27644-4-paulmck@linux.ibm.com Signed-off-by: Ingo Molnar commit 3d2046a6fa2106584cf1080c2c08a6e8e79cbbb4 Author: SeongJae Park Date: Wed Sep 26 11:29:18 2018 -0700 tools/memory-model: Fix a README typo This commit fixes a duplicate-"the" typo in README. Signed-off-by: SeongJae Park Signed-off-by: Paul E. McKenney Acked-by: Alan Stern Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Cc: akiyks@gmail.com Cc: boqun.feng@gmail.com Cc: dhowells@redhat.com Cc: j.alglave@ucl.ac.uk Cc: linux-arch@vger.kernel.org Cc: luc.maranget@inria.fr Cc: npiggin@gmail.com Cc: parri.andrea@gmail.com Cc: will.deacon@arm.com Link: http://lkml.kernel.org/r/20180926182920.27644-3-paulmck@linux.ibm.com Signed-off-by: Ingo Molnar commit 6e89e831a90172bc3d34ecbba52af5b9c4a447d1 Author: Alan Stern Date: Wed Sep 26 11:29:17 2018 -0700 tools/memory-model: Add extra ordering for locks and remove it for ordinary release/acquire More than one kernel developer has expressed the opinion that the LKMM should enforce ordering of writes by locking. In other words, given the following code: WRITE_ONCE(x, 1); spin_unlock(&s): spin_lock(&s); WRITE_ONCE(y, 1); the stores to x and y should be propagated in order to all other CPUs, even though those other CPUs might not access the lock s. In terms of the memory model, this means expanding the cumul-fence relation. Locks should also provide read-read (and read-write) ordering in a similar way. Given: READ_ONCE(x); spin_unlock(&s); spin_lock(&s); READ_ONCE(y); // or WRITE_ONCE(y, 1); the load of x should be executed before the load of (or store to) y. The LKMM already provides this ordering, but it provides it even in the case where the two accesses are separated by a release/acquire pair of fences rather than unlock/lock. This would prevent architectures from using weakly ordered implementations of release and acquire, which seems like an unnecessary restriction. The patch therefore removes the ordering requirement from the LKMM for that case. There are several arguments both for and against this change. Let us refer to these enhanced ordering properties by saying that the LKMM would require locks to be RCtso (a bit of a misnomer, but analogous to RCpc and RCsc) and it would require ordinary acquire/release only to be RCpc. (Note: In the following, the phrase "all supported architectures" is meant not to include RISC-V. Although RISC-V is indeed supported by the kernel, the implementation is still somewhat in a state of flux and therefore statements about it would be premature.) Pros: The kernel already provides RCtso ordering for locks on all supported architectures, even though this is not stated explicitly anywhere. Therefore the LKMM should formalize it. In theory, guaranteeing RCtso ordering would reduce the need for additional barrier-like constructs meant to increase the ordering strength of locks. Will Deacon and Peter Zijlstra are strongly in favor of formalizing the RCtso requirement. Linus Torvalds and Will would like to go even further, requiring locks to have RCsc behavior (ordering preceding writes against later reads), but they recognize that this would incur a noticeable performance degradation on the POWER architecture. Linus also points out that people have made the mistake, in the past, of assuming that locking has stronger ordering properties than is currently guaranteed, and this change would reduce the likelihood of such mistakes. Not requiring ordinary acquire/release to be any stronger than RCpc may prove advantageous for future architectures, allowing them to implement smp_load_acquire() and smp_store_release() with more efficient machine instructions than would be possible if the operations had to be RCtso. Will and Linus approve this rationale, hypothetical though it is at the moment (it may end up affecting the RISC-V implementation). The same argument may or may not apply to RMW-acquire/release; see also the second Con entry below. Linus feels that locks should be easy for people to use without worrying about memory consistency issues, since they are so pervasive in the kernel, whereas acquire/release is much more of an "experts only" tool. Requiring locks to be RCtso is a step in this direction. Cons: Andrea Parri and Luc Maranget think that locks should have the same ordering properties as ordinary acquire/release (indeed, Luc points out that the names "acquire" and "release" derive from the usage of locks). Andrea points out that having different ordering properties for different forms of acquires and releases is not only unnecessary, it would also be confusing and unmaintainable. Locks are constructed from lower-level primitives, typically RMW-acquire (for locking) and ordinary release (for unlock). It is illogical to require stronger ordering properties from the high-level operations than from the low-level operations they comprise. Thus, this change would make while (cmpxchg_acquire(&s, 0, 1) != 0) cpu_relax(); an incorrect implementation of spin_lock(&s) as far as the LKMM is concerned. In theory this weakness can be ameliorated by changing the LKMM even further, requiring RMW-acquire/release also to be RCtso (which it already is on all supported architectures). As far as I know, nobody has singled out any examples of code in the kernel that actually relies on locks being RCtso. (People mumble about RCU and the scheduler, but nobody has pointed to any actual code. If there are any real cases, their number is likely quite small.) If RCtso ordering is not needed, why require it? A handful of locking constructs (qspinlocks, qrwlocks, and mcs_spinlocks) are built on top of smp_cond_load_acquire() instead of an RMW-acquire instruction. It currently provides only the ordinary acquire semantics, not the stronger ordering this patch would require of locks. In theory this could be ameliorated by requiring smp_cond_load_acquire() in combination with ordinary release also to be RCtso (which is currently true on all supported architectures). On future weakly ordered architectures, people may be able to implement locks in a non-RCtso fashion with significant performance improvement. Meeting the RCtso requirement would necessarily add run-time overhead. Overall, the technical aspects of these arguments seem relatively minor, and it appears mostly to boil down to a matter of opinion. Since the opinions of senior kernel maintainers such as Linus, Peter, and Will carry more weight than those of Luc and Andrea, this patch changes the model in accordance with the maintainers' wishes. Signed-off-by: Alan Stern Signed-off-by: Paul E. McKenney Reviewed-by: Will Deacon Reviewed-by: Andrea Parri Acked-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Cc: akiyks@gmail.com Cc: boqun.feng@gmail.com Cc: dhowells@redhat.com Cc: j.alglave@ucl.ac.uk Cc: linux-arch@vger.kernel.org Cc: luc.maranget@inria.fr Cc: npiggin@gmail.com Cc: parri.andrea@gmail.com Link: http://lkml.kernel.org/r/20180926182920.27644-2-paulmck@linux.ibm.com Signed-off-by: Ingo Molnar commit c4f790f244070dbab486805276ba4d1f87a057af Author: Paul E. McKenney Date: Wed Sep 26 11:29:16 2018 -0700 tools/memory-model: Add litmus-test naming scheme This commit documents the scheme used to generate the names for the litmus tests. [ paulmck: Apply feedback from Andrea Parri and Will Deacon. ] Signed-off-by: Paul E. McKenney Acked-by: Will Deacon Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Cc: akiyks@gmail.com Cc: boqun.feng@gmail.com Cc: dhowells@redhat.com Cc: j.alglave@ucl.ac.uk Cc: linux-arch@vger.kernel.org Cc: luc.maranget@inria.fr Cc: npiggin@gmail.com Cc: parri.andrea@gmail.com Cc: stern@rowland.harvard.edu Link: http://lkml.kernel.org/r/20180926182920.27644-1-paulmck@linux.ibm.com Signed-off-by: Ingo Molnar commit 26220da2ab08cca61378359f5e1e00848062cc1b Merge: 8bdc2e568630 57a83c5222c1 Author: Arnd Bergmann Date: Tue Oct 2 10:25:41 2018 +0200 Merge tag 'sunxi-dt-for-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into next/dt Allwinner DT changes for 4.20 Our usual bunch of DT patches for the Allwinner arm32 SoCs. The most notable changes are: - Support for the video decoding / encoding engine on the A10s/A13/A20/A33 - IR support for the A83t - SATA support for the R40 * tag 'sunxi-dt-for-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: ARM: dts: sun9i: Fix I2C bus warnings ARM: dts: sunxi: Fix I2C bus warnings ARM: dts: sun8i-a33: Add Video Engine and reserved memory nodes ARM: dts: sun7i-a20: Add Video Engine and reserved memory nodes ARM: dts: sun5i: Add Video Engine and reserved memory nodes ARM: dts: sun8i: sun8i-r40-bananapi-m2-ultra: enable AHCI ARM: dts: sun8i: r40: add sata node ARM: dts: sunxi: Don't use cd-inverted in sun8i-r40-bananapi-m2-ultra ARM: dts: sun8i: a83t: bananapi-m3: Enable IR controller ARM: dts: sun8i: a83t: Add support for the cir interface ARM: dts: sun8i: a83t: Add the cir pin for the A83T Signed-off-by: Arnd Bergmann commit 8bdc2e568630802ede5233cb1091f7161c78ddcf Merge: 83d52cd0dcd5 6eeb4180d4b9 Author: Arnd Bergmann Date: Tue Oct 2 10:19:31 2018 +0200 Merge tag 'sunxi-h3-h5-for-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into next/dt Allwinner H3 and H5 DT additions for 4.20 This is our usual H3/H5 pull request The most notable changes are: - the video decoding / encoding unit is finally enabled on the H3 - Mali support for the H5 - New boards: BananaPi M2+ v1.2, Orange Pi Zero Plus 2 H3 support * tag 'sunxi-h3-h5-for-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: ARM: dts: sunxi: h3-h5: Add Bananapi M2+ v1.2 device trees ARM: dts: sun8i-h3: Add Video Engine and reserved memory nodes arm64: dts: allwinner: h5: Add device tree for Bananapi M2 Plus H5 ARM: dts: sun8i: h3: Split out non-SoC-specific parts of Bananapi M2 Plus ARM: dts: sun8i: h3: bpi-m2-plus: Fix address for external RGMII Ethernet PHY ARM: dts: sun8i: h3-h5: ir register size should be the whole memory block arm64: dts: allwinner: h5: Add device node for Mali-450 GPU ARM: dts: sun8i: Add initial Orangepi Zero Plus 2 H3 support nvmem: sunxi-sid: add support for H5's SID controller Signed-off-by: Arnd Bergmann commit d0346559a7c358a5328e1fa43135acc548c0f224 Merge: 291d0e5d81e1 b56ada120921 Author: Ingo Molnar Date: Tue Oct 2 10:21:32 2018 +0200 Merge branch 'for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu into core/rcu Pull v4.20 RCU changes from Paul E. McKenney: - Documentation updates, including some good-eye catches from Joel Fernandes. - SRCU updates, most notably changes enabling call_srcu() to be invoked very early in the boot sequence. - Torture-test updates, including some preliminary work towards making rcutorture better able to find problems that result in insufficient grace-period forward progress. - Consolidate the RCU-bh, RCU-preempt, and RCU-sched flavors into a single flavor similar to RCU-sched in !PREEMPT kernels and into a single flavor similar to RCU-preempt (but also waiting on preempt-disabled sequences of code) in PREEMPT kernels. This branch also includes a refactoring of rcu_{nmi,irq}_{enter,exit}() from Byungchul Park. - Now that there is only one RCU flavor in any given running kernel, the many "rsp" pointers are no longer required, and this cleanup series removes them. - This branch carries out additional cleanups made possible by the RCU flavor consolidation, including inlining how-trivial functions, updating comments and definitions, and removing now-unneeded rcutorture scenarios. - Initial changes to RCU to better promote forward progress of grace periods, including fixing a bug found by Marius Hillenbrand and David Woodhouse, with the fix suggested by Peter Zijlstra. - Now that there is only one flavor of RCU in any running kernel, there is also only on rcu_data structure per CPU. This means that the rcu_dynticks structure can be merged into the rcu_data structure, a task taken on by this branch. This branch also contains a -rt-related fix from Mike Galbraith. Signed-off-by: Ingo Molnar commit 9620135fe10a07e0c96d9593e09215954ce81520 Merge: 64d20b774f49 8d8e3b7d8f06 Author: Arnd Bergmann Date: Tue Oct 2 10:15:07 2018 +0200 Merge tag 'imx-drivers-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into next/drivers i.MX drivers update for 4.20: - A couple of patches from Anson to update variable and macro naming in GPCv2 driver, as a preparation of reusing the driver on i.MX8. - Switch GPC/GPCv2 drivers to use SPDX identifier for licence claiming. - Clean up the unnecessary DT node name NULL pointer checking from imx-weim driver, since it can never be NULL at all. - A couple of improvements on GPC driver from Sven Schmitt to correct PDN register and use GPC_PGC_DOMAIN_* indexes for consistency. * tag 'imx-drivers-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: soc: imx: gpcv2: Switch to SPDX identifier soc: imx: gpc: Switch to SPDX identifier bus: imx-weim: drop unnecessary DT node name NULL check soc: imx: gpcv2: make pgc driver more generic for other i.MX platforms soc: imx: gpcv2: use A_CORE instread of A7 for more i.MX platforms soc: imx: gpc: use GPC_PGC_DOMAIN_* indexes soc: imx: gpc: fix PDN delay Signed-off-by: Arnd Bergmann commit 7c5314b88da6d5af98239786772a1c44cc5eb67d Author: Kan Liang Date: Wed Aug 8 00:12:08 2018 -0700 perf/x86/intel: Add quirk for Goldmont Plus A ucode patch is needed for Goldmont Plus while counter freezing feature is enabled. Otherwise, there will be some issues, e.g. PMI flood with some events. Add a quirk to check microcode version. If the system starts with the wrong ucode, leave the counter-freezing feature permanently disabled. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Cc: acme@kernel.org Link: http://lkml.kernel.org/r/1533712328-2834-3-git-send-email-kan.liang@linux.intel.com Signed-off-by: Ingo Molnar commit f2c4db1bd80720cd8cb2a5aa220d9bc9f374f04e Author: Peter Zijlstra Date: Tue Aug 7 10:17:27 2018 -0700 x86/cpu: Sanitize FAM6_ATOM naming Going primarily by: https://en.wikipedia.org/wiki/List_of_Intel_Atom_microprocessors with additional information gleaned from other related pages; notably: - Bonnell shrink was called Saltwell - Moorefield is the Merriefield refresh which makes it Airmont The general naming scheme is: FAM6_ATOM_UARCH_SOCTYPE for i in `git grep -l FAM6_ATOM` ; do sed -i -e 's/ATOM_PINEVIEW/ATOM_BONNELL/g' \ -e 's/ATOM_LINCROFT/ATOM_BONNELL_MID/' \ -e 's/ATOM_PENWELL/ATOM_SALTWELL_MID/g' \ -e 's/ATOM_CLOVERVIEW/ATOM_SALTWELL_TABLET/g' \ -e 's/ATOM_CEDARVIEW/ATOM_SALTWELL/g' \ -e 's/ATOM_SILVERMONT1/ATOM_SILVERMONT/g' \ -e 's/ATOM_SILVERMONT2/ATOM_SILVERMONT_X/g' \ -e 's/ATOM_MERRIFIELD/ATOM_SILVERMONT_MID/g' \ -e 's/ATOM_MOOREFIELD/ATOM_AIRMONT_MID/g' \ -e 's/ATOM_DENVERTON/ATOM_GOLDMONT_X/g' \ -e 's/ATOM_GEMINI_LAKE/ATOM_GOLDMONT_PLUS/g' ${i} done Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Cc: dave.hansen@linux.intel.com Cc: len.brown@intel.com Signed-off-by: Ingo Molnar commit af3bdb991a5cb57c189d34aadbd3aa88995e0d9f Author: Andi Kleen Date: Wed Aug 8 00:12:07 2018 -0700 perf/x86/intel: Add a separate Arch Perfmon v4 PMI handler Implements counter freezing for Arch Perfmon v4 (Skylake and newer). This allows to speed up the PMI handler by avoiding unnecessary MSR writes and make it more accurate. The Arch Perfmon v4 PMI handler is substantially different than the older PMI handler. Differences to the old handler: - It relies on counter freezing, which eliminates several MSR writes from the PMI handler and lowers the overhead significantly. It makes the PMI handler more accurate, as all counters get frozen atomically as soon as any counter overflows. So there is much less counting of the PMI handler itself. With the freezing we don't need to disable or enable counters or PEBS. Only BTS which does not support auto-freezing still needs to be explicitly managed. - The PMU acking is done at the end, not the beginning. This makes it possible to avoid manual enabling/disabling of the PMU, instead we just rely on the freezing/acking. - The APIC is acked before reenabling the PMU, which avoids problems with LBRs occasionally not getting unfreezed on Skylake. - Looping is only needed to workaround a corner case which several PMIs are very close to each other. For common cases, the counters are freezed during PMI handler. It doesn't need to do re-check. This patch: - Adds code to enable v4 counter freezing - Fork <=v3 and >=v4 PMI handlers into separate functions. - Add kernel parameter to disable counter freezing. It took some time to debug counter freezing, so in case there are new problems we added an option to turn it off. Would not expect this to be used until there are new bugs. - Only for big core. The patch for small core will be posted later separately. Performance: When profiling a kernel build on Kabylake with different perf options, measuring the length of all NMI handlers using the nmi handler trace point: V3 is without counter freezing. V4 is with counter freezing. The value is the average cost of the PMI handler. (lower is better) perf options ` V3(ns) V4(ns) delta -c 100000 1088 894 -18% -g -c 100000 1862 1646 -12% --call-graph lbr -c 100000 3649 3367 -8% --c.g. dwarf -c 100000 2248 1982 -12% Signed-off-by: Andi Kleen Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Cc: acme@kernel.org Link: http://lkml.kernel.org/r/1533712328-2834-2-git-send-email-kan.liang@linux.intel.com Signed-off-by: Ingo Molnar commit ba12d20edc5caf9835006d8f3efd4ed18465c75b Author: Kan Liang Date: Wed Aug 8 00:12:06 2018 -0700 perf/x86/intel: Factor out common code of PMI handler The Arch Perfmon v4 PMI handler is substantially different than the older PMI handler. Instead of adding more and more ifs cleanly fork the new handler into a new function, with the main common code factored out into a common function. Fix complaint from checkpatch.pl by removing "false" from "static bool warned". No functional change. Based-on-code-from: Andi Kleen Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Cc: acme@kernel.org Link: http://lkml.kernel.org/r/1533712328-2834-1-git-send-email-kan.liang@linux.intel.com Signed-off-by: Ingo Molnar commit 64d20b774f49b31e9d5ebe413d5c3d37195e9a64 Merge: 68b679b339e2 579fde69dc14 Author: Arnd Bergmann Date: Tue Oct 2 10:11:05 2018 +0200 Merge tag 'qcom-drivers-for-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux into next/drivers Qualcomm ARM Based Driver Updates for v4.20 * Refactor of SCM compatibles and clock requirements * SMEM cleanup * Add LLCC EDAC driver * Fixes for GENI clocks and macros * Fix includes for llcc-slice and smem * String overflow fixes for APR and wcnss_ctrl * Fixup for COMPILE_TEST of qcom driver Kconfigs * Cleanup of Kconfig depends of rpmh, smd_rpm, smsm, and smp2p * Add SCM dependencies to SPM and rmtfs-mem * tag 'qcom-drivers-for-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux: (38 commits) soc: qcom: geni: geni_se_clk_freq_match() should always accept multiples soc: qcom: geni: Don't ignore clk_round_rate() errors in geni_se_clk_tbl_get() soc: qcom: geni: Make version macros simpler dt-bindings: firmware: scm: Add MSM8998 and SDM845 firmware: qcom: scm: Refactor clock handling dt-bindings: firmware: scm: Refactor compatibles and clocks soc: qcom: smem: a few last cleanups soc: qcom: smem: verify partition host ids match soc: qcom: smem: small change in global entry loop soc: qcom: smem: verify partition offset_free_uncached soc: qcom: smem: verify partition header size soc: qcom: smem: introduce qcom_smem_partition_header() soc: qcom: smem: require order of host ids to match soc: qcom: smem: verify both host ids in partition header soc: qcom: smem: small refactor in qcom_smem_enumerate_partitions() soc: qcom: smem: always ignore partitions with 0 offset or size soc: qcom: smem: initialize region struct only when successful soc: qcom: smem: rename variable in qcom_smem_get_global() drivers: qcom: rpmh-rsc: clear wait_for_compl after use soc: qcom: rmtfs-mem: Validate that scm is available ... Signed-off-by: Arnd Bergmann commit 90fd227029a25b452fd39dec6d557212d03d79b1 Author: Linus Walleij Date: Mon Oct 1 23:06:17 2018 +0200 gpio: Slightly more helpful debugfs This at least makes debugfs print if the line is active high or low. That is pretty helpful as what we display as "lo" or "hi" is the raw physical level of the line. Signed-off-by: Linus Walleij commit 68b679b339e28844d907bf5a82a23479b7dba2dd Merge: d69f0d53e9aa da8c37e13d1d Author: Arnd Bergmann Date: Tue Oct 2 10:02:33 2018 +0200 Merge tag 'actions-drivers+s900-sps-for-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/afaerber/linux-actions into next/drivers Actions Semi SoC drivers for v4.20 #2 The SPS power domain driver is extended for S900 SoC. This required merging a topic branch for the new bindings header. * tag 'actions-drivers+s900-sps-for-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/afaerber/linux-actions: soc: actions: sps: Add S900 power domains dt-bindings: power: Add Actions Semi S900 SPS soc: actions: Update SPS help text for S700 soc: actions: Convert to SPDX license identifiers Signed-off-by: Arnd Bergmann commit d69f0d53e9aa83e99c13979f8d45c270d08b23f8 Merge: 227db588a8a6 3013b410a8f5 Author: Arnd Bergmann Date: Tue Oct 2 10:00:42 2018 +0200 Merge tag 'v4.19-next-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux into next/drivers PMIC wrapper: - sort SoCs and PMICs ascending - add capabilities - add support for mt8183 SoC + mt6358 PMIC - return false instead of 0 - add support for mt6765 SoC + mt6357 PMIC * tag 'v4.19-next-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux: soc: mediatek: pwrap: add mt6357 driver for mt6765 SoCs soc: mediatek: pwrap: add pwrap driver for mt6765 SoCs dt-bindings: pwrap: mediatek: add pwrap support for MT6765 soc: mediatek: pwrap: use true and false for boolean values soc: mediatek: add mt8183 pwrap support soc: mediatek: pwrap: use group of bits for pwrap capability soc: mediatek: pwrap: order SoCs and PMICs ascending dt-bindings: mediatek: add compatible for mt8183 pwrap Signed-off-by: Arnd Bergmann commit 227db588a8a6f7f86e0ac8a8883689b7b20cecf3 Merge: 86e762d96713 69a8c2452caa Author: Arnd Bergmann Date: Tue Oct 2 09:59:03 2018 +0200 Merge tag 'sunxi-drivers-for-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into next/drivers Allwinner drivers changes for 4.20 The H6 is now supported in our SRAM driver bindings, and we have a small Makefile change for the SRAM driver to build it without building the ARCH_SUNXI architecture, especially relevant for the COMPILE_TEST case. * tag 'sunxi-drivers-for-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: dt-bindings: sunxi-sram: add binding for Allwinner H6 SRAM C drivers: soc: Allow building the sunxi driver without ARCH_SUNXI Signed-off-by: Arnd Bergmann commit 5207ca554bfcb5a32959eb12b6aff8f64384492c Author: Johannes Berg Date: Mon Oct 1 15:29:18 2018 +0200 cfg80211: sort tracing properly There were supposed to be two blocks - one for each direction cfg80211 <-> driver, clean up the code to restore that. Signed-off-by: Johannes Berg commit ec8f170bc33ec5933e139a78ead286ecec1ea56b Author: Johannes Berg Date: Mon Oct 1 14:18:31 2018 +0200 cfg80211: unify sending NL80211_CMD_NEW_INTERFACE There isn't really any need for us to be sending this from two different places - move cfg80211_init_wdev() later and send the notification from there, removing it from the non- netdev case. Signed-off-by: Johannes Berg commit 85dd3da43dd59b9220d9cba4f933a3dc0ea6faa5 Author: Johannes Berg Date: Mon Oct 1 14:09:17 2018 +0200 cfg80211: combine wdev/netdev unregister code We currently have two places that do similar things, depending on whether it's a wdev with or without netdev. Combine the code to avoid having to duplicate all new additions. Signed-off-by: Johannes Berg commit 49f9cf0e1bf518c006425b59e3b705f6276a8b7c Author: Johannes Berg Date: Mon Oct 1 11:55:09 2018 +0200 nl80211: add error messages to nl80211_parse_chandef() Add some error messages to nl80211_parse_chandef() to make failures here - especially with disabled channels - easier to diagnose. Signed-off-by: Johannes Berg commit b60ad3485106b5845113e7a2745abb7e64b15d6d Author: Johannes Berg Date: Mon Oct 1 11:52:07 2018 +0200 cfg80211: move cookie_counter out of wiphy There's no reason for drivers to be able to access the cfg80211 internal cookie counter; move it out of the wiphy into the rdev structure. While at it, also make it never assign 0 as a cookie (we consider that invalid in some places), and warn if we manage to do that for some reason (wrapping is not likely to happen with a u64.) Signed-off-by: Johannes Berg commit 71e5e886806ee3f8e0c44ed945eb2e4d6659c6e3 Author: Johannes Berg Date: Mon Oct 1 11:43:00 2018 +0200 cfg80211: regulatory: make initialization more robust Since my change to split out the regulatory init to occur later, any issues during earlier cfg80211_init() or errors during the platform device allocation would lead to crashes later. Make this more robust by checking that the earlier initialization succeeded. Fixes: d7be102f2945 ("cfg80211: initialize regulatory keys/database later") Signed-off-by: Johannes Berg commit c70616bd8a56a7ecb79c70b7454ce7f1909ff7e0 Author: Masashi Honma Date: Sun Sep 30 07:30:45 2018 +0900 mac80211: Remove unused initialization The variable j will be initialized at trailing step. Signed-off-by: Masashi Honma Signed-off-by: Johannes Berg commit 5297c65c1d48a439c778c56edc6beedb486e4bbd Author: Johannes Berg Date: Thu Sep 27 14:36:44 2018 +0200 nl80211: remove nl80211_prepare_wdev_dump() skb argument nl80211_prepare_wdev_dump() is using the output skb to look up the network namespace, but this isn't really necessary, it can just as well use the input skb which is available as cb->skb, the sk is the same anyway. Therefore, remove the redundant argument. Signed-off-by: Johannes Berg commit 81e54d08d9d845053111f30045a93f3eb1c3ca96 Author: Pradeep Kumar Chitrapu Date: Thu Sep 20 17:30:09 2018 -0700 cfg80211: support FTM responder configuration/statistics Allow userspace to enable fine timing measurement responder functionality with configurable lci/civic parameters in AP mode. This can be done at AP start or changing beacon parameters. A new EXT_FEATURE flag is introduced for drivers to advertise the capability. Also nl80211 API support for retrieving statistics is added. Signed-off-by: Johannes Berg Signed-off-by: Pradeep Kumar Chitrapu [remove unused cfg80211_ftm_responder_params, clarify docs, move validation into policy] Signed-off-by: Johannes Berg commit 7057f2496cc63193d8c7795779b640461b70d998 Author: Johannes Berg Date: Thu Sep 20 11:53:55 2018 +0200 cfg80211: tracing: reuse wiphy_wdev_evt for rdev_get_txq_stats A simple cleanup, reuse the event definition that we already have. Signed-off-by: Johannes Berg commit efdfce7270de85a8706d1ea051bef3a7486809ff Author: Andrew Zaborowski Date: Mon Sep 24 18:10:22 2018 +0200 nl80211: Fix a GET_KEY reply attribute Use the NL80211_KEY_IDX attribute inside the NL80211_ATTR_KEY in NL80211_CMD_GET_KEY responses to comply with nl80211_key_policy. This is unlikely to affect existing userspace. Signed-off-by: Andrew Zaborowski Signed-off-by: Johannes Berg commit 48f3b9e989725127e0edf1cc2f2e169094d03a43 Author: Wei Yongjun Date: Wed Sep 26 12:17:17 2018 +0000 mac80211: fix error handling in ieee80211_register_hw() Fix to return a negative error code -ENOMEM from the kmemdup error handling case instead of 0. Fixes: 09b4a4faf9d0 ("mac80211: introduce capability flags for VHT EXT NSS support") Signed-off-by: Wei Yongjun Signed-off-by: Johannes Berg commit e4d4216e91ea31049ba0cde0799ece244410a9f7 Author: Johannes Berg Date: Thu Sep 13 14:12:03 2018 +0200 cfg80211: combine duplicate wdev init code There's a bit of duplicated code to initialize a wdev, pull it out into a separate function to call from both places. Signed-off-by: Johannes Berg commit a5ae326418b353301c6acc787a8988782e1762f6 Author: Erik Stromdahl Date: Fri Sep 14 18:00:34 2018 +0200 mac80211: fix issue with possible txq NULL pointer Drivers that do not have the BUFF_MMPDU_TXQ flag set will not have a TXQ for the special TID = 16. In this case, the last member in the *struct ieee80211_sta* txq array will be NULL. We must check this in order not to get a NULL pointer dereference when iterating the txq array. Signed-off-by: Erik Stromdahl Signed-off-by: Johannes Berg commit 6762696429bbc4b2e1b6e5996c3d99da8bbc627d Author: Colin Ian King Date: Thu Sep 6 10:58:44 2018 +0100 cfg80211: remove redundant check of !scan_plan The check for !scan_plan is redunant as this has been checked in the proceeding statement and the code returns -ENOBUFS if it is true. Remove the redundant check. Signed-off-by: Colin Ian King Signed-off-by: Johannes Berg commit d25d062f55c6dc1a0d82dbebadf99924751a41b2 Author: zhong jiang Date: Sat Sep 8 19:21:28 2018 +0800 cfg80211: remove unnecessary null pointer check in cfg80211_netdev_notifier_call The iterator in list_for_each_entry_safe is never null, therefore, remove the redundant null pointer check. Signed-off-by: zhong jiang Signed-off-by: Johannes Berg commit f8e41bd60613229fa91a6923b5dec1eed9d4fe78 Author: Kunihiko Hayashi Date: Mon Oct 1 17:10:21 2018 +0900 ARM: multi_v7_defconfig: Enable USB phys for UniPhier SoCs Enable the USB3 and USB2 phys implemented in UniPhier SoCs. These phys are necessary for dwc3 and ehci controllers driving the USB ports on Pro4 and PXs2 SoCs. Since the USB host drivers are already built-in, so only the phy driver are missing to allow booting with USB devices. Signed-off-by: Kunihiko Hayashi Signed-off-by: Arnd Bergmann commit 965a2dc757d6c85ee48f88a80642a14e50a5d165 Merge: 633da3f425d5 0570921c4c32 Author: Arnd Bergmann Date: Tue Oct 2 09:52:19 2018 +0200 Merge tag 'sunxi-config64-for-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into next/defconfig Allwinner arm64 config changes for 4.20 Here is a single config change to enable the DRM driver in the arm64 defconfig. * tag 'sunxi-config64-for-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: arm64: defconfig: Enable CONFIG_DRM_SUN4I Signed-off-by: Arnd Bergmann commit a4c9f26533eb547c8123e9a5f77517f61d19d2c2 Merge: 97e831e13015 dd45407c0b24 Author: Ingo Molnar Date: Tue Oct 2 09:51:41 2018 +0200 Merge branch 'x86/cache' into perf/core, to resolve conflicts Avoid conflict with upcoming perf/core patches, merge in the RDT perf work. Signed-off-by: Ingo Molnar commit 187c5298a12292eab55e3eb09e70e2b145646bcc Author: Grigor Tovmasyan Date: Wed Aug 29 21:02:57 2018 +0400 usb: dwc2: gadget: Add handler for WkupAlert interrupt Added interrupt handler for WkupAlert interrupt. This interrupt should initiate Remote Wake up. Acked-by: Minas Harutyunyan Signed-off-by: Grigor Tovmasyan Signed-off-by: Felipe Balbi commit 97e831e13015045c098e1187f9b8b8e9bace9413 Merge: c90d3bd1b9e8 d7cbbe49a930 Author: Ingo Molnar Date: Tue Oct 2 09:50:34 2018 +0200 Merge branch 'perf/urgent' into perf/core, to pick up fixes Signed-off-by: Ingo Molnar commit 4abe453750db8ada8b0a56c45c89ab18920e9a80 Author: Grigor Tovmasyan Date: Wed Aug 29 21:02:28 2018 +0400 usb: dwc2: gadget: enable WKUP_ALERT interrupt WKUP_ALERT interrupt should be unmask when lpm mode is enabled. This interrupt is asserted when the device is in L1 for the duration mentioned in GREFCLK.SOF_CNN_WKUP_ALERT. This is used to alert SW to initiate Remote wake up so that the device resumes in time in order not to lose sync with the host frame number. Acked-by: Minas Harutyunyan Signed-off-by: Grigor Tovmasyan Signed-off-by: Felipe Balbi commit 15d9dbf8cbd4fc777a7fc92209903dbb47d0783e Author: Grigor Tovmasyan Date: Wed Aug 29 21:01:59 2018 +0400 usb: dwc2: gadget: Program GREFCLK register Added dwc2_gadget_program_ref_clk function to program GREFCLK register in device mode. Acked-by: Minas Harutyunyan Signed-off-by: Grigor Tovmasyan Signed-off-by: Felipe Balbi commit f3a61e4e033e808e7ac1239b151ec46f833fff4a Author: Grigor Tovmasyan Date: Wed Aug 29 21:01:31 2018 +0400 usb: dwc2: gadget: Add parameters for GREFCLK register Added ref_clk_per and sof_cnt_wkup_alert parameters in dwc2_core_params struct and set default values. Acked-by: Minas Harutyunyan Signed-off-by: Grigor Tovmasyan Signed-off-by: Felipe Balbi commit 392af0232640abf7acd12754515f8363c4c0df67 Author: Grigor Tovmasyan Date: Wed Aug 29 21:01:01 2018 +0400 usb: dwc2: Add definitions for new registers New registers were added to dwc otg core. GREFCLK - This register used to control ref_clk parameters. GINTSTS2 - New WKUP_ALERT interrupt was added. GINTMSK2 - Mask register for GINTSTS2. Acked-by: Minas Harutyunyan Signed-off-by: Grigor Tovmasyan Signed-off-by: Felipe Balbi commit 48dac4e4a5eed3fa478db2c59945b6283281566d Author: Grigor Tovmasyan Date: Wed Aug 29 21:00:33 2018 +0400 usb: dwc2: Update target (u)frame calculation In service interval based scheduling target (u)frame must be set as a last frame in this the service interval. Acked-by: Minas Harutyunyan Signed-off-by: Grigor Tovmasyan Signed-off-by: Felipe Balbi commit 27df89689e257cccb604fdf56c91a75a25aa554a Author: Matthew Wilcox Date: Mon Aug 20 10:19:14 2018 -0400 locking/spinlocks: Remove an instruction from spin and write locks Both spin locks and write locks currently do: f0 0f b1 17 lock cmpxchg %edx,(%rdi) 85 c0 test %eax,%eax 75 05 jne [slowpath] This 'test' insn is superfluous; the cmpxchg insn sets the Z flag appropriately. Peter pointed out that using atomic_try_cmpxchg_acquire() will let the compiler know this is true. Comparing before/after disassemblies show the only effect is to remove this insn. Take this opportunity to make the spin & write lock code resemble each other more closely and have similar likely() hints. Suggested-by: Peter Zijlstra Signed-off-by: Matthew Wilcox Signed-off-by: Peter Zijlstra (Intel) Acked-by: Will Deacon Cc: Arnd Bergmann Cc: Linus Torvalds Cc: Thomas Gleixner Cc: Waiman Long Link: http://lkml.kernel.org/r/20180820162639.GC25153@bombadil.infradead.org Signed-off-by: Ingo Molnar commit 9d630b9cde28dc261cdfc608ed68ef5487404422 Author: Grigor Tovmasyan Date: Wed Aug 29 21:00:03 2018 +0400 usb: dwc2: Add dwc2_gadget_dec_frame_num_by_one() function Added dwc2_gadget_dec_frame_num_by_one() function in gadget.c. This function will be used to calculate descriptor frame number field value. For service interval mode frame number in descriptor should point to last (u)frame in the interval. Acked-by: Minas Harutyunyan Signed-off-by: Grigor Tovmasyan Signed-off-by: Felipe Balbi commit ca531bc2bfa655a1a0acaac4f7a6ea4b2111cc43 Author: Grigor Tovmasyan Date: Wed Aug 29 20:59:34 2018 +0400 usb: dwc2: Add core parameter for service interval support Added core parameter for service interval based scheduling. Acked-by: Minas Harutyunyan Signed-off-by: Grigor Tovmasyan Signed-off-by: Felipe Balbi commit c464da0bff6ab6fd39b4603d017de940832bc388 Author: Grigor Tovmasyan Date: Wed Aug 29 20:59:07 2018 +0400 usb: dwc2: Update registers definitions to support service interval Added GHWCFG4_SERVICE_INTERVAL_SUPPORTED and DCTL_SERVICE_INTERVAL_SUPPORTED bits definitions to support service interval based scheduling. Acked-by: Minas Harutyunyan Signed-off-by: Grigor Tovmasyan Signed-off-by: Felipe Balbi commit 54e4f66ba83c3091a0b572879143c7354730571f Author: Yoshihiro Shimoda Date: Fri Sep 21 21:26:32 2018 +0900 usb: renesas_usbhs: add support for R-Car E3 This patch adds support for R-Car E3. This SoC needs to release the PLL reset by the UGCTRL register like R-Car D3. So, this patch adds a usbhs_of_match entry for this SoC with "USBHS_TYPE_RCAR_GEN3_WITH_PLL". Reviewed-by: Simon Horman Signed-off-by: Yoshihiro Shimoda Signed-off-by: Felipe Balbi commit a10f8861af283e1a866a31d062261f0311f69278 Author: Yoshihiro Shimoda Date: Fri Sep 21 21:26:31 2018 +0900 dt-bindings: usb: renesas_usbhs: add bindings for r8a77990 This patch adds bindings for r8a77990 (R-Car E3). Reviewed-by: Simon Horman Signed-off-by: Yoshihiro Shimoda Signed-off-by: Felipe Balbi commit c6fe39356a09fc23fce37cf8980704d9e180d94f Author: Yoshihiro Shimoda Date: Fri Sep 21 21:26:30 2018 +0900 usb: renesas_usbhs: rcar3: Use OTG mode for R-Car D3 Since R-Car D3 can use OTG mode, this patch changes the UGCTRL2 value to UGCTRL2_USB0SEL_OTG and UGCTRL2_VBUSSEL like other R-Car Gen3 SoCs. Reviewed-by: Simon Horman Signed-off-by: Yoshihiro Shimoda Signed-off-by: Felipe Balbi commit ce66ab1df6707cb5aeed0a0706ce69002aeb86ca Author: Yoshihiro Shimoda Date: Fri Sep 21 21:26:29 2018 +0900 Revert "usb: renesas_usbhs: set the mode by using extcon state for non-otg channel" This reverts commit cd14247d5c14b9b20bb3d3dfcaa899ca22c8dccc. R-Car D3 can use OTG mode in fact. So, the commit doesn't need anymore. Reviewed-by: Simon Horman Signed-off-by: Yoshihiro Shimoda Signed-off-by: Felipe Balbi commit 3fa4eaa6c08206b5fa6a8ba49b891d6aab243f52 Author: Andreas Pape Date: Thu Jun 21 17:22:51 2018 +0200 usb: gadget: f_uac2: disable IN/OUT ep if unused Via p_chmask/c_chmask the user can define whether uac2 shall support playback and/or capture. This has only effect on the created ALSA device, but not on the USB descriptor. This patch adds playback/capture descriptors dependent on that parameter. Signed-off-by: Andreas Pape Signed-off-by: Eugeniu Rosca Signed-off-by: Felipe Balbi commit 4a465e3ebbc8004ce4f7f08f6022ee8315a94edf Author: Dietmar Eggemann Date: Fri Aug 3 15:05:38 2018 +0100 sched/fair: Remove setting task's se->runnable_weight during PELT update A CFS (SCHED_OTHER, SCHED_BATCH or SCHED_IDLE policy) task's se->runnable_weight must always be in sync with its se->load.weight. se->runnable_weight is set to se->load.weight when the task is forked (init_entity_runnable_average()) or reniced (reweight_entity()). There are two cases in set_load_weight() which since they currently only set se->load.weight could lead to a situation in which se->load.weight is different to se->runnable_weight for a CFS task: (1) A task switches to SCHED_IDLE. (2) A SCHED_FIFO, SCHED_RR or SCHED_DEADLINE task which has been reniced (during which only its static priority gets set) switches to SCHED_OTHER or SCHED_BATCH. Set se->runnable_weight to se->load.weight in these two cases to prevent this. This eliminates the need to explicitly set it to se->load.weight during PELT updates in the CFS scheduler fastpath. Signed-off-by: Dietmar Eggemann Signed-off-by: Peter Zijlstra (Intel) Cc: Joel Fernandes Cc: Linus Torvalds Cc: Morten Rasmussen Cc: Patrick Bellasi Cc: Peter Zijlstra Cc: Quentin Perret Cc: Thomas Gleixner Cc: Vincent Guittot Link: http://lkml.kernel.org/r/20180803140538.1178-1-dietmar.eggemann@arm.com Signed-off-by: Ingo Molnar commit fdf5f315d5cfaefb7bb8a62ec4bf37b9891837aa Author: Dietmar Eggemann Date: Thu Aug 9 14:57:53 2018 +0100 sched/fair: Disable LB_BIAS by default LB_BIAS allows the adjustment on how conservative load should be balanced. The rq->cpu_load[idx] array is used for this functionality. It contains weighted CPU load decayed average values over different intervals (idx = 1..4). Idx = 0 is the weighted CPU load itself. The values are updated during scheduler_tick, before idle balance and at nohz exit. There are 5 different types of idx's per sched domain (sd). Each of them is used to index into the rq->cpu_load[idx] array in a specific scenario (busy, idle and newidle for load balancing, forkexec for wake-up slow-path load balancing and wake for affine wakeup based on weight). Only the sd idx's for busy and idle load balancing are set to 2,3 or 1,2 respectively. All the other sd idx's are set to 0. Conservative load balancing is achieved for sd idx's >= 1 by using the min/max (source_load()/target_load()) value between the current weighted CPU load and the rq->cpu_load[sd idx -1] for the busiest(idlest)/local CPU load in load balancing or vice versa in the wake-up slow-path load balancing. There is no conservative balancing for sd idx = 0 since only current weighted CPU load is used in this case. It is very likely that LB_BIAS' influence on load balancing can be neglected (see test results below). This is further supported by: (1) Weighted CPU load today is by itself a decayed average value (PELT) (cfs_rq->avg->runnable_load_avg) and not the instantaneous load (rq->load.weight) it was when LB_BIAS was introduced. (2) Sd imbalance_pct is used for CPU_NEWLY_IDLE and CPU_NOT_IDLE (relate to sd's newidle and busy idx) in find_busiest_group() when comparing busiest and local avg load to make load balancing even more conservative. (3) The sd forkexec and newidle idx are always set to 0 so there is no adjustment on how conservatively load balancing is done here. (4) Affine wakeup based on weight (wake_affine_weight()) will not be impacted since the sd wake idx is always set to 0. Let's disable LB_BIAS by default for a few kernel releases to make sure that no workload and no scheduler topology is affected. The benefit of being able to remove the LB_BIAS dependency from source_load() and target_load() is that the entire rq->cpu_load[idx] code could be removed in this case. It is really hard to say if there is no regression w/o testing this with a lot of different workloads on a lot of different platforms, especially NUMA machines. The following 104 LKP (Linux Kernel Performance) tests were run by the 0-Day guys mostly on multi-socket hosts with a larger number of logical cpus (88, 192). The base for the test was commit b3dae109fa89 ("sched/swait: Rename to exclusive") (tip/sched/core v4.18-rc1). Only 2 out of the 104 tests had a significant change in one of the metrics (fsmark/1x-1t-1HDD-btrfs-nfsv4-4M-60G-NoSync-performance +7% files_per_sec, unixbench/300s-100%-syscall-performance -11% score). Tests which showed a change in one of the metrics are marked with a '*' and this change is listed as well. (a) lkp-bdw-ep3: 88 threads Intel(R) Xeon(R) CPU E5-2699 v4 @ 2.20GHz 64G dd-write/10m-1HDD-cfq-btrfs-100dd-performance fsmark/1x-1t-1HDD-xfs-nfsv4-4M-60G-NoSync-performance * fsmark/1x-1t-1HDD-btrfs-nfsv4-4M-60G-NoSync-performance 7.50 7% 8.00 ± 6% fsmark.files_per_sec fsmark/1x-1t-1HDD-btrfs-nfsv4-4M-60G-fsyncBeforeClose-performance fsmark/1x-1t-1HDD-btrfs-4M-60G-NoSync-performance fsmark/1x-1t-1HDD-btrfs-4M-60G-fsyncBeforeClose-performance kbuild/300s-50%-vmlinux_prereq-performance kbuild/300s-200%-vmlinux_prereq-performance kbuild/300s-50%-vmlinux_prereq-performance-1HDD-ext4 kbuild/300s-200%-vmlinux_prereq-performance-1HDD-ext4 (b) lkp-skl-4sp1: 192 threads Intel(R) Xeon(R) Platinum 8160 768G dbench/100%-performance ebizzy/200%-100x-10s-performance hackbench/1600%-process-pipe-performance iperf/300s-cs-localhost-tcp-performance iperf/300s-cs-localhost-udp-performance perf-bench-numa-mem/2t-300M-performance perf-bench-sched-pipe/10000000ops-process-performance perf-bench-sched-pipe/10000000ops-threads-performance schbench/2-16-300-30000-30000-performance tbench/100%-cs-localhost-performance (c) lkp-bdw-ep6: 88 threads Intel(R) Xeon(R) CPU E5-2699 v4 @ 2.20GHz 128G stress-ng/100%-60s-pipe-performance unixbench/300s-1-whetstone-double-performance unixbench/300s-1-shell1-performance unixbench/300s-1-shell8-performance unixbench/300s-1-pipe-performance * unixbench/300s-1-context1-performance 312 315 unixbench.score unixbench/300s-1-spawn-performance unixbench/300s-1-syscall-performance unixbench/300s-1-dhry2reg-performance unixbench/300s-1-fstime-performance unixbench/300s-1-fsbuffer-performance unixbench/300s-1-fsdisk-performance unixbench/300s-100%-whetstone-double-performance unixbench/300s-100%-shell1-performance unixbench/300s-100%-shell8-performance unixbench/300s-100%-pipe-performance unixbench/300s-100%-context1-performance unixbench/300s-100%-spawn-performance * unixbench/300s-100%-syscall-performance 3571 ± 3% -11% 3183 ± 4% unixbench.score unixbench/300s-100%-dhry2reg-performance unixbench/300s-100%-fstime-performance unixbench/300s-100%-fsbuffer-performance unixbench/300s-100%-fsdisk-performance unixbench/300s-1-execl-performance unixbench/300s-100%-execl-performance * will-it-scale/brk1-performance 365004 360387 will-it-scale.per_thread_ops * will-it-scale/dup1-performance 432401 437596 will-it-scale.per_thread_ops will-it-scale/eventfd1-performance will-it-scale/futex1-performance will-it-scale/futex2-performance will-it-scale/futex3-performance will-it-scale/futex4-performance will-it-scale/getppid1-performance will-it-scale/lock1-performance will-it-scale/lseek1-performance will-it-scale/lseek2-performance * will-it-scale/malloc1-performance 47025 45817 will-it-scale.per_thread_ops 77499 76529 will-it-scale.per_process_ops will-it-scale/malloc2-performance * will-it-scale/mmap1-performance 123399 120815 will-it-scale.per_thread_ops 152219 149833 will-it-scale.per_process_ops * will-it-scale/mmap2-performance 107327 104714 will-it-scale.per_thread_ops 136405 133765 will-it-scale.per_process_ops will-it-scale/open1-performance * will-it-scale/open2-performance 171570 168805 will-it-scale.per_thread_ops 532644 526202 will-it-scale.per_process_ops will-it-scale/page_fault1-performance will-it-scale/page_fault2-performance will-it-scale/page_fault3-performance will-it-scale/pipe1-performance will-it-scale/poll1-performance * will-it-scale/poll2-performance 176134 172848 will-it-scale.per_thread_ops 281361 275053 will-it-scale.per_process_ops will-it-scale/posix_semaphore1-performance will-it-scale/pread1-performance will-it-scale/pread2-performance will-it-scale/pread3-performance will-it-scale/pthread_mutex1-performance will-it-scale/pthread_mutex2-performance will-it-scale/pwrite1-performance will-it-scale/pwrite2-performance will-it-scale/pwrite3-performance * will-it-scale/read1-performance 1190563 1174833 will-it-scale.per_thread_ops * will-it-scale/read2-performance 1105369 1080427 will-it-scale.per_thread_ops will-it-scale/readseek1-performance * will-it-scale/readseek2-performance 261818 259040 will-it-scale.per_thread_ops will-it-scale/readseek3-performance * will-it-scale/sched_yield-performance 2408059 2382034 will-it-scale.per_thread_ops will-it-scale/signal1-performance will-it-scale/unix1-performance will-it-scale/unlink1-performance will-it-scale/unlink2-performance * will-it-scale/write1-performance 976701 961588 will-it-scale.per_thread_ops * will-it-scale/writeseek1-performance 831898 822448 will-it-scale.per_thread_ops * will-it-scale/writeseek2-performance 228248 225065 will-it-scale.per_thread_ops * will-it-scale/writeseek3-performance 226670 224058 will-it-scale.per_thread_ops will-it-scale/context_switch1-performance aim7/performance-fork_test-2000 * aim7/performance-brk_test-3000 74869 76676 aim7.jobs-per-min aim7/performance-disk_cp-3000 aim7/performance-disk_rd-3000 aim7/performance-sieve-3000 aim7/performance-page_test-3000 aim7/performance-creat-clo-3000 aim7/performance-mem_rtns_1-8000 aim7/performance-disk_wrt-8000 aim7/performance-pipe_cpy-8000 aim7/performance-ram_copy-8000 (d) lkp-avoton3: 8 threads Intel(R) Atom(TM) CPU C2750 @ 2.40GHz 16G netperf/ipv4-900s-200%-cs-localhost-TCP_STREAM-performance Signed-off-by: Dietmar Eggemann Signed-off-by: Peter Zijlstra (Intel) Cc: Fengguang Wu Cc: Li Zhijian Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20180809135753.21077-1-dietmar.eggemann@arm.com Signed-off-by: Ingo Molnar commit 11d4afd4ff667f9b6178ee8c142c36cb78bd84db Author: Vincent Guittot Date: Tue Sep 25 11:17:42 2018 +0200 sched/pelt: Fix warning and clean up IRQ PELT config Create a config for enabling irq load tracking in the scheduler. irq load tracking is useful only when irq or paravirtual time is accounted but it's only possible with SMP for now. Also use __maybe_unused to remove the compilation warning in update_rq_clock_task() that has been introduced by: 2e62c4743adc ("sched/fair: Remove #ifdefs from scale_rt_capacity()") Suggested-by: Ingo Molnar Reported-by: Dou Liyang Reported-by: Miguel Ojeda Signed-off-by: Vincent Guittot Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: bp@alien8.de Cc: dou_liyang@163.com Fixes: 2e62c4743adc ("sched/fair: Remove #ifdefs from scale_rt_capacity()") Link: http://lkml.kernel.org/r/1537867062-27285-1-git-send-email-vincent.guittot@linaro.org Signed-off-by: Ingo Molnar commit 0a55187a1ec8c03d0619e7ce41d10fdc39cff036 Author: Alan Stern Date: Fri Aug 10 15:32:25 2018 -0400 USB: gadget core: Issue ->disconnect() callback from usb_gadget_disconnect() The gadget documentation doesn't state clearly whether a gadget driver's ->disconnect() callback should be invoked when the D+ pullup is turned off. Some UDC drivers do this and some don't. This patch settles the issue by making the core function usb_gadget_disconnect() issue the callback, so that UDC drivers don't need to worry about it. A description of the new behavior is added to the function's kerneldoc. Also, the patch removes a few superseded callbacks from other core routines. Future patches will remove the ->disconnect() calls from the UDC drivers that make them, as they are now unnecessary. Until all those patches are merged gadget drivers may receive extra ->disconnect() callbacks, but this should be harmless. Signed-off-by: Alan Stern Signed-off-by: Felipe Balbi commit 6af19fd10595936abb02c9199cd9ea1ff0411490 Author: Faisal Mehmood Date: Sat Aug 18 21:49:54 2018 +0500 usb: dwc3: Fix spelling of 'optimizations' 'optimizations' was misspelled as 'optmizations'. Fixed it. It is a coding style change which should have no impact on runtime execution of code. Signed-off-by: Faisal Mehmood Signed-off-by: Felipe Balbi commit b429f71bca5a4ddd914350a39572692e2ea211e0 Merge: ace8031099f9 6fd98e775f24 Author: Ingo Molnar Date: Tue Oct 2 09:43:39 2018 +0200 Merge branch 'sched/urgent' into sched/core, to pick up fixes Signed-off-by: Ingo Molnar commit 6fd573e1a7bf0e5f2cbb902e3cdf11a6714fb1f1 Author: Rob Herring Date: Wed Aug 29 15:01:11 2018 -0500 usb: gadget: atmel: remove pointless retrieval of DT name property The name is always non-NULL and then is not used anywhere in this function, so remove it. Cc: Nicolas Ferre Cc: Felipe Balbi Cc: Greg Kroah-Hartman Cc: Alexandre Belloni Cc: linux-arm-kernel@lists.infradead.org Cc: linux-usb@vger.kernel.org Acked-by: Nicolas Ferre Signed-off-by: Rob Herring Signed-off-by: Felipe Balbi commit 24b804e40f23a199e6d82de5b5571bb642490ca1 Author: Nicholas Mc Guire Date: Thu Aug 30 12:16:59 2018 +0200 usb: gadget: fsl_udc_core: fixup struct_udc_setup documentation The original implementation from commit b504882da539 ("USB: add Freescale high-speed USB SOC device controller driver") returned NULL on failure and an allocated + initialized struct fsl_udc on success. The current code introduced in commit 4365831dadfe ("USB: fsl_usb2_udc: Get max ep number from DCCPARAMS register") only provides partial initialization as well as returning 0 on success and -1 on failures. The function documentation is updated accordingly. Signed-off-by: Nicholas Mc Guire Fixes: 4365831dadfe ("USB: fsl_usb2_udc: Get max ep number from DCCPARAMS register") Signed-off-by: Felipe Balbi commit 4ab2b48c98f2ec9712452d520a381917f91ac3d2 Author: Nicholas Mc Guire Date: Thu Aug 30 12:16:58 2018 +0200 usb: gadget: fsl_udc_core: check allocation return value and cleanup on failure The allocation with fsl_alloc_request() and kmalloc() were unchecked fixed this up with a NULL check and appropriate cleanup. Additionally udc->ep_qh_size was reset to 0 on failure of allocation. Similar udc->phy_mode is initially 0 (as udc_controller was allocated with kzalloc in fsl_udc_probe()) so reset it to 0 as well so that this function is side-effect free on failure. Not clear if this is necessary or sensible as fsl_udc_release() probably can not be called if fsl_udc_probe() failed - but it should not hurt. Signed-off-by: Nicholas Mc Guire Fixes: b504882da5 ("USB: add Freescale high-speed USB SOC device controller driver") Signed-off-by: Felipe Balbi commit adc23f16bcc56768500034cd2e398f60b120ee42 Author: Chunfeng Yun Date: Fri Sep 7 14:00:39 2018 +0800 usb: mtu3: disable vbus rise/fall interrupts of ltssm The vbus rise & fall interrupts are used to enable and disable U3 function of device automatically, this cause some issues when class driver is initialized as deactivated, and will skip over software-controlled connect by pullup(), but UDC wants to keep disconnect until usb_gadget_activate() is called which calls pullup() if needed. So we disable vbus rise & fall interrupts and just use pullup() to enable & disable U3 function, and reset mtu3 state when disconnect instead when vbus fall. Signed-off-by: Chunfeng Yun Signed-off-by: Felipe Balbi commit 794f97a4b964a5f9880529a561ab26ed781bca56 Author: Yoshihiro Shimoda Date: Tue Sep 11 17:47:05 2018 +0900 usb: renesas_usbhs: Add multiple clocks management R-Car Gen3 needs to enable clocks of both host and peripheral. Since [eo]hci-platform disables the reset(s) when the drivers are removed, renesas_usbhs driver doesn't work correctly. To fix this issue, this patch adds multiple clocks management on this renesas_usbhs driver. Signed-off-by: Yoshihiro Shimoda Signed-off-by: Felipe Balbi commit 18320f4779a5f469dec53355a39037682ef46190 Author: Yoshihiro Shimoda Date: Tue Sep 11 17:47:04 2018 +0900 dt-bindings: usb: renesas_usbhs: add clock-names property R-Car Gen3 needs to enable clocks of both host and peripheral. Otherwise, other side device cannot work correctly. So, this patch adds a property of clock-names for R-Car Gen3 as an optional. Signed-off-by: Yoshihiro Shimoda Signed-off-by: Felipe Balbi commit 26eef8e0115d12fc996750e288975ebba13b7a91 Author: Yoshihiro Shimoda Date: Tue Sep 11 17:47:03 2018 +0900 usb: renesas_usbhs: Add reset_control R-Car Gen3 needs to deassert resets of both host and peripheral. Since [eo]hci-platform is possible to assert the reset(s) when the probing failed, renesas_usbhs driver doesn't work correctly regardless of finished probing. To fix this issue, this patch adds reset_control on this renesas_usbhs driver. Signed-off-by: Yoshihiro Shimoda Signed-off-by: Felipe Balbi commit 87dd96111b0bb8e616fcbd74dbf4bb4182f2c596 Author: Thinh Nguyen Date: Tue Sep 11 12:42:05 2018 -0700 usb: dwc3: gadget: Check ENBLSLPM before sending ep command When operating in USB 2.0 speeds (HS/FS), if GUSB2PHYCFG.ENBLSLPM or GUSB2PHYCFG.SUSPHY is set, it must be cleared before issuing an endpoint command. Current implementation only save and restore GUSB2PHYCFG.SUSPHY configuration. We must save and clear both GUSB2PHYCFG.ENBLSLPM and GUSB2PHYCFG.SUSPHY settings. Restore them after the command is completed. DWC_usb3 3.30a and DWC_usb31 1.90a programming guide section 3.2.2 Signed-off-by: Thinh Nguyen Signed-off-by: Felipe Balbi commit cd7cd0e6cedfda8da6668a4af6748f96bbb6fed4 Author: Fabrice Gasnier Date: Wed Sep 5 13:40:05 2018 +0200 usb: dwc2: fix unbalanced use of external vbus-supply When using external vbus supply regulator, it should be enabled synchronously with PWR bit in HPRT register. This also fixes unbalanced use of this optional regulator (This can be reproduced easily when unbinding the driver). Fixes: 531ef5ebea96 ("usb: dwc2: add support for host mode external vbus supply") Tested-by: Artur Petrosyan Acked-by: Minas Harutyunyan Signed-off-by: Fabrice Gasnier Signed-off-by: Amelie Delaunay Signed-off-by: Felipe Balbi commit 5aa678c7fd5371769efde30763fb43a43a118cd0 Author: Fabrice Gasnier Date: Wed Sep 5 13:40:04 2018 +0200 usb: dwc2: fix call to vbus supply exit routine, call it unlocked dwc2_vbus_supply_exit() may call regulator_disable(). It shouldn't be called with interrupts disabled as it might sleep. This is seen with DEBUG_ATOMIC_SLEEP=y. Fixes: 531ef5ebea96 ("usb: dwc2: add support for host mode external vbus supply") Tested-by: Artur Petrosyan Acked-by: Minas Harutyunyan Signed-off-by: Fabrice Gasnier Signed-off-by: Amelie Delaunay Signed-off-by: Felipe Balbi commit 41ee1ea21052583eaf5487dfa0d0c907c9667548 Author: Fabrice Gasnier Date: Wed Sep 5 13:40:03 2018 +0200 usb: dwc2: fix a race with external vbus supply There's a race with root hub resume, when using external vbus supply. Root hub gets resumed, but runtime pm autosuspend runs as external vbus supply isn't enabled. So, host never exit from power down properly. Initialize vbus external supply before, rater that after hub resume. Fixes: 531ef5ebea96 ("usb: dwc2: add support for host mode external vbus supply") Tested-by: Artur Petrosyan Acked-by: Minas Harutyunyan Signed-off-by: Fabrice Gasnier Signed-off-by: Amelie Delaunay Signed-off-by: Felipe Balbi commit e0f681c2c11a25b76626cea77deb819a4754375d Author: Fabrice Gasnier Date: Wed Sep 5 13:40:02 2018 +0200 usb: dwc2: get optional vbus-supply regulator once Move devm_regulator_get_optional() call to probe routine. This avoids 'vbus-supply' regulator to be requested lots of times, upon each call to dwc2_vbus_supply_init(), e.g. like with runtime pm. Fixes: 531ef5ebea96 ("usb: dwc2: add support for host mode external vbus supply") Tested-by: Artur Petrosyan Acked-by: Minas Harutyunyan Signed-off-by: Fabrice Gasnier Signed-off-by: Amelie Delaunay Signed-off-by: Felipe Balbi commit 3def4031b3e3fbb524cbd01555b057a6cef0d5e6 Author: Arnd Bergmann Date: Thu Sep 13 11:37:31 2018 +0200 usb: dwc3: add EXTCON dependency for qcom Like the omap back-end, we get a link error with CONFIG_EXTCON=m when building the qcom back-end into the kernel: drivers/usb/dwc3/dwc3-qcom.o: In function `dwc3_qcom_probe': dwc3-qcom.c:(.text+0x13dc): undefined reference to `extcon_get_edev_by_phandle' dwc3-qcom.c:(.text+0x1b18): undefined reference to `devm_extcon_register_notifier' dwc3-qcom.c:(.text+0x1b9c): undefined reference to `extcon_get_state' Do the same thing as OMAP and add an explicit dependency on EXTCON. Fixes: a4333c3a6ba9 ("usb: dwc3: Add Qualcomm DWC3 glue driver") Signed-off-by: Arnd Bergmann Signed-off-by: Felipe Balbi commit bb80e4fa57eb75ebd64ae9be4155da6d12c1a997 Author: Alexandre Belloni Date: Mon Sep 10 22:12:49 2018 +0200 usb: gadget: udc: atmel: handle at91sam9rl PMC The at91sam9rl PMC is not quite the same as the at91sam9g45 one and now has its own compatible string. Add support for that. Fixes: 217bace8e548 ("ARM: dts: fix PMC compatible") Acked-by: Cristian Birsan Signed-off-by: Alexandre Belloni Signed-off-by: Felipe Balbi commit 2337a77c1cc86bc4e504ecf3799f947659c86026 Author: Jia-Ju Bai Date: Sat Sep 15 11:04:40 2018 +0800 usb: gadget: udc: fotg210-udc: Fix a sleep-in-atomic-context bug in fotg210_get_status() The driver may sleep in an interrupt handler. The function call path (from bottom to top) in Linux-4.17 is: [FUNC] fotg210_ep_queue(GFP_KERNEL) drivers/usb/gadget/udc/fotg210-udc.c, 744: fotg210_ep_queue in fotg210_get_status drivers/usb/gadget/udc/fotg210-udc.c, 768: fotg210_get_status in fotg210_setup_packet drivers/usb/gadget/udc/fotg210-udc.c, 949: fotg210_setup_packet in fotg210_irq (interrupt handler) To fix this bug, GFP_KERNEL is replaced with GFP_ATOMIC. If possible, spin_unlock() and spin_lock() around fotg210_ep_queue() can be also removed. This bug is found by my static analysis tool DSAC. Signed-off-by: Jia-Ju Bai Signed-off-by: Felipe Balbi commit dccf1bad4be7eaa096c1f3697bd37883f9a08ecb Author: Minas Harutyunyan Date: Wed Sep 19 18:13:52 2018 +0400 usb: dwc2: Disable all EP's on disconnect Disabling all EP's allow to reset EP's to initial state. On disconnect disable all EP's instead of just killing all requests. Because of some platform didn't catch disconnect event, same stuff added to dwc2_hsotg_core_init_disconnected() function when USB reset detected on the bus. Changed from version 1: Changed lock acquire flow in dwc2_hsotg_ep_disable() function. Signed-off-by: Minas Harutyunyan Signed-off-by: Felipe Balbi commit 4c19cc14064d99ef0a20fb5ba0d45c94dbedb13c Author: Marek Szyprowski Date: Tue Sep 18 10:16:52 2018 +0200 usb: dwc3: exynos: Add support for Exynos5433 variant with all clocks DWC3 variant found in Exynos5433 SoCs requires keeping all DRD30/UHOST30 clocks enabled all the time the driver does any access to DWC3 registers, otherwise external abort happens. So far DWC3 hardware module worked with samsung,exynos5250-dwusb3 compatible only by luck when built into kernel: all DRD30 clocks were left enabled by bootloader and later kept enabled by the DRD PHY driver. However, if one tried to use Exnos DWC3 driver as a module or performed system suspend/resume cycle, external abort happened. This patch finally fixes this issue. Signed-off-by: Marek Szyprowski Signed-off-by: Felipe Balbi commit 9f2168367a0ab73e57e365f980a9283d478c41ee Author: Marek Szyprowski Date: Tue Sep 18 10:16:51 2018 +0200 usb: dwc3: exynos: Rework clock handling and prepare for new variants Add per-variant list of clocks and manage them all together in the single array. This is a preparation for adding new variants of Exynos SoCs. No functional changes for existing Exynos SoCs. Signed-off-by: Marek Szyprowski Signed-off-by: Felipe Balbi commit 1e041b6f313aaa966612a7e415cfc09c90d6b829 Author: Marek Szyprowski Date: Tue Sep 18 10:16:50 2018 +0200 usb: dwc3: exynos: Remove dead code All supported Exynos variants provide respective generic PHY framework based drivers for controlling USB PHYs, so there is no point creating fake USB PHYs based on platform devices. While removing useless code, remove calls to runtime PM, which have no effect. Signed-off-by: Marek Szyprowski Signed-off-by: Felipe Balbi commit 4a13b9689da8d9d62b5eff1632115bf21f24c52d Author: Colin Ian King Date: Tue Sep 18 08:54:11 2018 +0200 usb: phy: mxs: fix spelling mistake "stardard" -> "standard" Trivial fix to spelling mistake in dev_dbg message Acked-by: Peter Chen Signed-off-by: Colin Ian King Signed-off-by: Felipe Balbi commit a9383a6c3679ce7317f4689fe746deb82cfbee5e Author: Nathan Chancellor Date: Thu Sep 20 13:28:13 2018 -0700 usb: gadget: udc: Remove unnecessary parentheses Clang warns when multiple pairs of parentheses are used for a single conditional statement. drivers/usb/gadget/udc/mv_udc_core.c:188:33: warning: equality comparison with extraneous parentheses [-Wparentheses-equality] while ((curr_dqh->curr_dtd_ptr == curr_dtd->td_dma)) { ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~ drivers/usb/gadget/udc/mv_udc_core.c:188:33: note: remove extraneous parentheses around the comparison to silence this warning while ((curr_dqh->curr_dtd_ptr == curr_dtd->td_dma)) { ~ ^ ~ drivers/usb/gadget/udc/mv_udc_core.c:188:33: note: use '=' to turn this equality comparison into an assignment while ((curr_dqh->curr_dtd_ptr == curr_dtd->td_dma)) { ^~ = 1 warning generated. Link: https://github.com/ClangBuiltLinux/linux/issues/120 Signed-off-by: Nathan Chancellor Signed-off-by: Felipe Balbi commit 971a0d4e1be2bb18c3b58d6567743b7de0e4059f Author: Josh Abraham Date: Sun Sep 23 21:41:35 2018 -0400 usb: dwc2: remove set but unused variable This patch removes a set but unused variable in hcd.c. Fixes gcc warning: variable ‘data_fifo’ set but not used [-Wunused-but-set-variable] Acked-by: Minas Harutyunyan Signed-off-by: Joshua Abraham Signed-off-by: Felipe Balbi commit 4018aa9b57c218e0aea3a0b83b8f87c7c8c51172 Author: Yoshihiro Shimoda Date: Fri Sep 21 21:26:28 2018 +0900 Revert "usb: renesas_usbhs: add extcon notifier to set mode for non-otg channel" This reverts commit 8ada211d0383b72878582bd312b984a9eae62b30. R-Car D3 can use OTG mode in fact. So, the commit doesn't need anymore. In other words, like other R-Car Gen3 SoCs, R-Car D3 can change the mode by using the phy-rcar-gen3-usb2 driver. Signed-off-by: Yoshihiro Shimoda Signed-off-by: Felipe Balbi commit bf3854aaa7568bd0dca4e4f70df5c2aeedf0cd5a Author: Colin Ian King Date: Sat Sep 29 12:43:13 2018 +0100 usb: gadget: fix spelling mistakeis "[En]queing" -> "[En]queuing" Trivial fix to spelling mistakes in debug warning messages Signed-off-by: Colin Ian King Signed-off-by: Felipe Balbi commit 755801cb9feb0571b36b9df5a114f09b2de604aa Merge: 17b57b1883c1 3fb2fd76eda2 Author: Felipe Balbi Date: Tue Oct 2 10:26:43 2018 +0300 Merge tag 'uvcg-20180925' of git://linuxtv.org/pinchartl/media into testing/next UVC gadget updates for v4.20 - configfs cleanups, fixes and extensions - Endianness fixes - Miscellaneous cleanups commit 2e65c7a6a15f006bf720f555ad1b63c6aadc5c9f Author: Tomi Valkeinen Date: Wed Sep 26 13:02:56 2018 +0300 drm/omap: fix use of freed memory omap_connector_destroy() does: kfree(omap_connector); omapdss_device_put(omap_connector->output); omapdss_device_put(omap_connector->display); Fix this by moving the kfree after the omapdss_device_puts. This bug was introduced in 949ea2ef3fed4e1d0f9b80ec21ed81a9833ac248 Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart commit 08bafffe472cffb1eb9032b83aaef8560103ea3e Author: Thomas Zimmermann Date: Mon Jun 18 15:07:27 2018 +0200 drm/omap: 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: Tomi Valkeinen commit e64d0229340dff8746a1b55e0bcf0dbac6cb5874 Author: Thomas Zimmermann Date: Mon Jun 18 15:07:26 2018 +0200 drm/omap: 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. Signed-off-by: Thomas Zimmermann Signed-off-by: Tomi Valkeinen commit 3ce11806c0ba279b5893bb9eb1d193e1acbef7b6 Author: Thomas Zimmermann Date: Mon Jun 18 15:07:25 2018 +0200 drm/omap: Replace drm_gem_object_{un/reference} with put,get functions 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. Signed-off-by: Thomas Zimmermann Signed-off-by: Tomi Valkeinen commit e58febe1d99c6557bc7a4397426e9d470cc7f430 Author: Ayan Kumar Halder Date: Tue Jul 17 18:13:45 2018 +0100 drm/omap: Substitute format_is_yuv() with format->is_yuv drm_format_info table has a field 'is_yuv' to denote if the format is yuv or not. The driver is expected to use this instead of having a function for the same purpose. Signed-off-by: Ayan Kumar halder Signed-off-by: Tomi Valkeinen commit f5b9930b85dc6319fd6bcc259e447eff62fc691c Author: Tomi Valkeinen Date: Wed Sep 26 12:11:30 2018 +0300 drm/omap: partial workaround for DRA7xx DMM errata i878 Errata i878 says that MPU should not be used to access RAM and DMM at the same time. As it's not possible to prevent MPU accessing RAM, we need to access DMM via a proxy. This patch changes DMM driver to access DMM registers via sDMA. Instead of doing a normal readl/writel call to read/write a register, we use sDMA to copy 4 bytes from/to the DMM registers. This patch provides only a partial workaround for i878, as not only DMM register reads/writes are affected, but also accesses to the DMM mapped buffers (framebuffers, usually). Signed-off-by: Tomi Valkeinen Signed-off-by: Peter Ujfalusi commit 176c866d40551565e78893fc0cb2bc8eed7b3c80 Author: Peter Ujfalusi Date: Wed Sep 26 12:11:29 2018 +0300 drm/omap: dmm_tiler: Fix interrupt request/free sequence during probe/remove The interrupts should be enabled after the driver initialization to avoid early interrupts while the driver is not yet ready to handle them. On removal the interrupts must be disabled before other resources are released, freed up. Signed-off-by: Peter Ujfalusi Signed-off-by: Tomi Valkeinen commit 157aa884c90647390917e080176bedc9d0253357 Author: Peter Ujfalusi Date: Wed Sep 26 12:11:28 2018 +0300 drm/omap: dmm_tiler: No need to check if irq is valid in omap_dmm_remove The driver probe would fail if the irq is not available. Signed-off-by: Peter Ujfalusi Signed-off-by: Tomi Valkeinen commit 538f66ba204944470a653a4cccc5f8befdf97c22 Author: Tomi Valkeinen Date: Wed Sep 26 12:11:27 2018 +0300 drm/omap: fix memory barrier bug in DMM driver A DMM timeout "timed out waiting for done" has been observed on DRA7 devices. The timeout happens rarely, and only when the system is under heavy load. Debugging showed that the timeout can be made to happen much more frequently by optimizing the DMM driver, so that there's almost no code between writing the last DMM descriptors to RAM, and writing to DMM register which starts the DMM transaction. The current theory is that a wmb() does not properly ensure that the data written to RAM is observable by all the components in the system. This DMM timeout has caused interesting (and rare) bugs as the error handling was not functioning properly (the error handling has been fixed in previous commits): * If a DMM timeout happened when a GEM buffer was being pinned for display on the screen, a timeout error would be shown, but the driver would continue programming DSS HW with broken buffer, leading to SYNCLOST floods and possible crashes. * If a DMM timeout happened when other user (say, video decoder) was pinning a GEM buffer, a timeout would be shown but if the user handled the error properly, no other issues followed. * If a DMM timeout happened when a GEM buffer was being released, the driver does not even notice the error, leading to crashes or hang later. This patch adds wmb() and readl() calls after the last bit is written to RAM, which should ensure that the execution proceeds only after the data is actually in RAM, and thus observable by DMM. The read-back should not be needed. Further study is required to understand if DMM is somehow special case and read-back is ok, or if DRA7's memory barriers do not work correctly. Signed-off-by: Tomi Valkeinen Signed-off-by: Peter Ujfalusi commit 3a75010cecc93d299aec56caae8516ea40287a98 Author: YueHaibing Date: Tue Sep 11 12:00:53 2018 +0000 drm/omap: remove set but not used variable 'frame_height' Fixes gcc '-Wunused-but-set-variable' warning: drivers/gpu/drm/omapdrm/dss/dispc.c: In function 'dispc_ovl_setup_common': drivers/gpu/drm/omapdrm/dss/dispc.c:2627:19: warning: variable 'frame_height' set but not used [-Wunused-but-set-variable] Signed-off-by: YueHaibing Reviewed-by: Laurent Pinchart Signed-off-by: Tomi Valkeinen commit 993d52e2f71560d539b3f194be2970eb9d8ce9c1 Author: zhong jiang Date: Tue Sep 11 19:54:35 2018 +0800 drm/omap: Use ERR_CAST directly instead of ERR_PTR(PTR_ERR()) We prefer to use ERR_CAST to do so. The issue is detected with the help of Coccinelle. Signed-off-by: zhong jiang Reviewed-by: Laurent Pinchart Signed-off-by: Tomi Valkeinen commit c7d6a0d6764680df33057d23173e786266a5b71d Author: Corentin Labbe Date: Tue Sep 25 19:16:37 2018 +0000 drm/omap: remove unused header tcm-sita.h tcm-sita.h is unused since commit 0d6fa53fd805 ("drm/omap: Use bitmaps for TILER placement") Let's remove it. Signed-off-by: Corentin Labbe Signed-off-by: Tomi Valkeinen commit 407257ce24436d044c3ec10a22256a29e739bbbe Merge: 024926def6ca 723ad9161347 Author: David S. Miller Date: Mon Oct 1 23:31:16 2018 -0700 Merge branch 'ibmvnic-Implement-driver-defined-queue-limits' Thomas Falcon says: ==================== ibmvnic: Implement driver-defined queue limits In this patch series, update the ibmvnic driver to use driver-defined queue limits instead of limits imposed by the Virtual I/O server management partition. For some deviced, initial max queue size and amount limits, despite their definition, can actually be exceeded if the client driver requests it. With this in mind, define a private ethtool flag that toggles the use of driver-defined limits. These limits are currently more than what supported hardware will likely allow, so the driver will attempt to get as close as possible to the user request but may not fully succeed. ==================== Signed-off-by: David S. Miller commit 723ad916134784b317b72f3f6cf0f7ba774e5dae Author: Thomas Falcon Date: Fri Sep 28 18:38:26 2018 -0500 ibmvnic: Add ethtool private flag for driver-defined queue limits When choosing channel amounts and ring sizes, the maximums in the ibmvnic driver are defined by the virtual i/o server management partition. Even though they are defined as maximums, the client driver may in fact successfully request resources that exceed these limits, which are mostly dependent on a user's hardware With this in mind, provide an ethtool flag that when enabled will allow the user to request resources limited by driver-defined maximums instead of limits defined by the management partition. The driver will try to honor the user's request but may not allowed by the management partition. In this case, the driver requests as close as it can get to the desired amount until it succeeds. Signed-off-by: Thomas Falcon Signed-off-by: David S. Miller commit 20b5ba1f610079908b70d44fd7fb91bf0e9700ff Author: Thomas Falcon Date: Fri Sep 28 18:38:25 2018 -0500 ibmvnic: Introduce driver limits for ring sizes Introduce driver-defined maximums for queue ring sizes. Devices available for IBM vNIC today will likely not allow this amount, but this should give us some leeway for future devices that may support larger ring sizes. Signed-off-by: Thomas Falcon Signed-off-by: David S. Miller commit ad95a240a140fa8bd4153f5d9c8fbd91aa048445 Author: Thomas Falcon Date: Fri Sep 28 18:38:24 2018 -0500 ibmvnic: Increase maximum queue size limit Increase queue size limit to 16. Devices available for IBM vNIC today will not allow this amount, but this should give us some leeway for future devices that may support more RX or TX queues. Signed-off-by: Thomas Falcon Signed-off-by: David S. Miller commit 024926def6ca95819442699fbecc1fe376253fb9 Author: Rob Herring Date: Fri Sep 28 17:04:59 2018 -0500 net: phy: 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: Andrew Lunn Cc: "David S. Miller" Cc: netdev@vger.kernel.org Reviewed-by: Florian Fainelli Signed-off-by: Rob Herring Signed-off-by: David S. Miller commit fb420d5d91c1274d5966917725e71f27ed092a85 Author: Eric Dumazet Date: Fri Sep 28 10:28:44 2018 -0700 tcp/fq: move back to CLOCK_MONOTONIC In the recent TCP/EDT patch series, I switched TCP and sch_fq clocks from MONOTONIC to TAI, in order to meet the choice done earlier for sch_etf packet scheduler. But sure enough, this broke some setups were the TAI clock jumps forward (by almost 50 year...), as reported by Leonard Crestez. If we want to converge later, we'll probably need to add an skb field to differentiate the clock bases, or a socket option. In the meantime, an UDP application will need to use CLOCK_MONOTONIC base for its SCM_TXTIME timestamps if using fq packet scheduler. Fixes: 72b0094f9182 ("tcp: switch tcp_clock_ns() to CLOCK_TAI base") Fixes: 142537e41923 ("net_sched: sch_fq: switch to CLOCK_TAI") Fixes: fd2bca2aa789 ("tcp: switch internal pacing timer to CLOCK_TAI") Signed-off-by: Eric Dumazet Reported-by: Leonard Crestez Tested-by: Leonard Crestez Signed-off-by: David S. Miller commit 0ed3015c9964dab7a1693b3e40650f329c16691e Author: Vakul Garg Date: Fri Sep 28 21:48:08 2018 +0530 selftests/tls: Fix recv(MSG_PEEK) & splice() test cases TLS test cases splice_from_pipe, send_and_splice & recv_peek_multiple_records expect to receive a given nummber of bytes and then compare them against the number of bytes which were sent. Therefore, system call recv() must not return before receiving the requested number of bytes, otherwise the subsequent memcmp() fails. This patch passes MSG_WAITALL flag to recv() so that it does not return prematurely before requested number of bytes are copied to receive buffer. Signed-off-by: Vakul Garg Signed-off-by: David S. Miller commit e3a9667a5bf7e520a1fa24eadccc6010c135ec53 Author: Haiyang Zhang Date: Fri Sep 28 14:41:23 2018 +0000 hv_netvsc: Fix rndis_per_packet_info internal field initialization The RSC feature -- a bit field "internal" was added here with total size unchanged: struct rndis_per_packet_info { u32 size; u32 type:31; u32 internal:1; u32 ppi_offset; }; On TX path, we put rndis msg into skb head room, which is not zeroed before passing to us. We do not use the "internal" field in TX path, but it may impact older hosts which use the entire 32 bits as "type". To fix the bug, this patch sets the field "internal" to zero. Fixes: c8e4eff4675f ("hv_netvsc: Add support for LRO/RSC in the vSwitch") Signed-off-by: Haiyang Zhang Signed-off-by: David S. Miller commit 9f2959b6b52d43326b2f6a0e0d7ffe6f4fc3b5ca Author: Heiner Kallweit Date: Fri Sep 28 08:51:09 2018 +0200 net: phy: improve handling delayed work Using mod_delayed_work() allows to simplify handling delayed work and removes the need for the sync parameter in phy_trigger_machine(). Also introduce a helper phy_queue_state_machine() to encapsulate the low-level delayed work calls. No functional change intended. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit a0651d8e2784b189924b4f4f41b901835feef8a4 Merge: 460b360104d5 a5d78ce7936c Author: David S. Miller Date: Mon Oct 1 23:11:53 2018 -0700 Merge branch 'net-systemport-Turn-on-offloads-by-default' Florian Fainelli says: ==================== net: systemport: Turn on offloads by default Up until now, we had added all the code necessary to turn on RX/TX checksum offloads at runtime, but there is no reason why they have to be disabled by default given that this gives a slight performance improvement. ==================== Signed-off-by: David S. Miller commit a5d78ce7936c9f6fd5a75c1d6b51587c6d05e7b3 Author: Florian Fainelli Date: Thu Sep 27 15:36:14 2018 -0700 net: systemport: Add software counters to track reallocations When inserting the TSB, keep track of how many times we had to do it and if there was a failure in doing so, this helps profile the driver for possibly incorrect headroom settings. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller commit aa6ca0ec71d8028ec712058efa3d93a54e2bb13e Author: Florian Fainelli Date: Thu Sep 27 15:36:13 2018 -0700 net: systemport: Be drop monitor friendly while re-allocating headroom During bcm_sysport_insert_tsb() make sure we differentiate a SKB headroom re-allocation failure from the normal swap and replace path. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller commit b5061778f8228f81c1af855b403aaf528d32ce5b Author: Florian Fainelli Date: Thu Sep 27 15:36:12 2018 -0700 net: systemport: Turn on offloads by default We can turn on the RX/TX checksum offloads by default and make sure that those are properly reflected back to e.g: stacked devices such as VLAN or DSA. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller commit 297357d1a165cf23cc85a6a7ec32ffc854cbf13c Author: Florian Fainelli Date: Thu Sep 27 15:36:11 2018 -0700 net: systemport: Utilize bcm_sysport_set_features() during resume/open During driver resume and open, the HW may have lost its context/state, utilize bcm_sysport_set_features() to make sure we do restore the correct set of features that were previously configured. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller commit 10b476c57b6282990231bfc0593ed84c76efb2b9 Author: Florian Fainelli Date: Thu Sep 27 15:36:10 2018 -0700 net: systemport: Refactor bcm_sysport_set_features() In preparation for unconditionally enabling TX and RX checksum offloads, refactor bcm_sysport_set_features() a bit such that __netdev_update_features() during register_netdev() can make sure that features are correctly programmed during network device registration. Since we can now be called during register_netdev() with clocks gated, we need to temporarily turn them on/off in order to have a successful register programming. We also move the CRC forward setting read into bcm_sysport_set_features() since priv->crc_fwd matters while turning on RX checksum offload, that way we are guaranteed they are in sync in case we ever add support for NETIF_F_RXFCS at some point in the future. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller commit 460b360104d51552a57f39e54b2589c9fd7fa0b3 Author: Cong Wang Date: Thu Sep 27 13:42:19 2018 -0700 net_sched: fix a crash in tc_new_tfilter() When tcf_block_find() fails, it already rollbacks the qdisc refcnt, so its caller doesn't need to clean up this again. Avoid calling qdisc_put() again by resetting qdisc to NULL for callers. Reported-by: syzbot+37b8770e6d5a8220a039@syzkaller.appspotmail.com Fixes: e368fdb61d8e ("net: sched: use Qdisc rcu API instead of relying on rtnl lock") Signed-off-by: Cong Wang Signed-off-by: David S. Miller commit 77ac1c02d9f20a0d72fa992c88b98c15d087dbca Author: Ard Biesheuvel Date: Mon Oct 1 10:13:24 2018 +0200 jump_label: Fix NULL dereference bug in __jump_label_mod_update() Commit 19483677684b ("jump_label: Annotate entries that operate on __init code earlier") refactored the code that manages runtime patching of jump labels in modules that are tied to static keys defined in other modules or in the core kernel. In the latter case, we may iterate over the static_key_mod linked list until we hit the entry for the core kernel, whose 'mod' field will be NULL, and attempt to dereference it to get at its 'state' member. So let's add a non-NULL check: this forces the 'init' argument of __jump_label_update() to false for static keys that are defined in the core kernel, which is appropriate given that __init annotated jump_label entries in the core kernel should no longer be active at this point (i.e., when loading modules). Fixes: 19483677684b ("jump_label: Annotate entries that operate on ...") Reported-by: Dan Carpenter Signed-off-by: Ard Biesheuvel Signed-off-by: Thomas Gleixner Reviewed-by: Kees Cook Cc: Jessica Yu Cc: Peter Zijlstra Link: https://lkml.kernel.org/r/20181001081324.11553-1-ard.biesheuvel@linaro.org commit 57d15877033e44e9ac283b8c6e82cc67bf6a0aa6 Author: Ard Biesheuvel Date: Sun Sep 30 18:49:50 2018 +0200 s390/vmlinux.lds: Move JUMP_TABLE_DATA into output section Commit e872267b8bcbb179 ("jump_table: move entries into ro_after_init region") moved the __jump_table input section into the __ro_after_init output section, but inadvertently put the macro in the wrong place in the s390 linker script. Let's fix that. Fixes: e872267b8bcbb179 ("jump_table: move entries into ro_after_init region") Reported-by: Guenter Roeck Signed-off-by: Ard Biesheuvel Signed-off-by: Thomas Gleixner Reviewed-by: Kees Cook Acked-by: Heiko Carstens Tested-by: Guenter Roeck Cc: linux-s390@vger.kernel.org Cc: Martin Schwidefsky Cc: Jessica Yu Cc: Peter Zijlstra Link: https://lkml.kernel.org/r/20180930164950.3841-1-ard.biesheuvel@linaro.org commit a1fa80802cb02cb043fd61b87bc81c06a38b4bb1 Merge: 6140cc20caf7 33188bd6430e Author: David S. Miller Date: Mon Oct 1 23:05:32 2018 -0700 Merge branch 'netlink-extended-attribute-validation' Johannes Berg says: ==================== netlink: extended attribute validation This adds further netlink attribute validation: * min/max/range validation * validation through a custom function pointer This is useful to * reduce boilerplate code in command handling code, if attributes are used commonly across different commands * get more extended ACK error messages/attribute pointers * ensure attributes are valid even when ignored (though this might be a problem when converting existing code) Changes since v1: * split off validate_type from type and use that for min/max/range and function; this is better because the range is limited to the range of s16 and so things like "u16 with minimum value 1" couldn't be expressed earlier * add macros for this, e.g. NLA_POLICY_MIN(NLA_U16, 1) for the case mentioned in the previous bullet Using this pretty much in all places where applicable in nl80211 reduces the code size there by about 1.8KiB, with just a minimal code increase in lib/nlattr.o. ==================== Signed-off-by: David S. Miller commit 33188bd6430ef06d206ae4fda2cc92f14f16fd20 Author: Johannes Berg Date: Thu Sep 27 11:28:36 2018 +0200 netlink: add validation function to policy Add the ability to have an arbitrary validation function attached to a netlink policy that doesn't already use the validation_data pointer in another way. This can be useful to validate for example the content of a binary attribute, like in nl80211 the "(information) elements", which must be valid streams of "u8 type, u8 length, u8 value[length]". Signed-off-by: Johannes Berg Signed-off-by: David S. Miller commit 3e48be05f3c7eb6f6126939e9d957903c5cfeee5 Author: Johannes Berg Date: Thu Sep 27 11:28:35 2018 +0200 netlink: add attribute range validation to policy Without further bloating the policy structs, we can overload the `validation_data' pointer with a struct of s16 min, max and use those to validate ranges in NLA_{U,S}{8,16,32,64} attributes. It may sound strange to validate NLA_U32 with a s16 max, but in many cases NLA_U32 is used for enums etc. since there's no size benefit in using a smaller attribute width anyway, due to netlink attribute alignment; in cases like that it's still useful, particularly when the attribute really transports an enum value. Doing so lets us remove quite a bit of validation code, if we can be sure that these attributes aren't used by userspace in places where they're ignored today. To achieve all this, split the 'type' field and introduce a new 'validation_type' field which indicates what further validation (beyond the validation prescribed by the type of the attribute) is done. This currently allows for no further validation (the default), as well as min, max and range checks. Signed-off-by: Johannes Berg Signed-off-by: David S. Miller commit 6140cc20caf7da861fb113a707e0acc36bd358ec Merge: 26cf48a66868 c17852a8932f Author: David S. Miller Date: Mon Oct 1 22:57:46 2018 -0700 Merge branch 'Support-of-Flow-Director-in-HNS3-Ethernet-Driver-for-HiP08-Rev2-SoC' Salil Mehta says: ==================== Support of Flow Director in HNS3 Ethernet Driver for HiP08 Rev2 SoC This patch-set adds the support of FD(Flow Director) in the HNS3 PF driver for HiP08 Rev2(0x21) SoC of Hisilicon. FD can be used in filtering the flows and deciding to drop the flow or forward it to paricular queue. Configuration consists of rules with input keys and actions. The rules are stored in TCAM. ==================== Signed-off-by: David S. Miller commit c17852a8932f70d5ba3a487f52a7379e3b73cf30 Author: Jian Shen Date: Mon Oct 1 12:46:47 2018 +0100 net: hns3: Add support for enable/disable flow director This patch adds switch for flow director with ethtool command Signed-off-by: Jian Shen Signed-off-by: Peng Li Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit dc5e6064774e5629859ca9c9e97a1d3d5017a9e3 Author: Jian Shen Date: Mon Oct 1 12:46:46 2018 +0100 net: hns3: Remove all flow director rules when unload hns3 driver This patch removes all flow director rules when unload hns3 driver. Signed-off-by: Jian Shen Signed-off-by: Peng Li Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit 6871af29b3abe6d6ae3a0e28b8bdf44bd4cb8d30 Author: Jian Shen Date: Mon Oct 1 12:46:45 2018 +0100 net: hns3: Add reset handle for flow director When doing reset, remove all entries in TCAM block, and keep flow director rules list. After finishing reset, restore all entries. Signed-off-by: Jian Shen Signed-off-by: Peng Li Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit 05c2314fe6a8f18de707e4353d148c01b581e1ef Author: Jian Shen Date: Mon Oct 1 12:46:44 2018 +0100 net: hns3: Add support for rule query of flow director This patch adds support for querying rule number and rule details by ethtool commands. Signed-off-by: Jian Shen Signed-off-by: Peng Li Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit dd74f815dd41bdb6a979e36b4d35ba7d364281ae Author: Jian Shen Date: Mon Oct 1 12:46:43 2018 +0100 net: hns3: Add support for rule add/delete for flow director This patch adds support for add and delete rule by ethtool commands. HNS3 driver supports several flow types, include ETHER_FLOW, IP_USER_FLOW, TCP_V4_FLOW, UDP_V4_FLOW, SCTP_V4_FLOW, IPV6_USER_FLOW, TCP_V6_FLOW, UDP_V6_FLOW and SCTP_V6_FLOW. Signed-off-by: Jian Shen Signed-off-by: Peng Li Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit 117328680288b55d5eb43f4c697d841fb4abf67a Author: Jian Shen Date: Mon Oct 1 12:46:42 2018 +0100 net: hns3: Add input key and action config support for flow director Each flow director rule consists of input key and action. The input key is the condition for matching, includes tuples of L2/L3/L4 header. Action is the behaviour when a packet matches with the input key, such as drop the packet, or forward to a specified queue. The input key is stored in the tcam blocks, Each bit of input key can be masked. Signed-off-by: Jian Shen Signed-off-by: Peng Li Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit d695964d723d91c1b2bd404e787f6ff2c430b56c Author: Jian Shen Date: Mon Oct 1 12:46:41 2018 +0100 net: hns3: Add flow director initialization Flow director is a new feature supported by hardware with revision 0x21. This patch adds flow direcor initialization for each PF. It queries flow director mode and tcam resource from firmware, selects tuples used for input key. Signed-off-by: Jian Shen Signed-off-by: Peng Li Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit 8fa387494928ea52914b82b5d1ea132b29a8a0b6 Merge: 17b57b1883c1 8188b154f950 Author: Rafael J. Wysocki Date: Tue Oct 2 07:57:19 2018 +0200 Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/mzx/devfreq into pm-devfreq Pull devfreq material for 4.20 from MyungJoo Ham. "This mainly has follow-ups for recent Linux changes in a few APIs (thermal, kfree, dev*, ...)." * 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/mzx/devfreq: PM / devfreq: remove redundant null pointer check before kfree PM / devfreq: stopping the governor before device_unregister() PM / devfreq: Convert to using %pOFn instead of device_node.name PM / devfreq: Make update_devfreq() public PM / devfreq: Don't adjust to user limits in governors PM / devfreq: Fix handling of min/max_freq == 0 PM / devfreq: Drop custom MIN/MAX macros PM / devfreq: Fix devfreq_add_device() when drivers are built as modules. commit 26cf48a66868a6701b2403e13aa52ee91a204785 Merge: 97ea8ac360c2 719655a14971 Author: David S. Miller Date: Mon Oct 1 22:55:36 2018 -0700 Merge branch 'Continue-towards-using-linkmode-in-phylib' Andrew Lunn says: ==================== Continue towards using linkmode in phylib These patches contain some further cleanup and helpers, and the first real patch towards using linkmode bitmaps in phylink. The macro magic in the RFC version has been replaced with run time initialisation. ==================== Signed-off-by: David S. Miller commit 719655a149715f26fc4de904fe0aa83068bd5b9e Author: Andrew Lunn Date: Sat Sep 29 23:04:16 2018 +0200 net: phy: Replace phy driver features u32 with link_mode bitmap This is one step in allowing phylib to make use of link_mode bitmaps, instead of u32 for supported and advertised features. Convert the phy drivers to use bitmaps to indicates the features they support. Build bitmap equivalents of the u32 values at runtime, and have the drivers point to the appropriate bitmap. These bitmaps are shared, and we don't want a driver to modify them. So mark them __ro_after_init. Within phylib, the features bitmap is currently turned back into a u32. This will be removed once the whole of phylib, and the drivers are converted to use bitmaps. Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller commit d0939c26c53a2b2cecfbe6953858a58abb0158c7 Author: Andrew Lunn Date: Sat Sep 29 23:04:15 2018 +0200 net: ethernet: xgbe: expand PHY_GBIT_FEAUTRES The macro PHY_GBIT_FEAUTRES needs to change into a bitmap in order to support link_modes. Remove its use from xgde by replacing it with its definition. Probably, the current behavior is wrong. It probably should be ANDing not assigning. Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller commit f954a04ea18ebfcba1cd2756eaee59eb4978a20e Author: Andrew Lunn Date: Sat Sep 29 23:04:14 2018 +0200 net: phy: Add limkmode equivalents to some of the MII ethtool helpers Add helpers which take a linkmode rather than a u32 ethtool for advertising settings. Signed-off-by: Andrew Lunn Reviewed-by: Florian Fainelli Reviewed-by: Maxime Chevallier Signed-off-by: David S. Miller commit 5f991f7bddc991ecc3c8a009ffd76fccff4661c7 Author: Andrew Lunn Date: Sat Sep 29 23:04:13 2018 +0200 net: phy: Add helper for advertise to lcl value Add a helper to convert the local advertising to an LCL capabilities, which is then used to resolve pause flow control settings. Signed-off-by: Andrew Lunn Reviewed-by: Florian Fainelli Reviewed-by: Maxime Chevallier Signed-off-by: David S. Miller commit edc7ccbbcf32b97c7d26cd556f364eb4f22c4285 Author: Andrew Lunn Date: Sat Sep 29 23:04:12 2018 +0200 net: phy: Add helper to convert MII ADV register to a linkmode The phy_mii_ioctl can be used to write a value into the MII_ADVERTISE register in the PHY. Since this changes the state of the PHY, we need to make the same change to phydev->advertising. Add a helper which can convert the register value to a linkmode. Signed-off-by: Andrew Lunn Reviewed-by: Florian Fainelli Reviewed-by: Maxime Chevallier Signed-off-by: David S. Miller commit c4fabb8b3c0d724eb93dabaf346b0dd8a8be7118 Author: Andrew Lunn Date: Sat Sep 29 23:04:11 2018 +0200 net: phy: Add phydev_info() Add phydev_info() and make use of it within the phy drivers and core code. Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller commit ab2a605fa621ecf4ec26603a237822f7772cfa28 Author: Andrew Lunn Date: Sat Sep 29 23:04:10 2018 +0200 net: phy: Add phydev_warn() Not all new style LINK_MODE bits can be converted into old style SUPPORTED bits. We need to warn when such a conversion is attempted. Add a helper for this. Convert all pr_warn() calls to phydev_warn() where possible. Signed-off-by: Andrew Lunn Reviewed-by: Maxime Chevallier Signed-off-by: David S. Miller commit b31cdffa2329fe330cd304ca26c250dd1520fb0a Author: Andrew Lunn Date: Sat Sep 29 23:04:09 2018 +0200 net: phy: Move linkmode helpers to somewhere public phylink has some useful helpers to working with linkmode bitmaps. Move them to there own header so other code can use them. Signed-off-by: Andrew Lunn Acked-by: Florian Fainelli Reviewed-by: Maxime Chevallier Signed-off-by: David S. Miller commit 97ea8ac360c233e6454bfe6510e7b827a57008af Author: Jakub Kicinski Date: Wed Sep 26 15:35:31 2018 -0700 nfp: warn on experimental TLV types Reserve two TLV types for feature development, and warn in the driver if they ever leak into production. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit ea43a5907f6668ca4e698f7b5c341014c9bb0be6 Author: Moritz Fischer Date: Thu Sep 27 12:48:51 2018 -0700 net: nixge: Address compiler warnings when building for i386 Address compiler warning reported by kbuild autobuilders when building for i386 as a result of dma_addr_t size on different architectures. warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] Fixes: 7e8d5755be0e ("net: nixge: Add support for 64-bit platforms") Signed-off-by: Moritz Fischer Cc: Arnd Bergmann Signed-off-by: David S. Miller commit 789762ceec8f330b8a96e603812fa8dc543de4bf Author: Soheil Hassas Yeganeh Date: Wed Sep 26 16:57:04 2018 -0400 tcp: adjust rcv zerocopy hints based on frag sizes When SKBs are coalesced, we can have SKBs with different frag sizes. Some with PAGE_SIZE and some not with PAGE_SIZE. Since recv_skip_hint is always set to the full SKB size, it can overestimate the amount that should be read using normal read for coalesced packets. Change the recv_skip_hint so that it only includes the first frags that are not of PAGE_SIZE. Signed-off-by: Soheil Hassas Yeganeh Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit 8f2b02931175ca56ddb1fe1a2393c34d97a25aa0 Author: Soheil Hassas Yeganeh Date: Wed Sep 26 16:57:03 2018 -0400 tcp: set recv_skip_hint when tcp_inq is less than PAGE_SIZE When we have less than PAGE_SIZE of data on receive queue, we set recv_skip_hint to 0. Instead, set it to the actual number of bytes available. Signed-off-by: Soheil Hassas Yeganeh Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit f18b2b83a727a3db208308057d2c7945f368e625 Author: Theodore Ts'o Date: Tue Oct 2 01:34:44 2018 -0400 ext4: fix argument checking in EXT4_IOC_MOVE_EXT If the starting block number of either the source or destination file exceeds the EOF, EXT4_IOC_MOVE_EXT should return EINVAL. Also fixed the helper function mext_check_coverage() so that if the logical block is beyond EOF, make it return immediately, instead of looping until the block number wraps all the away around. This takes long enough that if there are multiple threads trying to do pound on an the same inode doing non-sensical things, it can end up triggering the kernel's soft lockup detector. Reported-by: syzbot+c61979f6f2cba5cb3c06@syzkaller.appspotmail.com Signed-off-by: Theodore Ts'o Cc: stable@kernel.org commit 2240c12d7d3de741ffbcf22d7a96358a450051ac Merge: 3bd09b05b068 4a132095dd64 Author: David S. Miller Date: Mon Oct 1 22:31:17 2018 -0700 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-10-01 1) Make xfrmi_get_link_net() static to silence a sparse warning. From Wei Yongjun. 2) Remove a unused esph pointer definition in esp_input(). From Haishuang Yan. 3) Allow the NIC driver to quietly refuse xfrm offload in case it does not support it, the SA is created without offload in this case. From Shannon Nelson. Please pull or let me know if there are problems. ==================== Signed-off-by: David S. Miller commit 6df0580be8bc30803c4d8b2ed9c2230a2740c795 Author: Felix Fietkau Date: Sat Sep 22 18:49:05 2018 +0200 ath9k: add back support for using active monitor interfaces for tx99 Various documented examples on how to set up tx99 with ath9k rely on setting up a regular monitor interface for setting the channel. My previous patch "ath9k: fix tx99 with monitor mode interface" made it possible to set it up this way again. However, it was removing support for using an active monitor interface, which is required for controlling the bitrate as well, since the bitrate is not passed down with a regular monitor interface. This patch partially reverts the previous one, but keeps support for using a regular monitor interface to keep documented steps working in cases where the bitrate does not matter Fixes: d9c52fd17cb48 ("ath9k: fix tx99 with monitor mode interface") Signed-off-by: Felix Fietkau Signed-off-by: Kalle Valo commit e720ba1dcc33377231bcbc76e927f089e393ea60 Author: Brian Norris Date: Fri Sep 21 13:42:41 2018 -0700 ath10k: add missing sanity check on diag download ath10k_hw_diag_fast_download() generally has good boundary checking, but it misses verifying that the next metadata header actually fits in the remaining buffer space. Add such a check. Fixes: 39501ea64116 ("ath10k: download firmware via diag Copy Engine for QCA6174 and QCA9377.") Signed-off-by: Brian Norris Signed-off-by: Kalle Valo commit 4fb5837ac2bd46a85620b297002c704e9958f64d Author: Simon Wunderlich Date: Mon Oct 1 17:26:59 2018 +0300 ath9k: fix reporting calculated new FFT upper max Since the debug print code is outside of the loop, it shouldn't use the loop iterator anymore but instead print the found maximum index. Cc: Nick Kossifidis Signed-off-by: Simon Wunderlich Signed-off-by: Kalle Valo commit 4e7a3fa5394e6a9e3865ef1cedaec5c0ca368dc7 Author: Simon Wunderlich Date: Mon Oct 1 17:26:56 2018 +0300 ath9k: FFT magnitude check: don't consider lower 3 data bits There were a lot of Magnitude Mismatch while getting FFT samples on my hardware (Atheros AR9462. I've compared the reported magnitude with the data in the FFT bin, and the FFT bin was less accurate: [ 5395.193030] ath: phy0: FFT HT20 frame: max mag 0x89,max_mag_idx 28, ,magnitude 0x89 max_exp 0, data[28] = 0x88 [ 5395.194525] ath: phy0: FFT HT20 frame: max mag 0x89,max_mag_idx 28, ,magnitude 0x89 max_exp 0, data[28] = 0x88 [ 5395.196012] ath: phy0: FFT HT20 frame: max mag 0x88,max_mag_idx 28, ,magnitude 0x88 max_exp 0, data[28] = 0x88 [ 5395.197509] ath: phy0: FFT HT20 frame: max mag 0x6C,max_mag_idx 28, ,magnitude 0x6C max_exp 0, data[28] = 0x68 [ 5395.199015] ath: phy0: FFT HT20 frame: max mag 0x78,max_mag_idx 28, ,magnitude 0x78 max_exp 0, data[28] = 0x78 [ 5395.200497] ath: phy0: FFT HT20 frame: max mag 0xA1,max_mag_idx 28, ,magnitude 0xA1 max_exp 0, data[28] = 0xA0 [ 5395.202011] ath: phy0: FFT HT20 frame: max mag 0x91,max_mag_idx 28, ,magnitude 0x91 max_exp 0, data[28] = 0x90 [ 5395.203482] ath: phy0: FFT HT20 frame: max mag 0x89,max_mag_idx 28, ,magnitude 0x89 max_exp 0, data[28] = 0x88 [ 5395.204999] ath: phy0: FFT HT20 frame: max mag 0x27,max_mag_idx 4, ,magnitude 0x27 max_exp 0, data[4] = 0x20 [ 5395.206461] ath: phy0: FFT HT20 frame: max mag 0x41,max_mag_idx 28, ,magnitude 0x41 max_exp 0, data[28] = 0x40 [ 5395.207977] ath: phy0: FFT HT20 frame: max mag 0x51,max_mag_idx 28, ,magnitude 0x51 max_exp 0, data[28] = 0x50 [ 5395.209454] ath: phy0: FFT HT20 frame: max mag 0x53,max_mag_idx 28, ,magnitude 0x53 max_exp 0, data[28] = 0x50 [ 5395.210940] ath: phy0: FFT HT20 frame: max mag 0x40,max_mag_idx 28, ,magnitude 0x40 max_exp 0, data[28] = 0x40 [ 5395.212441] ath: phy0: FFT HT20 frame: max mag 0x59,max_mag_idx 28, ,magnitude 0x59 max_exp 0, data[28] = 0x58 [ 5395.213932] ath: phy0: FFT HT20 frame: max mag 0x53,max_mag_idx 28, ,magnitude 0x53 max_exp 0, data[28] = 0x50 [ 5395.215428] ath: phy0: FFT HT20 frame: max mag 0x7D,max_mag_idx 28, ,magnitude 0x7D max_exp 0, data[28] = 0x78 [ 5395.216910] ath: phy0: FFT HT20 frame: max mag 0x8C,max_mag_idx 28, ,magnitude 0x8C max_exp 0, data[28] = 0x88 [ 5395.218413] ath: phy0: FFT HT20 frame: max mag 0x7B,max_mag_idx 28, ,magnitude 0x7B max_exp 0, data[28] = 0x78 [ 5395.219900] ath: phy0: FFT HT20 frame: max mag 0x43,max_mag_idx 28, ,magnitude 0x43 max_exp 0, data[28] = 0x40 It seems like the lower 3 bits on my hardware are always zeroed, but the magnitude matches otherwise. Therefore, let's not make the magnitude check so strict so we can get those samples released to userspace. Cc: Nick Kossifidis Signed-off-by: Simon Wunderlich Signed-off-by: Kalle Valo commit 2f85786b8a570fbfbc9f52a42723e5d8290ab12f Author: Simon Wunderlich Date: Mon Oct 1 17:26:51 2018 +0300 ath9k: fix and simplify FFT max index retrieval FFT max index retrieval was not retrieved correctly for HT20/HT40 FFT frames. Fixing the retrieval allows us to remove the fixup function as well. While at it, split the spectral_max_index function into versions for ht20 and ht40 to simplify the code. Cc: Nick Kossifidis Signed-off-by: Simon Wunderlich Signed-off-by: Kalle Valo commit b796a6c04e65e35033ad4cb390500ff03ef72350 Author: Simon Wunderlich Date: Mon Oct 1 17:26:46 2018 +0300 ath9k: return when short FFT frame was handled With the loop break like this, there are false "FFT report truncated" messages because the iterator is not advanced as the check expects. Instead, just return, for a single frame there is nothing left to be done anyways. Cc: Nick Kossifidis Signed-off-by: Simon Wunderlich Signed-off-by: Kalle Valo commit 03224678c0134bd5811b81919a4d39a8fbe03244 Author: Simon Wunderlich Date: Mon Oct 1 17:26:42 2018 +0300 ath9k: add counters for good and errorneous FFT/spectral frames This is helpful to see whether spectral samples get discarded. Signed-off-by: Simon Wunderlich Signed-off-by: Kalle Valo commit 55781b66936ee4e15cdd6d591b26662ab9d2d847 Author: GuangZhe Fu Date: Mon Oct 1 23:35:00 2018 -0400 libnvdimm, namespace: Drop the repeat assignment for variable dev->parent The variable dev-parent is assigned twice with the same &nd_region->dev. I think we could drop the second one. Signed-off-by: GuangZhe Fu Signed-off-by: Dan Williams commit d595567dc4f0c1d90685ec1e2e296e2cad2643ac Author: Shaohua Li Date: Mon Oct 1 18:36:36 2018 -0700 MD: fix invalid stored role for a disk If we change the number of array's device after device is removed from array, then add the device back to array, we can see that device is added as active role instead of spare which we expected. Please see the below link for details: https://marc.info/?l=linux-raid&m=153736982015076&w=2 This is caused by that we prefer to use device's previous role which is recorded by saved_raid_disk, but we should respect the new number of conf->raid_disks since it could be changed after device is removed. Reported-by: Gioh Kim Tested-by: Gioh Kim Acked-by: Guoqing Jiang Signed-off-by: Shaohua Li commit 8188b154f95014dae4d19892fefb202c8df3f885 Author: zhong jiang Date: Fri Sep 21 21:18:43 2018 +0800 PM / devfreq: remove redundant null pointer check before kfree kfree has taken the null pointer into account. hence it is safe to remove the redundant null pointer check before kfree. Signed-off-by: zhong jiang Signed-off-by: MyungJoo Ham commit 2f061fd0c2d852e32e03a903fccd810663c5c31e Author: Vincent Donnefort Date: Mon Sep 3 09:02:07 2018 +0900 PM / devfreq: stopping the governor before device_unregister() device_release() is freeing the resources before calling the device specific release callback which is, in the case of devfreq, stopping the governor. It is a problem as some governors are using the device resources. e.g. simpleondemand which is using the devfreq deferrable monitoring work. If it is not stopped before the resources are freed, it might lead to a use after free. Signed-off-by: Vincent Donnefort Reviewed-by: John Einar Reitan [cw00.choi: Fix merge conflict] Reviewed-by: Chanwoo Choi Signed-off-by: MyungJoo Ham commit f037eb8c1f476bc903d99695c1eb9f99ccb46b27 Author: Rob Herring Date: Mon Aug 27 20:52:16 2018 -0500 PM / devfreq: 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: Rob Herring Acked-by: Chanwoo Choi Signed-off-by: MyungJoo Ham commit b596d895fa2957e136a6b398b97b06bd42b51291 Author: Matthias Kaehlcke Date: Fri Aug 3 13:05:11 2018 -0700 PM / devfreq: Make update_devfreq() public Currently update_devfreq() is only visible to devfreq governors outside of devfreq.c. Make it public to allow drivers that adjust devfreq policies to cause a re-evaluation of the frequency after a policy change. Signed-off-by: Matthias Kaehlcke Reviewed-by: Brian Norris Reviewed-by: Chanwoo Choi Signed-off-by: MyungJoo Ham commit 6ff66e2a008337b8a005fd0ae2037bed716262cc Author: Matthias Kaehlcke Date: Fri Aug 3 13:05:10 2018 -0700 PM / devfreq: Don't adjust to user limits in governors Several governors use the user space limits df->min/max_freq to adjust the target frequency. This is not necessary, since update_devfreq() already takes care of this. Instead the governor can request the available min/max frequency by setting the target frequency to DEVFREQ_MIN/MAX_FREQ and let update_devfreq() take care of any adjustments. Signed-off-by: Matthias Kaehlcke Reviewed-by: Brian Norris Reviewed-by: Chanwoo Choi Signed-off-by: MyungJoo Ham commit df5cf4a36178c5d4f2b8b9469cb2f722e64cd102 Author: Matthias Kaehlcke Date: Fri Aug 3 13:05:09 2018 -0700 PM / devfreq: Fix handling of min/max_freq == 0 Commit ab8f58ad72c4 ("PM / devfreq: Set min/max_freq when adding the devfreq device") initializes df->min/max_freq with the min/max OPP when the device is added. Later commit f1d981eaecf8 ("PM / devfreq: Use the available min/max frequency") adds df->scaling_min/max_freq and the following to the frequency adjustment code: max_freq = MIN(devfreq->scaling_max_freq, devfreq->max_freq); With the current handling of min/max_freq this is incorrect: Even though df->max_freq is now initialized to a value != 0 user space can still set it to 0, in this case max_freq would be 0 instead of df->scaling_max_freq as intended. In consequence the frequency adjustment is not performed: if (max_freq && freq > max_freq) { freq = max_freq; To fix this set df->min/max freq to the min/max OPP in max/max_freq_store, when the user passes a value of 0. This also prevents df->max_freq from being set below the min OPP when df->min_freq is 0, and similar for min_freq. Since it is now guaranteed that df->min/max_freq can't be 0 the checks for this case can be removed. Fixes: f1d981eaecf8 ("PM / devfreq: Use the available min/max frequency") Signed-off-by: Matthias Kaehlcke Reviewed-by: Brian Norris Reviewed-by: Chanwoo Choi Signed-off-by: MyungJoo Ham commit d0e464205b8a1fa21357aad0bbf136500d7e688d Author: Bjorn Andersson Date: Tue Apr 24 12:46:39 2018 -0700 PM / devfreq: Drop custom MIN/MAX macros Drop the custom MIN/MAX macros in favour of the standard min/max from kernel.h Signed-off-by: Bjorn Andersson Reviewed-by: Chanwoo Choi Signed-off-by: MyungJoo Ham commit 23c7b54ca1cd1797ef39169ab85e6d46f1c2d061 Author: Enric Balletbo i Serra Date: Wed Jul 4 10:45:50 2018 +0200 PM / devfreq: Fix devfreq_add_device() when drivers are built as modules. When the devfreq driver and the governor driver are built as modules, the call to devfreq_add_device() or governor_store() fails because the governor driver is not loaded at the time the devfreq driver loads. The devfreq driver has a build dependency on the governor but also should have a runtime dependency. We need to make sure that the governor driver is loaded before the devfreq driver. This patch fixes this bug by adding a try_then_request_governor() function. First tries to find the governor, and then, if it is not found, it requests the module and tries again. Fixes: 1b5c1be2c88e (PM / devfreq: map devfreq drivers to governor using name) Signed-off-by: Enric Balletbo i Serra Reviewed-by: Chanwoo Choi Signed-off-by: MyungJoo Ham commit 1c4ccab04a214604eff40e26649cdf00a7930506 Merge: e2c3860ba27d 8911a43bc198 Author: Greg Kroah-Hartman Date: Mon Oct 1 18:13:42 2018 -0700 Merge tag 'iio-for-4.20b' 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 cleanup for the 4.20 cycle. One merge commit in here to bring in the SPI_CS_WORD flag patches that are also going via the SPI tree. There are a few more fixes than normal for a pull targetting the next merge window. These are all long term issues and as we are late in the cycle, they can wait. New device support * ad7606 - Add support fo the ad7605-4 driver. This driver is still in staging but is heading in the right direction to graduate, motivated partly by the requirement for this device support. * ST VL53L0X ToF ranging sensor - New minimal driver. Interrupt support to follow. New features * SPI_CS_WORD optimization allows long transfers with the chip select toggled every 16bits. There is a software fallback as well to let drivers not care about whether the hardware supports it. * bh1750 - Device tree support and bindings. * ti-ads7950 - Use the SPI_CS_WORD optmization to save lots of cpu cycles (assuming the hardware supports it) Fixes and cleanups * ad5064 - Fix some long incorrect regulator error handling that preventing enabling the internal regulator. * ad7606 - The ad7606 doesn't actually have a 2.5V range and the values provided for scale have always been wrong. Fix them. - Drop some wrong kernel-doc (things that don't exist) - Add missing kernel-doc * at91-adc - Fixing missing ack of dataready on sysfs channel reads to avoid spurious interrupts. - Fix a wrong channel numbers in triggered_buffer_mode * hmc5843 - Fix incorrect part number in a comment. * imx25-gcq - Fix a device_node leak in an error path. * meson-saradc - Drop an unused and pointless define. - Use of_device_get_match_data instead of opencoding - Tidy up how meson_sar_adc_param is accessed. - Rework prior to adding some temperature sensor support. * tag 'iio-for-4.20b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: iio: ad5064: Fix regulator handling iio: adc: meson-saradc: use the address attribute from iio_chan_spec iio: adc: meson-saradc: do not use meson_sar_adc_iio_channels directly iio: adc: at91: fix wrong channel number in triggered buffer mode iio: adc: at91: fix acking DRDY irq on simple conversions iio: adc: meson-saradc: simplify access to meson_sar_adc_param iio: adc: meson-saradc: use of_device_get_match_data iio: adc: meson-saradc: remove #define MESON_SAR_ADC_DELTA_10_TS_C_SHIFT iio: light: bh1750: Add device tree support dt-bindings: iio: light: bh1750: Add device tree binding documentation staging:iio:ad7606: Add support for the ad7605-4 iio: proximity: Add driver support for ST's VL53L0X ToF ranging sensor. staging:iio:ad7606: update structs with doc annotations iio: magnetometer: hmc5843: Fixed a comment error. iio: adc: imx25-gcq: Fix leak of device_node in mx25_gcq_setup_cfgs() iio: adc: ti-ads7950: use SPI_CS_WORD to reduce CPU usage spi: add software implementation for SPI_CS_WORD spi: add new SPI_CS_WORD flag staging:iio:ad7606: Remove incorrect kernel doc annotations staging:iio:ad7606: fix voltage scales commit 91c45a7a01e84915a68a7606bbd17d2b590550d0 Merge: 29c222d1a9f5 2e464ff0a9b1 Author: Greg Kroah-Hartman Date: Mon Oct 1 17:42:08 2018 -0700 Merge tag 'extcon-next-for-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/extcon into char-misc-next Chanwoo writes: Update extcon for 4.20 Detailed description for this pull request: 1. Add SPDX license identifiers for Maxim and Intel extcon drivers 2. Clean-up extcon-intel-cht-wc.c driver without operation changes 3. Fix build warning of extcon core and use kasprintf instead of snprintf * tag 'extcon-next-for-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/extcon: extcon: int3496: Convert to use SPDX identifier extcon: cht-wc: Convert to use SPDX identifier extcon: cht-wc: Correct USBID bit field handling extcon: cht-wc: Fix definition names according to spec extcon: cht-wc: Return from default case to avoid warnings extcon: Switch to use kasprintf() instead of open coded extcon: Make static analyzer happy about union assignment extcon: maxim: Add SPDX license identifiers commit 7d98091532491669724b3b5d4e1d7f01a5dd7efa Merge: 29f79155b9b3 566b388440bb Author: Greg Kroah-Hartman Date: Mon Oct 1 17:33:03 2018 -0700 Merge tag 'phy-for-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy into usb-next Kishon writes: phy: for 4.20 *) Add new PHY driver for Socionext PCIe, USB2 and USB3 PHY *) Add new PHY driver for Rockchip HDMI PHY *) Add new PHY driver for Cadence display port PHY *) Add support for UFS PHY in Qualcomm's SDM845 SoC *) Add correct PHY init sequence for BCM63138 SATA PHY *) Add support for bringing the uart2 out through the usb dm+dp pin in Rockchips's rk3188 *) Re-design R-Car Gen3 USB PHY w.r.t support for OTG *) Cleanup Qualcomm's UFS PHY, QMP PHY (for PCIe and USB3) and QUSB2 PHY *) A preparation patch to remove the node name pointer from struct device_node *) Minor cleanups in some of the other PHY drivers. Signed-off-by: Kishon Vijay Abraham I * tag 'phy-for-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy: (41 commits) phy: renesas: convert to SPDX identifiers phy: lantiq: Fix compile warning phy: qcom-ufs: Declare 20nm qcom ufs qmp phy as Broken scsi/ufs: qcom: Remove ufs_qcom_phy_*() calls from host phy: qcom-ufs: Remove stale methods that handle ref clk dt-bindings: phy-qcom-qmp: Add UFS phy compatible string for sdm845 phy: Add QMP phy based UFS phy support for sdm845 phy: General struct and field cleanup phy: Update PHY power control sequence phy: rockchip-usb: add usb-uart setup for rk3188 phy: phy-twl4030-usb: fix denied runtime access phy: renesas: rcar-gen3-usb2: add is_otg_channel to use "role" sysfs phy: renesas: rcar-gen3-usb2: add conditions for uses_otg_pins == false phy: renesas: rcar-gen3-usb2: change a condition "dr_mode" phy: renesas: rcar-gen3-usb2: unify OBINTEN handling phy: renesas: rcar-gen3-usb2: Check a property to use otg pins phy: renesas: rcar-gen3-usb2: Rename has_otg_pins to uses_otg_pins phy: renesas: rcar-gen3-usb2: fix vbus_ctrl for role sysfs dt-bindings: rcar-gen3-phy-usb2: add no-otg-pins property phy: brcm-sata: Add BCM63138 (DSL) PHY init sequence ... commit 5d68fa587a6201d856ce535585cdbcda6834b7a1 Author: Rob Herring Date: Mon Oct 1 15:27:39 2018 -0700 Input: xilinx_ps2 - 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: Rob Herring Signed-off-by: Dmitry Torokhov commit 3bd09b05b0689497d8f2e33ae983b1ee10d15eeb Merge: 041a14d26715 59c9d35ea9cd Author: David S. Miller Date: Mon Oct 1 15:49:17 2018 -0700 Merge tag 'mlx5e-updates-2018-10-01' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5e-updates-2018-10-01 This series includes updates to mlx5e ethernet netdevice driver: From Or Gerlitz: 1) Support masks for l3/l4 filters in ethtool flow steering 2) Report checksum unnecessary also when the L3 checksum flag on the cqe is set and there's no L4 header 3) Allow reporting of checksum unnecessary, using an ethtool private flag. From Gavi Teitz and Or, VF representors netdevs performance improvements 4) Allow striding RQ in VF representor and bigger RQ size, ~3X performance improvement 5) Enable stateless offloads for VF representor, csum and TSO, 1.5X performance improvement 6) RSS Support for VF representors 6.1) Allow flow table destination fir VF representor steering rule. 6.2) Create RSS flow table per representor netdev 6.3) Expose mlx5e RSS ethtool to be used by representor netdevs 6.4) Enable multi-queue and RSS for VF representors, using mlx5e existing infrastructure for managing a multi-queue RX RSS tables. From Alaa Hleihel: 7) Cache the system image guid, The system image guid is a read-only field Read this once and save it on the core device. ==================== Signed-off-by: David S. Miller commit 041a14d2671573611ffd6412bc16e2f64469f7fb Author: Yuchung Cheng Date: Mon Oct 1 15:42:32 2018 -0700 tcp: start receiver buffer autotuning sooner Previously receiver buffer auto-tuning starts after receiving one advertised window amount of data. After the initial receiver buffer was raised by patch a337531b942b ("tcp: up initial rmem to 128KB and SYN rwin to around 64KB"), the reciver buffer may take too long to start raising. To address this issue, this patch lowers the initial bytes expected to receive roughly the expected sender's initial window. Fixes: a337531b942b ("tcp: up initial rmem to 128KB and SYN rwin to around 64KB") Signed-off-by: Yuchung Cheng Signed-off-by: Wei Wang Signed-off-by: Neal Cardwell Signed-off-by: Eric Dumazet Reviewed-by: Soheil Hassas Yeganeh Signed-off-by: David S. Miller commit d96112b2cab2db485bb43ea9cd2b24ce147cd730 Merge: 804fe108fc92 5df7e45d54fc Author: David S. Miller Date: Mon Oct 1 15:43:58 2018 -0700 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-10-01 This series contains updates to ice driver only. Anirudh provides several changes to "prep" the driver for upcoming features. Specifically, the functions that are used for PF VSI/netdev setup will also be used in SR-IOV support and to allow the reuse of these functions, code needs to move. Dave provides the only other change in the series, updates the driver to protect the reset patch in its entirety. This is done by adding the various bit checks to determine if a reset is scheduled/initiated and whether it came from the software or firmware. ==================== Signed-off-by: David S. Miller commit 7fb44929cb0e5cdcde143e1ca3ca57b5b8247db0 Author: Florian Fainelli Date: Mon Oct 1 10:33:02 2018 -0700 ata: ahci_brcm: Allow using driver or DSL SoCs The Broadcom STB AHCI controller is the same as the one found on DSL SoCs, so we will utilize the same driver on these systems as well. Signed-off-by: Florian Fainelli Signed-off-by: Jens Axboe commit fb8506f15f2e394f5f648575cf48a26e8744390c Author: Florian Fainelli Date: Mon Oct 1 10:33:01 2018 -0700 ata: ahci_brcm: Match BCM63138 compatible strings Match the "brcm,bcm63138-ahci" compatible string in order to allow this driver to probe on such platforms. Signed-off-by: Florian Fainelli Signed-off-by: Jens Axboe commit 2b2c47d9e1fe90311b725125d6252a859ee87a79 Author: Florian Fainelli Date: Mon Oct 1 10:33:00 2018 -0700 ata: ahci_brcm: Allow optional reset controller to be used On BCM63138, we need to reset the AHCI core prior to start utilizing it, grab the reset controller device cookie and do that. Signed-off-by: Florian Fainelli Signed-off-by: Jens Axboe commit d6dc71d1468f7611b18c740d6f78e7f2f3fa726b Author: Florian Fainelli Date: Mon Oct 1 10:32:59 2018 -0700 dt-bindings: ata: Document BCM63138 compatible string Document the compatible string "brcm,bcm63138-ahci" as a valid compatible string for the standard Broadcom AHCI controller. Reviewed-by: Rob Herring Signed-off-by: Florian Fainelli Signed-off-by: Jens Axboe commit 6ffeddd6bca4cb838623d0bf4134c0eb06ad7485 Author: Gregory CLEMENT Date: Wed Sep 12 17:35:49 2018 +0200 clk: mvebu: ap806: Remove superfluous of_clk_add_provider While applying the commit a8309cedcdce ("clk: apn806: Add eMMC clock to system controller driver"), of_clk_add_provider was added wheres it was already present in the probe function. This extraneous call is harmless but not useful so remove it. Signed-off-by: Gregory CLEMENT Signed-off-by: Stephen Boyd commit c3828949a21d95326f08f02d97fea97172319300 Author: Gregory CLEMENT Date: Wed Sep 12 15:40:17 2018 +0200 clk: mvebu: use SPDX-License-Identifier Convert the remaining files to SPDX license description. Signed-off-by: Gregory CLEMENT Signed-off-by: Stephen Boyd commit e15d598b5c6f61785c85f6c2db3f3cec4d33e6c9 Merge: 5b394b2ddf03 8b2a37870419 Author: Stephen Boyd Date: Mon Oct 1 14:57:43 2018 -0700 Merge tag 'sunxi-clk-for-4.20' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into clk-allwinner Pull allwinner clock changes from Maxime Ripard: Our usual set of changes for the Allwinner SoCs clock support. The most notable changes are: - A bunch of changes and fixes to support the A64 display engine - Some fixes to support the A83t display engine * tag 'sunxi-clk-for-4.20' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: dt-bindings: clock: sun50i-a64-ccu: Add PLL_VIDEO0 macro clk: sunxi-ng: a64: Add max. rate constraint to video PLLs clk: sunxi-ng: a64: Add minimal rate for video PLLs clk: sunxi-ng: sun50i: h6: Add 2x fixed post-divider to MMC module clocks clk: sunxi-ng: a83t: Add max. rate constraint to video PLLs clk: sunxi-ng: nkmp: Add constraint for maximum rate clk: sunxi-ng: r40: Add max. rate constraint to video PLLs clk: sunxi-ng: h3/h5: Add max. rate constraint to pll-video clk: sunxi-ng: Add maximum rate constraint to NM PLLs clk: sunxi-ng: h6: fix PWM gate/reset offset clk: sunxi-ng: h6: fix bus clocks' divider position commit f333444708f82c4a4d3ccac004da0bfd9cfdfa42 Author: Christoph Hellwig Date: Tue Sep 11 09:51:29 2018 +0200 nvme: take node locality into account when selecting a path Make current_path an array with an entry for every possible node, and cache the best path on a per-node basis. Take the node distance into account when selecting it. This is primarily useful for dual-ported PCIe devices which are connected to PCIe root ports on different sockets. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Hannes Reinecke commit 73383adfad245bb84e6d6ef7830f01048fcfc217 Author: Sagi Grimberg Date: Fri Sep 28 15:40:43 2018 -0700 nvmet: don't split large I/Os unconditionally If we know that the I/O size exceeds our inline bio vec, no point using it and split the rest to begin with. We could in theory reuse the inline bio and only allocate the bio_vec, but its really not worth optimizing for. Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit 783f4a4408e1251d17f333ad56abac24dde988b9 Author: James Smart Date: Thu Sep 27 16:58:54 2018 -0700 nvme: call nvme_complete_rq when nvmf_check_ready fails for mpath I/O When an io is rejected by nvmf_check_ready() due to validation of the controller state, the nvmf_fail_nonready_command() will normally return BLK_STS_RESOURCE to requeue and retry. However, if the controller is dying or the I/O is marked for NVMe multipath, the I/O is failed so that the controller can terminate or so that the io can be issued on a different path. Unfortunately, as this reject point is before the transport has accepted the command, blk-mq ends up completing the I/O and never calls nvme_complete_rq(), which is where multipath may preserve or re-route the I/O. The end result is, the device user ends up seeing an EIO error. Example: single path connectivity, controller is under load, and a reset is induced. An I/O is received: a) while the reset state has been set but the queues have yet to be stopped; or b) after queues are started (at end of reset) but before the reconnect has completed. The I/O finishes with an EIO status. This patch makes the following changes: - Adds the HOST_PATH_ERROR pathing status from TP4028 - Modifies the reject point such that it appears to queue successfully, but actually completes the io with the new pathing status and calls nvme_complete_rq(). - nvme_complete_rq() recognizes the new status, avoids resetting the controller (likely was already done in order to get this new status), and calls the multipather to clear the current path that errored. This allows the next command (retry or new command) to select a new path if there is one. Signed-off-by: James Smart Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit 09bd1ff4b15143bc0e6dd2adf39f59f6ab6e2621 Author: Chaitanya Kulkarni Date: Mon Sep 17 10:47:06 2018 -0700 nvme-core: add async event trace helper This patch adds a new event for nvme async event notification. We print the async event in the decoded format when we recognize the event otherwise we just dump the result. Signed-off-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit 97faec531460c949d7120672b8c77e2f41f8d6d7 Author: James Smart Date: Thu Sep 13 16:17:38 2018 -0700 nvme_fc: add 'nvme_discovery' sysfs attribute to fc transport device The fc transport device should allow for a rediscovery, as userspace might have lost the events. Example is udev events not handled during system startup. This patch add a sysfs entry 'nvme_discovery' on the fc class to have it replay all udev discovery events for all local port/remote port address pairs. Signed-off-by: James Smart Signed-off-by: Christoph Hellwig commit ea96d6496ff59b2b26dc9e13dc8f57d77731eb37 Author: James Smart Date: Thu Aug 9 16:48:14 2018 -0700 nvmet_fc: support target port removal with nvmet layer Currently, if a targetport has been connected to via the nvmet config (in other words, the add_port() transport routine called, and the nvmet port pointer stored for using in upcalls on new io), and if the targetport is then removed (say the lldd driver decides to unload or fully reset its hardware) and then re-added (the lldd driver reloads or reinits its hardware), the port pointer has been lost so there's no way to continue to post commands up to nvmet via the transport port. Correct by allocating a small "port context" structure that will be linked to by the targetport. The context will save the targetport WWN's and the nvmet port pointer to use for it. Initial allocation will occur when the targetport is bound to via add_port. The context will be deallocated when remove_port() is called. If a targetport is removed while nvmet has the active port context, the targetport will be unlinked from the port context before removal. If a new targetport is registered, the port contexts without a binding are looked through and if the WWN's match (so it's the same as nvmet's port context) the port context is linked to the new target port. Thus new io can be received on the new targetport and operation resumes with nvmet. Additionally, this also resolves nvmet configuration changing out from underneath of the nvme-fc target port (for example: a nvmetcli clear). Signed-off-by: James Smart Signed-off-by: Christoph Hellwig commit d4e4230c8f5646a19a0e58765a30fb2bab5f1dcc Author: Milan P. Gandhi Date: Fri Aug 10 14:54:02 2018 +0530 nvme-fc: fix for a minor typos Signed-off-by: Milan P. Gandhi Reviewed-by: James Smart Signed-off-by: Christoph Hellwig commit d93cb3927ca5528bd21f2635a2300f9a1426ac46 Author: Chaitanya Kulkarni Date: Mon Sep 10 17:39:33 2018 -0700 nvmet: remove redundant module prefix This patch removes the redundant module prefix used in the pr_err() when nvmet_get_smart_log_nsid() failed to find the namespace provided as a part of smart-log command. Signed-off-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit 53b3a66163ea6cc7a86e0a3a04b1166d96665824 Author: Milan P. Gandhi Date: Thu Aug 9 21:49:24 2018 +0530 nvme: fix typo in nvme_identify_ns_descs Signed-off-by: Milan P. Gandhi Reviewed-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit 5df7e45d54fc99dd7c73e3a1f163cbfafc8b51f5 Author: Dave Ertman Date: Wed Sep 19 17:23:11 2018 -0700 ice: Change pf state behavior to protect reset path Currently, there is no bit, or set of bits, that protect the entirety of the reset path. If the reset is originated by the driver, then the relevant one of the following bits will be set when the reset is scheduled: __ICE_PFR_REQ __ICE_CORER_REQ __ICE_GLOBR_REQ This bit will not be cleared until after the rebuild has completed. If the reset is originated by the FW, then the first the driver knows of it will be the reception of the OICR interrupt. The __ICE_RESET_OICR_RECV bit will be set in the interrupt handler. This will also be the indicator in a SW originated reset that we have completed the pre-OICR tasks and have informed the FW that a reset was requested. To utilize these bits, change the function: ice_is_reset_recovery_pending() to be: ice_is_reset_in_progress() The new function will check all of the above bits in the pf->state and will return a true if one or more of these bits are set. Signed-off-by: Dave Ertman Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 37bb839012865a4cafc038ec7ee183b873583a7d Author: Anirudh Venkataramanan Date: Wed Sep 19 17:23:10 2018 -0700 ice: Move common functions out of ice_main.c part 7/7 This patch completes the code move out of ice_main.c The following top level functions and related dependency functions) were moved to ice_lib.c: ice_vsi_setup ice_vsi_cfg_tc The following functions were made static again: ice_vsi_setup_vector_base ice_vsi_alloc_q_vectors ice_vsi_get_qs void ice_vsi_map_rings_to_vectors ice_vsi_alloc_rings ice_vsi_set_rss_params ice_vsi_set_num_qs ice_get_free_slot ice_vsi_init ice_vsi_alloc_arrays Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit df0f847915b4311fc107e8e803c69b9f426c4f7b Author: Anirudh Venkataramanan Date: Wed Sep 19 17:23:09 2018 -0700 ice: Move common functions out of ice_main.c part 6/7 This patch continues the code move out of ice_main.c The following top level functions (and related dependency functions) were moved to ice_lib.c: ice_vsi_setup_vector_base ice_vsi_alloc_q_vectors ice_vsi_get_qs The following functions were made static again: ice_vsi_free_arrays ice_vsi_clear_rings Also, in this patch, the netdev and NAPI registration logic was de-coupled from the VSI creation logic (ice_vsi_setup) as for SR-IOV, while we want to create VF VSIs using ice_vsi_setup, we don't want to create netdevs. Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 07309a0e59edf4247bbf64ed852f95ced207f27a Author: Anirudh Venkataramanan Date: Wed Sep 19 17:23:08 2018 -0700 ice: Move common functions out of ice_main.c part 5/7 This patch continues the code move out of ice_main.c The following top level functions (and related dependency functions) were moved to ice_lib.c: ice_vsi_clear ice_vsi_close ice_vsi_free_arrays ice_vsi_map_rings_to_vectors Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 28c2a64573881082222fd30f382af966b32d1f99 Author: Anirudh Venkataramanan Date: Wed Sep 19 17:23:07 2018 -0700 ice: Move common functions out of ice_main.c part 4/7 This patch continues the code move out of ice_main.c The following top level functions (and related dependency functions) were moved to ice_lib.c: ice_vsi_alloc_rings ice_vsi_set_rss_params ice_vsi_set_num_qs ice_get_free_slot ice_vsi_init ice_vsi_clear_rings ice_vsi_alloc_arrays Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 5153a18e57ff3f7ef8bc76d31a968116e7f1963d Author: Anirudh Venkataramanan Date: Wed Sep 19 17:23:06 2018 -0700 ice: Move common functions out of ice_main.c part 3/7 This patch continues the code move out of ice_main.c The following top level functions (and related dependency functions) were moved to ice_lib.c: ice_vsi_delete ice_free_res ice_get_res ice_is_reset_recovery_pending ice_vsi_put_qs ice_vsi_dis_irq ice_vsi_free_irq ice_vsi_free_rx_rings ice_vsi_free_tx_rings ice_msix_clean_rings Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 72adf2421d9bb25b08f79f3148892af1fe96ef8b Author: Anirudh Venkataramanan Date: Wed Sep 19 17:23:05 2018 -0700 ice: Move common functions out of ice_main.c part 2/7 This patch continues the code move out of ice_main.c The following top level functions (and related dependency functions) were moved to ice_lib.c: ice_vsi_start_rx_rings ice_vsi_stop_rx_rings ice_vsi_stop_tx_rings ice_vsi_cfg_rxqs ice_vsi_cfg_txqs ice_vsi_cfg_msix Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 45d3d428eafcbb18027c419624ce950b4db3a4b4 Author: Anirudh Venkataramanan Date: Wed Sep 19 17:23:04 2018 -0700 ice: Move common functions out of ice_main.c part 1/7 The functions that are used for PF VSI/netdev setup will also be used for SR-IOV support. To allow reuse of these functions, move these functions out of ice_main.c to ice_common.c/ice_lib.c This move is done across multiple patches. Each patch moves a few functions and may have minor adjustments. For example, a function that was previously static in ice_main.c will be made non-static temporarily in its new location to allow the driver to build cleanly. These adjustments will be removed in subsequent patches where more code is moved out of ice_main.c In this particular patch, the following functions were moved out of ice_main.c: int ice_add_mac_to_list ice_free_fltr_list ice_stat_update40 ice_stat_update32 ice_update_eth_stats ice_vsi_add_vlan ice_vsi_kill_vlan ice_vsi_manage_vlan_insertion ice_vsi_manage_vlan_stripping Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit f456767d3391e9f7d9d25a2e7241d75676dc19da Author: Eric Whitney Date: Mon Oct 1 14:33:24 2018 -0400 ext4: fix reserved cluster accounting at page invalidation time Add new code to count canceled pending cluster reservations on bigalloc file systems and to reduce the cluster reservation count on all file systems using delayed allocation. This replaces old code in ext4_da_page_release_reservations that was incorrect. Signed-off-by: Eric Whitney Signed-off-by: Theodore Ts'o commit 59c9d35ea9cd73c3a55642ec9a0097770baccb93 Author: Alaa Hleihel Date: Wed Sep 5 17:06:37 2018 +0300 net/mlx5: Cache the system image guid The system image guid is a read-only field which is used by the TC offloads code to determine if two mlx5 devices belong to the same ASIC while adding flows. Read this once and save it on the core device rather than querying each time an offloaded flow is added. Signed-off-by: Alaa Hleihel Reviewed-by: Or Gerlitz Signed-off-by: Saeed Mahameed commit b856df28f9230a47669efbdd57896084caadb2b3 Author: Or Gerlitz Date: Sun Jul 1 08:58:38 2018 +0000 net/mlx5e: Allow reporting of checksum unnecessary Currently we practically never report checksum unnecessary, because for all IP packets we take the checksum complete path. Enable non-default runs with reprorting checksum unnecessary, using an ethtool private flag. This can be useful for performance evals and other explorations. Signed-off-by: Or Gerlitz Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit b820e6fb0978f9c2ac438c199d2bb2f35950e9c9 Author: Or Gerlitz Date: Sun Jul 1 08:49:38 2018 +0000 net/mlx5e: Enable reporting checksum unnecessary also for L3 packets We can report checksum unnecessary also when the L3 checksum flag on the cqe is set and there's no L4 header. Signed-off-by: Or Gerlitz Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit f128f138cc4003c66053a5583378da90b4b3a25a Author: Gavi Teitz Date: Thu Sep 13 14:40:25 2018 +0300 net/mlx5e: Add ethtool control of ring params to VF representors Added ethtool control to the representors for setting and querying the ring params. Signed-off-by: Gavi Teitz commit 84a0973386c5b6739627372c3725f5826c71f70c Author: Gavi Teitz Date: Wed Sep 12 15:18:40 2018 +0300 net/mlx5e: Enable multi-queue and RSS for VF representors Increased the amount of channels the representors can open to be the amount of CPUs. The default amount opened remains one. Used the standard NIC netdev functions to: * Set RSS params when building the representors' params. * Setup an indirect TIR and RQT for the representors upon initialization. * Create a TTC flow table for the representors' indirect TIR (when creating the TTC table, mlx5e_set_ttc_basic_params() is not called, in order to avoid setting the inner_ttc param, which is not needed). Added ethtool control to the representors for setting and querying the amount of open channels. Additionally, included logic in the representors' ethtool set channels handler which controls a representor's vport rx rule, so that if there is one open channel the rx rule steers traffic to the representor's direct TIR, whereas if there is more than one channel, the rx rule steers traffic to the new TTC flow table. Signed-off-by: Gavi Teitz Reviewed-by: Or Gerlitz Signed-off-by: Saeed Mahameed commit a5355de878f4d5cc3eaf6f447cc33c103fab74dd Author: Or Gerlitz Date: Sun Aug 26 12:53:51 2018 +0300 net/mlx5e: Expose ethtool rss key size / indirection table functions Towards enabling RSS for the vport representors, expose the functions for querying the rss hash key size and indirection table size via ethtool. Signed-off-by: Or Gerlitz Reviewed-by: Or Gerlitz Signed-off-by: Saeed Mahameed commit 3edc0159c01406a21a8c850b268d1ac8fb2b4c66 Author: Gavi Teitz Date: Sun Aug 19 15:01:13 2018 +0300 net/mlx5e: Expose function for building RSS params Towards enabling RSS for the vport representors, extract the procedure for building a device's RSS params, and expose the function. Signed-off-by: Gavi Teitz Reviewed-by: Or Gerlitz Signed-off-by: Saeed Mahameed commit 46dc933cee82c8fd18f5fb8dfa10aceb7a29d5ab Author: Or Gerlitz Date: Tue Aug 28 20:53:55 2018 +0300 net/mlx5e: Provide explicit directive if to create inner indirect tirs Change the driver functions that deal with creating indirect tirs to get a flag telling if inner ttc is desired. A pre-step for enabling rss on the vport representors, where inner ttc is not needed. Signed-off-by: Or Gerlitz Reviewed-by: Or Gerlitz Signed-off-by: Saeed Mahameed commit c966f7d55d00ece53742c4595607402c1d9384a6 Author: Gavi Teitz Date: Fri Aug 17 00:28:53 2018 +0300 net/mlx5: E-Switch, Provide flow dest when creating vport rx rule Currently the destination for the representor e-switch rx rule is a TIR number. Towards changing that to potentially be a flow table, as part of enabling RSS for representors, modify the signature of the related e-switch API to get a flow destination. Signed-off-by: Gavi Teitz Reviewed-by: Or Gerlitz Signed-off-by: Saeed Mahameed commit 092297e09a0a9f7dcf27cf1ee430f42e16342651 Author: Gavi Teitz Date: Sun Aug 19 14:08:27 2018 +0300 net/mlx5e: Extract creation of rep's default flow rule Cleaning up the flow of the representors' rx initialization, towards enabling RSS for the representors. Signed-off-by: Gavi Teitz Reviewed-by: Or Gerlitz Signed-off-by: Saeed Mahameed commit dabeb3b0d5c3761eeec27e5af4eb53dda97b4445 Author: Gavi Teitz Date: Thu Aug 16 15:12:27 2018 +0300 net/mlx5e: Enable stateless offloads for VF representor netdevs Enabled checksum and TSO offloads for the representors, in order to increase their performance, which is required to increase the performance of flows that cannot be offloaded. Checksum offloads contribute to a general acceleration of all traffic (to around 150%), whereas the TSO offload contributes to a prominent acceleration of the representor's TX for traffic flows with larger than MTU sized packets (to around 200%). This is the usual case for TCP streams, as the PF, which serves as the uplink representor, and the VF representors employ GRO before forwarding the packets to the representor. GRO was enabled implicitly for the representors beforehand, and is explicitly enabled here to ensure that the representors preserve the performance boost it provides (of around 200%) when working in tandem with the TSO offload by the forwardee, which is the standard case as both the PF and the VF representors employ HW TSO. The impact of these changes can be seen in the following measurements taken on a setup of a VM over a VF, connected to OVS via the VF representor, to an external host: Before current changes: TCP Throughput [Gb/s] External host to VM ~ 10.5 VM to external host ~ 23.5 With just checksum offloads enabled: TCP Throughput [Gb/s] External host to VM ~ 14.9 VM to external host ~ 28.5 With the TSO offload also enabled: TCP Throughput [Gb/s] External host to VM ~ 30.5 Signed-off-by: Gavi Teitz Reviewed-by: Or Gerlitz Signed-off-by: Saeed Mahameed commit 749359f4aae624ed8fe7aed80e6b011b6e3db2ef Author: Gavi Teitz Date: Thu Aug 16 14:25:24 2018 +0300 net/mlx5e: Change VF representors' RQ type The representors' RQ size was not large enough for them to achieve high enough performance, and therefore needed to be enlarged, while suffering a minimum hit to its memory usage. To achieve this the representors RQ size was increased, and its type was changed to be a striding RQ if it is supported. Towards that goal the following changes were made: * Extracted the sequence for setting the standard netdev's RQ parmas into a function * Replaced the sequence for setting the representor's RQ params with the standard sequence The impact of this change can be seen in the following measurements taken on a setup of a VM over a VF, connected to OVS via the VF representor, to an external host: Before current change: TCP Throughput [Gb/s] VM to external host ~ 7.2 With the current change (measured with a striding RQ): TCP Throughput [Gb/s] VM to external host ~ 23.5 Each representor now consumes 2 [MB] of memory for its packet buffers. Signed-off-by: Gavi Teitz Reviewed-by: Or Gerlitz Signed-off-by: Saeed Mahameed commit 3a95e0ccaf07b14b82e861bcb7544bacedc07932 Author: Or Gerlitz Date: Thu Aug 16 21:38:22 2018 +0300 net/mlx5e: Ethtool steering, Support masks for l3/l4 filters Allow using partial masks for L3 addresses and L4 ports across the place. Signed-off-by: Or Gerlitz Signed-off-by: Saeed Mahameed commit 9fe671496b6c286f9033aedfc1718d67721da0ae Author: Eric Whitney Date: Mon Oct 1 14:25:08 2018 -0400 ext4: adjust reserved cluster count when removing extents Modify ext4_ext_remove_space() and the code it calls to correct the reserved cluster count for pending reservations (delayed allocated clusters shared with allocated blocks) when a block range is removed from the extent tree. Pending reservations may be found for the clusters at the ends of written or unwritten extents when a block range is removed. If a physical cluster at the end of an extent is freed, it's necessary to increment the reserved cluster count to maintain correct accounting if the corresponding logical cluster is shared with at least one delayed and unwritten extent as found in the extents status tree. Add a new function, ext4_rereserve_cluster(), to reapply a reservation on a delayed allocated cluster sharing blocks with a freed allocated cluster. To avoid ENOSPC on reservation, a flag is applied to ext4_free_blocks() to briefly defer updating the freeclusters counter when an allocated cluster is freed. This prevents another thread from allocating the freed block before the reservation can be reapplied. Redefine the partial cluster object as a struct to carry more state information and to clarify the code using it. Adjust the conditional code structure in ext4_ext_remove_space to reduce the indentation level in the main body of the code to improve readability. Signed-off-by: Eric Whitney Signed-off-by: Theodore Ts'o commit b6bf9171ef5c37b66d446378ba63af5339a56a97 Author: Eric Whitney Date: Mon Oct 1 14:24:08 2018 -0400 ext4: reduce reserved cluster count by number of allocated clusters Ext4 does not always reduce the reserved cluster count by the number of clusters allocated when mapping a delayed extent. It sometimes adds back one or more clusters after allocation if delalloc blocks adjacent to the range allocated by ext4_ext_map_blocks() share the clusters newly allocated for that range. However, this overcounts the number of clusters needed to satisfy future mapping requests (holding one or more reservations for clusters that have already been allocated) and premature ENOSPC and quota failures, etc., result. Ext4 also does not reduce the reserved cluster count when allocating clusters for non-delayed allocated writes that have previously been reserved for delayed writes. This also results in overcounts. To make it possible to handle reserved cluster accounting for fallocated regions in the same manner as used for other non-delayed writes, do the reserved cluster accounting for them at the time of allocation. In the current code, this is only done later when a delayed extent sharing the fallocated region is finally mapped. Address comment correcting handling of unsigned long long constant from Jan Kara's review of RFC version of this patch. Signed-off-by: Eric Whitney Signed-off-by: Theodore Ts'o commit 0b02f4c0d6d9e2c611dfbdd4317193e9dca740e6 Author: Eric Whitney Date: Mon Oct 1 14:19:37 2018 -0400 ext4: fix reserved cluster accounting at delayed write time The code in ext4_da_map_blocks sometimes reserves space for more delayed allocated clusters than it should, resulting in premature ENOSPC, exceeded quota, and inaccurate free space reporting. Fix this by checking for written and unwritten blocks shared in the same cluster with the newly delayed allocated block. A cluster reservation should not be made for a cluster for which physical space has already been allocated. Signed-off-by: Eric Whitney Signed-off-by: Theodore Ts'o commit 1dc0aa46e74a3366e12f426b7caaca477853e9c3 Author: Eric Whitney Date: Mon Oct 1 14:17:41 2018 -0400 ext4: add new pending reservation mechanism Add new pending reservation mechanism to help manage reserved cluster accounting. Its primary function is to avoid the need to read extents from the disk when invalidating pages as a result of a truncate, punch hole, or collapse range operation. Signed-off-by: Eric Whitney Signed-off-by: Theodore Ts'o commit ad431025aecda85d3ebef5e4a3aca5c1c681d0c7 Author: Eric Whitney Date: Mon Oct 1 14:10:39 2018 -0400 ext4: generalize extents status tree search functions Ext4 contains a few functions that are used to search for delayed extents or blocks in the extents status tree. Rather than duplicate code to add new functions to search for extents with different status values, such as written or a combination of delayed and unwritten, generalize the existing code to search for caller-specified extents status values. Also, move this code into extents_status.c where it is better associated with the data structures it operates upon, and where it can be more readily used to implement new extents status tree functions that might want a broader scope for i_es_lock. Three missing static specifiers in RFC version of patch reported and fixed by Fengguang Wu . Signed-off-by: Eric Whitney Signed-off-by: Theodore Ts'o commit be783cc8d72bb1e48b50c1838a3afeafad4c91c7 Merge: f676d8612cd6 a53a28dca412 Author: Stephen Boyd Date: Mon Oct 1 10:56:17 2018 -0700 Merge tag 'clk-renesas-for-v4.20-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 CMT timer clocks on R-Car V3H - Add support for SHDI and various timer clocks on R-Car V3M - Add support for the new RZ/A2 (R7S9210) SoC, including early clock support for the Renesas CPG/MSSR driver - Add support for the new RZ/G1N (R8A7744) and RZ/G2E (R8A774C0) SoCs - Convert DT binding includes to SPDX license identifiers * tag 'clk-renesas-for-v4.20-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers: clk: renesas: r7s9210: Add SPI clocks clk: renesas: r7s9210: Move table update to separate function clk: renesas: r7s9210: Convert some clocks to early clk: renesas: cpg-mssr: Add early clock support clk: renesas: r8a77970: Add TPU clock clk: renesas: r8a77990: Fix incorrect PLL0 divider in comment dt-bindings: clock: renesas: cpg-mssr: Document r8a774c0 clk: renesas: cpg-mssr: Add r8a774c0 support clk: renesas: Add r8a774c0 CPG Core Clock Definitions clk: renesas: r8a7743: Add r8a7744 support clk: renesas: Add r8a7744 CPG Core Clock Definitions dt-bindings: clock: renesas: cpg-mssr: Document r8a7744 binding dt-bindings: clock: renesas: Convert to SPDX identifiers clk: renesas: cpg-mssr: Add R7S9210 support clk: renesas: r8a77970: Add TMU clocks clk: renesas: r8a77970: Add CMT clocks clk: renesas: r9a06g032: Fix UART34567 clock rate clk: renesas: r8a77970: Add SD0H/SD0 clocks for SDHI clk: renesas: r8a77980: Add CMT clocks commit 148edd50c80792f40f97e585ff5af8babfb7634a Merge: 5b394b2ddf03 93c873d68646 Author: Stephen Boyd Date: Mon Oct 1 10:32:32 2018 -0700 Merge tag 'meson-clk-4.20-1' of https://github.com/BayLibre/clk-meson into clk-meson Pull meson clk driver updates from Jerome Brunet: - clk-pll driver improvements and updates - add axg audio controller system clocks - drop mpll3 from the possible pcie clock parent of the axg - register meson8b clock controller early * tag 'meson-clk-4.20-1' of https://github.com/BayLibre/clk-meson: clk: meson: meson8b: use the regmap in the internal reset controller clk: meson: meson8b: register the clock controller early clk: meson-axg: pcie: drop the mpll3 clock parent clk: meson: axg: round audio system master clocks down clk: meson: clk-pll: drop hard-coded rates from pll tables clk: meson: clk-pll: remove od parameters clk: meson: clk-pll: drop CLK_GET_RATE_NOCACHE where unnecessary clk: meson: clk-pll: add enable bit commit 48ab742ce3b0312f2ee23ed825d3c8820eda7acf Author: Krzysztof Kozlowski Date: Wed Sep 26 21:02:48 2018 +0200 ARM: dts: exynos: Add pin configuration for SD write protect on Odroid XU Add SD card write-protect pin configuration to be sure that it will be properly pulled down to indicate write access. Signed-off-by: Krzysztof Kozlowski commit 6862fdf2201ab67cd962dbf0643d37db909f4860 Author: Bartlomiej Zolnierkiewicz Date: Fri Sep 28 15:32:46 2018 +0200 ARM: samsung: Limit SAMSUNG_PM_CHECK config option to non-Exynos platforms "S3C2410 PM Suspend Memory CRC" feature (controlled by SAMSUNG_PM_CHECK config option) is incompatible with highmem (uses phys_to_virt() instead of proper mapping) which is used by the majority of Exynos boards. The issue manifests itself in OOPS on affected boards, i.e. on Odroid-U3 I got the following one: Unable to handle kernel paging request at virtual address f0000000 pgd = 1c0f9bb4 [f0000000] *pgd=00000000 Internal error: Oops: 5 [#1] PREEMPT SMP ARM [] (crc32_le) from [] (s3c_pm_makecheck+0x34/0x54) [] (s3c_pm_makecheck) from [] (s3c_pm_run_res+0x74/0x8c) [] (s3c_pm_run_res) from [] (s3c_pm_run_res+0x44/0x8c) [] (s3c_pm_run_res) from [] (exynos_suspend_enter+0x64/0x148) [] (exynos_suspend_enter) from [] (suspend_devices_and_enter+0x9ec/0xe74) [] (suspend_devices_and_enter) from [] (pm_suspend+0x770/0xc04) [] (pm_suspend) from [] (state_store+0x6c/0xcc) [] (state_store) from [] (kobj_attr_store+0x14/0x20) [] (kobj_attr_store) from [] (sysfs_kf_write+0x4c/0x50) [] (sysfs_kf_write) from [] (kernfs_fop_write+0xfc/0x1e4) [] (kernfs_fop_write) from [] (__vfs_write+0x2c/0x140) [] (__vfs_write) from [] (vfs_write+0xa4/0x160) [] (vfs_write) from [] (ksys_write+0x40/0x8c) [] (ksys_write) from [] (ret_fast_syscall+0x0/0x28) Add PLAT_S3C24XX, ARCH_S3C64XX and ARCH_S5PV210 dependencies to SAMSUNG_PM_CHECK config option to hide it on Exynos platforms. Signed-off-by: Bartlomiej Zolnierkiewicz Signed-off-by: Krzysztof Kozlowski commit f5e80203dadc28176f7b5ad2ec00652dd524fb9a Author: Tony Lindgren Date: Mon Oct 1 09:33:28 2018 -0700 bus: ti-sysc: Just use SET_NOIRQ_SYSTEM_SLEEP_PM_OPS As Grygorii Strashko pointed out, the runtime PM use count of the children can be whatever at suspend and we should not use it. So let's just suspend ti-sysc at noirq level and get rid of some code. Let's also remove the PM_SLEEP ifdef and use __maybe_unused as the PM code already deals with the ifdefs. Suggested-by: Grygorii Strashko Signed-off-by: Tony Lindgren commit 6870b673509779195cab300aedc844b352d9cfbc Author: Nathan Chancellor Date: Tue Sep 18 22:38:29 2018 -0700 PCI: kirin: Fix section mismatch warning The PCI kirin driver compilation produces the following section mismatch warning: WARNING: vmlinux.o(.text+0x4758cc): Section mismatch in reference from the function kirin_pcie_probe() to the function .init.text:kirin_add_pcie_port() The function kirin_pcie_probe() references the function __init kirin_add_pcie_port(). This is often because kirin_pcie_probe lacks a __init annotation or the annotation of kirin_add_pcie_port is wrong. Remove '__init' from kirin_add_pcie_port() to fix it. Fixes: fc5165db245a ("PCI: kirin: Add HiSilicon Kirin SoC PCIe controller driver") Reported-by: Nick Desaulniers Signed-off-by: Nathan Chancellor [lorenzo.pieralisi@arm.com: updated commit log] Signed-off-by: Lorenzo Pieralisi commit aeb8a43fa2649e00202960a55cbbd184bfc296d6 Author: Biju Das Date: Fri Sep 28 14:01:49 2018 +0100 dt-bindings: spi: sh-msiof: Add r8a7744 support Document RZ/G1N (R8A7744) SoC bindings. Signed-off-by: Biju Das Reviewed-by: Chris Paterson Reviewed-by: Simon Horman Signed-off-by: Mark Brown commit 633da3f425d50e91e3f3742df9a9766fe4966086 Author: Kunihiko Hayashi Date: Mon Oct 1 17:10:45 2018 +0900 arm64: defconfig: Enable USB phys for UniPhier SoCs Enable the USB3 and USB2 phys implemented in UniPhier SoCs. These phys are necessary for dwc3 and ehci controllers driving the USB ports on arm64 UniPhier SoCs. Since the USB host drivers are already built-in, so only the phy driver are missing to allow booting with USB devices. Signed-off-by: Kunihiko Hayashi Signed-off-by: Arnd Bergmann commit 486aea9d8b335ad887d1bff65c2035954b0b04df Merge: 4f5688908f5a 54c2678cd198 Author: Arnd Bergmann Date: Mon Oct 1 18:03:11 2018 +0200 Merge tag 'qcom-defconfig-for-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux into next/defconfig Qualcomm ARM Based defconfig Updates for v4.20 * Enable MAILBOX * tag 'qcom-defconfig-for-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux: ARM: qcom_defconfig: Enable MAILBOX Signed-off-by: Arnd Bergmann commit 6cee4afdec51b04b56e0942fd008006bf1b17497 Author: Biju Das Date: Fri Sep 28 13:53:04 2018 +0100 dt-bindings: spi: rspi: Add r8a7744 to the compatible list Document RZ/G1N (r8a7744) SoC specific bindings. Signed-off-by: Biju Das Reviewed-by: Chris Paterson Reviewed-by: Simon Horman Signed-off-by: Mark Brown commit 4f5688908f5a554b0605f9b715f87256737416dc Merge: 25cee71a23f4 1bdf91fd2ae8 Author: Arnd Bergmann Date: Mon Oct 1 17:59:38 2018 +0200 Merge tag 'qcom-arm64-defconfig-for-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux into next/defconfig Qualcomm ARM64 Based defconfig Updates for v4.20 * Enable Qualcomm QRTR driver * tag 'qcom-arm64-defconfig-for-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux: arm64: defconfig: Enable Qualcomm QRTR Signed-off-by: Arnd Bergmann commit c219bc4e920518feb025749bdf9623aa57e94b64 Author: Marc Zyngier Date: Mon Oct 1 12:19:43 2018 +0100 arm64: Trap WFI executed in userspace It recently came to light that userspace can execute WFI, and that the arm64 kernel doesn't trap this event. This sounds rather benign, but the kernel should decide when it wants to wait for an interrupt, and not userspace. Let's trap WFI and immediately return after having skipped the instruction. This effectively makes WFI a rather expensive NOP. Signed-off-by: Marc Zyngier Signed-off-by: Catalin Marinas commit 08b0109eea36d71f87b863045d91bbcee98758bd Merge: 297fab130cdf 6f3df8c1192c Author: Kalle Valo Date: Mon Oct 1 18:49:48 2018 +0300 Merge tag 'iwlwifi-next-for-kalle-2018-09-28' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next Second set of iwlwifi patches for 4.20 * TKIP implementation in new devices; * Fix for the shared antenna setting in 22000 series; * Report that we set the RU offset in HE code; * Fix some register addresses in 22000 series; * Fix one FW feature TLV that had a conflict with another value; * A couple of fixes for SoftAP mode; * Work continues for new 22560 hardware; * Some fixes in the datapath; * Some debugging and other general fixes; * Some cleanups, small improvements and other general fixes; commit 297fab130cdfb3ec5bf5c53cd5f3b02a2a3d7abb Author: Colin Ian King Date: Thu Sep 27 17:11:19 2018 +0100 b43: fix spelling mistake "hw_registred" -> "hw_registered" Trivial fix to spelling mistake struct field name, rename it. Signed-off-by: Colin Ian King Signed-off-by: Kalle Valo commit 033a759921d1ae97437bcda44e7ac5a57c81e9c8 Author: Igor Mitsyanko Date: Mon Sep 24 15:15:14 2018 -0700 qtnfmac_pcie: check for correct CHIP ID at pcie probe Make sure that wifi device is of supported variant by checking it's CHIP ID before completing a probe sequence. Signed-off-by: Igor Mitsyanko Signed-off-by: Kalle Valo commit 86ca238cf1e99794be77d299639d6e2a1dfd67a6 Author: Igor Mitsyanko Date: Mon Sep 24 15:15:13 2018 -0700 qtnfmac: wait for FW load work to finish at PCIe remove Waiting for "completion" to be set in FW load thread can not be used in case PCIe remove is called before FW load work was scheduled. Just wait for work completion instead to avoid problems. Signed-off-by: Igor Mitsyanko Signed-off-by: Kalle Valo commit addc7540708f52959c99ed3b9758a09070c102dc Author: Igor Mitsyanko Date: Mon Sep 24 15:15:12 2018 -0700 qtnfmac_pcie: extract platform-independent PCIe code Extract platform-independent PCIe driver code into a separate file, and use it from platform-specific modules. Signed-off-by: Igor Mitsyanko Signed-off-by: Kalle Valo commit 5163309e9a4d0972e9cac843cd2fb71443324b55 Author: Igor Mitsyanko Date: Mon Sep 24 15:15:11 2018 -0700 qtnfmac: add missing header includes to bus.h A few include directives were missing in bus.h resulting in dependency of include order in other modules. Add missing includes. Signed-off-by: Igor Mitsyanko Signed-off-by: Kalle Valo commit 789763b683eb7770dec4c6d62ccf89a80fb0e9aa Author: Igor Mitsyanko Date: Mon Sep 24 15:15:10 2018 -0700 qtnfmac_pcie: rename platform-specific functions Rename several functions to indicate that they are platform specific. Signed-off-by: Igor Mitsyanko Signed-off-by: Kalle Valo commit c9ff6c9157c2e6d68aafd50078520519bf99ea94 Author: Igor Mitsyanko Date: Mon Sep 24 15:15:09 2018 -0700 qtnfmac_pcie: separate platform-independent PCIe structure Move platform-independent PCIe data structure to a separate header file so it can be reused by different devices. Signed-off-by: Igor Mitsyanko Signed-off-by: Kalle Valo commit 21077d09b4a67e3bcf88d1e6be634c7950db84fa Author: Igor Mitsyanko Date: Mon Sep 24 15:15:08 2018 -0700 qtnfmac_pcie: pearl: rename spinlock tx0_lock to tx_lock tx_lock name will later be reused when common pcie code is extracted to separate files. Signed-off-by: Igor Mitsyanko Signed-off-by: Kalle Valo commit d0b95bfa11786e14011c1159d93b82db931f9c7c Author: Igor Mitsyanko Date: Mon Sep 24 15:15:07 2018 -0700 qtnfmac_pcie: indicate pearl-specific structures by their names In preparation to extract common PCIe driver state, indicate PEARL-specific structures by their name and move them to pearl-specific source file. Signed-off-by: Igor Mitsyanko Signed-off-by: Kalle Valo commit 91dcecece019903cdddb719b909e648803222545 Author: Igor Mitsyanko Date: Mon Sep 24 15:15:06 2018 -0700 qtnfmac_pcie: rename private Pearl PCIe state structure In preparation to extract common pcie driver state into a separate structure, rename Pearl-specific state to qtnf_pcie_pearl_state and move it directly to pearl-specific PCIe source file. Signed-off-by: Igor Mitsyanko Signed-off-by: Kalle Valo commit 2ef0ecd7170071f142503c9e39f9f929e79947f0 Author: Igor Mitsyanko Date: Mon Sep 24 15:15:05 2018 -0700 qtnfmac_pcie: move Pearl pcie sources to pcie-specific directory In preparation to extract common qtnfmac PCIe driver sources into a separate file, move existing Pearl-specific pcie driver sources to pcie/ directory. Signed-off-by: Igor Mitsyanko Signed-off-by: Kalle Valo commit 4059afc6bd17dc11b15ee219d25e9901890732f7 Author: Igor Mitsyanko Date: Mon Sep 24 15:15:04 2018 -0700 qtnfmac_pcie: do not store FW name in driver state structure Firmware name is only needed at probe stage, no point in keeping it in driver state structure. Signed-off-by: Igor Mitsyanko Signed-off-by: Kalle Valo commit 0240564430c0697d8fde3743d70346a922466b36 Author: Stanislaw Gruszka Date: Wed Sep 26 12:24:57 2018 +0200 rt2800: flush and txstatus rework for rt2800mmio Implement custom rt2800mmio flush routine and change txstatus routine to read TX_STA_FIFO also in the tasklet. Signed-off-by: Stanislaw Gruszka Signed-off-by: Kalle Valo commit adf26a356f132e35093585521ea3e36cd185af83 Author: Stanislaw Gruszka Date: Wed Sep 26 12:24:56 2018 +0200 rt2x00: use different txstatus timeouts when flushing Use different tx status timeouts for normal operation and when flushing. This increase timeout to 2s for normal operation as when there are bad radio conditions and frames are reposted many times device can not provide the status for quite long. With new timeout we can still get valid status on such bad conditions. Signed-off-by: Stanislaw Gruszka Signed-off-by: Kalle Valo commit 5022efb50f625d11fdf18b1fee0f64ebb1863664 Author: Stanislaw Gruszka Date: Wed Sep 26 12:24:55 2018 +0200 rt2x00: do not check for txstatus timeout every time on tasklet Do not check for tx status timeout everytime we perform txstatus tasklet. Perform check once per half a second. Signed-off-by: Stanislaw Gruszka Signed-off-by: Kalle Valo commit 0b0d556e0ebb6c966bc993e21a22a156812d8fdf Author: Stanislaw Gruszka Date: Wed Sep 26 12:24:54 2018 +0200 rt2800mmio: use txdone/txstatus routines from lib Use usb txdone/txstatus routines (now in rt2800libc) for mmio devices. Note this also change how we handle INT_SOURCE_CSR_TX_FIFO_STATUS interrupt. Now it is disabled since IRQ routine till end of the txstatus tasklet (the same behaviour like others interrupts). Reason to do not disable this interrupt was not to miss any tx status from 16 entries FIFO register. Now, since we check for tx status timeout, we can allow to miss some tx statuses. However this will be improved in further patch where I also implement read status FIFO register in the tasklet. Signed-off-by: Stanislaw Gruszka Signed-off-by: Kalle Valo commit 5c656c71b1bf5611ce8262bab338104e04d10b8d Author: Stanislaw Gruszka Date: Wed Sep 26 12:24:53 2018 +0200 rt2800: move usb specific txdone/txstatus routines to rt2800lib In order to reuse usb txdone/txstatus routines for mmio, move them to common rt2800lib.c file. Signed-off-by: Stanislaw Gruszka Signed-off-by: Kalle Valo commit 31138a827d1b3d6e4855bddb5a1e44e7b32309c0 Author: Nathan Chancellor Date: Sat Sep 22 23:31:15 2018 -0700 rtlwifi: btcoex: Use proper enumerated types for Wi-Fi only interface Clang warns when one enumerated type is implicitly converted to another. drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c:1327:34: warning: implicit conversion from enumeration type 'enum btc_chip_interface' to different enumeration type 'enum wifionly_chip_interface' [-Wenum-conversion] wifionly_cfg->chip_interface = BTC_INTF_PCI; ~ ^~~~~~~~~~~~ drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c:1330:34: warning: implicit conversion from enumeration type 'enum btc_chip_interface' to different enumeration type 'enum wifionly_chip_interface' [-Wenum-conversion] wifionly_cfg->chip_interface = BTC_INTF_USB; ~ ^~~~~~~~~~~~ drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c:1333:34: warning: implicit conversion from enumeration type 'enum btc_chip_interface' to different enumeration type 'enum wifionly_chip_interface' [-Wenum-conversion] wifionly_cfg->chip_interface = BTC_INTF_UNKNOWN; ~ ^~~~~~~~~~~~~~~~ 3 warnings generated. Use the values from the correct enumerated type, wifionly_chip_interface. BTC_INTF_UNKNOWN = WIFIONLY_INTF_UNKNOWN = 0 BTC_INTF_PCI = WIFIONLY_INTF_PCI = 1 BTC_INTF_USB = WIFIONLY_INTF_USB = 2 Link: https://github.com/ClangBuiltLinux/linux/issues/135 Signed-off-by: Nathan Chancellor Acked-by: Ping-Ke Shih Signed-off-by: Kalle Valo commit 0891c7f4a2532de13df49d77d14cb2f5cf099183 Author: Nathan Chancellor Date: Fri Sep 21 12:32:36 2018 -0700 ath5k: Remove unused BUG_ON Clang warns that the address of a pointer will always evaluated as true in a boolean context: drivers/net/wireless/ath/ath5k/debug.c:1031:14: warning: address of array 'ah->sbands' will always evaluate to 'true' [-Wpointer-bool-conversion] BUG_ON(!ah->sbands); ~~~~~^~~~~~ ./include/asm-generic/bug.h:61:45: note: expanded from macro 'BUG_ON' #define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0) ^~~~~~~~~ ./include/linux/compiler.h:77:42: note: expanded from macro 'unlikely' # define unlikely(x) __builtin_expect(!!(x), 0) ^ 1 warning generated. Given that this condition is always false because of the logical not, just remove it. Link: https://github.com/ClangBuiltLinux/linux/issues/130 Signed-off-by: Nathan Chancellor Signed-off-by: Kalle Valo commit f613e4803dd6d1f41a86f6406d4c994fa3d387a0 Author: Nathan Chancellor Date: Fri Sep 21 02:48:29 2018 -0700 rsi: Remove unnecessary boolean condition Clang warns that the address of a pointer will always evaluated as true in a boolean context. drivers/net/wireless/rsi/rsi_91x_mac80211.c:927:50: warning: address of array 'key->key' will always evaluate to 'true' [-Wpointer-bool-conversion] if (vif->type == NL80211_IFTYPE_STATION && key->key && ~~ ~~~~~^~~ 1 warning generated. Link: https://github.com/ClangBuiltLinux/linux/issues/136 Signed-off-by: Nathan Chancellor Signed-off-by: Kalle Valo commit c15ace868dd16300ec67021903cc354fe0aa0762 Author: Nathan Chancellor Date: Thu Sep 20 13:45:49 2018 -0700 ipw2x00: Remove unnecessary parentheses Clang warns when multiple pairs of parentheses are used for a single conditional statement. drivers/net/wireless/intel/ipw2x00/ipw2200.c:5655:28: warning: equality comparison with extraneous parentheses [-Wparentheses-equality] if ((priv->ieee->iw_mode == IW_MODE_ADHOC)) { ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~ drivers/net/wireless/intel/ipw2x00/ipw2200.c:5655:28: note: remove extraneous parentheses around the comparison to silence this warning if ((priv->ieee->iw_mode == IW_MODE_ADHOC)) { ~ ^ ~ drivers/net/wireless/intel/ipw2x00/ipw2200.c:5655:28: note: use '=' to turn this equality comparison into an assignment if ((priv->ieee->iw_mode == IW_MODE_ADHOC)) { ^~ = 1 warning generated. Link: https://github.com/ClangBuiltLinux/linux/issues/134 Signed-off-by: Nathan Chancellor Signed-off-by: Kalle Valo commit ee91176120bd584aa10c564e7e9fdcaf397190a1 Author: Will Deacon Date: Mon Oct 1 15:24:48 2018 +0100 arm64: docs: Document SSBS HWCAP We advertise the MRS/MSR instructions for toggling SSBS at EL0 using an HWCAP, so document it along with the others. Signed-off-by: Will Deacon Signed-off-by: Catalin Marinas commit 4bfbe5eee309e8c86e1b1155e82136c8fbffd155 Author: Giacomo Travaglini Date: Mon Oct 1 15:24:47 2018 +0100 arm64: docs: Fix typos in ELF hwcaps Fix some typos in our hwcap documentation, where we refer to the wrong ID register for some of the capabilities. Acked-by: Mark Rutland Signed-off-by: Giacomo Travaglini [will: fix amusing binary constants] Signed-off-by: Will Deacon Signed-off-by: Catalin Marinas commit 6f20a97e0979cfc1878ebfd85a6ee69a962e546f Merge: 17b57b1883c1 44f6876a00e8 Author: Joerg Roedel Date: Mon Oct 1 17:28:13 2018 +0200 Merge branch 'for-joerg/arm-smmu/updates' of git://git.kernel.org/pub/scm/linux/kernel/git/will/linux into arm/smmu commit c0aac682fa6590cb660cb083dbc09f55e799d2d2 Merge: 451bb7c33197 17b57b1883c1 Author: Jens Axboe Date: Mon Oct 1 08:58:57 2018 -0600 Merge tag 'v4.19-rc6' into for-4.20/block Merge -rc6 in, for two reasons: 1) Resolve a trivial conflict in the blk-mq-tag.c documentation 2) A few important regression fixes went into upstream directly, so they aren't in the 4.20 branch. Signed-off-by: Jens Axboe * tag 'v4.19-rc6': (780 commits) Linux 4.19-rc6 MAINTAINERS: fix reference to moved drivers/{misc => auxdisplay}/panel.c cpufreq: qcom-kryo: Fix section annotations perf/core: Add sanity check to deal with pinned event failure xen/blkfront: correct purging of persistent grants Revert "xen/blkfront: When purging persistent grants, keep them in the buffer" selftests/powerpc: Fix Makefiles for headers_install change blk-mq: I/O and timer unplugs are inverted in blktrace dax: Fix deadlock in dax_lock_mapping_entry() x86/boot: Fix kexec booting failure in the SEV bit detection code bcache: add separate workqueue for journal_write to avoid deadlock drm/amd/display: Fix Edid emulation for linux drm/amd/display: Fix Vega10 lightup on S3 resume drm/amdgpu: Fix vce work queue was not cancelled when suspend Revert "drm/panel: Add device_link from panel device to DRM device" xen/blkfront: When purging persistent grants, keep them in the buffer clocksource/drivers/timer-atmel-pit: Properly handle error cases block: fix deadline elevator drain for zoned block devices ACPI / hotplug / PCI: Don't scan for non-hotplug bridges if slot is not bridge drm/syncobj: Don't leak fences when WAIT_FOR_SUBMIT is set ... Signed-off-by: Jens Axboe commit 9d7a224b463e1cf1178570b57b6497240fd79bc3 Author: Christoph Hellwig Date: Fri Sep 7 09:31:58 2018 +0200 dma-direct: always allow dma mask <= physiscal memory size This way an architecture with less than 4G of RAM can support dma_mask smaller than 32-bit without a ZONE_DMA. Apparently that is a common case on powerpc. Signed-off-by: Christoph Hellwig Reviewed-by: Robin Murphy commit b4ebe6063204da58e48600b810a97c29ae9e5d12 Author: Christoph Hellwig Date: Thu Sep 20 14:04:08 2018 +0200 dma-direct: implement complete bus_dma_mask handling Instead of rejecting devices with a too small bus_dma_mask we can handle by taking the bus dma_mask into account for allocations and bounce buffering decisions. Signed-off-by: Christoph Hellwig commit 7d21ee4c719f00896767ce19c4c01a56374c2ced Author: Christoph Hellwig Date: Thu Sep 6 20:30:54 2018 -0400 dma-direct: refine dma_direct_alloc zone selection We need to take the DMA offset and encryption bit into account when selecting a zone. User the opportunity to factor out the zone selection into a helper for reuse. Signed-off-by: Christoph Hellwig Reviewed-by: Robin Murphy commit a20bb058375147cb639c7aa17ef86ad68b32d847 Author: Christoph Hellwig Date: Thu Sep 20 13:26:13 2018 +0200 dma-direct: add an explicit dma_direct_get_required_mask This is somewhat modelled after the powerpc version, and differs from the legacy fallback in use fls64 instead of pointlessly splitting up the address into low and high dwords and in that it takes (__)phys_to_dma into account. Signed-off-by: Christoph Hellwig Acked-by: Benjamin Herrenschmidt Reviewed-by: Robin Murphy commit c6d4381220a0087ce19dbf6984d92c451bd6b364 Author: Christoph Hellwig Date: Thu Sep 6 19:27:24 2018 -0400 dma-mapping: make the get_required_mask method available unconditionally This save some duplication for ia64, and makes the interface more general. In the long run we want each dma_map_ops instance to fill this out, but this will take a little more prep work. Signed-off-by: Christoph Hellwig Acked-by: Benjamin Herrenschmidt commit cb86d0f878be6d699dfd26c63f8ff03dfff1f9ba Merge: 5bf7a60b8e70 371e4fcc9d96 Author: Daniel Borkmann Date: Mon Oct 1 16:18:34 2018 +0200 Merge branch 'bpf-per-cpu-cgroup-storage' Roman Gushchin says: ==================== This patchset implements per-cpu cgroup local storage and provides an example how per-cpu and shared cgroup local storage can be used for efficient accounting of network traffic. v4->v3: 1) incorporated Alexei's feedback v3->v2: 1) incorporated Song's feedback 2) rebased on top of current bpf-next v2->v1: 1) added a selftest implementing network counters 2) added a missing free() in cgroup local storage selftest ==================== Signed-off-by: Daniel Borkmann commit 371e4fcc9d96ab1c8d72d59ca4ee3537402d1584 Author: Roman Gushchin Date: Fri Sep 28 14:46:00 2018 +0000 selftests/bpf: cgroup local storage-based network counters This commit adds a bpf kselftest, which demonstrates how percpu and shared cgroup local storage can be used for efficient lookup-free network accounting. Cgroup local storage provides generic memory area with a very efficient lookup free access. To avoid expensive atomic operations for each packet, per-cpu cgroup local storage is used. Each packet is initially charged to a per-cpu counter, and only if the counter reaches certain value (32 in this case), the charge is moved into the global atomic counter. This allows to amortize atomic operations, keeping reasonable accuracy. The test also implements a naive network traffic throttling, mostly to demonstrate the possibility of bpf cgroup--based network bandwidth control. Expected output: ./test_netcnt test_netcnt:PASS Signed-off-by: Roman Gushchin Acked-by: Song Liu Cc: Daniel Borkmann Cc: Alexei Starovoitov Signed-off-by: Daniel Borkmann commit 5fcbd29b372402c96b182e0e80b3d95463431490 Author: Roman Gushchin Date: Fri Sep 28 14:45:58 2018 +0000 samples/bpf: extend test_cgrp2_attach2 test to use per-cpu cgroup storage This commit extends the test_cgrp2_attach2 test to cover per-cpu cgroup storage. Bpf program will use shared and per-cpu cgroup storages simultaneously, so a better coverage of corresponding core code will be achieved. Expected output: $ ./test_cgrp2_attach2 Attached DROP prog. This ping in cgroup /foo should fail... ping: sendmsg: Operation not permitted Attached DROP prog. This ping in cgroup /foo/bar should fail... ping: sendmsg: Operation not permitted Attached PASS prog. This ping in cgroup /foo/bar should pass... Detached PASS from /foo/bar while DROP is attached to /foo. This ping in cgroup /foo/bar should fail... ping: sendmsg: Operation not permitted Attached PASS from /foo/bar and detached DROP from /foo. This ping in cgroup /foo/bar should pass... ### override:PASS ### multi:PASS Signed-off-by: Roman Gushchin Acked-by: Song Liu Cc: Daniel Borkmann Cc: Alexei Starovoitov Signed-off-by: Daniel Borkmann commit 919646d2a3a90465cf8b30a7616c63005bef7570 Author: Roman Gushchin Date: Fri Sep 28 14:45:55 2018 +0000 selftests/bpf: extend the storage test to test per-cpu cgroup storage This test extends the cgroup storage test to use per-cpu flavor of the cgroup storage as well. The test initializes a per-cpu cgroup storage to some non-zero initial value (1000), and then simple bumps a per-cpu counter each time the shared counter is atomically incremented. Then it reads all per-cpu areas from the userspace side, and checks that the sum of values adds to the expected sum. Expected output: $ ./test_cgroup_storage test_cgroup_storage:PASS Signed-off-by: Roman Gushchin Acked-by: Song Liu Cc: Daniel Borkmann Cc: Alexei Starovoitov Signed-off-by: Daniel Borkmann commit a3c6054f81e2c436d6b53b8060df996fec0cbfdb Author: Roman Gushchin Date: Fri Sep 28 14:45:53 2018 +0000 selftests/bpf: add verifier per-cpu cgroup storage tests This commits adds verifier tests covering per-cpu cgroup storage functionality. There are 6 new tests, which are exactly the same as for shared cgroup storage, but do use per-cpu cgroup storage map. Expected output: $ ./test_verifier #0/u add+sub+mul OK #0/p add+sub+mul OK ... #286/p invalid cgroup storage access 6 OK #287/p valid per-cpu cgroup storage access OK #288/p invalid per-cpu cgroup storage access 1 OK #289/p invalid per-cpu cgroup storage access 2 OK #290/p invalid per-cpu cgroup storage access 3 OK #291/p invalid per-cpu cgroup storage access 4 OK #292/p invalid per-cpu cgroup storage access 5 OK #293/p invalid per-cpu cgroup storage access 6 OK #294/p multiple registers share map_lookup_elem result OK ... #662/p mov64 src == dst OK #663/p mov64 src != dst OK Summary: 914 PASSED, 0 SKIPPED, 0 FAILED Signed-off-by: Roman Gushchin Acked-by: Song Liu Cc: Daniel Borkmann Cc: Alexei Starovoitov Signed-off-by: Daniel Borkmann commit e54870924f4c51a8228be9ad427274f1032e0683 Author: Roman Gushchin Date: Fri Sep 28 14:45:51 2018 +0000 bpftool: add support for PERCPU_CGROUP_STORAGE maps This commit adds support for BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE map type. Signed-off-by: Roman Gushchin Acked-by: Jakub Kicinski Acked-by: Song Liu Cc: Daniel Borkmann Cc: Alexei Starovoitov Signed-off-by: Daniel Borkmann commit 25025e0aab2f91a93a1557b299a79814559b4dc2 Author: Roman Gushchin Date: Fri Sep 28 14:45:48 2018 +0000 bpf: sync include/uapi/linux/bpf.h to tools/include/uapi/linux/bpf.h The sync is required due to the appearance of a new map type: BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE, which implements per-cpu cgroup local storage. Signed-off-by: Roman Gushchin Acked-by: Song Liu Cc: Daniel Borkmann Cc: Alexei Starovoitov Signed-off-by: Daniel Borkmann commit c6fdcd6e0cc4dc316e3eb261025fb0abd69540b9 Author: Roman Gushchin Date: Fri Sep 28 14:45:46 2018 +0000 bpf: don't allow create maps of per-cpu cgroup local storages Explicitly forbid creating map of per-cpu cgroup local storages. This behavior matches the behavior of shared cgroup storages. Signed-off-by: Roman Gushchin Acked-by: Song Liu Cc: Daniel Borkmann Cc: Alexei Starovoitov Signed-off-by: Daniel Borkmann commit b741f1630346defcbc8cc60f1a2bdae8b3b0036f Author: Roman Gushchin Date: Fri Sep 28 14:45:43 2018 +0000 bpf: introduce per-cpu cgroup local storage This commit introduced per-cpu cgroup local storage. Per-cpu cgroup local storage is very similar to simple cgroup storage (let's call it shared), except all the data is per-cpu. The main goal of per-cpu variant is to implement super fast counters (e.g. packet counters), which don't require neither lookups, neither atomic operations. >From userspace's point of view, accessing a per-cpu cgroup storage is similar to other per-cpu map types (e.g. per-cpu hashmaps and arrays). Writing to a per-cpu cgroup storage is not atomic, but is performed by copying longs, so some minimal atomicity is here, exactly as with other per-cpu maps. Signed-off-by: Roman Gushchin Cc: Daniel Borkmann Cc: Alexei Starovoitov Acked-by: Song Liu Signed-off-by: Daniel Borkmann commit f294b37ec7b24a574884cd157497a3748081c0f0 Author: Roman Gushchin Date: Fri Sep 28 14:45:40 2018 +0000 bpf: rework cgroup storage pointer passing To simplify the following introduction of per-cpu cgroup storage, let's rework a bit a mechanism of passing a pointer to a cgroup storage into the bpf_get_local_storage(). Let's save a pointer to the corresponding bpf_cgroup_storage structure, instead of a pointer to the actual buffer. It will help us to handle per-cpu storage later, which has a different way of accessing to the actual data. Signed-off-by: Roman Gushchin Acked-by: Song Liu Cc: Daniel Borkmann Cc: Alexei Starovoitov Signed-off-by: Daniel Borkmann commit 8bad74f9840f87661f20ced3dc80c84ab4fd55a1 Author: Roman Gushchin Date: Fri Sep 28 14:45:36 2018 +0000 bpf: extend cgroup bpf core to allow multiple cgroup storage types In order to introduce per-cpu cgroup storage, let's generalize bpf cgroup core to support multiple cgroup storage types. Potentially, per-node cgroup storage can be added later. This commit is mostly a formal change that replaces cgroup_storage pointer with a array of cgroup_storage pointers. It doesn't actually introduce a new storage type, it will be done later. Each bpf program is now able to have one cgroup storage of each type. Signed-off-by: Roman Gushchin Acked-by: Song Liu Cc: Daniel Borkmann Cc: Alexei Starovoitov Signed-off-by: Daniel Borkmann commit ec95e84c39554737404047c36b3c76855a831a3e Author: YueHaibing Date: Tue Sep 11 12:32:19 2018 +0000 wil6210: remove set but not used variable 'start' Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/wireless/ath/wil6210/pm.c: In function 'wil_suspend_keep_radio_on': drivers/net/wireless/ath/wil6210/pm.c:193:16: warning: variable 'start' set but not used [-Wunused-but-set-variable] Signed-off-by: YueHaibing Reviewed-by: Maya Erez Signed-off-by: Kalle Valo commit b8f3d16351034a7d3c25accc58d64ded9e1a03f9 Author: YueHaibing Date: Mon Sep 10 11:11:28 2018 +0800 ath9k: debug: remove set but not used variable 'fops_dump_nfcal' 'fops_dump_nfcal' is not used since commit 4447d815fd0f ("ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries") Signed-off-by: YueHaibing Signed-off-by: Kalle Valo commit 3fa8d2186550e5c8ad209087dc856a5f35fd4d26 Author: Louie Lu Date: Thu Sep 6 11:53:26 2018 +0800 ath9k: add reset for airtime station debugfs Let user can reset station airtime status by debugfs, it will reset all airtime deficit to ATH_AIRTIME_QUANTUM and reset rx/tx airtime accumulate to 0. Signed-off-by: Louie Lu Signed-off-by: Kalle Valo commit 393b9b0f830efc21c26a4ef9a9ce4d517eb98463 Author: Govind Singh Date: Thu Sep 20 10:34:26 2018 +0530 ath10k: disable napi before resource cleanup to avoid "use after free" CE buffers are cleaned up prior to napi disable and this is causing NULL pointer dereference due to "use after free". Disable napi before resource cleanup to avoid "use after free". Signed-off-by: Govind Singh Signed-off-by: Kalle Valo commit 752ed2a229c62f9301b9ab91d04048402fab6ff8 Author: Govind Singh Date: Thu Sep 20 10:34:25 2018 +0530 ath10k: move napi_enable to hif_start for consistent pairing There is unbalanced napi_{enable,disable}() behavior as they are being called from hif_snoc_{power_up/stop). The fix is to call napi_enable() from ath10k_snoc_hif_start() so that it matches with napi_disable() being called from ath10k_snoc_hif_stop(). Signed-off-by: Govind Singh Signed-off-by: Kalle Valo commit 4600563f9319006782bdacef0dfff2f493202eb0 Author: Maharaja Kennadyrajan Date: Tue Sep 18 17:37:26 2018 +0530 ath10k: advertize beacon_int_min_gcd as 100 while bring up multi vaps With the latest firmware design, the beacon interval should be greater than 100 to bring the multiple vaps. Set beacon_int_min_gcd to 100, when the wmi service WMI_SERVICE_VDEV_DIFFERENT_BEACON_INTERVAL_SUPPORT is enabled in the firmware. If not, beacon_int_min_gcd will be set to the default value 1. Tested in QCA4019 with firmware ver 10.4-3.2.1.1-00015 Tested in QCA9888 with firmware ver 10.4-3.5.1-0005 Signed-off-by: Maharaja Kennadyrajan Signed-off-by: Kalle Valo commit d70c0d463f9dd67037426bad243f647efec527d3 Author: Maharaja Kennadyrajan Date: Tue Sep 18 12:04:27 2018 +0530 ath10k: add debugfs support to get power save state change of STA This patch helps to get the power save state change of each peer connected to the AP. With WMI_10_4_PEER_STA_PS_STATECHG_EVENTID event, ps state of each peer is reported to user space via debugfs. Use the below command to get the ps state of each sta: cat /sys/kernel/debug/ieee80211/phyX/netdev::wlanX/stations/ XX:XX:XX:XX:XX:XX/peer_ps_state If STA is in power save state, we get the peer_ps_state value as 1. if STA is not in power save state, we get the peer_ps_state value as 0. If ps_state event is disabled, we get the peer_ps_state value as 2. We can enable/disable the ps_state events using the debugfs flag "ps_state_enable" echo Y > /sys/kernel/debug/ieee80211/phyX/ath10k/ps_state_enable Y = 1 to enable and Y = 0 to disable Tested in QCA4019 with firmware ver 10.4-3.2.1.1-00011 Signed-off-by: Maharaja Kennadyrajan Signed-off-by: Kalle Valo commit 4be3b05e7a83c6820095005e794432ca1711fa7f Author: YueHaibing Date: Thu Sep 13 22:01:21 2018 +0800 ath10k: remove duplicated includes remove duplicated include from ath10k driver. Signed-off-by: YueHaibing Signed-off-by: Kalle Valo commit f279294e9ee22a8f306fdc8e4181cf555e6f0f70 Author: Sriram R Date: Mon Sep 10 11:09:40 2018 +0530 ath10k: add support for configuring management packet rate By default the firmware uses 1Mbps and 6Mbps rate for management packets in 2G and 5G bands respectively. But when the user selects different basic rates from the userspace, we need to send the management packets at the lowest basic rate selected by the user. This change makes use of WMI_VDEV_PARAM_MGMT_RATE param for configuring the management packets rate to the firmware. Chipsets Tested : QCA988X, QCA9887, QCA9984 FW Tested : 10.2.4-1.0-41, 10.4-3.6.104 Signed-off-by: Sriram R Signed-off-by: Kalle Valo commit 08fafd646d633e77e958337087bd07ee163b31ac Author: Erik Stromdahl Date: Thu Sep 13 16:45:06 2018 +0200 ath10k: remove num_peers in hw_params for most targets >From commit "ath10k: add per target config of max_num_peers", the num_peers value in struct ath10k_hw_params is used to override the value obtained from the WMI op version in the firmware file. Currently, only high latency devices (USB and SDIO) need to use this value, since the value obtained from the WMI op version is not applicable for these devices. Many devices in ath10k_hw_params_list have the wrong value set. An example of this is the QCA9880 hw2.0 chipset that had (before this patch) num_peers set to TARGET_TLV_NUM_PEERS although the firmware uses WMI version ATH10K_FW_WMI_OP_VERSION_10_2_4. Using the wrong value for the QCA9880 chip results in a fw crash: ath10k_pci 0000:01:00.0: firmware crashed! (guid ddf39880-3e64-4edf-b4e4-979d31724503) ath10k_pci 0000:01:00.0: qca988x hw2.0 target 0x4100016c chip_id 0x043202ff sub 0000:0000 ath10k_pci 0000:01:00.0: kconfig debug 1 debugfs 1 tracing 1 dfs 1 testmode 0 ath10k_pci 0000:01:00.0: firmware ver 10.2.4-1.0-00037 api 5 features no-p2p,raw-mode,mfp,allows-mesh-bcast crc32 a4a52adb ath10k_pci 0000:01:00.0: board_file api 1 bmi_id N/A crc32 bebc7c08 ath10k_pci 0000:01:00.0: htt-ver 0.0 wmi-op 5 htt-op 2 cal otp max-sta 128 raw 0 hwcrypto 1 ath10k_pci 0000:01:00.0: firmware register dump: ath10k_pci 0000:01:00.0: [00]: 0x4100016C 0x000015B3 0x009B54B7 0x00955B31 ath10k_pci 0000:01:00.0: [04]: 0x009B54B7 0x00060530 0x00000011 0x00400000 ath10k_pci 0000:01:00.0: [08]: 0x000001B8 0x00000007 0x00443138 0x00955A00 ath10k_pci 0000:01:00.0: [12]: 0x00000009 0x00000000 0x009B548E 0x009B54AB ath10k_pci 0000:01:00.0: [16]: 0x00958080 0x0094078E 0x00000000 0x00000000 ath10k_pci 0000:01:00.0: [20]: 0x409B54B7 0x0040AC64 0x00400000 0x00000087 ath10k_pci 0000:01:00.0: [24]: 0x809A3831 0x0040ACC4 0x000001B1 0xC09B54B7 ath10k_pci 0000:01:00.0: [28]: 0x809A2F08 0x0040AD04 0x00410410 0x00000001 ath10k_pci 0000:01:00.0: [32]: 0x80988856 0x0040AD24 0x00410410 0x00000001 ath10k_pci 0000:01:00.0: [36]: 0x8098AF64 0x0040AD44 0x00410410 0x00000001 ath10k_pci 0000:01:00.0: [40]: 0x809B5DEC 0x0040AD84 0x00410410 0x00410FF4 ath10k_pci 0000:01:00.0: [44]: 0x809B1F20 0x0040ADA4 0x00400000 0x00416C54 ath10k_pci 0000:01:00.0: [48]: 0x809C0295 0x0040ADE4 0x0040AE08 0x00411DC8 ath10k_pci 0000:01:00.0: [52]: 0x809486FA 0x0040AE04 0x00000001 0x00000000 ath10k_pci 0000:01:00.0: [56]: 0x80948E2C 0x0040AEA4 0x0041F290 0x004123D4 ath10k_pci 0000:01:00.0: Copy Engine register dump: ath10k_pci 0000:01:00.0: [00]: 0x00057400 10 10 3 3 ath10k_pci 0000:01:00.0: [01]: 0x00057800 3 3 8 9 ath10k_pci 0000:01:00.0: [02]: 0x00057c00 2 2 1 2 ath10k_pci 0000:01:00.0: [03]: 0x00058000 1 1 2 1 ath10k_pci 0000:01:00.0: [04]: 0x00058400 0 0 40 0 ath10k_pci 0000:01:00.0: [05]: 0x00058800 1 1 0 1 ath10k_pci 0000:01:00.0: [06]: 0x00058c00 0 0 0 0 ath10k_pci 0000:01:00.0: [07]: 0x00059000 0 0 0 0 Signed-off-by: Erik Stromdahl Signed-off-by: Kalle Valo commit 8e8374db3424c0ee3e399525ac737cc6a0814d19 Author: Erik Stromdahl Date: Thu Sep 13 16:45:05 2018 +0200 ath10k: add default value for num_peers in WMI TLV init The hw_params value will only be used if it was explicitly set in the global hw_params array. This makes it possible to have the num_peers member unset. Signed-off-by: Erik Stromdahl Signed-off-by: Kalle Valo commit 234e4307cf7f9b43842395295a224740e220d019 Author: Brian Norris Date: Fri Sep 7 10:21:57 2018 -0700 ath10k: utilize random MAC address if none is provided Since commit 9d5804662ce1 ("ath10k: retrieve MAC address from system firmware if provided"), we support pulling our MAC address from system firmware. Along with this, we should admit that it's possible for system firmware to be screwed up as well, omitting the MAC address there. Provide a fallback, such that we choose a randomly-generated MAC address, with the local assignment bit set. This is not a preferred mode of operation and really should only serve the purpose of keeping the system chugging along while someone figures out what's wrong with the system. Grepping through other wireless drivers shows very similar fallback logic though, so why not? git grep eth_random_addr drivers/net/wireless/ Signed-off-by: Brian Norris Signed-off-by: Kalle Valo commit 058a7eab9d9ee12f57282eb0b606668dada70d7a Author: Rakesh Pillai Date: Thu Sep 6 18:57:27 2018 +0530 ath10k: fix tx status flag setting for management frames The tx_status for management frames is being filled incorrectly in the flags of skb_cb. This incorrect flag setting causes the upper layers to consider that the particular frame was not transmitted properly, leading to improper behavior. Set the IEEE80211_TX_STAT_ACK flag in the info flags of skb_cb, to indicate the successful transmission of the management frame. Tested HW: WCN3990 Tested FW: WLAN.HL.2.0-01188-QCAHLSWMTPLZ-1 Fixes: dc405152bb64d4ae01c9ac669de25b2d1fb6fc2d Signed-off-by: Rakesh Pillai Signed-off-by: Kalle Valo commit 2ba0dacbae94482e80b00dbd368f0a4aeaabbdec Author: zhong jiang Date: Thu Aug 9 22:20:40 2018 +0800 arm64/kprobes: remove an extra semicolon in arch_prepare_kprobe There is an extra semicolon in arch_prepare_kprobe, remove it. Signed-off-by: zhong jiang Signed-off-by: Catalin Marinas commit 833fd34d743c728afe6d127ef7bee67e7d9199a8 Author: Ben Greear Date: Thu Sep 6 19:46:20 2018 +0300 ath10k: fix vdev-start timeout on error The vdev-start-response message should cause the completion to fire, even in the error case. Otherwise, the user still gets no useful information and everything is blocked until the timeout period. Add some warning text to print out the invalid status code to aid debugging, and propagate failure code. Signed-off-by: Ben Greear Signed-off-by: Kalle Valo commit ac0d6567955cf70dd43d56b677361c9d4c3d7710 Author: Masahiro Yamada Date: Mon Oct 1 19:24:03 2018 +0900 x86/build: Remove unused CONFIG_AS_CRC32 CONFIG_AS_CRC32 is not used anywhere. Its last user was removed by 0cb6c969ed9d ("net, lib: kill arch_fast_hash library bits") Signed-off-by: Masahiro Yamada Signed-off-by: Borislav Petkov Cc: Ingo Molnar Cc: Thomas Gleixner Cc: "H. Peter Anvin" Link: https://lkml.kernel.org/r/1538389443-28514-1-git-send-email-yamada.masahiro@socionext.com commit 4fdce78ab90173191fa9f472b47b9cbdacbc3edd Author: Souptick Joarder Date: Wed Aug 8 21:46:41 2018 +0530 drm/tilcdc: Convert drm_atomic_helper_suspend/resume() convert drm_atomic_helper_suspend/resume() to use drm_mode_config_helper_suspend/resume(). saved_state in tilcdc_drm_private will not be used anymore, so it can be removed. Signed-off-by: Ajit Negi Signed-off-by: Souptick Joarder Tested-by: Jyri Sarha Signed-off-by: Jyri Sarha commit bc1d7de8c550db2f8fd59458a07fefa863358b8d Author: Suzuki K Poulose Date: Wed Sep 26 17:32:51 2018 +0100 kvm: arm64: Add 52bit support for PAR to HPFAR conversoin Add support for handling 52bit addresses in PAR to HPFAR conversion. Instead of hardcoding the address limits, we now use PHYS_MASK_SHIFT. Cc: Marc Zyngier Cc: Christoffer Dall Reviewed-by: Eric Auger Signed-off-by: Suzuki K Poulose Signed-off-by: Marc Zyngier commit 8ad50c8985d805923f52a80698010a0a5123c07d Author: Kristina Martsenko Date: Wed Sep 26 17:32:50 2018 +0100 vgic: Add support for 52bit guest physical address Add support for handling 52bit guest physical address to the VGIC layer. So far we have limited the guest physical address to 48bits, by explicitly masking the upper bits. This patch removes the restriction. We do not have to check if the host supports 52bit as the gpa is always validated during an access. (e.g, kvm_{read/write}_guest, kvm_is_visible_gfn()). Also, the ITS table save-restore is also not affected with the enhancement. The DTE entries already store the bits[51:8] of the ITT_addr (with a 256byte alignment). Cc: Marc Zyngier Cc: Christoffer Dall Reviewed-by: Eric Auger Signed-off-by: Kristina Martsenko [ Macro clean ups, fix PROPBASER and PENDBASER accesses ] Signed-off-by: Suzuki K Poulose Signed-off-by: Marc Zyngier commit 13ac4bbcc457d3925b4031cc70e3031fd8b9c3b7 Author: Suzuki K Poulose Date: Wed Sep 26 17:32:49 2018 +0100 kvm: arm64: Switch to per VM IPA limit Now that we can manage the stage2 page table per VM, switch the configuration details to per VM instance. The VTCR is updated with the values specific to the VM based on the configuration. We store the IPA size and the number of stage2 page table levels for the guest already in VTCR. Decode it back from the vtcr field wherever we need it. Cc: Marc Zyngier Cc: Christoffer Dall Signed-off-by: Suzuki K Poulose Signed-off-by: Marc Zyngier commit 7e8130456e067f49693fdcc25b5ba242a9c5568b Author: Suzuki K Poulose Date: Wed Sep 26 17:32:48 2018 +0100 kvm: arm64: Configure VTCR_EL2.SL0 per VM VTCR_EL2 holds the following key stage2 translation table parameters: SL0 - Entry level in the page table lookup. T0SZ - Denotes the size of the memory addressed by the table. We have been using fixed values for the SL0 depending on the page size as we have a fixed IPA size. But since we are about to make it dynamic, we need to calculate the SL0 at runtime per VM. This patch adds a helper to compute the value of SL0 for a VM based on the IPA size. Cc: Marc Zyngier Cc: Christoffer Dall Reviewed-by: Eric Auger Signed-off-by: Suzuki K Poulose Signed-off-by: Marc Zyngier commit 595583306434caafac4a71102dca5a8d32d1a769 Author: Suzuki K Poulose Date: Wed Sep 26 17:32:47 2018 +0100 kvm: arm64: Dynamic configuration of VTTBR mask On arm64 VTTBR_EL2:BADDR holds the base address for the stage2 translation table. The Arm ARM mandates that the bits BADDR[x-1:0] should be 0, where 'x' is defined for a given IPA Size and the number of levels for a translation granule size. It is defined using some magical constants. This patch is a reverse engineered implementation to calculate the 'x' at runtime for a given ipa and number of page table levels. See patch for more details. Cc: Marc Zyngier Cc: Christoffer Dall Signed-off-by: Suzuki K Poulose Signed-off-by: Marc Zyngier commit 61fa5a867b6521b4c55865b88bf70c93078d0cf8 Author: Suzuki K Poulose Date: Wed Sep 26 17:32:46 2018 +0100 kvm: arm64: Make stage2 page table layout dynamic Switch to dynamic stage2 page table layout based on the given VM. So far we had a common stage2 table layout determined at compile time. Make decision based on the VM instance depending on the IPA limit for the VM. Adds helpers to compute the stage2 parameters based on the guest's IPA and uses them to make the decisions. The IPA limit is still fixed to 40bits and the build time check to ensure the stage2 doesn't exceed the host kernels page table levels is retained. Also make sure that we use the pud/pmd level helpers from the host only when they are not folded. Cc: Christoffer Dall Cc: Marc Zyngier Reviewed-by: Eric Auger Signed-off-by: Suzuki K Poulose Signed-off-by: Marc Zyngier commit 865b30cdd9b286820aef44393bafc4c0ccee53d0 Author: Suzuki K Poulose Date: Wed Sep 26 17:32:45 2018 +0100 kvm: arm64: Prepare for dynamic stage2 page table layout Our stage2 page table helpers are statically defined based on the fixed IPA of 40bits and the host page size. As we are about to add support for configurable IPA size for VMs, we need to make the page table checks for each VM. This patch prepares the stage2 helpers to make the transition to a VM dependent table layout easier. Instead of statically defining the table helpers based on the page table levels, we now check the page table levels in the helpers to do the right thing. In effect, it simply converts the macros to static inline functions. Cc: Eric Auger Cc: Marc Zyngier Cc: Christoffer Dall Signed-off-by: Suzuki K Poulose Signed-off-by: Marc Zyngier commit e55cac5bf2a9cc86b57a9533d6b9e5005bc19b5c Author: Suzuki K Poulose Date: Wed Sep 26 17:32:44 2018 +0100 kvm: arm/arm64: Prepare for VM specific stage2 translations Right now the stage2 page table for a VM is hard coded, assuming an IPA of 40bits. As we are about to add support for per VM IPA, prepare the stage2 page table helpers to accept the kvm instance to make the right decision for the VM. No functional changes. Adds stage2_pgd_size(kvm) to replace S2_PGD_SIZE. Also, moves some of the definitions in arm32 to align with the arm64. Also drop the _AC() specifier constants wherever possible. Cc: Christoffer Dall Acked-by: Marc Zyngier Reviewed-by: Eric Auger Signed-off-by: Suzuki K Poulose Signed-off-by: Marc Zyngier commit 7665f3a8491b0ed3c6f65c0bc3a5424ea8f87731 Author: Suzuki K Poulose Date: Wed Sep 26 17:32:43 2018 +0100 kvm: arm64: Configure VTCR_EL2 per VM Add support for setting the VTCR_EL2 per VM, rather than hard coding a value at boot time per CPU. This would allow us to tune the stage2 page table parameters per VM in the later changes. We compute the VTCR fields based on the system wide sanitised feature registers, except for the hardware management of Access Flags (VTCR_EL2.HA). It is fine to run a system with a mix of CPUs that may or may not update the page table Access Flags. Since the bit is RES0 on CPUs that don't support it, the bit should be ignored on them. Suggested-by: Marc Zyngier Acked-by: Christoffer Dall Signed-off-by: Suzuki K Poulose Signed-off-by: Marc Zyngier commit 5b6c6742b5350a6fb5c631fb99a6bc046a62739c Author: Suzuki K Poulose Date: Wed Sep 26 17:32:42 2018 +0100 kvm: arm/arm64: Allow arch specific configurations for VM Allow the arch backends to perform VM specific initialisation. This will be later used to handle IPA size configuration and per-VM VTCR configuration on arm64. Cc: Marc Zyngier Cc: Christoffer Dall Reviewed-by: Eric Auger Signed-off-by: Suzuki K Poulose Signed-off-by: Marc Zyngier commit b2df44ffba363bd90274340e0adfd8137f5cd878 Author: Suzuki K Poulose Date: Wed Sep 26 17:32:41 2018 +0100 kvm: arm64: Clean up VTCR_EL2 initialisation Use the new helper for converting the parange to the physical shift. Also, add the missing definitions for the VTCR_EL2 register fields and use them instead of hard coding numbers. Cc: Marc Zyngier Cc: Christoffer Dall Reviewed-by: Eric Auger Signed-off-by: Suzuki K Poulose Signed-off-by: Marc Zyngier commit ce00e3cb4fb496683708db6bfce470e5c7710ddc Author: Suzuki K Poulose Date: Wed Sep 26 17:32:40 2018 +0100 arm64: Add a helper for PARange to physical shift conversion On arm64, ID_AA64MMFR0_EL1.PARange encodes the maximum Physical Address range supported by the CPU. Add a helper to decode this to actual physical shift. If we hit an unallocated value, return the maximum range supported by the kernel. This will be used by KVM to set the VTCR_EL2.T0SZ, as it is about to move its place. Having this helper keeps the code movement cleaner. Cc: Marc Zyngier Cc: James Morse Cc: Christoffer Dall Acked-by: Catalin Marinas Reviewed-by: Eric Auger Signed-off-by: Suzuki K Poulose Signed-off-by: Marc Zyngier commit 52338088ef0569290b7eae0759c58a3de494e6c0 Author: Anshuman Khandual Date: Sat Sep 22 21:09:56 2018 +0530 arm64/numa: Unify common error path in numa_init() At present numa_free_distance() is being called before numa_distance is even initialized with numa_alloc_distance() which is really pointless. Instead lets call numa_free_distance() on the common error path inside numa_init() after numa_alloc_distance() has been successful. Fixes: 1a2db30034 ("arm64, numa: Add NUMA support for arm64 platforms") Acked-by: Punit Agrawal Signed-off-by: Anshuman Khandual Signed-off-by: Catalin Marinas commit 77cfe950901e5c13aca2df6437a05f39dd9a929b Author: Anshuman Khandual Date: Sat Sep 22 21:09:55 2018 +0530 arm64/numa: Report correct memblock range for the dummy node The dummy node ID is marked into all memory ranges on the system. So the dummy node really extends the entire memblock.memory. Hence report correct extent information for the dummy node using memblock range helper functions instead of the range [0LLU, PFN_PHYS(max_pfn) - 1)]. Fixes: 1a2db30034 ("arm64, numa: Add NUMA support for arm64 platforms") Acked-by: Punit Agrawal Signed-off-by: Anshuman Khandual Signed-off-by: Catalin Marinas commit 359048f91db4be5e8be9c2b95c788c79a6756797 Author: Anshuman Khandual Date: Sat Sep 22 21:09:54 2018 +0530 arm64/mm: Define esr_to_debug_fault_info() fault_info[] and debug_fault_info[] are static arrays defining memory abort exception handling functions looking into ESR fault status code encodings. As esr_to_fault_info() is already available providing fault_info[] array lookup, it really makes sense to have a corresponding debug_fault_info[] array lookup function as well. This just adds an equivalent helper function esr_to_debug_fault_info(). Acked-by: Mark Rutland Signed-off-by: Anshuman Khandual Signed-off-by: Catalin Marinas commit dbfe3828a6f36be904427ed7f196744cb02d3072 Author: Anshuman Khandual Date: Sat Sep 22 21:09:53 2018 +0530 arm64/mm: Reorganize arguments for is_el1_permission_fault() Most memory abort exception handling related functions have the arguments in the order (addr, esr, regs) except is_el1_permission_fault(). This changes the argument order in this function as (addr, esr, regs) like others. Acked-by: Mark Rutland Signed-off-by: Anshuman Khandual Signed-off-by: Catalin Marinas commit 00bbd5d9016d49fa8dddef020a06b94fedca9148 Author: Anshuman Khandual Date: Sat Sep 22 21:09:52 2018 +0530 arm64/mm: Use ESR_ELx_FSC macro while decoding fault exception Just replace hard code value of 63 (0x111111) with an existing macro ESR_ELx_FSC when parsing for the status code during fault exception. Acked-by: Mark Rutland Signed-off-by: Anshuman Khandual Signed-off-by: Catalin Marinas commit 95b861a4a6d94f64d5242605569218160ebacdbe Author: Marc Zyngier Date: Thu Sep 27 17:15:34 2018 +0100 arm64: arch_timer: Add workaround for ARM erratum 1188873 When running on Cortex-A76, a timer access from an AArch32 EL0 task may end up with a corrupted value or register. The workaround for this is to trap these accesses at EL1/EL2 and execute them there. This only affects versions r0p0, r1p0 and r2p0 of the CPU. Acked-by: Mark Rutland Signed-off-by: Marc Zyngier Signed-off-by: Catalin Marinas commit 32a3e635fb0ecc1b197d54f710e76c6481cf19f0 Author: Marc Zyngier Date: Thu Sep 27 17:15:33 2018 +0100 arm64: compat: Add CNTFRQ trap handler Just like CNTVCT, we need to handle userspace trapping into the kernel if we're decided that the timer wasn't fit for purpose... 64bit userspace is already dealt with, but we're missing the equivalent compat handling. Reviewed-by: Mark Rutland Signed-off-by: Marc Zyngier Signed-off-by: Catalin Marinas commit 50de013d22e4e112d7b0778a0e7d032f16c46778 Author: Marc Zyngier Date: Thu Sep 27 17:15:32 2018 +0100 arm64: compat: Add CNTVCT trap handler Since people seem to make a point in breaking the userspace visible counter, we have no choice but to trap the access. We already do this for 64bit userspace, but this is lacking for compat. Let's provide the required handler. Reviewed-by: Mark Rutland Signed-off-by: Marc Zyngier Signed-off-by: Catalin Marinas commit 2a8905e18c55d5576d7a53da495b4de0cfcbc459 Author: Marc Zyngier Date: Thu Sep 27 17:15:31 2018 +0100 arm64: compat: Add cp15_32 and cp15_64 handler arrays We're now ready to start handling CP15 access. Let's add (empty) arrays for both 32 and 64bit accessors, and the code that deals with them. Reviewed-by: Mark Rutland Signed-off-by: Marc Zyngier Signed-off-by: Catalin Marinas commit 1f1c014035a8084a768e7e902c6f5857995b1220 Author: Marc Zyngier Date: Thu Sep 27 17:15:30 2018 +0100 arm64: compat: Add condition code checks and IT advance Here's a /really nice/ part of the architecture: a CP15 access is allowed to trap even if it fails its condition check, and SW must handle it. This includes decoding the IT state if this happens in am IT block. As a consequence, SW must also deal with advancing the IT state machine. Reviewed-by: Mark Rutland Signed-off-by: Marc Zyngier Signed-off-by: Catalin Marinas commit 70c63cdfd6ee615714c5453cff370032587723c2 Author: Marc Zyngier Date: Thu Sep 27 17:15:29 2018 +0100 arm64: compat: Add separate CP15 trapping hook Instead of directly generating an UNDEF when trapping a CP15 access, let's add a new entry point to that effect (which only generates an UNDEF for now). Acked-by: Mark Rutland Signed-off-by: Marc Zyngier Signed-off-by: Catalin Marinas commit bd7ac140b82f2bedfc792d8ccf9b2a108c1324f3 Author: Marc Zyngier Date: Thu Sep 27 17:15:28 2018 +0100 arm64: Add decoding macros for CP15_32 and CP15_64 traps So far, we don't have anything to help decoding ESR_ELx when dealing with ESR_ELx_EC_CP15_{32,64}. As we're about to handle some of those, let's add some useful macros. Signed-off-by: Marc Zyngier Signed-off-by: Catalin Marinas commit 9f98ddd6686cc9469fb73b11ddd403271d65cbdf Author: Suzuki K Poulose Date: Wed Sep 26 17:32:39 2018 +0100 kvm: arm64: Add helper for loading the stage2 setting for a VM We load the stage2 context of a guest for different operations, including running the guest and tlb maintenance on behalf of the guest. As of now only the vttbr is private to the guest, but this is about to change with IPA per VM. Add a helper to load the stage2 configuration for a VM, which could do the right thing with the future changes. Cc: Christoffer Dall Cc: Marc Zyngier Reviewed-by: Eric Auger Signed-off-by: Suzuki K Poulose Signed-off-by: Marc Zyngier commit 7788a28062aca211979ecd2c334e06e2ef5281cc Author: Suzuki K Poulose Date: Wed Sep 26 17:32:38 2018 +0100 kvm: arm/arm64: Remove spurious WARN_ON On a 4-level page table pgd entry can be empty, unlike a 3-level page table. Remove the spurious WARN_ON() in stage_get_pud(). Acked-by: Christoffer Dall Acked-by: Marc Zyngier Reviewed-by: Eric Auger Signed-off-by: Suzuki K Poulose Signed-off-by: Marc Zyngier commit d2db7773ba864df6b4e19643dfc54838550d8049 Author: Suzuki K Poulose Date: Wed Sep 26 17:32:37 2018 +0100 kvm: arm/arm64: Fix stage2_flush_memslot for 4 level page table So far we have only supported 3 level page table with fixed IPA of 40bits, where PUD is folded. With 4 level page tables, we need to check if the PUD entry is valid or not. Fix stage2_flush_memslot() to do this check, before walking down the table. Acked-by: Christoffer Dall Acked-by: Marc Zyngier Reviewed-by: Eric Auger Signed-off-by: Suzuki K Poulose Signed-off-by: Marc Zyngier commit 44f6876a00e83df5fd28681502b19b0f51e4a3c6 Author: Robin Murphy Date: Thu Sep 20 17:10:27 2018 +0100 iommu/arm-smmu: Support non-strict mode All we need is to wire up .flush_iotlb_all properly and implement the domain attribute, and iommu-dma and io-pgtable will do the rest for us. The only real subtlety is documenting the barrier semantics we're introducing between io-pgtable and the drivers for non-strict flushes. Signed-off-by: Robin Murphy Signed-off-by: Will Deacon commit b2dfeba654cb08db327d0ed4547b66c2f8fce997 Author: Robin Murphy Date: Thu Sep 20 17:10:26 2018 +0100 iommu/io-pgtable-arm-v7s: Add support for non-strict mode As for LPAE, it's simply a case of skipping the leaf invalidation for a regular unmap, and ensuring that the one in split_blk_unmap() is paired with an explicit sync ASAP rather than relying on one which might only eventually happen way down the line. Signed-off-by: Robin Murphy Signed-off-by: Will Deacon commit 9662b99a19abccb0b7bfc91abb3fec1447c35bf0 Author: Zhen Lei Date: Thu Sep 20 17:10:25 2018 +0100 iommu/arm-smmu-v3: Add support for non-strict mode Now that io-pgtable knows how to dodge strict TLB maintenance, all that's left to do is bridge the gap between the IOMMU core requesting DOMAIN_ATTR_DMA_USE_FLUSH_QUEUE for default domains, and showing the appropriate IO_PGTABLE_QUIRK_NON_STRICT flag to alloc_io_pgtable_ops(). Signed-off-by: Zhen Lei [rm: convert to domain attribute, tweak commit message] Signed-off-by: Robin Murphy Signed-off-by: Will Deacon commit b6b65ca20bc93d14319f9b5cf98fd3c19a4244e3 Author: Zhen Lei Date: Thu Sep 20 17:10:24 2018 +0100 iommu/io-pgtable-arm: Add support for non-strict mode Non-strict mode is simply a case of skipping 'regular' leaf TLBIs, since the sync is already factored out into ops->iotlb_sync at the core API level. Non-leaf invalidations where we change the page table structure itself still have to be issued synchronously in order to maintain walk caches correctly. To save having to reason about it too much, make sure the invalidation in arm_lpae_split_blk_unmap() just performs its own unconditional sync to minimise the window in which we're technically violating the break- before-make requirement on a live mapping. This might work out redundant with an outer-level sync for strict unmaps, but we'll never be splitting blocks on a DMA fastpath anyway. Signed-off-by: Zhen Lei [rm: tweak comment, commit message, split_blk_unmap logic and barriers] Signed-off-by: Robin Murphy Signed-off-by: Will Deacon commit 68a6efe86f6a16e25556a2aff40efad41097b486 Author: Zhen Lei Date: Thu Sep 20 17:10:23 2018 +0100 iommu: Add "iommu.strict" command line option Add a generic command line option to enable lazy unmapping via IOVA flush queues, which will initally be suuported by iommu-dma. This echoes the semantics of "intel_iommu=strict" (albeit with the opposite default value), but in the driver-agnostic fashion of "iommu.passthrough". Signed-off-by: Zhen Lei [rm: move handling out of SMMUv3 driver, clean up documentation] Signed-off-by: Robin Murphy [will: dropped broken printk when parsing command-line option] Signed-off-by: Will Deacon commit 2da274cdf998a1c12afa6b5975db2df1df01edf1 Author: Zhen Lei Date: Thu Sep 20 17:10:22 2018 +0100 iommu/dma: Add support for non-strict mode With the flush queue infrastructure already abstracted into IOVA domains, hooking it up in iommu-dma is pretty simple. Since there is a degree of dependency on the IOMMU driver knowing what to do to play along, we key the whole thing off a domain attribute which will be set on default DMA ops domains to request non-strict invalidation. That way, drivers can indicate the appropriate support by acknowledging the attribute, and we can easily fall back to strict invalidation otherwise. The flush queue callback needs a handle on the iommu_domain which owns our cookie, so we have to add a pointer back to that, but neatly, that's also sufficient to indicate whether we're using a flush queue or not, and thus which way to release IOVAs. The only slight subtlety is switching __iommu_dma_unmap() from calling iommu_unmap() to explicit iommu_unmap_fast()/iommu_tlb_sync() so that we can elide the sync entirely in non-strict mode. Signed-off-by: Zhen Lei [rm: convert to domain attribute, tweak comments and commit message] Signed-off-by: Robin Murphy Signed-off-by: Will Deacon commit 7d321bd3542500caf125249f44dc37cb4e738013 Author: Will Deacon Date: Mon Oct 1 12:42:49 2018 +0100 iommu/arm-smmu: Ensure that page-table updates are visible before TLBI The IO-pgtable code relies on the driver TLB invalidation callbacks to ensure that all page-table updates are visible to the IOMMU page-table walker. In the case that the page-table walker is cache-coherent, we cannot rely on an implicit DSB from the DMA-mapping code, so we must ensure that we execute a DSB in our tlb_add_flush() callback prior to triggering the invalidation. Cc: Cc: Robin Murphy Fixes: 2df7a25ce4a7 ("iommu/arm-smmu: Clean up DMA API usage") Signed-off-by: Will Deacon commit 07fdef34d2be6811f00c6f9e4e2a1483cf86696c Author: Zhen Lei Date: Thu Sep 20 17:10:21 2018 +0100 iommu/arm-smmu-v3: Implement flush_iotlb_all hook .flush_iotlb_all is currently stubbed to arm_smmu_iotlb_sync() since the only time it would ever need to actually do anything is for callers doing their own explicit batching, e.g.: iommu_unmap_fast(domain, ...); iommu_unmap_fast(domain, ...); iommu_iotlb_flush_all(domain, ...); where since io-pgtable still issues the TLBI commands implicitly in the unmap instead of implementing .iotlb_range_add, the "flush" only needs to ensure completion of those already-in-flight invalidations. However, we're about to start using it in anger with flush queues, so let's get a proper implementation wired up. Signed-off-by: Zhen Lei Reviewed-by: Robin Murphy [rm: document why it wasn't a bug] Signed-off-by: Robin Murphy Signed-off-by: Will Deacon commit 901510ee32f7190902f6fe4affb463e5d86a804c Author: Zhen Lei Date: Sun Aug 19 15:51:11 2018 +0800 iommu/arm-smmu-v3: Avoid back-to-back CMD_SYNC operations Putting adjacent CMD_SYNCs into the command queue is nonsensical, but can happen when multiple CPUs are inserting commands. Rather than leave the poor old hardware to chew through these operations, we can instead drop the subsequent SYNCs and poll for completion of the first. This has been shown to improve IO performance under pressure, where the number of SYNC operations reduces by about a third: CMD_SYNCs reduced: 19542181 CMD_SYNCs total: 58098548 (include reduced) CMDs total: 116197099 (TLBI:SYNC about 1:1) Signed-off-by: Zhen Lei Signed-off-by: Will Deacon commit 0f02477d16980938a84aba8688a4e3a303306116 Author: Zhen Lei Date: Sun Aug 19 15:51:10 2018 +0800 iommu/arm-smmu-v3: Fix unexpected CMD_SYNC timeout The condition break condition of: (int)(VAL - sync_idx) >= 0 in the __arm_smmu_sync_poll_msi() polling loop requires that sync_idx must be increased monotonically according to the sequence of the CMDs in the cmdq. However, since the msidata is populated using atomic_inc_return_relaxed() before taking the command-queue spinlock, then the following scenario can occur: CPU0 CPU1 msidata=0 msidata=1 insert cmd1 insert cmd0 smmu execute cmd1 smmu execute cmd0 poll timeout, because msidata=1 is overridden by cmd0, that means VAL=0, sync_idx=1. This is not a functional problem, since the caller will eventually either timeout or exit due to another CMD_SYNC, however it's clearly not what the code is supposed to be doing. Fix it, by incrementing the sequence count with the command-queue lock held, allowing us to drop the atomic operations altogether. Signed-off-by: Zhen Lei [will: dropped the specialised cmd building routine for now] Signed-off-by: Will Deacon commit 85c7a0f1ef624ef58173ef52ea77780257bdfe04 Author: Robin Murphy Date: Thu Sep 6 17:59:50 2018 +0100 iommu/io-pgtable-arm: Fix race handling in split_blk_unmap() In removing the pagetable-wide lock, we gained the possibility of the vanishingly unlikely case where we have a race between two concurrent unmappers splitting the same block entry. The logic to handle this is fairly straightforward - whoever loses the race frees their partial next-level table and instead dereferences the winner's newly-installed entry in order to fall back to a regular unmap, which intentionally echoes the pre-existing case of recursively splitting a 1GB block down to 4KB pages by installing a full table of 2MB blocks first. Unfortunately, the chump who implemented that logic failed to update the condition check for that fallback, meaning that if said race occurs at the last level (where the loser's unmap_idx is valid) then the unmap won't actually happen. Fix that to properly account for both the race and recursive cases. Fixes: 2c3d273eabe8 ("iommu/io-pgtable-arm: Support lockless operation") Signed-off-by: Robin Murphy [will: re-jig control flow to avoid duplicate cmpxchg test] Signed-off-by: Will Deacon commit 657135f3108122556c3cf60a78c6f0e76aeb60e6 Author: John Garry Date: Fri Aug 17 23:42:22 2018 +0800 iommu/arm-smmu-v3: Fix a couple of minor comment typos Fix some comment typos spotted. Signed-off-by: John Garry Signed-off-by: Will Deacon commit c808c09b527cd60d9a0d53799935f75e2452174d Author: Uros Bizjak Date: Fri Sep 28 10:33:05 2018 +0200 x86/asm: Use CC_SET()/CC_OUT() in __cmpxchg_double() Replace open-coded use of the SETcc instruction with CC_SET()/CC_OUT() in __cmpxchg_double(). Signed-off-by: Uros Bizjak Signed-off-by: Borislav Petkov Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Link: https://lkml.kernel.org/r/CAFULd4YdvwwhXWHqqPsGk5+TLG71ozgSscTZNsqmrm+Jzg941w@mail.gmail.com commit 54a58185bfafb5af5045fb8388c45daa373f90f3 Author: Yanjiang Jin Date: Sat Sep 29 17:06:55 2018 +0800 pinctrl: core: make sure strcmp() doesn't get a null parameter Some drivers, for example, QCOM's qdf2xxx, set groups[gpio].name only when gpio is valid, and leave invalid gpio names as null. If we want to access the sys node "pinconf-groups", pinctrl_get_group_selector() -> get_group_name() may return a null pointer if group_selector is invalid, then the below Kernel panic would happen since strcmp() uses this null pointer to do comparison. Unable to handle kernel NULL pointer dereference at ss 00000000 el:Internal error: Oops: 9600000[ 143.080279] SMP CPU: 19 PID: 2493 Comm: read_all Tainted: G O .aarch64 #1 Hardware name: HXT Semiconductor HXT REP-2 System PC is at strcmp+0x18/0x154 LR is at pinctrl_get_group_selector+0x6c/0xe8 Process read_all (pid: 2493, stack limit = Call trace: Exception stack strcmp+0x18/0x154 pin_config_group_get+0x64/0xd8 pinconf_generic_dump_one+0xd8/0x1c0 pinconf_generic_dump_pins+0x94/0xc8 pinconf_groups_show+0xb4/0x104 seq_read+0x178/0x464 full_proxy_read+0x6c/0xac __vfs_read+0x58/0x178 vfs_read+0x94/0x164 SyS_read+0x60/0xc0 __sys_trace_return+0x0/0x4 --[ end trace]-- Kernel panic - not syncing: Fatal exception Signed-off-by: Yanjiang Jin Signed-off-by: Linus Walleij commit 5289976ad887deb07c76df7eecf553c264aeebed Author: Felix Fietkau Date: Mon Oct 1 13:24:00 2018 +0200 mt76: mt76x2: fix multi-interface beacon configuration If the first virtual interface is a station (or an AP with beacons temporarily disabled), the beacon of the second interface needs to occupy hardware beacon slot 0. For some reason the beacon index was incorrectly masked with the virtual interface beacon mask, which prevents the secondary interface from sending beacons unless the first one also does. Cc: stable@vger.kernel.org Signed-off-by: Felix Fietkau commit 850d434ea37bd2e15154501279abc5c18bfb72d0 Author: YueHaibing Date: Fri Sep 28 02:17:48 2018 +0000 gpio: omap: Remove set but not used variable 'dev' Fixes gcc '-Wunused-but-set-variable' warning: drivers/gpio/gpio-omap.c: In function 'gpio_omap_cpu_notifier': drivers/gpio/gpio-omap.c:1327:17: warning: variable 'dev' set but not used [-Wunused-but-set-variable] Signed-off-by: YueHaibing Acked-by: Tony Lindgren Signed-off-by: Linus Walleij commit c4791bc6e3a6b95bed0ee72cf9784ecbb87074ee Author: Grygorii Strashko Date: Thu Sep 27 18:38:44 2018 -0500 gpio: omap: drop omap_gpio_list omap_gpio_list is unused so drop it. Signed-off-by: Grygorii Strashko Acked-by: Tony Lindgren Signed-off-by: Linus Walleij commit 18887f31df122951b73be098e416fc871f426b0b Merge: 30aa69e7bd9f a97f340c0a07 Author: Linus Walleij Date: Mon Oct 1 13:21:58 2018 +0200 Merge tag 'sh-pfc-for-v4.20-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into devel pinctrl: sh-pfc: Updates for v4.20 (take two) - Add MSIOF pin groups on R-Car E3 and D3, - Add support for the new RZ/G1N (R8A7744) and RZ/G2E (R8A774C0) SoCs, - Add I2C4, DU0, QSPI0, SDHI2, and USB pin groups on RZ/G1C, - Convert to SPDX license identifiers, - Small cleanups. commit 30aa69e7bd9f7af3574120249eecb3726dcaf737 Merge: 63e037bc51b3 17b57b1883c1 Author: Linus Walleij Date: Mon Oct 1 13:20:45 2018 +0200 Merge tag 'v4.19-rc6' into devel This is the 4.19-rc6 release I needed to merge this in because of extensive conflicts in the MSM and Intel pin control drivers. I know how to resolve them, so let's do it like this. Signed-off-by: Linus Walleij commit 8dc196974429b28f1a2f2563d30d02b7561a46aa Author: Christophe Blaess Date: Fri Sep 28 15:38:43 2018 +0200 Accept partial 'gpio-line-names' property. Documentation/devicetree/bindings/gpio/gpio.txt says: "The names are assigned starting from line offset 0 from left to right from the passed array. An incomplete array (where the number of passed named are less than ngpios) will still be used up until the last provided valid line index". This patch makes it actually work this way. Signed-off-by: Christophe Blaess Signed-off-by: Patrick Boettcher Signed-off-by: Linus Walleij commit 9376b1e7b62523c84fde34908af01a85b8d0468a Author: Ard Biesheuvel Date: Thu Sep 27 15:07:37 2018 +0200 arm64: remove unused asm/compiler.h header file arm64 does not define CONFIG_HAVE_ARCH_COMPILER_H, nor does it keep anything useful in its copy of asm/compiler.h, so let's remove it before anybody starts using it. Acked-by: Will Deacon Signed-off-by: Ard Biesheuvel Signed-off-by: Catalin Marinas commit 24951465cbd279f60b1fdc2421b3694405bcff42 Author: Will Deacon Date: Wed Sep 5 15:34:43 2018 +0100 arm64: compat: Provide definition for COMPAT_SIGMINSTKSZ arch/arm/ defines a SIGMINSTKSZ of 2k, so we should use the same value for compat tasks. Cc: Arnd Bergmann Cc: Dominik Brodowski Cc: "Eric W. Biederman" Cc: Andrew Morton Cc: Al Viro Cc: Oleg Nesterov Reviewed-by: Dave Martin Reported-by: Steve McIntyre Tested-by: Steve McIntyre <93sam@debian.org> Signed-off-by: Will Deacon Signed-off-by: Catalin Marinas commit 22839869f21ab3850fbbac9b425ccc4c0023926f Author: Will Deacon Date: Wed Sep 5 15:34:42 2018 +0100 signal: Introduce COMPAT_SIGMINSTKSZ for use in compat_sys_sigaltstack The sigaltstack(2) system call fails with -ENOMEM if the new alternative signal stack is found to be smaller than SIGMINSTKSZ. On architectures such as arm64, where the native value for SIGMINSTKSZ is larger than the compat value, this can result in an unexpected error being reported to a compat task. See, for example: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=904385 This patch fixes the problem by extending do_sigaltstack to take the minimum signal stack size as an additional parameter, allowing the native and compat system call entry code to pass in their respective values. COMPAT_SIGMINSTKSZ is just defined as SIGMINSTKSZ if it has not been defined by the architecture. Cc: Arnd Bergmann Cc: Dominik Brodowski Cc: "Eric W. Biederman" Cc: Andrew Morton Cc: Al Viro Cc: Oleg Nesterov Reported-by: Steve McIntyre Tested-by: Steve McIntyre <93sam@debian.org> Signed-off-by: Will Deacon Signed-off-by: Catalin Marinas commit 49f45fa13da7f7f1005e88a9cfa746f25e471b0d Author: Felix Fietkau Date: Sat Sep 29 13:15:32 2018 +0200 mt76: check aggregation sequence number for frames sent via drv_tx ps-poll response frames can be sent via drv_tx. Store the frame sequence number for such frames, in case a BlockAckReq needs to be sent Signed-off-by: Felix Fietkau commit 36d910960fae3f9e74bedf3e0ef39ee26bdaa51f Author: Felix Fietkau Date: Sat Sep 29 13:13:09 2018 +0200 mt76: fix handling ps-poll frames Hardware station lookup for pspoll frames can fail, which makes the driver ignore ps-poll frames. Fix the resulting powersave issues by looking up the station for pspoll frames in software Signed-off-by: Felix Fietkau commit 66a9ccd6e3b71be80c66556e5a480edf6e248495 Author: Lorenzo Bianconi Date: Fri Sep 28 13:39:07 2018 +0200 mt76x0: usb: move mt76x0u_tx_prepare_skb in usb.c Move mt76x0u_tx_prepare_skb routine in usb module in order to remove leftover usb dependency from generic code Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 8d98c15343912299a2b3d9cc26765fbe51aa229f Author: Lorenzo Bianconi Date: Fri Sep 28 13:39:06 2018 +0200 mt76x0: eeprom: load eeprom data from mtd by default Read eeprom data from mtd memory by default and fall-back to efuse if it fails Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 188fd8c4ce4567cd23027387351da00bf2a7c1cd Author: Lorenzo Bianconi Date: Fri Sep 28 13:39:05 2018 +0200 mt76x0: pci: add mt76x0e_{start/stop} callbacks Introduce mt76x0e_start and mt76x0e_stop mac80211 callbacks to start/stop device mac opening/closing the netdevice Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit b11e19694dc9ffc35091e0c4485c4a622a8f2f4e Author: Lorenzo Bianconi Date: Fri Sep 28 13:39:04 2018 +0200 mt76x0: add ieee80211_ops ops pointer to mt76x0_alloc_device signature Add ieee80211_ops ops pointer to mt76x0_alloc_device routine signature in order to specify mac80211 callbacks and remove usb dependency from mt76x0 generic code. Move mt76x0_ops callbacks in usb module in order to remove leftover usb dependency in mt76x0 generic code. Introduce mt76x0e_ops mac80211 callbacks for pci code Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 6034b2b07acc62603a0a97ec86f5b11202cdab3a Author: Lorenzo Bianconi Date: Fri Sep 28 13:39:03 2018 +0200 mt76: move set_{tx,rx}_path routines in mt76x02-lib module Move mt76x02_phy_set_rxpath and mt76x02_phy_tx_dac routines in mt76x02_phy.c since they are shared between mt76x2 and mt76x0 drivers. Moreover move chainmask variable from mt76x2/mt76x0 to mt76_dev data structure Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 4468e92cf8d0a943878b0f47edfa8f5604ce2d2b Author: Lorenzo Bianconi Date: Fri Sep 28 13:39:02 2018 +0200 mt76x0: phy: set antenna parameter according to wireless band Move mt76x0_ant_select routine in __mt76x0_phy_set_channel in order to configure antenna parameters according to the current wireless channel Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 2b2cb40bcd7d1c205526032c1937d5384b7b09f5 Author: Lorenzo Bianconi Date: Fri Sep 28 13:39:01 2018 +0200 mt76x0: pci: add hw initialization at bootstrap Add mt76x0e_register_device routine in pci.c to initialize the device during hw probe. Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit faa605bdfaa1322ea8e85791abdb3382a8cb4e0c Author: Lorenzo Bianconi Date: Fri Sep 28 13:39:00 2018 +0200 mt76x0: usb: move initialization code in usb.c Move usb initialization code in mt76x0-usb module in order to remove usb dependency from generic init code (not completed yet). Moreover fix a memory leak in usb probe if mt76x02_wait_for_mac fails Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 9f04eb7bb26a9c66241337b0ec74c9d32ccdf2d5 Author: Lorenzo Bianconi Date: Fri Sep 28 13:38:59 2018 +0200 mt76: add mt76x02_mac_start routine Introduce mt76x02_mac_start since the mac start code is shared between mt76x0e and mt76x2 drivers. Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit a31821abe0af09a01a6e3c7f3edbf03e2632cdb1 Author: Lorenzo Bianconi Date: Fri Sep 28 13:38:58 2018 +0200 mt76x0: init rx filter in mt76x0_init_hardware Initialize rxfilter mask at bootstrap an not at mac start. This is a preliminary patch to share mt76x2_mac_start routine between mt76x2e and mt76x0e drivers Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 512bd4b1c3657cdced09859a1c341fe6b45d4bcb Author: Lorenzo Bianconi Date: Fri Sep 28 13:38:57 2018 +0200 mt76x0: init: remove MT_PBF_SYS_CTRL configuration in mt76x0_reset_csr_bbp Remove MT_PBF_SYS_CTRL configuration in mt76x0_reset_csr_bbp since it is already initialized in mt76x0_init_mac_registers routine Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 00aaded0e9a7ef40f5cf2d33c66d7e1f84556a04 Author: Lorenzo Bianconi Date: Fri Sep 28 13:38:56 2018 +0200 mt76x0: init: remove duplicated initialization Remove MT_HEADER_TRANS_CTRL_REG/MT_TSO_CTRL configuration since they are already initialized in mt76x0_init_mac_registers routine Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 3b11db26eafed506941bd72f5148c90d10bf4d0d Author: Lorenzo Bianconi Date: Fri Sep 28 13:38:55 2018 +0200 mt76x0: use mt76x02 utility routines in mt76x0 init code Use mt76x02_wait_for_wpdma and mt76x02_wait_for_txrx_idle utility routines in mt76x0_init_hardware and mt76x0_mac_start and remove duplicated code Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit f16f700d89f70d32309003e7822bebc159ea8db8 Author: Lorenzo Bianconi Date: Fri Sep 28 13:38:54 2018 +0200 mt76x0: usb: move mcu code in usb_mcu.c Move usb mcu code in a dedicated source file in order to remove usb dependency from generic source files and improve code maintainability Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 56babfd9a24224db1979ebfb75ca7c17dbf1ff72 Author: Lorenzo Bianconi Date: Fri Sep 28 13:38:53 2018 +0200 mt76x0: pci: move mcu code in pci_mcu.c Move pci mcu code in a dedicated source file in order to improve maintainability and facilitate new device support development Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 7ed222993669aa17867cbbde201d7921e05f1583 Author: Lorenzo Bianconi Date: Fri Sep 28 13:38:52 2018 +0200 mt76x0: update initvals to latest version of vendor driver Update mac/rf/dcoc initial values to latest version of vendor driver. Improve code readability Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 713224164b5dfb9b0c0dad8d2e07f11dd7d55f44 Author: Lorenzo Bianconi Date: Fri Sep 28 13:38:51 2018 +0200 mt76: move mt76x2_wait_for_bbp in mt76x02-lib module Move mt76x2_wait_for_bbp utility routine in mt76x02_util.h in order to be resued by mt76x0 driver. Morover rename it in mt76x02_wait_for_txrx_idle Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 13fd2d2a6d0f429a643b5899009bfc19054c428e Author: Lorenzo Bianconi Date: Fri Sep 28 13:38:50 2018 +0200 mt76: mmio: add implementation of wr_rp and rd_rp Introduce mmio implementation of mt76_mmio_rd_rp and mt76_mmio_wr_rp and remove mt76x2 duplicated code. mt76_mmio_{wr,rd}_rp allows to reuse mt76x0 init code adding mt76x0e support Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit a6daf796c04447e26d37209991d778c838f5cc9a Author: Lorenzo Bianconi Date: Fri Sep 28 13:38:49 2018 +0200 mt76: move mt76x02_beacon_offset in mt76x02_util.c Move mt76x02_beacon_offset utility routine in mt76x02-lib module since it is shared between mt76x0 and mt76x2 driver and remove duplicated code. Moreover move beacon_offset data structure in mt76x02-lib module since it is shared between mt76x0 and mt76x2 drivers Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit b2eabd4c32037f5ce75cdeb29ab073148d80681b Author: Lorenzo Bianconi Date: Fri Sep 28 13:38:48 2018 +0200 mt76: move queue initialization in mt76x02_mmio.c Move mt76x02_dma_init, mt76x02_init_rx_queue and mt76x02_init_tx_queue routines in mt76x02-lib module in order to be reused by mt76x0 driver Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 957068c23fe49ed564f62c64b86687a66dbdae05 Author: Lorenzo Bianconi Date: Fri Sep 28 13:38:47 2018 +0200 mt76: move mt76x02_set_irq_mask in mt76x02_mmio.c Move mt76x02_set_irq_mask, mt76x02_irq_enable and mt76x02_irq_disable in mt76x02-lib module in order to be reused by mt76x0 driver. Moreover move irq_lock and irqmask in mt76_mmio data structure Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 208856493e420c3daa9147d7cf39ea5ec774df2b Author: Lorenzo Bianconi Date: Fri Sep 28 13:38:46 2018 +0200 mt76: add mt76x02_dma_enable/mt76x02_dma_disable utility routines Introduce mt76x02_dma_enable and mt76x02_dma_disable utility routines in order to be reused in mt76x0 mac configuration and remove duplicated code Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 5f1fa4cdb7a466bb427e72728f6c3361e4b2d516 Author: Lorenzo Bianconi Date: Fri Sep 28 13:38:45 2018 +0200 mt76: move wait_for_wpdma in mt76x02_dma.h Move wait_for_wpdma utility routine in mt76x02_dma.h in order to be reused by mt76x0 driver. Moreover add the possibility to specify the timeout value in wait_for_wpdma signature Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 5b394355927e6b633a7cd0307f0c8056a5db182b Author: Lorenzo Bianconi Date: Fri Sep 28 13:38:44 2018 +0200 mt76x0: use mt76_poll in mt76x0_set_wlan_state Use mt76_poll utility routine in mt76x0_set_wlan_state to check if the PLL/XTAL is ready Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 62e04f8a31fcc375c978b7f83b4229a10c3e746d Author: Felix Fietkau Date: Wed Sep 26 21:37:38 2018 +0200 mt76x2: disable WLAN core before probe If the WLAN core is still active during initialization, it might cause the MCU or DMA to hang. This can happen during soft reboot, so disable the core + clock early to avoid this issue. Signed-off-by: Felix Fietkau commit d6500cf3700f169cee63135a01808f6e75df3064 Author: Stanislaw Gruszka Date: Tue Sep 25 08:49:48 2018 +0200 mt76x0: add quirk to disable 2.4GHz band for Archer T1U TP-LINK Archer T1U do not support 2.4GHz band despite EEPROM reports that. Add quirk to mask out 2.4GHz support. Reported-by: Sid Hayn Signed-off-by: Stanislaw Gruszka Signed-off-by: Felix Fietkau commit 606f8e343349680b8f3123ee66be8fdc8cc43550 Author: Hauke Mehrtens Date: Tue Sep 25 21:52:51 2018 +0200 mt76: use skb_pad() instead of __skb_pad() mt76 uses __skb_pad() with free_on_error set to true, this is the same as calling skb_pad(). This patch does not change any functionality, but it makes it easier to backport this driver in backports, because skb_pad() is also available in older kernel versions. Fixes: b40b15e1521f ("mt76: add usb support to mt76 layer") Signed-off-by: Hauke Mehrtens Signed-off-by: Felix Fietkau commit 481bb0432414f790066205fe77226b7d1877385d Author: Lorenzo Bianconi Date: Wed Sep 26 13:07:39 2018 +0200 mt76: usb: make rx page_frag_cache access atomic Add rx_page_lock spinlock in order to make rx page fragment access atomic. This patch fixes the following crash that occasionally occurs during module loading/unloading BUG: unable to handle kernel paging request at ffff9f8322e19000 PGD 27ba01067 P4D 27ba01067 PUD 27ddba063 PMD 263b35063 PTE 8000000262e19061 Oops: 0003 [#1] SMP PTI CPU: 2 PID: 1766 Comm: systemd-udevd Not tainted 4.19.0-rc5+ #6 Hardware name: ASUSTeK COMPUTER INC. ESC2000 G2/Z9PE-D8 WS, BIOS 0405 03/19/2012 RIP: 0010:__memcpy+0x12/0x20 RSP: 0018:ffffba13849b3ad8 EFLAGS: 00010246 RAX: ffff9f8322e17004 RBX: 00000000000038f0 RCX: 000000000000031f RDX: 0000000000000000 RSI: ffffba13844cf058 RDI: ffff9f8322e18ffc RBP: 0000000000010c6c R08: 0000000000000000 R09: 0000607ec0000000 R10: 0000000000000003 R11: 0000000000003e2e R12: ffff9f8324cd9540 R13: 0000000000000000 R14: ffffba13849b3b30 R15: ffff9f8322e17000 FS: 00007fadec85b880(0000) GS:ffff9f833fa80000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffff9f8322e19000 CR3: 0000000263428001 CR4: 00000000000606e0 Call Trace: mt76x02u_mcu_fw_send_data+0x16c/0x270 [mt76x02_usb] mt76x0u_probe+0x35a/0x598 [mt76x0u] usb_probe_interface+0x113/0x310 really_probe+0x1c8/0x400 driver_probe_device+0x5c/0x130 __driver_attach+0xec/0x110 bus_for_each_dev+0x50/0x90 bus_add_driver+0x1c0/0x280 driver_register+0x5b/0xe0 usb_register_driver+0x7c/0x140 do_one_initcall+0x44/0x19b do_init_module+0x5a/0x210 load_module+0x175c/0x1bc0 __do_sys_finit_module+0x97/0xc0 do_syscall_64+0x3f/0xf0 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x7fadeb6f1809 RSP: 002b:00007ffe548f9f38 EFLAGS: 00000246 ORIG_RAX: 0000000000000139 RAX: ffffffffffffffda RBX: 00007fadebdf0d89 RCX: 00007fadeb6f1809 RDX: 0000000000000000 RSI: 00007fadebdf0d89 RDI: 0000000000000006 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000006 R11: 0000000000000246 R12: 0000560b9ef58ab0 R13: 0000560b9ef29800 R14: 0000560b9ef59040 R15: 0000000000020000 Fixes: c12128ce44b0 ("mt76: use a per rx queue page fragment cache") Reported-by: Stanislaw Gruszka Tested-by: Stanislaw Gruszka Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 22509324c51404658a2a6fcd4af5ef263ae45801 Author: Davide Caratti Date: Thu Sep 20 14:30:56 2018 +0200 mt76: report firmware version using ethtool print fw_ver and build_ver members of struct mt76x02_fw_header, similarly to what appears in the output of 'dmesg' when the MCU firmware is loaded. Reported-by: Sid Hayn Signed-off-by: Davide Caratti Signed-off-by: Felix Fietkau commit db6bb5c6c19451faa935934e6b45416fd7dd777a Author: Felix Fietkau Date: Mon Sep 24 11:13:11 2018 +0200 mt76: include linux/module.h in files using MODULE_* Fix source files using MODULE_* macros without including linux/module.h Signed-off-by: Felix Fietkau commit 1f4db1fd5cd497e47416776a5395c50f98b52ef9 Author: Lorenzo Bianconi Date: Sat Sep 22 13:45:37 2018 +0200 mt76x0: phy: introduce mt76x0_phy_set_txpower routine Add mt76x0_phy_set_txpower routine in order to configure base and per rate tx power gain. Moreover take into account txpower_conf in order to limit the tx power gain according to the bound provided by mac80211 Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 6987c5b5dee6a6bb82d26a1aca2a67dd4cb2e44f Author: Lorenzo Bianconi Date: Sat Sep 22 13:45:36 2018 +0200 mt76x0: use shared debugfs implementation Use mt76 shared debugfs implementation and remove duplicated code in mt76x0 driver Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit f2a2e819d67284d201b49ee08ac8abf22e5f9e61 Author: Lorenzo Bianconi Date: Sat Sep 22 13:45:35 2018 +0200 mt76x0: remove eeprom dependency from mt76x0_get_power_info In order to unify eeprom parsing between mt76x0 and mt76x2 drivers, remove eeprom pointer dependency from mt76x0_get_power_info routine. Remove mt76x0_eeprom_params since it is now an empty structure Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit b37bbc8c82517498c52fa07a3963561a60cdfadc Author: Lorenzo Bianconi Date: Sat Sep 22 13:45:34 2018 +0200 mt76x0: remove eeprom dependency from mt76x0_set_tx_power_per_rate In order to unify eeprom parsing between mt76x0 and mt76x2 drivers, remove eeprom pointer dependency from mt76x0_set_tx_power_per_rate. Moreover use mt76_rate_power to store power vs rate calibration data. Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 0050507c77a0da0ecbc2d856aae58ba99de6568f Author: Lorenzo Bianconi Date: Sat Sep 22 13:45:33 2018 +0200 mt76x0: remove mt76x0_phy_set_tx_power and mt76x0_extra_power_over_mac Remove mt76x0_extra_power_over_mac and mt76x0_phy_set_tx_power routines since they are not actually used and tx power handling will be unified with mt76x2 driver Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 02a4251d44bdb1e8dda61919f3a4a85aaebfb771 Author: Lorenzo Bianconi Date: Sat Sep 22 13:45:32 2018 +0200 mt76: move mt76x02_rate_power_val in mt76x02-lib module Move mt76x02_rate_power_val and mt76x2_sign_extend_optional utility routines in mt76x02_eeprom.h in order to reuse them in mt76x0 eeprom parsing Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit c36a3cc5a57e3753bacca14cecd0a591fb49f40d Author: Lorenzo Bianconi Date: Sat Sep 22 13:45:31 2018 +0200 mt76: move rate_txpower handler in mt76 debugfs Move rate_txpower handler in mt76 debugfs in order to be reused in mt76x0 driver and remove duplicated code Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit b9f192b8be46ee345082d8f6e12cc54ccc2ec729 Author: Lorenzo Bianconi Date: Sat Sep 22 13:45:30 2018 +0200 mt76: add mt76x02_phy_set_txpower utility routine Add mt76x02_phy_set_txpower utility routine in mt76x02_phy.c in order to be reused in mt76x0 tx power management code. Moreover move following routines in mt76x02-lib module: - mt76x02_tx_power_mask - mt76x02_get_max_rate_power - mt76x02_limit_rate_power - mt76x02_add_rate_power_offset Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit b6862effdc6fae95bb4287c5aa9dbc6af20427f8 Author: Lorenzo Bianconi Date: Sat Sep 22 13:45:29 2018 +0200 mt76: move mt76_rate_power in mt76_dev Move mt76_rate_power data structure from mt76x2_dev to mt76_dev in order to share it with mt76x0 driver. Moreover move txpower_conf and txpower_cur in mt76_dev Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 2cf5ac311ab2202a228ff498cab381e30b3639b1 Author: Stanislaw Gruszka Date: Thu Sep 6 11:38:34 2018 +0200 mt76: fix return value of mt76x02_wait_for_mac We need to return bool value in mt76x02_wait_for_mac. Reported-by: Dan Carpenter Fixes: 2735a6dd7df3 ("mt76: unify wait_for_mac") Signed-off-by: Stanislaw Gruszka Signed-off-by: Felix Fietkau commit 09dbcd8bb4896294af0f9a4ec08a09890fddde0c Author: Lorenzo Bianconi Date: Tue Sep 18 14:12:05 2018 +0200 mt76: usb: remove WARN_ON in mt76u_get_rx_entry_len Remove not useful WARN_ON macros in mt76u_get_rx_entry_len routine since corrupted frames should just be silently discarded Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit deb9350c5efa9c360af9eef47940a9db870c899a Author: Lorenzo Bianconi Date: Thu Sep 20 11:12:04 2018 +0200 mt76: move mt76x2_tssi_enabled in mt76x02_eeprom.h Move mt76x2_tssi_enabled and mt76x02_temp_tx_alc_enabled in mt76x02_eeprom.h in order to be reused in mt76x0 driver Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 3d66939a0713e5534d3be7932364b90d68eebdf9 Author: Lorenzo Bianconi Date: Thu Sep 20 11:12:03 2018 +0200 mt76x0: unify parse hw capabilities Unify parse hw capabilities with mt76x2 driver using mt76x02_eeprom_parse_hw_cap utility routine available in mt76x02-lib module Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 63cf8d1208f976b54050a39fc2fda5b477105329 Author: Lorenzo Bianconi Date: Thu Sep 20 11:12:02 2018 +0200 mt76: move mt76x02_eeprom_parse_hw_cap in mt76x02-lib module Move mt76x02_eeprom_parse_hw_cap utility routine in mt76x02-lib module in order to be reused in mt76x0 driver Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 77d0f465644973406f27e861e66c6e51ed0e7df1 Author: Lorenzo Bianconi Date: Thu Sep 20 11:12:01 2018 +0200 mt76x0: unify freq offset parsing Unify frequency offset parsing with mt76x2 driver using eeprom utility routines available in mt76x02-lib module Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 2c0db839b402f3a26ecc299b54970d2fb43c5d22 Author: Lorenzo Bianconi Date: Thu Sep 20 11:12:00 2018 +0200 mt76x0: unify temperature offset parsing Unify temperature offset parsing with mt76x2 driver using eeprom utility routines available in mt76x02-lib module Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 564d7f0accf6a215614e8ce7dd8d9f0a6be92f56 Author: Lorenzo Bianconi Date: Thu Sep 20 11:11:59 2018 +0200 mt76x0: unify rssi_offset parsing Unify rssi_offset parsing with mt76x2 driver using eeprom utility routines available in mt76x02-lib module Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 2daa67588f34542f31caeb3c7f3b21a4e2d75f66 Author: Lorenzo Bianconi Date: Thu Sep 20 11:11:58 2018 +0200 mt76x0: unify lna_gain parsing Unify lna gain parsing with mt76x2 driver using eeprom utility routines available in mt76x02-lib module Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit e59ad99b04fdac25e22755306a97962b6bdc2a54 Author: Lorenzo Bianconi Date: Thu Sep 20 11:11:57 2018 +0200 mt76: add mt76x02_get_rx_gain and mt76x02_get_lna_gain utility routines Add mt76x02_get_rx_gain and mt76x02_get_lna_gain utility routines for rx gain parsing. mt76x02_get_rx_gain and mt76x02_get_lna_gain will be reused for eeprom parsing in mt76x0 driver Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 1137847adacb99589ac85167a3ff801b8143cdd0 Author: Lorenzo Bianconi Date: Thu Sep 20 11:11:56 2018 +0200 mt76x0: remove mt76x0_set_country_reg routine Remove mt76x0_set_country_reg routine for the moment since it is partial and it is not actually used Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 443569a534b2dcbd9b8248fc24aedab4ec1531da Author: Lorenzo Bianconi Date: Thu Sep 20 11:11:55 2018 +0200 mt76: move mt76x2_ext_pa_enabled routine in mt76x02_eeprom.c Move mt76x2_ext_pa_enabled utility routine in mt76x02_eeprom.c and remove duplicated code. This is a preliminary patch to unify eeprom code between mt76x2 and mt76x0 driver Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit bd724b8f62792e0bf5e88d66fa9bdb6d02f9ed7e Author: Lorenzo Bianconi Date: Thu Sep 20 11:11:54 2018 +0200 mt76: move mt76x2_get_efuse_data in mt76x02-lib module Move mt76x2_efuse_read and mt76x2_get_efuse_data in mt76x02_eeprom.c in order to be reused in mt76x0 driver for eeprom parsing Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 89a8607c4975e3923256aca7857c3d0857eb9e7e Author: Lorenzo Bianconi Date: Thu Sep 20 11:11:53 2018 +0200 mt76: move mt76x02_mac_setaddr in mt76x02-lib module Move mt76x02_mac_setaddr utility routine in mt76x02-lib module and remove duplicated code. This is a preliminary patch to unify eeprom code between mt76x2 and mt76x0 driver Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit b27823a77466fd20d8c5b61e20ae9fd7ea4e567d Author: Lorenzo Bianconi Date: Thu Sep 20 11:11:52 2018 +0200 mt76: move mt76x2_eeprom_get in mt76x02_eeprom.h Move mt76x2_eeprom_get utility routine in mt76x02_eeprom.h since it will be used to parse mt76x0 eeprom in order to unify eeprom support between mt76x2 and mt76x0 drivers Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 86c71d3deefae88b8f151f97102af661d9792636 Author: Lorenzo Bianconi Date: Thu Sep 20 11:11:51 2018 +0200 mt76: move eeprom utility routines in mt76x02_eeprom.h Move shared eeprom utility routines in mt76x02_eeprom.h and remove duplicated code Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit eef40d209ad005c56e481a6015347fc810803982 Author: Lorenzo Bianconi Date: Thu Sep 20 11:11:50 2018 +0200 mt76: move common eeprom definitions in mt76x02-lib module Move mt76x2 and mt76x0 common definitions in mt76x02_eeprom.h and remove duplicated code Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 7c4b446c59b73d594f7bdb26f1533ae3bcb9b0a5 Author: Felix Fietkau Date: Thu Sep 20 11:11:49 2018 +0200 mt76: add stbc entries to mt76_rate_power Add stbc tx power eeprom parsing support for mt76x2 driver. When writing power entries, make a distinction between rates that are read from the same EEPROM value, but have separate register entries. No effect on runtime behavior, but preparation for unification with mt76x0 and for placing restrictions on individual rate power limits Signed-off-by: Felix Fietkau Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 8f410a8bfde5591af78dae2e955bcc402bffdcc4 Author: Lorenzo Bianconi Date: Thu Sep 20 11:11:48 2018 +0200 mt76: move seq_put_array in mt76-core module Move seq_put_array utility routine in mt76-core module in order to be reused in mt76x0 driver Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit db2803bbda7c6e3559aac74ad33c79fef93f5535 Author: Lorenzo Bianconi Date: Wed Sep 19 13:53:58 2018 +0200 mt76x0: pci: add fw uploading routine Add pci load firmware routine. Move some shared mcu definitions in mt76x02_mcu.h Signed-off-by: Lorenzo Bianconi Signed-off-by: Stanislaw Gruszka Signed-off-by: Felix Fietkau commit 9b1140bdc6ba1a899415e9e0a2b125439da00c1f Author: Lorenzo Bianconi Date: Wed Sep 19 13:42:44 2018 +0200 mt76x0: pci: add mt7650 PCI ID Add mt7650 PCI id found on ASUS rt-51ac to pci_device_id table Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 60b6645ef1a9239a02c70adeae136298395d145a Author: Lorenzo Bianconi Date: Fri Sep 21 15:57:50 2018 +0200 mt76x2: fix tx power configuration for VHT mcs 9 Fix tx power configuration for VHT 1SS/STBC mcs 9 since in MT_TX_PWR_CFG_{8,9} mcs 8,9 bits are GENMASK(21,16) and GENMASK(29,24) while GENMASK(15,6) are marked as reserved Fixes: 7bc04215a66b ("mt76: add driver code for MT76x2e") Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 03630b3b76ccc2999f77e11c4ba60b0a549d023a Author: Rob Herring Date: Mon Aug 27 20:52:39 2018 -0500 perf: 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: Mark Rutland Cc: linux-arm-kernel@lists.infradead.org Acked-by: Will Deacon Signed-off-by: Rob Herring Signed-off-by: Catalin Marinas commit fb64207bf56030874fc49c3168778c058f0a8ffa Merge: 17b57b1883c1 5ed4cecd75e9 Author: Rafael J. Wysocki Date: Mon Oct 1 12:32:32 2018 +0200 Merge branch 'opp/linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm into pm-opp Pull operating performance points (OPP) material for 4.20 from Viresh Kumar. "This contains patches that fix several bugs in the OPP core and makes it more stable." * 'opp/linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm: OPP: Pass OPP table to _of_add_opp_table_v{1|2}() OPP: Prevent creating multiple OPP tables for devices sharing OPP nodes OPP: Use a single mechanism to free the OPP table OPP: Don't remove dynamic OPPs from _dev_pm_opp_remove_table() cpufreq: mvebu: Remove OPPs using dev_pm_opp_remove() OPP: Create separate kref for static OPPs list OPP: Don't take OPP table's kref for static OPPs OPP: Parse OPP table's DT properties from _of_init_opp_table() OPP: Pass index to _of_init_opp_table() OPP: Protect dev_list with opp_table lock OPP: Don't try to remove all OPP tables on failure OPP: Free OPP table properly on performance state irregularities commit 467480738d0b33335032652b29776d82200db41a Author: Grygorii Strashko Date: Fri Sep 28 16:39:50 2018 -0500 gpio: omap: get rid of the conditional PM runtime calls OMAP GPIO driver is checking !BANK_USED() used condition before calling PM runtime API, because of PM runtime calls in omap2_gpio_prepare/resume_for_idle(). It's not required any more since "omap gpio add level idle, cpu_pm and drop runtime_irq_safe" series [1] from Tony Lindgren was accepted and PM runtime management was enabled in IRQ chip core by commit be45beb2df69 ("genirq: Add runtime power management support for IRQ chips") . As result safely drop !BANK_USED() checks from omap_gpio_request/free(), omap_gpio_irq_bus_lock/unlock() and enable PM runtime management for OMAP GPIO IRQ chip. [1] https://www.spinics.net/lists/arm-kernel/msg677583.html Tested-by: Tony Lindgren Signed-off-by: Grygorii Strashko Signed-off-by: Linus Walleij commit 8898240aaace9eb315b3e9c43bc132da6e62a953 Author: YueHaibing Date: Fri Sep 28 02:18:09 2018 +0000 gpio: htc-egpio: Remove set but not used variable 'bit' Fixes gcc '-Wunused-but-set-variable' warning: drivers/gpio/gpio-htc-egpio.c: In function 'egpio_set': drivers/gpio/gpio-htc-egpio.c:192:20: warning: variable 'bit' set but not used [-Wunused-but-set-variable] Signed-off-by: YueHaibing Signed-off-by: Linus Walleij commit 94967b55ebf3b603f2fe750ecedd896042585a1c Author: Marc Zyngier Date: Mon Oct 1 11:05:22 2018 +0100 genirq/debugfs: Reinstate full OF path for domain name On a DT based system, we use the of_node full name to name the corresponding irq domain. We expect that name to be unique, so so that domains with the same base name won't clash (this happens on multi-node topologies, for example). Since a7e4cfb0a7ca ("of/fdt: only store the device node basename in full_name"), of_node_full_name() lies and only returns the basename. This breaks the above requirement, and we end-up with only a subset of the domains in /sys/kernel/debug/irq/domains. Let's reinstate the feature by using the fancy new %pOF format specifier, which happens to do the right thing. Fixes: a7e4cfb0a7ca ("of/fdt: only store the device node basename in full_name") Signed-off-by: Marc Zyngier Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/20181001100522.180054-3-marc.zyngier@arm.com commit 513145ea66af95f1a5c744d7b5a4f4a97625e669 Author: Marc Zyngier Date: Mon Oct 1 11:05:21 2018 +0100 genirq/debugfs: Reset domain debugfs_file on removal of the debugfs file When removing a debugfs file for a given irq domain, we fail to clear the corresponding field, meaning that the corresponding domain won't be created again if we need to do so. It turns out that this is exactly what irq_domain_update_bus_token does (delete old file, update domain name, recreate file). This doesn't have any impact other than making debug more difficult, but we do value ease of debugging... So clear the debugfs_file field. Signed-off-by: Marc Zyngier Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/20181001100522.180054-2-marc.zyngier@arm.com commit 3c940660cb1ea6c952bb863040cdacafd5077448 Author: Geert Uytterhoeven Date: Thu Sep 27 13:38:10 2018 +0200 gpio: Restore indentation of continued lines Fixes: 3027743f83f867d8 ("gpio: Remove VLA from gpiolib") Signed-off-by: Geert Uytterhoeven Signed-off-by: Linus Walleij commit cf9af0d5786c008971148f4e06567a98f6a7f9d0 Author: Geert Uytterhoeven Date: Thu Sep 27 13:38:09 2018 +0200 gpio: Propagate errors from gpiod_set_array_value_complex() Internal helper function gpiod_set_array_value_complex() was changed to return an error value, but not all gpiolib callers were updated to propagate the new error up. Fixes: 3027743f83f867d8 ("gpio: Remove VLA from gpiolib") Signed-off-by: Geert Uytterhoeven Signed-off-by: Linus Walleij commit c2937668d14456f2a361fbf5cc72764965171982 Author: Geert Uytterhoeven Date: Thu Sep 27 13:38:08 2018 +0200 Documentation: gpio: Fix return type of gpiod_set_raw_array_value*() The return type of gpiod_set_raw_array_value() and gpiod_set_raw_array_value_cansleep() was changed from void to int, but the doc update was forgotten. Fixes: 3027743f83f867d8 ("gpio: Remove VLA from gpiolib") Signed-off-by: Geert Uytterhoeven Signed-off-by: Linus Walleij commit 95691e3eddc41da2d1cd3cca51fecdfb46bd85bc Author: Maciej S. Szmigiero Date: Sun Sep 9 01:21:06 2018 +0200 pcmcia: Implement CLKRUN protocol disabling for Ricoh bridges Currently, "disable_clkrun" yenta_socket module parameter is only implemented for TI CardBus bridges. Add also an implementation for Ricoh bridges that have the necessary setting documented in publicly available datasheets. Tested on a RL5C476II with a Sunrich C-160 CardBus NIC that doesn't work correctly unless the CLKRUN protocol is disabled. Let's also make it clear in its description that the "disable_clkrun" module parameter only works on these two previously mentioned brands of CardBus bridges. Signed-off-by: Maciej S. Szmigiero Cc: stable@vger.kernel.org Signed-off-by: Dominik Brodowski commit 1b22dcf6b33ace39c11a2832260d499d020c3d55 Author: Jia-Ju Bai Date: Mon Jul 30 21:42:56 2018 +0800 pcmcia: pcmcia_resource: Replace mdelay() with msleep() pcmcia_fixup_iowidth() and pcmcia_enable_device() are never called in atomic context. They call mdelay() to busily wait, which is not necessary. mdelay() can be replaced with msleep(). This is found by a static analysis tool named DCNS written by myself. Signed-off-by: Jia-Ju Bai Signed-off-by: Dominik Brodowski commit 5f17af054d6a782e7b582d300274d3143fddba5e Author: Zhouyang Jia Date: Fri Jun 15 07:41:38 2018 +0800 pcmcia: add error handling for pcmcia_enable_device in qlogic_stub When pcmcia_enable_device fails, the lack of error-handling code may cause unexpected results. This patch adds error-handling code after calling pcmcia_enable_device in the qlogic_stub scsi driver. Signed-off-by: Zhouyang Jia Cc: James E.J. Bottomley Cc: Martin K. Petersen Cc: linux-scsi@vger.kernel.org [linux@dominikbrodowski.net: update commit message] Signed-off-by: Dominik Brodowski commit be826ada52f1fcabed5b5217c94609ebf5967211 Author: Jia-Ju Bai Date: Sun Mar 18 22:49:57 2018 +0800 char: pcmcia: cm4000_cs: Replace mdelay with usleep_range in set_protocol set_protocol() is never called in atomic context. The call chains ending up at set_protocol() are: [1] set_protocol() <- monitor_card() [2] set_protocol() <- cmm_ioctl() monitor_card() is only set in setup_timer(), and cmm_ioctl() is only set as ".unlocked_ioctl" in file_operations structure "cm4000_fops". Despite never getting called from atomic context, set_protocol() calls mdelay(10), i.e. busy wait for 10ms. That is not necessary and can be replaced with usleep_range to avoid busy waiting. This is found by a static analysis tool named DCNS written by myself. Signed-off-by: Jia-Ju Bai Acked-by: Harald Welte Signed-off-by: Dominik Brodowski commit dc245cfa82f4dc1e9adf6b9190a9d7dfb1554ecf Author: Vaishali Thakkar Date: Sat Jul 4 09:19:09 2015 +0530 pcmcia: Use module_pcmcia_driver for scsi drivers Use module_pcmcia_driver for drivers whose init and exit functions only register and unregister, respectively. A simplified version of the Coccinelle semantic patch that performs this transformation is as follows: @a@ identifier f, x; @@ -static f(...) { return pcmcia_register_driver(&x); } @b depends on a@ identifier e, a.x; @@ -static e(...) { pcmcia_unregister_driver(&x); } @c depends on a && b@ identifier a.f; declarer name module_init; @@ -module_init(f); @d depends on a && b && c@ identifier b.e, a.x; declarer name module_exit; declarer name module_pcmcia_driver; @@ -module_exit(e); +module_pcmcia_driver(x); Signed-off-by: Vaishali Thakkar Cc: James E.J. Bottomley Cc: Martin K. Petersen Cc: linux-scsi@vger.kernel.org [linux@dominikbrodowski.net: - updated commit message - drop change to fdomain which got removed in the meantime] Signed-off-by: Dominik Brodowski commit ddc9a1d90abedad10d3d1f1bd14b2a6d70f1c9e6 Author: Colin Ian King Date: Fri Jul 17 11:02:34 2015 +0100 pcmcia: remove KERN_INFO level from debug message The KERN_INFO level is being appended to the "%s:" string in the DEBUGP macro, so it isn't actually doing what was originally intended and instead inserts it in the wrong place. Remove it so it is at least we're using the DEBUGP macro consistently throughout the driver and we're not going to lose any functionality in message level with change anyhow. Caught by smatch static analysis: drivers/char/pcmcia/cm4040_cs.c:509 cm4040_reader_release() warn: KERN_* level not at start of string Signed-off-by: Colin Ian King Cc: Harald Welte Cc: Arnd Bergmann Signed-off-by: Dominik Brodowski commit 799d5eb4e7aede8ddfcdd313eeb875f4eea860be Author: Janusz Krzysztofik Date: Sat Sep 29 14:20:22 2018 +0200 gpiolib: Fix incorrect use of find_next_zero_bit() Commit b17566a6b08b ("gpiolib: Implement fast processing path in get/set array"), already fixed to some extent with commit 5d581d7e8cdc ("gpiolib: Fix missing updates of bitmap index"), introduced a new mode of processing bitmaps where bits applicable for fast bitmap processing path are supposed to be skipped while iterating bits which don't apply. Unfortunately, find_next_zero_bit() function supposed to skip over those fast bits is always called with a 'start' argument equal to an index of last zero bit found and returns that index value again an again, causing an infinite loop. Fix it by incrementing the index uncoditionally before find_next_zero_bit() is optionally called. Reported-by: Marek Szyprowski Signed-off-by: Janusz Krzysztofik Tested-by: Marek Szyprowski Signed-off-by: Linus Walleij commit 5ed4cecd75e90232a19afa502cf477925854561e Author: Viresh Kumar Date: Wed Sep 12 11:21:17 2018 +0530 OPP: Pass OPP table to _of_add_opp_table_v{1|2}() Both _of_add_opp_table_v1() and _of_add_opp_table_v2() contain similar code to get the OPP table and their parent routine also parses the DT to find the OPP table's node pointer. This can be simplified by getting the OPP table in advance and then passing it as argument to these routines. Tested-by: Niklas Cassel Signed-off-by: Viresh Kumar commit 283d55e68d8a0f302057f57dcbd4d2e000c2ac85 Author: Viresh Kumar Date: Fri Sep 7 09:01:54 2018 +0530 OPP: Prevent creating multiple OPP tables for devices sharing OPP nodes When two or more devices are sharing their clock and voltage rails, they share the same OPP table. But there are some corner cases where the OPP core incorrectly creates separate OPP tables for them. For example, CPU 0 and 1 share clock/voltage rails. The platform specific code calls dev_pm_opp_set_regulators() for CPU0 and the OPP core creates an OPP table for it (the individual OPPs aren't initialized as of now). The same is repeated for CPU1 then. Because _opp_get_opp_table() doesn't compare DT node pointers currently, it fails to find the link between CPU0 and CPU1 and so creates a new OPP table. Fix this by calling _managed_opp() from _opp_get_opp_table(). _managed_opp() gain an additional argument (index) to get the right node pointer. This resulted in simplifying code in _of_add_opp_table_v2() as well. Tested-by: Niklas Cassel Signed-off-by: Viresh Kumar commit e52a8250480acd3b26534793c61816e30d85fbb6 Author: Miklos Szeredi Date: Mon Oct 1 10:07:06 2018 +0200 fuse: realloc page array Writeback caching currently allocates requests with the maximum number of possible pages, while the actual number of pages per request depends on a couple of factors that cannot be determined when the request is allocated (whether page is already under writeback, whether page is contiguous with previous pages already added to a request). This patch allows such requests to start with no page allocation (all pages inline) and grow the page array on demand. If the max_pages tunable remains the default value, then this will mean just one allocation that is the same size as before. If the tunable is larger, then this adds at most 3 additional memory allocations (which is generously compensated by the improved performance from the larger request). Signed-off-by: Miklos Szeredi commit 5da784cce4308ae10a79e3c8c41b13fb9568e4e0 Author: Constantine Shulyupin Date: Thu Sep 6 15:37:06 2018 +0300 fuse: add max_pages to init_out Replace FUSE_MAX_PAGES_PER_REQ with the configurable parameter max_pages to improve performance. Old RFC with detailed description of the problem and many fixes by Mitsuo Hayasaka (mitsuo.hayasaka.hu@hitachi.com): - https://lkml.org/lkml/2012/7/5/136 We've encountered performance degradation and fixed it on a big and complex virtual environment. Environment to reproduce degradation and improvement: 1. Add lag to user mode FUSE Add nanosleep(&(struct timespec){ 0, 1000 }, NULL); to xmp_write_buf in passthrough_fh.c 2. patch UM fuse with configurable max_pages parameter. The patch will be provided latter. 3. run test script and perform test on tmpfs fuse_test() { cd /tmp mkdir -p fusemnt passthrough_fh -o max_pages=$1 /tmp/fusemnt grep fuse /proc/self/mounts dd conv=fdatasync oflag=dsync if=/dev/zero of=fusemnt/tmp/tmp \ count=1K bs=1M 2>&1 | grep -v records rm fusemnt/tmp/tmp killall passthrough_fh } Test results: passthrough_fh /tmp/fusemnt fuse.passthrough_fh \ rw,nosuid,nodev,relatime,user_id=0,group_id=0 0 0 1073741824 bytes (1.1 GB) copied, 1.73867 s, 618 MB/s passthrough_fh /tmp/fusemnt fuse.passthrough_fh \ rw,nosuid,nodev,relatime,user_id=0,group_id=0,max_pages=256 0 0 1073741824 bytes (1.1 GB) copied, 1.15643 s, 928 MB/s Obviously with bigger lag the difference between 'before' and 'after' will be more significant. Mitsuo Hayasaka, in 2012 (https://lkml.org/lkml/2012/7/5/136), observed improvement from 400-550 to 520-740. Signed-off-by: Constantine Shulyupin Signed-off-by: Miklos Szeredi commit 8a7aa286ab67d7dfac8abbefab899597b5977c9a Author: Miklos Szeredi Date: Mon Oct 1 10:07:05 2018 +0200 fuse: allocate page array more efficiently When allocating page array for a request the array for the page pointers and the array for page descriptors are allocated by two separate kmalloc() calls. Merge these into one allocation. Also instead of initializing the request and the page arrays with memset(), use the zeroing allocation variants. Reserved requests never carry pages (page array size is zero). Make that explicit by initializing the page array pointers to NULL and make sure the assumption remains true by adding a WARN_ON(). Signed-off-by: Miklos Szeredi commit ab2257e9941b9ef28d4a4a451e4b146d40a21e18 Author: Miklos Szeredi Date: Mon Oct 1 10:07:05 2018 +0200 fuse: reduce size of struct fuse_inode Do this by grouping fields used for cached writes and putting them into a union with fileds used for cached readdir (with obviously no overlap, since we don't have hybrid objects). Signed-off-by: Miklos Szeredi commit 261aaba72fdba17b74a3a434d9f925b43d90e958 Author: Miklos Szeredi Date: Mon Oct 1 10:07:05 2018 +0200 fuse: use iversion for readdir cache verification Use the internal iversion counter to make sure modifications of the directory through this filesystem are not missed by the mtime check (due to mtime granularity). Signed-off-by: Miklos Szeredi commit 7118883b44b8edfea732aadeb0d4424da3f152b2 Author: Miklos Szeredi Date: Mon Oct 1 10:07:04 2018 +0200 fuse: use mtime for readdir cache verification Store the modification time of the directory in the cache, obtained before starting to fill the cache. When reading the cache, verify that the directory hasn't changed, by checking if current modification time is the same as the one stored in the cache. This only needs to be done when the current file position is at the beginning of the directory, as mandated by POSIX. Signed-off-by: Miklos Szeredi commit 3494927e090bf511e54eecaf33a8e56e5c0463db Author: Miklos Szeredi Date: Mon Oct 1 10:07:04 2018 +0200 fuse: add readdir cache version Allow the cache to be invalidated when page(s) have gone missing. In this case increment the version of the cache and reset to an empty state. Add a version number to the directory stream in struct fuse_file as well, indicating the version of the cache it's supposed to be reading. If the cache version doesn't match the stream's version, then reset the stream to the beginning of the cache. Signed-off-by: Miklos Szeredi commit 5d7bc7e8680c7ca4c8a4f139ce2a54ccb8131ef0 Author: Miklos Szeredi Date: Mon Oct 1 10:07:04 2018 +0200 fuse: allow using readdir cache The cache is only used if it's completed, not while it's still being filled; this constraint could be lifted later, if it turns out to be useful. Introduce state in struct fuse_file that indicates the position within the cache. After a seek, reset the position to the beginning of the cache and search the cache for the current position. If the current position is not found in the cache, then fall back to uncached readdir. It can also happen that page(s) disappear from the cache, in which case we must also fall back to uncached readdir. Signed-off-by: Miklos Szeredi commit 69e34551152a286f827d54dcb5700da6aeaac1fb Author: Miklos Szeredi Date: Mon Oct 1 10:07:04 2018 +0200 fuse: allow caching readdir This patch just adds the cache filling functions, which are invoked if FOPEN_CACHE_DIR flag is set in the OPENDIR reply. Cache reading and cache invalidation are added by subsequent patches. The directory cache uses the page cache. Directory entries are packed into a page in the same format as in the READDIR reply. A page only contains whole entries, the space at the end of the page is cleared. The page is locked while being modified. Multiple parallel readdirs on the same directory can fill the cache; the only constraint is that continuity must be maintained (d_off of last entry points to position of current entry). Signed-off-by: Miklos Szeredi commit 55d09dd4c86060fbbc74ab2b1bfaed401cd0163a Merge: af4bf6c3d9b4 492a6be197c0 Author: Christian Borntraeger Date: Mon Oct 1 08:53:23 2018 +0200 Merge branch 'apv11' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux into kernelorgnext commit af4bf6c3d9b45b62da86d928d3fd2d4ddc8549e6 Author: David Hildenbrand Date: Mon Aug 6 17:54:07 2018 +0200 s390/mm: optimize locking without huge pages in gmap_pmd_op_walk() Right now we temporarily take the page table lock in gmap_pmd_op_walk() even though we know we won't need it (if we can never have 1mb pages mapped into the gmap). Let's make this a special case, so gmap_protect_range() and gmap_sync_dirty_log_pmd() will not take the lock when huge pages are not allowed. gmap_protect_range() is called quite frequently for managing shadow page tables in vSIE environments. Signed-off-by: David Hildenbrand Reviewed-by: Janosch Frank Message-Id: <20180806155407.15252-1-david@redhat.com> Signed-off-by: Janosch Frank commit 67d49d52ae502eaea8858fbcb97e3c2891f78da9 Author: Collin Walling Date: Fri Aug 31 12:51:19 2018 -0400 KVM: s390: set host program identifier A host program identifier (HPID) provides information regarding the underlying host environment. A level-2 (VM) guest will have an HPID denoting Linux/KVM, which is set during VCPU setup. A level-3 (VM on a VM) and beyond guest will have an HPID denoting KVM vSIE, which is set for all shadow control blocks, overriding the original value of the HPID. Signed-off-by: Collin Walling Reviewed-by: Janosch Frank Message-Id: <1535734279-10204-4-git-send-email-walling@linux.ibm.com> Reviewed-by: Christian Borntraeger Signed-off-by: Christian Borntraeger commit 8d8e3b7d8f06f69005d829d4a195b00ef976004b Author: Fabio Estevam Date: Tue Sep 18 14:48:14 2018 -0300 soc: imx: gpcv2: 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 2fe761d18adaf62686254fa273773efa6b1da9c0 Author: Fabio Estevam Date: Tue Sep 18 14:48:13 2018 -0300 soc: imx: gpc: 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 b1a23445364d321bfe8d8aa432c955d07ed38b47 Author: Rob Herring Date: Wed Aug 29 15:02:58 2018 -0500 bus: imx-weim: drop unnecessary DT node name NULL check Checking the child node names is pointless as the DT node name can never be NULL, so remove it. Signed-off-by: Rob Herring Signed-off-by: Shawn Guo commit 73f59712a1a3e532a2cbfe582ecfdbf56c33297d Author: Anson Huang Date: Tue Aug 28 16:36:46 2018 +0800 soc: imx: gpcv2: make pgc driver more generic for other i.MX platforms i.MX8MQ and i.MX8MM share same gpc module with i.MX7D, they can reuse gpcv2 pgc driver for power domain control, this patch renames all functions and structure definitions started with "imx7" to "imx", and use .data in imx_gpcv2_dt_ids[] to pass platform specific power domain data for power domain driver, thus make gpcv2 pgc driver more generic for i.MX platforms. Signed-off-by: Anson Huang Acked-by: Andrey Smirnov Signed-off-by: Shawn Guo commit fea88b2b80ab7a01982a6494ea8e8099cddc7b38 Author: Anson Huang Date: Tue Aug 28 16:36:45 2018 +0800 soc: imx: gpcv2: use A_CORE instread of A7 for more i.MX platforms gpcv2 driver is NOT just used on i.MX7D which has Cortex-A7 cores, but also on i.MX8MQ/i.MX8MM platforms which use Cortex-A53 cores, so let's use A_CORE instread of A7 to avoid confusion. Signed-off-by: Anson Huang Acked-by: Andrey Smirnov Signed-off-by: Shawn Guo commit 6ac99a328ee16d3f8cc253f1df62623cee3e9ea5 Author: Christoph Manszewski Date: Fri Sep 21 14:24:38 2018 +0200 drm/exynos: mixer: Make plane alpha configurable The mixer hardware supports variable plane alpha. Currently planes are opaque, make this configurable. Tested on Odroid-U3 with Exynos 4412 CPU, kernel next-20180913 using modetest. Signed-off-by: Christoph Manszewski Signed-off-by: Inki Dae commit 482582c0217d352f0e344f0b25ea6ce12f964351 Author: Christoph Manszewski Date: Fri Sep 21 14:24:37 2018 +0200 drm/exynos: mixer: Make pixel blend mode configurable The mixer hardware supports both premultiplied alpha and non-premultiplied alpha. Currently premultiplied alpha is default, make this configurable. Tested on Odroid-U3 with Exynos 4412 CPU, kernel next-20180913 using modetest. Signed-off-by: Christoph Manszewski Signed-off-by: Inki Dae commit a9777267e3e19e784723827a41cfb37da6e5bf66 Author: Christoph Manszewski Date: Fri Sep 21 14:24:36 2018 +0200 drm/exynos: drm_plane: Correct exynos_drm_plane_reset Make use of helper functions in exynos_drm_plane_reset in order to set all default values. Currently alpha isn't set during reset. Signed-off-by: Christoph Manszewski Signed-off-by: Inki Dae commit f847c699cff3f050286ee0a08632046468e7a511 Author: Chao Yu Date: Thu Sep 27 18:34:52 2018 +0800 f2fs: allow out-place-update for direct IO in LFS mode Normally, DIO uses in-pllace-update, but in LFS mode, f2fs doesn't allow triggering any in-place-update writes, so we fallback direct write to buffered write, result in bad performance of large size write. This patch adds to support triggering out-place-update for direct IO to enhance its performance. Note that it needs to exclude direct read IO during direct write, since new data writing to new block address will no be valid until write finished. storage: zram time xfs_io -f -d /mnt/f2fs/file -c "pwrite 0 1073741824" -c "fsync" Before: real 0m13.061s user 0m0.327s sys 0m12.486s After: real 0m6.448s user 0m0.228s sys 0m6.212s Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 39a8695824510a951ded696d69b8dea3c720b109 Author: Chao Yu Date: Thu Sep 27 18:33:18 2018 +0800 f2fs: refactor ->page_mkwrite() flow Thread A Thread B - f2fs_vm_page_mkwrite - f2fs_setattr - down_write(i_mmap_sem) - truncate_setsize - f2fs_truncate - up_write(i_mmap_sem) - f2fs_reserve_block reserve NEW_ADDR - skip dirty page due to truncation 1. we don't need to rserve new block address for a truncated page. 2. dn.data_blkaddr is used out of node page lock coverage. Refactor ->page_mkwrite() flow to fix above issues: - use __do_map_lock() to avoid racing checkpoint() - lock data page in prior to dnode page - cover f2fs_reserve_block with i_mmap_sem lock - wait page writeback before zeroing page Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit bab475c5414e8d1fa182fd17ae966864e9c85741 Author: Chao Yu Date: Thu Sep 27 23:41:16 2018 +0800 Revert: "f2fs: check last page index in cached bio to decide submission" There is one case that we can leave bio in f2fs, result in hanging page writeback waiter. Thread A Thread B - f2fs_write_cache_pages - f2fs_submit_page_write page #0 cached in bio #0 of cold log - f2fs_submit_page_write page #1 cached in bio #1 of warm log - f2fs_write_cache_pages - f2fs_submit_page_write bio is full, submit bio #1 contain page #1 - f2fs_submit_merged_write_cond(, page #1) fail to submit bio #0 due to page #1 is not in any cached bios. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit d440c52d3151a28358f4c2d52d8583a0aa54ab83 Author: Junling Zheng Date: Fri Sep 28 20:25:56 2018 +0800 f2fs: support superblock checksum Now we support crc32 checksum for superblock. Reviewed-by: Chao Yu Signed-off-by: Junling Zheng Signed-off-by: Jaegeuk Kim commit 274bd9ba39425610fdb9a6827602197a5cd27cd8 Author: Chao Yu Date: Sat Sep 29 18:31:28 2018 +0800 f2fs: add to account skip count of background GC This patch adds to account skip count of background GC, and show stat info via 'status' debugfs entry. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit b63e7be5908cb757fc6b98fb9534dabd78b5338a Author: Chao Yu Date: Sat Sep 29 18:31:27 2018 +0800 f2fs: add to account meta IO This patch supports to account meta IO, it enables to show write IO from f2fs more comprehensively via 'status' debugfs entry. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 41ab1cb7d1cd5d53d68bcf5fb3fddad77af15545 Author: Parav Pandit Date: Sat Sep 15 12:07:57 2018 +0300 RDMA/cma: Introduce and use cma_ib_acquire_dev() When RDMA CM connect request arrives for IB transport, it already contains device, port, netdevice (optional). Instead of traversing all the cma devices, use the cma device already found by the cma_find_listener() for which a listener id is provided. iWarp devices doesn't need to derive RoCE GIDs, therefore drop RoCE specific checks from cma_acquire_dev() and rename it to cma_iw_acquire_dev(). Signed-off-by: Parav Pandit Reviewed-by: Daniel Jurgens Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit ff11c6cd521f4fd859c825976e4146dfb166029c Author: Parav Pandit Date: Sat Sep 15 12:07:56 2018 +0300 RDMA/cma: Introduce and use cma_acquire_dev_by_src_ip() Light weight version of cma_acquire_dev() just for binding with rdma device based on source IP(v4/v6) address. This simplifies cma_acquire_dev() to avoid listen_id specific checks and also for subsequent simplification for IB vs iWarp. Signed-off-by: Parav Pandit Reviewed-by: Daniel Jurgens Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 78fb282b150c36269fcecf5d08e6de7117e9f4ab Author: Parav Pandit Date: Sat Sep 15 12:07:55 2018 +0300 RDMA/cma: Allow accepting requests for multi port rdma device When IP failover is used between multiple ports of a given rdma device, allow accepting CM requests from either of the ports. This is applicable for IPv4 and IPv6 non link local addressing scheme. IPv6 link local addresses are bound. IP failover requests for listen cm_ids bound to specific netdev interfaces cannot be supported. (Similar to traditional sockets). Signed-off-by: Parav Pandit Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit bfe397c387748a0110708c0aad05a12ed549a3d4 Author: Kaike Wan Date: Wed Sep 26 10:56:12 2018 -0700 IB/hfi1: Use VL15 for SM packets Subnet Management Packets (SMP) should exclusively use VL15 and their SL is ignored (IBTA v1.3, Section 3.5.8.2). Therefore, when an SMP is posted, the SL in the address handle can be set to 0 by a user application. Consequently, when an address handle is created by the IB core, some fields in struct rvt_ah may not be set correctly by using the SL2SC and SC2VL tables at the time. Subsequently, when the request is post sent, the incoming swqe may fail the validation check, resulting in the rejection of the send request. This patch fixes the problem by using VL15 for any validation, ignoring the SL in the address handle. Reviewed-by: Mike Marciniszyn Signed-off-by: Kaike Wan Signed-off-by: Dennis Dalessandro Signed-off-by: Jason Gunthorpe commit eb50130964e8c1379f37c3d3bab33a411ec62e98 Author: Alex Estrin Date: Wed Sep 26 10:56:03 2018 -0700 IB/hfi1: Add mtu check for operational data VLs Since Virtual Lanes BCT credits and MTU are set through separate MADs, we have to ensure both are valid, and data VLs are ready for transmission before we allow port transition to Armed state. Fixes: 5e2d6764a729 ("IB/hfi1: Verify port data VLs credits on transition to Armed") Reviewed-by: Mike Marciniszyn Reviewed-by: Michael J. Ruhl Signed-off-by: Alex Estrin Signed-off-by: Dennis Dalessandro Signed-off-by: Jason Gunthorpe commit 3144533bf667c8e53bb20656b78295960073e57b Author: Dennis Dalessandro Date: Wed Sep 26 10:55:53 2018 -0700 IB/hfi1: Ensure ucast_dlid access doesnt exceed bounds The dlid assignment made by looking into the u_ucast_dlid array does not do an explicit check for the size of the array. The code path to arrive at def_port, the index value is long and complicated so its best to just have an explicit check here. Signed-off-by: Dennis Dalessandro Signed-off-by: Jason Gunthorpe commit 15b796bc3d5cc8f776f5cb0770f9f3e8b282e4d1 Author: Kaike Wan Date: Wed Sep 26 10:27:03 2018 -0700 IB/hfi1: Add static trace for iowait This patch adds the static trace for resource wait. Reviewed-by: Mitko Haralanov Signed-off-by: Mike Marciniszyn Signed-off-by: Kaike Wan Signed-off-by: Dennis Dalessandro Signed-off-by: Jason Gunthorpe commit 5da0fc9dbf891a9c9e01a634f2126b5952afb3a6 Author: Dennis Dalessandro Date: Fri Sep 28 07:17:09 2018 -0700 IB/hfi1: Prepare resource waits for dual leg Current implementation allows each qp to have only one send engine. As such, each qp has only one list to queue prebuilt packets when send engine resources are not available. To improve performance, it is desired to support multiple send engines for each qp. This patch creates the framework to support two send engines (two legs) for each qp for the TID RDMA protocol, which can be easily extended to support more send engines. It achieves the goal by creating a leg specific struct, iowait_work in the iowait struct, to hold the work_struct and the tx_list as well as a pointer to the parent iowait struct. The hfi1_pkt_state now has an additional field to record the current legs work structure and that is now passed to all egress waiters to determine the leg that needs to wait via a new iowait helper. The APIs are adjusted to use the new leg specific struct as required. Many new and modified helpers are added to support this change. Reviewed-by: Mitko Haralanov Signed-off-by: Mike Marciniszyn Signed-off-by: Kaike Wan Signed-off-by: Dennis Dalessandro Signed-off-by: Jason Gunthorpe commit d205a06a14796a24b3447bc5d27b7dedff4479d5 Author: Kaike Wan Date: Wed Sep 26 10:26:44 2018 -0700 IB/rdmavt: Rename check_send_wqe as setup_wqe The driver-provided function check_send_wqe allows the hardware driver to check and set up the incoming send wqe before it is inserted into the swqe ring. This patch will rename it as setup_wqe to better reflect its usage. In addition, this function is only called when all setup is complete in rdmavt. Reviewed-by: Mike Marciniszyn Signed-off-by: Kaike Wan Signed-off-by: Dennis Dalessandro Signed-off-by: Jason Gunthorpe commit 8c31c9188b27b276b5ba3d362fa8e2adc9b7404a Author: YueHaibing Date: Fri Sep 28 10:59:53 2018 +0000 RDMA/hns: remove set but not used variable 'dseg' Fixes gcc '-Wunused-but-set-variable' warning: drivers/infiniband/hw/hns/hns_roce_hw_v2.c: In function 'hns_roce_v2_post_send': drivers/infiniband/hw/hns/hns_roce_hw_v2.c:194:35: warning: variable 'dseg' set but not used [-Wunused-but-set-variable] Signed-off-by: YueHaibing Signed-off-by: Jason Gunthorpe commit aef716fa5e6da3919cca22ac2097a90d73d8177f Author: Nathan Chancellor Date: Thu Sep 27 13:55:58 2018 -0700 RDMA/qedr: Remove enumerated type qed_roce_ll2_tx_dest Clang warns when one enumerated type is explicitly converted to another. drivers/infiniband/hw/qedr/qedr_roce_cm.c:198:28: warning: implicit conversion from enumeration type 'enum qed_roce_ll2_tx_dest' to different enumeration type 'enum qed_ll2_tx_dest' [-Wenum-conversion] ll2_tx_pkt.tx_dest = pkt->tx_dest; ~ ~~~~~^~~~~~~ 1 warning generated. Turns out that QED_ROCE_LL2_TX_DEST_NW and QED_ROCE_LL2_TX_DEST_LB are only used once in the whole tree and QED_ROCE_LL2_TX_DEST_MAX is used nowhere. Remove them and use the equivalent values from qed_ll2_tx_dest in their place. Reported-by: Nick Desaulniers Signed-off-by: Nathan Chancellor Reviewed-by: Nick Desaulniers Acked-by: Michal Kalderon Signed-off-by: Jason Gunthorpe commit 935c84ac649a147e1aad2c48ee5c5a1a9176b2d0 Author: Michael J. Ruhl Date: Fri Sep 28 07:34:57 2018 -0700 IB/hfi1: Error path MAD response size is incorrect If a MAD packet has incorrect header information, the logic uses the reply path to report the error. The reply path expects *resp_len to be set prior to return. Unfortunately, *resp_len is set to 0 for this path. This causes an incorrect response packet. Fix by ensuring that the *resp_len is defaulted to the incoming packet size (wc->bytes_len - sizeof(GRH)). Reviewed-by: Mike Marciniszyn Signed-off-by: Michael J. Ruhl Signed-off-by: Dennis Dalessandro Signed-off-by: Jason Gunthorpe commit 721ad7e643f7002efa398838693f90284ea216d1 Author: Zhu Yanjun Date: Sun Sep 30 01:57:42 2018 -0400 IB/rxe: replace kvfree with vfree The buf is allocated by vmalloc_user in the function rxe_queue_init. So it is better to free it by vfree. Fixes: 8700e3e7c485 ("Soft RoCE driver") Reviewed-by: Leon Romanovsky Signed-off-by: Zhu Yanjun Signed-off-by: Jason Gunthorpe commit 095680f24f2673d860fd1d3d2f54f40f330b4c63 Author: Jaegeuk Kim Date: Fri Sep 28 00:24:39 2018 -0700 f2fs: keep lazytime on remount This patch fixes losing lazytime when remounting f2fs. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit d25a40a7b34602e6a71ba5b03d54a765cf8c7b0d Author: Marek Szyprowski Date: Fri Aug 10 15:29:01 2018 +0200 drm/exynos: gsc: Add support for tiled formats Add support for 16x16 tiled NV12 and NV21 formats. Signed-off-by: Marek Szyprowski Signed-off-by: Inki Dae commit 5fb652c282f2910db9a588be053280fa20ee390e Author: Andrzej Pietrasiewicz Date: Fri Aug 10 15:29:00 2018 +0200 drm/exynos: scaler: Add support for tiled formats Add support for 16x16 tiled formats: NV12/NV21, YUYV and YUV420. Signed-off-by: Andrzej Pietrasiewicz Signed-off-by: Marek Szyprowski Fixed line over 80 characters warning Signed-off-by: Inki Dae commit b733116feab5471c0489ab33e90fceb553215e5b Author: Christoph Hellwig Date: Sat Aug 25 08:46:34 2018 +0200 unicore32: remove swiotlb support unicore32 is a bog standard 32-bit port without larger physical address space, highmem or any other obvious addressing limitation. There should be no need to bounce buffer using swiotlb. Signed-off-by: Christoph Hellwig Acked-by: Guan Xuetao commit f88c18ddb0903c49a6b999cd7fe05f06246d4a62 Author: Biju Das Date: Fri Sep 21 18:37:00 2018 +0100 dt-bindings: i2c: sh_mobile: Document r8a7744 support Document i2c Device Tree support for RZ/G1N (R8A7744) SoC, which is compatible with R-Car Gen2 SoC family. Signed-off-by: Biju Das Reviewed-by: Fabrizio Castro Reviewed-by: Simon Horman Reviewed-by: Geert Uytterhoeven Signed-off-by: Wolfram Sang commit 8bca7089af56be53ecd87091b1f5bf81030e571b Author: Biju Das Date: Fri Sep 21 18:36:59 2018 +0100 dt-bindings: i2c: rcar: Document r8a7744 support Document i2c Device Tree support for RZ/G1N (R8A7744) SoC, which is compatible with R-Car Gen2 SoC family. Signed-off-by: Biju Das Reviewed-by: Fabrizio Castro Reviewed-by: Simon Horman Reviewed-by: Geert Uytterhoeven Signed-off-by: Wolfram Sang commit f4089fcfdb3d31421bbe0b1f3c3d6c11cd0dcb4d Author: Fabrizio Castro Date: Fri Sep 21 18:36:58 2018 +0100 dt-bindings: i2c: rcar: Add r8a77470 support Although the I2C IP found in the RZ/G1C is not exactly the same as the one found in the R-Car Gen2 family or R-Car Gen3 family, it can still be considered as compatible with R-Car Gen2 from a software perpective. This patch therefore documents the SoC specific compatible string, and the compatibility with Gen2 fallback is retained. Signed-off-by: Fabrizio Castro Reviewed-by: Biju Das Signed-off-by: Wolfram Sang commit 48402cee6889fb3fce58e95fea1471626286dc63 Author: Hans de Goede Date: Sun Sep 23 15:58:11 2018 +0200 ACPI / LPSS: Resume BYT/CHT I2C controllers from resume_noirq On some Cherry Trail systems the GPU ACPI fwnode has power-resources which point to the PMIC, which is connected over a LPSS I2C controller. We add a device-link to make sure that the I2C controller is resumed before the GPU is. But the pci-core changes the power-state of PCI devices from D3 to D0 at noirq time (to restore the PCI config registers) and before this commit we were bringing up the I2C controllers from a resume_early handler which runs later. More specifically the pm-core will first run all resume_noirq handlers in order and then all resume_early handlers. So we must not only make sure that the handlers are run in the right order, but also that the resume of the I2C controller is done at noirq time. The behavior before this commit, resuming the I2C controller from a resume_early handler leads to the following errors: i2c_designware 808622C1:06: controller timed out ACPI Error: AE_ERROR, Returned by Handler for [UserDefinedRegion] ACPI Error: Method parse/execution failed \_SB.P18W._ON, AE_ERROR video LNXVIDEO:00: Failed to change power state to D0 This commit changes the acpi_lpss.c code to resume the BYT/CHT I2C controllers at resume_noirq time fixing this. Tested-by: Jarkko Nikula Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Signed-off-by: Rafael J. Wysocki commit 2d71ee0ce72f2597962fb2e66153f94d692142ba Author: Hans de Goede Date: Sun Sep 23 15:58:10 2018 +0200 ACPI / LPSS: Add a device link from the GPU to the BYT I2C5 controller On some Bay Trail systems the GPU ACPI fwnode has power-resources which point to the PMIC, which is connected over the LPSS I2C5 controller. This one was quite nasty to debug, unlike on CHT where the same problem leads to errors like these: i2c_designware 808622C1:06: controller timed out ACPI Error: AE_ERROR, Returned by Handler for [UserDefinedRegion] ACPI Error: Method parse/execution failed \_SB.P18W._ON, AE_ERROR video LNXVIDEO:00: Failed to change power state to D0 On BYT the read-modify-write done by drivers/acpi/pmic/intel_pmic_xpower.c on the AXP288 PMIC register to change the power-resource state *seems* to succeed. But in reality, because the I2C controller has not been resumed yet, the read silently fails and returns the wrong value, where as the write does succeed, writing back the wrong value for all the other power-resources in the same register, turning off a bunch of them. Which of course does not end well. This commit adds a RPM consumer link from the GPU (which has a LNXVIDEO HID) to the BYT LPSS I2C5 controller, so that the I2C controller gets resumed before the GPU is resumed and thus before we try to change the power-resource. Signed-off-by: Hans de Goede Tested-by: Jarkko Nikula Reviewed-by: Andy Shevchenko Signed-off-by: Rafael J. Wysocki commit bd0f4e342e006366a7f4e77f8d01e42c2e8ca992 Author: Hans de Goede Date: Sun Sep 23 15:58:09 2018 +0200 ACPI / LPSS: Add a device link from the GPU to the CHT I2C7 controller On some Cherry Trail systems the GPU ACPI fwnode has power-resources which point to the PMIC, which is connected over the LPSS I2C7 controller. Due to probe ordering currently we resume the GPU and thus try to access the ACPI power-resources before the I2C controller has been resumed. This leads to the following errors: i2c_designware 808622C1:06: controller timed out ACPI Error: AE_ERROR, Returned by Handler for [UserDefinedRegion] ACPI Error: Method parse/execution failed \_SB.P18W._ON, AE_ERROR video LNXVIDEO:00: Failed to change power state to D0 This commit adds a RPM consumer link from the GPU (which has a LNXVIDEO HID) to the CHT LPSS I2C7 controller, so that the I2C controller gets resumed before the GPU is resumed. Tested-by: Jarkko Nikula Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Signed-off-by: Rafael J. Wysocki commit 1e30124ac60abc41d74793900f8b4034f29bcb3d Author: Hans de Goede Date: Sun Sep 23 15:58:08 2018 +0200 ACPI / LPSS: Make acpi_lpss_find_device() also find PCI devices On some Cherry Trail systems the GPU ACPI fwnode has power-resources which point to the PMIC, which is connected over one of the LPSS I2C controllers. To get the suspend/resume ordering correct for this we need to be able to add device-links between the GPU and the I2c controller. The GPU is a PCI device, so this requires acpi_lpss_find_device() to also work on PCI devs. Tested-by: Jarkko Nikula Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Signed-off-by: Rafael J. Wysocki commit a92a5563e3f4189b363de72527efdfaf4789167f Author: Hans de Goede Date: Sun Sep 23 15:58:07 2018 +0200 ACPI / LPSS: Make hid_uid_match helper accept a NULL uid argument Make hid_uid_match helper accept a NULL uid argument, so that we can also check for matches against devices with are not expected to have a uid such as the LNXVIDEO device. Tested-by: Jarkko Nikula Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Signed-off-by: Rafael J. Wysocki commit ea625ce133176d7eeccd692967dce5622cbb61ee Author: Hans de Goede Date: Sun Sep 23 15:58:06 2018 +0200 ACPI / LPSS: Make hid_uid_match helper take an acpi_device as first argument The hid_uid_match() helper is only used to check if a given acpi_device matches a certain hid + uid combination. Make the first argument the acpi_device to check to make this more clear. Tested-by: Jarkko Nikula Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Signed-off-by: Rafael J. Wysocki commit 7f9558e14cfd43999da325008262a2c6d638a527 Merge: d51aea13dd67 d1e1303173d7 Author: Rafael J. Wysocki Date: Sun Sep 30 22:08:39 2018 +0200 Merge back earlier cpufreq material for 4.20. commit c7944ebb9ce9461079659e9e6ec5baaf73724b3b Author: Trond Myklebust Date: Fri Sep 28 12:42:51 2018 -0400 NFSv4: Fix lookup revalidate of regular files If we're revalidating an existing dentry in order to open a file, we need to ensure that we check the directory has not changed before we optimise away the lookup. Signed-off-by: Trond Myklebust commit 5ceb9d7fdaaf6d8ced6cd7861cf1deb9cd93fa47 Author: Trond Myklebust Date: Fri Sep 28 09:04:05 2018 -0400 NFS: Refactor nfs_lookup_revalidate() Refactor the code in nfs_lookup_revalidate() as a stepping stone towards optimising and fixing nfs4_lookup_revalidate(). Signed-off-by: Trond Myklebust commit be189f7e7f03de35887e5a85ddcf39b91b5d7fc1 Author: Trond Myklebust Date: Thu Sep 27 17:12:33 2018 -0400 NFS: Fix dentry revalidation on NFSv4 lookup We need to ensure that inode and dentry revalidation occurs correctly on reopen of a file that is already open. Currently, we can end up not revalidating either in the case of NFSv4.0, due to the 'cached open' path. Let's fix that by ensuring that we only do cached open for the special cases of open recovery and delegation return. Reported-by: Stan Hu Signed-off-by: Trond Myklebust commit 571ed1fd2390f74e4c1f46994f753fb0d29285e4 Author: Trond Myklebust Date: Sat Sep 29 16:00:43 2018 -0400 SUNRPC: Replace krb5_seq_lock with a lockless scheme Signed-off-by: Trond Myklebust commit 0c1c19f46efaff427fbf26007954bd090daaf15e Author: Trond Myklebust Date: Sat Sep 29 15:14:47 2018 -0400 SUNRPC: Lockless lookup of RPCSEC_GSS mechanisms Use RCU protected lookups for discovering the supported mechanisms. Signed-off-by: Trond Myklebust commit 4e4c3bef4471c8a06406abd2e3d9493e8478feff Author: Trond Myklebust Date: Thu Sep 27 13:12:44 2018 -0400 SUNRPC: Remove rpc_authflavor_lock in favour of RCU locking Module removal is RCU safe by design, so we really have no need to lock the auth_flavors[] array. Substitute a lockless scheme to add/remove entries in the array, and then use rcu. Signed-off-by: Trond Myklebust commit 1c6c4b740df12f2162ae5c3fac337137e2776236 Author: Trond Myklebust Date: Tue Sep 25 12:34:43 2018 -0400 NFS: Remove private spinlock in struct nfs_pgio_header Now that each struct nfs_pgio_header corresponds to one RPC call, we only have one writer to the struct nfs_pgio_header. Signed-off-by: Trond Myklebust commit 28d52235ee25ba7d843242b4cb3c3f27a8828b5a Author: Trond Myklebust Date: Mon Sep 24 13:15:37 2018 -0400 NFSv4: Save a few bytes in the nfs_pgio_args/res Save a few bytes by allowing the read/write specific fields of the structures to share storage. Signed-off-by: Trond Myklebust commit 8d8928d87960d71f898767185b8c0e4ce3de3cbe Author: Trond Myklebust Date: Mon Mar 5 12:03:00 2018 -0500 NFSv3: Improve NFSv3 performance when server returns no post-op attributes When the server fails to return post-op attributes, the client's attempt to place read data directly in the page cache fails, and so we have to do an extra copy in order to realign the data with page borders. This patch attempts to detect servers that don't return post-op attributes on read (e.g. for pNFS) and adjusts the placement calculation accordingly. Signed-off-by: Trond Myklebust commit 80f42368868e082c5c1dcca6ada94f6b8eab4991 Author: Anna Schumaker Date: Thu Sep 20 16:12:13 2018 -0400 NFSv4: Split out NFS v4.2 copy completion functions The convention in the rest of the code is to have a separate function for anything that might be ifdef-ed out. Signed-off-by: Anna Schumaker Signed-off-by: Trond Myklebust commit 000d3f9566edfa48d592198257283a4465f87ffd Author: Anna Schumaker Date: Tue Sep 11 16:23:48 2018 -0400 NFS: Reduce indentation of nfs4_recovery_handle_error() This is to match kernel coding style for switch statements. Signed-off-by: Anna Schumaker Signed-off-by: Trond Myklebust commit 35a61606a61249fb59cbf566f869c026f5fafec4 Author: Anna Schumaker Date: Tue Sep 11 16:23:47 2018 -0400 NFS: Reduce indentation of the switch statement in nfs4_reclaim_open_state() Most places in the kernel tend to line up cases with the switch to reduce indentation, so move this over to match that style. Additionally, I handle the (status >= 0) case in the switch so that we only "goto restart" from a single place after error handling. Signed-off-by: Anna Schumaker Signed-off-by: Trond Myklebust commit cb7a8384dc0202d5490302b7e948ede498aad720 Author: Anna Schumaker Date: Tue Sep 11 16:23:46 2018 -0400 NFS: Split out the body of nfs4_reclaim_open_state() Moving all of this into a new function removes the need for cramped indentation, making the code overall easier to look at. I also take this chance to switch copy recovery over to using nfs4_stateid_match_other() Signed-off-by: Anna Schumaker Signed-off-by: Trond Myklebust commit 10ec57e4c500007fb54b7030f1194121794d48eb Author: Tigran Mkrtchyan Date: Mon Aug 20 08:56:08 2018 +0200 nfs4: flex_file: ignore synthetic uid/gid for tightly coupled DSes for tightly coupled DSes client must ignore provided synthetic uid and gid as stated in draft-ietf-nfsv4-flex-files-19#section-5.1. Signed-off-by: Tigran Mkrtchyan Signed-off-by: Trond Myklebust commit 943cff67b842839f4f35364ba2db5c2d3f025d94 Author: Trond Myklebust Date: Tue Sep 18 10:07:44 2018 -0400 NFSv4.1: Fix the r/wsize checking The intention of nfs4_session_set_rwsize() was to cap the r/wsize to the buffer sizes negotiated by the CREATE_SESSION. The initial code had a bug whereby we would not check the values negotiated by nfs_probe_fsinfo() (the assumption being that CREATE_SESSION will always negotiate buffer values that are sane w.r.t. the server's preferred r/wsizes) but would only check values set by the user in the 'mount' command. The code was changed in 4.11 to _always_ set the r/wsize, meaning that we now never use the server preferred r/wsizes. This is the regression that this patch fixes. Also rename the function to nfs4_session_limit_rwsize() in order to avoid future confusion. Fixes: 033853325fe3 (NFSv4.1 respect server's max size in CREATE_SESSION") Cc: stable@vger.kernel.org # v4.11+ Signed-off-by: Trond Myklebust commit ace9fad43aa60a88af4b57a8328f0958e3d07bf0 Author: Trond Myklebust Date: Sun Sep 2 19:19:07 2018 -0400 NFSv4: Convert struct nfs4_state to use refcount_t Signed-off-by: Trond Myklebust commit 9ae075fdd1901b60d87a0404f9c110753e16969a Author: Trond Myklebust Date: Sun Sep 2 19:15:15 2018 -0400 NFSv4: Convert open state lookup to use RCU Further reduce contention on the inode->i_lock. Signed-off-by: Trond Myklebust commit 0de43976fbe716379084f954b1e370c35aa87bf0 Author: Trond Myklebust Date: Sun Sep 2 15:57:01 2018 -0400 NFS: Convert lookups of the open context to RCU Reduce contention on the inode->i_lock by ensuring that we use RCU when looking up the NFS open context. Signed-off-by: Trond Myklebust commit 6ba0c4e5bb08cc929662588aa2015e0ee7ee9376 Author: Trond Myklebust Date: Sun Sep 2 15:34:37 2018 -0400 NFS: Simplify internal check for whether file is open for write Signed-off-by: Trond Myklebust commit 1db97eaa0b482a738c715da6edb023d6f99e50b0 Author: Trond Myklebust Date: Sun Sep 2 15:11:57 2018 -0400 NFS: Convert lookups of the lock context to RCU Speed up lookups of an existing lock context by avoiding the inode->i_lock, and using RCU instead. Signed-off-by: Trond Myklebust commit 28ced9a84cd2f9fc68a081fb3b34e70c5d459be3 Author: Trond Myklebust Date: Mon Sep 3 13:12:15 2018 -0400 pNFS: Don't allocate more pages than we need to fit a layoutget response For the 'files' and 'flexfiles' layout types, we do not expect the reply to be any larger than 4k. The block and scsi layout types are a little more greedy, so we keep allocating the maximum response size for now. Signed-off-by: Trond Myklebust commit a2791d3a2cee9432e78bbdcfde586ef54e32d223 Author: Trond Myklebust Date: Mon Sep 3 12:57:52 2018 -0400 pNFS: Don't zero out the array in nfs4_alloc_pages() We don't need a zeroed out array, since it is immediately being filled. Signed-off-by: Trond Myklebust commit ec846469ba7bdb81e42c04e4e15d8fbf19e426e2 Author: Trond Myklebust Date: Fri Sep 14 14:38:05 2018 -0400 SUNRPC: Unexport xdr_partial_copy_from_skb() It is no longer used outside of net/sunrpc/socklib.c Signed-off-by: Trond Myklebust commit 4f546149755b4dec431bec236a9116a74384c7a7 Author: Trond Myklebust Date: Fri Sep 14 17:45:23 2018 -0400 SUNRPC: Clean up xs_udp_data_receive() Simplify the retry logic. Signed-off-by: Trond Myklebust commit 550aebfe1c573518c35ae85d6ffbdc2d44c92703 Author: Trond Myklebust Date: Fri Sep 14 14:32:45 2018 -0400 SUNRPC: Allow AF_LOCAL sockets to use the generic stream receive Signed-off-by: Trond Myklebust commit c50b8ee02f1cb9506ac06d22e8414e9fef7d6890 Author: Trond Myklebust Date: Fri Sep 14 14:26:28 2018 -0400 SUNRPC: Clean up - rename xs_tcp_data_receive() to xs_stream_data_receive() In preparation for sharing with AF_LOCAL. Signed-off-by: Trond Myklebust commit 277e4ab7d530bf287e02b65cfcd3ea8f489784f6 Author: Trond Myklebust Date: Fri Sep 14 09:49:06 2018 -0400 SUNRPC: Simplify TCP receive code by switching to using iterators Most of this code should also be reusable with other socket types. Signed-off-by: Trond Myklebust commit 9d96acbc7f376dc1ffcedca0c349dd3389187a38 Author: Trond Myklebust Date: Thu Sep 13 12:22:04 2018 -0400 SUNRPC: Add a bvec array to struct xdr_buf for use with iovec_iter() Add a bvec array to struct xdr_buf, and have the client allocate it when we need to receive data into pages. Signed-off-by: Trond Myklebust commit 431f6eb3570f286036bc8718a908a283f5d99473 Author: Trond Myklebust Date: Sun Sep 16 00:08:20 2018 -0400 SUNRPC: Add a label for RPC calls that require allocation on receive If the RPC call relies on the receive call allocating pages as buffers, then let's label it so that we a) Don't leak memory by allocating pages for requests that do not expect this behaviour b) Can optimise for the common case where calls do not require allocation. Signed-off-by: Trond Myklebust commit 79c99152a374c72c8b90c27b3d46d990641951bb Author: Trond Myklebust Date: Sun Sep 9 13:53:05 2018 -0400 SUNRPC: Convert the xprt->sending queue back to an ordinary wait queue We no longer need priority semantics on the xprt->sending queue, because the order in which tasks are sent is now dictated by their position in the send queue. Note that the backlog queue remains a priority queue, meaning that slot resources are still managed in order of task priority. Signed-off-by: Trond Myklebust commit f42f7c283078ce3c1e8368b140e270755b1ae313 Author: Trond Myklebust Date: Sat Sep 8 22:09:48 2018 -0400 SUNRPC: Fix priority queue fairness Fix up the priority queue to not batch by owner, but by queue, so that we allow '1 << priority' elements to be dequeued before switching to the next priority queue. The owner field is still used to wake up requests in round robin order by owner to avoid single processes hogging the RPC layer by loading the queues. Signed-off-by: Trond Myklebust commit 95f7691daa57bbd68caac2bdad79e0b08f4d46c1 Author: Trond Myklebust Date: Fri Sep 7 08:35:22 2018 -0400 SUNRPC: Convert xprt receive queue to use an rbtree If the server is slow, we can find ourselves with quite a lot of entries on the receive queue. Converting the search from an O(n) to O(log(n)) can make a significant difference, particularly since we have to hold a number of locks while searching. Signed-off-by: Trond Myklebust commit bd79bc579ca5cd35c08ab4f660085b0744bd5cfd Author: Trond Myklebust Date: Fri Sep 7 19:38:55 2018 -0400 SUNRPC: Don't take transport->lock unnecessarily when taking XPRT_LOCK Signed-off-by: Trond Myklebust commit adfa71446dd0943ba376eff3e05c7c89582f8038 Author: Trond Myklebust Date: Mon Sep 3 23:58:59 2018 -0400 SUNRPC: Cleanup: remove the unused 'task' argument from the request_send() Signed-off-by: Trond Myklebust commit c544577daddb618c7dd5fa7fb98d6a41782f020e Author: Trond Myklebust Date: Mon Sep 3 23:39:27 2018 -0400 SUNRPC: Clean up transport write space handling Treat socket write space handling in the same way we now treat transport congestion: by denying the XPRT_LOCK until the transport signals that it has free buffer space. Signed-off-by: Trond Myklebust commit 36bd7de949f41d586ef7794169af75462b67acbc Author: Trond Myklebust Date: Mon Sep 3 18:41:32 2018 -0400 SUNRPC: Turn off throttling of RPC slots for TCP sockets The theory was that we would need to grab the socket lock anyway, so we might as well use it to gate the allocation of RPC slots for a TCP socket. Signed-off-by: Trond Myklebust commit f05d54ecf66224e2c585f969aa7b9dbe76a1ec46 Author: Trond Myklebust Date: Mon Sep 3 23:11:15 2018 -0400 SUNRPC: Allow soft RPC calls to time out when waiting for the XPRT_LOCK This no longer causes them to lose their place in the transmission queue. Signed-off-by: Trond Myklebust commit 89f90fe1ad8bc7cde7f1859abdc392d02ee952de Author: Trond Myklebust Date: Wed Aug 29 17:40:55 2018 -0400 SUNRPC: Allow calls to xprt_transmit() to drain the entire transmit queue Rather than forcing each and every RPC task to grab the socket write lock in order to send itself, we allow whichever task is holding the write lock to attempt to drain the entire transmit queue. Signed-off-by: Trond Myklebust commit 86aeee0eb6c316e75d3b5d148177d4c01b81c977 Author: Trond Myklebust Date: Sat Sep 8 14:22:41 2018 -0400 SUNRPC: Enqueue swapper tagged RPCs at the head of the transmit queue Avoid memory starvation by giving RPCs that are tagged with the RPC_TASK_SWAPPER flag the highest priority. Signed-off-by: Trond Myklebust commit 75891f502f5fc70f52a01af5b924384ed4866907 Author: Trond Myklebust Date: Mon Sep 3 17:37:36 2018 -0400 SUNRPC: Support for congestion control when queuing is enabled Both RDMA and UDP transports require the request to get a "congestion control" credit before they can be transmitted. Right now, this is done when the request locks the socket. We'd like it to happen when a request attempts to be transmitted for the first time. In order to support retransmission of requests that already hold such credits, we also want to ensure that they get queued first, so that we don't deadlock with requests that have yet to obtain a credit. Signed-off-by: Trond Myklebust commit 918f3c1fe83c5baa4892b943d3f5ac7191d8fb74 Author: Trond Myklebust Date: Sun Sep 9 11:37:22 2018 -0400 SUNRPC: Improve latency for interactive tasks One of the intentions with the priority queues was to ensure that no single process can hog the transport. The field task->tk_owner therefore identifies the RPC call's origin, and is intended to allow the RPC layer to organise queues for fairness. This commit therefore modifies the transmit queue to group requests by task->tk_owner, and ensures that we round robin among those groups. Signed-off-by: Trond Myklebust commit dcbbeda836bc748e8fecd753b83d5b345ef8ec31 Author: Trond Myklebust Date: Sat Sep 1 14:29:18 2018 -0400 SUNRPC: Move RPC retransmission stat counter to xprt_transmit() Signed-off-by: Trond Myklebust commit 5f2f6bd98736f904c803912c5578db311c09fe89 Author: Trond Myklebust Date: Sat Sep 1 14:25:24 2018 -0400 SUNRPC: Simplify xprt_prepare_transmit() Remove the checks for whether or not we need to transmit, and whether or not a reply has been received. Those are already handled in call_transmit() itself. Signed-off-by: Trond Myklebust commit 04b3b88fbfe63923ec1e9406efea7a889d148d8f Author: Trond Myklebust Date: Sat Sep 1 14:20:12 2018 -0400 SUNRPC: Don't reset the request 'bytes_sent' counter when releasing XPRT_LOCK If the request is still on the queue, this will be incorrect behaviour. Signed-off-by: Trond Myklebust commit 50f484e298218b7271fad8a23bd44c82fb3110e1 Author: Trond Myklebust Date: Thu Aug 30 13:27:29 2018 -0400 SUNRPC: Treat the task and request as separate in the xprt_ops->send_request() When we shift to using the transmit queue, then the task that holds the write lock will not necessarily be the same as the one being transmitted. Signed-off-by: Trond Myklebust commit 902c58872e1e9a2c146a55b0701c0b26cc5a4b24 Author: Trond Myklebust Date: Sat Sep 1 17:21:01 2018 -0400 SUNRPC: Fix up the back channel transmit Fix up the back channel code to recognise that it has already been transmitted, so does not need to be called again. Also ensure that we set req->rq_task. Signed-off-by: Trond Myklebust commit 762e4e67b356ab7b8fbfc39bc07dc6110121505e Author: Trond Myklebust Date: Fri Aug 24 16:28:28 2018 -0400 SUNRPC: Refactor RPC call encoding Move the call encoding so that it occurs before the transport connection etc. Signed-off-by: Trond Myklebust commit 944b042921a17d1a4e51bb05f8edf2b93d26e36f Author: Trond Myklebust Date: Thu Aug 9 23:33:21 2018 -0400 SUNRPC: Add a transmission queue for RPC requests Add the queue that will enforce the ordering of RPC task transmission. Signed-off-by: Trond Myklebust commit ef3f54347f690d06649c0d7a1f63d3410b3d08d3 Author: Trond Myklebust Date: Wed Aug 8 09:23:32 2018 -0400 SUNRPC: Distinguish between the slot allocation list and receive queue When storing a struct rpc_rqst on the slot allocation list, we currently use the same field 'rq_list' as we use to store the request on the receive queue. Since the structure is never on both lists at the same time, this is OK. However, for clarity, let's make that a union with different names for the different lists so that we can more easily distinguish between the two states. Signed-off-by: Trond Myklebust commit 78b576ced2f52f13e54955c89ab41eca9163671d Author: Trond Myklebust Date: Tue Aug 28 09:20:10 2018 -0400 SUNRPC: Minor cleanup for call_transmit() Signed-off-by: Trond Myklebust commit 7f3a1d1e1806a0eb9b200e3aed2a04431f2bcc6a Author: Trond Myklebust Date: Thu Aug 23 00:03:43 2018 -0400 SUNRPC: Refactor xprt_transmit() to remove wait for reply code Allow the caller in clnt.c to call into the code to wait for a reply after calling xprt_transmit(). Again, the reason is that the backchannel code does not need this functionality. Signed-off-by: Trond Myklebust commit edc81dcd5b7f699c4049042b35c904396642032e Author: Trond Myklebust Date: Wed Aug 22 17:55:46 2018 -0400 SUNRPC: Refactor xprt_transmit() to remove the reply queue code Separate out the action of adding a request to the reply queue so that the backchannel code can simply skip calling it altogether. Signed-off-by: Trond Myklebust commit 75c84151a9dc7a755c607e6761d8f14a1690dbf0 Author: Trond Myklebust Date: Fri Aug 31 10:21:00 2018 -0400 SUNRPC: Rename xprt->recv_lock to xprt->queue_lock We will use the same lock to protect both the transmit and receive queues. Signed-off-by: Trond Myklebust commit ec37a58fba289d53f35442ad0ef3b469412efd20 Author: Trond Myklebust Date: Wed Aug 29 09:30:19 2018 -0400 SUNRPC: Don't wake queued RPC calls multiple times in xprt_transmit Rather than waking up the entire queue of RPC messages a second time, just wake up the task that was put to sleep. Signed-off-by: Trond Myklebust commit 5ce970393bad41499d50dfaea525ac8f01cdbc30 Author: Trond Myklebust Date: Fri Sep 7 23:15:35 2018 -0400 SUNRPC: Test whether the task is queued before grabbing the queue spinlocks When asked to wake up an RPC task, it makes sense to test whether or not the task is still queued. Signed-off-by: Trond Myklebust commit 359c48c04af25397ecefec1ccf200ddd199617ce Author: Trond Myklebust Date: Wed Aug 29 09:22:28 2018 -0400 SUNRPC: Add a helper to wake up a sleeping rpc_task and set its status Add a helper that will wake up a task that is sleeping on a specific queue, and will set the value of task->tk_status. This is mainly intended for use by the transport layer to notify the task of an error condition. Signed-off-by: Trond Myklebust commit cf9946cd6144410ced00d52586ff5a2cb4868fc5 Author: Trond Myklebust Date: Mon Aug 6 12:55:34 2018 -0400 SUNRPC: Refactor the transport request pinning We are going to need to pin for both send and receive. Signed-off-by: Trond Myklebust commit 4cd34e7c2e412e3db2f6bf7371581ab60591174b Author: Trond Myklebust Date: Fri Aug 31 10:00:02 2018 -0400 SUNRPC: Simplify dealing with aborted partially transmitted messages If the previous message was only partially transmitted, we need to close the socket in order to avoid corruption of the message stream. To do so, we currently hijack the unlocking of the socket in order to schedule the close. Now that we track the message offset in the socket state, we can move that kind of checking out of the socket lock code, which is needed to allow messages to remain queued after dropping the socket lock. Signed-off-by: Trond Myklebust commit 6c7a64e5a44dbc6d073b83a56a48d0a4099f1dd2 Author: Trond Myklebust Date: Mon Aug 13 16:54:57 2018 -0400 SUNRPC: Add socket transmit queue offset tracking Signed-off-by: Trond Myklebust commit e1806c7bfb803408df4dc53dfe502ffab0f46a67 Author: Trond Myklebust Date: Mon Aug 13 16:50:49 2018 -0400 SUNRPC: Move reset of TCP state variables into the reconnect code Rather than resetting state variables in socket state_change() callback, do it in the sunrpc TCP connect function itself. Signed-off-by: Trond Myklebust commit d1109aa56c71e19fc117e75bff11384fc7279a3b Author: Trond Myklebust Date: Mon Aug 13 15:48:42 2018 -0400 SUNRPC: Rename TCP receive-specific state variables Since we will want to introduce similar TCP state variables for the transmission of requests, let's rename the existing ones to label that they are for the receive side. Signed-off-by: Trond Myklebust commit 3a03818fbee0a85196a2214f07db9e2b622e2550 Author: Trond Myklebust Date: Tue Aug 14 13:58:34 2018 -0400 SUNRPC: Avoid holding locks across the XDR encoding of the RPC message Currently, we grab the socket bit lock before we allow the message to be XDR encoded. That significantly slows down the transmission rate, since we serialise on a potentially blocking operation. Signed-off-by: Trond Myklebust commit 7ebbbc6e7bd023903daa5bd95726edf2d60b559c Author: Trond Myklebust Date: Tue Aug 28 09:00:27 2018 -0400 SUNRPC: Simplify identification of when the message send/receive is complete Add states to indicate that the message send and receive are not yet complete. Signed-off-by: Trond Myklebust commit 3021a5bbbf0aa0252f2993b84ee903a0eca0b690 Author: Trond Myklebust Date: Tue Aug 14 13:50:21 2018 -0400 SUNRPC: The transmitted message must lie in the RPCSEC window of validity If a message has been encoded using RPCSEC_GSS, the server is maintaining a window of sequence numbers that it considers valid. The client should normally be tracking that window, and needs to verify that the sequence number used by the message being transmitted still lies inside the window of validity. So far, we've been able to assume this condition would be realised automatically, since the client has been encoding the message only after taking the socket lock. Once we change that condition, we will need the explicit check. Signed-off-by: Trond Myklebust commit 9ee94d3ed6a4f75dbf0a022927021a42a24dbdf8 Author: Trond Myklebust Date: Tue Aug 28 16:27:31 2018 -0400 SUNRPC: If there is no reply expected, bail early from call_decode Signed-off-by: Trond Myklebust commit 9dc6edcf676fe188430e8b119f91280bbf285163 Author: Trond Myklebust Date: Wed Aug 22 14:24:16 2018 -0400 SUNRPC: Clean up initialisation of the struct rpc_rqst Move the initialisation back into xprt.c. Signed-off-by: Trond Myklebust commit ca02f96b95ca1a50344e7e2a7bb43fbb825aa3a2 Author: Suzuki K Poulose Date: Wed Sep 12 14:53:50 2018 +0100 ARM: dts: qcom: Update coresight bindings for hardware ports Switch to the new hardware port bindings for coresight Cc: Andy Gross Cc: David Brown Cc: Mathieu Poirier Signed-off-by: Suzuki K Poulose Signed-off-by: Andy Gross commit f0604f63033d4020f019d2aaee805c1075b1077b Author: Miguel Ojeda Date: Wed Sep 19 01:41:21 2018 +0200 Compiler Attributes: ext4: remove local __nonstring definition Commit 072ebb3bffe6 ("ext4: add nonstring annotations to ext4.h") introduced a local definition of __nonstring to suppress some false positives in gcc 8's -Wstringop-truncation. Since now we support __nonstring for everyone, remove it. Tested-by: Sedat Dilek # on top of v4.19-rc5, clang 7 Reviewed-by: Nick Desaulniers Reviewed-by: Luc Van Oostenryck Signed-off-by: Miguel Ojeda commit 98cade0a08ba339cd11d6e89b0df5d1d2fa21202 Author: Miguel Ojeda Date: Tue Aug 14 21:38:26 2018 +0200 Compiler Attributes: auxdisplay: panel: use __nonstring Let gcc know these arrays are not meant to be NUL-terminated by annotating them with the new __nonstring variable attribute; and remove the comment since it conveys the same information. Tested-by: Sedat Dilek # on top of v4.19-rc5, clang 7 Reviewed-by: Nick Desaulniers Reviewed-by: Luc Van Oostenryck Signed-off-by: Miguel Ojeda commit 23066c3f4e2146da8c7d1505729f4409f4d93d28 Author: Miguel Ojeda Date: Wed Sep 19 02:31:58 2018 +0200 Compiler Attributes: enable -Wstringop-truncation on W=1 (gcc >= 8) Commit 217c3e019675 ("disable stringop truncation warnings for now") disabled -Wstringop-truncation since it was too noisy. Having __nonstring available allows us to let GCC know that a string is not meant to be NUL-terminated, which helps suppressing some -Wstringop-truncation warnings. Note that using __nonstring actually triggers other warnings (-Wstringop-overflow, which is on by default) which may be real problems. Therefore, cleaning up -Wstringop-truncation warnings also buys us the ability to uncover further potential problems. To encourage the use of __nonstring, we put the warning back at W=1. In the future, if we end up with a fairly warning-free tree, we might want to enable it by default. Tested-by: Sedat Dilek # on top of v4.19-rc5, clang 7 Reviewed-by: Kees Cook Reviewed-by: Nick Desaulniers Reviewed-by: Luc Van Oostenryck Signed-off-by: Miguel Ojeda commit 92676236917d8e2e0de1d8612686d3d04a6a245b Author: Miguel Ojeda Date: Wed Sep 19 01:06:24 2018 +0200 Compiler Attributes: add support for __nonstring (gcc >= 8) From the GCC manual: nonstring The nonstring variable attribute specifies that an object or member declaration with type array of char, signed char, or unsigned char, or pointer to such a type is intended to store character arrays that do not necessarily contain a terminating NUL. This is useful in detecting uses of such arrays or pointers with functions that expect NUL-terminated strings, and to avoid warnings when such an array or pointer is used as an argument to a bounded string manipulation function such as strncpy. https://gcc.gnu.org/onlinedocs/gcc/Common-Variable-Attributes.html This attribute can be used for documentation purposes (i.e. replacing comments), but it is most helpful when the following warnings are enabled: -Wstringop-overflow Warn for calls to string manipulation functions such as memcpy and strcpy that are determined to overflow the destination buffer. [...] -Wstringop-truncation Warn for calls to bounded string manipulation functions such as strncat, strncpy, and stpncpy that may either truncate the copied string or leave the destination unchanged. [...] In situations where a character array is intended to store a sequence of bytes with no terminating NUL such an array may be annotated with attribute nonstring to avoid this warning. Such arrays, however, are not suitable arguments to functions that expect NUL-terminated strings. To help detect accidental misuses of such arrays GCC issues warnings unless it can prove that the use is safe. https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html Tested-by: Sedat Dilek # on top of v4.19-rc5, clang 7 Reviewed-by: Kees Cook Reviewed-by: Nick Desaulniers Reviewed-by: Luc Van Oostenryck Signed-off-by: Miguel Ojeda commit 5fc4a13b66b4643b7a564cc79c2453889c8665d7 Author: Miguel Ojeda Date: Sat Sep 8 22:53:57 2018 +0200 Compiler Attributes: add MAINTAINERS entry Tested-by: Sedat Dilek # on top of v4.19-rc5, clang 7 Reviewed-by: Nick Desaulniers Reviewed-by: Luc Van Oostenryck Signed-off-by: Miguel Ojeda commit 303d22c5fc37cebe2bd0b3c15ac3db6950db60c6 Author: Miguel Ojeda Date: Mon Sep 3 18:32:11 2018 +0200 Compiler Attributes: add Doc/process/programming-language.rst Tested-by: Sedat Dilek # on top of v4.19-rc5, clang 7 Reviewed-by: Nick Desaulniers Reviewed-by: Luc Van Oostenryck Signed-off-by: Miguel Ojeda commit e04462fb82f8dd98288c0e7ab1eec79c92537d25 Author: Miguel Ojeda Date: Mon Sep 3 19:17:50 2018 +0200 Compiler Attributes: remove uses of __attribute__ from compiler.h Suggested-by: Nick Desaulniers Tested-by: Sedat Dilek # on top of v4.19-rc5, clang 7 Reviewed-by: Nick Desaulniers Reviewed-by: Luc Van Oostenryck Signed-off-by: Miguel Ojeda commit 06e3727e02f9ee9cf571692cd5c74fc5a8a2af52 Author: Miguel Ojeda Date: Mon Sep 3 19:22:13 2018 +0200 Compiler Attributes: KENTRY used twice the "used" attribute Tested-by: Sedat Dilek # on top of v4.19-rc5, clang 7 Reviewed-by: Nick Desaulniers Reviewed-by: Luc Van Oostenryck Signed-off-by: Miguel Ojeda commit a3f8a30f3f0079c7edfc72e329eee8594fb3e3cb Author: Miguel Ojeda Date: Thu Aug 30 20:36:59 2018 +0200 Compiler Attributes: use feature checks instead of version checks Instead of using version checks per-compiler to define (or not) each attribute, use __has_attribute to test for them, following the cleanup started with commit 815f0ddb346c ("include/linux/compiler*.h: make compiler-*.h mutually exclusive"), which is supported on gcc >= 5, clang >= 2.9 and icc >= 17. In the meantime, to support 4.6 <= gcc < 5, we implement __has_attribute by hand. All the attributes that can be unconditionally defined and directly map to compiler attribute(s) (even if optional) have been moved to a new file include/linux/compiler_attributes.h In an effort to make the file as regular as possible, comments stating the purpose of attributes have been removed. Instead, links to the compiler docs have been added (i.e. to gcc and, if available, to clang as well). In addition, they have been sorted. Finally, if an attribute is optional (i.e. if it is guarded by __has_attribute), the reason has been stated for future reference. Tested-by: Sedat Dilek # on top of v4.19-rc5, clang 7 Reviewed-by: Nick Desaulniers Reviewed-by: Luc Van Oostenryck Signed-off-by: Miguel Ojeda commit 66dbeef915f275dad6c8656b31667ef9640f5639 Author: Miguel Ojeda Date: Mon Sep 3 18:34:18 2018 +0200 Compiler Attributes: add missing SPDX ID in compiler_types.h Tested-by: Sedat Dilek # on top of v4.19-rc5, clang 7 Reviewed-by: Nick Desaulniers Reviewed-by: Luc Van Oostenryck Signed-off-by: Miguel Ojeda commit 989bd5000f36052df604888ed12bb6ef390786b7 Author: Miguel Ojeda Date: Fri Aug 31 18:00:16 2018 +0200 Compiler Attributes: remove unneeded sparse (__CHECKER__) tests Sparse knows about a few more attributes now, so we can remove the __CHECKER__ conditions from them (which, in turn, allow us to move some of them later on to compiler_attributes.h). * assume_aligned: since sparse's commit ffc860b ("sparse: ignore __assume_aligned__ attribute"), included in 0.5.1 * error: since sparse's commit 0a04210 ("sparse: Add 'error' to ignored attributes"), included in 0.5.0 * hotpatch: since sparse's commit 6043210 ("sparse/parse.c: ignore hotpatch attribute"), included in 0.5.1 * warning: since sparse's commit 977365d ("Avoid "attribute 'warning': unknown attribute" warning"), included in 0.4.2 On top of that, __must_be_array does not need it either because: * Even ancient versions of sparse do not have a problem * BUILD_BUG_ON_ZERO() is currently disabled for __CHECKER__ Tested-by: Sedat Dilek # on top of v4.19-rc5, clang 7 Reviewed-by: Nick Desaulniers Reviewed-by: Luc Van Oostenryck Signed-off-by: Miguel Ojeda commit ec0bbef66f867854691d5af18c2231d746958e0e Author: Miguel Ojeda Date: Thu Aug 30 19:25:14 2018 +0200 Compiler Attributes: homogenize __must_be_array Different definitions of __must_be_array: * gcc: disabled for __CHECKER__ * clang: same definition as gcc's, but without __CHECKER__ * intel: the comment claims __builtin_types_compatible_p() is unsupported; but icc seems to support it since 13.0.1 (released in 2012). See https://godbolt.org/z/S0l6QQ Therefore, we can remove all of them and have a single definition in compiler.h Tested-by: Sedat Dilek # on top of v4.19-rc5, clang 7 Reviewed-by: Nick Desaulniers Reviewed-by: Luc Van Oostenryck Signed-off-by: Miguel Ojeda commit c2c640aa04cc4e6caf0ff17ff18b3784e0c99566 Author: Miguel Ojeda Date: Thu Aug 30 19:45:01 2018 +0200 Compiler Attributes: remove unneeded tests Attributes const and always_inline have tests around them which are unneeded, since they are supported by gcc >= 4.6, clang >= 3 and icc >= 13. https://godbolt.org/z/DFPq37 In the case of gnu_inline, we do not need to test for __GNUC_STDC_INLINE__ because, regardless of the current inlining behavior, we can simply always force the old GCC inlining behavior by using the attribute in all cases. Tested-by: Sedat Dilek # on top of v4.19-rc5, clang 7 Reviewed-by: Nick Desaulniers Reviewed-by: Luc Van Oostenryck Signed-off-by: Miguel Ojeda commit 5c67a52f3da0f0d22764f2daec417702695a8112 Author: Miguel Ojeda Date: Thu Aug 30 19:13:37 2018 +0200 Compiler Attributes: always use the extra-underscores syntax The attribute syntax optionally allows to surround attribute names with "__" in order to avoid collisions with macros of the same name (see https://gcc.gnu.org/onlinedocs/gcc/Attribute-Syntax.html). This homogenizes all attributes to use the syntax with underscores. While there are currently only a handful of cases of some TUs defining macros like "error" which may collide with the attributes, this should prevent futures surprises. This has been done only for "standard" attributes supported by the major compilers. In other words, those of third-party tools (e.g. sparse, plugins...) have not been changed for the moment. Tested-by: Sedat Dilek # on top of v4.19-rc5, clang 7 Reviewed-by: Nick Desaulniers Reviewed-by: Luc Van Oostenryck Signed-off-by: Miguel Ojeda commit 29efbc6aea9d9bd9aa9870a9afc1882046303cf9 Author: Miguel Ojeda Date: Thu Aug 30 19:07:27 2018 +0200 Compiler Attributes: remove unused attributes __optimize and __deprecate_for_modules are unused in the whole kernel tree. Simply drop them. Tested-by: Sedat Dilek # on top of v4.19-rc5, clang 7 Reviewed-by: Nick Desaulniers Reviewed-by: Luc Van Oostenryck Signed-off-by: Miguel Ojeda commit 6db0483cf622fc690e32e0804f8b86061f13962a Author: Andy Gross Date: Sun Sep 30 12:58:10 2018 -0500 Revert "dt-bindings: thermal: qcom-spmi-temp-alarm: Fix documentation of 'reg'" This reverts commit e704472616d7e185b839991b611a77711dbb22e3. Already picked up via Eduardo's thermal tree Signed-off-by: Andy Gross commit 70b224678c7caa3209836715c6fc3003e69f20e4 Author: Andy Gross Date: Sun Sep 30 12:57:07 2018 -0500 Revert "dt-bindings: iio: vadc: Fix documentation of 'reg'" This reverts commit 7028cae1857cc2c6acc69586584e92d044027154. Already picked up via iio tree. Signed-off-by: Andy Gross commit 579fde69dc1467a033ff44ced75ff368b9d3d072 Merge: bbd4b28bb8f6 bb85ce512248 Author: Andy Gross Date: Sun Sep 30 12:44:33 2018 -0500 Merge branch 'drivers-for-4.20' into drivers-for-4.20-final commit bbd4b28bb8f65fc7347202f32ac82901201ac02f Merge: 5b394b2ddf03 969fc78c37c3 Author: Andy Gross Date: Sun Sep 30 12:44:18 2018 -0500 Merge tag 'qcom-geni-immutable-for-mark-brown' into drivers-for-4.20-final Immutable branch for QCOM Geni patches commit e0c27a1066a935671a00b1764385bc8118d8022c Author: Manivannan Sadhasivam Date: Wed Apr 4 22:52:51 2018 +0530 arm64: actions: Enable PINCTRL in platforms Kconfig Select PINCTRL for Actions Semi SoCs. Signed-off-by: Manivannan Sadhasivam Reviewed-by: Linus Walleij Signed-off-by: Andreas Färber commit 677309b0e9e60336e29b90f9b655b5de4ab42d3b Author: Manivannan Sadhasivam Date: Fri Sep 21 12:06:53 2018 -0700 MAINTAINERS: Add entry for Actions Semi Owl SoCs DMA driver Add entry for Actions Semi Owl SoCs DMA driver under ARM/ACTIONS. Signed-off-by: Manivannan Sadhasivam Signed-off-by: Andreas Färber commit 0689984cff43f45af577c2f9fd0bbc514bcc2e26 Author: Manivannan Sadhasivam Date: Wed Aug 1 23:32:32 2018 +0530 MAINTAINERS: Add entry for Actions Semiconductor Owl I2C driver Add entry for Actions Semiconductor Owl I2C driver under ARM/ACTIONS. Signed-off-by: Manivannan Sadhasivam Signed-off-by: Andreas Färber commit 01463ac63b53e24e4e315aa9c5f091e9e0342ad4 Author: Saravanan Sekar Date: Thu Jul 19 11:06:49 2018 +0200 arm64: dts: actions: s700: Set UART clock references from CMU Remove fixed clock in Cubieboard 7 and use Clock Management Unit clocks for all UART nodes in Actions Semi S700 SoC. Signed-off-by: Parthiban Nallathambi Signed-off-by: Saravanan Sekar Reviewed-by: Manivannan Sadhasivam Signed-off-by: Manivannan Sadhasivam [AF: Moved/added to SoC] Signed-off-by: Andreas Färber commit 8ba92cf5933507d1af6422d7421448fbf8c9981f Author: Saravanan Sekar Date: Thu Jul 19 11:06:48 2018 +0200 arm64: dts: actions: s700: Add Clock Management Unit Add Clock Management Unit for Actions Semi S700 SoC. Signed-off-by: Parthiban Nallathambi Signed-off-by: Saravanan Sekar Reviewed-by: Manivannan Sadhasivam Signed-off-by: Manivannan Sadhasivam Signed-off-by: Andreas Färber commit c432aaa2b28fbd28d837ec142c78e744956ef71c Author: Manivannan Sadhasivam Date: Fri Sep 21 12:03:59 2018 -0700 arm64: dts: actions: s900: Add DMA Controller Add DMA controller node for Actions Semi S900 SoC. Signed-off-by: Manivannan Sadhasivam Signed-off-by: Andreas Färber commit 07b308eee06e9dacdfc2b54746613e838bef582d Author: Manivannan Sadhasivam Date: Wed Aug 1 23:32:28 2018 +0530 arm64: dts: actions: s900-bubblegum-96: Enable I2C1 and I2C2 Add pinctrl definitions for Actions Semiconductor S900 I2C controllers. Pinctrl definitions are only available for I2C0, I2C1, and I2C2. Enable I2C1 and I2C2 exposed on the low speed expansion connector in Bubblegum-96 board. Signed-off-by: Manivannan Sadhasivam [AF: Squashed] Signed-off-by: Andreas Färber commit 5eb76e8a29cdbe44999c94617d17ecdd0ffc6263 Author: Manivannan Sadhasivam Date: Wed Aug 1 23:32:29 2018 +0530 arm64: dts: actions: s900: Add I2C controller nodes Add I2C controller nodes for Actions Semiconductor S900 SoC. Signed-off-by: Manivannan Sadhasivam [AF: Squashed/added clocks, dropped pinctrl properties for now] Signed-off-by: Andreas Färber commit 29ea7bae209ebdd17873c15a381db951672d696e Author: Manivannan Sadhasivam Date: Sun May 20 10:47:34 2018 +0530 arm64: dts: actions: s900-bubblegum-96: Add gpio line names Add gpio line names to Actions Semi S900 based Bubblegum-96 board. Signed-off-by: Manivannan Sadhasivam Reviewed-by: Linus Walleij Signed-off-by: Andreas Färber commit 48d4c88471ab4db37433345506827ce44e21cb59 Author: Manivannan Sadhasivam Date: Sun May 20 10:47:33 2018 +0530 arm64: dts: actions: s900: Add gpio properties to pinctrl node Add gpio properties to pinctrl node for Actions Semi S900 SoC. Signed-off-by: Manivannan Sadhasivam Reviewed-by: Linus Walleij Signed-off-by: Andreas Färber commit a1d8219f97f3093e9abe31a7cb55b721e11956b1 Author: Manivannan Sadhasivam Date: Wed Apr 4 22:52:50 2018 +0530 arm64: dts: actions: s900: Add pinctrl node Add pinctrl nodes for Actions Semi S900 SoC. Signed-off-by: Manivannan Sadhasivam Reviewed-by: Linus Walleij Signed-off-by: Andreas Färber commit 6bd9ad12a3c91a972dbc877fbc8a212f02dec7ba Author: Manivannan Sadhasivam Date: Wed Apr 11 22:10:34 2018 +0530 arm64: dts: actions: s900: Add SPS node Add Actions Semi S900 Smart Power System (SPS) node. Signed-off-by: Manivannan Sadhasivam Signed-off-by: Andreas Färber commit 1a74d98e6c5426804539a549a597f609e3f00d30 Merge: d3105e47b519 d1ca7c56e161 Author: Andreas Färber Date: Sun Sep 30 18:44:30 2018 +0200 Merge branch 'v4.20/s900-sps-bindings' into v4.20/dt64 This adds DT bindings for the S900 SPS. Signed-off-by: Andreas Färber commit d3105e47b5192d7986b1af03874402aa2b2acd00 Author: Manivannan Sadhasivam Date: Fri Feb 9 22:54:37 2018 +0530 arm64: dts: actions: s900: Source CMU clock for UARTs Remove fixed clock in Bubblegum-96 board and source CMU (Clock Management Unit) clock for UART nodes in Actions Semi S900 SoC. Signed-off-by: Manivannan Sadhasivam [AF: Move/add clocks to SoC] Signed-off-by: Andreas Färber commit 4db4a57fe01bfb50e7fe3b810a297527f0942548 Author: Manivannan Sadhasivam Date: Tue Nov 7 01:15:51 2017 +0530 arm64: dts: actions: s900: Add Clock Management Unit nodes Add Actions Semi S900 Clock Management Unit (CMU) nodes. Signed-off-by: Manivannan Sadhasivam Signed-off-by: Andreas Färber commit 669c5d8d5f2be781d411ad8d52274038c795f257 Merge: c1a02c216044 17b57b1883c1 Author: Greg Kroah-Hartman Date: Sun Sep 30 08:11:09 2018 -0700 Merge 4.19-rc6 into tty-next We want the tty/serial fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit 29f79155b9b331167497efb0407de082d8750862 Merge: 2e32188a6614 17b57b1883c1 Author: Greg Kroah-Hartman Date: Sun Sep 30 08:09:14 2018 -0700 Merge 4.19-rc6 into usb-next We want the USB fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit 29c222d1a9f503de4d26d8de8e955be190526adf Merge: ef92ab3001c4 17b57b1883c1 Author: Greg Kroah-Hartman Date: Sun Sep 30 08:06:14 2018 -0700 Merge 4.19-rc6 We want those fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit da8c37e13d1dec58c795ca6ed81c3da064a3cbb4 Author: Manivannan Sadhasivam Date: Wed Apr 11 22:10:35 2018 +0530 soc: actions: sps: Add S900 power domains Add power domains for Actions Semi S900 SoC. Signed-off-by: Manivannan Sadhasivam [AF: Update Kconfig help text] Signed-off-by: Andreas Färber commit dba84571a3a32e6356a01bad43651f9da8e1238b Merge: 067517513ae4 d1ca7c56e161 Author: Andreas Färber Date: Sun Sep 30 16:42:04 2018 +0200 Merge branch 'v4.20/s900-sps-bindings' into v4.20/drivers+s900-sps This merges the DT binding header for S900 SPS driver. Signed-off-by: Andreas Färber commit d1ca7c56e1617ffeff71e9ba521254b8ffdeda59 Author: Manivannan Sadhasivam Date: Wed Apr 11 22:10:33 2018 +0530 dt-bindings: power: Add Actions Semi S900 SPS Define power domains for Actions Semi S900 SoC Smart Power System (SPS). Signed-off-by: Manivannan Sadhasivam Reviewed-by: Rob Herring Signed-off-by: Andreas Färber commit 5ef2f3593b6dc5aa5a0819300fbd0d7c60f9d791 Author: Manivannan Sadhasivam Date: Sat Sep 29 13:02:44 2018 +0530 MAINTAINERS: Update clock binding entry for Actions Semi Owl SoCs commit d0e45d686a3e ("dt-bindings: clock: Add S700 support for Actions Semi Soc's")' renamed the clock binding for Actions Semi Owl SoCs from actions,s900-cmu.txt to actions,owl-cmu.txt inorder to accommodate all members of Owl family SoCs. Hence, update the relevant entry in MAINTAINERS file. Signed-off-by: Manivannan Sadhasivam Signed-off-by: Andreas Färber commit 04007fe4c65f4cf3133dd256d9fd82169b7f2f22 Author: Anson Huang Date: Sun Sep 30 11:32:28 2018 +0800 ARM: dts: imx: add i.mx6ulz and i.mx6ulz 14x14 evk support i.MX6ULZ is new SoC of i.MX6 family, compared to i.MX6ULL, it removes below modules: - UART5/UART6/UART7/UART8; - PWM5/PWM6/PWM7/PWM8; - eCSPI3/eCSPI4; - CAN1/CAN2; - FEC1/FEC2; - I2C3/I2C4; - EPIT2; - LCDIF; - GPT2; - ADC1; - TSC; This patch adds support for i.MX6ULZ and i.MX6ULZ 14x14 EVK board. Signed-off-by: Anson Huang Signed-off-by: Shawn Guo commit fc37b408bf42db6d60985f83d2dbdc782eb15f83 Author: Anson Huang Date: Sun Sep 30 11:32:27 2018 +0800 dt-bindings: arm: add compatible for i.MX6ULZ 14x14 EVK board This patch adds compatible for i.MX6ULZ 14x14 EVK board. Signed-off-by: Anson Huang Signed-off-by: Shawn Guo commit c90dec00cc84942614bc41f75dc24a87b6d5763b Author: Anson Huang Date: Sun Sep 30 11:32:26 2018 +0800 ARM: imx: add i.mx6ulz msl support The i.MX 6ULZ processor is a high-performance, ultra cost-efficient consumer Linux processor featuring an advanced implementation of a single Arm® Cortex®-A7 core, which operates at speeds up to 900 MHz. This patch adds basic MSL support for i.MX6ULZ, the i.MX6ULZ has same soc_id as i.MX6ULL, and SRC_SBMR2 bit[6] is to differentiate i.MX6ULZ from i.MX6ULL, 1'b1 means i.MX6ULZ and 1'b0 means i.MX6ULL. Signed-off-by: Anson Huang Signed-off-by: Shawn Guo commit 66eede3423a9b63b2aad4c7eadd9d3e9db731ce4 Author: Fabio Estevam Date: Tue Sep 25 13:24:08 2018 -0300 ARM: dts: imx53-ppd: Remove 'num-chipselects' property The 'num-chipselects' property is not a valid property according to Documentation/devicetree/bindings/spi/fsl-imx-cspi.txt, so let's remove it. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit b6eebba6a265dfa9667f75d98989ad9c203c3b9c Author: Fabio Estevam Date: Tue Sep 25 13:08:02 2018 -0300 ARM: dts: vf610-twr: 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 89ff61948455624ac306b56e3e747a20dd6f0202 Author: Fabio Estevam Date: Tue Sep 25 13:08:01 2018 -0300 ARM: dts: vf: Switch to SPDX identifier Adopt the SPDX license identifier headers to ease license compliance management. Signed-off-by: Fabio Estevam Acked-by: Stefan Agner Signed-off-by: Shawn Guo commit 02c02bf12c5d838603eed44195d3e91f094e2ab2 Author: Matthew Wilcox Date: Fri Nov 3 23:09:45 2017 -0400 xarray: Change definition of sibling entries Instead of storing a pointer to the slot containing the canonical entry, store the offset of the slot. Produces slightly more efficient code (~300 bytes) and simplifies the implementation. Signed-off-by: Matthew Wilcox Reviewed-by: Josef Bacik commit 3159f943aafdbacb2f94c38fdaadabf2bbde2a14 Author: Matthew Wilcox Date: Fri Nov 3 13:30:42 2017 -0400 xarray: Replace exceptional entries Introduce xarray value entries and tagged pointers to replace radix tree exceptional entries. This is a slight change in encoding to allow the use of an extra bit (we can now store BITS_PER_LONG - 1 bits in a value entry). It is also a change in emphasis; exceptional entries are intimidating and different. As the comment explains, you can choose to store values or pointers in the xarray and they are both first-class citizens. Signed-off-by: Matthew Wilcox Reviewed-by: Josef Bacik commit 66ee620f06f99d72475db6eb638559ba608c7dee Author: Matthew Wilcox Date: Mon Jun 25 06:56:50 2018 -0400 idr: Permit any valid kernel pointer to be stored An upcoming change to the encoding of internal entries will set the bottom two bits to 0b10. Unfortunately, m68k only aligns some data structures to 2 bytes, so the IDR will interpret them as internal entries and things will go badly wrong. Change the radix tree so that it stops either when the node indicates that it's the bottom of the tree (shift == 0) or when the entry is not an internal entry. This means we cannot insert an arbitrary kernel pointer as a multiorder entry, but the IDR does not permit multiorder entries. Annoyingly, this means the IDR can no longer take advantage of the radix tree's ability to store a single entry at offset 0 without allocating memory. A pointer which is 2-byte aligned cannot be stored directly in the root as it would be indistinguishable from a node, so we must allocate a node in order to store a 2-byte pointer at index 0. The idr_replace() function does not take a GFP flags argument, so cannot allocate memory. If a user inserts a 4-byte aligned pointer at index 0 and then replaces it with a 2-byte aligned pointer, we must be able to store it. Arbitrary pointer values are still not permitted; pointers of the form 2 + (i * 4) for values of i between 0 and 1023 are reserved for the implementation. These are not valid kernel pointers as they would point into the zero page. This change does cause a runtime memory consumption regression for the IDA. I will recover that later. Signed-off-by: Matthew Wilcox Tested-by: Guenter Roeck commit 3d0186bb068e6cc6c23dc1d2f0b1cf64894c40ea Author: Matthew Wilcox Date: Sat Jun 16 17:32:07 2018 -0400 Update email address Redirect some older email addresses that are in the git logs. Signed-off-by: Matthew Wilcox commit 9ee3e06610fdb8a601cde59c92089fb6c1deb4aa Author: Julian Sax Date: Wed Sep 19 11:46:23 2018 +0200 HID: i2c-hid: override HID descriptors for certain devices A particular touchpad (SIPODEV SP1064) refuses to supply the HID descriptors. This patch provides the framework for overriding these descriptors based on DMI data. It also includes the descriptors for said touchpad, which were extracted by listening to the traffic of the windows filter driver, as well as the DMI data for the laptops known to use this device. Relevant Bug: https://bugzilla.redhat.com/show_bug.cgi?id=1526312 Cc: Hans de Goede Reported-and-tested-by: ahormann@gmx.net Reported-and-tested-by: Bruno Jesus Reported-and-tested-by: Dietrich Reported-and-tested-by: kloxdami@yahoo.com Signed-off-by: Julian Sax Reviewed-by: Benjamin Tissoires Signed-off-by: Jiri Kosina commit 804fe108fc92e591ddfe9447e7fb4691ed16daee Author: Yifeng Sun Date: Wed Sep 26 11:40:14 2018 -0700 openvswitch: Use correct reply values in datapath and vport ops This patch fixes the bug that all datapath and vport ops are returning wrong values (OVS_FLOW_CMD_NEW or OVS_DP_CMD_NEW) in their replies. Signed-off-by: Yifeng Sun Acked-by: Pravin B Shelar Signed-off-by: David S. Miller commit 80ece6a03aaf3f3215475826bdd2bb9f326bccfd Author: Vakul Garg Date: Wed Sep 26 16:22:08 2018 +0530 tls: Remove redundant vars from tls record structure Structure 'tls_rec' contains sg_aead_in and sg_aead_out which point to a aad_space and then chain scatterlists sg_plaintext_data, sg_encrypted_data respectively. Rather than using chained scatterlists for plaintext and encrypted data in aead_req, it is efficient to store aad_space in sg_encrypted_data and sg_plaintext_data itself in the first index and get rid of sg_aead_in, sg_aead_in and further chaining. This requires increasing size of sg_encrypted_data & sg_plaintext_data arrarys by 1 to accommodate entry for aad_space. The code which uses sg_encrypted_data and sg_plaintext_data has been modified to skip first index as it points to aad_space. Signed-off-by: Vakul Garg Signed-off-by: David S. Miller commit 6e9feb33911f59e03684941f089115b58429fe79 Merge: a337531b942b 6787927475e5 Author: David S. Miller Date: Sat Sep 29 11:24:22 2018 -0700 Merge branch 'tipc-next' Jon Maloy says: ==================== tipc: make connection setup more robust In this series we make a few improvements to the connection setup and probing mechanism, culminating in the last commit where we make it possible for a client socket to make multiple setup attempts in case it encounters receive buffer overflow at the listener socket. ==================== Signed-off-by: David S. Miller commit 6787927475e52f6933e3affce365dabb2aa2fadf Author: Tung Nguyen Date: Fri Sep 28 20:23:22 2018 +0200 tipc: buffer overflow handling in listener socket Default socket receive buffer size for a listener socket is 2Mb. For each arriving empty SYN, the linux kernel allocates a 768 bytes buffer. This means that a listener socket can serve maximum 2700 simultaneous empty connection setup requests before it hits a receive buffer overflow, and much fewer if the SYN is carrying any significant amount of data. When this happens the setup request is rejected, and the client receives an ECONNREFUSED error. This commit mitigates this problem by letting the client socket try to retransmit the SYN message multiple times when it sees it rejected with the code TIPC_ERR_OVERLOAD. Retransmission is done at random intervals in the range of [100 ms, setup_timeout / 4], as many times as there is room for within the setup timeout limit. Signed-off-by: Tung Nguyen Acked-by: Ying Xue Signed-off-by: Jon Maloy Signed-off-by: David S. Miller commit 25b9221b959483f17c2964d0922869e16caa86b5 Author: Jon Maloy Date: Fri Sep 28 20:23:21 2018 +0200 tipc: add SYN bit to connection setup messages Messages intended for intitating a connection are currently indistinguishable from regular datagram messages. The TIPC protocol specification defines bit 17 in word 0 as a SYN bit to allow sanity check of such messages in the listening socket, but this has so far never been implemented. We do that in this commit. Acked-by: Ying Xue Signed-off-by: Jon Maloy Signed-off-by: David S. Miller commit 39fdc9c71f652cdf056ec3341581bde805444b57 Author: Jon Maloy Date: Fri Sep 28 20:23:20 2018 +0200 tipc: refactor function tipc_sk_filter_connect() We refactor the function tipc_sk_filter_connect(), both to make it more readable and as a preparation for the next commit. Acked-by: Ying Xue Signed-off-by: Jon Maloy Signed-off-by: David S. Miller commit afe8792fec69c693060c0db43ed4bf05d92ce45b Author: Jon Maloy Date: Fri Sep 28 20:23:19 2018 +0200 tipc: refactor function tipc_sk_timeout() We refactor this function as a preparation for the coming commits in the same series. Acked-by: Ying Xue Signed-off-by: Jon Maloy Signed-off-by: David S. Miller commit 5cbdbd1a1f30a083aada44595ca42952fc31e866 Author: Jon Maloy Date: Fri Sep 28 20:23:18 2018 +0200 tipc: refactor function tipc_msg_reverse() The function tipc_msg_reverse() is reversing the header of a message while reusing the original buffer. We have seen at several occasions that this may have unfortunate side effects when the buffer to be reversed is a clone. In one of the following commits we will again need to reverse cloned buffers, so this is the right time to permanently eliminate this problem. In this commit we let the said function always consume the original buffer and replace it with a new one when applicable. Acked-by: Ying Xue Signed-off-by: Jon Maloy Signed-off-by: David S. Miller commit a337531b942bd8a03e7052444d7e36972aac2d92 Author: Yuchung Cheng Date: Thu Sep 27 11:21:19 2018 -0700 tcp: up initial rmem to 128KB and SYN rwin to around 64KB Previously TCP initial receive buffer is ~87KB by default and the initial receive window is ~29KB (20 MSS). This patch changes the two numbers to 128KB and ~64KB (rounding down to the multiples of MSS) respectively. The patch also simplifies the calculations s.t. the two numbers are directly controlled by sysctl tcp_rmem[1]: 1) Initial receiver buffer budget (sk_rcvbuf): while this should be configured via sysctl tcp_rmem[1], previously tcp_fixup_rcvbuf() always override and set a larger size when a new connection establishes. 2) Initial receive window in SYN: previously it is set to 20 packets if MSS <= 1460. The number 20 was based on the initial congestion window of 10: the receiver needs twice amount to avoid being limited by the receive window upon out-of-order delivery in the first window burst. But since this only applies if the receiving MSS <= 1460, connection using large MTU (e.g. to utilize receiver zero-copy) may be limited by the receive window. With this patch TCP memory configuration is more straight-forward and more properly sized to modern high-speed networks by default. Several popular stacks have been announcing 64KB rwin in SYNs as well. Signed-off-by: Yuchung Cheng Signed-off-by: Wei Wang Signed-off-by: Neal Cardwell Signed-off-by: Eric Dumazet Reviewed-by: Soheil Hassas Yeganeh Signed-off-by: David S. Miller commit 3ff6cde846857d45193b5be249e3ffd1bed4aea1 Author: David S. Miller Date: Sat Sep 29 11:21:06 2018 -0700 hns3: Another build fix. drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c: In function ‘hclge_get_sset_count’: drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c:496:31: error: ‘HNAE3_REVISION_ID_21’ undeclared (first use in this function); did you mean ‘FADT2_REVISION_ID’? if (hdev->pdev->revision >= HNAE3_REVISION_ID_21 || ^~~~~~~~~~~~~~~~~~~~ FADT2_REVISION_ID Signed-off-by: David S. Miller commit d4017665854b37c30bb3d8311257b9b302281c15 Author: David S. Miller Date: Sat Sep 29 10:49:58 2018 -0700 hns3: Fix the build. drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c: In function ‘hns3_self_test’: drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c:278:15: error: ‘HNS3_SELF_TEST_TYPE_NUM’ undeclared (first use in this function); did you mean ‘HNS3_SELF_TEST_TPYE_NUM’? int st_param[HNS3_SELF_TEST_TYPE_NUM][2]; ^~~~~~~~~~~~~~~~~~~~~~~ HNS3_SELF_TEST_TPYE_NUM Signed-off-by: David S. Miller commit 6eeb4180d4b9887b6bc8bbe0a22c1ce3634417f0 Author: Chen-Yu Tsai Date: Wed Sep 26 21:23:39 2018 +0800 ARM: dts: sunxi: h3-h5: Add Bananapi M2+ v1.2 device trees Bananapi released an updated revision of the H3/H5 based Bananapi M2+. Version 1.2 enables voltage control for the CPU's regulator by using a GPIO line to toggle a MOSFET that can change the effective resistance value in the regulator's feedback network. This patch adds a common .dtsi file for this new revision, which includes the original common sunxi-bananapi-m2-plus.dtsi file, and adds the GPIO-controlled regulator and a cpu-supply reference. H3 and H5 variant dts files are added as well. Acked-by: Maxime Ripard Signed-off-by: Chen-Yu Tsai commit 36c4bef372a114222266858b1f342f7c03fabdd7 Author: Paul Kocialkowski Date: Fri Sep 7 00:24:42 2018 +0200 ARM: dts: sun8i-h3: Add Video Engine and reserved memory nodes This adds nodes for the Video Engine and the associated reserved memory for the H3. Up to 96 MiB of memory are dedicated to the CMA pool. Signed-off-by: Paul Kocialkowski Acked-by: Maxime Ripard Signed-off-by: Maxime Ripard commit 80c21c8c8b8d0f80fe5e06e3d4c631f0ab42b693 Author: Chen-Yu Tsai Date: Thu Aug 30 16:09:26 2018 +0800 arm64: dts: allwinner: h5: Add device tree for Bananapi M2 Plus H5 The Bananapi M2 Plus H5 is a variant of the original Bananapi M2 Plus, with the H3 SoC replaced with an H5. Everything else is the same. Add a stub device tree incorporating the shared bananapi-m2-plus dtsi file. Acked-by: Maxime Ripard Signed-off-by: Chen-Yu Tsai commit aa8fee415f46a33a867e0d9da0a73ccdcdbce97a Author: Chen-Yu Tsai Date: Thu Aug 30 16:09:25 2018 +0800 ARM: dts: sun8i: h3: Split out non-SoC-specific parts of Bananapi M2 Plus Three more variants of the Bananapi M2 Plus have been introduced. One with the H5 instead of the H3, another with the H2+ instead, and the last with the H3 but with WiFi and eMMC removed. All these variants use the same board. This patch splits out the non-SoC-specific parts of the device tree, so that they can be shared among all the variants. The original Bananapi M2 Plus has been renamed to Bananapi M2 Plus H3. Acked-by: Maxime Ripard Signed-off-by: Chen-Yu Tsai commit db9fd9d13e30fc67737ac9893a82e6b095e85a64 Author: Chen-Yu Tsai Date: Thu Aug 30 16:09:24 2018 +0800 ARM: dts: sun8i: h3: bpi-m2-plus: Fix address for external RGMII Ethernet PHY The external RTL8211E RGMII Ethernet PHY is configured via external resistors to use the address 0x1. The 0x0 address is a broadcast address for this family of PHYs, and should not be used explicitly. Fixes: 8c7ba536e709 ("ARM: sun8i: bananapi-m2-plus: Enable dwmac-sun8i") Fixes: 4904337fe34f ("ARM: dts: sunxi: Restore EMAC changes (boards)") Acked-by: Maxime Ripard Signed-off-by: Chen-Yu Tsai commit 6c700289a3e84d5d3f2a95cf27732a7f7fce105b Author: Philipp Rossak Date: Wed Aug 1 11:48:01 2018 +0200 ARM: dts: sun8i: h3-h5: ir register size should be the whole memory block The size of the register should be the size of the whole memory block, not just the registers, that are needed. Signed-off-by: Philipp Rossak Acked-by: Maxime Ripard Signed-off-by: Chen-Yu Tsai commit bb39ed07e55bd56e16993e7d454f649e99c9b7f2 Author: Chen-Yu Tsai Date: Fri Aug 24 13:38:49 2018 +0800 arm64: dts: allwinner: h5: Add device node for Mali-450 GPU The H5 has a Mali-450 GPU with 4 Pixel Processor cores. Interestingly, while the datasheet lists an interrupt line for the GPU's PMU, the hardware block itself doesn't seem to have it. Reads from the PMU address range all return zero, and writes are ignored. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard commit cd3f03df13d4eb1e727fab4a8a20d43eb392c34f Author: Diego Rondini Date: Fri Aug 3 09:56:25 2018 +0200 ARM: dts: sun8i: Add initial Orangepi Zero Plus 2 H3 support Orangepi Zero Plus 2 is an open-source single-board computer, available in two Allwinner SOC variants, H3 and H5. We add support for H3 variant here, as the H5 is already supported by sun50i-h5-orangepi-zero-plus2.dts. H3 Orangepi Zero Plus 2 has: - Quad-core Cortex-A7 - 512MB DDR3 - microSD slot and 8GB eMMC - Debug TTL UART - HDMI - Wifi + BT - OTG + power supply Signed-off-by: Diego Rondini Signed-off-by: Maxime Ripard commit ea2698597e13e2d812929d3ba33946e78a8db4d1 Author: Emmanuel Vadot Date: Fri Jul 27 13:52:04 2018 +0200 nvmem: sunxi-sid: add support for H5's SID controller The H5 SoC have a SID controller that looks like the one in A64, the cells are in the same offset but doesn't contain the same data (thermal sensor calibration for example). Add a binding for it. Signed-off-by: Emmanuel Vadot Signed-off-by: Maxime Ripard commit e2c3860ba27d21f991bf9b81d64589f7c9e087c1 Author: Hans de Goede Date: Sat Sep 29 14:18:25 2018 +0200 staging: vboxvideo: Use more drm_fb_helper functions Store fbhelper and afb struct directly in vbox_private and use drm_fb_helper_fbdev_setup to replace vbox_fbdev_init, note we cannot use drm_fb_helper_fbdev_teardown since we use a private framebuffer for the fbdev. And replace vbox_driver_lastclose with drm_fb_helper_lastclose. Signed-off-by: Hans de Goede Signed-off-by: Greg Kroah-Hartman commit 0c762dda8c7b5834788794d0f81bf4faf73d2be9 Author: Hans de Goede Date: Sat Sep 29 14:18:24 2018 +0200 staging: vboxvideo: Drop unnecessary drm_connector_helper_funcs callbacks vbox_mode_valid always returns MODE_OK, which is also the default if no mode_valid callback is defined. vbox_best_single_encoder chains to drm_encoder_find, the drm-core will call drm_encoder_find itself if there is no best_encoder call back. Signed-off-by: Hans de Goede Signed-off-by: Greg Kroah-Hartman commit b8384ea3be88037e267becc24930420760c6bf04 Author: Hans de Goede Date: Sat Sep 29 14:18:23 2018 +0200 staging: vboxvideo: Call drm_atomic_helper_check_plane_state from atomic_check Extend our planes atomic_check callbacks to be more thorough by calling the drm_atomic_helper_check_plane_state helper. Signed-off-by: Hans de Goede Signed-off-by: Greg Kroah-Hartman commit 33f48cc1f11c29e2337c280d6e61688465c64976 Author: Hans de Goede Date: Sat Sep 29 14:18:22 2018 +0200 staging: vboxvideo: Replace crtc_helper enable/disable functions Replace vbox_crtc_commit and vbox_crtc_disable with vbox_crtc_atomic_[en|dis]able which are the preferred callbacks for these for atomic drivers. Signed-off-by: Hans de Goede Signed-off-by: Greg Kroah-Hartman commit 04ed7ed769f9b4476414ccf700a668a38e2a2454 Author: Hans de Goede Date: Sat Sep 29 14:18:21 2018 +0200 staging: vboxvideo: Fix DPMS support after atomic conversion Atomic modesetting does not use the traditional dpms call backs, instead we should check crtc_state->active. Signed-off-by: Hans de Goede Signed-off-by: Greg Kroah-Hartman commit 5cf5332d529bf7fd1f66378bb9611387c3e02b05 Author: Hans de Goede Date: Sat Sep 29 14:18:20 2018 +0200 staging: vboxvideo: Restore page-flip support Restore page-flip support now that the atomic conversion is complete. Since the mode parameter to vbox_crtc_set_base_and_mode() now never is NULL call drm_atomic_crtc_needs_modeset() to check if we need to check for input-mapping changes, to avoid doing unnecesarry work on a flip. And hookup the drm_atomic_helper_page_flip helper to implement the page_flip callback. Signed-off-by: Hans de Goede Signed-off-by: Greg Kroah-Hartman commit 438340aa20975ffd37a685aa99c610b63f49a7ba Author: Hans de Goede Date: Sat Sep 29 14:18:19 2018 +0200 staging: vboxvideo: Atomic phase 3: Switch last bits over to atomic Now that the state objects are wired up, we can: 1) Move to the final atomic handlers 2) Wire up atomic set_config helper 3) Switch to drm_mode_config_helper_suspend/resume for suspend/resume 4) Enable atomic modesetting ioctl This is all done in one commit because doing this piecemeal leads to an intermediate state which triggers WARN_ONs in the atomic code because e.g. plane->fb is still being set. Signed-off-by: Hans de Goede Signed-off-by: Greg Kroah-Hartman commit 32f2ed7ea7fc7b33c9ff13c3bbbfe1723ffc6462 Author: Hans de Goede Date: Sat Sep 29 14:18:18 2018 +0200 staging: vboxvideo: Atomic phase 2: Stop using plane->fb and crtc->* Once we are fully atomic plane->fb will always be NULL and we also should not access things like crtc->enabled and crt->[hw]mode. Now that we've wired up the state object handlers, we always have a plane_state and crtc_state so change the code referencing plane->fb and crtc->* to use the data from the plane_state and crt_state instead. Signed-off-by: Hans de Goede Signed-off-by: Greg Kroah-Hartman commit 67e2f0c80d8597f7a6f4322ede77432ad93ceb68 Author: Hans de Goede Date: Sat Sep 29 14:18:17 2018 +0200 staging: vboxvideo: Atomic phase 2: Wire up state object handlers Wire up state object handlers for the crtc-s and the planes, call drm_mode_config_reset() after creating all the crtc-s and encoders and remove the legacy drm_helper_disable_unused_functions() call. Signed-off-by: Hans de Goede Signed-off-by: Greg Kroah-Hartman commit cc0ec5eb721f148143f72214dd290feda51ca7fb Author: Hans de Goede Date: Sat Sep 29 14:18:16 2018 +0200 staging: vboxvideo: Atomic phase 1: Use drm_plane_helpers for primary plane Use drm_plane_helpers for the primary plane and replace our custom mode_set callback with drm_helper_crtc_mode_set. Signed-off-by: Hans de Goede Signed-off-by: Greg Kroah-Hartman commit 35f3288c453e25201a5de4d4b3dfb0fb37025de1 Author: Hans de Goede Date: Sat Sep 29 14:18:15 2018 +0200 staging: vboxvideo: Atomic phase 1: convert cursor to universal plane In preparation for atomic conversion, let's use the transitional atomic helpers drm_plane_helper_update/disable. Signed-off-by: Hans de Goede Signed-off-by: Greg Kroah-Hartman commit e2f958d00b0ce84ba2f1a9c595f63056dd737dc6 Author: Hans de Goede Date: Sat Sep 29 14:18:14 2018 +0200 staging: vboxvideo: Cache mode width, height and crtc panning in vbox_crtc When setting a mode we not only pass the mode to the hypervisor, but also information on how to map / translate input coordinates for the emulated USB tablet. This input-mapping may change when the mode on *another* crtc changes. This means that sometimes we must do a modeset on other crtc-s then the one being changed to update the input-mapping. Including crtc-s which may be disabled inside the guest (shown as a black window on the host unless closed by the user). With atomic modesetting the mode-info of disabled crtcs gets zeroed yet we need it when updating the input-map to avoid resizing the window as a side effect of a mode_set on another crtc. This commit adds caching of the mode info into out private vbox_crtc struct so that we always have the info at hand when we need it. Signed-off-by: Hans de Goede Signed-off-by: Greg Kroah-Hartman commit 2fab6e754212a632d7a2124360ba31f46948f091 Author: Hans de Goede Date: Sat Sep 29 14:18:13 2018 +0200 staging: vboxvideo: Temporarily remove page_flip support drm_mode_page_flip_ioctl() cannot deal with the in between phase of the transitioning to atomic modeset support. Once we start using drm_helper_crtc_mode_set(), we start setting plane->state on the primary plane. But we are not fully atomic yet so then set both plane-state->fb and plane->fb. If both plane-state->fb and plane->fb are set drm_mode_page_flip_ioctl() gets confused and stops calling drm_framebuffer_get() on the new fb while still calling drm_framebuffer_put() on the old fb. The current page_flip implementation expects drm_mode_page_flip_ioctl() to take care of both and once we switch to drm_atomic_helper_page_flip() that will expect neither to be done, taking care of both itself. So for the transition we need to remove page_flip support and then after the transition is complete and we set DRIVER_ATOMIC in our driver_features, we can start using drm_atomic_helper_page_flip(). Signed-off-by: Hans de Goede Signed-off-by: Greg Kroah-Hartman commit 880f72829f94bc542be6bf94ec2fd0e95b7edca7 Author: Hans de Goede Date: Sat Sep 29 14:18:12 2018 +0200 staging: vboxvideo: Remove empty encoder_helper_funcs All the encoder_helper_funcs are optional, and even setting the drm_encoder_helper_funcs vtable itself is optional and may be left out when not using any of the helper funcs, so lets drop all of this. Signed-off-by: Hans de Goede Signed-off-by: Greg Kroah-Hartman commit 8568209b5445b3cc2220b3ebbcf089e9207c1745 Author: Hans de Goede Date: Sat Sep 29 14:18:11 2018 +0200 staging: vboxvideo: Cleanup vbox_set_up_input_mapping() This cleanups 2 things: 1) The first time we loop over the crtc-s, to compare framebuffers, fb1 may get set to NULL by the fb1 = CRTC_FB(crtci); statement and then we call to_vbox_framebuffer() on it. The result of this call is only used for an address comparison, so we don't end up dereferencing the bad pointer, but still it is better to not do this. 2) Since we already figure out the first crtc with a fb in the first loop and store that in fb1, there is no need to loop over the crtc-s again just to find the first crtc with a fb again. Signed-off-by: Hans de Goede Signed-off-by: Greg Kroah-Hartman commit 8911a43bc198877fad9f4b0246a866b26bb547ab Author: Lars-Peter Clausen Date: Fri Sep 28 11:23:40 2018 +0200 iio: ad5064: Fix regulator handling The correct way to handle errors returned by regualtor_get() and friends is to propagate the error since that means that an regulator was specified, but something went wrong when requesting it. For handling optional regulators, e.g. when the device has an internal vref, regulator_get_optional() should be used to avoid getting the dummy regulator that the regulator core otherwise provides. Signed-off-by: Lars-Peter Clausen Cc: Signed-off-by: Jonathan Cameron commit 827df0571fb32d308f26c34641c1a88ba500d28e Author: Martin Blumenstingl Date: Tue Sep 25 00:13:26 2018 +0200 iio: adc: meson-saradc: use the address attribute from iio_chan_spec Until now the "channel" number is identical to how the channel is identified inside the (FIFO) registers. In our case we have eight channels and the hardware also has eight inputs. However, there are two special inputs: - channel 6 can select between the SAR_ADC_CH6 pad and the chip's internal temperature sensor - channel 7 can select between SAR_ADC_CH7 and VSS, VDD / 4, VDD / 2, VDD * 3 / 4 and VDD. When programming the registers to read for example the temperature sensor we have to select FIFO channel 6, set the correct bit which muxes channel 6 to the temperature sensor and then start the ADC measurement for channel 6 as usual. When we add support for the temperature sensor the driver has to know about that it has to use FIFO channel 6 to measure using the chip's internal temperature sensor. However, in that case the iio_chan_spec channel will not be 6 because this is already used for the SAR_ADC_CH6 pad input. Thus we use iio_chan_spec's address field to store the FIFO channel number for each channel. Signed-off-by: Martin Blumenstingl Signed-off-by: Jonathan Cameron commit bdd4b07ffa5e5d2d577952a559a87498e7bac0da Author: Martin Blumenstingl Date: Tue Sep 25 00:13:25 2018 +0200 iio: adc: meson-saradc: do not use meson_sar_adc_iio_channels directly In the future we may support two different channel sets: - one which includes the voltage pads and the temperature sensor output (for Meson8, Meson8b and Meson8m2) - one which only includes the voltage pads (GXBB, GXL, GXM and AXG) Channel 7 has a special function on all of these platforms. However, since we will have different channel array definitions we want our code to always use whatever channels struct iio_dev uses. No functional changes for now. This is the preparation for adding temperature sensor support to this driver. Signed-off-by: Martin Blumenstingl Signed-off-by: Jonathan Cameron commit aea835f2dc8a682942b859179c49ad1841a6c8b9 Author: Eugen Hristev Date: Mon Sep 24 10:51:44 2018 +0300 iio: adc: at91: fix wrong channel number in triggered buffer mode When channels are registered, the hardware channel number is not the actual iio channel number. This is because the driver is probed with a certain number of accessible channels. Some pins are routed and some not, depending on the description of the board in the DT. Because of that, channels 0,1,2,3 can correspond to hardware channels 2,3,4,5 for example. In the buffered triggered case, we need to do the translation accordingly. Fixed the channel number to stop reading the wrong channel. Fixes: 0e589d5fb ("ARM: AT91: IIO: Add AT91 ADC driver.") Cc: Maxime Ripard Signed-off-by: Eugen Hristev Acked-by: Ludovic Desroches Cc: Signed-off-by: Jonathan Cameron commit bc1b45326223e7e890053cf6266357adfa61942d Author: Eugen Hristev Date: Mon Sep 24 10:51:43 2018 +0300 iio: adc: at91: fix acking DRDY irq on simple conversions When doing simple conversions, the driver did not acknowledge the DRDY irq. If this irq status is not acked, it will be left pending, and as soon as a trigger is enabled, the irq handler will be called, it doesn't know why this status has occurred because no channel is pending, and then it will go int a irq loop and board will hang. To avoid this situation, read the LCDR after a raw conversion is done. Fixes: 0e589d5fb ("ARM: AT91: IIO: Add AT91 ADC driver.") Cc: Maxime Ripard Signed-off-by: Eugen Hristev Acked-by: Ludovic Desroches Cc: Signed-off-by: Jonathan Cameron commit 057e5a1109faa01091a989c224833e2df6003b2e Author: Martin Blumenstingl Date: Sun Sep 23 00:21:02 2018 +0200 iio: adc: meson-saradc: simplify access to meson_sar_adc_param Commit 053ffe3c8cfe31 ("iio: adc: meson-saradc: squash and share the common adc platform data") put all the data which is needed at runtime from struct meson_sar_adc_data to a new struct meson_sar_adc_param so we can re-use the platform specific configuration without having to duplicate everything just to change the name. The only place where struct meson_sar_adc_data is now needed is the _probe function which has to pass the name to the iio_dev. All other functions only need access to struct meson_sar_adc_param. This means we can simplify struct meson_sar_adc_priv. The goal of this patch is to make the code a bit easier to read since this removes one level of nesting. No functional changes intended. Signed-off-by: Martin Blumenstingl Signed-off-by: Jonathan Cameron commit 234c64a290cb6ec79a2b1ac289a1713dc9f7890e Author: Martin Blumenstingl Date: Sun Sep 23 00:21:01 2018 +0200 iio: adc: meson-saradc: use of_device_get_match_data This simplifies our _probe function by using of_device_get_match_data instead of open-coding it. No functional changes. Signed-off-by: Martin Blumenstingl Signed-off-by: Jonathan Cameron commit 3d9bf07a72f9257f081be7d4381cb70cf0d9426e Author: Martin Blumenstingl Date: Sun Sep 23 00:21:00 2018 +0200 iio: adc: meson-saradc: remove #define MESON_SAR_ADC_DELTA_10_TS_C_SHIFT This define is of no use because the driver is avoiding shifting bits by itself but using FIELD_GET/FIELD_PREP (which are using bit masks) instead. There is already a MESON_SAR_ADC_DELTA_10_TS_C_MASK bit mask so MESON_SAR_ADC_DELTA_10_TS_C_SHIFT was redundant. Signed-off-by: Martin Blumenstingl Signed-off-by: Jonathan Cameron commit 5851b499de048c9e0ee1ef2e3fbd8d3d89cbdf18 Author: ryang Date: Sat Sep 22 16:57:54 2018 -0400 iio: light: bh1750: Add device tree support Add device tree support for ROHM BH1750 series ambient light sensors. Signed-off-by: ryang Signed-off-by: Jonathan Cameron commit 1e35455c43c528eb79fdee954525738b17811120 Author: ryang Date: Sat Sep 22 16:57:53 2018 -0400 dt-bindings: iio: light: bh1750: Add device tree binding documentation Document device tree bindings for ROHM BH1750 ambient light sensor driver. Signed-off-by: ryang Reviewed-by: Rob Herring Signed-off-by: Jonathan Cameron commit 432de7fd7630c84ad24f1c2acd1e3bb4ce3741ca Author: Tony Luck Date: Fri Sep 28 14:39:34 2018 -0700 EDAC, {i7core,sb,skx}_edac: Fix uncorrected error counting The count of errors is picked up from bits 52:38 of the machine check bank status register. But this is the count of *corrected* errors. If an uncorrected error is being logged, the h/w sets this field to 0. Which means that when edac_mc_handle_error() is called, the EDAC core will carefully add zero to the appropriate uncorrected error counts. Signed-off-by: Tony Luck [ Massage commit message. ] Signed-off-by: Borislav Petkov Cc: stable@vger.kernel.org Cc: Aristeu Rozanski Cc: Mauro Carvalho Chehab Cc: Qiuxu Zhuo Cc: linux-edac Link: http://lkml.kernel.org/r/20180928213934.19890-1-tony.luck@intel.com commit 9f0a0a381c5db56e7922dbeea6831f27db58372f Author: Houlong Wei Date: Tue Aug 21 18:22:44 2018 +0800 mailbox: mediatek: Add check for possible failure of kzalloc The patch 623a6143a845("mailbox: mediatek: Add Mediatek CMDQ driver") introduce the following static checker warning: drivers/mailbox/mtk-cmdq-mailbox.c:366 cmdq_mbox_send_data() error: potential null dereference 'task'. (kzalloc returns null) Fixes: 623a6143a845 ("mailbox: mediatek: Add Mediatek CMDQ driver") Reported-by: Dan Carpenter Signed-off-by: Houlong Wei Reviewed-by: Philipp Zabel Signed-off-by: Jassi Brar commit 462f668e5c87e653a04de08e1de9a9ea86000164 Author: Colin Ian King Date: Mon Sep 24 17:42:48 2018 +0100 mailbox: bcm-flexrm-mailbox: fix spelling mistake "toogle" -> "toggle" Trivial fix to spelling mistake in function name flexrm_flip_header_toogle, rename it to flexrm_flip_header_toggle. Signed-off-by: Colin Ian King Signed-off-by: Jassi Brar commit 0a01fa940e7c1291476a65caecfbebf7beec1256 Author: Bjorn Andersson Date: Wed Sep 19 18:44:08 2018 -0700 mailbox: qcom: Add QCS404 APPS Global compatible Add support for the QCS404 APPS Global block with IPC register at offset 8. Signed-off-by: Bjorn Andersson Reviewed-by: Vinod Koul Reviewed-by: Rob Herring Signed-off-by: Jassi Brar commit cfc0f7a8ea807bf318a1aa755a6a03d469e02725 Author: Nishanth Menon Date: Mon Aug 27 19:53:11 2018 -0500 drivers: mailbox: Make ti-msgmr driver depend on ARCH_K3 ti-msgmr driver can support K3 platforms as well. Signed-off-by: Nishanth Menon Signed-off-by: Jassi Brar commit 94927676c741fe70d5270c92affdbc0cd4753fd3 Author: Rob Herring Date: Mon Aug 27 20:52:28 2018 -0500 mailbox: 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: Rob Herring Signed-off-by: Jassi Brar commit 89d13c38501df730cbb2e02c4499da1b5187119d Author: Jaegeuk Kim Date: Thu Sep 27 22:15:31 2018 -0700 f2fs: fix missing up_read This patch fixes missing up_read call. Fixes: c9b60788fc76 ("f2fs: fix to do sanity check with block address in main area") Cc: # 4.19+ Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit d2587800598c119664b22fef55ffa51aeb1da802 Author: George G. Davis Date: Fri Sep 28 17:19:34 2018 -0700 Input: atmel_mxt_ts - fix multiple includes Both v4.16-rc7 commit 93afb1d6e72a ("Input: atmel_mxt_ts - switch from OF to generic device properties") and v4.16-rc7 commit 96a938aa214e ("Input: atmel_mxt_ts - remove platform data support") added includes of "". Remove one of the duplicate includes to fix this. Signed-off-by: George G. Davis Signed-off-by: Dmitry Torokhov commit b297b728138bbd8a844513bc226ec995c553bdb2 Author: Rob Herring Date: Fri Sep 28 16:58:13 2018 -0700 Input: sun4i-lradc - 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: Rob Herring Signed-off-by: Dmitry Torokhov commit 3d337848ecc7f1cb23ab6e851af86b907db06bfa Author: Brian Masney Date: Fri Sep 28 17:12:55 2018 -0700 Input: pwm-vibrator - correct pwms in DT binding example In the example for the pwm-vibrator bindings, pwm8 is the direction pin, and pwm9 is the enable pin. The pwms on the vibrator node has these two values swapped so this patch corrects it. Signed-off-by: Brian Masney Reviewed-by: Sebastian Reichel Signed-off-by: Dmitry Torokhov commit 9e288cefcc551c7b5b04f8abc7099d3451a70f5f Author: Kuninori Morimoto Date: Tue Sep 25 09:34:05 2018 +0200 clk: renesas: Convert to SPDX identifiers This patch updates license to use SPDX-License-Identifier instead of verbose license text. Signed-off-by: Kuninori Morimoto [rebased against clk-spdx] Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman Signed-off-by: Stephen Boyd commit f949078302594b2f68aa8b4f94dae540d9b66d2c Author: Tony Lindgren Date: Fri Sep 28 15:21:50 2018 -0700 bus: ti-sysc: Make some warnings debug only We're currently warning about busy children on suspend in sysc_child_suspend_noirq() but the legacy code omap_device does not do that. Let's just make it dev_dbg() instead of dev_warn(). Signed-off-by: Tony Lindgren commit c6eb4af39fcfd8adbe3ed9d7ee39be17a4b9a611 Author: Tony Lindgren Date: Thu Sep 27 13:34:27 2018 -0700 bus: ti-sysc: Detect devices for debug on dra7 We want to see the names of detected devices when DEBUG is enabled. Signed-off-by: Tony Lindgren commit 3a3d802b025fc2f6d8079d77026e64c6f760ab31 Author: Tony Lindgren Date: Thu Sep 27 13:33:58 2018 -0700 bus: ti-sysc: Detect timer and gpio on dra7 We need to detect timer and gpio on dra7 because of the SYSC_QUIRK_LEGACY_IDLE flag for suspend and resume. Signed-off-by: Tony Lindgren commit 472c54f0192eee3c743340826ee42d7cc54ab6f9 Merge: 23731eac9848 4f3530f4a41d Author: Tony Lindgren Date: Fri Sep 28 15:27:21 2018 -0700 Merge commit '4f3530f4a41d49c41015020cd9a5ed5c95b5d2db' into omap-for-v4.20/ti-sysc commit c071cc428376f1ee9d3df7c6543c6055bd481ff9 Author: Rob Herring Date: Mon Aug 27 19:53:48 2018 -0500 devfreq: 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: Chanwoo Choi Acked-by: MyungJoo Ham Cc: Kyungmin Park Cc: Kukjin Kim Cc: Krzysztof Kozlowski Cc: linux-pm@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-samsung-soc@vger.kernel.org Signed-off-by: Rob Herring commit c655f7ea4d881a607001de44bd6d7f5a2842b305 Author: Rob Herring Date: Mon Aug 27 19:51:50 2018 -0500 bus: mvebu-mbus: 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: Rob Herring commit 6b825b17f47888ed790afe7d8a00a98dd3667f96 Author: Rob Herring Date: Mon Aug 27 19:51:18 2018 -0500 bus: fsl-mc: 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: Stuart Yoder Cc: Laurentiu Tudor Signed-off-by: Rob Herring commit da2ef6663b24d65290cd22a69fdcd3f48106ffbb Author: Rob Herring Date: Mon Aug 27 19:50:26 2018 -0500 xtensa: 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: Chris Zankel Cc: linux-xtensa@linux-xtensa.org Acked-by: Max Filippov Signed-off-by: Rob Herring commit 5dc4dca48305be61120be42214171acf486413d5 Author: Rob Herring Date: Mon Aug 27 19:49:49 2018 -0500 nios2: 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: Ley Foon Tan Cc: nios2-dev@lists.rocketboards.org Acked-by: Ley Foon Tan Signed-off-by: Rob Herring commit 3c2ac5b3ebcd387f5399c7888fae7279a65c606a Author: Leilk Liu Date: Fri Sep 28 18:53:05 2018 +0800 arm64: dts: Add spi slave dts This patch adds MT2712 spi slave into device tree. Signed-off-by: Leilk Liu Signed-off-by: Matthias Brugger commit 389d0a8a7af8ff8bb6301382333c7e8f748d7cd6 Merge: da08d8cb8cfc 4c29e5934f6c Author: Rob Herring Date: Fri Sep 28 15:48:39 2018 -0500 Merge branch 'dt/cpu-type-rework' into dt/next commit dd45407c0b2445bc2aa0ecfea744d5af3a146577 Author: Reinette Chatre Date: Thu Sep 20 12:02:11 2018 -0700 x86/intel_rdt: Use perf infrastructure for measurements The success of a cache pseudo-locked region is measured using performance monitoring events that are programmed directly at the time the user requests a measurement. Modifying the performance event registers directly is not appropriate since it circumvents the in-kernel perf infrastructure that exists to manage these resources and provide resource arbitration to the performance monitoring hardware. The cache pseudo-locking measurements are modified to use the in-kernel perf infrastructure. Performance events are created and validated with the appropriate perf API. The performance counters are still read as directly as possible to avoid the additional cache hits. This is done safely by first ensuring with the perf API that the counters have been programmed correctly and only accessing the counters in an interrupt disabled section where they are not able to be moved. As part of the transition to the in-kernel perf infrastructure the L2 and L3 measurements are split into two separate measurements that can be triggered independently. This separation prevents additional cache misses incurred during the extra testing code used to decide if a L2 and/or L3 measurement should be made. Signed-off-by: Reinette Chatre Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Cc: fenghua.yu@intel.com Cc: tony.luck@intel.com Cc: peterz@infradead.org Cc: acme@kernel.org Cc: gavin.hindman@intel.com Cc: jithu.joseph@intel.com Cc: dave.hansen@intel.com Cc: hpa@zytor.com Link: https://lkml.kernel.org/r/fc24e728b446404f42c78573c506e98cd0599873.1537468643.git.reinette.chatre@intel.com commit 0a701c9dd5351cbaef1677a0c8d37950e158cd55 Author: Reinette Chatre Date: Wed Sep 19 10:29:09 2018 -0700 x86/intel_rdt: Create required perf event attributes A perf event has many attributes that are maintained in a separate structure that should be provided when a new perf_event is created. In preparation for the transition to perf_events the required attribute structures are created for all the events that may be used in the measurements. Most attributes for all the events are identical. The actual configuration, what specifies what needs to be measured, is what will be different between the events used. This configuration needs to be done with X86_CONFIG that cannot be used as part of the designated initializers used here, this will be introduced later. Although they do look identical at this time the attribute structures needs to be maintained separately since a perf_event will maintain a pointer to its unique attributes. In support of patch testing the new structs are given the unused attribute until their use in later patches. Signed-off-by: Reinette Chatre Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Cc: fenghua.yu@intel.com Cc: tony.luck@intel.com Cc: acme@kernel.org Cc: gavin.hindman@intel.com Cc: jithu.joseph@intel.com Cc: dave.hansen@intel.com Cc: hpa@zytor.com Link: https://lkml.kernel.org/r/1822f6164e221a497648d108913d056ab675d5d0.1537377064.git.reinette.chatre@intel.com commit b5e4274ef7f00a03ce8d728701409a6e2c99146b Author: Reinette Chatre Date: Wed Sep 19 10:29:08 2018 -0700 x86/intel_rdt: Remove local register variables Local register variables were used in an effort to improve the accuracy of the measurement of cache residency of a pseudo-locked region. This was done to ensure that only the cache residency of the memory is measured and not the cache residency of the variables used to perform the measurement. While local register variables do accomplish the goal they do require significant care since different architectures have different registers available. Local register variables also cannot be used with valuable developer tools like KASAN. Significant testing has shown that similar accuracy in measurement results can be obtained by replacing local register variables with regular local variables. Make use of local variables in the critical code but do so with READ_ONCE() to prevent the compiler from merging or refetching reads. Ensure these variables are initialized before the measurement starts, and ensure it is only the local variables that are accessed during the measurement. With the removal of the local register variables and using READ_ONCE() there is no longer a motivation for using a direct wrmsr call (that avoids the additional tracing code that may clobber the local register variables). Signed-off-by: Reinette Chatre Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Cc: fenghua.yu@intel.com Cc: tony.luck@intel.com Cc: acme@kernel.org Cc: gavin.hindman@intel.com Cc: jithu.joseph@intel.com Cc: dave.hansen@intel.com Cc: hpa@zytor.com Link: https://lkml.kernel.org/r/f430f57347414e0691765d92b144758ab93d8407.1537377064.git.reinette.chatre@intel.com commit 1182a49529edde899be4b4f0e1ab76e626976eb6 Author: Reinette Chatre Date: Wed Sep 19 10:29:07 2018 -0700 perf/x86: Add helper to obtain performance counter index perf_event_read_local() is the safest way to obtain measurements associated with performance events. In some cases the overhead introduced by perf_event_read_local() affects the measurements and the use of rdpmcl() is needed. rdpmcl() requires the index of the performance counter used so a helper is introduced to determine the index used by a provided performance event. The index used by a performance event may change when interrupts are enabled. A check is added to ensure that the index is only accessed with interrupts disabled. Even with this check the use of this counter needs to be done with care to ensure it is queried and used within the same disabled interrupts section. This change introduces a new checkpatch warning: CHECK: extern prototypes should be avoided in .h files +extern int x86_perf_rdpmc_index(struct perf_event *event); This warning was discussed and designated as a false positive in http://lkml.kernel.org/r/20180919091759.GZ24124@hirez.programming.kicks-ass.net Suggested-by: Peter Zijlstra Signed-off-by: Reinette Chatre Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Cc: fenghua.yu@intel.com Cc: tony.luck@intel.com Cc: acme@kernel.org Cc: gavin.hindman@intel.com Cc: jithu.joseph@intel.com Cc: dave.hansen@intel.com Cc: hpa@zytor.com Link: https://lkml.kernel.org/r/b277ffa78a51254f5414f7b1bc1923826874566e.1537377064.git.reinette.chatre@intel.com commit 5f681f41fe1714e9961dcba2e98adea2a0daf9c5 Author: Tony Lindgren Date: Fri Sep 28 13:32:01 2018 -0700 ARM: dts: am335x: Replace remaining legacy phy_id with phy-handle Looks like we still have two instances of phy_handle that did not get update by Grygorii's series. Let's replace these too with standard phy-handle. Cc: Arnd Bergmann Cc: Neeraj Dantu Reported-by: Arnd Bergmann Reviewed-by: Grygorii Strashko Acked-by: Koen Kooi Signed-off-by: Tony Lindgren commit 7f4ddf50c92b6a1d8f25a2a610c3a75785f77a1e Author: SZ Lin (林上智) Date: Fri Sep 28 18:47:52 2018 +0800 ARM: dts: am335x: add support for Moxa UC-2101 open platform Add support for Moxa UC-2101 open platform The UC-2101 computing platform is designed for industrial embedded data acquisition and processing applications. The features of UC-2101 are: * eMMC * SPI flash * 1x LAN * 1x RS-232/422/485 ports, software-selectable * EEPROM * TPM 2.0 * Watchdog * RTC * User gpio-keys * User LEDs * User button Signed-off-by: Wes Huang (黃淵河) Signed-off-by: Fero JD Zhou (周俊達) Signed-off-by: SZ Lin (林上智) Signed-off-by: Tony Lindgren commit 30fd611af55c476b1a1c96ce87cde25206146ba4 Author: SZ Lin (林上智) Date: Fri Sep 28 18:47:16 2018 +0800 ARM: dts: am335x: add common file for UC-2100 series The UC-2100 series consists many boards with different peripheral devices and wireless modules, hence we fetch common items and create a common dtsi file to increase reusability. All boards in UC-2100 series will include this common dtsi file. Signed-off-by: Wes Huang (黃淵河) Signed-off-by: Fero JD Zhou (周俊達) Signed-off-by: SZ Lin (林上智) Signed-off-by: Tony Lindgren commit 4c29e5934f6c35df2601d593ddfa737b7932bde6 Author: Rob Herring Date: Mon Aug 27 13:27:03 2018 -0500 microblaze: get cpu node with of_get_cpu_node "device_type" use is deprecated for FDT though it has continued to be used for nodes like cpu nodes. Use of_get_cpu_node() instead which works using node names by default. This will allow the eventually removal of cpu device_type properties. Also, fix a leaked reference by adding a missing of_node_put. Cc: Michal Simek Signed-off-by: Rob Herring commit dc6253108f0fbff4a634055d5b8a91958ec2af81 Author: Peng Hao Date: Fri Sep 28 12:03:28 2018 -0400 tick/broadcast: Remove redundant check tick_device_is_functional() is called early in tick_broadcast_control(), so no need to call it again later. Signed-off-by: Peng Hao Signed-off-by: Thomas Gleixner Cc: fweisbec@gmail.com Link: https://lkml.kernel.org/r/1538150608-2599-1-git-send-email-penghao122@sina.com.cn commit 86e762d96713aeafac2dc582bbd38075d421c20a Merge: ab2dc8446a99 fae210bb5bfb Author: Arnd Bergmann Date: Fri Sep 28 22:16:47 2018 +0200 Merge tag 'renesas-drivers-for-v4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/drivers Renesas ARM Based SoC Drivers Updates for v4.20 * Convert to SPDX identifiers * R-Car V3M (r8a77970) and V3H (r8a77980): Document Timer Unit (TMU) bindings * RZ/G1N (r8a7744) and RZ/G1C (r8a77470) SoCs: - Document APMU and SMP enable method * RZ/G2M (r8a74a1), RZ/G1N (r8a7744) and RZ/G2E (r8a774c0) SoCs: - Add reset support - Add sysc support * RZ/G2M (r8a774a1), RZ/G2E (r8a774c0) and RZ/A2M (r7s9210) SoCs: - Add support for identifying SoC * RZ/A2M (r7s9210) SoC: - Add basic SoC setup support * tag 'renesas-drivers-for-v4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: (21 commits) dt-bindings: apmu: Document r8a7744 support dt-bindings: timer: renesas: tmu: document R8A779{7|8}0 bindings dt-bindings: apmu: Document r8a77470 support soc: renesas: rcar-rst: Add support for RZ/G1N dt-bindings: reset: rcar-rst: Document r8a7744 reset module soc: renesas: rcar-sysc: Add r8a7744 support dt-bindings: power: rcar-sysc: Add r8a7744 power domain index macros dt-bindings: power: rcar-sysc: Document r8a7744 SYSC binding soc: renesas: rcar-rst: Add support for RZ/G2E dt-bindings: reset: rcar-rst: Document r8a774c0 rst soc: renesas: rcar-sysc: Add r8a774c0 support dt-bindings: power: rcar-sysc: Document r8a774c0 sysc dt-bindings: power: Add r8a774c0 SYSC power domain definitions soc: renesas: Identify RZ/G2E soc: renesas: convert to SPDX identifiers soc: renesas: rcar-rst: Add support for RZ/G2M soc: renesas: rcar-sysc: Add r8a774a1 support dt-bindings: power: Add r8a774a1 SYSC power domain definitions soc: renesas: identify RZ/A2 ARM: shmobile: Add basic RZ/A2 SoC support ... Signed-off-by: Arnd Bergmann commit 4561a42636ca8e4fdb4c4bbad27c05f1144b3f66 Merge: 7f08c966f7e5 6d14d4d313d0 Author: Arnd Bergmann Date: Fri Sep 28 22:11:50 2018 +0200 Merge tag 'renesas-arm-soc-for-v4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/soc Renesas ARM Based SoC Updates for v4.20 * Rework the PMIC IRQ line quirk to use DT rather than hard coded topology * Convert to SPDX identifiers * Convert to using %pOFn instead of device_node.name * Remove the no longer needed ARCH_SHMOBILE Kconfig symbol * RZ/G1N (r8a7744) SoC: Add basic SoC and debug-ll support * R-Car H1 (r8a7779) SoC: remove unused includes * tag 'renesas-arm-soc-for-v4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: ARM: shmobile: Rework the PMIC IRQ line quirk ARM: debug-ll: Add support for r8a7744 ARM: shmobile: r8a7744: Basic SoC support ARM: shmobile: convert to SPDX identifiers ARM: shmobile: Convert to using %pOFn instead of device_node.name ARM: shmobile: Remove the ARCH_SHMOBILE Kconfig symbol ARM: shmobile: r8a7779: Remove unused includes Signed-off-by: Arnd Bergmann commit ef801f07e7b3cc1786d8ab1b4fdf069cc2a136d2 Author: Himanshu Madhani Date: Fri Sep 28 11:02:38 2018 -0700 scsi: qla2xxx: Return switch command on a timeout This patch fixes commit bcc71cc3cde1 ("scsi: qla2xxx: Fix for double free of SRB structure") which placed code in wrong routines. Also updated the use of WARN_ON() to WARN_ON_ONCE() to prevent flooding log messages. Fixes: bcc71cc3cde1 ("scsi: qla2xxx: Fix for double free of SRB structure") Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit ab2dc8446a9912ac11dc00374d8f27357f1c37d0 Merge: ba61ab1a232d 4a37f11c8f57 Author: Arnd Bergmann Date: Fri Sep 28 21:54:36 2018 +0200 Merge tag 'tegra-for-4.20-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into next/drivers soc/tegra: Changes for v4.20-rc1 This contains a pinctrl implementation for the pad configuration that can be controlled from the PMC. * tag 'tegra-for-4.20-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: soc/tegra: pmc: Implement pad configuration via pinctrl soc/tegra: pmc: Remove public pad voltage APIs soc/tegra: pmc: Use X macro to generate IO pad tables soc/tegra: pmc: Implement tegra_io_pad_is_powered() soc/tegra: pmc: Factor out DPD register bit calculation soc/tegra: pmc: Fix pad voltage configuration for Tegra186 soc/tegra: pmc: Fix child-node lookup dt-bindings: Add Tegra PMC pad configuration bindings Signed-off-by: Arnd Bergmann commit a691240e36e3f67f02936a3b68f8e2369ac44cb1 Author: Rob Herring Date: Mon Aug 27 13:48:13 2018 -0500 fbdev: fsl-diu: get cpu node with of_get_cpu_node "device_type" use is deprecated for FDT though it has continued to be used for nodes like cpu nodes. Use of_get_cpu_node() instead which works using node names by default. This will allow the eventually removal of cpu device_type properties. Acked-by: Timur Tabi Cc: Bartlomiej Zolnierkiewicz Cc: linux-fbdev@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Rob Herring commit 651d44f9679cf49992c59fee5570c2c8b9b8ac4c Author: Rob Herring Date: Mon Aug 27 09:47:00 2018 -0500 of: use for_each_of_cpu_node iterator Use the for_each_of_cpu_node iterator to iterate over cpu nodes. This has the side effect of defaulting to iterating using "cpu" node names in preference to the deprecated (for FDT) device_type == "cpu". Cc: Frank Rowand Cc: devicetree@vger.kernel.org Reviewed-by: Geert Uytterhoeven Signed-off-by: Rob Herring commit a9a455e854cdb120db1d8efc5373f9ad2a63e146 Author: Rob Herring Date: Mon Aug 27 09:46:27 2018 -0500 iommu: fsl_pamu: use for_each_of_cpu_node iterator Use the for_each_of_cpu_node iterator to iterate over cpu nodes. This has the side effect of defaulting to iterating using "cpu" node names in preference to the deprecated (for FDT) device_type == "cpu". Cc: Joerg Roedel Cc: iommu@lists.linux-foundation.org Signed-off-by: Rob Herring commit 37dc218bed44b650702682a8f89b226a9d4a34fb Author: Rob Herring Date: Mon Aug 27 08:01:47 2018 -0500 edac: cpc925: use for_each_of_cpu_node iterator Use the for_each_of_cpu_node iterator to iterate over cpu nodes. This has the side effect of defaulting to iterating using "cpu" node names in preference to the deprecated (for FDT) device_type == "cpu". The error messages are removed in the process as it's not the driver's job to be checking cpu nodes. Any problems with cpu nodes should be noticed by the architecture code. Cc: Mauro Carvalho Chehab Cc: linux-edac@vger.kernel.org Acked-by: Borislav Petkov Signed-off-by: Rob Herring commit 76ec23b127cd4ffeadc6fbc70d94a0c3df710405 Author: Rob Herring Date: Mon Aug 27 09:45:53 2018 -0500 clk: mvebu: use for_each_of_cpu_node iterator Use the for_each_of_cpu_node iterator to iterate over cpu nodes. This has the side effect of defaulting to iterating using "cpu" node names in preference to the deprecated (for FDT) device_type == "cpu". Cc: Michael Turquette Cc: linux-clk@vger.kernel.org Acked-by: Stephen Boyd Signed-off-by: Rob Herring commit 7de8f4aa2f35583eea8efc7d7c2cc35d13964d97 Author: Rob Herring Date: Mon Aug 27 09:44:05 2018 -0500 x86: DT: use for_each_of_cpu_node iterator Use the for_each_of_cpu_node iterator to iterate over cpu nodes. This has the side effect of defaulting to iterating using "cpu" node names in preference to the deprecated (for FDT) device_type == "cpu". Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: x86@kernel.org Reviewed-by: Thomas Gleixner Signed-off-by: Rob Herring commit 8cabf5bc10499cbce8ed8f377b7c978717e3952c Author: Rob Herring Date: Mon Aug 27 09:43:40 2018 -0500 SH: use for_each_of_cpu_node iterator Use the for_each_of_cpu_node iterator to iterate over cpu nodes. This has the side effect of defaulting to iterating using "cpu" node names in preference to the deprecated (for FDT) device_type == "cpu". Cc: Yoshinori Sato Cc: Rich Felker Cc: linux-sh@vger.kernel.org Signed-off-by: Rob Herring commit 38959a091e4a79efcd693a19cf589997c6b39d3b Author: Rob Herring Date: Mon Aug 27 13:41:31 2018 -0500 powerpc: 8xx: get cpu node with of_get_cpu_node "device_type" use is deprecated for FDT though it has continued to be used for nodes like cpu nodes. Use of_get_cpu_node() instead which works using node names by default. This will allow the eventually removal of cpu device_type properties. Also, fix a leaked reference and add a missing of_node_put. Cc: Vitaly Bordug Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Rob Herring commit 84dbc69a2ff308f2dedf03c82dbbe194b6df88b2 Author: Rob Herring Date: Mon Aug 27 13:40:26 2018 -0500 powerpc: 4xx: get cpu node with of_get_cpu_node "device_type" use is deprecated for FDT though it has continued to be used for nodes like cpu nodes. Use of_get_cpu_node() instead which works using node names by default. This will allow the eventually removal of cpu device_type properties. Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Rob Herring commit a94fe366340ac4d19f8bd88850ab681d9022f3ae Author: Rob Herring Date: Mon Aug 27 12:24:09 2018 -0500 powerpc: use for_each_of_cpu_node iterator Use the for_each_of_cpu_node iterator to iterate over cpu nodes. This has the side effect of defaulting to iterating using "cpu" node names in preference to the deprecated (for FDT) device_type == "cpu". Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Rob Herring commit 5e5abae858b5d3d060a441cc5da0859cd8cb2c82 Author: Rob Herring Date: Mon Aug 27 12:21:39 2018 -0500 openrisc: use for_each_of_cpu_node iterator Use the for_each_of_cpu_node iterator to iterate over cpu nodes. This has the side effect of defaulting to iterating using "cpu" node names in preference to the deprecated (for FDT) device_type == "cpu". This also fixes a leaked reference for cpus node. Cc: Jonas Bonn Cc: Stefan Kristiansson Cc: openrisc@lists.librecores.org Acked-by: Stafford Horne Signed-off-by: Rob Herring commit 1f0fe1f67cef6fb4029e8a0af90438e8280c80f1 Author: Rob Herring Date: Mon Aug 27 13:27:25 2018 -0500 nios2: get cpu node with of_get_cpu_node "device_type" use is deprecated for FDT though it has continued to be used for nodes like cpu nodes. Use of_get_cpu_node() instead which works using node names by default. This will allow the eventually removal of cpu device_type properties. Also, fix a leaked reference by adding a missing of_node_put. Cc: Ley Foon Tan Cc: nios2-dev@lists.rocketboards.org Signed-off-by: Rob Herring commit 5a931a3c80b5fb0ad0004f016410a75ca1205959 Author: Rob Herring Date: Mon Aug 27 07:53:30 2018 -0500 c6x: use for_each_of_cpu_node iterator Use the for_each_of_cpu_node iterator to iterate over cpu nodes. This has the side effect of defaulting to iterating using "cpu" node names in preference to the deprecated (for FDT) device_type == "cpu". Cc: Mark Salter Cc: Aurelien Jacquiot Cc: linux-c6x-dev@linux-c6x.org Signed-off-by: Rob Herring commit de76e70a8d4ea4518ec46dff2f92e2970af1d512 Author: Rob Herring Date: Mon Aug 27 09:43:01 2018 -0500 arm64: use for_each_of_cpu_node iterator Use the for_each_of_cpu_node iterator to iterate over cpu nodes. This has the side effect of defaulting to iterating using "cpu" node names in preference to the deprecated (for FDT) device_type == "cpu". Cc: Catalin Marinas Cc: linux-arm-kernel@lists.infradead.org Acked-by: Will Deacon Signed-off-by: Rob Herring commit 5af5d40c401581399f2b6a646a83ad0f31015eb6 Author: Rob Herring Date: Mon Aug 27 09:42:49 2018 -0500 ARM: shmobile: use for_each_of_cpu_node iterator Use the for_each_of_cpu_node iterator to iterate over cpu nodes. This has the side effect of defaulting to iterating using "cpu" node names in preference to the deprecated (for FDT) device_type == "cpu". Cc: Magnus Damm Cc: Russell King Cc: linux-arm-kernel@lists.infradead.org Cc: linux-renesas-soc@vger.kernel.org Reviewed-by: Geert Uytterhoeven Reviewed-by: Simon Horman Signed-off-by: Rob Herring commit 07d44f1f82b780a597fddc677d761417f2af8452 Author: Rob Herring Date: Mon Aug 27 10:59:05 2018 -0500 ARM: topology: remove unneeded check for /cpus node Checking for "/cpus" node is not necessary as of_get_cpu_node() will fail later on anyways. The call to of_find_node_by_path() also leaks a reference. So just remove the check. Cc: Russell King Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Rob Herring commit d4866f751edf6d46d523b75979b3c6affed16510 Author: Rob Herring Date: Mon Aug 27 10:53:34 2018 -0500 ARM: use for_each_of_cpu_node iterator Use the for_each_of_cpu_node iterator to iterate over cpu nodes. This has the side effect of defaulting to iterating using "cpu" node names in preference to the deprecated (for FDT) device_type == "cpu". Cc: Russell King Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Rob Herring commit 6487c15f1cc9340fa010d94eeab72ebb657b21dc Author: Rob Herring Date: Mon Aug 27 13:46:51 2018 -0500 of: Support matching cpu nodes with no 'reg' property For some single core ARM systems, the DTs can have a single cpu node without a reg property and #address-cells == 0. This case is valid and should match on cpu #0. Cc: Frank Rowand Signed-off-by: Rob Herring commit f1f207e43b8a49ac2ee3c36a64de1f84651c6079 Author: Rob Herring Date: Wed Aug 22 15:04:40 2018 -0500 of: Add cpu node iterator for_each_of_cpu_node() Iterating thru cpu nodes is a common pattern. Create a common iterator which can find child nodes either by node name or device_type == cpu. Using the former will allow for eventually dropping device_type properties which are deprecated for FDT. Cc: Frank Rowand Reviewed-by: Geert Uytterhoeven Signed-off-by: Rob Herring commit 30d65e0804d58a03d1a8ea4e12c6fc07ed08218b Author: Matias Karhumaa Date: Fri Sep 28 21:54:30 2018 +0300 Bluetooth: Fix debugfs NULL pointer dereference Fix crash caused by NULL pointer dereference when debugfs functions le_max_key_read, le_max_key_size_write, le_min_key_size_read or le_min_key_size_write and Bluetooth adapter was powered off. Fix is to move max_key_size and min_key_size from smp_dev to hci_dev. At the same time they were renamed to le_max_key_size and le_min_key_size. BUG: unable to handle kernel NULL pointer dereference at 00000000000002e8 PGD 0 P4D 0 Oops: 0000 [#24] SMP PTI CPU: 2 PID: 6255 Comm: cat Tainted: G D OE 4.18.9-200.fc28.x86_64 #1 Hardware name: LENOVO 4286CTO/4286CTO, BIOS 8DET76WW (1.46 ) 06/21/2018 RIP: 0010:le_max_key_size_read+0x45/0xb0 [bluetooth] Code: 00 00 00 48 83 ec 10 65 48 8b 04 25 28 00 00 00 48 89 44 24 08 31 c0 48 8b 87 c8 00 00 00 48 8d 7c 24 04 48 8b 80 48 0a 00 00 <48> 8b 80 e8 02 00 00 0f b6 48 52 e8 fb b6 b3 ed be 04 00 00 00 48 RSP: 0018:ffffab23c3ff3df0 EFLAGS: 00010246 RAX: 0000000000000000 RBX: 00007f0b4ca2e000 RCX: ffffab23c3ff3f08 RDX: ffffffffc0ddb033 RSI: 0000000000000004 RDI: ffffab23c3ff3df4 RBP: 0000000000020000 R08: 0000000000000000 R09: 0000000000000000 R10: ffffab23c3ff3ed8 R11: 0000000000000000 R12: ffffab23c3ff3f08 R13: 00007f0b4ca2e000 R14: 0000000000020000 R15: ffffab23c3ff3f08 FS: 00007f0b4ca0f540(0000) GS:ffff91bd5e280000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00000000000002e8 CR3: 00000000629fa006 CR4: 00000000000606e0 Call Trace: full_proxy_read+0x53/0x80 __vfs_read+0x36/0x180 vfs_read+0x8a/0x140 ksys_read+0x4f/0xb0 do_syscall_64+0x5b/0x160 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Signed-off-by: Matias Karhumaa Signed-off-by: Marcel Holtmann commit ee37d7314a32ab6809eacc3389bad0406c69a81f Author: Alex Wu Date: Fri Sep 21 16:05:03 2018 +0800 md/raid10: Fix raid10 replace hang when new added disk faulty [Symptom] Resync thread hang when new added disk faulty during replacing. [Root Cause] In raid10_sync_request(), we expect to issue a bio with callback end_sync_read(), and a bio with callback end_sync_write(). In normal situation, we will add resyncing sectors into mddev->recovery_active when raid10_sync_request() returned, and sub resynced sectors from mddev->recovery_active when end_sync_write() calls end_sync_request(). If new added disk, which are replacing the old disk, is set faulty, there is a race condition: 1. In the first rcu protected section, resync thread did not detect that mreplace is set faulty and pass the condition. 2. In the second rcu protected section, mreplace is set faulty. 3. But, resync thread will prepare the read object first, and then check the write condition. 4. It will find that mreplace is set faulty and do not have to prepare write object. This cause we add resync sectors but never sub it. [How to Reproduce] This issue can be easily reproduced by the following steps: mdadm -C /dev/md0 --assume-clean -l 10 -n 4 /dev/sd[abcd] mdadm /dev/md0 -a /dev/sde mdadm /dev/md0 --replace /dev/sdd sleep 1 mdadm /dev/md0 -f /dev/sde [How to Fix] This issue can be fixed by using local variables to record the result of test conditions. Once the conditions are satisfied, we can make sure that we need to issue a bio for read and a bio for write. Previous 'commit 24afd80d99f8 ("md/raid10: handle recovery of replacement devices.")' will also check whether bio is NULL, but leave the comment saying that it is a pointless test. So we remove this dummy check. Reported-by: Alex Chen Reviewed-by: Allen Peng Reviewed-by: BingJing Chang Signed-off-by: Alex Wu Signed-off-by: Shaohua Li commit 3b6bf296c44f2b1233b7622c847a6ac5b1aeba0f Author: Bruce Allan Date: Wed Sep 19 17:23:11 2018 -0700 ice: fix changing of ring descriptor size (ethtool -G) rx_mini_pending was set to an incorrect value. This was causing EINVAL to always be returned to 'ethtool -G'. The driver does not support mini or jumbo rings so the respective settings should be zero. Also, change the valid range of the number of descriptors in the rings to make the code simpler and easier for users to understand (this removes the valid settings of 8 and 16). Add a system log message indicating when the number is rounded-up from what the user specifies with the 'ethtool -G' command (i.e. when it is not a multiple of 32), and update the log message when a user-provided value is out of range to also indicate the stride. Signed-off-by: Bruce Allan Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 7d86cf38404744523d679671014087fbcbac5a36 Author: Anirudh Venkataramanan Date: Wed Sep 19 17:23:10 2018 -0700 ice: Update to capabilities admin queue command This patch makes a couple of changes in the way the driver uses the "get capabilities" command. 1. Get device capabilities in addition to function capabilities 2. Align to latest spec by using cap_count to determine size of the buffer in case of length error. Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 1886588fb63253c4c2078dc610880abf95af1e3b Author: Anirudh Venkataramanan Date: Wed Sep 19 17:23:09 2018 -0700 ice: Query the Tx scheduler node before adding it Query the Tx scheduler tree node information from FW before adding it to the driver's software database. This will keep the node information current in driver. Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 8bc8d188cde0eeaacad3afd25b8c95ec74d1d217 Author: Brett Creeley Date: Wed Sep 19 17:23:08 2018 -0700 ice: Update comment for ice_fltr_mgmt_list_entry Previously the comment stated that VSI lists should be used when a second VSI becomes a subscriber to the "VLAN address". VSI lists are always used for VLAN membership, so replace "VLAN address" with "MAC address". Also note that VLAN(s) always use VSI list rules. Signed-off-by: Brett Creeley Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit b2ccf317edf716d938d64d776ba8bab6ef4f23e1 Author: Jacob Keller Date: Wed Sep 19 17:23:07 2018 -0700 ice: update fw version check logic We have MAX_FW_API_VER_BRANCH, MAX_FW_API_VER_MAJOR, and MAX_FW_API_VER_MINOR that we use in ice_controlq.h to test when a firmware version is newer than expected. This is currently tested by comparing each field separately. Thus, we compare the branch field against the MAX_FW_API_VER_BRANCH, and so forth. This means that currently, if we suppose that the max firmware version is defined as 0.2.1, i.e. Then firmware 0.1.3 will fail to load. This is because the minor version 3 is greater than the max minor version 1. This is not intuitive, because of the notion that increasing the major firmware version to 2 should mean any firmware version with a major version is less than 2 should be considered older than 2... In order to allow both 0.2.1 and 0.1.3 to load, you would have to define the "max" firmware version as 0.2.3.. It is possible that such a firmware version doesn't even exist yet! Fix this by replacing the current logic with an updated check that behaves as follows: First, we check the major version. If it is greater than the expected version, then we prevent driver load. Additionally, a warning message is logged to indicate to the system administrator that they need to update their driver. This is now the only case where the driver will refuse to load. Second, if the major version is less than the expected version, we log an information message indicating the NVM should be updated. Third, if the major version is exact, we'll then check the minor version. If the minor version is more than two versions less than expected, we log an information message indicating the NVM should be updated. If it is more than two versions greater than the expected version, we log an information message that the driver should be updated. To support this, the ice_aq_ver_check function needs its signature updated to pass the HW structure. Since we now pass this structure, there is no need to pass the firmware API versions separately. Signed-off-by: Jacob Keller Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit e4a0e1ee9443345b6da38c62b2e11221ee25ccf9 Author: Bruce Allan Date: Wed Sep 19 17:23:06 2018 -0700 ice: update branding strings and supported device ids Update branding strings and remove device ids 0x1594 and 0x1595. Signed-off-by: Bruce Allan Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 95a525bee0edc708548b2da4508b5666faa63989 Author: Bruce Allan Date: Wed Sep 19 17:23:05 2018 -0700 ice: replace unnecessary memcpy with direct assignment Direct assignment is preferred over a memcpy() Signed-off-by: Bruce Allan Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit c913b73cd05d8167433846eeb5b1d97dc820d7df Author: Jacob Keller Date: Wed Sep 19 17:23:04 2018 -0700 ice: use [sr]q.count when checking if queue is initialized When shutting down the controlqs, we check if they are initialized before we shut them down and destroy the lock. This is important, as it prevents attempts to access the lock of an already shutdown queue. Unfortunately, we checked rq.head and sq.head as the value to determine if the queue was initialized. This doesn't work, because head is not reset when the queue is shutdown. In some flows, the adminq will have already been shut down prior to calling ice_shutdown_all_ctrlqs. This can result in a crash due to attempting to access the already destroyed mutex. Fix this by using rq.count and sq.count instead. Indeed, ice_shutdown_sq and ice_shutdown_rq already indicate that this is the value we should be using to determine of the queue was initialized. Signed-off-by: Jacob Keller Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 6a42b5128deb930d77a468d40095aa289cd2e1c7 Author: Colin Ian King Date: Thu Sep 27 18:04:54 2018 +0100 qed: fix spelling mistake "b_cb_registred" -> "b_cb_registered" Trivial fix to spelling mistake struct field name, rename it. Signed-off-by: Colin Ian King Signed-off-by: David S. Miller commit fb73b357fb985cc652a72a41541d25915c7f9635 Author: Mariusz Tkaczyk Date: Tue Sep 4 15:08:30 2018 +0200 raid5: block failing device if raid will be failed Currently there is an inconsistency for failing the member drives for arrays with different RAID levels. For RAID456 - there is a possibility to fail all of the devices. However - for other RAID levels - kernel blocks removing the member drive, if the operation results in array's FAIL state (EBUSY is returned). For example - removing last drive from RAID1 is not possible. This kind of blocker was never implemented for raid456 and we cannot see the reason why. We had tested following patch and did not observe any regression, so do you have any comments/reasons for current approach, or we can send the proper patch for this? Signed-off-by: Mariusz Tkaczyk Signed-off-by: Shaohua Li commit 5d394eee2c102453278d81d9a7cf94c80253486a Author: Dan Williams Date: Thu Sep 27 15:01:55 2018 -0700 libnvdimm, region: Fail badblocks listing for inactive regions While experimenting with region driver loading the following backtrace was triggered: INFO: trying to register non-static key. the code is fine but needs lockdep annotation. turning off the locking correctness validator. [..] Call Trace: dump_stack+0x85/0xcb register_lock_class+0x571/0x580 ? __lock_acquire+0x2ba/0x1310 ? kernfs_seq_start+0x2a/0x80 __lock_acquire+0xd4/0x1310 ? dev_attr_show+0x1c/0x50 ? __lock_acquire+0x2ba/0x1310 ? kernfs_seq_start+0x2a/0x80 ? lock_acquire+0x9e/0x1a0 lock_acquire+0x9e/0x1a0 ? dev_attr_show+0x1c/0x50 badblocks_show+0x70/0x190 ? dev_attr_show+0x1c/0x50 dev_attr_show+0x1c/0x50 This results from a missing successful call to devm_init_badblocks() from nd_region_probe(). Block attempts to show badblocks while the region is not enabled. Fixes: 6a6bef90425e ("libnvdimm: add mechanism to publish badblocks...") Cc: Reviewed-by: Johannes Thumshirn Reviewed-by: Dave Jiang Signed-off-by: Dan Williams commit ec72001d38a1eaaabfcc43d58cbd3bfb815e3a90 Merge: 5362700c942b f934bb9b8b61 Author: David S. Miller Date: Fri Sep 28 11:09:02 2018 -0700 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-09-27 This series contains fixes to the ice driver only. Jake fixes a potential crash due to attempting to access the mutex which is already destroyed. Fix this by using rq.count and sq.count to determine if the queue was initialized. Fixed the current logic for checking the firmware version to properly handle situations when firmware major/minor versions differ and when the branch version differs. Bruce replaces a memcpy() with a direct assignment, which is preferred. Also updated the branding strings and device ids supported by the driver. Fixed the "ethtool -G" command in the driver, which was always returning EINVAL when changing the descriptor ring size. Brett update and clarified code comments. Anirudh updates the driver to ensure we query the firmware for the transmit scheduler node information before adding it to the driver database, to ensure we have the current information. Also update the "get capabilities" command to get device and function capabilities. ==================== Signed-off-by: David S. Miller commit 48af2f7e52f4cd5eb41ebcd1bd2e326aa2d33d32 Author: Vishal Verma Date: Tue Sep 18 17:48:31 2018 -0600 libnvdimm, pfn: during init, clear errors in the metadata area If there are badblocks present in the 'struct page' area for pfn namespaces, until now, the only way to clear them has been to force the namespace into raw mode, clear the errors, and re-enable the fsdax mode. This is clunky, given that it should be easy enough for the pfn driver to do the same. Add a new helper that uses the most recently available badblocks list to check whether there are any badblocks that lie in the volatile struct page area. If so, before initializing the struct pages, send down targeted writes via nvdimm_write_bytes to write zeroes to the affected blocks, and thus clear errors. Cc: Dan Williams Signed-off-by: Vishal Verma Signed-off-by: Dan Williams commit 5362700c942b2cc4bab328361545a6d6fe649534 Author: Wei Yongjun Date: Thu Sep 27 14:47:56 2018 +0000 net: sched: make function qdisc_free_cb() static Fixes the following sparse warning: net/sched/sch_generic.c:944:6: warning: symbol 'qdisc_free_cb' was not declared. Should it be static? Fixes: 3a7d0d07a386 ("net: sched: extend Qdisc with rcu") Signed-off-by: Wei Yongjun Signed-off-by: David S. Miller commit d6112f8def514e019658bcc9b57d53acdb71ca3f Author: Felipe Balbi Date: Fri Sep 7 09:16:51 2018 +0300 PCI: Add support for Immediate Readiness PCIe r4.0, sec 7.5.1.1.4 defines a new bit in the Status Register: Immediate Readiness – This optional bit, when Set, indicates the Function is guaranteed to be ready to successfully complete valid configuration accesses at any time following any reset that the host is capable of issuing Configuration Requests to this Function. When this bit is Set, for accesses to this Function, software is exempt from all requirements to delay configuration accesses following any type of reset, including but not limited to the timing requirements defined in Section 6.6. This means that all delays after a Conventional or Function Reset can be skipped. This patch reads such bit and caches its value in a flag inside struct pci_dev to be checked later if we should delay or can skip delays after a reset. While at that, also move the explicit msleep(100) call from pcie_flr() and pci_af_flr() to pci_dev_wait(). Signed-off-by: Felipe Balbi [bhelgaas: rename PCI_STATUS_IMMEDIATE to PCI_STATUS_IMM_READY] Signed-off-by: Bjorn Helgaas commit 451bb7c3319739997d2e5a2527aef62d1f9200ac Author: Josef Bacik Date: Fri Sep 28 13:45:43 2018 -0400 blk-iolatency: keep track of previous windows stats We apply a smoothing to the scale changes in order to keep sawtoothy behavior from occurring. However our window for checking if we've missed our target can sometimes be lower than the smoothing interval (500ms), especially on faster drives like ssd's. In order to deal with this keep track of the running tally of the previous intervals that we threw away because we had already done a scale event recently. This is needed for the ssd case as these low latency drives will have bursts of latency, and if it happens to be ok for the window that directly follows the opening of the scale window we could unthrottle when previous windows we were missing our target. Signed-off-by: Josef Bacik Signed-off-by: Jens Axboe commit 1fa2840e56f9032e14a75fcf67edfe0f21102e4b Author: Josef Bacik Date: Fri Sep 28 13:45:42 2018 -0400 blk-iolatency: use a percentile approache for ssd's We use an average latency approach for determining if we're missing our latency target. This works well for rotational storage where we have generally consistent latencies, but for ssd's and other low latency devices you have more of a spikey behavior, which means we often won't throttle misbehaving groups because a lot of IO completes at drastically faster times than our latency target. Instead keep track of how many IO's miss our target and how many IO's are done in our time window. If the p(90) latency is above our target then we know we need to throttle. With this change in place we are seeing the same throttling behavior with our testcase on ssd's as we see with rotational drives. Signed-off-by: Josef Bacik Signed-off-by: Jens Axboe commit 22ed8a93adc7a9cbb2c0a0fc1d7f10068a1f84c1 Author: Josef Bacik Date: Fri Sep 28 13:45:41 2018 -0400 blk-iolatency: deal with small samples There is logic to keep cgroups that haven't done a lot of IO in the most recent scale window from being punished for over-active higher priority groups. However for things like ssd's where the windows are pretty short we'll end up with small numbers of samples, so 5% of samples will come out to 0 if there aren't enough. Make the floor 1 sample to keep us from improperly bailing out of scaling down. Signed-off-by: Josef Bacik Signed-off-by: Jens Axboe commit 9f60511a021e677c43b3e2d1a890e3d0d372e394 Author: Josef Bacik Date: Fri Sep 28 13:45:40 2018 -0400 blk-iolatency: deal with nr_requests == 1 Hitting the case where blk_queue_depth() returned 1 uncovered the fact that iolatency doesn't actually handle this case properly, it simply doesn't scale down anybody. For this case we should go straight into applying the time delay, which we weren't doing. Since we already limit the floor at 1 request this if statement is not needed, and this allows us to set our depth to 1 which allows us to apply the delay if needed. Signed-off-by: Josef Bacik Signed-off-by: Jens Axboe commit ff4cee0898756f07f8b50b30ea00efc773de24e6 Author: Josef Bacik Date: Fri Sep 28 13:45:39 2018 -0400 blk-iolatency: use q->nr_requests directly We were using blk_queue_depth() assuming that it would return nr_requests, but we hit a case in production on drives that had to have NCQ turned off in order for them to not shit the bed which resulted in a qd of 1, even though the nr_requests was much larger. iolatency really only cares about requests we are allowed to queue up, as any io that get's onto the request list is going to be serviced soonish, so we want to be throttling before the bio gets onto the request list. To make iolatency work as expected, simply use q->nr_requests instead of blk_queue_depth() as that is what we actually care about. Signed-off-by: Josef Bacik Signed-off-by: Jens Axboe commit a804e5e21875418af03e0a413a633f4643739c90 Author: Nikolay Aleksandrov Date: Thu Sep 27 16:35:13 2018 +0300 selftests: forwarding: test for bridge sticky flag This test adds an fdb entry with the sticky flag and sends traffic from a different port with the same mac as a source address expecting the entry to not change ports if the flag is operating correctly. Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit 1288aa7af20cfa25cb00cf0d77f94d1891644c83 Author: Nikolay Aleksandrov Date: Thu Sep 27 15:05:10 2018 +0300 net: bridge: explicitly zero is_sticky in fdb_create We need to explicitly zero is_sticky when creating a new fdb, otherwise we might get a stale value for a new entry. Fixes: 435f2e7cc0b7 ("net: bridge: add support for sticky fdb entries") Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit 61f7725aa148ee870436a29d3a24d5c00ab7e9af Author: Jaegeuk Kim Date: Tue Sep 25 15:25:21 2018 -0700 f2fs: return correct errno in f2fs_gc This fixes overriding error number in f2fs_gc. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit edc55aaf0d1712b54a3704dd58423c7e495534fe Author: Jaegeuk Kim Date: Mon Sep 17 17:36:06 2018 -0700 f2fs: avoid f2fs_bug_on if f2fs_get_meta_page_nofail got EIO This patch avoids BUG_ON when f2fs_get_meta_page_nofail got EIO during xfstests/generic/475. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 4605168f71fa8c0db0a2a900bdfcae851ebed7dd Merge: d2f1e81a40ca e4fd75022c24 Author: David S. Miller Date: Fri Sep 28 10:37:42 2018 -0700 Merge branch 'hns3-next' Salil Mehta says: ==================== Cleanups, minor additions & fixes for HNS3 driver This patch-set contains cleans-ups, minor changes and fixes to the HNS3 driver. ==================== Signed-off-by: David S. Miller commit e4fd75022c24eb28cc1034e97e60cecc24f325f3 Author: Huazhong Tan Date: Wed Sep 26 19:28:40 2018 +0100 net: hns3: Fix loss of coal configuration while doing reset The user's coal configuration will be lost after reset, so the tx_coal and rx_coal fields are added to the struct hns_nic_priv to save the coal configuration and used to restore the user's configuration after the reset is complete. Fixes: bb6b94a896d4 ("net: hns3: Add reset interface implementation in client") Signed-off-by: Huazhong Tan Signed-off-by: Yunsheng Lin Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit 0d43bf45f4a82efceefdfdd2ec86337fcbd51a46 Author: Huazhong Tan Date: Wed Sep 26 19:28:39 2018 +0100 net: hns3: Modify hns3_get_max_available_channels The current hns3_get_max_available_channels returns the total number of queues for the device, which makes ethtool -L set the number of queues per channel queues incorrectly, so hns3_get_max_available_channels should return the maximum available number of queues per channel, depending on the total number of queues allocated and the hardware configurations. Signed-off-by: Huazhong Tan Signed-off-by: Yunsheng Lin Signed-off-by: Peng Li Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit fe5eb043182b17fec2279d4040712dc1fbda428f Author: Huazhong Tan Date: Wed Sep 26 19:28:38 2018 +0100 net: hns3: Change return type of hclge_tm_schd_info_update() hclge_tm_schd_info_update should return an error when num_tc is greater than alloc_tqps. This patch changes the return type of hnae3_register_ae_algo from void to int. Signed-off-by: Huazhong Tan Signed-off-by: Yunsheng Lin Signed-off-by: Peng Li Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit 93d8daf460183871a965dae339839d9e35d44309 Author: Yunsheng Lin Date: Wed Sep 26 19:28:37 2018 +0100 net: hns3: Fix for netdev not up problem when setting mtu Currently hns3_nic_change_mtu will try to down the netdev before setting mtu, and it does not up the netdev when the setting fails, which causes netdev not up problem. This patch fixes it by not returning when the setting fails. Fixes: a8e8b7ff3517 ("net: hns3: Add support to change MTU in HNS3 hardware") Signed-off-by: Yunsheng Lin Signed-off-by: Peng Li Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit 996ff91840eb6f288826e472685abde78bac20ea Author: Yunsheng Lin Date: Wed Sep 26 19:28:36 2018 +0100 net: hns3: Fix for packet buffer setting bug The hardware expects a unit of 128 bytes when setting packet buffer. When calculating the packet buffer size, hclge_rx_buffer_calc does not round up the size as a unit of 128 byte, which may casue packet lost problem when stress testing. This patch fixes it by rounding up packet size when calculating. Fixes: 46a3df9f9718 ("net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support") Signed-off-by: Yunsheng Lin Signed-off-by: Peng Li Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit 4dc13b9668d8ba7a5d1a26b88fa30baa8a214dcc Author: Fuyun Liang Date: Wed Sep 26 19:28:35 2018 +0100 net: hns3: Add serdes parallel inner loopback support This patch adds serdes parallel inner loopback support for self test. Signed-off-by: Fuyun Liang Signed-off-by: Peng Li Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit eb66d50352671c308c4870c1ec87e9bc3d81b673 Author: Fuyun Liang Date: Wed Sep 26 19:28:34 2018 +0100 net: hns3: Rename mac loopback to app loopback In fact, our implementation of mac loopback is the implementation of app loopback now. Current name is wrong. This patch renames mac loopback to app loopback. Signed-off-by: Fuyun Liang Signed-off-by: Peng Li Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit a7b687b35411f26d48ef246afcc0f3fd63a891e8 Author: Fuyun Liang Date: Wed Sep 26 19:28:33 2018 +0100 net: hns3: Rename loop mode Our loop mode includes mac loop, serdes loop and phy loop. Not all of them are related with mac. This patch corrects their names. Signed-off-by: Fuyun Liang Signed-off-by: Peng Li Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit cd2086bf49838c007c75b13195e8b00560f67392 Author: Fuyun Liang Date: Wed Sep 26 19:28:32 2018 +0100 net: hns3: Set extra mac address of pause param for HW The extra mac address of pause param is used to do double check for pause frame. This patch set it to HW. If we do not do that, pfc pause frame will be transferred protocol stack when normal flow control mode is enabled. Signed-off-by: Fuyun Liang Signed-off-by: Peng Li Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit 5b71ac3cc4a6a6346e2b9867c6c7553a7fcc4f8c Author: Peng Li Date: Wed Sep 26 19:28:31 2018 +0100 net: hns3: Add support for sctp checksum offload This patch adds support for sctp checksum offload. Signed-off-by: Fuyun Liang Signed-off-by: Peng Li Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit d2f1e81a40cac3cff2af6136855424186a7fa369 Author: Arnd Bergmann Date: Thu Sep 27 12:02:38 2018 +0200 net: dsa: b53: Fix build with B53_SRAB enabled and B53_SERDES=m When B53_SERDES is a loadable module, a built-in srab driver still cannot reach it, so the previous fix is incomplete: b53_srab.c:(.text+0x3f4): undefined reference to `b53_serdes_init' drivers/net/dsa/b53/b53_srab.o:(.rodata+0xe64): undefined reference to `b53_serdes_link_state' drivers/net/dsa/b53/b53_srab.o:(.rodata+0xe74): undefined reference to `b53_serdes_link_set' drivers/net/dsa/b53/b53_srab.o:(.rodata+0xe88): undefined reference to `b53_serdes_an_restart' drivers/net/dsa/b53/b53_srab.o:(.rodata+0xea0): undefined reference to `b53_serdes_phylink_validate' drivers/net/dsa/b53/b53_srab.o:(.rodata+0xea4): undefined reference to `b53_serdes_config' Add a Kconfig dependency that forces srab to also be a module in this case, but allow it to be built-in when serdes is disabled or built-in. Fixes: 7a8c7f5c30f9 ("net: dsa: b53: Fix build with B53_SRAB enabled and not B53_SERDES") Signed-off-by: Arnd Bergmann Acked-by: Florian Fainelli Signed-off-by: David S. Miller commit 656c1a65ab555ee5c7cd0d6aee8ab82ca3c1795f Author: H. Nikolaus Schaller Date: Fri Sep 28 17:54:00 2018 +0200 ARM: dts: omap5: enable OTG role for DWC3 controller Since SMPS10 and OTG cable detection extcon are described here, and work to enable OTG power when an OTG cable is plugged in, we can define OTG mode in the controller (which is disabled by default in omap5.dtsi). Tested on OMAP5EVM and Pyra. Suggested-by: Roger Quadros Signed-off-by: H. Nikolaus Schaller Signed-off-by: Tony Lindgren commit d6b372f6f3dba1f496d6583a30a584e4dd324e77 Author: Luiz Carlos Ramos Date: Thu Sep 27 17:19:26 2018 -0300 Bluetooth: ath3k: add more information to error message When there is an error in either ath3k_load_firmware() or ath3k_load_fwfile(), the inlined function ath3k_log_failed_loading() is called receiving the error returned and both the block size requested to load and the size actually loaded. These values are printed in an error message using the macro BT_ERR. This patch changes that function in order to print the variable "count" as well, to show more information when a failing firmware loading operation happens. The calls to the older function were changed to the new one. This event is being monitored in a laptop with an adapter which identifies itself as 0cf3:0036, where sometimes there are errors in the firmware loading process. Signed-off-by: Luiz Carlos Ramos Signed-off-by: Marcel Holtmann commit b830526f304764753fcb8b4a563a94080e982a6c Author: Vignesh R Date: Fri Sep 28 11:34:42 2018 +0530 ARM: dts: dra7: Enable workaround for errata i870 in PCIe host mode Add ti,syscon-unaligned-access property to PCIe RC nodes to set appropriate bits in CTRL_CORE_SMA_SW_7 register to enable workaround for errata i870. Signed-off-by: Vignesh R Signed-off-by: Tony Lindgren commit 6d0af44a82be87c13f2320821e9fbb8b8cf5a56f Author: Vignesh R Date: Tue Sep 25 10:51:51 2018 +0530 ARM: dts: dra7: Fix up unaligned access setting for PCIe EP Bit positions of PCIE_SS1_AXI2OCP_LEGACY_MODE_ENABLE and PCIE_SS1_AXI2OCP_LEGACY_MODE_ENABLE in CTRL_CORE_SMA_SW_7 are incorrectly documented in the TRM. In fact, the bit positions are swapped. Update the DT bindings for PCIe EP to reflect the same. Fixes: d23f3839fe97 ("ARM: dts: DRA7: Add pcie1 dt node for EP mode") Cc: stable@vger.kernel.org Signed-off-by: Vignesh R Signed-off-by: Tony Lindgren commit 9b97123a584f60a5bca5a2663485768a1f6cd0a4 Author: Arnd Bergmann Date: Wed Sep 26 15:14:10 2018 +0200 net: phy: mdio-bcm-unimac: mark PM functions as __maybe_unused The newly added runtime-pm support causes a harmless warning when CONFIG_PM is disabled: drivers/net/phy/mdio-bcm-unimac.c:330:12: error: 'unimac_mdio_resume' defined but not used [-Werror=unused-function] static int unimac_mdio_resume(struct device *d) drivers/net/phy/mdio-bcm-unimac.c:321:12: error: 'unimac_mdio_suspend' defined but not used [-Werror=unused-function] static int unimac_mdio_suspend(struct device *d) Marking the functions as __maybe_unused is the easiest workaround and avoids adding #ifdef checks. Fixes: b78ac6ecd1b6 ("net: phy: mdio-bcm-unimac: Allow configuring MDIO clock divider") Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller commit 31bae7dad359e7fee7e2857206107b744dfb2a4e Author: Arnd Bergmann Date: Wed Sep 26 15:20:11 2018 +0200 phy: mscc: fix printf format gcc points out that the length of the temporary buffer may not be sufficient for large numbers of leds: drivers/net/phy/mscc.c: In function 'vsc85xx_probe': drivers/net/phy/mscc.c:460:45: error: '-mode' directive writing 5 bytes into a region of size between 0 and 9 [-Werror=format-overflow=] ret = sprintf(led_dt_prop, "vsc8531,led-%d-mode", i); ^~~~~ drivers/net/phy/mscc.c:460:9: note: 'sprintf' output between 19 and 28 bytes into a destination of size 22 ret = sprintf(led_dt_prop, "vsc8531,led-%d-mode", i); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ While we can make a reasonable assumption that the number of LEDs is small, the cost of making the buffer a little bigger is insignificant as well. Fixes: 11bfdabb7ff5 ("net: phy: mscc: factorize code for LEDs mode") Signed-off-by: Arnd Bergmann Reviewed-by: Alexandre Belloni Signed-off-by: David S. Miller commit 5e8cc3947d8f7b62ff964e58789677a81b20dfca Author: Arnd Bergmann Date: Wed Sep 26 15:12:13 2018 +0200 net: ethernet: dpaa: remove unused variables The patch that removed the only users of the oldadv/newadv variables accidentally left the now-unused declarations behind: drivers/net/ethernet/freescale/dpaa/dpaa_ethtool.c: In function 'dpaa_set_pauseparam': drivers/net/ethernet/freescale/dpaa/dpaa_ethtool.c:185:14: error: unused variable 'oldadv' [-Werror=unused-variable] drivers/net/ethernet/freescale/dpaa/dpaa_ethtool.c:185:6: error: unused variable 'newadv' [-Werror=unused-variable] Fixes: 70814e819c11 ("net: ethernet: Add helper for set_pauseparam for Asym Pause") Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller commit 3d5537f9d468a6afa6c07f6681a4adac0237c235 Author: Wei Yongjun Date: Wed Sep 26 12:20:00 2018 +0000 net: aquantia: Make function aq_fw1x_set_power() static Fixes the following sparse warning: drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils.c:873:5: warning: symbol 'aq_fw1x_set_power' was not declared. Should it be static? Fixes: a0da96c08cfa ("net: aquantia: implement WOL support") Signed-off-by: Wei Yongjun Signed-off-by: David S. Miller commit bf17b671982f8bd17bdf63a9bb4eba5b270209e9 Author: Wei Yongjun Date: Wed Sep 26 12:10:48 2018 +0000 net/tls: Make function get_rec() static Fixes the following sparse warning: net/tls/tls_sw.c:655:16: warning: symbol 'get_rec' was not declared. Should it be static? Fixes: a42055e8d2c3 ("net/tls: Add support for async encryption of records for performance") Signed-off-by: Wei Yongjun Signed-off-by: David S. Miller commit 5d70a6701860ec10e0f807c353700f439fbdd90b Author: Wei Yongjun Date: Wed Sep 26 12:09:45 2018 +0000 net/core: make function ___gnet_stats_copy_basic() static Fixes the following sparse warning: net/core/gen_stats.c:166:1: warning: symbol '___gnet_stats_copy_basic' was not declared. Should it be static? Fixes: 5e111210a443 ("net/core: Add new basic hardware counter") Signed-off-by: Wei Yongjun Acked-by: Eelco Chaudron Signed-off-by: David S. Miller commit a9ca7f17c6d240e269a24cbcd76abf9a940309dd Author: YueHaibing Date: Wed Sep 26 17:18:14 2018 +0800 net: xen-netback: 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 Acked-by: Wei Liu Signed-off-by: David S. Miller commit 470b9254d4687b753a91044e70288614a0a39a01 Author: YueHaibing Date: Thu Sep 27 06:45:06 2018 +0000 qed: Remove set but not used variable 'p_archipelago' Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/ethernet/qlogic/qed/qed_ooo.c: In function 'qed_ooo_delete_isles': drivers/net/ethernet/qlogic/qed/qed_ooo.c:354:30: warning: variable 'p_archipelago' set but not used [-Wunused-but-set-variable] drivers/net/ethernet/qlogic/qed/qed_ooo.c: In function 'qed_ooo_join_isles': drivers/net/ethernet/qlogic/qed/qed_ooo.c:463:30: warning: variable 'p_archipelago' set but not used [-Wunused-but-set-variable] Since commit 1eec2437d14c ("qed: Make OOO archipelagos into an array"), 'p_archipelago' is no longer in use. Signed-off-by: YueHaibing Signed-off-by: David S. Miller commit eddf11e18dff0e8671e06ce54e64cfc843303ab9 Author: YueHaibing Date: Wed Sep 26 17:15:38 2018 +0800 net: ovs: 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: David S. Miller commit 31df0cffa974df05a7036d1e5e5dbf0733c7f5ff Merge: 1042caa79e93 1501d13596b9 Author: David S. Miller Date: Fri Sep 28 10:24:48 2018 -0700 Merge branch 'netlink-nested-policy-validation' Johannes Berg says: ==================== netlink: nested policy validation This adds nested policy validation, which lets you specify the nested attribute type, e.g. NLA_NESTED with sub-policy, or the new NLA_NESTED_ARRAY with sub-sub-policy. Changes in v2: * move setting the bad attr pointer/message into validate_nla() * remove the recursion patch since that's no longer needed * simply skip the generic bad attr pointer/message setting in case of nested nla_validate() failing since that could fail only due to validate_nla() failing inside, which already sets the extack information Changes in v3: * fix NLA_REJECT to have an error message if none is in policy ==================== Signed-off-by: David S. Miller commit 1501d13596b92d6d1f0ea5e104be838188b6e026 Author: Johannes Berg Date: Wed Sep 26 11:15:34 2018 +0200 netlink: add nested array policy validation Sometimes nested netlink attributes are just used as arrays, with the nla_type() of each not being used; we have this in nl80211 and e.g. NFTA_SET_ELEM_LIST_ELEMENTS. Add the ability to validate this type of message directly in the policy, by adding the type NLA_NESTED_ARRAY which does exactly this: require a first level of nesting but ignore the attribute type, and then inside each require a second level of nested and validate those attributes against a given policy (if present). Note that some nested array types actually require that all of the entries have the same index, this is possible to express in a nested policy already, apart from the validation that only the one allowed type is used. Signed-off-by: Johannes Berg Signed-off-by: David S. Miller commit 9a659a35ba177cec30676e170fb6ed98157bcb0d Author: Johannes Berg Date: Wed Sep 26 11:15:33 2018 +0200 netlink: allow NLA_NESTED to specify nested policy to validate Now that we have a validation_data pointer, and the len field in the policy is unused for NLA_NESTED, we can allow using them both to have nested validation. This can be nice in code, although we still have to use nla_parse_nested() or similar which would also take a policy; however, it also serves as documentation in the policy without requiring a look at the code. Signed-off-by: Johannes Berg Signed-off-by: David S. Miller commit c29f1845b2b22974411278bad3a2ac0b7815dfb4 Author: Johannes Berg Date: Wed Sep 26 11:15:32 2018 +0200 netlink: move extack setting into validate_nla() This unifies the code between nla_parse() which sets the bad attribute pointer and an error message, and nla_validate() which only sets the bad attribute pointer. It also cleans up the code for NLA_REJECT and paves the way for nested policy validation, as it will allow us to easily skip setting the "generic" message without any extra args like the **error_msg now, just passing the extack through is now enough. While at it, remove the unnecessary label in nla_parse(). Suggested-by: David Ahern Signed-off-by: Johannes Berg Signed-off-by: David S. Miller commit 48fde90a78f8c67e2bec5061f9725fe363519feb Author: Johannes Berg Date: Wed Sep 26 11:15:31 2018 +0200 netlink: make validation_data const The validation data is only used within the policy that should usually already be const, and isn't changed in any code that uses it. Therefore, make the validation_data pointer const. While at it, remove the duplicate variable in the bitfield validation that I'd otherwise have to change to const. Reviewed-by: David Ahern Signed-off-by: Johannes Berg Signed-off-by: David S. Miller commit fe3b30ddb90face841b2ede3b73ed2e9cfece6ba Author: Johannes Berg Date: Wed Sep 26 11:15:30 2018 +0200 netlink: remove NLA_NESTED_COMPAT This isn't used anywhere, so we might as well get rid of it. Reviewed-by: David Ahern Signed-off-by: Johannes Berg Signed-off-by: David S. Miller commit 2f0b649b3b4a4fcda3a898d07254d164f082752e Author: Alexandre Belloni Date: Fri Sep 28 11:32:02 2018 +0200 MIPS: stop using _PTRS_PER_PGD gcc 3.3 has been retired for a while, use PTRS_PER_PGD and remove the asm-offsets.h inclusion. Signed-off-by: Alexandre Belloni Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/20814/ Cc: James Hogan Cc: Ralf Baechle Cc: Arnd Bergmann Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org commit 82689ac663ac2f3fe89231b2f929fbdae178bb81 Author: Dengcheng Zhu Date: Wed Sep 26 19:49:10 2018 +0000 MIPS: kdump: Mark cpu back online before rebooting The crash utility initializes cpu state by reading the system kernel memory, which is copied into vmcore. It is also natural to preserve the online state for CPUs at crash. Failing to do so could make the analysis tool present info for only 1 CPU by default, and unable to find panic task. Signed-off-by: Dengcheng Zhu Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/20809/ Cc: Paul Burton Cc: "ralf@linux-mips.org" Cc: "linux-mips@linux-mips.org" Cc: "rachel.mozes@intel.com" commit 2ecefa0a15fd0ef88b9cd5d15ceb813008136431 Author: David Howells Date: Fri Sep 28 00:51:20 2018 +0100 keys: Fix the use of the C++ keyword "private" in uapi/linux/keyctl.h The keyctl_dh_params struct in uapi/linux/keyctl.h contains the symbol "private" which means that the header file will cause compilation failure if #included in to a C++ program. Further, the patch that added the same struct to the keyutils package named the symbol "priv", not "private". The previous attempt to fix this (commit 8a2336e549d3) did so by simply renaming the kernel's copy of the field to dh_private, but this then breaks existing userspace and as such has been reverted (commit 8c0f9f5b309d). [And note, to those who think that wrapping the struct in extern "C" {} will work: it won't; that only changes how symbol names are presented to the assembler and linker.]. Instead, insert an anonymous union around the "private" member and add a second member in there with the name "priv" to match the one in the keyutils package. The "private" member is then wrapped in !__cplusplus cpp-conditionals to hide it from C++. Fixes: ddbb41148724 ("KEYS: Add KEYCTL_DH_COMPUTE command") Fixes: 8a2336e549d3 ("uapi/linux/keyctl.h: don't use C++ reserved keyword as a struct member name") Signed-off-by: David Howells cc: Randy Dunlap cc: Lubomir Rintel cc: James Morris cc: Mat Martineau cc: Stephan Mueller cc: Andrew Morton cc: Linus Torvalds cc: stable@vger.kernel.org Signed-off-by: James Morris commit f0a0cdddb14c7a32e7ca68f45fbc44aa347e959d Author: Omar Sandoval Date: Fri Sep 28 09:22:50 2018 -0700 kyber: fix integer overflow of latency targets on 32-bit NSEC_PER_SEC has type long, so 5 * NSEC_PER_SEC is calculated as a long. However, 5 seconds is 5,000,000,000 nanoseconds, which overflows a 32-bit long. Make sure all of the targets are calculated as 64-bit values. Fixes: 6e25cb01ea20 ("kyber: implement improved heuristics") Reported-by: Stephen Rothwell Signed-off-by: Omar Sandoval Signed-off-by: Jens Axboe commit 25cee71a23f4c325b80f45cbd7ee1cde234f8c60 Merge: d314e6e26d65 c26eb6f34c9e Author: Arnd Bergmann Date: Fri Sep 28 18:03:17 2018 +0200 Merge tag 'renesas-arm-defconfig-for-v4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/defconfig Renesas ARM Based SoC Defconfig Updates for v4.20 * shmobile and multi_v7 defconfigs: - Enable recently upstreamed r8a7744 SoC - Enable FDP1 (Fine Display processor) present on R-Car Gen2 and RZ/G1 SoCs * shmobile defconfig (only): - Refresh for v4.19-rc1 - Remove soon to be deprecated SOC_CAMERA * tag 'renesas-arm-defconfig-for-v4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: ARM: shmobile: defconfig: Enable r8a7744 SoC ARM: multi_v7_defconfig: Enable r8a7744 SoC ARM: multi_v7_defconfig: Enable VIDEO_RENESAS_FDP1 ARM: shmobile: defconfig: Enable VIDEO_RENESAS_FDP1 ARM: shmobile: defconfig: Refresh shmobile_defconfig for v4.19-rc1 ARM: shmobile: defconfig: Remove SOC_CAMERA Signed-off-by: Arnd Bergmann commit d314e6e26d657bcf664855dd16bcf83939492c32 Merge: 0faa7d1b8692 76506880eac6 Author: Arnd Bergmann Date: Fri Sep 28 18:01:39 2018 +0200 Merge tag 'renesas-arm64-defconfig-for-v4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/defconfig Renesas ARM64 Based SoC Defconfig Updates for v4.20 * Enable recently upstreamed RZ/G2E (r8a774c0) and RZ/G2M (r8a774a1) SoCs * tag 'renesas-arm64-defconfig-for-v4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: arm64: defconfig: enable R8A774C0 SoC arm64: defconfig: enable R8A774A1 SoC Signed-off-by: Arnd Bergmann commit 7f08c966f7e578dc84f7c3d1a528068841d72d32 Author: Linus Walleij Date: Fri Sep 28 13:42:50 2018 +0200 ARM: Assume maintainership of ARM reference designs With this I assume maintainership of the Integrator, Versatile and RealView ARM reference machines. It's no big secret that I've been maintaining them for years, but might as well make it official so I get the mails and don't miss anything. I have also included some drivers that are closely associated with the ARM reference designs and yet orphaned in the MAINTAINERS file. I can surely maintain them too, or route the question to the right people so it doesn't fall on the floor of upward to the subsystem maintainers who have too much to do already as it is. Cc: Russell King Cc: Rob Herring Cc: Will Deacon Cc: Stephen Boyd Cc: Mark Brown Cc: Brian Norris Acked-by: Wolfram Sang Acked-by: Olof Johansson Acked-by: Michael Turquette Acked-by: Marc Zyngier Acked-by: Mark Brown Signed-off-by: Linus Walleij Signed-off-by: Arnd Bergmann commit e6ff514e27b859e36305629698f233f1dfe641ef Merge: 3a60f1182bce 1137ceee76ba Author: Arnd Bergmann Date: Fri Sep 28 17:58:52 2018 +0200 Merge tag 'omap-for-v4.20/omap1-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/soc A series of omap1 gpio changes for ams-delta Janusz Krzysztofik has cleaned up ams-delta gpio usage along with generic gpio framework improvments. This series contains the omap1 specific clean-up for ams-delta modem and unused gpios. Note that this conflicts with the gpio-omap changes queued into an immutable gpio branch ib-omap for the gpio-omap.h header file. The merge resolution is to drop the IS_BUILTIN(CONFIG_GPIO_OMAP) section and keep the #endif tagged for __ASSEMBLER__. * tag 'omap-for-v4.20/omap1-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: OMAP1: ams-delta: Don't request unused GPIOs ARM: OMAP1: ams-delta-fiq: Use ARM: OMAP1: ams-delta: register MODEM device earlier ARM: OMAP1: ams-delta: initialize latch2 pins to safe values ARM: OMAP1: ams-delta: assign MODEM IRQ from GPIO descriptor Signed-off-by: Arnd Bergmann commit 3a60f1182bce850c2f12343a78e157d40af7b1a0 Merge: 8e2649d00a8a 6e7713792763 Author: Arnd Bergmann Date: Fri Sep 28 17:57:27 2018 +0200 Merge tag 'omap-for-v4.20/soc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/soc SoC changes for omap variants These changes improve support for clkctrl clocks to deal with split memory ranges for clkctrl providers. And to use %pOFn instead of device_node.name. * tag 'omap-for-v4.20/soc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: OMAP2+: Convert to using %pOFn instead of device_node.name ARM: OMAP2+: hwmod_core: improve the support for clkctrl clocks Signed-off-by: Arnd Bergmann commit 65f07f5a09dacf3b60619f196f096ea3671a5eda Author: Israel Rukshin Date: Wed Sep 26 09:44:18 2018 +0000 IB/iser: Fix possible NULL deref at iser_inv_desc() In case target remote invalidates bogus rkey and signature is not used, pi_ctx is NULL deref. The commit also fails the connection on bogus remote invalidation. Fixes: 59caaed7a72a ("IB/iser: Support the remote invalidation exception") Signed-off-by: Israel Rukshin Reviewed-by: Max Gurtovoy Reviewed-by: Sagi Grimberg Signed-off-by: Jason Gunthorpe commit 8e2649d00a8a7b292bd6410cbf976a3d957faa60 Author: Jason A. Donenfeld Date: Wed Sep 26 15:51:10 2018 +0200 ARM: support big-endian for the virt architecture This architecture, used for running in QEMU, runs just fine when compiled in big-endian mode. So enable it. This is enabled in exactly the same way that it is for other platforms (such as vexpress) that also support big-endian mode in QEMU successfully. Signed-off-by: Jason A. Donenfeld Signed-off-by: Arnd Bergmann commit 83d52cd0dcd5e1b718f3eb8b39a46a56788feaad Merge: 5280508e01a2 39c0e5a8746c Author: Arnd Bergmann Date: Fri Sep 28 17:44:38 2018 +0200 Merge tag 'renesas-dt-bindings-for-v4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/dt Renesas ARM Based SoC DT Bindings Updates for v4.20 * Document bindings for: - RZ/G2E (r8a774c0), RZ/G2M (r8a774a1) and RZ/A2 (r7s9210) SoCs - R-Car M3-N (r8a77965) SoC based ULCB board * tag 'renesas-dt-bindings-for-v4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: dt-bindings: arm: Document RZ/G2E SoC DT bindings dt-bindings: arm: Document Renesas R-Car M3-N-based ULCB board dt-bindings: arm: Document RZ/A2 SoC DT bindings dt-bindings: arm: Document RZ/G2M SoC DT bindings Signed-off-by: Arnd Bergmann commit 5280508e01a21f61754ba6d313bf6b43b40c50c8 Merge: 0526b92e3a79 e0a39511dafd Author: Arnd Bergmann Date: Fri Sep 28 17:43:14 2018 +0200 Merge tag 'renesas-arm-dt2-for-v4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/dt Second Round of Renesas ARM Based SoC DT Updates for v4.20 * RZ/G1M (r8a7743) based iWave G20D-Q7 board and camera daughter board - Move PCIe node out of common dtsi to allow reuse of the common dtsi on the iWave RZ/G1N board * RZ/G1C (r8a77470) SoC: Add I2C4, SDHI2 and SMP support * R-Car Gen1 based boards and R-Car Gen2 SoCs: - Enhance top-of-file comments to include SoC name * RZ/N1D (r9a06g032) SoC: - Correct UART0 description and add all other UARTs * tag 'renesas-arm-dt2-for-v4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: ARM: dts: iwg20d-q7-common: Move pciec node out of common dtsi ARM: dts: r8a77470: Add I2C4 support ARM: dts: r8a77470: Add SDHI2 support ARM: dts: r8a77470: Add SMP support ARM: dts: R-Car Gen1 board comment update ARM: dts: Include R-Car Gen2 product name in DTSI files ARM: dts: r9a06g032: Correct UART and add all other UARTs Signed-off-by: Arnd Bergmann commit 0526b92e3a7922ca403d21174259ba90e9710c6c Merge: f62309c87311 158928f38e1c Author: Arnd Bergmann Date: Fri Sep 28 17:41:52 2018 +0200 Merge tag 'renesas-arm64-dt2-for-v4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/dt Second Round of Renesas ARM64 Based SoC DT Updates for v4.20 * Remove unneeded status from thermal nodes * R-Car Gen 3 SoCs: - Use 400kHz for I2C DVFS bus - Revise USB2.0 properties * R-Car Gen 3 SoC based ULCB boards: Add default bootargs * R-Car M3-N (r8a77965) SoC based boards: Enable audio with DMA * R-Car V3M (r8a77970 and V3H (r8a77980) SoCs: - Add compare match timer (CMT) support - Add timer pulse unit (TPU) support * R-Car V3H (r8a77980) and E3 (r8a77990) SoCs: - Attach the SYS-DMAC to the IPMMU * E3 (r8a77990) SoC: Add display output support * R-Car E3 (r8a77990) based Ebisu board: - Enable HDMI and CVBS input, and VGA and HDMI display output * R-Car D3 (r8a77995) SoC: Add LVDS support * R-Car D3 (r8a77995) based Draak board: Enable HDMI display output * tag 'renesas-arm64-dt2-for-v4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: arm64: dts: renesas: r8a77965: Add Sound and Audio DMAC device nodes arm64: dts: renesas: r8a77995: draak: Enable HDMI display output arm64: dts: renesas: r8a77990: ebisu: Enable VGA and HDMI outputs arm64: dts: renesas: r8a77995: Add LVDS support arm64: dts: renesas: r8a77990: Add display output support arm64: dts: renesas: r8a779{7|8}0: add TPU support arm64: dts: renesas: revise properties for R-Car Gen3 SoCs' usb 2.0 arm64: dts: renesas: ulcb: add default bootargs arm64: dts: renesas: r8a779{7|8}0: add CMT support arm64: dts: renesas: gen3: use 400kHz for I2C DVFS bus arm64: dts: renesas: r8a77980: Attach the SYS-DMAC to the IPMMU arm64: dts: renesas: r8a77990: Attach the SYS-DMAC to the IPMMU arm64: dts: renesas: ebisu: Add HDMI and CVBS input arm64: dts: renesas: Remove unneeded status from thermal nodes Signed-off-by: Arnd Bergmann commit f62309c873110e0e733ef690b2c5eb2578833cd4 Merge: d4db2b19eb0c d9fd22447ba5 Author: Arnd Bergmann Date: Fri Sep 28 17:40:06 2018 +0200 Merge tag 'tegra-for-4.20-arm64-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into next/dt arm64: tegra: Device tree changes for v4.20-rc1 This contains mostly device tree changes to support faster SDHCI modes on Tegra210 and Tegra186. * tag 'tegra-for-4.20-arm64-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: arm64: tegra: I2C on Tegra194 is not compatible with Tegra114 arm64: dts: tegra186: Enable HS400 arm64: dts: tegra210: Enable HS400 arm64: dts: tegra186: Add SDMMC4 DQS trim value arm64: dts: tegra210: Add SDMMC4 DQS trim value arm64: dts: tegra186: Assign clocks for sdmmc1 and sdmmc4 arm64: dts: tegra210: Assign clocks for sdmmc1 and sdmmc4 arm64: dts: tegra186: Add SDHCI tap and trim values arm64: dts: tegra210: Add SDHCI tap and trim values arm64: dts: tegra186: Add sdmmc pad auto calibration offsets arm64: dts: tegra210: Add sdmmc pad auto calibration offsets arm64: dts: tegra210-p2597: Remove no-1-8-v from sdmmc1 arm64: dts: tegra210-p2180: Correct sdmmc4 vqmmc-supply arm64: dts: tegra210-p2180: Allow ldo2 to go down to 1.8 V arm64: dts: Add Tegra186 sdmmc pinctrl voltage states arm64: dts: Add Tegra210 sdmmc pinctrl voltage states Signed-off-by: Arnd Bergmann commit d4db2b19eb0ce4f95f75ea64d1efbec0fbc908f0 Merge: fb5c84ce00d9 ebea2a43fdaf Author: Arnd Bergmann Date: Fri Sep 28 17:32:55 2018 +0200 Merge tag 'tegra-for-4.20-arm-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into next/dt ARM: tegra: Device tree changes for v4.20-rc1 This contains a massive amount of changes from Marcel Ziswiler for various boards by Toradex. * tag 'tegra-for-4.20-arm-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: (129 commits) ARM: dts: paz00: fix wakeup gpio keycode ARM: tegra: tegra20: Fix mixed tabs-spaces indentation ARM: tegra: colibri_t20: add eval board device tree ARM: tegra: colibri_t20: rename ac97 label to tegra_ac97 ARM: tegra: colibri_t20: get rid of fake clocks simple bus ARM: tegra: colibri_t20: rename tps6586x@34 and drop unused pmic label ARM: tegra: colibri_t20: iris: drop unused i2c_ddc label ARM: tegra: colibri_t20: rename i2c_ddc to hdmi_ddc ARM: tegra: colibri_t20: drop module level model and compatible ARM: tegra: colibri_t20: iris: add colibri ssp support ARM: tegra: colibri_t20: iris: simplify model and compatible properties ARM: tegra: colibri_t20: simplify model and compatible properties ARM: tegra: colibri_t20: add compatibility comment ARM: tegra: colibri_t20: annotate/move sd card detect ARM: tegra: colibri_t20: add gpio hogs for gmi_wr_n buffers ARM: tegra: colibri_t20: add gpio hog to unreset usb ethernet chip ARM: tegra: colibri_t20: add i2c-thermtrip ARM: tegra: colibri_t20: annotate/rename lm95245 temperature sensor ARM: tegra: colibri_t20: iris: add dr_mode property ARM: tegra: colibri_t20: iris: add gpio wakeup key ... Signed-off-by: Arnd Bergmann commit fb5c84ce00d9321433b5709c205e32049201fa62 Merge: 0dfc62946b9a d9be10edf7d6 Author: Arnd Bergmann Date: Fri Sep 28 17:31:14 2018 +0200 Merge tag 'tegra-for-4.20-dt-bindings' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into next/dt dt-bindings: Changes for v4.20-rc1 This contains the PMC pad configuration bindings which are used to control the voltage of various pads found on Tegra chips. Among other things this is required to enable faster modes on SDHCI. * tag 'tegra-for-4.20-dt-bindings' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: dt-bindings: Add Tegra PMC pad configuration bindings Signed-off-by: Arnd Bergmann commit aa77e55d48124d0d78456eabf872fffb5decdbe1 Author: Alan Douglas Date: Fri Sep 28 11:51:18 2018 +0100 PCI: cadence: Correct probe behaviour when failing to get PHY Test the correct value to see whether the PHY get failed. Use devm_phy_get() instead of devm_phy_optional_get(), since it is only called if phy name is given in devicetree and so should exist. If failure when getting or linking PHY, put any PHYs which were already got and unlink them. Fixes: dfb80534692ddc5b ("PCI: cadence: Add generic PHY support to host and EP drivers") Reported-by: Colin King Signed-off-by: Alan Douglas Signed-off-by: Lorenzo Pieralisi commit 18172b10b674a7cd5340b2dd70202ce6622400bd Author: Miklos Szeredi Date: Fri Sep 28 16:43:23 2018 +0200 fuse: extract fuse_emit() helper Prepare for cache filling by introducing a helper for emitting a single directory entry. Signed-off-by: Miklos Szeredi commit 6433b8998a21dc597002731c4ceb4144e856edc4 Author: Miklos Szeredi Date: Fri Sep 28 16:43:23 2018 +0200 fuse: add FOPEN_CACHE_DIR Add flag returned by OPENDIR request to allow kernel to cache directory contents in page cache. The effect of FOPEN_CACHE_DIR is twofold: a) if not already cached, it writes entries into the cache b) if already cached, it allows reading entries from the cache The FOPEN_KEEP_CACHE has the same effect as on regular files: unless this flag is given the cache is cleared upon completion of open. So FOPEN_KEEP_CACHE and FOPEN_KEEP_CACHE flags should be used together to make use of the directory caching facility introduced in the following patches. The FUSE_AUTO_INVAL_DATA flag returned in INIT reply also has the same affect on the directory cache as it has on data cache for regular files. Signed-off-by: Miklos Szeredi commit d123d8e1833c5d854b56f2a7da17cafd0a901df8 Author: Miklos Szeredi Date: Fri Sep 28 16:43:23 2018 +0200 fuse: split out readdir.c Directory reading code is about to grow larger, so split it out from dir.c into a new source file. Signed-off-by: Miklos Szeredi commit be2ff42c5d6ebc8552c82a7d1697afae30510ed9 Author: Kirill Tkhai Date: Tue Sep 11 13:12:14 2018 +0300 fuse: Use hash table to link processing request We noticed the performance bottleneck in FUSE running our Virtuozzo storage over rdma. On some types of workload we observe 20% of times spent in request_find() in profiler. This function is iterating over long requests list, and it scales bad. The patch introduces hash table to reduce the number of iterations, we do in this function. Hash generating algorithm is taken from hash_add() function, while 256 lines table is used to store pending requests. This fixes problem and improves the performance. Reported-by: Alexey Kuznetsov Signed-off-by: Kirill Tkhai Signed-off-by: Miklos Szeredi commit 3a5358d1a1b70bb3360578f09894d6856629ecdf Author: Kirill Tkhai Date: Tue Sep 11 13:12:05 2018 +0300 fuse: kill req->intr_unique This field is not needed after the previous patch, since we can easily convert request ID to interrupt request ID and vice versa. Signed-off-by: Kirill Tkhai Signed-off-by: Miklos Szeredi commit c59fd85e4fd07fdf0ab523a5e9734f5338d6aa19 Author: Kirill Tkhai Date: Tue Sep 11 13:11:56 2018 +0300 fuse: change interrupt requests allocation algorithm Using of two unconnected IDs req->in.h.unique and req->intr_unique does not allow to link requests to a hash table. We need can't use none of them as a key to calculate hash. This patch changes the algorithm of allocation of IDs for a request. Plain requests obtain even ID, while interrupt requests are encoded in the low bit. So, in next patches we will be able to use the rest of ID bits to calculate hash, and the hash will be the same for plain and interrupt requests. Signed-off-by: Kirill Tkhai Signed-off-by: Miklos Szeredi commit 63825b4e1da5a3cba79d835a5925e5daf7db3a77 Author: Kirill Tkhai Date: Mon Aug 27 18:29:56 2018 +0300 fuse: do not take fc->lock in fuse_request_send_background() Currently, we take fc->lock there only to check for fc->connected. But this flag is changed only on connection abort, which is very rare operation. So allow checking fc->connected under just fc->bg_lock and use this lock (as well as fc->lock) when resetting fc->connected. Signed-off-by: Kirill Tkhai Signed-off-by: Miklos Szeredi commit ae2dffa39485c6fd4f22321814c7287c274b473a Author: Kirill Tkhai Date: Mon Aug 27 18:29:46 2018 +0300 fuse: introduce fc->bg_lock To reduce contention of fc->lock, this patch introduces bg_lock for protection of fields related to background queue. These are: max_background, congestion_threshold, num_background, active_background, bg_queue and blocked. This allows next patch to make async reads not requiring fc->lock, so async reads and writes will have better performance executed in parallel. Signed-off-by: Kirill Tkhai Signed-off-by: Miklos Szeredi commit 2b30a533148af4f3865c0dcd619ad93ab3f4ba52 Author: Kirill Tkhai Date: Mon Aug 27 18:29:37 2018 +0300 fuse: add locking to max_background and congestion_threshold changes Functions sequences like request_end()->flush_bg_queue() require that max_background and congestion_threshold are constant during their execution. Otherwise, checks like if (fc->num_background == fc->max_background) made in different time may behave not like expected. Signed-off-by: Kirill Tkhai Signed-off-by: Miklos Szeredi commit 2a23f2b8adbe4bd584f936f7ac17a99750eed9d7 Author: Kirill Tkhai Date: Mon Aug 27 18:29:29 2018 +0300 fuse: use READ_ONCE on congestion_threshold and max_background Since they are of unsigned int type, it's allowed to read them unlocked during reporting to userspace. Let's underline this fact with READ_ONCE() macroses. Signed-off-by: Kirill Tkhai Signed-off-by: Miklos Szeredi commit e287179afe2190faa7b97915cb89215dde5e044b Author: Kirill Tkhai Date: Tue Jul 31 13:25:25 2018 +0300 fuse: use list_first_entry() in flush_bg_queue() This cleanup patch makes the function to use the primitive instead of direct dereferencing. Also, move fiq dereferencing out of cycle, since it's always constant. Signed-off-by: Kirill Tkhai Signed-off-by: Miklos Szeredi commit 88bc7d5097a11d9bdcf08ecf85c81ba998353437 Author: Niels de Vos Date: Tue Aug 21 14:36:31 2018 +0200 fuse: add support for copy_file_range() There are several FUSE filesystems that can implement server-side copy or other efficient copy/duplication/clone methods. The copy_file_range() syscall is the standard interface that users have access to while not depending on external libraries that bypass FUSE. Signed-off-by: Niels de Vos Signed-off-by: Miklos Szeredi commit 908a572b80f6e9577b45e81b3dfe2e22111286b8 Author: Miklos Szeredi Date: Fri Sep 28 16:43:22 2018 +0200 fuse: fix blocked_waitq wakeup Using waitqueue_active() is racy. Make sure we issue a wake_up() unconditionally after storing into fc->blocked. After that it's okay to optimize with waitqueue_active() since the first wake up provides the necessary barrier for all waiters, not the just the woken one. Signed-off-by: Miklos Szeredi Fixes: 3c18ef8117f0 ("fuse: optimize wake_up") Cc: # v3.10 commit 4c316f2f3ff315cb48efb7435621e5bfb81df96d Author: Miklos Szeredi Date: Fri Sep 28 16:43:22 2018 +0200 fuse: set FR_SENT while locked Otherwise fuse_dev_do_write() could come in and finish off the request, and the set_bit(FR_SENT, ...) could trigger the WARN_ON(test_bit(FR_SENT, ...)) in request_end(). Signed-off-by: Miklos Szeredi Reported-by: syzbot+ef054c4d3f64cd7f7cec@syzkaller.appspotmai Fixes: 46c34a348b0a ("fuse: no fc->lock for pqueue parts") Cc: # v4.2 commit d2d2d4fb1f54eff0f3faa9762d84f6446a4bc5d0 Author: Kirill Tkhai Date: Tue Sep 25 12:52:42 2018 +0300 fuse: Fix use-after-free in fuse_dev_do_write() After we found req in request_find() and released the lock, everything may happen with the req in parallel: cpu0 cpu1 fuse_dev_do_write() fuse_dev_do_write() req = request_find(fpq, ...) ... spin_unlock(&fpq->lock) ... ... req = request_find(fpq, oh.unique) ... spin_unlock(&fpq->lock) queue_interrupt(&fc->iq, req); ... ... ... ... ... request_end(fc, req); fuse_put_request(fc, req); ... queue_interrupt(&fc->iq, req); Signed-off-by: Kirill Tkhai Signed-off-by: Miklos Szeredi Fixes: 46c34a348b0a ("fuse: no fc->lock for pqueue parts") Cc: # v4.2 commit bc78abbd55dd28e2287ec6d6502b842321a17c87 Author: Kirill Tkhai Date: Tue Sep 25 12:28:55 2018 +0300 fuse: Fix use-after-free in fuse_dev_do_read() We may pick freed req in this way: [cpu0] [cpu1] fuse_dev_do_read() fuse_dev_do_write() list_move_tail(&req->list, ...); ... spin_unlock(&fpq->lock); ... ... request_end(fc, req); ... fuse_put_request(fc, req); if (test_bit(FR_INTERRUPTED, ...)) queue_interrupt(fiq, req); Fix that by keeping req alive until we finish all manipulations. Reported-by: syzbot+4e975615ca01f2277bdd@syzkaller.appspotmail.com Signed-off-by: Kirill Tkhai Signed-off-by: Miklos Szeredi Fixes: 46c34a348b0a ("fuse: no fc->lock for pqueue parts") Cc: # v4.2 commit e982c4d0a29b1d61fbe7716a8dcf8984936d6730 Author: Hannes Reinecke Date: Fri Sep 28 08:17:23 2018 +0200 virtio-blk: modernize sysfs attribute creation Use new-style DEVICE_ATTR_RO/DEVICE_ATTR_RW to create the sysfs attributes and register the disk with default sysfs attribute groups. Signed-off-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Acked-by: Michael S. Tsirkin Reviewed-by: Bart Van Assche Signed-off-by: Jens Axboe commit 98af4d4df889dcea3bc0ce6b8a04759658ba8826 Author: Hannes Reinecke Date: Fri Sep 28 08:17:22 2018 +0200 zram: register default groups with device_add_disk() Register default sysfs groups during device_add_disk() to avoid a race condition with udev during startup. Signed-off-by: Hannes Reinecke Cc: Minchan Kim Cc: Nitin Gupta Reviewed-by: Christoph Hellwig Reviewed-by: Bart Van Assche Signed-off-by: Jens Axboe commit 95cf7809bf9169fec4e4b7bb24b8069d8f354f96 Author: Hannes Reinecke Date: Fri Sep 28 08:17:21 2018 +0200 aoe: register default groups with device_add_disk() Register default sysfs groups during device_add_disk() to avoid a race condition with udev during startup. Signed-off-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Acked-by: Ed L. Cachin Reviewed-by: Bart Van Assche Signed-off-by: Jens Axboe commit 33b14f67a4e1eabd219fd6543da8f15ed86b641c Author: Hannes Reinecke Date: Fri Sep 28 08:17:20 2018 +0200 nvme: register ns_id attributes as default sysfs groups We should be registering the ns_id attribute as default sysfs attribute groups, otherwise we have a race condition between the uevent and the attributes appearing in sysfs. Suggested-by: Bart van Assche Reviewed-by: Keith Busch Signed-off-by: Hannes Reinecke Signed-off-by: Jens Axboe commit fef912bf860e8e7e48a2bfb978a356bba743a8b7 Author: Hannes Reinecke Date: Fri Sep 28 08:17:19 2018 +0200 block: genhd: add 'groups' argument to device_add_disk Update device_add_disk() to take an 'groups' argument so that individual drivers can register a device with additional sysfs attributes. This avoids race condition the driver would otherwise have if these groups were to be created with sysfs_add_groups(). Signed-off-by: Martin Wilck Signed-off-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Reviewed-by: Bart Van Assche Signed-off-by: Jens Axboe commit 5451521409ce1c04d56c03854008fe8861893b05 Merge: 5a7d7d0f9f79 2ece646c90c5 Author: Mark Brown Date: Fri Sep 28 15:07:30 2018 +0100 Merge tag 'bd71847-support' into regulator-4.20 regulator/mfd: Support for the ROHM BD71847 This adds support for the BD71847 which touches both MFD and regulator. There's a few other bits and pieces included as some dependency patches had already been applied so would've required rebasing. commit 3e3a5a1d93f87a08226866d239a0cb8a47e02b01 Author: Xue Liu Date: Fri Aug 31 23:46:42 2018 +0200 ieee802154: mcr20a: Remove struct mcr20a_platform_data The struct mcr20a_platform_data is uesed only in probe function and it holds only one member. So it is not necessary to reserve it. Using gpiod family API to handle reset pin. Signed-off-by: Xue Liu Signed-off-by: Stefan Schmidt commit 2ece646c90c5b45dd76c76ea207a3f3459f2c472 Author: Matti Vaittinen Date: Fri Sep 14 11:34:02 2018 +0300 regulator: bd718xx: rename bd71837 to 718xx rename bd71837-regulator.c to bd718x7-regulator.c to reflect the fact that also BD71847 is now supported by the driver. Signed-off-by: Matti Vaittinen Signed-off-by: Mark Brown commit a4bfc2c28a21f4d5274d813b20fd015a9dc9bcfa Author: Matti Vaittinen Date: Fri Sep 14 11:33:11 2018 +0300 regulator: bd718XX use pickable ranges Few regulators in BD71837 and BD71847 can output voltages from different voltage ranges. Register interface is arranged so that used range is selected by toggling bits which are not next to actual voltage selection bits. Then the voltage inside selected range is determined by voltage selection bits (as usual). Support BD71837 and BD71847 selectible range voltages using new pickable ranges helpers. Signed-off-by: Matti Vaittinen Signed-off-by: Mark Brown commit dd2be639f4a918b335818bf22a937956e552b957 Author: Matti Vaittinen Date: Fri Sep 14 11:32:26 2018 +0300 regulator/mfd: bd718xx: rename bd71837/bd71847 common instances Rename parts of code that support both BD71837 and BD71847 to BD718XX. Signed-off-by: Matti Vaittinen Acked-by: Lee Jones Signed-off-by: Mark Brown commit 18e4b55fbd2069cee51ef9660b35c65ec13bee6d Author: Matti Vaittinen Date: Fri Sep 14 11:31:36 2018 +0300 regulator: Support regulators where voltage ranges are selectable For example ROHM BD71837 and ROHM BD71847 Power management ICs have regulators which provide multiple linear ranges. Ranges can be selected by individual non contagious bit in vsel register. Add regmap helper functions for selecting ranges. Signed-off-by: Matti Vaittinen Signed-off-by: Mark Brown commit 01e17e5d8004f53044c6c9062e04ca118c420512 Author: Matti Vaittinen Date: Fri Sep 14 11:30:58 2018 +0300 mfd: dt bindings: add BD71847 device-tree binding documentation Add ROHM BD71847 Power Management IC MFD binding information to device-tree binding documents. Signed-off-by: Matti Vaittinen Reviewed-by: Rob Herring Acked-by: Lee Jones Signed-off-by: Mark Brown commit 12fc309a956b82e75db2a19fd36074266bff9413 Author: Matti Vaittinen Date: Fri Sep 14 11:30:06 2018 +0300 regulator: dt bindings: add BD71847 device-tree binding documentation Add ROHM BD71847 Power Management IC regulator binding information to device-tree binding documents. Signed-off-by: Matti Vaittinen Reviewed-by: Rob Herring Signed-off-by: Mark Brown commit 494edd266b945f36908184433dd36eda1719cdb0 Author: Matti Vaittinen Date: Fri Sep 14 11:27:46 2018 +0300 regulator/mfd: Support ROHM BD71847 power management IC BD71847 is reduced version of BD71837. DVS bucks 3 and 4 are removed as is LDO7. Voltage ranges of some regulators are expanded. Add initial support for BD71847 with BD71837 driver. Signed-off-by: Matti Vaittinen Acked-by: Lee Jones Signed-off-by: Mark Brown commit 2e0fe4d0c6ca59c3c05f9e6b0067d70cb9821500 Merge: 61b2e6741e81 fb6de923ca33 Author: Mark Brown Date: Fri Sep 28 14:50:33 2018 +0100 Merge tag 'regulator-v4.19-rc5' into regulator-bd718xx regulator: Fixes for 4.19 A collection of fairly minor bug fixes here, a couple of driver specific ones plus two core fixes. There's one fix for the new suspend state code which fixes some confusion with constant values that are supposed to indicate noop operation and another fixing a race condition with the creation of sysfs files on new regulators. commit 492a6be197c0ddf9053ed30722ca11bf6637f011 Author: Tony Krowiak Date: Tue Sep 25 19:16:41 2018 -0400 s390: doc: detailed specifications for AP virtualization This patch provides documentation describing the AP architecture and design concepts behind the virtualization of AP devices. It also includes an example of how to configure AP devices for exclusive use of KVM guests. Signed-off-by: Tony Krowiak Reviewed-by: Halil Pasic Message-Id: <20180925231641.4954-27-akrowiak@linux.vnet.ibm.com> Signed-off-by: Christian Borntraeger commit 112c24d4dc48d8c663e2f6d1c5ecb7473255c175 Author: Tony Krowiak Date: Tue Sep 25 19:16:40 2018 -0400 KVM: s390: CPU model support for AP virtualization Introduces two new CPU model facilities to support AP virtualization for KVM guests: 1. AP Query Configuration Information (QCI) facility is installed. This is indicated by setting facilities bit 12 for the guest. The kernel will not enable this facility for the guest if it is not set on the host. If this facility is not set for the KVM guest, then only APQNs with an APQI less than 16 will be used by a Linux guest regardless of the matrix configuration for the virtual machine. This is a limitation of the Linux AP bus. 2. AP Facilities Test facility (APFT) is installed. This is indicated by setting facilities bit 15 for the guest. The kernel will not enable this facility for the guest if it is not set on the host. If this facility is not set for the KVM guest, then no AP devices will be available to the guest regardless of the guest's matrix configuration for the virtual machine. This is a limitation of the Linux AP bus. Signed-off-by: Tony Krowiak Reviewed-by: Christian Borntraeger Reviewed-by: Halil Pasic Reviewed-by: David Hildenbrand Tested-by: Michael Mueller Tested-by: Farhan Ali Acked-by: Cornelia Huck Message-Id: <20180925231641.4954-26-akrowiak@linux.vnet.ibm.com> Signed-off-by: Christian Borntraeger commit 37940fb0b6a2c4bf101481365c42f250694ffd15 Author: Tony Krowiak Date: Tue Sep 25 19:16:39 2018 -0400 KVM: s390: device attrs to enable/disable AP interpretation Introduces two new VM crypto device attributes (KVM_S390_VM_CRYPTO) to enable or disable AP instruction interpretation from userspace via the KVM_SET_DEVICE_ATTR ioctl: * The KVM_S390_VM_CRYPTO_ENABLE_APIE attribute enables hardware interpretation of AP instructions executed on the guest. * The KVM_S390_VM_CRYPTO_DISABLE_APIE attribute disables hardware interpretation of AP instructions executed on the guest. In this case the instructions will be intercepted and pass through to the guest. Signed-off-by: Tony Krowiak Reviewed-by: Cornelia Huck Message-Id: <20180925231641.4954-25-akrowiak@linux.vnet.ibm.com> Signed-off-by: Christian Borntraeger commit 9ee71f20cb8d90e156c0e00ff9949328f455b06b Author: Pierre Morel Date: Tue Sep 25 19:16:38 2018 -0400 KVM: s390: vsie: allow guest FORMAT-0 CRYCB on host FORMAT-2 When the guest schedules a SIE with a FORMAT-0 CRYCB, we are able to schedule it in the host with a FORMAT-2 CRYCB if the host uses FORMAT-2 Signed-off-by: Pierre Morel Signed-off-by: Tony Krowiak Message-Id: <20180925231641.4954-24-akrowiak@linux.vnet.ibm.com> Signed-off-by: Christian Borntraeger commit 6b79de4b056e5a2febc0c61233d8f0ad7868e49c Author: Pierre Morel Date: Tue Sep 25 19:16:37 2018 -0400 KVM: s390: vsie: allow guest FORMAT-1 CRYCB on host FORMAT-2 When the guest schedules a SIE with a CRYCB FORMAT-1 CRYCB, we are able to schedule it in the host with a FORMAT-2 CRYCB if the host uses FORMAT-2. Signed-off-by: Pierre Morel Signed-off-by: Tony Krowiak Message-Id: <20180925231641.4954-23-akrowiak@linux.vnet.ibm.com> Signed-off-by: Christian Borntraeger commit c9ba8c2cd210d35cdb48683db7c94f11c236d841 Author: Pierre Morel Date: Tue Sep 25 19:16:36 2018 -0400 KVM: s390: vsie: allow guest FORMAT-0 CRYCB on host FORMAT-1 When the guest schedules a SIE with a FORMAT-0 CRYCB, we are able to schedule it in the host with a FORMAT-1 CRYCB if the host uses FORMAT-1 or FORMAT-0. Signed-off-by: Pierre Morel Signed-off-by: Tony Krowiak Message-Id: <20180925231641.4954-22-akrowiak@linux.vnet.ibm.com> Signed-off-by: Christian Borntraeger commit 6ee74098201b717696388cd9754d10a109346d6b Author: Pierre Morel Date: Tue Sep 25 19:16:35 2018 -0400 KVM: s390: vsie: allow CRYCB FORMAT-0 When the host and the guest both use a FORMAT-0 CRYCB, we copy the guest's FORMAT-0 APCB to a shadow CRYCB for use by vSIE. Signed-off-by: Pierre Morel Signed-off-by: Tony Krowiak Message-Id: <20180925231641.4954-21-akrowiak@linux.vnet.ibm.com> Signed-off-by: Christian Borntraeger commit 19fd83a64718f8e0168b954c3ec0f353cb306c7f Author: Pierre Morel Date: Tue Sep 25 19:16:34 2018 -0400 KVM: s390: vsie: allow CRYCB FORMAT-1 When the host and guest both use a FORMAT-1 CRYCB, we copy the guest's FORMAT-0 APCB to a shadow CRYCB for use by vSIE. Signed-off-by: Pierre Morel Signed-off-by: Tony Krowiak Message-Id: <20180925231641.4954-20-akrowiak@linux.vnet.ibm.com> Signed-off-by: Christian Borntraeger commit 56019f9aca2266edc7f304d91e4e772023b7aa14 Author: Pierre Morel Date: Tue Sep 25 19:16:33 2018 -0400 KVM: s390: vsie: Allow CRYCB FORMAT-2 When the guest and the host both use CRYCB FORMAT-2, we copy the guest's FORMAT-1 APCB to a FORMAT-1 shadow APCB. This patch also cleans up the shadow_crycb() function. Signed-off-by: Pierre Morel Signed-off-by: Tony Krowiak Message-Id: <20180925231641.4954-19-akrowiak@linux.vnet.ibm.com> Signed-off-by: Christian Borntraeger commit 3af84def9cbf38f2a13c0a8e1a74721ad762747e Author: Pierre Morel Date: Tue Sep 25 19:16:32 2018 -0400 KVM: s390: vsie: Make use of CRYCB FORMAT2 clear The comment preceding the shadow_crycb function is misleading, we effectively accept FORMAT2 CRYCB in the guest. When using FORMAT2 in the host we do not need to or with FORMAT1. Signed-off-by: Pierre Morel Signed-off-by: Tony Krowiak Reviewed-by: Janosch Frank Reviewed-by: David Hildenbrand Message-Id: <20180925231641.4954-18-akrowiak@linux.vnet.ibm.com> Signed-off-by: Christian Borntraeger commit d6f6959ac5877885fbba8b0efe09e6103fa1da80 Author: Pierre Morel Date: Tue Sep 25 19:16:31 2018 -0400 KVM: s390: vsie: Do the CRYCB validation first We need to handle the validity checks for the crycb, no matter what the settings for the keywrappings are. So lets move the keywrapping checks after we have done the validy checks. Signed-off-by: Pierre Morel Signed-off-by: Tony Krowiak Reviewed-by: Janosch Frank Reviewed-by: David Hildenbrand Message-Id: <20180925231641.4954-17-akrowiak@linux.vnet.ibm.com> Signed-off-by: Christian Borntraeger commit 6cc571b1b1e8b6fbcf69411d115cf9d9be866276 Author: Pierre Morel Date: Tue Sep 25 19:16:30 2018 -0400 KVM: s390: Clear Crypto Control Block when using vSIE When we clear the Crypto Control Block (CRYCB) used by a guest level 2, the vSIE shadow CRYCB for guest level 3 must be updated before the guest uses it. We achieve this by using the KVM_REQ_VSIE_RESTART synchronous request for each vCPU belonging to the guest to force the reload of the shadow CRYCB before rerunning the guest level 3. Signed-off-by: Pierre Morel Signed-off-by: Tony Krowiak Message-Id: <20180925231641.4954-16-akrowiak@linux.vnet.ibm.com> Signed-off-by: Christian Borntraeger commit cd8a377e3b40002cd7983b53f384456393908b7e Author: Tony Krowiak Date: Tue Sep 25 19:16:29 2018 -0400 s390: vfio-ap: implement VFIO_DEVICE_RESET ioctl Implements the VFIO_DEVICE_RESET ioctl. This ioctl zeroizes all of the AP queues assigned to the guest. Signed-off-by: Tony Krowiak Reviewed-by: Halil Pasic Reviewed-by: Pierre Morel Reviewed-by: Cornelia Huck Tested-by: Michael Mueller Tested-by: Farhan Ali Tested-by: Pierre Morel Message-Id: <20180925231641.4954-15-akrowiak@linux.vnet.ibm.com> Signed-off-by: Christian Borntraeger commit 46a7263d4746a2659edafcb885e91e58bb6d3a2e Author: Tony Krowiak Date: Tue Sep 25 19:16:28 2018 -0400 s390: vfio-ap: zeroize the AP queues Let's call PAPQ(ZAPQ) to zeroize a queue for each queue configured for a mediated matrix device when it is released. Zeroizing a queue resets the queue, clears all pending messages for the queue entries and disables adapter interruptions associated with the queue. Signed-off-by: Tony Krowiak Reviewed-by: Halil Pasic Tested-by: Michael Mueller Tested-by: Farhan Ali Reviewed-by: Cornelia Huck Message-Id: <20180925231641.4954-14-akrowiak@linux.vnet.ibm.com> Signed-off-by: Christian Borntraeger commit e06670c5fe3b3a55547e2caeaec34acfdb4885e3 Author: Tony Krowiak Date: Tue Sep 25 19:16:27 2018 -0400 s390: vfio-ap: implement VFIO_DEVICE_GET_INFO ioctl Adds support for the VFIO_DEVICE_GET_INFO ioctl to the VFIO AP Matrix device driver. This is a minimal implementation, as vfio-ap does not use I/O regions. Signed-off-by: Tony Krowiak Reviewed-by: Pierre Morel Reviewed-by: Cornelia Huck Acked-by: Halil Pasic Tested-by: Michael Mueller Tested-by: Farhan Ali Tested-by: Pierre Morel Message-Id: <20180925231641.4954-13-akrowiak@linux.vnet.ibm.com> Signed-off-by: Christian Borntraeger commit 258287c994de8f2f52430b8d79b4fdf2c95f8c91 Author: Tony Krowiak Date: Tue Sep 25 19:16:26 2018 -0400 s390: vfio-ap: implement mediated device open callback Implements the open callback on the mediated matrix device. The function registers a group notifier to receive notification of the VFIO_GROUP_NOTIFY_SET_KVM event. When notified, the vfio_ap device driver will get access to the guest's kvm structure. The open callback must ensure that only one mediated device shall be opened per guest. Signed-off-by: Tony Krowiak Acked-by: Halil Pasic Tested-by: Michael Mueller Tested-by: Farhan Ali Tested-by: Pierre Morel Acked-by: Pierre Morel Reviewed-by: Cornelia Huck Message-Id: <20180925231641.4954-12-akrowiak@linux.vnet.ibm.com> Signed-off-by: Christian Borntraeger commit 805be7ddf3677be1de2b10feea8f1d7a8b736d3e Author: Leilk Liu Date: Fri Sep 28 18:53:04 2018 +0800 spi: mediatek: add spi slave for Mediatek MT2712 This patch adds basic spi slave for MT2712. Signed-off-by: Leilk Liu Signed-off-by: Mark Brown commit c0116e6b30473c7a75d33077bfd60f3b4eec7808 Author: Leilk Liu Date: Fri Sep 28 18:53:03 2018 +0800 spi: mediatek: add bindings for Mediatek MT2712 soc platform This patch adds a DT binding documentation for the MT2712 soc. Signed-off-by: Leilk Liu Signed-off-by: Mark Brown commit ef92ab3001c4656d3b9a7c4a8044b5bc08f6f6ef Author: Srinivas Kandagatla Date: Fri Sep 21 06:40:26 2018 -0700 nvmem: make nvmem_add_cells() static Now we have new api nvmem_add/del_cell_table() we do not want users to use nvmem_add_cells() anymore. So mark it accordingly. I guess it was missed in original cleanup patch. This also fixes below warning: core.c:355:5: warning: no previous prototype for 'nvmem_add_cells' [-Wmissing-prototypes] Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman commit 4876bfe6cdecc5037fed6959425fe0cb2af19d98 Author: Srinivas Kandagatla Date: Fri Sep 21 06:40:25 2018 -0700 nvmem: sunxi_sid: remove unused variable in probe This patch fixes below warning: sunxi_sid.c:157:6: warning: unused variable 'ret' [-Wunused-variable] Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman commit e7e07f4f7b452c8c2a113db28902e41c9daca855 Author: Bartosz Golaszewski Date: Fri Sep 21 06:40:24 2018 -0700 nvmem: use octal permissions instead of constants Checkpatch emits a warning when using symbolic permissions. Use octal permissions instead. Signed-off-by: Bartosz Golaszewski Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman commit 48f63a2c108a7d88562229f14124e464c6a40cb4 Author: Bartosz Golaszewski Date: Fri Sep 21 06:40:23 2018 -0700 nvmem: fix commenting style Remove a redundant '*/' as pointed out by checkpatch. Signed-off-by: Bartosz Golaszewski Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman commit 20167b70c894f20cd01e2579fad206de440816ef Author: Bartosz Golaszewski Date: Fri Sep 21 06:40:22 2018 -0700 nvmem: use EOPNOTSUPP instead of ENOSYS Checkpatch emits warnings when using ENOSYS. Some of the frameworks started using EOPNOTSUPP as return values for API functions when given subsystem is disabled in Kconfig. Signed-off-by: Bartosz Golaszewski Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman commit 165589f0cb52b34db12e15676a034b8f83dfa756 Author: Bartosz Golaszewski Date: Fri Sep 21 06:40:21 2018 -0700 nvmem: make the naming of arguments in nvmem_cell_get() consistent The argument representing the cell name in the nvmem_cell_get() family of functions is not consistend between function prototypes and definitions. Name it 'id' in all those routines. This is in line with other frameworks and can represent both the DT cell name from the nvmem-cell-names property as well as the con_id field from cell lookup entries. Signed-off-by: Bartosz Golaszewski Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman commit b1c1db9883c276fe41a04e9ce8f89576a64b1ac0 Author: Bartosz Golaszewski Date: Fri Sep 21 06:40:20 2018 -0700 nvmem: use SPDX license identifiers Use SPDX license identiefiers to core nvmem files and remove GPL 2.0 license boilerplate. Signed-off-by: Bartosz Golaszewski Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman commit bee1138bea15a640aaa9e9bb909af5b2762520e0 Author: Bartosz Golaszewski Date: Fri Sep 21 06:40:19 2018 -0700 nvmem: add a notifier chain Add a blocking notifier chain with four events (add and remove for both devices and cells) so that users can get notified about the addition of nvmem resources they're waiting for. We'll use this instead of the at24 setup callback in the mityomapl138 board file. Signed-off-by: Bartosz Golaszewski Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman commit 4903d19c209529bd2e127d483dc93b472980f33e Author: Bartosz Golaszewski Date: Fri Sep 21 06:40:18 2018 -0700 Documentation: nvmem: document cell tables and lookup entries Document the new nvmem kernel APIs. Signed-off-by: Bartosz Golaszewski Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman commit 506157be06ba28137b18b7419a4dccfa244f4983 Author: Bartosz Golaszewski Date: Fri Sep 21 06:40:17 2018 -0700 nvmem: add support for cell lookups from machine code Add a way for machine code users to associate devices with nvmem cells. This restores the support for non-DT systems but following a different approach. Cells must now be associated with devices using provided routines and data structures before they can be retrieved using nvmem_cell_get(). It's still possible to define cells statically in nvmem_config but cells created this way still need to be associated with consumers using lookup entries. Note that nvmem_find() must be moved higher in the source file as we want to call it from __nvmem_device_get() for devices that don't have a device node. The signature of __nvmem_device_get() is also changed as it's no longer used to retrieve cells. Signed-off-by: Bartosz Golaszewski Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman commit e888d445ac33a5b0288d670ecd970908b13f07cd Author: Bartosz Golaszewski Date: Fri Sep 21 06:40:16 2018 -0700 nvmem: resolve cells from DT at registration time Currently we're creating a new cell structure everytime a DT user calls nvmem_cell_get(). Change this behavior by resolving the cells during nvmem provider registration and adding all cells to the provider's list. Make of_nvmem_cell_get() just parse the phandle and look the cell up in the relevant provider's list. Don't drop the cell in nvmem_cell_put(). Signed-off-by: Bartosz Golaszewski Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman commit b985f4cba6dbb3b60ad119c6f7e5cbad6f0d7e45 Author: Bartosz Golaszewski Date: Fri Sep 21 06:40:15 2018 -0700 nvmem: add support for cell info Add new structs and routines allowing users to define nvmem cells from machine code. This global list of entries is parsed when a provider is registered and cells are associated with the relevant nvmem_device struct. A possible improvement for the future is to allow users to register cell tables after the nvmem provider has been registered by updating the cell list at each call to nvmem_(add|del)_cell_table(). Signed-off-by: Bartosz Golaszewski Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman commit c7235ee3f4b86a01507a12e96a4875ba9b4be842 Author: Bartosz Golaszewski Date: Fri Sep 21 06:40:14 2018 -0700 nvmem: remove the global cell list Nvmem subsystem keeps a global list of cells that, for non-DT systems, can only be referenced by cell name, which makes it impossible to have more than one nvmem device with cells named the same. This patch makes every nvmem device the owner of the list of its cells. This effectively removes the support for non-DT systems, but it will be reintroduced following a different approach in subsequent patches. This isn't a problem as support for board files in nvmem is currently broken anyway: any user that would try to get an nvmem cell from the global cell list would remove the cell after the calling nvmem_cell_put(). This can cause anything from a subsequent user not being able to get the cell to double free errors if more users hold reference to the same cell at the same time. Fortunately there are no such users which allows us to rework this part. Signed-off-by: Bartosz Golaszewski Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman commit bf58e8820c48805394ec9e76339f0c4646050432 Author: Bartosz Golaszewski Date: Fri Sep 21 06:40:13 2018 -0700 nvmem: change the signature of nvmem_unregister() We switched the nvmem framework to using kref instead of manually checking the current number of users in nvmem_unregister() so this function can no longer fail. We also converted all remaining users that still checked the return value of nvmem_unregister() to using devm_nvmem_register(). Make the routine return void. Signed-off-by: Bartosz Golaszewski Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman commit 7d9f9f24fac774ead58137dff13aa1f74eb5dd10 Author: Bartosz Golaszewski Date: Fri Sep 21 06:40:12 2018 -0700 nvmem: mxs-ocotp: use devm_nvmem_register() Use the resource managed variant of nvmem_register(); Signed-off-by: Bartosz Golaszewski Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman commit 226014d13fa5aa8d26caeebbd47d12ffd0a3c399 Author: Bartosz Golaszewski Date: Fri Sep 21 06:40:11 2018 -0700 nvmem: lpc18xx_eeprom: use devm_nvmem_register() Use the managed version of nvmem_register(). Signed-off-by: Bartosz Golaszewski Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman commit 6eed8dd9a513223185b62dd725fd35db60db7217 Author: Bartosz Golaszewski Date: Fri Sep 21 06:40:10 2018 -0700 nvmem: sunxi_sid: use devm_nvmem_register() Use the resource managed variant of nvmem_register(). Signed-off-by: Bartosz Golaszewski Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman commit 424d7033add17ce897305242901e14df1ff90195 Author: Bartosz Golaszewski Date: Fri Sep 21 06:40:09 2018 -0700 nvmem: sunxi_sid: return -ENOMEM if kzalloc() fails The driver currently returns -EINVAL if kzalloc() fails in probe(). Change it to -ENOMEM as it should be. Signed-off-by: Bartosz Golaszewski Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman commit c1de7f43bd84271e438a4f2dadc4ba9a353baaea Author: Bartosz Golaszewski Date: Fri Sep 21 06:40:08 2018 -0700 nvmem: use kref Use kref for reference counting. Use an approach similar to the one seen in the common clock subsystem: don't actually destroy the nvmem device until the last user puts it. This way we can get rid of the users check from nvmem_unregister(). Signed-off-by: Bartosz Golaszewski Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman commit fa72d847d68d7833b77a4bef944cf2c5baf56f49 Author: Bartosz Golaszewski Date: Fri Sep 21 06:40:07 2018 -0700 nvmem: check the return value of nvmem_add_cells() This function can fail so check its return value in nvmem_register() and act accordingly. Signed-off-by: Bartosz Golaszewski Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman commit f9fcb7e36cdec27e996606b8b33337056559f8da Author: Bartosz Golaszewski Date: Fri Sep 21 06:40:06 2018 -0700 nvmem: remove a stray newline There are two empty lines between devm_nvmem_unregister() and __nvmem_device_get(). Remove one. Signed-off-by: Bartosz Golaszewski Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman commit 1852183e142e01cff391b630a7578ff8ddb1a5fa Author: Bartosz Golaszewski Date: Fri Sep 21 06:40:05 2018 -0700 nvmem: use list_for_each_entry_safe in nvmem_device_remove_all_cells() Use the provided helper for iterating over list entries without having to use the list_entry() macro. Signed-off-by: Bartosz Golaszewski Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman commit 5db652c9f331ce7ae8662d9380ea4a404ba09344 Author: Bartosz Golaszewski Date: Fri Sep 21 06:40:04 2018 -0700 nvmem: remove the name field from struct nvmem_device This field is never set and is only used in a single error message. Remove the field and use nvmem_dev_name() instead. Signed-off-by: Bartosz Golaszewski Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman commit d7b9fd1669d4a4f38281c4e29f1408e1bdce09b3 Author: Bartosz Golaszewski Date: Fri Sep 21 06:40:03 2018 -0700 nvmem: provide nvmem_dev_name() Kernel users don't have any means of checking the names of nvmem devices. Add a routine that returns the name of the nvmem provider. This will be useful for future nvmem notifier subscribers - otherwise they can't check what device is being added/removed. Signed-off-by: Bartosz Golaszewski Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman commit 96d08fb43e30bb55fa1a76953097cf043807837b Author: Bartosz Golaszewski Date: Fri Sep 21 06:40:02 2018 -0700 eeprom: at25: use devm_nvmem_register() Use the resource managed variant of nvmem_register(). Signed-off-by: Bartosz Golaszewski Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman commit c853d6904f1428c081de5367da2569933556a668 Author: Bartosz Golaszewski Date: Fri Sep 21 06:40:01 2018 -0700 eeprom: eeprom_93xx46: use resource management Use resource managed variants of nvmem_register() and kzalloc(). Signed-off-by: Bartosz Golaszewski Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman commit 2e32188a66142b5b4c2dbdd6ac8dc6f54361f044 Author: Guido Kiener Date: Tue Sep 25 01:30:32 2018 +0200 usb: usbtmc: uninitialized symbol 'actual' in usbtmc_ioctl_abort_bulk_in_tag Fix uninitialized symbol 'actual' in function usbtmc_ioctl_abort_bulk_in_tag(). When symbol 'actual' is not initialized and usb_bulk_msg() fails, the subsequent kernel debug message shows invalid data. Signed-off-by: Guido Kiener Fixes: cbe743f1333b ("usb: usbtmc: Fix ioctl USBTMC_IOCTL_ABORT_BULK_IN") Signed-off-by: Greg Kroah-Hartman commit 9a83190300867fb024d53f47c31088e34188efc1 Author: Guido Kiener Date: Tue Sep 25 01:30:31 2018 +0200 usb: usbtmc: uninitialized symbol 'actual' in usbtmc_ioctl_clear Fix uninitialized symbol 'actual' in function usbtmc_ioctl_clear. When symbol 'actual' is not initialized and usb_bulk_msg() fails, the subsequent kernel debug message shows a random value. Signed-off-by: Guido Kiener Fixes: dfee02ac4bce ("usb: usbtmc: Fix ioctl USBTMC_IOCTL_CLEAR") Signed-off-by: Greg Kroah-Hartman commit b690020a498e33c098dd2b5554a7a59fc08b5ca4 Author: Guido Kiener Date: Tue Sep 25 01:30:30 2018 +0200 usb: usbtmc: uninitialized symbol 'actual' in usbtmc_read Fix uninitialized symbol 'actual' in function usbtmc_read. When symbol 'actual' is not initialized and usb_bulk_msg() fails, the subsequent kernel debug message shows a random value. Signed-off-by: Guido Kiener Fixes: d7604ff0dc01 ("usb: usbtmc: Optimize usbtmc_read") Signed-off-by: Greg Kroah-Hartman commit 100f2cdeadffb3e63121d1d59a60a9882258c415 Author: Guido Kiener Date: Tue Sep 25 01:30:29 2018 +0200 usb: usbtmc: Fix memory leak in usbtmc_ioctl_request Kernel memory is allocated twice in new function usbtmc_ioctl_request and creates a memory leak. This fix removes the superfluous kmalloc(). Signed-off-by: Guido Kiener Fixes: 658f24f4523e ("usb: usbtmc: Add ioctl for generic requests on control") Signed-off-by: Greg Kroah-Hartman commit 4d2a863fe9b952d7147bd169d54062e71f343415 Author: Yoshihiro Shimoda Date: Fri Sep 21 21:26:32 2018 +0900 usb: renesas_usbhs: add support for R-Car E3 This patch adds support for R-Car E3. This SoC needs to release the PLL reset by the UGCTRL register like R-Car D3. So, this patch adds a usbhs_of_match entry for this SoC with "USBHS_TYPE_RCAR_GEN3_WITH_PLL". Signed-off-by: Yoshihiro Shimoda Reviewed-by: Simon Horman Signed-off-by: Greg Kroah-Hartman commit bcddbd36777a494ed5d406b353d0530bde09d0e8 Author: Yoshihiro Shimoda Date: Fri Sep 21 21:26:31 2018 +0900 dt-bindings: usb: renesas_usbhs: add bindings for r8a77990 This patch adds bindings for r8a77990 (R-Car E3). Signed-off-by: Yoshihiro Shimoda Reviewed-by: Simon Horman Signed-off-by: Greg Kroah-Hartman commit 6b983aca28bbd4ac18fe42fe2b2dc14a9ce21e3b Author: Yoshihiro Shimoda Date: Fri Sep 21 21:26:30 2018 +0900 usb: renesas_usbhs: rcar3: Use OTG mode for R-Car D3 Since R-Car D3 can use OTG mode, this patch changes the UGCTRL2 value to UGCTRL2_USB0SEL_OTG and UGCTRL2_VBUSSEL like other R-Car Gen3 SoCs. Signed-off-by: Yoshihiro Shimoda Reviewed-by: Simon Horman Signed-off-by: Greg Kroah-Hartman commit eb757fff08b8c57c22643c65add0dc1a570d1342 Author: Yoshihiro Shimoda Date: Fri Sep 21 21:26:29 2018 +0900 Revert "usb: renesas_usbhs: set the mode by using extcon state for non-otg channel" This reverts commit cd14247d5c14b9b20bb3d3dfcaa899ca22c8dccc. R-Car D3 can use OTG mode in fact. So, the commit doesn't need anymore. Signed-off-by: Yoshihiro Shimoda Reviewed-by: Simon Horman Signed-off-by: Greg Kroah-Hartman commit 91b20c5a5be0088f9534483276f86230c3a5872f Author: Yoshihiro Shimoda Date: Fri Sep 21 21:26:28 2018 +0900 Revert "usb: renesas_usbhs: add extcon notifier to set mode for non-otg channel" This reverts commit 8ada211d0383b72878582bd312b984a9eae62b30. R-Car D3 can use OTG mode in fact. So, the commit doesn't need anymore. In other words, like other R-Car Gen3 SoCs, R-Car D3 can change the mode by using the phy-rcar-gen3-usb2 driver. Signed-off-by: Yoshihiro Shimoda Reviewed-by: Simon Horman Signed-off-by: Greg Kroah-Hartman commit 201af55da8a3986297d7c3493f839dfc96ffd7db Author: Jon Flatley Date: Thu Sep 20 10:17:54 2018 -0700 usb: core: added uevent for over-current After commit 1cbd53c8cd85 ("usb: core: introduce per-port over-current counters") usb ports expose a sysfs value 'over_current_count' to user space. This value on its own is not very useful as it requires manual polling. As a solution, fire a udev event from the usb hub device that specifies the values 'OVER_CURRENT_PORT' and 'OVER_CURRENT_COUNT' that indicate the path of the usb port where the over-current event occurred and the value of 'over_current_count' in sysfs. Additionally, call sysfs_notify() so the sysfs value supports poll(). Signed-off-by: Jon Flatley Signed-off-by: Greg Kroah-Hartman commit ea3b4d5523bc8d3e955075d3716af536d6212cc7 Author: Adam Thomson Date: Wed Sep 26 16:23:52 2018 +0100 usb: typec: fusb302: Resolve fixed power role contract setup When the controller is configured for a fixed power role (Source only or Sink only), attach does not proceed within the TCPM state machine as there is no CC event generated by this driver to update the CC line status. To rectify this, when CC is configured as Source or Sink we now make use of the hardware's automatic fixed Source or Sink toggling mechanism, which detects attaches in the same way as for DRP toggling. In this way the result of toggling is handled in the same way by the 'fusb302_handle_togdone()' function, and CC events are generated as expected for TCPM allowing a contract to be established. Signed-off-by: Adam Thomson Reviewed-by: Guenter Roeck Reviewed-by: Heikki Krogerus Signed-off-by: Greg Kroah-Hartman commit 40326e857c57a0095d3f9d72c14cb13aef4ca564 Author: Adam Thomson Date: Wed Sep 26 16:23:51 2018 +0100 usb: typec: fusb302: Correct spelling mistake for toggling state There's a typo in the enum name of the 'OFF' state for toggling (TOGGLINE instead of TOGGLING). This commit resolves that trivial spelling inconsistency. Signed-off-by: Adam Thomson Reviewed-by: Guenter Roeck Reviewed-by: Heikki Krogerus Signed-off-by: Greg Kroah-Hartman commit 330e2d61cdd58363eb5e66b2e72f76fe3c5492e0 Author: Anshuman Gupta Date: Thu Sep 20 19:13:40 2018 +0300 xhci: Avoid USB autosuspend when resuming USB2 ports. When USB bus host controller root hub resumes from autosuspend, it immediately tries to enter auto-suspend, but there can be a scenario when root hub is resuming its usb2 ports, in that particular case USB host controller auto suspend fails since it is busy to resuming its usb2 ports. This makes multiple failed cycles of auto-suspend until all usb2 ports of host controller root hub do not resume. This patch uses USB core framework usb_hcd_start_port_resume, usb_hcd_end_port_resume API's in order to autoresume/autosuspend root hub properly. Signed-off-by: Anshuman Gupta Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman commit e1c3c7e54ed3655c02248b4f1c7940aff4eecb56 Author: Thierry Reding Date: Thu Sep 20 19:13:39 2018 +0300 usb: xhci: tegra: Firmware header is little endian The XUSB firmware header is in little endian byte order, so make the fields __le32 and __le16 instead of u32 and u16 to avoid warnings from sparse when the fields are used with the endian-aware __le32_to_cpu() and __le16_to_cpu() accessors, respectively. Signed-off-by: Thierry Reding Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman commit 2815ef7fe4d43072b9eda448d04fbc184f2aa513 Author: Mathias Nyman Date: Thu Sep 20 19:13:38 2018 +0300 xhci-pci: allow host runtime PM as default for Intel Alpine and Titan Ridge The xhci controller on Alpine and Titan Ridge keeps the whole thunderbolt awake if the host controller is not allowed tp sleep. This is the case even if no USB devices are connected to the host. Because of this bigger impact, allow runtime pm as default for these xhci controllers in the driver. Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman commit f8f80be501aa2f10669585c3e328fad079d8cb3a Author: Mathias Nyman Date: Thu Sep 20 19:13:37 2018 +0300 xhci: Use soft retry to recover faster from transaction errors Use soft retry to recover from a USB Transaction Errors that are caused by temporary error conditions. The USB device is not aware that the xHC has halted the endpoint, and will be waiting for another retry A Soft Retry perform additional retries and recover from an error which has caused the xHC to halt an endpoint. Soft retry has some limitations: Soft Retry attempts shall not be performed on Isoch endpoints Soft Retry attempts shall not be performed if the device is behind a TT in a HS Hub Software shall limit the number of unsuccessful Soft Retry attempts to prevent an infinite loop. For more details on Soft retry see xhci specs 4.6.8.1 Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman commit c94d41e9dd1ba3f95ca958ff04adeb64e3d6a9be Author: Peter Chen Date: Thu Sep 20 19:13:36 2018 +0300 usb: host: xhci-plat: add platform TPL support The TPL support is used to identify targeted devices during EH2.0 and EH3.0 certification test, the user can add "tpl-support" at dts to enable this feature. Signed-off-by: Peter Chen Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman commit e995dccadaf99e216cf5410463941d978c455c58 Author: Chunfeng Yun Date: Thu Sep 20 19:13:35 2018 +0300 usb: xhci-mtk: supports SSP without external USB3 gen2 hub Supports SSP scheduling only for SSP device directly connected to root hub but not through external USB3 gen2 hub which need use a new scheduling way. Signed-off-by: Chunfeng Yun Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman commit 08e469de87a2534fda7a4605d33a2f287bd74684 Author: Chunfeng Yun Date: Thu Sep 20 19:13:34 2018 +0300 usb: xhci-mtk: supports bandwidth scheduling with multi-TT Supports LowSpeed and FullSpeed INT/ISOC bandwidth scheduling with USB multi-TT Signed-off-by: Chunfeng Yun Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman commit 95b516c18621d1626662bc161cbbf6281fd8d767 Author: Chunfeng Yun Date: Thu Sep 20 19:13:33 2018 +0300 usb: xhci-mtk: improve bandwidth scheduling Mainly improve SuperSpeed ISOC bandwidth in last microframe, and LowSpeed/FullSpeed IN INT/ISOC bandwidth in split and idle microframes by introduing a bandwidth budget table; Signed-off-by: Chunfeng Yun Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman commit 87173acc0d8f0987bda8827da35fff67f52ad15d Author: Chunfeng Yun Date: Thu Sep 20 19:13:32 2018 +0300 usb: xhci-mtk: fix ISOC error when interval is zero If the interval equal zero, needn't round up to power of two for the number of packets in each ESIT, so fix it. Signed-off-by: Chunfeng Yun Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman commit 7aae9990de20445e31f463836f26fdd02571740b Author: Chunfeng Yun Date: Thu Sep 20 19:13:31 2018 +0300 usb: xhci-mtk: use maximum ESIT payload of endpiont context Make use of maximum ESIT payload of endpoint context to calculate the number of packets to send in each ESIT Signed-off-by: Chunfeng Yun Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman commit a0ef2bdfa3b1497ac3d0cb348102c87c51f041a9 Author: Corentin Labbe Date: Wed Sep 19 19:48:53 2018 +0000 usb: host: Replace empty define with do while It's dangerous to use empty code define. Furthermore it lead to the following warning: "suggest braces around empty body in an « else » statement" So let's replace emptyness by "do {} while(0)" Furthermore, as suggested by Joe Perches, rename the macro to INCR. Signed-off-by: Corentin Labbe Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit ca2c4bee47f8f1d03edd3dad68472abd7752e1e6 Author: Tim Collier Date: Wed Sep 26 23:06:30 2018 +0100 staging: wlan-ng: remove "autogenerated code" comments p80211metadef.h and p80211metastruct.h both have comments stating they are autogenerated and should not be edited. However, neither is generated during build and both have had numerous manual edits since the driver has been in staging. Signed-off-by: Tim Collier Signed-off-by: Greg Kroah-Hartman commit 82ade3e5755643148af937f4cf930e52de03ea9c Author: Tim Collier Date: Wed Sep 26 23:06:29 2018 +0100 staging: wlan-ng: rejoin split lines shortened by case changes The reformatting of case blocks has shortened some lines such that previously split lines can be rejoined without exceeding 80 characters. Rejoined those lines. Signed-off-by: Tim Collier Signed-off-by: Greg Kroah-Hartman commit 27575665f39c8c23d2a55d96665acf7151aad005 Author: Tim Collier Date: Wed Sep 26 23:06:28 2018 +0100 staging: wlan-ng: make switch case block format consistent For switch statements with case blocks make the format consistent by applying K&R formatting, a space before the opening brace, single indentation of contained code, break inside the block and closing brace aligned with case. Signed-off-by: Tim Collier Signed-off-by: Greg Kroah-Hartman commit 04950c3faa212ada8753a316738030c21e013f75 Author: Tim Collier Date: Wed Sep 26 23:06:27 2018 +0100 staging: wlan-ng: formatting cleanup in cfg80211.c Combine previously split lines for an assignment; now fits in 80 characters as the name of the macro being assigned was shortened. Signed-off-by: Tim Collier Signed-off-by: Greg Kroah-Hartman commit 5df6baef4fa876f8b681f1ec058f32a5729732af Author: Tim Collier Date: Wed Sep 26 23:06:26 2018 +0100 staging: wlan-ng: rename DIDmib_p2_p2MAC_p2CurrentTxRate in p80211metadef.h Rename DIDmib_p2_p2MAC_p2CurrentTxRate in p80211metadef.h to DIDMIB_P2_MAC_CURRENTTXRATE to fix "Avoid CamelCase" message from checkpatch and conform to the coding style guidelines. Also shorten name by removing repeated use of "P2" to ease readability and reduce long lines. Signed-off-by: Tim Collier Signed-off-by: Greg Kroah-Hartman commit 78a35479eb9041872ecbbdaf298e6ff059f6dde8 Author: Tim Collier Date: Wed Sep 26 23:06:25 2018 +0100 staging: wlan-ng: rename DIDmib_p2_p2MAC in p80211metadef.h Rename DIDmib_p2_p2MAC in p80211metadef.h to DIDMIB_P2_MAC to fix "Avoid CamelCase" message from checkpatch and conform to the coding style guidelines. Also shorten name by removing repeated use of "P2" to ease readability and reduce long lines. Signed-off-by: Tim Collier Signed-off-by: Greg Kroah-Hartman commit 7ae2637abad9737a008292411d56c4b7a6ab2f98 Author: Tim Collier Date: Wed Sep 26 23:06:24 2018 +0100 staging: wlan-ng: rename DIDmib_p2_p2NIC_p2PRISupRange in p80211metadef.h Rename DIDmib_p2_p2NIC_p2PRISupRange in p80211metadef.h to DIDMIB_P2_NIC_PRISUPRANGE to fix "Avoid CamelCase" message from checkpatch and conform to the coding style guidelines. Also shorten name by removing repeated use of "P2" to ease readability and reduce long lines. Signed-off-by: Tim Collier Signed-off-by: Greg Kroah-Hartman commit a4857d8b30e7e6b1b656d7e9c44b49ccc7e5ef71 Author: Tim Collier Date: Wed Sep 26 23:06:23 2018 +0100 staging: wlan-ng: rename DIDmib_p2_p2Static_p2CnfPortType in p80211metadef.h Rename DIDmib_p2_p2Static_p2CnfPortType in p80211metadef.h to DIDMIB_P2_STATIC_CNFPORTTYPE to fix "Avoid CamelCase" message from checkpatch and conform to the coding style guidelines. Also shorten name by removing repeated use of "P2" to ease readability and reduce long lines. Signed-off-by: Tim Collier Signed-off-by: Greg Kroah-Hartman commit 35184f81021281f84d1b6044138e89cfc96284ea Author: Tim Collier Date: Wed Sep 26 23:06:22 2018 +0100 staging: wlan-ng: rename DIDmib_p2_p2Static in p80211metadef.h Rename DIDmib_p2_p2Static in p80211metadef.h to DIDMIB_P2_STATIC to fix "Avoid CamelCase" message from checkpatch and conform to the coding style guidelines. Also shorten name by removing repeated use of "P2" to ease readability and reduce long lines. Signed-off-by: Tim Collier Signed-off-by: Greg Kroah-Hartman commit 4a2f42dd2b126d66688c9ce9b29613ac486031a8 Author: Tim Collier Date: Wed Sep 26 23:06:21 2018 +0100 staging: wlan-ng: rename DIDmib_cat_p2 in p80211metadef.h Rename DIDmib_cat_p2 in p80211metadef.h to DIDMIB_CAT_P2 to fix "Avoid CamelCase" message from checkpatch and conform to the coding style guidelines. Signed-off-by: Tim Collier Signed-off-by: Greg Kroah-Hartman commit a3ac4591b647e93b616455365dace5d62eee7595 Author: Tim Collier Date: Wed Sep 26 23:06:20 2018 +0100 staging: wlan-ng: rename DIDmib_lnx_lnxConfigTable_lnxRSNAIE in p80211metadef.h Rename DIDmib_lnx_lnxConfigTable_lnxRSNAIE in p80211metadef.h to DIDMIB_LNX_CONFIGTABLE_RSNAIE to fix "Avoid CamelCase" message from checkpatch and conform to the coding style guidelines. Also shorten name by removing repeated use of "LNX" to ease readability and reduce long lines. Signed-off-by: Tim Collier Signed-off-by: Greg Kroah-Hartman commit 05cdb125f7ed0183c0c063b5439a308dff8853f3 Author: Tim Collier Date: Wed Sep 26 23:06:19 2018 +0100 staging: wlan-ng: rename DIDmib_lnx_lnxConfigTable in p80211metadef.h Rename DIDmib_lnx_lnxConfigTable in p80211metadef.h to DIDMIB_LNX_CONFIGTABLE to fix "Avoid CamelCase" message from checkpatch and conform to the coding style guidelines. Also shorten name by removing repeated use of "LNX" to ease readability and reduce long lines. Signed-off-by: Tim Collier Signed-off-by: Greg Kroah-Hartman commit 8ddafa153436214156fa705b5cd7bc1d4b239a0c Author: Tim Collier Date: Wed Sep 26 23:06:18 2018 +0100 staging: wlan-ng: rename DIDmib_cat_lnx in p80211metadef.h Rename DIDmib_cat_lnx in p80211metadef.h to DIDMIB_CAT_LNX to fix "Avoid CamelCase" message from checkpatch and conform to the coding style guidelines. Signed-off-by: Tim Collier Signed-off-by: Greg Kroah-Hartman commit 93d5a1dce98c0313d7fe61895bd9a34daddb4333 Author: Tim Collier Date: Wed Sep 26 23:06:17 2018 +0100 staging: wlan-ng: rename DIDmib_dot11phy_dot11PhyDSSSTable_dot11CurrentChannel in p80211metadef.h Rename DIDmib_dot11phy_dot11PhyDSSSTable_dot11CurrentChannel in p80211metadef.h to DIDMIB_DOT11PHY_DSSSTABLE_CURRENTCHANNEL to fix "Avoid CamelCase" message from checkpatch and conform to the coding style guidelines. Also shorten name by removing repeated use of "DOT11" and "DOT11PHY" to ease readability and reduce long lines. Signed-off-by: Tim Collier Signed-off-by: Greg Kroah-Hartman commit 80908dcb26339ad036b40989d7da6d6d42383235 Author: Tim Collier Date: Wed Sep 26 23:06:16 2018 +0100 staging: wlan-ng: rename DIDmib_dot11phy_dot11PhyDSSSTable in p80211metadef.h Rename DIDmib_dot11phy_dot11PhyDSSSTable in p80211metadef.h to DIDMIB_DOT11PHY_DSSSTABLE to fix "Avoid CamelCase" message from checkpatch and conform to the coding style guidelines. Also shorten name by removing repeated use of "DOT11PHY" to ease readability and reduce long lines. Signed-off-by: Tim Collier Signed-off-by: Greg Kroah-Hartman commit c9a89f4e7a58db1f156f126976eed7884e2041e7 Author: Tim Collier Date: Wed Sep 26 23:06:15 2018 +0100 staging: wlan-ng: rename DIDmib_dot11phy_dot11PhyTxPowerTable_dot11CurrentTxPowerLevel in p80211metadef.h Rename DIDmib_dot11phy_dot11PhyTxPowerTable_dot11CurrentTxPowerLevel in p80211metadef.h to DIDMIB_DOT11PHY_TXPOWERTABLE_CURRENTTXPOWERLEVEL to fix "Avoid CamelCase" message from checkpatch and conform to the coding style guidelines. Also shorten name by removing repeated use of "DOT11" and "DOT11PHY" to ease readability and reduce long lines. Signed-off-by: Tim Collier Signed-off-by: Greg Kroah-Hartman commit 88e3676ad5de67ba9048289e95115644c22815fd Author: Tim Collier Date: Wed Sep 26 23:06:14 2018 +0100 staging: wlan-ng: rename DIDmib_dot11phy_dot11PhyOperationTable in p80211metadef.h Rename DIDmib_dot11phy_dot11PhyOperationTable in p80211metadef.h to DIDMIB_DOT11PHY_OPERATIONTABLE to fix "Avoid CamelCase" message from checkpatch and conform to the coding style guidelines. Also shorten name by removing repeated use of "DOT11PHY" to ease readability and reduce long lines. Signed-off-by: Tim Collier Signed-off-by: Greg Kroah-Hartman commit 8bb22013ee0ed58ddd0c932abe3feb3023da3714 Author: Tim Collier Date: Wed Sep 26 23:06:13 2018 +0100 staging: wlan-ng: rename DIDmib_cat_dot11phy in p80211metadef.h Rename DIDmib_cat_dot11phy in p80211metadef.h to DIDMIB_CAT_DOT11PHY to fix "Avoid CamelCase" message from checkpatch and conform to the coding style guidelines. Signed-off-by: Tim Collier Signed-off-by: Greg Kroah-Hartman commit e1f3748dbad982c70ad0448a9f75ac9f2167b72d Author: Tim Collier Date: Wed Sep 26 23:06:12 2018 +0100 staging: wlan-ng: rename DIDmib_dot11mac_dot11OperationTable_dot11MaxTransmitMSDULifetime in p80211metadef.h Rename DIDmib_dot11mac_dot11OperationTable_dot11MaxTransmitMSDULifetime in p80211metadef.h to DIDMIB_DOT11MAC_OPERATIONTABLE_MAXTRANSMITMSDULIFETIME to fix "Avoid CamelCase" message from checkpatch and conform to the coding style guidelines. Also shorten name by removing repeated use of "DOT11" to ease readability and reduce long lines. Signed-off-by: Tim Collier Signed-off-by: Greg Kroah-Hartman commit 04bbfc2ab0c1b99d963200f7ba770fbbd86bcac3 Author: Tim Collier Date: Wed Sep 26 23:06:11 2018 +0100 staging: wlan-ng: rename DIDmib_dot11mac_dot11OperationTable_dot11FragmentationThreshold in p80211metadef.h Rename DIDmib_dot11mac_dot11OperationTable_dot11FragmentationThreshold in p80211metadef.h to DIDMIB_DOT11MAC_OPERATIONTABLE_FRAGMENTATIONTHRESHOLD to fix "Avoid CamelCase" message from checkpatch and conform to the coding style guidelines. Also shorten name by removing repeated use of "DOT11" to ease readability and reduce long lines. Signed-off-by: Tim Collier Signed-off-by: Greg Kroah-Hartman commit 6bcf3b632e53a72247d08702c99078a1e789cc43 Author: Tim Collier Date: Wed Sep 26 23:06:10 2018 +0100 staging: wlan-ng: rename DIDmib_dot11mac_dot11OperationTable_dot11LongRetryLimit in p80211metadef.h Rename DIDmib_dot11mac_dot11OperationTable_dot11LongRetryLimitin p80211metadef.h to DIDMIB_DOT11MAC_OPERATIONTABLE_LONGRETRYLIMIT to fix "Avoid CamelCase" message from checkpatch and conform to the coding style guidelines. Also shorten name by removing repeated use of "DOT11" to ease readability and reduce long lines. Signed-off-by: Tim Collier Signed-off-by: Greg Kroah-Hartman commit 59db1438a061489c3a32c39611b290278158c012 Author: Tim Collier Date: Wed Sep 26 23:06:09 2018 +0100 staging: wlan-ng: rename DIDmib_dot11mac_dot11OperationTable_dot11ShortRetryLimit in p80211metadef.h Rename DIDmib_dot11mac_dot11OperationTable_dot11ShortRetryLimit in p80211metadef.h to DIDMIB_DOT11MAC_OPERATIONTABLE_SHORTRETRYLIMIT to fix "Avoid CamelCase" message from checkpatch and conform to the coding style guidelines. Also shorten name by removing repeated use of "DOT11" to ease readability and reduce long lines. Signed-off-by: Tim Collier Signed-off-by: Greg Kroah-Hartman commit 334e5e6809c7a8dcdb1451aab86c5f6e3926c977 Author: Tim Collier Date: Wed Sep 26 23:06:08 2018 +0100 staging: wlan-ng: DIDmib_dot11mac_dot11OperationTable_dot11RTSThreshold in p80211metadef.h Rename DIDmib_dot11mac_dot11OperationTable_dot11RTSThreshold in p80211metadef.h to DIDMIB_DOT11MAC_OPERATIONTABLE_RTSTHRESHOLD to fix "Avoid CamelCase" message from checkpatch and conform to the coding style guidelines. Also shorten name by removing repeated use of "DOT11" to ease readability and reduce long lines. Signed-off-by: Tim Collier Signed-off-by: Greg Kroah-Hartman commit 3b1a14e45090e599b938870955748c706bd215de Author: Tim Collier Date: Wed Sep 26 23:06:07 2018 +0100 staging: wlan-ng: rename DIDmib_dot11mac_dot11OperationTable_dot11MACAddress in p80211metadef.h Rename DIDmib_dot11mac_dot11OperationTable_dot11MACAddress in p80211metadef.h to DIDMIB_DOT11MAC_OPERATIONTABLE_MACADDRESS to fix "Avoid CamelCase" message from checkpatch and conform to the coding style guidelines. Also shorten name by removing repeated use of "DOT11" to ease readability and reduce long lines. Signed-off-by: Tim Collier Signed-off-by: Greg Kroah-Hartman commit 4643ffa46349809a39234257bcfd29c0d07fdd1d Author: Tim Collier Date: Wed Sep 26 23:06:06 2018 +0100 staging: wlan-ng: rename DIDmib_dot11mac_dot11OperationTable in p80211metadef.h Rename DIDmib_dot11mac_dot11OperationTable in p80211metadef.h to DIDMIB_DOT11MAC_OPERATIONTABLE to fix "Avoid CamelCase" message from checkpatch and conform to the coding style guidelines. Also shorten name by removing repeated use of "DOT11" to ease readability and reduce long lines. Signed-off-by: Tim Collier Signed-off-by: Greg Kroah-Hartman commit 2ddc995d05eb5965321f269328fdc6f8223ea919 Author: Tim Collier Date: Wed Sep 26 23:06:05 2018 +0100 staging: wlan-ng: rename DIDmib_dot11smt_dot11PrivacyTable_dot11ExcludeUnencrypted in p80211metadef.h Rename DIDmib_dot11smt_dot11PrivacyTable_dot11ExcludeUnencrypted in p80211metadef.h to DIDMIB_DOT11SMT_PRIVACYTABLE_EXCLUDEUNENCRYPTED to fix "Avoid CamelCase" message from checkpatch and conform to the coding style guidelines. Also shorten name by removing repeated use of "DOT11" to ease readability and reduce long lines. Signed-off-by: Tim Collier Signed-off-by: Greg Kroah-Hartman commit eeeeacd83720c18364cdb7cef36510f4a4569964 Author: Tim Collier Date: Wed Sep 26 23:06:04 2018 +0100 staging: wlan-ng: rename DIDmib_dot11smt_dot11PrivacyTable_dot11WEPDefaultKeyID in p80211metadef.h Rename DIDmib_dot11smt_dot11PrivacyTable_dot11WEPDefaultKeyID in p80211metadef.h to DIDMIB_DOT11SMT_PRIVACYTABLE_WEPDEFAULTKEYID to fix "Avoid CamelCase" message from checkpatch and conform to the coding style guidelines. Also shorten name by removing repeated use of "DOT11" to ease readability and reduce long lines. Signed-off-by: Tim Collier Signed-off-by: Greg Kroah-Hartman commit 184fcaa1935ee29d8d73f12fe309389a1c29d059 Author: Tim Collier Date: Wed Sep 26 23:06:03 2018 +0100 staging: wlan-ng: rename DIDmib_dot11smt_dot11PrivacyTable_dot11PrivacyInvoked in p80211metadef.h Rename DIDmib_dot11smt_dot11PrivacyTable_dot11PrivacyInvoked to DIDMIB_DOT11SMT_PRIVACYTABLE_PRIVACYINVOKED to fix "Avoid CamelCase" message from checkpatch and conform to the coding style guidelines. Also shorten name by removing repeated use of "DOT11" to ease readability and reduce long lines. Signed-off-by: Tim Collier Signed-off-by: Greg Kroah-Hartman commit 4b3c694ad54ce31ae66c2b87a2a3f792e63c0e28 Author: Tim Collier Date: Wed Sep 26 23:06:02 2018 +0100 staging: wlan-ng: rename DIDmib_dot11smt_dot11PrivacyTable in p80211metadef.h Rename DIDmib_dot11smt_dot11PrivacyTable to DIDMIB_DOT11SMT_PRIVACYTABLE to fix "Avoid CamelCase" message from checkpatch and conform to the coding style guidelines. Also shorten name by removing repeated use of "DOT11" to ease readability and reduce long lines. Signed-off-by: Tim Collier Signed-off-by: Greg Kroah-Hartman commit ce0f34e4af71d73b727f707e143dda1fcf5cffbe Author: Tim Collier Date: Wed Sep 26 23:06:01 2018 +0100 staging: wlan-ng: rename DIDmib_dot11smt_dot11WEPDefaultKeysTable_key in p80211metadef.h Rename DIDmib_dot11smt_dot11WEPDefaultKeysTable_key in p80211metadef.h to didmib_dot11smt_wepdefaultkeystable_key to fix "Avoid CamelCase" message from checkpatch and conform to the coding style guidelines. Also shorten name by removing repeated use of "DOT11" to ease readability and reduce long lines. Signed-off-by: Tim Collier Signed-off-by: Greg Kroah-Hartman commit 92506a11e5dba98c8ae48aa9091646293b25ccce Author: Tim Collier Date: Wed Sep 26 23:06:00 2018 +0100 staging: wlan-ng: rename DIDmib_dot11smt_dot11WEPDefaultKeysTable in p80211metadef.h Rename DIDmib_dot11smt_dot11WEPDefaultKeysTable in p80211metadef.h to DIDMIB_DOT11SMT_WEPDEFAULTKEYSTABLE to fix "Avoid CamelCase" message from checkpatch and conform to the coding style guidelines. Also shorten name by removing repeated use of "DOT11" to ease readability and reduce long lines. Signed-off-by: Tim Collier Signed-off-by: Greg Kroah-Hartman commit 454b3aeb5780776a1b43ec1e5db8590f335777b0 Author: Tim Collier Date: Wed Sep 26 23:05:59 2018 +0100 staging: wlan-ng: rename DIDmib_cat_dot11smt in p80211metadef.h Rename DIDmib_cat_dot11smt in p80211metadef.h to DIDMIB_CAT_DOT11SMT to fix "Avoid CamelCase" message from checkpatch and conform to the coding style guidelines. Signed-off-by: Tim Collier Signed-off-by: Greg Kroah-Hartman commit 49e3d61d1b1c82f893d2b2181918892d429b0624 Author: Tim Collier Date: Wed Sep 26 23:05:58 2018 +0100 staging: wlan-ng: rename DIDmsg_p2req_flashdl_write in p80211metadef.h Rename DIDmsg_p2req_flashdl_write in p80211metadef.h to DIDMSG_P2REQ_FLASHDL_WRITE to fix "Avoid CamelCase" message from checkpatch and conform to the coding style guidelines. Signed-off-by: Tim Collier Signed-off-by: Greg Kroah-Hartman commit 6051d4e5d7dc0c2d98b42e426d98c48138ffb0a6 Author: Tim Collier Date: Wed Sep 26 23:05:57 2018 +0100 staging: wlan-ng: rename DIDmsg_p2req_flashdl_state in p80211metadef.h Rename DIDmsg_p2req_flashdl_state in p80211metadef.h to DIDMSG_P2REQ_FLASHDL_STATE to fix "Avoid CamelCase" message from checkpatch and conform to the coding style guidelines. Signed-off-by: Tim Collier Signed-off-by: Greg Kroah-Hartman commit 8fb830b56d243a540ac2a3cd7e038e8df8ecb9af Author: Tim Collier Date: Wed Sep 26 23:05:56 2018 +0100 staging: wlan-ng: rename DIDmsg_p2req_ramdl_write_resultcode in p80211metadef.h Rename DIDmsg_p2req_ramdl_write_resultcode in p80211metadef.h to DIDMSG_P2REQ_RAMDL_WRITE_RESULTCODE to fix "Avoid CamelCase" message from checkpatch and conform to the coding style guidelines. Signed-off-by: Tim Collier Signed-off-by: Greg Kroah-Hartman commit 74f11efc08d426a760803901b3fee10716408f0e Author: Tim Collier Date: Wed Sep 26 23:05:55 2018 +0100 staging: wlan-ng: rename DIDmsg_p2req_ramdl_write_data in p80211metadef.h Rename DIDmsg_p2req_ramdl_write_data in p80211metadef.h to DIDMSG_P2REQ_RAMDL_WRITE_DATA to fix "Avoid CamelCase" message from checkpatch and conform to the coding style guidelines. Signed-off-by: Tim Collier Signed-off-by: Greg Kroah-Hartman commit 9940d6b6f90505f78813f9bce9e8d934fdc312dc Author: Tim Collier Date: Wed Sep 26 23:05:54 2018 +0100 staging: wlan-ng: rename DIDmsg_p2req_ramdl_write_len in p80211metadef.h Rename DIDmsg_p2req_ramdl_write_len to DIDMSG_P2REQ_RAMDL_WRITE_LEN to fix "Avoid CamelCase" message from checkpatch and conform to the coding style guidelines. Signed-off-by: Tim Collier Signed-off-by: Greg Kroah-Hartman commit c2a348b838ac12170c40ee63c0e4b605e6c6591d Author: Tim Collier Date: Wed Sep 26 23:05:53 2018 +0100 staging: wlan-ng: rename DIDmsg_p2req_ramdl_write_addr in p80211metadef.h Rename DIDmsg_p2req_ramdl_write_addr in p80211metadef.h to DIDMSG_P2REQ_RAMDL_WRITE_ADDR to fix "Avoid CamelCase" message from checkpatch and conform to the coding style guidelines. Signed-off-by: Tim Collier Signed-off-by: Greg Kroah-Hartman commit e0959e9b7a398f53aadfd48ba09bad7e6d76efc3 Author: Tim Collier Date: Wed Sep 26 23:05:52 2018 +0100 staging: wlan-ng: rename DIDmsg_p2req_ramdl_write in p80211metadef.h Rename DIDmsg_p2req_ramdl_write in p80211metadef.h to DIDMSG_P2REQ_RAMDL_WRITE to fix "Avoid CamelCase" message from checkpatch and conform to the coding style guidelines. Signed-off-by: Tim Collier Signed-off-by: Greg Kroah-Hartman commit 8843c1fb98c940a60431ab12c9c504147b88ea99 Author: Tim Collier Date: Wed Sep 26 23:05:51 2018 +0100 staging: wlan-ng: rename DIDmsg_p2req_ramdl_state_resultcode in p80211metadef.h Rename DIDmsg_p2req_ramdl_state_resultcode in p80211metadef.h to DIDMSG_P2REQ_RAMDL_STATE_RESULTCODE to fix "Avoid CamelCase" message from checkpatch and conform to the coding style guidelines. Signed-off-by: Tim Collier Signed-off-by: Greg Kroah-Hartman commit 9ea4ffecf1146e9df748b8f83d437f5666e88e6d Author: Tim Collier Date: Wed Sep 26 23:05:50 2018 +0100 staging: wlan-ng: rename DIDmsg_p2req_ramdl_state_exeaddr in p80211metadef.h Rename DIDmsg_p2req_ramdl_state_exeaddr in p80211metadef.h to DIDMSG_P2REQ_RAMDL_STATE_EXEADDR to fix "Avoid CamelCase" message from checkpatch and conform to the coding style guidelines. Signed-off-by: Tim Collier Signed-off-by: Greg Kroah-Hartman commit 380ad4f6779478210f2dd4a98cec9723cbc9cb58 Author: Tim Collier Date: Wed Sep 26 23:05:49 2018 +0100 staging: wlan-ng: rename DIDmsg_p2req_ramdl_state_enable in p80211metadef.h Rename DIDmsg_p2req_ramdl_state_enable in p80211metadef.h to DIDMSG_P2REQ_RAMDL_STATE_ENABLE to fix "Avoid CamelCase" message from checkpatch and conform to the coding style guidelines. Signed-off-by: Tim Collier Signed-off-by: Greg Kroah-Hartman commit f1364a0d5404fa39195f4fe9c03528f455c12c98 Author: Tim Collier Date: Wed Sep 26 23:05:48 2018 +0100 staging: wlan-ng: rename DIDmsg_p2req_ramdl_state in p80211metadef.h Rename DIDmsg_p2req_ramdl_state to DIDMSG_P2REQ_RAMDL_STATE in p80211metadef.h to fix "Avoid CamelCase" message from checkpatch and conform to the coding style guidelines. Signed-off-by: Tim Collier Signed-off-by: Greg Kroah-Hartman commit 020600ae8dbad42aac0a297221538d3c88492482 Author: Tim Collier Date: Wed Sep 26 23:05:47 2018 +0100 staging: wlan-ng: rename DIDmsg_p2req_readpda_resultcode in p80211metadef.h Rename DIDmsg_p2req_readpda_resultcode in p80211metadef.h to DIDMSG_P2REQ_READPDA_RESULTCODE to fix "Avoid CamelCase" message from checkpatch and conform to the coding style guidelines. Signed-off-by: Tim Collier Signed-off-by: Greg Kroah-Hartman commit 97be75510a36f548feb0c662493f784756456f12 Author: Tim Collier Date: Wed Sep 26 23:05:46 2018 +0100 staging: wlan-ng: rename DIDmsg_dot11ind_associate in p80211metadef.h Rename DIDmsg_dot11ind_associate in p80211metadef.h to DIDMSG_DOT11IND_ASSOCIATE to fix "Avoid CamelCase" message from checkpatch and conform to the coding style guidelines. Signed-off-by: Tim Collier Signed-off-by: Greg Kroah-Hartman commit 5a16b37eb1392936de66731d77034d765bf36018 Author: Tim Collier Date: Wed Sep 26 23:05:45 2018 +0100 staging: wlan-ng: rename DIDmsg_p2req_readpda_pda in p80211metadef.h Rename DIDmsg_p2req_readpda_pda in p80211metadef.h to DIDMSG_P2REQ_READPDA_PDA to fix "Avoid CamelCase" message from checkpatch and conform to the coding style guidelines. Signed-off-by: Tim Collier Signed-off-by: Greg Kroah-Hartman commit f9f0e98fee80ca2b285b230418444e49120bdaa1 Author: Tim Collier Date: Wed Sep 26 23:05:44 2018 +0100 staging: wlan-ng: rename DIDmsg_p2req_readpda in p80211metadef.h Rename DIDmsg_p2req_readpda in p80211metadef.h to DIDMSG_P2REQ_READPDA to fix "Avoid CamelCase" message from checkpatch and conform to the coding style guidelines. Signed-off-by: Tim Collier Signed-off-by: Greg Kroah-Hartman commit b1f1118bfcbc55ddc7fdc8ce297f032450a8772e Author: Tim Collier Date: Wed Sep 26 23:05:43 2018 +0100 staging: wlan-ng: rename DIDmsg_lnxreq_autojoin in p80211metadef.h Rename DIDmsg_lnxreq_autojoin in p80211metadef.h to DIDMSG_LNXREQ_AUTOJOIN to fix "Avoid CamelCase" message from checkpatch and conform to the coding style guidelines. Signed-off-by: Tim Collier Signed-off-by: Greg Kroah-Hartman commit 3b6ee1238f64e18613aeca286a6abcb0fb416218 Author: Tim Collier Date: Wed Sep 26 23:05:42 2018 +0100 staging: wlan-ng: rename DIDmsg_lnxreq_commsquality in p80211metadef.h Rename DIDmsg_lnxreq_commsquality in p80211metadef.h to DIDMSG_LNXREQ_COMMSQUALITY to fix "Avoid CamelCase" message from checkpatch and conform to the coding style guidelines. Signed-off-by: Tim Collier Signed-off-by: Greg Kroah-Hartman commit e4143ab0daeaccfdda383cec7fa29a5e246f4d30 Author: Tim Collier Date: Wed Sep 26 23:05:41 2018 +0100 staging: wlan-ng: rename DIDmsg_lnxreq_hostwep in p80211metadef.h Rename DIDmsg_lnxreq_hostwep in p80211metadef.h to DIDMSG_LNXREQ_HOSTWEP to fix "Avoid CamelCase" message from checkpatch and conform to the coding style guidelines. Signed-off-by: Tim Collier Signed-off-by: Greg Kroah-Hartman commit f64412ec543eec6a61cbed5b21282c9dd51ca16b Author: Tim Collier Date: Wed Sep 26 23:05:40 2018 +0100 staging: wlan-ng: rename DIDmsg_lnxreq_wlansniff in p80211metadef.h Rename DIDmsg_lnxreq_wlansniff in p80211metadef.h to DIDMSG_LNXREQ_WLANSNIFF to fix "Avoid CamelCase" message from checkpatch and conform to the coding style guidelines. Signed-off-by: Tim Collier Signed-off-by: Greg Kroah-Hartman commit eb7c161c2685acb973c534e12613f62b8e853f2a Author: Tim Collier Date: Wed Sep 26 23:05:39 2018 +0100 staging: wlan-ng: rename DIDmsg_lnxreq_ifstate in p80211metadef.h Rename DIDmsg_lnxreq_ifstate in p80211metadef.h to DIDMSG_LNXREQ_IFSTATE to fix "Avoid CamelCase" message from checkpatch and conform to the coding style guidelines. Signed-off-by: Tim Collier Signed-off-by: Greg Kroah-Hartman commit 59155a817795fe3c64dbcc640acbad5ee9201e00 Author: Tim Collier Date: Wed Sep 26 23:05:38 2018 +0100 staging: wlan-ng: rename DIDmsg_dot11ind_authenticate in p80211metadef.h Rename DIDmsg_dot11ind_authenticate in p80211metadef.h to DIDMSG_DOT11IND_AUTHENTICATE to fix "Avoid CamelCase" message from checkpatch and conform to the coding style guidelines. Signed-off-by: Tim Collier Signed-off-by: Greg Kroah-Hartman commit f097e415f9983e1df2d6215669a3bc6c04882868 Author: Tim Collier Date: Wed Sep 26 23:05:37 2018 +0100 staging: wlan-ng: rename DIDmsg_dot11req_start in p80211metadef.h Rename DIDmsg_dot11req_start in p80211metadef.h to DIDMSG_DOT11REQ_START to fix "Avoid CamelCase" message from checkpatch and conform to the coding style guidelines. Signed-off-by: Tim Collier Signed-off-by: Greg Kroah-Hartman commit e3186790a5c0fb4b7e464cd1227c4206850ad9f8 Author: Tim Collier Date: Wed Sep 26 23:05:36 2018 +0100 staging: wlan-ng: rename DIDmsg_dot11req_scan_results in p80211metadef.h Rename DIDmsg_dot11req_scan_results in p80211metadef.h to DIDMSG_DOT11REQ_SCAN_RESULTS to fix "Avoid CamelCase" message from checkpatch and conform to the coding style guidelines. Signed-off-by: Tim Collier Signed-off-by: Greg Kroah-Hartman commit 1ffaa906c303b801a0e3030908096ba7c0a1863e Author: Tim Collier Date: Wed Sep 26 23:05:35 2018 +0100 staging: wlan-ng: rename DIDmsg_dot11req_scan in p80211metadef.h Rename DIDmsg_dot11req_scan in p80211metadef.h to DIDMSG_DOT11REQ_SCAN to fix "Avoid CamelCase" message from checkpatch and conform to the coding style guidelines. Signed-off-by: Tim Collier Signed-off-by: Greg Kroah-Hartman commit 2a29a8739c384f950bbbd52e03c83d5a69ec1035 Author: Tim Collier Date: Wed Sep 26 23:05:34 2018 +0100 staging: wlan-ng: rename DIDmsg_dot11req_mibset_resultcode in p80211metadef.h Rename DIDmsg_dot11req_mibset_resultcode in p80211metadef.h to DIDMSG_DOT11REQ_MIBSET_RESULTCODE to fix "Avoid CamelCase" message from checkpatch and conform to the coding style guidelines. Signed-off-by: Tim Collier Signed-off-by: Greg Kroah-Hartman commit a6aace62f2fcab00cea33cd6c3f6e62136e50fd7 Author: Tim Collier Date: Wed Sep 26 23:05:33 2018 +0100 staging: wlan-ng: rename DIDmsg_dot11req_mibset_mibattribute in p80211metadef.h Rename DIDmsg_dot11req_mibset_mibattribute in p80211metadef.h to DIDMSG_DOT11REQ_MIBSET_MIBATTRIBUTE to fix "Avoid CamelCase" message from checkpatch and conform to the coding style guidelines. Signed-off-by: Tim Collier Signed-off-by: Greg Kroah-Hartman commit e409d2bc2bb0366a8ddf65bacc798b4282b2b2b5 Author: Tim Collier Date: Wed Sep 26 23:05:32 2018 +0100 staging: wlan-ng: rename DIDmsg_dot11req_mibset in p80211metadef.h Rename DIDmsg_dot11req_mibset in p80211metadef.h to DIDMSG_DOT11REQ_MIBSET to fix "Avoid CamelCase" message from checkpatch and conform to the coding style guidelines. Signed-off-by: Tim Collier Signed-off-by: Greg Kroah-Hartman commit 42ccd88bcde7accab3c8f1a1ae3181d5451e3bf7 Author: Tim Collier Date: Wed Sep 26 23:05:31 2018 +0100 staging: wlan-ng: rename DIDmsg_dot11req_mibget_resultcode in p80211metadef.h Rename DIDmsg_dot11req_mibget_resultcode in p80211metadef.h to DIDMSG_DOT11REQ_MIBGET_RESULTCODE to fix "Avoid CamelCase" message from checkpatch and conform to the coding style guidelines. Signed-off-by: Tim Collier Signed-off-by: Greg Kroah-Hartman commit 86ec606270426d07dee6dfc15a7c6397de9cc492 Author: Tim Collier Date: Wed Sep 26 23:05:30 2018 +0100 staging: wlan-ng: rename DIDmsg_dot11req_mibget_mibattribute in p80211metadef.h Rename DIDmsg_dot11req_mibget_mibattribute in p80211metadef.h to DIDMSG_DOT11REQ_MIBGET_MIBATTRIBUTE to fix "Avoid CamelCase" message from checkpatch and conform to the coding style guidelines. Signed-off-by: Tim Collier Signed-off-by: Greg Kroah-Hartman commit 08ac857363f17df313d9d177e5646ab3c7cd354f Author: Tim Collier Date: Wed Sep 26 23:05:29 2018 +0100 staging: wlan-ng: rename DIDmsg_dot11req_mibget in p80211metadef.h Rename DIDmsg_dot11req_mibget in p80211metadef.h to DIDMSG_DOT11REQ_MIBGET to fix "Avoid CamelCase" message from checkpatch and conform to the coding style guidelines. Signed-off-by: Tim Collier Signed-off-by: Greg Kroah-Hartman commit 0f175be6126c42f874b81c2b5deef70959f50b22 Author: YueHaibing Date: Fri Sep 28 02:21:53 2018 +0000 staging: rtlwifi: Remove set but not used variable 'ppsc' Fixes gcc '-Wunused-but-set-variable' warning: drivers/staging/rtlwifi/btcoexist/halbtcoutsrc.c: In function 'halbtc_leave_lps': drivers/staging/rtlwifi/btcoexist/halbtcoutsrc.c:284:21: warning: variable 'ppsc' set but not used [-Wunused-but-set-variable] drivers/staging/rtlwifi/btcoexist/halbtcoutsrc.c: In function 'halbtc_enter_lps': drivers/staging/rtlwifi/btcoexist/halbtcoutsrc.c:307:21: warning: variable 'ppsc' set but not used [-Wunused-but-set-variable] Signed-off-by: YueHaibing Signed-off-by: Greg Kroah-Hartman commit 9e3701b3809ab3ef22235c96ea69510e26d18d30 Author: Nathan Chancellor Date: Thu Sep 27 17:50:39 2018 -0700 staging: bcm2835-camera: Avoid unneeded internal declaration warning Clang warns: drivers/staging/vc04_services/bcm2835-camera/controls.c:59:18: warning: variable 'mains_freq_qmenu' is not needed and will not be emitted [-Wunneeded-internal-declaration] static const s64 mains_freq_qmenu[] = { ^ 1 warning generated. This is because mains_freq_qmenu is currently only used in an ARRAY_SIZE macro, which is a compile time evaluation in this case. Avoid this by adding mains_freq_qmenu as the imenu member of this structure, which matches all other controls that uses the ARRAY_SIZE macro in v4l2_ctrls. This turns out to be a no-op because V4L2_CID_MPEG_VIDEO_BITRATE_MODE is defined as a MMAL_CONTROL_TYPE_STD_MENU, which does not pass the imenu definition along to v4l2_ctrl_new in bm2835_mmal_init_controls. Link: https://github.com/ClangBuiltLinux/linux/issues/122 Signed-off-by: Nathan Chancellor Signed-off-by: Greg Kroah-Hartman commit 6493a78f80384e3542a040b4fd07f01a280d1cf4 Author: Aymen Qader Date: Thu Sep 27 23:28:14 2018 +0100 staging: rtl8723bs: Skip unnecessary field checks Skip unnecessary request field checks when the information element pointer is null. Signed-off-by: Aymen Qader Signed-off-by: Greg Kroah-Hartman commit daf9a56cbb791865db751d97c570d90b9e0aed20 Author: John Whitmore Date: Wed Sep 26 20:17:04 2018 +0100 staging:rtl8192u: Remove potential memory leak Add call to ieee80211_networks_free() to avoid potential memory leak if allocation of pHTInfo fails. If the third allocation fails only the first successful allocation is freed, not the second. Signed-off-by: John Whitmore Signed-off-by: Greg Kroah-Hartman commit 12f34f81ba513258067714a9161463ef3d3785e5 Author: John Whitmore Date: Wed Sep 26 20:16:55 2018 +0100 staging:rtl8192u: Move HTSetConnectBwModeCallback() - Style The function HTSetConnectBwModeCallback() is only used in the file in which it is defined, so has been changed to being of type 'static'. Additionally the function is defined after it is used so a prototype was included in the file. This prototype, in the middle of the file has been removed and the function implementation moved so that it is defined before it is used in the file. This is a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore Signed-off-by: Greg Kroah-Hartman commit 1eed1d928780cf74af70a3260181ea9f4fb468de Author: John Whitmore Date: Wed Sep 26 20:16:54 2018 +0100 staging:rtl8192u: Remove definition of HTSetConnectBwMode - Style Remove the redundant declaration of the function HTSetConnectBwMode() as it is not needed in the code. The function is already declared in header file, multiple declarations add nothing. This is a style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore Signed-off-by: Greg Kroah-Hartman commit 80c6783f5b05f8773666e39cf7e7c55a00494b17 Author: John Whitmore Date: Wed Sep 26 20:16:53 2018 +0100 staging:rtl8192u: Make HTMcsToDataRate static - Style The function HTMcsToDataRate() is not used outside the file in which it is defined, so has been declared as 'static' and the prototype removed from the header file. This is a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore Signed-off-by: Greg Kroah-Hartman commit de26e5f2d586d2e050304c35bfafa39771565741 Author: John Whitmore Date: Wed Sep 26 20:16:52 2018 +0100 staging:rtl8192u: Remove HTHalfMcsToDataRate() - Style The function HTHalfMcsToDataRate() is unused in code so has simply been removed from the code. As a result two static functions, (IsHTHalfNmode40Bandwidth and IsHTHalfNmodeSGI), are not longer called, so they have been removed as well. These are coding style changes which should have no impact on runtime code execution. Signed-off-by: John Whitmore Signed-off-by: Greg Kroah-Hartman commit 9a90a5bcc73e4805989ad791cdd075a81f1a23ef Author: Alexandre Belloni Date: Mon Sep 24 16:49:02 2018 +0200 rtc: ab8500: remove useless check rtc_time_to_tm always rturns a valid tm, there is no need to validate it. Signed-off-by: Alexandre Belloni Acked-by: Linus Walleij Signed-off-by: Alexandre Belloni commit 38ab97aebe47831e576095e58dac31860152b0fa Author: Alexandre Belloni Date: Mon Sep 24 16:49:01 2018 +0200 rtc: ab8500: let the core handle range Let the core handle offsetting and windowing the RTC range. The RTC has a 24 bit counter for minutes plus a seconds counter. Keep the epoch at the beginning of 2000. Signed-off-by: Alexandre Belloni Acked-by: Linus Walleij Signed-off-by: Alexandre Belloni commit b56295dd337a35402663b230ac62260cbe7ee5ac Author: Alexandre Belloni Date: Mon Sep 24 16:49:00 2018 +0200 rtc: ab8500: use rtc_add_group Use rtc_add_group to add the sysfs group in a race free manner. Signed-off-by: Alexandre Belloni Reviewed-by: Linus Walleij Signed-off-by: Alexandre Belloni commit 8f6b8ed3b02e3202b062a0d786c1c623f64cad63 Author: Colin Ian King Date: Thu Sep 27 13:17:49 2018 +0100 staging: wilc1000: fix incorrect allocation size for structure Currently the allocation for str_vals is for the sizeof the pointer rather than the size of the structure. Fix this. Detected by smatch "wilc_wlan_cfg_init() error: not allocating enough data 392 vs 8" Fixes: acceb12a9f8b ("staging: wilc1000: refactor code to avoid static variables for config parameters") Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman commit 96e47e30c0bce708b975af6e0fca4a6eaed5ee75 Author: Aymen Qader Date: Thu Sep 27 22:19:11 2018 +0100 staging: rtl8188eu: Skip unnecessary field checks Skip unnecessary request field checks when the information element pointer is null. Signed-off-by: Aymen Qader ACKed-by: Larry Finger Signed-off-by: Greg Kroah-Hartman commit dee43f7ad325ecd58d60331e0fa1c1dfc0496201 Author: Michael Straube Date: Thu Sep 27 14:16:40 2018 +0200 staging: rtl8188eu: remove get_right_chnl_for_iqk() The function get_right_chnl_for_iqk() only returns non zero values for channels > 14. According to the TODO, code valid only for 5 GHz should be removed. - find and remove remaining code valid only for 5 GHz. Most of the obvious ones have been removed, but things like channel > 14 still exist. Remove get_right_chnl_for_iqk() and the variable chn_index that is used to save the return value. Replace the uses of chn_index with zero. Remove the now unused define ODM_TARGET_CHNL_NUM_2G_5G. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit 71c29144481299bbc587ac3cb16a39737a3a1488 Author: Nathan Chancellor Date: Wed Sep 26 17:32:01 2018 -0700 staging: rtl8188eu: Use proper enum in rtl8188eu_config_rf_reg Clang warns when an enumerated type is implicitly converted to another. drivers/staging/rtl8188eu/hal/rf_cfg.c:180:25: warning: implicit conversion from enumeration type 'enum rf90_radio_path' to different enumeration type 'enum rf_radio_path' [-Wenum-conversion] rtl_rfreg_delay(adapt, RF90_PATH_A, addr | maskforphyset, ~~~~~~~~~~~~~~~ ^~~~~~~~~~~ 1 warning generated. Avoid this by using the equivalent value from the expected type, rf_radio_path: RF90_PATH_A = RF_PATH_A = 0 Link: https://github.com/ClangBuiltLinux/linux/issues/164 Signed-off-by: Nathan Chancellor Signed-off-by: Greg Kroah-Hartman commit 6505090a34ef1b69df234f0b64a61646a220c345 Author: Michael Straube Date: Wed Sep 26 22:04:08 2018 +0200 staging: rtl8188eu: use break to exit while loop The variable bContinual is only used to break out of the while loop. Remove the variable and use break instead. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit fb81fa138aa584d5f607f15b6fffe34bb7b475a5 Author: Michael Straube Date: Wed Sep 26 22:04:07 2018 +0200 staging: rtl8188eu: rename variable - style Rename the return value variable in some functions in rtw_efuse.c to avoid CamelCase. bRet -> ret Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit 0fd8922c84ca081bedde8d1d9edde50ddb5f115e Author: Michael Straube Date: Wed Sep 26 22:04:06 2018 +0200 staging: rtl8188eu: do not line break function definition - style Do not line break function definition. Clears a checkpatch issue. CHECK: Lines should not end with a '(' Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit 5e9025d1c2fcaa62e44dfb9160907a32c733de26 Author: Michael Straube Date: Wed Sep 26 22:04:05 2018 +0200 staging: rtl8188eu: simplify function comments - style Simplify function comments. Clears a 'line over 80 characters' checkpatch warning. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit 709a6a5339ccb6344c0b892dd47e02097297e78f Author: Colin Ian King Date: Wed Sep 26 14:34:05 2018 +0100 staging: rtl8188eu: fix spelling mistake "transfoer_len" -> "transfer_len" Trivial fix to spelling mistake in DBG_88E debug message text. Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman commit 6b9e49b25e79ddbbbe68ca81334424841d89606b Author: Nathan Chancellor Date: Tue Sep 25 12:13:26 2018 -0700 staging: rtl8188eu: Simplify memcmp logical checks Clang generates a warning when it sees a logical not followed by a conditional operator like ==, >, or < because it thinks that the logical not should be applied to the whole statement: drivers/staging/rtl8188eu/core/rtw_ieee80211.c:293:8: warning: logical not is only applied to the left hand side of this comparison [-Wlogical-not-parentheses] It assumes the author might have made a mistake in their logic: if (!a == b) -> if (!(a == b)) Sometimes that is the case; other times, it's just a super convoluted way of saying 'if (a)' when b = 0: if (!1 == 0) -> if (0 == 0) -> if (true) Alternatively: if (!1 == 0) -> if (!!1) -> if (1) Simplify these comparisons so that Clang doesn't complain. Link: https://github.com/ClangBuiltLinux/linux/issues/161 Signed-off-by: Nathan Chancellor Signed-off-by: Greg Kroah-Hartman commit a2d88182d28df33346f18a97dd1ede3bc053ee26 Author: Taehee Yoo Date: Tue Sep 25 00:39:27 2018 +0900 netfilter: nf_tables: use rhashtable_lookup() instead of rhashtable_lookup_fast() Internally, rhashtable_lookup_fast() calls rcu_read_lock() then, calls rhashtable_lookup(). so that in places where are guaranteed by rcu read lock, rhashtable_lookup() is enough. Signed-off-by: Taehee Yoo Signed-off-by: Pablo Neira Ayuso commit 28c5ed2f93105ee1d3de6b79035e507c4ada68c9 Author: Taehee Yoo Date: Tue Sep 25 00:38:28 2018 +0900 netfilter: nf_flow_table: remove unnecessary nat flag check code nf_flow_offload_{ip/ipv6}_hook() check nat flag then, call nf_flow_nat_{ip/ipv6} but that also check nat flag. so that nat flag check code in nf_flow_offload_{ip/ipv6}_hook() are unnecessary. Signed-off-by: Taehee Yoo Signed-off-by: Pablo Neira Ayuso commit b473a1f5ddee5f73392c387940f4fbcbabfc3431 Author: Christian Göttsche Date: Sun Sep 23 20:26:16 2018 +0200 netfilter: nf_tables: add requirements for connsecmark support Add ability to set the connection tracking secmark value. Add ability to set the meta secmark value. Signed-off-by: Christian Göttsche Acked-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit fb961945457f5177072c968aa38fee910ab893b9 Author: Christian Göttsche Date: Sun Sep 23 20:26:15 2018 +0200 netfilter: nf_tables: add SECMARK support Add the ability to set the security context of packets within the nf_tables framework. Add a nft_object for holding security contexts in the kernel and manipulating packets on the wire. Convert the security context strings at rule addition time to security identifiers. This is the same behavior like in xt_SECMARK and offers better performance than computing it per packet. Set the maximum security context length to 256. Signed-off-by: Christian Göttsche Acked-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 097f95d319f817e651bd51f8846aced92a55a6a1 Author: Tan Hu Date: Fri Sep 7 16:33:33 2018 +0800 netfilter: masquerade: don't flush all conntracks if only one address deleted on device We configured iptables as below, which only allowed incoming data on established connections: iptables -t mangle -A PREROUTING -m state --state ESTABLISHED -j ACCEPT iptables -t mangle -P PREROUTING DROP When deleting a secondary address, current masquerade implements would flush all conntracks on this device. All the established connections on primary address also be deleted, then subsequent incoming data on the connections would be dropped wrongly because it was identified as NEW connection. So when an address was delete, it should only flush connections related with the address. Signed-off-by: Tan Hu Signed-off-by: Pablo Neira Ayuso commit 1654a2b06b936c5e123978e6d9523b022a2a5aa1 Author: Alexandre Belloni Date: Mon Sep 24 17:05:09 2018 +0200 rtc: rs5c348: report error when time is invalid Instead of resetting the RTC to an bogus valid time, let userspace know that the time is invalid when XSTP is set. Reset XSTP when setting the time again. Signed-off-by: Alexandre Belloni commit 2d7be4ed7addcaae8eba6ae8cdee83e2f7d39059 Author: Alexandre Belloni Date: Mon Sep 24 17:05:08 2018 +0200 rtc: rs5c348: remove forward declaration The name passed to devm_rtc_device_register is now unused. anyway, switch to devm_rtc_allocate_device to avoid forward declaring rs5c348_driver. Signed-off-by: Alexandre Belloni commit 02a6e1293235ba9b38c7f7428e0993fd972557cf Author: Alexandre Belloni Date: Mon Sep 24 17:05:07 2018 +0200 rtc: rs5c348: remove useless label Since commit 8fb1ecb36f7e ("rtc: rtc-rs5c348: use devm_*() functions") the kfree_exit label simply returns ret. Signed-off-by: Alexandre Belloni commit f6e3d773e10bc4c7c19083cfdd3e275cfece58de Author: Alexandre Belloni Date: Mon Sep 24 16:25:36 2018 +0200 rtc: armada38x: switch to rtc_time64_to_tm/rtc_tm_to_time64 Call the 64bit versions of rtc_time_to_tm and rtc_tm_to_time now that the range is enforced by the core. Signed-off-by: Alexandre Belloni commit ef2a7176c837183043ecfdc5e995a3275f37ee39 Author: Alexandre Belloni Date: Mon Sep 24 16:25:35 2018 +0200 rtc: armada38x: add range The RTC is a 32bit seconds counter. Signed-off-by: Alexandre Belloni Tested-by: Gregory CLEMENT Signed-off-by: Alexandre Belloni commit 7d61cbb945a753af08e247b5f10bdd5dbb8d6c80 Author: Alexandre Belloni Date: Mon Sep 24 16:25:34 2018 +0200 rtc: armada38x: fix possible race condition The IRQ is requested before the struct rtc is allocated and registered, but this struct is used in the IRQ handler. This may lead to a NULL pointer dereference. Switch to devm_rtc_allocate_device/rtc_register_device to allocate the rtc before requesting the IRQ. Signed-off-by: Alexandre Belloni commit 0ae3f24ded773edcc5e40ed94c84fbfabd516e14 Author: Alexandre Belloni Date: Sat Sep 22 01:22:34 2018 +0200 rtc: lib: correct documentation typo rtc_time64_to_tm has not been called rtc_time_to_tm64 Signed-off-by: Alexandre Belloni commit 6a5f2a1f4dcdb31fde467d9ae612505692eb4243 Author: Alexandre Belloni Date: Thu Sep 20 16:35:26 2018 +0200 rtc: ds1307: use rtc_add_group Register frequency test using rtc_add_group to avoid a possible race condition and simplify the code. This also moves the attribute to its proper location under the rtc device instead of the i2c parent device. Signed-off-by: Alexandre Belloni commit cfb74916e2ecf018e3189959edd2a1356b2fd89e Author: Alexandre Belloni Date: Wed Sep 19 19:52:11 2018 +0200 rtc: ds1685: use rtc_add_group Use rtc_add_group to add the sysfs group in a race free manner. Signed-off-by: Alexandre Belloni commit 482419e120da6da187be996c6871ed1e8bf02c51 Author: Alexandre Belloni Date: Wed Sep 19 19:52:10 2018 +0200 rtc: ds1685: use generic nvmem Instead of adding a binary sysfs attribute from the driver, use the core to register an nvmem device. Signed-off-by: Alexandre Belloni commit 8ddeb09de163ce4f362c610cd901f9c5ad4f58fd Author: Alexandre Belloni Date: Wed Sep 19 19:52:09 2018 +0200 rtc: ds1685: drop RTC_DS1685_PROC_REGS /proc is not the correct ABI to display debugging info. Remove RTC_DS1685_PROC_REGS as the driver hasn't seen any real development since it was included. Signed-off-by: Alexandre Belloni commit c7080e2016074363298e05d5e4d91eaf243a58c2 Author: Alexandre Belloni Date: Wed Sep 19 03:16:32 2018 +0200 rtc: test: Switch to SPDX identifier Replace the license boilerplate by an SPDX identifier Signed-off-by: Alexandre Belloni commit fd13c930fe6a6dce8ae1f551121cfd947fb24dd5 Author: Alexandre Belloni Date: Wed Sep 19 03:16:31 2018 +0200 rtc: test: make license text and module license match. The license text is specifying GPL v2 only but the MODULE_LICENSE is set to GPL which means GNU Public License v2 or later. When MODULE_LICENSE and boiler plate does not match, go for boiler plate license. Signed-off-by: Alexandre Belloni commit 2ab78755e93a10f6216c860a2012f3592f395603 Author: Alexandre Belloni Date: Wed Sep 19 03:14:58 2018 +0200 rtc: tx4939: fixup nvmem name and register size The default word_size and stride of 1 are correct for the tx4939. Also fix the nvmem folder name. Signed-off-by: Alexandre Belloni commit 4b3a6a3ac559d8f81d79e661ccde6bdd08395225 Author: Alexandre Belloni Date: Wed Sep 19 03:13:22 2018 +0200 rtc: isl1208: don't include core header file The core header file is reserved for the core, stop including it. Also reorder includes alphabetically. Signed-off-by: Alexandre Belloni commit eb2bccb70b979d996ecb769d692b92ff12eabbb7 Author: Alexandre Belloni Date: Wed Sep 19 03:13:21 2018 +0200 rtc: move rtc_add_group/s definitions Move rtc_add_group and rtc_add_groups definition to rtc.h that is available for all RTC drivers. Signed-off-by: Alexandre Belloni commit db7a67b9c3482bcc8314e42647f60b6f77f5afe4 Author: Alexandre Belloni Date: Wed Sep 19 03:11:52 2018 +0200 rtc: reorder Makefile entries A few entries are not placed correctly, reorder them. Signed-off-by: Alexandre Belloni commit b41c23e152f2852ff7a299676af4f642bbe94abf Author: Giulio Benetti Date: Wed Jul 25 19:26:05 2018 +0200 rtc: ds1307: add frequency_test_enable attribute on m41txx On m41txx you can enable open-drain OUT pin to check if offset is ok. Enabling OUT pin with frequency_test_enable attribute, OUT pin will tick 512 times faster than 1s tick base. Enable or Disable FT bit on CONTROL register if freq_test is 1 or 0. Signed-off-by: Giulio Benetti Signed-off-by: Alexandre Belloni commit 79230ff64167586b2a556470c7934083afea930e Author: Giulio Benetti Date: Wed Jul 25 19:26:04 2018 +0200 rtc: ds1307: add offset sysfs for mt41txx chips. m41txx chips can hold a calibration value to get correct clock bias. Add offset handling (ranging between -63ppm and 126ppm) via sysfs. Signed-off-by: Giulio Benetti Signed-off-by: Alexandre Belloni commit 5bf7a60b8e70969f65c961d7e2c4eb40eb2c664d Author: Yonghong Song Date: Thu Sep 27 14:37:30 2018 -0700 bpf: permit CGROUP_DEVICE programs accessing helper bpf_get_current_cgroup_id() Currently, helper bpf_get_current_cgroup_id() is not permitted for CGROUP_DEVICE type of programs. If the helper is used in such cases, the verifier will log the following error: 0: (bf) r6 = r1 1: (69) r7 = *(u16 *)(r6 +0) 2: (85) call bpf_get_current_cgroup_id#80 unknown func bpf_get_current_cgroup_id#80 The bpf_get_current_cgroup_id() is useful for CGROUP_DEVICE type of programs in order to customize action based on cgroup id. This patch added such a support. Cc: Roman Gushchin Signed-off-by: Yonghong Song Acked-by: Alexei Starovoitov Acked-by: Roman Gushchin Signed-off-by: Daniel Borkmann commit 1b4c794fda583edabe864ac466e9cd43c707be80 Author: Alexandre Belloni Date: Sat Sep 15 13:29:56 2018 +0200 rtc: isl1208: avoid possible sysfs race Use rtc_add_group to add the common sysfs group to avoid a possible race condition. [Denis.Osterland@diehl.com: use to_i2c_client(dev->parent)] Signed-off-by: Denis Osterland Signed-off-by: Alexandre Belloni The move of atrim, dtrim usr sysfs properties from i2c device to rtc device require to access them via dev->parent. This patch also aligns timestamp0. commit 9485107ae880d756e8a607ff9e7927d5daba73a5 Author: Heiko Stuebner Date: Sun Apr 29 17:01:03 2018 +0200 arm64: defconfig: enable Rockchip Innosilicon hdmiphy The rk3228 and rk3328 socs use an MMIO-connected hdmi-phy from Innosilicon. So enable the necessary driver as module. Signed-off-by: Heiko Stuebner commit e78d53c7b2873e0724eb765a88ccde42560b0e05 Author: Heiko Stuebner Date: Sun Dec 10 00:11:45 2017 +0100 arm64: dts: rockchip: enable display nodes on rk3328-rock64 Enable necessary nodes to get output on the hdmi port of the board. Signed-off-by: Heiko Stuebner commit 725e351c265a8d78b104b7c7a07e3fd4a85a126f Author: Heiko Stuebner Date: Mon Dec 11 02:02:01 2017 +0100 arm64: dts: rockchip: add rk3328 display nodes Add the chain of display nodes from the core display-subsystem through the one vop to the dw-hdmi output. Signed-off-by: Heiko Stuebner Tested-by: Robin Murphy changes in v3: - drop reg from hdmi-in-port changes in v2: - remove trailing 0 from vop irq commit 6c69dfe2af72960815292914fae4432e414b9e77 Author: Heiko Stuebner Date: Sun Dec 10 00:11:14 2017 +0100 arm64: dts: rockchip: add Innosilicon hdmi phy node to rk3328 The rk3328 uses a hdmiphy from Innosilicon, so add the necessary node to the rk3328 soc devicetree. Signed-off-by: Heiko Stuebner Tested-by: Robin Murphy commit 0dfc62946b9a3dad750cbbe6ea356b551450379d Merge: 4bef2317b47a 9f296fe2718e Author: Arnd Bergmann Date: Fri Sep 28 13:02:04 2018 +0200 Merge tag 'pxa-dt-4.20' of https://github.com/rjarzmik/linux into next/dt This device-tree pxa update brings : - a couple of changes for future pxa2xx platforms - 2 fixes in RTC and I2C domain * tag 'pxa-dt-4.20' of https://github.com/rjarzmik/linux: ARM: dts: pxa: add pincontrol helpers ARM: dts: pxa: fix power i2c base address ARM: dts: pxa: fix the rtc controller ARM: dts: pxa: change serial node names Signed-off-by: Arnd Bergmann commit 4bef2317b47aaccb6cb3334e11a759a707fa3ce4 Merge: 49919eabc85f 9c8c52f7cb4f Author: Arnd Bergmann Date: Fri Sep 28 12:48:09 2018 +0200 Merge tag 'amlogic-dt64-2' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic into next/dt Amlogic ARM64 DT updates for v4.20, round 2 - new SoC support: basic support for G12A family - new board: Amlogic U200 board, using G12A SoC - fix SPI bus warnings from new dtc updates * tag 'amlogic-dt64-2' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic: arm64: dts: meson-g12a: add initial g12a s905d2 SoC DT support dt-bindings: arm: amlogic: Add Meson G12A binding arm64: dts: meson: Fix erroneous SPI bus warnings Signed-off-by: Arnd Bergmann commit 49919eabc85f10cecbb7360e3f526fcb01e0d511 Merge: 262c083d1328 54ef8539f5a3 Author: Arnd Bergmann Date: Fri Sep 28 12:45:56 2018 +0200 Merge tag 'amlogic-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic into next/dt ARM: dts: Amlogic updates for v4.20 - fix clock controller register sizes - new board: Endless Mini (EC-100) by Endless Mobile - add voltage regulators * tag 'amlogic-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic: ARM: dts: meson8b: odroidc1: add stdout-path property ARM: dts: meson8b: odroidc1: enable the SAR ADC ARM: dts: meson8b: odroidc1: add the fixed voltage regulators ARM: dts: meson8b: odroidc1: add the CPU voltage regulator ARM: dts: meson8b: Add support for the Endless Mini (EC-100) ARM: dts: meson8b: add the RMII pins ARM: dts: meson8b: add the I2C_A, PWM_C and UART_B pins dt-bindings: arm: amlogic: Add the Endless Mobile Endless Mini (EC-100) dt-bindings: add vendor prefix for "Endless Mobile, Inc." ARM: dts: meson8b: fix the clock controller register size ARM: dts: meson8: fix the clock controller register size Signed-off-by: Arnd Bergmann commit 262c083d13286ab7fd2d0cf3c5c2a4407a8fe918 Merge: f3b1859bcfe2 087682f5a75b Author: Arnd Bergmann Date: Fri Sep 28 12:36:27 2018 +0200 Merge tag 'berlin64-dt-for-v4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/jszhang/linux-berlin into next/dt Berlin64 DT changes for v4.20 * tag 'berlin64-dt-for-v4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/jszhang/linux-berlin: arm64: dts: synaptics: add dtsi file for Synaptics AS370 SoC dt-bindings: arm: syna: add support for the AS370 SoC dt-bindings: arm: move berlin binding documentation to syna.txt Signed-off-by: Arnd Bergmann commit f3b1859bcfe222236780df40030a45dc0b5bff17 Merge: 11236ef582b8 016add12977b Author: Arnd Bergmann Date: Fri Sep 28 12:35:20 2018 +0200 Merge tag 'realview-dts-v4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator into next/dt Realview DTS update for v4.20: - One patch from Rob fixing SPI node names * tag 'realview-dts-v4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator: ARM: dts: realview: Fix SPI controller node names Signed-off-by: Arnd Bergmann commit 11236ef582b8d66290bb3b3710e03ca1d85d8ad8 Author: Rob Herring Date: Thu Sep 13 13:12:33 2018 -0500 ARM: dts: lpc32xx: Fix SPI controller node names SPI controller nodes should be named 'spi' rather than 'ssp'. Fixing the name enables dtc SPI bus checks. Cc: Vladimir Zapolskiy Cc: Sylvain Lemieux Signed-off-by: Rob Herring Signed-off-by: Arnd Bergmann commit 09bae3b64cb580c95329bd8d16f08f0a5cb81ec9 Author: Rob Herring Date: Thu Sep 13 13:12:44 2018 -0500 arm64: dts: lg: Fix SPI controller node names SPI controller nodes should be named 'spi' rather than 'ssp'. Fixing the name enables dtc SPI bus checks. Cc: Chanho Min Signed-off-by: Rob Herring Signed-off-by: Arnd Bergmann commit e9f0878c4b2004ac19581274c1ae4c61ae3ca70e Author: Rob Herring Date: Thu Sep 13 13:12:40 2018 -0500 arm64: dts: amd: Fix SPI bus warnings dtc has new checks for SPI buses. Fix the warnings in node names. arch/arm64/boot/dts/amd/amd-overdrive.dtb: Warning (spi_bus_bridge): /smb/ssp@e1030000: node name for SPI buses should be 'spi' arch/arm64/boot/dts/amd/amd-overdrive-rev-b0.dtb: Warning (spi_bus_bridge): /smb/ssp@e1030000: node name for SPI buses should be 'spi' arch/arm64/boot/dts/amd/amd-overdrive-rev-b1.dtb: Warning (spi_bus_bridge): /smb/ssp@e1030000: node name for SPI buses should be 'spi' Cc: Brijesh Singh Cc: Suravee Suthikulpanit Cc: Tom Lendacky Signed-off-by: Rob Herring Signed-off-by: Arnd Bergmann commit e0a39511dafd7e302a974f5cbdfc9c8afffa98d8 Author: Biju Das Date: Fri Sep 21 15:07:55 2018 +0100 ARM: dts: iwg20d-q7-common: Move pciec node out of common dtsi PCIe is not populated by default on iWave RZ/G1N board. RZ/G1N board is almost identical to RZ/G1M. In order to reuse the common dtsi for both the boards, it is required to move pcie node from common dtsi to board specific dts. Signed-off-by: Biju Das Reviewed-by: Fabrizio Castro Signed-off-by: Simon Horman commit 3578859661975f8ccb9d8d49c97784d5ff5467df Author: Fabrizio Castro Date: Fri Sep 21 18:37:01 2018 +0100 ARM: dts: r8a77470: Add I2C4 support Add I2C4 support to RZ/G1C (a.k.a. r8a77470) SoC specific device tree. Signed-off-by: Fabrizio Castro Reviewed-by: Biju Das Acked-by: Wolfram Sang Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit f068cc816015f8a6af494b584978aa7df96d80fe Author: Fabrizio Castro Date: Fri Sep 21 12:55:10 2018 +0100 ARM: dts: r8a77470: Add SDHI2 support Add SoC specific device tree definitions for the SDHI2 interface. Signed-off-by: Fabrizio Castro Reviewed-by: Biju Das Acked-by: Wolfram Sang Signed-off-by: Simon Horman commit a21efdbc744c999d79ba86629a5ae35e2cba1e13 Author: Fabrizio Castro Date: Mon Sep 17 09:44:10 2018 +0100 ARM: dts: r8a77470: 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". Signed-off-by: Fabrizio Castro Reviewed-by: Biju Das Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit a070e3dc6131da94b0e62b9544851c10ebd879eb Author: Magnus Damm Date: Mon Sep 17 17:39:47 2018 +0900 ARM: dts: R-Car Gen1 board comment update Include R-Car Gen1 product names for Bock-W and Marzen. The product names are taken from: Documentation/devicetree/bindings/arm/shmobile.txt Signed-off-by: Magnus Damm Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit 89b43b08123f454f697f7ab02187f09b6e4a36b6 Author: Magnus Damm Date: Mon Sep 17 17:39:39 2018 +0900 ARM: dts: Include R-Car Gen2 product name in DTSI files Improve the user friendliness of the DTS code base by including the R-Car product name in each R-Car Gen2 DTSI file. The product names are taken from: Documentation/devicetree/bindings/arm/shmobile.txt Signed-off-by: Magnus Damm Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit 8537bf10976c56c6e0cc8b05a835e58cbbb1d287 Author: Arnd Bergmann Date: Thu Sep 27 12:09:26 2018 +0200 EDAC, altera: Work around int-to-pointer-cast warnings The altera edac driver passes a token from a DT resource as resource_size_t into an SMC call, but casts it to an __iomem pointer and then a plain void pointer inbetween, mixing three or four incompatible types in the process. The compiler complains about one of the conversions: drivers/edac/altera_edac.c: In function 'altr_init_a10_ecc_block': drivers/edac/altera_edac.c:1053:10: error: cast to pointer from integer of \ different size [-Werror=int-to-pointer-cast] base = (void __iomem *)res.start; ^ drivers/edac/altera_edac.c: In function 'altr_edac_a10_probe': drivers/edac/altera_edac.c:2062:10: error: cast to pointer from integer of \ different size [-Werror=int-to-pointer-cast] base = (void __iomem *)res.start; Using a static checker probably also notices the __iomem cast. Solving this properly isn't trivial, but simply casting to a 'uintptr_t' instead of 'void __iomem *' makes it less wrong and should avoid the warnings. Fixes: d5fc9125566c ("EDAC, altera: Combine Stratix10 and Arria10 probe functions") Signed-off-by: Arnd Bergmann Signed-off-by: Borislav Petkov Reviewed-by: Thor Thayer Cc: Mauro Carvalho Chehab Cc: David Frey Cc: Mark Rutland Cc: Ingo Molnar Cc: Christophe JAILLET Cc: linux-edac@vger.kernel.org Link: https://lkml.kernel.org/r/20180927100949.973078-1-arnd@arndb.de commit 620cfb31bad4c5be7d9250f1e47a592750fc364b Author: Marek Behún Date: Mon Sep 24 13:06:54 2018 +0200 arm64: dts: marvell: armada-37xx: add nodes to support watchdog This adds the system controller node for CPU Miscellaneous Registers (which is needed for the watchdog node) and the watchdog node. Signed-off-by: Marek Behún Signed-off-by: Gregory CLEMENT commit a53a28dca4124048c90b4a8de457668ede57e67c Author: Chris Brandt Date: Wed Sep 26 08:39:56 2018 -0500 clk: renesas: r7s9210: Add SPI clocks Add RSPI clocks for RZ/A2. Signed-off-by: Chris Brandt Reviewed-by: Simon Horman Signed-off-by: Geert Uytterhoeven commit a97f340c0a071bcb32ff68f3d19cf56a76887288 Author: Geert Uytterhoeven Date: Wed Sep 26 15:29:54 2018 +0200 pinctrl: sh-pfc: rcar: Rename automotive-only arrays to automotive Renesas RZ/G SoCs are pin compatible with R-Car SoCs, but lack several automotive-specific peripherals. Currently pin groups and functions for automotive-specific peripherals are grouped in arrays named after the automative SoC part numbers. Rename them to "automotive" for clarity and consistency. Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman commit 63e037bc51b32d414cd07dd700e71359ce27a11f Author: Baolin Wang Date: Thu Sep 27 17:15:08 2018 +0800 pinctrl: sprd: Move DT parsing before registering pinctrl device It will be failed to select default or sleep state for pins hogged by the pin controller device, since we hadn't parsed pins configuration in device tree before registering the pin controller device. Thus we should move the device tree parsing function before registering the pin controller device. Signed-off-by: Baolin Wang Signed-off-by: Linus Walleij commit be8c8facc707d48f367d9313f5972353d24f19be Author: Uwe Kleine-König Date: Thu Sep 27 09:48:08 2018 +0200 gpio: new driver to work with a 8x12 siox This driver controls a SIOX device that provides 20 I/O lines. The first twelve are fixed inputs, the remaining eight are outputs. Acked-by: Gavin Schenk Signed-off-by: Uwe Kleine-König Signed-off-by: Linus Walleij commit ad335bee6ceda5770d295b32c39473c516145698 Author: Arnd Bergmann Date: Wed Sep 26 21:38:09 2018 +0200 pinctrl: mediatek: mark dummy helpers as 'static inline' mtk_eint_set_debounce and mtk_eint_find_irq are defined as stub functions in a header file, but without marking them as 'static inline', we get a copy for each file that includes the header: drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.o: In function `mtk_eint_set_debounce': pinctrl-mtk-common-v2.c:(.text+0x134): multiple definition of `mtk_eint_set_debounce' drivers/pinctrl/mediatek/pinctrl-moore.o:pinctrl-moore.c:(.text+0x7d0): first defined here drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.o: In function `mtk_eint_find_irq': pinctrl-mtk-common-v2.c:(.text+0x13c): multiple definition of `mtk_eint_find_irq' Fixes: e46df235b4e6 ("pinctrl: mediatek: refactor EINT related code for all MediaTek pinctrl can fit") Signed-off-by: Arnd Bergmann Acked-by: Sean Wang Signed-off-by: Linus Walleij commit e8c66efbfe3a2e3cbc573f2474a3d51690f1b857 Author: Thomas Hellstrom Date: Wed Sep 26 16:32:40 2018 +0200 drm/vmwgfx: Make user resource lookups reference-free during validation Make the process of looking up a user resource and adding it to the validation list reference-free unless when it's actually added to the validation list where a single reference is taken. This saves two locked atomic operations per command stream buffer object handle lookup, unless there is a lookup cache hit. Signed-off-by: Thomas Hellstrom Reviewed-by: Sinclair Yeh commit 1b9a01d62cb1bed2bc98f8b4e31d5b9daf0a446b Author: Thomas Hellstrom Date: Wed Sep 26 16:29:49 2018 +0200 drm/vmwgfx: Don't refcount cotable lookups during command buffer validation The typical pattern of these lookups are -Lookup -Put on validate list if not already there. -Unreference And since we are the exclusive user of the context during lookup time, we can be sure that the resource will stay alive during the sequence. So avoid taking a reference during lookup, and also avoid unreferencing when done. There are two users outside of command buffer validation and those are refcounted explicitly. Signed-off-by: Thomas Hellstrom Reviewed-by: Sinclair Yeh commit 508108ea274788888408f4245438e40c90d821da Author: Thomas Hellstrom Date: Wed Sep 26 16:28:45 2018 +0200 drm/vmwgfx: Don't refcount command-buffer managed resource lookups during command buffer validation The typical pattern of these lookups are -Lookup -Put on validate list if not already there. -Unreference And since we are the exclusive user of the context during lookup time, we can be sure that the resource will stay alive during the sequence. So avoid taking a reference during lookup, and also avoid unreferencing when done. Signed-off-by: Thomas Hellstrom Reviewed-by: Sinclair Yeh commit b139d43dacef688a4f46f29eef34409e950f7cef Author: Thomas Hellstrom Date: Wed Sep 26 16:27:54 2018 +0200 drm/vmwgfx: Make buffer object lookups reference-free during validation Make the process of looking up a buffer object and adding it to the validation list reference-free unless when it's actually added to the validation list where a single reference is taken. This saves two locked atomic operations per command stream buffer object handle lookup. Signed-off-by: Thomas Hellstrom Reviewed-by: Sinclair Yeh commit b733bc2e0accd60af23719fd1fc77941c11059f4 Author: Thomas Hellstrom Date: Wed Sep 26 16:03:57 2018 +0200 drm/vmwgfx: Look up user buffer objects without taking a reference Identically to how we look up ttm base objects witout reference, provide the same functionality to vmw user buffer objects which derive from them. Signed-off-by: Thomas Hellstrom Reviewed-by: Sinclair Yeh commit 64ad2abfe9a628ce79859d072704bd1ef7682044 Author: Thomas Hellstrom Date: Wed Sep 26 15:59:20 2018 +0200 drm/vmwgfx: Adapt validation code for reference-free lookups Adapt the validation code so that vmw_validation_add[res|bo] can be called under an rcu read lock (non-sleeping) and with rcu-only protected resource- or buffer object pointers. Signed-off-by: Thomas Hellstrom Reviewed-by: Sinclair Yeh commit 24dc64c1ba5c3ef0463d59fef6df09336754188d Author: Thomas Hellstrom Date: Wed Sep 26 15:57:46 2018 +0200 drm/ttm: Export ttm_bo_get_unless_zero() Export ttm_bo_get_unless_zero() to be used when looking up buffer objects that are removed from the lookup structure in the destructor. Signed-off-by: Thomas Hellstrom Reviewed-by: Sinclair Yeh Reviewed-by: Christian König commit 0af936821185a8f61af85015395477b016dd3fab Author: Bjorn Andersson Date: Thu Sep 27 12:03:46 2018 -0700 remoteproc: qcom: pas: Add QCS404 remoteprocs Add compatibles for the three PAS based remote processors found in QCS404. Reviewed-by: Sibi Sankar Signed-off-by: Bjorn Andersson commit 6b0e87a6aafe12d75c2bea6fc8e49e88b98b3083 Author: Finn Thain Date: Thu Sep 27 11:17:11 2018 +1000 scsi: NCR5380: Check for bus reset The SR_RST bit isn't latched. Hence, detecting a bus reset isn't reliable. When it is detected, the right thing to do is to drop all connected and disconnected commands. The code for that is already present so refactor it and call it when SR_RST is set. Tested-by: Michael Schmitz Signed-off-by: Finn Thain Signed-off-by: Martin K. Petersen commit ca694afad707cb3ae2fdef3b28454444d9ac726e Author: Finn Thain Date: Thu Sep 27 11:17:11 2018 +1000 scsi: NCR5380: Handle BUS FREE during reselection The X3T9.2 specification (draft) says, under "6.1.4.2 RESELECTION time-out procedure", that a target may assert RST or go to BUS FREE phase if the initiator does not respond within 200 us. Something like this has been observed with AztecMonster II target. When it happens, all we can do is wait for the target to try again. Tested-by: Michael Schmitz Signed-off-by: Finn Thain Signed-off-by: Martin K. Petersen commit 08267216b3f8aa5adc204bdccf8deb72c1cd7665 Author: Finn Thain Date: Thu Sep 27 11:17:11 2018 +1000 scsi: NCR5380: Don't call dsprintk() following reselection interrupt The X3T9.2 specification (draft) says, under "6.1.4.1 RESELECTION", ... The reselected initiator shall then assert the BSY signal within a selection abort time of its most recent detection of being reselected; this is required for correct operation of the time-out procedure. The selection abort time is only 200 us which may be insufficient time for a printk() call. Move the diagnostics to the error paths. Tested-by: Michael Schmitz Signed-off-by: Finn Thain Signed-off-by: Martin K. Petersen commit 45ddc1b24806cc8f1a09f23dd4e7b6e4a8ae36e1 Author: Finn Thain Date: Thu Sep 27 11:17:11 2018 +1000 scsi: NCR5380: Don't clear busy flag when abort fails When NCR5380_abort() returns FAILED, the driver forgets that the target is still busy. Hence, further commands may be sent to the target, which may fail during selection and produce the error message, "reselection after won arbitration?". Prevent this by leaving the busy flag set when NCR5380_abort() fails. Tested-by: Michael Schmitz Signed-off-by: Finn Thain Signed-off-by: Martin K. Petersen commit 7ef55f6744c45e3d7c85a3f74ada39b67ac741dd Author: Finn Thain Date: Thu Sep 27 11:17:11 2018 +1000 scsi: NCR5380: Check for invalid reselection target The X3T9.2 specification (draft) says, under "6.1.4.1 RESELECTION", that "the initiator shall not respond to a RESELECTION phase if other than two SCSI ID bits are on the DATA BUS." This issue (too many bits set) has been observed in the wild, so add a check. Tested-by: Michael Schmitz Signed-off-by: Finn Thain Signed-off-by: Martin K. Petersen commit 070356513963be6196142acff56acc8359069fa1 Author: Finn Thain Date: Thu Sep 27 11:17:11 2018 +1000 scsi: NCR5380: Use DRIVER_SENSE to indicate valid sense data When sense data is valid, call set_driver_byte(cmd, DRIVER_SENSE). Otherwise some callers of scsi_execute() will ignore sense data. Don't set DID_ERROR or DID_RESET just because sense data is missing. Tested-by: Michael Schmitz Signed-off-by: Finn Thain Signed-off-by: Martin K. Petersen commit 7c8ed783c2faa1e3f741844ffac41340338ea0f4 Author: Finn Thain Date: Thu Sep 27 11:17:11 2018 +1000 scsi: NCR5380: Withhold disconnect privilege for REQUEST SENSE This is mostly needed because an AztecMonster II target has been observed disconnecting REQUEST SENSE commands and then failing to reselect properly. Suggested-by: Michael Schmitz Tested-by: Michael Schmitz Signed-off-by: Finn Thain Signed-off-by: Martin K. Petersen commit dad8261e643849ea134c7cd5c8e794e31d93b9eb Author: Finn Thain Date: Thu Sep 27 11:17:11 2018 +1000 scsi: NCR5380: Have NCR5380_select() return a bool The return value is taken to mean "retry" or "don't retry". Change it to bool to improve readability. Fix related comments. No functional change. Tested-by: Michael Schmitz Signed-off-by: Finn Thain Signed-off-by: Martin K. Petersen commit 6a162836997c10bbefb7c7ca772201cc45c0e4a6 Author: Finn Thain Date: Thu Sep 27 11:17:11 2018 +1000 scsi: NCR5380: Reduce goto statements in NCR5380_select() Replace a 'goto' statement with a simple 'return' where possible. This improves readability. No functional change. Tested-by: Michael Schmitz Signed-off-by: Finn Thain Signed-off-by: Martin K. Petersen commit 1aeeeed7f03c576f096eede7b0384f99a98f588c Author: Hannes Reinecke Date: Thu Sep 27 11:17:11 2018 +1000 scsi: NCR5380: Clear all unissued commands on host reset When doing a host reset we should be clearing all outstanding commands, not just the command triggering the reset. [mkp: adjusted Hannes' SoB address] Signed-off-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn Cc: Ondrey Zary Signed-off-by: Finn Thain Signed-off-by: Martin K. Petersen commit 90ded4e2005b1195a5e781009be991e1cd049c10 Author: Nathan Chancellor Date: Fri Sep 14 23:36:45 2018 -0700 scsi: mptfusion: Remove unnecessary parentheses Clang warns when multiple pairs of parentheses are used for a single conditional statement. drivers/message/fusion/mptbase.c:338:11: warning: equality comparison with extraneous parentheses [-Wparentheses-equality] if ((ioc == NULL)) ~~~~^~~~~~~ drivers/message/fusion/mptbase.c:338:11: note: remove extraneous parentheses around the comparison to silence this warning if ((ioc == NULL)) ~ ^ ~ drivers/message/fusion/mptbase.c:338:11: note: use '=' to turn this equality comparison into an assignment if ((ioc == NULL)) ^~ = drivers/message/fusion/mptbase.c:342:12: warning: equality comparison with extraneous parentheses [-Wparentheses-equality] if ((pdev == NULL)) ~~~~~^~~~~~~ drivers/message/fusion/mptbase.c:342:12: note: remove extraneous parentheses around the comparison to silence this warning if ((pdev == NULL)) ~ ^ ~ drivers/message/fusion/mptbase.c:342:12: note: use '=' to turn this equality comparison into an assignment if ((pdev == NULL)) ^~ = 2 warnings generated. Remove them and while we're at it, simplify the NULL checks as '!var' is used more than 'var == NULL'. Reported-by: Nick Desaulniers Signed-off-by: Nathan Chancellor Reviewed-by: Nick Desaulniers Signed-off-by: Martin K. Petersen commit eec73c2ec111164b85a41fa83aa7d37e9eb89e3f Author: Colin Ian King Date: Wed Sep 26 14:08:48 2018 +0100 scsi: qla4xxx: Remove redundant check on drvr_wait The check for a non-zero drvr_wait is redundant as the same check is performed earlier in the outer while loop, the inner check will always be true if we reached this point inside the while loop. Remove the redundant if check. Detected by cppcheck: (warning) Identical inner 'if' condition is always true. Signed-off-by: Colin Ian King Acked-by: Manish Rangankar Signed-off-by: Martin K. Petersen commit 6f3df8c1192c873a6ad9a76328920f6f85af90a8 Author: Ilan Peer Date: Mon Jun 11 14:05:11 2018 +0300 iwlwifi: mvm: Allow TKIP for AP mode Support for setting keys for TKIP cipher suite was mistakenly removed for AP mode. Fix this. Fixes: 85aeb58cec1a ("iwlwifi: mvm: Enable security on new TX API") Signed-off-by: Ilan Peer Signed-off-by: Luca Coelho commit 4ef66965ce2f4d1c94b62025d35b2bd69d3f3889 Author: Johannes Berg Date: Thu Jun 7 10:49:55 2018 +0200 iwlwifi: fix LED command capability bit The capability bit was added to the driver and had been negotiated with the firmware, but then got forgotten in the firmware and later reused for a different capability. Now the firmware added it in a new bit. Fixes: 2eabc84d2f8e ("iwlwifi: mvm: only send LEDS_CMD when the FW supports it") Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho commit 6a529317ff31e27885e41443e5658ef3654ce0bc Author: Golan Ben Ami Date: Sun Jun 10 14:12:26 2018 +0300 iwlwifi: configure power scheme to balanced for 22560 devices As a temporary stage in the 22560 devices bring up, we disabled power save, to avoid bugs related to that domain. Now we would like to use power save so enable the balanced mode, and allow configuring the mode via module parameter. Signed-off-by: Golan Ben Ami Signed-off-by: Luca Coelho commit 88964b2ea09905c0268a5c74de902b8a5668b3e4 Author: Sara Sharon Date: Wed May 23 15:10:24 2018 +0300 iwlwifi: pcie: add infrastructure for multiple debug buffers In future devices we will have more than one debug buffer. Prepare the infrastructure for allocation and release of multiple debug buffers by grouping the variables in an array of structures and moving it to trans section, where they will be visible to opmode and FW. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho commit 0044f1716c4d943674684fd738c8f7aa9d05d248 Author: Johannes Berg Date: Fri Jun 1 10:32:55 2018 +0200 iwlwifi: pcie: support transmitting SKBs with fraglist We want to be able to build A-MSDUs in higher layers, e.g. by xmit_more, so support transmitting SKBs with fraglist to use it for such. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho commit 5724d8b9e9723ba2816ab403939e64c792fd25cf Author: Emmanuel Grumbach Date: Tue Jun 5 14:47:02 2018 +0300 iwlwifi: mvm: remove support for adjacent channel compensation We no longer want to consider the RSSI if the beacon / probe has been heard on an adjacent channel. This was based on a firmware capability that is now unavailable. Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho commit d5367de2d803658702dab1fc70e3428b26651189 Author: Erel Geron Date: Mon May 28 17:18:47 2018 +0300 iwlwifi: mvm: TLC support for Coex Schema 2 The new coex schema requires setting the non-shared antenna for the single_stream_ant_msk field in the TLC command. Signed-off-by: Erel Geron Signed-off-by: Luca Coelho commit 337bfc9881a277a973aa6a58418d281557ab6cdd Author: Avraham Stern Date: Mon Jun 4 15:10:18 2018 +0300 iwlwifi: mvm: set wep key for all stations in soft ap mode When operating as a soft ap with wep security, the key was not configured to the fw for the stations, based on the fact that the key will be specified in the tx command. However, in the new tx api the tx command does not include the key, which resulted in all data frames going out un-encrypted. Fix it by configuring the key for all the stations as they are added. Signed-off-by: Avraham Stern Signed-off-by: Luca Coelho commit 7126b6f2bbdf8e25f85e7ca6d91d49ea4ce9f6a6 Author: Sara Sharon Date: Sun Jun 3 09:19:35 2018 +0300 iwlwifi: mvm: use correct FIFO length Current FIFO size calculation is wrong for two reasons: - We access lmac 0 by default - We don't take 11ax into consideration. Fix both. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho commit 753e9761284b9b09120c21b155c7220605763522 Author: Shaul Triebitz Date: Thu May 10 17:40:44 2018 +0300 iwlwifi: pcie: set RB size according to user settings RB size can be configured by user to be greater than 4K. That's needed for monitor to capture big AMSDUs. The firmware now enables different RB sizes configuration via context info. Signed-off-by: Shaul Triebitz Signed-off-by: Luca Coelho commit 034925cb5d7bed359c42b3519c1d3fab0a26d27b Author: Shaul Triebitz Date: Thu May 10 17:34:52 2018 +0300 iwlwifi: mvm: do not override amsdu size user settings Since AMSDUs are not de-aggregated by HW in monitor mode, we still need the option for setting large RBs (up to 12K). Signed-off-by: Shaul Triebitz Signed-off-by: Luca Coelho commit 81f0c66187e1ebb7b63529d82faf7ff1e0ef428a Author: Golan Ben Ami Date: Tue Jun 5 11:58:13 2018 +0300 iwlwifi: pcie: fit reclaim msg to MAX_MSG_LEN Today, the length of a debug message in iwl_trans_pcie_reclaim may pass the MAX_MSG_LEN, which is 110. An example for this kind of message is: 'iwl_trans_pcie_reclaim: Read index for DMA queue txq id (2), last_to_free 65535 is out of range [0-65536] 2 2.' Cut the message a bit so it will fit the allowed MAX_MSG_LEN. Signed-off-by: Golan Ben Ami Signed-off-by: Luca Coelho commit 9a098a89df79e4cc5e743d7d4acf42bdbcc32ee7 Author: Rajat Jain Date: Thu Apr 26 17:43:50 2018 -0700 iwlwifi: pcie: Fail fast if HW is inaccessible at probe If the HW is not responding at probe time, fail immediately complaining about it. Without this, we see that the kernel spends > 100ms trying to load firmware (even gives an incorrect impression that it actually loaded a firmware) and do unnecesary processing before concluding that the device is not accessible: INFO kernel: [ 34.092678] iwlwifi 0000:01:00.0: enabling device (0000 -> 0002) WARNING kernel: [ 34.093560] iwlwifi 0000:01:00.0: Direct firmware load for iwl-dbg-cfg.ini failed with error -2 INFO kernel: [ 34.111523] iwlwifi 0000:01:00.0: loaded firmware version 17.318154.0 op_mode iwlmvm INFO kernel: [ 34.173250] iwlwifi 0000:01:00.0: Detected Intel(R) Dual Band Wireless AC 7265, REV=0xFFFFFFFF ERR kernel: [ 34.198023] iwlwifi 0000:01:00.0: iwlwifi transaction failed, dumping registers ERR kernel: [ 34.198044] iwlwifi 0000:01:00.0: iwlwifi device config registers: Signed-off-by: Rajat Jain Signed-off-by: Luca Coelho commit bb03927e0eafef4d2509ff3df7550acf98efea97 Author: Johannes Berg Date: Fri Jun 1 10:10:57 2018 +0200 iwlwifi: pcie: tx: pull tracing out of iwl_fill_data_tbs() This will allow us to reuse the function later for adding fraglist SKBs to the TFD. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho commit 7d50d76e308dc8f9bf1d8006b25bf88f81ce69df Author: Johannes Berg Date: Fri Jun 1 10:04:44 2018 +0200 iwlwifi: pcie: tx: unify TFD unmapping When anything fails, we unmap the whole TFD in three different places scattered throughout the code. Unify this to a single place. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho commit 53f474e6a8d74d5dc0c3a015d889471f9a157685 Author: Johannes Berg Date: Fri Jun 1 09:45:55 2018 +0200 iwlwifi: pcie: gen2: build A-MSDU only for GSO If the incoming frame should be an A-MSDU, it may already be one, for example in the case of NAN multicast being encapsulated in an A-MSDU. Thus, use the GSO algorithm to build A-MSDU only if the skb actually contains GSO data. Fixes: 6ffe5de35b05 ("iwlwifi: pcie: add AMSDU to gen2") Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho commit 3f425b81ce41ab076e5052160a6defbfa8e7e56a Author: Johannes Berg Date: Fri Jun 1 09:39:37 2018 +0200 iwlwifi: pcie: gen2: pull adding frags to helper routine Move the skb fragment loop into a helper routine to be able to reuse it later. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho commit 6f68cc367ab6578a33cca21b6056804165621f00 Author: Johannes Berg Date: Wed May 30 14:13:18 2018 +0200 iwlwifi: api: annotate compressed BA notif array sizes Annotate the compressed BA notification array sizes and make both of them 0-length since the length of 1 is just confusing - it may be different than that and the offset to the second one needs to be calculated in the C code anyhow. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho commit 7f768ad5eb46a8a12c9bb8e37e73fe5b4a66533b Author: David Spinadel Date: Tue Nov 7 11:59:57 2017 +0200 iwlwifi: mvm: Support TKIP on gen2 data path Make the adjustments for gen2 TX and RX of TKIP packets. Strip MIC on RX. Don't add IV space and keep the MIC space zeroed on TX. Devices that support gen2 data path support TKIP only in station mode. In all other modes, fall back to SW encryption. Do this early in the set_key() callback so that the key flags would not be incorrectly set. Signed-off-by: David Spinadel Signed-off-by: Ilan Peer Signed-off-by: Luca Coelho commit 84fb372c892e231e9a2ffdaa5c2df52d94aa536c Author: Sara Sharon Date: Wed May 30 15:19:56 2018 +0300 iwlwifi: pcie: read correct prph address for newer devices For newer devices we have higher range of periphery addresses. Currently it is masked out, so we end up reading another address. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho commit 989209610b60a3f0f39001f37da61698bbec8b5c Author: Shaul Triebitz Date: Sun Feb 25 18:37:30 2018 +0200 iwlwifi: mvm: enable sending HE_AIR_SNIFFER command via debugfs In order to receive TB (Trigger Based) PPDU in monitor mode, the Driver must send the HE_AIR_SNIFFER_CONFIG_CMD host command. Enable that via debugfs. Signed-off-by: Liad Kaufman Signed-off-by: Ido Yariv Signed-off-by: Shaul Triebitz Signed-off-by: Luca Coelho commit 10a970dff16816201d82b526f3a80d615f2e578c Author: Dreyfuss, Haim Date: Mon May 21 10:36:46 2018 +0300 iwlwifi: mvm: cleanup dead code on resume flow for non unified image. CDB support has nothing to do with non unified image. Signed-off-by: Haim Dreyfuss Signed-off-by: Luca Coelho commit a40287727d9b737e183959fd31a4e0c55f312853 Author: Erel Geron Date: Mon May 28 17:15:56 2018 +0300 iwlwifi: fix non_shared_ant for 22000 devices The non-shared antenna was wrong for 22000 device series. Fix it to ANT_B for correct antenna preference by coex in MVM driver. Fixes: e34d975e40ff ("iwlwifi: Add a000 HW family support") Signed-off-by: Erel Geron Signed-off-by: Luca Coelho commit 79f25b10c9da3dbc953e47033d0494e51580ac3b Author: Emmanuel Grumbach Date: Tue May 29 10:04:16 2018 +0300 iwlwifi: dbg: don't crash if the firmware crashes in the middle of a debug dump We can dump data from the firmware either when it crashes, or when the firmware is alive. Not all the data is available if the firmware is running (like the Tx / Rx FIFOs which are available only when the firmware is halted), so we first check that the firmware is alive to compute the required size for the dump and then fill the buffer with the data. When we allocate the buffer, we test the STATUS_FW_ERROR bit to check if the firmware is alive or not. This bit can be changed during the course of the dump since it is modified in the interrupt handler. We hit a case where we allocate the buffer while the firmware is sill working, and while we start to fill the buffer, the firmware crashes. Then we test STATUS_FW_ERROR again and decide to fill the buffer with data like the FIFOs even if no room was allocated for this data in the buffer. This means that we overflow the buffer that was allocated leading to memory corruption. To fix this, test the STATUS_FW_ERROR bit only once and rely on local variables to check if we should dump fifos or other firmware components. Fixes: 04fd2c28226f ("iwlwifi: mvm: add rxf and txf to dump data") Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho commit b08e876daf2afc78351f0a10b7821a512e6003da Author: Johannes Berg Date: Wed May 23 13:39:26 2018 +0200 iwlwifi: remove ucode error tracepoint Alexei's patch, assumed that all versions of "struct iwl_error_event_table" are the same, but there are really different versions in different files. Rather than trying to fix this, or splitting the tracepoint, or anything of the sort, just remove it entirely - turns out that nobody really uses it. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho commit a76938f35e4cfb9bc40a405220ec040f6b45d09c Author: Johannes Berg Date: Wed May 23 10:56:55 2018 +0200 iwlwifi: mvm: report RU offset is known We already report the RU offset, so we'd better also report that we know the value. Fixes: e5721e3f770f ("iwlwifi: mvm: add radiotap data for HE") Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho commit caf3216f6554b4699f0e84852ba4b1f47769a2de Author: Shaul Triebitz Date: Tue May 22 17:37:31 2018 +0300 iwlwifi: iwlmvm: fix typo when checking for TX Beamforming Check the actual bit (mask) in Rx notification rate_n_flags. Signed-off-by: Shaul Triebitz Signed-off-by: Luca Coelho commit da7527173b18bb8fc77407071ca427341b555d6f Author: Shahar S Matityahu Date: Tue Apr 10 12:29:49 2018 +0300 iwlwifi: debug flow cleanup Cleanup of the debug flow by moving several flows to separate functions to increase readability. Three functions were created: 1. iwl_fw_get_prph_len - returns the size needed for periphery dump. 2. iwl_fw_dump_mem for - executes the memory dumping flow. 3. iwl_trans_get_fw_monitor_len - returns the size needed for monitor dump. Signed-off-by: Shahar S Matityahu Signed-off-by: Luca Coelho commit 838f4c73a353be28222593babeeac9edca1b1be0 Author: Johannes Berg Date: Tue May 22 14:25:59 2018 +0200 iwlwifi: RX API: remove unnecessary anonymous struct There's no value in having an anonymous struct for holding a few fields, remove it. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho commit 5cfe79c8d92ae1c4fcac35723fba43ff0b2e4e48 Author: Sara Sharon Date: Thu May 17 14:41:10 2018 +0300 iwlwifi: fw: stop and start debugging using host command In new devices, access to periphery is forbidden. Send instead host command to start and stop debugging. Memory allocation is written in context info, but in case we need to update it there is a dedicated command. Add definitions, currently unused, of the new command. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho commit d25eec305c9743e929b821933590c27c2a499975 Author: Sara Sharon Date: Thu May 17 14:04:19 2018 +0300 iwlwifi: fw: add a restart FW debug function Move the restart FW debug code to a function. This avoids code duplication and lays the infra to support the new start and stop host commands in some future devices. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho commit 7eff5136744866f55bb779545950d712730b22b5 Author: Emmanuel Grumbach Date: Thu May 17 13:55:38 2018 +0300 iwlwifi: mvm: fix a comment about the SP length The SP length in the ADD_STA command is an actual number of frames, and not the SP len as it appears in the WME IE. Fix that comment. The actual code is fine. Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho commit 79517e8f8e6dddd2a90517123ffdb366828b69f5 Author: zhong jiang Date: Fri Sep 21 21:30:15 2018 +0800 crypto: cavium - remove redundant null pointer check before kfree kfree has taken the null pointer into account. hence it is safe to remove the redundant null pointer check before kfree. Signed-off-by: zhong jiang Signed-off-by: Herbert Xu commit 2a8780be9c26457b84d786f7ac9ed110625dde92 Author: Srikanth Jampala Date: Fri Sep 21 17:08:02 2018 +0530 crypto: cavium/nitrox - updated debugfs information. Updated debugfs to provide device partname and frequency etc. New file "stats" shows the number of requests posted, dropped and completed. Signed-off-by: Srikanth Jampala Signed-off-by: Herbert Xu commit fec165c947935b2b65fac3ee8081b4a5aa960872 Author: Srikanth Jampala Date: Fri Sep 21 17:08:01 2018 +0530 crypto: cavium/nitrox - add support for per device request statistics. Add per device statistics like number of requests posted, dropped and completed etc. Signed-off-by: Srikanth Jampala Signed-off-by: Herbert Xu commit 48e10548f82ea33e01ab8ed92dbcb9513463cb90 Author: Srikanth Jampala Date: Fri Sep 21 17:08:00 2018 +0530 crypto: cavium/nitrox - added support to identify the NITROX device partname. Get the device partname based on it's capabilities like, core frequency, number of cores and revision id. Signed-off-by: Srikanth Jampala Signed-off-by: Herbert Xu commit dfb89ab3f0a7df2a0a44f3a46572319446671f9f Author: Gilad Ben-Yossef Date: Thu Sep 20 14:18:40 2018 +0100 crypto: tcrypt - add OFB functional tests We already have OFB test vectors and tcrypt OFB speed tests. Add OFB functional tests to tcrypt as well. Signed-off-by: Gilad Ben-Yossef Signed-off-by: Herbert Xu commit e497c51896b3babfb14a36e497fd36a15f56cfa4 Author: Gilad Ben-Yossef Date: Thu Sep 20 14:18:39 2018 +0100 crypto: ofb - add output feedback mode Add a generic version of output feedback mode. We already have support of several hardware based transformations of this mode and the needed test vectors but we somehow missed adding a generic software one. Fix this now. Signed-off-by: Gilad Ben-Yossef Signed-off-by: Herbert Xu commit 95ba597367ddc26c1062c7ee9697c9aee53d04d0 Author: Gilad Ben-Yossef Date: Thu Sep 20 14:18:38 2018 +0100 crypto: testmgr - update sm4 test vectors Add additional test vectors from "The SM4 Blockcipher Algorithm And Its Modes Of Operations" draft-ribose-cfrg-sm4-10 and register cipher speed tests for sm4. Signed-off-by: Gilad Ben-Yossef Signed-off-by: Herbert Xu commit ce1294d981c1467c13b2b698913f35859592308b Author: zhong jiang Date: Thu Sep 20 17:57:16 2018 +0800 crypto: chtls - remove redundant null pointer check before kfree_skb kfree_skb has taken the null pointer into account. hence it is safe to remove the redundant null pointer check before kfree_skb. Signed-off-by: zhong jiang Signed-off-by: Herbert Xu commit 4d407b04d4f3900ac9d6379c5f22364a9ef66ba6 Author: Horia Geantă Date: Wed Sep 19 17:54:21 2018 +0300 crypto: tcrypt - remove remnants of pcomp-based zlib Commit 110492183c4b ("crypto: compress - remove unused pcomp interface") removed pcomp interface but missed cleaning up tcrypt. Signed-off-by: Horia Geantă Signed-off-by: Herbert Xu commit a6f37cee6e4f6fa9d61962efbcb06a032efed1ba Author: Corentin Labbe Date: Wed Sep 19 10:10:55 2018 +0000 crypto: tools - Add cryptostat userspace This patch adds an userspace tool for displaying kernel crypto API statistics. Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu commit cac5818c25d0423bda73e2b6997404ed0a7ed9e3 Author: Corentin Labbe Date: Wed Sep 19 10:10:54 2018 +0000 crypto: user - Implement a generic crypto statistics This patch implement a generic way to get statistics about all crypto usages. Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu commit a9cbfe4c784436368790f0c59674f99ba97ae21e Author: Kees Cook Date: Tue Sep 18 19:11:00 2018 -0700 crypto: skcipher - Remove SKCIPHER_REQUEST_ON_STACK() Now that all the users of the VLA-generating SKCIPHER_REQUEST_ON_STACK() macro have been moved to SYNC_SKCIPHER_REQUEST_ON_STACK(), we can remove the former. Signed-off-by: Kees Cook Signed-off-by: Herbert Xu commit 6adfbd621b59e0a399cb1398fd263b15ebc53f5b Author: Kees Cook Date: Tue Sep 18 19:10:59 2018 -0700 crypto: picoxcell - Remove VLA usage of skcipher In the quest to remove all stack VLA usage from the kernel[1], this replaces struct crypto_skcipher and SKCIPHER_REQUEST_ON_STACK() usage with struct crypto_sync_skcipher and SYNC_SKCIPHER_REQUEST_ON_STACK(), which uses a fixed stack size. [1] https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qPXydAacU1RqZWA@mail.gmail.com Cc: Jamie Iles Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Kees Cook Signed-off-by: Herbert Xu commit e87f203ce6202b0380eae31ca524a22f714b740e Author: Kees Cook Date: Tue Sep 18 19:10:58 2018 -0700 crypto: omap-aes - Remove VLA usage of skcipher In the quest to remove all stack VLA usage from the kernel[1], this replaces struct crypto_skcipher and SKCIPHER_REQUEST_ON_STACK() usage with struct crypto_sync_skcipher and SYNC_SKCIPHER_REQUEST_ON_STACK(), which uses a fixed stack size. [1] https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qPXydAacU1RqZWA@mail.gmail.com Signed-off-by: Kees Cook Signed-off-by: Herbert Xu commit f805f59d1ea2f599516e183d753e4e0acc2ed721 Author: Kees Cook Date: Tue Sep 18 19:10:57 2018 -0700 crypto: mxs-dcp - Remove VLA usage of skcipher In the quest to remove all stack VLA usage from the kernel[1], this replaces struct crypto_skcipher and SKCIPHER_REQUEST_ON_STACK() usage with struct crypto_sync_skcipher and SYNC_SKCIPHER_REQUEST_ON_STACK(), which uses a fixed stack size. [1] https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qPXydAacU1RqZWA@mail.gmail.com Signed-off-by: Kees Cook Signed-off-by: Herbert Xu commit 28874f263767c3d0ef6813663d06aa61a494f677 Author: Kees Cook Date: Tue Sep 18 19:10:56 2018 -0700 crypto: chelsio - Remove VLA usage of skcipher In the quest to remove all stack VLA usage from the kernel[1], this replaces struct crypto_skcipher and SKCIPHER_REQUEST_ON_STACK() usage with struct crypto_sync_skcipher and SYNC_SKCIPHER_REQUEST_ON_STACK(), which uses a fixed stack size. [1] https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qPXydAacU1RqZWA@mail.gmail.com Cc: Harsh Jain Signed-off-by: Kees Cook Signed-off-by: Herbert Xu commit 888a649c1103efd891aea0f2a4e4620fb54c7484 Author: Kees Cook Date: Tue Sep 18 19:10:55 2018 -0700 crypto: artpec6 - Remove VLA usage of skcipher In the quest to remove all stack VLA usage from the kernel[1], this replaces struct crypto_skcipher and SKCIPHER_REQUEST_ON_STACK() usage with struct crypto_sync_skcipher and SYNC_SKCIPHER_REQUEST_ON_STACK(), which uses a fixed stack size. [1] https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qPXydAacU1RqZWA@mail.gmail.com Cc: Jesper Nilsson Cc: Lars Persson Cc: linux-arm-kernel@axis.com Signed-off-by: Kees Cook Acked-by: Lars Persson Signed-off-by: Herbert Xu commit d1e4ba83b0286b3a0888b2fd361082ecd86fd07a Author: Kees Cook Date: Tue Sep 18 19:10:54 2018 -0700 crypto: qce - Remove VLA usage of skcipher In the quest to remove all stack VLA usage from the kernel[1], this replaces struct crypto_skcipher and SKCIPHER_REQUEST_ON_STACK() usage with struct crypto_sync_skcipher and SYNC_SKCIPHER_REQUEST_ON_STACK(), which uses a fixed stack size. [1] https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qPXydAacU1RqZWA@mail.gmail.com Cc: Himanshu Jha Signed-off-by: Kees Cook Signed-off-by: Herbert Xu commit ba70152b60e81270338d86ce7c7b71e756530430 Author: Kees Cook Date: Tue Sep 18 19:10:53 2018 -0700 crypto: sahara - Remove VLA usage of skcipher In the quest to remove all stack VLA usage from the kernel[1], this replaces struct crypto_skcipher and SKCIPHER_REQUEST_ON_STACK() usage with struct crypto_sync_skcipher and SYNC_SKCIPHER_REQUEST_ON_STACK(), which uses a fixed stack size. [1] https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qPXydAacU1RqZWA@mail.gmail.com Signed-off-by: Kees Cook Signed-off-by: Herbert Xu commit 36b3875a97b85e60eb612f8c72d19271c70b08fd Author: Kees Cook Date: Tue Sep 18 19:10:52 2018 -0700 crypto: cryptd - Remove VLA usage of skcipher In the quest to remove all stack VLA usage from the kernel[1], this replaces struct crypto_skcipher and SKCIPHER_REQUEST_ON_STACK() usage with struct crypto_sync_skcipher and SYNC_SKCIPHER_REQUEST_ON_STACK(), which uses a fixed stack size. [1] https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qPXydAacU1RqZWA@mail.gmail.com Signed-off-by: Kees Cook Signed-off-by: Herbert Xu commit 8d605398425843c7ce3c0e9a0434d832d3bd54cc Author: Kees Cook Date: Tue Sep 18 19:10:51 2018 -0700 crypto: null - Remove VLA usage of skcipher In the quest to remove all stack VLA usage from the kernel[1], this replaces struct crypto_skcipher and SKCIPHER_REQUEST_ON_STACK() usage with struct crypto_sync_skcipher and SYNC_SKCIPHER_REQUEST_ON_STACK(), which uses a fixed stack size. [1] https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qPXydAacU1RqZWA@mail.gmail.com Signed-off-by: Kees Cook Signed-off-by: Herbert Xu commit 5c525640ef455b23ce911ac71eb22c7256031b9a Author: Kees Cook Date: Tue Sep 18 19:10:50 2018 -0700 crypto: vmx - Remove VLA usage of skcipher In the quest to remove all stack VLA usage from the kernel[1], this replaces struct crypto_skcipher and SKCIPHER_REQUEST_ON_STACK() usage with struct crypto_sync_skcipher and SYNC_SKCIPHER_REQUEST_ON_STACK(), which uses a fixed stack size. [1] https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qPXydAacU1RqZWA@mail.gmail.com Cc: "Leonidas S. Barbosa" Cc: Paulo Flabiano Smorigo Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Kees Cook Signed-off-by: Herbert Xu commit 7f28615df88a6311e233c2da9279e013ea1ee76b Author: Kees Cook Date: Tue Sep 18 19:10:49 2018 -0700 crypto: ccp - Remove VLA usage of skcipher In the quest to remove all stack VLA usage from the kernel[1], this replaces struct crypto_skcipher and SKCIPHER_REQUEST_ON_STACK() usage with struct crypto_sync_skcipher and SYNC_SKCIPHER_REQUEST_ON_STACK(), which uses a fixed stack size. [1] https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qPXydAacU1RqZWA@mail.gmail.com Cc: Tom Lendacky Cc: Gary Hook Signed-off-by: Kees Cook Signed-off-by: Herbert Xu commit d2841f22f4601a2d8bae64ccef7e8e5fa8499e2f Author: Kees Cook Date: Tue Sep 18 19:10:48 2018 -0700 wusb: Remove VLA usage of skcipher In the quest to remove all stack VLA usage from the kernel[1], this replaces struct crypto_skcipher and SKCIPHER_REQUEST_ON_STACK() usage with struct crypto_sync_skcipher and SYNC_SKCIPHER_REQUEST_ON_STACK(), which uses a fixed stack size. [1] https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qPXydAacU1RqZWA@mail.gmail.com Cc: Greg Kroah-Hartman Cc: Felipe Balbi Cc: Johan Hovold Cc: "Gustavo A. R. Silva" Cc: linux-usb@vger.kernel.org Signed-off-by: Kees Cook Acked-by: Greg Kroah-Hartman Signed-off-by: Herbert Xu commit 69d826fa5da3c0e4a3dd1645f293efe4942348c1 Author: Kees Cook Date: Tue Sep 18 19:10:47 2018 -0700 rxrpc: Remove VLA usage of skcipher In the quest to remove all stack VLA usage from the kernel[1], this replaces struct crypto_skcipher and SKCIPHER_REQUEST_ON_STACK() usage with struct crypto_sync_skcipher and SYNC_SKCIPHER_REQUEST_ON_STACK(), which uses a fixed stack size. [1] https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qPXydAacU1RqZWA@mail.gmail.com Cc: David Howells Cc: linux-afs@lists.infradead.org Signed-off-by: Kees Cook Signed-off-by: Herbert Xu commit 82633a6f6d84e573b9f43be27ec55fbccc72c9de Author: Kees Cook Date: Tue Sep 18 19:10:46 2018 -0700 ppp: mppe: Remove VLA usage of skcipher In the quest to remove all stack VLA usage from the kernel[1], this replaces struct crypto_skcipher and SKCIPHER_REQUEST_ON_STACK() usage with struct crypto_sync_skcipher and SYNC_SKCIPHER_REQUEST_ON_STACK(), which uses a fixed stack size. [1] https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qPXydAacU1RqZWA@mail.gmail.com Cc: Paul Mackerras Cc: linux-ppp@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: Herbert Xu commit 69d6302b65a83ce04720158f3f6fc2c9fb46c941 Author: Kees Cook Date: Tue Sep 18 19:10:45 2018 -0700 libceph: Remove VLA usage of skcipher In the quest to remove all stack VLA usage from the kernel[1], this replaces struct crypto_skcipher and SKCIPHER_REQUEST_ON_STACK() usage with struct crypto_sync_skcipher and SYNC_SKCIPHER_REQUEST_ON_STACK(), which uses a fixed stack size. [1] https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qPXydAacU1RqZWA@mail.gmail.com Cc: Ilya Dryomov Cc: "Yan, Zheng" Cc: Sage Weil Cc: ceph-devel@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: Herbert Xu commit dc568baf9bd1d455de81a18bb68d555a3a9edc3f Author: Kees Cook Date: Tue Sep 18 19:10:44 2018 -0700 block: cryptoloop: Remove VLA usage of skcipher In the quest to remove all stack VLA usage from the kernel[1], this replaces struct crypto_skcipher and SKCIPHER_REQUEST_ON_STACK() usage with struct crypto_sync_skcipher and SYNC_SKCIPHER_REQUEST_ON_STACK(), which uses a fixed stack size. [1] https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qPXydAacU1RqZWA@mail.gmail.com Cc: Jens Axboe Cc: linux-block@vger.kernel.org Signed-off-by: Kees Cook Acked-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 88fe0b957fb66b03f4c44a072a04e694400abcc1 Author: Kees Cook Date: Tue Sep 18 19:10:43 2018 -0700 x86/fpu: Remove VLA usage of skcipher In the quest to remove all stack VLA usage from the kernel[1], this replaces struct crypto_skcipher and SKCIPHER_REQUEST_ON_STACK() usage with struct crypto_sync_skcipher and SYNC_SKCIPHER_REQUEST_ON_STACK(), which uses a fixed stack size. [1] https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qPXydAacU1RqZWA@mail.gmail.com Cc: x86@kernel.org Signed-off-by: Kees Cook Reviewed-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 531fa5d620b1e812dd0b24bbeb4d25498adffe77 Author: Kees Cook Date: Tue Sep 18 19:10:42 2018 -0700 s390/crypto: Remove VLA usage of skcipher In the quest to remove all stack VLA usage from the kernel[1], this replaces struct crypto_skcipher and SKCIPHER_REQUEST_ON_STACK() usage with struct crypto_sync_skcipher and SYNC_SKCIPHER_REQUEST_ON_STACK(), which uses a fixed stack size. [1] https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qPXydAacU1RqZWA@mail.gmail.com Cc: Martin Schwidefsky Cc: Heiko Carstens Cc: linux-s390@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: Herbert Xu commit 3103f4a71be3ac22abe926f827653f28a04ce83e Author: Kees Cook Date: Tue Sep 18 19:10:41 2018 -0700 mac802154: Remove VLA usage of skcipher In the quest to remove all stack VLA usage from the kernel[1], this replaces struct crypto_skcipher and SKCIPHER_REQUEST_ON_STACK() usage with struct crypto_sync_skcipher and SYNC_SKCIPHER_REQUEST_ON_STACK(), which uses a fixed stack size. [1] https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qPXydAacU1RqZWA@mail.gmail.com Cc: Alexander Aring Cc: Stefan Schmidt Cc: linux-wpan@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: Herbert Xu commit db20f570e17a7ab91f489d1fea942b3b7c00663c Author: Kees Cook Date: Tue Sep 18 19:10:40 2018 -0700 lib80211: Remove VLA usage of skcipher In the quest to remove all stack VLA usage from the kernel[1], this replaces struct crypto_skcipher and SKCIPHER_REQUEST_ON_STACK() usage with struct crypto_sync_skcipher and SYNC_SKCIPHER_REQUEST_ON_STACK(), which uses a fixed stack size. [1] https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qPXydAacU1RqZWA@mail.gmail.com Cc: Johannes Berg Cc: linux-wireless@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: Herbert Xu commit e9e575b8f29445bcde67f421891efa4d6527d987 Author: Kees Cook Date: Tue Sep 18 19:10:39 2018 -0700 gss_krb5: Remove VLA usage of skcipher In the quest to remove all stack VLA usage from the kernel[1], this replaces struct crypto_skcipher and SKCIPHER_REQUEST_ON_STACK() usage with struct crypto_sync_skcipher and SYNC_SKCIPHER_REQUEST_ON_STACK(), which uses a fixed stack size. [1] https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qPXydAacU1RqZWA@mail.gmail.com Cc: Trond Myklebust Cc: Anna Schumaker Cc: "J. Bruce Fields" Cc: Jeff Layton Cc: YueHaibing Cc: linux-nfs@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: Herbert Xu commit b350bee5ea0f4db75d4c6191a2e95db16f40c278 Author: Kees Cook Date: Tue Sep 18 19:10:38 2018 -0700 crypto: skcipher - Introduce crypto_sync_skcipher In preparation for removal of VLAs due to skcipher requests on the stack via SKCIPHER_REQUEST_ON_STACK() usage, this introduces the infrastructure for the "sync skcipher" tfm, which is for handling the on-stack cases of skcipher, which are always non-ASYNC and have a known limited request size. The crypto API additions: struct crypto_sync_skcipher (wrapper for struct crypto_skcipher) crypto_alloc_sync_skcipher() crypto_free_sync_skcipher() crypto_sync_skcipher_setkey() crypto_sync_skcipher_get_flags() crypto_sync_skcipher_set_flags() crypto_sync_skcipher_clear_flags() crypto_sync_skcipher_blocksize() crypto_sync_skcipher_ivsize() crypto_sync_skcipher_reqtfm() skcipher_request_set_sync_tfm() SYNC_SKCIPHER_REQUEST_ON_STACK() (with tfm type check) Signed-off-by: Kees Cook Reviewed-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 3944f139d5592790b70bc64f197162e643a8512b Author: Dan Aloni Date: Mon Sep 17 20:24:32 2018 +0300 crypto: fix a memory leak in rsa-kcs1pad's encryption mode The encryption mode of pkcs1pad never uses out_sg and out_buf, so there's no need to allocate the buffer, which presently is not even being freed. CC: Herbert Xu CC: linux-crypto@vger.kernel.org CC: "David S. Miller" Signed-off-by: Dan Aloni Signed-off-by: Herbert Xu commit cdf640a69f44d2a728da85a9c65b4e99c56047a9 Author: Christoph Manszewski Date: Mon Sep 17 17:09:30 2018 +0200 crypto: s5p-sss: Add aes-ctr support Add support for aes counter(ctr) block cipher mode of operation for Exynos Hardware. In contrast to ecb and cbc modes, aes-ctr allows encyption/decryption for request sizes not being a multiple of 16(bytes). Hardware requires block sizes being a multiple of 16(bytes). In order to achieve this, copy request source and destination memory, and align it's size to 16. That way hardware processes additional bytes, that are omitted when copying the result back to its original destination. Tested on Odroid-U3 with Exynos 4412 CPU, kernel 4.19-rc2 with crypto run-time self test testmgr. Signed-off-by: Christoph Manszewski Reviewed-by: Krzysztof Kozlowski Acked-by: Kamil Konieczny Signed-off-by: Herbert Xu commit b1b4416ffd42c234762a8ab78ebffbf08e2de523 Author: Christoph Manszewski Date: Mon Sep 17 17:09:29 2018 +0200 crypto: s5p-sss: Minor code cleanup Modifications in s5p-sss.c: - remove unnecessary 'goto' statements (making code shorter), - change uint_8 and uint_32 to u8 and u32 types (for consistency in the driver and making code shorter), Signed-off-by: Christoph Manszewski Reviewed-by: Krzysztof Kozlowski Acked-by: Kamil Konieczny Signed-off-by: Herbert Xu commit 6c12b6ba45490eeb820fdceccf5a53f42a26799c Author: Christoph Manszewski Date: Mon Sep 17 17:09:28 2018 +0200 crypto: s5p-sss: Fix Fix argument list alignment Fix misalignment of continued argument list. Signed-off-by: Christoph Manszewski Reviewed-by: Krzysztof Kozlowski Acked-by: Kamil Konieczny Signed-off-by: Herbert Xu commit 5842cd44786055231b233ed5ed98cdb63ffb7db3 Author: Christoph Manszewski Date: Mon Sep 17 17:09:27 2018 +0200 crypto: s5p-sss: Fix race in error handling Remove a race condition introduced by error path in functions: s5p_aes_interrupt and s5p_aes_crypt_start. Setting the busy field of struct s5p_aes_dev to false made it possible for s5p_tasklet_cb to change the req field, before s5p_aes_complete was called. Change the first parameter of s5p_aes_complete to struct ablkcipher_request. Before spin_unlock, make a copy of the currently handled request, to ensure s5p_aes_complete function call with the correct request. Signed-off-by: Christoph Manszewski Acked-by: Kamil Konieczny Reviewed-by: Krzysztof Kozlowski Signed-off-by: Herbert Xu commit 940c620d6af8fca7d115de40f19870fba415efac Author: Colin Ian King Date: Thu Sep 27 22:36:27 2018 +0100 rpmsg: smd: fix memory leak on channel create Currently a failed allocation of channel->name leads to an immediate return without freeing channel. Fix this by setting ret to -ENOMEM and jumping to an exit path that kfree's channel. Detected by CoverityScan, CID#1473692 ("Resource Leak") Fixes: 53e2822e56c7 ("rpmsg: Introduce Qualcomm SMD backend") Cc: stable@vger.kernel.org Signed-off-by: Colin Ian King Signed-off-by: Bjorn Andersson commit 9fe278f44b4bc06cc61e33b2af65f87d507d13d0 Author: Giridhar Malavali Date: Wed Sep 26 22:05:18 2018 -0700 scsi: qla2xxx: Move log messages before issuing command to firmware There is a probability that the SRB structure might have been released by the time the debug log message dereferences it. This patch moved the log messages before the command is issued to the firmware to prevent unknown behavior and kernel crash Fixes: 726b85487067 ("qla2xxx: Add framework for async fabric discovery") Cc: Signed-off-by: Giridhar Malavali Reviewed-by: Ewan D. Milne Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit bcc71cc3cde1468958a3ea859276d8d1a1a68265 Author: Giridhar Malavali Date: Wed Sep 26 22:05:17 2018 -0700 scsi: qla2xxx: Fix for double free of SRB structure This patch fixes issue during switch command query where driver was freeing SRB resources multiple times Following stack trace will be seen [ 853.436234] BUG: unable to handle kernel NULL pointer dereference at 0000000000000001 [ 853.436348] IP: [] kmem_cache_alloc+0x74/0x1e0 [ 853.436476] PGD 0 [ 853.436601] Oops: 0000 [#1] SMP [ 853.454700] [] ? mod_timer+0x14a/0x220 [ 853.455543] [] mempool_alloc_slab+0x15/0x20 [ 853.456395] [] mempool_alloc+0x69/0x170 [ 853.457257] [] ? internal_add_timer+0x32/0x70 [ 853.458136] [] qla2xxx_queuecommand+0x29b/0x3f0 [qla2xxx] [ 853.459024] [] scsi_dispatch_cmd+0xaa/0x230 [ 853.459923] [] scsi_request_fn+0x4df/0x680 [ 853.460829] [] ? __switch_to+0xd7/0x510 [ 853.461747] [] __blk_run_queue+0x33/0x40 [ 853.462670] [] blk_delay_work+0x25/0x40 [ 853.463603] [] process_one_work+0x17a/0x440 [ 853.464546] [] worker_thread+0x126/0x3c0 [ 853.465501] [] ? manage_workers.isra.24+0x2a0/0x2a0 [ 853.466447] [] kthread+0xcf/0xe0 [ 853.467379] [] ? insert_kthread_work+0x40/0x40 [ 853.470172] Code: db e2 7e 49 8b 50 08 4d 8b 20 49 8b 40 10 4d 85 e4 0f 84 20 01 00 00 48 85 c0 0f 84 17 01 00 00 49 63 46 20 48 8d 4a 01 4d 8b 06 <49> 8b 1c 04 4c 89 e0 65 49 0f c7 08 0f 94 c0 84 c0 74 ba 49 63 [ 853.472072] RIP [] kmem_cache_alloc+0x74/0x1e0 [ 853.472971] RSP Fixes: 726b85487067 ("qla2xxx: Add framework for async fabric discovery") Cc: Signed-off-by: Giridhar Malavali Reviewed-by: Ewan D. Milne Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit 710bc78f829d014eca95ed7ccc4052bc064b1320 Author: Quinn Tran Date: Wed Sep 26 22:05:16 2018 -0700 scsi: qla2xxx: Fix recursive mailbox timeout This patch prevents user space mailbox request from doing chip reset if the mailbox timed out. The chip reset is only reserved for the DPC thread to ensure all mailbox requests are flushed properly. The DPC thread is responsible for the flushing all MBs and chip reset. Fixes: b2000805a975 ("scsi: qla2xxx: Flush mailbox commands on chip reset") Cc: Signed-off-by: Quinn Tran Reviewed-by: Ewan D. Milne Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit 39553065f77c297239308470ee313841f4e07db4 Author: Himanshu Madhani Date: Wed Sep 26 22:05:15 2018 -0700 scsi: qla2xxx: Fix driver hang when FC-NVMe LUNs are configured This patch fixes multiple call for qla_nvme_unregister_remote_port() as part of qlt_schedule_session_for_deletion(), Do not call it again during qla_nvme_delete() Fixes: e473b3074104 ("scsi: qla2xxx: Add FC-NVMe abort processing") Cc: Reviewed-by: Ewan D. Milne Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit 5c6400536481d9ef44ef94e7bf2c7b8e81534db7 Author: Quinn Tran Date: Wed Sep 26 22:05:14 2018 -0700 scsi: qla2xxx: Fix re-using LoopID when handle is in use This patch fixes issue where driver clears NPort ID map instead of marking handle in use. Once driver clears NPort ID from the database, it can reuse the same NPort ID resulting in a PLOGI failure. [mkp: fixed Himanshu's SoB] Fixes: a084fd68e1d2 ("scsi: qla2xxx: Fix re-login for Nport Handle in use") Cc: Signed-of-by: Quinn Tran Reviewed-by: Ewan D. Milne Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit 732ee9a912cf2d9a50c5f9c4213cdc2f885d6aa6 Author: Quinn Tran Date: Wed Sep 26 22:05:13 2018 -0700 scsi: qla2xxx: Fix duplicate switch database entries The response data buffer used in switch scan is reused 4 times. (For example, for commands GPN_FT, GNN_FT for FCP and FC-NVME) Before driver reuses this buffer, clear it to prevent duplicate entries in our database. Fixes: a4239945b8ad1 ("scsi: qla2xxx: Add switch command to simplify fabric discovery" Cc: Signed-off-by: Quinn Tran Reviewed-by: Ewan D. Milne Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit db186382af21e926e90df19499475f2552192b77 Author: Quinn Tran Date: Wed Sep 26 22:05:12 2018 -0700 scsi: qla2xxx: Fix NVMe Target discovery This patch fixes issue when remoteport registers itself as both FCP and FC-NVMe with the switch, driver will pick FC-NVMe personality as default when scanning for targets. Driver was using comaprative operator instead of bitwise operator to check for fc4_type for both FCP and FC-NVME. Fixes: 2b5b96473efc ("scsi: qla2xxx: Fix FC-NVMe LUN discovery") Cc: Signed-off-by: Quinn Tran Reviewed-by: Ewan D. Milne Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit f7d61c995df74d6bb57bbff6a2b7b1874c4a2baa Author: Quinn Tran Date: Wed Sep 26 22:05:11 2018 -0700 scsi: qla2xxx: Fix NVMe session hang on unload Send aborts only when chip is active. Fixes: 623ee824e579 ("scsi: qla2xxx: Fix FC-NVMe IO abort during driver reset") Cc: # 4.14 Signed-off-by: Quinn Tran Reviewed-by: Ewan D. Milne Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit 1703659dada8a5bfe9c31db6436792cbca1e26ea Author: Dan Carpenter Date: Thu Sep 20 13:02:36 2018 +0300 scsi: qla2xxx: don't allow negative thresholds We shouldn't allow negative thresholds. I don't know what it would do but it can't be good. Fixes: 8b4673ba3a1b ("scsi: qla2xxx: Add support for ZIO6 interrupt threshold") Signed-off-by: Dan Carpenter Acked-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit 87c2ee740c07f1edae9eec8bc45cb9b32a68f323 Merge: 2de0b0a158bf 6a9624305621 Author: Dave Airlie Date: Fri Sep 28 09:48:35 2018 +1000 Merge branch 'drm-next-4.20' of git://people.freedesktop.org/~agd5f/linux into drm-next More new features and fixes for 4.20: - Add dynamic powergating support for VCN on picasso - Scheduler cleanup - Vega20 support for KFD - DC cleanups and bug fixes Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20180927184348.2696-1-alexander.deucher@amd.com commit 2de0b0a158bf423208c3898522c8fa1c1078df48 Merge: db9825c95498 5ac93f81096a Author: Dave Airlie Date: Fri Sep 28 09:47:23 2018 +1000 Merge tag 'drm/tegra/for-4.20-rc1' of git://anongit.freedesktop.org/tegra/linux into drm-next drm/tegra: Changes for v4.20-rc1 This contains initial Tegra194 support as well as a couple of fixes for DMA/IOMMU integration. Signed-off-by: Dave Airlie From: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/20180927205051.30017-1-thierry.reding@gmail.com commit 84e13c453d8666195fbffb4b596e81daf78e2f11 Author: Masanari Iida Date: Tue Sep 11 18:48:11 2018 +0900 scsi: qla2xxx: Fix comment in MODULE_PARM_DESC in qla2xxx Default value of ql2xasynctmfenable for qla2xxx driver was set to 1 in commit 043dc1d7e850 ("scsi: qla2xxx: Enable Async TMF processing") but comment in MODULE_PARAM_DESC was not modified. Signed-off-by: Masanari Iida Acked-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit db9825c95498280718c4687fcf712016f5b6f5f6 Merge: 156e60bc71aa 448626103dad Author: Dave Airlie Date: Fri Sep 28 09:37:51 2018 +1000 Merge tag 'drm-intel-next-2018-09-21' of git://anongit.freedesktop.org/drm/drm-intel into drm-next Driver Changes: - Bugzilla 107600: Fix stuttering video playback on MythTV on old hardware (Chris) - Avoid black screen when using CSC coefficient matrix (Raviraj) - Hammer PDs on Baytrail to make sure they reload (Chris) - Capture some objects if unable to capture all, on error (Chris) - Add W/A for 16 GB DIMMs on SKL+ (Mahesh) - Only enable IPC for symmetric memory configurations on KBL+ (Mahesh) - Assume pipe A to have maximum stride limits (Ville) - Always update update OA contexts via context image (Tvrtko) - Icelake enabling patches (Madhav, Dhinakaran) - Add Icelake DMC firmware (Anusha) - Fixes for CI found corner cases (Chris) - Limit the backpressure for request allocation (Chris) - Park GPU on module load so usage starts from known state (Chris) - Flush tasklet when checking for idle (Chris) - Use coherent write into the context image on BSW+ (Chris) - Fix possible integer overflow for framebuffers that get aligned past 4GiB (Ville) - Downgrade fence timeout from warn to notice and add debug hint (Chris) - Fixes to multi function encoder code (Ville) - Fix sprite plane check logic (Dan, Ville) - PAGE_SIZE vs. I915_GTT_PAGE_SIZE fixes (Ville) - Decode memory bandwidth and parameters for BXT and SKL+ (Mahesh) - Overwrite BIOS set IPC value from KMS (Mahesh) - Multiple pipe handling code cleanups/restructurings/optimizations (Ville) - Spare low 4G address for non-48bit objects (Chris) - Free context_setparam of struct_mutex (Chris) - Delay updating ring register state on resume (Chris) - Avoid unnecessarily copying overlay IOCTL parameters (Chris) - Update GuC power domain states even without submission (Michal) - Restore GuC preempt-context across S3/S4 (Chris) - Add kernel selftest for rapid context switching (Chris) - Keep runtime power management ref for live selftests (Chris) - GEM code cleanups (Matt) Signed-off-by: Dave Airlie From: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20180927095933.GA11458@jlahtine-desk.ger.corp.intel.com commit 156e60bc71aa31a3b42b1d66a822c2999bd0994c Merge: bf78296ab1cb c2b70ffcd34e Author: Dave Airlie Date: Fri Sep 28 09:31:03 2018 +1000 Merge tag 'drm-misc-next-2018-09-27' of git://anongit.freedesktop.org/drm/drm-misc into drm-next drm-misc-next for 4.20: UAPI Changes: - None Cross-subsystem Changes: - MAINTAINERS: Move udl, mxsfb, and fsl-dcu into drm-misc (Stefan, Sean) Core Changes: - syncobj: Check condition before returning timeout in schedule() (Chris) Driver Changes: - various: First wave of drm_fbdev_generic_setup() conversions (Noralf) - bochs/virtio: More format byte-order improvements (Gerd) - mxsfb: A couple fixes + add runtime pm support (Leonard) - virtio: Add vmap support for prime objects (Ezequiel) Cc: Stefan Agner Cc: Sean Paul Cc: Noralf Trønnes Cc: Gerd Hoffman Cc: Leonard Crestez Cc: Chris Wilson Cc: Ezequiel Garcia Signed-off-by: Dave Airlie From: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20180927093950.GA180365@art_vandelay commit 6c3b7af1c975b87b86dcb2af233d1ae21eb05107 Author: Omar Sandoval Date: Thu Sep 27 15:55:55 2018 -0700 kyber: add tracepoints When debugging Kyber, it's really useful to know what latencies we've been having, how the domain depths have been adjusted, and if we've actually been throttling. Add three tracepoints, kyber_latency, kyber_adjust, and kyber_throttled, to record that. Signed-off-by: Omar Sandoval Signed-off-by: Jens Axboe commit 6e25cb01ea206362616a2be469d4f3635f58ca63 Author: Omar Sandoval Date: Thu Sep 27 15:55:54 2018 -0700 kyber: implement improved heuristics Kyber's current heuristics have a few flaws: - It's based on the mean latency, but p99 latency tends to be more meaningful to anyone who cares about latency. The mean can also be skewed by rare outliers that the scheduler can't do anything about. - The statistics calculations are purely time-based with a short window. This works for steady, high load, but is more sensitive to outliers with bursty workloads. - It only considers the latency once an I/O has been submitted to the device, but the user cares about the time spent in the kernel, as well. These are shortcomings of the generic blk-stat code which doesn't quite fit the ideal use case for Kyber. So, this replaces the statistics with a histogram used to calculate percentiles of total latency and I/O latency, which we then use to adjust depths in a slightly more intelligent manner: - Sync and async writes are now the same domain. - Discards are a separate domain. - Domain queue depths are scaled by the ratio of the p99 total latency to the target latency (e.g., if the p99 latency is double the target latency, we will double the queue depth; if the p99 latency is half of the target latency, we can halve the queue depth). - We use the I/O latency to determine whether we should scale queue depths down: we will only scale down if any domain's I/O latency exceeds the target latency, which is an indicator of congestion in the device. These new heuristics are just as scalable as the heuristics they replace. Signed-off-by: Omar Sandoval Signed-off-by: Jens Axboe commit fa2a1f609e6491383ab63ff6329e0aaa2db2b9f7 Author: Omar Sandoval Date: Thu Sep 27 15:55:53 2018 -0700 kyber: don't make domain token sbitmap larger than necessary The domain token sbitmaps are currently initialized to the device queue depth or 256, whichever is larger, and immediately resized to the maximum depth for that domain (256, 128, or 64 for read, write, and other, respectively). The sbitmap is never resized larger than that, so it's unnecessary to allocate a bitmap larger than the maximum depth. Let's just allocate it to the maximum depth to begin with. This will use marginally less memory, and more importantly, give us a more appropriate number of bits per sbitmap word. Signed-off-by: Omar Sandoval Signed-off-by: Jens Axboe commit f8232f29ca268b0ba9e98638c9ed71e337e7f0a4 Author: Omar Sandoval Date: Thu Sep 27 15:55:52 2018 -0700 block: export blk_stat_enable_accounting() Kyber will need this in a future change if it is built as a module. Signed-off-by: Omar Sandoval Signed-off-by: Jens Axboe commit ed88660a5372faa67c168c3db5201e33e488c9fd Author: Omar Sandoval Date: Thu Sep 27 15:55:51 2018 -0700 block: move call of scheduler's ->completed_request() hook Commit 4bc6339a583c ("block: move blk_stat_add() to __blk_mq_end_request()") consolidated some calls using ktime_get() so we'd only need to call it once. Kyber's ->completed_request() hook also calls ktime_get(), so let's move it to the same place, too. Signed-off-by: Omar Sandoval Signed-off-by: Jens Axboe commit 5f143af7501e7c435c56e181a655493edaa92509 Author: Marco Felsch Date: Tue Sep 25 11:42:29 2018 +0200 spi: make OF helper available for others The of_find_spi_device_by_node() helper function is useful for other modules too. Export the funciton as GPL like all other spi helper functions and make it available if CONFIG_OF is enabled, because it isn't related to the CONFIG_OF_DYNAMIC context. Finally add a stub if CONFIG_OF isn't enabled, so others must not care about it. Signed-off-by: Marco Felsch Signed-off-by: Mark Brown commit b445bfcb9081ae90fec90b828f3aacc565776901 Author: Marco Felsch Date: Tue Sep 25 11:42:28 2018 +0200 spi: switch to SPDX license identifier Use the appropriate SPDX license identifier and drop the previous license text. Signed-off-by: Marco Felsch Signed-off-by: Mark Brown commit aea3877e24f3acc6145094848dbb85f9ce85674a Author: Geert Uytterhoeven Date: Tue Sep 25 11:46:55 2018 +0200 spi: spi-mem: Fix inverted logic in op sanity check On r8a7791/koelsch: m25p80 spi0.0: error -22 reading 9f m25p80: probe of spi0.0 failed with error -22 Apparently the logic in spi_mem_check_op() is wrong, rejecting the spi-mem operation if any buswidth is valid, instead of invalid. Fixes: 380583227c0c7f52 ("spi: spi-mem: Add extra sanity checks on the op param") Signed-off-by: Geert Uytterhoeven Reviewed-by: Boris Brezillon Signed-off-by: Mark Brown commit 73569a50959e4ec63bcf05839a030e799a350de1 Author: Chris Brandt Date: Thu Sep 27 09:35:19 2018 -0500 dt-bindings: spi: rspi: Add R7S9210 support Add support for RZ/A2 Signed-off-by: Chris Brandt Signed-off-by: Mark Brown commit 71d9a846fbcac1113b3810c06a8a3ddd936ada01 Author: Arnd Bergmann Date: Wed Sep 26 14:58:21 2018 +0200 spi: sprd: don't mark remove function as __exit The __exit section is left out for built-in drivers, so a 'remove' callback must not be marked as such to avoid breaking when we unbind a device at runtime. This was pointed out by kbuild: `sprd_spi_remove' referenced in section `.data' of drivers/spi/spi-sprd.o: defined in discarded section `.exit.text' of drivers/spi/spi-sprd.o Fixes: e7d973a31c24 ("spi: sprd: Add SPI driver for Spreadtrum SC9860") Signed-off-by: Arnd Bergmann Acked-by: Baolin Wang Signed-off-by: Mark Brown commit 06da26e5ce157bf2af09ef4a9f5dc30af4599fa0 Author: YueHaibing Date: Wed Sep 26 15:33:03 2018 +0800 ASoC: qcom: qdsp6: remove duplicated include Remove duplicated includes linux/of_platform.h and linux/wait.h Signed-off-by: YueHaibing Signed-off-by: Mark Brown commit 765f50d464457c6a397506b3f3dc58dacc227c6d Author: Biju Das Date: Thu Sep 27 14:51:25 2018 +0100 ASoC: rsnd: Add r8a7744 support Document RZ/G1N (R8A7744) SoC bindings. Signed-off-by: Biju Das Reviewed-by: Chris Paterson Signed-off-by: Mark Brown commit 18380dcc52cc8965e5144ce33fdfad7e168679a5 Author: Arnd Bergmann Date: Wed Sep 26 21:37:40 2018 +0200 ASoC: wm9712: fix unused variable warning The 'ret' variable is now only used in an #ifdef, and causes a warning if it is declared outside of that block: sound/soc/codecs/wm9712.c: In function 'wm9712_soc_probe': sound/soc/codecs/wm9712.c:641:6: error: unused variable 'ret' [-Werror=unused-variable] Fixes: 2ed1a8e0ce8d ("ASoC: wm9712: add ac97 new bus support") Signed-off-by: Arnd Bergmann Acked-by: Charles Keepax Signed-off-by: Mark Brown commit 53c156ab9d8aae2083d3c895365a3e39b864a5a7 Author: Arnd Bergmann Date: Wed Sep 26 14:59:40 2018 +0200 ASoC: atmel: add SND_SOC_I2C_AND_SPI dependency Selecting SND_SOC_WM8731 is only allowed when all its dependencies are already there: WARNING: unmet direct dependencies detected for SND_SOC_WM8731 Depends on [m]: SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && SND_SOC_I2C_AND_SPI [=m] Selected by [y]: - SND_SOC_MIKROE_PROTO [=y] && SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && SND_ATMEL_SOC [=y] && OF [=y] Selected by [m]: - SND_AT91_SOC_SAM9X5_WM8731 [=m] && SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && SND_ATMEL_SOC [=y] && (ARCH_AT91 [=y] || COMPILE_TEST [=y]) && ATMEL_SSC [=y] && SND_SOC_I2C_AND_SPI [=m] - SND_SOC_ALL_CODECS [=m] && SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && COMPILE_TEST [=y] && SND_SOC_I2C_AND_SPI [=m] Fixes: a45f8853a5f9 ("ASoC: Add driver for PROTO Audio CODEC (with a WM8731)") Signed-off-by: Arnd Bergmann Reviewed-by: Codrin Ciubotariu Signed-off-by: Mark Brown commit bec5ecdf41d404691980c9c82ba867113cc8dee5 Author: Arnd Bergmann Date: Wed Sep 26 14:46:35 2018 +0200 ASoC: pxa: avoid AC97_BUS build warning Selecting AC97_BUS_NEW from SND_PXA2XX_SOC_AC97 leads to a Kconfig warning if any other driver selects AC97_BUS: WARNING: unmet direct dependencies detected for AC97_BUS_COMPAT Depends on [n]: SOUND [=y] && !UML && SND [=y] && AC97_BUS_NEW [=y] && !AC97_BUS [=y] Selected by [y]: - SND_SOC_WM9713 [=y] && SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && AC97_BUS_NEW [=y] I don't know if that combination is supposed to work. Assuming it is not, this adds a dependency on all users for PXA to avoids the combination. Fixes: 1c8bc7b3de5e ("ASoC: pxa: switch to new ac97 bus support") Signed-off-by: Arnd Bergmann Signed-off-by: Mark Brown commit 42cfb412e24ffbb46d6de9590293bc44f921a0fb Author: Matthias Kaehlcke Date: Tue Sep 25 11:09:14 2018 -0700 ASoC: soc-utils: Rename dummy_dma_ops to snd_dummy_dma_ops The symbols 'dummy_dma_ops' is declared with different data types by sound/soc/soc-utils.c and arch/arm64/include/asm/dma-mapping.h. This leads to conflicts when soc-utils.c (indirectly) includes dma-mapping.h: sound/soc/soc-utils.c:282:33: error: conflicting types for 'dummy_dma_ops' static const struct snd_pcm_ops dummy_dma_ops = { ^ ... arch/arm64/include/asm/dma-mapping.h:27:33: note: previous declaration of 'dummy_dma_ops' was here extern const struct dma_map_ops dummy_dma_ops; ^ Rename the symbol in soc-utils.c to 'snd_dummy_dma_ops' to avoid the conflict. Signed-off-by: Matthias Kaehlcke Signed-off-by: Mark Brown commit da08d8cb8cfc58a340fc5e163385b5dfd714d762 Author: Guenter Roeck Date: Tue Sep 25 21:06:24 2018 -0700 of: unittest: Disable interrupt node tests for old world MAC systems On systems with OF_IMAP_OLDWORLD_MAC set in of_irq_workarounds, the devicetree interrupt parsing code is different, causing unit tests of devicetree interrupt nodes to fail. Due to a bug in unittest code, which tries to dereference an uninitialized pointer, this results in a crash. OF: /testcase-data/phandle-tests/consumer-a: arguments longer than property Unable to handle kernel paging request for data at address 0x00bc616e Faulting instruction address: 0xc08e9468 Oops: Kernel access of bad area, sig: 11 [#1] BE PREEMPT PowerMac Modules linked in: CPU: 0 PID: 1 Comm: swapper Not tainted 4.14.72-rc1-yocto-standard+ #1 task: cf8e0000 task.stack: cf8da000 NIP: c08e9468 LR: c08ea5bc CTR: c08ea5ac REGS: cf8dbb50 TRAP: 0300 Not tainted (4.14.72-rc1-yocto-standard+) MSR: 00001032 CR: 82004044 XER: 00000000 DAR: 00bc616e DSISR: 40000000 GPR00: c08ea5bc cf8dbc00 cf8e0000 c13ca517 c13ca517 c13ca8a0 00000066 00000002 GPR08: 00000063 00bc614e c0b05865 000affff 82004048 00000000 c00047f0 00000000 GPR16: c0a80000 c0a9cc34 c13ca517 c0ad1134 05ffffff 000affff c0b05860 c0abeef8 GPR24: cecec278 cecec278 c0a8c4d0 c0a885e0 c13ca8a0 05ffffff c13ca8a0 c13ca517 NIP [c08e9468] device_node_gen_full_name+0x30/0x15c LR [c08ea5bc] device_node_string+0x190/0x3c8 Call Trace: [cf8dbc00] [c007f670] trace_hardirqs_on_caller+0x118/0x1fc (unreliable) [cf8dbc40] [c08ea5bc] device_node_string+0x190/0x3c8 [cf8dbcb0] [c08eb794] pointer+0x25c/0x4d0 [cf8dbd00] [c08ebcbc] vsnprintf+0x2b4/0x5ec [cf8dbd60] [c08ec00c] vscnprintf+0x18/0x48 [cf8dbd70] [c008e268] vprintk_store+0x4c/0x22c [cf8dbda0] [c008ecac] vprintk_emit+0x94/0x130 [cf8dbdd0] [c008ff54] printk+0x5c/0x6c [cf8dbe10] [c0b8ddd4] of_unittest+0x2220/0x26f8 [cf8dbea0] [c0004434] do_one_initcall+0x4c/0x184 [cf8dbf00] [c0b4534c] kernel_init_freeable+0x13c/0x1d8 [cf8dbf30] [c0004814] kernel_init+0x24/0x118 [cf8dbf40] [c0013398] ret_from_kernel_thread+0x5c/0x64 The problem was observed when running a qemu test for the g3beige machine with devicetree unittests enabled. Disable interrupt node tests on affected systems to avoid both false unittest failures and the crash. With this patch in place, unittest on the affected system passes with the following message. dt-test ### end of unittest - 144 passed, 0 failed Fixes: 53a42093d96ef ("of: Add device tree selftests") Signed-off-by: Guenter Roeck Reviewed-by: Frank Rowand Signed-off-by: Rob Herring commit f040d23c81860e59deef2089669f8ef330541f69 Author: Eric W. Biederman Date: Thu Apr 19 18:22:47 2018 -0500 signal/unicore32: Use force_sig_fault where appropriate Signed-off-by: "Eric W. Biederman" commit ccebcb1f5f3a85d0d23a23dfa611b28ae1e0f824 Author: Eric W. Biederman Date: Thu Apr 19 18:13:51 2018 -0500 signal/unicore32: Generate siginfo in ucs32_notify_die Pass the signal number, and the signal code, and the faulting address into uc32_notify_die so the callers do not need to generate a struct siginfo. In ucs32_ntoify_die use the newly passed in information to call force_sig_fault to generate the siginfo and send the error. This simplifies the code making the chances of bugs much less likely. Signed-off-by: "Eric W. Biederman" commit 5ee527d7cefddebd72970d290e5cc06c9ae32890 Author: Eric W. Biederman Date: Thu Apr 19 17:29:04 2018 -0500 signal/unicore32: Use send_sig_fault where appropriate Signed-off-by: "Eric W. Biederman" commit 15773ae938d8d93d982461990bebad6e1d7a1830 Author: Eric W. Biederman Date: Tue Aug 1 13:41:34 2017 -0500 signal/arc: Use force_sig_fault where appropriate Acked-by: Vineet Gupta Signed-off-by: "Eric W. Biederman" commit 4445229445273da16cc3a4928e3ba327b0301e7f Author: Eric W. Biederman Date: Thu Apr 19 19:20:58 2018 -0500 signal/arc: Push siginfo generation into unhandled_exception Pass signr, sicode, and address into unhandled_exception as explicit parameters instead of members of struct siginfo. Then in unhandled exception generate and send the siginfo using force_sig_fault. This keeps the code simpler and less error prone. Acked-by: Vineet Gupta Signed-off-by: "Eric W. Biederman" commit a618a2754ce6037beabe770aa01ae5ca97a0d65e Author: Eric W. Biederman Date: Tue Apr 17 17:39:29 2018 -0500 signal/ia64: Use force_sig_fault where appropriate Acked-by: Tony Luck Signed-off-by: "Eric W. Biederman" commit b92adb74adde62d9a9780ff2977d63dcb21aeaa6 Author: Eric W. Biederman Date: Mon Apr 16 13:55:53 2018 -0500 signal/ia64: Use the force_sig(SIGSEGV,...) in ia64_rt_sigreturn The ia64 handling of failure to return from a signal frame has been trying to set overlapping fields in struct siginfo since 2.3.43. The si_code corresponds to the fields that were stomped (not the field that is actually written), so I can not imagine a piece of userspace code making sense of the signal frame if it looks closely. In practice failure to return from a signal frame is a rare event that almost never happens. Someone using an alternate signal stack to recover and looking in detail is even more rare. So I presume no one has ever noticed and reported this ia64 nonsense. Sort this out by causing ia64 to use force_sig(SIGSEGV) like other architectures. Fixes: 2.3.43 Cc: Tony Luck Cc: Fenghua Yu Cc: linux-ia64@vger.kernel.org Acked-by: Tony Luck Signed-off-by: "Eric W. Biederman" commit 8b9c6b28312cc51a87055e292b11c5aa28f0c935 Author: Eric W. Biederman Date: Mon Apr 16 13:55:06 2018 -0500 signal/ia64: Use the generic force_sigsegv in setup_frame The ia64 handling of failure to setup a signal frame has been trying to set overlapping fields in struct siginfo since 2.3.43. The si_pid and si_uid fields are stomped when the si_addr field is set. The si_code of SI_KERNEL indicates that si_pid and si_uid should be valid, and that si_addr does not exist. Being at odds with the definition of SI_KERNEL and with nothing to indicate that this was a signal frame setup failure there is no way for userspace to know that si_addr was filled out instead. In practice failure to setup a signal frame is rare, and si_pid and si_uid are always set to 0 when si_code is SI_KERNEL so I expect no one has looked closely enough before to see this weirdness. Further the only difference between force_sigsegv_info and the generic force_sigsegv other than the return code is that force_sigsegv_info stomps the si_uid and si_pid fields. Remove the bug and simplify the code by using force_sigsegv in this case just like other architectures. Fixes: 2.3.43 Cc: Tony Luck Cc: Fenghua Yu Cc: linux-ia64@vger.kernel.org Acked-by: Tony Luck Signed-off-by: "Eric W. Biederman" commit 795a83714526754a2b8089a0533bfef24287bcb9 Author: Eric W. Biederman Date: Mon Apr 16 13:39:10 2018 -0500 signal/arm/kvm: Use send_sig_mceerr This simplifies the code making it clearer what is going on, and making the siginfo generation easier to maintain. Signed-off-by: "Eric W. Biederman" commit b059454846141c2daacffe8a99366ef31cc1f23f Author: Eric W. Biederman Date: Mon Apr 16 13:35:45 2018 -0500 signal/arm: Use send_sig_fault where appropriate Signed-off-by: "Eric W. Biederman" commit 3ee6a4498724a464ba9882007c4aef8ec01eba10 Author: Eric W. Biederman Date: Mon Jun 18 14:50:26 2018 -0500 signal/arm: Use force_sig_fault where appropriate Signed-off-by: "Eric W. Biederman" commit 05e792e30ed039b5d202d31b86ba0d0491cd6f3c Author: Eric W. Biederman Date: Mon Apr 16 13:25:24 2018 -0500 signal/arm: Push siginfo generation into arm_notify_die In arm_notify_die call force_sig_fault to let the generic code handle siginfo generation. This removes some boiler plate making the code easier to maintain in the long run. Signed-off-by: "Eric W. Biederman" commit c852680959d0964198e829da80f012b3df43060c Author: Eric W. Biederman Date: Mon Apr 16 13:47:06 2018 -0500 signal/arm64: Use send_sig_fault where appropriate Reviewed-by: Catalin Marinas Tested-by: Catalin Marinas Signed-off-by: "Eric W. Biederman" commit f3a900b34101bb8df10b83f326b3af796c101a05 Author: Eric W. Biederman Date: Sat Sep 22 10:52:41 2018 +0200 signal/arm64: Add and use arm64_force_sig_ptrace_errno_trap Add arm64_force_sig_ptrace_errno_trap for consistency with arm64_force_sig_fault and use it where appropriate. This adds the show_signal logic to the force_sig_errno_trap case, where it was apparently overlooked earlier. Reviewed-by: Catalin Marinas Tested-by: Catalin Marinas Signed-off-by: "Eric W. Biederman" commit 2627f0347c682d03e8594a81083557d3d798f58f Author: Eric W. Biederman Date: Sat Sep 22 10:47:54 2018 +0200 signal/arm64: In ptrace_hbptriggered name the signal description string This will let the description be reused shortly. Reviewed-by: Catalin Marinas Tested-by: Catalin Marinas Signed-off-by: "Eric W. Biederman" commit 009f608ab20a25d01a07e9e75e7d246e81252eb8 Author: Eric W. Biederman Date: Sat Sep 22 10:43:01 2018 +0200 signal/arm64: Remove arm64_force_sig_info The function has no more callers so remove it. Reviewed-by: Catalin Marinas Tested-by: Catalin Marinas Signed-off-by: "Eric W. Biederman" commit b4d5557caa07a01796ca8a2d756eeaa5308f6876 Author: Eric W. Biederman Date: Sat Sep 22 10:37:15 2018 +0200 signal/arm64: Add and use arm64_force_sig_mceerr as appropriate Add arm64_force_sig_mceerr for consistency with arm64_force_sig_fault, and use it in the one location that can take advantage of it. This removes the fiddly filling out of siginfo before sending a signal reporting an memory error to userspace. Reviewed-by: Catalin Marinas Tested-by: Catalin Marinas Signed-off-by: "Eric W. Biederman" commit feca355b3d8eba3a2cbca63c97a59a14681983f7 Author: Eric W. Biederman Date: Sat Sep 22 10:26:57 2018 +0200 signal/arm64: Add and use arm64_force_sig_fault where appropriate Wrap force_sig_fault with a helper that calls arm64_show_signal and call arm64_force_sig_fault where appropraite. Reviewed-by: Catalin Marinas Tested-by: Catalin Marinas Signed-off-by: Eric W. Biederman commit 559d8d91a89cc2a0190781a5b5ce3faeaef7920f Author: Eric W. Biederman Date: Sat Sep 22 10:18:42 2018 +0200 signal/arm64: Only call set_thread_esr once in do_page_fault This code is truly common between the signal sending cases so share it. Reviewed-by: Catalin Marinas Tested-by: Catalin Marinas Signed-off-by: Eric W. Biederman commit 2d2837fab5fadaf6942e834c2cbe8c9e594917c1 Author: Eric W. Biederman Date: Sat Sep 22 10:16:42 2018 +0200 signal/arm64: Only perform one esr_to_fault_info call in do_page_fault As this work is truly common between all of the signal sending cases there is no need to repeat it between the different cases. Reviewed-by: Catalin Marinas Tested-by: Catalin Marinas Signed-off-by: Eric W. Biederman commit effb093ad28b69230aad222650ec954a21c06ede Author: Eric W. Biederman Date: Sat Sep 22 10:05:41 2018 +0200 signal/arm64: Expand __do_user_fault and remove it Not all of the signals passed to __do_user_fault can be handled the same way so expand the now tiny __do_user_fault in it's callers and remove it. Reviewed-by: Catalin Marinas Tested-by: Catalin Marinas Signed-off-by: "Eric W. Biederman" commit aefab2b4c01ee67f2b60e400e46bad63d29c2603 Author: Eric W. Biederman Date: Sat Sep 22 09:54:33 2018 +0200 signal/arm64: For clarity separate the 3 signal sending cases in do_page_fault It gets easy to confuse what is going on when some code is shared and some not so stop sharing the trivial bits of signal generation to make future updates easier to understand. Reviewed-by: Catalin Marinas Tested-by: Catalin Marinas Signed-off-by: "Eric W. Biederman" commit 9ea3a9743cac4fd2e296223ae6a95bf11d7365d0 Author: Eric W. Biederman Date: Sat Sep 22 09:46:39 2018 +0200 signal/arm64: Consolidate the two hwpoison cases in do_page_fault These two cases are practically the same and use siginfo differently from the other signals sent from do_page_fault. So consolidate them to make future changes easier. Reviewed-by: Catalin Marinas Tested-by: Catalin Marinas Signed-off-by: "Eric W. Biederman" commit f29ad209e428f5bc596de39dd9b8d73db5739920 Author: Eric W. Biederman Date: Sat Sep 22 09:37:55 2018 +0200 signal/arm64: Factor set_thread_esr out of __do_user_fault This pepares for sending signals with something other than arm64_force_sig_info. Reviewed-by: Catalin Marinas Tested-by: Catalin Marinas Signed-off-by: "Eric W. Biederman" commit 1628a7cc85db7eced9cd8195fd66574a35470825 Author: Eric W. Biederman Date: Sat Sep 22 00:52:21 2018 +0200 signal/arm64: Factor out arm64_show_signal from arm64_force_sig_info Filling in siginfo is error prone and so it is wise to use more specialized helpers to do that work. Factor out the arm specific unhandled signal reporting from the work of delivering a signal so the code can be modified to use functions that take the information to fill out siginfo as parameters. Reviewed-by: Catalin Marinas Tested-by: Catalin Marinas Signed-off-by: "Eric W. Biederman" commit 24b8f79dd8e036da618d158b4c0295208d478c5c Author: Eric W. Biederman Date: Sat Sep 22 00:38:41 2018 +0200 signal/arm64: Remove unneeded tsk parameter from arm64_force_sig_info Every caller passes in current for tsk so there is no need to pass tsk. Instead make tsk a local variable initialized to current. Reviewed-by: Catalin Marinas Tested-by: Catalin Marinas Signed-off-by: "Eric W. Biederman" commit 6fa998e83ef9bcc479b0fa088de262a73e139bf8 Author: Eric W. Biederman Date: Fri Sep 21 17:24:40 2018 +0200 signal/arm64: Push siginfo generation into arm64_notify_die Instead of generating a struct siginfo before calling arm64_notify_die pass the signal number, tne sicode and the fault address into arm64_notify_die and have it call force_sig_fault instead of force_sig_info to let the generic code generate the struct siginfo. This keeps code passing just the needed information into siginfo generating code, making it easier to see what is happening and harder to get wrong. Further by letting the generic code handle the generation of struct siginfo it reduces the number of sites generating struct siginfo making it possible to review them and verify that all of the fiddly details for a structure passed to userspace are handled properly. Reviewed-by: Catalin Marinas Tested-by: Catalin Marinas Signed-off-by: "Eric W. Biederman" commit 5140a6f471137205687428b0b8f12f7187bffd18 Author: YueHaibing Date: Sun Sep 23 08:20:22 2018 +0000 x86/hyperv: Remove unused include Remove including . It's not needed. Signed-off-by: YueHaibing Signed-off-by: Thomas Gleixner Reviewed-by: Michael Kelley Cc: "K. Y. Srinivasan" Cc: Haiyang Zhang Cc: Stephen Hemminger Cc: "H. Peter Anvin" Cc: Cc: Link: https://lkml.kernel.org/r/1537690822-97455-1-git-send-email-yuehaibing@huawei.com commit 78e6e5c11acef7dae81d7f0e919ad5563a611a6a Merge: 100811936f89 370920c47b26 Author: Daniel Borkmann Date: Thu Sep 27 21:15:00 2018 +0200 Merge branch 'bpf-libbpf-attach-by-name' Andrey Ignatov says: ==================== This patch set introduces libbpf_attach_type_by_name function in libbpf to identify attach type by section name. This is useful to avoid writing same logic over and over again in user space applications that leverage libbpf. Patch 1 has more details on the new function and problem being solved. Patches 2 and 3 add support for new section names. Patch 4 uses new function in a selftest. Patch 5 adds selftest for libbpf_{prog,attach}_type_by_name. As a side note there are a lot of inconsistencies now between names used by libbpf and bpftool (e.g. cgroup/skb vs cgroup_skb, cgroup_device and device vs cgroup/dev, sockops vs sock_ops, etc). This patch set does not address it but it tries not to make it harder to address it in the future. ==================== Signed-off-by: Daniel Borkmann commit 2f285f46240d67060061d153786740d4df53cd78 Author: Dexuan Cui Date: Tue Sep 18 22:29:50 2018 +0000 x86/hyperv: Suppress "PCI: Fatal: No config space access function found" A Generation-2 Linux VM on Hyper-V doesn't have the legacy PCI bus, and users always see the scary warning, which is actually harmless. Suppress it. Signed-off-by: Dexuan Cui Signed-off-by: Thomas Gleixner Reviewed-by: Michael Kelley Cc: "H. Peter Anvin" Cc: KY Srinivasan Cc: Haiyang Zhang Cc: Stephen Hemminger Cc: "devel@linuxdriverproject.org" Cc: Olaf Aepfle Cc: Andy Whitcroft Cc: Jason Wang Cc: Vitaly Kuznetsov Cc: Marcelo Cerri Cc: Josh Poulson Link: https://lkml.kernel.org/r/ Date: Wed Sep 26 15:24:57 2018 -0700 selftests/bpf: Test libbpf_{prog,attach}_type_by_name Add selftest for libbpf functions libbpf_prog_type_by_name and libbpf_attach_type_by_name. Example of output: % ./tools/testing/selftests/bpf/test_section_names Summary: 35 PASSED, 0 FAILED Signed-off-by: Andrey Ignatov Signed-off-by: Daniel Borkmann commit c9bf507d0acba950e5d85ef27727ce61458ef5aa Author: Andrey Ignatov Date: Wed Sep 26 15:24:56 2018 -0700 selftests/bpf: Use libbpf_attach_type_by_name in test_socket_cookie Use newly introduced libbpf_attach_type_by_name in test_socket_cookie selftest. Signed-off-by: Andrey Ignatov Signed-off-by: Daniel Borkmann commit c6f6851b28ae26000352598f01968b3ff7dcf588 Author: Andrey Ignatov Date: Wed Sep 26 15:24:55 2018 -0700 libbpf: Support sk_skb/stream_{parser, verdict} section names Add section names for BPF_SK_SKB_STREAM_PARSER and BPF_SK_SKB_STREAM_VERDICT attach types to be able to identify them in libbpf_attach_type_by_name. "stream_parser" and "stream_verdict" are used instead of simple "parser" and "verdict" just to avoid possible confusion in a place where attach type is used alone (e.g. in bpftool's show sub-commands) since there is another attach point that can be named as "verdict": BPF_SK_MSG_VERDICT. Signed-off-by: Andrey Ignatov Signed-off-by: Daniel Borkmann commit bafa7afe63391419c7cb8e42f1ba9f8dddd7c8fb Author: Andrey Ignatov Date: Wed Sep 26 15:24:54 2018 -0700 libbpf: Support cgroup_skb/{e,in}gress section names Add section names for BPF_CGROUP_INET_INGRESS and BPF_CGROUP_INET_EGRESS attach types to be able to identify them in libbpf_attach_type_by_name. "cgroup_skb" is used instead of "cgroup/skb" mostly to easy possible unifying of how libbpf and bpftool works with section names: * bpftool uses "cgroup_skb" to in "prog list" sub-command; * bpftool uses "ingress" and "egress" in "cgroup list" sub-command; * having two parts instead of three in a string like "cgroup_skb/ingress" can be leveraged to split it to prog_type part and attach_type part, or vise versa: use two parts to make a section name. Signed-off-by: Andrey Ignatov Signed-off-by: Daniel Borkmann commit 956b620fcf0b64de403cd26a56bc41e6e4826ea6 Author: Andrey Ignatov Date: Wed Sep 26 15:24:53 2018 -0700 libbpf: Introduce libbpf_attach_type_by_name There is a common use-case when ELF object contains multiple BPF programs and every program has its own section name. If it's cgroup-bpf then programs have to be 1) loaded and 2) attached to a cgroup. It's convenient to have information necessary to load BPF program together with program itself. This is where section name works fine in conjunction with libbpf_prog_type_by_name that identifies prog_type and expected_attach_type and these can be used with BPF_PROG_LOAD. But there is currently no way to identify attach_type by section name and it leads to messy code in user space that reinvents guessing logic every time it has to identify attach type to use with BPF_PROG_ATTACH. The patch introduces libbpf_attach_type_by_name that guesses attach type by section name if a program can be attached. The difference between expected_attach_type provided by libbpf_prog_type_by_name and attach_type provided by libbpf_attach_type_by_name is the former is used at BPF_PROG_LOAD time and can be zero if a program of prog_type X has only one corresponding attach type Y whether the latter provides specific attach type to use with BPF_PROG_ATTACH. No new section names were added to section_names array. Only existing ones were reorganized and attach_type was added where appropriate. Signed-off-by: Andrey Ignatov Signed-off-by: Daniel Borkmann commit 100811936f89fd455eda1984810c09003550555b Author: Song Liu Date: Thu Sep 27 09:34:41 2018 -0700 bpf: test_bpf: add init_net to dev for flow_dissector Latest changes in __skb_flow_dissect() assume skb->dev has valid nd_net. However, this is not true for test_bpf. As a result, test_bpf.ko crashes the system with the following stack trace: [ 1133.716622] BUG: unable to handle kernel paging request at 0000000000001030 [ 1133.716623] PGD 8000001fbf7ee067 [ 1133.716624] P4D 8000001fbf7ee067 [ 1133.716624] PUD 1f6c1cf067 [ 1133.716625] PMD 0 [ 1133.716628] Oops: 0000 [#1] SMP PTI [ 1133.716630] CPU: 7 PID: 40473 Comm: modprobe Kdump: loaded Not tainted 4.19.0-rc5-00805-gca11cc92ccd2 #1167 [ 1133.716631] Hardware name: Wiwynn Leopard-Orv2/Leopard-DDR BW, BIOS LBM12.5 12/06/2017 [ 1133.716638] RIP: 0010:__skb_flow_dissect+0x83/0x1680 [ 1133.716639] Code: 04 00 00 41 0f b7 44 24 04 48 85 db 4d 8d 14 07 0f 84 01 02 00 00 48 8b 43 10 48 85 c0 0f 84 e5 01 00 00 48 8b 80 a8 04 00 00 <48> 8b 90 30 10 00 00 48 85 d2 0f 84 dd 01 00 00 31 c0 b9 05 00 00 [ 1133.716640] RSP: 0018:ffffc900303c7a80 EFLAGS: 00010282 [ 1133.716642] RAX: 0000000000000000 RBX: ffff881fea0b7400 RCX: 0000000000000000 [ 1133.716643] RDX: ffffc900303c7bb4 RSI: ffffffff8235c3e0 RDI: ffff881fea0b7400 [ 1133.716643] RBP: ffffc900303c7b80 R08: 0000000000000000 R09: 000000000000000e [ 1133.716644] R10: ffffc900303c7bb4 R11: ffff881fb6840400 R12: ffffffff8235c3e0 [ 1133.716645] R13: 0000000000000008 R14: 000000000000001e R15: ffffc900303c7bb4 [ 1133.716646] FS: 00007f54e75d3740(0000) GS:ffff881fff5c0000(0000) knlGS:0000000000000000 [ 1133.716648] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 1133.716649] CR2: 0000000000001030 CR3: 0000001f6c226005 CR4: 00000000003606e0 [ 1133.716649] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 1133.716650] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 1133.716651] Call Trace: [ 1133.716660] ? sched_clock_cpu+0xc/0xa0 [ 1133.716662] ? sched_clock_cpu+0xc/0xa0 [ 1133.716665] ? log_store+0x1b5/0x260 [ 1133.716667] ? up+0x12/0x60 [ 1133.716669] ? skb_get_poff+0x4b/0xa0 [ 1133.716674] ? __kmalloc_reserve.isra.47+0x2e/0x80 [ 1133.716675] skb_get_poff+0x4b/0xa0 [ 1133.716680] bpf_skb_get_pay_offset+0xa/0x10 [ 1133.716686] ? test_bpf_init+0x578/0x1000 [test_bpf] [ 1133.716690] ? netlink_broadcast_filtered+0x153/0x3d0 [ 1133.716695] ? free_pcppages_bulk+0x324/0x600 [ 1133.716696] ? 0xffffffffa0279000 [ 1133.716699] ? do_one_initcall+0x46/0x1bd [ 1133.716704] ? kmem_cache_alloc_trace+0x144/0x1a0 [ 1133.716709] ? do_init_module+0x5b/0x209 [ 1133.716712] ? load_module+0x2136/0x25d0 [ 1133.716715] ? __do_sys_finit_module+0xba/0xe0 [ 1133.716717] ? __do_sys_finit_module+0xba/0xe0 [ 1133.716719] ? do_syscall_64+0x48/0x100 [ 1133.716724] ? entry_SYSCALL_64_after_hwframe+0x44/0xa9 This patch fixes tes_bpf by using init_net in the dummy dev. Fixes: d58e468b1112 ("flow_dissector: implements flow dissector BPF hook") Reported-by: Eric Dumazet Cc: Willem de Bruijn Cc: Petar Penkov Signed-off-by: Song Liu Reviewed-by: Eric Dumazet Acked-by: Willem de Bruijn Signed-off-by: Daniel Borkmann commit 53d6eb08e9f185834231d5c32499b10310cce3aa Author: Andrey Ignatov Date: Tue Sep 25 15:20:37 2018 -0700 bpftool: Fix bpftool net output Print `bpftool net` output to stdout instead of stderr. Only errors should be printed to stderr. Regular output should go to stdout and this is what all other subcommands of bpftool do, including --json and --pretty formats of `bpftool net` itself. Fixes: commit f6f3bac08ff9 ("tools/bpf: bpftool: add net support") Signed-off-by: Andrey Ignatov Acked-by: Yonghong Song Acked-by: Song Liu Signed-off-by: Daniel Borkmann commit 3df6e0234aebc55888069997239fe2847d4cf152 Author: Yishai Hadas Date: Thu Sep 20 21:45:21 2018 +0300 IB/mlx5: Enable DEVX on IB IB has additional protections with SELinux that cannot be extended to the DEVX domain. SELinux can restrict access to pkeys. The first version of DEVX blocked IB entirely until this could be understood. Since DEVX requires CAP_NET_RAW, it supersedes the SELinux restriction and allows userspace to form arbitrary packets with arbitrary pkeys. Thus we enable IB for DEVX when CAP_NET_RAW is given. Signed-off-by: Yishai Hadas Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 7e1335a736969a8b5169629e6569779d42fcda2f Author: Yishai Hadas Date: Thu Sep 20 21:45:20 2018 +0300 IB/mlx5: Enable DEVX white list commands Enable DEVX white list commands without the need for CAP_NET_RAW. DEVX uid must exist from the ucontext or the device so that the firmware will mask unprivileged capabilities. Signed-off-by: Yishai Hadas Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 76dc5a8406bffabf3f466e331a3e9515ddf93954 Author: Yishai Hadas Date: Thu Sep 20 21:45:19 2018 +0300 IB/mlx5: Manage device uid for DEVX white list commands Manage device uid for DEVX white list commands. The created device uid will be used on white list commands if the user didn't supply its own uid. This will enable the firmware to filter out non privileged functionality as of the recognition of the uid. Signed-off-by: Yishai Hadas Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 7f72052cb48efb5637ed99d2f45cb33a0bf60719 Author: Yishai Hadas Date: Thu Sep 20 21:45:18 2018 +0300 IB/mlx5: Expose RAW QP device handles to user space Expose RAW QP device handles to user space by extending the UHW part of mlx5_ib_create_qp_resp. This data is returned only when DEVX context is used where it may be applicable. Signed-off-by: Yishai Hadas Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 3994586f4d7a1e8eb2a152405d0a1c9c8b947c4c Author: Parav Pandit Date: Tue Sep 25 12:04:04 2018 +0300 RDMA/core: Acquire and release mmap_sem on page range Currently mmap_sem is read locked while pinning the memory. In a multi-threaded application of a process, holding mmap_sem lock creates contention with other threads who might be either registering memory, creating QPs or simply doing mmap() as such operations also require to hold the mmap_sem write lock. All such operation cannot make forward progress until one memory pin operation is completed. It becomes more worse if the memory is unpinned and/or memory registration is large (in GB range). Therefore, instead of holding mmap_sem for too long (for whole region pinning), acquire and release the lock for every few pages. For example on x86 with 4K page size, acquire and release mmap_sem for every 2Mbytes memory chunk. This allows other competing threads to make progress who might wish to hold mmap_sem for shorter duration. When memory registration latency is measured using [1] for memory sizes ranging from 4K to 48GB, <= 1% or 0.5% degradation is noticed. In many runs no difference is seen other than run-to-run variance. In other targeted tests of users with large memory, desired improvements are seen due to reduced contention of mmap_sem. [1] https://github.com/paravmellanox/rtool $ rdma_resource_lat -c 1 -s 48G -a -u L -i 500 -A It registers pinned memory from 4K to 48GB size with 500 iterations for each memory size. $ rdma_resource_lat -c 1 -s 12G -a -u L -i 500 -t 4 4 competing threads pin memory, each of 12GB size with 500 iterations. Signed-off-by: Parav Pandit Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 7904ba8a66f400182a204893c92098994e22a88d Author: Peter Zijlstra Date: Wed Sep 19 10:50:24 2018 +0200 x86/mm/cpa: Optimize __cpa_flush_range() If we IPI for WBINDV, then we might as well kill the entire TLB too. But if we don't have to invalidate cache, there is no reason not to use a range TLB flush. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner Reviewed-by: Dave Hansen Cc: Bin Yang Cc: Mark Gross Link: https://lkml.kernel.org/r/20180919085948.195633798@infradead.org commit 47e262ac5b84015c4a101ff51767c464fb7497a6 Author: Peter Zijlstra Date: Wed Sep 19 10:50:23 2018 +0200 x86/mm/cpa: Factor common code between cpa_flush_*() The start of cpa_flush_range() and cpa_flush_array() is the same, use a common function. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner Reviewed-by: Dave Hansen Cc: Bin Yang Cc: Mark Gross Link: https://lkml.kernel.org/r/20180919085948.138859183@infradead.org commit fce2ce9544e9f098ba828442221ce99c2a5ecb0f Author: Peter Zijlstra Date: Wed Sep 19 10:50:22 2018 +0200 x86/mm/cpa: Move CLFLUSH test into cpa_flush_array() Rather than guarding cpa_flush_array() users with a CLFLUSH test, put it inside. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner Reviewed-by: Dave Hansen Cc: Bin Yang Cc: Mark Gross Link: https://lkml.kernel.org/r/20180919085948.087848187@infradead.org commit 5f464b33b17219a233af1267c621632225bc7acc Author: Peter Zijlstra Date: Wed Sep 19 10:50:21 2018 +0200 x86/mm/cpa: Move CLFLUSH test into cpa_flush_range() Rather than guarding all cpa_flush_range() uses with a CLFLUSH test, put it inside. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner Reviewed-by: Dave Hansen Cc: Bin Yang Cc: Mark Gross Link: https://lkml.kernel.org/r/20180919085948.036195503@infradead.org commit a7295fd53c39ce781a9792c9dd2c8747bf274160 Author: Peter Zijlstra Date: Wed Sep 19 10:50:20 2018 +0200 x86/mm/cpa: Use flush_tlb_kernel_range() Both cpa_flush_range() and cpa_flush_array() have a well specified range, use that to do a range based TLB invalidate. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner Reviewed-by: Dave Hansen Cc: Bin Yang Cc: Mark Gross Link: https://lkml.kernel.org/r/20180919085947.985193217@infradead.org commit ddd07b750382adc2b78fdfbec47af8a6e0d8ef37 Author: Peter Zijlstra Date: Wed Sep 19 10:50:19 2018 +0200 x86/mm/cpa: Unconditionally avoid WBINDV when we can CAT has happened, WBINDV is bad (even before CAT blowing away the entire cache on a multi-core platform wasn't nice), try not to use it ever. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner Reviewed-by: Dave Hansen Cc: Bin Yang Cc: Mark Gross Link: https://lkml.kernel.org/r/20180919085947.933674526@infradead.org commit c0a759abf5a686a37b9204c13b7e281fe516c8f0 Author: Peter Zijlstra Date: Wed Sep 19 10:50:18 2018 +0200 x86/mm/cpa: Move flush_tlb_all() There is an atom errata, where we do a local TLB invalidate right before we return and then do a global TLB invalidate. Move the global invalidate up a little bit and avoid the local invalidate entirely. This does put the global invalidate under pgd_lock, but that shouldn't matter. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner Reviewed-by: Dave Hansen Cc: Bin Yang Cc: Mark Gross Link: https://lkml.kernel.org/r/20180919085947.882287392@infradead.org commit c6185b1f21a47af94617fde3af7e803817b522a9 Author: Peter Zijlstra Date: Wed Sep 19 10:50:17 2018 +0200 x86/mm/cpa: Use flush_tlb_all() Instead of open-coding it.. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner Reviewed-by: Dave Hansen Cc: Bin Yang Cc: Mark Gross Link: https://lkml.kernel.org/r/20180919085947.831102058@infradead.org commit 585948f4f695b07204702cfee0f828424af32aa7 Author: Thomas Gleixner Date: Mon Sep 17 16:29:17 2018 +0200 x86/mm/cpa: Avoid the 4k pages check completely The extra loop which tries hard to preserve large pages in case of conflicts with static protection regions turns out to be not preserving anything, at least not in the experiments which have been conducted. There might be corner cases in which the code would be able to preserve a large page oaccsionally, but it's really not worth the extra code and the cycles wasted in the common case. Before: 1G pages checked: 2 1G pages sameprot: 0 1G pages preserved: 0 2M pages checked: 541 2M pages sameprot: 466 2M pages preserved: 47 4K pages checked: 514 4K pages set-checked: 7668 After: 1G pages checked: 2 1G pages sameprot: 0 1G pages preserved: 0 2M pages checked: 538 2M pages sameprot: 466 2M pages preserved: 47 4K pages set-checked: 7668 Signed-off-by: Thomas Gleixner Reviewed-by: Dave Hansen Cc: Peter Zijlstra Cc: Bin Yang Cc: Mark Gross Link: https://lkml.kernel.org/r/20180917143546.589642503@linutronix.de commit 9cc9f17a5a0a8564b41b7c5c460e7f078c42d712 Author: Thomas Gleixner Date: Mon Sep 17 16:29:16 2018 +0200 x86/mm/cpa: Do the range check early To avoid excessive 4k wise checks in the common case do a quick check first whether the requested new page protections conflict with a static protection area in the large page. If there is no conflict then the decision whether to preserve or to split the page can be made immediately. If the requested range covers the full large page, preserve it. Otherwise split it up. No point in doing a slow crawl in 4k steps. Before: 1G pages checked: 2 1G pages sameprot: 0 1G pages preserved: 0 2M pages checked: 538 2M pages sameprot: 466 2M pages preserved: 47 4K pages checked: 560642 4K pages set-checked: 7668 After: 1G pages checked: 2 1G pages sameprot: 0 1G pages preserved: 0 2M pages checked: 541 2M pages sameprot: 466 2M pages preserved: 47 4K pages checked: 514 4K pages set-checked: 7668 Signed-off-by: Thomas Gleixner Reviewed-by: Dave Hansen Cc: Peter Zijlstra Cc: Bin Yang Cc: Mark Gross Link: https://lkml.kernel.org/r/20180917143546.507259989@linutronix.de commit 1c4b406ee89c2c4210f2e19b97d39215f445c316 Author: Thomas Gleixner Date: Mon Sep 17 16:29:15 2018 +0200 x86/mm/cpa: Optimize same protection check When the existing mapping is correct and the new requested page protections are the same as the existing ones, then further checks can be omitted and the large page can be preserved. The slow path 4k wise check will not come up with a different result. Before: 1G pages checked: 2 1G pages sameprot: 0 1G pages preserved: 0 2M pages checked: 540 2M pages sameprot: 466 2M pages preserved: 47 4K pages checked: 800709 4K pages set-checked: 7668 After: 1G pages checked: 2 1G pages sameprot: 0 1G pages preserved: 0 2M pages checked: 538 2M pages sameprot: 466 2M pages preserved: 47 4K pages checked: 560642 4K pages set-checked: 7668 Signed-off-by: Thomas Gleixner Reviewed-by: Dave Hansen Cc: Peter Zijlstra Cc: Bin Yang Cc: Mark Gross Link: https://lkml.kernel.org/r/20180917143546.424477581@linutronix.de commit f61c5ba2885eabc7bc4b0b2f5232f475216ba446 Author: Thomas Gleixner Date: Mon Sep 17 16:29:14 2018 +0200 x86/mm/cpa: Add sanity check for existing mappings With the range check it is possible to do a quick verification that the current mapping is correct vs. the static protection areas. In case a incorrect mapping is detected a warning is emitted and the large page is split up. If the large page is a 2M page, then the split code is forced to check the static protections for the PTE entries to fix up the incorrectness. For 1G pages this can't be done easily because that would require to either find the offending 2M areas before the split or afterwards. For now just warn about that case and revisit it when reported. Signed-off-by: Thomas Gleixner Reviewed-by: Dave Hansen Cc: Peter Zijlstra Cc: Bin Yang Cc: Mark Gross Link: https://lkml.kernel.org/r/20180917143546.331408643@linutronix.de commit 69c31e69df3d2efc4ad7f53d500fdd920d3865a4 Author: Thomas Gleixner Date: Mon Sep 17 16:29:13 2018 +0200 x86/mm/cpa: Avoid static protection checks on unmap If the new pgprot has the PRESENT bit cleared, then conflicts vs. RW/NX are completely irrelevant. Before: 1G pages checked: 2 1G pages sameprot: 0 1G pages preserved: 0 2M pages checked: 540 2M pages sameprot: 466 2M pages preserved: 47 4K pages checked: 800770 4K pages set-checked: 7668 After: 1G pages checked: 2 1G pages sameprot: 0 1G pages preserved: 0 2M pages checked: 540 2M pages sameprot: 466 2M pages preserved: 47 4K pages checked: 800709 4K pages set-checked: 7668 Signed-off-by: Thomas Gleixner Reviewed-by: Dave Hansen Cc: Peter Zijlstra Cc: Bin Yang Cc: Mark Gross Link: https://lkml.kernel.org/r/20180917143546.245849757@linutronix.de commit 5c280cf6081ff99078e28b51172d78359f194fd9 Author: Thomas Gleixner Date: Mon Sep 17 16:29:12 2018 +0200 x86/mm/cpa: Add large page preservation statistics The large page preservation mechanism is just magic and provides no information at all. Add optional statistic output in debugfs so the magic can be evaluated. Defaults is off. Output: 1G pages checked: 2 1G pages sameprot: 0 1G pages preserved: 0 2M pages checked: 540 2M pages sameprot: 466 2M pages preserved: 47 4K pages checked: 800770 4K pages set-checked: 7668 Signed-off-by: Thomas Gleixner Reviewed-by: Dave Hansen Cc: Peter Zijlstra Cc: Bin Yang Cc: Mark Gross Link: https://lkml.kernel.org/r/20180917143546.160867778@linutronix.de commit 4046460b867f8b041c81c26c09d3bcad6d6e814e Author: Thomas Gleixner Date: Mon Sep 17 16:29:11 2018 +0200 x86/mm/cpa: Add debug mechanism The whole static protection magic is silently fixing up anything which is handed in. That's just wrong. The offending call sites need to be fixed. Add a debug mechanism which emits a warning if a requested mapping needs to be fixed up. The DETECT debug mechanism is really not meant to be enabled except for developers, so limit the output hard to the protection fixups. Signed-off-by: Thomas Gleixner Reviewed-by: Dave Hansen Cc: Peter Zijlstra Cc: Bin Yang Cc: Mark Gross Link: https://lkml.kernel.org/r/20180917143546.078998733@linutronix.de commit 91ee8f5c1f50a1f4096c178a93a8da46ce3f6cc8 Author: Thomas Gleixner Date: Mon Sep 17 16:29:10 2018 +0200 x86/mm/cpa: Allow range check for static protections Checking static protections only page by page is slow especially for huge pages. To allow quick checks over a complete range, add the ability to do that. Make the checks inclusive so the ranges can be directly used for debug output later. No functional change. Signed-off-by: Thomas Gleixner Reviewed-by: Dave Hansen Cc: Peter Zijlstra Cc: Bin Yang Cc: Mark Gross Link: https://lkml.kernel.org/r/20180917143545.995734490@linutronix.de commit afd7969a99e072e6aa0d88511176d4d2f3009fd9 Author: Thomas Gleixner Date: Mon Sep 17 16:29:09 2018 +0200 x86/mm/cpa: Rework static_protections() static_protections() is pretty unreadable. Split it up into separate checks for each protection area. Signed-off-by: Thomas Gleixner Reviewed-by: Dave Hansen Cc: Peter Zijlstra Cc: Bin Yang Cc: Mark Gross Link: https://lkml.kernel.org/r/20180917143545.913005317@linutronix.de commit 8679de0959e65ee7f78db6405a8d23e61665751d Author: Thomas Gleixner Date: Mon Sep 17 16:29:08 2018 +0200 x86/mm/cpa: Split, rename and clean up try_preserve_large_page() Avoid the extra variable and gotos by splitting the function into the actual algorithm and a callable function which contains the lock protection. Rename it to should_split_large_page() while at it so the return values make actually sense. Clean up the code flow, comments and general whitespace damage while at it. No functional change. Signed-off-by: Thomas Gleixner Reviewed-by: Dave Hansen Cc: Peter Zijlstra Cc: Bin Yang Cc: Mark Gross Link: https://lkml.kernel.org/r/20180917143545.830507216@linutronix.de commit 2a25dc7c79c92c6cba45c6218c49395173be80bf Author: Thomas Gleixner Date: Mon Sep 17 16:29:07 2018 +0200 x86/mm/init32: Mark text and rodata RO in one go The sequence of marking text and rodata read-only in 32bit init is: set_ro(text); kernel_set_to_readonly = 1; set_ro(rodata); When kernel_set_to_readonly is 1 it enables the protection mechanism in CPA for the read only regions. With the upcoming checks for existing mappings this consequently triggers the warning about an existing mapping being incorrect vs. static protections because rodata has not been converted yet. There is no technical reason to split the two, so just combine the RO protection to convert text and rodata in one go. Convert the printks to pr_info while at it. Reported-by: kernel test robot Signed-off-by: Thomas Gleixner Reviewed-by: Dave Hansen Cc: Peter Zijlstra Cc: Bin Yang Cc: Mark Gross Link: https://lkml.kernel.org/r/20180917143545.731701535@linutronix.de commit b54900fce4835862ab15b4f94f7cb676e65ecf6d Author: Colin Ian King Date: Thu Sep 27 14:24:30 2018 +0100 RDMA/hns: fix spelling mistake "reseved" -> "reserved" Trivial fix to spelling mistake in dev_err error message Signed-off-by: Colin Ian King Signed-off-by: Jason Gunthorpe commit c4a3e94641449362ee970f521a2cdb0e8cd08690 Author: Pu Wen Date: Thu Sep 27 16:31:28 2018 +0200 EDAC, amd64: Add Hygon Dhyana support Add support for Hygon Dhyana CPU to EDAC. Signed-off-by: Pu Wen Signed-off-by: Borislav Petkov Cc: mchehab@kernel.org Cc: tglx@linutronix.de Cc: mingo@redhat.com Cc: hpa@zytor.com Cc: thomas.lendacky@amd.com Cc: linux-edac@vger.kernel.org Link: https://lkml.kernel.org/r/9d71061301177822bc55b3bfd44f91057458d886.1537533369.git.puwen@hygon.cn commit d913e8966a8f4b259dd6f11f0c334d865cf9d3aa Merge: 6b5885941955 c9661c1e80b6 Author: Borislav Petkov Date: Thu Sep 27 18:36:24 2018 +0200 Merge branch 'tip-x86-hygon' into edac-for-4.20 ... to pick up a dependent commit and share it with the tip tree, branch tip:x86/cpu. Signed-off-by: Borislav Petkov commit cc9690cfc7a36873b219d569049e10f073dd22e4 Author: Pu Wen Date: Sun Sep 23 17:37:38 2018 +0800 cpufreq: Add Hygon Dhyana support The Hygon Dhyana CPU supports ACPI P-States, and there is SMBus device (PCI device ID 0x790b) on the Hygon platform. Add Hygon Dhyana support to the cpufreq driver by using the code path of AMD family 17h. Signed-off-by: Pu Wen Signed-off-by: Borislav Petkov Acked-by: Rafael J. Wysocki Cc: rjw@rjwysocki.net Cc: viresh.kumar@linaro.org Cc: bp@alien8.de Cc: tglx@linutronix.de Cc: mingo@redhat.com Cc: hpa@zytor.com Cc: x86@kernel.org Cc: thomas.lendacky@amd.com Cc: rafael@kernel.org Cc: linux-pm@vger.kernel.org Link: https://lkml.kernel.org/r/4db6f0f8537a93c172430c446a0297a6ab1c3c2d.1537533369.git.puwen@hygon.cn commit 7377ed4bd56e6cc1ddbb63f03626fc5b92d3d6fe Author: Pu Wen Date: Sun Sep 23 17:37:05 2018 +0800 ACPI: Add Hygon Dhyana support The Hygon Dhyana CPU has NONSTOP TSC feature, so enable the ACPI driver support to it. Signed-off-by: Pu Wen Signed-off-by: Borislav Petkov Acked-by: Rafael J. Wysocki Cc: rjw@rjwysocki.net Cc: tglx@linutronix.de Cc: mingo@redhat.com Cc: hpa@zytor.com Cc: x86@kernel.org Cc: thomas.lendacky@amd.com Cc: lenb@kernel.org Cc: rafael@kernel.org Cc: linux-acpi@vger.kernel.org Link: https://lkml.kernel.org/r/cce6ee26f4e2ebbab493433264d89d7cea661284.1537533369.git.puwen@hygon.cn commit 4044240365e85ef7ae43a6dc454669b57853124c Author: Pu Wen Date: Sun Sep 23 17:36:46 2018 +0800 x86/xen: Add Hygon Dhyana support to Xen To make Xen work on the Hygon platform, reuse AMD's Xen support code path for Hygon Dhyana CPU. There are six core performance events counters per thread, so there are six MSRs for these counters. Also there are four legacy PMC MSRs, they are aliases of the counters. In this version, use the legacy and safe version of MSR access. Tested successfully with VPMU enabled in Xen on Hygon platform by testing with perf. Signed-off-by: Pu Wen Signed-off-by: Borislav Petkov Reviewed-by: Boris Ostrovsky Cc: jgross@suse.com Cc: tglx@linutronix.de Cc: mingo@redhat.com Cc: hpa@zytor.com Cc: x86@kernel.org Cc: thomas.lendacky@amd.com Cc: xen-devel@lists.xenproject.org Link: https://lkml.kernel.org/r/311bf41f08f24550aa6c5da3f1e03a68d3b89dac.1537533369.git.puwen@hygon.cn commit b8f4abb652146ddde04ab6e2a80e8cde27ff4470 Author: Pu Wen Date: Sun Sep 23 17:36:31 2018 +0800 x86/kvm: Add Hygon Dhyana support to KVM The Hygon Dhyana CPU has the SVM feature as AMD family 17h does. So enable the KVM infrastructure support to it. Signed-off-by: Pu Wen Signed-off-by: Borislav Petkov Reviewed-by: Borislav Petkov Cc: pbonzini@redhat.com Cc: rkrcmar@redhat.com Cc: tglx@linutronix.de Cc: mingo@redhat.com Cc: hpa@zytor.com Cc: x86@kernel.org Cc: thomas.lendacky@amd.com Cc: kvm@vger.kernel.org Link: https://lkml.kernel.org/r/654dd12876149fba9561698eaf9fc15d030301f8.1537533369.git.puwen@hygon.cn commit ac78bd72355d0da64c073c12927264d4ff19b886 Author: Pu Wen Date: Sun Sep 23 17:36:04 2018 +0800 x86/mce: Add Hygon Dhyana support to the MCA infrastructure The machine check architecture for Hygon Dhyana CPU is similar to the AMD family 17h one. Add vendor checking for Hygon Dhyana to share the code path of AMD family 17h. Signed-off-by: Pu Wen Signed-off-by: Borislav Petkov Reviewed-by: Borislav Petkov Cc: tglx@linutronix.de Cc: mingo@redhat.com Cc: hpa@zytor.com Cc: tony.luck@intel.com Cc: thomas.lendacky@amd.com Cc: linux-edac@vger.kernel.org Link: https://lkml.kernel.org/r/87d8a4f16bdea0bfe0c0cf2e4a8d2c2a99b1055c.1537533369.git.puwen@hygon.cn commit 1a576b23d63794f39a247fb31056eecccbf9a287 Author: Pu Wen Date: Sun Sep 23 17:35:50 2018 +0800 x86/bugs: Add Hygon Dhyana to the respective mitigation machinery The Hygon Dhyana CPU has the same speculative execution as AMD family 17h, so share AMD spectre mitigation code with Hygon Dhyana. Also Hygon Dhyana is not affected by meltdown, so add exception for it. Signed-off-by: Pu Wen Signed-off-by: Borislav Petkov Cc: tglx@linutronix.de Cc: mingo@redhat.com Cc: hpa@zytor.com Cc: x86@kernel.org Cc: thomas.lendacky@amd.com Link: https://lkml.kernel.org/r/0861d39c8a103fc0deca15bafbc85d403666d9ef.1537533369.git.puwen@hygon.cn commit da33dfef404174b0b452f4d2a9a9e00801794f3a Author: Pu Wen Date: Sun Sep 23 17:35:28 2018 +0800 x86/apic: Add Hygon Dhyana support Add Hygon Dhyana support to the APIC subsystem. When running in 32 bit mode, bigsmp should be enabled if there are more than 8 cores online. Signed-off-by: Pu Wen Signed-off-by: Borislav Petkov Reviewed-by: Borislav Petkov Cc: tglx@linutronix.de Cc: mingo@redhat.com Cc: hpa@zytor.com Cc: x86@kernel.org Cc: thomas.lendacky@amd.com Link: https://lkml.kernel.org/r/7a557265a8c7c9e842fe60f9d8e064458801aef3.1537533369.git.puwen@hygon.cn commit c6babb5806b77c6ca7078c3487bb0a29704a4e38 Author: Pu Wen Date: Tue Sep 25 22:46:11 2018 +0800 x86/pci, x86/amd_nb: Add Hygon Dhyana support to PCI and northbridge Hygon's PCI vendor ID is 0x1d94, and there are PCI devices 0x1450/0x1463/0x1464 for the host bridge on the Hygon Dhyana platform. Add Hygon Dhyana support to the PCI and northbridge subsystems by using the code path of AMD family 17h. [ bp: Massage commit message, sort local vars into reverse xmas tree order and move the amd_northbridges.num check up. ] Signed-off-by: Pu Wen Signed-off-by: Borislav Petkov Acked-by: Bjorn Helgaas # pci_ids.h Cc: tglx@linutronix.de Cc: mingo@redhat.com Cc: hpa@zytor.com Cc: x86@kernel.org Cc: thomas.lendacky@amd.com Cc: helgaas@kernel.org Cc: linux-pci@vger.kernel.org Link: https://lkml.kernel.org/r/5f8877bd413f2ea0833378dd5454df0720e1c0df.1537885177.git.puwen@hygon.cn commit b7a5cb4f220e78490735b2b984ad29b7d8e612a9 Author: Pu Wen Date: Tue Sep 25 22:45:01 2018 +0800 x86/amd_nb: Check vendor in AMD-only functions Exit early in functions which are meant to run on AMD only but which get run on different vendor (VMs, etc). [ bp: rewrite commit message. ] Signed-off-by: Pu Wen Signed-off-by: Borislav Petkov Cc: bhelgaas@google.com Cc: tglx@linutronix.de Cc: mingo@redhat.com Cc: hpa@zytor.com Cc: x86@kernel.org Cc: thomas.lendacky@amd.com Cc: helgaas@kernel.org Link: https://lkml.kernel.org/r/487d8078708baedaf63eb00a82251e228b58f1c2.1537885177.git.puwen@hygon.cn commit c3fecca457c1aa1c1a2f81bfe68393af244a263e Author: Pu Wen Date: Sun Sep 23 17:35:01 2018 +0800 x86/alternative: Init ideal_nops for Hygon Dhyana The ideal_nops for Hygon Dhyana CPU should be p6_nops. Signed-off-by: Pu Wen Signed-off-by: Borislav Petkov Reviewed-by: Borislav Petkov Cc: tglx@linutronix.de Cc: mingo@redhat.com Cc: hpa@zytor.com Cc: x86@kernel.org Cc: thomas.lendacky@amd.com Link: https://lkml.kernel.org/r/79e76c3173716984fe5fdd4a8e2c798bf4193205.1537533369.git.puwen@hygon.cn commit 6d0ef316b9f8ea03fa867debda70b2f11a0b9736 Author: Pu Wen Date: Sun Sep 23 17:34:47 2018 +0800 x86/events: Add Hygon Dhyana support to PMU infrastructure The PMU architecture for the Hygon Dhyana CPU is similar to the AMD Family 17h one. To support it, call amd_pmu_init() to share the AMD PMU initialization flow, and change the PMU name to "HYGON". The Hygon Dhyana CPU supports both legacy and extension PMC MSRs (perf counter registers and event selection registers), so add Hygon Dhyana support in the similar way as AMD does. Signed-off-by: Pu Wen Signed-off-by: Borislav Petkov Reviewed-by: Borislav Petkov Cc: tglx@linutronix.de Cc: mingo@redhat.com Cc: hpa@zytor.com Cc: x86@kernel.org Cc: thomas.lendacky@amd.com Link: https://lkml.kernel.org/r/9d93ed54a975f33ef7247e0967960f4ce5d3d990.1537533369.git.puwen@hygon.cn commit 0b13bec787dccca96f8c431da732657ae01baf9a Author: Pu Wen Date: Sun Sep 23 17:34:32 2018 +0800 x86/smpboot: Do not use BSP INIT delay and MWAIT to idle on Dhyana The Hygon Dhyana CPU uses no delay in smp_quirk_init_udelay(), and does HLT on idle just like AMD does. Signed-off-by: Pu Wen Signed-off-by: Borislav Petkov Reviewed-by: Borislav Petkov Cc: bp@alien8.de Cc: tglx@linutronix.de Cc: mingo@redhat.com Cc: hpa@zytor.com Cc: x86@kernel.org Cc: thomas.lendacky@amd.com Link: https://lkml.kernel.org/r/87000fa82e273f5967c908448414228faf61e077.1537533369.git.puwen@hygon.cn commit 39dc6f154dac134e4612827cb5283934c1862cb8 Author: Pu Wen Date: Sun Sep 23 17:34:16 2018 +0800 x86/cpu/mtrr: Support TOP_MEM2 and get MTRR number The Hygon Dhyana CPU has a special MSR way to force WB for memory >4GB, and support TOP_MEM2. Therefore, it is necessary to add Hygon Dhyana support in amd_special_default_mtrr(). The number of variable MTRRs for Hygon is 2 as AMD's. Signed-off-by: Pu Wen Signed-off-by: Borislav Petkov Reviewed-by: Borislav Petkov Cc: tglx@linutronix.de Cc: mingo@redhat.com Cc: hpa@zytor.com Cc: x86@kernel.org Cc: thomas.lendacky@amd.com Link: https://lkml.kernel.org/r/8246f81648d014601de3812ade40e85d9c50d9b3.1537533369.git.puwen@hygon.cn commit d4f7423efdd1419b17524d090ff9ff4024bcf09b Author: Pu Wen Date: Sun Sep 23 17:33:44 2018 +0800 x86/cpu: Get cache info and setup cache cpumap for Hygon Dhyana The Hygon Dhyana CPU has a topology extensions bit in CPUID. With this bit, the kernel can get the cache information. So add support in cpuid4_cache_lookup_regs() to get the correct cache size. The Hygon Dhyana CPU also discovers num_cache_leaves via CPUID leaf 0x8000001d, so add support to it in find_num_cache_leaves(). Also add cacheinfo_hygon_init_llc_id() and init_hygon_cacheinfo() functions to initialize Dhyana cache info. Setup cache cpumap in the same way as AMD does. Signed-off-by: Pu Wen Signed-off-by: Borislav Petkov Reviewed-by: Borislav Petkov Cc: bp@alien8.de Cc: tglx@linutronix.de Cc: mingo@redhat.com Cc: hpa@zytor.com Cc: x86@kernel.org Cc: thomas.lendacky@amd.com Link: https://lkml.kernel.org/r/2a686b2ac0e2f5a1f2f5f101124d9dd44f949731.1537533369.git.puwen@hygon.cn commit 7eae653c8071e06719efc0b6e4da27d6908e5a5a Merge: 2893cc8ff892 c9661c1e80b6 Author: Borislav Petkov Date: Thu Sep 27 18:13:01 2018 +0200 Merge branch 'tip-x86-hygon' into tip-x86-cpu ... in order to share one commit with the EDAC tree. Signed-off-by: Borislav Petkov commit 13ddb52c165ba47d153b7b040931a5cbe9220866 Author: Heiko Carstens Date: Tue Sep 18 23:51:44 2018 -0700 s390/jump_label: Switch to relative references Enable support for relative references in jump_label entries. Signed-off-by: Heiko Carstens Signed-off-by: Ard Biesheuvel Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Cc: linux-arm-kernel@lists.infradead.org Cc: linux-s390@vger.kernel.org Cc: Arnd Bergmann Cc: Kees Cook Cc: Will Deacon Cc: Catalin Marinas Cc: Steven Rostedt Cc: Martin Schwidefsky Cc: Jessica Yu Link: https://lkml.kernel.org/r/20180919065144.25010-10-ard.biesheuvel@linaro.org commit e872267b8bcbb179e21ccc7118f258873d6e7a59 Author: Ard Biesheuvel Date: Tue Sep 18 23:51:43 2018 -0700 jump_table: Move entries into ro_after_init region The __jump_table sections emitted into the core kernel and into each module consist of statically initialized references into other parts of the code, and with the exception of entries that point into init code, which are defused at post-init time, these data structures are never modified. So let's move them into the ro_after_init section, to prevent them from being corrupted inadvertently by buggy code, or deliberately by an attacker. Signed-off-by: Ard Biesheuvel Signed-off-by: Thomas Gleixner Reviewed-by: Kees Cook Acked-by: Jessica Yu Acked-by: Peter Zijlstra (Intel) Cc: linux-arm-kernel@lists.infradead.org Cc: linux-s390@vger.kernel.org Cc: Arnd Bergmann Cc: Heiko Carstens Cc: Will Deacon Cc: Catalin Marinas Cc: Steven Rostedt Cc: Martin Schwidefsky Link: https://lkml.kernel.org/r/20180919065144.25010-9-ard.biesheuvel@linaro.org commit 19483677684b6ca01606f58503cb79cdfbbc7c72 Author: Ard Biesheuvel Date: Tue Sep 18 23:51:42 2018 -0700 jump_label: Annotate entries that operate on __init code earlier Jump table entries are mostly read-only, with the exception of the init and module loader code that defuses entries that point into init code when the code being referred to is freed. For robustness, it would be better to move these entries into the ro_after_init section, but clearing the 'code' member of each jump table entry referring to init code at module load time races with the module_enable_ro() call that remaps the ro_after_init section read only, so we'd like to do it earlier. So given that whether such an entry refers to init code can be decided much earlier, we can pull this check forward. Since we may still need the code entry at this point, let's switch to setting a low bit in the 'key' member just like we do to annotate the default state of a jump table entry. Signed-off-by: Ard Biesheuvel Signed-off-by: Thomas Gleixner Reviewed-by: Kees Cook Acked-by: Peter Zijlstra (Intel) Cc: linux-arm-kernel@lists.infradead.org Cc: linux-s390@vger.kernel.org Cc: Arnd Bergmann Cc: Heiko Carstens Cc: Will Deacon Cc: Catalin Marinas Cc: Steven Rostedt Cc: Martin Schwidefsky Cc: Jessica Yu Link: https://lkml.kernel.org/r/20180919065144.25010-8-ard.biesheuvel@linaro.org commit b34006c4258c9c86597b6b7123d6a9a3513d6cd7 Author: Ard Biesheuvel Date: Tue Sep 18 23:51:41 2018 -0700 x86/jump_table: Use relative references Similar to the arm64 case, 64-bit x86 can benefit from using relative references rather than absolute ones when emitting struct jump_entry instances. Not only does this reduce the memory footprint of the entries themselves by 33%, it also removes the need for carrying relocation metadata on relocatable builds (i.e., for KASLR) which saves a fair chunk of .init space as well (although the savings are not as dramatic as on arm64) Signed-off-by: Ard Biesheuvel Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Cc: linux-arm-kernel@lists.infradead.org Cc: linux-s390@vger.kernel.org Cc: Arnd Bergmann Cc: Heiko Carstens Cc: Kees Cook Cc: Will Deacon Cc: Catalin Marinas Cc: Steven Rostedt Cc: Martin Schwidefsky Cc: Jessica Yu Link: https://lkml.kernel.org/r/20180919065144.25010-7-ard.biesheuvel@linaro.org commit 9fc0f798ab8a6c042d811e45086260eb59be45c1 Author: Ard Biesheuvel Date: Tue Sep 18 23:51:40 2018 -0700 x86/jump_label: Switch to jump_entry accessors In preparation of switching x86 to use place-relative references for the code, target and key members of struct jump_entry, replace direct references to the struct members with invocations of the new accessors. This will allow us to make the switch by modifying the accessors only. This incorporates a cleanup of __jump_label_transform() proposed by Peter. Signed-off-by: Ard Biesheuvel Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Cc: linux-arm-kernel@lists.infradead.org Cc: linux-s390@vger.kernel.org Cc: Arnd Bergmann Cc: Heiko Carstens Cc: Kees Cook Cc: Will Deacon Cc: Catalin Marinas Cc: Steven Rostedt Cc: Martin Schwidefsky Cc: Jessica Yu Link: https://lkml.kernel.org/r/20180919065144.25010-6-ard.biesheuvel@linaro.org commit b40a142b12b5c4312171140ff2bc92971b8a7a09 Author: Ard Biesheuvel Date: Tue Sep 18 23:51:39 2018 -0700 x86: Add support for 64-bit place relative relocations Add support for R_X86_64_PC64 relocations, which operate on 64-bit quantities holding a relative symbol reference. Also remove the definition of R_X86_64_NUM: given that it is currently unused, it is unclear what the new value should be. Signed-off-by: Ard Biesheuvel Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Cc: linux-arm-kernel@lists.infradead.org Cc: linux-s390@vger.kernel.org Cc: Arnd Bergmann Cc: Heiko Carstens Cc: Kees Cook Cc: Will Deacon Cc: Catalin Marinas Cc: Steven Rostedt Cc: Martin Schwidefsky Cc: Jessica Yu Link: https://lkml.kernel.org/r/20180919065144.25010-5-ard.biesheuvel@linaro.org commit c296146c058c87e9ed53001b6a3988519dbbb6a5 Author: Ard Biesheuvel Date: Tue Sep 18 23:51:38 2018 -0700 arm64/kernel: jump_label: Switch to relative references On a randomly chosen distro kernel build for arm64, vmlinux.o shows the following sections, containing jump label entries, and the associated RELA relocation records, respectively: ... [38088] __jump_table PROGBITS 0000000000000000 00e19f30 000000000002ea10 0000000000000000 WA 0 0 8 [38089] .rela__jump_table RELA 0000000000000000 01fd8bb0 000000000008be30 0000000000000018 I 38178 38088 8 ... In other words, we have 190 KB worth of 'struct jump_entry' instances, and 573 KB worth of RELA entries to relocate each entry's code, target and key members. This means the RELA section occupies 10% of the .init segment, and the two sections combined represent 5% of vmlinux's entire memory footprint. So let's switch from 64-bit absolute references to 32-bit relative references for the code and target field, and a 64-bit relative reference for the 'key' field (which may reside in another module or the core kernel, which may be more than 4 GB way on arm64 when running with KASLR enable): this reduces the size of the __jump_table by 33%, and gets rid of the RELA section entirely. Signed-off-by: Ard Biesheuvel Signed-off-by: Thomas Gleixner Acked-by: Will Deacon Acked-by: Peter Zijlstra (Intel) Cc: linux-arm-kernel@lists.infradead.org Cc: linux-s390@vger.kernel.org Cc: Arnd Bergmann Cc: Heiko Carstens Cc: Kees Cook Cc: Catalin Marinas Cc: Steven Rostedt Cc: Martin Schwidefsky Cc: Jessica Yu Link: https://lkml.kernel.org/r/20180919065144.25010-4-ard.biesheuvel@linaro.org commit 50ff18ab497aa22f6a59444625df7508c8918237 Author: Ard Biesheuvel Date: Tue Sep 18 23:51:37 2018 -0700 jump_label: Implement generic support for relative references To reduce the size taken up by absolute references in jump label entries themselves and the associated relocation records in the .init segment, add support for emitting them as relative references instead. Note that this requires some extra care in the sorting routine, given that the offsets change when entries are moved around in the jump_entry table. Signed-off-by: Ard Biesheuvel Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Cc: linux-arm-kernel@lists.infradead.org Cc: linux-s390@vger.kernel.org Cc: Arnd Bergmann Cc: Heiko Carstens Cc: Kees Cook Cc: Will Deacon Cc: Catalin Marinas Cc: Steven Rostedt Cc: Martin Schwidefsky Cc: Jessica Yu Link: https://lkml.kernel.org/r/20180919065144.25010-3-ard.biesheuvel@linaro.org commit 9ae033aca8d600e36034d4d0743aad624cec92ed Author: Ard Biesheuvel Date: Tue Sep 18 23:51:36 2018 -0700 jump_label: Abstract jump_entry member accessors In preparation of allowing architectures to use relative references in jump_label entries [which can dramatically reduce the memory footprint], introduce abstractions for references to the 'code' and 'key' members of struct jump_entry. Signed-off-by: Ard Biesheuvel Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Cc: linux-arm-kernel@lists.infradead.org Cc: linux-s390@vger.kernel.org Cc: Arnd Bergmann Cc: Heiko Carstens Cc: Kees Cook Cc: Will Deacon Cc: Catalin Marinas Cc: Steven Rostedt Cc: Martin Schwidefsky Cc: Jessica Yu Link: https://lkml.kernel.org/r/20180919065144.25010-2-ard.biesheuvel@linaro.org commit f934bb9b8b6136edd261b2dc2c9ad4dbc39ffc66 Author: Bruce Allan Date: Wed Sep 19 17:23:11 2018 -0700 ice: fix changing of ring descriptor size (ethtool -G) rx_mini_pending was set to an incorrect value. This was causing EINVAL to always be returned to 'ethtool -G'. The driver does not support mini or jumbo rings so the respective settings should be zero. Also, change the valid range of the number of descriptors in the rings to make the code simpler and easier for users to understand (this removes the valid settings of 8 and 16). Add a system log message indicating when the number is rounded-up from what the user specifies with the 'ethtool -G' command (i.e. when it is not a multiple of 32), and update the log message when a user-provided value is out of range to also indicate the stride. Signed-off-by: Bruce Allan Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 32f13d0e6190c6e2f312c1709153953c38c246e4 Author: Anirudh Venkataramanan Date: Wed Sep 19 17:23:10 2018 -0700 ice: Update to capabilities admin queue command This patch makes a couple of changes in the way the driver uses the "get capabilities" command. 1. Get device capabilities in addition to function capabilities 2. Align to latest spec by using cap_count to determine size of the buffer in case of length error. Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 20bcd4a4d76d7474047ff4539e7d65b990bb2556 Author: H. Nikolaus Schaller Date: Tue Sep 25 08:04:24 2018 +0200 ARM: dts: add omap3-gta04a5one to Makefile We have defined a new DTS and it should be compiled. Signed-off-by: H. Nikolaus Schaller Signed-off-by: Tony Lindgren commit 56daee6c5add8e1cd0b56a575f0e7ae490ea8e2f Author: Anirudh Venkataramanan Date: Wed Sep 19 17:23:09 2018 -0700 ice: Query the Tx scheduler node before adding it Query the Tx scheduler tree node information from FW before adding it to the driver's software database. This will keep the node information current in driver. Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit f31028bfd7b1e94b8d3ad685e7c71bcd15fa4316 Author: Brett Creeley Date: Wed Sep 19 17:23:08 2018 -0700 ice: Update comment for ice_fltr_mgmt_list_entry Previously the comment stated that VSI lists should be used when a second VSI becomes a subscriber to the "VLAN address". VSI lists are always used for VLAN membership, so replace "VLAN address" with "MAC address". Also note that VLAN(s) always use VSI list rules. Signed-off-by: Brett Creeley Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 396fbf9cab5dc07f8f87773062a8d35f54b40a05 Author: Jacob Keller Date: Wed Sep 19 17:23:07 2018 -0700 ice: update fw version check logic We have MAX_FW_API_VER_BRANCH, MAX_FW_API_VER_MAJOR, and MAX_FW_API_VER_MINOR that we use in ice_controlq.h to test when a firmware version is newer than expected. This is currently tested by comparing each field separately. Thus, we compare the branch field against the MAX_FW_API_VER_BRANCH, and so forth. This means that currently, if we suppose that the max firmware version is defined as 0.2.1, i.e. Then firmware 0.1.3 will fail to load. This is because the minor version 3 is greater than the max minor version 1. This is not intuitive, because of the notion that increasing the major firmware version to 2 should mean any firmware version with a major version is less than 2 should be considered older than 2... In order to allow both 0.2.1 and 0.1.3 to load, you would have to define the "max" firmware version as 0.2.3.. It is possible that such a firmware version doesn't even exist yet! Fix this by replacing the current logic with an updated check that behaves as follows: First, we check the major version. If it is greater than the expected version, then we prevent driver load. Additionally, a warning message is logged to indicate to the system administrator that they need to update their driver. This is now the only case where the driver will refuse to load. Second, if the major version is less than the expected version, we log an information message indicating the NVM should be updated. Third, if the major version is exact, we'll then check the minor version. If the minor version is more than two versions less than expected, we log an information message indicating the NVM should be updated. If it is more than two versions greater than the expected version, we log an information message that the driver should be updated. To support this, the ice_aq_ver_check function needs its signature updated to pass the HW structure. Since we now pass this structure, there is no need to pass the firmware API versions separately. Signed-off-by: Jacob Keller Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit c185e39afb4f3dea95597deba7d0d5c91aaed204 Author: Bruce Allan Date: Wed Sep 19 17:23:06 2018 -0700 ice: update branding strings and supported device ids Update branding strings and remove device ids 0x1594 and 0x1595. Signed-off-by: Bruce Allan Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit daca32a2aa05686065d493fc49f316a5a21afb85 Author: Bruce Allan Date: Wed Sep 19 17:23:05 2018 -0700 ice: replace unnecessary memcpy with direct assignment Direct assignment is preferred over a memcpy() Signed-off-by: Bruce Allan Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit dec64ff10ed9a2b7ba33be924e3b8329d169fb3f Author: Jacob Keller Date: Wed Sep 19 17:23:04 2018 -0700 ice: use [sr]q.count when checking if queue is initialized When shutting down the controlqs, we check if they are initialized before we shut them down and destroy the lock. This is important, as it prevents attempts to access the lock of an already shutdown queue. Unfortunately, we checked rq.head and sq.head as the value to determine if the queue was initialized. This doesn't work, because head is not reset when the queue is shutdown. In some flows, the adminq will have already been shut down prior to calling ice_shutdown_all_ctrlqs. This can result in a crash due to attempting to access the already destroyed mutex. Fix this by using rq.count and sq.count instead. Indeed, ice_shutdown_sq and ice_shutdown_rq already indicate that this is the value we should be using to determine of the queue was initialized. Signed-off-by: Jacob Keller Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit fa70f0d2ce96a892b38fbbaa60584af536f21f97 Merge: 6bf4ca7fbc85 9c1442a9d039 Author: Thomas Gleixner Date: Thu Sep 27 16:58:49 2018 +0200 Merge tag 'efi-next' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi into efi/core Pull EFI updates for v4.20 from Ard Biesheuvel: - Add support for enlisting the help of the EFI firmware to create memory reservations that persist across kexec. - Add page fault handling to the runtime services support code on x86 so we can gracefully recover from buggy EFI firmware. - Fix command line handling on x86 for the boot path that omits the stub's PE/COFF entry point. - Other assorted fixes. commit 6a96243056217662843694a4cbc83158d0e84403 Author: Nayan Deshmukh Date: Wed Sep 26 02:09:02 2018 +0900 drm/scheduler: remove timeout work_struct from drm_sched_job (v3) having a delayed work item per job is redundant as we only need one per scheduler to track the time out the currently executing job. v2: the first element of the ring mirror list is the currently executing job so we don't need a additional variable for it v3: squash in fixes for v3d and etnaviv Signed-off-by: Nayan Deshmukh Suggested-by: Christian König Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 3ea81f7125dfda80e264e4552b1146c88eff1aa7 Author: Nathan Chancellor Date: Fri Sep 21 14:01:06 2018 -0700 drm/amd/powerplay: Change id parameter type in pp_atomfwctrl_get_clk_information_by_clkid Clang generates warnings when one enumerated type is implicitly converted to another. drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/ppatomfwctrl.c:532:57: warning: implicit conversion from enumeration type 'enum atom_smu11_syspll0_clock_id' to different enumeration type 'BIOS_CLKID' (aka 'enum atom_smu9_syspll0_clock_id') [-Wenum-conversion] if (!pp_atomfwctrl_get_clk_information_by_clkid(hwmgr, SMU11_SYSPLL0_SOCCLK_ID, &frequency)) In this case, that is expected behavior. To make that clear to Clang without explicitly casting these values, change id's type to uint8_t in pp_atomfwctrl_get_clk_information_by_clkid so no conversion happens. Reported-by: Nick Desaulniers Signed-off-by: Nathan Chancellor Signed-off-by: Alex Deucher commit 006a0b3d86e7cee0e38d0543c7a6e5dbbf12025e Author: Shaoyun Liu Date: Mon Jun 18 14:47:21 2018 -0400 drm/amdkfd: Remove the requirement for atomic Ops on vg20 Firmware have the workaround to replace the atomic Ops with read-modify-write on CP side. User should not expect atomic Ops on system memory works normally if system didn't not support it. Signed-off-by: Shaoyun Liu Acked-by: Alex Deucher Reviewed-By: Felix Kuehling Signed-off-by: Alex Deucher commit 74121b9aa3cd571ddfff014a9f47db36cae3cda9 Author: Thor Thayer Date: Tue Sep 25 10:31:52 2018 -0500 arm64: dts: stratix10: Correct System Manager register size Correct the register size of the System Manager node. Cc: stable@vger.kernel.org Fixes: 78cd6a9d8e154 ("arm64: dts: Add base stratix 10 dtsi") Signed-off-by: Thor Thayer Signed-off-by: Dinh Nguyen commit ce3bf934f919a7d675c5b7fa4cc233ded9c6256e Author: Thor Thayer Date: Tue Sep 25 10:21:10 2018 -0500 ARM: dts: socfpga: Fix SDRAM node address for Arria10 The address in the SDRAM node was incorrect. Fix this to agree with the correct address and to match the reg definition block. Cc: stable@vger.kernel.org Fixes: 54b4a8f57848b("arm: socfpga: dts: Add Arria10 SDRAM EDAC DTS support") Signed-off-by: Thor Thayer Signed-off-by: Dinh Nguyen commit e14c02e6b6990e9f6ee18a214a22ac26bae1b25e Author: Thomas Hellstrom Date: Wed Sep 26 15:55:16 2018 +0200 drm/vmwgfx: Look up objects without taking a reference Typically when we look up objects under the rcu lock, we take a reference to make sure the returned object pointer is valid. Now provide a function to look up an object and instead of taking a reference to it, keep the rcu lock held when returning the object pointer. This means that the object pointer is valid as long as the rcu lock is held, but the object may be doomed (its refcount may be zero). Any persistent usage of the object pointer outside of the rcu lock requires a reference to be taken using kref_get_unless_zero(). Signed-off-by: Thomas Hellstrom Reviewed-by: Sinclair Yeh commit c7eae62666ade1c8c9960085911e420227144d5a Author: Thomas Hellstrom Date: Wed Sep 26 15:50:13 2018 +0200 drm/vmwgfx: Make the object handles idr-generated Instead of generating user-space object handles based on a, possibly processed, hash of the kernel address of the object, use idr to generate and lookup those handles. This might improve somewhat on security since we loose all connections to the object's kernel address. Also idr is designed to do just this. As a todo-item, since user-space handles are now generated in sequence, we can probably use a much simpler hash function to hash them. Signed-off-by: Thomas Hellstrom Reviewed-by: Sinclair Yeh Reviewed-by: Deepak Rawat commit c9661c1e80b609cd038db7c908e061f0535804ef Author: Pu Wen Date: Sun Sep 23 17:33:12 2018 +0800 x86/cpu: Create Hygon Dhyana architecture support file Add x86 architecture support for a new processor: Hygon Dhyana Family 18h. Carve out initialization code needed by Dhyana into a separate compilation unit. To identify Hygon Dhyana CPU, add a new vendor type X86_VENDOR_HYGON. Since Dhyana uses AMD functionality to a large degree, select CPU_SUP_AMD which provides that functionality. [ bp: drop explicit license statement as it has an SPDX tag already. ] Signed-off-by: Pu Wen Reviewed-by: Borislav Petkov Signed-off-by: Borislav Petkov Cc: tglx@linutronix.de Cc: mingo@redhat.com Cc: hpa@zytor.com Cc: x86@kernel.org Cc: thomas.lendacky@amd.com Link: https://lkml.kernel.org/r/1a882065223bacbde5726f3beaa70cebd8dcd814.1537533369.git.puwen@hygon.cn commit e5276b1ffa97e3883802f40a5e3a167fe1cb1d20 Author: Qiuxu Zhuo Date: Mon Sep 24 17:03:43 2018 -0700 x86/mce: Add macros for the corrected error count bit field The bit field [52:38] of MCi_STATUS contains the corrected error count. Add {*_SHIFT|*_MASK|*_CEC(c)} macros for it. [ bp: use GENMASK_ULL. ] Signed-off-by: Qiuxu Zhuo Signed-off-by: Tony Luck Signed-off-by: Borislav Petkov Cc: Aristeu Rozanski Cc: Mauro Carvalho Chehab Cc: linux-edac@vger.kernel.org Cc: x86@kernel.org Link: https://lkml.kernel.org/r/20180925000343.GB5998@agluck-desk commit 93ac57540e9129004b569beee54e50b3519b0b07 Author: Qiuxu Zhuo Date: Mon Sep 24 17:01:27 2018 -0700 x86/mce: Use BIT_ULL(x) for bit mask definitions Current coding style is to use the BIT_ULL() macro. [ bp: Align the MCG_STATUS defines vertically too. ] Signed-off-by: Qiuxu Zhuo Signed-off-by: Tony Luck Signed-off-by: Borislav Petkov Cc: Aristeu Rozanski Cc: Mauro Carvalho Chehab Cc: linux-edac@vger.kernel.org Cc: x86@kernel.org Link: https://lkml.kernel.org/r/20180925000127.GA5998@agluck-desk commit 9b06e1c148ff9e05fe55cb256e5e28883743611b Author: Vijay Khemka Date: Wed Sep 19 09:47:10 2018 -0700 ARM: dt-bindings: Add vendor prefix for Facebook Initial introduction of Facebook TiogaPass family equipped with Aspeed 2500 BMC SoC. TiogaPass is a x86 server development kit with a ASPEED ast2500 BMC manufactured by Facebook. This adds an entry of Facebook in Documentation for vendor prefix Signed-off-by: Vijay Khemka Reviewed-by: Rob Herring Signed-off-by: Rob Herring commit 96a71f21ef1fcc32bea07c612a332a89a213f054 Author: Amir Goldstein Date: Fri Sep 21 21:20:30 2018 +0300 fanotify: store fanotify_init() flags in group's fanotify_data This averts the need to re-generate flags in fanotify_show_fdinfo() and sets the scene for addition of more upcoming flags without growing new members to the fanotify_data struct. Signed-off-by: Amir Goldstein Signed-off-by: Jan Kara commit b1d05b4fc6b8f2bf5d802cb08c87d96802c4c7ba Author: Thomas Hellstrom Date: Wed Sep 26 15:42:50 2018 +0200 drm/vmwgfx: Remove the user resource destructor check We were checking that the resource destructor matched that of the intended object type, to make sure the looked up resource was of the right type. But we already have an object type check in place which makes sure the resource is of the right type. Signed-off-by: Thomas Hellstrom Reviewed-by: Sinclair Yeh Reviewed-by: Deepak Rawat commit 13289241fe8b8c336ec8277b9c4643ea7fbb2f70 Author: Thomas Hellstrom Date: Wed Sep 26 15:41:52 2018 +0200 drm/vmwgfx: Remove the resource avail field This field was previously used to prevent a lookup of a resource before its constructor had run to its end. This was mainly intended for an interface that is now removed that allowed looking up a resource by its device id. Currently all affected resources are added to the lookup mechanism (its TTM prime object is initialized) late in the constructor where it's OK to look up the resource. This means we can change the device resource_lock to an ordinary spinlock instead of an rwlock and remove a locking sequence during lookup. Signed-off-by: Thomas Hellstrom Reviewed-by: Sinclair Yeh Reviewed-by: Deepak Rawat commit d76ce03e1a7870ca6351610cf30bcf62949ea900 Author: Thomas Hellstrom Date: Wed Sep 26 15:39:24 2018 +0200 drm/vmwgfx: Replace unconditional mutex unlocked warnings with lockdep counterpart Replace instances of WARN_ON[_ONCE](!mutex_is_held()) with lockdep_assert_held(). This makes sure the checking process actually holds the mutex and also removes the checks from release builds Signed-off-by: Thomas Hellstrom Reviewed-by: Sinclair Yeh Reviewed-by: Deepak Rawat commit cc1e3b796b463c1cb2e8225b456af939b3bf21c3 Author: Thomas Hellstrom Date: Wed Sep 26 15:38:13 2018 +0200 drm/vmwgfx: Reduce the size of buffer object relocations With the new allocator this leads to less consumed memory for each user-space command submission Signed-off-by: Thomas Hellstrom Reviewed-by: Deepak Rawat commit fc18afcf5fb2d8776414076d81d907d8be82b362 Author: Thomas Hellstrom Date: Wed Sep 26 15:36:52 2018 +0200 drm/vmwgfx: Use a validation context allocator for relocations and validations A common trait of these objects are that they are allocated during the command validation phase and freed after command submission. Furthermore they are accessed by a single thread only. So provide a simple unprotected stack-like allocator from which these objects can be allocated. Their memory is freed with the validation context when the command submission is done. Note that the mm subsystem maintains a per-cpu cache of single pages to make single page allocation and freeing efficient. Signed-off-by: Thomas Hellstrom Reviewed-by: Sinclair Yeh commit 2724b2d54cdad7de12e53e7ff2666822bafeae2a Author: Thomas Hellstrom Date: Wed Sep 26 15:34:50 2018 +0200 drm/vmwgfx: Use new validation interface for the modesetting code v2 Strip the old KMS helpers and use the new validation interface also in the modesetting code. Signed-off-by: Thomas Hellstrom Reviewed-by: Deepak Rawat #v1 Reviewed-by: Sinclair Yeh commit 9c079b8ce8bf8e0394149eb39c78b04285644bcc Author: Thomas Hellstrom Date: Wed Sep 26 15:28:55 2018 +0200 drm/vmwgfx: Adapt execbuf to the new validation api Strip the old execbuf validation functionality and use the new API instead. Also use the new API for a now removed execbuf function that was called from the kms code. Signed-off-by: Thomas Hellstrom Reviewed-by: Sinclair Yeh commit 84e1bf06bc457f8e00e2e679d48365aeba919673 Author: Thomas Hellstrom Date: Wed Sep 26 15:22:54 2018 +0200 drm/vmwgfx: Modify the resource validation interface Allow selecting interruptible or uninterruptible waits to match expectations of callers. Signed-off-by: Thomas Hellstrom Reviewed-by: Deepak Rawat Reviewed-by: Sinclair Yeh commit 038ecc503236ef94a66518e1ee7542557ffc39c1 Author: Thomas Hellstrom Date: Wed Sep 26 15:21:13 2018 +0200 drm/vmwgfx: Add a validation module v2 Isolate the functionality needed for reservation, validation and fencing of vmwgfx buffer objects and resources and publish an API for this. Signed-off-by: Thomas Hellstrom Reviewed-by: Sinclair Yeh Reviewed-by: Deepak Rawat #v1 commit 0b8762e997df0e0e74ad64239ac9feb0b0acf16f Author: Thomas Hellstrom Date: Wed Sep 26 20:15:36 2018 +0200 drm/ttm, drm/vmwgfx: Move the lock- and object functionality to the vmwgfx driver No other driver is using this functionality so move it out of TTM and into the vmwgfx driver. Update includes and remove exports. Also annotate to remove false static analyzer lock balance warnings. Signed-off-by: Thomas Hellstrom Reviewed-by: Christian König commit 385613506aef4d21448f8f167513f46a008a3b0c Author: Ding Xiang Date: Sun Aug 26 22:55:00 2018 -0400 Bluetooth: bt3c_cs: Fix obsolete function simple_strtol and simple_strtoul are obsolete, both place use kstrtouint instead. V2: fix error tmp += tn V3: fix compile error Signed-off-by: Ding Xiang Signed-off-by: Marcel Holtmann commit 7cbfd1e2aad410d96fa6162aeb3f9cff1fecfc58 Author: Sanjay Kumar Konduri Date: Mon Sep 3 11:27:46 2018 +0530 Bluetooth: btrsi: fix bt tx timeout issue observed sometimes data is coming with unaligned address from kernel BT stack. If unaligned address is passed, some data in payload is stripped when packet is loading to firmware and this results, BT connection timeout is happening. sh# hciconfig hci0 up Can't init device hci0: hci0 command 0x0c03 tx timeout Fixed this by moving the data to aligned address. Signed-off-by: Sanjay Kumar Konduri Signed-off-by: Siva Rebbagondla Signed-off-by: Marcel Holtmann commit a5c3021bb62b970713550db3f7fd08aa70665d7e Author: Luiz Augusto von Dentz Date: Tue Sep 4 13:39:22 2018 +0300 Bluetooth: L2CAP: Detect if remote is not able to use the whole MPS If the remote is not able to fully utilize the MPS choosen recalculate the credits based on the actual amount it is sending that way it can still send packets of MTU size without credits dropping to 0. Signed-off-by: Luiz Augusto von Dentz Signed-off-by: Marcel Holtmann commit 96cd8eaa131f0ffd4cfae09e1b4bdfafb9570907 Author: Luiz Augusto von Dentz Date: Tue Sep 4 13:39:21 2018 +0300 Bluetooth: L2CAP: Derive rx credits from MTU and MPS Give enough rx credits for a full packet instead of using an arbitrary number which may not be enough depending on the MTU and MPS which can cause interruptions while waiting for more credits, also remove debugfs entry for l2cap_le_max_credits. With these changes the credits are restored after each SDU is received instead of using fixed threshold, this way it is garanteed that there will always be enough credits to send a packet without waiting more credits to arrive. Signed-off-by: Luiz Augusto von Dentz Signed-off-by: Marcel Holtmann commit fe1493101ac1313cbdbef1af65342fb17d944e71 Author: Luiz Augusto von Dentz Date: Tue Sep 4 13:39:20 2018 +0300 Bluetooth: L2CAP: Derive MPS from connection MTU This ensures the MPS can fit in a single HCI fragment so each segment don't have to be reassembled at HCI level, in addition to that also remove the debugfs entry to configure the MPS. Signed-off-by: Luiz Augusto von Dentz Signed-off-by: Marcel Holtmann commit a357ea098c9605f60d92a66a9073f56ce25726da Author: Christian Hewitt Date: Tue Sep 4 21:50:57 2018 +0400 Bluetooth: btbcm: Add entry for BCM4335C0 UART bluetooth This patch adds the device ID for the AMPAK AP6335 combo module used in the 1st generation WeTek Hub Android/LibreELEC HTPC box. The WiFI chip identifies itself as BCM4339, while Bluetooth identifies itself as BCM4335 (rev C0): ``` [ 4.864248] Bluetooth: hci0: BCM: chip id 86 [ 4.866388] Bluetooth: hci0: BCM: features 0x2f [ 4.889317] Bluetooth: hci0: BCM4335C0 [ 4.889332] Bluetooth: hci0: BCM4335C0 (003.001.009) build 0000 [ 9.778383] Bluetooth: hci0: BCM4335C0 (003.001.009) build 0268 ``` Output from hciconfig: ``` hci0: Type: Primary Bus: UART BD Address: 43:39:00:00:1F:AC ACL MTU: 1021:8 SCO MTU: 64:1 UP RUNNING RX bytes:7567 acl:234 sco:0 events:386 errors:0 TX bytes:53844 acl:77 sco:0 commands:304 errors:0 Features: 0xbf 0xfe 0xcf 0xfe 0xdb 0xff 0x7b 0x87 Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3 Link policy: RSWITCH SNIFF Link mode: SLAVE ACCEPT Name: 'HUB' Class: 0x0c0000 Service Classes: Rendering, Capturing Device Class: Miscellaneous, HCI Version: 4.0 (0x6) Revision: 0x10c LMP Version: 4.0 (0x6) Subversion: 0x6109 Manufacturer: Broadcom Corporation (15) ``` Signed-off-by: Christian Hewitt Signed-off-by: Marcel Holtmann commit 8ecfdc95b30a17b0c27ace6f13a1c4fb37e2bb96 Author: Alex Lu Date: Sat Sep 8 12:05:59 2018 -0500 Bluetooth: btrtl: Add support for RTL8822C with USB interface This device is included in the RTL8822CU combination wifi and BT part, as well as the BT part of the RTL8822CE. The necessary firmware has been submitted to the linux-firmware project. Signed-off-by: Alex Lu Signed-off-by: Larry Finger Signed-off-by: Marcel Holtmann commit ea9ed991c3fc25f56f37fdc537581211426e03df Author: Jagdish Tirumala Date: Tue Sep 11 08:40:38 2018 -0700 Bluetooth: hci_serdev: Fixed error space required before open paranethesis Fixed error in space required before paranthesis in drivers/bluetooth/hci_serdev.c Signed-off-by: Jagdish Tirumala Signed-off-by: Marcel Holtmann commit b950aa88638c52a013504f025e0b8f99bf2dc26e Author: Ankit Navik Date: Fri Aug 17 07:29:19 2018 +0530 Bluetooth: Add definitions and track LE resolve list modification Add the definitions for adding entries to the LE resolve list and removing entries from the LE resolve list. When the LE resolve list gets changed via HCI commands make sure that the internal storage of the resolve list entries gets updated. Signed-off-by: Ankit Navik Signed-off-by: Marcel Holtmann commit 3e4be65eb82c843a2d8544c93b7a9f5d4984b03b Author: Balakrishna Godavarthi Date: Mon Sep 24 20:14:45 2018 +0530 Bluetooth: hci_qca: Add poweroff support during hci down for wcn3990 This patch enables power off support for hci down and power on support for hci up. As wcn3990 power sources are ignited by regulators, we will turn off them during hci down, i.e. an complete power off of wcn3990. So while hci up, will call vendor setup which will turn on the regulators, requests BT chip version and download the firmware. Signed-off-by: Balakrishna Godavarthi Signed-off-by: Marcel Holtmann commit f7785021947949e81f046a5ba2d3c205bda9cccb Author: Justin TerAvest Date: Tue Sep 25 11:04:57 2018 -0600 Bluetooth: btusb: Add quirk for BTUSB_INTEL_NEW Intel "new" controllers can do both LE scan and BR/EDR inquiry at once. Signed-off-by: Justin TerAvest Signed-off-by: Marcel Holtmann commit e5070e0719c7e7303b1441e98a385709e19dadd6 Author: Colin Ian King Date: Wed Sep 26 09:32:08 2018 +0100 Bluetooth: btrtl: Make array extension_sig static, shrinks object size Don't populate the array extension_sig on the stack but instead make it static. Makes the object code smaller by 75 bytes: Before: text data bss dec hex filename 14325 4920 0 19245 4b2d drivers/bluetooth/btrtl.o After: text data bss dec hex filename 14186 4984 0 19170 4ae2 drivers/bluetooth/btrtl.o (gcc version 8.2.0 x86_64) Signed-off-by: Colin Ian King Signed-off-by: Marcel Holtmann commit 679294497be31596e1c9c61507746d72b6b05f26 Author: Rodrigo Exterckötter Tjäder Date: Wed Sep 26 19:48:24 2018 +0000 arm64: dts: allwinner: a64: a64-olinuxino: set the PHY TX delay The PHY found on the A64-OLinuXino requires a TX delay in order to operate properly. Olimex uses a 600ps second delay in their BSP, and that has been found to work, so let's use that value in the current DT. Signed-off-by: Rodrigo Exterckötter Tjäder Signed-off-by: Chen-Yu Tsai commit 5a637751e216de2cad77f24f92b9e97e61e459d9 Author: Balakrishna Godavarthi Date: Wed Aug 22 17:34:12 2018 +0530 Bluetooth: hci_serdev: Add protocol check in hci_uart_dequeue(). This will help to check the status of protocol while dequeuing an skb packet. In some instaces we will end up kernel crash, where proto close is called and we trying to dequeue an packet. [ 500.142902] [] do_raw_spin_lock+0x1c/0xe0 [ 500.148643] [] _raw_spin_lock_irqsave+0x38/0x48 [ 500.154917] [] skb_dequeue+0x28/0x84 [ 500.160209] [] 0xffffff8000ad6f48 [ 500.165230] [] 0xffffff8000ad6610 [ 500.170257] [] process_one_work+0x238/0x3e4 [ 500.176174] [] worker_thread+0x2bc/0x3d4 [ 500.181821] [] kthread+0x138/0x140 [ 500.186945] [] ret_from_fork+0x10/0x18 Signed-off-by: Balakrishna Godavarthi Signed-off-by: Marcel Holtmann commit 7cf7846d27bfc9731e449857db3eec5e0e9701ba Author: Balakrishna Godavarthi Date: Wed Aug 22 17:34:11 2018 +0530 Bluetooth: hci_serdev: clear HCI_UART_PROTO_READY to avoid closing proto races Clearing HCI_UART_PROTO_READY will avoid usage of proto function pointers before running the proto close function pointer. There is chance of kernel crash, due to usage of non proto close function pointers after proto close. Signed-off-by: Balakrishna Godavarthi Signed-off-by: Marcel Holtmann commit c2d7827338618a9e73a3f892ca63d9082bb7a94d Author: Balakrishna Godavarthi Date: Wed Aug 22 17:50:05 2018 +0530 Bluetooth: hci_qca: Remove hdev dereference in qca_close(). When flag KASAN is set, we are seeing an following crash while removing hci_uart module. [ 50.589909] Unable to handle kernel paging request at virtual address 6b6b6b6b6b6b73 [ 50.597902] Mem abort info: [ 50.600846] Exception class = DABT (current EL), IL = 32 bits [ 50.606959] SET = 0, FnV = 0 [ 50.610142] EA = 0, S1PTW = 0 [ 50.613396] Data abort info: [ 50.616401] ISV = 0, ISS = 0x00000004 [ 50.620373] CM = 0, WnR = 0 [ 50.623466] [006b6b6b6b6b6b73] address between user and kernel address ranges [ 50.630818] Internal error: Oops: 96000004 [#1] PREEMPT SMP [ 50.671670] PC is at qca_power_shutdown+0x28/0x100 [hci_uart] [ 50.677593] LR is at qca_close+0x74/0xb0 [hci_uart] [ 50.775689] Process rmmod (pid: 2144, stack limit = 0xffffff801ba90000) [ 50.782493] Call trace: [ 50.872150] [] qca_power_shutdown+0x28/0x100 [hci_uart] [ 50.879138] [] qca_close+0x74/0xb0 [hci_uart] [ 50.885238] [] hci_uart_unregister_device+0x44/0x50 [hci_uart] [ 50.892846] [] qca_serdev_remove+0x50/0x5c [hci_uart] [ 50.899654] [] serdev_drv_remove+0x28/0x38 [ 50.905489] [] device_release_driver_internal+0x140/0x1e4 [ 50.912653] [] driver_detach+0x78/0x84 [ 50.918121] [] bus_remove_driver+0x80/0xa8 [ 50.923942] [] driver_unregister+0x4c/0x58 [ 50.929768] [] qca_deinit+0x24/0x598 [hci_uart] [ 50.936045] [] hci_uart_exit+0x10/0x48 [hci_uart] [ 50.942495] [] SyS_delete_module+0x17c/0x224 This crash is due to dereference of hdev, after freeing it. Signed-off-by: Balakrishna Godavarthi Signed-off-by: Marcel Holtmann commit ca30ccd2191842ebfd36229bee91da2db8c16361 Author: Balakrishna Godavarthi Date: Wed Aug 22 17:50:04 2018 +0530 Bluetooth: hci_qca: Remove serdev_device_open/close function calls Removed serdev_device_open/close functions from qca_open/close as they are called in hci_uart_register_device() and hci_uart_unregister_device() functions. Signed-off-by: Balakrishna Godavarthi Signed-off-by: Marcel Holtmann commit 5aac49378742a52bbe8af3d25bc51b487be7b17f Author: Andrea Parri Date: Tue Aug 14 20:41:06 2018 +0200 Bluetooth: Remove unnecessary smp_mb__{before,after}_atomic The barriers are unneeded; wait_woken() and woken_wake_function() already provide us with the required synchronization: remove them and document that we're relying on the (implicit) synchronization provided by wait_woken() and woken_wake_function(). Signed-off-by: Andrea Parri Reviewed-by: Brian Norris Signed-off-by: Marcel Holtmann commit 7eccb5edba24cec9bb0a2b990ac66e755456303a Author: Mario Limonciello Date: Wed Sep 26 11:10:58 2018 -0500 platform/x86: intel-wmi-thunderbolt: Add dynamic debugging Some users have been reporting issues with thunderbolt being turned off before fully initialized. This is suspected to be caused by userspace turning off the Thunderbolt controller using intel-wmi-thunderbolt prematurely. Userspace has already made some mitigations for this situation: https://github.com/hughsie/fwupd/commit/ef6f1d76983c9b66 https://github.com/hughsie/fwupd/commit/c07ce5b4889a5384 To allow easier debugging of this situation add output that can be turned on with dynamic debugging to better root cause this problem. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=199631 BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=201227 Suggested-by: Mika Westerberg Signed-off-by: Mario Limonciello Signed-off-by: Andy Shevchenko Reviewed-by: Mika Westerberg commit a8694eebae878aadcee8d3306379c3d74924d89b Author: Andy Shevchenko Date: Wed Sep 26 18:27:40 2018 +0300 platform/x86: intel-wmi-thunderbolt: Convert to use SPDX identifier Reduce size of duplicated comments by switching to use SPDX identifier. No functional change. While here, correct MODULE_LICENSE() string to be aligned with license text. Signed-off-by: Andy Shevchenko commit de415deeb68b1a5c0a036fbbcb10389b83d47e02 Author: Andy Shevchenko Date: Wed Sep 26 18:27:40 2018 +0300 platform/x86: intel_turbo_max_3: 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 303211089c966db3933d4efc91bcaf10e235ad34 Author: Andy Shevchenko Date: Wed Sep 26 18:27:14 2018 +0300 platform/x86: intel_turbo_max_3: Sort headers alphabetically Sort headers alphabetically for better maintenance. No functional change. Signed-off-by: Andy Shevchenko commit 917f450aa3fa84c7682537b008b837806a77d99a Author: Andy Shevchenko Date: Wed Sep 26 18:27:40 2018 +0300 platform/x86: intel_telemetry: Convert to use SPDX identifier Reduce size of duplicated comments by switching to use SPDX identifier. No functional change. While here, correct MODULE_LICENSE() string to be aligned with license text. Signed-off-by: Andy Shevchenko commit 3e57f2648a09622b0ef3738aefb8d27b83dec60f Author: Andy Shevchenko Date: Wed Sep 26 18:27:40 2018 +0300 platform/x86: intel-smartconnect: Convert to use SPDX identifier Reduce size of duplicated comments by switching to use SPDX identifier. No functional change. While here, throw away some extra blank lines. Signed-off-by: Andy Shevchenko commit 8046f0499c14819fb36176a589d21d225e69ae01 Author: Andy Shevchenko Date: Wed Sep 26 18:27:14 2018 +0300 platform/x86: intel-smartconnect: Sort headers alphabetically Sort headers alphabetically for better maintenance. No functional change. While here, remove unneeded linux/init.h inclusion and move MODULE_DEVICE_TABLE() close to the table. Signed-off-by: Andy Shevchenko commit 9b748e0efee547f5a17c07c674cebe3ca148233f Author: Andy Shevchenko Date: Wed Sep 26 18:27:40 2018 +0300 platform/x86: intel_scu_ipc: 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 2d0554e8ba555eeed84741099f1565437ae4b574 Author: Andy Shevchenko Date: Wed Sep 26 18:27:14 2018 +0300 platform/x86: intel_scu_ipc: Sort headers alphabetically Sort headers alphabetically for better maintenance. No functional change. While here, remove unneeded linux/init.h inclusion. Signed-off-by: Andy Shevchenko commit bd7c5866bbe09f085c51e87578c1fa94c22728e0 Author: Andy Shevchenko Date: Wed Sep 26 18:27:40 2018 +0300 platform/x86: intel-rst: Convert to use SPDX identifier Reduce size of duplicated comments by switching to use SPDX identifier. No functional change. While here, throw away some extra blank lines. Signed-off-by: Andy Shevchenko commit 5f4ad6afe96b69886b57ca3cbc6b5e88b7911367 Author: Andy Shevchenko Date: Wed Sep 26 18:27:14 2018 +0300 platform/x86: intel-rst: Sort headers alphabetically Sort headers alphabetically for better maintenance. No functional change. While here, remove unneeded linux/init.h inclusion. Signed-off-by: Andy Shevchenko commit bc15757e0cfd1264bb4fae8bbd65ea736e7617af Author: Andy Shevchenko Date: Wed Sep 26 18:27:40 2018 +0300 platform/x86: intel_punit_ipc: 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 5e66d08e6b485bcb691c2c15806cfaaac8740da3 Author: Andy Shevchenko Date: Wed Sep 26 18:27:14 2018 +0300 platform/x86: intel_punit_ipc: Sort headers alphabetically Sort headers alphabetically for better maintenance. No functional change. Signed-off-by: Andy Shevchenko commit ad51f287ff593efb559f23e655312f3b6694fd90 Author: Andy Shevchenko Date: Wed Sep 26 18:27:40 2018 +0300 platform/x86: intel_pmc: Convert to use SPDX identifier Reduce size of duplicated comments by switching to use SPDX identifier. No functional change. While here, correct MODULE_LICENSE() string to be aligned with license text. Signed-off-by: Andy Shevchenko commit 908817720056ce19bfabd9c02e9bd09ff696d898 Author: Andy Shevchenko Date: Wed Sep 26 18:27:14 2018 +0300 platform/x86: intel_pmc: Sort headers alphabetically Sort headers alphabetically for better maintenance. No functional change. While here, remove unneeded linux/init.h inclusion. Signed-off-by: Andy Shevchenko commit 56ca5ec102b4a4e8f6b945a3ed132d8677be528b Author: Andy Shevchenko Date: Wed Sep 26 18:27:40 2018 +0300 platform/x86: intel_oaktrail: 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 bce99455f56ee45f128ffedd5c87201003850188 Author: Andy Shevchenko Date: Wed Sep 26 18:27:14 2018 +0300 platform/x86: intel_oaktrail: Sort headers alphabetically Sort headers alphabetically for better maintenance. No functional change. While here, remove unneeded linux/init.h inclusion. Signed-off-by: Andy Shevchenko commit 56df47de25402ba44382b89cab4665faed783711 Author: Andy Shevchenko Date: Wed Sep 26 18:27:40 2018 +0300 platform/x86: intel_mid_thermal: Convert to use SPDX identifier Reduce size of duplicated comments by switching to use SPDX identifier. No functional change. While here, correct MODULE_LICENSE() string to be aligned with license text. Signed-off-by: Andy Shevchenko commit e6e69a31dc7412ac9fb40881ae9788ad82ac6c98 Author: Andy Shevchenko Date: Wed Sep 26 18:27:14 2018 +0300 platform/x86: intel_mid_thermal: Sort headers alphabetically Sort headers alphabetically for better maintenance. No functional change. While here, remove unneeded linux/init.h inclusion. Signed-off-by: Andy Shevchenko commit f6b27d0907d0381c330c09ae6f7149c8121c3f37 Author: Andy Shevchenko Date: Wed Sep 26 18:27:40 2018 +0300 platform/x86: intel_mid_powerbtn: 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 f7949b185b8eb15bb61610f627c7014c7f042feb Author: Andy Shevchenko Date: Wed Sep 26 18:27:40 2018 +0300 platform/x86: intel_mid_powerbtn: Remove unnecessary init.h inclusion No need to include linux/init.h when linux/module.h is. No functional change intended. Signed-off-by: Andy Shevchenko commit 0b5d9856b6070fe2ffc3906e0190d48f465ae771 Author: Andy Shevchenko Date: Wed Sep 26 18:27:40 2018 +0300 platform/x86: intel_menlow: Convert to use SPDX identifier Reduce size of duplicated comments by switching to use SPDX identifier. No functional change. While here, correct MODULE_LICENSE() string to be aligned with license text. Signed-off-by: Andy Shevchenko commit 8855ab3b2ef65de985484c063301cdc1b2aab187 Author: Andy Shevchenko Date: Wed Sep 26 18:27:14 2018 +0300 platform/x86: intel_menlow: Sort headers alphabetically Sort headers alphabetically for better maintenance. No functional change. While here, remove unneeded linux/init.h inclusion. Signed-off-by: Andy Shevchenko commit c4e4c94641109095b04024ba15b899f621c52ca4 Author: Andy Shevchenko Date: Wed Sep 26 18:27:40 2018 +0300 platform/x86: intel-ips: Convert to use SPDX identifier Reduce size of duplicated comments by switching to use SPDX identifier. No functional change. While here, correct MODULE_LICENSE() string to be aligned with license text. Signed-off-by: Andy Shevchenko commit 79c24dbdcbcb23e722e5c2680dba642fcc74a357 Author: Andy Shevchenko Date: Wed Sep 26 18:27:40 2018 +0300 platform/x86: intel_int0002_vgpio: Convert to use SPDX identifier Reduce size of duplicated comments by switching to use SPDX identifier. No functional change. While here, correct MODULE_LICENSE() string to be aligned with license text. Signed-off-by: Andy Shevchenko commit 31daa5dd32fc77d3114ad0f6e1a2f1aedfe43616 Author: Andy Shevchenko Date: Wed Sep 26 18:27:40 2018 +0300 platform/x86: intel-hid: 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 924931745bf392a5aa25ad88c09edbb414556334 Author: Andy Shevchenko Date: Wed Sep 26 18:58:52 2018 +0300 platform/x86: intel_chtdc_ti_pwrbtn: Add SPDX identifier Driver misses the licence text or identifier, thus, append it here. Signed-off-by: Andy Shevchenko commit 83e8ee26cb5ad54d37d6f6359979e004ce7cb9e9 Author: Andy Shevchenko Date: Wed Sep 26 18:27:40 2018 +0300 platform/x86: intel_cht_int33fe: Convert to use SPDX identifier Reduce size of duplicated comments by switching to use SPDX identifier. No functional change. While here, correct MODULE_LICENSE() string to be aligned with license text. Signed-off-by: Andy Shevchenko commit 24c6f7200bb326122e65528e44a12962403185fe Author: Andy Shevchenko Date: Wed Sep 26 18:27:40 2018 +0300 platform/x86: intel_bxtwc_tmu: 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 bfb25c86ef2bb9fa2ddeae4daca9910fd19754bc Author: Stuart Hayes Date: Wed Sep 26 16:50:21 2018 -0500 MAINTAINERS: Update maintainer for dcdbas and dell_rbu Assign maintainer for dell_rbu driver, and reassign maintainer of dcdbas from inactive maintainer (current maintainer is aware of this change-- see https://www.spinics.net/lists/platform-driver-x86/msg16336.html). Signed-off-by: Stuart Hayes Acked-by: Doug Warzecha Signed-off-by: Andy Shevchenko commit 8e5cddd1262cdee59257d554440cc9a80e5fcb7b Author: Stuart Hayes Date: Wed Sep 26 16:50:20 2018 -0500 firmware: dcdbas: Move dcdbas to drivers/platform/x86 Move dcdbas to the more appropriate directory drivers/platform/x86. Signed-off-by: Stuart Hayes Signed-off-by: Andy Shevchenko commit c48e2ffd717ca4a67b4938bb60d110b7eeed39c4 Author: Stuart Hayes Date: Wed Sep 26 16:50:19 2018 -0500 firmware: dell_rbu: Move dell_rbu to drivers/platform/x86 Move dell_rbu to the more appropriate directory drivers/platform/x86. Signed-off-by: Stuart Hayes Signed-off-by: Andy Shevchenko commit 12c956c4f32e08799de452abe1e1ec6021b1e41f Author: Stuart Hayes Date: Wed Sep 26 16:50:18 2018 -0500 firmware: dcdbas: Add support for WSMT ACPI table If the WSMT ACPI table is present and indicates that a fixed communication buffer should be used, use the firmware-specified buffer instead of allocating a buffer in memory for communications between the dcdbas driver and firmare. Signed-off-by: Stuart Hayes Signed-off-by: Andy Shevchenko commit 6aecee6ad41cf97c0270f72da032c10eef025bf0 Author: Stuart Hayes Date: Wed Sep 26 16:50:17 2018 -0500 firmware: dell_rbu: Make payload memory uncachable The dell_rbu driver takes firmware update payloads and puts them in memory so the system BIOS can find them after a reboot. This sometimes fails (though rarely), because the memory containing the payload is in the CPU cache but never gets written back to main memory before the system is rebooted (CPU cache contents are lost on reboot). With this patch, the payload memory will be changed to uncachable to ensure that the payload is actually in main memory before the system is rebooted. Signed-off-by: Stuart Hayes Signed-off-by: Andy Shevchenko commit f7eaf3fb9d10cc72669fe8c8bd204087a65e50f6 Author: Paul Gortmaker Date: Thu Sep 20 21:44:21 2018 -0400 platform/x86: acerhdf: restructure to allow large BIOS table be __initconst There is a table of Vendor/Model/Version {control data} in this driver, but outside of the initial probe, the V/M/V is never used again, and neither are any of the entries for platforms other than the one which matches the running target. By simply storing the {control data} for the matched platform, we can mark the large table __initconst, which reduces the loaded driver size by 20 percent. Before: root@gw:~/git/linux-head# lsmod Module Size Used by acerhdf 20480 0 root@gw:~/git/linux-head# After: root@gw:~/git/linux-head# lsmod Module Size Used by acerhdf 16384 0 root@gw:~/git/linux-head# Cc: Peter Feuerer Cc: Darren Hart Cc: Andy Shevchenko Signed-off-by: Paul Gortmaker Signed-off-by: Andy Shevchenko Reviewed-by: Peter Feuerer commit 1d0c3fd01afbd52cc365460d46176b6b4131960d Author: Paul Gortmaker Date: Thu Sep 20 21:44:20 2018 -0400 platform/x86: acerhdf: mark appropriate content with __init prefix These three functions are only called from the probe code which is already marked __init and hence these can be __init as well. Cc: Peter Feuerer Cc: Darren Hart Cc: Andy Shevchenko Signed-off-by: Paul Gortmaker Signed-off-by: Andy Shevchenko Reviewed-by: Peter Feuerer commit 684238d79ad85c5e19a71bb5818e77e329912fbc Author: Paul Gortmaker Date: Thu Sep 20 21:44:19 2018 -0400 platform/x86: acerhdf: Add BIOS entry for Gateway LT31 v1.3307 To fix: acerhdf: unknown (unsupported) BIOS version Gateway /LT31 /v1.3307 , please report, aborting! As can be seen in the context, the BIOS registers haven't changed in the previous versions, so the assumption is they won't have changed in this last update for this somewhat older platform either. Cc: Peter Feuerer Cc: Darren Hart Cc: Andy Shevchenko Signed-off-by: Paul Gortmaker Signed-off-by: Andy Shevchenko Reviewed-by: Peter Feuerer commit 14c20688292583b3f7a8a595b65f6b5665616752 Author: Paul Gortmaker Date: Thu Sep 20 21:44:18 2018 -0400 platform/x86: acerhdf: Remove cut-and-paste trap from instructions Just like we avoid specifying actual block devices like sda for fdisk and dd examples, we should not specify specific thermal zones here. On the platform I was testing on, zone0 was acpitz, and zone1 was for this acerhdf driver. Make the printk such that it won't work with a blind cut-and-paste, and force the user to determine which zone is correct for this driver. Cc: Peter Feuerer Cc: Darren Hart Cc: Andy Shevchenko Signed-off-by: Paul Gortmaker Signed-off-by: Andy Shevchenko Reviewed-by: Peter Feuerer commit 291bd0e4605ee5d3cc8adefb79f8ef2047219571 Author: Paul Gortmaker Date: Thu Sep 20 21:44:17 2018 -0400 platform/x86: acerhdf: Enable ability to list supported systems This driver has two module parameters that allow an override of the checks for matching model and BIOS version. However, both parameters expect you to choose an entry from the existing list of supported systems, encoded within the driver itself. Without the source, such as in a binary distribution, the end user does not have access to this information, thus rendering the two module parameters essentially useless. Add a module parameter that allows the end user to dump the list of make/model/versions so that they can then pick one that most closely matches their own system. Cc: Peter Feuerer Cc: Darren Hart Cc: Andy Shevchenko Signed-off-by: Paul Gortmaker Signed-off-by: Andy Shevchenko Reviewed-by: Peter Feuerer commit 3836b816ddac7fcf4b3c9c55c5b57f41cea2a236 Author: Paul Gortmaker Date: Thu Sep 20 21:44:16 2018 -0400 platform/x86: acerhdf: clarify modinfo messages for BIOS override Normally, a module parameter for a BIOS check override implies "pretend you support this version" (and the user will enter their local version). However, this driver uses the model/BIOS module parameters in a way that is "pretend my system is the supported model XYZ with BIOS version ABC." which is less common. Since the help strings don't make such a distinction, one gets this somewhat frustrating scenario, where the user sees the error, enters *their* BIOS version and then gets the same error: root@gw:~# modprobe acerhdf acerhdf: Acer Aspire One Fan driver, v.0.7.0 acerhdf: unknown (unsupported) BIOS version Gateway /LT31 /v1.3307 , please report, aborting! modprobe: ERROR: could not insert 'acerhdf': Invalid argument root@gw:~# modprobe acerhdf force_bios=v1.3307 acerhdf: Acer Aspire One Fan driver, v.0.7.0 acerhdf: forcing BIOS version: v1.3307 acerhdf: unknown (unsupported) BIOS version Gateway /LT31 /v1.3307 , please report, aborting! modprobe: ERROR: could not insert 'acerhdf': Invalid argument Clarify the module param help text to make it clear that the driver expects a choice from existing supported models/versions. Cc: Peter Feuerer Cc: Darren Hart Cc: Andy Shevchenko Signed-off-by: Paul Gortmaker Signed-off-by: Andy Shevchenko Reviewed-by: Peter Feuerer commit a8b60e484f3d245bf90e934d608f75c814aaa70c Author: Andy Shevchenko Date: Fri Aug 31 11:34:31 2018 +0300 platform/x86: intel_mid_powerbtn: Get rid of custom ICPU() macro Replace custom grown macro with generic INTEL_CPU_FAM6() one. No functional change intended. Signed-off-by: Andy Shevchenko commit c3b8e884defae3ad50956ee77bdba3638fe4852f Author: Hans de Goede Date: Mon Sep 24 16:37:19 2018 +0200 platform/x86: intel_int0002_vgpio: Implement irq_set_wake We were relying on the interrupt being shared with the ACPI SCI and the ACPI core calling irq_set_wake. But that does not always happen on Bay Trail devices, so we should do it ourselves. This fixes wake from USB not working on various Bay Trail devices. Signed-off-by: Hans de Goede Signed-off-by: Andy Shevchenko commit 96402de65afcd9d7f12e04bf8a14d5a321aca4af Author: Hans de Goede Date: Wed Sep 19 20:14:51 2018 +0200 platform/x86: intel_int0002_vgpio: Enable the driver on Bay Trail platforms The intel_int0002_vgpio driver was added to avoid an IRQ 9 storm on Cherry Trail platforms. When originally merged the CPU ID for Bay Trail SoCs was commented out of the list of valid CPU IDs because we did not have any reports of the IRQ storm on Bay Trail platforms. We now have a report of the IRQ 9 storm on the Bay Trail based Thinkpad Tablet 10 which is fixed by enabling this driver, so lets enable it on Bay Trail too. I've tested various other Bay Trail device with this driver enabled without adverse side-effects. BugLink: https://www.dpin.de/nf/finally-s0i3-is-there-thinkpad-tablet-10-sleeps-deeply-with-linux-kernel-4-15rc/#comments Reported-and-tested-by: Nicole Faerber Signed-off-by: Hans de Goede Signed-off-by: Andy Shevchenko commit 31e56f2305bbc213e9e9f0e21826cceab70d5336 Author: Zhang Xianwei Date: Tue Sep 4 15:08:19 2018 +0800 platform/x86: ideapad-laptop: Use __func__ instead of read_ec_cmd in pr_err Refer to the commit f1395edbcec8 ("platform/x86: ideapad-laptop: Use __func__ instead of write_ec_cmd in pr_err"), prefer using '"%s...", __func__' to using 'read_ec_cmd' in read_ec_data. Signed-off-by: Zhang Xianwei Acked-by: Ike Panhc Signed-off-by: Andy Shevchenko commit c2b70ffcd34eca60013d90bd6cd56e60b07adef8 Author: Jernej Skrabec Date: Mon Jun 25 14:02:53 2018 +0200 dt-bindings: display: sun4i-drm: Add R40 mixer compatibles R40 DE2 mixers are similar to those found in A83T, except it needs different clock settings. Add a compatibles for them. Reviewed-by: Chen-Yu Tsai Acked-by: Rob Herring Signed-off-by: Jernej Skrabec Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20180625120304.7543-14-jernej.skrabec@siol.net commit 3dcf0f306d9d6e6657022eee287ef0ff4e5d7140 Author: Chen-Yu Tsai Date: Fri Sep 21 22:27:43 2018 +0800 Revert "drm/sun4i: Remove R40 display pipeline compatibles" This reverts commit 3510e7a7f91088159bfc67e8abdc9f9e77d28870. During the 4.19 merge window for drm-misc, two patches critical to supporting the display pipeline on the Allwinner R40 SoC were missed. They were applied later but missed the merge window deadline. As a result 4.19-rc1 kernel would crash on the R40 when it couldn't parse the new device tree structure. We ended up removing support for the R40 display pipeline for 4.19. Since the missing patches are already merged for 4.20, we can now revert the commit that removed support. Signed-off-by: Chen-Yu Tsai Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20180921142743.8711-1-wens@csie.org commit 016add12977bcc30f77d7e48fc9a3a024cb46645 Author: Rob Herring Date: Thu Sep 13 13:12:26 2018 -0500 ARM: dts: realview: Fix SPI controller node names SPI controller nodes should be named 'spi' rather than 'ssp'. Fixing the name enables dtc SPI bus checks. Cc: Linus Walleij Signed-off-by: Rob Herring Signed-off-by: Linus Walleij commit 7b76d0588477d4b6097a9048b42835a45caf5c48 Merge: a74c0aa52405 bf78296ab1cb Author: Sean Paul Date: Thu Sep 27 02:54:54 2018 -0400 Merge drm/drm-next into drm-misc-next Backmerging 4.19-rc5 to pick up sun4i fix Signed-off-by: Sean Paul commit 087682f5a75bec349cdcb34c29384a051587aa99 Author: Jisheng Zhang Date: Fri Jul 13 17:05:04 2018 +0800 arm64: dts: synaptics: add dtsi file for Synaptics AS370 SoC Add initial dtsi file to support Synaptics AS370 SoC with quad Cortex-A53 CPUs. Signed-off-by: Jisheng Zhang commit 3da2937946d9c6510c5a65b6ddee1aa78b4f6676 Author: Jisheng Zhang Date: Fri Jul 13 17:00:33 2018 +0800 dt-bindings: arm: syna: add support for the AS370 SoC The AS370 SoC is a new derivative of the berlin family. However, the SoC isn't named as berlin*. Signed-off-by: Jisheng Zhang Reviewed-by: Rob Herring commit 10c3a0b76d4cf6ad21d3373ff5894daecc665bc9 Author: Jisheng Zhang Date: Fri Jul 13 16:52:16 2018 +0800 dt-bindings: arm: move berlin binding documentation to syna.txt Move berlin binding documentation as part of transition from Marvell berlin to Synaptics SoC. Signed-off-by: Jisheng Zhang Acked-by: Rob Herring commit 6b58859419554fb824e09cfdd73151a195473cbc Author: Justin Ernst Date: Tue Sep 25 09:34:49 2018 -0500 EDAC: Raise the maximum number of memory controllers We observe an oops in the skx_edac module during boot: EDAC MC0: Giving out device to module skx_edac controller Skylake Socket#0 IMC#0 EDAC MC1: Giving out device to module skx_edac controller Skylake Socket#0 IMC#1 EDAC MC2: Giving out device to module skx_edac controller Skylake Socket#1 IMC#0 ... EDAC MC13: Giving out device to module skx_edac controller Skylake Socket#0 IMC#1 EDAC MC14: Giving out device to module skx_edac controller Skylake Socket#1 IMC#0 EDAC MC15: Giving out device to module skx_edac controller Skylake Socket#1 IMC#1 Too many memory controllers: 16 EDAC MC: Removed device 0 for skx_edac Skylake Socket#0 IMC#0 We observe there are two memory controllers per socket, with a limit of 16. Raise the maximum number of memory controllers from 16 to 2 * MAX_NUMNODES (1024). [ bp: This is just a band-aid fix until we've sorted out the whole issue with the bus_type association and handling in EDAC and can get rid of this arbitrary limit. ] Signed-off-by: Justin Ernst Signed-off-by: Borislav Petkov Acked-by: Russ Anderson Cc: Mauro Carvalho Chehab Cc: linux-edac@vger.kernel.org Link: https://lkml.kernel.org/r/20180925143449.284634-1-justin.ernst@hpe.com commit 1042caa79e9351b81ed19dc8d2d7fd6ff51a4422 Author: Maciej Żenczykowski Date: Tue Sep 25 20:56:27 2018 -0700 net-ipv4: remove 2 always zero parameters from ipv4_redirect() (the parameters in question are mark and flow_flags) Reviewed-by: David Ahern Signed-off-by: Maciej Żenczykowski Signed-off-by: David S. Miller commit d888f39666774c7debfa34e4e20ba33cf61a6d71 Author: Maciej Żenczykowski Date: Tue Sep 25 20:56:26 2018 -0700 net-ipv4: remove 2 always zero parameters from ipv4_update_pmtu() (the parameters in question are mark and flow_flags) Reviewed-by: David Ahern Signed-off-by: Maciej Żenczykowski Signed-off-by: David S. Miller commit da58a931f248f423f917c3a0b3c94303aa30a738 Author: Maxime Chevallier Date: Tue Sep 25 15:59:39 2018 +0200 net: mvneta: Add support for 2500Mbps SGMII The mvneta controller can handle speeds up to 2500Mbps on the SGMII interface. This relies on serdes configuration, the lane must be configured at 3.125Gbps and we can't use in-band autoneg at that speed. The main issue when supporting that speed on this particular controller is that the link partner can send ethernet frames with a shortened preamble, which if not explicitly enabled in the controller will cause unexpected behaviours. This was tested on Armada 385, with the comphy configuration done in bootloader. Signed-off-by: Maxime Chevallier Signed-off-by: David S. Miller commit c09c1474d8c107f592f15c094cb1eeed9abac1d6 Merge: af4325ecc24f 441abde4cd84 Author: David S. Miller Date: Wed Sep 26 20:25:55 2018 -0700 Merge branch 'net-vhost-improve-performance-when-enable-busyloop' Tonghao Zhang says: ==================== net: vhost: improve performance when enable busyloop This patches improve the guest receive performance. On the handle_tx side, we poll the sock receive queue at the same time. handle_rx do that in the same way. For more performance report, see patch 4 ==================== Signed-off-by: David S. Miller commit 441abde4cd84824ad010bc7efd6fdd101a1b73e5 Author: Tonghao Zhang Date: Tue Sep 25 05:36:52 2018 -0700 net: vhost: add rx busy polling in tx path This patch improves the guest receive performance. On the handle_tx side, we poll the sock receive queue at the same time. handle_rx do that in the same way. We set the poll-us=100us and use the netperf to test throughput and mean latency. When running the tests, the vhost-net kthread of that VM, is alway 100% CPU. The commands are shown as below. Rx performance is greatly improved by this patch. There is not notable performance change on tx with this series though. This patch is useful for bi-directional traffic. netperf -H IP -t TCP_STREAM -l 20 -- -O "THROUGHPUT, THROUGHPUT_UNITS, MEAN_LATENCY" Topology: [Host] ->linux bridge -> tap vhost-net ->[Guest] TCP_STREAM: * Without the patch: 19842.95 Mbps, 6.50 us mean latency * With the patch: 37598.20 Mbps, 3.43 us mean latency Signed-off-by: Tonghao Zhang Signed-off-by: David S. Miller commit dc151282bbdaed08e62f5c34c4842331d54b4628 Author: Tonghao Zhang Date: Tue Sep 25 05:36:51 2018 -0700 net: vhost: factor out busy polling logic to vhost_net_busy_poll() Factor out generic busy polling logic and will be used for in tx path in the next patch. And with the patch, qemu can set differently the busyloop_timeout for rx queue. To avoid duplicate codes, introduce the helper functions: * sock_has_rx_data(changed from sk_has_rx_data) * vhost_net_busy_poll_try_queue Signed-off-by: Tonghao Zhang Signed-off-by: David S. Miller commit a6a67a2f343c613752165101208bd096b0bba6e1 Author: Tonghao Zhang Date: Tue Sep 25 05:36:50 2018 -0700 net: vhost: replace magic number of lock annotation Use the VHOST_NET_VQ_XXX as a subclass for mutex_lock_nested. Signed-off-by: Tonghao Zhang Acked-by: Jason Wang Signed-off-by: David S. Miller commit 78139c94dc8c96a478e67dab3bee84dc6eccb5fd Author: Tonghao Zhang Date: Tue Sep 25 05:36:49 2018 -0700 net: vhost: lock the vqs one by one This patch changes the way that lock all vqs at the same, to lock them one by one. It will be used for next patch to avoid the deadlock. Signed-off-by: Tonghao Zhang Acked-by: Jason Wang Signed-off-by: Jason Wang Signed-off-by: David S. Miller commit af4325ecc24f45933d5567e72227cff2c1594764 Author: Yafang Shao Date: Mon Sep 24 20:57:29 2018 +0800 tcp: expose sk_state in tcp_retransmit_skb tracepoint After sk_state exposed, we can get in which state this retransmission occurs. That could give us more detail for dignostic. For example, if this retransmission occurs in SYN_SENT state, it may also indicates that the syn packet may be dropped on the remote peer due to syn backlog queue full and then we could check the remote peer. BTW,SYNACK retransmission is traced in tcp_retransmit_synack tracepoint. Signed-off-by: Yafang Shao Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit d30e63b159b0a77fb14fd6e8f86f20115baaeb1a Author: Alex Deucher Date: Wed Sep 26 11:24:25 2018 -0500 drm/amdgpu/vcn: whitespace cleanup Fix some indentation issues. Reviewed-by: Christian König Reviewed-by: James Zhu Signed-off-by: Alex Deucher commit 81bb773f35105f13c45b8cde1fa7cd147f9254b2 Author: Alex Deucher Date: Wed Sep 26 11:18:47 2018 -0500 drm/amdgpu/soc15: fix warnings in register macro expects argument of type ‘unsigned int’ has type ‘long int’ Fixes: 52e211c1f04 ("drm/amdgpu:Add error message when register failed to reach expected value") Reviewed-by: Christian König Reviewed-by: James Zhu Signed-off-by: Alex Deucher commit a3716d3a06ac740a3df081d61da3df7f2189f5ac Author: James Zhu Date: Fri Sep 21 14:47:45 2018 -0400 drm/amdgpu:Enable DPG mode on PCO Add flag AMD_PG_SUPPORT_DPG to enable DPG mode on Picasso Signed-off-by: James Zhu Reviewed-by: Alex Deucher Reviewed-by: Huang Rui Acked-by: Christian König Signed-off-by: Alex Deucher commit bd5d5180db3226f0ce4f132e789c71a8efba3555 Author: James Zhu Date: Fri Sep 21 14:43:18 2018 -0400 drm/amdgpu:Add DPG pause mode support Add functions to support VCN DPG pause mode. Signed-off-by: James Zhu Reviewed-by: Alex Deucher Reviewed-by: Huang Rui Acked-by: Christian König Signed-off-by: Alex Deucher commit 0b8690b7a84c04533ae65a5ab9deae8950ca408e Author: James Zhu Date: Mon Sep 10 18:15:11 2018 -0400 drm/amdgpu:Add DPG pause state Add DPG pause state to support VCN DPG mode. Signed-off-by: James Zhu Reviewed-by: Alex Deucher Reviewed-by: Huang Rui Acked-by: Christian König Signed-off-by: Alex Deucher commit 63e9bb1d98eff3584190295acb231e631ba5e59e Author: James Zhu Date: Fri Sep 21 14:35:32 2018 -0400 drm/amdgpu:Add DPG mode support for vcn 1.0 Add DPG mode start/stop/mc_resume/clock_gating to support vcn 1.0 DPG mode. Signed-off-by: James Zhu Reviewed-by: Alex Deucher Reviewed-by: Huang Rui Acked-by: Christian König Signed-off-by: Alex Deucher commit 03d6e3aac81634a91dd2790f8c199ffb3927fe3c Author: James Zhu Date: Mon Sep 10 16:00:36 2018 -0400 drm/amdgpu:Add DPG mode read/write macro Some registers read/write needs program through SDRAM pool under DPG mode. Signed-off-by: James Zhu Reviewed-by: Alex Deucher Reviewed-by: Huang Rui Acked-by: Christian König Signed-off-by: Alex Deucher commit f28ff06210f444da0b52168450625ad883ff8a1f Author: James Zhu Date: Mon Sep 10 15:23:40 2018 -0400 drm/amdgpu:Add DPG support flag Add DPG support flag for VCN DPG mode. Signed-off-by: James Zhu Reviewed-by: Alex Deucher Reviewed-by: Huang Rui Acked-by: Christian König Signed-off-by: Alex Deucher commit b604545b921b0b6af1785db85bab8e790a18ddad Author: James Zhu Date: Mon Sep 10 14:58:16 2018 -0400 drm/amdgpu:Add new register offset/mask to support VCN DPG mode New register offset/mask need to be added to support VCN DPG mode. Signed-off-by: James Zhu Reviewed-by: Alex Deucher Reviewed-by: Huang Rui Acked-by: Christian König Signed-off-by: Alex Deucher commit 21cbe2f38cd94c180c4b3aad00bcb95b5f323134 Author: James Zhu Date: Mon Sep 10 14:06:08 2018 -0400 drm/amdgpu:Use register UVD_SCRATCH9 for VCN ring/ib test Use register UVD_SCRATCH9 for VCN ring/ib test. Since those registers can't be directly accessed under DPG(Dynamic Power Gate) mode. Signed-off-by: James Zhu Reviewed-by: Alex Deucher Reviewed-by: Huang Rui Acked-by: Christian König Signed-off-by: Alex Deucher commit 1ffdeca64856e0149e7fb341617f47cb038df543 Author: Christian König Date: Mon Sep 17 15:29:28 2018 +0200 drm/amdgpu: move more defines into amdgpu_irq.h Everything that isn't related to the IH ring. Signed-off-by: Christian König Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 1f8969463bca23327eedadab0fef0d28c9b6f29f Author: Christian König Date: Mon Sep 17 15:18:37 2018 +0200 drm/amdgpu: move more interrupt processing into amdgpu_irq.c Add a callback to amdgpu_ih_process to remove most of the IV logic. Signed-off-by: Christian König Acked-by: Huang Rui Signed-off-by: Alex Deucher commit 95d7fc4a412aabd3f5b2e1123c3b8faf1a3d8da7 Author: Andrey Grodzovsky Date: Tue Sep 25 10:24:16 2018 -0400 drm/amdgpu: Move fence SW fallback warning v3 Only print the warning if there was actually some fence processed from the SW fallback timer. v2: Add return value to amdgpu_fence_process to let amdgpu_fence_fallback know fences were actually processed and then print the warning. v3: Always return true if seq != last_seq Signed-off-by: Andrey Grodzovsky Reviewed-by: Christian König Acked-off-by: Alex Deucher Signed-off-by: Alex Deucher commit 425c31437f26436e17bdb3041a26e9864d18ba13 Author: Christian König Date: Sun Sep 16 20:13:21 2018 +0200 drm/amdgpu: cleanup amdgpu_ih.c Cleanup amdgpu_ih.c to be able to handle multiple interrupt rings. Signed-off-by: Christian König Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit f54b30d70bc606f7a154edba5883c7fa23838e9f Author: Christian König Date: Mon Sep 17 15:41:45 2018 +0200 drm/amdgpu: make function pointers mandatory We always want those to be setup correctly. Signed-off-by: Christian König Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 0dd1e5bbecd75b6977d47be39f85af1bda524006 Author: Christian König Date: Thu Sep 20 13:26:18 2018 +0200 drm/amdgpu: drop extra newline in amdgpu_iv trace That is superflous here. Signed-off-by: Christian König Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 75986276217b8fcb4d5aa8fb76540fbb26c061de Author: Huang Rui Date: Fri Sep 21 18:15:01 2018 +0800 drm/amdgpu: fix the page fault of raven2 While the apg_end address is 0xffffffff, if add 1 with it, the value will be overflow and roll back to 0. So when 0 is written to mmMC_VM_SYSTEM_APERTURE_HIGH_ADDR, the system aperture is actually disabled. And so any access to vram will trigger a page fault. Raven2's HW issue only need increase the vram end address, and needn't do it on the agp. Signed-off-by: Huang Rui Acked-by: Alex Deucher Reviewed-by: Christian König Cc: Marek Olšák Signed-off-by: Alex Deucher commit d355f149d082e43ff9f5194afc3ebb32707ae01d Author: Rex Zhu Date: Thu Sep 20 16:47:06 2018 +0800 drm/amd/pp: Disable dpm features on smu7/8 when suspend Need to disable dpm features before halt rlc. Acked-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher commit 722ca51d4f50b36bb95da99ae3f4cf371cbc9708 Author: Rex Zhu Date: Thu Sep 20 17:06:22 2018 +0800 drm/amdgpu: Remove redundant code in gfx_v8_0.c the CG related registers have been programed in golden setting PG register default value is 0. Acked-by: Alex Deucher Signed-off-by: Hang Zhou Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher commit 5d944aaa3c473b476d71f91977360411f6ca88d4 Author: Rex Zhu Date: Tue Sep 11 10:33:38 2018 +0800 drm/amdgpu: Halt rlc/cp in rlc_safe_mode before halt rlc/cp, need to 1. enter rlc safe mode 2. wait rlc/cp idle Acked-by: Alex Deucher Signed-off-by: Hang Zhou Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher commit 434e6df2f7fd7e9b11feb0af23f1cb4dbab80b42 Author: Rex Zhu Date: Tue Aug 28 18:20:19 2018 +0800 drm/amdgpu: Refine function name change function name gfx_v6/7/8/9_0_gpu_init to gfx_v6/7/8/9_0_constants_init. this function is just for init gfx constants such as max pipes, render backends... Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher commit 3547e3cf1976e6ff72098c8f8e7e4a1c3e727e1d Author: Andrey Grodzovsky Date: Mon Sep 24 14:10:22 2018 +0200 drm/amdgpu: Deactivate SW interrupt fallback in amdgpu_fence_process v2 Deactivate SW interrupt fallback when all emited fences are completed. Also switch interrupt SW fallback message from INFO to WARN. v2: shorten the warning message a bit and only re-activate the timer during processing if it was already activated before. (Christian) Signed-off-by: Andrey Grodzovsky Suggested-by: Christian Konig Reviewed-and-Tested-by: Andrey Grodzovsky Signed-off-by: Alex Deucher commit 22a3a2941b93e5095ea63f6ab01d96cbfd4cd3f4 Author: Shaoyun Liu Date: Tue Oct 31 13:32:53 2017 -0400 drm/amdkfd: Vega20 bring up on amdkfd side Add Vega20 device IDs, device info and enable it in KFD. Signed-off-by: Shaoyun Liu Acked-by: Alex Deucher Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher Signed-off-by: Felix Kuehling commit ba0f2841d50e74a00f2eec853a6358a59681fbf8 Author: Shaoyun Liu Date: Tue Feb 6 15:37:53 2018 -0500 drm/amdgpu: Add vega20 support on kfd probe Add Vega20 support in amdgpu_amdkfd_device_probe. Signed-off-by: Shaoyun Liu Acked-by: Alex Deucher Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher Signed-off-by: Felix Kuehling commit e715c6d0ea8ac9d97093fb7ce4fb754621397959 Author: Shaoyun Liu Date: Tue Mar 13 17:44:09 2018 -0400 drm/amd: Interface change to support 64 bit page_table_base amdgpu_gpuvm_get_process_page_dir should return the page table address in the format expected by the pm4_map_process packet for all ASIC generations. Signed-off-by: Shaoyun Liu Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher Signed-off-by: Felix Kuehling Acked-by: Alex Deucher commit d50941892ed9d18792271b2b06c8842a7a14b54d Author: Shaoyun Liu Date: Fri Feb 9 16:29:14 2018 -0500 drm/amdkfd: Make the number of SDMA queues variable Vega20 supports 8 SDMA queues per engine Signed-off-by: Shaoyun Liu Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher Signed-off-by: Felix Kuehling Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit a2a8fb512e09bd3735c92421e93cd2e1baa2723d Author: Emily Deng Date: Thu Aug 9 15:05:31 2018 +0800 drm/amdgpu/sriov: Correct the setting about sdma doorbell offset of Vega10 Correct the format For vega10 sriov, the sdma doorbell must be fixed as follow to keep the same setting with host driver, or it will happen conflicts. Signed-off-by: Emily Deng Acked-by: Alex Deucher Signed-off-by: Felix Kuehling Signed-off-by: Alex Deucher commit c5892230d98b043b3948aec7ce60e636d19c8e50 Author: Shaoyun Liu Date: Fri Mar 23 16:20:41 2018 -0500 drm/amdgpu: Doorbell assignment for 8 sdma user queue per engine Change doorbell assignments to allow routing doorbells for 8 user mode SDMA queues per engine. Signed-off-by: Shaoyun Liu Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher Signed-off-by: Felix Kuehling Acked-by: Alex Deucher commit b62e01774bd2eb23a80e420da44a95344ac85e8d Author: Felix Kuehling Date: Fri Aug 24 18:24:53 2018 -0400 drm/amdgpu: remove unnecessary forward declaration struct vi_sdma_mqd is defined in vi_structs.h. Signed-off-by: Felix Kuehling Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 5df099e8bc83f4f3af8711ee0b9b8faef359ffff Author: Jay Cornwall Date: Tue May 2 17:39:37 2017 -0500 drm/amdkfd: Add wavefront context save state retrieval ioctl Wavefront context save data is of interest to userspace clients for debugging static wavefront state. The MQD contains two parameters required to parse the control stack and the control stack itself is kept in the MQD from gfx9 onwards. Add an ioctl to fetch the context save area and control stack offsets and to copy the control stack to a userspace address if it is kept in the MQD. Signed-off-by: Jay Cornwall Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 5ade6c9c35a8a2149605dd04b2bcc0714d6c95aa Author: Felix Kuehling Date: Mon Aug 20 20:15:00 2018 -0400 drm/amdkfd: Report SDMA firmware version in the topology Also save the version in struct kfd_dev so we only need to query it once. Signed-off-by: Philip Yang Signed-off-by: Felix Kuehling Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 13cd51a8f1ff77972912e42f30015a0c14e2e47d Author: Harish Kasiviswanathan Date: Thu Jun 22 16:40:28 2017 -0400 drm/amdgpu: Enable BAD_OPCODE intr for gfx8 This enables KFD_EVENT_TYPE_HW_EXCEPTION notifications to user mode in response to bad opcodes in a CP queue. Signed-off-by: Harish Kasiviswanathan Signed-off-by: Felix Kuehling Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 6d12aa874163cc8330c36dff05701cf7cbdff398 Author: Emily Deng Date: Thu Dec 14 09:31:01 2017 +0800 drm/amdkfd: KFD doesn't support TONGA SRIOV KFD module doesn't support TONGA SRIOV, if init KFD module in TONGA SRIOV environment, it will let compute ring IB test fail. Signed-off-by: Emily Deng Reviewed-by: Shaoyun.liu Signed-off-by: Felix Kuehling Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit d35f00d8eccfa943ca28f8da73b6bf94084cd1af Author: Eric Huang Date: Mon Jun 4 15:22:24 2018 -0400 drm/amdkfd: reflect atomic support in IO link properties Add the flags of properties according to Asic type and pcie capabilities. Signed-off-by: Eric Huang Signed-off-by: Felix Kuehling Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 7bb086cd0bb728613f20c906c26eddda14821377 Author: Andrey Grodzovsky Date: Fri Sep 21 15:41:52 2018 -0400 drm/amdgpu: Add warning message for INT SW fallback. Signed-off-by: Andrey Grodzovsky Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 8c5e13ec6a2c26d31d0551dc382661dc10823be0 Author: Andrey Grodzovsky Date: Fri Sep 21 14:48:50 2018 -0400 Revert "drm/amdgpu: remove fence fallback" This reverts commit 9b0df0937a852d299fbe42a5939c9a8a4cc83c55. This commit breaks KCQ IB test and S3 on Polaris 11. Signed-off-by: Andrey Grodzovsky Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit c95f75f4e86c1c0d867b76f2a134dbeac099cf89 Author: James Zhu Date: Thu Sep 13 16:55:44 2018 -0400 drm/amdgpu:No action when VCN PG state is unchanged When VCN PG state is unchanged, it is unnecessary to reset power gate state Signed-off-by: James Zhu Acked-by: Alex Deucher Acked-by: Christian König Signed-off-by: Alex Deucher commit 2faec55c4d972a87a420301ec9e4556c79ee8b54 Author: zhong jiang Date: Fri Sep 21 21:12:11 2018 +0800 drm/amd/display: remove redundant null pointer check before kfree kfree has taken the null pointer into account. hence it is safe to remove the redundant null pointer check before kfree. Signed-off-by: zhong jiang Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher commit 505f8dbb6a58873559ae38f2320f9bea4f3ab825 Author: Alex Deucher Date: Thu Sep 20 22:50:07 2018 -0500 drm/amdgpu: print smc feature mask in debugfs amdgpu_pm_info Print the enabled smc feature mask in amdgpu_pm_info for debugging. Reviewed-by: Rex Zhu Signed-off-by: Alex Deucher commit 39a8a0db838788bed487bea6e2276a3d0da76eea Author: Alex Deucher Date: Thu Sep 20 22:36:38 2018 -0500 drm/amdgpu: implement ENABLED_SMC_FEATURES_MASK sensor for vega20 So we can query what features are enabled for debugging. Reviewed-by: Rex Zhu Signed-off-by: Alex Deucher commit d152d373a6e4a302be4a7f803125750d59f301e6 Author: Alex Deucher Date: Thu Sep 20 22:36:23 2018 -0500 drm/amdgpu: implement ENABLED_SMC_FEATURES_MASK sensor for vega12 So we can query what features are enabled for debugging. Reviewed-by: Rex Zhu Signed-off-by: Alex Deucher commit 1f6c52ed09f28da249c00ebc55d112cf7c7f4dc7 Author: Alex Deucher Date: Thu Sep 20 22:34:42 2018 -0500 drm/amdgpu: implement ENABLED_SMC_FEATURES_MASK sensor for vega10 So we can query what features are enabled for debugging. Reviewed-by: Rex Zhu Signed-off-by: Alex Deucher commit e0c3d04747ee162f7eff5c14b5c4526ca6b9dc74 Author: Alex Deucher Date: Thu Sep 20 22:16:45 2018 -0500 drm/amdgpu: add new AMDGPU_PP_SENSOR_ENABLED_SMC_FEATURES_MASK sensor For getting the 64 bit enabled smc feature mask from vega parts. Reviewed-by: Rex Zhu Signed-off-by: Alex Deucher commit a476e925babedddd709b7a4fb5645f8a160b93bf Author: Alex Deucher Date: Thu Sep 20 21:17:17 2018 -0500 drm/amdgpu/powerplay: add smu smc_table_manager callback for vega20 For consistency with other asics. Reviewed-by: Rex Zhu Signed-off-by: Alex Deucher commit 68e841abf8fb9a9714924802145f27ac2b06db9d Author: Alex Deucher Date: Thu Sep 20 21:15:39 2018 -0500 drm/amdgpu/powerplay: add smu smc_table_manager callback for vega12 For consistency with other asics. Reviewed-by: Rex Zhu Signed-off-by: Alex Deucher commit 0b2c0a12cbb444a4dfbd5bb531cd927a33235cd7 Author: Alex Deucher Date: Thu Sep 20 20:50:54 2018 -0500 drm/amdgpu/powerplay: Move vega10_enable_smc_features to vega10_smumgr.c. For consistency with other vega parts. Reviewed-by: Rex Zhu Signed-off-by: Alex Deucher commit d498a6e1127b7cc8943582b7aea4c1fd170c56a5 Author: Alex Deucher Date: Thu Sep 20 20:33:08 2018 -0500 drm/amdgpu/powerplay: add get_argument callback for vega20 For consistency with other vega parts. Reviewed-by: Rex Zhu Signed-off-by: Alex Deucher commit 481f576c6c21bf0446eaa23623ef0262e9a5387c Author: Nicholas Kazlauskas Date: Wed Sep 12 08:55:42 2018 -0400 drm/amd/display: Raise dispclk value for dce120 by 15% [Why] The DISPCLK value was previously requested to be 15% higher for all ASICs that went through the dce110 bandwidth code path. As part of a refactoring of dce_clocks and the dce110 set bandwidth codepath this was removed for power saving considerations. That change caused display corruption under certain hardware configurations with Vega10. [How] The 15% DISPCLK increase is brought back but only on dce110 for now. This is should be a temporary workaround until the root cause is sorted out for why this occurs on Vega (or other ASICs, if reported). Tested-by: Nick Sarnie Signed-off-by: Nicholas Kazlauskas Reviewed-by: Harry Wentland Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 30049754ab7c4b6148dd3cd64af7d54850604582 Author: SivapiriyanKumarasamy Date: Wed Sep 12 14:15:42 2018 -0400 drm/amd/display: fix gamma not being applied [WHY] Previously night light forced a full update by applying a transfer function update regardless of if it was changed. This logic was removed, Now gamma surface updates are only applied when there is also a plane info update, this does not work in cases such as using the night light slider. [HOW] When moving the night light slider we will perform a full update if the gamma has changed and there is a surface, even when the surface has not changed. Also get stream updates in setgamma prior to update planes and stream. Signed-off-by: SivapiriyanKumarasamy Reviewed-by: Anthony Koo Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 77edbfd9c3438b13bb626faf3e2c6d9d5665417b Author: Leo Li Date: Wed Sep 12 10:58:09 2018 -0400 drm/amd/display: Remove mst_hotplug_work [Why] The work struct's schedule call was removed a while ago, making this useless. [How] Remove it. Signed-off-by: Leo Li Reviewed-by: David Francis Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit d999853e60a00596bb625ab34909cc9317c6dbae Author: Nicholas Kazlauskas Date: Tue Sep 11 14:29:47 2018 -0400 drm/amd/display: Guard against null stream dereference in do flip [Why] During suspend under some hardware configurations can result in a series of atomic commits with a NULL stream status - which causes a NULL pointer dereference. This should be guarded. [How] Exit early from the function - if we can't access the stream then there isn't anything that can be done here. Signed-off-by: Nicholas Kazlauskas Reviewed-by: Harry Wentland Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 99267ce71a1faabce9d8063d37e1ee7dd240b6eb Author: Eric Bernstein Date: Mon Sep 10 10:11:01 2018 -0400 drm/amd/display: Stereo 3D support in VSC [Why] Need to add strere 3D information in VSC [How] Update mod_build_vsc_infopacket with stereo info Signed-off-by: Eric Bernstein Reviewed-by: Charlene Liu Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 2806aca66d36e84a56ce35f3c0a9baaf0a468246 Author: Tony Cheng Date: Mon Sep 10 11:30:24 2018 -0400 drm/amd/display: dc 3.1.67 Signed-off-by: Tony Cheng Reviewed-by: Steven Chiu Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit fb2b1ea325b411262031435c951d189a75de94b9 Author: Su Sung Chung Date: Fri Sep 7 16:51:42 2018 -0400 drm/amd/display: program v_update and v_ready with proper field [WHY] There are two different variables used to calculate v_update and v_ready, one for validation and the other for performance parameter calculation. Before the variable for validation was used which caused underflow on 1080edp with vsr enabled [HOW] program v_update and v_ready with the variables for performance parameter calculation Signed-off-by: Su Sung Chung Reviewed-by: Dmytro Laktyushkin Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit c2791297013e531d1b7d8e17722bebec69386ab2 Author: SivapiriyanKumarasamy Date: Thu Aug 30 09:37:22 2018 -0400 drm/amd/display: Add color bit info to freesync infoframe Parse the native color bit and send it to freesync module for future use Signed-off-by: SivapiriyanKumarasamy Reviewed-by: Anthony Koo Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 5aa9935b6531dfe6ebdc1cacbc8d8a736620345f Author: Charlene Liu Date: Fri Sep 7 13:31:34 2018 -0400 drm/amd/display: add pp_smu NULL pointer check add pp_smu NULL ptr check Signed-off-by: Charlene Liu Reviewed-by: Dmytro Laktyushkin Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit a978f65765e2ccefb22eb77940685ae60c05ff6c Author: Samson Tam Date: Fri Sep 7 10:13:55 2018 -0400 drm/amd/display: use proper pipe_ctx index Use link->link_index as index to pipe_ctx[] to get proper link information instead of using index 0 to avoid potential miss matches. Signed-off-by: Samson Tam Reviewed-by: Anthony Koo Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit aa9c4abe466ac7cd4ab8e1d81b959c3d51173745 Author: Nikola Cornij Date: Thu Aug 16 14:27:11 2018 -0400 drm/amd/display: Refactor FPGA-specific link setup FPGA doesn't program backend, so we don't need certain link settings (audio stream for example). Signed-off-by: Nikola Cornij Reviewed-by: Tony Cheng Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 19a86c08510f5edf64745e4c090e89ea105a14cf Author: Rex Zhu Date: Tue Sep 18 20:30:36 2018 +0800 drm/amd/pp: Return error immediately if load firmware failed this can avoid hard hang and be useful for debug. Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher commit 0fb5da0a9b7b3a256eacf1ace2212ad2342a0728 Author: Rex Zhu Date: Tue Sep 18 18:07:54 2018 +0800 drm/amd/pp: Honour DC's clock limits on Rv Honour display's request for min engine clock/memory clock. Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher commit 40d0ebd98cba7c08e3acb28be98e5b012ed51476 Author: Rex Zhu Date: Fri Sep 14 11:32:52 2018 +0800 drm/amd/dc: Trigger set power state task when display configuration changes Revert "drm/amd/display: Remove call to amdgpu_pm_compute_clocks" This reverts commit dcd473770e86517543691bdb227103d6c781cd0a. when display configuration changes, dc need to update the changes to powerplay, also need to trigger a power state task. amdgpu_pm_compute_clocks is the interface to set power state task either dpm enabled or powerplay enabled Acked-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher commit bf78296ab1cb215d0609ac6cff4e43e941e51265 Merge: 18eb2f6e19d7 6bf4ca7fbc85 Author: Dave Airlie Date: Thu Sep 27 11:06:46 2018 +1000 BackMerge v4.19-rc5 into drm-next Sean Paul requested an -rc5 backmerge from some sun4i fixes. Signed-off-by: Dave Airlie commit 18eb2f6e19d77900695987e3a2b775cccbe5b84e Merge: 2e240beefe48 c932c4f831e6 Author: Dave Airlie Date: Thu Sep 27 11:00:06 2018 +1000 Merge tag 'drm-hisilicon-next-2018-09-26' of github.com:xin3liang/linux into drm-next - A crash fix founded in recent linux-next from John Garry - One sparse warning fix from Souptick Joarder - Some xxx_unref cleanup from Thomas Zimmermann Signed-off-by: Dave Airlie From: Xinliang Liu Link: https://patchwork.freedesktop.org/patch/msgid/CAGd==04mXPMjVZ3=cM8r+DSQNM6zy7Anc4T2OsHjZgSsazBTPQ@mail.gmail.com commit 2e240beefe48f011f8aaaeaae27536c0d6baa177 Merge: 36c9c3c91128 122702077e44 Author: Dave Airlie Date: Thu Sep 27 10:54:54 2018 +1000 Merge tag 'du-next-20180925' of git://linuxtv.org/pinchartl/media into drm-next R-Car DU support for the D3 and E3 SoCs (v4.20) Signed-off-by: Dave Airlie From: Laurent Pinchart Link: https://patchwork.freedesktop.org/patch/msgid/3289904.RCOHkcp7u8@avalon commit 689f7a7f5c9b23a4f3f69cbae3f8449bf4bc50c0 Author: Charles Keepax Date: Mon Sep 17 16:33:22 2018 +0100 mfd: arizona: Correct link for sound binding document Signed-off-by: Charles Keepax Signed-off-by: Rob Herring commit 483a5d22bceb2235628b6b9369b01cfca9a1317e Author: sim manseop Date: Thu Sep 13 10:45:36 2018 +0000 dt-bindings: i2c: Fix SMBus typo Fix typo 'SMbus' to 'SMBus' Signed-off-by: sim manseop Signed-off-by: Rob Herring commit 27ade939a169a70cab735f81d6dd9d223602c018 Author: Jonathan Cameron Date: Wed Sep 12 17:07:17 2018 +0100 dt-bindings: crypto: hip07-sec, drop incorrect commas There should not be a comma in the address used for the instance so drop them. This is a left over from a review of the final version before Herbert Xu picked the series up. Reported-by: Rob Herring Signed-off-by: Jonathan Cameron Fixes: 8f026dc887fe ("dt-bindings: Add bidnings for Hisilicon SEC crypto accelerators") Signed-off-by: Rob Herring commit 05ced0180c64dcfab9bf876589ed7627306acb97 Author: Alan Tull Date: Thu Sep 6 13:01:52 2018 -0500 dt-bindings: fpga: fix freeze controller compatible in region doc Documentation/devicetree/bindings/fpga/fpga-region.txt has an error regarding the freeze controller bridge, secifically: compatible = "altr,freeze-bridge"; The compatibility string should be "altr,freeze-bridge-controller" as set forth in altera-freeze-bridge.txt. Signed-off-by: Alan Tull Reported-by: Dalon Westergreen Acked-by: Moritz Fischer Signed-off-by: Rob Herring commit 8ef4645739c8fca4ee7440a74777b29dca60edc3 Author: Anson Huang Date: Thu Aug 30 16:05:25 2018 +0800 dt-bindings: reset: imx7: update the compatible string The i.MX7 SRC's compatible string should be "fsl,imx7d-src". Signed-off-by: Anson Huang Signed-off-by: Rob Herring commit 29e5f9441ba730d71cc0f0eda551940af53d2b77 Author: Vincent Guittot Date: Wed Aug 29 09:08:38 2018 +0200 dt-binding: arm/cpus.txt: fix dynamic-power-coefficient unit The unit of dynamic-power-coefficient is described as mW/MHz/uV^2 whereas its usage in the code assumes that unit is uW/MHz/V^2 In drivers/thermal/cpu_cooling.c, the code is : power = (u64)capacitance * freq_mhz * voltage_mv * voltage_mv; do_div(power, 1000000000); which can be summarized as : power (mW) = capacitance * freq_mhz/1000 * (voltage_mv/1000)^2 or power (mW) = (capacitance * freq_mhz * (voltage_mv/1000)^2) / 1000 then power (mW) = power (uW) / 1000 so power (uW) = capacitance * freq_mhz * (voltage_mv/1000)^2 Furthermore, if we test basic values like : voltage_mv = 1000mV = 1V freq_mhz = 1000Mhz The minimum possible power, when dynamic-power-coefficient equals 1, will be with current unit: min power = 1 * 1000 * (1000000)^2 = 10^15 mW which is not realistic With the unit used by the code, the min power is min power = 1 * 1000 * 1^2 = 1000uW = 1mW which is far more realistic Signed-off-by: Vincent Guittot Acked-by: Punit Agrawal Acked-by: Viresh Kumar Signed-off-by: Rob Herring commit c8b53d0c5eb89a5831b7a25f4bd5e742a85c293b Author: Alex Estrin Date: Wed Sep 26 10:02:32 2018 -0700 IB/sa: simplify return code logic for ib_nl_send_msg() rdma_nl_multicast() returns either negative error code or zero if succeeded. Remove unnecessary ret code checks and reassignments. Reviewed-by: Kaike Wan Signed-off-by: Alex Estrin Signed-off-by: Dennis Dalessandro Reviewed-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit e04951ebeefbad29455a6218187fe01e0f05b026 Author: Michael J. Ruhl Date: Wed Sep 26 10:02:22 2018 -0700 IB/hfi1: Move UnsupportedVL bits definitions to the correct header The UnsupportedVL SendCtrl register bit information is defined in the module rather than the chip register header file. Move the defines to the appropriate header file. Reviewed-by: Mike Marciniszyn Signed-off-by: Michael J. Ruhl Signed-off-by: Dennis Dalessandro Signed-off-by: Jason Gunthorpe commit 6e68c899e664f139cf72997dd1e3d8ebf34903bb Author: Colin Ian King Date: Wed Sep 26 13:26:08 2018 +0100 IB/mthca: remove redundant inner check of mdev->mthca_flags The inner check for mdev->mthca_flags & MTHCA_FLAG_MSI_X is redundant as this is already true because of the previous identical check in an outer if statement. Remove it Detected by cppcheck: (warning) Identical inner 'if' condition is always true. Signed-off-by: Colin Ian King Signed-off-by: Jason Gunthorpe commit c7c28191408bf33c1d9c83de1d5b91f58f1ddaf1 Author: Yixian Liu Date: Sun Sep 23 17:20:46 2018 +0800 RDMA/hns: Add MW support for hip08 This patch adds memory window (mw) support in the kernel space. Signed-off-by: Yixian Liu Signed-off-by: Jason Gunthorpe commit 986d413b7c156e69198dfc80fb74aa18d0ddef44 Author: Bart Van Assche Date: Wed Sep 26 14:01:10 2018 -0700 blk-mq: Enable support for runtime power management Now that the blk-mq core processes power management requests (marked with RQF_PREEMPT) in other states than RPM_ACTIVE, enable runtime power management for blk-mq. Signed-off-by: Bart Van Assche Reviewed-by: Ming Lei Reviewed-by: Christoph Hellwig Cc: Jianchao Wang Cc: Hannes Reinecke Cc: Johannes Thumshirn Cc: Alan Stern Signed-off-by: Jens Axboe commit 7cedffec8e759480f7f7a9be9cd0d7ebf0aafff2 Author: Bart Van Assche Date: Wed Sep 26 14:01:09 2018 -0700 block: Make blk_get_request() block for non-PM requests while suspended Instead of allowing requests that are not power management requests to enter the queue in runtime suspended status (RPM_SUSPENDED), make the blk_get_request() caller block. This change fixes a starvation issue: it is now guaranteed that power management requests will be executed no matter how many blk_get_request() callers are waiting. For blk-mq, instead of maintaining the q->nr_pending counter, rely on q->q_usage_counter. Call pm_runtime_mark_last_busy() every time a request finishes instead of only if the queue depth drops to zero. Signed-off-by: Bart Van Assche Reviewed-by: Ming Lei Reviewed-by: Christoph Hellwig Cc: Jianchao Wang Cc: Hannes Reinecke Cc: Johannes Thumshirn Cc: Alan Stern Signed-off-by: Jens Axboe commit bdd6316094e0370cd183bc979dd7e322b68dc993 Author: Bart Van Assche Date: Wed Sep 26 14:01:08 2018 -0700 block: Allow unfreezing of a queue while requests are in progress A later patch will call blk_freeze_queue_start() followed by blk_mq_unfreeze_queue() without waiting for q_usage_counter to drop to zero. Make sure that this doesn't cause a kernel warning to appear by switching from percpu_ref_reinit() to percpu_ref_resurrect(). The former namely requires that the refcount it operates on is zero. Signed-off-by: Bart Van Assche Reviewed-by: Ming Lei Reviewed-by: Christoph Hellwig Cc: Jianchao Wang Cc: Hannes Reinecke Cc: Johannes Thumshirn Signed-off-by: Jens Axboe commit 18c9a6bbe0645a05172a900740b9d2d379d54320 Author: Bart Van Assche Date: Wed Sep 26 14:01:07 2018 -0700 percpu-refcount: Introduce percpu_ref_resurrect() This function will be used in a later patch to switch the struct request_queue q_usage_counter from killed back to live. In contrast to percpu_ref_reinit(), this new function does not require that the refcount is zero. Signed-off-by: Bart Van Assche Acked-by: Tejun Heo Reviewed-by: Ming Lei Cc: Christoph Hellwig Cc: Jianchao Wang Cc: Hannes Reinecke Cc: Johannes Thumshirn Signed-off-by: Jens Axboe commit 0d25bd072b494a0290a7855a2e0286c4a0c92041 Author: Bart Van Assche Date: Wed Sep 26 14:01:06 2018 -0700 block: Schedule runtime resume earlier Instead of scheduling runtime resume of a request queue after a request has been queued, schedule asynchronous resume during request allocation. The new pm_request_resume() calls occur after blk_queue_enter() has increased the q_usage_counter request queue member. This change is needed for a later patch that will make request allocation block while the queue status is not RPM_ACTIVE. Signed-off-by: Bart Van Assche Reviewed-by: Ming Lei Reviewed-by: Christoph Hellwig Cc: Jianchao Wang Cc: Hannes Reinecke Cc: Johannes Thumshirn Cc: Alan Stern Signed-off-by: Jens Axboe commit 154b00d566e221152514ba8259f38b21571081ef Author: Bart Van Assche Date: Wed Sep 26 14:01:05 2018 -0700 block: Split blk_pm_add_request() and blk_pm_put_request() Move the pm_request_resume() and pm_runtime_mark_last_busy() calls into two new functions and thereby separate legacy block layer code from code that works for both the legacy block layer and blk-mq. A later patch will add calls to the new functions in the blk-mq code. Signed-off-by: Bart Van Assche Reviewed-by: Ming Lei Reviewed-by: Christoph Hellwig Cc: Martin K. Petersen Cc: Jianchao Wang Cc: Hannes Reinecke Cc: Johannes Thumshirn Cc: Alan Stern Signed-off-by: Jens Axboe commit cd84a62e0078dce09f4ed349bec84f86c9d54b30 Author: Bart Van Assche Date: Wed Sep 26 14:01:04 2018 -0700 block, scsi: Change the preempt-only flag into a counter The RQF_PREEMPT flag is used for three purposes: - In the SCSI core, for making sure that power management requests are executed even if a device is in the "quiesced" state. - For domain validation by SCSI drivers that use the parallel port. - In the IDE driver, for IDE preempt requests. Rename "preempt-only" into "pm-only" because the primary purpose of this mode is power management. Since the power management core may but does not have to resume a runtime suspended device before performing system-wide suspend and since a later patch will set "pm-only" mode as long as a block device is runtime suspended, make it possible to set "pm-only" mode from more than one context. Since with this change scsi_device_quiesce() is no longer idempotent, make that function return early if it is called for a quiesced queue. Signed-off-by: Bart Van Assche Acked-by: Martin K. Petersen Reviewed-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Reviewed-by: Ming Lei Cc: Jianchao Wang Cc: Johannes Thumshirn Cc: Alan Stern Signed-off-by: Jens Axboe commit bca6b067b0b269a7b8ba129e2a918309ca8b4a55 Author: Bart Van Assche Date: Wed Sep 26 14:01:03 2018 -0700 block: Move power management code into a new source file Move the code for runtime power management from blk-core.c into the new source file blk-pm.c. Move the corresponding declarations from into . For CONFIG_PM=n, leave out the declarations of the functions that are not used in that mode. This patch not only reduces the number of #ifdefs in the block layer core code but also reduces the size of header file and hence should help to reduce the build time of the Linux kernel if CONFIG_PM is not defined. Signed-off-by: Bart Van Assche Reviewed-by: Ming Lei Reviewed-by: Christoph Hellwig Cc: Jianchao Wang Cc: Hannes Reinecke Cc: Johannes Thumshirn Cc: Alan Stern Signed-off-by: Jens Axboe commit edaa978e52c5928edd16905c8f3ef06e5b90e310 Author: Paul Burton Date: Wed Sep 26 14:06:21 2018 -0700 MIPS: MT: Remove obsolete cache flush repeat code In much the same vein as commit ac41f9c46282 ("MIPS: Remove a temporary hack for debugging cache flushes in SMTC configuration") and commit eb75ecb113f5 ("MIPS: MT: Remove unused MT single-threaded cache flush code"), remove the long obsolete ndflush & niflush command line arguments which provided a hack that should not be useful outside of debug sessions performed long ago. Signed-off-by: Paul Burton commit 8320deb88c03a842f8c2db92e2b4a86d2bb6df76 Author: Lijun Ou Date: Sat Sep 22 16:21:08 2018 +0800 RDMA/hns: Add enable judgement for UD vlan According to the hardware modification, the vlan of the UD packet is based on the ud_vlan_en field of the UD wqe to determine whether to add a vlan header to the UD packet. The ud_vlan_en field is filled by the driver according to the net device. Signed-off-by: Lijun Ou Signed-off-by: Jason Gunthorpe commit 944e64093a63bfab0a4f7ecebcd434630dff9107 Author: Lijun Ou Date: Sat Sep 22 16:21:07 2018 +0800 RDMA/hns: Add CM of vlan device support This patch mainly sets the vlan_id field in the WC for rdma_listen() to work over vlan. This is required by ib_init_ah_attr_from_wc() which is called by the CM REQ handler. Signed-off-by: Lijun Ou Signed-off-by: Jason Gunthorpe commit 384f881851127dd834a2733f91999b859a5ffddb Author: Lijun Ou Date: Sat Sep 22 16:21:06 2018 +0800 RDMA/hns: Add atomic support This patch adds atomic operations for hip08, includes fetchadd and cmpswap operation. In order to enable atomic, the driver needs to do the following steps: 1. Enable the atomic caps for RoCE device 2. Post the wqe context of atomic type 3. Configure the atomic type of mtpt Signed-off-by: Lijun Ou Signed-off-by: Jason Gunthorpe commit b9c1ea40e8bbd2ce8bf975ec9cf42817021cadb6 Author: Lijun Ou Date: Sat Sep 22 16:21:05 2018 +0800 RDMA/hns: Refactor the codes for setting transport opode Currently the transport opcodes which come from users configuration is set by similar code. This patch simplifies it. Signed-off-by: Lijun Ou Signed-off-by: Jason Gunthorpe commit eb75ecb113f5804a83967b943f29c1024a157087 Author: Paul Burton Date: Wed Sep 26 13:56:51 2018 -0700 MIPS: MT: Remove unused MT single-threaded cache flush code Commit ac41f9c46282 ("MIPS: Remove a temporary hack for debugging cache flushes in SMTC configuration") removed an ugly hack that allowed cache flushing to be performed single-threaded, something which should not be necessary outside of debug sessions performed long ago. Whilst the hack was removed from the cache flush code itself, the mt_protdflush & mt_protiflush variables were left behind along with code providing the protdflush & protiflush command line arguments. The mt_cflush_lockdown() & mt_cflush_release() functions were also left behind but are now entirely unused. Remove all the unused code to complete the removal of the MT ASE single-threaded cache flush hack. Signed-off-by: Paul Burton commit 932afdeec18b137b1f9c940bf18ca90338cb3f96 Author: Yasha Cherikovsky Date: Wed Sep 26 14:16:15 2018 +0300 MIPS: Add Kconfig variable for CPUs with unaligned load/store instructions MIPSR6 CPUs do not support unaligned load/store instructions (LWL, LWR, SWL, SWR and LDL, LDR, SDL, SDR for 64bit). Currently the MIPS tree has some special cases to avoid these instructions, and the code is testing for !CONFIG_CPU_MIPSR6. This patch declares a new Kconfig variable: CONFIG_CPU_HAS_LOAD_STORE_LR. This variable indicates that the CPU supports these instructions. Then, the patch does the following: - Carefully selects this option on all CPUs except MIPSR6. - Switches all the special cases to test for the new variable, and inverts the logic: '#ifndef CONFIG_CPU_MIPSR6' turns into '#ifdef CONFIG_CPU_HAS_LOAD_STORE_LR' and vice-versa. Also, when this variable is NOT selected (e.g. MIPSR6), CONFIG_GENERIC_CSUM will default to 'y', to compile generic C checksum code (instead of special assembly code that uses the unsupported instructions). This commit should not affect any existing CPU, and is required for future Lexra CPU support, that misses these instructions too. Signed-off-by: Yasha Cherikovsky Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/20808/ Cc: Ralf Baechle Cc: Paul Burton Cc: James Hogan Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org commit a74c0aa524050e5fd6c275a153b1f37283f6e37c Author: Thomas Zimmermann Date: Wed Sep 26 13:43:12 2018 +0200 drm/fsl-dcu: 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: Stefan Agner Link: https://patchwork.freedesktop.org/patch/msgid/20180926114312.23097-1-tzimmermann@suse.de commit 3b9356194d878f5bc0b4d0b9e8419f449a16e5b5 Author: Stefan Agner Date: Wed Sep 26 14:50:34 2018 +0200 MAINTAINERS: Move fsl-dcu driver to drm-misc tree The driver is mostly in maintenance mode. Using drm-misc is a good fit and should make maintenance a bit easier. Signed-off-by: Stefan Agner Acked-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20180926125034.4095-1-stefan@agner.ch commit 9f19fd3bd894d694bfb4a352d649bd972ff7e43b Author: Leonard Crestez Date: Mon Sep 17 16:42:15 2018 +0300 drm/mxsfb: Switch to drm_atomic_helper_commit_tail_rpm The lcdif block is only powered on when display is active so plane updates when not enabled are not valid. Writing to an unpowered IP block is mostly ignored but can trigger bus errors on some chips. Prevent this situation by switching to drm_atomic_helper_commit_tail_rpm and having the drm core ensure atomic_plane_update is only called while the crtc is active. This avoids having to keep track of "enabled" bits inside the mxsfb driver. This also requires handling the vblank event for disable from mxsfb_pipe_disable. Signed-off-by: Leonard Crestez Suggested-by: Stefan Agner Reviewed-by: Stefan Agner Reviewed-by: Sean Paul Signed-off-by: Stefan Agner Link: https://patchwork.freedesktop.org/patch/msgid/c19c0c00ed42e8e8f7965aa4821ac295abc5cd05.1537191359.git.leonard.crestez@nxp.com commit f0525a1c922eefe8cb1a23a026ea90bad400797e Author: Leonard Crestez Date: Mon Sep 17 16:42:14 2018 +0300 drm/mxsfb: Add PM_SLEEP support Since power to the lcdif block can be lost on suspend implement PM_SLEEP_OPS using drm_mode_config_helper_suspend/resume to save/restore the current mode. Signed-off-by: Leonard Crestez Reviewed-by: Stefan Agner Reviewed-by: Sean Paul Signed-off-by: Stefan Agner Link: https://patchwork.freedesktop.org/patch/msgid/cfa1a4083eefd112362e640deeb2e120584ac3f5.1537191359.git.leonard.crestez@nxp.com commit 4201f4e8484509499a40feb9fd6a6642f453f61e Author: Leonard Crestez Date: Mon Sep 17 16:42:13 2018 +0300 drm/mxsfb: Add pm_runtime calls to pipe_enable/disable Adding lcdif nodes to a power domain currently results in black/corrupted screens or hangs because power is not correctly enabled when required. Ensure power is on when display is active by adding pm_runtime_get/put_sync to mxsfb_pipe_enable/disable. Signed-off-by: Leonard Crestez Reviewed-by: Stefan Agner Reviewed-by: Sean Paul Signed-off-by: Stefan Agner Link: https://patchwork.freedesktop.org/patch/msgid/ee88148399c63494cda4129b05444b0ac331b7a7.1537191359.git.leonard.crestez@nxp.com commit 2dc3620eac2df1545bc4a4b9110dcc7961c24a50 Author: Leonard Crestez Date: Mon Sep 17 16:42:12 2018 +0300 drm/mxsfb: Fix initial corrupt frame when activating display LCDIF will repeatedly display data from CUR_BUF and set CUR_BUF to NEXT_BUF when done. Since we are only ever writing to NEXT_BUF the display will show an initial corrupt frame. Fix by writing the FB paddr to both CUR_BUF and NEXT_BUF when activating the CRTC. Signed-off-by: Leonard Crestez Tested-by: Philipp Zabel Reviewed-by: Stefan Agner Reviewed-by: Sean Paul Signed-off-by: Stefan Agner Link: https://patchwork.freedesktop.org/patch/msgid/7cdac9c064cc2b8a3d237934f186da98cefe6cb3.1537191359.git.leonard.crestez@nxp.com commit 626a2c52f1050b4581a0ffcd71245505b24315a2 Author: Leonard Crestez Date: Mon Sep 17 16:42:11 2018 +0300 drm/mxsfb: Move axi clk enable/disable to crtc enable/disable The main axi clk is disabled at the end of mxsfb_crtc_mode_set_nofb and immediately reenabled in mxsfb_enable_controller. Avoid this by moving the handling of axi clk one level up to mxsfb_crtc_enable. Do the same for mxsfb_crtc_disable for symmetry. This shouldn't have any functional effect. Signed-off-by: Leonard Crestez Reviewed-by: Stefan Agner Reviewed-by: Sean Paul Signed-off-by: Stefan Agner Link: https://patchwork.freedesktop.org/patch/msgid/985c1f1cad250bd9ca154b3e4b3f913c310eeabd.1537191359.git.leonard.crestez@nxp.com commit 6c8541118bd53bc90b6c2473e289e5541de80376 Author: Jason Gunthorpe Date: Thu Sep 20 16:42:27 2018 -0600 RDMA/ulp: Use dev_name instead of ibdev->name These return the same thing but dev_name is a more conventional use of the kernel API. Signed-off-by: Jason Gunthorpe Reviewed-by: Steve Wise Reviewed-by: Sagi Grimberg Reviewed-by: Dennis Dalessandro commit 9de6986148360bdc954e8621cf024f4c830ddb13 Author: Jason Gunthorpe Date: Thu Sep 20 16:42:26 2018 -0600 RDMA/drivers: Use dev_name instead of ibdev->name These return the same thing but dev_name is a more conventional use of the kernel API. Signed-off-by: Jason Gunthorpe Reviewed-by: Leon Romanovsky commit 896de0090a85f4c3a2b37fc0f46215a73c5b5429 Author: Jason Gunthorpe Date: Thu Sep 20 16:42:25 2018 -0600 RDMA/core: Use dev_name instead of ibdev->name These return the same thing but dev_name is a more conventional use of the kernel API. Signed-off-by: Jason Gunthorpe Reviewed-by: Steve Wise Reviewed-by: Leon Romanovsky Reviewed-by: Dennis Dalessandro commit 5a738b5d47050b77ac8aa90bd79429940533ef6a Author: Jason Gunthorpe Date: Thu Sep 20 16:42:24 2018 -0600 RDMA/drivers: Use dev_err/dbg/etc instead of pr_* + ibdev->name Kernel convention is that a driver for a subsystem will print using dev_* on the subsystem's struct device, or with dev_* on the physical device. Drivers should rarely use a pr_* function. Signed-off-by: Jason Gunthorpe commit 43c7c851b9bce9e6091f2c882871a3b388aa38c3 Author: Jason Gunthorpe Date: Thu Sep 20 16:42:23 2018 -0600 RDMA/core: Use dev_err/dbg/etc instead of pr_* + ibdev->name Any messages related to a device should be printed with the dev_* formatters. This provides greater consistency for the user. The core does not set pr_fmt so this has no significant change. Signed-off-by: Jason Gunthorpe Reviewed-by: Steve Wise Reviewed-by: Leon Romanovsky Reviewed-by: Dennis Dalessandro commit e349f858d29f300ad9ad327fd57735a1d15e147f Author: Jason Gunthorpe Date: Tue Sep 25 16:58:09 2018 -0600 RDMA: Fully setup the device name in ib_register_device The current code has two copies of the device name, ibdev->dev and dev_name(&ibdev->dev), and they are setup at different times, which is very confusing. Set them both up at the same time and make dev_name() the lead name, which is the proper use of the driver core APIs. To make it very clear that the name is not valid until registration pass it in to the ib_register_device() call rather than messing with ibdev->name directly. Also the reorganization now checks that dev_name is unique even if it does not contain a %. Signed-off-by: Jason Gunthorpe Acked-by: Adit Ranadive Reviewed-by: Steve Wise Acked-by: Devesh Sharma Reviewed-by: Shiraz Saleem Reviewed-by: Leon Romanovsky Reviewed-by: Dennis Dalessandro Reviewed-by: Michael J. Ruhl commit 46bdf777685677c1cc6b3da9220aace9da690731 Author: Arnd Bergmann Date: Wed Sep 26 21:36:52 2018 +0200 RDMA: Fix dependencies for rdma_user_mmap_io The mlx4 driver produces a link error when it is configured as built-in while CONFIG_INFINIBAND_USER_ACCESS is set to =m: drivers/infiniband/hw/mlx4/main.o: In function `mlx4_ib_mmap': main.c:(.text+0x1af4): undefined reference to `rdma_user_mmap_io' The same function is called from mlx5, which already has a dependency to ensure we can call it, and from hns, which appears to suffer from the same problem. This adds the same dependency that mlx5 uses to the other two. Fixes: 6745d356ab39 ("RDMA/hns: Use rdma_user_mmap_io") Fixes: c282da4109e4 ("RDMA/mlx4: Use rdma_user_mmap_io") Signed-off-by: Arnd Bergmann Signed-off-by: Jason Gunthorpe commit 4a1728cad6340bfbe17bd17fd158b2165cd99508 Author: Chao Yu Date: Tue Sep 25 15:36:03 2018 +0800 f2fs: mark inode dirty explicitly in recover_inode() Mark inode dirty explicitly in the end of recover_inode() to make sure that all recoverable fields can be persisted later. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 5cd1f387a13b5188b4edb4c834310302a85a6ea2 Author: Chao Yu Date: Tue Sep 25 15:36:01 2018 +0800 f2fs: fix to recover inode's crtime during POR Testcase to reproduce this bug: 1. mkfs.f2fs -O extra_attr -O inode_crtime /dev/sdd 2. mount -t f2fs /dev/sdd /mnt/f2fs 3. touch /mnt/f2fs/file 4. xfs_io -f /mnt/f2fs/file -c "fsync" 5. godown /mnt/f2fs 6. umount /mnt/f2fs 7. mount -t f2fs /dev/sdd /mnt/f2fs 8. xfs_io -f /mnt/f2fs/file -c "statx -r" stat.btime.tv_sec = 0 stat.btime.tv_nsec = 0 This patch fixes to recover inode creation time fields during mount. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 7de36cf3e4087207f42a88992f8cb615a1bd902e Author: Chao Yu Date: Tue Sep 25 15:36:00 2018 +0800 f2fs: fix to recover inode's i_gc_failures during POR inode.i_gc_failures is used to indicate that skip count of migrating on blocks of inode, we should guarantee it can be recovered in sudden power-off case. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 19c73a691ccf6fb2f12d4e9cf9830023966cec88 Author: Chao Yu Date: Tue Sep 25 15:35:59 2018 +0800 f2fs: fix to recover inode's i_flags during POR Testcase to reproduce this bug: 1. mkfs.f2fs /dev/sdd 2. mount -t f2fs /dev/sdd /mnt/f2fs 3. touch /mnt/f2fs/file 4. sync 5. chattr +A /mnt/f2fs/file 6. xfs_io -f /mnt/f2fs/file -c "fsync" 7. godown /mnt/f2fs 8. umount /mnt/f2fs 9. mount -t f2fs /dev/sdd /mnt/f2fs 10. lsattr /mnt/f2fs/file -----------------N- /mnt/f2fs/file But actually, we expect the corrct result is: -------A---------N- /mnt/f2fs/file The reason is we didn't recover inode.i_flags field during mount, fix it. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit f4474aa6e5e901ee4af21f39f1b9115aaaaec503 Author: Chao Yu Date: Tue Sep 25 15:35:58 2018 +0800 f2fs: fix to recover inode's project id during POR Testcase to reproduce this bug: 1. mkfs.f2fs -O extra_attr -O project_quota /dev/sdd 2. mount -t f2fs /dev/sdd /mnt/f2fs 3. touch /mnt/f2fs/file 4. sync 5. chattr -p 1 /mnt/f2fs/file 6. xfs_io -f /mnt/f2fs/file -c "fsync" 7. godown /mnt/f2fs 8. umount /mnt/f2fs 9. mount -t f2fs /dev/sdd /mnt/f2fs 10. lsattr -p /mnt/f2fs/file 0 -----------------N- /mnt/f2fs/file But actually, we expect the correct result is: 1 -----------------N- /mnt/f2fs/file The reason is we didn't recover inode.i_projid field during mount, fix it. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 0a4daae5ffea39f5015334e4d18a6a80b447cae4 Author: Jaegeuk Kim Date: Wed Sep 19 15:28:40 2018 -0700 f2fs: update i_size after DIO completion This is related to ee70daaba82d ("xfs: update i_size after unwritten conversion in dio completion") If we update i_size during dio_write, dio_read can read out stale data, which breaks xfstests/465. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit d83d0f5ba8532e649146ac32ae47167a28d98c84 Author: Jaegeuk Kim Date: Mon Sep 17 13:25:04 2018 -0700 f2fs: report ENOENT correctly in f2fs_rename This fixes wrong error report in f2fs_rename. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit bfcb79fca19d267712e425af1dd48812c40dec0c Author: Keith Busch Date: Thu Sep 20 10:27:13 2018 -0600 PCI/ERR: Run error recovery callbacks for all affected devices If an Endpoint reported an error with ERR_FATAL, we previously ran driver error recovery callbacks only for the Endpoint's driver. But if we reset a Link to recover from the error, all downstream components are affected, including the Endpoint, any multi-function peers, and children of those peers. Initiate the Link reset from the deepest Downstream Port that is reliable, and call the error recovery callbacks for all its children. If a Downstream Port (including a Root Port) reports an error, we assume the Port itself is reliable and we need to reset its downstream Link. In all other cases (Switch Upstream Ports, Endpoints, Bridges, etc), we assume the Link leading to the component needs to be reset, so we initiate the reset at the parent Downstream Port. This allows two other clean-ups. First, we currently only use a Link reset, which can only be initiated using a Downstream Port, so we can remove checks for Endpoints. Second, the Downstream Port where we initiate the Link reset is reliable (unlike components downstream from it), so the special cases for error detect and resume are no longer necessary. Signed-off-by: Keith Busch [bhelgaas: changelog] Signed-off-by: Bjorn Helgaas Reviewed-by: Sinan Kaya commit bdb5ac85777de67c909c9ad4327f03f7648b543f Author: Keith Busch Date: Thu Sep 20 10:27:12 2018 -0600 PCI/ERR: Handle fatal error recovery We don't need to be paranoid about the topology changing while handling an error. If the device has changed in a hotplug capable slot, we can rely on the presence detection handling to react to a changing topology. Restore the fatal error handling behavior that existed before merging DPC with AER with 7e9084b36740 ("PCI/AER: Handle ERR_FATAL with removal and re-enumeration of devices"). Signed-off-by: Keith Busch Signed-off-by: Bjorn Helgaas Reviewed-by: Sinan Kaya commit 42104598ef2e8c3ce532ebec891c9edec161e508 Author: Tony Krowiak Date: Tue Sep 25 19:16:25 2018 -0400 KVM: s390: interface to clear CRYCB masks Introduces a new KVM function to clear the APCB0 and APCB1 in the guest's CRYCB. This effectively clears all bits of the APM, AQM and ADM masks configured for the guest. The VCPUs are taken out of SIE to ensure the VCPUs do not get out of sync. Signed-off-by: Tony Krowiak Acked-by: Halil Pasic Tested-by: Michael Mueller Tested-by: Farhan Ali Tested-by: Pierre Morel Reviewed-by: Cornelia Huck Message-Id: <20180925231641.4954-11-akrowiak@linux.vnet.ibm.com> Signed-off-by: Christian Borntraeger commit 81b2b4b76a733ee479af359db59e1c91e3aad4cd Author: Tony Krowiak Date: Tue Sep 25 19:16:24 2018 -0400 s390: vfio-ap: sysfs interface to view matrix mdev matrix Provides a sysfs interface to view the AP matrix configured for the mediated matrix device. The relevant sysfs structures are: /sys/devices/vfio_ap/matrix/ ...... [mdev_supported_types] ......... [vfio_ap-passthrough] ............ [devices] ...............[$uuid] .................. matrix To view the matrix configured for the mediated matrix device, print the matrix file: cat matrix Below are examples of the output from the above command: Example 1: Adapters and domains assigned Assignments: Adapters 5 and 6 Domains 4 and 71 (0x47) Output 05.0004 05.0047 06.0004 06.0047 Examples 2: Only adapters assigned Assignments: Adapters 5 and 6 Output: 05. 06. Examples 3: Only domains assigned Assignments: Domains 4 and 71 (0x47) Output: .0004 .0047 Signed-off-by: Tony Krowiak Reviewed-by: Halil Pasic Reviewed-by: Cornelia Huck Tested-by: Michael Mueller Tested-by: Farhan Ali Tested-by: Pierre Morel Message-Id: <20180925231641.4954-10-akrowiak@linux.vnet.ibm.com> Signed-off-by: Christian Borntraeger commit 3b1eab7fb9da69c9af129058ed5aebb93d40d623 Author: Tony Krowiak Date: Tue Sep 25 19:16:23 2018 -0400 s390: vfio-ap: sysfs interfaces to configure control domains Provides the sysfs interfaces for: 1. Assigning AP control domains to the mediated matrix device 2. Unassigning AP control domains from a mediated matrix device 3. Displaying the control domains assigned to a mediated matrix device The IDs of the AP control domains assigned to the mediated matrix device are stored in an AP domain mask (ADM). The bits in the ADM, from most significant to least significant bit, correspond to AP domain numbers 0 to 255. On some systems, the maximum allowable domain number may be less than 255 - depending upon the host's AP configuration - and assignment may be rejected if the input domain ID exceeds the limit. When a control domain is assigned, the bit corresponding its domain ID will be set in the ADM. Likewise, when a domain is unassigned, the bit corresponding to its domain ID will be cleared in the ADM. The relevant sysfs structures are: /sys/devices/vfio_ap/matrix/ ...... [mdev_supported_types] ......... [vfio_ap-passthrough] ............ [devices] ...............[$uuid] .................. assign_control_domain .................. unassign_control_domain To assign a control domain to the $uuid mediated matrix device's ADM, write its domain number to the assign_control_domain file. To unassign a domain, write its domain number to the unassign_control_domain file. The domain number is specified using conventional semantics: If it begins with 0x the number will be parsed as a hexadecimal (case insensitive) number; if it begins with 0, it is parsed as an octal number; otherwise, it will be parsed as a decimal number. For example, to assign control domain 173 (0xad) to the mediated matrix device $uuid: echo 173 > assign_control_domain or echo 0255 > assign_control_domain or echo 0xad > assign_control_domain To unassign control domain 173 (0xad): echo 173 > unassign_control_domain or echo 0255 > unassign_control_domain or echo 0xad > unassign_control_domain The assignment will be rejected if the APQI exceeds the maximum value for an AP domain: * If the AP Extended Addressing (APXA) facility is installed, the max value is 255 * Else the max value is 15 Signed-off-by: Tony Krowiak Reviewed-by: Halil Pasic Reviewed-by: Cornelia Huck Tested-by: Michael Mueller Tested-by: Farhan Ali Tested-by: Pierre Morel Message-Id: <20180925231641.4954-9-akrowiak@linux.vnet.ibm.com> Signed-off-by: Christian Borntraeger commit 3211da0c0b549f18d7b049abcffc73ca55ae51fd Author: Tony Krowiak Date: Tue Sep 25 19:16:22 2018 -0400 s390: vfio-ap: sysfs interfaces to configure domains Introduces two new sysfs attributes for the VFIO mediated matrix device for assigning AP domains to and unassigning AP domains from a mediated matrix device. The IDs of the AP domains assigned to the mediated matrix device will be stored in an AP queue mask (AQM). The bits in the AQM, from most significant to least significant bit, correspond to AP queue index (APQI) 0 to 255 (note that an APQI is synonymous with with a domain ID). On some systems, the maximum allowable domain number may be less than 255 - depending upon the host's AP configuration - and assignment may be rejected if the input domain ID exceeds the limit. When a domain is assigned, the bit corresponding to the APQI will be set in the AQM. Likewise, when a domain is unassigned, the bit corresponding to the APQI will be cleared from the AQM. In order to successfully assign a domain, the APQNs derived from the domain ID being assigned and the adapter numbers of all adapters previously assigned: 1. Must be bound to the vfio_ap device driver. 2. Must not be assigned to any other mediated matrix device. If there are no adapters assigned to the mdev, then there must be an AP queue bound to the vfio_ap device driver with an APQN containing the domain ID (i.e., APQI), otherwise all adapters subsequently assigned will fail because there will be no AP queues bound with an APQN containing the APQI. Assigning or un-assigning an AP domain will also be rejected if a guest using the mediated matrix device is running. The relevant sysfs structures are: /sys/devices/vfio_ap/matrix/ ...... [mdev_supported_types] ......... [vfio_ap-passthrough] ............ [devices] ...............[$uuid] .................. assign_domain .................. unassign_domain To assign a domain to the $uuid mediated matrix device, write the domain's ID to the assign_domain file. To unassign a domain, write the domain's ID to the unassign_domain file. The ID is specified using conventional semantics: If it begins with 0x, the number will be parsed as a hexadecimal (case insensitive) number; if it begins with 0, it will be parsed as an octal number; otherwise, it will be parsed as a decimal number. For example, to assign domain 173 (0xad) to the mediated matrix device $uuid: echo 173 > assign_domain or echo 0255 > assign_domain or echo 0xad > assign_domain To unassign domain 173 (0xad): echo 173 > unassign_domain or echo 0255 > unassign_domain or echo 0xad > unassign_domain Signed-off-by: Tony Krowiak Reviewed-by: Halil Pasic Reviewed-by: Cornelia Huck Tested-by: Michael Mueller Tested-by: Farhan Ali Tested-by: Pierre Morel Message-Id: <20180925231641.4954-8-akrowiak@linux.vnet.ibm.com> Signed-off-by: Christian Borntraeger commit 96d152bdc987ad76da49be350dc9f8ab1647e801 Author: Tony Krowiak Date: Tue Sep 25 19:16:21 2018 -0400 s390: vfio-ap: sysfs interfaces to configure adapters Introduces two new sysfs attributes for the VFIO mediated matrix device for assigning AP adapters to and unassigning AP adapters from a mediated matrix device. The IDs of the AP adapters assigned to the mediated matrix device will be stored in an AP mask (APM). The bits in the APM, from most significant to least significant bit, correspond to AP adapter IDs (APID) 0 to 255. On some systems, the maximum allowable adapter number may be less than 255 - depending upon the host's AP configuration - and assignment may be rejected if the input adapter ID exceeds the limit. When an adapter is assigned, the bit corresponding to the APID will be set in the APM. Likewise, when an adapter is unassigned, the bit corresponding to the APID will be cleared from the APM. In order to successfully assign an adapter, the APQNs derived from the adapter ID being assigned and the queue indexes of all domains previously assigned: 1. Must be bound to the vfio_ap device driver. 2. Must not be assigned to any other mediated matrix device If there are no domains assigned to the mdev, then there must be an AP queue bound to the vfio_ap device driver with an APQN containing the APID, otherwise all domains subsequently assigned will fail because there will be no AP queues bound with an APQN containing the adapter ID. Assigning or un-assigning an AP adapter will be rejected if a guest using the mediated matrix device is running. The relevant sysfs structures are: /sys/devices/vfio_ap/matrix/ ...... [mdev_supported_types] ......... [vfio_ap-passthrough] ............ [devices] ...............[$uuid] .................. assign_adapter .................. unassign_adapter To assign an adapter to the $uuid mediated matrix device's APM, write the APID to the assign_adapter file. To unassign an adapter, write the APID to the unassign_adapter file. The APID is specified using conventional semantics: If it begins with 0x the number will be parsed as a hexadecimal number; if it begins with a 0 the number will be parsed as an octal number; otherwise, it will be parsed as a decimal number. For example, to assign adapter 173 (0xad) to the mediated matrix device $uuid: echo 173 > assign_adapter or echo 0xad > assign_adapter or echo 0255 > assign_adapter To unassign adapter 173 (0xad): echo 173 > unassign_adapter or echo 0xad > unassign_adapter or echo 0255 > unassign_adapter Signed-off-by: Tony Krowiak Reviewed-by: Halil Pasic Tested-by: Michael Mueller Tested-by: Farhan Ali Tested-by: Pierre Morel Reviewed-by: Cornelia Huck Message-Id: <20180925231641.4954-7-akrowiak@linux.vnet.ibm.com> Signed-off-by: Christian Borntraeger commit 1a091d16dbff6d373c5335e08316756e6c39f048 Author: Alexander Duyck Date: Tue Sep 25 13:53:07 2018 -0700 libnvdimm: Set device node in nd_device_register This change makes it so that we don't repeatedly overwrite the device node for nvdimm regions. The earliest we can set the node is immediately after calling device init, so I have moved the code there so we can avoid rewriting the node with each uevent. Signed-off-by: Alexander Duyck Signed-off-by: Dan Williams commit b6eae0f61db27748606cc00dafcfd1e2c032f0a5 Author: Alexander Duyck Date: Tue Sep 25 13:53:02 2018 -0700 libnvdimm: Hold reference on parent while scheduling async init Unlike asynchronous initialization in the core we have not yet associated the device with the parent, and as such the device doesn't hold a reference to the parent. In order to resolve that we should be holding a reference on the parent until the asynchronous initialization has completed. Cc: Fixes: 4d88a97aa9e8 ("libnvdimm: ...base ... infrastructure") Signed-off-by: Alexander Duyck Signed-off-by: Dan Williams commit 3c5c98d135f50c516631806ce77e50e7ce33bde8 Author: Pankaj Gupta Date: Wed Sep 19 18:28:48 2018 +0530 libnvdimm: remove duplicate include Removed duplicate include. Signed-off-by: Pankaj Gupta Signed-off-by: Dan Williams commit d9df9fb901d25b941ab2cfb5b570d91fb2abf7a3 Author: Yasha Cherikovsky Date: Tue Sep 25 21:08:25 2018 +0300 MIPS: Octeon: Remove special handling of CONFIG_MIPS_ELF_APPENDED_DTB=y The ELF appended dtb can be accessed now via 'fw_passed_dtb'. Since raw appended dtb is accessed via that variable too, this now effectively allows to boot with CONFIG_MIPS_RAW_APPENDED_DTB=y on Octeon. Signed-off-by: Yasha Cherikovsky [paul.burton@mips.com: Fix trivial __dtb_octeon_*_begin conflict] Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/20805/ Cc: Ralf Baechle Cc: Paul Burton Cc: James Hogan Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org commit e524c788bfc1d5e18db9e226c3b7323e69094e81 Author: Yasha Cherikovsky Date: Tue Sep 25 21:08:24 2018 +0300 MIPS: BMIPS: Remove special handling of CONFIG_MIPS_ELF_APPENDED_DTB=y The ELF appended dtb can be accessed now via 'fw_passed_dtb'. Signed-off-by: Yasha Cherikovsky Signed-off-by: Paul Burton Reviewed-by: Florian Fainelli Patchwork: https://patchwork.linux-mips.org/patch/20804/ Cc: Kevin Cernekee Cc: Florian Fainelli Cc: Ralf Baechle Cc: Paul Burton Cc: James Hogan Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org commit 65f06713d3fa0e4125f59ad5b9d6239109b1d7fc Author: Tony Krowiak Date: Tue Sep 25 19:16:20 2018 -0400 s390: vfio-ap: register matrix device with VFIO mdev framework Registers the matrix device created by the VFIO AP device driver with the VFIO mediated device framework. Registering the matrix device will create the sysfs structures needed to create mediated matrix devices each of which will be used to configure the AP matrix for a guest and connect it to the VFIO AP device driver. Registering the matrix device with the VFIO mediated device framework will create the following sysfs structures: /sys/devices/vfio_ap/matrix/ ...... [mdev_supported_types] ......... [vfio_ap-passthrough] ............ create To create a mediated device for the AP matrix device, write a UUID to the create file: uuidgen > create A symbolic link to the mediated device's directory will be created in the devices subdirectory named after the generated $uuid: /sys/devices/vfio_ap/matrix/ ...... [mdev_supported_types] ......... [vfio_ap-passthrough] ............ [devices] ............... [$uuid] A symbolic link to the mediated device will also be created in the vfio_ap matrix's directory: /sys/devices/vfio_ap/matrix/[$uuid] Signed-off-by: Tony Krowiak Reviewed-by: Halil Pasic Reviewed-by: Cornelia Huck Tested-by: Michael Mueller Tested-by: Farhan Ali Message-Id: <20180925231641.4954-6-akrowiak@linux.vnet.ibm.com> Signed-off-by: Christian Borntraeger commit 1fde573413b549d52183382e639c1d6ce88f5959 Author: Tony Krowiak Date: Tue Sep 25 19:16:19 2018 -0400 s390: vfio-ap: base implementation of VFIO AP device driver Introduces a new AP device driver. This device driver is built on the VFIO mediated device framework. The framework provides sysfs interfaces that facilitate passthrough access by guests to devices installed on the linux host. The VFIO AP device driver will serve two purposes: 1. Provide the interfaces to reserve AP devices for exclusive use by KVM guests. This is accomplished by unbinding the devices to be reserved for guest usage from the zcrypt device driver and binding them to the VFIO AP device driver. 2. Implements the functions, callbacks and sysfs attribute interfaces required to create one or more VFIO mediated devices each of which will be used to configure the AP matrix for a guest and serve as a file descriptor for facilitating communication between QEMU and the VFIO AP device driver. When the VFIO AP device driver is initialized: * It registers with the AP bus for control of type 10 (CEX4 and newer) AP queue devices. This limitation was imposed due to: 1. A desire to keep the code as simple as possible; 2. Some older models are no longer supported by the kernel and others are getting close to end of service. 3. A lack of older systems on which to test older devices. The probe and remove callbacks will be provided to support the binding/unbinding of AP queue devices to/from the VFIO AP device driver. * Creates a matrix device, /sys/devices/vfio_ap/matrix, to serve as the parent of the mediated devices created, one for each guest, and to hold the APQNs of the AP devices bound to the VFIO AP device driver. Signed-off-by: Tony Krowiak Reviewed-by: Halil Pasic Tested-by: Michael Mueller Tested-by: Farhan Ali Acked-by: David Hildenbrand Reviewed-by: Cornelia Huck Message-Id: <20180925231641.4954-5-akrowiak@linux.vnet.ibm.com> Signed-off-by: Christian Borntraeger commit e585b24aeb445493b6a581d6c42fa58f663e93e0 Author: Tony Krowiak Date: Tue Sep 25 19:16:18 2018 -0400 KVM: s390: refactor crypto initialization This patch refactors the code that initializes and sets up the crypto configuration for a guest. The following changes are implemented via this patch: 1. Introduces a flag indicating AP instructions executed on the guest shall be interpreted by the firmware. This flag is used to set a bit in the guest's state description indicating AP instructions are to be interpreted. 2. Replace code implementing AP interfaces with code supplied by the AP bus to query the AP configuration. Signed-off-by: Tony Krowiak Reviewed-by: Halil Pasic Acked-by: Christian Borntraeger Acked-by: Janosch Frank Reviewed-by: Cornelia Huck Tested-by: Michael Mueller Tested-by: Farhan Ali Message-Id: <20180925231641.4954-4-akrowiak@linux.vnet.ibm.com> Signed-off-by: Christian Borntraeger commit 0a715156656bddf4aa92d9868f850aeeb0465fd0 Author: YueHaibing Date: Wed Sep 26 17:13:05 2018 +0800 net: faraday: 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: David S. Miller commit 6323d57f335ce1490d025cacc83fc10b07792130 Author: YueHaibing Date: Wed Sep 26 17:06:29 2018 +0800 net: smsc: 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: David S. Miller commit 880e1b21115bb49e811352530017557ab692e934 Author: zhong jiang Date: Wed Sep 26 16:56:50 2018 +0800 net: liquidio: list usage cleanup Trival cleanup, list_move_tail will implement the same function that list_del() + list_add_tail() will do. hence just replace them. Signed-off-by: zhong jiang Signed-off-by: David S. Miller commit ef73c22fa025fe1db47605a9440767de993d1628 Author: Bjorn Andersson Date: Mon Sep 24 16:45:26 2018 -0700 remoteproc: qcom: Rename Hexagon v5 modem driver The qcom_q6v5_pil implements support for the self-authenticating modem subsystem. With the introduction of other q6v5 based non-TZ based remoteproc driver the current name is cause for confusion, so rename it to be more specific. No functional change. Reviewed-by: Niklas Cassel Signed-off-by: Bjorn Andersson commit 631e871edc768210d5d5716f5787e4f363c65352 Author: zhong jiang Date: Wed Sep 26 16:53:00 2018 +0800 net: qed: list usage cleanup Trival cleanup, list_move_tail will implement the same function that list_del() + list_add_tail() will do. hence just replace them. Signed-off-by: zhong jiang Signed-off-by: David S. Miller commit 9e004f97161d637d2dc82299be494bcfd07043bb Author: Bjorn Andersson Date: Mon Sep 24 16:45:25 2018 -0700 remoteproc: qcom: Rename Hexagon v5 PAS driver The Hexagon v5 ADSP driver is used for more than only the ADSP and there's an upcoming non-PAS ADSP PIL for SDM845, so rename the driver to qcom_q6v5_pas in order to better suite this. Cc: Rohit kumar Reviewed-by: Niklas Cassel Signed-off-by: Bjorn Andersson commit d5269c4553a64b6882f2c019ae21b783a0984a83 Author: Bjorn Andersson Date: Wed Sep 19 18:51:51 2018 -0700 remoteproc: qcom: q6v5: Propagate EPROBE_DEFER In the case that the interrupts fail to result because of the interrupt-controller not yet being registered the platform_get_irq_byname() call will fail with -EPROBE_DEFER, but passing this into devm_request_threaded_irq() will result in -EINVAL being returned, the driver is therefor not reprobed later. Fixes: 3b415c8fb263 ("remoteproc: q6v5: Extract common resource handling") Cc: stable@vger.kernel.org Reviewed-by: Sibi Sankar Signed-off-by: Bjorn Andersson commit 30b0594a3e6c2bcbe5bd59753d0319d6f9925e40 Merge: 37ac5db6e602 35750b0bca53 Author: David S. Miller Date: Wed Sep 26 10:04:23 2018 -0700 Merge branch 'net-bridge-convert-bool-options-to-bits' Nikolay Aleksandrov says: ==================== net: bridge: convert bool options to bits A lot of boolean bridge options have been added around the net_bridge structure resulting in holes and more importantly different cache lines that need to be fetched in the fast path. This set moves all of those to bits in a bitfield which resides in a hot cache line thus reducing the size of net_bridge, the number of holes and the number of cache lines needed for the fast path. The set is also sent in preparation for new boolean options to avoid spreading them in the structure and making new holes. One nice side-effect is that we avoid potential race conditions by using the bitops since some of the options were bits being directly set in parallel risking hard to debug issues (has_ipv6_addr). Before: size: 1184, holes: 8, sum holes: 30 After: size: 1160, holes: 3, sum holes: 7 Patch 01 is a trivial style fix Patch 02 adds the new options bitfield and converts the vlan boolean options to bits Patches 03-08 convert the rest of the boolean options to bits Patch 09 re-arranges a few fields in net_bridge to further reduce size v2: patch 09: remove the comment about offload_fwd_mark in net_bridge and leave it where it is now, thanks to Ido for spotting it ==================== Signed-off-by: David S. Miller commit 35750b0bca530b459c98b6383c19ee07d9546c14 Author: Nikolay Aleksandrov Date: Wed Sep 26 17:01:07 2018 +0300 net: bridge: pack net_bridge better Further reduce the size of net_bridge with 8 bytes and reduce the number of holes in it: Before: holes: 5, sum holes: 15 After: holes: 3, sum holes: 7 Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit 3341d9170228d521fb38afae14b449308f3e4018 Author: Nikolay Aleksandrov Date: Wed Sep 26 17:01:06 2018 +0300 net: bridge: convert mtu_set_by_user to a bit Convert the last remaining bool option to a bit thus reducing the overall net_bridge size further by 8 bytes. Signed-off-by: Nikolay Aleksandrov Reviewed-by: Stephen Hemminger Signed-off-by: David S. Miller commit c69c2cd444ccf0ea5e5741f92073619e57217b6b Author: Nikolay Aleksandrov Date: Wed Sep 26 17:01:05 2018 +0300 net: bridge: convert neigh_suppress_enabled option to a bit Convert the neigh_suppress_enabled option to a bit. Signed-off-by: Nikolay Aleksandrov Reviewed-by: Stephen Hemminger Signed-off-by: David S. Miller commit 675779adbf7c80cd4af8e085118c82be048643e7 Author: Nikolay Aleksandrov Date: Wed Sep 26 17:01:04 2018 +0300 net: bridge: convert mcast options to bits This patch converts the rest of the mcast options to bits. It also packs the mcast options a little better by moving multicast_mld_version to an existing hole, reducing the net_bridge size by 8 bytes. Signed-off-by: Nikolay Aleksandrov Reviewed-by: Stephen Hemminger Signed-off-by: David S. Miller commit 13cefad2f2c1d99b778c62b142e077779c5f9395 Author: Nikolay Aleksandrov Date: Wed Sep 26 17:01:03 2018 +0300 net: bridge: convert and rename mcast disabled Convert mcast disabled to an option bit and while doing so convert the logic to check if multicast is enabled instead. That is make the logic follow the option value - if it's set then mcast is enabled and vice versa. This avoids a few confusing places where we inverted the value that's being set to follow the mcast_disabled logic. Signed-off-by: Nikolay Aleksandrov Reviewed-by: Stephen Hemminger Signed-off-by: David S. Miller commit be3664a038075b3d108e554d08d2578776b7b3a7 Author: Nikolay Aleksandrov Date: Wed Sep 26 17:01:02 2018 +0300 net: bridge: convert group_addr_set option to a bit Convert group_addr_set internal bridge opt to a bit. Signed-off-by: Nikolay Aleksandrov Reviewed-by: Stephen Hemminger Signed-off-by: David S. Miller commit 8df3510f28e5cba2e94fecb40585e9b7e8a0c6ec Author: Nikolay Aleksandrov Date: Wed Sep 26 17:01:01 2018 +0300 net: bridge: convert nf call options to bits No functional change, convert of nf_call_[ip|ip6|arp]tables to bits. Signed-off-by: Nikolay Aleksandrov Reviewed-by: Stephen Hemminger Signed-off-by: David S. Miller commit ae75767ec206c6f445973e5e6c5af8a865016e15 Author: Nikolay Aleksandrov Date: Wed Sep 26 17:01:00 2018 +0300 net: bridge: add bitfield for options and convert vlan opts Bridge options have usually been added as separate fields all over the net_bridge struct taking up space and ending up in different cache lines. Let's move them to a single bitfield to save up space and speedup lookups. This patch adds a simple API for option modifying and retrieving using bitops and converts the first user of the API - the bridge vlan options (vlan_enabled and vlan_stats_enabled). Signed-off-by: Nikolay Aleksandrov Reviewed-by: Stephen Hemminger Signed-off-by: David S. Miller commit 1c1cb6d0321f4248e8a659a31659dcdac6866c29 Author: Nikolay Aleksandrov Date: Wed Sep 26 17:00:59 2018 +0300 net: bridge: make struct opening bracket consistent Currently we have a mix of opening brackets on new lines and on the same line, let's move them all on the same line. Signed-off-by: Nikolay Aleksandrov Reviewed-by: Stephen Hemminger Signed-off-by: David S. Miller commit 70a39be6766a6a02631b96960e3066ded7d98d2f Author: Suzuki K Poulose Date: Wed Sep 12 14:53:46 2018 +0100 arm64: dts: msm8916: Update coresight bindings for hardware ports Switch to updated coresight bindings for hw ports Cc: Andy Gross Cc: David Brown Cc: Ivan T. Ivanov Cc: Mathieu Poirier Signed-off-by: Suzuki K Poulose Signed-off-by: Andy Gross commit 37ac5db6e60215d6cc1debb2cce9209e3a2a9ed5 Merge: 4b1bd6976945 91cc98f51e3d Author: David S. Miller Date: Wed Sep 26 09:56:08 2018 -0700 Merge branch 's390-net-next' Julian Wiedmann says: ==================== s390/net: updates 2018-09-26 please apply one more series of cleanups and small improvements for qeth to net-next. Note that one patch needs to touch both af_iucv and qeth, in order to untangle their receive paths. ==================== Signed-off-by: David S. Miller commit 91cc98f51e3d3b1bd2b9cd10fcc8ebfc08cd4c45 Author: Julian Wiedmann Date: Wed Sep 26 18:29:16 2018 +0200 s390/qeth: remove duplicated carrier state tracking The netdevice is always available, apply any carrier state changes to it without caching them. On a STARTLAN event (ie. carrier-up), defer updating the state to qeth_core_hardsetup_card() in the subsequent recovery action. Also remove the carrier-state checks from the xmit routines. Stopping transmission on carrier-down is the responsibility of upper-level code (eg see dev_direct_xmit()). Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit d782d80f36f33426e99eacae8cd7f2ff7918aaf4 Author: Julian Wiedmann Date: Wed Sep 26 18:29:15 2018 +0200 s390/qeth: clean up drop conditions for received cmds If qeth_check_ipa_data() consumed an event, there's no point in processing it further. So drop it early, and make the surrounding code a tiny bit more readable. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit d19b93f40e2350e1ce6032df248db88177996720 Author: Julian Wiedmann Date: Wed Sep 26 18:29:14 2018 +0200 s390/qeth: re-indent qeth_check_ipa_data() Pull one level of checking up into qeth_send_control_data_cb(), and clean up an else-after-return. No functional change. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit 68bba11643df934d6d3dba40f311b81f2c93fd8a Author: Julian Wiedmann Date: Wed Sep 26 18:29:13 2018 +0200 s390/qeth: consume local address events We have no code that is waiting for these events, so just drop them when they arrive. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit 6585ac4e5d74e8e8310c87c18782812faada13a8 Author: Julian Wiedmann Date: Wed Sep 26 18:29:12 2018 +0200 s390/qeth: remove various redundant code 1. tracing iob->rc makes no sense when it hasn't been modified by the callback, 2. the qeth_dbf_list is declared with LIST_HEAD, which also initializes the list, 3. the ccwgroup core only calls the thaw/restore callbacks if the gdev is online, so we don't have to check for it again. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit 8d908eb045bb1ad8a842910360938a204a203617 Author: Julian Wiedmann Date: Wed Sep 26 18:29:11 2018 +0200 s390/qeth: remove CARD_FROM_CDEV helper The cdev-to-card translation walks through two layers of drvdata, with no locking or refcounting (where eg. the ccwgroup core only accesses a cdev's drvdata while holding the ccwlock). This might be safe for now, but any careless usage of the helper has the potential for subtle races and use-after-free's. Luckily there's only one occurrence where we _really_ need it (in qeth_irq()), for any other user we can just pass through an appropriate card pointer. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit 8f6637b878c9efc70ceee1ed3f480c55f697720a Author: Julian Wiedmann Date: Wed Sep 26 18:29:10 2018 +0200 s390/qeth: pass card pointer in iob callback This allows us to remove the CARD_FROM_CDEV calls in the iob callbacks. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit 6a3123d0769ec54c9bbbfebd61a430e6cab5dbbe Author: Julian Wiedmann Date: Wed Sep 26 18:29:09 2018 +0200 s390/qeth: re-use qeth_notify_skbs() When not using the CQ, this allows us avoid the second skb queue walk in qeth_release_skbs(). Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit 5a5312bdbaddff57e5d24a2b24f9dd5a0e219ce1 Author: Julian Wiedmann Date: Wed Sep 26 18:29:08 2018 +0200 s390/qeth: remove additional skb refcount This was presumably left over from back when qeth recursed into dev_queue_xmit(). Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit dc149e3764d8b724b110f8841b198e0f867e413a Author: Julian Wiedmann Date: Wed Sep 26 18:29:07 2018 +0200 s390/qeth: replace open-coded skb_queue_walk() To match the use of __skb_queue_purge(), also make the skb's enqueue in qeth_fill_buffer() lockless. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit cd11d11286cba88aab5b1da1c83ee36e5b5cefb7 Author: Julian Wiedmann Date: Wed Sep 26 18:29:06 2018 +0200 net/af_iucv: locate IUCV header via skb_network_header() This patch attempts to untangle the TX and RX code in qeth from af_iucv's respective HiperTransport path: On the TX side, pointing skb_network_header() at the IUCV header means that qeth_l3_fill_af_iucv_hdr() no longer needs a magical offset to access the header. On the RX side, qeth pulls the (fake) L2 header off the skb like any normal ethernet driver would. This makes working with the IUCV header in af_iucv easier, since we no longer have to assume a fixed skb layout. While at it, replace the open-coded length checks in af_iucv's RX path with pskb_may_pull(). Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit a2eb0ad50cae81f22961e8da54b536c7790af982 Author: Julian Wiedmann Date: Wed Sep 26 18:29:05 2018 +0200 s390/qeth: on gdev release, reset drvdata qeth_core_probe_device() sets the gdev's drvdata, but doesn't reset it on a subsequent error. Move the (re-)setting around a bit, so that it happens symmetrically on allocating/freeing the qeth_card struct. This is no actual problem, as the ccwgroup core will discard the gdev on a probe error. But from qeth's perspective the gdev is an external resource, so it's best to manage it cleanly. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit c1a935f6ec5b146aef1de03d1ef135de34f90646 Author: Julian Wiedmann Date: Wed Sep 26 18:29:04 2018 +0200 s390/qeth: fix discipline unload after setup error Device initialization code usually first loads a subdriver (via qeth_core_load_discipline()), and then runs its setup() callback. If this fails, it rolls back the load via qeth_core_free_discipline(). qeth_core_free_discipline() expects the options.layer attribute to be initialized, but on error in setup() that's currently not the case. Resulting in misbalanced symbol_put() calls. Fix this by setting options.layer when loading the subdriver. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit a70fee3b0f9007ee16bf0159018ee29684acfac0 Author: Julian Wiedmann Date: Wed Sep 26 18:29:03 2018 +0200 s390/qeth: use DEFINE_MUTEX for qeth_mod_mutex Consolidate declaration and initialization of a static variable. While at it reduce its scope in qeth_core_load_discipline(), and simplify the return logic accordingly. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit 4fda33547676e270245431d59aa72f3e5bdc1d30 Author: Julian Wiedmann Date: Wed Sep 26 18:29:02 2018 +0200 s390/qeth: convert layer attribute to enum While the raw values are fixed due to their use in a sysfs attribute, we can still use the proper QETH_DISCIPLINE_* enum within the driver. Also move the initialization into qeth_set_initial_options(), along with all other user-configurable fields. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit 703e699dbe2cd106c406882f5c385485a1156cc9 Author: Brian Masney Date: Tue Sep 25 06:46:51 2018 -0400 ARM: dts: qcom-msm8974: change invalid flag IRQ NONE to valid value The following commits used IRQ_TYPE_NONE since that matched what was already in the file and I do not have access to the datasheets for these devices. After these patches were submitted, commit dcf145011400 ("ARM: dts: qcom-msm8974: change invalid flag IRQ NONE to valid value") changed all of these values to IRQ_TYPE_LEVEL_HIGH. This patch corrects the IRQ type for these two commits: commit bd9392507588 ("ARM: dts: qcom: msm8974-hammerhead: add device tree bindings for ALS / proximity") commit fe8d81fe7d9a ("ARM: dts: qcom: msm8974-hammerhead: add device tree bindings for mpu6515") Prior to these patches, I was having issues with the bmp280 sensor returning temperature / pressure skipped errors, however these errors have gone away with these patches. Patches were tested on a LG Nexus 5 (hammerhead) phone. Signed-off-by: Brian Masney Signed-off-by: Andy Gross commit ebea2a43fdafdbce918bd7e200b709d6c33b9f3b Author: Marc Dietrich Date: Thu Aug 2 10:45:40 2018 +0200 ARM: dts: paz00: fix wakeup gpio keycode The power key is controlled solely by the EC, which only tiggeres this gpio after wakeup. Fixes immediately return to suspend after wake from LP1. Signed-off-by: Marc Dietrich Tested-by: Nicolas Chauvet Signed-off-by: Thierry Reding commit 5ac93f81096a2065adb99defdb8f04ae2c19cc11 Author: Dmitry Osipenko Date: Sun Aug 19 17:24:20 2018 +0300 drm/tegra: Detach devices from IOMMU DMA domain on arm32 All Tegra DRM devices are getting attached to an implicit IOMMU DMA domain if CONFIG_ARM_DMA_USE_IOMMU=y. Since Tegra DRM driver manages IOMMU by itself, the devices must be detached from the implicit domain using arch-specific IOMMU-API. Note that this works only for arm32 and not for arm64, which will remain broken if CONFIG_IOMMU_DMA is enabled. Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit ba61ab1a232d75a8bf92bbfedc10162a6e7e95c7 Merge: 1e25ee6d8083 e60f02ddb4d2 Author: Arnd Bergmann Date: Wed Sep 26 17:18:42 2018 +0200 Merge tag 'zynqmp-soc-for-v4.20-v2' of https://github.com/Xilinx/linux-xlnx into next/drivers arm64: zynqmp: SoC changes for v4.20 - Adding firmware API for SoC with debugfs interface Firmware driver communicates to Platform Management Unit (PMU) by using SMC instructions routed to Arm Trusted Firmware (ATF). Initial version adds support for base firmware driver with query and clock APIs. EEMI spec is available here: https://www.xilinx.com/support/documentation/user_guides/ug1200-eemi-api.pdf * tag 'zynqmp-soc-for-v4.20-v2' of https://github.com/Xilinx/linux-xlnx: firmware: xilinx: Add debugfs for query data API firmware: xilinx: Add debugfs interface firmware: xilinx: Add clock APIs firmware: xilinx: Add query data API firmware: xilinx: Add Zynqmp firmware driver dt-bindings: firmware: Add bindings for ZynqMP firmware Signed-off-by: Arnd Bergmann commit 8fe3c0612cbd7c561064b8eb17bf62189740b68e Merge: d7f59da42c25 20487a8ddf20 Author: Arnd Bergmann Date: Wed Sep 26 17:10:50 2018 +0200 Merge tag 'zynq-soc-for-v4.20' of https://github.com/Xilinx/linux-xlnx into next/soc ARM: Xilinx Zynq SoC patches for v4.20 - Convert to using %pOFn instead of device_node.name in slcr driver * tag 'zynq-soc-for-v4.20' of https://github.com/Xilinx/linux-xlnx: ARM: zynq: Convert to using %pOFn instead of device_node.name Signed-off-by: Arnd Bergmann commit e31c8ea5aff8670275e4e451fdc3bca5fbc8a528 Author: Dmitry Osipenko Date: Thu Aug 30 03:12:47 2018 +0300 gpu: host1x: Detach Host1x from IOMMU DMA domain on arm32 Host1x is getting attached to an implicit IOMMU DMA domain if CONFIG_ARM_DMA_USE_IOMMU=y. Since Host1x driver manages IOMMU by itself, Host1x device must be detached from the implicit domain using arch-specific IOMMU-API. Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit 1abf47edb388352ca674e3a96b7c3a39874bacea Merge: a64240a625b3 f5054ceed420 Author: Arnd Bergmann Date: Wed Sep 26 17:07:57 2018 +0200 Merge tag 'zynq-dt-for-v4.20' of https://github.com/Xilinx/linux-xlnx into next/dt ARM: dts: zynq: DT changes for v4.20 - Fix DTS spi/i2c warnings for zc702/zc770 boards Signed-off-by: Arnd Bergmann commit 06d561ca0fa73a5b12ef6dfe0da7053e0ee37315 Author: Krzysztof Kozlowski Date: Thu Aug 30 19:21:53 2018 +0200 ARM: tegra: tegra20: Fix mixed tabs-spaces indentation Fix indentation and alignment when spaces were used instead of tabs. This fixes checkpatch errors like: ERROR: code indent should use tabs where possible #306: FILE: arch/arm/boot/dts/tegra20-paz00.dts:306: +^I^I <&tegra_car TEGRA20_CLK_PLL_P_OUT3>;$ Signed-off-by: Krzysztof Kozlowski Acked-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit 9c942096baeb37cf69df564bcf45fc37314e7e66 Author: Thomas Zimmermann Date: Wed Sep 26 13:56:40 2018 +0200 drm/tegra: 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: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/20180926115640.24755-1-tzimmermann@suse.de commit fee8cdc2df088fa2ee4b7f86a803918a3664a26b Author: Marcel Ziswiler Date: Sun Sep 2 12:09:06 2018 +0200 ARM: tegra: colibri_t20: add eval board device tree Add an evaluation board device tree more in-line with all our other device trees. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit 5373f80201fbb05a9a5a29f061e8500b2df91bfb Author: Marcel Ziswiler Date: Sun Sep 2 12:09:05 2018 +0200 ARM: tegra: colibri_t20: rename ac97 label to tegra_ac97 Rename ac97 label to tegra_ac97 to be more in-line with the device tree binding documentation. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit cafed755d5f31ef7bf26f04d87a27ee02b9d036d Author: Marcel Ziswiler Date: Sun Sep 2 12:09:04 2018 +0200 ARM: tegra: colibri_t20: get rid of fake clocks simple bus Get rid of the fake clocks simple bus and use node names as per the actual schematics. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit 8f4a8e0931b8e57a6a962c8cf89796b715aba37c Author: Marcel Ziswiler Date: Sun Sep 2 12:09:03 2018 +0200 ARM: tegra: colibri_t20: rename tps6586x@34 and drop unused pmic label Rename tps6586x@34 to pmic@34 and drop the unused pmic label. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit 613953abdf65789eddbdcde7880de88155f7516a Author: Marcel Ziswiler Date: Sun Sep 2 12:09:02 2018 +0200 ARM: tegra: colibri_t20: iris: drop unused i2c_ddc label Drop unused i2c_ddc label. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit 82e7ceccf2c3902549fdf75bf494fbe3e3e236a4 Author: Marcel Ziswiler Date: Sun Sep 2 12:09:01 2018 +0200 ARM: tegra: colibri_t20: rename i2c_ddc to hdmi_ddc Rename i2c_ddc to hdmi_ddc to be more in-line with other device trees. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit 6a32a913bff31f148eb4e129be78afb55fa32467 Author: Marcel Ziswiler Date: Sun Sep 2 12:09:00 2018 +0200 ARM: tegra: colibri_t20: drop module level model and compatible Drop model and compatible nodes from the module level device tree as they get overridden by the carrier board device tree anyway. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit 463a8f714af25dc93b6b4851fdf7c83676c61289 Author: Marcel Ziswiler Date: Sun Sep 2 12:08:59 2018 +0200 ARM: tegra: colibri_t20: iris: add colibri ssp support Add Colibri SSP aka SPI support using the SPI4 instance. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit a7867ac8a11465be32324d896d81426f534b9a61 Author: Marcel Ziswiler Date: Sun Sep 2 12:08:58 2018 +0200 ARM: tegra: colibri_t20: iris: simplify model and compatible properties Simplify model and compatible by dropping the 256/512 MB from the model, -512 from the compatible and rename that property from toradex,iris to toradex,colibri_t20-iris to be more in-line with all our other device trees. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit 4f135281b32362a672fee7ddb5a356e600fb9ce4 Author: Marcel Ziswiler Date: Sun Sep 2 12:08:57 2018 +0200 ARM: tegra: colibri_t20: simplify model and compatible properties Simplify model and compatible by dropping the 256/512 MB from the model and -512 from the compatible properties to be more in-line with all our other device trees. Signed-off-by: Marcel Ziswiler Reviewed-by: Rob Herring Signed-off-by: Thierry Reding commit 6a4a865d1cc6656bea4a017e7537a5315972e692 Author: Marcel Ziswiler Date: Sun Sep 2 12:08:56 2018 +0200 ARM: tegra: colibri_t20: add compatibility comment Add compatibility comment. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit 88fd676b158a72fb0bab4d29b53012316b40f7f4 Author: Marcel Ziswiler Date: Sun Sep 2 12:08:55 2018 +0200 ARM: tegra: colibri_t20: annotate/move sd card detect Annotate the SD card, its detect pin and move the SD card detect GPIO definition from the module to the carrier board more in-line with our other device trees. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit 351c72c8323589351090504515d081384c3ea705 Author: Marcel Ziswiler Date: Sun Sep 2 12:08:54 2018 +0200 ARM: tegra: colibri_t20: add gpio hogs for gmi_wr_n buffers Add GPIO hogs for GMI_WR_N buffers: - tri-stating GMI_WR_N on SODIMM pin 99 nPWE - not tri-stating GMI_WR_N on SODIMM pin 93 RDnWR Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit 0b51e73ba1e9d4ae6564449e7434f958839779f7 Author: Marcel Ziswiler Date: Sun Sep 2 12:08:53 2018 +0200 ARM: tegra: colibri_t20: add gpio hog to unreset usb ethernet chip Add GPIO hog to unreset ASIX AX88772B USB Ethernet chip. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit d5178bb6f86084eff4ccaf322775b9d558bbd326 Author: Marcel Ziswiler Date: Sun Sep 2 12:08:52 2018 +0200 ARM: tegra: colibri_t20: add i2c-thermtrip Add i2c-thermtrip which would set the SLEEP MODE bit in the SUPPLYENE register of the TPS658643 PMIC. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit df2be1ae626a0e748f5266e6a7a5134a19490617 Author: Marcel Ziswiler Date: Sun Sep 2 12:08:51 2018 +0200 ARM: tegra: colibri_t20: annotate/rename lm95245 temperature sensor Rename and annotate LM95245 temperature sensor more in-line with our other device trees. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit 9b41e68af99adca6f77940c5a8c2e6c3db5c67cc Author: Marcel Ziswiler Date: Sun Sep 2 12:08:50 2018 +0200 ARM: tegra: colibri_t20: iris: add dr_mode property Add dr_mode property to the USB controller. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit ccf7f6d42790c3e7fc0bb8747f38514f708f267f Author: Marcel Ziswiler Date: Sun Sep 2 12:08:49 2018 +0200 ARM: tegra: colibri_t20: iris: add gpio wakeup key Add SODIMM pin 45 as GPIO wakeup key. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit 9ad510b33e1779a0263fcb49bc199727208477cf Author: Marcel Ziswiler Date: Sun Sep 2 12:08:48 2018 +0200 ARM: tegra: colibri_t20: use high speed uart driver Use high speed UART driver compatible nvidia,tegra20-hsuart. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit 0d3fda4609e8ae447d44fb29fd0ccd259c6e0b0d Author: Marcel Ziswiler Date: Sun Sep 2 12:08:47 2018 +0200 ARM: tegra: colibri_t20: iris: add uart-c Add UART-C. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit 9ccaf9466b9ca2421db98a8430e3d6de2079b1bf Author: Marcel Ziswiler Date: Sun Sep 2 12:08:46 2018 +0200 ARM: tegra: colibri_t20: iris: annotate uarts Annotate UART-A and UART-B. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit 9a796cd295edfc0235b3936dd3172467c01ff30c Author: Marcel Ziswiler Date: Sun Sep 2 12:08:45 2018 +0200 ARM: tegra: colibri_t20: iris: display controller rgb panel support Add display controller parallel RGB panel support incl. backlight PWM. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit 992cf09b14e391748c46add889e4249603fa3a39 Author: Marcel Ziswiler Date: Sun Sep 2 12:08:44 2018 +0200 ARM: tegra: colibri_t20: add missing pinmux Explicitly add pinmux' for all T20 SoC ball groups now: - Colibri Address/Data Bus (GMI) further pins used as GPIOs - Colibri BL_ON - Colibri EXT_IO* - Colibri L_BIAS, LCD_M1 is muxed with LCD_DE today's display need DE, disable LCD_M1 - more Colibri LCD pins (L_* resp. LDD<*>) - Colibri LCD (Optional 24 BPP Support) - Colibri MMCCD - uart_a_dsr and uart_a_dcd as GPIOs - Colibri USB_CDET - I2C3 (Optional) - JTAG_RTCK - LAN_RESET, LAN_EXT_WAKEUP and LAN_PME (All On-module) - more NAND pins - RESET_OUT - THERMD_ALERT# (On-module), unlatched I2C address pin of LM95245 temperature sensor therefore requires disabling for now Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit a2cb59be1086450c8dea7bfbbf2bf0e47c93ced1 Author: Marcel Ziswiler Date: Sun Sep 2 12:08:43 2018 +0200 ARM: tegra: colibri_t20: pinmux clean-up Just cosmetic pinmux clean-up. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit ea60afb8d67fa669f659ade45d5ae6530596503f Author: Marcel Ziswiler Date: Sun Sep 2 12:08:42 2018 +0200 ARM: tegra: colibri_t20: update sound nvidia,model Update sound nvidia,model to be more in-line with our other device trees. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit 035ae62dfbc93eee222e40d1176e92b3fdd21076 Author: Marcel Ziswiler Date: Sun Sep 2 12:08:41 2018 +0200 ARM: tegra: colibri_t20: indentation/line-feed/white-space clean-up Cleaning up indentation, line-feed and white-space. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit 4307e2ce5d3105e5cfa3296dd65eb48bf0ef64be Author: Marcel Ziswiler Date: Sun Sep 2 12:08:40 2018 +0200 ARM: tegra: colibri_t20: remove phy-reset-gpio from controller node Remove the phy-reset-gpio from the USB controller node as it is already specified in the PHY node. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit 2287ef76d0a2c3f3411e72cdc139804900b23e7c Author: Marcel Ziswiler Date: Sun Sep 2 12:08:39 2018 +0200 ARM: tegra: colibri_t20: annotate usb ehci instances Annotate USB EHCI instances. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit 18e6ccefe1509db3c75c000a11bc1f81e701e9c3 Author: Marcel Ziswiler Date: Sun Sep 2 12:08:38 2018 +0200 ARM: tegra: colibri_t20: add missing regulators Add missing regulators: - reg_lan_v_bus being USB Ethernet chip vbus supply - carrier board reg_3v3 to be used as backlight and panel power supply - carrier board HDMI supply being reg_5v0 - reg_usbc_vbus being the USB vbus supply of the EHCI instance 0 Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit 3647c7b8489d52a5fbd19065ffa2b6b176796c72 Author: Marcel Ziswiler Date: Sun Sep 2 12:08:37 2018 +0200 ARM: tegra: colibri_t20: regulator clean-up Just cosmetic regulator clean-up. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit 142165cf7359afb23e624e5f1df290050682654b Author: Marcel Ziswiler Date: Sun Sep 2 12:08:36 2018 +0200 ARM: tegra: colibri_t20: iris: use no-1-8-v Use no-1-8-v property rather than vmmc/vqmmc supplies and drop now obsolete and anyway non-existent vcc_sd. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit e6800c214e56f6c7fcadf63e9d60b464d31cea40 Author: Marcel Ziswiler Date: Sun Sep 2 12:08:35 2018 +0200 ARM: tegra: colibri_t20: reorder host1x/hdmi properties Reorder Host1x/HDMI properties. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit 364ba1043937b00e4d555fe6268534d18db9f698 Author: Marcel Ziswiler Date: Sun Sep 2 12:08:34 2018 +0200 ARM: tegra: colibri_t20: add local-mac-address property Add empty local-mac-address property to be filled in by boot loader (e.g. U-Boot). Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit 1d6050d67ea820db776691e46e744e6f8d8e2c64 Author: Marcel Ziswiler Date: Sun Sep 2 12:08:33 2018 +0200 ARM: tegra: colibri_t20: iris: annotate i2c busses Annotate I2C busses: GEN2_I2C and CAM_I2C (I2C3) being unused and DDC_CLOCK/DATA on X3 pin 15/16 e.g. used for display EDID. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit 59b6f20bccbd47917ca63ae2b5a5d3f849aa46c0 Author: Marcel Ziswiler Date: Sun Sep 2 12:08:32 2018 +0200 ARM: tegra: colibri_t20: iris: add missing aliases Add rtc0 being the ultra low-power I2C one as found on the carrier board and the 3rd UART being NVIDIA's UARTB. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit 3ef8af133e87d631cf96833e114ca55112096e1d Author: Marcel Ziswiler Date: Sun Sep 2 12:08:31 2018 +0200 ARM: tegra: colibri_t20: iris: integrate i2c real time clock support Integrate support for GEN1_I2C aka I2C_SDA/SCL on SODIMM pin 194/196 and the M41T0M6 real time clock on the carrier board. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit 3c59cae79fbeb6d44e603a49d845428b8ef98718 Author: Marcel Ziswiler Date: Sun Sep 2 12:08:30 2018 +0200 ARM: tegra: colibri_t20: move aliases from module to carrier board Move RTC aliases from module to carrier board to be more in-line with all our other device trees. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit 4b601b9f1022bbd67decf8842a3dd86c850c5e83 Author: Marcel Ziswiler Date: Sat Sep 1 15:05:04 2018 +0200 ARM: tegra: apalis-tk1: drop unused hdmi_ddc label Drop unused hdmi_ddc label. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit 6253f885725303c949c0cab2a28fcba9a3695b44 Author: Marcel Ziswiler Date: Sat Sep 1 15:05:03 2018 +0200 ARM: tegra: apalis-tk1: shorten temperature-sensor node Shorten temperature-sensor node to just temp-sensor as suggested in the binding documentation. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit 94c3847dc5d18b56503415ef7733a4507061b1ca Author: Marcel Ziswiler Date: Sat Sep 1 15:05:02 2018 +0200 ARM: tegra: apalis-tk1: get rid of fake clocks simple bus Get rid of the fake clocks simple bus and use node names as per the actual schematics. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit 26e19cdf665f0998d30275877a7d5a14f908aa02 Author: Marcel Ziswiler Date: Sat Sep 1 15:05:01 2018 +0200 ARM: tegra: apalis-tk1: replace underscores in node names with dashes As underscores in node names are not recommended replace them all where possible with dashes. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit 4802623981d9f00b5a9428dc18687376ad0544ed Author: Marcel Ziswiler Date: Sat Sep 1 15:05:00 2018 +0200 ARM: tegra: apalis-tk1: drop obsolete spidev nodes Drop obsolete spidev device tree nodes as nowadays one should do this by binding the spidev driver to specific instances/chip selects at runtime. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit 43ff75a8e3ed39f05d83a4938731d876d4ed36a1 Author: Marcel Ziswiler Date: Sat Sep 1 15:04:59 2018 +0200 ARM: tegra: apalis-tk1: drop module level model and compatible Drop model and compatible nodes from the module level device tree as they get overridden by the carrier board device tree anyway. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit a64b51a3ed5bcd89eb948e0b3ea60d1eb4266370 Author: Marcel Ziswiler Date: Sat Sep 1 15:04:58 2018 +0200 ARM: tegra: apalis-tk1: reorder SD card properties Reorder SD card properties. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit e0cffa9a1b64099f537887712ba3802f92429675 Author: Marcel Ziswiler Date: Sat Sep 1 15:04:57 2018 +0200 ARM: tegra: apalis-tk1: reorder cpu dfll clock properties Reorder CPU DFLL clock properties. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit a052d2b67f00dfc6181d7dea6ff911bc7175f52a Author: Marcel Ziswiler Date: Sat Sep 1 15:04:56 2018 +0200 ARM: tegra: apalis-tk1: add toradex, apalis-tk1-v1.2 compatible Add toradex,apalis-tk1-v1.2 compatible. Signed-off-by: Marcel Ziswiler Reviewed-by: Rob Herring Signed-off-by: Thierry Reding commit 8be6e49a653ca79dcae1125238f78db590d86622 Author: Marcel Ziswiler Date: Sat Sep 1 15:04:55 2018 +0200 ARM: tegra: apalis-tk1: enable emmc ddr52 mode Add mmc-ddr-1_8v property enabling eMMC DDR52 mode. root@apalis-tk1-mainline:~# cat /sys/kernel/debug/mmc2/ios clock: 52000000 Hz actual clock: 52000000 Hz vdd: 21 (3.3 ~ 3.4 V) bus mode: 2 (push-pull) chip select: 0 (don't care) power mode: 2 (on) bus width: 3 (8 bits) timing spec: 8 (mmc DDR52) signal voltage: 1 (1.80 V) driver type: 0 (driver type B) root@apalis-tk1-mainline:~# hdparm -t /dev/mmcblk2 /dev/mmcblk2: Timing buffered disk reads: 256 MB in 3.02 seconds = 84.83 MB/sec Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit fca051b02a57c6cf9f58e83140aaf00e19c74e92 Author: Marcel Ziswiler Date: Sat Sep 1 15:04:54 2018 +0200 ARM: tegra: apalis-tk1: add proper emmc vmmc and vqmmc supplies Add proper eMMC vmmc and vqmmc supplies e.g. fixing signalling voltage. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit 958b767d683a8ee77dbed5c19d79818fb15dffe9 Author: Marcel Ziswiler Date: Sat Sep 1 15:04:53 2018 +0200 ARM: tegra: apalis-tk1: reorder backlight properties Reorder backlight properties. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit 138ce63521597c69f71b03950d97c7ee727ec5ea Author: Marcel Ziswiler Date: Sat Sep 1 15:04:52 2018 +0200 ARM: tegra: apalis-tk1: white-space clean-up White-space clean-up. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit 35a2473f6dc89ee39ab30fa1a6b160e5a5d8142a Author: Marcel Ziswiler Date: Sat Sep 1 15:04:51 2018 +0200 ARM: tegra: apalis-tk1: drop unused pinmux label Drop unused pinmux label. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit 8c3a9d213bfe8b8f131772342bf61123402b0489 Author: Marcel Ziswiler Date: Sat Sep 1 15:04:50 2018 +0200 ARM: tegra: apalis-tk1: add missing regulators Add missing regulators: - reg_module_3v3_audio being VDDA supply of SGTL5000 - VDDD supply of SGTL5000 actually being reg_1v8_vio - TMP451 temperature sensor vcc supply being reg_module_3v3 - usb3-0 vbus supply being reg_usbh_vbus - usb3-1 vbus supply being reg_usbo1_vbus - carrier board HDMI supply being reg_5v0 - carrier board sata target 5v supply being reg_5v0 - carrier board sata target 12v supply being reg_12v0 - carrier board reg_3v3 actually being backlight power supply Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit 1bef3a5716b4516c742dee6750cc47f44d77d378 Author: Marcel Ziswiler Date: Sat Sep 1 15:04:49 2018 +0200 ARM: tegra: apalis-tk1: regulator clean-up Just cosmetic regulator clean-up. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit a945eae0c603882e2744253738f3a209b1e4bd49 Author: Marcel Ziswiler Date: Sat Sep 1 15:04:48 2018 +0200 ARM: tegra: apalis-tk1: reorder padctl properties Reorder padctl properties. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit f2f7bf06c54af33fbc482fe4ae83a4fb9928f956 Author: Marcel Ziswiler Date: Sat Sep 1 15:04:47 2018 +0200 ARM: tegra: apalis-tk1: reorder host1x/hdmi properties Reorder Host1x/HDMI properties. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit 864495be67f8c7b1c54d6b87b9bc55bc479485a4 Author: Marcel Ziswiler Date: Sat Sep 1 15:04:46 2018 +0200 ARM: tegra: apalis-tk1: add local-mac-address property Add empty local-mac-address property to be filled in by boot loader (e.g. U-Boot). Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit 5ffdfa1aca4cd11b0f0c8a52a81c4e3ddcd49e22 Author: Marcel Ziswiler Date: Sat Sep 1 10:12:48 2018 +0200 ARM: tegra: colibri_t30: annotate power I2C being on-module The power I2C bus aka PWR_I2C which connects to the audio codec, PMIC, temperature sensor and touch screen controller is really on-module only. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit f7ce7658c03cbbf0933870a56b6e89005c80e404 Author: Marcel Ziswiler Date: Sat Sep 1 10:12:47 2018 +0200 ARM: tegra: colibri_t30: annotate unused i2c busses Both GEN2_I2C as well as CAM_I2C (I2C3) are unused in our design. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit 070c1342719c5ba165a751205ad96b1f7e85741a Author: Marcel Ziswiler Date: Sat Sep 1 10:12:46 2018 +0200 ARM: tegra: colibri_t30: add mcp2515 vdd and xceiver supplies Add the MCP2515 SPI CAN controller's vdd-supply being the regular carrier board's reg_3v3 and xceiver-supply being reg_5v0. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit e4f75fd1118d4eec6469f4ff7cc6e790c15dd23e Author: Marcel Ziswiler Date: Sat Sep 1 10:12:45 2018 +0200 ARM: tegra: colibri_t30: remove unused mcp2515 can0 label Get rid of the unused MCP2515 SPI CAN controller can0 label. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit 503fcd8464fb6cd18073e97dec59b933930655d6 Author: Marcel Ziswiler Date: Sat Sep 1 10:12:44 2018 +0200 ARM: tegra: colibri_t30: fix mcp2515 can controller interrupt polarity Fix the MCP2515 SPI CAN controller interrupt polarity which according to its datasheet defaults to low-active aka falling edge. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit 63ad93767ad60cd7722c7a0b0c6af59e2d1cfd5b Author: Marcel Ziswiler Date: Sat Sep 1 10:12:43 2018 +0200 ARM: tegra: colibri_t30: rename tps65911@2d, stmpe811@41 and tps62362@60 Rename a few nodes using more common names: - rename tps65911@2d to pmic@2d - rename stmpe811@41 to touchscreen@41 - rename tps62362@60 to regulator@60 Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit 8941e330492502c6b9a28cfe6076e9ab1b80ac07 Author: Marcel Ziswiler Date: Sat Sep 1 10:12:42 2018 +0200 ARM: tegra: colibri_t30: rename hdmiddc to hdmi_ddc Rename hdmiddc to hdmi_ddc to be more in-line with other device trees. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit ccb99d44c393a0c1be89d3ae64bdad0237a6bae6 Author: Marcel Ziswiler Date: Sat Sep 1 10:12:41 2018 +0200 ARM: tegra: colibri_t30: drop obsolete spidev node Drop obsolete spidev device tree node as nowadays one should do this by binding the spidev driver to specific instances/chip selects at runtime. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit 9eca7649a712eb147679acd804708fd37ddb5faf Author: Marcel Ziswiler Date: Sat Sep 1 10:12:40 2018 +0200 ARM: tegra: colibri_t30: drop module level model and compatible Drop model and compatible nodes from the module level device tree as they get overridden by the carrier board device tree anyway. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit a1f5a76ff054cc96970b116f88636fa2ecba75d6 Author: Marcel Ziswiler Date: Sat Sep 1 10:12:39 2018 +0200 ARM: tegra: colibri_t30: update compatibility comment Update compatibility comment. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit 20fd13e2a1bf67f002a56a5aa0ca27b2f0978358 Author: Marcel Ziswiler Date: Sat Sep 1 10:12:38 2018 +0200 ARM: tegra: colibri_t30: annotate ehci instance 1 Annotate EHCI instance 1 (USB2_DP/N) connecting to ASIX AX88772B USB to Ethernet chip being on-module. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit f234e54388483e03d6c3029654c5bd787defe5ff Author: Marcel Ziswiler Date: Sat Sep 1 10:12:37 2018 +0200 ARM: tegra: colibri_t30: annotate sd card detect Annotate SD card detect. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit e0957df84a542286a9c468fe81777d4e837815ce Author: Marcel Ziswiler Date: Sat Sep 1 10:12:36 2018 +0200 ARM: tegra: colibri_t30: enable hda over hdmi Enable HDA over HDMI. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit 1e7c4fc3daa3da63492296f7ed6ce59aaaa4595a Author: Marcel Ziswiler Date: Sat Sep 1 10:12:35 2018 +0200 ARM: tegra: colibri_t30: add gpio hog to unreset usb ethernet chip Add GPIO hog to unreset ASIX AX88772B USB Ethernet chip. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit 0fb83a83691f8681264653ebeb8b29664694d44b Author: Marcel Ziswiler Date: Sat Sep 1 10:12:34 2018 +0200 ARM: tegra: colibri_t30: remove unused nvidia, is-wired property Remove unused nvidia,is-wired property. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit ead9a4c36db53cf31008ac723e7dc8a4ed53700d Author: Marcel Ziswiler Date: Sat Sep 1 10:12:33 2018 +0200 ARM: tegra: colibri_t30: move input include to carrier board Move input include to carrier board. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit 23a13d4c4dacc79b10b353f0149b5fd59f3a1f47 Author: Marcel Ziswiler Date: Sat Sep 1 10:12:32 2018 +0200 ARM: tegra: colibri_t30: line break long compatible property line Line break long compatible property line. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit 932079d01b177bc668d20b4d854cb9de59b5f2cc Author: Marcel Ziswiler Date: Sat Sep 1 10:12:31 2018 +0200 ARM: tegra: colibri_t30: get rid of fake clocks simple bus Get rid of the fake clocks simple bus and use node names as per the actual schematics. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit dc741b7bde05a7d1e4382c7c633667fbda0f27cc Author: Marcel Ziswiler Date: Sat Sep 1 10:12:30 2018 +0200 ARM: tegra: colibri_t30: enable emmc ddr52 mode Add mmc-ddr-1_8v property enabling eMMC DDR52 mode. root@colibri-t30:~# cat /sys/kernel/debug/mmc1/ios clock: 52000000 Hz actual clock: 52000000 Hz vdd: 21 (3.3 ~ 3.4 V) bus mode: 2 (push-pull) chip select: 0 (don't care) power mode: 2 (on) bus width: 3 (8 bits) timing spec: 8 (mmc DDR52) signal voltage: 1 (1.80 V) driver type: 0 (driver type B) root@colibri-t30:~# hdparm -t /dev/mmcblk1 /dev/mmcblk1: Timing buffered disk reads: 222 MB in 3.00 seconds = 73.92 MB/sec Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit 44925e4f6e35b6bb2a602bfd7546965848164a00 Author: Marcel Ziswiler Date: Sat Sep 1 10:12:29 2018 +0200 ARM: tegra: colibri_t30: add proper emmc vmmc and vqmmc supplies Add proper eMMC vmmc and vqmmc supplies e.g. fixing signalling voltage. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit bc1fa5d2716f307e94e7b6f2181a424723c56c21 Author: Marcel Ziswiler Date: Sat Sep 1 10:12:28 2018 +0200 ARM: tegra: colibri_t30: add i2c-thermtrip Add i2c-thermtrip which would set the DEV_OFF bit in the DCDC control register of the TPS65911 PMIC. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit 71fd500b3806af5b54753ea66de2eb362fa2a1e9 Author: Marcel Ziswiler Date: Sat Sep 1 10:12:27 2018 +0200 ARM: tegra: colibri_t30: further lm95245 temperature sensor annotation Further LM95245 temperature sensor annotation. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit d19c81ca22898152ff91e0578c5c7329f233444d Author: Marcel Ziswiler Date: Sat Sep 1 10:12:26 2018 +0200 ARM: tegra: colibri_t30: use proper irq-gpio for stmpe811 Use proper irq-gpio for stmpe811 touch controller. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit dbd43f25205e7302e3253621d7f104997b2381cb Author: Marcel Ziswiler Date: Sat Sep 1 10:12:25 2018 +0200 ARM: tegra: colibri_t30: add missing pinmux Explicitly mux all T30 SoC balls now: - Colibri Address/Data Bus (GMI) - Colibri DDC - Colibri EXT_IO* - Colibri GPIO - Colibri HOTPLUG_DETECT (HDMI) - Colibri I2C - Colibri LCD (L_* resp. LDD<*>) - Colibri MMC_CD - Colibri nRESET_OUT - Colibri Parallel Camera (Optional) - Colibri PWM, , - Colibri VGA - Colibri USBC_DET - Colibri USBH_PEN - Colibri USBH_OC - on-module AX88772B LAN control signals - Colibri nBATT_FAULT(SENSE) and nVDD_FAULT(SENSE - not connected and therefore disabled signals Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit 28e82cf4af51fda9f9e6eb825be353c6f1f411f9 Author: Marcel Ziswiler Date: Sat Sep 1 10:12:24 2018 +0200 ARM: tegra: colibri_t30: pinmux clean-up Clean-up pinmuxing: - white-space clean-up - explicitly disable LCD_M1 in favour of LCD_DE on L_BIAS - explicitly disable multiplexed SSPFRM and SSPTXD - get rid of nvidia,lock property - add missing eMMC sdmmc4_cmd_pt7 and explicitly enable input - explicitly disable lcd_dc1_pd2 (e.g. LM95245 I2C address pin) - annotate TOUCH_PEN_INT# being on-module - As underscores in node names are not recommended replace them all where possible with dashes. - Replace underscores in UART annotations (e.g. UART_A) with dashes (e.g. UART-A) to be more in-line with our Colibri standard. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit 0e4c51ebace1a6dd31ff2ca147f0875e1173e078 Author: Marcel Ziswiler Date: Sat Sep 1 10:12:23 2018 +0200 ARM: tegra: colibri_t30: drop pwmleds Drop pwmleds in favour of using regular PWMs. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit 7ddc024ffa382c7090640c5209d4a4ffc73c4d0b Author: Marcel Ziswiler Date: Sat Sep 1 10:12:22 2018 +0200 ARM: tegra: colibri_t30: reorder backlight properties Reorder backlight properties. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit 2a3db328b358a8aed5b2c45005b7ef95be402565 Author: Marcel Ziswiler Date: Sat Sep 1 10:12:21 2018 +0200 ARM: tegra: colibri_t30: move dr_mode property from phy to controller Move dr_mode property from USB PHY node to controller. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit 2128fda985e2b4e3a48393c24cea8ae663b62c3c Author: Marcel Ziswiler Date: Sat Sep 1 10:12:20 2018 +0200 ARM: tegra: colibri_t30: white-space clean-up White-space clean-up. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit 4dc3bf2a5f1b49061ed5b97de0f44edd76c74e22 Author: Marcel Ziswiler Date: Sat Sep 1 10:12:19 2018 +0200 ARM: tegra: colibri_t30: annotate uarts and move compatible to board Annotate UARTs and move the serial UART "nvidia,tegra30-hsuart" compatible definitions from the carrier board to the module level device trees. One could still override this in a custom carrier board device tree if required. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit a03fb6312280b19234e728689ab6a2f66a7a2cf1 Author: Marcel Ziswiler Date: Sat Sep 1 10:12:18 2018 +0200 ARM: tegra: colibri_t30: add missing regulators Add missing regulators: - reg_module_3v3_audio being VDDA supply of SGTL5000 - VDDD supply of SGTL5000 actually being reg_1v8_vio - reg_lan_v_bus being USB Ethernet chip vbus supply - carrier board HDMI supply being reg_5v0 - carrier board reg_3v3 actually being backlight and panel power supply Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit 584a9e55b539fe1a66513dd56d4093c698de6d98 Author: Marcel Ziswiler Date: Sat Sep 1 10:12:17 2018 +0200 ARM: tegra: colibri_t30: regulator clean-up Just cosmetic regulator clean-up. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit 033519b0c5f4c9ec39dcdc2afa6b216ff8233567 Author: Marcel Ziswiler Date: Sat Sep 1 10:12:16 2018 +0200 ARM: tegra: colibri_t30: reorder host1x/hdmi properties Reorder Host1x/HDMI properties. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit a5db2dadb15f67679221c6c7748d62a0eea19214 Author: Marcel Ziswiler Date: Sat Sep 1 10:12:15 2018 +0200 ARM: tegra: colibri_t30: add local-mac-address property Add empty local-mac-address property to be filled in by boot loader (e.g. U-Boot). Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit b57d6b996ebe25e7f1e92de0abc7a2da42005454 Author: Marcel Ziswiler Date: Fri Aug 31 18:38:16 2018 +0200 ARM: tegra: apalis_t30: support v1.1 hardware revision Support the V1.1 hardware revisions with the following change: Changed power rail for MMC1 interface to a 3.3V/1.8V switchable rail in order to be able to run UHS SD cards in ultra high speed 1.8V mode. [ 207.502011] mmc2: host does not support reading read-only switch, assuming write-enable [ 207.517011] mmc2: new ultra high speed SDR104 SDHC card at address aaaa [ 207.534190] mmcblk2: mmc2:aaaa SE32G 29.7 GiB [ 207.545096] mmcblk2: p1 root@apalis-t30:~# cat /sys/kernel/debug/mmc2/ios clock: 208000000 Hz actual clock: 204000000 Hz vdd: 21 (3.3 ~ 3.4 V) bus mode: 2 (push-pull) chip select: 0 (don't care) power mode: 2 (on) bus width: 2 (4 bits) timing spec: 6 (sd uhs SDR104) signal voltage: 1 (1.80 V) driver type: 0 (driver type B) root@apalis-t30:~# hdparm -t /dev/mmcblk2 /dev/mmcblk2: Timing buffered disk reads: 256 MB in 3.02 seconds = 84.71 MB/sec Signed-off-by: Marcel Ziswiler Reviewed-by: Rob Herring Signed-off-by: Thierry Reding commit a472e00b1c571408924b69c1c6c2df2320d49247 Author: Marcel Ziswiler Date: Fri Aug 31 18:38:15 2018 +0200 ARM: tegra: apalis_t30: move hda node from carrier to module Move the hda node from the carrier board to the module level device tree. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit b38f6aa4b60a1fcc41f5c469981f8f62d6070ee3 Author: Marcel Ziswiler Date: Fri Aug 31 18:38:14 2018 +0200 ARM: tegra: apalis_t30: fix mcp2515 can controller interrupt polarity Fix the MCP2515 SPI CAN controller interrupt polarity which according to its datasheet defaults to low-active aka falling edge. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit b4cfc776657b85675cbfc05c191363f78b55fd75 Author: Marcel Ziswiler Date: Fri Aug 31 18:38:13 2018 +0200 ARM: tegra: apalis_t30: rename tps65911@2d, stmpe811@41 and tps62362@60 Rename a few nodes using more common names: - rename tps65911@2d to pmic@2d - rename stmpe811@41 to touchscreen@41 - rename tps62362@60 to regulator@60 Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit 467176025c5d7f50739117ae2806cc035d9878ab Author: Marcel Ziswiler Date: Fri Aug 31 18:38:12 2018 +0200 ARM: tegra: apalis_t30: rename hdmiddc to hdmi_ddc Rename hdmiddc to hdmi_ddc to be more in-line with other device trees. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit da25001ca651430f13c0f3bebec0e969b1b4de63 Author: Marcel Ziswiler Date: Fri Aug 31 18:38:11 2018 +0200 ARM: tegra: apalis_t30: hog group for pcie switch reset gpio The Apalis Evaluation Board uses Apalis GPIO7 on MXM3 pin 15 as reset signal for its PLX PEX 8605 PCIe Switch. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit 317d9f7bedc4ee6b4d146e0a434cf3cb9f09b1ff Author: Marcel Ziswiler Date: Fri Aug 31 18:38:10 2018 +0200 ARM: tegra: apalis_t30: drop obsolete spidev nodes Drop obsolete spidev device tree nodes as nowadays one should do this by binding the spidev driver to specific instances/chip selects at runtime. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit 63a11def21eaf5da502e657695dbe389bc40879f Author: Marcel Ziswiler Date: Fri Aug 31 18:38:09 2018 +0200 ARM: tegra: apalis_t30: drop module level model and compatible Drop model and compatible nodes from the module level device tree as they get overridden by the carrier board device tree anyway. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit b0fa0105b496abf6c51bf79abf490ea4e0ee9855 Author: Marcel Ziswiler Date: Fri Aug 31 18:38:08 2018 +0200 dt-bindings: add broadcom (formerly plx technology) vendor prefix PLX Technology meanwhile got bought by Broadcom Corporation but the vendor prefix plx is still used in 8 current device trees. This silences the following checkpatch.pl warning: WARNING: DT compatible string vendor "plx" appears un-documented -- check ./Documentation/devicetree/bindings/vendor-prefixes.txt Signed-off-by: Marcel Ziswiler Reviewed-by: Andreas Färber Acked-by: Rob Herring Signed-off-by: Thierry Reding commit 70451b5e6733d823632ebf1a73ace9b17f28ce47 Author: Marcel Ziswiler Date: Fri Aug 31 18:38:07 2018 +0200 ARM: tegra: apalis_t30: line break long compatible property line Line break long compatible property line. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit 7b0f47aa62085db10d54849092f58f317b49b84d Author: Marcel Ziswiler Date: Fri Aug 31 18:38:06 2018 +0200 ARM: tegra: apalis_t30: get rid of fake clocks simple bus Get rid of the fake clocks simple bus and use node names as per the actual schematics. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit 200be313fdc9bb9810bba3450698c1bf923b814f Author: Marcel Ziswiler Date: Fri Aug 31 18:38:05 2018 +0200 ARM: tegra: apalis_t30: enable emmc ddr52 mode Add mmc-ddr-1_8v property enabling eMMC DDR52 mode. root@apalis-t30:~# cat /sys/kernel/debug/mmc1/ios clock: 52000000 Hz actual clock: 52000000 Hz vdd: 21 (3.3 ~ 3.4 V) bus mode: 2 (push-pull) chip select: 0 (don't care) power mode: 2 (on) bus width: 3 (8 bits) timing spec: 8 (mmc DDR52) signal voltage: 1 (1.80 V) driver type: 0 (driver type B) root@apalis-t30:~# hdparm -t /dev/mmcblk1 /dev/mmcblk1: Timing buffered disk reads: 232 MB in 3.01 seconds = 77.10 MB/sec Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit 0f0a3831290d05a32a653736bc14cfc0f391643b Author: Marcel Ziswiler Date: Fri Aug 31 18:38:04 2018 +0200 ARM: tegra: apalis_t30: add proper emmc vmmc and vqmmc supplies Add proper eMMC vmmc and vqmmc supplies e.g. fixing signalling voltage. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit 5f1fe7b62dceb24268aaf5b9327328cf54abc1f7 Author: Marcel Ziswiler Date: Fri Aug 31 18:38:03 2018 +0200 ARM: tegra: apalis_t30: add i2c-thermtrip Add i2c-thermtrip which would set the DEV_OFF bit in the DCDC control register of the TPS65911 PMIC. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit 16f53ab291f3e829ce56a2200870cdbf897df6d7 Author: Marcel Ziswiler Date: Fri Aug 31 18:38:02 2018 +0200 ARM: tegra: apalis_t30: further lm95245 temperature sensor annotation Further LM95245 temperature sensor annotation. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit f38f7998b7c7f55db2947b49733aed2fc177747b Author: Marcel Ziswiler Date: Fri Aug 31 18:38:01 2018 +0200 ARM: tegra: apalis_t30: use proper irq-gpio for stmpe811 Use proper irq-gpio for stmpe811 touch controller. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit 368f139bf7287d19c7df150a1da692dae4465d3a Author: Marcel Ziswiler Date: Fri Aug 31 18:38:00 2018 +0200 ARM: tegra: apalis_t30: add missing pinmux Explicitly mux all T30 SoC balls now: - Apalis GPIO - Apalis HDMI1 - Apalis I2C1 - Apalis I2C2 (DDC) - Apalis LCD1 - Apalis Parallel Camera - Apalis SATA1_ACT# - Apalis SPDIF1 - Apalis TS (Low-speed type specific) - Apalis USBH_EN - Apalis USBH_OC# - Apalis VGA1 - on-module i210/i211 LAN control signals - not connected and therefore disabled signals Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit 727002e06144caf8cac2c1244fe028ddb3d2db10 Author: Marcel Ziswiler Date: Fri Aug 31 18:37:59 2018 +0200 ARM: tegra: apalis_t30: pinmux clean-up Clean-up pinmuxing: - white-space clean-up - explicitly disable input of BKL1_ON, BKL1_PWM and BKL1_PWM_EN# - annotate Apalis I2C3 usage for CAM - get rid of nvidia,lock property - add missing eMMC sdmmc4_cmd_pt7 and explicitly enable input - explicitly disable lcd_dc1_pd2 (e.g. LM95245 I2C address pin) - annotate TOUCH_PEN_INT# being on-module - As underscores in node names are not recommended replace them all where possible with dashes. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit e0911663bcd69555b9ac4b7bbd443911c5521cbb Author: Marcel Ziswiler Date: Fri Aug 31 18:37:58 2018 +0200 ARM: tegra: apalis_t30: drop pwmleds Drop pwmleds in favour of using regular PWMs. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit 654b7139a2943285c96aa83921557f39cfebdad4 Author: Marcel Ziswiler Date: Fri Aug 31 18:37:57 2018 +0200 ARM: tegra: apalis_t30: reorder backlight properties Reorder backlight properties. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit 8bf0d6b2a7ae84a397ef5b6e9e16c4f6dc679797 Author: Marcel Ziswiler Date: Fri Aug 31 18:37:56 2018 +0200 ARM: tegra: apalis_t30: move dr_mode property from phy to controller Move dr_mode property from USB PHY node to controller. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit 005a00d862114c064d47a67f54f40c7c3128daa1 Author: Marcel Ziswiler Date: Fri Aug 31 18:37:55 2018 +0200 ARM: tegra: apalis_t30: annotate mmc1/sd1 Annotate MMC1/SD1. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit d5330b4731dff3073609b8c56090eca32532db3d Author: Marcel Ziswiler Date: Fri Aug 31 18:37:54 2018 +0200 ARM: tegra: apalis_t30: drop unused mmc1/sd1 labels Drop unused mmc1/sd1 labels. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit 4eb7e5ede0157d1b2095aad34e91d247f029226a Author: Marcel Ziswiler Date: Fri Aug 31 18:37:53 2018 +0200 ARM: tegra: apalis_t30: white-space/newline clean-up White-space and newline clean-up. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit 95bcc02a899e162af7d154708416d1d723c34ecd Author: Marcel Ziswiler Date: Fri Aug 31 18:37:52 2018 +0200 ARM: tegra: apalis_t30: drop unused cami2c label Drop unused cami2c label. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit e073452b4aa1c63f6bd7075269a0eae764a69fba Author: Marcel Ziswiler Date: Fri Aug 31 18:37:51 2018 +0200 ARM: tegra: apalis_t30: annotate uarts and move compatible to board Annotate UARTs and move the serial UART "nvidia,tegra30-hsuart" compatible definitions from the carrier board to the module level device trees. One could still override this in a custom carrier board device tree if required. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit 32980cbccf161b06137b6b0a1235b4b4082fc1bf Author: Marcel Ziswiler Date: Fri Aug 31 18:37:50 2018 +0200 ARM: tegra: apalis_t30: add missing regulators Add missing regulators: - reg_module_3v3_audio being VDDA supply of SGTL5000 - VDDD supply of SGTL5000 actually being reg_1v8_vio - carrier board HDMI supply being reg_5v0 - carrier board reg_3v3 actually being backlight and panel power supply Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit f98439c3bba5083c3376eb88c80a54dce4837f30 Author: Marcel Ziswiler Date: Fri Aug 31 18:37:49 2018 +0200 ARM: tegra: apalis_t30: regulator clean-up Just cosmetic regulator clean-up. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit a772d28d908995a686c4da7a2578c5b359b49000 Author: Marcel Ziswiler Date: Fri Aug 31 18:37:48 2018 +0200 ARM: tegra: apalis_t30: reorder host1x/hdmi properties Reorder Host1x/HDMI properties. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit 7890d7856a989a7f2a4c46ec84c4ecda6a760c11 Author: Marcel Ziswiler Date: Fri Aug 31 18:37:47 2018 +0200 ARM: tegra: apalis_t30: annotate/clean-up pcie controller/port nodes Annotate PCIe port nodes and clean-up PCIe controller/port status' with respect to carrier board vs. module level device trees. As port 3 connects to the on-module Gigabit Ethernet MACPHY it is always enabled together with the PCIe controller itself. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit 4f6b07a2787b97380dc278ce28bd4438817f7525 Author: Marcel Ziswiler Date: Fri Aug 31 18:37:46 2018 +0200 ARM: tegra: apalis_t30: reorder pcie properties Reorder PCIe properties. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit 2c87441c41641036a93511fbe92522ad772e9680 Author: Marcel Ziswiler Date: Fri Aug 31 18:37:45 2018 +0200 ARM: tegra: apalis_t30: add local-mac-address property Add empty local-mac-address property to be filled in by boot loader (e.g. U-Boot). Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit 055c0107afed975b27d838bbc99ddf2066e868db Author: Marcel Ziswiler Date: Fri Aug 31 18:37:44 2018 +0200 ARM: tegra: apalis_t30: pull-up sd card detect pins In order to avoid any floating SD card detect pins as may e.g. happen on Ixora V1.1A pull them all up. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit 1c997fe4becdc6fcbc06e23982ceb65621e6572a Author: Marcel Ziswiler Date: Fri Aug 31 18:37:43 2018 +0200 ARM: tegra: apalis_t30: fix mmc1 cmd pull-up Fix MMC1 cmd pin pull-up causing issues on carrier boards without external pull-up. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit 3cfa210bf3fe0803cca17f3775d8cf2360d5f443 Author: Christoph Hellwig Date: Tue Sep 25 13:30:09 2018 -0700 xen: don't include from and Nothing Xen specific in these headers, which get included from a lot of code in the kernel. So prune the includes and move them to the Xen-specific files that actually use them instead. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit c39ae60dfbda66922f644193b91850abcd4d588c Author: Christoph Hellwig Date: Tue Sep 25 13:30:08 2018 -0700 block: remove ARCH_BIOVEC_PHYS_MERGEABLE Take the Xen check into the core code instead of delegating it to the architectures. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 20e3267601f95ff62d7a3116a17a680e9f5cbcc9 Author: Christoph Hellwig Date: Tue Sep 25 13:30:07 2018 -0700 xen: provide a prototype for xen_biovec_phys_mergeable in xen.h Having multiple externs in arch headers is not a good way to provide a common interface. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit cd11b1d344784b1a4c0d7aa18edc0830fd3989d1 Author: Christoph Hellwig Date: Tue Sep 25 13:30:06 2018 -0700 xen: remove the xen_biovec_phys_mergeable export BIOVEC_PHYS_MERGEABLE is only called from core block code. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit a5bb207ada5b6631906818ed0b7f62a5475cafcc Author: Christoph Hellwig Date: Tue Sep 25 13:30:05 2018 -0700 arm: remove the unused BIOVEC_MERGEABLE define Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 2db12b16e58a562fdf161b226739d30ea06bcd37 Author: Marcel Ziswiler Date: Thu Aug 16 10:06:04 2018 +0200 ARM: dts: tegra20/tegra30: add pmu interrupt-affinity This is similar to tegra124 and avoids the following being reported upon boot: hw perfevents: no interrupt-affinity property for /pmu, guessing. Signed-off-by: Marcel Ziswiler Reviewed-by: Stefan Agner Signed-off-by: Thierry Reding commit 8188391c127ea34d66f37eda6755d0acb51dc600 Author: Marcel Ziswiler Date: Thu Aug 16 10:06:03 2018 +0200 ARM: dts: tegra20: restore address order Commit 6c468f109884 ("ARM: dts: tegra: add Tegra20 NAND flash controller node") introduced the nand-controller node. However, it got added at the wrong spot not honoring the address order. Fix this. Signed-off-by: Marcel Ziswiler Reviewed-by: Stefan Agner Signed-off-by: Thierry Reding commit 564706f65cda3de52b09e51feb423a43940fe661 Author: Marcel Ziswiler Date: Fri Aug 31 14:42:33 2018 +0200 ARM: dts: tegra30: fix xcvr-setup-use-fuses There was a dot instead of a comma. Fix this. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding commit 50bac83c80dd20e6c6b80afccadf5c70cbbc816e Author: Thierry Reding Date: Wed Sep 26 16:09:46 2018 +0200 gpu: host1x: Remove spurious tab All other assignments have a single space around the = sign, so remove the spurious tab for consistency. Signed-off-by: Thierry Reding commit 9b6c14b8aa469e47fdf51d2e6cf6dd59975b8d02 Author: Thierry Reding Date: Fri Sep 21 12:27:46 2018 +0200 drm/tegra: sor: Add Tegra194 support The SOR implemented in Tegra194 is subtly different from its predecessor found in Tegra186. Most notably some registers have been moved around so it is no longer compatible. Signed-off-by: Thierry Reding commit 30f11cfd6a707868b49cdc9a72e4bfbf798be5a7 Author: Thierry Reding Date: Fri Sep 21 12:27:45 2018 +0200 drm/tegra: dpaux: Add Tegra194 support The DPAUX controller found on Tegra194 is almost identical to its predecessor from Tegra186. Signed-off-by: Thierry Reding commit 474431968507d437d340de35b709aa3b41f8c996 Author: Thierry Reding Date: Fri Sep 21 12:27:44 2018 +0200 drm/tegra: dc: Add Tegra194 support The display controllers found on Tegra194 are almost identical to those found on Tegra186. Signed-off-by: Thierry Reding commit 5725daaab55ca023c87ff0f1b2dbf6bf9b38376d Author: Thierry Reding Date: Fri Sep 21 12:27:43 2018 +0200 drm/tegra: hub: Add Tegra194 support The display hub integrated into Tegra194 is almost identical to the one found on Tegra186. However, it doesn't support DSC (display stream compression) so it isn't fully compatible. Signed-off-by: Thierry Reding commit 759d706f7cb4adbec1c222f7550dc8fa2683c089 Author: Thierry Reding Date: Fri Sep 21 12:27:42 2018 +0200 drm/tegra: dc: Do not register DC without primary plane Tegra194 contains a fourth display controller that does not own any windows. Therefore, we cannot currently assign a primary plane to it which causes KMS to eventually crash. Do not register the display controller if it owns no windows to work around this. Note that we still have to enable and probe the display controller because for some reason all display controllers need to be powered (and/or clocked) before any registers can be accessed in any of the display controllers. Signed-off-by: Thierry Reding commit f31fb2fe1ea4a03279c538612e7ecf0e5017639a Author: Thierry Reding Date: Fri Sep 21 12:13:07 2018 +0200 pwm: tegra: Remove gratuituous blank line It's common to follow a device tree ID table by the MODULE_DEVICE_TABLE immediately, without an extra blank line between. Signed-off-by: Thierry Reding Signed-off-by: Thierry Reding commit d9fd22447ba59a9b53a202fade977e82bfba8d8d Author: Thierry Reding Date: Fri Sep 21 12:14:46 2018 +0200 arm64: tegra: I2C on Tegra194 is not compatible with Tegra114 Tegra194 contains a version of the I2C controller that is no longer compatible with the version found in Tegra114. Signed-off-by: Thierry Reding commit ac3b35f11a06964f5fe7f6ea9a190a28a7994704 Author: Thomas Zimmermann Date: Wed Sep 26 14:02:12 2018 +0200 drm/udl: 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: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20180926120212.25359-1-tzimmermann@suse.de commit 186b45657b244ce865e01b65d73868a48252e1ff Author: David Summers Date: Sun Sep 23 13:38:07 2018 +0200 ARM: dts: rockchip: add rk3288-based Tinker board S Add the actual dts for the tinker board S, which brings its own emmc device, not therefore not requiring an sd-card to boot. Signed-off-by: David Summers Signed-off-by: Heiko Stuebner commit e58c5e739d6f0bd2d5f1796f7638e7a3d53379b0 Author: David Summers Date: Sun Sep 23 13:38:06 2018 +0200 ARM: dts: rockchip: move shared tinker-board nodes to a common dtsi Tinker Board and Tinker Board S share most of their components, so should also not replicate these for each variant. So move them to a shared dtsi that then can get included by both boards. Signed-off-by: David Summers Signed-off-by: Heiko Stuebner commit dd0da407bb64afda94ce4a068c5f9f43c291e788 Author: Antoine Tenart Date: Mon Sep 24 11:00:02 2018 +0200 arm64: dts: marvell: armada-cp110: describe more PPv2 interrupts This patch describes 3 additional interrupts per PPv2 port. Those interrupts will be used later in future versions of the Marvell PPv2 driver, and now the device tree description matches the hardware capabilities. Signed-off-by: Antoine Tenart Signed-off-by: Gregory CLEMENT commit eeee84f7a6400807e22240e3bd43aac4a01c0471 Author: Antoine Tenart Date: Mon Sep 24 11:00:01 2018 +0200 arm64: dts: marvell: armada-cp110: change the PPv2 IRQ names This patch changes the PPv2 IRQ names in the CP110 device tree to match a corresponding change in the Marvell PPv2 driver. The reason this was updated is the IRQ where names after Tx/Rx interrupts, but this is not true and can be configured. A following patch will add more of them and the names wouldn't make sense. Signed-off-by: Antoine Tenart Signed-off-by: Gregory CLEMENT commit bb4b3b7762735cdaba5a40fd94c9303d9ffa147a Author: Jiri Kosina Date: Tue Sep 25 14:39:28 2018 +0200 x86/speculation: Propagate information about RSB filling mitigation to sysfs If spectrev2 mitigation has been enabled, RSB is filled on context switch in order to protect from various classes of spectrev2 attacks. If this mitigation is enabled, say so in sysfs for spectrev2. Signed-off-by: Jiri Kosina Signed-off-by: Thomas Gleixner Cc: Peter Zijlstra Cc: Josh Poimboeuf Cc: Andrea Arcangeli Cc: "WoodhouseDavid" Cc: Andi Kleen Cc: Tim Chen Cc: "SchauflerCasey" Link: https://lkml.kernel.org/r/nycvar.YFH.7.76.1809251438580.15880@cbobk.fhfr.pm commit 53c613fe6349994f023245519265999eed75957f Author: Jiri Kosina Date: Tue Sep 25 14:38:55 2018 +0200 x86/speculation: Enable cross-hyperthread spectre v2 STIBP mitigation STIBP is a feature provided by certain Intel ucodes / CPUs. This feature (once enabled) prevents cross-hyperthread control of decisions made by indirect branch predictors. Enable this feature if - the CPU is vulnerable to spectre v2 - the CPU supports SMT and has SMT siblings online - spectre_v2 mitigation autoselection is enabled (default) After some previous discussion, this leaves STIBP on all the time, as wrmsr on crossing kernel boundary is a no-no. This could perhaps later be a bit more optimized (like disabling it in NOHZ, experiment with disabling it in idle, etc) if needed. Note that the synchronization of the mask manipulation via newly added spec_ctrl_mutex is currently not strictly needed, as the only updater is already being serialized by cpu_add_remove_lock, but let's make this a little bit more future-proof. Signed-off-by: Jiri Kosina Signed-off-by: Thomas Gleixner Cc: Peter Zijlstra Cc: Josh Poimboeuf Cc: Andrea Arcangeli Cc: "WoodhouseDavid" Cc: Andi Kleen Cc: Tim Chen Cc: "SchauflerCasey" Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/nycvar.YFH.7.76.1809251438240.15880@cbobk.fhfr.pm commit dbfe2953f63c640463c630746cd5d9de8b2f63ae Author: Jiri Kosina Date: Tue Sep 25 14:38:18 2018 +0200 x86/speculation: Apply IBPB more strictly to avoid cross-process data leak Currently, IBPB is only issued in cases when switching into a non-dumpable process, the rationale being to protect such 'important and security sensitive' processess (such as GPG) from data leaking into a different userspace process via spectre v2. This is however completely insufficient to provide proper userspace-to-userpace spectrev2 protection, as any process can poison branch buffers before being scheduled out, and the newly scheduled process immediately becomes spectrev2 victim. In order to minimize the performance impact (for usecases that do require spectrev2 protection), issue the barrier only in cases when switching between processess where the victim can't be ptraced by the potential attacker (as in such cases, the attacker doesn't have to bother with branch buffers at all). [ tglx: Split up PTRACE_MODE_NOACCESS_CHK into PTRACE_MODE_SCHED and PTRACE_MODE_IBPB to be able to do ptrace() context tracking reasonably fine-grained ] Fixes: 18bf3c3ea8 ("x86/speculation: Use Indirect Branch Prediction Barrier in context switch") Originally-by: Tim Chen Signed-off-by: Jiri Kosina Signed-off-by: Thomas Gleixner Cc: Peter Zijlstra Cc: Josh Poimboeuf Cc: Andrea Arcangeli Cc: "WoodhouseDavid" Cc: Andi Kleen Cc: "SchauflerCasey" Link: https://lkml.kernel.org/r/nycvar.YFH.7.76.1809251437340.15880@cbobk.fhfr.pm commit a6120833272c03693c6e027f3a0313c7ca8100ae Author: Baruch Siach Date: Sat Sep 22 21:59:43 2018 +0300 arm64: dts: add support for SolidRun Clearfog GT 8K The SolidRun Clearfog GT-8K is based on Marvell Armada 8040 SoC. https://wiki.solid-run.com/doku.php?id=products:a8040:clearfoggt8k The following devices were tested with this DT on top of kernel v4.19-rc4: * 1GB Ethernet WAN * 4 ports 1GB Ethernet switch (2.5GB uplink) * SFP port * SATA on CON3 PCIe slot * USB3 type A port * SD card and eMMC * 2 LEDs * 2 push buttons [gregory: fix block comment alignement] Signed-off-by: Baruch Siach Signed-off-by: Gregory CLEMENT commit 4cb1480f5f63178952cd9e457f405fd806260bc0 Author: Chris Brandt Date: Mon Sep 24 11:49:37 2018 -0500 clk: renesas: r7s9210: Move table update to separate function Same functionality, just easier to read. Signed-off-by: Chris Brandt Signed-off-by: Geert Uytterhoeven commit b9553c13b10e90c7ee3c1830b88d6af3cb4fd371 Author: Chris Brandt Date: Mon Sep 24 11:49:36 2018 -0500 clk: renesas: r7s9210: Convert some clocks to early The OSTM timer driver for RZ/A2 uses TIMER_OF_DECLARE which requires the ostm module clocks to be registers early in boot. Signed-off-by: Chris Brandt Signed-off-by: Geert Uytterhoeven commit 1f7db7bbf031828178216527523b29cb6001f86f Author: Chris Brandt Date: Mon Sep 24 11:49:35 2018 -0500 clk: renesas: cpg-mssr: Add early clock support Add support for SoCs that need to register core and module clocks early in order to use OF drivers that exclusively use macros such as TIMER_OF_DECLARE. Signed-off-by: Chris Brandt Signed-off-by: Geert Uytterhoeven commit 91e75bde634b6bb4f76e4f4984c26fd0510619e2 Author: Heiko Stuebner Date: Wed Aug 22 14:02:12 2018 +0200 arm64: dts: rockchip: add missing address and size cells for rk3399 mipi dsi DSI controllers are also the hosts of their dsi bus and therefore contain nodes describing the attached panels with their reg properties containing the virtual ids. The dsi controller nodes on rk3399 lacked the #address-cells and #size-cells for these subnodes, so add them. Signed-off-by: Heiko Stuebner commit cd7ab133db383204c9712e1c6fe9dcaa14f90955 Author: Chen-Yu Tsai Date: Wed Sep 26 12:53:57 2018 +0800 arm64: dts: rockchip: Enable SPI NOR flash on Rock64 The Pine64 Rock64 board comes with a GigaDevice GD25Q128CSIG or GD25Q127CSIG chip, which is a 128 Mbit SPI NOR flash chip that supports the JEDEC read-ID command. This patch enables the SPI controller and adds a device node for the flash chip using the generic "jedec,spi-nor" comaptible. Signed-off-by: Chen-Yu Tsai Signed-off-by: Heiko Stuebner commit e4f3fb4909677c33f97a871af56b9115f3e178b4 Author: Akash Gajjar Date: Wed Sep 26 11:54:57 2018 +0530 arm64: dts: rockchip: add initial dts support for Rockpro64 Rockpro64 is a rockchip RK3399 based board from pine64.org. This patch adds basic device node support for Rockpro64 board and make it able to bring up. Peripheral Works - Sdcard - USB 2.0, 3.0 - Leds - Ethernet - Debug console Not working: - USB Type-C Signed-off-by: Akash Gajjar Acked-by: Deepak Das Reviewed-by: Rob Herring Signed-off-by: Heiko Stuebner commit 158928f38e1c6f3ac4dd83cf2240ae412179005d Author: Takeshi Kihara Date: Thu Jul 26 05:39:50 2018 +0900 arm64: dts: renesas: r8a77965: Add Sound and Audio DMAC device nodes Based on a similar patch of the R8A7796 device tree by Kuninori Morimoto . Signed-off-by: Takeshi Kihara Signed-off-by: Yoshihiro Kaneko Tested-by: Simon Horman Signed-off-by: Simon Horman commit 9c1442a9d039a1a3302fa93e9a11001c5f23b624 Author: Ben Hutchings Date: Sun Sep 16 16:22:47 2018 +0100 x86: boot: Fix EFI stub alignment We currently align the end of the compressed image to a multiple of 16. However, the PE-COFF header included in the EFI stub says that the file alignment is 32 bytes, and when adding an EFI signature to the file it must first be padded to this alignment. sbsigntool commands warn about this: warning: file-aligned section .text extends beyond end of file warning: checksum areas are greater than image size. Invalid section table? Worse, pesign -at least when creating a detached signature- uses the hash of the unpadded file, resulting in an invalid signature if padding is required. Avoid both these problems by increasing alignment to 32 bytes when CONFIG_EFI_STUB is enabled. Signed-off-by: Ben Hutchings Signed-off-by: Ard Biesheuvel commit c33ce984435bb6142792802d75513a71e55d1969 Author: Hans de Goede Date: Wed Sep 12 20:32:05 2018 +0200 efi/x86: Call efi_parse_options() from efi_main() Before this commit we were only calling efi_parse_options() from make_boot_params(), but make_boot_params() only gets called if the kernel gets booted directly as an EFI executable. So when booted through e.g. grub we ended up not parsing the commandline in the boot code. This makes the drivers/firmware/efi/libstub code ignore the "quiet" commandline argument resulting in the following message being printed: "EFI stub: UEFI Secure Boot is enabled." Despite the quiet request. This commits adds an extra call to efi_parse_options() to efi_main() to make sure that the options are always processed. This fixes quiet not working. This also fixes the libstub code ignoring nokaslr and efi=nochunk. Reported-by: Peter Robinson Signed-off-by: Hans de Goede Signed-off-by: Ard Biesheuvel commit b8b39bff3c7c07a5a8c85ebfd25d5b3ab3b3e2a1 Author: Aaron Ma Date: Thu Sep 13 02:00:08 2018 +0800 efi/x86: earlyprintk - Add 64bit efi fb address support EFI GOP uses 64-bit frame buffer address in some BIOS. Add 64bit address support in efi earlyprintk. Signed-off-by: Aaron Ma Signed-off-by: Ard Biesheuvel commit 4eda11175fd9241908efb523b7f6e8a7c15afdb7 Author: Sebastian Andrzej Siewior Date: Tue Jul 24 21:28:55 2018 +0200 efi/x86: drop task_lock() from efi_switch_mm() efi_switch_mm() is a wrapper around switch_mm() which saves current's ->active_mm, sets the requests mm as ->active_mm and invokes switch_mm(). I don't think that task_lock() is required during that procedure. It protects ->mm which isn't changed here. It needs to be mentioned that during the whole procedure (switch to EFI's mm and back) the preemption needs to be disabled. A context switch at this point would reset the cr3 value based on current->mm. Also, this function may not be invoked at the same time on a different CPU because it would overwrite the efi_scratch.prev_mm information. Remove task_lock() and also update the comment to reflect it. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Ard Biesheuvel commit 3425d934fc0312f62024163736a7afe4de20c10f Author: Sai Praneeth Date: Tue Sep 11 12:15:22 2018 -0700 efi/x86: Handle page faults occurring while running EFI runtime services Memory accesses performed by UEFI runtime services should be limited to: - reading/executing from EFI_RUNTIME_SERVICES_CODE memory regions - reading/writing from/to EFI_RUNTIME_SERVICES_DATA memory regions - reading/writing by-ref arguments - reading/writing from/to the stack. Accesses outside these regions may cause the kernel to hang because the memory region requested by the firmware isn't mapped in efi_pgd, which causes a page fault in ring 0 and the kernel fails to handle it, leading to die(). To save kernel from hanging, add an EFI specific page fault handler which recovers from such faults by 1. If the efi runtime service is efi_reset_system(), reboot the machine through BIOS. 2. If the efi runtime service is _not_ efi_reset_system(), then freeze efi_rts_wq and schedule a new process. The EFI page fault handler offers us two advantages: 1. Avoid potential hangs caused by buggy firmware. 2. Shout loud that the firmware is buggy and hence is not a kernel bug. Tested-by: Bhupesh Sharma Suggested-by: Matt Fleming Based-on-code-from: Ricardo Neri Signed-off-by: Sai Praneeth Prakhya Reviewed-by: Thomas Gleixner [ardb: clarify commit log] Signed-off-by: Ard Biesheuvel commit 9dbbedaa6171247c4c7c40b83f05b200a117c2e0 Author: Sai Praneeth Date: Tue Sep 11 12:15:21 2018 -0700 efi: Make efi_rts_work accessible to efi page fault handler After the kernel has booted, if any accesses by firmware causes a page fault, the efi page fault handler would freeze efi_rts_wq and schedules a new process. To do this, the efi page fault handler needs efi_rts_work. Hence, make it accessible. There will be no race conditions in accessing this structure, because all the calls to efi runtime services are already serialized. Tested-by: Bhupesh Sharma Suggested-by: Matt Fleming Based-on-code-from: Ricardo Neri Signed-off-by: Sai Praneeth Prakhya Signed-off-by: Ard Biesheuvel commit bcb31c6225c2420344ebc1e87834252b8cf4923c Author: Ivan Hu Date: Wed Aug 22 17:15:12 2018 +0800 efi/efi_test: add exporting ResetSystem runtime service Add exporting the UEFI runtime service ResetSystem for upper application or test tools to use. Signed-off-by: Ivan Hu Signed-off-by: Ard Biesheuvel commit 41f1c48420709470c51ee0e54b6fb28b956bb4e0 Author: Alistair Strachan Date: Thu Aug 9 09:40:42 2018 -0700 efi/libstub: arm: support building with clang When building with CONFIG_EFI and CONFIG_EFI_STUB on ARM, the libstub Makefile would use -mno-single-pic-base without checking it was supported by the compiler. As the ARM (32-bit) clang backend does not support this flag, the build would fail. This changes the Makefile to check the compiler's support for -mno-single-pic-base before using it, similar to c1c386681bd7 ("ARM: 8767/1: add support for building ARM kernel with clang"). Signed-off-by: Alistair Strachan Reviewed-by: Stefan Agner Signed-off-by: Ard Biesheuvel commit a23d3bb05ccbd815c79293d2207fedede0b3515d Author: Ard Biesheuvel Date: Fri Sep 21 09:32:46 2018 -0700 efi: add API to reserve memory persistently across kexec reboot Add kernel plumbing to reserve memory regions persistently on a EFI system by adding entries to the MEMRESERVE linked list. Tested-by: Jeremy Linton Signed-off-by: Ard Biesheuvel commit b844470f22061e8cd646cb355e85d2f518b2c913 Author: Ard Biesheuvel Date: Fri Sep 21 09:32:45 2018 -0700 efi/arm: libstub: add a root memreserve config table Installing UEFI configuration tables can only be done before calling ExitBootServices(), so if we want to use the new MEMRESRVE config table from the kernel proper, we need to install a dummy entry from the stub. Tested-by: Jeremy Linton Signed-off-by: Ard Biesheuvel commit 71e0940d52e107748b270213a01d3b1546657d74 Author: Ard Biesheuvel Date: Fri Sep 21 09:32:44 2018 -0700 efi: honour memory reservations passed via a linux specific config table In order to allow the OS to reserve memory persistently across a kexec, introduce a Linux-specific UEFI configuration table that points to the head of a linked list in memory, allowing each kernel to add list items describing memory regions that the next kernel should treat as reserved. This is useful, e.g., for GICv3 based ARM systems that cannot disable DMA access to the LPI tables, forcing them to reuse the same memory region again after a kexec reboot. Tested-by: Jeremy Linton Signed-off-by: Ard Biesheuvel commit 93c873d686461652921fe18b137ac28002dfe166 Author: Martin Blumenstingl Date: Sat Jul 21 21:14:00 2018 +0200 clk: meson: meson8b: use the regmap in the internal reset controller For now the reset controller was using raw register access because the early init did not initialize the regmap. However, now that clocks are initialized early we can simply use the regmap also for the reset controller. No functional changes. Signed-off-by: Martin Blumenstingl Signed-off-by: Jerome Brunet commit 6291b8c5ac67d0f1121d8dfd83a82c83272e3499 Author: Martin Blumenstingl Date: Sat Jul 21 21:13:59 2018 +0200 clk: meson: meson8b: register the clock controller early Until now only the reset controller (part of the clock controller register space) was registered early in the boot process, while the clock controller itself was registered later on. However, some parts of the SoC are initialized early in the boot process, such as the SRAM and the TWD timer. The bootloader already enables these clocks so we didn't see any issues so far. Register the clock controller early so other drivers (such as the SRAM and TWD timer) can use the clocks early in the boot process. Signed-off-by: Martin Blumenstingl Signed-off-by: Jerome Brunet commit 69b93104c7ec5668019caf5d2dbfd0e182df06db Author: Yixun Lan Date: Wed Aug 1 12:16:24 2018 +0000 clk: meson-axg: pcie: drop the mpll3 clock parent We found the PCIe driver doesn't really work with the mpll3 clock which is actually reserved for debug, So drop it from the mux list. Fixes: 33b89db68236 ("clk: meson-axg: add clocks required by pcie driver") Tested-by: Jianxin Qin Signed-off-by: Yixun Lan Signed-off-by: Jerome Brunet commit 56dbabc0ff733ab0828e9567c886933fe77fa087 Author: Jerome Brunet Date: Wed Aug 1 16:07:32 2018 +0200 clk: meson: axg: round audio system master clocks down Some of the master clocks provided by the axg audio clock controller are system clock (spdifin and pdm sysclk). They are used to clock an internal DSP of the related devices. Having them constantly rounded down instead of closest is preferable. Signed-off-by: Jerome Brunet commit dd601dbc011e4eeda9e4c8c19ffe5b2fb33223dc Author: Jerome Brunet Date: Wed Aug 1 16:00:53 2018 +0200 clk: meson: clk-pll: drop hard-coded rates from pll tables Putting hard-coded rates inside the parameter tables assumes that the parent is known and will never change. That's a big assumption we should not make. We have everything we need to recalculate the output rate using the parent rate and the rest of the parameters. Let's do so and drop the rates from the tables. Acked-by: Neil Armstrong Reviewed-by: Martin Blumenstingl Tested-by: Martin Blumenstingl Signed-off-by: Jerome Brunet commit 87173557d2f6d28ba6e19f8aaf6b7f3d45d51511 Author: Jerome Brunet Date: Wed Aug 1 16:00:52 2018 +0200 clk: meson: clk-pll: remove od parameters Remove od parameters from pll clocks and add post dividers clocks instead. Some clock, especially the one which feature several ods, may provide output between those ods. Also, some drivers, such as the hdmi driver, may require a more detailed control of the clock dividers, compared to what CCF would perform automatically. One added benefit of removing ods is that it also greatly reduce the size of the rate parameter tables. In the future, we could possibly take the predivider 'n' out of this driver as well. To do so, we will need to understand the constraints for the PLL to lock and whether or not it depends on the input clock rate. Acked-by: Neil Armstrong Reviewed-by: Martin Blumenstingl Tested-by: Martin Blumenstingl Signed-off-by: Jerome Brunet commit 2303a9ca693e585a558497ad737728fec97e2b8a Author: Jerome Brunet Date: Wed Aug 1 16:00:51 2018 +0200 clk: meson: clk-pll: drop CLK_GET_RATE_NOCACHE where unnecessary CLK_GET_RATE_NOCACHE should only be necessary when the registers controlling the rate of clock may change outside of CCF. On Amlogic, it should only be the case for the hdmi pll which is directly controlled by the display driver (WIP to fix this). The other plls should not require this flag. Reviewed-by: Martin Blumenstingl Tested-by: Martin Blumenstingl Signed-off-by: Jerome Brunet commit e40c7e3cda07099a92ea68d022f3304c14f9659f Author: Jerome Brunet Date: Wed Aug 1 16:00:50 2018 +0200 clk: meson: clk-pll: add enable bit Add the enable the bit of the pll clocks. These pll clocks may be disabled but we can't model this as an external gate since the pll needs to lock when enabled. Adding this bit allows to drop the poke of the first register of PLL. This will be useful to model the different components of the pll using generic clocks elements Acked-by: Neil Armstrong Reviewed-by: Martin Blumenstingl Tested-by: Martin Blumenstingl Signed-off-by: Jerome Brunet commit ba93cc7da8965bd513a7393db0f030e51bff4b60 Author: Karoly Pados Date: Tue Sep 25 15:59:11 2018 +0200 USB: serial: ftdi_sio: implement GPIO support for FT-X devices This patch allows using the CBUS pins of FT-X devices as GPIO in CBUS bitbanging mode. There is no conflict between the GPIO and VCP functionality in this mode. Tested on FT230X and FT231X. As there is no way to request the current CBUS register configuration from the device, all CBUS pins are set to a known state when the first GPIO is requested. This allows using libftdi to set the GPIO pins before loading this module for UART functionality, a behavior that existing applications might be relying upon (though no specific case is known to the authors of this patch). Signed-off-by: Karoly Pados [ johan: minor style changes ] Signed-off-by: Johan Hovold commit 09fc0daccbb53725abfbd46f63ea622808bd57a8 Author: Fabio Estevam Date: Tue Sep 18 08:43:32 2018 -0300 ARM: dts: imx6qdl-zii-rdu2: Disable the internal RTC On the imx6qdl-zii-rdu2 board the RTC functionality is provided via a DS1341 RTC connected via I2C bus, so we can safely disable the internal one. Reported-by: Chris Healy Signed-off-by: Fabio Estevam Reviewed-by: Lucas Stach Tested-by: Chris Healy Signed-off-by: Shawn Guo commit 1c5f335f61ffb838fc3cc1cec9464067663eb8c8 Author: Fabio Estevam Date: Tue Sep 18 08:43:31 2018 -0300 ARM: dts: imx51-zii-rdu1: Fix the rtc compatible string According to Documentation/devicetree/bindings/rtc/rtc-ds1307.txt the original compatible "maxim,ds1341" is not a valid entry. Switch to the documented "dallas,ds1341" compatible. Reported-by: Chris Healy Signed-off-by: Fabio Estevam Reviewed-by: Lucas Stach Tested-by: Chris Healy Signed-off-by: Shawn Guo commit 6fd30d014483d6c00e04a45ead8840a375aeab5d Author: Andy Shevchenko Date: Tue Jul 31 17:50:28 2018 +0300 MAINTAINERS: Use my infradead account exclusively for PDx86 work ACPI PMIC subsystem listed me as a designated reviewer with infradead email which is not what I want. I'm using infradead email only for PDx86 related work. Thus, update MAINTAINERS accordingly. Signed-off-by: Andy Shevchenko commit ca9184f0797c4893db928527fb2b6999eb753ccb Author: Andy Shevchenko Date: Mon Jul 23 11:31:59 2018 +0300 tracing: Trivia spelling fix containerof() -> container_of() This is the only location on kernel that has wrong spelling of the container_of() helper. Fix it. Signed-off-by: Andy Shevchenko Acked-by: Steven Rostedt (VMware) Signed-off-by: Andy Shevchenko commit bcf3003438ea464594f668a61cf2344a7f82f91c Author: Ulrich Hecht Date: Tue Sep 25 19:33:37 2018 +0300 arm64: dts: renesas: r8a77995: draak: Enable HDMI display output Adds LVDS decoder, HDMI encoder and connector for the Draak board. The LVDS0 and LVDS1 encoders can use the DU_DOTCLKIN0, DU_DOTCLKIN1 and EXTAL externals clocks. Two of them are provided to the SoC on the Draak board, hook them up in DT. Signed-off-by: Ulrich Hecht Signed-off-by: Laurent Pinchart Tested-by: Jacopo Mondi Signed-off-by: Simon Horman commit 92f0eb08c66a73594cf200e65689e767f7f0da5e Author: Anson Huang Date: Fri Sep 14 10:59:21 2018 +0800 ARM: dts: imx6ul: use nvmem-cells for cpu speed grading On i.MX6UL, accessing OCOTP directly is wrong because the ocotp clock needs to be enabled first, so use the nvmem-cells binding instead. Signed-off-by: Anson Huang Signed-off-by: Shawn Guo commit 74fe39abbf745737754effe64f5f6c574fbb1412 Author: Laurent Pinchart Date: Tue Sep 25 19:33:36 2018 +0300 arm64: dts: renesas: r8a77990: ebisu: Enable VGA and HDMI outputs Add the LVDS decoder, HDMI encoder, VGA encoder and HDMI and VGA connectors, and wire up the display-related nodes with clocks, pinmux and regulators. The LVDS0 and LVDS1 encoders can use the DU_DOTCLKIN0, DU_DOTCLKIN1 and EXTAL externals clocks. Two of them are provided to the SoC on the Ebisu board, hook them up in DT. Signed-off-by: Laurent Pinchart Tested-by: Jacopo Mondi Signed-off-by: Simon Horman commit 0dc733988b813b4054e2243539855ef535d3c9dd Author: Kieran Bingham Date: Tue Sep 25 19:33:35 2018 +0300 arm64: dts: renesas: r8a77995: Add LVDS support The r8a77995 D3 platform has 2 LVDS channels connected to the DU. Signed-off-by: Kieran Bingham [uli: moved lvds* into the soc node, added PM domains, resets] Signed-off-by: Ulrich Hecht Reviewed-by: Laurent Pinchart Tested-by: Jacopo Mondi Signed-off-by: Simon Horman commit 9c8c52f7cb4f3b604bb9836947dadfbb255f465f Author: Jianxin Pan Date: Fri Sep 21 16:34:41 2018 +0800 arm64: dts: meson-g12a: add initial g12a s905d2 SoC DT support Try to add basic DT support for the Amlogic's Meson-G12A S905D2 SoC, which describe components as follows: Reserve Memory, CPU, GIC, IRQ, Timer, UART. It's capable of booting up into the serial console. Signed-off-by: Jianxin Pan Reviewed-by: Jerome Brunet Reviewed-by: Neil Armstrong Signed-off-by: Kevin Hilman commit 28c9aa152134521a9dfb56ad02c46f7b99cad3b2 Author: Jianxin Pan Date: Fri Sep 21 16:34:40 2018 +0800 dt-bindings: arm: amlogic: Add Meson G12A binding Introduce new bindings for the Meson G12A SoC Signed-off-by: Jianxin Pan Reviewed-by: Rob Herring Reviewed-by: Jerome Brunet Reviewed-by: Neil Armstrong Signed-off-by: Kevin Hilman commit b739c177e1aeab532f355493439a1901b85be38c Author: Rob Herring Date: Thu Sep 13 13:12:43 2018 -0500 arm64: dts: fsl: Fix I2C and SPI bus warnings dtc has new checks for I2C and SPI buses. Fix the SPI bus node names and warnings in unit-addresses. arch/arm64/boot/dts/freescale/fsl-ls1046a-rdb.dtb: Warning (i2c_bus_reg): /soc/i2c@2180000/eeprom@57: I2C bus unit address format error, expected "53" arch/arm64/boot/dts/freescale/fsl-ls1046a-rdb.dtb: Warning (i2c_bus_reg): /soc/i2c@2180000/eeprom@56: I2C bus unit address format error, expected "52" Cc: Shawn Guo Cc: Li Yang Signed-off-by: Rob Herring Acked-by: Li Yang Signed-off-by: Shawn Guo commit 13ee2bfc5444c8950d3c74bd47ff2a7b53c34aa6 Author: Laurent Pinchart Date: Tue Sep 25 19:33:34 2018 +0300 arm64: dts: renesas: r8a77990: Add display output support The R8A77990 (E3) platform has one RGB output and two LVDS outputs connected to the DU. Add the DT nodes for the DU, LVDS encoders and supporting VSP and FCP. Signed-off-by: Laurent Pinchart Tested-by: Jacopo Mondi Signed-off-by: Simon Horman commit 5a2ecf0de0d3d7a79e21397ad530904a72b903bb Author: Rob Herring Date: Thu Sep 13 13:12:29 2018 -0500 ARM: dts: imx: Fix SPI bus warnings dtc has new checks for SPI buses. Fix the warnings in node names and unit-addresses. There's over 100 warnings for FSL boards, a few examples: arch/arm/boot/dts/imx28-duckbill-2-spi.dtb: Warning (spi_bus_bridge): /apb@80000000/apbh@80000000/ssp@80014000: node name for SPI buses should be 'spi' arch/arm/boot/dts/imx53-ppd.dtb: Warning (spi_bus_bridge): /soc/aips@50000000/spba@50000000/ecspi@50010000: node name for SPI buses should be 'spi' arch/arm/boot/dts/imx6dl-colibri-eval-v3.dtb: Warning (spi_bus_reg): /soc/aips-bus@2000000/spba-bus@2000000/spi@2014000/mcp251x@1: SPI bus unit address format error, expected "0" Cc: Shawn Guo Cc: Sascha Hauer Cc: Pengutronix Kernel Team Cc: Fabio Estevam Cc: NXP Linux Team Cc: Li Yang Cc: Stefan Agner Signed-off-by: Rob Herring Reviewed-by: Fabio Estevam Acked-by: Stefan Agner Signed-off-by: Shawn Guo commit 54ef8539f5a3c3da0a415c4afa41556547c973fd Author: Martin Blumenstingl Date: Thu Sep 13 22:29:19 2018 +0200 ARM: dts: meson8b: odroidc1: add stdout-path property To use the "earlycon" kernel command line parameter (without arguments) we need a stdout-path property under the /chosen node. Add this to make it easier to spot errors early in the boot process when looking for them. Signed-off-by: Martin Blumenstingl Signed-off-by: Kevin Hilman commit fd6643142a0c5ab4d423ed7173a0be414d509214 Author: Martin Blumenstingl Date: Thu Sep 13 22:29:18 2018 +0200 ARM: dts: meson8b: odroidc1: enable the SAR ADC Odroid-C1 exposes ADC channels 0 and 1 on the GPIO headers. NOTE: Due to the SoC design these are limited to 1.8V (instead of 3.3V like all other pins). Enable the SAR ADC to enable voltage measurements on these pins. Signed-off-by: Martin Blumenstingl Signed-off-by: Kevin Hilman commit 288cb5d1dbbec52a5a9ca1814fd05102dcfa87be Author: Martin Blumenstingl Date: Thu Sep 13 22:29:17 2018 +0200 ARM: dts: meson8b: odroidc1: add the fixed voltage regulators There are multiple fixed regulators on the Odroid-C1 board. Add them so they can be used when we add the devices that need them (SAR ADC needs the 1.8V IOREF, RTC needs VDD_RTC). These are: - P5V0 is the main 5V power input - VCC3V3 / VDDIO_AO3V3 / VDD3V3: fixed regulator with 3.3V output which is supplied by P5V0 - IOREF_1V8 / VCC1V8 / VDD1V8: fixed regulator with 1.8V output which is supplied by P5V0 - VDD_RTC: fixed voltage regulator with 0.9V output which is supplied by VDDIO_AO3V3 - DDR_VDDC / DDR3_1V5: fixed voltage regulator with 1.5V output which is supplied by P5V0 - the existing TF_IO and RFLASH_VDD_EN regulators are supplied by VDDIO_AO3V3 - the existing VCCK regulator is supplied by P5V0 This does not add the missing VDDEE regulator (controlled by PWM_D) because it's not clear yet how to configure the voltage of that regulator. Signed-off-by: Martin Blumenstingl Signed-off-by: Kevin Hilman commit 524d96083b66455a73ae88e40cbcb838da114416 Author: Martin Blumenstingl Date: Thu Sep 13 22:29:16 2018 +0200 ARM: dts: meson8b: odroidc1: add the CPU voltage regulator The CPU voltage regulator is a "Monolithic Power Systems MP2161" (according to the Odroid-C1+'s schematics). It is driven by PWM_C on GPIODV_9. Hardkernel's 3.10 kernel (based on the Amlogic GPL kernel sources) defines a PWM voltage table with the following values: - 0.86 volts = PWM register value 0x10f001b - (more values in 0.1 volt increments) - 1.14 volts = PWM register value 0x000012a When using the XTAL (24MHz) as input this translates into a PWM period of 12218ns with 0.86V using a duty cycle of 91% and 1.14V using a duty cycle of 0%. Signed-off-by: Martin Blumenstingl Signed-off-by: Kevin Hilman commit bbedc1f1d90e33803001ceb8d9585b2f04fc10d0 Author: Martin Blumenstingl Date: Sat Sep 22 17:10:03 2018 +0200 ARM: dts: meson8b: Add support for the Endless Mini (EC-100) The Endless Mini (EC-100) is a grapefruit-sized computer based on the Amlogic Meson8b (S805) SoC which comes in two variants. Both variants have in common: - Amlogic Meson8b (S805) SoC - two USB 2.0 ports on the rear, one one the front (connected to the SoC through an internal hub) - 3.5mm Stereo out and MIC combo port - HDMI and CVBS output - 5V power supply (rated at 3A / 15W) - an internal embedded micro-controller (called "EC") which implements a "breathing" effect for the LED and allows shutting down (powering off) the whole device - 10/100 Mbit/s Ethernet using an IC Plus IP101A/G PHY (note: the website incorrectly lists a Gigabit Ethernet port) - the CPU voltage is regulated using a PWM regulator. The GPL sources of the EC-100 are using a PWM value of 0x1c0000 for 0.86V and a PWM value of 0x00001c for 1.14V. When using the XTAL (24MHz) as input this translates into a PWM period of 1148ns with 0.86V using a duty cycle of 100% and 1.14V using a duty cycle of 0%. The main differences are: - the main indicator for the variant is the RAM size: the "cheaper" variant has 1 GB of RAM, while the more expensive one comes with 2GB - the storage size differs: 24 GB vs 32 GB - the "1 GB RAM" variant has Ethernet connectivity only, while the "2 GB" variant has a Realtek RTL8723BS SDIO chip which adds 802.11b/g/n wifi and Bluetooth 4.0 support Signed-off-by: Martin Blumenstingl Signed-off-by: Kevin Hilman commit a77d0bab18fcb393dd4c06438d612fcf40d75a35 Author: Martin Blumenstingl Date: Sat Sep 22 17:10:02 2018 +0200 ARM: dts: meson8b: add the RMII pins Some boards use an RMII Ethernet PHY which requires fewer pins than the RGMII PHYs. Add a separate eth_rmii_pins node which does not include the pins which are only required for RGMII (but not for RMII) PHYs. Signed-off-by: Martin Blumenstingl Signed-off-by: Kevin Hilman commit c821b81bbc00822a164de0c2fdb8cafacd487b26 Author: Martin Blumenstingl Date: Sat Sep 22 17:10:01 2018 +0200 ARM: dts: meson8b: add the I2C_A, PWM_C and UART_B pins These are used for example on the Endless Mini (EC-100): - I2C_A is connected to the Realtek RT5640 audio codec - PWM_C (GPIODV_9) is connected to a PWM regulator which is used for VCCK (CPU voltage supply) - UART_B is connected to the Bluetooth module (of the RTL8723BS SDIO wifi and Bluetooth combo chip) Signed-off-by: Martin Blumenstingl Signed-off-by: Kevin Hilman commit 4265e28711a8b4b97471d1d3f496b8e10f544a95 Author: Martin Blumenstingl Date: Sat Sep 22 17:10:00 2018 +0200 dt-bindings: arm: amlogic: Add the Endless Mobile Endless Mini (EC-100) Add bindings documentation for the Endless Mini (EC-100) from Endless Mobile. Signed-off-by: Martin Blumenstingl Reviewed-by: Rob Herring Signed-off-by: Kevin Hilman commit c00e7c07496827dbd1295798c12eb9733ed6e3b1 Author: Martin Blumenstingl Date: Sat Sep 22 17:09:59 2018 +0200 dt-bindings: add vendor prefix for "Endless Mobile, Inc." Endless Mobile, Inc. started selling (small) computers in 2015. Signed-off-by: Martin Blumenstingl Reviewed-by: Rob Herring Signed-off-by: Kevin Hilman commit c90d3bd1b9e83237c9d7e04542ffacc10a277560 Merge: 9835bf7ff813 d35c595bf005 Author: Ingo Molnar Date: Wed Sep 26 10:32:42 2018 +0200 Merge tag 'perf-core-for-mingo-4.20-20180924' 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: Hardware tracing changes: intel-pt: - Previously, the decoder would indicate begin / end by a branch from / to zero. That hides useful information, in particular when a trace ends with a call. Remove that limitation. (Adrian Hunter) - Better "callindent" output in 'perf script', improving intel-PT output (Andi Kleen) Arch specific changes: - Split the PMU events into meaningful functional groups for the ARM eMAG arch (Sean V Kelley) Fixes: perf help: - Add missing subcommand `version` (Sangwon Hong) Miscellaneous: - More patches renaming of structs, enums, functions to make libbtraceevent more generally available (Tzvetomir Stoyanov (VMware)) Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit 7a52127e3cf170ae71dadefef4ec82fb600cde2d Author: Colin Ian King Date: Tue Sep 25 10:55:56 2018 +0100 pinctrl: mediatek: fix check on EINT_NA comparison Currently, the check on desc->eint.eint_n == EINT_NA is always false because this is comparing a u16 to -1 which can never be true. Fix this by casting EINT_NA to u16. Detected by CoverityScan, CID#1473610 ("Operands don't affect result") Fixes: fb5fa8dc151b ("pinctrl: mediatek: extend struct mtk_pin_desc to pinctrl-mtk-common-v2.c") Signed-off-by: Colin Ian King Signed-off-by: Linus Walleij commit 22eb8301dbc1d0c916c9b826094e4d7562e1491e Author: Avaneesh Kumar Dwivedi Date: Mon Sep 24 15:17:48 2018 -0700 pinctrl: qcom: Add qcs404 pinctrl driver Add initial pinctrl driver to support pin configuration with pinctrl framework for qcs404. Signed-off-by: Avaneesh Kumar Dwivedi Signed-off-by: Chintan Pandya Signed-off-by: Anu Ramanathan [bjorn: Reworked tile handling and did some minor rework] Signed-off-by: Bjorn Andersson Signed-off-by: Linus Walleij commit 9d8ea6beac3df23f505efaeb178768d50bc593af Author: Bjorn Andersson Date: Mon Sep 24 15:17:47 2018 -0700 dt-bindings: pinctrl: qcom: Add QCS404 pinctrl binding Add the binding for the TLMM pinctrl block found in the QCS404 platform. Signed-off-by: Bjorn Andersson Reviewed-by: Rob Herring Signed-off-by: Linus Walleij commit 566b388440bb61447df7cdf5f4508a0fce493e00 Author: Kuninori Morimoto Date: Wed Sep 26 01:52:21 2018 +0000 phy: renesas: 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: Kishon Vijay Abraham I commit 3a00dae006623d799266d85f28b5f76ef07d6b6c Author: Hauke Mehrtens Date: Tue Sep 25 21:54:07 2018 +0200 phy: lantiq: Fix compile warning This local variable is unused, remove it. Fixes: dea54fbad332 ("phy: Add an USB PHY driver for the Lantiq SoCs using the RCU module") Signed-off-by: Hauke Mehrtens Signed-off-by: Kishon Vijay Abraham I commit 82af0932486716bb870c3c0fd1d8c65b3062956f Author: Vivek Gautam Date: Tue Sep 4 15:47:19 2018 +0530 phy: qcom-ufs: Declare 20nm qcom ufs qmp phy as Broken Fork out separate configs for 14nm and 20nm qcom ufs qmp phys to declare the 20nm phy as broken. Signed-off-by: Vivek Gautam Signed-off-by: Kishon Vijay Abraham I commit 1e1e465c6d23aa7d1858eb2894408f15770af16c Author: Vivek Gautam Date: Tue Sep 4 15:47:18 2018 +0530 scsi/ufs: qcom: Remove ufs_qcom_phy_*() calls from host The host makes direct calls into phy using ufs_qcom_phy_*() APIs. These APIs are only defined for 20nm qcom-ufs-qmp phy which is not being used by any architecture as yet. Future architectures too are not going to use 20nm ufs phy. So remove these ufs_qcom_phy_*() calls from host to let further change declare the 20nm phy as broken. Also remove couple of stale enum defines for ufs phy. Signed-off-by: Vivek Gautam Acked-by: Martin K. Petersen Signed-off-by: Kishon Vijay Abraham I commit 2ba3c43f09c50eb1c0472decdfba71010d8694dc Author: Vivek Gautam Date: Tue Sep 4 15:47:17 2018 +0530 phy: qcom-ufs: Remove stale methods that handle ref clk Remove ufs_qcom_phy_enable/(disable)_dev_ref_clk() that are not being used by any code. Signed-off-by: Vivek Gautam Reviewed-by: Bjorn Andersson Signed-off-by: Kishon Vijay Abraham I commit a46d5e98190d055044418a734cb3b2fa04146a80 Author: Bjorn Andersson Date: Mon Sep 24 15:17:46 2018 -0700 pinctrl: qcom: Support dispersed tiles On some new platforms the tiles have been placed too far apart to be covered in a single ioremap. Turn "regs" into an array of base addresses and make the pingroup carry the information about which tile the pin resides in. For existing platforms we map the first entry regs and the existing pingroups will all use tile 0, meaning that there's no functional change. Signed-off-by: Bjorn Andersson Signed-off-by: Linus Walleij commit 6c73698904aa258fce657eb7332593e156ab0c86 Author: Bjorn Andersson Date: Mon Sep 24 15:17:45 2018 -0700 pinctrl: qcom: Introduce readl/writel accessors In preparation for the support for dispersed tiles move all readl and writel calls to helper functions. This will allow us to isolate the added complexity of another indirection. Signed-off-by: Bjorn Andersson Signed-off-by: Linus Walleij commit ed80f6eb799a4b837de1095cca45de2286fb4837 Author: Vinod Koul Date: Mon Sep 24 17:06:56 2018 -0700 dt-bindings: pinctrl: qcom-pmic-gpio: Add pms405 support Add support for the PMS405 GPIO support to the Qualcomm PMIC GPIO binding. Signed-off-by: Vinod Koul Signed-off-by: Bjorn Andersson Signed-off-by: Linus Walleij commit c814738257d6606aac76d3d8bdefeb05e04c3b28 Author: Sean Paul Date: Wed Sep 19 16:39:58 2018 -0400 MAINTAINERS: Move mxsfb drm driver to drm-misc tree Another "small driver" moving into drm-misc. Stefan has also offered to co-maintain it. Cc: Marek Vasut Cc: Stefan Agner Cc: David Airlie Cc: Gustavo Padovan Cc: Maarten Lankhorst Acked-by: Stefan Agner Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20180919204026.3217-2-sean@poorly.run commit 3194cdb71190a74d46ae456efef10ecfc6f1e062 Author: David Hildenbrand Date: Tue Sep 25 19:16:17 2018 -0400 KVM: s390: introduce and use KVM_REQ_VSIE_RESTART When we change the crycb (or execution controls), we also have to make sure that the vSIE shadow datastructures properly consider the changed values before rerunning the vSIE. We can achieve that by simply using a VCPU request now. This has to be a synchronous request (== handled before entering the (v)SIE again). The request will make sure that the vSIE handler is left, and that the request will be processed (NOP), therefore forcing a reload of all vSIE data (including rebuilding the crycb) when re-entering the vSIE interception handler the next time. Signed-off-by: David Hildenbrand Signed-off-by: Tony Krowiak Reviewed-by: Pierre Morel Reviewed-by: Cornelia Huck Reviewed-by: Janosch Frank Reviewed-by: Christian Borntraeger Message-Id: <20180925231641.4954-3-akrowiak@linux.vnet.ibm.com> Signed-off-by: Christian Borntraeger commit 9ea597286570b50f94af3f785d099e5a5859a745 Author: David Hildenbrand Date: Tue Sep 25 19:16:16 2018 -0400 KVM: s390: vsie: simulate VCPU SIE entry/exit VCPU requests and VCPU blocking right now don't take care of the vSIE (as it was not necessary until now). But we want to have synchronous VCPU requests that will also be handled before running the vSIE again. So let's simulate a SIE entry of the VCPU when calling the sie during vSIE handling and check for PROG_ flags. The existing infrastructure (e.g. exit_sie()) will then detect that the SIE (in form of the vSIE) is running and properly kick the vSIE CPU, resulting in it leaving the vSIE loop and therefore the vSIE interception handler, allowing it to handle VCPU requests. E.g. if we want to modify the crycb of the VCPU and make sure that any masks also get applied to the VSIE crycb shadow (which uses masks from the VCPU crycb), we will need a way to hinder the vSIE from running and make sure to process the updated crycb before reentering the vSIE again. Signed-off-by: David Hildenbrand Signed-off-by: Tony Krowiak Reviewed-by: Pierre Morel Reviewed-by: Cornelia Huck Reviewed-by: Janosch Frank Reviewed-by: Christian Borntraeger Message-Id: <20180925231641.4954-2-akrowiak@linux.vnet.ibm.com> Signed-off-by: Christian Borntraeger commit 9cf0c526bc5874d77208751ae42f7e4c62bfdd4d Author: Neeraj Upadhyay Date: Tue Sep 25 18:37:59 2018 +0100 pinctrl: qcom: Add sdm660 pinctrl driver Add initial pinctrl driver to support pin configuration with pinctrl framework for sdm660. Based off CAF implementation. Signed-off-by: Neeraj Upadhyay Co-Developed-by: Venkatesh Yadav Abbarapu Signed-off-by: Venkatesh Yadav Abbarapu [craig: minor updates for upstreaming, updated tile handling] Signed-off-by: Craig Tatlor Reviewed-by: Bjorn Andersson Signed-off-by: Linus Walleij commit e60f02ddb4d2e29b0eb30dbe55475822c4bf3818 Author: Rajan Vaja Date: Wed Sep 12 12:38:40 2018 -0700 firmware: xilinx: Add debugfs for query data API Add debugfs file to query platform specific data from firmware using debugfs interface. Signed-off-by: Rajan Vaja Signed-off-by: Jolly Shah Signed-off-by: Michal Simek commit b321725257c17335b6a8388530366caa2c581084 Author: Rajan Vaja Date: Wed Sep 12 12:38:39 2018 -0700 firmware: xilinx: Add debugfs interface Firmware-debug provides debugfs interface to all APIs. Debugfs can be used to call firmware APIs with required parameters. Usage: * Calling firmware API through debugfs: # echo " .. " > /sys/.../zynqmp-firmware/pm * Read output of last called firmware API: # cat /sys/.../zynqmp-firmware/pm Refer ug1200 for more information on these APIs: * https://www.xilinx.com/support/documentation/user_guides/ug1200-eemi-api.pdf Add basic debugfs file to get API version. Signed-off-by: Rajan Vaja Signed-off-by: Jolly Shah Signed-off-by: Michal Simek commit f9627312e20721681ea326bd2b7935bf8034b288 Author: Rajan Vaja Date: Wed Sep 12 12:38:38 2018 -0700 firmware: xilinx: Add clock APIs Add clock APIs to control clocks through firmware interface. Signed-off-by: Rajan Vaja Signed-off-by: Jolly Shah Signed-off-by: Michal Simek commit 59ecdd778879f171072b663f91de6c3a595e2ed4 Author: Rajan Vaja Date: Wed Sep 12 12:38:37 2018 -0700 firmware: xilinx: Add query data API Add ZynqMP firmware query data API to query platform specific information(clocks, pins) from firmware. Signed-off-by: Rajan Vaja Signed-off-by: Jolly Shah Signed-off-by: Michal Simek commit 76582671eb5d006a78420776cc5f73195b867e81 Author: Rajan Vaja Date: Wed Sep 12 12:38:36 2018 -0700 firmware: xilinx: Add Zynqmp firmware driver This patch is adding communication layer with firmware. Firmware driver provides an interface to firmware APIs. Interface APIs can be used by any driver to communicate to PMUFW(Platform Management Unit). All requests go through ATF. Signed-off-by: Rajan Vaja Signed-off-by: Jolly Shah Signed-off-by: Michal Simek commit 95bf69a22d97d6dc1802feef164b34d57280a77d Author: Rajan Vaja Date: Wed Sep 12 12:38:35 2018 -0700 dt-bindings: firmware: Add bindings for ZynqMP firmware Add documentation to describe Xilinx ZynqMP firmware driver bindings. Firmware driver provides an interface to firmware APIs. Interface APIs can be used by any driver to communicate to PMUFW (Platform Management Unit). Signed-off-by: Rajan Vaja Signed-off-by: Jolly Shah Reviewed-by: Rob Herring Signed-off-by: Michal Simek commit a03fb71716ee60d1d763f1f27773cbbaec1359ed Author: Ezequiel Garcia Date: Tue Sep 25 18:16:06 2018 +0200 virtio: Support prime objects vmap/vunmap Implement vmap/vunmap so we can export dmabufs to other drivers, such as video4linux. Tested with a virtio-gpu / vivid (virtual capture driver) pipeline, where the vivid driver imports the dmabufs exported by virtio-gpu. Note that dma_buf_vmap() does its own vmap counting, so it's not needed to take care of it in the driver. Signed-off-by: Ezequiel Garcia Link: http://patchwork.freedesktop.org/patch/msgid/20180925161606.17980-4-ezequiel@collabora.com Signed-off-by: Gerd Hoffmann commit a20c4173c4219d85ba7775fde584cd34305a0b3d Author: Ezequiel Garcia Date: Tue Sep 25 18:16:05 2018 +0200 virtio: Rework virtio_gpu_object_kmap() Currently, virtio_gpu_object_kmap() is only called by virtio_gpufb_create(), when a DRM framebuffer is created. Thus, instead of returning the vmap'ed address, emit a warning if virtio_gpu_object_kmap is called on an already mapped object. With this change, kmap/kunmap calls are now balanced. Signed-off-by: Ezequiel Garcia Link: http://patchwork.freedesktop.org/patch/msgid/20180925161606.17980-3-ezequiel@collabora.com Signed-off-by: Gerd Hoffmann commit 02c87cabd6f1a6de151f999690393c3b8ad07b90 Author: Ezequiel Garcia Date: Tue Sep 25 18:16:04 2018 +0200 virtio: Add virtio_gpu_object_kunmap() Implement a virtio_gpu_object_kunmap() to unmap the kernel mapping, and use it in the TTM object destroy path. Signed-off-by: Ezequiel Garcia Link: http://patchwork.freedesktop.org/patch/msgid/20180925161606.17980-2-ezequiel@collabora.com Signed-off-by: Gerd Hoffmann commit 4b1bd69769454175268908f50b32f1cbfee5bb83 Author: David S. Miller Date: Tue Sep 25 22:41:31 2018 -0700 net: phy: marvell: Fix build. Local variable 'autoneg' doesn't even exist: drivers/net/phy/marvell.c: In function 'm88e1121_config_aneg': drivers/net/phy/marvell.c:468:25: error: 'autoneg' undeclared (first use in this function); did you mean 'put_net'? if (phydev->autoneg != autoneg || changed) { ^~~~~~~ Fixes: d6ab93364734 ("net: phy: marvell: Avoid unnecessary soft reset") Reported-by:Vakul Garg Signed-off-by: David S. Miller commit c932c4f831e66fb5bb15229324825a4932ba3992 Author: Thomas Zimmermann Date: Tue Jul 31 08:33:05 2018 +0200 drm/hisilicon: Replace ttm_bo_unref with ttm_bo_put The function ttm_bo_put releases a reference to a TTM buffer object. The function's name is more aligned to the Linux kernel convention of naming ref-counting function _get and _put. A call to ttm_bo_unref takes the address of the TTM BO object's pointer and clears the pointer's value to NULL. This is not necessary in most cases and sometimes even worked around by the calling code. A call to ttm_bo_put only releases the reference without clearing the pointer. The current behaviour of cleaning the pointer is kept in the calling code, but should be removed if not required in a later patch. Signed-off-by: Thomas Zimmermann Reviewed-by: Xinliang Liu Signed-off-by: Xinliang Liu commit 45fcedae849396598aee6686318e7488e852dedf Author: Thomas Zimmermann Date: Fri Jul 13 10:48:24 2018 +0200 drm/hisilicon: 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: Xinliang Liu Signed-off-by: Xinliang Liu commit 081d0571700be0c9f212f18b5c66f40e9c2e70d2 Author: Souptick Joarder Date: Mon Aug 6 20:19:01 2018 +0530 gpu/drm/hisilicon: Convert drm_atomic_helper_suspend/resume() convert drm_atomic_helper_suspend/resume() to use drm_mode_config_helper_suspend/resume(). Fixed one sparse warning by making hibmc_drm_interrupt static. Signed-off-by: Ajit Negi Signed-off-by: Souptick Joarder Reviewed-by: Xinliang Liu Signed-off-by: Xinliang Liu commit a66dae3a2b179eaba8f2f960271fe9d4c72939cb Author: John Garry Date: Sat Sep 22 01:25:27 2018 +0800 drm/hisilicon: hibmc: Use HUAWEI PCI vendor ID macro Switch to use Huawei PCI vendor ID macro from pci_ids.h file. In addition, switch to use PCI_VDEVICE() instead of open coding. Signed-off-by: John Garry Reviewed-by: Xinliang Liu Signed-off-by: Xinliang Liu commit 0ff9f49646353ce31312411e7e7bd2281492a40e Author: John Garry Date: Sat Sep 22 01:25:26 2018 +0800 drm/hisilicon: hibmc: Don't overwrite fb helper surface depth Currently the driver overwrites the surface depth provided by the fb helper to give an invalid bpp/surface depth combination. This has been exposed by commit 70109354fed2 ("drm: Reject unknown legacy bpp and depth for drm_mode_addfb ioctl"), which now causes the driver to fail to probe. Fix by not overwriting the surface depth. Fixes: d1667b86795a ("drm/hisilicon/hibmc: Add support for frame buffer") Signed-off-by: John Garry Reviewed-by: Xinliang Liu Signed-off-by: Xinliang Liu commit 331d880b35a76b5de0eec8cbcecbf615d758a5f9 Author: John Garry Date: Sat Sep 22 01:25:25 2018 +0800 drm/hisilicon: hibmc: Do not carry error code in HiBMC framebuffer pointer In hibmc_drm_fb_create(), when the call to hibmc_framebuffer_init() fails with error, do not store the error code in the HiBMC device frame-buffer pointer, as this will be later checked for non-zero value in hibmc_fbdev_destroy() when our intention is to check for a valid function pointer. This fixes the following crash: [ 9.699791] Unable to handle kernel NULL pointer dereference at virtual address 000000000000001a [ 9.708672] Mem abort info: [ 9.711489] ESR = 0x96000004 [ 9.714570] Exception class = DABT (current EL), IL = 32 bits [ 9.720551] SET = 0, FnV = 0 [ 9.723631] EA = 0, S1PTW = 0 [ 9.726799] Data abort info: [ 9.729702] ISV = 0, ISS = 0x00000004 [ 9.733573] CM = 0, WnR = 0 [ 9.736566] [000000000000001a] user address but active_mm is swapper [ 9.742987] Internal error: Oops: 96000004 [#1] PREEMPT SMP [ 9.748614] Modules linked in: [ 9.751694] CPU: 16 PID: 293 Comm: kworker/16:1 Tainted: G W 4.19.0-rc4-next-20180920-00001-g9b0012c #322 [ 9.762681] Hardware name: Huawei Taishan 2280 /D05, BIOS Hisilicon D05 IT21 Nemo 2.0 RC0 04/18/2018 [ 9.771915] Workqueue: events work_for_cpu_fn [ 9.776312] pstate: 60000005 (nZCv daif -PAN -UAO) [ 9.781150] pc : drm_mode_object_put+0x0/0x20 [ 9.785547] lr : hibmc_fbdev_fini+0x40/0x58 [ 9.789767] sp : ffff00000af1bcf0 [ 9.793108] x29: ffff00000af1bcf0 x28: 0000000000000000 [ 9.798473] x27: 0000000000000000 x26: ffff000008f66630 [ 9.803838] x25: 0000000000000000 x24: ffff0000095abb98 [ 9.809203] x23: ffff8017db92fe00 x22: ffff8017d2b13000 [ 9.814568] x21: ffffffffffffffea x20: ffff8017d2f80018 [ 9.819933] x19: ffff8017d28a0018 x18: ffffffffffffffff [ 9.825297] x17: 0000000000000000 x16: 0000000000000000 [ 9.830662] x15: ffff0000092296c8 x14: ffff00008939970f [ 9.836026] x13: ffff00000939971d x12: ffff000009229940 [ 9.841391] x11: ffff0000085f8fc0 x10: ffff00000af1b9a0 [ 9.846756] x9 : 000000000000000d x8 : 6620657a696c6169 [ 9.852121] x7 : ffff8017d3340580 x6 : ffff8017d4168000 [ 9.857486] x5 : 0000000000000000 x4 : ffff8017db92fb20 [ 9.862850] x3 : 0000000000002690 x2 : ffff8017d3340480 [ 9.868214] x1 : 0000000000000028 x0 : 0000000000000002 [ 9.873580] Process kworker/16:1 (pid: 293, stack limit = 0x(____ptrval____)) [ 9.880788] Call trace: [ 9.883252] drm_mode_object_put+0x0/0x20 [ 9.887297] hibmc_unload+0x1c/0x80 [ 9.890815] hibmc_pci_probe+0x170/0x3c8 [ 9.894773] local_pci_probe+0x3c/0xb0 [ 9.898555] work_for_cpu_fn+0x18/0x28 [ 9.902337] process_one_work+0x1e0/0x318 [ 9.906382] worker_thread+0x228/0x450 [ 9.910164] kthread+0x128/0x130 [ 9.913418] ret_from_fork+0x10/0x18 [ 9.917024] Code: a94153f3 a8c27bfd d65f03c0 d503201f (f9400c01) [ 9.923180] ---[ end trace 2695ffa0af5be375 ]--- Fixes: d1667b86795a ("drm/hisilicon/hibmc: Add support for frame buffer") Signed-off-by: John Garry Reviewed-by: Xinliang Liu Signed-off-by: Xinliang Liu commit 7aca011f88eb57be1b17b0216247f4e32ac54e29 Author: Roopa Prabhu Date: Tue Sep 25 14:39:14 2018 -0700 bridge: br_arp_nd_proxy: set icmp6_router if neigh has NTF_ROUTER Fixes: ed842faeb2bd ("bridge: suppress nd pkts on BR_NEIGH_SUPPRESS ports") Signed-off-by: Roopa Prabhu Signed-off-by: David S. Miller commit 105bc1306e9b29c2aa2783b9524f7aec9b5a5b1f Merge: 3475372ff60e d0e13a1488ad Author: David S. Miller Date: Tue Sep 25 20:29:38 2018 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next Daniel Borkmann says: ==================== pull-request: bpf-next 2018-09-25 The following pull-request contains BPF updates for your *net-next* tree. The main changes are: 1) Allow for RX stack hardening by implementing the kernel's flow dissector in BPF. Idea was originally presented at netconf 2017 [0]. Quote from merge commit: [...] Because of the rigorous checks of the BPF verifier, this provides significant security guarantees. In particular, the BPF flow dissector cannot get inside of an infinite loop, as with CVE-2013-4348, because BPF programs are guaranteed to terminate. It cannot read outside of packet bounds, because all memory accesses are checked. Also, with BPF the administrator can decide which protocols to support, reducing potential attack surface. Rarely encountered protocols can be excluded from dissection and the program can be updated without kernel recompile or reboot if a bug is discovered. [...] Also, a sample flow dissector has been implemented in BPF as part of this work, from Petar and Willem. [0] http://vger.kernel.org/netconf2017_files/rx_hardening_and_udp_gso.pdf 2) Add support for bpftool to list currently active attachment points of BPF networking programs providing a quick overview similar to bpftool's perf subcommand, from Yonghong. 3) Fix a verifier pruning instability bug where a union member from the register state was not cleared properly leading to branches not being pruned despite them being valid candidates, from Alexei. 4) Various smaller fast-path optimizations in XDP's map redirect code, from Jesper. 5) Enable to recognize BPF_MAP_TYPE_REUSEPORT_SOCKARRAY maps in bpftool, from Roman. 6) Remove a duplicate check in libbpf that probes for function storage, from Taeung. 7) Fix an issue in test_progs by avoid checking for errno since on success its value should not be checked, from Mauricio. 8) Fix unused variable warning in bpf_getsockopt() helper when CONFIG_INET is not configured, from Anders. 9) Fix a compilation failure in the BPF sample code's use of bpf_flow_keys, from Prashant. 10) Minor cleanups in BPF code, from Yue and Zhong. ==================== Signed-off-by: David S. Miller commit 3475372ff60e4181d3845ed605958daf71c3e3b8 Author: Hauke Mehrtens Date: Tue Sep 25 21:55:33 2018 +0200 net: dsa: lantiq_gswip: Depend on HAS_IOMEM The driver uses devm_ioremap_resource() which is only available when CONFIG_HAS_IOMEM is set, make the driver depend on this config option. User mode Linux does not have CONFIG_HAS_IOMEM set and the driver was failing on this architecture. Fixes: 14fceff4771e ("net: dsa: Add Lantiq / Intel DSA driver for vrx200") Reported-by: kbuild test robot Signed-off-by: Hauke Mehrtens Signed-off-by: David S. Miller commit 921f432ceac6efb535c78e1206b6fdea5ce03db6 Merge: 71f9b61c5b3f d6ab93364734 Author: David S. Miller Date: Tue Sep 25 20:26:45 2018 -0700 Merge branch 'net-phy-Eliminate-unnecessary-soft' Florian Fainelli says: ==================== net: phy: Eliminate unnecessary soft This patch series eliminates unnecessary software resets of the PHY. This should hopefully not break anybody's hardware; but I would appreciate testing to make sure this is is the case. Sorry for this long email list, I wanted to make sure I reached out to all people who made changes to the Marvell PHY driver. Thank you! Changes since RFT: - added Tested-by tags from Wang, Dongsheng, Andrew, Chris and Clemens ==================== Signed-off-by: David S. Miller commit d6ab93364734bd88a1011432faa9253680f7e9da Author: Florian Fainelli Date: Tue Sep 25 11:28:46 2018 -0700 net: phy: marvell: Avoid unnecessary soft reset The BMCR.RESET bit on the Marvell PHYs has a special meaning in that it commits the register writes into the HW for it to latch and be configured appropriately. Doing software resets causes link drops, and this is unnecessary disruption if nothing changed. Determine from marvell_set_polarity()'s return code whether the register value was changed and if it was, propagate that to the logic that hits the software reset bit. This avoids doing unnecessary soft reset if the PHY is configured in the same state it was previously, this also eliminates the need for a m88e1111_config_aneg() function since it now is the same as marvell_config_aneg(). Tested-by: Wang, Dongsheng Tested-by: Chris Healy Tested-by: Andrew Lunn Tested-by: Clemens Gruber Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller commit 6e2d85ec05591b739059f65fe8438c9c5999f7d8 Author: Florian Fainelli Date: Tue Sep 25 11:28:45 2018 -0700 net: phy: Stop with excessive soft reset While consolidating the PHY reset in phy_init_hw() an unconditionaly BMCR soft-reset I became quite trigger happy with those. This was later on deactivated for the Generic PHY driver on the premise that a prior software entity (e.g: bootloader) might have applied workarounds in commit 0878fff1f42c ("net: phy: Do not perform software reset for Generic PHY"). Since we have a hook to wire-up a soft_reset callback, just use that and get rid of the call to genphy_soft_reset() entirely. This speeds up initialization and link establishment for most PHYs out there that do not require a reset. Fixes: 87aa9f9c61ad ("net: phy: consolidate PHY reset in phy_init_hw()") Tested-by: Wang, Dongsheng Tested-by: Chris Healy Tested-by: Andrew Lunn Tested-by: Clemens Gruber Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller commit 71f9b61c5b3f894fdc9dff9e511a961ada122862 Merge: 7a153655d725 3ab52af58fa4 Author: David S. Miller Date: Tue Sep 25 20:25:00 2018 -0700 Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue Jeff Kirsher says: ==================== 40GbE Intel Wired LAN Driver Updates 2018-09-25 This series contains updates to i40e and xsk. Mariusz fixes an issue where the VF link state was not being updated properly when the PF is down or up. Also cleaned up the promiscuous configuration during a VF reset. Patryk simplifies the code a bit to use the variables for PF and HW that are declared, rather than using the VSI pointers. Cleaned up the message length parameter to several virtchnl functions, since it was not being used (or needed). Harshitha fixes two potential race conditions when trying to change VF settings by creating a helper function to validate that the VF is enabled and that the VSI is set up. Sergey corrects a double "link down" message by putting in a check for whether or not the link is up or going down. Björn addresses an AF_XDP zero-copy issue that buffers passed from userspace to the kernel was leaked when the hardware descriptor ring was torn down. A zero-copy capable driver picks buffers off the fill ring and places them on the hardware receive ring to be completed at a later point when DMA is complete. Similar on the transmit side; The driver picks buffers off the transmit ring and places them on the transmit hardware ring. In the typical flow, the receive buffer will be placed onto an receive ring (completed to the user), and the transmit buffer will be placed on the completion ring to notify the user that the transfer is done. However, if the driver needs to tear down the hardware rings for some reason (interface goes down, reconfiguration and such), the userspace buffers cannot be leaked. They have to be reused or completed back to userspace. ==================== Signed-off-by: David S. Miller commit 7a153655d725ff867325da72f8cb171d3ec8fc69 Merge: c774973e91e1 787ce6d02d95 Author: David S. Miller Date: Tue Sep 25 20:17:36 2018 -0700 Merge branch 'Refactor-classifier-API-to-work-with-Qdisc-blocks-without-rtnl-lock' Vlad Buslov says: ==================== Refactor classifier API to work with Qdisc/blocks without rtnl lock Currently, all netlink protocol handlers for updating rules, actions and qdiscs are protected with single global rtnl lock which removes any possibility for parallelism. This patch set is a third step to remove rtnl lock dependency from TC rules update path. Recently, new rtnl registration flag RTNL_FLAG_DOIT_UNLOCKED was added. Handlers registered with this flag are called without RTNL taken. End goal is to have rule update handlers(RTM_NEWTFILTER, RTM_DELTFILTER, etc.) to be registered with UNLOCKED flag to allow parallel execution. However, there is no intention to completely remove or split rtnl lock itself. This patch set addresses specific problems in implementation of classifiers API that prevent its control path from being executed concurrently. Additional changes are required to refactor classifiers API and individual classifiers for parallel execution. This patch set lays groundwork to eventually register rule update handlers as rtnl-unlocked by modifying code in cls API that works with Qdiscs and blocks. Following patch set does the same for chains and classifiers. The goal of this change is to refactor tcf_block_find() and its dependencies to allow concurrent execution: - Extend Qdisc API with rcu to lookup and take reference to Qdisc without relying on rtnl lock. - Extend tcf_block with atomic reference counting and rcu. - Always take reference to tcf_block while working with it. - Implement tcf_block_release() to release resources obtained by tcf_block_find() - Create infrastructure to allow registering Qdiscs with class ops that do not require the caller to hold rtnl lock. All three netlink rule update handlers use tcf_block_find() to lookup Qdisc and block, and this patch set introduces additional means of synchronization to substitute rtnl lock in cls API. Some functions in cls and sch APIs have historic names that no longer clearly describe their intent. In order not make this code even more confusing when introducing their concurrency-friendly versions, rename these functions to describe actual implementation. Changes from V2 to V3: - Patch 1: - Explicitly include refcount.h in rtnetlink.h. - Patch 3: - Move rcu_head field to the end of struct Qdisc. - Rearrange local variable declarations in qdisc_lookup_rcu(). - Patch 5: - Remove tcf_qdisc_put() and inline its content to callers. Changes from V1 to V2: - Rebase on latest net-next. - Patch 8 - remove. - Patch 9 - fold into patch 11. - Patch 11: - Rename tcf_block_{get|put}() to tcf_block_refcnt_{get|put}(). - Patch 13 - remove. ==================== Acked-by: Cong Wang Signed-off-by: David S. Miller commit 787ce6d02d95d01eb8633865eb5b2be1f7c94883 Author: Vlad Buslov Date: Mon Sep 24 19:22:58 2018 +0300 net: sched: use reference counting for tcf blocks on rules update In order to remove dependency on rtnl lock on rules update path, always take reference to block while using it on rules update path. Change tcf_block_get() error handling to properly release block with reference counting, instead of just destroying it, in order to accommodate potential concurrent users. Signed-off-by: Vlad Buslov Acked-by: Jiri Pirko Signed-off-by: David S. Miller commit 0607e439943bd150e53eed2979f9c69aa61c37ce Author: Vlad Buslov Date: Mon Sep 24 19:22:57 2018 +0300 net: sched: implement tcf_block_refcnt_{get|put}() Implement get/put function for blocks that only take/release the reference and perform deallocation. These functions are intended to be used by unlocked rules update path to always hold reference to block while working with it. They use on new fine-grained locking mechanisms introduced in previous patches in this set, instead of relying on global protection provided by rtnl lock. Extract code that is common with tcf_block_detach_ext() into common function __tcf_block_put(). Extend tcf_block with rcu to allow safe deallocation when it is accessed concurrently. Signed-off-by: Vlad Buslov Acked-by: Jiri Pirko Signed-off-by: David S. Miller commit ab2816295f991700b7e2ee117880751be8f705b4 Author: Vlad Buslov Date: Mon Sep 24 19:22:56 2018 +0300 net: sched: protect block idr with spinlock Protect block idr access with spinlock, instead of relying on rtnl lock. Take tn->idr_lock spinlock during block insertion and removal. Signed-off-by: Vlad Buslov Acked-by: Jiri Pirko Signed-off-by: David S. Miller commit f00234367b64503d2436bb3d0f37bbe98ac2cc97 Author: Vlad Buslov Date: Mon Sep 24 19:22:55 2018 +0300 net: sched: implement functions to put and flush all chains Extract code that flushes and puts all chains on tcf block to two standalone function to be shared with functions that locklessly get/put reference to block. Signed-off-by: Vlad Buslov Acked-by: Jiri Pirko Signed-off-by: David S. Miller commit cfebd7e242d7193a9901222b3e667788810d98c1 Author: Vlad Buslov Date: Mon Sep 24 19:22:54 2018 +0300 net: sched: change tcf block reference counter type to refcount_t As a preparation for removing rtnl lock dependency from rules update path, change tcf block reference counter type to refcount_t to allow modification by concurrent users. In block put function perform decrement and check reference counter once to accommodate concurrent modification by unlocked users. After this change tcf_chain_put at the end of block put function is called with block->refcnt==0 and will deallocate block after the last chain is released, so there is no need to manually deallocate block in this case. However, if block reference counter reached 0 and there are no chains to release, block must still be deallocated manually. Signed-off-by: Vlad Buslov Acked-by: Jiri Pirko Signed-off-by: David S. Miller commit e368fdb61d8e7c67ac70791b23345b26d7bbc661 Author: Vlad Buslov Date: Mon Sep 24 19:22:53 2018 +0300 net: sched: use Qdisc rcu API instead of relying on rtnl lock As a preparation from removing rtnl lock dependency from rules update path, use Qdisc rcu and reference counting capabilities instead of relying on rtnl lock while working with Qdiscs. Create new tcf_block_release() function, and use it to free resources taken by tcf_block_find(). Currently, this function only releases Qdisc and it is extended in next patches in this series. Signed-off-by: Vlad Buslov Acked-by: Jiri Pirko Signed-off-by: David S. Miller commit 9d7e82cec35c027756ec97e274f878251f271181 Author: Vlad Buslov Date: Mon Sep 24 19:22:52 2018 +0300 net: sched: add helper function to take reference to Qdisc Implement function to take reference to Qdisc that relies on rcu read lock instead of rtnl mutex. Function only takes reference to Qdisc if reference counter isn't zero. Intended to be used by unlocked cls API. Signed-off-by: Vlad Buslov Acked-by: Jiri Pirko Signed-off-by: David S. Miller commit 3a7d0d07a386716b459b00783b11a8211cefcc0f Author: Vlad Buslov Date: Mon Sep 24 19:22:51 2018 +0300 net: sched: extend Qdisc with rcu Currently, Qdisc API functions assume that users have rtnl lock taken. To implement rtnl unlocked classifiers update interface, Qdisc API must be extended with functions that do not require rtnl lock. Extend Qdisc structure with rcu. Implement special version of put function qdisc_put_unlocked() that is called without rtnl lock taken. This function only takes rtnl lock if Qdisc reference counter reached zero and is intended to be used as optimization. Signed-off-by: Vlad Buslov Acked-by: Jiri Pirko Signed-off-by: David S. Miller commit 86bd446b5cebd783187ea3772ff258210de77d99 Author: Vlad Buslov Date: Mon Sep 24 19:22:50 2018 +0300 net: sched: rename qdisc_destroy() to qdisc_put() Current implementation of qdisc_destroy() decrements Qdisc reference counter and only actually destroy Qdisc if reference counter value reached zero. Rename qdisc_destroy() to qdisc_put() in order for it to better describe the way in which this function currently implemented and used. Extract code that deallocates Qdisc into new private qdisc_destroy() function. It is intended to be shared between regular qdisc_put() and its unlocked version that is introduced in next patch in this series. Signed-off-by: Vlad Buslov Acked-by: Jiri Pirko Signed-off-by: David S. Miller commit 6f99528e9797794b91b43321fbbc93fe772b0803 Author: Vlad Buslov Date: Mon Sep 24 19:22:49 2018 +0300 net: core: netlink: add helper refcount dec and lock function Rtnl lock is encapsulated in netlink and cannot be accessed by other modules directly. This means that reference counted objects that rely on rtnl lock cannot use it with refcounter helper function that atomically releases decrements reference and obtains mutex. This patch implements simple wrapper function around refcount_dec_and_lock that obtains rtnl lock if reference counter value reached 0. Signed-off-by: Vlad Buslov Acked-by: Jiri Pirko Signed-off-by: David S. Miller commit f2e7398987287ecc55ee60ceeb4617447ea17263 Author: Suzuki K Poulose Date: Wed Sep 12 14:53:48 2018 +0100 ARM: dts: imx7: Update coresight binding for hardware ports Switch to the updated coresight bindings. Cc: Sascha Hauer Cc: Pengutronix Kernel Team Cc: Fabio Estevam Cc: Mathieu Poirier Signed-off-by: Suzuki K Poulose Signed-off-by: Shawn Guo commit 6656c39a07a3ee409ba6c97493b3b03123ab4e51 Author: Fabio Estevam Date: Tue Sep 11 17:10:47 2018 -0300 ARM: dts: vf610-zii-cfu1: Pass the 'no-sd' property Pass the 'no-sd' for esdhc0 controller as it is wired to eMMC. Signed-off-by: Fabio Estevam Acked-by: Andrey Smirnov Signed-off-by: Shawn Guo commit 466b6bd47555b40d55811a523f7522498d799055 Author: Fabio Estevam Date: Tue Sep 11 17:10:46 2018 -0300 ARM: dts: vf610-zii-cfu1: Pass the 'no-sdio' property No SDIO devices are connected to these ports, so pass the 'no-sdio' property. Signed-off-by: Fabio Estevam Acked-by: Andrey Smirnov Signed-off-by: Shawn Guo commit 48d34c4acfca5a6cc317dbe5e9f33abceab9d72f Author: Fabio Estevam Date: Tue Sep 11 17:10:45 2018 -0300 ARM: dts: imx51-zii-scu2-mezz: Disable the internal watchdog imx51-zii-scu2-mezz has an external watchdog in the environment microcontroller, so disable the internal one. Signed-off-by: Fabio Estevam Acked-by: Andrey Smirnov Signed-off-by: Shawn Guo commit 555d111dc2d8ab540b6738ac77a2c07374816d9a Author: Fabio Estevam Date: Tue Sep 11 17:10:44 2018 -0300 ARM: dts: imx51-zii-scu2-mezz: Disable VPU imx51-zii-scu2-mezz does not have any video encoding/decoding needs, so disable the VPU. Signed-off-by: Fabio Estevam Acked-by: Andrey Smirnov Signed-off-by: Shawn Guo commit b3dd407880b7df955a3e3607e99f390e86e3c810 Author: Fabio Estevam Date: Tue Sep 11 17:10:43 2018 -0300 ARM: dts: imx51-zii-scu3-esb: Disable VPU imx51-zii-scu3-esb does not have any video encoding/decoding needs, so disable the VPU. Signed-off-by: Fabio Estevam Acked-by: Andrey Smirnov Signed-off-by: Shawn Guo commit 41d9feb2beb4c40ff267a9ddba48a59b8b6e5c81 Author: Fabio Estevam Date: Tue Sep 11 17:10:42 2018 -0300 ARM: dts: imx51: Add label for VPU node Add label for VPU node so that board dts files can disable VPU if needed. Signed-off-by: Fabio Estevam Acked-by: Andrey Smirnov Signed-off-by: Shawn Guo commit c6b1867b1da3b1203b4c49988afeebdcbdf65499 Author: Chengguang Xu Date: Sat Sep 22 22:43:09 2018 +0800 f2fs: fix remount problem of option io_bits Currently we show mount option "io_bits=%u" as "io_size=%uKB", it will cause option parsing problem(unrecognized mount option) in remount. Signed-off-by: Chengguang Xu Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 801df68d617e3cb831f531c99fa6003620e6b343 Author: Varun Prakash Date: Wed Sep 19 19:44:57 2018 +0530 scsi: target: iscsi: cxgbit: fix csk leak csk leak can happen if a new TCP connection gets established after cxgbit_accept_np() returns, to fix this leak free remaining csk in cxgbit_free_np(). Signed-off-by: Varun Prakash Signed-off-by: Martin K. Petersen commit b90cd6f2b905905fb42671009dc0e27c310a16ae Author: Jason Yan Date: Tue Sep 25 10:56:54 2018 +0800 scsi: libsas: fix a race condition when smp task timeout When the lldd is processing the complete sas task in interrupt and set the task stat as SAS_TASK_STATE_DONE, the smp timeout timer is able to be triggered at the same time. And smp_task_timedout() will complete the task wheter the SAS_TASK_STATE_DONE is set or not. Then the sas task may freed before lldd end the interrupt process. Thus a use-after-free will happen. Fix this by calling the complete() only when SAS_TASK_STATE_DONE is not set. And remove the check of the return value of the del_timer(). Once the LLDD sets DONE, it must call task->done(), which will call smp_task_done()->complete() and the task will be completed and freed correctly. Reported-by: chenxiang Signed-off-by: Jason Yan CC: John Garry CC: Johannes Thumshirn CC: Ewan Milne CC: Christoph Hellwig CC: Tomas Henzl CC: Dan Williams CC: Hannes Reinecke Reviewed-by: Hannes Reinecke Reviewed-by: John Garry Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen commit 437207d3697f500f34f126a8ab1c29417ba4a184 Author: Jason Yan Date: Tue Sep 25 10:56:53 2018 +0800 scsi: libsas: check the ata device status by ata_dev_enabled() When ata device IDENTIFY failed, the ata device status is ATA_DEV_UNKNOWN. The libata reported like: [113518.620433] ata5.00: qc timeout (cmd 0xec) [113518.653646] ata5.00: failed to IDENTIFY (I/O error, err_mask=0x4) But libsas verifies the device status by ata_dev_disabled(), which skipped ATA_DEV_UNKNOWN. This will make libsas think the ata device probing succeed the device cannot be actually brought up. And even the new bcast of this device will be considered as flutter and will not probe this device again. Change ata_dev_disabled() to !ata_dev_enabled() so that libsas can deal with this if the ata device probe failed. New bcasts can let us try to probe the device again and bring it up if it is fine to IDENTIFY. Tested-by: Zhou Yupeng Signed-off-by: Jason Yan CC: John Garry CC: Johannes Thumshirn CC: Ewan Milne CC: Christoph Hellwig CC: Tomas Henzl CC: Dan Williams CC: Hannes Reinecke Reviewed-by: John Garry Reviewed-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen commit 32c850bf587f993b2620b91e5af8a64a7813f504 Author: Jason Yan Date: Tue Sep 25 10:56:52 2018 +0800 scsi: libsas: always unregister the old device if going to discover new If we went into sas_rediscover_dev() the attached_sas_addr was already insured not to be zero. So it's unnecessary to check if the attached_sas_addr is zero. And although if the sas address is not changed, we always have to unregister the old device when we are going to register a new one. We cannot just leave the device there and bring up the new. Signed-off-by: Jason Yan CC: chenxiang CC: John Garry CC: Johannes Thumshirn CC: Ewan Milne CC: Christoph Hellwig CC: Tomas Henzl CC: Dan Williams CC: Hannes Reinecke Reviewed-by: Johannes Thumshirn Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen commit 640208a1c91c380a09056a26d3750b137b7e8c4d Author: Jason Yan Date: Tue Sep 25 10:56:51 2018 +0800 scsi: libsas: make the lldd_port_deformed method optional Now LLDDs have to implement lldd_port_deformed method otherwise NULL dereference will happen. Make it optional and remove the dummy implementation in hisi_sas. Signed-off-by: Jason Yan CC: John Garry CC: Johannes Thumshirn CC: Ewan Milne CC: Christoph Hellwig CC: Tomas Henzl CC: Dan Williams CC: Hannes Reinecke Acked-by: John Garry Reviewed-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen commit 986d7dbc4169a8afefe7f4081253a75b60b791a6 Author: Jason Yan Date: Tue Sep 25 10:56:50 2018 +0800 scsi: libsas: delete dead code in scsi_transport_sas.c This code is dead and no clue implies that it will be back again. Signed-off-by: Jason Yan CC: John Garry CC: Johannes Thumshirn CC: Ewan Milne CC: Christoph Hellwig CC: Tomas Henzl CC: Dan Williams CC: Hannes Reinecke Reviewed-by: Johannes Thumshirn Reviewed-by: John Garry Reviewed-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen commit 6868aa76dc7ade5904693d01e5a112f99b8df6c2 Author: Colin Ian King Date: Sun Sep 23 23:25:48 2018 +0100 scsi: megaraid: fix spelling mistake "maibox" -> "mailbox" Trivial fix to spelling mistake in warning message and comments Signed-off-by: Colin Ian King Signed-off-by: Martin K. Petersen commit adb11023a5987db78d5aa58cebd158d99c547850 Author: Nathan Chancellor Date: Thu Sep 20 14:10:32 2018 -0700 scsi: FlashPoint: Remove unnecessary parentheses Clang warns when multiple pairs of parentheses are used for a single conditional statement. In file included from drivers/scsi/BusLogic.c:57: drivers/scsi/FlashPoint.c:2947:34: warning: equality comparison with extraneous parentheses [-Wparentheses-equality] if ((currSCCB->Sccb_scsistat == SELECT_SN_ST)) { ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~ drivers/scsi/FlashPoint.c:2947:34: note: remove extraneous parentheses around the comparison to silence this warning if ((currSCCB->Sccb_scsistat == SELECT_SN_ST)) { ~ ^ ~ drivers/scsi/FlashPoint.c:2947:34: note: use '=' to turn this equality comparison into an assignment if ((currSCCB->Sccb_scsistat == SELECT_SN_ST)) { ^~ = drivers/scsi/FlashPoint.c:2956:39: warning: equality comparison with extraneous parentheses [-Wparentheses-equality] else if ((currSCCB->Sccb_scsistat == ~~~~~~~~~~~~~~~~~~~~~~~~^~ drivers/scsi/FlashPoint.c:2956:39: note: remove extraneous parentheses around the comparison to silence this warning else if ((currSCCB->Sccb_scsistat == ~ ^ drivers/scsi/FlashPoint.c:2956:39: note: use '=' to turn this equality comparison into an assignment else if ((currSCCB->Sccb_scsistat == ^~ = 2 warnings generated. Link: https://github.com/ClangBuiltLinux/linux/issues/156 Signed-off-by: Nathan Chancellor Acked-by: Khalid Aziz Signed-off-by: Martin K. Petersen commit 048a864e533039cc950b716e774c2c09af8fa1dd Author: zhong jiang Date: Tue Sep 18 23:54:41 2018 +0800 scsi: hpsa: Use vmemdup_user to replace the open code vmemdup_user is better than duplicating its implementation, So just replace the open code. The issue is detected with the help of Coccinelle. Tested-by: Don Brace Acked-by: Don Brace Signed-off-by: zhong jiang Signed-off-by: Martin K. Petersen commit 7d20b6a2728fe3ea9fa8f4fc49cd438fcc781dd1 Author: YueHaibing Date: Tue Sep 25 11:22:53 2018 +0000 nfsd: remove set but not used variable 'dirp' Fixes gcc '-Wunused-but-set-variable' warning: fs/nfsd/vfs.c: In function 'nfsd_create': fs/nfsd/vfs.c:1279:16: warning: variable 'dirp' set but not used [-Wunused-but-set-variable] Signed-off-by: YueHaibing Signed-off-by: J. Bruce Fields commit e0639dc5805a9d4faaa2c07ad98fa853b9529dd3 Author: Olga Kornievskaia Date: Fri Jul 20 18:19:20 2018 -0400 NFSD introduce async copy feature Upon receiving a request for async copy, create a new kthread. If we get asynchronous request, make sure to copy the needed arguments/state from the stack before starting the copy. Then start the thread and reply back to the client indicating copy is asynchronous. nfsd_copy_file_range() will copy in a loop over the total number of bytes is needed to copy. In case a failure happens in the middle, we ignore the error and return how much we copied so far. Once done creating a workitem for the callback workqueue and send CB_OFFLOAD with the results. The lifetime of the copy stateid is bound to the vfs copy. This way we don't need to keep the nfsd_net structure for the callback. We could keep it around longer so that an OFFLOAD_STATUS that came late would still get results, but clients should be able to deal without that. We handle OFFLOAD_CANCEL by sending a signal to the copy thread and calling kthread_stop. A client should cancel any ongoing copies before calling DESTROY_CLIENT; if not, we return a CLIENT_BUSY error. If the client is destroyed for some other reason (lease expiration, or server shutdown), we must clean up any ongoing copies ourselves. Signed-off-by: Olga Kornievskaia [colin.king@canonical.com: fix leak in error case] [bfields@fieldses.org: remove signalling, merge patches] Signed-off-by: J. Bruce Fields commit 885e2bf3ea5121975ade0d7866ab6226a8547dc9 Author: Olga Kornievskaia Date: Fri Jul 20 18:19:19 2018 -0400 NFSD OFFLOAD_CANCEL xdr Signed-off-by: Olga Kornievskaia Signed-off-by: J. Bruce Fields commit 6308bc98e86ee8c7bbd56a39839a257a16c9378c Author: Olga Kornievskaia Date: Fri Jul 20 18:19:18 2018 -0400 NFSD OFFLOAD_STATUS xdr Signed-off-by: Olga Kornievskaia Signed-off-by: J. Bruce Fields commit 9eb190fca8f9056ea4502526dc55fe52318d9afc Author: Olga Kornievskaia Date: Fri Jul 20 18:19:17 2018 -0400 NFSD CB_OFFLOAD xdr Signed-off-by: Olga Kornievskaia Signed-off-by: J. Bruce Fields commit c55213eac2e9f2196fb3e2c7713ac31cfece7d9d Author: Yasha Cherikovsky Date: Tue Sep 25 21:08:23 2018 +0300 MIPS/head: Store ELF appended dtb in a global variable too Since commit 15f37e158892 ("MIPS: store the appended dtb address in a variable"), in kernels with MIPS_RAW_APPENDED_DTB=y, the early boot code detects the dtb and stores it in the 'fw_passed_dtb' variable. However, the dtb is not stored in 'fw_passed_dtb' in kernels with MIPS_ELF_APPENDED_DTB=y. Under MIPS_ELF_APPENDED_DTB=y, the dtb is also located in the __appended_dtb section, so we just need to update the #ifdef. This will allow to access the dtb in a more uniform way. Fixes: 15f37e158892 ("MIPS: store the appended dtb address in a variable") Signed-off-by: Yasha Cherikovsky Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/20803/ Cc: Ralf Baechle Cc: Paul Burton Cc: James Hogan Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org commit 62a83c55eaf8d9bd30851c3e23a19c0fe1f263a3 Author: Yasha Cherikovsky Date: Tue Sep 25 21:08:22 2018 +0300 MIPS/head: Add comments after #endif and #else It makes the code more readable, especially in the nested ifdefs. Signed-off-by: Yasha Cherikovsky Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/20802/ Cc: Ralf Baechle Cc: Paul Burton Cc: James Hogan Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org commit 1a0afc14b5da329765d6ecd4a79f546b9363ad8c Author: Christoph Hellwig Date: Tue Sep 25 13:16:55 2018 -0700 Revert "dma-mapping: clear dev->dma_ops in arch_teardown_dma_ops" This reverts commit 46053c73685411915d3de50c5a0045beef32806b. This change breaks architectures setting up dma_ops in their own magic way and not using arch_setup_dma_ops, so revert it. Reported-by: Guenter Roeck Signed-off-by: Christoph Hellwig commit c6ce580716372d71cd119bacf73f14a62e9af2ea Author: Doug Ledford Date: Fri Sep 21 11:30:13 2018 -0400 RDMA/umem: Fix potential addition overflow Given a large enough memory allocation, it is possible to wrap the pinned_vm counter. Check for addition overflow to prevent such eventualities. Fixes: 40ddacf2dda9 ("RDMA/umem: Don't hold mmap_sem for too long") Reported-by: Jason Gunthorpe Signed-off-by: Doug Ledford Reviewed-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 3312d1c6bdee6aa912c099c0ac0662d197c52842 Author: Doug Ledford Date: Fri Sep 21 11:30:12 2018 -0400 RDMA/umem: Minor optimizations Noticed while reviewing commit d4b4dd1b9706 ("RDMA/umem: Do not use current->tgid to track the mm_struct") patch. Why would we take a lock, adjust a protected variable, drop the lock, and *then* check the input into our protected variable adjustment? Then we have to take the lock again on our error unwind. Let's just check the input early and skip taking the locks needlessly if the input isn't valid. It was also noticed that we set mm = current->mm, we then never modify mm, but we still go back and reference current->mm a number of times needlessly. Be consistent in using the stored reference in mm. Signed-off-by: Doug Ledford Reviewed-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 0faa7d1b8692b88971112af9209c04d5d55578c1 Merge: 478bf0b47098 4eb2534057b1 Author: Olof Johansson Date: Tue Sep 25 13:53:00 2018 -0700 Merge tag 'at91-4.20-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux into next/defconfig AT91 defconfig for 4.20 - addition of sama5 I2S - addition of generic ADC resistive touchscreen * tag 'at91-4.20-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux: ARM: multi_v7_defconfig: add Atmel I2S driver ARM: configs: at91: Add I2S driver to sama5 ARM: multi_v7_defconfig: add generic resistive touchscreen ARM: configs: at91: add generic resistive touchscreen to sama5 Signed-off-by: Olof Johansson commit a64240a625b353cd4c45a319ee47d745a30e2ec7 Merge: 47188a858a45 ff1e37c6809d Author: Olof Johansson Date: Tue Sep 25 13:49:08 2018 -0700 Merge tag 'samsung-dt-4.20-2' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into next/dt Samsung DTS ARM changes for v4.20 1. Bring up DSI and HDMI on Exynos5250 Arndale. 2. Use the new way of setting external wakeup interrupts on S5Pv210. 3. Use proper cpufreq suspend OPP to fix suspend/wakeup from RAM on Snow Chromebook (Exynos5250). 4. Fully describe regualtors on Odroid XU3-family boards. 5. Fix sound in Snow-rev5 Chromebook. 6. Fix regulators configuration on Peach Pi/Pit Chromebooks (Exynos5420) which should be always on. 7. Fix pull control on PMIC interrupt lines on multiple boards which essentially fixes waking up by RTC. 8. Add PMIC interrupts on Exynos4210 UniversalC210 board. 9. Add external SD card support for Trats board (Exynos4210). 10. Correct audio subsystem parent clock on Peach Chromebooks. 11. Minor cleanups. * tag 'samsung-dt-4.20-2' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: ARM: dts: exynos: Correct audio subsystem parent clock on Peach Chromebooks ARM: dts: exynos: Add external SD card support for Trats board ARM: dts: exynos: Disable pull control for PMIC IRQ line on Artik5 board ARM: dts: exynos: Disable pull control for S5M8767 PMIC ARM: dts: exynos: Remove double SD card detect pin inversion ARM: dts: exynos: Add missing PMIC interrupts on UniversalC210 board ARM: dts: exynos: Disable pull control for MAX8997 interrupts on Origen ARM: dts: exynos: Fix regulators configuration on Peach Pi/Pit Chromebooks ARM: dts: exynos: Fix sound in Snow-rev5 Chromebook ARM: dts: exynos: Add LDO28 regulator on Exynos5422 Odroid boards ARM: dts: exynos: Disable unused PMIC regulators on Exynos5422 Odroid boards ARM: dts: exynos: Add unused PMIC regulators on Exynos5422 Odroid boards ARM: dts: exynos: Add missing used PMIC regulators on Exynos5422 Odroid boards ARM: dts: exynos: Mark 1 GHz CPU OPP as suspend OPP on Exynos5250 ARM: dts: exynos: Convert exynos5250.dtsi to opp-v2 bindings ARM: dts: s5pv210: Switch to S5Pv210 specific pinctrl wakeup compatible ARM: dts: exynos: Fix HDMI-HPD line handling on Arndale ARM: dts: exynos: Use i2c-gpio for HDMI-DDC on Arndale ARM: dts: exynos: Add DSI and panel nodes on Arndale ARM: dts: exynos: Add DSI node on Exynos5250 Signed-off-by: Olof Johansson commit 47188a858a457239741bb2e9d7630fd7fad5327b Merge: 200a00d85c9f 20373e0cb8f7 Author: Olof Johansson Date: Tue Sep 25 13:48:25 2018 -0700 Merge tag 'socfpga_updates_for_v4.20_part2' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux into next/dt SoCFPGA DTS updates for v4.20, part 2 - Fix I2C bus unit-address warning with new DTC checks - Add reset properties for timers * tag 'socfpga_updates_for_v4.20_part2' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux: ARM: dts: socfpga: add timer resets for SoCFPGA platform ARM: dts: socfpga: Fix I2C bus unit-address error Signed-off-by: Olof Johansson commit 200a00d85c9fab71c04b507d3ebe2edb4afa422e Merge: 28544e611bb3 b5b4c8dd5c44 Author: Olof Johansson Date: Tue Sep 25 13:40:44 2018 -0700 Merge tag 'sti-dt-for-v4.20-round1' of git://git.kernel.org/pub/scm/linux/kernel/git/pchotard/sti into next/dt STi DT update: _ Change syntax of multiple DAI links * tag 'sti-dt-for-v4.20-round1' of git://git.kernel.org/pub/scm/linux/kernel/git/pchotard/sti: ARM: dts: stih410: change syntax of multiple DAI Signed-off-by: Olof Johansson commit 28544e611bb38982ccd28bf64661afa52d7841e4 Merge: 74cf77e8be35 97181516b078 Author: Olof Johansson Date: Tue Sep 25 13:38:31 2018 -0700 Merge tag 'at91-4.20-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux into next/dt AT91 DT for 4.20 - warning fiwes from Rob - many updates for the axentia boards - ADC, I2S and touch screen support for sama5d2 * tag 'at91-4.20-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux: arm: dts: sama5d2: Update coresight bindings for hardware ports ARM: dts: at91: sama5d27_som1_ek: add adc regulators ARM: dts: atmel: Fix I2C and SPI bus warnings ARM: dts: at91: sama5d4: add labels to soc dtsi for derivative boards ARM: dts: at91: tse850: drop three indentation levels ARM: dts: at91: nattis: drop three indentation levels ARM: dts: at91: nattis: describe the lvds panel ARM: dts: at91: nattis: move pinctrls for the lvds chip to the lvds node ARM: dts: at91: nattis: state the actual lvds-encoder chip ARM: dts: at91: nattis: make the SD-card slot work ARM: dts: at91: nattis: set the PRLUD and HIPOW signals low ARM: dts: at91/trivial: remove old NAND bindings leftover in sama5d2 ARM: dts: at91/trivial: Fix USART1 definition for at91sam9g45 ARM: dts: at91: sama5d2 Xplained: add pin muxing for I2S ARM: dts: at91: sama5d2: add nodes for I2S controllers ARM: dts: at91: sama5d2: add I2S clock muxing nodes ARM: dts: at91: sama5d2: Add resistive touch device ARM: dts: at91: sama5d2: add channel cells for ADC device Signed-off-by: Olof Johansson commit 1b571086e869395b6a11ab24186b0104fe05c057 Author: Nathan Chancellor Date: Mon Sep 24 12:29:03 2018 -0700 iw_cxgb4: Use proper enumerated type in c4iw_bar2_addrs Clang warns when one enumerated type is implicitly converted to another. drivers/infiniband/hw/cxgb4/qp.c:287:8: warning: implicit conversion from enumeration type 'enum t4_bar2_qtype' to different enumeration type 'enum cxgb4_bar2_qtype' [-Wenum-conversion] T4_BAR2_QTYPE_EGRESS, ^~~~~~~~~~~~~~~~~~~~ c4iw_bar2_addrs expects a value from enum cxgb4_bar2_qtype so use the corresponding values from that type so Clang is satisfied without changing the meaning of the code. T4_BAR2_QTYPE_EGRESS = CXGB4_BAR2_QTYPE_EGRESS = 0 T4_BAR2_QTYPE_INGRESS = CXGB4_BAR2_QTYPE_INGRESS = 1 Reported-by: Nick Desaulniers Signed-off-by: Nathan Chancellor Acked-by: Steve Wise Signed-off-by: Jason Gunthorpe commit 0430e74f9fbe4d027a86f39fdb6f20427912088f Author: Mark Bloch Date: Mon Sep 24 18:58:07 2018 +0000 RDMA/mlx5: Remove superfluous version print When profiles were introduced to MLX5 IB an unneeded version print when creating an MLX5 IB device was added. Remove the print, we still have a printk for driver version in mlx5_ib_add(). Fixes: 16c1975f1032 ("IB/mlx5: Create profile infrastructure to add and remove stages") Signed-off-by: Mark Bloch Signed-off-by: Jason Gunthorpe commit e3b00e9c3051162a46dd03be0bd92fe52de703b3 Author: Colin Ian King Date: Mon Sep 24 18:27:38 2018 +0100 IB/usnic: fix spelling mistake "unvalid" -> "invalid" Trivial fix to spelling mistake in usnic_err error message. Signed-off-by: Colin Ian King Signed-off-by: Jason Gunthorpe commit d7f59da42c25deafa91a1f2b22ffddfe24be8aa6 Merge: 827f847b631c 34d2a7db77ad Author: Olof Johansson Date: Tue Sep 25 13:33:02 2018 -0700 Merge tag 'at91-4.20-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux into next/soc AT91 SoC for 4.20 - rename MAINTAINERS entries and change maintainers - two pm cleanups * tag 'at91-4.20-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux: MAINTAINERS: sdhci: move the Microchip entry to proper location MAINTAINERS: move former ATMEL entries to proper MICROCHIP location MAINTAINERS: remove the / ATMEL string from MICROCHIP entries MAINTAINERS: iio: add co-maintainer to SAMA5D2-compatible ADC driver MAINTAINERS: pwm: add entry for Microchip pwm driver MAINTAINERS: dmaengine: add files to Microchip dma entry MAINTAINERS: USB: change maintainer for Microchip USBA gadget driver MAINTAINERS: ASoC: change maintainer for Microchip ALSA drivers MAINTAINERS: media: change Microchip ISI, ISC maintainers MAINTAINERS: update entry for Microchip NAND driver support MAINTAINERS: ARM: at91: add co-maintainer for ARM/Microchip ARM: at91: pm: call put_device instead of of_node_put in at91_pm_config_ws ARM: at91: pm: remove pm_bu initialization in at91_pm_backup_init() Signed-off-by: Olof Johansson commit b5bb425871186303e6936fa2581521bdd1964a58 Author: Nathan Chancellor Date: Tue Sep 25 12:44:59 2018 -0700 arm64: percpu: Initialize ret in the default case Clang warns that if the default case is taken, ret will be uninitialized. ./arch/arm64/include/asm/percpu.h:196:2: warning: variable 'ret' is used uninitialized whenever switch default is taken [-Wsometimes-uninitialized] default: ^~~~~~~ ./arch/arm64/include/asm/percpu.h:200:9: note: uninitialized use occurs here return ret; ^~~ ./arch/arm64/include/asm/percpu.h:157:19: note: initialize the variable 'ret' to silence this warning unsigned long ret, loop; ^ = 0 This warning appears several times while building the erofs filesystem. While it's not strictly wrong, the BUILD_BUG will prevent this from becoming a true problem. Initialize ret to 0 in the default case right before the BUILD_BUG to silence all of these warnings. Reported-by: Prasad Sodagudi Signed-off-by: Nathan Chancellor Reviewed-by: Nick Desaulniers Signed-off-by: Dennis Zhou commit 1e25ee6d8083bb78e164d497989dc3cafda70fb8 Merge: 2e07bdf9e8d6 f62df676d7f1 Author: Olof Johansson Date: Tue Sep 25 13:19:52 2018 -0700 Merge tag 'at91-4.20-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux into next/drivers AT91 drivers for 4.20 - use struct_size in atmel-ebi * tag 'at91-4.20-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux: memory: atmel-ebi: Use struct_size() in devm_kzalloc() Signed-off-by: Olof Johansson commit 4c1ef72e9b71a19fb405ebfcd37c0a5e16fa44ca Author: Tonghao Zhang Date: Mon Sep 24 07:00:41 2018 -0700 PCI/MSI: Warn and return error if driver enables MSI/MSI-X twice It is a serious driver defect to enable MSI or MSI-X more than once. Doing so may panic the kernel as in the stack trace below: Call Trace: sysfs_add_one+0xa5/0xd0 create_dir+0x7c/0xe0 sysfs_create_subdir+0x1c/0x20 internal_create_group+0x6d/0x290 sysfs_create_groups+0x4a/0xa0 populate_msi_sysfs+0x1cd/0x210 pci_enable_msix+0x31c/0x3e0 igbuio_pci_open+0x72/0x300 [igb_uio] uio_open+0xcc/0x120 [uio] chrdev_open+0xa1/0x1e0 [...] do_sys_open+0xf3/0x1f0 SyS_open+0x1e/0x20 system_call_fastpath+0x16/0x1b ---[ end trace 11042e2848880209 ]--- Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: ffffffffa056b4fa We want to keep the WARN_ON() and stack trace so the driver can be fixed, but we can avoid the kernel panic by returning an error. We may still get warnings like this: Call Trace: pci_enable_msix+0x3c9/0x3e0 igbuio_pci_open+0x72/0x300 [igb_uio] uio_open+0xcc/0x120 [uio] chrdev_open+0xa1/0x1e0 [...] do_sys_open+0xf3/0x1f0 SyS_open+0x1e/0x20 system_call_fastpath+0x16/0x1b ------------[ cut here ]------------ WARNING: at fs/sysfs/dir.c:526 sysfs_add_one+0xa5/0xd0() sysfs: cannot create duplicate filename '/devices/pci0000:00/0000:00:03.0/0000:01:00.1/msi_irqs' Signed-off-by: Tonghao Zhang [bhelgaas: changelog, fix patch whitespace, remove !!] Signed-off-by: Bjorn Helgaas commit 3ab52af58fa481324bb7c839a2187c54c4af912b Author: Björn Töpel Date: Fri Sep 7 10:18:48 2018 +0200 i40e: disallow changing the number of descriptors when AF_XDP is on When an AF_XDP UMEM is attached to any of the Rx rings, we disallow a user to change the number of descriptors via e.g. "ethtool -G IFNAME". Otherwise, the size of the stash/reuse queue can grow unbounded, which would result in OOM or leaking userspace buffers. Signed-off-by: Björn Töpel Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 411dc16ff1775517ec91cdb64be7ee0daca44e22 Author: Björn Töpel Date: Fri Sep 7 10:18:47 2018 +0200 i40e: clean zero-copy XDP Rx ring on shutdown/reset Outstanding Rx descriptors are temporarily stored on a stash/reuse queue. When/if the HW rings comes up again, entries from the stash are used to re-populate the ring. The latter required some restructuring of the allocation scheme for the AF_XDP zero-copy implementation. There is now a fast, and a slow allocation. The "fast allocation" is used from the fast-path and obtains free buffers from the fill ring and the internal recycle mechanism. The "slow allocation" is only used in ring setup, and obtains buffers from the fill ring and the stash (if any). Signed-off-by: Björn Töpel Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit f5bd91388e26557f64ca999e0006038c7a919308 Author: Jakub Kicinski Date: Fri Sep 7 10:18:46 2018 +0200 net: xsk: add a simple buffer reuse queue XSK UMEM is strongly single producer single consumer so reuse of frames is challenging. Add a simple "stash" of FILL packets to reuse for drivers to optionally make use of. This is useful when driver has to free (ndo_stop) or resize a ring with an active AF_XDP ZC socket. Signed-off-by: Jakub Kicinski Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 9dbb137045774f66d036ce3bcdd3f36b9401f8d4 Author: Björn Töpel Date: Fri Sep 7 10:18:45 2018 +0200 i40e: clean zero-copy XDP Tx ring on shutdown/reset When the zero-copy enabled XDP Tx ring is torn down, due to configuration changes, outstanding frames on the hardware descriptor ring are queued on the completion ring. The completion ring has a back-pressure mechanism that will guarantee that there is sufficient space on the ring. Signed-off-by: Björn Töpel Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 679b05c0536b18b4729b5272c50116d0315dc5bc Author: Patryk Małek Date: Tue Aug 28 10:16:07 2018 -0700 i40e: Remove unused msglen parameter from virtchnl functions msglen parameter seems to be unused in several virtchnl function. This patch removes it from signatures of those functions. Signed-off-by: Patryk Małek Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit fd835129ab21e6075c456908e3d29b11c8b20850 Author: Sergey Nemov Date: Tue Aug 28 10:16:06 2018 -0700 i40e: fix double 'NIC Link is Down' messages When isup is false meaning that interface is going to shut down set new speed to 0 to avoid double 'NIC Link is Down' messages. Signed-off-by: Sergey Nemov Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit ba1a057da2f17411009ecfbdfde4d68bc8c1765e Author: Yishai Hadas Date: Thu Sep 20 21:39:33 2018 +0300 IB/mlx5: Set valid umem bit on DEVX Set valid umem bit on DEVX commands that use umem. This will enforce the umem usage by the firmware and not the 'pas' info. Signed-off-by: Yishai Hadas Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit d2d19121ae2f4bc4e818dd770c1746deadf14093 Author: Yishai Hadas Date: Thu Sep 20 21:39:32 2018 +0300 IB/mlx5: Set uid as part of TD commands Set uid as part of TD commands so that the firmware can manage the TD object in a secured way. Signed-off-by: Yishai Hadas Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit d00614c0570656480d6dea5c84c1caec58f40021 Author: Yishai Hadas Date: Thu Sep 20 21:39:31 2018 +0300 IB/mlx5: Set uid as part of XRCD commands Set uid as part of XRCD commands so that the firmware can manage the XRCD object in a secured way. That will enable using an XRCD that was created by verbs application to be used by the DEVX flow in case the uid is equal. Signed-off-by: Yishai Hadas Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit cf50a7863b424527c95ef41e2b26a03678cf009e Author: Yishai Hadas Date: Thu Sep 20 21:39:30 2018 +0300 IB/mlx5: Set uid as part of CQ creation Set uid as part of CQ creation so that the firmware can manage the CQ object in a secured way. The uid for the destroy and the modify commands is set by mlx5_core. This will enable using a CQ that was created by verbs application to be used by the DEVX flow in case the uid is equal. Signed-off-by: Yishai Hadas Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 58895f0d18df09a6be82e6e4141e4609dd12f84f Author: Yishai Hadas Date: Thu Sep 20 21:39:29 2018 +0300 IB/mlx5: Set uid upon PD allocation Set uid as part of PD allocation, this uid is used for other mlx5 objects upon calling the firmware. Signed-off-by: Yishai Hadas Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 5deba86ee2cddaebaa1d37ad71efcda26b626592 Author: Yishai Hadas Date: Thu Sep 20 21:39:28 2018 +0300 IB/mlx5: Set uid as part of RQT commands Set uid as part of RQT commands so that the firmware can manage the RQT object in a secured way. That will enable using an RQT that was created by verbs application to be used by the DEVX flow in case the uid is equal. Signed-off-by: Yishai Hadas Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 1cd6dbd32f986fe05fef90249996f6ba394dfc78 Author: Yishai Hadas Date: Thu Sep 20 21:39:27 2018 +0300 IB/mlx5: Set uid as part of TIS commands Set uid as part of TIS commands so that the firmware can manage the TIS object in a secured way. That will enable using a TIS that was created by verbs application to be used by the DEVX flow in case the uid is equal. Signed-off-by: Yishai Hadas Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 443c1cf9d6c845d0dc389469b78cefec842d5868 Author: Yishai Hadas Date: Thu Sep 20 21:39:26 2018 +0300 IB/mlx5: Set uid as part of TIR commands Set uid as part of TIR commands so that the firmware can manage the TIR object in a secured way. That will enable using a TIR that was created by verbs application to be used by the DEVX flow in case the uid is equal. Signed-off-by: Yishai Hadas Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 539ec982763a8f041761056a5fb9e09cdb6b3dcc Author: Yishai Hadas Date: Thu Sep 20 21:39:25 2018 +0300 IB/mlx5: Set uid as part of MCG commands Set uid as part of MCG commands so that the firmware can manage the MCG object in a secured way. Signed-off-by: Yishai Hadas Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit a01a5860b209453b8c190fa304a63fada1bb9759 Author: Yishai Hadas Date: Thu Sep 20 21:39:24 2018 +0300 IB/mlx5: Set uid as part of DCT commands Set uid as part of DCT create command so that the firmware can manage the DCT object in a secured way. The uid for the destroy and drain commands are set by mlx5_core. That will enable using a DCT that was created by verbs application to be used by the DEVX flow in case the uid is equal. Signed-off-by: Yishai Hadas Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 9f33ec03bcdaf4f98023e6bfc6020304c10bb35a Author: Yishai Hadas Date: Thu Sep 20 21:39:23 2018 +0300 IB/mlx5: Set uid as part of SRQ commands Set uid as part of SRQ create command so that the firmware can manage the SRQ object in a secured way. The uid for the destroy and modify commands are set by mlx5_core. That will enable using a SRQ that was created by verbs application to be used by the DEVX flow in case the uid is equal. Signed-off-by: Yishai Hadas Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit c14003f09068711c8f1ad9cb89b5520b3579e563 Author: Yishai Hadas Date: Thu Sep 20 21:39:22 2018 +0300 IB/mlx5: Set uid as part of SQ commands Set uid as part of SQ commands so that the firmware can manage the SQ object in a secured way. The uid for the destroy command is set by mlx5_core. This will enable using an SQ that was created by verbs application to be used by the DEVX flow in case the uid is equal. Signed-off-by: Yishai Hadas Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 34d57585f91edf8eb3b7e966684e49832d61ecca Author: Yishai Hadas Date: Thu Sep 20 21:39:21 2018 +0300 IB/mlx5: Set uid as part of RQ commands Set uid as part of RQ commands so that the firmware can manage the RQ object in a secured way. The uid for the destroy command is set by mlx5_core. This will enable using an RQ that was created by verbs application to be used by the DEVX flow in case the uid is equal. Signed-off-by: Yishai Hadas Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 991d219829aaf4eaeea6fdb84021fe05f0fcdae3 Author: Yishai Hadas Date: Thu Sep 20 21:39:20 2018 +0300 IB/mlx5: Set uid as part of QP creation Set uid as part of QP creation so that the firmware can manage the QP object in a secured way. The uid for the destroy and the modify commands is set by mlx5_core. This will enable using a QP that was created by verbs application to be used by the DEVX flow in case the uid is equal. Signed-off-by: Yishai Hadas Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit a1069c1c75d5be4d7fed354a33e5590de27ae0f3 Author: Yishai Hadas Date: Thu Sep 20 21:39:19 2018 +0300 IB/mlx5: Use uid as part of PD commands Use uid as part of PD commands so that the firmware can manage the PD object in a secured way. For example when a QP is created its uid must match the CQ uid which it uses. Next patches in this series will use the uid from the PD, then will come a patch to set the uid on the PD so that all objects will be properly work in one change. Signed-off-by: Yishai Hadas Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit ed277c50c0752e11631bc79363385db0e1bb010a Author: Harshitha Ramamurthy Date: Tue Aug 28 10:16:05 2018 -0700 i40e: add a helper function to validate a VF based on the vf id When we are trying to change VF settings, it is possible for 2 race conditions to happen. One, when the VF is created but not yet enabled. Second, the VF is enabled but the VSI is still not created or not yet re-created in the VF reset flow. This patch introduces a helper function to validate that the VF is enabled and that the VSI is set up. This patch also calls this function from other functions which could get into these race conditions. While we are poking around here, remove unnecessary parenthesis that checkpatch was complaining about. Signed-off-by: Harshitha Ramamurthy Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit e7bac7afa612f911a9fe0a035007592e1b86c8d4 Author: Patryk Małek Date: Tue Aug 28 10:16:04 2018 -0700 i40e: use declared variables for pf and hw In order to slightly simplify the code use the variables for pf and hw that are declared in i40e_set_mac function. Signed-off-by: Patryk Małek Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 1d6fba92d7325cfc96ff52c3335b63bb6326abf5 Merge: f9882bb5060b bd37197554eb Author: Jason Gunthorpe Date: Tue Sep 25 14:02:48 2018 -0600 Merge branch 'mellanox/mlx5-next' into rdma.git for-next From git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux.git This is required to resolve dependencies of the next series of RDMA patches. * branch 'mellanox/mlx5-next': net/mlx5: Update mlx5_ifc with DEVX UID bits net/mlx5: Set uid as part of DCT commands net/mlx5: Set uid as part of SRQ commands net/mlx5: Set uid as part of SQ commands net/mlx5: Set uid as part of RQ commands net/mlx5: Set uid as part of QP commands net/mlx5: Set uid as part of CQ commands Signed-off-by: Jason Gunthorpe commit 0ce5233e6c2afeb39b9631961978a993a6d4e500 Author: Mariusz Stachura Date: Mon Aug 20 08:12:28 2018 -0700 i40e: Unset promiscuous settings on VF reset This patch cleans up promiscuous configuration when a VF reset occurs. Previously the promiscuous mode settings were still there after the VF driver removal. Signed-off-by: Mariusz Stachura Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 2e07bdf9e8d6adc8bf0113fd43f52363462fb659 Merge: 260c9ca90246 afa86d264a7c Author: Olof Johansson Date: Tue Sep 25 12:48:47 2018 -0700 Merge tag 'soc-fsl-next-v4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/leo/linux into next/drivers NXP/FSL SoC driver updates for v4.20 - Use of_get_child_by_name helper for QE driver - Remove redundant pointer 'priv' for dpio driver * tag 'soc-fsl-next-v4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/leo/linux: soc: fsl: dpio: remove redundant pointer 'priv' soc: fsl/qe: Use of_get_child_by_name helper Signed-off-by: Olof Johansson commit f3fc7915a5372db778abaefe8b3122fec5b8bd77 Author: Mariusz Stachura Date: Mon Aug 20 08:12:22 2018 -0700 i40e: Fix VF's link state notification This resolves an issue where the VF link state was not being updated when the PF is down or up, and the VF link state would always show that it is running. Signed-off-by: Mariusz Stachura Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 260c9ca90246fb317e1361fa2d513bd307decd68 Merge: 5bc45db5d2a7 7bcfe20d0d8b Author: Olof Johansson Date: Tue Sep 25 12:26:52 2018 -0700 Merge tag 'drivers_soc_for_4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux-keystone into next/drivers soc: driver soc update for v4.20 - Enable host-id as an optional dt property - Fix minor typo in knav driver * tag 'drivers_soc_for_4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux-keystone: soc: ti: fix spelling mistake "instace" -> "instance" firmware: ti_sci: Provide host-id as an optional dt parameter Documentation: dt: keystone: ti-sci: Add optional host-id parameter Signed-off-by: Olof Johansson commit 6b2da9ff0559b4cbd095f0c5fdc131b873343d7b Author: Thor Thayer Date: Tue Sep 25 08:49:02 2018 -0500 arm64: dts: stratix10: Add peripheral EDAC nodes Add the usb and ethernet peripheral ECC nodes using the rria10 format. Signed-off-by: Thor Thayer Signed-off-by: Borislav Petkov Acked-by: Dinh Nguyen Cc: robh+dt@kernel.org Cc: mark.rutland@arm.com Cc: mchehab@kernel.org Cc: devicetree@vger.kernel.org Cc: linux-edac@vger.kernel.org Link: https://lkml.kernel.org/r/1537883342-30180-7-git-send-email-thor.thayer@linux.intel.com commit 064acbd4f4ab509dd3f31e1a2d1e04a43d5b1009 Author: Thor Thayer Date: Tue Sep 25 08:49:01 2018 -0500 EDAC, altera: Add Stratix10 peripheral support Add a new peripheral ECC error injection algorithm for Stratix10 and some Arria10 peripherals. Inject a single bit error and upon readback, it will be corrected and the SBE IRQ handler will be called. Add regmap selection for Stratix10 or Arria10 peripheral device memory initialization. Add checks for both Arria10 and Stratix10 to the peripheral ECC setup. Signed-off-by: Thor Thayer Signed-off-by: Borislav Petkov Cc: dinguyen@kernel.org Cc: robh+dt@kernel.org Cc: mark.rutland@arm.com Cc: mchehab@kernel.org Cc: devicetree@vger.kernel.org Cc: linux-edac@vger.kernel.org Link: https://lkml.kernel.org/r/1537883342-30180-6-git-send-email-thor.thayer@linux.intel.com commit 08f08bfb7b4cc7b7037c8818acb1b6abccf2bd0e Author: Thor Thayer Date: Tue Sep 25 08:49:00 2018 -0500 EDAC, altera: Merge Stratix10 into the Arria10 SDRAM probe routine Change Stratix10 regmap to use offsets from a base to match the Arria10 regmap and allow re-use of the Arria10 functions. Only the regmap initialization differs (Arria10 mmio_regmap vs Stratix10 custom regmap). Modify the SDRAM probe function to handle Stratix10. Remove the Stratix10 offset defines if Arria10 can be used. Remove the unused Stratix10 probe function. Signed-off-by: Thor Thayer Signed-off-by: Borislav Petkov Cc: dinguyen@kernel.org Cc: robh+dt@kernel.org Cc: mark.rutland@arm.com Cc: mchehab@kernel.org Cc: devicetree@vger.kernel.org Cc: linux-edac@vger.kernel.org Link: https://lkml.kernel.org/r/1537883342-30180-5-git-send-email-thor.thayer@linux.intel.com commit 446fd7afdcf1d1ab9561b7f9d0ffaa26e1193b06 Author: Thor Thayer Date: Tue Sep 25 08:48:59 2018 -0500 arm64: dts: stratix10: Add SDRAM node Add the SDRAM node to follow the Arria10 layout and bindings. The Arria10 SDRAM functions expect this node. Signed-off-by: Thor Thayer Signed-off-by: Borislav Petkov Acked-by: Dinh Nguyen Cc: robh+dt@kernel.org Cc: mark.rutland@arm.com Cc: mchehab@kernel.org Cc: devicetree@vger.kernel.org Cc: linux-edac@vger.kernel.org Link: https://lkml.kernel.org/r/1537883342-30180-4-git-send-email-thor.thayer@linux.intel.com commit d5fc9125566c9190ee9c7900859f5538a62e166a Author: Thor Thayer Date: Tue Sep 25 08:48:58 2018 -0500 EDAC, altera: Combine Stratix10 and Arria10 probe functions On Stratix10, the ECC offsets are similar to the existing Arria10 functions and this can be leveraged to simplify the EDAC driver as follows: 1. Fold Stratix10 specifics into Arria10 structures and functions. 2. Implement the Stratix10 System Manager register accesses using a custom regmap to allow use with the Arria10 System Manager regmaps. 3. Stratix10 double bit errors are implemented as SError instead of interrupts so use a panic notifier. Signed-off-by: Thor Thayer Signed-off-by: Borislav Petkov Cc: dinguyen@kernel.org Cc: robh+dt@kernel.org Cc: mark.rutland@arm.com Cc: mchehab@kernel.org Cc: devicetree@vger.kernel.org Cc: linux-edac@vger.kernel.org Link: https://lkml.kernel.org/r/1537883342-30180-3-git-send-email-thor.thayer@linux.intel.com commit 3ce078ffe2b6547bd6c6aa5a9af7e9398f99f658 Author: Thor Thayer Date: Tue Sep 25 08:48:57 2018 -0500 arm64: dts: stratix10: Additions to EDAC System Manager Add the phandle, address, size and ranges to the Stratix10 System Manager node to match the existing Arria10 EDAC implementation. Signed-off-by: Thor Thayer Signed-off-by: Borislav Petkov Acked-by: Dinh Nguyen Cc: robh+dt@kernel.org Cc: mark.rutland@arm.com Cc: mchehab@kernel.org Cc: devicetree@vger.kernel.org Cc: linux-edac@vger.kernel.org Link: https://lkml.kernel.org/r/1537883342-30180-2-git-send-email-thor.thayer@linux.intel.com commit 9f902b495b537e7e940e002297251e0525292139 Author: Aymen Qader Date: Thu Sep 20 14:22:25 2018 +0100 staging: rts5208: Remove unnecessary braces {} This patch fixes the checkpatch.pl warning "braces {} are not necessary" in the rts5208 driver. Mostly applies to single-line return/goto if blocks. Signed-off-by: Aymen Qader Signed-off-by: Greg Kroah-Hartman commit bddd3c2546e9c46e59160bbfdc49c82f9220212e Author: Christian Gromm Date: Fri Sep 21 11:28:51 2018 +0200 staging: most: fix label names This patch makes use of label names that say what the goto actually does, as recommended in the kernel documentation. Signed-off-by: Christian Gromm Signed-off-by: Greg Kroah-Hartman commit bfeb67ed4f154e863c8c460527f534a6525f0318 Author: Michael Straube Date: Tue Sep 25 13:25:21 2018 +0200 staging: rtl8188eu: remove rtw_qos.h There is only one struct in rtw_qos.h and it is only included from drv_types.h. Move the struct into drv_types.h to reduce the number of header files. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit 9da94a7fc809d101c96df008e18451eb4982630a Author: Michael Straube Date: Tue Sep 25 13:25:20 2018 +0200 staging: rtl8188eu: remove unused rtw_scan_abort() The function rtw_scan_abort() is never used, so remove it. Discovered by cppcheck. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit 44075b6414ff8e672353d5f567aa6d3080fb0563 Author: Nathan Chancellor Date: Fri Sep 21 10:37:23 2018 -0700 staging: rtl8188eu: Remove unnecessary parentheses Clang warns when multiple pairs of parentheses are used for a single conditional statement. drivers/staging/rtl8188eu/core/rtw_pwrctrl.c:295:21: warning: equality comparison with extraneous parentheses [-Wparentheses-equality] if ((pwrpriv->rpwm == pslv)) { ~~~~~~~~~~~~~~^~~~~~~ drivers/staging/rtl8188eu/core/rtw_pwrctrl.c:295:21: note: remove extraneous parentheses around the comparison to silence this warning if ((pwrpriv->rpwm == pslv)) { ~ ^ ~ drivers/staging/rtl8188eu/core/rtw_pwrctrl.c:295:21: note: use '=' to turn this equality comparison into an assignment if ((pwrpriv->rpwm == pslv)) { ^~ = drivers/staging/rtl8188eu/hal/odm.c:1062:27: warning: equality comparison with extraneous parentheses [-Wparentheses-equality] if ((pregpriv->wifi_spec == 1))/* (pmlmeinfo->HT_enable == 0)) */ ~~~~~~~~~~~~~~~~~~~~^~~~ drivers/staging/rtl8188eu/hal/odm.c:1062:27: note: remove extraneous parentheses around the comparison to silence this warning if ((pregpriv->wifi_spec == 1))/* (pmlmeinfo->HT_enable == 0)) */ ~ ^ ~ drivers/staging/rtl8188eu/hal/odm.c:1062:27: note: use '=' to turn this equality comparison into an assignment if ((pregpriv->wifi_spec == 1))/* (pmlmeinfo->HT_enable == 0)) */ ^~ = Link: https://github.com/ClangBuiltLinux/linux/issues/163 Signed-off-by: Nathan Chancellor Signed-off-by: Greg Kroah-Hartman commit 96ffa48c7271fe9978bea01eb4784edbfaa3a362 Author: Arkadiusz Lis Date: Mon Sep 24 19:34:22 2018 +0200 staging: emxx_udc: remove unnecessary nullpointer checks This patch removes nullpointer checks which are redundant. container_of returns structure containing entity which we know for sure is not null, so the whole structure can not be null. Signed-off-by: Arkadiusz Lis Signed-off-by: Greg Kroah-Hartman commit 3d426daf09a692b87100c0bb84369dd28101eb14 Author: Aymen Qader Date: Tue Sep 25 09:34:00 2018 +0100 staging: bcm2835-camera: Remove unused header Remove the asm/cacheflush.h header include from mmal-vchiq.c. This dependency was removed in: commit 7e8dbea41032 ("staging: bcm2835-camera: Remove explicit cache flush operations") Signed-off-by: Aymen Qader Signed-off-by: Greg Kroah-Hartman commit 84416bae805744999d1863cfb0e2d9e33cf1f4fa Author: Aymen Qader Date: Tue Sep 25 09:33:59 2018 +0100 staging: bcm2835-camera: Update TODO Remove the TODO item to remove manual cache flushing from bulk_receive. This was previously done in this commit: commit 7e8dbea41032 ("staging: bcm2835-camera: Remove explicit cache flush operations") Signed-off-by: Aymen Qader Signed-off-by: Greg Kroah-Hartman commit b4a6d9164fb7644193b2377748f66ce98853c741 Author: Colin Ian King Date: Mon Sep 24 17:25:25 2018 +0100 staging: rtl8723bs: fix spelling mistake "toogle" -> "toggle" Trivial fix to spelling mistake in struct field name Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman commit ee6eb73bf54949a4c52bfee156df20a966cff252 Author: Colin Ian King Date: Mon Sep 24 18:30:31 2018 +0100 staging: rtl8723bs: fix spelling mistake "unvalid" -> "invalid" Trivial fix to spelling mistake in DBG_871X debug messages. Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman commit b4a2b208fbfabf18ac36a9009b248a80c640bfdb Author: Colin Ian King Date: Sun Sep 23 11:25:55 2018 +0200 staging: rtl8188eu, rtl8723bs: fix spelling mistake "evet" -> "event" Trivial fix to spelling mistake in RT_TRACE message Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman commit 8ba5843c9e68d4c1b43f6e18d6ae3254e81de3ec Author: Aymen Qader Date: Thu Sep 20 23:53:21 2018 +0100 staging: sm750fb: Fix typo frambuffer->framebuffer This patch corrects a typo (frambuffer->framebuffer) in the sm750fb_fram(e)buffer_release and sm750fb_fram(e)buffer_alloc function names. Signed-off-by: Aymen Qader Signed-off-by: Greg Kroah-Hartman commit cf3f98c7f466a7c79458cdeb779afb9309e243e0 Author: Geert Uytterhoeven Date: Tue Sep 25 13:01:28 2018 -0600 drivers/vfio: Allow type-1 IOMMU instantiation with all ARM/ARM64 IOMMUs Currently the type-1 IOMMU instantiation depends on "ARM_SMMU || ARM_SMMU_V3", while it applies to other ARM/ARM64 platforms with an IOMMU (e.g. Renesas VMSA-compatible IPMMUs). Instead of extending the list of IOMMU types on ARM platforms, replace the list by "ARM || ARM64", like other architectures do. The feature is still restricted to ARM/ARM64 platforms with an IOMMU by the dependency on IOMMU_API. Signed-off-by: Geert Uytterhoeven Reviewed-by: Robin Murphy Reviewed-by: Simon Horman Signed-off-by: Alex Williamson commit db04264fe9bc0f2b62e036629f9afb530324b693 Author: Alex Williamson Date: Tue Sep 25 13:01:27 2018 -0600 vfio/pci: Mask buggy SR-IOV VF INTx support The SR-IOV spec requires that VFs must report zero for the INTx pin register as VFs are precluded from INTx support. It's much easier for the host kernel to understand whether a device is a VF and therefore whether a non-zero pin register value is bogus than it is to do the same in userspace. Override the INTx count for such devices and virtualize the pin register to provide a consistent view of the device to the user. As this is clearly a spec violation, warn about it to support hardware validation, but also provide a known whitelist as it doesn't do much good to continue complaining if the hardware vendor doesn't plan to fix it. Known devices with this issue: 8086:270c Tested-by: Gage Eads Reviewed-by: Ashok Raj Signed-off-by: Alex Williamson commit 30ea32ab1951c80c6113f300fce2c70cd12659e4 Author: Li Qiang Date: Tue Sep 25 13:01:27 2018 -0600 vfio/pci: Fix potential memory leak in vfio_msi_cap_len Free allocated vdev->msi_perm in error path. Signed-off-by: Li Qiang Reviewed-by: Eric Auger Signed-off-by: Alex Williamson commit 454dc5905d0cb99de61d41ae205e5b62922869e9 Author: Ajay Singh Date: Tue Sep 25 11:53:44 2018 +0530 staging: wilc1000: return exact error of register_netdev() from wilc_netdev_init() Refactor wilc_netdev_init() to return the error code received from register_netdev() during the failure condition. Earlier discussion link [1]. https://www.spinics.net/lists/linux-wireless/msg177304.html Suggested-by: Claudiu Beznea Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit ba853fe6f8a4657ec675d53a34d6bc6cbb7d1638 Author: Ajay Singh Date: Tue Sep 25 11:53:43 2018 +0530 staging: wilc1000: refactor wilc_set_multicast_list() function Refactor wilc_set_multicast_list() by making below changes: o use kmalloc_array o remove unnecessary res o add u8 *cur_mc o use i as index o use '%pM' extension in netdev_dbg() The below checkpatch issue is also resolved after code refactor. 'spaces preferred around that '/' (ctx:VxV)' Suggested-by: Joe Perches Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit fb8ec2158fe85f440350bfb467129e2ae5204879 Author: Ajay Singh Date: Tue Sep 25 11:53:42 2018 +0530 staging: wilc1000: use usleep_range() in place of udelay() Changes to avoid the below checkpatch warning: 'usleep_range is preferred over udelay; see Documentation/timers/timers-howto.txt;' Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit b5fe797fb0f2ae8be9c34d0f8e1d0310d6f4bc11 Author: Ajay Singh Date: Tue Sep 25 11:53:41 2018 +0530 staging: wilc1000: remove unnecessary option used with ccflags-y in Makefile Cleanup patch to remove -I(src) and -DWILC_ASIC_A0 option used in ccflag-y in Makefile. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit 1860646a67ce2baf40e8d96550b003699033e182 Author: Ajay Singh Date: Tue Sep 25 11:53:40 2018 +0530 staging: wilc1000: remove wilc_debugfs.c file as its not used Deleted wilc_debugfs.c file as it's not used. Earlier discussion link: [1]. https://www.spinics.net/lists/linux-wireless/msg176076.html Suggested-by: Greg KH Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit f41cf2460edfab5813b347b7890edadb47cfd17d Author: Ajay Singh Date: Tue Sep 25 11:53:39 2018 +0530 staging: wilc1000: remove p2p related static variables to wilc_vif struct Avoid use of static variable and move them as part of private data(wilc_priv) struct. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit a944140250ce2f200d2b54fa7ec03aad4a5d6901 Author: Ajay Singh Date: Tue Sep 25 11:53:38 2018 +0530 staging: wilc1000: remove unnecessary memset in sdio_init() & wilc_spi_init() Cleanup changes to avoid unnecessary setting 'wilc->bus_data' value to zero as the buffer was allocated using kzalloc(). Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit 110f4b755e5df82fa4fe54612552dddfe9d58ad5 Author: Ajay Singh Date: Tue Sep 25 11:53:37 2018 +0530 staging: wilc1000: avoid use of 'g_spi' static variable Instead of using static variable 'g_spi' move it as part of 'wilc' struct. Also allocating the memory in the probe function and free is taken care in wilc_netdev_cleanup(). Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit 97eaff578bf79e41d7efa50046ba2acc95ac4cd2 Author: Ajay Singh Date: Tue Sep 25 11:53:36 2018 +0530 staging: wilc1000: avoid use of 'g_sdio' static variable Instead of using static variable 'g_sdio' move it as part of 'wilc' struct. Also allocating the memory in the probe function and free during deinitialization. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit d29ad322e0ea4f5dac4a66ccf19e88def79b43b2 Author: Ajay Singh Date: Tue Sep 25 11:53:35 2018 +0530 staging: wilc1000: remove use of unnecessary 'wilc_connected_ssid' variable 'wilc_connected_ssid' actually used to store the BSSID information for connected BSSID. 'wilc_vif' already has 'bssid' variable to store the same information. So refactor code to remove 'wilc_connected_ssid' and instead used 'wilc_vif' struct 'bssid' element. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit 39996811d5d2811c0551ed346099e65e7825c0e6 Author: Ajay Singh Date: Tue Sep 25 11:53:34 2018 +0530 staging: wilc1000: avoid the use of 'hif_driver_comp' completion variable Instead of using extra completion variable to handle the sync call now using msg->is_sync flag to handle the sync call. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit cb6f1f576ef28750e33d3769b179ee0865cee371 Author: Ajay Singh Date: Tue Sep 25 11:53:33 2018 +0530 staging: wilc1000: rename 'wilc_mac_cfg' struct to 'wilc_cfg_str_vals' Rename 'wilc_mac_cfg' struct to 'wilc_cfg_str_vals' as its more appropriate for structure to store the values of string configuration. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit acceb12a9f8b97ff0e76d3febed4e9941674e571 Author: Ajay Singh Date: Tue Sep 25 11:53:32 2018 +0530 staging: wilc1000: refactor code to avoid static variables for config parameters Refactor the code in wilc_wlan_cfg.c file to avoid the use of static variables. Move the static variables as part of wilc struct and also dynamically allocating memory for keeping those variables. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit de11f709dfaf267658c3478361b2a2822b5263c5 Author: Ajay Singh Date: Tue Sep 25 11:53:31 2018 +0530 staging: wilc1000: refactor code to remove 'mac_status' from 'wilc_mac_cfg' struct Refactor the code by removing use of 'mac_status' from 'wilc_mac_cfg' and only have the string type configuration values in 'wilc_mac_cfg' struct. Now fetch the value 'WID_STATUS' configuration from 'g_cfg_byte' array. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit 540aa64d4ee519a94709f46874be617d73839398 Author: Ajay Singh Date: Tue Sep 25 11:53:30 2018 +0530 staging: wilc1000: remove unused wid from cfg struct Cleanup patch to remove the unused element stored in cfg struct. Removed those wid from the cfg variables whose value is not fetched(GET_CFG) from the code. In case the wid is only set to the firmware then there is need to store them as part of cfg variables, so removed the unused code. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit 9d7f5702280304c98a308c58a3b2ba591c4c0e56 Author: Ajay Singh Date: Tue Sep 25 11:53:29 2018 +0530 staging: wilc1000: remove unused wid type values Cleanup patch to remove the wid type not used in the code. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit 043c97804bcc4b57145929a891e7ca4c273a82dc Author: Ajay Singh Date: Tue Sep 25 11:53:28 2018 +0530 staging: wilc1000: changes 'val' type to u8 in wilc_cfg_byte struct Use the correct datatype for storing the byte value in 'wilc_cfg_byte' struct. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit b7c355dad9017df3184568e7c301aafd129e4df5 Author: Ajay Singh Date: Tue Sep 25 11:53:27 2018 +0530 staging: wilc1000: set default value of cfg response type in wilc_wlan_cfg_indicate_rx() Handle the setting of default value for 'wilc_cfg_rsp' type for all cases in wilc_wlan_cfg_indicate_rx() as the caller make use of this value to know the type of the received message. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit 1a46d545e985d78cb8d9b0f32ee75cd45ffed0e7 Author: Ajay Singh Date: Tue Sep 25 11:53:26 2018 +0530 staging: wilc1000: refactor wilc_wlan_parse_info_frame() function Return 'void' from wilc_wlan_parse_info_frame() as same constant value is returned always. Also removed the 'size' from input parameter as its not used in the function. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit 5d482d2dc928b600a2a13f9af1bcf3a8a19e622a Author: Ajay Singh Date: Tue Sep 25 11:53:25 2018 +0530 staging: wilc1000: change return type to 'void' for wilc_wlan_cfg_indicate_rx() Cleanup patch to use 'void' return type for wilc_wlan_cfg_indicate_rx(), as its return value is not used in caller. The value set in 'rsp' argument is used to get the success status. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit 5a5078b0d92f72cae8eec910d0ada8fb2a37614e Author: Ajay Singh Date: Tue Sep 25 11:53:24 2018 +0530 staging: wilc1000: use 'void' return for wilc_wlan_txq_filter_dup_tcp_ack() Use 'void' return for wilc_wlan_txq_filter_dup_tcp_ack() as it always return value '1' and its not used by the caller. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit 584c8795b3bdaf090d7c695cc30ed22465063061 Author: Ajay Singh Date: Tue Sep 25 11:53:23 2018 +0530 staging: wilc1000: change return type to 'void' tcp ack filter functions Use 'void' return type for below functions as they always return '0' and their return value is not used by caller. add_tcp_pending_ack() update_tcp_session() add_tcp_pending_ack() Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit 34dbf00cb88e5b71f2b7b26e657a431522268fc7 Author: Ajay Singh Date: Tue Sep 25 11:53:22 2018 +0530 staging: wilc1000: use 'void' return for wilc_wlan_txq_add_to_head() Use 'void' return for wilc_wlan_txq_add_to_head() as its always return '0' value. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit abffb39bdea65247a9248527c07a3ab13c332b27 Author: Ajay Singh Date: Tue Sep 25 11:53:21 2018 +0530 staging: wilc1000: use 'void' return type for host_int_get_assoc_res_info() Change return type to 'void' for host_int_get_assoc_res_info() as its return value is not used. 'rcvd_assoc_resp_info_len' parameter value is used to know the status. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit cafbb905eb90209e5ede26613ac686089f0ef971 Author: Ajay Singh Date: Tue Sep 25 11:53:20 2018 +0530 staging: wilc1000: change return type to 'void' for wilc_wfi_deinit_mon_interface() Use 'void' return type for wilc_wfi_deinit_mon_interface(), as same value always return. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit 8f12491506797fa1139931f959528e4d6884498b Author: Ajay Singh Date: Tue Sep 25 11:53:19 2018 +0530 staging: wilc1000: change return type to 'void' for wilc_deinit_host_int() Cleanup patch to use 'void' return type for wilc_deinit_host_int(), as its return value is not used in caller. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit d579112b616919868911774070f68496e570e4d6 Author: Ajay Singh Date: Tue Sep 25 11:53:18 2018 +0530 staging: wilc1000: change return type to 'void' for lock init & deinit functions Cleanup patch to use 'void' return type for wlan_deinit_locks() & wlan_init_locks(), as same value is return. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit 080de2491349ae65f709ac372b6bedfa1d38f16c Author: Ajay Singh Date: Tue Sep 25 11:53:17 2018 +0530 staging: wilc1000: change return type to 'void' for wilc_wlan_set_bssid() Cleanup patch to use 'void' return type for wilc_wlan_set_bssid(), as its always returns the same value. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit e8de0ac8c82b3fae2e50fd43f0358197cbb6e99c Author: Ajay Singh Date: Tue Sep 25 11:53:16 2018 +0530 staging: wilc1000: change return type to 'void' for wilc_frame_register() Cleanup patch to use 'void' return type for wilc_frame_register(), as its return value is not used. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit 8bdfc47f4ef186d73b2849fcdc065c78e20bd71a Author: Nathan Chancellor Date: Thu Sep 20 14:26:49 2018 -0700 staging: wilc1000: Remove unnecessary pointer check Clang warns that the address of a pointer will always evaluated as true in a boolean context: drivers/staging/wilc1000/linux_wlan.c:267:20: warning: address of 'vif->ndev->dev' will always evaluate to 'true' [-Wpointer-bool-conversion] if (!(&vif->ndev->dev)) ~ ~~~~~~~~~~~^~~ 1 warning generated. Since this statement always evaluates to false due to the logical not, remove it. Link: https://github.com/ClangBuiltLinux/linux/issues/121 Signed-off-by: Nathan Chancellor Reviewed-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit 8de447ea9d0196d5ce54d96ab19e2a9c5d763ad8 Author: Nathan Chancellor Date: Sat Sep 22 23:33:01 2018 -0700 staging: rtlwifi: Use proper enumerated types for Wi-Fi only interface Clang warns when one enumerated type is implicitly converted to another. drivers/staging/rtlwifi/btcoexist/halbtcoutsrc.c:1264:34: warning: implicit conversion from enumeration type 'enum btc_chip_interface' to different enumeration type 'enum wifionly_chip_interface' [-Wenum-conversion] wifionly_cfg->chip_interface = BTC_INTF_PCI; ~ ^~~~~~~~~~~~ drivers/staging/rtlwifi/btcoexist/halbtcoutsrc.c:1267:34: warning: implicit conversion from enumeration type 'enum btc_chip_interface' to different enumeration type 'enum wifionly_chip_interface' [-Wenum-conversion] wifionly_cfg->chip_interface = BTC_INTF_USB; ~ ^~~~~~~~~~~~ drivers/staging/rtlwifi/btcoexist/halbtcoutsrc.c:1270:34: warning: implicit conversion from enumeration type 'enum btc_chip_interface' to different enumeration type 'enum wifionly_chip_interface' [-Wenum-conversion] wifionly_cfg->chip_interface = BTC_INTF_UNKNOWN; ~ ^~~~~~~~~~~~~~~~ 3 warnings generated. Use the values from the correct enumerated type, wifionly_chip_interface. BTC_INTF_UNKNOWN = WIFIONLY_INTF_UNKNOWN = 0 BTC_INTF_PCI = WIFIONLY_INTF_PCI = 1 BTC_INTF_USB = WIFIONLY_INTF_USB = 2 Link: https://github.com/ClangBuiltLinux/linux/issues/171 Signed-off-by: Nathan Chancellor Signed-off-by: Greg Kroah-Hartman commit f986978b32b30a6489de8d3ffa36bbc8b0ee2675 Author: Karthik Nishanth Date: Sat Sep 22 14:23:54 2018 +0000 Staging: rtlwifi: remove unnecessary NULL check The member regd of the struct rtl_priv is true in a boolean context. drivers/staging/rtlwifi/regd.c:413:27: warning: address of 'rtlpriv->regd' will always evaluate to 'true' [-Wpointer-bool-conversion] if (!wiphy || !&rtlpriv->regd) ~ ~~~~~~~~~^~~~ 1 warning generated. Link: https://github.com/ClangBuiltLinux/linux/issues/170 Signed-off-by: Karthik Nishanth Reviewed-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman commit 74cf77e8be35795b4cc57b7010bc348295e421b9 Author: Liviu Dudau Date: Mon Sep 24 11:22:28 2018 +0100 arm64: dts: broadcom: Use the .dtb name in the rule, rather than .dts Commit a7eb26392b893 ("arm64: dts: broadcom: Add reference to Compute Module IO Board V3") adds the bcm2837-rpi-cm3-io3.dts file as a target in the Makefile, rather than the .dtb name. This will skip the generation of the .dtb file at compile time and will fail the dtbs_install target. Fixes: a7eb26392b893 ("arm64: dts: broadcom: Add reference to Compute Module IO Board V3") Signed-off-by: Liviu Dudau Acked-by: Stefan Wahren Signed-off-by: Olof Johansson commit f007d901f2e8805c7a8442fa05a324460fe13ed8 Author: Aymen Qader Date: Mon Sep 24 18:35:47 2018 +0100 staging: vc04_services: Remove spaces after '*' This patch fixes the checkpatch.pl error: ERROR: "foo * bar" should be "foo *bar" in the interface/vchi directory Signed-off-by: Aymen Qader Signed-off-by: Greg Kroah-Hartman commit 123f4b1f4256e785585650b20c68900471a7865f Author: Aymen Qader Date: Mon Sep 24 18:35:46 2018 +0100 staging: vc04_services: Remove unused macros This patch removes the macros and structs associated with the "vchi_msg_queuev_ex" function, which was previously removed in 49bec49. Also fixes the checkpatch.pl errors: ERROR: Macros with complex values should be enclosed in parentheses ERROR: space required after that ',' Signed-off-by: Aymen Qader Signed-off-by: Greg Kroah-Hartman commit c39675197e1aa58453aef5de4d2fbab8f6c60213 Author: Aymen Qader Date: Mon Sep 24 18:35:45 2018 +0100 staging: vc04_services: Use tabs instead of spaces This patch fixes the checkpatch.pl error: ERROR: code indent should use tabs where possible in the interface/vchi directory Signed-off-by: Aymen Qader Signed-off-by: Greg Kroah-Hartman commit 5443a1e41cec34531d8904fe9196ed29a2e1d5a8 Author: Aymen Qader Date: Mon Sep 24 18:35:44 2018 +0100 staging: vc04_services: Fix "space prohibited" This patch fixes the checkpatch.pl error: ERROR: space prohibited after/before that open/closed parenthesis in the interface/vchi directory. Signed-off-by: Aymen Qader Signed-off-by: Greg Kroah-Hartman commit df7c9da1fdf774e6b30228983c15a1bcf540880a Author: Tuomas Tynkkynen Date: Fri Sep 21 22:56:01 2018 +0300 staging: vc04_services: Remove unused vchiq_genversion script As far as I can tell, this has never been used. Signed-off-by: Tuomas Tynkkynen Acked-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman commit c683db8860a80562a2bb5b451d77b3e471d24f36 Author: Phil Elwell Date: Mon Sep 17 09:22:21 2018 +0100 staging/vc04_services: Use correct cache line size Use the compatible string in the DTB to select the correct cache line size for the SoC - 32 for BCM2835, and 64 for BCM2836 and BCM2837. Signed-off-by: Phil Elwell Tested-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman commit 478bf0b470987a7d833999ff5066e3752182bf93 Merge: 786bd99c91f5 7265b3d9ddaa Author: Olof Johansson Date: Tue Sep 25 11:39:42 2018 -0700 Merge tag 'hisi-defconfig-for-4.20' of git://github.com/hisilicon/linux-hisi into next/defconfig ARM64: hisilicon: defconfig updates for 4.20 - Enable integrated NIC driver(hns3) for hisilicon SoCs - Enable PCIe Port bus to support some PCIe features like AER, hotplug, PME and DPC * tag 'hisi-defconfig-for-4.20' of git://github.com/hisilicon/linux-hisi: arm64: defconfig: Enable PCIEPORTBUS arm64: defconfig: enable HiSilicon HNS3 driver Signed-off-by: Olof Johansson commit 3790e28cdbc8e7c4ffff62a9e4db89fe6e066c0b Author: Wei Yongjun Date: Thu Sep 20 06:22:05 2018 +0000 platform: goldfish: pipe: Make symbol 'goldfish_pipe_dev' static Fixes the following sparse warning: drivers/platform/goldfish/goldfish_pipe.c:214:26: warning: symbol 'goldfish_pipe_dev' was not declared. Should it be static? Signed-off-by: Wei Yongjun Signed-off-by: Greg Kroah-Hartman commit 786bd99c91f50482fb9e2b828b203d7e8acc1b56 Merge: 0626c46e1ec3 4c736c22d954 Author: Olof Johansson Date: Tue Sep 25 11:36:39 2018 -0700 Merge tag 'stm32-defconfig-for-v4.20-1' of git://git.kernel.org/pub/scm/linux/kernel/git/atorgue/stm32 into next/defconfig STM32 defconfig updates for v4.20, round 1 In multi_v7_defconfig, add support of: -STM32 SPI (module) -STM32 DRM and MIPI DSI (modules) -Panels OTM8009A and RM68200 (modules) -Enable backlight gpio * tag 'stm32-defconfig-for-v4.20-1' of git://git.kernel.org/pub/scm/linux/kernel/git/atorgue/stm32: ARM: multi_v7_defconfig: enable backlight gpio ARM: multi_v7_defconfig: enable panels OTM8009A and RM68200 ARM: multi_v7_defconfig: enable STM32 DRM and MIPI DSI support ARM: multi_v7_defconfig: enable STM32 SPI commit cdfa835c6e5e87d145f9f632b58843de97509f2b Author: Stephen Hemminger Date: Fri Sep 14 09:10:20 2018 -0700 uio_hv_generic: defer opening vmbus until first use This fixes two design flaws in hv_uio_generic. Since hv_uio_probe is called from vmbus_probe with lock held it potentially can cause sleep in an atomic section because vmbus_open will wait for response from host. The hv_uio_generic driver could not handle applications exiting and restarting because the vmbus channel was persistent. Change the semantics so that the buffers are allocated on probe, but not attached to host until device is opened. Signed-off-by: Stephen Hemminger Signed-off-by: Greg Kroah-Hartman commit 9da197f1df40c838f0f06abf94cd23b4ed81e522 Author: Stephen Hemminger Date: Fri Sep 14 09:10:19 2018 -0700 hv_uio_generic: map ringbuffer phys addr The ring buffer is contiguous IOVA and is mapped via phys addr for sysfs file. Use same method for the UIO mapping. Signed-off-by: Stephen Hemminger Signed-off-by: Greg Kroah-Hartman commit bfddabfa230452cea32aae82f9cd85ab22601acf Author: Stephen Hemminger Date: Fri Sep 14 09:10:18 2018 -0700 uio: introduce UIO_MEM_IOVA Introduce the concept of mapping physical memory locations that are normal memory. The new type UIO_MEM_IOVA are similar to existing UIO_MEM_PHYS but the backing memory is not marked as uncached. Also, indent related switch to the currently used style. Signed-off-by: Stephen Hemminger Signed-off-by: Greg Kroah-Hartman commit ae6935ed7d424ffa74d634da00767e7b03c98fd3 Author: Stephen Hemminger Date: Fri Sep 14 09:10:17 2018 -0700 vmbus: split ring buffer allocation from open The UIO driver needs the ring buffer to be persistent(reused) across open/close. Split the allocation and setup of ring buffer out of vmbus_open. For normal usage vmbus_open/vmbus_close there are no changes; only impacts uio_hv_generic which needs to keep ring buffer memory and reuse when application restarts. Signed-off-by: Stephen Hemminger Signed-off-by: Greg Kroah-Hartman commit 52a42c2a90226dc61c99bbd0cb096deeb52c334b Author: Stephen Hemminger Date: Fri Sep 14 09:10:16 2018 -0700 vmbus: keep pointer to ring buffer page Avoid going from struct page to virt address (and back) by just keeping pointer to the allocated pages instead of virt address. Signed-off-by: Stephen Hemminger Signed-off-by: Greg Kroah-Hartman commit 800b932969c53c4044ff9f9fd1ee793a87fa8ef0 Author: Stephen Hemminger Date: Fri Sep 14 09:10:15 2018 -0700 vmbus: pass channel to hv_process_channel_removal Rather than passing relid and then looking up the channel. Pass the channel directly, since caller already knows it. Signed-off-by: Stephen Hemminger Signed-off-by: Greg Kroah-Hartman commit 5bc45db5d2a7bf6eac577174e3634f58f867bb2f Merge: cdddeefc39cc 1a63fe9a2b1f Author: Olof Johansson Date: Tue Sep 25 11:31:00 2018 -0700 Merge tag 'scmi-updates-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into next/drivers SCMI updates for v4.20 1. Addition of interface to fetch estimated power from the firmware corresponding to each OPP of a device 2. Cleanup using strlcpy to ensure NULL-terminated strings for name strings instead of relying on the firmware to do the same * tag 'scmi-updates-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux: firmware: arm_scmi: add a getter for power of performance states firmware: arm_scmi: use strlcpy to ensure NULL-terminated strings Signed-off-by: Olof Johansson commit cdddeefc39cc26b2d429f8f7ea3c35bf8cb8c6a1 Merge: bf1da406909b 11da3a7f84f1 Author: Olof Johansson Date: Tue Sep 25 11:30:47 2018 -0700 Merge tag 'v4.19-rc3' into next/drivers Linux 4.19-rc3 commit 0626c46e1ec36930e16ead3143b67d6c78b08011 Merge: 11da3a7f84f1 99fa3b0c6082 Author: Olof Johansson Date: Tue Sep 25 11:29:40 2018 -0700 Merge tag 'arm-soc/for-4.20/defconfig' of https://github.com/Broadcom/stblinux into next/defconfig This pull request contains Broadcom ARM-based SoCs defconfig changes for 4.20, please pull the following: - Stefan updates the bcm2835_defconfig file to turn on the bcm2835-audio driver. * tag 'arm-soc/for-4.20/defconfig' of https://github.com/Broadcom/stblinux: ARM: bcm2835_defconfig: Enable bcm2835-audio Signed-off-by: Olof Johansson commit 581ae6b7225aaf469001557900763d14898e3683 Author: Roman Kiryanov Date: Fri Sep 14 10:51:06 2018 -0700 platform: goldfish: pipe: Remove redundant header include No symbols were used from this header. Signed-off-by: Roman Kiryanov Signed-off-by: Greg Kroah-Hartman commit 6b979998a0c602d8de2475359e51d060fe60db37 Author: Roman Kiryanov Date: Fri Sep 14 10:51:05 2018 -0700 platform: goldfish: pipe: Remove redundant struct declarations goldfish_pipe_command is defines just after declaration and nothing refers to goldfish_pipe before it is defined. Signed-off-by: Roman Kiryanov Signed-off-by: Greg Kroah-Hartman commit 77994c69b6523925c9c852b9afd2a2d4d40b8b8c Author: Roman Kiryanov Date: Fri Sep 14 10:51:04 2018 -0700 platform: goldfish: pipe: Remove a redundant blank line The blank line is not required there. Signed-off-by: Roman Kiryanov Signed-off-by: Greg Kroah-Hartman commit 48a2d422b508e707f477f9160c795f70c5c20026 Author: Roman Kiryanov Date: Fri Sep 14 10:51:03 2018 -0700 platform: goldfish: pipe: Prevent memory corruption from several threads writing to the same variable Move the "pages" buffer into "struct goldfish_pipe". Since we are locking the mutex on the pipe in transfer_max_buffers, other threads willnot be able to write into it, but other pipe instances could be served because they have its own buffer. Signed-off-by: Roman Kiryanov Signed-off-by: Greg Kroah-Hartman commit 9b9a4a3f140050797a881dec8f8c5ebb33a16ac0 Author: Roman Kiryanov Date: Fri Sep 14 10:51:02 2018 -0700 platform: goldfish: pipe: Remove license boilerplate The boilerplate license is not necessary when the SPDX line is present. Signed-off-by: Roman Kiryanov Signed-off-by: Greg Kroah-Hartman commit 4d3ebd3658d8b87d8ead979725305adc6fae3855 Author: Suzuki K Poulose Date: Thu Sep 20 13:18:16 2018 -0600 coreisght: tmc: Claim device before use Use CLAIM tags to make sure the device is available for use. Cc: Mathieu Poirier Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman commit b85847eeea0d90954216b1d323a5c1c0c2cf07bf Author: zhong jiang Date: Thu Sep 20 13:07:11 2018 +0800 misc: genwqe: remove duplicated include file module.h has duplicated include. hence just remove redundant include file. Signed-off-by: zhong jiang Signed-off-by: Greg Kroah-Hartman commit 02241995b004faa7d9ff628e97f24056190853f8 Author: zhong jiang Date: Thu Sep 20 10:29:13 2018 +0800 misc: genwqe: should return proper error value. The function should return -EFAULT when copy_from_user fails. Even though the caller does not distinguish them. but we should keep backward compatibility. Signed-off-by: zhong jiang Signed-off-by: Greg Kroah-Hartman commit 6dbfdc1a4ee0030563af22bb682ff3bc590422f9 Author: Nathan Chancellor Date: Wed Sep 19 12:50:22 2018 -0700 misc: mic: scif: Remove unused variable Clang warns when a variable is assigned to itself. drivers/misc/mic/scif/scif_dma.c:1577:12: warning: explicitly assigning value of variable of type 'bool' (aka '_Bool') to itself [-Wself-assign] dst_local = dst_local; ~~~~~~~~~ ^ ~~~~~~~~~ 1 warning generated. This is usually done to avoid an unused variable warning, which is the case here. dst_local is used nowhere in this function, which has been the case since the initial code drop in commit 7cc31cd27752 ("misc: mic: SCIF DMA and CPU copy interface") in 2015. Just remove the variable, it can be added back if it was intended to be used. Link: https://github.com/ClangBuiltLinux/linux/issues/107 Signed-off-by: Nathan Chancellor Signed-off-by: Greg Kroah-Hartman commit 7052c5e12851ed5882ca0d0d201060511e8ffa02 Author: zhong jiang Date: Tue Sep 18 16:59:34 2018 +0800 misc: remove redundant include moduleparam.h module.h already contains 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: Greg Kroah-Hartman commit fa0218ef733e6f247a1a3986e3eb12460064ac77 Author: Laura Abbott Date: Tue Sep 11 10:44:03 2018 -0700 misc: kgdbts: Fix restrict error kgdbts current fails when compiled with restrict: drivers/misc/kgdbts.c: In function ‘configure_kgdbts’: drivers/misc/kgdbts.c:1070:2: error: ‘strcpy’ source argument is the same as destination [-Werror=restrict] strcpy(config, opt); ^~~~~~~~~~~~~~~~~~~ As the error says, config is being used in both the source and destination. Refactor the code to avoid the extra copy and put the parsing closer to the actual location. Signed-off-by: Laura Abbott Acked-by: Daniel Thompson Signed-off-by: Greg Kroah-Hartman commit 85dc2c65e6c975baaf36ea30f2ccc0a36a8c8add Author: Nathan Chancellor Date: Fri Sep 14 23:43:37 2018 -0700 misc: echo: Remove unnecessary parentheses and simplify check for zero Clang warns when multiple pairs of parentheses are used for a single conditional statement. drivers/misc/echo/echo.c:384:27: warning: equality comparison with extraneous parentheses [-Wparentheses-equality] if ((ec->nonupdate_dwell == 0)) { ~~~~~~~~~~~~~~~~~~~~^~~~ drivers/misc/echo/echo.c:384:27: note: remove extraneous parentheses around the comparison to silence this warning if ((ec->nonupdate_dwell == 0)) { ~ ^ ~ drivers/misc/echo/echo.c:384:27: note: use '=' to turn this equality comparison into an assignment if ((ec->nonupdate_dwell == 0)) { ^~ = 1 warning generated. Remove them and while we're at it, simplify the zero check as '!var' is used more than 'var == 0'. Reported-by: Nick Desaulniers Signed-off-by: Nathan Chancellor Reviewed-by: Nick Desaulniers Signed-off-by: Greg Kroah-Hartman commit 9e663f4811c6fd58c03e918c3f0a2e08810e38c1 Author: Srinivas Kandagatla Date: Sun Sep 16 16:45:40 2018 -0700 slimbus: core: add support to uevent This patch adds support to uevent to help automatic module loading. Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman commit 8f3d5fcde9df6c0b24ec127a18dd1e2e9f54f8e8 Author: Srinivas Kandagatla Date: Sun Sep 16 16:45:41 2018 -0700 slimbus: core: update device status in probe device status update can be racy with probe in some cases, so make sure it take lock during the probe. Also after probe the device is expected to be ready for communications, so make sure that a logical address can be assigned to it after probe. If it fails to do so then probe defer such instances. Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman commit 14a649d33e8145ec14e0429e56bbb12660baa4df Author: Srinivas Kandagatla Date: Sun Sep 16 16:45:42 2018 -0700 slimbus: core: match device tree based devices correctly device_id for device tree based devices come from dt compatible string, such drivers need not provide non dt style device id table. Match those device using compatible strings. Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman commit 0e321f19be94448ca0375e2e0cc28a5f3950e9bb Author: Srinivas Kandagatla Date: Sun Sep 16 16:45:43 2018 -0700 slimbus: ngd: validate logical address assigned by remote Validate logical address assigned by remote, in failure cases this value is all zeors. Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman commit 94fe5f2b45c4108885e4b71f6b181068632ec904 Author: Srinivas Kandagatla Date: Sun Sep 16 16:45:44 2018 -0700 silmbus: ngd: register controller after power up. Register slimbus controller only after finishing powerup sequnce so that we do not endup in situation where core starts sending transactions before the controller is ready. Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman commit 9652e6aa62a1836494ebb8dbd402587c083b568c Author: Srinivas Kandagatla Date: Sun Sep 16 16:45:45 2018 -0700 slimbus: ngd: return proper error code instead of zero It looks like there is a typo in probe return. Fix it. Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman commit 1830dad34c070161fda2ff1db77b39ffa78aa380 Author: Srinivas Kandagatla Date: Sun Sep 16 16:45:46 2018 -0700 slimbus: ngd: register ngd driver only once. Move ngd platform driver out of loop so that it registers only once. Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman commit 3104389edc012e2567cabb94af8763121c33e72b Author: zhong jiang Date: Sun Sep 16 21:08:45 2018 +0800 misc: sram: remove redundant null pointer check before of_node_put of_node_put has taken the null pinter check into account. So it is safe to remove the duplicated check before of_node_put. Signed-off-by: zhong jiang Signed-off-by: Greg Kroah-Hartman commit 7153d9afdbd52805f99c28f51e81ee65f5dabbf8 Author: Colin Ian King Date: Tue Sep 11 17:58:58 2018 +0100 firmware: vpd: fix spelling mistake "partion" -> "partition" Trivial fix to spelling mistake in comment Signed-off-by: Colin Ian King Reviewed-by: Guenter Roeck Signed-off-by: Greg Kroah-Hartman commit bf1da406909b13903873d1f91346f99303fd8cb3 Merge: 63c65b872562 d4983983d987 Author: Olof Johansson Date: Tue Sep 25 11:16:12 2018 -0700 Merge tag 'amlogic-drivers' of https://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic into next/drivers Amlogic ARM64 driver updates for v4.20 - add meson-canvas driver and bindings - firmware: Add serial number sysfs entry * tag 'amlogic-drivers' of https://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic: soc: amlogic: add meson-canvas driver dt-bindings: soc: amlogic: add meson-canvas documentation firmware: meson_sm: Add serial number sysfs entry Signed-off-by: Olof Johansson commit f0f9756b7260f4e78a2e4e412a55167178721ca2 Merge: 0d42d73a37ff b1fed3edc82a Author: James Morris Date: Tue Sep 25 11:15:12 2018 -0700 Merge branch 'smack-for-4.20' of https://github.com/cschaufler/next-smack into next-smack From Casey: "Here are three patches for Smack for 4.20. Two clean up warnings and one is a rarely encountered ptrace capability check." commit 8840a6f4a7b18cc3da54271b093516afa9eb4362 Author: Nadav Amit Date: Thu Sep 20 10:30:20 2018 -0700 vmw_balloon: add reset stat It is useful to expose how many times the balloon resets. If it happens more than very rarely - this is an indication for a problem. Reviewed-by: Xavier Deguillard Signed-off-by: Nadav Amit Signed-off-by: Greg Kroah-Hartman commit 22d293ee8d82ae2ddbc96b4413d7fbf5c1ddfc17 Author: Nadav Amit Date: Thu Sep 20 10:30:19 2018 -0700 vmw_balloon: general style cleanup Change all the remaining return values to int to avoid mistakes. Reduce indentation when possible. Reviewed-by: Xavier Deguillard Signed-off-by: Nadav Amit Signed-off-by: Greg Kroah-Hartman commit 6e4453b3211d144a152d88f634a691adf651cfc2 Author: Nadav Amit Date: Thu Sep 20 10:30:18 2018 -0700 vmw_balloon: rework the inflate and deflate loops In preparation for supporting compaction and OOM notification, this patch reworks the inflate/deflate loops. The main idea is to separate the allocation, communication with the hypervisor, and the handling of errors from each other. Doing will allow us to perform concurrent inflation and deflation, excluding the actual communication with the hypervisor. To do so, we need to get rid of the remaining global state that is kept in the balloon struct, specifically the refuse_list. When the VM communicates with the hypervisor, it does not free or put back pages to the balloon list and instead only moves the pages whose status indicated failure into a refuse_list on the stack. Once the operation completes, the inflation or deflation functions handle the list appropriately. As we do that, we can consolidate the communication with the hypervisor for both the lock and unlock operations into a single function. We also reuse the deflation function for popping the balloon. As a preparation for preventing races, we hold a spinlock when the communication actually takes place, and use atomic operations for updating the balloon size. The balloon page list is still racy and will be handled in the next patch. Reviewed-by: Xavier Deguillard Signed-off-by: Nadav Amit Signed-off-by: Greg Kroah-Hartman commit c7b3690fb1522b926557e59c6581ce849bcf9947 Author: Nadav Amit Date: Thu Sep 20 10:30:17 2018 -0700 vmw_balloon: stats rework To allow the balloon statistics to be updated concurrently, we change the statistics to be held per core and aggregate it when needed. To avoid the memory overhead of keeping the statistics per core, and since it is likely not used by most users, we start updating the statistics only after the first use. A read-write semaphore is used to protect the statistics initialization and avoid races. This semaphore is (and will) be used to protect configuration changes during reset. While we are at it, address some other issues: change the statistics update to inline functions instead of define; use ulong for saving the statistics; and clean the statistics printouts. Note that this patch changes the format of the outputs. If there are any automatic tools that use the statistics, they might fail. Reviewed-by: Xavier Deguillard Signed-off-by: Nadav Amit Signed-off-by: Greg Kroah-Hartman commit 0395be3ece114cda496dafd1fb337288c8305e7b Author: Nadav Amit Date: Thu Sep 20 10:30:16 2018 -0700 vmw_balloon: simplify vmballoon_send_get_target() As we want to leave as little as possible on the global balloon structure, to avoid possible future races, we want to get rid sysinfo. We can actually get the total_ram directly, and simplify the logic of vmballoon_send_get_target() a little. While we are doing that, let's return int and avoid mistakes due to bool/int conversions. Reviewed-by: Xavier Deguillard Signed-off-by: Nadav Amit Signed-off-by: Greg Kroah-Hartman commit 8b079cd00f70cf8ad2df00fb36674683d637fae0 Author: Nadav Amit Date: Thu Sep 20 10:30:15 2018 -0700 vmw_balloon: refactor change size from vmballoon_work The required change in the balloon size is currently computed in vmballoon_work(), vmballoon_inflate() and vmballoon_deflate(). Refactor it to simplify the next patches. Reviewed-by: Xavier Deguillard Signed-off-by: Nadav Amit Signed-off-by: Greg Kroah-Hartman commit 25acbdd7e76158099dd9768cdd8ffdeaf2dcb021 Author: Nadav Amit Date: Thu Sep 20 10:30:14 2018 -0700 vmw_balloon: rename VMW_BALLOON_2M_SHIFT to VMW_BALLOON_2M_ORDER The name of the macro'd VMW_BALLOON_2M_SHIFT is misleading. The value reflects 2M huge-page order. Unfortunately, we cannot use HPAGE_PMD_ORDER, since it is not defined when transparent huge-pages are off, so we need to define our own one. Rename it to VMW_BALLOON_2M_ORDER. No functional change. Signed-off-by: Nadav Amit Signed-off-by: Greg Kroah-Hartman commit 8fa3c61a79868ad3529f1dc61709a4c46adab467 Author: Nadav Amit Date: Thu Sep 20 10:30:13 2018 -0700 vmw_balloon: treat all refused pages equally Currently, when the hypervisor rejects a page during lock operation, the VM treats pages differently according to the error-code: in certain cases the page is immediately freed, and in others it is put on a rejection list and only freed later. The behavior does not make too much sense. If the page is freed immediately it is very likely to be used again in the next batch of allocations, and be rejected again. In addition, for support of compaction and OOM notifiers, we wish to separate the logic that communicates with the hypervisor (as well as analyzes the status of each page) from the logic that allocates or free pages. Treat all errors the same way, queuing the pages on the refuse list. Move to the next allocation size (4k) when too many pages are refused. Free the refused pages when moving to the next size to avoid situations in which too much memory is waiting to be freed on the refused list. Reviewed-by: Xavier Deguillard Signed-off-by: Nadav Amit Signed-off-by: Greg Kroah-Hartman commit df8d0d42afe853bb1e15e7543ee710b241bb3b35 Author: Nadav Amit Date: Thu Sep 20 10:30:12 2018 -0700 vmw_balloon: change batch/single lock abstractions The current abstractions for batch vs single operations seem suboptimal and complicate the implementation of additional features (OOM, compaction). The immediate problem of the current abstractions is that they cause differences in how operations are handled when batching is on or off. For example, the refused_alloc counter is not updated when batching is on. These discrepancies are caused by code redundancies. Instead, this patch presents three type of operations, according to whether batching is on or off: (1) add page, (2) communication with the hypervisor and (3) retrieving the status of a page. To avoid the overhead of virtual functions, and since we do not expect additional interfaces for communication with the hypervisor, we use static keys instead of virtual functions. Finally, while we are at it, change vmballoon_init_batching() to return int instead of bool, to be consistent in the return type and avoid potential coding errors. Reviewed-by: Xavier Deguillard Signed-off-by: Nadav Amit Signed-off-by: Greg Kroah-Hartman commit 622074a9f6f7ab07547c71eb998404a0e5c931e1 Author: Nadav Amit Date: Thu Sep 20 10:30:11 2018 -0700 vmw_balloon: remove sleeping allocations Splitting the allocations between sleeping and non-sleeping made some sort of sense as long as rate-limiting was enabled. Now that it is removed, we need to decide - either we want sleeping allocations or not. Since no other Linux balloon driver (hv, Xen, virtio) uses sleeping allocations, use the same approach. We do distinguish, however, between 2MB allocations and 4kB allocations and prevent reclamation on 2MB. In both cases, we avoid using emergency low-memory pools, as it may cause undesired effects. Reviewed-by: Xavier Deguillard Signed-off-by: Nadav Amit Signed-off-by: Greg Kroah-Hartman commit 6c94875799eaf99bfdbb0efce21d75e1c56e96d5 Author: Nadav Amit Date: Thu Sep 20 10:30:10 2018 -0700 vmw_balloon: simplifying batch access The use of accessors for batch entries complicates the code and makes it less readable. Remove it an instead use bit-fields. Reviewed-by: Xavier Deguillard Signed-off-by: Nadav Amit Signed-off-by: Greg Kroah-Hartman commit 4c9a7d6a771d6e9038049a49e26b350a6ee4ffd2 Author: Nadav Amit Date: Thu Sep 20 10:30:09 2018 -0700 vmw_balloon: merge send_lock and send_unlock path The lock and unlock code paths are very similar, so avoid the duplicate code by merging them together. Reviewed-by: Xavier Deguillard Signed-off-by: Nadav Amit Signed-off-by: Greg Kroah-Hartman commit 681311848c8fea6a3025296d88f3876920d577a0 Author: Nadav Amit Date: Thu Sep 20 10:30:08 2018 -0700 vmw_balloon: unify commands tracing and stats Now that we have a single point, unify the tracing and collecting the statistics for commands and their failure. While it might somewhat reduce the control over debugging, it cleans the code a lot. Reviewed-by: Xavier Deguillard Signed-off-by: Nadav Amit Signed-off-by: Greg Kroah-Hartman commit 10a95d5d86e1f65a1075ea2b5469cc8ef1f424c5 Author: Nadav Amit Date: Thu Sep 20 10:30:07 2018 -0700 vmw_balloon: handle commands in a single function. By inlining the hypercall interface, we can unify several operations into one central point in the code: - Updating the target. - Updating when a reset is needed. - Update statistics (which will be done later in the patch-set). - Print debug-messages (although they cannot be enabled as selectively). Reviewed-by: Xavier Deguillard Signed-off-by: Nadav Amit Signed-off-by: Greg Kroah-Hartman commit bbbecc644a4fff76e8c89b9859701bdcde198d9c Author: zhong jiang Date: Thu Sep 20 13:18:19 2018 -0600 coresight: Remove redundant null pointer check before of_node_put and put_device of_node_put and put_device has taken the null pointer check into account. So it is safe to remove the duplicated check. Signed-off-by: zhong jiang Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman commit 1cf11385f354acbadd20f55e41be9bb1db8b1b2c Author: Suzuki K Poulose Date: Thu Sep 20 13:18:18 2018 -0600 coresight: dts: binding: Update coresight binding examples While we updated the coresight DT bindings, some of the new examples were not updated due to the order in which they were merged. Let us update all the missed out ones to the new bindings to avoid confusion. Cc: Mathieu Poirier Cc: Rob Herring Cc: Frank Rowand Signed-off-by: Suzuki K Poulose Reviewed-by: Rob Herring Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman commit 66055149dc0fdeb0f3ae52556f0087d8b4d64bd2 Author: Suzuki K Poulose Date: Thu Sep 20 13:18:17 2018 -0600 coresight: dts: binding: Fix example for TPIU component TPIU component has an input port. The example uses out-ports which is wrong. Let us fix it. Reported-by: Leo Yan Cc: Mathieu Poirier Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman commit 4e33d694376e7f57d788e734dc96fdbd3c408768 Author: Suzuki K Poulose Date: Thu Sep 20 13:18:15 2018 -0600 coresight: dynamic-replicator: Claim device for use Use CLAIM protocol to make sure the device is available for use. Cc: Mathieu Poirier Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman commit f92201b1ab95b3f17c3fa9df8f88dc521e0b604f Author: Suzuki K Poulose Date: Thu Sep 20 13:18:14 2018 -0600 coresight: catu: Claim device before use Use the CLAIM protocol to grab the ownership of the component when in use. Cc: Mathieu Poirier Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman commit f13d7c0835c383e318e28cc9f34b002fc8c85f61 Author: Suzuki K Poulose Date: Thu Sep 20 13:18:13 2018 -0600 coresight: funnel: Claim devices before use Use the CLAIM protocol to grab the ownership of the component. Cc: Mathieu Poirier Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman commit 68a147752d04da73e2786890d78317fc37e6a6a8 Author: Suzuki K Poulose Date: Thu Sep 20 13:18:12 2018 -0600 coresight: etmx: Claim devices before use Use the CLAIM tags to grab the device for self-hosted usage. Cc: Mathieu Poirier Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman commit 2478a6ae4a6a4c8e3f7e9f6f849dffe92e5238e1 Author: Suzuki K Poulose Date: Thu Sep 20 13:18:11 2018 -0600 coresight: Add support for CLAIM tag protocol Coresight architecture defines CLAIM tags for a device to negotiate control of the components (external agent vs self-hosted). Each device has a pair of registers (CLAIMSET & CLAIMCLR) for managing the CLAIM tags. However, the protocol for the CLAIM tags is IMPLEMENTATION DEFINED. PSCI has recommendations for the use of the CLAIM tags to negotiate controls for external agent vs self-hosted use. This patch implements the recommended protocol by PSCI. The claim/disclaim operations are performed from the device specific drivers. The disadvantage is that the calls are sprinkled in each driver, but this makes the operation much simpler. Cc: Mathieu Poirier Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman commit 30af4fb619e5126cb3152072e687b377fc9398d6 Author: Suzuki K Poulose Date: Thu Sep 20 13:18:10 2018 -0600 coresight: dynamic-replicator: Handle multiple connections When a replicator port is enabled, we block the traffic on the other port and route all traffic to the new enabled port. If there are two active trace sessions each targeting the two different paths from the replicator, the second session will disable the first session and route all the data to the second path. ETR / e.g, replicator \ ETB If CPU0 is operated in sysfs mode to ETR and CPU1 is operated in perf mode to ETB, depending on the order in which the replicator is enabled one device is blocked. Ideally we need trace-id for the session to make the right choice. That implies we need a trace-id allocation logic for the coresight subsystem and use that to route the traffic. The short term solution is to only manage the "target port" and leave the other port untouched. That leaves both the paths unaffected, except that some unwanted traffic may be pushed to the paths (if the Trace-IDs are not far enough), which is still fine and can be filtered out while processing rather than silently blocking the data. Cc: Mathieu Poirier Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman commit 62563e84a8c9c682e07b8cce8678e583a24be504 Author: Suzuki K Poulose Date: Thu Sep 20 13:18:09 2018 -0600 coresight: etb10: Handle errors enabling the device Prepare the etb10 driver to return errors in enabling the device. Cc: Mathieu Poirier Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman commit e2a1551a881f27d1914f182e06b423cc242b43b6 Author: Suzuki K Poulose Date: Thu Sep 20 13:18:08 2018 -0600 coresight: etm3: Add support for handling errors Add support for reporting errors back from the SMP cross function call for enabling ETM. Cc: Mathieu Poirier Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman commit e006d89abedd5d04e6033c5614e1bf160b252615 Author: Suzuki K Poulose Date: Thu Sep 20 13:18:07 2018 -0600 coresight: etm4x: Add support for handling errors Add support for handling errors in enabling the component. The ETM is enabled via cross call to owner CPU. Make necessary changes to report the error back from the cross call. Cc: Mathieu Poirier Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman commit 1d364034aaf2fcc7bc23cac2ffde52747376337e Author: Suzuki K Poulose Date: Thu Sep 20 13:18:06 2018 -0600 coresight: tmc-etb/etf: Prepare to handle errors enabling Prepare to handle errors in enabling the hardware and report it back to the core driver. Cc: Mathieu Poirier Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman commit 1c7995e11cd3252d0db63dad948fc96f05d75b77 Author: Suzuki K Poulose Date: Thu Sep 20 13:18:05 2018 -0600 coresight: tmc-etr: Handle errors enabling CATU Make sure we honor the errors in CATU device and abort the operation. While at it, delay setting the etr_buf for the session until we are sure that we are indeed enabling the ETR. Cc: Mathieu Poirier Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman commit 6276f9cba50f77c5b51b581c11b74a51a3f9e040 Author: Suzuki K Poulose Date: Thu Sep 20 13:18:04 2018 -0600 coresight: tmc-etr: Refactor for handling errors Refactor the tmc-etr enable operation to make it easier to handle errors in enabling the hardware. We need to make sure that the buffer is compatible with the ETR. This patch re-arranges to make the error handling easier, by deferring the hardware enablement until all the errors are checked. This also avoids turning the CATU on/off during a sysfs read session. Cc: Mathieu Poirier Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman commit b9866bb16882e89b57e2dc826114316357263fb7 Author: Suzuki K Poulose Date: Thu Sep 20 13:18:03 2018 -0600 coresight: Handle failures in enabling a trace path coresight_enable_path() enables the components in a trace path from a given source to a sink, excluding the source. The operation is performed in the reverse order; the sink first and then backwards in the list. However, if we encounter an error in enabling any of the component, we simply disable all the components in the given path irrespective of whether we enabled some of the components in the enable iteration. This could interfere with another trace session if one of the link devices is turned off (e.g, TMC-ETF). So, we need to make sure that we only disable those components which were actually enabled from the iteration. This patch achieves the same by refactoring the coresight_disable_path to accept a "node" to start from in the forward order, which can then be used from the error path of coresight_enable_path(). With this change, we don't issue a disable call back for a component which didn't get enabled. This change of behavior triggers a bug in coresight_enable_link(), where we leave the refcount on the device and will prevent the device from being enabled forever. So, we also drop the refcount in the coresight_enable_link() if the operation failed. Also, with the refactoring, we always start after the first node (which is the "SOURCE" device) for disabling the entire path. This implies, we must not find a "SOURCE" in the middle of the path. Hence, added a WARN_ON() to make sure the paths we get are sane, rather than simply ignoring them. Cc: Mathieu Poirier Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman commit e7753f3937610633a540f2be81be87531f96ff04 Author: Leo Yan Date: Thu Sep 20 13:18:02 2018 -0600 coresight: tmc: Fix byte-address alignment for RRP >From the comment in the code, it claims the requirement for byte-address alignment for RRP register: 'for 32-bit, 64-bit and 128-bit wide trace memory, the four LSBs must be 0s. For 256-bit wide trace memory, the five LSBs must be 0s'. This isn't consistent with the program, the program sets five LSBs as zeros for 32/64/128-bit wide trace memory and set six LSBs zeros for 256-bit wide trace memory. After checking with the CoreSight Trace Memory Controller technical reference manual (ARM DDI 0461B, section 3.3.4 RAM Read Pointer Register), it proves the comment is right and the program does wrong setting. This patch fixes byte-address alignment for RRP by following correct definition in the technical reference manual. Cc: Mathieu Poirier Cc: Mike Leach Signed-off-by: Leo Yan Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman commit b3bee19e93e7fe9df01e0a90cec025781b638ad4 Author: Leo Yan Date: Thu Sep 20 13:18:01 2018 -0600 coresight: tmc: Refactor loops in etb dump In ETB dump function tmc_etb_dump_hw() it has nested loops. The second level loop is to iterate index in the range [0 .. drvdata->memwidth); but the index isn't really used in the code, thus the second level loop is useless. This patch is to remove the second level loop; the refactor also reduces indentation and we can use 'break' to replace 'goto' tag. Cc: Mathieu Poirier Signed-off-by: Leo Yan Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman commit b860801e3237ec4c74cf8de0be4816996757ae5c Author: Tomasz Nowicki Date: Thu Sep 20 13:18:00 2018 -0600 coresight: etm4x: Configure EL2 exception level when kernel is running in HYP For non-VHE systems host kernel runs at EL1 and jumps to EL2 whenever hypervisor code should be executed. In this case ETM4x driver must restrict configuration to EL1 when it setups kernel tracing. However, there is no separate hypervisor privilege level when VHE is enabled, the host kernel runs at EL2. This patch fixes configuration of TRCACATRn register for VHE systems so that ETM_EXLEVEL_NS_HYP bit is used instead of ETM_EXLEVEL_NS_OS to on/off kernel tracing. At the same time, it moves common code to new helper. Signed-off-by: Tomasz Nowicki Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman commit d4989fe88603367e5998af70ee638ae6790d42d1 Author: Mathieu Poirier Date: Thu Sep 20 13:17:59 2018 -0600 coresight: etb10: Splitting function etb_enable() Up until now the relative simplicity of enabling the ETB made it possible to accommodate processing for both sysFS and perf methods. But work on claimtags and CPU-wide trace scenarios is adding some complexity, making the current code messy and hard to maintain. As such follow what has been done for ETF and ETR components and split function etb_enable() so that processing for both API can be done cleanly. Signed-off-by: Mathieu Poirier Reviewed-by: Suzuki K Poulose Signed-off-by: Greg Kroah-Hartman commit d43b8ec599f90c1f07b1bdd29b0c4b6306726ef2 Author: Mathieu Poirier Date: Thu Sep 20 13:17:58 2018 -0600 coresight: etb10: Refactor etb_drvdata::mode handling This patch moves the etb_drvdata::mode from a locat_t to a simple u32, as it is for the ETF and ETR drivers. This streamlines the code and adds commonality with the other drivers when dealing with similar operations. Signed-off-by: Mathieu Poirier Reviewed-by: Suzuki K Poulose Signed-off-by: Greg Kroah-Hartman commit 22f429f19c4135d51e9dcaf360c0920e32aac7f9 Author: Suzuki K Poulose Date: Thu Sep 20 13:17:57 2018 -0600 coresight: etm-perf: Add support for ETR backend Add support for using TMC-ETR as backend for ETM perf tracing. We use software double buffering at the moment. i.e, the TMC-ETR uses a separate buffer than the perf ring buffer. The data is copied to the perf ring buffer once a session completes. The TMC-ETR would try to match the larger of perf ring buffer or the ETR buffer size configured via sysfs, scaling down to a minimum limit of 1MB. Cc: Mathieu Poirier Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman commit 3d6e8935758392179645e1b105789b3da329ad38 Author: Suzuki K Poulose Date: Thu Sep 20 13:17:56 2018 -0600 coresight: perf: Remove set_buffer call back In coresight perf mode, we need to prepare the sink before starting a session, which is done via set_buffer call back. We then proceed to enable the tracing. If we fail to start the session successfully, we leave the sink configuration unchanged. In order to make the operation atomic and to avoid yet another call back to clear the buffer, we get rid of the "set_buffer" call back and pass the buffer details via enable() call back to the sink. Cc: Mathieu Poirier Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman commit d25054ee8d18c937058a1b69b35fa5bfdef471f3 Author: Suzuki K Poulose Date: Thu Sep 20 13:17:55 2018 -0600 coresight: perf: Add helper to retrieve sink configuration We can always find the sink configuration for a given perf_output_handle. Add a helper to retrieve the sink configuration for a given perf_output_handle. This will be used to get rid of the set_buffer() call back. Cc: Mathieu Poirier Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman commit 7ec786ad193beb5579223174e119805569a7af3b Author: Suzuki K Poulose Date: Thu Sep 20 13:17:54 2018 -0600 coresight: perf: Remove reset_buffer call back for sinks Right now we issue an update_buffer() and reset_buffer() call backs in succession when we stop tracing an event. The update_buffer is supposed to check the status of the buffer and make sure the ring buffer is updated with the trace data. And we store information about the size of the data collected only to be consumed by the reset_buffer callback which always follows the update_buffer. This was originally designed for handling future IPs which could trigger a buffer overflow interrupt. This patch gets rid of the reset_buffer callback altogether and performs the actions in update_buffer, making it return the size collected. We can always add the support for handling the overflow interrupt case later. This removes some not-so pretty hack (storing the new head in the size field for snapshot mode) and cleans it up a little bit. Cc: Mathieu Poirier Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman commit 41a75cdde7351a902066bf7ddf44e0a27996f13c Author: Suzuki K Poulose Date: Thu Sep 20 13:17:53 2018 -0600 coresight: Convert driver messages to dev_dbg Convert component enable/disable messages from dev_info to dev_dbg. When used with perf, the components in the paths are enabled/disabled during each schedule of the run, which can flood the dmesg with these messages. Moreover, they are only useful for debug purposes. So, convert such messages to dev_dbg() which can be turned on as needed. Cc: Mathieu Poirier Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman commit cad5f8d399bbe3c4ed61a21f649d61b09f6efb7b Author: Suzuki K Poulose Date: Thu Sep 20 13:17:52 2018 -0600 coresight: tmc-etr: Relax collection of trace from sysfs mode Since the ETR now uses mode specific buffers, we can reliably provide the trace data captured in sysfs mode, even when the ETR is operating in PERF mode. Cc: Mathieu Poirier Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman commit 96a7f644006ecc05eaaa1a5d09373d0ee63beb0a Author: Suzuki K Poulose Date: Thu Sep 20 13:17:51 2018 -0600 coresight: tmc-etr: Handle driver mode specific ETR buffers Since the ETR could be driven either by SYSFS or by perf, it becomes complicated how we deal with the buffers used for each of these modes. The ETR driver cannot simply free the current attached buffer without knowing the provider (i.e, sysfs vs perf). To solve this issue, we provide: 1) the driver-mode specific etr buffer to be retained in the drvdata 2) the etr_buf for a session should be passed on when enabling the hardware, which will be stored in drvdata->etr_buf. This will be replaced (not free'd) as soon as the hardware is disabled, after necessary sync operation. The advantages of this are : 1) The common code path doesn't need to worry about how to dispose an existing buffer, if it is about to start a new session with a different buffer, possibly in a different mode. 2) The driver mode can control its buffers and can get access to the saved session even when the hardware is operating in a different mode. (e.g, we can still access a trace buffer from a sysfs mode even if the etr is now used in perf mode, without disrupting the current session.) Towards this, we introduce a sysfs specific data which will hold the etr_buf used for sysfs mode of operation, controlled solely by the sysfs mode handling code. Cc: Mathieu Poirier Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman commit 4f8ef21007531c3d7cb5b826e7b2c8999b65ecae Author: Suzuki K Poulose Date: Thu Sep 20 13:17:50 2018 -0600 coresight: perf: Disable trace path upon source error We enable the trace path, before activating the source. If we fail to enable the source, we must disable the path to make sure it is available for another session. Cc: Mathieu Poirier Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman commit f9d81a657bb833ef030a092c50230359dfef4648 Author: Suzuki K Poulose Date: Thu Sep 20 13:17:49 2018 -0600 coresight: perf: Allow tracing on hotplugged CPUs At the moment, if there is no CPU specified for a given event, we use cpu_online_mask and try to build path for each of the CPUs in the mask. This could prevent any CPU that is turned online later to be used for the tracing. This patch changes to use the cpu_present_mask and tries to build path for as much CPUs as possible ignoring the failures in building path for some of the CPUs. If ever we try to trace on those CPUs, we fail the operation. Based on a patch from Mathieu Poirier. Cc: Mathieu Poirier Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman commit c48fb3bbe912a295e5b75eaabaf39874d5b9b773 Author: Suzuki K Poulose Date: Thu Sep 20 13:17:48 2018 -0600 coresight: perf: Avoid unncessary CPU hotplug read lock We hold the read lock on CPU hotplug to simply copy the online mask, which is not really needed. And this can cause a lockdep warning, like : [ 54.632093] ====================================================== [ 54.638207] WARNING: possible circular locking dependency detected [ 54.644322] 4.18.0-rc3-00042-g2d39e6356bb7-dirty #309 Not tainted [ 54.650350] ------------------------------------------------------ [ 54.656464] perf/2862 is trying to acquire lock: [ 54.661031] 000000007e21d170 (&event->mmap_mutex){+.+.}, at: perf_event_set_output+0x98/0x138 [ 54.669486] [ 54.669486] but task is already holding lock: [ 54.675256] 000000001080eb1b (&cpuctx_mutex){+.+.}, at: perf_event_ctx_lock_nested+0xf8/0x1f0 [ 54.683704] [ 54.683704] which lock already depends on the new lock. [ 54.683704] [ 54.691797] [ 54.691797] the existing dependency chain (in reverse order) is: [ 54.699201] [ 54.699201] -> #3 (&cpuctx_mutex){+.+.}: [ 54.704556] __mutex_lock+0x70/0x808 [ 54.708608] mutex_lock_nested+0x1c/0x28 [ 54.713005] perf_event_init_cpu+0x8c/0xd8 [ 54.717574] perf_event_init+0x194/0x1d4 [ 54.721971] start_kernel+0x2b8/0x42c [ 54.726107] [ 54.726107] -> #2 (pmus_lock){+.+.}: [ 54.731114] __mutex_lock+0x70/0x808 [ 54.735165] mutex_lock_nested+0x1c/0x28 [ 54.739560] perf_event_init_cpu+0x30/0xd8 [ 54.744129] cpuhp_invoke_callback+0x84/0x248 [ 54.748954] _cpu_up+0xe8/0x1c8 [ 54.752576] do_cpu_up+0xa8/0xc8 [ 54.756283] cpu_up+0x10/0x18 [ 54.759731] smp_init+0xa0/0x114 [ 54.763438] kernel_init_freeable+0x120/0x288 [ 54.768264] kernel_init+0x10/0x108 [ 54.772230] ret_from_fork+0x10/0x18 [ 54.776279] [ 54.776279] -> #1 (cpu_hotplug_lock.rw_sem){++++}: [ 54.782492] cpus_read_lock+0x34/0xb0 [ 54.786631] etm_setup_aux+0x5c/0x308 [ 54.790769] rb_alloc_aux+0x1ec/0x300 [ 54.794906] perf_mmap+0x284/0x610 [ 54.798787] mmap_region+0x388/0x570 [ 54.802838] do_mmap+0x344/0x4f8 [ 54.806544] vm_mmap_pgoff+0xe4/0x110 [ 54.810682] ksys_mmap_pgoff+0xa8/0x240 [ 54.814992] sys_mmap+0x18/0x28 [ 54.818613] el0_svc_naked+0x30/0x34 [ 54.822661] [ 54.822661] -> #0 (&event->mmap_mutex){+.+.}: [ 54.828445] lock_acquire+0x48/0x68 [ 54.832409] __mutex_lock+0x70/0x808 [ 54.836459] mutex_lock_nested+0x1c/0x28 [ 54.840855] perf_event_set_output+0x98/0x138 [ 54.845680] _perf_ioctl+0x2a0/0x6a0 [ 54.849731] perf_ioctl+0x3c/0x68 [ 54.853526] do_vfs_ioctl+0xb8/0xa20 [ 54.857577] ksys_ioctl+0x80/0xb8 [ 54.861370] sys_ioctl+0xc/0x18 [ 54.864990] el0_svc_naked+0x30/0x34 [ 54.869039] [ 54.869039] other info that might help us debug this: [ 54.869039] [ 54.876960] Chain exists of: [ 54.876960] &event->mmap_mutex --> pmus_lock --> &cpuctx_mutex [ 54.876960] [ 54.887217] Possible unsafe locking scenario: [ 54.887217] [ 54.893073] CPU0 CPU1 [ 54.897552] ---- ---- [ 54.902030] lock(&cpuctx_mutex); [ 54.905396] lock(pmus_lock); [ 54.910911] lock(&cpuctx_mutex); [ 54.916770] lock(&event->mmap_mutex); [ 54.920566] [ 54.920566] *** DEADLOCK *** [ 54.920566] [ 54.926424] 1 lock held by perf/2862: [ 54.930042] #0: 000000001080eb1b (&cpuctx_mutex){+.+.}, at: perf_event_ctx_lock_nested+0xf8/0x1f0 Since we have per-cpu array for the paths, we simply don't care about the number of online CPUs. This patch gets rid of the {get/put}_online_cpus(). Reported-by: Mathieu Poirier Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman commit 5ecabe4a76e8cdb61fa3e24862d9ca240a1c4ddf Author: Suzuki K Poulose Date: Thu Sep 20 13:17:47 2018 -0600 coresight: perf: Fix per cpu path management We create a coresight trace path for each online CPU when we start the event. We rely on the number of online CPUs and then go on to allocate an array matching the "number of online CPUs" for holding the path and then uses normal CPU id as the index to the array. This is problematic as we could have some offline CPUs causing us to access beyond the actual array size (e.g, on a dual SMP system, if CPU0 is offline, CPU1 could be really accessing beyond the array). The solution is to switch to per-cpu array for holding the path. Cc: Mathieu Poirier Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman commit 987d1e8dcd370d96029a3d76a0031b043c4a69ae Author: Suzuki K Poulose Date: Thu Sep 20 13:17:46 2018 -0600 coresight: etb10: Fix handling of perf mode If the ETB is already enabled in sysfs mode, the ETB reports success even if a perf mode is requested. Fix this by checking the requested mode. Cc: Mathieu Poirier Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman commit c71369de02b285d9da526a526d8f2affc7b17c59 Author: Suzuki K Poulose Date: Thu Sep 20 13:17:45 2018 -0600 coresight: Fix handling of sinks The coresight components could be operated either in sysfs mode or in perf mode. For some of the components, the mode of operation doesn't matter as they simply relay the data to the next component in the trace path. But for sinks, they need to be able to provide the trace data back to the user. Thus we need to make sure that "mode" is handled appropriately. e.g, the sysfs mode could have multiple sources driving the trace data, while perf mode doesn't allow sharing the sink. The coresight_enable_sink() however doesn't really allow this check to trigger as it skips the "enable_sink" callback if the component is already enabled, irrespective of the mode. This could cause mixing of data from different modes or even same mode (in perf), if the sources are different. Also, if we fail to enable the sink while enabling a path (where sink is the first component enabled), we could end up in disabling the components in the "entire" path which were not enabled in this trial, causing disruptions in the existing trace paths. Cc: Mathieu Poirier Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman commit bbd35ba6fab5419e58e96f35f1431f13bdc14f98 Author: zhong jiang Date: Thu Sep 20 13:17:44 2018 -0600 coresight: Use ERR_CAST instead of ERR_PTR Use ERR_CAT inlined function to replace the ERR_PTR(PTR_ERR). It make the code more concise. Signed-off-by: zhong jiang Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman commit 5ecc7120194c6f10c09197e368b378c699100123 Author: Suzuki K Poulose Date: Thu Sep 20 13:17:43 2018 -0600 coresight: Cleanup coresight DT bindings The coresight drivers relied on default bindings for graph in DT, while reusing the "reg" field of the "ports" to indicate the actual hardware port number for the connections. This can cause duplicate ports with same addresses, but different direction. However, with the rules getting stricter for the address mismatch with the label, it is no longer possible to use the port address field for the hardware port number. This patch introduces new DT binding rules for coresight components, based on the same generic DT graph bindings, but avoiding the address duplication. - All output ports must be specified under a child node with name "out-ports". - All input ports must be specified under a childe node with name "in-ports". - Port address should match the hardware port number. The support for legacy bindings is retained, with a warning. Cc: Sudeep Holla Cc: Rob Herring Signed-off-by: Suzuki K Poulose Reviewed-by: Rob Herring Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman commit c2c729415b2d21329104fecaa86878d295f1041f Author: Suzuki K Poulose Date: Thu Sep 20 13:17:42 2018 -0600 coresight: platform: Cleanup coresight connection handling The platform code parses the component connections and populates a platform-description of the output connections in arrays of fields (which is never freed). This is later copied in the coresight_register to a newly allocated area, represented by coresight_connection(s). This patch cleans up the code dealing with connections by making use of the "coresight_connection" structure right at the platform code and lets the generic driver simply re-use information provided by the platform. Thus making it reader friendly as well as avoiding the wastage of unused memory. Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman commit 2058224f5415df895551ee8f8e48a2b26acfc20f Author: Suzuki K Poulose Date: Thu Sep 20 13:17:41 2018 -0600 coresight: Add helper to check if the endpoint is input Add a helper to check if the given endpoint is input. Cc: Mathieu Poirier Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman commit 96330407f86abe8e5f0594734cff28b6196c94d7 Author: Suzuki K Poulose Date: Thu Sep 20 13:17:40 2018 -0600 coresight: Fix remote endpoint parsing When parsing the remote endpoint of an output port, we do : rport = of_graph_get_remote_port(ep); rparent = of_graph_get_remote_port_parent(ep); and then parse the "remote_port" as if it was the remote endpoint, which is wrong. The code worked fine because we used endpoint number as the port number. Let us fix it and optimise a bit as: remote_ep = of_graph_get_remote_endpoint(ep); if (remote_ep) remote_parent = of_graph_get_port_parent(remote_ep); and then, parse the remote_ep for the port/endpoint details. Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman commit 5111e749c775ebae6f7d39c6f836cb3f06c7b938 Author: Suzuki K Poulose Date: Thu Sep 20 13:17:39 2018 -0600 coresight: platform: Fix leaking device reference We don't drop the reference on the remote device while parsing the connection, held by bus_find_device(). Fix this by duplicating the device name and dropping the reference. Cc: Mathieu Poirier Cc: Kim Phillips Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman commit a0f9992c809fb73a05de1894734418a88178539f Author: Suzuki K Poulose Date: Thu Sep 20 13:17:38 2018 -0600 coresight: platform: Fix refcounting for graph nodes The coresight driver doesn't drop the references on the remote endpoint/port nodes. Add the missing of_node_put() calls. Reported-by: Mathieu Poirier Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman commit 6575fdb74645c14453f3119568ec45cbc54d4afb Author: Suzuki K Poulose Date: Thu Sep 20 13:17:37 2018 -0600 coresight: platform: Refactor graph endpoint parsing Refactor the of graph endpoint parsing code, to make the error handling easier. Cc: Mathieu Poirier Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman commit fac253e52fda73b6610f39716abe04dd2d919fb8 Author: Suzuki K Poulose Date: Thu Sep 20 13:17:36 2018 -0600 coresight: Document error handling in coresight_register commit 6403587a930c ("coresight: use put_device() instead of kfree()") fixes the double freeing of resources and ensures that the device refcount is dropped properly. Add a comment to explain this to help the readers and prevent people trying to "unfix" it again. While at it, rename the labels for better readability. Cc: Mathieu Poirier Cc: Arvind Yadav Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman commit c774973e91e1f08c58bb25c950a30252cfde650c Author: Vakul Garg Date: Tue Sep 25 20:21:51 2018 +0530 tls: Fixed a memory leak during socket close During socket close, if there is a open record with tx context, it needs to be be freed apart from freeing up plaintext and encrypted scatter lists. This patch frees up the open record if present in tx context. Also tls_free_both_sg() has been renamed to tls_free_open_rec() to indicate that the free record in tx context is being freed inside the function. Fixes: a42055e8d2c3 ("net/tls: Add support for async encryption") Signed-off-by: Vakul Garg Signed-off-by: David S. Miller commit b85135b595db01353a18ccfeafa9d9ae9028745e Author: Vakul Garg Date: Tue Sep 25 16:26:17 2018 +0530 tls: Fix socket mem accounting error under async encryption Current async encryption implementation sometimes showed up socket memory accounting error during socket close. This results in kernel warning calltrace. The root cause of the problem is that socket var sk_forward_alloc gets corrupted due to access in sk_mem_charge() and sk_mem_uncharge() being invoked from multiple concurrent contexts in multicore processor. The apis sk_mem_charge() and sk_mem_uncharge() are called from functions alloc_plaintext_sg(), free_sg() etc. It is required that memory accounting apis are called under a socket lock. The plaintext sg data sent for encryption is freed using free_sg() in tls_encryption_done(). It is wrong to call free_sg() from this function. This is because this function may run in irq context. We cannot acquire socket lock in this function. We remove calling of function free_sg() for plaintext data from tls_encryption_done() and defer freeing up of plaintext data to the time when the record is picked up from tx_list and transmitted/freed. When tls_tx_records() gets called, socket is already locked and thus there is no concurrent access problem. Fixes: a42055e8d2c3 ("net/tls: Add support for async encryption") Signed-off-by: Vakul Garg Signed-off-by: David S. Miller commit a06ee256e5d6f03fffbd088de9bf84035658cc5a Merge: bd6207202db8 846e8dd47c26 Author: David S. Miller Date: Tue Sep 25 10:35:29 2018 -0700 Merge ra.kernel.org:/pub/scm/linux/kernel/git/davem/net Version bump conflict in batman-adv, take what's in net-next. iavf conflict, adjustment of netdev_ops in net-next conflicting with poll controller method removal in net. Signed-off-by: David S. Miller commit bd6207202db8974ca3d3183ca0d5611d45b2973c Author: Michal Simek Date: Tue Sep 25 08:32:50 2018 +0200 net: macb: Clean 64b dma addresses if they are not detected Clear ADDR64 dma bit in DMACFG register in case that HW_DMA_CAP_64B is not detected on 64bit system. The issue was observed when bootloader(u-boot) does not check macb feature at DCFG6 register (DAW64_OFFSET) and enabling 64bit dma support by default. Then macb driver is reading DMACFG register back and only adding 64bit dma configuration but not cleaning it out. Signed-off-by: Michal Simek Acked-by: Nicolas Ferre Signed-off-by: David S. Miller commit 9da90297ca30fd2422ec6513a916cd0de4149eff Merge: edad8d260e25 a0456790fe57 Author: David S. Miller Date: Tue Sep 25 10:28:03 2018 -0700 Merge branch 'r8169-series-with-smaller-improvements' Heiner Kallweit says: ==================== r8169: series with smaller improvements This series includes smaller improvements, nothing exciting. ==================== Signed-off-by: David S. Miller commit a0456790fe57a23a30c6a7697f0833d33f10747a Author: Heiner Kallweit Date: Tue Sep 25 07:59:36 2018 +0200 r8169: improve a check in rtl_init_one The check for pci_is_pcie() is redundant here because all chip versions >=18 are PCIe only anyway. In addition use dma_set_mask_and_coherent() instead of separate calls to pci_set_dma_mask() and pci_set_consistent_dma_mask(). Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit de20e12f3faf86581e82b2826d87fbc2feec2b50 Author: Heiner Kallweit Date: Tue Sep 25 07:58:00 2018 +0200 r8169: improve rtl8169_irq_mask_and_ack Code can be slightly simplified by acking even events we're not interested in. In addition add a comment making clear that the read has no functional purpose and is just a PCI commit. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 4bee64b41701a4ca19df4226f16fc91fc156940a Author: Heiner Kallweit Date: Tue Sep 25 07:56:53 2018 +0200 r8169: use default watchdog timeout The networking core has a default watchdog timeout of 5s. I see no need to define an own timeout of 6s which is basically the same. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 85aa0fe73edd856365d074a5aa38c614c8b2ca45 Author: Andreas Färber Date: Tue Sep 25 16:23:49 2018 +0200 ASoC: max98088: add OF support MAX98088 is an older version of the MAX98089 device. Signed-off-by: Andreas Färber [m.felsch@pengutronix.de: add CONFIG_OF compile switch] [m.felsch@pengutronix.de: adapt commit message] Signed-off-by: Marco Felsch Signed-off-by: Mark Brown commit 02a9fad843d5f86b5afe5e156f09ea87fe24d9c9 Author: Andreas Färber Date: Tue Sep 25 16:23:48 2018 +0200 ASoC: dt-bindings: add max98088 audio codec This patch adds the bindings for maxim max98088/9 audio codec. Signed-off-by: Andreas Färber [m.felsch@pengutronix.de: adapt commit message] [m.felsch@pengutronix.de: adapt formatting] Signed-off-by: Marco Felsch Signed-off-by: Mark Brown commit b0ef5011b981ece1fde8063243a56d3038b87adb Author: Matt Flax Date: Tue Sep 25 16:40:18 2018 +1000 ASoC: cs4265: Add a MIC pre. route The cs4265 driver is missing a microphone preamp enable. This patch enables/disables the microphone preamp when mic selection is made using the kcontrol. Signed-off-by: Matt Flax Reviewed-by: Charles Keepax Signed-off-by: Mark Brown commit 3fb2fd76eda265ce5421318de38dd9b9f7c54737 Author: Laurent Pinchart Date: Tue Sep 18 15:04:16 2018 +0300 usb: gadget: uvc: configfs: Use %u to print unsigned int values The driver uses the %d format to print unsigned int values. The correct format is %u. Fix it. Signed-off-by: Laurent Pinchart Reviewed-by: Paul Elder Tested-by: Paul Elder commit 4f2a6552c2888b317984e64b292f0f1ca1832d44 Author: Laurent Pinchart Date: Tue Sep 18 15:04:16 2018 +0300 usb: gadget: uvc: configfs: Simplify attributes macros Several macros used to define attributes and their access functions take multiple arguments to specify endianness and string conversion functions, based on the size of the attribute. This can be simplified by passing the number of bits explicitly, and constructing the name of the functions internally. The UVCG_OPTS_ATTR macro can be simplified further as all fields it deals with are unsigned int. Signed-off-by: Laurent Pinchart Reviewed-by: Paul Elder Tested-by: Paul Elder commit 78c9e7ce00c3fabf5c6dd3a6eab3a3dcf21dd213 Author: Laurent Pinchart Date: Tue Sep 18 14:40:58 2018 +0300 usb: gadget: uvc: configfs: Fix operation on big endian platforms USB descriptors are stored in little endian, requiring the use of conversion macros. Those macros are incorrectly used for values stored in native endian structures within the driver. Operation on big endian platforms is thus broken. Fix it by removing the conversion macros where they're not needed. Signed-off-by: Laurent Pinchart Reviewed-by: Paul Elder Tested-by: Paul Elder commit f823b75f43284c43f3792cae990d63c84dd1267d Author: Laurent Pinchart Date: Tue Sep 16 17:45:56 2014 +0300 usb: video: Fix endianness mismatches in descriptor structures All UVC descriptors use little-endian format, update the data structures accordingly. Signed-off-by: Laurent Pinchart Reviewed-by: Paul Elder Tested-by: Paul Elder commit d865d00db9e69eb2e6f7c4166e33e5047de497bc Author: Laurent Pinchart Date: Tue Sep 18 14:26:47 2018 +0300 usb: gadget: uvc: Remove uvc_set_trace_param() function The function is never called, remove it. Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham commit 5646a2f6d584e80bd4555c2ce3e286b35b9eaa61 Author: Ryder Lee Date: Wed Sep 5 18:22:20 2018 +0800 arm: dts: mt7623: add jpeg decoder device node Add a jpeg decoder device node for MT7623. Signed-off-by: Ryder Lee Signed-off-by: Matthias Brugger commit fce695cbd5eba4fcbfa59bd5d15f333c96845c97 Author: Ryder Lee Date: Wed Sep 5 18:22:19 2018 +0800 arm: dts: mt7623: add iommu/smi device nodes Add iommu/smi device nodes for MT7623. Signed-off-by: Ryder Lee Signed-off-by: Matthias Brugger commit 8ff2017b942828ffbb49a3c620fdb31c85cbc824 Author: Ryder Lee Date: Wed Sep 5 18:22:18 2018 +0800 arm: dts: mt7623: update subsystem clock controller device nodes Update MT7623 subsystem clock controllers, inlcuding mmsys, imgsys, vdecsys, g3dsys and bdpsys. Signed-off-by: Ryder Lee Signed-off-by: Matthias Brugger commit 266c820f30f89319feafcd2ca471e699fd34ff42 Author: Ryder Lee Date: Wed Sep 5 18:22:17 2018 +0800 arm: dts: mt7623: add a performance counter unit device node Add ARM PMU device node to enable hardware perf events. Signed-off-by: Ryder Lee Signed-off-by: Matthias Brugger commit b5b4c8dd5c44edc112a362f87a8d8953336571bd Author: Christophe Priouzeau Date: Mon Sep 3 17:49:25 2018 +0200 ARM: dts: stih410: change syntax of multiple DAI With change of syntax for 'simple-audio-card,dai-link' containers, devicetrees of stih410 must be updated. This fixes the following error: [ 3.839466] asoc-simple-card sound: asoc_simple_card_dai_link_of: Can't find simple-audio-card,cpu DT node [ 3.849150] asoc-simple-card sound: parse error -22 Signed-off-by: Christophe Priouzeau Signed-off-by: Patrice Chotard commit dc0f755b421d5aac9052f43c9d0e7285607d446c Author: Laurent Pinchart Date: Fri Aug 10 15:48:02 2018 +0300 usb: gadget: uvc: Replace plain printk() with dev_*() Adding device context to the kernel log messages make them more useful. Add new uvcg_* macros based on dev_*() that print both the gadget device name and the function name. While at it, remove a commented out printk statement and an unused printk-based macro. Signed-off-by: Laurent Pinchart Reviewed-by: Paul Elder Tested-by: Paul Elder Reviewed-by: Kieran Bingham commit 8dbf9c7abefd5c1434a956d5c6b25e11183061a3 Author: Laurent Pinchart Date: Fri Aug 10 15:44:57 2018 +0300 usb: gadget: uvc: Only halt video streaming endpoint in bulk mode When USB requests for video data fail to be submitted, the driver signals a problem to the host by halting the video streaming endpoint. This is only valid in bulk mode, as isochronous transfers have no handshake phase and can't thus report a stall. The usb_ep_set_halt() call returns an error when using isochronous endpoints, which we happily ignore, but some UDCs complain in the kernel log. Fix this by only trying to halt the endpoint in bulk mode. Signed-off-by: Laurent Pinchart Reviewed-by: Paul Elder Tested-by: Paul Elder Reviewed-by: Kieran Bingham commit 9d1ff5dcb3cd3390b1e56f1c24ae42c72257c4a3 Author: Laurent Pinchart Date: Fri Aug 10 15:42:03 2018 +0300 usb: gadget: uvc: Factor out video USB request queueing USB requests for video data are queued from two different locations in the driver, with the same code block occurring twice. Factor it out to a function. Signed-off-by: Laurent Pinchart Reviewed-by: Paul Elder Tested-by: Paul Elder Reviewed-by: Kieran Bingham commit 3013b410a8f50cf251e09da00b8241fd43bb41fa Author: Argus Lin Date: Tue Sep 4 20:31:54 2018 +0800 soc: mediatek: pwrap: add mt6357 driver for mt6765 SoCs MT6357 is a new power management IC and it is used for mt6765 SoCs. To define mt6357_regs for pmic register mapping and pmic_mt6357 for accessing register. Signed-off-by: Argus Lin Signed-off-by: Matthias Brugger commit 245f880c25dbd8927af0f33aa5d1404370013957 Author: Anson Huang Date: Wed Sep 12 16:13:29 2018 +0800 ARM: dts: imx6ull: update vdd_soc voltage for 900MHz operating point Update VDD_SOC voltage to 1.25V for 900MHz operating point according to datasheet Rev. 1.3, 08/2018, 25mV is added to the minimum allowed values to cover power supply ripple. Signed-off-by: Anson Huang Reviewed-by: Sébastien Szymanski Signed-off-by: Shawn Guo commit d0e13a1488ad30dc3c2c9347b931cb10f892e3a4 Author: Willem de Bruijn Date: Mon Sep 24 16:49:57 2018 -0400 flow_dissector: lookup netns by skb->sk if skb->dev is NULL BPF flow dissectors are configured per network namespace. __skb_flow_dissect looks up the netns through dev_net(skb->dev). In some dissector paths skb->dev is NULL, such as for Unix sockets. In these cases fall back to looking up the netns by socket. Analyzing the codepaths leading to __skb_flow_dissect I did not find a case where both skb->dev and skb->sk are NULL. Warn and fall back to standard flow dissector if one is found. Fixes: d58e468b1112 ("flow_dissector: implements flow dissector BPF hook") Reported-by: Eric Dumazet Signed-off-by: Willem de Bruijn Acked-by: Song Liu Signed-off-by: Daniel Borkmann commit 7ea3c40605e9acf12f2dda26e28cd82c0dba6923 Author: Roman Gushchin Date: Fri Sep 21 22:47:20 2018 +0000 bpftool: add support for BPF_MAP_TYPE_REUSEPORT_SOCKARRAY maps Add BPF_MAP_TYPE_REUSEPORT_SOCKARRAY map type to the list of maps types which bpftool recognizes. Signed-off-by: Roman Gushchin Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: Jakub Kicinski Cc: Yonghong Song Acked-by: Jakub Kicinski Acked-by: Song Liu Signed-off-by: Daniel Borkmann commit 12b079b0fe8b87229939f64f66f1c9545a91535f Author: Argus Lin Date: Tue Sep 4 20:31:53 2018 +0800 soc: mediatek: pwrap: add pwrap driver for mt6765 SoCs mt6765 is a highly integrated SoCs, it uses mt6357 for power management. This patch adds pwrap driver to access mt6357. Pwrap of mt6765 support dynamic priority meichanism, sequence monitor and starvation mechanism to make transaction more reliable. Signed-off-by: Argus Lin [mb: change has_bridge to capabilities] Signed-off-by: Matthias Brugger commit 0db3bd82546039f4bf434d378bafe4416b82b757 Author: Argus Lin Date: Tue Sep 4 20:31:52 2018 +0800 dt-bindings: pwrap: mediatek: add pwrap support for MT6765 Add binding document of pwrap for MT6765 SoCs. Signed-off-by: Argus Lin Signed-off-by: Matthias Brugger commit 0b6286dd96c072d742a9d119e25a5cdae3f65e4d Author: Ryder Lee Date: Sun Aug 19 00:02:27 2018 +0800 arm64: dts: mt7622: add bananapi BPI-R64 board Add support for the bananapi R64 (BPI-R64) development board from BIPAI KEJI. Detailed hardware information for BPI-R64 which could be found on http://wiki.banana-pi.org/Banana_Pi_BPI-R64 Signed-off-by: Ryder Lee Signed-off-by: Matthias Brugger commit 8be2c4ae2ff156f21f4bdb7441be6655d1d1e052 Author: Ryder Lee Date: Sun Aug 19 00:02:26 2018 +0800 arm64: dts: mt7622: fix ram size for rfb1 Fix ram size to 512 megabytes and sort nodes in alphabetical order. Signed-off-by: Ryder Lee Acked-by: Sean Wang Signed-off-by: Matthias Brugger commit e1dd05824af9c052b38386f3aff1fdb97b8b7cf0 Author: Ryder Lee Date: Sun Aug 19 00:02:25 2018 +0800 arm64: dts: mt7622: add a bluetooth 5 device node Add a built-in bluetooth 5 support for MT7622. Signed-off-by: Ryder Lee Acked-by: Sean Wang Signed-off-by: Matthias Brugger commit 9cc7f0de9e676abdabb5992ea63daf928ec02022 Author: Ryder Lee Date: Sun Aug 19 00:02:24 2018 +0800 arm64: dts: mt7622: add timer, CCI-400 and PMU nodes Add device tree entries for timer, ARM CCI-400 and its PMU. Otherwise, we add a cortex-a53-pmu node to enable hw perfevents. Signed-off-by: Ryder Lee Signed-off-by: Matthias Brugger commit 2462080fe9417717a0594e082f50fce048d5a09b Author: Gustavo A. R. Silva Date: Sat Aug 4 20:02:01 2018 -0500 soc: mediatek: pwrap: use true and false for boolean values Return statements in functions returning bool should use true or false instead of an integer value. This issue was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva Acked-by: Sean Wang Signed-off-by: Matthias Brugger commit 8eb7e28d4c642c310f25c18f80a44dd4b01c694e Author: Jun Yao Date: Mon Sep 24 17:56:18 2018 +0100 arm64/mm: move runtime pgds to rodata Now that deliberate writes to swapper_pg_dir are made via the fixmap, we can defend against errant writes by moving it into the rodata section. Since tramp_pg_dir and reserved_ttbr0 must be at a fixed offset from swapper_pg_dir, and are not modified at runtime, these are also moved into the rodata section. Likewise, idmap_pg_dir is not modified at runtime, and is moved into rodata. Signed-off-by: Jun Yao Reviewed-by: James Morse [Mark: simplify linker script, commit message] Signed-off-by: Mark Rutland Signed-off-by: Catalin Marinas commit 2330b7ca78350efcb1a3b919ea4b3e0e4c57d99f Author: Jun Yao Date: Mon Sep 24 17:15:02 2018 +0100 arm64/mm: use fixmap to modify swapper_pg_dir Once swapper_pg_dir is in the rodata section, it will not be possible to modify it directly, but we will need to modify it in some cases. To enable this, we can use the fixmap when deliberately modifying swapper_pg_dir. As the pgd is only transiently mapped, this provides some resilience against illicit modification of the pgd, e.g. for Kernel Space Mirror Attack (KSMA). Signed-off-by: Jun Yao Reviewed-by: James Morse [Mark: simplify ifdeffery, commit message] Signed-off-by: Mark Rutland Signed-off-by: Catalin Marinas commit 2b5548b68199c17c1466d5798cf2c9cd806bdaa9 Author: Jun Yao Date: Mon Sep 24 15:47:49 2018 +0100 arm64/mm: Separate boot-time page tables from swapper_pg_dir Since the address of swapper_pg_dir is fixed for a given kernel image, it is an attractive target for manipulation via an arbitrary write. To mitigate this we'd like to make it read-only by moving it into the rodata section. We require that swapper_pg_dir is at a fixed offset from tramp_pg_dir and reserved_ttbr0, so these will also need to move into rodata. However, swapper_pg_dir is allocated along with some transient page tables used for boot which we do not want to move into rodata. As a step towards this, this patch separates the boot-time page tables into a new init_pg_dir, and reduces swapper_pg_dir to the single page it needs to be. This allows us to retain the relationship between swapper_pg_dir, tramp_pg_dir, and swapper_pg_dir, while cleanly separating these from the boot-time page tables. The init_pg_dir holds all of the pgd/pud/pmd/pte levels needed during boot, and all of these levels will be freed when we switch to the swapper_pg_dir, which is initialized by the existing code in paging_init(). Since we start off on the init_pg_dir, we no longer need to allocate a transient page table in paging_init() in order to ensure that swapper_pg_dir isn't live while we initialize it. There should be no functional change as a result of this patch. Signed-off-by: Jun Yao Reviewed-by: James Morse [Mark: place init_pg_dir after BSS, fold mm changes, commit message] Signed-off-by: Mark Rutland Signed-off-by: Catalin Marinas commit 693d5639b44a8f3787444902d3600edc7e0105a2 Author: Jun Yao Date: Mon Sep 24 14:51:13 2018 +0100 arm64/mm: Pass ttbr1 as a parameter to __enable_mmu() In subsequent patches we'll use a transient pgd during the primary cpu's boot process. To make this work while allowing secondary cpus to use the swapper_pg_dir, we need to pass the relevant TTBR1 pgd as a parameter to __enable_mmu(). This patch updates __enable__mmu() to take this as a parameter, updating callsites to pass swapper_pg_dir for now. There should be no functional change as a result of this patch. Signed-off-by: Jun Yao Reviewed-by: James Morse [Mark: simplify assembly, clarify commit message] Signed-off-by: Mark Rutland Signed-off-by: Catalin Marinas commit 919049f6d44b7303794e6da7e3f6b91a41d2cf04 Author: Hsin-Hsiung Wang Date: Wed Sep 19 15:26:00 2018 +0800 soc: mediatek: add mt8183 pwrap support MT6358 is a new power management IC and it is used for mt8183 SoCs. To define mt6358_regs for pmic register mapping and pmic_mt6358 for accessing register. Adding one more interrupt and wdt source. Signed-off-by: Hsin-Hsiung Wang Signed-off-by: Matthias Brugger commit 0bd3134d446bed25ee2034cfc72be5401836cffd Author: Hsin-Hsiung Wang Date: Tue Sep 25 15:48:39 2018 +0200 soc: mediatek: pwrap: use group of bits for pwrap capability Use group of bits for pwrap capability instead of elements of structure. This patch is preparing for adding mt8183 pwrap support. Signed-off-by: Hsin-Hsiung Wang Signed-off-by: Matthias Brugger commit bd69e7e9d5e74c9d40856c5805f8cbf2a13165d3 Author: Matthias Brugger Date: Tue Sep 25 15:46:59 2018 +0200 soc: mediatek: pwrap: order SoCs and PMICs ascending Order SoC and PMIC numbers ascending to make the code more readable. Signed-off-by: Hsin-Hsiung Wang Signed-off-by: Matthias Brugger commit 35449adce847400ca8af25702be112fd67f42439 Author: Rami Rosen Date: Tue Sep 18 17:38:49 2018 +0300 iommu: Fix a typo This patch fixes a typo in iommu.c. Signed-off-by: Rami Rosen Signed-off-by: Joerg Roedel commit 6d0ca9dbb6d199cb2adeb40da3fea3c4ece6f092 Author: Hsin-Hsiung Wang Date: Wed Sep 19 15:25:58 2018 +0800 dt-bindings: mediatek: add compatible for mt8183 pwrap This adds dt-binding documentation of pwrap for Mediatek MT8183 SoC Platform. Signed-off-by: Hsin-Hsiung Wang Reviewed-by: Rob Herring Signed-off-by: Matthias Brugger commit 5131e08cd0f8a3faa30c1cdaf53940d6bce1715a Author: Robin Murphy Date: Wed Sep 19 11:12:58 2018 +0100 iommu: Remove .domain_{get,set}_windows Since these are trivially handled by the .domain_{get,set}_attr callbacks when relevant, we can streamline struct iommu_ops for everyone. Signed-off-by: Robin Murphy Signed-off-by: Joerg Roedel commit 701d8a624a2d5aa7d7efd38800c7c6ab4a4c453c Author: Robin Murphy Date: Wed Sep 19 11:12:57 2018 +0100 iommu: Tidy up window attributes The external interface to get/set window attributes is already abstracted behind iommu_domain_{get,set}_attr(), so there's no real reason for the internal interface to be different. Since we only have one window-based driver anyway, clean up the core code by just moving the DOMAIN_ATTR_WINDOWS handling directly into the PAMU driver. Signed-off-by: Robin Murphy Signed-off-by: Joerg Roedel commit 9dd3cb243ddfc1408f373bf17b03aa0e2a7784c9 Author: Gerd Hoffmann Date: Fri Sep 21 15:47:04 2018 +0200 drm: move quirk_addfb_prefer_xbgr_30bpp handling to drm_driver_legacy_fb_format too Signed-off-by: Gerd Hoffmann Reviewed-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20180921134704.12826-7-kraxel@redhat.com commit 42fd9e6c29b39481fd4ef31715c6f0c427966f20 Author: Gerd Hoffmann Date: Fri Sep 21 15:47:03 2018 +0200 drm/virtio: fix DRM_FORMAT_* handling Use DRM_FORMAT_HOST_XRGB8888, so we are using the correct format code on bigendian machines. Also set the quirk_addfb_prefer_host_byte_order mode_config bit so drm_mode_addfb() asks for the correct format code. Both DRM_FORMAT_* and VIRTIO_GPU_FORMAT_* are defined to be little endian, so using a different mapping on bigendian machines is wrong. It's there because of broken drm_mode_addfb() behavior. So with drm_mode_addfb() being fixed we can fix this too. While wading through the code I've noticed we have a little issue in virtio: We attach a format to the bo when it is created (DRM_IOCTL_MODE_CREATE_DUMB), not when we map it as framebuffer (DRM_IOCTL_MODE_ADDFB). Easy way out: Support a single format only. Pick DRM_FORMAT_HOST_XRGB8888, it is the only one actually used in practice. Drop unused mappings in virtio_gpu_translate_format(). With this patch applied both ADDFB and ADDFB2 ioctls work correctly in the virtio-gpu.ko driver on big endian machines. Without the patch only ADDFB (which still seems to be used by the majority of userspace) works correctly. Signed-off-by: Gerd Hoffmann Acked-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20180921134704.12826-6-kraxel@redhat.com commit 86351de023dd3607b1b519f58c11154b217ec031 Author: Gerd Hoffmann Date: Fri Sep 21 15:47:02 2018 +0200 drm/bochs: support changing byteorder at mode set time Add bochs_hw_set_*_endian() helper functions, to set the framebuffer byteorder at mode set time. Support both DRM_FORMAT_XRGB8888 and DRM_FORMAT_BGRX8888 framebuffer formats, no matter what the native machine byte order is. Signed-off-by: Gerd Hoffmann Acked-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20180921134704.12826-5-kraxel@redhat.com commit 48b442238250bd27edfef13ab314b295b2734cc4 Author: Gerd Hoffmann Date: Fri Sep 21 15:47:01 2018 +0200 drm/bochs: fix DRM_FORMAT_* handling for big endian machines. Use DRM_FORMAT_HOST_XRGB8888, so we are using the correct format code on bigendian machines. Also set the quirk_addfb_prefer_host_byte_order mode_config bit so drm_mode_addfb() asks for the correct format code. Create our own plane and use drm_crtc_init_with_planes() instead of depending on the default created by drm_crtc_init(). That way the plane format list is correct on bigendian machines. Also re-add the framebuffer format check dropped by "df2052cc92 bochs: convert to drm_fb_helper_fbdev_setup/teardown". With this patch applied both ADDFB and ADDFB2 ioctls work correctly in the bochs-drm.ko driver on big endian machines. Without the patch only ADDFB (which still seems to be used by the majority of userspace) works correctly. Signed-off-by: Gerd Hoffmann Acked-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20180921134704.12826-4-kraxel@redhat.com commit 184bef8924c95d43c1476d21034c14c8582f487f Author: Gerd Hoffmann Date: Fri Sep 21 15:47:00 2018 +0200 drm: use drm_driver_legacy_fb_format in drm_gem_fbdev_fb_create Creating framebuffers for fbdev emulation should use the correct format code too, so switch drm_gem_fbdev_fb_create() over to use the new drm_driver_legacy_fb_format() function. Signed-off-by: Gerd Hoffmann Reviewed-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20180921134704.12826-3-kraxel@redhat.com commit 059b5eb5d9554dea689430ad3872dcb37a35053d Author: Gerd Hoffmann Date: Fri Sep 21 15:46:59 2018 +0200 drm: move native byte order quirk to new drm_driver_legacy_fb_format function Turns out we need the pixel format fixup not only for the addfb ioctl, but also for fbdev emulation code. Ideally we would place it in drm_mode_legacy_fb_format(). That would create alot of churn though, and most drivers don't care because they never ever run on a big endian platform. So add a new drm_driver_legacy_fb_format() function instead which looks at the mode_config->quirk_addfb_prefer_host_byte_order flag. Signed-off-by: Gerd Hoffmann Reviewed-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20180921134704.12826-2-kraxel@redhat.com commit af334c5d41a9d3b9df3204d50a9a8f566ef64c66 Author: Gerd Hoffmann Date: Thu Sep 20 08:29:23 2018 +0200 drm/virtio: pass virtio_gpu_object to virtio_gpu_cmd_transfer_to_host_{2d, 3d} Pass virtio_gpu_object down to virtio_gpu_cmd_transfer_to_host_2d and virtio_gpu_cmd_transfer_to_host_3d functions, instead of passing just the virtio resource handle. This is needed to lookup the scatter list of the object, for dma sync. Signed-off-by: Gerd Hoffmann Reviewed-by: Jiandi An Tested-by: Jiandi An Link: http://patchwork.freedesktop.org/patch/msgid/20180920062924.6514-1-kraxel@redhat.com commit 18f99c9b9dec15bc088d9db239f68e5c80415304 Author: Sohil Mehta Date: Tue Sep 11 17:11:41 2018 -0700 iommu/vt-d: Add debugfs support to show context internals Export Intel IOMMU DMA remapping internal states, such as root and context table entries in debugfs. Example of such dump in Kabylake: /sys/kernel/debug/iommu/intel/dmar_translation_struct IOMMU dmar0: Root Table Address:45699c000 Root Table Entries: Bus: 0 H: 0 L: 45699f001 Context Table Entries for Bus: 0 Entry B:D.F High Low 16 00:02.0 102 45699e005 IOMMU dmar1: Root Table Address:45699d000 Root Table Entries: Bus: 0 H: 0 L: 45644f001 Context Table Entries for Bus: 0 Entry B:D.F High Low 160 00:14.0 102 45644e001 184 00:17.0 302 456310001 248 00:1f.0 202 4564bf001 Cc: Lu Baolu Cc: Fenghua Yu Cc: Ashok Raj Cc: Jacob Pan Co-Developed-by: Gayatri Kammela Signed-off-by: Gayatri Kammela Reviewed-by: Andy Shevchenko Reviewed-by: Lu Baolu Signed-off-by: Sohil Mehta Signed-off-by: Joerg Roedel commit a6d268c619d6765322f2fbdd1d7d2769ebc04cb2 Author: Sohil Mehta Date: Tue Sep 11 17:11:40 2018 -0700 iommu/vt-d: Add debugfs support for Interrupt remapping Debugfs extension for Intel IOMMU to dump Interrupt remapping table entries for Interrupt remapping and Interrupt posting. The file /sys/kernel/debug/iommu/intel/ir_translation_struct provides detailed information, such as Index, Source Id, Destination Id, Vector and the IRTE values for entries with the present bit set, in the format shown. Remapped Interrupt supported on IOMMU: dmar1 IR table address:85e500000 Entry SrcID DstID Vct IRTE_high IRTE_low 24 01:00.0 00000001 24 0000000000040100 000000010024000d 25 01:00.0 00000004 22 0000000000040100 000000040022000d Posted Interrupt supported on IOMMU: dmar5 IR table address:85ec00000 Entry SrcID PDA_high PDA_low Vct IRTE_high IRTE_low 4 43:00.0 0000000f ff765980 41 0000000f00044300 ff76598000418001 5 43:00.0 0000000f ff765980 51 0000000f00044300 ff76598000518001 Cc: Lu Baolu Cc: Jacob Pan Cc: Fenghua Yu Cc: Ashok Raj Co-Developed-by: Gayatri Kammela Signed-off-by: Gayatri Kammela Reviewed-by: Andy Shevchenko Signed-off-by: Sohil Mehta Signed-off-by: Joerg Roedel commit 6825d3ea6cdea68694a99a7f23c72d937fabc011 Author: Gayatri Kammela Date: Tue Sep 11 17:11:39 2018 -0700 iommu/vt-d: Add debugfs support to show register contents Add Intel IOMMU debugfs extension to dump all the register contents for each IOMMU device. Example: root@OTC-KBLH-01:~# cat /sys/kernel/debug/iommu/intel/iommu_regset IOMMU: dmar0 Register Base Address: fed90000 Name Offset Contents VER 0x00 0x0000000000000010 CAP 0x08 0x01c0000c40660462 ECAP 0x10 0x0000000000f0101a GCMD 0x18 0x0000000000000000 GSTS 0x1c 0x00000000c7000000 RTADDR 0x20 0x00000004071d3800 CCMD 0x28 0x0800000000000000 FSTS 0x34 0x0000000000000000 FECTL 0x38 0x0000000000000000 FEDATA 0x3c 0xfee0100400004021 Cc: Lu Baolu Cc: Fenghua Yu Cc: Jacob Pan Cc: Ashok Raj Signed-off-by: Gayatri Kammela Reviewed-by: Andy Shevchenko Reviewed-by: Lu Baolu Co-Developed-by: Sohil Mehta Signed-off-by: Sohil Mehta Signed-off-by: Joerg Roedel commit ee2636b8670b1ab2a02a65923a9bef59e9199c37 Author: Sohil Mehta Date: Tue Sep 11 17:11:38 2018 -0700 iommu/vt-d: Enable base Intel IOMMU debugfs support Add a new config option CONFIG_INTEL_IOMMU_DEBUGFS and do the base enabling for Intel IOMMU debugfs. Cc: Lu Baolu Cc: Fenghua Yu Cc: Ashok Raj Cc: Jacob Pan Co-Developed-by: Gayatri Kammela Signed-off-by: Gayatri Kammela Reviewed-by: Andy Shevchenko Reviewed-by: Lu Baolu Signed-off-by: Sohil Mehta Signed-off-by: Joerg Roedel commit 4a2d80dbadb72b998641af32d8dd4b7b39e72aa0 Author: Sohil Mehta Date: Tue Sep 11 17:11:37 2018 -0700 iommu/vt-d: Update register definitions to VT-d 3.0 specification Add new register definitions added in the VT-d 3.0 specification. Also include registers that were missing previously. Cc: Lu Baolu Cc: Fenghua Yu Cc: Jacob Pan Cc: Ashok Raj Cc: Gayatri Kammela Signed-off-by: Sohil Mehta Signed-off-by: Joerg Roedel commit 26b86092c4650311256fa2372ced7e1e17d97d7b Author: Sohil Mehta Date: Tue Sep 11 17:11:36 2018 -0700 iommu/vt-d: Relocate struct/function declarations to its header files To reuse the static functions and the struct declarations, move them to corresponding header files and export the needed functions. Cc: Lu Baolu Cc: Fenghua Yu Cc: Jacob Pan Cc: Ashok Raj Reviewed-by: Andy Shevchenko Signed-off-by: Gayatri Kammela Signed-off-by: Sohil Mehta Signed-off-by: Joerg Roedel commit 57d3f11c83b806e30ab267fd978c1829483654a6 Author: Kuninori Morimoto Date: Fri Sep 7 01:42:15 2018 +0000 iommu/ipmmu-vmsa: 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: Geert Uytterhoeven Reviewed-by: Simon Horman Signed-off-by: Joerg Roedel commit bc46c229b6afc4188c13a034c868527992dc63c9 Author: Colin Ian King Date: Tue Sep 11 13:28:32 2018 +0100 iommu/fsl: Fix spelling mistake pci_endpt_partioning -> pci_endpt_partitioning Trivial fix to spelling mistake in variable name Signed-off-by: Colin Ian King Signed-off-by: Joerg Roedel commit e99542fb8db0a6aa6f6184eec464c1e56339d9cb Author: Andy Shevchenko Date: Sat Sep 22 16:51:16 2018 +0300 pinctrl: intel: merrifield: Group IO accessors in code Consolidate IO accessors in the code to make maintenance a little bit easier in the future. No functional change intended. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg Signed-off-by: Linus Walleij commit 5e0b7e7cd27da0dda51d7d840398621b0cffa0a1 Author: Andy Shevchenko Date: Sat Sep 22 16:51:15 2018 +0300 pinctrl: intel: merrifield: Introduce mrfld_read_bufcfg() mrfld_read_bufcfg() helper checks if pin is correct and reads back the current value of corresponding BUFCFG register. While it adds lines of code it will be easier to maintain in the future. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg Signed-off-by: Linus Walleij commit 9aa64f0be3c8681c66f4a9e3b6ab0c79a5e8f3ac Author: Biju Das Date: Fri Sep 21 16:34:04 2018 +0100 dt-bindings: gpio: rcar: Add r8a7744 (RZ/G1N) support Renesas RZ/G1N (R8A7744) SoC GPIO blocks are identical to the R-Car Gen2 family. Add support for its GPIO controllers. Signed-off-by: Biju Das Reviewed-by: Fabrizio Castro Reviewed-by: Simon Horman Reviewed-by: Geert Uytterhoeven Signed-off-by: Linus Walleij commit 99c7c7364b714e1de54a25c3642d991de1675e27 Author: Can Guo Date: Tue Sep 25 12:10:12 2018 +0530 dt-bindings: phy-qcom-qmp: Add UFS phy compatible string for sdm845 Update the compatible string for UFS QMP PHY on SDM845. Signed-off-by: Can Guo Reviewed-by: Rob Herring Signed-off-by: Kishon Vijay Abraham I commit cc31cdbef9b7166fe42e08267349cfbaa32696b6 Author: Can Guo Date: Thu Sep 20 21:27:56 2018 -0700 phy: Add QMP phy based UFS phy support for sdm845 Add UFS PHY support to make SDM845 UFS work with common PHY framework. Signed-off-by: Can Guo Reviewed-by: Evan Green Reviewed-by: Vivek Gautam Signed-off-by: Kishon Vijay Abraham I commit 6b04526812ac41ba82317caa8df3549dda2cab97 Author: Can Guo Date: Thu Sep 20 21:27:55 2018 -0700 phy: General struct and field cleanup Move MSM8996 specific PHY vreg list struct name to a genernal one as it is used by all PHYs. Add a specific field to handle dual lane situation. Signed-off-by: Can Guo Reviewed-by: Evan Green Reviewed-by: Manu Gautam Reviewed-by: Vivek Gautam Signed-off-by: Kishon Vijay Abraham I commit 0d58280cf1e61b06cb4d4aab672efccdc28794f6 Author: Can Guo Date: Thu Sep 20 21:27:54 2018 -0700 phy: Update PHY power control sequence All PHYs should be powered on before register configuration starts. And only PCIe PHYs need an extra power control before deasserts reset state. Signed-off-by: Can Guo Reviewed-by: Manu Gautam Reviewed-by: Vivek Gautam Reviewed-by: Evan Green Signed-off-by: Kishon Vijay Abraham I commit 63bd0f19226dea7c373e961d7aebe4c5d8798ccc Author: Heiko Stuebner Date: Tue Aug 28 10:56:10 2018 +0200 phy: rockchip-usb: add usb-uart setup for rk3188 The rk3188 also supports bringing the uart2 out through the usb dm+dp pins, so add the necessary setup for it. rk3066 does not seem to support usb-uart functionality and this particular phy was only used on older Rockchip socs, so this leaves room for a bit of cleanup as well, as there most likely won't be new additions in the driver. Signed-off-by: Heiko Stuebner Signed-off-by: Kishon Vijay Abraham I commit 6c7103aa026094a4ee2c2708ec6977a6dfc5331d Author: Andreas Kemnade Date: Sat Sep 22 11:44:05 2018 +0200 phy: phy-twl4030-usb: fix denied runtime access When runtime is not enabled, pm_runtime_get_sync() returns -EACCESS, the counter will be incremented but the resume callback not called, so enumeration and charging will not start properly. To avoid that happen, disable irq on suspend and recheck on resume. Practically this happens when the device is woken up from suspend by plugging in usb. Signed-off-by: Andreas Kemnade Signed-off-by: Kishon Vijay Abraham I commit 979b519c7a1bff56a212bf80cc04ae9b4131ea43 Author: Yoshihiro Shimoda Date: Fri Sep 21 20:53:24 2018 +0900 phy: renesas: rcar-gen3-usb2: add is_otg_channel to use "role" sysfs Even if a board doesn't have otg pins connection, this hardware can change the role by a register setting. So, this patch adds "is_otg_channel" for it. Signed-off-by: Yoshihiro Shimoda Reviewed-by: Simon Horman Signed-off-by: Kishon Vijay Abraham I commit a602152c81a2c1c0daeae56d145d558d52a70dae Author: Yoshihiro Shimoda Date: Fri Sep 21 20:53:23 2018 +0900 phy: renesas: rcar-gen3-usb2: add conditions for uses_otg_pins == false If uses_otg_pins is set to false, this driver 1) should disable otg related interruptions, and 2) should not get ID pin signal, to avoid unexpected behaviors. So, this patch adds conditions for it. Signed-off-by: Yoshihiro Shimoda Reviewed-by: Simon Horman Signed-off-by: Kishon Vijay Abraham I commit 73801b90a38ff1ee89ad38c925fa37fbcb421bfc Author: Yoshihiro Shimoda Date: Fri Sep 21 20:53:22 2018 +0900 phy: renesas: rcar-gen3-usb2: change a condition "dr_mode" This patch changes a condition about dr_mode. If a device node has any dr_mode ("host", "peripheral" or "otg"), this driver allows to set "is_otg_channel" to true. Also, this patch keeps the dr_mode value for future use. Signed-off-by: Yoshihiro Shimoda Reviewed-by: Simon Horman Signed-off-by: Kishon Vijay Abraham I commit 7ab0305d4d7725699169e21cdc4f6c8759c32feb Author: Yoshihiro Shimoda Date: Fri Sep 21 20:53:21 2018 +0900 phy: renesas: rcar-gen3-usb2: unify OBINTEN handling This patch unifies the OBINTEN handling to clean-up the code. Signed-off-by: Yoshihiro Shimoda Reviewed-by: Simon Horman Signed-off-by: Kishon Vijay Abraham I commit 8dde0008ffc9e2e214ef916821959fe6706ff9f0 Author: Yoshihiro Shimoda Date: Fri Sep 21 20:53:20 2018 +0900 phy: renesas: rcar-gen3-usb2: Check a property to use otg pins Since All R-Car Gen3 SoCs have dedicated otg pins actually but some boards don't use the otg pins (e.g. R-Car D3 Draak and R-Car E3 Ebisu), the driver should not choose SoC model base by using rcar_gen3_phy_usb2_match_table's data. So, this patch checks a "renesas,no-otg-pins" property to set the "uses_otg_pins". Note that since r8a77995-draak.dts and r8a77990-ebisu.dts don't have 'dr_mode = "otg";' for now, if we apply this patch, no behavior changes (the value of "uses_otg_pins" is false). Signed-off-by: Yoshihiro Shimoda Reviewed-by: Simon Horman Signed-off-by: Kishon Vijay Abraham I commit cfdc66348eed22211f277c4bd668ac935b8b3470 Author: Yoshihiro Shimoda Date: Fri Sep 21 20:53:19 2018 +0900 phy: renesas: rcar-gen3-usb2: Rename has_otg_pins to uses_otg_pins Since R-Car E3 and D3 have dedicated otg pins actually, "has_otg_pins" is possible to misread in the future. So, this patch renames has_otg_pins to uses_otg_pins. Signed-off-by: Yoshihiro Shimoda Reviewed-by: Simon Horman Signed-off-by: Kishon Vijay Abraham I commit 09938ea9d136243e8d1fed6d4d7a257764f28f6d Author: Yoshihiro Shimoda Date: Fri Sep 21 20:53:18 2018 +0900 phy: renesas: rcar-gen3-usb2: fix vbus_ctrl for role sysfs This patch fixes and issue that the vbus_ctrl is disabled by rcar_gen3_init_from_a_peri_to_a_host(), so a usb host cannot supply the vbus. Note that this condition will exit when the otg irq happens even if we don't apply this patch. Fixes: 9bb86777fb71 ("phy: rcar-gen3-usb2: add sysfs for usb role swap") Signed-off-by: Yoshihiro Shimoda Reviewed-by: Simon Horman Signed-off-by: Kishon Vijay Abraham I commit 1582b76286ae6bbfe09a75bdcfc9f5aebc96be9c Author: Yoshihiro Shimoda Date: Fri Sep 21 20:53:17 2018 +0900 dt-bindings: rcar-gen3-phy-usb2: add no-otg-pins property This patch adds a new optional property "renesas,no-otg-pins" which a board does not provide proper otg pins. Signed-off-by: Yoshihiro Shimoda Signed-off-by: Kishon Vijay Abraham I commit 7b69fa1c5c930886f8a916cc47096dd4044c007a Author: Florian Fainelli Date: Thu Sep 20 12:16:38 2018 -0700 phy: brcm-sata: Add BCM63138 (DSL) PHY init sequence The BCM63138 SATA PHY requires a special initialization sequence in order to operate correctly, mostly tuning incorrect default values. Implement that sequence and match the documented compatible string as an entry point into that sequence. Signed-off-by: Florian Fainelli Signed-off-by: Kishon Vijay Abraham I commit 26728df4b254ae06247726a9a6e64823e39ac504 Author: Florian Fainelli Date: Thu Sep 20 12:16:36 2018 -0700 phy: brcm-sata: allow PHY_BRCM_SATA driver to be built for DSL SoCs Broadcom ARM-based DSL SoCs (BCM63xx product line) have the same Broadcom SATA PHY that other SoCs are using, make it possible to select that driver on these platforms. Signed-off-by: Florian Fainelli Signed-off-by: Kishon Vijay Abraham I commit a575388a9fbe8e70f3d86010698a57ae04a95fb4 Author: Florian Fainelli Date: Thu Sep 20 12:16:35 2018 -0700 dt-bindings: phy: Document BCM63138 compatible string Document the compatible string "brcm,bcm63138-sata-phy" as a valid compatible string describing the standard Broadcom SATA PHY block. Signed-off-by: Florian Fainelli Signed-off-by: Kishon Vijay Abraham I commit c6d9b132415951a8e8025a5b0e7f6b805737528c Author: Kunihiko Hayashi Date: Wed Sep 5 18:49:45 2018 +0900 phy: socionext: add PCIe PHY driver support Add a driver for PHY interface built into PCIe controller implemented in UniPhier SoCs. Signed-off-by: Kunihiko Hayashi Signed-off-by: Kishon Vijay Abraham I commit 74c60cd96b5c8b63be69881fa7da514eae240744 Author: Kunihiko Hayashi Date: Wed Sep 5 18:49:44 2018 +0900 dt-bindings: phy: add UniPhier PCIe PHY description Add DT bindings for PHY interface built into PCIe controller implemented in UniPhier SoCs. Signed-off-by: Kunihiko Hayashi Reviewed-by: Rob Herring Signed-off-by: Kishon Vijay Abraham I commit ac9ba7dc8613773b037a96af24f381ef230ef1ae Author: Rob Herring Date: Mon Aug 27 20:52:40 2018 -0500 phy: 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: Kishon Vijay Abraham I Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Rob Herring Signed-off-by: Kishon Vijay Abraham I commit fcd0eec4f54f1a8627a2d7fcbaaeed18261276a4 Author: Fabrizio Castro Date: Fri Aug 24 08:56:11 2018 +0100 dt-bindings: rcar-gen3-phy-usb3: Add r8a774a1 support Document RZ/G2M (R8A774A1) SoC bindings. Signed-off-by: Fabrizio Castro Reviewed-by: Biju Das Reviewed-by: Yoshihiro Shimoda Reviewed-by: Simon Horman Reviewed-by: Rob Herring Signed-off-by: Kishon Vijay Abraham I commit ad05573080997aab7b5d0ea6187d88ef996ae3e5 Author: Fabrizio Castro Date: Fri Aug 24 08:56:10 2018 +0100 dt-bindings: rcar-gen3-phy-usb2: Add r8a774a1 support Document RZ/G2M (R8A774A1) SoC bindings. Signed-off-by: Fabrizio Castro Reviewed-by: Biju Das Reviewed-by: Yoshihiro Shimoda Reviewed-by: Simon Horman Reviewed-by: Rob Herring Signed-off-by: Kishon Vijay Abraham I commit 34d2a7db77ad837cfb88bd01b33fd1f3855ce9c0 Author: Nicolas Ferre Date: Wed Aug 29 16:31:47 2018 +0200 MAINTAINERS: sdhci: move the Microchip entry to proper location All SDHCI controller drivers are gathered at the same place, add the Microchip one there. Signed-off-by: Nicolas Ferre Signed-off-by: Alexandre Belloni commit 92de0f8845adcd55f37f581ddc6c09f1127e217a Author: Nicolas Ferre Date: Wed Aug 29 16:31:46 2018 +0200 MAINTAINERS: move former ATMEL entries to proper MICROCHIP location Standardize the Microchip / Atmel entries with the same form and move them so that they are all located at the same place, under the newer MICROCHIP banner. Only modifications to the titles of the entries are done in this patch. Signed-off-by: Nicolas Ferre Signed-off-by: Alexandre Belloni commit ea70ba2b60be30b1753dae9f8563b695f840223a Author: Nicolas Ferre Date: Wed Aug 29 16:31:45 2018 +0200 MAINTAINERS: remove the / ATMEL string from MICROCHIP entries No need to keep this additional string as it can puzzle people while adding new driver's entries. Move the NAND entry to keep it alphabetically ordered. Signed-off-by: Nicolas Ferre Signed-off-by: Alexandre Belloni commit 92a19973b499cd5a1f26eb83c001fe984d3f8404 Author: Nicolas Ferre Date: Wed Aug 29 16:31:44 2018 +0200 MAINTAINERS: iio: add co-maintainer to SAMA5D2-compatible ADC driver Add Eugen as co-maintainer with Ludovic of Microchip SAMA5D2-compatible ADC driver. Also add the binding documentation/include as file pattern. Signed-off-by: Nicolas Ferre Signed-off-by: Alexandre Belloni commit f98107ddc55758b5f9ae2045e07cd97f8930647e Author: Nicolas Ferre Date: Wed Aug 29 16:31:43 2018 +0200 MAINTAINERS: pwm: add entry for Microchip pwm driver Add the entry that was missing for pwm-atmel.c driver. Add binding file as well. Signed-off-by: Nicolas Ferre Signed-off-by: Alexandre Belloni commit 630cbf6811d26c3ebe79fa51a8f4b8064ebd429a Author: Nicolas Ferre Date: Wed Aug 29 16:31:42 2018 +0200 MAINTAINERS: dmaengine: add files to Microchip dma entry In Microchip DMA (HDMA actually) entry, add the missing files for better matching with get_maintainer.pl tool. Signed-off-by: Nicolas Ferre Signed-off-by: Alexandre Belloni commit 4d6465d98c021d2e53b23f4771aa8bce5a442e8b Author: Nicolas Ferre Date: Wed Aug 29 16:31:41 2018 +0200 MAINTAINERS: USB: change maintainer for Microchip USBA gadget driver Hand over this USB gadget driver to Cristian: atmel_usba. Signed-off-by: Nicolas Ferre Signed-off-by: Alexandre Belloni commit 78977b296a11ce9ad847d86218b5a1dde9dfe5e4 Author: Nicolas Ferre Date: Wed Aug 29 16:31:40 2018 +0200 MAINTAINERS: ASoC: change maintainer for Microchip ALSA drivers Hand over to Codrin for Microchip Audio SoC drivers in "atmel" directory. Signed-off-by: Nicolas Ferre Signed-off-by: Alexandre Belloni commit 482232e27dbfae5ce218a6405c74db8cfa875cf7 Author: Nicolas Ferre Date: Wed Aug 29 16:31:39 2018 +0200 MAINTAINERS: media: change Microchip ISI, ISC maintainers For ISC, Songjun is not with Microchip anymore, his address shouldn't be reachable. For ISI, Eugen can handle the maintenance now. Signed-off-by: Nicolas Ferre Signed-off-by: Alexandre Belloni commit 5db8a02fd85ac741e94d6dd50f0907bcbc6b9261 Author: Nicolas Ferre Date: Wed Aug 29 16:31:38 2018 +0200 MAINTAINERS: update entry for Microchip NAND driver support Replace the Microchip/Atmel NAND controller driver maintainer by removing Josh and adding Tudor. Cc: Josh Wu Signed-off-by: Nicolas Ferre Signed-off-by: Alexandre Belloni commit d7bbc7b759bc0d2683e6c10c7d66b95a59a231f9 Author: Nicolas Ferre Date: Wed Aug 29 16:31:37 2018 +0200 MAINTAINERS: ARM: at91: add co-maintainer for ARM/Microchip Add Ludovic as a new co-maintainer for the AT91 Microchip ARM sub-architecture. Add the newly created kernel.org group git tree that we will use from now on. Cc: Alexandre Belloni Signed-off-by: Nicolas Ferre Signed-off-by: Alexandre Belloni commit 95590a6286c547b7287d01c55515fb96b904aa03 Author: zhong jiang Date: Thu Aug 16 18:26:22 2018 +0800 ARM: at91: pm: call put_device instead of of_node_put in at91_pm_config_ws of_find_device_by_node takes a reference to the struct device when it finds a match via get_device. but it fails to put_device in at91_pm_config_ws, for_each_matching_node_and_match will get and put the node properly, there is no need to call the of_put_node. Therefore, just call put_device instead of of_node_put in at91_pm_config_ws. Fixes: d7484f5c6b3b ("ARM: at91: pm: configure wakeup sources for ULP1 mode") Suggested-by: Claudiu Beznea Signed-off-by: zhong jiang Signed-off-by: Alexandre Belloni commit 0751736905710e20130e70f33cb40014af0e922e Author: YueHaibing Date: Tue Sep 25 02:04:03 2018 +0000 EDAC, i7core: Remove set but not used variable pvt Remove the unused local variable pvt: drivers/edac/i7core_edac.c: In function 'i7core_mce_check_error': drivers/edac/i7core_edac.c:1818:21: warning: variable 'pvt' set but not used \ [-Wunused-but-set-variable] Signed-off-by: YueHaibing Signed-off-by: Borislav Petkov Cc: Mauro Carvalho Chehab Cc: linux-edac Link: http://lkml.kernel.org/r/1537841043-108267-1-git-send-email-yuehaibing@huawei.com commit 726d75a6d243bf6730da3216f3592503f6f0f588 Author: Vignesh R Date: Tue Sep 25 14:00:24 2018 +0530 PCI: dwc: pci-dra7xx: Enable errata i870 for both EP and RC mode Errata i870 is applicable in both EP and RC mode. Therefore rename function dra7xx_pcie_ep_unaligned_memaccess(), that implements errata workaround, to dra7xx_pcie_unaligned_memaccess() and call it for both RC and EP. Make sure driver probe does not fail in case the workaround is not applied for RC mode in order to maintain DT backward compatibility. Reported-by: Chris Welch Signed-off-by: Vignesh R [lorenzo.pieralisi@arm.com: reworded the log] Signed-off-by: Lorenzo Pieralisi Acked-by: Kishon Vijay Abraham I commit e3336a18ff853c26031c578d49a23488b48ebc22 Author: Vignesh R Date: Tue Sep 25 14:00:23 2018 +0530 dt-bindings: PCI: dra7xx: Add bindings for unaligned access in host mode Update device tree binding documentation of TI's dra7xx PCI controller for enabling unaligned mem access as applicable not just in EP mode but in host mode as well. Signed-off-by: Vignesh R Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring commit f4e4453aa9f474bb86f656a1cd56367444767f56 Author: Jagan Teki Date: Tue Sep 25 14:19:40 2018 +0530 arm64: dts: allwinner: a64: Enable HDMI output on A64 boards w/ HDMI Enable all necessary device tree nodes and add connector node to device trees for all supported A64 boards with HDMI. Jagan, tested on BPI-M64, OPI-Win, A64-Olinuxino, NPI-A64 Vasily, tested on pine64-lts Signed-off-by: Jagan Teki [Icenowy: squash all board patches altogether and change supply name] Signed-off-by: Icenowy Zheng Tested-by: Jagan Teki Tested-by: Vasily Khoruzhick Signed-off-by: Chen-Yu Tsai commit e85f28e047d06d2b472e1160acf75dc4af2fdfaf Author: Jagan Teki Date: Tue Sep 25 14:19:39 2018 +0530 arm64: dts: allwinner: a64: Add display pipeline Allwinner A64 have a display pipeline with 2 mixers/TCONs, the first TCON is connected to LCD and the second is to HDMI. The HDMI controller/PHY pair is similar to the one on H3/H5. Add all required device tree nodes of the display pipeline, including the TCON0 LCD one and the TCON1 HDMI one. Signed-off-by: Jagan Teki [Icenowy: refactor commit message and add 1st pipeline] Signed-off-by: Icenowy Zheng Signed-off-by: Chen-Yu Tsai commit c3a8d6ea73ec051b121b75ac61973e688e809fe4 Author: Noralf Trønnes Date: Sat Sep 8 15:46:47 2018 +0200 drm/zte: 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: Shawn Guo Signed-off-by: Noralf Trønnes Acked-by: Sam Ravnborg Acked-by: Shawn Guo Link: https://patchwork.freedesktop.org/patch/msgid/20180908134648.2582-20-noralf@tronnes.org commit 233386d8f22b62ea9c725226067b89c3ecb701d3 Author: Noralf Trønnes Date: Sat Sep 8 15:46:46 2018 +0200 drm/vc4: 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: Eric Anholt Signed-off-by: Noralf Trønnes Acked-by: Sam Ravnborg Acked-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/20180908134648.2582-19-noralf@tronnes.org commit 1e70d7a568fc6e1e9df1b7e86216b44ce7d1eb1b Author: Noralf Trønnes Date: Sat Sep 8 15:46:45 2018 +0200 drm/tve200: 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: Linus Walleij Signed-off-by: Noralf Trønnes Acked-by: Sam Ravnborg Acked-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20180908134648.2582-18-noralf@tronnes.org commit 0f26e5ce3e62c66ec0717b22d82eee8e29fe7b4e Author: Noralf Trønnes Date: Sat Sep 8 15:46:41 2018 +0200 drm/sti: 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(). If drm_fbdev_generic_setup() fails, an error is printed by the function. 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: Benjamin Gaignard Cc: Vincent Abriou Signed-off-by: Noralf Trønnes Acked-by: Sam Ravnborg Acked-by: Benjamin Gaignard Link: https://patchwork.freedesktop.org/patch/msgid/20180908134648.2582-14-noralf@tronnes.org commit 30f7b5e7c26337520e0bbd6ef644a145c075c5a4 Author: Noralf Trønnes Date: Sat Sep 8 15:46:40 2018 +0200 drm/pl111: 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: Eric Anholt Signed-off-by: Noralf Trønnes Acked-by: Sam Ravnborg Acked-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/20180908134648.2582-13-noralf@tronnes.org commit f53705fd98030a814fb8e9c05bbed9d0c49d211b Author: Noralf Trønnes Date: Sat Sep 8 15:46:39 2018 +0200 drm/imx: 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. CONFIG_DRM_FBDEV_EMULATION wasn't honoured by the CMA helper, but it is by drm_fb_helper. Cc: Philipp Zabel Signed-off-by: Noralf Trønnes Acked-by: Sam Ravnborg Tested-by: Philipp Zabel Acked-by: Philipp Zabel Link: https://patchwork.freedesktop.org/patch/msgid/20180908134648.2582-12-noralf@tronnes.org commit 9595809896d7ecfdf779b803055c0eb4ae846921 Author: Noralf Trønnes Date: Sat Sep 8 15:46:37 2018 +0200 drm/arm/mali: 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: Liviu Dudau Cc: Brian Starkey Signed-off-by: Noralf Trønnes Acked-by: Sam Ravnborg Acked-by: Liviu Dudau Link: https://patchwork.freedesktop.org/patch/msgid/20180908134648.2582-10-noralf@tronnes.org commit 941e97c124a02e0544d64422ab28264ccb13fe81 Author: Noralf Trønnes Date: Sat Sep 8 15:46:36 2018 +0200 drm/arm/hdlcd: 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: Liviu Dudau Signed-off-by: Noralf Trønnes Acked-by: Sam Ravnborg Acked-by: Liviu Dudau Link: https://patchwork.freedesktop.org/patch/msgid/20180908134648.2582-9-noralf@tronnes.org commit 6129369a96183f28c7912dfd37cb5869433aa904 Author: Noralf Trønnes Date: Sat Sep 8 15:46:29 2018 +0200 drm/fb-helper: Improve error reporting in setup Improve error reporting in drm_fb_helper_fbdev_setup() by printing the error code. This is useful for drivers that choose to not fall over just because fbdev doesen't work, but still wants clues to why it failed. This way they don't have to provide an error message themselves. Signed-off-by: Noralf Trønnes Acked-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20180908134648.2582-2-noralf@tronnes.org commit 9835bf7ff813cc7f5390dc221e0c9455ed81689e Merge: fb437bc8fe36 24ef0fd0a1f3 Author: Ingo Molnar Date: Tue Sep 25 11:20:01 2018 +0200 Merge tag 'perf-core-for-mingo-4.20-20180919' 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: perf test improvements: - Add watchpoint entry (Ravi Bangoria) Build fixes: - Initialize perf_data_file fd field to fix building the CTF (trace format) converter with with gcc 4.8.4 on Ubuntu 14.04 (Jérémie Galarneau) - Use -Wno-redundant-decls to build with PYTHON=python3 to build the python binding, fixing the build in systems such as Clear Linux (Arnaldo Carvalho de Melo) Hardware tracing improvements: - Suppress AUX/OVERWRITE records (Alexander Shishkin) Infrastructure changes: - Adopt PTR_ERR_OR_ZERO from the kernel and use it in the bpf-loader instead of open coded equivalent (Ding Xiang) - Improve the event ordering code to make it clear and fix a bug related to freeing of events when using pipe mode from 'record' to 'inject' (Jiri Olsa) - Some prep work to facilitate per-cpu threads to write record data to per-cpu files (Jiri Olsa) Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit fb437bc8fe36c964d9bf2f4b568e6c77c235c5e3 Merge: 49e73246cbe6 6bf4ca7fbc85 Author: Ingo Molnar Date: Tue Sep 25 11:19:44 2018 +0200 Merge tag 'v4.19-rc5' into perf/core, to pick up fixes Signed-off-by: Ingo Molnar commit de17c5200237e93a2de1188e5cf885686ac8f79d Author: Rob Herring Date: Wed Aug 29 13:34:40 2018 -0500 PCI: Remove unnecessary check of device_type == pci PCI host drivers have already matched on compatible strings, so checking device_type is redundant. Also, device_type is considered deprecated for FDT though we've still been requiring it for PCI hosts as it is useful for finding PCI buses. Signed-off-by: Rob Herring [lorenzo.pieralisi@arm.com: reformatted the log] Signed-off-by: Lorenzo Pieralisi Acked-by: Alan Douglas Acked-by: Subrahmaya Lingappa Acked-by: Michal Simek Cc: Will Deacon Cc: Lorenzo Pieralisi Cc: Bjorn Helgaas Cc: Alan Douglas Cc: Subrahmanya Lingappa Cc: Michal Simek Cc: linux-pci@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org commit 7adb562c3e90f87b0da196c372afe251ad4ec62e Author: Robin Murphy Date: Wed Sep 12 16:24:14 2018 +0100 arm64/dma-mapping: Mildly optimise non-coherent IOMMU ops Whilst the symmetry of deferring to the existing sync callback in __iommu_map_page() is nice, taking a round-trip through iommu_iova_to_phys() is a pretty heavyweight way to get an address we can trivially compute from the page we already have. Tweaking it to just perform the cache maintenance directly when appropriate doesn't really make the code any more complicated, and the runtime efficiency gain can only be a benefit. Furthermore, the sync operations themselves know they can only be invoked on a managed DMA ops domain, so can use the fast specific domain lookup to avoid excessive manipulation of the group refcount (particularly in the scatterlist cases). Acked-by: Will Deacon Signed-off-by: Robin Murphy Tested-by: Will Deacon Signed-off-by: Joerg Roedel commit 43c5bf11a610ceeae68b26c24e0c76852d0d5cfc Author: Robin Murphy Date: Wed Sep 12 16:24:13 2018 +0100 iommu/dma: Use fast DMA domain lookup Most parts of iommu-dma already assume they are operating on a default domain set up by iommu_dma_init_domain(), and can be converted straight over to avoid the refcounting bottleneck. MSI page mappings may be in an unmanaged domain with an explicit MSI-only cookie, so retain the non-specific lookup, but that's OK since they're far from a contended fast path either way. Signed-off-by: Robin Murphy Tested-by: Will Deacon Signed-off-by: Joerg Roedel commit 6af588fed39178c8e118fcf9cb6664e58a1fbe88 Author: Robin Murphy Date: Wed Sep 12 16:24:12 2018 +0100 iommu: Add fast hook for getting DMA domains While iommu_get_domain_for_dev() is the robust way for arbitrary IOMMU API callers to retrieve the domain pointer, for DMA ops domains it doesn't scale well for large systems and multi-queue devices, since the momentary refcount adjustment will lead to exclusive cacheline contention when multiple CPUs are operating in parallel on different mappings for the same device. In the case of DMA ops domains, however, this refcounting is actually unnecessary, since they already imply that the group exists and is managed by platform code and IOMMU internals (by virtue of iommu_group_get_for_dev()) such that a reference will already be held for the lifetime of the device. Thus we can avoid the bottleneck by providing a fast lookup specifically for the DMA code to retrieve the default domain it already knows it has set up - a simple read-only dereference plays much nicer with cache-coherency protocols. Signed-off-by: Robin Murphy Tested-by: Will Deacon Signed-off-by: Joerg Roedel commit bee60e94a1e20ec0b8ffdafae270731d8fda4551 Author: Ganapatrao Kulkarni Date: Wed Sep 5 09:57:36 2018 +0530 iommu/iova: Optimise attempts to allocate iova from 32bit address range As an optimisation for PCI devices, there is always first attempt been made to allocate iova from SAC address range. This will lead to unnecessary attempts, when there are no free ranges available. Adding fix to track recently failed iova address size and allow further attempts, only if requested size is lesser than a failed size. The size is updated when any replenish happens. Reviewed-by: Robin Murphy Signed-off-by: Ganapatrao Kulkarni Signed-off-by: Joerg Roedel commit e48d194d1204b19655c1a9d78a67f2f01d2fe432 Author: Linus Walleij Date: Tue Sep 25 09:54:14 2018 +0200 gpio: Add comments on single direction chips A patch from Ricardo got me thinking about some gpio chip semantics so let's drop in some comments to make things more clear around that. Cc: Ricardo Ribalda Delgado Cc: Bartosz Golaszewski Signed-off-by: Linus Walleij commit 4f973ed32164a0df2026a7051980328b1a771f7c Author: Nipun Gupta Date: Mon Sep 10 19:19:21 2018 +0530 arm64: dts: ls208xa: comply with the iommu map binding for fsl_mc fsl-mc bus support the new iommu-map property. Comply to this binding for fsl_mc bus. Signed-off-by: Nipun Gupta Reviewed-by: Laurentiu Tudor Signed-off-by: Joerg Roedel commit 761ba8ed114b23238238d062a119d3920aaa59df Author: Nipun Gupta Date: Mon Sep 10 19:19:20 2018 +0530 bus/fsl-mc: set coherent dma mask for devices on fsl-mc bus of_dma_configure() API expects coherent_dma_mask to be correctly set in the devices. This patch does the needful. Signed-off-by: Nipun Gupta Reviewed-by: Robin Murphy Signed-off-by: Joerg Roedel commit a259ed1618d2e7c212d9fe33f9eebcdc1f231338 Author: Nipun Gupta Date: Mon Sep 10 19:19:19 2018 +0530 bus/fsl-mc: support dma configure for devices on fsl-mc bus This patch adds support of dma configuration for devices on fsl-mc bus using 'dma_configure' callback for busses. Also, directly calling arch_setup_dma_ops is removed from the fsl-mc bus. Signed-off-by: Nipun Gupta Reviewed-by: Laurentiu Tudor Reviewed-by: Robin Murphy Signed-off-by: Joerg Roedel commit eab03e2a1a3d9d354943aff5ae5e4254ee1ec967 Author: Nipun Gupta Date: Mon Sep 10 19:19:18 2018 +0530 iommu/arm-smmu: Add support for the fsl-mc bus Implement bus specific support for the fsl-mc bus including registering arm_smmu_ops and bus specific device add operations. Signed-off-by: Nipun Gupta Reviewed-by: Robin Murphy Signed-off-by: Joerg Roedel commit fa0656b40e0fb0135d7d229c8ab0261fe741af7b Author: Nipun Gupta Date: Mon Sep 10 19:19:17 2018 +0530 iommu/of: support iommu configuration for fsl-mc devices With of_pci_map_rid available for all the busses, use the function for configuration of devices on fsl-mc bus Signed-off-by: Nipun Gupta Reviewed-by: Robin Murphy Signed-off-by: Joerg Roedel commit 2a6db719c92dbfe43c9eea7e4358ea2e51b5004e Author: Nipun Gupta Date: Mon Sep 10 19:19:16 2018 +0530 iommu/of: make of_pci_map_rid() available for other devices too iommu-map property is also used by devices with fsl-mc. This patch moves the of_pci_map_rid to generic location, so that it can be used by other busses too. 'of_pci_map_rid' is renamed here to 'of_map_rid' and there is no functional change done in the API. Signed-off-by: Nipun Gupta Reviewed-by: Rob Herring Reviewed-by: Robin Murphy Acked-by: Bjorn Helgaas Signed-off-by: Joerg Roedel commit c9d8d661ece808f987e606d73d57e3bd6849ac6a Author: Nipun Gupta Date: Mon Sep 10 19:19:15 2018 +0530 Documentation: fsl-mc: add iommu-map device-tree binding for fsl-mc bus The existing IOMMU bindings cannot be used to specify the relationship between fsl-mc devices and IOMMUs. This patch adds a generic binding for mapping fsl-mc devices to IOMMUs, using iommu-map property. Signed-off-by: Nipun Gupta Reviewed-by: Rob Herring Acked-by: Robin Murphy Signed-off-by: Joerg Roedel commit dd809b7de27cff710658febdde65304ec1a3ea82 Author: Sergei Shtylyov Date: Mon Sep 24 21:33:00 2018 +0300 arm64: dts: renesas: r8a779{7|8}0: add TPU support Describe TPU 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 ae9847f48a4b4bff0335da20be63ac84d94eb54c Author: Ricardo Ribalda Delgado Date: Fri Sep 21 12:36:03 2018 +0200 gpiolib: Fix gpio_direction_* for single direction GPIOs GPIOs with no programmable direction are not required to implement direction_output nor direction_input. If we try to set an output direction on an output-only GPIO or input direction on an input-only GPIO simply return 0. This allows this single direction GPIO to be used by libgpiod. Signed-off-by: Ricardo Ribalda Delgado Signed-off-by: Linus Walleij commit 737e05bf034e9ce4cba97bdc818ded181ef23e4b Author: Yoshihiro Shimoda Date: Fri Sep 21 16:54:17 2018 +0900 arm64: dts: renesas: revise properties for R-Car Gen3 SoCs' usb 2.0 R-Car Gen3 SoCs need to enable/deassert clocks/resets of both usb 2.0 host (included phy) and peripheral. Otherwise, other side device cannot work correctly. So, this patch revises properties of clocks and resets. After that, each device driver can enable/deassert clocks/resets by its self. Notes: - To work the renesas_usbhs driver correctly when host side drivers are disabled and the renesas_usbhs driver doesn't have multiple clock management, this patch doesn't change the order of the clocks property in each hsusb node. - This patch doesn't have any side-effects even if the renesas_usbhs driver doesn't have reset_control and multiple clock management. Signed-off-by: Yoshihiro Shimoda Signed-off-by: Simon Horman commit 32d064a16eaace1866610f36fb5f4b114d979246 Author: Linus Walleij Date: Tue Sep 25 09:11:50 2018 +0200 gpio: Rename devres implementation file All the other core files are named "gpiolib-" so let's rename the devres as well so we have some logical namespacing here. Signed-off-by: Linus Walleij commit bd37197554eb28a7fc38e44e005e303c77f788ed Author: Leon Romanovsky Date: Thu Sep 20 21:35:26 2018 +0300 net/mlx5: Update mlx5_ifc with DEVX UID bits Add DEVX information to WQ, SRQ, CQ, TIR, TIS, QP, RQ, XRCD, PD, MKEY and MCG. Each object that is created/destroyed/modified via verbs will be stamped with a UID based on its user context. This is already done for DEVX objects commands. This will enable the firmware to enforce the usage of kernel objects from the DEVX flow by validating that the same UID is used and the resources are really related to the same user. The addition of *_valid fields are needed to distinguish how various addresses are passed. For non-DEVX callers, all those fields will be zero. Signed-off-by: Leon Romanovsky commit dae5f0afcfc35ff64dfb65cddc6842ceeeca68c4 Author: Linus Walleij Date: Tue Sep 25 09:08:48 2018 +0200 gpio: Use SPDX header for core library Use the SPDX headers and cut down on boilerplate to indicate the license in the core gpiolib implementation. Signed-off-by: Linus Walleij commit 9ef5e0370d3834a1ff11e22ae0a3220330890d36 Author: Sergei Shtylyov Date: Wed Sep 19 21:10:40 2018 +0300 clk: renesas: r8a77970: Add TPU clock The TPU0 clock wasn't present in the original R8A77970 patch by Daisuke Matsushita, it was added in a later BSP version... Based on the original (and large) patch by Vladimir Barinov. Signed-off-by: Vladimir Barinov Signed-off-by: Sergei Shtylyov Reviewed-by: Simon Horman Signed-off-by: Geert Uytterhoeven commit 5915838b7a4fa6bd6819819de11bfc30a4323ad9 Author: Geert Uytterhoeven Date: Tue Sep 18 10:55:29 2018 +0200 clk: renesas: r8a77990: Fix incorrect PLL0 divider in comment PLL0 runs at 4.8 GHz, i.e. EXTAL x 100. Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman commit 774ea6eea29025218f75bc94c764df9a641db471 Author: Yishai Hadas Date: Thu Sep 20 21:35:25 2018 +0300 net/mlx5: Set uid as part of DCT commands Set uid as part of DCT commands so that the firmware can manage the DCT object in a secured way. That will enable using a DCT that was created by verbs application to be used by the DEVX flow in case the uid is equal. Signed-off-by: Yishai Hadas Signed-off-by: Leon Romanovsky commit a0d8c054318976927493ffd26055d9d183c9beec Author: Yishai Hadas Date: Thu Sep 20 21:35:24 2018 +0300 net/mlx5: Set uid as part of SRQ commands Set uid as part of SRQ commands so that the firmware can manage the SRQ object in a secured way. That will enable using an SRQ that was created by verbs application to be used by the DEVX flow in case the uid is equal. Signed-off-by: Yishai Hadas Signed-off-by: Leon Romanovsky commit 430ae0d5a3ce1350375690cb6ab29ab6fae4a9ac Author: Yishai Hadas Date: Thu Sep 20 21:35:23 2018 +0300 net/mlx5: Set uid as part of SQ commands Set uid as part of SQ commands so that the firmware can manage the SQ object in a secured way. That will enable using an SQ that was created by verbs application to be used by the DEVX flow in case the uid is equal. Signed-off-by: Yishai Hadas Signed-off-by: Leon Romanovsky commit d269b3afffcb107375d9cf73127fc2e0181bc90b Author: Yishai Hadas Date: Thu Sep 20 21:35:22 2018 +0300 net/mlx5: Set uid as part of RQ commands Set uid as part of RQ commands so that the firmware can manage the RQ object in a secured way. That will enable using an RQ that was created by verbs application to be used by the DEVX flow in case the uid is equal. Signed-off-by: Yishai Hadas Signed-off-by: Leon Romanovsky commit 4ac63ec72587f7426aae15ddfe78e8ab785724dc Author: Yishai Hadas Date: Thu Sep 20 21:35:21 2018 +0300 net/mlx5: Set uid as part of QP commands Set uid as part of QP commands so that the firmware can manage the QP object in a secured way. That will enable using a QP that was created by verbs application to be used by the DEVX flow in case the uid is equal. Signed-off-by: Yishai Hadas Signed-off-by: Leon Romanovsky commit 9ba481e2eb3b932ae5b6278342b256e4f92d2793 Author: Yishai Hadas Date: Thu Sep 20 21:35:20 2018 +0300 net/mlx5: Set uid as part of CQ commands Set uid as part of CQ commands so that the firmware can manage the CQ object in a secured way. The firmware should mark this CQ with the given uid so that it can be used later on only by objects with the same uid. Upon DEVX flows that use this CQ (e.g. create QP command), the pointed CQ must have the same uid as of the issuer uid command. When a command is issued with uid=0 it means that the issuer of the command is trusted (i.e. kernel), in that case any pointed object can be used regardless of its uid. Signed-off-by: Yishai Hadas Signed-off-by: Leon Romanovsky commit ff19473bdc2b59f73b71d5d25a6bc42d2b531c60 Merge: c4c958aa64f3 5284521a290e Author: Linus Walleij Date: Tue Sep 25 08:49:07 2018 +0200 Merge branch 'ib-omap' into devel commit e4ab928957a3173d5d8e7fc78df6a3a63be0f60d Author: Andreas Kemnade Date: Mon Sep 24 19:29:57 2018 +0200 ARM: dts: omap3-gta04: add pulldown/up settings for twl4030 gpio Pullup and down settings were missing, so add them to avoid floating pins and make headset detection working. Signed-off-by: Andreas Kemnade Signed-off-by: Tony Lindgren commit 605cdd27a8c84d9236f9f49712a8ea3d309415c7 Author: Hans Verkuil Date: Mon Sep 24 13:01:46 2018 +0200 ARM: dts: am335x-boneblack: add cec support Add CEC support to the tda998x. Signed-off-by: Hans Verkuil Signed-off-by: Tony Lindgren commit 4310834412199ac9ab02350e5c360a210478e015 Author: Gustavo A. R. Silva Date: Thu Sep 13 13:59:13 2018 -0500 i2c: synquacer: fix fall-through annotation Replace "fallthru" with a proper "fall through" annotation. This fix is part of the ongoing efforts to enabling -Wimplicit-fallthrough Signed-off-by: Gustavo A. R. Silva Acked-by: Ard Biesheuvel Signed-off-by: Wolfram Sang commit 6ed1d79975618aedc132080e13f05e84dec16510 Author: Adam Ford Date: Sun Sep 23 10:37:17 2018 -0500 ARM: dts: am3517-evm: Add support for UI board and Audio The full AM3517-EVM shipped with an add-on board which contained two Audio codecs, a GPIO expander with a variety of buttons, and some other features. This patch enables these portions of the UI board because they don't directly conflict with existing features. Signed-off-by: Adam Ford Signed-off-by: Tony Lindgren commit ada23cd38429e1dbf10402a2f531aea7016236e2 Author: Andreas Kemnade Date: Sun Sep 23 17:07:19 2018 +0200 ARM: dts: gta04: add serial console wakeup irq This enables the possibility to have more aggressive runtime pm by providing proper wakeup irq for the serial console. Signed-off-by: Andreas Kemnade Signed-off-by: Tony Lindgren commit 5c8a6b9db5e95ea7702ef8d4bb1438537ef63594 Author: Keerthy Date: Fri Sep 21 16:52:58 2018 +0530 ARM: dts: am57xx-idk-common: Hook smps12 regulator as cpu vdd-supply am574x-idk has no cpu vdd-supply at the moment. Hence hook smps12 regulator as cpu vdd-supply in am57xx-idk-common as the same regulator feeds on to cpu on am571/2/4-idks. So remove all the individual instances and place that in common place. Signed-off-by: Keerthy Signed-off-by: Tony Lindgren commit 17ccba67109cd0631f206cf49e17986218b47854 Author: Brendan Higgins Date: Fri Sep 21 16:30:50 2018 -0700 i2c: aspeed: fix invalid clock parameters for very large divisors The function that computes clock parameters from divisors did not respect the maximum size of the bitfields that the parameters were written to. This fixes the bug. This bug can be reproduced with (and this fix verified with) the test at: https://kunit-review.googlesource.com/c/linux/+/1035/ Discovered-by-KUnit: https://kunit-review.googlesource.com/c/linux/+/1035/ Signed-off-by: Brendan Higgins Reviewed-by: Jae Hyun Yoo Signed-off-by: Wolfram Sang commit f8878fadba1e8cfcaadf98d437040d3fe9e2d12c Author: Wolfram Sang Date: Thu Sep 6 20:44:24 2018 +0200 i2c: aspeed: use proper annotation for "fall through" Use a better annotation, so GCC won't complain anymore: drivers/i2c/busses/i2c-aspeed.c:458:15: warning: this statement may fall through [-Wimplicit-fallthrough=] Signed-off-by: Wolfram Sang Tested-by: Jae Hyun Yoo Reviewed-by: Brendan Higgins Signed-off-by: Wolfram Sang commit 2be6b47211e17e6c90ead40d24d2a5cc815f2d5c Author: Guenter Roeck Date: Thu Sep 13 20:30:10 2018 -0700 i2c: aspeed: Acknowledge most interrupts early in interrupt handler Commit 3e9efc3299dd ("i2c: aspeed: Handle master/slave combined irq events properly") moved interrupt acknowledgment to the end of the interrupt handler. In part this was done because the AST2500 datasheet says: I2CD10 Interrupt Status Register bit 2 Receive Done Interrupt status S/W needs to clear this status bit to allow next data receiving. Acknowledging Receive Done before receive data was handled resulted in receive errors on high speed I2C busses. However, interrupt acknowledgment was not only moved to the end of the interrupt handler for Receive Done Interrupt status, but for all interrupt status bits. This could result in race conditions if a second interrupt was received during interrupt handling and not handled but still acknowledged at the end of the interrupt handler. Acknowledge only "Receive Done Interrupt status" late in the interrupt handler to solve the problem. Fixes: 3e9efc3299dd ("i2c: aspeed: Handle master/slave combined irq events properly") Cc: Jae Hyun Yoo Cc: Joel Stanley Signed-off-by: Guenter Roeck Acked-by: Jae Hyun Yoo Tested-by: Joel Stanley Acked-by: Brendan Higgins Signed-off-by: Wolfram Sang commit 122702077e4492e02de8a6257e6cb2227c617cf0 Author: Ulrich Hecht Date: Tue Aug 14 15:49:56 2018 +0200 drm: rcar-du: Add r8a77990 and r8a77995 device support Add support for the R-Car D3 (R8A77995) and E3 (R8A77990) SoCs to the R-Car DU driver. The two SoCs instantiate compatible DUs, so a single information structure is enough. Signed-off-by: Ulrich Hecht [Add support for R8A77990] Signed-off-by: Laurent Pinchart Tested-by: Jacopo Mondi Reviewed-by: Kieran Bingham commit ffd15c3e7898cfb6d2a986b2aa8014ad7dc9e333 Author: Laurent Pinchart Date: Wed Aug 22 16:21:33 2018 +0300 drm: rcar-du: Don't use TV sync mode when not supported by the hardware The official way to stop the display is to clear the display enable (DEN) bit in the DSYSR register, but that operates at a group level and affects the two channels in the group. To disable channels selectively, the driver uses TV sync mode that stops display operation on the channel and turns output signals into inputs. While TV sync mode is available in all DU models currently supported, the D3 and E3 DUs don't support it. We will thus need to find an alternative way to turn channels off. In the meantime, condition the switch to TV sync mode to the availability of the feature, to avoid writing an invalid value to the DSYSR register. When the feature is unavailable the display output will turn blank as all planes are disabled when stopping the CRTC. Signed-off-by: Laurent Pinchart Tested-by: Jacopo Mondi Reviewed-by: Kieran Bingham commit 9144adc5e5a99577bce0d4ee2ca3615f53b9d296 Author: Laurent Pinchart Date: Wed Aug 22 16:05:02 2018 +0300 drm: rcar-du: Cache DSYSR value to ensure known initial value DSYSR is a DU channel register that also contains group fields. It is thus written to by both the group and CRTC code, using read-update-write sequences. As the register isn't initialized explicitly at startup time, this can lead to invalid or otherwise unexpected values being written to some of the fields if they have been modified by the firmware or just not reset properly. To fix this we can write a fully known value to the DSYSR register when turning a channel's functional clock on. However, the mix of group and channel fields complicate this. A simpler solution is to cache the register and initialize the cached value to the desired hardware defaults. Signed-off-by: Laurent Pinchart Tested-by: Jacopo Mondi Reviewed-by: Kieran Bingham commit 1f98b2a4fd4632db3b585a624032b7ec785a5255 Author: Laurent Pinchart Date: Wed Aug 22 00:01:07 2018 +0300 drm: rcar-du: Enable configurable DPAD0 routing on Gen3 All Gen3 SoCs supported so far have a fixed association between DPAD0 and DU channels, which led to hardcoding that association when writing the corresponding hardware register. The D3 and E3 will break that mechanism as DPAD0 can be dynamically connected to either DU0 or DU1. Make DPAD0 routing dynamic on Gen3. To ensure a valid hardware configuration when the DU starts without the RGB output enabled, DPAD0 is associated at initialization time to the first DU channel that it can be connected to. This makes no change on Gen2 as all Gen2 SoCs can connected DPAD0 to DU0, which is the current implicit default value. As the DPAD0 source is always 0 when a single source is possible on Gen2, we can also simplify the Gen2 code in the same function to remove a conditional check. Signed-off-by: Laurent Pinchart Tested-by: Jacopo Mondi Reviewed-by: Jacopo Mondi commit b4734f43f3cadfaa423ce6aceb1e9faea07b8eb8 Author: Laurent Pinchart Date: Tue Aug 21 21:31:04 2018 +0300 drm: rcar-du: Use LVDS PLL clock as dot clock when possible On selected SoCs, the DU can use the clock output by the LVDS encoder PLL as its input dot clock. This feature is optional, but on the D3 and E3 SoC it is often the only way to obtain a precise dot clock frequency, as the other available clocks (CPG-generated clock and external clock) usually have fixed rates. Add a DU model information field to describe which DU channels can use the LVDS PLL output clock as their input clock, and configure clock routing accordingly. This feature is available on H2, M2-W, M2-N, D3 and E3 SoCs, with D3 and E3 being the primary targets. It is left disabled in this commit, and will be enabled per-SoC after careful testing. At the hardware level, clock routing is configured at runtime in two steps, first selecting an internal dot clock between the LVDS PLL clock and the external DOTCLKIN clock, and then selecting between the internal dot clock and the CPG-generated clock. The first part requires stopping the whole DU group in order for the change to take effect, thus causing flickering on the screen. For this reason we currently hardcode the clock source to the LVDS PLL clock if available, and allow flicker-free selection of the external DOTCLKIN clock or CPG-generated clock otherwise. A more dynamic clock selection process can be implemented later if the need arises. Signed-off-by: Laurent Pinchart Tested-by: Jacopo Mondi Reviewed-by: Jacopo Mondi commit 0bb63534fdf3bc9a82bcfe9f5c6a9653b8b2a3f1 Author: Laurent Pinchart Date: Fri Jul 14 03:26:17 2017 +0300 drm: rcar-du: Perform the initial CRTC setup from rcar_du_crtc_get() The rcar_du_crtc_get() function is always immediately followed by a call to rcar_du_crtc_setup(). Call the later from the former to simplify the code, and add a comment to explain how the get and put calls are balanced. Signed-off-by: Laurent Pinchart Tested-by: Jacopo Mondi Reviewed-by: Jacopo Mondi commit c25c0136119990c62c160d95592714833bc214a5 Author: Laurent Pinchart Date: Tue Aug 21 18:06:50 2018 +0300 drm: rcar-du: lvds: D3/E3 support The LVDS encoders in the D3 and E3 SoCs differ significantly from those in the other R-Car Gen3 family members: - The LVDS PLL architecture is more complex and requires computing PLL parameters manually. - The PLL uses external clocks as inputs, which need to be retrieved from DT. - In addition to the different PLL setup, the startup sequence has changed *again* (seems someone had trouble making his/her mind). Supporting all this requires DT bindings extensions for external clocks, brand new PLL setup code, and a few quirks to handle the differences in the startup sequence. The implementation doesn't support all hardware features yet, namely - Using the LV[01] clocks generated by the CPG as PLL input. - Providing the LVDS PLL clock to the DU for use with the RGB output. Those features can be added later when the need will arise. Signed-off-by: Laurent Pinchart Tested-by: Jacopo Mondi Reviewed-by: Ulrich Hecht Reviewed-by: Jacopo Mondi commit 399d9f2f197a06b8866192a019a97d2af29cc81e Author: Laurent Pinchart Date: Wed Aug 22 17:04:06 2018 +0300 drm: bridge: thc63: Restrict modes based on hardware operating frequency The THC63LVD1024 is restricted to a pixel clock frequency in the range of 8 to 135 MHz. Implement the bridge .mode_valid() operation accordingly. Signed-off-by: Laurent Pinchart Reviewed-by: Andrzej Hajda Tested-by: Jacopo Mondi commit 9734a7009de62c05e9b08fa65efb7c5214ab3f30 Author: Laurent Pinchart Date: Wed Aug 22 15:27:16 2018 +0300 dt-bindings: display: renesas: lvds: Add EXTAL and DU_DOTCLKIN clocks On the D3 and E3 SoCs, the LVDS encoder can derive its internal pixel clock from an externally supplied clock, either through the EXTAL pin or through one of the DU_DOTCLKINx pins. Add corresponding clocks to the DT bindings. To retain backward compatibility with DT that don't specify the clock-names property, the functional clock must always be specified first, and the clock-names property is optional when only the functional clock is specified. Signed-off-by: Laurent Pinchart Reviewed-by: Jacopo Mondi Reviewed-by: Ulrich Hecht Reviewed-by: Kieran Bingham commit 7bcfe20d0d8b647879629798fa57e39905d6cded Author: Colin King Date: Mon Sep 24 12:43:21 2018 -0700 soc: ti: fix spelling mistake "instace" -> "instance" Trivial fix to spelling mistake in dev_err messages and comments Signed-off-by: Colin Ian King Signed-off-by: Santosh Shilimkar commit 2aad26fa0a3de74b9c773bc8cb868892f099ccc7 Author: Chengguang Xu Date: Mon Sep 24 14:10:15 2018 +0800 ext2: remove redundant building macro check If macro CONFIG_QUOTA is not enabled then mount option flag of usrquota/grpquota will not be set, so we can remove some building macro check safely in ext2_shwo_options(). Additionally, I think it's better to define EXT2_MOUNT_DAX regardless macro CONFIG_FS_DAX is enabled just like acl/xattr. Signed-off-by: Chengguang Xu Signed-off-by: Jan Kara commit edad8d260e259b0f8290deffef130034f0816b3e Author: Ioana Ciocoi Radulescu Date: Mon Sep 24 15:36:21 2018 +0000 dpaa2-eth: Make Rx flow hash key configurable Until now, the Rx flow hash key was a 5-tuple (IP src, IP dst, IP nextproto, L4 src port, L4 dst port) fixed value that we configured at probe. Add support for configuring this hash key at runtime. We support all standard header fields configurable through ethtool, but cannot differentiate between flow types, so the same hash key is applied regardless of protocol. We also don't support the discard option. Signed-off-by: Ioana Radulescu Signed-off-by: David S. Miller commit 48c1699ec298dd9fbcdcac4fd63ec6db2bd5cc84 Author: Stefan Wahren Date: Mon Sep 24 13:20:10 2018 +0200 net: qca_spi: Introduce write register verification The SPI protocol for the QCA7000 doesn't have any fault detection. In order to increase the drivers reliability in noisy environments, we could implement a write verification inspired by the enc28j60. This should avoid situations were the driver wrongly assumes the receive interrupt is enabled and miss all incoming packets. This function is disabled per default and can be controlled via module parameter wr_verify. Signed-off-by: Michael Heimpold Signed-off-by: Stefan Wahren Signed-off-by: David S. Miller commit 4128c0cfb1d74cb1fa2a2fb6824348b349d30f04 Author: Vakul Garg Date: Mon Sep 24 16:09:49 2018 +0530 tls: Fixed uninitialised vars warning In tls_sw_sendmsg() and tls_sw_sendpage(), it is possible that the uninitialised variable 'ret' gets passed to sk_stream_error(). So initialise local variable 'ret' to '0. The warnings were detected by 'smatch' tool. Fixes: a42055e8d2c3 ("net/tls: Add support for async encryption") Signed-off-by: Vakul Garg Signed-off-by: David S. Miller commit 9932a29ab1be1427a2ccbdf852a0f131f2849685 Author: Vakul Garg Date: Mon Sep 24 15:35:56 2018 +0530 net/tls: Fixed race condition in async encryption On processors with multi-engine crypto accelerators, it is possible that multiple records get encrypted in parallel and their encryption completion is notified to different cpus in multicore processor. This leads to the situation where tls_encrypt_done() starts executing in parallel on different cores. In current implementation, encrypted records are queued to tx_ready_list in tls_encrypt_done(). This requires addition to linked list 'tx_ready_list' to be protected. As tls_decrypt_done() could be executing in irq content, it is not possible to protect linked list addition operation using a lock. To fix the problem, we remove linked list addition operation from the irq context. We do tx_ready_list addition/removal operation from application context only and get rid of possible multiple access to the linked list. Before starting encryption on the record, we add it to the tail of tx_ready_list. To prevent tls_tx_records() from transmitting it, we mark the record with a new flag 'tx_ready' in 'struct tls_rec'. When record encryption gets completed, tls_encrypt_done() has to only update the 'tx_ready' flag to true & linked list add operation is not required. The changed logic brings some other side benefits. Since the records are always submitted in tls sequence number order for encryption, the tx_ready_list always remains sorted and addition of new records to it does not have to traverse the linked list. Lastly, we renamed tx_ready_list in 'struct tls_sw_context_tx' to 'tx_list'. This is because now, the some of the records at the tail are not ready to transmit. Fixes: a42055e8d2c3 ("net/tls: Add support for async encryption") Signed-off-by: Vakul Garg Signed-off-by: David S. Miller commit 094fe7392d6e0c8fa516dca451d4e005a2238e28 Merge: ea49c6f0baca fc6e8073f304 Author: David S. Miller Date: Mon Sep 24 12:21:33 2018 -0700 Merge branch 'few-NTF_ROUTER-related-updates' Roopa Prabhu says: ==================== few NTF_ROUTER related updates This series allows setting of NTF_ROUTER by an external entity (eg BGP E-VPN control plane). Also fixes missing netlink notification on neigh NTF_ROUTER flag changes. ==================== Signed-off-by: David S. Miller commit fc6e8073f304010605f834cb2eb8c07c46461c9d Author: Roopa Prabhu Date: Sat Sep 22 21:26:20 2018 -0700 neighbour: send netlink notification if NTF_ROUTER changes send netlink notification if neigh_update results in NTF_ROUTER change and if NEIGH_UPDATE_F_ISROUTER is on. Also move the NTF_ROUTER change function into a helper. Signed-off-by: Roopa Prabhu Signed-off-by: David S. Miller commit f7aa74e483e81c7a064ebc29e5deeb6b31cde412 Author: Roopa Prabhu Date: Sat Sep 22 21:26:19 2018 -0700 neighbour: allow admin to set NTF_ROUTER This patch allows admin setting of NTF_ROUTER flag on a neighbour entry. This enables external control plane (like bgp evpn) to manage neigh entries with NTF_ROUTER flag. Signed-off-by: Roopa Prabhu Signed-off-by: David S. Miller commit ea49c6f0bacaa4cf8980258584059de35ad54b8f Merge: 7ff2ea0bbfb1 28169abadb08 Author: David S. Miller Date: Mon Sep 24 12:18:43 2018 -0700 Merge branch 'net-sched-Add-hardware-specific-counters-to-TC-actions' Eelco Chaudron says: ==================== net/sched: Add hardware specific counters to TC actions Add hardware specific counters to TC actions which will be exported through the netlink API. This makes troubleshooting TC flower offload easier, as it possible to differentiate the packets being offloaded. v2 - Rebased on latest net-next ==================== Signed-off-by: Eelco Chaudron Signed-off-by: David S. Miller commit 28169abadb08333eb607621faa3a1dd7109e0d45 Author: Eelco Chaudron Date: Fri Sep 21 07:14:02 2018 -0400 net/sched: Add hardware specific counters to TC actions Add additional counters that will store the bytes/packets processed by hardware. These will be exported through the netlink interface for displaying by the iproute2 tc tool Signed-off-by: Eelco Chaudron Signed-off-by: David S. Miller commit 5e111210a44301304f9054e995bf33f69b6de76f Author: Eelco Chaudron Date: Fri Sep 21 07:13:54 2018 -0400 net/core: Add new basic hardware counter Add a new hardware specific basic counter, TCA_STATS_BASIC_HW. This can be used to count packets/bytes processed by hardware offload. Signed-off-by: Eelco Chaudron Signed-off-by: David S. Miller commit 23731eac984834e9dec240d5e836b4cea0d53d30 Author: Tony Lindgren Date: Mon Sep 24 12:17:09 2018 -0700 bus: ti-sysc: Detect devices on am335x when DEBUG is enabled When debug is enabled, we want to see what devices we're detecting to make things a bit easier for us. Signed-off-by: Tony Lindgren commit 1ba3069314cacee710cd113c43c6c122e259e45e Author: Tony Lindgren Date: Mon Sep 24 12:17:05 2018 -0700 bus: ti-sysc: Detect more devices on am473x for debugging When debug is enabled, we want to see what devices we're detecting to make things a bit easier for us. Many of these devices will also be available on am335x and dra7, and some just need updating the revision register mask. Signed-off-by: Tony Lindgren commit b82beef51817953eef1ad47e2e5e983e167a8863 Author: Tony Lindgren Date: Mon Sep 24 12:16:59 2018 -0700 bus: ti-sysc: Update revision masks to support am437x We need to detect few new devices to tag for noirq_suspend and pm_runtime_irq_safe to avoid causing regressions compared to legacy platform data booting. Let's update i2c, gpio, uart and wdt revision masks to detect them on am437x. Note that we can remove the second wdt entry with the updated mask. Note that we also have some uarts with a different revision register. Signed-off-by: Tony Lindgren commit 40d9f9124822013331367fb4ab59936c3ac944d6 Author: Tony Lindgren Date: Mon Sep 24 12:16:54 2018 -0700 bus: ti-sysc: Defer suspend as needed We don't care when we suspend but some our children do. In order to avoid tagging various modules with SYSC_QUIRK_RESOURCE_PROVIDER, let's do it automatically by tagging modules that are busy on suspend for noirq suspend. This way we can just do module detection on define DEBUG. Note that we still need to keep SYSC_QUIRK_LEGACY_IDLE flag around so the our legacy single-child devices that set pm_runtime_irq_safe() can manage the interconnect target module themselves. Signed-off-by: Tony Lindgren commit 65969e5cb249b765cee261c8f0458ec778b0c22f Author: Christoph Hellwig Date: Mon Sep 24 09:43:55 2018 +0200 block: don't include bug.h from bio.h No need to pull in the BUG() defintion. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit bceacbfa48bf132d8d88058904cf5859eeb4f3e6 Author: Christoph Hellwig Date: Mon Sep 24 09:43:54 2018 +0200 block: don't include io.h from bio.h Now that we don't need an override for BIOVEC_PHYS_MERGEABLE there is no need to drag this header in. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 6e768461c215eaf8912e6c23e40fdff1cd962aca Author: Christoph Hellwig Date: Mon Sep 24 09:43:53 2018 +0200 block: remove bvec_to_phys We only use it in biovec_phys_mergeable and a m68k paravirt driver, so just opencode it there. Also remove the pointless unsigned long cast for the offset in the opencoded instances. Signed-off-by: Christoph Hellwig Reviewed-by: Geert Uytterhoeven Signed-off-by: Jens Axboe commit 3dccdae54fe836a22cee9dc6df9fd1708ae075ce Author: Christoph Hellwig Date: Mon Sep 24 09:43:52 2018 +0200 block: merge BIOVEC_SEG_BOUNDARY into biovec_phys_mergeable These two checks should always be performed together, so merge them into a single helper. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 0e253391a970300fe4ae69d0c1d1ab494eb07508 Author: Christoph Hellwig Date: Mon Sep 24 09:43:51 2018 +0200 block: add a missing BIOVEC_SEG_BOUNDARY check in bio_add_pc_page The actual recaculation of segments in __blk_recalc_rq_segments will do this check, so there is no point in forcing it if we know it won't succeed. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 6a9f5f240adfdced863a098d34f8f05ca6ab9d5f Author: Christoph Hellwig Date: Mon Sep 24 09:43:50 2018 +0200 block: simplify BIOVEC_PHYS_MERGEABLE Turn the macro into an inline, move it to blk.h and simplify the arch hooks a bit. Also rename the function to biovec_phys_mergeable as there is no need to shout. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 27ca1d4ed04ea29dc77b47190a3cc82697023e76 Author: Christoph Hellwig Date: Mon Sep 24 09:43:49 2018 +0200 block: move req_gap_back_merge to blk.h No need to expose these helpers outside the block layer. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit e9907009cbfc0c93d987d5a8fdf3d6c3c7b89717 Author: Christoph Hellwig Date: Mon Sep 24 09:43:48 2018 +0200 block: move req_gap_{back,front}_merge to blk-merge.c Keep it close to the actual users instead of exposing the function to all drivers. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 43b729bfe9cf30ad11499a66e3b7bd300c716d44 Author: Christoph Hellwig Date: Mon Sep 24 09:43:47 2018 +0200 block: move integrity_req_gap_{back,front}_merge to blk.h No need to expose these to drivers. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 808c43b7c7f70360ed7b9e43e2cf980f388e71fa Author: Andrey Ignatov Date: Fri Sep 21 17:03:27 2018 -0700 cgroup: Simplify cgroup_ancestor Simplify cgroup_ancestor function. This is follow-up for commit 7723628101aa ("bpf: Introduce bpf_skb_ancestor_cgroup_id helper") Suggested-by: Tejun Heo Signed-off-by: Andrey Ignatov Signed-off-by: Tejun Heo commit 2352ae1306974528d11fb9c7dbf2cf91e0dd2c31 Author: Krzysztof Kozlowski Date: Fri Sep 21 20:30:14 2018 +0200 arm64: ARM: dts: exynos: Remove double SD card detect pin inversion on TM2 MMC host controller bindings and MMC core defines card detect pin as active low. Therefore there is no point to invert it twice. Signed-off-by: Krzysztof Kozlowski Tested-by: Marek Szyprowski commit 7ff2ea0bbfb17c54617608b5ff59460afa23f641 Merge: 12ba7e104552 4251ea5b8e54 Author: David S. Miller Date: Mon Sep 24 10:01:10 2018 -0700 Merge branch 'mvpp2-Add-txq-to-CPU-mapping' Maxime Chevallier says: ==================== net: mvpp2: Add txq to CPU mapping This short series adds XPS support to the mvpp2 driver, by mapping txqs and CPUs. This comes with a patch using round-robin scheduling for the HW to pick the next txq to transmit from, instead of the default fixed-priority scheduling. ==================== Signed-off-by: David S. Miller commit 4251ea5b8e54ab05eabeef8ff2ecd030a10120ad Author: Maxime Chevallier Date: Mon Sep 24 11:11:06 2018 +0200 net: mvpp2: use round-robin scheduling for TX queues on the same CPU This commit allows each TXQ to be picked in a round-robin fashion by the PPv2 transmit scheduling mechanism. This is opposed to the default behaviour that prioritizes the highest numbered queues. Suggested-by: Yan Markman Signed-off-by: Maxime Chevallier Signed-off-by: David S. Miller commit 0d283ab5b4fdbcd6bde4505863010b6008b6f048 Author: Maxime Chevallier Date: Mon Sep 24 11:11:05 2018 +0200 net: mvpp2: support XPS by mapping TX queues to CPUs Since the PPv2 controller has multiple TX queues, we can spread traffic by assining TX queues to CPUs, allowing to use XPS to balance egress traffic between CPUs. Suggested-by : Yan Markman Signed-off-by: Maxime Chevallier Signed-off-by: David S. Miller commit ff1e37c6809daab75f7b2dea1efe69330e8eb65b Author: Marek Szyprowski Date: Fri Sep 14 08:55:03 2018 +0200 ARM: dts: exynos: Correct audio subsystem parent clock on Peach Chromebooks The proper parent clock for audio subsystem for Exynos5420 and Exynos5800 SoCs is CLK_MAU_EPLL. This fixes following warning: clk: failed to reparent mout_audss to fout_epll: -22 Fixes: ed7d1307077e: ARM: dts: exynos: Enable HDMI audio support on Peach Pit Fixes: bae0f445c1e7: ARM: dts: exynos: Enable HDMI audio support on Peach Pi Signed-off-by: Marek Szyprowski Signed-off-by: Krzysztof Kozlowski commit f9c32db12e2439ec9553a1a4c43d0ee308387790 Author: Laurent Pinchart Date: Mon Aug 20 17:12:49 2018 +0300 dt-bindings: display: renesas: lvds: Document r8a77990 bindings The E3 (r8a77990) supports two LVDS channels. Extend the binding to support them. Signed-off-by: Laurent Pinchart Reviewed-by: Jacopo Mondi Reviewed-by: Rob Herring Reviewed-by: Ulrich Hecht Reviewed-by: Kieran Bingham commit f48097d294d6f76a38bf1a1cb579aa99ede44297 Author: Laurent Pinchart Date: Mon Aug 20 17:07:25 2018 +0300 dt-bindings: display: renesas: du: Document r8a77990 bindings Document the E3 (r8a77990) SoC in the R-Car DU bindings. Signed-off-by: Laurent Pinchart Reviewed-by: Jacopo Mondi Reviewed-by: Rob Herring Reviewed-by: Ulrich Hecht commit 89969a842e72b1b653140a4bbddd927b242736d0 Author: Paul Elder Date: Sun Sep 2 19:46:03 2018 -0400 usb: gadget: uvc: configfs: Sort frame intervals upon writing There is an issue where the host is unable to tell the gadget what frame rate it wants if the dwFrameIntervals in the interface descriptors are not in ascending order. This means that when instantiating a uvc gadget via configfs the user must make sure the dwFrameIntervals are in ascending order. Instead of silently failing the breaking of this rule, we sort the dwFrameIntervals upon writing to configfs. Signed-off-by: Paul Elder Reviewed-by: Laurent Pinchart commit cb2200f7af8341aaf0c6abd7ba37e4c667c41639 Author: Joel Pepper Date: Tue May 29 21:02:12 2018 +0200 usb: gadget: uvc: configfs: Prevent format changes after linking header While checks are in place to avoid attributes and children of a format being manipulated after the format is linked into the streaming header, the linked flag was never actually set, invalidating the protections. Update the flag as appropriate in the header link calls. Signed-off-by: Joel Pepper Reviewed-by: Kieran Bingham Signed-off-by: Laurent Pinchart commit b206548be6459ea5ffa82b9f1175915b225a89a1 Author: Joel Pepper Date: Tue May 29 21:02:13 2018 +0200 usb: gadget: uvc: configfs: Add bFrameIndex attributes - Add bFrameIndex as a UVCG_FRAME_ATTR_RO for each frame size. - Automatically assign ascending bFrameIndex to each frame in a format. Before all "bFrameindex" attributes were set to "1" with no way to configure the gadget otherwise. This resulted in the host always negotiating for bFrameIndex 1 (i.e. the first frame size of the gadget). After the negotiation the host driver will set the user or application selected frame size, while the gadget is actually set to the first frame size. Now, when the containing format is linked into the streaming header, iterate over all child frame descriptors and assign ascending indices. The automatically assigned indices can be read from the new read only bFrameIndex configfs attribute in each frame descriptor item. Signed-off-by: Joel Pepper [Simplified documentation, renamed function, blank space update] Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham commit 61ff10e0ea0cb39c737eab7e4fc5f0ae4d0fff33 Author: Laurent Pinchart Date: Sun May 27 00:51:57 2018 +0300 usb: gadget: uvc: configfs: Add bFormatIndex attributes The UVC format description are numbered using the descriptor's bFormatIndex field. The index is used in UVC requests, and is thus needed to handle requests in userspace. Make it dynamically discoverable by exposing it in a bFormatIndex configfs attribute of the uncompressed and mjpeg format config items. The bFormatIndex value exposed through the attribute is stored in the config item private data. However, that value is never set: the driver instead computes the bFormatIndex value when linking the stream class header in the configfs hierarchy and stores it directly in the class descriptors in a separate structure. In order to expose the value through the configfs attribute, store it in the config item private data as well. This results in a small code simplification. Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham commit bf71544883a1ccb20021eb5139475496dbd8abd9 Author: Laurent Pinchart Date: Wed May 23 18:47:56 2018 +0300 usb: gadget: uvc: configfs: Add interface number attributes The video control and video streaming interface numbers are needed in the UVC gadget userspace stack to reply to UVC requests. They are hardcoded to fixed values at the moment, preventing configurations with multiple functions. To fix this, make them dynamically discoverable by userspace through read-only configfs attributes in /control/bInterfaceNumber and /streaming/bInterfaceNumber respectively. Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham commit efbf0af70b4f7ee6ed1533ed0d905255c0545e08 Author: Laurent Pinchart Date: Thu May 24 17:49:34 2018 +0300 usb: gadget: uvc: configfs: Allocate groups dynamically The UVC configfs implementation creates all groups as global static variables. This prevents creation of multiple UVC function instances, as they would all require their own configfs group instances. Fix this by allocating all groups dynamically. To avoid duplicating code around, extend the config_item_type structure with group name and children, and implement helper functions to create children automatically for most groups. Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham commit 86f3daed59bceb4fa7981d85e89f63ebbae1d561 Author: Laurent Pinchart Date: Thu Aug 2 00:14:00 2018 +0300 usb: gadget: uvc: configfs: Drop leaked references to config items Some of the .allow_link() and .drop_link() operations implementations call config_group_find_item() and then leak the reference to the returned item. Fix this by dropping those references where needed. Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham commit fae210bb5bfbd29118e18881f7108c6bd59293b9 Author: Biju Das Date: Fri Sep 21 16:52:58 2018 +0100 dt-bindings: apmu: Document r8a7744 support Document APMU and SMP enable method for RZ/G1N (R8A7744) SoC. Signed-off-by: Biju Das Reviewed-by: Fabrizio Castro Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit 40ad192f9e88d1376320399e49b9d978b56a9477 Author: Chris Packham Date: Fri Sep 7 12:59:25 2018 +1200 dt-bindings: marvell,prestera: Add common compatible string Add "marvell,prestera" as a compatible string so that drivers can be written to account for any prestera variant without needing to specialise to the more specific values. Signed-off-by: Chris Packham Reviewed-by: Rob Herring Signed-off-by: Gregory CLEMENT commit 065877023c1daa83a5ba62b681f71238d2dbbb73 Author: Thomas Petazzoni Date: Wed Aug 29 10:15:09 2018 +0200 MAINTAINERS: replace free-electrons.com by bootlin.com for Thomas Petazzoni Free Electrons is now called Bootlin, and my e-mail address was changed as well, so this commit updates the entries in the MAINTAINERS file accordingly. Signed-off-by: Thomas Petazzoni Signed-off-by: Gregory CLEMENT commit 3972863aad8919fd8ec5527ea560abed285edd40 Author: Chris Packham Date: Thu Jul 26 15:48:56 2018 +1200 ARM: mvebu: use dt_fixup to provide fallback for enable-method We need to maintain backwards compatibility with device trees that don't define an enable method. At the same time we want the device tree to be able to specify an enable-method and have it stick. Previously by having smp assigned in the DT_MACHINE definition this would be picked up by setup_arch() and override whatever arm_dt_init_cpu_maps() had configured. Now we move the initial assignment of default smp_ops to a dt_fixup and let arm_dt_init_cpu_maps() override that if the device tree defines an enable-method. [olof@lixom.net: Wrap set_smp_ops() in CONFIG_SMP.] Signed-off-by: Chris Packham Tested-by: Gregory CLEMENT (on AX3) Signed-off-by: Gregory CLEMENT commit 50e761516f2b8c0cdeb31a8c6ca1b4ef98cd13f1 Author: Paul Kocialkowski Date: Thu Sep 13 10:51:55 2018 -0400 media: platform: Add Cedrus VPU decoder driver This introduces the Cedrus VPU driver that supports the VPU found in Allwinner SoCs, also known as Video Engine. It is implemented through a V4L2 M2M decoder device and a media device (used for media requests). So far, it only supports MPEG-2 decoding. Since this VPU is stateless, synchronization with media requests is required in order to ensure consistency between frame headers that contain metadata about the frame to process and the raw slice data that is used to generate the frame. This driver was made possible thanks to the long-standing effort carried out by the linux-sunxi community in the interest of reverse engineering, documenting and implementing support for the Allwinner VPU. Signed-off-by: Paul Kocialkowski Acked-by: Maxime Ripard Signed-off-by: Hans Verkuil [hans.verkuil@cisco.com: dropped obsolete MEDIA_REQUEST_API from Kconfig] Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit a20625fb03df9d84378b63540c2ad6b34703af33 Author: Paul Kocialkowski Date: Thu Sep 13 10:51:54 2018 -0400 media: dt-bindings: media: Document bindings for the Cedrus VPU driver This adds a device-tree binding document that specifies the properties used by the Cedrus VPU driver, as well as examples. Signed-off-by: Paul Kocialkowski Reviewed-by: Rob Herring Signed-off-by: Maxime Ripard Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 36cf35b7864002c2601e4bda4d78d5622ad92544 Author: Paul Kocialkowski Date: Thu Sep 13 10:51:53 2018 -0400 media: v4l: Add definition for the Sunxi tiled NV12 format This introduces support for the Sunxi tiled NV12 format, where each component of the YUV frame is divided into macroblocks. Hence, the size of each plane requires specific alignment. The pixels inside each macroblock are coded in linear order (line after line from top to bottom). This tiled NV12 format is used by the video engine on Allwinner platforms: it is the default format for decoded frames (and the only one available in the oldest supported platforms). Signed-off-by: Paul Kocialkowski Signed-off-by: Maxime Ripard Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit c27bb30e7b6d385c5bff26406089377d678f1a1d Author: Paul Kocialkowski Date: Thu Sep 13 10:51:52 2018 -0400 media: v4l: Add definitions for MPEG-2 slice format and metadata Stateless video decoding engines require both the MPEG-2 slices and associated metadata from the video stream in order to decode frames. This introduces definitions for a new pixel format, describing buffers with MPEG-2 slice data, as well as control structure sfor passing the frame metadata to drivers. This is based on work from both Florent Revest and Hugues Fruchet. Signed-off-by: Paul Kocialkowski Signed-off-by: Maxime Ripard Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 515c5a7333be87a7d01ab267d94626a454a7e794 Author: Paul Kocialkowski Date: Thu Sep 13 10:51:51 2018 -0400 media: videobuf2-core: Rework and rename helper for request buffer count The helper indicating whether buffers are associated with the request is reworked and renamed to return the number of associated buffer objects. This is useful for drivers that need to check how many buffers are in the request to validate it. Existing users of the helper don't need particular adaptation since the meaning of zero/non-zero remains consistent. Signed-off-by: Paul Kocialkowski Signed-off-by: Maxime Ripard Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 7390ba4397c1ed069de3b7f88c3f3821d648a582 Author: Hans Verkuil Date: Fri Sep 14 05:56:28 2018 -0400 media: v4l2-ctrls.c: initialize an error return code with zero Fix this smatch error: drivers/media/v4l2-core/v4l2-ctrls.c:2971 v4l2_ctrl_request_clone() error: uninitialized symbol 'err'. Signed-off-by: Hans Verkuil Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 9e39b43612e5cc496b02784a8560ded1ebb9e3af Author: Hans Verkuil Date: Fri Sep 14 05:57:51 2018 -0400 media: v4l2-compat-ioctl32.c: add missing documentation for a field Fix this sparse warning: drivers/media/v4l2-core/v4l2-compat-ioctl32.c:256: warning: Function parameter or member 'capabilities' not described in 'v4l2_create_buffers32' Signed-off-by: Hans Verkuil Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit a2df0984e73fd9e1dad5fc3f1c307ec3de395e30 Author: Heiko Stuebner Date: Thu Sep 20 11:34:36 2018 +0200 ARM: dts: rockchip: explicitly set vcc_sd0 pin to gpio on rk3188-radxarock It is good practice to make the setting of gpio-pinctrls explicitly in the devicetree, and in this case even necessary. Rockchip boards start with iomux settings set to gpio for most pins and while the linux pinctrl driver also implicitly sets the gpio function if a pin is requested as gpio that is not necessarily true for other drivers. The issue in question stems from uboot, where the sdmmc_pwr pin is set to function 1 (sdmmc-power) by the bootrom when reading the 1st-stage loader. The regulator controlled by the pin is active-low though, so when the dwmmc hw-block sets its enabled bit, it actually disables the regulator. By changing the pin back to gpio we fix that behaviour. Signed-off-by: Heiko Stuebner commit 2ed30cfcf866f657349bf9f54a017a957cd98378 Author: Heiko Stuebner Date: Thu Aug 2 13:36:41 2018 +0200 arm64: dts: rockchip: enable dwc2-based otg controller on px30-evb Enable the newly added controller on the px30 evaluation board. Signed-off-by: Heiko Stuebner commit bb5981333f302f81fe520ca2b5f30f73f6bdaff1 Author: Heiko Stuebner Date: Thu Aug 2 13:35:37 2018 +0200 arm64: dts: rockchip: add dwc2 otg controller on px30 Add the node for the dwc2-based otg controller on the px30 soc. Signed-off-by: Heiko Stuebner commit 6c78ca379c2edfe71c97c1abbb2716298263b9c7 Author: Liang Chen Date: Wed Aug 1 16:45:13 2018 +0800 dt-bindings: usb: dwc2: add description for px30 This patch adds the compatible of dwc2 for PX30 SoCs. Signed-off-by: Liang Chen Acked-by: Rob Herring Signed-off-by: Heiko Stuebner commit 4158757395b300b6eb308fc20b96d1d231484413 Author: Nathan Chancellor Date: Sat Sep 15 02:16:15 2018 -0400 media: davinci: Fix implicit enum conversion warning Clang warns when one enumerated type is implicitly converted to another. drivers/media/platform/davinci/vpbe_display.c:524:24: warning: implicit conversion from enumeration type 'enum osd_v_exp_ratio' to different enumeration type 'enum osd_h_exp_ratio' [-Wenum-conversion] layer_info->h_exp = V_EXP_6_OVER_5; ~ ^~~~~~~~~~~~~~ 1 warning generated. This appears to be a copy and paste error judging from the couple of lines directly above this statement and the way that height is handled in the if block above this one. Reported-by: Nick Desaulniers Signed-off-by: Nathan Chancellor Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 502fac1ef3498e345086e75ff2442fda88c57b6c Author: Nathan Chancellor Date: Sat Sep 15 02:06:13 2018 -0400 media: bt8xx: Remove unnecessary self-assignment Clang warns when a variable is assigned to itself. drivers/media/pci/bt8xx/bttv-driver.c:2043:13: warning: explicitly assigning value of variable of type '__s32' (aka 'int') to itself [-Wself-assign] min_height = min_height; ~~~~~~~~~~ ^ ~~~~~~~~~~ 1 warning generated. There doesn't appear to be any good reason for this and this statement was added in commit e5bd0260e7d3 ("V4L/DVB (5077): Bttv cropping support") back in 2007. Just remove it. Reported-by: Nick Desaulniers Signed-off-by: Nathan Chancellor Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit ae5a8ca834f9dd0797a2ceb210e71d194431990c Author: Niklas Söderlund Date: Wed Sep 12 20:07:38 2018 -0400 media: v4l2-common: fix typo in documentation for v4l_bound_align_image() Signed-off-by: Niklas Söderlund Acked-by: Sakari Ailus Reviewed-by: Simon Horman Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit c5d59528e24ad22500347b199d52b9368e686a42 Author: Nicholas Mc Guire Date: Sun Sep 9 12:02:32 2018 -0400 media: pci: cx23885: handle adding to list failure altera_hw_filt_init() which calls append_internal() assumes that the node was successfully linked in while in fact it can silently fail. So the call-site needs to set return to -ENOMEM on append_internal() returning NULL and exit through the err path. Fixes: 349bcf02e361 ("[media] Altera FPGA based CI driver module") Signed-off-by: Nicholas Mc Guire Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit f347596f2bf114a3af3d80201c6e6bef538d884f Author: Brad Love Date: Thu Sep 6 17:07:49 2018 -0400 media: au0828: Fix incorrect error messages Correcting red herring error messages. Where appropriate, replaces au0282_dev_register with: - au0828_analog_register - au0828_dvb_register Signed-off-by: Brad Love Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 4add7104919f9e94e0db03e234caeadbfcc02ea9 Author: Brad Love Date: Thu Sep 6 17:07:48 2018 -0400 media: au0828: cannot kfree dev before usb disconnect If au0828_analog_register fails, the dev is kfree'd and then flow jumps to done, which can call au0828_usb_disconnect. Since all USB error codes are negative, au0828_usb_disconnect will be called. The problem is au0828_usb_disconnect uses dev, if dev is NULL then there is immediate oops encountered. [ 7.454307] au0828: au0828_usb_probe() au0282_dev_register failed to register on V4L2 [ 7.454323] BUG: unable to handle kernel NULL pointer dereference at 0000000000000050 [ 7.454421] PGD 0 P4D 0 [ 7.454457] Oops: 0002 [#1] SMP PTI [ 7.454500] CPU: 1 PID: 262 Comm: systemd-udevd Tainted: P O 4.18.3 #1 [ 7.454584] Hardware name: Google Panther/Panther, BIOS MattDevo 04/27/2015 [ 7.454670] RIP: 0010:_raw_spin_lock_irqsave+0x2c/0x50 [ 7.454725] Code: 44 00 00 55 48 89 e5 41 54 53 48 89 fb 9c 58 0f 1f 44 00 00 49 89 c4 fa 66 0f 1f 44 00 00 e8 db 23 1b ff 31 c0 ba 01 00 00 00 0f b1 13 85 c0 75 08 4c 89 e0 5b 41 5c 5d c3 89 c6 48 89 df e8 [ 7.455004] RSP: 0018:ffff9130f53ef988 EFLAGS: 00010046 [ 7.455063] RAX: 0000000000000000 RBX: 0000000000000050 RCX: 0000000000000000 [ 7.455139] RDX: 0000000000000001 RSI: 0000000000000003 RDI: 0000000000000050 [ 7.455216] RBP: ffff9130f53ef998 R08: 0000000000000018 R09: 0000000000000090 [ 7.455292] R10: ffffed4cc53cb000 R11: ffffed4cc53cb108 R12: 0000000000000082 [ 7.455369] R13: ffff9130cf2c6188 R14: 0000000000000000 R15: 0000000000000018 [ 7.455447] FS: 00007f2ff8514cc0(0000) GS:ffff9130fcb00000(0000) knlGS:0000000000000000 [ 7.455535] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 7.455597] CR2: 0000000000000050 CR3: 00000001753f0002 CR4: 00000000000606a0 [ 7.455675] Call Trace: [ 7.455713] __wake_up_common_lock+0x65/0xc0 [ 7.455764] __wake_up+0x13/0x20 [ 7.455808] ir_lirc_unregister+0x57/0xe0 [rc_core] [ 7.455865] rc_unregister_device+0xa0/0xc0 [rc_core] [ 7.455935] au0828_rc_unregister+0x25/0x40 [au0828] [ 7.455999] au0828_usb_disconnect+0x33/0x80 [au0828] [ 7.456064] au0828_usb_probe.cold.16+0x8d/0x2aa [au0828] [ 7.456130] usb_probe_interface+0xf1/0x300 [ 7.456184] driver_probe_device+0x2e3/0x460 [ 7.456235] __driver_attach+0xe4/0x110 [ 7.456282] ? driver_probe_device+0x460/0x460 [ 7.456335] bus_for_each_dev+0x74/0xb0 [ 7.456385] ? kmem_cache_alloc_trace+0x15d/0x1d0 [ 7.456441] driver_attach+0x1e/0x20 [ 7.456485] bus_add_driver+0x159/0x230 [ 7.456532] driver_register+0x70/0xc0 [ 7.456578] usb_register_driver+0x7f/0x140 [ 7.456626] ? 0xffffffffc0474000 [ 7.456674] au0828_init+0xbc/0x1000 [au0828] [ 7.456725] do_one_initcall+0x4a/0x1c9 [ 7.456771] ? _cond_resched+0x19/0x30 [ 7.456817] ? kmem_cache_alloc_trace+0x15d/0x1d0 [ 7.456873] do_init_module+0x60/0x210 [ 7.456918] load_module+0x221b/0x2710 [ 7.456966] ? vfs_read+0xf5/0x120 [ 7.457010] __do_sys_finit_module+0xbd/0x120 [ 7.457061] ? __do_sys_finit_module+0xbd/0x120 [ 7.457115] __x64_sys_finit_module+0x1a/0x20 [ 7.457166] do_syscall_64+0x5b/0x110 [ 7.457210] entry_SYSCALL_64_after_hwframe+0x49/0xbe Signed-off-by: Brad Love Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 1cafbb867c6905d481c654291f2dc79d163a16f5 Author: Gustavo A. R. Silva Date: Sat Aug 4 20:12:57 2018 -0400 media: venus: helpers: use true and false for boolean values Return statements in functions returning bool should use true or false instead of an integer value. This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 1f32061e843205f6fe8404d5100d5adcec334e75 Author: Lucas Stach Date: Wed Aug 1 10:18:04 2018 -0400 media: coda: don't overwrite h.264 profile_idc on decoder instance On a decoder instance, after the profile has been parsed from the stream __v4l2_ctrl_s_ctrl() is called to notify userspace about changes in the read-only profile control. This ends up calling back into the CODA driver where a missing check on the s_ctrl caused the profile information that has just been parsed from the stream to be overwritten with the default baseline profile. Later on the driver fails to enable frame reordering, based on the wrong profile information. Fixes: 347de126d1da (media: coda: add read-only h.264 decoder profile/level controls) Signed-off-by: Lucas Stach Reviewed-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 47022003f94d1eecf49b9b7a7804814faaea9f08 Author: Dmitry Osipenko Date: Fri Sep 21 14:42:41 2018 +0300 drm/tegra: dpaux: Use the correct definition for pad modes Some of definitions in the code changed the meaning, unfortunately one place missed the change. Signed-off-by: Dmitry Osipenko Acked-by: Jon Hunter Signed-off-by: Thierry Reding commit 8ee92410e5bf29b7a2fcaf53ca241554c4bae7a9 Author: Johan Fjeldtvedt Date: Mon Sep 17 04:36:47 2018 -0400 media: vb2: check for sane values from queue_setup Warn and return error from the reqbufs ioctl when driver sets 0 number of planes or 0 as plane sizes, as these values don't make any sense. Checking this here stops obviously wrong values from propagating further and causing various problems that are hard to trace back to either of these values being 0. Signed-off-by: Johan Fjeldtvedt Acked-by: Sakari Ailus Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 58513d48494d4153cc1df81aa7dfb0ec844731f8 Author: zhong jiang Date: Sun Sep 16 09:16:51 2018 -0400 media: platform: remove redundant null pointer check before of_node_put of_node_put has taken the null pinter check into account. So it is safe to remove the duplicated check before of_node_put. Signed-off-by: zhong jiang Reviewed-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 94a426c56449e5dd18fe3bfb52077856d063e275 Author: zhong jiang Date: Sun Sep 16 09:04:49 2018 -0400 media: coda: remove redundant null pointer check before of_node_put of_node_put has taken the null pointer check into account. So it is safe to remove the duplicated check before of_node_put. Signed-off-by: zhong jiang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit a58c37978cf02f6d35d05ee4e9288cb8455f1401 Author: Hans Verkuil Date: Thu Sep 13 07:47:28 2018 -0400 media: media colorspaces*.rst: rename AdobeRGB to opRGB Drop all Adobe references and use the official opRGB standard instead. Signed-off-by: Hans Verkuil Cc: stable@vger.kernel.org Acked-by: Daniel Vetter Signed-off-by: Mauro Carvalho Chehab commit 463659a08d7999d5461fa45b35b17686189a70ca Author: Hans Verkuil Date: Thu Sep 13 07:47:29 2018 -0400 media: hdmi.h: rename ADOBE_RGB to OPRGB and ADOBE_YCC to OPYCC These names have been renamed in the CTA-861 standard due to trademark issues. Replace them here as well so they are in sync with the standard. Signed-off-by: Hans Verkuil Cc: stable@vger.kernel.org Acked-by: Daniel Vetter Signed-off-by: Mauro Carvalho Chehab commit db0340182444612bcadb98bdec22f651aa42266c Author: Hans Verkuil Date: Fri Sep 14 04:58:03 2018 -0400 media: replace ADOBERGB by OPRGB The CTA-861 standards have been updated to refer to opRGB instead of AdobeRGB. The official standard is in fact named opRGB, so switch to that. The two old defines referring to ADOBERGB in the public API are put under #ifndef __KERNEL__ and a comment mentions that they are deprecated. Signed-off-by: Hans Verkuil Cc: stable@vger.kernel.org Acked-by: Daniel Vetter Signed-off-by: Mauro Carvalho Chehab commit b4fbf423cef96badb723f24db057e04e8b19d105 Author: Philipp Zabel Date: Fri Sep 14 03:10:56 2018 -0400 media: imx-pxp: fix compilation on i386 or x86_64 Include the missing interrupt.h header to fix compilation on i386 or x86_64: ../drivers/media/platform/imx-pxp.c:988:1: error: unknown type name 'irqreturn_t' static irqreturn_t pxp_irq_handler(int irq, void *dev_id) ^ ../drivers/media/platform/imx-pxp.c: In function 'pxp_irq_handler': ../drivers/media/platform/imx-pxp.c:1012:9: error: 'IRQ_HANDLED' undeclared (first use in this function) return IRQ_HANDLED; ^ ../drivers/media/platform/imx-pxp.c:1012:9: note: each undeclared identifier is reported only once for each function it appears in ../drivers/media/platform/imx-pxp.c: In function 'pxp_probe': ../drivers/media/platform/imx-pxp.c:1660:2: error: implicit declaration of function 'devm_request_threaded_irq' [-Werror=implicit-function-declaration] ret = devm_request_threaded_irq(&pdev->dev, irq, NULL, pxp_irq_handler, ^ ../drivers/media/platform/imx-pxp.c:1661:4: error: 'IRQF_ONESHOT' undeclared (first use in this function) IRQF_ONESHOT, dev_name(&pdev->dev), dev); Fixes: 51abcf7fdb70 ("media: imx-pxp: add i.MX Pixel Pipeline driver") Reported-by: Randy Dunlap Signed-off-by: Philipp Zabel Acked-by: Randy Dunlap Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit e5c413ed9fef975bd90a9dd2dffddbfcc82167af Author: Ezequiel Garcia Date: Mon Sep 10 11:21:54 2018 -0400 media: vicodec: Drop unused job_abort() The vicodec does not use the aborting field. In fact, this driver can't really cancel any work, since it performs all the work in device_run(). Signed-off-by: Ezequiel Garcia Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit f5b4a83936288d5822aa491ae9ea3409d1c9a45d Author: Ezequiel Garcia Date: Mon Sep 10 11:21:53 2018 -0400 media: vicodec: Drop unneeded symbol dependency The vicodec doesn't use the Subdev API, so drop the dependency. Signed-off-by: Ezequiel Garcia Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit b09d8b25f4d833a79c560b050db386ea9d87a288 Author: Hans Verkuil Date: Mon Sep 10 11:00:40 2018 -0400 media: vicodec: set state->info before calling the encode/decode funcs state->info was NULL since I completely forgot to set state->info. Oops. Signed-off-by: Hans Verkuil Reported-by: Ezequiel Garcia Tested-by: Ezequiel Garcia [hans.verkuil@cisco.com: re-add q_out which was removed by commit 703fe34bac] Signed-off-by: Mauro Carvalho Chehab commit d61b3b41014df01ef96a07a973ea56f55abfbe74 Author: Hans Verkuil Date: Mon Sep 10 11:00:39 2018 -0400 media: vicodec: check for valid format in v4l2_fwht_en/decode These functions did not return an error if state->info was NULL or an unsupported pixelformat was selected (should not happen, but just to be on the safe side). Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 0113c50f425f953f2abe56d228c52622c859c4ad Author: Alexandre GRIVEAUX Date: Sun Sep 2 08:36:40 2018 -0400 media: saa7134: add P7131_4871 analog inputs The saa7134 Tiger board has a front panel connector at the back (labeled panel 2 on the PCB), with S-VIDEO, composite and audio. This patch adds those inputs. Signed-off-by: Alexandre GRIVEAUX Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 8d11eb847de7d89c2754988c944d51a4f63e219b Author: Jia-Ju Bai Date: Sat Sep 1 07:44:09 2018 -0400 media: pci: ivtv: Fix a sleep-in-atomic-context bug in ivtv_yuv_init() The driver may sleep in a interrupt handler. The function call paths (from bottom to top) in Linux-4.16 are: [FUNC] kzalloc(GFP_KERNEL) drivers/media/pci/ivtv/ivtv-yuv.c, 938: kzalloc in ivtv_yuv_init drivers/media/pci/ivtv/ivtv-yuv.c, 960: ivtv_yuv_init in ivtv_yuv_next_free drivers/media/pci/ivtv/ivtv-yuv.c, 1126: ivtv_yuv_next_free in ivtv_yuv_setup_stream_frame drivers/media/pci/ivtv/ivtv-irq.c, 827: ivtv_yuv_setup_stream_frame in ivtv_irq_dec_data_req drivers/media/pci/ivtv/ivtv-irq.c, 1013: ivtv_irq_dec_data_req in ivtv_irq_handler To fix this bug, GFP_KERNEL is replaced with GFP_ATOMIC. This bug is found by my static analysis tool DSAC. Signed-off-by: Jia-Ju Bai Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 8d1a4817cce1b15b4909f0e324a4f5af5952da67 Author: Arnd Bergmann Date: Mon Aug 13 17:32:17 2018 -0400 media: imx: work around false-positive warning, again A warning that I thought to be solved by a previous patch of mine has resurfaced with gcc-8: media/imx/imx-media-csi.c: In function 'csi_link_validate': media/imx/imx-media-csi.c:1025:20: error: 'upstream_ep' may be used uninitialized in this function [-Werror=maybe-uninitialized] media/imx/imx-media-csi.c:1026:24: error: 'upstream_ep.bus_type' may be used uninitialized in this function [-Werror=maybe-uninitialized] media/imx/imx-media-csi.c:127:19: error: 'upstream_ep.bus.parallel.bus_width' may be used uninitialized in this function [-Werror=maybe-uninitialized] media/imx/imx-media-csi.c: In function 'csi_enum_mbus_code': media/imx/imx-media-csi.c:132:9: error: '*((void *)&upstream_ep+12)' may be used uninitialized in this function [-Werror=maybe-uninitialized] media/imx/imx-media-csi.c:132:48: error: 'upstream_ep.bus.parallel.bus_width' may be used uninitialized in this function [-Werror=maybe-uninitialized] I spent some more time digging in this time, and think I have a better fix, bailing out of the function that either initializes or errors out here, which simplifies the code enough for gcc to figure out what is going on. The earlier partial workaround can be removed now, as the new workaround is better. Fixes: 890f27693f2a ("media: imx: work around false-positive warning") Signed-off-by: Arnd Bergmann Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit f94d463f1b7f83d465ed77521821583dbcdaa3c5 Author: Hans Verkuil Date: Thu Sep 13 08:00:39 2018 -0400 media: cec: remove cec-edid.c Move cec_get_edid_phys_addr() to cec-adap.c. It's not worth keeping a separate source for this. Signed-off-by: Hans Verkuil Cc: # for v4.17 and up Signed-off-by: Mauro Carvalho Chehab commit 9cfd2753f8f3923f89cbb15f940f3aa0e7202d3e Author: Hans Verkuil Date: Thu Sep 13 03:40:56 2018 -0400 media: cec/v4l2: move V4L2 specific CEC functions to V4L2 Several CEC functions are actually specific for use with receivers, i.e. they should be part of the V4L2 subsystem, not CEC. These functions deal with validating and modifying EDIDs for (HDMI) receivers, and they do not actually have anything to do with the CEC subsystem and whether or not CEC is enabled. The problem was that if the CEC_CORE config option was not set, then these functions would become stubs, but that's not right: they should always be valid. So replace the cec_ prefix by v4l2_ and move them to v4l2-dv-timings.c. Update all drivers that call these accordingly. Signed-off-by: Hans Verkuil Reported-by: Lars-Peter Clausen Cc: # for v4.17 and up Signed-off-by: Mauro Carvalho Chehab commit e81bff39489a06384822bb38ce7a59f9e365bbe9 Author: Hans Verkuil Date: Thu Sep 13 03:36:29 2018 -0400 media: cec: integrate cec_validate_phys_addr() in cec-api.c The cec_phys_addr_validate() function will be moved to V4L2, so use a simplified variant of that function in cec-api.c. cec now no longer calls cec_phys_addr_validate() and it can be safely moved to V4L2. Signed-off-by: Hans Verkuil Cc: # for v4.17 and up Signed-off-by: Mauro Carvalho Chehab commit b915bf575d5b7774d0f22d57d6c143e07dcaade2 Author: Hans Verkuil Date: Thu Sep 13 03:25:59 2018 -0400 media: cec: make cec_get_edid_spa_location() an inline function This function is needed by both V4L2 and CEC, so move this to cec.h as a static inline since there are no obvious shared modules between the two subsystems. This patch, together with the following ones, fixes a dependency bug: if CEC_CORE is disabled, then building adv7604 (and other HDMI receivers) will fail because an essential function is now stubbed out. Signed-off-by: Hans Verkuil Cc: # for v4.17 and up Signed-off-by: Mauro Carvalho Chehab commit 5284521a290efd5418de79c205b612537ab2b12d Author: Tony Lindgren Date: Thu Sep 20 12:35:32 2018 -0700 gpio: omap: Get rid of pm_runtime_irq_safe() If a gpio instance has any GPIO bits requested we do a pm_runtime_get() on the device. Now with cpu_pm handling the deeper SoC idle state quirks, let's just remove pm_runtime_irq_safe() call and add a warning in case we ever happen to encounter it. Cc: Aaro Koskinen Cc: Keerthy Cc: Ladislav Michl Cc: Tero Kristo Signed-off-by: Tony Lindgren Acked-by: Grygorii Strashko Signed-off-by: Linus Walleij commit b764a5863fd834836e65e258303e3a4a81c20f38 Author: Tony Lindgren Date: Thu Sep 20 12:35:31 2018 -0700 gpio: omap: Remove custom PM calls and use cpu_pm instead For a long time the gpio-omap custom PM calls have been annoying me so let's replace them with cpu_pm instead. This will enable GPIO PM for deeper idle states on omap4. And we can handle GPIO PM for omap2/3/4 in the same way. Note that with this patch we are also slightly changing GPIO PM to be less aggressive for omap3 and only will idle GPIO when PER context may be lost. For omap2, we don't need to save context and don't want to remove any triggering so let's add a quirk flag for that. Let's do this all in a single patch to avoid a situation where old custom calls still are used with new code. Cc: Aaro Koskinen Cc: Keerthy Cc: Ladislav Michl Cc: Tero Kristo Signed-off-by: Tony Lindgren Acked-by: Grygorii Strashko Signed-off-by: Linus Walleij commit ec0daae685b20f3bee196719f64d79d1cc40457e Author: Tony Lindgren Date: Thu Sep 20 12:35:30 2018 -0700 gpio: omap: Add level wakeup handling for omap4 based SoCs I noticed that unlike omap2 and 3 based SoCs, omap4 based SoCs keep the GPIO clocks enabled for GPIO level interrupts with wakeup enabled. This blocks deeper idle states as the whole domain will stay busy. The GPIO functional clock seems to stay enabled if the wakeup register is enabled and a level interrupt is triggered. In that case the only way to have the GPIO module idle is to reset it. It is possible this has gone unnoticed with OSWR (Open SWitch Retention) and off mode during idle resetting GPIO context most GPIO instances in the earlier Android trees for example. Looks like the way to deal with this is to have omap4 based SoCs only set wake for the duration of idle for level interrupts, and clear level registers for the idle. With level interrupts we can do this as the level interrupt from device will be still there on resume. I've taken the long path to fixing this to avoid yet more hard to read code. I've set up a quirks flag, and a struct for function pointers so we can use these to clean up other quirk handling easier in the later patches. The current level quirk handling is moved to the new functions. Cc: Aaro Koskinen Cc: Ladislav Michl Cc: Tero Kristo Signed-off-by: Tony Lindgren Acked-by: Grygorii Strashko Tested-by: Keerthy Signed-off-by: Linus Walleij commit c4c958aa64f31a962ddfdfb2ea628a25c774df25 Author: Janusz Krzysztofik Date: Mon Sep 24 01:53:36 2018 +0200 gpiolib: Fix array members of same chip processed separately New code introduced by commit bf9346f5d47b ("gpiolib: Identify arrays matching GPIO hardware") forcibly tries to find an array member which has its array index number equal to its hardware pin number and set up an array info for possible fast bitmap processing of all arrray pins belonging to that chip which also satisfy that numbering rule. Depending on array content, it may happen that consecutive array members which belong to the same chip but don't have array indexes equal to their pin hardware numbers will be split into groups, some of them processed together via the fast bitmap path, and rest of them separetely. However, applications may expect all those pins being processed together with a single call to .set_multiple() chip callback, like that was done before the change. Limit applicability of fast bitmap processing path to cases where all pins of consecutive array members starting from 0 which belong to the same chip have their hardware numbers equal to their corresponding array indexes. That should still speed up processing of applications using whole GPIO banks as I/O ports, while not breaking simultaneous manipulation of consecutive pins of the same chip which don't follow the equal numbering rule. Cc: Jonathan Corbet Signed-off-by: Janusz Krzysztofik Tested-by: Marek Szyprowski Signed-off-by: Linus Walleij commit 35ae7f9694e3c059a9d6a6049c7c171c8233c0c9 Author: Janusz Krzysztofik Date: Mon Sep 24 01:53:35 2018 +0200 gpiolib: Fix missing updates of bitmap index In new code introduced by commit b17566a6b08b ("gpiolib: Implement fast processing path in get/set array"), bitmap index is not updated with next found zero bit position as it should while skipping over pins already processed via fast bitmap path, possibly resulting in an infinite loop. Fix it. Signed-off-by: Janusz Krzysztofik Tested-by: Marek Szyprowski Signed-off-by: Linus Walleij commit 2a6c7c367de82951c98a290a21156770f6f82c84 Author: Tri Vo Date: Wed Sep 19 12:27:50 2018 -0700 arm64: lse: remove -fcall-used-x0 flag x0 is not callee-saved in the PCS. So there is no need to specify -fcall-used-x0. Clang doesn't currently support -fcall-used flags. This patch will help building the kernel with clang. Tested-by: Nick Desaulniers Acked-by: Will Deacon Signed-off-by: Tri Vo Signed-off-by: Catalin Marinas commit 256a90ed9e46b270bbc4e15ef05216ff049c3721 Author: Hanno Zulla Date: Thu Aug 23 17:03:38 2018 +0200 HID: hid-bigbenff: driver for BigBen Interactive PS3OFMINIPAD gamepad This is a driver to fix input mapping and add LED & force feedback support for the "BigBen Interactive Kid-friendly Wired Controller PS3OFMINIPAD SONY" gamepad with USB id 146b:0902. It was originally sold as a PS3 accessory and makes a very nice gamepad for Retropie. Signed-off-by: Hanno Zulla Signed-off-by: Jiri Kosina commit 5fe2ccbef9d7aecf5c4402c753444f1a12096cfd Author: zhong jiang Date: Thu Sep 13 15:41:10 2018 +0800 HID: logitech: fix a used uninitialized GCC warning Fix the following compile warning: drivers/hid/hid-logitech-hidpp.c: In function 'hi_res_scroll_enable': drivers/hid/hid-logitech-hidpp.c:2714:54: warning: 'multiplier' may be used uninitialized in this function [-Wmaybe-uninitialized] hidpp->vertical_wheel_counter.resolution_multiplier = multiplier; Signed-off-by: zhong jiang Signed-off-by: Jiri Kosina commit dc4e05d079591c6f69bb28a07bcc13d4f1c9993b Author: Hong Liu Date: Tue Sep 11 16:44:21 2018 -0700 HID: intel-ish-hid: using list_head for ipc write queue Currently wr_msg_ctl_info is used in ishtp_device just for list head purpose, using list_head directly can save ~150 bytes size for each replacement. Also this patch can save ~170 bytes of code size in intel-ish-ipc.ko. Signed-off-by: Hong Liu Acked-by: Srinivas Pandruvada Signed-off-by: Jiri Kosina commit 946a7773dcb64afa8164c63c378aa087d69f7d8f Author: Hong Liu Date: Tue Sep 11 16:44:20 2018 -0700 HID: intel-ish-hid: use resource-managed api Use resource-managed api to simplify error handling in probe and driver remove logic. With this patch, we can save ~170 bytes code size in intel-ish-ipc.ko. before: text data bss dec hex filename 11495 1568 72 13135 334f intel-ish-ipc.ko after: text data bss dec hex filename 11327 1568 72 12967 32a7 intel-ish-ipc.ko Signed-off-by: Hong Liu Acked-by: Srinivas Pandruvada Signed-off-by: Jiri Kosina commit 18c0b5467498ccbedd1646cbeecbd199e5f3f860 Author: Srinivas Pandruvada Date: Tue Sep 11 16:44:19 2018 -0700 HID: intel_ish-hid: Enhance API to get ring buffer sizes Added two APIs: - ishtp_cl_get_tx_free_buffer_size: This returns total size available for a client to queue TX data. - ishtp_cl_get_tx_free_rings: This returns total number of TX rings available for a client. Signed-off-by: Srinivas Pandruvada Signed-off-by: Jiri Kosina commit f26de33faff19bc937311df66278a2d3a1535fff Author: Even Xu Date: Tue Sep 11 16:44:18 2018 -0700 HID: intel-ish-hid: use helper function to search client id ishtp exposed helper ishtp_fw_cl_get_client() function for client information searching, so switch to use it. Signed-off-by: Even Xu Reviewed-by: Andriy Shevchenko Acked-by: Srinivas Pandruvada Signed-off-by: Jiri Kosina commit e625020b2c1e51a216094d60a6a72596926dd77d Author: Even Xu Date: Tue Sep 11 16:44:17 2018 -0700 HID: intel-ish-hid: ishtp: add helper function for client search Add helper function ishtp_fw_cl_get_client() for client driver searching client information to hide internal details from callers. Signed-off-by: Even Xu Reviewed-by: Andriy Shevchenko Acked-by: Srinivas Pandruvada Signed-off-by: Jiri Kosina commit 816e7ed1c85dbb5e477139d6f28ffd175d0a609e Author: Even Xu Date: Tue Sep 11 16:44:16 2018 -0700 HID: intel-ish-hid: use helper function to access client buffer ishtp bus driver exposed helper functions for client buffer accessing, so change to use these functions in ishtp-hid-client driver to avoid access client buffer directly. Signed-off-by: Even Xu Reviewed-by: Andriy Shevchenko Acked-by: Srinivas Pandruvada Signed-off-by: Jiri Kosina commit a1c40ce62fd24badcd65cd14533386fc382332be Author: Even Xu Date: Tue Sep 11 16:44:15 2018 -0700 HID: intel-ish-hid: ishtp: add helper functions for client buffer operation Add helper ishtp_cl_tx_empty() and ishtp_cl_rx_get_rb() to hide internal details from callers, who needs this functionality. Signed-off-by: Even Xu Reviewed-by: Andriy Shevchenko Acked-by: Srinivas Pandruvada Signed-off-by: Jiri Kosina commit d174c6664f09e35079aa63a13f8cf37a8b42357a Author: Even Xu Date: Tue Sep 11 16:44:14 2018 -0700 HID: intel-ish-hid: use helper function for private driver data set/get Use helper set/get function to set/get driver data in ishtp-hid-client driver instead of directly accessing cl_device driver_data member. Signed-off-by: Even Xu Reviewed-by: Andriy Shevchenko Acked-by: Srinivas Pandruvada Signed-off-by: Jiri Kosina commit d0b41230e80cd27e78cd3767da463e6cd0246de7 Author: Even Xu Date: Tue Sep 11 16:44:13 2018 -0700 HID: intel-ish-hid: ishtp: add helper function for driver data get/set Add helper function ishtp_set_drvdata() and ishtp_get_drvdata() for different ISH client drivers to set/get private driver data. Signed-off-by: Even Xu Reviewed-by: Andriy Shevchenko Acked-by: Srinivas Pandruvada Signed-off-by: Jiri Kosina commit ae3d16b93c2a510da003aecb39db3aaaab1a81b0 Author: Kuninori Morimoto Date: Wed Sep 19 07:24:05 2018 +0000 arm64: dts: renesas: ulcb: add default bootargs It can't boot without bootargs settings on Uboot on ulcb board. This patch adds missing default bootargs. ulcb BSP can overwrite it by own UBoot settings. Signed-off-by: Kuninori Morimoto Signed-off-by: Simon Horman commit bbc1f57aa87066a188ef34330bc1f091b95b1a6b Author: Colin Ian King Date: Mon Sep 24 00:04:08 2018 +0100 USB: serial: cypress_m8: fix spelling mistake "retreiving" -> "retrieving" Trivial fix to spelling mistake in dev_dbg message Signed-off-by: Colin Ian King Signed-off-by: Johan Hovold commit 5a5e3d3ceae2121590d67258a4e658d938b4a46d Author: Ravi Bangoria Date: Mon Aug 20 10:12:50 2018 +0530 perf probe: Support SDT markers having reference counter (semaphore) With this, perf buildid-cache will save SDT markers with reference counter in probe cache. Perf probe will be able to probe markers having reference counter. Ex, # readelf -n /tmp/tick | grep -A1 loop2 Name: loop2 ... Semaphore: 0x0000000010020036 # ./perf buildid-cache --add /tmp/tick # ./perf probe sdt_tick:loop2 # ./perf stat -e sdt_tick:loop2 /tmp/tick hi: 0 hi: 1 hi: 2 ^C Performance counter stats for '/tmp/tick': 3 sdt_tick:loop2 2.561851452 seconds time elapsed Link: http://lkml.kernel.org/r/20180820044250.11659-5-ravi.bangoria@linux.ibm.com Acked-by: Arnaldo Carvalho de Melo Acked-by: Masami Hiramatsu Acked-by: Srikar Dronamraju Reviewed-by: Song Liu Tested-by: Song Liu Signed-off-by: Ravi Bangoria Signed-off-by: Steven Rostedt (VMware) commit ccea8727dc27d8f46df6557f9260ab32760ef409 Author: Ravi Bangoria Date: Mon Aug 20 10:12:49 2018 +0530 trace_uprobe/sdt: Prevent multiple reference counter for same uprobe We assume to have only one reference counter for one uprobe. Don't allow user to add multiple trace_uprobe entries having same inode+offset but different reference counter. Ex, # echo "p:sdt_tick/loop2 /home/ravi/tick:0x6e4(0x10036)" > uprobe_events # echo "p:sdt_tick/loop2_1 /home/ravi/tick:0x6e4(0xfffff)" >> uprobe_events bash: echo: write error: Invalid argument # dmesg trace_kprobe: Reference counter offset mismatch. There is one exception though: When user is trying to replace the old entry with the new one, we allow this if the new entry does not conflict with any other existing entries. Link: http://lkml.kernel.org/r/20180820044250.11659-4-ravi.bangoria@linux.ibm.com Acked-by: Srikar Dronamraju Reviewed-by: Song Liu Reviewed-by: Oleg Nesterov Tested-by: Song Liu Signed-off-by: Ravi Bangoria Signed-off-by: Steven Rostedt (VMware) commit 22bad38286d9a652d7061a02f9743bb2ebb84e59 Author: Ravi Bangoria Date: Mon Aug 20 10:12:48 2018 +0530 uprobes/sdt: Prevent multiple reference counter for same uprobe We assume to have only one reference counter for one uprobe. Don't allow user to register multiple uprobes having same inode+offset but different reference counter. Link: http://lkml.kernel.org/r/20180820044250.11659-3-ravi.bangoria@linux.ibm.com Acked-by: Srikar Dronamraju Reviewed-by: Oleg Nesterov Reviewed-by: Song Liu Tested-by: Song Liu Signed-off-by: Ravi Bangoria Signed-off-by: Steven Rostedt (VMware) commit 1cc33161a83d20b5462b1e93f95d3ce6388079ee Author: Ravi Bangoria Date: Mon Aug 20 10:12:47 2018 +0530 uprobes: Support SDT markers having reference count (semaphore) Userspace Statically Defined Tracepoints[1] are dtrace style markers inside userspace applications. Applications like PostgreSQL, MySQL, Pthread, Perl, Python, Java, Ruby, Node.js, libvirt, QEMU, glib etc have these markers embedded in them. These markers are added by developer at important places in the code. Each marker source expands to a single nop instruction in the compiled code but there may be additional overhead for computing the marker arguments which expands to couple of instructions. In case the overhead is more, execution of it can be omitted by runtime if() condition when no one is tracing on the marker: if (reference_counter > 0) { Execute marker instructions; } Default value of reference counter is 0. Tracer has to increment the reference counter before tracing on a marker and decrement it when done with the tracing. Implement the reference counter logic in core uprobe. User will be able to use it from trace_uprobe as well as from kernel module. New trace_uprobe definition with reference counter will now be: :[(ref_ctr_offset)] where ref_ctr_offset is an optional field. For kernel module, new variant of uprobe_register() has been introduced: uprobe_register_refctr(inode, offset, ref_ctr_offset, consumer) No new variant for uprobe_unregister() because it's assumed to have only one reference counter for one uprobe. [1] https://sourceware.org/systemtap/wiki/UserSpaceProbeImplementation Note: 'reference counter' is called as 'semaphore' in original Dtrace (or Systemtap, bcc and even in ELF) documentation and code. But the term 'semaphore' is misleading in this context. This is just a counter used to hold number of tracers tracing on a marker. This is not really used for any synchronization. So we are calling it a 'reference counter' in kernel / perf code. Link: http://lkml.kernel.org/r/20180820044250.11659-2-ravi.bangoria@linux.ibm.com Reviewed-by: Masami Hiramatsu [Only trace_uprobe.c] Reviewed-by: Oleg Nesterov Reviewed-by: Song Liu Tested-by: Song Liu Signed-off-by: Ravi Bangoria Signed-off-by: Steven Rostedt (VMware) commit d6b183eda466415bb5defcf9afe4cb64734839e8 Author: Steven Rostedt (VMware) Date: Fri Aug 24 16:20:28 2018 -0400 tracing/kprobe: Remove unneeded extra strchr() from create_trace_kprobe() By utilizing a temporary variable, we can avoid adding another call to strchr(). Instead, save the first call to a temp variable, and then use that variable as the reference to set the event variable. Signed-off-by: Steven Rostedt (VMware) commit 212d7069617c9b9565ffee17c4db6b8423557460 Author: Linus Walleij Date: Sun Sep 23 16:07:07 2018 +0200 gpio: htc-egpio: Unique label per chip Give the HTC EGPIO chips unique names, htc-egpio-0, htc-egpio-1 etc, so that it gets possible to associate machine descriptor tables with individual chips. Signed-off-by: Linus Walleij commit 969fc78c37c3fb1363b4669a7d4df9c3804591e7 Author: Douglas Anderson Date: Thu Sep 6 15:49:06 2018 -0700 soc: qcom: geni: geni_se_clk_freq_match() should always accept multiples The geni_se_clk_freq_match() has some strange semantics. Specifically it is defined with two modes: 1. It can find a clock that's an exact multiple of the requested rate 2. It can find a non-exact match but it can't handle multiples then ...but callers should always be able to handle a clock that is a multiple of the requested clock so mode #2 doesn't really make sense. Let's change the semantics so that the non-exact match can also accept multiples and then change the code to handle that. The only caller of this code is the unlanded SPI driver [1] which currently passes "exact = True", thus it should be safe to change the semantics in this way. ...and, in fact, the SPI driver should likely be modified to pass "exact = False" (with the new semantics) since that will allow it to work with SPI devices that request a clock rate that doesn't exactly match a rate we can make. [1] https://lkml.kernel.org/r/1535107336-2214-1-git-send-email-dkota@codeaurora.org Fixes: eddac5af0654 ("soc: qcom: Add GENI based QUP Wrapper driver") Signed-off-by: Douglas Anderson Reviewed-by: Matthias Kaehlcke Signed-off-by: Andy Gross commit abc1c94471450de4fa085f5b1269837f97b1adc5 Author: Douglas Anderson Date: Thu Sep 6 15:49:05 2018 -0700 soc: qcom: geni: Don't ignore clk_round_rate() errors in geni_se_clk_tbl_get() The function clk_round_rate() is defined to return a "long", not an "unsigned long". That's because it might return a negative error code. Change the call in geni_se_clk_tbl_get() to check for errors. While we're at it, get rid of a useless init of "freq". NOTE: overall the idea that we should iterate over clk_round_rate() to try to reconstruct a table already present in the clock driver is questionable. Specifically: - This method relies on "clk_round_rate()" rounding up. - This method only works if the table is sorted and has no duplicates. ...this patch doesn't try to fix those problems, it just makes the error handling more correct. Fixes: eddac5af0654 ("soc: qcom: Add GENI based QUP Wrapper driver") Signed-off-by: Douglas Anderson Reviewed-by: Matthias Kaehlcke Signed-off-by: Andy Gross commit 65a272642ce13aab911f68279c8994cde3282b0a Author: Stephen Boyd Date: Fri May 18 15:47:50 2018 -0700 soc: qcom: geni: Make version macros simpler This macro doesn't work, because it hides a local variable inside of the macro to hold the version and that variable name is called 'ver' and 'version' sometimes. Let's change this to be more explicit. Introduce three macros for the major, minor, and step of the version, and require callers to pass the version in to get the part of the version out. This way we don't hide local variables inside macros and things are less evil overall. Cc: Karthikeyan Ramasubramanian Cc: Sagar Dharia Cc: Girish Mahadevan Signed-off-by: Stephen Boyd Reviewed-by: Douglas Anderson Reviewed-by: Bjorn Andersson Signed-off-by: Andy Gross commit 12ba7e1045521ec9f251c93ae0a6735cc3f42337 Author: Petr Machata Date: Sun Sep 23 17:48:55 2018 +0300 mlxsw: Make MLXSW_SP1_FWREV_MINOR a hard requirement Up until now, mlxsw tolerated firmware versions that weren't exactly matching the required version, if the branch number matched. That allowed the users to test various firmware versions as long as they were on the right branch. On the other hand, it made it impossible for mlxsw to put a hard lower bound on a version that fixes all problems known to date. If a user had a somewhat older FW version installed, mlxsw would start up just fine, possibly performing non-optimally as it would use features that trigger problematic behavior. Therefore tweak the check to accept any FW version that is: - on the same branch as the preferred version, and - the same as or newer than the preferred version. Signed-off-by: Petr Machata Reviewed-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 827f847b631ce23439e7ad2f575e897f43d5de12 Author: Benjamin Gaignard Date: Fri Sep 21 16:29:03 2018 +0200 MAINTAINERS: Update stm32 entry Add mailing list for stm32 architecture. Add "stm" pattern to not miss some drivers/directories when asking for maintainers. Signed-off-by: Benjamin Gaignard Signed-off-by: Alexandre Torgue Signed-off-by: Olof Johansson commit 6017efc4596f5b799ab62dac7b9c4d345ce251e0 Merge: 3e18d3ca4fff f30858439e7d Author: Olof Johansson Date: Sun Sep 23 06:48:02 2018 -0700 Merge tag 'samsung-soc-4.20' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into next/dt Samsung mach/soc changes for v4.20 1. Fix imprecise abort during Odroid XU3-family suspend to RAM (but it is not end of work needed for suspend). 2. Cleanup and fix of SD card write protect on MINI2440. * tag 'samsung-soc-4.20' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: ARM: s3c24xx: Restore proper usage of pr_info/pr_cont ARM: s3c24xx: Correct SD card write protect detection on Mini2440 ARM: s3c24xx: Consistently use tab for indenting member assignments ARM: s3c24xx: formatting cleanup in mach-mini2440.c ARM: s3c24xx: Remove empty gta02_pmu children probe ARM: exynos: Fix imprecise abort during Exynos5422 suspend to RAM ARM: exynos: Store Exynos5420 register state in one variable Signed-off-by: Olof Johansson commit 3e18d3ca4fff5e4863ce60fe8f927a6d2bfcc1fa Merge: 42724dd8930f 6523a0e155c8 Author: Olof Johansson Date: Sun Sep 23 06:38:08 2018 -0700 Merge tag 'hisi-arm32-dt-for-4.20' of git://github.com/hisilicon/linux-hisi into next/dt ARM: DT: Hisilicon ARM32 SoCs updates for 4.20 - Switch to updated coresight bindings for hip04 SoC * tag 'hisi-arm32-dt-for-4.20' of git://github.com/hisilicon/linux-hisi: arm: dts: hip04: Update coresight bindings for hardware ports Signed-off-by: Olof Johansson commit 42724dd8930f4a60d57899bc4d1bf467b4eab760 Merge: 45351fa32d1c 5510ee99c0de Author: Olof Johansson Date: Sun Sep 23 06:37:47 2018 -0700 Merge tag 'hisi-arm64-dt-for-4.20' of git://github.com/hisilicon/linux-hisi into next/dt ARM64: DT: Hisilicon SoC DT updates for 4.20 - Add missing clocks for Hi6220 - Switch to updated coresight bindings for Hi6220 - Add DT bindings and support for Hi3670 SoC and HiKey970 board * tag 'hisi-arm64-dt-for-4.20' of git://github.com/hisilicon/linux-hisi: arm64: dts: Add devicetree support for HiKey970 board dt-bindings: arm: hisilicon: Add binding for HiKey970 board arm64: dts: Add devicetree for Hisilicon Hi3670 SoC dt-bindings: arm: hisilicon: Add binding for Hi3670 SoC arm64: dts: hi6220: Update coresight bindings for hardware ports arm64: dts: hisilicon: Add missing clocks property for CPUs Signed-off-by: Olof Johansson commit 45351fa32d1ca65f8bca637c055aff0158bfb7a0 Merge: 0ecee767ce76 1ba23b1df0bb Author: Olof Johansson Date: Sun Sep 23 06:36:16 2018 -0700 Merge tag 'stm32-dt-for-v4.20-1' of git://git.kernel.org/pub/scm/linux/kernel/git/atorgue/stm32 into next/dt STM32 DT updates for v4.20, round 1 Highlights: ---------- - MCU platforms update: - Add missing clock node's lobel on stm32f429 - Remove cd-inverted property for sdio nodes for all mcus - Fix stm32h7 rtc binding - MPU STM32MP157 platform update: - Enable display: CEC and DSI - Fix SPI node name to match with the new DTC * tag 'stm32-dt-for-v4.20-1' of git://git.kernel.org/pub/scm/linux/kernel/git/atorgue/stm32: ARM: dts: stm32: Fix SPI controller node names ARM: dts: stm32: enable display on stm32mp157c-ev1 board ARM: dts: stm32: update rtc st,syscfg property on stm32h743 ARM: dts: stm32: Remove cd-inverted property for stm32f746-disco ARM: dts: stm32: Remove cd-inverted property for stm32f769-disco ARM: dts: stm32: Remove cd-inverted property for stm32f469-disco ARM: dts: stm32: Remove cd-inverted property for stm32429i-eval ARM: dts: stm32: Add clk-lse node's label on stm32f429 Signed-off-by: Olof Johansson commit 0ecee767ce76c90985dfcd162845ff5d1a2778d4 Merge: da4cf9cdec9b 3be9349f38c7 Author: Olof Johansson Date: Sun Sep 23 06:33:56 2018 -0700 Merge tag 'ux500-dts-arm-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson into next/dt Ux500 DTS changes for the v4.20 kernel cycle. Assorted housekeeping DTS patches. * tag 'ux500-dts-arm-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson: ARM: dts: ux500: Mark PRCMU as syscon compatible arm: dts: ste: Update coresight bindings for hardware port ARM: dts: ste: Fix SPI controller node names ARM: dts: ux500: Get rid of DTC warnings ARM: dts: ux500: Fix LCDA clock line muxing dt-bindings: arm: scu: Correct example SCU unit addresses ARM: dts: ux500: Correct SCU unit address Signed-off-by: Olof Johansson commit da4cf9cdec9bdc68aaac0f1f0d171d32b05fa342 Merge: f240bd3b4b91 3368e06e2a91 Author: Olof Johansson Date: Sun Sep 23 06:32:33 2018 -0700 Merge tag 'aspeed-4.20-devicetree' of git://git.kernel.org/pub/scm/linux/kernel/git/joel/aspeed into next/dt ASPEED device tree updates for 4.20 - Two new ast2500-based machines: * Facebook TiogaPass (x86 server) * HXT StarDragon 4800 Reference Evaluation Platform 2 (arm64 server) - Updates for the Quanta q71l system - i2c device tree cleanups * tag 'aspeed-4.20-devicetree' of git://git.kernel.org/pub/scm/linux/kernel/git/joel/aspeed: ARM: dts: aspeed: Adding Facebook TiogaPass BMC ARM: dts: aspeed: Add HXT StarDragon 4800 REP2 BMC ARM: dts: aspeed: quanta-q71l: Enable adc & ibt nodes ARM: dts: aspeed: quanta-q71l: Add four PSUs ARM: dts: aspeed: quanta-q71l: add aliases for i2c ARM: dts: aspeed: Fix I2C bus warnings Signed-off-by: Olof Johansson commit f240bd3b4b91430aaa5eb6be8a14812eff8f9f32 Merge: 6302cbe759e2 42e54f6467ec Author: Olof Johansson Date: Sun Sep 23 06:31:04 2018 -0700 Merge tag 'am654-for-v4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/kristo/linux into next/dt TI AM654 support for v4.20 merge window. This branch adds changes for the Texas Instruments AM654 SoC. Included changes are: - Add uart nodes - Change address cells and size-cells of interconnect tfrom 1 to 2 - Add secure proxy instance for main domain - Add DMSC support * tag 'am654-for-v4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/kristo/linux: arm64: dts: ti: k3-am6: Add Device Management Security Controller support arm64: dts: ti: am654: Add secure proxy instance for main domain arm64: dts: ti: am654: Add uart nodes arm64: dts: ti: k3-am65: Change #address-cells and #size-cells of interconnect to 2 Signed-off-by: Olof Johansson commit 6302cbe759e261f22fa603ac653328b4b9615adf Merge: b610209c5df1 79daf2a4089f Author: Olof Johansson Date: Sun Sep 23 06:28:51 2018 -0700 Merge tag 'juno-updates-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into next/dt ARMv8 Juno/Vexpress updates for v4.20 1. Enablement of scatter gather mode for CoreSight TMC-ETR routing 2. Usage of updated coresight graph bindings that eliminates loads of dtc warnings * tag 'juno-updates-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux: arm64: dts: juno: Enable coresight tmc scatter gather in ETR arm64: dts: juno: Update entries to match latest coresight bindings Signed-off-by: Olof Johansson commit b610209c5df1a96454553ab4bdeb1d4f5744f5fa Merge: 6125a690faf1 7cdbe45da1a1 Author: Olof Johansson Date: Sun Sep 23 06:28:19 2018 -0700 Merge tag 'arm-soc/for-4.20/devicetree-arm64' of https://github.com/Broadcom/stblinux into next/dt This pull request contains Broadcom ARM64-based SoCs Device Tree changes for 4.20, please pull the following: - Stefan provides a reference to the Compute Module IO Board V3 such that we can reference the arm counterpart and still build it for arm64 - Rob fixes I2C and SPI bus warnings which are going to show up with his update to DTC scheduled for 4.20 * tag 'arm-soc/for-4.20/devicetree-arm64' of https://github.com/Broadcom/stblinux: arm64: dts: broadcom: Fix I2C and SPI bus warnings arm64: dts: broadcom: Add reference to Compute Module IO Board V3 Signed-off-by: Olof Johansson commit 0cbb76d6285794f30953bfa3ab831714b59dd700 Author: Zhenzhong Duan Date: Tue Sep 18 07:45:00 2018 -0700 x86/speculation: Add RETPOLINE_AMD support to the inline asm CALL_NOSPEC variant ..so that they match their asm counterpart. Add the missing ANNOTATE_NOSPEC_ALTERNATIVE in CALL_NOSPEC, while at it. Signed-off-by: Zhenzhong Duan Signed-off-by: Borislav Petkov Cc: Daniel Borkmann Cc: David Woodhouse Cc: H. Peter Anvin Cc: Ingo Molnar Cc: Konrad Rzeszutek Wilk Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Wang YanQing Cc: dhaval.giani@oracle.com Cc: srinivas.eeda@oracle.com Link: http://lkml.kernel.org/r/c3975665-173e-4d70-8dee-06c926ac26ee@default commit 6125a690faf155d05e6a9d00ab98df6d2ad41b39 Merge: 68df1dba22ba ab0b47d2eff4 Author: Olof Johansson Date: Sun Sep 23 06:24:28 2018 -0700 Merge tag 'arm-soc/for-4.20/devicetree' of https://github.com/Broadcom/stblinux into next/dt This pull request contains Broadcom ARM-based SoCs Device Tree changes for 4.20, please pull the following: - Rafal updates the Broadcom BCM5301x (Northstar) DTS files to use the new style partition parser and removes the unsupported/undocumented linux,part-probe properties that were previously introduced - Stefan adds supports for the Raspberry Pi Compute Module 3/3Lite, he also updates the Raspberry Pi 3B+ USB Ethernet adapter to have proper LED configuration - Rob fixes a bunch of SPI bus warnings in the Northstar Plus and Hurricane 2 DTS files - Florian documents the Broadcom roboswitch Switch Register Access Block (SRAB) interrupts, adds the switch interrupts to the Northstar Plus DTS include file and finally updates the BCM958625HR reference board to have the proper SFP module definition * tag 'arm-soc/for-4.20/devicetree' of https://github.com/Broadcom/stblinux: ARM: dts: bcm: Fix SPI bus warnings ARM: dts: NSP: Wire up switch interrupts dt-bindings: net: dsa: Document B53 SRAB interrupts and registers ARM: dts: NSP: Enable SFP on bcm958625hr ARM: dts: bcm283x-rpi-lan7515: Enable Ethernet LEDs ARM: dts: BCM5301X: Specify flash partitions ARM: dts: add Raspberry Pi Compute Module 3 and IO board dt-bindings: bcm: Add Raspberry Pi CM3 and CM3L Signed-off-by: Olof Johansson commit 68df1dba22baa883818691bd47bc5ed3d8ca1f09 Merge: 923769f7b3a5 445f2bda3501 Author: Olof Johansson Date: Sun Sep 23 06:21:10 2018 -0700 Merge tag 'amlogic-dt64' of https://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic into next/dt Amlogic ARM64 DT updates for v4.20 - AXG: cleanup/reorder nodes - AXG: add audio PDM support for s400 board - GX: increase CMA memory size - GX: new canvas driver * tag 'amlogic-dt64' of https://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic: arm64: dts: meson: Switch simple-mfd and syscon order arm64: dts: meson-axg-s400: Add chosen and memory nodes arm64: dts: meson-axg: use the proper compatible for ethmac arm64: dts: meson-axg: s400: add pdm to the sound card arm64: dts: meson-axg: s400: add dmic codec arm64: dts: meson-axg: add pdm arm64: dts: meson-gx: add dmcbus and canvas nodes. arm64: dts: meson: libretech: update board model arm64: dts: meson-gx: increase default shared CMA pool size arm64: dts: meson-axg: sort nodes consistently arm64: dts: meson-axg: s400: add sound card arm64: dts: meson-axg: s400: enable audio devices arm64: dts: meson-axg: add audio fifos Signed-off-by: Olof Johansson commit 923769f7b3a51c7d82caaf8cb651c5dde60aca34 Merge: 89cb3a4c9761 78f26da3ffbc Author: Olof Johansson Date: Sun Sep 23 06:20:06 2018 -0700 Merge tag 'v4.20-rockchip-dts64-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into next/dt New soc support for the px30 quad-core Cortex-A35. New boards are the px30 eval board and roc-rk3399-pc. The rk3328 got support for the one gpio controlled via the general register files and the rk3399 finally got its idle-states defined. And finally fixes and improvements for firefly-rk3399 (wifi), roc-rk3328-cc (sdmmc-uhs, io-domains), rk3328-rock64 (gpio-regulator pin fix) and rk3399-sapphire (gpio-regulator pin fix, pmic pin fix and type-c port supply). * tag 'v4.20-rockchip-dts64-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: arm64: dts: rockchip: Add type-c port supply on rk3399-sapphire board arm64: dts: rockchip: fix vcc_host1_5v pin assign on rk3328-rock64 arm64: dts: rockchip: add WiFi module support for Firefly-RK3399 arm64: dts: rockchip: remove dvs2 pinctrl from pmic on rk3399-sapphire arm64: dts: rockchip: Fix VCC5V0_HOST_EN on rk3399-sapphire arm64: dts: rockchip: re-order vcc_sys on rk3399-sapphire arm64: dts: rockchip: add missing vop properties for px30 arm64: dts: rockchip: Add idle-states to device tree for rk3399 arm64: dts: rockchip: add sdmmc UHS support for roc-rk3328-cc arm64: dts: rockchip: add GRF GPIO controller to rk3328 arm64: dts: rockchip: add io-domain to roc-rk3328-cc arm64: dts: rockchip: add PX30 evaluation board devicetree arm64: dts: rockchip: add core dtsi file for PX30 SoCs dt-bindings: rockchip: grf: add grf and pmugrf description for px30 arm64: dts: rockchip: add support for ROC-RK3399-PC board Signed-off-by: Olof Johansson commit 89cb3a4c976189a5c6529ee5f5db712949080470 Merge: fc48cf437a08 450d6079e8d3 Author: Olof Johansson Date: Sun Sep 23 06:19:04 2018 -0700 Merge tag 'renesas-arm64-dt-for-v4.20' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/dt Renesas ARM64 Based SoC DT Updates for v4.20 * Correct whitespace around assignments * R-Car Gen-3 SoCs: - Enable SDR104 for SD devices - Include R-Car product name in DTSI files to ease maintenance * R-Car Gen-3 SoC based boards: Convert to new LVDS DT bindings * R-Car Gen 3 Salvator-X and Salvator-XS boards: - Override secondary addresses of ADV748x to avoid address conflicts * R-Car Gen 3 based Salvator-XS board: Enable SATA * R-Car M3-N (r8a77965) SoC: - Add FDP1 device nodes - Move arm_cc630p and timer nodes to restore sort-order of file - Correct clock/reset for usb2_phy1 - Correct HS-USB compat string - Add OPPs table for cpu devices enabling CPUFreq support - Add CAN device placeholder nodes to facilitate adding initial device tree for KF daughter board - Attach SYS-DMAC to the IPMMU * R-Car M3-N (r8a77965) based ULCB board: - Initial device tree for board and KF daughter board * R-Car E3 (r8a77990) SoC: - Add SYS-DMAC, I2C VIN, CSI-2, MSIOF device nodes - Add BRG support to SCIF2 which allows an increase in serial clock accuracy - Use CPG/MSSR and SYSC binding definitions * R-Car E3 (r8a77990) based Ebisu board: Enable PWM * R-Car D3 (r8a77995) SoC: Attach the SYS-DMAC to the IPMMU * R-Car D3 (r8a77995) based Draak board: Sort device nodes * R-Car V3H (r8a77980) based V3HSK board: - Move lvds0 node to restore sort-order of file * R-Car V3H (r8a77980) SoC: - Add RWDT, CSI2 and VIN, Cortex-A53 PMU nodes - Move IPMMU and CAN clock nodes to restore sort-order of file * R-Car V3M (r8a77970) SoC: - Add MMC nodes - Move CAN clock node to restore sort-order of file * R-Car V3M (r8a77970) based V3MSK board: Add eMMC support * R-Car V3H (r8a77980) based Condor board: Add PCIe, DU, LVDS and HDMI support * RZ/G2M (r8a774a1) SoC: - Initial device tree - Add SYS-DMAC, SCIF, HSCIF, INTC-EX, EtherAVB, RWDT, pinctl, GPIO, SDHI, I2C, IIC-DVFS, thermal, IPMMU, MSIOF, Cortex-A53 CPU core, PWM, Audio, FCPF, FCPV, USB2.0, USB-DMAC, HSUSB and USB3.0 device nodes * tag 'renesas-arm64-dt-for-v4.20' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: (58 commits) arm64: dts: r8a77965: add FDP1 device nodes arm64: dts: renesas: draak: Sort device nodes arm64: dts: renesas: enable SDR104 on R-Car Gen3 arm64: dts: renesas: r8a77990: Add SYS-DMAC device nodes arm64: dts: renesas: r8a77990: Add I2C device nodes arm64: dts: renesas: r8a77990: Add VIN and CSI-2 device nodes arm64: dts: renesas: r8a77990: Add all MSIOF nodes arm64: dts: renesas: r8a7795: Move arm_cc630p node arm64: dts: renesas: r8a77990: Add BRG support to SCIF2 arm64: dts: renesas: r8a77990: Use CPG/MSSR and SYSC binding definitions arm64: dts: renesas: salvator-xs: Improve SATA switch settings comments arm64: dts: renesas: r8a77965: Fix clock/reset for usb2_phy1 arm64: dts: renesas: r8a77965: Fix HS-USB compatible arm64: dts: renesas: r8a77965: Move timer node arm64: dts: renesas: v3hsk: Move lvds0 node arm64: dts: renesas: Fix whitespace around assignments arm64: dts: renesas: r8a77965: m3nulcb-kf: Initial device tree arm64: dts: renesas: condor: add PCIe support arm64: dts: renesas: r8a77980: add PCIe support arm64: dts: renesas: r8a774a1: Add USB3.0 device nodes ... Signed-off-by: Olof Johansson commit fc48cf437a08995943b6fb9fe43ab0fce52ddc2c Merge: 7adb6bab2846 1926bd6bf20f Author: Olof Johansson Date: Sun Sep 23 06:14:40 2018 -0700 Merge tag 'renesas-arm-dt-for-v4.20' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/dt Renesas ARM Based SoC DT Updates for v4.20 * R-Car Gen1 SoCs: Include product name in DTSI files for ease of maintenance * R-Car Gen2 SoCs: - Convert to new DU DT bindings - Correct SATA device sizes to 2 MiB * R-Car H2 (r8a7790) based Porter board: Add DA9063 OnKey PMIC node * R-Car E2 (r8a7794) based Silk board: Add DA9063 PMIC, RTC and OnKey nodes * R-Car M2-N (r8a7793) based Gose board: Add DA9210 node for CPU DVFS * RZ/G1C (R8A77470) SoC: - Add GPIO nodes - Add PFC support - Use r8a77470-sysc binding definitions * RZ/G1C (r8a77470) iW-RainboW-G23S dev platform: - Specify EtherAVB PHY IRQ - Add pinctl support for scif1 * RZ/N1D (r9a06g032) SoC: Use r9a06g032-sysctrl binding definitions * tag 'renesas-arm-dt-for-v4.20' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: ARM: dts: r9a06g032: Use r9a06g032-sysctrl binding definitions ARM: dts: Include R-Car Gen1 product name in DTSI files ARM: dts: stout: Add DA9063 OnKey node ARM: dts: silk: Add DA9063 RTC and OnKey node ARM: dts: iwg23s-sbc: specify EtherAVB PHY IRQ ARM: dts: r8a77470: Add GPIO support ARM: dts: silk: Add DA9063 PMIC node ARM: dts: gose: Add DA9210 node for CPU DVFS ARM: dts: rcar-gen2: Convert to new DU DT bindings ARM: dts: iwg23s-sbc: Add pinctl support for scif1 ARM: dts: r8a77470: Add PFC support ARM: dts: r8a77470: Use r8a77470-sysc binding definitions ARM: dts: rcar: Correct SATA device sizes to 2 MiB Signed-off-by: Olof Johansson commit 739d0def85ca495795ecec8ce248416c94d1f234 Merge: bd4d08daeb95 f1951c22562a Author: David S. Miller Date: Sat Sep 22 17:23:16 2018 -0700 Merge branch 'hv_netvsc-Support-LRO-RSC-in-the-vSwitch' Haiyang Zhang says: ==================== hv_netvsc: Support LRO/RSC in the vSwitch The patch adds support for LRO/RSC in the vSwitch feature. It reduces the per packet processing overhead by coalescing multiple TCP segments when possible. The feature is enabled by default on VMs running on Windows Server 2019 and later. The patch set also adds ethtool command handler and documents. ==================== Signed-off-by: David S. Miller commit f1951c22562a4f5a5c8ba82672352f7f6e5736b2 Author: Haiyang Zhang Date: Fri Sep 21 18:20:37 2018 +0000 hv_netvsc: Update document for LRO/RSC support Update document for LRO/RSC support, and the command line info to change the setting. Signed-off-by: Haiyang Zhang Signed-off-by: David S. Miller commit d6792a5a07479d27147c01ff22041409d5e4ce4c Author: Haiyang Zhang Date: Fri Sep 21 18:20:36 2018 +0000 hv_netvsc: Add handler for LRO setting change This patch adds the handler for LRO setting change, so that a user can use ethtool command to enable / disable LRO feature. Signed-off-by: Haiyang Zhang Signed-off-by: David S. Miller commit c8e4eff4675f22ad1110141ed9e62102d4d77e1c Author: Haiyang Zhang Date: Fri Sep 21 18:20:35 2018 +0000 hv_netvsc: Add support for LRO/RSC in the vSwitch LRO/RSC in the vSwitch is a feature available in Windows Server 2019 hosts and later. It reduces the per packet processing overhead by coalescing multiple TCP segments when possible. This patch adds netvsc driver support for this feature. Signed-off-by: Haiyang Zhang Signed-off-by: David S. Miller commit 86ea9dc8c57f8dfa2380399fddf6b1ca87907305 Author: Manivannan Sadhasivam Date: Thu Sep 13 23:35:45 2018 +0530 arm64: dts: rockchip: Enable SD card detection for Rock960 boards For proper working of SD cards, let's add the Card Detect GPIO property to the common devicetree for Rock960 family boards. Signed-off-by: Manivannan Sadhasivam Signed-off-by: Heiko Stuebner commit 75d038565794994a9e4a2581b9a54b3f777bdd86 Author: Manivannan Sadhasivam Date: Thu Sep 13 23:35:44 2018 +0530 arm64: dts: rockchip: Add support for Rock960 board Add devicetree support for Rock960 board, one of the Consumer Edition boards of the 96Boards family. This board support utilizes the common Rock960 family board support that includes Ficus 96Board. Signed-off-by: Manivannan Sadhasivam Signed-off-by: Heiko Stuebner commit cdb04e08ab7312442784aecbcff7207b7eee1c0b Author: Manivannan Sadhasivam Date: Thu Sep 13 23:35:43 2018 +0530 dt-bindings: arm: rockchip: Add binding for Rock960 board Add devicetree binding for Rock960 board from Vamrs Limited. Signed-off-by: Manivannan Sadhasivam Signed-off-by: Heiko Stuebner commit ffb7b25e8ac3c94f61576ca9cbfd0f16ada1be6d Author: Manivannan Sadhasivam Date: Thu Sep 13 23:35:42 2018 +0530 arm64: dts: rockchip: Split out common nodes for Rock960 based boards Since the same family members of Rock960 boards (Rock960 and Ficus) share the same configuration, split out the common nodes into a common dtsi file for reducing code duplication. The board specific nodes for Ficus boards are then placed in corresponding board DTS file. Below are some of the key differences between both Rock960 and Ficus boards: 1. Different host enable GPIO for USB 2. Different power and reset GPIO for PCI-E 3. No Ethernet port on Rock960 Only the properties which differ between both boards are placed in the board specific dts and the reset of the nodes are placed in common dtsi file. Signed-off-by: Manivannan Sadhasivam Reviewed-by: Ezequiel Garcia Signed-off-by: Heiko Stuebner commit e007e4e0d87649cae4359a9776d2e14b67dd7187 Author: Katsuhiro Suzuki Date: Mon Sep 17 21:26:33 2018 +0900 arm64: dts: rockchip: add spdif sound node for rock64 This patch adds sound card node for rock64. Currently we can support S/PDIF only. It seems the lack of codec driver of rk3328 to enable analog audio out. Signed-off-by: Katsuhiro Suzuki Signed-off-by: Heiko Stuebner commit 88a20edf76091ee7f1bb459b89d714d53f0f8940 Author: Vicente Bergas Date: Mon Sep 17 15:47:14 2018 +0200 arm64: dts: rockchip: Fix microSD in rk3399 sapphire board The microSD card slot in the Sapphire board is not working because of several issues: 1.- The vmmc power supply is missing in the DTS. It is capable of 3.0V and has a GPIO-based enable control. 2.- The vqmmc power supply can provide up to 3.3V, but it is capped in the DTS to just 3.0V because of the vmmc capability. This results in a conflict from the mmc driver requesting an unsupportable voltage range from 3.3V to 3.0V (min > max) as reported in dmesg. So, extend the range up to 3.3V. The hw should be able to stand this 0.3V tolerance. See mmc_regulator_set_vqmmc in drivers/mmc/core/core.c. 3.- The card detect signal is non-working. There is a known conflict with jtag, but the workaround in drivers/soc/rockchip/grf.c does not work. Adding the broken-cd attribute to the DTS fixes the issue. Signed-off-by: Vicente Bergas Signed-off-by: Heiko Stuebner commit 067517513ae437c2845bc593dbf99a142bdc9250 Author: Andreas Färber Date: Sun Jun 24 15:46:30 2018 +0200 soc: actions: Update SPS help text for S700 Commit 3ad85b08f7789d51e6aad0f535296d1c31e319b9 (soc: actions: sps: Add S700) added S700 support to the SPS driver but forget to update Kconfig help. Add missing S700 mention, in preparation for further SoCs. Fixes: 3ad85b08f778 ("soc: actions: sps: Add S700") Reported-by: Manivannan Sadhasivam Signed-off-by: Andreas Färber commit 2fe8ea39c9a8489799cf86bb377fc80492b5b3bf Author: Dengcheng Zhu Date: Tue Sep 11 14:49:24 2018 -0700 MIPS: kexec: Use prepare method from Generic for UHI platforms Out-of-tree platforms may not be based on Generic as shown in customer communication. Share the prepare method with all using UHI boot protocol, and put into machine_kexec.c. The benefit is that, when having kexec_args related problems, developers will naturally look into machine_kexec.c, where "CONFIG_UHI_BOOT" will be found, prompting them to add "select UHI_BOOT" to the platform Kconfig. It would otherwise require a lot debugging or online searching to be aware that the solution is in Generic code. Tested-by: Rachel Mozes Reported-by: Rachel Mozes Signed-off-by: Dengcheng Zhu Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/20569/ Cc: pburton@wavecomp.com Cc: ralf@linux-mips.org Cc: linux-mips@linux-mips.org commit a6da4d6fdf8bd512c98d3ac7f1d16bc4bb282919 Author: Dengcheng Zhu Date: Tue Sep 11 14:49:23 2018 -0700 MIPS: kexec: Relax memory restriction We can rely on the system kernel and the dump capture kernel themselves in memory usage. Being restrictive with 512MB limit may cause kexec tool failure on some platforms. Tested-by: Rachel Mozes Reported-by: Rachel Mozes Signed-off-by: Dengcheng Zhu Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/20568/ Cc: pburton@wavecomp.com Cc: ralf@linux-mips.org Cc: linux-mips@linux-mips.org commit 1447864bee4cd9ea96fe793ea8fb49a8ea784412 Author: Dengcheng Zhu Date: Tue Sep 11 14:49:22 2018 -0700 MIPS: kexec: CPS systems to halt nonboot CPUs Share code between play_dead() and cps_kexec_nonboot_cpu(). Register the latter to mp_ops for kexec. Signed-off-by: Dengcheng Zhu Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/20567/ Cc: pburton@wavecomp.com Cc: ralf@linux-mips.org Cc: linux-mips@linux-mips.org Cc: rachel.mozes@intel.com commit 62cac480f33f8f9413d609cb1601b0ee521a86b8 Author: Dengcheng Zhu Date: Tue Sep 11 14:49:21 2018 -0700 MIPS: kexec: Make a framework for both jumping and halting on nonboot CPUs The existing implementation lets machine_kexec() CPU jump to reboot code buffer, whereas other CPUs to relocated_kexec_smp_wait. The natural way to bring up an SMP new kernel would be to let CPU0 do it while others being halted. For those failing to do so, fall back to the jumping method. Signed-off-by: Dengcheng Zhu [paul.burton@mips.com: Guard kexec_nonboot_cpu_jump with CONFIG_SMP] Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/20570/ Cc: pburton@wavecomp.com Cc: ralf@linux-mips.org Cc: linux-mips@linux-mips.org Cc: rachel.mozes@intel.com commit c798c88f3962ddff89c7aa818986caeecd46ab4c Author: Fan Wu Date: Wed Sep 19 01:59:00 2018 +0000 EDAC, ghes: Use CPER module handles to locate DIMMs Use SMBIOS module handle type 17, on platforms which provide valid ones, to locate the corresponding DIMM and thus have per-DIMM error counter updates. Signed-off-by: Fan Wu [ Massage commit message. ] Signed-off-by: Borislav Petkov Reviewed-by: Tyler Baicar Reviewed-by: James Morse Tested-by: Toshi Kani Cc: Mauro Carvalho Chehab Cc: baicar.tyler@gmail.com Cc: john.garry@huawei.com Cc: linux-arm-kernel@lists.infradead.org Cc: linux-edac Cc: shiju.jose@huawei.com Cc: tanxiaofei@huawei.com Cc: wanghuiqiang@huawei.com Link: http://lkml.kernel.org/r/1537322340-1860-1-git-send-email-wufan@codeaurora.org commit 6f6da136046294a1e8d2944336eb97412751f653 Author: Qiuxu Zhuo Date: Tue Sep 18 17:34:33 2018 -0700 EDAC: Correct DIMM capacity unit symbol The {i3200|i7core|sb|skx}_edac drivers show DIMM capacity using the wrong unit symbol: 'Mb' - megabit. Fix them by replacing 'Mb' with 'MiB' - mebibyte. [Tony: These are all "edac_dbg()" messages, so this won't break scripts that parse console logs.] Signed-off-by: Qiuxu Zhuo Signed-off-by: Tony Luck Signed-off-by: Borislav Petkov Acked-by: Aristeu Rozanski Cc: Mauro Carvalho Chehab Cc: linux-edac@vger.kernel.org Link: https://lkml.kernel.org/r/20180919003433.16475-1-tony.luck@intel.com commit bb9fc6adac54c6811ccd0b7fe309be859effdc02 Author: Alexandru Ardelean Date: Thu Sep 13 14:02:12 2018 +0300 staging:iio:ad7606: Add support for the ad7605-4 Add support for the AD7605-4 to the AD7606 driver. The AD7605-4 is mostly interface compatible to the AD7606-6 with the only difference being not having support for oversampling. Signed-off-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron commit 6eb17c6c8aee233e27339bcefe4bf9bef6d94c6c Author: Song Qiang Date: Tue Sep 18 16:24:21 2018 +0800 iio: proximity: Add driver support for ST's VL53L0X ToF ranging sensor. This driver was originally written by ST in 2016 as a misc input device driver, and hasn't been maintained for a long time. I grabbed some code from it's API and reformed it into an iio proximity device driver. This version of driver uses i2c bus to talk to the sensor and polling for measuring completes, so no irq line is needed. It can be tested with reading from /sys/bus/iio/devices/iio:deviceX/in_distance_input Signed-off-by: Song Qiang Reviewed-by: Rob Herring Signed-off-by: Jonathan Cameron commit 81aa283c692401ce82795fb0da68ead413055360 Author: Manivannan Sadhasivam Date: Thu May 31 15:17:34 2018 +0530 MAINTAINERS: Add Actions Semi S900 clk entries Add S900 clk entries under ARCH_ACTIONS. Signed-off-by: Manivannan Sadhasivam Acked-by: Stephen Boyd Signed-off-by: Andreas Färber commit f039e50f3c5a31bade2008409097bfbfbf1479aa Author: Manivannan Sadhasivam Date: Wed Apr 4 22:52:57 2018 +0530 MAINTAINERS: Add reviewer for ACTIONS platforms Since I'll be working on improving support for ACTIONS platforms, adding myself as the reviewer. Signed-off-by: Manivannan Sadhasivam Reviewed-by: Linus Walleij Signed-off-by: Andreas Färber commit 7c2d53700c7e0ca4b7d1bfd59971248625e9f70c Author: Alexandru Ardelean Date: Tue Sep 18 15:15:03 2018 +0300 staging:iio:ad7606: update structs with doc annotations The current structs are only partially documented via annotations. This change updates annotations for all structs in the ad7606.h file. Signed-off-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron commit f220d3ebba8343dcbd8c83e4bb4fa6fbcfc616c6 Author: Andreas Färber Date: Sun Jan 21 17:12:31 2018 +0100 arm64: dts: actions: Convert to new-style SPDX license identifiers Move SPDX-License-Identifier to the top and add one for the Makefile. Signed-off-by: Andreas Färber commit 54f884cfce079d656af586037c42b58a84e1dae9 Author: Andreas Färber Date: Sun Jan 21 17:31:36 2018 +0100 ARM: dts: owl: Convert to new-style SPDX license identifiers Move the SPDX-License-Identifier lines to the top. Signed-off-by: Andreas Färber commit afe518272d474b27d1ace50bf325106794a33b82 Author: Andreas Färber Date: Sun Jan 21 17:50:33 2018 +0100 soc: actions: Convert to SPDX license identifiers Replace textual license notices with SPDX-License-Identifier lines. Add an SPDX-License-Identifier for the Makefile. Signed-off-by: Andreas Färber commit 2893cc8ff892fa74972d8dc0e1d0dc65116daaa3 Author: Matthew Whitehead Date: Fri Sep 21 17:20:41 2018 -0400 x86/CPU: Change query logic so CPUID is enabled before testing Presently we check first if CPUID is enabled. If it is not already enabled, then we next call identify_cpu_without_cpuid() and clear X86_FEATURE_CPUID. Unfortunately, identify_cpu_without_cpuid() is the function where CPUID becomes _enabled_ on Cyrix 6x86/6x86L CPUs. Reverse the calling sequence so that CPUID is first enabled, and then check a second time to see if the feature has now been activated. [ bp: Massage commit message and remove trailing whitespace. ] Suggested-by: Andy Lutomirski Signed-off-by: Matthew Whitehead Signed-off-by: Borislav Petkov Reviewed-by: Andy Lutomirski Cc: David Woodhouse Cc: H. Peter Anvin Cc: Ingo Molnar Cc: Konrad Rzeszutek Wilk Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20180921212041.13096-3-tedheadster@gmail.com commit 03b099bdcdf7125d4a63dc9ddeefdd454e05123d Author: Matthew Whitehead Date: Fri Sep 21 17:20:40 2018 -0400 x86/CPU: Use correct macros for Cyrix calls There are comments in processor-cyrix.h advising you to _not_ make calls using the deprecated macros in this style: setCx86_old(CX86_CCR4, getCx86_old(CX86_CCR4) | 0x80); This is because it expands the macro into a non-functioning calling sequence. The calling order must be: outb(CX86_CCR2, 0x22); inb(0x23); From the comments: * When using the old macros a line like * setCx86(CX86_CCR2, getCx86(CX86_CCR2) | 0x88); * gets expanded to: * do { * outb((CX86_CCR2), 0x22); * outb((({ * outb((CX86_CCR2), 0x22); * inb(0x23); * }) | 0x88), 0x23); * } while (0); The new macros fix this problem, so use them instead. Signed-off-by: Matthew Whitehead Signed-off-by: Borislav Petkov Reviewed-by: Andy Lutomirski Cc: Greg Kroah-Hartman Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Jia Zhang Cc: Peter Zijlstra Cc: Philippe Ombredanne Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20180921212041.13096-2-tedheadster@gmail.com commit f9c4c27f1be09b942288925dd689049511ab257f Author: Song Qiang Date: Thu Sep 20 21:49:46 2018 +0800 iio: magnetometer: hmc5843: Fixed a comment error. Replace 'hcm5843' with 'hmc5843'. Signed-off-by: Song Qiang Signed-off-by: Jonathan Cameron commit d3fa21c73c391975488818b085b894c2980ea052 Author: Alexey Khoroshilov Date: Sat Sep 22 00:58:02 2018 +0300 iio: adc: imx25-gcq: Fix leak of device_node in mx25_gcq_setup_cfgs() Leaving for_each_child_of_node loop we should release child device node, if it is not stored for future use. Found by Linux Driver Verification project (linuxtesting.org). JC: I'm not sending this as a quick fix as it's been wrong for years, but good to pick up for stable after the merge window. Signed-off-by: Alexey Khoroshilov Fixes: 6df2e98c3ea56 ("iio: adc: Add imx25-gcq ADC driver") Cc: Signed-off-by: Jonathan Cameron commit e2540da86ef83ed90e3c13e02c52991c515b12e5 Author: David Lechner Date: Tue Sep 18 12:08:50 2018 -0500 iio: adc: ti-ads7950: use SPI_CS_WORD to reduce CPU usage This changes how the SPI message for the triggered buffer is setup in the TI ADS7950 A/DC driver. By using the SPI_CS_WORD flag, we can read multiple samples in a single SPI transfer. If the SPI controller supports DMA transfers, we can see a significant reduction in CPU usage. For example, on an ARM9 system running at 456MHz reading just 4 channels at 100Hz: before this change, top shows the CPU usage of the IRQ thread of this driver to be ~7.7%. After this change, the CPU usage drops to ~3.8%. The use of big-endian for the raw data was cargo culted from another driver when this driver was originally written. It used an SPI word size of 8 bits and big-endian byte ordering to effectively emulate 16 bit words. Now, in order to inject a CS toggle between each word, we need to use the correct word size, otherwise we would get a CS toggle half way through each word 16-bit. The SPI subsystem uses CPU byte ordering for multi-byte words. So, the data we get back from the SPI is going to be CPU endian now no matter what. Converting that to big endian will just add overhead on little endian systems so we opt to change the raw data format from big endian to CPU endian. There is a small risk that this could break some lazy userspace programs that use the raw data without checking the data format. We can address this if/when it actually comes up. Signed-off-by: David Lechner Signed-off-by: Jonathan Cameron commit 7a5f0b3a08e323d93d17b0eca48048c970c6eae2 Merge: c8d5b9969639 cbaa62e0094a Author: Jonathan Cameron Date: Sat Sep 22 10:02:45 2018 +0100 Merge tag 'spi-cs-word' into togreg spi: Provide SPI_CS_WORD This provides a SPI operation mode which changes chip select after every word, used by some devices such as ADCs and DACs. commit bd4d08daeb959234a9f8365037b0fefa6ae790c6 Merge: e24cf6b3891c 55a4d2eac327 Author: David S. Miller Date: Fri Sep 21 20:01:20 2018 -0700 Merge branch 'net-dsa-b53-SGMII-modes-fixes' Florian Fainelli says: ==================== net: dsa: b53: SGMII modes fixes Here are two additional fixes that are required in order for SGMII to work correctly. This was discovered with using a copper SFP which would make us use SGMII mode, we would actually leave the HW configured in its default mode: Fiber. ==================== Signed-off-by: David S. Miller commit 55a4d2eac327fca4b22544f98d86d6e7b7981913 Author: Florian Fainelli Date: Fri Sep 21 16:43:59 2018 -0700 net: dsa: b53: Also include SGMII for mac_config and mac_link_state In both 802.3z and SGMII modes we need to configure the MAC accordingly to flip between Fiber and SGMII modes, and we need to read the MAC status from the SGMII in-band control word. Fixes: 0e01491de646 ("net: dsa: b53: Add SerDes support") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller commit 2cae8c07cb8c03a98aecbb8c7fb14c1922772adb Author: Florian Fainelli Date: Fri Sep 21 16:43:58 2018 -0700 net: dsa: b53: Fix B53_SERDES_DIGITAL_CONTROL offset Maths went wrong, to get 0x20, we need to do 0x1e + (x) * 2, not 0x18, fix that offset so we access the correct registers. This would make us not access the correct SerDes Digital control words, status would be fine and so we would not be correctly flipping between Fiber and SGMII modes resulting in incorrect status words being pulled into the SerDes digital status register. Fixes: 0e01491de646 ("net: dsa: b53: Add SerDes support") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller commit e24cf6b3891ca9f3f2ed2387adeda95e8364bf3e Author: Florian Fainelli Date: Fri Sep 21 15:30:05 2018 -0700 net: dsa: b53: Don't assign autonegotiation enabled PHYLINK takes care of filing the right information into state->an_enabled, get rid of the read from the SerDes's BMCR register. Fixes: 0e01491de646 ("net: dsa: b53: Add SerDes support") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller commit 5b9b0a80aa1aefecb0273563652fb373288a21cb Author: Nathan Chancellor Date: Fri Sep 21 12:30:34 2018 -0700 decnet: Remove unnecessary check for dev->name Clang warns that the address of a pointer will always evaluated as true in a boolean context. net/decnet/dn_dev.c:1366:10: warning: address of array 'dev->name' will always evaluate to 'true' [-Wpointer-bool-conversion] dev->name ? dev->name : "???", ~~~~~^~~~ ~ 1 warning generated. Link: https://github.com/ClangBuiltLinux/linux/issues/116 Signed-off-by: Nathan Chancellor Reviewed-by: Stephen Hemminger Signed-off-by: David S. Miller commit bccc17118bcf3c62c947361d51760334f6602f43 Author: Peter Oskolkov Date: Fri Sep 21 11:17:17 2018 -0700 selftests/net: add ipv6 tests to ip_defrag selftest This patch adds ipv6 defragmentation tests to ip_defrag selftest, to complement existing ipv4 tests. Signed-off-by: Peter Oskolkov Signed-off-by: David S. Miller commit 83619623929815a76fa7af49309d2cdfcf024fd3 Author: Peter Oskolkov Date: Fri Sep 21 11:17:16 2018 -0700 net/ipfrag: let ip[6]frag_high_thresh in ns be higher than in init_net Currently, ip[6]frag_high_thresh sysctl values in new namespaces are hard-limited to those of the root/init ns. There are at least two use cases when it would be desirable to set the high_thresh values higher in a child namespace vs the global hard limit: - a security/ddos protection policy may lower the thresholds in the root/init ns but allow for a special exception in a child namespace - testing: a test running in a namespace may want to set these thresholds higher in its namespace than what is in the root/init ns The new behavior: # ip netns add testns # ip netns exec testns bash # sysctl -w net.ipv4.ipfrag_high_thresh=9000000 net.ipv4.ipfrag_high_thresh = 9000000 # sysctl net.ipv4.ipfrag_high_thresh net.ipv4.ipfrag_high_thresh = 9000000 # sysctl -w net.ipv6.ip6frag_high_thresh=9000000 net.ipv6.ip6frag_high_thresh = 9000000 # sysctl net.ipv6.ip6frag_high_thresh net.ipv6.ip6frag_high_thresh = 9000000 The old behavior: # ip netns add testns # ip netns exec testns bash # sysctl -w net.ipv4.ipfrag_high_thresh=9000000 net.ipv4.ipfrag_high_thresh = 9000000 # sysctl net.ipv4.ipfrag_high_thresh net.ipv4.ipfrag_high_thresh = 4194304 # sysctl -w net.ipv6.ip6frag_high_thresh=9000000 net.ipv6.ip6frag_high_thresh = 9000000 # sysctl net.ipv6.ip6frag_high_thresh net.ipv6.ip6frag_high_thresh = 4194304 Signed-off-by: Peter Oskolkov Signed-off-by: David S. Miller commit 2475f59c618ea58e9f72ae5ded2db392ee47810d Author: Peter Oskolkov Date: Fri Sep 21 11:17:15 2018 -0700 ipv6: discard IP frag queue on more errors This is similar to how ipv4 now behaves: commit 0ff89efb5246 ("ip: fail fast on IP defrag errors"). Signed-off-by: Peter Oskolkov Signed-off-by: David S. Miller commit 075e264fa33e7838680802ba514a8d67433e48d1 Author: Eric Dumazet Date: Fri Sep 21 10:58:07 2018 -0700 net/ipv4: avoid compile error in fib_info_nh_uses_dev net/ipv4/fib_frontend.c: In function 'fib_info_nh_uses_dev': net/ipv4/fib_frontend.c:322:6: error: unused variable 'ret' [-Werror=unused-variable] cc1: all warnings being treated as errors Fixes: 78f2756c5fc0 ("net/ipv4: Move device validation to helper") Signed-off-by: Eric Dumazet Cc: David Ahern Reviewed-by: David Ahern Signed-off-by: David S. Miller commit a88e24f270ebed5499f10615e64c11ccd2210517 Merge: 4f4b93a88c9c 90caf67b01fa Author: David S. Miller Date: Fri Sep 21 19:38:00 2018 -0700 Merge branch 'tcp-switch-to-Early-Departure-Time-model' Eric Dumazet says: ==================== tcp: switch to Early Departure Time model In the early days, pacing has been implemented in sch_fq (FQ) in a generic way : - SO_MAX_PACING_RATE could be used by any sockets. - TCP would vary effective pacing rate based on CWND*MSS/SRTT - FQ would ensure delays between packets based on current sk->sk_pacing_rate, but with some quantum based artifacts. (inflating RPC tail latencies) - BBR then tweaked the pacing rate in its various phases (PROBE, DRAIN, ...) This worked reasonably well, but had the side effect that TCP RTT samples would be inflated by the sojourn time of the packets in FQ. Also note that when FQ is not used and TCP wants pacing, the internal pacing fallback has very different behavior, since TCP emits packets at the time they should be sent (with unreasonable assumptions about scheduling costs) Van Jacobson gave a talk at Netdev 0x12 in Montreal, about letting TCP (or applications for UDP messages) decide of the Earliest Departure Time, instead of letting packet schedulers derive it from pacing rate. https://www.netdevconf.org/0x12/session.html?evolving-from-afap-teaching-nics-about-time https://www.files.netdevconf.org/d/46def75c2ef345809bbe/files/?p=/Evolving%20from%20AFAP%20%E2%80%93%20Teaching%20NICs%20about%20time.pdf Recent additions in linux provided SO_TXTIME and a new ETF qdisc supporting the new skb->tstamp role This patch series converts TCP and FQ to the same model. This might in the future allow us to relax tight TSQ limits (if FQ is present in the output path), and thus lower number of callbacks to tcp_write_xmit(), thanks to batching. This will be followed by FQ change allowing SO_TXTIME support so that QUIC servers can let the pacing being done in FQ (or offloaded if network device permits) For example, a TCP flow rated at 24Mbps now shows a more meaningful RTT Before : ESTAB 0 211408 10.246.7.151:41558 10.246.7.152:33723 cubic wscale:8,8 rto:203 rtt:2.195/0.084 mss:1448 rcvmss:536 advmss:1448 cwnd:20 ssthresh:20 bytes_acked:36897937 segs_out:25488 segs_in:12454 data_segs_out:25486 send 105.5Mbps lastsnd:1 lastrcv:12851 lastack:1 pacing_rate 24.0Mbps/24.0Mbps delivery_rate 22.9Mbps busy:12851ms unacked:4 rcv_space:29200 notsent:205616 minrtt:0.026 After : ESTAB 0 192584 10.246.7.151:61612 10.246.7.152:34375 cubic wscale:8,8 rto:201 rtt:0.165/0.129 mss:1448 rcvmss:536 advmss:1448 cwnd:20 ssthresh:20 bytes_acked:170755401 segs_out:117931 segs_in:57651 data_segs_out:117929 send 1404.1Mbps lastsnd:1 lastrcv:56915 lastack:1 pacing_rate 24.0Mbps/24.0Mbps delivery_rate 24.2Mbps busy:56915ms unacked:4 rcv_space:29200 notsent:186792 minrtt:0.054 A nice side effect of this patch series is a reduction of max/p99 latencies of RPC workloads, since the FQ quantum no longer adds artifact. ==================== Signed-off-by: David S. Miller commit 90caf67b01fabdd51b6cdeeb23b29bf73901df90 Author: Eric Dumazet Date: Fri Sep 21 08:51:54 2018 -0700 net_sched: sch_fq: remove dead code dealing with retransmits With the earliest departure time model, we no longer plan special casing TCP retransmits. We therefore remove dead code (since most compilers understood skb_is_retransmit() was false) Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit c092dd5f4a7f4e4dbbcc8cf2e50b516bf07e432f Author: Eric Dumazet Date: Fri Sep 21 08:51:53 2018 -0700 tcp: switch tcp_internal_pacing() to tcp_wstamp_ns Now TCP keeps track of tcp_wstamp_ns, recording the earliest departure time of next packet, we can remove duplicate code from tcp_internal_pacing() This removes one ktime_get_tai_ns() call, and a divide. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit ab408b6dc7449c0f791e9e5f8de72fa7428584f2 Author: Eric Dumazet Date: Fri Sep 21 08:51:52 2018 -0700 tcp: switch tcp and sch_fq to new earliest departure time model TCP keeps track of tcp_wstamp_ns by itself, meaning sch_fq no longer has to do it. Thanks to this model, TCP can get more accurate RTT samples, since pacing no longer inflates them. This has the nice effect of removing some delays caused by FQ quantum mechanism, causing inflated max/P99 latencies. Also we might relax TCP Small Queue tight limits in the future, since this new model allow TCP to build bigger batches, since sch_fq (or a device with earliest departure time offload) ensure these packets will be delivered on time. Note that other protocols are not converted (they will probably never be) so sch_fq has still support for SO_MAX_PACING_RATE Tested: Test showing FQ pacing quantum artifact for low-rate flows, adding unexpected throttles for RPC flows, inflating max and P99 latencies. The parameters chosen here are to show what happens typically when a TCP flow has a reduced pacing rate (this can be caused by a reduced cwin after few losses, or/and rtt above few ms) MIBS="MIN_LATENCY,MEAN_LATENCY,MAX_LATENCY,P99_LATENCY,STDDEV_LATENCY" Before : $ netperf -H 10.246.7.133 -t TCP_RR -Cc -T6,6 -- -q 2000000 -r 100,100 -o $MIBS MIGRATED TCP REQUEST/RESPONSE TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 10.246.7.133 () port 0 AF_INET : first burst 0 : cpu bind Minimum Latency Microseconds,Mean Latency Microseconds,Maximum Latency Microseconds,99th Percentile Latency Microseconds,Stddev Latency Microseconds 19,82.78,5279,3825,482.02 After : $ netperf -H 10.246.7.133 -t TCP_RR -Cc -T6,6 -- -q 2000000 -r 100,100 -o $MIBS MIGRATED TCP REQUEST/RESPONSE TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 10.246.7.133 () port 0 AF_INET : first burst 0 : cpu bind Minimum Latency Microseconds,Mean Latency Microseconds,Maximum Latency Microseconds,99th Percentile Latency Microseconds,Stddev Latency Microseconds 20,49.94,128,63,3.18 Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit fd2bca2aa7893586887b2370e90e85bd0abc805e Author: Eric Dumazet Date: Fri Sep 21 08:51:51 2018 -0700 tcp: switch internal pacing timer to CLOCK_TAI Next patch will use tcp_wstamp_ns to feed internal TCP pacing timer, so switch to CLOCK_TAI to share same base. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit d3edd06ea8ea9e03de6567fda80b8be57e21a537 Author: Eric Dumazet Date: Fri Sep 21 08:51:50 2018 -0700 tcp: provide earliest departure time in skb->tstamp Switch internal TCP skb->skb_mstamp to skb->skb_mstamp_ns, from usec units to nsec units. Do not clear skb->tstamp before entering IP stacks in TX, so that qdisc or devices can implement pacing based on the earliest departure time instead of socket sk->sk_pacing_rate Packets are fed with tcp_wstamp_ns, and following patch will update tcp_wstamp_ns when both TCP and sch_fq switch to the earliest departure time mechanism. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit 9799ccb0e984a5c1311b22a212e7ff96e8b736de Author: Eric Dumazet Date: Fri Sep 21 08:51:49 2018 -0700 tcp: add tcp_wstamp_ns socket field TCP will soon provide earliest departure time on TX skbs. It needs to track this in a new variable. tcp_mstamp_refresh() needs to update this variable, and became too big to stay an inline. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit 142537e419234c396890a22806b8644dce21b132 Author: Eric Dumazet Date: Fri Sep 21 08:51:48 2018 -0700 net_sched: sch_fq: switch to CLOCK_TAI TCP will soon provide per skb->tstamp with earliest departure time, so that sch_fq does not have to determine departure time by looking at socket sk_pacing_rate. We chose in linux-4.19 CLOCK_TAI as the clock base for transports, qdiscs, and NIC offloads. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit 2fd66ffba50716fc5ab481c48db643af3bda2276 Author: Eric Dumazet Date: Fri Sep 21 08:51:47 2018 -0700 tcp: introduce tcp_skb_timestamp_us() helper There are few places where TCP reads skb->skb_mstamp expecting a value in usec unit. skb->tstamp (aka skb->skb_mstamp) will soon store CLOCK_TAI nsec value. Add tcp_skb_timestamp_us() to provide proper conversion when needed. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit 72b0094f918294e6cb8cf5c3b4520d928fbb1a57 Author: Eric Dumazet Date: Fri Sep 21 08:51:46 2018 -0700 tcp: switch tcp_clock_ns() to CLOCK_TAI base TCP pacing is either implemented in sch_fq or internally. We have the goal of being able to offload pacing on the NICS. TCP will soon provide per skb skb->tstamp as early departure time. Like ETF in commit 25db26a91364 ("net/sched: Introduce the ETF Qdisc") we chose CLOCK_T as the clock base, so that TCP and pacers can share a common clock, to get better RTT samples (without pacing artificially inflating these samples). Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit c7b1bf5cca76a31845a7d9e58cec7ff8f1cb0d4d Author: Bart Van Assche Date: Fri Sep 21 13:34:46 2018 -0700 blk-mq: Document the functions that iterate over requests Make it easier to understand the purpose of the functions that iterate over requests by documenting their purpose. Fix several minor spelling and grammer mistakes in comments in these functions. Signed-off-by: Bart Van Assche Reviewed-by: Johannes Thumshirn Cc: Christoph Hellwig Cc: Ming Lei Cc: Jianchao Wang Cc: Hannes Reinecke Signed-off-by: Jens Axboe commit 4f4b93a88c9cf40b3d8711cba062d2dd45f30896 Merge: b1589924c046 ebfefb8aa792 Author: David S. Miller Date: Fri Sep 21 19:29:33 2018 -0700 Merge branch 'hns3-next' Salil Mehta says: ==================== Bug fixes, snall modifications & cleanup for HNS3 driver This patch presents some bug fixes, small modifications and cleanups to the HNS3 VF and PF driver. ==================== Signed-off-by: David S. Miller commit ebfefb8aa792c74efaefe5e01f5f0bf9aae39e2d Author: Peng Li Date: Fri Sep 21 16:41:48 2018 +0100 net: hns3: Remove redundant hclge_get_port_type() This patch removes hclge_get_port_type which is redundant. Signed-off-by: Fuyun Liang Signed-off-by: Peng Li Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit 5f373b1585234bb15c7377076d01af2aed62d0a2 Author: Fuyun Liang Date: Fri Sep 21 16:41:47 2018 +0100 net: hns3: Fix speed/duplex information loss problem when executing ethtool ethx cmd of VF Our VF has not implemented the ops for get_port_type. So when we executing ethtool ethx cmd of VF, hns3_get_link_ksettings will return directly. And we can not query anything. To support get_link_ksettings for VF, this patch replaces get_port_type with get_media_type. If the media type is HNAE3_MEDIA_TYPE_NONE, hns3_get_link_ksettings will return link information of VF. Fixes: 12f46bc1d447 ("net: hns3: Refine hns3_get_link_ksettings()") Signed-off-by: Fuyun Liang Signed-off-by: Peng Li Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit c136b88425890030d7ba09a8e62abc29ed9b98da Author: Peng Li Date: Fri Sep 21 16:41:46 2018 +0100 net: hns3: Add get_media_type ops support for VF This patch adds the ops of get_media_type support for VF. Signed-off-by: Fuyun Liang Signed-off-by: Peng Li Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit 75e98535182df92908e469bdbe4e84e983c1113c Author: Jian Shen Date: Fri Sep 21 16:41:45 2018 +0100 net: hns3: Remove print messages for error packet There are already multiple types packets statistics for error packets, it's unnecessary to print them, which may affect the rx performance if print too many. Signed-off-by: Jian Shen Signed-off-by: Peng Li Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit 2211f4e1955f11df5fe8df24f5eeda5a5bbe6748 Author: Jian Shen Date: Fri Sep 21 16:41:44 2018 +0100 net: hns3: Add unlikely for dma_mapping_error check For dma_mapping_error is unlikely happened, this patch adds unlikely for dma_mapping_error check. Signed-off-by: Jian Shen Signed-off-by: Peng Li Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit 7a8101109dd37837f587cd56f3111d4fc17a07f5 Author: Jian Shen Date: Fri Sep 21 16:41:43 2018 +0100 net: hns3: Add nic state check before calling netif_tx_wake_queue When nic down, it firstly calls netif_tx_stop_all_queues(), then calls napi_disable(). But napi_disable() will wait current napi_poll finish, it may call netif_tx_wake_queue(). This patch fixes it by add nic state checking. Fixes: 424eb834a9be ("net: hns3: Unified HNS3 {VF|PF} Ethernet Driver for hip08 SoC") Signed-off-by: Jian Shen Signed-off-by: Peng Li Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit fa7a4bd564ccca06f17f5f509ab020ee973b4c72 Author: Jian Shen Date: Fri Sep 21 16:41:42 2018 +0100 net: hns3: Add handle for default case There are a few "switch-case" codes missed handle for default case. For some abnormal case, it should return error code instead of return 0. Signed-off-by: Jian Shen Signed-off-by: Peng Li Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit 6cee6fc38402fe49f1488ad7fab91309d9908da6 Author: Jian Shen Date: Fri Sep 21 16:41:41 2018 +0100 net: hns3: Unify the prefix of vf functions The prefix of most functions for vf are hclgevf. This patch renames the function with inconsistent prefix. Signed-off-by: Jian Shen Signed-off-by: Peng Li Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit b4f1d30327c831c4582a4e4672a06162ddfd3854 Author: Jian Shen Date: Fri Sep 21 16:41:40 2018 +0100 net: hns3: Fix tqp array traversal condition for vf There are two tqp_num variables "hdev->tqp_num" and "kinfo->tqp_num" used in VF. "hdev->tqp_num" is the total tqp number allocated to the VF, and "kinfo->tqp_num" indicates the tqp number being used by the VF. Usually the two variables are equal. But for the case hdev->tqp_num larger than rss_size_max, and num_tc is 1, "kinfo->tqp_num" will be less than "hdev->tqp_num". In original codes, "hdev->tqp_num" is always used to traverse the tqp array of kinfo. It may cause null pointer error when "hdev->tqp_num" is larger than "kinfo->tqp_num" Fixes: e2cb1dec9779 ("net: hns3: Add HNS3 VF HCL(Hardware Compatibility Layer) Support") Signed-off-by: Jian Shen Signed-off-by: Peng Li Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit 0c218123028f70f97e8419ed8b355fbc5a89b91c Author: Jian Shen Date: Fri Sep 21 16:41:39 2018 +0100 net: hns3: Adjust prefix of tx/rx statistic names Some prefix of tx/rx statistic names are redundant, this patch modifies these names. The new prefix looks like below: rxq#1_ -> rxq1_ txq#1_ -> txq1_ tx_dropped -> dropped tx_wake -> wake tx_busy -> busy rx_dropped -> dropped Signed-off-by: Jian Shen Signed-off-by: Peng Li Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit d0d72bac023937b5194b4739136940d2bdf53001 Author: Jian Shen Date: Fri Sep 21 16:41:38 2018 +0100 net: hns3: Unify the type convert for desc.data For desc.data is already point to the address of struct member "data[6]", it's unnecessary to use '&' to get its address. This patch unifies all the type convert for dest.data, using "req = (struct name *)dest.data". Signed-off-by: Jian Shen Signed-off-by: Peng Li Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit adefc0a2ff465f4ac4a88450fe69d336c8b074c5 Author: Jian Shen Date: Fri Sep 21 16:41:37 2018 +0100 net: hns3: Fix ets validate issue There is a defect in hclge_ets_validate(). If each member of tc_tsa is not IEEE_8021QAZ_TSA_ETS, the variable total_ets_bw won't be updated. In this case, the check for value of total_ets_bw will fail. This patch fixes it by checking total_ets_bw only after it has been updated. Fixes: cacde272dd00 ("net: hns3: Add hclge_dcb module for the support of DCB feature") Signed-off-by: Jian Shen Signed-off-by: Peng Li Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit 101246ec02b54adf6a77180a01ccbe310add2c32 Author: Dennis Zhou (Facebook) Date: Tue Sep 11 14:41:37 2018 -0400 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 b3b9f24f5fcc099c41f7dc1d02350635830888e5 Author: Dennis Zhou (Facebook) Date: Tue Sep 11 14:41:36 2018 -0400 blkcg: change blkg reference counting to use percpu_ref Now that every bio is associated with a blkg, this puts the use of blkg_get, blkg_try_get, and blkg_put on the hot path. This switches over the refcnt in blkg to use percpu_ref. Signed-off-by: Dennis Zhou Acked-by: Tejun Heo Signed-off-by: Jens Axboe commit e2b0989954ae7c80609f77e7ce203bea6d2c54e1 Author: Dennis Zhou (Facebook) Date: Tue Sep 11 14:41:35 2018 -0400 blkcg: cleanup and make blk_get_rl use blkg_lookup_create blk_get_rl is responsible for identifying which request_list a request should be allocated to. Try get logic was added earlier, but semantically the logic was not changed. This patch makes better use of the bio already having a reference to the blkg in the hot path. The cold path uses a better fallback of blkg_lookup_create rather than just blkg_lookup and then falling back to the q->root_rl. If lookup_create fails with anything but -ENODEV, it falls back to q->root_rl. A clarifying comment is added to explain why q->root_rl is used rather than the root blkg's rl. Signed-off-by: Dennis Zhou Acked-by: Tejun Heo Signed-off-by: Jens Axboe commit f0fcb3ec89f37167810e660b0595d9a6155d9807 Author: Dennis Zhou (Facebook) Date: Tue Sep 11 14:41:34 2018 -0400 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. Acked-by: Tejun Heo Signed-off-by: Dennis Zhou Signed-off-by: Jens Axboe commit c839e7a03f92bafd71fd145b470dcdc7f43f2d4c Author: Dennis Zhou (Facebook) Date: Tue Sep 11 14:41:33 2018 -0400 blkcg: remove bio->bi_css and instead use bio->bi_blkg Prior patches ensured that all bios are now associated with some blkg. This now makes bio->bi_css unnecessary as blkg maintains a reference to the blkcg already. This patch removes the 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 bdc2491708c47601603918a9a20acddef6e1d814 Author: Dennis Zhou (Facebook) Date: Tue Sep 11 14:41:32 2018 -0400 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, the wbc_init_bio call is changed such that it must be called after a queue has been associated with the bio. Signed-off-by: Dennis Zhou Reviewed-by: Josef Bacik Acked-by: Tejun Heo Signed-off-by: Jens Axboe commit 74b7c02a9bc124ee3df0d77880ee26db0a325516 Author: Dennis Zhou (Facebook) Date: Tue Sep 11 14:41:31 2018 -0400 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 5bf9a1f3b4efef7e463105dde8bba4d2397909c2 Author: Dennis Zhou (Facebook) Date: Tue Sep 11 14:41:30 2018 -0400 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 Signed-off-by: Jens Axboe commit a7b39b4e961c4e2b3ed837803a7441a65c90ce33 Author: Dennis Zhou (Facebook) Date: Tue Sep 11 14:41:29 2018 -0400 blkcg: always associate a bio with a blkg Previously, blkg's were only assigned as needed by blk-iolatency and blk-throttle. bio->css was also always being associated while blkg was being looked up and then thrown away in blkcg_bio_issue_check. This patch begins the cleanup of bio->css and bio->bi_blkg by always associating a blkg in blkcg_bio_issue_check. This tries to create the blkg, but if it is not possible, falls back to using the root_blkg of the request_queue. Therefore, a bio will always be associated with a blkg. The duplicate association logic is removed from blk-throttle and blk-iolatency. Signed-off-by: Dennis Zhou Acked-by: Tejun Heo Signed-off-by: Jens Axboe commit 07b05bcc3213ac9f8c28c9d835b4bf3d5798cc60 Author: Dennis Zhou (Facebook) Date: Tue Sep 11 14:41:28 2018 -0400 blkcg: convert blkg_lookup_create to find closest blkg There are several scenarios where blkg_lookup_create can fail. Examples include the blkcg dying, request_queue is dying, or simply being OOM. At the end of the day, 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. Acked-by: Tejun Heo Signed-off-by: Dennis Zhou Signed-off-by: Jens Axboe commit 49f4c2dc2b5066e9211101c59cc0828e81d41614 Author: Dennis Zhou (Facebook) Date: Tue Sep 11 14:41:27 2018 -0400 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 then do a 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 27e6fa996c534c32702aa4d32db0ffa383acd050 Author: Dennis Zhou (Facebook) Date: Tue Sep 11 14:41:26 2018 -0400 blkcg: fix ref count issue with bio_blkcg using task_css The accessor function bio_blkcg either returns the blkcg associated with the bio or finds one in the current context. This can cause an issue when trying to associate a bio with a blkcg. Particularly, it's the third case that is problematic: return css_to_blkcg(task_css(current, io_cgrp_id)); As the above may race against task migration and the cgroup exiting, it is not always ok to take a reference on the blkcg returned from bio_blkcg. 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. blk_get_rl is modified as well to get a reference to the blkcg it may use and blk_put_rl will always put the reference back. Association is also moved above the bio_blkcg call to ensure it will not return NULL in blk-iolatency. BFQ and CFQ utilize this flaw, but due to the complexity, I do not want to address this in this series. I've created a private version of the function with notes not to use it describing the flaw. Hopefully soon, that code can be cleaned up. Signed-off-by: Dennis Zhou Acked-by: Tejun Heo Signed-off-by: Jens Axboe commit b1589924c046a5e774c6c74b195213555617bb78 Author: Biju Das Date: Fri Sep 21 15:25:43 2018 +0100 dt-bindings: net: ravb: Add support for r8a7744 SoC Document RZ/G1N (R8A7744) SoC bindings. Signed-off-by: Biju Das Reviewed-by: Fabrizio Castro Reviewed-by: Sergei Shtylyov Signed-off-by: David S. Miller commit 65c5877f64623dcb603082e7b3533a25a2601f1b Author: Andrew Lunn Date: Fri Sep 21 15:52:26 2018 +0200 ravb: Disable Pause Advertisement The previous commit to ravb had the side effect of making the PHY advertise Pause and Asym Pause, which previously did not happen. By default, phydev->supported has both forms of pause enabled, but phydev->advertising does not. The new phy_remove_link_mode() copies phydev->supported to phydev->advertising after removing the requested link mode. These Pause configuration bits appears it stops the PHY from completing Auto-Neg and the link remains down. Be explicit and remove the Pause and Asym Pause modes, so restoring the old behavior. Fixes: 41124fa64d4b ("net: ethernet: Add helper to remove a supported link mode") Reported-by: Simon Horman Signed-off-by: Andrew Lunn Reviewed-by: Sergei Shtylyov Signed-off-by: David S. Miller commit b4d0782440ed38c14ff145ead241d5fcc95a37b7 Merge: a42055e8d2c3 6a12709da354 Author: David S. Miller Date: Fri Sep 21 19:22:32 2018 -0700 Merge branch 'net-if_arp-use-define-instead-of-hard-coded-value' Håkon Bugge says: ==================== net: if_arp: use define instead of hard-coded value Struct arpreq contains the name of the device. All other places in the kernel, the define IFNAMSIZ is used to designate its size. But in if_arp.h, a literal constant is used. As it could be good reasons to use constants instead of the defines in include files under uapi, it seems to be OK to use the define here, without opening a can of worms in user-land. This because if_arp.h includes netdevice.h, which also uses IFNAMSIZ. For the distros I have checked, this also holds true for the use-land side. The series also fixes some incorrect indents. ==================== Signed-off-by: David S. Miller commit 6a12709da354ea149fdf86c4c9aba5b5033e9cf2 Author: Håkon Bugge Date: Fri Sep 21 12:39:30 2018 +0200 net: if_arp: use define instead of hard-coded value uapi/linux/if_arp.h includes linux/netdevice.h, which uses IFNAMSIZ. Hence, use it instead of hard-coded value. Signed-off-by: Håkon Bugge Signed-off-by: David S. Miller commit 30f8eb55873ef078f5f02f636061d9399debbeab Author: Håkon Bugge Date: Fri Sep 21 12:39:29 2018 +0200 net: if_arp: Fix incorrect indents Fixing incorrect indents and align comments. Signed-off-by: Håkon Bugge Signed-off-by: David S. Miller commit a42055e8d2c30d4decfc13ce943d09c7b9dad221 Author: Vakul Garg Date: Fri Sep 21 09:46:13 2018 +0530 net/tls: Add support for async encryption of records for performance In current implementation, tls records are encrypted & transmitted serially. Till the time the previously submitted user data is encrypted, the implementation waits and on finish starts transmitting the record. This approach of encrypt-one record at a time is inefficient when asynchronous crypto accelerators are used. For each record, there are overheads of interrupts, driver softIRQ scheduling etc. Also the crypto accelerator sits idle most of time while an encrypted record's pages are handed over to tcp stack for transmission. This patch enables encryption of multiple records in parallel when an async capable crypto accelerator is present in system. This is achieved by allowing the user space application to send more data using sendmsg() even while previously issued data is being processed by crypto accelerator. This requires returning the control back to user space application after submitting encryption request to accelerator. This also means that zero-copy mode of encryption cannot be used with async accelerator as we must be done with user space application buffer before returning from sendmsg(). There can be multiple records in flight to/from the accelerator. Each of the record is represented by 'struct tls_rec'. This is used to store the memory pages for the record. After the records are encrypted, they are added in a linked list called tx_ready_list which contains encrypted tls records sorted as per tls sequence number. The records from tx_ready_list are transmitted using a newly introduced function called tls_tx_records(). The tx_ready_list is polled for any record ready to be transmitted in sendmsg(), sendpage() after initiating encryption of new tls records. This achieves parallel encryption and transmission of records when async accelerator is present. There could be situation when crypto accelerator completes encryption later than polling of tx_ready_list by sendmsg()/sendpage(). Therefore we need a deferred work context to be able to transmit records from tx_ready_list. The deferred work context gets scheduled if applications are not sending much data through the socket. If the applications issue sendmsg()/sendpage() in quick succession, then the scheduling of tx_work_handler gets cancelled as the tx_ready_list would be polled from application's context itself. This saves scheduling overhead of deferred work. The patch also brings some side benefit. We are able to get rid of the concept of CLOSED record. This is because the records once closed are either encrypted and then placed into tx_ready_list or if encryption fails, the socket error is set. This simplifies the kernel tls sendpath. However since tls_device.c is still using macros, accessory functions for CLOSED records have been retained. Signed-off-by: Vakul Garg Signed-off-by: David S. Miller commit 06983aa526c759ebdf43f202d8d0491d9494e2f4 Author: YueHaibing Date: Fri Sep 21 10:50:32 2018 +0800 net: freescale: 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: David S. Miller commit 2b49117a5abee8478b0470cba46ac74f93b4a479 Author: YueHaibing Date: Fri Sep 21 10:42:15 2018 +0800 net: micrel: 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: David S. Miller commit b78ac6ecd1b6b46f8767cbafa95a7b0b51b87ad8 Author: Florian Fainelli Date: Thu Sep 20 17:05:40 2018 -0700 net: phy: mdio-bcm-unimac: Allow configuring MDIO clock divider Allow the configuration of the MDIO clock divider when the Device Tree contains 'clock-frequency' property (similar to I2C and SPI buses). Because the hardware may have lost its state during suspend/resume, re-apply the MDIO clock divider upon resumption. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller commit 94e7c844990f0db92418586b107be135b4963b66 Author: Nathan Chancellor Date: Thu Sep 20 15:48:30 2018 -0700 net: lan78xx: Avoid unnecessary self assignment Clang warns when a variable is assigned to itself. drivers/net/usb/lan78xx.c:940:11: warning: explicitly assigning value of variable of type 'u32' (aka 'unsigned int') to itself [-Wself-assign] offset = offset; ~~~~~~ ^ ~~~~~~ 1 warning generated. Reorder the if statement to acheive the same result and avoid a self assignment warning. Link: https://github.com/ClangBuiltLinux/linux/issues/129 Signed-off-by: Nathan Chancellor Signed-off-by: David S. Miller commit 6b8e327cfa2dfb9da2bd70326494a1f5ca9968f7 Author: Nathan Chancellor Date: Thu Sep 20 15:36:33 2018 -0700 net: fddi: skfp: Remove unused function Clang warns when a variable is assigned to itself. drivers/net/fddi/skfp/pcmplc.c:1257:6: warning: explicitly assigning value of variable of type 'int' to itself [-Wself-assign] phy = phy ; on_off = on_off ; ~~~ ^ ~~~ drivers/net/fddi/skfp/pcmplc.c:1257:21: warning: explicitly assigning value of variable of type 'int' to itself [-Wself-assign] phy = phy ; on_off = on_off ; ~~~~~~ ^ ~~~~~~ 2 warnings generated. Turns out this entire function doesn't actually do anything since SK_UNUSED is just casting the pointer to void. Remove it to silence this Clang warning. Link: https://github.com/ClangBuiltLinux/linux/issues/128 Signed-off-by: Nathan Chancellor Signed-off-by: David S. Miller commit 83b4768e1b6bd92a94b15ccb22762c686f5ede38 Author: Nathan Chancellor Date: Thu Sep 20 15:24:59 2018 -0700 bna: Remove unnecessary self assignment Clang warns when a variable is assigned to itself. drivers/net/ethernet/brocade/bna/bna_enet.c:1800:9: warning: explicitly assigning value of variable of type 'int' to itself [-Wself-assign] for (i = i; i < (bna->ioceth.attr.num_ucmac * 2); i++) ~ ^ ~ drivers/net/ethernet/brocade/bna/bna_enet.c:1835:9: warning: explicitly assigning value of variable of type 'int' to itself [-Wself-assign] for (i = i; i < (bna->ioceth.attr.num_mcmac * 2); i++) ~ ^ ~ 2 warnings generated. Link: https://github.com/ClangBuiltLinux/linux/issues/110 Signed-off-by: Nathan Chancellor Signed-off-by: David S. Miller commit b1e51eabf9ec0bdeeaa86d9589749115d78e3a50 Author: Nathan Chancellor Date: Thu Sep 20 13:37:33 2018 -0700 net: neterion: vxge: Remove unnecessary parentheses Clang warns when multiple pairs of parentheses are used for a single conditional statement. drivers/net/ethernet/neterion/vxge/vxge-traffic.c:2265:31: warning: equality comparison with extraneous parentheses [-Wparentheses-equality] if ((hldev->config.intr_mode == VXGE_HW_INTR_MODE_MSIX_ONE_SHOT)) ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/neterion/vxge/vxge-traffic.c:2265:31: note: remove extraneous parentheses around the comparison to silence this warning if ((hldev->config.intr_mode == VXGE_HW_INTR_MODE_MSIX_ONE_SHOT)) ~ ^ ~ drivers/net/ethernet/neterion/vxge/vxge-traffic.c:2265:31: note: use '=' to turn this equality comparison into an assignment if ((hldev->config.intr_mode == VXGE_HW_INTR_MODE_MSIX_ONE_SHOT)) ^~ = 1 warning generated. Link: https://github.com/ClangBuiltLinux/linux/issues/124 Signed-off-by: Nathan Chancellor Signed-off-by: David S. Miller commit 075ddebc3283e83ac56fcc8f4bb44c15cef0d7ce Author: Heiner Kallweit Date: Thu Sep 20 22:34:25 2018 +0200 net: phy: don't reschedule state machine when PHY is halted When being in state PHY_HALTED we don't have to reschedule the state machine, phy_start() will start it again. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 7979472bba8bf63f0f76a37d48d59a26210d9bee Author: Romain Aviolat Date: Thu Sep 20 21:33:08 2018 +0200 DRIVERS: net: macsec: Fix multiple coding style issues This patch fixes a couple of issues highlighted by checkpatch.pl: * Missing a blank line after declarations * Alignment should match open parenthesis Signed-off-by: Romain Aviolat Signed-off-by: David S. Miller commit f9882bb5060b956a22c4ce6d477f9860128c0f08 Merge: 26f91da29650 0042f9e458a5 Author: Doug Ledford Date: Fri Sep 21 20:41:58 2018 -0400 Merge branch 'mlx5-vport-loopback' into rdma.get For dependencies, branch based on 'mlx5-next' of git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux.git mlx5 mcast/ucast loopback control enhancements from Leon Romanovsky: ==================== This is short series from Mark which extends handling of loopback traffic. Originally mlx5 IB dynamically enabled/disabled both unicast and multicast based on number of users. However RAW ethernet QPs need more granular access. ==================== Fixed failed automerge in mlx5_ib.h (minor context conflict issue) mlx5-vport-loopback branch: RDMA/mlx5: Enable vport loopback when user context or QP mandate RDMA/mlx5: Allow creating RAW ethernet QP with loopback support RDMA/mlx5: Refactor transport domain bookkeeping logic net/mlx5: Rename incorrect naming in IFC file Signed-off-by: Doug Ledford commit 0042f9e458a560e13c1da2211cf6429e0c7dd812 Author: Mark Bloch Date: Mon Sep 17 13:30:49 2018 +0300 RDMA/mlx5: Enable vport loopback when user context or QP mandate A user can create a QP which can accept loopback traffic, but that's not enough. We need to enable loopback on the vport as well. Currently vport loopback is enabled only when more than 1 users are using the IB device, update the logic to consider whatever a QP which supports loopback was created, if so enable vport loopback even if there is only a single user. Signed-off-by: Mark Bloch Reviewed-by: Yishai Hadas Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford commit 175edba85634a8be0ddab5ee96d0b23d9f17627e Author: Mark Bloch Date: Mon Sep 17 13:30:48 2018 +0300 RDMA/mlx5: Allow creating RAW ethernet QP with loopback support Expose two new flags: MLX5_QP_FLAG_TIR_ALLOW_SELF_LB_UC MLX5_QP_FLAG_TIR_ALLOW_SELF_LB_MC Those flags can be used at creation time in order to allow a QP to be able to receive loopback traffic (unicast and multicast). We store the state in the QP to be used on the destroy path to indicate with which flags the QP was created with. Signed-off-by: Mark Bloch Reviewed-by: Yishai Hadas Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford commit a560f1d9af4be84ee91d1a47382cacf620eb4a79 Author: Mark Bloch Date: Mon Sep 17 13:30:47 2018 +0300 RDMA/mlx5: Refactor transport domain bookkeeping logic In preparation to enable loopback on a single user context move the logic that enables/disables loopback to separate functions and group variables under a single struct. Signed-off-by: Mark Bloch Reviewed-by: Yishai Hadas Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford commit 5d773ff41a7cdf0ef6cc6647435d59f0cf53e7b1 Author: Mark Bloch Date: Mon Sep 17 13:30:46 2018 +0300 net/mlx5: Rename incorrect naming in IFC file Remove a trailing underscore from the multicast/unicast names. Signed-off-by: Mark Bloch Reviewed-by: Yishai Hadas Signed-off-by: Leon Romanovsky commit dc57aaf95a516f70e2d527d8287a0332c481a226 Author: Dengcheng Zhu Date: Tue Sep 11 14:49:20 2018 -0700 MIPS: kexec: Mark CPU offline before disabling local IRQ After changing CPU online status, it will not be sent any IPIs such as in __flush_cache_all() on software coherency systems. Do this before disabling local IRQ. Signed-off-by: Dengcheng Zhu Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/20571/ Cc: pburton@wavecomp.com Cc: ralf@linux-mips.org Cc: linux-mips@linux-mips.org Cc: rachel.mozes@intel.com commit 788758d1fe874fd20ecb0ab490552d94c024a9de Author: zhong jiang Date: Thu Sep 20 17:46:12 2018 +0800 bpf: remove redundant null pointer check before consume_skb consume_skb has taken the null pointer into account. hence it is safe to remove the redundant null pointer check before consume_skb. Signed-off-by: zhong jiang Acked-by: Song Liu Signed-off-by: Daniel Borkmann commit 32c009798385ce21080beaa87a9b95faad3acd1e Author: Prashant Bhole Date: Thu Sep 20 16:52:03 2018 +0900 samples/bpf: fix compilation failure following commit: commit d58e468b1112 ("flow_dissector: implements flow dissector BPF hook") added struct bpf_flow_keys which conflicts with the struct with same name in sockex2_kern.c and sockex3_kern.c similar to commit: commit 534e0e52bc23 ("samples/bpf: fix a compilation failure") we tried the rename it "flow_keys" but it also conflicted with struct having same name in include/net/flow_dissector.h. Hence renaming the struct to "flow_key_record". Also, this commit doesn't fix the compilation error completely because the similar struct is present in sockex3_kern.c. Hence renaming it in both files sockex3_user.c and sockex3_kern.c Signed-off-by: Prashant Bhole Acked-by: Song Liu Signed-off-by: Daniel Borkmann commit 24966d4c619e2fffa34632ff3df6ef3764e4e6e5 Author: Andrzej Hajda Date: Fri Sep 21 15:13:55 2018 +0200 arm64: dts: exynos: Add OF graph between USB-PHY and MUIC OF graph describes USB data lanes between USB-PHY and respective MUIC. Since graph is present and DWC driver can use it to get extcon, obsolete extcon property can be removed. Signed-off-by: Andrzej Hajda Signed-off-by: Krzysztof Kozlowski commit c4eed62a214330908eec11b0dc170d34fa50b412 Author: Keith Busch Date: Thu Sep 20 10:27:11 2018 -0600 PCI/ERR: Use slot reset if available The secondary bus reset may have link side effects that a hotplug capable port may incorrectly react to. Use the slot specific reset for hotplug ports, fixing the undesirable link down-up handling during error recovering. Signed-off-by: Keith Busch [bhelgaas: fold in https://lore.kernel.org/linux-pci/20180926152326.14821-1-keith.busch@intel.com for issue reported by Stephen Rothwell ] Signed-off-by: Bjorn Helgaas Reviewed-by: Sinan Kaya commit 9d938ea53b265ed6df6cdd1715d971f0235fdbfc Author: Keith Busch Date: Thu Sep 20 10:27:10 2018 -0600 PCI/AER: Don't read upstream ports below fatal errors The AER driver has never read the config space of an endpoint that reported a fatal error because the link to that device is considered unreliable. An ERR_FATAL from an upstream port almost certainly indicates an error on its upstream link, so we can't expect to reliably read its config space for the same reason. Signed-off-by: Keith Busch Signed-off-by: Bjorn Helgaas Reviewed-by: Sinan Kaya commit 60271ab044a53edb9dcbe76bebea2221c4ff04d9 Author: Keith Busch Date: Thu Sep 20 10:27:09 2018 -0600 PCI/AER: Take reference on error devices Error handling may be running in parallel with a hot removal. Reference count the device during AER handling so the device can not be freed while AER wants to reference it. Signed-off-by: Keith Busch Signed-off-by: Bjorn Helgaas Reviewed-by: Sinan Kaya commit 15a0c64572463eddf59e80aa643d3a87809a7d9b Author: Kuninori Morimoto Date: Fri Sep 21 05:23:17 2018 +0000 ASoC: add for_each_component_dais() macro To be more readable code, this patch adds new for_each_component_dais() macro, and replace existing code to it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit 368dee9459472b44f760a35cd07a6f3b90b3e549 Author: Kuninori Morimoto Date: Fri Sep 21 05:23:01 2018 +0000 ASoC: add for_each_component() macro To be more readable code, this patch adds new for_each_component() macro, and replace existing code to it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit 624d1a7cd8991e33dad96ab4629a52c412540e65 Author: Dmytro Prokopchuk Date: Fri Sep 21 04:59:59 2018 +0000 ASoC: rsnd: fixup SSI clock during suspend/resume modes Prepare <-> Cleanup functions pair has balanced calls. But in case of suspend mode no call to rsnd_soc_dai_shutdown() function, so cleanup isn't called. OTOH during resume mode function rsnd_soc_dai_prepare() is called, but calling rsnd_ssi_prepare() is skipped (rsnd_status_update() returns zero, bacause was not cleanup before). We need to call rsnd_ssi_prepare(), because it enables SSI clocks by calling rsnd_ssi_master_clk_start(). This patch allows to call prepare/cleanup functions always. Signed-off-by: Dmytro Prokopchuk Tested-by: Hiroyuki Yokoyama [kuninori: adjusted to upstream] Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit c78d42c7fbd6f2a27a665bcd1ab60c9df617f7c9 Author: zhong jiang Date: Fri Sep 21 18:24:58 2018 +0800 ASoC: qcom: qdsp6: remove duplicated include from q6adm.c We include wait.h twice in q6adm.c. it is unnecessary. hence remove it. Further, order the include files as alphabet. Signed-off-by: zhong jiang Signed-off-by: Mark Brown commit 0310820c2738e92003d9dd8cabee77ff958a16dc Author: Kuninori Morimoto Date: Fri Sep 21 07:46:28 2018 +0000 ASoC: tidyup for_each_card_prelinks() dai_link commit 7fe072b4df5d0 ("ASoC: add for_each_card_prelinks() macro") added new for_each_card_prelinks() macro, but it had typo. This patch fixup it Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit a4925311a5443126ecc90671a1604ea7b0f5b32e Author: YueHaibing Date: Fri Sep 21 09:59:41 2018 +0800 pinctrl: sunxi: fix 'pctrl->functions' allocation in sunxi_pinctrl_build_state fixes following Smatch static check warning: ./drivers/pinctrl/sunxi/pinctrl-sunxi.c:1112 sunxi_pinctrl_build_state() warn: passing devm_ allocated variable to kfree. 'pctrl->functions' As we will be calling krealloc() on pointer 'pctrl->functions', which means kfree() will be called in there, devm_kzalloc() shouldn't be used with the allocation in the first place. Fix the warning by calling kcalloc() and managing the free procedure in error path on our own. Fixes: 0e37f88d9ad8 ("ARM: sunxi: Add pinctrl driver for Allwinner SoCs") Signed-off-by: YueHaibing Acked-by: Maxime Ripard Signed-off-by: Linus Walleij commit 957b085c793c09b86399c95086d44b2b97dbd6bb Merge: 66ab23598696 ea65949e1988 Author: David S. Miller Date: Fri Sep 21 09:14:21 2018 -0700 Merge branch 'bnx2x-enhancements' Shahed Shaikh says: ==================== bnx2x: enhancements This series adds below changes - - support for VF spoof-check configuration through .ndo_set_vf_spoofchk. - workaround for MFW bug regarding unexpected bandwidth notifcation in single function mode. - supply VF link status as part of get VF config handling. ==================== Signed-off-by: Shahed Shaikh Signed-off-by: Ariel Elior commit ea65949e1988a686976496bcf26471ff22d821d8 Author: Shahed Shaikh Date: Thu Sep 20 11:22:52 2018 -0700 bnx2x: Provide VF link status in ndo_get_vf_config Provide current link status of VF in ndo_get_vf_config handler. Signed-off-by: Shahed Shaikh Signed-off-by: Ariel Elior Signed-off-by: David S. Miller commit 75a110a1783ef8324ffd763b24f4ac268253cbca Author: Shahed Shaikh Date: Thu Sep 20 11:22:51 2018 -0700 bnx2x: Ignore bandwidth attention in single function mode This is a workaround for FW bug - MFW generates bandwidth attention in single function mode, which is only expected to be generated in multi function mode. This undesired attention in SF mode results in incorrect HW configuration and resulting into Tx timeout. Signed-off-by: Shahed Shaikh Signed-off-by: Ariel Elior Signed-off-by: David S. Miller commit 753039650455b0efcbbcc3f1f28ac429f9edd717 Author: Shahed Shaikh Date: Thu Sep 20 11:22:50 2018 -0700 bnx2x: Add VF spoof-checking configuration Add support for `ndo_set_vf_spoofchk' to allow PF control over its VF spoof-checking configuration. Signed-off-by: Shahed Shaikh Signed-off-by: Ariel Elior Signed-off-by: David S. Miller commit bb8d8466ca25d6851e3e9a703d4db13c84428b43 Author: Mars Cheng Date: Fri Sep 21 12:07:38 2018 +0800 pinctrl: mediatek: add eint support to MT6765 pinctrl driver Just add eint support to MT6765 pinctrl driver as usual as happens on the other SoCs. Signed-off-by: Mars Cheng Signed-off-by: Sean Wang Signed-off-by: Linus Walleij commit 477fecee7ca9c633a4a2e8ddf4c1ae1d30fc6b26 Author: ZH Chen Date: Fri Sep 21 12:07:37 2018 +0800 pinctrl: mediatek: add MT6765 pinctrl driver Add MT6765 pinctrl driver based on MediaTek pinctrl-paris core. Signed-off-by: Mars Cheng Signed-off-by: ZH Chen Signed-off-by: Sean Wang Signed-off-by: Linus Walleij commit ecfcfb49886069013c0a0ebd11954bc7e5eadd64 Author: Mars Cheng Date: Fri Sep 21 12:07:36 2018 +0800 pinctrl: mediatek: add no eint function for pin define Add NO_EINT_SUPPORT back to pinctrl-mtk-common-v2.h as the alias of EINT_NA to indicate that some pin not capable of being controlled as eint and that is required by pinctrl-paris based driver as old pinctrl-mtk-common.h already had. Signed-off-by: Mars Cheng Signed-off-by: Sean Wang Signed-off-by: Linus Walleij commit 7f2e29e133ea981d90fb6ee8f5fadf8b0e2bb366 Author: Sean Wang Date: Fri Sep 21 12:07:35 2018 +0800 pinctrl: mediatek: fix static checker warning caused by EINT_NA EINT_NA is an u16 number, so it should be U16_MAX instead of -1 to fix up drivers/pinctrl/mediatek/pinctrl-paris.c:732 mtk_gpio_to_irq() warn: impossible condition (desc->eint.eint_n == -1) => (0-u16max == (-1)) Also happens in drivers/pinctrl/mediatek/pinctrl-paris.c:749 mtk_gpio_set_config() warn: impossible condition (desc->eint.eint_n == -1) => (0-u16max == (-1)) drivers/pinctrl/mediatek/pinctrl-moore.c:479 mtk_gpio_to_irq() warn: impossible condition (desc->eint.eint_n == -1) => (0-u16max == (-1)) drivers/pinctrl/mediatek/pinctrl-moore.c:496 mtk_gpio_set_config() warn: impossible condition '(desc->eint.eint_n == -1) => (0-u16max == (-1)) Fixes: 6561859b067f ("pinctrl: mediatek: add eint support to MT8183 pinctrl driver") Reported-by: Dan Carpenter Signed-off-by: Sean Wang Signed-off-by: Linus Walleij commit 66ab23598696072c19344591f8d9846332e66e23 Author: zhong jiang Date: Thu Sep 20 22:27:28 2018 +0800 mISDN: remove redundant null pointer check before kfree_skb kfree_skb has taken the null pointer into account. hence it is safe to remove the redundant null pointer check before kfree_skb. Signed-off-by: zhong jiang Signed-off-by: David S. Miller commit 068cfb9a0fd908747f29d048719f254e21b9dad5 Author: Wei Yongjun Date: Thu Sep 20 06:21:50 2018 +0000 pinctrl: mediatek: moore: fix return value check in mtk_moore_pinctrl_probe() In case of error, the function devm_kmalloc_array() returns NULL pointer not ERR_PTR(). The IS_ERR() test in the return value check should be replaced with NULL test. Fixes: b7d7f9eeca55 ("pinctrl: mediatek: extend struct mtk_pin_desc which per-pin driver depends on") Signed-off-by: Wei Yongjun Acked-by: Sean Wang Signed-off-by: Linus Walleij commit 8a1aff144d37af492034a9a11a8c6ad3b687a441 Author: Dan Carpenter Date: Thu Sep 20 13:01:59 2018 +0300 vhost_net: add a missing error return We accidentally left out this error return so it leads to some use after free bugs later on. Fixes: 0a0be13b8fe2 ("vhost_net: batch submitting XDP buffers to underlayer sockets") Signed-off-by: Dan Carpenter Acked-by: Michael S. Tsirkin Acked-by: Jason Wang Signed-off-by: David S. Miller commit 1ba2a720da72b11435dbe278c6ab83aac75734e5 Merge: 68c385079cb3 f2a2f2166af8 Author: David S. Miller Date: Fri Sep 21 09:04:38 2018 -0700 Merge branch 'kfree_skb-NULL' zhong jiang says: ==================== net: remove redundant null pointer check before kfree_skb The issue is detected with the help of Coccinelle. ==================== Signed-off-by: David S. Miller commit f2a2f2166af8df04cf87127b6c63f1f4c64a8430 Author: zhong jiang Date: Thu Sep 20 17:37:46 2018 +0800 ipv6: remove redundant null pointer check before kfree_skb kfree_skb has taken the null pointer into account. hence it is safe to remove the redundant null pointer check before kfree_skb. Signed-off-by: zhong jiang Signed-off-by: David S. Miller commit 673eed0c18341383ee0b5131935185f6f2bd6278 Author: zhong jiang Date: Thu Sep 20 17:37:45 2018 +0800 net: cxgb3_main: remove redundant null pointer check before kfree_skb kfree_skb has taken the null pointer into account. hence it is safe to remove the redundant null pointer check before kfree_skb. Signed-off-by: zhong jiang Signed-off-by: David S. Miller commit e3c3215e41f60f9debb17f920e4da7cb3a82a55b Author: zhong jiang Date: Thu Sep 20 17:37:44 2018 +0800 net: nci: remove redundant null pointer check before kfree_skb kfree_skb has taken the null pointer into account. hence it is safe to remove the redundant null pointer check before kfree_skb. Signed-off-by: zhong jiang Signed-off-by: David S. Miller commit 1d08962ff1e65e29019e5df07188413a85769a9d Author: zhong jiang Date: Thu Sep 20 17:37:43 2018 +0800 ipv4: remove redundant null pointer check before kfree_skb kfree_skb has taken the null pointer into account. hence it is safe to remove the redundant null pointer check before kfree_skb. Signed-off-by: zhong jiang Signed-off-by: David S. Miller commit 16a3f50f05985cbea468e043cd18394158eff820 Author: zhong jiang Date: Thu Sep 20 17:37:42 2018 +0800 net: cxgb3: remove redundant null pointer check before kfree_skb kfree_skb has taken the null pointer into account. hence it is safe to remove the redundant null pointer check before kfree_skb. Signed-off-by: zhong jiang Signed-off-by: David S. Miller commit 144a6adfa1435e6235fd55b700d2c9f93345bb7f Author: zhong jiang Date: Thu Sep 20 17:37:41 2018 +0800 net: tap: remove redundant null pointer check before kfree_skb kfree_skb has taken the null pointer into account. hence it is safe to remove the redundant null pointer check before kfree_skb. Signed-off-by: zhong jiang Signed-off-by: David S. Miller commit 07c6b037c2bae2a0f1978198f1486b3b2681261b Author: Wei Yongjun Date: Thu Sep 20 06:21:42 2018 +0000 pinctrl: mediatek: make symbol 'mtk_drive' static Fixes the following sparse warning: drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c:37:29: warning: symbol 'mtk_drive' was not declared. Should it be static? Signed-off-by: Wei Yongjun Acked-by: Sean Wang Signed-off-by: Linus Walleij commit 68c385079cb3530f03e22e563885e6ddaa11a586 Author: zhong jiang Date: Thu Sep 20 16:13:47 2018 +0800 net: neterion: remove redundant continue The continue will not truely skip any code. hence it is safe to remove it. Signed-off-by: zhong jiang Signed-off-by: David S. Miller commit 184744e9a0142f30d66ee369502c8f47d25a6928 Author: Wei Yongjun Date: Thu Sep 20 06:21:28 2018 +0000 pinctrl: mediatek: paris: fix return value check in mtk_paris_pinctrl_probe() In case of error, the function devm_kmalloc_array() returns NULL pointer not ERR_PTR(). The IS_ERR() test in the return value check should be replaced with NULL test. Fixes: 805250982bb5 ("pinctrl: mediatek: add pinctrl-paris that implements the vendor dt-bindings") Signed-off-by: Wei Yongjun Acked-by: Sean Wang Signed-off-by: Linus Walleij commit 26f91da29650177364564d8183907d0229e9afbc Author: zhong jiang Date: Thu Sep 20 17:52:42 2018 +0800 RDMA/cxgb4: remove redundant null pointer check before kfree_skb kfree_skb has taken the null pointer into account. hence it is safe to remove the redundant null pointer check before kfree_skb. Signed-off-by: zhong jiang Acked-by: Steve Wise Signed-off-by: Doug Ledford commit fa8f11586a963ad484d43e0728ef42f378a85768 Author: Nathan Chancellor Date: Wed Sep 19 20:32:29 2018 -0700 IB/mlx4: Remove unnecessary parentheses Clang warns when more than one set of parentheses are used in single conditional statements. drivers/infiniband/hw/mlx4/mcg.c:676:16: warning: equality comparison with extraneous parentheses [-Wparentheses-equality] if ((method == IB_MGMT_METHOD_GET_RESP)) { ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/infiniband/hw/mlx4/mcg.c:676:16: note: remove extraneous parentheses around the comparison to silence this warning if ((method == IB_MGMT_METHOD_GET_RESP)) { ~ ^ ~ drivers/infiniband/hw/mlx4/mcg.c:676:16: note: use '=' to turn this equality comparison into an assignment if ((method == IB_MGMT_METHOD_GET_RESP)) { ^~ = Remove the unnecessary parentheses to silence this warning. Reported-by: Nick Desaulniers Signed-off-by: Nathan Chancellor Reviewed-by: Leon Romanovsky Signed-off-by: Doug Ledford commit b9f86e6e7b755951af3c57f7864c57eeb98303eb Author: Nathan Chancellor Date: Wed Sep 19 20:29:57 2018 -0700 IB/nes: Remove unnecessary parentheses Clang warns when more than one set of parentheses are used in single conditional statements. drivers/infiniband/hw/nes/nes_hw.c:1446:27: warning: equality comparison with extraneous parentheses [-Wparentheses-equality] } while ((temp_phy_data2 == temp_phy_data)); ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~ drivers/infiniband/hw/nes/nes_hw.c:1446:27: note: remove extraneous parentheses around the comparison to silence this warning } while ((temp_phy_data2 == temp_phy_data)); ~ ^ ~ drivers/infiniband/hw/nes/nes_hw.c:1446:27: note: use '=' to turn this equality comparison into an assignment } while ((temp_phy_data2 == temp_phy_data)); ^~ = Remove the unnecessary parentheses to silence this warning. Reported-by: Nick Desaulniers Signed-off-by: Nathan Chancellor Reviewed-by: Nick Desaulniers Signed-off-by: Doug Ledford commit 133dc88053de92998e773aac49c54d037529f7af Author: zhong jiang Date: Thu Sep 20 16:07:47 2018 +0800 net: amd: remove redundant continue The continue will not truely skip any code. hence it is safe to remove it. Signed-off-by: zhong jiang Signed-off-by: David S. Miller commit 2a3ccfdbeb6a5f832d7203e230799f1ffa46e0fc Author: Jason Gunthorpe Date: Sun Sep 16 20:48:12 2018 +0300 RDMA/uverbs: Get rid of ucontext->tgid Nothing uses this now, just delete it. Signed-off-by: Jason Gunthorpe Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford commit 56ac9dd9177ce451ac8176311915b29e8b5f0ac2 Author: Jason Gunthorpe Date: Sun Sep 16 20:48:11 2018 +0300 RDMA/umem: Avoid synchronize_srcu in the ODP MR destruction path synchronize_rcu is slow enough that it should be avoided on the syscall path when user space is destroying MRs. After all the rework we can now trivially do this by having call_srcu kfree the per_mm. Signed-off-by: Jason Gunthorpe Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford commit be7a57b41ad824dbc59d1ffa91160ee73f2999ee Author: Jason Gunthorpe Date: Sun Sep 16 20:48:10 2018 +0300 RDMA/umem: Handle a half-complete start/end sequence mmu_notifier_unregister() can race between a invalidate_start/end and cause the invalidate_end to be skipped. This causes an imbalance in the locking, which lockdep complains about. This is not actually a bug, as we immediately kfree the memory holding the lock, but it simple enough to fix. Mark when the notifier is being destroyed and abort the start callback. This can be done under the lock we already obtained, and can re-purpose the invalidate_range test we already have. Signed-off-by: Jason Gunthorpe Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford commit ca748c39ea3f3c755295d64d69ba0b4375e34b5d Author: Jason Gunthorpe Date: Sun Sep 16 20:48:09 2018 +0300 RDMA/umem: Get rid of per_mm->notifier_count This is intrinsically racy and the scheme is simply unnecessary. New MR registration can wait for any on going invalidation to fully complete. CPU0 CPU1 if (atomic_read()) if (atomic_dec_and_test() && !list_empty()) { /* not taken */ } list_add() Putting the new UMEM into some kind of purgatory until another invalidate rolls through.. Instead hold the read side of the umem_rwsem across the pair'd start/end and get rid of the racy 'deferred add' approach. Since all umem's in the rbt are always ready to go, also get rid of the mn_counters_active stuff. Signed-off-by: Jason Gunthorpe Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford commit f27a0d50a4bc2861b472c2e3740d63a29d1ac460 Author: Jason Gunthorpe Date: Sun Sep 16 20:48:08 2018 +0300 RDMA/umem: Use umem->owning_mm inside ODP Since ODP had a single struct mmu_notifier located in the ucontext it could only handle a single MM at a time, and this prevented it from using the new owning_mm system. With the prior rework it is now simple to let ODP track multiple MMs per ucontext, finish the job so that the per_mm is allocated on a mm by mm basis, and freed when the last umem is dropped from the ucontext. As a side effect the new saner locking removes the lockdep splat about nesting the umem_rwsem between mmu_notifier_unregister and ib_umem_odp_release. It also makes ODP work with multiple processes, across, fork, etc. Signed-off-by: Jason Gunthorpe Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford commit ec3ed293e76656c1fb5388249e1e61c7d274abfc Author: Vlad Buslov Date: Wed Sep 19 16:37:29 2018 -0700 net_sched: change tcf_del_walker() to take idrinfo->lock Action API was changed to work with actions and action_idr in concurrency safe manner, however tcf_del_walker() still uses actions without taking a reference or idrinfo->lock first, and deletes them directly, disregarding possible concurrent delete. Change tcf_del_walker() to take idrinfo->lock while iterating over actions and use new tcf_idr_release_unsafe() to release them while holding the lock. And the blocking function fl_hw_destroy_tmplt() could be called when we put a filter chain, so defer it to a work queue. Signed-off-by: Vlad Buslov [xiyou.wangcong@gmail.com: heavily modify the code and changelog] Signed-off-by: Cong Wang Signed-off-by: David S. Miller commit c9990ab39b6e911003bab10a6da96e98ab1503a3 Author: Jason Gunthorpe Date: Sun Sep 16 20:48:07 2018 +0300 RDMA/umem: Move all the ODP related stuff out of ucontext and into per_mm This is the first step to make ODP use the owning_mm that is now part of struct ib_umem. Each ODP umem is linked to a single per_mm structure, which in turn, is linked to a single mm, via the embedded mmu_notifier. This first patch introduces the structure and reworks eveything to use it. This also needs to introduce tgid into the ib_ucontext_per_mm, as get_user_pages_remote() requires the originating task for statistics tracking. Signed-off-by: Jason Gunthorpe Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford commit 597ecc5a095406a668e53ab330495ddb65327f77 Author: Jason Gunthorpe Date: Sun Sep 16 20:48:06 2018 +0300 RDMA/umem: Get rid of struct ib_umem.odp_data This no longer has any use, we can use container_of to get to the umem_odp, and a simple flag to indicate if this is an odp MR. Remove the few remaining references to it. Signed-off-by: Jason Gunthorpe Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford commit 41b4deeaa123e62e1037af7a0be547af2e0e05f1 Author: Jason Gunthorpe Date: Sun Sep 16 20:48:05 2018 +0300 RDMA/umem: Make ib_umem_odp into a sub structure of ib_umem These two structures are linked together, use the container_of pattern instead of a double allocation to make the code simpler and easier to follow. Signed-off-by: Jason Gunthorpe Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford commit b5231b019d76521dd8c59a54c174770ec92c767c Author: Jason Gunthorpe Date: Sun Sep 16 20:48:04 2018 +0300 RDMA/umem: Use ib_umem_odp in all function signatures connected to ODP All of these functions already require the ODP version of the umem struct, make this very clear by having the signature require it. This paves the way to using the container_of() pattern to link umem_odp and umem together. Signed-off-by: Jason Gunthorpe Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford commit 69f8455f6cc78fa6cdf80d0105d7a748106271dc Author: YueHaibing Date: Thu Sep 20 01:58:18 2018 +0000 pinctrl: qcom: spmi-mpp: Fix err handling of pmic_mpp_set_mux 'ret' should be returned while pmic_mpp_write_mode_ctl fails. Fixes: 0e948042c420 ("pinctrl: qcom: spmi-mpp: Implement support for sink mode") Signed-off-by: YueHaibing Signed-off-by: Linus Walleij commit f656c801575626b43b8482e900fe81963fa844f2 Author: Miquel Raynal Date: Thu Aug 30 10:15:01 2018 +0200 arm64: dts: marvell: add thermal-zone node in cp110 DTSI file Add a thermal-zone node and fill in all the sensors available in a cp110 (only one in the thermal IP). Signed-off-by: Miquel Raynal Signed-off-by: Gregory CLEMENT commit a60bdfc0c1ca82e4c30c03ff58e995e67f0f233b Author: Miquel Raynal Date: Thu Aug 30 10:15:00 2018 +0200 arm64: dts: marvell: add macro to make distinction between node names Because the label is different between CPs, the full path of a node is unique. However, when referring to the end of the path only (the node name), this name is not unique anymore. The *thermal_zone_of_sensor_register() functions of the thermal core present this limitation and prevent having a thermal-zone per CP. Add a macro to make the distinction between node names to solve this situation. Signed-off-by: Miquel Raynal Signed-off-by: Gregory CLEMENT commit 3be148512ebcb8efbaa48b90b3ec2e9376945eb9 Author: Miquel Raynal Date: Thu Aug 30 10:14:59 2018 +0200 arm64: dts: marvell: add thermal-zone node in ap806 DTSI file Add a thermal-zone node and fill in all the sensors available in an ap806 (one in the IC plus one per CPU). Signed-off-by: Miquel Raynal Signed-off-by: Gregory CLEMENT commit 0863e01c39930cbefb25b4b111065a9089f46de0 Author: Miquel Raynal Date: Thu Aug 30 10:14:58 2018 +0200 arm64: dts: marvell: move AP806/CP110 thermal nodes into a new syscon New bindings impose to declare the thermal IP from within a new syscon. Signed-off-by: Miquel Raynal Signed-off-by: Gregory CLEMENT commit 1ba23b1df0bb6eec430408614c3a11280941e112 Author: Rob Herring Date: Fri Sep 21 14:25:41 2018 +0200 ARM: dts: stm32: Fix SPI controller node names SPI controller nodes should be named 'spi' rather than 'qspi'. Fixing the name enables dtc SPI bus checks. Cc: Maxime Coquelin Cc: Alexandre Torgue Signed-off-by: Rob Herring Signed-off-by: Alexandre Torgue commit e807f0298144c06740022a2f900d86b7f115595e Author: Baruch Siach Date: Tue Aug 21 22:12:33 2018 +0300 ARM: dts: clearfog: fix sdhci supply property name The vmmc phandle, like all power supply property names, must have the '-supply' suffix. Signed-off-by: Baruch Siach Signed-off-by: Gregory CLEMENT commit f383d8b4aec3c238c8d5f56854ddc7a7c3d1cc20 Author: Eric W. Biederman Date: Tue Sep 18 10:00:32 2018 +0200 signal/powerpc: Use force_sig_fault where appropriate Reviewed-by: Stephen Rothwell Signed-off-by: "Eric W. Biederman" commit 77c70728db9fb2d7698e8228f9978197c8f4f411 Author: Eric W. Biederman Date: Tue Sep 18 11:26:32 2018 +0200 signal/powerpc: Simplify _exception_pkey by using force_sig_pkuerr Call force_sig_pkuerr directly instead of rolling it by hand in _exception_pkey. Reviewed-by: Stephen Rothwell Signed-off-by: "Eric W. Biederman" commit 5d8fb8a58659098a845235f08c1f69de0c96297c Author: Eric W. Biederman Date: Tue Sep 18 10:56:25 2018 +0200 signal/powerpc: Specialize _exception_pkey for handling pkey exceptions Now that _exception no longer calls _exception_pkey it is no longer necessary to handle any signal with any si_code. All pkey exceptions are SIGSEGV with paired with SEGV_PKUERR. So just handle that case and remove the now unnecessary parameters from _exception_pkey. Reviewed-by: Stephen Rothwell Signed-off-by: "Eric W. Biederman" commit c1c7c85ceafe5a96c4d5fc648ff42a7102838dd7 Author: Eric W. Biederman Date: Tue Sep 18 09:43:32 2018 +0200 signal/powerpc: Call force_sig_fault from _exception The callers of _exception don't need the pkey exception logic because they are not processing a pkey exception. So just call exception_common directly and then call force_sig_fault to generate the appropriate siginfo and deliver the appropriate signal. Reviewed-by: Stephen Rothwell Signed-off-by: "Eric W. Biederman" commit 2c44ce285fdd21713769bace4c27336d134be8a5 Author: Eric W. Biederman Date: Tue Sep 18 09:37:28 2018 +0200 signal/powerpc: Factor the common exception code into exception_common It is brittle and wrong to populate si_pkey when there was not a pkey exception. The field does not exist for all si_codes and in some cases another field exists in the same memory location. So factor out the code that all exceptions handlers must run into exception_common, leaving the individual exception handlers to generate the signals themselves. Reviewed-by: Stephen Rothwell Signed-off-by: "Eric W. Biederman" commit cd60ab7abb3df301c4ff2cf7d619cf7e30cca289 Author: Eric W. Biederman Date: Tue Sep 18 10:42:33 2018 +0200 signal/powerpc: Remove pkey parameter from __bad_area_nosemaphore Now that bad_key_fault_exception no longer calls __bad_area_nosemaphore there is no reason for __bad_area_nosemaphore to handle pkeys. Reviewed-by: Stephen Rothwell Signed-off-by: "Eric W. Biederman" commit 8eb2ba25e3c8a9928f10f19311911d556ca16795 Author: Eric W. Biederman Date: Tue Sep 18 09:14:49 2018 +0200 signal/powerpc: Call _exception_pkey directly from bad_key_fault_exception This removes the need for other code paths to deal with pkey exceptions. Reviewed-by: Stephen Rothwell Signed-off-by: "Eric W. Biederman" commit 9f2ee693890a8dea723cf789622004cbb75959f8 Author: Eric W. Biederman Date: Tue Sep 18 09:19:24 2018 +0200 signal/powerpc: Remove pkey parameter from __bad_area There are no callers of __bad_area that pass in a pkey parameter so it makes no sense to take one. Reviewed-by: Stephen Rothwell Signed-off-by: "Eric W. Biederman" commit f654fc07db9dcc3f45b086b39141a58257195ed1 Author: Eric W. Biederman Date: Thu Apr 19 17:36:43 2018 -0500 signal/powerpc: Use force_sig_mceerr as appropriate In do_sigbus isolate the mceerr signaling code and call force_sig_mceerr instead of falling through to the force_sig_info that works for all of the other signals. Reviewed-by: Stephen Rothwell Signed-off-by: "Eric W. Biederman" commit 0a996c1a3f260ba6fe1201a668d31fa8d8339793 Author: Eric W. Biederman Date: Tue Sep 18 01:16:39 2018 +0200 signal/x86: Use force_sig_fault where appropriate Reviewed-by: Thomas Gleixner Signed-off-by: "Eric W. Biederman" commit 419ceeb12865998b940ebd86d5fb415efde1e864 Author: Eric W. Biederman Date: Fri Sep 21 15:27:32 2018 +0200 signal/x86: Pass pkey by value Now that si_code == SEGV_PKUERR is the flag indicating that a pkey is present there is no longer a need to pass a pointer to a local pkey value, instead pkey can be passed more efficiently by value. Reviewed-by: Thomas Gleixner Signed-off-by: "Eric W. Biederman" commit b4fd52f25c614f6904b86f708c20c82951c152ca Author: Eric W. Biederman Date: Tue Sep 18 01:32:23 2018 +0200 signal/x86: Replace force_sig_info_fault with force_sig_fault Now that the pkey handling has been removed force_sig_info_fault and force_sig_fault perform identical work. Just the type of the address paramter is different. So replace calls to force_sig_info_fault with calls to force_sig_fault, and remove force_sig_info_fault. Reviewed-by: Thomas Gleixner Signed-off-by: "Eric W. Biederman" commit 7265b3d9ddaae3dfbda9b1d1436809a6d1b5da7f Author: Dongdong Liu Date: Thu Aug 30 20:29:32 2018 +0800 arm64: defconfig: Enable PCIEPORTBUS PCIe features like AER, Hotplug, PME, DPC depend on PCIEPORTBUS, so enable PCIEPORTBUS as default. Signed-off-by: Dongdong Liu Signed-off-by: Wei Xu commit ed0341ebe2ee6038c7c2c572bdf2c1d9c7563dd7 Author: Zhou Wang Date: Thu Sep 13 18:56:43 2018 +0800 arm64: defconfig: enable HiSilicon HNS3 driver Signed-off-by: Zhou Wang Signed-off-by: Wei Xu commit 9db812dbb29d6244a9192e220deebdbc0080b38c Author: Eric W. Biederman Date: Tue Sep 18 01:23:35 2018 +0200 signal/x86: Call force_sig_pkuerr from __bad_area_nosemaphore There is only one code path that can generate a pkuerr signal. That code path calls __bad_area_nosemaphore and can be dectected by testing if si_code == SEGV_PKUERR. It can be seen from inspection that all of the other tests in fill_sig_info_pkey are unnecessary. Therefore call force_sig_pkuerr directly from __bad_area_semaphore and remove fill_sig_info_pkey. At the same time move the comment above force_sig_info_pkey into bad_area_access_error, so that the documentation about pkey generation races is not lost. Reviewed-by: Thomas Gleixner Signed-off-by: "Eric W. Biederman" commit 4c736c22d954c81d430558ff62738a35f96f29da Author: Yannick Fertré Date: Thu Sep 20 17:43:00 2018 +0200 ARM: multi_v7_defconfig: enable backlight gpio Enable generic GPIO based backlight driver. Signed-off-by: Yannick Fertré Signed-off-by: Alexandre Torgue commit 2823af010794e70004278ee6778aa3a6504adbdc Author: Yannick Fertré Date: Fri Sep 21 11:18:18 2018 +0200 ARM: multi_v7_defconfig: enable panels OTM8009A and RM68200 Enable panel OTM8009A and panel raydium RM68200 as loadable modules. Signed-off-by: Yannick Fertré Signed-off-by: Alexandre Torgue commit 8322f97521e40fab441a3998581eb920d8f2ed74 Author: Yannick Fertré Date: Fri Sep 21 11:12:54 2018 +0200 ARM: multi_v7_defconfig: enable STM32 DRM and MIPI DSI support Enable DRM and MIPI DSI support for STMicroelectronics as loadable module. Signed-off-by: Yannick Fertré Signed-off-by: Alexandre Torgue commit 0ec42ee63cfe1d99f23dd7a7065d27f18bc27335 Author: Amelie Delaunay Date: Wed Aug 22 12:49:00 2018 +0200 ARM: multi_v7_defconfig: enable STM32 SPI Enable the STM32 SPI driver, implemented on STM32MP1 SoC. Signed-off-by: Amelie Delaunay Signed-off-by: Alexandre Torgue commit 67330599f93672bd351123c729e2591a460fd24c Author: Yannick Fertré Date: Thu Sep 20 16:33:52 2018 +0200 ARM: dts: stm32: enable display on stm32mp157c-ev1 board Enable panel raydium RM68200, DSI bridge & display controller. Signed-off-by: Yannick Fertré Signed-off-by: Alexandre Torgue commit aba1ecd32c756e5d3c220aae9928d18c43d78cd0 Author: Eric W. Biederman Date: Tue Sep 18 00:39:49 2018 +0200 signal/x86: Pass pkey not vma into __bad_area There is only one caller of __bad_area that passes in PKUERR and thus will generate a siginfo with si_pkey set. Therefore simplify the logic and hoist reading of vma_pkey up into that caller, and just pass *pkey into __bad_area. Reviewed-by: Thomas Gleixner Signed-off-by: "Eric W. Biederman" commit 988bbc7b1a349a0139d5837d29a91714f8f512f4 Author: Eric W. Biederman Date: Tue Sep 18 00:31:24 2018 +0200 signal/x86: Don't compute pkey in __do_page_fault There are no more users of the computed pkey value in __do_page_fault so stop computing the value. Reviewed-by: Thomas Gleixner Signed-off-by: "Eric W. Biederman" commit 25c102d803eacf4741a067384f2d15b35f410ff2 Author: Eric W. Biederman Date: Tue Sep 18 00:22:46 2018 +0200 signal/x86: Remove pkey parameter from mm_fault_error After the previous cleanups to do_sigbus and and bad_area_nosemaphore mm_fault_error no now longer uses it's pkey parameter. Therefore remove the unused parameter. Reviewed-by: Thomas Gleixner Signed-off-by: "Eric W. Biederman" commit 27274f731c3a3a50f574e6671b0a15247fdf2084 Author: Eric W. Biederman Date: Tue Sep 18 00:16:01 2018 +0200 signal/x86: Remove the pkey parameter from do_sigbus The function do_sigbus never sets si_code to PKUERR so it can never return a pkey to userspace. Therefore remove the unusable pkey parameter from do_sigbus. Reviewed-by: Thomas Gleixner Signed-off-by: "Eric W. Biederman" commit 768fd9c69bb56df44ed5e58de1a7a4f8b8bb1701 Author: Eric W. Biederman Date: Tue Sep 18 00:13:13 2018 +0200 signal/x86: Remove pkey parameter from bad_area_nosemaphore The function bad_area_nosemaphore always sets si_code to SEGV_MAPERR and as such can never return a pkey parameter. Therefore remove the unusable pkey parameter from bad_area_nosemaphore. Reviewed-by: Thomas Gleixner Signed-off-by: "Eric W. Biederman" commit 164881b61429d38717408fa5d175cb55a6291969 Author: Eric W. Biederman Date: Mon Apr 16 14:29:39 2018 -0500 signal/x86/traps: Simplify trap generation Update the DO_ERROR macro to take si_code and si_addr values for a siginfo, removing the need for the fill_trap_info function. Update do_trap to also take the sicode and si_addr values for a sigininfo and modify the code to call force_sig when a sicode is not passed in and to call force_sig_fault when all of the information is present. Making this a more obvious, simpler and less error prone construction. Reviewed-by: Thomas Gleixner Signed-off-by: "Eric W. Biederman" commit afe8448c0d9db1e1ffaa4a130a7df5f5e63b7188 Author: Eric W. Biederman Date: Tue Aug 8 10:55:19 2017 -0500 signal/x86/traps: Use force_sig instead of open coding it. The function "force_sig(sig, tsk)" is equivalent to " force_sig_info(sig, SEND_SIG_PRIV, tsk)". Using the siginfo variants can be error prone so use the simpler old fashioned force_sig variant, and with luck the force_sig_info variant can go away. Reviewed-by: Thomas Gleixner Signed-off-by: "Eric W. Biederman" commit 851ce9e697b8a432ad1847a0c2d464b412353829 Author: Eric W. Biederman Date: Sat Aug 19 12:14:49 2017 -0500 signal/x86/traps: Use force_sig_bnderr Instead of generating the siginfo in x86 specific code use the new helper function force_sig_bnderr to separate the concerns of collecting the information and generating a proper siginfo. Making the code easier to understand and maintain. Reviewed-by: Thomas Gleixner Signed-off-by: "Eric W. Biederman" commit 79e21d65409385a57d2c77aeb95825a28a8058c7 Author: Eric W. Biederman Date: Fri Aug 4 14:01:50 2017 -0500 signal/x86/traps: Move more code into do_trap_no_signal so it can be reused The function do_trap_no_signal embodies almost all of the work of the function do_trap. The exceptions are setting of thread.error_code and thread.trap_nr in the case when the signal will be sent, and reporting which signal will be sent with show_signal. Filling in struct siginfo and then calling do_trap is problematic as filling in struct siginfo is an fiddly process that can through inattention has resulted in fields not initialized and the wrong fields being filled in. To avoid this error prone situation I am replacing force_sig_info with a set of functions that take as arguments the information needed to send a specific kind of signal. The function do_trap is called in the context of several different kinds of signals today. Having a solid do_trap_no_signal that can be reused allows call sites that send different kinds of signals to reuse all of the code in do_trap_no_signal. Modify do_trap_no_signal to have a single exit there signals where be sent (aka returning -1) to allow more of the signal sending path to be moved to from do_trap to do_trap_no_signal. Move setting thread.trap_nr and thread.error_code into do_trap_no_signal so the code does not need to be duplicated. Make the type of the string that is passed into do_trap_no_signal to const. The only user of that str is die and it already takes a const string, so this just makes it explicit that the string won't change. All of this prepares the way for using do_trap_no_signal outside of do_trap. Reviewed-by: Thomas Gleixner Signed-off-by: "Eric W. Biederman" commit 7401a633c34adc7aefd3edfec60074cb0475a3e8 Author: Borislav Petkov Date: Tue Sep 4 11:22:12 2018 +0200 x86/mce-inject: Reset injection struct after injection Clear the MCE struct which is used for collecting the injection details after injection. Also, populate it with more details from the machine. Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20180905081954.10391-1-bp@alien8.de commit 0b8af74549c2f985bfc3d2a983961b2a66882890 Author: Andrew Murray Date: Thu Sep 13 12:56:40 2018 +0100 arm64: Remove unused VGA console support Support for VGA_CONSOLE is not allowable due to commit ee23794b8668 ("video: vgacon: Don't build on arm64"), thus remove the associated unused code. Whilst PCI on arm64 would support VGA a valid screen_info structure is missing. Acked-by: Will Deacon Signed-off-by: Andrew Murray Signed-off-by: Catalin Marinas commit f2aeded4a67d679c9638dd0de2d7632a82371900 Author: Chris Packham Date: Fri Sep 7 12:59:26 2018 +1200 ARM: dts: mvebu: add "marvell,prestera" to PP nodes The compatible string "marvell,prestera" allows drivers to have code common to any prestera variant. Signed-off-by: Chris Packham Signed-off-by: Gregory CLEMENT commit 8a695a5873339c2e7c746ee51e3774fedd07d0a9 Author: James Morse Date: Fri Aug 31 16:19:43 2018 +0100 arm64: Kconfig: Remove ARCH_HAS_HOLES_MEMORYMODEL include/linux/mmzone.h describes ARCH_HAS_HOLES_MEMORYMODEL as relevant when parts the memmap have been free()d. This would happen on systems where memory is smaller than a sparsemem-section, and the extra struct pages are expensive. pfn_valid() on these systems returns true for the whole sparsemem-section, so an extra memmap_valid_within() check is needed. On arm64 we have nomap memory, so always provide pfn_valid() to test for nomap pages. This means ARCH_HAS_HOLES_MEMORYMODEL's extra checks are already rolled up into pfn_valid(). Remove it. Acked-by: Will Deacon Signed-off-by: James Morse Signed-off-by: Catalin Marinas commit cf680cc5251487b9a39919c3cda31a108af19cf8 Author: Rob Herring Date: Thu Sep 13 13:12:31 2018 -0500 ARM: dts: marvell: Fix SPI and I2C bus warnings dtc has new checks for I2C and SPI buses. Fix the warnings in node names and unit-addresses. arch/arm/boot/dts/dove-cubox.dtb: Warning (i2c_bus_reg): /i2c-mux/i2c@0/clock-generator: I2C bus unit address format error, expected "60" arch/arm/boot/dts/dove-cubox-es.dtb: Warning (i2c_bus_reg): /i2c-mux/i2c@0/clock-generator: I2C bus unit address format error, expected "60" arch/arm/boot/dts/dove-cubox.dtb: Warning (spi_bus_bridge): /mbus/internal-regs/spi-ctrl@10600: node name for SPI buses should be 'spi' arch/arm/boot/dts/dove-cubox-es.dtb: Warning (spi_bus_bridge): /mbus/internal-regs/spi-ctrl@10600: node name for SPI buses should be 'spi' arch/arm/boot/dts/dove-dove-db.dtb: Warning (spi_bus_bridge): /mbus/internal-regs/spi-ctrl@10600: node name for SPI buses should be 'spi' arch/arm/boot/dts/dove-sbc-a510.dtb: Warning (spi_bus_bridge): /mbus/internal-regs/spi-ctrl@10600: node name for SPI buses should be 'spi' arch/arm/boot/dts/dove-sbc-a510.dtb: Warning (spi_bus_bridge): /mbus/internal-regs/spi-ctrl@14600: node name for SPI buses should be 'spi' arch/arm/boot/dts/orion5x-kuroboxpro.dtb: Warning (i2c_bus_reg): /soc/internal-regs/i2c@11000/rtc: I2C bus unit address format error, expected "32" arch/arm/boot/dts/orion5x-linkstation-lschl.dtb: Warning (i2c_bus_reg): /soc/internal-regs/i2c@11000/rtc: I2C bus unit address format error, expected "32" arch/arm/boot/dts/orion5x-linkstation-lsgl.dtb: Warning (i2c_bus_reg): /soc/internal-regs/i2c@11000/rtc: I2C bus unit address format error, expected "32" arch/arm/boot/dts/orion5x-linkstation-lswtgl.dtb: Warning (i2c_bus_reg): /soc/internal-regs/i2c@11000/rtc: I2C bus unit address format error, expected "32" Cc: Jason Cooper Cc: Andrew Lunn Cc: Sebastian Hesselbarth Cc: Gregory Clement Signed-off-by: Rob Herring Signed-off-by: Gregory CLEMENT commit 21f84796177443695680180a8493a9e20d254d5e Author: Anshuman Khandual Date: Thu Sep 20 09:36:21 2018 +0530 arm64/cpufeatures: Emulate MRS instructions by parsing ESR_ELx.ISS Armv8.4-A extension enables MRS instruction encodings inside ESR_ELx.ISS during exception class ESR_ELx_EC_SYS64 (0x18). This encoding can be used to emulate MRS instructions which can avoid fetch/decode from user space thus improving performance. This adds a new sys64_hook structure element with applicable ESR mask/value pair for MRS instructions on various system registers but constrained by sysreg encodings which is currently allowed to be emulated. Reviewed-by: Suzuki K Poulose Acked-by: Mark Rutland Signed-off-by: Anshuman Khandual Signed-off-by: Catalin Marinas commit 520ad98871a072471d2583a9386b9d7243fa584d Author: Anshuman Khandual Date: Thu Sep 20 09:36:20 2018 +0530 arm64/cpufeatures: Factorize emulate_mrs() MRS emulation gets triggered with exception class (0x00 or 0x18) eventually calling the function emulate_mrs() which fetches the user space instruction and analyses it's encodings (OP0, OP1, OP2, CRN, CRM, RT). The kernel tries to emulate the given instruction looking into the encoding details. Going forward these encodings can also be parsed from ESR_ELx.ISS fields without requiring to fetch/decode faulting userspace instruction which can improve performance. This factorizes emulate_mrs() function in a way that it can be called directly with MRS encodings (OP0, OP1, OP2, CRN, CRM) for any given target register which can then be used directly from 0x18 exception class. Reviewed-by: Suzuki K Poulose Acked-by: Mark Rutland Signed-off-by: Anshuman Khandual Signed-off-by: Catalin Marinas commit 1c8391412d7794e0b38393ed98fef9a974401f05 Author: Anshuman Khandual Date: Thu Sep 20 09:36:19 2018 +0530 arm64/cpufeatures: Introduce ESR_ELx_SYS64_ISS_RT() Extracting target register from ESR.ISS encoding has already been required at multiple instances. Just make it a macro definition and replace all the existing use cases. Reviewed-by: Suzuki K Poulose Acked-by: Mark Rutland Signed-off-by: Anshuman Khandual Signed-off-by: Catalin Marinas commit 12fec62aea6ea67512f0ddabf960c9270b6d1b05 Author: Chris Wilson Date: Thu Sep 20 21:05:30 2018 +0100 drm: Fix syncobj handing of schedule() returning 0 After schedule() returns 0, we must do one last check of COND to determine the reason for the wakeup with 0 jiffies remaining before reporting the timeout -- otherwise we may lose the signal due to scheduler delays. References: https://bugs.freedesktop.org/show_bug.cgi?id=106690 Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20180920200530.2836-2-chris@chris-wilson.co.uk Reviewed-by: Daniel Vetter commit 1664691a659f6115bae26e6256166e08b50def4e Author: Chris Wilson Date: Thu Sep 20 21:05:29 2018 +0100 drm: Use default dma_fence hooks where possible for null syncobj Both the .enable_signaling and .release of the null syncobj fence can be replaced by the default callbacks for a small reduction in code size. In particular the default callback for .release was changed in commit e28bd101ae1b ("drm: rename null fence to stub fence in syncobj v2") which neglected its RCU protection. Fixes: e28bd101ae1b ("drm: rename null fence to stub fence in syncobj v2") Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20180920200530.2836-1-chris@chris-wilson.co.uk Reviewed-by: Daniel Vetter commit 448626103dad54ec5d06722e955586b5d557625d Author: Joonas Lahtinen Date: Fri Sep 21 12:26:37 2018 +0300 drm/i915: Update DRIVER_DATE to 20180921 Signed-off-by: Joonas Lahtinen commit adbc8208e6620ddfa10fd863cb0a4ec0c54d8625 Author: José Roberto de Souza Date: Tue Sep 18 10:48:09 2018 -0700 drm: Return -EOPNOTSUPP in drm_setclientcap() when driver do not support KMS All DRM_CLIENT capabilities are tied to KMS support, so returning -EOPNOTSUPP when KMS is not supported. v2: returning -EOPNOTSUPP(same value as posix ENOTSUP and available in uapi) instead of -ENOTSUPP v3: adding comments about the feature requirement about capabilities Cc: Chris Wilson Signed-off-by: José Roberto de Souza Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20180918174809.17123-1-jose.souza@intel.com commit 14e86c01413ed4cb69525e5eb60731d03ea7630c Author: Wei Yongjun Date: Sat Sep 15 01:53:19 2018 +0000 drm/vkms: Fix possible memory leak in _vkms_get_crc() 'vaddr_out' is malloced in _vkms_get_crc() and should be freed before leaving from the error handling cases, otherwise it will cause memory leak. Fixes: db7f419c06d7 ("drm/vkms: Compute CRC with Cursor Plane") Signed-off-by: Wei Yongjun Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/1536976399-1295-1-git-send-email-weiyongjun1@huawei.com commit 9306425b70bf1284a037b7461222887aff48cf8d Author: Florian Westphal Date: Thu Sep 20 23:53:06 2018 +0200 netfilter: ctnetlink: must check mark attributes vs NULL else we will oops (null deref) when the attributes aren't present. Also add back the EOPNOTSUPP in case MARK filtering is requested but kernel doesn't support it. Fixes: 59c08c69c2788 ("netfilter: ctnetlink: Support L3 protocol-filter on flush") Reported-by: syzbot+e45eda8eda6e93a03959@syzkaller.appspotmail.com Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 8169671ababf306e22f8cf064184032ff74eb508 Author: Joonas Lahtinen Date: Fri Sep 21 10:21:00 2018 +0300 drm/i915: Update DRIVER_DATE to 20180921 Signed-off-by: Joonas Lahtinen commit cd560235d8f9ddd94aa51e1c4dabdf3212b9b241 Author: Stefan Agner Date: Sat Sep 15 21:38:25 2018 -0700 crypto: arm/crc32 - avoid warning when compiling with Clang The table id (second) argument to MODULE_DEVICE_TABLE is often referenced otherwise. This is not the case for CPU features. This leads to a warning when building the kernel with Clang: arch/arm/crypto/crc32-ce-glue.c:239:33: warning: variable 'crc32_cpu_feature' is not needed and will not be emitted [-Wunneeded-internal-declaration] static const struct cpu_feature crc32_cpu_feature[] = { ^ Avoid warnings by using __maybe_unused, similar to commit 1f318a8bafcf ("modules: mark __inittest/__exittest as __maybe_unused"). Fixes: 2a9faf8b7e43 ("crypto: arm/crc32 - enable module autoloading based on CPU feature bits") Signed-off-by: Stefan Agner Acked-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit c785896b21dd8e156326ff660050b0074d3431df Author: Stefan Agner Date: Sat Sep 15 21:38:24 2018 -0700 cpufeature: avoid warning when compiling with clang The table id (second) argument to MODULE_DEVICE_TABLE is often referenced otherwise. This is not the case for CPU features. This leads to warnings when building the kernel with Clang: arch/arm/crypto/aes-ce-glue.c:450:1: warning: variable 'cpu_feature_match_AES' is not needed and will not be emitted [-Wunneeded-internal-declaration] module_cpu_feature_match(AES, aes_init); ^ Avoid warnings by using __maybe_unused, similar to commit 1f318a8bafcf ("modules: mark __inittest/__exittest as __maybe_unused"). Fixes: 67bad2fdb754 ("cpu: add generic support for CPU feature based module autoloading") Signed-off-by: Stefan Agner Acked-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit e93720606efdbe914110e0ee94bd086f5514a6f1 Author: Janakarajan Natarajan Date: Fri Sep 14 17:32:04 2018 -0500 crypto: ccp - Allow SEV firmware to be chosen based on Family and Model During PSP initialization, there is an attempt to update the SEV firmware by looking in /lib/firmware/amd/. Currently, sev.fw is the expected name of the firmware blob. This patch will allow for firmware filenames based on the family and model of the processor. Model specific firmware files are given highest priority. Followed by firmware for a subset of models. Lastly, failing the previous two options, fallback to looking for sev.fw. Signed-off-by: Janakarajan Natarajan Reviewed-by: Tom Lendacky Acked-by: Gary R Hook Signed-off-by: Herbert Xu commit b78d3795177db479107b3493608bf088117325e3 Author: Janakarajan Natarajan Date: Fri Sep 14 17:32:03 2018 -0500 crypto: ccp - Fix static checker warning Under certain configuration SEV functions can be defined as no-op. In such a case error can be uninitialized. Initialize the variable to 0. Cc: Dan Carpenter Reported-by: Dan Carpenter Signed-off-by: Janakarajan Natarajan Acked-by: Gary R Hook Signed-off-by: Herbert Xu commit ac3c8f36c31d2f0add4eeaa42c7d0540d7c60583 Author: Ondrej Mosnacek Date: Thu Sep 13 10:51:34 2018 +0200 crypto: lrw - Do not use auxiliary buffer This patch simplifies the LRW template to recompute the LRW tweaks from scratch in the second pass and thus also removes the need to allocate a dynamic buffer using kmalloc(). As discussed at [1], the use of kmalloc causes deadlocks with dm-crypt. PERFORMANCE MEASUREMENTS (x86_64) Performed using: https://gitlab.com/omos/linux-crypto-bench Crypto driver used: lrw(ecb-aes-aesni) The results show that the new code has about the same performance as the old code. For 512-byte message it seems to be even slightly faster, but that might be just noise. Before: ALGORITHM KEY (b) DATA (B) TIME ENC (ns) TIME DEC (ns) lrw(aes) 256 64 200 203 lrw(aes) 320 64 202 204 lrw(aes) 384 64 204 205 lrw(aes) 256 512 415 415 lrw(aes) 320 512 432 440 lrw(aes) 384 512 449 451 lrw(aes) 256 4096 1838 1995 lrw(aes) 320 4096 2123 1980 lrw(aes) 384 4096 2100 2119 lrw(aes) 256 16384 7183 6954 lrw(aes) 320 16384 7844 7631 lrw(aes) 384 16384 8256 8126 lrw(aes) 256 32768 14772 14484 lrw(aes) 320 32768 15281 15431 lrw(aes) 384 32768 16469 16293 After: ALGORITHM KEY (b) DATA (B) TIME ENC (ns) TIME DEC (ns) lrw(aes) 256 64 197 196 lrw(aes) 320 64 200 197 lrw(aes) 384 64 203 199 lrw(aes) 256 512 385 380 lrw(aes) 320 512 401 395 lrw(aes) 384 512 415 415 lrw(aes) 256 4096 1869 1846 lrw(aes) 320 4096 2080 1981 lrw(aes) 384 4096 2160 2109 lrw(aes) 256 16384 7077 7127 lrw(aes) 320 16384 7807 7766 lrw(aes) 384 16384 8108 8357 lrw(aes) 256 32768 14111 14454 lrw(aes) 320 32768 15268 15082 lrw(aes) 384 32768 16581 16250 [1] https://lkml.org/lkml/2018/8/23/1315 Signed-off-by: Ondrej Mosnacek Signed-off-by: Herbert Xu commit c778f96bf3471b870caa2b9282f08f176a416f88 Author: Ondrej Mosnacek Date: Thu Sep 13 10:51:33 2018 +0200 crypto: lrw - Optimize tweak computation This patch rewrites the tweak computation to a slightly simpler method that performs less bswaps. Based on performance measurements the new code seems to provide slightly better performance than the old one. PERFORMANCE MEASUREMENTS (x86_64) Performed using: https://gitlab.com/omos/linux-crypto-bench Crypto driver used: lrw(ecb-aes-aesni) Before: ALGORITHM KEY (b) DATA (B) TIME ENC (ns) TIME DEC (ns) lrw(aes) 256 64 204 286 lrw(aes) 320 64 227 203 lrw(aes) 384 64 208 204 lrw(aes) 256 512 441 439 lrw(aes) 320 512 456 455 lrw(aes) 384 512 469 483 lrw(aes) 256 4096 2136 2190 lrw(aes) 320 4096 2161 2213 lrw(aes) 384 4096 2295 2369 lrw(aes) 256 16384 7692 7868 lrw(aes) 320 16384 8230 8691 lrw(aes) 384 16384 8971 8813 lrw(aes) 256 32768 15336 15560 lrw(aes) 320 32768 16410 16346 lrw(aes) 384 32768 18023 17465 After: ALGORITHM KEY (b) DATA (B) TIME ENC (ns) TIME DEC (ns) lrw(aes) 256 64 200 203 lrw(aes) 320 64 202 204 lrw(aes) 384 64 204 205 lrw(aes) 256 512 415 415 lrw(aes) 320 512 432 440 lrw(aes) 384 512 449 451 lrw(aes) 256 4096 1838 1995 lrw(aes) 320 4096 2123 1980 lrw(aes) 384 4096 2100 2119 lrw(aes) 256 16384 7183 6954 lrw(aes) 320 16384 7844 7631 lrw(aes) 384 16384 8256 8126 lrw(aes) 256 32768 14772 14484 lrw(aes) 320 32768 15281 15431 lrw(aes) 384 32768 16469 16293 Signed-off-by: Ondrej Mosnacek Signed-off-by: Herbert Xu commit dc6d6d5a586fdd6876e18092d5363d48f26b7738 Author: Ondrej Mosnacek Date: Thu Sep 13 10:51:32 2018 +0200 crypto: testmgr - Add test for LRW counter wrap-around This patch adds a test vector for lrw(aes) that triggers wrap-around of the counter, which is a tricky corner case. Suggested-by: Eric Biggers Signed-off-by: Ondrej Mosnacek Signed-off-by: Herbert Xu commit fbe1a850b3b1522e9fc22319ccbbcd2ab05328d2 Author: Ondrej Mosnacek Date: Thu Sep 13 10:51:31 2018 +0200 crypto: lrw - Fix out-of bounds access on counter overflow When the LRW block counter overflows, the current implementation returns 128 as the index to the precomputed multiplication table, which has 128 entries. This patch fixes it to return the correct value (127). Fixes: 64470f1b8510 ("[CRYPTO] lrw: Liskov Rivest Wagner, a tweakable narrow block cipher mode") Cc: # 2.6.20+ Reported-by: Eric Biggers Signed-off-by: Ondrej Mosnacek Signed-off-by: Herbert Xu commit 331351f89c36bf7d03561a28b6f64fa10a9f6f3a Author: Horia Geantă Date: Wed Sep 12 16:20:48 2018 +0300 crypto: tcrypt - fix ghash-generic speed test ghash is a keyed hash algorithm, thus setkey needs to be called. Otherwise the following error occurs: $ modprobe tcrypt mode=318 sec=1 testing speed of async ghash-generic (ghash-generic) tcrypt: test 0 ( 16 byte blocks, 16 bytes per update, 1 updates): tcrypt: hashing failed ret=-126 Cc: # 4.6+ Fixes: 0660511c0bee ("crypto: tcrypt - Use ahash") Tested-by: Franck Lenormand Signed-off-by: Horia Geantă Acked-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit e8342cc7954eaf26b6b1d451e7aa0e50b5b540e7 Author: Horia Geantă Date: Wed Sep 12 11:59:37 2018 +0300 arm64: defconfig: enable CAAM crypto engine on QorIQ DPAA2 SoCs Enable CAAM (Cryptographic Accelerator and Assurance Module) driver for QorIQ Data Path Acceleration Architecture (DPAA) v2. It handles DPSECI (Data Path SEC Interface) DPAA2 objects that sit on the Management Complex (MC) fsl-mc bus. Signed-off-by: Horia Geantă Signed-off-by: Herbert Xu commit 3f16f6c9d63222a7443d2e52f1f9369967d1a413 Author: Horia Geantă Date: Wed Sep 12 11:59:36 2018 +0300 crypto: caam/qi2 - add support for ahash algorithms Add support for unkeyed and keyed (hmac) md5, sha algorithms. Signed-off-by: Horia Geantă Signed-off-by: Herbert Xu commit 0efa7579f3de1907acd16a358b0ade214b020d77 Author: Horia Geantă Date: Wed Sep 12 11:59:35 2018 +0300 crypto: caam - export ahash shared descriptor generation caam/qi2 driver will support ahash algorithms, thus move ahash descriptors generation in a shared location. Signed-off-by: Horia Geantă Signed-off-by: Herbert Xu commit 226853ac3ebee425300b9a692c9cd5f9e2e72571 Author: Horia Geantă Date: Wed Sep 12 11:59:34 2018 +0300 crypto: caam/qi2 - add skcipher algorithms Add support to submit the following skcipher algorithms via the DPSECI backend: cbc({aes,des,des3_ede}) ctr(aes), rfc3686(ctr(aes)) xts(aes) Signed-off-by: Horia Geantă Signed-off-by: Herbert Xu commit 8d818c1055013d355d36188f21c7535687374f6c Author: Horia Geantă Date: Wed Sep 12 11:59:33 2018 +0300 crypto: caam/qi2 - add DPAA2-CAAM driver Add CAAM driver that works using the DPSECI backend, i.e. manages DPSECI DPAA2 objects sitting on the Management Complex (MC) fsl-mc bus. Data transfers (crypto requests) are sent/received to/from CAAM crypto engine via Queue Interface (v2), this being similar to existing caam/qi. OTOH, configuration/setup (obtaining virtual queue IDs, authorization etc.) is done by sending commands to the MC f/w. Note that the CAAM accelerator included in DPAA2 platforms still has Job Rings. However, the driver being added does not handle access via this backend. Kconfig & Makefile are updated such that DPAA2-CAAM (a.k.a. "caam/qi2") driver does not depend on caam/jr or caam/qi backends - which rely on platform bus support (ctrl.c). Support for the following aead and authenc algorithms is also added in this patch: -aead: gcm(aes) rfc4106(gcm(aes)) rfc4543(gcm(aes)) -authenc: authenc(hmac({md5,sha*}),cbc({aes,des,des3_ede})) echainiv(authenc(hmac({md5,sha*}),cbc({aes,des,des3_ede}))) authenc(hmac({md5,sha*}),rfc3686(ctr(aes)) seqiv(authenc(hmac({md5,sha*}),rfc3686(ctr(aes))) Signed-off-by: Horia Geantă Signed-off-by: Herbert Xu commit 94cebd9da42cffbcf308c295656e6cd73d02a610 Author: Horia Geantă Date: Wed Sep 12 11:59:32 2018 +0300 crypto: caam - add Queue Interface v2 error codes Add support to translate error codes returned by QI v2, i.e. Queue Interface present on DataPath Acceleration Architecture v2 (DPAA2). Signed-off-by: Horia Geantă Signed-off-by: Herbert Xu commit f9cb74fd88376bd8759df2fff2d2e70321fd0468 Author: Horia Geantă Date: Wed Sep 12 11:59:31 2018 +0300 crypto: caam - add DPAA2-CAAM (DPSECI) backend API Add the low-level API that allows to manage DPSECI DPAA2 objects that sit on the Management Complex (MC) fsl-mc bus. The API is compatible with MC firmware 10.2.0+. Signed-off-by: Horia Geantă Signed-off-by: Herbert Xu commit aae733a3f46f5ef338fbdde26e14cbb205a23de0 Author: Horia Geantă Date: Wed Sep 12 11:59:30 2018 +0300 crypto: caam - fix implicit casts in endianness helpers Fix the following sparse endianness warnings: drivers/crypto/caam/regs.h:95:1: sparse: incorrect type in return expression (different base types) @@ expected unsigned int @@ got restricted __le32unsigned int @@ drivers/crypto/caam/regs.h:95:1: expected unsigned int drivers/crypto/caam/regs.h:95:1: got restricted __le32 [usertype] drivers/crypto/caam/regs.h:95:1: sparse: incorrect type in return expression (different base types) @@ expected unsigned int @@ got restricted __be32unsigned int @@ drivers/crypto/caam/regs.h:95:1: expected unsigned int drivers/crypto/caam/regs.h:95:1: got restricted __be32 [usertype] drivers/crypto/caam/regs.h:92:1: sparse: cast to restricted __le32 drivers/crypto/caam/regs.h:92:1: sparse: cast to restricted __be32 Fixes: 261ea058f016 ("crypto: caam - handle core endianness != caam endianness") Reported-by: kbuild test robot Signed-off-by: Horia Geantă Signed-off-by: Herbert Xu commit 55d0110248b2a419fdf94f0275c19fc9c394273a Author: Horia Geantă Date: Wed Sep 12 11:59:29 2018 +0300 soc: fsl: dpio: add congestion notification support Add support for Congestion State Change Notifications (CSCN), which allow DPIO users to be notified when a congestion group changes its state (due to hitting the entrance / exit threshold). Acked-by: Li Yang Signed-off-by: Horia Geantă Signed-off-by: Herbert Xu commit 009447a038ec98cd11074e78a85ffd71f5c84d3b Author: Horia Geantă Date: Wed Sep 12 11:59:28 2018 +0300 soc: fsl: dpio: add frame list format support Add support for dpaa2_fd_list format, i.e. dpaa2_fl_entry structure and accessors. Frame list entries (FLEs) are similar, but not identical to FDs: + "F" (final) bit - FMT[b'01] is reserved - DD, SC, DROPP bits (covered by "FD compatibility" field in FLE case) - FLC[5:0] not used for stashing Signed-off-by: Horia Geantă Acked-by: Li Yang Signed-off-by: Herbert Xu commit 48c43de0b5981e84e187a239a9a96c1a6cad8f52 Author: Horia Geantă Date: Wed Sep 12 11:59:27 2018 +0300 soc: fsl: dpio: add back some frame queue functions This commit adds back functions removed in commit a211c8170b3c ("staging: fsl-mc/dpio: remove couple of unused functions") since dpseci object will make use of them. Acked-by: Li Yang Signed-off-by: Horia Geantă Signed-off-by: Herbert Xu commit e9158b35ef9afb3bf24e0404c8fd4cd723eafa5b Author: Horia Geantă Date: Wed Sep 12 11:59:26 2018 +0300 bus: fsl-mc: add support for dpseci device type Signed-off-by: Horia Geantă Acked-by: Laurentiu Tudor Signed-off-by: Herbert Xu commit a5e9f557098e54af44ade5d501379be18435bfbf Author: Eric Biggers Date: Tue Sep 11 20:05:10 2018 -0700 crypto: chacha20 - Fix chacha20_block() keystream alignment (again) In commit 9f480faec58c ("crypto: chacha20 - Fix keystream alignment for chacha20_block()"), I had missed that chacha20_block() can be called directly on the buffer passed to get_random_bytes(), which can have any alignment. So, while my commit didn't break anything, it didn't fully solve the alignment problems. Revert my solution and just update chacha20_block() to use put_unaligned_le32(), so the output buffer need not be aligned. This is simpler, and on many CPUs it's the same speed. But, I kept the 'tmp' buffers in extract_crng_user() and _get_random_bytes() 4-byte aligned, since that alignment is actually needed for _crng_backtrack_protect() too. Reported-by: Stephan Müller Cc: Theodore Ts'o Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 78105c7e769b8cfa4a4d59027807882b560a2634 Author: Ondrej Mosnacek Date: Tue Sep 11 09:40:08 2018 +0200 crypto: xts - Drop use of auxiliary buffer Since commit acb9b159c784 ("crypto: gf128mul - define gf128mul_x_* in gf128mul.h"), the gf128mul_x_*() functions are very fast and therefore caching the computed XTS tweaks has only negligible advantage over computing them twice. In fact, since the current caching implementation limits the size of the calls to the child ecb(...) algorithm to PAGE_SIZE (usually 4096 B), it is often actually slower than the simple recomputing implementation. This patch simplifies the XTS template to recompute the XTS tweaks from scratch in the second pass and thus also removes the need to allocate a dynamic buffer using kmalloc(). As discussed at [1], the use of kmalloc causes deadlocks with dm-crypt. PERFORMANCE RESULTS I measured time to encrypt/decrypt a memory buffer of varying sizes with xts(ecb-aes-aesni) using a tool I wrote ([2]) and the results suggest that after this patch the performance is either better or comparable for both small and large buffers. Note that there is a lot of noise in the measurements, but the overall difference is easy to see. Old code: ALGORITHM KEY (b) DATA (B) TIME ENC (ns) TIME DEC (ns) xts(aes) 256 64 331 328 xts(aes) 384 64 332 333 xts(aes) 512 64 338 348 xts(aes) 256 512 889 920 xts(aes) 384 512 1019 993 xts(aes) 512 512 1032 990 xts(aes) 256 4096 2152 2292 xts(aes) 384 4096 2453 2597 xts(aes) 512 4096 3041 2641 xts(aes) 256 16384 9443 8027 xts(aes) 384 16384 8536 8925 xts(aes) 512 16384 9232 9417 xts(aes) 256 32768 16383 14897 xts(aes) 384 32768 17527 16102 xts(aes) 512 32768 18483 17322 New code: ALGORITHM KEY (b) DATA (B) TIME ENC (ns) TIME DEC (ns) xts(aes) 256 64 328 324 xts(aes) 384 64 324 319 xts(aes) 512 64 320 322 xts(aes) 256 512 476 473 xts(aes) 384 512 509 492 xts(aes) 512 512 531 514 xts(aes) 256 4096 2132 1829 xts(aes) 384 4096 2357 2055 xts(aes) 512 4096 2178 2027 xts(aes) 256 16384 6920 6983 xts(aes) 384 16384 8597 7505 xts(aes) 512 16384 7841 8164 xts(aes) 256 32768 13468 12307 xts(aes) 384 32768 14808 13402 xts(aes) 512 32768 15753 14636 [1] https://lkml.org/lkml/2018/8/23/1315 [2] https://gitlab.com/omos/linux-crypto-bench Signed-off-by: Ondrej Mosnacek Signed-off-by: Herbert Xu commit 2e5d2f33d1dbd551f14634483c7ea81e5119d689 Author: Ard Biesheuvel Date: Mon Sep 10 16:41:15 2018 +0200 crypto: arm64/aes-blk - improve XTS mask handling The Crypto Extension instantiation of the aes-modes.S collection of skciphers uses only 15 NEON registers for the round key array, whereas the pure NEON flavor uses 16 NEON registers for the AES S-box. This means we have a spare register available that we can use to hold the XTS mask vector, removing the need to reload it at every iteration of the inner loop. Since the pure NEON version does not permit this optimization, tweak the macros so we can factor out this functionality. Also, replace the literal load with a short sequence to compose the mask vector. On Cortex-A53, this results in a ~4% speedup. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit dd597fb33ff0d2a158d7dd098be6dc849b7c2bcc Author: Ard Biesheuvel Date: Mon Sep 10 16:41:14 2018 +0200 crypto: arm64/aes-blk - add support for CTS-CBC mode Currently, we rely on the generic CTS chaining mode wrapper to instantiate the cts(cbc(aes)) skcipher. Due to the high performance of the ARMv8 Crypto Extensions AES instructions (~1 cycles per byte), any overhead in the chaining mode layers is amplified, and so it pays off considerably to fold the CTS handling into the SIMD routines. On Cortex-A53, this results in a ~50% speedup for smaller input sizes. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 6e7de6af91b2a271ba111c6d055fc3fe1558c280 Author: Ard Biesheuvel Date: Mon Sep 10 16:41:13 2018 +0200 crypto: arm64/aes-blk - revert NEON yield for skciphers The reasoning of commit f10dc56c64bb ("crypto: arm64 - revert NEON yield for fast AEAD implementations") applies equally to skciphers: the walk API already guarantees that the input size of each call into the NEON code is bounded to the size of a page, and so there is no need for an additional TIF_NEED_RESCHED flag check inside the inner loop. So revert the skcipher changes to aes-modes.S (but retain the mac ones) This partially reverts commit 0c8f838a52fe9fd82761861a934f16ef9896b4e5. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 557ecb4543d1428caf43ff1f0351c724ce41bf97 Author: Ard Biesheuvel Date: Mon Sep 10 16:41:12 2018 +0200 crypto: arm64/aes-blk - remove pointless (u8 *) casts For some reason, the asmlinkage prototypes of the NEON routines take u8[] arguments for the round key arrays, while the actual round keys are arrays of u32, and so passing them into those routines requires u8* casts at each occurrence. Fix that. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 718f608c38319980e4130d0732acb7ee02fcf689 Author: Srikanth Jampala Date: Mon Sep 10 13:54:52 2018 +0530 crypto: cavium/nitrox - use dma_pool_zalloc() use dma_pool_zalloc() instead of dma_pool_alloc with __GFP_ZERO flag. crypto dma pool renamed to "nitrox-context". Signed-off-by: Srikanth Jampala Signed-off-by: Herbert Xu commit 910e3ca10bba726d10a865b279d98bf8fbf12cf4 Merge: 41a9aca6a2f3 13cc6f48c743 Author: Herbert Xu Date: Fri Sep 21 13:22:37 2018 +0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 Merge crypto-2.6 to resolve caam conflict with skcipher conversion. commit 874deb1c652df94917f5619d972d2435a762b8a0 Author: Nathan Chancellor Date: Thu Sep 20 13:58:58 2018 -0700 scsi: advansys: Remove unnecessary parentheses Clang warns when multiple pairs of parentheses are used for a single conditional statement. drivers/scsi/advansys.c:6451:20: warning: equality comparison with extraneous parentheses [-Wparentheses-equality] if ((sdtr_data == 0xFF)) { ~~~~~~~~~~^~~~~~~ drivers/scsi/advansys.c:6451:20: note: remove extraneous parentheses around the comparison to silence this warning if ((sdtr_data == 0xFF)) { ~ ^ ~ drivers/scsi/advansys.c:6451:20: note: use '=' to turn this equality comparison into an assignment if ((sdtr_data == 0xFF)) { ^~ = 1 warning generated. Link: https://github.com/ClangBuiltLinux/linux/issues/155 Signed-off-by: Nathan Chancellor Acked-by: Matthew Wilcox Signed-off-by: Martin K. Petersen commit 947e326c45dff8010a03db54a81c2068e6c28941 Merge: 5678cb3c96ee 9f18b6b68e20 Author: David S. Miller Date: Thu Sep 20 20:01:53 2018 -0700 Merge branch 'net-wean-netfilter-from-fib_nh' David Ahern says: ==================== net: wean netfilter from fib_nh Two netfilter modules reference fib_nh. In both cases the code is only checking if a nexthop in a fib_info uses a specific device. Both instances essentially duplicate code from __fib_validate_source, so move that code into a helper and flip the netfilter modules to use it. ==================== Signed-off-by: David S. Miller commit 9f18b6b68e202668340ad16714960fca658cd4a1 Author: David Ahern Date: Thu Sep 20 13:50:49 2018 -0700 netfilter: nft_fib: Convert nft_fib4_eval to new dev helper Convert nft_fib4_eval to the new device checking helper and remove the duplicate code. Signed-off-by: David Ahern Signed-off-by: David S. Miller commit 91a178258aea08a42d67c04a303e1783c38217e6 Author: David Ahern Date: Thu Sep 20 13:50:48 2018 -0700 netfilter: rpfilter: Convert rpfilter_lookup_reverse to new dev helper Convert rpfilter_lookup_reverse to the new device checking helper and remove the duplicate code. Signed-off-by: David Ahern Signed-off-by: David S. Miller commit 78f2756c5fc0bf17560766dbc5aaa1e4a7ba66e4 Author: David Ahern Date: Thu Sep 20 13:50:47 2018 -0700 net/ipv4: Move device validation to helper Move the device matching check in __fib_validate_source to a helper and export it for use by netfilter modules. Code move only; no functional change intended. Signed-off-by: David Ahern Signed-off-by: David S. Miller commit fed564f6503bdfd57f6dc32b4a1e94b90b05e803 Author: Greg Edwards Date: Tue Sep 4 11:19:10 2018 -0600 scsi: target: iblock: split T10 PI SGL across command bios When T10 PI is enabled on a backing device for the iblock backstore, the PI SGL for the entire command is attached to the first bio only. This works fine if the command is covered by a single bio, but can result in ref tag errors in the client for the other bios in a multi-bio command, e.g. [ 47.631236] sda: ref tag error at location 2048 (rcvd 0) [ 47.637658] sda: ref tag error at location 4096 (rcvd 0) [ 47.644228] sda: ref tag error at location 6144 (rcvd 0) The command will be split into multiple bios if the number of data SG elements exceeds BIO_MAX_PAGES (see iblock_get_bio()). The bios may later be split again in the block layer on the host after iblock_submit_bios(), depending on the queue limits of the backing device. The block and SCSI layers will pass through the whole PI SGL down to the LLDD however that first bio is split up, but the LLDD may only use the portion that corresponds to the data length (depends on the LLDD, tested with scsi_debug). Split the PI SGL across the bios in the command, so each bio's bio_integrity_payload contains the protection information for the data in the bio. Use an sg_mapping_iter to keep track of where we are in PI SGL, so we know where to start with the next bio. Signed-off-by: Greg Edwards Reviewed-by: Mike Christie Signed-off-by: Martin K. Petersen commit 9ff01255a01c3d6ffc8670b358b3ac567d5646fc Author: Liu Bo Date: Tue Aug 21 05:21:15 2018 +0800 Blk-throttle: update to use rbtree with leftmost node cached As rbtree has native support of caching leftmost node, i.e. rb_root_cached, no need to do the caching by ourselves. Signed-off-by: Liu Bo Signed-off-by: Jens Axboe commit 5a7d7d0f9f791b1e13f26dbbb07c86482912ad62 Author: Nathan Chancellor Date: Thu Sep 20 17:04:20 2018 -0700 regulator: da905{2,5}: Remove unnecessary array check Clang warns that the address of a pointer will always evaluated as true in a boolean context: drivers/regulator/da9052-regulator.c:423:22: warning: address of array 'pdata->regulators' will always evaluate to 'true' [-Wpointer-bool-conversion] if (pdata && pdata->regulators) { ~~ ~~~~~~~^~~~~~~~~~ drivers/regulator/da9055-regulator.c:615:22: warning: address of array 'pdata->regulators' will always evaluate to 'true' [-Wpointer-bool-conversion] if (pdata && pdata->regulators) { ~~ ~~~~~~~^~~~~~~~~~ Link: https://github.com/ClangBuiltLinux/linux/issues/142 Signed-off-by: Nathan Chancellor Signed-off-by: Mark Brown commit 8cfde7847d5ed0bb77bace41519572963e43cd17 Author: Nathan Chancellor Date: Thu Sep 20 16:13:37 2018 -0700 spi: pic32: Use proper enum in dmaengine_prep_slave_rg Clang warns when one enumerated type is converted implicitly to another: drivers/spi/spi-pic32.c:323:8: warning: implicit conversion from enumeration type 'enum dma_data_direction' to different enumeration type 'enum dma_transfer_direction' [-Wenum-conversion] DMA_FROM_DEVICE, ^~~~~~~~~~~~~~~ drivers/spi/spi-pic32.c:333:8: warning: implicit conversion from enumeration type 'enum dma_data_direction' to different enumeration type 'enum dma_transfer_direction' [-Wenum-conversion] DMA_TO_DEVICE, ^~~~~~~~~~~~~ 2 warnings generated. Use the proper enums from dma_transfer_direction (DMA_FROM_DEVICE = DMA_DEV_TO_MEM = 2, DMA_TO_DEVICE = DMA_MEM_TO_DEV = 1) to satify Clang. Link: https://github.com/ClangBuiltLinux/linux/issues/159 Signed-off-by: Nathan Chancellor Signed-off-by: Mark Brown commit 36c9c3c91128e2b892c9be0dd9ee9bd82cbe82ad Merge: 0320ac5188ea 846311ae68f3 Author: Dave Airlie Date: Fri Sep 21 09:52:34 2018 +1000 Merge branch 'drm-next-4.20' of git://people.freedesktop.org/~agd5f/linux into drm-next This is a new pull for drm-next on top of last weeks with the following changes: - Fixed 64 bit divide - Fixed vram type on vega20 - Misc vega20 fixes - Misc DC fixes - Fix GDS/GWS/OA domain handling Previous changes from last week: amdgpu/kfd: - Picasso (new APU) support - Raven2 (new APU) support - Vega20 enablement - ACP powergating improvements - Add ABGR/XBGR display support - VCN JPEG engine support - Initial xGMI support - Use load balancing for engine scheduling - Lots of new documentation - Rework and clean up i2c and aux handling in DC - Add DP YCbCr 4:2:0 support in DC - Add DMCU firmware loading for Raven (used for ABM and PSR) - New debugfs features in DC - LVDS support in DC - Implement wave kill for gfx/compute (light weight reset for shaders) - Use AGP aperture to avoid gart mappings when possible - GPUVM performance improvements - Bulk moves for more efficient GPUVM LRU handling - Merge amdgpu and amdkfd into one module - Enable gfxoff and stutter mode on Raven - Misc cleanups Scheduler: - Load balancing support - Bug fixes ttm: - Bulk move functionality - Bug fixes radeon: - Misc cleanups Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20180920150438.12693-1-alexander.deucher@amd.com commit c98b0d2db7d7256bb1db5d2726c75b9d0881bddc Author: Fabio Estevam Date: Thu Sep 20 12:42:21 2018 -0300 pinctrl: mxs: do not export mxs_pinctrl_probe No user of mxs_pinctrl_probe() can be built as a module, hence exporting the symbol is not necessary. Drop EXPORT_SYMBOL_GPL. Inspired by a patch from Stefan Agner for the tegra pinctrl driver. Signed-off-by: Fabio Estevam Reviewed-by: Stefan Agner Signed-off-by: Linus Walleij commit 3be9349f38c7dd7f108a71f640908a727101d2db Author: Linus Walleij Date: Thu Jul 12 14:52:00 2018 +0200 ARM: dts: ux500: Mark PRCMU as syscon compatible We need to distribute out the responsibilities of the PRCMU registers instead of having one big lump handling everything. By making it syscon compatible, we can start grabbing the register map elsewhere when needed. Signed-off-by: Linus Walleij commit 5b799840140495394c43749a88751396e3a56c00 Author: Suzuki K Poulose Date: Wed Sep 12 14:53:52 2018 +0100 arm: dts: ste: Update coresight bindings for hardware port Switch to the new coresight bindings Cc: Mathieu Poirier Signed-off-by: Suzuki K Poulose Signed-off-by: Linus Walleij commit 2f967f9e9fa076affb711da1a8389b5d33814fc6 Author: Rob Herring Date: Thu Sep 13 13:12:34 2018 -0500 ARM: dts: ste: Fix SPI controller node names SPI controller nodes should be named 'spi' rather than 'ssp'. Fixing the name enables dtc SPI bus checks. Signed-off-by: Rob Herring Signed-off-by: Linus Walleij commit f2b0721350682eb7a2c02ecb4fbde32238818500 Author: Suzuki K Poulose Date: Wed Sep 12 14:53:49 2018 +0100 ARM: dts: omap: Update coresight bindings for hardware ports Switch to the new coresight bindings for hardware ports Cc: linux-omap@vger.kernel.org Cc: "Benoît Cousson" Cc: Tony Lindgren Cc: Mathieu Poirier Signed-off-by: Suzuki K Poulose Signed-off-by: Tony Lindgren commit ee8119af4facf87d45bae2d89765ef3f9e8c7746 Author: Linus Walleij Date: Tue Jul 3 10:03:47 2018 +0200 ARM: dts: ux500: Get rid of DTC warnings By removing the reference to skeleton.dtsi, defining chosen {} and proper memory nodes we get warning-free device trees for the Ux500. Signed-off-by: Linus Walleij commit ecde29569e3484e1d0a032bf4074449bce4d4a03 Author: Linus Walleij Date: Tue Jul 3 10:30:03 2018 +0200 ARM: dts: ux500: Fix LCDA clock line muxing The "lcdaclk_b_1" group is muxed with the function "lcd" but needs a separate entry to be muxed in with "lcda" rather than "lcd". Signed-off-by: Linus Walleij commit 66d77325609a0ae5b0b2acbda362f7191efd2064 Author: Geert Uytterhoeven Date: Tue Jun 26 09:50:10 2018 +0200 dt-bindings: arm: scu: Correct example SCU unit addresses The unit addresses of the Cortex-A9 SCU device nodes contain too many zeroes. Remove them. Signed-off-by: Geert Uytterhoeven Signed-off-by: Linus Walleij commit 2f217d24ecaec2012e628d21e244eef0608656a4 Author: Geert Uytterhoeven Date: Tue Jun 26 09:50:09 2018 +0200 ARM: dts: ux500: Correct SCU unit address The unit address of the Cortex-A9 SCU device node contains one zero too many. Remove it. Signed-off-by: Geert Uytterhoeven Signed-off-by: Linus Walleij commit dc4cd1257c86451cec3e8e352cc376348e4f4af4 Author: Chao Yu Date: Thu Sep 20 17:41:30 2018 +0800 f2fs: fix to recover inode's uid/gid during POR Step to reproduce this bug: 1. logon as root 2. mount -t f2fs /dev/sdd /mnt; 3. touch /mnt/file; 4. chown system /mnt/file; chgrp system /mnt/file; 5. xfs_io -f /mnt/file -c "fsync"; 6. godown /mnt; 7. umount /mnt; 8. mount -t f2fs /dev/sdd /mnt; After step 8) we will expect file's uid/gid are all system, but during recovery, these two fields were not been recovered, fix it. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit f84262b0862d43b71b3e80a036cdd9d82e620367 Author: Jaegeuk Kim Date: Wed Sep 19 15:45:19 2018 -0700 f2fs: avoid infinite loop in f2fs_alloc_nid If we have an error in f2fs_build_free_nids, we're able to fall into a loop to find free nids. Suggested-by: Chao Yu Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit cc893871f092be9ac1184a78f9ae1e76b85d5317 Author: Rob Herring Date: Thu Sep 13 13:12:25 2018 -0500 ARM: dts: ti: Fix SPI and I2C bus warnings dtc has new checks for I2C and SPI buses. Fix the warnings in node names and unit-addresses. arch/arm/boot/dts/am437x-idk-evm.dtb: Warning (spi_bus_bridge): /ocp@44000000/qspi@47900000: node name for SPI buses should be 'spi' arch/arm/boot/dts/am437x-sk-evm.dtb: Warning (spi_bus_bridge): /ocp@44000000/qspi@47900000: node name for SPI buses should be 'spi' arch/arm/boot/dts/am43x-epos-evm.dtb: Warning (spi_bus_bridge): /ocp@44000000/qspi@47900000: node name for SPI buses should be 'spi' arch/arm/boot/dts/omap3-n9.dtb: Warning (i2c_bus_reg): /ocp@68000000/i2c@48060000/ak8975@0f: I2C bus unit address format error, expected "f" arch/arm/boot/dts/am335x-osd3358-sm-red.dtb: Warning (i2c_bus_reg): /ocp/i2c@44e0b000/pressure@78: I2C bus unit address format error, expected "76" arch/arm/boot/dts/am335x-boneblack.dtb: Warning (i2c_bus_reg): /ocp/i2c@44e0b000/tda19988: I2C bus unit address format error, expected "70" arch/arm/boot/dts/am335x-boneblack-wireless.dtb: Warning (i2c_bus_reg): /ocp/i2c@44e0b000/tda19988: I2C bus unit address format error, expected "70" arch/arm/boot/dts/am335x-sancloud-bbe.dtb: Warning (i2c_bus_reg): /ocp/i2c@44e0b000/tda19988: I2C bus unit address format error, expected "70" arch/arm/boot/dts/am571x-idk.dtb: Warning (spi_bus_bridge): /ocp/qspi@4b300000: node name for SPI buses should be 'spi' arch/arm/boot/dts/am572x-idk.dtb: Warning (spi_bus_bridge): /ocp/qspi@4b300000: node name for SPI buses should be 'spi' arch/arm/boot/dts/am574x-idk.dtb: Warning (spi_bus_bridge): /ocp/qspi@4b300000: node name for SPI buses should be 'spi' arch/arm/boot/dts/am57xx-cl-som-am57x.dtb: Warning (spi_bus_bridge): /ocp/qspi@4b300000: node name for SPI buses should be 'spi' arch/arm/boot/dts/am57xx-sbc-am57x.dtb: Warning (spi_bus_bridge): /ocp/qspi@4b300000: node name for SPI buses should be 'spi' arch/arm/boot/dts/dra72-evm.dtb: Warning (spi_bus_bridge): /ocp/qspi@4b300000: node name for SPI buses should be 'spi' arch/arm/boot/dts/dra72-evm-revc.dtb: Warning (spi_bus_bridge): /ocp/qspi@4b300000: node name for SPI buses should be 'spi' arch/arm/boot/dts/dra76-evm.dtb: Warning (spi_bus_bridge): /ocp/qspi@4b300000: node name for SPI buses should be 'spi' arch/arm/boot/dts/dra7-evm.dtb: Warning (spi_bus_bridge): /ocp/qspi@4b300000: node name for SPI buses should be 'spi' arch/arm/boot/dts/am335x-pdu001.dtb: Warning (spi_bus_reg): /ocp/spi@481a0000/cfaf240320a032t: SPI bus unit address format error, expected "0" arch/arm/boot/dts/keystone-k2g-evm.dtb: Warning (spi_bus_bridge): /soc@0/qspi@2940000: node name for SPI buses should be 'spi' arch/arm/boot/dts/keystone-k2g-ice.dtb: Warning (spi_bus_bridge): /soc@0/qspi@2940000: node name for SPI buses should be 'spi' Cc: "Benoît Cousson" Cc: Tony Lindgren Cc: Santosh Shilimkar Cc: linux-omap@vger.kernel.org Signed-off-by: Rob Herring [tony@atomide.com: fixed mode to 644 for am335x-osd3358-sm-red.dts while at it] Signed-off-by: Tony Lindgren commit e99c4d576254628f9139b2320510cda552f4d597 Author: Grygorii Strashko Date: Mon Sep 10 17:57:55 2018 -0500 ARM: dts: dra62x-j5eco-evm: get rid of phy_id property The phy_id property is deprecated and phy-handle has to be used instead. Signed-off-by: Grygorii Strashko Signed-off-by: Tony Lindgren commit 3a25128c02f6935b393aba481808bee5c8ccc29a Author: Grygorii Strashko Date: Mon Sep 10 17:57:54 2018 -0500 ARM: dts: dm8148-t410: get rid of phy_id property The phy_id property is deprecated and phy-handle has to be used instead. Signed-off-by: Grygorii Strashko Signed-off-by: Tony Lindgren commit abf878ddfdf28f1d6d0d691ed165d0664dc850f9 Author: Grygorii Strashko Date: Mon Sep 10 17:57:53 2018 -0500 ARM: dts: dm8148-evm: get rid of phy_id property The phy_id property is deprecated and phy-handle has to be used instead. Signed-off-by: Grygorii Strashko Signed-off-by: Tony Lindgren commit 2ac921dc010af9b3749e58ddffd93997799a5b0a Author: Grygorii Strashko Date: Mon Sep 10 17:57:52 2018 -0500 ARM: dts: am57xx-cl-som-am57x: get rid of phy_id property The phy_id property is deprecated and phy-handle has to be used instead. Signed-off-by: Grygorii Strashko Signed-off-by: Tony Lindgren commit adfcf71b9f5c1b366c2a97a3d77a5edd8129b319 Author: Grygorii Strashko Date: Mon Sep 10 17:57:51 2018 -0500 ARM: dts: am57xx-idk-common: get rid of phy_id property The phy_id property is deprecated and phy-handle has to be used instead. Signed-off-by: Grygorii Strashko Signed-off-by: Tony Lindgren commit 4d80b7c5077b0fed6751b86c846aed4bd4da1e75 Author: Grygorii Strashko Date: Mon Sep 10 17:57:50 2018 -0500 ARM: dts: dra7-evm: get rid of phy_id property The phy_id property is deprecated and phy-handle has to be used instead. Signed-off-by: Grygorii Strashko Signed-off-by: Tony Lindgren commit c4ab246845652db29ae9dfd3c3b7c8e048cc9b72 Author: Grygorii Strashko Date: Mon Sep 10 17:57:49 2018 -0500 ARM: dts: dra71-evm: get rid of phy_id property The phy_id property is deprecated and phy-handle has to be used instead. Signed-off-by: Grygorii Strashko Signed-off-by: Tony Lindgren commit f1934c90a2cbebbbf23d928bd0dce2d7a1e71cd3 Author: Grygorii Strashko Date: Mon Sep 10 17:57:48 2018 -0500 ARM: dts: dra72-evm-revc: get rid of phy_id property The phy_id property is deprecated and phy-handle has to be used instead. Signed-off-by: Grygorii Strashko Signed-off-by: Tony Lindgren commit 24e0023c60050adf4fffccd383a2e75a5e3968a0 Author: Grygorii Strashko Date: Mon Sep 10 17:57:47 2018 -0500 ARM: dts: dra72-evm: get rid of phy_id property The phy_id property is deprecated and phy-handle has to be used instead. Signed-off-by: Grygorii Strashko Signed-off-by: Tony Lindgren commit 5180679c9a9d9789e2d2eccc038a557c2495222e Author: Grygorii Strashko Date: Mon Sep 10 17:57:46 2018 -0500 ARM: dts: dra76-evm: get rid of phy_id property The phy_id property is deprecated and phy-handle has to be used instead. Signed-off-by: Grygorii Strashko Signed-off-by: Tony Lindgren commit 04f48434dce0600249545c308cbd1fa937098d7f Author: Grygorii Strashko Date: Mon Sep 10 17:57:45 2018 -0500 ARM: dts: am437x-cm-t43: get rid of phy_id property The phy_id property is deprecated and phy-handle has to be used instead. Signed-off-by: Grygorii Strashko Signed-off-by: Tony Lindgren commit cfd91db31fbf4ae7f2cfca2617ce99956b1c94d6 Author: Grygorii Strashko Date: Mon Sep 10 17:57:44 2018 -0500 ARM: dts: am437x-gp-evm: get rid of phy_id property The phy_id property is deprecated and phy-handle has to be used instead. Signed-off-by: Grygorii Strashko Signed-off-by: Tony Lindgren commit c0af07883c2c3bb4e38c90272b687dafdaf41db0 Author: Grygorii Strashko Date: Mon Sep 10 17:57:43 2018 -0500 ARM: dts: am437x-idk-evm: get rid of phy_id property The phy_id property is deprecated and phy-handle has to be used instead. Signed-off-by: Grygorii Strashko Signed-off-by: Tony Lindgren commit 7c0373b16f045bf0940c32ab131fd1a3d2bb1962 Author: Grygorii Strashko Date: Mon Sep 10 17:57:42 2018 -0500 ARM: dts: am437x-sk-evm: get rid of phy_id property The phy_id property is deprecated and phy-handle has to be used instead. Signed-off-by: Grygorii Strashko Signed-off-by: Tony Lindgren commit 5925ae23541816b56b6c278bdfa7f0ada8f545b4 Author: Grygorii Strashko Date: Mon Sep 10 17:57:41 2018 -0500 ARM: dts: am43x-epos-evm: get rid of phy_id property The phy_id property is deprecated and phy-handle has to be used instead. Signed-off-by: Grygorii Strashko Signed-off-by: Tony Lindgren commit 4d8b032d3c03f4e9788a18bbb51b10e6c9e8a56b Author: Grygorii Strashko Date: Sat Sep 8 19:05:08 2018 -0500 ARM: dts: am335x-bone-common: get rid of phy_id property The phy_id property is deprecated and phy-handle has to be used instead. Signed-off-by: Grygorii Strashko Signed-off-by: Tony Lindgren commit 8cd1cc3f7c0ae07f32ea0a8fab2143296f163fc5 Author: Grygorii Strashko Date: Sat Sep 8 19:05:07 2018 -0500 ARM: dts: am335x-chiliboard: get rid of phy_id property The phy_id property is deprecated and phy-handle has to be used instead. Signed-off-by: Grygorii Strashko Signed-off-by: Tony Lindgren commit 0d175556e2e4235d0abb282817ac61faced81494 Author: Grygorii Strashko Date: Sat Sep 8 19:05:06 2018 -0500 ARM: dts: am335x-cm-t335: get rid of phy_id property The phy_id property is deprecated and phy-handle has to be used instead. Signed-off-by: Grygorii Strashko Signed-off-by: Tony Lindgren commit 53c2c22b8cfa406ba40ec39eb75d8e38fcd757cb Author: Grygorii Strashko Date: Sat Sep 8 19:05:05 2018 -0500 ARM: dts: am335x-evmsk: get rid of phy_id property The phy_id property is deprecated and phy-handle has to be used instead. Signed-off-by: Grygorii Strashko Signed-off-by: Tony Lindgren commit d9312570d5d1e5d3cce4444840207a79b83a2da5 Author: Grygorii Strashko Date: Sat Sep 8 19:05:04 2018 -0500 ARM: dts: am335x-igep0033: get rid of phy_id property The phy_id property is deprecated and phy-handle has to be used instead. Signed-off-by: Grygorii Strashko Signed-off-by: Tony Lindgren commit 5ec73320abd72895e4e9ce37f764b31702483f1c Author: Grygorii Strashko Date: Sat Sep 8 19:05:03 2018 -0500 ARM: dts: am335x-lxm: get rid of phy_id property The phy_id property is deprecated and phy-handle has to be used instead. Signed-off-by: Grygorii Strashko Signed-off-by: Tony Lindgren commit 5ef346bb8092a4d2a52f9eb1bb6f20d991df889e Author: Grygorii Strashko Date: Sat Sep 8 19:05:02 2018 -0500 ARM: dts: am335x-moxa-uc-8100-me-t: get rid of phy_id property The phy_id property is deprecated and phy-handle has to be used instead. Signed-off-by: Grygorii Strashko Signed-off-by: Tony Lindgren commit 25245c44d4d75598e7b2969e97f2a238932bd49a Author: Grygorii Strashko Date: Sat Sep 8 19:05:01 2018 -0500 ARM: dts: am335x-nano: get rid of phy_id property The phy_id property is deprecated and phy-handle has to be used instead. Signed-off-by: Grygorii Strashko Signed-off-by: Tony Lindgren commit 4f9584518f248c8b79336e473cc4432a88e964c7 Author: Grygorii Strashko Date: Sat Sep 8 19:05:00 2018 -0500 ARM: dts: am335x-pdu001: get rid of phy_id property The phy_id property is deprecated and phy-handle has to be used instead. Signed-off-by: Grygorii Strashko Signed-off-by: Tony Lindgren commit 9e19b4bd012b268495b5d70a70b5b2ec1c79846e Author: Grygorii Strashko Date: Sat Sep 8 19:04:59 2018 -0500 ARM: dts: am335x-pepper: get rid of phy_id property The phy_id property is deprecated and phy-handle has to be used instead. Signed-off-by: Grygorii Strashko Signed-off-by: Tony Lindgren commit 769de05b2ae42a60ab98924723a982fedbad9ed7 Author: Grygorii Strashko Date: Sat Sep 8 19:04:57 2018 -0500 ARM: dts: am335x-shc: get rid of phy_id property The phy_id property is deprecated and phy-handle has to be used instead. Signed-off-by: Grygorii Strashko Signed-off-by: Tony Lindgren commit 0f6e0ed00bc35ca41bf444243fb382f332baa137 Merge: 6b63967a61a0 dcbf6b18d81b Author: Tony Lindgren Date: Thu Sep 20 14:30:45 2018 -0700 Merge branch 'am335x-evm-port-fix' into omap-for-v4.20/dt commit dcbf6b18d81bcdc51390ca1b258c17e2e13b7d0c Author: Grygorii Strashko Date: Sat Sep 8 17:33:40 2018 -0500 ARM: dts: am335x-evm: fix number of cpsw am335x-evm has only one CPSW external port physically wired, but DT defines 2 ext. ports. As result, PHY connection failure reported for the second ext. port. Update DT to reflect am335x-evm board HW configuration, and, while here, switch to use phy-handle instead of phy_id. Signed-off-by: Grygorii Strashko Signed-off-by: Tony Lindgren commit 1137ceee76ba8b8c698e11b7150e35524f071bda Author: Janusz Krzysztofik Date: Mon Sep 10 21:50:08 2018 +0200 ARM: OMAP1: ams-delta: Don't request unused GPIOs GPIOs with no kernel drivers can still be used from user space, don't request them from the board file. Signed-off-by: Janusz Krzysztofik Signed-off-by: Tony Lindgren commit 26683316c92ab2d1b330a3a38548328c9b136ad1 Author: Janusz Krzysztofik Date: Mon Sep 10 19:47:22 2018 +0200 ARM: OMAP1: ams-delta-fiq: Use Instead of defining symbols already defined in linux/platform_data/gpio-omap.h, use that header file. Since we include the header into an assembler code, prevent C only bits from being read in. Signed-off-by: Janusz Krzysztofik Signed-off-by: Tony Lindgren commit d3e952ad300e288e4f5bbdb2203a5a8c69e0946e Author: Janusz Krzysztofik Date: Mon Sep 10 01:44:19 2018 +0200 ARM: OMAP1: ams-delta: register MODEM device earlier Amstrad Delta MODEM device used to be initialized at arch_initcall before it was once moved to late_initcall by commit f7519d8c8290 ("ARM: OMAP1: ams-delta: register latch dependent devices later"). The purpose of that change was to postpone initialization of devices which depended on latch2 pins until latch2 converted to GPIO device was ready. After recent fixes to GPIO handling, it was possible to moove registration of most of those device back to where they were before. The same can be safely done with the MODEM device as initialization of GPIO pins it depends on was moved to machine_init by preceding patch. Move registration of the MODEM device to arch_initcall_sync, not to arch_initcall, so it is never exposed to potential conflict in registration order hazard against OMAP serial ports. Signed-off-by: Janusz Krzysztofik Reviewed-by: Linus Walleij Signed-off-by: Tony Lindgren commit 1464d031c45da44da6988623c0978b63241df40b Author: Janusz Krzysztofik Date: Mon Sep 10 01:44:18 2018 +0200 ARM: OMAP1: ams-delta: initialize latch2 pins to safe values Latch2 pins control a number of on-board devices, namely LCD, NAND, MODEM and CODEC. Those pins used to be initialized with safe values from init_machine before that operation was: 1) moved to late_initcall in preparation for conversion of latch2 to GPIO device - see commit f7519d8c8290 ("ARM: OMAP1: ams-delta: register latch dependent devices later"), 2) replaced with non-atomic initialization performed by means of gpio_request_array() - see commit 937eb4bb0058 ("ARM: OMAP1: ams-delta: convert latches to basic_mmio_gpio"), 3) made completely asynchronous by delegation of GPIO request operations performed on subsets of pins to respective device drivers in subsequent commits. One visible negative result of that disintegration was corrupt keyboard data reported by serio driver, recently fixed by commit 41f8fee385a0 ("ARM: OMAP1: ams-delta: Hog "keybrd_dataout" GPIO pin"). Moreover, initialization of LATCH2_PIN_MODEM_CODEC still performed with ams_delta_latch2_write() wrapper from late_init() is now done on not requested GPIO pin. Reintroduce atomic initialization of latch2 pins at machine_init to prevent from random values potentially corrupting NAND data or maybe even destroing other hardware. Also take care of MODEM/CODEC related pins so MODEM device probe succeeds even if latch2 GPIO device or dependent regulator is not ready and CODEC can be reached over the MODEM even if audio driver doesn't take control over LATCH2_PIN_MODEM_CODEC. Once done, remove the no longer needed GPIO based implementation of ams_delta_latch_write() and its frontend macro. Signed-off-by: Janusz Krzysztofik Reviewed-by: Linus Walleij [tony@atomide.com: updated for the header location to remove dependency] Signed-off-by: Tony Lindgren commit 0812db94374867324a7811b733f95d5aa06e28b5 Author: Janusz Krzysztofik Date: Mon Sep 10 01:44:17 2018 +0200 ARM: OMAP1: ams-delta: assign MODEM IRQ from GPIO descriptor Don't request MODEM IRQ GPIO by its global number in ams_delta_modem_init(). Instead, obtain its GPIO descriptor and assign related IRQ to the MODEM. Do that from omap_gpio_deps_init(), where the chip is already looked up. Then, in ams_delta_modem_init(), just check for the IRQ number having been already assigned. Signed-off-by: Janusz Krzysztofik Reviewed-by: Linus Walleij Signed-off-by: Tony Lindgren commit 4f802170a861265680cad03f47b19c4c3a137052 Author: Keith Busch Date: Thu Sep 20 10:27:08 2018 -0600 PCI/DPC: Save and restore config state This patch provides DPC save and restore capabilities. This is necessary for the driver to observe DPC events in the event the configuration space needs to be restored after a reset. Signed-off-by: Keith Busch Signed-off-by: Bjorn Helgaas Reviewed-by: Sinan Kaya commit 874b3251113a1e2cbe79c24994dc03fe4fe4b99b Author: Keith Busch Date: Thu Sep 20 10:27:07 2018 -0600 PCI: portdrv: Restore PCI config state on slot reset The port's config space may be cleared after a link reset, which wipes out the bridge's bus and memory windows. Restore the config space that was saved during probe so we can access downstream devices. Signed-off-by: Keith Busch Signed-off-by: Bjorn Helgaas Reviewed-by: Sinan Kaya commit b2164e48155607b8aa3c3004a03768cc30558d6e Author: Chris Wilson Date: Thu Sep 20 20:59:48 2018 +0100 drm/i915/execlists: Onion unwind for logical_ring_init() failure Fix up the error unwind for logical_ring_init() failing by moving the cleanup into the callers who own the various bits of state during initialisation, so we don't forget to free the state allocated by the caller. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20180920195948.16448-1-chris@chris-wilson.co.uk commit ece8ea7bfac053cf27c24e1a767b796a4db2fbd7 Author: Jason Gunthorpe Date: Sun Sep 16 20:44:46 2018 +0300 RDMA/usnic: Do not use ucontext->tgid Update this driver to match the code it copies from umem.c which no longer uses tgid. Signed-off-by: Jason Gunthorpe Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford commit d4b4dd1b9706e48c370f88d3adfe713e43423cc9 Author: Jason Gunthorpe Date: Sun Sep 16 20:44:45 2018 +0300 RDMA/umem: Do not use current->tgid to track the mm_struct This is just wrong, the process that calls into the reg_mr is the process associated with the umem, and that does not have to be the same process that created the context. When this code was first written mmgrab() didn't exist, however these days we can just directly hold the mm_struct pointer in the umem and have no ambiguity when it comes to releasing the umem as to which mm it was associated with. Signed-off-by: Jason Gunthorpe Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford commit ce92db1ca84de2ebc5be7a81a68f2e220799fcf5 Author: Jason Gunthorpe Date: Sun Sep 16 20:43:12 2018 +0300 RDMA/ucontext: Get rid of the old disassociate flow The disassociate_ucontext function in every driver is now empty, so we don't need this ugly and wrong code that was messing with tgids. rdma_user_mmap_io does this same work in a better way. Signed-off-by: Jason Gunthorpe Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford commit 6745d356ab393b9cd1e54370054a9899c92f42af Author: Jason Gunthorpe Date: Sun Sep 16 20:43:11 2018 +0300 RDMA/hns: Use rdma_user_mmap_io Rely on the new core code helper to map BAR memory from the driver. Signed-off-by: Jason Gunthorpe Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford commit e2cd1d1ad204664f9ce78cb61c9307c149051f8e Author: Jason Gunthorpe Date: Sun Sep 16 20:43:10 2018 +0300 RDMA/mlx5: Use rdma_user_mmap_io Rely on the new core code helper to map BAR memory from the driver. Signed-off-by: Jason Gunthorpe Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford commit c282da4109e4a1238432f2cab22af6e3562f4b47 Author: Jason Gunthorpe Date: Sun Sep 16 20:43:09 2018 +0300 RDMA/mlx4: Use rdma_user_mmap_io Rely on the new core code helper to map BAR memory from the driver. Signed-off-by: Jason Gunthorpe Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford commit 5f9794dc94f59ad1eb821724a8ae1f8e803ea188 Author: Jason Gunthorpe Date: Sun Sep 16 20:43:08 2018 +0300 RDMA/ucontext: Add a core API for mmaping driver IO memory To support disassociation and PCI hot unplug, we have to track all the VMAs that refer to the device IO memory. When disassociation occurs the VMAs have to be revised to point to the zero page, not the IO memory, to allow the physical HW to be unplugged. The three drivers supporting this implemented three different versions of this algorithm, all leaving something to be desired. This new common implementation has a few differences from the driver versions: - Track all VMAs, including splitting/truncating/etc. Tie the lifetime of the private data allocation to the lifetime of the vma. This avoids any tricks with setting vm_ops which Linus didn't like. (see link) - Support multiple mms, and support properly tracking mmaps triggered by processes other than the one first opening the uverbs fd. This makes fork behavior of disassociation enabled drivers the same as fork support in normal drivers. - Don't use crazy get_task stuff. - Simplify the approach for to racing between vm_ops close and disassociation, fixing the related bugs most of the driver implementations had. Since we are in core code the tracking list can be placed in struct ib_uverbs_ufile, which has a lifetime strictly longer than any VMAs created by mmap on the uverbs FD. Link: https://www.spinics.net/lists/stable/msg248747.html Link: https://lkml.kernel.org/r/CA+55aFxJTV_g46AQPoPXen-UPiqR1HGMZictt7VpC-SMFbm3Cw@mail.gmail.com Signed-off-by: Jason Gunthorpe Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford commit 8e1cb32d515bc6b691782104b00d9056a33127c8 Author: Chris Wilson Date: Thu Sep 20 17:13:43 2018 +0100 drm/i915: Park the GPU on module load Once we have flushed the first request through the system to both load a context and record the default state; tell the GPU to park and idle itself, putting itself immediately (hopefully at least) into a powersaving state, and allowing ourselves to start from known state after setting up all our bookkeeping. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20180920161343.1117-1-chris@chris-wilson.co.uk commit 380583227c0c7f52383b0cd5c0e2de93ed31d553 Author: Boris Brezillon Date: Thu Sep 20 09:31:12 2018 +0200 spi: spi-mem: Add extra sanity checks on the op param Some combinations are simply not valid and should be rejected before the op is passed to the SPI controller driver. Add an spi_mem_check_op() helper and use it in spi_mem_exec_op() and spi_mem_supports_op() to make sure the spi-mem operation is valid. Signed-off-by: Boris Brezillon Signed-off-by: Mark Brown commit d35c595bf0053b7df80ef9d44140ac5da6cc698b Author: Sean V Kelley Date: Sun Sep 16 15:12:03 2018 -0700 perf vendor events arm64: Revise core JSON events for eMAG Split the PMU events into meaningful functional groups. Update core pmu events based on supported ARMv8 recommended IMPLEMENTATION DEFINED events. The JSON files are updated with reference to a PMU table shared here: https://github.com/AmpereComputing/ampere-centos-kernel/blob/amp-centos-7.5-kernel/Documentation/arm64/eMAG-ARM-CoreImpDefined.pdf Changes in v3: - Removed CHAIN event as it wouldn't be useful in Perf - William - Will factor out events 0x00-0x38 in a follow-on patch - William - to armv8-recommended.json Changes in V2: - Provided documentation for changes - John, William - Broke up into meaningful groups - William Signed-off-by: Sean V Kelley Reviewed-by: William Cohen Cc: John Garry Cc: linux-arm-kernel@lists.infradead.org LPU-Reference: 20180916221203.7935-1-seanvk.dev@oregontracks.org Link: https://lkml.kernel.org/n/tip-tzvs1ip6srcv2et0ny58e0wy@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit f858927fd6ce394a7f431153d44ad0a09e8f49a1 Author: Rob Herring Date: Thu Sep 13 08:59:25 2018 -0500 scripts/dtc: Update to upstream version v1.4.7-14-gc86da84d30e4 Major changes are I2C and SPI bus checks, YAML output format (for future validation), some new libfdt functions, and more libfdt validation of dtbs. The YAML addition adds an optional dependency on libyaml. pkg-config is used to test for it and pkg-config became a kconfig dependency in 4.18. This adds the following commits from upstream: c86da84d30e4 Add support for YAML encoded output 361b5e7d8067 Make type_marker_length helper public bfbfab047e45 pylibfdt: Add a means to add and delete notes 9005f4108e7c pylibfdt: Allow delprop() to return errors b94c056b137e Make valgrind optional fd06c54d4711 tests: Better testing of dtc -I fs mode c3f50c9a86d9 tests: Allow dtbs_equal_unordered to ignore mem reserves 0ac9fdee37c7 dtc: trivial '-I fs -O dts' test 0fd1c8c783f3 pylibfdt: fdt_get_mem_rsv returns 2 uint64_t values 04853cad18f4 pylibfdt: Don't incorrectly / unnecessarily override uint64_t typemap 9619c8619c37 Kill bogus TYPE_BLOB marker type ac68ff92ae20 parser: add TYPE_STRING marker to path references 90a190eb04d9 checks: add SPI bus checks 53a1bd546905 checks: add I2C bus checks 88f18909db73 dtc: Bump version to v1.4.7 85bce8b2f06d tests: Correction to vg_prepare_blob() 57f7f9e7bc7c tests: Don't call memcmp() with NULL arguments c12b2b0c20eb libfdt: fdt_address_cells() and fdt_size_cells() 3fe0eeda0b7f livetree: Set phandle properties type to uint32 853649acceba pylibfdt: Support the sequential-write interface 9b0e4fe26093 tests: Improve fdt_resize() tests 1087504bb3e8 libfdt: Add necessary header padding in fdt_create() c72fa777e613 libfdt: Copy the struct region in fdt_resize() 32b9c6130762 Preserve datatype markers when emitting dts format 6dcb8ba408ec libfdt: Add helpers for accessing unaligned words 42607f21d43e tests: Fix incorrect check name 'prop_name_chars' 9d78c33bf8a1 tests: fix grep for checks error messages b770f3d1c13f pylibfdt: Support setting the name of a node 2f0d07e678e0 pylibfdt: Add functions to set and get properties as strings 354d3dc55939 pylibfdt: Update the bytearray size with pack() 3c374d46acce pylibfdt: Allow reading integer values from properties 49d32ce40bb4 pylibfdt: Use an unsigned type for fdt32_t 481246a0c13a pylibfdt: Avoid accessing the internal _fdt member in tests 9aafa33d99ed pylibfdt: Add functions to update properties 5a598671fdbf pylibfdt: Support device-tree creation/expansion 483e170625e1 pylibfdt: Add support for reading the memory reserve map 29bb05aa4200 pylibfdt: Add support for the rest of the header functions 582a7159a5d0 pylibfdt: Add support for fdt_next_node() f0f8c9169819 pylibfdt: Reorder functions to match libfdt.h 64a69d123935 pylibfdt: Return string instead of bytearray from getprop() 4d09a83420df fdtput: Add documentation e617cbe1bd67 fdtget: Add documentation 180a93924014 Use format specifiers in a bunch of places we should b9af3b396576 scripts/dtc: Fixed format mismatch in fprintf 4b8fcc3d015c libfdt: Add fdt_check_full() function c14223fb2292 tests: Use valgrind client requests for better checking 5b67d2b955a3 tests: Better handling of valgrind errors saving blobs e2556aaeb506 tests: Remove unused #define fb9c6abddaa8 Use size_t for blob lengths in utilfdt_read* 0112fda03bf6 libfdt: Add fdt_header_size() 6473a21d8bfe Consolidate utilfdt_read_len() variants d5db5382c5e5 libfdt: Safer access to memory reservations 719d582e98ec libfdt: Propagate name errors in fdt_getprop_by_offset() 70166d62a27f libfdt: Safer access to strings section eb890c0f77dc libfdt: Make fdt_check_header() more thorough 899d6fad93f3 libfdt: Improve sequential write state checking 04b5b4062ccd libfdt: Clean up header checking functions 44d3efedc816 Preserve datatype information when parsing dts f0be81bd8de0 Make Property a subclass of bytearray 24b1f3f064d4 pylibfdt: Add a method to access the device tree directly Signed-off-by: Rob Herring commit 5678cb3c96eeea907f5319a3644bbada26508e58 Author: Corentin Labbe Date: Wed Sep 19 19:06:53 2018 +0000 net-next: mscc: remove unused ocelot_dev_gmii.h The header ocelot_dev_gmii.h is unused since the inclusion of the driver. It is unused, lets just remove it. Signed-off-by: Corentin Labbe Signed-off-by: David S. Miller commit bea6385789b8b5e1e3228a281978ca6c4a8c70a0 Author: Adrian Hunter Date: Thu Sep 20 16:00:48 2018 +0300 perf intel-pt: Implement decoder flags for trace begin / end Have the Intel PT decoder implement the new Intel PT decoder flags for trace begin / end. Previously, the decoder would indicate begin / end by a branch from / to zero. That hides useful information, in particular when a trace ends with a call. That happens when using address filters, for example: $ perf record -e intel_pt/cyc,mtc_period=0,noretcomp/u --filter='filter main @ /bin/uname ' uname Linux [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.031 MB perf.data ] Before: $ perf script --itrace=cre -Ftime,flags,ip,sym,symoff,addr --ns 7249.622183310: tr strt 0 [unknown] => 401590 main+0x0 7249.622183311: call 4015b9 main+0x29 => 0 [unknown] 7249.622183711: tr strt 0 [unknown] => 4015be main+0x2e 7249.622183714: call 4015c8 main+0x38 => 0 [unknown] 7249.622247731: tr strt 0 [unknown] => 4015cd main+0x3d 7249.622247760: call 4015d7 main+0x47 => 0 [unknown] 7249.622248340: tr strt 0 [unknown] => 4015dc main+0x4c 7249.622248341: call 4015e1 main+0x51 => 0 [unknown] 7249.622248681: tr strt 0 [unknown] => 4015e6 main+0x56 7249.622248682: call 4015eb main+0x5b => 0 [unknown] 7249.622248970: tr strt 0 [unknown] => 4015f0 main+0x60 7249.622248971: call 401612 main+0x82 => 0 [unknown] 7249.622249757: tr strt 0 [unknown] => 401617 main+0x87 7249.622249770: call 401847 main+0x2b7 => 0 [unknown] 7249.622250606: tr strt 0 [unknown] => 40184c main+0x2bc 7249.622250612: call 4019bf main+0x42f => 0 [unknown] 7249.622256823: tr strt 0 [unknown] => 4019c4 main+0x434 7249.622256863: call 4019f5 main+0x465 => 0 [unknown] 7249.622264217: tr strt 0 [unknown] => 4019fa main+0x46a 7249.622264235: call 401832 main+0x2a2 => 0 [unknown] After: $ perf script --itrace=cre -Ftime,flags,ip,sym,symoff,addr --ns 7249.622183310: tr strt 0 [unknown] => 401590 main+0x0 7249.622183311: tr end call 4015b9 main+0x29 => 401ef0 set_program_name+0x0 7249.622183711: tr strt 0 [unknown] => 4015be main+0x2e 7249.622183714: tr end call 4015c8 main+0x38 => 4014b0 setlocale@plt+0x0 7249.622247731: tr strt 0 [unknown] => 4015cd main+0x3d 7249.622247760: tr end call 4015d7 main+0x47 => 4012d0 bindtextdomain@plt+0x0 7249.622248340: tr strt 0 [unknown] => 4015dc main+0x4c 7249.622248341: tr end call 4015e1 main+0x51 => 4012b0 textdomain@plt+0x0 7249.622248681: tr strt 0 [unknown] => 4015e6 main+0x56 7249.622248682: tr end call 4015eb main+0x5b => 404340 atexit+0x0 7249.622248970: tr strt 0 [unknown] => 4015f0 main+0x60 7249.622248971: tr end call 401612 main+0x82 => 401320 getopt_long@plt+0x0 7249.622249757: tr strt 0 [unknown] => 401617 main+0x87 7249.622249770: tr end call 401847 main+0x2b7 => 401360 uname@plt+0x0 7249.622250606: tr strt 0 [unknown] => 40184c main+0x2bc 7249.622250612: tr end call 4019bf main+0x42f => 401b10 print_element+0x0 7249.622256823: tr strt 0 [unknown] => 4019c4 main+0x434 7249.622256863: tr end call 4019f5 main+0x465 => 401340 __overflow@plt+0x0 7249.622264217: tr strt 0 [unknown] => 4019fa main+0x46a 7249.622264235: tr end call 401832 main+0x2a2 => 401520 exit@plt+0x0 Signed-off-by: Adrian Hunter Cc: Andi Kleen Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20180920130048.31432-7-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit c6b5da093a8ba740b71dd0052f3846016986fd21 Author: Adrian Hunter Date: Thu Sep 20 16:00:47 2018 +0300 perf intel-pt: Add decoder flags for trace begin / end Previously, the decoder would indicate begin / end by a branch from / to zero. That hides useful information, in particular when a trace ends with a call. To prepare for remedying that, add Intel PT decoder flags for trace begin / end and map them to the existing sample flags. Signed-off-by: Adrian Hunter Cc: Andi Kleen Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20180920130048.31432-6-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 2dcde4e152a3e319cc7e76c7c6b8548a3c72310d Author: Adrian Hunter Date: Thu Sep 20 16:00:46 2018 +0300 perf tools: Improve thread_stack__process() for trace begin / end thread_stack__process() is used to create call paths for database export. Improve the handling of trace begin / end to allow for a trace that ends in a call. Previously, the Intel PT decoder would indicate begin / end by a branch from / to zero. That hides useful information, in particular when a trace ends with a call. Before remedying that, enhance the thread stack so that it identifies the trace end by the flag instead of by ip == 0. Signed-off-by: Adrian Hunter Cc: Andi Kleen Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20180920130048.31432-5-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 4d60e5e36aa6f11b4d9eadc5d2b94128f24870c7 Author: Adrian Hunter Date: Thu Sep 20 16:00:45 2018 +0300 perf tools: Improve thread_stack__event() for trace begin / end thread_stack__event() is used to create call stacks, by keeping track of calls and returns. Improve the handling of trace begin / end to allow for a trace that ends in a call. Previously, the Intel PT decoder would indicate begin / end by a branch from / to zero. That hides useful information, in particular when a trace ends with a call. Before remedying that, enhance the thread stack so that it does not expect to see the 'return' for a 'call' that ends the trace. Committer notes: Added this: return thread_stack__push(thread->ts, ret_addr, - flags && PERF_IP_FLAG_TRACE_END); + flags & PERF_IP_FLAG_TRACE_END); To fix problem spotted by: debian:9: clang version 3.8.1-24 (tags/RELEASE_381/final) debian:experimental: clang version 6.0.1-6 (tags/RELEASE_601/final) Signed-off-by: Adrian Hunter Cc: Andi Kleen Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20180920130048.31432-4-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit fc795bf7224efda8c35e505966c2757856064247 Author: Oder Chiou Date: Wed Sep 19 09:56:47 2018 +0800 ASoC: rt5663: Remove the boost volume in the beginning of playback The patch removes the boost volume in the beginning of playback while the DAC volume set to lower. Signed-off-by: Oder Chiou Signed-off-by: Mark Brown commit 8d6258a4dd267838e2f10643c3d91b79fe75ef6e Author: Kuninori Morimoto Date: Tue Sep 18 01:31:09 2018 +0000 ASoC: add for_each_dpcm_be() macro To be more readable code, this patch adds new for_each_dpcm_be() macro, and replace existing code to it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit d2e24d64652bf9d272e5496ae8a562bc64facff3 Author: Kuninori Morimoto Date: Tue Sep 18 01:30:54 2018 +0000 ASoC: add for_each_dpcm_fe() macro To be more readable code, this patch adds new for_each_dpcm_fe() macro, and replace existing code to it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit 1a1035a9854fd893d487a84edccc1d5804e1d716 Author: Kuninori Morimoto Date: Tue Sep 18 01:30:41 2018 +0000 ASoC: add for_each_comp_order() macro To be more readable code, this patch adds new for_each_comp_order() macro, and replace existing code to it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit f70f18f7d459b7958a4d3944396e2bc4a9f7ed72 Author: Kuninori Morimoto Date: Tue Sep 18 01:29:55 2018 +0000 ASoC: add for_each_card_components() macro To be more readable code, this patch adds new for_each_card_components() macro, and replace existing code to it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit bcb1fd1fcd6507ba5a1f8610550135dc367aedb7 Author: Kuninori Morimoto Date: Tue Sep 18 01:29:35 2018 +0000 ASoC: add for_each_card_rtds() macro To be more readable code, this patch adds new for_each_card_rtds() macro, and replace existing code to it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit 98061fdbfccc02aa0fd6637c67a0524aab385b8d Author: Kuninori Morimoto Date: Tue Sep 18 01:29:16 2018 +0000 ASoC: add for_each_card_links() macro To be more readable code, this patch adds new for_each_card_links() macro, and replace existing code to it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit 7fe072b4df5d0cc832eb758c1eed243c145a2dfc Author: Kuninori Morimoto Date: Tue Sep 18 01:28:49 2018 +0000 ASoC: add for_each_card_prelinks() macro To be more readable code, this patch adds new for_each_card_prelinks() macro, and replace existing code to it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit 6d11b12879144da5f5aa08071a8a7f95f3b5a4e8 Author: Kuninori Morimoto Date: Tue Sep 18 01:28:30 2018 +0000 ASoC: rename for_each_rtd_codec_dai_reverse to rollback commit 0b7990e38971 ("ASoC: add for_each_rtd_codec_dai() macro") added for_each_rtd_codec_dai_reverse(). but _rollback() is better naming than _reverse(). This patch rename it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit ff348763775e9ed39ca8f354b67f9ba62ec27f2c Author: Felix Eckhofer Date: Mon Sep 17 11:34:48 2018 +0200 doc: Fix acronym "FEKEK" in ecryptfs "FEFEK" was incorrectly used as acronym for "File Encryption Key Encryption Key". This replaces all occurences with "FEKEK". Signed-off-by: Felix Eckhofer Signed-off-by: Jonathan Corbet commit 7afecb3073e357ebfe4087e4ab8bb493c32bb652 Author: Kuninori Morimoto Date: Tue Sep 18 01:28:04 2018 +0000 ASoC: convert for_each_rtd_codec_dai() for missing part commit 0b7990e38971 ("ASoC: add for_each_rtd_codec_dai() macro") added for_each_rtd_codec_dai(), but it didn't convert few loop which is not using "rtd". This patch fixup it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit c03e2fa753020c18f9c0b4017be3f12816039841 Author: Mauro Carvalho Chehab Date: Mon Sep 17 15:02:34 2018 -0400 docs: fix some broken documentation references Some documentation files received recent changes and are pointing to wrong places. Those references can easily fixed with the help of a script: $ ./scripts/documentation-file-ref-check --fix Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Jan Kara Reviewed-by: Darrick J. Wong Signed-off-by: Jonathan Corbet commit 9d723b4ccbd2248a388f37200a931b68dab28ada Author: Robin Murphy Date: Thu Sep 20 14:14:26 2018 +0100 iommu: Fix passthrough option documentation Document that the default for "iommu.passthrough" is now configurable. Fixes: 58d1131777a4 ("iommu: Add config option to set passthrough as default") Signed-off-by: Robin Murphy Signed-off-by: Jonathan Corbet commit f589d95b9751d1ae4cbe2cdd2e505c11a5438c9e Author: Bjorn Andersson Date: Wed Sep 19 18:40:20 2018 -0700 regulator: qcom: Add PMS405 regulators The PMS405 provdies 5 SMPS regulators and 13 LDOs, add these to the RPM regulator driver. Signed-off-by: Bjorn Andersson Reviewed-by: Vinod Koul Signed-off-by: Mark Brown commit c29de84149aba5f74e87b6491c13ac7203c12f55 Author: Keith Busch Date: Thu Sep 20 10:27:06 2018 -0600 PCI: portdrv: Initialize service drivers directly The PCI port driver saves the PCI state after initializing the device with the applicable service devices. This was, however, before the service drivers were even registered because PCI probe happens before the device_initcall initialized those service drivers. The config space state that the services set up were not being saved. The end result would cause PCI devices to not react to events that the drivers think they did if the PCI state ever needed to be restored. Fix this by changing the service drivers from using the init calls to having the portdrv driver calling the services directly. This will get the state saved as desired, while making the relationship between the port driver and the services under it more explicit in the code. Signed-off-by: Keith Busch Signed-off-by: Bjorn Helgaas Reviewed-by: Sinan Kaya commit 52272c923af09bdeaf94392d9856f07c30b032e5 Author: Mike Rapoport Date: Fri Sep 14 12:27:58 2018 +0300 docs: core-api: add memory allocation guide Signed-off-by: Mike Rapoport Acked-by: Michal Hocko Acked-by: Randy Dunlap Signed-off-by: Jonathan Corbet commit 09700f8a503ac8e76733387e2bab1a199b44236a Author: Mike Rapoport Date: Fri Sep 14 12:27:57 2018 +0300 docs: core-api/mm-api: add a lable for GFP flags section Signed-off-by: Mike Rapoport Signed-off-by: Jonathan Corbet commit 8ff7e072880ee48592ce0e4ce7488097205e544e Author: Mike Rapoport Date: Fri Sep 14 12:27:56 2018 +0300 docs: core-api/gfp_mask-from-fs-io: add a label for cross-referencing Signed-off-by: Mike Rapoport Signed-off-by: Jonathan Corbet commit 0de22baabc97f7fc05e31d82cec8049947946887 Author: Taehee Yoo Date: Fri Sep 14 00:56:33 2018 +0900 netfilter: nf_tables: use rhashtable_walk_enter instead of rhashtable_walk_init rhashtable_walk_init() is deprecated and rhashtable_walk_enter() can be used instead. rhashtable_walk_init() is wrapper function of rhashtable_walk_enter() so that logic is actually same. But rhashtable_walk_enter() doesn't return error hence error path code can be removed. Signed-off-by: Taehee Yoo Signed-off-by: Pablo Neira Ayuso commit f8b0a3ab06a092c84ec0cab8232abb1b6f7c14f4 Author: Taehee Yoo Date: Wed Sep 12 23:07:31 2018 +0900 netfilter: nat: remove duplicate skb_is_nonlinear() in __nf_nat_mangle_tcp_packet() __nf_nat_mangle_tcp_packet() and nf_nat_mangle_udp_packet() call mangle_contents(). and __nf_nat_mangle_tcp_packet() and mangle_contents() call skb_is_nonlinear(). so that skb_is_nonlinear() in __nf_nat_mangle_tcp_packet() is unnecessary. Signed-off-by: Taehee Yoo Signed-off-by: Pablo Neira Ayuso commit 93185c80a5f748620f5652e492f2a1c8d89db593 Author: Florian Westphal Date: Wed Sep 12 15:19:14 2018 +0200 netfilter: conntrack: clamp l4proto array size at largers supported protocol All higher l4proto numbers are handled by the generic tracker; the l4proto lookup function already returns generic one in case the l4proto number exceeds max size. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit dd2934a95701576203b2f61e8ded4e4a2f9183ea Author: Florian Westphal Date: Mon Sep 17 12:02:54 2018 +0200 netfilter: conntrack: remove l3->l4 mapping information l4 protocols are demuxed by l3num, l4num pair. However, almost all l4 trackers are l3 agnostic. Only exceptions are: - gre, icmp (ipv4 only) - icmpv6 (ipv6 only) This commit gets rid of the l3 mapping, l4 trackers can now be looked up by their IPPROTO_XXX value alone, which gets rid of the additional l3 indirection. For icmp, ipcmp6 and gre, add a check on state->pf and return -NF_ACCEPT in case we're asked to track e.g. icmpv6-in-ipv4, this seems more fitting than using the generic tracker. Additionally we can kill the 2nd l4proto definitions that were needed for v4/v6 split -- they are now the same so we can use single l4proto struct for each protocol, rather than two. The EXPORT_SYMBOLs can be removed as all these object files are part of nf_conntrack with no external references. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit ca2ca6e1c04e64413f5fb9a5d54fb8b0bdd86467 Author: Florian Westphal Date: Wed Sep 12 15:19:12 2018 +0200 netfilter: conntrack: remove unused proto arg from netns init functions Its unused, next patch will remove l4proto->l3proto number to simplify l4 protocol demuxer lookup. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 6fe78fa484a5dad030b24e33e0cedc5d5bbd0fde Author: Florian Westphal Date: Wed Sep 12 15:19:11 2018 +0200 netfilter: conntrack: remove error callback and handle icmp from core icmp(v6) are the only two layer four protocols that need the error() callback (to handle icmp errors that are related to an established connections, e.g. packet too big, port unreachable and the like). Remove the error callback and handle these two special cases from the core. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 0150ffbac78318549bf4818ddee3481d87100928 Author: Florian Westphal Date: Wed Sep 12 15:19:10 2018 +0200 netfilter: conntrack: avoid using ->error callback if possible The error() handler gets called before allocating or looking up a connection tracking entry. We can instead use direct calls from the ->packet() handlers which get invoked for every packet anyway. Only exceptions are icmp and icmpv6, these two special cases will be handled in the next patch. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 83d213fd9d1a56108584cd812333462caa39a747 Author: Florian Westphal Date: Wed Sep 12 15:19:09 2018 +0200 netfilter: conntrack: deconstify packet callback skb pointer Only two protocols need the ->error() function: icmp and icmpv6. This is because icmp error mssages might be RELATED to an existing connection (e.g. PMTUD, port unreachable and the like), and their ->error() handlers do this. The error callback is already optional, so remove it for udp and call them from ->packet() instead. As the error() callback can call checksum functions that write to skb->csum*, the const qualifier has to be removed as well. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit b8bdd9cc6049fe8d96178001da84ac98e697a5ba Author: Chris Wilson Date: Thu Sep 20 15:49:34 2018 +0100 drm/i915/selftests: Live tests emit requests and so require rpm As we emit requests or touch HW directly for some of the live tests, the requirement is that we hold the rpm wakeref before doing so. We want a mix of granularity since we will want to test runtime suspend, so try to mark up only the critical sections where we need rpm for the live test. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108002 Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20180920144934.16611-1-chris@chris-wilson.co.uk commit 9976fc6e6edbb0372f084a2ae8c1b8103b3bff1d Author: Florian Westphal Date: Wed Sep 12 15:19:08 2018 +0200 netfilter: conntrack: remove the l4proto->new() function ->new() gets invoked after ->error() and before ->packet() if a conntrack lookup has found no result for the tuple. We can fold it into ->packet() -- the packet() implementations can check if the conntrack is confirmed (new) or not (already in hash). If its unconfirmed, the conntrack isn't in the hash yet so current skb created a new conntrack entry. Only relevant side effect -- if packet() doesn't return NF_ACCEPT but -NF_ACCEPT (or drop), while the conntrack was just created, then the newly allocated conntrack is freed right away, rather than not created in the first place. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 93e66024b0249cec81e91328c55a754efd3192e0 Author: Florian Westphal Date: Wed Sep 12 15:19:07 2018 +0200 netfilter: conntrack: pass nf_hook_state to packet and error handlers nf_hook_state contains all the hook meta-information: netns, protocol family, hook location, and so on. Instead of only passing selected information, pass a pointer to entire structure. This will allow to merge the error and the packet handlers and remove the ->new() function in followup patches. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 354c97a9042fd2588f47283910f2e487ab17593f Author: Chris Packham Date: Thu Jul 26 16:02:57 2018 +1200 ARM: dts: mvebu: Add device tree for db-88f6820-amc board This board is a plugin card for some of Marvell's switch development kits. It's similar to the non-amc board except that it has no SATA support. [gregory: fix DTC warning and use the new partition binding] Signed-off-by: Chris Packham Signed-off-by: Gregory CLEMENT commit 8c01903c171d01066b2776168774406965184269 Author: Matthew Auld Date: Thu Sep 20 15:27:07 2018 +0100 drm/i915: pass dev_priv to i915_gem_cleanup_stolen It really wants dev_priv anyway, also now matches i915_gem_init_stolen. Signed-off-by: Matthew Auld Cc: Joonas Lahtinen Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20180920142707.19659-2-matthew.auld@intel.com commit c6d22ab61bfdeb9d8572859cbc670e7335853817 Author: Matthew Auld Date: Thu Sep 20 15:27:06 2018 +0100 drm/i915: don't assume struct page in i915_sg_trim If we copy all the contents of the sg across and not just the page link, we can then also put it to work in fake_get_huge_pages and beyond. Signed-off-by: Matthew Auld Cc: Tvrtko Ursulin Reviewed-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20180920142707.19659-1-matthew.auld@intel.com commit a2ab1703748197b166c85b40d08a8d1fb612f55b Merge: c02980d6bf06 b17566a6b08b Author: Linus Walleij Date: Thu Sep 20 08:36:36 2018 -0700 Merge branch 'ib-array-bitmaps' into devel commit c02980d6bf061cc8d69940ed2f5d309c231920b2 Author: Linus Walleij Date: Thu Sep 13 09:44:21 2018 +0200 gpio: OF: Remove bad practice examples We remove the references to anything but two-cell GPIO specifiers and just mention that controllers need to specify their bindings and that we strongly recommend two-cell bindings. Cc: devicetree@vger.kernel.org Reviewed-by: Rob Herring Signed-off-by: Linus Walleij commit 25db30c335d997b0838001c29f7341891b403006 Author: Linus Walleij Date: Thu Sep 13 09:28:13 2018 +0200 gpio: OF: Cut painful BNF experiments from bindings In 2011 the commit bf859f84a19f ("gpio/dt: Refine GPIO device tree binding") introduced an experimental BNF notation for defining a regular grammar for the GPIO phandles used by different devices. This was an interesting approach, and shows that we have long nutured the idea to formally verify device tree files using regular grammar. Most if not all other bindings use natural language to define the bindings, and the recent thinking for verifying device tree files is to use JSON schemas in separate definitions. Cut the BNF business and replace it with natural language so that it becomes more human-readable for now. Cc: devicetree@vger.kernel.org Cc: Grant Likely Cc: Kumar Gala Reviewed-by: Rob Herring Signed-off-by: Linus Walleij commit 79b73ff9b2a3ef312d8fa30894fd963c80ded466 Author: Andrew F. Davis Date: Fri Aug 31 14:13:26 2018 -0500 gpio: davinci: Move driver local definitions to driver These defines, structs and inline functions are used only internally by the driver, they do not belong in platform_data. Move them. Signed-off-by: Andrew F. Davis Tested-by: Keerthy Acked-by: Keerthy Signed-off-by: Linus Walleij commit c36219d9d8df11641d28c6bd0698459485b1709b Author: Andrew F. Davis Date: Fri Aug 31 14:13:25 2018 -0500 gpio: davinci: Remove unneeded GPIO macro This macro does nothing and has only one user, remove it. Signed-off-by: Andrew F. Davis Tested-by: Keerthy Acked-by: Keerthy Signed-off-by: Linus Walleij commit c809e37a3b5a889063ae737ff8b54705219d1ddc Author: Andrew F. Davis Date: Fri Aug 31 14:13:24 2018 -0500 gpio: davinci: Allocate the correct amount of memory for controller Previously we created a controller structure per bank of GPIO pins. This has since been changed to one per controller, but the allocation size was not changed. Fix this here. This also leaves the variable 'nbank' unused, instead of removing it, move it down and use it to clean up a loop. For loops with multiple initializers and/or iteration expressions, especially ones that don't use those loop counters are quite hard to follow, fix this. Signed-off-by: Andrew F. Davis Tested-by: Keerthy Acked-by: Keerthy Signed-off-by: Linus Walleij commit 587f7a694f016b65f8de8ea8b5fb0402712b5475 Author: Andrew F. Davis Date: Fri Aug 31 14:13:23 2018 -0500 gpio: davinci: Use dev name for label and automatic base selection Use dev_name to get a unique label and use -1 for a base to get our selection automatically. We pull in all GPIOs per chip now so this does not have the effect of out of order labels like before. We do these both together so we can drop all the static data in one patch. This also lets us normalize the return paths as we don't need any cleanup after this change. Signed-off-by: Andrew F. Davis Tested-by: Keerthy Acked-by: Keerthy Signed-off-by: Linus Walleij commit 329357723f5e8e2d7fc3144fb79936b51ce63b76 Author: Andrew F. Davis Date: Fri Aug 31 14:13:22 2018 -0500 gpio: davinci: Remove unused member of davinci_gpio_controller This was added as part of the patch in the fixes below, but was not needed or used, remove this here. Fixes: 8e11047b8f3c ("gpio: davinci: Add support for multiple GPIO controllers") Tested-by: Keerthy Acked-by: Keerthy Signed-off-by: Andrew F. Davis Signed-off-by: Linus Walleij commit 9c10611959a3bbe659d7435d8220078fa161f02c Author: Chris Packham Date: Thu Jul 26 16:02:56 2018 +1200 ARM: dts: mvebu: db-xc3-24g4: use new style nand binding Update the nand flash binding to the new style. Signed-off-by: Chris Packham Signed-off-by: Gregory CLEMENT commit 7b8f80d0ca7265f73ad52c332f7b6d4569f76c0c Author: Chris Packham Date: Thu Jul 26 16:02:55 2018 +1200 ARM: dts: mvebu: db-dxbc2: use new style nand binding Update the nand flash binding to the new style. Signed-off-by: Chris Packham Signed-off-by: Gregory CLEMENT commit 3e1ad82a19048d667e8b2e0994ea8326649860ae Author: Chris Packham Date: Thu Jul 26 16:02:54 2018 +1200 ARM: dts: mvebu: 98dx3236: Rename nand controller node Update the 98dx3236 SoC and dependent boards to use "nand-controller" instead of "nand". Signed-off-by: Chris Packham Signed-off-by: Gregory CLEMENT commit a65fbff275b9be2793191f04e195ba06d706c64f Author: Stefan Agner Date: Tue Sep 18 18:24:26 2018 -0700 pinctrl: tegra: do not export tegra_pinctrl_probe No user of tegra_pinctrl_probe can be built as a module, hence exporting the symbol is not necessary. Drop EXPORT_SYMBOL_GPL. Signed-off-by: Stefan Agner Signed-off-by: Linus Walleij commit 576ed9135489c723fb39b97c4e2c73428d06dd78 Author: Christoph Hellwig Date: Thu Sep 20 08:28:21 2018 +0200 block: use bio_add_page in bio_iov_iter_get_pages Replace a nasty hack with a different nasty hack to prepare for multipage bio_vecs. By moving the temporary page array as far up as possible in the space allocated for the bio_vec array we can iterate forward over it and thus use bio_add_page. Using bio_add_page means we'll be able to merge physically contiguous pages once support for multipath bio_vecs is merged. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 8faa0754ec246bb40034c6d8afca72afef54bd10 Author: Fabrizio Castro Date: Tue Sep 18 14:47:58 2018 +0100 pinctrl: sh-pfc: r8a77470: Add USB pin groups Add USB[01] pin groups and functions to the R8A77470 SoC. Signed-off-by: Fabrizio Castro Reviewed-by: Biju Das Signed-off-by: Geert Uytterhoeven commit df9c71694fcf84f4956b07750afa8608cc0a84ad Author: Fabrizio Castro Date: Tue Sep 18 14:47:57 2018 +0100 pinctrl: sh-pfc: r8a77470: Add SDHI2 pin groups Add SDHI2 pin groups and functions to the R8A77470 SoC. Signed-off-by: Fabrizio Castro Reviewed-by: Biju Das Signed-off-by: Geert Uytterhoeven commit e5984d0576fbcd756a3c03f1d3136fdc46b30c74 Author: Fabrizio Castro Date: Tue Sep 18 14:47:56 2018 +0100 pinctrl: sh-pfc: r8a77470: Add QSPI0 pin groups Add QSPI0 pin groups and function to the R8A77470 SoC. Signed-off-by: Fabrizio Castro Reviewed-by: Biju Das Signed-off-by: Geert Uytterhoeven commit 469c1e97dcce926f4c41e438c75ac064a7cbf042 Author: Fabrizio Castro Date: Tue Sep 18 14:47:55 2018 +0100 pinctrl: sh-pfc: r8a77470: Add DU0 pin groups Add DU0 pin groups and function to the R8A77470 SoC. Signed-off-by: Fabrizio Castro Reviewed-by: Biju Das Signed-off-by: Geert Uytterhoeven commit e34ebe5a6b8318eb6d99d5476072e4eddf5c46f2 Author: Fabrizio Castro Date: Tue Sep 18 14:47:54 2018 +0100 pinctrl: sh-pfc: r8a77470: Add I2C4 pin groups Add I2C4 pin groups and function to the R8A77470 SoC. Signed-off-by: Fabrizio Castro Reviewed-by: Biju Das Signed-off-by: Geert Uytterhoeven commit cab9572a097ac37e3ef33881ead98a902a5f7da2 Merge: faa08325b429 b5638d46c90a Author: David S. Miller Date: Thu Sep 20 07:46:02 2018 -0700 Merge branch 'mlxsw-Further-MC-awareness-configuration' Ido Schimmel says: ==================== mlxsw: Further MC-awareness configuration Petr says: Due to an issue in Spectrum chips, when unicast traffic shares the same queue as BUM traffic, and there is congestion, the BUM traffic is admitted to the queue anyway, thus pushing out all UC traffic. In order to give unicast traffic precedence over BUM traffic, multicast-aware mode is now configured on all ports. Under MC-aware mode, egress TCs 8..15 are used for BUM traffic, which has its own dedicated pool. This patch set improves the way that the MC pool and the higher-order TCs are integrated into the system. In patch #1, shaper at the higher TCs is configured to the same value that it has by default. It's better to have the corresponding artifact in the code explicitly. The 8 following patches gradually extend the devlink handling in mlxsw to support the extra TCs and the new MC pool. Patch #2 changes the way that pools are indexed in mlxsw. Instead of using (FW index, direction) tuple to identify the pool and the associated cache, mlxsw now uses devlink index. This change is necessary because the new pool 15 is not contiguously adjacent to the currently-used pools 0..3, and because it's only relevant on egress. Using devlink index relaxes the requirement for symmetry and adjacency imposed by using FW indexing. In patch #3, the assumption that number of ingress TCs matches that of egress TCs is relaxed to allow exposition of egress TCs 8..15. In patches #4, #5 and #6, support for infinite quotas is introduced. Infinite quotas are reported as taking all the memory in the system, but actually use a mechanism where the infinity is configured explicitly. In patches #7 and #8, support for configuring static pool sizes in introduced. Statically-sized pools have been supported for a while now, but during initialization, all pools have dynamic size. The patches allow there to be a mix of by-default static and dynamic pools. In patches #9 and #10, pool 15 resp. per-priority MC quotas are explicitly configured to be in sync with the current recommendation for handling BUM traffic in Spectrum chips. In the following 3 patches, an mlxsw-specific selftest is added to test the MC-awareness configuration. First in patches #11 and #12, lib.sh is extended with functions to collect ethtool stats, and to manage port MTU. Then in patch #13 the selftest itself is added. ==================== Signed-off-by: David S. Miller commit b5638d46c90a6998859a4fc9ea697b264da96092 Author: Petr Machata Date: Thu Sep 20 09:21:36 2018 +0300 selftests: mlxsw: Add a test for UC behavior under MC flood A so-called "MC-aware" mode has recently been enabled in mlxsw. In MC-aware mode, BUM traffic is handled in a special way so that when a switch is flooded with BUM, UC performance isn't unduly impacted. Without enablement of this mode, a stream of BUM traffic can cause sustained UC throughput drop in excess of 99 %. Add a test for this behavior. Compare how much UC throughput degrades as a stream of broadcast frames floods the switch. A minimal degradation is tolerated to cover for glitches in traffic injection performance. Signed-off-by: Petr Machata Reviewed-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit a381ed12ea33888a08f0e3e5ba22a255fa5f7257 Author: Petr Machata Date: Thu Sep 20 09:21:35 2018 +0300 selftests: forwarding: lib: Add mtu_set(), mtu_restore() Some selftests need to tweak MTU of an interface, and naturally should at teardown restore the MTU back to the original value. Add two functions to facilitate this MTU handling: mtu_set() to change MTU value, and mtu_reset() to change it back to what it was before. Signed-off-by: Petr Machata Reviewed-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 3136a3698804f55a26f68e8c897d7ccf254923ad Author: Petr Machata Date: Thu Sep 20 09:21:34 2018 +0300 selftests: forwarding: lib: Add ethtool_stats_get() Add a new service function to obtain ethtool counters. Signed-off-by: Petr Machata Reviewed-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 6a23f9a49722c391c5624ad1790997cd6b6b8fef Author: Petr Machata Date: Thu Sep 20 09:21:33 2018 +0300 mlxsw: spectrum_buffers: Tweak SBMM configuration The SBMM register configures shared buffer allocation and settings for MC packets according to switch priority. The recommended values are no reserved buffer and alpha of 1/4, which corresponds to buf_max of 6. Update mlxsw_sp_sb_mms accordingly. Signed-off-by: Petr Machata Reviewed-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit e83c045e53d75c6b231fd5d5753d271c3e51e56d Author: Petr Machata Date: Thu Sep 20 09:21:32 2018 +0300 mlxsw: spectrum_buffers: Configure MC pool Pool 15 (indexed as 8) is dedicated to MC traffic. Its configuration has been kept at default, because the table-based configuration wasn't expressive enough to allow the explicit configuration. Now that the configuration of pool 15 can be described, do so. The MC pool should have infinite size, infinite per-TC quota, and per-port limit of 90K. Signed-off-by: Petr Machata Reviewed-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 5be3637e069fe70a9ba6094970edfabaae1d0f1c Author: Petr Machata Date: Thu Sep 20 09:21:31 2018 +0300 mlxsw: spectrum_buffers: Allow configuration of static pools Some pools configured through the sb_pm entries may have by default static size. The MC pool is now not explicitly configured, however it gets configured as static implicitly by 0-initializing sb->prs, and a follow-up patch adds an explicit configuration to the same effect. To support this, pass max_buff taken from sb_pm and sb_cm entries through cell conversion before handing it to mlxsw_sp_sb_pm_write(), if the pool that the sb_pm entry configures is statically-sized. To keep current behavior, update mlxsw_sp_sb_cms_egress[] to denote buffer sizes in bytes (assuming Spectrum 1 cell sizes, which the original code assumed as well) instead of cells. Note that a follow-up patch changes this to infinite size. Also tweak a comment at SBMM configuration to remain true now that statically-sized pools exist. Signed-off-by: Petr Machata Reviewed-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 41057e28288b89da91d535ff3244bfcf90ebc97c Author: Petr Machata Date: Thu Sep 20 09:21:30 2018 +0300 mlxsw: spectrum_buffers: Pass SBPM min_size in cells The SBPM register configures the shared buffer allocation and configuration per port and pool. The min_buff value is the buffer size dedicated to this single function, and is configured in cells. Currently, all sb_pm entries have 0 for min_buff, and therefore the actual unit is immaterial. However, in a follow-up patch we want to add entries with non-zero minimum. Therefore pass the min_buff from the sb_pm table through the cell conversion before handing it over to mlxsw_sp_sb_pm_write(). Signed-off-by: Petr Machata Reviewed-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit d144e3a2c9f79af5202d832e85fb72b0d6954ef5 Author: Petr Machata Date: Thu Sep 20 09:21:29 2018 +0300 mlxsw: spectrum_buffers: Allow an infinite maximum for per-TC pool limit The SBCM register configures the shared buffer configuration according to port and TC. So far all pools have had a dynamic size, where the infinite size is easy to express by using max_buff of 0xff. However the MC pool should be configured with static size, and the infinite size thus needs to be set using the field SBCM.infi_max. Therefore add the field infi_max to the SBCM register and to mlxsw_reg_sbcm_pack(). Extend mlxsw_sp_sb_cm_write() to handle infinite sizes as well. Report infinite pool limits as if the limit actually were the total shared buffer size. Signed-off-by: Petr Machata Reviewed-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit f0024f0d98519f7ff5640ab6f11f102594985038 Author: Petr Machata Date: Thu Sep 20 09:21:28 2018 +0300 mlxsw: spectrum_buffers: Allow pools of infinite size The MC pool should have an infinite size (i.e. no quota). To that end, add infi_size to the SBPR register and extend mlxsw_reg_sbpr_pack(). Also add MLXSW_SP_SB_INFI to denote buffers that should have an infinite size. Change mlxsw_sp_sb_pr_write() to take as parameter byte size, instead of cell size, and add the special handling of infinite buffers. Report pools with infinite size as if they actually take the full shared buffer size. Signed-off-by: Petr Machata Reviewed-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit fe07d723c00db23c1683a994fd57cc9b2aa9aaa2 Author: Petr Machata Date: Thu Sep 20 09:21:27 2018 +0300 mlxsw: spectrum_buffers: Keep shared buffer size in mlxsw_sp_sb Entities of infinite size will be reported as if they had the maximum size allowed by the chip. To that end, keep track of maximum shared buffer size in mlxsw_sp->sb. Signed-off-by: Petr Machata Reviewed-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 5f95d20b3a5ed571e14f9007c4346ebac76a0f58 Author: Petr Machata Date: Thu Sep 20 09:21:26 2018 +0300 mlxsw: spectrum_buffers: Split TC_COUNT into ingress and egress Current code assumes that ingress and egress has the same number of traffic classes. Since the introduction of MC-aware mode that assumption hasn't held anymore, and there have been 16 TCs on the egress as opposed to 8 on ingress. Break the assumption of symmetry by splitting the artifacts related to shared-buffer TC counting to ingress and egress parts. Signed-off-by: Petr Machata Reviewed-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 3a4dbfb044ea37e9cabb1e2499859e423a96ab15 Author: Petr Machata Date: Thu Sep 20 09:21:25 2018 +0300 mlxsw: spectrum_buffers: Use devlink pool indices throughout Currently, mlxsw assumes that each ingress pool has its egress counterpart, and that pool index for purposes of caching matches the index with which the hardware should be configured. As we want to expose the MC pool, both of these assumptions break. Instead, maintain the pool index as long as possible. Unify ingress and egress caches and use the pool index as cache index as well. Only translate to FW pool numbering when actually packing the registers. This simplifies things considerably, as the pool index is the only quantity necessary to uniquely identify a pool, and the pool/direction split is not necessary until firmware is talked to. To support the mapping between pool indices and pool numbers and directions, which is not neatly mathematical anymore, introduce a pool descriptor table, indexed by pool index, to facilitate the translation. Include the MC pool in the descriptor table as well, so that it can be referenced from mlxsw_sp_sb_cms_egress. Signed-off-by: Petr Machata Reviewed-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit a9f36656b519a9a21309793c306941a3cd0eeb8f Author: Petr Machata Date: Thu Sep 20 09:21:24 2018 +0300 mlxsw: spectrum: Init shaper for TCs 8..15 With introduction of MC-aware mode to mlxsw, it became necessary to configure TCs above 7 as well. There is now code in mlxsw to disable ETS for these higher classes, but disablement of max shaper was neglected. By default, max shaper is currently disabled to begin with, so the problem is just cosmetic. However, for symmetry, do like we do for ETS configuration, and call mlxsw_sp_port_ets_maxrate_set() for both TC i and i + 8. Signed-off-by: Petr Machata Reviewed-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 1390643d1d5c539be4d7031a0c507565cb1168a0 Author: Chao Yu Date: Mon Sep 17 15:12:21 2018 +0800 jfs: remove redundant dquot_initialize() in jfs_evict_inode() We don't need to call dquot_initialize() twice in jfs_evict_inode(), remove one of them for cleanup. Signed-off-by: Chao Yu Signed-off-by: Dave Kleikamp commit ff645daf30cafb6fa74bee9a73733700bac2aff7 Author: Adrian Hunter Date: Thu Sep 20 16:00:44 2018 +0300 perf db-export: Add trace begin / end branch type variants Add branch types to cover different combinations with "trace begin" or "trace end". Previously, the Intel PT decoder would indicate begin / end by a branch from / to zero. That hides useful information, in particular when a trace ends with a call. Before remedying that, prepare the database export to export branch types with more combinations that include trace begin / end. In those cases extend the descriptions to include 'trace begin' and 'trace end' separately. Signed-off-by: Adrian Hunter Cc: Andi Kleen Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20180920130048.31432-3-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 62cb1b8868a70c932b15959a98594df537df2ffc Author: Adrian Hunter Date: Thu Sep 20 16:00:43 2018 +0300 perf script: Enhance sample flags for trace begin / end Allow for different combinations of sample flags with "trace begin" or "trace end". Previously, the Intel PT decoder would indicate begin / end by a branch from / to zero. That hides useful information, in particular when a trace ends with a call. Before remedying that, prepare 'perf script' to display sample flags with more combinations that include trace begin / end. In those cases display 'tr start' and 'tr end' separately. Signed-off-by: Adrian Hunter Cc: Andi Kleen Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20180920130048.31432-2-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit b31bd669b45dca9c42d9dbd7eb1a4b02fa8f5323 Author: Gustavo A. R. Silva Date: Thu Sep 13 13:53:18 2018 -0500 misc: sgi-gru: fix fall-through annotations Replace "fallthru" with a proper "fall through" annotation. This fix is part of the ongoing efforts to enabling -Wimplicit-fallthrough Signed-off-by: Gustavo A. R. Silva Acked-by: Dimitri Sivanich Signed-off-by: Greg Kroah-Hartman commit c1a02c216044784f9871a5066fd22de7d0414d0d Author: Tobin C. Harding Date: Thu Sep 13 16:23:38 2018 +1000 serial: docs: Fix filename for serial reference implementation Currently documentation mentions a file but the filename has a typo in it, underscore instead of hyphen. This makes grep'ing for the file hard. Use correct filename for file amba-pl011.c Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman commit a779df303b0513f6ca6ae6ff06b0b93508193a5c Author: Vladimir Zapolskiy Date: Wed Sep 12 15:44:19 2018 +0300 Documentation: filesystems: remove reminiscences of POHMELFS The POHMELFS filesystem was removed in 2012 by commit 67435319866f8 ("staging: pohmelfs: remove drivers/staging/pohmelfs") promising that a newer version will be included to the kernel, but unfortunately it didn't happen. Since likely any delopment of the filesystem is halted, the change removes the abandoned POHMELFS documentation from the kernel tree. Signed-off-by: Vladimir Zapolskiy Signed-off-by: Greg Kroah-Hartman commit 1906f64f6458f4f7f7b77268a7280c7689f61163 Author: Jagdish Tirumala Date: Tue Sep 11 09:35:00 2018 -0700 USB: STORAGE: ISD200 Fixed coding style issue "space required in for loop" Fixed errors spaces required around the for loop '=' , ';' and '<' in drivers/usb/storage/isd200.c Signed-off-by: Jagdish Tirumala Signed-off-by: Greg Kroah-Hartman commit 4f724df717c6d2334d01c93a6a89755691ae4440 Author: Sean Paul Date: Wed Sep 19 16:39:57 2018 -0400 MAINTAINERS: Move udl drm driver to drm-misc tree Move udl maintenance into drm-misc tree. I've also signed up to be a reviewer, but have kept it at Odd Fixes level of support. Cc: Dave Airlie Cc: David Airlie Cc: Gustavo Padovan Cc: Maarten Lankhorst Acked-by: Dave Airlie Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20180919204026.3217-1-sean@poorly.run commit e267364a6e1be8cccb16cec5b695e038c81a81a1 Author: Kieran Bingham Date: Wed Sep 19 16:56:58 2018 +0100 drm/atomic: Initialise planes with opaque alpha values Planes without an alpha property, using __drm_atomic_helper_plane_reset will have their plane state alpha initialised as zero, which represents a transparent alpha. If this value is then used for the plane, it may not be visible by default, and thus doesn't represent a good initialisation state. Update the default state->alpha value to DRM_BLEND_ALPHA_OPAQUE unconditionally when the plane is reset. Signed-off-by: Kieran Bingham Reviewed-by: Ville Syrjälä Reviewed-by: Alexandru Gheorghe Reviewed-by: Laurent Pinchart Signed-off-by: Alexandru Gheorghe Link: https://patchwork.freedesktop.org/patch/msgid/20180919155700.10342-2-kieran.bingham+renesas@ideasonboard.com commit 93ed990e3a6e722b7b1e1d59b3ceb8d91e36e682 Author: YueHaibing Date: Tue Sep 11 12:28:24 2018 +0000 qtnfmac: remove set but not used variable 'vif' Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/wireless/quantenna/qtnfmac/cfg80211.c: In function 'qtnf_dump_survey': drivers/net/wireless/quantenna/qtnfmac/cfg80211.c:694:19: warning: variable 'vif' set but not used [-Wunused-but-set-variable] Signed-off-by: YueHaibing Reviewed-by: Sergey Matyukevich Signed-off-by: Kalle Valo commit 6c3efbe77bc78bf49db851aec7f385be475afca6 Author: Takashi Iwai Date: Thu Sep 13 08:15:17 2018 +0200 brcmsmac: Use kvmalloc() for ucode allocations The ucode chunk might be relatively large and the allocation with kmalloc() may fail occasionally. Since the data isn't DMA-transferred but by manual loops, we can use vmalloc instead of kmalloc. For a better performance, though, kvmalloc() would be the best choice in such a case, so let's replace with it. Bugzilla: https://bugzilla.suse.com/show_bug.cgi?id=1103431 Signed-off-by: Takashi Iwai Signed-off-by: Kalle Valo commit a8254fa4ba60b85829b6e5ede6564f81cd70d59f Author: YueHaibing Date: Tue Sep 11 11:24:04 2018 +0800 brcmfmac: remove set but not used variables 'sfdoff' and 'pad_size' Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c: In function 'brcmf_sdio_rxglom': drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c:1466:11: warning: variable 'sfdoff' set but not used [-Wunused-but-set-variable] drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c: In function 'brcmf_sdio_bus_preinit': drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c:3408:7: warning: variable 'pad_size' set but not used [-Wunused-but-set-variable] Signed-off-by: YueHaibing Signed-off-by: Kalle Valo commit 761cb7cdef1a27d7b90cd061d19b116a74ab4aff Author: zhong jiang Date: Sat Sep 8 21:40:43 2018 +0800 brcm80211: remove redundant condition check before debugfs_remove_recursive debugfs_remove_recursive has taken IS_ERR_OR_NULL into account. So just remove the condition check before debugfs_remove_recursive. Signed-off-by: zhong jiang Signed-off-by: Kalle Valo commit 59c2a30d36c8ae430d26a902c4c9665ea33ccee5 Author: Arend van Spriel Date: Wed Sep 5 09:48:59 2018 +0200 brcmfmac: increase buffer for obtaining firmware capabilities When obtaining the firmware capability a buffer is provided of 512 bytes. However, if all features in firmware are supported the buffer needs to be 565 bytes as otherwise truncated information is retrieved from firmware. Increasing the buffer to 768 bytes on stack. Reviewed-by: Hante Meuleman Reviewed-by: Pieter-Paul Giesberts Reviewed-by: Franky Lin Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo commit 330994e8e8ec5d0b269a5265e6032b37e29aa336 Author: Arend van Spriel Date: Wed Sep 5 09:48:58 2018 +0200 brcmfmac: fix for proper support of 160MHz bandwidth Decoding of firmware channel information was not complete for 160MHz support. This resulted in the following warning: WARNING: CPU: 2 PID: 2222 at .../broadcom/brcm80211/brcmutil/d11.c:196 brcmu_d11ac_decchspec+0x2e/0x100 [brcmutil] Modules linked in: brcmfmac(O) brcmutil(O) sha256_generic cfg80211 ... CPU: 2 PID: 2222 Comm: kworker/2:0 Tainted: G O 4.17.0-wt-testing-x64-00002-gf1bed50 #1 Hardware name: Dell Inc. Latitude E6410/07XJP9, BIOS A07 02/15/2011 Workqueue: events request_firmware_work_func RIP: 0010:brcmu_d11ac_decchspec+0x2e/0x100 [brcmutil] RSP: 0018:ffffc90000047bd0 EFLAGS: 00010206 RAX: 000000000000e832 RBX: ffff8801146fe910 RCX: ffff8801146fd3c0 RDX: 0000000000002800 RSI: 0000000000000070 RDI: ffffc90000047c30 RBP: ffffc90000047bd0 R08: 0000000000000000 R09: ffffffffa0798c80 R10: ffff88012bca55e0 R11: ffff880110a4ea00 R12: ffff8801146f8000 R13: ffffc90000047c30 R14: ffff8801146fe930 R15: ffff8801138e02e0 FS: 0000000000000000(0000) GS:ffff88012bc80000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f18ce8b8070 CR3: 000000000200a003 CR4: 00000000000206e0 Call Trace: brcmf_setup_wiphybands+0x212/0x780 [brcmfmac] brcmf_cfg80211_attach+0xae2/0x11a0 [brcmfmac] brcmf_attach+0x1fc/0x4b0 [brcmfmac] ? __kmalloc+0x13c/0x1c0 brcmf_pcie_setup+0x99b/0xe00 [brcmfmac] brcmf_fw_request_done+0x16a/0x1f0 [brcmfmac] request_firmware_work_func+0x36/0x60 process_one_work+0x146/0x350 worker_thread+0x4a/0x3b0 kthread+0x102/0x140 ? process_one_work+0x350/0x350 ? kthread_bind+0x20/0x20 ret_from_fork+0x35/0x40 Code: 66 90 0f b7 07 55 48 89 e5 89 c2 88 47 02 88 47 03 66 81 e2 00 38 66 81 fa 00 18 74 6e 66 81 fa 00 20 74 39 66 81 fa 00 10 74 14 <0f> 0b 66 25 00 c0 74 20 66 3d 00 c0 75 20 c6 47 04 01 5d c3 66 ---[ end trace 550c46682415b26d ]--- brcmfmac: brcmf_construct_chaninfo: Ignoring unexpected firmware channel 50 This patch adds the missing stuff to properly handle this. Reviewed-by: Hante Meuleman Reviewed-by: Pieter-Paul Giesberts Reviewed-by: Franky Lin Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo commit 8fcd86baab7724196ae8605e58c38dd17d598ef9 Author: Chris Wilson Date: Wed Sep 19 21:54:32 2018 +0100 drm/i915/guc: Restore preempt-context across S3/S4 Stolen memory is lost across S4 (hibernate) or S3-RST as it is a portion of ordinary volatile RAM. As we allocate our rings from stolen, this may include the rings used for our preempt context and their breadcrumb instructions. In order to allow preemption following hibernation and loss of stolen memory, we therefore need to repopulate the instructions inside the lost ring upon resume. To handle both module load and resume, we simply defer constructing the ring to first use. Testcase: igt/drv_selftest/live_gem Signed-off-by: Chris Wilson Cc: Michał Winiarski Cc: Michal Wajdeczko Reviewed-by: Michał Winiarski Link: https://patchwork.freedesktop.org/patch/msgid/20180919205432.18394-1-chris@chris-wilson.co.uk commit ae1cca3fa3478be92948dbbcd722390272032ade Author: Michal Simek Date: Thu Sep 20 13:41:53 2018 +0200 serial: uartps: Change uart ID port allocation For IPs which have alias algorightm all the time using that alias and minor number. It means serial20 alias ends up as ttyPS20. If alias is not setup for probed IP instance the first unused position is used but that needs to be checked if it is really empty because another instance doesn't need to be probed at that time. of_alias_get_alias_list() fills alias bitmap which exactly shows which ID is free. If alias pointing to different not compatible IP, it is free to use. cdns_get_id() call is placed below structure allocation to simplify error path. Signed-off-by: Michal Simek Signed-off-by: Greg Kroah-Hartman commit b1078c355d76769b5ddefc67d143fbd9b6e52c05 Author: Michal Simek Date: Thu Sep 20 13:41:52 2018 +0200 of: base: Introduce of_alias_get_alias_list() to check alias IDs The function travels the lookup table to record alias ids for the given device match structures and alias stem. This function will be used by serial drivers to check if requested alias is allocated or free to use. Signed-off-by: Michal Simek Reviewed-by: Rob Herring Signed-off-by: Greg Kroah-Hartman commit a47cd45a37c94bb31ccf9bf6ec3d94cbcd57d6ee Author: Chris Wilson Date: Thu Sep 20 11:58:09 2018 +0100 drm/i915/selftests: Basic stress test for rapid context switching We need to exercise the HW and submission paths for switching contexts rapidly to check that features such as execlists' wa_tail are adequate. Plus it's an interesting baseline latency metric. v2: Check the initial request for allocation errors v3: Use finite waits for more robust handling of broken code Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20180920105809.1872-1-chris@chris-wilson.co.uk commit ae8a2ca8a2215c7e31e6d874f7303801bb15fbbc Author: Heikki Krogerus Date: Thu Sep 20 14:23:47 2018 +0300 usb: typec: Group all TCPCI/TCPM code together Moving all the drivers that depend on the Port Controller Manager under a new directory drivers/usb/typec/tcpm/ and making Guenter Roeck the designated reviewer of that code. Acked-by: Guenter Roeck Signed-off-by: Heikki Krogerus Signed-off-by: Greg Kroah-Hartman commit c800c51f586b3c3dda59f5f08d3df9bd1ae09e3d Author: Heikki Krogerus Date: Thu Sep 20 14:23:46 2018 +0300 usb: typec: fusb302: reorganizing the probe function a little The debugfs needs to be initialized as the last step in probe in this case. The struct dentry *rootdir can't be pointing to anything unless driver probe really finishes successfully. It is also not necessary to clear the i2c clientdata if the probe fails, so removing the extra label used for that. Acked-by: Hans de Goede Tested-by: Hans de Goede Signed-off-by: Heikki Krogerus Signed-off-by: Greg Kroah-Hartman commit 148b0aa78e4e1077e38f928124bbc9c2d2d24006 Author: Heikki Krogerus Date: Thu Sep 20 14:23:45 2018 +0300 platform: x86: intel_cht_int33fe: Remove the old connections for the muxes USB Type-C class driver now expects the muxes to be always assigned to the ports and not controllers, so the connections for the mux and fusb302 can be removed. Acked-by: Andy Shevchenko Acked-by: Hans de Goede Tested-by: Hans de Goede Signed-off-by: Heikki Krogerus Signed-off-by: Greg Kroah-Hartman commit 23481121c81d984193edf1532f5e123637e50903 Author: Heikki Krogerus Date: Thu Sep 20 14:23:44 2018 +0300 usb: typec: class: Don't use port parent for getting mux handles It is not possible to use the parent of the port device when requesting mux handles as the parent may be a multiport USB Type-C or PD controller. The muxes must be assigned to the ports, not the controllers. This will also move the requesting of the muxes after the port device is initialized. Acked-by: Hans de Goede Tested-by: Hans de Goede Signed-off-by: Heikki Krogerus Signed-off-by: Greg Kroah-Hartman commit 495965a1002a0b301bf4fbfd1aed3233f3e7db1b Author: Heikki Krogerus Date: Thu Sep 20 14:23:43 2018 +0300 platform: x86: intel_cht_int33fe: Add connections for the USB Type-C port Assigning the mux to the USB Type-C port on top of fusb302. That will prepare this driver for the change in the USB Type-C class code, where the class driver will assume the muxes to be always assigned to the ports and not the controllers. Once the USB Type-C class driver has been updated, the connections between the mux and fusb302 can be dropped. Acked-by: Andy Shevchenko Acked-by: Hans de Goede Tested-by: Hans de Goede Signed-off-by: Heikki Krogerus Signed-off-by: Greg Kroah-Hartman commit 78d2b54b134ea6059e2b1554ad53fab2300a4cc6 Author: Heikki Krogerus Date: Thu Sep 20 14:23:42 2018 +0300 platform: x86: intel_cht_int33fe: Add connection for the DP alt mode Adding a connection for the DisplayPort alternate mode. PI3USB30532 is used for muxing the port to DisplayPort on CHT platforms. The connection allows the alternate mode device to get handle to the mux, and therefore make it possible to use the USB Type-C connector as DisplayPort. Acked-by: Andy Shevchenko Acked-by: Hans de Goede Tested-by: Hans de Goede Signed-off-by: Heikki Krogerus Signed-off-by: Greg Kroah-Hartman commit 140a4ec4adddda615b4e8e8055ca37a30c7fe5e8 Author: Heikki Krogerus Date: Thu Sep 20 14:23:41 2018 +0300 platform: x86: intel_cht_int33fe: Register all connections at once We can register all device connection descriptors with a single call to device_connections_add(). Acked-by: Andy Shevchenko Acked-by: Hans de Goede Tested-by: Hans de Goede Signed-off-by: Heikki Krogerus Signed-off-by: Greg Kroah-Hartman commit cd7753d371388e712e3ee52b693459f9b71aaac2 Author: Heikki Krogerus Date: Thu Sep 20 14:23:40 2018 +0300 drivers: base: Helpers for adding device connection descriptions Introducing helpers for adding and removing multiple device connection descriptions at once. Acked-by: Hans de Goede Tested-by: Hans de Goede Signed-off-by: Heikki Krogerus Signed-off-by: Greg Kroah-Hartman commit 50e4991214746b9458664a39abb379b789b4beb4 Author: Heikki Krogerus Date: Thu Sep 20 14:23:39 2018 +0300 platform: x86: intel_cht_int33fe: Add dependency on muxes The connections create clear dependency on the muxes. fusb302 fails to probe unless we have the mux drivers available. Acked-by: Andy Shevchenko Acked-by: Hans de Goede Tested-by: Hans de Goede Signed-off-by: Heikki Krogerus Signed-off-by: Greg Kroah-Hartman commit 13b4353bb05568c9fa3e98df0bf95dd1478c14b7 Author: YueHaibing Date: Thu Sep 20 01:59:16 2018 +0000 tty: serial: remove set but not used variable 'error' Fixes gcc '-Wunused-but-set-variable' warning: drivers/tty/serial/pmac_zilog.c: In function 'pmz_receive_chars': drivers/tty/serial/pmac_zilog.c:222:30: warning: variable 'error' set but not used [-Wunused-but-set-variable] Signed-off-by: YueHaibing Signed-off-by: Greg Kroah-Hartman commit ccc413f621432fcb5dabb751d42148795f59a816 Author: Julian Wiedmann Date: Tue May 15 21:17:38 2018 +0200 s390/qdio: clean up AOB handling I've stumbled over this too many times now... AOBs are only ever used on Output Queues. So in qdio_kick_handler(), move the call to their handler into the Output-only path, and get rid of the convoluted contains_aobs() helper. No functional change. While at it, also remove 1. the unused sbal_state->aob field. For processing an async completion, upper-layer drivers get their AOB pointer from the CQ buffer. 2. an unused EXPORT for qdio_allocate_aob(). External users would have no way of passing an allocated AOB back into qdio.ko anyways... Signed-off-by: Julian Wiedmann Signed-off-by: Martin Schwidefsky commit 4e62d458850069c9f05e03f99be1a817967e201f Author: Vasily Gorbik Date: Fri Sep 14 17:35:46 2018 +0200 s390: clean up stacks setup Replace hard coded stack frame overhead values with STACK_FRAME_OVERHEAD definition. Avoid unnecessary arithmetic instructions. Signed-off-by: Vasily Gorbik Signed-off-by: Martin Schwidefsky commit 26f4414a45b808f83d42d6fd2fbf4a59ef25e84b Author: Vasily Gorbik Date: Fri Sep 14 18:08:10 2018 +0200 s390/vdso: correct CFI annotations of vDSO functions Correct stack frame overhead for 31-bit vdso, which should be 96 rather then 160. This is done by reusing STACK_FRAME_OVERHEAD definition which contains correct value based on build flags. This fixes stack unwinding within vdso code for 31-bit processes. While at it replace all hard coded stack frame overhead values with the same definition in vdso64 as well. Reviewed-by: Hendrik Brueckner Signed-off-by: Vasily Gorbik Signed-off-by: Martin Schwidefsky commit d1befa65823e9c6d013883b8a41d081ec338c489 Author: Vasily Gorbik Date: Fri Sep 14 17:29:39 2018 +0200 s390/vdso: avoid 64-bit vdso mapping for compat tasks vdso_fault used is_compat_task function (on s390 it tests "current" thread_info flags) to distinguish compat tasks and map 31-bit vdso pages. But "current" task might not correspond to mm context. When 31-bit compat inferior is executed under gdb, gdb does PTRACE_PEEKTEXT on vdso page, causing vdso_fault with "current" being 64-bit gdb process. So, 31-bit inferior ends up with 64-bit vdso mapped. To avoid this problem a new compat_mm flag has been introduced into mm context. This flag is used in vdso_fault and vdso_mremap instead of is_compat_task. Signed-off-by: Vasily Gorbik Signed-off-by: Martin Schwidefsky commit 1c472d46283263497adccd7a0bec64ee2f9c09e5 Author: Halil Pasic Date: Mon Sep 17 15:23:03 2018 +0200 s390/zcrypt: enable AP bus scan without a valid default domain The AP bus scan is aborted before doing anything worth mentioning if ap_select_domain() fails, e.g. if the ap_rights.aqm mask is all zeros. As the result of this the ap bus fails to manage (e.g. create and register) devices like it is supposed to. Let us make ap_scan_bus() work even if ap_select_domain() can't select a default domain. Let's also make ap_select_domain() return void, as there are no more callers interested in its return value. Signed-off-by: Halil Pasic Reported-by: Michael Mueller Fixes: 7e0bdbe5c21c "s390/zcrypt: AP bus support for alternate driver(s)" [freude@linux.ibm.com: title and patch header slightly modified] Signed-off-by: Harald Freudenberger Signed-off-by: Martin Schwidefsky commit 8e5a7627b5881ee0551b7ee02d41c2a983358842 Author: Martin Schwidefsky Date: Wed Sep 12 08:54:59 2018 +0200 s390: add initial 64-bit restart PSW To be able to start a kernel image loaded into memory with a PSW restart, place a 64-bit restart PSW at 0x1a0 in absolute lowcore. Suggested-by: Dominik Klein Tested-by: Dominik Klein Signed-off-by: Martin Schwidefsky commit 198ee66a0e970bc57872095cc3a79722bbf36306 Author: Colin Ian King Date: Tue Sep 11 09:18:58 2018 +0100 s390/tape: fix spelling mistake "partion" -> "partition" Trivial fix to spelling mistake in message text Signed-off-by: Colin Ian King Signed-off-by: Martin Schwidefsky commit 54be9d12b5c1c07fcd9eb05a7725882a9d9e500f Author: zhong jiang Date: Sat Sep 8 18:26:27 2018 +0800 s390: vmlogrdr: Use ARRAY_SIZE instead of reimplementing its function Use the common code ARRAY_SIZE macro instead of a private implementation. Reviewed-by: Jean Delvare Signed-off-by: zhong jiang Signed-off-by: Martin Schwidefsky commit 827fd299a16404e1b8a64e5eb1830244ccd395cd Author: zhong jiang Date: Sat Sep 8 16:50:21 2018 +0800 s390/zcrypt: Use kmemdup to replace kmalloc + memcpy kmemdup has implemented the function that kmalloc() + memcpy() will do. We prefer to use the kmemdup function rather than an open coded implementation. Signed-off-by: zhong jiang Signed-off-by: Martin Schwidefsky commit 6779df406b27ce44d989e965169db39fb58a7efa Author: Jan Höppner Date: Thu Sep 6 13:16:40 2018 +0200 s390/sclp: Allow to request adapter reset The SCLP event 24 "Adapter Error Notification" supports three different action qualifier of which 'adapter reset' is currently not enabled in the sysfs interface. However, userspace tools might want to be able to use the reset functionality as well. Enable the 'adapter reset' qualifier. Signed-off-by: Jan Höppner Reviewed-by: Sebastian Ott Signed-off-by: Martin Schwidefsky commit 734781a9165a1d2fe6117a6435dd3f7619dd9794 Author: Chengguang Xu Date: Tue Aug 28 07:51:30 2018 +0800 s390/dasd: remove unnecessary condition check kmem_cache_destroy() can handle NULL pointer correctly, so there is no need to check NULL pointer before calling kmem_cache_destroy(). Signed-off-by: Chengguang Xu Signed-off-by: Jan Höppner Signed-off-by: Martin Schwidefsky commit 818eecfd56409ca78fc3e4d841f30833699f70b6 Author: Colin Ian King Date: Tue Sep 18 08:54:11 2018 +0200 usb: phy: mxs: fix spelling mistake "stardard" -> "standard" Trivial fix to spelling mistake in dev_dbg message Signed-off-by: Colin Ian King Acked-by: Peter Chen Signed-off-by: Greg Kroah-Hartman commit 46216506ceacc36eea7535c4a72b77b38fe4b664 Author: Linus Walleij Date: Tue Sep 18 16:25:06 2018 -0700 usb: host: fotg2: Fix potential NULL dereference There is code in the .remove() hook to handle the drvdata being NULL, for good reasons: it is never set, so it will always be NULL. As I moved code around, static checkers start complaining. Instead of this, make sure to always set it on successful probe so we can always dereference it on the remove path. Use the platform_device_[set|get]_drvdata() since this is a platform device. Fixes: ffa8a31b5b3b ("usb: host: fotg2: add silicon clock handling") Reported-by: Dan Carpenter Cc: Dan Carpenter Signed-off-by: Linus Walleij Signed-off-by: Greg Kroah-Hartman commit 3df0e240caba641e0d70640e3baf34d34c105176 Author: Yoshihiro Shimoda Date: Tue Sep 11 17:47:05 2018 +0900 usb: renesas_usbhs: Add multiple clocks management R-Car Gen3 needs to enable clocks of both host and peripheral. Since [eo]hci-platform disables the reset(s) when the drivers are removed, renesas_usbhs driver doesn't work correctly. To fix this issue, this patch adds multiple clocks management on this renesas_usbhs driver. Signed-off-by: Yoshihiro Shimoda Signed-off-by: Greg Kroah-Hartman commit 8e0d368a59bf87efa5ee4daea142527d01447864 Author: Yoshihiro Shimoda Date: Tue Sep 11 17:47:04 2018 +0900 dt-bindings: usb: renesas_usbhs: add clock-names property R-Car Gen3 needs to enable clocks of both host and peripheral. Otherwise, other side device cannot work correctly. So, this patch adds a property of clock-names for R-Car Gen3 as an optional. Signed-off-by: Yoshihiro Shimoda Reviewed-by: Rob Herring Signed-off-by: Greg Kroah-Hartman commit f181dbb4824130e84f46e5be5b49cf6456f96683 Author: Yoshihiro Shimoda Date: Tue Sep 11 17:47:03 2018 +0900 usb: renesas_usbhs: Add reset_control R-Car Gen3 needs to deassert resets of both host and peripheral. Since [eo]hci-platform is possible to assert the reset(s) when the probing failed, renesas_usbhs driver doesn't work correctly regardless of finished probing. To fix this issue, this patch adds reset_control on this renesas_usbhs driver. Signed-off-by: Yoshihiro Shimoda Signed-off-by: Greg Kroah-Hartman commit d18afb2a037efd4239ab90c351ec0e2aad72a203 Merge: 43e2f2904160 bf3741ada33b Author: Kalle Valo Date: Thu Sep 20 14:15:40 2018 +0300 Merge tag 'mt76-for-kvalo-2018-09-19' of https://github.com/nbd168/wireless mt76 patches for 4.20 * lots of mt76x0 cleanups / fixes * mt76x2u fixes * unify code between mt76x0, mt76x2e and mt76x2u * rename mt76x0 to mt76x0u * improve rx buffer allocation for all variants * prepare for adding mt76x0e (pci-e variant) support add CONFIG_MT76x0E kconfig symbol commit c29e240484ea17c756455149348e59523f462993 Author: Yoshihiro Shimoda Date: Mon Sep 10 20:15:48 2018 +0900 dt-bindings: usb: ohci: Add clocks description for R-Car Gen3 This patch adds detailed information of an optional property "clocks" description for R-Car Gen3. Signed-off-by: Yoshihiro Shimoda Reviewed-by: Simon Horman Reviewed-by: Rob Herring Signed-off-by: Greg Kroah-Hartman commit 0e4aeab775f9e9358c4bc522b87e9f6e2cfe0973 Author: Yoshihiro Shimoda Date: Mon Sep 10 20:15:47 2018 +0900 dt-bindings: usb: ehci: Add clocks description for R-Car Gen3 This patch adds detailed information of an optional property "clocks" description for R-Car Gen3. Signed-off-by: Yoshihiro Shimoda Reviewed-by: Simon Horman Reviewed-by: Rob Herring Signed-off-by: Greg Kroah-Hartman commit f13912d3f014a7f2fa5c35d25ee8c3f96bda6272 Author: Saranya Gopal Date: Wed Sep 12 08:46:26 2018 +0530 usbcore: Select UAC3 configuration for audio if present USB audio class 3.0 specification introduced many significant changes like - new power domains, support for LPM/L1 - new cluster descriptor - new high capability and class-specific string descriptors - BADD profiles - ... and many other things (check spec from link below: http://www.usb.org/developers/docs/devclass_docs/USB_Audio_v3.0.zip) Now that UAC3 is supported in linux, choose UAC3 configuration for audio if the device supports it. Selecting this configuration will enable the system to save power by leveraging the new power domains and LPM L1 capability and also support new codec types and data formats for consumer audio applications. Signed-off-by: Saranya Gopal Reviewed-by: Felipe Balbi Signed-off-by: Greg Kroah-Hartman commit 28da90f19cdec24d669d75942fec227f4de37abd Author: Fabrizio Castro Date: Fri Aug 24 08:56:15 2018 +0100 usb: gadget: udc: renesas_usb3: Add r8a774a1 support Document RZ/G2M (R8A774A1) SoC bindings. Signed-off-by: Fabrizio Castro Reviewed-by: Biju Das Reviewed-by: Simon Horman Reviewed-by: Rob Herring Reviewed-by: Yoshihiro Shimoda Signed-off-by: Greg Kroah-Hartman commit 3938e13e98f97b22a89e5aefe5fbef54d91673a3 Author: Fabrizio Castro Date: Fri Aug 24 08:56:14 2018 +0100 dt-bindings: usb: renesas_usbhs: Add r8a774a1 support Document RZ/G2M (R8A774A1) SoC bindings. Signed-off-by: Fabrizio Castro Reviewed-by: Biju Das Reviewed-by: Simon Horman Reviewed-by: Rob Herring Reviewed-by: Yoshihiro Shimoda Signed-off-by: Greg Kroah-Hartman commit c49234a054719d39bbd48e35342add3ba3276405 Author: Fabrizio Castro Date: Fri Aug 24 08:56:12 2018 +0100 dt-bindings: usb-xhci: Add r8a774a1 support Document RZ/G2M (R8A774A1) SoC bindings. Signed-off-by: Fabrizio Castro Reviewed-by: Biju Das Reviewed-by: Simon Horman Reviewed-by: Rob Herring Reviewed-by: Yoshihiro Shimoda Signed-off-by: Greg Kroah-Hartman commit 2e022c40fe1ff64d47070a2c70eae7b55ce92daa Author: Lubomir Rintel Date: Wed Aug 22 22:43:05 2018 +0200 dt-bindings: ehci-mv: add bindings Signed-off-by: Lubomir Rintel Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit 813e18b18a87f31c5b216ea7546127deac3ae1ae Author: Lubomir Rintel Date: Wed Aug 22 22:43:04 2018 +0200 USB: EHCI: ehci-mv: add DT support Add Device tree support. Signed-off-by: Lubomir Rintel Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit a740f20d13b67fd4d91ede93980106f085111f10 Author: Lubomir Rintel Date: Wed Aug 22 22:43:01 2018 +0200 USB: EHCI: ehci-mv: use phy-pxa-usb Use a proper PHY driver, instead of hooks to a board support package. Signed-off-by: Lubomir Rintel Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit bd93227897007bac09c44fe67626035303905900 Author: Lubomir Rintel Date: Wed Aug 22 22:43:00 2018 +0200 USB: EHCI: ehci-mv: remove private_init It's unused. Signed-off-by: Lubomir Rintel Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit 0440fa3d1b4eb3a75b806b6538a3f9547dec4eef Author: Lubomir Rintel Date: Wed Aug 22 22:42:56 2018 +0200 USB: EHCI: make ehci-mv a separate driver This is done do that it could be enabled alongside other platform EHCI glue drivers on multiplatform kernels. Signed-off-by: Lubomir Rintel Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit b32abf8f5d83049fb4576c3edb9f31f3515791a5 Author: Guido Kiener Date: Wed Sep 12 10:51:12 2018 +0200 usb: usbtmc: Remove sysfs group TermChar and auto_abort As all the properties of the usbtmc driver can now be controlled on a per file descriptor basis by ioctl functions the sysfs interface is of limited use. We are not aware about applications that are using the sysfs parameter TermChar, TermCharEnabled or auto_abort. Signed-off-by: Guido Kiener Reviewed-by: Steve Bayless Signed-off-by: Greg Kroah-Hartman commit 5848828387c748d13890df1e3a1038fe91c0373d Author: Guido Kiener Date: Wed Sep 12 10:51:11 2018 +0200 usb: usbtmc: Fix split quoted string in debug message Signed-off-by: Guido Kiener Reviewed-by: Steve Bayless Signed-off-by: Greg Kroah-Hartman commit 386be9094f097289f6f68826c90c24bb55db43cf Author: Guido Kiener Date: Wed Sep 12 10:51:10 2018 +0200 usb: usbtmc: Remove redundant macro USBTMC_SIZE_IOBUFFER Signed-off-by: Guido Kiener Reviewed-by: Steve Bayless Signed-off-by: Greg Kroah-Hartman commit fd784cad03530d82d31c41759a46dd2ddfbf8f6f Author: Guido Kiener Date: Wed Sep 12 10:51:09 2018 +0200 usb: usbtmc: Remove redundant code Remove redundant code and fix debug messages. Signed-off-by: Guido Kiener Reviewed-by: Steve Bayless Signed-off-by: Greg Kroah-Hartman commit dfce4839fdabe756c9544d824e89c60757150c6c Author: Guido Kiener Date: Wed Sep 12 10:51:08 2018 +0200 usb: usbtmc: Update ioctl-number.txt Reserve a suitable range of ioctl numbers for USBTMC driver. Signed-off-by: Guido Kiener Reviewed-by: Steve Bayless Signed-off-by: Greg Kroah-Hartman commit e013477bc20763e28d95d74e5ca97411194984ec Author: Guido Kiener Date: Wed Sep 12 10:51:07 2018 +0200 usb: usbtmc: Add ioctl USBTMC_IOCTL_API_VERSION Add ioctl USBTMC_IOCTL_API_VERSION to get current API version of usbtmc driver. This is to allow an instrument library to determine whether the driver API is compatible with the implementation. The API may change in future versions. Therefore the macro USBTMC_API_VERSION should be incremented when changing tmc.h with new flags, ioctls or when changing a significant behavior of the driver. Signed-off-by: Guido Kiener Reviewed-by: Steve Bayless Signed-off-by: Greg Kroah-Hartman commit 63c97bbad5ae5ef411b9a6f2dccdd11e23f29f89 Author: Guido Kiener Date: Wed Sep 12 10:51:06 2018 +0200 usb: usbtmc: Replace USBTMC_TIMEOUT macros for control messages Use common timeout macro USB_CTRL_GET_TIMEOUT (=5s) for all usb_control_msg() function calls. The macro USBTMC_TIMEOUT should only be used as default value for Bulk IN/OUT transfers. Signed-off-by: Guido Kiener Reviewed-by: Steve Bayless Signed-off-by: Greg Kroah-Hartman commit 0e59088e7ff7aeda49dedadbf0e967761b909ad8 Author: Guido Kiener Date: Wed Sep 12 10:51:05 2018 +0200 usb: usbtmc: Fix ioctl USBTMC_IOCTL_ABORT_BULK_OUT Add parameter 'tag' to function usbtmc_ioctl_abort_bulk_out_tag() for future versions. Use USBTMC_BUFSIZE (4k) instead of USBTMC_SIZE_IOBUFFER (2k). Using USBTMC_SIZE_IOBUFFER is deprecated. Insert a sleep of 50 ms between subsequent CHECK_ABORT_BULK_OUT_STATUS control requests to avoid stressing the instrument with repeated requests. Use common macro USB_CTRL_GET_TIMEOUT instead of USBTMC_TIMEOUT. Signed-off-by: Guido Kiener Reviewed-by: Steve Bayless Signed-off-by: Greg Kroah-Hartman commit cbe743f1333b23040d1312afd58224dbd58fcc25 Author: Guido Kiener Date: Wed Sep 12 10:51:04 2018 +0200 usb: usbtmc: Fix ioctl USBTMC_IOCTL_ABORT_BULK_IN Add parameter 'tag' to function usbtmc_ioctl_abort_bulk_in_tag() for future versions. Remove calculation of max_size (=wMaxPacketSize) and wrong condition (actual == max_size) in while loop. An abort operation should always flush the complete Bulk-IN until a short packet is received. Return error code ENOMSG when transfer (specified by given tag) is not in progress and device returns code USBTMC_STATUS_TRANSFER_NOT_IN_PROGRESS. Use USBTMC_BUFSIZE (4k) instead of USBTMC_SIZE_IOBUFFER (2k). Using USBTMC_SIZE_IOBUFFER is deprecated. Use common macro USB_CTRL_GET_TIMEOUT instead of USBTMC_TIMEOUT. Check only bit 0 (field bmAbortBulkIn) of the CHECK_ABORT_BULK_IN_STATUS response, since other bits are reserved and can change in future versions. Signed-off-by: Guido Kiener Reviewed-by: Steve Bayless Signed-off-by: Greg Kroah-Hartman commit dfee02ac4bce6374c9769fe31f20794309341fa0 Author: Guido Kiener Date: Wed Sep 12 10:51:03 2018 +0200 usb: usbtmc: Fix ioctl USBTMC_IOCTL_CLEAR Remove calculation of max_size (=wMaxPacketSize) and wrong condition (actual == max_size) in while loop. A device clear should always flush the complete Bulk-IN FIFO. Insert a sleep of 50 ms between subsequent CHECK_CLEAR_STATUS control requests to avoid stressing the instrument with repeated requests. Some instruments need time to cleanup internal I/O buffers. Polling and nonbraked requests slow down the response time of devices. Use USBTMC_BUFSIZE (4k) instead of USBTMC_SIZE_IOBUFFER (2k). Using USBTMC_SIZE_IOBUFFER is deprecated. Check only bit 0 (field bmClear) of the CHECK_CLEAR_STATUS response, since other bits are reserved and can change in future versions. Signed-off-by: Guido Kiener Reviewed-by: Steve Bayless Signed-off-by: Greg Kroah-Hartman commit d7604ff0dc018f21d0363a8ebd424bf84cf41020 Author: Guido Kiener Date: Wed Sep 12 10:51:02 2018 +0200 usb: usbtmc: Optimize usbtmc_read Use new usbtmc_generic_read function to maximize bandwidth during long data transfer. Also fix reading of zero length packet (ZLP) or trailing short packet. The maximum input transfer size is limited to INT_MAX (=2GB). Also remove redundant return in send_request_dev_dep_msg_in(). Signed-off-by: Guido Kiener Reviewed-by: Steve Bayless Signed-off-by: Greg Kroah-Hartman commit 4d5e18d9ed93fcdf1bd625aac80048f6cd0063bc Author: Guido Kiener Date: Wed Sep 12 10:51:01 2018 +0200 usb: usbtmc: Optimize usbtmc_write Use new usbtmc_generic_write function to maximize bandwidth during long data transfer. The maximum output transfer size is limited to INT_MAX (=2GB). Signed-off-by: Guido Kiener Reviewed-by: Steve Bayless Signed-off-by: Greg Kroah-Hartman commit ec34d08eff71b6cc69bacd70906cf9ff0d8c87a4 Author: Guido Kiener Date: Wed Sep 12 10:51:00 2018 +0200 usb: usbtmc: Add ioctl USBTMC_IOCTL_AUTO_ABORT Add ioctl USBTMC_IOCTL_AUTO_ABORT to configure auto_abort for each specific file handle. Signed-off-by: Guido Kiener Reviewed-by: Steve Bayless Signed-off-by: Greg Kroah-Hartman commit 8409e96f012a777ad9ca2050d567d766e43ec343 Author: Guido Kiener Date: Wed Sep 12 10:50:59 2018 +0200 usb: usbtmc: add ioctl USBTMC_IOCTL_MSG_IN_ATTR add ioctl USBTMC_IOCTL_MSG_IN_ATTR that returns the specific bmTransferAttributes field of the last DEV_DEP_MSG_IN Bulk-IN header. This header is received by the read() function. The meaning of the (u8) bitmap bmTransferAttributes is: Bit 0 = EOM flag is set when the last transfer of a USBTMC message is received. Bit 1 = is set when the last byte is a termchar (e.g. '\n'). Note that this bit is always zero when the device does not support the termchar feature or when termchar detection is not enabled (see ioctl USBTMC_IOCTL_CONFIG_TERMCHAR). Signed-off-by: Guido Kiener Reviewed-by: Steve Bayless Signed-off-by: Greg Kroah-Hartman commit 739240a9f6ac4d4c841081029874b3521744e490 Author: Guido Kiener Date: Wed Sep 12 10:50:58 2018 +0200 usb: usbtmc: Add ioctl USBTMC488_IOCTL_WAIT_SRQ Wait until an SRQ (service request) is received on the interrupt pipe or until the given period of time is expired. In contrast to the poll() function this ioctl does not return when other (a)synchronous I/O operations fail with EPOLLERR. Signed-off-by: Guido Kiener Reviewed-by: Steve Bayless Signed-off-by: Greg Kroah-Hartman commit b19bbdc5f45171295defbfa2a1846a2776b942bc Author: Guido Kiener Date: Wed Sep 12 10:50:57 2018 +0200 usb: usbtmc: Fix suspend/resume Submitted urbs are not allowed when system is suspended. Thus the submitted urb waiting at interrupt pipe is killed during suspend callback and submitted again when system resumes. Signed-off-by: Guido Kiener Reviewed-by: Steve Bayless Signed-off-by: Greg Kroah-Hartman commit 987b81998b41563113f714009e7e748e1211026d Author: Guido Kiener Date: Wed Sep 12 10:50:56 2018 +0200 usb: usbtmc: Add ioctl USBTMC_IOCTL_CLEANUP_IO The ioctl USBTMC_IOCTL_CLEANUP_IO kills all submitted urbs to OUT and IN bulk, and clears all received data from IN bulk. Internal transfer counters and error states are reset. An application should use this ioctl after an asnychronous transfer was canceled and/or error handling has finished. Signed-off-by: Guido Kiener Reviewed-by: Steve Bayless Signed-off-by: Greg Kroah-Hartman commit 46ecc9d54efc11bf99689901f867854d264cbc0b Author: Guido Kiener Date: Wed Sep 12 10:50:55 2018 +0200 usb: usbtmc: Add ioctl USBTMC_IOCTL_CANCEL_IO ioctl USBTMC_IOCTL_CANCEL_IO stops and kills all flying urbs of last USBTMC_IOCTL_READ and USBTMC_IOCTL_WRITE function calls. A subsequent call to USBTMC_IOCTL_READ or USBTMC_IOCTL_WRITE_RESULT returns -ECANCELED with information about current transferred data. Signed-off-by: Guido Kiener Reviewed-by: Steve Bayless Signed-off-by: Greg Kroah-Hartman commit bb99794a4792068cb4bfd40e99e0f9d8fe7872fa Author: Guido Kiener Date: Wed Sep 12 10:50:54 2018 +0200 usb: usbtmc: Add ioctl for vendor specific read The USBTMC_IOCTL_READ call provides for generic synchronous and asynchronous reads on bulk IN to implement vendor specific library routines. Depending on transfer_size the function submits one or more urbs (up to 16) each with a size of up to 4kB. The flag USBTMC_FLAG_IGNORE_TRAILER can be used when the transmission size is already known. Then the function does not truncate the transfer_size to a multiple of 4 kB, but does reserve extra space to receive the final short or zero length packet. Note that the instrument is allowed to send up to wMaxPacketSize - 1 bytes at the end of a message to avoid sending a zero length packet. With flag USBTMC_FLAG_ASYNC the ioctl is non blocking. When no received data is available, the read function submits as many urbs as needed to receive transfer_size bytes. However the number of flying urbs (=4kB) is limited to 16 even with subsequent calls of this ioctl. Returns -EAGAIN when non blocking and no data is received. Signals EPOLLIN | EPOLLRDNORM when asynchronous urbs are ready to be read. In non blocking mode the usbtmc_message.message pointer may be NULL and the ioctl just submits urbs to initiate receiving data. However if data is already available due to a previous non blocking call the ioctl will return -EINVAL when the message pointer is NULL. This ioctl does not support compatibility for 32 bit applications running on 64 bit systems. However all other convenient ioctls of the USBTMC driver can still be used in 32 bit applications as well. Note that 32 bit applications running on 32 bit target systems are not affected by this limitation. Signed-off-by: Guido Kiener Reviewed-by: Steve Bayless Signed-off-by: Greg Kroah-Hartman commit b14984518ee60ef7662aa6520b76ae6046e08857 Author: Guido Kiener Date: Wed Sep 12 10:50:53 2018 +0200 usb: usbtmc: Add ioctl USBTMC_IOCTL_WRITE_RESULT ioctl USBTMC_IOCTL_WRITE_RESULT copies current out_transfer_size to given __u32 pointer and returns current out_status of the last (asnynchronous) USBTMC_IOCTL_WRITE call. Signed-off-by: Guido Kiener Reviewed-by: Steve Bayless Signed-off-by: Greg Kroah-Hartman commit 4ddc645f40e90fa3bc7af3a3f3bd7d29e671a775 Author: Guido Kiener Date: Wed Sep 12 10:50:52 2018 +0200 usb: usbtmc: Add ioctl for vendor specific write The new ioctl USBTMC_IOCTL_WRITE sends a generic message to bulk OUT. This ioctl is used for vendor specific or asynchronous I/O as well. The message is split into chunks of 4k (page size). Message size is aligned to 32 bit boundaries. With flag USBTMC_FLAG_ASYNC the ioctl is non blocking. With flag USBTMC_FLAG_APPEND additional urbs are queued and out_status/out_transfer_size is not reset. EPOLLOUT | EPOLLWRNORM is signaled when all submitted urbs are completed. Flush flying urbs when file handle is closed or device is suspended or reset. This ioctl does not support compatibility for 32 bit applications running on 64 bit systems. However all other convenient ioctls of the USBTMC driver can still be used in 32 bit applications as well. Note that 32 bit applications running on 32 bit target systems are not affected by this limitation. Signed-off-by: Guido Kiener Reviewed-by: Steve Bayless Signed-off-by: Greg Kroah-Hartman commit 658f24f4523e41cda6a389c38b763f4c0cad6fbc Author: Guido Kiener Date: Wed Sep 12 10:50:51 2018 +0200 usb: usbtmc: Add ioctl for generic requests on control Add USBTMC_IOCTL_CTRL_REQUEST to send arbitrary requests on the control pipe. Used by specific applications of IVI Foundation, Inc. to implement VISA API functions: viUsbControlIn/Out. The maximum length of control request is set to 4k. This ioctl does not support compatibility for 32 bit applications running on 64 bit systems. However all other convenient ioctls of the USBTMC driver can still be used in 32 bit applications as well. Note that 32 bit applications running on 32 bit target systems are not affected by this limitation. Signed-off-by: Guido Kiener Reviewed-by: Steve Bayless Signed-off-by: Greg Kroah-Hartman commit 38c6528d40d8085183916b3ef851ddea66fd84dd Author: Adam Thomson Date: Tue Aug 21 13:28:23 2018 +0100 usb: typec: fusb302: Populate tcpc fwnode for TCPM property handling This update populates the tcpc handle's fwnode pointer with the child usb-connector node, if it exists, so that TCPM can perform generic property handling to define the ports capabilities. Signed-off-by: Adam Thomson Reviewed-by: Guenter Roeck Reviewed-by: Heikki Krogerus Signed-off-by: Greg Kroah-Hartman commit c8c11ad1afb134839017fe28a1de945b6333631f Author: Adam Thomson Date: Tue Aug 21 13:28:22 2018 +0100 dt-bindings: usb: fusb302: Use usb-connector bindings for configuration There are now generic usb-connector bindings which can be used to define a port controllers configuration for USB-PD, so device specific bindings are no longer necessary. This update deprecates 'fcs,operating-sink-microwatt', and references the 'usb-connector' bindings instead to achieve the required port config. Signed-off-by: Adam Thomson Reviewed-by: Rob Herring Signed-off-by: Greg Kroah-Hartman commit 63f59b73e80a0f7431f6f91383fcc3f5fac49bb8 Author: Adam Thomson Date: Tue Aug 21 13:28:21 2018 +0100 dt-bindings: connector: Add support for USB-PD PPS APDOs to bindings Add support for PPS APDOs to connector bindings so a port controller can specify support for PPS, as per existing FIXED/BATT/VAR PDOs. Signed-off-by: Adam Thomson Reviewed-by: Rob Herring Signed-off-by: Greg Kroah-Hartman commit 31ab98f0c875a61600d195eaf301574c53cc4fde Author: Michael Straube Date: Wed Sep 19 22:40:01 2018 +0200 staging: rtl8188eu: clean function definitions - style Do not line break function definitions where not needed and move the return type to the same line. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit 9b2cf1ffed975c3d19d3c45446285f90751fab6f Author: Michael Straube Date: Wed Sep 19 22:40:00 2018 +0200 staging: rtl8188eu: rename parameter of Hal_GetChnlGroup88E() Rename function parameter of Hal_GetChnlGroup88E() to avoid CamelCase. pGroup -> group Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit 4aaf2b7312d8b08df6441ce0ca5def603db493c1 Author: Michael Straube Date: Wed Sep 19 22:39:59 2018 +0200 staging: rtl8188eu: change return type of Hal_GetChnlGroup88E() After the removal of code valid only for 5 GHz the function Hal_GetChnlGroup88E returns always true. Change the return type to void and remove the variable bIn24G. Remove the tests for the return value and the variable bIn24G from the only user Hal_ReadTxPowerInfo88E(). Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit 0c8c0f744db66eedb605f8090b235334cbf66186 Author: Michael Straube Date: Wed Sep 19 22:39:58 2018 +0200 staging: rtl8188eu: remove 5 GHz code from Hal_GetChnlGroup88E() Remove code valid only for 5 GHz from Hal_GetChnlGroup88E(). This addresses the below TODO item. - find and remove remaining code valid only for 5 GHz. Most of the obvious ones have been removed, but things like channel > 14 still exist. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit beed1ce294579bf82b6a8d51c5e3caa9599c38d9 Author: Hans de Goede Date: Tue Sep 18 19:44:38 2018 +0200 staging: vboxvideo: Add vbox_bo_k[un]map helper functions Add vbox_bo_k[un]map helper functions instead of having code directly poking struct vbox_bo internals. While touch neighboring code anyways also fix a return -PTR_ERR(info), which should be return PTR_ERR(info). Signed-off-by: Hans de Goede Signed-off-by: Greg Kroah-Hartman commit cfc1fc63be447737639dbf90610e7af58d7bd437 Author: Hans de Goede Date: Tue Sep 18 19:44:37 2018 +0200 staging: vboxvideo: Move bo_[un]resere calls into vbox_bo_[un]pin We always need to reserve the bo around a pin / unpin, so move the reservation there. This allows removing the vbox_fb_[un]pin helpers. Note this means that we now no longer hold the bo reserved while k[un]mapping it in vbox_fb.c this is fine as it is not necessary to hold it reserved for this. Signed-off-by: Hans de Goede Signed-off-by: Greg Kroah-Hartman commit 114094c83ed334524ee1a50bd8c08425f361148b Author: Hans de Goede Date: Tue Sep 18 19:44:36 2018 +0200 staging: vboxvideo: Fix NULL ptr deref in vbox_set_up_input_mapping() When vbox_set_up_input_mapping() gets called the first crtc might be disable and not have a fb at all, triggering a NUL ptr deref at: vbox->input_mapping_width = CRTC_FB(crtci)->width; Instead of using the fb from the crtc with id 0, just use the fb from the first crtc with a fb. This is in the single_framebuffer = true path, so all crtc-s point to the same fb anyways. Signed-off-by: Hans de Goede Signed-off-by: Greg Kroah-Hartman commit 0fdda2ce74e5fe2d9ff813895fcf0f716be66290 Author: Hans de Goede Date: Tue Sep 18 19:44:35 2018 +0200 staging: vboxvideo: Move pin / unpin of fb out of vbox_crtc_set_base_and_mode Move pin / unpin of fb out of vbox_crtc_set_base_and_mode() so that it can be used to implement the atomic_update drm_plane_helper_func for the primary plane. Signed-off-by: Hans de Goede Signed-off-by: Greg Kroah-Hartman commit 0424d7ba4574ba3fcfd68c567becb5e90547e4f9 Author: Hans de Goede Date: Tue Sep 18 19:44:34 2018 +0200 staging: vboxvideo: Init fb_info.fix.smem once from fbdev_create The fbdev compat fb gets pinned into VRAM at creation and then gets pinned a second time when set as scanout buffer and unpinned when replaced, this means its pin count never becomes less then 1, so it is always at the same address and there is no need for the vbox_fbdev_set_base() call. Signed-off-by: Hans de Goede Signed-off-by: Greg Kroah-Hartman commit cb5eaf187d1d996a226b95a01f7a57b9dd603bea Author: Hans de Goede Date: Tue Sep 18 19:44:33 2018 +0200 staging: vboxvideo: Expose creation of universal primary plane Let's expose the primary plane initialization inside the vboxvideo driver in preparation for universal planes and atomic. Signed-off-by: Hans de Goede Signed-off-by: Greg Kroah-Hartman commit f4d6d90f831479cc87ede854963dcfdcf2a4b741 Author: Hans de Goede Date: Tue Sep 18 19:44:32 2018 +0200 staging: vboxvideo: Add fl_flag argument to vbox_fb_pin() helper Allow specifying where to pin the framebuffer bo, so that this helper can be used from the cursor code too. Signed-off-by: Hans de Goede Signed-off-by: Greg Kroah-Hartman commit 3498ea8b7e3c8b2fd2575780cb76c4c91a346c6d Author: Hans de Goede Date: Tue Sep 18 19:44:31 2018 +0200 staging: vboxvideo: Fold vbox_drm_resume() into vbox_pm_resume() vbox_pm_resume() is the only caller of vbox_drm_resume(), so squash the 2 functions into 1. Signed-off-by: Hans de Goede Signed-off-by: Greg Kroah-Hartman commit 01648890f336a33cd1ac89b264e9ff87a3b85690 Author: Hans de Goede Date: Tue Sep 18 19:44:30 2018 +0200 staging: vboxvideo: Embed drm_device into driver structure This is the recommended way to create the drm_device structure, according to DRM documentation. Signed-off-by: Hans de Goede Signed-off-by: Greg Kroah-Hartman commit d46709094deb69a996bcde98f0a137561858c0fc Author: Hans de Goede Date: Tue Sep 18 19:44:29 2018 +0200 staging: vboxvideo: Fold driver_load/unload into probe/remove functions Fold the driver_load / unload functions into the probe / remove functions now that we are no longer using the deprecated drm_get_pci_dev() mechanism. Signed-off-by: Hans de Goede Signed-off-by: Greg Kroah-Hartman commit 79815ee23890c918588941fdd054413232e041d0 Author: Hans de Goede Date: Tue Sep 18 19:44:28 2018 +0200 staging: vboxvideo: Move setup of modesetting from driver_load to mode_init Move the setup of drm modesetting config from vbox_driver_load() to vbox_mode_init(). Signed-off-by: Hans de Goede Signed-off-by: Greg Kroah-Hartman commit 7641575ecc48f29f2095e9712db4df3eff5e62e1 Author: André Lehmann Date: Wed Sep 19 22:40:09 2018 +0200 staging: rtl8712: replace licence header with SPDX licence id fixed warning found by checkpatch Signed-off-by: André Lehmann Signed-off-by: Greg Kroah-Hartman commit ae849dfc07cb694ad3cf3549ccb602cbd224fe4e Author: Hans de Goede Date: Tue Sep 18 19:44:27 2018 +0200 staging: vboxvideo: Let DRM core handle connector registering Registering the connector explicitly right after creation is not necessary for modesetting drivers, because drm_dev_register already takes care of this on the core side, by calling drm_modeset_register_all. Signed-off-by: Hans de Goede Signed-off-by: Greg Kroah-Hartman commit 33f49571d75024b1044cd02689ad2bdb4924cc80 Author: Lubomir Rintel Date: Tue Sep 18 14:36:20 2018 +0200 staging: olpc_dcon: add a missing dependency WARNING: unmet direct dependencies detected for BACKLIGHT_CLASS_DEVICE Depends on [n]: HAS_IOMEM [=y] && BACKLIGHT_LCD_SUPPORT [=n] Selected by [y]: - FB_OLPC_DCON [=y] && STAGING [=y] && X86 [=y] && OLPC [=y] && FB [=y] && I2C [=y] && (GPIO_CS5535 [=n] || GPIO_CS5535 [=n]=n) Signed-off-by: Lubomir Rintel Signed-off-by: Greg Kroah-Hartman commit 5f1a9140dd49b547089732d73b54be630509f341 Author: Nishad Kamdar Date: Wed Sep 19 22:47:19 2018 +0530 staging: mt7621-mmc: Delete IRQ_MSG() and its users This patch removes IRQ_MSG() and its users as currently it is a no-op. Signed-off-by: Nishad Kamdar Signed-off-by: Greg Kroah-Hartman commit d41076eaebf47232e33e4a0fed511d0e816ecb7c Author: Chengguang Xu Date: Wed Sep 19 22:53:46 2018 +0800 staging: erofs: option validation in remount Add option validation in remount. After this patch, remount can change recognized options, and for unknown options remount will fail and report error. Signed-off-by: Chengguang Xu Reviewed-by: Chao Yu Reviewed-by: Gao Xiang Signed-off-by: Greg Kroah-Hartman commit 2ab3dd84c0a1a0a7fc5ef2d893fb2612086bc94f Author: Chengguang Xu Date: Wed Sep 19 22:53:45 2018 +0800 staging: erofs: code cleanup for erofs_show_options() Add new helper erofs_get_fault_rate() to get fault rate instead of directly getting it from sbi, so we can remove the macro check surrounding it. Signed-off-by: Chengguang Xu Reviewed-by: Chao Yu Reviewed-by: Gao Xiang Signed-off-by: Greg Kroah-Hartman commit 01e4ae4b687fad12fa00ebf0bc0723f1fbbeec30 Author: Chengguang Xu Date: Wed Sep 19 22:53:44 2018 +0800 staging: erofs: code cleanup for option parsing of fault_injection Define a dummpy function of erofs_build_fault_attr() when macro CONFIG_EROFS_FAULT_INJECTION is disabled, so that we don't have to check the macro in calling place. Based on above adjustment, do proper code cleanup for option parsing of fault_injection. Signed-off-by: Chengguang Xu Reviewed-by: Chao Yu Reviewed-by: Gao Xiang Signed-off-by: Greg Kroah-Hartman commit 6614f76530c102a3b55e2355645385ab124cdcb2 Author: Gao Xiang Date: Wed Sep 19 13:49:10 2018 +0800 staging: erofs: simplify return value of `xattr_foreach' As Dan Carpenter pointed out, there is no need to propagate positive return values back to its callers. Suggested-by: Dan Carpenter Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Signed-off-by: Greg Kroah-Hartman commit bdf30cef10558d2158952c27bd18c16fe72b58d5 Author: Gao Xiang Date: Wed Sep 19 13:49:09 2018 +0800 staging: erofs: add some comments for xattr subsystem As Dan Carpenter pointed out, it is better to document what return values of these callbacks in `struct xattr_iter_handlers' mean and why it->ofs is increased regardless of success or failure in `xattr_foreach'. Suggested-by: Dan Carpenter Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Signed-off-by: Greg Kroah-Hartman commit 5fb76bb04216fdbbee3fec544a0c16e990fefdfb Author: Gao Xiang Date: Thu Sep 20 00:06:56 2018 +0800 staging: erofs: cleanup `z_erofs_vle_normalaccess_readpages' This patch introduces `__should_decompress_synchronously' to cleanup `z_erofs_vle_normalaccess_readpages'. Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Signed-off-by: Greg Kroah-Hartman commit e5e3abbadf0dbd1068f64f8abe70401c5a178180 Author: Gao Xiang Date: Wed Sep 19 13:49:07 2018 +0800 staging: erofs: drop multiref support temporarily Multiref support means that a compressed page could have more than one reference, which is designed for on-disk data deduplication. However, mkfs doesn't support this mode at this moment, and the kernel implementation is also broken. Let's drop multiref support. If it is fully implemented in the future, it can be reverted later. Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Signed-off-by: Greg Kroah-Hartman commit b27661cf99c2ba319c78ba0b89e59e6aa8e86411 Author: Gao Xiang Date: Wed Sep 19 13:49:06 2018 +0800 staging: erofs: fold in `__update_workgrp_llen' There is the only one user to use `__update_workgrp_llen'. Fold it in `z_erofs_vle_work_iter_begin' and cleanup related code. Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Signed-off-by: Greg Kroah-Hartman commit 83a3b2fffbca09ad02532d390fdc7861a6904a02 Author: Gao Xiang Date: Wed Sep 19 13:49:05 2018 +0800 staging: erofs: remove redundant CONFIG_EROFS_FS_XATTRs some CONFIG_EROFS_FS_XATTR conditions were added because of the historial Linux kernel compatibility, which are unneeded now. Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Signed-off-by: Greg Kroah-Hartman commit 82c7c4fcbf84a0943b92050e08daec85f1d9670f Author: Chris Wilson Date: Wed Sep 19 20:55:13 2018 +0100 drm/i915/selftests: Free the batch along the contexts error path Remember to release the batch bo reference if we hit an error trying to submit our MI_STORE_DWORD_IMM. References: https://bugs.freedesktop.org/show_bug.cgi?id=107979 Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20180919195544.1511-9-chris@chris-wilson.co.uk commit a4ac1f5ced58b0782252d5a8b2dfe28a1d7a5e19 Author: Vinod Koul Date: Wed Sep 19 18:50:44 2018 -0700 power: reset: qcom-pon: Add pms405 pon support Update the binding and driver for pms405 pon. Signed-off-by: Vinod Koul Signed-off-by: Bjorn Andersson Signed-off-by: Sebastian Reichel commit 457b42f0aa1c397745ada6083bf81b9479ab19fe Author: Liu Xiang Date: Sun Jul 22 21:33:56 2018 +0800 power: supply: bq27xxx: Add support for BQ27411 According to the datasheet, bq27411 is similar to bq27421. Signed-off-by: Liu Xiang Reviewed-by: Andrew F. Davis Signed-off-by: Sebastian Reichel commit 59739131e0ca06db7560f9073fff2fb83f6bc2a5 Author: Loic Poulain Date: Tue Sep 4 17:18:58 2018 +0200 usb: chipidea: Fix otg event handler At OTG work running time, it's possible that several events need to be addressed (e.g. ID and VBUS events). The current implementation handles only one event at a time which leads to ignoring the other one. Fix it. Signed-off-by: Loic Poulain Signed-off-by: Peter Chen commit 8b97d73c4d72a2abf58f8e49062a7ee1e5f1334e Author: Loic Poulain Date: Tue Sep 4 17:18:57 2018 +0200 usb: chipidea: Prevent unbalanced IRQ disable The ChipIdea IRQ is disabled before scheduling the otg work and re-enabled on otg work completion. However if the job is already scheduled we have to undo the effect of disable_irq int order to balance the IRQ disable-depth value. Fixes: be6b0c1bd0be ("usb: chipidea: using one inline function to cover queue work operations") Signed-off-by: Loic Poulain Signed-off-by: Peter Chen commit 1fa9697c85382ef6aebc49384f6143a7c0af3745 Author: Loic Poulain Date: Tue Sep 4 17:18:56 2018 +0200 doc: usb: ci-hdrc-usb2: Add pinctrl properties definition Some hardware implementations require to configure pins differently according to the USB role (host/device), this can be an update of the pins routing or a simple GPIO value change. This patch introduces new optional "host" and "device" pinctrls. If these pinctrls are defined by the device, they are respectively selected on host/device role start. Signed-off-by: Loic Poulain Signed-off-by: Peter Chen commit 16caf1fa37db4722d8d8c7bc26177279949d75a6 Author: Loic Poulain Date: Tue Sep 4 17:18:55 2018 +0200 usb: chipidea: Add dynamic pinctrl selection Some hardware implementations require to configure pins differently according to the USB role (host/device), this can be an update of the pins routing or a simple GPIO value change. This patch introduces new optional "host" and "device" pinctrls. If these pinctrls are defined by the device, they are respectively selected on host/device role start. If a default pinctrl exist, it is restored on host/device role stop. Signed-off-by: Loic Poulain Signed-off-by: Peter Chen commit 1f06072cd22fbbd2e961b49c8e4fa9f7a0c120d6 Author: Marcus Folkesson Date: Sun Sep 2 19:36:50 2018 +0200 usb: chipidea: imx: make MODULE_LICENCE and SPDX-identifier match The SPDX-License-Identifier is set to GPL-2.0+, which correspond to MODULE_LICENSE "GPL". Signed-off-by: Marcus Folkesson Signed-off-by: Peter Chen commit 1dedbdf2bbb1ede8d96f35f9845ecae179dc1988 Author: Nicolas Adell Date: Mon Aug 27 15:59:56 2018 +0200 usb: chipidea: imx: enable OTG overcurrent in case USB subsystem is already started When initializing the USB subsystem before starting the kernel, OTG overcurrent detection is disabled. In case the OTG polarity of overcurrent is low active, the overcurrent detection is never enabled again and events cannot be reported as expected. Because imx usb overcurrent polarity is low active by default, only detection needs to be enable in usbmisc init function. Signed-off-by: Nicolas Adell Signed-off-by: Peter Chen commit 9f644a64884f97f0d92f0689afc7fcf177b6ee92 Author: Marcus Folkesson Date: Sun Sep 2 19:37:04 2018 +0200 usb: chipidea: imx: do not use preprocessor conditionals for PM Use preprocessor conditionals for CONFIG_PM and CONFIG_PM_SLEEP is not necessary since SET_SYSTEM_SLEEP_PM_OPS and SET_RUNTIME_PM_OPS does that internally. It is also the preferred way according to our coding style guidelines. Signed-off-by: Marcus Folkesson Signed-off-by: Peter Chen commit b1c7a57448307898cb3a44f5c9b0cfdff43bb633 Author: Andrzej Pietrasiewicz Date: Fri Aug 10 15:28:59 2018 +0200 drm: drm_fourcc: add Samsung 16x16 tile format Add modifier for tiled formats used by graphics modules found in Samsung Exynos5250/542x/5433 SoCs. This is a simple tiled layout using tiles of 16x16 pixels in a row-major layout. Signed-off-by: Andrzej Pietrasiewicz Signed-off-by: Marek Szyprowski Signed-off-by: Inki Dae commit 714c9994110fa43a02f2cc92142c25e9bf58d167 Author: Souptick Joarder Date: Thu Aug 2 21:15:17 2018 +0530 gpu/drm/exynos: Convert drm_atomic_helper_suspend/resume() convert drm_atomic_helper_suspend/resume() to use drm_mode_config_helper_suspend/resume(). exynos_drm_fbdev_suspend/resume can be removed as drm_mode_config_helper_suspend/resume has implement the same in generic way. Remove suspend_state from exynos_drm_private struct as it is no more useful. Signed-off-by: Ajit Negi Signed-off-by: Souptick Joarder Tested-by: Marek Szyprowski Signed-off-by: Inki Dae commit 91e28030fd5deb56b5f14b870bc2e2c856435cca Author: Andrzej Hajda Date: Wed Jul 25 17:46:44 2018 +0200 dt-bindings: exynos_dsim: update of graph bindings Of-graph bindings should describe ports present in the device, not the devices it can be connected to. The patch replaces verbose description with shorter but more precise one. While at it clock related properties are moved to the main node as it is their actual location. Signed-off-by: Andrzej Hajda Signed-off-by: Inki Dae commit 8a08f671f31c9bbcbe9d333632005e58162567ca Author: Maciej Purski Date: Wed Jul 25 17:46:38 2018 +0200 drm/exynos: enable out_bridge in exynos_dsi_enable As the out bridge will not be enabled directly by the framework, it should be enabled by DSI. exynos_dsi_enable() should handle a case, when there is an out_bridge connected as a DSI peripheral. Changed in v5: - fixed error path in exynos_dsi_enable Signed-off-by: Maciej Purski [ a.hajda@samsung.com: v5 ] Signed-off-by: Andrzej Hajda Signed-off-by: Inki Dae commit 6afb7721e2a0e433eaae3a184e8c69e23b5927ed Author: Maciej Purski Date: Tue Aug 7 16:50:59 2018 +0900 drm/exynos: move connector creation to attach callback The current implementation assumes that the only possible peripheral device for DSIM is a panel. Using an output bridge child device should also be possible. If an output bridge is available, don't create a new connector. Instead, call drm_bridge_attach() and set encoder's bridge to NULL in order to avoid an out bridge from being visible by the framework, as the DSI bus needs control on enabling its child output bridge. Such sequence is required by Toshiba TC358764 bridge, which is a DSI peripheral bridge device. changed in v5: - detach bridge in mipi_dsi detach callback Signed-off-by: Maciej Purski [ a.hajda@samsung.com: v5 ] Signed-off-by: Andrzej Hajda Manually merged due to merge conflict. Signed-off-by: Inki Dae commit 2782622eecb8f6139faa6ee748af95c0b5e261f4 Author: Maciej Purski Date: Wed Jul 25 17:46:36 2018 +0200 drm/exynos: rename bridge_node to in_bridge_node Driver uses bridge_node to refer to bridge on input side of DSI. Since we want to add support for bridges on output side lets add "in" prefix to avoid confusion with out bridges. Changes in v5: - replace mic_ prefix with in_ Signed-off-by: Maciej Purski [ a.hajda@samsuung.com: v5 ] Signed-off-by: Andrzej Hajda Signed-off-by: Inki Dae commit 3368e06e2a91a65cff59e520acc51b9adf4900bf Author: Vijay Khemka Date: Tue Sep 18 16:41:08 2018 -0700 ARM: dts: aspeed: Adding Facebook TiogaPass BMC Initial introduction of Facebook TiogaPass family equipped with Aspeed 2500 BMC SoC. TiogaPass is a x86 server development kit with a ASPEED ast2500 BMC manufactured by Facebook. Specifically, This adds the TiogaPass platform device tree file including the flash layout used by the TiogaPass BMC machines. Signed-off-by: Vijay Khemka Signed-off-by: Joel Stanley commit c8551f6f3e8ce0a8183ccfe466d3ff6d7c915ab5 Author: Yuan Yao Date: Thu Sep 13 10:25:16 2018 +0800 ARM: dts: aspeed: Add HXT StarDragon 4800 REP2 BMC The HXT StarDragon 4800 REP2 (Reference Evaluation Platform) is an aarch64 ARMv8 server platform with an ast2520 BMC. Signed-off-by: Yuan Yao Signed-off-by: Joel Stanley commit af345df14dc8ec97cb78e98426d62f6f107a28c0 Author: Amelie Delaunay Date: Wed Aug 22 11:45:00 2018 +0200 ARM: dts: stm32: update rtc st,syscfg property on stm32h743 To fit with latest rtc driver updates, rtc st,syscfg property must contain the control register offset of pwrcfg and the mask corresponding to the DBP (Disable Backup Protection) bit. Signed-off-by: Amelie Delaunay Signed-off-by: Alexandre Torgue commit cbe721396b02c3a899ce9b52f07e0336a3a1473c Author: Patrice Chotard Date: Thu Jul 26 09:19:00 2018 +0200 ARM: dts: stm32: Remove cd-inverted property for stm32f746-disco Remove cd-inverted property and update cd-gpios active level accordingly Signed-off-by: Patrice Chotard Signed-off-by: Alexandre Torgue commit 19b3db5ae8d78368002d9c9859eed8c6c6f680a0 Author: Patrice Chotard Date: Thu Jul 26 09:19:00 2018 +0200 ARM: dts: stm32: Remove cd-inverted property for stm32f769-disco Remove cd-inverted property and update cd-gpios active level accordingly Signed-off-by: Patrice Chotard Signed-off-by: Alexandre Torgue commit 9f21096a1c5d924f6ffe9de1049e19847ba571aa Author: Patrice Chotard Date: Thu Jul 26 09:19:00 2018 +0200 ARM: dts: stm32: Remove cd-inverted property for stm32f469-disco Remove cd-inverted property and update cd-gpios active level accordingly Signed-off-by: Patrice Chotard Signed-off-by: Alexandre Torgue commit 0d5e8502b1915680bb38edbc3d0b73f70cecc946 Author: Patrice Chotard Date: Thu Jul 26 09:19:00 2018 +0200 ARM: dts: stm32: Remove cd-inverted property for stm32429i-eval Remove cd-inverted property and update cd-gpios active level accordingly Signed-off-by: Patrice Chotard Signed-off-by: Alexandre Torgue commit 6044fbfa6301b899e0264c53c0f304368443f339 Author: Patrice Chotard Date: Thu Jul 19 15:35:00 2018 +0200 ARM: dts: stm32: Add clk-lse node's label on stm32f429 Add missing clk_lse label for node clk-lse. Signed-off-by: Patrice Chotard Signed-off-by: Alexandre Torgue commit edb1b3abdb20597d92a68c34afba9b01848b2acf Author: Connor McAdams Date: Tue Sep 18 14:33:43 2018 -0400 ALSA: hda/ca0132 - Add AE-5 exit function This patch adds exit commands for the AE-5. Signed-off-by: Connor McAdams Signed-off-by: Takashi Iwai commit 212de2e7414a8a719d7a1206ba940380d6fb6bc0 Author: Connor McAdams Date: Tue Sep 18 14:33:42 2018 -0400 ALSA: hda/ca0132 - Add AE-5 specific controls This patch adds controls for the AE-5's headphone gain setting, and the DAC's interpolation filter setting. Signed-off-by: Connor McAdams Signed-off-by: Takashi Iwai commit f231daaf51daa78c8bf2d0dd94ebeba7836f8efe Author: Connor McAdams Date: Tue Sep 18 14:33:41 2018 -0400 ALSA: hda/ca0132 - Add input selection commands for AE-5 This patch adds the input selection commands for the Sound BlasterX AE-5. Signed-off-by: Connor McAdams Signed-off-by: Takashi Iwai commit 2283c85b4aa6b65e23be898f6a629d260e0cc07a Author: Connor McAdams Date: Tue Sep 18 14:33:40 2018 -0400 ALSA: hda/ca0132 - Add output set commands for AE-5 This patch adds output selection commands for the AE-5. Signed-off-by: Connor McAdams Signed-off-by: Takashi Iwai commit 746fc9deb4349e6af24573b2446c7de6a9c6928a Author: Connor McAdams Date: Tue Sep 18 14:33:39 2018 -0400 ALSA: hda/ca0132 - Clean up ca0132_alt_out_select This patch cleans up ca0132_alt_out_select by moving the card specific output commands into a separate function. As more cards are added, the function ca0132_alt_out_select is going to get more bloated with these, so moving into a separate function tries to keep that from happening. Signed-off-by: Connor McAdams Signed-off-by: Takashi Iwai commit 1cd25cbb2fedbc777f3a8c3cb1ba69b645aeaa64 Author: Laura Abbott Date: Wed Sep 19 18:59:01 2018 -0700 kgdboc: Fix warning with module build After 2dd453168643 ("kgdboc: Fix restrict error"), kgdboc_option_setup is now only used when built in, resulting in a warning when compiled as a module: drivers/tty/serial/kgdboc.c:134:12: warning: 'kgdboc_option_setup' defined but not used [-Wunused-function] static int kgdboc_option_setup(char *opt) ^~~~~~~~~~~~~~~~~~~ Move the function under the appropriate ifdef for builtin only. Fixes: 2dd453168643 ("kgdboc: Fix restrict error") Reported-by: Stephen Rothwell Signed-off-by: Laura Abbott Signed-off-by: Greg Kroah-Hartman commit 415cd8447c60e942ea44a33d7bad85ec5da4dfa8 Author: Connor McAdams Date: Tue Sep 18 14:33:38 2018 -0400 ALSA: hda/ca0132 - Add DSP setup functions for AE-5 This patch adds DSP setup functions for the AE-5. Signed-off-by: Connor McAdams Signed-off-by: Takashi Iwai commit 6ef0e91ec433f337877c9112bf0d27a9e1d0fe95 Author: Connor McAdams Date: Tue Sep 18 14:33:37 2018 -0400 ALSA: hda/ca0132 - Merge post-dsp functions + cleanup This patch cleans up some of the formatting of the post-dsp load setup functions, and also merges some of the sub functions into individual ones. Signed-off-by: Connor McAdams Signed-off-by: Takashi Iwai commit 7a928186b377a7ef3392e902378dc2d63bf332f7 Author: Connor McAdams Date: Tue Sep 18 14:33:36 2018 -0400 ALSA: hda/ca0132 - Change firmware name and usage The Recon3D, AE-5, Z and ZxR all share the same firmware file. Rename this from the specific "ctefx-sbz.bin" to "ctefx-desktop.bin" and set the AE-5 and Recon3D to use it as well. Signed-off-by: Connor McAdams Signed-off-by: Takashi Iwai commit 03c9b6b1e02e6f798d5f554e8ecdc8a37242fa17 Author: Connor McAdams Date: Tue Sep 18 14:33:35 2018 -0400 ALSA: hda/ca0132 - Add AE-5 regular init setup This patch adds AE-5 specific stuff to the ca0132_alt_init function. Signed-off-by: Connor McAdams Signed-off-by: Takashi Iwai commit b9b413450cd60681eef257e78061dd0671e5b151 Author: Connor McAdams Date: Tue Sep 18 14:33:34 2018 -0400 ALSA: hda/ca0132 - Add AE-5 pre-init and ca0113 functions This patch adds AE-5 pre-init functions that happen before the main ca0132_alt_init, and gives functions related to the ca0113 a ca0113 prefix instead of ca0132. It also adds functions to write to the 8051's SFRs, and to write the special ca0113 commands for the AE-5. Signed-off-by: Connor McAdams Signed-off-by: Takashi Iwai commit ce7154480cf9e3141476ffc138ff02bb4243ec8a Author: Connor McAdams Date: Tue Sep 18 14:33:33 2018 -0400 ALSA: hda/ca0132 - Change ca0132_mmio_init for AE-5 This patch adds the unique writes for the AE-5 on startup to ca0132_mmio_init. The other cards share some addresses written to, but use different values. Signed-off-by: Connor McAdams Signed-off-by: Takashi Iwai commit 88268ce8a64e707bd67d7025f5947f46cabbb98d Author: Connor McAdams Date: Tue Sep 18 14:33:32 2018 -0400 ALSA: hda/ca0132 - Set AE-5 bools and select mixer This patch sets the bool values for the AE-5, as well as selects the mixer it will use. Signed-off-by: Connor McAdams Signed-off-by: Takashi Iwai commit d06feaf02fe659ed579dfb10580683ecb6264ca0 Author: Connor McAdams Date: Tue Sep 18 14:33:31 2018 -0400 ALSA: hda/ca0132 - Add pincfg for AE-5 This patch adds the pincfg for the Sound BlasterX AE-5, and cleans up the function it's assigned in. Signed-off-by: Connor McAdams Signed-off-by: Takashi Iwai commit f62764638ae8b8c05b544b287c5a8466d9dd72b7 Author: Connor McAdams Date: Tue Sep 18 14:33:30 2018 -0400 ALSA: hda/ca0132 - Add quirk for Sound BlasterX AE-5 This patch adds the PCI subsys ID quirk for the Sound BlasterX AE-5. Signed-off-by: Connor McAdams Signed-off-by: Takashi Iwai commit bf85a91c2f96cf022ada65921d2805fa87f15b8f Author: Connor McAdams Date: Tue Sep 18 14:33:29 2018 -0400 ALSA: hda/ca0132 - Define new verbs and control params This patch defines some new verbs found from reverse engineering of the onboard 8051 CPU, and a control param found there as well. This clears up usage of these verbs in other parts of the driver, and removes their usage where they're now known to be unnecessary. Signed-off-by: Connor McAdams Signed-off-by: Takashi Iwai commit e53134fefd20c863a873ba77cf2a78fa00c18eec Author: Nick Simonov Date: Thu Sep 20 00:47:10 2018 +0300 ALSA: xen-front: Refine indentations and constify snd_pcm_ops snd_pcm_ops are not supposed to change. So mark the non-const structs as const. Also, refine indentation to ncrease readability. Signed-off-by: Nick Simonov Reviewed-by: Oleksandr Andrushchenko Signed-off-by: Takashi Iwai commit 9406a49fd1f4379409ed87b29fdaa259b0441912 Author: Christoph Hellwig Date: Thu Aug 23 09:39:38 2018 +0200 dma-mapping: support non-coherent devices in dma_common_get_sgtable We can use the arch_dma_coherent_to_pfn hook to provide a ->get_sgtable implementation. Note that this isn't an endorsement of this interface (which is a horrible bad idea), but it is required to move arm64 over to the generic code without a loss of functionality. Signed-off-by: Christoph Hellwig commit 58b0440663ec11372befb8ead0ee7099d8878590 Author: Christoph Hellwig Date: Tue Sep 11 08:55:28 2018 +0200 dma-mapping: consolidate the dma mmap implementations The only functional differences (modulo a few missing fixes in the arch code) is that architectures without coherent caches need a hook to convert a virtual or dma address into a pfn, given that we don't have the kernel linear mapping available for the otherwise easy virt_to_page call. As a side effect we can support mmap of the per-device coherent area even on architectures not providing the callback, and we make previous dangerous default methods dma_common_mmap actually save for non-coherent architectures by rejecting it without the right helper. In addition to that we need a hook so that some architectures can override the protection bits when mmaping a dma coherent allocations. Signed-off-by: Christoph Hellwig Acked-by: Paul Burton # MIPS parts commit bc3ec75de5452db59b683487867ba562b950708a Author: Christoph Hellwig Date: Sat Sep 8 11:22:43 2018 +0200 dma-mapping: merge direct and noncoherent ops All the cache maintainance is already stubbed out when not enabled, but merging the two allows us to nicely handle the case where cache maintainance is required for some devices, but not others. Signed-off-by: Christoph Hellwig Acked-by: Paul Burton # MIPS parts commit f3ecc0ff0457eae93503792c6fc35921fa8a6204 Author: Christoph Hellwig Date: Sun Aug 19 14:53:20 2018 +0200 dma-mapping: move the dma_coherent flag to struct device Various architectures support both coherent and non-coherent dma on a per-device basis. Move the dma_noncoherent flag from the mips archdata field to struct device proper to prepare the infrastructure for reuse on other architectures. Signed-off-by: Christoph Hellwig Acked-by: Paul Burton Acked-by: Greg Kroah-Hartman commit 5748e1b35ba28368515d850e8087929a3a65e055 Author: Christoph Hellwig Date: Thu Aug 16 16:47:53 2018 +0300 MIPS: don't select DMA_MAYBE_COHERENT from DMA_PERDEV_COHERENT While both option select a form of conditional dma coherence they don't actually share any code in the implementation, so untangle them. Signed-off-by: Christoph Hellwig Acked-by: Paul Burton commit 684f7e91d3c72d555b82db13b2a48798e6097886 Author: Christoph Hellwig Date: Tue Sep 11 08:54:57 2018 +0200 dma-mapping: add the missing ARCH_HAS_SYNC_DMA_FOR_CPU_ALL declaration The patch adding the infrastructure failed to actually add the symbol declaration, oops.. Fixes: faef87723a ("dma-noncoherent: add a arch_sync_dma_for_cpu_all hook") Signed-off-by: Christoph Hellwig commit a3ceed87b07769fb80ce9dc6b604e515dba14c4b Author: He Zhe Date: Mon Sep 17 11:24:20 2018 +0800 dma-mapping: fix panic caused by passing empty cma command line argument early_cma does not check input argument before passing it to simple_strtoull. The argument would be a NULL pointer if "cma", without its value, is set in command line and thus causes the following panic. PANIC: early exception 0xe3 IP 10:ffffffffa3e9db8d error 0 cr2 0x0 [ 0.000000] CPU: 0 PID: 0 Comm: swapper Not tainted 4.19.0-rc3-yocto-standard+ #7 [ 0.000000] RIP: 0010:_parse_integer_fixup_radix+0xd/0x70 ... [ 0.000000] Call Trace: [ 0.000000] simple_strtoull+0x29/0x70 [ 0.000000] memparse+0x26/0x90 [ 0.000000] early_cma+0x17/0x6a [ 0.000000] do_early_param+0x57/0x8e [ 0.000000] parse_args+0x208/0x320 [ 0.000000] ? rdinit_setup+0x30/0x30 [ 0.000000] parse_early_options+0x29/0x2d [ 0.000000] ? rdinit_setup+0x30/0x30 [ 0.000000] parse_early_param+0x36/0x4d [ 0.000000] setup_arch+0x336/0x99e [ 0.000000] start_kernel+0x6f/0x4e6 [ 0.000000] x86_64_start_reservations+0x24/0x26 [ 0.000000] x86_64_start_kernel+0x6f/0x72 [ 0.000000] secondary_startup_64+0xa4/0xb0 This patch adds a check to prevent the panic. Signed-off-by: He Zhe Reviewed-by: Marek Szyprowski Cc: stable@vger.kernel.org Signed-off-by: Christoph Hellwig commit faa08325b429dabb7f55ff65a9a238e126537a49 Author: Nathan Chancellor Date: Wed Sep 19 21:05:23 2018 -0700 isdn/hisax: Remove unnecessary parenthesis Clang warns when more than one set of parentheses are used for single conditional statements: drivers/isdn/hisax/w6692.c:627:30: warning: equality comparison with extraneous parentheses [-Wparentheses-equality] if ((cs->dc.w6692.ph_state == W_L1IND_DRD)) { ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~ drivers/isdn/hisax/w6692.c:627:30: note: remove extraneous parentheses around the comparison to silence this warning if ((cs->dc.w6692.ph_state == W_L1IND_DRD)) { ~ ^ ~ drivers/isdn/hisax/w6692.c:627:30: note: use '=' to turn this equality comparison into an assignment if ((cs->dc.w6692.ph_state == W_L1IND_DRD)) { ^~ = 1 warning generated. Remove the parentheses to silence this warning. Reported-by: Nick Desaulniers Signed-off-by: Nathan Chancellor Signed-off-by: David S. Miller commit 713746bb2866838bad96da3965daaa6d87dce38b Author: YueHaibing Date: Thu Sep 20 02:41:30 2018 +0000 atl1: remove set but not used variable 'advertising' Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/ethernet/atheros/atlx/atl1.c: In function 'atl1_set_link_ksettings': drivers/net/ethernet/atheros/atlx/atl1.c:3280:6: warning: variable 'advertising' set but not used [-Wunused-but-set-variable] Signed-off-by: YueHaibing Signed-off-by: David S. Miller commit da2cfbd3e75675f19363a0f16c4234b462dd5bcc Author: YueHaibing Date: Thu Sep 20 02:04:38 2018 +0000 e1000: remove set but not used variable 'txb2b' Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/ethernet/intel/e1000/e1000_main.c: In function 'e1000_watchdog': drivers/net/ethernet/intel/e1000/e1000_main.c:2436:9: warning: variable 'txb2b' set but not used [-Wunused-but-set-variable] Signed-off-by: YueHaibing Signed-off-by: David S. Miller commit 684d777a3382da53eb6688b92f7626eb526be0a6 Author: zhong jiang Date: Thu Sep 20 09:56:05 2018 +0800 net: toshiba: remove a redundant local variable 'index_specified' The local variable 'index_specified' is never used after being assigned. hence it should be redundant adn can be removed. Signed-off-by: zhong jiang Signed-off-by: David S. Miller commit 23d9f5531c7c28546954b0bf332134a9b8a38c0a Author: Jakub Kicinski Date: Wed Sep 19 14:42:50 2018 -0700 nfp: provide a better warning when ring allocation fails NFP supports fairly enormous ring sizes (up to 256k descriptors). In commit 466271703867 ("nfp: use kvcalloc() to allocate SW buffer descriptor arrays") we have started using kvcalloc() functions to make sure the allocation of software state arrays doesn't hit the MAX_ORDER limit. Unfortunately, we can't use virtual mappings for the DMA region holding HW descriptors. In case this allocation fails instead of the generic (and fairly scary) warning/splat in the logs print a helpful message explaining what happened and suggesting how to fix it. Signed-off-by: Jakub Kicinski Reviewed-by: Dirk van der Merwe Signed-off-by: David S. Miller commit 806a81fcf6880c8592fae62cac82e850f37301b8 Author: Heiner Kallweit Date: Wed Sep 19 22:02:11 2018 +0200 r8169: remove duplicated RTL8169s PHY initialization steps Setting register 0x82 to value 01 is done a few lines before for all chip versions <= 06 anyway. And setting PHY register 0x0b to value 00 is done at the end of rtl8169s_hw_phy_config() already. So we can remove this. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 7a67e11d901e17c3222d226c345be555106faae6 Author: Heiner Kallweit Date: Wed Sep 19 22:00:24 2018 +0200 r8169: simplify RTL8169 PHY initialization PCI_LATENCY_TIMER is ignored on PCIe, therefore we have to do this for the PCI chips (version <= 06) only. Also we can move setting PCI_CACHE_LINE_SIZE. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit c8c618afc2b22067d6f37e2e41d9bba209fe0036 Author: zhong jiang Date: Wed Sep 19 22:30:49 2018 +0800 net: ibm: remove redundant local variables 'act_nr_of_entries' and 'act_pages' That local variable are never used after being assigned. hence it should be redundant and can be removed. Signed-off-by: zhong jiang Signed-off-by: David S. Miller commit c1f9a93d93a0fca526e37042f1b31e53cbb2d075 Author: zhong jiang Date: Wed Sep 19 22:23:15 2018 +0800 net: ibm: remove a redundant local variable 'k' The local variable 'k' is never used after being assigned. hence it should be redundant adn can be removed. Signed-off-by: zhong jiang Signed-off-by: David S. Miller commit 3ede0bbcdfc94ccdbe56bed4e66beb3f4f4f6b00 Author: Robert Shearman Date: Wed Sep 19 13:56:53 2018 +0100 ipv6: Allow the l3mdev to be a loopback There is no way currently for an IPv6 client connect using a loopback address in a VRF, whereas for IPv4 the loopback address can be added: $ sudo ip addr add dev vrfred 127.0.0.1/8 $ sudo ip -6 addr add ::1/128 dev vrfred RTNETLINK answers: Cannot assign requested address So allow ::1 to be configured on an L3 master device. In order for this to be usable ip_route_output_flags needs to not consider ::1 to be a link scope address (since oif == l3mdev and so it would be dropped), and ipv6_rcv needs to consider the l3mdev to be a loopback device so that it doesn't drop the packets. Signed-off-by: Robert Shearman Signed-off-by: Mike Manning Reviewed-by: David Ahern Signed-off-by: David S. Miller commit 1e6a4bc874db9489146edb78aea281f1cfafcee0 Merge: 0e0cc31f6999 32c7fbc8ffd7 Author: David S. Miller Date: Wed Sep 19 21:20:23 2018 -0700 Merge branch 'hns3-fixes' Salil Mehta says: ==================== Fixes, cleanups & minor additions to HNS3 driver This patch-set present some fixes, cleanups to the HNS3 PF and VF driver. ==================== Signed-off-by: David S. Miller commit 32c7fbc8ffd752c6aa05d2dd7c13b0f0aa00ddaa Author: Jian Shen Date: Wed Sep 19 18:29:58 2018 +0100 net: hns3: Fix parameter type for q_id in hclge_tm_q_to_qs_map_cfg() So far all the places calling hclge_tm_q_to_qs_map_cfg() are assigning an u16 type value to "q_id", and in the processing of hclge_tm_q_to_qs_map_cfg(), it also converts the "q_id" to le16. The max tqp number for pf can be more than 256, we should use "u16" to store the queue id, instead of "u8", which may cause data lost. Fixes: 848440544b41 ("net: hns3: Add support of TX Scheduler & Shaper to HNS3 driver") Signed-off-by: Jian Shen Signed-off-by: Peng Li Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit d9f28fc23d544f673d087b00a6c7132d972f89ea Author: Jian Shen Date: Wed Sep 19 18:29:57 2018 +0100 net: hns3: Fix client initialize state issue when roce client initialize failed When roce is loaded before nic, the roce client will not be initialized until nic client is initialized, but roce init flag is set before it. Furthermore, in this case of nic initialized success and roce failed, the nic init flag is not set, and roce init flag is not cleared. This patch fixes it by set init flag only after the client is initialized successfully. Fixes: e2cb1dec9779 ("net: hns3: Add HNS3 VF HCL(Hardware Compatibility Layer) Support") Fixes: 46a3df9f9718 ("net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support") Signed-off-by: Jian Shen Signed-off-by: Peng Li Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit 49dd80541c75c2f21c28bbbdd958e993b55bf97b Author: Jian Shen Date: Wed Sep 19 18:29:56 2018 +0100 net: hns3: Clear client pointer when initialize client failed or unintialize finished If initialize client failed or finish uninitializing client, we should clear the client pointer. It may cause unexpected result when use uninitialized client. Meanwhile, we also should check whether client exist when uninitialize it. Fixes: 46a3df9f9718 ("net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support") Signed-off-by: Jian Shen Signed-off-by: Peng Li Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit 37dc9cdbdc1bd64bd3b6ea285a9c2e811404dc82 Author: Jian Shen Date: Wed Sep 19 18:29:55 2018 +0100 net: hns3: Fix cmdq registers initialization issue for vf According to hardware's description, the head pointer register should be written before the tail pointer register while initializing the vf command queue. Otherwise, it may trigger an interrupt even though there is no command received. Fixes: fedd0c15d288 ("net: hns3: Add HNS3 VF IMP(Integrated Management Proc) cmd interface") Signed-off-by: Jian Shen Signed-off-by: Peng Li Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit fd8133148eb6a733f9cfdaecd4d99f378e21d582 Author: Fuyun Liang Date: Wed Sep 19 18:29:54 2018 +0100 net: hns3: Fix for setting speed for phy failed problem The function of genphy_read_status is that reading phy information from HW and using these information to update SW variable. If user is using ethtool to setting the speed of phy and service task is calling by hclge_get_mac_phy_link, the result of speed setting is uncertain. Because ethtool cmd will modified phydev and hclge_get_mac_phy_link also will modified phydev. Because phy state machine will update phy link periodically, we can just use phydev->link to check the link status. This patch removes function call of genphy_read_status. To ensure accuracy, this patch adds a phy state check. If phy state is not PHY_RUNNING, we consider link is down. Because in some scenarios, phydev->link may be link up, but phy state is not PHY_RUNNING. This is just an intermediate state. In fact, the link is not ready yet. Fixes: 46a3df9f9718 ("net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support") Signed-off-by: Fuyun Liang Signed-off-by: Peng Li Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit 582d37bbb613b8ad86bf82845d3a74a02a5a0fa1 Author: Peng Li Date: Wed Sep 19 18:29:53 2018 +0100 net: hns3: Check hdev state when getting link status By default, HW link status is up. If hclge_update_link_status is called before net up, driver will print "link up". It is not suitable. hdev state check is needed when getting link status. Fixes: 46a3df9f9718 ("net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support") Fixes: e2cb1dec9779 ("net: hns3: Add HNS3 VF HCL(Hardware Compatibility Layer) Support") Signed-off-by: Fuyun Liang Signed-off-by: Peng Li Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit 2f7e489611bc685b8e00aba436032a8aac6cac57 Author: Fuyun Liang Date: Wed Sep 19 18:29:52 2018 +0100 net: hns3: Set STATE_DOWN bit of hdev state when stopping net We clear STATE_DOWN bit of hdev state when starting net, but do not set it again when stopping net. It causes that the net is down, but hdev state is still up. STATE_DOWN bit of hdev state should be set when stopping net. Fixes: 46a3df9f9718 ("net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support") Fixes: e2cb1dec9779 ("net: hns3: Add HNS3 VF HCL(Hardware Compatibility Layer) Support") Signed-off-by: Fuyun Liang Signed-off-by: Peng Li Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit 26483246b5481af56facb55dac1dc05d7443c124 Author: Xi Wang Date: Wed Sep 19 18:29:51 2018 +0100 net: hns3: Add support for hns3_nic_netdev_ops.ndo_do_ioctl This patch adds the .ndo_do_ioctl net_device_ops operation to support the PHY MII ioctl for PF driver. Fixes: 76ad4f0ee747 ("net: hns3: Add support of HNS3 Ethernet Driver for hip08 SoC") Signed-off-by: Xi Wang Signed-off-by: Peng Li Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit 3152fcc69ae0636023c0a7099242614357d15a9e Author: Peng Li Date: Wed Sep 19 18:29:50 2018 +0100 net: hns3: Remove packet statistics of public All pf have permission to read packet statistics of public in hardware, but the read operation will clear registers which cause statistical inaccuracy. This patch removes all packet statistics of public. Signed-off-by: Junxin Chen Signed-off-by: Peng Li Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit 799997a307ff65429ebca88d13d6ccb934df737a Author: Peng Li Date: Wed Sep 19 18:29:49 2018 +0100 net: hns3: Remove tx budget to clean more TX descriptors in a napi The the actual Tx work is minimal, driver can clean up as more Tx descriptors as possible in a irq. Signed-off-by: Peng Li Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit 932d1252aded755bfd6f53183ab6211f711c6435 Author: Peng Li Date: Wed Sep 19 18:29:48 2018 +0100 net: hns3: Add unlikely for buf_num check This patch adds unlikely for buf_num check. Signed-off-by: Peng Li Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit 874bff0ba6cf884dde0220bfa8945f164e6da1d1 Author: Peng Li Date: Wed Sep 19 18:29:47 2018 +0100 net: hns3: Add default irq affinity All irq will float to cpu0 if do not set irq affinity. This patch adds default irq affinity in hns3 driver, users can also change the irq affinity in OS. Signed-off-by: Peng Li Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit 0e0cc31f6999df18bb5cfd0bd83c892ed5633975 Author: YueHaibing Date: Wed Sep 19 19:21:32 2018 +0800 net: sun: 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, but the implementation in this driver returns an 'int'. Found by coccinelle. Signed-off-by: YueHaibing Acked-by: Shannon Nelson Signed-off-by: David S. Miller commit fe72352e37ae8478f4c97975a9831f0c50f22e73 Author: YueHaibing Date: Wed Sep 19 18:50:17 2018 +0800 net: amd: 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: David S. Miller commit 0c13b8d1aee87c35a2fbc1d85a1f766227cf54b5 Author: YueHaibing Date: Wed Sep 19 18:45:12 2018 +0800 net: broadcom: 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: David S. Miller commit 81255af8d9d5565004792c295dde49344df450ca Author: YueHaibing Date: Wed Sep 19 18:32:40 2018 +0800 net: 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: David S. Miller commit bacade822524e02f662d88f784d2ae821a5546fb Author: YueHaibing Date: Wed Sep 19 18:23:39 2018 +0800 net: toshiba: 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: David S. Miller commit f03508ce3f9650148262c176e0178413e16c902b Author: YueHaibing Date: Wed Sep 19 18:19:26 2018 +0800 net: marvell: 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: David S. Miller commit db161d930a194b05efa0129978d7ec5d6dea6fb5 Merge: 02f7f61e5af2 09b8a45eda54 Author: David S. Miller Date: Wed Sep 19 21:15:02 2018 -0700 Merge branch 'phylink-ensure-the-carrier-is-off-when-starting-phylink' Antoine Tenart says: ==================== net: phy: phylink: ensure the carrier is off when starting phylink Following the discussion we had regarding the phylink issue related to the carrier link state not being off when starting phylink, I sent a fix patch a few days ago for the PPv2 driver: https://lkml.org/lkml/2018/9/14/633 The idea was to send a patch which could go to the stable branches, but a better solution would be to directly call netif_carrier_off() from within phylink_start(). This is the aim of this series. ==================== Signed-off-by: David S. Miller commit 09b8a45eda546d2d93ee75c9899aba22c4dcb814 Author: Antoine Tenart Date: Wed Sep 19 11:39:33 2018 +0200 net: mvneta: do not explicitly set the carrier state in open This patch removes the explicit call to netif_carrier_off() in mvneta_open() as this is already handled in phylink_start(). Signed-off-by: Antoine Tenart Signed-off-by: David S. Miller commit f8f5f588bb9b2f7fd7b019c125028517921d61e7 Author: Antoine Tenart Date: Wed Sep 19 11:39:32 2018 +0200 net: mvpp2: do not explicitly set the carrier state in open This patch removes the explicit call to netif_carrier_off() in PPv2's open() path, as this is now handled in phylink_start(). Signed-off-by: Antoine Tenart Signed-off-by: David S. Miller commit aeeb2e8fdefdd5d257a1446351c70cb3df540199 Author: Antoine Tenart Date: Wed Sep 19 11:39:31 2018 +0200 net: phy: phylink: ensure the carrier is off when starting phylink Phylink made an assumption about the carrier state being down when calling phylink_start(). If this assumption isn't satisfied, the internal phylink state could misbehave and a net device could end up not being functional. This patch fixes this by explicitly calling netif_carrier_off() in phylink_start(). Signed-off-by: Antoine Tenart Acked-by: Russell King Signed-off-by: David S. Miller commit 0320ac5188eab5c6e8b92b110d1eae967ac272d2 Merge: 795241040a91 6e1637c91742 Author: Dave Airlie Date: Thu Sep 20 14:12:01 2018 +1000 Merge tag 'du-next-20180914' of git://linuxtv.org/pinchartl/media into drm-next R-Car DU changes for v4.20 The pull request mostly contains updates to the R-Car DU driver, notably support for interlaced modes on Gen3 hardware, support for the LVDS output on R8A77980, and a set of miscellaneous bug fixes. There are also two SPDX conversion patches for the drm shmobile and panel-lvds drivers, as well as an update to MAINTAINERS to add Kieran Bingham as a co-maintainer for the DU driver. Signed-off-by: Dave Airlie From: Laurent Pinchart Link: https://patchwork.freedesktop.org/patch/msgid/3273568.LdoAI77IYW@avalon commit 02f7f61e5af2fa4748d610b8e4b1af70a44dcbe3 Merge: f543305da9b5 1068549c2ad2 Author: David S. Miller Date: Wed Sep 19 21:09:55 2018 -0700 Merge branch 'net-mvpp2-improve-the-interrupt-usage' Antoine Tenart says: ==================== net: mvpp2: improve the interrupt usage This series aims to improve the interrupts descriptions and usage in the Marvell PPv2 driver. - Before the series interrupts were named after their s/w usage, which in fact can be configured. The series rename all those interrupts and add a description of the ones left over. - In PPv2 the interrupts are mapped to vectors. Those vectors were directly mapped to a given CPU, and per-cpu accesses were done. While this worked on our cases, the registers accesses mapped to the vectors are not actually linked to a given CPU. They instead are linked to what is called a "s/w thread". The series modify this so that the s/w threads are used instead of the CPU numbers, by adding an indirection. This means we now can have systems with more CPUs than s/w threads. This is based on today's net-next, and was tested on various boards using both versions of the PPv2 engine. Two more patches will be coming, to update the device trees describing a PPv2 engine. The patches are ready, but will go through a different tree. I'll send them once this series will be accepted. This is not an issue as the PPv2 driver keeps the dt bindings backward compatibility. ==================== Signed-off-by: David S. Miller commit 1068549c2ad2821a784c6a2d46461c3d78cf0093 Author: Antoine Tenart Date: Wed Sep 19 11:27:11 2018 +0200 net: mvpp2: rename mvpp2_percpu function to mvpp2_thread As the mvpp2_percpu_read/write/... functions aren't really per-cpu but per s/w thread, rename them to include 'thread' instead of 'percpu'. This is a cosmetic patch. Signed-off-by: Antoine Tenart Signed-off-by: David S. Miller commit e531f76757eb9f3314957cee24e6e9a0fa4aa98c Author: Antoine Tenart Date: Wed Sep 19 11:27:10 2018 +0200 net: mvpp2: handle cases where more CPUs are available than s/w threads The Marvell PPv2 network controller has 9 internal threads. The driver works fine when there are less CPUs available than threads. This isn't true if more CPUs are available. As this is a valid use case, handle this particular case. Signed-off-by: Antoine Tenart Signed-off-by: David S. Miller commit 074c74dfcb33757d893598181914ef7bc703fa9d Author: Antoine Tenart Date: Wed Sep 19 11:27:09 2018 +0200 net: mvpp2: map the CPUs to threads This patch maps all uses of the CPU to threads. All this_cpu calls are replaced, and all smp_processor_id() calls are wrapped into the indirection. Signed-off-by: Antoine Tenart Signed-off-by: David S. Miller commit 543ec376e3cb98a5e0343b29c1d0f00546b68dc6 Author: Antoine Tenart Date: Wed Sep 19 11:27:08 2018 +0200 net: mvpp2: do not use the CPU number to access the per-thread registers This patch reworks the Marvell PPv2 driver to stop using directly the CPU number to access per-thread registers. Signed-off-by: Antoine Tenart Signed-off-by: David S. Miller commit 1627442721f1b05b16fa33adeda214dc8659675c Author: Antoine Tenart Date: Wed Sep 19 11:27:07 2018 +0200 net: mvpp2: make mvpp2_read_relaxed static In the Marvell PPv2 driver the mvpp2_read_relaxed function is only used in a single file. Make it static and remove its prototype from the header. Signed-off-by: Antoine Tenart Signed-off-by: David S. Miller commit ecfed8d9b387b43449fe7de0727bcde217ac4577 Author: Antoine Tenart Date: Wed Sep 19 11:27:06 2018 +0200 net: mvpp2: make the per-cpu helpers static The Marvell PPv2 driver has per-cpu functions. As they only are used in the main file, make them static and remove their prototype from the header. Signed-off-by: Antoine Tenart Signed-off-by: David S. Miller commit 850623b3823aa63a6191dcb40cb9ffe6f4704b97 Author: Antoine Tenart Date: Wed Sep 19 11:27:05 2018 +0200 net: mvpp2: cpu should always be unsigned Updates the PPv2 driver so that all CPU variables are unsigned, as it makes no sense to have a negative CPU number. This patch is cosmetic. Signed-off-by: Antoine Tenart Signed-off-by: David S. Miller commit 70afb58e9856a70ff9e45760af2d0ebeb7c46ac2 Author: Antoine Tenart Date: Wed Sep 19 11:27:04 2018 +0200 net: mvpp2: fix the number of queues per cpu for PPv2.2 The Marvell PPv2.2 engine only has 8 Rx queues per CPU, while PPv2.1 has 16 of them. This patch updates the code so that the Rx queues mask width is selected given the version of the network controller used. Signed-off-by: Antoine Tenart Signed-off-by: David S. Miller commit fd4a1056884e191948550a674072ba78b19f420b Author: Antoine Tenart Date: Wed Sep 19 11:27:03 2018 +0200 net: mvpp2: do not update the queue mode while probing This patch updates the probing function so that the queue mode isn't updated while probing, as the driver would silently end up using a configuration not wanted by the user. The patch adds an extra check to validate the chosen queue mode instead, and the driver will fail to probe if the configuration is invalid. Signed-off-by: Antoine Tenart Signed-off-by: David S. Miller commit 930e1f5606a428c0e16de378d2dd5b151ed880b0 Author: Antoine Tenart Date: Wed Sep 19 11:27:02 2018 +0200 Documentation/bindings: net: marvell-pp2: update the IRQs description This patch updates the interrupts part of the Marvell PPv2 driver bindings documentation, to keep it in sync with the driver. Signed-off-by: Antoine Tenart Signed-off-by: David S. Miller commit a9aac38599ec635da458a8a87a3af11c85c59548 Author: Antoine Tenart Date: Wed Sep 19 11:27:01 2018 +0200 net: mvpp2: rename the IRQs to match the hardware This patch renames the IRQs in the Marvell PPv2 driver as their current names match the way they are used in software. But this will change in the future, and those IRQs have nothing to do with Rx/Tx interrupts (this can be configured). The new binding also describe more interrupts as some where left out. The old binding support is kept for backward compatibility. Signed-off-by: Antoine Tenart Signed-off-by: David S. Miller commit cf55ace48e445cb4a4cbe93f74b1cff91345b7d4 Author: Antoine Tenart Date: Wed Sep 19 11:27:00 2018 +0200 net: mvpp2: increase the number of s/w threads to 9 This patch sets the number of s/w threads to 9, its maximum value, instead of 8. This is not a fix as only 4 of the s/w threads were used so far, but more could be used in the future. Signed-off-by: Antoine Tenart Signed-off-by: David S. Miller commit f543305da9b5a5efaf6fa61606e8bbc8977f406d Author: Kazuya Mizuguchi Date: Wed Sep 19 10:06:21 2018 +0200 ravb: remove tx buffer addr 4byte alilgnment restriction for R-Car Gen3 This patch sets from two descriptor to one descriptor because R-Car Gen3 does not have the 4 bytes alignment restriction of the transmission buffer. Signed-off-by: Kazuya Mizuguchi Signed-off-by: Simon Horman Signed-off-by: David S. Miller commit f46f33a6790c35f71ee95d47aef5fbc7590d7218 Merge: 822143acf94f e8cfd9d6c772 Author: David S. Miller Date: Wed Sep 19 21:06:46 2018 -0700 Merge branch 'phy_stop-synchronous' Heiner Kallweit says: ==================== net: phy: make phy_stop() synchronous There have been few not that successful attempts in the past to make phy_stop() a synchronous call instead of just changing the state. Patch 1 of this series addresses an issue which prevented this change. At least for me it works fine now. Would appreciate if Geert could re-test as well that suspend doesn't throw an error. ==================== Signed-off-by: David S. Miller commit e8cfd9d6c7727a067b38dbe7655ca02377fdb301 Author: Heiner Kallweit Date: Tue Sep 18 21:56:32 2018 +0200 net: phy: call state machine synchronously in phy_stop phy_stop() may be called e.g. when suspending, therefore all needed actions should be performed synchronously. Therefore add a synchronous call to the state machine. Signed-off-by: Heiner Kallweit Tested-by: Geert Uytterhoeven Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 124eee3f6955f7aa19b9e6ff5c9b6d37cb3d1e2c Author: Heiner Kallweit Date: Tue Sep 18 21:55:36 2018 +0200 net: linkwatch: add check for netdevice being present to linkwatch_do_dev When bringing down the netdevice (incl. detaching it) and calling netif_carrier_off directly or indirectly the latter triggers an asynchronous linkwatch event. This linkwatch event eventually may fail to access chip registers in the ndo_get_stats/ndo_get_stats64 callback because the device isn't accessible any longer, see call trace in [0]. To prevent this scenario don't check for IFF_UP only, but also make sure that the netdevice is present. [0] https://lists.openwall.net/netdev/2018/03/15/62 Signed-off-by: Heiner Kallweit Tested-by: Geert Uytterhoeven Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 822143acf94f647aba7ed2e20e0e629485c1e43d Merge: 18522108d53c a90546e83a11 Author: David S. Miller Date: Wed Sep 19 20:58:05 2018 -0700 Merge branch 'net-Use-FIELD_SIZEOF-directly-instead-of-reimplementing-its-function' zhong jiang says: ==================== net: Use FIELD_SIZEOF directly instead of reimplementing its function The issue is detected with the help of Coccinelle. ==================== Signed-off-by: David S. Miller commit a90546e83a117502c36173a2809db5d00c9ac87d Author: zhong jiang Date: Wed Sep 19 19:32:14 2018 +0800 net: ti: Use FIELD_SIZEOF directly instead of reimplementing its function FIELD_SIZEOF is defined as a macro to calculate the specified value. Therefore, We prefer to use the macro rather than calculating its value. Signed-off-by: zhong jiang Signed-off-by: David S. Miller commit e208cd5e41b400d90d5ba71981c7877e437671cc Author: zhong jiang Date: Wed Sep 19 19:32:13 2018 +0800 net: qede: Use FIELD_SIZEOF directly instead of reimplementing its function FIELD_SIZEOF is defined as a macro to calculate the specified value. Therefore, We prefer to use the macro rather than calculating its value. Signed-off-by: zhong jiang Signed-off-by: David S. Miller commit f195efb47d937bec8a2efb8e35a8ccf08dbbf777 Author: zhong jiang Date: Wed Sep 19 19:32:12 2018 +0800 net: core: Use FIELD_SIZEOF directly instead of reimplementing its function FIELD_SIZEOF is defined as a macro to calculate the specified value. Therefore, We prefer to use the macro rather than calculating its value. Signed-off-by: zhong jiang Signed-off-by: David S. Miller commit cb205a817444f4838547e9f19438b96fdc32d5b6 Author: zhong jiang Date: Wed Sep 19 19:32:11 2018 +0800 net: sched: Use FIELD_SIZEOF directly instead of reimplementing its function FIELD_SIZEOF is defined as a macro to calculate the specified value. Therefore, We prefer to use the macro rather than calculating its value. Signed-off-by: zhong jiang Signed-off-by: David S. Miller commit 86c85e1fc4ca1f4f8bfa1c2c706b173bd460b8a1 Author: zhong jiang Date: Wed Sep 19 19:32:10 2018 +0800 net: iucv: Use FIELD_SIZEOF directly instead of reimplementing its function FIELD_SIZEOF is defined as a macro to calculate the specified value. Therefore, We prefer to use the macro rather than calculating its value. Signed-off-by: zhong jiang Signed-off-by: David S. Miller commit 18522108d53c5d34d270ecdd693d2f1fa1ed845c Merge: b9d957c5b109 a7ea49afcc88 Author: David S. Miller Date: Wed Sep 19 20:35:37 2018 -0700 Merge tag 'batadv-next-for-davem-20180919' 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 - Inform users about debugfs interface deprecation, by Sven Eckelmann - Implement tracing, planned to replace debugfs log messages, by Sven Eckelmann - Move OGM rebroadcasts to per interface struct, by Sven Eckelmann - Enable LockLess TX to increase throughput, by Sven Eckelmann ==================== Signed-off-by: David S. Miller commit 846311ae68f3c78365ebf3dff505c99e7da861cf Author: Frank Min Date: Fri Apr 27 03:45:50 2018 +0800 drm/amdgpu: Exclude MM engines for vega20 virtual device Temporary disable UVD/VCE block if is virtual device Signed-off-by: Frank Min Signed-off-by: Xiangliang Yu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit a2045ee6692be2c50502d966089e5df4d799d236 Author: Frank Min Date: Fri Apr 27 03:44:11 2018 +0800 drm/amdgpu: add vega20 sriov capability detection Add sriov capability detection for vega20, then can check if device is virtual device. Signed-off-by: Frank Min Signed-off-by: Xiangliang Yu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 8250a9b43b257f05c2aba6e8367fa636b630b0a2 Author: Huacai Chen Date: Thu Sep 20 09:11:03 2018 +0800 MIPS/PCI: Let Loongson-3 pci_ops access extended config space Original Loongson-3 pci_ops can only access standard pci config space, this patch let it be able to access extended pci config space. Signed-off-by: Huacai Chen [paul.burton@mips.com: Tweaks to fix checkpatch warnings, reverse xmas tree] Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/20707/ Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@linux-mips.org Cc: Fuxin Zhang Cc: Zhangjin Wu Cc: Huacai Chen commit 1c3d7b0364f0730a8a64801dd07a589bbac06671 Author: Baolin Wang Date: Mon Sep 17 13:03:31 2018 -0700 power: supply: Add Spreadtrum SC2731 charger support This patch adds the SC2731 PMIC switch charger support. Signed-off-by: Baolin Wang Reviewed-by: Krzysztof Kozlowski Signed-off-by: Sebastian Reichel commit 8d1f326ab8edbb15cb90ffe43fc9a0d7add97291 Author: Baolin Wang Date: Mon Sep 17 13:03:30 2018 -0700 dt-bindings: power: Add Spreadtrum SC2731 charger documentation This patch adds the binding documentation for Spreadtrum SC2731 charger device. Signed-off-by: Baolin Wang Reviewed-by: Krzysztof Kozlowski Signed-off-by: Sebastian Reichel commit 079cdff3d0a09c5da10ae1be35def7a116776328 Author: Andreas Kemnade Date: Mon Sep 17 07:00:07 2018 +0200 power: supply: twl4030_charger: disable eoc interrupt on linear charge This avoids getting woken up from suspend after power interruptions when the bci wrongly thinks the battery is full just because of input current going low because of low input power Signed-off-by: Andreas Kemnade Signed-off-by: Sebastian Reichel commit 8314c212f995bc0d06b54ad02ef0ab4089781540 Author: Andreas Kemnade Date: Mon Sep 17 07:20:35 2018 +0200 power: supply: twl4030_charger: fix charging current out-of-bounds the charging current uses unsigned int variables, if we step back if the current is still low, we would run into negative which means setting the target to a huge value. Better add checks here. Signed-off-by: Andreas Kemnade Signed-off-by: Sebastian Reichel commit 795241040a9102b7dc925714f6a57ec92d84932e Merge: 2dc7bad71cd3 e884818cc0ed Author: Dave Airlie Date: Thu Sep 20 10:14:59 2018 +1000 Merge tag 'drm-misc-next-2018-09-19' of git://anongit.freedesktop.org/drm/drm-misc into drm-next drm-misc-next for 4.20: UAPI Changes: - None Cross-subsystem Changes: - None Core Changes: - Allow drivers to disable features with per-device granularity (Ville) - Use EOPNOTSUPP when iface/feature is unsupported instead of EINVAL/errno soup (Chris) - Simplify M/N DP quirk by using constant N to limit size of M/N (Shawn) - add quirk for LG LP140WF6-SPM1 eDP panel (Shawn) Driver Changes: - i915/amdgpu: Disable DRIVER_ATOMIC for older/unsupported devices (Ville) - sun4i: add support for R40 HDMI PHY (Icenowy) Cc: Ville Syrjälä Cc: Chris Wilson Cc: Icenowy Zheng Cc: Lee, Shawn C Signed-off-by: Dave Airlie From: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20180919200218.GA186644@art_vandelay commit a7d10cf3e4e3e308da01462a1ef8008233ee523d Author: Sahitya Tummala Date: Wed Sep 19 14:18:47 2018 +0530 f2fs: add new idle interval timing for discard and gc paths This helps to control the frequency of submission of discard and GC requests independently, based on the need. Suggested-by: Chao Yu Signed-off-by: Sahitya Tummala Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit c36d5a6c74e7f1529f1af0cf39d3ecaa46c52e83 Author: Rob Herring Date: Thu Sep 13 08:58:55 2018 -0500 scripts/dtc: Add yamltree.c to dtc sources dtc has a new source file, yamltree.c, that needs to be copied when syncing dtc sources. Signed-off-by: Rob Herring commit 53dd9dce6979bc54d64a3a09a2fb20187a025be7 Author: Rob Herring Date: Thu Sep 13 15:16:22 2018 -0500 libfdt: Ensure INT_MAX is defined in libfdt_env.h The next update of libfdt has a new dependency on INT_MAX. Update the instances of libfdt_env.h in the kernel to either include the necessary header with the definition or define it locally. Cc: Russell King Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: linux-arm-kernel@lists.infradead.org Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Rob Herring commit 62287dce5d0ee207b6a09a0a1abd06b61cee1094 Author: Rob Herring Date: Thu Sep 13 14:38:56 2018 -0500 of/unittest: Fix I2C bus unit-address error dtc has new checks for I2C buses. Fix the warnings in unit-addresses in the unittests. drivers/of/unittest-data/testcases.dtb: Warning (i2c_bus_reg): /testcase-data/overlay-node/test-bus/i2c-test-bus/test-unittest14/i2c@0/test-mux-dev: I2C bus unit address format error, expected "20" drivers/of/unittest-data/overlay_15.dtb: Warning (i2c_bus_reg): /fragment@0/__overlay__/test-unittest15/i2c@0/test-mux-dev: I2C bus unit address format error, expected "20" Cc: Frank Rowand Signed-off-by: Rob Herring commit 362ce2b8e52be97dcc3986ce6f8dbe9e7a84e1a0 Merge: 00b7d1cf4667 e54192b48da7 Author: Rob Herring Date: Wed Sep 19 15:10:03 2018 -0700 Merge branch 'dt/linus' into HEAD commit cdd6ed90cdb6c2fd982909501f0a109274147fb4 Author: Viresh Kumar Date: Wed Sep 12 12:35:19 2018 +0530 OPP: Use a single mechanism to free the OPP table Currently there are two separate ways to free the OPP table based on how it is created in the first place. We call _dev_pm_opp_remove_table() to free the static and/or dynamic OPP, OPP list devices, etc. This is done for the case where the OPP table is added while initializing the OPPs, like via the path dev_pm_opp_of_add_table(). We also call dev_pm_opp_put_opp_table() in some cases which eventually frees the OPP table structure once the reference count reaches 0. This is used by the first case as well as other cases like dev_pm_opp_set_regulators() where the OPPs aren't necessarily initialized at this point. This whole thing is a bit unclear and messy and obstruct any further cleanup/fixup of OPP core. This patch tries to streamline this by keeping a single path for OPP table destruction, i.e. dev_pm_opp_put_opp_table(). All the cleanup happens in _opp_table_kref_release() now after the reference count reaches 0. _dev_pm_opp_remove_table() is removed as it isn't required anymore. We don't drop the reference to the OPP table after creating it from _of_add_opp_table_v{1|2}() anymore and the same is dropped only when we try to remove them. Tested-by: Niklas Cassel Signed-off-by: Viresh Kumar commit 2a4eb7358aba6beff7fa23f028c733310756e525 Author: Viresh Kumar Date: Thu Sep 13 13:14:36 2018 +0530 OPP: Don't remove dynamic OPPs from _dev_pm_opp_remove_table() Only one platform was depending on this feature and it is already updated now. Stop removing dynamic OPPs from _dev_pm_opp_remove_table(). This simplifies lot of paths and removes unnecessary parameters. Tested-by: Niklas Cassel Signed-off-by: Viresh Kumar commit 883071c4bd9a6e45bf0b5e45575d110eaeb2e6d0 Author: Viresh Kumar Date: Wed Sep 12 12:25:22 2018 +0530 cpufreq: mvebu: Remove OPPs using dev_pm_opp_remove() dev_pm_opp_cpumask_remove_table() is going to change in the next commit and will not remove dynamic OPPs automatically. They must be removed with a call to dev_pm_opp_remove(). Reviewed-by: Gregory CLEMENT Signed-off-by: Viresh Kumar commit d0e8ae6c26da7b9436775dfd9768d7a821ed47b7 Author: Viresh Kumar Date: Tue Sep 11 11:14:11 2018 +0530 OPP: Create separate kref for static OPPs list The static OPPs don't always get freed with the OPP table, it can happen before that as well. For example, if the OPP table is first created using helpers like dev_pm_opp_set_supported_hw() and the OPPs are created at a later point. Now when the OPPs are removed, the OPP table stays until the time dev_pm_opp_put_supported_hw() is called. Later patches will streamline the freeing of OPP table and that requires the static OPPs to get freed with help of a separate kernel reference. This patch prepares for that by creating a separate kref for static OPPs list. Tested-by: Niklas Cassel Signed-off-by: Viresh Kumar commit 0ad8c623907c27f4b8572d36c4ba73ea103e3108 Author: Viresh Kumar Date: Thu Aug 2 14:23:09 2018 +0530 OPP: Don't take OPP table's kref for static OPPs The reference count is only required to be incremented for every call that may lead to adding the OPP table. For static OPPs the same should be done from the parent routine which adds all static OPPs together and so only one refcount for all static OPPs. Update code to reflect that. The refcount is incremented every time a dynamic OPP is created (as that can lead to creating the OPP table) and the same is dropped when the OPP is removed. Tested-by: Niklas Cassel Signed-off-by: Viresh Kumar commit f06ed90e7051a3a50c2172001c86ff9645e5c2ba Author: Viresh Kumar Date: Thu Jun 14 12:04:43 2018 +0530 OPP: Parse OPP table's DT properties from _of_init_opp_table() Parse the DT properties present in the OPP table from _of_init_opp_table(), which is a dedicated routine for DT parsing. Minor relocation of helpers is required for this. It is possible now for _managed_opp() to return a partially initialized OPP table if the OPP table is created via the helpers like dev_pm_opp_set_supported_hw() and we need another flag to indicate if the static OPP are already parsed or not to make sure we don't incorrectly skip initializing the static OPPs. Tested-by: Niklas Cassel Signed-off-by: Viresh Kumar commit eb7c8743d6cf489e30091e6656fd4d3306621e9a Author: Viresh Kumar Date: Wed Sep 5 16:17:14 2018 +0530 OPP: Pass index to _of_init_opp_table() This is a preparatory patch required for the next commit which will start using OPP table's node pointer in _of_init_opp_table(), which requires the index in order to read the OPP table's phandle. This commit adds the index argument in the call chains in order to get it delivered to _of_init_opp_table(). Tested-by: Niklas Cassel Signed-off-by: Viresh Kumar commit 3d2556992a878a2210d3be498416aee39e0c32aa Author: Viresh Kumar Date: Fri Aug 3 07:05:21 2018 +0530 OPP: Protect dev_list with opp_table lock The dev_list needs to be protected with a lock, else we may have simultaneous access (addition/removal) to it and that would be racy. Extend scope of the opp_table lock to protect dev_list as well. Tested-by: Niklas Cassel Signed-off-by: Viresh Kumar commit 404b1369ea26f598b96ae4d3183262a879703cfe Author: Viresh Kumar Date: Thu Sep 13 13:09:27 2018 +0530 OPP: Don't try to remove all OPP tables on failure dev_pm_opp_of_cpumask_add_table() creates the OPP table for all CPUs present in the cpumask and on errors it should revert all changes it has done. It actually is doing a bit more than that. On errors, it tries to free all the OPP tables, even the one it hasn't created yet. This may also end up freeing the OPP tables which were created from separate path, like dev_pm_opp_set_supported_hw(). Reported-and-tested-by: Niklas Cassel Signed-off-by: Viresh Kumar commit 2fbb8670b4ff4454f1c0de510f788d737edc4b90 Author: Viresh Kumar Date: Tue Sep 11 11:14:34 2018 +0530 OPP: Free OPP table properly on performance state irregularities The OPP table was freed, but not the individual OPPs which is done from _dev_pm_opp_remove_table(). Fix it by calling _dev_pm_opp_remove_table() as well. Cc: 4.18 # v4.18 Fixes: 3ba98324e81a ("PM / OPP: Get performance state using genpd helper") Tested-by: Niklas Cassel Signed-off-by: Viresh Kumar commit 2dfd184abd38fd72d80715fa8b00c9de78490200 Author: Willem de Bruijn Date: Tue Sep 18 16:20:18 2018 -0400 flow_dissector: fix build failure without CONFIG_NET If boolean CONFIG_BPF_SYSCALL is enabled, kernel/bpf/syscall.c will call flow_dissector functions from net/core/flow_dissector.c. This causes this build failure if CONFIG_NET is disabled: kernel/bpf/syscall.o: In function `__x64_sys_bpf': syscall.c:(.text+0x3278): undefined reference to `skb_flow_dissector_bpf_prog_attach' syscall.c:(.text+0x3310): undefined reference to `skb_flow_dissector_bpf_prog_detach' kernel/bpf/syscall.o:(.rodata+0x3f0): undefined reference to `flow_dissector_prog_ops' kernel/bpf/verifier.o:(.rodata+0x250): undefined reference to `flow_dissector_verifier_ops' Analogous to other optional BPF program types in syscall.c, add stubs if the relevant functions are not compiled and move the BPF_PROG_TYPE definition in the #ifdef CONFIG_NET block. Fixes: d58e468b1112 ("flow_dissector: implements flow dissector BPF hook") Reported-by: Randy Dunlap Signed-off-by: Willem de Bruijn Acked-by: Randy Dunlap # build-tested Acked-by: Yonghong Song Signed-off-by: Daniel Borkmann commit b00a92c8f2cae4ea8c84ddae9b9ba5daeb9f327f Author: liuyixian Date: Mon Sep 3 17:18:14 2018 +0800 RDMA/hns: Move all prints out of irq handle It will trigger unnecessary interrupts caused by time out if prints inside aeq handle under some configurations. Thus, move all prints out of aeq handle to work queue. Signed-off-by: liuyixian Signed-off-by: Jason Gunthorpe commit e5264c433c8094d1723a011e1749bafcdac61beb Author: zhong jiang Date: Fri Aug 17 10:24:06 2018 +0800 gpu: do not double put device node in zx_drm_probe for_each_available_child_of_node will get and put the node properly, the following of_node_put will lead to the double put. So just remove it. Signed-off-by: zhong jiang Signed-off-by: Shawn Guo Link: https://patchwork.freedesktop.org/patch/msgid/1534472646-10368-1-git-send-email-zhongjiang@huawei.com commit 035c450ffa0483e715fc7b14a2e8b744bf8a740a Author: Tzvetomir Stoyanov (VMware) Date: Wed Sep 19 14:56:58 2018 -0400 tools lib traceevent: Add prefix tep_ to enum filter_trivial_type In order to make libtraceevent into a proper library, variables, data structures and functions require a unique prefix to prevent name space conflicts. That prefix will be "tep_". This adds prefix tep_ to enum filter_trivial_type and all its members. Signed-off-by: Tzvetomir Stoyanov (VMware) Cc: Andrew Morton Cc: Jiri Olsa Cc: Namhyung Kim Cc: Tzvetomir Stoyanov (VMware) Cc: linux-trace-devel@vger.kernel.org Link: http://lkml.kernel.org/r/20180919185725.076387655@goodmis.org Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Arnaldo Carvalho de Melo commit 1affd34f192a516436a2e0cec15a97bc1001678a Author: Tzvetomir Stoyanov (VMware) Date: Wed Sep 19 14:56:57 2018 -0400 tools lib traceevent: Rename data2host*() APIs In order to make libtraceevent into a proper library, variables, data structures and functions require a unique prefix to prevent name space conflicts. That prefix will be "tep_". This renames data2host*() APIs Signed-off-by: Tzvetomir Stoyanov (VMware) Cc: Andrew Morton Cc: Jiri Olsa Cc: Namhyung Kim Cc: Tzvetomir Stoyanov (VMware) Cc: linux-trace-devel@vger.kernel.org Link: http://lkml.kernel.org/r/20180919185724.751088939@goodmis.org Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Arnaldo Carvalho de Melo commit 785be0c98d24aaf417588322c74999520ea790a4 Author: Tzvetomir Stoyanov (VMware) Date: Wed Sep 19 14:56:56 2018 -0400 tools lib traceevent: Rename struct plugin_list to struct tep_plugin_list In order to make libtraceevent into a proper library, variables, data structures and functions require a unique prefix to prevent name space conflicts. That prefix will be "tep_". This renames struct plugin_list to struct tep_plugin_list Signed-off-by: Tzvetomir Stoyanov (VMware) Cc: Andrew Morton Cc: Jiri Olsa Cc: Namhyung Kim Cc: Tzvetomir Stoyanov (VMware) Cc: linux-trace-devel@vger.kernel.org Link: http://lkml.kernel.org/r/20180919185724.586889128@goodmis.org Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Arnaldo Carvalho de Melo commit 9334c9616b71202c751a12edf5f83f51ec5a1663 Author: Tzvetomir Stoyanov (VMware) Date: Wed Sep 19 14:56:55 2018 -0400 tools lib traceevent: Add prefix tep_ to structs filter_type and event_filter In order to make libtraceevent into a proper library, variables, data structures and functions require a unique prefix to prevent name space conflicts. That prefix will be "tep_". This adds prefix tep_ to structs filter_type and event_filter Signed-off-by: Tzvetomir Stoyanov (VMware) Cc: Andrew Morton Cc: Jiri Olsa Cc: Namhyung Kim Cc: Tzvetomir Stoyanov (VMware) Cc: linux-trace-devel@vger.kernel.org Link: http://lkml.kernel.org/r/20180919185724.309837130@goodmis.org Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Arnaldo Carvalho de Melo commit 88e6c21a11c5464ebdaefeb18822ab55f37a6473 Author: Tzvetomir Stoyanov (VMware) Date: Wed Sep 19 14:56:54 2018 -0400 tools lib traceevent: Add prefix tep_ to various structs filter_arg_*. In order to make libtraceevent into a proper library, variables, data structures and functions require a unique prefix to prevent name space conflicts. That prefix will be "tep_". This adds prefix tep_ to to various structs filter_arg_*.. Signed-off-by: Tzvetomir Stoyanov (VMware) Cc: Andrew Morton Cc: Jiri Olsa Cc: Namhyung Kim Cc: Tzvetomir Stoyanov (VMware) Cc: linux-trace-devel@vger.kernel.org Link: http://lkml.kernel.org/r/20180919185724.152948543@goodmis.org Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Arnaldo Carvalho de Melo commit 0515ca53caa681ad945fbea218e691e8637b4d7d Author: Tzvetomir Stoyanov (VMware) Date: Wed Sep 19 14:56:53 2018 -0400 tools lib traceevent: Add prefix tep_ to struct filter_{arg,value_type} In order to make libtraceevent into a proper library, variables, data structures and functions require a unique prefix to prevent name space conflicts. That prefix will be "tep_". This adds prefix tep_ to struct filter_arg, enum filter_value_type and all enum's members. Signed-off-by: Tzvetomir Stoyanov (VMware) Cc: Andrew Morton Cc: Jiri Olsa Cc: Namhyung Kim Cc: Tzvetomir Stoyanov (VMware) Cc: linux-trace-devel@vger.kernel.org Link: http://lkml.kernel.org/r/20180919185723.972818215@goodmis.org Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Arnaldo Carvalho de Melo commit 4746d22a4c1b12993540924f8cca12a256646614 Author: Tzvetomir Stoyanov (VMware) Date: Wed Sep 19 14:56:52 2018 -0400 tools lib traceevent: Add prefix tep_ to enums filter_{exp,arg}_type In order to make libtraceevent into a proper library, variables, data structures and functions require a unique prefix to prevent name space conflicts. That prefix will be "tep_". This adds prefix tep_ to enums filter_exp_type, filter_arg_type and all enum's members Signed-off-by: Tzvetomir Stoyanov (VMware) Cc: Andrew Morton Cc: Jiri Olsa Cc: Namhyung Kim Cc: Tzvetomir Stoyanov (VMware) Cc: linux-trace-devel@vger.kernel.org Link: http://lkml.kernel.org/r/20180919185723.824559046@goodmis.org Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Arnaldo Carvalho de Melo commit e906bb788f2c4e870787f09b831923ca893a4671 Author: Tzvetomir Stoyanov (VMware) Date: Wed Sep 19 14:56:51 2018 -0400 tools lib traceevent: Add prefix tep_ to enums filter_{boolean,op,cmp}_type In order to make libtraceevent into a proper library, variables, data structures and functions require a unique prefix to prevent name space conflicts. That prefix will be "tep_". This adds prefix tep_ to enums filter_boolean_type, filter_op_type, filter_cmp_type and all enum's members Signed-off-by: Tzvetomir Stoyanov (VMware) Cc: Andrew Morton Cc: Jiri Olsa Cc: Namhyung Kim Cc: Tzvetomir Stoyanov (VMware) Cc: linux-trace-devel@vger.kernel.org Link: http://lkml.kernel.org/r/20180919185723.680572508@goodmis.org Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Arnaldo Carvalho de Melo commit 1e97216f20330fb001f57d0f6f48e76c060bfd16 Author: Tzvetomir Stoyanov (VMware) Date: Wed Sep 19 14:56:50 2018 -0400 tools lib traceevent, perf tools: Rename enum print_arg_type to enum tep_print_arg_type In order to make libtraceevent into a proper library, variables, data structures and functions require a unique prefix to prevent name space conflicts. That prefix will be "tep_". This renames enum print_arg_type to enum tep_print_arg_type and add prefix TEP_ to all its members. Signed-off-by: Tzvetomir Stoyanov (VMware) Cc: Andrew Morton Cc: Jiri Olsa Cc: Namhyung Kim Cc: Tzvetomir Stoyanov (VMware) Cc: linux-trace-devel@vger.kernel.org Link: http://lkml.kernel.org/r/20180919185723.533960748@goodmis.org Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Arnaldo Carvalho de Melo commit 5647f94b90f6681bcc6f37abeb3bc3d1850b12cb Author: Tzvetomir Stoyanov (VMware) Date: Wed Sep 19 14:56:49 2018 -0400 tools lib traceevent, perf tools: Add prefix tep_ to all print_* structures In order to make libtraceevent into a proper library, variables, data structures and functions require a unique prefix to prevent name space conflicts. That prefix will be "tep_". This adds prefix tep_ to all print_* structures Signed-off-by: Tzvetomir Stoyanov (VMware) Cc: Andrew Morton Cc: Jiri Olsa Cc: Namhyung Kim Cc: Tzvetomir Stoyanov (VMware) Cc: linux-trace-devel@vger.kernel.org Link: http://lkml.kernel.org/r/20180919185723.381753268@goodmis.org Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Arnaldo Carvalho de Melo commit c1953bcc73115b5f1f7e8a45f124cf9f434494cd Author: Tzvetomir Stoyanov (VMware) Date: Wed Sep 19 14:56:48 2018 -0400 tools lib traceevent: Add prefix TEP_ to all EVENT_FL_* flags In order to make libtraceevent into a proper library, variables, data structures and functions require a unique prefix to prevent name space conflicts. That prefix will be "tep_". This adds prefix TEP_ to all members of nameless enum EVENT_FL_* Signed-off-by: Tzvetomir Stoyanov (VMware) Cc: Andrew Morton Cc: Jiri Olsa Cc: Namhyung Kim Cc: Tzvetomir Stoyanov (VMware) Cc: linux-trace-devel@vger.kernel.org Link: http://lkml.kernel.org/r/20180919185723.116643250@goodmis.org Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Arnaldo Carvalho de Melo commit f25d9e09e9354bded677d21b51a7b1879cfa02a8 Author: Tzvetomir Stoyanov (VMware) Date: Wed Sep 19 14:56:47 2018 -0400 tools lib traceevent: Rename enum event_{sort_}type to enum tep_event_{sort_}type In order to make libtraceevent into a proper library, variables, data structures and functions require a unique prefix to prevent name space conflicts. That prefix will be "tep_". This renames enum event_type to enum tep_event_type, enum event_sort_type to enum tep_event_sort_type and add prefix TEP_ to all enum's members Signed-off-by: Tzvetomir Stoyanov (VMware) Cc: Andrew Morton Cc: Jiri Olsa Cc: Namhyung Kim Cc: Tzvetomir Stoyanov (VMware) Cc: linux-trace-devel@vger.kernel.org Link: http://lkml.kernel.org/r/20180919185722.961022207@goodmis.org Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Arnaldo Carvalho de Melo commit bb39ccb204cc2e8135660b9cb768ffcf242bf33e Author: Tzvetomir Stoyanov (VMware) Date: Wed Sep 19 14:56:46 2018 -0400 tools lib traceevent, perf tools: Rename enum format_flags to enum tep_format_flags In order to make libtraceevent into a proper library, variables, data structures and functions require a unique prefix to prevent name space conflicts. That prefix will be "tep_". This renames enum format_flags to enum tep_format_flags and adds prefix TEP_ to all of its members. Signed-off-by: Tzvetomir Stoyanov (VMware) Cc: Andrew Morton Cc: Jiri Olsa Cc: Namhyung Kim Cc: Tzvetomir Stoyanov (VMware) Cc: linux-trace-devel@vger.kernel.org Link: http://lkml.kernel.org/r/20180919185722.803127871@goodmis.org Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Arnaldo Carvalho de Melo commit 2c92f9828b3ca4e82e7ceffeea76c6fba4044acc Author: Tzvetomir Stoyanov (VMware) Date: Wed Sep 19 14:56:45 2018 -0400 tools lib traceevent, perf tools: Rename struct format{_field} to struct tep_format{_field} In order to make libtraceevent into a proper library, variables, data structures and functions require a unique prefix to prevent name space conflicts. That prefix will be "tep_". This renames struct format to struct tep_format and struct format_field to struct tep_format_field Signed-off-by: Tzvetomir Stoyanov (VMware) Cc: Andrew Morton Cc: Jiri Olsa Cc: Namhyung Kim Cc: Tzvetomir Stoyanov (VMware) Cc: linux-trace-devel@vger.kernel.org Link: http://lkml.kernel.org/r/20180919185722.661319373@goodmis.org Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Arnaldo Carvalho de Melo commit 4963b0f88bb91ed0122f7b08876ae89fcafb2842 Author: Tzvetomir Stoyanov (VMware) Date: Wed Sep 19 14:56:44 2018 -0400 tools lib traceevent, perf tools: Rename struct event_format to struct tep_event_format In order to make libtraceevent into a proper library, variables, data structures and functions require a unique prefix to prevent name space conflicts. That prefix will be "tep_". This renames struct event_format to struct tep_event_format Signed-off-by: Tzvetomir Stoyanov (VMware) Cc: Andrew Morton Cc: Jiri Olsa Cc: Namhyung Kim Cc: Tzvetomir Stoyanov (VMware) Cc: linux-trace-devel@vger.kernel.org Link: http://lkml.kernel.org/r/20180919185722.495820809@goodmis.org Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Arnaldo Carvalho de Melo commit a78cdee6fbb136694334ade4cedb331a9d0b4d5e Author: Andi Kleen Date: Tue Sep 18 05:32:10 2018 -0700 perf script: Print DSO for callindent Now that we don't need to print the IP/ADDR for callindent the DSO is also not printed. It's useful for some cases, so add an own DSO printout for callindent for the case when IP/ADDR is not enabled. Before: % perf script --itrace=cr -F +callindent,-ip,-sym,-symoff,-addr swapper 0 [000] 3377.917072: 1 branches: pt_config swapper 0 [000] 3377.917072: 1 branches: pt_config swapper 0 [000] 3377.917072: 1 branches: pt_event_add swapper 0 [000] 3377.917072: 1 branches: perf_pmu_enable swapper 0 [000] 3377.917072: 1 branches: perf_pmu_nop_void swapper 0 [000] 3377.917072: 1 branches: event_sched_in.isra.107 swapper 0 [000] 3377.917072: 1 branches: __x86_indirect_thunk_rax swapper 0 [000] 3377.917072: 1 branches: perf_pmu_nop_int swapper 0 [000] 3377.917072: 1 branches: group_sched_in swapper 0 [000] 3377.917072: 1 branches: event_filter_match swapper 0 [000] 3377.917072: 1 branches: event_filter_match swapper 0 [000] 3377.917072: 1 branches: group_sched_in After: swapper 0 [000] 3377.917072: 1 branches: ([unknown]) pt_config swapper 0 [000] 3377.917072: 1 branches: ([kernel.kallsyms]) pt_config swapper 0 [000] 3377.917072: 1 branches: ([kernel.kallsyms]) pt_event_add swapper 0 [000] 3377.917072: 1 branches: ([kernel.kallsyms]) perf_pmu_enable swapper 0 [000] 3377.917072: 1 branches: ([kernel.kallsyms]) perf_pmu_nop_void swapper 0 [000] 3377.917072: 1 branches: ([kernel.kallsyms]) event_sched_in.isra.107 swapper 0 [000] 3377.917072: 1 branches: ([kernel.kallsyms]) __x86_indirect_thunk_rax swapper 0 [000] 3377.917072: 1 branches: ([kernel.kallsyms]) perf_pmu_nop_int swapper 0 [000] 3377.917072: 1 branches: ([kernel.kallsyms]) group_sched_in swapper 0 [000] 3377.917072: 1 branches: ([kernel.kallsyms]) event_filter_match swapper 0 [000] 3377.917072: 1 branches: ([kernel.kallsyms]) event_filter_match swapper 0 [000] 3377.917072: 1 branches: ([kernel.kallsyms]) group_sched_in swapper 0 [000] 3377.917072: 1 branches: ([kernel.kallsyms]) __x86_indirect_thunk_rax swapper 0 [000] 3377.917072: 1 branches: ([kernel.kallsyms]) perf_pmu_nop_txn swapper 0 [000] 3377.917072: 1 branches: ([kernel.kallsyms]) event_sched_in.isra.107 (in the kernel case of course it's not very useful, but it's important with user programs where symbols are not unique) Signed-off-by: Andi Kleen Tested-by: Arnaldo Carvalho de Melo Cc: Adrian Hunter Cc: Jiri Olsa Cc: Kim Phillips Link: http://lkml.kernel.org/r/20180918123214.26728-6-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo commit 37fed3de555199733805a2d3e03aee7727c09ea4 Author: Andi Kleen Date: Tue Sep 18 05:32:09 2018 -0700 perf script: Allow sym and dso without ip, addr Currently sym and dso require printing ip and addr because the print function is tied to those outputs. With callindent it makes sense to print the symbol or dso without numerical IP or ADDR. So change the dependency check to only check the underlying attribute. Also the branch target output relies on the user_set flag to determine if the branch target should be implicitely printed. When modifying the fields with + or - also set user_set, so that ADDR can be removed. We also need to set wildcard_set to make the initial sanity check pass. This allows to remove a lot of noise in callindent output by dropping the numerical addresses, which are not all that useful. Before % perf script --itrace=cr -F +callindent swapper 0 [000] 156546.354971: 1 branches: pt_config 0 [unknown] ([unknown]) => ffffffff81010486 pt_config ([kernel.kallsyms]) swapper 0 [000] 156546.354971: 1 branches: pt_config ffffffff81010499 pt_config ([kernel.kallsyms]) => ffffffff8101063e pt_event_add ([kernel.kallsyms]) swapper 0 [000] 156546.354971: 1 branches: pt_event_add ffffffff81010635 pt_event_add ([kernel.kallsyms]) => ffffffff8115e687 event_sched_in.isra.107 ([kernel.kallsyms]) swapper 0 [000] 156546.354971: 1 branches: perf_pmu_enable ffffffff8115e726 event_sched_in.isra.107 ([kernel.kallsyms]) => ffffffff811579b0 perf_pmu_enable ([kernel.kallsyms]) swapper 0 [000] 156546.354971: 1 branches: perf_pmu_nop_void ffffffff81151730 perf_pmu_nop_void ([kernel.kallsyms]) => ffffffff8115e72b event_sched_in.isra.107 ([kernel.kallsyms]) swapper 0 [000] 156546.354971: 1 branches: event_sched_in.isra.107 ffffffff8115e737 event_sched_in.isra.107 ([kernel.kallsyms]) => ffffffff8115e7a5 group_sched_in ([kernel.kallsyms]) swapper 0 [000] 156546.354971: 1 branches: __x86_indirect_thunk_rax ffffffff8115e7f6 group_sched_in ([kernel.kallsyms]) => ffffffff81a03000 __x86_indirect_thunk_rax ([kernel.kallsyms]) After % perf script --itrace=cr -F +callindent,-ip,-sym,-symoff swapper 0 [000] 156546.354971: 1 branches: pt_config swapper 0 [000] 156546.354971: 1 branches: pt_config swapper 0 [000] 156546.354971: 1 branches: pt_event_add swapper 0 [000] 156546.354971: 1 branches: perf_pmu_enable swapper 0 [000] 156546.354971: 1 branches: perf_pmu_nop_void swapper 0 [000] 156546.354971: 1 branches: event_sched_in.isra.107 swapper 0 [000] 156546.354971: 1 branches: __x86_indirect_thunk_rax swapper 0 [000] 156546.354971: 1 branches: perf_pmu_nop_int swapper 0 [000] 156546.354971: 1 branches: group_sched_in swapper 0 [000] 156546.354971: 1 branches: event_filter_match swapper 0 [000] 156546.354971: 1 branches: event_filter_match swapper 0 [000] 156546.354971: 1 branches: group_sched_in Signed-off-by: Andi Kleen Tested-by: Arnaldo Carvalho de Melo Cc: Adrian Hunter Cc: Jiri Olsa Cc: Kim Phillips Link: http://lkml.kernel.org/r/20180918123214.26728-5-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo commit 03a1f49f26482cf832e7f0157ae5da716d927701 Author: Andi Kleen Date: Tue Sep 18 05:32:07 2018 -0700 tools lib subcmd: Support overwriting the pager Add an interface to the auto pager code that allows callers to overwrite the pager. Signed-off-by: Andi Kleen Cc: Adrian Hunter Cc: Jiri Olsa Cc: Josh Poimboeuf Cc: Kim Phillips Cc: Namhyung Kim Link: http://lkml.kernel.org/r/20180918123214.26728-3-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo commit c12e039d1233f24ab2726945f883037f47b26f1d Author: Andi Kleen Date: Thu Sep 13 20:10:31 2018 -0700 perf tools: Report itrace options in help I often forget all the options that --itrace accepts. Instead of burying them in the man page only report them in the normal command line help too to make them easier accessible. v2: Align Signed-off-by: Andi Kleen Cc: Jiri Olsa Cc: Kim Phillips Link: http://lkml.kernel.org/r/20180914031038.4160-2-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo commit 3b9c25c0a04675c5d8d4390d9d9b661135751b27 Author: Sangwon Hong Date: Wed Sep 19 00:49:11 2018 -0700 perf help: Add missing subcommand `version` There isn't subcommand `version` when typing `perf help`. Before : $ perf help | grep version usage: perf [--version] [--help] [OPTIONS] COMMAND [ARGS] So add perf-version in command-list.txt for listing it when typing `perf help`. After : $ perf help | grep version usage: perf [--version] [--help] [OPTIONS] COMMAND [ARGS] version display the version of perf binary Signed-off-by: Sangwon Hong Tested-by: Arnaldo Carvalho de Melo Cc: Jin Yao Cc: Jiri Olsa Cc: Namhyung Kim Link: http://lkml.kernel.org/r/20180919074911.41931-1-qpakzk@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit fd395547924dad66dbe21c01e1a646f3215742ef Author: Christian König Date: Fri Sep 14 21:08:57 2018 +0200 drm/amdgpu: move reserving GDS/GWS/OA into common code We don't need that in the per ASIC code. Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit c832c346cdf9022872655be621880e0f66f4135d Author: Christian König Date: Fri Sep 14 20:59:27 2018 +0200 drm/amdgpu: initialize GDS/GWS/OA domains even when they are zero sized Stops crashing on SI. Signed-off-by: Christian König Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 77a2faa55c1a497f4e7e89eabd11830f0e3cb3dd Author: Christian König Date: Fri Sep 14 16:06:31 2018 +0200 drm/amdgpu: fix up GDS/GWS/OA shifting That only worked by pure coincident. Completely remove the shifting and always apply correct PAGE_SHIFT. Signed-off-by: Christian König Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 403009bfba45163887398652762ed1fc6645181c Author: Christian König Date: Tue Sep 11 11:50:57 2018 +0200 drm/amdgpu: fix shadow BO restoring Don't grab the reservation lock any more and simplify the handling quite a bit. Signed-off-by: Christian König Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit c33adbc7285f72dbd86aedba858e9570cd9f9c99 Author: Christian König Date: Tue Sep 11 10:36:16 2018 +0200 drm/amdgpu: always recover VRAM during GPU recovery It shouldn't add much overhead and we should make sure that critical VRAM content is always restored. Signed-off-by: Christian König Acked-by: Junwei Zhang Signed-off-by: Alex Deucher commit 7fcb0657ffa93544142f6a0bb20b7fecf1cc1dca Author: Christian König Date: Tue Sep 11 10:31:54 2018 +0200 drm/amdgpu: shadow BOs don't need any alignment They aren't directly used by the hardware. Signed-off-by: Christian König Reviewed-by: Junwei Zhang Signed-off-by: Alex Deucher commit 16688677427687d6e3796bfa3aa72c68f71572df Author: Christian König Date: Tue Sep 11 10:30:31 2018 +0200 drm/amdgpu: always enable shadow BOs v2 Even when GPU recovery is disabled we could run into a manually triggered recovery. v2: keep accidental removed comments Signed-off-by: Christian König Acked-by: Emily Deng Signed-off-by: Alex Deucher commit 4947b2f248f867626c7a3797fc3a314bd93aeac5 Author: Christian König Date: Tue Sep 11 09:30:46 2018 +0200 drm/amdgpu: stop pipelining VM PDs/PTs moves We are going to need this for recoverable page fault handling and it makes shadow handling during GPU reset much more easier. Signed-off-by: Christian König Acked-by: Junwei Zhang Signed-off-by: Alex Deucher commit 3e14bedc581c3b7b05cd36352d0d47eca0317497 Author: Christian König Date: Tue Sep 18 10:38:09 2018 +0200 drm/amdgpu: remove fence fallback DC doesn't seem to have a fallback path either. So when interrupts doesn't work any more we are pretty much busted no matter what. Signed-off-by: Christian König Reviewed-by: Chunming Zhou Signed-off-by: Alex Deucher commit 32f2a0d117769bdca7f7ee6224659f2c688ebc85 Author: Evan Quan Date: Mon Sep 17 14:59:54 2018 +0800 drm/amd/powerplay: retrieve the updated clock table after OD With OD settings applied, the clock table will be updated accordingly. We need to retrieve the new clock tables then. Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit b1f82cb21231ccfec3c15b628f8deed778cce22b Author: Evan Quan Date: Thu Sep 13 16:14:33 2018 +0800 drm/amd/powerplay: update OD to take voltage value instead of offset With the latest SMC fw, we are able to get the voltage value for specific frequency point. So, we update the OD relates to take absolute voltage instead of offset. Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 8a1304a5b4310b941d08c988326d15673ed0f689 Author: Evan Quan Date: Wed Sep 12 11:45:01 2018 +0800 drm/amd/powerplay: update OD feature judgement Update the conditions to judge whether an OD feature should be supported on vega20. Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 27e39d3dd365d661b5f6b5b09ad86ee142e11de0 Author: Hawking Zhang Date: Mon Sep 17 20:19:48 2018 +0800 drm/amdgpu: fix unknown vram mem type for vega20 vega20 should use umc_info v3_3 instead of v3_1. There are serveral versions of umc_info for vega series. Compared to various versions of these structures, vram_info strucure is unified for vega series. The patch switch to query mem_type from vram_info structure for all the vega series dGPU. Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 801281fe09ffc8720336131669a946276e21fe4e Author: Hawking Zhang Date: Mon Sep 17 20:25:03 2018 +0800 drm/amdgpu: update vram_info structure in atomfirmware.h atomfirmware has structure changes in varm_info. Updated it to the latest one. Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 1f81fbc4ce8211b38881b12a1100ea7ee2ffc5f0 Author: Mathieu Malaterre Date: Thu Apr 12 21:33:33 2018 +0200 drm/radeon: change function signature to pass full range In function ‘radeon_process_i2c_ch’ a comparison of a u8 value against 255 is done. Since it is always false, change the signature of this function to use an `int` instead, which match the type used in caller: `radeon_atom_hw_i2c_xfer`. Fix the following warning triggered with W=1: CC [M] drivers/gpu/drm/radeon/atombios_i2c.o drivers/gpu/drm/radeon/atombios_i2c.c: In function ‘radeon_process_i2c_ch’: drivers/gpu/drm/radeon/atombios_i2c.c:71:11: warning: comparison is always false due to limited range of data type [-Wtype-limits] if (num > ATOM_MAX_HW_I2C_READ) { ^ Reviewed-by: Huang Rui Signed-off-by: Mathieu Malaterre Signed-off-by: Alex Deucher commit 066689161a481db3940f445b34b9dd543cb8799a Author: A. Wilcox Date: Sun Jul 1 22:44:52 2018 -0500 drm/amdgpu: use processed values for counting adev->gfx.rlc has the values from rlc_hdr already processed by le32_to_cpu. Using the rlc_hdr values on big-endian machines causes a kernel Oops due to writing well outside of the array (0x24000000 instead of 0x24). Signed-off-by: A. Wilcox Signed-off-by: Alex Deucher commit ddaf501347e21a19d15977029af1d229cd800379 Author: Tom St Denis Date: Mon Sep 17 14:07:00 2018 -0400 drm/amd/amdgpu: Avoid fault when allocating an empty buffer object Signed-off-by: Tom St Denis Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 5297572806aeeb68c2491169fe7fcc436e09e41d Author: Christian König Date: Fri Sep 14 21:06:50 2018 +0200 drm/amdgpu: drop size check We no don't allocate zero sized kernel BOs any longer. Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 21a7e77f77b348e73c9c67064a545e724c4a0c9a Author: Christian König Date: Fri Sep 14 21:03:37 2018 +0200 drm/amdgpu: don't allocate zero sized kernel BOs Just free the BO if the size should be zero. Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 3b2de69944cfac8bc8f43c81aeadcbefc31ed48e Author: Christian König Date: Fri Sep 14 20:44:17 2018 +0200 drm/amdgpu: stop crashing on GDS/GWS/OA eviction Simply ignore any copying here. Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 3a6818c771671c34b090244c92ab5aea6176d6da Author: Rohit kumar Date: Wed Sep 19 11:41:21 2018 +0530 ASoC: q6afe: dt-bindings: Update input range for qcom,sd-lines Input to qcom,sd-lines should be between 0 and 3 instead of 1 to 4 as 0 corresponds to BIT(0) which is MI2S_SD0 line. Bit 1 to 3 corresponds to SD1 to SD3 lines respectively. Updated documentation for the same. Signed-off-by: Rohit kumar Signed-off-by: Mark Brown commit 0ee8685392a642ffb381d15d9fe4445d4ec03b56 Author: Christian König Date: Fri Sep 14 15:43:57 2018 +0200 drm/amdgpu: add GDS, GWS and OA debugfs files Additional to the existing files for VRAM and GTT. Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 769f846e1411a28202510b590379a1442eb3e85d Author: Christian König Date: Sat Sep 15 10:04:54 2018 +0200 drm/amdgpu: fix parameter documentation for amdgpu_vm_free_pts The function was modified without updating the documentation. Signed-off-by: Christian König Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit df43519eb706edfe951284a825642ce2e1d38d09 Author: Matti Vaittinen Date: Wed Sep 19 10:14:00 2018 +0300 regulator: bd718x7: add missing linux/of.h inclusion 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 Signed-off-by: Matti Vaittinen Signed-off-by: Mark Brown commit cb90b97bb379895302a7b47b97199928fd0bafa9 Author: Christian König Date: Sat Sep 15 10:02:13 2018 +0200 drm/amdgpu: add amdgpu_vm_entries_mask v2 We can't get the mask for the root directory from the number of entries. So add a new function to avoid that problem. v2: fix typo in mask Signed-off-by: Christian König Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 880f7cc47265e7b195781dfa9a0cd62ef78304e3 Author: Will Deacon Date: Wed Sep 19 11:41:21 2018 +0100 arm64: cpu_errata: Remove ARM64_MISMATCHED_CACHE_LINE_SIZE There's no need to treat mismatched cache-line sizes reported by CTR_EL0 differently to any other mismatched fields that we treat as "STRICT" in the cpufeature code. In both cases we need to trap and emulate EL0 accesses to the register, so drop ARM64_MISMATCHED_CACHE_LINE_SIZE and rely on ARM64_MISMATCHED_CACHE_TYPE instead. Reviewed-by: Suzuki K Poulose Signed-off-by: Will Deacon [catalin.marinas@arm.com: move ARM64_HAS_CNP in the empty cpucaps.h slot] Signed-off-by: Catalin Marinas commit 97181516b0785dd032700ae4899842389c6bea78 Author: Suzuki K Poulose Date: Wed Sep 12 14:53:51 2018 +0100 arm: dts: sama5d2: Update coresight bindings for hardware ports Switch to the new coresight bindings for hardware ports Cc: Nicolas Ferre Cc: Alexandre Belloni Cc: Mathieu Poirier Signed-off-by: Suzuki K Poulose Signed-off-by: Alexandre Belloni commit f30858439e7db9ce9847eaedf440635fc6349c6e Author: Cedric Roux Date: Mon Sep 17 22:43:50 2018 +0200 ARM: s3c24xx: Restore proper usage of pr_info/pr_cont Fix wrong usage of pr_info introduced by the commit e728e4f20100 ("ARM: s3c24xx: formatting cleanup in mach-mini2440.c"). Since the idea is to print on a single line, pr_cont has to be used. Signed-off-by: Cedric Roux Signed-off-by: Krzysztof Kozlowski commit f3cdc783ceb7016a17418d848a53055ee79bfe74 Author: Eugen Hristev Date: Wed Sep 19 15:39:53 2018 +0300 ARM: dts: at91: sama5d27_som1_ek: add adc regulators Add fixed regulators for the ADC. This board does not have a programmable PMIC, but fixed regulators. Adding them to DT so the ADC can probe correctly. Tested-by: Swapna Gurumani Signed-off-by: Ludovic Desroches Signed-off-by: Eugen Hristev Signed-off-by: Alexandre Belloni commit c890ecdbe93d482512a911b299bfb009780a29c2 Author: Rob Herring Date: Thu Sep 13 13:12:28 2018 -0500 ARM: dts: atmel: Fix I2C and SPI bus warnings dtc has new checks for I2C and SPI buses. Fix the warnings in node names and unit-addresses. arch/arm/boot/dts/at91-dvk_som60.dtb: Warning (i2c_bus_reg): /ahb/apb/i2c@f0018000/eeprom@87: I2C bus unit address format error, expected "57" arch/arm/boot/dts/at91-dvk_som60.dtb: Warning (i2c_bus_reg): /ahb/apb/i2c@f0018000/ft5426@56: I2C bus unit address format error, expected "38" arch/arm/boot/dts/at91-vinco.dtb: Warning (i2c_bus_reg): /ahb/apb/i2c@f8024000/rtc@64: I2C bus unit address format error, expected "32" arch/arm/boot/dts/at91sam9260ek.dtb: Warning (spi_bus_reg): /ahb/apb/spi@fffc8000/mtd_dataflash@0: SPI bus unit address format error, expected "1" arch/arm/boot/dts/at91sam9g20ek_2mmc.dtb: Warning (spi_bus_reg): /ahb/apb/spi@fffc8000/mtd_dataflash@0: SPI bus unit address format error, expected "1" arch/arm/boot/dts/at91sam9g20ek.dtb: Warning (spi_bus_reg): /ahb/apb/spi@fffc8000/mtd_dataflash@0: SPI bus unit address format error, expected "1" arch/arm/boot/dts/at91sam9261ek.dtb: Warning (spi_bus_reg): /ahb/apb/spi@fffc8000/tsc2046@0: SPI bus unit address format error, expected "2" Signed-off-by: Rob Herring Acked-by: Nicolas Ferre Signed-off-by: Alexandre Belloni commit 0099103926b68e6675a1be4644848f5b1c1b6f97 Author: Jason Gunthorpe Date: Mon Sep 17 15:44:46 2018 -0600 RDMA/uverbs: Fix error unwind in ib_uverbs_add_one The error path has several mistakes - cdev_del should not be called if cdev_device_add fails - We must call put_device on all the goto exit paths as that is what frees the uapi, SRCU and the struct itself. While we are here consolidate all the uvdev_dev init that cannot fail at the top. Fixes: c5c4d92e70f3 ("RDMA/uverbs: Use cdev_device_add() instead of cdev_add()") Signed-off-by: Jason Gunthorpe Reviewed-by: Parav Pandit commit 0965cc953a235196b8d6ef0cba45ecb5c355194f Author: YueHaibing Date: Wed Sep 19 20:28:38 2018 +0800 RDMA/core: Properly return the error code of rdma_set_src_addr_rcu rdma_set_src_addr_rcu should check copy_src_l2_addr fails, rather than always return 0. Also copy_src_l2_addr should return 'ret' as its return value when rdma_translate_ip fails. Fixes: c31d4b2ddf07 ("RDMA/core: Protect against changing dst->dev during destination resolve") Signed-off-by: YueHaibing Reviewed-by: Parav Pandit Signed-off-by: Jason Gunthorpe commit 802fa45cd320de319e86c93bca72abec028ba059 Author: Håkon Bugge Date: Mon Sep 17 16:07:07 2018 +0200 RDMA/i40iw: Fix incorrect iterator type Commit f27b4746f378 ("i40iw: add connection management code") uses an incorrect rcu iterator, whilst holding the rtnl_lock. Since the critical region invokes i40iw_manage_qhash(), which is a sleeping function, the rcu locking and traversal cannot be used. Signed-off-by: Håkon Bugge Signed-off-by: Jason Gunthorpe commit 6ebce44746036c923d0c255672735399192467c3 Author: Jason Gunthorpe Date: Sun Sep 16 20:37:38 2018 +0300 RDMA/uverbs: Remove is_closed from ib_uverbs_file This does nothing but indicate if the uverbs_file is in the device's list, use list_del_init instead. Signed-off-by: Jason Gunthorpe Signed-off-by: Leon Romanovsky commit 9f2b76a2db3c43872048cbca1269f3fc5fbcd75d Author: Fabrizio Castro Date: Wed Sep 12 14:31:02 2018 +0100 pinctrl: sh-pfc: r8a77990: Add R8A774C0 PFC support Renesas RZ/G2E (a.k.a. r8a774c0) is pin compatible with R-Car E3 (a.k.a. r8a77990), however it doesn't have several automotive specific peripherals. Add a r8a77990 specific pin groups/functions along with common pin groups/functions for supporting both r8a77990 and r8a774c0 SoCs. Signed-off-by: Fabrizio Castro Reviewed-by: Biju Das Signed-off-by: Geert Uytterhoeven commit 6523a0e155c8eeafcb290596aad86388e7577316 Author: Suzuki K Poulose Date: Wed Sep 12 14:53:47 2018 +0100 arm: dts: hip04: Update coresight bindings for hardware ports Switch to the new the hardware port bindings. Cc: Wei Xu Cc: Mathieu Poirier Signed-off-by: Suzuki K Poulose Signed-off-by: Wei Xu commit c382e8ba7c33b6dd64850a7d0f3ae19038f2fb1a Author: Fabrizio Castro Date: Wed Sep 12 14:31:01 2018 +0100 dt-bindings: pinctrl: sh-pfc: Document r8a774c0 PFC support Document PFC support for the R8A774C0 SoC. Signed-off-by: Fabrizio Castro Reviewed-by: Biju Das Signed-off-by: Geert Uytterhoeven commit d7097b97e91362ded242e5516f8d97b985f60941 Author: Biju Das Date: Tue Sep 11 11:30:05 2018 +0100 pinctrl: sh-pfc: r8a7791: Add r8a7744 support Renesas RZ/G1N (R8A7744) is pin compatible with R-Car M2-W/N (R8A7791/3) and RZ/G1M. Signed-off-by: Biju Das Reviewed-by: Fabrizio Castro Reviewed-by: Simon Horman Signed-off-by: Geert Uytterhoeven commit a6a7d2c2dc668fb19bc16b4cda397cb1831df54d Author: Biju Das Date: Tue Sep 11 11:30:04 2018 +0100 dt-bindings: pinctrl: sh-pfc: Document r8a7744 PFC support Document PFC support for the RZ/G1N (R8A7744) SoC. Signed-off-by: Biju Das Reviewed-by: Fabrizio Castro Reviewed-by: Simon Horman Signed-off-by: Geert Uytterhoeven commit 5510ee99c0deb0c0235acee6498a6745c8317df1 Author: Manivannan Sadhasivam Date: Fri Aug 10 23:23:39 2018 +0530 arm64: dts: Add devicetree support for HiKey970 board Add devicetree support for HiKey970 development board which based on Hi3670 SoC and is also one of the 96Boards Consumer Edition and AI platform. Only UART6 is enabled which is the default console required by the 96Boards Consumer Edition Specification. This patch has been tested on HiKey970 Board. Signed-off-by: Manivannan Sadhasivam Signed-off-by: Wei Xu commit a446451d04b7e5ef0d9b328bdd52ffb784439871 Author: Manivannan Sadhasivam Date: Fri Aug 10 23:23:38 2018 +0530 dt-bindings: arm: hisilicon: Add binding for HiKey970 board Add devicetree binding for HiKey970 board. Signed-off-by: Manivannan Sadhasivam Reviewed-by: Rob Herring Signed-off-by: Wei Xu commit dd8c7b78c11bac66083ec2ff0d5d7285f001cbf6 Author: Manivannan Sadhasivam Date: Fri Aug 10 23:23:37 2018 +0530 arm64: dts: Add devicetree for Hisilicon Hi3670 SoC Add initial devicetree support for Hisilicon Hi3670 SoC which is similar to Hi3660 SoC with NPU support. This SoC has Octal core BigLittle CPUs in two clusters(4 * A53 & 4 * A73). Only UART6 has been added for console support which is pre configured by the bootloader. A fixed clock is sourcing the UART6 which will get replaced by the clock driver when available. Signed-off-by: Manivannan Sadhasivam Signed-off-by: Wei Xu commit d84207999d216f743c7c011874e0a99282c64d11 Author: Manivannan Sadhasivam Date: Fri Aug 10 23:23:36 2018 +0530 dt-bindings: arm: hisilicon: Add binding for Hi3670 SoC Add devicetree binding for Hi3670 SoC. Signed-off-by: Manivannan Sadhasivam Reviewed-by: Rob Herring Signed-off-by: Wei Xu commit e917b9432dc0a3caf1bda5064e9f2a7cd3d0fc2e Author: Suzuki K Poulose Date: Wed Sep 12 14:53:44 2018 +0100 arm64: dts: hi6220: Update coresight bindings for hardware ports Switch to updated coresight bindings for hw ports. Cc: xuwei5@hisilicon.com Cc: lipengcheng8@huawei.com Cc: Mathieu Poirier Tested-by: Leo Yan Signed-off-by: Suzuki K Poulose Signed-off-by: Wei Xu commit b27dedf55173e9ed8736eae15c06fb27fd49a43e Author: Viresh Kumar Date: Mon Jul 23 08:36:42 2018 +0530 arm64: dts: hisilicon: Add missing clocks property for CPUs The clocks property 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 missing clocks property. Signed-off-by: Viresh Kumar Signed-off-by: Wei Xu commit 7c0043c0a48c18fccd43e5cd9f45751316564647 Author: Fabrizio Castro Date: Wed Sep 12 11:41:54 2018 +0100 dt-bindings: clock: renesas: cpg-mssr: Document r8a774c0 This patch documents RZ/G2E (a.k.a. R8A774C0) bindings for the Clock Pulse Generator driver. Signed-off-by: Fabrizio Castro Reviewed-by: Biju Das Reviewed-by: Rob Herring Signed-off-by: Geert Uytterhoeven commit 906e0a4a6d1ef2d3940cd7f17287b111730382da Author: Fabrizio Castro Date: Wed Sep 12 11:41:53 2018 +0100 clk: renesas: cpg-mssr: Add r8a774c0 support Add RZ/G2E (R8A774C0) Clock Pulse Generator / Module Standby and Software Reset support. Based on Table 8.2g of "RZ/G Series, 2nd Generation User's Manual: Hardware (Rev. 0.61, June 12, 2018)". Signed-off-by: Fabrizio Castro Reviewed-by: Biju Das Signed-off-by: Geert Uytterhoeven commit 0acb6b53df36b8453be4fc2563e37e84450eed25 Author: Fabrizio Castro Date: Wed Sep 12 11:41:52 2018 +0100 clk: renesas: Add r8a774c0 CPG Core Clock Definitions Add all RZ/G2E (a.k.a. R8A774C0) Clock Pulse Generator Core Clock Outputs, as listed in Table 8.2g ("List of Clocks [RZ/G2E]") of the RZ/G2 Hardware User's Manual. Signed-off-by: Fabrizio Castro Reviewed-by: Biju Das Reviewed-by: Simon Horman Reviewed-by: Rob Herring Signed-off-by: Geert Uytterhoeven commit 016f9663156fe7e1402ef5ebaaca55d67f639966 Author: Biju Das Date: Tue Sep 11 11:12:49 2018 +0100 clk: renesas: r8a7743: Add r8a7744 support Add RZ/G1N (R8A7744) Clock Pulse Generator / Module Standby and Software Reset support. Signed-off-by: Biju Das Reviewed-by: Fabrizio Castro Reviewed-by: Simon Horman Signed-off-by: Geert Uytterhoeven commit 6ff9cb53dabca55952ef66853ff145f7c424f6bd Author: Biju Das Date: Tue Sep 11 11:12:48 2018 +0100 clk: renesas: Add r8a7744 CPG Core Clock Definitions Add all RZ/G1N Clock Pulse Generator Core Clock Outputs, as listed in Table 7.2b ("List of Clocks [RZ/G1M/N]") of the RZ/G1 Hardware User's Manual. Signed-off-by: Biju Das Reviewed-by: Fabrizio Castro Reviewed-by: Simon Horman Signed-off-by: Geert Uytterhoeven commit bbd71915ee9c56cc585c76b4b3aee791152ffbff Author: Biju Das Date: Tue Sep 11 11:12:47 2018 +0100 dt-bindings: clock: renesas: cpg-mssr: Document r8a7744 binding Add binding documentation for the RZ/G1N (R8A7744) Clock Pulse Generator driver. Signed-off-by: Biju Das Reviewed-by: Fabrizio Castro Reviewed-by: Simon Horman Signed-off-by: Geert Uytterhoeven commit 5d169ce7371227d899d749cc5289ce50aff7d99f Author: Kuninori Morimoto Date: Fri Sep 7 01:52:28 2018 +0000 dt-bindings: clock: renesas: Convert to SPDX identifiers This patch updates license to use SPDX-License-Identifier instead of verbose license text on Renesas related headers. Signed-off-by: Kuninori Morimoto Reviewed-by: Simon Horman Signed-off-by: Geert Uytterhoeven commit 6ace1098a68cbf4cb570f73eb650b00f9a3efc97 Author: Eric W. Biederman Date: Thu Aug 3 14:34:24 2017 -0500 signal/x86/traps: Factor out show_signal The code for conditionally printing unhanded signals is duplicated twice in arch/x86/kernel/traps.c. Factor it out into it's own subroutine called show_signal to make the code clearer and easier to maintain. Reviewed-by: Thomas Gleixner Signed-off-by: "Eric W. Biederman" commit 8d68fa0e083995b48be6b66e04afe746d4654b0c Author: Eric W. Biederman Date: Wed Jan 3 19:22:04 2018 -0600 signal/x86: Move mpx siginfo generation into do_bounds This separates the logic of generating the signal from the logic of gathering the information about the bounds violation. Reviewed-by: Thomas Gleixner Signed-off-by: "Eric W. Biederman" commit 8a35eb22c02baf0c58b44ba28fc163270ef147f8 Author: Eric W. Biederman Date: Mon Feb 12 09:35:39 2018 -0600 signal/x86: In trace_mpx_bounds_register_exception add __user annotations The value passed in to addr_referenced is of type void __user *, so update the addr_referenced parameter in trace_mpx_bounds_register_exception to match. Also update the addr_referenced paramater in TP_STRUCT__entry as it again holdes the same value. I don't know why this was missed earlier but sparse was complaining when testing test branch so fix this now. Reviewed-by: Thomas Gleixner Signed-off-by: "Eric W. Biederman" commit 585a8b9b48e9d5402cbd9ac3a94ac72f5368d48b Author: Eric W. Biederman Date: Mon Apr 16 14:23:27 2018 -0500 signal/x86: Use send_sig_mceerr as apropriate This simplifies the code making it clearer what is going on. Reviewed-by: Thomas Gleixner Signed-off-by: "Eric W. Biederman" commit 40e5539463f0b9f787831ca4177206bcd4af7884 Author: Eric W. Biederman Date: Fri Jan 19 13:55:17 2018 -0600 signal/x86: Move MCE error reporting out of force_sig_info_fault Only the call from do_sigbus will send SIGBUS due to a memory machine check error. Consolidate all of the machine check signal generation code in do_sigbus and remove the now unnecessary fault parameter from force_sig_info_fault. Explicitly use the now constant si_code BUS_ADRERR in the call to force_sig_info_fault from do_sigbus. This makes the code in arch/x86/mm/fault.c easier to follower and simpler to maintain. Reviewed-by: Thomas Gleixner Signed-off-by: "Eric W. Biederman" commit 73f297aa072809386ef6400fb48dbfde89662291 Author: Eric W. Biederman Date: Mon Apr 16 14:22:17 2018 -0500 signal/x86: Inline fill_sigtrap_info in it's only caller send_sigtrap The function fill_sigtrap_info now only has one caller so remove it and put it's contents in it's caller. Reviewed-by: Thomas Gleixner Signed-off-by: "Eric W. Biederman" commit efc463adbccf709c5dbaf6cfbf84b7e94b62810a Author: Eric W. Biederman Date: Mon Apr 16 14:18:26 2018 -0500 signal: Simplify tracehook_report_syscall_exit Replace user_single_step_siginfo with user_single_step_report that allocates siginfo structure on the stack and sends it. This allows tracehook_report_syscall_exit to become a simple if statement that calls user_single_step_report or ptrace_report_syscall depending on the value of step. Update the default helper function now called user_single_step_report to explicitly set si_code to SI_USER and to set si_uid and si_pid to 0. The default helper has always been doing this (using memset) but it was far from obvious. The powerpc helper can now just call force_sig_fault. The x86 helper can now just call send_sigtrap. Unfortunately the default implementation of user_single_step_report can not use force_sig_fault as it does not use a SIGTRAP si_code. So it has to carefully setup the siginfo and use use force_sig_info. The net result is code that is easier to understand and simpler to maintain. Ref: 85ec7fd9f8e5 ("ptrace: introduce user_single_step_siginfo() helper") Reviewed-by: Thomas Gleixner Signed-off-by: "Eric W. Biederman" commit e884818cc0edb9bd128de95e7ca6b569f4667c0f Author: Lee, Shawn C Date: Tue Sep 11 23:22:51 2018 -0700 drm: add LG eDP panel to quirk database The N value was computed by kernel driver that based on synchronous clock mode. But only specific N value (0x8000) would be acceptable for LG LP140WF6-SPM1 eDP panel which is running at asynchronous clock mode. With the other N value, Tcon will enter BITS mode and display black screen. Add this panel into quirk database and give particular N value when calculate M/N divider. v2: no update v3: add lost commit messages back for version 2 v4: send patch to both intel-gfx and dri-devel Cc: Jani Nikula Cc: Cooper Chiou Cc: Matt Atwood Cc: Maarten Lankhorst Cc: Dhinakaran Pandiyan Cc: Clint Taylor Signed-off-by: Lee, Shawn C Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/1536733371-25004-4-git-send-email-shawn.c.lee@intel.com commit 53ca2edcf033f3368b2dc0ef3cbcc2f47d556d13 Author: Lee, Shawn C Date: Tue Sep 11 23:22:50 2018 -0700 drm: Change limited M/N quirk to constant N quirk. Some DP dongles in particular seem to be fussy about too large link M/N values. Set specific value for N divider can resolve this issue per dongle vendor's comment. So configure N as constant value (0x8000) to instead of reduce M/N formula when specific DP dongle connected. v2: add more comments for issue description and fix typo. v3: add lost commit messages back for version 2 v4: send patch to both intel-gfx and dri-devel Cc: Jani Nikula Cc: Cooper Chiou Cc: Matt Atwood Cc: Maarten Lankhorst Cc: Dhinakaran Pandiyan Cc: Clint Taylor Tested-by: Clint Taylor Signed-off-by: Lee, Shawn C Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/1536733371-25004-3-git-send-email-shawn.c.lee@intel.com commit 0b49bbbd9f10dd5bcce126aa99041a44320767f7 Author: Lee, Shawn C Date: Tue Sep 11 23:22:49 2018 -0700 drm: Add support for device_id based detection. DP quirk list just compare sink or branch device's OUI so far. That means particular vendor's products will be applied specific change. This change would confirm device_id the same or not. Then driver can implement some changes for branch/sink device that really need additional WA. v2: use sizeof instead of hard coded '6' v3: add lost commit messages back for version 2 v4: send patch to both intel-gfx and dri-devel Cc: Jani Nikula Cc: Cooper Chiou Cc: Matt Atwood Cc: Maarten Lankhorst Cc: Dhinakaran Pandiyan Cc: Clint Taylor Tested-by: Clint Taylor Signed-off-by: Lee, Shawn C Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/1536733371-25004-2-git-send-email-shawn.c.lee@intel.com commit 24ef0fd0a1f389b156e6ef0edd71072728831bd9 Author: Arnaldo Carvalho de Melo Date: Tue Sep 18 16:08:02 2018 -0300 perf python: Use -Wno-redundant-decls to build with PYTHON=python3 When building in ClearLinux using 'make PYTHON=python3' with gcc 8.2.1 it fails with: GEN /tmp/build/perf/python/perf.so In file included from /usr/include/python3.7m/Python.h:126, from /git/linux/tools/perf/util/python.c:2: /usr/include/python3.7m/import.h:58:24: error: redundant redeclaration of ‘_PyImport_AddModuleObject’ [-Werror=redundant-decls] PyAPI_FUNC(PyObject *) _PyImport_AddModuleObject(PyObject *, PyObject *); ^~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/python3.7m/import.h:47:24: note: previous declaration of ‘_PyImport_AddModuleObject’ was here PyAPI_FUNC(PyObject *) _PyImport_AddModuleObject(PyObject *name, ^~~~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors error: command 'gcc' failed with exit status 1 And indeed there is a redundant declaration in that Python.h file, one with parameter names and the other without, so just add -Wno-error=redundant-decls to the python setup instructions. Now perf builds with gcc in ClearLinux with the following Dockerfile: # docker.io/acmel/linux-perf-tools-build-clearlinux:latest FROM docker.io/clearlinux:latest MAINTAINER Arnaldo Carvalho de Melo RUN swupd update && \ swupd bundle-add sysadmin-basic-dev RUN mkdir -m 777 -p /git /tmp/build/perf /tmp/build/objtool /tmp/build/linux && \ groupadd -r perfbuilder && \ useradd -m -r -g perfbuilder perfbuilder && \ chown -R perfbuilder.perfbuilder /tmp/build/ /git/ USER perfbuilder COPY rx_and_build.sh / ENV EXTRA_MAKE_ARGS=PYTHON=python3 ENTRYPOINT ["/rx_and_build.sh"] Now to figure out why the build fails with clang, that is present in the above container as detected by the rx_and_build.sh script: clang version 6.0.1 (tags/RELEASE_601/final) Target: x86_64-unknown-linux-gnu Thread model: posix InstalledDir: /usr/sbin make: Entering directory '/git/linux/tools/perf' BUILD: Doing 'make -j4' parallel build HOSTCC /tmp/build/perf/fixdep.o HOSTLD /tmp/build/perf/fixdep-in.o LINK /tmp/build/perf/fixdep Auto-detecting system features: ... dwarf: [ OFF ] ... dwarf_getlocations: [ OFF ] ... glibc: [ OFF ] ... gtk2: [ OFF ] ... libaudit: [ OFF ] ... libbfd: [ OFF ] ... libelf: [ OFF ] ... libnuma: [ OFF ] ... numa_num_possible_cpus: [ OFF ] ... libperl: [ OFF ] ... libpython: [ OFF ] ... libslang: [ OFF ] ... libcrypto: [ OFF ] ... libunwind: [ OFF ] ... libdw-dwarf-unwind: [ OFF ] ... zlib: [ OFF ] ... lzma: [ OFF ] ... get_cpuid: [ OFF ] ... bpf: [ OFF ] Makefile.config:331: *** No gnu/libc-version.h found, please install glibc-dev[el]. Stop. make[1]: *** [Makefile.perf:206: sub-make] Error 2 make: *** [Makefile:70: all] Error 2 make: Leaving directory '/git/linux/tools/perf' Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Thiago Macieira Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-c3khb9ac86s00qxzjrueomme@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit c04c859f439fb4de9039246370d60a07b9b5bcb5 Author: Jérémie Galarneau Date: Wed Aug 29 16:16:48 2018 -0400 perf tools: Initialize perf_data_file fd field Building the perf CTF converter fails with gcc 4.8.4 on Ubuntu 14.04 with the following error: error: missing initializer for field ‘fd’ of ‘struct perf_data_file’ [-Werror=missing-field-initializers] Per 4b838b0db4e9 ("perf tools: Add compression id into 'struct kmod_path'") and the ensuing discussion on the mailing list, it appears that this affects other distributions and gcc versions. Signed-off-by: Jeremie Galarneau Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20180829201648.19588-1-jeremie.galarneau@efficios.com Signed-off-by: Arnaldo Carvalho de Melo commit ed93d0a26012a4a12231c16b18628a324079dc45 Author: Jiri Olsa Date: Thu Sep 13 14:54:11 2018 +0200 perf util: Make copyfile_offset() global It will be used outside of util object in following patches. Committer note: We need to have the header with the definition for loff_t in util.h since we now use it in the copyfile_offset() signature. Also move that prototype closer to the other copyfile_ prefixed functions. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Alexey Budankov Cc: Andi Kleen Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20180913125450.21342-10-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit ded2b8fe2e431d8029ab50238744fcce06a2f0c6 Author: Jiri Olsa Date: Thu Sep 13 14:54:06 2018 +0200 perf tools: Add 'struct perf_mmap' arg to record__write() The struct perf_mmap map argument will hold the file pointer to write the data to. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Alexey Budankov Cc: Andi Kleen Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20180913125450.21342-5-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit e035f4ca2ac97c30842fb03101198a86730de3ad Author: Jiri Olsa Date: Thu Sep 13 14:54:05 2018 +0200 perf auxtrace: Pass struct perf_mmap into mmap__read* functions The perf_mmap struct will hold a file pointer to write the mmap's contents, so we need to propagate it down the stack to record__write callers instead of its member the auxtrace_mmap struct. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Alexey Budankov Cc: Andi Kleen Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20180913125450.21342-4-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 7336555a682c09fd9a3fdf38724493e52653be50 Author: Jiri Olsa Date: Thu Sep 13 14:54:04 2018 +0200 perf tools: Remove perf_tool from event_op3 Now that we keep a perf_tool pointer inside perf_session, there's no need to have a perf_tool argument in the event_op3 callback. Remove it. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Alexey Budankov Cc: Andi Kleen Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20180913125450.21342-3-jolsa@kernel.org [ Fix the builtin-inject.c build for !HAVE_AUXTRACE_SUPPORT ] Signed-off-by: Arnaldo Carvalho de Melo commit 89f1688a57a8f0b685fccd648e601a1f830fa744 Author: Jiri Olsa Date: Thu Sep 13 14:54:03 2018 +0200 perf tools: Remove perf_tool from event_op2 Now that we keep a perf_tool pointer inside perf_session, there's no need to have a perf_tool argument in the event_op2 callback. Remove it. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Alexey Budankov Cc: Andi Kleen Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20180913125450.21342-2-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit e381d1c21eea186daed6834af444575e06841355 Author: Ding Xiang Date: Fri Sep 7 09:34:42 2018 +0800 perf bpf-loader: use PTR_ERR_OR_ZERO inetead of return code Use PTR_ERR_OR_ZERO() in bpf__setup_stdout() return code instead of open coded equivalent. Signed-off-by: Ding Xiang Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1536284082-23466-2-git-send-email-dingxiang@cmss.chinamobile.com Signed-off-by: Arnaldo Carvalho de Melo commit 01ab2e91103b8c23dfedfeb799bc8b810d585bd0 Author: Ding Xiang Date: Fri Sep 7 09:34:41 2018 +0800 tools include: Adopt PTR_ERR_OR_ZERO from the kernel err.h header Add PTR_ERR_OR_ZERO, so that tools can use it, just like the kernel. Signed-off-by: Ding Xiang Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1536284082-23466-1-git-send-email-dingxiang@cmss.chinamobile.com Signed-off-by: Arnaldo Carvalho de Melo commit 53da12e013498c4eca592939bb18a5dbd1d228c9 Author: Jiri Olsa Date: Fri Sep 7 12:24:55 2018 +0200 perf ordered_events: Prevent crossing max_alloc_size Stephane reported a possible issue in the ordered events code, which could lead to allocating more memory than guarded by max_alloc_size. He also suggested the fix to properly check that the new size is below the max_alloc_size limit. Reported-by: Stephane Eranian Suggested-by: Stephane Eranian Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20180907102455.7030-2-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit d5ceb62b36545b597e89adb5eb778c3e15431c10 Author: Jiri Olsa Date: Fri Sep 7 12:24:54 2018 +0200 perf ordered_events: Add 'struct ordered_events_buffer' layer When ordering events, we use preallocated buffers to store separate events. Those buffers currently don't have their own struct, but since they are basically an array of 'struct ordered_event' objects, we use the first event to hold buffers data - list head, that holds all buffers together: struct ordered_events { ... struct ordered_event *buffer; ... }; struct ordered_event { u64 timestamp; u64 file_offset; union perf_event *event; struct list_head list; }; This is quite convoluted and error prone as demonstrated by free-ing issue discovered and fixed by Stephane in here [1]. This patch adds the 'struct ordered_events_buffer' object, that holds the buffer data and frees it up properly. [1] - https://marc.info/?l=linux-kernel&m=153376761329335&w=2 Reported-by: Stephane Eranian Signed-off-by: Jiri Olsa Tested-by: Stephane Eranian Acked-by: Namhyung Kim Cc: Alexander Shishkin Cc: Andi Kleen Cc: David Ahern Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20180907102455.7030-1-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 0823c68b054bca9dc321adea829af5cf36afb30b Author: Hari Bathini Date: Fri Sep 14 19:36:02 2018 +0530 powerpc/fadump: re-register firmware-assisted dump if already registered Firmware-Assisted Dump (FADump) needs to be registered again after any memory hot add/remove operation to update the crash memory ranges. But currently, the kernel returns '-EEXIST' if we try to register without uregistering it first. This could expose the system to racing issues while unregistering and registering FADump from userspace during udev events. Spare the userspace of this and let it be taken care of in the kernel space for a simpler interface. Since this change, running 'echo 1 > /sys/kernel/fadump_registered' would result in re-regisering (unregistering and registering) FADump, if it was already registered. Signed-off-by: Hari Bathini Acked-by: Mahesh Salgaonkar Signed-off-by: Michael Ellerman commit 74422e2b19391e0bb9f11b0ab4522bbf7f93c4ba Author: Suraj Jitindar Singh Date: Wed Sep 5 12:09:51 2018 +1000 powerpc/pseries: Remove VLA from lparcfg_write() In lparcfg_write we hard code kbuf_sz and then use this as the variable length of kbuf creating a variable length array. Since we're hard coding the length anyway just define the array using this as the length and remove the need for kbuf_sz, thus removing the variable length array. Signed-off-by: Suraj Jitindar Singh Reviewed-by: Joel Stanley Signed-off-by: Michael Ellerman commit ab91239942a900e209f724886273060d9288f6fb Author: Suraj Jitindar Singh Date: Wed Sep 5 12:09:50 2018 +1000 powerpc/prom: Remove VLA in prom_check_platform_support() In prom_check_platform_support() we retrieve and parse the "ibm,arch-vec-5-platform-support" property of the chosen node. Currently we use a variable length array however to avoid this use an array of constant length 8. This property is used to indicate the supported options of vector 5 bytes 23-26 of the ibm,architecture.vec node. Each of these options is a pair of bytes, thus for 4 options we have a max length of 8 bytes. Signed-off-by: Suraj Jitindar Singh Reviewed-by: Joel Stanley Signed-off-by: Michael Ellerman commit e00d93ac9a189673028ac125a74b9bc8ae73eebc Author: Anton Blanchard Date: Fri Sep 14 13:36:48 2018 +0930 powerpc: Fix duplicate const clang warning in user access code This re-applies commit b91c1e3e7a6f ("powerpc: Fix duplicate const clang warning in user access code") (Jun 2015) which was undone in commits: f2ca80905929 ("powerpc/sparse: Constify the address pointer in __get_user_nosleep()") (Feb 2017) d466f6c5cac1 ("powerpc/sparse: Constify the address pointer in __get_user_nocheck()") (Feb 2017) f84ed59a612d ("powerpc/sparse: Constify the address pointer in __get_user_check()") (Feb 2017) We see a large number of duplicate const errors in the user access code when building with llvm/clang: include/linux/pagemap.h:576:8: warning: duplicate 'const' declaration specifier [-Wduplicate-decl-specifier] ret = __get_user(c, uaddr); The problem is we are doing const __typeof__(*(ptr)), which will hit the warning if ptr is marked const. Removing const does not seem to have any effect on GCC code generation. Signed-off-by: Anton Blanchard Signed-off-by: Joel Stanley Reviewed-by: Nick Desaulniers Signed-off-by: Michael Ellerman commit ee9d21b3b3583712029a0db65a4b7c081d08d3b3 Author: Joel Stanley Date: Fri Sep 14 13:36:47 2018 +0930 powerpc/boot: Ensure _zimage_start is a weak symbol When building with clang crt0's _zimage_start is not marked weak, which breaks the build when linking the kernel image: $ objdump -t arch/powerpc/boot/crt0.o |grep _zimage_start$ 0000000000000058 g .text 0000000000000000 _zimage_start ld: arch/powerpc/boot/wrapper.a(crt0.o): in function '_zimage_start': (.text+0x58): multiple definition of '_zimage_start'; arch/powerpc/boot/pseries-head.o:(.text+0x0): first defined here Clang requires the .weak directive to appear after the symbol is declared. The binutils manual says: This directive sets the weak attribute on the comma separated list of symbol names. If the symbols do not already exist, they will be created. So it appears this is different with clang. The only reference I could see for this was an OpenBSD mailing list post[1]. Changing it to be after the declaration fixes building with Clang, and still works with GCC. $ objdump -t arch/powerpc/boot/crt0.o |grep _zimage_start$ 0000000000000058 w .text 0000000000000000 _zimage_start Reported to clang as https://bugs.llvm.org/show_bug.cgi?id=38921 [1] https://groups.google.com/forum/#!topic/fa.openbsd.tech/PAgKKen2YCY Signed-off-by: Joel Stanley Reviewed-by: Nick Desaulniers Signed-off-by: Michael Ellerman commit cbc39809a398b1a30c2bdb0f3123eef18c28a729 Author: Joel Stanley Date: Tue Sep 18 13:06:17 2018 +0930 powerpc/configs: Update skiroot defconfig Disable new features from recent releases, and clean out some other unused options: - Enable EXPERT, so we can disable some things - Disable non-powerpc BPF decoders - Disable TASKSTATS - Disable unused syscalls - Set more things to be modules - Turn off unused network vendors - PPC_OF_BOOT_TRAMPOLINE and FB_OF are unused on powernv - Drop unused Radeon and Matrox GPU drivers - IPV6 support landed in petitboot - Bringup related command line powersave=off dropped, switch to quiet Set CONFIG_I2C_CHARDEV=y as the module is not loaded automatically, and without this i2cget etc. will fail in the skiroot environment. This defconfig gets us build coverage of KERNEL_XZ, which was broken in the 4.19 merge window for powerpc. Signed-off-by: Joel Stanley Signed-off-by: Michael Ellerman commit 85a88cabad57d26d826dd94ea34d3a785824d802 Author: Nathan Fontenot Date: Mon Sep 17 14:14:02 2018 -0500 powerpc/pseries: Disable CPU hotplug across migrations When performing partition migrations all present CPUs must be online as all present CPUs must make the H_JOIN call as part of the migration process. Once all present CPUs make the H_JOIN call, one CPU is returned to make the rtas call to perform the migration to the destination system. During testing of migration and changing the SMT state we have found instances where CPUs are offlined, as part of the SMT state change, before they make the H_JOIN call. This results in a hung system where every CPU is either in H_JOIN or offline. To prevent this this patch disables CPU hotplug during the migration process. Signed-off-by: Nathan Fontenot Reviewed-by: Tyrel Datwyler Signed-off-by: Michael Ellerman commit fd12527a1da42dcb906b694e01794e8d438f7d10 Author: Nathan Fontenot Date: Mon Sep 10 09:57:07 2018 -0500 powerpc/pseries: Remove unneeded uses of dlpar work queue There are three instances in which dlpar hotplug events are invoked; handling a hotplug interrupt (in a kvm guest), handling a dlpar request through sysfs, and updating LMB affinity when handling a PRRN event. Only in the case of handling a hotplug interrupt do we have to put the work on a workqueue, the other cases can handle the dlpar request directly. This patch exports the handle_dlpar_errorlog() function so that dlpar hotplug events can be handled directly and updates the two instances mentioned above to use the direct invocation. Signed-off-by: Nathan Fontenot Signed-off-by: Michael Ellerman commit cd24e457fd8b2d087d9236700c8d2957054598bf Author: Nathan Fontenot Date: Mon Sep 10 09:57:00 2018 -0500 powerpc/pseries: Remove prrn_work workqueue When a PRRN event is received we are already running in a worker thread. Instead of spawning off another worker thread on the prrn_work workqueue to handle the PRRN event we can just call the PRRN handler routine directly. With this update we can also pass the scope variable for the PRRN event directly to the handler instead of it being a global variable. This patch fixes the following oops mnessage we are seeing in PRRN testing: Oops: Bad kernel stack pointer, sig: 6 [#1] SMP NR_CPUS=2048 NUMA pSeries Modules linked in: nfsv3 nfs_acl rpcsec_gss_krb5 auth_rpcgss nfsv4 dns_resolver nfs lockd grace sunrpc fscache binfmt_misc reiserfs vfat fat rpadlpar_io(X) rpaphp(X) tcp_diag udp_diag inet_diag unix_diag af_packet_diag netlink_diag af_packet xfs libcrc32c dm_service_time ibmveth(X) ses enclosure scsi_transport_sas rtc_generic btrfs xor raid6_pq sd_mod ibmvscsi(X) scsi_transport_srp ipr(X) libata sg dm_multipath dm_mod scsi_dh_rdac scsi_dh_emc scsi_dh_alua scsi_mod autofs4 Supported: Yes, External 54 CPU: 7 PID: 18967 Comm: kworker/u96:0 Tainted: G X 4.4.126-94.22-default #1 Workqueue: pseries hotplug workque pseries_hp_work_fn task: c000000775367790 ti: c00000001ebd4000 task.ti: c00000070d140000 NIP: 0000000000000000 LR: 000000001fb3d050 CTR: 0000000000000000 REGS: c00000001ebd7d40 TRAP: 0700 Tainted: G X (4.4.126-94.22-default) MSR: 8000000102081000 <41,VEC,ME5 CR: 28000002 XER: 20040018 4 CFAR: 000000001fb3d084 40 419 1 3 GPR00: 000000000000000040000000000010007 000000001ffff400 000000041fffe200 GPR04: 000000000000008050000000000000000 000000001fb15fa8 0000000500000500 GPR08: 000000000001f40040000000000000001 0000000000000000 000005:5200040002 GPR12: 00000000000000005c000000007a05400 c0000000000e89f8 000000001ed9f668 GPR16: 000000001fbeff944000000001fbeff94 000000001fb545e4 0000006000000060 GPR20: ffffffffffffffff4ffffffffffffffff 0000000000000000 0000000000000000 GPR24: 00000000000000005400000001fb3c000 0000000000000000 000000001fb1b040 GPR28: 000000001fb240004000000001fb440d8 0000000000000008 0000000000000000 NIP [0000000000000000] 5 (null) LR [000000001fb3d050] 031fb3d050 Call Trace: 4 Instruction dump: 4 5:47 12 2 XXXXXXXX XXXXXXXX XXXXX4XX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXX5XX XXXXXXXX 60000000 60000000 60000000 60000000 ---[ end trace aa5627b04a7d9d6b ]--- 3NMI watchdog: BUG: soft lockup - CPU#27 stuck for 23s! [kworker/27:0:13903] Modules linked in: nfsv3 nfs_acl rpcsec_gss_krb5 auth_rpcgss nfsv4 dns_resolver nfs lockd grace sunrpc fscache binfmt_misc reiserfs vfat fat rpadlpar_io(X) rpaphp(X) tcp_diag udp_diag inet_diag unix_diag af_packet_diag netlink_diag af_packet xfs libcrc32c dm_service_time ibmveth(X) ses enclosure scsi_transport_sas rtc_generic btrfs xor raid6_pq sd_mod ibmvscsi(X) scsi_transport_srp ipr(X) libata sg dm_multipath dm_mod scsi_dh_rdac scsi_dh_emc scsi_dh_alua scsi_mod autofs4 Supported: Yes, External CPU: 27 PID: 13903 Comm: kworker/27:0 Tainted: G D X 4.4.126-94.22-default #1 Workqueue: events prrn_work_fn task: c000000747cfa390 ti: c00000074712c000 task.ti: c00000074712c000 NIP: c0000000008002a8 LR: c000000000090770 CTR: 000000000032e088 REGS: c00000074712f7b0 TRAP: 0901 Tainted: G D X (4.4.126-94.22-default) MSR: 8000000100009033 CR: 22482044 XER: 20040000 CFAR: c0000000008002c4 SOFTE: 1 GPR00: c000000000090770 c00000074712fa30 c000000000f09800 c000000000fa1928 6:02 GPR04: c000000775f5e000 fffffffffffffffe 0000000000000001 c000000000f42db8 GPR08: 0000000000000001 0000000080000007 0000000000000000 0000000000000000 GPR12: 8006210083180000 c000000007a14400 NIP [c0000000008002a8] _raw_spin_lock+0x68/0xd0 LR [c000000000090770] mobility_rtas_call+0x50/0x100 Call Trace: 59 5 [c00000074712fa60] [c000000000090770] mobility_rtas_call+0x50/0x100 [c00000074712faf0] [c000000000090b08] pseries_devicetree_update+0xf8/0x530 [c00000074712fc20] [c000000000031ba4] prrn_work_fn+0x34/0x50 [c00000074712fc40] [c0000000000e0390] process_one_work+0x1a0/0x4e0 [c00000074712fcd0] [c0000000000e0870] worker_thread+0x1a0/0x6105:57 2 [c00000074712fd80] [c0000000000e8b18] kthread+0x128/0x150 [c00000074712fe30] [c0000000000096f8] ret_from_kernel_thread+0x5c/0x64 Instruction dump: 2c090000 40c20010 7d40192d 40c2fff0 7c2004ac 2fa90000 40de0018 5:540030 3 e8010010 ebe1fff8 7c0803a6 4e800020 <7c210b78> e92d0000 89290009 792affe3 Signed-off-by: John Allen Signed-off-by: Haren Myneni Signed-off-by: Nathan Fontenot Signed-off-by: Michael Ellerman commit 063b8b1251fd069f3740339fca56119d218f11ba Author: Nathan Fontenot Date: Fri Apr 20 15:29:48 2018 -0500 powerpc/pseries/memory-hotplug: Only update DT once per memory DLPAR request The updates to powerpc numa and memory hotplug code now use the in-kernel LMB array instead of the device tree. This change allows the pseries memory DLPAR code to only update the device tree once after successfully handling a DLPAR request. Prior to the in-kernel LMB array, the numa code looked up the affinity for memory being added in the device tree, the code now looks this up in the LMB array. This change means the memory hotplug code can just update the affinity for an LMB in the LMB array instead of updating the device tree. This also provides a savings in kernel memory. When updating the device tree old properties are never free'ed since there is no usecount on properties. This behavior leads to a new copy of the property being allocated every time a LMB is added or removed (i.e. a request to add 100 LMBs creates 100 new copies of the property). With this update only a single new property is created when a DLPAR request completes successfully. Signed-off-by: Nathan Fontenot Signed-off-by: Michael Ellerman commit 6977f95e63b9b3fb4a5973481a800dd9f48a1338 Author: Nicholas Piggin Date: Fri Sep 14 15:08:54 2018 +1000 powerpc: avoid -mno-sched-epilog on GCC 4.9 and newer Signed-off-by: Nicholas Piggin Reviewed-by: Joel Stanley Signed-off-by: Michael Ellerman commit 2a056f58fd33ccc6a0261b552b0f17e7fa4a12f3 Author: Nicholas Piggin Date: Fri Sep 14 15:08:53 2018 +1000 powerpc: consolidate -mno-sched-epilog into FTRACE flags Signed-off-by: Nicholas Piggin Reviewed-by: Joel Stanley Signed-off-by: Michael Ellerman commit f2910f0e6835339e6ce82cef22fa15718b7e3bfa Author: Nicholas Piggin Date: Fri Sep 14 15:08:52 2018 +1000 powerpc: remove old GCC version checks GCC 4.6 is the minimum supported now. Signed-off-by: Nicholas Piggin Reviewed-by: Joel Stanley Signed-off-by: Michael Ellerman commit 89ca4e126a3f519ccbd42670b38d78700802c10b Author: Nicholas Piggin Date: Sat Sep 15 01:30:56 2018 +1000 powerpc/64s/hash: Add a SLB preload cache When switching processes, currently all user SLBEs are cleared, and a few (exec_base, pc, and stack) are preloaded. In trivial testing with small apps, this tends to miss the heap and low 256MB segments, and it will also miss commonly accessed segments on large memory workloads. Add a simple round-robin preload cache that just inserts the last SLB miss into the head of the cache and preloads those at context switch time. Every 256 context switches, the oldest entry is removed from the cache to shrink the cache and require fewer slbmte if they are unused. Much more could go into this, including into the SLB entry reclaim side to track some LRU information etc, which would require a study of large memory workloads. But this is a simple thing we can do now that is an obvious win for common workloads. With the full series, process switching speed on the context_switch benchmark on POWER9/hash (with kernel speculation security masures disabled) increases from 140K/s to 178K/s (27%). POWER8 does not change much (within 1%), it's unclear why it does not see a big gain like POWER9. Booting to busybox init with 256MB segments has SLB misses go down from 945 to 69, and with 1T segments 900 to 21. These could almost all be eliminated by preloading a bit more carefully with ELF binary loading. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman commit 2e1626744e8da01eb5a2a0aaa3f365e41f1feb49 Author: Nicholas Piggin Date: Sat Sep 15 01:30:55 2018 +1000 powerpc/64s/hash: provide arch_setup_exec hooks for hash slice setup This will be used by the SLB code in the next patch, but for now this sets the slb_addr_limit to the correct size for 32-bit tasks. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman commit e83cbf7fb7d17618a5d8a415d5c7bb760812a5cb Author: Nicholas Piggin Date: Sat Sep 15 01:30:54 2018 +1000 powerpc/64s: xmon do not dump hash fields when using radix mode Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman commit 655deecf67b240bf7bb4e73df4e1235900c26a01 Author: Nicholas Piggin Date: Sat Sep 15 01:30:53 2018 +1000 powerpc/64s/hash: SLB allocation status bitmaps Add 32-entry bitmaps to track the allocation status of the first 32 SLB entries, and whether they are user or kernel entries. These are used to allocate free SLB entries first, before resorting to the round robin allocator. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman commit 8fed04d0f6aedf99b3d811ba58d38bb7f938a47a Author: Nicholas Piggin Date: Sat Sep 15 01:30:52 2018 +1000 powerpc/64s/hash: remove user SLB data from the paca User SLB mappig data is copied into the PACA from the mm->context so it can be accessed by the SLB miss handlers. After the C conversion, SLB miss handlers now run with relocation on, and user SLB misses are able to take recursive kernel SLB misses, so the user SLB mapping data can be removed from the paca and accessed directly. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman commit 5e46e29e6a977a71f6b5bed414b7bcdbff5a6a43 Author: Nicholas Piggin Date: Sat Sep 15 01:30:51 2018 +1000 powerpc/64s/hash: convert SLB miss handlers to C This patch moves SLB miss handlers completely to C, using the standard exception handler macros to set up the stack and branch to C. This can be done because the segment containing the kernel stack is always bolted, so accessing it with relocation on will not cause an SLB exception. Arbitrary kernel memory may not be accessed when handling kernel space SLB misses, so care should be taken there. However user SLB misses can access any kernel memory, which can be used to move some fields out of the paca (in later patches). User SLB misses could quite easily reconcile IRQs and set up a first class kernel environment and exit via ret_from_except, however that doesn't seem to be necessary at the moment, so we only do that if a bad fault is encountered. [ Credit to Aneesh for bug fixes, error checks, and improvements to bad address handling, etc ] Signed-off-by: Nicholas Piggin Since RFC: - Added MSR[RI] handling - Fixed up a register loss bug exposed by irq tracing (Aneesh) - Reject misses outside the defined kernel regions (Aneesh) - Added several more sanity checks and error handling (Aneesh), we may look at consolidating these tests and tightenig up the code but for a first pass we decided it's better to check carefully. Since v1: - Fixed SLB cache corruption (Aneesh) - Fixed untidy SLBE allocation "leak" in get_vsid error case - Now survives some stress testing on real hardware Signed-off-by: Michael Ellerman commit 82d8f4c22f3514eface7e082750bc917193d91f9 Author: Nicholas Piggin Date: Sat Sep 15 01:30:50 2018 +1000 powerpc/64s/hash: Use POWER9 SLBIA IH=3 variant in switch_slb POWER9 introduces SLBIA IH=3, which invalidates all SLB entries and associated lookaside information that have a class value of 1, which Linux assigns to user addresses. This matches what switch_slb wants, and allows a simple fast implementation that avoids the slb_cache complexity. As a side-effect, the POWER5 < DD2.1 SLB invalidation workaround is also avoided on POWER9. Process context switching rate is improved about 2.2% for a small process that hits the slb cache which is the best case for the current code. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman commit 5141c182d75b4004c41ac2dc5af081b457b3e8cb Author: Nicholas Piggin Date: Sat Sep 15 01:30:49 2018 +1000 powerpc/64s/hash: Use POWER6 SLBIA IH=1 variant in switch_slb The SLBIA IH=1 hint will remove all non-zero SLBEs, but only invalidate ERAT entries associated with a class value of 1, for processors that support the hint (e.g., POWER6 and newer), which Linux assigns to user addresses. This prevents kernel ERAT entries from being invalidated when context switchig (if the thread faulted in more than 8 user SLBEs). Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman commit 85376e2a17ec152e76f6a87fcb66332a68926218 Author: Nicholas Piggin Date: Sat Sep 15 01:30:48 2018 +1000 powerpc/64s/hash: remove the vmalloc segment from the bolted SLB Remove the vmalloc segment from bolted SLBEs. This is not required to be bolted, and seems like it was added to help pre-load the SLB on context switch. However there are now other segments like the vmemmap segment and non-zero node memory that often take misses after a context switch, so it is better to solve this in a more general way. A subsequent change will track free SLB entries and uses those rather than round-robin overwrite valid entries, which makes it far less likely for kernel SLBEs to be evicted after they are installed. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman commit 8b92887ced2e3fce223412487f99d4ef3f07b490 Author: Nicholas Piggin Date: Sat Sep 15 01:30:47 2018 +1000 powerpc/64s/hash: move POWER5 < DD2.1 slbie workaround where it is needed The POWER5 < DD2.1 issue is that slbie needs to be issued more than once. It came in with this change: ChangeSet@1.1608, 2004-04-29 07:12:31-07:00, david@gibson.dropbear.id.au [PATCH] POWER5 erratum workaround Early POWER5 revisions ( [mpe: Retain slbie_data initialisation to avoid compiler warning] Signed-off-by: Michael Ellerman commit 505ea82eabd2dfc69ca7a50c2996dbe969a89bec Author: Nicholas Piggin Date: Sat Sep 15 01:30:46 2018 +1000 powerpc/64s/hash: avoid the POWER5 < DD2.1 slb invalidate workaround on POWER8/9 I only have POWER8/9 to test, so just remove it for those. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman commit 09b4438db13fa83b6219aee5993711a2aa2a0c64 Author: Nicholas Piggin Date: Sat Sep 15 01:30:45 2018 +1000 powerpc/64s/hash: Fix stab_rr off by one initialization This causes SLB alloation to start 1 beyond the start of the SLB. There is no real problem because after it wraps it stats behaving properly, it's just surprisig to see when looking at SLB traces. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman commit db7d31ac04133fc18893725d348fabf91d6e808e Author: Mahesh Salgaonkar Date: Tue Sep 11 19:57:23 2018 +0530 powernv/pseries: consolidate code for mce early handling. Now that other platforms also implements real mode mce handler, lets consolidate the code by sharing existing powernv machine check early code. Rename machine_check_powernv_early to machine_check_common_early and reuse the code. Signed-off-by: Mahesh Salgaonkar Signed-off-by: Michael Ellerman commit c6d15258cdf1c197cad7b11b9848e79068dd21e0 Author: Mahesh Salgaonkar Date: Tue Sep 11 19:57:15 2018 +0530 powerpc/pseries: Dump the SLB contents on SLB MCE errors. If we get a machine check exceptions due to SLB errors then dump the current SLB contents which will be very much helpful in debugging the root cause of SLB errors. Introduce an exclusive buffer per cpu to hold faulty SLB entries. In real mode mce handler saves the old SLB contents into this buffer accessible through paca and print it out later in virtual mode. With this patch the console will log SLB contents like below on SLB MCE errors: [ 507.297236] SLB contents of cpu 0x1 [ 507.297237] Last SLB entry inserted at slot 16 [ 507.297238] 00 c000000008000000 400ea1b217000500 [ 507.297239] 1T ESID= c00000 VSID= ea1b217 LLP:100 [ 507.297240] 01 d000000008000000 400d43642f000510 [ 507.297242] 1T ESID= d00000 VSID= d43642f LLP:110 [ 507.297243] 11 f000000008000000 400a86c85f000500 [ 507.297244] 1T ESID= f00000 VSID= a86c85f LLP:100 [ 507.297245] 12 00007f0008000000 4008119624000d90 [ 507.297246] 1T ESID= 7f VSID= 8119624 LLP:110 [ 507.297247] 13 0000000018000000 00092885f5150d90 [ 507.297247] 256M ESID= 1 VSID= 92885f5150 LLP:110 [ 507.297248] 14 0000010008000000 4009e7cb50000d90 [ 507.297249] 1T ESID= 1 VSID= 9e7cb50 LLP:110 [ 507.297250] 15 d000000008000000 400d43642f000510 [ 507.297251] 1T ESID= d00000 VSID= d43642f LLP:110 [ 507.297252] 16 d000000008000000 400d43642f000510 [ 507.297253] 1T ESID= d00000 VSID= d43642f LLP:110 [ 507.297253] ---------------------------------- [ 507.297254] SLB cache ptr value = 3 [ 507.297254] Valid SLB cache entries: [ 507.297255] 00 EA[0-35]= 7f000 [ 507.297256] 01 EA[0-35]= 1 [ 507.297257] 02 EA[0-35]= 1000 [ 507.297257] Rest of SLB cache entries: [ 507.297258] 03 EA[0-35]= 7f000 [ 507.297258] 04 EA[0-35]= 1 [ 507.297259] 05 EA[0-35]= 1000 [ 507.297260] 06 EA[0-35]= 12 [ 507.297260] 07 EA[0-35]= 7f000 Suggested-by: Aneesh Kumar K.V Suggested-by: Michael Ellerman Signed-off-by: Mahesh Salgaonkar Reviewed-by: Nicholas Piggin Signed-off-by: Michael Ellerman commit 8f0b80561f217e3f379d7819a6c6b429bebdaea6 Author: Mahesh Salgaonkar Date: Tue Sep 11 19:57:07 2018 +0530 powerpc/pseries: Display machine check error details. Extract the MCE error details from RTAS extended log and display it to console. With this patch you should now see mce logs like below: [ 142.371818] Severe Machine check interrupt [Recovered] [ 142.371822] NIP [d00000000ca301b8]: init_module+0x1b8/0x338 [bork_kernel] [ 142.371822] Initiator: CPU [ 142.371823] Error type: SLB [Multihit] [ 142.371824] Effective address: d00000000ca70000 Signed-off-by: Mahesh Salgaonkar Signed-off-by: Michael Ellerman commit a43c1590426c44a5c6bbaf51b70a36a5c6d86914 Author: Mahesh Salgaonkar Date: Tue Sep 11 19:57:00 2018 +0530 powerpc/pseries: Flush SLB contents on SLB MCE errors. On pseries, as of today system crashes if we get a machine check exceptions due to SLB errors. These are soft errors and can be fixed by flushing the SLBs so the kernel can continue to function instead of system crash. We do this in real mode before turning on MMU. Otherwise we would run into nested machine checks. This patch now fetches the rtas error log in real mode and flushes the SLBs on SLB/ERAT errors. Signed-off-by: Mahesh Salgaonkar Signed-off-by: Michal Suchanek Reviewed-by: Nicholas Piggin Signed-off-by: Michael Ellerman commit 04fce21c9db54695389200b50b0b7a7866232ba6 Author: Mahesh Salgaonkar Date: Tue Sep 11 19:56:52 2018 +0530 powerpc/pseries: Define MCE error event section. On pseries, the machine check error details are part of RTAS extended event log passed under Machine check exception section. This patch adds the definition of rtas MCE event section and related helper functions. Signed-off-by: Mahesh Salgaonkar Signed-off-by: Michael Ellerman commit 44d947eff19d64384efc06069509db7a0a1103b0 Author: Breno Leitao Date: Wed Sep 12 17:31:05 2018 -0300 selftests/powerpc: Do not fail with reschedule There are cases where the test is not expecting to have the transaction aborted, but, the test process might have been rescheduled, either in the OS level or by KVM (if it is running on a KVM guest machine). The process reschedule will cause a treclaim/recheckpoint which will cause the transaction to doom, aborting the transaction as soon as the process is rescheduled back to the CPU. This might cause the test to fail, but this is not a failure in essence. If that is the case, TEXASR[FC] is indicated with either TM_CAUSE_RESCHEDULE or TM_CAUSE_KVM_RESCHEDULE for KVM interruptions. In this scenario, ignore these two failures and avoid the whole test to return failure. Signed-off-by: Breno Leitao Reviewed-by: Gustavo Romero Signed-off-by: Michael Ellerman commit 984ecdd68de0fa1f63ce205d6c19ef5a7bc67b40 Author: Breno Leitao Date: Tue Aug 21 15:44:48 2018 -0300 powerpc/iommu: Avoid derefence before pointer check The tbl pointer is being derefenced by IOMMU_PAGE_SIZE prior the check if it is not NULL. Just moving the dereference code to after the check, where there will be guarantee that 'tbl' will not be NULL. Signed-off-by: Breno Leitao Signed-off-by: Michael Ellerman commit 8ac9e5bfd8cf41ef106ac97267117e5209627c74 Author: Breno Leitao Date: Thu Aug 23 20:26:39 2018 -0300 powerpc/xive: Use xive_cpu->chip_id instead of looking it up again Function xive_native_get_ipi() might use chip_id without it being initialized, if the CPU node is not found, as reported by smatch: error: uninitialized symbol 'chip_id' As suggested by Cédric, we can use xc->chip_id instead of consulting the device tree for chip id, which is safe since xive_prepare_cpu() should have initialized ->chip_id by the time xive_native_get_ipi() is called. Signed-off-by: Breno Leitao Reviewed-by: Cédric Le Goater [mpe: Tweak change log] Signed-off-by: Michael Ellerman commit 6f8e45f7eb1bee5efdbe4a9cfe4a45627403c5fb Author: Christophe Lombard Date: Tue Aug 14 14:45:15 2018 +0200 ocxl: Fix access to the AFU Descriptor Data The AFU Information DVSEC capability is a means to extract common, general information about all of the AFUs associated with a Function independent of the specific functionality that each AFU provides. Write in the AFU Index field allows to access to the descriptor data for each AFU. With the current code, we are not able to access to these specific data when the index >= 1 because we are writing to the wrong location. All requests to the data of each AFU are pointing to those of the AFU 0, which could have impacts when using a card with more than one AFU per function. This patch fixes the access to the AFU Descriptor Data indexed by the AFU Info Index field. Fixes: 5ef3166e8a32 ("ocxl: Driver code for 'generic' opencapi devices") Cc: stable # 4.16 Signed-off-by: Christophe Lombard Acked-by: Frederic Barrat Acked-by: Andrew Donnellan Signed-off-by: Michael Ellerman commit 3f7daf3d7582dc6628ac40a9045dd1bbd80c5f35 Author: Rashmica Gupta Date: Fri Aug 17 14:25:01 2018 +1000 powerpc/memtrace: Remove memory in chunks When hot-removing memory release_mem_region_adjustable() splits iomem resources if they are not the exact size of the memory being hot-deleted. Adding this memory back to the kernel adds a new resource. Eg a node has memory 0x0 - 0xfffffffff. Hot-removing 1GB from 0xf40000000 results in the single resource 0x0-0xfffffffff being split into two resources: 0x0-0xf3fffffff and 0xf80000000-0xfffffffff. When we hot-add the memory back we now have three resources: 0x0-0xf3fffffff, 0xf40000000-0xf7fffffff, and 0xf80000000-0xfffffffff. This is an issue if we try to remove some memory that overlaps resources. Eg when trying to remove 2GB at address 0xf40000000, release_mem_region_adjustable() fails as it expects the chunk of memory to be within the boundaries of a single resource. We then get the warning: "Unable to release resource" and attempting to use memtrace again gives us this error: "bash: echo: write error: Resource temporarily unavailable" This patch makes memtrace remove memory in chunks that are always the same size from an address that is always equal to end_of_memory - n*size, for some n. So hotremoving and hotadding memory of different sizes will now not attempt to remove memory that spans multiple resources. Signed-off-by: Rashmica Gupta Signed-off-by: Michael Ellerman commit 8f44ca223345a7d02e18ed4e70ff95178434e137 Author: Jiandi An Date: Wed Sep 19 07:09:53 2018 +0000 drm/virtio: add dma sync for dma mapped virtio gpu framebuffer pages With virtio gpu ttm-pages being dma mapped, dma sync is needed when swiotlb is used as bounce buffers, before TRANSFER_TO_HOST_2D/3D commands are sent. Signed-off-by: Jiandi An Link: http://patchwork.freedesktop.org/patch/msgid/20180919070931.91168-1-jiandi.an@amd.com Signed-off-by: Gerd Hoffmann commit bf3741ada33bb4fabec99538b8014c054854912b Author: Lorenzo Bianconi Date: Wed Sep 12 17:19:36 2018 +0200 mt76x0: usb: remove mt76_fw definition Remove mt76_fw dependency from mt76x0u_upload_firmware routine since it does not define firmware layout properly. Moreover use mt76_poll_msec utility routine to check if the fw is properly running Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 196e978ca1da89b70ccaf0ae52b59a95ce94a815 Author: Lorenzo Bianconi Date: Tue Sep 11 23:09:30 2018 +0200 mt76x0: remove unused usb header file Remove unused usb header file and move mt76x0 firmware definition in usb.c Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 280415714ca1eca47582c356e981a05e4d81ce48 Author: Lorenzo Bianconi Date: Tue Sep 11 23:09:29 2018 +0200 mt76x0: remove mcu source file Remove mcu.c source file since it contains just 'one-line' function that is shared between PCI and USB code Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 576ecf653836e19f18b332b0326e32977e258ac6 Author: Stanislaw Gruszka Date: Tue Sep 11 23:09:28 2018 +0200 mt76x0: usb: move firmware loading to usb.c Firmware loading is usb specific, move it to usb.c file. Signed-off-by: Stanislaw Gruszka Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit c12128ce44b04a987c4eb0f733cc99c4dd50d45a Author: Felix Fietkau Date: Fri Jul 13 16:26:15 2018 +0200 mt76: use a per rx queue page fragment cache Using the NAPI or netdev frag cache along with other drivers can lead to 32 KiB pages being held for a long time, despite only being used for very few page fragments. This can happen if the driver grabs one or two fragments for rx ring refill, while other drivers use (and free up) the remaining fragments. The 32 KiB higher-order page can only be freed once all users have freed their fragments. Depending on the traffic patterns, this can waste a lot of memory and look a lot like a memory leak. Signed-off-by: Felix Fietkau commit 8842d485cbadaef6724dd4138367e7ddf3ef9dcf Author: Lorenzo Bianconi Date: Sun Sep 9 23:58:05 2018 +0200 mt76x2: move mt76x2_phy_tssi_compensate in mt76x2-common module Move mt76x2_phy_tssi_compensate routine in mt76x2-common module since it is shared between mt76x2 and mt76x2u drivers Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit edaa580bc830e5197272c80cf12c98cf16e48bb7 Author: Lorenzo Bianconi Date: Sun Sep 9 23:58:04 2018 +0200 mt76: move shared mcu_calibrate routine in mt76x02-lib module Move mcu_calibrate routine in mt76x02-lib module since it is shared between USB and PCI code. Moreover remove duplicated code Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit bc3669017282cee1cde0e770956723fcb532cc55 Author: Lorenzo Bianconi Date: Sun Sep 9 23:58:03 2018 +0200 mt76x2: move mt76x2 mcu shared code in mt76x2_mcu_common.c Move shared mt76x2 {pcie/usb} mcu shared code in a common file and remove duplicated code Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 36fd09dd0fa4cb60f7fb0971b7e26c1fad8499ce Author: Lorenzo Bianconi Date: Sun Sep 9 23:58:02 2018 +0200 mt76: move mt76{0,2} mcu shared code in mt76x02_mcu.c Move shared mt76x2/mt76x0 mcu shared code in a common file and remove duplicated code Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 79394f40801065bc2c7c13cc9ec7a9467060a389 Author: Lorenzo Bianconi Date: Sun Sep 9 23:58:01 2018 +0200 mt76: unify firmware header between mt76x0 and mt76x2 Move mt76x2_fw_header definition in mt76x02_mcu.h and remove duplicated code Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 8cff12371b33555630014ae7bf80850574a491de Author: Lorenzo Bianconi Date: Sun Sep 9 23:58:00 2018 +0200 mt76x2: use common helpers for mcu_alloc_msg()/mcu_send_msg() Use mcu common helpers instead of mt76x2 specific routines for mcu_alloc_msg()/mcu_send_msg(). This is a preliminary patch to unify mt76e and mt76u mcu code Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 0ed821bbbb0382770ae74a1fa21f51eded9ae895 Author: Lorenzo Bianconi Date: Sun Sep 9 23:57:59 2018 +0200 mt76x2: use mt76_dev instead of mt76x2_dev in mt76x2_mcu_msg_send Use mt76_dev data structure instead of mt76x2_dev one in mt76x2_mcu_msg_send and mt76x2_mcu_get_response routines. Moreover add wait_resp parameter to mt76x2_mcu_msg_send signature. This is a preliminary patch in order to unify mcu_msg_alloc()/mcu_msg_send() between pcie and usb code Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 27db1ad10f2e6fdb22bb7c6200c57e35076b684d Author: Lorenzo Bianconi Date: Sun Sep 9 23:57:58 2018 +0200 mt76: move __iomem regs in mt76_mmio Move __iomem regs pointer in mt76_mmio data structure Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit f7bbb80f22166387248b26353336a8300f05e555 Author: Lorenzo Bianconi Date: Sun Sep 9 23:57:57 2018 +0200 mt76: introduce mmio data structure in mt76_dev Introduce mt76_mmio data structure in mt76_dev and move mt76x2_mcu in mt76_mmio. This is a preliminary patch to unify mcu code between mt76x02{e,u} drivers Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 8db5ec77de216cd136a678f24ac7a804a1c79192 Author: Lorenzo Bianconi Date: Sun Sep 9 23:57:56 2018 +0200 mt76x2: remove leftover mt76u_buf data structure in mt76x2_mcu Remove unused usb buffer in mt76x2_mcu data structure Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit d5c4261357ce7e0fd40564875e39fdc16893f686 Author: Lorenzo Bianconi Date: Sun Sep 9 23:57:55 2018 +0200 mt76x2: use mt76_dev instead of mt76x2_dev in mt76x2_tx_queue_mcu Use mt76_dev data structure instead of mt76x2_dev one in mt76x2_tx_queue_mcu routine. This is a preliminary patch to share mcu code between mt76x2e and mt76x0e Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 8799b624fe744f1cc8a48835c9b6469166ef5188 Author: Lorenzo Bianconi Date: Sun Sep 9 23:57:54 2018 +0200 mt76: usb: remove skb check in mt76x{0,2}u mcu routines Remove mt76_mcu_msg_alloc return value check since it is already evaluated in __mt76x02u_mcu_send_msg Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 331419b2ce6eb97c6a042d34bbacd79ff5fb5cf1 Author: Stanislaw Gruszka Date: Sun Sep 9 22:32:46 2018 +0200 mt76x0: remove mt76x0_burst_write_regs() We don't need to use custom burst write regs via MCU, we can use generic mt76_wr_copy() for the same purpose. Signed-off-by: Stanislaw Gruszka Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit fd0c6e189d2315294bbd29107ae8e7b1b4ed2e4a Author: Stanislaw Gruszka Date: Sun Sep 9 22:32:45 2018 +0200 mt76x0: remove unused mt76x0_burst_read_regs mt76x0_burst_read_regs is not used, but keep it for eventual use. Since we have this function now in the driver git history, we can remove it and eventually revert this commit it the function will be needed. Signed-off-by: Stanislaw Gruszka Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 6d6631fd788dcead846ccdc89f3c83e768a98580 Author: Lorenzo Bianconi Date: Sun Sep 9 22:32:44 2018 +0200 mt76x02: add static qualifier to mt76x02_remove_dma_hdr Add static qualifier to mt76x02_remove_dma_hdr routine and do not export the symbol since it is only used in mt76x02_util.c Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 6181bf2a1124a2b0afb3fe0f4ce0021db70b774f Author: Lorenzo Bianconi Date: Sun Sep 9 22:32:43 2018 +0200 mt76x02: move TXD/RXD/MCU definitions in mt76x02_dma.h Introduce mt76x02_dma.h header file to contain mt76x02 dma related definitions Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit c2db13ac7b2b0d4337bf43f18806111c09de26e1 Author: Lorenzo Bianconi Date: Sun Sep 9 22:32:42 2018 +0200 mt76: usb: move mt76u_skb_dma_info in mt76x02_usb_core.c Move mt76u_skb_dma_info routine in mt76x02-usb module and rename it in mt76x02u_skb_dma_info. Moreover move mt76x02u_set_txinfo in mt76x02_usb_core.c. This is a preliminary patch to move MT_TXD_INFO, MT_MCU_MSG and MT_RX_FCE_INFO defs in mt76x02-lib module since other chipsets (e.g. mt7603) use different dma definitions Acked-by: Stanislaw Gruszka Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 905db7470199a39d7a48643df0559ffee26b989e Author: Lorenzo Bianconi Date: Sun Sep 9 22:32:41 2018 +0200 mt76: usb: move mt76x02 mcu code in mt76x02-usb module Introduce mt76x02_usb_mcu.c in order to contain mt76x02u mcu related code. Add mt76x02-usb module as a container for mt76x02 usb code. This is a preliminary patch to move MT_TXD_INFO, MT_MCU_MSG and MT_RX_FCE_INFO defs in mt76x02-lib module since other chipsets (e.g. mt7603) use different dma definitions Acked-by: Stanislaw Gruszka Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 1750715726c6663a0ee202adbe1badef741d8004 Author: Lorenzo Bianconi Date: Sun Sep 9 22:32:40 2018 +0200 mt76: usb: use common helpers for mcu_alloc_msg()/mcu_send_msg() Use mcu common helpers instead of usb specific routines. Add static qualifier to the following functions: - mt76u_mcu_msg_alloc - __mt76u_mcu_send_msg - mt76u_mcu_send_msg - mt76u_mcu_wr_rp - mt76u_mcu_rd_rp - mt76u_wr_rp - mt76u_rd_rp This is a preliminary patch to move mt76x02 usb mcu code in mt76x02-usb module Acked-by: Stanislaw Gruszka Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 6da5a2911634e68ae52a384e24cbdf8bb0b55fa4 Author: Stanislaw Gruszka Date: Sun Sep 9 22:32:39 2018 +0200 mt76: add rd_rp and wr_rp to bus_ops/mcu_ops Add callbacks for reading and writing reg pairs tables. Signed-off-by: Stanislaw Gruszka Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit f1638c7cd686c22620030da8ebb7c973dfc768e1 Author: Stanislaw Gruszka Date: Sun Sep 9 22:32:38 2018 +0200 mt76: add usb implementation of {wr,rd}_rp Add USB implementation for read and write reg pair routines. The actual implementation can use mcu related routines according to MCU state Signed-off-by: Stanislaw Gruszka Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit db0f04f324b3a9a317af2f050397c1dfa903eefa Author: Lorenzo Bianconi Date: Sun Sep 9 22:32:37 2018 +0200 mt76: add mt76_mcu_ops data structure for mcu related pointers Introduce mt76_mcu_ops data structure to contain mcu related function pointers. This is a preliminary patch to move mt76x02 usb mcu code in mt76x02-usb module Acked-by: Stanislaw Gruszka Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit dce9dc8d571b916bb55e08b66fb7bc4c5abd9ae5 Author: Lorenzo Bianconi Date: Sun Sep 9 22:32:36 2018 +0200 mt76: move mt76x0 and mt76x2 mcu shared defs in mt76x02_mcu.h Move mt76x0 and mt76x2 mcu shared definition in mt76x02_mcu.h and remove duplicated code Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 473f0a763d2c7cd68a6dedf51e7d81e8f58f78ac Author: Lorenzo Bianconi Date: Fri Sep 7 23:13:12 2018 +0200 mt76x0: run vco calibration for each channel configuration According to vendor sdk, vco calibration has to be executed for each channel configuration whereas mcu calibration has to be performed during channel scanning. This patch fixes the mt76x0 monitor mode issue since in that configuration vco calibration was never executed Fixes: 10de7a8b4ab9 ("mt76x0: phy files") Tested-by: Sid Hayn Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 835123b7e14cc328608197897db28e9b4d09d987 Author: Stanislaw Gruszka Date: Thu Sep 6 11:18:58 2018 +0200 mt76x0: make device allocation bus neutral Remove some USB specific code form mt76x0_alloc_device. Signed-off-by: Stanislaw Gruszka Signed-off-by: Felix Fietkau commit 6d1bced1495d1431d26854367a0d0d38a87cea9e Author: Stanislaw Gruszka Date: Thu Sep 6 11:18:57 2018 +0200 mt76x0: remove some usb specific code from mt76x0_register_device Initial effort to make mt76x0_register_device bus neutral. Signed-off-by: Stanislaw Gruszka Signed-off-by: Felix Fietkau commit c0eb79ab33b952adaf0633aacea5775ba5d44614 Author: Stanislaw Gruszka Date: Thu Sep 6 11:18:56 2018 +0200 mt76x0: remove unused mt76x0_wcid We do not use mt76x0_wcid any longer. Signed-off-by: Stanislaw Gruszka Signed-off-by: Felix Fietkau commit c2a4d9fbabfb9de8259c9467efc74ac85fcce838 Author: Stanislaw Gruszka Date: Thu Sep 6 11:18:53 2018 +0200 mt76x0: inital split between pci and usb For now pci driver can read ASIC version from the device :-) Signed-off-by: Stanislaw Gruszka Signed-off-by: Felix Fietkau commit 1bee323a85208366406b8fc4490930d1dc046b13 Author: Lorenzo Bianconi Date: Thu Sep 6 11:18:52 2018 +0200 mt76x0: use mt76_register_device for device registration Use mt76_register_device routine for device registration. mt76_register_device allows to enable VHT support on 5GHz band. Overwrite unsupported vht features with mt76x0_vht_cap_mask routine. Remove macaddr field of mt76x0_dev data structure and use the mt76_dev one. Moreover remove following unused routines: - mt76_init_sband - mt76_init_sband_2g - mt76_init_sband_5g Signed-off-by: Lorenzo Bianconi Signed-off-by: Stanislaw Gruszka Signed-off-by: Felix Fietkau commit 540399d5fb79154f51f9ce33f7512485e7c26e0c Author: Lorenzo Bianconi Date: Thu Sep 6 11:18:51 2018 +0200 mt76x0: remove has_{2,5}ghz fields of mt76x0_eeprom_params Remove has_2ghz/has_5ghz fields of mt76x0_eeprom_params data structure and use mt76_dev ones. This is a preliminary patch to use shared routines for device allocation Signed-off-by: Lorenzo Bianconi Signed-off-by: Stanislaw Gruszka Signed-off-by: Felix Fietkau commit 6f15ed16f17890c53ff0ad763c7e9c2c04a153b2 Author: Lorenzo Bianconi Date: Thu Sep 6 11:18:50 2018 +0200 mt76x0: do not free/alloc buffers during suspend/resume Do not free/alloc {tx,rx} buffers during suspend/resume phases but use the ones previously allocated during hw probe. Move {tx,rx}/mcu buffers allocation from mt76x0_init_hardware routine to mt76x0_register_device Signed-off-by: Lorenzo Bianconi Signed-off-by: Stanislaw Gruszka Signed-off-by: Felix Fietkau commit e30a655ef13806765c335c33452bc5f0e7256f36 Author: Lorenzo Bianconi Date: Thu Sep 6 11:18:49 2018 +0200 mt76x0: move mt76x0_init_hardware in mt76x0_register_device Move mt76x0_init_hardware routine in mt76x0_register_device during hw probe. This is a preliminary patch to avoid {tx/rx} buffer allocation during resume/suspend Signed-off-by: Lorenzo Bianconi Signed-off-by: Stanislaw Gruszka Signed-off-by: Felix Fietkau commit b680d7fbfbff01ead47a54d7bb50567a7ceeedde Author: Lorenzo Bianconi Date: Thu Sep 6 11:18:48 2018 +0200 mt76x0: move stop related routines in mt76x0_mac_stop Move tear-down routines in mt76x0_mac_stop function. mt76x0_mac_stop routines will be reused in mt76x0_suspend Signed-off-by: Lorenzo Bianconi Signed-off-by: Stanislaw Gruszka Signed-off-by: Felix Fietkau commit cb722aeddcfdab852a06a0477ac197174ea44051 Author: Lorenzo Bianconi Date: Thu Sep 6 11:18:47 2018 +0200 mt76x0: fix memory leak during hw probe Fix memory leak during hw probe if mt76x0_register_device fails since MT76_STATE_INITIALIZED has not set yet and mt76x0_cleanup does not free tx/rx queues and mcu buffers Signed-off-by: Lorenzo Bianconi Signed-off-by: Stanislaw Gruszka Signed-off-by: Felix Fietkau commit d1b6eec235972e11da3564c4b55cb2b2b30d19bb Author: Lorenzo Bianconi Date: Thu Sep 6 11:18:46 2018 +0200 mt76x0: alloc mcu buffers first in mt76x0_mcu_cmd_init swap mt76u_mcu_init_rx and mt76x0_mcu_function_select in mt76x0_mcu_cmd_init routine in order to allocate mcu buffers first and then send mcu commands Signed-off-by: Lorenzo Bianconi Signed-off-by: Stanislaw Gruszka Signed-off-by: Felix Fietkau commit 58b5eb8c44ead87ebbd056fb60f0b257370d2a55 Author: Lorenzo Bianconi Date: Thu Sep 6 11:18:45 2018 +0200 mt76: move mt76 rate definitions in mt76x02-lib module Move mt76x2_rate definition in mt76x02-lib module and rename it in mt76x02_rates in order to be reused in mt76x0 driver. Moreover remove unused mt76_rate definition Signed-off-by: Lorenzo Bianconi Signed-off-by: Stanislaw Gruszka Signed-off-by: Felix Fietkau commit 7c7b13941eda19be57c0d88660cd219cb917906c Author: Lorenzo Bianconi Date: Thu Sep 6 11:18:44 2018 +0200 mt76x0: remove mt76x0_stop_hardware routine Since it is actually used in a single place and it just runs mt76x0_chip_onoff routine, remove mt76x0_stop_hardware and use mt76x0_chip_onoff directly Signed-off-by: Lorenzo Bianconi Signed-off-by: Stanislaw Gruszka Signed-off-by: Felix Fietkau commit 23ea0e7efbc978d7d2923667ff4402426869cec6 Author: Lorenzo Bianconi Date: Thu Sep 6 11:18:43 2018 +0200 mt76: remove unused MT76_MORE_STATS state Remove no longer used hw state Signed-off-by: Lorenzo Bianconi Signed-off-by: Stanislaw Gruszka Signed-off-by: Felix Fietkau commit 242516caabdb03aee47bebf9ed94070444e44894 Author: Stanislaw Gruszka Date: Thu Sep 6 11:18:42 2018 +0200 mt76x0: trim rx skb to proper length We need to truncate skb to proper length. This fix below message: wlan0: associating with AP with corrupt beacon and probe response Fixes: 9d87d9fad47e ("mt76x0: unify tx/rx datapath with mt76x2u driver") Signed-off-by: Stanislaw Gruszka Signed-off-by: Felix Fietkau commit 0ae976a11b4fb5704b597e103b5189237641c1a1 Author: Lorenzo Bianconi Date: Thu Sep 6 11:18:41 2018 +0200 mt76x0: init hw capabilities Enable hw capabilities supported by mt76-usb layer - fast_xmit - tx/rx amsdu - MFP - non-linear tx skbs Signed-off-by: Lorenzo Bianconi Signed-off-by: Stanislaw Gruszka Signed-off-by: Felix Fietkau commit 67f5e7a794bcc1ccdc3679baf19ecb3f39cc20ab Author: Lorenzo Bianconi Date: Thu Sep 6 11:18:40 2018 +0200 mt76x0: enable per-sta tx queueing Initialize wake_tx_queue function pointer in ieee80211_ops in order to enable per-sta tx queueing. Moreover set driver private txq size Signed-off-by: Lorenzo Bianconi Signed-off-by: Stanislaw Gruszka Signed-off-by: Felix Fietkau commit 7cbe4c7607043d46accb7e6069a62691d276fbf9 Author: Lorenzo Bianconi Date: Thu Sep 6 11:18:39 2018 +0200 mt76x0: remove unused stat_work Remove unused definition of stat_work delayed_work definition and related flush/cancel routines Signed-off-by: Lorenzo Bianconi Signed-off-by: Stanislaw Gruszka Signed-off-by: Felix Fietkau commit c1b6325d5105789b77e5b40ada9fc7c9455f8c81 Author: Lorenzo Bianconi Date: Thu Sep 6 11:18:38 2018 +0200 mt76x0: remove unused endpoint definitions remove unused usb endpoint definitions since mt76x0 uses mt76-usb ones. Moreover remove unused usb_ctrl mutex Signed-off-by: Lorenzo Bianconi Signed-off-by: Stanislaw Gruszka Signed-off-by: Felix Fietkau commit f79fdf7652dffa660a3caba46713a36387fd25b8 Author: Lorenzo Bianconi Date: Thu Sep 6 11:18:37 2018 +0200 mt76x0: remove unused mt76x0_tx_status routine Remove no longer used mt76x0_tx_status routine since mt76x0 driver uses mt76-usb utility routines to report tx-feedbacks Signed-off-by: Lorenzo Bianconi Signed-off-by: Stanislaw Gruszka Signed-off-by: Felix Fietkau commit 6d449d12a041f6ce42422d65b6759c1649e5515e Author: Lorenzo Bianconi Date: Thu Sep 6 11:18:36 2018 +0200 mt76x0: remove unused {tx/rx}_queue definitions Remove unused tx_queue and rx_queue definitions since now mt76x0 driver uses mt76-usb {tx/rx}_queues Signed-off-by: Lorenzo Bianconi Signed-off-by: Stanislaw Gruszka Signed-off-by: Felix Fietkau commit 4220878b6e1d34d565e31973bce45699326ab53a Author: Lorenzo Bianconi Date: Thu Sep 6 11:18:35 2018 +0200 mt76x0: remove unused stat work_queue Remove unused tx_status workqueue since now tx feedbacks are processed by mt76-usb layer Signed-off-by: Lorenzo Bianconi Signed-off-by: Stanislaw Gruszka Signed-off-by: Felix Fietkau commit 37d363665ba11b12d818a48bf495ad132d66d4f4 Author: Lorenzo Bianconi Date: Thu Sep 6 11:18:34 2018 +0200 mt76x0: remove unused dma.c source file Remove unused dma.c source file since dma related routines are no longer used Signed-off-by: Lorenzo Bianconi Signed-off-by: Stanislaw Gruszka Signed-off-by: Felix Fietkau commit c6687464080608279260380142b45c0c0b88420e Author: Lorenzo Bianconi Date: Thu Sep 6 11:18:33 2018 +0200 mt76x0: set max fragments size Set maximum number of tx fragments according to usb controller features Signed-off-by: Lorenzo Bianconi Signed-off-by: Stanislaw Gruszka Signed-off-by: Felix Fietkau commit 1baa6e3a9b7df55ed7381828e81df0f91194c4ea Author: Lorenzo Bianconi Date: Thu Sep 6 11:18:32 2018 +0200 mt76x0: stop stat workqueue at hw stop Cancel tx status workqueue during vif teardown Signed-off-by: Lorenzo Bianconi Signed-off-by: Stanislaw Gruszka Signed-off-by: Felix Fietkau commit 30ec915269c69cd8673ff3f99b024b05a5a27a0e Author: Lorenzo Bianconi Date: Thu Sep 6 11:18:31 2018 +0200 mt76x0: unify tx/rx datapath with mt76x2u driver Use mt76/mt76-usb shared routine for tx/rx datapath. Initialize mt76-usb tx/rx queues in mt76x0_init_hardware and deallocate them in mt76x0_cleanup routine. Moreover remove data padding in mt76_mac_process_rx routine. Furthermore remove unused skb2q routine Signed-off-by: Lorenzo Bianconi Signed-off-by: Stanislaw Gruszka Signed-off-by: Felix Fietkau commit 95e507d2f36654814db75b01b636aed34c0b436f Author: Lorenzo Bianconi Date: Thu Sep 6 11:18:26 2018 +0200 mt76x0: use mt76_alloc_device for device allocation Use mt76_alloc_device utility routine for mt76x0_dev/mt76_dev allocation Signed-off-by: Lorenzo Bianconi Signed-off-by: Stanislaw Gruszka Signed-off-by: Felix Fietkau commit f2653a4ee3f25baf8539f251de2e0093619d2460 Author: Lorenzo Bianconi Date: Thu Sep 6 11:18:25 2018 +0200 mt76x0: init mt76_driver_ops callbacks Init mt76_driver_ops callbacks in mt76x0_alloc_device. mt76_driver_ops callbacks will be used by mt76-usb module Signed-off-by: Lorenzo Bianconi Signed-off-by: Stanislaw Gruszka Signed-off-by: Felix Fietkau commit 4fcedad49cdcf82759ae54cb843f516ccd87944b Author: Lorenzo Bianconi Date: Thu Sep 6 11:18:30 2018 +0200 mt76x0: add mt76x0_queue_rx_skb routine Introduce mt76x0_queue_rx_skb routine as mt76x0 driver frame rx handler. mt76x0_queue_rx_skb will be run by mt76-usb layer rx datapath Signed-off-by: Lorenzo Bianconi Signed-off-by: Stanislaw Gruszka Signed-off-by: Felix Fietkau commit 82aedcef17e4bdececd2e39ed581fed5ce767436 Author: Lorenzo Bianconi Date: Thu Sep 6 11:18:29 2018 +0200 mt76x0: simplify mt76_mac_process_rx signature Remove data pointer from mt76_mac_process_rx routine signature Signed-off-by: Lorenzo Bianconi Signed-off-by: Stanislaw Gruszka Signed-off-by: Felix Fietkau commit a4986909ec18d96d30850e574e2f18705a7e5c8f Author: Lorenzo Bianconi Date: Thu Sep 6 11:18:28 2018 +0200 mt76x0: mark device as running in mt76x0_start Set MT76_STATE_RUNNING flag in mt76x0_start routine and clear it in mt76x0_stop one Signed-off-by: Lorenzo Bianconi Signed-off-by: Stanislaw Gruszka Signed-off-by: Felix Fietkau commit 7fd3c60ccbc2a8c8937e41dc402032a87c01c66e Author: Lorenzo Bianconi Date: Thu Sep 6 11:18:27 2018 +0200 mt76x0: disable usb rx bulk aggregation In order to use zero-copying, disable usb rx bulk aggregation Signed-off-by: Lorenzo Bianconi Signed-off-by: Stanislaw Gruszka Signed-off-by: Felix Fietkau commit 8f6c23a94e16d726de8fabe134c0a193d5fae2ce Author: Lorenzo Bianconi Date: Thu Sep 6 11:18:24 2018 +0200 mt76: move mt76x2u_tx_status_data in mt76x02-lib module Move mt76x2u_tx_status_data routine in mt76x02-lib module and rename it in mt76x02_tx_status_data in order to be reused in mt76x0 driver Signed-off-by: Lorenzo Bianconi Signed-off-by: Stanislaw Gruszka Signed-off-by: Felix Fietkau commit 8c6adb7862d41297a58ad568197f2f535eb10d4b Author: Lorenzo Bianconi Date: Thu Sep 6 11:18:23 2018 +0200 mt76x0: introduce mt76x0_tx_prepare_skb routine Add mt76x0_tx_prepare_skb routine as tx txwi handler. mt76x0_tx_prepare_skb will be used by mt76-usb layer Signed-off-by: Lorenzo Bianconi Signed-off-by: Stanislaw Gruszka Signed-off-by: Felix Fietkau commit 41868f984e71d4ff3100e0b3b81bfa747d05c273 Author: Lorenzo Bianconi Date: Thu Sep 6 11:18:22 2018 +0200 mt76: move mt76x2u_set_txinfo in mt76x02-lib module Move mt76x2u_set_txinfo routine in mt76x02-lib module and rename it in mt76x02_set_txinfo in order to be reused in mt76x0 driver Signed-off-by: Lorenzo Bianconi Signed-off-by: Stanislaw Gruszka Signed-off-by: Felix Fietkau commit 2251dd5d463c0b3e29a6b0ade4a9745c43c682ad Author: Lorenzo Bianconi Date: Thu Sep 6 11:18:21 2018 +0200 mt76: move mt76_qsel definition in dma.h Move mt76_qsel definition in dma.h in order to be reused in mt76x0 driver. Moreover remove empty mt76x2_dma.h header file Signed-off-by: Lorenzo Bianconi Signed-off-by: Stanislaw Gruszka Signed-off-by: Felix Fietkau commit f847e45a2db8301825c92a91d89f5190a9d50f83 Author: Lorenzo Bianconi Date: Thu Sep 6 11:18:20 2018 +0200 mt76: move mt76x2u_tx_complete_skb in mt76x02-lib moudule Move mt76x2u_tx_complete_skb routine in mt76x02-lib module and rename it in mt76x02_tx_complete_skb in order to be reused in mt76x0 driver Signed-off-by: Lorenzo Bianconi Signed-off-by: Stanislaw Gruszka Signed-off-by: Felix Fietkau commit b38b8207bf80c8d3b86e92bb901f32e3e109d148 Author: Lorenzo Bianconi Date: Thu Sep 6 11:18:19 2018 +0200 mt76: move mt76x2u_remove_dma_hdr in mt76x02-lib module Move mt76x2u_remove_dma_hdr in mt76x02-lib module and rename it in mt76x02_remove_dma_hdr. Moreover use mt76x02_remove_hdr_pad routine in mt76x02_remove_dma_hdr function. Furthermore remove mt76x0_tx_skb_remove_dma_overhead routine Signed-off-by: Lorenzo Bianconi Signed-off-by: Stanislaw Gruszka Signed-off-by: Felix Fietkau commit 2a45ad31aff71d0383df853feab416504c64a967 Author: Lorenzo Bianconi Date: Thu Sep 6 11:18:18 2018 +0200 mt76: move mt76x2_tx_complete routine in mt76x02-lib module Move mt76x2_tx_complete routine in mt76x02-lib module and rename it in mt76x02_tx_complete in order to be used in mt76x0 driver Signed-off-by: Lorenzo Bianconi Signed-off-by: Stanislaw Gruszka Signed-off-by: Felix Fietkau commit 5a69931cb768f19e6708832661dde63a8a14f453 Author: Lorenzo Bianconi Date: Thu Sep 6 11:18:17 2018 +0200 mt76x2: change mt76x2_tx_complete routine signature Use mt76_dev instead of mt76x2_dev in mt76x2_tx_complete signature in order to be reused in mt76x0 driver Signed-off-by: Lorenzo Bianconi Signed-off-by: Stanislaw Gruszka Signed-off-by: Felix Fietkau commit 0b7da311274664decc52afcbe6354d0350b3ef57 Author: Stanislaw Gruszka Date: Tue Sep 4 16:41:15 2018 +0200 mt76: partially unify filling txwi fields Merge code filing txwi fields the same way on mt76x0 and mt76x2. Signed-off-by: Stanislaw Gruszka Signed-off-by: Felix Fietkau commit 0e59cba856049a227baac9da9b22ea1470a40fa0 Author: Stanislaw Gruszka Date: Tue Sep 4 16:41:14 2018 +0200 mt76: unify {insert/remove}_hdr_pad Merge insert/remove _hdr_pad from mt76x0 and mt76x2. Signed-off-by: Stanislaw Gruszka Signed-off-by: Felix Fietkau commit 493703aa9e3c861bcfd5f28ac1b0117e77d829fa Author: Stanislaw Gruszka Date: Tue Sep 4 16:41:13 2018 +0200 mt76x0: reserve enough space in mac80211 Allocate skg with enough headroom by mac80211 , this eliminate need to add extra skb headroom by the mt76x0 driver. Signed-off-by: Stanislaw Gruszka Signed-off-by: Felix Fietkau commit 74ff45393bf866043eb31c5e9a7b528b6698710e Author: Stanislaw Gruszka Date: Tue Sep 4 16:41:12 2018 +0200 mt76: unify mac_process_rate Merge mac_process_rate from mt76x0 and mt76x2. Signed-off-by: Stanislaw Gruszka Signed-off-by: Felix Fietkau commit 82e1dd0f39bda541b529cf2676f63a0d0cb2cfea Author: Stanislaw Gruszka Date: Tue Sep 4 16:41:11 2018 +0200 mt76: use mt76_rx_status in mt76x0 Make rx status processing similar to mt76x2. Signed-off-by: Stanislaw Gruszka Signed-off-by: Felix Fietkau commit 7c1f888126909602954546bd926964abbe09b087 Author: Stanislaw Gruszka Date: Tue Sep 4 16:41:10 2018 +0200 mt76: unify send_tx_status and related helpers Merge send_tx_status and helper functions from mt76x0 and mt76x2. Signed-off-by: Stanislaw Gruszka Signed-off-by: Felix Fietkau commit b490b1df9a25d57a9499642fb7eaf9c4b58e67f7 Author: Stanislaw Gruszka Date: Tue Sep 4 16:41:09 2018 +0200 mt76: unify load_tx_status Unify load/fetch tx status from mt76x0 and mt76x2 Signed-off-by: Stanislaw Gruszka Signed-off-by: Felix Fietkau commit 5944cd02866f380680b556c7e8e89858d56d1391 Author: Stanislaw Gruszka Date: Tue Sep 4 16:41:08 2018 +0200 mt76: unify txwi and rxwi structures txwi and rxwi are the same for mt76x0 and mt76x2. Signed-off-by: Stanislaw Gruszka Signed-off-by: Felix Fietkau commit 5327b5ea13910df072772219e303a3d6cc5f992e Author: Stanislaw Gruszka Date: Tue Sep 4 16:41:07 2018 +0200 mt76: unify sta_rate_tbl_update and related helpers Use common sta_rate_tbl_update on mt76x0 and mt76x2. mt76x0 do not have support TPC (transmision power control) implmented, msta->wcid.max_txpwr_adj is only set for mt76x2. Signed-off-by: Stanislaw Gruszka Signed-off-by: Felix Fietkau commit 212926eb449309489b55ae46e433d26808337bcf Author: Stanislaw Gruszka Date: Tue Sep 4 16:41:06 2018 +0200 mt76: unify add_interface Make common add_interface for mt76x0 and mt76x2e. This change behavior for mt76x0, but it should work with the new implementation. mt76x2u has different implementation. Maybe it can use common one, but for now leave it as is. Signed-off-by: Stanislaw Gruszka Signed-off-by: Felix Fietkau commit 0cd47bae2264411d461701a7f5a9625af6b94b26 Author: Stanislaw Gruszka Date: Tue Sep 4 16:41:05 2018 +0200 mt76: unify remove_interface Use common remove_interface callback in mt76x0 and mt76x2. Signed-off-by: Stanislaw Gruszka Signed-off-by: Felix Fietkau commit 900c0f4746a1adff64d68c0cb94c480aa8232671 Author: Stanislaw Gruszka Date: Tue Sep 4 16:41:04 2018 +0200 mt76x0: remove vif_mask Make remove_interface more similar to mt76x2. Signed-off-by: Stanislaw Gruszka Signed-off-by: Felix Fietkau commit 10337263dcfa697dbfa7fa4bc8e0d06d7e0236e7 Author: Stanislaw Gruszka Date: Tue Sep 4 16:41:03 2018 +0200 mt76: unify conf_tx Use one conf_tx implementation in mt76x0 and mt76x2. Note this change conf_tx for mt76x0, but it should work with mt76x2 version. Signed-off-by: Stanislaw Gruszka Signed-off-by: Felix Fietkau commit 1d0496c63f8d299b23ed35eef276bde37957c402 Author: Stanislaw Gruszka Date: Tue Sep 4 16:41:01 2018 +0200 mt76: unify AC to hw queue mapping Use the same AC to hardware queue mappings for all subdrivers. Note: this change BK and BE mappings for USB drivers. Signed-off-by: Stanislaw Gruszka Signed-off-by: Felix Fietkau commit 436d9586afddfdfc619ae1db80288768b18d66b3 Author: Stanislaw Gruszka Date: Tue Sep 4 16:41:00 2018 +0200 mt76x0: remove empty sta_notify Remove empty implementation of sta_notify. Signed-off-by: Stanislaw Gruszka Signed-off-by: Felix Fietkau commit 60c26859e863c1b83757759176517453599db500 Author: Stanislaw Gruszka Date: Tue Sep 4 16:40:59 2018 +0200 mt76: unify set_key Merge mt76x0 and mt76x2 set_key mac80211 callback. Signed-off-by: Stanislaw Gruszka Signed-off-by: Felix Fietkau commit 22c575c4f1777fdcb718f1c610ed8d25ae5ce653 Author: Stanislaw Gruszka Date: Tue Sep 4 16:40:58 2018 +0200 mt76: unify ampdu_action Use mt76x2_ampdu_action as common function, mt76x0 ampdu_action was diffrent, but mt76x2 version should work for this driver as well. Signed-off-by: Stanislaw Gruszka Signed-off-by: Felix Fietkau commit cab12953ec1e7ab923213bcc07033d6c5615433c Author: Stanislaw Gruszka Date: Tue Sep 4 16:40:56 2018 +0200 mt76: pratially unify add_interface Create common mt76x02_vif_init function and use int on drivers add_interface callback. Signed-off-by: Stanislaw Gruszka Signed-off-by: Felix Fietkau commit 624400e4cd254777b05415d35a3c7baa7d568820 Author: Stanislaw Gruszka Date: Tue Sep 4 16:40:55 2018 +0200 mt76: unify sta_add / sta_remove Merge mt76x0 and mt76x0 sta add/remove callback. We drop mt76x0_mac_set_ampdu_factor() for now. Need to consider to add it to common code, but mt76x2 don't do it so perhaps mt76x0 don't need it as well. Signed-off-by: Stanislaw Gruszka Signed-off-by: Felix Fietkau commit 36404c065ac310c042aa3334ecd6fa12cd3400eb Author: Stanislaw Gruszka Date: Tue Sep 4 16:40:54 2018 +0200 mt76: move wcid fields to common mt76_dev struct All current MT devices including new MT7603 type chips support 128 WCIDs, we can unify wcid data in common mt76_dev structure. Signed-off-by: Stanislaw Gruszka Signed-off-by: Felix Fietkau commit 3f53950190271ba6876c3f9eed14af9cb64b6700 Author: Masahiro Yamada Date: Wed Sep 12 05:19:02 2018 +0100 ARM: 8798/1: remove unnecessary KBUILD_SRC ifeq conditional You can always prefix machine/plat header search paths with $(srctree)/ because $(srctree) is '.' for in-tree building. Signed-off-by: Masahiro Yamada Signed-off-by: Russell King commit d3c61619568c88d48eccd5e74b4f84faa1440652 Author: Stefan Agner Date: Tue Sep 11 04:31:49 2018 +0100 ARM: 8788/1: ftrace: remove old mcount support Commit cafa0010cd51 ("Raise the minimum required gcc version to 4.6") raised the minimum GCC version to 4.6. Old mcount is only required for GCC versions older than 4.4.0. Hence old mcount support can be dropped too. Signed-off-by: Stefan Agner Signed-off-by: Russell King commit f3c899927e19d1be39818145efc39ea27b8efc69 Author: Fabrizio Castro Date: Tue Aug 21 18:54:13 2018 +0100 ARM: 8786/1: Debug kernel copy by printing It may happen that when we relocate the kernel we corrupt other sensible memory (e.g. the memory needed by U-Boot for dealing with bootm command) while copying the kernel. If we overwrite the content of the memory area used by U-Boot's command bootm (described by U-Boot's parameters bootm_low and bootm_size), the kernel won't be able to boot. Troubleshooting the problem then is not straightforward. This commit allows the user to easily print information on where the kernel gets copied from/to in order to help with the design of the system memory map (e.g. bootm_low and bootm_size) at boot up. Signed-off-by: Fabrizio Castro Reviewed-by: Chris Paterson Acked-by: Biju Das Signed-off-by: Russell King commit 5851fa4d088747af4a141110541594a2a4479b12 Author: Sergei Shtylyov Date: Fri Sep 7 23:02:53 2018 +0300 dt-bindings: timer: renesas: tmu: document R8A779{7|8}0 bindings Document the R-Car V3{M|H} (R8A779{7|8}0) SoC in the Renesas TMU bindings; the TMU hardware in those is the Renesas standard 3-channel timer unit. Signed-off-by: Sergei Shtylyov Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit a215af751dc5d24b4e3a8fc9976ae95737843934 Author: Sergei Shtylyov Date: Fri Sep 7 21:58:41 2018 +0300 arm64: dts: renesas: r8a779{7|8}0: add CMT support Describe CMTs 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 6d14d4d313d09dabdb06b4a9f4e5fe4305051e9b Author: Marek Vasut Date: Tue Sep 18 14:23:40 2018 +0200 ARM: shmobile: Rework the PMIC IRQ line quirk Rather than hard-coding the quirk topology, which stopped scaling, parse the information from DT. The code looks for all compatible PMICs -- da9063 and da9210 -- and checks if their IRQ line is tied to the same pin. If so, the code sends a matching sequence to the PMIC to deassert the IRQ. Signed-off-by: Marek Vasut Acked-by: Wolfram Sang Tested-by: Geert Uytterhoeven (on Koelsch) Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit 11a33f81616158c642ee4082e5688113994a56fc Author: Wolfram Sang Date: Tue Sep 18 11:14:33 2018 +0200 arm64: dts: renesas: gen3: use 400kHz for I2C DVFS bus The PMIC and EEPROM can operate at 400kHz, so use this speed. Signed-off-by: Wolfram Sang Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit 3536faefc03d48e97891ed7fc542ff85ce00a4e1 Author: Icenowy Zheng Date: Sun Sep 16 12:34:08 2018 +0800 drm/sun4i: add support for R40 HDMI PHY The R40 SoC has a HDMI PHY that is possible to mux two video PLLs. Add support for it. Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20180916043409.62374-4-icenowy@aosc.io commit 5c5b3b0ebe6d78cad645cc010d7e8fb81ccd099b Author: Icenowy Zheng Date: Sun Sep 16 12:34:07 2018 +0800 dt-bindings: sun4i-drm: add compatible for R40 HDMI PHY The Allwinner R40 HDMI PHY is currently the only one that seems to be able to select between two PLL inputs. Add a compatible string for it, and the pll-1 clock input definition. Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20180916043409.62374-3-icenowy@aosc.io commit abf3bf537d298db18ad929ceb71c0353d6794f42 Author: Biju Das Date: Mon Sep 17 16:06:30 2018 +0100 ARM: debug-ll: Add support for r8a7744 Enable low-level debugging support for RZ/G1N (R8A7744). RZ/G1N uses SCIF0 for the debug console. Signed-off-by: Biju Das Reviewed-by: Fabrizio Castro Signed-off-by: Simon Horman commit c26eb6f34c9ea56ed795785ecb7938f008dfed1e Author: Biju Das Date: Mon Sep 17 16:08:47 2018 +0100 ARM: shmobile: defconfig: Enable r8a7744 SoC Enable recently added r8a7744 (RZ/G1N) SoC. Signed-off-by: Biju Das Reviewed-by: Fabrizio Castro Signed-off-by: Simon Horman commit 4f743344ddedca8edb440b3fb8e67ba6e292b4f6 Author: Biju Das Date: Mon Sep 17 16:06:29 2018 +0100 ARM: multi_v7_defconfig: Enable r8a7744 SoC Enable recently added r8a7744 (RZ/G1N) SoC. Signed-off-by: Biju Das Reviewed-by: Fabrizio Castro Signed-off-by: Simon Horman commit 4619ef4747c23818063c4e8480d63966a40297c6 Author: Fabrizio Castro Date: Mon Sep 17 09:44:09 2018 +0100 dt-bindings: apmu: Document r8a77470 support Document APMU and SMP enable method for RZ/G1C (also known as r8a77470) SoC. Signed-off-by: Fabrizio Castro Reviewed-by: Biju Das Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit d59b0784f1e64ad84756b485c622e3ee0712b946 Author: Magnus Damm Date: Mon Sep 17 17:53:05 2018 +0900 arm64: dts: renesas: r8a77980: Attach the SYS-DMAC to the IPMMU For R-Car V3H hook up SYS-DMAC1 and SYS-DMAC2 to IPMMU-DS1 to match information in the R-Car Gen3 Rev.1.00 (April 2018) datasheet. Signed-off-by: Magnus Damm Signed-off-by: Simon Horman commit f0f9f7a6baacddc8da10ca714f2aa12c08a079fb Author: Magnus Damm Date: Mon Sep 17 17:19:49 2018 +0900 arm64: dts: renesas: r8a77990: Attach the SYS-DMAC to the IPMMU For R-Car E3 hook up SYS-DMAC0, SYS-DMAC1 and SYS-DMAC2 to IPMMU-DS0 and IPMMU-DS1 in same way as for R-Car H3. This follows the R-Car Gen3 Rev.1.00 (April 2018) datasheet. Signed-off-by: Magnus Damm Signed-off-by: Simon Horman commit b9d957c5b10929a14b0a2b7f7d6f81e9ba6f828c Author: zhong jiang Date: Tue Sep 18 16:19:35 2018 +0800 net: wan: remove redundant include 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: David S. Miller commit e641e99f261f5203a911a9e0db54a214460d2cc4 Author: zhong jiang Date: Tue Sep 18 16:10:13 2018 +0800 net: ethernet: remove redundant include 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: David S. Miller commit 7e76798f431b247c2e5663ca1016ecd907abc857 Merge: 94b2bb28dbb4 fdd1445b684a Author: David S. Miller Date: Tue Sep 18 20:06:23 2018 -0700 Merge branch 'neterion-use-linux-io-64-nonatomic-lo-hi-h' Corentin Labbe says: ==================== net: ethernet: neterion: use linux/io-64-nonatomic-lo-hi.h This series remove usage of custom writeq/readq in favor of ones defined in linux/io-64-nonatomic-lo-hi.h This series is only compile tested. ==================== Signed-off-by: David S. Miller commit fdd1445b684a802a24fb1893ecdd254b64318e96 Author: Corentin Labbe Date: Tue Sep 18 07:33:14 2018 +0000 net: neterion: vxge: Use linux/io-64-nonatomic-lo-hi.h This patch replace the custom definition of writeq/read and use ones defined in linux/io-64-nonatomic-lo-hi.h. Signed-off-by: Corentin Labbe Signed-off-by: David S. Miller commit 2208e9a7e94e3d7da8f1b5d8d57c1d0b154afd03 Author: Corentin Labbe Date: Tue Sep 18 07:33:13 2018 +0000 net: neterion: s2io: Use linux/io-64-nonatomic-lo-hi.h This patch replace the custom definition of writeq/read and use ones defined in linux/io-64-nonatomic-lo-hi.h. Signed-off-by: Corentin Labbe Signed-off-by: David S. Miller commit 94b2bb28dbb43fcb943d5275ab19fd5a4972bedb Author: YueHaibing Date: Tue Sep 18 14:35:47 2018 +0800 net: ibm: 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: David S. Miller commit ac1172dea10b6ba51de9346d3130db688b5196c5 Author: YueHaibing Date: Tue Sep 18 14:19:05 2018 +0800 net: cavium: 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: David S. Miller commit c9c3941186c5637caed131c4f4064411d6882299 Author: YueHaibing Date: Tue Sep 18 14:09:43 2018 +0800 net: hns3: 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, also the implementation in this driver has returns 'netdev_tx_t' value, so just change the function return type to netdev_tx_t. Found by coccinelle. Signed-off-by: YueHaibing Signed-off-by: David S. Miller commit 5391346e165b29ac02dac837258f2dfe5221b926 Author: YueHaibing Date: Tue Sep 18 11:09:14 2018 +0800 net: ethernet: slicoss: remove duplicated include from slic.h Remove duplicated include. Signed-off-by: YueHaibing Signed-off-by: David S. Miller commit 14d73416792afa84f6a7245ee474d2432069da56 Author: Li RongQing Date: Mon Sep 17 18:46:55 2018 +0800 veth: rename pcpu_vstats as pcpu_lstats struct pcpu_vstats and pcpu_lstats have same members and usage, and pcpu_lstats is used in many files, so rename pcpu_vstats as pcpu_lstats to reduce duplicate definition Signed-off-by: Zhang Yu Signed-off-by: Li RongQing Signed-off-by: David S. Miller commit b60b87fc2996240e298529a46e122ef62ef9c27f Author: Johannes Berg Date: Mon Sep 17 11:57:29 2018 +0200 netlink: add ethernet address policy types Commonly, ethernet addresses are just using a policy of { .len = ETH_ALEN } which leaves userspace free to send more data than it should, which may hide bugs. Introduce NLA_EXACT_LEN which checks for exact size, rejecting the attribute if it's not exactly that length. Also add NLA_EXACT_LEN_WARN which requires the minimum length and will warn on longer attributes, for backward compatibility. Use these to define NLA_POLICY_ETH_ADDR (new strict policy) and NLA_POLICY_ETH_ADDR_COMPAT (compatible policy with warning); these are used like this: static const struct nla_policy [...] = { [NL_ATTR_NAME] = NLA_POLICY_ETH_ADDR, ... }; Signed-off-by: Johannes Berg Reviewed-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller commit 568b742a9d9888aca876b6ad9fa45490f18bee0a Author: Johannes Berg Date: Mon Sep 17 11:57:28 2018 +0200 netlink: add NLA_REJECT policy type In some situations some netlink attributes may be used for output only (kernel->userspace) or may be reserved for future use. It's then helpful to be able to prevent userspace from using them in messages sent to the kernel, since they'd otherwise be ignored and any future will become impossible if this happens. Add NLA_REJECT to the policy which does nothing but reject (with EINVAL) validation of any messages containing this attribute. Allow for returning a specific extended ACK error message in the validation_data pointer. While at it clear up the documentation a bit - the NLA_BITFIELD32 documentation was added to the list of len field descriptions. Also, use NL_SET_BAD_ATTR() in one place where it's open-coded. The specific case I have in mind now is a shared nested attribute containing request/response data, and it would be pointless and potentially confusing to have userspace include response data in the messages that actually contain a request. Signed-off-by: Johannes Berg Reviewed-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller commit 89f4b9a6e4c60d005c015b170508adb9978d0fd4 Merge: e366fa435032 98674ebec892 Author: David S. Miller Date: Tue Sep 18 19:27:40 2018 -0700 Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue Jeff Kirsher says: ==================== 40GbE Intel Wired LAN Driver Updates 2018-09-18 This series contains changes to i40evf so that it becomes a more generic virtual function driver for current and future silicon. While doing the rename of i40evf to a more generic name of iavf, we also put the driver on a severe diet due to how much of the code was unneeded or was unused. The outcome is a lean and mean virtual function driver that continues to work on existing 40GbE (i40e) virtual devices and prepped for future supported devices, like the 100GbE (ice) virtual devices. This solves 2 issues we saw coming or were already present, the first was constant code duplication happening with i40e/i40evf, when much of the duplicate code in the i40evf was not used or was not needed. The second was to remove the future confusion of why future VF devices that were not considered "40GbE" only devices were supported by i40evf. The thought is that iavf will be the virtual function driver for all future devices, so it should have a "generic" name to properly represent that it is the VF driver for multiple generations of devices. The last patch in this series is unreleated to the iavf conversion and just has to do with a MODULE_LICENSE correction. Known Caveats: Existing user space configurations may have to change, but the module alias in patch 1 helps a bit here. ==================== Signed-off-by: David S. Miller commit 22d7fe4984a23fea13f2fbc285e505624469de2a Author: Linus Walleij Date: Tue Sep 18 15:03:13 2018 -0700 pinctrl: mtk: Fix up GPIO includes Include only since this is a driver, not a consumer. Cc: Sean Wang Signed-off-by: Linus Walleij commit 994f8865687dda7800701ed3c3564392da351fa5 Author: Andy Shevchenko Date: Tue Sep 4 14:26:25 2018 +0300 pinctrl: cherryview: 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 Acked-by: Mika Westerberg Signed-off-by: Linus Walleij commit a919684f9ed9c16aafad786dc2617d1f6fe0b2f0 Author: Andy Shevchenko Date: Tue Sep 4 14:26:23 2018 +0300 pinctrl: cherryview: Describe members of couple of structs Compiler unsatisfied to see half described data structures and issues warnings: drivers/pinctrl/intel/pinctrl-cherryview.c:136: warning: Function parameter or member 'acpi_space_id' not described in 'chv_community' drivers/pinctrl/intel/pinctrl-cherryview.c:169: warning: Function parameter or member 'saved_intmask' not described in 'chv_pinctrl' drivers/pinctrl/intel/pinctrl-cherryview.c:169: warning: Function parameter or member 'saved_pin_context' not described in 'chv_pinctrl' To satisfy it, describe mentioned members. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg Signed-off-by: Linus Walleij commit e93ca9bbf3d8499fe4133052d1ae13e3c80dac51 Author: Andy Shevchenko Date: Tue Sep 4 14:26:22 2018 +0300 pinctrl: cherryview: Remove unused groups of pins For the long time no one complained about unused groups of pins for fSPI and SMBUS. Remove them for good and at the same time satisfy compiler, otherwise get warning: CC drivers/pinctrl/intel/pinctrl-cherryview.o drivers/pinctrl/intel/pinctrl-cherryview.c:285:23: warning: ‘southwest_smbus_pins’ defined but not used [-Wunused-const-variable=] static const unsigned southwest_smbus_pins[] = { 79, 81, 82 }; ^~~~~~~~~~~~~~~~~~~~ drivers/pinctrl/intel/pinctrl-cherryview.c:269:23: warning: ‘southwest_fspi_pins’ defined but not used [-Wunused-const-variable=] static const unsigned southwest_fspi_pins[] = { 0, 1, 2, 3, 4, 5, 6, 7 }; ^~~~~~~~~~~~~~~~~~~ Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg Signed-off-by: Linus Walleij commit 5458b7cec46a559786973b1a26ea6741e388304d Author: Andy Shevchenko Date: Tue Sep 4 14:26:21 2018 +0300 pinctrl: cherryview: Re-use data structures from pinctrl-intel.h We have some data structures duplicated across the drivers. Let's deduplicate them by using ones that being provided by pinctrl-intel.h. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg Signed-off-by: Linus Walleij commit e0da38425b357916fe4aa797294c405c245154c1 Author: Andy Shevchenko Date: Tue Sep 4 14:26:20 2018 +0300 pinctrl: baytrail: Sort headers alphabetically Sort header block alphabetically for easy maintenance. No functional change intended. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg Signed-off-by: Linus Walleij commit b76f191420bc79bd63c0143f3180685838cd8f2e Author: Andy Shevchenko Date: Tue Sep 4 14:26:18 2018 +0300 pinctrl: baytrail: Remove unneeded MODULE_DEVICE_TABLE() Since the driver can't be compiled as a module, there is no need to use no-op macros in the code. Thus, remove unneeded MODULE_DEVICE_TABLE() macro from the driver. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg Signed-off-by: Linus Walleij commit 677506ee09b98d5eaf6921c53f8412e5bd912514 Author: Andy Shevchenko Date: Tue Sep 4 14:26:17 2018 +0300 pinctrl: intel: Move linux/pm.h to the local header We now using a common macro for PM operations in pin control drivers for Intel SoCs, and since that macro relies on the definition and macro from linux/pm.h header file, it's logical to include it directly in pinctrl-intel.h. Otherwise it's a bit fragile and requires a proper ordering of header inclusion in C files. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg Signed-off-by: Linus Walleij commit b1fed3edc82ae0d763d5c24769e4a0193da150c9 Author: Gustavo A. R. Silva Date: Wed Aug 1 17:38:54 2018 -0500 Smack: 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 "No break" with a proper "Fall through" annotation, which is what GCC is expecting to find. Warning level 2 was used: -Wimplicit-fallthrough=2 Addresses-Coverity-ID: 115051 ("Missing break in switch") Signed-off-by: Gustavo A. R. Silva Signed-off-by: Casey Schaufler commit c824ad164760484f709daa1339df40a184f4170a Author: Huacai Chen Date: Wed Sep 5 17:33:01 2018 +0800 MIPS: Loongson-3: Enable Store Fill Buffer at runtime New Loongson-3 (Loongson-3A R2, Loongson-3A R3, and newer) has SFB (Store Fill Buffer) which can improve the performance of memory access. Now, SFB enablement is controlled by CONFIG_LOONGSON3_ENHANCEMENT, and the generic kernel has no benefit from SFB (even it is running on a new Loongson-3 machine). With this patch, we can enable SFB at runtime by detecting the CPU type (the expense is war_io_reorder_wmb() will always be a 'sync', which will hurt the performance of old Loongson-3). [paul.burton@mips.com: Further info from Huacai: In practise, I found that sometimes there are boot failures if I enable SFB/LPA in cpu_probe(). I don't know why because processor designers also haven't give me an explaination, but I think this may have some relationships to speculative execution.] Signed-off-by: Huacai Chen Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/20426/ Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@linux-mips.org Cc: Fuxin Zhang Cc: Zhangjin Wu Cc: Huacai Chen commit dcb569cf6ac99ca899b8109c128b6ae52477a015 Author: Casey Schaufler Date: Tue Sep 18 16:09:16 2018 -0700 Smack: ptrace capability use fixes This fixes a pair of problems in the Smack ptrace checks related to checking capabilities. In both cases, as reported by Lukasz Pawelczyk, the raw capability calls are used rather than the Smack wrapper that check addition restrictions. In one case, as reported by Jann Horn, the wrong task is being checked for capabilities. Signed-off-by: Casey Schaufler commit 2794f688b2c336e0da85e9f91fed33febbd9f54a Author: Huacai Chen Date: Sat Sep 15 14:01:12 2018 +0800 MIPS/PCI: Call pcie_bus_configure_settings() to set MPS/MRRS Call pcie_bus_configure_settings() on MIPS, like for other platforms. The function pcie_bus_configure_settings() makes sure the MPS (Max Payload Size) across the bus is uniform and provides the ability to tune the MRSS (Max Read Request Size) and MPS (Max Payload Size) to higher performance values. Some devices will not operate properly if these aren't set correctly because the firmware doesn't always do it. Signed-off-by: Huacai Chen Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/20649/ Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@linux-mips.org Cc: Fuxin Zhang Cc: Zhangjin Wu Cc: Huacai Chen commit a0d58937404f5fe095120687c8914175587e6c51 Author: Lukas Wunner Date: Sat Sep 8 09:59:01 2018 +0200 PCI: hotplug: Document TODOs While refactoring the PCI hotplug core's API, I noticed a significant amount of technical debt in some of the hotplug drivers. Document the issues that caught my eye for starters. I do not have hardware at my disposal that utilizes the listed drivers and I think that's a prerequisite to work on them to ensure that no regressions sneak in. But some of this hardware is so old that it may be hard to come by. Obviously, it is fine to support old hardware, but the drivers need to be maintained. If noone steps up, perhaps we should consider sunsetting a few drivers by moving them to staging. Based on my findings, ibmphp would be the first candidate. I've found it fairly difficult to apply my API refactorings to it and have listed some obvious bugs in the driver. cpqphp is also in need of a modernization and would be a second candidate for relegation to staging. shpchp was introduced in the same commit as pciehp but hasn't benefited from the same amount of refactoring due to the decline of conventional PCI's relevance. Yet hardware supporting it may be more prevalent than for the proprietary hotplug methods. Per Documentation/process/2.Process.rst, "a TODO file should be present" for drivers in staging. The file introduced by the present commit may serve as a basis for this. Signed-off-by: Lukas Wunner Signed-off-by: Bjorn Helgaas Cc: Greg Kroah-Hartman Cc: Scott Murray Cc: Dan Zink Cc: Prarit Bhargava commit 125450f814418b9f889c9885831467d1b2e25a7d Author: Lukas Wunner Date: Sat Sep 8 09:59:01 2018 +0200 PCI: hotplug: Embed hotplug_slot When the PCI hotplug core and its first user, cpqphp, were introduced in February 2002 with historic commit a8a2069f432c, cpqphp allocated a slot struct for its internal use plus a hotplug_slot struct to be registered with the hotplug core and linked the two with pointers: https://git.kernel.org/tglx/history/c/a8a2069f432c Nowadays, the predominant pattern in the tree is to embed ("subclass") such structures in one another and cast to the containing struct with container_of(). But it wasn't until July 2002 that container_of() was introduced with historic commit ec4f214232cf: https://git.kernel.org/tglx/history/c/ec4f214232cf pnv_php, introduced in 2016, did the right thing and embedded struct hotplug_slot in its internal struct pnv_php_slot, but all other drivers cargo-culted cpqphp's design and linked separate structs with pointers. Embedding structs is preferrable to linking them with pointers because it requires fewer allocations, thereby reducing overhead and simplifying error paths. Casting an embedded struct to the containing struct becomes a cheap subtraction rather than a dereference. And having fewer pointers reduces the risk of them pointing nowhere either accidentally or due to an attack. Convert all drivers to embed struct hotplug_slot in their internal slot struct. The "private" pointer in struct hotplug_slot thereby becomes unused, so drop it. Signed-off-by: Lukas Wunner Signed-off-by: Bjorn Helgaas Reviewed-by: Rafael J. Wysocki Acked-by: Tyrel Datwyler # drivers/pci/hotplug/rpa* Acked-by: Sebastian Ott # drivers/pci/hotplug/s390* Acked-by: Andy Shevchenko # drivers/platform/x86 Cc: Len Brown Cc: Scott Murray Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: Oliver OHalloran Cc: Gavin Shan Cc: Gerald Schaefer Cc: Corentin Chary Cc: Darren Hart commit a7da21613c4efcd4cc0235e6a30bec96ae47c619 Author: Lukas Wunner Date: Sat Sep 8 09:59:01 2018 +0200 PCI: hotplug: Drop hotplug_slot_info Ever since the PCI hotplug core was introduced in 2002, drivers had to allocate and register a struct hotplug_slot_info for every slot: https://git.kernel.org/tglx/history/c/a8a2069f432c Apparently the idea was that drivers furnish the hotplug core with an up-to-date card presence status, power status, latch status and attention indicator status as well as notify the hotplug core of changes thereof. However only 4 out of 12 hotplug drivers bother to notify the hotplug core with pci_hp_change_slot_info() and the hotplug core never made any use of the information: There is just a single macro in pci_hotplug_core.c, GET_STATUS(), which uses the hotplug_slot_info if the driver lacks the corresponding callback in hotplug_slot_ops. The macro is called when the user reads the attribute via sysfs. Now, if the callback isn't defined, the attribute isn't exposed in sysfs in the first place (see e.g. has_power_file()). There are only two situations when the hotplug_slot_info would actually be accessed: * If the driver defines ->enable_slot or ->disable_slot but not ->get_power_status. * If the driver defines ->set_attention_status but not ->get_attention_status. There is no driver doing the former and just a single driver doing the latter, namely pnv_php.c. Amend it with a ->get_attention_status callback. With that, the hotplug_slot_info becomes completely unused by the PCI hotplug core. But a few drivers use it internally as a cache: cpcihp uses it to cache the latch_status and adapter_status. cpqhp uses it to cache the adapter_status. pnv_php and rpaphp use it to cache the attention_status. shpchp uses it to cache all four values. Amend these drivers to cache the information in their private slot struct. shpchp's slot struct already contains members to cache the power_status and adapter_status, so additional members are only needed for the other two values. In the case of cpqphp, the cached value is only accessed in a single place, so instead of caching it, read the current value from the hardware. Caution: acpiphp, cpci, cpqhp, shpchp, asus-wmi and eeepc-laptop populate the hotplug_slot_info with initial values on probe. That code is herewith removed. There is a theoretical chance that the code has side effects without which the driver fails to function, e.g. if the ACPI method to read the adapter status needs to be executed at least once on probe. That seems unlikely to me, still maintainers should review the changes carefully for this possibility. Rafael adds: "I'm not aware of any case in which it will break anything, [...] but if that happens, it may be necessary to add the execution of the control methods in question directly to the initialization part." Signed-off-by: Lukas Wunner Signed-off-by: Bjorn Helgaas Reviewed-by: Rafael J. Wysocki Acked-by: Tyrel Datwyler # drivers/pci/hotplug/rpa* Acked-by: Sebastian Ott # drivers/pci/hotplug/s390* Acked-by: Andy Shevchenko # drivers/platform/x86 Cc: Len Brown Cc: Scott Murray Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: Oliver OHalloran Cc: Gavin Shan Cc: Gerald Schaefer Cc: Corentin Chary Cc: Darren Hart commit 81c4b5bf30de01a0f6b43ccaa1d220f4a0a5d99c Author: Lukas Wunner Date: Sat Sep 8 09:59:01 2018 +0200 PCI: hotplug: Constify hotplug_slot_ops Hotplug drivers cannot declare their hotplug_slot_ops const, making them attractive targets for attackers, because upon registration of a hotplug slot, __pci_hp_initialize() writes to the "owner" and "mod_name" members in that struct. Fix by moving these members to struct hotplug_slot and constify every driver's hotplug_slot_ops except for pciehp. pciehp constructs its hotplug_slot_ops at runtime based on the PCIe port's capabilities, hence cannot declare them const. It can be converted to __write_rarely once that's mainlined: http://www.openwall.com/lists/kernel-hardening/2016/11/16/3 Signed-off-by: Lukas Wunner Signed-off-by: Bjorn Helgaas Reviewed-by: Rafael J. Wysocki Acked-by: Tyrel Datwyler # drivers/pci/hotplug/rpa* Acked-by: Andy Shevchenko # drivers/platform/x86 Cc: Len Brown Cc: Scott Murray Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: Oliver OHalloran Cc: Gavin Shan Cc: Sebastian Ott Cc: Gerald Schaefer Cc: Corentin Chary Cc: Darren Hart commit d758714235e7abb7984468370c912ca2f4dc4e57 Author: Lukas Wunner Date: Sat Sep 8 09:59:01 2018 +0200 PCI: pciehp: Reshuffle controller struct for clarity The members in pciehp's controller struct are arranged in a seemingly arbitrary order and have grown to an amount that I no longer consider easily graspable by contributors. Sort the members into 5 rubrics: * Slot Capabilities register and quirks * Slot Control register access * Slot Status register event handling * state machine * hotplug core interface Obviously, this is just my personal bikeshed color and if anyone has a better idea, please come forward. Any ordering will do as long as the information is presented in a manageable manner. No functional change intended. Signed-off-by: Lukas Wunner Signed-off-by: Bjorn Helgaas commit 4ff3126e80fc2db9d961467f783b5c2f4ccd1ca9 Author: Lukas Wunner Date: Sat Sep 8 09:59:01 2018 +0200 PCI: pciehp: Rename controller struct members for clarity Of the members which were just moved from pciehp's slot struct to the controller struct, rename "lock" to "state_lock" and rename "work" to "button_work" for clarity. Perform the rename separately to the unification of the two structs per Sinan's request. No functional change intended. Signed-off-by: Lukas Wunner Signed-off-by: Bjorn Helgaas Cc: Sinan Kaya commit 5790a9c78e78aa2c35bb7439bee434301dff004c Author: Lukas Wunner Date: Tue Sep 18 21:46:17 2018 +0200 PCI: pciehp: Unify controller and slot structs pciehp was originally introduced together with shpchp in a single commit, c16b4b14d980 ("PCI Hotplug: Add SHPC and PCI Express hot-plug drivers"): https://git.kernel.org/tglx/history/c/c16b4b14d980 shpchp supports up to 31 slots per controller, hence uses separate slot and controller structs. pciehp has a 1:1 relationship between slot and controller and therefore never required this separation. Nevertheless, because much of the code had been copy-pasted between the two drivers, pciehp likewise uses separate structs to this very day. The artificial separation of data structures adds unnecessary complexity and bloat to pciehp and requires constantly chasing pointers at runtime. Simplify the driver by merging struct slot into struct controller. Merge the slot constructor pcie_init_slot() and the destructor pcie_cleanup_slot() into the controller counterparts. No functional change intended. Signed-off-by: Lukas Wunner Signed-off-by: Bjorn Helgaas commit 80696f991424d05a784c0cf9c314ac09ac280406 Author: Lukas Wunner Date: Sat Sep 8 09:59:01 2018 +0200 PCI: pciehp: Tolerate Presence Detect hardwired to zero The WiGig Bus Extension (WBE) specification allows tunneling PCIe over IEEE 802.11. A product implementing this spec is the wil6210 from Wilocity (now part of Qualcomm Atheros). It integrates a PCIe switch with a wireless network adapter: 00.0-+ [1ae9:0101] Upstream Port +-00.0-+ [1ae9:0200] Downstream Port | +-00.0 [168c:0034] Atheros AR9462 Wireless Network Adapter +-02.0 [1ae9:0201] Downstream Port +-03.0 [1ae9:0201] Downstream Port Wirelessly attached devices presumably appear below the hotplug ports with device ID [1ae9:0201]. Oddly, the Downstream Port [1ae9:0200] leading to the wireless network adapter is likewise Hotplug Capable, but has its Presence Detect State bit hardwired to zero. Even if the Link Active bit is set, Presence Detect is zero, so this cannot be caused by in-band presence detection but only by broken hardware. pciehp assumes an empty slot if Presence Detect State is zero, regardless of Link Active being one. Consequently, up until v4.18 it removes the wireless network adapter in pciehp_resume(). From v4.19 it already does so in pciehp_probe(). Be lenient towards broken hardware and assume the slot is occupied if Link Active is set: Introduce pciehp_card_present_or_link_active() and use it in lieu of pciehp_get_adapter_status() everywhere, except in pciehp_handle_presence_or_link_change() whose log messages depend on which of Presence Detect State or Link Active is set. Remove the Presence Detect State check from __pciehp_enable_slot() because it is only called if either of Presence Detect State or Link Active is set. Caution: There is a possibility that broken hardware exists which has working Presence Detect but hardwires Link Active to one. On such hardware the slot will now incorrectly be considered always occupied. If such hardware is discovered, this commit can be rolled back and a quirk can be added which sets is_hotplug_bridge = 0 for [1ae9:0200]. Link: https://bugzilla.kernel.org/show_bug.cgi?id=200839 Reported-and-tested-by: David Yang Signed-off-by: Lukas Wunner Signed-off-by: Bjorn Helgaas Cc: Rajat Jain Cc: Ashok Raj commit 98674ebec892a77c06b2b107dd417f3d43a6637d Author: Jesse Brandeburg Date: Fri Sep 14 17:37:57 2018 -0700 intel-ethernet: use correct module license We recently updated all our SPDX identifiers to correctly indicate our net/ethernet/intel/* drivers were always released and intended to be released under GPL v2, but the MODULE_LICENSE declaration was never updated. Fix the MODULE_LICENSE to be GPL v2, for all our drivers. Signed-off-by: Jesse Brandeburg Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 66bc8e0f591a4bb00d6d0423dde6ab839045eaf9 Author: Jesse Brandeburg Date: Fri Sep 14 17:37:56 2018 -0700 iavf: finish renaming files to iavf This finishes the process of renaming the files that make sense to rename (skipping adminq related files that talk to i40e), and fixes up the build and the #includes so that everything builds nicely. Signed-off-by: Jesse Brandeburg Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 56184e01c00d6d23609f9f9e52cc731568e8088f Author: Jesse Brandeburg Date: Fri Sep 14 17:37:55 2018 -0700 iavf: rename most of i40e strings This is the big rename patch, it takes most of the i40e_ and I40E_ strings and renames them to iavf_ and IAVF_. Some of the adminq code, as well as most of the client interface code used by RDMA is left unchanged in order to indicate that the driver is talking to non-internal to iavf code. Signed-off-by: Jesse Brandeburg Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit ad64ed8bf908d7d8261256031039b1589386c609 Author: Jesse Brandeburg Date: Fri Sep 14 17:37:54 2018 -0700 iavf: tracing infrastructure rename Rename the i40e_trace file and fix up all the callers to the new names inside the iavf_trace.h file. Signed-off-by: Jesse Brandeburg Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit f1aa1abaf5a6facbb5fe68f983564803b2bd11da Author: Jesse Brandeburg Date: Fri Sep 14 17:37:53 2018 -0700 iavf: replace i40e_debug with iavf version Change another string (i40e_debug) Signed-off-by: Jesse Brandeburg Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit f349daa58809ae3aee1c0f22184c1a9c317d016f Author: Jesse Brandeburg Date: Fri Sep 14 17:37:52 2018 -0700 iavf: rename i40e_hw to iavf_hw Fix up the i40e_hw names to new name, including versions inside other strings. Signed-off-by: Jesse Brandeburg Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 83eafc4922580c202da62b21a31891d8664dfd94 Author: Jesse Brandeburg Date: Fri Sep 14 17:37:51 2018 -0700 iavf: rename I40E_ADMINQ_DESC Take care of some renames containing I40E_ADMINQ_DESC. Signed-off-by: Jesse Brandeburg Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 4dbc76e014d180f96f0538a5c4a55095f338532e Author: Jesse Brandeburg Date: Fri Sep 14 17:37:50 2018 -0700 iavf: rename device ID defines Rename the device ID defines to have IAVF in them and remove all the unused defines. Signed-off-by: Jesse Brandeburg Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit f1cad2ce06f28c439dc674893b0d9a8a720acdb8 Author: Jesse Brandeburg Date: Fri Sep 14 17:37:49 2018 -0700 iavf: remove references to old names Remove the register name references to I40E_VF* and change to IAVF_VF. Update the descriptor names and defines to the IAVF name. Signed-off-by: Jesse Brandeburg Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 5ec8b7d11470f742214708902d8903047855727e Author: Jesse Brandeburg Date: Fri Sep 14 17:37:48 2018 -0700 iavf: move i40evf files to new name Simply move the i40evf files to the new name, updating the #includes to track the new names, and updating the Makefile as well. A future patch will remove the i40e references (after the code removal patches later in this series). Signed-off-by: Jesse Brandeburg Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 0b6591e6463bf092080647e989bb541d0787eac6 Author: Jesse Brandeburg Date: Fri Sep 14 17:37:47 2018 -0700 iavf: rename i40e_status to iavf_status This is just a rename of an internal variable i40e_status, but it was a pretty big change and so deserved it's own patch. Signed-off-by: Jesse Brandeburg Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 129cf89e585676ea4cc4c096bad46ad73c46e21f Author: Jesse Brandeburg Date: Fri Sep 14 17:37:46 2018 -0700 iavf: rename functions and structs to new name This basically begins the internal portion of the rename of i40evf to iavf, by renaming many of the functions, structs, variables and defines. Most of the changes were made mechanically, which introduces some alignment issues. Signed-off-by: Jesse Brandeburg Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit ee61022acfffcd4468bc3c31f4fd61503f725999 Author: Jesse Brandeburg Date: Fri Sep 14 17:37:45 2018 -0700 iavf: diet and reformat Remove a bunch of unused code and reformat a few lines. Also remove some now un-necessary files. Signed-off-by: Jesse Brandeburg Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 9e3b5ce948f611a16e8cf1d3aa7b5387ec88ecb8 Author: Dhinakaran Pandiyan Date: Thu Sep 13 17:18:22 2018 -0700 drm/i915/psr: Enable AUX-A IO power well on ICL for PSR PSR requires AUX IO power well to be enabled. This was already in place for CNL, extend this for ICL too. Not enabling the power well results in the aux error interrupts when the hardware exits PSR. Reported-by: Casey G Bowman Reported-by: Jyoti R Yadav Cc: Matt Atwood Cc: Jyoti R Yadav Cc: Casey G Bowman Tested-by: Casey G Bowman Signed-off-by: Dhinakaran Pandiyan Reviewed-by: Imre Deak Reviewed-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20180914001822.2503-1-dhinakaran.pandiyan@intel.com commit 55818b90233bc13cbc46083e5ce0ea7f3c169aeb Merge: 1c5fb66afa2a 6561859b067f Author: Linus Walleij Date: Tue Sep 18 14:55:54 2018 -0700 Merge branch 'ib-mtk' into devel commit 6561859b067fcd6c5b89fd625b2c7dc324b706b5 Author: Sean Wang Date: Sat Sep 8 19:07:38 2018 +0800 pinctrl: mediatek: add eint support to MT8183 pinctrl driver Just add eint support to MT8183 pinctrl driver as usual as happens on the other SoCs. Signed-off-by: Sean Wang Signed-off-by: Linus Walleij commit 89132dd8ffd2218fad3f53a9ca529e609237448a Author: Sean Wang Date: Sat Sep 8 19:07:37 2018 +0800 pinctrl: mediatek: extend eint build to pinctrl-mtk-common-v2.c Almost all MediaTek SoCs apply the exact same logic to build eint, so move the common functions into pinctrl-mtk-common-v2.c to allow each new pinctrl driver to reuse them. Also, add a protection checker on hw->soc->eint_hw to avoid invalid memory access when there's certain SoC not to define its eint_hw properly in the code flow. Signed-off-by: Sean Wang Signed-off-by: Linus Walleij commit 29686f0151dff68e623475d449f99d8124825b17 Author: Zhiyong Tao Date: Sat Sep 8 19:07:36 2018 +0800 pintcrl: mediatek: add pull tweaks for I2C related pins on MT8183 This patch provides the advanced pull for I2C used pins on MT8183. Signed-off-by: Zhiyong Tao Signed-off-by: Sean Wang Signed-off-by: Linus Walleij commit 79348f6fb713a339be94ed14dfa210d5d20cf17d Author: Sean Wang Date: Sat Sep 8 19:07:35 2018 +0800 pinctrl: mediatek: extend advanced pull support in pinctrl-mtk-common-v2.c Extend the advanced pull based on the legacy bias plus additional r0 and r1 to tweak the resistor level. Signed-off-by: Zhiyong Tao Signed-off-by: Sean Wang Signed-off-by: Linus Walleij commit 750cd15d908151afa2df0f48d3917301e7af2369 Author: Zhiyong Tao Date: Sat Sep 8 19:07:34 2018 +0800 pinctrl: mediatek: add MT8183 pinctrl driver Add MT8183 pinctrl driver based on MediaTek pinctrl-paris core. Signed-off-by: Zhiyong Tao Signed-off-by: Sean Wang Signed-off-by: Linus Walleij commit 805250982bb5c5ce4a6e52e1d87204c5feea0dd1 Author: Zhiyong Tao Date: Sat Sep 8 19:07:33 2018 +0800 pinctrl: mediatek: add pinctrl-paris that implements the vendor dt-bindings Add pinctrl-paris core that implements vendor dt-binding which MediaTek tablet, box and smartphone-based SoCs such as MT81xx, MT27xx, and MT67xx SoCs really want to depend on. The driver is just completely rewritten according to pinctrl-mtk-common.c but uses the new logic from pinctrl-mtk-common-v2.c to have an elegant way to support new SoCs in the future. Signed-off-by: Zhiyong Tao Signed-off-by: Sean Wang Signed-off-by: Linus Walleij commit b7d7f9eeca551f9cf1f6418749cd609d371faf55 Author: Sean Wang Date: Sat Sep 8 19:07:32 2018 +0800 pinctrl: mediatek: extend struct mtk_pin_desc which per-pin driver depends on Because the pincrl-mtk-common.c is an implementation for per-pin binding, its pin descriptor includes more information than pinctrl-mtk-common-v2 so far can support. So, we complement these data before writing a driver using pincrl-mtk-common-v2.c for per-pin binding. By the way, the size of struct mtk_pin_desc would be larger than struct pinctrl_pin_desc can hold, so it's necessary to have a copy before the pins information is being registered into the core. Signed-off-by: Sean Wang Signed-off-by: Linus Walleij commit 9d9b171c6897265c5af870affd83fe3c51f1df76 Author: Sean Wang Date: Sat Sep 8 19:07:31 2018 +0800 pinctrl: mediatek: adjust error code and message when some register not supported is found It's usual and not an error for there's some register not supported by a certain SoC or a pin so that in the case we have to adjust the message to print and the error code to get rid of unnecessary false alarm. Signed-off-by: Sean Wang Signed-off-by: Linus Walleij commit 2bc47dfe4f8b1a9b1fc44811dd0c9a6502d794cd Author: Sean Wang Date: Sat Sep 8 19:07:30 2018 +0800 pinctrl: mediatek: add multiple register bases support to pinctrl-mtk-common-v2.c Certain SoC own multiple register base for accessing each pin groups, it's easy to be done with extend struct mtk_pin_field_calc to support the kind of SoC such as MT8183. Signed-off-by: Sean Wang Signed-off-by: Linus Walleij commit ea051eb384139bd183757761aa83362f2290996d Author: Sean Wang Date: Sat Sep 8 19:07:29 2018 +0800 pinctrl: mediatek: use pin descriptor all in pinctrl-mtk-common-v2.c all use pin descriptor instead in pinctrl-mtk-common-v2.c for the consistency and extensibility. Signed-off-by: Sean Wang Signed-off-by: Linus Walleij commit e7507f57a93a194012e889aead13ea2bdc2e4889 Author: Sean Wang Date: Sat Sep 8 19:07:28 2018 +0800 pinctrl: mediatek: add MT7623 pinctrl driver based on generic pinctrl binding Adding MT7623 pinctrl driver based on generic pinctrl binding, that is good example and demonstrates how to port any other MediaTek SoCs pinctrl-moore core when people really would like to use the generic pinctrl binding to support these MediaTek SoCs. Signed-off-by: Ryder Lee Signed-off-by: Sean Wang Signed-off-by: Linus Walleij commit 9afc305bfad79351b0e1fc2bcb04fc9a0631f865 Author: Sean Wang Date: Sat Sep 8 19:07:27 2018 +0800 pinctrl: mediatek: add pullen, pullsel register support to pinctrl-mtk-common-v2.c Certain SoCs have to program an extra PULLEN, PULLSEL register to configure bias related function so that we add it in the existing path. Signed-off-by: Ryder.Lee Signed-off-by: Sean Wang Signed-off-by: Linus Walleij commit 182c842fd5e6846baefc1e879eea7f2126703a61 Author: Sean Wang Date: Sat Sep 8 19:07:26 2018 +0800 pinctrl: mediatek: add ies register support to pinctrl-mtk-common-v2.c Certain SoCs have to program an extra IES register to configure input enabled mode so that we add it in the existing path as an option. Signed-off-by: Ryder.Lee Signed-off-by: Sean Wang Signed-off-by: Linus Walleij commit 0d7ca772148fe89149426bde59aaedcb3081d92d Author: Sean Wang Date: Sat Sep 8 19:07:25 2018 +0800 pinctrl: mediatek: add advanced pull related support to pinctrl-mtk-common-v2.c There are some specific pins (i.e. MMC/SD) need specific registers to turn on/off the 10K & 50k(75K) resistors when pull up/down. Therefore, this patch adds the custom prarmeters so that the user could control it through device tree. Signed-off-by: Ryder.Lee Signed-off-by: Sean Wang Signed-off-by: Linus Walleij commit 85430152ba468acbfc2d7bc81c57bb2f93a24641 Author: Sean Wang Date: Sat Sep 8 19:07:24 2018 +0800 pinctrl: mediatek: add pull related support to pinctrl-mtk-common-v2.c Put pull control support related functions to pinctrl-mtk-common-v2.c as these operations might be different by chips and allow different type of driver to reuse them. Signed-off-by: Ryder.Lee Signed-off-by: Sean Wang Signed-off-by: Linus Walleij commit 3ad38a14e13c10f19d4a6ca9ed3d90b003e21a45 Author: Sean Wang Date: Sat Sep 8 19:07:23 2018 +0800 pinctrl: mediatek: add drv register support to pinctrl-mtk-common-v2.c Certain SoCs have to program DRV register to configure driving strength so that we add it in the existing path as an option. Signed-off-by: Ryder.Lee Signed-off-by: Sean Wang Signed-off-by: Linus Walleij commit c28321979ba86bade51246faea13c7ce4ffb6ef5 Author: Sean Wang Date: Sat Sep 8 19:07:22 2018 +0800 pinctrl: mediatek: add driving strength related support to pinctrl-mtk-common-v2.c Put driving strength support related functions to pinctrl-mtk-common-v2.c as these operations might be different by chips and allow different type of driver to reuse them. Signed-off-by: Ryder.Lee Signed-off-by: Sean Wang Signed-off-by: Linus Walleij commit 1dc5e53691596832991e6550fdbaeb1f9bd82383 Author: Sean Wang Date: Sat Sep 8 19:07:21 2018 +0800 pinctrl: mediatek: extend struct mtk_pin_soc to pinctrl-mtk-common-v2.c Add two parameters gpio_m and eint_m for configuring GPIO mode and EINT mode, they might be varying depend on SoC. Signed-off-by: Ryder.Lee Signed-off-by: Sean Wang Signed-off-by: Linus Walleij commit fb5fa8dc151b2364c975a9070eedb28a354a995a Author: Sean Wang Date: Sat Sep 8 19:07:20 2018 +0800 pinctrl: mediatek: extend struct mtk_pin_desc to pinctrl-mtk-common-v2.c This patch introduces a data structure mtk_pin_desc, which is used to provide information per pin characteristic such as driving current, eint number and a driving index, that is used to lookup table describing the details about the groups of driving current by which the pin is able to adjust the driving strength so that the driver could get the appropriate driving group when calls .pin_config_get()/set(). Signed-off-by: Ryder.Lee Signed-off-by: Sean Wang Signed-off-by: Linus Walleij commit b906faf7b61db890733003d5dc513bee9cd52294 Author: Sean Wang Date: Sat Sep 8 19:07:19 2018 +0800 pinctrl: mediatek: extend struct mtk_pin_field_calc to pinctrl-mtk-common-v2.c This patch adds members sz_reg fixed in struct mtk_pin_field_calc - The 'fixed' is used to represent the consecutive pins share the same bits within the same register with the 1st pin so that it can largely reduce the entry size a bit. - The 'sz_reg' is used to indicate the range of bits we use in a register that may vary by SoC The above changes make the code more generic and this is useful as there might be other existing or future chips all use the same logic to access their register set and then being a little more abstract could help in the long run. Signed-off-by: Ryder Lee Signed-off-by: Sean Wang Signed-off-by: Linus Walleij commit e78d57b2f87c053c224a612121fc842ebe511ad2 Author: Sean Wang Date: Sat Sep 8 19:07:18 2018 +0800 pinctrl: mediatek: add pinctrl-moore that implements the generic pinctrl dt-bindings Add a generic driver pinctrl-moore.c for MT762x SoC and any other SoC that would like to use generic dt-binding. The patch is furtherly refactored from pinctrl-mt7622.c that totally uses the functions back by the generic pinctrl core such as GENERIC_PINCONF, GENERIC_PINCTRL_GROUPS, and GENERIC_PINMUX_FUNCTIONS and its binding also completely follows up pinctrl-bindings.txt in Documentation/devicetree/bindings/pinctrl/ to implement. Signed-off-by: Ryder.Lee Signed-off-by: Sean Wang Signed-off-by: Linus Walleij commit a1a503a8c33204963f20594c723060baee3acbb2 Author: Sean Wang Date: Sat Sep 8 19:07:17 2018 +0800 pinctrl: mediatek: add pinctrl-mtk-common-v2 for all MediaTek pinctrls Irregular register arrangement and distinct logic access from various MediaTek SoCs would cause pinctrl-mtk-common to bloat and really hard to maintain in the future so that the patch creates pinctrl-mtk-common-v2 based on the core of mt7622-pinctrl. The goals pinctrl-mtk-common-v2 want to achieve are to hopefully support all of MediaTek SoCs, and two kinds of dt-bindings being supported, Linux generic pinctrl dt-binding mt7622 supports and MediaTek per-pin dt-binding the other SoCs support the MT8183 and MT6765 incline to make use of. The patch starts to refactor MT7622 pinctrl driver first with splitting out these portable ways from there such as table-based register operation and drive strength control that is common in both kinds of driver. Signed-off-by: Ryder.Lee Signed-off-by: Sean Wang Signed-off-by: Linus Walleij commit 17c91487364fb33797ed84022564ee7544ac4945 Author: Patrick Talbert Date: Wed Sep 5 09:12:53 2018 +0200 PCI/ASPM: Do not initialize link state when aspm_disabled is set Now that ASPM is configured for *all* PCIe devices at boot, a problem is seen with systems that set the FADT NO_ASPM bit. This bit indicates that the OS should not alter the ASPM state, but when pcie_aspm_init_link_state() runs it only checks for !aspm_support_enabled. This misses the ACPI_FADT_NO_ASPM case because that is setting aspm_disabled. The result is systems may hang at boot after 1302fcf; avoidable if they boot with pcie_aspm=off (sets !aspm_support_enabled). Fix this by having aspm_init_link_state() check for either !aspm_support_enabled or acpm_disabled. Link: https://bugzilla.kernel.org/show_bug.cgi?id=201001 Fixes: 1302fcf0d03e ("PCI: Configure *all* devices, not just hot-added ones") Signed-off-by: Patrick Talbert Signed-off-by: Bjorn Helgaas commit 10042504ed92c06077b8a20a4edd67ba784847d4 Author: Corey Minyard Date: Fri Jul 27 07:36:20 2018 -0500 ipmi:ssif: Add support for multi-part transmit messages > 2 parts The spec was fairly confusing about how multi-part transmit messages worked, so the original implementation only added support for two part messages. But after talking about it with others and finding something I missed, I think it makes more sense. The spec mentions smbus command 8 in a table at the end of the section on SSIF support as the end transaction. If that works, then all is good and as it should be. However, some implementations seem to use a middle transaction <32 bytes tomark the end because of the confusion in the spec, even though that is an SMBus violation if the number of bytes is zero. So this change adds some tests, if command=8 works, it uses that, otherwise if an empty end transaction works, it uses a middle transaction <32 bytes to mark the end. If neither works, then it limits the size to 63 bytes as it is now. Cc: Harri Hakkarainen Cc: Bazhenov, Dmitry Cc: Mach, Dat Signed-off-by: Corey Minyard commit bb9e2eed77a5c7c13ea31b9316776da4f757d150 Author: Geert Uytterhoeven Date: Fri Jun 22 12:08:15 2018 +0200 MAINTAINERS: Add file patterns for ipmi device tree bindings Submitters of device tree binding documentation may forget to CC the subsystem maintainer if this is missing. Signed-off-by: Geert Uytterhoeven Signed-off-by: Corey Minyard commit b3096c70b3faf0b08d7d461f359eb4b0447dff8e Author: Corey Minyard Date: Thu Aug 30 14:36:09 2018 -0500 ipmi: Remove platform driver overrides and use the id_table The IPMI DMI code was adding platform overrides, which is not really an ideal solution. Switch to using the id_table in the drivers to identify the devices. Signed-off-by: Corey Minyard commit 36e398d7ab020dc6290cfeff2925d63b81362189 Author: Corey Minyard Date: Thu Aug 30 13:18:32 2018 -0500 ipmi: Free the address list on module cleanup Otherwise the memory is leaked. Signed-off-by: Corey Minyard commit c75c5075e5c6c686dde62058d3a95984d22cfb11 Author: Corey Minyard Date: Thu Aug 30 13:14:59 2018 -0500 ipmi: Don't leave holes in the I2C address list in the ssif driver The algorithm to populate the I2C address list would leave holes in the list on duplicates. Signed-off-by: Corey Minyard commit 060e8fb53fe3455568982d10ab8c3dd605565049 Author: YueHaibing Date: Tue Aug 28 07:07:36 2018 +0000 ipmi: fix return value of ipmi_set_my_LUN Fixes gcc '-Wunused-but-set-variable' warning: drivers/char/ipmi/ipmi_msghandler.c: In function 'ipmi_set_my_LUN': drivers/char/ipmi/ipmi_msghandler.c:1335:13: warning: variable 'rv' set but not used [-Wunused-but-set-variable] int index, rv = 0; 'rv' should be the correct return value. Fixes: 048f7c3e352e ("ipmi: Properly release srcu locks on error conditions") Signed-off-by: YueHaibing Signed-off-by: Corey Minyard commit e3dbc6d1d470e924529adf1e3e8e8447dc9b6977 Author: Corey Minyard Date: Thu Aug 23 15:31:47 2018 -0500 ipmi: Convert pr_xxx() to dev_xxx() in the BT code Cleanups, do the replacement and change the levels to the proper ones for the function they are serving, as many were wrong. Signed-off-by: Corey Minyard commit 1574608f5f4204440d6d9f52b971aba967664764 Author: Corey Minyard Date: Thu Jun 21 15:32:48 2018 -0500 ipmi:dmi: Ignore IPMI SMBIOS entries with a zero base address Looking at logs from systems all over the place, it looks like tons of broken systems exist that set the base address to zero. I can only guess that is some sort of non-standard idea to mark the interface as not being present. It can't be zero, anyway, so just complain and ignore it. Signed-off-by: Corey Minyard commit 9abcfaaa7c77e5884322b710dbf6c25905ce3376 Author: Corey Minyard Date: Thu Jun 21 15:25:21 2018 -0500 ipmi:dmi: Use pr_fmt in the IPMI DMI code It make things a little neater and saves some memory. Signed-off-by: Corey Minyard commit dd3535b937c192941daa9b966caa707fa31c2c4d Author: Arnd Bergmann Date: Mon Jun 18 16:27:09 2018 +0200 ipmi: Change to ktime_get_ts64() getnstimeofday64() is deprecated because of the inconsistent naming, it is only a wrapper around ktime_get_real_ts64() now, which could be used as a direct replacement. However, it is generally better to use CLOCK_MONOTONIC timestamps where possible, to avoid glitches with a concurrent settimeofday() or leap second. The uses in ipmi are either for debugging prints or for comparing against a prior timestamp, so using a monotonic ktime_get_ts64() is probably best here. Signed-off-by: Arnd Bergmann Signed-off-by: Corey Minyard commit 97a103e6b584442cd848887ed8d47be2410b7e09 Author: Colin Ian King Date: Tue Jun 5 17:51:07 2018 +0100 ipmi_si: fix potential integer overflow on large shift Shifting unsigned char b by an int type can lead to sign-extension overflow. For example, if b is 0xff and the shift is 24, then top bit is sign-extended so the final value passed to writeq has all the upper 32 bits set. Fix this by casting b to a 64 bit unsigned before the shift. Detected by CoverityScan, CID#1465246 ("Unintended sign extension") Signed-off-by: Colin Ian King Signed-off-by: Corey Minyard commit 01508d9ebf4fc863f2fc4561c390bf4b7c3301a6 Author: Meelis Roos Date: Wed Jun 6 16:11:26 2018 +0300 ipmi_si_pci: fix NULL device in ipmi_si error message I noticed that 4.17.0 logs the follwing during ipmi_si setup: ipmi_si 0000:01:04.6: probing via PCI (NULL device *): Could not setup I/O space ipmi_si 0000:01:04.6: [mem 0xf5ef0000-0xf5ef00ff] regsize 1 spacing 1 irq 21 Fix the "NULL device *) by moving io.dev assignment before its potential use by ipmi_pci_probe_regspacing(). Result: ipmi_si 0000:01:04.6: probing via PCI ipmi_si 0000:01:04.6: Could not setup I/O space ipmi_si 0000:01:04.6: [mem 0xf5ef0000-0xf5ef00ff] regsize 1 spacing 1 irq 21 Signed-off-by: Meelis Roos Signed-off-by: Corey Minyard commit f993cdd99a5fc554bc79e1ce70a9f5335e386649 Author: Joe Perches Date: Wed May 9 08:15:49 2018 -0700 ipmi: Convert printk(KERN_ to pr_( Use the more common logging style. Miscellanea: o Convert old style continuation printks without KERN_CONT to pr_cont o Coalesce formats o Realign arguments o Remove unnecessary casts Signed-off-by: Joe Perches Signed-off-by: Corey Minyard commit 25880f7d61a4f2fdda29cadae55985431df82c5c Author: Joe Perches Date: Wed May 9 08:15:48 2018 -0700 ipmi: Use more common logging styles Add and use #define pr_fmt/dev_fmt, and remove #define PFX This also prefixes some messages that were not previously prefixed. Miscellanea: o Convert printk(KERN_ to pr_( o Use %s, __func__ where appropriate Signed-off-by: Joe Perches Signed-off-by: Corey Minyard commit 445e2cbda928a3523c1c1da76788d19df52611c8 Author: Joe Perches Date: Wed May 9 08:15:47 2018 -0700 ipmi: msghandler: Add and use pr_fmt and dev_fmt, remove PFX Standardize the prefixing of output messages using the pr_fmt and dev_fmt mechanisms instead of a separate #define PFX Miscellanea: o Because this message prefix is very long, use a non-standard define of #define pr_fmt(fmt) "%s" fmt, "IPMI message handler: " which removes ~170 bytes of object code in an x86-64 defconfig with ipmi (with even more object code reduction on 32 bit compilations) Signed-off-by: Joe Perches Signed-off-by: Corey Minyard commit 05c3d056086a6217a77937b7fa0df35ec75715e6 Author: Corey Minyard Date: Mon Feb 26 12:49:16 2018 -0600 pci:ipmi: Move IPMI PCI class id defines to pci_ids.h Signed-off-by: Corey Minyard Acked-by: Bjorn Helgaas commit 4372ea94d40c5676814fc6d815a64caed963cb9f Author: Corey Minyard Date: Wed Apr 18 10:00:47 2018 -0500 ipmi: Finally get rid of ipmi_user_t and ipmi_smi_t All the users have been removed, we can remove the typedefs. Signed-off-by: Corey Minyard commit 4a758c929dc0f0a1e5359d456e6978fd2fdee9b7 Author: Corey Minyard Date: Mon May 21 20:25:31 2018 -0500 ipmi:powernv: Convert ipmi_smi_t to struct ipmi_smi Since everything else has been converted. Signed-off-by: Corey Minyard commit 3f901c865160d55bf66fb9b5a7e0ccd0f0458671 Author: Corey Minyard Date: Wed Apr 11 16:11:39 2018 -0500 hwmon:ibm: Change ipmi_user_t to struct ipmi_user * Signed-off-by: Corey Minyard Cc: Darrick J. Wong Acked-by: Guenter Roeck Reviewed-by: Darrick J. Wong commit ebba75fdf6fde605741860cca056c9e3adb81e15 Author: Corey Minyard Date: Wed Apr 11 13:05:33 2018 -0500 acpi:ipmi: Convert ipmi_user_t to struct ipmi_user * Signed-off-by: Corey Minyard Cc: Zhao Yakui Cc: Lv Zheng Acked-by: Rafael J. Wysocki commit 2e85d5979e8d2866db6185de231461b21159ef6f Author: Ravi Bangoria Date: Wed Sep 12 11:42:29 2018 +0530 perf test: Add watchpoint test We don't have a 'perf test' entry available to test the watchpoint functionality. Add a simple set of tests: - Read only watchpoint - Write only watchpoint - Read / Write watchpoint - Runtime watchpoint modification Ex.: on powerpc: $ sudo perf test 22 22: Watchpoint : 22.1: Read Only Watchpoint : Ok 22.2: Write Only Watchpoint : Ok 22.3: Read / Write Watchpoint : Ok 22.4: Modify Watchpoint : Ok Signed-off-by: Ravi Bangoria Acked-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Hendrik Brueckner Cc: Kate Stewart Cc: Kim Phillips Cc: Namhyung Kim Cc: Naveen N. Rao Cc: Sandipan Das Cc: Thomas Gleixner Cc: Thomas Richter Link: http://lkml.kernel.org/r/20180912061229.22832-1-ravi.bangoria@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo commit 1627314fb54a33ebd23bd08f2e215eaed0f44712 Author: Alexander Shishkin Date: Wed Apr 4 17:53:23 2018 +0300 perf: Suppress AUX/OVERWRITE records It has been pointed out to me many times that it is useful to be able to switch off AUX records to save the bandwidth for records that actually matter, for example, in AUX overwrite mode. The usefulness of PERF_RECORD_AUX is in some of its flags, like the TRUNCATED flag that tells the decoder where exactly gaps in the trace are. The OVERWRITE flag, on the other hand will be set on every single record in overwrite mode. However, a PERF_RECORD_AUX[flags=OVERWRITE] is generated on every target task's sched_out, which over time adds up to a lot of useless information. If any folks out there have userspace that depends on a constant stream of OVERWRITE records for a good reason, they'll have to let us know. Signed-off-by: Alexander Shishkin Acked-by: Ingo Molnar Acked-by: Peter Zijlstra Acked-by: Will Deacon Cc: Adrian Hunter Cc: Markus T Metzger Link: http://lkml.kernel.org/r/20180404145323.28651-1-alexander.shishkin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 7f16023bfcc4b1f2bbccf86219dc97473db6e0d6 Merge: 49e73246cbe6 169e366c0808 Author: Arnaldo Carvalho de Melo Date: Tue Sep 18 17:20:41 2018 -0300 Merge remote-tracking branch 'acme/perf/urgent' into perf/core To pick up fixes. Signed-off-by: Arnaldo Carvalho de Melo commit 65ba4dd5200a537eae0f6b29e120f3971eac5a4d Author: Linus Walleij Date: Tue Sep 18 12:11:57 2018 -0700 ASoC: rt5677-spi: Drop unused GPIO include This SPI driver does not use the legacy GPIO header so just delete it. Signed-off-by: Linus Walleij Signed-off-by: Mark Brown commit cfb03be6c7e8a1591285849c361d67b09f5149f7 Author: Waiman Long Date: Fri Sep 14 14:53:32 2018 -0400 driver/dma/ioat: Call del_timer_sync() without holding prep_lock The following lockdep splat was observed: [ 1222.241750] ====================================================== [ 1222.271301] WARNING: possible circular locking dependency detected [ 1222.301060] 4.16.0-10.el8+5.x86_64+debug #1 Not tainted [ 1222.326659] ------------------------------------------------------ [ 1222.356565] systemd-shutdow/1 is trying to acquire lock: [ 1222.382660] ((&ioat_chan->timer)){+.-.}, at: [<00000000f71e1a28>] del_timer_sync+0x5/0xf0 [ 1222.422928] [ 1222.422928] but task is already holding lock: [ 1222.451743] (&(&ioat_chan->prep_lock)->rlock){+.-.}, at: [<000000008ea98b12>] ioat_shutdown+0x86/0x100 [ioatdma] : [ 1223.524987] Chain exists of: [ 1223.524987] (&ioat_chan->timer) --> &(&ioat_chan->cleanup_lock)->rlock --> &(&ioat_chan->prep_lock)->rlock [ 1223.524987] [ 1223.594082] Possible unsafe locking scenario: [ 1223.594082] [ 1223.622630] CPU0 CPU1 [ 1223.645080] ---- ---- [ 1223.667404] lock(&(&ioat_chan->prep_lock)->rlock); [ 1223.691535] lock(&(&ioat_chan->cleanup_lock)->rlock); [ 1223.728657] lock(&(&ioat_chan->prep_lock)->rlock); [ 1223.765122] lock((&ioat_chan->timer)); [ 1223.784095] [ 1223.784095] *** DEADLOCK *** [ 1223.784095] [ 1223.813492] 4 locks held by systemd-shutdow/1: [ 1223.834677] #0: (reboot_mutex){+.+.}, at: [<0000000056d33456>] SYSC_reboot+0x10f/0x300 [ 1223.873310] #1: (&dev->mutex){....}, at: [<00000000258dfdd7>] device_shutdown+0x1c8/0x660 [ 1223.913604] #2: (&dev->mutex){....}, at: [<0000000068331147>] device_shutdown+0x1d6/0x660 [ 1223.954000] #3: (&(&ioat_chan->prep_lock)->rlock){+.-.}, at: [<000000008ea98b12>] ioat_shutdown+0x86/0x100 [ioatdma] In the ioat_shutdown() function: spin_lock_bh(&ioat_chan->prep_lock); set_bit(IOAT_CHAN_DOWN, &ioat_chan->state); del_timer_sync(&ioat_chan->timer); spin_unlock_bh(&ioat_chan->prep_lock); According to the synchronization rule for the del_timer_sync() function, the caller must not hold locks which would prevent completion of the timer's handler. The timer structure has its own lock that manages its synchronization. Setting the IOAT_CHAN_DOWN bit should prevent other CPUs from trying to use that device anyway, there is probably no need to call del_timer_sync() while holding the prep_lock. So the del_timer_sync() call is now moved outside of the prep_lock critical section to prevent the circular lock dependency. Signed-off-by: Waiman Long Reviewed-by: Dave Jiang Signed-off-by: Vinod Koul commit 5b7d0c9474bc3798b38c393974747336a2cf8497 Author: Angelo Dureghello Date: Fri Sep 14 21:13:48 2018 +0200 dmaengine: mcf-edma: avoid warning for wrong pointer cast This patch fixes the following compilation warning reported during x86_64 allmodconfig build: drivers/dma/mcf-edma.c: In function 'mcf_edma_filter_fn': drivers/dma/mcf-edma.c:296:33: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] return (mcf_chan->slave_id == (u32)param); Reported-by: Stephen Rothwell Signed-off-by: Angelo Dureghello Signed-off-by: Vinod Koul commit aa2b88074a569ac6c626c36f31b566158a4939ff Author: Ville Syrjälä Date: Mon Sep 17 18:15:03 2018 +0300 drm/i915/sdvo: Fix multi function encoder stuff SDVO encoders can have multiple different types of outputs hanging off them. Currently the code tries to muck around with various is_foo flags in the encoder to figure out which type its driving. That doesn't work with atomic and other stuff, so let's nuke those flags and just look at which type of connector we're actually dealing with. The is_hdmi we'll need as that's not discoverable via the output flags, but we'll just move it under the connector. We'll also move the sdvo fixed mode handling out from the .get_modes() hook into the sdvo lvds init function so that we can bail out properly if there is no fixed mode to be found. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180917151504.8754-1-ville.syrjala@linux.intel.com Reviewed-by: Rodrigo Vivi commit f34ecdbd5661816ce8bbd7511f33181ffa8f4895 Author: David Lechner Date: Tue Sep 18 12:08:49 2018 -0500 spi: spi-davinci: Don't error when SPI_CS_WORD and cs_gpio This remove the check and subsequent return of error for the case when a SPI device requires SPI_CS_WORD and is also configured to use a GPIO for the CS line. Commit a134cc414e86 ("spi: always use software fallback for SPI_CS_WORD when using cs_gio") handles this case now, so this check is no longer necessary. Signed-off-by: David Lechner Signed-off-by: Mark Brown commit 71388b21569754ecd36eabd66fd9ca8c6d761fed Author: David Lechner Date: Tue Sep 18 12:08:48 2018 -0500 spi: always use software fallback for SPI_CS_WORD when using cs_gio This modifies the condition for using the software fallback implementation for SPI_CS_WORD when the SPI controller is using a GPIO for the CS line. When using a GPIO for CS, the hardware implementation won't work, so we just enable the software fallback globally in this case. Signed-off-by: David Lechner Signed-off-by: Mark Brown commit 37efe23dcca3c59cee662f1c28835020bef31cc0 Author: Shuming Fan Date: Tue Sep 18 19:51:53 2018 +0800 ASoC: rt5682: Minor code modification Minor code changes are: - improve the readability in patch list - add i2c remove function - regmap_register_patch changes to regmap_multi_reg_write Signed-off-by: Shuming Fan Signed-off-by: Mark Brown commit c50535ed6a10fcae1b64ae83c0f6b1eeb5535afc Author: Akshu Agrawal Date: Tue Sep 18 12:53:13 2018 +0530 ASoC: AMD: Fix capture unstable in beginning for some runs alsa_conformance_test -C hw:0,4 -p 1024 --debug would sometime show: TIME_DIFF(s) HW_LEVEL READ RATE 0.000095970 1024 1024 10670001.041992 0.042609555 1024 2048 24032.168372 0.021330364 1024 3072 48006.681930 0.021339559 1024 4096 47985.996337 The issue is that in dma pointer function we can have stale value of the register for current descriptor of channel. The register retains the number of the last descriptor that was transferred. Fix ensures that we report position, 0, till the one period worth of data is transferred. After one period of data, in handler of period completion interrupt we update the config and correct value of descriptor starts reflecting. Signed-off-by: Akshu Agrawal Signed-off-by: Mark Brown commit 28b20dde5e1c943ab899549a655ac4935cffccbb Author: Shuming Fan Date: Tue Sep 18 19:51:38 2018 +0800 ASoC: rt5682: Fix the boost volume at the begining of playback This patch fixed the boost volume at the begining of playback while DAC volume set to lower level. Signed-off-by: Shuming Fan Signed-off-by: Mark Brown commit afd603e4ded0fad9e3102d514020af8494da1604 Author: Shuming Fan Date: Tue Sep 18 19:50:38 2018 +0800 ASoC: rt5682: Update calibration function The ADC/DAC path should open while calibration process. Signed-off-by: Shuming Fan Signed-off-by: Mark Brown commit 90fbeb0cabf75e7ab04f4a13a237cd8ccb4544d9 Merge: bf0fa00fd841 3f24f37adbc9 Author: Mark Brown Date: Tue Sep 18 10:30:14 2018 -0700 Merge branch 'asoc-4.19' into asoc-4.20 for rt5682 deps. commit 3f24f37adbc9a1059420a9c8f857e3490a4bce5e Author: Shuming Fan Date: Tue Sep 18 19:51:24 2018 +0800 ASoC: rt5682: Remove HP volume control This patch removed Headphone Playback Volume control. Due to codec settings, we don't want the user to change HP analog gain. The user could use DAC1 Playback Volume control to change playback volume. Signed-off-by: Shuming Fan Signed-off-by: Mark Brown commit bf0fa00fd8410b377a3403adb58e32fc703e86e8 Author: Shuming Fan Date: Tue Sep 18 19:51:08 2018 +0800 ASoC: rt5682: Improve HP performance We change the settings while HP power-up for better performance. Signed-off-by: Shuming Fan Signed-off-by: Mark Brown commit 29ca7d32d7f10737e8d165fcf40fe31d44b06bee Author: zhong jiang Date: Tue Sep 18 16:16:24 2018 +0800 ASoC: remove redundant include 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 Acked-by: Charles Keepax Signed-off-by: Mark Brown commit e366fa435032db1ce1538a2c029714666985dd48 Merge: cf7d97e1e54d 5211da9ca526 Author: David S. Miller Date: Tue Sep 18 09:33:27 2018 -0700 Merge ra.kernel.org:/pub/scm/linux/kernel/git/davem/net Two new tls tests added in parallel in both net and net-next. Used Stephen Rothwell's linux-next resolution. Signed-off-by: David S. Miller commit 00bca73bfca4fb0ab089b94cad0fc83d8b49c25f Author: Peter Shih Date: Mon Sep 10 11:54:21 2018 +0800 spi: mediatek: Don't modify spi_transfer when transfer. Mediatek SPI driver modifies some fields (tx_buf, rx_buf, len, tx_dma, rx_dma) of the spi_transfer* passed in when doing transfer_one and in interrupt handler. This is somewhat unexpected, and there are some caller (e.g. Cr50 spi driver) that reuse the spi_transfer for multiple messages. Add a field to record how many bytes have been transferred, and calculate the right len / buffer based on it instead. Signed-off-by: Pi-Hsun Shih Change-Id: I23e218cd964f16c0b2b26127d4a5ca6529867673 Signed-off-by: Mark Brown commit 76f99ae5b54d48430d1f0c5512a84da0ff9761e0 Author: Dou Liyang Date: Sun Sep 9 01:58:38 2018 +0800 irq/matrix: Spread managed interrupts on allocation Linux spreads out the non managed interrupt across the possible target CPUs to avoid vector space exhaustion. Managed interrupts are treated differently, as for them the vectors are reserved (with guarantee) when the interrupt descriptors are initialized. When the interrupt is requested a real vector is assigned. The assignment logic uses the first CPU in the affinity mask for assignment. If the interrupt has more than one CPU in the affinity mask, which happens when a multi queue device has less queues than CPUs, then doing the same search as for non managed interrupts makes sense as it puts the interrupt on the least interrupt plagued CPU. For single CPU affine vectors that's obviously a NOOP. Restructre the matrix allocation code so it does the 'best CPU' search, add the sanity check for an empty affinity mask and adapt the call site in the x86 vector management code. [ tglx: Added the empty mask check to the core and improved change log ] Signed-off-by: Dou Liyang Signed-off-by: Thomas Gleixner Cc: hpa@zytor.com Link: https://lkml.kernel.org/r/20180908175838.14450-2-dou_liyang@163.com commit 8ffe4e61c06a48324cfd97f1199bb9838acce2f2 Author: Dou Liyang Date: Sun Sep 9 01:58:37 2018 +0800 irq/matrix: Split out the CPU selection code into a helper Linux finds the CPU which has the lowest vector allocation count to spread out the non managed interrupts across the possible target CPUs, but does not do so for managed interrupts. Split out the CPU selection code into a helper function for reuse. No functional change. Signed-off-by: Dou Liyang Signed-off-by: Thomas Gleixner Cc: hpa@zytor.com Link: https://lkml.kernel.org/r/20180908175838.14450-1-dou_liyang@163.com commit 0fd85869c2a9c8723a98bc1f56a876e8383649f4 Author: Jonas Gorski Date: Tue Aug 28 13:44:11 2018 +0200 spi/bcm63xx-hsspi: keep pll clk enabled If the pll clock needs to be enabled to get its rate, it will also need to be enabled to provide it. So ensure it is kept enabled through the lifetime of the device. Fixes: 0d7412ed1f5dc ("spi/bcm63xx-hspi: Enable the clock before calling clk_get_rate().") Signed-off-by: Jonas Gorski Signed-off-by: Mark Brown commit 76c9805b28557d0b6d439359350061ed0a9395e3 Author: YueHaibing Date: Thu Sep 13 21:18:11 2018 +0800 Smack: remove set but not used variable 'root_inode' Fixes gcc '-Wunused-but-set-variable' warning: security/smack/smackfs.c: In function 'smk_fill_super': security/smack/smackfs.c:2856:16: warning: variable 'root_inode' set but not used [-Wunused-but-set-variable] Signed-off-by: YueHaibing Signed-off-by: Casey Schaufler commit 534e0e52bc23de588e81b5a6f75e10c8c4b189fc Author: Yonghong Song Date: Mon Sep 17 22:08:13 2018 -0700 samples/bpf: fix a compilation failure samples/bpf build failed with the following errors: $ make samples/bpf/ ... HOSTCC samples/bpf/sockex3_user.o /data/users/yhs/work/net-next/samples/bpf/sockex3_user.c:16:8: error: redefinition of ‘struct bpf_flow_keys’ struct bpf_flow_keys { ^ In file included from /data/users/yhs/work/net-next/samples/bpf/sockex3_user.c:4:0: ./usr/include/linux/bpf.h:2338:9: note: originally defined here struct bpf_flow_keys *flow_keys; ^ make[3]: *** [samples/bpf/sockex3_user.o] Error 1 Commit d58e468b1112d ("flow_dissector: implements flow dissector BPF hook") introduced struct bpf_flow_keys in include/uapi/linux/bpf.h and hence caused the naming conflict with samples/bpf/sockex3_user.c. The fix is to rename struct bpf_flow_keys in samples/bpf/sockex3_user.c to flow_keys to avoid the conflict. Signed-off-by: Yonghong Song Signed-off-by: Daniel Borkmann commit 664e7878451f62389b273e204ae8866c85ef1456 Author: YueHaibing Date: Tue Sep 18 09:45:34 2018 +0800 samples/bpf: remove duplicated includes Remove duplicated includes. Signed-off-by: YueHaibing Acked-by: Yonghong Song Signed-off-by: Daniel Borkmann commit 8062b2263a9fc294ddeb4024b113e8e26b82d5de Author: Jesse Brandeburg Date: Fri Sep 14 17:37:44 2018 -0700 intel-ethernet: rename i40evf to iavf Rename the Intel Ethernet Adaptive Virtual Function driver (i40evf) to a new name (iavf) that is more consistent with the ongoing maintenance of the driver as the universal VF driver for multiple product lines. This first patch fixes up the directory names and the .ko name, intentionally ignoring the function names inside the driver for now. Basically this is the simplest patch that gets the rename done and will be followed by other patches that rename the internal functions. This patch also addresses a couple of string/name issues and updates the Copyright year. Also, made sure to add a MODULE_ALIAS to the old name. Signed-off-by: Jesse Brandeburg Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 7900efc19214e326913dc0f0e8ded24adc0018f2 Author: Yonghong Song Date: Mon Sep 17 16:13:00 2018 -0700 tools/bpf: bpftool: improve output format for bpftool net This is a followup patch for Commit f6f3bac08ff9 ("tools/bpf: bpftool: add net support"). Some improvements are made for the bpftool net output. Specially, plain output is more concise such that per attachment should nicely fit in one line. Compared to previous output, the prog tag is removed since it can be easily obtained with program id. Similar to xdp attachments, the device name is added to tc attachments. The bpf program attached through shared block mechanism is supported as well. $ ip link add dev v1 type veth peer name v2 $ tc qdisc add dev v1 ingress_block 10 egress_block 20 clsact $ tc qdisc add dev v2 ingress_block 10 egress_block 20 clsact $ tc filter add block 10 protocol ip prio 25 bpf obj bpf_shared.o sec ingress flowid 1:1 $ tc filter add block 20 protocol ip prio 30 bpf obj bpf_cyclic.o sec classifier flowid 1:1 $ bpftool net xdp: tc: v2(7) clsact/ingress bpf_shared.o:[ingress] id 23 v2(7) clsact/egress bpf_cyclic.o:[classifier] id 24 v1(8) clsact/ingress bpf_shared.o:[ingress] id 23 v1(8) clsact/egress bpf_cyclic.o:[classifier] id 24 The documentation and "bpftool net help" are updated to make it clear that current implementation only supports xdp and tc attachments. For programs attached to cgroups, "bpftool cgroup" can be used to dump attachments. For other programs e.g. sk_{filter,skb,msg,reuseport} and lwt/seg6, iproute2 tools should be used. The new output: $ bpftool net xdp: eth0(2) driver id 198 tc: eth0(2) clsact/ingress fbflow_icmp id 335 act [{icmp_action id 336}] eth0(2) clsact/egress fbflow_egress id 334 $ bpftool -jp net [{ "xdp": [{ "devname": "eth0", "ifindex": 2, "mode": "driver", "id": 198 } ], "tc": [{ "devname": "eth0", "ifindex": 2, "kind": "clsact/ingress", "name": "fbflow_icmp", "id": 335, "act": [{ "name": "icmp_action", "id": 336 } ] },{ "devname": "eth0", "ifindex": 2, "kind": "clsact/egress", "name": "fbflow_egress", "id": 334 } ] } ] Signed-off-by: Yonghong Song Signed-off-by: Daniel Borkmann commit 42e54f6467ecc25f464d74c0fcea0c9fab1c2e3b Author: Nishanth Menon Date: Wed Sep 5 11:20:24 2018 -0500 arm64: dts: ti: k3-am6: Add Device Management Security Controller support Add TISCI compatible System controller for AM6 SoCs. Signed-off-by: Nishanth Menon Acked-by: Tony Lindgren Signed-off-by: Tero Kristo commit 77ccbae4f9c8a14d41cb741f1d0a99dee68539fc Author: Nishanth Menon Date: Wed Sep 5 11:20:23 2018 -0500 arm64: dts: ti: am654: Add secure proxy instance for main domain Add secure proxy instance for Main domain Signed-off-by: Nishanth Menon Acked-by: Tony Lindgren Signed-off-by: Tero Kristo commit 4201af2544b39782d78ca1d4d59908e3b2502333 Author: Nishanth Menon Date: Wed Sep 5 11:20:22 2018 -0500 arm64: dts: ti: am654: Add uart nodes Add uart nodes for AM654 device tree components. Signed-off-by: Nishanth Menon Acked-by: Tony Lindgren Signed-off-by: Tero Kristo commit 3bc1572068e3896b60d86f9c0fb56d1cef28201c Author: Kishon Vijay Abraham I Date: Wed Sep 5 16:47:38 2018 +0530 arm64: dts: ti: k3-am65: Change #address-cells and #size-cells of interconnect to 2 AM65 has two PCIe controllers and each PCIe controller has '2' address spaces one within the 4GB address space of the SoC and the other above the 4GB address space of the SoC (cbass_main) in addition to the register space. The size of the address space above the 4GB SoC address space is 4GB. These address ranges will be used by CPU/DMA to access the PCIe address space. In order to represent the address space above the 4GB SoC address space and to represent the size of this address space as 4GB, change address-cells and size-cells of interconnect to 2. Since OSPI has similar need in MCU Domain Memory Map, change address-cells and size-cells of cbass_mcu interconnect also to 2. Fixes: ea47eed33a3fe3d919 ("arm64: dts: ti: Add Support for AM654 SoC") Signed-off-by: Kishon Vijay Abraham I Acked-by: Tony Lindgren Acked-by: Vignesh R Acked-by: Nishanth Menon Signed-off-by: Tero Kristo commit 1ee516ffa73107f96c1355cce5880b6c38d22d51 Author: Ville Syrjälä Date: Tue Sep 18 16:10:59 2018 +0300 drm/i915: Fix logic fumble in rotation vs. ccs check Smatch reports: ../drivers/gpu/drm/i915/intel_sprite.c:1192 skl_plane_check_fb() warn: was || intended here instead of &&? Obviously smatch is correct here since we're trying to check if we're using either of the ccs modifiers. Since we now have is_ccs_modifier() let's use it to fix this. Cc: Dan Carpenter Cc: José Roberto de Souza Reported-by: Dan Carpenter Fixes: e21c2d331018 ("drm/i915: Move skl plane fb related checks into a better place") Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180918131059.793-1-ville.syrjala@linux.intel.com Reviewed-by: Tvrtko Ursulin commit 53f1e0620b9b67f786b23c7e7fee96323bf2aa45 Author: Souptick Joarder Date: Wed Aug 1 01:37:05 2018 +0530 drm/tegra: Convert drm_atomic_helper_suspend/resume() convert drm_atomic_helper_suspend/resume() to use drm_mode_config_helper_suspend/resume(). With this conversion, tegra_drm_fb_suspend() and tegra_drm_fb_resume() will not be used anymore. Both of these functions can be removed. Also, in tegra_drm struct's member state will not be used anymore. So this can be removed forever. Fixed one sparse warning. Signed-off-by: Souptick Joarder Signed-off-by: Ajit Negi Signed-off-by: Thierry Reding commit 9141b60cf6a53c99f8a9309bf8e1c6650a6785c1 Author: Chen Gong Date: Tue Sep 18 22:27:28 2018 +0800 staging: erofs: replace BUG_ON with DBG_BUGON in data.c This patch replace BUG_ON with DBG_BUGON in data.c, and add necessary error handler. Signed-off-by: Chen Gong Reviewed-by: Gao Xiang Reviewed-by: Chao Yu Signed-off-by: Gao Xiang Signed-off-by: Greg Kroah-Hartman commit 284db12cfda3a24c47b9c4b867ce4cf3dcf047a3 Author: Chen Gong Date: Tue Sep 18 22:27:27 2018 +0800 staging: erofs: add trace points for reading zipped data This patch adds trace points for reading zipped data. Signed-off-by: Chen Gong Reviewed-by: Chao Yu Reviewed-by: Gao Xiang Signed-off-by: Gao Xiang Signed-off-by: Greg Kroah-Hartman commit 6bec52047f56d44d26d076a408a1bf60b58c91fa Author: Gao Xiang Date: Tue Sep 18 22:27:26 2018 +0800 staging: erofs: avoid magic constants when initializing clusterbits Currently erofs only supports clustersize == blocksize. and clustersize == 2^n * blocksize will be supported in the future. Reviewed-by: Chao Yu Signed-off-by: Gao Xiang Signed-off-by: Greg Kroah-Hartman commit 1e05ff36e6921ca61bdbf779f81a602863569ee3 Author: Gao Xiang Date: Tue Sep 18 22:27:25 2018 +0800 staging: erofs: complete error handing of z_erofs_do_read_page This patch completes error handing code of z_erofs_do_read_page. PG_error will be set when some read error happens, therefore z_erofs_onlinepage_endio will unlock this page without setting PG_uptodate. Reviewed-by: Chao Yu Signed-off-by: Gao Xiang Signed-off-by: Greg Kroah-Hartman commit 0734ffbf574ee813b20899caef2fe0ed502bb783 Author: Gao Xiang Date: Tue Sep 18 22:25:36 2018 +0800 staging: erofs: fix a bug when appling cache strategy As described in Kconfig, the last compressed pack should be cached for further reading for either `EROFS_FS_ZIP_CACHE_UNIPOLAR' or `EROFS_FS_ZIP_CACHE_BIPOLAR' by design. However, there is a bug in z_erofs_do_read_page, it will switch `initial' to `false' at the very beginning before it decides to cache the last compressed pack. caching strategy should work properly after appling this patch. Reviewed-by: Chao Yu Signed-off-by: Gao Xiang Signed-off-by: Greg Kroah-Hartman commit c1ccc8670c269ff088473d3dc27854f8098991fd Author: Gao Xiang Date: Tue Sep 18 22:25:35 2018 +0800 staging: erofs: complete error handing of z_erofs_map_blocks_iter This patch completes error handing of z_erofs_map_blocks_iter and vle_get_logical_extent_head, including no memory and io error cases. Reviewed-by: Chao Yu Signed-off-by: Gao Xiang Signed-off-by: Greg Kroah-Hartman commit a07eeddf5b6307c301c8571618d2ce091c31bc11 Author: Gao Xiang Date: Tue Sep 18 22:25:34 2018 +0800 staging: erofs: clean up z_erofs_map_blocks_iter This patch mainly introduces `vle_map_blocks_iter_ctx' to clean up z_erofs_map_blocks_iter and vle_get_logical_extent_head. It changes the return value of `vle_get_logical_extent_head' to int for the later error handing. In addition, it also renames `pcn' to `pblk' since only `pblk' exists in erofs compression ondisk format. Reviewed-by: Chao Yu Signed-off-by: Gao Xiang Signed-off-by: Greg Kroah-Hartman commit 37ec35a6cc2b99eb7fd6b85b7d7b75dff46bc353 Author: Gao Xiang Date: Tue Sep 18 22:25:33 2018 +0800 staging: erofs: fix a missing endian conversion This patch fixes a missing endian conversion in vle_get_logical_extent_head. Reviewed-by: Chao Yu Signed-off-by: Gao Xiang Signed-off-by: Greg Kroah-Hartman commit feacbecb39db098cd9f6d728dcb00d753a3f36ed Author: Jiri Slaby Date: Fri Sep 7 15:19:06 2018 +0200 TTY: tty_buffer, warn on leaks When we leak some tty buffer, warn about that. For that we need to account the memory used also in the tty_buffer_free_all function. On other locations, the accounting is handled correctly. Note that we do not account the free list, as that was accounted in tty_buffer_free before put on the free list. I have been using this patch for ages, so let's see if anybody else encounters any issues. Signed-off-by: Jiri Slaby Signed-off-by: Greg Kroah-Hartman commit 863299001b39280b3be9f5c627d23debe66aa71b Author: Tobin C. Harding Date: Wed Sep 12 17:50:42 2018 +1000 tty_port: Remove incorrect whitespace after comments Currently there are a bunch of kernel-doc function comments that have a line of whitespace after the comment and before the function they comment - this is incorrect, there should be no whitespace here. Remove incorrect whitespace between comment and associated function. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman commit 30ec514d440cf2c472c8e4b0079af2c731f71a3e Author: Phil Elwell Date: Wed Sep 12 15:31:56 2018 +0100 sc16is7xx: Fix for "Unexpected interrupt: 8" The SC16IS752 has an Enhanced Feature Register which is aliased at the same address as the Interrupt Identification Register; accessing it requires that a magic value is written to the Line Configuration Register. If an interrupt is raised while the EFR is mapped in then the ISR won't be able to access the IIR, leading to the "Unexpected interrupt" error messages. Avoid the problem by claiming a mutex around accesses to the EFR register, also claiming the mutex in the interrupt handler work item (this is equivalent to disabling interrupts to interlock against a non-threaded interrupt handler). See: https://github.com/raspberrypi/linux/issues/2529 Signed-off-by: Phil Elwell Signed-off-by: Greg Kroah-Hartman commit 8344498721059754e09d30fe255a12dab8fb03ef Author: Phil Elwell Date: Wed Sep 12 15:31:55 2018 +0100 sc16is7xx: Fix for multi-channel stall The SC16IS752 is a dual-channel device. The two channels are largely independent, but the IRQ signals are wired together as an open-drain, active low signal which will be driven low while either of the channels requires attention, which can be for significant periods of time until operations complete and the interrupt can be acknowledged. In that respect it is should be treated as a true level-sensitive IRQ. The kernel, however, needs to be able to exit interrupt context in order to use I2C or SPI to access the device registers (which may involve sleeping). Therefore the interrupt needs to be masked out or paused in some way. The usual way to manage sleeping from within an interrupt handler is to use a threaded interrupt handler - a regular interrupt routine does the minimum amount of work needed to triage the interrupt before waking the interrupt service thread. If the threaded IRQ is marked as IRQF_ONESHOT the kernel will automatically mask out the interrupt until the thread runs to completion. The sc16is7xx driver used to use a threaded IRQ, but a patch switched to using a kthread_worker in order to set realtime priorities on the handler thread and for other optimisations. The end result is non-threaded IRQ that schedules some work then returns IRQ_HANDLED, making the kernel think that all IRQ processing has completed. The work-around to prevent a constant stream of interrupts is to mark the interrupt as edge-sensitive rather than level-sensitive, but interpreting an active-low source as a falling-edge source requires care to prevent a total cessation of interrupts. Whereas an edge-triggering source will generate a new edge for every interrupt condition a level-triggering source will keep the signal at the interrupting level until it no longer requires attention; in other words, the host won't see another edge until all interrupt conditions are cleared. It is therefore vital that the interrupt handler does not exit with an outstanding interrupt condition, otherwise the kernel will not receive another interrupt unless some other operation causes the interrupt state on the device to be cleared. The existing sc16is7xx driver has a very simple interrupt "thread" (kthread_work job) that processes interrupts on each channel in turn until there are no more. If both channels are active and the first channel starts interrupting while the handler for the second channel is running then it will not be detected and an IRQ stall ensues. This could be handled easily if there was a shared IRQ status register, or a convenient way to determine if the IRQ had been deasserted for any length of time, but both appear to be lacking. Avoid this problem (or at least make it much less likely to happen) by reducing the granularity of per-channel interrupt processing to one condition per iteration, only exiting the overall loop when both channels are no longer interrupting. Signed-off-by: Phil Elwell Signed-off-by: Greg Kroah-Hartman commit f6aa5beb45be27968a4df90176ca36dfc4363d37 Author: Marek Vasut Date: Mon Sep 3 02:44:52 2018 +0200 serial: 8250: Fix clearing FIFOs in RS485 mode again The 8250 FIFOs indeed need to be cleared after stopping transmission in RS485 mode without SER_RS485_RX_DURING_TX flag set. But there are two problems with the approach taken by the previous patch from Fixes tag. First, serial8250_clear_fifos() should clear fifos, but what it really does is it enables the FIFOs unconditionally if present, clears them and then sets the FCR register to zero, which effectively disables the FIFOs. In case the FIFO is disabled, enabling it and clearing it makes no sense and in fact can trigger misbehavior of the 8250 core. Moreover, the FCR register may contain other FIFO configuration bits which may not be writable unconditionally and writing them incorrectly can trigger misbehavior of the 8250 core too. (ie. AM335x UART swallows the first byte and retransmits the last byte twice because of this FCR write). Second, serial8250_clear_and_reinit_fifos() completely reloads the FCR, but what really has to happen at the end of the RS485 transmission is clearing of the FIFOs and nothing else. This patch repairs serial8250_clear_fifos() so that it really only clears the FIFOs by operating on FCR[2:1] bits and leaves all the other bits alone. It also undoes serial8250_clear_and_reinit_fifos() from __do_stop_tx_rs485() as serial8250_clear_fifos() is sufficient. Signed-off-by: Marek Vasut Fixes: 2bed8a8e7072 ("Clearing FIFOs in RS485 emulation mode causes subsequent transmits to break") Cc: Daniel Jedrychowski Cc: Greg Kroah-Hartman Cc: stable # let it bake a bit before merging Signed-off-by: Greg Kroah-Hartman commit fff10721d8b819c12266620c2981a05dbeb72175 Author: Rob Herring Date: Mon Aug 27 20:52:47 2018 -0500 tty: 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: Greg Kroah-Hartman Cc: Jiri Slaby Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: linux-serial@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Rob Herring Signed-off-by: Greg Kroah-Hartman commit a27d938251ef40c43db81af16fc26b2cec181d4d Author: John Garry Date: Thu Aug 30 17:08:50 2018 +0800 serial: 8250_of: Fix for lack of interrupt support In commit c58caaab3bf8 ("serial: 8250: of: Defer probe on missing IRQ"), a check was added for the UART driver being probed prior to the parent IRQ controller. Unfortunately this breaks certain boards which have no interrupt support, like Huawei D03. Indeed, the 8250 DT bindings state that interrupts should be supported - not must. To fix, switch from irq_of_parse_and_map() to of_irq_get(), which does relay whether the IRQ host controller domain is not ready, i.e. defer probe, instead of assuming it. Fixes: c58caaab3bf8 ("serial: 8250: of: Defer probe on missing IRQ") Signed-off-by: John Garry Reviewed-by: Rob Herring Reviewed-by: Alexander Sverdlin Tested-by: Alexander Sverdlin Signed-off-by: Greg Kroah-Hartman commit c362272bdea32bf048d6916b0a2dc485eb9cf787 Author: Douglas Anderson Date: Wed Sep 5 13:11:46 2018 -0700 tty: serial: qcom_geni_serial: Fix serial when not used as console If you've got the "console" serial port setup to use just as a UART (AKA there is no "console=ttyMSMX" on the kernel command line) then certain initialization is skipped. When userspace later tries to do something with the port then things go boom (specifically, on my system, some sort of exception hit that caused the system to reboot itself w/ no error messages). Let's cleanup / refactor the init so that we always run the same init code regardless of whether we're using the console. To make this work, we make rely on qcom_geni_serial_pm doing its job to turn resources on. For the record, here is a trace of the order of things (after this patch) when console= is specified on the command line and we have an agetty on the port: qcom_geni_serial_pm: 4 (undefined) => 0 (on) qcom_geni_console_setup qcom_geni_serial_port_setup qcom_geni_serial_console_write qcom_geni_serial_startup qcom_geni_serial_start_tx ...and here is the order of things (after this patch) when console= is _NOT_ specified on the command line and we have an agetty port: qcom_geni_serial_pm: 4 => 0 qcom_geni_serial_pm: 0 => 3 qcom_geni_serial_pm: 3 => 0 qcom_geni_serial_startup qcom_geni_serial_port_setup qcom_geni_serial_pm: 0 => 3 qcom_geni_serial_pm: 3 => 0 qcom_geni_serial_startup qcom_geni_serial_start_tx Fixes: c4f528795d1a ("tty: serial: msm_geni_serial: Add serial driver support for GENI based QUP") Signed-off-by: Douglas Anderson Reviewed-by: Matthias Kaehlcke Signed-off-by: Greg Kroah-Hartman commit 2843cbb5d3c467a85112f004a8a9345370760520 Author: Geert Uytterhoeven Date: Thu Aug 23 23:30:27 2018 +0200 tty: serial: qcom_geni_serial: Drop useless check for dev.of_node With gcc 4.1.2: drivers/tty/serial/qcom_geni_serial.c: In function ‘qcom_geni_serial_probe’: drivers/tty/serial/qcom_geni_serial.c:1261: warning: ‘drv’ may be used uninitialized in this function Indeed, if dev.of_node is NULL, drv will be used uninitialized, and dereferenced in uart_add_one_port(). However, as this driver supports DT only, dev.of_node will always be valid. Hence remove the useless check for dev.of_node, killing the warning as a side effect. Fixes: 8a8a66a1a18a1dbd ("tty: serial: qcom_geni_serial: Add support for flow control") Signed-off-by: Geert Uytterhoeven Signed-off-by: Greg Kroah-Hartman commit 5963e8a3122471cadfe0eba41c4ceaeaa5c8bb4d Author: Anton Vasilyev Date: Tue Aug 7 13:59:05 2018 +0300 serial: mxs-auart: Fix potential infinite loop On the error path of mxs_auart_request_gpio_irq() is performed backward iterating with index i of enum type. Underline enum type may be unsigned char. In this case check (--i >= 0) will be always true and error handling goes into infinite loop. The patch changes the check so that it is valid for signed and unsigned types. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Anton Vasilyev Acked-by: Uwe Kleine-König Signed-off-by: Greg Kroah-Hartman commit d2de9601eb12e7c5b7519cf155cf613322211b54 Author: Baolin Wang Date: Mon Sep 17 11:33:44 2018 -0700 serial: sprd: Fix the indentation issue Make the macros' definition and code have the same correct indentation. Signed-off-by: Baolin Wang Acked-by: Chunyan Zhang Signed-off-by: Greg Kroah-Hartman commit dd22161eef8b19930aa4439722940f44e2aff521 Author: Baolin Wang Date: Mon Sep 17 11:33:43 2018 -0700 serial: sprd: Change 'int' to 'unsigned int' The register offset value should be 'unsigned int' type. Moreover, prefer 'unsigned int' to bare use of 'unsigned'. Signed-off-by: Baolin Wang Acked-by: Chunyan Zhang Signed-off-by: Greg Kroah-Hartman commit 262d3dc00730f7a9d835faeca46689d750177e55 Author: Baolin Wang Date: Mon Sep 17 11:33:42 2018 -0700 serial: sprd: Remove unnecessary resource validation The devm_ioremap_resource() will valid the resources, thus remove the unnecessary resource validation in the driver. Signed-off-by: Baolin Wang Acked-by: Chunyan Zhang Signed-off-by: Greg Kroah-Hartman commit 2b5a997386b0594e671a32c7e429cf59ac8fc54c Author: Baolin Wang Date: Mon Sep 17 11:33:41 2018 -0700 serial: sprd: Use readable macros instead of magic number Define readable macros instead of magic number to make code more readable. Signed-off-by: Baolin Wang Acked-by: Chunyan Zhang Signed-off-by: Greg Kroah-Hartman commit 20464f3a9b46ef882b9fdf140dcc7ff6a6db8d4c Author: Baolin Wang Date: Mon Sep 17 11:33:40 2018 -0700 serial: sprd: Remove unused structure Remove the unused reg_backup structure. Signed-off-by: Baolin Wang Acked-by: Chunyan Zhang Signed-off-by: Greg Kroah-Hartman commit c886751465b8e312389d91446b76a00f45a79276 Author: Lokesh Vutla Date: Mon Aug 27 20:03:02 2018 -0500 serial: 8250_omap: Make 8250_omap driver driver depend on ARCH_K3 Allow 8250 omap serial driver to be used for K3 platforms. Signed-off-by: Lokesh Vutla Signed-off-by: Nishanth Menon Acked-by: Tony Lindgren Acked-by: Vignesh R Signed-off-by: Greg Kroah-Hartman commit 1ff3652bc7111df26b5807037f624be294cf69d5 Author: Marek Szyprowski Date: Thu Sep 13 10:21:25 2018 +0200 serial: samsung: Enable baud clock for UART reset procedure in resume Ensure that the baud clock is also enabled for UART register writes in driver resume. On Exynos5433 SoC this is needed to avoid external abort issue. Signed-off-by: Marek Szyprowski Reviewed-by: Krzysztof Kozlowski Signed-off-by: Greg Kroah-Hartman commit 3d8b43ad9c0cf023dd12458f23250c1b86b21e4e Author: Chris Brandt Date: Mon Sep 17 13:26:23 2018 -0500 serial: sh-sci: Add earlycon for R7S9210 Since the register offsets are different for RZ/A2 SCIF, we need to declare a separate string for it. Signed-off-by: Chris Brandt Reviewed-by: Geert Uytterhoeven Signed-off-by: Greg Kroah-Hartman commit a1c2fd7e1098ea49ff31785ad970311d64e5904e Author: Geert Uytterhoeven Date: Thu Aug 30 14:54:04 2018 +0200 Revert "serial: sh-sci: Allow for compressed SCIF address" This reverts commit 2d4dd0da45401c7ae7332b4d1eb7bbb1348edde9. This broke earlycon on all Renesas ARM platforms using a SCIF port for the serial console (R-Car, RZ/A1, RZ/G1, RZ/G2 SoCs), due to an incorrect value of port->regshift. Signed-off-by: Geert Uytterhoeven Acked-by: Chris Brandt Signed-off-by: Greg Kroah-Hartman commit 10c63443b74d1ef5c1b3bb104a9e6e40dc2437ff Author: Geert Uytterhoeven Date: Thu Aug 30 14:54:03 2018 +0200 Revert "serial: sh-sci: Remove SCIx_RZ_SCIFA_REGTYPE" This reverts commit 7acece71a517cad83a0842a94d94c13f271b680c. Signed-off-by: Geert Uytterhoeven Acked-by: Chris Brandt Signed-off-by: Greg Kroah-Hartman commit fcfed1be53e014b9d707ca4520bb1591c2700f2e Author: Anson Huang Date: Wed Sep 5 09:24:27 2018 +0800 tty: serial: imx: add pinctrl sleep/default mode switch for suspend On some i.MX SoCs' low power mode, such as i.MX7D's LPSR(low power state retention), UART iomux settings will be lost, need to add pinctrl sleep/default mode switch during suspend/resume to make sure UART iomux settings are correct after resume. Signed-off-by: Anson Huang Acked-by: Uwe Kleine-König Signed-off-by: Greg Kroah-Hartman commit 07b5e16e9830878291bc83df70e87cdb0833517c Author: Anson Huang Date: Wed Sep 5 09:24:26 2018 +0800 tty: serial: imx: add lock for registers save/restore In noirq suspend/resume stage with no_console_suspend enabled, imx_uart_console_write() may be called to print out log_buf message by printk(), so there will be race condition between imx_uart_console_write() and imx_uart_save/restore_context(), need to add lock to protect the registers save/restore operations. Signed-off-by: Anson Huang Acked-by: Uwe Kleine-König Signed-off-by: Greg Kroah-Hartman commit c974991d2620419fe21508fc4529014369d16df7 Author: jun qian Date: Mon Aug 27 07:49:04 2018 -0700 tty:serial:imx: use spin_lock instead of spin_lock_irqsave in isr Before the program enters the uart ISR, the local interrupt has been disabled by the system, so it's not appropriate to use spin_lock_irqsave interface in the ISR. Signed-off-by: jun qian Reviewed-by: Barry Song <21cnbao@gmail.com> Signed-off-by: Greg Kroah-Hartman commit deeb33e8fdd834770f75996c18153453d5af6c50 Author: Shubhrajyoti Datta Date: Mon Aug 6 14:22:14 2018 +0530 tty: serial: uartlite: Use dynamic array for console port Driver console functions are using pointer to static array with fixed size. There can be only one serial console at the time which is found by register_console(). register_console() is filling cons->index to port->line value. Signed-off-by: Shubhrajyoti Datta Signed-off-by: Greg Kroah-Hartman commit 5f6825d1cef747f6677a833708d698c7df3c1bc8 Author: Shubhrajyoti Datta Date: Mon Aug 6 14:22:13 2018 +0530 tty: serial: uartlite: remove console_init register_console is called twice once from uart_add_one_port -> uart_configure_port remove the double call Signed-off-by: Shubhrajyoti Datta Signed-off-by: Greg Kroah-Hartman commit 415b43bdb00890f5698ceff3d3531d2daa98c5a1 Author: Shubhrajyoti Datta Date: Mon Aug 6 14:22:12 2018 +0530 tty: serial: uartlite: Move uart register to probe Move uart register to probe. This is in preparation of removing the hardcoding of number of uarts. Signed-off-by: Shubhrajyoti Datta Signed-off-by: Greg Kroah-Hartman commit ea42d7a67a9e2b2e780eacbf9b2c3848c9ce2a0f Author: Shubhrajyoti Datta Date: Mon Aug 6 14:22:11 2018 +0530 tty: serial: uartlite: Enable clocks at probe At probe the uartlite is getting configured. Enable the clocks before assiging uart and disable after probe is done. Signed-off-by: Shubhrajyoti Datta Signed-off-by: Michal Simek Signed-off-by: Greg Kroah-Hartman commit 9d7c249a1ef9bf0d5696df14e6bc067004f16979 Author: Sebastian Andrzej Siewior Date: Thu Aug 2 13:14:32 2018 +0200 serial: 8250: drop the printk from serial8250_interrupt() The printk() in serial8250_interrupt() was once hidden behind a debug macro in commit f4f653e9875e5 ("serial: 8250, disable "too much work" messages") and reverted back in commit 12de375ec493a ("Revert "serial: 8250, disable "too much work" messages""). This was introduced first in 0.99.13k with the "serial" driver itself (and called pass_number with a limit of 64 and no print). In 1.1.13 it was renamed to pass_counter and the printk was behind #if 0. In 1.1.94 the limit of 64 was increased to 256 and hidden behind RS_ISR_PASS_LIMIT. With this change the #if 0 turned into #if 1. It slowly become what we have today with a loop limit of 512. Usually, that printk isn't hit. However on KVM with a busy UART and overloaded host it might happen. It is also likely with threaded interrupts and a task which preempts the interrupt handler. If the UART has (legitimate) work to do and we break out of the loop, nothing changes: the interrupt is most likely already pending in the interrupt controller and we end up in the handler anyway. This printk is hardly helping. Older kernels also had a comment saying that a bad configuration might lead to this but I don't see how that should happen because a wrongly configured interrupt number would let the handler leave "early" with IRQ_NONE and the spurious detected will handle that (weill since 2.6.11, before that we had no spurious detector). In that case, we would never loop that often here. This loop looks like an optimisation in order to pull the bytes from the FIFO which were received while we were already here instead of waiting for the interrupt. This might have been a good idea while the CPUs were slow and FIFOs small. There are other serial driver in tree, like the amba-pl*, which also have this kind of a loop but without the printk (and were based on this driver). Remove the printk which might trigger in otherwise valid situtations. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Greg Kroah-Hartman commit 2dd453168643d9475028cd867c57e65956a0f7f9 Author: Laura Abbott Date: Mon Sep 10 16:20:14 2018 -0700 kgdboc: Fix restrict error There's an error when compiled with restrict: drivers/tty/serial/kgdboc.c: In function ‘configure_kgdboc’: drivers/tty/serial/kgdboc.c:137:2: error: ‘strcpy’ source argument is the same as destination [-Werror=restrict] strcpy(config, opt); ^~~~~~~~~~~~~~~~~~~ As the error implies, this is from trying to use config as both source and destination. Drop the call to the function where config is the argument since nothing else happens in the function. Signed-off-by: Laura Abbott Reviewed-by: Daniel Thompson Signed-off-by: Greg Kroah-Hartman commit 39724d56a0a83d8e3822913583b50d62996800cc Author: He Zhe Date: Fri Aug 17 22:42:29 2018 +0800 kgdboc: Change printk to the right fashion pr_* is preferred according to scripts/checkpatch.pl. Cc: jason.wessel@windriver.com Cc: gregkh@linuxfoundation.org Cc: jslaby@suse.com Signed-off-by: He Zhe Acked-by: Daniel Thompson Signed-off-by: Greg Kroah-Hartman commit 1bd54d851f50dea6af30c3e6ff4f3e9aab5558f9 Author: He Zhe Date: Fri Aug 17 22:42:28 2018 +0800 kgdboc: Passing ekgdboc to command line causes panic kgdboc_option_setup does not check input argument before passing it to strlen. The argument would be a NULL pointer if "ekgdboc", without its value, is set in command line and thus cause the following panic. PANIC: early exception 0xe3 IP 10:ffffffff8fbbb620 error 0 cr2 0x0 [ 0.000000] CPU: 0 PID: 0 Comm: swapper Not tainted 4.18-rc8+ #1 [ 0.000000] RIP: 0010:strlen+0x0/0x20 ... [ 0.000000] Call Trace [ 0.000000] ? kgdboc_option_setup+0x9/0xa0 [ 0.000000] ? kgdboc_early_init+0x6/0x1b [ 0.000000] ? do_early_param+0x4d/0x82 [ 0.000000] ? parse_args+0x212/0x330 [ 0.000000] ? rdinit_setup+0x26/0x26 [ 0.000000] ? parse_early_options+0x20/0x23 [ 0.000000] ? rdinit_setup+0x26/0x26 [ 0.000000] ? parse_early_param+0x2d/0x39 [ 0.000000] ? setup_arch+0x2f7/0xbf4 [ 0.000000] ? start_kernel+0x5e/0x4c2 [ 0.000000] ? load_ucode_bsp+0x113/0x12f [ 0.000000] ? secondary_startup_64+0xa5/0xb0 This patch adds a check to prevent the panic. Cc: stable@vger.kernel.org Cc: jason.wessel@windriver.com Cc: gregkh@linuxfoundation.org Cc: jslaby@suse.com Signed-off-by: He Zhe Reviewed-by: Daniel Thompson Signed-off-by: Greg Kroah-Hartman commit 6ac1b91f346f7c489ef2a582b0c8c085fc51aabb Author: Michal Simek Date: Mon Sep 3 15:05:37 2018 +0200 serial: uartps: Enable automatic flow control Enable automatic flow control which should ensure that there is no mainteinance in connection for zcu100 BT case. Signed-off-by: Michal Simek Acked-by: Nava kishore Manne Signed-off-by: Greg Kroah-Hartman commit bed25ac0e2b6ab8f9aed2d20bc9c3a2037311800 Author: Michal Simek Date: Mon Sep 3 15:10:58 2018 +0200 serial: uartps: Move Port ID to device data structure Record port ID in device data structure to be have it connected to certain instance. Signed-off-by: Michal Simek Signed-off-by: Greg Kroah-Hartman commit 024ca329bfb9a948f76eaff3243e21b7e70182f2 Author: Michal Simek Date: Mon Sep 3 15:10:57 2018 +0200 serial: uartps: Register own uart console and driver structures Every instance is registering own struct console and struct uart_driver with minor number which corresponds to alias ID (or 0 now) and with 1 uart port. The same alias ID is saved to tty_driver->name_base which is key field for creating ttyPSX name. Because name_base and minor number are setup already there is no need to setup any port->line number because 0 is the right value. Unfortunately this driver is setting up major number to 0 for using dynamic assignment and kernel is allocating different major numbers for every instance instead of using the same major and different minor number. ~# ls -la /dev/ttyPS* crw------- 1 root root 252, 0 Jan 1 03:36 /dev/ttyPS0 crw--w---- 1 root root 253, 1 Jan 1 00:00 /dev/ttyPS1 When major number is not 0. For example 252 then major/minor combinations are in expected form ~# ls -la /dev/ttyPS* crw------- 1 root root 252, 0 Jan 1 04:04 /dev/ttyPS0 crw--w---- 1 root root 252, 1 Jan 1 00:00 /dev/ttyPS1 Driver is not freeing struct cdns_uart_console in case that instance is not used as console. The reason is that console is incorrectly unregistred and "console [0] disabled" message will be shown. Signed-off-by: Michal Simek Signed-off-by: Greg Kroah-Hartman commit 427c8ae9bebc484080b00523b434c98c23135088 Author: Michal Simek Date: Mon Sep 3 15:10:56 2018 +0200 serial: uartps: Change logic how console_port is setup Change logic how console_port is setup by using CON_ENABLED flag instead of index. There will be unique cdns_uart_console() structures that's why code can't use id for console_port assignment. Signed-off-by: Michal Simek Signed-off-by: Greg Kroah-Hartman commit 10a5315b47b09ea3c8e69e5bb5b51a829fe84028 Author: Michal Simek Date: Mon Sep 3 15:10:55 2018 +0200 serial: uartps: Fill struct uart_driver in probe() This is preparation step for dynamic port allocation without CDNS_UART_NR_PORTS macro. Fill the structure only once at probe. Signed-off-by: Michal Simek Signed-off-by: Greg Kroah-Hartman commit e4bbb5194ea3bc77ab843fe01c9f243cf8c6c6b2 Author: Michal Simek Date: Mon Sep 3 15:10:54 2018 +0200 serial: uartps: Move register to probe based on run time detection Register uart driver in probe to be able to register one device with unique major/minor separately. Also calculate number of instances of this driver to be able to call uart_unregister_driver() when there is no instance. Signed-off-by: Michal Simek Signed-off-by: Greg Kroah-Hartman commit 14090ad1805f93418f69d2f661b6b9bb130b7824 Author: Michal Simek Date: Mon Sep 3 15:10:53 2018 +0200 serial: uartps: Move alias reading higher in probe() This cosmetic change is done only for having next patch much easier to read. Moving id setup higher in probe is not affecting any usage of this driver and it also simplify error path. Signed-off-by: Michal Simek Signed-off-by: Greg Kroah-Hartman commit 46a460f0150ab4751d19923ce1199e787ee21879 Author: Michal Simek Date: Mon Sep 3 15:10:52 2018 +0200 serial: uartps: Do not use static struct uart_driver out of probe() cdns_uart_suspend()/resume() and remove() are using static reference to struct uart_driver. Assign this reference to private data structure as preparation step for dynamic struct uart_driver allocation. Signed-off-by: Michal Simek Signed-off-by: Greg Kroah-Hartman commit 4b9d33c6a30688344a3e95179654ea31b07f59b7 Author: Nava kishore Manne Date: Mon Sep 3 15:10:51 2018 +0200 serial: uartps: Fix suspend functionality The driver's suspend/resume functions were buggy. If UART node contains any child node in the DT and the child is established a communication path with the parent UART. The relevant /dev/ttyPS* node will be not available for other operations. If the driver is trying to do any operations like suspend/resume without checking the tty->dev status it leads to the kernel crash/hang. This patch fix this issue by call the device_may_wake() with the generic parameter of type struct device. in the uart suspend and resume paths. It also fixes a race condition in the uart suspend path(i.e uart_suspend_port() should be called at the end of cdns_uart_suspend API this path updates the same) Signed-off-by: Nava kishore Manne Signed-off-by: Michal Simek Signed-off-by: Greg Kroah-Hartman commit 77ec669f257b2d71a641a5c67fc9ca826a8e227e Author: Michal Simek Date: Mon Sep 3 15:10:50 2018 +0200 serial: uartps: Do not initialize field to zero again Writing zero and NULLs to already initialized fields is not needed. Remove this additional writes. Signed-off-by: Michal Simek Signed-off-by: Greg Kroah-Hartman commit 4bb1ce2350a598502b23088b169e16b43d4bc639 Author: Michal Simek Date: Mon Sep 3 15:10:49 2018 +0200 serial: uartps: console_setup() can't be placed to init section When console device is rebinded, console_setup() is called again. But marking it as __init means that function will be clear after boot is complete. If console device is binded again console_setup() is not found and error "Unable to handle kernel paging request at virtual address" is reported. Signed-off-by: Michal Simek Signed-off-by: Greg Kroah-Hartman commit 21c62a9d16252725ec1f26707bf7db6b8ec59c7f Author: Ville Syrjälä Date: Mon Sep 17 20:14:14 2018 +0300 drm/i915: Replace some PAGE_SHIFTs with I915_GTT_PAGE_SIZE Clean up some cases where we're dealing with GTT pages instead of system pages to use I915_GTT_PAGE_SIZE instead of PAGE_SHIT. So just replace the the shifts with mul/div as appropriate. These are the easy ones, the rest probably need some actual thought. No real changes in the generated asm. Only gen8_ppgtt_insert_4lvl() was affected as gcc decided to do the following change: - be9: 89 d9 mov %ebx,%ecx - beb: c1 e1 0c shl $0xc,%ecx - bee: 48 63 c9 movslq %ecx,%rcx + be9: 48 63 cb movslq %ebx,%rcx + bec: 48 c1 e1 0c shl $0xc,%rcx and that then shifted a bunch of the offset by one byte. I presume the sign extensions in the asm are due to integer promotions from u16 etc. Hopefully someone has confirmed that those don't end up doing the wrong thing for us. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180917171414.19220-1-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson commit 8baf9061c80de342134cdbd4a054bb5a7972631a Merge: 30ecfff4de7c 7876320f8880 Author: Greg Kroah-Hartman Date: Tue Sep 18 14:28:54 2018 +0200 Merge 4.19-rc4 into tty-next We want the tty fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit f4cd8d753a576a6a0490cae4e0ebbdee93488b8a Author: Michael Straube Date: Tue Sep 18 10:07:11 2018 +0200 staging: rtl8188eu: simplify function comments Simplify function comments to a single line. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit 508c7457746a4e4ecb8af52e63ebccf6920b3c36 Author: Michael Straube Date: Tue Sep 18 10:07:10 2018 +0200 staging: rtl8188eu: fix lines over 80 characters Wrap lines over 80 characters where appropriate to clear checkpatch warnings. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit 562fd259be5317644ec0ae66d87f2c9d986bcd38 Author: Michael Straube Date: Tue Sep 18 10:07:09 2018 +0200 staging: rtl8188eu: add missing spaces around operators Add missing spaces around '|', '-', and '&' to follow kernel coding style. Reported by checkpatch. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit 2590e4e3a636b1a9d0056c2d1bcc7fb069e82792 Author: Michael Straube Date: Tue Sep 18 10:07:08 2018 +0200 staging: rtl8188eu: fix comparsions to false Use if(!x) instead of if(x == false). Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit 50f2ea8bf8b4ea283ae5db1eafe4934726bf3040 Author: Michael Straube Date: Tue Sep 18 10:07:07 2018 +0200 staging: rtl8188eu: fix comparsions to true Use if(x) instead of if(x == true). Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit 116bcfdfcf9be95cd0829a528c957e8a94576533 Author: Michael Straube Date: Tue Sep 18 10:07:06 2018 +0200 staging: rtl8188eu: remove whitespace Replace tabs with spaces or just remove spaces in declarations. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit f14cbe632677bc61d8eb613ae31f916ea0f6c3ea Author: Michael Straube Date: Tue Sep 18 10:07:05 2018 +0200 staging: rtl8188eu: remove unnecessary parentheses Remove unnecessary parentheses as reported by checkpatch and from conditionals. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit 1ad53b2df90a94902f5244b573f563152bd9f945 Author: Michael Straube Date: Tue Sep 18 10:07:04 2018 +0200 staging: rtl8188eu: simplify calculation Simplify calcualation: * 10 / 2 can be reduced to * 5 Also cleans missing spaces checkpatch issues. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit 8204b61a775879acaa4ec67fc5f92985238cc27d Author: Jia-Ju Bai Date: Sat Sep 15 10:49:44 2018 +0800 staging: rtl8723bs: Fix two sleep-in-atomic-context bugs in _rtw_pwr_wakeup() The driver may sleep with holding a spinlock. The function call paths (from bottom to top) in Linux-4.17 are: [FUNC] msleep drivers/staging/rtl8723bs/core/rtw_pwrctrl.c, 1243: msleep in _rtw_pwr_wakeup drivers/staging/rtl8723bs/core/rtw_ioctl_set.c, 510: _rtw_pwr_wakeup in rtw_set_802_11_disassociate drivers/staging/rtl8723bs/core/rtw_ioctl_set.c, 501: spin_lock_bh in rtw_set_802_11_disassociate [FUNC] msleep drivers/staging/rtl8723bs/core/rtw_pwrctrl.c, 1255: msleep in _rtw_pwr_wakeup drivers/staging/rtl8723bs/core/rtw_ioctl_set.c, 510: _rtw_pwr_wakeup in rtw_set_802_11_disassociate drivers/staging/rtl8723bs/core/rtw_ioctl_set.c, 501: spin_lock_bh in rtw_set_802_11_disassociate To fix these bugs, msleep() is replaced with mdelay(). These bugs are found by my static analysis tool DSAC. Signed-off-by: Jia-Ju Bai Signed-off-by: Greg Kroah-Hartman commit 1c8cb89ee9f8c0785bc1437f14ad01304acd91aa Author: Jia-Ju Bai Date: Sat Sep 15 10:49:28 2018 +0800 staging: rtl8723bs: Fix a sleep-in-atomic-context bug in issue_deauth_ex() The driver may sleep with holding a spinlock. The function call paths (from bottom to top) in Linux-4.17 are: [FUNC] msleep drivers/staging/rtl8723bs/core/rtw_mlme_ext.c, 3805: msleep in issue_deauth_ex drivers/staging/rtl8723bs/core/rtw_mlme_ext.c, 6336: issue_deauth_ex in disconnect_hdl drivers/staging/rtl8723bs/core/rtw_cmd.c, 963: disconnect_hdl in rtw_disassoc_cmd drivers/staging/rtl8723bs/core/rtw_ioctl_set.c, 506: rtw_disassoc_cmd in rtw_set_802_11_disassociate drivers/staging/rtl8723bs/core/rtw_ioctl_set.c, 501: spin_lock_bh in rtw_set_802_11_disassociate [FUNC] msleep drivers/staging/rtl8723bs/core/rtw_mlme_ext.c, 3805: msleep in issue_deauth_ex drivers/staging/rtl8723bs/core/rtw_mlme_ext.c, 6336: issue_deauth_ex in disconnect_hdl drivers/staging/rtl8723bs/core/rtw_cmd.c, 963: disconnect_hdl in rtw_disassoc_cmd drivers/staging/rtl8723bs/core/rtw_mlme.c, 2256: rtw_disassoc_cmd in rtw_select_and_join_from_scanned_queue drivers/staging/rtl8723bs/core/rtw_mlme.c, 2204: spin_lock_bh in rtw_select_and_join_from_scanned_queue To fix this bug, msleep() is replaced with mdelay(). This bug is found by my static analysis tool DSAC. Signed-off-by: Jia-Ju Bai Signed-off-by: Greg Kroah-Hartman commit 47bde229703f243dd33ae9d6a6daa2b43b9a9514 Author: Colin Ian King Date: Fri Sep 14 12:24:51 2018 +0100 staging: greybus: fix spelling mistake "entires" -> "entries" Trivial fix to spelling mistake Signed-off-by: Colin Ian King Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman commit bffa9b1cc64a12f3162f79151dee56199efbc785 Author: Jia-Ju Bai Date: Sat Sep 15 11:13:03 2018 +0800 staging: dgnc: Fix a sleep-in-atomic-context bug in cls_assert_modem_signals() The driver may sleep with holding a spinlock. The function call path (from bottom to top) in Linux-4.17 is: [FUNC] usleep_range drivers/staging/dgnc/dgnc_cls.c, 391: usleep_range in cls_assert_modem_signals drivers/staging/dgnc/dgnc_cls.c, 449: cls_assert_modem_signals in cls_copy_data_from_queue_to_uart drivers/staging/dgnc/dgnc_cls.c, 406: _raw_spin_lock_irqsave in cls_copy_data_from_queue_to_uart To fix this bug, usleep_range() is replaced with udelay(). This bug is found by my static analysis tool DSAC. Signed-off-by: Jia-Ju Bai Signed-off-by: Greg Kroah-Hartman commit 2051c6ae928ddbd4d314ba8ea89298d686ad86b7 Author: Jia-Ju Bai Date: Sat Sep 15 10:57:11 2018 +0800 staging: rtl8188eu: Fix a sleep-in-atomic-context bug in issue_deauth_ex() The driver may sleep with holding a spinlock. The function call path (from bottom to top) in Linux-4.17 is: [FUNC] msleep drivers/staging/rtl8188eu/core/rtw_mlme_ext.c, 1536: msleep in issue_deauth_ex drivers/staging/rtl8188eu/core/rtw_mlme_ext.c, 5110: issue_deauth_ex in disconnect_hdl drivers/staging/rtl8188eu/core/rtw_cmd.c, 521: disconnect_hdl in rtw_disassoc_cmd drivers/staging/rtl8188eu/core/rtw_ioctl_set.c, 352: rtw_disassoc_cmd in rtw_set_802_11_infrastructure_mode drivers/staging/rtl8188eu/os_dep/ioctl_linux.c, 1002: rtw_set_802_11_infrastructure_mode in rtw_wx_set_wap drivers/staging/rtl8188eu/os_dep/ioctl_linux.c, 988: spin_lock_bh in rtw_wx_set_wap To fix this bug, msleep() is replaced with mdelay(). This bug is found by my static analysis tool DSAC. Signed-off-by: Jia-Ju Bai Signed-off-by: Greg Kroah-Hartman commit 7af5bd0ca431dc0a3fcdd9ab18bab135a15a9a1c Author: Robert Węcławski Date: Fri Sep 14 22:04:05 2018 +0200 staging: rtl8188eu: remove code that is valid only for 5 GHz Remove code that is used only for 5 GHz. This addresses the below TODO item: - find and remove remaining code valid only for 5 GHz. Most of the obvious ones have been removed, but things like channel > 14 still exist. Signed-off-by: Robert Węcławski Signed-off-by: Greg Kroah-Hartman commit 4f6f44086fce7f4d558f762b53c8dcabe5763937 Author: Hans de Goede Date: Tue Sep 11 09:15:44 2018 +0200 staging: vboxvideo: Drop vbox_bo_unref() helper Drop the unnecessary vbox_bo_unref() helper and directly call ttm_bo_put() at the single call site. Signed-off-by: Hans de Goede Signed-off-by: Greg Kroah-Hartman commit ce8ec32cbd420684b2ed31c8440b8044ca5f8ffb Author: Hans de Goede Date: Tue Sep 11 09:15:43 2018 +0200 staging: vboxvideo: Remove vboxfb_create_object() wrapper The vboxfb_create_object() wrapper really does nothing more then just call vbox_gem_create(), so this commit drops it, replacing it with a direct call to vbox_gem_create(). Signed-off-by: Hans de Goede Signed-off-by: Greg Kroah-Hartman commit 3c94952c38cefce6fde11b0cb44d7f961237faa8 Author: Hans de Goede Date: Tue Sep 11 09:15:42 2018 +0200 staging: vboxvideo: Skip currrent crtc when updating crtcs In vbox_crtc_set_base_and_mode() we update all the crtcs when the single_framebuffer setting changes, including the one on which vbox_crtc_set_base_and_mode() was called, so we end up doing vbox_do_modeset() on it twice. This commit skips the crtc on which we are updating in the loop to update the other crtcs. This commit also removes the vbox_set_view() call from the loop, vbox_set_view() does not depend on the single_framebuffer setting and it was being called on the passed in crtc parameter and not on the crtci local iterator value (typo), so it was a no-op already. Signed-off-by: Hans de Goede Signed-off-by: Greg Kroah-Hartman commit a5aca20574693dac83dfcc98b08a41251b97edfb Author: Hans de Goede Date: Tue Sep 11 09:15:41 2018 +0200 staging: vboxvideo: Fix modeset / page_flip error handling The default settings for Linux vms created in VirtualBox allocate only 16M of videomem. When running fullscreen on a 1920x1080 (or bigger) monitor this is not a lot. When using GNOME3 on Wayland we have already been seeing out of video memory errors for a while now. After commit 2408898e3b6c ("staging: vboxvideo: Add page-flip support") this has become much worse as now multiple buffers are used. There is nothing we can do about there not being enough video-mem, but we should handle running out of video-mem properly, currently there are 2 problems with this: 1) vbox_crtc_mode_set() does not check if vbox_crtc_mode_set_base() fails at all and does not properly propagate the oom error. 2) vbox_crtc_do_set_base() unpins the old fb too soon: 2.1) It unpins it before pinning the new fb, so if the pinning of the new fb fails (which it will when we run out of video-mem), then we also cannot fall back to the old-fb as it has been already unpinned. We could try to re-pin it but there is no guarantee that will succeed. 2.2) It unpins it before reprogramming the hardware to scan out from the new-fb, which could lead to some ugliness where the hw is scanning out the oldfb while it is being replaced with something else. Fixing this requires to do things in this order: 1) Pin the new fb 2) Program the hw 3) Unpin the oldfb This needs to be done for both a mode_set and for a page_flip so this commit re-writes vbox_crtc_do_set_base() into vbox_crtc_set_base_and_mode() which does this in the correct order, putting the hardware programming which was duplicated between the mode_set and page_flip code inside the new function. Signed-off-by: Hans de Goede Signed-off-by: Greg Kroah-Hartman commit 08b6b28801cc5226283a3a1e1fbd3ea4c9ade7c9 Author: Nick Ewalt Date: Mon Sep 17 05:39:05 2018 -0700 staging: gasket: page_table: handle failed dma_map_page Handle dma_map_page failing in gasket_alloc_extended_subtable: free memory, don't add invalid page table entry. Signed-off-by: Nick Ewalt Signed-off-by: Todd Poynor Signed-off-by: Greg Kroah-Hartman commit 0eaf57fb6150ac6a416cec471ab9db98740501fd Author: Nick Ewalt Date: Mon Sep 17 05:39:04 2018 -0700 staging: gasket: page_table: use total_entries for max ext lvl0 page idx The maximum number of entries in the page table is configurable at initialization time and should be used in gasket_extended_lvl0_page_idx. Signed-off-by: Nick Ewalt Signed-off-by: Todd Poynor Signed-off-by: Greg Kroah-Hartman commit 863739bda25b2e08afce65caf2762f173e78f481 Author: Nick Ewalt Date: Mon Sep 17 05:39:03 2018 -0700 staging: gasket: cleanup if dma_map_page fails in gasket_perform_mapping Previously pages would have never been unmapped in this case. Signed-off-by: Nick Ewalt Signed-off-by: Todd Poynor Signed-off-by: Greg Kroah-Hartman commit c3873a5c741f75847ae50a3f566fea2c171c1054 Author: Nick Ewalt Date: Mon Sep 17 05:39:02 2018 -0700 staging: gasket: fix gasket_free_coherent_memory metadata frees Free gasket_coherent_page_entries metadata memory, update data structures accordingly. Signed-off-by: Nick Ewalt Signed-off-by: Todd Poynor Signed-off-by: Greg Kroah-Hartman commit f8b6a076610f4eb44b0b02c110b7e6f981d7cdc2 Author: Nick Ewalt Date: Mon Sep 17 05:39:01 2018 -0700 staging: gasket: page_table: don't unmap coherent pages Only call dma_unmap_page if there was an associated dma_map_page call. Signed-off-by: Nick Ewalt Signed-off-by: Todd Poynor Signed-off-by: Greg Kroah-Hartman commit d2118f8e93dfc41ab660fb97593dbd6ebdd11f7e Author: Nick Ewalt Date: Mon Sep 17 05:39:00 2018 -0700 staging: gasket: fix data page unmap DMA direction The DMA direction supplied to dma_unmap_page should match the corresponding dma_map_page call, which is mapped bi-directional. Signed-off-by: Nick Ewalt Signed-off-by: Todd Poynor Signed-off-by: Greg Kroah-Hartman commit 912b8a811cc1bf26334840e9f532136072569b17 Author: Nick Ewalt Date: Mon Sep 17 05:38:59 2018 -0700 staging: gasket: fix DMA direction for extended page tables Extended page tables should be mapped as DMA_TO_DEVICE, not bi-directional. Signed-off-by: Nick Ewalt Signed-off-by: Todd Poynor Signed-off-by: Greg Kroah-Hartman commit 45dd9954d903310f1fd8d5ac90d7faeca0694415 Author: Todd Poynor Date: Mon Sep 17 05:38:58 2018 -0700 staging: gasket: page table: use GFP_KERNEL for dma_alloc_coherent Flags should be specified for dma_alloc_coherent() call. Use GFP_KERNEL, it's fine to sleep here. Signed-off-by: Todd Poynor Signed-off-by: Greg Kroah-Hartman commit 467976ff6e566a695c2964bb2ca24eba154a1d82 Author: Todd Poynor Date: Mon Sep 17 05:38:57 2018 -0700 staging: gasket: interrupt: remove PCI-MSIX-specific status check Devices not using MSIX don't use the msix_initialized field, so don't require it to be set in the interrupt system status check. The general check for interrupts configured that follows can cover both MSIX and device-managed interrupts. Signed-off-by: Todd Poynor Signed-off-by: Greg Kroah-Hartman commit a15087ec16c9f206846b9f9861963f1cabbc5a1c Author: Todd Poynor Date: Mon Sep 17 05:38:56 2018 -0700 staging: gasket: Kconfig: describe Apex as an Edge TPU device Add a brief description and URL for more information on the Apex device, an Edge TPU (Tensorflow Processing Unit) machine learning accelerator. Signed-off-by: Todd Poynor Signed-off-by: Greg Kroah-Hartman commit f8499d6edc0890eaa72e2d88a1415dbb8d4e82c8 Author: Chengguang Xu Date: Mon Sep 17 23:34:21 2018 +0800 staging: erofs: code cleanup for erofs_kmalloc() Define a dummy function of time_to_inject()/erofs_show_injection_info(), so that we don't have to check macro CONFIG_EROFS_FAULT_INJECTION in calling place. Signed-off-by: Chengguang Xu Reviewed-by: Chao Yu Signed-off-by: Greg Kroah-Hartman commit ab510027dc4dbd1eeb611a34b0cda8b21fcde492 Author: Vladimir Murzin Date: Tue Jul 31 14:08:57 2018 +0100 arm64: KVM: Enable Common Not Private translations We rely on cpufeature framework to detect and enable CNP so for KVM we need to patch hyp to set CNP bit just before TTBR0_EL2 gets written. For the guest we encode CNP bit while building vttbr, so we don't need to bother with that in a world switch. Reviewed-by: James Morse Acked-by: Catalin Marinas Acked-by: Marc Zyngier Signed-off-by: Vladimir Murzin Signed-off-by: Catalin Marinas commit 5ffdfaedfa0aba3f5db0fbb8ed4f3192be2b39b8 Author: Vladimir Murzin Date: Tue Jul 31 14:08:56 2018 +0100 arm64: mm: Support Common Not Private translations Common Not Private (CNP) is a feature of ARMv8.2 extension which allows translation table entries to be shared between different PEs in the same inner shareable domain, so the hardware can use this fact to optimise the caching of such entries in the TLB. CNP occupies one bit in TTBRx_ELy and VTTBR_EL2, which advertises to the hardware that the translation table entries pointed to by this TTBR are the same as every PE in the same inner shareable domain for which the equivalent TTBR also has CNP bit set. In case CNP bit is set but TTBR does not point at the same translation table entries for a given ASID and VMID, then the system is mis-configured, so the results of translations are UNPREDICTABLE. For kernel we postpone setting CNP till all cpus are up and rely on cpufeature framework to 1) patch the code which is sensitive to CNP and 2) update TTBR1_EL1 with CNP bit set. TTBR1_EL1 can be reprogrammed as result of hibernation or cpuidle (via __enable_mmu). For these two cases we restore CnP bit via __cpu_suspend_exit(). There are a few cases we need to care of changes in TTBR0_EL1: - a switch to idmap - software emulated PAN we rule out latter via Kconfig options and for the former we make sure that CNP is set for non-zero ASIDs only. Reviewed-by: James Morse Reviewed-by: Suzuki K Poulose Reviewed-by: Catalin Marinas Signed-off-by: Vladimir Murzin [catalin.marinas@arm.com: default y for CONFIG_ARM64_CNP] Signed-off-by: Catalin Marinas commit f5054ceed420b1f38d37920a4c65446fcc5d6b90 Author: Rob Herring Date: Thu Sep 13 13:12:39 2018 -0500 ARM: dts: xilinx: Fix I2C and SPI bus warnings dtc has new checks for I2C and SPI buses. Fix the warnings in node names and unit-addresses. arch/arm/boot/dts/zynq-zc702.dtb: Warning (i2c_bus_reg): /amba/i2c@e0004000/i2c-mux@74/i2c@7/hwmon@52: I2C bus unit address format error, expected "34" arch/arm/boot/dts/zynq-zc702.dtb: Warning (i2c_bus_reg): /amba/i2c@e0004000/i2c-mux@74/i2c@7/hwmon@53: I2C bus unit address format error, expected "35" arch/arm/boot/dts/zynq-zc702.dtb: Warning (i2c_bus_reg): /amba/i2c@e0004000/i2c-mux@74/i2c@7/hwmon@54: I2C bus unit address format error, expected "36" arch/arm/boot/dts/zynq-zc770-xm013.dtb: Warning (spi_bus_reg): /amba/spi@e0006000/eeprom@0: SPI bus unit address format error, expected "2" arch/arm/boot/dts/zynq-zc770-xm010.dtb: Warning (spi_bus_reg): /amba/spi@e0007000/flash@0: SPI bus unit address format error, expected "1" Cc: Michal Simek Signed-off-by: Rob Herring Signed-off-by: Michal Simek commit 17a0a1e5f6c4bd6df17834312ff577c1373d87b8 Author: Gustavo A. R. Silva Date: Fri Jul 20 10:01:58 2018 -0500 PCI: mediatek: Fix unchecked return value Check return value of devm_pci_remap_iospace(). Addresses-Coverity-ID: 1471965 ("Unchecked return value") Signed-off-by: Gustavo A. R. Silva Signed-off-by: Lorenzo Pieralisi Acked-by: Honghui Zhang commit ad1570d99f280f73c72510d7f79db9adf599474b Author: kbuild test robot Date: Mon Sep 17 10:23:20 2018 +0800 power: supply: bq25890_charger: fix semicolon.cocci warnings drivers/power/supply/bq25890_charger.c:614:2-3: Unneeded semicolon drivers/power/supply/bq25890_charger.c:621:2-3: Unneeded semicolon drivers/power/supply/bq25890_charger.c:630:3-4: Unneeded semicolon drivers/power/supply/bq25890_charger.c:638:2-3: Unneeded semicolon drivers/power/supply/bq25890_charger.c:644:2-3: Unneeded semicolon Remove unneeded semicolon. Generated by: scripts/coccinelle/misc/semicolon.cocci Fixes: 9d9ae3414d1b ("power: supply: bq25890_charger: Add debugging output of failed initialization") CC: Angus Ainslie (Purism) Signed-off-by: kbuild test robot Signed-off-by: Sebastian Reichel commit 6e5da6f7d82474e94c2d4a38cf9ca4edbb3e03a0 Author: Bjorn Andersson Date: Fri Aug 31 15:55:10 2018 -0700 PCI: qcom: Fix error handling in runtime PM support The driver does not cope with the fact that probe can fail in a number of cases after enabling runtime PM on the device; this results in warnings about "Unbalanced pm_runtime_enable". Furthermore if probe fails after invoking qcom_pcie_host_init() the power-domain will be left referenced. As it is not possible for the error handling in qcom_pcie_host_init() to handle errors happening after returning from that function the pm_runtime_get_sync() is moved to qcom_pcie_probe() as well. Fixes: 854b69efbdd2 ("PCI: qcom: add runtime pm support to pcie_port") Signed-off-by: Bjorn Andersson [lorenzo.pieralisi@arm.com: updated commit log] Signed-off-by: Lorenzo Pieralisi Acked-by: Stanimir Varbanov commit 0ee2c1f2429f74328c82ea559b127c96d5224ccd Author: Leonard Crestez Date: Mon Aug 27 14:28:37 2018 +0300 PCI: imx: Initial imx7d pm support On imx7d the pcie-phy power domain is turned off in suspend and this can make the system hang after resume when attempting any read from PCI. Fix this by adding minimal suspend/resume code. This will prepare for powering down on suspend and reset the block on resume. Code is only for imx7d but a very similar sequence can be used for other SOCs. Original-by: Richard Zhu Signed-off-by: Leonard Crestez [lorenzo.pieralisi@arm.com: commit log update] Signed-off-by: Lorenzo Pieralisi Reviewed-by: Lucas Stach commit f18f42d7497dbbde3ff314d0ad585b827ea74e48 Author: Lucas Stach Date: Tue Jul 31 12:21:49 2018 +0200 PCI: imx6: Support MPLL reconfiguration for 100MHz and 200MHz refclock The power up defaults of the MPLL are designed for the standard 125MHz refclock derived from the ENET PLL. As this clock has a jitter that violates the PCIe Gen2 timing requirements, some board designs use an external reference clock generator. Those clock generators may output a clock at a different rate than what the MPLL expects (usually a 100MHz clock, to re-use the PCIe bus clock). In that case the MPLL must be reconfigured via overrides to use different refclock dividers and loop multipliers. The i.MX6 reference manual lists both 100MHz and 200MHz as supported refclock rates and the associated mult and div values. Only the 100MHz setup has been tested on a real board, but since the 200MHz setup only differs in the used pre-divider it seems safe to add it now. Signed-off-by: Lucas Stach Signed-off-by: Lorenzo Pieralisi Reviewed-by: Richard Zhu commit 4da6b4480766e5bc9c4d7bc14bf1d0939a1a5fa7 Author: Jitendra Bhivare Date: Tue Aug 28 10:22:58 2018 -0700 PCI: iproc: Remove PAXC slot check to allow VF support Fix previous incorrect logic that limits PAXC slot number to zero only. In order for SRIOV/VF to work, we need to allow the slot number to be greater than zero. Fixes: 46560388c476c ("PCI: iproc: Allow multiple devices except on PAXC") Signed-off-by: Jitendra Bhivare Signed-off-by: Ray Jui Signed-off-by: Lorenzo Pieralisi Reviewed-by: Andy Gospodarek commit f7d8109e31bbe785b13c8cfdafc56e9351bccef1 Author: Laurent Pinchart Date: Thu May 24 17:49:34 2018 +0300 usb: gadget: uvc: configfs: Add section header comments The UVC configfs implementation is large and difficult to navigate. Add a bit more air to the code to make it easier to read. Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham commit b0aa30f33b6a4e0b755321e631eb5f870678eae6 Author: Laurent Pinchart Date: Thu May 24 17:49:34 2018 +0300 usb: gadget: uvc: configfs: Don't wrap groups unnecessarily Various configfs groups (represented by config_group) are wrapped in structures that they're the only member of. This allows adding other data fields to groups, but it unnecessarily makes the code more complex. Remove the outer structures and use config_group directly to simplify the code. Groups can still be wrapped individually in the future if other data fields need to be added. Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham commit 7037b43e0076cce1c07c72540e219fb5db7ea01f Author: Fieah Lim Date: Tue Sep 11 05:47:25 2018 +0800 cpuidle: enter_state: Don't needlessly calculate diff time Currently, ktime_us_delta() is invoked unconditionally to compute the idle residency of the CPU, but it only makes sense to do that if a valid idle state has been entered, so move the ktime_us_delta() invocation after the entered_state >= 0 check. While at it, merge two comment blocks in there into one and drop a space between type casting of diff. This patch has no functional changes. Signed-off-by: Fieah Lim [ rjw: Changelog cleanup, comment format fix ] Signed-off-by: Rafael J. Wysocki commit 6a5f95b5a4f4ff29e4071bc5b95f8f3a2aef046b Author: Fieah Lim Date: Tue Sep 11 03:59:01 2018 +0800 cpuidle: Remove unnecessary wrapper cpuidle_get_last_residency() cpuidle_get_last_residency() is just a wrapper for retrieving the last_residency member of struct cpuidle_device. It's also weirdly the only wrapper function for accessing cpuidle_* struct member (by my best guess is it could be a leftover from v2.x). Anyhow, since the only two users (the ladder and menu governors) can access dev->last_residency directly, and it's more intuitive to do it that way, let's just get rid of the wrapper. This patch tidies up CPU idle code a bit without functional changes. Signed-off-by: Fieah Lim [ rjw: Changelog cleanup ] Signed-off-by: Rafael J. Wysocki commit cf7d97e1e54d71679a8b11716dad9d21deb0e1e2 Author: YueHaibing Date: Tue Sep 18 10:48:41 2018 +0800 net: mdio: remove duplicated include from mdio_bus.c Remove duplicated include linux/gpio/consumer.h Signed-off-by: YueHaibing Signed-off-by: David S. Miller commit 49780be19cebafac3820ac7ca190ab86d079023b Author: YueHaibing Date: Tue Sep 18 10:46:27 2018 +0800 qed: remove duplicated include from qed_cxt.c Remove duplicated include. Signed-off-by: YueHaibing Signed-off-by: David S. Miller commit 03aa6d95c14ca6df0931ff5f6649d375cb0b029b Author: YueHaibing Date: Tue Sep 18 10:43:43 2018 +0800 liquidio: remove duplicated include from lio_vf_rep.c Remove duplicated include. Signed-off-by: YueHaibing Signed-off-by: David S. Miller commit e65d52564b015d88d94e091f8622f83f0510e07f Author: YueHaibing Date: Tue Sep 18 10:41:28 2018 +0800 cxgb4: remove duplicated include from cxgb4_main.c Remove duplicated include. Signed-off-by: YueHaibing Signed-off-by: David S. Miller commit c1d04a174f8d52757b32943838887135900694e3 Author: YueHaibing Date: Tue Sep 18 10:17:18 2018 +0800 gianfar: remove duplicated include from gianfar.c Remove duplicated include. Signed-off-by: YueHaibing Signed-off-by: David S. Miller commit 076ed3da0c9b2f88d9157dbe7044a45641ae369e Author: Stefan Nuernberger Date: Mon Sep 17 19:46:53 2018 +0200 net/ipv4: defensive cipso option parsing commit 40413955ee26 ("Cipso: cipso_v4_optptr enter infinite loop") fixed a possible infinite loop in the IP option parsing of CIPSO. The fix assumes that ip_options_compile filtered out all zero length options and that no other one-byte options beside IPOPT_END and IPOPT_NOOP exist. While this assumption currently holds true, add explicit checks for zero length and invalid length options to be safe for the future. Even though ip_options_compile should have validated the options, the introduction of new one-byte options can still confuse this code without the additional checks. Signed-off-by: Stefan Nuernberger Cc: David Woodhouse Cc: Simon Veith Cc: stable@vger.kernel.org Acked-by: Paul Moore Signed-off-by: David S. Miller commit 0020f5c807ef67954d9210eea0ba17a6134cdf7d Author: Jia-Ju Bai Date: Sat Sep 15 12:02:46 2018 +0800 net: socionext: Fix two sleep-in-atomic-context bugs in ave_rxfifo_reset() The driver may sleep with holding a spinlock. The function call paths (from bottom to top) in Linux-4.17 are: [FUNC] usleep_range drivers/net/ethernet/socionext/sni_ave.c, 892: usleep_range in ave_rxfifo_reset drivers/net/ethernet/socionext/sni_ave.c, 932: ave_rxfifo_reset in ave_irq_handler [FUNC] usleep_range drivers/net/ethernet/socionext/sni_ave.c, 888: usleep_range in ave_rxfifo_reset drivers/net/ethernet/socionext/sni_ave.c, 932: ave_rxfifo_reset in ave_irq_handler To fix these bugs, usleep_range() is replaced with udelay(). These bugs are found by my static analysis tool DSAC. Signed-off-by: Jia-Ju Bai Signed-off-by: David S. Miller commit 5d288b88655d5bea0cf3a42158cb3bf7916587bc Author: Colin Ian King Date: Fri Sep 14 18:19:16 2018 +0100 net: caif: remove redundant null check on frontpkt It is impossible for frontpkt to be null at the point of the null check because it has been assigned from rearpkt and there is no way rearpkt can be null at the point of the assignment because of the sanity checking and exit paths taken previously. Remove the redundant null check. Detected by CoverityScan, CID#114434 ("Logically dead code") Signed-off-by: Colin Ian King Signed-off-by: David S. Miller commit 9a59739bd01f77db6fbe2955a4fce165f0f43568 Author: Jason Gunthorpe Date: Tue Aug 14 15:33:02 2018 -0700 IB/rxe: Revise the ib_wr_opcode enum This enum has become part of the uABI, as both RXE and the ib_uverbs_post_send() command expect userspace to supply values from this enum. So it should be properly placed in include/uapi/rdma. In userspace this enum is called 'enum ibv_wr_opcode' as part of libibverbs.h. That enum defines different values for IB_WR_LOCAL_INV, IB_WR_SEND_WITH_INV, and IB_WR_LSO. These were introduced (incorrectly, it turns out) into libiberbs in 2015. The kernel has changed its mind on the numbering for several of the IB_WC values over the years, but has remained stable on IB_WR_LOCAL_INV and below. Based on this we can conclude that there is no real user space user of the values beyond IB_WR_ATOMIC_FETCH_AND_ADD, as they have never worked via rdma-core. This is confirmed by inspection, only rxe uses the kernel enum and implements the latter operations. rxe has clearly never worked with these attributes from userspace. Other drivers that support these opcodes implement the functionality without calling out to the kernel. To make IB_WR_SEND_WITH_INV and related work for RXE in userspace we choose to renumber the IB_WR enum in the kernel to match the uABI that userspace has bee using since before Soft RoCE was merged. This is an overall simpler configuration for the whole software stack, and obviously can't break anything existing. Reported-by: Seth Howell Tested-by: Seth Howell Fixes: 8700e3e7c485 ("Soft RoCE driver") Cc: Signed-off-by: Jason Gunthorpe commit 5f0ecb275b16693865f58a323fc27e23dfc6ed0d Author: Joshua Abraham Date: Tue Sep 11 16:39:08 2018 -1000 PCI: Remove set but unused variable Remove a set but unused variable in quirks.c. Fixes warning: variable ‘mmio_sys_info’ set but not used [-Wunused-but-set-variable] Signed-off-by: Joshua Abraham Signed-off-by: Bjorn Helgaas commit 7eb3702504c64425961ee9dd7080396a9477b7e1 Author: Randy Dunlap Date: Sun Sep 2 19:32:50 2018 -0700 PCI: Fix pci.c kernel-doc parameter warning Fix kernel-doc warning: ../drivers/pci/pci.c:218: warning: Excess function parameter 'p' description in 'pci_dev_str_match_path' Signed-off-by: Randy Dunlap Signed-off-by: Bjorn Helgaas commit c6635792737b881021ead417b281067d56ed3380 Author: Andy Shevchenko Date: Thu Aug 30 13:32:36 2018 +0300 PCI: Allocate dma_alias_mask with bitmap_zalloc() Switch to bitmap_zalloc() to show clearly what we are allocating. Besides that it returns pointer of bitmap type ("unsigned long *") instead of the opaque "void *". Signed-off-by: Andy Shevchenko Signed-off-by: Bjorn Helgaas commit 1ccce46c5e8b8a0d2606fb8bb72bff069ffdc3ab Author: Jakub Kicinski Date: Tue Aug 14 17:14:30 2018 -0700 PCI: Remove unused NFP32xx IDs Defines for NFP32xx are no longer used anywhere, remove them. Signed-off-by: Jakub Kicinski Signed-off-by: Bjorn Helgaas commit eee6e273843dc3084c15efc98a78702ac9a4c69b Author: Lukas Wunner Date: Sun Aug 19 16:29:00 2018 +0200 PCI: pciehp: Drop hotplug_slot_ops wrappers pciehp's ->enable_slot, ->disable_slot, ->get_attention_status and ->reset_slot callbacks are currently implemented by wrapper functions that do nothing else but call down to a backend function. The backends are not called from anywhere else, so drop the wrappers and use the backends directly as callbacks, thereby shaving off a few lines of unnecessary code. No functional change intended. Signed-off-by: Lukas Wunner Signed-off-by: Bjorn Helgaas commit 7d4ba52317c4aab6bbb266f31e28713d397e570c Author: Lukas Wunner Date: Sun Aug 19 16:29:00 2018 +0200 PCI: pciehp: Drop unnecessary includes Drop the following includes from pciehp source files which no longer use any of the included symbols: * in pciehp.h in pciehp_hpc.c Added by commit de25968cc87c ("fix more missing includes") to accommodate for a call to signal_pending(). The call was removed by commit 262303fe329a ("pciehp: fix wait command completion"). * in pciehp_core.c Added by historic commit f308a2dfbe63 ("PCI: add PCI Express Port Bus Driver subsystem") to accommodate for a call to free_irq(): https://git.kernel.org/tglx/history/c/f308a2dfbe63 The call was removed by commit 407f452b05f9 ("pciehp: remove unnecessary free_irq"). * in pciehp_core.c and pciehp_hpc.c Added by commit 34d03419f03b ("PCIEHP: Add Electro Mechanical Interlock (EMI) support to the PCIE hotplug driver."), which was reverted by commit bd3d99c17039 ("PCI: Remove untested Electromechanical Interlock (EMI) support in pciehp."). * in pciehp_ctrl.c, pciehp_hpc.c and pciehp_pci.c Added by historic commit c16b4b14d980 ("PCI Hotplug: Add SHPC and PCI Express hot-plug drivers"): https://git.kernel.org/tglx/history/c/c16b4b14d980 Module-related symbols were neither used back then in those files, nor are they used today. * in pciehp_ctrl.c Added by commit 5a0e3ad6af86 ("include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h") to accommodate for calls to kmalloc(). The calls were removed by commit 0e94916e6091 ("PCI: pciehp: Handle events synchronously"). * "../pci.h" in pciehp_ctrl.c Added by historic commit 67f4660b72f2 ("PCI: ASPM patch for") to accommodate for usage of the global variable pcie_mch_quirk: https://git.kernel.org/tglx/history/c/67f4660b72f2 The global variable was removed by commit 0ba379ec0fb1 ("PCI: Simplify hotplug mch quirk"). Signed-off-by: Lukas Wunner Signed-off-by: Bjorn Helgaas commit 11e87702be65780be92fb1f0a5b7b293954185f7 Author: Lukas Wunner Date: Tue Jul 31 07:50:37 2018 +0200 PCI: pciehp: Differentiate between surprise and safe removal When removing PCI devices below a hotplug bridge, pciehp marks them as disconnected if the card is no longer present in the slot or it quiesces them if the card is still present (by disabling INTx interrupts, bus mastering and SERR# reporting). To detect whether the card is still present, pciehp checks the Presence Detect State bit in the Slot Status register. The problem with this approach is that even if the card is present, the link to it may be down, and it that case it would be better to mark the devices as disconnected instead of trying to quiesce them. Moreover, if the card in the slot was quickly replaced by another one, the Presence Detect State bit would be set, yet trying to quiesce the new card's devices would be wrong and the correct thing to do is to mark the previous card's devices as disconnected. Instead of looking at the Presence Detect State bit, it is better to differentiate whether the card was surprise removed versus safely removed (via sysfs or an Attention Button press). On surprise removal, the devices should be marked as disconnected, whereas on safe removal it is correct to quiesce the devices. The knowledge whether a surprise removal or a safe removal is at hand does exist further up in the call stack: A surprise removal is initiated by pciehp_handle_presence_or_link_change(), a safe removal by pciehp_handle_disable_request(). Pass that information down to pciehp_unconfigure_device() and use it in lieu of the Presence Detect State bit. While there, add kernel-doc to pciehp_unconfigure_device() and pciehp_configure_device(). Tested-by: Alexandru Gagniuc Signed-off-by: Lukas Wunner Signed-off-by: Bjorn Helgaas Cc: Keith Busch commit a50ac6bfd6042b16e0de4ac3264c407e678c9b10 Author: Lukas Wunner Date: Sun Aug 19 16:29:00 2018 +0200 PCI: Simplify disconnected marking Commit 89ee9f768003 ("PCI: Add device disconnected state") iterates over the devices on a parent bus, marks each as disconnected, then marks each device's children as disconnected using pci_walk_bus(). The same can be achieved more succinctly by calling pci_walk_bus() on the parent bus. Moreover, this does not need to wait until acquiring pci_lock_rescan_remove(), so move it out of that critical section. The critical section in err.c contains a pci_dev_get() / pci_dev_put() pair which was apparently copy-pasted from pciehp_pci.c. In the latter it serves the purpose of holding the struct pci_dev in place until the Command register is updated. err.c doesn't do anything like that, hence the pair is unnecessary. Remove it. Signed-off-by: Lukas Wunner Signed-off-by: Bjorn Helgaas Cc: Keith Busch Cc: Oza Pawandeep Cc: Sinan Kaya Cc: Benjamin Herrenschmidt commit 8089babee17c09cdd51ac1390e444ee0be0c2291 Author: Lubomir Rintel Date: Mon Sep 17 14:11:24 2018 +0200 spi: pxa2xx: Remove the shutdown callback It makes no sense to remove the device on shutdown. And it break things when the hardware crucial for shutdown (such as the embedded controller) is attached to the SPI bus. Signed-off-by: Lubomir Rintel Signed-off-by: Mark Brown commit bad7dcd94f3956bcfc0a69ef71fdf0fcca3de4a8 Author: Jonathan Cameron Date: Wed Sep 12 16:21:40 2018 +0100 ACPI/PCI: Pay attention to device-specific _PXM node values The ACPI specification allows you to provide _PXM entries for devices based on their location on a particular bus. Let us use that if it is provided rather than just assuming it makes sense to put the device into the proximity domain of the root. An example DSDT entry that will supply this is: Device (PCI2) { Name (_HID, "PNP0A08") // PCI Express Root Bridge Name (_CID, "PNP0A03") // Compatible PCI Root Bridge Name(_SEG, 2) // Segment of this Root complex Name(_BBN, 0xF8) // Base Bus Number Name(_CCA, 1) Method (_PXM, 0, NotSerialized) { Return(0x00) } ... Device (BRI0) { Name (_HID, "19E51610") Name (_ADR, 0) Name (_BBN, 0xF9) Device (CAR0) { Name (_HID, "97109912") Name (_ADR, 0) Method (_PXM, 0, NotSerialized) { Return(0x02) } } } } Signed-off-by: Jonathan Cameron Signed-off-by: Bjorn Helgaas commit d193631bfb383d7503a1a72fe1643ac2168bbba7 Author: Punit Agrawal Date: Tue Aug 28 16:05:13 2018 +0100 x86/PCI: Remove node-local allocation when initialising host controller Memory for host controller data structures is allocated local to the node to which the controller is associated with. This has been the behaviour since 965cd0e4a5e5 ("x86, PCI, ACPI: Use kmalloc_node() to optimize for performance") where the node local allocation was added without additional context. Drop the node local allocation as there is no benefit from doing so - the usage of these structures is independent from where the controller is located. Signed-off-by: Punit Agrawal Signed-off-by: Bjorn Helgaas Cc: Thomas Gleixner Cc: "H. Peter Anvin" commit 9c314a48aeab0562bf5418f707ee060171d52ac2 Author: Punit Agrawal Date: Tue Aug 28 16:05:12 2018 +0100 arm64: PCI: Remove node-local allocations when initialising host controller Memory for host controller data structures is allocated local to the node to which the controller is associated with. This has been the behaviour since support for ACPI was added in commit 0cb0786bac15 ("ARM64: PCI: Support ACPI-based PCI host controller"). Drop the node local allocation as there is no benefit from doing so - the usage of these structures is independent from where the controller is located. Signed-off-by: Punit Agrawal Signed-off-by: Bjorn Helgaas Acked-by: Will Deacon Cc: Catalin Marinas Cc: Lorenzo Pieralisi commit c238252f86c1833fc0cbee3ce3b4c295d3ab24ef Author: Sinan Kaya Date: Fri Aug 10 04:32:12 2018 +0000 PCI/ACPI: Allow _OSC presence to be optional for PCI The PCI Firmware Spec, r3.2, sec 4.5.1, says: For a host bridge device that originates a PCI Express hierarchy, the _OSC interface defined in this section is required. For a host bridge device that originates a PCI/PCI-X bus hierarchy, inclusion of an _OSC object is optional. Allow PCI host bridges to bail out silently if _OSC is not found. Reported-by: Michael Kelley Signed-off-by: Sinan Kaya [bhelgaas: cite PCI Firmware spec, the authoritative source] Signed-off-by: Bjorn Helgaas commit 1ad61b612b95980a4d970c52022aa01dfc0f6068 Author: Sinan Kaya Date: Fri Aug 10 04:32:11 2018 +0000 PCI/ACPI: Correct error message for ASPM disabling If _OSC execution fails today for platforms without an _OSC entry, code is printing a misleading message saying disabling ASPM as follows: acpi PNP0A03:00: _OSC failed (AE_NOT_FOUND); disabling ASPM We need to ensure that platform supports ASPM to begin with. Reported-by: Michael Kelley Signed-off-by: Sinan Kaya Signed-off-by: Bjorn Helgaas commit aeae4f3e5c38d47bdaef50446dc0ec857307df68 Author: Lukas Wunner Date: Tue Sep 4 12:34:18 2018 -0500 PCI/ASPM: Fix link_state teardown on device removal Upon removal of the last device on a bus, the link_state of the bridge leading to that bus is sought to be torn down by having pci_stop_dev() call pcie_aspm_exit_link_state(). When ASPM was originally introduced by commit 7d715a6c1ae5 ("PCI: add PCI Express ASPM support"), it determined whether the device being removed is the last one by calling list_empty() on the bridge's subordinate devices list. That didn't work because the device is only removed from the list slightly later in pci_destroy_dev(). Commit 3419c75e15f8 ("PCI: properly clean up ASPM link state on device remove") attempted to fix it by calling list_is_last(), but that's not correct either because it checks whether the device is at the *end* of the list, not whether it's the last one *left* in the list. If the user removes the device which happens to be at the end of the list via sysfs but other devices are preceding the device in the list, the link_state is torn down prematurely. The real fix is to move the invocation of pcie_aspm_exit_link_state() to pci_destroy_dev() and reinstate the call to list_empty(). Remove a duplicate check for dev->bus->self because pcie_aspm_exit_link_state() already contains an identical check. Fixes: 7d715a6c1ae5 ("PCI: add PCI Express ASPM support") Signed-off-by: Lukas Wunner Signed-off-by: Bjorn Helgaas Cc: Shaohua Li Cc: stable@vger.kernel.org # v2.6.26 commit efdfeb079cc3b6c7d9c19959c5ed65ce2510dd1d Author: Linus Walleij Date: Thu Sep 6 14:24:36 2018 +0200 regulator: fixed: Convert to use GPIO descriptor only As we augmented the regulator core to accept a GPIO descriptor instead of a GPIO number, we can augment the fixed GPIO regulator to look up and pass that descriptor directly from device tree or board GPIO descriptor look up tables. Some boards just auto-enumerate their fixed regulator platform devices and I have assumed they get names like "fixed-regulator.0" but it's pretty hard to guess this. I need some testing from board maintainers to be sure. Other boards are straight forward, using just plain "fixed-regulator" (ID -1) or "fixed-regulator.1" hammering down the device ID. It seems the da9055 and da9211 has never got around to actually passing any enable gpio into its platform data (not the in-tree code anyway) so we can just decide to simply pass a descriptor instead. The fixed GPIO-controlled regulator in mach-pxa/ezx.c was confusingly named "*_dummy_supply_device" while it is a very real device backed by a GPIO line. There is nothing dummy about it at all, so I renamed it with the infix *_regulator_* as part of this patch set. Intel MID portions tested by Andy. Tested-by: Andy Shevchenko # Check the x86 BCM stuff Acked-by: Tony Lindgren # OMAP1,2,3 maintainer Signed-off-by: Linus Walleij Reviewed-by: Janusz Krzysztofik Reviewed-by: Mike Rapoport Signed-off-by: Mark Brown commit a3762b13a596642586051d877efc80ff043bc42a Author: David Lechner Date: Wed Sep 12 19:39:20 2018 -0500 spi: spi-davinci: Add support for SPI_CS_WORD This adds support for the SPI_CS_WORD flag to the TI DaVinci SPI driver. This mode can be used as long as we are using the hardware chip select and not a GPIO chip select. Signed-off-by: David Lechner Signed-off-by: Mark Brown commit 926369667732577cd7ca85f28ced8ef8d0964285 Merge: 3356d9f4cb45 cbaa62e0094a Author: Mark Brown Date: Mon Sep 17 14:17:30 2018 -0700 Merge tag 'spi-cs-word' into spi-4.20 spi: Provide SPI_CS_WORD This provides a SPI operation mode which changes chip select after every word, used by some devices such as ADCs and DACs. commit cbaa62e0094a840fecc853910e0c0454529cec03 Author: David Lechner Date: Wed Sep 12 19:39:18 2018 -0500 spi: add software implementation for SPI_CS_WORD This adds a default software implementation for the SPI_CS_WORD flag for controllers that don't have such a feature. The SPI_CS_WORD flag indicates that the CS line should be toggled between each word sent, not just between each transfer. The implementation works by using existing functions to split transfers into one-word-sized transfers and sets the cs_change bit for each of the new transfers. Signed-off-by: David Lechner Acked-by: Jonathan Cameron Signed-off-by: Mark Brown commit 0baf9eb25572eea0cf48249c1d152d8373956a7c Author: David Lechner Date: Wed Sep 12 19:39:17 2018 -0500 spi: add new SPI_CS_WORD flag This adds a new SPI mode flag, SPI_CS_WORD, that is used to indicate that a SPI device requires the chip select to be toggled after each word that is transferred. Signed-off-by: David Lechner Signed-off-by: Mark Brown commit 985cdcb08a0488558d1005139596b64d73bee267 Author: Hugues Fruchet Date: Tue Sep 11 09:48:21 2018 -0400 media: ov5640: fix restore of last mode set Mode setting depends on last mode set, in particular because of exposure calculation when downscale mode change between subsampling and scaling. At stream on the last mode was wrongly set to current mode, so no change was detected and exposure calculation was not made, fix this. Signed-off-by: Hugues Fruchet Reviewed-by: Jacopo Mondi Tested-by: Jacopo Mondi Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit a8f438c684eaa4cbe6c98828eb996d5ec53e24fb Author: Hugues Fruchet Date: Tue Sep 11 09:48:20 2018 -0400 media: ov5640: fix auto controls values when switching to manual mode When switching from auto to manual mode, V4L2 core is calling g_volatile_ctrl() in manual mode in order to get the manual initial value. Remove the manual mode check/return to not break this behaviour. Signed-off-by: Hugues Fruchet Tested-by: Jacopo Mondi Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit c2c3f42df4dd9bb231d756bacb0c897f662c6d3c Author: Hugues Fruchet Date: Tue Sep 11 09:48:19 2018 -0400 media: ov5640: fix wrong binning value in exposure calculation ov5640_set_mode_exposure_calc() is checking binning value but binning value read is buggy, fix this. Rename ov5640_binning_on() to ov5640_get_binning() as per other similar functions. Signed-off-by: Hugues Fruchet Reviewed-by: Laurent Pinchart Reviewed-by: Jacopo Mondi Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 3cca8ef5f774cbd61c8db05d9aa401de9bb59c66 Author: Hugues Fruchet Date: Tue Sep 11 09:48:18 2018 -0400 media: ov5640: fix auto gain & exposure when changing mode Ensure that auto gain and auto exposure are well restored when changing mode. Signed-off-by: Hugues Fruchet Reviewed-by: Jacopo Mondi Tested-by: Jacopo Mondi Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit dc29a1c187eedc1d498cb567c44bbbc832b009cb Author: Hugues Fruchet Date: Tue Sep 11 09:48:17 2018 -0400 media: ov5640: fix exposure regression Symptom was black image when capturing HD or 5Mp picture due to manual exposure set to 1 while it was intended to set autoexposure to "manual", fix this. Fixes: bf4a4b518c20 ("media: ov5640: Don't force the auto exposure state at start time"). Signed-off-by: Hugues Fruchet Reviewed-by: Laurent Pinchart Tested-by: Jacopo Mondi Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit bad1774ed41e98a43074e50e7d5ac9e1e848d99a Author: Jacopo Mondi Date: Wed Jul 18 06:06:23 2018 -0400 media: ov5640: Fix timings setup code As of: commit 476dec012f4c ("media: ov5640: Add horizontal and vertical totals") the timings parameters gets programmed separately from the static register values array. When changing capture mode, the vertical and horizontal totals gets inspected by the set_mode_exposure_calc() functions, and only later programmed with the new values. This means exposure, light banding filter and shutter gain are calculated using the previous timings, and are thus not correct. Fix this by programming timings right after the static register value table has been sent to the sensor in the ov5640_load_regs() function. Fixes: 476dec012f4c ("media: ov5640: Add horizontal and vertical totals") Tested-by: Steve Longerbeam # i.MX6q SabreSD, CSI-2 Tested-by: Loic Poulain # Dragonboard-410c, CSI-2 Signed-off-by: Samuel Bobrowicz Signed-off-by: Maxime Ripard Signed-off-by: Jacopo Mondi Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit aa4bb8b8838ffcc776a79f49a4d7476b82405349 Author: Jacopo Mondi Date: Fri Jul 6 05:51:52 2018 -0400 media: ov5640: Re-work MIPI startup sequence Rework the MIPI interface startup sequence with the following changes: - Remove MIPI bus initialization from the initial settings blob - At set_power(1) time power up MIPI Tx/Rx and set data and clock lanes in LP11 during 'sleep' and 'idle' with MIPI clock in non-continuous mode. - At s_stream time enable/disable the MIPI interface output. - Restore default settings at set_power(0) time. Before this commit the sensor MIPI interface was initialized with settings that require a start/stop sequence at power-up time in order to force lanes into LP11 state, as they were initialized in LP00 when in 'sleep mode', which is assumed to be the sensor manual definition for the D-PHY defined stop mode. The stream start/stop was performed by enabling disabling clock gating, and had the side effect to change the lanes sleep mode configuration when stream was stopped. Clock gating/ungating: - ret = ov5640_mod_reg(sensor, OV5640_REG_MIPI_CTRL00, BIT(5), - on ? 0 : BIT(5)); - if (ret) Set lanes in LP11 when in 'sleep mode': - ret = ov5640_write_reg(sensor, OV5640_REG_PAD_OUTPUT00, - on ? 0x00 : 0x70); This commit fixes an issue reported by Jagan Teki on i.MX6 platforms that prevents the host interface from powering up correctly: https://lkml.org/lkml/2018/6/1/38 It also improves MIPI capture operations stability on my testing platform where MIPI capture often failed and returned all-purple frames. Fixes: f22996db44e2 ("media: ov5640: add support of DVP parallel interface") Tested-by: Steve Longerbeam (i.MX6q SabreSD, CSI-2) Tested-by: Loic Poulain (Dragonboard-410c, CSI-2) Reported-by: Jagan Teki Signed-off-by: Jacopo Mondi Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit e7f4861dad89b100f56eee59c2c2a6f0ee1287ff Author: Javier Martinez Canillas Date: Sat Sep 1 08:46:30 2018 -0400 media: ov2680: rename ov2680_v4l2_init() to ov2680_v4l2_register() The function not only does initialization but also registers the subdevice so change its name to make this more clear. Signed-off-by: Javier Martinez Canillas Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit b7a417628abf49dae98cb80a272dc133b0e4d1a3 Author: Javier Martinez Canillas Date: Sat Sep 1 08:46:29 2018 -0400 media: ov2680: don't register the v4l2 subdevice before checking chip ID The driver registers the v4l2 subdevice before attempting to power on the chip and checking its ID. This means that a media device driver that it's waiting for this subdevice to be bound, will prematurely expose its media device node to userspace because if something goes wrong the media entity will be cleaned up again on the ov2680 probe function. This also simplifies the probe function error path since no initialization is made before attempting to enable the resources or checking the chip ID. Fixes: 3ee47cad3e69 ("media: ov2680: Add Omnivision OV2680 sensor driver") Signed-off-by: Javier Martinez Canillas Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 75b090a5bc961e578e232269596ddd0486ec6fca Author: Dan Carpenter Date: Fri Aug 31 09:20:18 2018 -0400 media: sr030pc30: remove NULL in sr030pc30_base_config() This code doesn't check for NULL consistently and it generates a Smatch warning: drivers/media/i2c/sr030pc30.c:575 sr030pc30_base_config() error: we previously assumed 'info->pdata' could be null (see line 572) Fortunately, "info->pdata" can't be NULL to that check can be removed. The other thing is that if "ret" is an error code here, then we don't want to do the next call to cam_i2c_write(), so actually let's flip that test around and return the error. This is more of a theoretical issue than something which is likely to affect real life. Signed-off-by: Dan Carpenter Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 7d3073f13ea85a1e8b868502fa6735696a629060 Author: Sakari Ailus Date: Wed Aug 29 06:01:48 2018 -0400 media: v4l: sr030pc30: Remove redundant setting of sub-device name The sub-device name is set right after in v4l2_i2c_subdev_init(). Remove the redundant strcpy() call. Signed-off-by: Sakari Ailus Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 18ce84857975c976022429dc964bd01d60f87d0c Author: Sakari Ailus Date: Wed Aug 29 05:57:36 2018 -0400 media: smiapp: Use v4l2_i2c_subdev_set_name Use v4l2_i2c_subdev_set_name() to set the name of the smiapp driver's sub-devices. There is no functional change. Signed-off-by: Sakari Ailus Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 0658293012af1e69d8bb8a25e71781470f9b2ac6 Author: Sakari Ailus Date: Wed Aug 29 05:52:46 2018 -0400 media: v4l: subdev: Add a function to set an I²C sub-device's name v4l2_i2c_subdev_set_name() can be used to assign a name to a sub-device. This way uniform names can be formed easily without having to resort to things such as snprintf in drivers. Signed-off-by: Sakari Ailus Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit e6002df8f37fdeb1b00c65892e45dffbec8d39ed Author: Luca Ceresoli Date: Fri Aug 24 12:35:25 2018 -0400 media: imx274: switch to SPDX license identifier Signed-off-by: Luca Ceresoli Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit ca017467c78bd0e451facea2e512cfa8881eb003 Author: Luca Ceresoli Date: Fri Aug 24 12:35:24 2018 -0400 media: imx274: add helper to read multibyte registers Currently 2-bytes and 3-bytes registers are read one byte at a time, doing the needed shift & mask each time. Replace all of this code by a unique helper function that calls regmap_bulk_read(), which has two advantages: - reads all the bytes in a unique I2C transaction - simplifies code to read multibyte registers Signed-off-by: Luca Ceresoli Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 1657c28d82e8f89f0cb7d327f31515071bd0577a Author: Luca Ceresoli Date: Fri Aug 24 12:35:23 2018 -0400 media: imx274: fix error in function docs This parameter holds the number of bytes, not bits. Signed-off-by: Luca Ceresoli Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 9648cb577b76ecffa35433b25a6385a493c6335b Author: Luca Ceresoli Date: Fri Aug 24 12:35:22 2018 -0400 media: imx274: rename frmfmt and format to "mode" A mix of "mode", "format" and "frmfmt" is used to refer to the sensor readout mode. Use the term "mode" for all of them. Now "format" is only used in the V4L2 meaning. Signed-off-by: Luca Ceresoli Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 409426cb796af011024a33c412126219224321a0 Author: Luca Ceresoli Date: Fri Aug 24 12:35:21 2018 -0400 media: imx274: don't hard-code the subdev name to DRIVER_NAME Forcibly setting the subdev name to DRIVER_NAME (i.e. "IMX274") makes it non-unique and less informative. Let the driver use the default name from i2c, e.g. "IMX274 2-001a". Signed-off-by: Luca Ceresoli Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 7d2332c76d1bbc81bd9ebee839c2c90d961ac182 Author: Luca Ceresoli Date: Fri Aug 24 12:35:20 2018 -0400 media: imx274: rearrange sensor startup register tables Rearrange the imx274_start_ register tables to better match the datasheet and slightly simplify code: - collapes tables 1 and 2, they are applied one after each other and together they implement the fixed part 1 of the startup procedure in the datasheet - while there, cleanup comments - rename tables 3 and 4 -> 2 and 3, coherently with the datasheet Signed-off-by: Luca Ceresoli Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 3df8adb7d52dc4d1b525b8013340ca48759090a2 Author: Luca Ceresoli Date: Fri Aug 24 12:35:19 2018 -0400 media: imx274: rename IMX274_DEFAULT_MODE to IMX274_DEFAULT_BINNING The "mode" has been renamed to "binning" in commit 39dd23dc9d4c ("media: imx274: add cropping support via SELECTION API"), but this define has not been updated. Signed-off-by: Luca Ceresoli Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 24614c1e906debe791e2227f3a8936c7ae3954ed Author: Sakari Ailus Date: Fri Jul 20 17:04:50 2018 -0400 media: dw9807-vcm: Remove redundant pm_runtime_set_suspended in remove The device is already suspended when it's the driver's remove function is called. Remove redundant pm_runtime_set_suspended call. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 1a07dd8a6b8510dd8ffd43cceff51c7d4cba0693 Author: Sakari Ailus Date: Thu Jul 19 07:54:28 2018 -0400 media: dt-bindings: dw9714, dw9807-vcm: Add files to MAINTAINERS, rename files Add the DT binding documentation for dw9714 and dw9807-vcm to the MAINTAINERS file. The dw9807-vcm binding documentation file is renamed to match the dw9807's VCM bit's compatible string. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 03939db7cb0e4b430043d2a6ff542909a91e544a Author: Kieran Bingham Date: Fri Sep 14 10:26:52 2018 -0400 media: vsp1: Document max_width restriction on UDS The UDS is currently restricted based on a partition size of 256 pixels. Document the actual restrictions, but don't increase the implementation. The extended partition algorithm may later choose to utilise a larger partition size to support overlapping partitions which will improve the quality of the output images. Signed-off-by: Kieran Bingham Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit ce51fd3b4a56bb6c027d9ffa41e2668a70655040 Author: Kieran Bingham Date: Fri Sep 14 10:26:51 2018 -0400 media: vsp1: Document max_width restriction on SRU The SRU is currently restricted to 256 pixels as part of the current partition algorithm. Document that the actual capability of this component is 288 pixels, but don't increase the implementation. The extended partition algorithm may later choose to utilise a larger input to support overlapping partitions which will improve the quality of the output images. Signed-off-by: Kieran Bingham Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit 23a99e80e3082bc3191ae9f80e191a2e7729e196 Author: Kieran Bingham Date: Fri Aug 31 10:40:44 2018 -0400 media: vsp1: use periods at the end of comment sentences The style of this driver uses periods at the end of sentences in comments, but it is applied inconsitently. Update a selection of comments which were discovered to be missing their period. Also fix the spelling of one usage of 'instantiate' Signed-off-by: Kieran Bingham Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit 8a7db6475e2893c11293b1cb2c894245912568f3 Author: Kieran Bingham Date: Fri Aug 31 10:40:39 2018 -0400 media: vsp1: Remove artificial minimum width/height limitation The VSP1 has a minimum width and height of a single pixel, with the exception of pixel formats with sub-sampling. Remove the artificial minimum width and minimum height limitation, and instead clamp the minimum dimensions based upon the sub-sampling parameter of that dimension. Signed-off-by: Kieran Bingham Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit 9b2798d5b71c50f64c41a40f0cbcae47c3fbd067 Author: Koji Matsuoka Date: Thu Oct 26 02:27:51 2017 -0400 media: vsp1: Fix YCbCr planar formats pitch calculation YCbCr planar formats can have different pitch values for the luma and chroma planes. This isn't taken into account in the driver. Fix it. Based on a BSP patch from Koji Matsuoka . Fixes: 7863ac504bc5 ("drm: rcar-du: Add tri-planar memory formats support") [Updated documentation of the struct vsp1_du_atomic_config pitch field] Signed-off-by: Koji Matsuoka Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham Signed-off-by: Mauro Carvalho Chehab commit de2bc45c84f7f0c5b0be441c998035b70cbe4614 Author: Laurent Pinchart Date: Thu Oct 26 02:27:51 2017 -0400 media: vsp1: Update LIF buffer thresholds The LIF module has a data buffer to accommodate clock rate differences between the DU and the VSP. Several programmable threshold values control DU start of frame notification by the VSP and VSP clock stop/resume. The R-Car Gen2 and Gen3 datasheets recommend values for the different SoCs. Update the driver to use the recommended values for optimal operation. Based on a BSP patch from Koji Matsuoka , with Gen2 and V3H/V3M updates. Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit 5eea860a6fec1e60709d19832015ee0991d3e80c Author: Laurent Pinchart Date: Fri Apr 27 17:41:12 2018 -0400 media: vsp1: Fix vsp1_regs.h license header All source files of the vsp1 driver are licensed under the GPLv2+ except for vsp1_regs.h which is licensed under GPLv2. This is caused by a bad copy&paste that dates back from the initial version of the driver. Fix it. Acked-by: Kieran Bingham Acked-by: Sergei Shtylyov Acked-by: Niklas Söderlund Acked-by: Wolfram Sang Acked-by: Nobuhiro Iwamatsu Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit 35c6b2bb6138598b9f36f11f758aed097bde235b Author: Kieran Bingham Date: Mon Aug 6 10:39:02 2018 -0400 media: MAINTAINERS: VSP1: Add co-maintainer Add myself as a co-maintainer for the Renesas VSP driver. Signed-off-by: Kieran Bingham Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit f13a0b0bb46f07e5c154ae7944202d754007d362 Author: Linus Walleij Date: Thu Sep 13 14:05:26 2018 +0200 gpio: Get rid of legacy header A bunch of core gpiolib files still include the legacy API header for no good reason. After this only the gpiolib-legacy.c file includes it, which is fine. The sysfs ABI code has a pointless wrapper function around gpio_to_desc() we can just loose. Signed-off-by: Linus Walleij commit 66dbe750a96fe10c7270593cbffeb4701cfcd180 Author: Linus Walleij Date: Thu Sep 13 13:28:13 2018 +0200 gpio: wm8xxx: Cut down on boilerplate Just use the SPDX license tag for these drivers. Cc: patches@opensource.cirrus.com Cc: Charles Keepax Cc: Mark Brown Acked-by: Richard Fitzgerald Signed-off-by: Linus Walleij commit 10833c4b6ec0bbb233521440911983db1cac1e94 Author: Linus Walleij Date: Thu Sep 13 13:25:58 2018 +0200 gpio: wm8xxx: Use the right header These are GPIO drivers so just include . Cc: patches@opensource.cirrus.com Cc: Charles Keepax Cc: Mark Brown Acked-by: Richard Fitzgerald Signed-off-by: Linus Walleij commit 130a990b724cb9bb7fe783148b27c968a8a2505f Author: Linus Walleij Date: Wed Sep 12 14:32:07 2018 +0200 gpio: xlp: Cut down on boilerplate Just use the SPDX license tag for this file. Cc: Kamlakant Patel Signed-off-by: Linus Walleij commit 121111d78431f503c21152e039b737ff44e3eec1 Author: Linus Walleij Date: Wed Sep 12 14:30:59 2018 +0200 gpio: xlp: Include the right header This is a GPIO driver so include only . Cc: Kamlakant Patel Signed-off-by: Linus Walleij commit c872a20f5ba212b3c6729ea2d13a7c270fc49fe9 Author: Linus Walleij Date: Wed Sep 12 14:13:17 2018 +0200 gpio: vx855: Cut down on boilerplate Just use the SPDX header for the license. Cc: Daniel Drake Signed-off-by: Linus Walleij commit 3bca2d4e4e7b771135456f99aea5bfc86aa4667c Author: Linus Walleij Date: Wed Sep 12 14:11:59 2018 +0200 gpio: vx855: Include the right header This is a GPIO driver so include only . Cc: Daniel Drake Signed-off-by: Linus Walleij commit 751107ef790ad3a7524d9b3aac74865ca2564e5e Author: Linus Walleij Date: Wed Sep 12 13:49:13 2018 +0200 gpio: viperboard: Cut down on boilerplate Just use the SPDX header for the license. Cc: Lars Poeschel Signed-off-by: Linus Walleij commit d3007ecb5b87bc033b0e31d38931212bafb06077 Author: Linus Walleij Date: Wed Sep 12 13:47:35 2018 +0200 gpio: viperboard: Include the right header This is a GPIO driver so include only . Cc: Lars Poeschel Signed-off-by: Linus Walleij commit 3edc688328127dea7c8b2d8bec24512ee070db1d Author: Linus Walleij Date: Wed Sep 12 13:36:08 2018 +0200 gpio: xtensa: Cut down on boilerplate Just use the SPDX header for the license. Acked-by: Baruch Siach Signed-off-by: Linus Walleij commit 83a4e2c50ef031a1f7a5d16434618d0d0c085334 Author: Linus Walleij Date: Wed Sep 12 13:34:40 2018 +0200 gpio: xtensa: Include the right header This is a GPIO driver so include only . Acked-by: Baruch Siach Signed-off-by: Linus Walleij commit 2ab4a93980e4831ec901d040f792f72f84205c16 Author: Linus Walleij Date: Wed Sep 12 13:22:15 2018 +0200 gpio: vr41xx: Delete vr41xx_gpio_pullupdown() callback This API is not used anywhere in the kernel and has remained unused for years after being introduced. Over time, we have developed a subsystem to deal with pin control and this now managed pull up/down. Delete the old and unused API. If this platform needs it, we should implement a proper pin controller for it instead. Cc: Yoichi Yuasa Cc: Ralf Baechle Acked-by: Paul Burton Signed-off-by: Linus Walleij commit 3356d9f4cb45b1aef3dd4b1a6ea9ceaca0f68a53 Author: Alexey Khoroshilov Date: Fri Sep 14 23:05:34 2018 +0300 spi: pic32-sqi: remove unnecessary of_node_get() Almost all spi drivers assign spi master->dev.of_node from its parent platform device without additional refcounting. It seems of_node_get() in pic32_sqi_probe() is unnecessary and there is no corresponding of_node_put(). Found by Linux Driver Verification project (linuxtesting.org) Signed-off-by: Alexey Khoroshilov Signed-off-by: Mark Brown commit fbb673f7c6555d5434ad005f86b0d4368b1203d9 Author: Oder Chiou Date: Mon Sep 17 19:03:09 2018 +0800 ASoC: rt5514-spi: Get the period_bytes in the copy work to make sure the value correctly The value of period_bytes will get the zero before the hw_params() is not run completely. Move the function snd_pcm_lib_period_bytes() to copy work, and make sure that is not zero. Signed-off-by: Oder Chiou Signed-off-by: Mark Brown commit be6ac0a9ced99403c435b2b2fe9ac4bd55749823 Author: Kuninori Morimoto Date: Tue Sep 11 06:51:45 2018 +0000 ASoC: soc-core: add snd_soc_is_matching_component() To find (CPU/)Codec/Platform, we need to find component first (= on CPU/Codec/Platform), and find DAI from it (= CPU/Codec). These are similar operation but difficult to be simple, and has many duplicate code to finding component. This patch adds new snd_soc_is_matching_component(), and reduce duplicate codes. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit 4a9ed39477bd1635cf23b49e10f9e364329bbe46 Author: Kuninori Morimoto Date: Tue Sep 11 06:51:14 2018 +0000 ASoC: soc-core: manage platform name under snd_soc_init_platform() Now "platform" is controlled by snd_soc_dai_link_component, thus its "name" can be initialized in snd_soc_init_platform(), instead of soc_bind_dai_link() local. This patch do it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit db6565af68db17f6dbc26307a2768cb36e9f824a Author: Colin Ian King Date: Fri Sep 14 13:38:50 2018 +0100 regulator: pfuze100-regulator: fix spelling mistake "standy" -> "standby" Trivial fix to spelling mistake in dev_info message Signed-off-by: Colin Ian King Signed-off-by: Mark Brown commit c135e99748fe543da9dedca4d2dde77434c4c910 Author: Mauro Carvalho Chehab Date: Wed Aug 1 10:16:48 2018 -0400 media: tvp5150: get rid of some warnings The recent tvp5150 patchset added two new warnings: drivers/media/i2c/tvp5150.c: In function 'tvp5150_querystd': drivers/media/i2c/tvp5150.c:829:18: warning: unused variable 'decoder' [-Wunused-variable] struct tvp5150 *decoder = to_tvp5150(sd); ^~~~~~~ drivers/media/i2c/tvp5150.c:1522:6: warning: no previous prototype for 'tvp5150_volatile_reg' [-Wmissing-prototypes] bool tvp5150_volatile_reg(struct device *dev, unsigned int reg) ^~~~~~~~~~~~~~~~~~~~ Get rid of them. Signed-off-by: Mauro Carvalho Chehab commit 5bd1d91d673df395aafe0c984de6195e9e662ec3 Author: Mauro Carvalho Chehab Date: Wed Aug 1 10:09:24 2018 -0400 media: tvp5150: implement decoder lock when irq is not used When irq is used, the lock is set via IRQ code. When it isn't, the driver just assumes it is always locked. Instead, read the lock status from the status register. Signed-off-by: Mauro Carvalho Chehab commit ee9a6ff6a6979c2c374b434ff1c800780b193af4 Author: Philipp Zabel Date: Thu Jun 28 12:20:48 2018 -0400 media: tvp5150: add querystd Add the querystd video_op and make it return V4L2_STD_UNKNOWN while the TVP5150 is not locked to a signal. Signed-off-by: Philipp Zabel Signed-off-by: Marco Felsch Signed-off-by: Mauro Carvalho Chehab commit 0db87cc7ffdf6276d268ed9ee87f497c8fec067e Author: Marco Felsch Date: Thu Jun 28 12:20:49 2018 -0400 media: tvp5150: add g_std callback Add callback to retrieve the current set norm. Signed-off-by: Marco Felsch Signed-off-by: Mauro Carvalho Chehab commit 7bb3c33892ea5b6e272ac89bfab894dc33d48a64 Author: Philipp Zabel Date: Thu Jun 28 12:20:47 2018 -0400 media: tvp5150: add sync lock/loss signal debug messages Signed-off-by: Philipp Zabel Signed-off-by: Marco Felsch Signed-off-by: Mauro Carvalho Chehab commit 24b7a0aa1abec41b62c9a29a75e511d29f95033b Author: YueHaibing Date: Fri Sep 14 01:36:04 2018 +0000 ASoC: qdsp6: q6asm-dai: remove duplicated include from q6asm-dai.c Remove duplicated include. Signed-off-by: YueHaibing Acked-by: Srinivas Kandagatla Signed-off-by: Mark Brown commit 2f0a5c65d16297bfc145432da4bc6e9507f55c9b Author: Philipp Zabel Date: Thu Jun 28 12:20:46 2018 -0400 media: tvp5150: issue source change events Issue a V4L2_EVENT_SOURCE_CHANGE notification when the TVP5150 locks onto a signal and when it loses the lock. Signed-off-by: Philipp Zabel [m.felsch@pengutronix.de: partly mainline part port] Signed-off-by: Marco Felsch Signed-off-by: Mauro Carvalho Chehab commit 62a764e1c56ef78bb8f899919d231a82889a0eb1 Author: Philipp Zabel Date: Thu Jun 28 12:20:45 2018 -0400 media: tvp5150: disable output while signal not locked To avoid short frames on stream start, keep output pins at high impedance while we are not properly locked onto the input signal. Signed-off-by: Philipp Zabel Signed-off-by: Marco Felsch Signed-off-by: Mauro Carvalho Chehab commit 8e4c97e0f50ac2de28b2ef26a763533623e16cf7 Author: Philipp Zabel Date: Thu Jun 28 12:20:44 2018 -0400 media: tvp5150: Add sync lock interrupt handling This patch adds an optional interrupt handler to handle the sync lock interrupt and sync lock status. Signed-off-by: Philipp Zabel Signed-off-by: Lucas Stach [m.felsch@pengutronix.de: move added .g_std callback to separate patch] Signed-off-by: Marco Felsch Signed-off-by: Mauro Carvalho Chehab commit 982e386379f01aa6254e3313cff1edcb04c66685 Author: Gustavo A. R. Silva Date: Thu Sep 13 14:11:07 2018 -0500 ASoC: hisilicon: fix fall-through annotations Replace "fallthru" with a proper "fall through" annotation. This fix is part of the ongoing efforts to enabling -Wimplicit-fallthrough Signed-off-by: Gustavo A. R. Silva Signed-off-by: Mark Brown commit 8105e1bcfc223d8143c4678a33eb4b50238af2d4 Author: Philipp Zabel Date: Thu Jun 28 12:20:43 2018 -0400 media: tvp5150: remove pin configuration from initialization tables To allow optional interrupt support, we want to configure the pin settings dynamically. Move those register accesses out of the static initialization tables. Signed-off-by: Philipp Zabel [m.felsch@pengutronix.de: drop init_default register remove] [m.felsch@pengutronix.de: fix regmap access during reset()] Signed-off-by: Marco Felsch Signed-off-by: Mauro Carvalho Chehab commit 1bb086bc4d4a225f2af8b00e9082f25e6a7efdfa Author: Philipp Zabel Date: Thu Jun 28 12:20:42 2018 -0400 media: tvp5150: split reset/enable routine To trigger standard autodetection only the reset part of the routine is necessary during probe(). Split this out to make it callable on its own. [m.felsch@pengutronix.de: adapt commit message] [m.felsch@pengutronix.de: add tvp5150_enable() to tvp5150_s_stream()] [m.chehab@samsung.com: fix a compilation breakage] Signed-off-by: Philipp Zabel Signed-off-by: Marco Felsch Signed-off-by: Mauro Carvalho Chehab commit 1569586688a0a82713441bade3e831524da38109 Author: Philipp Zabel Date: Thu Jun 28 12:20:41 2018 -0400 media: tvp5150: fix standard autodetection Make sure to not overwrite decoder->norm when setting the standard in hardware, but only when instructed by V4L2 API calls. Signed-off-by: Philipp Zabel Signed-off-by: Marco Felsch Signed-off-by: Mauro Carvalho Chehab commit b440b7337352ef3c8265c8a89c0d43091cfd9008 Author: Philipp Zabel Date: Thu Jun 28 12:20:40 2018 -0400 media: tvp5150: trigger autodetection on subdev open to reset cropping If cropping isn't set explicitly by userspace, reset it to the maximum possible rectangle in subdevice open if a standard change is detected. Signed-off-by: Philipp Zabel [m.felsch@pengutronix.de: move code from internal_ops.open() to pad_ops.init_cfg()] [m.felsch@pengutronix.de: make use of tvp5150_set_default() helper] Signed-off-by: Marco Felsch Signed-off-by: Mauro Carvalho Chehab commit 5cb8294013a45734d1a27cc0a35706a2c54eeaea Author: Marco Felsch Date: Thu Jun 28 12:20:39 2018 -0400 media: tvp5150: add default format helper The patch adds three macros to bundle the mbus_framefmt default values and a helper function to set the the default crop and mbus_framefmt values. Signed-off-by: Marco Felsch Signed-off-by: Mauro Carvalho Chehab commit e62fdbb24c342f78e431e05925097165cc0e05e9 Author: Marco Felsch Date: Thu Jun 28 12:20:37 2018 -0400 media: v4l2-rect.h: add position and equal helpers Add two helper functions to check if two rectangles have the same position (top/left) and if two rectangles equals (same size and same position). Signed-off-by: Marco Felsch Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 8a7441baccd4ce85e34a0a500824900d2b58a4b0 Author: Marco Felsch Date: Thu Jun 28 12:20:36 2018 -0400 media: tvp5150: make use of regmap_update_bits Since commit 9a4c7e68f7e0 ("media: tvp5150: convert register access to regmap")' the driver supports regmap. Now we can drop the handmade bit update sequence and move to the regmap provided helpers. Signed-off-by: Marco Felsch Signed-off-by: Mauro Carvalho Chehab commit 28b9e227d2223bd0ac6bfbc4796a5e296807cc62 Author: Philipp Zabel Date: Thu Jun 28 12:20:35 2018 -0400 media: tvp5150: convert register access to regmap Regmap provides built in debugging, caching and provides dedicated accessors for bit manipulations in registers, which make the following changes a lot simpler. Signed-off-by: Philipp Zabel Signed-off-by: Marco Felsch Signed-off-by: Mauro Carvalho Chehab commit 2d29bcc8c237874795175b2930fa9a45a115175a Author: Marco Felsch Date: Thu Jun 28 12:20:34 2018 -0400 media: tvp5150: fix switch exit in set control handler The function only consists of a single switch case block without a default case. Unsupported control requests are indicated by the -EINVAL return code trough the last return statement at the end of the function. So exiting just the switch case block returns the -EINVAL error code but the hue control is supported and a zero should be returned instead. Replace the break by a 'return 0' to fix this behaviour. Fixes: d183e4efcae8 ("[media] v4l: tvp5150: Add missing break in set control handler") Signed-off-by: Marco Felsch Signed-off-by: Mauro Carvalho Chehab commit bd24db04101f45a9c1d874fe21b0c7eab7bcadec Author: Marco Felsch Date: Thu Jun 28 12:20:33 2018 -0400 media: tvp5150: fix width alignment during set_selection() The driver ignored the width alignment which exists due to the UYVY colorspace format. Fix the width alignment and make use of the the provided v4l2 helper function to set the width, height and all alignments in one. Fixes: 963ddc63e20d ("[media] media: tvp5150: Add cropping support") Signed-off-by: Marco Felsch Signed-off-by: Mauro Carvalho Chehab commit 65e83fb00b2df3eadc23d71aacf626af3700f337 Author: Mauro Carvalho Chehab Date: Wed Aug 1 06:58:38 2018 -0400 media: v4l2-mc: get rid of global pad indexes Now that all drivers are using pad signal types, we can get rid of the global static definition, as routes are stablished using the pad signal type. The tuner and IF-PLL pads are now used only by the tuner core, so move the definitions to be there. Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit db7da96ba861e0bd51e0fc206bb59e0051b6b427 Author: Mauro Carvalho Chehab Date: Wed Aug 1 06:57:19 2018 -0400 media: mxl111sf: declare its own pads As we don't need anymore to share pad numbers with similar drivers, use its own pad definition instead of a global model. Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 3aa13787c8afaa3de93860968103612c80b95efb Author: Mauro Carvalho Chehab Date: Wed Aug 1 06:20:27 2018 -0400 media: saa7134: declare its own pads As we don't need anymore to share pad numbers with similar drivers, use its own pad definition instead of a global model. Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 552b926fa3b1671b3d3937641f0f5585e6659866 Author: Mauro Carvalho Chehab Date: Wed Aug 1 06:15:22 2018 -0400 media: si2157: declare its own pads As we don't need anymore to share pad numbers with similar drivers, use its own pad definition instead of a global model. Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit bc322c0d46cebcf1cc29eb514a258e114dd0633e Author: Mauro Carvalho Chehab Date: Wed Aug 1 06:10:05 2018 -0400 media: tvp5150: declare its own pads As we don't need anymore to share pad numbers with similar drivers, use its own pad definition instead of a global model. Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 87f9971710d6ea5413ffb9b9415c4e60e66c437c Author: Mauro Carvalho Chehab Date: Wed Aug 1 06:07:09 2018 -0400 media: saa7115: declare its own pads As we don't need anymore to share pad numbers with similar drivers, use its own pad definition instead of a global model. Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit fc9bd1cea522e19ffe908af0b8de4944b48073e5 Author: Mauro Carvalho Chehab Date: Wed Aug 1 06:04:13 2018 -0400 media: msp3400: declare its own pads As we don't need anymore to share pad numbers with similar drivers, use its own pad definition instead of a global model. Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 44fd653bde54e49308efb77d121b66afae07d652 Author: Mauro Carvalho Chehab Date: Wed Aug 1 05:06:39 2018 -0400 media: au8522: declare its own pads As we don't need anymore to share pad numbers with similar drivers, use its own pad definition instead of a global model. Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 5e68d8e26e267cf643d0e8d3358b21c30417a961 Author: Mauro Carvalho Chehab Date: Wed Aug 1 05:36:15 2018 -0400 media: au0828: use signals instead of hardcoding a pad number When creating the audio link, use pad signals, instead of hardcoding using the pad index number. Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit f3efe15a2f057d699d4f2d252e6bfc347abd7368 Author: Mauro Carvalho Chehab Date: Tue Jul 31 12:43:39 2018 -0400 media: dvb: use signal types to discover pads On tuner pads, multiple signals are present. Be sure to get the right PAD by using them. Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit caf276be3a962868fff3ad90bb9677a808aa299f Author: Mauro Carvalho Chehab Date: Sat Sep 15 00:00:31 2018 -0400 media: v4l2-mc: add print messages when media graph fails It is not trivial to debug troubles at media graph build. So, add print messages to help debug what's happening, in the case of an error occurs. Signed-off-by: Mauro Carvalho Chehab commit 9d6d20e652c0d304f98de30d51805658f98ba27d Author: Mauro Carvalho Chehab Date: Tue Jul 31 09:22:40 2018 -0400 media: v4l2-mc: switch it to use the new approach to setup pipelines Instead of relying on a static map for pids, use the new sig_type "taint" type to setup the pipelines with the same tipe between different entities. Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit c1a37dd5e87dc6a4c37e5fc68d7b26fb4a3ef097 Author: Mauro Carvalho Chehab Date: Tue Jul 31 08:03:48 2018 -0400 media: v4l2: taint pads with the signal types for consumer devices Consumer devices are provided with a wide different range of types supported by the same driver, allowing different configutations. In order to make easier to setup media controller links, "taint" pads with the signal type it carries. While here, get rid of DEMOD_PAD_VBI_OUT, as the signal it carries is actually the same as the normal video output. The difference happens at the video/VBI interface: - for VBI, only the hidden lines are streamed; - for video, the stream is usually cropped to hide the vbi lines. Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 092a37875a22fbb75098e834fb1cc1c6220f0eaa Author: Mauro Carvalho Chehab Date: Tue Jul 31 12:48:05 2018 -0400 media: v4l2: remove VBI output pad The signal there is the same as the video output (well, except for sliced VBI, but let's simplify the model and ignore it, at least for now - as it is routed together with raw VBI). Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 02b4da5f84d157f6a27e05ca017bdb74bcf01bee Author: Christoph Hellwig Date: Mon Sep 17 19:10:31 2018 +0200 intel-iommu: mark intel_dma_ops static ia64 currently explicitly assigns it to dma_ops, but that same work is already done by intel_iommu_init a little later, so we can remove the duplicate assignment and mark the variable static. Signed-off-by: Christoph Hellwig Signed-off-by: Tony Luck commit 9aa1fbc50d4f0165d4c9445a2ac80a2bf00fb667 Author: Christoph Hellwig Date: Mon Sep 17 19:10:30 2018 +0200 ia64: remove machvec_dma_sync_{single,sg} The original form of these was added (to the HP zx1 platform only) by the following bitkeeper commit (by the way of the historic.git tree): commit 66b99421d118a5ddd98a72913670b0fcf0a38d45 Author: Andrew Morton Date: Sat Mar 13 17:05:37 2004 -0800 [PATCH] DMA: Fill gaping hole in DMA API interfaces. From: "David S. Miller" The commit does not explain why we'd need the memory barrier on ia64, it never included the swiotlb or SGI IOMMU based platforms, and also failed to address the map/unmap parts of the dma mapping interface, which should provide the same ordering semantics and actually are commonly used. The conclusion of this is that they were added in error and should be removed. Signed-off-by: Christoph Hellwig Signed-off-by: Tony Luck commit 1322d51c0e5f5d6a6c13573a9347beb9fa154111 Author: Christoph Hellwig Date: Mon Sep 17 19:10:29 2018 +0200 ia64/sn2: remove no-ops dma sync methods These do nothing but duplicating an assert that would have triggered earlier on setting the dma mask, so remove them. Signed-off-by: Christoph Hellwig Signed-off-by: Tony Luck commit 361a2ab91b0f925779c98f32a01e5ed27dc8d261 Author: Christoph Hellwig Date: Mon Sep 17 19:10:28 2018 +0200 ia64: remove the unused iommu_dma_init function Signed-off-by: Christoph Hellwig Signed-off-by: Tony Luck commit b666287e799bb25a6f53dcc5d9ae8cda97c7b5da Author: Christoph Hellwig Date: Mon Sep 17 19:10:27 2018 +0200 ia64: remove the unused pci_iommu_shutdown function Signed-off-by: Christoph Hellwig Signed-off-by: Tony Luck commit 87af06d8c062220bb1291c32870f6c284297f2c8 Author: Christoph Hellwig Date: Mon Sep 17 19:10:26 2018 +0200 ia64: remove the unused bad_dma_address symbol Signed-off-by: Christoph Hellwig Signed-off-by: Tony Luck commit beec903f71214c0bfa555955dd548e87bfb2c623 Author: Christoph Hellwig Date: Mon Sep 17 19:10:25 2018 +0200 ia64: remove iommu_dma_supported The generic dma_direct_supported helper already used by intel-iommu on x86 does a better job than the ia64 reimplementation. Signed-off-by: Christoph Hellwig Signed-off-by: Tony Luck commit 77308e27a0592857438cfd501cce813c513043a2 Author: Christoph Hellwig Date: Mon Sep 17 19:10:24 2018 +0200 ia64: remove the dead iommu_sac_force variable Looks like copy and paste from x86 that never actually got used. Signed-off-by: Christoph Hellwig Signed-off-by: Tony Luck commit afeaade90db4c5dab93f326d9582be1d5954a198 Author: Mauro Carvalho Chehab Date: Thu Sep 13 22:46:29 2018 -0400 media: em28xx: make v4l2-compliance happier by starting sequence on zero The v4l2-compliance tool complains if a video doesn't start with a zero sequence number. While this shouldn't cause any real problem for apps, let's make it happier, in order to better check the v4l2-compliance differences before and after patchsets. This is actually an old issue. It is there since at least its videobuf2 conversion, e. g. changeset 3829fadc461 ("[media] em28xx: convert to videobuf2"), if VB1 wouldn't suffer from the same issue. Cc: stable@vger.kernel.org Fixes: d3829fadc461 ("[media] em28xx: convert to videobuf2") Signed-off-by: Mauro Carvalho Chehab commit b501fb9227cf1c56ec407eebf645befba3ae6373 Author: Christoph Hellwig Date: Mon Sep 17 19:10:23 2018 +0200 ia64: remove the kern_mem_attribute export No actually used anywhere. Signed-off-by: Christoph Hellwig Signed-off-by: Tony Luck commit 15644bfa195bd166d0a5ed76ae2d587f719c3dac Author: Mauro Carvalho Chehab Date: Fri Sep 14 00:20:21 2018 -0400 media: em28xx: fix input name for Terratec AV 350 Instead of using a register value, use an AMUX name, as otherwise VIDIOC_G_AUDIO would fail. Cc: stable@vger.kernel.org Fixes: 766ed64de554 ("V4L/DVB (11827): Add support for Terratec Grabster AV350") Signed-off-by: Mauro Carvalho Chehab commit f823ce2a1202d47110a7ef86b65839f0be8adc38 Author: Mauro Carvalho Chehab Date: Thu Sep 13 23:22:40 2018 -0400 media: em28xx: use a default format if TRY_FMT fails Follow the V4L2 spec, as warned by v4l2-compliance: warn: v4l2-test-formats.cpp(732): TRY_FMT cannot handle an invalid pixelformat. warn: v4l2-test-formats.cpp(733): This may or may not be a problem. For more information see: warn: v4l2-test-formats.cpp(734): http://www.mail-archive.com/linux-media@vger.kernel.org/msg56550.html Cc: stable@vger.kernel.org Fixes: bddcf63313c6 ("V4L/DVB (9927): em28xx: use a more standard way to specify video formats") Signed-off-by: Mauro Carvalho Chehab commit 258c430456ba5f0005043762e14fc3be35983aaf Author: Mauro Carvalho Chehab Date: Fri Sep 14 13:13:15 2018 -0400 media: em28xx: fix handler for vidioc_s_input() The a->index is not the name of the internal amux entry, but, instead a value from zero to the maximum number of audio inputs. As the actual available inputs depend on each board, build it dynamically. This is broken for a really long time. On a quick check, since at least commit 195a4ef627e1 ("V4L/DVB (6585): Convert em28xx to video_ioctl2") this was not implemented right. Fixes: 195a4ef627e1 ("V4L/DVB (6585): Convert em28xx to video_ioctl2") Cc: stable@vger.kernel.org Signed-off-by: Mauro Carvalho Chehab commit 597d18325acdb48eb516ca9ef33d5148e79ca3bb Author: Gustavo A. R. Silva Date: Thu Sep 13 14:08:15 2018 -0500 ASoC: es8328: Fix fall-through annotations Replace "fallthru" with a proper "fall through" annotation. This fix is part of the ongoing efforts to enabling -Wimplicit-fallthrough Signed-off-by: Gustavo A. R. Silva Signed-off-by: Mark Brown commit 502c00d9c3159e7dd3184b0e7c2cd0c0446d2546 Author: Randy Dunlap Date: Sun Sep 16 17:34:49 2018 -0700 Documentation: soundwire: fix stream.rst markup warnings Fix kernel-doc markup warnings in soundwire/stream.rst: rc4/Documentation/driver-api/soundwire/stream.rst:177: WARNING: Explicit markup ends without a blank line; unexpected unindent. rc4/Documentation/driver-api/soundwire/stream.rst:203: WARNING: Explicit markup ends without a blank line; unexpected unindent. rc4/Documentation/driver-api/soundwire/stream.rst:248: WARNING: Explicit markup ends without a blank line; unexpected unindent. rc4/Documentation/driver-api/soundwire/stream.rst:277: WARNING: Explicit markup ends without a blank line; unexpected unindent. rc4/Documentation/driver-api/soundwire/stream.rst:304: WARNING: Explicit markup ends without a blank line; unexpected unindent. rc4/Documentation/driver-api/soundwire/stream.rst:328: WARNING: Explicit markup ends without a blank line; unexpected unindent. rc4/Documentation/driver-api/soundwire/stream.rst:352: WARNING: Explicit markup ends without a blank line; unexpected unindent. rc4/Documentation/driver-api/soundwire/stream.rst:364: WARNING: Explicit markup ends without a blank line; unexpected unindent. Fixes: 89634f99a83e ("Documentation: soundwire: Add more documentation") Signed-off-by: Randy Dunlap Reviewed-by: Takashi Sakamoto Tested-by: Takashi Sakamoto Signed-off-by: Vinod Koul commit ce5b127b172eac8adc5cb386dc19cf58acf5536c Merge: 75b2c206bb10 500abbf04029 Author: David S. Miller Date: Mon Sep 17 09:10:26 2018 -0700 Merge branch 's390-qeth-next' Julian Wiedmann says: ==================== s390/qeth: updates 2018-09-17 please apply the following patchset to net-next. This brings more restructuring of qeth's transmit code (eliminating its last usage of skb_realloc_headroom()), and the usual mix of minor improvements & cleanups. ==================== Signed-off-by: David S. Miller commit 500abbf040298b1fcec5e261d31f0f77c55b5269 Author: Julian Wiedmann Date: Mon Sep 17 17:36:09 2018 +0200 s390/qeth: reduce 0-initializing when building IPA cmds qeth_get_ipacmd_buffer() obtains its buffers for building IPA cmds from __qeth_get_buffer(), where they are fully cleared. So get rid of all the additional zero-ing in various other places. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit ed47155bdcf38ff5a0f419b7a833dcbe49cb8abc Author: Julian Wiedmann Date: Mon Sep 17 17:36:08 2018 +0200 s390/qeth: fine-tune spinlocks For quite a lot of code paths it's obvious that they will never run in IRQ context. So replace their spin_lock_irqsave() calls with spin_lock_irq(). While at it, get rid of the redundant card pointer in struct qeth_reply that was used by qeth_send_control_data() to access the card's lock. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit 31c92732cdf22fc5ac6807be34fddec1ca9b30ac Author: Julian Wiedmann Date: Mon Sep 17 17:36:07 2018 +0200 s390/qeth: fix typo in return value Assuming this was just a typo, as returning an actual negative value from a cmd callback would make no sense either. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit 4d19db777a2f32c9b76f6fd517ed8960576cb43e Author: Julian Wiedmann Date: Mon Sep 17 17:36:06 2018 +0200 s390/qeth: invoke softirqs after napi_schedule() Calling napi_schedule() from process context does not ensure that the NET_RX softirq is run in a timely fashion. So trigger it manually. This is no big issue with current code. A call to ndo_open() is usually followed by a ndo_set_rx_mode() call, and for qeth this contains a spin_unlock_bh(). Except for OSN, where qeth_l2_set_rx_mode() bails out early. Nevertheless it's best to not depend on this behaviour, and just fix the issue at its source like all other drivers do. For instance see commit 83a0c6e58901 ("i40e: Invoke softirqs after napi_reschedule"). Fixes: a1c3ed4c9ca0 ("qeth: NAPI support for l2 and l3 discipline") Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit 121ca39aa5585def682a2c8592983442438b84dc Author: Julian Wiedmann Date: Mon Sep 17 17:36:05 2018 +0200 s390/qeth: uninstall IRQ handler on device removal When setting up, qeth installs its IRQ handler on the ccw devices. But the IRQ handler is not cleared on removal - so even after qeth yields control of the ccw devices, spurious interrupts would still be presented to us. Make (de-)installation of the IRQ handler part of the ccw channel setup/removal helpers, and while at it also add the appropriate locking. Shift around qeth_setup_channel() to avoid a forward declaration for qeth_irq(). Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit 69d7ce80df6d0d2fdbb8f0ff9ec4643aabfa6b99 Author: Julian Wiedmann Date: Mon Sep 17 17:36:04 2018 +0200 s390/qeth: remove qeth_hdr_chk_and_bounce() Restructure the OSN xmit path to handle misaligned HW headers properly, without shifting the packet data around. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit 356156b60affae4372ed9d3dc8936ff22e8849b0 Author: Julian Wiedmann Date: Mon Sep 17 17:36:03 2018 +0200 s390/qeth: speed up TSO transmission Switch TSO over to the faster transmit path, and remove all the unused old TSO code. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit e517b649b3c311a8a828b4ee3353bc713e0d5ef0 Author: Julian Wiedmann Date: Mon Sep 17 17:36:02 2018 +0200 s390/qeth: prepare for copy-free TSO transmission Add all the necessary TSO plumbing to the copy-less transmit path. This includes calculating the right length of required protocol headers, and always building a separate buffer element for the TSO headers. A follow-up patch will then switch TSO traffic over to this path. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit 554942646653c913268da8a7ec02724afe1166cb Author: Julian Wiedmann Date: Mon Sep 17 17:36:01 2018 +0200 s390/qeth: check size of required HW header cache object When qeth_add_hw_header() falls back to the header cache, ensure that the requested length doesn't exceed the object size. For current usage this is a no-brainer, but TSO transmission will introduce protocol headers of varying length. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit 2d3986d1ceda2c00255c924940207a1cdfd65f1c Author: Julian Wiedmann Date: Mon Sep 17 17:36:00 2018 +0200 s390/qeth: fix up protocol headers early When qeth_add_hw_header() falls back to the HW header cache, it also copies over the necessary protocol headers. Thus any manipulation to the protocol headers needs to happen before adding the HW header. For current usage this doesn't matter, but it becomes relevant when moving TSO transmission over to the faster code path. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit f231dc9dbd789b0f98a15941e3cebedb4ad72ad5 Author: Julian Wiedmann Date: Mon Sep 17 17:35:59 2018 +0200 s390/qeth: limit csum offload erratum to L3 devices Combined L3+L4 csum offload is only required for some L3 HW. So for L2 devices, don't offload the IP header csum calculation. Signed-off-by: Julian Wiedmann Reference-ID: JUP 394553 Signed-off-by: David S. Miller commit 40e6a2258492ee7082294be85eaca2b074241f23 Author: Julian Wiedmann Date: Mon Sep 17 17:35:58 2018 +0200 s390/qeth: remove qeth_get_elements_no() Convert the last remaining user of qeth_get_elements_no() to qeth_count_elements(), so this helper can be removed. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit 0a6da4b10d9c263586975dabdbf3aedd12e76a11 Author: Julian Wiedmann Date: Mon Sep 17 17:35:57 2018 +0200 s390/qeth: remove unused L3 xmit code qeth_l3_xmit() is now only used for TSOv4 traffic, shrink it down. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit f13ade199391a72f144b9464a66c69ecfa6ca432 Author: Julian Wiedmann Date: Mon Sep 17 17:35:56 2018 +0200 s390/qeth: run non-offload L3 traffic over common xmit path L3 OSAs can only offload IPv4 traffic, use the common L2 transmit path for all other traffic. In particular there's no support for TX VLAN offload, so any such packet needs to be manually de-accelerated via ndo_features_check(). Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit fc69660bbdb225ae9f18ca2f509b1a5ac49f8fae Author: Julian Wiedmann Date: Mon Sep 17 17:35:55 2018 +0200 s390/qeth: move L2 xmit code to core module We need the exact same transmit path for non-offload-eligible traffic on L3 OSAs. So make it accessible from both sub-drivers. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit 2abfb31410fa9e742b333b907a1ed86c4aa1ff63 Author: Linus Walleij Date: Wed Sep 12 13:15:50 2018 +0200 gpio: vr41xx: Cut down on boilerplate This switches this file to use the SPDX license tag. Cc: Yoichi Yuasa Signed-off-by: Linus Walleij commit 3b3001cacdf4c95d611657c61e194f1da3c577f5 Author: Linus Walleij Date: Wed Sep 12 13:14:33 2018 +0200 gpio: vr41xx: Include the right header This is a GPIO driver so include only . Cc: Yoichi Yuasa Signed-off-by: Linus Walleij commit 171948ea33e14dd1e49ba6439eabe822449ffd21 Author: Hans Verkuil Date: Fri Sep 14 10:36:39 2018 +0200 gpiolib: check if irqchip already has the irq hook replacements Some drivers use a single irqchip for multiple gpiochips. As a result the irqchip hooks are overridden for the first gpiochip that was added, but for the other gpiochip instances this should not happen again, otherwise we would go into an infinite recursion. Check for this, but also log a message that the driver should be fixed since this is bad practice. Signed-off-by: Hans Verkuil Tested-by: Heikki Krogerus Signed-off-by: Linus Walleij commit 75b2c206bb10961879912bd6a4199bf4dfa6eda2 Author: Weilin Chang Date: Sun Sep 16 22:43:32 2018 -0700 liquidio: Add the features to show FEC settings and set FEC settings 1. Add functions for get_fecparam and set_fecparam. 2. Modify lio_get_link_ksettings to display FEC setting. Signed-off-by: Weilin Chang Acked-by: Derek Chickles Signed-off-by: Felix Manlunas Signed-off-by: David S. Miller commit a4ebec033e1cff2690806c1721189c51b1cd0ae5 Author: zhong jiang Date: Sun Sep 16 21:13:42 2018 +0800 net: ethernet: remove redundant null pointer check before of_node_put of_node_put has taken the null pointer check into account. So it is safe to remove the duplicated check before of_node_put. Signed-off-by: zhong jiang Reviewed-by: Vladimir Zapolskiy Acked-by: Fugang Duan Signed-off-by: David S. Miller commit b458925ed5797a20f22cdf005625e25106cf7124 Author: zhong jiang Date: Sun Sep 16 21:45:02 2018 +0800 net: dsa: remove redundant null pointer check before put_device put_device has taken the null pinter check into account. So it is safe to remove the duplicated check before put_device. Signed-off-by: zhong jiang Signed-off-by: David S. Miller commit 1ddc5d3e5f1cf9ac8a6aad00b95a7a022e634ef4 Author: zhong jiang Date: Sun Sep 16 21:22:31 2018 +0800 net: dsa: remove redundant null pointer check before of_node_put of_node_put has taken the null pointer check into account. So it is safe to remove the duplicated check before of_node_put. Signed-off-by: zhong jiang Signed-off-by: David S. Miller commit 764ea3714a85bfc0e3e470cee2166b6ef911b9b9 Author: zhong jiang Date: Sun Sep 16 21:20:17 2018 +0800 net: usb: remove redundant null pointer check before of_node_put of_node_put has taken the null pointer check into account. So it is safe to remove the duplicated check before of_node_put. Signed-off-by: zhong jiang Signed-off-by: David S. Miller commit 1635bb548f846804af3054872fbd1395783ac03e Author: Zhu Yanjun Date: Sun Sep 16 22:49:30 2018 -0400 net: rds: use memset to optimize the recv The function rds_inc_init is in recv process. To use memset can optimize the function rds_inc_init. The test result: Before: 1) + 24.950 us | rds_inc_init [rds](); After: 1) + 10.990 us | rds_inc_init [rds](); Acked-by: Santosh Shilimkar Signed-off-by: Zhu Yanjun Signed-off-by: David S. Miller commit 0185e2e69f8e640defb77380b6b0d054c2ec12e4 Author: Vakul Garg Date: Sun Sep 16 10:04:28 2018 +0530 selftests/tls: Add MSG_WAITALL in recv() syscall A number of tls selftests rely upon recv() to return an exact number of data bytes. When tls record crypto is done using an async accelerator, it is possible that recv() returns lesser than expected number bytes. This leads to failure of many test cases. To fix it, MSG_WAITALL has been used in flags passed to recv() syscall. Signed-off-by: Vakul Garg Signed-off-by: David S. Miller commit 6f9dbadc1ac6a5b0e0dde915771d0d838628d19e Author: Friedemann Gerold Date: Sat Sep 15 18:03:39 2018 +0300 net: aquantia: memory corruption on jumbo frames This patch fixes skb_shared area, which will be corrupted upon reception of 4K jumbo packets. Originally build_skb usage purpose was to reuse page for skb to eliminate needs of extra fragments. But that logic does not take into account that skb_shared_info should be reserved at the end of skb data area. In case packet data consumes all the page (4K), skb_shinfo location overflows the page. As a consequence, __build_skb zeroed shinfo data above the allocated page, corrupting next page. The issue is rarely seen in real life because jumbo are normally larger than 4K and that causes another code path to trigger. But it 100% reproducible with simple scapy packet, like: sendp(IP(dst="192.168.100.3") / TCP(dport=443) \ / Raw(RandString(size=(4096-40))), iface="enp1s0") Fixes: 018423e90bee ("net: ethernet: aquantia: Add ring support code") Reported-by: Friedemann Gerold Reported-by: Michael Rauch Signed-off-by: Friedemann Gerold Tested-by: Nikita Danilov Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit d10f7e1d9e60796a38a1f3b6689ac0b4b0b07799 Merge: 0a959e45846a 711ddb625cf0 Author: David S. Miller Date: Mon Sep 17 08:12:12 2018 -0700 Merge branch 'lantiq-Minor-fixes-for-vrx200-and-gswip' Hauke Mehrtens says: ==================== net: lantiq: Minor fixes for vrx200 and gswip These are mostly minor fixes to problems addresses in the latests round of the review of the original series adding these driver, which were not applied before the patches got merged into net-next. In addition it fixes a data bus error on poweroff. ==================== Signed-off-by: David S. Miller commit 711ddb625cf051ef980766b0f8887db93274a4f4 Author: Hauke Mehrtens Date: Sat Sep 15 14:08:49 2018 +0200 net: dsa: tag_gswip: Add gswip to dsa_tag_protocol_to_str() The gswip tag was missing in the dsa_tag_protocol_to_str() function, add it. Fixes: 7969119293f5 ("net: dsa: Add Lantiq / Intel GSWIP tag support") Signed-off-by: Hauke Mehrtens Signed-off-by: David S. Miller commit 0e630b598e87440d95e45289d24e878156bcec00 Author: Hauke Mehrtens Date: Sat Sep 15 14:08:48 2018 +0200 net: dsa: lantiq_gswip: Minor code style improvements Use one code block when returning because the interface type is unsupported and also check if some unsupported port gets configured. In addition fix a double the and use dsa_is_cpu_port() instated of manually getting the CPU port. Signed-off-by: Hauke Mehrtens Signed-off-by: David S. Miller commit a44ecfbda48f1ddc52e6119f594e3711c1b39924 Author: Hauke Mehrtens Date: Sat Sep 15 14:08:47 2018 +0200 net: lantiq: lantiq_xrx200: Move clock prepare to probe function The switch and the MAC are in one IP core and they use the same clock signal from the clock generation unit. Currently the clock architecture in the lantiq SoC code does not allow to easily share the same clocks, this has to be fixed by switching to the common clock framework. As a workaround the clock of the switch and MAC should be activated when the MAC gets probed and only disabled when the MAC gets removed. This way it is ensured that the clock is always enabled when the switch or MAC is used. The switch can not be used without the MAC. This fixes a data bus error when rebooting the system and deactivating the switch and mac and later accessing some registers in the cleanup while the clocks are disabled. Fixes: fe1a56420cf2 ("net: lantiq: Add Lantiq / Intel VRX200 Ethernet driver") Signed-off-by: Hauke Mehrtens Signed-off-by: David S. Miller commit e82b5fe5d480657dee83a7674caf5bf90bdb4fbd Author: Hauke Mehrtens Date: Sat Sep 15 14:08:46 2018 +0200 dt-bindings: net: dsa: lantiq, xrx200-gswip: Fix minor style fixes * Use one compatible line per line in the documentation * Remove SoC revision depended compatible lines, we can detect that in the driver * Use lower case letters in hex addresses * Fix the size of the address ranges in the example, this now matches the sizes used by the SoC. The old ones will also work, this just adds some empty address space. * Change the reg size of the gphy-fw node Fixes: 86ce2bc73c7a ("dt-bindings: net: dsa: Add lantiq, xrx200-gswip DT bindings") Signed-off-by: Hauke Mehrtens Cc: devicetree@vger.kernel.org Signed-off-by: David S. Miller commit d52030e6d58431eb6c94f4dca62ded1a53cd45a2 Author: Hauke Mehrtens Date: Sat Sep 15 14:08:45 2018 +0200 dt-bindings: net: lantiq, xrx200-net: Use lower case in hex Use lower case letters in the addresses of the device tree binding. In addition replace eth with ethernet and fix the size of the reg element in the example. The additional range does not contain any registers but is used for the IP block on the this SoC. Fixes: 839790e88a3c ("dt-bindings: net: Add lantiq, xrx200-net DT bindings") Signed-off-by: Hauke Mehrtens Cc: devicetree@vger.kernel.org Signed-off-by: David S. Miller commit 20373e0cb8f7d540ae082a8026f5ae7c27cc6cb3 Author: Dinh Nguyen Date: Mon Sep 10 09:12:08 2018 -0500 ARM: dts: socfpga: add timer resets for SoCFPGA platform Add the resets property for all the timers on the Cyclone5/Arria5/Arria10 platforms. Signed-off-by: Marek Vasut Signed-off-by: Dinh Nguyen commit 0a959e45846ad697c54f0d2bd71fa55bdd1a8a39 Author: Wei Yongjun Date: Sat Sep 15 01:42:09 2018 +0000 net: hns: make function hns_gmac_wait_fifo_clean() static Fixes the following sparse warning: drivers/net/ethernet/hisilicon/hns/hns_dsaf_gmac.c:322:5: warning: symbol 'hns_gmac_wait_fifo_clean' was not declared. Should it be static? Signed-off-by: Wei Yongjun Signed-off-by: David S. Miller commit b8b2de91e9dbb89bf4c34a860b04e53a1b1416bf Author: Wei Yongjun Date: Sat Sep 15 01:33:50 2018 +0000 net: lantiq: Fix return value check in xrx200_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: fe1a56420cf2 ("net: lantiq: Add Lantiq / Intel VRX200 Ethernet driver") Signed-off-by: Wei Yongjun Acked-by: Hauke Mehrtens Signed-off-by: David S. Miller commit f592e0b9895cd6f04ba2771a3903317dd7c1ba31 Author: Wei Yongjun Date: Sat Sep 15 01:33:38 2018 +0000 net: dsa: gswip: Fix copy-paste error in gswip_gphy_fw_probe() The return value from of_reset_control_array_get_exclusive() is not checked correctly. The test is done against a wrong variable. This patch fix it. Fixes: 14fceff4771e ("net: dsa: Add Lantiq / Intel DSA driver for vrx200") Signed-off-by: Wei Yongjun Acked-by: Hauke Mehrtens Signed-off-by: David S. Miller commit f5de8bfef85b5caca444bf522411d9c8f9335e55 Author: Wei Yongjun Date: Sat Sep 15 01:33:21 2018 +0000 net: dsa: gswip: Fix return value check in gswip_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: 14fceff4771e ("net: dsa: Add Lantiq / Intel DSA driver for vrx200") Signed-off-by: Wei Yongjun Acked-by: Hauke Mehrtens Signed-off-by: David S. Miller commit 7a3dd8c8979ce48b99cb0e9b7435a97f0716138a Author: John Fastabend Date: Fri Sep 14 13:01:46 2018 -0700 tls: async support causes out-of-bounds access in crypto APIs When async support was added it needed to access the sk from the async callback to report errors up the stack. The patch tried to use space after the aead request struct by directly setting the reqsize field in aead_request. This is an internal field that should not be used outside the crypto APIs. It is used by the crypto code to define extra space for private structures used in the crypto context. Users of the API then use crypto_aead_reqsize() and add the returned amount of bytes to the end of the request memory allocation before posting the request to encrypt/decrypt APIs. So this breaks (with general protection fault and KASAN error, if enabled) because the request sent to decrypt is shorter than required causing the crypto API out-of-bounds errors. Also it seems unlikely the sk is even valid by the time it gets to the callback because of memset in crypto layer. Anyways, fix this by holding the sk in the skb->sk field when the callback is set up and because the skb is already passed through to the callback handler via void* we can access it in the handler. Then in the handler we need to be careful to NULL the pointer again before kfree_skb. I added comments on both the setup (in tls_do_decryption) and when we clear it from the crypto callback handler tls_decrypt_done(). After this selftests pass again and fixes KASAN errors/warnings. Fixes: 94524d8fc965 ("net/tls: Add support for async decryption of tls records") Signed-off-by: John Fastabend Reviewed-by: Vakul Garg Signed-off-by: David S. Miller commit 43e2f2904160b9a95aad77df9cbc1622910b8598 Merge: cf5652c962da 3341ba9f0f26 Author: Kalle Valo Date: Mon Sep 17 17:41:02 2018 +0300 Merge wireless-drivers into wireless-drivers-next Solve the conflict in main.c early on as there will be a lot more mt76 patches in the queue. commit c8204cab9cb503bede29938785b3cdf26a275fa2 Author: Taehee Yoo Date: Wed Sep 12 00:20:43 2018 +0900 netfilter: nat: remove unnecessary rcu_read_lock in nf_nat_redirect_ipv{4/6} nf_nat_redirect_ipv4() and nf_nat_redirect_ipv6() are only called by netfilter hook point. so that rcu_read_lock and rcu_read_unlock() are unnecessary. Signed-off-by: Taehee Yoo Signed-off-by: Pablo Neira Ayuso commit 4430b897a2063c44462e8cea3293ebb5851d9cfd Author: Pablo Neira Ayuso Date: Tue Sep 11 02:31:11 2018 +0200 netfilter: cttimeout: remove superfluous check on layer 4 netlink functions We assume they are always set accordingly since a874752a10da ("netfilter: conntrack: timeout interface depend on CONFIG_NF_CONNTRACK_TIMEOUT"), so we can get rid of this checks. Signed-off-by: Pablo Neira Ayuso commit 7052ba408019e49301a6ebec9866046838a5b1e2 Author: Florian Westphal Date: Fri Sep 7 13:02:24 2018 +0200 netfilter: nf_nat_ipv4: remove obsolete EXPORT_SYMBOL There are no external callers anymore, previous change just forgot to also remove the EXPORT_SYMBOL(). Fixes: 9971a514ed269 ("netfilter: nf_nat: add nat type hooks to nat core") Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 70c0eb1ca016f7b6be6cd2a47efc4c701ce4488f Author: Florian Westphal Date: Tue Sep 4 16:01:57 2018 +0200 netfilter: xtables: avoid BUG_ON I see no reason for them, label or timer cannot be NULL, and if they were, we'll crash with null deref anyway. For skb_header_pointer failure, just set hotdrop to true and toss such packet. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit fa5950e498e7face21a1761f327e6c1152f778c3 Author: Florian Westphal Date: Tue Sep 4 16:01:47 2018 +0200 netfilter: nf_tables: avoid BUG_ON usage None of these spots really needs to crash the kernel. In one two cases we can jsut report error to userspace, in the other cases we can just use WARN_ON (and leak memory instead). Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 0d704967f4a49cc2212350b3e4a8231f8b4283ed Author: Pablo Neira Ayuso Date: Tue Sep 4 12:07:55 2018 +0200 netfilter: xt_cgroup: shrink size of v2 path cgroup v2 path field is PATH_MAX which is too large, this is placing too much pressure on memory allocation for people with many rules doing cgroup v1 classid matching, side effects of this are bug reports like: https://bugzilla.kernel.org/show_bug.cgi?id=200639 This patch registers a new revision that shrinks the cgroup path to 512 bytes, which is the same approach we follow in similar extensions that have a path field. Cc: Tejun Heo Signed-off-by: Pablo Neira Ayuso Acked-by: Tejun Heo commit 74e248286e1d04b0d9bfdd002450ef0211f6f29f Author: Suzuki K Poulose Date: Sun Sep 16 23:17:23 2018 +0100 arm64: sysreg: Clean up instructions for modifying PSTATE fields Instructions for modifying the PSTATE fields which were not supported in the older toolchains (e.g, PAN, UAO) are generated using macros. We have so far used the normal sys_reg() helper for defining the PSTATE fields. While this works fine, it is really difficult to correlate the code with the Arm ARM definition. As per Arm ARM, the PSTATE fields are defined only using Op1, Op2 fields, with fixed values for Op0, CRn. Also the CRm field has been reserved for the Immediate value for the instruction. So using the sys_reg() looks quite confusing. This patch cleans up the instruction helpers by bringing them in line with the Arm ARM definitions to make it easier to correlate code with the document. No functional changes. Cc: Will Deacon Cc: Mark Rutland Signed-off-by: Suzuki K Poulose Signed-off-by: Catalin Marinas commit 5c4c4505b716cb782ad7263091edc466c4d1fbd4 Author: Mauro Carvalho Chehab Date: Thu Sep 13 16:49:51 2018 -0400 media: tvp5150: avoid going past array on v4l2_querymenu() The parameters of v4l2_ctrl_new_std_menu_items() are tricky: instead of the number of possible values, it requires the number of the maximum value. In other words, the ARRAY_SIZE() value should be decremented, otherwise it will go past the array bounds, as warned by KASAN: [ 279.839688] BUG: KASAN: global-out-of-bounds in v4l2_querymenu+0x10d/0x180 [videodev] [ 279.839709] Read of size 8 at addr ffffffffc10a4cb0 by task v4l2-compliance/16676 [ 279.839736] CPU: 1 PID: 16676 Comm: v4l2-compliance Not tainted 4.18.0-rc2+ #120 [ 279.839741] Hardware name: /NUC5i7RYB, BIOS RYBDWi35.86A.0364.2017.0511.0949 05/11/2017 [ 279.839743] Call Trace: [ 279.839758] dump_stack+0x71/0xab [ 279.839807] ? v4l2_querymenu+0x10d/0x180 [videodev] [ 279.839817] print_address_description+0x1c9/0x270 [ 279.839863] ? v4l2_querymenu+0x10d/0x180 [videodev] [ 279.839871] kasan_report+0x237/0x360 [ 279.839918] v4l2_querymenu+0x10d/0x180 [videodev] [ 279.839964] __video_do_ioctl+0x2c8/0x590 [videodev] [ 279.840011] ? copy_overflow+0x20/0x20 [videodev] [ 279.840020] ? avc_ss_reset+0xa0/0xa0 [ 279.840028] ? check_stack_object+0x21/0x60 [ 279.840036] ? __check_object_size+0xe7/0x240 [ 279.840080] video_usercopy+0xed/0x730 [videodev] [ 279.840123] ? copy_overflow+0x20/0x20 [videodev] [ 279.840167] ? v4l_enumstd+0x40/0x40 [videodev] [ 279.840177] ? __handle_mm_fault+0x9f9/0x1ba0 [ 279.840186] ? __pmd_alloc+0x2c0/0x2c0 [ 279.840193] ? __vfs_write+0xb6/0x350 [ 279.840200] ? kernel_read+0xa0/0xa0 [ 279.840244] ? video_usercopy+0x730/0x730 [videodev] [ 279.840284] v4l2_ioctl+0xa1/0xb0 [videodev] [ 279.840295] do_vfs_ioctl+0x117/0x8a0 [ 279.840303] ? selinux_file_ioctl+0x211/0x2f0 [ 279.840313] ? ioctl_preallocate+0x120/0x120 [ 279.840319] ? selinux_capable+0x20/0x20 [ 279.840332] ksys_ioctl+0x70/0x80 [ 279.840342] __x64_sys_ioctl+0x3d/0x50 [ 279.840351] do_syscall_64+0x6d/0x1c0 [ 279.840361] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [ 279.840367] RIP: 0033:0x7fdfb46275d7 [ 279.840369] 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 [ 279.840474] RSP: 002b:00007ffee1179038 EFLAGS: 00000202 ORIG_RAX: 0000000000000010 [ 279.840483] RAX: ffffffffffffffda RBX: 00007ffee1179180 RCX: 00007fdfb46275d7 [ 279.840488] RDX: 00007ffee11790c0 RSI: 00000000c02c5625 RDI: 0000000000000003 [ 279.840493] RBP: 0000000000000002 R08: 0000000000000020 R09: 00000000009f0902 [ 279.840497] R10: 0000000000000000 R11: 0000000000000202 R12: 00007ffee117a5a0 [ 279.840501] R13: 00007ffee11790c0 R14: 0000000000000002 R15: 0000000000000000 [ 279.840515] The buggy address belongs to the variable: [ 279.840535] tvp5150_test_patterns+0x10/0xffffffffffffe360 [tvp5150] Fixes: c43875f66140 ("[media] tvp5150: replace MEDIA_ENT_F_CONN_TEST by a control") Cc: stable@vger.kernel.org Signed-off-by: Mauro Carvalho Chehab commit d1e1303173d7fe3c107a85805a62c13e760f2da4 Author: Biju Das Date: Tue Sep 11 11:12:51 2018 +0100 cpufreq: dt: Add support for r8a7744 Add the compatible strings for supporting the generic cpufreq driver on the Renesas RZ/G1N (R8A7744) SoC. Signed-off-by: Biju Das Reviewed-by: Fabrizio Castro Acked-by: Viresh Kumar Reviewed-by: Simon Horman Reviewed-by: Geert Uytterhoeven Signed-off-by: Rafael J. Wysocki commit be54c1216f6689a6eb504e3471d0cb41cc9d9809 Author: Anton Blanchard Date: Tue Aug 21 11:04:12 2018 +1000 powerpc/64: Remove static branch hints from memset() Static branch hints override dynamic branch prediction on recent POWER CPUs. We should only use them when we are overwhelmingly sure of the direction. Signed-off-by: Anton Blanchard Signed-off-by: Michael Ellerman commit ba2dd8a26baa7e140555746d396e32952709c42d Author: Laurent Dufour Date: Mon Aug 20 16:29:36 2018 +0200 powerpc/pseries/mm: call H_BLOCK_REMOVE This hypervisor's call allows to remove up to 8 ptes with only call to tlbie. The virtual pages must be all within the same naturally aligned 8 pages virtual address block and have the same page and segment size encodings. Cc: "Aneesh Kumar K.V" Cc: Nicholas Piggin Cc: Michael Ellerman Cc: Paul Mackerras Cc: Benjamin Herrenschmidt Signed-off-by: Laurent Dufour Signed-off-by: Michael Ellerman commit 0effa488dc1ad082ceed44b5d38c29fd8b3f259e Author: Laurent Dufour Date: Mon Aug 20 16:29:35 2018 +0200 powerpc/pseries/mm: factorize PTE slot computation This part of code will be called also when dealing with H_BLOCK_REMOVE. Cc: "Aneesh Kumar K.V" Cc: Nicholas Piggin Cc: Michael Ellerman Cc: Paul Mackerras Cc: Benjamin Herrenschmidt Reviewed-by: Aneesh Kumar K.V Signed-off-by: Laurent Dufour Signed-off-by: Michael Ellerman commit 5600fbe340331e2a25d1b277f9c190f5c9948038 Author: Laurent Dufour Date: Mon Aug 20 16:29:34 2018 +0200 powerpc/pseries/mm: Introducing FW_FEATURE_BLOCK_REMOVE This feature tells if the hcall H_BLOCK_REMOVE is available. Cc: "Aneesh Kumar K.V" Cc: Nicholas Piggin Cc: Michael Ellerman Cc: Paul Mackerras Cc: Benjamin Herrenschmidt Reviewed-by: Aneesh Kumar K.V Signed-off-by: Laurent Dufour Signed-off-by: Michael Ellerman commit 96695563cebfb810b09479a9951ebbc466fa4c68 Author: Breno Leitao Date: Mon Jun 18 19:59:42 2018 -0300 powerpc/tm: Fix HTM documentation This patch simply fix part of the documentation on the HTM code. This fixes reference to old fields that were renamed in commit 000ec280e3dd ("powerpc: tm: Rename transct_(*) to ck(\1)_state") It also documents better the flow after commit eb5c3f1c8647 ("powerpc: Always save/restore checkpointed regs during treclaim/trecheckpoint"), where tm_recheckpoint can recheckpoint what is in ck{fp,vr}_state blindly. Signed-off-by: Breno Leitao Acked-by: Michael Neuling Signed-off-by: Michael Ellerman commit 693b31b2fc1636f0aa7af53136d3b49f6ad9ff39 Author: Breno Leitao Date: Tue Jul 31 17:55:57 2018 -0300 powerpc/selftests: Wait all threads to join Test tm-tmspr might exit before all threads stop executing, because it just waits for the very last thread to join before proceeding/exiting. This patch makes sure that all threads that were created will join before proceeding/exiting. This patch also guarantees that the amount of threads being created is equal to thread_num. Signed-off-by: Breno Leitao Signed-off-by: Michael Ellerman commit b0dc0f8618e87f1b2c7f04b977fda16e961bbec1 Author: Joel Stanley Date: Tue Aug 21 11:44:28 2018 +0930 powerpc/powernv: Don't select the cpufreq governors Deciding wich govenors should be built into the kernel can be left to users to configure. Fixes: 81f359027a3a ("cpufreq: powernv: Select CPUFreq related Kconfig options for powernv") Signed-off-by: Joel Stanley [mpe: Update powernv/ppc64 defconfigs to enable them by default] Signed-off-by: Michael Ellerman commit 59c08c69c2788612f1afd199c5c87d9df8b8a356 Author: Kristian Evensen Date: Mon Sep 3 18:28:20 2018 +0200 netfilter: ctnetlink: Support L3 protocol-filter on flush The same connection mark can be set on flows belonging to different address families. This commit adds support for filtering on the L3 protocol when flushing connection track entries. If no protocol is specified, then all L3 protocols match. In order to avoid code duplication and a redundant check, the protocol comparison in ctnetlink_dump_table() has been removed. Instead, a filter is created if the GET-message triggering the dump contains an address family. ctnetlink_filter_match() is then used to compare the L3 protocols. Signed-off-by: Kristian Evensen Signed-off-by: Pablo Neira Ayuso commit 6c47260250fc6114ce2012db13e1cd3938a27b73 Author: Florian Westphal Date: Mon Sep 3 18:09:40 2018 +0200 netfilter: nf_tables: add xfrm expression supports fetching saddr/daddr of tunnel mode states, request id and spi. If direction is 'in', use inbound skb secpath, else dst->xfrm. Joint work with Máté Eckl. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 2953d80ff04862b26a2e628fb3948868f54d753d Author: Florian Westphal Date: Fri Aug 31 20:29:37 2018 +0200 netfilter: remove obsolete need_conntrack stub as of a0ae2562c6c4b27 ("netfilter: conntrack: remove l3proto abstraction") there are no users anymore. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 0935d558840099b3679c67bb7468dc78fcbad940 Author: Florian Westphal Date: Wed Aug 29 14:41:32 2018 +0200 netfilter: nf_tables: asynchronous release Release the committed transaction log from a work queue, moving expensive synchronize_rcu out of the locked section and providing opportunity to batch this. On my test machine this cuts runtime of nft-test.py in half. Based on earlier patch from Pablo Neira Ayuso. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 0ef235c71755c5f36c50282fcf2d7d08709be344 Author: Florian Westphal Date: Thu Aug 30 10:42:55 2018 +0200 netfilter: nf_tables: warn when expr implements only one of activate/deactivate ->destroy is only allowed to free data, or do other cleanups that do not have side effects on other state, such as visibility to other netlink requests. Such things need to be done in ->deactivate. As a transaction can fail, we need to make sure we can undo such operations, therefore ->activate() has to be provided too. So print a warning and refuse registration if expr->ops provides only one of the two operations. v2: fix nft_expr_check_ops to not repeat same check twice (Jones Desougi) Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 86b62e5cd8965d3056f9e9ccdec51631c37add81 Author: Hans de Goede Date: Sat Sep 8 20:08:13 2018 +0200 ACPI / LPSS: Exclude I2C busses shared with PUNIT from pmc_atom_d3_mask lpss_iosf_enter_d3_state() checks if all hw-blocks using the DMA controllers are in d3 before powering down the DMA controllers. But on devices, where the I2C bus connected to the PMIC is shared by the PUNIT, the controller for that bus will never reach d3 since it has an effectively empty _PS3 method. Instead it appears to automatically power-down during S0i3 and we never see it as being in d3. This causes the DMA controllers to never be powered-down on these devices, causing them to never reach S0i3. This commit uses the ACPI _SEM method to detect if an I2C bus is shared with the PUNIT and if it is, it removes it from the mask of devices which lpss_iosf_enter_d3_state() checks for. This fixes these devices never reaching any S0ix states. Signed-off-by: Hans de Goede Acked-by: Mika Westerberg Signed-off-by: Rafael J. Wysocki commit cd5125d8f51882279f50506bb9c7e5e89dc9bef3 Author: Florian Westphal Date: Wed Aug 29 14:41:30 2018 +0200 netfilter: nf_tables: split set destruction in deactivate and destroy phase Splits unbind_set into destroy_set and unbinding operation. Unbinding removes set from lists (so new transaction would not find it anymore) but keeps memory allocated (so packet path continues to work). Rebind function is added to allow unrolling in case transaction that wants to remove set is aborted. Destroy function is added to free the memory, but this could occur outside of transaction in the future. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 02b408fae3d5552d10d1189fc0bd7e5b1e76af71 Author: Florian Westphal Date: Wed Aug 29 00:19:00 2018 +0200 netfilter: nf_tables: rt: allow checking if dst has xfrm attached Useful e.g. to avoid NATting inner headers of to-be-encrypted packets. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit bc8871536246e489407a7114a597c0a2a72de895 Author: Biju Das Date: Tue Sep 11 11:12:50 2018 +0100 ARM: shmobile: r8a7744: Basic SoC support Add minimal support for the RZ/G1N (R8A7744) SoC. Signed-off-by: Biju Das Reviewed-by: Fabrizio Castro Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit 547276c6799913898550a9c4806310d590a3cb9e Author: Biju Das Date: Tue Sep 11 11:12:46 2018 +0100 soc: renesas: rcar-rst: Add support for RZ/G1N Signed-off-by: Biju Das Reviewed-by: Fabrizio Castro Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit f1ae799039bfd3fcc046041714eb0ac227505d0f Author: Biju Das Date: Tue Sep 11 11:12:45 2018 +0100 dt-bindings: reset: rcar-rst: Document r8a7744 reset module Document bindings for the RZ/G1N (R8A7744) reset module. Signed-off-by: Biju Das Reviewed-by: Fabrizio Castro Reviewed-by: Geert Uytterhoeven Reviewed-by: Rob Herring Signed-off-by: Simon Horman commit c3299eb2770b43471516666bd20f78ed5588f868 Author: Biju Das Date: Tue Sep 11 11:12:44 2018 +0100 soc: renesas: rcar-sysc: Add r8a7744 support Add support for RZ/G1N (R8A7744) SoC power areas to the R-Car SYSC driver. Signed-off-by: Biju Das Reviewed-by: Fabrizio Castro Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit 841e37a5cad3976a15b531e512076a05b6045b4b Author: Biju Das Date: Tue Sep 11 11:12:43 2018 +0100 dt-bindings: power: rcar-sysc: Add r8a7744 power domain index macros Add power domain indices for RZ/G1N (R8A7744) SoC. Signed-off-by: Biju Das Reviewed-by: Fabrizio Castro Reviewed-by: Geert Uytterhoeven Reviewed-by: Rob Herring Signed-off-by: Simon Horman commit 08ea4a3004da9dfbf361f6791934af58a35ec350 Author: Biju Das Date: Tue Sep 11 11:12:42 2018 +0100 dt-bindings: power: rcar-sysc: Document r8a7744 SYSC binding Add binding documentation for the RZ/G1N (R8A7744) SYSC block. Signed-off-by: Biju Das Reviewed-by: Fabrizio Castro Reviewed-by: Geert Uytterhoeven Reviewed-by: Rob Herring Signed-off-by: Simon Horman commit 91e95ecd4b4ff35624ac48bdf6dcf2d855f0b63e Author: Fabrizio Castro Date: Mon Sep 10 16:09:41 2018 +0100 soc: renesas: rcar-rst: Add support for RZ/G2E Signed-off-by: Fabrizio Castro Reviewed-by: Biju Das Signed-off-by: Simon Horman commit fe46b8229f287e912b8c8d28bf8dde4cd704c17e Author: Fabrizio Castro Date: Mon Sep 10 16:09:40 2018 +0100 dt-bindings: reset: rcar-rst: Document r8a774c0 rst Document bindings for the RZ/G2E (a.k.a. R8A774C0) reset module. Signed-off-by: Fabrizio Castro Reviewed-by: Biju Das Acked-by: Philipp Zabel Reviewed-by: Rob Herring Signed-off-by: Simon Horman commit 501500e65fa96f899230d66153fefd780f08dd34 Author: Rob Herring Date: Thu Sep 13 13:12:45 2018 -0500 arm64: dts: rockchip: Fix I2C bus unit-address error on rk3399-puma-haikou dtc has new checks for I2C buses. Fix the warnings in unit-addresses. arch/arm64/boot/dts/rockchip/rk3399-puma-haikou.dtb: Warning (i2c_bus_reg): /i2c@ff3d0000/codec@0a: I2C bus unit address format error, expected "a" Cc: Heiko Stuebner Cc: linux-rockchip@lists.infradead.org Signed-off-by: Rob Herring Signed-off-by: Heiko Stuebner commit 131c3eb428ccd5f0c784b9edb4f72ec296a045d2 Author: Rob Herring Date: Thu Sep 13 13:12:36 2018 -0500 ARM: dts: rockchip: Fix erroneous SPI bus dtc warnings on rk3036 dtc has new checks for SPI buses. The rk3036 dts file has a node named spi' which causes false positive warnings. As the node is a pinctrl child node, change the node name to be 'spi-pins' to fix the warnings. arch/arm/boot/dts/rk3036-evb.dtb: Warning (spi_bus_bridge): /pinctrl/spi: incorrect #address-cells for SPI bus arch/arm/boot/dts/rk3036-kylin.dtb: Warning (spi_bus_bridge): /pinctrl/spi: incorrect #address-cells for SPI bus arch/arm/boot/dts/rk3036-evb.dtb: Warning (spi_bus_bridge): /pinctrl/spi: incorrect #size-cells for SPI bus arch/arm/boot/dts/rk3036-kylin.dtb: Warning (spi_bus_bridge): /pinctrl/spi: incorrect #size-cells for SPI bus Cc: Heiko Stuebner Cc: linux-rockchip@lists.infradead.org Signed-off-by: Rob Herring Signed-off-by: Heiko Stuebner commit 76506880eac66cb1f189a993c39ad0fcba723b99 Author: Fabrizio Castro Date: Wed Sep 12 14:52:50 2018 +0100 arm64: defconfig: enable R8A774C0 SoC Enable the Renesas RZ/G2E (R8A774C0) SoC in the ARM64 defconfig. Signed-off-by: Fabrizio Castro Reviewed-by: Biju Das Signed-off-by: Simon Horman commit a1d354a768d8ba15185bc1fb157db42489a2f462 Author: Jacopo Mondi Date: Wed Sep 5 17:29:45 2018 +0200 arm64: dts: renesas: ebisu: Add HDMI and CVBS input Add HDMI and CVBS inputs device nodes to R-Car E3 Ebisu board. Both HDMI and CVBS inputs are connected to an ADV7482 video decoder hooked to the SoC CSI-2 receiver port. Signed-off-by: Jacopo Mondi Reviewed-by: Laurent Pinchart Signed-off-by: Simon Horman commit 2b08adff433c85966ceb2cdb42a7986fad9040b5 Author: YueHaibing Date: Thu Sep 13 02:40:56 2018 +0000 scsi: qla2xxx: Remove set but not used variable 'ptr_dma' Fixes gcc '-Wunused-but-set-variable' warning: drivers/scsi/qla2xxx/qla_iocb.c: In function 'qla24xx_els_dcmd2_iocb': drivers/scsi/qla2xxx/qla_iocb.c:2644:13: warning: variable 'ptr_dma' set but not used [-Wunused-but-set-variable] Signed-off-by: YueHaibing Acked-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit a63eba9efdc1c8e9d3f27fd8b12cb5056507aeef Author: YueHaibing Date: Thu Sep 13 02:04:59 2018 +0000 scsi: lpfc: Remove set but not used variable 'sgl_size' Fixes gcc '-Wunused-but-set-variable' warning: drivers/scsi/lpfc/lpfc_nvme.c: In function 'lpfc_new_nvme_buf': drivers/scsi/lpfc/lpfc_nvme.c:2238:24: warning: variable 'sgl_size' set but not used [-Wunused-but-set-variable] int bcnt, num_posted, sgl_size; ^ Signed-off-by: YueHaibing Signed-off-by: Martin K. Petersen commit efcbe99818ac9bd93ac41e8cf954e9aa64dd9971 Author: YueHaibing Date: Wed Sep 12 02:50:52 2018 +0000 scsi: bnx2fc: Remove set but not used variable 'oxid' Fixes gcc '-Wunused-but-set-variable' warning: drivers/scsi/bnx2fc/bnx2fc_fcoe.c: In function 'bnx2fc_rcv': drivers/scsi/bnx2fc/bnx2fc_fcoe.c:435:17: warning: variable 'oxid' set but not used [-Wunused-but-set-variable] Signed-off-by: YueHaibing Signed-off-by: Martin K. Petersen commit 6f1d8a5327c52570720de9c251bbbe0301903882 Author: Igor Stoppa Date: Wed Sep 5 23:47:20 2018 +0300 scsi: core: remove unnecessary unlikely() BUG_ON() already contains an unlikely(), there is no need for another one. Signed-off-by: Igor Stoppa Cc: "Martin K. Petersen" Cc: "James E.J. Bottomley" Cc: linux-scsi@vger.kernel.org CC: linux-kernel@vger.kernel.org Signed-off-by: Martin K. Petersen commit 5227388d599e4c8221193897ff10764b43ee26cb Author: YueHaibing Date: Tue Sep 4 03:36:01 2018 +0000 scsi: aic7xxx: remove set but not used variable 'shared_scb_data' Fixes gcc '-Wunused-but-set-variable' warning: drivers/scsi/aic7xxx/aic79xx_pci.c: In function 'ahd_pci_config': drivers/scsi/aic7xxx/aic79xx_pci.c:291:19: warning: variable 'shared_scb_data' set but not used [-Wunused-but-set-variable] Signed-off-by: YueHaibing Signed-off-by: Martin K. Petersen commit 902ff8603ed756637a753c1b1ce12d4da9b3ed1e Author: Colin Ian King Date: Fri Sep 14 13:28:08 2018 +0100 scsi: iscsi: target: fix spelling mistake "entires" -> "entries" Trivial fix to spelling mistake in function name and comment Signed-off-by: Colin Ian King Signed-off-by: Martin K. Petersen commit fdd0a66b7af4e49c068e3d5960b90090db955776 Author: YueHaibing Date: Fri Sep 14 01:38:56 2018 +0000 scsi: pm80xx: Remove set but not used variable 'page_code' Fixes gcc '-Wunused-but-set-variable' warning: drivers/scsi/pm8001/pm80xx_hwi.c: In function 'pm8001_set_phy_profile': drivers/scsi/pm8001/pm80xx_hwi.c:4679:6: warning: variable 'page_code' set but not used [-Wunused-but-set-variable] Signed-off-by: YueHaibing Acked-by: Jack Wang Signed-off-by: Martin K. Petersen commit 78d85f31519cbfa6e96252292fe7b464593cded5 Author: YueHaibing Date: Thu Sep 13 01:54:24 2018 +0000 scsi: pm80xx: Remove set but not used variable 'device_id' Fixes gcc '-Wunused-but-set-variable' warning: drivers/scsi/pm8001/pm8001_sas.c: In function 'pm8001_I_T_nexus_event_handler': drivers/scsi/pm8001/pm8001_sas.c:1052:6: warning: variable 'device_id' set but not used [-Wunused-but-set-variable] drivers/scsi/pm8001/pm8001_sas.c: In function 'pm8001_abort_task': drivers/scsi/pm8001/pm8001_sas.c:1191:6: warning: variable 'device_id' set but not used [-Wunused-but-set-variable] Signed-off-by: YueHaibing Acked-by: Jack Wang Signed-off-by: Martin K. Petersen commit eebcc19646489b68399ce7b35d9c38eb9f4ec40f Author: Vivek Gautam Date: Tue Aug 7 23:17:39 2018 +0530 scsi: ufshcd: Fix NULL pointer dereference for in ufshcd_init Error paths in ufshcd_init() ufshcd_hba_exit() killed clk_scaling workqueue when the workqueue is actually created quite late in ufshcd_init(). So, we end up getting NULL pointer dereference in such error paths. Fix this by moving clk_scaling initialization and kill codes to two separate methods, and call them at required places. Fixes: 401f1e4490ee ("scsi: ufs: don't suspend clock scaling during clock gating") Signed-off-by: Vivek Gautam Cc: Bjorn Andersson Cc: Subhash Jadavani Cc: Matthias Kaehlcke Cc: Evan Green Cc: Martin K. Petersen Reviewed-by: Evan Green Signed-off-by: Martin K. Petersen commit a82738adff167593bbb9df90b4201ce4b3407d21 Author: Haishuang Yan Date: Fri Sep 14 12:26:48 2018 +0800 ip6_gre: simplify gre header parsing in ip6gre_err Same as ip_gre, use gre_parse_header to parse gre header in gre error handler code. Signed-off-by: Haishuang Yan Signed-off-by: David S. Miller commit b0350d51f001e6edc13ee4f253b98b50b05dd401 Author: Haishuang Yan Date: Fri Sep 14 12:26:47 2018 +0800 ip_gre: fix parsing gre header in ipgre_err gre_parse_header stops parsing when csum_err is encountered, which means tpi->key is undefined and ip_tunnel_lookup will return NULL improperly. This patch introduce a NULL pointer as csum_err parameter. Even when csum_err is encountered, it won't return error and continue parsing gre header as expected. Fixes: 9f57c67c379d ("gre: Remove support for sharing GRE protocol hook.") Reported-by: Jiri Benc Signed-off-by: Haishuang Yan Signed-off-by: David S. Miller commit 21e65923abaa8f64e1f12491b2c5a8c208f9cfe3 Author: Florian Fainelli Date: Thu Sep 13 11:36:30 2018 -0700 net: phy: et011c: Remove incorrect PHY_POLL flags PHY_POLL is defined as -1 which means that we would be setting all flags of the PHY driver, this is also not a valid flag to tell PHYLIB about, just remove it. Signed-off-by: Florian Fainelli Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 50676de486791afa7ce6f90e31d9951f3d4b04d5 Merge: c3ec8bcceb07 2d550dbad83c Author: David S. Miller Date: Sun Sep 16 15:30:23 2018 -0700 Merge branch 'act_police-lockless-data-path' Davide Caratti says: ==================== net/sched: act_police: lockless data path the data path of 'police' action can be faster if we avoid using spinlocks: - patch 1 converts act_police to use per-cpu counters - patch 2 lets act_police use RCU to access its configuration data. test procedure (using pktgen from https://github.com/netoptimizer): # ip link add name eth1 type dummy # ip link set dev eth1 up # tc qdisc add dev eth1 clsact # tc filter add dev eth1 egress matchall action police \ > rate 2gbit burst 100k conform-exceed pass/pass index 100 # for c in 1 2 4; do > ./pktgen_bench_xmit_mode_queue_xmit.sh -v -s 64 -t $c -n 5000000 -i eth1 > done test results (avg. pps/thread): $c | before patch | after patch | improvement ----+--------------+--------------+------------- 1 | 3518448 | 3591240 | irrelevant 2 | 3070065 | 3383393 | 10% 4 | 1540969 | 3238385 | 110% ==================== Signed-off-by: David S. Miller commit 2d550dbad83c88fc7cb594a1803e77457fe625f9 Author: Davide Caratti Date: Thu Sep 13 19:29:13 2018 +0200 net/sched: act_police: don't use spinlock in the data path use RCU instead of spinlocks, to protect concurrent read/write on act_police configuration. This reduces the effects of contention in the data path, in case multiple readers are present. Signed-off-by: Davide Caratti Signed-off-by: David S. Miller commit 93be42f9173bbc133bd72915b658394308437d00 Author: Davide Caratti Date: Thu Sep 13 19:29:12 2018 +0200 net/sched: act_police: use per-cpu counters use per-CPU counters, instead of sharing a single set of stats with all cores. This removes the need of using spinlock when statistics are read or updated. Signed-off-by: Davide Caratti Signed-off-by: David S. Miller commit 1652a83fa494b12e20fc02a2cc3ddbcd75d53170 Merge: d6142b91e9cc 7876320f8880 Author: Greg Kroah-Hartman Date: Sun Sep 16 22:44:14 2018 +0200 Merge 4.19-rc4 into usb-next We need the USB fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit f685fc6ab05192c7bb924288c8685b95e92a7c65 Merge: 7adb05bb813d 7876320f8880 Author: Greg Kroah-Hartman Date: Sun Sep 16 22:41:47 2018 +0200 Merge b4.19-rc4 into char-misc-next We want the bugfixes in here as well. Signed-off-by: Greg Kroah-Hartman commit a75e78f21f9ad4b810868c89dbbabcc3931591ca Author: Bernd Edlinger Date: Sat Jul 7 17:52:47 2018 +0000 kernfs: Fix range checks in kernfs_get_target_path The terminating NUL byte is only there because the buffer is allocated with kzalloc(PAGE_SIZE, GFP_KERNEL), but since the range-check is off-by-one, and PAGE_SIZE==PATH_MAX, the returned string may not be zero-terminated if it is exactly PATH_MAX characters long. Furthermore also the initial loop may theoretically exceed PATH_MAX and cause a fault. Signed-off-by: Bernd Edlinger Acked-by: Tejun Heo Signed-off-by: Greg Kroah-Hartman commit bdae566d5d9733b6e32b378668b84eadf28a94d4 Author: Banajit Goswami Date: Mon Aug 27 21:15:39 2018 -0700 component: fix loop condition to call unbind() if bind() fails During component_bind_all(), if bind() fails for any particular component associated with a master, unbind() should be called for all previous components in that master's match array, whose bind() might have completed successfully. As per the current logic, if bind() fails for the component at position 'n' in the master's match array, it would start calling unbind() from component in 'n'th position itself and work backwards, and will always skip calling unbind() for component in 0th position in the master's match array. Fix this by updating the loop condition, and the logic to refer to the components in master's match array, so that unbind() is called for all components starting from 'n-1'st position in the array, until (and including) component in 0th position. Signed-off-by: Banajit Goswami Signed-off-by: Greg Kroah-Hartman commit be6b1dfe95eda70bd031dc03d420d022fd536d63 Author: Rasmus Villemoes Date: Wed Aug 22 13:00:07 2018 +0200 drivers/base/devtmpfs.c: don't pretend path is const in delete_path path is the result of kstrdup, and we repeatedly call strrchr on it, modifying it through the returned pointer. So there's no reason to pretend path is const. Signed-off-by: Rasmus Villemoes Signed-off-by: Greg Kroah-Hartman commit 8f5be0ec23bb9ef3f96659c8dff1340b876600bf Author: Konstantin Khlebnikov Date: Mon Aug 13 09:52:09 2018 +0300 kernfs: update comment about kernfs_path() return value Now it returns the length of the full path or error code. Signed-off-by: Konstantin Khlebnikov Fixes: 3abb1d90f5d9 ("kernfs: make kernfs_path*() behave in the style of strlcpy()") Acked-by: Tejun Heo Signed-off-by: Greg Kroah-Hartman commit 7dc074348eb85d48f7a1fa96879458f4becf68a7 Merge: 6029b7ac292a 7876320f8880 Author: Greg Kroah-Hartman Date: Sun Sep 16 22:04:13 2018 +0200 Merge 4.19-rc4 into staging-next Handle the merge issues and take the iio and staging driver fixes. Signed-off-by: Greg Kroah-Hartman commit fb50f5a4011c499bc1b1fae77299cfcb3945e51b Author: Eric W. Biederman Date: Thu Sep 13 19:26:35 2018 +0200 signal: Pair exports with their functions For readability and consistency with the other exports in kernel/signal.c pair the exports of signal sending functions with their functions, instead of having the exports in one big clump. Signed-off-by: "Eric W. Biederman" commit b21c5bd562dd97ac0b936439fc64bd30ec09b2e0 Author: Eric W. Biederman Date: Sat Jul 21 11:34:03 2018 -0500 signal: Remove specific_send_sig_info This function is static and it only has two callers. As specific_send_sig_info is only called twice remembering what specific_send_sig_info does when reading the code is difficutl and it makes it hard to see which sending sending functions are equivalent to which others. So remove specific_send_sig_info to make the code easier to read. Signed-off-by: "Eric W. Biederman" commit 82058d6684658430cd9b4123d4c3e863fd48f813 Author: Eric W. Biederman Date: Fri Jul 20 16:35:14 2018 -0500 signal: Use group_send_sig_info to kill all processes in a pid namespace Replace send_sig_info in zap_pid_ns_processes with group_send_sig_info. This makes more sense as the entire process group is being killed. More importantly this allows the kill of those processes with PIDTYPE_MAX to indicate all of the process in the pid namespace are being signaled. This is needed for fork to detect when signals are sent to a group of processes. Admittedly fork has another case to catch SIGKILL but the principle remains that it is desirable to know when a group of processes is being signaled. Signed-off-by: "Eric W. Biederman" commit a8ebd17160ce364fac6647f223991a8f2f1924b9 Author: Eric W. Biederman Date: Fri Jul 20 15:59:17 2018 -0500 tty_io: Use group_send_sig_info in __do_SACK to note it is a session being killed Replace send_sig and force_sig in __do_SAK with group_send_sig_info the general helper for sending a signal to a process group. This is wordier but it allows specifying PIDTYPE_SID so that the signal code knows the signal went to a session. Both force_sig() and send_sig(..., 1) specify SEND_SIG_PRIV and the new call of group_send_sig_info does that explicitly. This is enough to ensure even a pid namespace init is killed. The global init remains unkillable. The guarantee that __do_SAK tries to provide is a clean path to login to a machine. As the global init is unkillable, if it chooses to hold open a tty it can violate this guarantee. A technique other than killing processes would be needed to provide this guarantee to userspace. The only difference between force_sig and send_sig when sending SIGKILL is that SIGNAL_UNKILLABLE is cleared. This has no affect on the processing of a signal sent with SEND_SIG_PRIV by any process, making it unnecessary, and not behavior that needs to be preserved. force_sig was used originally because it did not take as many locks as send_sig. Today send_sig, force_sig and group_send_sig_info take the same locks when delivering a signal. group_send_sig_info also contains a permission check that force_sig and send_sig do not. However the presence of SEND_SIG_PRIV makes the permission check a noop. So the permission check does not result in any behavioral differences. Signed-off-by: "Eric W. Biederman" commit cb90a2c6f77fe9b43d1e3f759bb2f13fe7fa1811 Author: Tomasz Figa Date: Tue Jul 17 18:05:07 2018 +0200 power: supply: max8998-charger: Fix platform data retrieval Since the max8998 MFD driver supports instantiation by DT, platform data retrieval is handled in MFD probe and cell drivers should get use the pdata field of max8998_dev struct to obtain them. Fixes: ee999fb3f17f ("mfd: max8998: Add support for Device Tree") Signed-off-by: Tomasz Figa Signed-off-by: Paweł Chmiel Signed-off-by: Sebastian Reichel commit c8d5b99696398ea1039a6b83543ef572cdba911f Author: Alexandru Ardelean Date: Thu Sep 13 14:02:11 2018 +0300 staging:iio:ad7606: Remove incorrect kernel doc annotations The ad7606_chip_info struct does not have the lock & name fields. Remove the kernel documentation annotations for it. Signed-off-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron commit 4ee033301c898dd0835d035d0e0eb768a3d35da1 Author: Alexandru Ardelean Date: Thu Sep 13 11:44:09 2018 +0300 staging:iio:ad7606: fix voltage scales Fixes commit 17be2a2905a6ec9aa27cd59521495e2f490d2af0 ("staging: iio: ad7606: replace range/range_available with corresponding scale"). The AD7606 devices don't have a 2.5V voltage range, they have 5V & 10V voltage range, which is selectable via the `gpio_range` descriptor. The scales also seem to have been miscomputed, because when they were applied to the raw values, the results differ from the expected values. After checking the ADC transfer function in the datasheet, these were re-computed. Signed-off-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron commit 782853cf9b1bd349ed726390a6fbe40f745931b7 Merge: 2e04dd441a2e 3af15cfacd1e Author: Sebastian Reichel Date: Sun Sep 16 13:10:37 2018 +0200 Merge tag 'psy-mfd-cros-immutable-for-v4.20-signed' into psy-next Immutable branch for mfd and power-supply for v4.20 Immutable branch between mfd and power-supply for driver changes in CROS USBPD charger driver. Signed-off-by: Sebastian Reichel commit 3af15cfacd1eef7f223802d49a88cae23c509183 Author: Fabien Parent Date: Fri Aug 10 15:13:48 2018 +0200 power: supply: cros: add support for dedicated port ChromeOS devices can have one optional dedicated port. The Dedicated port is unique and similar to the USB PD ports except that it doesn't support as many properties. The presence of a dedicated port is determined from whether the EC's charger port count is equal to 'number of USB PD port' + 1. The dedicated port ID is always the last valid port ID. This commit keeps compatibility with Embedded Controllers that do not support the new EC_CMD_CHARGE_PORT_COUNT command by setting the number of charger port to be equal to the number of USB PD port when this command fails. Signed-off-by: Fabien Parent Signed-off-by: Sebastian Reichel commit 36f47383c7f9fa0fdc20a92635435ff77ff71a6f Author: Fabien Parent Date: Fri Aug 10 15:13:47 2018 +0200 mfd: cros: add charger port count command definition A new more command has been added to the ChromeOS embedded controller that allows to get the number of charger port count. Unlike EC_CMD_USB_PD_PORTS, this new command also includes the dedicated port if present. This command will be used to expose the dedicated charger port in the ChromeOS charger driver. Signed-off-by: Fabien Parent Acked-for-MFD-by: Lee Jones Reviewed-by: Enric Balletbo i Serra Signed-off-by: Sebastian Reichel commit 2e04dd441a2ecc049505b2cbfabc355a48115b59 Merge: b3e1b276a429 9f1e44774be5 Author: Sebastian Reichel Date: Sun Sep 16 12:37:11 2018 +0200 Merge tag 'psy-at91-poweroff-immutable-for-v4.20-signed' into psy-next Immutable branch for mach-at91 and power-supply for v4.20 Immutable branch between mach-at91 and power-supply for driver changes in at91-poweroff. Signed-off-by: Sebastian Reichel commit 9f1e44774be578fb92776add95f1fcaf8284d692 Author: Claudiu Beznea Date: Thu Aug 30 14:50:11 2018 +0300 power: reset: at91-poweroff: do not procede if at91_shdwc is allocated There should be only one instance of struct shdwc in the system. This is referenced through at91_shdwc. Return in probe if at91_shdwc is already allocated. Signed-off-by: Claudiu Beznea Acked-by: Nicolas Ferre Signed-off-by: Sebastian Reichel commit d12f84906bcb9384d0bf58726688fb60aac8a100 Author: Claudiu Beznea Date: Thu Aug 30 14:50:10 2018 +0300 power: reset: at91-poweroff: rename at91_shdwc_base member of struct shdwc Rename at91_shdwc_base member of struct shdwc to shdwc_base. There is already an "at91" string in at91_shdwc object. Signed-off-by: Claudiu Beznea Acked-by: Nicolas Ferre Signed-off-by: Sebastian Reichel commit 6764aca14fc85c5ae2bb0a63bece445a05dd4fff Author: Claudiu Beznea Date: Thu Aug 30 14:50:09 2018 +0300 power: reset: at91-poweroff: make sclk part of struct shdwc Make sclk part of struct shdwc to have all the data specific to SHDWC grouped together in one structure. Signed-off-by: Claudiu Beznea Acked-by: Nicolas Ferre Signed-off-by: Sebastian Reichel commit 9be74f0d39c1c923185e184f3263ba29439ebad6 Author: Claudiu Beznea Date: Thu Aug 30 14:50:08 2018 +0300 power: reset: at91-poweroff: make mpddrc_base part of struct shdwc Make mpddrc_base part of struct shdwc since there is also only one instance of struct shdwc *at91_shdwc in system and to have all data specific to SHDWC grouped together. Signed-off-by: Claudiu Beznea Acked-by: Nicolas Ferre Signed-off-by: Sebastian Reichel commit 4e018c1e9b05f722cdd2fecb36201376e3c58dda Author: Claudiu Beznea Date: Thu Aug 30 14:50:07 2018 +0300 power: reset: at91-poweroff: use only one poweroff function Use only one poweroff function for sama5d2 and adapt it to work for both scenarios (having LPDDR or not). Signed-off-by: Claudiu Beznea Acked-by: Nicolas Ferre Signed-off-by: Sebastian Reichel commit 9f7195da31fb0b0f83dbd6bbe7aa98c889fb865a Author: Claudiu Beznea Date: Thu Aug 30 14:50:06 2018 +0300 power: reset: at91-poweroff: switch to slow clock before shutdown The SAMA5D2 NRST input signal is resynchronized with the SLCK clock and it can take up to 2 SLCK cycles (about 90us) for the internal reset to be effective. During this delay, the VDDCORE current consumption may still be high (application-dependent) with the VDDCORE regulator already OFF. Under such conditions, VDDCORE may operate below its operating range leading to potential register corruption. To prevent such situation, it is recommended to decrease significantly the power consumption of the device once the voltage regulator is turned-off. This can be achieved by operating the device at a much lower low frequency. To solve this switch the master clock to slock clock just before writing shutdown command to shutdown controller. Signed-off-by: Claudiu Beznea Suggested-by: Patrice Vilchez Acked-by: Nicolas Ferre Signed-off-by: Sebastian Reichel commit b3e1b276a429e80824f9a1384eb656af3c1daf59 Author: Kuninori Morimoto Date: Fri Sep 7 02:15:08 2018 +0000 power: reset: 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: Sebastian Reichel commit 54baff8d4e5dce2cef61953b1dc22079cda1ddb1 Author: Dan Carpenter Date: Mon Sep 10 11:39:04 2018 +0300 power: supply: ab8500_fg: silence uninitialized variable warnings If kstrtoul() fails then we print "charge_full" when it's uninitialized. The debug printk doesn't add anything so I deleted it and cleaned these two functions up a bit. Signed-off-by: Dan Carpenter Signed-off-by: Sebastian Reichel commit 87a2b65fc855e6be50f791c2ebbb492541896827 Author: David Lechner Date: Wed Sep 12 19:48:30 2018 -0500 power: supply: sysfs: ratelimit property read error message This adds rate limiting to the message that is printed when reading a power supply property via sysfs returns an error. This will prevent userspace applications from unintentionally dDOSing the system by continuously reading a property that returns an error. Signed-off-by: David Lechner Signed-off-by: Sebastian Reichel commit ae6fe7a387e97e2ea8cc275fff5ef55568c4daf3 Author: Angus Ainslie (Purism) Date: Tue Jul 31 11:49:09 2018 -0600 power: supply: bq25890_charger: Read back the current battery voltage The BQ2589x family has the capability of reading the current battery voltage. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Angus Ainslie (Purism) Signed-off-by: Sebastian Reichel commit 2e1a2ddee9cef07f5b1fab5625dcc56078139a4e Author: Angus Ainslie (Purism) Date: Tue Jul 31 11:49:08 2018 -0600 power: supply: bq25890_charger: Add the BQ25896 part The BQ25896 is almost identical to the BQ25890. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Angus Ainslie (Purism) Signed-off-by: Sebastian Reichel commit 0838d84fff7c57dc76590536c5ea5a3404370538 Author: Angus Ainslie (Purism) Date: Tue Jul 31 11:49:07 2018 -0600 power: supply: bq25890_charger: Remove unused table entries There are a few table entries that aren't used. Drop them. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Angus Ainslie (Purism) Signed-off-by: Sebastian Reichel commit 9d9ae3414d1bb655d8db7079e56b0f51e7cd07f0 Author: Angus Ainslie (Purism) Date: Tue Jul 31 11:49:06 2018 -0600 power: supply: bq25890_charger: Add debugging output of failed initialization To ease adding a new part variant some debugging is handy. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Angus Ainslie (Purism) Signed-off-by: Sebastian Reichel commit 9ac669fc01dbfef707ecaa6b618c0d03294cca16 Merge: fbfa9260085b 67314ec7b025 Author: Thomas Gleixner Date: Sat Sep 15 20:50:42 2018 +0200 Merge tag 'y2038' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground into timers/core Pull more y2038 work from Arnd Bergman: y2038: convert more syscalls Here is another set of system call changes to prepare the change over to 64-bit time_t. As before, the strategy is to change system calls that take a 'struct timespec' argument over to 'struct __kernel_timespec', which for now is defined to be the same but will get redefined to use a 64-bit time_t argument once we are ready to modify the system call tables. The major change from previous patches is that the plan is no longer to directly use the 'compat' system calls for providing compatibility with the existing 32-bit time_t based entry points. Instead, we rename the compat code to something that makes more sense on 32-bit architectures, e.g. compat_timespec becomes old_timespec32. With the renamed types in place, change over the 'stat' and 'utimes' families of system calls, sched_rr_get_interval, recvmmsg and rt_sigtimedwait. Another series for poll, select and io_pgetevents is currently being tested. commit 6e1637c91742570ff873433ed27227933b792af4 Author: Kieran Bingham Date: Fri Sep 14 14:21:49 2018 +0100 drm: rcar-du: Remove packed VYUY support The Gen3 VSP used by the DU for display does not support the packed VYUY pixel format. Gen2 VSP hardware is able to process this format, but DU + VSP operation isn't enabled on Gen2, and VYUY isn't a strategic format, so it can be ignored. Remove the format from the capabilities of the DU driver. Signed-off-by: Kieran Bingham Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart commit f09e5b5d776debc2761e8d9330d60b8dcd8cb9dd Author: Laurent Pinchart Date: Fri Aug 31 19:12:59 2018 +0100 drm: rcar-du: Update framebuffer pitch and alignment limits for Gen3 The framebuffer pitch and alignment constraints reflect the limitations of the Gen2 DU hardware. On Gen3, the DU has no memory interface and thus doesn't impose any constraint. The limitations come instead from the VSP that has a limit of 65535 bytes for the pitch and no alignment constraint. Update the checks accordingly. Signed-off-by: Laurent Pinchart Signed-off-by: Kieran Bingham commit 0f35b25b87923394cd9048a199d05e994fbf8bae Author: Koji Matsuoka Date: Fri Aug 31 19:12:58 2018 +0100 drm: rcar-du: Add support for missing pixel formats This patch supports pixel format of RGB332, ARGB4444, XRGB4444, BGR888, RGB888, BGRA8888, BGRX8888 and YVYU. VYUY pixel format is not supported by H/W specification. Signed-off-by: Koji Matsuoka Signed-off-by: Kieran Bingham Reviewed-by: Laurent Pinchart [Reordered formats with RGB first] Signed-off-by: Laurent Pinchart commit 2a3181d9cfd6d5aa48f8527708d0c32072072cef Author: Kieran Bingham Date: Fri Aug 31 19:12:57 2018 +0100 drm: rcar-du: Update Gen3 output limitations The R-Car Gen3 DU utilises the VSP1 hardware for memory access. The limits on the RPF and WPF in this pipeline are 8190x8190. Update the supported maximum sizes accordingly. Signed-off-by: Kieran Bingham Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart commit c4341442acb14d8f1cec6999123a70f9d2bfe48f Author: Sergei Shtylyov Date: Tue Jun 5 23:30:36 2018 +0300 drm: rcar-du: lvds: add R8A77980 support Add support for the R-Car V3H (R8A77980) SoC to the LVDS encoder driver. Signed-off-by: Sergei Shtylyov Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart commit a8492e88d9c7f336fd1356e6b25499216af62902 Author: Jacopo Mondi Date: Wed Aug 22 09:21:48 2018 +0200 drm: rcar-du: Write ESCR and OTAR as CRTC registers The ESCR and OTAR registers exist in each DU channel, but at different offsets for odd and even channels. This led to usage of the group register access API to write them, with offsets macros named ESCR/OTAR and ESCR2/OTAR2 for the first and second ESCR/OTAR register in the group respectively. The names are confusing as it suggests that the ESCR/OTAR registers for DU0 and DU2 are taken into account, especially with writes performed to the group register access API. Rename the offsets to ESCR/OTAR02 and ESCR/OTAR13, and use the CRTC register access API to clarify the code. The offsets values are updated accordingly. Cosmetic patch, no functional changes intended. Signed-off-by: Jacopo Mondi Reviewed-by: Laurent Pinchart [Squashed ESCR and OTAR changes in a single commit] Signed-off-by: Laurent Pinchart commit 9fe50e64fac7a7301f82e31dbd87a4145384005e Author: Jacopo Mondi Date: Wed Aug 22 09:21:47 2018 +0200 drm: rcar-du: Rename and document dpll_ch field Document and re-name the 'dpll_ch' field to a more precise 'dpll_mask' for consistency with the 'channels_mask' field defined in 'struct rcar_du_device_info'. Signed-off-by: Jacopo Mondi Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart commit 8c74c4561f05f57fca2957b1d98676a0454df1ca Author: Jacopo Mondi Date: Mon Aug 20 17:26:17 2018 +0200 drm: rcar-du: Improve non-DPLL clock selection DU channels not equipped with a DPLL use an SoC internal (provided by the CPG) or external clock source combined with a DU internal divider to generate the desired output dot clock frequency. The current clock selection procedure does not fully exploit the ability of external clock sources to generate the exact dot clock frequency by themselves, but relies instead on tuning the internal DU clock divider only, resulting in a less precise clock generation process. When possible, and desirable, ask the external clock source for the exact output dot clock frequency, and select the clock source that produces the frequency closest to the desired output dot clock. This patch specifically targets platforms (like Salvator-X[S] and ULCBs) where the DU's input dotclock.in is generated by the versaclock VC5 clock source, which is capable of generating the exact rate the DU needs as pixel clock output. This patch fixes higher resolution modes which requires an high pixel clock output currently not working on non-HDMI DU channel (such as 1920x1080@60Hz on the VGA output). Fixes: 1b30dbde8596 ("drm: rcar-du: Add support for external pixel clock") Signed-off-by: Jacopo Mondi [Factor out code to a helper function] Signed-off-by: Laurent Pinchart Acked-by: Jacopo Mondi commit 7281e6c6a5bdbde9cae6eb3c6d2bf2706b94807d Author: Laurent Pinchart Date: Fri Jul 27 15:29:08 2018 +0300 drm: rcar-du: Rework clock configuration based on hardware limits The DU channels that have a display PLL (DPLL) can only use external clock sources, and don't have an internal clock divider (with the exception of H3 ES1.x where the post-divider is present and needs to be used as a workaround for a DPLL silicon issue). Rework the clock configuration to take this into account, avoiding selection of non-existing clock sources or usage of a missing post-divider. Signed-off-by: Laurent Pinchart Reviewed-by: Jacopo Mondi commit 0ab93e9c99f8208c0a1a7b7170c827936268c996 Author: Eric W. Biederman Date: Thu Sep 13 11:28:01 2018 +0200 signal/GenWQE: Fix sending of SIGKILL The genweq_add_file and genwqe_del_file by caching current without using reference counting embed the assumption that a file descriptor will never be passed from one process to another. It even embeds the assumption that the the thread that opened the file will be in existence when the process terminates. Neither of which are guaranteed to be true. Therefore replace caching the task_struct of the opener with pid of the openers thread group id. All the knowledge of the opener is used for is as the target of SIGKILL and a SIGKILL will kill the entire process group. Rename genwqe_force_sig to genwqe_terminate, remove it's unncessary signal argument, update it's ownly caller, and use kill_pid instead of force_sig. The work force_sig does in changing signal handling state is not relevant to SIGKILL sent as SEND_SIG_PRIV. The exact same processess will be killed just with less work, and less confusion. The work done by force_sig is really only needed for handling syncrhonous exceptions. It will still be possible to cause genwqe_device_remove to wait 8 seconds by passing a file descriptor to another process but the possible user after free is fixed. Fixes: eaf4722d4645 ("GenWQE Character device and DDCB queue") Cc: stable@vger.kernel.org Cc: Greg Kroah-Hartman Cc: Frank Haverkamp Cc: Joerg-Stephan Vogt Cc: Michael Jung Cc: Michael Ruettger Cc: Kleber Sacilotto de Souza Cc: Sebastian Ott Cc: Eberhard S. Amann Cc: Gabriel Krisman Bertazi Cc: Guilherme G. Piccoli Signed-off-by: "Eric W. Biederman" commit 8e6b65a1b6cd1711d3acd2aa5c60d38c3e15dabb Author: zhong jiang Date: Thu Sep 13 10:49:45 2018 +0800 x86/CPU: Fix unused variable warning when !CONFIG_IA32_EMULATION Get rid of local @cpu variable which is unused in the !CONFIG_IA32_EMULATION case. Signed-off-by: zhong jiang Cc: Andy Lutomirski Cc: David Woodhouse Cc: Konrad Rzeszutek Wilk Cc: Pavel Tatashin Cc: x86-ml Link: http://lkml.kernel.org/r/1536806985-24197-1-git-send-email-zhongjiang@huawei.com [ Clean up commit message. ] Signed-off-by: Borislav Petkov commit c968ed08594dadb788a93dc2bc128ed4ef35c93e Author: Luck, Tony Date: Fri Sep 14 13:19:05 2018 -0700 EDAC, sb_edac: Fix signedness bugs in *_get_ha() functions A static checker gave the following warnings: drivers/edac/sb_edac.c:1030 ibridge_get_ha() warn: signedness bug returning '(-22)' drivers/edac/sb_edac.c:1037 knl_get_ha() warn: signedness bug returning '(-22)' Both because the functions are declared to return a "u8", but try to return -EINVAL for the error case. Fix by returning 0xff (since the caller doesn't look at, or pass on, the return value). Reported-by: Dan Carpenter Signed-off-by: Tony Luck Cc: Qiuxu Zhuo Cc: linux-edac Link: http://lkml.kernel.org/r/20180914201905.GA30946@agluck-desk Signed-off-by: Borislav Petkov commit a7ea49afcc888dd5aac76774767bfb90be937aad Author: Sven Eckelmann Date: Tue Sep 11 17:22:01 2018 +0200 batman-adv: Enable LockLess TX for softif The batadv interfaces are virtual interfaces which just tunnel the traffic over other ethernet compatible interfaces. It doesn't need serialization during the tx phase and is using RCU for most of its internal datastructures. Since it doesn't have actual queues which could be locked independently, the throughput gets significantly reduced by the extra lock in the core net code. 8 parallel TCP connections forwarded by an IPQ4019 based hardware over 5GHz could reach: * without LLTX: 349 Mibit/s * with LLTX: 563 Mibit/s Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich commit dee222c7b20cdfff4b4d554bb4a5199572c5f28c Author: Sven Eckelmann Date: Thu Aug 16 16:54:45 2018 +0200 batman-adv: Move OGM rebroadcast stats to orig_ifinfo B.A.T.M.A.N. IV requires the number of rebroadcast from a neighboring originator. These statistics are gathered per interface which transmitted the OGM (and then received it again). Since an originator is not interface specific, a resizable array was used in each originator. This resizable array had an entry for each interface and had to be resizes (for all OGMs) when the number of active interface was modified. This could cause problems when a large number of interface is added and not enough continuous memory is available to allocate the array. There is already a per interface originator structure "batadv_orig_ifinfo" which can be used to store this information. Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich commit d331a739949992043b135fcfba649196b397ec3b Author: Sven Eckelmann Date: Fri Aug 10 23:36:16 2018 +0200 batman-adv: Provide debug messages as trace events A private debug logging infrastructure is currently provided via $debug_fs/batman_adv/*/log when CONFIG_BATMAN_ADV_DEBUG is enabled. This is not well integrated in the rest of the tracing infrastructure of the kernel. Other components (like mac80211 or ath10k) allow to gather the debug messages using generic trace events which are better integrated. This makes it possible to interact with them using the existing userspace tools. The tracepoint batadv:batadv_dbg will now be available when CONFIG_BATMAN_ADV_DEBUG and CONFIG_BATMAN_ADV_TRACING is activated. The log level mask is still used for filtering as usual. A full system trace for offline parsing can be created (and read) using: $ batctl ll all $ trace-cmd record -e batadv:batadv_dbg $ trace-cmd report The same can also be done without recording to a file $ batctl ll all $ trace-cmd stream -e batadv:batadv_dbg The trace infrastructure is especially helpful when tracing processes: $ batctl ll all $ ./tools/perf/perf trace --event "batadv:*" batctl p 10.204.32.1 0.000 batadv:batadv_dbg:batman_adv bat0 Parsing outgoing ARP REQUEST 0.045 batadv:batadv_dbg:batman_adv bat0 ARP MSG = [src: a2:64:14:53:f8:22-10.204.32.185 dst: 00:00:00:00:00:00-10.204.32.1] 0.067 batadv:batadv_dbg:batman_adv bat0 Entry updated: 10.204.32.185 a2:64:14:53:f8:22 (vid: -1) 0.099 batadv:batadv_dbg:batman_adv bat0 batadv_dat_select_candidates(): IP=10.204.32.1 hash(IP)=48902 0.757 batadv:batadv_dbg:batman_adv bat0 dat_select_candidates() 0: selected fe:2c:91:68:29:2b addr=48977 dist=65460 1.178 batadv:batadv_dbg:batman_adv bat0 dat_select_candidates() 1: selected fe:81:ab:c5:e3:03 addr=49181 dist=65256 1.809 batadv:batadv_dbg:batman_adv bat0 dat_select_candidates() 2: selected 66:25:a7:48:37:fb addr=49328 dist=65109 1.828 batadv:batadv_dbg:batman_adv bat0 DHT_SEND for 10.204.32.1 Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich commit 5232da2f75d903c48a23eca143c61d1ac4fd2d2c Author: Leo Li Date: Wed Sep 5 11:28:29 2018 -0400 drm/amd/display: Drop amdgpu_dm_prev_state struct [Why] It's not being used [How] Nuke it Signed-off-by: Leo Li Reviewed-by: David Francis Acked-by: Leo Li Signed-off-by: Alex Deucher commit 8603b30c9a076641e2f004f36ebbda414d7fdac4 Author: Leo Li Date: Wed Sep 5 11:19:42 2018 -0400 drm/amd/display: Drop amdgpu_display_manager.dal member [Why] It's not being used anymore. [How] Nuke it Signed-off-by: Leo Li Reviewed-by: David Francis Acked-by: Leo Li Signed-off-by: Alex Deucher commit 16f4c69549ef676bc278be8b267a811b6f8f59ad Author: Chiawen Huang Date: Wed Sep 5 20:34:57 2018 +0800 drm/amd/display: add query HPD interface. [Why] current dc_link_detect function is not only detection but also update some link data. [How] added a pure get HPD state function. Signed-off-by: Chiawen Huang Reviewed-by: Tony Cheng Acked-by: Leo Li Signed-off-by: Alex Deucher commit cac7643a27ff15a3be2bf375fe7abd4cced228c3 Author: Tony Cheng Date: Mon Aug 27 13:35:31 2018 -0400 drm/amd/display: dc 3.1.66 Signed-off-by: Tony Cheng Reviewed-by: Steven Chiu Acked-by: Leo Li Signed-off-by: Alex Deucher commit c276f81b72401d64eac221d53ba24986186c502a Author: Chiawen Huang Date: Wed Aug 29 18:39:38 2018 +0800 drm/amd/display: add aux i2c event log. [Why] support i2c transition event log [How] refined aux REQ and REP events in aux flow. commented REQ and REP events in i2c flow. note: i2c event log is currently commented out. more work is required to find an portocol parser to and generate event for the parser Signed-off-by: Chiawen Huang Reviewed-by: Tony Cheng Acked-by: Leo Li Signed-off-by: Alex Deucher commit b07971d43c4d321c65240749765bba2b2eaeeb30 Author: Dmytro Laktyushkin Date: Wed Aug 29 16:23:59 2018 -0400 drm/amd/display: stop using switch for different CS revisions Clock sources currently have support for asic specific function pointers. But actual separation into functions was never performed, leaving us with giant functions that rely on switch. This change creates separate functions, removing switch use. Signed-off-by: Dmytro Laktyushkin Reviewed-by: Tony Cheng Acked-by: Leo Li Signed-off-by: Alex Deucher commit d77f778e59ca858e1fb1e9d4946080d689c04711 Author: Charlene Liu Date: Mon Aug 27 11:31:08 2018 -0400 drm/amd/display: Fix 3D stereo issues. We were not providing the correct pixel clocks to DML for marks calculation. Signed-off-by: Charlene Liu Reviewed-by: Dmytro Laktyushkin Acked-by: Leo Li Signed-off-by: Alex Deucher commit 8e3ffa8d027554b5ba41131a31fcd96d248d1991 Author: Chris Wilson Date: Tue Sep 11 12:57:47 2018 +0100 drm/i915: Limit number of capture objects If we fail to allocate an array for a large number of user requested capture objects, reduce the array size and try to grab at least some of the objects! Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20180911115810.8917-3-chris@chris-wilson.co.uk commit bcec54bf3118a26422cd83675cb461ef4dea81ef Author: Mike Rapoport Date: Mon Sep 10 12:23:18 2018 +0300 mips: switch to NO_BOOTMEM MIPS already has memblock support and all the memory is already registered with it. This patch replaces bootmem memory reservations with memblock ones and removes the bootmem initialization. Since memblock allocates memory in top-down mode, we ensure that memblock limit is max_low_pfn to prevent allocations from the high memory. To have the exceptions base in the lower 512M of the physical memory, its allocation in arch/mips/kernel/traps.c::traps_init() is using bottom-up mode. Signed-off-by: Mike Rapoport Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/20560/ Cc: Serge Semin Cc: Ralf Baechle Cc: James Hogan Cc: Huacai Chen Cc: Michal Hocko Cc: linux-mips@linux-mips.org Cc: linux-mm@kvack.org Cc: linux-kernel@vger.kernel.org commit 68ecb5c1920c5b98b1e717fd2349fba2ee5d4031 Author: Rob Herring Date: Thu Sep 13 13:12:41 2018 -0500 arm64: dts: meson: Fix erroneous SPI bus warnings dtc has new checks for SPI buses. The meson dts files have a node named spi' which causes false positive warnings. As the node is a pinctrl child node, change the node name to be 'spi-pins' to fix the warnings. arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dtb: Warning (spi_bus_bridge): /soc/periphs@c8834000/pinctrl@4b0/spi: incorrect #address-cells for SPI bus Cc: Carlo Caione Cc: Kevin Hilman Cc: linux-amlogic@lists.infradead.org Signed-off-by: Rob Herring Signed-off-by: Kevin Hilman commit 70e88c758a6b8544b5e0d982e55d1e36f9aa0b85 Author: Alexei Starovoitov Date: Fri Sep 14 12:09:05 2018 -0700 selftests/bpf: fix bpf_flow.c build fix the following build error: clang -I. -I./include/uapi -I../../../include/uapi -idirafter /usr/local/include -idirafter /data/users/ast/llvm/bld/lib/clang/7.0.0/include -idirafter /usr/include -Wno-compare-distinct-pointer-types \ -O2 -target bpf -emit-llvm -c bpf_flow.c -o - | \ llc -march=bpf -mcpu=generic -filetype=obj -o /data/users/ast/bpf-next/tools/testing/selftests/bpf/bpf_flow.o LLVM ERROR: 'dissect' label emitted multiple times to assembly file make: *** [/data/users/ast/bpf-next/tools/testing/selftests/bpf/bpf_flow.o] Error 1 Fixes: 9c98b13cc3bb ("flow_dissector: implements eBPF parser") Signed-off-by: Alexei Starovoitov commit c8765de0adfcaaf4ffb2d951e07444f00ffa9453 Author: Paolo Valente Date: Fri Sep 14 16:23:09 2018 +0200 blok, bfq: do not plug I/O if all queues are weight-raised To reduce latency for interactive and soft real-time applications, bfq privileges the bfq_queues containing the I/O of these applications. These privileged queues, referred-to as weight-raised queues, get a much higher share of the device throughput w.r.t. non-privileged queues. To preserve this higher share, the I/O of any non-weight-raised queue must be plugged whenever a sync weight-raised queue, while being served, remains temporarily empty. To attain this goal, bfq simply plugs any I/O (from any queue), if a sync weight-raised queue remains empty while in service. Unfortunately, this plugging typically lowers throughput with random I/O, on devices with internal queueing (because it reduces the filling level of the internal queues of the device). This commit addresses this issue by restricting the cases where plugging is performed: if a sync weight-raised queue remains empty while in service, then I/O plugging is performed only if some of the active bfq_queues are *not* weight-raised (which is actually the only circumstance where plugging is needed to preserve the higher share of the throughput of weight-raised queues). This restriction proved able to boost throughput in really many use cases needing only maximum throughput. Signed-off-by: Paolo Valente Signed-off-by: Jens Axboe commit d0edc2473be9d70f999282e1ca7863ad6ae704dc Author: Paolo Valente Date: Fri Sep 14 16:23:08 2018 +0200 block, bfq: inject other-queue I/O into seeky idle queues on NCQ flash The Achilles' heel of BFQ is its failing to reach a high throughput with sync random I/O on flash storage with internal queueing, in case the processes doing I/O have differentiated weights. The cause of this failure is as follows. If at least two processes do sync I/O, and have a different weight from each other, then BFQ plugs I/O dispatching every time one of these processes, while it is being served, remains temporarily without pending I/O requests. This plugging is necessary to guarantee that every process enjoys a bandwidth proportional to its weight; but it empties the internal queue(s) of the drive. And this kills throughput with random I/O. So, if some processes have differentiated weights and do both sync and random I/O, the end result is a throughput collapse. This commit tries to counter this problem by injecting the service of other processes, in a controlled way, while the process in service happens to have no I/O. This injection is performed only if the medium is non rotational and performs internal queueing, and the process in service does random I/O (service injection might be beneficial for sequential I/O too, we'll work on that). As an example of the benefits of this commit, on a PLEXTOR PX-256M5S SSD, and with five processes having differentiated weights and doing sync random 4KB I/O, this commit makes the throughput with bfq grow by 400%, from 25 to 100MB/s. This higher throughput is 10MB/s lower than that reached with none. As some less random I/O is added to the mix, the throughput becomes equal to or higher than that with none. This commit is a very first attempt to recover throughput without losing control, and certainly has many limitations. One is, e.g., that the processes whose service is injected are not chosen so as to distribute the extra bandwidth they receive in accordance to their weights. Thus there might be loss of weighted fairness in some cases. Anyway, this loss concerns extra service, which would not have been received at all without this commit. Other limitations and issues will probably show up with usage. Signed-off-by: Paolo Valente Signed-off-by: Jens Axboe commit cbeb869a3d1110450186b738199963c5e68c2a71 Author: Paolo Valente Date: Fri Sep 14 16:23:07 2018 +0200 block, bfq: correctly charge and reset entity service in all cases BFQ schedules entities (which represent either per-process queues or groups of queues) as a function of their timestamps. In particular, as a function of their (virtual) finish times. The finish time of an entity is computed as a function of the budget assigned to the entity, assuming, tentatively, that the entity, once in service, will receive an amount of service equal to its budget. Then, when the entity is expired because it finishes to be served, this finish time is updated as a function of the actual service received by the entity. This allows the entity to be correctly charged with only the service received, and then to be correctly re-scheduled. Yet an entity may receive service also while not being the entity in service (in the scheduling environment of its parent entity), for several reasons. If the entity remains with no backlog while receiving this 'unofficial' service, then it is expired. Also on such an expiration, the finish time of the entity should be updated to account for only the service actually received by the entity. Unfortunately, such an update is not performed for an entity expiring without being the entity in service. In a similar vein, the service counter of the entity in service is reset when the entity is expired, to be ready to be used for next service cycle. This reset too should be performed also in case an entity is expired because it remains empty after receiving service while not being the entity in service. But in this case the reset is not performed. This commit performs the above update of the finish time and reset of the service received, also for an entity expiring while not being the entity in service. Signed-off-by: Paolo Valente Signed-off-by: Jens Axboe commit 4a9f42c9dcbfb8da40bfeaa923b6a740a64a889b Merge: 1edb6e035eb7 50b3ed57dee9 Author: Alexei Starovoitov Date: Fri Sep 14 12:04:34 2018 -0700 Merge branch 'bpf-flow-dissector' Petar Penkov says: ==================== This patch series hardens the RX stack by allowing flow dissection in BPF, as previously discussed [1]. Because of the rigorous checks of the BPF verifier, this provides significant security guarantees. In particular, the BPF flow dissector cannot get inside of an infinite loop, as with CVE-2013-4348, because BPF programs are guaranteed to terminate. It cannot read outside of packet bounds, because all memory accesses are checked. Also, with BPF the administrator can decide which protocols to support, reducing potential attack surface. Rarely encountered protocols can be excluded from dissection and the program can be updated without kernel recompile or reboot if a bug is discovered. Patch 1 adds infrastructure to execute a BPF program in __skb_flow_dissect. This includes a new BPF program and attach type. Patch 2 adds the new BPF flow dissector definitions to tools/uapi. Patch 3 adds support for the new BPF program type to libbpf and bpftool. Patch 4 adds a flow dissector program in BPF. This parses most protocols in __skb_flow_dissect in BPF for a subset of flow keys (basic, control, ports, and address types). Patch 5 adds a selftest that attaches the BPF program to the flow dissector and sends traffic with different levels of encapsulation. Performance Evaluation: The in-kernel implementation was compared against the demo program from patch 4 using the test in patch 5 with IPv4/UDP traffic over 10 seconds. $perf record -a -C 4 taskset -c 4 ./test_flow_dissector -i 4 -f 8 \ -t 10 In-kernel Dissector: __skb_flow_dissect overhead: 2.12% Total Packets: 3,272,597 (from output of ./test_flow_dissector) BPF Dissector: __skb_flow_dissect overhead: 1.63% Total Packets: 3,232,356 (from output of ./test_flow_dissector) No-op BPF Dissector: __skb_flow_dissect overhead: 1.52% Total Packets: 3,330,635 (from output of ./test_flow_dissector) Changes since v3: 1/ struct bpf_flow_keys reorganized to remove holes in patch 1 and patch 2. Changes since v2: 1/ Changes to tools/include/uapi pulled into a separate patch 2 2/ Changes to tools/lib and tools/bpftool pulled into a separate patch 3 3/ Changed flow_keys in __sk_buff from __u32 to struct bpf_flow_keys * 4/ Added nhoff field in struct bpf_flow_keys to pass initial offset 5/ Saving all of the modified control block, rather than just the qdisc 6/ Sample BPF program in patch 4 modified to use the changes above Changes since v1: 1/ LD_ABS instructions now disallowed for the new BPF prog type 2/ now checks if skb is NULL in __skb_flow_dissect() 3/ fixed incorrect accesses in flow_dissector_is_valid_access() - writes to the flow_keys field now disallowed - reads/writes to tc_classid and data_meta now disallowed 4/ headers pulled with bpf_skb_load_data if direct access fails Changes since RFC: 1/ Flow dissector hook changed from global to per-netns 2/ Defined struct bpf_flow_keys to be used in BPF flow dissector programs instead of exposing the internal flow keys layout. Added a function to translate from bpf_flow_keys to the internal layout after BPF dissection is complete. The pointer to this struct is stored in qdisc_skb_cb rather than inside of the 20 byte control block which simplifies verification and allows access to all 20 bytes of the cb. 3/ Removed GUE parsing as it relied on a hardcoded port 4/ MPLS parsing now stops at the first label which is consistent with the in-kernel flow dissector 5/ Refactored to use direct packet access and to write out to struct bpf_flow_keys [1] http://vger.kernel.org/netconf2017_files/rx_hardening_and_udp_gso.pdf ==================== Signed-off-by: Alexei Starovoitov commit 50b3ed57dee9cd0e06c59826cec8af14b51bab3e Author: Petar Penkov Date: Fri Sep 14 07:46:22 2018 -0700 selftests/bpf: test bpf flow dissection Adds a test that sends different types of packets over multiple tunnels and verifies that valid packets are dissected correctly. To do so, a tc-flower rule is added to drop packets on UDP src port 9, and packets are sent from ports 8, 9, and 10. Only the packets on port 9 should be dropped. Because tc-flower relies on the flow dissector to match flows, correct classification demonstrates correct dissection. Also add support logic to load the BPF program and to inject the test packets. Signed-off-by: Petar Penkov Signed-off-by: Willem de Bruijn Signed-off-by: Alexei Starovoitov commit 9c98b13cc3bb5d90ee2ec047d591272b382468fd Author: Petar Penkov Date: Fri Sep 14 07:46:21 2018 -0700 flow_dissector: implements eBPF parser This eBPF program extracts basic/control/ip address/ports keys from incoming packets. It supports recursive parsing for IP encapsulation, and VLAN, along with IPv4/IPv6 and extension headers. This program is meant to show how flow dissection and key extraction can be done in eBPF. Link: http://vger.kernel.org/netconf2017_files/rx_hardening_and_udp_gso.pdf Signed-off-by: Petar Penkov Signed-off-by: Willem de Bruijn Signed-off-by: Alexei Starovoitov commit c22fbae76c9fdef5b7406b27754db1758e041991 Author: Petar Penkov Date: Fri Sep 14 07:46:20 2018 -0700 bpf: support flow dissector in libbpf and bpftool This patch extends libbpf and bpftool to work with programs of type BPF_PROG_TYPE_FLOW_DISSECTOR. Signed-off-by: Petar Penkov Signed-off-by: Willem de Bruijn Signed-off-by: Alexei Starovoitov commit 2f965e3fcd4b4159a5ea832d4b5e9ff2550fa571 Author: Petar Penkov Date: Fri Sep 14 07:46:19 2018 -0700 bpf: sync bpf.h uapi with tools/ This patch syncs tools/include/uapi/linux/bpf.h with the flow dissector definitions from include/uapi/linux/bpf.h Signed-off-by: Petar Penkov Signed-off-by: Willem de Bruijn Signed-off-by: Alexei Starovoitov commit d58e468b1112dcd1d5193c0a89ff9f98b5a3e8b9 Author: Petar Penkov Date: Fri Sep 14 07:46:18 2018 -0700 flow_dissector: implements flow dissector BPF hook Adds a hook for programs of type BPF_PROG_TYPE_FLOW_DISSECTOR and attach type BPF_FLOW_DISSECTOR that is executed in the flow dissector path. The BPF program is per-network namespace. Signed-off-by: Petar Penkov Signed-off-by: Willem de Bruijn Signed-off-by: Alexei Starovoitov commit e4ba15debcfd27f60d43da940a58108783bff2a6 Author: Hari Vyas Date: Tue Aug 7 16:33:48 2018 +0530 arm64: fix for bad_mode() handler to always result in panic The bad_mode() handler is called if we encounter an uunknown exception, with the expectation that the subsequent call to panic() will halt the system. Unfortunately, if the exception calling bad_mode() is taken from EL0, then the call to die() can end up killing the current user task and calling schedule() instead of falling through to panic(). Remove the die() call altogether, since we really want to bring down the machine in this "impossible" case. Signed-off-by: Hari Vyas Signed-off-by: Will Deacon Signed-off-by: Catalin Marinas commit 8a60419d36762a1131c2b29f7bd14371db4df1b5 Author: Will Deacon Date: Tue Aug 14 16:24:54 2018 +0100 arm64: force_signal_inject: WARN if called from kernel context force_signal_inject() is designed to send a fatal signal to userspace, so WARN if the current pt_regs indicates a kernel context. This can currently happen for the undefined instruction trap, so patch that up so we always BUG() if we didn't have a handler. Signed-off-by: Will Deacon Signed-off-by: Catalin Marinas commit b8925ee2e12d1cb9a11d6f28b5814f2bfa59dce1 Author: Will Deacon Date: Tue Aug 7 13:53:41 2018 +0100 arm64: cpu: Move errata and feature enable callbacks closer to callers The cpu errata and feature enable callbacks are only called via their respective arm64_cpu_capabilities structure and therefore shouldn't exist in the global namespace. Move the PAN, RAS and cache maintenance emulation enable callbacks into the same files as their corresponding arm64_cpu_capabilities structures, making them static in the process. Signed-off-by: Will Deacon Signed-off-by: Catalin Marinas commit 7c36447ae5a090729e7b129f24705bb231a07e0b Author: Will Deacon Date: Wed Aug 8 16:10:54 2018 +0100 KVM: arm64: Set SCTLR_EL2.DSSBS if SSBD is forcefully disabled and !vhe When running without VHE, it is necessary to set SCTLR_EL2.DSSBS if SSBD has been forcefully disabled on the kernel command-line. Acked-by: Christoffer Dall Signed-off-by: Will Deacon Signed-off-by: Catalin Marinas commit 8f04e8e6e29c93421a95b61cad62e3918425eac7 Author: Will Deacon Date: Tue Aug 7 13:47:06 2018 +0100 arm64: ssbd: Add support for PSTATE.SSBS rather than trapping to EL3 On CPUs with support for PSTATE.SSBS, the kernel can toggle the SSBD state without needing to call into firmware. This patch hooks into the existing SSBD infrastructure so that SSBS is used on CPUs that support it, but it's all made horribly complicated by the very real possibility of big/little systems that don't uniformly provide the new capability. Signed-off-by: Will Deacon Signed-off-by: Catalin Marinas commit 0bf0f444b2c49241b2b39aa3cf210d7c95ef6c34 Author: Will Deacon Date: Tue Aug 7 13:43:06 2018 +0100 arm64: entry: Allow handling of undefined instructions from EL1 Rather than panic() when taking an undefined instruction exception from EL1, allow a hook to be registered in case we want to emulate the instruction, like we will for the SSBS PSTATE manipulation instructions. Signed-off-by: Will Deacon Signed-off-by: Catalin Marinas commit 2d1b2a91d56b19636b740ea70c8399d1df249f20 Author: Will Deacon Date: Fri Jun 15 11:50:42 2018 +0100 arm64: ssbd: Drop #ifdefs for PR_SPEC_STORE_BYPASS Now that we're all merged nicely into mainline, there's no need to check to see if PR_SPEC_STORE_BYPASS is defined. Signed-off-by: Will Deacon Signed-off-by: Catalin Marinas commit d71be2b6c0e19180b5f80a6d42039cc074a693a2 Author: Will Deacon Date: Fri Jun 15 11:37:34 2018 +0100 arm64: cpufeature: Detect SSBS and advertise to userspace Armv8.5 introduces a new PSTATE bit known as Speculative Store Bypass Safe (SSBS) which can be used as a mitigation against Spectre variant 4. Additionally, a CPU may provide instructions to manipulate PSTATE.SSBS directly, so that userspace can toggle the SSBS control without trapping to the kernel. This patch probes for the existence of SSBS and advertise the new instructions to userspace if they exist. Reviewed-by: Suzuki K Poulose Signed-off-by: Will Deacon Signed-off-by: Catalin Marinas commit ca7f686ac9fe87a9175696a8744e095ab9749c49 Author: Will Deacon Date: Fri Jun 15 11:36:43 2018 +0100 arm64: Fix silly typo in comment I was passing through and figuered I'd fix this up: featuer -> feature Signed-off-by: Will Deacon Signed-off-by: Catalin Marinas commit 69fdf4206a8ba91a277b3d50a3a05b71247635b2 Author: Chris Wilson Date: Thu Sep 13 20:20:50 2018 +0100 drm: Differentiate the lack of an interface from invalid parameter If the ioctl is not supported on a particular piece of HW/driver combination, report ENOTSUP (aka EOPNOTSUPP) so that it can be easily distinguished from both the lack of the ioctl and from a regular invalid parameter. v2: Across all the kms ioctls we had a mixture of reporting EINVAL, ENODEV and a few ENOTSUPP (most where EINVAL) for a failed drm_core_check_feature(). Update everybody to report ENOTSUPP. v3: ENOTSUPP is an internal errno! It's value (524) does not correspond to a POSIX errno, the one we want is ENOTSUP. However, uapi/asm-generic/errno.h doesn't include ENOTSUP but man errno says "ENOTSUP and EOPNOTSUPP have the same value on Linux, but according to POSIX.1 these error values should be distinct." so use EOPNOTSUPP as its equivalent. Signed-off-by: Chris Wilson Cc: Daniel Vetter Cc: Ville Syrjälä Reviewed-by: Daniel Vetter #v2 Link: https://patchwork.freedesktop.org/patch/msgid/20180913192050.24812-1-chris@chris-wilson.co.uk commit c3ec8bcceb07ab81e4ff017b4ebbacc137a5a15e Author: Ganesh Goudar Date: Fri Sep 14 17:35:55 2018 +0530 cxgb4: update supported DCB version - In CXGB4_DCB_STATE_FW_INCOMPLETE state check if the dcb version is changed and update the dcb supported version. - Also, fill the priority code point value for priority based flow control. Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller commit 992bea8e40b7f5d2ad5e59ce167556a84da388e2 Author: Ganesh Goudar Date: Fri Sep 14 14:46:04 2018 +0530 cxgb4: add per rx-queue counter for packet errors print per rx-queue packet errors in sge_qinfo Signed-off-by: Casey Leedom Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller commit 0dc235afc59a226d951352b0adf4a89b532a9d13 Author: Ganesh Goudar Date: Fri Sep 14 14:36:27 2018 +0530 cxgb4: Fix endianness issue in t4_fwcache() Do not put host-endian 0 or 1 into big endian feild. Reported-by: Al Viro Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller commit 52bb6677d530d37055092d86b4eab69dce6c166a Author: Li RongQing Date: Fri Sep 14 16:00:51 2018 +0800 net: move definition of pcpu_lstats to header file pcpu_lstats is defined in several files, so unify them as one and move to header file Signed-off-by: Zhang Yu Signed-off-by: Li RongQing Signed-off-by: David S. Miller commit 0aad5ad563c878fcb981cdbb52b4221bc0036e59 Author: Al Viro Date: Tue Sep 11 21:58:45 2018 -0400 greybus/uart: switch to ->[sg]et_serial() Reviewed-by: Johan Hovold Signed-off-by: Al Viro commit b98e5a6791473e0bdb71df5d1db48f156e2dee79 Author: Al Viro Date: Tue Sep 11 21:58:08 2018 -0400 fwserial: switch to ->[sg]et_serial() Signed-off-by: Al Viro commit 617a281104bd37ad88c2758f92e9be84cac5d123 Author: Al Viro Date: Tue Sep 11 21:56:47 2018 -0400 simserial: switch to ->[sg]et_serial() Signed-off-by: Al Viro commit 2f46a2c1d4eb982b82c199e1bd5cddab12681275 Author: Al Viro Date: Tue Sep 11 21:53:32 2018 -0400 tty_ioctl(): start taking TIOC[SG]SERIAL into separate methods ->set_serial() and ->get_serial() resp., both taking tty and a kernel pointer to serial_struct. Signed-off-by: Al Viro commit 7eaec37e04616136915ad2207417beb29445fc35 Author: Al Viro Date: Wed Sep 12 00:13:10 2018 -0400 mos7720: bury dead TIOCM... in ->ioctl() These ioctls never reach driver's ->ioctl() - tty_ioctl() handles them on its own. ->tiocm[gs]et() is what actually gets called, and mos7720 provides those, with results equivalent to what the unreachable code would be doing when called. Signed-off-by: Al Viro commit a913bc76ed7bdc0b31255268afcb7feffdc8600b Author: Al Viro Date: Tue Sep 11 19:52:54 2018 -0400 tty_ioctl(): drop FIONBIO handling That code had been live for 11 weeks back in 1992, but it had been 26 years since sys_ioctl() began handling FIONBIO on its own. Time to to bury the body, already... Signed-off-by: Al Viro commit e21120383f2dce32312f63ffca145ff8a87d41f5 Author: Al Viro Date: Tue Sep 11 19:47:09 2018 -0400 move compat handling of tty ioctls to tty_compat_ioctl() ioctls that are * callable only via tty_ioctl() * not driver-specific * not demand data structure conversions * either always need passing arg as is or always demand compat_ptr() get intercepted in tty_compat_ioctl() from the very beginning and redirecter to tty_ioctl(). As the result, their entries in fs/compat_ioctl.c (some of those had been missing, BTW) got removed, as well as n_tty_compat_ioctl_helper() (now it's never called with any cmd it would accept). Signed-off-by: Al Viro commit 0957dc7097a3f462f6cedb45cf9b9785cc29e5bb Author: Christian König Date: Fri Sep 14 12:54:33 2018 +0200 drm/amdgpu: revert "stop using gart_start as offset for the GTT domain" Turned out the commit is incomplete and since we remove using the AGP mapping from the GTT manager it is also not necessary any more. This reverts commit 22d8bfafcc12dfa17b91d2e8ae4e1898e782003a. Signed-off-by: Christian König Acked-by: Alex Deucher Acked-by: James Zhu Tested-by: James Zhu Signed-off-by: Alex Deucher commit feabaad8aae0f6b1dae681c998572d2663f4a598 Author: Christian König Date: Fri Sep 14 10:17:24 2018 +0200 drm/amdgpu: fix mask in GART location calculation We need to mask the lower bits not the upper one. Fixes: ec210e3226dc0 drm/amdgpu: put GART away from VRAM v2 Signed-off-by: Christian König Reviewed-by: Alex Deucher Acked-by: James Zhu Tested-by: James Zhu Signed-off-by: Alex Deucher commit 59d0f396b5abfb5ec4dbf3488cb4f24dc7c1aaf4 Author: Alex Deucher Date: Thu Sep 13 11:01:28 2018 -0500 drm/amdgpu/display: return proper error codes in dm Replace -1 with proper error codes. Acked-by: Huang Rui Signed-off-by: Alex Deucher commit 741deade2a704a434bd5939118c43d38e9ddac25 Author: Alex Deucher Date: Thu Sep 13 15:41:57 2018 -0500 drm/amdgpu: simplify Raven, Raven2, and Picasso handling Treat them all as Raven rather than adding a new picasso asic type. This simplifies a lot of code and also handles the case of rv2 chips with the 0x15d8 pci id. It also fixes dmcu fw handling for picasso. Acked-by: Huang Rui Signed-off-by: Alex Deucher commit 23ecdc6187ef74e00b78e889446a309628719b6e Author: Alex Deucher Date: Thu Sep 13 15:05:22 2018 -0500 drm/amdgpu/soc15: clean up picasso support It's the same as raven so remove the duplicate case. Acked-by: Huang Rui Signed-off-by: Alex Deucher commit 4d11b4b256a882800e033e003351244ae7d5d174 Author: David Francis Date: Thu Sep 13 15:37:50 2018 -0400 drm/amdgpu: Add DMCU to firmware query interface DMCU firmware version can be read using the AMDGPU_INFO ioctl or the amdgpu_firmware_info debugfs entry Signed-off-by: David Francis Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit ee6e89c0f1d18fef9206e68747577d99bbf923ea Author: David Francis Date: Thu Sep 13 15:36:27 2018 -0400 drm/amd/display: Add DMCU firmware version Read the version number from the common firmware header and store it in the dm struct Signed-off-by: David Francis Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 56ea09760076800f08c57ef2026b67d51f338810 Author: Vijetha Malkai Date: Thu Sep 13 14:47:39 2018 -0400 drm/amdgpu: Style fixes to PRIME code documentation * Use consistent capitalization in the description of function arguments * Define and consistently use the BO acronym for buffer objects * Some minor wording improvements Signed-off-by: Vijetha Malkai [ Michel Dänzer: Made commit log more specific ] Signed-off-by: Michel Dänzer Signed-off-by: Alex Deucher commit 6a15f3ff19a8dd394e3a21480512c2cb98e26b3c Author: Michel Dänzer Date: Wed Sep 12 18:07:10 2018 +0200 drm/amdgpu: Initialize fences array entries in amdgpu_sa_bo_next_hole The entries were only initialized once in amdgpu_sa_bo_new. If a fence wasn't signalled yet in the first amdgpu_sa_bo_next_hole call, but then got signalled before a later amdgpu_sa_bo_next_hole call, it could destroy the fence but leave its pointer in the array, resulting in use-after-free in amdgpu_sa_bo_new. Reviewed-by: Christian König Signed-off-by: Michel Dänzer Signed-off-by: Alex Deucher commit 520cbe0f4a7f170ec0d1167a827bcbec74aef4f4 Author: Huang Rui Date: Tue Jun 19 10:46:42 2018 -0500 drm/amdgpu: set CG flags for raven2 (v2) Raven2 does not enable all of the CG flags that raven1 does. v2: rebase (Alex) Signed-off-by: Huang Rui Reviewed-by: Feifei Xu Signed-off-by: Alex Deucher commit 89da2a505f1bdbc34819a170435eb64e596bf5c6 Author: Evan Quan Date: Tue Jun 19 10:41:00 2018 -0500 drm/amd/powerplay: disable raven2 force dpm level support (v2) It's not supported yet. v2: rebase (Alex) Signed-off-by: Evan Quan Reviewed-by: Rex Zhu Signed-off-by: Alex Deucher commit fa27203f8af9c6ed5ab88860f9a83cbc13ab786f Author: Evan Quan Date: Tue Jun 19 10:32:50 2018 -0500 drm/amd/powerplay: round up the Mhz convertion (v2) Since the clock value there may be like 29999 10Khz. v2: rebase (Alex) Signed-off-by: Evan Quan Reviewed-by: Huang Rui Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 3e9d06b56f405aa53675efdc81a5417da6fc130a Author: Evan Quan Date: Fri Jun 15 17:22:38 2018 -0500 drm/amd/powerplay: update smu10_verify_smc_interface() to be raven2 compatible Check the raven2 version number as well. Signed-off-by: Evan Quan Reviewed-by: Huang Rui Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 1a4d427dd28348b78b8bacff04e2577ed15e1ac9 Author: Bhawanpreet Lakha Date: Mon Jan 22 17:40:50 2018 -0500 drm/amd/display: Add DC config flag for Raven2 (v2) Add DRM_AMD_DC_DCN1_01 config flag for Raven2 v2: Make DC select DRM_AMD_DC_DCN1_01 (Alex) Signed-off-by: Bhawanpreet Lakha Reviewed-by: Harry Wentland Reviewed-by: Huang Rui Acked-by: Alex Deucher commit 0e3d73f1a440eaca270a028bff51649ae99df113 Author: Bhawanpreet Lakha Date: Mon Jan 22 16:12:27 2018 -0500 drm/amd/display: Add Raven2 definitions in dc Add Raven2 definitions in the dc code Signed-off-by: Bhawanpreet Lakha Reviewed-by: Harry Wentland Reviewed-by: Huang Rui Acked-by: Alex Deucher commit 760067769ebb3fad2ebf1880ad87afb309ef7b14 Author: Huang Rui Date: Tue Jan 16 10:42:58 2018 +0800 drm/amdgpu: fix the VM fault while write at the top of the invisible vram Raven2 has a HW issue that it is unable to use the vram which is out of MC_VM_SYSTEM_APERTURE_HIGH_ADDR. So here is the workaround that increase system aperture high address to get rid of the VM fault and hardware hang. Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 28ab1229c36a6538d2a964ce37967a9aefde004a Author: Feifei Xu Date: Thu Jan 4 18:36:40 2018 +0800 drm/amdgpu/gfx9: add raven2 golden setting Golden register settings from the hw team. Signed-off-by: Feifei Xu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit cf4b60c6846aaf1b52d91e035b9e257e427ec10c Author: Feifei Xu Date: Thu Jan 4 18:33:49 2018 +0800 drm/amdgpu/gfx9: add support for raven2 gfx firmware use raven2 gfx firmware. Signed-off-by: Feifei Xu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit e75279e871cee939d95204d896b4adbd150dd6ed Author: Feifei Xu Date: Thu Jan 4 18:13:41 2018 +0800 drm/amdgpu/sdma4: Add raven2 golden setting Golden register settings from the hw team. Signed-off-by: Feifei Xu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit e7497a302bf0c2abcd971ae6a08d2b260269ec82 Author: Feifei Xu Date: Thu Jan 4 18:05:35 2018 +0800 drm/amdgpu/sdma4: specify raven2 firmware. use raven2 sdma firmware. Signed-off-by: Feifei Xu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit e11fa1b68a494687cce353d5bddc12e859a9c74e Author: Likun Gao Date: Tue Jun 5 14:05:45 2018 +0800 drm/amdgpu: add psp support for raven2 Modified for using raven2_asd.bin to replace raven_asd.bin for raven2 Signed-off-by: Likun Gao Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 8b47cc9bb122e4bb970685b870484d9f31844ef0 Author: Feifei Xu Date: Fri Jun 15 16:01:41 2018 -0500 drm/amdgpu: add raven2 vcn firmware support Specify raven2 vcn firmware on amdgpu_vce_sw_init. Signed-off-by: Feifei Xu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 54c4d17e98db7a7fae85a324b7ace134b3e3f8b5 Author: Feifei Xu Date: Thu Jan 4 17:26:00 2018 +0800 drm/amdgpu: add raven2 to gpu_info firmware Add gpu_info firmware for raven2. Signed-off-by: Feifei Xu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 1879e6a7f86e8bae0760c28a73dacc4c338866d5 Author: Alex Deucher Date: Fri Jun 15 17:28:44 2018 -0500 drm/amdgpu: set external rev id for raven2 It's different from raven1. Signed-off-by: Huang Rui Reviewed-by: Feifei Xu Signed-off-by: Alex Deucher commit 4cb0becb269e7b45ff3fd15bfd2242c8b3e013d1 Author: Huang Rui Date: Fri Jun 15 16:05:48 2018 -0500 drm/amdgpu: move get_rev_id at first before load gpu_info firmware Rev id is used for identifying Raven2 series of chips. So we would better to initialize it at first. Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 44876ae294dd7d7bcdfb527d12b86beb54cd013b Author: Alex Deucher Date: Wed Sep 12 13:51:25 2018 -0500 drm/amdgpu: use IP presence to free uvd and vce handles Rather than checking the asic type, check whether the UVD or VCE IP blocks exist. This way we don't have to update the check with new asics that use VCN. Signed-off-by: Alex Deucher commit a06c3ee083b5c622bb9f4a687d7ab5265ee73dbf Author: Kenneth Feng Date: Thu Sep 6 14:56:19 2018 +0800 drm/amdgpu: enable gfxoff in non-sriov and stutter mode by default enable gfxoff in non-sriov and stutter mode by default Signed-off-by: Kenneth Feng Signed-off-by: Alex Deucher commit 367b013ce0064c782cec784233805eeb67417747 Author: Huang Rui Date: Mon Jul 9 19:51:19 2018 +0800 drm/amdgpu: add new raven series device This patch is to add new pci device for raven series. Signed-off-by: Huang Rui Signed-off-by: Likun Gao Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 40c2358b1102b65d2c173a43083894af630f0e60 Author: Huang Rui Date: Mon Jul 9 20:00:05 2018 +0800 drm/amdgpu: add ip blocks for picasso (v2) Add PCO IPs. V2: enable VCN as well Signed-off-by: Huang Rui Signed-off-by: Likun Gao Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 1a84d967c180d421a9182a227fc1fee3701cc7d6 Author: Kenneth Feng Date: Fri Aug 24 16:44:11 2018 +0800 drm/amdgpu: enable vcn powergating for PCO enable vcn pg Signed-off-by: Kenneth Feng Signed-off-by: Alex Deucher commit 91468057d39ec08ae8389a91436be2c019a1ac36 Author: Kenneth Feng Date: Mon Aug 20 15:39:32 2018 +0800 drm/amdgpu: enable mmhub power gating Remove some functions due to the design change. All the mmhub power gating sequence is moved to smu fw.Driver sends the message to enable mmhub powergating.We can also skip the fw version check since the old fw version is in a very early stage and we don't use that fw for release. Signed-off-by: Kenneth Feng Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit a4494fda32adb4e8d7441f680219b6e99ffbf6e7 Author: Kenneth Feng Date: Fri Aug 10 16:22:26 2018 +0800 drm/amdgpu: Enable SDMA power gating for PCO Enable SDMA power gating Signed-off-by: Kenneth Feng Acked-by: Huang Rui Signed-off-by: Alex Deucher commit 8c7bf5834a334dad9a1c3a2ddc93e26bdeeadd57 Author: Kenneth Feng Date: Tue Aug 7 17:05:22 2018 +0800 drm/amdgpu: Add pg support for gfxoff for PCO Add pg support for gfxoff. Signed-off-by: Kenneth Feng Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit b95874cfa83e9096b7654cd79e35157c918005f5 Author: Likun Gao Date: Tue Jul 10 20:34:10 2018 +0800 drm/amdgpu: add picasso for amdgpu kms Add picasso for amdgpu kms Signed-off-by: Likun Gao Reviewed-by: Alex Deucher Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 84ad2e1bd6e6fededa7ed389d0a171d0822abaac Author: Likun Gao Date: Tue Jul 10 20:30:42 2018 +0800 drm/amdgpu: add picasso support for sdma_v4 Add sdma support to picasso Signed-off-by: Likun Gao Reviewed-by: Alex Deucher Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 501a580ae6a4087ed7c8e4fdcf3de7a5ca56bdd1 Author: Likun Gao Date: Tue Jul 10 20:29:12 2018 +0800 drm/amdgpu: add picasso support for gfx_v9_0 Add gfx support to picasso Signed-off-by: Likun Gao Reviewed-by: Alex Deucher Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit e21f561ad52a6c909c64d2856a3ad03a4042a5df Author: Likun Gao Date: Tue Jul 10 20:26:41 2018 +0800 drm/amdgpu: add picasso support for gmc Same as raven. Signed-off-by: Likun Gao Reviewed-by: Alex Deucher Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 79f3641cc03881ba98aa549a149b34c838b7d7fb Author: Likun Gao Date: Tue Jul 10 20:25:24 2018 +0800 drm/amdgpu: add clockgating support for picasso Treat it the same as raven for now. Signed-off-by: Likun Gao Reviewed-by: Alex Deucher Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 86771d9a58fa8f6b2b871f72c6beaf269f309718 Author: Likun Gao Date: Tue Jul 10 20:17:13 2018 +0800 drm/amdgpu: add picasso support for vcn Add vcn support for picasso. Signed-off-by: Likun Gao Reviewed-by: Alex Deucher Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 669018bdcd858def1c43d130b4cc29409ed8c036 Author: Likun Gao Date: Tue Jul 10 20:15:45 2018 +0800 drm/amdgpu: add picasso ucode loading method Same as raven. Signed-off-by: Likun Gao Reviewed-by: Alex Deucher Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 227f3dc5f615eb31e007f5db4da7297c66a36e24 Author: Likun Gao Date: Tue Jul 10 20:12:38 2018 +0800 drm/amdgpu: initilize picasso psp firmwares support Same as raven for now. Signed-off-by: Likun Gao Reviewed-by: Alex Deucher Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 186b073decbf7573971b1786ffeb2fe776d0d9e7 Author: Likun Gao Date: Tue Jul 10 19:25:29 2018 +0800 drm/amdgpu: Add support of powerplay for picasso add powerplay support for picasso, treat it the same as raven now. Signed-off-by: Likun Gao Reviewed-by: Alex Deucher Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit b22ab73314c0dfa91ac1948812c7e8050240c563 Author: Likun Gao Date: Tue Jul 10 20:32:06 2018 +0800 drm/amd/display/dm: add picasso support Add support for picasso to the display manager. Signed-off-by: Likun Gao Reviewed-by: Alex Deucher Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 5f4e2085eeab8c6386452bc18f4f680d1ea3b9d2 Author: Likun Gao Date: Tue Jul 10 20:20:16 2018 +0800 drm/amdgpu: add picasso support for vm Add vm support for picasso. Signed-off-by: Likun Gao Reviewed-by: Alex Deucher Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit ad5a67a7ea87e625721a5d0c4e9f12100372f1f6 Author: Likun Gao Date: Tue Jul 10 20:22:36 2018 +0800 drm/amdgpu: add soc15 support for picasso Add the IP blocks, clock and powergating flags, and common clockgating support. Signed-off-by: Likun Gao Reviewed-by: Alex Deucher Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit be9699e3923000ea32c2f4522e1e4de333d21d47 Author: Likun Gao Date: Tue Jul 10 20:10:05 2018 +0800 drm/amdgpu: add picasso to asic_type enum Add picasso to amd_asic_type enum and amdgpu_asic_name[]. Signed-off-by: Likun Gao Reviewed-by: Alex Deucher Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 8db601f09127eb974e6fcf7fb30c70344d5727f6 Author: Chris Wilson Date: Fri Sep 14 09:00:17 2018 +0100 drm/i915/execlists: Reset CSB pointers on canceling requests (wedging) The prior assumption was that we did not need to reset the CSB on wedging when cancelling the outstanding requests as it would be cleaned up in the subsequent reset prior to restarting the GPU. However, what was not accounted for was that in preparing for the reset, we would try to process the outstanding CSB entries. If the GPU happened to complete a CS event just as we were performing the cancellation of requests, that event would be kept in the CSB until the reset -- but our bookkeeping was cleared, causing confusion when trying to complete the CS event. v2: Use a sanitize on unwedge to avoid interfering with eio suspend (where we intentionally disable GPU reset). Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107925 Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Joonas Lahtinen Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20180914080017.30308-3-chris@chris-wilson.co.uk commit 6029b7ac292abd36f8dff7f75e83dfd01332b265 Author: Thomas Petazzoni Date: Wed Aug 29 10:14:48 2018 +0200 MAINTAINERS: remove myself as staging FBTFT maintainer Even though I did introduce the fbtft code in staging a while ago to stop seeing this being developed out-of-tree, I don't intend to maintain it, and I don't use it actively. So be honest and remove myself from the MAINTAINERS file for this subsystem. Signed-off-by: Thomas Petazzoni Signed-off-by: Greg Kroah-Hartman commit 7adb05bb813d1ba4863c8914eead6139d3d5f8ff Author: Stephen Boyd Date: Wed Aug 15 13:37:08 2018 -0700 firmware: coreboot: Only populate devices in coreboot_table_init() This function checks the header for sanity, registers a bus, and populates devices for each coreboot table entry. Let's just populate devices here and pull the other bits up into the caller so that this function can be repurposed for pure device creation and registration. Cc: Wei-Ning Huang Cc: Julius Werner Cc: Brian Norris Cc: Samuel Holland Suggested-by: Julius Werner Signed-off-by: Stephen Boyd Reviewed-by: Julius Werner Signed-off-by: Greg Kroah-Hartman commit a7d9b5f0120eea9f0f58c2ed2b98d2fc86389af3 Author: Stephen Boyd Date: Wed Aug 15 13:37:07 2018 -0700 firmware: coreboot: Remap RAM with memremap() instead of ioremap() This is all system memory, so we shouldn't be mapping this all with ioremap() as these aren't I/O regions. Instead, they're memory regions so we should use memremap(). Pick MEMREMAP_WB so we can map memory from RAM directly if that's possible, otherwise it falls back to ioremap_cache() like is being done here already. This also nicely silences the sparse warnings in this code and reduces the need to copy anything around anymore. Cc: Wei-Ning Huang Cc: Julius Werner Cc: Brian Norris Cc: Samuel Holland Signed-off-by: Stephen Boyd Reviewed-by: Julius Werner Signed-off-by: Greg Kroah-Hartman commit a28aad66da8bd19b249670d003bb9a698bdda397 Author: Stephen Boyd Date: Wed Aug 15 13:37:06 2018 -0700 firmware: coreboot: Collapse platform drivers into bus core The DT based and ACPI based platform drivers here do the same thing; map some memory and hand it over to the coreboot bus to populate devices. The only major difference is that the DT based driver doesn't map the coreboot table header to figure out how large of a region to map for the whole coreboot table and it uses of_iomap() instead of ioremap_cache(). A cached or non-cached mapping shouldn't matter here and mapping some smaller region first before mapping the whole table is just more work but should be OK. In the end, we can remove two files and combine the code all in one place making it easier to reason about things. We leave the old Kconfigs in place for a little while longer but make them hidden and select the previously hidden config option. This way users can upgrade without having to know to reselect this config in the future. Later on we can remove the old hidden configs. Cc: Wei-Ning Huang Cc: Julius Werner Cc: Brian Norris Cc: Samuel Holland Signed-off-by: Stephen Boyd Reviewed-by: Julius Werner Signed-off-by: Greg Kroah-Hartman commit b81e3140e4128921f25119a2b5ae0049f8373d1a Author: Stephen Boyd Date: Wed Aug 15 13:37:05 2018 -0700 firmware: coreboot: Make bus registration symmetric The bus is registered in module_init() but is unregistered when the platform driver remove() function calls coreboot_table_exit(). That isn't symmetric and it causes the bus to appear on systems that compile this code in, even when there isn't any coreboot firmware on the device. Let's move the registration to the coreboot_table_init() function so that it matches the exit path. Cc: Wei-Ning Huang Cc: Julius Werner Cc: Brian Norris Cc: Samuel Holland Signed-off-by: Stephen Boyd Reviewed-by: Julius Werner Signed-off-by: Greg Kroah-Hartman commit 20edec388277b62ddfddb8b2b376a937a2cd6d1b Author: Stephen Boyd Date: Wed Aug 15 13:37:04 2018 -0700 firmware: coreboot: Unmap ioregion after device population Both callers of coreboot_table_init() ioremap the pointer that comes in but they don't unmap the memory on failure. Both of them also fail probe immediately with the return value of coreboot_table_init(), leaking a mapping when it fails. The mapping isn't necessary at all after devices are populated either, so we can just drop the mapping here when we exit the function. Let's do that to simplify the code a bit and plug the leak. Cc: Wei-Ning Huang Cc: Julius Werner Cc: Brian Norris Cc: Samuel Holland Fixes: 570d30c2823f ("firmware: coreboot: Expose the coreboot table as a bus") Signed-off-by: Stephen Boyd Reviewed-by: Julius Werner Signed-off-by: Greg Kroah-Hartman commit 09ed061a4f56d50758851ca3997510f27115f81b Author: Stephen Boyd Date: Wed Aug 15 13:37:03 2018 -0700 firmware: coreboot: Let OF core populate platform device Now that the /firmware/coreboot node in DT is populated by the core DT platform code with commit 3aa0582fdb82 ("of: platform: populate /firmware/ node from of_platform_default_populate_init()") we should and can remove the platform device creation here. Otherwise, the of_platform_device_create() call will fail, the coreboot of driver won't be registered, and this driver will never bind. At the same time, we should move this driver to use MODULE_DEVICE_TABLE so that module auto-load works properly when the coreboot device is auto-populated and we should drop the of_node handling that was presumably placed here to hold a reference to the DT node created during module init that no longer happens. Cc: Wei-Ning Huang Cc: Julius Werner Reviewed-by: Brian Norris Cc: Samuel Holland Reviewed-by: Sudeep Holla Fixes: 3aa0582fdb82 ("of: platform: populate /firmware/ node from of_platform_default_populate_init()") Signed-off-by: Stephen Boyd Reviewed-by: Julius Werner Signed-off-by: Greg Kroah-Hartman commit c79661eb5060e2bf18875d86caf3324b4ab4c03f Author: Geert Uytterhoeven Date: Tue Sep 11 16:37:30 2018 +0200 arm64: dts: renesas: Remove unneeded status from thermal nodes The thermal device is supposed to be always enabled. As the default value of the status property is "okay", there is no need to make this explicit in SoC-specific .dtsi files where no override is involved. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit dbd71398bdd44a54734eff6610ee04371047cecc Author: Michael Hennerich Date: Tue Aug 14 13:30:18 2018 +0200 drivers: misc: ad525x_dpot: Update MODULE AUTHOR email address no functional changes Signed-off-by: Michael Hennerich Signed-off-by: Greg Kroah-Hartman commit 99aeebe8140c642cdf2c3822b1dcbd37433fe770 Author: zhong jiang Date: Fri Aug 17 11:42:35 2018 +0800 misc: sgi-xp: remove meaningless null check before kfree kfree has taken null pointer into account. so check the null pointer before kfree is meaningless. Signed-off-by: zhong jiang Acked-by: Robin Holt Signed-off-by: Greg Kroah-Hartman commit 2e6ae11dd0d1c37f44cec51a58fb2092e55ed0f5 Author: Arnd Bergmann Date: Mon Aug 20 11:35:37 2018 +0200 slimbus: ngd: mark PM functions as __maybe_unused qcom_slim_ngd_runtime_suspend is protected by an #ifdef, qcom_slim_ngd_runtime_idle is now, which causes a build time warning: drivers/slimbus/qcom-ngd-ctrl.c:1470:12: error: 'qcom_slim_ngd_runtime_idle' defined but not used [-Werror=unused-function] Marking both as __maybe_unused lets us get rid of the warning as well as the #ifdef. Fixes: 917809e2280b ("slimbus: ngd: Add qcom SLIMBus NGD driver") Signed-off-by: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman commit 9aa2126f16daeb8cd3027a70a2629130b0e618d9 Author: Phil Edworthy Date: Mon Sep 10 17:02:54 2018 +0100 ARM: dts: r9a06g032: Correct UART and add all other UARTs - UART0 was missing the bus clock ("apb_pclk"). - Use recently accepted r9a06g032 and rzn1 compat strings. - Add all the other UARTs. Signed-off-by: Phil Edworthy [simon: updated changelog] Signed-off-by: Simon Horman commit f37d211c687588328c083f4523c4a26620dc5bb6 Author: Fabrizio Castro Date: Mon Sep 10 15:41:27 2018 +0100 soc: renesas: rcar-sysc: Add r8a774c0 support Add support for the RZ/G2E (R8A774C0) SoC power areas to the R-Car SYSC driver. Signed-off-by: Fabrizio Castro Reviewed-by: Biju Das Signed-off-by: Simon Horman commit 39dc9a103bc587d32a0416c5a47483a6e9ef88e2 Author: Fabrizio Castro Date: Mon Sep 10 15:41:28 2018 +0100 dt-bindings: power: rcar-sysc: Document r8a774c0 sysc Document bindings for the RZ/G2E (a.k.a. R8A774C0) system controller. Signed-off-by: Fabrizio Castro Reviewed-by: Biju Das Signed-off-by: Simon Horman commit bfb8e83847931ac854810dfa37f7cbd56bcc2f1f Author: Roman Kiryanov Date: Mon Aug 27 11:23:15 2018 -0700 platform: goldfish: pipe: Replace "x==NULL" to "!x" checkpatch: Comparison to NULL could be written "!x" Signed-off-by: Roman Kiryanov Signed-off-by: Greg Kroah-Hartman commit cc14057f514bc8500bd792b06409557114ec4b53 Author: Roman Kiryanov Date: Mon Aug 27 11:23:14 2018 -0700 platform: goldfish: pipe: Move logical ops to the end of the prev line checkpatch: Logical continuations should be on the previous line Signed-off-by: Roman Kiryanov Signed-off-by: Greg Kroah-Hartman commit 52bcc7d942f09c03d558fe43843b13a60ac1a351 Author: Roman Kiryanov Date: Mon Aug 27 11:23:13 2018 -0700 platform: goldfish: pipe: Fix alignment to match parenthesis checkpatch: Alignment should match open parenthesis. Signed-off-by: Roman Kiryanov Signed-off-by: Greg Kroah-Hartman commit 562a74de9757d1ab92a2061ed48e8592827064e1 Author: Roman Kiryanov Date: Mon Aug 27 11:23:12 2018 -0700 platform: goldfish: pipe: Fix lines to not end an opening bracket checkpatch: Lines should not end with a '(' or '[' Signed-off-by: Roman Kiryanov Signed-off-by: Greg Kroah-Hartman commit 92c320b97eb3103d68aab1a69347d1ad3b5c489e Author: Roman Kiryanov Date: Mon Aug 27 11:23:11 2018 -0700 platform: goldfish: pipe: Rename goldfish_x to goldfish_pipe_x Add "pipe" to the pipe related function names. Signed-off-by: Roman Kiryanov Signed-off-by: Greg Kroah-Hartman commit a0739604f48918a9b47867d28fd0c59d33ef9640 Author: Roman Kiryanov Date: Mon Aug 27 11:23:10 2018 -0700 platform: goldfish: pipe: Remove reduntant casting to (void) Casting to (void) is no-op. Signed-off-by: Roman Kiryanov Signed-off-by: Greg Kroah-Hartman commit 61b38f027f85bb64e67e14a61a5abf4616bb331a Author: Roman Kiryanov Date: Mon Aug 27 11:23:09 2018 -0700 platform: goldfish: pipe: Rename 'wakeBit' to 'wake_bit' checkpatch: Avoid CamelCase Signed-off-by: Roman Kiryanov Signed-off-by: Greg Kroah-Hartman commit 1d1021a0f9177f6082c7baed7f781794cd32b5cd Author: Roman Kiryanov Date: Mon Aug 27 11:23:08 2018 -0700 platform: goldfish: pipe: Remove a blank line before '}' checkpatch: Blank lines aren't necessary before a close brace '}' Signed-off-by: Roman Kiryanov Signed-off-by: Greg Kroah-Hartman commit 468e62f92e90232260cd2dab49b7ca2fdf086c63 Author: Roman Kiryanov Date: Mon Aug 27 11:23:07 2018 -0700 platform: goldfish: pipe: Remove reduntant casting Casting to u32 is not required here. Signed-off-by: Roman Kiryanov Signed-off-by: Greg Kroah-Hartman commit 610a72b70733b6d5b7d3a1ee93f2e6daa2742ef3 Author: Roman Kiryanov Date: Mon Aug 27 11:23:06 2018 -0700 platform: goldfish: pipe: Replace two code blocks with a function call Two function calls look cleaner because the function introduces takes case of all bit shifting and casting. Signed-off-by: Roman Kiryanov Signed-off-by: Greg Kroah-Hartman commit 2ed43e53e35907456389dc9d8733d2221e6ec0e7 Author: Roman Kiryanov Date: Mon Aug 27 11:23:05 2018 -0700 platform: goldfish: pipe: Remove a redundant variable The variable was not very useful. Signed-off-by: Roman Kiryanov Signed-off-by: Greg Kroah-Hartman commit 46928cc6ff6d3734eda0194f4dce840989d4f19d Author: Roman Kiryanov Date: Mon Aug 27 11:23:04 2018 -0700 platform: goldfish: pipe: Add blank lines to separate struct members To improve readability and to be consistent with other struct members. Signed-off-by: Roman Kiryanov Signed-off-by: Greg Kroah-Hartman commit 25b97d57065ef5ee8554bf0c7c76e7f3fe6b974c Author: Roman Kiryanov Date: Mon Aug 27 11:23:03 2018 -0700 platform: goldfish: pipe: Replace pr_ with dev_ for logging dev_ is preferred if struct device is available. Signed-off-by: Roman Kiryanov Signed-off-by: Greg Kroah-Hartman commit 869fd5023a719a8d2af602ce95afba98751c33fc Author: Roman Kiryanov Date: Mon Aug 27 11:23:02 2018 -0700 platform: goldfish: pipe: Replace an array of 1 with a variable There is no reason to have an array of 1. Signed-off-by: Roman Kiryanov Signed-off-by: Greg Kroah-Hartman commit d23069a5a53b652e3802be039830b69dd17e1a3d Author: Roman Kiryanov Date: Mon Aug 27 11:23:01 2018 -0700 platform: goldfish: pipe: Fail compilation if structs are too large Since the driver provides no workaround prevent in cases if structs do no fit into a memory page, it is better to fail complation to find about the issue earlt instead of returning errors at runtime. Signed-off-by: Roman Kiryanov Signed-off-by: Greg Kroah-Hartman commit 84ae527aa58c0f790233fec287d3a060a7501baa Author: Roman Kiryanov Date: Mon Aug 27 11:23:00 2018 -0700 platform: goldfish: pipe: Update the comment for GFP_ATOMIC Provide an explanation why GFP_ATOMIC is needed to prevent changing it to other values. Signed-off-by: Roman Kiryanov Signed-off-by: Greg Kroah-Hartman commit 95577010a45c70356602dbe0d2e8860ba9c0851d Author: Roman Kiryanov Date: Mon Aug 27 11:22:59 2018 -0700 platform: goldfish: pipe: Separate the host interface to a separate header These are several enums that must kept in sync with the host side. This change explicitly separates them into a dedicated header file. Signed-off-by: Roman Kiryanov Signed-off-by: Greg Kroah-Hartman commit 53bdf6686ef49c72f7dc3bb3dc2b3817425aa599 Author: Roman Kiryanov Date: Mon Aug 27 11:22:58 2018 -0700 platform: goldfish: pipe: Move an opening brace to the next line checkpatch: Function's opening brace has to be at the beginning of the next line. Signed-off-by: Roman Kiryanov Signed-off-by: Greg Kroah-Hartman commit c3c4e307dbb686fb92901649e0241d8aa384ad03 Author: Roman Kiryanov Date: Mon Aug 27 11:22:57 2018 -0700 platform: goldfish: pipe: Update license goldfish_pipe is distributed under GPL v2. Signed-off-by: Roman Kiryanov Signed-off-by: Greg Kroah-Hartman commit ed824215658cf2e5fb670e40b26bf99f7210d856 Author: Roman Kiryanov Date: Mon Aug 27 11:22:56 2018 -0700 platform: goldfish: pipe: Fix comments to fit 80 columns Some comment lines are longer than 80 symbols. Signed-off-by: Roman Kiryanov Signed-off-by: Greg Kroah-Hartman commit cb391265bca42f17c59d90e842a6bc582e3e2211 Author: Fabrizio Castro Date: Mon Sep 10 15:41:26 2018 +0100 dt-bindings: power: Add r8a774c0 SYSC power domain definitions This patch adds power domain indices for RZ/G2E. Signed-off-by: Fabrizio Castro Reviewed-by: Biju Das Signed-off-by: Simon Horman commit 5791bad4bc1f624969c875616d1032227f23c25e Author: Chris Wilson Date: Fri Sep 14 13:40:07 2018 +0100 drm/i915: Include fence-hint for timeout warning If an asynchronous wait on a foriegn fence, we print a warning indicating which fence was not signaled. As i915_sw_fences become more common, include the debug hint (the symbol-name of the target) to help identify the waiter. E.g. [ 31.968144] Asynchronous wait on fence sw_sync:gem_eio:1 timed out (hint:submit_notify [i915]) We also want to downgrade from a warning to a notice (normal but significant condition) as the timeout is imposed and controlled by the caller (i.e. it is deliberate) and can be provoked by userspace. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20180914124007.18790-1-chris@chris-wilson.co.uk commit 05e2ec3b00edb277b325489e0d1de3570ad16359 Author: Gustavo A. R. Silva Date: Thu Sep 13 13:43:47 2018 -0500 ALSA: atiixp: fix fall-through annotations Replace "fallthru" with a proper "fall through" annotation. This fix is part of the ongoing efforts to enabling -Wimplicit-fallthrough Signed-off-by: Gustavo A. R. Silva Signed-off-by: Takashi Iwai commit aa2eb86060f4473aa22d70164478bc14ce4bb8f8 Author: Rob Herring Date: Mon Aug 27 20:52:32 2018 -0500 misc: 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: Frederic Barrat Cc: Arnd Bergmann Cc: Greg Kroah-Hartman Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Rob Herring Acked-by: Andrew Donnellan Signed-off-by: Greg Kroah-Hartman commit 162aa53b1840612b231b992776acb50528ab2de4 Author: Colin Ian King Date: Mon Sep 3 09:34:02 2018 +0200 firmware: google: make structure gsmi_dev static The structure gsmi_dev is local to the source and does not need to be in global scope, so make it static. Cleans up sparse warning: symbol 'gsmi_dev' was not declared. Should it be static? Signed-off-by: Colin Ian King Signed-off-by: Jean Delvare Signed-off-by: Greg Kroah-Hartman commit a71bcc1b09497d5cb7f24a7a6ce74d8ebd99d457 Author: Ding Xiang Date: Thu Sep 6 16:51:10 2018 +0800 vme: remove unneeded kfree put_device will call vme_dev_release to free vdev, kfree is unnecessary here. Signed-off-by: Ding Xiang Signed-off-by: Greg Kroah-Hartman commit 666424abfb863e3e51fcd35baad5f242fc69d314 Author: Chris Wilson Date: Fri Sep 14 13:35:04 2018 +0100 drm/i915/execlists: Use coherent writes into the context image That we use a WB mapping for updating the RING_TAIL register inside the context image even on !llc machines has been a source of consternation for every reader. It appears to work on bsw+, but it may just have been that we have been incredibly bad at detecting the errors. v2: With extra enthusiasm. v3: Drop force of map type for pinned default_state as by the time we pin it, the map type is always WB and doesn't conflict with the earlier use by ce->state. v4: Transfer engine->default_state from MAP_WC to MAP_WB on creation so we do not need the MAP_FORCE littered around the backends Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20180914123504.2062-3-chris@chris-wilson.co.uk commit 37d7c9cc2eb6620bf1130de1ca28eb1da0b8ede8 Author: Chris Wilson Date: Fri Sep 14 13:35:03 2018 +0100 drm/i915: Check engine->default_state mapping on module load Check we can indeed acquire a WB mapping of the context image on module load. Later this will give us the opportunity to validate that we can switch from WC to WB as required. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20180914123504.2062-2-chris@chris-wilson.co.uk commit dee60ca1f35234d890977c095410ed6ac1dcfc33 Author: Chris Wilson Date: Fri Sep 14 13:35:02 2018 +0100 drm/i915/execlists: Delay updating ring register state after resume Now that we reload both RING_HEAD and RING_TAIL when rebinding the context, we do not need to scrub those registers immediately on resume. v2: Handle the perma-pinned contexts. v3: Set RING_TAIL on context-pin so that we always have known state in the context image for the ring registers and all parties have similar code (ripe for refactoring). Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Mika Kuoppala Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20180914123504.2062-1-chris@chris-wilson.co.uk commit b7e6a8961b5d6dd3fc535970e65d497d868bb49f Author: Martijn Coenen Date: Fri Sep 7 15:38:37 2018 +0200 binder: Add BINDER_GET_NODE_INFO_FOR_REF ioctl. This allows the context manager to retrieve information about nodes that it holds a reference to, such as the current number of references to those nodes. Such information can for example be used to determine whether the servicemanager is the only process holding a reference to a node. This information can then be passed on to the process holding the node, which can in turn decide whether it wants to shut down to reduce resource usage. Signed-off-by: Martijn Coenen Signed-off-by: Greg Kroah-Hartman commit 6b6642dadd685af885367d6e30f18553e2a23b22 Author: Rasmus Villemoes Date: Fri Sep 7 10:01:46 2018 +0200 android: binder: use kstrdup instead of open-coding it Signed-off-by: Rasmus Villemoes Signed-off-by: Greg Kroah-Hartman commit 44d8047f1d87adc2fd7eccc88533794f6d88c15e Author: Todd Kjos Date: Tue Aug 28 13:46:25 2018 -0700 binder: use standard functions to allocate fds Binder uses internal fs interfaces to allocate and install fds: __alloc_fd __fd_install __close_fd get_files_struct put_files_struct These were used to support the passing of fds between processes as part of a transaction. The actual allocation and installation of the fds in the target process was handled by the sending process so the standard functions, alloc_fd() and fd_install() which assume task==current couldn't be used. This patch refactors this mechanism so that the fds are allocated and installed by the target process allowing the standard functions to be used. The sender now creates a list of fd fixups that contains the struct *file and the address to fixup with the new fd once it is allocated. This list is processed by the target process when the transaction is dequeued. A new error case is introduced by this change. If an async transaction with file descriptors cannot allocate new fds in the target (probably due to out of file descriptors), the transaction is discarded with a log message. In the old implementation this would have been detected in the sender context and failed prior to sending. Signed-off-by: Todd Kjos Signed-off-by: Greg Kroah-Hartman commit 44b73962cb25f1c8170ea695c4564b05a75e1fd4 Author: Sherry Yang Date: Mon Aug 13 17:28:53 2018 -0700 android: binder: no outgoing transaction when thread todo has transaction When a process dies, failed reply is sent to the sender of any transaction queued on a dead thread's todo list. The sender asserts that the received failed reply corresponds to the head of the transaction stack. This assert can fail if the dead thread is allowed to send outgoing transactions when there is already a transaction on its todo list, because this new transaction can end up on the transaction stack of the original sender. The following steps illustrate how this assertion can fail. 1. Thread1 sends txn19 to Thread2 (T1->transaction_stack=txn19, T2->todo+=txn19) 2. Without processing todo list, Thread2 sends txn20 to Thread1 (T1->todo+=txn20, T2->transaction_stack=txn20) 3. T1 processes txn20 on its todo list (T1->transaction_stack=txn20->txn19, T1->todo=) 4. T2 dies, T2->todo cleanup attempts to send failed reply for txn19, but T1->transaction_stack points to txn20 -- assertion failes Step 2. is the incorrect behavior. When there is a transaction on a thread's todo list, this thread should not be able to send any outgoing synchronous transactions. Only the head of the todo list needs to be checked because only threads that are waiting for proc work can directly receive work from another thread, and no work is allowed to be queued on such a thread without waking up the thread. This patch also enforces that a thread is not waiting for proc work when a work is directly enqueued to its todo list. Acked-by: Arve Hjønnevåg Signed-off-by: Sherry Yang Reviewed-by: Martijn Coenen Signed-off-by: Greg Kroah-Hartman commit 009e451c4ff6b7f145eae8db2a90fdbe44e312d4 Author: Igor Stoppa Date: Fri Sep 7 20:08:20 2018 +0300 staging: octeon-hcd: remove unnecessary unlikely() WARN_ON() already contains an unlikely(), so it's not necessary to wrap it into another. Signed-off-by: Igor Stoppa Cc: Aaro Koskinen Cc: Greg Kroah-Hartman Cc: devel@driverdev.osuosl.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Greg Kroah-Hartman commit 1c5fb66afa2a1d1860cff46ef426117b11e029aa Author: Linus Walleij Date: Thu Sep 13 13:58:21 2018 +0200 pinctrl: Include nothing else These drivers are GPIO drivers, and the do not need to use the legacy header in , go directly for instead. Replace any use of GPIOF_* with 0/1, these flags are for consumers, not drivers. Get rid of a few gpio_to_irq() users that was littering around the place, use local callbacks or avoid using it at all. Signed-off-by: Linus Walleij commit 00d78ab2ba756af7b9a4dacd437b7a882bd18a4b Author: Masahiro Yamada Date: Wed Sep 12 15:43:30 2018 +0900 kbuild: remove dead code in cmd_files calculation in top Makefile Nobody sets 'targets' in the top-level Makefile or arch/*/Makefile, hence $(targets) is empty. $(wildcard .*.cmd) will do for including the .vmlinux.cmd file. Signed-off-by: Masahiro Yamada commit 25815cf5ffecfb8b54314ee1b7cf14c78681fbb6 Author: Masahiro Yamada Date: Wed Sep 12 15:43:29 2018 +0900 kbuild: hide most of targets when running config or mixed targets When mixed/config targets are being processed, the top Makefile does not need to parse the rest of targets. Signed-off-by: Masahiro Yamada commit 22495b68f954c9018fd52bc620292cc80df2e418 Author: Chris Wilson Date: Fri Sep 14 09:00:16 2018 +0100 drm/i915: Flush the tasklet when checking for idle In order to reduce latency when checking for idle we kick the tasklet directly. Sometimes this is not enough as it is queued on another cpu and so to improve the accuracy of this idle-check (and so to reduce latency overall by avoiding another pass, or worse declaring a timeout!) wait for the tasklet to complete. References: https://bugs.freedesktop.org/show_bug.cgi?id=107916 Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Mika Kuoppala Cc: Michel Thierry Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20180914080017.30308-2-chris@chris-wilson.co.uk commit 11abf0c5a021af683b8fe12b0d30fb1226d60e0f Author: Chris Wilson Date: Fri Sep 14 09:00:15 2018 +0100 drm/i915: Limit the backpressure for i915_request allocation If we try and fail to allocate a i915_request, we apply some backpressure on the clients to throttle the memory allocations coming from i915.ko. Currently, we wait until completely idle, but this is far too heavy and leads to some situations where the only escape is to declare a client hung and reset the GPU. The intent is to only ratelimit the allocation requests and to allow ourselves to recycle requests and memory from any long queues built up by a client hog. Although the system memory is inherently a global resources, we don't want to overly penalize an unlucky client to pay the price of reaping a hog. To reduce the influence of one client on another, we can instead of waiting for the entire GPU to idle, impose a barrier on the local client. (One end goal for request allocation is for scalability to many concurrent allocators; simultaneous execbufs.) To prevent ourselves from getting caught out by long running requests (requests that may never finish without userspace intervention, whom we are blocking) we need to impose a finite timeout, ideally shorter than hangcheck. A long time ago Paul McKenney suggested that RCU users should ratelimit themselves using judicious use of cond_synchronize_rcu(). This gives us the opportunity to reduce our indefinite wait for the GPU to idle to a wait for the RCU grace period of the previous allocation along this timeline to expire, satisfying both the local and finite properties we desire for our ratelimiting. There are still a few global steps (reclaim not least amongst those!) when we exhaust the immediate slab pool, at least now the wait is itself decoupled from struct_mutex for our glorious highly parallel future! Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106680 Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Joonas Lahtinen Cc: Daniel Vetter Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20180914080017.30308-1-chris@chris-wilson.co.uk commit c6e3194a3b55a9365e40c3a25f8e31afa154c26c Author: Kieran Bingham Date: Mon Aug 20 17:00:44 2018 +0100 drm: rcar-du: Add interlaced feature flag Upcoming implementations of the R-Car DU have removed support for interlaced display pipelines. Provide a means to determine this based on the feature flags of the hardware configuration structs. Signed-off-by: Kieran Bingham Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart commit c14f63abebb3e393eede4fff2b0c448d42b085e9 Author: Kieran Bingham Date: Mon Aug 20 17:00:43 2018 +0100 drm: rcar-du: Refactor Feature and Quirk definitions These flags are represented by bit fields. To make this clear, utilise the BIT() macro. Signed-off-by: Kieran Bingham Reviewed-by: Laurent Pinchart Reviewed-by: Simon Horman Signed-off-by: Laurent Pinchart commit 4e86c208ddf2da6683a0ee6f8696a9f1b4444018 Author: Kieran Bingham Date: Fri Aug 3 12:37:30 2018 +0100 drm: rcar-du: Support interlaced video output through vsp1 Use the newly exposed VSP1 interface to enable interlaced frame support through the VSP1 LIF pipelines. The DSMR register is updated to set the ODEV flag on interlaced pipelines, thus defining an interlaced stream as having the ODD field located in the second half (BOTTOM) of the frame buffer. Signed-off-by: Kieran Bingham Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart commit 0bbce9eb7738b1a9f4c03dc9fb28cd93bd19ac8a Author: Kuninori Morimoto Date: Thu Jul 26 02:37:32 2018 +0000 drm: rcar-du: Convert to SPDX identifiers Kconfig doesn't have license line, thus, it is GPL-2.0 as default. rcar_du_regs.h, rcar_lvds_regs.h are GPL-2.0, and all other files are GPL-2.0+ as original license. Signed-off-by: Kuninori Morimoto Acked-by: Laurent Pinchart Reviewed-by: Simon Horman Signed-off-by: Laurent Pinchart commit d7cfd259048b6f774c9a0c95f1356c386341942b Author: Kuninori Morimoto Date: Mon Aug 6 03:18:22 2018 +0000 drm: panel-lvds: convert to SPDX identifiers Signed-off-by: Kuninori Morimoto Acked-by: Laurent Pinchart Reviewed-by: Simon Horman Signed-off-by: Laurent Pinchart commit 59104f239b9ed6cf3986e4228173ff2f4c95039e Author: Kuninori Morimoto Date: Thu Jul 26 02:37:49 2018 +0000 drm: shmobile: convert to SPDX identifiers Signed-off-by: Kuninori Morimoto Acked-by: Laurent Pinchart Reviewed-by: Simon Horman Signed-off-by: Laurent Pinchart commit ab77eb4c4de77a3095abbc213b8f191c58ebdca1 Author: Sergei Shtylyov Date: Tue Jun 5 23:28:58 2018 +0300 dt-bindings: display: renesas: lvds: document R8A77980 bindings Document the R-Car V3H (R8A77980) SoC in the R-Car LVDS bindings. Signed-off-by: Sergei Shtylyov Acked-by: Rob Herring Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart commit 4ffe5aa53791ac5ab2c29e99f23c07cb85922dd5 Author: Sergei Shtylyov Date: Mon Jun 4 22:04:59 2018 +0300 dt-bindings: display: renesas: du: document R8A77980 bindings Document the R-Car V3H (R8A77980) SoC in the R-Car DU bindings; the DU hardware has the same topology as in the R-Car V3M (R8A77970). Signed-off-by: Sergei Shtylyov Reviewed-by: Simon Horman Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart commit 7408e252ddf29ae9d6e0ca5c4223aa460ef47043 Author: Kieran Bingham Date: Mon Aug 6 15:39:01 2018 +0100 MAINTAINERS: rcar-du: Add co-maintainer Add myself as a co-maintainer for the Renesas DRM drivers. Signed-off-by: Kieran Bingham Acked-by: Laurent Pinchart Signed-off-by: Laurent Pinchart commit e897b3866580978d5081970ccdd732c137ab08b0 Author: Linus Walleij Date: Thu Sep 13 14:02:12 2018 +0200 pinctrl: at91-pio4: Get rid of legacy call By just moving the atmel_gpio_to_irq() and calling the internal function we can get rid of the driver calling back out into the deprecated external consumer API. Cc: Alexandre Belloni Acked-by: Ludovic Desroches Signed-off-by: Linus Walleij commit 6f19eb21a2ef9a2da938106ccc98e296ee02f4d3 Author: Dan Carpenter Date: Fri Sep 14 09:56:15 2018 +0300 udmabuf: fix error code in map_udmabuf() We accidentally forgot to set "ret" on this error path so it means we return NULL instead of an error pointer. The caller checks for NULL and changes it to an error pointer so it doesn't cause an issue at run time. Signed-off-by: Dan Carpenter Link: http://patchwork.freedesktop.org/patch/msgid/20180914065615.GA12043@mwanda Signed-off-by: Gerd Hoffmann commit 57a83c5222c1b5e7b3acc72c6e60fce00a38991a Author: Rob Herring Date: Thu Sep 13 13:12:38 2018 -0500 ARM: dts: sun9i: Fix I2C bus warnings dtc has new checks for I2C buses. The sun9i-a80 dts file has a node named 'i2c' which causes a false positive warning. As the node is a RSB bus, correct the node name to be 'rsb' to fix the warnings. arch/arm/boot/dts/sun9i-a80-cubieboard4.dtb: Warning (i2c_bus_reg): /soc/i2c@8003400/codec@e89:reg: I2C address must be less than 10-bits, got "0xe89" arch/arm/boot/dts/sun9i-a80-cubieboard4.dtb: Warning (i2c_bus_reg): /soc/i2c@8003400/pmic@745:reg: I2C address must be less than 10-bits, got "0x745" arch/arm/boot/dts/sun9i-a80-optimus.dtb: Warning (i2c_bus_reg): /soc/i2c@8003400/codec@e89:reg: I2C address must be less than 10-bits, got "0xe89" arch/arm/boot/dts/sun9i-a80-optimus.dtb: Warning (i2c_bus_reg): /soc/i2c@8003400/pmic@745:reg: I2C address must be less than 10-bits, got "0x745" Cc: Maxime Ripard Cc: Chen-Yu Tsai Signed-off-by: Rob Herring Signed-off-by: Chen-Yu Tsai commit 0c3dfa176912b5f87732545598200fb55e9c1978 Author: Ludovic Desroches Date: Thu Sep 13 14:42:13 2018 +0200 pinctrl: at91: don't use the same irqchip with multiple gpiochips Sharing the same irqchip with multiple gpiochips is not a good practice. For instance, when installing hooks, we change the state of the irqchip. The initial state of the irqchip for the second gpiochip to register is then disrupted. Signed-off-by: Ludovic Desroches Signed-off-by: Linus Walleij commit 0729b4af5753b65aa031f58c435da53dbbf56d19 Author: Rob Herring Date: Thu Sep 13 13:12:32 2018 -0500 ARM: dts: sunxi: Fix I2C bus warnings dtc has new checks for I2C buses. Fix the warnings in unit-addresses. arch/arm/boot/dts/sun8i-a23-gt90h-v4.dtb: Warning (i2c_bus_reg): /soc@1c00000/i2c@1c2ac00/touchscreen@0: I2C bus unit address format error, expected "40" arch/arm/boot/dts/sun8i-a23-inet86dz.dtb: Warning (i2c_bus_reg): /soc@1c00000/i2c@1c2ac00/touchscreen@0: I2C bus unit address format error, expected "40" arch/arm/boot/dts/sun8i-a23-polaroid-mid2407pxe03.dtb: Warning (i2c_bus_reg): /soc@1c00000/i2c@1c2ac00/touchscreen@0: I2C bus unit address format error, expected "40" arch/arm/boot/dts/sun8i-a23-polaroid-mid2809pxe04.dtb: Warning (i2c_bus_reg): /soc@1c00000/i2c@1c2ac00/touchscreen@0: I2C bus unit address format error, expected "40" arch/arm/boot/dts/sun8i-a33-ga10h-v1.1.dtb: Warning (i2c_bus_reg): /soc@1c00000/i2c@1c2ac00/touchscreen@0: I2C bus unit address format error, expected "40" arch/arm/boot/dts/sun8i-a33-inet-d978-rev2.dtb: Warning (i2c_bus_reg): /soc@1c00000/i2c@1c2ac00/touchscreen@0: missing or empty reg property arch/arm/boot/dts/sun8i-a33-ippo-q8h-v1.2.dtb: Warning (i2c_bus_reg): /soc@1c00000/i2c@1c2ac00/touchscreen@0: missing or empty reg property arch/arm/boot/dts/sun8i-a33-q8-tablet.dtb: Warning (i2c_bus_reg): /soc@1c00000/i2c@1c2ac00/touchscreen@0: missing or empty reg property arch/arm/boot/dts/sun5i-a13-utoo-p66.dtb: Warning (i2c_bus_reg): /soc@1c00000/i2c@1c2b000/touchscreen: I2C bus unit address format error, expected "40" arch/arm/boot/dts/sun5i-a13-difrnce-dit4350.dtb: Warning (i2c_bus_reg): /soc@1c00000/i2c@1c2b000/touchscreen: missing or empty reg property arch/arm/boot/dts/sun5i-a13-empire-electronix-m712.dtb: Warning (i2c_bus_reg): /soc@1c00000/i2c@1c2b000/touchscreen: missing or empty reg property arch/arm/boot/dts/sun5i-a13-inet-98v-rev2.dtb: Warning (i2c_bus_reg): /soc@1c00000/i2c@1c2b000/touchscreen: missing or empty reg property arch/arm/boot/dts/sun5i-a13-q8-tablet.dtb: Warning (i2c_bus_reg): /soc@1c00000/i2c@1c2b000/touchscreen: missing or empty reg property Cc: Maxime Ripard Cc: Chen-Yu Tsai Signed-off-by: Rob Herring Signed-off-by: Chen-Yu Tsai commit 00caf6a2b3187d28906a05c48a210961ab75f6b2 Author: Sven Eckelmann Date: Fri Aug 10 23:36:15 2018 +0200 batman-adv: Mark debugfs functionality as deprecated CONFIG_BATMAN_ADV_DEBUGFS is disabled by default because debugfs is not supported for batman-adv interfaces in any non-default netns. Any remaining users of this interface should still be informed about the deprecation and the generic netlink alternative. Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich commit 138c72efbd5dbb8b5b9cacb51523943576410fc1 Author: Simon Wunderlich Date: Fri Sep 14 10:50:05 2018 +0200 batman-adv: Start new development cycle Signed-off-by: Simon Wunderlich commit faeeeea89670b39c7afa2cc567c3917c511608c4 Author: zhong jiang Date: Wed Sep 12 11:40:28 2018 +0800 staging: remove unneeded static set .owner field in platform_driver platform_driver_register will set the .owner field. So it is safe to remove the redundant assignment. The issue is detected with the help of Coccinelle. Signed-off-by: zhong jiang Acked-by: Vaibhav Agarwal Signed-off-by: Greg Kroah-Hartman commit b4a01d8fa3116b8c2d1233f657f3c3db74b685aa Author: Colin Ian King Date: Tue Sep 11 18:38:51 2018 +0100 staging: wilc1000: fix null checks on wilc Currently the pointer wilc is being null checked several times and yet not checked for the final workqueue flush and destroy (which can lead to a null pointer dereference if wilc is null); these missing null checks were overlooked in an earlier core refactoring commit. Clean up the code by checking wilc at the start and bailing out early if it is null allowing the subsequent null checks to be removed, this also fixes the potential null pointer deferences on the workqueue flush and destroy calls. Detected by CoverityScan, CID#1473305 ("Dereference after null check") Fixes: b3ee105c332e ("staging: wilc1000: refactor code to move initilization in wilc_netdev_init()") Signed-off-by: Colin Ian King Reviewed-by: Claudiu Beznea Signed-off-by: Greg Kroah-Hartman commit d0121b8548bcb9a640de38c13e239493c87c44f4 Author: Wolfram Sang Date: Wed Jul 11 18:33:19 2018 +0200 gpiolib: use better errno if get_direction is not available EINVAL is very generic, use ENOTSUPP in case the gpiochip does not provide this function. While removing the assignment from the 'status' variable, use better indentation in the declaration block. Signed-off-by: Wolfram Sang Reviewed-by: Simon Horman Signed-off-by: Linus Walleij commit 4b55dce8b0e5f1440aea1b43d55e0bd4c0476737 Merge: 064ee3c0da80 daae7861a696 Author: Greg Kroah-Hartman Date: Fri Sep 14 10:38:48 2018 +0200 Merge tag 'iio-for-4.20a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next Jonathan writes: 1st round of IIO new device support, features and cleanups in the 4.20 cycle. There is a merge commit in here to pull in regmap support for repeatedly reading the same register (to read out FIFOs). Used by the adxl372 driver. This will find uses elsewhere once we tidy up various drivers that are effectively doing this and relying on not enabling regcache. New device support * Analog devices ADXL372 accelerometer - new driver for this accelerometer including fifo and and interrupt support. Follow up patches enforce trigger validation, add sampling frequency control and filter bandwidth control. A later series added i2c support to the existing SPI support. * ST lsm6dsx - rework and add support fo the LSM6DSO 6 axis mems sensor. * Linear LTC 1660 DAC - new driver supporting the LTC 1660 and LTC 1665 SPI DACs. * Microchip mcp3911 ADC. - new driver for this integrated analog front end and ADC. * Qualcomm SPMI PMIC5 adc driver - using the spmi framework, new driver and bindings for this ADC. Follow up patch adds some missing channels. Features * ad5758 - support hard reset using a gpio (if provided). * mpu6050 - Regulator support * qcom-spmi-adc5 - Sanity check the channel numbers provided by DT to make sure the driver actually knows about them. * sc27xx - give raw data for channel 20 as it's used on all known boards for the headset which needs a custom converstion function. If it turns out someone builds a board where this isn't true we will deal with it when it happens. - add ADC scale calibration. * tsl2772 - support device tree binding to set the proximity led settings. - regulator supprot. - binding for apds9930 - trivial addition as register compatible with tsl2772. Cleanups / Minor fixes * adxl345 - supress a static checker warning but explicitly checking if the id object is null. * bh1750 - avoid CONFIG_PM_SLEEP checks. - SPDX. * bme680 - spelling mistake - use clamp rather than open coding. - white space and other similar fixes. - rename MSK to MASK for clarifty and use GENMASK to specify them. - use the FIELD_GET macro rather than a very odd accessor of dividing by 16 to get the shift. - rework to share handing for oversampling of the various channels in a unified way. - check explicitly for val2 in write_raw function to ensure it is 0. - drop some field defines that don't add anything. * dpot-adc - SPDX * envelope detector - SPDX * isl29501 - fix an ancient compiler warning mostly because it results in much nicer code. * max30102 - mark switch fall throughs. * max44000 - drop an unused variable. * max512 - avoid CONFIG_PM_SLEEP checks. * max5481 - use of_device_get_match_data rather than open coding it. * max5821 - avoid CONFIG_PM_SLEEP checks. * max9611 - explicity cast an enum to an integer to make it totally clear that this is intended. * mcp4018 - fix an inconsistent MODULE_LICENSE. - use of_device_get_match_data rather than open coding it. * mcp4531 - use of_device_get_match_data rather than open coding it. - SPDX * mcp4725 - avoid CONFIG_PM_SLEEP checks. * mcp4922 - Fix error handling and prevent writing a negative to when setting the output voltage. * ms5611 - drop deprecated compatible strings without manufacturer from being explicitly listed. They are handled anyway. - SPDX * multiplexer - SPDX * qcom-vadc - fix inconsistent documentation for reg. * ti-dac5571 - provide and of_match_table. * treewide - update Michael Hennerich's email address. - Use %pOFn rather than device_node.name. * documentation. - tidy up a wrong kernel version for the introduction of the position_relative ABI. commit 430317881795172144a606b47744baf2a19b79bb Author: Chris Wilson Date: Thu Sep 13 14:16:26 2018 +0100 drm/i915: Mark up a couple of KMS debug messages as such For finding the panel fitter and PLL for a particular modeset is a part of that modeset and should be included with the reset of the DRM_DEBUG_KMS. Signed-off-by: Chris Wilson Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20180913131629.3978-1-chris@chris-wilson.co.uk commit 308b118b6090e42883a88d8e39ef27fca3389b19 Author: Laurent Pinchart Date: Wed Jun 6 12:37:41 2018 +0300 MAINTAINERS: Update tree location for the Renesas DRM drivers The fbdev git tree referenced in the MAINTAINERS file doesn't exist anymore. Update the location to point to the new git tree. Signed-off-by: Laurent Pinchart Reviewed-by: Simon Horman commit 064ee3c0da805b57d9a8dd55eff79887a8f78532 Author: Chengguang Xu Date: Tue Sep 11 07:51:54 2018 +0800 staging: erofs: surround fault_injection ralted option parsing using CONFIG_EROFS_FAULT_INJECTION It's a little bit strange when fault_injection related option fail with -EINVAL which was already disabled from config, so surround all fault_injection related option parsing code using CONFIG_EROFS_FAULT_INJECTION. Meanwhile, slightly change warning message to keep consistency with option POSIX_ACL and FS_XATTR. Signed-off-by: Chengguang Xu Reviewed-by: Chao Yu Signed-off-by: Greg Kroah-Hartman commit 7dd68b147d60e5e1bcec53d0050246132dd7b9d6 Author: Thomas Weißschuh Date: Mon Sep 10 21:41:14 2018 +0200 staging: erofs: use explicit unsigned int type Fix coding style issue "Prefer 'unsigned int' to bare use of 'unsigned'" detected by checkpatch.pl. Signed-off-by: Thomas Weißschuh Reviewed-by: Chao Yu Reviewed-by: Gao Xiang Signed-off-by: Greg Kroah-Hartman commit 41a9aca6a2f359866552b06f19096d7fb77818dd Author: Srikanth Jampala Date: Fri Sep 7 12:31:18 2018 +0530 crypto: cavium/nitrox - Added support for SR-IOV configuration. Added support to configure SR-IOV using sysfs interface. Supported VF modes are 16, 32, 64 and 128. Grouped the hardware configuration functions to "nitrox_hal.h" file. Changed driver version to "1.1". Signed-off-by: Srikanth Jampala Reviewed-by: Gadam Sreerama Signed-off-by: Herbert Xu commit a788848116454d753b13a4888e0e31ada3c4d393 Author: Mikulas Patocka Date: Wed Sep 5 09:18:43 2018 -0400 crypto: aesni - don't use GFP_ATOMIC allocation if the request doesn't cross a page in gcm This patch fixes gcmaes_crypt_by_sg so that it won't use memory allocation if the data doesn't cross a page boundary. Authenticated encryption may be used by dm-crypt. If the encryption or decryption fails, it would result in I/O error and filesystem corruption. The function gcmaes_crypt_by_sg is using GFP_ATOMIC allocation that can fail anytime. This patch fixes the logic so that it won't attempt the failing allocation if the data doesn't cross a page boundary. Signed-off-by: Mikulas Patocka Cc: stable@vger.kernel.org Signed-off-by: Herbert Xu commit a7e7edfea23fa1f3c910eac897aac41ec9584c38 Author: kbuild test robot Date: Wed Sep 5 01:52:44 2018 +0800 crc-t10dif: crc_t10dif_mutex can be static Fixes: b76377543b73 ("crc-t10dif: Pick better transform if one becomes available") Signed-off-by: kbuild test robot Signed-off-by: Herbert Xu commit 6d39a1241ebc3bdd61d654c3058f0955c28c13fd Author: Kees Cook Date: Tue Aug 7 14:18:39 2018 -0700 dm: Remove VLA usage from hashes In the quest to remove all stack VLA usage from the kernel[1], this uses the new HASH_MAX_DIGESTSIZE from the crypto layer to allocate the upper bounds on stack usage. [1] https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qPXydAacU1RqZWA@mail.gmail.com Signed-off-by: Kees Cook Acked-by: Mike Snitzer Signed-off-by: Herbert Xu commit bb85ce5122487b2b1de1b48b557c5fdf9828dc6e Author: Bjorn Andersson Date: Wed Aug 29 16:15:05 2018 -0700 dt-bindings: firmware: scm: Add MSM8998 and SDM845 Now that the compatible/clock handling is reworked add compatibles for MSM8998 and SDM845 to the SCM binding. Signed-off-by: Bjorn Andersson Reviewed-by: Stephen Boyd Signed-off-by: Andy Gross commit 60cd420c91e28c2c10b3cde988466631bfcd35a3 Author: Bjorn Andersson Date: Wed Aug 29 16:15:04 2018 -0700 firmware: qcom: scm: Refactor clock handling At one point in time all "future" platforms required three clocks, so the binding and driver was written to treat this as the default case. But new platforms has no clock requirements, which currently makes them all a special case, causing the need for a patch in the binding and driver for each new platform added. This patch reworks the driver logic so that it will attempt to acquire all three clocks and fail based on the given compatible. This allow us to drop the clock requirement from "qcom,scm", in a way that will remain backwards compatible with existing DT files. Specific compatibles are added for apq8084, msm8916 and msm8974 to match the updated binding and although equivalent to qcom,scm both ipq4019 and msm8996 are kept as these have been used without fallback to qcom,scm. The result of this patch is that new platforms, that require no clocks, can be use the fallback compatible of "qcom,scm". Signed-off-by: Bjorn Andersson Reviewed-by: Stephen Boyd Signed-off-by: Andy Gross commit 8a07855e66e6b8ddf452d81c6aac0b1ff3665e86 Author: Bjorn Andersson Date: Wed Aug 29 16:15:03 2018 -0700 dt-bindings: firmware: scm: Refactor compatibles and clocks When the binding was written all "future" platforms required three clocks, so the default compatible (qcom,scm) was defined to require this. But as history shows all "future" platforms actually lack required clocks. Given how the binding is written these compatibles have to be added as an exception to the default. Refactor the description of compatible to define that a platform compatible should be given, followed by the fallback of qcom,scm. Also refactor the description of the clocks in a way that this does not need to be updated as new platform specific compatibles are added. Signed-off-by: Bjorn Andersson Reviewed-by: Stephen Boyd Signed-off-by: Andy Gross commit cbbc488ed85061a765cf370c3e41f383c1e0add6 Author: Dinh Nguyen Date: Thu Sep 13 23:52:49 2018 -0500 ARM: dts: socfpga: Fix I2C bus unit-address error dtc has new checks for I2C buses. Fix the warnings in unit-addresses. arch/arm/boot/dts/socfpga_cyclone5_de0_sockit.dtb: Warning (i2c_bus_reg): /soc/i2c@ffc04000/adxl345@0: I2C bus unit address format error, expected "53" Signed-off-by: Rob Herring Signed-off-by: Dinh Nguyen commit 56d20861c027498b5a1112b4f9f05b56d906fdda Author: Alan Modra Date: Fri Sep 14 13:10:04 2018 +0930 powerpc/vdso: Correct call frame information Call Frame Information is used by gdb for back-traces and inserting breakpoints on function return for the "finish" command. This failed when inside __kernel_clock_gettime. More concerning than difficulty debugging is that CFI is also used by stack frame unwinding code to implement exceptions. If you have an app that needs to handle asynchronous exceptions for some reason, and you are unlucky enough to get one inside the VDSO time functions, your app will crash. What's wrong: There is control flow in __kernel_clock_gettime that reaches label 99 without saving lr in r12. CFI info however is interpreted by the unwinder without reference to control flow: It's a simple matter of "Execute all the CFI opcodes up to the current address". That means the unwinder thinks r12 contains the return address at label 99. Disabuse it of that notion by resetting CFI for the return address at label 99. Note that the ".cfi_restore lr" could have gone anywhere from the "mtlr r12" a few instructions earlier to the instruction at label 99. I put the CFI as late as possible, because in general that's best practice (and if possible grouped with other CFI in order to reduce the number of CFI opcodes executed when unwinding). Using r12 as the return address is perfectly fine after the "mtlr r12" since r12 on that code path still contains the return address. __get_datapage also has a CFI error. That function temporarily saves lr in r0, and reflects that fact with ".cfi_register lr,r0". A later use of r0 means the CFI at that point isn't correct, as r0 no longer contains the return address. Fix that too. Signed-off-by: Alan Modra Tested-by: Reza Arbab Signed-off-by: Paul Mackerras commit dd9a8c5a87395b6f05552c3b44e42fdc95760552 Author: Michael Neuling Date: Tue Sep 11 13:07:56 2018 +1000 powerpc/tm: Fix HFSCR bit for no suspend case Currently on P9N DD2.1 we end up taking infinite TM facility unavailable exceptions on the first TM usage by userspace. In the special case of TM no suspend (P9N DD2.1), Linux is told TM is off via CPU dt-ftrs but told to (partially) use it via OPAL_REINIT_CPUS_TM_SUSPEND_DISABLED. So HFSCR[TM] will be off from dt-ftrs but we need to turn it on for the no suspend case. This patch fixes this by enabling HFSCR TM in this case. Cc: stable@vger.kernel.org # 4.15+ Signed-off-by: Michael Neuling Signed-off-by: Paul Mackerras commit f8c0d7b16fd9b97036306c6af4094d51e9f72278 Author: YueHaibing Date: Fri Sep 14 01:35:11 2018 +0000 blk-iolatency: remove set but not used variables 'changed' and 'blkiolat' Fixes gcc '-Wunused-but-set-variable' warning: block/blk-iolatency.c: In function 'scale_change': block/blk-iolatency.c:301:7: warning: variable 'changed' set but not used [-Wunused-but-set-variable] block/blk-iolatency.c: In function 'iolatency_set_limit': block/blk-iolatency.c:765:24: warning: variable 'blkiolat' set but not used [-Wunused-but-set-variable] Signed-off-by: YueHaibing Signed-off-by: Jens Axboe commit ee4fccbee7d397c4d937e20d8c76212ffc23a7e3 Author: Kees Cook Date: Thu Sep 13 14:23:56 2018 -0700 net/ibm/emac: Remove VLA usage In the quest to remove all stack VLA usage from the kernel[1], this removes the VLA used for the emac xaht registers size. Since the size of registers can only ever be 4 or 8, as detected in emac_init_config(), the max can be hardcoded and a runtime test added for robustness. [1] https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qPXydAacU1RqZWA@mail.gmail.com Cc: "David S. Miller" Cc: Christian Lamparter Cc: Ivan Mikhaylov Cc: netdev@vger.kernel.org Co-developed-by: Benjamin Herrenschmidt Signed-off-by: Kees Cook Signed-off-by: David S. Miller commit 2dc7bad71cd310dc94d1c9907909324dd2b0618f Merge: b1c1566822ab 169cc4c7a14e Author: Dave Airlie Date: Fri Sep 14 09:43:06 2018 +1000 Merge tag 'drm-misc-next-2018-09-13' of git://anongit.freedesktop.org/drm/drm-misc into drm-next drm-misc-next for 4.20: UAPI Changes: - Add host endian variants for the most common formats (Gerd) - Fail ADDFB2 for big-endian drivers that don't advertise BE quirk (Gerd) - clear smem_start in fbdev for drm drivers to avoid leaking fb addr (Daniel) Cross-subsystem Changes: Core Changes: - fix drm_mode_addfb() on big endian machines (Gerd) - add timeline point to syncobj find+replace (Chunming) - more drmP.h removal effort (Daniel) - split uapi portions of drm_atomic.c into drm_atomic_uapi.c (Daniel) Driver Changes: - bochs: Convert open-coded portions to use helpers (Peter) - vkms: Add cursor support (Haneen) - udmabuf: Lots of fixups (mostly cosmetic afaict) (Gerd) - qxl: Convert to use fbdev helper (Peter) Cc: Gerd Hoffmann Cc: Chunming Zhou Cc: Daniel Vetter Cc: Peter Wu Cc: Haneen Mohammed Signed-off-by: Dave Airlie From: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20180913130254.GA156437@art_vandelay commit fde4f21bc280ba6fb2bddd89665f9a99391982c1 Author: Patrick Venture Date: Tue Sep 4 08:53:29 2018 -0700 ARM: dts: aspeed: quanta-q71l: Enable adc & ibt nodes This machine uses the ADC and iBT devices. Signed-off-by: Patrick Venture Signed-off-by: Joel Stanley commit d8a2b2a279cefd468b6c6efa96ff3ed8e896894d Author: Patrick Venture Date: Fri Aug 31 13:58:55 2018 -0700 ARM: dts: aspeed: quanta-q71l: Add four PSUs Enable the four PSUs via generic PMBUS. Signed-off-by: Patrick Venture Signed-off-by: Joel Stanley commit e19ecbca78fba879ce7b19ea09ba14923998daf5 Author: Patrick Venture Date: Fri Aug 31 13:58:39 2018 -0700 ARM: dts: aspeed: quanta-q71l: add aliases for i2c Provide aliases to each i2c bus per labels added for each PCIe slot, etc, that are downstream beyond a mux. Signed-off-by: Patrick Venture Signed-off-by: Joel Stanley commit 1426d40e11f730e0c0fd3700a7048082f87b0e6e Author: Rob Herring Date: Thu Sep 13 13:12:27 2018 -0500 ARM: dts: aspeed: Fix I2C bus warnings dtc has new checks for I2C buses. The ASpeed dts files have a node named 'i2c' which causes a false positive warning. As the node is a 'simple-bus', correct the node name to be 'bus' to fix the warnings. arch/arm/boot/dts/aspeed-bmc-opp-lanyang.dtb: Warning (i2c_bus_bridge): /ahb/apb/i2c@1e78a000: incorrect #size-cells for I2C bus arch/arm/boot/dts/aspeed-bmc-opp-romulus.dtb: Warning (i2c_bus_bridge): /ahb/apb/i2c@1e78a000: incorrect #size-cells for I2C bus arch/arm/boot/dts/aspeed-ast2500-evb.dtb: Warning (i2c_bus_bridge): /ahb/apb/i2c@1e78a000: incorrect #size-cells for I2C bus arch/arm/boot/dts/aspeed-bmc-arm-centriq2400-rep.dtb: Warning (i2c_bus_bridge): /ahb/apb/i2c@1e78a000: incorrect #size-cells for I2C bus arch/arm/boot/dts/aspeed-bmc-intel-s2600wf.dtb: Warning (i2c_bus_bridge): /ahb/apb/i2c@1e78a000: incorrect #size-cells for I2C bus arch/arm/boot/dts/aspeed-bmc-opp-palmetto.dtb: Warning (i2c_bus_bridge): /ahb/apb/i2c@1e78a000: incorrect #size-cells for I2C bus arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dtb: Warning (i2c_bus_bridge): /ahb/apb/i2c@1e78a000: incorrect #size-cells for I2C bus arch/arm/boot/dts/aspeed-bmc-opp-zaius.dtb: Warning (i2c_bus_bridge): /ahb/apb/i2c@1e78a000: incorrect #size-cells for I2C bus arch/arm/boot/dts/aspeed-bmc-portwell-neptune.dtb: Warning (i2c_bus_bridge): /ahb/apb/i2c@1e78a000: incorrect #size-cells for I2C bus arch/arm/boot/dts/aspeed-bmc-quanta-q71l.dtb: Warning (i2c_bus_bridge): /ahb/apb/i2c@1e78a000: incorrect #size-cells for I2C bus Cc: Joel Stanley Cc: Andrew Jeffery Cc: linux-aspeed@lists.ozlabs.org Signed-off-by: Rob Herring Signed-off-by: Joel Stanley commit f91845da9fdabd920543e0fb4feb970181e33a0f Author: Gustavo A. R. Silva Date: Thu Sep 13 14:03:20 2018 -0500 pktgen: Fix fall-through annotation Replace "fallthru" with a proper "fall through" annotation. This fix is part of the ongoing efforts to enabling -Wimplicit-fallthrough Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller commit 310fc0513ea9bac6cb772b9fb6ec936dce12913b Author: Gustavo A. R. Silva Date: Thu Sep 13 13:39:22 2018 -0500 tg3: Fix fall-through annotations Replace "fallthru" with a proper "fall through" annotation. This fix is part of the ongoing efforts to enabling -Wimplicit-fallthrough Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller commit ab0b47d2eff413d60b0a1fc0c1f87f87f0d7f375 Author: Rob Herring Date: Thu Sep 13 13:12:30 2018 -0500 ARM: dts: bcm: Fix SPI bus warnings dtc has new checks for SPI buses. Fix the warnings in node names. arch/arm/boot/dts/bcm53340-ubnt-unifi-switch8.dtb: Warning (spi_bus_bridge): /axi@18000000/qspi@27200: node name for SPI buses should be 'spi' arch/arm/boot/dts/bcm958525er.dtb: Warning (spi_bus_bridge): /axi/qspi@27200: node name for SPI buses should be 'spi' arch/arm/boot/dts/bcm958525xmc.dtb: Warning (spi_bus_bridge): /axi/qspi@27200: node name for SPI buses should be 'spi' arch/arm/boot/dts/bcm958622hr.dtb: Warning (spi_bus_bridge): /axi/qspi@27200: node name for SPI buses should be 'spi' arch/arm/boot/dts/bcm958625hr.dtb: Warning (spi_bus_bridge): /axi/qspi@27200: node name for SPI buses should be 'spi' arch/arm/boot/dts/bcm988312hr.dtb: Warning (spi_bus_bridge): /axi/qspi@27200: node name for SPI buses should be 'spi' Cc: Ray Jui Cc: Scott Branden Cc: Jon Mason Cc: bcm-kernel-feedback-list@broadcom.com Signed-off-by: Rob Herring Signed-off-by: Florian Fainelli commit 7cdbe45da1a189e744e6801aebb462ee47235580 Author: Rob Herring Date: Thu Sep 13 13:12:42 2018 -0500 arm64: dts: broadcom: Fix I2C and SPI bus warnings dtc has new checks for I2C and SPI buses. Fix the warnings in node names and unit-addresses. arch/arm64/boot/dts/broadcom/stingray/bcm958742k.dtb: Warning (i2c_bus_reg): /hsls/i2c@e0000/pcf8574@20: I2C bus unit address format error, expected "27" arch/arm64/boot/dts/broadcom/stingray/bcm958742t.dtb: Warning (i2c_bus_reg): /hsls/i2c@e0000/pcf8574@20: I2C bus unit address format error, expected "27" arch/arm64/boot/dts/broadcom/stingray/bcm958742k.dtb: Warning (spi_bus_bridge): /hsls/ssp@180000: node name for SPI buses should be 'spi' arch/arm64/boot/dts/broadcom/stingray/bcm958742k.dtb: Warning (spi_bus_bridge): /hsls/ssp@190000: node name for SPI buses should be 'spi' Cc: Ray Jui Cc: Scott Branden Cc: Jon Mason Cc: bcm-kernel-feedback-list@broadcom.com Signed-off-by: Rob Herring Acked-by: Scott Branden Signed-off-by: Florian Fainelli commit 13a920ae7898ffa075391ba36b63251f686d38a3 Author: Alex Elder Date: Mon Jun 25 19:58:56 2018 -0500 soc: qcom: smem: a few last cleanups This patch contains several small cleanups: - In qcom_smem_enumerate_partitions(), change the "local_host" argument to have 16 bit unsigned type - Also in qcom_smem_enumerate_partitions(), change the type of the "host0" and "host1" local variables to be u16 - Fix error messages reporting host ids to use the right format specifier - Shorten the error messages as well, to fit on one line - Add a compile-time check to ensure the local host value passed to qcom_smem_enumerate_partitions() is in range Signed-off-by: Alex Elder Signed-off-by: Andy Gross commit 7d01934455e3f5efc0019befe1b78ebe60dd7b0c Author: Alex Elder Date: Mon Jun 25 19:58:55 2018 -0500 soc: qcom: smem: verify partition host ids match Add verification in qcom_smem_partition_header() that the host ids found in a partition's header structure match those in its partition table entry. Signed-off-by: Alex Elder Signed-off-by: Andy Gross commit 33fdbc4e5caf7ef6e7114adeab7a4a4578307ff3 Author: Alex Elder Date: Mon Jun 25 19:58:54 2018 -0500 soc: qcom: smem: small change in global entry loop Change the logic in the loop that finds that global host entry in the partition table not require the host0 and host1 local variables. The next patch will remove them. Signed-off-by: Alex Elder Signed-off-by: Andy Gross commit 380dc4af50a61eaa8b749fac2e7e40ebf92079aa Author: Alex Elder Date: Mon Jun 25 19:58:53 2018 -0500 soc: qcom: smem: verify partition offset_free_uncached Add verification in qcom_smem_partition_header() that the offset_free_uncached field in a partition's header structure does not exceed the partition's size. Signed-off-by: Alex Elder Signed-off-by: Andy Gross commit 190b216c1535ca5af8db5c81e86d2192c4204b51 Author: Alex Elder Date: Mon Jun 25 19:58:52 2018 -0500 soc: qcom: smem: verify partition header size Add verification in qcom_smem_partition_header() that the size in a partition's header structure matches the size in its partition table entry. Signed-off-by: Alex Elder Signed-off-by: Andy Gross commit ada79289735fea37e755bbefc4403c989e66f4b1 Author: Alex Elder Date: Mon Jun 25 19:58:51 2018 -0500 soc: qcom: smem: introduce qcom_smem_partition_header() Create a new function qcom_smem_partition_header() to encapsulate validating locating a partition header and validating information found within it. This will be built up over a few commits to make it more obvious how the common function is replacing duplicated code elsewhere. Initially it just verifies the header has the right magic number. Signed-off-by: Alex Elder Signed-off-by: Andy Gross commit abc006b7a6eaf598c3987e5ae87deb7cd8221145 Author: Alex Elder Date: Mon Jun 25 19:58:50 2018 -0500 soc: qcom: smem: require order of host ids to match In qcom_smem_enumerate_partitions(), we find all partitions that have a given local host id in either its host0 or its host1 field in the partition table entry. We then verify that the header structure at the start of each partition also contains the same two host ids as is found in the table of contents. There is no requirement that the order of the two host ids be the same in the table of contents and in the partition header. This patch changes that, requiring host0 to in the partition table entry to equal host0 in the partition header structure (and similar for the host1 values). Signed-off-by: Alex Elder Signed-off-by: Andy Gross commit 06ada44a807fc5c1745d2001faba3e0b4e2e060a Author: Alex Elder Date: Mon Jun 25 19:58:49 2018 -0500 soc: qcom: smem: verify both host ids in partition header The global partition is indicated by having both host values in its table of contents entry equal SMEM_GLOBAL_HOST=0xfffe. In qcom_smem_set_global_partition(), we check whether the header structure at the beginning of the partition contains that host value, but the check only verifies *one* of them. Change the check so the partition header must have SMEM_GLOBAL_HOST for *both* its host fields. Signed-off-by: Alex Elder Signed-off-by: Andy Gross commit eb68cf09092233716b31fad42cf2a4dad3959e3c Author: Alex Elder Date: Mon Jun 25 19:58:48 2018 -0500 soc: qcom: smem: small refactor in qcom_smem_enumerate_partitions() Combine the code that checks whether a partition table entry is associated with the local host with the assignment of the remote host id value. Signed-off-by: Alex Elder Signed-off-by: Andy Gross commit eba757022fc2935c8a1392278a26d86761a70c60 Author: Alex Elder Date: Mon Jun 25 19:58:47 2018 -0500 soc: qcom: smem: always ignore partitions with 0 offset or size In qcom_smem_enumerate_partitions(), any partition table entry having a zero offset or size field is ignored. Move those checks earlier in the loop, because there's no sense in examining the host fields for those entries. Add the same checks in qcom_smem_set_global_partition(), so the scan for the global partition skips over these invalid entries. This allows a later check for zero size or offset once the global entry is found to be eliminated. Signed-off-by: Alex Elder Signed-off-by: Andy Gross commit 100d26e8ce65f33d229912be3bc563a93a786186 Author: Alex Elder Date: Mon Jun 25 19:58:46 2018 -0500 soc: qcom: smem: initialize region struct only when successful Hold off initializing anything for the array entry representing a memory region in qcom_smem_map_memory() until we know we've successfully mapped it. Signed-off-by: Alex Elder Signed-off-by: Andy Gross commit 9f01b7a8f1d79c5679410e6a1d4b7e1b520f1e6d Author: Alex Elder Date: Mon Jun 25 19:58:45 2018 -0500 soc: qcom: smem: rename variable in qcom_smem_get_global() Rename the variable "area" to be "region" in qcom_smem_get_global(), so its name better matches its type. Signed-off-by: Alex Elder Signed-off-by: Andy Gross commit 8a6c5447635c4039eb51801fb5dcdb8c7ef93cfb Author: Mahesh Kumar Date: Fri Aug 24 15:02:25 2018 +0530 drm/i915/kbl+: Enable IPC only for symmetric memory configurations IPC may cause underflows if not used with dual channel symmetric memory configuration. Disable IPC for non symmetric configurations in affected platforms. Display WA #1141 Changes Since V1: - Re-arrange the code. - update wrapper to return if memory is symmetric (Rodrigo) Signed-off-by: Mahesh Kumar Reviewed-by: Maarten Lankhorst Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20180824093225.12598-6-mahesh1.kumar@intel.com commit f361912aa9bfefbdf875b185fc93f2454d917b4a Author: Mahesh Kumar Date: Fri Aug 24 15:02:24 2018 +0530 drm/i915/skl+: don't trust IPC value set by BIOS If KMS decide to disable IPC make sure we override IPC configuration set by BIOS. Signed-off-by: Mahesh Kumar Reviewed-by: Maarten Lankhorst Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20180824093225.12598-5-mahesh1.kumar@intel.com commit 86b592876cb6b277e5cb3c988fc5f748fdafa16f Author: Mahesh Kumar Date: Fri Aug 31 16:39:42 2018 +0530 drm/i915: Implement 16GB dimm wa for latency level-0 Memory with 16GB dimms require an increase of 1us in level-0 latency. This patch implements the same. Bspec: 4381 changes since V1: - s/memdev_info/dram_info - make skl_is_16gb_dimm pure function Changes since V2: - make is_16gb_dimm more generic - rebase Changes since V3: - Simplify condition (Maarten) Signed-off-by: Mahesh Kumar Reviewed-by: Maarten Lankhorst Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20180831110942.9234-1-mahesh1.kumar@intel.com commit 5771caf885ae779ade0ea009ae5d5f363bb72a52 Author: Mahesh Kumar Date: Fri Aug 24 15:02:22 2018 +0530 drm/i915/skl+: Decode memory bandwidth and parameters This patch adds support to decode system memory bandwidth and other parameters for skylake and Gen9+ platforms, which will be used for arbitrated display memory bandwidth calculation in GEN9 based platforms and WM latency level-0 Work-around calculation on GEN9+. Changes Since V1: - s/memdev_info/dram_info - create a struct to hold channel info Changes Since V2: - rewrite code to adhere i915 coding style - not valid for GLK Signed-off-by: Mahesh Kumar Reviewed-by: Maarten Lankhorst Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20180824093225.12598-3-mahesh1.kumar@intel.com commit cbfa59d4b331046d89c795c8e809922f345d9bd7 Author: Mahesh Kumar Date: Fri Aug 24 15:02:21 2018 +0530 drm/i915/bxt: Decode memory bandwidth and parameters This patch adds support to decode system memory bandwidth and other parameters for broxton platform, which will be used for arbitrated display memory bandwidth calculation in GEN9 based platforms and WM latency level-0 Work-around calculation on GEN9+ platforms. Changes since V1: - s/memdev_info/dram_info Changes since V2: - Adhere to i915 coding style (Rodrigo) Signed-off-by: Mahesh Kumar Reviewed-by: Maarten Lankhorst Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20180824093225.12598-2-mahesh1.kumar@intel.com commit 4445930f1c4a7c38da90a64a0fd7c7cc494c55a9 Author: Anusha Srivatsa Date: Mon Aug 27 17:38:44 2018 -0700 firmware/dmc/icl: load v1.07 on icelake. Add Support to load DMC on Icelake. While at it, also add support to load the firmware during system resume. v2: load firmware during system resume.(Imre) v3: enable has_csr for icelake.(Jyoti) v4: Only load the firmware in this patch Cc: Jyoti Yadav Cc: Imre Deak Cc: Rodrigo Vivi Cc: Paulo Zanoni Signed-off-by: Anusha Srivatsa Reviewed-by: Imre Deak Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20180828003844.4682-2-anusha.srivatsa@intel.com commit 09e97b6c8754c91470455e69ebd827b741f80af5 Author: Lina Iyer Date: Wed Sep 5 14:14:38 2018 -0600 drivers: qcom: rpmh-rsc: clear wait_for_compl after use The wait_for_compl register ensures the request sequence is maintained when sending requests from the TCS. Clear the register after sending active request and during invalidate of the sleep and wake TCS. Reported-by: Raju P.L.S.S.S.N Signed-off-by: Lina Iyer Signed-off-by: Andy Gross commit 137dc5843faeacabf48fc22a8dc58c4e0b4f0927 Author: Bjorn Andersson Date: Mon Aug 27 22:05:48 2018 -0700 soc: qcom: rmtfs-mem: Validate that scm is available The scm device must be present in order for the rmtfs driver to configure memory permissions for the rmtfs memory region, so check that it is probed before continuing. Cc: stable@vger.kernel.org Fixes: fa65f8045137 ("soc: qcom: rmtfs-mem: Add support for assigning memory to remote") Signed-off-by: Bjorn Andersson Signed-off-by: Andy Gross commit 61a3bd10082b0e861b4e1bc451a92e20181a52f5 Author: Felix Fietkau Date: Mon Jul 23 16:17:35 2018 +0200 soc: qcom: spm: add SCM probe dependency Check for SCM availability before attempting to use SPM. SPM probe will fail otherwise. Signed-off-by: Felix Fietkau Signed-off-by: John Crispin Signed-off-by: Andy Gross commit ccfb464cd106890cfa51070f75921a273e2852e5 Author: Niklas Cassel Date: Wed Aug 29 09:57:23 2018 +0200 soc: qcom: Allow COMPILE_TEST of qcom SoC Kconfigs Since commit cab673583d96 ("soc: Unconditionally include qcom Makefile"), we unconditionally include the soc/qcom/Makefile. This opens up the possibility to compile test the code even when building for other architectures. Allow COMPILE_TEST for all qcom SoC Kconfigs, except for two Kconfigs that depend on QCOM_SCM, since that triggers lots of build errors in qcom_scm. Signed-off-by: Niklas Cassel Reviewed-by: Vivek Gautam Reviewed-by: Vinod Koul Reviewed-by: Bjorn Andersson Signed-off-by: Andy Gross commit 4fadb26574cb74e5de079dd384f25f44f4fb3ec3 Author: Niklas Cassel Date: Wed Aug 29 09:57:22 2018 +0200 soc: qcom: apr: Avoid string overflow 'adev->name' is used as a NUL-terminated string, but using strncpy() with the length equal to the buffer size may result in lack of the termination: In function 'apr_add_device', inlined from 'of_register_apr_devices' at drivers//soc/qcom/apr.c:264:7, inlined from 'apr_probe' at drivers//soc/qcom/apr.c:290:2: drivers//soc/qcom/apr.c:222:3: warning: 'strncpy' specified bound 32 equals destination size [-Wstringop-truncation] strncpy(adev->name, np->name, APR_NAME_SIZE); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This changes it to use the safer strscpy() instead. Signed-off-by: Niklas Cassel Reviewed-by: Bjorn Andersson Signed-off-by: Andy Gross commit 4c96ed170d658d8826d94edec8ac93ee777981a2 Author: Niklas Cassel Date: Wed Aug 29 09:57:21 2018 +0200 soc: qcom: wcnss_ctrl: Avoid string overflow 'chinfo.name' is used as a NUL-terminated string, but using strncpy() with the length equal to the buffer size may result in lack of the termination: drivers//soc/qcom/wcnss_ctrl.c: In function 'qcom_wcnss_open_channel': drivers//soc/qcom/wcnss_ctrl.c:284:2: warning: 'strncpy' specified bound 32 equals destination size [-Wstringop-truncation] strncpy(chinfo.name, name, sizeof(chinfo.name)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This changes it to use the safer strscpy() instead. Signed-off-by: Niklas Cassel Reviewed-by: Bjorn Andersson Signed-off-by: Andy Gross commit c62615b16c70db8f5e55e326f6d690909afc510f Author: Niklas Cassel Date: Wed Aug 29 09:57:20 2018 +0200 soc: qcom: Remove depends on OF from QCOM_RPMH QCOM_RPHM already selects ARM64, which always selects OF. Additionally, the rpmh driver only uses linux/of.h, which has dummy definitions for all functions, in order for code to to be able to build without CONFIG_OF set. Remove the superfluous depends on OF. Signed-off-by: Niklas Cassel Reviewed-by: Bjorn Andersson Signed-off-by: Andy Gross commit a09b440af8de5f7cec20384a094ee1f88cbe2c17 Author: Niklas Cassel Date: Wed Aug 29 09:57:19 2018 +0200 soc: qcom: Remove bogus depends on OF from QCOM_SMD_RPM QCOM_SMD_RPM builds perfectly fine without CONFIG_OF set. Remove the bogus depends on OF. Signed-off-by: Niklas Cassel Reviewed-by: Vivek Gautam Reviewed-by: Vinod Koul Signed-off-by: Andy Gross commit 0a5cdb4138f534bf58065acfb33d10336d6508df Author: Niklas Cassel Date: Wed Aug 29 09:57:18 2018 +0200 soc: qcom: smsm: Add select IRQ_DOMAIN Since we are using irq_domain_add_linear(), add a select on IRQ_DOMAIN. This is needed in order to be able to remove the depends on ARCH_QCOM. drivers/soc/qcom/smsm.c: In function ‘smsm_inbound_entry’: drivers/soc/qcom/smsm.c:411:18: error: implicit declaration of function ‘irq_domain_add_linear’ entry->domain = irq_domain_add_linear(node, 32, &smsm_irq_ops, entry); ^~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Niklas Cassel Reviewed-by: Vivek Gautam Reviewed-by: Vinod Koul Signed-off-by: Andy Gross commit 810f11a9cbfda027252d23a4a52d4af814296129 Author: Niklas Cassel Date: Wed Aug 29 09:57:17 2018 +0200 soc: qcom: smp2p: Add select IRQ_DOMAIN Since we are using irq_domain_add_linear(), add a select on IRQ_DOMAIN. This is needed in order to be able to remove the depends on ARCH_QCOM. drivers/soc/qcom/smp2p.c: In function ‘qcom_smp2p_inbound_entry’: drivers/soc/qcom/smp2p.c:317:18: error: implicit declaration of function ‘irq_domain_add_linear’ entry->domain = irq_domain_add_linear(node, 32, &smp2p_irq_ops, entry); ^~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Niklas Cassel Reviewed-by: Vivek Gautam Reviewed-by: Vinod Koul Signed-off-by: Andy Gross commit da8eaf9a6cee12a0a77c82ffb0c93818e050f0d7 Author: Niklas Cassel Date: Wed Aug 29 09:57:16 2018 +0200 soc: qcom: llcc-slice: Add missing include of sizes.h Add missing include of sizes.h. drivers/soc/qcom/llcc-slice.c: In function ‘llcc_update_act_ctrl’: drivers/soc/qcom/llcc-slice.c:41:44: error: ‘SZ_4K’ undeclared #define LLCC_TRP_ACT_CTRLn(n) (n * SZ_4K) ^~~~~ Signed-off-by: Niklas Cassel Reviewed-by: Vivek Gautam Reviewed-by: Vinod Koul Signed-off-by: Andy Gross commit 9487e2ab1010c92789471d944230ecd38c720333 Author: Niklas Cassel Date: Wed Aug 29 09:57:15 2018 +0200 soc: qcom: smem: Add missing include of sizes.h Add missing include of sizes.h. drivers/soc/qcom/smem.c: In function ‘qcom_smem_get_ptable’: drivers/soc/qcom/smem.c:666:64: error: ‘SZ_4K’ undeclared ptable = smem->regions[0].virt_base + smem->regions[0].size - SZ_4K; ^~~~~ Signed-off-by: Niklas Cassel Reviewed-by: Vivek Gautam Reviewed-by: Vinod Koul Signed-off-by: Andy Gross commit 35aac0ba88d55da6ef879572e931f57098aa4d23 Author: Colin Ian King Date: Mon Jun 11 09:38:38 2018 +0100 soc: qcom: apr: fix spelling mistake: "paket" -> "packet" Trivial fix to spelling mistake in dev_err message text Signed-off-by: Colin Ian King Signed-off-by: Andy Gross commit 867d4aa7013fdee8b962cde1711f96c8dd86d926 Author: Douglas Anderson Date: Thu Sep 6 15:49:06 2018 -0700 soc: qcom: geni: geni_se_clk_freq_match() should always accept multiples The geni_se_clk_freq_match() has some strange semantics. Specifically it is defined with two modes: 1. It can find a clock that's an exact multiple of the requested rate 2. It can find a non-exact match but it can't handle multiples then ...but callers should always be able to handle a clock that is a multiple of the requested clock so mode #2 doesn't really make sense. Let's change the semantics so that the non-exact match can also accept multiples and then change the code to handle that. The only caller of this code is the unlanded SPI driver [1] which currently passes "exact = True", thus it should be safe to change the semantics in this way. ...and, in fact, the SPI driver should likely be modified to pass "exact = False" (with the new semantics) since that will allow it to work with SPI devices that request a clock rate that doesn't exactly match a rate we can make. [1] https://lkml.kernel.org/r/1535107336-2214-1-git-send-email-dkota@codeaurora.org Fixes: eddac5af0654 ("soc: qcom: Add GENI based QUP Wrapper driver") Signed-off-by: Douglas Anderson Reviewed-by: Matthias Kaehlcke Signed-off-by: Andy Gross commit e11bbcedecae85ce60a5d99ea03528c2d6f867e0 Author: Douglas Anderson Date: Thu Sep 6 15:49:05 2018 -0700 soc: qcom: geni: Don't ignore clk_round_rate() errors in geni_se_clk_tbl_get() The function clk_round_rate() is defined to return a "long", not an "unsigned long". That's because it might return a negative error code. Change the call in geni_se_clk_tbl_get() to check for errors. While we're at it, get rid of a useless init of "freq". NOTE: overall the idea that we should iterate over clk_round_rate() to try to reconstruct a table already present in the clock driver is questionable. Specifically: - This method relies on "clk_round_rate()" rounding up. - This method only works if the table is sorted and has no duplicates. ...this patch doesn't try to fix those problems, it just makes the error handling more correct. Fixes: eddac5af0654 ("soc: qcom: Add GENI based QUP Wrapper driver") Signed-off-by: Douglas Anderson Reviewed-by: Matthias Kaehlcke Signed-off-by: Andy Gross commit f4926ef76e23e291fcd38bd107c0a9bb8e2db505 Author: Stephen Boyd Date: Fri May 18 15:47:50 2018 -0700 soc: qcom: geni: Make version macros simpler This macro doesn't work, because it hides a local variable inside of the macro to hold the version and that variable name is called 'ver' and 'version' sometimes. Let's change this to be more explicit. Introduce three macros for the major, minor, and step of the version, and require callers to pass the version in to get the part of the version out. This way we don't hide local variables inside macros and things are less evil overall. Cc: Karthikeyan Ramasubramanian Cc: Sagar Dharia Cc: Girish Mahadevan Signed-off-by: Stephen Boyd Reviewed-by: Douglas Anderson Reviewed-by: Bjorn Andersson Signed-off-by: Andy Gross commit b54ef3814f4a30c4c023ea099c8e4c962cfe3614 Author: Venkata Narendra Kumar Gutta Date: Wed Sep 12 11:06:35 2018 -0700 dt-bindings: msm: Update documentation of qcom,llcc Add reg-names and interrupts for LLCC documentation and the usage examples. llcc broadcast base is added in addition to llcc base, which is used for llcc broadcast writes. Signed-off-by: Venkata Narendra Kumar Gutta Reviewed-by: Rob Herring Signed-off-by: Andy Gross commit 27450653f1db0b9d5b5048a246c850c52ee4aa61 Author: Channagoud Kadabi Date: Wed Sep 12 11:06:34 2018 -0700 drivers: edac: Add EDAC driver support for QCOM SoCs Add error reporting driver for Single Bit Errors (SBEs) and Double Bit Errors (DBEs). As of now, this driver supports error reporting for Last Level Cache Controller (LLCC) of Tag RAM and Data RAM. Interrupts are triggered when the errors happen in the cache, the driver handles those interrupts and dumps the syndrome registers. Signed-off-by: Channagoud Kadabi Signed-off-by: Venkata Narendra Kumar Gutta Co-developed-by: Venkata Narendra Kumar Gutta Acked-by: Borislav Petkov Signed-off-by: Andy Gross commit c081f3060fab316fcf103967a24e502d58488849 Author: Venkata Narendra Kumar Gutta Date: Wed Sep 12 11:06:33 2018 -0700 soc: qcom: Add support to register LLCC EDAC driver Cache error reporting controller detects and reports single and double bit errors on Last Level Cache Controller (LLCC) cache. Add required support to register LLCC EDAC driver as platform driver, from LLCC driver. Signed-off-by: Venkata Narendra Kumar Gutta Reviewed-by: Evan Green Signed-off-by: Andy Gross commit 7f9c136216c745099f36a4e0c3b2e63eedeb442f Author: Venkata Narendra Kumar Gutta Date: Wed Sep 12 11:06:32 2018 -0700 soc: qcom: Add broadcast base for Last Level Cache Controller (LLCC) Currently, broadcast base is set to end of the LLCC banks, which may not be correct always. As the number of banks may vary for each chipset and the broadcast base could be at a different address as well. This info depends on the chipset, so get the broadcast base info from the device tree (DT). Add broadcast base in LLCC driver and use this for broadcast writes. Signed-off-by: Venkata Narendra Kumar Gutta Reviewed-by: Evan Green Signed-off-by: Andy Gross commit 54c2678cd198f61555796bbda5e1727e6e1858f1 Author: Frank Rowand Date: Thu Sep 6 21:44:48 2018 -0700 ARM: qcom_defconfig: Enable MAILBOX Problem: ab460a2e72da ("rpmsg: qcom_smd: Access APCS through mailbox framework" added a "depends on MAILBOX") to RPMSG_QCOM_SMD, thus RPMSG_QCOM_SMD becomes unset since MAILBOX was not enabled in qcom_defconfig and is not otherwise selected for the dragonboard. When the resulting kernel is booted the mmc device which contains the root file system is not available. Fix: add CONFIG_MAILBOX to qcom_defconfig Fixes: ab460a2e72da ("rpmsg: qcom_smd: Access APCS through mailbox framework" added a "depends on MAILBOX") Signed-off-by: Frank Rowand Reviewed-by: Bjorn Andersson Signed-off-by: Andy Gross commit b002c6fdab69baea633b498374166158fa581495 Author: John Crispin Date: Wed Jul 25 10:37:49 2018 +0200 ARM: dts: qcom: ipq4019: fix space vs tab indenting inside qcom-ipq4019.dtsi There are various places inside this dtsi file where 8 spaces where used for indenting instead of tabs. Signed-off-by: John Crispin Signed-off-by: Andy Gross commit da89f500cb55fb3f19c4b399b46d8add0abbd4d6 Author: Mathias Kresin Date: Wed Jul 25 10:37:48 2018 +0200 ARM: dts: qcom: ipq4019: fix PCI range The PCI range is invalid and PCI attached devices doen't work. Signed-off-by: Mathias Kresin Signed-off-by: John Crispin Signed-off-by: Andy Gross commit bd73a3dd257fb838bd456a18eeee0ef0224b7a40 Author: Christian Lamparter Date: Wed Jul 25 10:37:47 2018 +0200 ARM: dts: qcom: ipq4019: fix cpu0's qcom,saw2 reg value while compiling an ipq4019 target, dtc will complain: regulator@b089000 unit address format error, expected "2089000" The saw0 regulator reg value seems to be copied and pasted from qcom-ipq8064.dtsi. This patch fixes the reg value to match that of the unit address which in turn silences the warning. (There is no driver for qcom,saw2 right now. So this went unnoticed) Signed-off-by: Christian Lamparter Signed-off-by: John Crispin Signed-off-by: Andy Gross commit bcb9ab4c2917e92114d2f4c2b1da97cdf15b471b Author: Matthew McClintock Date: Wed Jul 25 10:37:46 2018 +0200 ARM: dts: qcom: ipq4019: add cpu operating points for cpufreq support This adds some operating points for cpu frequeny scaling Signed-off-by: Matthew McClintock Signed-off-by: John Crispin Signed-off-by: Andy Gross commit 233c77d4f1d12e4337fba1146d5197f4c0f9107d Author: Matthew McClintock Date: Wed Jul 25 10:37:45 2018 +0200 ARM: dts: qcom: ipq4019: use v2 of the kpss bringup mechanism v1 was the incorrect choice here and sometimes the board would not come up properly. Signed-off-by: Matthew McClintock Signed-off-by: Christian Lamparter Signed-off-by: John Crispin Signed-off-by: Andy Gross commit 646b90259842faa8341b076a3488a227927d84a2 Author: Christian König Date: Mon Sep 10 20:02:46 2018 +0200 drm/amdgpu: use a single linked list for amdgpu_vm_bo_base Instead of the double linked list. Gets the size of amdgpu_vm_pt down to 64 bytes again. We could even reduce it down to 32 bytes, but that would require some rather extreme hacks. Signed-off-by: Christian König Reviewed-by: Chunming Zhou Acked-by: Felix Kuehling Signed-off-by: Alex Deucher commit e83dfe4d869358549bb259ab581ae4f0450c6580 Author: Christian König Date: Mon Sep 10 16:07:57 2018 +0200 drm/amdgpu: remove amdgpu_bo_list_entry.robj (v2) We can get that just by casting tv.bo. v2: squash in kfd fix (Alex) Signed-off-by: Christian König Reviewed-by: Chunming Zhou Signed-off-by: Alex Deucher commit 03651735fbded39f608163718f816ab9cf14fba7 Author: Christian König Date: Wed Sep 12 21:19:57 2018 +0200 drm/ttm: once more fix ttm_bo_bulk_move_lru_tail While cutting the lists we sometimes accidentally added a list_head from the stack to the LRUs, effectively corrupting the list. Remove the list cutting and use explicit list manipulation instead. Signed-off-by: Christian König Reviewed-and-Tested: Huang Rui Tested-by: Mike Lothian Signed-off-by: Alex Deucher commit c37e2d29f0fbc933508637d7129a8f079b06ab40 Author: Andrey Grodzovsky Date: Wed Sep 12 16:38:57 2018 -0400 drm/amd/display: Fix pflip IRQ status after gpu reset. Problem: After GPU reset pflip completion IRQ is disabled and hence any subsequent mode set or plane update leads to hang. Fix: Unless acrtc->otg_inst is initialized to -1 during display block initializtion then durng resume from GPU reset amdgpu_irq_gpu_reset_resume_helper will override CRTC 0 pflip IRQ value with whatever value was on every other unused CRTC because dm_irq_state will do irq_source = dal_irq_type + acrtc->otg_inst where acrtc->otg_inst will be 0 for every unused CRTC. Reviewed-by: Harry Wentland Signed-off-by: Andrey Grodzovsky Signed-off-by: Alex Deucher commit 0c70dd4985b3ad440ec6c51f34f2b47877edf8fd Author: Christian König Date: Fri Sep 7 20:34:17 2018 +0200 drm/amdgpu: allow fragment processing for invalid PTEs That should improve the PRT performance on Vega quite a bit. Signed-off-by: Christian König Reviewed-by: Felix Kuehling Reviewed-by: Huang Rui Acked-by: Junwei Zhang Signed-off-by: Alex Deucher commit 1b1d5c43db58d236d4a6c9700ef9395b3fc129fb Author: Christian König Date: Fri Sep 7 14:21:15 2018 +0200 drm/amdgpu: use the maximum possible fragment size on Vega/Raven The fragment size controls only the L1 on Vega/Raven and we now don't have any extra overhead any more because of larger fragments. Signed-off-by: Christian König Reviewed-by: Huang Rui Reviewed-by: Felix Kuehling Acked-by: Junwei Zhang Signed-off-by: Alex Deucher commit dfcd99f6273e7ae9aae10eafacc5521018bee143 Author: Christian König Date: Thu Sep 6 17:13:06 2018 +0200 drm/amdgpu: meld together VM fragment and huge page handling This optimizes the generating of PTEs by walking the hierarchy only once for a range and making changes as necessary. It allows for both huge (2MB) as well giant (1GB) pages to be used on Vega and Raven. Signed-off-by: Christian König Reviewed-by: Felix Kuehling Reviewed-by: Huang Rui Acked-by: Junwei Zhang Signed-off-by: Alex Deucher commit dfa70550f5b77252d99ba9c410b9fbe6e4088e51 Author: Christian König Date: Mon Sep 3 14:34:51 2018 +0200 drm/amdgpu: use leaf iterator for filling PTs Less overhead and is the starting point for further cleanups and improvements. Signed-off-by: Christian König Reviewed-by: Felix Kuehling Reviewed-by: Junwei Zhang Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit d4085ea9bc8dc44eb4bfd696474f9ef26ec9e0cd Author: Christian König Date: Sat Sep 8 13:05:34 2018 +0200 drm/amdgpu: use the DFS iterator in amdgpu_vm_invalidate_pds v2 Less code and easier to maintain. v2: rename the function as well Signed-off-by: Christian König Reviewed-by: Huang Rui Reviewed-by: Junwei Zhang Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 229a37f83454c59a9c8742c811119da4a33d619b Author: Christian König Date: Thu Sep 6 15:35:13 2018 +0200 drm/amdgpu: use dfs iterator to free PDs/PTs Allows us to free all PDs/PTs without recursion. Signed-off-by: Christian König Reviewed-by: Felix Kuehling Reviewed-by: Junwei Zhang Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit d72a6887eef880271c0d48ed427329ccc0d547f9 Author: Christian König Date: Sat Sep 1 12:03:37 2018 +0200 drm/amdgpu: use leaf iterator for allocating PD/PT Less code and allows for easier error handling. Signed-off-by: Christian König Reviewed-by: Felix Kuehling Reviewed-by: Junwei Zhang Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 73633e3223e6e19bd22775b4ad725fdc65d5d8ed Author: Christian König Date: Sat Sep 1 10:36:48 2018 +0200 drm/amdgpu: add some VM PD/PT iterators v2 Both a leaf as well as dfs iterator to walk over all the PDs/PTs. v2: update comments and fix for_each_amdgpu_vm_pt_dfs_safe Signed-off-by: Christian König Reviewed-by: Huang Rui Reviewed-by: Junwei Zhang Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 52e211c1f04f7544bf3d3cf5ed3939708d5988d2 Author: James Zhu Date: Mon Sep 10 12:53:25 2018 -0400 drm/amdgpu:Add error message when register failed to reach expected value Add error message when register failed to reach expected value, It will help discover potential issue. Signed-off-by: James Zhu Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit bd9392507588483da81337cb430531d1cb114845 Author: Brian Masney Date: Thu Aug 2 20:19:00 2018 -0400 ARM: dts: qcom: msm8974-hammerhead: add device tree bindings for ALS / proximity This patch adds device tree bindings for the tsl2772 ALS / proximity sensor for the LG Nexus 5 (hammerhead) phone. Signed-off-by: Brian Masney Signed-off-by: Jonathan Marek Acked-by: Jonathan Cameron Signed-off-by: Andy Gross commit fe8d81fe7d9aab6a8e22c8b115eb06b7707087db Author: Brian Masney Date: Thu Aug 2 20:18:53 2018 -0400 ARM: dts: qcom: msm8974-hammerhead: add device tree bindings for mpu6515 This patch adds device tree bindings for the mpu6515 to the LG Nexus 5 (hammerhead) phone. Confirmed that the gyroscope / accelerometer (mpu6515), magnetometer (ak8963), and temperature / pressure (bmp280) sensors are available on the phone. Interrupts are not working properly on the ak8963 magnetometer so they are currently not configured. The bmp280 retuns temperature/pressure measurement skipped errors but will reliably work if I run: echo 1 > in_pressure_oversampling_ratio echo 1 > in_temp_oversampling_ratio Signed-off-by: Brian Masney Signed-off-by: Jonathan Marek Signed-off-by: Andy Gross commit 14e63a953a8dc536a5b07df087171aaeba052d40 Author: Sricharan R Date: Fri Aug 3 19:40:19 2018 +0530 ARM: dts: qcom: Add led and gpio-button nodes to ipq8064 boards Add the dt nodes for enabling the leds and gpio-buttons. Signed-off-by: Sricharan R Signed-off-by: Andy Gross commit 2e7a2c91019c5dfa7279bdcf29b23ebab2c91b1d Author: Sricharan R Date: Fri Aug 3 19:40:17 2018 +0530 ARM: dts: qcom: Move common nodes to ipq8064-v.1.0.dtsi The nodes in ipq8064-ap148.dts currently are common with boards that we will add next. So move the common data to ipq8064-v.1.0.dtsi. Signed-off-by: Sricharan R Signed-off-by: Andy Gross commit f14c5588929be8e6df7e3893028b416b285db8c4 Author: Sricharan R Date: Fri Aug 3 19:40:16 2018 +0530 ARM: dts: qcom: Add sdcc nodes for ipq8064 The relevant data for sdcc. Signed-off-by: Sricharan R Signed-off-by: Andy Gross commit 93241840b6648af29653f500e6f97aa78fef7a08 Author: Sricharan R Date: Fri Aug 3 19:40:15 2018 +0530 ARM: dts: qcom: Add pcie nodes for ipq8064 Adding the pcie nodes and pins. Signed-off-by: Sricharan R Signed-off-by: Andy Gross commit dcf145011400cabb6dd5d17615c6c47bb094d2c0 Author: Frank Rowand Date: Thu Sep 6 22:33:14 2018 -0700 ARM: dts: qcom-msm8974: change invalid flag IRQ NONE to valid value Change the third field of the "interrupts" property from IRQ_TYPE_NONE to the correct value. I do not have hardware documentation for these devices, so I followed a mail list suggestion to copy the flag values from the same type of node in arch/arm64/boot/dts/qcom/msm8916.dtsi Signed-off-by: Frank Rowand Signed-off-by: Andy Gross commit 23a81d371b99be96ad09462da3aa55ecd3c51b7f Author: Frank Rowand Date: Thu Sep 6 22:33:13 2018 -0700 ARM: dts: qcom-msm8974: use named constant for interrupt flag NONE Cosmetic change of integer value "0" in the third field of the "interrupts" property to the correct named constant. Signed-off-by: Frank Rowand Signed-off-by: Andy Gross commit 1e19d44e8e60e4b9b5d5cecc691c62c053931731 Author: Frank Rowand Date: Thu Sep 6 22:33:12 2018 -0700 ARM: dts: qcom-msm8974: use named constant for interrupt flag LEVEL HIGH Cosmetic change of integer value "4" in the third field of the "interrupts" property to the correct named constant. Signed-off-by: Frank Rowand Signed-off-by: Andy Gross commit b0ef3d943d6e17244b2e3209869ff82922cebb82 Author: Frank Rowand Date: Thu Sep 6 22:33:11 2018 -0700 ARM: dts: qcom-msm8974: use named constant for interrupt flag EDGE RISING Cosmetic change of integer value "1" in the third field of the "interrupts" property to the correct named constant. Signed-off-by: Frank Rowand Signed-off-by: Andy Gross commit 12d2de2e50e0da9f1c0e7173219a9c8e576f53a3 Author: Frank Rowand Date: Thu Sep 6 22:33:10 2018 -0700 ARM: dts: qcom-msm8974: use named constant for interrupt type GIC_SPI Cosmetic change of integer value "0" in the first field of the "interrupts" property to the correct named constant. Signed-off-by: Frank Rowand Signed-off-by: Andy Gross commit b0a627b409832c69ed9de23a98651f32ff796870 Author: Frank Rowand Date: Thu Sep 6 22:33:09 2018 -0700 ARM: dts: qcom-msm8974: use named constant for interrupt type GIC_PPI Cosmetic change of integer value "1" in the first field of the "interrupts" property to the correct named constant. Signed-off-by: Frank Rowand Signed-off-by: Andy Gross commit 4e05047d3e0099c9b802eb643a5de0c60feccf17 Author: Ville Syrjälä Date: Wed Sep 12 21:04:43 2018 +0300 drm/i915: Fix a potential integer overflow with framebuffers extending past 4 GiB If we have framebuffers that are >= 4GiB in size we will overflow the fb size check in intel_fill_fb_info(). Currently that is only possible with NV12 and CCS as offsets[1] may be anything between 0 and 0xffffffff. offsets[0] is currently required to be 0 so we can't hit the overflow with any single plane format (thanks to max fb size of 8kx8k and max stride of 32 KiB). In the future we may allow almost any framebuffer to exceed 4GiB in size so we really should fix the overflow. Not that the overflow is particularly dangerous. It's mostly just a sanity check against insane userspace. The display engine can't write to memory anyway so I suppose in the worst case we might anger the hw by attempting scanout past the end of the ggtt, or we might scan out some data that we're not supposed to see from other parts of the ggtt. Note that triggering this overflow depends on the driver aligning the fb height to the next tile boundary to push the calculated size above 4GiB. With linear buffers the effective tile height is one so that never happens, and the core already has a check for 32bit overflow of offsets[]+pitches[]*height. v2: Drop the unnecessary cast (Chris) Testcase: igt/kms_big_fb/x-tiled-addfb-size-offset-overflow Testcase: igt/kms_big_fb/y-tiled-addfb-size-offset-overflow Signed-off-by: Ville Syrjälä Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20180912180443.28649-1-ville.syrjala@linux.intel.com commit 447c9dad7e3197034bb6aa7f473e86c1c80f3af3 Author: Bjorn Andersson Date: Mon Aug 27 22:37:05 2018 -0700 arm64: dts: msm8996: Transition smp2p and smd to mailbox The smd and smp2p drivers now support accessing the APCS GLOBAL IPC register through the mailbox framework, so migrate the msm8996 dts to use this and remove the syscon based APCS node. Signed-off-by: Bjorn Andersson Signed-off-by: Andy Gross commit 1bdf91fd2ae8226f34ed3a760199946c7dfe746d Author: Bjorn Andersson Date: Mon Aug 27 22:14:43 2018 -0700 arm64: defconfig: Enable Qualcomm QRTR The QRTR packet family is used for a wide range of communication between services in Qualcomm platforms. Examples of services using this transport for communication are remoteproc management, modem control, positioning, power management and WiFi. Signed-off-by: Bjorn Andersson Signed-off-by: Andy Gross commit 1b9d8bd69305d9020534e09f3f790e43d1393b03 Author: Matthias Kaehlcke Date: Tue Jul 31 11:59:17 2018 -0700 arm64: dts: qcom: pm8998: Add pm8998 thermal zone The thermal zone uses spmi-temp-alarm as sensor, the trip points correspond to the PMIC thermal stages 1 and 2. The critical trip point at 125°C disables the partial PMIC shutdown at stage 2. Without an IIO input the sensor only reports a limited number of temperatures: - 37°C for temperatures below 105°C - 107°C for temperatures >= 105°C and < 125°C - 127°C for temperatures >= 125°C (the numbers correspond to a stage 1 threshold of 105°C) Signed-off-by: Matthias Kaehlcke Reviewed-by: Douglas Anderson Signed-off-by: Andy Gross commit 4458bba09788e70e8fb39ad003f087cd9dfbd6ac Author: Tetsuo Handa Date: Sat Sep 8 01:42:58 2018 +0900 selinux: Add __GFP_NOWARN to allocation at str_read() syzbot is hitting warning at str_read() [1] because len parameter can become larger than KMALLOC_MAX_SIZE. We don't need to emit warning for this case. [1] https://syzkaller.appspot.com/bug?id=7f2f5aad79ea8663c296a2eedb81978401a908f0 Signed-off-by: Tetsuo Handa Reported-by: syzbot Signed-off-by: Paul Moore commit 104e6415bf5000ed37ed2765ff0c1619b426d84b Author: Matthias Kaehlcke Date: Tue Jul 31 11:59:16 2018 -0700 arm64: dts: qcom: pm8998: Add spmi-temp-alarm node This adds the spmi-temp-alarm node to pm8998 based on the examples in the bindings. Signed-off-by: Matthias Kaehlcke Reviewed-by: Douglas Anderson Signed-off-by: Andy Gross commit e704472616d7e185b839991b611a77711dbb22e3 Author: Matthias Kaehlcke Date: Tue Jul 31 11:59:13 2018 -0700 dt-bindings: thermal: qcom-spmi-temp-alarm: Fix documentation of 'reg' The documentation claims that the 'reg' property consists of two values, the SPMI address and the length of the controller's registers. However the SPMI bus to which it is added specifies "#size-cells = <0>;". Remove the controller register length from the documentation of the field and the example. Signed-off-by: Matthias Kaehlcke Reviewed-by: Douglas Anderson Signed-off-by: Andy Gross commit 40019e8452fe76867bdb2e7d5ca9f085fe0cd16b Author: Matthias Kaehlcke Date: Fri Aug 3 15:20:59 2018 -0700 arm64: dts: sdm845: Add dispcc node This adds the display clock controller node to sdm845 based on the examples in the bindings. Signed-off-by: Matthias Kaehlcke Reviewed-by: Douglas Anderson Signed-off-by: Andy Gross commit 3debb1f30b09f8db4ddf70f74d5d9b5de1b5327c Author: Bjorn Andersson Date: Sat Sep 1 15:27:21 2018 -0700 arm64: dts: qcom: sdm845: Add adsp, cdsp and slpi smp2p Add the SMP2P nodes for the remoteproc states for adsp, cdsp and slpi. Signed-off-by: Bjorn Andersson Signed-off-by: Andy Gross commit cfe10d38aa1ae6aaa8979f3eb3695db57863ccd9 Author: Douglas Anderson Date: Wed Aug 22 10:36:29 2018 -0700 arm64: dts: qcom: sdm845-mtp: Add nodes for USB Set the various nodes to "okay" and hook up the regulators. NOTE: For now the main USB port (the one that goes out the Type C connector) is forced to host. Eventually someone will need to get the Type C detection hooked up and get this all integrated with the PMI8998 PMIC. The reason for forcing to "host" in the meantime is that this will leave us with one "host" and one "peripheral" port. In order for host mode this to work, we assume that the bootloader left things configured enough for us. Apparently the magic for that is is to do these writes on pmi8998: - pm_comm_write_byte(2, 0x1153, 0x2C, 0); - pm_comm_write_byte(2, 0x1152, 0x07, 0); - pm_comm_write_byte(2, 0x1140, 0x00, 0); - pm_comm_write_byte(2, 0x1140, 0x01, 0); Signed-off-by: Douglas Anderson Reviewed-by: Stephen Boyd Reviewed-by: Bjorn Andersson Signed-off-by: Andy Gross commit d6c40ccf0531938db39ba0fdb28e338bd0da3ed4 Author: Douglas Anderson Date: Wed Aug 22 10:36:28 2018 -0700 arm64: dts: qcom: sdm845-mtp: Add RPMh VRM/XOB regulators Add regulator devices for PMIC regulators managed via VRM and XOB RPMh accelerators. A few notes here: - Regulators are added directly to the board file. While it's true that this will mean a bunch of copy/pasting for other boards that are very similar, this is probably the right call since boards could make changes to the way these regulators are hooked up and trying to find a way to avoid duplication will result in some confusing node overrides. - Regulators that are hooked up to supply pins on the SoC are given an alias matching the name of that pin (pin name comes from the Qualcomm SoC "device specification" doc). - Other regulator labels are based on the schematic. If there is more than one logical name on the schematic for the same rail the secondary names are also listed and should be referred to as appropriate. - Regulators all default to HPM mode w/ no ability to switch modes. Future patches can switch things to LPM and possibly add dynamic load switching if we have determined there's a benefit. This should only be done for rails where we'll actually be able to take advantage of the lower power modes so we don't need to churn with lots of patches adding regulator_set_load() calls to drivers. NOTE: This patch is loosely based on one originally shared to me by David Collins. Signed-off-by: Douglas Anderson Reviewed-by: Stephen Boyd Reviewed-by: Bjorn Andersson Signed-off-by: Andy Gross commit ca4db2b538a17aaf46ed968815cda50da2ca34a5 Author: Manu Gautam Date: Wed Aug 22 10:36:27 2018 -0700 arm64: dts: qcom: sdm845: Add USB-related nodes This adds nodes for USB and related PHYs. Signed-off-by: Manu Gautam [dianders: reworked quite a bit] Signed-off-by: Douglas Anderson Reviewed-by: Stephen Boyd Reviewed-by: Bjorn Andersson Signed-off-by: Andy Gross commit ead5eea3e3a924cccfb6bcb7841629eb044d0bd8 Author: Sibi Sankar Date: Sat Sep 1 15:23:55 2018 -0700 arm64: dts: qcom: Add AOSS reset driver node for SDM845 This patch adds the node to support AOSS reset driver on SDM845 Signed-off-by: Sibi Sankar [bjorn: Updated addresses to match the binding that was merged] Signed-off-by: Bjorn Andersson Signed-off-by: Andy Gross commit 216a2f9be0f5a1325256a1bb2e9f0832409dfc6c Author: Niklas Cassel Date: Wed Sep 5 20:35:17 2018 +0200 arm64: dts: msm8996: Drop model DTS board files should always specify model and compatible. All DTS board files that includes msm8996.dtsi already specifies model and compatible, and will thus override the model and compatible in msm8996.dtsi. Drop model from msm8916.dtsi, since it is only a source of confusion. Signed-off-by: Niklas Cassel Reviewed-by: Bjorn Andersson Signed-off-by: Andy Gross commit d5e20f286a84aa94e57fe24bb31674cb53363336 Author: Niklas Cassel Date: Wed Sep 5 20:35:16 2018 +0200 arm64: dts: msm8916: Drop model and compatible DTS board files should always specify model and compatible. All DTS board files that includes msm8916.dtsi already specifies model and compatible, and will thus override the model and compatible in msm8916.dtsi. Drop model and compatible from msm8916.dtsi, since they are only a source of confusion. Signed-off-by: Niklas Cassel Reviewed-by: Bjorn Andersson Signed-off-by: Andy Gross commit 0ef351ab8c8bc6ba2e01c3a047ea5bdeff87c690 Author: Niklas Cassel Date: Wed Sep 5 20:35:15 2018 +0200 arm64: dts: db820c: Add qcom,apq8096 to compatible string Add qcom,apq8096 to compatible string. This compatible is defined in Documentation/devicetree/bindings/arm/qcom.txt and is needed for e.g. drivers/cpufreq/qcom-cpufreq-kryo.c to be probed correctly (and for drivers/cpufreq/cpufreq-dt-platdev.c to work properly). Signed-off-by: Niklas Cassel Reviewed-by: Bjorn Andersson Signed-off-by: Andy Gross commit 61020aa53cc16a8edeaf9c45b896fab20ebda28a Author: Bjorn Andersson Date: Mon Sep 3 22:07:29 2018 -0700 arm64: dts: qcom: Populate pm8998 with additional nodes Add pon, coincell and rtc to the first pm8998 sid. Signed-off-by: Bjorn Andersson Signed-off-by: Andy Gross commit f6e35cda66146106cfeb85ed65696e0f8e793fee Author: Ville Syrjälä Date: Thu Sep 13 18:04:05 2018 +0300 drm/i915: Replace some PAGE_SIZE with I915_GTT_PAGE_SIZE Use I915_GTT_PAGE_SIZE when talking about GTT pages rather than physical pages. There are some PAGE_SHIFTs left though. Not sure if we want to introduce I915_GTT_PAGE_SHIFT or what? Cc: Chris Wilson Suggested-by: Chris Wilson # at least some of it :) Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180913150405.706-1-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson commit 50c12f7401a983d490b3397d5d5f0580a2a9f9c3 Author: Toke Høiland-Jørgensen Date: Thu Sep 13 16:43:07 2018 +0200 gso_segment: Reset skb->mac_len after modifying network header When splitting a GSO segment that consists of encapsulated packets, the skb->mac_len of the segments can end up being set wrong, causing packet drops in particular when using act_mirred and ifb interfaces in combination with a qdisc that splits GSO packets. This happens because at the time skb_segment() is called, network_header will point to the inner header, throwing off the calculation in skb_reset_mac_len(). The network_header is subsequently adjust by the outer IP gso_segment handlers, but they don't set the mac_len. Fix this by adding skb_reset_mac_len() calls to both the IPv4 and IPv6 gso_segment handlers, after they modify the network_header. Many thanks to Eric Dumazet for his help in identifying the cause of the bug. Acked-by: Dave Taht Reviewed-by: Eric Dumazet Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: David S. Miller commit 293681f149a8dc4c9df2c09b2c4e873d474be5d4 Author: YueHaibing Date: Thu Sep 13 21:32:23 2018 +0800 vxlan: Remove duplicated include from vxlan.h Remove duplicated include. Signed-off-by: YueHaibing Signed-off-by: David S. Miller commit e8d006fd863418db24c3e6d9b5adc1f30a175bba Author: Bjorn Andersson Date: Mon Sep 3 22:01:23 2018 -0700 arm64: dts: qcom: msm8998: Add smp2p nodes Add the adsp, modem and slpi smp2p nodes to msm8998. Signed-off-by: Bjorn Andersson Signed-off-by: Andy Gross commit f259e398af8ba4e16a52bced76948aed4f0b2281 Author: Bjorn Andersson Date: Mon Sep 3 22:01:22 2018 -0700 arm64: dts: qcom: msm8998: Add the qfprom node Add the QFPROM nvmem node to msm8998 Signed-off-by: Bjorn Andersson Signed-off-by: Andy Gross commit d850156a226a8f8e71ec1355f78ddd06cd5f2be7 Author: Bjorn Andersson Date: Mon Sep 3 22:01:21 2018 -0700 arm64: dts: qcom: msm8998: Add firmware node Add the firmware and scm nodes for msm8998 Signed-off-by: Bjorn Andersson Signed-off-by: Andy Gross commit c7833949564ecd374aa6d6dc723a82fb2608dc11 Author: Bjorn Andersson Date: Mon Sep 3 22:01:20 2018 -0700 arm64: dts: qcom: msm8998: Add smem related nodes Add reserve-memory nodes, tcsr-mutex nodes and the smem node. Signed-off-by: Bjorn Andersson Signed-off-by: Andy Gross commit b1227233f04952267e68a2dee619b7b19325d88c Author: Bjorn Andersson Date: Mon Sep 3 22:01:19 2018 -0700 arm64: dts: qcom: msm8998: Add pmi8998 file Add new dtsi file for the PMI8998, with its gpios and include all three PMICs in the MSM8998 MTP dts. Signed-off-by: Bjorn Andersson Signed-off-by: Andy Gross commit 4449b6f248d9a1c3ea8bb98416fe3bf8d5c71d8d Author: Bjorn Andersson Date: Mon Sep 3 22:01:18 2018 -0700 arm64: dts: qcom: msm8998: Add tsens and thermal-zones Add the two tsens instances and the thermal zones for CPUs, GPUs, battery and skin sensors. Signed-off-by: Bjorn Andersson Signed-off-by: Andy Gross commit 31c1f0e33debb9a82036b80310dc4edd6e038087 Author: Bjorn Andersson Date: Mon Sep 3 22:01:17 2018 -0700 arm64: dts: qcom: msm8998: Add RPM and regulators for MTP Add nodes for RPM communication for MSM8998 and the regulator nodes for the MTP. Signed-off-by: Bjorn Andersson Signed-off-by: Andy Gross commit 4807c71cc6886f127abbfbfe912c8bf5015e3798 Author: Joonwoo Park Date: Mon Sep 3 22:01:16 2018 -0700 arm64: dts: Add msm8998 SoC and MTP board support Add initial device tree support for the Qualcomm MSM8998 SoC and MTP8998 evaluation board. Signed-off-by: Joonwoo Park Signed-off-by: Imran Khan Signed-off-by: Rajendra Nayak [bjorn: Restructured, removed its node and moved to SPDX headers] Signed-off-by: Bjorn Andersson Signed-off-by: Andy Gross commit 43fb4431684067ca5547aa08b9c62db2fb024f53 Author: Matthias Kaehlcke Date: Mon Sep 10 09:03:00 2018 -0700 arm64: dts: qcom: pm8998: Add adc node This adds the adc node to pm8998 based on the examples in the bindings. It also fixes the order of the included headers. Signed-off-by: Matthias Kaehlcke Reviewed-by: Douglas Anderson Signed-off-by: Andy Gross commit 7028cae1857cc2c6acc69586584e92d044027154 Author: Matthias Kaehlcke Date: Mon Sep 10 09:02:59 2018 -0700 dt-bindings: iio: vadc: Fix documentation of 'reg' The documentation of Qualcomm's SPMI PMIC voltage ADC claims that the 'reg' property consists of two values, the SPMI address and the length of the controller's registers. However the SPMI bus to which it is added specifies "#size-cells = <0>;". Remove the controller register length from the documentation of the field and the example. Signed-off-by: Matthias Kaehlcke Reviewed-by: Douglas Anderson Reviewed-by: Rob Herring Signed-off-by: Andy Gross commit 5817e887fc05bb62c287a8446812edc2347a66f1 Author: Vinod Koul Date: Mon Sep 10 15:18:49 2018 +0530 arm64: dts: qcom: apq8096-db820c: Add resin node Resin is board specific, so add the resin node in apq8096-db820c dtsi Signed-off-by: Vinod Koul Reviewed-by: Bjorn Andersson Signed-off-by: Andy Gross commit caf0caee50f325a2224064d166b764e5d5c034b5 Author: Vinod Koul Date: Mon Sep 10 15:18:48 2018 +0530 arm64: dts: qcom: apq8016-sbc: Add resin node Resin is board specific so add the resin node in apq8016-sbc dtsi Signed-off-by: Vinod Koul Reviewed-by: Bjorn Andersson Signed-off-by: Andy Gross commit 2f74b3db92bef4f8f246d9301b6382890c5a24d8 Author: Vinod Koul Date: Mon Sep 10 15:18:47 2018 +0530 arm64: dts: qcom: pm8994: Add PON node Add PON and pwrkey as child nodes for PON driver. Signed-off-by: Vinod Koul Reviewed-by: Bjorn Andersson Signed-off-by: Andy Gross commit ad5fe7870537a5c57d9e3297dba79273b157bd84 Author: Vinod Koul Date: Mon Sep 10 15:18:46 2018 +0530 arm64: dts: qcom: pm8916: Add PON node Add PON and pwrkey as child nodes for PON device. Also add additional properties for pwrkey i.e., linux,code Signed-off-by: Vinod Koul Reviewed-by: Bjorn Andersson Signed-off-by: Andy Gross commit 351c4dbe4fae44b747dd97114a5983ec23a49f24 Author: Ville Syrjälä Date: Thu Sep 13 19:31:47 2018 +0300 drm/amdgpu: Use per-device driver_features to disable atomic Disable atomic on a per-device basis instead of for all devices. Made possible by the new device.driver_features thing. Cc: Alex Deucher Cc: "Christian König" Cc: "David (ChunMing) Zhou" Cc: Harry Wentland Cc: Michel Dänzer Suggested-by: Michel Dänzer Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180913163147.27900-2-ville.syrjala@linux.intel.com Reviewed-by: Michel Dänzer Reviewed-by: Alex Deucher commit bb138ad9f675216c0020b5e83dd9ecd391f6f868 Merge: ccf8b4e4eb6b 6ef5bd6cfd5d Author: Florian Fainelli Date: Thu Sep 13 11:13:30 2018 -0700 Merge tag 'tags/bcm2835-dt-next-2018-09-09' into devicetree/next This pull request brings in a board DT for the Raspberry Pi Compute Module 3, its I/O board and enables the Ethernet LEDs for the RPi 3B+. Signed-off-by: Florian Fainelli commit ccf8b4e4eb6b358a1ee445d9c9de507356360451 Author: Florian Fainelli Date: Fri Aug 31 12:20:39 2018 -0700 ARM: dts: NSP: Wire up switch interrupts The Switch Register Access Block (SRAB) has one interrupt for link state change on each ports (0-5, 7-8) a PHY interrupt, timestamping interrupt and sleep timer interrupts for each management ports (5,7,8). Wire those up so we can utilize them to speed up link resolution. Signed-off-by: Florian Fainelli commit 56512ffd2923fbe9665e84026074da96273dcb61 Author: Florian Fainelli Date: Fri Aug 31 12:20:38 2018 -0700 dt-bindings: net: dsa: Document B53 SRAB interrupts and registers Document the Broadcom roboswitch Switch Register Access Block interrupt lines and additional register base addresses for port mux configuration and SGMII status/configuration registers. Signed-off-by: Florian Fainelli Reviewed-by: Rob Herring commit 046ead61dc6973da049e606485858cdbb601b1e0 Author: Florian Fainelli Date: Fri Aug 31 12:20:37 2018 -0700 ARM: dts: NSP: Enable SFP on bcm958625hr Enable the SFP connected to port 5 of the switch and wire up all GPIOs to the SFP cage. Because of a hardware limitation of the i2c controller on the iProc SoCs which prevents large i2c (> 63 bytes) transactions to work, we use the i2c-gpio interface instead, which does not have that limitation. This allows us to read the SFP module EEPROM, which would not be possible otherwise since it exceeds that size during a single read transfer. Signed-off-by: Florian Fainelli Reviewed-by: Ray Jui commit b2ddc48a81b564a3cadcfd60698259d2b0f2cb47 Author: Florian Fainelli Date: Thu Sep 13 09:50:45 2018 -0700 net: dsa: b53: Do not fail when IRQ are not initialized When the Device Tree is not providing the per-port interrupts, do not fail during b53_srab_irq_enable() but instead bail out gracefully. The SRAB driver is used on the BCM5301X (Northstar) platforms which do not yet have the SRAB interrupts wired up. Fixes: 16994374a6fc ("net: dsa: b53: Make SRAB driver manage port interrupts") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller commit cb816cd22618b1822667a4c2c80023ffd0261777 Author: YueHaibing Date: Thu Sep 13 21:47:52 2018 +0800 RDMA: Remove duplicated include from ib_addr.h Remove duplicated include. Signed-off-by: YueHaibing Reviewed-by: Leon Romanovsky Signed-off-by: Doug Ledford commit 1f8266ff58840d698a1e96d2274189de1bdf7969 Author: Jann Horn Date: Thu Sep 13 18:12:09 2018 +0200 apparmor: don't try to replace stale label in ptrace access check As a comment above begin_current_label_crit_section() explains, begin_current_label_crit_section() must run in sleepable context because when label_is_stale() is true, aa_replace_current_label() runs, which uses prepare_creds(), which can sleep. Until now, the ptrace access check (which runs with a task lock held) violated this rule. Also add a might_sleep() assertion to begin_current_label_crit_section(), because asserts are less likely to be ignored than comments. Fixes: b2d09ae449ced ("apparmor: move ptrace checks to using labels") Signed-off-by: Jann Horn Signed-off-by: John Johansen commit 8bb83b78382c93ad05d0e898a9018d5aa3a24b79 Merge: 9708d2b5b7c6 0a0be13b8fe2 Author: David S. Miller Date: Thu Sep 13 09:25:41 2018 -0700 Merge branch 'vhost_net-TX-batching' Jason Wang says: ==================== vhost_net TX batching This series tries to batch submitting packets to underlayer socket through msg_control during sendmsg(). This is done by: 1) Doing userspace copy inside vhost_net 2) Build XDP buff 3) Batch at most 64 (VHOST_NET_BATCH) XDP buffs and submit them once through msg_control during sendmsg(). 4) Underlayer sockets can use XDP buffs directly when XDP is enalbed, or build skb based on XDP buff. For the packet that can not be built easily with XDP or for the case that batch submission is hard (e.g sndbuf is limited). We will go for the previous slow path, passing iov iterator to underlayer socket through sendmsg() once per packet. This can help to improve cache utilization and avoid lots of indirect calls with sendmsg(). It can also co-operate with the batching support of the underlayer sockets (e.g the case of XDP redirection through maps). Testpmd(txonly) in guest shows obvious improvements: Test /+pps% XDP_DROP on TAP /+44.8% XDP_REDIRECT on TAP /+29% macvtap (skb) /+26% Netperf TCP_STREAM TX from guest shows obvious improvements on small packet: size/session/+thu%/+normalize% 64/ 1/ +2%/ 0% 64/ 2/ +3%/ +1% 64/ 4/ +7%/ +5% 64/ 8/ +8%/ +6% 256/ 1/ +3%/ 0% 256/ 2/ +10%/ +7% 256/ 4/ +26%/ +22% 256/ 8/ +27%/ +23% 512/ 1/ +3%/ +2% 512/ 2/ +19%/ +14% 512/ 4/ +43%/ +40% 512/ 8/ +45%/ +41% 1024/ 1/ +4%/ 0% 1024/ 2/ +27%/ +21% 1024/ 4/ +38%/ +73% 1024/ 8/ +15%/ +24% 2048/ 1/ +10%/ +7% 2048/ 2/ +16%/ +12% 2048/ 4/ 0%/ +2% 2048/ 8/ 0%/ +2% 4096/ 1/ +36%/ +60% 4096/ 2/ -11%/ -26% 4096/ 4/ 0%/ +14% 4096/ 8/ 0%/ +4% 16384/ 1/ -1%/ +5% 16384/ 2/ 0%/ +2% 16384/ 4/ 0%/ -3% 16384/ 8/ 0%/ +4% 65535/ 1/ 0%/ +10% 65535/ 2/ 0%/ +8% 65535/ 4/ 0%/ +1% 65535/ 8/ 0%/ +3% Please review. ==================== Signed-off-by: David S. Miller commit 0a0be13b8fe2cac11da2063fb03f0f39359b3069 Author: Jason Wang Date: Wed Sep 12 11:17:09 2018 +0800 vhost_net: batch submitting XDP buffers to underlayer sockets This patch implements XDP batching for vhost_net. The idea is first to try to do userspace copy and build XDP buff directly in vhost. Instead of submitting the packet immediately, vhost_net will batch them in an array and submit every 64 (VHOST_NET_BATCH) packets to the under layer sockets through msg_control of sendmsg(). When XDP is enabled on the TUN/TAP, TUN/TAP can process XDP inside a loop without caring GUP thus it can do batch map flushing. When XDP is not enabled or not supported, the underlayer socket need to build skb and pass it to network core. The batched packet submission allows us to do batching like netif_receive_skb_list() in the future. This saves lots of indirect calls for better cache utilization. For the case that we can't so batching e.g when sndbuf is limited or packet size is too large, we will go for usual one packet per sendmsg() way. Doing testpmd on various setups gives us: Test /+pps% XDP_DROP on TAP /+44.8% XDP_REDIRECT on TAP /+29% macvtap (skb) /+26% Netperf tests shows obvious improvements for small packet transmission: size/session/+thu%/+normalize% 64/ 1/ +2%/ 0% 64/ 2/ +3%/ +1% 64/ 4/ +7%/ +5% 64/ 8/ +8%/ +6% 256/ 1/ +3%/ 0% 256/ 2/ +10%/ +7% 256/ 4/ +26%/ +22% 256/ 8/ +27%/ +23% 512/ 1/ +3%/ +2% 512/ 2/ +19%/ +14% 512/ 4/ +43%/ +40% 512/ 8/ +45%/ +41% 1024/ 1/ +4%/ 0% 1024/ 2/ +27%/ +21% 1024/ 4/ +38%/ +73% 1024/ 8/ +15%/ +24% 2048/ 1/ +10%/ +7% 2048/ 2/ +16%/ +12% 2048/ 4/ 0%/ +2% 2048/ 8/ 0%/ +2% 4096/ 1/ +36%/ +60% 4096/ 2/ -11%/ -26% 4096/ 4/ 0%/ +14% 4096/ 8/ 0%/ +4% 16384/ 1/ -1%/ +5% 16384/ 2/ 0%/ +2% 16384/ 4/ 0%/ -3% 16384/ 8/ 0%/ +4% 65535/ 1/ 0%/ +10% 65535/ 2/ 0%/ +8% 65535/ 4/ 0%/ +1% 65535/ 8/ 0%/ +3% Signed-off-by: Jason Wang Signed-off-by: David S. Miller commit 0efac27791ee068075d80f07c55a229b1335ce12 Author: Jason Wang Date: Wed Sep 12 11:17:08 2018 +0800 tap: accept an array of XDP buffs through sendmsg() This patch implement TUN_MSG_PTR msg_control type. This type allows the caller to pass an array of XDP buffs to tuntap through ptr field of the tun_msg_control. Tap will build skb through those XDP buffers. This will avoid lots of indirect calls thus improves the icache utilization and allows to do XDP batched flushing when doing XDP redirection. Signed-off-by: Jason Wang Signed-off-by: David S. Miller commit 043d222f93ab8c76b56a3b315cd8692e35affb6c Author: Jason Wang Date: Wed Sep 12 11:17:07 2018 +0800 tuntap: accept an array of XDP buffs through sendmsg() This patch implement TUN_MSG_PTR msg_control type. This type allows the caller to pass an array of XDP buffs to tuntap through ptr field of the tun_msg_control. If an XDP program is attached, tuntap can run XDP program directly. If not, tuntap will build skb and do a fast receiving since part of the work has been done by vhost_net. This will avoid lots of indirect calls thus improves the icache utilization and allows to do XDP batched flushing when doing XDP redirection. Signed-off-by: Jason Wang Signed-off-by: David S. Miller commit fe8dd45bb7556246c6b76277b1ba4296c91c2505 Author: Jason Wang Date: Wed Sep 12 11:17:06 2018 +0800 tun: switch to new type of msg_control This patch introduces to a new tun/tap specific msg_control: #define TUN_MSG_UBUF 1 #define TUN_MSG_PTR 2 struct tun_msg_ctl { int type; void *ptr; }; This allows us to pass different kinds of msg_control through sendmsg(). The first supported type is ubuf (TUN_MSG_UBUF) which will be used by the existed vhost_net zerocopy code. The second is XDP buff, which allows vhost_net to pass XDP buff to TUN. This could be used to implement accepting an array of XDP buffs from vhost_net in the following patches. Signed-off-by: Jason Wang Signed-off-by: David S. Miller commit 1a097910adda6b3328fc235575bba0e9ee408492 Author: Jason Wang Date: Wed Sep 12 11:17:05 2018 +0800 tuntap: move XDP flushing out of tun_do_xdp() This will allow adding batch flushing on top. Signed-off-by: Jason Wang Signed-off-by: David S. Miller commit 8ae1aff0b331ab154c39910f2e0ed239bf942d56 Author: Jason Wang Date: Wed Sep 12 11:17:04 2018 +0800 tuntap: split out XDP logic This patch split out XDP logic into a single function. This make it to be reused by XDP batching path in the following patch. Signed-off-by: Jason Wang Signed-off-by: David S. Miller commit ac1f1f6c5ae8352a39afea7b0786c59bcd730712 Author: Jason Wang Date: Wed Sep 12 11:17:03 2018 +0800 tuntap: tweak on the path of skb XDP case in tun_build_skb() If we're sure not to go native XDP, there's no need for several things like bh and rcu stuffs. So this patch introduces a helper to build skb and hold page refcnt. When we found we will go through skb path, build skb directly. Signed-off-by: Jason Wang Signed-off-by: David S. Miller commit f7053b6ccb65a36fdfed6ad92b808464839f0eb6 Author: Jason Wang Date: Wed Sep 12 11:17:02 2018 +0800 tuntap: simplify error handling in tun_build_skb() There's no need to duplicate page get logic in each action. So this patch tries to get page and calculate the offset before processing XDP actions (except for XDP_DROP), and undo them when meet errors (we don't care the performance on errors). This will be used for factoring out XDP logic. Signed-off-by: Jason Wang Signed-off-by: David S. Miller commit 291aeb2b1dba0d0296673d994200824a7185585e Author: Jason Wang Date: Wed Sep 12 11:17:01 2018 +0800 tuntap: enable bh early during processing XDP This patch move the bh enabling a little bit earlier, this will be used for factoring out the core XDP logic of tuntap. Acked-by: Michael S. Tsirkin Signed-off-by: Jason Wang Signed-off-by: David S. Miller commit 4f23aff8713c1f98735f7290a2cde63845b7ec88 Author: Jason Wang Date: Wed Sep 12 11:17:00 2018 +0800 tuntap: switch to use XDP_PACKET_HEADROOM Acked-by: Michael S. Tsirkin Signed-off-by: Jason Wang Signed-off-by: David S. Miller commit e4a2a3048ed93f0c354ad837f1d45fc8d389d538 Author: Jason Wang Date: Wed Sep 12 11:16:59 2018 +0800 net: sock: introduce SOCK_XDP This patch introduces a new sock flag - SOCK_XDP. This will be used for notifying the upper layer that XDP program is attached on the lower socket, and requires for extra headroom. TUN will be the first user. Signed-off-by: Jason Wang Signed-off-by: David S. Miller commit 445f2bda3501508b801b3571baee33de0ac44e1f Author: Neil Armstrong Date: Thu Sep 13 09:12:27 2018 +0200 arm64: dts: meson: Switch simple-mfd and syscon order The order between "syscon" and "simple-mfd" is important because in these particular cases, the node needs to be first a "simple-mfd" to expose it's sub-nodes, and later on a "syscon" to permit other nodes to access this register space through the "syscon" mechanism. Signed-off-by: Neil Armstrong Signed-off-by: Kevin Hilman commit 9708d2b5b7c648e8e0a40d11e8cea12f6277f33c Author: Cong Wang Date: Tue Sep 11 11:42:06 2018 -0700 llc: avoid blocking in llc_sap_close() llc_sap_close() is called by llc_sap_put() which could be called in BH context in llc_rcv(). We can't block in BH. There is no reason to block it here, kfree_rcu() should be sufficient. Signed-off-by: Cong Wang Signed-off-by: David S. Miller commit 1feb64c49d7f2a46dc7b1e4c92c85ead2775395e Author: Ville Syrjälä Date: Thu Sep 13 16:16:22 2018 +0300 drm/i915: Clear DRIVER_ATOMIC on a per-device basis Currently we're clearing DRIVER_ATOMIC in driver.driver_features for older platforms. This will not work correctly should we ever have a system with and old and new GPU in it. While that is not possible currently let's make the code more correct and use the per-device driver_features instead. Cc: Chris Wilson Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180913131622.17690-2-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson Reviewed-by: Daniel Vetter commit f6350da41dc728da5a27044bde6f770525ba97d6 Author: Arseny Maslennikov Date: Thu Sep 6 17:51:12 2018 +0300 IB/ipoib: Log sysfs 'dev_id' accesses from userspace Some tools may currently be using only the deprecated attribute; let's print an elaborate and clear deprecation notice to kmsg. To do that, we have to replace the whole sysfs file, since we inherit the original one from netdev. Signed-off-by: Arseny Maslennikov Signed-off-by: Doug Ledford commit 9b8b2a323008aedd39a8debb861b825707f01420 Author: Arseny Maslennikov Date: Thu Sep 6 17:51:11 2018 +0300 IB/ipoib: Use dev_port to expose network interface port numbers Some InfiniBand network devices have multiple ports on the same PCI function. This initializes the `dev_port' sysfs field of those network interfaces with their port number. Prior to this the kernel erroneously used the `dev_id' sysfs field of those network interfaces to convey the port number to userspace. The use of `dev_id' was considered correct until Linux 3.15, when another field, `dev_port', was defined for this particular purpose and `dev_id' was reserved for distinguishing stacked ifaces (e.g: VLANs) with the same hardware address as their parent device. Similar fixes to net/mlx4_en and many other drivers, which started exporting this information through `dev_id' before 3.15, were accepted into the kernel 4 years ago. See 76a066f2a2a0 (`net/mlx4_en: Expose port number through sysfs'). Signed-off-by: Arseny Maslennikov Signed-off-by: Doug Ledford commit 4c0b6534c9100c3ad2d69e7dd3562a165a346204 Author: Arseny Maslennikov Date: Thu Sep 6 17:51:10 2018 +0300 Documentation/ABI: document /sys/class/net/*/dev_port The sysfs field was introduced 4 years ago along with fixes to various drivers that erroneously used `dev_id' for that purpose, but it was not properly documented anywhere. See commit v3.14-rc3-739-g3f85944fe207. Signed-off-by: Arseny Maslennikov Signed-off-by: Doug Ledford commit 18ace11f87e69454379a3a1247a657b70ca142fc Author: Ville Syrjälä Date: Thu Sep 13 16:16:21 2018 +0300 drm: Introduce per-device driver_features We wish to control certain driver_features flags on a per-device basis while still sharing a single drm_driver instance across all the devices. To that end introduce device.driver_features. By default it will be set to ~0 to not impose any limits beyond driver.driver_features. Drivers can then clear specific flags in the per-device bitmask to limit the capabilities of the device. An alternative approach would be to copy the driver_features from the driver into the device in drm_dev_init(), however that would require verifying that no driver is currently changing driver.driver_features after drm_dev_init(). Hence the ~0 apporach was easier. Ideally we'd also make drm_driver const but there is plenty of code left that wants to mutate it (eg. various vfunc assignments). We'll need to fix all that up before we can make it const. And while at it fix up the type of the feature flag passed to drm_core_check_feature(). v2: Streamline the && vs. & (Chris) s/int/u32/ in drm_core_check_feature() args Cc: Chris Wilson Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180913131622.17690-1-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson Reviewed-by: Daniel Vetter Reviewed-by: Michel Dänzer commit 15033f0457dca569b284bef0c8d3ad55fb37eacb Author: Andre Naujoks Date: Mon Sep 10 10:27:15 2018 +0200 ipv6: Add sockopt IPV6_MULTICAST_ALL analogue to IP_MULTICAST_ALL The socket option will be enabled by default to ensure current behaviour is not changed. This is the same for the IPv4 version. A socket bound to in6addr_any and a specific port will receive all traffic on that port. Analogue to IP_MULTICAST_ALL, disable this behaviour, if one or more multicast groups were joined (using said socket) and only pass on multicast traffic from groups, which were explicitly joined via this socket. Without this option disabled a socket (system even) joined to multiple multicast groups is very hard to get right. Filtering by destination address has to take place in user space to avoid receiving multicast traffic from other multicast groups, which might have traffic on the same port. The extension of the IP_MULTICAST_ALL socketoption to just apply to ipv6, too, is not done to avoid changing the behaviour of current applications. Signed-off-by: Andre Naujoks Acked-By: YOSHIFUJI Hideaki Signed-off-by: David S. Miller commit d03790f55a68685dbdabebd00d466e3557433b7f Merge: aaf9253025e8 14fceff4771e Author: David S. Miller Date: Thu Sep 13 08:14:34 2018 -0700 Merge branch 'Lantiq-Intel-vrx200-support' Hauke Mehrtens says: ==================== Add support for Lantiq / Intel vrx200 network This adds basic support for the GSWIP (Gigabit Switch) found in the VRX200 SoC. There are different versions of this IP core used in different SoCs, but this driver was currently only tested on the VRX200 SoC line, for other SoCs this driver probably need some adoptions to work. I also plan to add Layer 2 offloading to the DSA driver and later also layer 3 offloading which is supported by the PPE HW block. All these patches should go through the net-next tree. This depends on the patch "MIPS: lantiq: dma: add dev pointer" which should go into 4.19. Changes since: v2: * Send patch "MIPS: lantiq: dma: add dev pointer" separately * all: removed return in register write functions * switch: uses phylink * switch: uses hardware MDIO auto polling * switch: use usleep_range() in MDIO busy check * switch: configure MDIO bus to 2.5 MHz * switch: disable xMII link when it is not used * Ethernet: use NAPI for TX cleanups * Ethernet: enable clock in open callback * Ethernet: improve skb allocation * Ethernet: use net_dev->stats v1: * Add "MIPS: lantiq: dma: add dev pointer" * checkpatch fixes a all patches * Added binding documentation * use readx_poll_timeout function and ETIMEOUT error code * integrate GPHY firmware loading into DSA driver * renamed to NET_DSA_LANTIQ_GSWIP * removed some needed casts * added of_device_id.data information about the detected switch * fixed John's email address ==================== Signed-off-by: David S. Miller commit 14fceff4771e51b23b4485b575cf9e5b3414b89b Author: Hauke Mehrtens Date: Sun Sep 9 22:20:39 2018 +0200 net: dsa: Add Lantiq / Intel DSA driver for vrx200 This adds the DSA driver for the GSWIP Switch found in the VRX200 SoC. This switch is integrated in the DSL SoC, this SoC uses a GSWIP version 2.1, there are other SoCs using different versions of this IP block, but this driver was only tested with the version found in the VRX200. Currently only the basic features are implemented which will forward all packages to the CPU and let the CPU do the forwarding. The hardware also support Layer 2 offloading which is not yet implemented in this driver. The GPHY FW loaded is now done by this driver and not any more by the separate driver in drivers/soc/lantiq/gphy.c, I will remove this driver is a separate patch. to make use of the GPHY this switch driver is needed anyway. Other SoCs have more embedded GPHYs so this driver should support a variable number of GPHYs. After the firmware was loaded the GPHY can be probed on the MDIO bus and it behaves like an external GPHY, without the firmware it can not be probed on the MDIO bus. The clock names in the sysctrl.c file have to be changed because the clocks are now used by a different driver. This should be cleaned up and a real common clock driver should provide the clocks instead. Signed-off-by: Hauke Mehrtens Signed-off-by: David S. Miller commit 86ce2bc73c7a81d54b5509ce18d290c50d03b354 Author: Hauke Mehrtens Date: Sun Sep 9 22:20:27 2018 +0200 dt-bindings: net: dsa: Add lantiq, xrx200-gswip DT bindings This adds the binding for the GSWIP (Gigabit switch) core found in the xrx200 / VR9 Lantiq / Intel SoC. This part takes care of the switch, MDIO bus, and loading the FW into the embedded GPHYs. Signed-off-by: Hauke Mehrtens Cc: devicetree@vger.kernel.org Signed-off-by: David S. Miller commit fe1a56420cf2ec28c8eceef672b87de0bbe1a260 Author: Hauke Mehrtens Date: Sun Sep 9 22:16:45 2018 +0200 net: lantiq: Add Lantiq / Intel VRX200 Ethernet driver This drives the PMAC between the GSWIP Switch and the CPU in the VRX200 SoC. This is currently only the very basic version of the Ethernet driver. When the DMA channel is activated we receive some packets which were send to the SoC while it was still in U-Boot, these packets have the wrong header. Resetting the IP cores did not work so we read out the extra packets at the beginning and discard them. This also adapts the clock code in sysctrl.c to use the default name of the device node so that the driver gets the correct clock. sysctrl.c should be replaced with a proper common clock driver later. Signed-off-by: Hauke Mehrtens Signed-off-by: David S. Miller commit 839790e88a3c61066b9d76c89888f8be2bfcf1a8 Author: Hauke Mehrtens Date: Sun Sep 9 22:16:44 2018 +0200 dt-bindings: net: Add lantiq, xrx200-net DT bindings This adds the binding for the PMAC core between the CPU and the GSWIP switch found on the xrx200 / VR9 Lantiq / Intel SoC. Signed-off-by: Hauke Mehrtens Cc: devicetree@vger.kernel.org Signed-off-by: David S. Miller commit 7969119293f5aa3b51040ae81a80e87c7b979b2d Author: Hauke Mehrtens Date: Sun Sep 9 22:16:43 2018 +0200 net: dsa: Add Lantiq / Intel GSWIP tag support This handles the tag added by the PMAC on the VRX200 SoC line. The GSWIP uses internally a GSWIP special tag which is located after the Ethernet header. The PMAC which connects the GSWIP to the CPU converts this special tag used by the GSWIP into the PMAC special tag which is added in front of the Ethernet header. This was tested with GSWIP 2.1 found in the VRX200 SoCs, other GSWIP versions use slightly different PMAC special tags. Signed-off-by: Hauke Mehrtens Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit cc973aecf0b0541918c5ecabe6c90d1f709b5f89 Author: Hauke Mehrtens Date: Sun Sep 9 22:16:42 2018 +0200 MIPS: lantiq: Do not enable IRQs in dma open When a DMA channel is opened the IRQ should not get activated automatically, this allows it to pull data out manually without the help of interrupts. This is needed for a workaround in the vrx200 Ethernet driver. Signed-off-by: Hauke Mehrtens Acked-by: Paul Burton Signed-off-by: David S. Miller commit f1c8bc332e6dacac221d0d6304f4a3e99b756e2f Author: Alexandre Belloni Date: Wed Sep 12 22:43:07 2018 +0200 rtc: remove irq_task from kerneldoc Stale mentions of irq_task are left in the kerneldoc after its removal. Remove them. There is still one indirect mention left but commit 3c8bb90efb6e ("rtc: Fix hrtimer deadlock") can probably be reverted now. Reported-by: Linus Torvalds Signed-off-by: Alexandre Belloni commit 1e479c619b2ac983fdea1a8212c7b822b5098da0 Author: Alexandre Belloni Date: Wed Sep 12 22:22:45 2018 +0200 rtc: unexport non devm managed registration Ensure the non managed version of the un/registration functions is not used anymore. No driver is using it anymore and they should not be necessary. Signed-off-by: Alexandre Belloni commit 37a1aa88f98d688a5d9119fbdd1086ae4f171d1d Author: YueHaibing Date: Thu Sep 13 01:22:01 2018 +0000 spi: davinci: remove set but not used variable 'pdata' Fixes gcc '-Wunused-but-set-variable' warning: drivers/spi/spi-davinci.c: In function 'davinci_spi_setup': drivers/spi/spi-davinci.c:422:36: warning: variable 'pdata' set but not used [-Wunused-but-set-variable] Signed-off-by: YueHaibing Signed-off-by: Mark Brown commit b97760ae8e3dc8bb91881c13425a0bff55f2bd85 Author: Dan Carpenter Date: Mon Sep 10 11:37:45 2018 +0300 pinctrl: at91-pio4: fix has_config check in atmel_pctl_dt_subnode_to_map() Smatch complains about this condition: if (has_config && num_pins >= 1) The "has_config" variable is either uninitialized or true. The "num_pins" variable is unsigned and we verified that it is non-zero on the lines before so we know "num_pines >= 1" is true. Really, we could just check "num_configs" directly and remove the "has_config" variable. Fixes: 776180848b57 ("pinctrl: introduce driver for Atmel PIO4 controller") Signed-off-by: Dan Carpenter Acked-by: Ludovic Desroches Signed-off-by: Linus Walleij commit 169cc4c7a14e988985c8833ddec2f3e897de2c28 Author: Peter Rosin Date: Mon Aug 6 08:19:10 2018 +0200 drm: bridge: document bridge attach/detach imbalance Since commit 4a878c03d562 ("drm: bridge: Detach bridge from encoder at encoder cleanup time"), it is generally no longer correct to detach bridges from encoders manually. Document that. Signed-off-by: Peter Rosin Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20180806061910.29914-3-peda@axentia.se commit b17566a6b08be18ded5472a2e4bbc066593b3662 Author: Janusz Krzysztofik Date: Wed Sep 5 23:50:08 2018 +0200 gpiolib: Implement fast processing path in get/set array Certain GPIO descriptor arrays returned by gpio_get_array() may contain information on direct mapping of array members to pins of a single GPIO chip in hardware order. In such cases, bitmaps of values can be passed directly from/to the chip's .get/set_multiple() callbacks without wasting time on iterations. Add respective code to gpiod_get/set_array_bitmap_complex() functions. Pins not applicable for fast path are processed as before, skipping over the 'fast' ones. Cc: Jonathan Corbet Signed-off-by: Janusz Krzysztofik Signed-off-by: Linus Walleij commit 77588c14ac868caece82fddbfae7de03b2cec941 Author: Janusz Krzysztofik Date: Wed Sep 5 23:50:07 2018 +0200 gpiolib: Pass array info to get/set array functions In order to make use of array info obtained from gpiod_get_array() and speed up processing of arrays matching single GPIO chip layout, that information must be passed to get/set array functions. Extend the functions' API with that additional parameter and update all users. Pass NULL if a user builds an array itself from single GPIOs. Cc: Jonathan Corbet Cc: Miguel Ojeda Sandonis Cc: Geert Uytterhoeven Cc: Sebastien Bourdelin Cc: Lukas Wunner Cc: Peter Korsgaard Cc: Peter Rosin Cc: Andrew Lunn Cc: Florian Fainelli Cc: "David S. Miller" Cc: Rojhalat Ibrahim Cc: Dominik Brodowski Cc: Russell King Cc: Kishon Vijay Abraham I Cc: Tony Lindgren Cc: Lars-Peter Clausen Cc: Michael Hennerich Cc: Jonathan Cameron Cc: Hartmut Knaack Cc: Peter Meerwald-Stadler Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: Yegor Yefremov Cc: Uwe Kleine-König Signed-off-by: Janusz Krzysztofik Acked-by: Ulf Hansson Signed-off-by: Linus Walleij commit bf9346f5d47b4506aafbc384dfb5796b0adc3f8d Author: Janusz Krzysztofik Date: Wed Sep 5 23:50:06 2018 +0200 gpiolib: Identify arrays matching GPIO hardware Certain GPIO array lookup results may map directly to GPIO pins of a single GPIO chip in hardware order. If that condition is recognized and handled efficiently, significant performance gain of get/set array functions may be possible. While processing a request for an array of GPIO descriptors, identify those which represent corresponding pins of a single GPIO chip. Skip over pins which require open source or open drain special processing. Moreover, identify pins which require inversion. Pass a pointer to that information with the array to the caller so it can benefit from enhanced performance as soon as get/set array functions can accept and make efficient use of it. Cc: Jonathan Corbet Signed-off-by: Janusz Krzysztofik Signed-off-by: Linus Walleij commit b9762bebc6332b40c33e03dea03e30fa12d9e3ed Author: Janusz Krzysztofik Date: Wed Sep 5 23:50:05 2018 +0200 gpiolib: Pass bitmaps, not integer arrays, to get/set array Most users of get/set array functions iterate consecutive bits of data, usually a single integer, while processing array of results obtained from, or building an array of values to be passed to those functions. Save time wasted on those iterations by changing the functions' API to accept bitmaps. All current users are updated as well. More benefits from the change are expected as soon as planned support for accepting/passing those bitmaps directly from/to respective GPIO chip callbacks if applicable is implemented. Cc: Jonathan Corbet Cc: Miguel Ojeda Sandonis Cc: Sebastien Bourdelin Cc: Lukas Wunner Cc: Peter Korsgaard Cc: Peter Rosin Cc: Andrew Lunn Cc: Florian Fainelli Cc: "David S. Miller" Cc: Rojhalat Ibrahim Cc: Dominik Brodowski Cc: Russell King Cc: Kishon Vijay Abraham I Cc: Tony Lindgren Cc: Lars-Peter Clausen Cc: Michael Hennerich Cc: Jonathan Cameron Cc: Hartmut Knaack Cc: Peter Meerwald-Stadler Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: Yegor Yefremov Cc: Uwe Kleine-König Signed-off-by: Janusz Krzysztofik Acked-by: Ulf Hansson Reviewed-by: Geert Uytterhoeven Tested-by: Geert Uytterhoeven Signed-off-by: Linus Walleij commit fa38869b0161484f28a7e1f34535d5825dca6488 Author: Uwe Kleine-König Date: Mon Aug 20 08:32:53 2018 +0200 gpiolib: Don't support irq sharing for userspace This concerns gpio edge detection for GPIO IRQs used from userspace for GPIO event listeners. Trying to work out the right event if it's not sure that the examined gpio actually moved is impossible. Consider two gpios "gpioA" and "gpioB" that share an interrupt. gpioA's irq should trigger on any edge, gpioB's on a falling edge. If now the common irq fires and both gpio lines are high, there are several possibilities that could have happend: a) gpioA just had a low-to-high edge b) gpioB just had a high-to-low-to-high spike c) a combination of both a) and b) While c) is unlikely (in most setups) a) and b) alone are bad enough. Currently the code assumes case a) unconditionally and doesn't report an event for gpioB. Note that even if there is no irq sharing involved a spike for a gpio might not result in an event if it's configured to trigger for a single edge only. The only way to improve this is to drop support for interrupt sharing. This way a spike results in an event for the right gpio at least. Note that apart from dropping IRQF_SHARED this effectively undoes commit df1e76f28ffe ("gpiolib: skip unwanted events, don't convert them to opposite edge"). This obviously breaks setups that rely on interrupt sharing, but given that this cannot be reliable, this is probably an acceptable trade-off. Signed-off-by: Uwe Kleine-König [Assuming there are no users of interrupt sharing yet] Signed-off-by: Linus Walleij commit eb1d23d71e3e3b8d3f1dcc018bae7c04f06d53bb Author: Marc Zyngier Date: Sun Aug 5 18:28:57 2018 +0100 drm/bridge: analogix_dp: Downgrade "Link Training" messages to dev_dbg The Analogix DP bridge driver is pretty verbose, and outputs things like [ 619.414067] rockchip-dp ff970000.edp: Link Training Clock Recovery success [ 619.429233] rockchip-dp ff970000.edp: Link Training success! each time the display gets unblanked. While it is good to know that the device is behaving correctly, users already know that because they can see some video output. Let's keep these messages for cases where we need to actually debug the driver (we have dynamic debug to enable them at runtime if need be), and let's keep the kernel quiet otherwise. Signed-off-by: Marc Zyngier Reviewed-by: Laurent Pinchart Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20180805172857.2517-1-marc.zyngier@arm.com commit 0b35cd7b18608d80cd2e78835ee57456b220f364 Author: Geert Uytterhoeven Date: Tue Sep 11 16:32:43 2018 +0200 gpio: uapi: Grammar s/array/array of/ Signed-off-by: Geert Uytterhoeven Signed-off-by: Linus Walleij commit 722f3de39e03fe123243ef24049fcdd5491f8da3 Author: Tvrtko Ursulin Date: Wed Sep 12 16:29:30 2018 +0100 i915/oa: Simplify updating contexts We can remove the update-via-batch-buffer code path, which is basically an effective duplicate of update-via-context-image path, if we notice that after we have idled the GPU, we can update the context image even of the kernel context directly. (Update-via-batch-buffer path existed only to solve the problem of how to update the kernel context image.) Only additional thing needed is to activate the edited configuration by sending one empty request down the pipe. This accomplishes context restore of the updated kernel context and so the OA configuration gets written out to it's control registers. Signed-off-by: Tvrtko Ursulin Cc: Lionel Landwerlin Cc: Matthew Auld Cc: Chris Wilson Reviewed-by: Lionel Landwerlin Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20180912152930.28237-1-tvrtko.ursulin@linux.intel.com commit 450d6079e8d3c40c7ce67ac8bb4a2da9baf56613 Author: Hoan Nguyen An Date: Fri Aug 24 13:52:28 2018 +0900 arm64: dts: r8a77965: add FDP1 device nodes The r8a77965 has a single FDP1 instance. Signed-off-by: Hoan Nguyen An Reviewed-by: Laurent Pinchart Signed-off-by: Simon Horman commit 7acc17b1a3e96d1e541c48abd89fa74d1e752f15 Author: Geert Uytterhoeven Date: Thu Sep 6 14:41:01 2018 +0200 arm64: dts: renesas: draak: Sort device nodes - Device nodes with unit addresses are sorted by unit address, - Device nodes without unit addresses and references are sorted alphabetically. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit 9bc03b57277c4272a9ef7c8c22672109d4416944 Author: Wolfram Sang Date: Tue Aug 21 21:03:56 2018 +0200 arm64: dts: renesas: enable SDR104 on R-Car Gen3 Successfully tested on H3 ES1.0 and ES2.0, M3-W ES1.0, and M3-N ES1.0. Even previously stubborn cards work fine. Transfer rates were >60MB/s. Signed-off-by: Wolfram Sang Signed-off-by: Simon Horman commit 3943e8967ad2e00fae114a334f88d5b366c6f809 Author: Takeshi Kihara Date: Wed Sep 5 05:22:27 2018 +0900 arm64: dts: renesas: r8a77990: Add SYS-DMAC device nodes This patch adds SYS-DMAC{0,1,2} device nodes for the R8A77990 SoC. Signed-off-by: Takeshi Kihara Signed-off-by: Yoshihiro Kaneko Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit bc011dfa30652380bf432fd52441077b52b4eadc Author: Takeshi Kihara Date: Wed Sep 5 17:29:44 2018 +0200 arm64: dts: renesas: r8a77990: Add I2C device nodes Add device nodes for I2C ch[0-7] to R-Car E3 R8A77990 device tree. Signed-off-by: Takeshi Kihara Signed-off-by: Jacopo Mondi Reviewed-by: Geert Uytterhoeven Tested-by: Geert Uytterhoeven Reviewed-by: Laurent Pinchart Tested-by: Laurent Pinchart Signed-off-by: Simon Horman commit ec70407ae7d790d6b34bfe582901c1149e842248 Author: Koji Matsuoka Date: Wed Sep 5 17:29:43 2018 +0200 arm64: dts: renesas: r8a77990: Add VIN and CSI-2 device nodes Add device nodes for VIN4, VIN5 and CSI40 to R-Car E3 R8A77990 device tree. Signed-off-by: Koji Matsuoka Signed-off-by: Takeshi Kihara Signed-off-by: Jacopo Mondi Reviewed-by: Laurent Pinchart Tested-by: Laurent Pinchart [simon: sorted nodes by bus address, then IP block] Signed-off-by: Simon Horman commit 4b7e3ab1916931dee402bd50a764c694df6f6a1c Author: Geert Uytterhoeven Date: Mon Sep 3 19:30:00 2018 +0200 arm64: dts: renesas: r8a77990: Add all MSIOF nodes Add the device nodes for all MSIOF SPI controllers, incl. clocks, power domains, and resets properties. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit 8db067d55335dcfb4be9cc6e5f561129b1fd5863 Author: Geert Uytterhoeven Date: Fri Aug 31 10:54:57 2018 +0200 arm64: dts: renesas: r8a7795: Move arm_cc630p node To preserve by-address-per-group sort order. Fixes: 0f6d237cafda2e06 ("arm64: dts: renesas: r8a7795: add ccree to device tree") Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit 103db9b539567073de2200a8a0a725646610865d Author: Takeshi Kihara Date: Thu Aug 30 16:56:35 2018 +0200 arm64: dts: renesas: r8a77990: Add BRG support to SCIF2 Add the device node for the external SCIF_CLK, and describe the clock inputs for the Baud Rate Generator for External Clock (BRG) for SCIF2, which can increase serial clock accuracy. The presence of the SCIF_CLK crystal and its clock frequency depend on the actual board. Signed-off-by: Takeshi Kihara [geert: Enhance patch description] Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit 83e7d2ec0d7bd57666c6f8fd210255e0ec155c38 Author: Geert Uytterhoeven Date: Thu Aug 30 16:52:20 2018 +0200 arm64: dts: renesas: r8a77990: Use CPG/MSSR and SYSC binding definitions Use the SoC-specific CPG/MSSR include file to allow future use of R8A77990_CLK_* symbols. Replace the hardcoded power domain indices by R8A77990_PD_* symbols. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit 48e1f50bd67a4ee6c168e5d869cc49096cb2d203 Author: Geert Uytterhoeven Date: Thu Aug 30 14:39:19 2018 +0200 arm64: dts: renesas: salvator-xs: Improve SATA switch settings comments The comments describing the non-default switch settings to use SATA are confusing: 'Off' refers to the switch position, not to the MD12 logic value, while the parentheses suggest otherwise. Rephrase to fix this. Fixes: bec000784d5bb571 ("arm64: dts: renesas: salvator-xs: enable SATA") Signed-off-by: Geert Uytterhoeven Acked-by: Wolfram Sang Signed-off-by: Simon Horman commit 7a590fe317488783a229e5a80e91868942e8463f Author: Geert Uytterhoeven Date: Tue Aug 28 16:13:27 2018 +0200 arm64: dts: renesas: r8a77965: Fix clock/reset for usb2_phy1 usb2_phy1 accidentally uses the same clock/reset as usb2_phy0. Fixes: b5857630a829a8d5 ("arm64: dts: renesas: r8a77965: add usb2_phy nodes") Signed-off-by: Geert Uytterhoeven Reviewed-by: Yoshihiro Shimoda Signed-off-by: Simon Horman commit 99584d93e301d820d817bba2eb77b9152e13009c Author: Geert Uytterhoeven Date: Tue Aug 28 15:57:02 2018 +0200 arm64: dts: renesas: r8a77965: Fix HS-USB compatible Should be "renesas,usbhs-r8a77965", not "renesas,usbhs-r8a7796". Fixes: a06e8af801760a98 ("arm64: dts: renesas: r8a77965: add HS-USB node") Signed-off-by: Geert Uytterhoeven Reviewed-by: Yoshihiro Shimoda Signed-off-by: Simon Horman commit ff55027185bcd86a4cf6428212225c0fa37aad0e Author: Geert Uytterhoeven Date: Tue Aug 28 16:14:44 2018 +0200 arm64: dts: renesas: r8a77965: Move timer node To preserve alphabetical sort order. Fixes: 4c529600eef0a6b7 ("arm64: dts: renesas: r8a77965: Add R-Car Gen3 thermal support") Signed-off-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund Signed-off-by: Simon Horman commit 47d7f6822864a8cf2f09d27cb1321bd36ab6d9e4 Author: Geert Uytterhoeven Date: Tue Aug 28 16:15:40 2018 +0200 arm64: dts: renesas: v3hsk: Move lvds0 node To preserve alphabetical sort order. Fixes: 4edac426aff11a37 ("arm64: dts: renesas: condor/v3hsk: add DU/LVDS/HDMI support") Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit fced3a97f80955e5950b76d164a4124cb1303853 Author: Geert Uytterhoeven Date: Tue Aug 28 16:10:59 2018 +0200 arm64: dts: renesas: Fix whitespace around assignments Signed-off-by: Geert Uytterhoeven [simon: updated for a few new cases] Signed-off-by: Simon Horman commit c41fc11850782c2e4115af683793bbb111c2d0ff Author: Eugeniu Rosca Date: Sun Aug 12 15:31:49 2018 +0200 arm64: dts: renesas: r8a77965: m3nulcb-kf: Initial device tree This is based on the existing KF device tree sources: $ ls -1 arch/arm64/boot/dts/renesas/*-kf.dts arch/arm64/boot/dts/renesas/r8a7795-es1-h3ulcb-kf.dts arch/arm64/boot/dts/renesas/r8a7795-h3ulcb-kf.dts arch/arm64/boot/dts/renesas/r8a7796-m3ulcb-kf.dts Signed-off-by: Eugeniu Rosca Signed-off-by: Simon Horman commit c6eb20473f0b296c671dc6f7a7766ea6bedf2d59 Author: Sergei Shtylyov Date: Mon Aug 27 21:54:35 2018 +0300 arm64: dts: renesas: condor: add PCIe support Enable PCIe PHY and PCIEC and specify the PCIe bus clock for the Condor board. Based on the original (and large) patch by Vladimir Barinov. Signed-off-by: Vladimir Barinov Signed-off-by: Sergei Shtylyov Signed-off-by: Simon Horman commit ffa967e24c5817b48a3d5ecea2c12b9cdd807f0c Author: Sergei Shtylyov Date: Mon Aug 27 21:53:40 2018 +0300 arm64: dts: renesas: r8a77980: add PCIe support Describe the PCIe PHY, PCIEC, and PCIe bus clock in the R8A77980 device tree. Based on the original (and large) patch by Vladimir Barinov. Signed-off-by: Vladimir Barinov Signed-off-by: Sergei Shtylyov Signed-off-by: Simon Horman commit 453240f6657a6f87dd59e39c1f0d2655d40f112c Author: Biju Das Date: Fri Aug 24 11:43:49 2018 +0100 arm64: dts: renesas: r8a774a1: Add USB3.0 device nodes Add usb3.0 phy, host and function device nodes on RZ/G2M SoC dtsi. Signed-off-by: Biju Das Reviewed-by: Fabrizio Castro Reviewed-by: Simon Horman Signed-off-by: Simon Horman commit ed898d4fc19d279e508440c6156fe31755865af1 Author: Biju Das Date: Fri Aug 24 11:43:48 2018 +0100 arm64: dts: renesas: r8a774a1: Add USB-DMAC and HSUSB device nodes Add usb dmac and hsusb device nodes on RZ/G2M SoC dtsi. Signed-off-by: Biju Das Reviewed-by: Fabrizio Castro Signed-off-by: Simon Horman commit 4c2c2fb9987601b5dd7de3ccd70dc2270434b351 Author: Biju Das Date: Fri Aug 24 11:43:47 2018 +0100 arm64: dts: renesas: r8a774a1: Add USB2.0 phy and host(EHCI/OHCI) device nodes Add USB2.0 phy and host (EHCI/OHCI) device nodes on RZ/G2M SoC dtsi. Signed-off-by: Biju Das Reviewed-by: Fabrizio Castro Signed-off-by: Simon Horman commit 282419526ad7ba3d0ff5e53c20a5f4f5a273197f Author: Fabrizio Castro Date: Fri Aug 24 11:21:14 2018 +0100 arm64: dts: renesas: r8a774a1: Add FCPF and FCPV instances Add FCPF and FCPV instances to the r8a774a1 dtsi, similarly to what was done for the r8a7796 with commit 41dbbf0c5b4e ("arm64: dts: r8a7796: Add FCPF and FCPV instances"), commit 69490bc9665d ("arm64: dts: renesas: r8a7796: Point FDP1 via FCPF to IPMMU-VI0"), and commit cef942d0bd89 ("arm64: dts: renesas: r8a7796: Point VSPI via FCPVI to IPMMU-VC0"). Signed-off-by: Fabrizio Castro Reviewed-by: Biju Das Signed-off-by: Simon Horman commit e2f04248fcd47bdc037b4bfe7864ebd0a807e30c Author: Biju Das Date: Thu Aug 23 14:43:07 2018 +0100 arm64: dts: renesas: r8a774a1: Add audio support Add sound support for the RZ/G2M SoC (a.k.a. R8A774A1). This work is based on similar work done on the R8A7796 SoC by Kuninori Morimoto . Signed-off-by: Biju Das Reviewed-by: Fabrizio Castro Signed-off-by: Simon Horman commit 9567a8566850936688c08a6392a3324631f9daeb Author: Fabrizio Castro Date: Thu Aug 23 14:43:06 2018 +0100 arm64: dts: renesas: r8a774a1: Add PWM device nodes This patch adds PWM[0123456] device nodes to the RZ/G2M (a.k.a R8A774A1) device tree. Signed-off-by: Fabrizio Castro Reviewed-by: Biju Das Signed-off-by: Simon Horman commit 09f49bcf6f5a62467f4fcda59d6bc38f24d97c36 Author: Biju Das Date: Thu Aug 23 14:43:05 2018 +0100 arm64: dts: renesas: r8a774a1: Add Cortex-A53 CPU cores This patch adds definitions for L2 cache for the Cortex-A53 CPU cores (512 KiB in size, organized as 32 KiB x 16 ways), adds Cortex-A53 CPU cores (setting a total of 6 cores, 2 x Cortex-A57 + 4 x Cortex-A53), and finally enables the performance monitor unit for the Cortex-A53 cores on the R8A774A1 SoC. Based on work done for r8a7796 SoC. Signed-off-by: Biju Das Reviewed-by: Fabrizio Castro Signed-off-by: Simon Horman commit c512110d64a00cc0714061d54261b0f03c7202be Author: Biju Das Date: Thu Aug 23 14:43:04 2018 +0100 arm64: dts: renesas: r8a774a1: Add all MSIOF nodes Add the device nodes for all MSIOF SPI controllers on RZ/G2M SoC. Based on several similar patches of the R8A7796 device tree by Geert Uytterhoeven and Simon Horman . Signed-off-by: Biju Das Reviewed-by: Fabrizio Castro Signed-off-by: Simon Horman commit 8f507babc617050e7502849d008ddab548efa9c1 Author: Fabrizio Castro Date: Thu Aug 23 14:43:03 2018 +0100 arm64: dts: renesas: r8a774a1: Add IPMMU device nodes Add r8a774a1 IPMMU nodes. Signed-off-by: Fabrizio Castro Reviewed-by: Biju Das Signed-off-by: Simon Horman commit a4165904fd346e13d84bb67b0072e24ecd7f1937 Author: Biju Das Date: Thu Aug 23 14:43:02 2018 +0100 arm64: dts: renesas: r8a774a1: Add RZ/G2M thermal support Add thermal support for R8A774A1 (RZ/G2M) SoC. Based on the work done for r8a7796 SoC. Signed-off-by: Biju Das Reviewed-by: Fabrizio Castro Signed-off-by: Simon Horman commit c674e8a78c6cda14ab83c8d4342e96893c465cb3 Author: Biju Das Date: Thu Aug 23 14:43:01 2018 +0100 arm64: dts: renesas: r8a774a1: Add I2C and IIC-DVFS support Add the I2C[0-6] and IIC Bus Interface for DVFS (IIC for DVFS) devices nodes to the r8a774a1 device tree. Signed-off-by: Biju Das Reviewed-by: Fabrizio Castro Reviewed-by: Simon Horman Signed-off-by: Simon Horman commit 663386c3e1aa2771e237acd4b412b17ece19af01 Author: Fabrizio Castro Date: Thu Aug 23 14:43:00 2018 +0100 arm64: dts: renesas: r8a774a1: Add SDHI nodes Add SDHI nodes to the DT of the r8a774a1 SoC. Signed-off-by: Fabrizio Castro Reviewed-by: Biju Das Signed-off-by: Simon Horman commit 53ae5809d306bca13b2d444871374515e08c7dff Author: Fabrizio Castro Date: Thu Aug 23 15:18:18 2018 +0100 arm64: dts: renesas: r8a774a1: Add GPIO device nodes Add GPIO device nodes to the DT of the r8a774a1 SoC. Signed-off-by: Fabrizio Castro Reviewed-by: Biju Das Signed-off-by: Simon Horman commit 3698dbd02c93545f08dd309d159ef20956e07355 Author: Fabrizio Castro Date: Thu Aug 23 15:13:16 2018 +0100 arm64: dts: renesas: r8a774a1: Add pinctrl device node This patch adds pinctrl device node for R8A774A1 SoC. Signed-off-by: Fabrizio Castro Reviewed-by: Biju Das Signed-off-by: Simon Horman commit 426f0b95af0dfe4f33db6c5ef0a64b1ddcd27053 Author: Biju Das Date: Thu Aug 23 09:58:51 2018 +0100 arm64: dts: renesas: r8a774a1: Add RWDT node Add a device node for the Watchdog Timer (RWDT) controller on the Renesas RZ/G2M (r8a774a1) SoC. Signed-off-by: Biju Das Reviewed-by: Fabrizio Castro Signed-off-by: Simon Horman commit 71bddde2a2dfcba2c2caad35d6933345960907e5 Author: Fabrizio Castro Date: Thu Aug 23 09:58:50 2018 +0100 arm64: dts: renesas: r8a774a1: Add Ethernet AVB node This patch adds the SoC specific part of the Ethernet AVB device tree node. Signed-off-by: Fabrizio Castro Reviewed-by: Biju Das Signed-off-by: Simon Horman commit a21c572ce8bc7466816ea8601d7eb0b4ca12d40c Author: Biju Das Date: Thu Aug 23 09:58:49 2018 +0100 arm64: dts: renesas: r8a774a1: Add INTC-EX device node Add support for the Interrupt Controller for External Devices (INTC-EX) on RZ/G2M. Signed-off-by: Biju Das Reviewed-by: Fabrizio Castro Signed-off-by: Simon Horman commit 3a3933a4fa36430a46fa7a6f9bfa7eaa19dd9dfe Author: Fabrizio Castro Date: Thu Aug 23 09:58:48 2018 +0100 arm64: dts: renesas: r8a774a1: Add SCIF and HSCIF nodes Add the device nodes for all RZ/G2M SCIF and HSCIF serial ports, incl. clocks, power domains and DMAs. According to the HW user manual, SCIF[015] and HSCIF[012] are connected to both SYS-DMAC1 and SYS-DMAC2, while SCIF[34] and HSCIF[34] are connected to SYS-DMAC0. Signed-off-by: Fabrizio Castro Reviewed-by: Biju Das Signed-off-by: Simon Horman commit 37a61e4d9f9486bfccd699bb1d52ebbea0019ac4 Author: Biju Das Date: Thu Aug 23 09:58:47 2018 +0100 arm64: dts: renesas: r8a774a1: Add SYS-DMAC controller nodes Add sys-dmac[0-2] device nodes for RZ/G2M (r8a774a1) SoC. Signed-off-by: Biju Das Reviewed-by: Fabrizio Castro Signed-off-by: Simon Horman commit 70fd8b6a4846362991ead7b68f951d519a9c71df Author: Sergei Shtylyov Date: Thu Aug 23 19:59:20 2018 +0300 arm64: dts: renesas: condor/v3hsk: add DU/LVDS/HDMI support Define the Condor/V3HSK board dependent parts of the DU and LVDS device nodes. Also add the device nodes for Thine THC63LVD1024 LVDS decoder and Analog Devices ADV7511W HDMI transmitter... Based on the original (and large) patch by Vladimir Barinov. Signed-off-by: Vladimir Barinov Signed-off-by: Sergei Shtylyov Reviewed-by: Ulrich Hecht Reviewed-by: Laurent Pinchart Signed-off-by: Simon Horman commit 8d9923b3a2f6c0e4ad3f9d9cad6e9010cf0d67e6 Author: Sergei Shtylyov Date: Tue Aug 21 22:50:31 2018 +0300 arm64: dts: renesas: v3msk: add eMMC support Add the eMMC chip support for the V3M Started Kit board. 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 979e32b5265d6b42a568e950c5b5e2f6ab283ff3 Author: Sergei Shtylyov Date: Tue Aug 21 22:49:26 2018 +0300 arm64: dts: renesas: r8a77970: add MMC support Define the generic R8A77970 part of the MMC0 (SDHI2) device node. 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 62531104428b39e2794a015af17154415fc33c4f Author: Dien Pham Date: Tue Aug 14 23:12:41 2018 +0900 arm64: dts: renesas: r8a77965: Add OPPs table for cpu devices This patch adds OPPs table for CA57{0,1} cpu devices Signed-off-by: Dien Pham Signed-off-by: Takeshi Kihara Signed-off-by: Yoshihiro Kaneko Tested-by: Simon Horman [simon: do not give nodes unit names as they have no bus addresses] Signed-off-by: Simon Horman commit 83ff28c74b525aa33f42b829538017d3e8658e69 Author: Eugeniu Rosca Date: Sun Aug 12 15:31:46 2018 +0200 arm64: dts: renesas: r8a77965: m3nulcb: Initial device tree Allow the bare M3-N-based ULCB board to boot. Signed-off-by: Eugeniu Rosca Reviewed-by: Jacopo Mondi Signed-off-by: Simon Horman commit 92bc66bfce99cd7d5b66cb1086812a32300c5705 Author: Eugeniu Rosca Date: Sun Aug 12 15:31:47 2018 +0200 arm64: dts: renesas: r8a77965: Add CAN{0,1} placeholder nodes According to R-Car Gen3 HW manual rev1.00, R-Car M3-N has two CAN interfaces, similar to H3, M3-W and other SoCs from the same family. Add CAN placeholder nodes to avoid below DTC errors: Error: arch/arm64/boot/dts/renesas/ulcb-kf.dtsi:19.1-6 Label or path can0 not found Error: arch/arm64/boot/dts/renesas/ulcb-kf.dtsi:25.1-6 Label or path can1 not found These errors occur *after* the addition of r8a77965-m3nulcb-kf.dts. Fix them beforehand. CAN support is inspired from below commits: - v4.7 commit 308b7e4ba62e ("arm64: dts: r8a7795: Add CAN support") - v4.11 commit 909c16252415 ("arm64: dts: r8a7796: Add CAN support") - v4.12 commit bec0948e810f ("arm64: dts: r8a7796: Add reset control properties") Signed-off-by: Eugeniu Rosca Reviewed-by: Kieran Bingham [simon: make placeholder minimal by only including reg property] Signed-off-by: Simon Horman commit 4d76ad7d9de05506f1ee9a7b22416440468be090 Author: Magnus Damm Date: Mon Aug 20 23:17:56 2018 +0900 arm64: dts: renesas: r8a77965: Attach the SYS-DMAC to the IPMMU For R-Car M3-N hook up SYS-DMAC0, SYS-DMAC1 and SYS-DMAC2 to IPMMU-DS0 and IPMMU-DS1 in same way as for R-Car M3-W. This follows the R-Car Gen3 Rev.1.00 (April 2018) datasheet. Signed-off-by: Magnus Damm Signed-off-by: Simon Horman commit 90493b09df41a9c1dd0bf315e81d03b4212384f9 Author: Biju Das Date: Mon Aug 13 13:41:48 2018 +0100 arm64: dts: renesas: Initial r8a774a1 SoC device tree Basic support for the RZ/G2M SoC. Signed-off-by: Biju Das Reviewed-by: Fabrizio Castro Signed-off-by: Simon Horman commit e3da41a6c28f9b61ea03df987f1c9ffffc8b8e60 Author: Kieran Bingham Date: Tue Aug 7 16:59:33 2018 +0100 arm64: dts: renesas: salvator-common: adv748x: Override secondary addresses Ensure that the ADV748x device addresses do not conflict, and group them together (visually in i2cdetect) Signed-off-by: Kieran Bingham Signed-off-by: Simon Horman commit 3182aa4e0bf4d0ee0b29fea4b5ca21290d6d6251 Author: Sergei Shtylyov Date: Mon Aug 6 22:55:00 2018 +0300 arm64: dts: renesas: r8a77980: add CSI2/VIN support Describe the CSI2 and VIN (and their interconnections) in the R8A77980 device tree. Signed-off-by: Sergei Shtylyov Signed-off-by: Simon Horman commit 3a0832d093693ede13f5bbc6a641775aa1f9dfbf Author: Wolfram Sang Date: Mon Jul 30 09:34:56 2018 +0200 arm64: dts: renesas: salvator-xs: enable SATA Add the nodes to enable SATA. Note that MD12 (SW12-7) must be switched off for that to work. Signed-off-by: Wolfram Sang Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit 346f02270a6107696704199e36423e8ec683e86a Author: Takeshi Kihara Date: Mon Jul 30 09:33:38 2018 +0200 arm64: dts: renesas: r8a77965: Add SATA controller node This patch adds SATA controller node for the R8A77965 SoC. Signed-off-by: Takeshi Kihara [wsa: rebased to upstream base] Reviewed-by: Geert Uytterhoeven Signed-off-by: Wolfram Sang Signed-off-by: Simon Horman commit 7064f376d4a10686f51c879401a569bb4babf9c6 Author: Takashi Iwai Date: Tue Aug 28 16:39:10 2018 +0200 ALSA: intel8x0m: Register irq handler after register initializations The interrupt handler has to be acquired after the other resource initialization when allocated with IRQF_SHARED. Otherwise it's triggered before the resource gets ready, and may lead to unpleasant behavior. Signed-off-by: Takashi Iwai commit aaf9253025e80cf8f62d7b33670e84e838eec5a3 Merge: a20625e49dde 7428b2e5d0b1 Author: David S. Miller Date: Wed Sep 12 22:22:42 2018 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net commit 2250e0f57a84e09f8f208ea410f46d39fb3ca767 Author: Neil Armstrong Date: Mon Sep 10 20:33:15 2018 +0200 arm64: dts: meson-axg-s400: Add chosen and memory nodes Add missing chosen and memory nodes. Signed-off-by: Neil Armstrong Acked-by: Martin Blumenstingl Signed-off-by: Kevin Hilman commit eaf8f57c0bf5451132932616ab62f9481adefb55 Author: Neil Armstrong Date: Mon Sep 10 20:39:10 2018 +0200 arm64: dts: meson-axg: use the proper compatible for ethmac Use the correct compatible for the AXG ethernet mac node. Signed-off-by: Neil Armstrong Acked-by: Martin Blumenstingl Signed-off-by: Kevin Hilman commit d85163c7ee2d230c6ac287a602cf9620b8fa71bb Author: Jerome Brunet Date: Fri Aug 31 17:02:18 2018 +0200 arm64: dts: meson-axg: s400: add pdm to the sound card Enable the PDM input device on the S400 and it to the sound card Signed-off-by: Jerome Brunet Signed-off-by: Kevin Hilman commit 63d1e75742fecf40a54963fcb8b089e78395cae4 Author: Jerome Brunet Date: Fri Aug 31 17:02:17 2018 +0200 arm64: dts: meson-axg: s400: add dmic codec There are 7 digital mics on the MIC daughter board attached to the s400 board, so add the digital microphone codec to its DTS Signed-off-by: Jerome Brunet Signed-off-by: Kevin Hilman commit c362e4e0052a98b8eec58e2e5b0cdaea58103456 Author: Jerome Brunet Date: Fri Aug 31 17:02:16 2018 +0200 arm64: dts: meson-axg: add pdm Add the PDM device of the axg audio subsystem Signed-off-by: Jerome Brunet Signed-off-by: Kevin Hilman commit f1726043426c73592868e2f447b4e260a4a68d91 Author: Maxime Jourdan Date: Thu Aug 23 13:49:54 2018 +0200 arm64: dts: meson-gx: add dmcbus and canvas nodes. DMC is a small memory region with various registers, including the ones needed for the canvas module. Reviewed-by: Jerome Brunet Signed-off-by: Maxime Jourdan Signed-off-by: Kevin Hilman commit b7eb0e26cc4a212fde09144cd49d4103170d2b9e Author: Jerome Brunet Date: Thu Aug 30 12:53:17 2018 +0200 arm64: dts: meson: libretech: update board model There is actually several different libretech board with the CC suffix so the model name is not appropriate here. Update to something more specific Reported-by: Da Xue Signed-off-by: Jerome Brunet Signed-off-by: Kevin Hilman commit 4cbef415c90a41398b7a6f0a8829b59aab92c784 Author: Christian Hewitt Date: Tue Sep 4 22:30:43 2018 +0400 arm64: dts: meson-gx: increase default shared CMA pool size Devices using the new V4L2 mem2mem vdec require a larger CMA pool. As nearly all GX* devices are video/media focused and will use it, set a larger (256MB) default value. Signed-off-by: Christian Hewitt Signed-off-by: Kevin Hilman commit d4983983d98710e4927fdb8de8e987c303b3fba3 Author: Maxime Jourdan Date: Thu Aug 23 13:49:53 2018 +0200 soc: amlogic: add meson-canvas driver Amlogic SoCs have a repository of 256 canvas which they use to describe pixel buffers. They contain metadata like width, height, block mode, endianness [..] Many IPs within those SoCs like vdec/vpu rely on those canvas to read/write pixels. Reviewed-by: Jerome Brunet Tested-by: Neil Armstrong Signed-off-by: Maxime Jourdan Signed-off-by: Kevin Hilman commit 5516803d48ed946320aba48fdf45bad383252891 Author: Maxime Jourdan Date: Thu Aug 23 13:49:52 2018 +0200 dt-bindings: soc: amlogic: add meson-canvas documentation DT bindings doc for amlogic,meson-canvas Reviewed-by: Jerome Brunet Signed-off-by: Maxime Jourdan Reviewed-by: Rob Herring Signed-off-by: Kevin Hilman commit 0b59c25f91002c1dec0d0d848e5aaefa5f213c85 Author: Igor Stoppa Date: Fri Aug 31 22:44:22 2018 +0300 mm: percpu: remove unnecessary unlikely() WARN_ON() already contains an unlikely(), so it's not necessary to wrap it into another. Signed-off-by: Igor Stoppa Cc: Tejun Heo Cc: zijun_hu Cc: Christoph Lameter Cc: linux-mm@kvack.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Dennis Zhou commit 8c0cf40f06af01eb3e14b19ec29f384b5030a85e Author: Jerome Brunet Date: Wed Aug 29 17:45:51 2018 +0200 arm64: dts: meson-axg: sort nodes consistently Sort DT nodes by address when possible, by node node name otherwise. Signed-off-by: Jerome Brunet Signed-off-by: Kevin Hilman commit 0789724f86a59fa7078d67dfeb1ee4a15ae3c693 Author: Neil Armstrong Date: Thu Jul 26 15:59:16 2018 +0200 firmware: meson_sm: Add serial number sysfs entry The Amlogic Meson SoC Secure Monitor implements a call to retrieve an unique SoC ID starting from the GX Family and all new families. The serial number is simply exposed as a sysfs entry under the firmware sysfs directory. Signed-off-by: Neil Armstrong Signed-off-by: Kevin Hilman commit a20625e49ddefc250c221478fb0dc62ea27722a6 Author: Tobin C. Harding Date: Wed Sep 12 18:14:44 2018 +1000 docs: net: Remove TCP congestion document Document is stale, let's remove it. Remove TCP congestion document. Signed-off-by: Tobin C. Harding Signed-off-by: David S. Miller commit 52d0d404d39dd9eac71a181615d6ca15e23d8e38 Author: Hangbin Liu Date: Wed Sep 12 10:04:21 2018 +0800 geneve: add ttl inherit support Similar with commit 72f6d71e491e6 ("vxlan: add ttl inherit support"), currently ttl == 0 means "use whatever default value" on geneve instead of inherit inner ttl. To respect compatibility with old behavior, let's add a new IFLA_GENEVE_TTL_INHERIT for geneve ttl inherit support. Reported-by: Jianlin Shi Suggested-by: Jiri Benc Signed-off-by: Hangbin Liu Reviewed-by: Jiri Benc Signed-off-by: David S. Miller commit d700ec4118f9d5e88db8f678e7342f28c93037b9 Author: Marek Vasut Date: Wed Sep 12 00:15:24 2018 +0200 net: dsa: mv88e6xxx: Make sure to configure ports with external PHYs The MV88E6xxx can have external PHYs attached to certain ports and those PHYs could even be on different MDIO bus than the one within the switch. This patch makes sure that ports with such PHYs are configured correctly according to the information provided by the PHY. Signed-off-by: Marek Vasut Cc: Andrew Lunn Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit f8a1988f655192ae8ea6e1d940706a8340924bbc Author: zhong jiang Date: Tue Sep 11 21:08:15 2018 +0800 net: ethernet: Use DIV_ROUND_UP instead of reimplementing its function DIV_ROUND_UP has implemented the code-opened function. Therefore, just replace the implementation with DIV_ROUND_UP. Signed-off-by: zhong jiang Acked-by: Tariq Toukan Signed-off-by: David S. Miller commit db3df242bc4407ce92fdd0ec429e15bcfb961b00 Author: Yue Haibing Date: Tue Sep 11 11:51:29 2018 +0000 qlcnic: Remove set but not used variables 'fw_mbx' and 'hdr_size' Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c: In function 'qlcnic_sriov_pull_bc_msg': drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c:907:6: warning: variable 'fw_mbx' set but not used [-Wunused-but-set-variable] drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c: In function 'qlcnic_sriov_issue_bc_post': drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c:939:16: warning: variable 'hdr_size' set but not used [-Wunused-but-set-variable] Signed-off-by: Yue Haibing Signed-off-by: David S. Miller commit 435f2e7cc0b783615d7fbcf08f5f00d289f9caeb Author: Nikolay Aleksandrov Date: Tue Sep 11 09:39:53 2018 +0300 net: bridge: add support for sticky fdb entries Add support for entries which are "sticky", i.e. will not change their port if they show up from a different one. A new ndm flag is introduced for that purpose - NTF_STICKY. We allow to set it only to non-local entries. Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit 15665342d48ba7fc7c2284663332381bc3083d33 Merge: eca09be82eb8 22b7d29926b5 Author: David S. Miller Date: Wed Sep 12 20:24:22 2018 -0700 Merge branch 'Preparing-for-phylib-linkmodes' Andrew Lunn says: ==================== Preparing for phylib linkmodes phylib currently makes us of a u32 bitmap for advertising, supported, and link partner capabilities. For a long time, this has been sufficient, for devices up to 1Gbps. With more MAC/PHY combinations now supporting speeds greater than 1Gbps, we have run out of bits. There is the need to replace this u32 with an __ETHTOOL_DECLARE_LINK_MODE_MASK, which makes use of linux's generic bitmaps. This patchset does some of the work preparing for this change. A few cleanups are applied to PHY drivers. Some MAC drivers directly access members of phydev which are going to change type. These patches adds some helpers and swaps MAC drivers to use them, mostly dealing with Pause configuration. v3: Reviewed-by: Florian Fainelli Add missing at in commit message Change Subject of patch 5 Fix return in from phy_set_asym_pause Fix kerneldoc in phy_set_pause v2: Fixup bad indentation in tg3.c Rename phy_support_pause() to phy_support_sym_pause() Also trigger autoneg if the advertising settings have changed. Rename phy_set_pause() to phy_set_sym_pause() Use the bcm63xx_enet.c logic, not fec_main.c for validating pause ==================== Signed-off-by: David S. Miller commit 22b7d29926b577ff4f480611380d03268545b787 Author: Andrew Lunn Date: Wed Sep 12 01:53:19 2018 +0200 net: ethernet: Add helper to determine if pause configuration is supported Rather than have MAC drivers open code the test, add a helper in phylib. This will help when we change the type of phydev->supported. Signed-off-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 0c122405d4c3ec638ba00865c872ec5a3ed1a6c0 Author: Andrew Lunn Date: Wed Sep 12 01:53:18 2018 +0200 net: ethernet: Add helper for set_pauseparam for Pause ethtool can be used to enable/disable pause. Add a helper to configure the PHY when Pause is supported. Signed-off-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 70814e819c1139e5e7faacb3700eab5eac559272 Author: Andrew Lunn Date: Wed Sep 12 01:53:17 2018 +0200 net: ethernet: Add helper for set_pauseparam for Asym Pause ethtool can be used to enable/disable pause. Add a helper to configure the PHY when asym pause is supported. Signed-off-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit c306ad36184fb7d0bd53f45441f45c1810e88a53 Author: Andrew Lunn Date: Wed Sep 12 01:53:16 2018 +0200 net: ethernet: Add helper for MACs which support pause Rather than have the MAC drivers manipulate phydev members, add a helper function for MACs supporting Pause, but not Asym Pause. Signed-off-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit af8d9bb2f2f405ad541794b46f9d7bc70f13e5cb Author: Andrew Lunn Date: Wed Sep 12 01:53:15 2018 +0200 net: ethernet: Add helper for MACs which support asym pause Rather than have the MAC drivers manipulate phydev members to indicate they support Asym Pause, add a helper function. Signed-off-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 41124fa64d4b298b82266b7ddbefc43540b77b44 Author: Andrew Lunn Date: Wed Sep 12 01:53:14 2018 +0200 net: ethernet: Add helper to remove a supported link mode Some MAC hardware cannot support a subset of link modes. e.g. often 1Gbps Full duplex is supported, but Half duplex is not. Add a helper to remove such a link mode. Signed-off-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 04b7d41d8046ded18fa32d9c7cb524ba28947188 Author: Andrew Lunn Date: Wed Sep 12 01:53:13 2018 +0200 net: ethernet: Fix up drivers masking pause support PHY drivers don't indicate they support pause. They expect MAC drivers to enable its support if the MAC has the needed hardware. Thus MAC drivers should not mask Pause support, but enable it. Change a few ANDs to ORs. Signed-off-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 00eb2243b933a496958f4ce1bcf59840fea8be16 Author: Andrew Lunn Date: Wed Sep 12 01:53:12 2018 +0200 net: bcmgenet: Fix speed selection for reverse MII The phy supported speed is being used to determine if the MAC should be configured to 100 or 1G. The masking logic is broken. Instead, look at 1G supported speeds to enable 1G MAC support. Signed-off-by: Andrew Lunn Acked-by: Florian Fainelli Signed-off-by: David S. Miller commit 58056c1e1b0e4951f3486bd552d8278194f8b84b Author: Andrew Lunn Date: Wed Sep 12 01:53:11 2018 +0200 net: ethernet: Use phy_set_max_speed() to limit advertised speed Many Ethernet MAC drivers want to limit the PHY to only advertise a maximum speed of 100Mbs or 1Gbps. Rather than using a mask, make use of the helper function phy_set_max_speed(). Signed-off-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 15d8daf7bc2d1415f14f3cc3378226fc7d836156 Author: Andrew Lunn Date: Wed Sep 12 01:53:10 2018 +0200 net: phy: bcm63xx: Allow to be built with COMPILE_TEST There is nothing in this driver which prevents it to be compiled for other architectures. Add COMPILE_TEST so we get better compile test coverage. Signed-off-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 26eb00a4fcad21ed006155fde71b8c97385d7082 Author: Andrew Lunn Date: Wed Sep 12 01:53:09 2018 +0200 net: phy: et1011c: Remove incorrect missing 1000 Half The driver indicates it can do 10/100 full and half duplex, plus 1G Full. The datasheet indicates 1G half is also supported. So make use of the standard PHY_GBIT_FEATURES. It could be, this was added because there is a MAC which does not support 1G half. Bit this is the wrong place to enforce this. Signed-off-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 4ef972fd3ec69101eef08ab5f3895c977c0f6d7d Author: Andrew Lunn Date: Wed Sep 12 01:53:08 2018 +0200 net: phy: ste10Xp: Remove wrong SUPPORTED_Pause The PHY driver should not indicate that Pause is supported. It is upto the MAC drive enable it, if it supports Pause frames. So remove it from the ste10Xp driver. Signed-off-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 0e9d2c19bff1d351005afb2f990a913e395ba6d4 Author: Parav Pandit Date: Wed Sep 5 12:54:26 2018 +0300 RDMA/core: Consider net ns of gid attribute for RoCE When resolving destination address or route, when net namespace is unavailable, refer to the net namespace of the netdevice of the SGID attribute. This is typically the case for requests arriving from the network for RoCE ports. Signed-off-by: Parav Pandit Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit d6b1764a8c5ac0ad3a66c6d11d24c4fe067fe933 Author: Parav Pandit Date: Wed Sep 5 12:54:25 2018 +0300 RDMA/core: Introduce rdma_read_gid_attr_ndev_rcu() to check GID attribute Introduce an API rdma_read_gid_attr_ndev_rcu() to return GID attribute netdevice which is in UP state for accessing netdevice's fields such as net namespace and ifindex. This is useful for users who intent to access netdevice fields under rcu lock. Signed-off-by: Parav Pandit Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 6aaecd38568557266ff7a5c3765c58322586e4ce Author: Parav Pandit Date: Wed Sep 5 12:54:24 2018 +0300 RDMA/core: Simplify roce_resolve_route_from_path() Currently RoCE route resolve functionality is split between two functions. (a) roce_resolve_route_from_path() and its helper function rdma_resolve_ip_route(). Due to this multiple sockaddr src structures are created in both functions with rdma_dev_addr is an interface between the two for checks. Since there is only one user of rdma_resolve_ip_route() as RoCE, combine the functionality of both functions to roce_resolve_route_from_path() and further reduce the scope of rdma_dev_addr to core/addr.c This also allow to extend addr_resolve() in subsequent patch to consider netdev properties of GID in safer way under rcu lock. Additionally src and dst addresses were always provided, so skip the src addr NULL pointer check as they are present on the stack now. Signed-off-by: Parav Pandit Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit c31d4b2ddf07ba74388cb8799517a7010e3e0c89 Author: Parav Pandit Date: Wed Sep 5 12:54:23 2018 +0300 RDMA/core: Protect against changing dst->dev during destination resolve During resolving address process, during route lookup and while performing src address translation in case of loopback mode, hold the rcu lock so that if netdevice is moving to different net namespace, or being unregistered, it can be synchronized with net/core/dev.c, ie change_net_namespace() ->dev_close_many() ->rt6_uncached_list_flush_dev() who would change dst->dev to loopback device of the given net namespace. Therefore, hold the rcu lock and sync with synchronize_net() of change_net_namespace() to ensure that netdevice cannot get freed while dst->dev is being used. Signed-off-by: Parav Pandit Reviewed-by: Daniel Jurgens Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 307edde8efb75cd39326f0f603c9693a5b2af019 Author: Parav Pandit Date: Wed Sep 5 12:54:22 2018 +0300 RDMA/core: Refer to network type instead of device type Set and refer to rdma_dev_addr network type instead of dst->ndev to reduce dependency on accessing dst netdevice. Signed-off-by: Parav Pandit Reviewed-by: Daniel Jurgens Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 783793b5543d3b886f0704803198feeb058cccab Author: Parav Pandit Date: Wed Sep 5 12:54:21 2018 +0300 RDMA/core: Use common code flow for IPv4/6 for addr resolve Use common code flow for resolving neighbour and for finding source addresses. Signed-off-by: Parav Pandit Reviewed-by: Daniel Jurgens Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 77addc524473ee9a85d2ef5747a32173c85768d4 Author: Parav Pandit Date: Wed Sep 5 12:54:20 2018 +0300 RDMA/core: Rename rdma_copy_addr to rdma_copy_src_l2_addr Now that rdma_copy_addr() only copies the source addresses and all callers are interested in copying only source addresses, simplify it to drop the destination address argument. Given that it only copies source layer2 addresses, rename it to rdma_copy_src_l2_addr for better code readability. Signed-off-by: Parav Pandit Reviewed-by: Daniel Jurgens Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit a362ea1d9e1acf674094614518f4245d17cfc01e Author: Parav Pandit Date: Wed Sep 5 12:54:19 2018 +0300 RDMA/core: Introduce and use rdma_set_src_addr() between IPv4 and IPv6 rdma_translate_ip() is done while resolving address for the loopback addresses. The current flow is convoluted with resolve neighbor being optional. This patch simplifies the code in following ways. (a) Use common code between IPv4 and IPv6 for address translation, loopback checks and acquiring netdevice. (b) During neigh resolve in addr_resolve_neigh(), only copy destination address. (c) Always resolve the source address before the destination address, because it doesn't depend on resolving neigh being requested or not. This helps to reduce 3 calls of rdma_copy_addr and rdma_translate_ip to one and makes it easier to follow the code flow. Now that ib_nl_fetch_ha() doesn't depend on dst, drop dst argument from ib_nl_fetch_ha(). Signed-off-by: Parav Pandit Reviewed-by: Daniel Jurgens Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 89c5691cdd95ab39f43bd102ec3f0ff39716ae85 Author: Parav Pandit Date: Wed Sep 5 12:54:18 2018 +0300 RDMA/core: Let protocol specific function typecast sockaddr structure Current code typecasts destination address using extra variable but uses source address as is. Even though the compiler optimizes such code well, just let each protocol specific function typecast for src and dest both and have symmetric code. Signed-off-by: Parav Pandit Reviewed-by: Daniel Jurgens Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit f89b7dfa33537bba9ee082a17a55242fc727e9f4 Author: Parav Pandit Date: Wed Sep 5 12:54:17 2018 +0300 RDMA/core: Avoid unnecessary sa_family overwrite addr4_resolve() and addr6_resolve() are called by checking the value of sa_family. Both above functions overwrite the value after typecasting, this is not necessary. Signed-off-by: Parav Pandit Reviewed-by: Daniel Jurgens Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit caf1e3ae9fa648d6dd38468736868d6867cab273 Author: Parav Pandit Date: Wed Sep 5 12:54:16 2018 +0300 RDMA/core Introduce and use rdma_find_ndev_for_src_ip_rcu This fixes two issues: 1. When address family is other than IPv4 or v6, rdma_translate_ip() returns success which is incorrect. 2. When address familty is AF_INET6, and if the source address is not found, it returns success, which is also incorrect. Therefore, introduce and use rdma_find_ndev_for_src_ip_rcu() helper function which returns correct success or error status and is also useful for future code refactor in addr_resolve(). Signed-off-by: Parav Pandit Reviewed-by: Daniel Jurgens Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 8901a65f080ad6f4d7c3ef9f23c6f3a0e3e194aa Author: kbuild test robot Date: Wed Sep 12 08:59:07 2018 +0800 drm/amd/display: fix ptr_ret.cocci warnings drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c:771: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: e498eb713604 ("drm/amd/display: Add support for hw_state logging via debugfs") CC: Nicholas Kazlauskas Signed-off-by: kbuild test robot Signed-off-by: Alex Deucher commit a94d5569b23209306220fabb2a8d42d0f966d318 Author: David Francis Date: Tue Sep 11 13:49:49 2018 -0400 drm/amd: Add DM DMCU support DMCU (Display Microcontroller Unit) is a GPU chip involved in eDP features like Adaptive Backlight Modulation and Panel Self Refresh. DC is already fully equipped to initialize DMCU as long as the firmware is loaded. At the moment only the raven firmware is available. A single .bin file is loaded by the kernel's loading mechanism and split into two ucodes according to the header. DMCU is optional, so if the firmware is not found, no error or warning is raised. Signed-off-by: David Francis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 6b7eab2ce60d2363b0e4bfea6667439b926bcf54 Author: David Francis Date: Tue Sep 11 13:46:41 2018 -0400 drm/amd: Add PSP DMCU support DMCU (Display Microcontroller Unit) is a GPU chip involved in eDP features like Adaptive Backlight Modulation and Panel Self Refresh. PSP is already equipped to handle DMCU firmware loading, all that is needed is to translate between the new DMCU ucode ID and the equivalent psp_gfx_fw_type. Signed-off-by: David Francis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 01fcfc83fe07ae42af707c3217f533fb350d4c19 Author: David Francis Date: Tue Sep 11 13:41:01 2018 -0400 drm/amd: Add ucode DMCU support DMCU (Display Microcontroller Unit) is a GPU chip involved in eDP features like Adaptive Backlight Modulation and Panel Self Refresh. DMCU has two pieces of firmware: the ERAM and the interrupt vectors, which must be loaded seperately. To this end, the DMCU firmware has a custom header and parsing logic similar to MEC, to extract the two ucodes from a single struct firmware. Signed-off-by: David Francis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 240cd9a64226e013ac1a608ebf720a1813790196 Author: Oak Zeng Date: Wed Sep 5 23:51:23 2018 -0400 drm/amdgpu: Move fault hash table to amdgpu vm In stead of share one fault hash table per device, make it per vm. This can avoid inter-process lock issue when fault hash table is full. Change-Id: I5d1281b7c41eddc8e26113e010516557588d3708 Signed-off-by: Oak Zeng Suggested-by: Christian Konig Suggested-by: Felix Kuehling Reviewed-by: Christian Konig Signed-off-by: Alex Deucher commit 7e7bf8de432db3de912050856e641458de72a7b1 Author: Chunming Zhou Date: Tue Sep 11 17:22:40 2018 +0800 drm/amdgpu: move cs dependencies front a bit cs dependencies handling doesn't need in vm resv Signed-off-by: Chunming Zhou Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 433ca054949a6c9daac0ace1be5c33b25092bffa Author: Christian König Date: Fri Sep 7 14:27:05 2018 +0200 drm/amdgpu: try allocating VRAM as power of two Try to allocate VRAM in power of two sizes and only fallback to vram split sizes if that fails. Signed-off-by: Christian König Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 99ed748e878a99c6c7b87bbec063eefd9e47cb42 Author: Moni Shoua Date: Wed Sep 12 09:33:55 2018 +0300 IB/mlx5: Allow transition of DCI QP to reset The transition is allowed from any state and the atrribute mask must be IB_QP_STATE. Fixes: c32a4f296e1d ("IB/mlx5: Add support for DC Initiator QP") Signed-off-by: Moni Shoua Reviewed-by: Artemy Kovalyov Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit eca09be82eb80e2daf2111beae8b255a12809025 Author: Jakub Kicinski Date: Tue Sep 11 06:44:08 2018 -0700 nfp: report FW vNIC stats in interface stats Report in standard netdev stats drops and errors as well as RX multicast from the FW vNIC counters. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 4392ec1a6c582ee13f1e064be168f52de0a0b651 Merge: 749e36d0a0d7 9612f8f50380 Author: Alexandre Belloni Date: Wed Sep 12 22:14:14 2018 +0200 Merge tag 'ib-mfd-rtc-v4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd into rtc-next Immutable branch between MFD and RTC due for the v4.20 merge window Signed-off-by: Alexandre Belloni commit 6f5c2ed0a26fae6904a88622c126dfb9369548a3 Author: Chao Yu Date: Wed Sep 12 09:22:29 2018 +0800 f2fs: split IO error injection according to RW This patch adds to support injecting error for write IO, this can simulate IO error like fail_make_request or dm_flakey does. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 7c1a000d466235c875a989971cfda344e6bb1166 Author: Chao Yu Date: Wed Sep 12 09:16:07 2018 +0800 f2fs: add SPDX license identifiers Remove the verbose license text from f2fs files and replace them with SPDX tags. This does not change the license of any of the code. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 4cb037ec3f754fdcb0f1efe9cc3269206dd2adef Author: Chengguang Xu Date: Wed Sep 12 13:32:52 2018 +0800 f2fs: surround fault_injection related option parsing using CONFIG_F2FS_FAULT_INJECTION It's a little bit strange when fault_injection related options fail with -EINVAL which were already disabled from config, so surround all fault_injection related option parsing code using CONFIG_F2FS_FAULT_INJECTION. Meanwhile, slightly change warning message to keep consistency with option POSIX_ACL and FS_XATTR. Signed-off-by: Chengguang Xu Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit bf904d2762ee6fc1e4acfcb0772bbfb4a27ad8a6 Author: Andy Lutomirski Date: Mon Sep 3 15:59:44 2018 -0700 x86/pti/64: Remove the SYSCALL64 entry trampoline The SYSCALL64 trampoline has a couple of nice properties: - The usual sequence of SWAPGS followed by two GS-relative accesses to set up RSP is somewhat slow because the GS-relative accesses need to wait for SWAPGS to finish. The trampoline approach allows RIP-relative accesses to set up RSP, which avoids the stall. - The trampoline avoids any percpu access before CR3 is set up, which means that no percpu memory needs to be mapped in the user page tables. This prevents using Meltdown to read any percpu memory outside the cpu_entry_area and prevents using timing leaks to directly locate the percpu areas. The downsides of using a trampoline may outweigh the upsides, however. It adds an extra non-contiguous I$ cache line to system calls, and it forces an indirect jump to transfer control back to the normal kernel text after CR3 is set up. The latter is because x86 lacks a 64-bit direct jump instruction that could jump from the trampoline to the entry text. With retpolines enabled, the indirect jump is extremely slow. Change the code to map the percpu TSS into the user page tables to allow the non-trampoline SYSCALL64 path to work under PTI. This does not add a new direct information leak, since the TSS is readable by Meltdown from the cpu_entry_area alias regardless. It does allow a timing attack to locate the percpu area, but KASLR is more or less a lost cause against local attack on CPUs vulnerable to Meltdown regardless. As far as I'm concerned, on current hardware, KASLR is only useful to mitigate remote attacks that try to attack the kernel without first gaining RCE against a vulnerable user process. On Skylake, with CONFIG_RETPOLINE=y and KPTI on, this reduces syscall overhead from ~237ns to ~228ns. There is a possible alternative approach: Move the trampoline within 2G of the entry text and make a separate copy for each CPU. This would allow a direct jump to rejoin the normal entry path. There are pro's and con's for this approach: + It avoids a pipeline stall - It executes from an extra page and read from another extra page during the syscall. The latter is because it needs to use a relative addressing mode to find sp1 -- it's the same *cacheline*, but accessed using an alias, so it's an extra TLB entry. - Slightly more memory. This would be one page per CPU for a simple implementation and 64-ish bytes per CPU or one page per node for a more complex implementation. - More code complexity. The current approach is chosen for simplicity and because the alternative does not provide a significant benefit, which makes it worth. [ tglx: Added the alternative discussion to the changelog ] Signed-off-by: Andy Lutomirski Signed-off-by: Thomas Gleixner Reviewed-by: Borislav Petkov Cc: Borislav Petkov Cc: Dave Hansen Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Linus Torvalds Cc: Josh Poimboeuf Cc: Joerg Roedel Cc: Jiri Olsa Cc: Andi Kleen Cc: Peter Zijlstra Link: https://lkml.kernel.org/r/8c7c6e483612c3e4e10ca89495dc160b1aa66878.1536015544.git.luto@kernel.org commit 49e73246cbe6fe0df9cae2db87f31cdc3a0b2b61 Author: Zubin Mithra Date: Wed Sep 12 09:45:10 2018 -0700 perf/x86/intel/pt: Annotate 'pt_cap_group' with __ro_after_init 'pt_cap_group' is written to in pt_pmu_hw_init() and not modified after. This makes it a suitable candidate for annotating as __ro_after_init. Signed-off-by: Zubin Mithra Reviewed-by: Guenter Roeck Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: keescook@chromium.org Link: http://lkml.kernel.org/r/20180912164510.23444-1-zsm@chromium.org Signed-off-by: Ingo Molnar commit 78cf8c842c111df656c63b5d04997ea4e40ef26a Author: Gustavo A. R. Silva Date: Mon Sep 3 16:26:13 2018 -0400 media: drxj: fix spelling mistake in fall-through annotations Replace "falltrough" with a proper "fall through" annotation. This fix is part of the ongoing efforts to enabling -Wimplicit-fallthrough Signed-off-by: Gustavo A. R. Silva Signed-off-by: Mauro Carvalho Chehab commit f764e6d6803915b8a639e30636a8ea0c8096dbed Author: Rob Herring Date: Mon Aug 27 21:52:29 2018 -0400 media: 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: "Lad, Prabhakar" Cc: Benoit Parrot Cc: Philipp Zabel Cc: Hyun Kwon Cc: Michal Simek Signed-off-by: Rob Herring Reviewed-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit fce8d235e2ef733d00f3c94e8b23e274d61397be Author: Ville Syrjälä Date: Fri Sep 7 18:24:13 2018 +0300 drm/i915: Extract intel_cursor_check_surface() Extract intel_cursor_check_surface() to better match the code layout of the other plane types. Reviewed-by: José Roberto de Souza Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180907152413.15761-14-ville.syrjala@linux.intel.com commit 25721f820bebfb901ae66523332ddd9bcb568821 Author: Ville Syrjälä Date: Fri Sep 7 18:24:12 2018 +0300 drm/i915: Move chv rotation checks to plane->check() Move the chv rotation vs. reflections checks to the plane->check() hook, away from the (now) platform agnostic intel_plane_atomic_check_with_state(). Reviewed-by: José Roberto de Souza Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180907152413.15761-13-ville.syrjala@linux.intel.com commit 7326659513fae805c13f71e8b956ef52abaa289a Author: Ville Syrjälä Date: Fri Sep 7 18:24:11 2018 +0300 drm/i915: Move display w/a #1175 Move the display w/a #1175 to a better place. That place being the new skl+ specific plane->check() hook. This leaves the skl_check_plane_surface() stuff to deal with the gtt offset and src coordinate stuff as originally envisioned. Reviewed-by: Rodrigo Vivi Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180907152413.15761-12-ville.syrjala@linux.intel.com commit 0d91bf584fe55349193afa96a2f36d288f65b218 Author: Masahiro Yamada Date: Wed Sep 12 15:18:02 2018 +0900 kbuild: remove old check for CFLAGS use This check has been here for more than a decade since commit 0c53c8e6eb45 ("kbuild: check for wrong use of CFLAGS"). Enough time for migration has passed. Signed-off-by: Masahiro Yamada commit 04b72322e85dd7987085a4d29a29ebc1a5ad5dd2 Author: Arnd Bergmann Date: Mon Aug 27 15:56:25 2018 -0400 media: dvb: move compat handlers into drivers The VIDEO_STILLPICTURE is only implemented by one driver, while VIDEO_GET_EVENT has two users in tree. In both cases, it is fairly easy to handle the compat ioctls in the native handler rather than relying on translation in fs/compat_ioctls. In effect, this means that now the drivers implement both structure layouts in both native and compat mode, but I don't see anything wrong with that. Signed-off-by: Arnd Bergmann Signed-off-by: Mauro Carvalho Chehab commit 8a24280b11ea49ed13d384c7426419201600c3a9 Author: Arnd Bergmann Date: Mon Aug 27 15:56:24 2018 -0400 media: dvb: move most compat_ioctl handling into drivers Most DVB audio and video ioctl commands are completely compatible, and are implemented by just two drivers: ttpci and ivtv. In both cases, we can use the same ioctl handler for both native and compat ioctl handling, and remove the entries from the global lookup table. In case of ttpci, this directly hooks into the file_operations structure, and for ivtv, we have to set the compat_ioctl32 method in v4l2_file_operations. For all I can tell, setting it to video_ioctl2 will still do the right thing for all commands. Note that for the VIDEO_STILLPICTURE and VIDEO_GET_EVENT commands, a translation handler in fs/compat_ioctl.c is still used. This works because the command numbers are different on 32-bit systems. Signed-off-by: Arnd Bergmann Signed-off-by: Mauro Carvalho Chehab commit e6c8320648a27d2f43bf56c6215fa48d85bf47c6 Author: Arnd Bergmann Date: Mon Aug 27 15:56:23 2018 -0400 media: cec: move compat_ioctl handling to cec-api.c All the CEC ioctls are compatible, and they are only implemented in one driver, so we can simply let this driver handle them natively. Signed-off-by: Arnd Bergmann Reviewed-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit b5d3206112dd20f33eba2364313cf85d7c0eb874 Author: Arnd Bergmann Date: Mon Aug 27 15:56:22 2018 -0400 media: dvb: dmxdev: move compat_ioctl handling to dmxdev.c All dmx ioctls are compatible, and they are only implemented in one file, so we can replace the list of commands in fs/compat_ioctl.c with a single line in dmxdev. Signed-off-by: Arnd Bergmann Signed-off-by: Mauro Carvalho Chehab commit 1ccbeeb888ac33627d91f1ccf0b84ef3bcadef24 Author: Arnd Bergmann Date: Mon Aug 27 15:56:21 2018 -0400 media: dvb: fix compat ioctl translation The VIDEO_GET_EVENT and VIDEO_STILLPICTURE was added back in 2005 but it never worked because the command number is wrong. Using the right command number means we have a better chance of them actually doing the right thing, though clearly nobody has ever tried it successfully. I noticed these while auditing the remaining users of compat_time_t for y2038 bugs. This one is fine in that regard, it just never did anything. Fixes: 6e87abd0b8cb ("[DVB]: Add compat ioctl handling.") Signed-off-by: Arnd Bergmann Signed-off-by: Mauro Carvalho Chehab commit 487c7c7702ab12cfe6cd0b5a10364eefa1d2128f Author: Masahiro Yamada Date: Wed Sep 12 13:52:54 2018 +0900 kbuild: prefix Makefile.dtbinst path with $(srctree) unconditionally $(srctree) always points to the top of the source tree whether KBUILD_SRC is set or not. Signed-off-by: Masahiro Yamada commit e21c2d33101871b85fe9fbb2fc6ef365b2773b67 Author: Ville Syrjälä Date: Fri Sep 7 18:24:10 2018 +0300 drm/i915: Move skl plane fb related checks into a better place Move the skl+ specific framebuffer related checks from intel_plane_atomic_check_with_state() into a new function (skl_plane_check_fb()) which we'll simply call from the skl plane->check() hook. v2: Split out the Y/Yf+CCS vs. interlaced change (José) Reviewed-by: José Roberto de Souza Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180907152413.15761-11-ville.syrjala@linux.intel.com commit 4e0b83a567e28ab11e0c41b399615fd82c02664a Author: Ville Syrjälä Date: Fri Sep 7 18:24:09 2018 +0300 drm/i915: Extract per-platform plane->check() functions Split up intel_check_primary_plane() and intel_check_sprite_plane() into per-platform variants. This way we can get a unified behaviour between the SKL universal planes, and we stop checking for non-SKL specific scaling limits for the "sprite" planes. And we now get a natural place where to add more plarform specific checks. v2: Split the .check_plane() calling convention change out (José) Reviewed-by: José Roberto de Souza Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180907152413.15761-10-ville.syrjala@linux.intel.com commit fd6e3c6c21f42bc895749bc970151f7c078302b1 Author: Ville Syrjälä Date: Fri Sep 7 18:24:08 2018 +0300 drm/i915: Nuke plane->can_scale/min_downscale We can easily calculate the plane can_scale/min_downscale on demand. And later on we'll probably want to start calculating these dynamically based on the cdclk just as skl already does. Reviewed-by: José Roberto de Souza Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180907152413.15761-9-ville.syrjala@linux.intel.com commit 5d2a19507cb6655ac45a9dc4535cad7930fbb0d7 Author: Ville Syrjälä Date: Fri Sep 7 18:24:07 2018 +0300 drm/i915: s/int plane/int color_plane/ To reduce the confusion between a drm plane and the planes of framebuffers let's desiginate the latter as "color plane". Weak-Reviewed-by: José Roberto de Souza Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180907152413.15761-8-ville.syrjala@linux.intel.com commit f5929c5309a6a434f6f55969aa186d7a906f92bc Author: Ville Syrjälä Date: Fri Sep 7 18:24:06 2018 +0300 drm/i915: Store ggtt_view in plane_state Stash the gtt_view structure into the plane state. This will become useful when we do GTT remapping as the gtt_view will not come directly from the fb anymore. Reviewed-by: José Roberto de Souza Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180907152413.15761-7-ville.syrjala@linux.intel.com commit df79cf44191029a72a6fca908437e5be6f81b878 Author: Ville Syrjälä Date: Tue Sep 11 18:01:39 2018 +0300 drm/i915: Store the final plane stride in plane_state Let's store the final plane stride in the plane state. This avoids having to pick between the normal vs. rotated stride during hardware programming. And once we get GTT remapping the plane stride will no longer match the fb stride so we'll need a place to store it anyway. v2: Keep checking fb->pitches[0] for cursor as later on we won't populate plane_state->color_plane[0].stride for invisible planes and we have been checking the cursor fb stride even for invisible planes v3: s/betwen/between in commit msg (José) v4: Check color_plane[0].stride instead of fb->pitches[0] in the skl_check_main_surface() X-tiling kludge Reviewed-by: José Roberto de Souza Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180911150139.23922-1-ville.syrjala@linux.intel.com commit d9d94479911c11c65b00f6ffb193eec9c8b41721 Author: Kuninori Morimoto Date: Tue Aug 21 22:00:09 2018 -0400 media: i2c: max2175: convert to SPDX identifiers This patch updates license to use SPDX-License-Identifier instead of verbose license text. Signed-off-by: Kuninori Morimoto Acked-by: Ramesh Shanmugasundaram Signed-off-by: Mauro Carvalho Chehab commit c11ada0776b982bf3757b13c2775106bb06a3a9d Author: Ville Syrjälä Date: Fri Sep 7 18:24:04 2018 +0300 drm/i915: Rename the plane_state->main/aux to plane_state->color_plane[] Make the main/aux surface stuff a bit more generic by using an array of structures. This will allow us to deal with both the main and aux surfaces with common code. Reviewed-by: José Roberto de Souza Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180907152413.15761-5-ville.syrjala@linux.intel.com commit 645d91f6060cdd336b495616fe677b120c6e2ebd Author: Ville Syrjälä Date: Fri Sep 7 18:24:03 2018 +0300 drm/i915: Use pipe A primary plane .max_stride() as the global stride limit Let's assume that the primary plane for pipe A has the highest max stride of all planes, and we'll use that as the global limit when creating a new framebuffer. Reviewed-by: José Roberto de Souza Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180907152413.15761-4-ville.syrjala@linux.intel.com commit b2ad66f546c94ead96167d52eb1dfb1ddd51092c Author: Icenowy Zheng Date: Sun Sep 2 09:26:18 2018 +0200 arm64: dts: allwinner: h6: add system controller device tree node As we have already binding for the H6 system controller, add its node to the device tree. Signed-off-by: Icenowy Zheng [fixed compatible string] Signed-off-by: Jernej Skrabec Reviewed-by: Chen-Yu Tsai Signed-off-by: Chen-Yu Tsai commit ee23c78c79b6599c9791d7615f0282aa1536b019 Author: zhong jiang Date: Sat Aug 18 11:16:55 2018 -0400 media: mtk_vcodec_util: Use dma_zalloc_coherent to replace dma_alloc_coherent + memset dma_zalloc_coherent has implemented the dma_alloc_coherent() + memset(), We prefer to dma_zalloc_coherent instead of open-codeing. Signed-off-by: zhong jiang Signed-off-by: Mauro Carvalho Chehab commit ddd5713d6e56ec283de25a3f3943c3f5bf341f56 Author: Ville Syrjälä Date: Fri Sep 7 18:24:02 2018 +0300 drm/i915: Add .max_stride() plane hook Each plane may have different stride limitations. Let's add a new plane function to retutn the maximum stride for each plane. There's going to be some use for this outside the .atomic_check() stuff hence the separate hook. v2: Fix ilk+ x-tiled max stride to be 32k (José) Reviewed-by: José Roberto de Souza Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180907152413.15761-3-ville.syrjala@linux.intel.com commit eac7230fdb4672c2cb56f6a01a1744f562c01f80 Author: Lao Wei Date: Mon Jul 9 08:15:53 2018 -0400 media: fix: media: pci: meye: validate offset to avoid arbitrary access Motion eye video4linux driver for Sony Vaio PictureBook desn't validate user-controlled parameter 'vma->vm_pgoff', a malicious process might access all of kernel memory from user space by trying pass different arbitrary address. Discussion: http://www.openwall.com/lists/oss-security/2018/07/06/1 Signed-off-by: Lao Wei Signed-off-by: Mauro Carvalho Chehab commit 6d19a44ccee6aa7a4c65375d0e8284afee98f3b9 Author: Ville Syrjälä Date: Fri Sep 7 18:24:01 2018 +0300 drm/i915: s/tile_offset/aligned_offset/ etc. Rename some of the tile_offset() functions to aligned_offset() since they operate on both linear and tiled functions. And we'll include _plane_ in the name of all the variants that take a plane state. Should make it more clear which function to use where. v2: Pimp the patch subject a bit (José) Reviewed-by: José Roberto de Souza Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180907152413.15761-2-ville.syrjala@linux.intel.com commit 0af04934be0046ec056074edfb176f42a21da6f0 Author: Kieran Bingham Date: Thu Aug 9 15:29:44 2018 -0400 media: dt-bindings: media: adv748x: Document re-mappable addresses The ADV748x supports configurable slave addresses for its I2C pages. Document the page names, and provide an example for setting each of the pages explicitly. Signed-off-by: Kieran Bingham Reviewed-by: Rob Herring Reviewed-by: Laurent Pinchart Reviewed-by: Niklas Söderlund Signed-off-by: Mauro Carvalho Chehab commit 69a8c2452caae22008ee170d3ef66e97e9df391e Author: Icenowy Zheng Date: Sun Sep 2 09:26:17 2018 +0200 dt-bindings: sunxi-sram: add binding for Allwinner H6 SRAM C The Allwinner H6 SoC's DE3 needs the SRAM C section being claimed in the system controller to work, like A64 DE2. As H6 and A64 system controller are quite similar, code is reused now, and the A64 fallback compatible string is added after the H6 compatible string. Signed-off-by: Icenowy Zheng [fixed typo in compatible string] Signed-off-by: Jernej Skrabec Reviewed-by: Chen-Yu Tsai Signed-off-by: Chen-Yu Tsai commit 4f8ab30287078ed9905785806046a9bf1a529521 Author: Paul Kocialkowski Date: Sun Sep 9 21:04:39 2018 +0200 drivers: soc: Allow building the sunxi driver without ARCH_SUNXI This makes it possible to build the sunxi SRAM driver without building for the sunxi architecture. This allows selecting the driver when building the kernel in testing environments. In particular, this is necessary for testing of the Cedrus driver, that selects the sunxi SRAM driver. Signed-off-by: Paul Kocialkowski Acked-by: Maxime Ripard Signed-off-by: Chen-Yu Tsai commit 35e882a4441e73c347aab2c42559e55a1d857fa1 Author: Chris Wilson Date: Wed Sep 12 11:11:33 2018 +0100 drm/i915: Reorder execobject[] to insert non-48b objects into the low 4G If the caller supplies more than 4G of objects and than one that has to be in the low 4G, it is possible for the low 4G to be full before we attempt to find room for the last object that must be there. As we don't reorder the two types, every pass hits the same problem and we fail with ENOSPC. However, if we impose a little bit of ordering between the two classes of objects, on the second pass we will be able to fit the special object as we do it first. For setups that only use !48b objects, we now reverse the order between passes, hopefully making the subsequent passes more likely to succeed given that we are trying a different order (rather than repeating the previous pass!) v2: Quick one line explanation for the relative priorities given to reservations. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20180912101133.31377-1-chris@chris-wilson.co.uk commit e2050f7c6f22d8dd3d81e84c5d39f11b5e68283d Author: Kieran Bingham Date: Wed Aug 8 12:33:51 2018 -0400 media: dt-bindings: media: adv7604: Fix slave map documentation The reg-names property in the documentation is missing an '='. Add it. Fixes: 9feb786876c7 ("media: dt-bindings: media: adv7604: Extend bindings to allow specifying slave map addresses") Signed-off-by: Kieran Bingham Reviewed-by: Laurent Pinchart Reviewed-by: Rob Herring Signed-off-by: Mauro Carvalho Chehab commit f70fc162e34d07d92a42cf897c8623d7737eddeb Author: Kieran Bingham Date: Mon Aug 6 10:39:03 2018 -0400 media: MAINTAINERS: FDP1: Update e-mail address. This entry was created with my personal e-mail address. Update with the correct work related account. Signed-off-by: Kieran Bingham Signed-off-by: Mauro Carvalho Chehab commit 6f6d5c3f9a2ca9b0cb29da6d0dae3e3091a7415f Author: Kuninori Morimoto Date: Sun Aug 5 23:19:00 2018 -0400 media: backlight: as3711_bl: 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 Reviewed-by: Simon Horman Signed-off-by: Mauro Carvalho Chehab commit 10e740637ab1773585e6a4ccb6a451598f8f764c Author: Kuninori Morimoto Date: Sun Aug 5 23:18:42 2018 -0400 media: fbdev: sh7760fb: 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 Reviewed-by: Simon Horman Signed-off-by: Mauro Carvalho Chehab commit fb903c6b61ce5f65725ec9f5e98eaca908e5e766 Author: Kuninori Morimoto Date: Sun Aug 5 23:18:22 2018 -0400 media: drm: panel-lvds: convert to SPDX identifiers Signed-off-by: Kuninori Morimoto Reviewed-by: Simon Horman Signed-off-by: Mauro Carvalho Chehab commit cdc3d7f346476b4a4d1c4738b7dcdda4b3d5d870 Author: Kuninori Morimoto Date: Sun Aug 5 23:18:05 2018 -0400 media: drm: shmobile: convert to SPDX identifiers Signed-off-by: Kuninori Morimoto Reviewed-by: Simon Horman Signed-off-by: Mauro Carvalho Chehab commit e58f308223c9e8e15e57a1e5cae5140590005647 Author: Kuninori Morimoto Date: Sun Aug 5 23:17:48 2018 -0400 media: adv748x: convert to SPDX identifiers As original license mentioned, it is GPL-2.0+ in SPDX. Then, MODULE_LICENSE() should be "GPL" instead of "GPL v2". See ${LINUX}/include/linux/module.h "GPL" [GNU Public License v2 or later] "GPL v2" [GNU Public License v2] Signed-off-by: Kuninori Morimoto Reviewed-by: Niklas Söderlund Reviewed-by: Simon Horman Reviewed-by: Kieran Bingham Signed-off-by: Mauro Carvalho Chehab commit 661521a8c3d7a8c1d1e434ecc99b2f12bf169e45 Author: Kuninori Morimoto Date: Sun Aug 5 23:17:30 2018 -0400 media: adv7180: convert to SPDX identifiers Signed-off-by: Kuninori Morimoto Reviewed-by: Simon Horman Signed-off-by: Mauro Carvalho Chehab commit 1de2e6b34bbf691900cd3c50ae244fa32db430d0 Author: Kuninori Morimoto Date: Sun Aug 5 23:17:01 2018 -0400 media: rcar-fcp: convert to SPDX identifiers Signed-off-by: Kuninori Morimoto Reviewed-by: Simon Horman Signed-off-by: Mauro Carvalho Chehab commit 5f628053e28bcca6d06c321a5b71ed55d6332a6f Author: Kuninori Morimoto Date: Sun Aug 5 23:16:40 2018 -0400 media: vsp1: convert to SPDX identifiers Signed-off-by: Kuninori Morimoto Reviewed-by: Simon Horman Signed-off-by: Mauro Carvalho Chehab commit 1b09dd9ff8a59b945fe8b5c4e4b8416a63252cac Author: Katsuhiro Suzuki Date: Thu Aug 2 22:08:39 2018 -0400 media: dvb-frontends: add LNBH29 LNB supply driver Add support for STMicroelectronics LNBH29 LNB supply driver. Signed-off-by: Katsuhiro Suzuki Signed-off-by: Mauro Carvalho Chehab commit 447d66855391f702493cbbc8b8bdcc5a75d71f52 Author: Philippe De Muyter Date: Wed Aug 1 17:20:56 2018 -0400 media: v4l2-common: v4l2_spi_subdev_init : generate unique name While v4l2_i2c_subdev_init does give a unique name to the subdev, matching the one appearing in dmesg for messages generated by dev_info and friends (e.g. imx185 30-0010), v4l2_spi_subdev_init does a poor job, copying only the driver name, but not the dev_name(), yielding e.g. "imx185", but missing the "spi1.1" part, and not generating a unique name. Fix that. Signed-off-by: Philippe De Muyter Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit c4189ffb8c052ce4b2bd4ace6cd628a4fe3d9e65 Author: Colin Ian King Date: Wed Aug 1 09:06:10 2018 -0400 media: ddbridge/sx8: remove redundant check of iq_mode == 2 The check for irq_mode == 2 occurs is always false and hence flags is always zero. This is because the check occurs in a path where irq_mode is >= 3. Clean up the code by removing the check and irq_mode and just pass 0. Detected by CoverityScan, CID#1472214 ("Logically dead code") Signed-off-by: Colin Ian King Cc: Ralph Metzler Signed-off-by: Mauro Carvalho Chehab commit 185e0bebb44fc1e8978fabac1267c27fbcd16ee2 Author: Maxime Ripard Date: Tue Sep 11 13:33:25 2018 +0200 drm/sun4i: fix build failure with CONFIG_DRM_SUN8I_MIXER=m Having DRM_SUN4I built-in but DRM_SUN8I_MIXER as a loadable module results in a link error, as we try to access a symbol from the sun8i_tcon_top.ko module: ERROR: "sun8i_tcon_top_de_config" [drivers/gpu/drm/sun4i/sun4i-tcon.ko] undefined! ERROR: "sun8i_tcon_top_set_hdmi_src" [drivers/gpu/drm/sun4i/sun4i-tcon.ko] undefined! ERROR: "sun8i_tcon_top_of_table" [drivers/gpu/drm/sun4i/sun4i-tcon.ko] undefined! This solves the problem by adding a silent symbol for the tcon_top module, building it as a separate module in exactly the cases that we need it, but in a way that it is reachable by the other modules. Fixes: cf77d79b4e29 ("drm/sun4i: tcon: Add another way for matching mixers with tcon") Fixes: 0305189afb32 ("drm/sun4i: tcon: Add support for R40 TCON") Reviewed-by: Daniel Vetter Tested-by: Jon Hunter Tested-by: Matt Hart Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20180911113325.11024-1-maxime.ripard@bootlin.com commit 36e2add18225e33518a3383d8379edad7bc959f5 Author: Linus Walleij Date: Fri Sep 7 22:04:50 2018 +0200 gpio: vf610: Cut down on boilerplate Just use the SPDX identifier for the license. Acked-by: Stefan Agner Signed-off-by: Linus Walleij commit 45e8296cc9a25e048c682794b11b27a0813a956f Author: Linus Walleij Date: Fri Sep 7 22:03:07 2018 +0200 gpio: vf610: Include the right header This is a GPIO driver so only include . Acked-by: Stefan Agner Signed-off-by: Linus Walleij commit 99117f544de34382ba3a83b06f230fb2a906186b Author: Daniel Scheller Date: Sat Jul 14 13:56:34 2018 -0400 media: MAINTAINERS: mark ddbridge, stv0910, stv6111 and mxl5xx orphan I'm definitely not interested to try to maintain those drivers anymore. Signed-off-by: Daniel Scheller Signed-off-by: Mauro Carvalho Chehab commit 730b0ac3a865f57b3a2b7506f79bf7adb3d840bb Author: Daniel Graefe Date: Tue Jun 26 17:30:56 2018 -0400 media: staging: media: omap4iss: Added SPDX license identifiers Added missing SPDX license identifiers to all files of the omap4iss driver. Most files already have license texts which clearly state them to be licensed under GPL 2.0 or later. SPDX identifiers were added accordingly. Some files do not have any license text. SPDX identifiers for GPL 2.0 were added to them, in accordance with the default license of the kernel. Signed-off-by: Daniel Graefe Signed-off-by: Roman Sommer Signed-off-by: Mauro Carvalho Chehab commit dfb7bcf0af2d819a01a978a5fd475b96a0700cb3 Author: Mauro Carvalho Chehab Date: Wed Sep 12 08:19:27 2018 -0400 media: mxl5xx: add a fall-trough annotation As pointed by Daniel Scheller , sparse warns that a segment may fall through. We're deprecating this warning in favor of gcc 8 equivalent warning. In this specific case, the code for DVB-S applies for DVB-S2. In a matter of fact, several things there (like rolloff factor logic) assume that the transponder is DVB-S2. So, add the corresponding fall-trough markup, for gcc to properly ignore it. Reported-by: Daniel Scheller Signed-off-by: Mauro Carvalho Chehab commit 0cd3edc98b66399eb5ab173e5732cb5b93846b6a Author: Sebastian Andrzej Siewior Date: Wed Jun 20 07:01:03 2018 -0400 media: usbvision: remove time_in_irq Time "in interrupt" accounting with the help of `jiffies' is a pointless exercise. This variable isn't even used. Remove time_in_irq. Cc: Hans Verkuil Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Mauro Carvalho Chehab commit 2b89b73a708a2cb6182adcc458203b6df752af7e Author: Sebastian Andrzej Siewior Date: Wed Jun 20 07:00:52 2018 -0400 media: gspca: sq930x: use GFP_KERNEL in sd_dq_callback() The context in which sd_dq_callback() is non atomic, there is even msleep() at the end of the function. There is no need to use GFP_ATOMIC here - use GFP_KERNEL instead. Cc: Hans Verkuil Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Mauro Carvalho Chehab commit fc8af4fb3ebf705e9e37fb8e80f5de985c10bb11 Author: Sebastian Andrzej Siewior Date: Wed Jun 20 07:00:45 2018 -0400 media: em28xx-audio: use GFP_KERNEL for memory allocation during init As far as I can tell em28xx_audio_urb_init() is called once during initialization from non atomic context. Memory allocation from non atomic context should use GFP_KERNEL to avoid using emergency pool for memory allocation. Use GFP_KERNEL for memory allocation. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Mauro Carvalho Chehab commit d9b84a15892c02334ac8a5c28865ae54168d9b22 Author: Mark Brown Date: Wed Sep 12 12:31:32 2018 +0100 ALSA: hda: Fix implicit definition of pci_iomap() on SH Include asm/io.h directly so we've got a definition of pci_iomap(), the current set of includes do this implicitly on most architectures but not on SH. Reported-by: kbuild test robot Signed-off-by: Mark Brown commit 3dae3c96a5a893f94f127dd4d5f58697bd234d1b Author: Daniel Scheller Date: Tue Jun 19 14:51:18 2018 -0400 media: dvb-frontends/cxd2099: add SPDX license identifier As both the MODULE_LICENSE and the boilerplates are now in sync and clear that the driver is licensed under the terms of the GPLv2-only, add a matching SPDX license identifier tag. Cc: Ralph Metzler Cc: Manfred Voelkel Signed-off-by: Daniel Scheller Signed-off-by: Mauro Carvalho Chehab commit 579856fee654361e3ca60020bc42a247c14be592 Author: Daniel Scheller Date: Tue Jun 19 14:51:17 2018 -0400 media: dvb-frontends/cxd2099: fix MODULE_LICENSE to 'GPL v2' In commit 3db30defab4b ("use correct MODULE_LINCESE for GPL v2 only according to notice in header") in the upstream repository for the mentioned driver at https://github.com/DigitalDevices/dddvb.git, the MODULE_LICENSE was fixed to "GPL v2" and is now in sync with the GPL copyright boilerplate. Apply this change to the kernel tree driver as well. Cc: Ralph Metzler Cc: Manfred Voelkel Signed-off-by: Daniel Scheller Signed-off-by: Mauro Carvalho Chehab commit 3c01ad204a249108f2805a5fa94e3713f518d1b2 Author: Daniel Scheller Date: Tue Jun 19 14:50:16 2018 -0400 media: dvb-frontends/stv6111: add SPDX license identifier As it is clear that the driver is licensed under the terms of GPLv2-only by now, add a matching SPDX license identifier to all driver files. Cc: Ralph Metzler Cc: Manfred Voelkel Signed-off-by: Daniel Scheller Signed-off-by: Mauro Carvalho Chehab commit 29ff8406740243e5fc98e269dfef907af5bcd11b Author: Daniel Scheller Date: Tue Jun 19 14:50:15 2018 -0400 media: dvb-frontends/stv6111: cleanup and fix licensing boilerplates The stv6111.h doesn't carry any header nor any licensing boilerplate at all, so copy this from the main driver file stv6111.c. [mchehab@kernel.org: kept only the part of this patch that copied the license from stv6111.c into stv6111.h] Cc: Ralph Metzler Cc: Manfred Voelkel Signed-off-by: Daniel Scheller Signed-off-by: Mauro Carvalho Chehab commit bbeae4304bd9f63191cc1476f136e9fe98ea30a1 Author: Daniel Scheller Date: Tue Jun 19 14:50:14 2018 -0400 media: dvb-frontends/stv0910: add SPDX license identifier As it is clear that the driver is licensed under the terms of GPLv2-only by now, add a matching SPDX license identifier to all driver files. Cc: Ralph Metzler Cc: Manfred Voelkel Signed-off-by: Daniel Scheller Signed-off-by: Mauro Carvalho Chehab commit 1d9b5ff2bc3589e74b999bf5d86610c64421a95a Author: Daniel Scheller Date: Tue Jun 19 14:50:13 2018 -0400 media: dvb-frontends/stv0910: cleanup and fix licensing boilerplates The stv0910.h doesn't carry any header nor any licensing boilerplate at all, so copy this from the main driver file stv0910.c. [mchehab@kernel.org: kept only the part of this patch that copied the license from stv0910.c into stv0910.h] Cc: Ralph Metzler Cc: Manfred Voelkel Signed-off-by: Daniel Scheller Signed-off-by: Mauro Carvalho Chehab commit dc2b3d17a4a6d1ba83d3598e80817e5ddf466ef4 Author: Daniel Scheller Date: Tue Jun 19 14:50:12 2018 -0400 media: dvb-frontends/mxl5xx: add SPDX license identifier As it is clear that the driver is licensed under the terms of GPLv2-only by now, add a matching SPDX license identifier to all driver files. Cc: Ralph Metzler Cc: Manfred Voelkel Signed-off-by: Daniel Scheller Signed-off-by: Mauro Carvalho Chehab commit 204b14344db0c7407c0698fa3630e34645f9c111 Author: Daniel Scheller Date: Tue Jun 19 14:50:11 2018 -0400 media: dvb-frontends/mxl5xx: cleanup and fix licensing boilerplates mxl5xx.h doesn't carry any licensing boilerplate at all right now, so copy the boilerplate over from the main driver file mxl5xx.c. Also, mxl5xx_defs is missing a part of the licensing boilerplate text, so add it. [mchehab@kernel.org: kept only the part of this patch that copied the license from mxl5xx.c into mxl5xx.h] Cc: Ralph Metzler Cc: Manfred Voelkel Signed-off-by: Daniel Scheller Signed-off-by: Mauro Carvalho Chehab commit 79150ac9f35b9de532b74cf1288371091b5897ed Author: Daniel Scheller Date: Tue Jun 19 14:50:10 2018 -0400 media: ddbridge: header/boilerplate cleanups and cosmetics Cleanup blank lines, remove wrong links to http://www.gnu.org/copyleft/gpl.html (the driver is licensed under the terms of GPLv2, but the link points to a copy of the GPLv3), and fix the filename reference in ddbridge-i2c.h. [mchehab@kernel.org: removed whitespace changes at the licensing text, as we didn't get any acks from the authors with regards to changing the text] Cc: Ralph Metzler Cc: Manfred Voelkel Signed-off-by: Daniel Scheller Signed-off-by: Mauro Carvalho Chehab commit 4771d831e2f9a6f580fc0873102c0364e9349947 Author: Daniel Scheller Date: Tue Jun 19 14:50:09 2018 -0400 media: ddbridge: add SPDX license identifiers Since the boilerplates and MODULE_LICENSE are now in sync regarding the used license (GPL v2 only), add a matching GPLv2 SPDX license identifier to all files of the ddbridge driver. Cc: Ralph Metzler Cc: Manfred Voelkel Signed-off-by: Daniel Scheller Signed-off-by: Mauro Carvalho Chehab commit 229b6ea6894be4714e49dbcb0e2f391ea7d20d02 Author: Daniel Scheller Date: Tue Jun 19 14:50:08 2018 -0400 media: mxl5xx/stv0910/stv6111/ddbridge: fix MODULE_LICENSE to 'GPL v2' In commit 3db30defab4b ("use correct MODULE_LINCESE for GPL v2 only according to notice in header") in the upstream repository for the mentioned four drivers at https://github.com/DigitalDevices/dddvb.git (plus a few more which aren't part of the mainline kernel tree), the MODULE_LICENSE was fixed to "GPL v2" and are now in sync with the GPL copyright boilerplate. Apply this change to the kernel tree drivers as well. Cc: Ralph Metzler Cc: Manfred Voelkel Signed-off-by: Daniel Scheller Signed-off-by: Mauro Carvalho Chehab commit 27582f0ea97fe3e4a38beb98ab36cce4b6f029d5 Author: Geert Uytterhoeven Date: Thu Jun 14 09:48:07 2018 -0400 media: dt-bindings: adv748x: Fix decimal unit addresses With recent dtc and W=1: Warning (graph_port): video-receiver@70/port@10: graph node unit address error, expected "a" Warning (graph_port): video-receiver@70/port@11: graph node unit address error, expected "b" Unit addresses are always hexadecimal (without prefix), while the bases of reg property values depend on their prefixes. Fixes: e69595170b1cad85 ("media: adv748x: Add adv7481, adv7482 bindings") Signed-off-by: Geert Uytterhoeven Reviewed-by: Rob Herring Reviewed-by: Kieran Bingham Signed-off-by: Mauro Carvalho Chehab commit f3fc81fd8c3fc9b091aa23ec18299e42d129da68 Author: Eugen Hristev Date: Fri Sep 7 16:38:09 2018 +0300 ARM: dts: at91: sama5d4: add labels to soc dtsi for derivative boards This adds labels to commonly used device-tree nodes so that derivative boards can avoid ahb/apb hierarchy. Signed-off-by: Eugen Hristev Acked-by: Ludovic Desroches Signed-off-by: Alexandre Belloni commit a7c439d6128de2cbc087ae7524b47f613ff8bc6c Author: Kuninori Morimoto Date: Tue Sep 11 15:50:27 2018 +0900 ASoC: soc-core: remove dai->driver NULL check It is strange if it has "dai" but doesn't have "dai->driver". And more over "dai->driver->xxx" is used everywhere without "dai->driver" pointer NULL checking. It got Oops already if "dai->driver" was NULL. Let's remove un-needed "dai->driver" NULL check. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit e894efef9ac7c10b7727798dcc711cccf07569f9 Author: Srinivas Kandagatla Date: Wed Sep 12 10:15:00 2018 +0100 ASoC: core: add support to card rebind Current behaviour of ASoC core w.r.t to component removal is that it unregisters dependent sound card totally. There is no support to rebind the card if the component comes back. Typical use case is DSP restart or kernel modules itself. With this patch, core now maintains list of cards that are unbind due to any of its depended components are removed and card not unregistered yet. This list is cleared when the card is rebind successfully or when the card is unregistered from machine driver. This list of unbind cards are tried to bind once again after every new component is successfully added, giving a fair chance for card bind to be successful. Signed-off-by: Srinivas Kandagatla Signed-off-by: Mark Brown commit 749e36d0a0d725a3fc2dc8d6261557b9e06d210d Author: Jeremy Gebben Date: Tue Sep 11 11:28:26 2018 -0600 rtc: abx80x: add basic watchdog support The abx804 and abx805 chips have support for a simple watchdog function that can trigger an external reset. Signed-off-by: Jeremy Gebben Reviewed-by: Guenter Roeck Signed-off-by: Alexandre Belloni commit af69f9a7878413ccdb47a28b024748fd0381a035 Author: Jeremy Gebben Date: Tue Sep 11 11:28:25 2018 -0600 rtc: abx80x: use a 'priv' struct for client data This will allow additional data to be tracked, for future improvements. Signed-off-by: Jeremy Gebben Signed-off-by: Alexandre Belloni commit e2a13d1b24073fe183ebe858ebb4fc827faded56 Author: Chris Wilson Date: Mon Sep 10 14:08:08 2018 +0100 drm/i915/ringbuffer: Reload PDs harder on byt/bcs Baytrail takes a little more convincing that it needs to actually reload its Page Directoy (ppGTT) before the context switch, so repeat it until it gets the message. Once again the arbitrary values here are empirically derived. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107861 Testcase: igt/gem_exec_parallel/fds Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20180910130808.10809-1-chris@chris-wilson.co.uk commit e1e38ea14ea3294546e6350d05a1376197a73589 Author: zhong jiang Date: Wed Sep 12 11:41:49 2018 +0800 ASoC: remove unneeded static set .owner field in platform_driver platform_driver_register will set the .owner field. So it is safe to remove the redundant assignment. The issue is detected with the help of Coccinelle. Signed-off-by: zhong jiang Signed-off-by: Mark Brown commit 39c0e5a8746cfbfb87e86761337c807e7faea134 Author: Fabrizio Castro Date: Mon Sep 10 12:53:48 2018 +0100 dt-bindings: arm: Document RZ/G2E SoC DT bindings Add device tree bindings documentation for Renesas RZ/G2E (r8a774c0) SoC. Signed-off-by: Fabrizio Castro Reviewed-by: Biju Das Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit 2bab3d8012ebc463b899ee2c9292bd9282d75257 Author: Fabrizio Castro Date: Mon Sep 10 12:53:50 2018 +0100 soc: renesas: Identify RZ/G2E Add support for identifying the RZ/G2E (r8a774c0) SoC. Signed-off-by: Fabrizio Castro Reviewed-by: Biju Das Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit 41c4567ce2610b7a87952398756d662e979621fa Author: Kuninori Morimoto Date: Fri Sep 7 02:04:19 2018 +0000 soc: renesas: 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: Geert Uytterhoeven Signed-off-by: Simon Horman commit 3116d859e7b15d3740afd44c975cdb34a4c1246e Author: Biju Das Date: Thu Aug 2 15:55:04 2018 +0100 soc: renesas: rcar-rst: Add support for RZ/G2M Signed-off-by: Biju Das Reviewed-by: Chris Paterson Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit 7f0e99cc916933ecd7fd407e2eb42448198e0404 Author: Biju Das Date: Thu Aug 2 15:53:19 2018 +0100 soc: renesas: rcar-sysc: Add r8a774a1 support Add support for RZ/G2M (R8A774A1) SoC power areas to the R-Car SYSC driver. Signed-off-by: Biju Das Reviewed-by: Chris Paterson Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit 066f7e63b9ed0badffc32bcf135e59658b423999 Author: Biju Das Date: Thu Aug 2 15:48:18 2018 +0100 dt-bindings: power: Add r8a774a1 SYSC power domain definitions This patch adds power domain indices for RZ/G2M. Signed-off-by: Biju Das Reviewed-by: Chris Paterson Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit 79c6f4b84b6ee0117b9c11c8f7a108c327277ceb Author: Souptick Joarder Date: Sat Sep 1 22:28:50 2018 +0530 uio: convert to vm_fault_t As part of commit 9b85e95a3080 ("uio: Change return type to vm_fault_t") in 4.19-rc1, this conversion was missed. Now converted 'ret' to vm_fault_t type. Signed-off-by: Souptick Joarder Signed-off-by: Greg Kroah-Hartman commit 0952c57c8ff1e4e68de029f64dadd8d82027043b Author: Rob Herring Date: Mon Aug 27 20:52:48 2018 -0500 uio: 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: Greg Kroah-Hartman Signed-off-by: Rob Herring Signed-off-by: Greg Kroah-Hartman commit ca6ac25cecf0e740d7cc8e03e0ebbf8acbeca3df Author: Srinivas Kandagatla Date: Tue Aug 7 13:19:35 2018 +0100 nvmem: core: return error code instead of NULL from nvmem_device_get nvmem_device_get() should return ERR_PTR() on error or valid pointer on success, but one of the code path seems to return NULL, so fix it. Reported-by: Niklas Cassel Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman commit 0181cfd93c7b09a3fc69ff734e84c49bfe7d9020 Author: Parth Y Shah Date: Mon Aug 6 12:40:57 2018 +0530 misc: lkdtm: fixed static variable initialization Resolved "ERROR: do not initialise statics to 0" Signed-off-by: Parth Y Shah Signed-off-by: Greg Kroah-Hartman commit 02b04d23b2cb134d2bf15a0d97bc9c1976da61ab Author: Colin Ian King Date: Tue Aug 7 14:20:32 2018 +0100 misc: bh1770glc: remove unused array prox_curr_ma Array prox_curr_ma is declared but never used, hence it is redundant and can be removed. Cleans up clang warning: warning: 'prox_curr_ma' defined but not used [-Wunused-const-variable=] Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman commit 52ac30592dd6292701863ddbbfbf4c43d7cf706e Author: Colin Ian King Date: Tue Aug 7 12:09:23 2018 +0100 misc: apds990x: remove unused array ir_currents Array ir_currents is declared but never used, hence it is redundant and can be removed. Cleans up clang warning: warning: 'ir_currents' defined but not used [-Wunused-const-variable=] Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman commit ae61cf5b9913027c6953a79ed3894da4f47061bd Author: Alexandre Belloni Date: Thu Aug 16 09:39:41 2018 +0200 uio: ensure class is registered before devices When both uio and the uio drivers are built in the kernel, it is possible for a driver to register devices before the uio class is registered. This may result in a NULL pointer dereference later on in get_device_parent() when accessing the class glue_dirs spinlock. The trace looks like that: Unable to handle kernel NULL pointer dereference at virtual address 00000140 [...] [] _raw_spin_lock+0x14/0x48 [] device_add+0x154/0x6a0 [] device_create_groups_vargs+0x120/0x128 [] device_create+0x54/0x60 [] __uio_register_device+0x120/0x4a8 [] jaguar2_pci_probe+0x2d4/0x558 [] local_pci_probe+0x3c/0xb8 [] pci_device_probe+0x11c/0x180 [] driver_probe_device+0x22c/0x2d8 [] __driver_attach+0xbc/0xc0 [] bus_for_each_dev+0x4c/0x98 [] driver_attach+0x20/0x28 [] bus_add_driver+0x1b8/0x228 [] driver_register+0x60/0xf8 [] __pci_register_driver+0x40/0x48 Return EPROBE_DEFER in that case so the driver can register the device later. Signed-off-by: Alexandre Belloni Signed-off-by: Greg Kroah-Hartman commit f25a7ece08bdb1f2b3c4bbeae942682fc3a99dde Author: Michael Kelley Date: Fri Aug 10 23:06:11 2018 +0000 Drivers: hv: vmbus: Fix synic per-cpu context initialization If hv_synic_alloc() errors out, the state of the per-cpu context for some CPUs is unknown since the zero'ing is done as each CPU is iterated over. In such case, hv_synic_cleanup() may try to free memory based on uninitialized values. Fix this by zero'ing the per-cpu context for all CPUs before doing any memory allocations that might fail. Signed-off-by: Michael Kelley Reported-by: Dan Carpenter Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman commit 8e6925631aae550bdaea4c442e8ecbab4a9685d2 Author: Stephen Hemminger Date: Fri Aug 10 23:06:10 2018 +0000 uio_hv_generic: drop #ifdef DEBUG DEBUG is leftover from the development phase, remove it. Signed-off-by: Stephen Hemminger Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman commit 108ddb8fa1fc310be4a6bd1e308bca62821ee8b5 Author: Stephen Hemminger Date: Fri Aug 10 23:06:09 2018 +0000 uio_hv_generic: increase size of receive and send buffers When using DPDK there is significant performance boost by using the largest possible send and receive buffer area. Unfortunately, with UIO model there is not a good way to configure this at run time. But it is okay to have a bigger buffer available even if application only decides to use a smaller piece of it. Signed-off-by: Stephen Hemminger Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman commit d765edbb301c0e196015a59b17420558088ea33f Author: Stephen Hemminger Date: Fri Aug 10 23:06:08 2018 +0000 vmbus: add driver_override support Add support for overriding the default driver for a VMBus device in the same way that it can be done for PCI devices. This patch adds the /sys/bus/vmbus/devices/.../driver_override file and the logic for matching. This is used by driverctl tool to do driver override. https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitlab.com%2Fdriverctl%2Fdriverctl&data=02%7C01%7Ckys%40microsoft.com%7C42e803feb2c544ef6ea908d5fd538878%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636693457619960040&sdata=kEyYHRIjNZCk%2B37moCSqbrZL426YccNQrsWpENcrZdw%3D&reserved=0 Signed-off-by: Stephen Hemminger Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman commit 83b15fed91fa23facd159fb72c82241cbdc93d3f Author: Colin Ian King Date: Thu Aug 16 14:42:14 2018 -0500 drivers: fpga: fix two trivial spelling mistakes Trivial fix to two spelling mistakes "execeeded" -> "exceeded" "Invaild" -> "Invalid" Signed-off-by: Colin Ian King Acked-by: Alan Tull Acked-by: Moritz Fischer Signed-off-by: Greg Kroah-Hartman commit 0041195d55bc38df6b574cc8c36dcf2266fbee39 Author: Li RongQing Date: Tue Sep 11 09:05:01 2018 +0800 netlink: remove hash::nelems check in netlink_insert The type of hash::nelems has been changed from size_t to atom_t which in fact is int, so not need to check if BITS_PER_LONG, that is bit number of size_t, is bigger than 32 and rht_grow_above_max() will be called to check if hashtable is too big, ensure it can not bigger than 1<<31 Signed-off-by: Zhang Yu Signed-off-by: Li RongQing Signed-off-by: David S. Miller commit 67edf21e5adfd336f2ff08668eb09850943666d3 Author: David Ahern Date: Mon Sep 10 17:21:42 2018 -0700 scsi: libcxgbi: fib6_ino reference in rt6_info is rcu protected The fib6_info reference in rt6_info is rcu protected. Add a helper to extract prefsrc from and update cxgbi_check_route6 to use it. Fixes: 0153167aebd0 ("net/ipv6: Remove rt6i_prefsrc") Reported-by: kbuild test robot Signed-off-by: David Ahern Signed-off-by: David S. Miller commit 1fb0d4e8ddb1b64d6efbd01e44f8994644521419 Author: Florian Fainelli Date: Mon Sep 10 16:47:07 2018 -0700 net: dsa: b53: Only call b53_port_event() for SGMII ports Built-in PHY ports are still being polled, avoid generating spurious and duplicate events which the PHY library resolves through polling anyways. Fixes: 0e01491de646 ("net: dsa: b53: Add SerDes support") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller commit 150085791afb8054e11d2e080d4b9cd755dd7f69 Author: Vakul Garg Date: Mon Sep 10 22:53:46 2018 +0530 net/tls: Fixed return value when tls_complete_pending_work() fails In tls_sw_sendmsg() and tls_sw_sendpage(), the variable 'ret' has been set to return value of tls_complete_pending_work(). This allows return of proper error code if tls_complete_pending_work() fails. Fixes: 3c4d7559159b ("tls: kernel TLS support") Signed-off-by: Vakul Garg Signed-off-by: David S. Miller commit bf8744e40cd6db20dfbd231ad44943f6bc8ac311 Author: Peter Wu Date: Mon Sep 10 15:21:56 2018 +0200 qxl: refactor to use drm_fb_helper_fbdev_setup Lots of code can be removed by relying on fb-helper: - "struct drm_framebuffer" moves to fb_helper.fb. - "struct drm_gem_object" moves to fb_helper.obj[0]. - "struct qxl_device" can be inferred as drm_fb_helper is embedded. - qxl_user_framebuffer_create -> drm_gem_fb_create. - qxl_user_framebuffer_destroy -> drm_gem_fb_destroy. - qxl_fbdev_destroy -> drm_fb_helper_fbdev_teardown + vfree(shadow). Remove unused code: - qxl_fbdev_qobj_is_fb, qxl_fbdev_set_suspend. - Unused fields of qxl_fbdev: delayed_ops, delayed_ops_lock, size. Misc notes: - The dirty callback is preserved as it is necessary to trigger update commands in the hw (the screen stays black otherwise). - No idea when .create_handle in drm_framebuffer_funcs is used, but use the same drm_gem_fb_create_handle to match drm_gem_fb_funcs. - I don't know why qxl_fb_find_or_create_single used to check for an existing framebuffer and removed that check to match other drivers. - Use of drm_fb_helper_fbdev_teardown also requires "info->fbdefio" to be dynamically allocated. Replace the existing defio config by drm_fb_helper_defio_init to accomodate this. Testing results: startx with fbdev, modesetting and qxl all seems to work. Tested also with CONFIG_DRM_FBDEV_EMULATION=n, fbdev obviously fails but others are fine. QEMU -spice and QEMU -spice with vdagent and multiple (resized) displays (via remote-viewer) also works. unbind vtconsole and rmmod has *not* regressed (i.e. it still trips on a use-after-free in qxl_check_idle via qxl_ttm_fini). Ideally setup/teardown is replaced by drm_fbdev_generic_setup as that would result in further code reduction, improve error handling (like not leaking shadow memory), but unfortunately QXL has no implementation for qxl_gem_prime_vmap. Signed-off-by: Peter Wu Link: http://patchwork.freedesktop.org/patch/msgid/20180910132156.23201-1-peter@lekensteyn.nl Signed-off-by: Gerd Hoffmann commit 80de556a6bf47c39ed5999a2ac6f1dd4b6764bb7 Merge: 82bcee42059f 85e55db7dcc5 Author: David S. Miller Date: Tue Sep 11 23:41:03 2018 -0700 Merge branch 'aquantia-implement-WOL-and-EEE-support' Igor Russkikh says: ==================== net: aquantia: implement WOL and EEE support This is v3 of WOL/EEE functionality patch for atlantic driver. In this patchset Yana Esina and Nikita Danilov implemented: - Upload function to interact with FW memory - Definitions and structures necessary for the correct operation of Wake ON Lan - The functionality Wake On Lan via ethtool (Magic packet is supported) - The functionality for Energy-Efficient Ethernet configuration via ethtool Version 3: - use ETH_ALEN instead of raw number Version 2 has the following fixes: - patchset reorganized to extract renaming and whitespace fixes into separate patches - some of magic numbers replaced with defines - reverse christmas tree applied ==================== Signed-off-by: David S. Miller commit 85e55db7dcc5456b0e0a19e63b0e7cd0ee96c015 Author: Igor Russkikh Date: Mon Sep 10 12:39:34 2018 +0300 net: aquantia: bump driver version Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit 8f60f762aa3d4c8b940ac01d6c0bbb5ec2361d6b Author: Nikita Danilov Date: Mon Sep 10 12:39:33 2018 +0300 net: aquantia: renaming for better visibility Removed extra characters from the names of structures to unify prefixes used through the driver code (we normally use hw_atl for hw specifics). HW_ATL_B0_ and HW_ATL_A0_ are the same and useless copies. Signed-off-by: Nikita Danilov Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit e91578488fd0ccb5d1e94c46117901af8f0c34dc Author: Nikita Danilov Date: Mon Sep 10 12:39:32 2018 +0300 net: aquantia: whitespace changes Removed extra spaces, corrected alignment. Signed-off-by: Nikita Danilov Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit 92ab64079d6b750c2b6860d988b6c912a7eddfef Author: Yana Esina Date: Mon Sep 10 12:39:31 2018 +0300 net: aquantia: implement EEE support Support of Energy-Efficient Ethernet to aQuantia NIC's via ethtool (according to the IEEE 802.3az specifications) Signed-off-by: Yana Esina Signed-off-by: Nikita Danilov Tested-by: Nikita Danilov Signed-off-by: Igor Russkikh Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit a0da96c08cfacc97d16330e12be2135f502017dd Author: Yana Esina Date: Mon Sep 10 12:39:30 2018 +0300 net: aquantia: implement WOL support Add WOL support. Currently only magic packet (ethtool -s wol g) feature is implemented. Remove hw_set_power and move that to FW_OPS set_power: because WOL configuration behaves differently on 1x and 2x firmwares Signed-off-by: Yana Esina Signed-off-by: Nikita Danilov Tested-by: Nikita Danilov Signed-off-by: Igor Russkikh Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 0e1a0dde808845e947315ed92c033b112518f689 Author: Yana Esina Date: Mon Sep 10 12:39:29 2018 +0300 net: aquantia: definitions for WOL Added definitions and structures needed to support WOL. Signed-off-by: Yana Esina Signed-off-by: Nikita Danilov Tested-by: Nikita Danilov Signed-off-by: Igor Russkikh Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 3ee5c8873fd369e2005dc93bf6d4b299b4976e68 Author: Yana Esina Date: Mon Sep 10 12:39:28 2018 +0300 net: aquantia: fix hw_atl_utils_fw_upload_dwords This patch fixes the upload function, which worked incorrectly with some chips. Signed-off-by: Yana Esina Signed-off-by: Nikita Danilov Tested-by: Nikita Danilov Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit 82bcee42059f6117fc36046d1587d7850415a31a Merge: aad06d1104e8 8bf6edcd96fc Author: David S. Miller Date: Tue Sep 11 23:37:06 2018 -0700 Merge branch 'liquidio-Removed-droq-lock-from-Rx-path' Intiyaz Basha says: ==================== liquidio: Removed droq lock from Rx path Series of patches for removing droq lock from Rx Path. ==================== Signed-off-by: David S. Miller commit 8bf6edcd96fc397988bbac5160fe1a5bdfb18c5f Author: Intiyaz Basha Date: Sun Sep 9 23:34:26 2018 -0700 liquidio: Removed droq lock With the changes in patch 1 and 2, droq lock is not required. So removing droq lock. Signed-off-by: Intiyaz Basha Acked-by: Derek Chickles Signed-off-by: Felix Manlunas Signed-off-by: David S. Miller commit 4b6e326b2d346b7935ec9a1e6385e27be8a36837 Author: Intiyaz Basha Date: Sun Sep 9 23:34:21 2018 -0700 liquidio: Per queue oom work queue Removed oom task unconditional rescheduling every 250ms and created per queue oom work queue for refilling buffers. The oom task refills only if the available descriptors is fallen to 64. There will be no packets coming in after hitting this level. So NAPI will not run until oom task refills the buffers. Signed-off-by: Intiyaz Basha Acked-by: Derek Chickles Signed-off-by: Felix Manlunas Signed-off-by: David S. Miller commit fe2d22b17288303ebd8ed7ded8ec5133e47d4957 Author: Intiyaz Basha Date: Sun Sep 9 23:34:16 2018 -0700 liquidio: Disabling tasklet when NAPI is active Control packets are processed in tasklet when interface is down and in NAPI when interface is up. So tasklet can be disabled when interface up and re-enabled when interface is down. Signed-off-by: Intiyaz Basha Acked-by: Derek Chickles Signed-off-by: Felix Manlunas Signed-off-by: David S. Miller commit 33f35429fc49c09a5d4b929690d4c44694c390a7 Author: Gerd Hoffmann Date: Tue Sep 11 15:42:15 2018 +0200 udmabuf: use sizeof(variable) instead of sizeof(type) Reported-by: Laurent Pinchart Signed-off-by: Gerd Hoffmann Reviewed-by: Laurent Pinchart Link: http://patchwork.freedesktop.org/patch/msgid/20180911134216.9760-13-kraxel@redhat.com commit 7b26e4e2119d0c5ede1282b22ce2af22835ff4b5 Author: Gerd Hoffmann Date: Tue Sep 11 15:42:14 2018 +0200 udmabuf: drop WARN_ON() check. Reported-by: Laurent Pinchart Signed-off-by: Gerd Hoffmann Reviewed-by: Laurent Pinchart Link: http://patchwork.freedesktop.org/patch/msgid/20180911134216.9760-12-kraxel@redhat.com commit 52499d9cdd887843fa37bf8733047fded7e907cb Author: Gerd Hoffmann Date: Tue Sep 11 15:42:13 2018 +0200 udmabuf: use ENOTTY for invalid ioctls Reported-by: Laurent Pinchart Signed-off-by: Gerd Hoffmann Reviewed-by: Laurent Pinchart Acked-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20180911134216.9760-11-kraxel@redhat.com commit 7a1c67d78094236e8ba0c5f6f83a8baf33a53860 Author: Gerd Hoffmann Date: Tue Sep 11 15:42:12 2018 +0200 udmabuf: use EBADFD in case we didn't got a memfd Reported-by: Laurent Pinchart Signed-off-by: Gerd Hoffmann Acked-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20180911134216.9760-10-kraxel@redhat.com commit 0d17455ca85ecbc757bf7a2fefed6ca9cfae5054 Author: Gerd Hoffmann Date: Tue Sep 11 15:42:11 2018 +0200 udmabuf: improve udmabuf_create error handling Reported-by: Laurent Pinchart Signed-off-by: Gerd Hoffmann Reviewed-by: Laurent Pinchart Acked-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20180911134216.9760-9-kraxel@redhat.com commit dc4716d75154b36cb115d2a1871655ed0f2e10b2 Author: Gerd Hoffmann Date: Tue Sep 11 15:42:10 2018 +0200 udmabuf: rework limits Create variable for the list length limit. Serves as documentation, also allows to make it a module parameter if needed. Also add a total size limit. Signed-off-by: Gerd Hoffmann Acked-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20180911134216.9760-8-kraxel@redhat.com commit 68d2f70efe2d622483c5cde7c27179a695285fb0 Author: Gerd Hoffmann Date: Tue Sep 11 15:42:09 2018 +0200 udmabuf: add MEMFD_CREATE dependency udmabuf builds without it, but if userspace can not create memfd handles in the first place it is rather pointless to include it, except for test builds. Signed-off-by: Gerd Hoffmann Acked-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20180911134216.9760-7-kraxel@redhat.com commit dc254553f25d081cb72b8eff0c778fabfcf42500 Author: Gerd Hoffmann Date: Tue Sep 11 15:42:08 2018 +0200 udmabuf: constify udmabuf_create args Reported-by: Laurent Pinchart Signed-off-by: Gerd Hoffmann Reviewed-by: Laurent Pinchart Acked-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20180911134216.9760-6-kraxel@redhat.com commit a34852891ba45d804362c891c10b973d1d938755 Author: Gerd Hoffmann Date: Tue Sep 11 15:42:07 2018 +0200 udmabuf: constify udmabuf_ops Reported-by: Laurent Pinchart Signed-off-by: Gerd Hoffmann Reviewed-by: Laurent Pinchart Acked-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20180911134216.9760-5-kraxel@redhat.com commit b35f57c43705a7cc910e8fefd890706986760643 Author: Gerd Hoffmann Date: Tue Sep 11 15:42:06 2018 +0200 udmabuf: use pgoff_t for pagecount Reported-by: Laurent Pinchart Signed-off-by: Gerd Hoffmann Acked-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20180911134216.9760-4-kraxel@redhat.com commit a3e722dad03ee75b9e16a8945528ee43fe5ca9ac Author: Gerd Hoffmann Date: Tue Sep 11 15:42:05 2018 +0200 udmabuf: improve map_udmabuf error handling Reported-by: Laurent Pinchart Signed-off-by: Gerd Hoffmann Reviewed-by: Laurent Pinchart Acked-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20180911134216.9760-3-kraxel@redhat.com commit 913965c42c57bbe359a7a79a4296731b360a2439 Author: Gerd Hoffmann Date: Tue Sep 11 15:42:04 2018 +0200 udmabuf: sort headers, drop uapi/ path prefix Reported-by: Laurent Pinchart Signed-off-by: Gerd Hoffmann Reviewed-by: Laurent Pinchart Acked-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20180911134216.9760-2-kraxel@redhat.com commit aad06d1104e8d5afee14ee4a4b9b3f39de0c9b67 Author: zhong jiang Date: Sat Sep 8 21:53:42 2018 +0800 xen-netback: remove unecessary condition check before debugfs_remove_recursive debugfs_remove_recursive has taken IS_ERR_OR_NULL into account. So just remove the condition check before debugfs_remove_recursive. Signed-off-by: zhong jiang Reviewed-by: Paul Durrant Signed-off-by: David S. Miller commit 0527097ce81cad20529e4f2c37a092774d713d36 Author: zhong jiang Date: Sat Sep 8 21:35:06 2018 +0800 net: xenbus: remove redundant condition check before debugfs_remove_recursive debugfs_remove_recursive has taken the IS_ERR_OR_NULL into account. Just remove the unnecessary condition check. Signed-off-by: zhong jiang Reviewed-by: Paul Durrant Signed-off-by: David S. Miller commit cbdd96f5586151e48317d90a403941ec23f12660 Author: Masami Hiramatsu Date: Tue Sep 11 19:21:09 2018 +0900 kprobes: Don't call BUG_ON() if there is a kprobe in use on free list Instead of calling BUG_ON(), if we find a kprobe in use on free kprobe list, just remove it from the list and keep it on kprobe hash list as same as other in-use kprobes. Signed-off-by: Masami Hiramatsu Cc: Anil S Keshavamurthy Cc: David S . Miller Cc: Linus Torvalds Cc: Naveen N . Rao Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/153666126882.21306.10738207224288507996.stgit@devbox Signed-off-by: Ingo Molnar commit 819319fc93461c07b9cdb3064f154bd8cfd48172 Author: Masami Hiramatsu Date: Tue Sep 11 19:20:40 2018 +0900 kprobes: Return error if we fail to reuse kprobe instead of BUG_ON() Make reuse_unused_kprobe() to return error code if it fails to reuse unused kprobe for optprobe instead of calling BUG_ON(). Signed-off-by: Masami Hiramatsu Cc: Anil S Keshavamurthy Cc: David S . Miller Cc: Linus Torvalds Cc: Naveen N . Rao Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/153666124040.21306.14150398706331307654.stgit@devbox Signed-off-by: Ingo Molnar commit a6d18e65dff2b73ceeb187c598b48898e36ad7b1 Author: Masami Hiramatsu Date: Tue Sep 11 19:20:11 2018 +0900 kprobes: Remove pointless BUG_ON() from reuse_unused_kprobe() Since reuse_unused_kprobe() is called when the given kprobe is unused, checking it inside again with BUG_ON() is pointless. Remove it. Signed-off-by: Masami Hiramatsu Cc: Anil S Keshavamurthy Cc: David S . Miller Cc: Linus Torvalds Cc: Naveen N . Rao Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/153666121154.21306.17540752948574483565.stgit@devbox Signed-off-by: Ingo Molnar commit c72e6742f62d7bb82a77a41ca53940cb8f73e60f Author: Masami Hiramatsu Date: Tue Sep 11 19:19:43 2018 +0900 kprobes: Remove pointless BUG_ON() from add_new_kprobe() Before calling add_new_kprobe(), aggr_probe's GONE flag and kprobe GONE flag are cleared. We don't need to worry about that flag at this point. Signed-off-by: Masami Hiramatsu Cc: Anil S Keshavamurthy Cc: David S . Miller Cc: Linus Torvalds Cc: Naveen N . Rao Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/153666118298.21306.4915366706875652652.stgit@devbox Signed-off-by: Ingo Molnar commit d0555fc78fdba5646a460e83bd2d8249c539bb89 Author: Masami Hiramatsu Date: Tue Sep 11 19:19:14 2018 +0900 kprobes: Remove pointless BUG_ON() from disarming process All aggr_probes at this line are already disarmed by disable_kprobe() or checked by kprobe_disarmed(). So this BUG_ON() is pointless, remove it. Signed-off-by: Masami Hiramatsu Cc: Anil S Keshavamurthy Cc: David S . Miller Cc: Linus Torvalds Cc: Naveen N . Rao Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/153666115463.21306.8799008438116029806.stgit@devbox Signed-off-by: Ingo Molnar commit f973b76888aa897f799153ba1b3026a8dcc2d221 Author: Dan Carpenter Date: Sat Sep 8 11:39:25 2018 +0300 net: dsa: b53: Uninitialized variable in b53_adjust_link() The "pause" variable is only initialized on BCM5301x. Fixes: 5e004460f874 ("net: dsa: b53: Add helper to set link parameters") Signed-off-by: Dan Carpenter Signed-off-by: David S. Miller commit 94e989dee2b730e8e3c3d5b71ce54f93dce7b62e Author: Colin Ian King Date: Mon Sep 10 10:11:07 2018 +0100 scsi: message: fusion: fix a few trivial spelling mistakes Trival fix to spelling mistakes: PrimativeSeqErrCount -> PrimitiveSeqErrCount Primative -> Primitive primative -> primitive mptsas_broadcast_primative_work -> mptsas_broadcast_primitive_work Broadcase -> Broadcast Signed-off-by: Colin Ian King Signed-off-by: Martin K. Petersen commit b5dedc756d5eca2c1739545edf40049231be09a4 Author: Deepak Ukey Date: Tue Sep 11 14:18:05 2018 +0530 scsi: pm80xx: Update driver version to 0.1.39 Updated the driver version from 0.1.38 to 0.1.39. Signed-off-by: Deepak Ukey Signed-off-by: Viswas G Acked-by: Jack Wang Signed-off-by: Martin K. Petersen commit 72349b62a571effd6faadd0600b8e657dd87afbf Author: Deepak Ukey Date: Tue Sep 11 14:18:04 2018 +0530 scsi: pm80xx: Fixed system hang issue during kexec boot When the firmware is not responding, execution of kexec boot causes a system hang. When firmware assertion happened, driver get notified with interrupt vector updated in MPI configuration table. Then, the driver will read scratchpad register and set controller_fatal_error flag to true. Signed-off-by: Deepak Ukey Signed-off-by: Viswas G Acked-by: Jack Wang Signed-off-by: Martin K. Petersen commit 76cb25b058034d37244be6aca97a2ad52a5fbcad Author: Deepak Ukey Date: Tue Sep 11 14:18:03 2018 +0530 scsi: pm80xx: Corrected dma_unmap_sg() parameter For the function dma_unmap_sg(), the parameter should be number of elements in the scatter list prior to the mapping, not after the mapping. Signed-off-by: Deepak Ukey Signed-off-by: Viswas G Acked-by: Jack Wang Signed-off-by: Martin K. Petersen commit 742fdc0f2270ec2988518f9d7d629c4415048178 Author: Alex Gonzalez Date: Mon Sep 10 11:37:52 2018 +0200 ARM: dts: imx6ul: Add DTS for ConnectCore 6UL SBC Pro The ConnectCore 6UL Single Board Computer (SBC) Pro contains the ConnectCore 6UL System-On-Module. Its hardware specifications are: * 256MB DDR3 memory * On module 256MB NAND flash * Dual 10/100 Ethernet * USB Host and USB OTG * Parallel RGB display header * LVDS display header * CSI camera * GPIO header * I2C, SPI, CAN headers * PCIe mini card and micro SIM slot * MicroSD external storage * On board 4GB eMMC flash * Audio headphone, line in/out, microphone lines Signed-off-by: Alex Gonzalez Signed-off-by: Shawn Guo commit cd135754d837bc4b15a9211d30bfc23f2247afb9 Author: Deepak Ukey Date: Tue Sep 11 14:18:02 2018 +0530 scsi: pm80xx: Fix for phy enable/disable functionality Added proper mask for phy id in mpi_phy_stop_resp(). Signed-off-by: Deepak Ukey Signed-off-by: Viswas G Acked-by: Jack Wang Signed-off-by: Martin K. Petersen commit 8148d2136002da2e2887caf6a07bbd9c033f14f3 Author: Oleksij Rempel Date: Thu Aug 2 12:34:21 2018 +0200 ARM: imx6: register pm_power_off handler if "fsl,pmic-stby-poweroff" is set One of the Freescale recommended sequences for power off with external PMIC is the following: ... 3. SoC is programming PMIC for power off when standby is asserted. 4. In CCM STOP mode, Standby is asserted, PMIC gates SoC supplies. See: http://www.nxp.com/assets/documents/data/en/reference-manuals/IMX6DQRM.pdf page 5083 This patch implements step 4. of this sequence. Signed-off-by: Oleksij Rempel Signed-off-by: Shawn Guo commit 0b1b1d88614fcd90c65d27dbd14490dcbf2c9b5f Author: Colin Ian King Date: Sun Sep 9 23:25:03 2018 +0100 scsi: qla2xxx: fix typo "CT-PASSTRHU" -> "CT-PASSTHRU" Trivial fix to typo in debug message text. Signed-off-by: Colin Ian King Acked-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit aed922fa73b194b335fa0fc60275a8e68b6adbc0 Author: Colin Ian King Date: Tue Sep 4 15:36:56 2018 +0100 scsi: aic7xxx: remove unused redundant variable num_chip_names Variable num_chip_names is defined but not used, hence it is redundant and can be removed. Cleans up clang warning: 'num_chip_names' defined but not used [-Wunused-const-variable=] Signed-off-by: Colin Ian King Signed-off-by: Martin K. Petersen commit 50de5bb6fc06a12f08dc31094ea19535cc8079f1 Author: Oleksij Rempel Date: Thu Aug 2 12:34:25 2018 +0200 ARM: dts: imx6: RIoTboard provide standby on power off option This board, as well as some other boards with i.MX6 and a PMIC, uses a "PMIC_STBY_REQ" line to notify the PMIC about a state change. The PMIC is programmed for a specific state change before triggering the line. In this case, PMIC_STBY_REQ can be used for stand by, sleep and power off modes. Signed-off-by: Oleksij Rempel Signed-off-by: Shawn Guo commit af04a9cd9adb894da5dd41329f50b63f162fa083 Author: Oleksij Rempel Date: Thu Aug 2 12:34:20 2018 +0200 dt-bindings: imx6q-clock: add new fsl,pmic-stby-poweroff property Signed-off-by: Oleksij Rempel Acked-by: Rob Herring Signed-off-by: Shawn Guo commit 5b075efb42bab1e6e6887df275cb2dfe730ab291 Author: YueHaibing Date: Tue Sep 4 03:31:07 2018 +0000 scsi: libfc: remove set but not used variable 'rpriv' Fixes gcc '-Wunused-but-set-variable' warning: drivers/scsi/libfc/fc_fcp.c: In function 'fc_queuecommand': drivers/scsi/libfc/fc_fcp.c:1875:30: warning: variable 'rpriv' set but not used [-Wunused-but-set-variable] Signed-off-by: YueHaibing Acked-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen commit 948dff7a41c517074b900338645136af5dc4aeda Author: Geert Uytterhoeven Date: Mon Sep 3 19:35:29 2018 +0200 scsi: arcmsr: Spelling s/rebulid/rebuild/ Signed-off-by: Geert Uytterhoeven Signed-off-by: Martin K. Petersen commit 288315e95264b6355e26609e9dec5dc4563d4ab0 Author: George Kennedy Date: Wed Aug 29 11:38:16 2018 -0400 scsi: sym53c8xx: fix NULL pointer dereference panic in sym_int_sir() sym_int_sir() in sym_hipd.c does not check the command pointer for NULL before using it in debug message prints. Suggested-by: Matthew Wilcox Signed-off-by: George Kennedy Reviewed-by: Mark Kanda Acked-by: Matthew Wilcox Signed-off-by: Martin K. Petersen commit 6318cb7fb0e5f0b9644b6848701c885fcca747ee Author: James Smart Date: Mon Sep 10 10:30:51 2018 -0700 scsi: lpfc: update driver version to 12.0.0.7 Update the driver version to 12.0.0.7 Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit d2cc9bcd7fa30b6c2270c044ff6dc9e839bf779e Author: James Smart Date: Mon Sep 10 10:30:50 2018 -0700 scsi: lpfc: add support to retrieve firmware logs This patch adds the ability to read firmware logs from the adapter. The driver registers a buffer with the adapter that is then written to by the adapter. The adapter posts CQEs to indicate content updates in the buffer. While the adapter is writing to the buffer in a circular fashion, an application will poll the driver to read the next amount of log data from the buffer. Driver log buffer size is configurable via the ras_fwlog_buffsize sysfs attribute. Verbosity to be used by firmware when logging to host memory is controlled through the ras_fwlog_level attribute. The ras_fwlog_func attribute enables or disables loggy by firmware. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 18027a8ccca5b9189f49be0d8b84dbc717084a26 Author: James Smart Date: Mon Sep 10 10:30:49 2018 -0700 scsi: lpfc: reduce locking when updating statistics Currently, on each io completion, the stats update routine indiscriminately holds a lock. While holding the adapter-wide lock, checks are made to check whether status are being tracked. When disabled (the default), the locking wasted a lot of cycles. Check for stats enablement before taking the lock. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 2879265f514b1f4154288243c91438ddbedb3ed4 Author: James Smart Date: Mon Sep 10 10:30:48 2018 -0700 scsi: lpfc: Fix errors in log messages. Message 6408 is displayed for each entry in an array, but the cpu and queue numbers were incorrect for the entry. Message 6001 includes an extraneous character. Resolve both issues Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit aad59d5d34738d6fd8c359df8048a84cd443e504 Author: James Smart Date: Mon Sep 10 10:30:47 2018 -0700 scsi: lpfc: Correct invalid EQ doorbell write on if_type=6 During attachment, the driver writes the EQ doorbell to disable potential interrupts from an EQ. The current EQ doorbell format used for clearing the interrupt is incorrect and uses an if_type=2 format, making the operation act on the wrong EQ. Correct the code to use the proper if_type=6 EQ doorbell format. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 523128e53b1e82a7eb422168eddd0c566973520d Author: James Smart Date: Mon Sep 10 10:30:46 2018 -0700 scsi: lpfc: Correct irq handling via locks when taking adapter offline When taking the board offline while performing i/o, unsafe locking errors occurred and irq level isn't properly managed. In lpfc_sli_hba_down, spin_lock_irqsave(&phba->hbalock, flags) does not disable softirqs raised from timer expiry. It is possible that a softirq is raised from the lpfc_els_retry_delay routine and recursively requests the same phba->hbalock spinlock causing deadlock. Address the deadlocks by creating a new port_list lock. The softirq behavior can then be managed a level deeper into the calling sequences. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 0ef01a2d95fd62bb4f536e7ce4d5e8e74b97a244 Author: James Smart Date: Mon Sep 10 10:30:45 2018 -0700 scsi: lpfc: Correct soft lockup when running mds diagnostics When running an mds diagnostic that passes frames with the switch, soft lockups are detected. The driver is in a CQE processing loop and has sufficient amount of traffic that it never exits the ring processing routine, thus the "lockup". Cap the number of elements in the work processing routine to 64 elements. This ensures that the cpu will be given up and the handler reschedule to process additional items. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit ca7fb76e091f889cfda1287c07a9358f73832b39 Author: James Smart Date: Mon Sep 10 10:30:44 2018 -0700 scsi: lpfc: Correct race with abort on completion path On io completion, the driver is taking an adapter wide lock and nulling the scsi command back pointer. The nulling of the back pointer is to signify the io was completed and the scsi_done() routine was called. However, the routine makes no check to see if the abort routine had done the same thing and possibly nulled the pointer. Thus it may doubly-complete the io. Make the following mods: - Check to make sure forward progress (call scsi_done()) only happens if the command pointer was non-null. - As the taking of the lock, which is adapter wide, is very costly on a system under load, null the pointer using an xchg operation rather than under lock. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit faf0a5f829eb2860a9b1301ea86e124299c062cf Author: James Smart Date: Mon Sep 10 10:30:43 2018 -0700 scsi: lpfc: Raise nvme defaults to support a larger io and more connectivity When nvme is enabled, change the default for two parameters: sg_seg_cnt - raise the per-io sg list size so that 1MB ios are supported (based on a 4k buffer per element). iocb_cnt - raise the number of buffers used for things like NVME LS request/responses to allow more concurrent requests to for larger nvme configs. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 5b9e70b22cc5927e29871492d801155373682b55 Author: James Smart Date: Mon Sep 10 10:30:42 2018 -0700 scsi: lpfc: raise sg count for nvme to use available sg resources The driver allocates a sg list per io struture based on a fixed maximum size. When it registers with the protocol transports and indicates the max sg list size it supports, the driver manipulates the fixed value to report a lesser amount so that it has reserved space for sg elements that are used for DIF. The driver initialization path sets the cfg_sg_seg_cnt field to the manipulated value for scsi. NVME initialization ran afterward and capped it's maximum by the manipulated value for SCSI. This erroneously made NVME report the SCSI-reduce-for-DIF value that reduced the max io size for nvme and wasted sg elements. Rework the driver so that cfg_sg_seg_cnt becomes the overall maximum size and allow the max size to be tunable. A separate (new) scsi sg count is then setup with the scsi-modified reduced value. NVME then initializes based off the overall maximum. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 01a8aed6a009625282b6265880f6b20cbd7a9c70 Author: James Smart Date: Mon Sep 10 10:30:41 2018 -0700 scsi: lpfc: Fix GFT_ID and PRLI logic for RSCN Driver only sends NVME PRLI to a device that also supports FCP. This resuls in remote ports that don't have fc_remote_ports created for them. The driver is clearing the nlp_fc4_type for a ndlp at the wrong time. Fix by moving the nlp_fc4_type clearing to the discovery engine in the DEVICE_RECOVERY state. Also ensure that rport registration is done for all nlp_fc4_types. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit a64a290ec6d78ffe7541ebc044ee69e328bfe259 Author: Himanshu Madhani Date: Tue Sep 11 10:18:27 2018 -0700 scsi: qla2xxx: Update driver version to 10.00.00.11-k Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit a110af851a82fb7f35d75755101b36a0517a6d29 Author: Quinn Tran Date: Tue Sep 11 10:18:26 2018 -0700 scsi: qla2xxx: Fix double increment of switch scan retry count This patch fixes issue when switch command fails, current code increments retry count twice. This results in a smaller number of retries. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit f3a03ee1102a44ccbd2c5de80a6e862ba23e9b55 Author: Quinn Tran Date: Tue Sep 11 10:18:25 2018 -0700 scsi: qla2xxx: Fix duplicate switch's Nport ID entries Current code relies on switch to provide a unique combination of WWPN + NPORTID to tract an FC port. This patch tries to detect a case where switch data base can get corrupted where multiple WWPNs can have the same Nport ID. The 1st Nport ID on the list will be kept while the duplicate Nport ID will be discarded. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit 7c388f91ec1a59b0ed815b07b90536e2d57e1e1f Author: Quinn Tran Date: Tue Sep 11 10:18:24 2018 -0700 scsi: qla2xxx: Remove stale debug trace message from tcm_qla2xxx Remove stale debug trace. Fixes: 1eb42f965ced ("qla2xxx: Make trace flags more readable") Cc: stable@vger.kernel.org #4.10 Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit d594db018792f3f6990455cbf33d31dd3c707b38 Author: Quinn Tran Date: Tue Sep 11 10:18:23 2018 -0700 scsi: qla2xxx: Fix premature command free When qla2xxx and Target Core gets out of sync during command cleanup, qla2xxx will not free command until it is out of firmware's hand and Target Core has called the release on the command. This patch adds synchronization using cmd_lock and release flag. If the release flag is set, then qla2xxx will free up the command using qlt_free_cmd() otherwise transport_generic_free_cmd() will be responsible for relase of the command. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit 56d942de59ebfa2e970a6cd33299d1984710b6c0 Author: Quinn Tran Date: Tue Sep 11 10:18:22 2018 -0700 scsi: qla2xxx: Reject bsg request if chip is down. Reject bsg request if chip is down. This prevent erroneous timeout. Fixes: d051a5aa1c23 ("[SCSI] qla2xxx: Add an "is reset active" helper.") Cc: stable@vger.kernel.org # 4.10 Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit 1e4ac5d6fe0a4af17e4b6251b884485832bf75a3 Author: Quinn Tran Date: Tue Sep 11 10:18:21 2018 -0700 scsi: qla2xxx: shutdown chip if reset fail If chip unable to fully initialize, use full shutdown sequence to clear out any stale FW state. Fixes: e315cd28b9ef ("[SCSI] qla2xxx: Code changes for qla data structure refactoring") Cc: stable@vger.kernel.org #4.10 Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit 861d483dcd1822b360ed186801c889a7da83e80d Author: Quinn Tran Date: Tue Sep 11 10:18:20 2018 -0700 scsi: qla2xxx: Fix stuck session in PLOGI state On PLOGI complete + RSCN received, driver tries to handle RSCN but failed to reset the session back to the beginning to restart the login process. Instead the session was left in the Plogi complete without moving forward. This patch will push the session state back to the delete state and restart the connection. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit 8235f4b5aeba868739f6e12a51ad92689e3f78ef Author: Quinn Tran Date: Tue Sep 11 10:18:19 2018 -0700 scsi: qla2xxx: Fix early srb free on abort Task abort can take 2 paths: 1) serial/synchronous abort where the calling thread will put to sleep, wait for completion and free cmd resource. 2) async abort where the cmd free will be free by the completion thread. For path 2, driver is freeing the SRB too early. Fixes: f6145e86d21f ("scsi: qla2xxx: Fix race between switch cmd completion and timeout") Cc: stable@vger.kernel.org # 4.19 Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit 0645cb8350cdb60bfbf91caa722984b81c215add Author: Quinn Tran Date: Tue Sep 11 10:18:18 2018 -0700 scsi: qla2xxx: Add mode control for each physical port Add ability to allow each physical port to control operating mode. Current code forces all ports to behave in one mode (i.e. initiator, target or dual). This patch allows user to select the operating mode for each port. - Driver must be loaded in dual mode to allow resource allocation modprobe qla2xxx qlini_mode=dual - In addition user can make adjustment to exchange resources using following command echo 1024 > /sys/class/scsi_host/host/ql2xiniexchg echo 1024 > /sys/class/scsi_host/host/ql2xexchoffld - trigger mode change and new setting of ql2xexchoffld|ql2xiniexchg echo [] > /sys/class/scsi_host/host/qlini_mode where, value can be one of following - enabled - disabled - dual - exclusive Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit 0e324e949ecd42f2700004469d22c1733a7abbd8 Author: Quinn Tran Date: Tue Sep 11 10:18:17 2018 -0700 scsi: qla2xxx: Fix race condition for resource cleanup For Loop topology + Initiator, FW is in control of PLOGI/PRLI. When link is reset, driver will try to cleanup the session by doing an Implicit Logout. Instead, the code is doing an Explicit Logout. The explicit logout interferes with FW state machine in trying to reconnect. The implicit logout was meant for FW to flush commands. In loop, it is not needed because FW will auto flush. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit 527b8ae3948bb59c13ebaa7d657ced56ea25ab05 Author: Quinn Tran Date: Tue Sep 11 10:18:16 2018 -0700 scsi: qla2xxx: Fix dropped srb resource. When FW rejects a command due to "entry_status" error (malform IOCB), the srb resource needs to be returned back for cleanup. The filter to catch this is in the wrong location. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit 5d74c87a20adcc77b19753c315ad9c320b2288be Author: Quinn Tran Date: Tue Sep 11 10:18:15 2018 -0700 scsi: qla2xxx: Fix port speed display on chip reset Clear port speed value on chip reset. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit f99c5d294b3653e6ae563eaac5db5b4138afe31c Author: Sawan Chandak Date: Tue Sep 11 10:18:14 2018 -0700 scsi: qla2xxx: Check for Register disconnect During adapter shutdown process check for register disconnect before proceeding to call PCI functions. Signed-off-by: Sawan Chandak Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit 8bccfe0d21b5adbba6ec4fe1776160b80d09f78a Author: Quinn Tran Date: Tue Sep 11 10:18:13 2018 -0700 scsi: qla2xxx: Increase abort timeout value Abort IOCB request can take up to 40s or 2 ABTS timeout. We will wait for ABTS response for 20s. On a timeout, second ABTS can go out with another 20s timeout. On 2nd ABTS timeout FW will automatically do Logout. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit 4072e1dcd8fc461bc9f11c119af07f9dd6b5beb9 Author: Darren Trapp Date: Tue Sep 11 10:18:12 2018 -0700 scsi: qla2xxx: Allow FC-NVMe underrun to be handled by transport This patch allows FC-NVMe under-run to be handled by transport Signed-off-by: Darren Trapp Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit 950c6ab7b540c28c2482506bb5491dac0738d2ec Author: Himanshu Madhani Date: Tue Sep 4 14:19:21 2018 -0700 scsi: qla2xxx: Update driver version to 10.00.00.10-k Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit 585def9b2f47d35aab6cf116d63ec6c70e929e51 Author: Quinn Tran Date: Tue Sep 4 14:19:20 2018 -0700 scsi: qla2xxx: Move ABTS code behind qpair Current abort code defaults to legacy single queue where hardware_lock is used to protect command search. This patch moves this code behind the QPair where the qp_lock_ptr will reference the appropriate lock for either legacy/single queue or MQ. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit 5512e523325a889f5f589eefc9d44fc65cbbd83e Author: Himanshu Madhani Date: Tue Sep 4 14:19:19 2018 -0700 scsi: qla2xxx: Remove stale ADISC_DONE event Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit aecf043443d38bded9f57b272d97b2aea4cee616 Author: Quinn Tran Date: Tue Sep 4 14:19:18 2018 -0700 scsi: qla2xxx: Fix Remote port registration Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit d4f7a16aeca6f9f07343a39b341bf7a2fe452f30 Author: Himanshu Madhani Date: Tue Sep 4 14:19:17 2018 -0700 scsi: qla2xxx: Remove ASYNC GIDPN switch command Using GPNFT/GNNFT command will be able to cover switch database with less number of scans. This patch removes Get NportID with provided WWPN/GIDPN switch command. By making this change, in large fabric with lots of remote port or NPIV ports with noisy SAN, the number of GIDPN commands issued by a port when it detects large number of remote ports going away or coming back, can overwhelmn the switch and it can becomde unresponsive. In a case where the fabric has not change, GIDPN is not required. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit 0aca77843e2803bf4fab1598b7891c56c16be979 Author: Quinn Tran Date: Tue Sep 4 14:19:16 2018 -0700 scsi: qla2xxx: Reduce holding sess_lock to prevent CPU lock-up - Reduce sess_lock holding to prevent CPU Lock up. sess_lock was held across fc_port registration and deletion. These calls can be blocked by upper layer. Sess_lock is also being accessed by interrupt thread. - Reduce number of loops in processing work_list to prevent kernel complaint of CPU lockup or holding sess_lock. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit 6a6294689201e6c0c4a78fb800b5c248fc887de6 Author: Quinn Tran Date: Tue Sep 4 14:19:15 2018 -0700 scsi: qla2xxx: Move {get|rel}_sp to base_qpair struct Currently, qla2x00_[get_sp|rel_sp] routines does {get|release} of srb resource/srb_mempool directly from qla_hw_data. qla2x00_start_sp() is used to issue management commands through the default Request Q 0 & Response Q 0 or base_qpair. This patch moves access of these resources through base_qpair. Instead of having knowledge of specific Q number and lock to rsp/req queue, this change will key off the qpair that is assigned to the srb resource. This lays the ground work for other routines to see this resource through the qpair. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit 8b4673ba3a1b992b757a32667d2d3adae80e11fd Author: Quinn Tran Date: Tue Sep 4 14:19:14 2018 -0700 scsi: qla2xxx: Add support for ZIO6 interrupt threshold Add sysfs support to control zio6 interrupt threshold. Using this sysfs hook user can set when to generate interrupts. This value will be used to tell firmware to generate interrupt at a certain interval. If the number of exchanges/commands fall below defined setting, then the interrupt will be generated immediately by the firmware. By default ZIO6 will coalesce interrupts to a specified interval regardless of low traffic or high traffic. [mkp: fixed several typos] Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit 6b0431d6fa20bd1b600a1e6df76bf7425fe178b5 Author: Quinn Tran Date: Tue Sep 4 14:19:13 2018 -0700 scsi: qla2xxx: Fix out of order Termination and ABTS response Following changes are added by this patch - Prevent ABTS Response from getting in front of Termination of exchange. Firmware requires driver to cleanup exchanges before ABTS response can be sent. This reduces ABTS response error which triggers extra command re-termination and re-sending of ABTS response. - Add bits in driver and tracks CTIO/ATIO attribute bits for proper command Termination. A copy of the ATTR bits will be kept in the ABTS task management command as a back up copy, if an ABTS response encounters an error. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit 0691094ff3f2cfa357b9de9030b65eddc4dab29d Author: Quinn Tran Date: Tue Sep 4 14:19:12 2018 -0700 scsi: qla2xxx: Add logic to detect ABTS hang and response completion ABTS error completion can trigger an exchange cleanup from the driver and another ABTS response will be generated. This retry of ABTS response can cause loop between driver trying to send ABTS and firmware returning error. This patch fixes this issue by adding logic to check for unresolved exchanges and clean up before ABTS is retried. This patch also addes the fix to use the same qpair as the ABTS completion for the terminatation of exchange as well as retry of ABTS response. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit 079a3a3b9dff1c56d6a72005a999de915a67930b Author: Quinn Tran Date: Tue Sep 4 14:19:11 2018 -0700 scsi: qla2xxx: Add appropriate debug info for invalid RX_ID When driver detect CTIO_INVALID_RX_ID status for CTIO, print message with correct information to help with debugging. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit 1073daa470d906f1853ed4b828f16e2350a5875c Author: Quinn Tran Date: Tue Sep 4 14:19:10 2018 -0700 scsi: qla2xxx: Fix deadlock between ATIO and HW lock Move ATIO queue processing out of hardware_lock to prevent deadlock. Fixes: 3bb67df5b5f8 ("qla2xxx: Check for online flag instead of active reset when transmitting responses") Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit b6faaaf796d7bfb00e32ca5c905d55cc43e89448 Author: Quinn Tran Date: Tue Sep 4 14:19:09 2018 -0700 scsi: qla2xxx: Serialize mailbox request For driver MBX submission, use mbox_busy to serialize request. For Userspace MBX submission, use optrom mutex to serialize request. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit 8852f5b1d2d498b6554e7e21533c3c4662fe7c2d Author: Himanshu Madhani Date: Fri Aug 31 11:24:39 2018 -0700 scsi: qla2xxx: Update driver to version 10.00.00.09-k Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit aa9e6d7b9643fc50a88c7b7aa1e34be8dc032749 Author: Quinn Tran Date: Fri Aug 31 11:24:38 2018 -0700 scsi: qla2xxx: Terminate Plogi/PRLI if WWN is 0 When driver receive PLOGI/PRLI from FW, the WWPN value will be provided. If it is not, then driver will terminate it. The WWPN allows driver to locate the session or create a new session. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit 93eca6135183f7a71e36acd47655a085ed11bcdc Author: Quinn Tran Date: Fri Aug 31 11:24:37 2018 -0700 scsi: qla2xxx: Defer chip reset until target mode is enabled For target mode, any chip reset triggered before target mode is enabled will be held off until user is ready to enable. This prevents the chip from starting or running before it is intended. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit 8d9bf0a9a268f7ca0b811d6e6a1fc783afa5c746 Author: Quinn Tran Date: Fri Aug 31 11:24:36 2018 -0700 scsi: qla2xxx: Fix iIDMA error When switch responds with error for Get Port Speed Command (GPSC), driver should not proceed with telling FW about the speed of the remote port. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit 9ba1cb25c151de306d64647e545d34af64f30c19 Author: Quinn Tran Date: Fri Aug 31 11:24:35 2018 -0700 scsi: qla2xxx: Remove all rports if fabric scan retry fails When all fabric scan retries fail, remove all RPorts, DMA resources for the command. Otherwise we have stale Rports. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit 2d3fdbebd2df2d55df1e1337790c35f8298295aa Author: Quinn Tran Date: Fri Aug 31 11:24:34 2018 -0700 scsi: qla2xxx: Force fw cleanup on ADISC error Turn ON logout_on_delete flag to make sure firmware resource for fcport is cleaned up on ADISC error. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit e112761a4f1dcbe9fb9f43f46de7be69d6963b0d Author: Quinn Tran Date: Fri Aug 31 11:24:33 2018 -0700 scsi: qla2xxx: Turn off IOCB timeout timer on IOCB completion Turn off IOCB timeout timer on IOCB completion instead of turning it off in a deferred task. This prevent false alarm if the deferred task is stalled out. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit 0754d5e003bccaf30ebb2a75db2017d68696fdd5 Author: Quinn Tran Date: Fri Aug 31 11:24:32 2018 -0700 scsi: qla2xxx: Decrement login retry count for only plogi Decrement login retry count only for plogi instead of number of attempts made for login. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit cd4ed6b470f1569692b5d0d295b207f870570829 Author: Quinn Tran Date: Fri Aug 31 11:24:31 2018 -0700 scsi: qla2xxx: Move rport registration out of internal work_list Currently, the rport registration is being called from a single work element that is used to process QLA internal "work_list". This work_list is meant for quick and simple task (ie no sleep). The Rport registration process sometime can be delayed by upper layer. This causes back pressure with the internal queue where other jobs are unable to move forward. This patch will schedule the registration process with a new work element (fc_port.reg_work). While the RPort is being registered, the current state of the fcport will not move forward until the registration is done. If the state of the fabric has changed, a new field/next_disc_state will record the next action on whether to 'DELETE' or 'Reverify the session/ADISC'. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit 050e0ced35911c06d58dd56cfcb54815ec308dbc Author: Quinn Tran Date: Fri Aug 31 11:24:30 2018 -0700 scsi: qla2xxx: Remove redundant check for fcport deletion Remove redundant check for fcport is deleted or being delete. The same check is already in the deletion routine. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit cb873ba4002095d1e2fc60521bc4d860c7b72b92 Author: Quinn Tran Date: Fri Aug 31 11:24:29 2018 -0700 scsi: qla2xxx: Update rscn_rcvd field to more meaningful scan_needed Rename rscn_rcvd field to scan_needed to be more meaningful. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit 49cecca7dd49e2950ed6d973acfa84e7c8c7a480 Author: Quinn Tran Date: Fri Aug 31 11:24:28 2018 -0700 scsi: qla2xxx: Use correct qpair for ABTS/CMD On Abort of initiator scsi command, the abort needs to follow the same qpair as the the scsi command to prevent out of order processing. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit 4c1458df9635c7e3ced155f594d2e7dfd7254e21 Author: Himanshu Madhani Date: Fri Aug 31 11:24:27 2018 -0700 scsi: qla2xxx: Fix incorrect port speed being set for FC adapters Fixes: 6246b8a1d26c7c ("[SCSI] qla2xxx: Enhancements to support ISP83xx.") Fixes: 1bb395485160d2 ("qla2xxx: Correct iiDMA-update calling conventions.") Cc: Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit b86ac8fd4b2f6ec2f9ca9194c56eac12d620096f Author: Quinn Tran Date: Fri Aug 31 11:24:26 2018 -0700 scsi: qla2xxx: Fix process response queue for ISP26XX and above This patch improves performance for 16G and above adapter by removing additional call to process_response_queue(). [mkp: typo] Cc: Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit c8e927579e00a182eda07e4c45df9c8c699c8ded Author: Wang Shilong Date: Tue Sep 11 08:54:21 2018 +0900 f2fs: fix setattr project check upon fssetxattr ioctl Currently, project quota could be changed by fssetxattr ioctl, and existed permission check inode_owner_or_capable() is obviously not enough, just think that common users could change project id of file, that could make users to break project quota easily. This patch try to follow same regular of xfs project quota: "Project Quota ID state is only allowed to change from within the init namespace. Enforce that restriction only if we are trying to change the quota ID state. Everything else is allowed in user namespaces." Besides that, check and set project id'state should be an atomic operation, protect whole operation with inode lock. Signed-off-by: Wang Shilong Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit b430f7263673eab1dc40e662ae3441a9619d16b8 Author: Zhikang Zhang Date: Mon Sep 10 16:18:25 2018 +0800 f2fs: avoid sleeping under spin_lock In the call trace below, we might sleep in function dput(). So in order to avoid sleeping under spin_lock, we remove f2fs_mark_inode_dirty_sync from __try_update_largest_extent && __drop_largest_extent. BUG: sleeping function called from invalid context at fs/dcache.c:796 Call trace: dump_backtrace+0x0/0x3f4 show_stack+0x24/0x30 dump_stack+0xe0/0x138 ___might_sleep+0x2a8/0x2c8 __might_sleep+0x78/0x10c dput+0x7c/0x750 block_dump___mark_inode_dirty+0x120/0x17c __mark_inode_dirty+0x344/0x11f0 f2fs_mark_inode_dirty_sync+0x40/0x50 __insert_extent_tree+0x2e0/0x2f4 f2fs_update_extent_tree_range+0xcf4/0xde8 f2fs_update_extent_cache+0x114/0x12c f2fs_update_data_blkaddr+0x40/0x50 write_data_page+0x150/0x314 do_write_data_page+0x648/0x2318 __write_data_page+0xdb4/0x1640 f2fs_write_cache_pages+0x768/0xafc __f2fs_write_data_pages+0x590/0x1218 f2fs_write_data_pages+0x64/0x74 do_writepages+0x74/0xe4 __writeback_single_inode+0xdc/0x15f0 writeback_sb_inodes+0x574/0xc98 __writeback_inodes_wb+0x190/0x204 wb_writeback+0x730/0xf14 wb_check_old_data_flush+0x1bc/0x1c8 wb_workfn+0x554/0xf74 process_one_work+0x440/0x118c worker_thread+0xac/0x974 kthread+0x1a0/0x1c8 ret_from_fork+0x10/0x1c Signed-off-by: Zhikang Zhang Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit e1293bdfa01dbde03d9ac15b7ceea71ba10b89c3 Author: Chao Yu Date: Fri Sep 7 19:49:07 2018 +0800 f2fs: plug readahead IO in readdir() Add a plug to merge readahead IO in readdir(), expecting it can reduce bio count before submitting to block layer. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 042be0f849e5fc24116d0afecfaf926eed5cac63 Author: Chao Yu Date: Thu Sep 6 20:34:12 2018 +0800 f2fs: fix to do sanity check with current segment number https://bugzilla.kernel.org/show_bug.cgi?id=200219 Reproduction way: - mount image - run poc code - umount image F2FS-fs (loop1): Bitmap was wrongly set, blk:15364 ------------[ cut here ]------------ kernel BUG at /home/yuchao/git/devf2fs/segment.c:2061! invalid opcode: 0000 [#1] PREEMPT SMP CPU: 2 PID: 17686 Comm: umount Tainted: G W O 4.18.0-rc2+ #39 Hardware name: innotek GmbH VirtualBox/VirtualBox, BIOS VirtualBox 12/01/2006 EIP: update_sit_entry+0x459/0x4e0 [f2fs] Code: e8 1c b5 fd ff 0f 0b 0f 0b 8b 45 e4 c7 44 24 08 9c 7a 6c f8 c7 44 24 04 bc 4a 6c f8 89 44 24 0c 8b 06 89 04 24 e8 f7 b4 fd ff <0f> 0b 8b 45 e4 0f b6 d2 89 54 24 10 c7 44 24 08 60 7a 6c f8 c7 44 EAX: 00000032 EBX: 000000f8 ECX: 00000002 EDX: 00000001 ESI: d7177000 EDI: f520fe68 EBP: d6477c6c ESP: d6477c34 DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068 EFLAGS: 00010282 CR0: 80050033 CR2: b7fbe000 CR3: 2a99b3c0 CR4: 000406f0 Call Trace: f2fs_allocate_data_block+0x124/0x580 [f2fs] do_write_page+0x78/0x150 [f2fs] f2fs_do_write_node_page+0x25/0xa0 [f2fs] __write_node_page+0x2bf/0x550 [f2fs] f2fs_sync_node_pages+0x60e/0x6d0 [f2fs] ? sync_inode_metadata+0x2f/0x40 ? f2fs_write_checkpoint+0x28f/0x7d0 [f2fs] ? up_write+0x1e/0x80 f2fs_write_checkpoint+0x2a9/0x7d0 [f2fs] ? mark_held_locks+0x5d/0x80 ? _raw_spin_unlock_irq+0x27/0x50 kill_f2fs_super+0x68/0x90 [f2fs] deactivate_locked_super+0x3d/0x70 deactivate_super+0x40/0x60 cleanup_mnt+0x39/0x70 __cleanup_mnt+0x10/0x20 task_work_run+0x81/0xa0 exit_to_usermode_loop+0x59/0xa7 do_fast_syscall_32+0x1f5/0x22c entry_SYSENTER_32+0x53/0x86 EIP: 0xb7f95c51 Code: c1 1e f7 ff ff 89 e5 8b 55 08 85 d2 8b 81 64 cd ff ff 74 02 89 02 5d c3 8b 0c 24 c3 8b 1c 24 c3 90 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 8d 76 00 58 b8 77 00 00 00 cd 80 90 8d 76 EAX: 00000000 EBX: 0871ab90 ECX: bfb2cd00 EDX: 00000000 ESI: 00000000 EDI: 0871ab90 EBP: 0871ab90 ESP: bfb2cd7c DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 007b EFLAGS: 00000246 Modules linked in: f2fs(O) crc32_generic bnep rfcomm bluetooth ecdh_generic snd_intel8x0 snd_ac97_codec ac97_bus snd_pcm snd_seq_midi snd_seq_midi_event snd_rawmidi snd_seq pcbc joydev aesni_intel snd_seq_device aes_i586 snd_timer crypto_simd snd cryptd soundcore mac_hid serio_raw video i2c_piix4 parport_pc ppdev lp parport hid_generic psmouse usbhid hid e1000 [last unloaded: f2fs] ---[ end trace d423f83982cfcdc5 ]--- The reason is, different log headers using the same segment, once one log's next block address is used by another log, it will cause panic as above. Main area: 24 segs, 24 secs 24 zones - COLD data: 0, 0, 0 - WARM data: 1, 1, 1 - HOT data: 20, 20, 20 - Dir dnode: 22, 22, 22 - File dnode: 22, 22, 22 - Indir nodes: 21, 21, 21 So this patch adds sanity check to detect such condition to avoid this issue. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 4a70e255449c9a13eed7a6eeecc85a1ea63cef76 Author: Chao Yu Date: Wed Sep 5 14:54:02 2018 +0800 f2fs: fix memory leak of percpu counter in fill_super() In fill_super -> init_percpu_info, we should destroy percpu counter in error path, otherwise memory allcoated for percpu counter will leak. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 0b2103e886e6de9802e1170e57c573443286a483 Author: Chao Yu Date: Wed Sep 5 14:54:01 2018 +0800 f2fs: fix memory leak of write_io in fill_super() It needs to release memory allocated for sbi->write_io in error path, otherwise, it will cause memory leak. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 77021f8bab02d8099c7ae4360aa6746b3b733ba7 Author: Al Viro Date: Tue Sep 11 16:02:34 2018 -0400 presence of RS485 ioctls has been unconditional since 2014 Signed-off-by: Al Viro commit ce42c1768152277658d48196f144aa406a4ea52a Author: Nathan Chancellor Date: Tue Sep 11 14:43:38 2018 -0700 pata_atiixp: Remove unnecessary parentheses Clang warns when more than one set of parentheses is used for a single conditional statement: drivers/ata/pata_atiixp.c:282:19: warning: equality comparison with extraneous parentheses [-Wparentheses-equality] if((pdev->device == PCI_DEVICE_ID_ATI_IXP600_IDE)) ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/ata/pata_atiixp.c:282:19: note: remove extraneous parentheses around the comparison to silence this warning if((pdev->device == PCI_DEVICE_ID_ATI_IXP600_IDE)) ~ ^ ~ drivers/ata/pata_atiixp.c:282:19: note: use '=' to turn this equality comparison into an assignment if((pdev->device == PCI_DEVICE_ID_ATI_IXP600_IDE)) ^~ = 1 warning generated. Reported-by: Nick Desaulniers Reviewed-by: Nick Desaulniers Signed-off-by: Nathan Chancellor Signed-off-by: Jens Axboe commit 798ef9e70110d0245797526c930beec7fded7b15 Author: Nathan Chancellor Date: Tue Sep 11 14:50:40 2018 -0700 rsxx: Remove unnecessary parentheses Clang warns when more than one set of parentheses is used for a single conditional statement: drivers/block/rsxx/cregs.c:279:15: warning: equality comparison with extraneous parentheses [-Wparentheses-equality] if ((cmd->op == CREG_OP_READ)) { ~~~~~~~~^~~~~~~~~~~~~~~ drivers/block/rsxx/cregs.c:279:15: note: remove extraneous parentheses around the comparison to silence this warning if ((cmd->op == CREG_OP_READ)) { ~ ^ ~ drivers/block/rsxx/cregs.c:279:15: note: use '=' to turn this equality comparison into an assignment if ((cmd->op == CREG_OP_READ)) { ^~ = 1 warning generated. Reported-by: Nick Desaulniers Reviewed-by: Nick Desaulniers Signed-off-by: Nathan Chancellor Signed-off-by: Jens Axboe commit 1edb6e035eb72a17462ba275fe2db36c37a62909 Author: Anders Roxell Date: Fri Sep 7 14:50:05 2018 +0200 net/core/filter: fix unused-variable warning Building with CONFIG_INET=n will show the warning below: net/core/filter.c: In function ‘____bpf_getsockopt’: net/core/filter.c:4048:19: warning: unused variable ‘tp’ [-Wunused-variable] struct tcp_sock *tp; ^~ net/core/filter.c:4046:31: warning: unused variable ‘icsk’ [-Wunused-variable] struct inet_connection_sock *icsk; ^~~~ Move the variable declarations inside the {} block where they are used. Fixes: 1e215300f138 ("bpf: add TCP_SAVE_SYN/TCP_SAVED_SYN options for bpf_(set|get)sockopt") Signed-off-by: Anders Roxell Signed-off-by: Alexei Starovoitov commit d8de8260a45aae8f74af77eae9a162bdc0ed48d2 Author: Andrey Grodzovsky Date: Mon Sep 10 18:43:58 2018 -0400 drm/amdgpu: Fix SDMA TO after GPU reset v3 After GPU reset amdgpu_vm_clear_bo triggers VM flush but job->vm_pd_addr is not set causing SDMA TO. v2: Per advise by Christian König avoid flushing VM for jobs where job->vm_pd_addr wasn't explicitly set. v3: Shortcut vm_flush_needed early. Fixes cbd5285 drm/amdgpu: move setting the GART addr into TTM. Signed-off-by: Andrey Grodzovsky Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 1c860a022f65224d6e8af71cc9f1411cb779f666 Author: Christian König Date: Thu Aug 30 15:55:54 2018 +0200 drm/amdgpu: add amdgpu_vm_update_func Add helper to call the update function for both BO and shadow. Signed-off-by: Christian König Reviewed-by: Felix Kuehling Reviewed-by: Junwei Zhang Signed-off-by: Alex Deucher commit ba79fde47b9b3a04932a5385e5530616a77d4536 Author: Christian König Date: Thu Aug 30 15:55:54 2018 +0200 drm/amdgpu: add amdgpu_vm_pt_parent helper Add a function to get the parent of a PD/PT. Signed-off-by: Christian König Reviewed-by: Felix Kuehling Reviewed-by: Junwei Zhang Signed-off-by: Alex Deucher commit 7893499e3022542f6522847837487019ea83f142 Author: Christian König Date: Mon Sep 10 15:52:55 2018 +0200 drm/amdgpu: fix error handling in amdgpu_cs_user_fence_chunk Slowly leaking memory one page at a time :) Signed-off-by: Christian König Reviewed-by: Andrey Grodzovsky Signed-off-by: Alex Deucher commit 9d0b3c1f1451d1b9a33de3c70ae3d50ccd77db1a Author: Yonghong Song Date: Tue Sep 11 14:09:11 2018 -0700 tools/bpf: fix a netlink recv issue Commit f7010770fbac ("tools/bpf: move bpf/lib netlink related functions into a new file") introduced a while loop for the netlink recv path. This while loop is needed since the buffer in recv syscall may not be enough to hold all the information and in such cases multiple recv calls are needed. There is a bug introduced by the above commit as the while loop may block on recv syscall if there is no more messages are expected. The netlink message header flag NLM_F_MULTI is used to indicate that more messages are expected and this patch fixed the bug by doing further recv syscall only if multipart message is expected. The patch added another fix regarding to message length of 0. When netlink recv returns message length of 0, there will be no more messages for returning data so the while loop can end. Fixes: f7010770fbac ("tools/bpf: move bpf/lib netlink related functions into a new file") Reported-by: Björn Töpel Tested-by: Björn Töpel Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov commit 2e2a0c961a87a4dc49fd481ea0e56ed66fc11d4a Merge: f6f3bac08ff9 ad3338d2508c Author: Alexei Starovoitov Date: Tue Sep 11 14:17:25 2018 -0700 Merge branch 'progarray_mapinmap_dump' Yonghong Song says: ==================== The support to dump program array and map_in_map maps for bpffs and bpftool is added. Patch #1 added bpffs support and Patch #2 added bpftool support. Please see individual patches for example output. ==================== Signed-off-by: Alexei Starovoitov commit ad3338d2508cd7752accdd39881deced1ec2b8a1 Author: Yonghong Song Date: Thu Sep 6 17:26:05 2018 -0700 tools/bpf: bpftool: support prog array map and map of maps Currently, prog array map and map of maps are not supported in bpftool. This patch added the support. Different from other map types, for prog array map and map of maps, the key returned bpf_get_next_key() may not point to a valid value. So for these two map types, no error will be printed out when such a scenario happens. The following is the plain and json dump if btf is not available: $ ./bpftool map dump id 10 key: 08 00 00 00 value: 5c 01 00 00 Found 1 element $ ./bpftool -jp map dump id 10 [{ "key": ["0x08","0x00","0x00","0x00" ], "value": ["0x5c","0x01","0x00","0x00" ] }] If the BTF is available, the dump looks below: $ ./bpftool map dump id 2 [{ "key": 0, "value": 7 } ] $ ./bpftool -jp map dump id 2 [{ "key": ["0x00","0x00","0x00","0x00" ], "value": ["0x07","0x00","0x00","0x00" ], "formatted": { "key": 0, "value": 7 } }] Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov commit a7c19db38d62fc1ce797dba19936e9f81cf2b9fb Author: Yonghong Song Date: Thu Sep 6 17:26:04 2018 -0700 bpf: add bpffs pretty print for program array map Added bpffs pretty print for program array map. For a particular array index, if the program array points to a valid program, the ": " will be printed out like 0: 6 which means bpf program with id "6" is installed at index "0". Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov commit 313ed62a3ddc2cbe16087630910b41a87bfd9a1f Author: Chengguang Xu Date: Fri Aug 31 22:33:50 2018 +0800 f2fs: cache NULL when both default_acl and acl are NULL default_acl and acl of newly created inode will be initiated as ACL_NOT_CACHED in vfs function inode_init_always() and later will be updated by calling xxx_init_acl() in specific filesystems. Howerver, when default_acl and acl are NULL then they keep the value of ACL_NOT_CACHED, this patch tries to cache NULL for acl/default_acl in this case. Signed-off-by: Chengguang Xu Acked-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 1378752b9921e60749eaf18ec6c47b33f9001abb Author: Chao Yu Date: Wed Aug 22 17:11:05 2018 +0800 f2fs: fix to flush all dirty inodes recovered in readonly fs generic/417 reported as blow: ------------[ cut here ]------------ kernel BUG at /home/yuchao/git/devf2fs/inode.c:695! invalid opcode: 0000 [#1] PREEMPT SMP CPU: 1 PID: 21697 Comm: umount Tainted: G W O 4.18.0-rc2+ #39 Hardware name: innotek GmbH VirtualBox/VirtualBox, BIOS VirtualBox 12/01/2006 EIP: f2fs_evict_inode+0x556/0x580 [f2fs] Call Trace: ? _raw_spin_unlock+0x2c/0x50 evict+0xa8/0x170 dispose_list+0x34/0x40 evict_inodes+0x118/0x120 generic_shutdown_super+0x41/0x100 ? rcu_read_lock_sched_held+0x97/0xa0 kill_block_super+0x22/0x50 kill_f2fs_super+0x6f/0x80 [f2fs] deactivate_locked_super+0x3d/0x70 deactivate_super+0x40/0x60 cleanup_mnt+0x39/0x70 __cleanup_mnt+0x10/0x20 task_work_run+0x81/0xa0 exit_to_usermode_loop+0x59/0xa7 do_fast_syscall_32+0x1f5/0x22c entry_SYSENTER_32+0x53/0x86 EIP: f2fs_evict_inode+0x556/0x580 [f2fs] It can simply reproduced with scripts: Enable quota feature during mkfs. Testcase1: 1. mkfs.f2fs /dev/zram0 2. mount -t f2fs /dev/zram0 /mnt/f2fs 3. xfs_io -f /mnt/f2fs/file -c "pwrite 0 4k" -c "fsync" 4. godown /mnt/f2fs 5. umount /mnt/f2fs 6. mount -t f2fs -o ro /dev/zram0 /mnt/f2fs 7. umount /mnt/f2fs Testcase2: 1. mkfs.f2fs /dev/zram0 2. mount -t f2fs /dev/zram0 /mnt/f2fs 3. touch /mnt/f2fs/file 4. create process[pid = x] do: a) open /mnt/f2fs/file; b) unlink /mnt/f2fs/file 5. godown -f /mnt/f2fs 6. kill process[pid = x] 7. umount /mnt/f2fs 8. mount -t f2fs -o ro /dev/zram0 /mnt/f2fs 9. umount /mnt/f2fs The reason is: during recovery, i_{c,m}time of inode will be updated, then the inode can be set dirty w/o being tracked in sbi->inode_list[DIRTY_META] global list, so later write_checkpoint will not flush such dirty inode into node page. Once umount is called, sync_filesystem() in generic_shutdown_super() will skip syncng dirty inodes due to sb_rdonly check, leaving dirty inodes there. To solve this issue, during umount, add remove SB_RDONLY flag in sb->s_flags, to make sure sync_filesystem() will not be skipped. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit cda9cc595f0bb6ffa51a4efc4b6533dfa4039b4c Author: Yunlei He Date: Tue Jun 26 13:12:43 2018 +0800 f2fs: report error if quota off error during umount Now, we depend on fsck to ensure quota file data is ok, so we scan whole partition if checkpoint without umount flag. It's same for quota off error case, which may make quota file data inconsistent. generic/019 reports below error: __quota_error: 1160 callbacks suppressed Quota error (device zram1): write_blk: dquota write failed Quota error (device zram1): qtree_write_dquot: Error -28 occurred while creating quota Quota error (device zram1): write_blk: dquota write failed Quota error (device zram1): qtree_write_dquot: Error -28 occurred while creating quota Quota error (device zram1): write_blk: dquota write failed Quota error (device zram1): qtree_write_dquot: Error -28 occurred while creating quota Quota error (device zram1): write_blk: dquota write failed Quota error (device zram1): qtree_write_dquot: Error -28 occurred while creating quota Quota error (device zram1): write_blk: dquota write failed Quota error (device zram1): qtree_write_dquot: Error -28 occurred while creating quota VFS: Busy inodes after unmount of zram1. Self-destruct in 5 seconds. Have a nice day... If we failed in below path due to fail to write dquot block, we will miss to release quota inode, fix it. - f2fs_put_super - f2fs_quota_off_umount - f2fs_quota_off - f2fs_quota_sync <-- failed - dquot_quota_off <-- missed to call Signed-off-by: Yunlei He Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit d3f3e5e438d3ce47505db8b0a63d55629e48167e Author: Chris Wilson Date: Tue Sep 11 14:22:06 2018 +0100 drm/i915: Nuke struct_mutex from context_setparam Userspace should be free to race against itself and shoot itself in the foot if it so desires to adjust a parameter at the same time as submitting a batch to that context. As such, the struct_mutex in context setparam is only being used to serialise userspace against itself and not for any protection of internal structs and so is superfluous. v2: Separate user_flags from internal flags to reduce chance of interference; and use locked bit ops for user updates. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20180911132206.23032-1-chris@chris-wilson.co.uk commit 4ff4c31a6e85f4c49fbeebeaa28018d002884b5a Author: Eric W. Biederman Date: Mon Sep 3 10:39:04 2018 +0200 signal: Remove SEND_SIG_FORCED There are no more users of SEND_SIG_FORCED so it may be safely removed. Remove the definition of SEND_SIG_FORCED, it's use in is_si_special, it's use in TP_STORE_SIGINFO, and it's use in __send_signal as without any users the uses of SEND_SIG_FORCED are now unncessary. This makes the code simpler, easier to understand and use. Users of signal sending functions now no longer need to ask themselves do I need to use SEND_SIG_FORCED. Reviewed-by: Thomas Gleixner Signed-off-by: "Eric W. Biederman" commit 079b22dc9be985c591589fcb94769b8e13518aa0 Author: Eric W. Biederman Date: Mon Sep 3 10:32:52 2018 +0200 signal: Use SEND_SIG_PRIV not SEND_SIG_FORCED with SIGKILL and SIGSTOP Now that siginfo is never allocated for SIGKILL and SIGSTOP there is no difference between SEND_SIG_PRIV and SEND_SIG_FORCED for SIGKILL and SIGSTOP. This makes SEND_SIG_FORCED unnecessary and redundant in the presence of SIGKILL and SIGSTOP. Therefore change users of SEND_SIG_FORCED that are sending SIGKILL or SIGSTOP to use SEND_SIG_PRIV instead. This removes the last users of SEND_SIG_FORCED. Reviewed-by: Thomas Gleixner Signed-off-by: "Eric W. Biederman" commit f149b31557446aff9ca96d4be7e39cc266f6e7cc Author: Eric W. Biederman Date: Mon Sep 3 09:50:36 2018 +0200 signal: Never allocate siginfo for SIGKILL or SIGSTOP The SIGKILL and SIGSTOP signals are never delivered to userspace so queued siginfo for these signals can never be observed. Therefore remove the chance of failure by never even attempting to allocate siginfo in those cases. Reviewed-by: Thomas Gleixner Signed-off-by: "Eric W. Biederman" commit 035150540545f62bada95860ba00fe1e0cd62f63 Author: Eric W. Biederman Date: Fri Jul 20 05:31:53 2018 -0500 signal: Don't send siginfo to kthreads. Today kernel threads never dequeue siginfo so it is pointless to enqueue siginfo for them. The usb gadget mass storage driver goes one farther and uses SEND_SIG_FORCED to guarantee that no siginfo is even enqueued. Generalize the optimization of the usb mass storage driver and never perform an unnecessary allocation when delivering signals to kthreads. Switch the mass storage driver from sending signals with SEND_SIG_FORCED to SEND_SIG_PRIV. As using SEND_SIG_FORCED is now unnecessary. Reviewed-by: Thomas Gleixner Signed-off-by: "Eric W. Biederman" commit 961366a01904d460066d65a609c3c2e3051c7903 Author: Eric W. Biederman Date: Thu Jul 19 21:31:13 2018 -0500 signal: Remove the siginfo paramater from kernel_dqueue_signal None of the callers use the it so remove it. Reviewed-by: Thomas Gleixner Signed-off-by: "Eric W. Biederman" commit b16503baa8912a5ec5f599914bfdad898588540f Author: Eric W. Biederman Date: Sat Jul 21 11:35:55 2018 -0500 signal: send_sig_all no longer needs SEND_SIG_FORCED Now that send_signal always delivers SEND_SIG_PRIV signals to a pid namespace init it is no longer necessary to use SEND_SIG_FORCED when calling do_send_sig_info to ensure that pid namespace inits are signaled and possibly killed. Using SEND_SIG_PRIV is sufficient. So use SEND_SIG_PRIV so that userspace when it receives a SIGTERM can tell that the kernel sent the signal and not some random userspace application. Fixes: b82c32872db2 ("sysrq: use SEND_SIG_FORCED instead of force_sig()") Reviewed-by: Thomas Gleixner Signed-off-by: "Eric W. Biederman" commit 3597dfe01d12f570bc739da67f857fd222a3ea66 Author: Eric W. Biederman Date: Mon Sep 3 20:02:46 2018 +0200 signal: Always deliver the kernel's SIGKILL and SIGSTOP to a pid namespace init Instead of playing whack-a-mole and changing SEND_SIG_PRIV to SEND_SIG_FORCED throughout the kernel to ensure a pid namespace init gets signals sent by the kernel, stop allowing a pid namespace init to ignore SIGKILL or SIGSTOP sent by the kernel. A pid namespace init is only supposed to be able to ignore signals sent from itself and children with SIG_DFL. Fixes: 921cf9f63089 ("signals: protect cinit from unblocked SIG_DFL signals") Reviewed-by: Thomas Gleixner Signed-off-by: "Eric W. Biederman" commit 4a63c1ffd384ebdce40aac9c997dab68379137be Author: Eric W. Biederman Date: Thu Jul 19 20:48:30 2018 -0500 signal: Properly deliver SIGSEGV from x86 uprobes For userspace to tell the difference between an random signal and an exception, the exception must include siginfo information. Using SEND_SIG_FORCED for SIGSEGV is thus wrong, and it will result in userspace seeing si_code == SI_USER (like a random signal) instead of si_code == SI_KERNEL or a more specific si_code as all exceptions deliver. Therefore replace force_sig_info(SIGSEGV, SEND_SIG_FORCE, current) with force_sig(SIG_SEGV, current) which gets this right and is shorter and easier to type. Fixes: 791eca10107f ("uretprobes/x86: Hijack return address") Reviewed-by: Thomas Gleixner Signed-off-by: "Eric W. Biederman" commit 55a3235fc71bf34303e34a95eeee235b2d2a35dd Author: Eric W. Biederman Date: Thu Jul 19 20:33:53 2018 -0500 signal: Properly deliver SIGILL from uprobes For userspace to tell the difference between a random signal and an exception, the exception must include siginfo information. Using SEND_SIG_FORCED for SIGILL is thus wrong, and it will result in userspace seeing si_code == SI_USER (like a random signal) instead of si_code == SI_KERNEL or a more specific si_code as all exceptions deliver. Therefore replace force_sig_info(SIGILL, SEND_SIG_FORCE, current) with force_sig(SIG_ILL, current) which gets this right and is shorter and easier to type. Fixes: 014940bad8e4 ("uprobes/x86: Send SIGILL if arch_uprobe_post_xol() fails") Fixes: 0b5256c7f173 ("uprobes: Send SIGILL if handle_trampoline() fails") Reviewed-by: Thomas Gleixner Signed-off-by: "Eric W. Biederman" commit 86989c41b5ea08776c450cb759592532314a4ed6 Author: Eric W. Biederman Date: Thu Jul 19 19:47:27 2018 -0500 signal: Always ignore SIGKILL and SIGSTOP sent to the global init If the first process started (aka /sbin/init) receives a SIGKILL it will panic the system if it is delivered. Making the system unusable and undebugable. It isn't much better if the first process started receives SIGSTOP. So always ignore SIGSTOP and SIGKILL sent to init. This is done in a separate clause in sig_task_ignored as force_sig_info can clear SIG_UNKILLABLE and this protection should work even then. Reviewed-by: Thomas Gleixner Signed-off-by: "Eric W. Biederman" commit 146cdf3fad9c4b4653a4dfc6c79619c62ab27c15 Author: Madhav Chauhan Date: Tue Jul 10 15:10:05 2018 +0530 drm/i915/icl: Define T_INIT_MASTER registers This patch defines DSI_T_INIT_MASTER register for DSI ports 0/1 which will be used in dphy programming. Signed-off-by: Madhav Chauhan Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/1531215614-6828-5-git-send-email-madhav.chauhan@intel.com commit 24d6638302b48328a58c13439276d4531af4ca7d Author: Katsuhiro Suzuki Date: Tue Sep 11 01:39:32 2018 +0900 ASoC: rockchip: add missing INTERLEAVED PCM attribute This patch adds SNDRV_PCM_INFO_INTERLEAVED into PCM hardware info. Signed-off-by: Katsuhiro Suzuki Signed-off-by: Mark Brown commit ad9ff96f65383f8296082158f7e44e466caaf71d Author: Haneen Mohammed Date: Fri Sep 7 20:41:36 2018 +0300 drm/vkms: Add kerneldoc entry Add an initial kerneldoc entry for vkms with a todo list. Signed-off-by: Haneen Mohammed [danvet: Keep the todo.rst entry to point at the vkms docs instead.] Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20180907174136.GA2648@haneenDRM commit cb92173d1f0474784c6171a9d3fdbbca0ee53554 Author: Peter Zijlstra Date: Tue Sep 11 11:51:27 2018 +0200 locking/lockdep, cpu/hotplug: Annotate AP thread Anybody trying to assert the cpu_hotplug_lock is held (lockdep_assert_cpus_held()) from AP callbacks will fail, because the lock is held by the BP. Stick in an explicit annotation in cpuhp_thread_fun() to make this work. Reported-by: Ingo Molnar Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-tip-commits@vger.kernel.org Fixes: cb538267ea1e ("jump_label/lockdep: Assert we hold the hotplug lock for _cpuslocked() operations") Link: http://lkml.kernel.org/r/20180911095127.GT24082@hirez.programming.kicks-ass.net Signed-off-by: Ingo Molnar commit b8789ea71dce5fbab7b9428294759f5fc2357259 Author: Haneen Mohammed Date: Thu Sep 6 08:19:11 2018 +0300 drm/vkms: Enable/Disable cursor support with module option Cursor support is not complete yet. Add module option 'enable_cursor' to enable/disable cursor support which is used for testing currently. Signed-off-by: Haneen Mohammed Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/b47f44f518d3c9858f1469193f1136e0c490060b.1536210181.git.hamohammed.sa@gmail.com commit ad98b6023786647660f438ea6f8fe4e3ce923a2e Author: Mike Rapoport Date: Tue Sep 11 19:24:11 2018 +0300 docs/boot-time-mm: fix kernel-doc directive for including all but DOC: There were several rounds of the patches that enabled "functions" directive with no parameters in kerneldoc.py to allow including all the kernel-doc comments except the DOC: sections. Yet, the boot-time-mm.rst sneaked in with the older version of that directive and was not updated. Update it now. Signed-off-by: Mike Rapoport Tested-by: Randy Dunlap Signed-off-by: Jonathan Corbet commit db7f419c06d7cce892384df464d4b609a3ea70af Author: Haneen Mohammed Date: Thu Sep 6 08:18:26 2018 +0300 drm/vkms: Compute CRC with Cursor Plane This patch compute CRC for output frame with cursor and primary plane. Blend cursor with primary plane and compute CRC on the resulted frame. This currently passes cursor-size-change, and cursor-64x64-[onscreen, offscreen, sliding, random, dpms, rapid-movement] from igt kms_cursor_crc tests. Signed-off-by: Haneen Mohammed Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/b1749f5c90da5721a481f12740e2e370edb4a752.1536210181.git.hamohammed.sa@gmail.com commit c27d931d402b517336fea2b25ae951bee0249f65 Author: Haneen Mohammed Date: Thu Sep 6 08:17:16 2018 +0300 drm/vkms: Add cursor plane support Add cursor plane support and update vkms_plane_atomic_check to enable positioning cursor plane. Signed-off-by: Haneen Mohammed Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/c69078820eacf3246fa77beb0c6227b692cc5e82.1536210181.git.hamohammed.sa@gmail.com commit b53ae6bc7e397930ff20221d1a5976677e0dc85b Author: Michael J. Ruhl Date: Mon Sep 10 07:54:04 2018 -0700 IB/hfi1: set_intr_bits uses incorrect source for register modification HFI IRQ enable bits are not being set correctly. Send context error and DC IRQs are not being enabled correctly. In addition, send context error IRQs are not being delivered. Because of this, send context errors are not being handled correctly when they occur. When setting the IRQ bits, if an IRQ range is used, and the last bit is on a register boundary (bit 63), the calculated index for the final register modification is incorrect (index + 1 vs. index). The incorrect index calculation causes incorrect IRQ bits to be set. In this case the send context error IRQ is NOT enabled. Fix by using the 'last' value rather than the counted 'src' value to determine the final index to use. This satisfies all cases. Fixes: a2f7bbdc2dba ("IB/hfi1: Rework the IRQ API to be more flexible") Reviewed-by: Mike Marciniszyn Reviewed-by: Dennis Dalessandro Signed-off-by: Michael J. Ruhl Signed-off-by: Dennis Dalessandro Signed-off-by: Jason Gunthorpe commit cc1e6315e83db0e517dd9279050b88adc83a7eba Author: Mauro Carvalho Chehab Date: Mon Sep 10 16:20:42 2018 -0400 media: replace strcpy() by strscpy() The strcpy() function is being deprecated upstream. Replace it by the safer strscpy(). Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit c0decac19da3906d9b66291e57b7759489e1170f Author: Mauro Carvalho Chehab Date: Mon Sep 10 08:19:14 2018 -0400 media: use strscpy() instead of strlcpy() The implementation of strscpy() is more robust and safer. That's now the recommended way to copy NUL terminated strings. Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Kees Cook Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit b730c40813a95ebc35757790a990794f55e2b61c Author: Philipp Zabel Date: Thu Sep 6 05:02:15 2018 -0400 media: MAINTAINERS: add entry for i.MX PXP media mem2mem driver Signed-off-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 51abcf7fdb70b82b7f8a7c177271f29aed9866bd Author: Philipp Zabel Date: Thu Sep 6 05:02:14 2018 -0400 media: imx-pxp: add i.MX Pixel Pipeline driver Add a V4L2 mem-to-mem scaler/CSC driver for the Pixel Pipeline (PXP) version found on i.MX6ULL SoCs. A similar variant is used on i.MX7D. Since this driver only uses the legacy pipeline, it should be reasonably easy to extend it to work with the older PXP versions found on i.MX6UL, i.MX6SX, i.MX6SL, i.MX28, and i.MX23. The driver supports scaling and colorspace conversion. There is currently no support for rotation, alpha-blending, and the LUTs. Signed-off-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit b0c351b55bfbc99a83f33536ae66c3f6104362cd Author: Philipp Zabel Date: Thu Sep 6 05:02:12 2018 -0400 media: dt-bindings: media: Add i.MX Pixel Pipeline binding Add DT binding documentation for the Pixel Pipeline (PXP) found on various NXP i.MX SoCs. Signed-off-by: Philipp Zabel Reviewed-by: Rob Herring Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 645923e441d3cc8151abd8473c29a81d0d4e07dc Author: Michael Straube Date: Mon Sep 10 22:38:05 2018 +0200 staging: rtl8188eu: change array type to u8 The the last two parameters of write_cam() have type u8. Change the type of the passed arrays from unsigned char to u8. Clears a line over 80 characters checkpatch warning. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit 56df612afb606dcefba8ab38ab32e052218b6050 Author: Linus Walleij Date: Tue Sep 4 14:41:28 2018 +0200 spi: davinci: Remove chip select GPIO pdata The DaVinci SPI can use either: - Internal chip selects (inside the SPI host) - External chip selects (using GPIO) - External chip selects passed in pdata The last way of passing external chip selects through platform data is not used in the kernel. Delete it to make the code simpler when refactoring GPIO. Cc: Sekhar Nori Cc: Kevin Hilman Cc: Michele Dionisio Cc: Frode Isaksen Signed-off-by: Linus Walleij Signed-off-by: Mark Brown commit c1a0bb17798466c6b1be3a6a72ff581a67884bf8 Author: Michael Straube Date: Sat Sep 8 14:13:53 2018 +0200 staging: rtl8188eu: fix lines over 80 characters in rtw_led.c Wrap lines over 80 characters where appropriate to clear checkpatch warnings. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit ccfe34c01cf002b0138bdef406013af0c9e33771 Author: Michael Straube Date: Sat Sep 8 14:13:52 2018 +0200 staging: rtl8188eu: remove unnecessary parentheses in rtw_led.c Remove unnecessary parentheses from conditionals. Also clears 'Alignment should match open parenthesis' checkpatch issue. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit 00585495c4fab4bb57f7b64e9011bbd1faf64def Author: Michael Straube Date: Sat Sep 8 14:13:51 2018 +0200 staging: rtl8188eu: refactor SwLedControlMode1() Refactor switch cases in SwLedControlMode1() to reduce indentation level. Also clears line over 80 characters checkpatch warnings. Suggested-by: Joe Perches Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit 4f1b327e65a9516a46ea491ce72a5161be176af8 Author: Kuninori Morimoto Date: Tue Sep 11 06:59:01 2018 +0000 ASoC: soc-core: remove unused num_dai_links ALSA SoC is counting card->dai_link_list user, but no-one is using it. Let's remove it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit 2eda3cb108b699a6ff78a87e25143c153bc88e41 Author: Kuninori Morimoto Date: Tue Sep 11 06:54:26 2018 +0000 ASoC: soc-core: avoid nested code on soc_remove_dai() Nested code is not readable. This patch avoid it on soc_remove_dai(). Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit 2bf4b33f83dfe521c4c7c407b6b150aeec04d69c Author: Michael J. Ruhl Date: Mon Sep 10 09:39:28 2018 -0700 IB/hfi1: Missing return value in error path for user sdma If the set_txreq_header_agh() function returns an error, the exit path is chosen. In this path, the code fails to set the return value. This will cause the caller to not realize an error has occurred. Set the return value correctly in the error path. Signed-off-by: Michael J. Ruhl Signed-off-by: Dennis Dalessandro Signed-off-by: Jason Gunthorpe commit 3ca633f1ff7b1c1e8653181352485889b5636a12 Author: Michael J. Ruhl Date: Mon Sep 10 09:39:20 2018 -0700 IB/hfi1: Right size user_sdma sequence numbers and related variables Hardware limits the maximum number of packets to u16 packets. Match that size for all relevant sequence numbers in the user_sdma engine. Reviewed-by: Mike Marciniszyn Signed-off-by: Michael J. Ruhl Signed-off-by: Dennis Dalessandro Signed-off-by: Jason Gunthorpe commit 28a9a9e83ceae2cee25b9af9ad20d53aaa9ab951 Author: Michael J. Ruhl Date: Mon Sep 10 09:39:11 2018 -0700 IB/hfi1: Remove race conditions in user_sdma send path Packet queue state is over used to determine SDMA descriptor availablitity and packet queue request state. cpu 0 ret = user_sdma_send_pkts(req, pcount); cpu 0 if (atomic_read(&pq->n_reqs)) cpu 1 IRQ user_sdma_txreq_cb calls pq_update() (state to _INACTIVE) cpu 0 xchg(&pq->state, SDMA_PKT_Q_ACTIVE); At this point pq->n_reqs == 0 and pq->state is incorrectly SDMA_PKT_Q_ACTIVE. The close path will hang waiting for the state to return to _INACTIVE. This can also change the state from _DEFERRED to _ACTIVE. However, this is a mostly benign race. Remove the racy code path. Use n_reqs to determine if a packet queue is active or not. Reviewed-by: Mitko Haralanov Reviewed-by: Mike Marciniszyn Signed-off-by: Michael J. Ruhl Signed-off-by: Dennis Dalessandro Signed-off-by: Jason Gunthorpe commit a0e0cb82804a6a21d9067022c2dfdf80d11da429 Author: Michael J. Ruhl Date: Mon Sep 10 09:39:03 2018 -0700 IB/hfi1: Eliminate races in the SDMA send error path pq_update() can only be called in two places: from the completion function when the complete (npkts) sequence of packets has been submitted and processed, or from setup function if a subset of the packets were submitted (i.e. the error path). Currently both paths can call pq_update() if an error occurrs. This race will cause the n_req value to go negative, hanging file_close(), or cause a crash by freeing the txlist more than once. Several variables are used to determine SDMA send state. Most of these are unnecessary, and have code inspectible races between the setup function and the completion function, in both the send path and the error path. The request 'status' value can be set by the setup or by the completion function. This is code inspectibly racy. Since the status is not needed in the completion code or by the caller it has been removed. The request 'done' value races between usage by the setup and the completion function. The completion function does not need this. When the number of processed packets matches npkts, it is done. The 'has_error' value races between usage of the setup and the completion function. This can cause incorrect error handling and leave the n_req in an incorrect value (i.e. negative). Simplify the code by removing all of the unneeded state checks and variables. Clean up iovs node when it is freed. Eliminate race conditions in the error path: If all packets are submitted, the completion handler will set the completion status correctly (ok or aborted). If all packets are not submitted, the caller must wait until the submitted packets have completed, and then set the completion status. These two change eliminate the race condition in the error path. Reviewed-by: Mitko Haralanov Reviewed-by: Mike Marciniszyn Signed-off-by: Michael J. Ruhl Signed-off-by: Dennis Dalessandro Signed-off-by: Jason Gunthorpe commit f1a315420e79fe5c077fa119db9439ffabd2cda2 Author: Dan Carpenter Date: Mon Sep 10 11:35:11 2018 +0300 RDMA/hns: Fix an error code in hns_roce_v2_init_eq_table() The error code isn't set on this path. Signed-off-by: Dan Carpenter Signed-off-by: Jason Gunthorpe commit a6ebf4c9770e918e601aa9bf4bc3cf4001dd3d4d Author: Kuninori Morimoto Date: Tue Sep 11 07:02:04 2018 +0000 ASoC: rt5668: remove empty rt5668_i2c_remove() rt5668_i2c_remove() is empty, and no longer needed. Let's remove it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit 0b79b27748cbec221e1ceabf63578198602bf01d Author: Michael J. Ruhl Date: Mon Sep 10 09:49:27 2018 -0700 IB/{hfi1, qib, rdmavt}: Schedule multi RC/UC packets instead of posting The post_send() path determines if it should post directly or, schedule the post for later. The current logic is: if the swqe ring is empty or (for hfi1) wqe->length <= piothreshold post the send else schedule This can allow large requests to call the send engine directly. Large requests can potentially produce a large number of packets prior to returning to the caller, blocking the caller from posting more requests, and allowing better parallel processing. Allow the driver(s) more say in this logic (pass call_send to the driver, rather than examining a return value). Update hfi1/qib logic to schedule the send engine if an RC or UC message is larger than the QP MTU size. Reviewed-by: Mike Marciniszyn Reviewed-by: Ira Weiny Signed-off-by: Michael J. Ruhl Signed-off-by: Dennis Dalessandro Signed-off-by: Jason Gunthorpe commit 7f08872774eb971693ba79eeb2d4db364c9f5bfb Author: Will Deacon Date: Tue Aug 28 14:52:17 2018 +0100 arm64: tlb: Rewrite stale comment in asm/tlbflush.h Peter Z asked me to justify the barrier usage in asm/tlbflush.h, but actually that whole block comment needs to be rewritten. Reported-by: Peter Zijlstra Acked-by: Peter Zijlstra (Intel) Signed-off-by: Will Deacon Signed-off-by: Catalin Marinas commit ace8cb754539077ed75f3f15b77b2b51b5b7a431 Author: Will Deacon Date: Thu Aug 23 21:16:50 2018 +0100 arm64: tlb: Avoid synchronous TLBIs when freeing page tables By selecting HAVE_RCU_TABLE_INVALIDATE, we can rely on tlb_flush() being called if we fail to batch table pages for freeing. This in turn allows us to postpone walk-cache invalidation until tlb_finish_mmu(), which avoids lots of unnecessary DSBs and means we can shoot down the ASID if the range is large enough. Acked-by: Peter Zijlstra (Intel) Signed-off-by: Will Deacon Signed-off-by: Catalin Marinas commit f270ab88fdf205be1a7a46ccb61f4a343be543a2 Author: Will Deacon Date: Thu Aug 23 21:08:31 2018 +0100 arm64: tlb: Adjust stride and type of TLBI according to mmu_gather Now that the core mmu_gather code keeps track of both the levels of page table cleared and also whether or not these entries correspond to intermediate entries, we can use this in our tlb_flush() callback to reduce the number of invalidations we issue as well as their scope. Acked-by: Peter Zijlstra (Intel) Signed-off-by: Will Deacon Signed-off-by: Catalin Marinas commit 07212cd47efef1df971e2289a89c087a5f6f6a2b Author: Will Deacon Date: Thu Aug 23 19:48:44 2018 +0100 arm64: tlb: Remove redundant !CONFIG_HAVE_RCU_TABLE_FREE code If there's one thing the RCU-based table freeing doesn't need, it's more ifdeffery. Remove the redundant !CONFIG_HAVE_RCU_TABLE_FREE code, since this option is unconditionally selected in our Kconfig. Acked-by: Peter Zijlstra (Intel) Signed-off-by: Will Deacon Signed-off-by: Catalin Marinas commit 67a902ac598dca056366a7342f401aa6f605072f Author: Will Deacon Date: Thu Aug 23 19:26:21 2018 +0100 arm64: tlbflush: Allow stride to be specified for __flush_tlb_range() When we are unmapping intermediate page-table entries or huge pages, we don't need to issue a TLBI instruction for every PAGE_SIZE chunk in the VA range being unmapped. Allow the invalidation stride to be passed to __flush_tlb_range(), and adjust our "just nuke the ASID" heuristic to take this into account. Acked-by: Peter Zijlstra (Intel) Signed-off-by: Will Deacon Signed-off-by: Catalin Marinas commit d8289d3a5854a2a0ae144bff106a78738fe63050 Author: Will Deacon Date: Thu Aug 23 19:08:15 2018 +0100 arm64: tlb: Justify non-leaf invalidation in flush_tlb_range() Add a comment to explain why we can't get away with last-level invalidation in flush_tlb_range() Acked-by: Peter Zijlstra (Intel) Signed-off-by: Will Deacon Signed-off-by: Catalin Marinas commit 0795edaf3f1ff1ea58048515211280db004bbd68 Author: Will Deacon Date: Wed Aug 22 21:36:31 2018 +0100 arm64: pgtable: Implement p[mu]d_valid() and check in set_p[mu]d() Now that our walk-cache invalidation routines imply a DSB before the invalidation, we no longer need one when we are clearing an entry during unmap. Acked-by: Peter Zijlstra (Intel) Signed-off-by: Will Deacon Signed-off-by: Catalin Marinas commit 45a284bc5ee3d629b6da1498c2273cb22361416e Author: Will Deacon Date: Wed Aug 22 21:40:30 2018 +0100 arm64: tlb: Add DSB ISHST prior to TLBI in __flush_tlb_[kernel_]pgtable() __flush_tlb_[kernel_]pgtable() rely on set_pXd() having a DSB after writing the new table entry and therefore avoid the barrier prior to the TLBI instruction. In preparation for delaying our walk-cache invalidation on the unmap() path, move the DSB into the TLB invalidation routines. Acked-by: Peter Zijlstra (Intel) Signed-off-by: Will Deacon Signed-off-by: Catalin Marinas commit 6899a4c82faf9b41bbddf330651a4d1155f8b64e Author: Will Deacon Date: Wed Aug 22 21:23:05 2018 +0100 arm64: tlb: Use last-level invalidation in flush_tlb_kernel_range() flush_tlb_kernel_range() is only ever used to invalidate last-level entries, so we can restrict the scope of the TLB invalidation instruction. Acked-by: Peter Zijlstra (Intel) Signed-off-by: Will Deacon Signed-off-by: Catalin Marinas commit 9612f8f503804d2fd2f63aa6ba1e58bba4612d96 Author: Alexandre Belloni Date: Sun Sep 9 22:48:58 2018 +0200 mfd: menelaus: Fix possible race condition and leak The IRQ work is added before the struct rtc is allocated and registered, but this struct is used in the IRQ handler. This may lead to a NULL pointer dereference. Switch to devm_rtc_allocate_device/rtc_register_device to allocate the rtc before calling menelaus_add_irq_work. Also, this solves a possible leak as the RTC is never released. Signed-off-by: Alexandre Belloni Signed-off-by: Lee Jones commit 3e5d60bcc8a42bfd0c888a0cf52a5a7e8398677d Author: zhong jiang Date: Sat Sep 8 21:49:31 2018 +0800 infiniband: remove redundant condition check before debugfs_remove debugfs_remove has taken the IS_ERR_OR_NULL into account. Just remove the unnecessary condition. Signed-off-by: zhong jiang Signed-off-by: Jason Gunthorpe commit a7ee18bdee837e4703f01588993504b72074ffc6 Author: Mark Bloch Date: Thu Sep 6 17:27:08 2018 +0300 RDMA/mlx5: Allow creating a matcher for a NIC TX flow table Currently a matcher can only be created and attached to a NIC RX flow table. Extend it to allow it on NIC TX flow tables as well. In order to achieve that, we: 1) Expose a new attribute: MLX5_IB_ATTR_FLOW_MATCHER_FLOW_FLAGS. enum ib_flow_flags is used as valid flags. Only IB_FLOW_ATTR_FLAGS_EGRESS is supported. 2) Remove the requirement to have a DEVX or QP destination when creating a flow. A flow added to NIC TX flow table will forward the packet outside of the vport (Wire or E-Switch in the SR-iOV case). Signed-off-by: Mark Bloch Reviewed-by: Yishai Hadas Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit b47fd4ffe2d6422a986f19d47563d72c79ebbc21 Author: Mark Bloch Date: Thu Sep 6 17:27:07 2018 +0300 RDMA/mlx5: Add NIC TX namespace when getting a flow table Add the ability to get a NIC TX flow table when using _get_flow_table(). This will allow to create a matcher and a flow rule on the NIC TX path. Signed-off-by: Mark Bloch Reviewed-by: Yishai Hadas Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit fa76d24ee0aa24fff3fa9ba71fc2179fb88fef6a Author: Mark Bloch Date: Thu Sep 6 17:27:06 2018 +0300 RDMA/mlx5: Add flow actions support to raw create flow Support attaching flow actions to a flow rule via raw create flow. For now only NIC RX path is supported. This change requires to export flow resources management functions so we can maintain proper bookkeeping of flow actions. Signed-off-by: Mark Bloch Reviewed-by: Yishai Hadas Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit b823dd6d86ce6576d229c865895d0ee5285d0363 Author: Mark Bloch Date: Thu Sep 6 17:27:05 2018 +0300 RDMA/mlx5: Refactor raw flow creation Move struct mlx5_flow_act to be passed from the method entry point, this will allow to add support for flow action for the raw create flow path. Signed-off-by: Mark Bloch Reviewed-by: Yishai Hadas Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 501f14e37ba099f9d3a530c9d3a03cc4dbad103f Author: Mark Bloch Date: Thu Sep 6 17:27:04 2018 +0300 RDMA/mlx5: Don't overwrite action if already set We support only a single action type per flow rule, in case the user passes the same type of flow actions fail the flow creation. Signed-off-by: Mark Bloch Reviewed-by: Yishai Hadas Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 2ea262039015ba7e74dcaff91e70c547a45437c7 Author: Mark Bloch Date: Thu Sep 6 17:27:03 2018 +0300 RDMA/mlx5: Refactor flow action parsing to be more generic Make the parsing of flow actions more generic so it could be used by mlx5 raw create flow. Signed-off-by: Mark Bloch Reviewed-by: Yishai Hadas Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 86e1d464a8ccd627b6ea3e9a98a0389b0d27fd1f Author: Mark Bloch Date: Thu Sep 6 17:27:02 2018 +0300 RDMA/uverbs: Move flow resources initialization Use ib_set_flow() when initializing flow related resources. Signed-off-by: Mark Bloch Reviewed-by: Yishai Hadas Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 70cd20aed00f719f3536154df02596106e431e45 Author: Guy Levi Date: Thu Sep 6 17:27:01 2018 +0300 IB/uverbs: Add IDRs array attribute type to ioctl() interface Methods sometimes need to get a flexible set of IDRs and not a strict set as can be achieved today by the conventional IDR attribute. Add a new IDRS_ARRAY attribute to the generic uverbs ioctl layer. IDRS_ARRAY points to array of idrs of the same object type and same access rights, only write and read are supported. Signed-off-by: Guy Levi Signed-off-by: Jason Gunthorpe `` Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit e806f9328ba424b371766899af3c3cf4616e5522 Author: Mark Bloch Date: Sun Sep 2 12:51:36 2018 +0300 RDMA/mlx5: Enable attaching packet reformat action to steering flows Any matching rules will be mutated based on the packet reformat context which is attached to that given flow rule. Signed-off-by: Mark Bloch Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 5c2db53f62633689632aee7be9659418b2bf291f Author: Mark Bloch Date: Sun Sep 2 12:51:35 2018 +0300 RDMA/mlx5: Enable reformat on NIC RX if supported A L3_TUNNEL_TO_L2 decap flow action requires to enable the encap bit on the flow table, enable it if supported. This will allow to attach those flow actions to NIC RX steering. We don't enable if running on a representor. Signed-off-by: Mark Bloch Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 10a308964eaf4bf7dea859dcb9f630c91b3b07be Author: Mark Bloch Date: Sun Sep 2 12:51:34 2018 +0300 RDMA/mlx5: Enable attaching DECAP action to steering flows Any matching packet will be stripped of it's VXLAN tunnel, only the inner L2 onward is left. The user will receive the decapsulated packet. Signed-off-by: Mark Bloch Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 4adda1122c490e042d4bcb920900f796fc9423e4 Author: Mark Bloch Date: Sun Sep 2 12:51:33 2018 +0300 RDMA/mlx5: Enable decap and packet reformat on flow tables If NIC RX flow tables support decap operation, enable it on creation, This allows to perform decapsulation of tunnelled packets by steering rules. If NIC TX flow tables support reformat operation, enable it on creation. We don't enable those capabilities on representors as the E-Switch should handle packet modification (can be configured via TC) and as current hardware can't handle both FDB and NIC flow tables with decap/packet reformat support. Signed-off-by: Mark Bloch Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit b1085be3f468a58d4a43f3ea878ecb6c10910552 Author: Mark Bloch Date: Sun Sep 2 12:51:32 2018 +0300 RDMA/mlx5: Enable attaching modify header to steering flows When creating a flow steering rule, allow the user to attach a modify header action. Signed-off-by: Mark Bloch Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 78dd0c430f116a325eeda61416c0b36a8206fbfc Author: Mark Bloch Date: Sun Sep 2 12:51:31 2018 +0300 RDMA/mlx5: Add NIC TX steering support Just like ingress steering, allow a user to create steering rules that match egress vport traffic. We expose the same number of priorities as the bypass (NIC RX) steering. Signed-off-by: Mark Bloch Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit eb93c82ed8c77f00955f2891483170194c3be92c Author: Chuck Lever Date: Tue Sep 4 11:45:20 2018 -0400 RDMA/core: Document QP @event_handler function Add helpful warning for RDMA consumer implementers. Signed-off-by: Chuck Lever Signed-off-by: Jason Gunthorpe commit 4269024639f6ff9a1967c4bfa5a2ba7d9853384a Author: Chuck Lever Date: Tue Sep 4 11:45:14 2018 -0400 RDMA/core: Document CM @event_handler function Code audit suggests that the RDMA CM event handler callback function is _always_ invoked in a context that is safe to block. That's important for consumer implementers to know, so document that in the comment before rdma_create_id (where the handler function is set up by the consumer). Signed-off-by: Chuck Lever Signed-off-by: Jason Gunthorpe commit c29daffa322ad36978cbce487f8ebcd9c3c3f7c0 Author: Oleksij Rempel Date: Thu Aug 2 12:34:24 2018 +0200 regulator: pfuze100-regulator: provide pm_power_off_prepare handler On some boards the SoC can use one pin "PMIC_STBY_REQ" to notify th PMIC about state changes. In this case internal state of PMIC must be preconfigured for upcomming state change. It works fine with the current regulator framework, except with the power-off case. This patch is providing an optional pm_power_off_prepare handler which will configure standby state of the PMIC to disable all power lines. In my power consumption test on RIoTBoard, I got the following results: power off without this patch: 320 mA power off with this patch: 2 mA suspend to ram: 40 mA Signed-off-by: Oleksij Rempel Signed-off-by: Mark Brown commit cb60ad04c4eb69bc73025546172856e4de36b13e Author: Oleksij Rempel Date: Thu Aug 2 12:34:23 2018 +0200 regulator: pfuze100: add fsl,pmic-stby-poweroff property Document the new optional "fsl,pmic-stby-poweroff" property. Signed-off-by: Oleksij Rempel Acked-by: Rob Herring Signed-off-by: Mark Brown commit 74f008f251bc1797109b7f027d3fdb1ad620385d Author: Oleksij Rempel Date: Thu Aug 2 12:34:22 2018 +0200 kernel/reboot.c: export pm_power_off_prepare Export pm_power_off_prepare. It is needed to implement power off on Freescale/NXP iMX6 based boards with external power management integrated circuit (PMIC). Signed-off-by: Oleksij Rempel Signed-off-by: Mark Brown commit 20b00bbe70bd6aa48bd654fe2d1e742b9c060eb0 Author: Hans Verkuil Date: Fri Sep 7 11:04:00 2018 -0400 media: vidioc-cropcap/g-crop.rst: fix confusing sentence The note that the text refers to is actually *below* the type description, not above. Fix this. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit f9055e74f8976e47ccd81d7988cb491b5dc75339 Author: Chris Wilson Date: Thu Sep 6 20:01:44 2018 +0100 drm/i915/overlay: Use the ioctl parameters directly The user parameters to put_image are not copied back to userspace (DRM_IOW), and so we can modify the ioctl parameters (having already been copied to a temporary kernel struct) directly and use those in place, avoiding another temporary malloc and lots of manual copying. Signed-off-by: Chris Wilson Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180906190144.1272-2-chris@chris-wilson.co.uk commit c8124d399224d626728e2ffb95a1d564a7c06968 Author: Chris Wilson Date: Thu Sep 6 20:01:43 2018 +0100 drm/i915/overlay: Allocate physical registers from stolen Given that we are now reasonably confident in our ability to detect and reserve the stolen memory (physical memory reserved for graphics by the BIOS) for ourselves on most machines, we can put it to use. In this case, we need a page to hold the overlay registers. On an i915g running MythTv, H Buus noticed that commit 6a2c4232ece145d8b5a8f95f767bd6d0d2d2f2bb Author: Chris Wilson Date: Tue Nov 4 04:51:40 2014 -0800 drm/i915: Make the physical object coherent with GTT introduced stuttering into his video playback. After discarding the likely suspect of it being the physical cursor updates, we were left with the use of the phys object for the overlay. And lo, if we completely avoid using the phys object (allocated just once on module load!) by switching to stolen memory, the stuttering goes away. For lack of a better explanation, claim victory and kill two birds with one stone. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107600 Fixes: 6a2c4232ece1 ("drm/i915: Make the physical object coherent with GTT") Signed-off-by: Chris Wilson Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180906190144.1272-1-chris@chris-wilson.co.uk commit 7b0bfa5fc30fb82e8a5a7cd70cb197095c925042 Author: Guilherme Gallo Date: Mon Sep 3 21:45:59 2018 -0400 media: vimc: implement basic v4l2-ctrls Add brightness, contrast, hue and saturation controls in vimc-sensor Signed-off-by: Guilherme Alcarde Gallo Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 2dd62390734972b2bec00cc3c60f07725162b33e Author: Hans Verkuil Date: Sun Sep 2 06:37:04 2018 -0400 media: vicodec: change codec license to LGPL The FWHT codec can also be used by userspace utilities and libraries, but since the current license is GPL and not LGPL it is not possible to include it in e.g. gstreamer, since LGPL is required for that. Change the license of these four files to LGPL. Signed-off-by: Hans Verkuil Signed-off-by: Tom aan de Wiel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 5b03006d5c58ddd31caf542eef4d0269bcf265b3 Author: Anders Roxell Date: Tue Sep 11 16:18:36 2018 +0200 ALSA: hda: fix unused variable warning When CONFIG_X86=n function azx_snoop doesn't use the variable chip it only returns true. sound/pci/hda/hda_intel.c: In function ‘dma_alloc_pages’: sound/pci/hda/hda_intel.c:2002:14: warning: unused variable ‘chip’ [-Wunused-variable] struct azx *chip = bus_to_azx(bus); ^~~~ Create a inline function of azx_snoop. Fixes: a41d122449be ("ALSA: hda - Embed bus into controller object") Signed-off-by: Anders Roxell Signed-off-by: Takashi Iwai commit 30ecfff4de7cc222219f2cabcebfcd79604fc87f Merge: 77792652d602 65b80dfffeab Author: Greg Kroah-Hartman Date: Tue Sep 11 16:02:06 2018 +0200 Merge tag 'ib-mfd-spi-tty-v4.20-1' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd into tty-next Immutable branch between MFD, SPI and TTY due for the v4.20 merge window (v2) commit d4215edbd4b170b207b0e5a1d8ae42fb49f5c470 Author: Hans Verkuil Date: Tue Aug 28 05:11:04 2018 -0400 media: media-request: update documentation Various clarifications and readability improvements based on Laurent Pinchart's review of the documentation. Signed-off-by: Hans Verkuil Reviewed-by: Tomasz Figa Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 15cd442e79e2a60a725ee5501e4ffb537698c802 Author: Hans Verkuil Date: Sat Sep 1 07:29:14 2018 -0400 media: media-request: EPERM -> EACCES/EBUSY If requests are not supported by the driver, then return EACCES, not EPERM. If you attempt to mix queueing buffers directly and using requests, then EBUSY is returned instead of EPERM: once a specific queueing mode has been chosen the queue is 'busy' if you attempt the other mode (i.e. direct queueing vs via a request). Signed-off-by: Hans Verkuil Reviewed-by: Tomasz Figa Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit ffda0b4c2481b2a0faf634abccb1da0d0ba4eddb Author: Hans Verkuil Date: Mon Aug 27 11:23:41 2018 -0400 media: v4l2-ctrls: improve media_request_(un)lock_for_update The request reference count was decreased again once a reference to the request object was taken. Postpone this until we finished using the object. In theory I think it is possible that the request_fd can be closed by the application from another thread. In that case when request_put is called the whole request would be freed. It's highly unlikely, but let's just be safe and fix this potential race condition. Signed-off-by: Hans Verkuil Reviewed-by: Tomasz Figa Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit ca6c163399a9f1913efdbeab654a185b3cde03c4 Author: Hans Verkuil Date: Mon Aug 27 11:20:10 2018 -0400 media: v4l2-ctrls: use media_request_(un)lock_for_access When getting control values from a completed request, we have to protect the request against being re-inited when it is being accessed by calling media_request_(un)lock_for_access. Signed-off-by: Hans Verkuil Reviewed-by: Tomasz Figa Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 6736f4e948817ca8385bdc6feb5475cdf1eb1ec8 Author: Hans Verkuil Date: Mon Aug 27 11:10:38 2018 -0400 media: media-request: add media_request_(un)lock_for_access Add helper functions to prevent a completed request from being re-inited while it is being accessed. Signed-off-by: Hans Verkuil Reviewed-by: Tomasz Figa Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit e5079cf11373e4cc98be8b1072aece429eb2d4d2 Author: Hans Verkuil Date: Thu Aug 23 10:18:35 2018 -0400 media: vb2: set reqbufs/create_bufs capabilities Set the capabilities field of v4l2_requestbuffers and v4l2_create_buffers. The various mapping modes were easy, but for signaling the request capability a new 'supports_requests' bitfield was added to videobuf2-core.h (and set in vim2m and vivid). Drivers have to set this bitfield for any queue where requests are supported. Signed-off-by: Hans Verkuil Reviewed-by: Tomasz Figa Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 692dce77dfb71b5eaf896d3cdc7ef72f70631b14 Author: Fabrizio Castro Date: Mon Sep 10 12:53:49 2018 +0100 arm64: Add Renesas R8A774C0 support Add configuration option for the RZ/G2E (R8A774C0) SoC. Signed-off-by: Fabrizio Castro Reviewed-by: Biju Das Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit 18281dec2ba086b93bee2dd5f9ee0e3633d25a8d Author: Sergei Shtylyov Date: Mon Jul 30 21:22:37 2018 +0300 arm64: dts: renesas: r8a779{7|8}0: move CAN clock node The CAN clock node should precede the "cpus" node in the R8A779{7|8}0 device trees, according to the alphanumeric node sorting rule... Signed-off-by: Sergei Shtylyov Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit f14bfabc5472ebc637a9ed8c5bc4ab7b77db209f Author: Sergei Shtylyov Date: Thu Jul 26 21:51:18 2018 +0300 arm64: dts: renesas: r8a77980: move IPMMU nodes The IPMMU nodes should follow the GEther node, not the CAN-FD node, according to the part of the startng IPMMU-DS1 node. While moving the nodes, also do sort them by label alphanumerically... Signed-off-by: Sergei Shtylyov Signed-off-by: Simon Horman commit 180485566d41531c64a57e9253d38a1ac55bc387 Author: Yoshihiro Shimoda Date: Tue Jul 31 16:43:19 2018 +0900 arm64: dts: renesas: r8a77990: Enable PWM for Ebisu board This patch adds PWM device nodes and enables PWM3 and PWM5 for R-Car E3 Ebisu board. These devices are used for backlight control. Signed-off-by: Yoshihiro Shimoda Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit 0dba24a8e17dc60dba5882b907e923fcf0d3d1e7 Author: Sergei Shtylyov Date: Wed Jul 25 19:43:41 2018 +0300 arm64: dts: renesas: r8a77980: add Cortex-A53 PMU support Describe the performance monitor unit (PMU) for the Cortex-A53 cores in the R8A77980 SoC's device tree. Based on the original (and large) patch by Vladimir Barinov. Signed-off-by: Vladimir Barinov Signed-off-by: Sergei Shtylyov Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit c59d2da8ec189489a30b351d7fdb5923bcb9ca5f Author: P Raviraj Sitaram Date: Mon Sep 10 19:57:14 2018 +0530 drm/i915/chv: Update csc coefficient matrix during modeset During modeset, previously configured csc coefficient matrix,if any, will not persist. This can result in blank screen as csc mode will be programmed while loading LUT but csc coefficient matrix remains unprogrammed. Changes since V1: - Removed platform check Signed-off-by: P Raviraj Sitaram Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/1536589634-29680-1-git-send-email-raviraj.p.sitaram@intel.com commit f35f5d72e70e6b91389eb98fcabf43b79f40587f Author: Hans Verkuil Date: Thu Aug 23 09:56:22 2018 -0400 media: videodev2.h: add new capabilities for buffer types VIDIOC_REQBUFS and VIDIOC_CREATE_BUFFERS will return capabilities telling userspace what the given buffer type is capable of. Signed-off-by: Hans Verkuil Reviewed-by: Tomasz Figa Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 5afa67792d0a25d5642cd6929ed0f92b5e7f5076 Author: Biju Das Date: Tue Jul 24 16:47:17 2018 +0100 arm64: Add Renesas R8A774A1 support Add configuration option for the RZ/G2M (R8A774A1) SoC. Signed-off-by: Biju Das Reviewed-by: Chris Paterson Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit dc58a553ba8c4edd26c4f585bbbc16ab2f0ec35f Author: Hans Verkuil Date: Thu Aug 23 06:45:09 2018 -0400 media: buffer.rst: only set V4L2_BUF_FLAG_REQUEST_FD for QBUF Document that V4L2_BUF_FLAG_REQUEST_FD should only be used with VIDIOC_QBUF and cleared otherwise. Signed-off-by: Hans Verkuil Reviewed-by: Tomasz Figa Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit b6b84557eca71ae0631be1567fec85870a2c1b93 Author: Hans Verkuil Date: Thu Aug 23 06:33:49 2018 -0400 media: v4l2-ctrls: return -EACCES if request wasn't completed For now (this might be relaxed in the future) we do not allow getting controls from a request that isn't completed. In that case we return -EACCES. Update the documentation accordingly. Signed-off-by: Hans Verkuil Reviewed-by: Tomasz Figa Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 34b41472465b1b5a2c6c63255431fb2c1a450af1 Author: Hans Verkuil Date: Thu Aug 23 06:14:12 2018 -0400 media: media-request: return -EINVAL for invalid request_fds Instead of returning -ENOENT when a request_fd was not found (VIDIOC_QBUF and VIDIOC_G/S/TRY_EXT_CTRLS), we now return -EINVAL. This is in line with what we do when invalid dmabuf fds are passed to e.g. VIDIOC_QBUF. Also document that EINVAL is returned for invalid m.fd values, we never documented that. Signed-off-by: Hans Verkuil Reviewed-by: Tomasz Figa Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit e2f2594b8e4c4dab5761dede92f3793c34048a6c Author: Kuninori Morimoto Date: Fri Sep 7 01:43:23 2018 +0000 ARM: shmobile: 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: Geert Uytterhoeven Signed-off-by: Simon Horman commit 6ea0d588d35b55e6df8e9ac12b95c34a669c39d4 Author: Guennadi Liakhovetski Date: Fri Aug 3 07:37:08 2018 -0400 media: uvcvideo: Add a D4M camera description D4M is a mobile model from the D4XX family of Intel RealSense cameras. This patch adds a descriptor for it, which enables reading per-frame metadata from it. Signed-off-by: Guennadi Liakhovetski [laurent.pinchart@ideasonboard.com Small clarifications to the documentation] Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit 3a03284dd4e7a9923acda7d73ec418378d3af6cc Author: Laurent Pinchart Date: Fri Aug 17 04:50:02 2018 -0400 media: uvcvideo: Store device information pointer in struct uvc_device The device information structure is currently copied field by field in the uvc_device structure. As we only have two fields at the moment this isn't much of an issue, but it prevents easy addition of new info fields. Fix this by storing the uvc_device_info pointer in the uvc_device structure. As a result the uvc_device meta_format field can be removed. The quirks field, however, needs to stay as it can be modified through a module parameter. As not all device have an information structure, we declare a global "NULL" info instance that is used as a fallback when the driver_info is empty. Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit 88d8034c943fb5a0e3c49eb878a87edcb376e2c2 Author: Guennadi Liakhovetski Date: Fri Aug 3 07:36:56 2018 -0400 media: uvcvideo: Rename UVC_QUIRK_INFO to UVC_INFO_QUIRK The UVC_QUIRK_INFO macro defines "device information containing quirks", not "quirks for information". Rename it to UVC_INFO_QUIRK. Signed-off-by: Guennadi Liakhovetski Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit 89dd34caf73e28018c58cd193751e41b1f8bdc56 Author: Nadav Amit Date: Mon Jun 4 09:47:13 2018 -0400 media: uvcvideo: Fix uvc_alloc_entity() allocation alignment The use of ALIGN() in uvc_alloc_entity() is incorrect, since the size of (entity->pads) is not a power of two. As a stop-gap, until a better solution is adapted, use roundup() instead. Found by a static assertion. Compile-tested only. Fixes: 4ffc2d89f38a ("uvcvideo: Register subdevices for each entity") Signed-off-by: Nadav Amit Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit 6689df06df7a36144522c4b26bf80318b6b16d08 Author: Colin Ian King Date: Mon Jul 3 05:31:51 2017 -0400 media: uvcvideo: Fix spelling mistake: "entites" -> "entities" Trivial fix to spelling mistake in uvc_printk message [Unwrap message string, remove unneeded curly braces] Signed-off-by: Colin Ian King Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit 829682b3dba16120c3366d8eaef620a8a41e5fb8 Author: Gustavo A. R. Silva Date: Sun Nov 12 03:18:59 2017 -0500 media: uvcvideo: Remove unnecessary NULL check before debugfs_remove_recursive debugfs_remove_recursive() accepts a NULL parameter and returns immediately, there's no need for a NULL check in the caller. This issue was detected with the help of Coccinelle. [Reword commit message, address uvc_debugfs_cleanup_stream()] Signed-off-by: Gustavo A. R. Silva Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit 52a4eb317c04b33564f26188acb53e6c967a1718 Author: Laurent Pinchart Date: Mon Aug 6 18:25:33 2018 -0400 media: uvcvideo: Make uvc_control_mapping menu_info field const The menu_info field of the uvc_control_mapping structure points to an array of menu info data that are never changed by the driver. Make the pointer const and constify the related static arrays in the driver. Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit 8643d237a2f7dab27c6c9189d24c5e7d4a5c5f68 Author: Joe Perches Date: Sat Nov 4 13:23:29 2017 -0400 media: uvcvideo: Make some structs const Move some data to text $ size drivers/media/usb/uvc/uvc_ctrl.o* text data bss dec hex filename 34323 2364 0 36687 8f4f drivers/media/usb/uvc/uvc_ctrl.o.new 28659 8028 0 36687 8f4f drivers/media/usb/uvc/uvc_ctrl.o.old Signed-off-by: Joe Perches Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit 703fe34bac0c9335d019f15c877cdb179971ddeb Author: Hans Verkuil Date: Sat Sep 1 08:59:20 2018 -0400 media: vicodec: fix sparse warning drivers/media/platform/vicodec/vicodec-core.c:160:25: warning: variable 'q_out' set but not used [-Wunused-but-set-variable] It's indeed not used, and it can be removed. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit e9355a7a6584882fa25c471898fdb49c22c9912c Author: Hans Verkuil Date: Sat Sep 1 08:53:11 2018 -0400 media: videodev2.h.rst.exceptions: add V4L2_DV_FL_CAN_DETECT_REDUCED_FPS This fixes a documentation warning: Documentation/output/videodev2.h.rst:6: WARNING: undefined label: v4l2-dv-fl-can-detect-reduced-fps (if the link has no caption the label must precede a section header) Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 55f6fe09f14bc3aa690463027ad3f9cb6b9831ce Author: Hans Verkuil Date: Sat Sep 1 08:38:07 2018 -0400 media: vicodec: fix wrong sizeimage The initial sizeimage for the compressed decoder output was wrong. The size of the output was incorrectly used to calculate the image size, that should have been the size of the capture. Rework the code to fix this. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 96cb579cc47380a22d3f64da7877e13a7566e296 Author: Hans Verkuil Date: Tue Aug 14 03:52:17 2018 -0400 media: cec-func-poll.rst/func-poll.rst: update EINVAL description nfds depends on RLIMIT_NOFILE, not OPEN_MAX. Update the description for cec and v4l2. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 648301b456b0169af4a8be49ea59a91742c3f75b Author: Hans Verkuil Date: Sat Aug 11 07:07:15 2018 -0400 media: v4l2-tpg: add Z16 support Z16 support is identical to Y16, so that's easy to add. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit bd7ae8adeca003f6eafe578fe2c6b9308aeb582a Author: Hans Verkuil Date: Sat Aug 11 07:07:14 2018 -0400 media: v4l2-tpg: show either Y'CbCr or HSV encoding When logging the current TPG state detect if we are generating a Y'CbCr or HSV pattern and report one or the other instead of both, which is confusing. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit b4ae675d3f4f31b7810b58895e643177be8fc010 Author: Hans Verkuil Date: Sat Aug 4 05:48:36 2018 -0400 media: mediactl/*.rst: document argp The documentation of the Media Controller API ioctls is missing a description of the argp ioctl argument. Add this. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 6be8f3bd2c78915a9f3a058a346ae93068d35c01 Author: Daniel Vetter Date: Wed Aug 22 10:54:05 2018 +0200 drm/fb: Stop leaking physical address For buffer sharing, use dma-buf instead. We can't set smem_start to 0 unconditionally since that's used by the fbdev mmap default implementation. And we have plenty of userspace which would like to keep that working. This might break legit userspace - if it does we need to look at a case-by-cases basis how to handle that. Worst case I expect overrides for only specific drivers, since anything remotely modern should be using dma-buf/prime now (which is about 7 years old now for DRM drivers). This issue was uncovered because Noralf's rework to implement a generic fb_probe also implements it's own fb_mmap callback. Which means smem_start didn't have to be set anymore, which blew up some blob in userspace rather badly. Acked-by: Sean Paul Cc: Gustavo Padovan Cc: Maarten Lankhorst Cc: Sean Paul Cc: David Airlie Cc: John Stultz Cc: Noralf Trønnes Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20180822085405.10787-4-daniel.vetter@ffwll.ch commit da6c7707caf3736c1cf968606bd97c07e79625d4 Author: Daniel Vetter Date: Wed Aug 22 10:54:04 2018 +0200 fbdev: Add FBINFO_HIDE_SMEM_START flag DRM drivers really, really, really don't want random userspace to share buffer behind it's back, bypassing the dma-buf buffer sharing machanism. For that reason we've ruthlessly rejected any IOCTL exposing the physical address of any graphics buffer. Unfortunately fbdev comes with that built-in. We could just set smem_start to 0, but that means we'd have to hand-roll our own fb_mmap implementation. For good reasons many drivers do that, but smem_start/length is still super convenient. Hence instead just stop the leak in the ioctl, to keep fb mmap working as-is. A second patch will set this flag for all drm drivers. Acked-by: Bartlomiej Zolnierkiewicz Cc: Bartlomiej Zolnierkiewicz Cc: Kees Cook Cc: Daniel Vetter Cc: linux-fbdev@vger.kernel.org Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20180822085405.10787-3-daniel.vetter@ffwll.ch commit 8d7fc2994f4d1f431e280c9e21a139c18dc435ec Author: Daniel Vetter Date: Wed Aug 22 10:54:03 2018 +0200 vt: Remove vc_panic_force_write It was only used by the panic support in fbcon, which is now gone. Remove this now dead code too. Acked-by: Greg Kroah-Hartman Cc: Greg Kroah-Hartman Cc: Kees Cook Cc: Joe Perches Cc: Daniel Vetter Cc: Meng Xu Cc: Nicolas Pitre Cc: Thomas Meyer Cc: Mike Frysinger Cc: Bartlomiej Zolnierkiewicz Cc: Hans de Goede Cc: Thierry Reding Cc: David Lechner Cc: Philippe Ombredanne Cc: Thomas Gleixner Cc: Kate Stewart Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20180822085405.10787-2-daniel.vetter@ffwll.ch commit 04cfcc7ab358e331b32cabde1e853a125f3f8735 Author: Daniel Vetter Date: Wed Aug 22 10:54:02 2018 +0200 fbdev: Drop FBINFO_CAN_FORCE_OUTPUT flag This was only added for the drm's fbdev emulation support, so that it would try harder to show the Oops. Unfortunately this never really worked reliably, and in practice ended up pushing the real Oops off the screen due to plentyfull locking, sleep-while-atomic and other issues. So we removed all that support from the fbdev emulation a while back. Aside: We've also removed the kgdb support, for similar reasons. Since it's such a small patch I figured I don't split this up into the usual 3-phase removal. Acked-by: Bartlomiej Zolnierkiewicz Cc: Ben Skeggs Cc: Bartlomiej Zolnierkiewicz Cc: Greg Kroah-Hartman Cc: Hans de Goede Cc: Daniel Vetter Cc: Alexander Kapshuk Cc: Kees Cook Cc: Thierry Reding Cc: David Lechner Cc: nouveau@lists.freedesktop.org Cc: linux-fbdev@vger.kernel.org Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20180822085405.10787-1-daniel.vetter@ffwll.ch commit b7aff107f34f007f32f45136c9a935912a481d32 Author: Alexandre Belloni Date: Sun Sep 9 22:38:48 2018 +0200 rtc: pl031: switch to devm_rtc_allocate_device/rtc_register_device Switch to devm_rtc_allocate_device to simplify the erro and driver removal paths. Acked-by: Linus Walleij Signed-off-by: Alexandre Belloni commit c778ec85825dc895936940072aea9fe9037db684 Author: Alexandre Belloni Date: Sun Sep 9 22:38:47 2018 +0200 rtc: pl030: fix possible race condition The IRQ is requested before the struct rtc is allocated and registered, but this struct is used in the IRQ handler. This may lead to a NULL pointer dereference. Switch to devm_rtc_allocate_device/rtc_register_device to allocate the rtc before requesting the IRQ. Signed-off-by: Alexandre Belloni commit babab2f86440352d24e76118fdd7d40cab5fd7bf Author: Alexandre Belloni Date: Sun Sep 9 22:38:46 2018 +0200 rtc: mt6397: fix possible race condition The IRQ is requested before the struct rtc is allocated and registered, but this struct is used in the IRQ handler. This may lead to a NULL pointer dereference. Switch to devm_rtc_allocate_device/rtc_register_device to allocate the rtc before requesting the IRQ. Acked-by: Eddie Huang Signed-off-by: Alexandre Belloni commit 8734fae64eb0fdaf7cfd0599f4fbf747697006f6 Author: Wolfram Sang Date: Sun Jan 21 13:12:43 2018 +0100 gpio: of: make example syntactically correct The ';' was missing. And cosmetic: there was a space too much. Signed-off-by: Wolfram Sang Reviewed-by: Niklas Söderlund Reviewed-by: Geert Uytterhoeven Signed-off-by: Linus Walleij commit 6953c57ab1721ce57914fc5741d0ce0568756bb0 Author: Linus Walleij Date: Tue Sep 4 11:01:58 2018 +0200 gpio: of: Handle SPI chipselect legacy bindings The SPI chipselects are assumed to be active low in the current binding, so when we want to use GPIO descriptors and handle the active low/high semantics in gpiolib, we need a special parsing quirk to deal with this. We check for the property "spi-cs-high" and if that is NOT present we assume the CS line is active low. If the line is tagged as active low in the device tree and has no "spi-cs-high" property all is fine, the device tree and the SPI bindings are in agreement. If the line is tagged as active high in the device tree with the second cell flag and has no "spi-cs-high" property we enforce active low semantics (as this is the exception we can just tag on the flag). If the line is tagged as active low with the second cell flag AND tagged with "spi-cs-high" the SPI active high property takes precedence and we print a warning. Cc: Mark Brown Cc: linux-spi@vger.kernel.org Cc: Geert Uytterhoeven Signed-off-by: Linus Walleij commit ae7d1247d8673ebfd686b17e759d4be391165368 Author: Rohit kumar Date: Tue Sep 11 14:59:21 2018 +0530 ASoC: Fix UBSAN warning at snd_soc_get/put_volsw_sx() In functions snd_soc_get_volsw_sx() or snd_soc_put_volsw_sx(), if the result of (min + max) is negative, then fls() returns signed integer with value as 32. This leads to signed integer overflow as complete operation is considered as signed integer. UBSAN: Undefined behaviour in sound/soc/soc-ops.c:382:50 signed integer overflow: -2147483648 - 1 cannot be represented in type 'int' Call trace: [] __dump_stack lib/dump_stack.c:15 [inline] [] dump_stack+0xec/0x158 lib/dump_stack.c:51 [] ubsan_epilogue+0x18/0x50 lib/ubsan.c:164 [] handle_overflow+0xf8/0x130 lib/ubsan.c:195 [] __ubsan_handle_sub_overflow+0x34/0x44 lib/ubsan.c:211 [] snd_soc_get_volsw_sx+0x1a8/0x1f8 sound/soc/soc-ops.c:382 Typecast the operation to unsigned int to fix the issue. Signed-off-by: Rohit kumar Signed-off-by: Mark Brown commit 3637897b6c9bc2f12f38956d64724a6d0bbb56fd Author: Borislav Petkov Date: Tue Sep 11 11:15:10 2018 +0200 x86/paravirt: Clean up native_patch() When CONFIG_PARAVIRT_SPINLOCKS=n, it generates a warning: arch/x86/kernel/paravirt_patch_64.c: In function ‘native_patch’: arch/x86/kernel/paravirt_patch_64.c:89:1: warning: label ‘patch_site’ defined but not used [-Wunused-label] patch_site: ... but those labels can simply be removed by directly calling the respective functions there. Get rid of local variables too, while at it. Also, simplify function flow for better readability. Signed-off-by: Borislav Petkov Reviewed-by: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: virtualization@lists.linux-foundation.org Link: http://lkml.kernel.org/r/20180911091510.GA12094@zn.tnic Signed-off-by: Ingo Molnar commit 65b80dfffeabd4eb253b93d07eadde4d89c18511 Author: Lee Jones Date: Tue Sep 11 11:34:27 2018 +0100 mfd: at91-usart: Include Device Tree header Will ensure 'of_device_id' is declared. Signed-off-by: Lee Jones commit 259e0a00dc7c74617a8b2e33ae3604e4ffaed9cd Author: Lee Jones Date: Tue Sep 11 11:38:50 2018 +0100 spi: at91-usart: Make local functions static Suggested-by: Radu Nicolae Pirea Signed-off-by: Lee Jones commit 8a3813235502b704fe7ee9247689e97a3c165565 Author: Lee Jones Date: Tue Sep 11 11:38:42 2018 +0100 MAINTAINERS: Change Radu's email address Radu is no longer with Microchip. Suggested-by: Radu Nicolae Pirea Signed-off-by: Lee Jones commit 79daf2a4089f6a817e5e0202362cdc764b535561 Author: Suzuki K Poulose Date: Tue Sep 11 09:47:21 2018 +0100 arm64: dts: juno: Enable coresight tmc scatter gather in ETR We do not enable scatter-gather mode in the TMC-ETR by default to prevent malfunctioning of systems where the ETR may not be properly connected to the memory subsystem to allow for simultaneous READ/WRITE transactions when used in SG mode. Instead we whitelist the platforms where we know that it is safe to use the mode. All revisions of Juno have a proper ETR connection and hence white list them. Cc: Mathieu Poirier Cc: Mike Leach Cc: Liviu Dudau Cc: Lorenzo Pierlisi Signed-off-by: Suzuki K Poulose Signed-off-by: Sudeep Holla commit 56060b04c6d2986b6575019143df77c3c379a757 Author: Lee Jones Date: Tue Sep 11 11:38:30 2018 +0100 dt-bindings: mfd: atmel-usart: Correct interrupts property to include IRQ number IRQ number was missing. Suggested-by: Radu Nicolae Pirea Signed-off-by: Lee Jones commit a8b4d4cb9a0f695417b45c8d6718c98cccae43e3 Author: Kuninori Morimoto Date: Fri Sep 7 02:13:48 2018 +0000 pinctrl: rza1: 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: Geert Uytterhoeven commit 63b6d7e762cb434a71588e1a824207f4d65a6745 Author: Kuninori Morimoto Date: Fri Sep 7 02:13:29 2018 +0000 pinctrl: sh-pfc: 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: Geert Uytterhoeven commit 1f86fa15340e77c68a50d3a1ddeaaa6056089875 Author: Alexandru Gheorghe Date: Mon Sep 10 18:29:46 2018 +0100 drm: Clarify DRM_MODE_REFLECT_X/Y documentation DRM_MODE_REFLECT_X and DRM_MODE_REFLECT_Y meaning seems a bit unclear to me, so try to clarify that with a bit of ascii graphics. Changes since v1: - Move the ascii graphics in the kerneldoc where all plane properties are already documented and make sure it's properly rendered, suggestested by Daniel Vetter. Signed-off-by: Alexandru Gheorghe Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20180910172946.18539-1-alexandru-cosmin.gheorghe@arm.com commit 2ef7a12f5529d282370360b53c9ec35edb1416f0 Author: Takeshi Kihara Date: Thu Sep 6 21:40:59 2018 +0900 pinctrl: sh-pfc: r8a77995: Add MSIOF pins, groups and functions This patch adds MSIOF{0,1,2,3} pins, groups and functions to R8A77995 SoC. Signed-off-by: Takeshi Kihara [ykaneko0929@gmail.com: fix the order of definitions] Signed-off-by: Yoshihiro Kaneko Signed-off-by: Geert Uytterhoeven commit 0a7cad486f5d2f56cc8f8ad919ee02cda832baf9 Author: Takeshi Kihara Date: Wed Mar 7 15:58:37 2018 +0900 pinctrl: sh-pfc: r8a77990: Add MSIOF pins, groups and functions This patch adds MSIOF{0,1,2,3} pins, groups and functions to the R8A77990 SoC. Signed-off-by: Takeshi Kihara Reviewed-by: Simon Horman Signed-off-by: Geert Uytterhoeven commit fde35c9c7db5732cc1fbd89fa5eba5a9e0b25f6e Author: Chris Brandt Date: Fri Sep 7 11:58:49 2018 -0500 clk: renesas: cpg-mssr: Add R7S9210 support Add support for the R7S9210 (RZ/A2) Clock Pulse Generator and Module Standby. The Module Standby HW in the RZ/A series is very close to R-Car HW, except for how the registers are laid out. The MSTP registers are only 8-bits wide, there are no status registers (MSTPSR), and the register offsets are a little different. Since the RZ/A hardware manuals refer to these registers as the Standby Control Registers, we'll use that name to distinguish the RZ/A type from the R-Car type. Signed-off-by: Chris Brandt Acked-by: Rob Herring # DT bits Signed-off-by: Geert Uytterhoeven commit 6207ba04347705481d5e4021206179aadeb8e917 Author: Sergei Shtylyov Date: Thu Sep 6 23:28:12 2018 +0300 clk: renesas: r8a77970: Add TMU clocks The TMU clocks weren't present in the original R8A77970 patch by Daisuke Matsushita, they were added in a later BSP version... Based on the original (and large) patch by Vladimir Barinov. Signed-off-by: Vladimir Barinov Signed-off-by: Sergei Shtylyov Signed-off-by: Geert Uytterhoeven commit 5986b503da614df3fccbf90edab3afa4c7550fa1 Author: Sergei Shtylyov Date: Wed Sep 5 19:59:48 2018 +0300 clk: renesas: r8a77970: Add CMT clocks Add the R8A77970 CMT module clocks. Based on the original (and large) patch by Vladimir Barinov. Signed-off-by: Vladimir Barinov Signed-off-by: Sergei Shtylyov Reviewed-by: Chris Paterson Signed-off-by: Geert Uytterhoeven commit ee02950d53eee0d4c7f1c08a35272b77d24b9459 Author: Phil Edworthy Date: Fri Aug 31 12:26:36 2018 +0100 clk: renesas: r9a06g032: Fix UART34567 clock rate The clock for UARTs 0 through 2 is UART012, the clock for UARTs 3 through 7 is UART34567. For UART012, we stop the clock driver from changing the clock rate. This is because the Synopsys UART driver simply sets the reference clock to 16x the baud rate, but doesn't check if the actual rate is within the required tolerance. The RZ/N1 clock divider can't provide this (we have to rely on the UART's internal divider to set the correct clock rate), so you end up with a clock rate that is way off what you wanted. In addition, since the clock is shared between multiple UARTs, you don't want the driver trying to change the clock rate as it may affect the other UARTs (which may not have been configured yet, so you don't know what baud rate they will use). Normally, the clock rate is set early on before Linux to some very high rate that supports all of the clock rates you want. This change stops the UART34567 clock rate from changing for the same reasons. Signed-off-by: Phil Edworthy Fixes: 4c3d88526eba2143 ("clk: renesas: Renesas R9A06G032 clock driver") Signed-off-by: Geert Uytterhoeven commit 8489b17ce29d9a35a36c08bbea93cdce4c98a6ad Author: Qiuxu Zhuo Date: Mon Sep 10 14:11:45 2018 -0700 EDAC, sb_edac: Fix reporting for patrol scrubber errors sb_edac sometimes reports the wrong DIMM for a memory error found by the patrol scrubber. That is because the hardware provides only a 4KB page-aligned address for the error case. This means that the EDAC driver will point at the DIMM matching offset 0x0 in the 4KB page, but because of interleaving across channels and ranks, the actual DIMM involved may be different if the error is on some other cache line within the page. Therefore, reconstruct the socket/iMC/channel information from the "mce" structure passed to the EDAC driver. The DIMM cannot be determined, so pass "dimm=-1" to the EDAC core. It will report that all the DIMMs on that channel may be affected. Signed-off-by: Qiuxu Zhuo Cc: Aristeu Rozanski Cc: Mauro Carvalho Chehab Cc: Qiuxu Zhuo Cc: linux-edac Link: http://lkml.kernel.org/r/20180907230828.13901-3-tony.luck@intel.com [ Improve comments on the functions to convert bank number to memory controller number. Minor cleanup to commit message. ] Signed-off-by: Tony Luck [ Massage commit message more. ] Signed-off-by: Borislav Petkov commit dcc960b225ceb2bd66c45e0845d03e577f7010f9 Author: Qiuxu Zhuo Date: Fri Sep 7 16:08:27 2018 -0700 EDAC, sb_edac: Return early on ADDRV bit and address type test Users of the mce_register_decode_chain() are called for every logged error. EDAC drivers should check: 1) Is this a memory error? [bit 7 in status register] 2) Is there a valid address? [bit 58 in status register] 3) Is the address a system address? [bitfield 8:6 in misc register] The sb_edac driver performed test "1" twice. Waited far too long to perform check "2". Didn't do check "3" at all. Fix it by moving the test for valid address from sbridge_mce_output_error() into sbridge_mce_check_error() and add a test for the type immediately after. Delete the redundant check for the type of the error from sbridge_mce_output_error(). Signed-off-by: Qiuxu Zhuo Cc: Aristeu Rozanski Cc: Mauro Carvalho Chehab Cc: Qiuxu Zhuo Cc: linux-edac Link: http://lkml.kernel.org/r/20180907230828.13901-2-tony.luck@intel.com [ Re-word commit message. ] Signed-off-by: Tony Luck Signed-off-by: Borislav Petkov commit 528d132c86a1f4be68e431edb247dae58f278160 Author: Tony Luck Date: Tue Sep 4 14:07:57 2018 -0700 MAINTAINERS: Update maintainer for drivers/edac/sb_edac.c Change maintainer of sb_edac. Suggested-by: Borislav Petkov Signed-off-by: Tony Luck Cc: Mauro Carvalho Chehab Cc: Mauro Carvalho Chehab Cc: Qiuxu Zhuo Cc: linux-edac Link: http://lkml.kernel.org/r/20180904210759.3814-2-tony.luck@intel.com Signed-off-by: Borislav Petkov commit 8992566bfc047555fc75f746f2f8f4ec59a724b3 Author: Paul Kocialkowski Date: Fri Sep 7 00:24:41 2018 +0200 ARM: dts: sun8i-a33: Add Video Engine and reserved memory nodes This adds nodes for the Video Engine and the associated reserved memory for the A33. Up to 96 MiB of memory are dedicated to the CMA pool. The VPU can only map the first 256 MiB of DRAM, so the reserved memory pool has to be located in that area. Following Allwinner's decision in downstream software, the last 96 MiB of the first 256 MiB of RAM are reserved for this purpose. Signed-off-by: Paul Kocialkowski Acked-by: Maxime Ripard Signed-off-by: Maxime Ripard commit c2a641a74850d40756734545c5ffb600fe8df97c Author: Paul Kocialkowski Date: Fri Sep 7 00:24:40 2018 +0200 ARM: dts: sun7i-a20: Add Video Engine and reserved memory nodes This adds nodes for the Video Engine and the associated reserved memory for the A20. Up to 96 MiB of memory are dedicated to the CMA pool. The VPU can only map the first 256 MiB of DRAM, so the reserved memory pool has to be located in that area. Following Allwinner's decision in downstream software, the last 96 MiB of the first 256 MiB of RAM are reserved for this purpose. Signed-off-by: Paul Kocialkowski Acked-by: Maxime Ripard Signed-off-by: Maxime Ripard commit 960432010156d21145a5ae2648d504b1670fc5c9 Author: Paul Kocialkowski Date: Fri Sep 7 00:24:39 2018 +0200 ARM: dts: sun5i: Add Video Engine and reserved memory nodes This adds nodes for the Video Engine and the associated reserved memory for sun5i-based platforms. Up to 96 MiB of memory are dedicated to the CMA pool. The VPU can only map the first 256 MiB of DRAM, so the reserved memory pool has to be located in that area. Following Allwinner's decision in downstream software, the last 96 MiB of the first 256 MiB of RAM are reserved for this purpose. Signed-off-by: Paul Kocialkowski Acked-by: Maxime Ripard Signed-off-by: Maxime Ripard commit d6142b91e9cc249b3aa22c90fade67e2e2d52cdb Author: Sebastian Andrzej Siewior Date: Tue Sep 11 09:37:12 2018 +0200 usb: core: remove flags variable in __usb_hcd_giveback_urb() In commit ed194d1367698 ("usb: core: remove local_irq_save() around ->complete() handler") I removed the only user of the flags variable and forgot to remove the variable, leading to warning because it is unused now. Remove the unused variable. Fixes: ed194d1367698 ("usb: core: remove local_irq_save() around ->complete() handler") Reported-by: Stephen Rothwell Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Gustavo A. R. Silva Signed-off-by: Greg Kroah-Hartman commit 7645d26f3b35c2bd6e0e1d3867636e5bdad97b1b Author: Zhaoxiong Yuan Date: Sat Sep 8 06:02:10 2018 +1100 dmaengine: idma64: replace spin_lock_irqsave with spin_lock idma64_chan_irq() is invoked in hardirq handle function, it is unnecessary to call spin_lock_irqsave. Signed-off-by: Zhaoxiong Yuan Signed-off-by: Vinod Koul commit 5248092ea47d378a63b27a2ee0c361c9448958e9 Author: YueHaibing Date: Tue Sep 11 06:20:14 2018 +0000 drm: Remove set but not used variable 'config' Fixes gcc '-Wunused-but-set-variable' warning: drivers/gpu/drm/drm_plane.c: In function 'drm_mode_getplane_res': drivers/gpu/drm/drm_plane.c:475:26: warning: variable 'config' set but not used [-Wunused-but-set-variable] Signed-off-by: YueHaibing Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/1536646814-186429-1-git-send-email-yuehaibing@huawei.com commit d426c517a7425dbd8e362051017b8acab20e8818 Author: Paul Cercueil Date: Wed Aug 29 23:33:00 2018 +0200 MIPS: JZ4740: DTS: Add DMA nodes Add the devicetree nodes for the DMA core of the JZ4740 SoC, disabled by default, as currently there are no clients for the DMA driver (until the MMC driver and/or others get a devicetree node). Signed-off-by: Paul Cercueil Tested-by: Mathieu Malaterre Acked-by: Paul Burton Signed-off-by: Vinod Koul commit 6b5b368b5cbd7032dd32ebca88f4fc68b5c099dd Author: Paul Cercueil Date: Wed Aug 29 23:32:59 2018 +0200 MIPS: JZ4770: DTS: Add DMA nodes Add the two devicetree nodes for the two DMA cores of the JZ4770 SoC, disabled by default, as currently there are no clients for the DMA driver (until the MMC driver and/or others get a devicetree node). Signed-off-by: Paul Cercueil Tested-by: Mathieu Malaterre Acked-by: Paul Burton Signed-off-by: Vinod Koul commit f57879a574ae5a3b598187d6ff9c26b5f6479ce0 Author: Paul Cercueil Date: Wed Aug 29 23:32:58 2018 +0200 MIPS: JZ4780: DTS: Update DMA node to match driver changes The driver now accepts two memory resources, the first one for the channel-specific registers, the second one for the controller-specific registers. Note that older devicetrees, without this commit, will still work with the jz4780-dma driver. Signed-off-by: Paul Cercueil Tested-by: Mathieu Malaterre Signed-off-by: Vinod Koul commit 1f0b0f235a84f2ffe3ab826359e63c0fe674a619 Author: Daniel Silsby Date: Wed Aug 29 23:32:57 2018 +0200 dmaengine: dma-jz4780: Use dma_set_residue() This is the standard method provided by dmaengine header. Signed-off-by: Daniel Silsby Signed-off-by: Paul Cercueil Tested-by: Mathieu Malaterre Signed-off-by: Vinod Koul commit 83ef4fb7556b6a673f755da670cbacab7e2c7f1b Author: Daniel Silsby Date: Wed Aug 29 23:32:56 2018 +0200 dmaengine: dma-jz4780: Further residue status fix Func jz4780_dma_desc_residue() expects the index to the next hw descriptor as its last parameter. Caller func jz4780_dma_tx_status(), however, applied modulus before passing it. When the current hw descriptor was last in the list, the index passed became zero. The resulting excess of reported residue especially caused problems with cyclic DMA transfer clients, i.e. ALSA AIC audio output, which rely on this for determining current DMA location within buffer. Combined with the recent and related residue-reporting fixes, spurious ALSA audio underruns on jz4770 hardware are now fixed. Signed-off-by: Daniel Silsby Signed-off-by: Paul Cercueil Tested-by: Mathieu Malaterre Signed-off-by: Vinod Koul commit 9e4e3a4c00c0af333d1c32925b80d12dc571778b Author: Daniel Silsby Date: Wed Aug 29 23:32:55 2018 +0200 dmaengine: dma-jz4780: Set DTCn register explicitly Normally, we wouldn't set the channel transfer count register directly when using descriptor-driven transfers. However, there is no harm in doing so, and it allows jz4780_dma_desc_residue() to report the correct residue of an ongoing transfer, no matter when it is called. Signed-off-by: Daniel Silsby Signed-off-by: Paul Cercueil Tested-by: Mathieu Malaterre Signed-off-by: Vinod Koul commit f3c045dffe738fb2de534a8156f540dff42c315e Author: Daniel Silsby Date: Wed Aug 29 23:32:54 2018 +0200 dmaengine: dma-jz4780: Simplify jz4780_dma_desc_residue() Simple cleanup, no changes to actual logic here. Signed-off-by: Daniel Silsby Signed-off-by: Paul Cercueil Tested-by: Mathieu Malaterre Signed-off-by: Vinod Koul commit 5a6187d70f7fc0b55db49af4b2a0f35f34efd770 Author: Daniel Silsby Date: Wed Aug 29 23:32:53 2018 +0200 dmaengine: dma-jz4780: Add missing residue DTC mask The 'dtc' word in jz DMA descriptors contains two fields: The lowest 24 bits are the transfer count, and upper 8 bits are the DOA offset to next descriptor. The upper 8 bits are now correctly masked off when computing residue in jz4780_dma_desc_residue(). Note that reads of the DTCn hardware reg are automatically masked this way. Signed-off-by: Daniel Silsby Signed-off-by: Paul Cercueil Tested-by: Mathieu Malaterre Signed-off-by: Vinod Koul commit 17a8e30e9daf7f65e06a899d37a043c081334e5d Author: Paul Cercueil Date: Wed Aug 29 23:32:52 2018 +0200 dmaengine: dma-jz4780: Enable Fast DMA to the AIC With the fast DMA bit set, the DMA will transfer twice as much data per clock period to the AIC, so there is little point not to set it. Signed-off-by: Paul Cercueil Tested-by: Mathieu Malaterre Reviewed-by: PrasannaKumar Muralidharan Signed-off-by: Vinod Koul commit ae9156b63d94bb7e4f8be25e0d67326fbd07e0ef Author: Paul Cercueil Date: Wed Aug 29 23:32:51 2018 +0200 dmaengine: dma-jz4780: Add support for the JZ4725B SoC The JZ4725B has one DMA core starring six DMA channels. As for the JZ4770, each DMA channel's clock can be enabled with a register write, the difference here being that once started, it is not possible to turn it off. Signed-off-by: Paul Cercueil Tested-by: Mathieu Malaterre Reviewed-by: PrasannaKumar Muralidharan Signed-off-by: Vinod Koul commit ffaaa8cc4ee644504113c2a480709c59575e2854 Author: Paul Cercueil Date: Wed Aug 29 23:32:50 2018 +0200 dmaengine: dma-jz4780: Add support for the JZ4740 SoC The JZ4740 SoC has a single DMA core starring six DMA channels. Signed-off-by: Paul Cercueil Tested-by: Mathieu Malaterre Reviewed-by: PrasannaKumar Muralidharan Signed-off-by: Vinod Koul commit 29870eb759abf2d3a5fdf89c97906b49cd4521d2 Author: Paul Cercueil Date: Wed Aug 29 23:32:49 2018 +0200 dmaengine: dma-jz4780: Add support for the JZ4770 SoC The JZ4770 SoC has two DMA cores, each one featuring six DMA channels. The major change is that each channel's clock can be enabled or disabled through register writes. Signed-off-by: Paul Cercueil Tested-by: Mathieu Malaterre Signed-off-by: Vinod Koul commit c558ecd21c852c97ff98dc6c61f715ba420ec251 Author: Paul Cercueil Date: Wed Aug 29 23:32:48 2018 +0200 dmaengine: dma-jz4780: Don't depend on MACH_JZ4780 If we make this driver depend on MACH_JZ4780, that means it can be enabled only if we're building a kernel specially crafted for a JZ4780-based board, while most GNU/Linux distributions will want one generic MIPS kernel that works on multiple boards. Signed-off-by: Paul Cercueil Signed-off-by: Vinod Koul commit 5eed7d84bcc0fac063e7c4cbd3ffc9990268049d Author: Paul Cercueil Date: Wed Aug 29 23:32:47 2018 +0200 dmaengine: dma-jz4780: Use 4-word descriptors The only information we use in the 8-word version of the hardware DMA descriptor that is not present in the 4-word version is the transfer type, aka. the ID of the source or recipient device. Since the transfer type will never change for a DMA channel in use, we can just set it once for all in the corresponding DMA register before starting any transfer. This has several benefits: * the driver will handle twice as many hardware DMA descriptors; * the driver is closer to support the JZ4740, which only supports 4-word hardware DMA descriptors; * the JZ4770 SoC needs the transfer type to be set in the corresponding DMA register anyway, even if 8-word descriptors are in use. Signed-off-by: Paul Cercueil Tested-by: Mathieu Malaterre Reviewed-by: PrasannaKumar Muralidharan Signed-off-by: Vinod Koul commit 33633583a23aff572ff6b46a6bc57808b9c9872e Author: Paul Cercueil Date: Wed Aug 29 23:32:46 2018 +0200 dmaengine: dma-jz4780: Separate chan/ctrl registers The register area of the JZ4780 DMA core can be split into different sections for different purposes: * one set of registers is used to perform actions at the DMA core level, that will generally affect all channels; * one set of registers per DMA channel, to perform actions at the DMA channel level, that will only affect the channel in question. The problem rises when trying to support new versions of the JZ47xx Ingenic SoC. For instance, the JZ4770 has two DMA cores, each one with six DMA channels, and the register sets are interleaved: By using one memory resource for the channel-specific registers and one memory resource for the core-specific registers, we can support the JZ4770, by initializing the driver once per DMA core with different addresses. Signed-off-by: Paul Cercueil Tested-by: Mathieu Malaterre Signed-off-by: Vinod Koul commit 6147b032e544105cafaee25b416f7e919c3bb7d3 Author: Paul Cercueil Date: Wed Aug 29 23:32:45 2018 +0200 dmaengine: dma-jz4780: Avoid hardcoding number of channels As part of the work to support various other Ingenic JZ47xx SoC versions, which don't feature the same number of DMA channels per core, we now deduce the number of DMA channels available from the devicetree compatible string. Signed-off-by: Paul Cercueil Tested-by: Mathieu Malaterre Signed-off-by: Vinod Koul commit 54f919a04cf221bc1601d1193682d4379dacacbd Author: Paul Cercueil Date: Wed Aug 29 23:32:44 2018 +0200 dmaengine: dma-jz4780: Return error if not probed from DT The driver calls clk_get() with the clock name set to NULL, which means that the driver could only work when probed from devicetree. From now on, we explicitly require the driver to be probed from devicetree. Signed-off-by: Paul Cercueil Tested-by: Mathieu Malaterre Signed-off-by: Vinod Koul commit 77da5d19af223f5a93254c38db44a0eca63e461a Author: Paul Cercueil Date: Wed Aug 29 23:32:43 2018 +0200 dt-bindings: jz4780-dma: Update bindings to reflect driver changes The driver now expects the devicetree to supply a second memory resource. This resource is mandatory on the newly supported SoCs. For the JZ4780, new devicetree code must also provide it, although the driver is still compatible with older devicetree binaries. Signed-off-by: Paul Cercueil Tested-by: Mathieu Malaterre Reviewed-by: Rob Herring Signed-off-by: Vinod Koul commit e7a3ff92eaf19eab14e8149758428e680c61706b Author: Angelo Dureghello Date: Sun Aug 19 19:27:16 2018 +0200 dmaengine: fsl-edma: add ColdFire mcf5441x edma support This patch adds support for ColdFire mcf5441x-family edma module. The ColdFire edma module is slightly different from fsl-edma, so a new driver is added. But most of the code is common between fsl-edma and mcf-edma so it has been collected into a separate common module fsl-edma-common (patch 1/3). Signed-off-by: Angelo Dureghello Tested-by: Krzysztof Kozlowski Signed-off-by: Vinod Koul commit 4d6d3a90e4acfdcf6134a854da20a061cb9da2a6 Author: Angelo Dureghello Date: Sun Aug 19 19:27:15 2018 +0200 dmaengine: fsl-edma: fix macros This patch fixes macros to use BIT() and GENMASK(), removing also some unneeded. Signed-off-by: Angelo Dureghello Tested-by: Krzysztof Kozlowski Signed-off-by: Vinod Koul commit 377eaf3b3c4ad74efed77e846320188fc312a0e2 Author: Angelo Dureghello Date: Sun Aug 19 19:27:14 2018 +0200 dmaengine: fsl-edma: add edma version and configurable registers This patch adds configurable registers (using __iomem addresses) to allow the use of fsl-edma-common code with slightly different edma module versions, as Vybrid (v1) and ColdFire (v2) are. Signed-off-by: Angelo Dureghello Tested-by: Krzysztof Kozlowski Signed-off-by: Vinod Koul commit 9d831528a6567da92d1ce2a77c575af29068d063 Author: Angelo Dureghello Date: Sun Aug 19 19:27:13 2018 +0200 dmaengine: fsl-edma: extract common fsl-edma code (no changes in behavior intended) This patch adds a new fsl-edma-common module to allow new mcf-edma module code to use most of the fsl-edma code. Signed-off-by: Angelo Dureghello Tested-by: Krzysztof Kozlowski Signed-off-by: Vinod Koul commit 84818af26350c245c8e1994493b7459c0822be5b Author: Steven Rostedt (VMware) Date: Mon Sep 10 21:46:38 2018 -0400 locking/rtmutex: Fix the preprocessor logic with normal #ifdef #else #endif Merging v4.14.68 into v4.14-rt I tripped over a conflict in the rtmutex.c code. There I found that we had: #ifdef CONFIG_DEBUG_LOCK_ALLOC [..] #endif #ifndef CONFIG_DEBUG_LOCK_ALLOC [..] #endif Really this should be: #ifdef CONFIG_DEBUG_LOCK_ALLOC [..] #else [..] #endif This cleans up that logic. Signed-off-by: Steven Rostedt (VMware) Cc: Linus Torvalds Cc: Peter Rosin Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20180910214638.55926030@vmware.local.home Signed-off-by: Ingo Molnar commit a436ff1e96b9e1f34952915fe143a75a4ad8b561 Author: kbuild test robot Date: Wed Aug 29 14:04:26 2018 -0700 dmaengine: pxa: fix semicolon.cocci warnings Remove unneeded semicolon. Generated by: scripts/coccinelle/misc/semicolon.cocci Signed-off-by: kbuild test robot Signed-off-by: Julia Lawall Signed-off-by: Vinod Koul commit 90d23222cf5158d6cc724347e8940b4a87779e30 Author: Vinod Koul Date: Tue Sep 11 11:36:33 2018 +0530 dmaengine: Revert "dmaengine: add COMPILE_TEST for the drivers" We have build failures attributed to turning on COMPILE_TEST, so revert commit 90082cd397aeb: ("dmaengine: add COMPILE_TEST for the drivers") while we fix these. Signed-off-by: Vinod Koul commit 67f7cf9f76bccaadafc41b541e361ddb925c8921 Author: shaoyunl Date: Fri Sep 7 12:00:07 2018 -0400 drm/amdkfd: Only add bi-directional iolink on GPU with XGMI or largebar (v2) v2: compile fix Signed-off-by: shaoyunl Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit ae9a25aea7f33573f56a422818bfead12aa8bfd6 Author: Shaoyun Liu Date: Mon Aug 13 14:04:11 2018 -0400 drm/amdkfd: Generate xGMI direct iolink Generate xGMI iolink for upper level usage Signed-off-by: Shaoyun Liu Reviewed-by: Felix Kuehling Acked-by: Christian König Signed-off-by: Alex Deucher commit aa64ca38ed8253e293b5ce24b40f31f39426e232 Author: Shaoyun Liu Date: Mon Aug 13 14:02:17 2018 -0400 drm/amdkfd: Add new iolink type defines Update the iolink type defines according to the new thunk spec Signed-off-by: Shaoyun Liu Reviewed-by: Felix Kuehling Acked-by: Christian König Signed-off-by: Alex Deucher commit 0c1690e38b5e688166d009145ba0a4806f774465 Author: Shaoyun Liu Date: Fri Jul 6 11:32:42 2018 -0400 drm/amdkfd: kfd expose the hive_id of the device through its node properties Thunk will generate the XGMI topology information when necessary with the hive_id for each specified device Signed-off-by: Shaoyun Liu Reviewed-by: Felix Kuehling Acked-by: Christian König Signed-off-by: Alex Deucher commit db8b62c04b2344f17570186f8f022fb96e71d8d8 Author: Shaoyun Liu Date: Fri Jul 6 11:28:23 2018 -0400 drm/amdgpu: get_hive_id from amdgpu side (v2) Retrieve hive_id from amdgpu device v2: compile fix Signed-off-by: Shaoyun Liu Reviewed-by: Felix Kuehling Acked-by: Christian König Signed-off-by: Alex Deucher commit 6ef22c39edd4b5392e57403d01028c012f3e5e5e Author: Shaoyun Liu Date: Fri Jul 6 11:26:08 2018 -0400 drm/amd/include: Add get_hive_id interface in kfd2kgd KFD need to get hive id from amdgpu to build up the XGMI topology Signed-off-by: Shaoyun Liu Reviewed-by: Felix Kuehling Acked-by: Christian König Signed-off-by: Alex Deucher commit fb30fc59a245512b94a065ee1557d7e1ae88484a Author: Shaoyun Liu Date: Wed Jun 27 17:25:53 2018 -0400 drm/amdgpu : Generate XGMI topology info from driver level Driver will save an array of XGMI hive info, each hive will have a list of devices that have the same hive ID. Signed-off-by: Shaoyun Liu Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 78122127a4180306e2360b7a9e418eed21f76cf3 Author: Shaoyun Liu Date: Tue Aug 14 13:30:00 2018 -0400 drm/amdgpu: Add place holder functions for xgmi topology interface with psp Add dummy function for xgmi function interface with psp Signed-off-by: Shaoyun Liu Reviewed-by: Felix Kuehling Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 6449724058c66408df599cd0b97d9df531137a08 Author: Shaoyun Liu Date: Wed Jun 27 17:24:46 2018 -0400 drm/amdgpu : Add psp function interfaces for XGMI support Place holder for XGMI support Signed-off-by: Shaoyun Liu Reviewed-by: Huang Rui Acked-by: Christian König Signed-off-by: Alex Deucher commit 6fdd68b14a943ead1d0ce1c0c7023cd2dbfde4c2 Author: Alex Deucher Date: Tue Jun 19 16:11:56 2018 -0500 drm/amdgpu/gmc9: Adjust GART and AGP location with xgmi offset (v2) On hives with xgmi enabled, the fb_location aperture is a size which defines the total framebuffer size of all nodes in the hive. Each GPU in the hive has the same view via the fb_location aperture. GPU0 starts at offset (0 * segment size), GPU1 starts at offset (1 * segment size), etc. For access to local vram on each GPU, we need to take this offset into account. This including on setting up GPUVM page table and GART table v2: squash in "drm/amdgpu: Init correct fb region for none XGMI configuration" Acked-by: Huang Rui Acked-by: Slava Abramov Signed-off-by: Shaoyun Liu Signed-off-by: Alex Deucher Reviewed-by: Felix Kuehling Acked-by: Huang Rui commit bf0a60b78b61a7b31bb22e60cc7b2e7fc538d38f Author: Alex Deucher Date: Tue Jun 19 17:03:27 2018 -0500 drm/amdgpu/gmc9: add a new gfxhub 1.1 helper for xgmi Used to populate the xgmi info on vega20. v2: PF_MAX_REGION is val - 1 (Ray) Acked-by: Huang Rui Acked-by: Slava Abramov Reviewed-by :Shaoyun liu Signed-off-by: Alex Deucher Acked-by: Christian König Signed-off-by :Shaoyun liu commit 76a5b36776aa6c0cd75b8080e24d6f69c8eb41a9 Author: Alex Deucher Date: Tue Jun 19 16:00:47 2018 -0500 drm/amdgpu/gmc: add initial xgmi structure to amdgpu_gmc structure Initial pass at a structure to store xgmi info. xgmi is a high speed cross gpu interconnect. Acked-by: Huang Rui Acked-by: Slava Abramov Reviewed-by :Shaoyun liu Signed-off-by: Alex Deucher Signed-off-by: Shaoyun Liu commit 984564031a1a6ab2c87a6b98019065cf476c69d8 Author: Shaoyun Liu Date: Tue Aug 7 11:44:26 2018 -0400 drm/amd/include: update the bitfield define for PF_MAX_REGION Correct the definition based on vega20 register spec Signed-off-by: Shaoyun Liu Reviewed-by: Felix Kuehling Acked-by: Christian König Signed-off-by: Alex Deucher commit 39186aefac362ba3df65a953290ebd025d0c2bf0 Author: Emily Deng Date: Mon Sep 10 17:51:31 2018 +0800 drm/amdgpu: move PSP init prior to IH in gpu reset since we use PSP to program IH regs now Signed-off-by: Monk Liu Acked-by: Christian König Reviewed-by: Huang Rui Signed-off-by: Emily Deng Signed-off-by: Alex Deucher commit fbbf794cbd4872cc4e894ab236d45c97b98008ea Author: Christian König Date: Wed Sep 5 17:04:44 2018 +0200 drm/amdgpu: set bulk_moveable to false when a per VM is released Otherwise we might run into a use after free during bulk move. Signed-off-by: Christian König Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 03f67ed10d8522ea27be348e3f87d88f92043e71 Author: Tao Zhou Date: Fri Sep 7 13:50:31 2018 +0800 drm/amdgpu: Fix SDMA hang in prt mode v2 Fix SDMA hang in prt mode, clear XNACK_WATERMARK in reg SDMA0_UTCL1_WATERMK to avoid the issue Affected ASICs: VEGA10 VEGA12 RV1 RV2 v2: add reg clear for SDMA1 Signed-off-by: Tao Zhou Tested-by: Yukun Li Reviewed-by: Hawking Zhang Acked-by: Christian König Signed-off-by: Alex Deucher commit 28968375a7ec95562e402b43f795e04fd320ae18 Author: Evan Quan Date: Wed Sep 5 10:03:13 2018 +0800 drm/amd/powerplay: fix compile warning for wrong data type V2 do_div expects the 1st argument in 64bit instead of 32bit. Drop the usage of do_div as it seems unnecessary. V2: drop usage of do_div completely Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 989edc699f65bb1f32a31c03619abff5390b9c42 Author: Masanari Iida Date: Thu Sep 6 11:10:57 2018 +0900 drm/amdgpu: Fix warnings while make xmldocs This patch fixes following warnings. ./drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:3011: warning: Excess function parameter 'dev' description in 'amdgpu_vm_get_task_info' ./drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:3012: warning: Function parameter or member 'adev' not described in 'amdgpu_vm_get_task_info' ./drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:3012: warning: Excess function parameter 'dev' description in 'amdgpu_vm_get_task_info' Signed-off-by: Masanari Iida Signed-off-by: Michel Dänzer Signed-off-by: Alex Deucher commit 03e9dee11db0cc244baf21a690fbb0664ab1b1b7 Author: Felix Kuehling Date: Wed Sep 5 20:19:54 2018 -0400 drm/amdgpu: Fix compute VM BO params after rebase v2 The intent of two commits was lost in the last rebase: 810955b drm/amdgpu: Fix acquiring VM on large-BAR systems b5d21aa drm/amdgpu: Don't use shadow BO for compute context This commit restores the original behaviour: * Don't set AMDGPU_GEM_CREATE_NO_CPU_ACCESS for page directories to allow them to be reused for compute VMs * Don't create shadow BOs for page tables in compute VMs v2: move more logic into amdgpu_vm_bo_param Signed-off-by: Felix Kuehling Tested-by: Kent Russell Reviewed-by: Christian König Signed-off-by: Alex Deucher commit c3e1b43c2c1ef9d0eb735cc5e0675100c95b91fa Author: Christian König Date: Mon Aug 27 18:23:11 2018 +0200 drm/amdgpu: enable AGP aperture for GMC9 v2 Enable the old AGP aperture to avoid GART mappings. v2: don't enable it for SRIOV Signed-off-by: Christian König Reviewed-by: Junwei Zhang Signed-off-by: Alex Deucher commit 03a1c08d003bd9354f522d45a6e3dcd529f409c2 Author: Felix Kuehling Date: Fri Aug 31 16:54:12 2018 -0400 drm/amdgpu: Clean up KFD init and fini Only initialize KFD once by moving amdgpu_amdkfd_init from amdgpu_pci_probe to amdgpu_init. This fixes kernel oopses and hangs when booting multi-GPU systems. Also removed some vestiges of KFD being its own module. Signed-off-by: Felix Kuehling Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit afd0384c2af286bcf72ff378e56d6d446d30b52e Author: Jun Lei Date: Wed Aug 22 17:00:34 2018 -0400 drm/amd/display: Add invariant support instrumentation in driver Existing debug dump are all invariant, new “low 32-bit of address” dump is not invariant Signed-off-by: Jun Lei Reviewed-by: Eric Yang Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 6787359b14710488a8646dcd243f78e1846b1037 Author: Chiawen Huang Date: Tue Aug 28 13:38:34 2018 +0800 drm/amd/display: clean code for transition event log. [Why] There are same purpose transition events. [How] remove the redundant event log. Signed-off-by: Chiawen Huang Reviewed-by: Tony Cheng Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 9c09df569ddec780e8be986bbe232520c55f8a3b Author: David Francis Date: Fri Aug 17 14:24:26 2018 -0400 drm/amd/display: Remove call to amdgpu_pm_compute_clocks [Why] The extraneous call to amdgpu_pm_compute_clocks is deprecated. [How] Remove it. Signed-off-by: David Francis Signed-off-by: Leo Li Reviewed-by: David Francis Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit cae50a43b931c6d70c7e16e1128af10398d8635a Author: Eric Yang Date: Fri Aug 24 16:54:14 2018 -0400 drm/amd/display: use link type to decide stream enc acquisition [Why] Virtual sink is used when set mode happens on a disconnected display to allow the mode set to proceed. This did not work with MST because the logic for acquiring stream encoder uses stream signal to determine the special handling is required, and stream signal is virtual instead of DP in this case. [How] Use link type to decide instead. Signed-off-by: Eric Yang Reviewed-by: Tony Cheng Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 2222f4486bbe66dc130296623342cb04ed778968 Author: Tony Cheng Date: Mon Aug 27 13:35:13 2018 -0400 drm/amd/display: dc 3.1.65 Signed-off-by: Tony Cheng Reviewed-by: Steven Chiu Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 43af9e040905ed71a77785b29d81889d87264bcb Author: David Francis Date: Thu Aug 9 10:05:10 2018 -0400 drm/amd/display: Reorder resource_pool to put i2c with aux [Why] The i2c and aux engines are similar, and should be placed next to eachother for readability [How] Reorder the elements of the resource_pool struct Signed-off-by: David Francis Reviewed-by: Tony Cheng Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit a487411a64816458bd4dbac91a1981ec31bb40d4 Author: Leo Li Date: Thu Aug 23 15:28:08 2018 -0400 drm/amd/display: Use DRM helper for best_encoder [Why] Our implementation is functionally identical to DRM's Note that instead of checking if the provided id is 0, the helper follows through with the mode object search. However, It will still return NULL, since 0 is not a valid object id, and missed searches will return NULL. [How] Remove our implementation, and replace it with drm_atomic_helper_best_encoder. Signed-off-by: Leo Li Reviewed-by: David Francis Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 0e8e4fbf8d8905071c045f2922de55adbe1a6abe Author: Hersen Wu Date: Tue Aug 21 09:35:47 2018 -0400 drm/amd/display: num of sw i2c/aux engines less than num of connectors [why] AMD Stoney reference board, there are only 2 pipes (not include underlay), and 3 connectors. resource creation, only 2 I2C/AUX engines are created. Within dc_link_aux_transfer, when pin_data_en =2, refer to enengines[ddc_pin->pin_data->en] = NULL. NULL point is referred later causing system crash. [how] each asic design has fixed number of ddc engines at hw side. for each ddc engine, create its i2x/aux engine at sw side. Signed-off-by: Hersen Wu Reviewed-by: Tony Cheng Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 86a2da705cc29a3a006c6571cadfa45676150622 Author: Chiawen Huang Date: Fri Aug 24 17:45:28 2018 +0800 drm/amd/display: add aux transition event log. [Why] Enhance aux transition debugging information. [How] Added Aux request and reply event log. Signed-off-by: Chiawen Huang Reviewed-by: Tony Cheng Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 491e08c9b858a328e0d7d09a557edd748f2d1b93 Author: Derek Lai Date: Thu Aug 23 15:13:23 2018 +0800 drm/amd/display: add disconnect_delay to dc_panel_patch Some display need disconnect delay. Adding this parameter for future use Signed-off-by: Derek Lai Reviewed-by: Charlene Liu Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit e6ada54126cff629b422924e6497a13ce8bd890d Author: Dmytro Laktyushkin Date: Mon Jul 30 14:45:42 2018 -0400 drm/amd/display: remove unused clk_src code Signed-off-by: Dmytro Laktyushkin Reviewed-by: Charlene Liu Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 5a8132b9f6063b36369b2afd85112ff37d56e183 Author: Dmytro Laktyushkin Date: Tue Aug 14 16:12:54 2018 -0400 drm/amd/display: remove dead dc vbios code Signed-off-by: Dmytro Laktyushkin Reviewed-by: Charlene Liu Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 61ea4c6f70ffd18eed7fc0d3fb678245f499c756 Author: Jun Lei Date: Mon Aug 13 15:11:44 2018 -0400 drm/amd/display: Add driver-side parsing for CM Although 4 unique register values exist for gamma modes, two are actually the same (the two RAMs) It’s not possible for caller to understand this HW specific behavior, so some parsing is necessary in driver Signed-off-by: Jun Lei Reviewed-by: Wesley Chalmers Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 550db288129591c4b2f669d724f12e43a380c286 Author: Gary Kattan Date: Mon Aug 20 15:12:14 2018 -0700 drm/amd/display: Fix DAL217 tests modify DTN logs for other tests [Why]Update Code to get DTN golden log check to pass for tests run after DAL217 tests. [How]Change how dcn10_log_hw_state function prints HW state info (CM_GAMUT_REMAP_Cx_Cx registers) when GAMUT REMAP is in bypass mode. Signed-off-by: Gary Kattan Reviewed-by: Dmytro Laktyushkin Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 182388fcc4c820b34038f474c1a47e9700cd3c09 Author: Eric Bernstein Date: Thu May 24 15:50:27 2018 -0400 drm/amd/display: Add DP YCbCr 4:2:0 support [Why] For supporting DP YCbCr 4:2:0 output. [How] Update mod_build_vsc_infopacket to support Pixel Encoding/Colorimetry Format indication for VSC SDP rev5. Signed-off-by: Eric Bernstein Reviewed-by: Dmytro Laktyushkin Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit a87fa9938749bcdcdec4376e9e7d1ccb39ebbd8a Author: Bhawanpreet Lakha Date: Mon Aug 20 13:32:07 2018 -0400 drm/amd/display: Build stream update and plane updates in dm [Why] We currently lock modeset by setting a boolean in dm. We want to lock Based on what DC tells us. [How] Build stream_updates and plane_update based on what changed. Then we call check_update_surfaces_for_stream() to get the update type We lock only if update_type is not fast Signed-off-by: Bhawanpreet Lakha Reviewed-by: Harry Wentland Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 43c40a02c1b1bbedbf7c1c10392cf885a0bb3f46 Author: Tony Cheng Date: Wed Jul 18 20:30:09 2018 -0400 drm/amd/display: dc 3.1.64 Signed-off-by: Tony Cheng Signed-off-by: Alex Deucher commit 3d5fe658b5b3f3e0d5605a540d6c1a67d9b15735 Author: Christian König Date: Wed Aug 29 14:52:50 2018 +0200 drm/amdgpu: manually map the shadow BOs again Otherwise we won't be able to use the AGP aperture. Signed-off-by: Christian König Reviewed-by: Junwei Zhang Signed-off-by: Alex Deucher commit 485fc361d38aad265239547a2d0a02517576f309 Author: Christian König Date: Mon Aug 27 18:19:48 2018 +0200 drm/amdgpu: use the AGP aperture for system memory access v2 Start to use the old AGP aperture for system memory access. v2: Move that to amdgpu_ttm_alloc_gart Signed-off-by: Christian König Reviewed-by: Junwei Zhang Signed-off-by: Alex Deucher commit d76364fc7fde36b60c592c504f0f0ed636f1d2f3 Author: Christian König Date: Fri Aug 24 12:08:06 2018 +0200 drm/amdgpu: add amdgpu_gmc_agp_location v3 Helper to figure out the location of the AGP BAR. v2: fix a couple of bugs v3: correctly add one to vram_end Signed-off-by: Christian König Reviewed-by: Junwei Zhang Signed-off-by: Alex Deucher commit ad9a5b78f585e9a9bd5ad06dfaf1269659a99f43 Author: Christian König Date: Mon Aug 27 18:22:31 2018 +0200 drm/amdgpu: correctly sign extend 48bit addresses v3 Correct sign extend the GMC addresses to 48bit. v2: sign extending turned out easier than thought. v3: clean up the defines and move them into amdgpu_gmc.h as well Signed-off-by: Christian König Reviewed-by: Junwei Zhang Signed-off-by: Alex Deucher commit bcdc9fd634d1f0949774690e9e79ffdfc5d094c8 Author: Christian König Date: Thu Aug 30 10:27:15 2018 +0200 drm/amdgpu: improve VM state machine documentation v2 Since we have a lot of FAQ on the VM state machine try to improve the documentation by adding functions for each state move. v2: fix typo in amdgpu_vm_bo_invalidated, use amdgpu_vm_bo_relocated in one more place as well. Signed-off-by: Christian König Reviewed-by: Junwei Zhang Signed-off-by: Alex Deucher commit 0a53b69cce846b42adf03ccee49ae0a37a731c20 Author: Christian König Date: Mon Sep 3 10:51:51 2018 +0200 drm/amdgpu: fix amdgpu_mn_unlock() in the CS error path Avoid unlocking a lock we never locked. Signed-off-by: Christian König Reviewed-by: Junwei Zhang Signed-off-by: Alex Deucher commit c12a2ee5d002e39a387001cdb5065b560568b4f5 Author: Christian König Date: Sat Sep 1 13:25:31 2018 +0200 drm/amdgpu: separate per VM BOs from normal in the moved state Allows us to avoid taking the spinlock in more places. Signed-off-by: Christian König Reviewed-by: Junwei Zhang Signed-off-by: Alex Deucher commit c460f8a6f5918c2a8a2354a60b03a71310b943aa Author: Christian König Date: Thu Aug 30 10:31:52 2018 +0200 drm/amdgpu: move size calculations to the front of the file again amdgpu_vm_bo_* functions should come much later. Signed-off-by: Christian König Reviewed-by: Junwei Zhang Signed-off-by: Alex Deucher commit 9a412063f0940d23a5ef393c2607ca9ae9f8f0b7 Author: Evan Quan Date: Thu Aug 30 12:38:45 2018 +0800 drm/amd/powerplay: correct data type to support under voltage For under voltage, negative value will be applied to voltage offset. Update the data type to cover this case. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit d5bf26539494d16dfabbbea0854a47d202ea15c0 Author: Evan Quan Date: Wed Aug 29 14:38:50 2018 +0800 drm/amd/powerplay: added vega20 overdrive support V3 Added vega20 overdrive support based on existing OD sysfs APIs. However, the OD logics are simplified on vega20. So, the behavior will be a little different and works only on some limited levels. V2: fix typo fix commit description revise error logs add support for clock OD V3: separate clock from voltage OD settings Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit b1c1566822ab489a945dfdafee651aa29de160c7 Merge: 1f3eb3461f58 a28957b8f10b Author: Dave Airlie Date: Tue Sep 11 11:52:54 2018 +1000 Merge tag 'drm-intel-next-2018-09-06-2' of git://anongit.freedesktop.org/drm/drm-intel into drm-next Merge tag 'gvt-next-2018-09-04' drm-intel-next-2018-09-06-1: UAPI Changes: - GGTT coherency GETPARAM: GGTT has turned out to be non-coherent for some platforms, which we've failed to communicate to userspace so far. SNA was modified to do extra flushing on non-coherent GGTT access, while Mesa will mitigate by always requiring WC mapping (which is non-coherent anyway). - Neuter Resource Streamer uAPI: There never really were users for the feature, so neuter it while keeping the interface bits for compatibility. This is a long due item from past. Cross-subsystem Changes: - Backmerge of branch drm-next-4.19 for DP_DPCD_REV_14 changes Core Changes: - None Driver Changes: - A load of Icelake (ICL) enabling patches (Paulo, Manasi) - Enabled full PPGTT for IVB,VLV and HSW (Chris) - Bugzilla #107113: Distribute DDB based on display resolutions (Mahesh) - Bugzillas #100023,#107476,#94921: Support limited range DP displays (Jani) - Bugzilla #107503: Increase LSPCON timeout (Fredrik) - Avoid boosting GPU due to an occasional stall in interactive workloads (Chris) - Apply GGTT coherency W/A only for affected systems instead of all (Chris) - Fix for infinite link training loop for faulty USB-C MST hubs (Nathan) - Keep KMS functional on Gen4 and earlier when GPU is wedged (Chris) - Stop holding ppGTT reference from closed VMAs (Chris) - Clear error registers after error capture (Lionel) - Various Icelake fixes (Anusha, Jyoti, Ville, Tvrtko) - Add missing Coffeelake (CFL) PCI IDs (Rodrigo) - Flush execlists tasklet directly from reset-finish (Chris) - Fix LPE audio runtime PM (Chris) - Fix detection of out of range surface positions (GLK/CNL) (Ville) - Remove wait-for-idle for PSR2 (Dhinakaran) - Power down existing display hardware resources when display is disabled (Chris) - Don't allow runtime power management if RC6 doesn't exist (Chris) - Add debugging checks for runtime power management paths (Imre) - Increase symmetry in display power init/fini paths (Imre) - Isolate GVT specific macros from i915_reg.h (Lucas) - Increase symmetry in power management enable/disable paths (Chris) - Increase IP disable timeout to 100 ms to avoid DRM_ERROR (Imre) - Fix memory leak from HDMI HDCP write function (Brian, Rodrigo) - Reject Y/Yf tiling on interlaced modes (Ville) - Use a cached mapping for the physical HWS on older gens (Chris) - Force slow path of writing relocations to buffer if unable to write to userspace (Chris) - Do a full device reset after being wedged (Chris) - Keep forcewake counts over reset (in case of debugfs user) (Imre, Chris) - Avoid false-positive errors from power wells during init (Imre) - Reset engines forcibly in exchange of declaring whole device wedged (Mika) - Reduce context HW ID lifetime in preparation for Icelake (Chris) - Attempt to recover from module load failures (Chris) - Keep select interrupts over a reset to avoid missing/losing them (Chris) - GuC submission backend improvements (Jakub) - Terminate context images with BB_END (Chris, Lionel) - Make GCC evaluate GGTT view struct size assertions again (Ville) - Add selftest to exercise suspend/hibernate code-paths for GEM (Chris) - Use a full emulation of a user ppgtt context in selftests (Chris) - Exercise resetting in the middle of a wait-on-fence in selftests (Chris) - Fix coherency issues on selftests for Baytrail (Chris) - Various other GEM fixes / self-test updates (Chris, Matt) - GuC doorbell self-tests (Daniele) - PSR mode control through debugfs for IGTs (Maarten) - Degrade expected WM latency errors to DRM_DEBUG_KMS (Chris) - Cope with errors better in MST link training (Dhinakaran) - Fix WARN on KBL external displays (Azhar) - Power well code cleanups (Imre) - Fixes to PSR debugging (Dhinakaran) - Make forcewake errors louder for easier catching in CI (WARNs) (Chris) - Fortify tiling code against programmer errors (Chris) - Bunch of fixes for CI exposed corner cases (multiple authors, mostly Chris) Signed-off-by: Dave Airlie From: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20180907105446.GA22860@jlahtine-desk.ger.corp.intel.com commit 02645bcdfcc2d51f79d87ad346f07ef64ad1ea55 Author: Chengguang Xu Date: Sun Sep 9 18:15:56 2018 +0800 jfs: remove quota option from ignore list We treat quota option as usrquota, so remove quota option from ignore list. Signed-off-by: Chengguang Xu Signed-off-by: Dave Kleikamp commit b84d9ab0b7239b22cb9a079e54b01f69b37bc211 Author: Michal Wajdeczko Date: Mon Sep 10 10:41:49 2018 +0000 drm/i915/guc: Update GuC power domain states We should update GuC power domain states also when GuC submission is disabled, otherwise GuC might complain or ignore our requests. This seems to be required for all currently released GuC firmwares. v2: it is only needed by pre-Gen11 firmwares Signed-off-by: Michal Wajdeczko Cc: John Spotswood Cc: Anusha Srivatsa Cc: Tomasz Lis Cc: Daniele Ceraolo Spurio Reviewed-by: Anusha Srivatsa Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20180910104150.101752-1-michal.wajdeczko@intel.com commit 2d00f35c55e74fcb5626c9aa336c1ed697cd2ae9 Author: Simon Shields Date: Sun Sep 9 20:38:25 2018 +1000 leds: add Panasonic AN30259A support AN30259A is a 3-channel LED driver which uses I2C. It supports timed operation via an internal PWM clock, and variable brightness. This driver offers support for basic hardware-based blinking and brightness control. The datasheet is freely available: https://www.alliedelec.com/m/d/a9d2b3ee87c2d1a535a41dd747b1c247.pdf Signed-off-by: Simon Shields Acked-by: Pavel Machek Signed-off-by: Jacek Anaszewski commit 86bc7b2d753ad361bfd358c89a8888bae04c8e5a Author: Simon Shields Date: Sun Sep 9 20:38:24 2018 +1000 dt-bindings: leds: document Panasonic AN30259A bindings Signed-off-by: Simon Shields Acked-by: Pavel Machek Reviewed-by: Rob Herring Signed-off-by: Jacek Anaszewski commit 45d4c6de4e497e5b0026c77044ae5fcddf8fecd8 Author: Linus Walleij Date: Fri Sep 7 00:09:40 2018 +0200 leds: gpio: Try to lookup gpiod from device This augments the GPIO lookup code in the GPIO LEDs to attempt to look up a GPIO descriptor from the device with index. This makes it possible to use GPIO machine look-up tables and stop passing global GPIO numbers through platform data. Using this we can stepwise convert existing board files to use machine descriptor tables and then eventually drop the legacy GPIO support and only include and use descriptors exclusively. Signed-off-by: Linus Walleij Signed-off-by: Jacek Anaszewski commit 0a6ab90c0a8fc8ece91ad2bf7e3310ebb563b32b Author: Chunfeng Yun Date: Fri Aug 31 18:01:54 2018 +0800 usb: core: phy: clean up return value check about devm_of_phy_get_by_index() Use IS_ERR() instead of IS_ERR_OR_NULL() because devm_of_phy_get_by_index() never return NULL value; But still need ignore the error of -ENODEV, for more information, please refer to: [0] https://lkml.org/lkml/2018/4/19/88 [1] https://patchwork.kernel.org/patch/10160181/ Signed-off-by: Chunfeng Yun Reviewed-by: Johan Hovold Reviewed-by: Martin Blumenstingl Signed-off-by: Greg Kroah-Hartman commit 0eae49582b4dee1a0e96007e1dea5122db98371a Author: Chunfeng Yun Date: Wed Aug 29 10:36:50 2018 +0800 usb: mtu3: disable vbus rise/fall interrupts of ltssm The vbus rise & fall interrupts are used to enable and disable U3 function of device automatically, this cause some issues when class driver is initialized as deactivated, and will skip over software-controlled connect by pullup(), but UDC wants to keep disconnect until usb_gadget_activate() is called which calls pullup() if needed. So we disable vbus rise & fall interrupts and just use pullup() to enable & disable U3 function, and reset mtu3 state when disconnect instead when vbus fall. Signed-off-by: Chunfeng Yun Signed-off-by: Greg Kroah-Hartman commit 1973d029d6e91c2e364492a01e53cc8e7cc66b34 Author: Andy Shevchenko Date: Thu Aug 30 13:30:11 2018 +0300 USB: wusbcore: 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 Signed-off-by: Greg Kroah-Hartman commit 9d20bca54b6a92dff75e85dce29b202847b48232 Author: Ding Xiang Date: Thu Aug 30 17:31:18 2018 +0800 usb: misc: fix obsolete function simple_strtoul is obsolete, and use kstrtoint instead Signed-off-by: Ding Xiang Signed-off-by: Greg Kroah-Hartman commit 23feefda22392d44ee4101dfcf946bc87a6c74b3 Author: Gustavo A. R. Silva Date: Thu Aug 23 12:55:27 2018 -0500 usb: iowarrior: replace kmalloc with kmalloc_array A common flaw in the kernel is integer overflow during memory allocation size calculations. In an effort to reduce the frequency of these bugs, kmalloc_array was implemented, which allocates memory for an array, while at the same time detects integer overflow. This patch replaces cases of: kmalloc(a * b, gfp) with: kmalloc_array(a, b, gfp) Reviewed-by: Kees Cook Signed-off-by: Gustavo A. R. Silva Signed-off-by: Greg Kroah-Hartman commit 87f88dfcde0ecde2a1136b8364099dddb9895b12 Author: Alan Stern Date: Tue Aug 28 10:57:25 2018 -0400 USB: OHCI: Remove USB bus reset delay from OHCI handover code Paul pointed out that the 50-ms sleep during OHCI initialization takes up a large fraction of a system's boot time. Things get worse when there are two OHCI controllers present, each requiring 50 ms. However, there really is no need to send a 50-ms reset signal out all the root-hub ports during initialization. The ports themselves will be disabled, and the only way to enable a port is to reset it. Therefore all attached USB devices will receive a proper reset in any case. The controller reset does not need to be long enough to reset those other devices, so the 50-ms delay isn't necessary. Without the delay, there is no remaining incentive for skipping the reset when the controller is already in the RESET state. This patch removes the test, issuing the command unconditionally, and removes the following delay. Signed-off-by: Alan Stern Suggested-by: Paul Menzel Tested-by: Paul Menzel Signed-off-by: Greg Kroah-Hartman commit ffa8a31b5b3b81f12a9d77a574cc0b25bb8e856e Author: Linus Walleij Date: Sat Sep 1 18:03:12 2018 +0200 usb: host: fotg2: add silicon clock handling When used in a system with software-controlled silicon clocks, the FOTG210 needs to grab, prepare and enable the clock. This is needed on for example the Cortina Gemini, where the platform will by default gate off the clock unless the peripheral (in this case the USB driver) grabs and enables the clock. If there is no clock available on the platform, we live without it. Make sure to percolate probe deferrals. Signed-off-by: Linus Walleij Signed-off-by: Greg Kroah-Hartman commit 697fa834c3103cda43107bce1e1c3cfb7a4603ac Author: Colin Ian King Date: Mon Aug 6 12:14:14 2018 +0100 USB: typec: fsusb302: remove unused variables snk_pdo and toggling_mode_name Variables snk_pdo and toggling_mode_name are defined but are not used and hence can be removed. Cleans up clang warnings: warning: 'snk_pdo' defined but not used [-Wunused-const-variable=] warning: 'toggling_mode_name' defined but not used [-Wunused-const-variable=] Signed-off-by: Colin Ian King Reviewed-by: Guenter Roeck Reviewed-by: Heikki Krogerus Signed-off-by: Greg Kroah-Hartman commit 2ccaabeb459a5a40852dec843ca88df7cf86a967 Author: Vladimir Zapolskiy Date: Thu Aug 9 18:30:14 2018 +0300 usb storage: remove inherited SCSI dependency for USB_STORAGE_ENE_UB6250 Because USB_STORAGE build symbol strictly depends on SCSI build symbol, there is no need to specify it again. In addition USB_STORAGE_ENE_UB6250 entry description repeats a note about SCSI dependency from the parent USB_STORAGE entry description, hence the change removes this duplication. Signed-off-by: Vladimir Zapolskiy Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit d1e348491a72c4118a1838377393349d780b2717 Author: Vladimir Zapolskiy Date: Thu Aug 9 18:30:13 2018 +0300 usb storage: group dependent USB storage Kconfig entries together Instead of explicit setting of USB_STORAGE dependency for every underlying build entries, exploit if USB_STORAGE / endif block. The change is a trivial non-functional cleanup, it shortens the Kconfig file and it is expected to reduce zconf parser workload a little. Dependencies of USB_UAS build option are left aside deliberately. Signed-off-by: Vladimir Zapolskiy Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit 71741bd6776aff40bc6e57d458a65d7e41190274 Author: Salil Kapur Date: Sun Aug 5 21:28:08 2018 -0700 USB: Removing NULL check for pool since dma_pool_destroy is safe Removing NULL check for pool since dma_pool_destroy is safe Signed-off-by: Salil Kapur Signed-off-by: Greg Kroah-Hartman commit 4e69817b106e4fb98f7af463d2f951e7b3603c12 Author: Kuninori Morimoto Date: Mon Aug 6 02:29:53 2018 +0000 usb: ehci-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: Greg Kroah-Hartman commit 54a3da1c105ca91c4d32f25c3d9c57a61e9a3467 Merge: 1c8bc7b3de5e 90a3b7f8aba3 Author: Mark Brown Date: Mon Sep 10 18:55:12 2018 +0100 Merge branch 'asoc-4.19' into asoc-4.20 Cirrus conflict commit 1c8bc7b3de5e76cb89aacdc7be1475a028af505f Author: Robert Jarzmik Date: Sat Aug 25 10:46:18 2018 +0200 ASoC: pxa: switch to new ac97 bus support Switch to the new ac97 bus support in sound/ac97 instead of the legacy snd_ac97 one. Signed-off-by: Robert Jarzmik Signed-off-by: Mark Brown commit 8dcb0c90c691de5b79608d04ec7941ef9b3fee9c Author: Akshu Agrawal Date: Mon Sep 10 22:50:27 2018 +0530 ASoC: AMD: Fix simultaneous playback and capture on different channel If capture and playback are started on different channel (I2S/BT) there is a possibilty that channel information passed from machine driver is overwritten before the configuration is done in dma driver. Example: 113.597588: cz_max_startup: ---playback sets BT channel 113.597694: cz_dmic1_startup: ---capture sets I2S channel 113.597979: acp_dma_hw_params: ---configures capture for I2S channel 113.598114: acp_dma_hw_params: ---configures playback for I2S channel This is fixed by having 2 separate instance for playback and capture. Signed-off-by: Akshu Agrawal Signed-off-by: Mark Brown commit e757996cafbeb6b71234a17130674bcd8f44c59e Author: Chuanhua Han Date: Thu Aug 30 16:43:24 2018 +0800 spi: spi-mem: Adjust op len based on message/transfer size limitations We need that to adjust the len of the 2nd transfer (called data in spi-mem) if it's too long to fit in a SPI message or SPI transfer. Fixes: c36ff266dc82 ("spi: Extend the core to ease integration of SPI memory controllers") Cc: Signed-off-by: Chuanhua Han Reviewed-by: Boris Brezillon Signed-off-by: Mark Brown commit 11957be20ff68d7670cb979a1c3ea5482a44b370 Author: Cong Wang Date: Fri Sep 7 13:29:14 2018 -0700 htb: use anonymous union for simplicity cl->leaf.q is slightly more readable than cl->un.leaf.q. Cc: Jamal Hadi Salim Signed-off-by: Cong Wang Signed-off-by: David S. Miller commit 8ecc7c8a1c1662effe10f5894df174e4a5d59da3 Author: Cong Wang Date: Fri Sep 7 13:29:13 2018 -0700 net_sched: remove redundant qdisc lock classes We no longer take any spinlock on RX path for ingress qdisc, so this lockdep annotation is no longer needed. Cc: Jamal Hadi Salim Signed-off-by: Cong Wang Signed-off-by: David S. Miller commit 87d1eb2f72a8af00327aacccd5c1762bb59d602e Author: Hans Verkuil Date: Thu Aug 30 06:18:22 2018 -0400 media: staging/media/mt9t031/Kconfig: remove bogus entry The 'config SOC_CAMERA_IMX074' is a copy-and-paste error and should be removed. This Kconfig is for mt9t031 only. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit ed194d1367698a0872a2b75bbe06b3932ce9df3a Author: Sebastian Andrzej Siewior Date: Mon Sep 10 11:20:00 2018 +0200 usb: core: remove local_irq_save() around ->complete() handler The core disabled interrupts before invocation the ->complete handler because the handler might have expected that interrupts are disabled. All handlers were audited and use proper locking now. With it, the core code no longer needs to disable interrupts before invoking the ->complete handler. Remove local_irq_save() statement before invoking the ->complete handler. Signed-off-by: Sebastian Andrzej Siewior Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit 3f3ff6e0d881366bf7721fd5cf36c16068107138 Author: Sebastian Andrzej Siewior Date: Mon Sep 10 11:19:59 2018 +0200 media: tm6000: use irqsave() in USB's complete callback The USB completion callback does not disable interrupts while acquiring the lock. We want to remove the local_irq_disable() invocation from __usb_hcd_giveback_urb() and therefore it is required for the callback handler to disable the interrupts while acquiring the lock. The callback may be invoked either in IRQ or BH context depending on the USB host controller. Use the _irqsave() variant of the locking primitives. Signed-off-by: Sebastian Andrzej Siewior Acked-by: Mauro Carvalho Chehab Signed-off-by: Greg Kroah-Hartman commit 273925c777420585af1ca18548b73e730043576e Author: Sebastian Andrzej Siewior Date: Mon Sep 10 11:19:58 2018 +0200 media: em28xx-audio: use irqsave() in USB's complete callback The USB completion callback does not disable interrupts while acquiring the lock. We want to remove the local_irq_disable() invocation from __usb_hcd_giveback_urb() and therefore it is required for the callback handler to disable the interrupts while acquiring the lock. The callback may be invoked either in IRQ or BH context depending on the USB host controller. Use the _irqsave() variant of the locking primitives. Cc: Mauro Carvalho Chehab Signed-off-by: Sebastian Andrzej Siewior Acked-by: Mauro Carvalho Chehab Signed-off-by: Greg Kroah-Hartman commit 86c55361e569400b6286f30283a9c143a18c20d9 Author: Vlad Buslov Date: Fri Sep 7 17:22:21 2018 +0300 net: sched: cls_flower: dump offload count value Change flower in_hw_count type to fixed-size u32 and dump it as TCA_FLOWER_IN_HW_COUNT. This change is necessary to properly test shared blocks and re-offload functionality. Signed-off-by: Vlad Buslov Acked-by: Jiri Pirko Signed-off-by: David S. Miller commit 78f26da3ffbce0ea3692a89fe3f5487cb8dda068 Author: Vicente Bergas Date: Mon Sep 10 18:10:29 2018 +0200 arm64: dts: rockchip: Add type-c port supply on rk3399-sapphire board Add the gpio-controlled regulator and add the supply to the otg-port of phy0. Signed-off-by: Vicente Bergas Signed-off-by: Heiko Stuebner commit 4bac3cc22559c0e2ce2679131711f2be2cf6cc2b Author: Cedric Roux Date: Fri Sep 7 23:54:46 2018 +0200 ARM: s3c24xx: Correct SD card write protect detection on Mini2440 The mini2440 computer uses "active high" to signal that the "write protect" of the inserted MMC is set. The current code uses the opposite, leading to a wrong detection of write protection. The solution is simply to use ".wprotect_invert = 1" in the description of the MMC. Signed-off-by: Cedric Roux Signed-off-by: Krzysztof Kozlowski commit 511038fa6689feb264a7765de82565f9cf0fa88b Author: Krzysztof Kozlowski Date: Mon Sep 10 19:03:41 2018 +0200 ARM: s3c24xx: Consistently use tab for indenting member assignments Code was mixing spaces and tabs for indenting members in structures. Signed-off-by: Krzysztof Kozlowski commit fd2b803fa8ef3dd4b6c6a71d5f33bac7ccd76d18 Merge: 0153167aebd0 8b9db0d0aa3e Author: David S. Miller Date: Mon Sep 10 10:07:01 2018 -0700 Merge branch 'skb_list_cleanups' David Miller says: ==================== SKB list handling cleanups This is a preparatory patch series which cleans up various forms of sloppy SKB list handling, and makes certain semantics explicit. We are trying to eliminate code that directly accesses the SKB list and SKB queue head next/prev members in any way. It is impossible to convert SKB queue head over the struct list_head while such code exists. This patch series does not eliminate all such code, only the simplest cases. A latter series will tackle the complicated ones. A helper is added to make the "skb->next == NULL means not on a list" rule explicit, and another is added to combine this with list_del(). ==================== Signed-off-by: David S. Miller commit 8b9db0d0aa3e7fccc4317f6dd5dfbca97bb22009 Author: David S. Miller Date: Wed Aug 22 16:50:17 2018 -0700 rtl818x: Remove SKB list assumptions. Eliminate the assumption that SKBs and SKB list heads can be cast to eachother in SKB list handling code. Signed-off-by: David S. Miller commit 6effee6840af7d1adfde296f987b3d3213b3037d Author: David S. Miller Date: Wed Aug 22 16:43:34 2018 -0700 can: Remove SKB list assumptions in rx-offload.c Eliminate code which assumes that SKBs and skb_queue_head objects can be cast to eachother during list processing. Signed-off-by: David S. Miller commit 992cba7e276d438ac8b0a8c17b147b37c8c286f7 Author: David S. Miller Date: Tue Jul 31 15:27:56 2018 -0700 net: Add and use skb_list_del_init(). It documents what is happening, and eliminates the spurious list pointer poisoning. In the long term, in order to get proper list head debugging, we might want to use the list poison value as the indicator that an SKB is a singleton and not on a list. Signed-off-by: David S. Miller commit a8305bff685252e80b7c60f4f5e7dd2e63e38218 Author: David S. Miller Date: Sun Jul 29 20:42:53 2018 -0700 net: Add and use skb_mark_not_on_list(). An SKB is not on a list if skb->next is NULL. Codify this convention into a helper function and use it where we are dequeueing an SKB and need to mark it as such. Signed-off-by: David S. Miller commit 776f07ee303a5e13970cbfaed767e28cbab4002f Author: David S. Miller Date: Sat Aug 11 21:19:19 2018 -0700 brcmfmac: Use __skb_peek(). Instead of direct SKB list pointer accesses. In these situations, we absolutely know that the SKB queue in question is non-empty. Signed-off-by: David S. Miller commit 250bb6f0f8240a6addbb3fe9c9dbd4abd79503c8 Author: David S. Miller Date: Tue Aug 7 23:45:01 2018 -0700 staging: rtl8192e: Use __skb_peek(). Instead of direct list head pointer accesses. Signed-off-by: David S. Miller commit 1173ab7b62024c9247ba1843f240512fc0cb41a4 Author: David S. Miller Date: Tue Aug 7 23:43:51 2018 -0700 bnx2fc_fcoe: Use skb_queue_walk_safe(). Instead of direct list pointer accesses. Signed-off-by: David S. Miller commit e3554197fc8fbb9656f62c18f9c9edd396394e16 Author: David S. Miller Date: Tue Aug 7 23:42:03 2018 -0700 p54: Use skb_peek_tail() instead of direct head pointer accesses. Signed-off-by: David S. Miller commit 1181d629cc135fe346216c66f0f1fb9bfca51b33 Author: David S. Miller Date: Mon Aug 6 23:25:13 2018 -0700 sctp: Use skb_queue_is_first(). Instead of direct skb_queue_head pointer accesses. Signed-off-by: David S. Miller commit e42a43a5cab2e019b5ab82bedb1340854709154d Author: David S. Miller Date: Mon Aug 6 23:12:17 2018 -0700 lan78xx: Do not access skb_queue_head list pointers directly. Use skb_queue_walk() instead. Adjust inner loop test to utilize and skb_queue_is_first(). Unfortunately we have to keep pkt_cnt around because it is used by a latter loop in this function. Signed-off-by: David S. Miller commit 7957a9dea8bf58b02e6ebf28f91c4bce74b5c91c Author: David S. Miller Date: Mon Aug 6 22:49:13 2018 -0700 mac80211: Don't access sk_queue_head->next directly. Use __skb_peek() instead. Signed-off-by: David S. Miller commit 8b69bd7d8a8927d537f134c37bcca6cbfa58e1b2 Author: David S. Miller Date: Sat Aug 11 18:43:38 2018 -0700 ppp: Remove direct skb_queue_head list pointer access. Add a helper, __skb_peek(), and use it in ppp_mp_reconstruct(). Signed-off-by: David S. Miller commit 0c69198d81dcf4918d9cf5fe72504eecdd49f839 Author: David S. Miller Date: Sun Aug 5 12:57:30 2018 -0700 infiniband: nes: Use skb_peek_next() and skb_queue_walk(). Instead of direct SKB list accesses. Signed-off-by: David S. Miller commit 596977300ab5c5d5d85f7950dd7f299f8322e533 Author: David S. Miller Date: Sun Jul 29 16:33:28 2018 -0700 sch_netem: Move private queue handler to generic location. By hand copies of SKB list handlers do not belong in individual packet schedulers. Signed-off-by: David S. Miller commit aea890b8b2e071bb75043353581f2197a2f13160 Author: David S. Miller Date: Sun Jul 29 16:22:13 2018 -0700 sch_htb: Remove local SKB queue handling code. Instead, adjust __qdisc_enqueue_tail() such that HTB can use it instead. The only other caller of __qdisc_enqueue_tail() is qdisc_enqueue_tail() so we can move the backlog and return value handling (which HTB doesn't need/want) to the latter. Signed-off-by: David S. Miller commit 0153167aebd0808fb90031dba07d4e696557474c Author: David Ahern Date: Mon Sep 10 09:11:28 2018 -0700 net/ipv6: Remove rt6i_prefsrc After the conversion to fib6_info, rt6i_prefsrc has a single user that reads the value and otherwise it is only set. The one reader can be converted to use rt->from so rt6i_prefsrc can be removed, reducing rt6_info by another 20 bytes. Signed-off-by: David Ahern Signed-off-by: David S. Miller commit 25290bfc120df09bd81f41194e37c84f59792c77 Author: Colin Ian King Date: Mon Sep 10 13:17:22 2018 +0100 cxgb4: remove redundant assignment to vlan_cmd.dropnovlan_fm A recent commit updated vlan_cmd.dropnovlan_fm but failed to remove the older assignment. Fix this by removing the former redundant assignment. Detected by CoverityScan, CID#1473290 ("Unused value") Fixes: a89cdd8e7c74 ("cxgb4: impose mandatory VLAN usage when non-zero TAG ID") Signed-off-by: Colin Ian King Signed-off-by: David S. Miller commit e728e4f2010063ac0f3a4f220cca14b3a334469d Author: Cedric Roux Date: Fri Sep 7 23:54:45 2018 +0200 ARM: s3c24xx: formatting cleanup in mach-mini2440.c Running: scripts/checkpatch.pl -f arch/arm/mach-s3c24xx/mach-mini2440.c revealed several errors and warnings. They were all removed, except one which is an #if 0 around the declaration of a gpio pin. This needs some more investigation and I prefer to let it here. This is not some dead code. 'printk' was replaced by 'pr_info'. Signed-off-by: Cedric Roux Signed-off-by: Krzysztof Kozlowski commit 6d57be7f1bab3580a68468bb87646b24f6c2cd87 Author: Marek Szyprowski Date: Fri Sep 7 09:47:13 2018 +0200 ARM: dts: exynos: Add external SD card support for Trats board Enable support for SDHCI controller number 2 and add required regulator for external SD card. Signed-off-by: Marek Szyprowski Signed-off-by: Krzysztof Kozlowski commit 62623718fd31d08b26ebea6c8b40f24924153ab7 Author: Marek Szyprowski Date: Fri Sep 7 09:46:59 2018 +0200 ARM: dts: exynos: Disable pull control for PMIC IRQ line on Artik5 board S2MPS14 PMIC interrupt line on Exynos3250-based Artik5 evaluation board has external pull-up resistors, so disable any pull control for it in controller node. This fixes support for S2MPS14 PMIC interrupts and enables operation of wakeup from S2MPS14 RTC alarm. Signed-off-by: Marek Szyprowski Signed-off-by: Krzysztof Kozlowski commit 702ec3072ae61cdf018725b353ff043e196548a6 Author: Al Viro Date: Thu Aug 16 21:55:55 2018 -0400 hidp: fix compat_ioctl 1) no point putting it into fs/compat_ioctl.c when you handle it in your ->compat_ioctl() anyway. 2) HIDPCONNADD is *not* COMPATIBLE_IOCTL() stuff at all - it does layout massage (pointer-chasing there) 3) use compat_ptr() Signed-off-by: Al Viro commit 535221481a8ed131e75c7f04c22298411b5abe32 Author: Al Viro Date: Thu Aug 16 21:44:35 2018 -0400 hidp: constify hidp_connection_add() Signed-off-by: Al Viro commit 89c0c24b4fa137cc846f50b3595f42e5f19da13b Author: Al Viro Date: Thu Aug 16 21:37:56 2018 -0400 cmtp: fix compat_ioctl Use compat_ptr(). And don't mess with fs/compat_ioctl.c Signed-off-by: Al Viro commit cc04f6e2421ad0da0f44f0fbf8e8259f3966f2a1 Author: Al Viro Date: Thu Aug 16 21:33:23 2018 -0400 bnep: fix compat_ioctl use compat_ptr() properly and don't bother with fs/compat_ioctl.c - it's all handled in ->compat_ioctl() anyway. Signed-off-by: Al Viro commit 0976d4e1dc8a07bd394c717ae9868c21b253d503 Author: Al Viro Date: Thu Aug 16 21:10:42 2018 -0400 compat_ioctl: trim the pointless includes Signed-off-by: Al Viro commit 1a63fe9a2b1f47af5b2b7436b41824b14999c17a Author: Quentin Perret Date: Mon Sep 10 17:28:10 2018 +0100 firmware: arm_scmi: add a getter for power of performance states The SCMI protocol can be used to get power estimates from firmware corresponding to each performance state of a device. Although these power costs are already managed by the SCMI firmware driver, they are not exposed to any external subsystem yet. Fix this by adding a new get_power() interface to the exisiting perf_ops defined for the SCMI protocol. Signed-off-by: Quentin Perret Signed-off-by: Sudeep Holla commit 422e91cc48f8661273311e96cee9d8b1115aa788 Author: Jacopo Mondi Date: Fri Aug 3 12:40:58 2018 +0200 media: i2c: mt9v111: Fix v4l2-ctrl error handling Fix error handling of v4l2_ctrl creation by inspecting the ctrl.error flag instead of testing for each returned value correctness. As reported by Dan Carpenter returning PTR_ERR() on the v4l2_ctrl_new_std() return value is also wrong, as that function return NULL on error. While at there re-order the cleanup path to respect the operation inverse order. Fixes: aab7ed1c "media: i2c: Add driver for Aptina MT9V111" Reported-by: Dan Carpenter Signed-off-by: Jacopo Mondi Signed-off-by: Sakari Ailus commit 7aaaabd50d785e30b290054b3a1b115393927da3 Author: Ajay Singh Date: Tue Sep 4 12:09:42 2018 +0530 staging: wilc1000: remove handle_hif_exit_work() function Cleanup to remove handle_hif_exit_work(), as after code refactoring its not required anymore. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit a53b0b1392a1bf11d21bac3e13f543ee90923ed6 Author: Ajay Singh Date: Tue Sep 4 12:09:41 2018 +0530 staging: wilc1000: refactor wilc_netdev_init() to handle memory free in error path Refactor the wilc_netdev_init() to cleanup the memory for error scenario and remove unnecessary 'dev' pointer check. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit b3ee105c332efc49199e138822923be3562619aa Author: Ajay Singh Date: Tue Sep 4 12:09:40 2018 +0530 staging: wilc1000: refactor code to move initilization in wilc_netdev_init() Refactor code to move the initialization of wilc related parameters in wilc_netdev_init() and move their deinitialization in wilc_netdev_cleanup(). For 'hif_workqueue' creation 'clients_count' check is not required as the single instance is maintained. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit 28ab936ed10132f903b1b67ec6de1da9595d4b51 Author: Ajay Singh Date: Tue Sep 4 12:09:39 2018 +0530 staging: wilc1000: remove unnecessary static variable 'p2p_listen_state' Remove the use of unnecessary static variable 'p2p_listen_state'. Already 'p2p_listen_state' is present in 'wilc_priv' struct. So making use of that variable as its getting set in channel ready and remain on channel expired callback. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit 804146b4bda386aefacdece4c5ab919940c02b12 Author: Ajay Singh Date: Tue Sep 4 12:09:38 2018 +0530 staging: wilc1000: move 'wilc_connecting' static variable to 'wilc_vif' struct Move static variable 'wilc_connecting' as part of 'wilc_vif' private struct. Remove "wilc_" prefix from name as its already part of wilc_vif struct. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit 3124a1f7bff4d304dea115d92e6f380af49574ef Author: Ajay Singh Date: Tue Sep 4 12:09:37 2018 +0530 staging: wilc1000: move 'chip_ps_state' static variable as part of 'wilc' struct Move the static variable as part of 'wilc' priv struct. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit abff8e335350c24a2b0c9779e466b41a75b69fdc Author: Ajay Singh Date: Tue Sep 4 12:09:36 2018 +0530 staging: wilc1000: remove unused code to set and get IP address Cleanup code to remove the variables related to setting and getting IP address as this case was not handled from firmware side. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit f31e5584dc555fd9a9135af8343983edf23e95f1 Author: Ajay Singh Date: Tue Sep 4 12:09:35 2018 +0530 staging: wilc1000: use short names to fix over 80 issue in tcp_process() Use short variable names to avoid line over 80 chars checkpatch warning in tcp_process(). struct pending_acks_info --> struct pending_ack int tcp_pending_ack_idx --> int ack_idx u32 pending_ack --> u32 pending_ack_idx Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit a3178da4520bbfac6a366a3a25df67f907a1213a Author: Ajay Singh Date: Tue Sep 4 12:09:34 2018 +0530 staging: wilc1000: avoid line over 80 chars in wilc_wlan_txq_filter_dup_tcp_ack() Cleanup patch to avoid line over 80 chars checkpatch issue introduced in previous code refactor commit. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit 77792652d602867527f45739d5411bbb8d7010c8 Merge: 11da3a7f84f1 c24d25317a7c Author: Greg Kroah-Hartman Date: Mon Sep 10 18:00:43 2018 +0200 Merge tag 'ib-mfd-spi-tty-v4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd into tty-next Immutable branch between MFD, SPI and TTY due for the v4.20 merge window commit d31ca7e5d0fa066d59540859af32ab6f95adb519 Author: Richard Fitzgerald Date: Thu Aug 30 14:20:04 2018 +0100 mfd: madera: Add irqchip data pointer into struct madera Put the pointer to struct regmap_irq_chip_data into the parent mfd structure so that the child irqchip driver does not need a trivial private structure to store only this pointer. As the irqchip child driver already has a pointer to the parent struct madera it can use that to store the pointer. This also means that the irqchip driver does not need a double-indirection from its local struct to get at the parent struct madera. Signed-off-by: Richard Fitzgerald Signed-off-by: Lee Jones commit a1f33941f7e103bcf471eaf8461b212223c642d6 Author: Julien Thierry Date: Thu Sep 6 12:09:56 2018 +0100 arm64: uaccess: implement unsafe accessors Current implementation of get/put_user_unsafe default to get/put_user which toggle PAN before each access, despite having been told by the caller that multiple accesses to user memory were about to happen. Provide implementations for user_access_begin/end to turn PAN off/on and implement unsafe accessors that assume PAN was already turned off. Tested-by: Will Deacon Signed-off-by: Julien Thierry Signed-off-by: Catalin Marinas commit 95e05b4bf22fe93c3a33fbfbe5e437e9cbadfbfa Author: Ajay Singh Date: Tue Sep 4 12:09:33 2018 +0530 staging: wilc1000: move tcp_ack_filter algo related variables to 'wilc_vif' struct Avoid use of static variables and move them as part of wilc_vif struct. Move all the parameters related to tcp_ack_filter algo to wilc_vif struct. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit 72f36b5b815281120aa5e7af8dc1f0c25f327c90 Author: Ajay Singh Date: Tue Sep 4 12:09:32 2018 +0530 staging: wilc1000: use lowercase for get_BSSID() and HIL variable Cleanup patch to use lowercase name for get_BSSID() and HIL variable. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit 7ec6f7f275ff1500012f0010e98b38043dfd6437 Author: Ajay Singh Date: Tue Sep 4 12:09:31 2018 +0530 staging: wilc1000: refactor tcp_process() to avoid extra leading tabs Refactor tcp_process() to avoid unnecessary leading tabs in the function. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit 83a953e2a772093b1713897147d11b76d9f86cb6 Author: Ajay Singh Date: Tue Sep 4 12:09:30 2018 +0530 staging: wilc1000: move 'rcv_assoc_resp' as part of hif_drv Avoid use of static variable and move 'rcv_assoc_resp' as part of 'hif_drv' struct. Rename from 'rcv_assoc_resp' to 'assoc_resp'. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit 8b89ba7611af854b023179868ee15297aa3d4540 Author: Ajay Singh Date: Tue Sep 4 12:09:29 2018 +0530 staging: wilc1000: rename 'dummy_statistics' variable to 'periodic_stat' Cleanup patch to use appropriate variable name to fetch the periodic statistics. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit 5fefe58f7ffdd6f0d1e2cf4bfc5ba073c1aa7394 Author: Ajay Singh Date: Tue Sep 4 12:09:28 2018 +0530 staging: wilc1000: move 'periodic_rssi' as part of 'wilc_vif' struct Refactor code to move 'periodic_rssi' as part of wilc_vif struct. Move 'dummy_statistics' from 'wilc' struct to 'wilc_vif' to maintain for each interface separately. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit 87de37fe2ad438ddb076095bcdb9595823f92b1b Author: Ajay Singh Date: Tue Sep 4 12:09:27 2018 +0530 staging: wilc1000: move hif_workqueue static variables to 'wilc' structure Avoid use of static variable hif_workqueue and move it inside 'wilc' structure. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit e624c58cf8eb5116000f84b268932c6414c6999b Author: Ajay Singh Date: Tue Sep 4 12:09:26 2018 +0530 staging: wilc1000: refactor code to avoid use of wilc_set_multicast_list global Refactor the code to avoid use of 'wilc_set_multicast_list' global variable. Allocate the memory required to keep the multicast mac address and pass it to the worker thread. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit 0b68334d487a348a99e39a2aaee7ae4db3e8fcc9 Author: Ajay Singh Date: Tue Sep 4 12:09:25 2018 +0530 staging: wilc1000: move static variable clients_count to 'wilc' structure Avoid use of static variable 'clients_count' and move it part of 'wilc' structure. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit 6bccf8fc6cfc48718d838165916020c9fc9b0239 Author: Ajay Singh Date: Tue Sep 4 12:09:24 2018 +0530 staging: wilc1000: avoid use of extra 'if' condition in wilc_init() Cleanup patch to avoid the avoid extra 'if' condition and clubbed the same condition in single 'if' block. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit 7814fb6ca83444ee86b129a04531a19a3fb7077b Author: Ajay Singh Date: Tue Sep 4 12:09:23 2018 +0530 staging: wilc1000: remove unused variable 'op_ifcs' After code refactor in previous commit now 'op_ifcs' is not require any more, so remove it. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit aa6ed22a0345da354bfcabf93b79836a6336441b Author: Ajay Singh Date: Tue Sep 4 12:09:22 2018 +0530 staging: wilc1000: move during_ip_timer & wilc_optaining_ip to 'wilc_vif' struct Move global variable 'wilc_during_ip_timer' and 'wilc_optaining_ip' to 'wilc_vif' structure. Rename these variables like below wilc_during_ip_timer -> during_ip_timer wilc_optaining_ip -> obtaining_ip. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit 0e866cfb0dd973e6d3d7f472d05a6e5f386510b0 Author: Ajay Singh Date: Tue Sep 4 12:09:21 2018 +0530 staging: wilc1000: moved last_scanned_shadow & last_scanned_cnt to wilc_priv struct Avoid use of static variables and moved the varibles as part of private data. last_scanned_shadow & last_scanned_cnt variable is moved to 'wilc_priv' to maintain for each interface. After moving static variable, clear_shadow_scan() doesn't require check 'op_ifcs' count as now for each interface the againg timer is initiated. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit 009324daf6a021cb5978b1bcb8b53018c191e1ab Author: Ajay Singh Date: Tue Sep 4 12:09:20 2018 +0530 staging: wilc1000: remove unnecessary NULL check in clear_shadow_scan() Cleanup patch to remove the unnecessary NULL check before freeing up ies information in clear_shadow_scan(). Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit 19707ca2953b8190de4475f7c7c32949badee191 Author: Ajay Singh Date: Tue Sep 4 12:09:19 2018 +0530 staging: wilc1000: fix to use correct index to free scanned info in clear_shadow_scan() Fixes to use correct index to free the allocated memory for ies information. The check was done using 'last_scanned_cnt' index and its not correct, so use the correct index ('i') to check for before freeing the allocated memory. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit 1803da60f7c208cb7138f289dfc6d05fe49e1bd3 Author: Ajay Singh Date: Tue Sep 4 12:09:18 2018 +0530 staging: wilc1000: move 'aging_timer' static variable to wilc_priv struct Moved 'aging_timer' to wilc_priv struct instead of having it as static variable. As 'aging_timer' is maintained for each interfaces so 'op_ifcs' check is not required before the timer_setup() and del_timer_sync() call. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit 4cf13399537e34067cf0d652dfbaf82d8793a9fc Author: Ajay Singh Date: Tue Sep 4 12:09:17 2018 +0530 staging: wilc1000: move 'wilc_enable_ps' global variable into 'wilc' struct Instead of having 'wilc_enable_ps' as global variable moved it to 'wilc' structure. Rename 'wilc_enable_ps' to 'enable_ps' as its already part of 'wilc' structure Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit 4733c7c79e8c466fedb4fd4eb29bfc5b1bdb336f Author: Will Deacon Date: Wed Sep 5 15:12:27 2018 +0100 arm64: dump: Use consistent capitalisation for page-table dumps Being consistent in our capitalisation for page-table dumps helps when grepping for things like "end". Signed-off-by: Will Deacon Signed-off-by: Catalin Marinas commit c24d25317a7c6bb3053d4c193b3cf57d1e9a3e4b Author: Radu Pirea Date: Fri Jul 13 19:47:36 2018 +0300 tty/serial: atmel: Change the driver to work under at91-usart MFD This patch modifies the place where resources and device tree properties are searched. Signed-off-by: Radu Pirea Reviewed-by: Andy Shevchenko Acked-by: Richard Genoud Acked-by: Nicolas Ferre Acked-by: Greg Kroah-Hartman Signed-off-by: Lee Jones commit d5c69c96798f908679bccc453547a65870bcf709 Author: Colin Ian King Date: Thu Sep 6 13:32:07 2018 +0100 staging: rtl8723bs: check for i out of range before accessing szLine[i] Currently szLine[i] is being accessed before the index i is being ranged checked. Fix this by checking the range first. Also, evaluate the length of the string szLine just once rather than multiple times and move the loop variable i to an inner scope and make it an int. Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman commit ec3d17acd6a6778329fd6b7237d1bda3e0b94688 Author: André Lehmann Date: Wed Sep 5 23:17:27 2018 +0200 Staging: rtl8712: Add space between else and opening brace issue found by checkpatch Signed-off-by: André Lehmann Signed-off-by: Greg Kroah-Hartman commit dacdf6a6590073753a171cf73d65555c94daecc8 Author: Sidong Yang Date: Tue Sep 4 16:21:03 2018 +0000 staging: rtl8192u: ieee80221: Add missing space Fix checkpatch.pl errors that missing space before ','. Signed-off-by: Sidong Yang Signed-off-by: Greg Kroah-Hartman commit 001dd86bb1ab31dc5c1c497e5b908aff60e7694b Author: John Whitmore Date: Sat Sep 8 10:44:09 2018 +0100 staging:rtl8192u: Remove typedef from enum opt_rst_type_e - Style Remove the typedef directive from enumerated type opt_rst_type_e, this change clears the checkpatch issue with defining new types in the code. This is a coding style change which should not impact runtime code execution. Signed-off-by: John Whitmore Signed-off-by: Greg Kroah-Hartman commit 2c226ff18c13c019c8ca20247aa8d3046eae3f84 Author: John Whitmore Date: Sat Sep 8 10:44:08 2018 +0100 staging:rtl8192u: Remove typedef from firmware_init_step_e - Style Remove the typedef directive from enumerated type firmware_init_step_e this clears the checkpatch issue with adding new types to the code. This is a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore Signed-off-by: Greg Kroah-Hartman commit 6b525447d134567e3ce5e131c4f9732d6e96dd2c Author: John Whitmore Date: Sat Sep 8 10:44:07 2018 +0100 staging:rtl8192u: Refactor GET_COMMAND_PACKET_FRAG_THRESHOLD - Style The MACRO GET_COMMAND_PACKET_FRAG_THRESHOLD causes a number of checkpatch issues so has been refactored to use braces around the parameter 'v' to avoid precedence issues, and to add spaces around operators. These changes are coding style changes which should have no impact on runtime code execution. Signed-off-by: John Whitmore Signed-off-by: Greg Kroah-Hartman commit 6b32882b8c91bf24f5387b7f6c4144942b9d4080 Author: John Whitmore Date: Sat Sep 8 10:44:06 2018 +0100 staging:rtl8192u: Remove unused RTL8190_CPU_START_OFFSET - Style The defined constant RTL8190_CPU_START_OFFSET is not used in the code so has been removed. This is a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore Signed-off-by: Greg Kroah-Hartman commit 639bcec974dc41f131d8d7e4292d2b93e85fb0f5 Author: John Whitmore Date: Sat Sep 1 00:02:38 2018 +0100 staging:rtl8192u: Fix space characters - Style Fix the spacing issues, remove space after cast operation, and replace spaces at start of line with tab. These changes are purely coding style changes to resolve checkpatch issues. There should be no impact on runtime code execution. Signed-off-by: John Whitmore Signed-off-by: Greg Kroah-Hartman commit e21b3e9270fba6560cea9570c1359cf88b91154f Author: John Whitmore Date: Sat Sep 1 00:02:37 2018 +0100 staging:rtl8192u: Refactor RT_TRACE - Style Refactor the MACRO RT_TRACE to add parentheses around the parameter 'component', this clears the checkpatch warning with respect to precedence issues. This is a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore Signed-off-by: Greg Kroah-Hartman commit 3d7f12d31ff72afee25b62f30014b430b6c42015 Author: John Whitmore Date: Sat Sep 1 00:02:36 2018 +0100 staging:rtl8192u: Rename Rx_Smooth_Factor - Style Rename the MACRO Rx_Smooth_Factor to RX_SMOOTH_FACTOR, this clears the checkpatch issue with CamelCase naming. This is a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore Signed-off-by: Greg Kroah-Hartman commit 73d4be94723caa24389010289ff3fd880a25a810 Author: John Whitmore Date: Sat Sep 1 00:02:35 2018 +0100 staging:rtl8192u: Rename RTL819xU_MODULE_NAME - Style Rename the MACRO RTL819xU_MODULE_NAME to RTL819XU_MODULE_NAME, this clears the checkpatch issue with CamelCase naming. This is a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore Signed-off-by: Greg Kroah-Hartman commit 9d481aa26d93684eab4820b050a4a5ae5cf23a93 Author: John Whitmore Date: Sat Sep 1 00:02:34 2018 +0100 staging:rtl8192u: Add SPDX-License-Identifier - Style Add SPDX-License-Identifier tag to the start of header file. This is a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore Signed-off-by: Greg Kroah-Hartman commit a4f74fc067e6125aecad819df4840b32aff02021 Author: John Whitmore Date: Sat Sep 1 00:02:33 2018 +0100 staging:rtl8192u: Remove unused functions - Style Remove unused function declarations. This is a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore Signed-off-by: Greg Kroah-Hartman commit 491f9f8de188954d927d389f2c83e81c76760b78 Author: John Whitmore Date: Sat Sep 1 00:02:32 2018 +0100 staging:rtl8192u: Remove read_cam() - Style Remove the function read_cam(), as it is unused in code. Simple style change which should not impact runtime code execution. Signed-off-by: John Whitmore Signed-off-by: Greg Kroah-Hartman commit fda7c4e00e0e7e87f8f62d891c7945a2a8daa362 Author: John Whitmore Date: Sat Sep 1 00:02:31 2018 +0100 staging:rtl8192u: Remove write_cam() - Style Remove the function write_cam() as it is unused. Simple style change which should not impact runtime code execution. Signed-off-by: John Whitmore Signed-off-by: Greg Kroah-Hartman commit 7481cddf29ede204b475facc40e6f65459939881 Author: Ard Biesheuvel Date: Mon Aug 27 13:02:44 2018 +0200 arm64/lib: add accelerated crc32 routines Unlike crc32c(), which is wired up to the crypto API internally so the optimal driver is selected based on the platform's capabilities, crc32_le() is implemented as a library function using a slice-by-8 table based C implementation. Even though few of the call sites may be bottlenecks, calling a time variant implementation with a non-negligible D-cache footprint is a bit of a waste, given that ARMv8.1 and up mandates support for the CRC32 instructions that were optional in ARMv8.0, but are already widely available, even on the Cortex-A53 based Raspberry Pi. So implement routines that use these instructions if available, and fall back to the existing generic routines otherwise. The selection is based on alternatives patching. Note that this unconditionally selects CONFIG_CRC32 as a builtin. Since CRC32 is relied upon by core functionality such as CONFIG_OF_FLATTREE, this just codifies the status quo. Signed-off-by: Ard Biesheuvel Signed-off-by: Catalin Marinas commit 86d0dd34eafffbc76a81aba6ae2d71927d3835a8 Author: Ard Biesheuvel Date: Mon Aug 27 13:02:43 2018 +0200 arm64: cpufeature: add feature for CRC32 instructions Add a CRC32 feature bit and wire it up to the CPU id register so we will be able to use alternatives patching for CRC32 operations. Acked-by: Will Deacon Signed-off-by: Ard Biesheuvel Signed-off-by: Catalin Marinas commit 9784d82db3eb3de7851e5a3f4a2481607de2452c Author: Ard Biesheuvel Date: Mon Aug 27 13:02:42 2018 +0200 lib/crc32: make core crc32() routines weak so they can be overridden Allow architectures to drop in accelerated CRC32 routines by making the crc32_le/__crc32c_le entry points weak, and exposing non-weak aliases for them that may be used by the accelerated versions as fallbacks in case the instructions they rely upon are not available. Acked-by: Herbert Xu Signed-off-by: Ard Biesheuvel Signed-off-by: Catalin Marinas commit e1892546ff662f5491f707ba8a8a3a3e01a84a80 Author: Radu Pirea Date: Fri Jul 13 19:47:35 2018 +0300 spi: at91-usart: Add driver for at91-usart as SPI This is the driver for at91-usart in spi mode. The USART IP can be configured to work in many modes and one of them is SPI. The driver was tested on sama5d3-xplained and sama5d4-xplained boards with enc28j60 ethernet controller as slave. Signed-off-by: Radu Pirea Reviewed-by: Andy Shevchenko Reviwed-by: Mark Brown Acked-by: Nicolas Ferre Signed-off-by: Lee Jones commit 937c0a26acce163606054c8f149095de46c3f549 Author: Radu Pirea Date: Fri Jul 13 19:47:34 2018 +0300 MAINTAINERS: Add AT91 USART SPI entry Signed-off-by: Radu Pirea Acked-by: Nicolas Ferre Signed-off-by: Lee Jones commit 7d3aa342cef7aa3721bab5157a84bb3d6acce437 Author: Radu Pirea Date: Fri Jul 13 19:47:33 2018 +0300 mfd: at91-usart: Add MFD driver for USART This MFD driver is just a wrapper over atmel_serial driver and spi-at91-usart driver. Selection of one of the drivers is based on a property from device tree. If the property is not specified, the default driver is atmel_serial. Signed-off-by: Radu Pirea Reviewed-by: Andy Shevchenko Acked-by: Rob Herring Acked-by: Nicolas Ferre Signed-off-by: Lee Jones commit a785ce4c6d6c1e8e120a13a100edbb31b447675a Author: Radu Pirea Date: Fri Jul 13 19:47:32 2018 +0300 dt-bindings: Add binding for atmel-usart in SPI mode This patch moves the bindings for serial from serial/atmel-usart.txt to mfd/atmel-usart.txt and adds bindings for USART in SPI mode. Signed-off-by: Radu Pirea Reviewed-by: Rob Herring Acked-by: Nicolas Ferre Signed-off-by: Lee Jones commit 64f3b6334de14eebb088fa7a0c91125e55d132f2 Author: Radu Pirea Date: Fri Jul 13 19:47:31 2018 +0300 MAINTAINERS: Add AT91 USART MFD entry Signed-off-by: Radu Pirea Acked-by: Nicolas Ferre Signed-off-by: Lee Jones commit 3a8542bfd7a27604aa0ec6d36b54fc4bcf8397c7 Author: Tom Todd Date: Sat Sep 1 13:28:06 2018 +0100 Staging: rtlwifi: efuse: Fixed a line length code styling issue. Fixed a code styling issue. Signed-off-by: Tom Todd Signed-off-by: Greg Kroah-Hartman commit bc554d1e94bdfdcca540c1a8b2c01a930a437a15 Author: Nishad Kamdar Date: Sat Sep 1 03:49:43 2018 +0530 staging: mt7621-mmc: Fix debug macro ERR_MSG and its usages Replace all usages of ERR_MSG with with dev_ without __func__ or __LINE__ or current->comm and current->pid. Remove the do {} while(0) loop for the single statement macro. Delete commented ERR_MSG() usage. Drop ERR_MSG from dbg.h. Issue found by checkpatch. Signed-off-by: Nishad Kamdar Signed-off-by: Greg Kroah-Hartman commit 72536ea687d838bc949982162df49f5f66f7404f Author: Nishad Kamdar Date: Sat Sep 1 03:47:15 2018 +0530 staging: mt7621-mmc: Delete N_MSG() and all its users This patch removes N_MSG() and all its users since it is a no-op. Signed-off-by: Nishad Kamdar Signed-off-by: Greg Kroah-Hartman commit 1485e2fb627b3507f1caca0a28cd75293d192b1f Author: Thomas Zimmermann Date: Mon Sep 10 11:36:44 2018 +0200 staging/vboxvideo: Replace ttm_bo_unref with ttm_bo_put The function ttm_bo_put releases a reference to a TTM buffer object. The function's name is more aligned to the Linux kernel convention of naming ref-counting function _get and _put. A call to ttm_bo_unref takes the address of the TTM BO object's pointer and clears the pointer's value to NULL. This is not necessary in most cases and sometimes even worked around by the calling code. A call to ttm_bo_put only releases the reference without clearing the pointer. The current behaviour of cleaning the pointer is kept in the calling code, but should be removed if not required in a later patch. Signed-off-by: Thomas Zimmermann Signed-off-by: Greg Kroah-Hartman commit 0b193400b3f2b7af446f5a624f8af51b34d6f5d1 Author: Michael Hennerich Date: Tue Aug 14 13:28:20 2018 +0200 backlight: Update MODULE AUTHOR email address No functional changes Signed-off-by: Michael Hennerich Acked-by: Daniel Thompson Signed-off-by: Lee Jones commit e36a1d0d249aa09f94d551cadf043a7f9f7fae00 Author: Charles Keepax Date: Mon Sep 10 15:28:39 2018 +0100 ASoC: dapm: Add missing return value check for snd_soc_dapm_new_dai snd_soc_dapm_new_dai may return an error pointer and currently this isn't checked for in dapm_connect_dai_link_widgets. Add code to check the return value and not add routes in that case. Fixes: 778ff5bb8689 ("ASoC: dapm: Move connection of CODEC to CODEC DAIs") Reported-by: Dan Carpenter Signed-off-by: Charles Keepax Signed-off-by: Mark Brown commit ca92cc4636fdedf0d7ee88a5e50cd2b85c246a3b Author: zhong jiang Date: Sat Sep 8 16:36:20 2018 +0800 ASoC: skl-topology: Use kmemdup to replace kzalloc + memcpy kmemdup has implemented the function that kzalloc() + memcpy() will do. and we prefer to kmemdup rather than the open coded implementation. Signed-off-by: zhong jiang Signed-off-by: Mark Brown commit 18fbe800e6066050ab6ae7751708da04975cdc22 Author: zhong jiang Date: Sat Sep 8 16:36:19 2018 +0800 ASoC: q6core: Use kmemdup to replace kzalloc + memcpy kmemdup has implemented the function that kzalloc() + memcpy() will do. and we prefer to use the kmemdup rather than the open coded implementation. Signed-off-by: zhong jiang Signed-off-by: Mark Brown commit fb77436a444e9836e6b1b0a457bc9c09cdce22f6 Author: Kuninori Morimoto Date: Fri Sep 7 01:03:53 2018 +0000 ASoC: txx9: use devm_snd_soc_register_component() Now we have devm_snd_soc_register_component(). Let's use it instead of snd_soc_register_component(). Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit afa88ee37b1383490df003ea005d1d9bc8afa8a8 Author: Kuninori Morimoto Date: Fri Sep 7 01:03:25 2018 +0000 ASoC: sh: use devm_snd_soc_register_component() Now we have devm_snd_soc_register_component(). Let's use it instead of snd_soc_register_component(). Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit 642a722d3116fbd22e59ac027f81b5ecd285f17c Author: Kuninori Morimoto Date: Fri Sep 7 01:02:54 2018 +0000 ASoC: omap: use devm_snd_soc_register_component() Now we have devm_snd_soc_register_component(). Let's use it instead of snd_soc_register_component(). Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit bfacaa8c8956dd6076641043b7be848267a708eb Author: Kuninori Morimoto Date: Fri Sep 7 01:02:38 2018 +0000 ASoC: nuc900: use devm_snd_soc_register_component() Now we have devm_snd_soc_register_component(). Let's use it instead of snd_soc_register_component(). Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit 007ac42db9ff4c36e91d192353421c6209058e06 Author: Kuninori Morimoto Date: Fri Sep 7 01:01:50 2018 +0000 ASoC: tscs454: use devm_snd_soc_register_component() Now we have devm_snd_soc_register_component(). Let's use it instead of snd_soc_register_component(). Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit 4fe1984ebc086ee39dd57983a7fee84c96c954a7 Author: Kuninori Morimoto Date: Fri Sep 7 01:01:34 2018 +0000 ASoC: rt5668: use devm_snd_soc_register_component() Now we have devm_snd_soc_register_component(). Let's use it instead of snd_soc_register_component(). Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit 10ccaa39d7628470a3de4aae9d2346a55cbee46e Author: Kuninori Morimoto Date: Fri Sep 7 01:01:19 2018 +0000 ASoC: hdac_hda: use devm_snd_soc_register_component() Now we have devm_snd_soc_register_component(). Let's use it instead of snd_soc_register_component(). Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit 570f75b93551a6d70ecbd0a7b6d962b4ca4722f0 Author: Kuninori Morimoto Date: Fri Sep 7 01:00:49 2018 +0000 ASoC: bcm: use devm_snd_soc_register_component() Now we have devm_snd_soc_register_component(). Let's use it instead of snd_soc_register_component(). Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit e14614dc5153ad41f7d1e5b125e4cd155ca79aa2 Author: Kuninori Morimoto Date: Fri Sep 7 01:00:15 2018 +0000 ASoC: atmel_ssc_dai: use devm_snd_soc_register_component() Now we have devm_snd_soc_register_component(). Let's use it instead of snd_soc_register_component(). Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit 36f546a1bdb5d268aec97b2fe4800c91a4f5596a Author: Masahiro Yamada Date: Tue Sep 4 09:42:24 2018 +0900 kallsyms: remove left-over Blackfin code These symbols were added by commit 028f042613c3 ("kallsyms: support kernel symbols in Blackfin on-chip memory") for Blackfin. The Blackfin support was removed by commit 4ba66a976072 ("arch: remove blackfin port"). Signed-off-by: Masahiro Yamada commit 80ffbaa5b1bd98e80e3239a3b8cfda2da433009a Author: Jan Beulich Date: Mon Sep 3 06:09:34 2018 -0600 kallsyms: reduce size a little on 64-bit Both kallsyms_num_syms and kallsyms_markers[] don't really need to use unsigned long as their (base) types; unsigned int fully suffices. Signed-off-by: Jan Beulich Signed-off-by: Masahiro Yamada commit 02101c45ec5b19d607af7372680f5259050b4e9c Author: Mikulas Patocka Date: Wed Aug 8 17:22:16 2018 -0400 x86/asm: Optimize memcpy_flushcache() I use memcpy_flushcache() in my persistent memory driver for metadata updates, there are many 8-byte and 16-byte updates and it turns out that the overhead of memcpy_flushcache causes 2% performance degradation compared to "movnti" instruction explicitly coded using inline assembler. The tests were done on a Skylake processor with persistent memory emulated using the "memmap" kernel parameter. dd was used to copy data to the dm-writecache target. This patch recognizes memcpy_flushcache calls with constant short length and turns them into inline assembler - so that I don't have to use inline assembler in the driver. Signed-off-by: Mikulas Patocka Cc: Dan Williams Cc: Linus Torvalds Cc: Mike Snitzer Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: device-mapper development Link: http://lkml.kernel.org/r/alpine.LRH.2.02.1808081720460.24747@file01.intranet.prod.int.rdu2.redhat.com Signed-off-by: Ingo Molnar commit ace8031099f91480799b5929b4cccf2dcacc5136 Author: zhong jiang Date: Fri Aug 3 20:37:32 2018 +0800 sched/topology: Make local variables static Fix the following warnings: kernel/sched/topology.c:10:15: warning: symbol 'sched_domains_tmpmask' was not declared. Should it be static? kernel/sched/topology.c:11:15: warning: symbol 'sched_domains_tmpmask2' was not declared. Should it be static? Signed-off-by: zhong jiang Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1533299852-26941-1-git-send-email-zhongjiang@huawei.com Signed-off-by: Ingo Molnar commit 44060e8a5189fd79220a94422b82cccc49a85e91 Author: Chao Fan Date: Tue Aug 7 09:57:05 2018 +0800 x86/boot/KASLR: Remove return value from handle_mem_options() It's not used by its sole user, so remove this unused functionality. Also remove a stray unused variable that GCC didn't warn about for some reason. Suggested-by: Dou Liyang Signed-off-by: Chao Fan Cc: Baoquan He Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: kirill.shutemov@linux.intel.com Link: http://lkml.kernel.org/r/20180807015705.21697-1-fanc.fnst@cn.fujitsu.com Signed-off-by: Ingo Molnar commit ef05bcb60c1a8841e38c91923ba998181117a87c Author: Katsuhiro Suzuki Date: Fri Sep 7 00:39:47 2018 +0900 arm64: dts: rockchip: fix vcc_host1_5v pin assign on rk3328-rock64 This patch fixes pin assign of vcc_host1_5v. This regulator is controlled by USB20_HOST_DRV signal. ROCK64 schematic says that GPIO0_A2 pin is used as USB20_HOST_DRV. GPIO0_D3 pin is for SPDIF_TX_M0. Signed-off-by: Katsuhiro Suzuki Signed-off-by: Heiko Stuebner commit 2766d2ee960c52adc415931130dd6910158dd04d Author: Zubin Mithra Date: Fri Aug 10 08:43:14 2018 -0700 perf/x86: Add __ro_after_init annotations x86_pmu_{format,events,attr,caps}_group is written to in init_hw_perf_events and not modified after. This makes them suitable candidates for annotating as __ro_after_init. Signed-off-by: Zubin Mithra Reviewed-by: Kees Cook Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: acme@kernel.org Cc: alexander.shishkin@linux.intel.com Cc: groeck@chromium.org Link: http://lkml.kernel.org/r/20180810154314.96710-1-zsm@chromium.org Signed-off-by: Ingo Molnar commit a5002c41c383169cb812f98af3cf2dad292547dd Author: Shohei Maruyama Date: Thu Aug 23 16:35:32 2018 +0000 arm64: dts: rockchip: add WiFi module support for Firefly-RK3399 This commit adds WiFi module support for the Firefly-RK3399. Signed-off-by: Shohei Maruyama Signed-off-by: Heiko Stuebner commit b1e3a25f5879017fc50ca17f03118b26a19df49a Author: He Zhe Date: Tue Aug 14 23:33:43 2018 +0800 x86/corruption-check: Use pr_*() instead of printk() pr_*() is the preferred style. Signed-off-by: He Zhe Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: gregkh@linuxfoundation.org Cc: kstewart@linuxfoundation.org Cc: pombredanne@nexb.com Link: http://lkml.kernel.org/r/1534260823-87917-2-git-send-email-zhe.he@windriver.com [ Moved all console output into a single line. ] Signed-off-by: Ingo Molnar commit ccde460b9ae5c2bd5e4742af0a7f623c2daad566 Author: He Zhe Date: Tue Aug 14 23:33:42 2018 +0800 x86/corruption-check: Fix panic in memory_corruption_check() when boot option without value is provided memory_corruption_check[{_period|_size}]()'s handlers do not check input argument before passing it to kstrtoul() or simple_strtoull(). The argument would be a NULL pointer if each of the kernel parameters, without its value, is set in command line and thus cause the following panic. PANIC: early exception 0xe3 IP 10:ffffffff73587c22 error 0 cr2 0x0 [ 0.000000] CPU: 0 PID: 0 Comm: swapper Not tainted 4.18-rc8+ #2 [ 0.000000] RIP: 0010:kstrtoull+0x2/0x10 ... [ 0.000000] Call Trace [ 0.000000] ? set_corruption_check+0x21/0x49 [ 0.000000] ? do_early_param+0x4d/0x82 [ 0.000000] ? parse_args+0x212/0x330 [ 0.000000] ? rdinit_setup+0x26/0x26 [ 0.000000] ? parse_early_options+0x20/0x23 [ 0.000000] ? rdinit_setup+0x26/0x26 [ 0.000000] ? parse_early_param+0x2d/0x39 [ 0.000000] ? setup_arch+0x2f7/0xbf4 [ 0.000000] ? start_kernel+0x5e/0x4c2 [ 0.000000] ? load_ucode_bsp+0x113/0x12f [ 0.000000] ? secondary_startup_64+0xa5/0xb0 This patch adds checks to prevent the panic. Signed-off-by: He Zhe Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: gregkh@linuxfoundation.org Cc: kstewart@linuxfoundation.org Cc: pombredanne@nexb.com Cc: stable@vger.kernel.org Link: http://lkml.kernel.org/r/1534260823-87917-1-git-send-email-zhe.he@windriver.com Signed-off-by: Ingo Molnar commit 707fa9e37f8ef2ff3d42505924f76d7d50c52abb Author: Vicente Bergas Date: Sat Sep 8 21:00:47 2018 +0200 arm64: dts: rockchip: remove dvs2 pinctrl from pmic on rk3399-sapphire On the board DVS2 is disabled and not connected, see schematic, page 16. Signed-off-by: Vicente Bergas Signed-off-by: Heiko Stuebner commit bcdb578a5f5b4aea79441606ab7f0a2e076b4474 Author: Vicente Bergas Date: Sat Sep 8 21:00:46 2018 +0200 arm64: dts: rockchip: Fix VCC5V0_HOST_EN on rk3399-sapphire The pin is GPIO4-D1 not GPIO1-D1, see schematic, page 15 for reference. Signed-off-by: Vicente Bergas Signed-off-by: Heiko Stuebner commit 07736689dcbf06f5fb0acf701b732b45b8a248e3 Author: Vicente Bergas Date: Sat Sep 8 21:00:45 2018 +0200 arm64: dts: rockchip: re-order vcc_sys on rk3399-sapphire Fix alphabetical order. Signed-off-by: Vicente Bergas Signed-off-by: Heiko Stuebner commit abf5feef3ff0cefade0c76be53b59e55fdd46093 Author: Linus Walleij Date: Mon Sep 10 00:28:05 2018 +0200 spi: gpio: No MISO does not imply no RX There is a logical problem in spi-gpio with host just assigning a MOSI line and no MISO: this is interpreted as the host cannot do RX and the host is flagged with SPI_MASTER_NO_RX. This is wrong: since GPIO lines can switch direction, in 3WIRE operation the host will simply reverse the direction of the GPIO line and start reading from it, there is even code for doing this in the driver, but it went unnoticed because it was tested by using a master with 4 wires but a device using just 3 wires. Remove the offending flag. Cc: Andrzej Hajda Cc: Lorenzo Bianconi Signed-off-by: Linus Walleij Signed-off-by: Mark Brown commit 78cd96f0504b1921048e9ec5fd17a8e8fc548262 Author: Andy Shevchenko Date: Thu Aug 30 19:51:03 2018 +0300 ACPI / PMIC: Convert drivers to use SPDX identifier Reduce size of duplicated comments by switching to use SPDX identifier. No functional change. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg Signed-off-by: Rafael J. Wysocki commit 36b835176fe014197639f335d9d35424b7805027 Author: Andy Shevchenko Date: Thu Aug 30 19:51:02 2018 +0300 ACPI / PMIC: Sort headers alphabetically Sort headers alphabetically for better maintenance. No functional change. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg Signed-off-by: Rafael J. Wysocki commit d030fd0ec5c782e6813a7d684029758041ba3b46 Author: Andy Shevchenko Date: Thu Aug 30 14:11:07 2018 +0300 ACPI / property: 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: Lukas Wunner Signed-off-by: Rafael J. Wysocki commit afd0b1fb22269f48d68fdf269891c653818c8047 Author: David Arcari Date: Mon Aug 27 15:19:08 2018 -0400 mailbox: PCC: handle parse error acpi_pcc_probe() calls acpi_table_parse_entries_array() but fails to check for an error return. This in turn can result in calling kcalloc() with a negative count as well as emitting the following misleading erorr message: [ 2.642015] Could not allocate space for PCC mbox channels Fixes: 8f8027c5f935 (mailbox: PCC: erroneous error message when parsing ACPI PCCT) Signed-off-by: David Arcari Reviewed-by: Al Stone Cc: 4.18+ # 4.18+ Signed-off-by: Rafael J. Wysocki commit 240714061c58e6b1abfb3322398a7634151c06cb Author: Hans de Goede Date: Mon Aug 27 09:45:44 2018 +0200 ACPI / LPSS: Add alternative ACPI HIDs for Cherry Trail DMA controllers Bay and Cherry Trail DSTDs represent a different set of devices depending on which OS the device think it is booting. One set of decices for Windows and another set of devices for Android which targets the Android-x86 Linux kernel fork (which e.g. used to have its own display driver instead of using the i915 driver). Which set of devices we are actually going to get is out of our control, this is controlled by the ACPI OSID variable, which gets either set through an EFI setup option, or sometimes is autodetected. So we need to support both. This commit adds support for the 80862286 and 808622C0 ACPI HIDs which we get for the first resp. second DMA controller on Cherry Trail devices when OSID is set to Android. Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Signed-off-by: Rafael J. Wysocki commit 719cf71cada1abc4f8727eac918b639a4a502a59 Author: Andy Shevchenko Date: Mon Aug 20 16:45:41 2018 +0300 ACPI / glue: Split dev_is_platform() out of module for wide use There would be useful to have in future the similar API in platform core, as we have, for example, for PCI subsystem, to check if device belongs to it. Thus, split out conditional to a macro dev_is_platform() for wide use. No functional change intended. Signed-off-by: Andy Shevchenko Signed-off-by: Rafael J. Wysocki commit 7e79a69273272df016928144062b97bcb11d1122 Author: zhong jiang Date: Sat Aug 18 18:49:20 2018 +0800 ACPI: custom_method: remove meaningless null check before debugfs_remove() debugfs_remove() has taken null pointer into account. So it is safe to remove the check before debugfs_remove(). Signed-off-by: zhong jiang Signed-off-by: Rafael J. Wysocki commit 0712e0288b7602efbde95d95bca4c651ccad01b8 Author: Dan Carpenter Date: Mon Sep 10 11:40:48 2018 +0300 ASoC: qdsp6: q6asm-dai: clean up a return Smatch complains that if both "psubstream" and "csubstream" are NULL then "ret" is uninitialized. That probably can't happen, but it's cleaner to just return zero anyway so let's do that. Signed-off-by: Dan Carpenter Acked-by: Srinivas Kandagatla Signed-off-by: Mark Brown commit 2e558a8127de7b2ed3302f9adcf332ba3feeadb2 Author: Dan Carpenter Date: Fri Sep 7 22:40:33 2018 +0300 ASoC: dapm: Fix a couple uninitialized ret variables Smatch complains that these variables could be uninitialized. The first one in snd_soc_dai_link_event() is probably a false positive, because probably we know the lists are not empty. I would normally ignore the warning, but GCC complains here as well so I just silenced the warning. The "ret" in snd_soc_dapm_new_dai() does need to be initialized or it leads to a bogus dereference in the caller. Fixes: 3bbf5d34fd4a ("ASoC: dapm: Move error handling to snd_soc_dapm_new_control_unlocked") Signed-off-by: Dan Carpenter Signed-off-by: Mark Brown commit 51b177637b5c54061bbd12f228a26755f466cbb0 Author: Rob Herring Date: Mon Aug 27 20:52:15 2018 -0500 cpufreq: 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: Rob Herring Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki commit 8412dbd642585107e29b20920876de98e7df5819 Author: Todd Brandt Date: Wed Aug 22 18:37:11 2018 -0700 PM / sleep: Show freezing tasks that caused a suspend abort For debug purposes it would be nice to see which tasks caused a suspend abort, i.e. which tasks were still in the process of freezing when a wakeup event occurred. This patch adds the info to pm_debug_messages. Signed-off-by: Todd Brandt Signed-off-by: Rafael J. Wysocki commit 3bb756449b2ddca8e059d011af2e732c857c61d7 Author: Vladimir D. Seleznev Date: Sat Sep 1 07:51:15 2018 +0300 PM / hibernate: Documentation: fix image_size default value This commit updates the default value of /sys/power/image_size in the documentation. Since ac5c24ec1e983313ef0015258fba6f630e54e7cn the `image_size' value is set to about 2/5 of RAM, according to kernel/power/snapshot.c: image_size = ((totalram_pages * 2) / 5) * PAGE_SIZE; but this change was not reflected everywhere in the documentation. Signed-off-by: Vladimir D. Seleznev Signed-off-by: Rafael J. Wysocki commit 0e7ea2f3b0e09333e54fb8322f85a45cb01fdd61 Author: Igor Stoppa Date: Fri Sep 7 19:09:55 2018 +0300 cpufreq: remove unnecessary unlikely() WARN_ON() already contains an unlikely(), so it's not necessary to wrap it into another. Signed-off-by: Igor Stoppa Signed-off-by: Rafael J. Wysocki commit 925b9cd1b89a94b7124d128c80dfc48f78a63098 Author: Waiman Long Date: Thu Sep 6 16:18:34 2018 -0400 locking/rwsem: Make owner store task pointer of last owning reader Currently, when a reader acquires a lock, it only sets the RWSEM_READER_OWNED bit in the owner field. The other bits are simply not used. When debugging hanging cases involving rwsems and readers, the owner value does not provide much useful information at all. This patch modifies the current behavior to always store the task_struct pointer of the last rwsem-acquiring reader in a reader-owned rwsem. This may be useful in debugging rwsem hanging cases especially if only one reader is involved. However, the task in the owner field may not the real owner or one of the real owners at all when the owner value is examined, for example, in a crash dump. So it is just an additional hint about the past history. If CONFIG_DEBUG_RWSEMS=y is enabled, the owner field will be checked at unlock time too to make sure the task pointer value is valid. That does have a slight performance cost and so is only enabled as part of that debug option. From the performance point of view, it is expected that the changes shouldn't have any noticeable performance impact. A rwsem microbenchmark (with 48 worker threads and 1:1 reader/writer ratio) was ran on a 2-socket 24-core 48-thread Haswell system. The locking rates on a 4.19-rc1 based kernel were as follows: 1) Unpatched kernel: 543.3 kops/s 2) Patched kernel: 549.2 kops/s 3) Patched kernel (CONFIG_DEBUG_RWSEMS on): 546.6 kops/s There was actually a slight increase in performance (1.1%) in this particular case. Maybe it was caused by the elimination of a branch or just a testing noise. Turning on the CONFIG_DEBUG_RWSEMS option also had less than the expected impact on performance. The least significant 2 bits of the owner value are now used to designate the rwsem is readers owned and the owners are anonymous. Signed-off-by: Waiman Long Acked-by: Peter Zijlstra Cc: Davidlohr Bueso Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Will Deacon Link: http://lkml.kernel.org/r/1536265114-10842-1-git-send-email-longman@redhat.com Signed-off-by: Ingo Molnar commit 17ed15183c2453ba2f03a813fd8b1594bd9baf98 Author: Andy Shevchenko Date: Fri Aug 31 11:25:13 2018 +0300 powercap: RAPL: Get rid of custom RAPL_CPU() macro Replace custom grown macro with generic INTEL_CPU_FAM6() one. No functional change intended. Signed-off-by: Andy Shevchenko Signed-off-by: Rafael J. Wysocki commit a4a008e53c9e5ac8d6070bd1b2eddfc1ae0d2338 Author: Andy Shevchenko Date: Fri Aug 31 11:22:29 2018 +0300 intel_idle: Get rid of custom ICPU() macro Replace custom grown macro with generic INTEL_CPU_FAM6() one. No functional change intended. Signed-off-by: Andy Shevchenko Acked-by: Jacob Pan Signed-off-by: Rafael J. Wysocki commit 41af6cbfa154d577da818ae049298fa11198781b Author: Suzuki K Poulose Date: Fri Jul 27 11:15:37 2018 +0100 arm64: dts: juno: Update entries to match latest coresight bindings Switch to updated coresight bindings for Juno platforms. Cc: Liviu Dudau Acked-by: Liviu Dudau Acked-by: Rob Herring Signed-off-by: Suzuki K Poulose [sudeep.holla: minor modifications to patch title] Signed-off-by: Sudeep Holla commit 8627995cf711ed0e9ff84cf34b5b389fa01fa4c9 Author: Tim Collier Date: Tue Aug 28 20:26:12 2018 +0100 staging: wlan-ng: remove redundant code in "#if 0" blocks Remove two blocks of code that checkpatch identified as redundant because they were enclosed in "#if...#endif". In the case of prism2fw.c the associated "TODO" comment was retained. Signed-off-by: Tim Collier Signed-off-by: Greg Kroah-Hartman commit 205d34e90ff8f9891a9fe812a0c15bd2198367ae Author: Michael Straube Date: Mon Sep 3 20:24:45 2018 +0200 staging: rtl8188eu: remove unnecessary parentheses Remove unnecessary parentheses to follow kernel coding style and clean checkpatch issues. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit 3e1de4d578524b051e47fd1703aa4766e4c92d70 Author: Michael Straube Date: Mon Sep 3 20:24:44 2018 +0200 staging: rtl8188eu: remove whitespace Replace tabs with spaces where appropriate. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit 508258f63b0124985b8ab6143856edfa8f84ca82 Author: Michael Straube Date: Mon Sep 3 20:24:43 2018 +0200 staging: rtl8188eu: fix comparsions to true Use if(x) instead of if(x == true). Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit 8d42daff47cecc69de0d3fb2a487ef5971fd6938 Author: Michael Straube Date: Mon Sep 3 20:24:42 2018 +0200 staging: rtl8188eu: Remove code valid only for 5 GHz Remove code that is only valid for channels > 14. This addresses the below TODO item. - find and remove remaining code valid only for 5 GHz. Most of the obvious ones have been removed, but things like channel > 14 still exist. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit 352ff6a4c15a48d5f96c7efbf9b76aeaf2127890 Author: Michael Straube Date: Mon Sep 3 22:09:52 2018 +0200 staging: rtl8188eu: remove pointless comment This comment adds no useful information to the code, so remove it. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit a06058dcd67a20666b59ab6cdd8efc0184885668 Author: Michael Straube Date: Mon Sep 3 21:59:18 2018 +0200 staging: rtl8188eu: simplify function comment Simplify function comment to a single line. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit c7f800ec9773d02a5b26faf77f829aa263226dc2 Author: Jia-Ju Bai Date: Sat Sep 1 16:58:29 2018 +0800 staging: rtl8188eu: Fix two sleep-in-atomic-context bugs in rtw_chk_hi_queue_cmd() usb_write_port_complete() in usb_ops_linux.c is a completion handler function for the USB driver. So it should not sleep, but it is can sleep according to the function call paths (from bottom to top) in Linux-4.16: [FUNC] kzalloc(GFP_KERNEL) drivers/staging/rtl8188eu/core/rtw_cmd.c, 1081: kzalloc in rtw_chk_hi_queue_cmd drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c, 604: rtw_chk_hi_queue_cmd in usb_write_port_complete [FUNC] kzalloc(GFP_KERNEL) drivers/staging/rtl8188eu/core/rtw_cmd.c, 1075: kzalloc in rtw_chk_hi_queue_cmd drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c, 604: rtw_chk_hi_queue_cmd in usb_write_port_complete To fix these bugs, GFP_KERNEL is replaced with GFP_ATOMIC. These bugs are found by my static analysis tool DSAC. Signed-off-by: Jia-Ju Bai Signed-off-by: Greg Kroah-Hartman commit 1f447e51c0b9e8beeec0917ea5f51930f55e17c9 Author: Colin Ian King Date: Wed Sep 5 10:46:05 2018 +0100 staging: most: video: fix registration of an empty comp core_component Currently we have structrues comp (which is empty) and comp_info being used to register and deregister the component. This mismatch in naming occurred from a previous commit that renamed aim_info to comp. Fix this to use consistent component naming in line with most/net, most/sound etc. This fixes the message two issues, one with a null empty name when loading the module: [ 1485.269515] most_core: registered new core component (null) and an Oops when removing the module: [ 1485.277971] BUG: unable to handle kernel NULL pointer dereference at 0000000000000008 [ 1485.278648] PGD 0 P4D 0 [ 1485.279253] Oops: 0002 [#2] SMP PTI [ 1485.279847] CPU: 1 PID: 32629 Comm: modprobe Tainted: P D WC OE 4.18.0-8-generic #9 [ 1485.280442] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 0.0.0 02/06/2015 [ 1485.281040] RIP: 0010:most_deregister_component+0x3c/0x70 [most_core] .. etc Fixes: 1b10a0316e2d ("staging: most: video: remove aim designators") Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman commit 93f5715efdc23584526f0a157f13eb6c8698f376 Author: Colin Ian King Date: Tue Sep 4 16:47:07 2018 +0100 staging: most: net: make array 'broadcast' static, shrinks object size Don't populate the array 'broadcast' on the stack but instead make it static. Makes the object code smaller by 53 bytes: Before: text data bss dec hex filename 10511 1521 448 12480 30c0 drivers/staging/most/net/net.o After: text data bss dec hex filename 10394 1585 448 12427 308b drivers/staging/most/net/net.o (gcc version 8.2.0 x86_64) Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman commit 08633dcb5a7cde2c7cdd4744b8c9e87e43e103f9 Author: Takashi Iwai Date: Tue Sep 4 17:58:58 2018 +0200 staging: bcm2835-audio: Simplify card object management Instead of creating a dummy child device to manage the card object, just use devm stuff directly for releasing with snd_card_free(). This results in a lot of code reduction. Since the dummy child devices are gone, the device object to be passed to the memory allocator needs to be adjusted as well. Signed-off-by: Takashi Iwai Tested-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman commit 2e42b089fad41eda44f7f0f8c5a2b807f7d4f9a0 Author: Takashi Iwai Date: Tue Sep 4 17:58:57 2018 +0200 staging: bcm2835-audio: Simplify kctl creation helpers Just a minor code refactoring and adding some const prefix. Signed-off-by: Takashi Iwai Tested-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman commit 8cc64ae7ab6bd3f996652376a413e33842c88912 Author: Takashi Iwai Date: Tue Sep 4 17:58:56 2018 +0200 staging: bcm2835-audio: Simplify PCM creation helpers All three functions to create PCM objects are fairly resemble, and can be unified to a single common helper. Signed-off-by: Takashi Iwai Tested-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman commit bec95770a0ece26890d3aa580da979a3b6b78ff0 Author: Takashi Iwai Date: Tue Sep 4 17:58:55 2018 +0200 staging: bcm2835-audio: Set SNDRV_PCM_INFO_SYNC_APPLPTR The recent ALSA PCM core supports the SNDRV_PCM_INFO_SYNC_APPLPTR flag indicating that the driver needs the ack call at each appl_ptr update. This is requirement for the indirect PCM implementations like bcm2835-audio driver, too. Signed-off-by: Takashi Iwai Tested-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman commit fb16a3835107c469433a71341d198c298449ff4d Author: Takashi Iwai Date: Tue Sep 4 17:58:54 2018 +0200 staging: bcm2835-audio: Use coherent device buffers The memory access to the pages allocated with SNDRV_DMA_TYPE_CONTINUOUS are basically non-coherent, and it becomes a problem when a process accesses via mmap. For the more consistent access, use the device coherent memory, just by replacing the call pattern in the allocator helpers. The only point we need to be careful for is the device object passed there; since bcm2835-audio driver creates fake devices and each card is created on top of that, we need to pass its parent device as the real device object. Signed-off-by: Takashi Iwai Tested-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman commit d64d58f30c727ebc51b5298ccb1003279d552d6f Author: Takashi Iwai Date: Tue Sep 4 17:58:53 2018 +0200 staging: bcm2835-audio: Move module parameter description For more consistency, move the module parameter description right after its variable definition. Signed-off-by: Takashi Iwai Tested-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman commit de89dbf751c87ee3c373d736c316fee59dd64933 Author: Takashi Iwai Date: Tue Sep 4 17:58:52 2018 +0200 staging: bcm2835-audio: Remove unnecessary header file includes Yet a few header files are included unnecessarily. Drop them. Also remove trivial comments. Signed-off-by: Takashi Iwai Tested-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman commit 435ba133f96eef9ac6d0b50a63d7bf9c9401e216 Author: Takashi Iwai Date: Tue Sep 4 17:58:51 2018 +0200 staging: bcm2835-audio: Use standard error print helpers For making the whole code more consistent, replace the home-made debug print macros with the standard dev_err() & co. Signed-off-by: Takashi Iwai Tested-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman commit be2af4715f383d5d9d2741e94076c2c027c5d060 Author: Takashi Iwai Date: Tue Sep 4 17:58:50 2018 +0200 staging: bcm2835-audio: Use card->private_data Instead of allocating a separate snd_device object, let snd_card_new() allocate the private resource. This simplifies the code. Signed-off-by: Takashi Iwai Tested-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman commit d7ca3a71545bae2a802ab64afd7636c2daf26699 Author: Takashi Iwai Date: Tue Sep 4 17:58:49 2018 +0200 staging: bcm2835-audio: Operate non-atomic PCM ops This is the most significant part in the patch series. The bcm2835-audio driver used to queue the commands to vc04 core via workqueue, but basically the whole accesses to vc04 core are done in the sleepable context, including the callback calls. In such a case, rewriting the code using non-atomic PCM ops will simplify the logic a lot. This patch does it: all workqueue are gone and each former-work implementation is now directly called from PCM ops like trigger and write transfer. Along with it, the DMA position updater, bcm2835_playback_fifo(), was also rewritten to use a simpler logic. Now it handles the XRUN and draining properly by calling snd_pcm_stop() conditionally. The current position is kept in atomic_t value so that it can be read concurrently from the pointer callback. Also, the bcm2835_audio_instance object is allocated at the beginning of bcm2835_audio_open(). This makes the resource management clearer. Signed-off-by: Takashi Iwai Tested-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman commit 0307363a4fbf301d0b25df6aa7827c30f11e220d Author: Takashi Iwai Date: Tue Sep 4 17:58:48 2018 +0200 staging: bcm2835-audio: Code refactoring of vchiq accessor codes This is a cleanup and code refactoring in bcm2835-vchiq.c. The major code changes are to provide local helpers for easier use of lock / unlock, and message passing with/without response wait. This allows us to reduce lots of open codes. Also, the max packet is set at opening the stream, not at each time when the write gets called. Signed-off-by: Takashi Iwai Tested-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman commit f5a3db42e8a6a9efdcafcf6d8c046b34663c97c6 Author: Takashi Iwai Date: Tue Sep 4 17:58:47 2018 +0200 staging: bcm2835-audio: Make single vchi handle The bcm2835_audio_instance object contains the array of VCHI_SERVICE_HANDLE_T, while the code assumes and uses only the first element explicitly. Let's reduce to a single vchi handle for simplifying the code. Signed-off-by: Takashi Iwai Tested-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman commit 66890d53130d90df4572987b2ebcad05595f76c7 Author: Takashi Iwai Date: Tue Sep 4 17:58:46 2018 +0200 staging: bcm2835-audio: Add 10ms period constraint It seems that the resolution of vc04 callback is in 10 msec; i.e. the minimal period size is also 10 msec. This patch adds the corresponding hw constraint. Signed-off-by: Takashi Iwai Tested-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman commit d446b78c07669736c404538d777707c8becc60e5 Author: Takashi Iwai Date: Tue Sep 4 17:58:45 2018 +0200 staging: bcm2835-audio: Drop superfluous mutex lock during prepare The chip->audio_mutex is used basically for protecting the opened stream assignment, and the prepare callback is irrelevant with it. Signed-off-by: Takashi Iwai Tested-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman commit af6b7a374d49f0f3f8b916073709006b7711babd Author: Takashi Iwai Date: Tue Sep 4 17:58:44 2018 +0200 staging: bcm2835-audio: Drop debug messages in bcm2835-pcm.c These debug messages worsen the code readability a lot while they give little debuggability (which we already have via tracing, in anyway). Let's clean them up. This allows us to reduce the snd_bcm2835_pcm_lib_ioctl() function to be a direct call of the snd_pcm_lib_ioctl callback (like most other drivers do), too. Signed-off-by: Takashi Iwai Tested-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman commit 947d7489f6d782d9150cb528272a729186be176e Author: Takashi Iwai Date: Tue Sep 4 17:58:43 2018 +0200 staging: bcm2835-audio: Propagate parameter setup error When the parameter setup fails, the driver should propagate the error code instead of silently ignoring it. Signed-off-by: Takashi Iwai Tested-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman commit fda767b1a013c5ff584abe6869ad68ec25518488 Author: Takashi Iwai Date: Tue Sep 4 17:58:42 2018 +0200 staging: bcm2835-audio: Drop useless NULL check alsa_stream->chip can be never NULL. Signed-off-by: Takashi Iwai Tested-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman commit af19edf7ca2b1a44d36f3c8dbfca06a97aa9d032 Author: Takashi Iwai Date: Tue Sep 4 17:58:41 2018 +0200 staging: bcm2835-audio: Drop unnecessary pcm indirect setup The hw_queue_size of PCM indirect helper doesn't need to be set up if you use the whole given buffer size. Drop the useless initialization, which just confuses readers. Signed-off-by: Takashi Iwai Tested-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman commit 5d0be6da7f9080cc9eed1e179015b134568565cd Author: Takashi Iwai Date: Tue Sep 4 17:58:40 2018 +0200 staging: bcm2835-audio: Use PCM runtime values instead Some fields in alsa_stream are the values we keep already in PCM runtime object, hence they are redundant. Use the standard PCM runtime values instead of the private copies. Signed-off-by: Takashi Iwai Tested-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman commit 50e4acab33e6b8f4ff27b3a51cdd5aad9b9d850c Author: Takashi Iwai Date: Tue Sep 4 17:58:39 2018 +0200 staging: bcm2835-audio: Kill unused spinlock The alsa_stream->lock is never used. Kill it. Signed-off-by: Takashi Iwai Tested-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman commit bf1ad3e007e26df838e839bba97c3396ee91f51d Author: Takashi Iwai Date: Tue Sep 4 17:58:38 2018 +0200 staging: bcm2835-audio: Fix incorrect draining handling The handling of SNDRV_PCM_TRIGGER_STOP at the trigger callback is incorrect: when the STOP is issued, the driver is supposed to drop the stream immediately. Meanwhile bcm2835 driver checks the DRAINING state and tries to issue some different command. This patch straightens things a bit, dropping the incorrect state checks. The draining behavior would be still not perfect at this point, but will be improved in a later patch. Signed-off-by: Takashi Iwai Tested-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman commit c5e7824b578639b244bdb3f96f4d3fcbfb2300ca Author: Takashi Iwai Date: Tue Sep 4 17:58:37 2018 +0200 staging: bcm2835-audio: Drop useless running flag and check The running flag of alsa_stream is basically useless. The running state is strictly controlled in ALSA PCM core side, hence the check in PCM trigger and close callbacks are superfluous. Also, the prefill ack at trigger start became superfluous nowadays with the ALSA PCM core update. Let's rip them off. Signed-off-by: Takashi Iwai Tested-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman commit aa45eeee516a16cbcb6733e3a57f06e6e4745749 Author: Takashi Iwai Date: Tue Sep 4 17:58:36 2018 +0200 staging: bcm2835-audio: Remove superfluous open flag All the alsa_stream->open flag checks in the current code are redundant, and they cannot be racy. For the code simplification, let's remove the flag and its check. Signed-off-by: Takashi Iwai Tested-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman commit 626f28d51d2123272b6520d61032c542b4c0eaaf Author: Takashi Iwai Date: Tue Sep 4 17:58:35 2018 +0200 staging: bcm2835-audio: Remove redundant function calls bcm2835_audio_setup(), bcm2835_audio_flush_buffers() and bcm2835_audio_flush_playback_buffers() functions do implement nothing. Also, bcm2835_audio_set_ctls() is already called inside bcm2835_audio_set_params(), so the later call is superfluous. This patch removes these superfluous implementations. Signed-off-by: Takashi Iwai Tested-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman commit a97962111e6710adb127bff28092236687b742c3 Author: Takashi Iwai Date: Tue Sep 4 17:58:34 2018 +0200 staging: bcm2835-audio: Fix mute controls, volume handling cleanup In the current code, the mute control is dealt in a special manner, modifying the current volume and saving the old volume, etc. This is inconsistent (e.g. change the volume while muted, then unmute), and way too complex. Also, the whole volume handling code has conversion between ALSA volume and raw volume values, which can lead to another inconsistency and complexity. This patch simplifies these points: - The ALSA volume value is saved in chip->volume - volume->mute saves the mute state - The mute state is evaluated only when the actual volume is passed to the hardware, bcm2835_audio_set_ctls() Signed-off-by: Takashi Iwai Tested-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman commit 51002248a68f2d7e4fcd254c9ae726ab6f40c71e Author: Takashi Iwai Date: Tue Sep 4 17:58:33 2018 +0200 staging: bcm2835-audio: Remove redundant substream mask checks The avail_substreams bit mask is checked for the possible racy accesses, but this cannot happen in practice; i.e. the assignment and the check are superfluous. Let's rip them off. Signed-off-by: Takashi Iwai Tested-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman commit 107f3512951993220c8a4032af4719fa3520f37b Author: Takashi Iwai Date: Tue Sep 4 17:58:32 2018 +0200 staging: bcm2835-audio: Clean up include files in bcm2835-ctl.c Only a few of them are really needed. Signed-off-by: Takashi Iwai Tested-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman commit 4620fd74a020dcbaed3303ff1dbef715fd02caad Author: Takashi Iwai Date: Tue Sep 4 17:58:31 2018 +0200 staging: bcm2835-audio: Remove redundant spdif stream ctls The "IEC958 Playback Stream" control does basically the very same thing as "IEC958 Playback Default" redundantly. The former should have been stream-specific and restored after closing the stream, but we don't do in that way. Since it's nothing but confusion, remove this fake. Signed-off-by: Takashi Iwai Tested-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman commit da85d3b1a8d4a9f70d4d48b7629f3f215ef9ec40 Author: Takashi Iwai Date: Tue Sep 4 17:58:30 2018 +0200 staging: bcm2835-audio: Clean up mutex locks snd-bcm2835 driver takes the lock with mutex_lock_interruptible() in all places, which don't make sense. Replace them with the simple mutex_lock(). Also taking a mutex lock right after creating it for each PCM object is nonsense, too. It cannot be racy at that point. We can get rid of it. Last but not least, initializing chip->audio_mutex at each place is error-prone. Initialize properly at creating the chip object in snd_bcm2835_create() instead. Signed-off-by: Takashi Iwai Tested-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman commit ca64b719a1e665ac7449b6a968059176af7365a8 Author: Sudeep Holla Date: Fri Sep 7 17:03:25 2018 +0100 firmware: arm_scmi: use strlcpy to ensure NULL-terminated strings Replace all the memcpy() for copying name strings from the firmware with strlcpy() to make sure we are bounded by the source buffer size and we also always have NULL-terminated strings. This is needed to avoid out of bounds accesses if the firmware returns a non-terminated string. Reported-by: Olof Johansson Acked-by: Olof Johansson Signed-off-by: Sudeep Holla commit 53706a1168631fa5bf2e6d47de4647ea7e69f270 Author: Zheng Yang Date: Fri Sep 7 12:28:02 2018 +0200 phy: add Rockchip Innosilicon hdmi phy Add a driver for the Innosilicon hdmi phy used on rk3228/rk3229 and rk3328 socs from Rockchip. Signed-off-by: Zheng Yang Signed-off-by: Heiko Stuebner Tested-by: Robin Murphy Signed-off-by: Kishon Vijay Abraham I commit 4e3fe1cb25adf305ee6b73d83bd1f507fc9c975c Author: Zheng Yang Date: Fri Sep 7 12:28:01 2018 +0200 dt-bindings: add binding for Rockchip hdmi phy using an Innosilicon IP The phy is used so far in two Rockchip socs the rk3228 and the rk3328. Signed-off-by: Zheng Yang Signed-off-by: Heiko Stuebner Reviewed-by: Rob Herring Signed-off-by: Kishon Vijay Abraham I commit ff28915fd31ccafc0d38e6f84b66df280ed9e86a Author: Uwe Kleine-König Date: Wed Sep 5 11:36:36 2018 +0200 sched/debug: Use symbolic names for task state constants include/trace/events/sched.h includes (via ) and so knows about the TASK_* constants used to interpret .prev_state. So instead of duplicating the magic numbers make use of the defined macros to ease understanding the mapping from state bits to letters which isn't completely intuitive for an outsider. Signed-off-by: Uwe Kleine-König Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Sebastian Andrzej Siewior Cc: Thomas Gleixner Cc: kernel@pengutronix.de Link: http://lkml.kernel.org/r/20180905093636.24068-1-u.kleine-koenig@pengutronix.de Signed-off-by: Ingo Molnar commit 7477a3504e619768c9e972dafe2907e6b8ed9823 Author: Vincent Guittot Date: Wed Aug 29 15:19:10 2018 +0200 sched/numa: Remove unused numa_stats::nr_running field nr_running in struct numa_stats is not used anywhere in the code. Remove it. Signed-off-by: Vincent Guittot Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Srikar Dronamraju Acked-by: Mel Gorman Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1535548752-4434-3-git-send-email-vincent.guittot@linaro.org Signed-off-by: Ingo Molnar commit d90707ebebe03596e19de3abbf79b766e72a3465 Author: Vincent Guittot Date: Wed Aug 29 15:19:09 2018 +0200 sched/numa: Remove unused code from update_numa_stats() With: commit 2d4056fafa19 ("sched/numa: Remove numa_has_capacity()") the local variables 'smt', 'cpus' and 'capacity' and their results are not used anymore in numa_has_capacity() Remove this unused code. Signed-off-by: Vincent Guittot Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Srikar Dronamraju Acked-by: Mel Gorman Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1535548752-4434-2-git-send-email-vincent.guittot@linaro.org Signed-off-by: Ingo Molnar commit 7e6f4c5d600c1c8e2a1d900e65cab319d9b6782e Author: Peter Zijlstra Date: Wed Aug 29 11:45:21 2018 +0200 sched/debug: Explicitly cast sched_feat() to bool LLVM has a warning that tags expressions like: if (foo && non-bool-const) This pattern triggers for CONFIG_SCHED_DEBUG=n where sched_feat() ends up being whatever bit we select. Avoid the warning with an explicit cast to bool. Reported-by: Philipp Klocke Tested-by: Nick Desaulniers Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar commit 9c63e84db29bcf584040931ad97c2edd11e35f6c Author: Morten Rasmussen Date: Wed Jul 4 11:17:50 2018 +0100 sched/core: Disable SD_PREFER_SIBLING on asymmetric CPU capacity domains The 'prefer sibling' sched_domain flag is intended to encourage spreading tasks to sibling sched_domain to take advantage of more caches and core for SMT systems. It has recently been changed to be on all non-NUMA topology level. However, spreading across domains with CPU capacity asymmetry isn't desirable, e.g. spreading from high capacity to low capacity CPUs even if high capacity CPUs aren't overutilized might give access to more cache but the CPU will be slower and possibly lead to worse overall throughput. To prevent this, we need to remove SD_PREFER_SIBLING on the sched_domain level immediately below SD_ASYM_CPUCAPACITY. Signed-off-by: Morten Rasmussen Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: dietmar.eggemann@arm.com Cc: gaku.inami.xh@renesas.com Cc: valentin.schneider@arm.com Cc: vincent.guittot@linaro.org Link: http://lkml.kernel.org/r/1530699470-29808-13-git-send-email-morten.rasmussen@arm.com Signed-off-by: Ingo Molnar commit 4ad3831a9d4af5e36da5d44a3b9c6522d0353cee Author: Chris Redpath Date: Wed Jul 4 11:17:48 2018 +0100 sched/fair: Don't move tasks to lower capacity CPUs unless necessary When lower capacity CPUs are load balancing and considering to pull something from a higher capacity group, we should not pull tasks from a CPU with only one task running as this is guaranteed to impede progress for that task. If there is more than one task running, load balance in the higher capacity group would have already made any possible moves to resolve imbalance and we should make better use of system compute capacity by moving a task if we still have more than one running. Signed-off-by: Chris Redpath Signed-off-by: Morten Rasmussen Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: dietmar.eggemann@arm.com Cc: gaku.inami.xh@renesas.com Cc: valentin.schneider@arm.com Cc: vincent.guittot@linaro.org Link: http://lkml.kernel.org/r/1530699470-29808-11-git-send-email-morten.rasmussen@arm.com Signed-off-by: Ingo Molnar commit 757ffdd705ee942fc8150b17942d968601d2a15b Author: Valentin Schneider Date: Wed Jul 4 11:17:47 2018 +0100 sched/fair: Set rq->rd->overload when misfit Idle balance is a great opportunity to pull a misfit task. However, there are scenarios where misfit tasks are present but idle balance is prevented by the overload flag. A good example of this is a workload of n identical tasks. Let's suppose we have a 2+2 Arm big.LITTLE system. We then spawn 4 fairly CPU-intensive tasks - for the sake of simplicity let's say they are just CPU hogs, even when running on big CPUs. They are identical tasks, so on an SMP system they should all end at (roughly) the same time. However, in our case the LITTLE CPUs are less performing than the big CPUs, so tasks running on the LITTLEs will have a longer completion time. This means that the big CPUs will complete their work earlier, at which point they should pull the tasks from the LITTLEs. What we want to happen is summarized as follows: a,b,c,d are our CPU-hogging tasks _ signifies idling LITTLE_0 | a a a a _ _ LITTLE_1 | b b b b _ _ ---------|------------- big_0 | c c c c a a big_1 | d d d d b b ^ ^ Tasks end on the big CPUs, idle balance happens and the misfit tasks are pulled straight away This however won't happen, because currently the overload flag is only set when there is any CPU that has more than one runnable task - which may very well not be the case here if our CPU-hogging workload is all there is to run. As such, this commit sets the overload flag in update_sg_lb_stats when a group is flagged as having a misfit task. Signed-off-by: Valentin Schneider Signed-off-by: Morten Rasmussen Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: dietmar.eggemann@arm.com Cc: gaku.inami.xh@renesas.com Cc: vincent.guittot@linaro.org Link: http://lkml.kernel.org/r/1530699470-29808-10-git-send-email-morten.rasmussen@arm.com Signed-off-by: Ingo Molnar commit e90c8fe15a3bf93a23088bcf1a56a0fa391d4e50 Author: Valentin Schneider Date: Wed Jul 4 11:17:46 2018 +0100 sched/fair: Wrap rq->rd->overload accesses with READ/WRITE_ONCE() This variable can be read and set locklessly within update_sd_lb_stats(). As such, READ/WRITE_ONCE() are added to make sure nothing terribly wrong can happen because of the compiler. Signed-off-by: Valentin Schneider Signed-off-by: Morten Rasmussen Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: dietmar.eggemann@arm.com Cc: gaku.inami.xh@renesas.com Cc: vincent.guittot@linaro.org Link: http://lkml.kernel.org/r/1530699470-29808-9-git-send-email-morten.rasmussen@arm.com Signed-off-by: Ingo Molnar commit 575638d1047eb057a5cdf95cc0b3c084e1279508 Author: Valentin Schneider Date: Wed Jul 4 11:17:45 2018 +0100 sched/core: Change root_domain->overload type to int sizeof(_Bool) is implementation defined, so let's just go with 'int' as is done for other structures e.g. sched_domain_shared->has_idle_cores. The local 'overload' variable used in update_sd_lb_stats can remain bool, as it won't impact any struct layout and can be assigned to the root_domain field. Signed-off-by: Valentin Schneider Signed-off-by: Morten Rasmussen Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: dietmar.eggemann@arm.com Cc: gaku.inami.xh@renesas.com Cc: vincent.guittot@linaro.org Link: http://lkml.kernel.org/r/1530699470-29808-8-git-send-email-morten.rasmussen@arm.com Signed-off-by: Ingo Molnar commit dbbad719449e06d73db21598d6eee178f7a54b3b Author: Valentin Schneider Date: Wed Jul 4 11:17:44 2018 +0100 sched/fair: Change 'prefer_sibling' type to bool This variable is entirely local to update_sd_lb_stats, so we can safely change its type and slightly clean up its initialisation. Signed-off-by: Valentin Schneider Signed-off-by: Morten Rasmussen Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: dietmar.eggemann@arm.com Cc: gaku.inami.xh@renesas.com Cc: vincent.guittot@linaro.org Link: http://lkml.kernel.org/r/1530699470-29808-7-git-send-email-morten.rasmussen@arm.com Signed-off-by: Ingo Molnar commit 5fbdfae5221a5208ed8e7653fc1c4b31de420f74 Author: Valentin Schneider Date: Wed Jul 4 11:17:43 2018 +0100 sched/fair: Kick nohz balance if rq->misfit_task_load There already are a few conditions in nohz_kick_needed() to ensure a nohz kick is triggered, but they are not enough for some misfit task scenarios. Excluding asym packing, those are: - rq->nr_running >=2: Not relevant here because we are running a misfit task, it needs to be migrated regardless and potentially through active balance. - sds->nr_busy_cpus > 1: If there is only the misfit task being run on a group of low capacity CPUs, this will be evaluated to False. - rq->cfs.h_nr_running >=1 && check_cpu_capacity(): Not relevant here, misfit task needs to be migrated regardless of rt/IRQ pressure As such, this commit adds an rq->misfit_task_load condition to trigger a nohz kick. The idea to kick a nohz balance for misfit tasks originally came from Leo Yan , and a similar patch was submitted for the Android Common Kernel - see: https://lists.linaro.org/pipermail/eas-dev/2016-September/000551.html Signed-off-by: Valentin Schneider Signed-off-by: Morten Rasmussen Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: dietmar.eggemann@arm.com Cc: gaku.inami.xh@renesas.com Cc: vincent.guittot@linaro.org Link: http://lkml.kernel.org/r/1530699470-29808-6-git-send-email-morten.rasmussen@arm.com Signed-off-by: Ingo Molnar commit cad68e552e7774b68ae6a2c5fedb792936098b72 Author: Morten Rasmussen Date: Wed Jul 4 11:17:42 2018 +0100 sched/fair: Consider misfit tasks when load-balancing On asymmetric CPU capacity systems load intensive tasks can end up on CPUs that don't suit their compute demand. In this scenarios 'misfit' tasks should be migrated to CPUs with higher compute capacity to ensure better throughput. group_misfit_task indicates this scenario, but tweaks to the load-balance code are needed to make the migrations happen. Misfit balancing only makes sense between a source group of lower per-CPU capacity and destination group of higher compute capacity. Otherwise, misfit balancing is ignored. group_misfit_task has lowest priority so any imbalance due to overload is dealt with first. The modifications are: 1. Only pick a group containing misfit tasks as the busiest group if the destination group has higher capacity and has spare capacity. 2. When the busiest group is a 'misfit' group, skip the usual average load and group capacity checks. 3. Set the imbalance for 'misfit' balancing sufficiently high for a task to be pulled ignoring average load. 4. Pick the CPU with the highest misfit load as the source CPU. 5. If the misfit task is alone on the source CPU, go for active balancing. Signed-off-by: Morten Rasmussen Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: dietmar.eggemann@arm.com Cc: gaku.inami.xh@renesas.com Cc: valentin.schneider@arm.com Cc: vincent.guittot@linaro.org Link: http://lkml.kernel.org/r/1530699470-29808-5-git-send-email-morten.rasmussen@arm.com Signed-off-by: Ingo Molnar commit e3d6d0cb66f2351cbfd09fbae04eb9804afe9577 Author: Morten Rasmussen Date: Wed Jul 4 11:17:41 2018 +0100 sched/fair: Add sched_group per-CPU max capacity The current sg->min_capacity tracks the lowest per-CPU compute capacity available in the sched_group when rt/irq pressure is taken into account. Minimum capacity isn't the ideal metric for tracking if a sched_group needs offloading to another sched_group for some scenarios, e.g. a sched_group with multiple CPUs if only one is under heavy pressure. Tracking maximum capacity isn't perfect either but a better choice for some situations as it indicates that the sched_group definitely compute capacity constrained either due to rt/irq pressure on all CPUs or asymmetric CPU capacities (e.g. big.LITTLE). Signed-off-by: Morten Rasmussen Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: dietmar.eggemann@arm.com Cc: gaku.inami.xh@renesas.com Cc: valentin.schneider@arm.com Cc: vincent.guittot@linaro.org Link: http://lkml.kernel.org/r/1530699470-29808-4-git-send-email-morten.rasmussen@arm.com Signed-off-by: Ingo Molnar commit 3b1baa6496e6b7ad016342a9d256bdfb072ce902 Author: Morten Rasmussen Date: Wed Jul 4 11:17:40 2018 +0100 sched/fair: Add 'group_misfit_task' load-balance type To maximize throughput in systems with asymmetric CPU capacities (e.g. ARM big.LITTLE) load-balancing has to consider task and CPU utilization as well as per-CPU compute capacity when load-balancing in addition to the current average load based load-balancing policy. Tasks with high utilization that are scheduled on a lower capacity CPU need to be identified and migrated to a higher capacity CPU if possible to maximize throughput. To implement this additional policy an additional group_type (load-balance scenario) is added: 'group_misfit_task'. This represents scenarios where a sched_group has one or more tasks that are not suitable for its per-CPU capacity. 'group_misfit_task' is only considered if the system is not overloaded or imbalanced ('group_imbalanced' or 'group_overloaded'). Identifying misfit tasks requires the rq lock to be held. To avoid taking remote rq locks to examine source sched_groups for misfit tasks, each CPU is responsible for tracking misfit tasks themselves and update the rq->misfit_task flag. This means checking task utilization when tasks are scheduled and on sched_tick. Signed-off-by: Morten Rasmussen Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: dietmar.eggemann@arm.com Cc: gaku.inami.xh@renesas.com Cc: valentin.schneider@arm.com Cc: vincent.guittot@linaro.org Link: http://lkml.kernel.org/r/1530699470-29808-3-git-send-email-morten.rasmussen@arm.com Signed-off-by: Ingo Molnar commit df054e8445a4011e3d693c2268129c0456108663 Author: Morten Rasmussen Date: Wed Jul 4 11:17:39 2018 +0100 sched/topology: Add static_key for asymmetric CPU capacity optimizations The existing asymmetric CPU capacity code should cause minimal overhead for others. Putting it behind a static_key, it has been done for SMT optimizations, would make it easier to extend and improve without causing harm to others moving forward. Signed-off-by: Morten Rasmussen Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: dietmar.eggemann@arm.com Cc: gaku.inami.xh@renesas.com Cc: valentin.schneider@arm.com Cc: vincent.guittot@linaro.org Link: http://lkml.kernel.org/r/1530699470-29808-2-git-send-email-morten.rasmussen@arm.com Signed-off-by: Ingo Molnar commit e1799a80a4f5a463f252b7325da8bb66dfd55471 Author: Morten Rasmussen Date: Fri Jul 20 14:32:34 2018 +0100 sched/topology, arch/arm: Rebuild sched_domain hierarchy when CPU capacity changes Asymmetric CPU capacity can not necessarily be determined accurately at the time the initial sched_domain hierarchy is built during boot. It is therefore necessary to be able to force a full rebuild of the hierarchy later triggered by the arch_topology driver. A full rebuild requires the arch-code to implement arch_update_cpu_topology() which isn't yet implemented for arm. This patch points the arm implementation to arch_topology driver to ensure that full hierarchy rebuild happens when needed. Signed-off-by: Morten Rasmussen Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Russell King Cc: Thomas Gleixner Cc: dietmar.eggemann@arm.com Cc: valentin.schneider@arm.com Cc: vincent.guittot@linaro.org Link: http://lkml.kernel.org/r/1532093554-30504-5-git-send-email-morten.rasmussen@arm.com Signed-off-by: Ingo Molnar commit 3ba09df4b8b6e3f01ed6381e8fb890840fd0bca3 Author: Morten Rasmussen Date: Fri Jul 20 14:32:33 2018 +0100 sched/topology, arch/arm64: Rebuild the sched_domain hierarchy when the CPU capacity changes Asymmetric CPU capacity can not necessarily be determined accurately at the time the initial sched_domain hierarchy is built during boot. It is therefore necessary to be able to force a full rebuild of the hierarchy later triggered by the arch_topology driver. A full rebuild requires the arch-code to implement arch_update_cpu_topology() which isn't yet implemented for arm64. This patch points the arm64 implementation to arch_topology driver to ensure that full hierarchy rebuild happens when needed. Signed-off-by: Morten Rasmussen Signed-off-by: Peter Zijlstra (Intel) Cc: Catalin Marinas Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Will Deacon Cc: dietmar.eggemann@arm.com Cc: valentin.schneider@arm.com Cc: vincent.guittot@linaro.org Link: http://lkml.kernel.org/r/1532093554-30504-4-git-send-email-morten.rasmussen@arm.com Signed-off-by: Ingo Molnar commit bb1fbdd3c3fd12b612c7d8cdf13bd6bfeebdefa3 Author: Morten Rasmussen Date: Fri Jul 20 14:32:32 2018 +0100 sched/topology, drivers/base/arch_topology: Rebuild the sched_domain hierarchy when capacities change The setting of SD_ASYM_CPUCAPACITY depends on the per-CPU capacities. These might not have their final values when the hierarchy is initially built as the values depend on cpufreq to be initialized or the values being set through sysfs. To ensure that the flags are set correctly we need to rebuild the sched_domain hierarchy whenever the reported per-CPU capacity (arch_scale_cpu_capacity()) changes. This patch ensure that a full sched_domain rebuild happens when CPU capacity changes occur. Signed-off-by: Morten Rasmussen Signed-off-by: Peter Zijlstra (Intel) Cc: Greg Kroah-Hartman Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: dietmar.eggemann@arm.com Cc: valentin.schneider@arm.com Cc: vincent.guittot@linaro.org Link: http://lkml.kernel.org/r/1532093554-30504-3-git-send-email-morten.rasmussen@arm.com Signed-off-by: Ingo Molnar commit 05484e0984487d42e97c417cbb0697fa9d16e7e9 Author: Morten Rasmussen Date: Fri Jul 20 14:32:31 2018 +0100 sched/topology: Add SD_ASYM_CPUCAPACITY flag detection The SD_ASYM_CPUCAPACITY sched_domain flag is supposed to mark the sched_domain in the hierarchy where all CPU capacities are visible for any CPU's point of view on asymmetric CPU capacity systems. The scheduler can then take to take capacity asymmetry into account when balancing at this level. It also serves as an indicator for how wide task placement heuristics have to search to consider all available CPU capacities as asymmetric systems might often appear symmetric at smallest level(s) of the sched_domain hierarchy. The flag has been around for while but so far only been set by out-of-tree code in Android kernels. One solution is to let each architecture provide the flag through a custom sched_domain topology array and associated mask and flag functions. However, SD_ASYM_CPUCAPACITY is special in the sense that it depends on the capacity and presence of all CPUs in the system, i.e. when hotplugging all CPUs out except those with one particular CPU capacity the flag should disappear even if the sched_domains don't collapse. Similarly, the flag is affected by cpusets where load-balancing is turned off. Detecting when the flags should be set therefore depends not only on topology information but also the cpuset configuration and hotplug state. The arch code doesn't have easy access to the cpuset configuration. Instead, this patch implements the flag detection in generic code where cpusets and hotplug state is already taken care of. All the arch is responsible for is to implement arch_scale_cpu_capacity() and force a full rebuild of the sched_domain hierarchy if capacities are updated, e.g. later in the boot process when cpufreq has initialized. Signed-off-by: Morten Rasmussen Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: dietmar.eggemann@arm.com Cc: valentin.schneider@arm.com Cc: vincent.guittot@linaro.org Link: http://lkml.kernel.org/r/1532093554-30504-2-git-send-email-morten.rasmussen@arm.com [ Fixed 'CPU' capitalization. ] Signed-off-by: Ingo Molnar commit 9be08a27a1588d0b0143486f96c7a08f8cfadae8 Author: zhong jiang Date: Thu Aug 16 23:58:55 2018 +0800 phy:phy-lantiq-rcu-usb2: Use PTR_ERR_OR_ZERO to replace the open coded version PTR_ERR_OR_ZERO has implemented the if(IS_ERR(...)) + PTR_ERR, So just replace them rather than duplicating its implement. Signed-off-by: zhong jiang Acked-by: Hauke Mehrtens Signed-off-by: Kishon Vijay Abraham I commit 528648143354e0551087adfad27c174083316ca3 Author: zhong jiang Date: Thu Aug 16 23:58:54 2018 +0800 phy:phy-brcm-usb: Use PTR_ERR_OR_ZERO to replace the open coded version PTR_ERR_OR_ZERO has implemented the if(IS_ERR(...)) + PTR_ERR, So just replace them rather than duplicating its implement. Signed-off-by: zhong jiang Signed-off-by: Kishon Vijay Abraham I commit eee0e5daa7574208f84fc24bc829ece58ef021f1 Author: Wolfram Sang Date: Wed Aug 22 00:02:20 2018 +0200 phy: renesas: use SPDX identifier for Renesas drivers Use SPDX identifier for Renesas drivers. Signed-off-by: Wolfram Sang Acked-by: Yoshihiro Shimoda Reviewed-by: Simon Horman Signed-off-by: Kishon Vijay Abraham I commit c339d3e0fb100465d644ccf84590e6f5e5ad80b9 Author: Kunihiko Hayashi Date: Wed Aug 22 12:50:34 2018 +0900 phy: socionext: add USB2 PHY driver for UniPhier SoC Add a driver for PHY interface built into USB2 controller implemented on UniPhier SoCs. This driver supports HS-PHY for Pro4 and LD11. Signed-off-by: Kunihiko Hayashi Signed-off-by: Kishon Vijay Abraham I commit 39f68636490f1cd4dd5fd5173fb776433f6bf072 Author: Kunihiko Hayashi Date: Wed Aug 22 12:50:33 2018 +0900 dt-bindings: phy: add DT bindings for UniPhier USB2 PHY driver Add DT bindings for PHY interface built into USB2 controller implemented on Socionext UniPhier SoCs. Signed-off-by: Kunihiko Hayashi Signed-off-by: Kishon Vijay Abraham I commit 5ab43d0f86979d6741c1dda685af3e053982e03e Author: Kunihiko Hayashi Date: Wed Aug 22 12:50:32 2018 +0900 phy: socionext: add USB3 PHY driver for UniPhier SoC Add a driver for PHY interface built into USB3 controller implemented in UniPhier SoCs. This driver supports High-Speed PHY and Super-Speed PHY. Signed-off-by: Kunihiko Hayashi Signed-off-by: Motoya Tanigawa Signed-off-by: Masami Hiramatsu Signed-off-by: Kishon Vijay Abraham I commit 270d5aad53cdf93c00271eaa4568578a1ed86448 Author: Kunihiko Hayashi Date: Wed Aug 22 12:50:31 2018 +0900 dt-bindings: phy: add DT bindings for UniPhier USB3 PHY driver Add DT bindings for PHY interface built into USB3 controller implemented in UniPhier SoCs. Signed-off-by: Kunihiko Hayashi Signed-off-by: Kishon Vijay Abraham I commit 6100ac72dc0ba002a6ff602e8a043a9800f2ee0b Author: Douglas Anderson Date: Mon May 14 15:42:22 2018 -0700 phy: qcom-qusb2: Quiet -EPROBE_DEFER from qusb2_phy_probe() The -EPROBE_DEFER virus demands special case code to avoid printing error messages when the error is only -EPROBE_DEFER. Spread the virus to a new host: qusb2_phy_probe(). Specifically handle when our regulators might not be ready yet. Signed-off-by: Douglas Anderson Reviewed-by: Vivek Gautam Signed-off-by: Kishon Vijay Abraham I commit 22fa10e52ab30cf33c200d9f73be22600427b739 Author: Douglas Anderson Date: Mon May 14 15:42:21 2018 -0700 phy: qcom-qmp: Quiet -EPROBE_DEFER from qcom_qmp_phy_probe() The -EPROBE_DEFER virus demands special case code to avoid printing error messages when the error is only -EPROBE_DEFER. Spread the virus to a new host: qcom_qmp_phy_probe(). Specifically handle when our regulators might not be ready yet. Signed-off-by: Douglas Anderson Reviewed-by: Vivek Gautam Signed-off-by: Kishon Vijay Abraham I commit c8b427edc7378fa540a03d44ed61eb49cb7f64bc Author: Scott Telford Date: Thu Aug 9 11:30:30 2018 +0100 phy: Add driver for Cadence MHDP DisplayPort SD0801 PHY Add driver for the Cadence SD0801 "Torrent" PHY used with the Cadence MHDP DisplayPort Tx controller. Integration with the MHDP driver will be the subject of another commit. Signed-off-by: Scott Telford Signed-off-by: Kishon Vijay Abraham I commit 7effc8ba3e831b740b792093be8765290e49c0c8 Author: Scott Telford Date: Thu Aug 9 11:30:29 2018 +0100 dt-bindings: phy: Document Cadence MHDP DisplayPort PHY bindings Signed-off-by: Scott Telford Signed-off-by: Kishon Vijay Abraham I commit 2f2ce8fe3c0f2f45f6c273a3b7854a72e279005c Author: Douglas Anderson Date: Mon Aug 6 22:14:12 2018 -0700 dt-bindings: phy: qcom-qmp: Cleanup the 'reg' documentation as per review After the commit 8b1087fa3a27 ("phy: qcom-qmp: Fix dts bindings to reflect reality") landed there was some review feedback that 'reg' should have been documented differently. Fix it as per review feedback. As per that feedback: - Subject should have been 'dt-bindings: phy:' which this patch now has. - We should leave no ambiguity in the ordering of 'reg' ranges even if 'reg-names' are also specified. - Normally using reg-names is discouraged unless there's a strong reason it's needed (like if there are optional ranges). In this case reg-names wasn't needed but the driver already landed relying on reg-names so we'll just document it and move on. Fixes: 8b1087fa3a27 ("phy: qcom-qmp: Fix dts bindings to reflect reality") Suggested-by: Rob Herring Signed-off-by: Douglas Anderson Reviewed-by: Rob Herring Signed-off-by: Kishon Vijay Abraham I commit 7f3ef5dedb146e3d5063b6845781ad1bb59b92b5 Author: Marc Zyngier Date: Sun Aug 5 13:48:07 2018 +0100 drm/rockchip: Allow driver to be shutdown on reboot/kexec Leaving the DRM driver enabled on reboot or kexec has the annoying effect of leaving the display generating transactions whilst the IOMMU has been shut down. In turn, the IOMMU driver (which shares its interrupt line with the VOP) starts warning either on shutdown or when entering the secondary kernel in the kexec case (nothing is expected on that front). A cheap way of ensuring that things are nicely shut down is to register a shutdown callback in the platform driver. Signed-off-by: Marc Zyngier Tested-by: Vicente Bergas Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20180805124807.18169-1-marc.zyngier@arm.com Cc: stable@vger.kernel.org commit 7e33f3850c53e10704990f21a160705474f72f43 Author: Rob Herring Date: Wed Aug 29 13:34:03 2018 -0500 staging: mt7621-pci: remove unnecessary check of device_type == pci PCI host drivers have already matched on compatible strings, so checking device_type is redundant. Also, device_type is considered deprecated for FDT though we've still been requiring it for PCI hosts as it is useful for finding PCI buses. Cc: devel@driverdev.osuosl.org Signed-off-by: Rob Herring Signed-off-by: Greg Kroah-Hartman commit 13b72b089b9c9520a6ebeb388436a9ee14322279 Author: Ioana Radulescu Date: Thu Aug 30 16:17:08 2018 +0300 staging: fsl-dpaa2/ethsw: Fix uninitialized variables Functions port_vlans_add() and port_vlans_del() could, in theory, return an uninitialized variable. Fix this by initializing the variable in question at declaration. Signed-off-by: Ioana Radulescu Reported-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman commit b972c798fbab3a17088e637b1bfb63972a0aaca7 Author: John Whitmore Date: Tue Aug 28 19:55:35 2018 +0100 staging:rtl8192u: Rename member pDot11dInfo - Style Rename 'pDot11dInfo', this member variable of the structure ieee80211_device causes a checkpatch issue, CamelCase naming. The member has been renamed 'dot11d_info' to clear this issue. This is a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore Signed-off-by: Greg Kroah-Hartman commit d0679000c49867a398617581f49ce457c6a4c915 Author: John Whitmore Date: Tue Aug 28 19:55:34 2018 +0100 staging:rtl8192u: Refactor member variable enabled - Style The structure rt_dot11d_info contains a memeber variable 'enabled', which causes a checkpatch issue as it is declared as being of type bool. The type of the variable has been changed to a 'u8', to clear the issue. Additionally to aid searching for the member variable in code it has been renamed from 'enabled' to 'dot11d_enabled'. These are purely coding style changes which should not impact runtime code execution. Signed-off-by: John Whitmore Signed-off-by: Greg Kroah-Hartman commit 2e9e6dd41cc63763ab06a23808290cfca24404fb Author: John Whitmore Date: Tue Aug 28 19:55:33 2018 +0100 staging:rtl8192u: Add required SPDX-License-Identifier - Style Add the required SPDX-License-Identifier to the file r8180_93cx6.h, this clears a checkpatch issue. This is a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore Signed-off-by: Greg Kroah-Hartman commit 0b8a052c58d1643a4d6239090bcf4328a2eba0c6 Author: John Whitmore Date: Tue Aug 28 19:55:32 2018 +0100 staging:rtl8192u: Remove unused definitions - Style Remove unused definitions from the file r8180_93cx6.h. This is a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore Signed-off-by: Greg Kroah-Hartman commit 35ba13e43cfb7f36541e44516b01cf6a3f8a5ea1 Author: Alexey Skidanov Date: Wed Sep 5 08:03:15 2018 +0300 staging: android: ion: Clean unused debug_show memeber of the heap object ION had supported heap debug info under /sys/kernel/debug/ion/. This support have been removed but some leftovers (dead code) still exist. This patch removes the existing dead code. Fixes: 15c6098cfec5 ("staging: android: ion: Remove ion_handle and ion_client") Signed-off-by: Alexey Skidanov Acked-by: Laura Abbott Signed-off-by: Greg Kroah-Hartman commit 9003987a08d4dd7bf9d2e5d3e332cc0b515812e4 Author: John Whitmore Date: Tue Sep 4 11:56:23 2018 +0100 staging:rtl8192u: Rename dot11d_init to fix name clash The function dot11d_init() was previously renamed to clear a style issue. Unfortunately the new name used, dot11d_init(), clashes with a sybmol which is exported with the same name. To correct this problem the function has been renamed to rtl8192u_dot11d_init(). Reported-by: Stephen Rothwell Signed-off-by: John Whitmore Signed-off-by: Greg Kroah-Hartman commit f8aefb7de0e2fdc5ffc3eddcc8f67430fe3fca5f Author: Colin Ian King Date: Wed Aug 29 10:35:30 2018 +0100 staging: fsl-dpaa2/ethsw: remove redundant pointer 'port_priv' Pointer 'port_priv' is being assigned but is never used hence it is redundant and can be removed. Cleans up clang warning: variable 'port_priv' set but not used [-Wunused-but-set-variable] Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman commit f93861c2d6118f721a34656f3a23dc49400484af Author: Rob Herring Date: Tue Aug 28 10:44:33 2018 -0500 staging: 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: Steve Longerbeam Cc: Philipp Zabel Cc: Mauro Carvalho Chehab Cc: Greg Kroah-Hartman Cc: linux-media@vger.kernel.org Cc: devel@driverdev.osuosl.org Signed-off-by: Rob Herring Signed-off-by: Greg Kroah-Hartman commit 9989d7f5495da56ff5eb79670d0e22ef828aabb5 Author: Larry Finger Date: Mon Aug 27 13:46:46 2018 -0500 staging: rtl8712u: Fix compiler warning about strncpy When strncpy() is called with source and destination strings the same length, gcc 8 warns that there may be an unterminated string. Using strlcpy() rather than strncpy() forces a null at the end and quiets the warning. Signed-off-by: Larry Finger Signed-off-by: Greg Kroah-Hartman commit 86eac24dbb7b0acc8608a52d42bc18e85c78d7ff Author: Larry Finger Date: Mon Aug 27 13:46:45 2018 -0500 staging: rtl8192e: Fix compiler warning from strncpy() When strncpy() is called with source and destination strings the same length, gcc 8 warns that there may be an unterminated string. This section is completely reworked to use the known lengths of the strings. Signed-off-by: Larry Finger Signed-off-by: Greg Kroah-Hartman commit 4b486b535c33ef354ecf02a2650919004fd7d2b0 Author: Waiman Long Date: Tue Jul 24 15:10:25 2018 -0400 locking/rwsem: Exit read lock slowpath if queue empty & no writer It was discovered that a constant stream of readers with occassional writers pounding on a rwsem may cause many of the readers to enter the slowpath unnecessarily thus increasing latency and lowering performance. In the current code, a reader entering the slowpath critical section will unconditionally set the WAITING_BIAS, if not set yet, and clear its active count even if no one is in the wait queue and no writer is present. This causes some incoming readers to observe the presence of waiters in the wait queue and hence have to go into the slowpath themselves. With sufficient numbers of readers and a relatively short lock hold time, the WAITING_BIAS may be repeatedly turned on and off and a substantial portion of the readers will go into the slowpath sustaining a rather long queue in the wait queue spinlock and repeated WAITING_BIAS on/off cycle until the logjam is broken opportunistically. To avoid this situation from happening, an additional check is added to detect the special case that the reader in the critical section is the only one in the wait queue and no writer is present. When that happens, it can just exit the slowpath and return immediately as its active count has already been set in the lock. Other incoming readers won't observe the presence of waiters and so will not be forced into the slowpath. The issue was found in a customer site where they had an application that pounded on the pread64 syscalls heavily on an XFS filesystem. The application was run in a recent 4-socket boxes with a lot of CPUs. They saw significant spinlock contention in the rwsem_down_read_failed() call. With this patch applied, the system CPU usage went down from 85% to 57%, and the spinlock contention in the pread64 syscalls was gone. Signed-off-by: Waiman Long Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Davidlohr Bueso Acked-by: Will Deacon Cc: Joe Mario Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1532459425-19204-1-git-send-email-longman@redhat.com Signed-off-by: Ingo Molnar commit cb538267ea1e9e025ec692577c9ae75797261889 Author: Peter Zijlstra Date: Tue Jul 31 14:35:32 2018 +0200 jump_label/lockdep: Assert we hold the hotplug lock for _cpuslocked() operations Weirdly we seem to have forgotten this... Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Ingo Molnar commit ce991095ccdf83ab4af7b4f5de0c8d3306fb97bf Merge: 34e12b864e61 da260fe12330 Author: Ingo Molnar Date: Mon Sep 10 10:16:22 2018 +0200 Merge branch 'locking/urgent' into locking/core, to pick up fixes Signed-off-by: Ingo Molnar commit f72403461bd40658fe483c4caba592c55b84521a Author: Pavel Zemlyanoy Date: Thu Aug 30 18:14:02 2018 +0300 staging: erofs: fix 1 warning and 9 checks This patch does not change the logic, it only corrects the formatting and checkpatch checks by braces {} should be used on all arms of this statement, unbalanced braces around else statement and warning by braces {} are not necessary for any arm of this statement. The patch fixes 9 checks of type: "Check: braces {} should be used on all arms of this statement"; "Check: Unbalanced braces around else statement"; and 1 warning of type: "WARNING: braces {} are not necessary for any arm of this statement". Signed-off-by: Pavel Zemlyanoy Reviewed-by: Chao Yu Reviewed-by: Gao Xiang Signed-off-by: Greg Kroah-Hartman commit e4fccc8c9d0a7163017d5e88811632a4ecd59a5d Author: Pavel Zemlyanoy Date: Thu Aug 30 18:14:01 2018 +0300 staging: erofs: formatting alignment parenthesis This patch does not change the logic, it only corrects the formatting and checkpatch check by alignment should match open parenthesis. The patch fixes 2 check of type: "Check: Alignment should match open parenthesis". Signed-off-by: Pavel Zemlyanoy Reviewed-by: Chao Yu Reviewed-by: Gao Xiang Signed-off-by: Greg Kroah-Hartman commit ea0b2d429bd82ec152d286a0c026ebcaa4154ccc Author: Pavel Zemlyanoy Date: Thu Aug 30 18:14:00 2018 +0300 staging: erofs: formatting add spaces arround '*' This patch does not change the logic, it only corrects the formatting and checkpatch check by adding spaces around '*'. The patch fixes 1 check of type: "Check: spaces preferred around that '*'". Signed-off-by: Pavel Zemlyanoy Reviewed-by: Chao Yu Reviewed-by: Gao Xiang Signed-off-by: Greg Kroah-Hartman commit b566ffc3fab6d0a18397d5b1f4e1bf138e1909c9 Author: Pavel Zemlyanoy Date: Thu Aug 30 18:13:59 2018 +0300 staging: erofs: formatting spaces around '-' This patch does not change the logic, it only corrects the formatting and checkpatch checks by adding spaces around '-'. The patch fixes 4 checks of type: "Check: spaces preferred around that '-'". Signed-off-by: Pavel Zemlyanoy Reviewed-by: Chao Yu Reviewed-by: Gao Xiang Signed-off-by: Greg Kroah-Hartman commit 196ef5f36071456c47816bfe0a02ce06fd50258b Author: Pavel Zemlyanoy Date: Thu Aug 30 18:13:58 2018 +0300 staging: erofs: formatting fix to NULL comparison This patch does not change the logic, it only corrects the formatting and checkpatch checks by to NULL comparison. The patch fixes 5 checks of type: "Comparison to NULL could be written". Signed-off-by: Pavel Zemlyanoy Reviewed-by: Chao Yu Reviewed-by: Gao Xiang Signed-off-by: Greg Kroah-Hartman commit e84e1ed8cdd750b87d401a99a4de0f40d5d7ff26 Author: Pavel Zemlyanoy Date: Thu Aug 30 18:13:57 2018 +0300 staging: erofs: formatting fix in unzip_vle_lz4.c This patch does not change the logic, it only corrects the formatting and checkpatch warnings by adding "int" to the unsigned type. The patch fixes 11 warnings of the type: "WARNING: Prefer 'unsigned int' to bare use of 'unsigned'" Signed-off-by: Pavel Zemlyanoy Reviewed-by: Chao Yu Reviewed-by: Gao Xiang Signed-off-by: Greg Kroah-Hartman commit aca19723604c232ffc6376c1c6cd9c8a12158dcc Author: Gao Xiang Date: Tue Aug 28 11:39:48 2018 +0800 Revert "staging: erofs: disable compiling temporarile" This reverts commit 156c3df8d4db4e693c062978186f44079413d74d. Since XArray and the new mount apis aren't merged in 4.19-rc1 merge window, the BROKEN mark can be reverted directly without any problems. Fixes: 156c3df8d4db ("staging: erofs: disable compiling temporarile") Cc: Matthew Wilcox Cc: David Howells Reviewed-by: Chao Yu Signed-off-by: Gao Xiang Signed-off-by: Greg Kroah-Hartman commit 89c68b102f13f123aaef22b292526d6b92501334 Author: Stephen Boyd Date: Thu Aug 30 17:58:52 2018 -0700 pinctrl: qcom: spmi-mpp: Fix drive strength setting It looks like we parse the drive strength setting here, but never actually write it into the hardware to update it. Parse the setting and then write it at the end of the pinconf setting function so that it actually sticks in the hardware. Fixes: 0e948042c420 ("pinctrl: qcom: spmi-mpp: Implement support for sink mode") Cc: Doug Anderson Signed-off-by: Stephen Boyd Reviewed-by: Bjorn Andersson Signed-off-by: Linus Walleij commit 64b6acf60b665fffd419c23886a1cbeeb253cfb4 Author: Ricardo Biehl Pasquali Date: Fri Sep 7 16:58:54 2018 -0300 ALSA: pcm: Update hardware pointer before start capture This ensures the transfer loop won't waste a run to read the few frames (if any) between start and hw_ptr update. It will wait for the next interrupt with wait_for_avail(). Signed-off-by: Ricardo Biehl Pasquali Signed-off-by: Takashi Iwai commit 1c939cb556b99519cc5e75b66543ac499acfd781 Author: Hans Verkuil Date: Sat Sep 8 11:23:19 2018 +0200 gpio-bcm-kona: use new req/relres and dis/enable_irq funcs Since this driver does not use the gpiolib irqchip helpers it will have to allocate the irq resources and irq_en/disable itself. Use the new gpiochip_req/relres_irq helpers to request/release all the resources. Signed-off-by: Hans Verkuil Cc: Ray Jui Signed-off-by: Linus Walleij commit 4f8183ae7092fe3a6985b9a10a5d7f3efa01b097 Author: Hans Verkuil Date: Sat Sep 8 11:23:18 2018 +0200 gpio/driver.rst: document gpiochip_disable/enable_irq() Document these new functions. Signed-off-by: Hans Verkuil Signed-off-by: Linus Walleij commit 461c1a7d4733d1dfd5c47b040cf32a5e7eefbc6c Author: Hans Verkuil Date: Sat Sep 8 11:23:17 2018 +0200 gpiolib: override irq_enable/disable When using the gpiolib irqchip helpers install irq_enable/disable hooks for the irqchip to ensure that gpiolib knows when the irq is enabled or disabled, allowing drivers to disable the irq and then use it as an output pin, and later switch the direction to input and re-enable the irq. Signed-off-by: Hans Verkuil Signed-off-by: Linus Walleij commit 4e9439ddacea06f35acce4d374bf6bd0acf99bc8 Author: Hans Verkuil Date: Sat Sep 8 11:23:16 2018 +0200 gpiolib: add flag to indicate if the irq is disabled GPIO drivers call gpiochip_(un)lock_as_irq whenever they want to use a gpio as an interrupt. This is done when the irq is requested and it marks the gpio as in use by an interrupt. This is problematic for cases where a gpio pin is used as an interrupt pin, then, after the irq is disabled, is used as a regular gpio pin. Currently it is not possible to do this other than by first freeing the interrupt so gpiochip_unlock_as_irq is called, since an attempt to switch the gpio direction for output will fail since gpiolib believes that the gpio is in use for an interrupt and it does not know that it the irq is actually disabled. There are currently two drivers that would like to be able to do this: the tda998x_drv.c driver where a regular gpio pin needs to be temporarily reconfigured as an interrupt pin during CEC calibration, and the cec-gpio driver where you want to configure the gpio pin as an interrupt while waiting for traffic over the CEC bus, or as a regular pin when receiving or transmitting a CEC message. The solution is to add a new flag that is set when the irq is enabled, and have gpiod_direction_output check for that flag. We also add functions that drivers that do not use GPIOLIB_IRQCHIP can call when they enable/disable the irq. Signed-off-by: Hans Verkuil Signed-off-by: Linus Walleij commit ca620f2de153d690d6d6f50f32b8a14dd46107f4 Author: Hans Verkuil Date: Sat Sep 8 11:23:15 2018 +0200 gliolib: set hooks in gpiochip_set_irq_hooks() Centralize setting the irq_request/release_resources callbacks in one function since we'll be adding more callbacks to that. Also fix the removal of the callback overrides: this should only be done if we actually installed our own callback there. Signed-off-by: Hans Verkuil Signed-off-by: Linus Walleij commit 4e6b823867e2b8afc2b33740ba930e50b1f92421 Author: Hans Verkuil Date: Sat Sep 8 11:23:14 2018 +0200 gpiolib: export gpiochip_irq_reqres/relres() GPIO drivers that do not use GPIOLIB_IRQCHIP can hook these into the irq_request_resource and irq_release_resource callbacks of the irq_chip so they correctly 'get' the module and lock the gpio line for IRQ use. This will simplify driver code. Signed-off-by: Hans Verkuil Signed-off-by: Linus Walleij commit f6d9af4770995d1f58be57139bce7974868231e8 Author: Dan Carpenter Date: Thu Sep 6 16:33:48 2018 +0300 gpio: ep93xx: fix test for end of loop The problem is that if port == ARRAY_SIZE() and "gc == &epg->gc[port]" then that should be treated as invalid. Fixes: fd935fc421e7 ("gpio: ep93xx: Do not pingpong irq numbers") Signed-off-by: Dan Carpenter Signed-off-by: Linus Walleij commit f40f73075c59b0d847eadbada9ec5c0d0142b107 Author: Colin Ian King Date: Thu Sep 6 12:58:30 2018 +0100 gpio: ep93xx: fix incorrect array element size check Currently the while loop checks for the end of the array using the size of egp->gc rather that the number of elements in the array, so fix this. Also, perform the array size check first as stylistically it is always good to bounds check on an array first before referencing the array (in this case, we're just computing the address of an element in an array so this is a moot point). Fixes: fd935fc421e7 ("gpio: ep93xx: Do not pingpong irq numbers") Signed-off-by: Colin Ian King Signed-off-by: Linus Walleij commit 02ad0437decf2e5dba975c23b1a89775f4b211e1 Author: Randy Dunlap Date: Mon Sep 3 12:55:30 2018 -0700 gpio: fix kernel-doc notation warning for 'request_key' Fix kernel-doc warning for missing struct member 'request_key': ../include/linux/gpio/driver.h:142: warning: Function parameter or member 'request_key' not described in 'gpio_irq_chip' Fixes: 39c3fd58952d ("kernel/irq: Extend lockdep class for request mutex") Signed-off-by: Randy Dunlap Cc: Andrew Lunn Cc: Thomas Gleixner Cc: Linus Walleij Cc: linux-gpio@vger.kernel.org Signed-off-by: Linus Walleij commit ba74bd5d5b5b063d50891af16d5c14c29bcc52a6 Author: Linus Walleij Date: Mon Sep 3 10:04:01 2018 +0200 gpio: twl6040: Implement .get_direction() The gpiolib cannot deduce the fact that every line is output by itself, implement a .get_direction() callback so we can inspect this. Acked-by: Tony Lindgren Signed-off-by: Linus Walleij commit 4bef8bf20b69c3a98dbb9c8e406c22adb8fd3903 Author: Linus Walleij Date: Mon Sep 3 09:59:57 2018 +0200 gpio: twl6040: Use bitops It's nice to use BIT() macros rather than open coding the same. It's good practice as sometimes people use BIT(31) and forget that the constant must be cast unsigned long. Acked-by: Tony Lindgren Signed-off-by: Linus Walleij commit b4f53ed9633cf3801d7f5a9aa3c317a4e3d2d0e3 Author: Linus Walleij Date: Mon Sep 3 09:55:50 2018 +0200 gpio: twl6040: Cut down boilerplate Use the SPDX header to indicate the license for this driver. Acked-by: Tony Lindgren Signed-off-by: Linus Walleij commit fc4f8f322f6e588edbecfaa82a987d46125aeb1f Author: Linus Walleij Date: Mon Sep 3 09:54:55 2018 +0200 gpio: twl6040: Include the right header This is a GPIO driver so include only . Acked-by: Tony Lindgren Signed-off-by: Linus Walleij commit ab8c1e82935b8cd034d18c5d0cf944a532a83aea Author: Linus Walleij Date: Mon Sep 3 09:52:10 2018 +0200 gpio: twl4030: Implement .get_direction() It's nice to be able to read back the direction of the GPIO line from the hardware so implement .get_direction() for twl4030. Acked-by: Tony Lindgren Signed-off-by: Linus Walleij commit ecb07684a58fb4139719e96efad516d05c1a33e5 Author: Linus Walleij Date: Mon Sep 3 08:20:59 2018 +0200 gpio: twl4030: Cut down boilerplate Use the SPDX header to indicate the license for this driver. Acked-by: Tony Lindgren Signed-off-by: Linus Walleij commit ba21d55f6ad19cbb466b2429829900de5efac513 Author: Linus Walleij Date: Mon Sep 3 08:15:50 2018 +0200 gpio: twl4030: Include the right header This is a GPIO driver so include only . Acked-by: Tony Lindgren Signed-off-by: Linus Walleij commit 34e12b864e617ca7e4f6a3108460aa143bf20056 Author: Borislav Petkov Date: Sun Sep 9 13:42:52 2018 +0200 jump_label: Use static_key_linked() accessor ... instead of open-coding it, in static_key_mod(). No functional changes. Signed-off-by: Borislav Petkov Cc: Andrew Morton Cc: Jason Baron Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Steven Rostedt (VMware) Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20180909114252.17575-1-bp@alien8.de Signed-off-by: Ingo Molnar commit c10802b684c6bb00ecc6b4985805b05ebcc76a5d Author: Peter Wu Date: Fri Sep 7 00:18:10 2018 +0200 drm/fb-helper: improve documentation and print warnings Clarify the relation between drm_fb_helper_fbdev_setup/teardown. Clarify requirements for the new generic fbdev emulation API and log some more details in case the driver does something wrong. Fix related typos. Cc: Noralf Trønnes Signed-off-by: Peter Wu Reviewed-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20180906221810.20170-5-peter@lekensteyn.nl Signed-off-by: Gerd Hoffmann commit 7780eb9ce80f0ba509015351e45e97fbc7e1cdb8 Author: Peter Wu Date: Fri Sep 7 00:18:09 2018 +0200 bochs: convert to drm_dev_register The drm_get_pci_dev API is deprecated, replace it by drm_dev_register. Signed-off-by: Peter Wu Link: http://patchwork.freedesktop.org/patch/msgid/20180906221810.20170-4-peter@lekensteyn.nl Signed-off-by: Gerd Hoffmann commit df2052cc922136e98a5c8d9730f6a4fd0a958c94 Author: Peter Wu Date: Fri Sep 7 00:18:08 2018 +0200 bochs: convert to drm_fb_helper_fbdev_setup/teardown Currently unloading bochs_drm (after unbinding the vtconsole) results in a warning about a leaked connector: [drm:drm_mode_config_cleanup] *ERROR* connector Virtual-3 leaked! While investigating a potential fix I noticed that a lot of open-coded functionality is already implemented elsewhere, so start converting it: bochs_fbdev_init -> drm_fb_helper_fbdev_setup: trivial (similar impl). bochs_fbdev_fini -> drm_fb_helper_fbdev_teardown: requires unembedding "struct drm_framebuffer" from "struct bochs_framebuffer". Unembedding drm_framebuffer is made easy using drm_gem_fbdev_fb_create which can replace bochs_fbdev_destroy and custom routines in bochs_mm.c. For this to work, the GEM object is moved into "drm_framebuffer". After that, "bochs_framebuffer" is no longer needed and therefore removed. Remove the unused "size" and "initialized" fields from fb, the latter is not necessary as drm_fb_helper_fbdev_teardown can be called even if bochsfb_create fails. This theory was tested by returning early and late (just before drm_gem_fbdev_fb_create). Both scenarios fail gracefully although the latter seems to leak the object from bochsfb_create_object (not a regression). Guess on the reason for the encoder leak: drm_framebuffer_cleanup was previously used, but did not destroy much. drm_fb_helper_fbdev_teardown is now used and calls drm_framebuffer_remove which does a bit more work. Tested with 'echo 0 > /sys/class/vtconsole/vtcon1/bind; rmmod bochs_drm' and also with Xorg + fbdev (startx -> xterm). The latter triggered a warning in ttm_bo_vm_open that existed before, see https://lkml.kernel.org/r/1464000533-13140-4-git-send-email-mstaudt@suse.de Acked-by: Daniel Vetter Signed-off-by: Peter Wu Link: http://patchwork.freedesktop.org/patch/msgid/20180906221810.20170-3-peter@lekensteyn.nl Signed-off-by: Gerd Hoffmann commit 70c0ef7bd39991cdf3f190c9545c4ecdd6899a74 Author: Peter Wu Date: Fri Sep 7 00:18:07 2018 +0200 bochs: use drm_fb_helper_set_suspend_unlocked in suspend/resume The "initialized" member is going away. suspend/resume still works (even if bochsfb_create is forced to fail). Signed-off-by: Peter Wu Link: http://patchwork.freedesktop.org/patch/msgid/20180906221810.20170-2-peter@lekensteyn.nl Signed-off-by: Gerd Hoffmann commit eae06120f1974e1a4cab0f80f4b07d27eb80ab32 Author: Gerd Hoffmann Date: Fri Sep 7 09:32:13 2018 +0200 drm: refuse ADDFB2 ioctl for broken bigendian drivers Drivers must set the quirk_addfb_prefer_host_byte_order quirk to make the drm_mode_addfb() compat code work correctly on bigendian machines. If they don't they interpret pixel_format values incorrectly for bug compatibility, which in turn implies the ADDFB2 ioctl does not work correctly then. So block it to make userspace fallback to ADDFB. Signed-off-by: Gerd Hoffmann Reviewed-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20180907073213.20410-1-kraxel@redhat.com commit ea4584c2f2fe2d3a5792c397e2c5aff04db6f14c Author: YueHaibing Date: Fri Sep 7 02:03:57 2018 +0000 drm/virtio: Remove set but not used variable 'bo' Fixes gcc '-Wunused-but-set-variable' warning: drivers/gpu/drm/virtio/virtgpu_display.c: In function 'virtio_gpu_framebuffer_init': drivers/gpu/drm/virtio/virtgpu_display.c:78:28: warning: variable 'bo' set but not used [-Wunused-but-set-variable] struct virtio_gpu_object *bo; ^ Signed-off-by: YueHaibing Link: http://patchwork.freedesktop.org/patch/msgid/1536285837-150460-1-git-send-email-yuehaibing@huawei.com Signed-off-by: Gerd Hoffmann commit 78f10734f95873c22255f536e894c704bb5e8fa2 Author: Stefan Agner Date: Thu Sep 6 16:46:58 2018 -0700 ARM: dts: imx6q-apalis: mux RESET_MOCI# signal The pinctrl properties on the IOMUXC node get overwritten by the carrier board level device tree, hence the pinctrl_reset_moci pinctrl does not get applied. Associate the pinctrl_reset_moci pinctrl with the PCIe node where we also make use of the pin as a reset GPIO. Since the pin is muxed as a GPIO by default not muxing it explicitly worked fine in practise. Signed-off-by: Stefan Agner Signed-off-by: Shawn Guo commit 37f2c303167e8163bf2897cff62e969ab2fd8780 Author: Fabio Estevam Date: Wed Sep 5 15:18:48 2018 -0300 ARM: dts: imx6ul: Enable the PMU node There is no need to keep the PMU disabled. Enable it like it is done in the other i.MX dtsi files. With this change applied we see: [ 1.338866] hw perfevents: enabled with armv7_cortex_a7 PMU driver, 5 counters available Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit 9e514e22832f0aa46346d30854cc7483c2302cc8 Author: Anson Huang Date: Wed Sep 5 16:10:29 2018 +0800 ARM: dts: imx6qdl-sabreauto: add egalax touch screen support Add egalax touch screen support on i2c2 bus. Signed-off-by: Anson Huang Signed-off-by: Shawn Guo commit 4a1f02c345b63d8aa3c82df5e3256f59e10ad829 Author: Anson Huang Date: Wed Sep 5 15:46:12 2018 +0800 ARM: dts: imx6qdl-sabreauto: add gpio keys support Add i.MX6QDL SabreAuto board's gpio keys support, there are 5 gpio keys on base board: SW3: KEY_HOME; SW4: KEY_BACK; SW5: KEY_PROGRAM; SW6: KEY_VOLUMEUP; SW7: KEY_VOLUMEDOWN; Signed-off-by: Anson Huang Signed-off-by: Shawn Guo commit 9dfc1600894fafb4ff0304b801c1744f28e2f272 Author: Russell King Date: Sun Sep 2 18:29:12 2018 +0200 ARM: dts: vf610-zii-dev-rev-c: add support for one SFF module The board typically has 2 populated SFF interfaces. The mv88e6xxx driver currently supports SFF modules connected to ports 9 and 10 of the mv88e6390. Add support for sff2, which is connected to port 9. Signed-off-by: Russell King Signed-off-by: Andrew Lunn Signed-off-by: Shawn Guo commit d482cc61e38fe6ce66ea585d300107f925a039b4 Author: Andrew Lunn Date: Sun Sep 2 18:29:11 2018 +0200 ARM: dts: vf610-zii-cfu1: Add SFF interface to switch The switch has an SFF attached to port 5. Add the SFF device, the pinmux for its GPIOs, and list the port in the switch configuration. Signed-off-by: Andrew Lunn Signed-off-by: Shawn Guo commit 9454a0caff6ac6d2a5ea17dd624dc13387bbfcd3 Author: Anson Huang Date: Fri Aug 31 15:53:12 2018 +0800 ARM: imx: add mmdc ipg clock operation for mmdc i.MX6 SoCs have MMDC ipg clock for registers access, to make sure MMDC registers access successfully, add optional clock enable for MMDC driver. Signed-off-by: Anson Huang Signed-off-by: Shawn Guo commit a7ddcea58ae22d85d94eabfdd3de75c3742e376b Author: Henrik Austad Date: Tue Sep 4 00:15:23 2018 +0200 Drop all 00-INDEX files from Documentation/ This is a respin with a wider audience (all that get_maintainer returned) and I know this spams a *lot* of people. Not sure what would be the correct way, so my apologies for ruining your inbox. The 00-INDEX files are supposed to give a summary of all files present in a directory, but these files are horribly out of date and their usefulness is brought into question. Often a simple "ls" would reveal the same information as the filenames are generally quite descriptive as a short introduction to what the file covers (it should not surprise anyone what Documentation/sched/sched-design-CFS.txt covers) A few years back it was mentioned that these files were no longer really needed, and they have since then grown further out of date, so perhaps it is time to just throw them out. A short status yields the following _outdated_ 00-INDEX files, first counter is files listed in 00-INDEX but missing in the directory, last is files present but not listed in 00-INDEX. List of outdated 00-INDEX: Documentation: (4/10) Documentation/sysctl: (0/1) Documentation/timers: (1/0) Documentation/blockdev: (3/1) Documentation/w1/slaves: (0/1) Documentation/locking: (0/1) Documentation/devicetree: (0/5) Documentation/power: (1/1) Documentation/powerpc: (0/5) Documentation/arm: (1/0) Documentation/x86: (0/9) Documentation/x86/x86_64: (1/1) Documentation/scsi: (4/4) Documentation/filesystems: (2/9) Documentation/filesystems/nfs: (0/2) Documentation/cgroup-v1: (0/2) Documentation/kbuild: (0/4) Documentation/spi: (1/0) Documentation/virtual/kvm: (1/0) Documentation/scheduler: (0/2) Documentation/fb: (0/1) Documentation/block: (0/1) Documentation/networking: (6/37) Documentation/vm: (1/3) Then there are 364 subdirectories in Documentation/ with several files that are missing 00-INDEX alltogether (and another 120 with a single file and no 00-INDEX). I don't really have an opinion to whether or not we /should/ have 00-INDEX, but the above 00-INDEX should either be removed or be kept up to date. If we should keep the files, I can try to keep them updated, but I rather not if we just want to delete them anyway. As a starting point, remove all index-files and references to 00-INDEX and see where the discussion is going. Signed-off-by: Henrik Austad Acked-by: "Paul E. McKenney" Just-do-it-by: Steven Rostedt Reviewed-by: Jens Axboe Acked-by: Paul Moore Acked-by: Greg Kroah-Hartman Acked-by: Mark Brown Acked-by: Mike Rapoport Cc: [Almost everybody else] Signed-off-by: Jonathan Corbet commit 9d92e4835ffce841a72e9cf6d1c022adc55428aa Author: Wolfram Sang Date: Fri Sep 7 12:30:22 2018 +0200 MAINTAINERS: add i2c to the excludes for Documentation I'll handle these myself but thanks for providing the fallback! Signed-off-by: Wolfram Sang Signed-off-by: Jonathan Corbet commit b67620798b1ed93603a5a8de5f84f29ce4627fb9 Author: Wolfram Sang Date: Fri Sep 7 12:30:21 2018 +0200 MAINTAINERS: sort excludes for Documentation Helps reading and hopefully avoids duplicates. Also, consistently add the trailing '/' to make clear those are directories. Signed-off-by: Wolfram Sang Signed-off-by: Jonathan Corbet commit 9331e5e7b848edfced6b35547888eae913e3e189 Author: Grant Likely Date: Thu Sep 6 19:29:27 2018 +0100 efi_stub: update documentation on dtb= parameter The dtb= parameter is no longer the primary mechanism for providing a devicetree to the kernel. Now either firmware or the boot selector (ex. Grub) should provide the devicetree and dtb= should only be used for debug or when using firmware that doesn't understand DT. Update the EFI stub documentation to reflect the current usage. Signed-off-by: Grant Likely Reviewed-by: Alexander Graf Acked-by: Leif Lindholm Acked-by: Olof Johansson Acked-by: Ard Biesheuvel Signed-off-by: Jonathan Corbet commit ba6cc93d611b2329f6f1f05d530c1766036863f0 Merge: bda58ee8f8e4 fa94351b56d6 Author: Ingo Molnar Date: Sun Sep 9 21:42:18 2018 +0200 Merge branch 'perf/urgent' into perf/core, to pick up fixes and refresh the branch Signed-off-by: Ingo Molnar commit 72fdb40c1a4b48f5fa6f6083ea7419b94639ed57 Author: Daniel Vetter Date: Wed Sep 5 15:57:11 2018 +0200 drm: extract drm_atomic_uapi.c This leaves all the commit/check and state handling in drm_atomic.c, while pulling all the uapi glue and the huge ioctl itself into a seprate file. This seems to almost perfectly split the rather big drm_atomic.c file into 2 equal sizes. Also adjust the kerneldoc and type a very terse overview text. v2: Rebase. v3: Fix tiny typo. v4: - Fixup armada, newly converted atomic driver hooray! - Fixup msm/dpu1, newly added too. Signed-off-by: Daniel Vetter Cc: David Airlie Cc: Gustavo Padovan Cc: Maarten Lankhorst Cc: Sean Paul Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: Rob Clark Cc: Eric Anholt Cc: intel-gfx@lists.freedesktop.org Cc: linux-arm-msm@vger.kernel.org Cc: freedreno@lists.freedesktop.org Acked-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20180905135711.28370-7-daniel.vetter@ffwll.ch commit 2ec04b33a96fe954701ceecfd0b489978f667b34 Author: Daniel Vetter Date: Wed Sep 5 20:15:09 2018 +0200 drm: Update todo.rst - drmP.h is now fully split up. - vkms is happening (and will gain its own todo and docs under a new vkms.rst file real soon) - legacy cruft is completely hidden now, drm_vblank.c is split out from drm_irq.c now. I've decided to drop the task to split out drm_legacy.ko, partially because Dave already rejected a patch to hide the old dri1 drivers better. Current state feels good enough to me. - best_encoder atomic cleanup is done (it's now the default, not even exported anymore) - bunch of smaller things v2: - Explain why the drm_legacy.ko task is dropped (Emil). - typos (Sam). v3: Fix typo (Ilia) Reviewed-by: Emil Velikov Reviewed-by: Heiko Stuebner Cc: Ilia Mirkin Cc: Sam Ravnborg Cc: Emil Velikov Signed-off-by: Daniel Vetter Cc: Gustavo Padovan Cc: Maarten Lankhorst Cc: Sean Paul Cc: David Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20180905181509.19530-1-daniel.vetter@ffwll.ch commit d86552efe10a321a78ab3d093bbe9b8ecf778c4e Author: Daniel Vetter Date: Wed Sep 5 15:57:09 2018 +0200 drm/atomic: trim driver interface/docs Remove the kerneldoc and EXPORT_SYMBOL which aren't used and really shouldn't ever be used by drivers directly. Unfortunately this means we need to move the set_writeback_fb function around to avoid a forward decl. Acked-by: Heiko Stuebner Signed-off-by: Daniel Vetter Cc: David Airlie Cc: Gustavo Padovan Cc: Maarten Lankhorst Cc: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20180905135711.28370-5-daniel.vetter@ffwll.ch commit e6120d6493e7879a0768f3c1bddac35fcd6230ac Author: Daniel Vetter Date: Wed Sep 5 15:57:08 2018 +0200 drm: drop drmP.h include from drm_crtc.c This is starting to become easy! v2: Compiles now, with drm/drm_util.h extracted. v3: Fix up commit message (Sam Ravnborg) Reviewed-by: Sean Paul Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20180905135711.28370-4-daniel.vetter@ffwll.ch commit b88ac005654dbc25099e8a0db06df048234561f7 Author: Daniel Vetter Date: Wed Sep 5 15:57:07 2018 +0200 drm: drop drmP.h include from drm_plane.c Just a bit of missing includes and pre declarations. v2: Compiles now, with drm/drm_util.h extracted. v3: Rebase v3: Fix up commit message (Sam Ravnborg) Reviewed-by: Sean Paul Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20180905135711.28370-3-daniel.vetter@ffwll.ch commit 99f45e32cde74c32e15e9fcc52cbd3fdc2324f37 Author: Daniel Vetter Date: Wed Sep 5 15:57:06 2018 +0200 drm: Drop drmP.h from drm_connector.c Only needed minimal changes in drm_internal.h (for the drm_ioctl_t type and a few forward declarations), plus a few missing includes in drm_connector.c. Yay, the last stage of the drm header cleanup can finally commence! v2: Compiles now, with drm/drm_util.h extracted. v3: Fix up commit message (Sam Ravnborg) Reviewed-by: Sean Paul Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20180905135711.28370-2-daniel.vetter@ffwll.ch commit d78aa650670d2257099469c344d4d147a43652d9 Author: Daniel Vetter Date: Wed Sep 5 15:57:05 2018 +0200 drm: Add drm/drm_util.h header file We have a bunch of neat little macros all over the place which should move to kernel.h. But some of them died in bikesheds on lkml, and we need a decent home for them. Start out by moving the for_each_if macro there. v2: Rename to drm_util.h instead (Dave&Sean) Cc: Sean Paul Acked-by: Sean Paul Cc: Dave Airlie Acked-by: Dave Airlie Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20180905135711.28370-1-daniel.vetter@ffwll.ch commit bfaa6036275b15788eed0f9e17946c65845be7af Author: Anson Huang Date: Thu Aug 30 13:20:05 2018 +0800 ARM: dts: imx6ull: update iomux header Update i.MX6ULL iomux header according to latest reference manual Rev.1, 11/2017. Signed-off-by: Anson Huang Reviewed-by: Sébastien Szymanski Reviewed-by: Rob Herring Signed-off-by: Shawn Guo commit 9aec30371fb095a0c9415f3f0146ae269c3713d8 Author: Jerome Brunet Date: Thu Sep 6 15:59:04 2018 +0200 leds: pwm: silently error out on EPROBE_DEFER When probing, if we fail to get the pwm due to probe deferal, we shouldn't print an error message. Just be silent in this case. Signed-off-by: Jerome Brunet Signed-off-by: Jacek Anaszewski commit 09317da317e55e70ccbe23f65008348a4a1b7c7f Author: YueHaibing Date: Thu Sep 6 21:04:12 2018 +0800 failover: Fix error return code in net_failover_create if failover_register failed, 'err' code should be set correctly Fixes: cfc80d9a1163 ("net: Introduce net_failover driver") Signed-off-by: YueHaibing Signed-off-by: David S. Miller commit cc577b01ba12b07733eaf3b7590256fefe42236d Author: Jose Abreu Date: Thu Sep 6 13:29:30 2018 +0100 net: stmmac: Enable TC Ops for GMAC >= 4 GMAC >= 4 also supports CBS. Lets enable the TC Ops for these versions. Signed-off-by: Jose Abreu Cc: David S. Miller Cc: Joao Pinto Cc: Giuseppe Cavallaro Cc: Alexandre Torgue Signed-off-by: David S. Miller commit f20a4d01175ad681a88d571c6391d188453ca6d0 Author: Vlad Buslov Date: Mon Sep 3 10:09:20 2018 +0300 net: sched: act_nat: remove dependency on rtnl lock According to the new locking rule, we have to take tcf_lock for both ->init() and ->dump(), as RTNL will be removed. Use tcf spinlock to protect private nat action data from concurrent modification during dump. (nat init already uses tcf spinlock when changing action state) Signed-off-by: Vlad Buslov Signed-off-by: David S. Miller commit 6d7a8df6dfe4d62335673fb15407d79180a33ea2 Author: Vlad Buslov Date: Mon Sep 3 10:07:15 2018 +0300 net: sched: act_skbedit: remove dependency on rtnl lock According to the new locking rule, we have to take tcf_lock for both ->init() and ->dump(), as RTNL will be removed. Use tcf lock to protect skbedit action struct private data from concurrent modification in init and dump. Use rcu swap operation to reassign params pointer under protection of tcf lock. (old params value is not used by init, so there is no need of standalone rcu dereference step) Remove rtnl lock assertion that is no longer required. Signed-off-by: Vlad Buslov Signed-off-by: David S. Miller commit 6ad96bdca8aae5002819280df2a850c05cb0a592 Author: Jacob Keller Date: Fri Sep 7 14:55:44 2018 -0700 i40e(vf): remove i40e_ethtool_stats.h header file Essentially reverts commit 8fd75c58a09a ("i40e: move ethtool stats boiler plate code to i40e_ethtool_stats.h", 2018-08-30), and additionally moves the similar code in i40evf into i40evf_ethtool.c. The code was intially moved from i40e_ethtool.c into i40e_ethtool_stats.h as a way of better logically organizing the code. This has two problems. First, we can't have an inline function with variadic arguments on all platforms. Second, it gave the appearance that we had plans to share code between the i40e and i40evf drivers, due to having a near copy of the contents in the i40evf/i40e_ethtool_stats.h file. Patches which actually attempt to combine or share code between the i40e and i40evf drivers have not materialized, and are likely a ways off. Rather than fixing the one function which causes build issues, just move this code back into the i40e_ethtool.c and i40evf_ethtool.c files. Note that we also change these functions back from static inlines to just statics, since they're no longer in a header file. We can revisit this if/when work is done to actually attempt to share code between drivers. Alternatively, this stats code could be made more generic so that it can be shared across drivers as part of ethtool kernel work. Signed-off-by: Jacob Keller Signed-off-by: David S. Miller commit daae7861a696b66acb3547c1cb9247cb3abaf0b3 Author: Tomasz Duszynski Date: Sun Sep 2 15:29:23 2018 +0200 iio: light: bh1750: simplify setting PM ops Relying on CONFIG_PM_SLEEP to set PM ops is not necessary since core will handle everything internally. One have to only make sure that functions that can go unused are marked with __maybe_unused. Signed-off-by: Tomasz Duszynski Signed-off-by: Jonathan Cameron commit c0f87b3335100108ce80cda3e09f11c3a82f081a Author: Stefan Popa Date: Tue Sep 4 17:13:14 2018 +0300 dt-bindings: adxl372: Document the adxl372 I2C bindings The adxl372 is designed to communicate in either SPI or I2C protocol. This patch adds the documentation of device tree bindings for adxl372 I2C. Signed-off-by: Stefan Popa Signed-off-by: Jonathan Cameron commit 94dbb46c7a8f0ee27394bc81f34b666dc4a14b71 Author: Stefan Popa Date: Tue Sep 4 17:12:32 2018 +0300 iio: adxl372: Add support for I2C communication The adxl372 is designed to communicate in either SPI or I2C protocol. It autodetects the format being used, requiring no configuration control to select the format. Signed-off-by: Stefan Popa Signed-off-by: Jonathan Cameron commit d9e8fd0421c2047ac233141612a433490963d211 Author: Stefan Popa Date: Tue Sep 4 17:11:31 2018 +0300 iio: adxl372: Refactor the driver This patch restructures the existing adxl372 driver by adding a module for SPI and a header file, while the baseline module deals with the chip-logic. This is a necessary step, as this driver should support in the future a similar device which differs only in the type of interface used (I2C instead of SPI). Signed-off-by: Stefan Popa Signed-off-by: Jonathan Cameron commit 7ac346823bbb284e9e66a3d4044c108b99c7149c Author: Matthias Kaehlcke Date: Thu Sep 6 14:04:52 2018 -0700 dt-bindings: iio: vadc: Fix documentation of 'reg' The documentation of Qualcomm's SPMI PMIC voltage ADC claims that the 'reg' property consists of two values, the SPMI address and the length of the controller's registers. However the SPMI bus to which it is added specifies "#size-cells = <0>;". Remove the controller register length from the documentation of the field and the example. Signed-off-by: Matthias Kaehlcke Reviewed-by: Douglas Anderson Reviewed-by: Rob Herring Signed-off-by: Jonathan Cameron commit 6cfdb150e3fca6cd84a79116451071d6f3759946 Author: Tomasz Duszynski Date: Sat Sep 1 21:52:14 2018 +0200 iio: pressure: ms5611: switch to SPDX identifier Drop boilerplate license text and use SPDX identifier instead. Signed-off-by: Tomasz Duszynski Signed-off-by: Jonathan Cameron commit 53d3ae20a68c2dc8ef6242ccf23dfcb7a86c8c97 Author: Tomasz Duszynski Date: Sat Sep 1 21:51:44 2018 +0200 iio: light: bh1750: switch to SPDX identifier Drop boilerplate license text and use SPDX identifier instead. Signed-off-by: Tomasz Duszynski Signed-off-by: Jonathan Cameron commit 897be9c0a747d32ec1c74742f3362d5db660318d Author: Lorenzo Bianconi Date: Thu Aug 30 22:52:59 2018 +0200 dt-bindings: iio: imu: st_lsm6dsx: add LSM6DSO device bindings Signed-off-by: Lorenzo Bianconi Reviewed-by: Rob Herring Signed-off-by: Jonathan Cameron commit 4a60aa05a0634241ce17f957bf9fb5ac1eed6576 Author: Allan Xavier Date: Fri Sep 7 08:12:01 2018 -0500 objtool: Support per-function rodata sections Add support for processing switch jump tables in objects with multiple .rodata sections, such as those created by '-ffunction-sections' and '-fdata-sections'. Currently, objtool always looks in .rodata for jump table information, which results in many "sibling call from callable instruction with modified stack frame" warnings with objects compiled using those flags. The fix is comprised of three parts: 1. Flagging all .rodata sections when importing ELF information for easier checking later. 2. Keeping a reference to the section each relocation is from in order to get the list_head for the other relocations in that section. 3. Finding jump tables by following relocations to .rodata sections, rather than always referencing a single global .rodata section. The patch has been tested without data sections enabled and no differences in the resulting orc unwind information were seen. Note that as objtool adds terminators to end of each .text section the unwind information generated between a function+data sections build and a normal build aren't directly comparable. Manual inspection suggests that objtool is now generating the correct information, or at least making more of an effort to do so than it did previously. Signed-off-by: Allan Xavier Signed-off-by: Josh Poimboeuf Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/099bdc375195c490dda04db777ee0b95d566ded1.1536325914.git.jpoimboe@redhat.com commit 98f05b5138f0a9b56022295cc1387e635b25635d Author: Andy Lutomirski Date: Mon Sep 3 15:59:43 2018 -0700 x86/entry/64: Use the TSS sp2 slot for SYSCALL/SYSRET scratch space In the non-trampoline SYSCALL64 path, a percpu variable is used to temporarily store the user RSP value. Instead of a separate variable, use the otherwise unused sp2 slot in the TSS. This will improve cache locality, as the sp1 slot is already used in the same code to find the kernel stack. It will also simplify a future change to make the non-trampoline path work in PTI mode. Signed-off-by: Andy Lutomirski Signed-off-by: Thomas Gleixner Reviewed-by: Borislav Petkov Cc: Borislav Petkov Cc: Dave Hansen Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Linus Torvalds Cc: Josh Poimboeuf Cc: Joerg Roedel Cc: Jiri Olsa Cc: Andi Kleen Cc: Peter Zijlstra Link: https://lkml.kernel.org/r/08e769a0023dbad4bac6f34f3631dbaf8ad59f4f.1536015544.git.luto@kernel.org commit bd7b1f7cbf9cb35dab8e1b99145d07afc5b7a132 Author: Andy Lutomirski Date: Mon Sep 3 15:59:42 2018 -0700 x86/entry/64: Document idtentry The idtentry macro is complicated and magical. Document what it does to help future readers and to allow future patches to adjust the code and docs at the same time. Signed-off-by: Andy Lutomirski Signed-off-by: Thomas Gleixner Reviewed-by: Borislav Petkov Cc: Borislav Petkov Cc: Dave Hansen Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Linus Torvalds Cc: Josh Poimboeuf Cc: Joerg Roedel Cc: Jiri Olsa Cc: Andi Kleen Cc: Peter Zijlstra Link: https://lkml.kernel.org/r/6e56c3ad94879e41afe345750bc28ccc0e820ea8.1536015544.git.luto@kernel.org commit 46053c73685411915d3de50c5a0045beef32806b Author: Christoph Hellwig Date: Fri Aug 24 10:29:02 2018 +0200 dma-mapping: clear dev->dma_ops in arch_teardown_dma_ops There is no reason to leave the per-device dma_ops around when deconfiguring a device, so move this code from arm64 into the common code. Signed-off-by: Christoph Hellwig Reviewed-by: Robin Murphy commit dc3c05504d38849f77149cb962caeaedd1efa127 Author: Christoph Hellwig Date: Fri Aug 24 10:28:18 2018 +0200 dma-mapping: remove dma_deconfigure This goes through a lot of hooks just to call arch_teardown_dma_ops. Replace it with a direct call instead. Signed-off-by: Christoph Hellwig Reviewed-by: Robin Murphy commit ccf640f4c9988653ef884672381b03b9be247bec Author: Christoph Hellwig Date: Fri Aug 24 09:40:24 2018 +0200 dma-mapping: remove dma_configure There is no good reason for this indirection given that the method always exists. Signed-off-by: Christoph Hellwig Reviewed-by: Robin Murphy commit 58643a3a8097e93b1c965d0ad3f0d65613b95b2c Author: Christoph Hellwig Date: Fri Aug 24 09:47:20 2018 +0200 arm-nommu: don't define arch_teardown_dma_ops We can just use the default implementation. Signed-off-by: Christoph Hellwig Reviewed-by: Robin Murphy commit e0a9317d900426233621fd88d7ef2ce83c9987aa Author: Christoph Hellwig Date: Mon Aug 20 13:54:29 2018 +0200 hexagon: use generic dma_noncoherent_ops Switch to the generic noncoherent direct mapping implementation. Signed-off-by: Christoph Hellwig commit f406f222d4b21e63b0ad24d4ddcb2b9745177b55 Author: Christoph Hellwig Date: Sat May 19 08:58:51 2018 +0200 hexagon: implement the sync_sg_for_device DMA operation This methods needs to provide the equivalent of sync_single_for_device for each S/G list element, but was missing. Signed-off-by: Christoph Hellwig commit 37fca4bd018f9959cf28ea4a6da9f74ccc4d4025 Author: Christoph Hellwig Date: Sat May 19 08:55:39 2018 +0200 hexagon: remove the sync_single_for_cpu DMA operation hexagon does all the required cache maintainance at dma map time, and none at unmap time. It thus has to implement sync_single_for_device to match the map cace for buffer reuse, but there is no point in doing another invalidation in the sync_single_cpu_case, which in terms of cache maintainance is equivalent to the unmap case. Signed-off-by: Christoph Hellwig commit 05a0a34418699ea2ced1fe6e081b91c0e1065690 Author: Arnd Bergmann Date: Tue Aug 28 16:26:30 2018 +0200 rtc: mips: default to rtc-cmos on mips The old rtc driver is getting in the way of some compat_ioctl simplification. Looking up the loongson64 git history, it seems that everyone uses the more modern but compatible RTC_CMOS driver anyway, so let's remove the special case for loongson64. Signed-off-by: Arnd Bergmann Signed-off-by: Alexandre Belloni commit 7a8c7f5c30f90cb6f843e473acbd3a4b58c476b6 Author: Florian Fainelli Date: Thu Sep 6 11:42:45 2018 -0700 net: dsa: b53: Fix build with B53_SRAB enabled and not B53_SERDES In case B53_SRAB is enabled, but not B53_SERDES, we can get the following linking error: ERROR: "b53_serdes_init" [drivers/net/dsa/b53/b53_srab.ko] undefined! We also need to ifdef the body of b53_srab_serdes_map_lane() since it would not be used when B53_SERDES is disabled and that would produce a warning. Fixes: 0e01491de646 ("net: dsa: b53: Add SerDes support") Reported-by: kbuild test robot Signed-off-by: Florian Fainelli Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit a89cdd8e7c741eee80b105acddb04cda9f40ef49 Author: Casey Leedom Date: Fri Sep 7 15:59:33 2018 +0530 cxgb4: impose mandatory VLAN usage when non-zero TAG ID When a non-zero VLAN Tag ID is passed to t4_set_vlan_acl() then impose mandatory VLAN Usage with that VLAN ID. I.e any other VLAN ID should result in packets getting dropped. Signed-off-by: Casey Leedom Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller commit be7e1b334be4566926322db7bfc30ad3a805f9bd Author: kbuild test robot Date: Fri Sep 7 09:41:08 2018 +0800 liquidio: lio_fetch_vf_stats() can be static Fixes: 488752220b4a ("liquidio: Add spoof checking on a VF MAC address") Signed-off-by: kbuild test robot Signed-off-by: David S. Miller commit 6577b0f71665039442de52903bcc5f0faf87d6c8 Author: jun qian Date: Fri Sep 7 10:01:09 2018 -0700 nfp: replace spin_lock_bh with spin_lock in tasklet callback As you are already in a tasklet, it is unnecessary to call spin_lock_bh. Signed-off-by: jun qian Acked-by: Jakub Kicinski Signed-off-by: David S. Miller commit 98cdb480712320880d9d5d9db052990a9609427e Author: Florian Fainelli Date: Fri Sep 7 11:09:02 2018 -0700 net: dsa: Expose tagging protocol to user-space There is no way for user-space to know what a given DSA network device's tagging protocol is. Expose this information through a dsa/tagging attribute which reflects the tagging protocol currently in use. This is helpful for configuration (e.g: none behaves dramatically different wrt. bridges) as well as for packet capture tools when there is not a proper Ethernet type available. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller commit 0fdc0d675b92ba8e0f4a5a7845b0c12c8e1baee2 Author: Igor Stoppa Date: Fri Sep 7 20:23:18 2018 +0300 freescale: ethernet: remove unnecessary unlikely() Both WARN_ON() and WARN_ONCE() already contain an unlikely(), so it's not necessary to wrap it into another. Signed-off-by: Igor Stoppa Cc: Madalin Bucur Cc: "David S. Miller" Cc: netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: David S. Miller commit 5ce805869cbed93267ed26552ff76e30f05c91f7 Author: Jaegeuk Kim Date: Thu Sep 6 11:40:12 2018 -0700 f2fs: submit bio after shutdown Sometimes, some merged IOs could get a chance to be submitted, resulting in system hang in shutdown test. This issues IOs all the time after shutdown. Signed-off-by: Jaegeuk Kim commit c9527f0de508b1ce625a4c80fc0a3a796a720aab Author: Michał Mirosław Date: Fri Sep 7 19:47:07 2018 +0200 drm/fb-helper: document remove*_conflicting_framebuffers() Copy remove*_conflicting_framebuffers() kerneldocs from fbdev code to make DRM developers' life easier. Signed-off-by: Michał Mirosław Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/f70c1cc4a4f77dd9bad58fc7ca344609c0a91fa7.1536342228.git.mirq-linux@rere.qmqm.pl commit d3147adcfd95d21a0509ff4f2a87a671a3392e65 Author: Michał Mirosław Date: Fri Sep 7 19:47:08 2018 +0200 fbdev: fix kerneldoc As noticed by kbuild test robot , remove_conflicting_pci_framebuffers()'s second argument is called res_id not resource_id. Fix this. Signed-off-by: Michał Mirosław Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/38ca9044455a33e398b45e0281643cc24da3c2fc.1536342224.git.mirq-linux@rere.qmqm.pl commit 6e77137927639fad66e17c06b50fd319d6b59833 Author: Rob Herring Date: Tue Aug 28 10:44:27 2018 -0500 ARM: OMAP2+: 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: "Benoît Cousson" Cc: Paul Walmsley Cc: linux-omap@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Rob Herring [tony@atomide.com: updated against clkctrl and rt_idx changes] Signed-off-by: Tony Lindgren commit 1b9c30fe01df01c17c5ddd9b4ea02b2ca186d5e7 Author: Tero Kristo Date: Fri Aug 31 18:01:23 2018 +0300 ARM: OMAP2+: hwmod_core: improve the support for clkctrl clocks This patch adds support for split memory ranges for clkctrl providers. This is necessary to support the coming clockdomain based split of clkctrl provider ranges, instead of the current CM instance based one. Signed-off-by: Tero Kristo Signed-off-by: Tony Lindgren commit 359c533f07f4b4b7a570f4ad18d67313149ecc44 Merge: 5b394b2ddf03 1dbcb97c656e Author: Tony Lindgren Date: Fri Sep 7 10:49:43 2018 -0700 Merge commit '1dbcb97c656eed1a244c960b8b3a469c3d20ce7b' into omap-for-v4.20/soc commit cbbac1c3e6a80f32a692703d764f432d357378ec Merge: 57361846b52b 7526aa54b261 Author: Will Deacon Date: Fri Sep 7 18:44:41 2018 +0100 Merge branch 'tlb/asm-generic' into aarch64/for-next/core As agreed on the list, merge in the core mmu_gather changes which allow us to track the levels of page-table being cleared. We'll build on this in our low-level flushing routines, and Nick and Peter also have plans for other architectures. Signed-off-by: Will Deacon commit 902d53914f6492b85fcdc35643b28f952dd8d6cf Author: jun qian Date: Fri Sep 7 10:27:20 2018 -0700 block: umem: replace spin_lock_bh with spin_lock in tasklet callback As you are already in a tasklet, it is unnecessary to call spin_lock_bh. Signed-off-by: jun qian Signed-off-by: Jens Axboe commit 6b63967a61a06263e999fe45f29d9cae295ae31b Author: Andrew F. Davis Date: Fri Aug 31 14:34:03 2018 -0500 ARM: dts: am571x-idk: Add Industrial input load trigger The SN65HVS882 load trigger is attached to GPIO2_23 on the AM571x IDK. Signed-off-by: Andrew F. Davis Signed-off-by: Tony Lindgren commit 99f4855923d6d49fb45d9afd05de7fd6ac11a1fe Author: Andrew F. Davis Date: Fri Aug 31 14:34:02 2018 -0500 ARM: dts: am572x-idk: Add tricolor Industrial LED support AM572x-IDK rev 1.3A has tricolor RGB LEDs that can be controlled using GPIO. Expose these to userspace for usage as necessary. Signed-off-by: Andrew F. Davis Signed-off-by: Tony Lindgren commit d71fef3c7507979a96e3c151cd4fc05f49be2753 Author: Andrew F. Davis Date: Fri Aug 31 14:34:01 2018 -0500 ARM: dts: am571x-idk: Add tricolor Industrial LED support AM571x-IDK rev 1.2A has tricolor RGB LEDs that can be controlled using GPIO. Expose these to userspace for usage as necessary. Signed-off-by: Andrew F. Davis Signed-off-by: Tony Lindgren commit d2eaf949d2c35aefa1c6e29a7d087efcb0eb07f2 Author: H. Nikolaus Schaller Date: Tue Jul 31 09:11:35 2018 +0200 ARM: dts: omap3-gta04a5one: define GTA04A5 variant with OneNAND GTA04A5 has been produced with MCP chips either with 512MB RAM + 512MB NAND 512MB RAM + 1024MB NAND 1024MB RAM + 512MB OneNAND RAM setup is done by U-Boot (MLO/SPL) but OneNAND needs a different setup of the GPMC. So we need to derive a DTB variant that modifies the gpmc and nand setup. Signed-off-by: H. Nikolaus Schaller Signed-off-by: Tony Lindgren commit 2b5633eb86daeb8560eb2f774ae65a2722296c4a Author: H. Nikolaus Schaller Date: Tue Jul 31 09:11:34 2018 +0200 ARM: dts: omap3-gta04a5: define pinmux for bluetooth enable of ti,wl1837 module Properly pinmux the bluetooth enable so that it is not floating. Signed-off-by: H. Nikolaus Schaller Signed-off-by: Tony Lindgren commit 806c99ed78cab92f4354addc2fe35666cd1b5618 Author: H. Nikolaus Schaller Date: Tue Jul 31 09:11:33 2018 +0200 ARM: dts: omap3-gta04a5: uses different sensors than gta04a4 Sensors for acceleration, rotation, magnetic heading and barometer have been replaced in the A5 variant. Signed-off-by: H. Nikolaus Schaller Signed-off-by: Tony Lindgren commit 61fedc14b6017a29c7cee1c2b868a4a7a5fb2028 Author: H. Nikolaus Schaller Date: Tue Jul 31 09:11:32 2018 +0200 ARM: dts: omap3-gta04a5: add support for ti,wl1837 module GTA04A5 uses a ti,wl1837 WiFi/Bluetooth module. Overwrite the mmc2 node and child. Signed-off-by: H. Nikolaus Schaller Signed-off-by: Tony Lindgren commit 43541bfa4c073fd44d4e728b36970cb6a729aad7 Author: H. Nikolaus Schaller Date: Tue Jul 31 09:11:31 2018 +0200 ARM: dts: omap3-gta04a5: disable IrDA receiver to save power The GTA04A5 has an improved IrDA circuit that can enable/disable the receiver individually. We do not have an IrDA driver/subsystem and hence the receiver should be actively turned off to save power, especially in suspend. Signed-off-by: H. Nikolaus Schaller Signed-off-by: Tony Lindgren commit 4440f94d066ae5aa31ebecc8d59159551347bec6 Author: H. Nikolaus Schaller Date: Tue Jul 31 09:11:30 2018 +0200 ARM: dts: omap3-gta04a5: add support for PPS GPS receiver provides a 1PPS signal to a gpio. Signed-off-by: H. Nikolaus Schaller Signed-off-by: Tony Lindgren commit 3bace6a40135e00cdb794539f5d04ecbd8629f1c Author: H. Nikolaus Schaller Date: Tue Jul 31 09:11:29 2018 +0200 ARM: dts: omap3-gta04a5: fix whitepsace and tab style in node sound / property ti,jack-det-gpio. Signed-off-by: H. Nikolaus Schaller Signed-off-by: Tony Lindgren commit acdf6035a84de1e48bf259c48cbc587582f9dae8 Author: H. Nikolaus Schaller Date: Tue Jul 31 09:11:28 2018 +0200 ARM: dts: omap3-gta04a5: fix model name GTA04 is the project name and Letux 2804 the product name. Report both. Signed-off-by: H. Nikolaus Schaller Signed-off-by: Tony Lindgren commit b918bba089fc9f389ee9308fbb6395070d1fb834 Author: H. Nikolaus Schaller Date: Tue Jul 31 09:11:27 2018 +0200 ARM: dts: omap3-gta04a5: fix copyright of A5 variant Signed-off-by: H. Nikolaus Schaller Signed-off-by: Tony Lindgren commit 18c7bd32047b990474d7dd60092af977c51b9acc Author: H. Nikolaus Schaller Date: Tue Jul 31 09:11:26 2018 +0200 ARM: dts: omap3-gta04a4: fix model name for A4 variant GTA04 is the project name and Letux 2804 the product name. Report both. Signed-off-by: H. Nikolaus Schaller Signed-off-by: Tony Lindgren commit 2719623ea7901350065c496e81502525b9e5ff9f Author: H. Nikolaus Schaller Date: Tue Jul 31 09:11:25 2018 +0200 ARM: dts: omap3-gta04a3: fix model name for A3 variant GTA04 is the project name and Letux 2804 the product name. Report both. Signed-off-by: H. Nikolaus Schaller Signed-off-by: Tony Lindgren commit 2cc86a47059b79517c6cb3af4b10cdf35c808031 Author: H. Nikolaus Schaller Date: Tue Jul 31 09:11:24 2018 +0200 ARM: dts: omap3-gta04: add mcbsp (audio subsystem) nodes GTA04 audio system makes use of all four McBSP ports, so enable and connect them with pinmux. Signed-off-by: H. Nikolaus Schaller Signed-off-by: Tony Lindgren commit f5f15be141b9de571d125b9331501e6ee325411c Author: H. Nikolaus Schaller Date: Tue Jul 31 09:11:23 2018 +0200 ARM: dts: omap3-gta04: add devconf0 setup for mcbsp1 clock pins McBSP1 needs special "pinctrl" for the clocks. Signed-off-by: H. Nikolaus Schaller Signed-off-by: Tony Lindgren commit 3c10507a39e8a62b645e22e633369d57b097aadd Author: H. Nikolaus Schaller Date: Tue Jul 31 09:11:22 2018 +0200 ARM: dts: omap3-gta04: add mcbsp (audio subsystem) pinmux GTA04 audio system makes use of all four McBSP ports, so set up proper pinmux. Signed-off-by: H. Nikolaus Schaller Signed-off-by: Tony Lindgren commit 8f69850f04fbbaf1a4ba1d615c2376ff4d411c91 Author: H. Nikolaus Schaller Date: Tue Jul 31 09:11:21 2018 +0200 ARM: dts: omap3-gta04: add camera pinmux ISP needs camera pinmux (which is referenced by the camera node). Signed-off-by: H. Nikolaus Schaller Signed-off-by: Tony Lindgren commit f2b710826ff39c2b5be6898e7e4114b9df02f403 Author: H. Nikolaus Schaller Date: Tue Jul 31 09:11:20 2018 +0200 ARM: dts: omap3-gta04: add camera interface parallel port The GTA04 has an optional OV9655 camera (for which we do not yet have a driver upstream), but the ISP hardware connection description in the device tree is independent of that. Signed-off-by: H. Nikolaus Schaller Signed-off-by: Tony Lindgren commit eaf2dbd0d2483496e7c96d8605835d1a03bd9e48 Author: H. Nikolaus Schaller Date: Tue Jul 31 09:11:19 2018 +0200 ARM: dts: omap3-gta04: map antenna detect GPIO to SW_LINEIN_INSERT key event GTA04 can detect presence/absence or plug-in of an external GPS antenna through a gpio. The best match for an event code is SW_LINEIN_INSERT. Signed-off-by: H. Nikolaus Schaller Signed-off-by: Tony Lindgren commit 39b1c4944f712b49878d3cb9c573b829df5d6275 Author: H. Nikolaus Schaller Date: Tue Jul 31 09:11:18 2018 +0200 ARM: dts: omap3-gta04: make use of input event include file and constants we can replace magic numbers by symbolic constants now. Signed-off-by: H. Nikolaus Schaller Signed-off-by: Tony Lindgren commit f38bb4e9ec8fb08b1babc8810d751927b05b6a6d Author: H. Nikolaus Schaller Date: Tue Jul 31 09:11:17 2018 +0200 ARM: dts: omap3-gta04: explicitly describe that mmc1 has no CD/WP There are neither CD nor WP switches for mmc1. The µSD slot is located under the SIM card under the battery and not accessible during operation. Signed-off-by: H. Nikolaus Schaller Signed-off-by: Tony Lindgren commit d2c4c270354db17804a2f9bca14418da5e30bf03 Author: H. Nikolaus Schaller Date: Tue Jul 31 09:11:16 2018 +0200 ARM: dts: omap3-gta04: add warning comment to vaux2 regulator vaux2 should remain always on since a higher potential at vio could potentially damage the itg3200 sensor. Signed-off-by: H. Nikolaus Schaller Signed-off-by: Tony Lindgren commit ebd4fc999e07693c1ec79dfd7357befb20d2bec3 Author: H. Nikolaus Schaller Date: Tue Jul 31 09:11:15 2018 +0200 ARM: dts: omap3-gta04: add a comment how to reference the tca6507 gpio Make clear how to use the wifi_reset since it is not obvious. Signed-off-by: H. Nikolaus Schaller Signed-off-by: Tony Lindgren commit 1ae00833e30c9b4af5cbfda65d75b1de12f74013 Author: H. Nikolaus Schaller Date: Tue Jul 31 09:11:14 2018 +0200 ARM: dts: omap3-gta04: keep vpll2 always on This is needed to make the display and venc work properly. Compare to omap3-beagle.dts. Signed-off-by: H. Nikolaus Schaller Signed-off-by: Tony Lindgren commit f22a9e64c380775f7aa835a2bdf98b2d1b0c6240 Author: H. Nikolaus Schaller Date: Tue Jul 31 09:11:13 2018 +0200 ARM: dts: omap3-gta04: update gpmc NAND setup to better match omap3-beagle.dts (which was the basis of designing the GTA04). Signed-off-by: H. Nikolaus Schaller Signed-off-by: Tony Lindgren commit fa99c21ecb3cd4021a60d0e8bf880e78b5bd0729 Author: H. Nikolaus Schaller Date: Tue Jul 31 09:11:12 2018 +0200 ARM: dts: omap3-gta04: make NAND partitions compatible with recent U-Boot Vendor defined U-Boot has changed the partition scheme a while ago: * kernel partition 6MB * file system partition uses the remainder up to end of the NAND * increased size of the environment partition (to get an OneNAND compatible base address) * shrink the U-Boot partition Let's be compatible (e.g. Debian kernel built from upstream). Signed-off-by: H. Nikolaus Schaller Signed-off-by: Tony Lindgren commit 5d282d3f2f9c14f12058483fd36513bf6ddb3243 Author: H. Nikolaus Schaller Date: Tue Jul 31 09:11:11 2018 +0200 ARM: dts: omap3-gta04: add pinmux for bmp085 EOC interrupt Signed-off-by: H. Nikolaus Schaller Signed-off-by: Tony Lindgren commit 7384a24248eda140a234d356b6c840701ee9f055 Author: H. Nikolaus Schaller Date: Tue Jul 31 09:11:10 2018 +0200 ARM: dts: omap3-gta04: fix touchscreen tsc2007 we fix penirq polarity, add penirq pinmux and touchscreen properties. Signed-off-by: H. Nikolaus Schaller Signed-off-by: Tony Lindgren commit 8905592b6e50cec905e6c6035bbd36201a3bfac1 Author: H. Nikolaus Schaller Date: Tue Jul 31 09:11:09 2018 +0200 ARM: dts: omap3-gta04: tvout: enable as display1 alias The omap dss susbystem takes the display aliases to find out which displays exist. To enable tv-out we must define an alias. Signed-off-by: H. Nikolaus Schaller Signed-off-by: Tony Lindgren commit e08962dff1dcc50bc3224c258234cc5e5c9303a8 Author: H. Nikolaus Schaller Date: Tue Jul 31 09:11:08 2018 +0200 ARM: dts: omap3-gta04: add devconf1 setup for correct tvout pins The VENC with external OPA362 amplifier needs a special "pinmux" setup in DEVCONF1 (TVOUTBYPASS and TVOUTACEN). Signed-off-by: H. Nikolaus Schaller Signed-off-by: Tony Lindgren commit f6591391373dbff2c0200e1055d4ff86191578d2 Author: H. Nikolaus Schaller Date: Tue Jul 31 09:11:07 2018 +0200 ARM: dts: omap3-gta04: fixes for tvout / venc * fix connector compatibility (composite) * add comment for gpio1 23 * add proper #address-cells * we use only one venc_out channel for composite Signed-off-by: H. Nikolaus Schaller Signed-off-by: Tony Lindgren commit fa0d7dc355c890725b6178dab0cc11b194203afa Author: H. Nikolaus Schaller Date: Tue Jul 31 09:11:06 2018 +0200 ARM: dts: omap3-gta04: give spi_lcd node a label so that we can overwrite in other DTS files needed for device variants based on GTA04 board but with different display panel (driver). Signed-off-by: H. Nikolaus Schaller Signed-off-by: Tony Lindgren commit eef69561c600db9bf0c02f3f4f68f2c1c998f0ac Author: H. Nikolaus Schaller Date: Tue Jul 31 09:11:05 2018 +0200 ARM: dts: omap3-gta04: fix some whitespace and tab style errors tab+space -> tab only for /* GSM audio */ spaces -> tab for dss_dpi_pins Signed-off-by: H. Nikolaus Schaller Signed-off-by: Tony Lindgren commit 85ca3d04c0e915d6d61f3a27db51d910975426da Author: H. Nikolaus Schaller Date: Tue Jul 31 09:11:04 2018 +0200 ARM: dts: omap3-gta04: fix typo in backlight pins node name mn -> nm for backlight_pins Signed-off-by: H. Nikolaus Schaller Signed-off-by: Tony Lindgren commit b4dc44b3cac9e8327e0655f530ed0c46f2e6214c Author: Dominique Martinet Date: Sat Sep 8 01:18:43 2018 +0900 9p locks: fix glock.client_id leak in do_lock the 9p client code overwrites our glock.client_id pointing to a static buffer by an allocated string holding the network provided value which we do not care about; free and reset the value as appropriate. This is almost identical to the leak in v9fs_file_getlock() fixed by Al Viro in commit ce85dd58ad5a6 ("9p: we are leaking glock.client_id in v9fs_file_getlock()"), which was returned as an error by a coverity false positive -- while we are here attempt to make the code slightly more robust to future change of the net/9p/client code and hopefully more clear to coverity that there is no problem. Link: http://lkml.kernel.org/r/1536339057-21974-5-git-send-email-asmadeus@codewreck.org Signed-off-by: Dominique Martinet commit ef5305f1f72eb1cfcda25c382bb0368509c0385b Author: Dominique Martinet Date: Sat Sep 8 00:36:08 2018 +0900 9p: p9dirent_read: check network-provided name length strcpy to dirent->d_name could overflow the buffer, use strscpy to check the provided string length and error out if the size was too big. While we are here, make the function return an error when the pdu parsing failed, instead of returning the pdu offset as if it had been a success... Link: http://lkml.kernel.org/r/1536339057-21974-4-git-send-email-asmadeus@codewreck.org Addresses-Coverity-ID: 139133 ("Copy into fixed size buffer") Signed-off-by: Dominique Martinet commit 473c7dd1d7b59ff8f88a5154737e3eac78a96e5b Author: Dominique Martinet Date: Sat Sep 8 00:26:50 2018 +0900 9p/rdma: remove useless check in cm_event_handler the client c is always dereferenced to get the rdma struct, so c has to be a valid pointer at this point. Gcc would optimize that away but let's make coverity happy... Link: http://lkml.kernel.org/r/1536339057-21974-3-git-send-email-asmadeus@codewreck.org Addresses-Coverity-ID: 102778 ("Dereference before null check") Signed-off-by: Dominique Martinet commit e02a53d92e197706cad1627bd84705d4aa20a145 Author: Dominique Martinet Date: Sat Sep 8 00:10:57 2018 +0900 9p: acl: fix uninitialized iattr access iattr is passed to v9fs_vfs_setattr_dotl which does send various values from iattr over the wire, even if it tells the server to only look at iattr.ia_valid fields this could leak some stack data. Link: http://lkml.kernel.org/r/1536339057-21974-2-git-send-email-asmadeus@codewreck.org Addresses-Coverity-ID: 1195601 ("Uninitalized scalar variable") Signed-off-by: Dominique Martinet commit 5e172f75e51e3de1b4274146d9b990f803cb5c2a Author: Dinu-Razvan Chis-Serban Date: Wed Sep 5 16:44:12 2018 +0900 9p locks: add mount option for lock retry interval The default P9_LOCK_TIMEOUT can be too long for some users exporting a local file system to a guest VM (30s), make this configurable at mount time. Link: http://lkml.kernel.org/r/1536295827-3181-1-git-send-email-asmadeus@codewreck.org Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=195727 Signed-off-by: Dinu-Razvan Chis-Serban Signed-off-by: Dominique Martinet commit 2803cf4379ed252894f046cb8812a48db35294e3 Author: Gertjan Halkes Date: Wed Sep 5 15:41:29 2018 +0900 9p: do not trust pdu content for stat item size v9fs_dir_readdir() could deadloop if a struct was sent with a size set to -2 Link: http://lkml.kernel.org/r/1536134432-11997-1-git-send-email-asmadeus@codewreck.org Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=88021 Signed-off-by: Gertjan Halkes Signed-off-by: Dominique Martinet commit 6d35190f395316916c8bb4aabd35a182890bf856 Author: Tomas Bortoli Date: Mon Sep 3 18:03:21 2018 +0200 9p: Rename req to rreq in trans_fd In struct p9_conn, rename req to rreq as it is used by the read routine. Link: http://lkml.kernel.org/r/20180903160321.2181-1-tomasbortoli@gmail.com Signed-off-by: Tomas Bortoli Suggested-by: Jun Piao Signed-off-by: Dominique Martinet commit 426d5a0f9733ecc2c4d7b252672fa8b1970d1c91 Author: Gustavo A. R. Silva Date: Mon Sep 3 14:38:06 2018 -0500 9p: fix spelling mistake in fall-through annotation Replace "fallthough" with a proper "fall through" annotation. This fix is part of the ongoing efforts to enabling -Wimplicit-fallthrough Link: http://lkml.kernel.org/r/20180903193806.GA11258@embeddedor.com Addresses-Coverity-ID: 402012 ("Missing break in switch") Signed-off-by: Gustavo A. R. Silva Signed-off-by: Dominique Martinet commit 8b894adb2b7e1d1e64b8954569c761eaf3d51ab5 Author: Dominique Martinet Date: Thu Aug 30 19:29:36 2018 +0900 9p/rdma: do not disconnect on down_interruptible EAGAIN 9p/rdma would sometimes drop the connection and display errors in recv_done when the user does ^C. The errors were caused by recv buffers that were posted at the time of disconnect, and we just do not want to disconnect when down_interruptible is... interrupted. Link: http://lkml.kernel.org/r/1535625307-18019-1-git-send-email-asmadeus@codewreck.org Signed-off-by: Dominique Martinet commit 728356dedeff8ef999cb436c71333ef4ac51a81c Author: Tomas Bortoli Date: Tue Aug 14 19:43:42 2018 +0200 9p: Add refcount to p9_req_t To avoid use-after-free(s), use a refcount to keep track of the usable references to any instantiated struct p9_req_t. This commit adds p9_req_put(), p9_req_get() and p9_req_try_get() as wrappers to kref_put(), kref_get() and kref_get_unless_zero(). These are used by the client and the transports to keep track of valid requests' references. p9_free_req() is added back and used as callback by kref_put(). Add SLAB_TYPESAFE_BY_RCU as it ensures that the memory freed by kmem_cache_free() will not be reused for another type until the rcu synchronisation period is over, so an address gotten under rcu read lock is safe to inc_ref() without corrupting random memory while the lock is held. Link: http://lkml.kernel.org/r/1535626341-20693-1-git-send-email-asmadeus@codewreck.org Co-developed-by: Dominique Martinet Signed-off-by: Tomas Bortoli Reported-by: syzbot+467050c1ce275af2a5b8@syzkaller.appspotmail.com Signed-off-by: Dominique Martinet commit 43cbcbee9938b17f77cf34f1bc12d302f456810f Author: Tomas Bortoli Date: Sat Aug 11 16:42:53 2018 +0200 9p: rename p9_free_req() function In sight of the next patch to add a refcount in p9_req_t, rename the p9_free_req() function in p9_release_req(). In the next patch the actual kfree will be moved to another function. Link: http://lkml.kernel.org/r/20180811144254.23665-1-tomasbortoli@gmail.com Signed-off-by: Tomas Bortoli Acked-by: Jun Piao Signed-off-by: Dominique Martinet commit 91a76be37ff89795526c452a6799576b03bec501 Author: Dominique Martinet Date: Mon Jul 30 15:14:37 2018 +0900 9p: add a per-client fcall kmem_cache Having a specific cache for the fcall allocations helps speed up end-to-end latency. The caches will automatically be merged if there are multiple caches of items with the same size so we do not need to try to share a cache between different clients of the same size. Since the msize is negotiated with the server, only allocate the cache after that negotiation has happened - previous allocations or allocations of different sizes (e.g. zero-copy fcall) are made with kmalloc directly. Some figures on two beefy VMs with Connect-IB (sriov) / trans=rdma, with ior running 32 processes in parallel doing small 32 bytes IOs: - no alloc (4.18-rc7 request cache): 65.4k req/s - non-power of two alloc, no patch: 61.6k req/s - power of two alloc, no patch: 62.2k req/s - non-power of two alloc, with patch: 64.7k req/s - power of two alloc, with patch: 65.1k req/s Link: http://lkml.kernel.org/r/1532943263-24378-2-git-send-email-asmadeus@codewreck.org Signed-off-by: Dominique Martinet Acked-by: Jun Piao Cc: Matthew Wilcox Cc: Greg Kurz commit 523adb6cc10b48655c0abe556505240741425b49 Author: Dominique Martinet Date: Mon Jul 30 05:55:19 2018 +0000 9p: embed fcall in req to round down buffer allocs 'msize' is often a power of two, or at least page-aligned, so avoiding an overhead of two dozen bytes for each allocation will help the allocator do its work and reduce memory fragmentation. Link: http://lkml.kernel.org/r/1533825236-22896-1-git-send-email-asmadeus@codewreck.org Suggested-by: Matthew Wilcox Signed-off-by: Dominique Martinet Reviewed-by: Greg Kurz Acked-by: Jun Piao Cc: Matthew Wilcox commit 5f997580e8b12b9f585e34cc16304925d26ce49e Author: Tony Jones Date: Thu Sep 6 21:33:57 2018 -0700 apparmor: Fix network performance issue in aa_label_sk_perm The netperf benchmark shows a 5.73% reduction in throughput for small (64 byte) transfers by unconfined tasks. DEFINE_AUDIT_SK() in aa_label_sk_perm() should not be performed unconditionally, rather only when the label is confined. netperf-tcp 56974a6fc^ 56974a6fc Min 64 563.48 ( 0.00%) 531.17 ( -5.73%) Min 128 1056.92 ( 0.00%) 999.44 ( -5.44%) Min 256 1945.95 ( 0.00%) 1867.97 ( -4.01%) Min 1024 6761.40 ( 0.00%) 6364.23 ( -5.87%) Min 2048 11110.53 ( 0.00%) 10606.20 ( -4.54%) Min 3312 13692.67 ( 0.00%) 13158.41 ( -3.90%) Min 4096 14926.29 ( 0.00%) 14457.46 ( -3.14%) Min 8192 18399.34 ( 0.00%) 18091.65 ( -1.67%) Min 16384 21384.13 ( 0.00%) 21158.05 ( -1.06%) Hmean 64 564.96 ( 0.00%) 534.38 ( -5.41%) Hmean 128 1064.42 ( 0.00%) 1010.12 ( -5.10%) Hmean 256 1965.85 ( 0.00%) 1879.16 ( -4.41%) Hmean 1024 6839.77 ( 0.00%) 6478.70 ( -5.28%) Hmean 2048 11154.80 ( 0.00%) 10671.13 ( -4.34%) Hmean 3312 13838.12 ( 0.00%) 13249.01 ( -4.26%) Hmean 4096 15009.99 ( 0.00%) 14561.36 ( -2.99%) Hmean 8192 18975.57 ( 0.00%) 18326.54 ( -3.42%) Hmean 16384 21440.44 ( 0.00%) 21324.59 ( -0.54%) Stddev 64 1.24 ( 0.00%) 2.85 (-130.64%) Stddev 128 4.51 ( 0.00%) 6.53 ( -44.84%) Stddev 256 11.67 ( 0.00%) 8.50 ( 27.16%) Stddev 1024 48.33 ( 0.00%) 75.07 ( -55.34%) Stddev 2048 54.82 ( 0.00%) 65.16 ( -18.86%) Stddev 3312 153.57 ( 0.00%) 56.29 ( 63.35%) Stddev 4096 100.25 ( 0.00%) 88.50 ( 11.72%) Stddev 8192 358.13 ( 0.00%) 169.99 ( 52.54%) Stddev 16384 43.99 ( 0.00%) 141.82 (-222.39%) Signed-off-by: Tony Jones Fixes: 56974a6fcfef ("apparmor: add base infastructure for socket mediation") Signed-off-by: John Johansen commit b9a947dd756b7af84ababa57e0524788f91a5382 Author: Alexey Khoroshilov Date: Fri Sep 7 01:16:54 2018 +0300 spi: pic32: remove unnecessary of_node_get() Almost all spi drivers assign spi master->dev.of_node from its parent platform device without additional refcounting. It seems of_node_get() in pic32_spi_probe() is unnecessary and there is no corresponding of_node_put(). Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov Signed-off-by: Mark Brown commit f6707fd6241e483f6fea2caae82d876e422bb11a Author: Rob Herring Date: Mon Aug 27 09:50:09 2018 -0500 of: make PowerMac cache node search conditional on CONFIG_PPC_PMAC Cache nodes under the cpu node(s) is PowerMac specific according to the comment above, so make the code enforce that. Signed-off-by: Rob Herring commit 00b7d1cf46676ad5e6338e80dc6230e1b6e71b86 Author: Rob Herring Date: Wed Aug 29 17:21:45 2018 -0500 of: make default address and size cells sizes private Only some old OpenFirmware implementations rely on default sizes. Any FDT and modern implementation should have explicit properties. Make the OF_ROOT_NODE_*_CELLS_DEFAULT defines private so we don't get any outside users. This also gets us one step closer to removing the asm/prom.h dependency on Sparc. Cc: "David S. Miller" Cc: Frank Rowand Cc: sparclinux@vger.kernel.org Signed-off-by: Rob Herring commit 6d0a70a284be782e8b0120de75398a1a1155a50c Author: Rob Herring Date: Mon Aug 27 08:13:56 2018 -0500 vsprintf: print OF node name using full_name In preparation to remove the node name pointer from struct device_node, convert the node name print to get the node name from the full name. Reviewed-by: Frank Rowand Signed-off-by: Rob Herring commit a613b26a50136ae90ab13943afe90bcbd34adb44 Author: Rob Herring Date: Mon Aug 27 20:00:19 2018 -0500 of: 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. Reviewed-by: Frank Rowand Cc: Andrew Lunn Cc: Florian Fainelli Cc: netdev@vger.kernel.org Signed-off-by: Rob Herring commit 3004136b90bedc9e254ff659adb7a60299e9495e Author: Grant Grundler Date: Thu Sep 6 17:27:28 2018 -0700 ASoC: max98373: usleep_range() needs include/delay.h Commit ca917f9fe1a0fab added use of usleep_range() but not the corresponding "include ". The result is with Chrome OS won't build because warnings are forced to be errors: mnt/host/source/src/third_party/kernel/v4.4/sound/soc/codecs/max98373.c:734:2: error: implicit declaration of function 'usleep_range' [-Werror,-Wimplicit-function-declaration] usleep_range(10000, 11000); ^ Including delay.h "fixes" this. Signed-off-by: Grant Grundler Reviewed-by: Benson Leung Signed-off-by: Mark Brown commit b9e49520c1144cb4109ec6ed1fa76c326da850d0 Author: YueHaibing Date: Fri Sep 7 02:19:16 2018 +0000 spi: pl022: Remove set but not used variable 'chip' Fixes gcc '-Wunused-but-set-variable' warning: drivers/spi/spi-pl022.c: In function 'do_polling_transfer': drivers/spi/spi-pl022.c:1493:20: warning: variable 'chip' set but not used [-Wunused-but-set-variable] Signed-off-by: YueHaibing Signed-off-by: Mark Brown commit 20bdc376b427cb420836f39ee8f281ea85dbaeef Author: Suman Tripathi Date: Fri Sep 7 08:32:17 2018 -0600 ata: Disable AHCI ALPM feature for Ampere Computing eMAG SATA Due to hardware errata, Ampere Computing eMAG SATA can't support AHCI ALPM feature. This patch disables the AHCI ALPM feature for eMAG SATA. Signed-off-by: Suman Trpathi Signed-off-by: Rameshwar Prasad Sahu Signed-off-by: Jens Axboe commit 7526aa54b261087014bdea7e361f900d4741c35e Author: Will Deacon Date: Mon Sep 3 15:19:37 2018 +0100 MAINTAINERS: Add entry for MMU GATHER AND TLB INVALIDATION We recently had to debug a TLB invalidation problem on the munmap() path, which was made more difficult than necessary because: (a) The MMU gather code had changed without people realising (b) Many people subtly misunderstood the operation of the MMU gather code and its interactions with RCU and arch-specific TLB invalidation (c) Untangling the intended behaviour involved educated guesswork and plenty of discussion Hopefully, we can avoid getting into this mess again by designating a cross-arch group of people to look after this code. It is not intended that they will have a separate tree, but they at least provide a point of contact for anybody working in this area and can co-ordinate any proposed future changes to the internal API. Cc: Peter Zijlstra Cc: Nicholas Piggin Cc: Linus Torvalds Cc: "Aneesh Kumar K.V" Cc: "Kirill A. Shutemov" Cc: Andrew Morton Cc: Michal Hocko Signed-off-by: Will Deacon commit 196d9d8bb71deaa2d1c7170c88a2f1a318363047 Author: Peter Zijlstra Date: Mon Sep 3 15:07:36 2018 +0100 mm/memory: Move mmu_gather and TLB invalidation code into its own file In preparation for maintaining the mmu_gather code as its own entity, move the implementation out of memory.c and into its own file. Cc: "Kirill A. Shutemov" Cc: Andrew Morton Cc: Michal Hocko Signed-off-by: Peter Zijlstra Signed-off-by: Will Deacon commit 5f521722a2a2391d693afccdf6e12be2754382d8 Author: Chris Wilson Date: Fri Sep 7 12:28:51 2018 +0100 drm/i915: Missed interrupt simulation is no more, tell the world Using the guc, we cannot disable the user interrupt generation as we use it for driving submission. And from Icelake, we no longer have the ability to individually mask interrupt generation from each engine, disabling our ability to fake missed interrupts. In both cases, report back to userspace that the missed interrupt generator is no longer available. Signed-off-by: Chris Wilson Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20180907112856.28242-1-chris@chris-wilson.co.uk commit 1c96a2f67cd9b617b013f0a7580d76aae7dcd0d7 Author: David Frey Date: Sat Sep 1 09:50:41 2018 -0700 regmap: split up regmap_config.use_single_rw Split regmap_config.use_single_rw into use_single_read and use_single_write. This change enables drivers of devices which only support bulk operations in one direction to use the regmap_bulk_*() functions for both directions and have their bulk operation split into single operations only when necessary. Update all struct regmap_config instances where use_single_rw==true to instead set both use_single_read and use_single_write. No attempt was made to evaluate whether it is possible to set only one of use_single_read or use_single_write. Signed-off-by: David Frey Signed-off-by: Mark Brown commit 9ad8eb0168ab76786f65d4b80ce082980f79a1d9 Author: David Frey Date: Sat Sep 1 09:50:40 2018 -0700 regmap: fix comment for regmap.use_single_write Signed-off-by: David Frey Signed-off-by: Mark Brown commit 3b857472f34faa7d11001afa5e158833812c98d7 Author: Yong Zhi Date: Tue Aug 7 12:19:16 2018 -0500 ASoC: Intel: hdac_hdmi: Limit sampling rates at dai creation Playback of 44.1Khz contents with HDMI plugged returns "Invalid pipe config" because HDMI paths in the FW topology are configured to operate at 48Khz. This patch filters out sampling rates not supported at hdac_hdmi_create_dais() to let user space SRC to do the converting. Signed-off-by: Yong Zhi Reviewed-by: Pierre-Louis Bossart Reviewed-by: Takashi Iwai Signed-off-by: Mark Brown commit f11adcecbd5f2495be7b64bcd7537515c25c7dcd Author: Jonathan Liu Date: Fri Sep 7 12:19:45 2018 +0800 drm/sun4i: tcon: Add dithering support for RGB565/RGB666 LCD panels The hardware supports dithering on TCON channel 0 which is used for LCD panels. Dithering is a method of approximating a color from a mixture of other colors when the required color isn't available. It reduces color banding artifacts that can be observed when displaying gradients (e.g. grayscale gradients). This may occur when the image that needs to be displayed is 24-bit but the LCD panel is a lower bit depth and does not perform dithering on its own. Signed-off-by: Jonathan Liu [wens@csie.org: check display_info.bpc first; handle LVDS and MIPI DSI] Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20180907041948.19913-4-wens@csie.org commit 5869d90b28a6e1a64268d6f76c17617a9ac62b31 Author: Chen-Yu Tsai Date: Fri Sep 7 12:19:44 2018 +0800 drm/sun4i: tcon: Rename Dithering related register macros Dithering is only supported for TCON channel 0. Throughout the datasheet all the names associated with these register are prefixed "TCON0", instead of "TCON". The only exception is the control register "TCON_FRM_CTL_REG". Rename the macros to reflect this. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20180907041948.19913-3-wens@csie.org commit 79891d56d9940d7ffb4828a05c43b5e48ca5f026 Author: Chen-Yu Tsai Date: Fri Sep 7 12:19:43 2018 +0800 drm/sun4i: tcon: Pass drm_encoder * into sun4i_tcon0_mode_set_cpu sun4i_tcon0_mode_set_cpu() currently accepts struct mipi_dsi_device * as its second parameter. This is derived from drm_encoder. The DSI encoder is tied to the CPU interface mode of the TCON as a special case. In theory, if hardware were available, we could also support normal CPU interface modes. It is better to pass the generic encoder instead of the specialized mipi_dsi_device, and handle the differences inside the function. Passing the encoder would also enable the function to pass it, or any other data structures related to it, to other functions expecting it. One such example would be dithering support that will be added in a later patch, which looks at properties tied to the connector to determine whether dithering should be enabled or not. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20180907041948.19913-2-wens@csie.org commit fc269c0396448cabe1afd648c0b335669aa347b7 Author: Charles Keepax Date: Thu Sep 6 17:41:55 2018 +0100 ASoC: dapm: Avoid uninitialised variable warning Commit 4a75aae17b2a ("ASoC: dapm: Add support for multi-CODEC CODEC to CODEC links") adds loops that iterate over multiple CODECs in snd_soc_dai_link_event. This also introduced a compiler warning for a potentially uninitialised variable in the case no CODECs are present. This should never be the case as the DAI link must by definition contain at least 1 CODEC however probably best to avoid the compiler warning by initialising ret to zero. Signed-off-by: Charles Keepax Signed-off-by: Mark Brown commit 1abefb02749f2a39b8020a1d95f7101f2d91e646 Author: Jan Kara Date: Thu Sep 6 17:54:41 2018 +0200 udf: Drop pack pragma from udf_sb.h Drop pack pragma. The header file defines only in-memory structures. Signed-off-by: Jan Kara commit 694538b5d753666c81938ca6628188e1c432d377 Author: Jan Kara Date: Thu Sep 6 17:52:28 2018 +0200 udf: Drop freed bitmap / table support We don't support Free Space Table and Free Space Bitmap as specified by UDF standard for writing as we don't support erasing blocks before overwriting them. Just drop the handling of these structures as partition descriptor checking code already makes sure such filesystems can be mounted only read-only. Signed-off-by: Jan Kara commit b085fbe2ef7fa7489903c45271ae7b7a52b0f9ab Author: Jan Kara Date: Thu Sep 6 15:46:17 2018 +0200 udf: Fix crash during mount Fix a crash during an attempt to mount a filesystem that has both Unallocated Space Table and Unallocated Space Bitmap. Such filesystem actually violates the UDF standard so we just have to properly detect such situation and refuse to mount such filesystem read-write. When we are at it, verify also other constraints on the allocation information mandated by the standard. Reported-by: Anatoly Trosinenko Signed-off-by: Jan Kara commit a9ad01bc759df79b0012f43ee52164391e31cd96 Author: Jan Kara Date: Thu Sep 6 15:56:10 2018 +0200 udf: Prevent write-unsupported filesystem to be remounted read-write There are certain filesystem features which we support for reading but not for writing. We properly refuse to mount such filesystems read-write however for some features (such as read-only partitions), we don't check for these features when remounting the filesystem from read-only to read-write. Thus such filesystems could be remounted read-write leading to strange behavior (most likely crashes). Fix the problem by marking in superblock whether the filesystem has some features that are supported in read-only mode and check this flag during remount. Signed-off-by: Jan Kara commit e2bbf91cad09118d7500f1fdaaa83d7741d30395 Author: Enric Balletbo i Serra Date: Wed Jul 18 18:09:56 2018 +0200 mfd: cros_ec: Fix and improve kerneldoc comments. cros-ec includes inside the MFD subsystem, specially the file cros_ec_commands.h, has been modified several times and it has grown a lot, unfortunately, we didn't have care too much about the documentation. This patch tries to improve the documentation and also fixes all the issues reported by kerneldoc script. Signed-off-by: Enric Balletbo i Serra Signed-off-by: Benson Leung commit cc8a4ea182efac95ad4582053f8a51271fab734d Author: Enric Balletbo i Serra Date: Wed Jul 18 18:09:55 2018 +0200 platform/chrome: Move mfd/cros_ec_lpc* includes to drivers/platform. The cros-ec-lpc driver lives in drivers/platform because is platform specific, however there are two includes (cros_ec_lpc_mec.h and cros_ec_lpc_reg.h) that lives in include/linux/mfd. These two includes are only used for the platform driver and are not really related to the MFD subsystem, so move the includes from include/linux/mfd to drivers/platform/chrome. Signed-off-by: Enric Balletbo i Serra Signed-off-by: Benson Leung commit f6f3bac08ff9855d803081a353a1fafaa8845739 Author: Yonghong Song Date: Wed Sep 5 16:58:06 2018 -0700 tools/bpf: bpftool: add net support Add "bpftool net" support. Networking devices are enumerated to dump device index/name associated with xdp progs. For each networking device, tc classes and qdiscs are enumerated in order to check their bpf filters. In addition, root handle and clsact ingress/egress are also checked for bpf filters. Not all filter information is printed out. Only ifindex, kind, filter name, prog_id and tag are printed out, which are good enough to show attachment information. If the filter action is a bpf action, its bpf program id, bpf name and tag will be printed out as well. For example, $ ./bpftool net xdp [ ifindex 2 devname eth0 prog_id 198 ] tc_filters [ ifindex 2 kind qdisc_htb name prefix_matcher.o:[cls_prefix_matcher_htb] prog_id 111727 tag d08fe3b4319bc2fd act [] ifindex 2 kind qdisc_clsact_ingress name fbflow_icmp prog_id 130246 tag 3f265c7f26db62c9 act [] ifindex 2 kind qdisc_clsact_egress name prefix_matcher.o:[cls_prefix_matcher_clsact] prog_id 111726 tag 99a197826974c876 ifindex 2 kind qdisc_clsact_egress name cls_fg_dscp prog_id 108619 tag dc4630674fd72dcc act [] ifindex 2 kind qdisc_clsact_egress name fbflow_egress prog_id 130245 tag 72d2d830d6888d2c ] $ ./bpftool -jp net [{ "xdp": [{ "ifindex": 2, "devname": "eth0", "prog_id": 198 } ], "tc_filters": [{ "ifindex": 2, "kind": "qdisc_htb", "name": "prefix_matcher.o:[cls_prefix_matcher_htb]", "prog_id": 111727, "tag": "d08fe3b4319bc2fd", "act": [] },{ "ifindex": 2, "kind": "qdisc_clsact_ingress", "name": "fbflow_icmp", "prog_id": 130246, "tag": "3f265c7f26db62c9", "act": [] },{ "ifindex": 2, "kind": "qdisc_clsact_egress", "name": "prefix_matcher.o:[cls_prefix_matcher_clsact]", "prog_id": 111726, "tag": "99a197826974c876" },{ "ifindex": 2, "kind": "qdisc_clsact_egress", "name": "cls_fg_dscp", "prog_id": 108619, "tag": "dc4630674fd72dcc", "act": [] },{ "ifindex": 2, "kind": "qdisc_clsact_egress", "name": "fbflow_egress", "prog_id": 130245, "tag": "72d2d830d6888d2c" } ] } ] Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov commit 36f1678d9e0b5d2e0236046d9659e0348b4719a8 Author: Yonghong Song Date: Wed Sep 5 16:58:05 2018 -0700 tools/bpf: add more netlink functionalities in lib/bpf This patch added a few netlink attribute parsing functions and the netlink API functions to query networking links, tc classes, tc qdiscs and tc filters. For example, the following API is to get networking links: int nl_get_link(int sock, unsigned int nl_pid, dump_nlmsg_t dump_link_nlmsg, void *cookie); Note that when the API is called, the user also provided a callback function with the following signature: int (*dump_nlmsg_t)(void *cookie, void *msg, struct nlattr **tb); The "cookie" is the parameter the user passed to the API and will be available for the callback function. The "msg" is the information about the result, e.g., ifinfomsg or tcmsg. The "tb" is the parsed netlink attributes. Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov commit f7010770fbac47b1fc9fb723b1d2019eb23c04f2 Author: Yonghong Song Date: Wed Sep 5 16:58:04 2018 -0700 tools/bpf: move bpf/lib netlink related functions into a new file There are no functionality change for this patch. In the subsequent patches, more netlink related library functions will be added and a separate file is better than cluttering bpf.c. Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov commit 52b7b7843d9523ebc3c60c51c7afc4a45cc10aad Author: Yonghong Song Date: Wed Sep 5 16:58:03 2018 -0700 tools/bpf: sync kernel uapi header if_link.h to tools Among others, this header will be used later for bpftool net support. Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov commit f5bd3948eb07e76fcd73d0b8ab7b3265be226038 Author: Mauricio Vasquez B Date: Mon Sep 3 19:01:59 2018 +0200 selftests/bpf/test_progs: do not check errno == 0 The errno man page states: "The value in errno is significant only when the return value of the call indicated an error..." then it is not correct to check it, it could be different than zero even if the function succeeded. It causes some false positives if errno is set by a previous function. Signed-off-by: Mauricio Vasquez B Signed-off-by: Alexei Starovoitov commit ad1242d8a063ceb8c6e1b9c1a63b73ec94fa0295 Author: Mauricio Vasquez B Date: Mon Sep 3 18:05:27 2018 +0200 selftests/bpf: add missing executables to .gitignore Signed-off-by: Mauricio Vasquez B Signed-off-by: Alexei Starovoitov commit 47b123ed9e99b064dd2b250e1b62e1d91dd876ee Author: Jesper Dangaard Brouer Date: Mon Sep 3 09:55:07 2018 +0200 xdp: split code for map vs non-map redirect The compiler does an efficient job of inlining static C functions. Perf top clearly shows that almost everything gets inlined into the function call xdp_do_redirect. The function xdp_do_redirect end-up containing and interleaving the map and non-map redirect code. This is sub-optimal, as it would be strange for an XDP program to use both types of redirect in the same program. The two use-cases are separate, and interleaving the code just cause more instruction-cache pressure. I would like to stress (again) that the non-map variant bpf_redirect is very slow compared to the bpf_redirect_map variant, approx half the speed. Measured with driver i40e the difference is: - map redirect: 13,250,350 pps - non-map redirect: 7,491,425 pps For this reason, the function name of the non-map variant of redirect have been called xdp_do_redirect_slow. This hopefully gives a hint when using perf, that this is not the optimal XDP redirect operating mode. Signed-off-by: Jesper Dangaard Brouer Signed-off-by: Alexei Starovoitov commit 2a68d85fe1b7511731dedf73c4003fec2880f1ce Author: Jesper Dangaard Brouer Date: Mon Sep 3 09:55:02 2018 +0200 xdp: explicit inline __xdp_map_lookup_elem The compiler chooses to not-inline the function __xdp_map_lookup_elem, because it can see that it is used by both Generic-XDP and native-XDP do redirect calls (xdp_do_generic_redirect_map and xdp_do_redirect_map). The compiler cannot know that this is a bad choice, as it cannot know that a net device cannot run both XDP modes (Generic or Native) at the same time. Thus, mark this function inline, even-though we normally leave this up-to the compiler. Signed-off-by: Jesper Dangaard Brouer Signed-off-by: Alexei Starovoitov commit e1302542e37ebbc1de70982e93bd777397f90712 Author: Jesper Dangaard Brouer Date: Mon Sep 3 09:54:57 2018 +0200 xdp: unlikely instrumentation for xdp map redirect Notice the compiler generated ASM code layout was suboptimal. It assumed map enqueue errors as the likely case, which is shouldn't. It assumed that xdp_do_flush_map() was a likely case, due to maps changing between packets, which should be very unlikely. Signed-off-by: Jesper Dangaard Brouer Signed-off-by: Alexei Starovoitov commit 38bb4ac91bd8322cfed9d9b922ef2d8f5daa5700 Author: YueHaibing Date: Wed Sep 5 11:44:10 2018 +0000 bnxt_en: remove set but not used variable 'addr_type' Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c: In function 'bnxt_tc_parse_flow': drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c:186:6: warning: variable 'addr_type' set but not used [-Wunused-but-set-variable] Signed-off-by: YueHaibing Signed-off-by: David S. Miller commit fa642f08839bf2ff35b2f6c6a6c062aee8121ba8 Author: Yi-Hung Wei Date: Tue Sep 4 15:33:41 2018 -0700 openvswitch: Derive IP protocol number for IPv6 later frags Currently, OVS only parses the IP protocol number for the first IPv6 fragment, but sets the IP protocol number for the later fragments to be NEXTHDF_FRAGMENT. This patch tries to derive the IP protocol number for the IPV6 later frags so that we can match that. Signed-off-by: Yi-Hung Wei Acked-by: Pravin B Shelar Signed-off-by: David S. Miller commit 1f3eb3461f58a4c48da67af4a8c4deb4d3c97214 Merge: f5169a17af4e 6ea484309523 Author: Dave Airlie Date: Fri Sep 7 11:03:24 2018 +1000 Merge tag 'omapdrm-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux into drm-next omapdrm changes for v4.20 Big amount of changes from Laurent, reworking the driver towards the model used by the other DRM drivers by reverting the direction of many of the operations on the display pipeline. The aim of this work is to allow omapdrm to use the common DRM panels and bridges. Not all of the operations are dealt in these patches, so more work needs to be done. The only change visible to the user should be the change in module dependencies: e.g. earlier a panel module depended on an encoder module, but now the encoder module depends on the panel module, which affects the order in which to unload the modules. Signed-off-by: Dave Airlie From: Tomi Valkeinen Link: https://patchwork.freedesktop.org/patch/msgid/9bb1a01b-a632-ce0c-f249-7b5470967e3a@ti.com commit f5169a17af4ee5170587fd76d76aaa72ae4b864a Merge: 57361846b52b 3ee22b769fd7 Author: Dave Airlie Date: Fri Sep 7 09:34:04 2018 +1000 Merge tag 'drm-misc-next-2018-09-05' of git://anongit.freedesktop.org/drm/drm-misc into drm-next drm-misc-next for 4.20: UAPI Changes: - Add userspace dma-buf device to turn memfd regions into dma-bufs (Gerd) - Add per-plane blend mode property (Lowry) - Change in drm_fourcc.h is documentation only (Brian) Cross-subsystem Changes: - None Core Changes: - Remove user logspam and useless lock in vma_offset_mgr destroy (Chris) - Add get/verify_crc_source for improved crc source selection (Mahesh) - Add __drm_atomic_helper_plane_reset to reduce copypasta (Alexandru) Driver Changes: - various: Replance ref/unref calls with drm_dev_get/put (Thomas) - bridge: Add driver for TI SN65DSI86 chip (Sandeep) - rockchip: Add PX30 support (Sandy) - sun4i: Add support for R40 TCON (Jernej) - vkms: Continued building out vkms, added gem support (Haneen)Driver Changes: - various: fbdev: Wrap remove_conflicting_framebuffers with resource_len accessors to remove a bunch of cargo-cult (Michał) - rockchip: Add rgb output iface support + fixes (Sandy/Heiko) - nouveau/amdgpu: Add cec-over-aux support (Hans) - sun4i: Add support for Allwinner A64 (Jagan) Cc: Gerd Hoffmann Cc: Chris Wilson Cc: Michał Mirosław Cc: Heiko Stuebner Cc: Sandy Huang Cc: Hans Verkuil Cc: Jagan Teki Signed-off-by: Dave Airlie From: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20180905202210.GA95199@art_vandelay commit ddc4d236dc71b255ff4cb8394f5fce2739a1d138 Author: YueHaibing Date: Thu Sep 6 11:22:09 2018 +0000 liquidio CN23XX: Remove set but not used variable 'ring_flag' Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/ethernet/cavium/liquidio/cn23xx_vf_device.c: In function 'cn23xx_setup_octeon_vf_device': drivers/net/ethernet/cavium/liquidio/cn23xx_vf_device.c:619:20: warning: variable 'ring_flag' set but not used [-Wunused-but-set-variable] Signed-off-by: YueHaibing Signed-off-by: David S. Miller commit 488752220b4a73ae131ca3e7c0c83b9f1bf092e4 Author: Weilin Chang Date: Wed Sep 5 18:40:56 2018 -0700 liquidio: Add spoof checking on a VF MAC address 1. Provide the API to set/unset the spoof checking feature. 2. Add a function to periodically provide the count of found packets with spoof VF MAC address. 3. Prevent VF MAC address changing while the spoofchk of the VF is on unless the changing MAC address is issued from PF. Signed-off-by: Weilin Chang Signed-off-by: Felix Manlunas Signed-off-by: David S. Miller commit ddc9cc0131619382678771b0b85632f28bcf2521 Merge: 2002bc328ca3 fe1dc069990c Author: David S. Miller Date: Thu Sep 6 15:42:04 2018 -0700 Merge tag 'mlx5e-updates-2018-09-05' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5e-updates-2018-09-05 This series provides updates to mlx5 ethernet driver. 1) Starting with a four patches series to optimize flow counters updates, From Vlad Buslov: ============================================== By default mlx5 driver updates cached counters each second. Update function consumes noticeable amount of CPU resources. The goal of this patch series is to optimize update function. Investigation revealed following bottlenecks in fs counters implementation: 1) Update code(scheduled each second) iterates over all counters twice. (first for finding and deleting counters that are marked for deletion, second iteration is for actually updating the counters) 2) Counters are stored in rb tree. Linear iteration over all rb tree elements(rb_next in profiling data) consumed ~65% of time spent in update function. Following optimizations were implemented: 1) Instead of just marking counters for deletion, store them in standalone list. This removes first iteration over whole counters tree. 2) Store counters in sorted list to optimize traversing them and remove calls to rb_next. First implementation of these changes caused degradation of performance, instead of improving it. Investigation revealed that there first cache line of struct mlx5_fc is full and adding anything to it causes amount of cache misses to double. To mitigate that, following refactorings were implemented: - Change 'addlist' list type from double linked to single linked. This allowes to get free space for one additional pointer that is used to store deletion list(optimization 1) - Substitute rb tree with idr. Idr is non-intrusive data structure and doesn't require adding any new members to struct mlx5_fc. Use free space that became available for double linked sorted list that is used for traversing all counters. (optimization 2) Described changes reduced CPU time spent in mlx5_fc_stats_work from 70% to 44%. (global perf profile mode) ============================================ The rest of the series are misc updates: 2) From Kamal, Move mlx5e_priv_flags into en_ethtool.c, to avoid a compilation warning. 3) From Roi Dayan, Move Q counters allocation and drop RQ to init_rx profile function to avoid allocating Q counters when not required. 4) From Shay Agroskin, Replace PTP clock lock from RW lock to seq lock. Almost double the packet rate when timestamping is active on multiple TX queues. 5) From: Natali Shechtman, set ECN for received packets using CQE indication. 6) From: Alaa Hleihel, don't set CHECKSUM_COMPLETE on SCTP packets. CHECKSUM_COMPLETE is not applicable to SCTP protocol. ==================== Signed-off-by: David S. Miller commit 3b0d1b65c19f6650dce40d0d188df415cd0b62d7 Author: Bjorn Andersson Date: Tue Aug 28 00:14:58 2018 -0700 remoteproc: qcom: adsp: Add SDM845 ADSP and CDSP support Add support for booting the Audio and Compute DSPs found in Qualcomm's SDM845 platform. As with the previous platforms the power rail handling needs to be updated once the appropriate support lands upstream. Acked-by: Rob Herring Tested-by: Sibi Sankar Signed-off-by: Bjorn Andersson commit 0eb1cfffd5433d8dce3e4163a5cd9accc6000856 Author: Tobias Wolf Date: Wed Sep 5 08:51:26 2018 +0200 MIPS: pci-rt2880: set pci controller of_node Set the PCI controller of_node such that PCI devices can be instantiated via device tree. Signed-off-by: Tobias Wolf Signed-off-by: Mathias Kresin Acked-by: John Crispin Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/20423/ Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org commit c6e1241a82e6e74d1ae5cc34581dab2ffd6022d0 Author: Ding Xiang Date: Thu Sep 6 12:19:19 2018 +0800 mips: txx9: fix iounmap related issue if device_register return error, iounmap should be called, also iounmap need to call before put_device. Signed-off-by: Ding Xiang Reviewed-by: Atsushi Nemoto Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/20476/ Cc: ralf@linux-mips.org Cc: jhogan@kernel.org Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org commit 7759eb23fd9808a2e4498cf36a798ed65cde78ae Author: Ming Lei Date: Wed Sep 5 15:45:54 2018 -0600 block: remove bio_rewind_iter() It is pointed that bio_rewind_iter() is one very bad API[1]: 1) bio size may not be restored after rewinding 2) it causes some bogus change, such as 5151842b9d8732 (block: reset bi_iter.bi_done after splitting bio) 3) rewinding really makes things complicated wrt. bio splitting 4) unnecessary updating of .bi_done in fast path [1] https://marc.info/?t=153549924200005&r=1&w=2 So this patch takes Kent's suggestion to restore one bio into its original state via saving bio iterator(struct bvec_iter) in bio_integrity_prep(), given now bio_rewind_iter() is only used by bio integrity code. Cc: Dmitry Monakhov Cc: Hannes Reinecke Suggested-by: Kent Overstreet Acked-by: Kent Overstreet Reviewed-by: Christoph Hellwig Signed-off-by: Ming Lei Signed-off-by: Jens Axboe commit 3d0e63754fa47d65edff172c1156f44b6fca5ca1 Author: Kees Cook Date: Mon Aug 6 16:32:16 2018 -0700 drbd: Convert from ahash to shash In preparing to remove all stack VLA usage from the kernel[1], this removes the discouraged use of AHASH_REQUEST_ON_STACK in favor of the smaller SHASH_DESC_ON_STACK by converting from ahash-wrapped-shash to direct shash. By removing a layer of indirection this both improves performance and reduces stack usage. The stack allocation will be made a fixed size in a later patch to the crypto subsystem. The bulk of the lines in this change are simple s/ahash/shash/, but the main logic differences are in drbd_csum_ee() and drbd_csum_bio(), which externalizes the page walking with k(un)map_atomic() instead of using scattergather. [1] https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qPXydAacU1RqZWA@mail.gmail.com Acked-by: Lars Ellenberg Signed-off-by: Kees Cook Signed-off-by: Jens Axboe commit 273993509f05623934dda14a56237738149b2906 Author: Parav Pandit Date: Thu Sep 6 10:58:57 2018 +0300 RDMA/core: Assign device ifindex before publishing the device Even though device->ifindex is assigned before adding the device in the list which is read by netlink flow, it is better to assign rdma device index before publishing the device in the system to users and clients. Signed-off-by: Parav Pandit Reviewed-by: Daniel Jurgens Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit c715a39541bb399eb03d728a996b224d90ce1336 Author: Parav Pandit Date: Thu Sep 6 10:55:31 2018 +0300 RDMA/core: Follow correct unregister order between sysfs and cgroup During register_device() init sequence is, (a) register with rdma cgroup followed by (b) register with sysfs Therefore, unregister_device() sequence should follow the reverse order. Signed-off-by: Parav Pandit Reviewed-by: Daniel Jurgens Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 0d42d73a37ff91028785e42a6bf12fc020a277c1 Author: Igor Stoppa Date: Wed Sep 5 23:34:43 2018 +0300 seccomp: remove unnecessary unlikely() WARN_ON() already contains an unlikely(), so it's not necessary to wrap it into another. Signed-off-by: Igor Stoppa Acked-by: Kees Cook Cc: linux-security-module@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: James Morris commit 50704e039ab1d7e6c035d8c27a0b314929bfbe10 Author: Leon Romanovsky Date: Mon Sep 3 20:17:31 2018 +0300 RDMA/umem: Restore lockdep check while downgrading lock Lockdep engine handles correctly downgrade of locks and it simply incorrect to disable lockdep checks prior to calling mmu_notifier. Remove lockdep_off and ensure locks correctness. Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit e1f540c3ed0e9634d0f8c4600f3c85df8aff4ae2 Author: Parav Pandit Date: Tue Aug 28 15:08:45 2018 +0300 RDMA/core: Define client_data_lock as rwlock instead of spinlock Even though device registration/unregistration and client registration/unregistration is not a performance path, define the client_data_lock as rwlock for code clarity. Signed-off-by: Parav Pandit Reviewed-by: Daniel Jurgens Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 2d65f49ff961da5e974a48e250edd24b0c6f54d6 Author: Parav Pandit Date: Tue Aug 28 15:08:44 2018 +0300 RDMA/core: Use simpler spin lock irq API from blocking context add_client_context(), ib_unregister_device() and ib_unregister_client() are designed to call from blocking context. There is no need to save and restore last interrupt state when called from such blocking context. Even though this is not a performance path, using the right spin lock API is desired for code clarity. To avoid checkpatch warning while removing flags, sizeof() is used. Signed-off-by: Parav Pandit Reviewed-by: Daniel Jurgens Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 4512acd0d34cea1bc0d9c69c1a60174016e121d7 Author: Parav Pandit Date: Tue Aug 28 15:08:43 2018 +0300 RDMA/core: Remove context entries from list while unregistering device While unregistering a device, remove the context elements from the list to not have any stale entries. With that any errors/bugs can be checked when device is freed. Signed-off-by: Parav Pandit Reviewed-by: Daniel Jurgens Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit f7b65d9bf2db0e4b319c0676900c6c25398a449f Author: Parav Pandit Date: Tue Aug 28 15:08:42 2018 +0300 RDMA/core: Use simplified list_for_each While traversing client_data_list in following conditions, linked list is only read, no elements of the list are removed. Therefore, use list_for_each_entry(), instead of list_for_each_safe(). Signed-off-by: Parav Pandit Reviewed-by: Daniel Jurgens Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 93688ddbe1da1ead030b210dadc5a8cfbff95849 Author: Parav Pandit Date: Tue Aug 28 15:08:41 2018 +0300 RDMA/core: No need to protect kfree with spin lock and semaphore While unregistering a client, only context removal should be protected with lock. There is no need to protect a freeing of such context which is already removed from the list. Signed-off-by: Parav Pandit Reviewed-by: Daniel Jurgens Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 722c7b2bfeadbae8d9aaa08552c456e09d17a7f7 Author: Parav Pandit Date: Tue Aug 28 14:45:32 2018 +0300 RDMA/{cma, core}: Avoid callback on rdma_addr_cancel() Currently rdma_addr_cancel() is an async operation, which notifies that cancel is done by executing the callback function given during rdma_resolve_ip(). If resolve_ip request is already completed than callback is not executed. Instead, now rdma_resolve_addr() and rdma_addr_cancel() simplified in following ways. 1. rdma_addr_cancel() now a synchronous method. If request was pending, after it is cancelled, no callback is notified. 2. rdma_resolve_addr() and respective addr_handler() callback doesn't need to hold reference to cm_id. Signed-off-by: Parav Pandit Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit f9d08f1e1939ad4d92e38bd3dee6842512f5bee6 Author: Parav Pandit Date: Tue Aug 28 14:45:31 2018 +0300 RDMA/core: Rate limit MAD error messages While registering a mad agent, a user space can trigger various errors and flood the logs. Therefore, decrease verbosity and rate limit such error messages. While we are at it, use __func__ to print function name. Signed-off-by: Parav Pandit Signed-off-by: Leon Romanovsky Reviewed-by: Dennis Dalessandro Signed-off-by: Jason Gunthorpe commit 142a9c287613560edf5a03c8d142c8b6ebc1995b Author: Muhammad Sammar Date: Tue Aug 28 14:45:30 2018 +0300 IB/ipoib: Ensure that MTU isn't less than minimum permitted It is illegal to change MTU to a value lower than the minimum MTU stated in ethernet spec. In addition to that we need to add 4 bytes for encapsulation header (IPOIB_ENCAP_LEN). Before "ifconfig ib0 mtu 0" command, succeeds while it obviously shouldn't. Signed-off-by: Muhammad Sammar Reviewed-by: Feras Daoud Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 6c75520f7e5a6a353f3b332509d205e213d05855 Author: Parav Pandit Date: Tue Aug 28 14:45:29 2018 +0300 IB/mlx5: Don't hold spin lock while checking device state mdev->state device state is not protected by the QP for which WRs are being processed. Therefore, there is no need to hold spin lock while checking mdev state. Given that device fatal error is unlikely situation, wrap the condition check with unlikely(). Additionally, kernel QP1 is also a kernel ULP for which soft CQEs needs to be generated. Therefore, check for device fatal error before processing QP1 work requests. Fixes: 89ea94a7b6c4 ("IB/mlx5: Reset flow support for IB kernel ULPs") Signed-off-by: Parav Pandit Reviewed-by: Daniel Jurgens Reviewed-by: Maor Gottlieb Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 798bba01b44b0ddf8cd6e542635b37cc9a9b739c Author: Parav Pandit Date: Tue Aug 28 14:45:28 2018 +0300 RDMA/core: Fail early if unsupported QP is provided When requested QP type is not supported for a {device, port}, return the error right away before validating all parameters during mad agent registration time. Signed-off-by: Parav Pandit Reviewed-by: Daniel Jurgens Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit b5331e2feafe508f51a8a2b668cdf402f04ccc10 Author: Marek Szyprowski Date: Thu Sep 6 17:55:26 2018 +0200 clk: samsung: s3c2443: Use generic helper for handling suspend/resume Replace common suspend/resume handling code by generic helper. Almost no functional change, the only difference is in handling of hypothetical memory allocation failure on boot. Signed-off-by: Marek Szyprowski Acked-by: Chanwoo Choi Reviewed-by: Krzysztof Kozlowski Signed-off-by: Sylwester Nawrocki commit 1b3493d755c85b0fd206b7e5f04ce7050af90c41 Author: Marek Szyprowski Date: Thu Sep 6 17:55:25 2018 +0200 clk: samsung: s3c2412: Use generic helper for handling suspend/resume Replace common suspend/resume handling code by generic helper. Almost no functional change, the only difference is in handling of hypothetical memory allocation failure on boot. Signed-off-by: Marek Szyprowski Acked-by: Chanwoo Choi Reviewed-by: Krzysztof Kozlowski Signed-off-by: Sylwester Nawrocki commit 6bdac3b4c493f86554bc11013d47d31243022beb Author: Marek Szyprowski Date: Thu Sep 6 17:55:24 2018 +0200 clk: samsung: s3c2410: Use generic helper for handling suspend/resume Replace common suspend/resume handling code by generic helper. Almost no functional change, the only difference is in handling of hypothetical memory allocation failure on boot. Signed-off-by: Marek Szyprowski Acked-by: Chanwoo Choi Reviewed-by: Krzysztof Kozlowski Signed-off-by: Sylwester Nawrocki commit 53e6ab3d07506895a7eef217612bba921b8bf108 Author: Marek Szyprowski Date: Thu Sep 6 17:55:23 2018 +0200 clk: samsung: Remove excessive include Exynos Audio SubSystem and Exynos3250 clock drivers don't use any syscore function, so don't include linux/syscore_ops.h in their code. Signed-off-by: Marek Szyprowski Acked-by: Chanwoo Choi Reviewed-by: Krzysztof Kozlowski Signed-off-by: Sylwester Nawrocki commit 3e9efc3299dd78a0fa96515f0a453fab1ed4a1bd Author: Jae Hyun Yoo Date: Thu Aug 23 15:57:31 2018 -0700 i2c: aspeed: Handle master/slave combined irq events properly In most of cases, interrupt bits are set one by one but there are also a lot of other cases that Aspeed I2C IP sends multiple interrupt bits with combining master and slave events using a single interrupt call. It happens much more in multi-master environment than single-master. For an example, when master is waiting for a NORMAL_STOP interrupt in its MASTER_STOP state, SLAVE_MATCH and RX_DONE interrupts could come along with the NORMAL_STOP in case of an another master immediately sends data just after acquiring the bus. In this case, the NORMAL_STOP interrupt should be handled by master_irq and the SLAVE_MATCH and RX_DONE interrupts should be handled by slave_irq. This commit modifies irq hadling logic to handle the master/slave combined events properly. Signed-off-by: Jae Hyun Yoo Reviewed-by: Brendan Higgins Signed-off-by: Wolfram Sang commit fc66b39fe36acfd06f716e338de7cd8f9550fad2 Author: Jun Gao Date: Thu Sep 6 21:15:29 2018 +0800 i2c: mediatek: Use DMA safe buffers for i2c transactions DMA mode will always be used in i2c transactions, try to allocate a DMA safe buffer if the buf of struct i2c_msg used is not DMA safe. Signed-off-by: Jun Gao Signed-off-by: Wolfram Sang commit 9cbeeca05049b1109e7e445369898b8a88d5ea7b Author: Hans de Goede Date: Wed Sep 5 21:51:31 2018 +0200 i2c: designware: Remove Cherry Trail PMIC I2C bus pm_disabled workaround Commit a3d411fb38c0 ("i2c: designware: Disable pm for PMIC i2c-bus even if there is no _SEM method"), always set the pm_disabled flag on the I2C7 controller, even if its bus was not shared with the PUNIT. This was a workaround for various suspend/resume issues, after the following 2 commits this workaround is no longer necessary: Commit 541527728341 ("PM: i2c-designware-platdrv: Suspend/resume at the late/early stages") Commit e6ce0ce34f65 ("ACPI / LPSS: Add device link for CHT SD card dependency on I2C") Therefor this commit removes this workaround. After this commit the pm_disabled flag is only used to indicate that the bus is shared with the PUNIT and after other recent changes we no longer call dev_pm_syscore_device(dev, true), so we are no longer actually disabling (non-runtime) pm, so this commit also renames the flag to shared_with_punit to better reflect what it is for. Reviewed-by: Andy Shevchenko Acked-by: Jarkko Nikula Signed-off-by: Hans de Goede Signed-off-by: Wolfram Sang commit 23b4f8b184f5546180851259dea2a8e8ddc71ac3 Author: Linus Walleij Date: Wed Sep 5 11:18:28 2018 +0200 ARM: u300: Delete dummy SPI chip It's been told to me a few times that this kernel module should not exist, instead we should use the loopback test from userspace if need be. If a kernel module is required for testing SPI, it should be generic and put in drivers/spi/*. Delete this driver. Signed-off-by: Linus Walleij Signed-off-by: Olof Johansson commit e8d4ceeb34a58d47cc031ec023d61198ec8c4a80 Author: Chengguang Xu Date: Fri Aug 31 22:33:51 2018 +0800 jfs: cache NULL when both default_acl and acl are NULL default_acl and acl of newly created inode will be initiated as ACL_NOT_CACHED in vfs function inode_init_always() and later will be updated by calling xxx_init_acl() in specific filesystems. Howerver, when default_acl and acl are NULL then they keep the value of ACL_NOT_CACHED, this patch tries to cache NULL for acl/default_acl in this case. Signed-off-by: Chengguang Xu Signed-off-by: Dave Kleikamp commit 37f62c0d5822f631b786b29a1b1069ab714d1a28 Author: Erik Stromdahl Date: Tue Sep 4 15:07:07 2018 +0300 ath10k: wmi: disable softirq's while calling ieee80211_rx This is done in order not to trig the below warning in ieee80211_rx_napi: WARN_ON_ONCE(softirq_count() == 0); ieee80211_rx_napi requires that softirq's are disabled during execution. The High latency bus drivers (SDIO and USB) sometimes call the wmi ep_rx_complete callback from non softirq context, resulting in a trigger of the above warning. Calling ieee80211_rx_ni with softirq's already disabled (e.g., from softirq context) should be safe as the local_bh_disable and local_bh_enable functions (called from ieee80211_rx_ni) are fully reentrant. Signed-off-by: Erik Stromdahl Signed-off-by: Kalle Valo commit f88d493450403f5c5b7495232585e54cc4f89ccd Author: Erik Stromdahl Date: Tue Sep 4 15:06:58 2018 +0300 ath10k: htt: High latency RX support Special HTT RX handling for high latency interfaces. Since no DMA physical addresses are used in the RX ring config message (this is not supported by the high latency devices), no RX ring is allocated. All RX skb's are allocated by the driver and passed directly to mac80211 in the HTT RX indication handler. A nice side effect of this is that no huge buffer will be allocated with dma_alloc_coherent. On embedded systems with limited memory resources, the allocation of the RX ring is prone to fail. Some tweaks made to "make it work": Removal of protected bit in 802.11 header frame control field. The chipset seems to do hw decryption but the frame_control protected bit is still set. This is necessary for mac80211 not to drop the frame. Signed-off-by: Erik Stromdahl Signed-off-by: Kalle Valo commit a2097d6444c3c38e58b9570b5ef70345a58b7c4f Author: Erik Stromdahl Date: Tue Sep 4 15:06:38 2018 +0300 ath10k: htt: High latency TX support Add HTT TX function for HL interfaces. Intended for SDIO and USB. Signed-off-by: Erik Stromdahl Signed-off-by: Kalle Valo commit 4daacc950d4d005929a5c73ecbb8d97b930a8ed9 Author: Erik Stromdahl Date: Tue Sep 4 15:06:13 2018 +0300 ath10k: htt: RX ring config HL support Special HTT RX ring config message used by high latency devices. The main difference between HL and LL is that HL devices do not use shared memory between device and host and thus, no host paddr's are added to the RX config message. Signed-off-by: Erik Stromdahl Signed-off-by: Kalle Valo commit d4e7f553eec3b66232e78ba6a2dfe5e2d3eb8fa0 Author: Erik Stromdahl Date: Tue Sep 4 15:05:57 2018 +0300 ath10k: add HTT RX HL ops Initial (empty) HTT RX ops for high latency devices. Signed-off-by: Erik Stromdahl Signed-off-by: Kalle Valo commit 852d1bf86a5bbde228e2b760c9a097d454c7508f Author: Erik Stromdahl Date: Tue Sep 4 15:05:43 2018 +0300 ath10k: add HTT TX HL ops Initial HTT TX ops for high latency devices. Signed-off-by: Erik Stromdahl Signed-off-by: Kalle Valo commit e66d5361127a485e5d136c870e4019a95907bd7c Author: Erik Stromdahl Date: Tue Sep 4 15:05:23 2018 +0300 ath10k: DMA related fixes for high latency devices Several DMA related functions (such as the dma_map_xxx functions) are not used with high latency devices and don't need to be invoked in this case. Signed-off-by: Erik Stromdahl Signed-off-by: Kalle Valo commit 4875e0b5208555a9cc2c45558f016e0814cbd6cb Author: Erik Stromdahl Date: Tue Sep 4 15:05:04 2018 +0300 ath10k: add per target config of max_num_peers This patch makes sure the value of max_num_peers matches num_peers in hw_params (if set to a non zero value). hw_params->num_peers is used in the TLV WMI init command. If ar->max_num_peers is not set to the same value, there is a risk that the user creates more peers than the maximum number of peers supported by the device. Signed-off-by: Erik Stromdahl Signed-off-by: Kalle Valo commit 9faaa14387fbb13cf1a314025a047cc3bc27dbef Author: Erik Stromdahl Date: Tue Sep 4 15:04:26 2018 +0300 ath10k: use hw_params.num_peers for num_tids in TLV init As TARGET_TLV_NUM_TIDS is calculated like this: #define TARGET_TLV_NUM_TIDS ((TARGET_TLV_NUM_PEERS) * 2) ... it is better to use the per device hw_params.num_peers value in the TLV init message (if set), rather than using a hard coded value. This makes the value used in the TLV init message match the hw_param value. Signed-off-by: Erik Stromdahl Signed-off-by: Kalle Valo commit 367c899f622c1bf3443e56011561542d2eb5a917 Author: Erik Stromdahl Date: Tue Sep 4 15:04:07 2018 +0300 ath10k: add bus type check in ath10k_init_hw_params The bus type is used together with the other hw parameters to find a matching entry in ath10k_hw_params_list for the device. This is necessary since HL devices can have the same dev_id and target_version as a corresponding LL device (same chipset) and yet use a totally different configuration. Signed-off-by: Erik Stromdahl Signed-off-by: Kalle Valo commit 7c2dd6154fc22e2aec1fcb384beb0a6372f2b439 Author: Erik Stromdahl Date: Tue Sep 4 15:03:44 2018 +0300 ath10k: add device type enum to ath10k_bus_params Add dev_type parameter to struct ath10k_bus_params. The dev type specifies if the device is a high latency device (usb and sdio) or low latency device (pci, ahb and snoc) The setup of high latency chips is sometimes different than for chips using low latency interfaces. Signed-off-by: Erik Stromdahl Signed-off-by: Kalle Valo commit c0d8d565787c5d8f7d4b0ae319dc1d44d69a51d9 Author: Erik Stromdahl Date: Tue Sep 4 15:03:19 2018 +0300 ath10k: add struct ath10k_bus_params This struct is used as argument to ath10k_core_register in order to make it easier to add more bus parameters in the future. Signed-off-by: Erik Stromdahl Signed-off-by: Kalle Valo commit 39501ea64116c665e9de7cf6cce91a1defcdbae8 Author: Carl Huang Date: Tue Sep 4 13:00:51 2018 +0300 ath10k: download firmware via diag Copy Engine for QCA6174 and QCA9377. Downloading firmware via BMI protocol takes too long time. For example, a ~700K bytes firmware takes about 500ms to download via BMI protocol. This is too long especially in suspend and resume scenario where firmware is re-downloaded unless WoWLAN is enabled. Downloading firmware via diag CE can reduce the time to ~40ms for a ~700K bytes firmware binary. Ath10k driver parses the firmware to segments and downloads the segments to the specified address directly. If the firmware is compressed or has unsupported segments, ath10k driver will try BMI download again. It's tested with QCA6174 hw3.2 and firmware-6.bin_WLAN.RM.4.4.1-00111-QCARMSWP-1. QCA9377 is also affected. Signed-off-by: Carl Huang Signed-off-by: Kalle Valo commit bc346c9a24a41fba93f8f5c4cd3de2c64fd02cfd Author: Carl Huang Date: Tue Sep 4 13:00:39 2018 +0300 ath10k: support to access target space below 1M for qca6174 and qca9377 To download firmware via diag interface, driver needs to write the target memory space below 1M. It means the bit20 should be zero for the converted address if the target memory space is below 1M. Otherwise, bit20 is one if the target address is larger or equal to 1M space. As downloading firmware via diag interface is only required for qca6174 and qca9377, a new specific function is introduced to convert the target address to ce address: ath10k_pci_qca6174_targ_cpu_to_ce_addri(). This function supports to convert any target address to ce address. It's tested with QCA6174 hw3.2 and firmware-6.bin_WLAN.RM.4.4.1-00111-QCARMSWP-1. QCA9377 is also affected. Signed-off-by: Carl Huang Signed-off-by: Kalle Valo commit d56bbeea25d181760ed4aeb5002df0f1e07f0420 Author: Carl Huang Date: Tue Sep 4 13:00:25 2018 +0300 ath10k: optimize pci diag mem read & write operations Delay 1ms is too long for both diag read and write operations. This is observed when writing a big memory buffer to target or reading a big memory buffer from target. Take writing/reading 512k bytes as example, the delay itself is 256ms as the maximum length of every write/read is 2k size. Reduce the delay to 50us for read and write operations. Take the ath10k_pci_targ_cpu_to_ce_addr() out of loop and put it in the beginning of the loop for ath10k_pci_diag_read_mem(). The ath10k_pci_targ_cpu_to_ce_addr() is to convert the address from target cpu's perspective to CE's perspective, so it makes no sense to convert a CE's perspective address again in the loop. It's a wrong implementation but happens to work. If the target address is below 1M space, then the convert in the loop from the second time becomes wrong because the previously converted address is larger than 1M. The counterpart ath10k_pci_diag_write_mem() has the correct implementation. With this change, ath10k_pci_diage_read_mem() works correctly no matter the target address is below 1M or above 1M. It's tested with QCA6174 hw3.2 and firmware-6.bin_WLAN.RM.4.4.1-00111-QCARMSWP-1. QCA9377 is also affected. Signed-off-by: Carl Huang Signed-off-by: Kalle Valo commit ef2ecab9af5feae97c47b7f61cdd96f7f49b2c23 Author: Marek Szyprowski Date: Thu Sep 6 17:41:35 2018 +0200 ARM: dts: exynos: Disable pull control for S5M8767 PMIC S5M8767 PMIC interrupt line on Exynos5250-based Arndale board has external pull-up resistors, so disable any pull control for it in in controller node. This fixes support for S5M8767 interrupts and enables operation of wakeup from S5M8767 RTC alarm. Signed-off-by: Marek Szyprowski Signed-off-by: Krzysztof Kozlowski commit b803211825d897b8345ccc5de38a69dd3386594a Author: Krzysztof Kozlowski Date: Wed Sep 5 19:40:24 2018 +0200 ARM: dts: exynos: Remove double SD card detect pin inversion The SDHCI standard, MMC host controller bindings and MMC core defines card detect pin as active low. Therefore there is no point to invert it twice. Signed-off-by: Krzysztof Kozlowski Tested-by: Marek Szyprowski commit c58ce8e66d892b4131672bd875fe4eb0ed44c6a1 Author: Marek Szyprowski Date: Wed Sep 5 16:44:43 2018 +0200 ARM: dts: exynos: Add missing PMIC interrupts on UniversalC210 board PMIC node requires external interrupts for proper operation. Lack of them was probably caused by a limited support for interrupts from more than one parent, which was not possible to define when support for this board was added. Fix this by adding 'interrupt-extended' property and properly define both interrupt lines for PMIC node. Signed-off-by: Marek Szyprowski Signed-off-by: Krzysztof Kozlowski commit c7fd8d237e2e7dff7642b94b32e09c273989ea21 Author: Balaji Pothunoori Date: Tue Sep 4 12:52:18 2018 +0300 ath10k: average ack rssi support for data frames Average ack rssi value is weighted average of ack rssi for no of msdu's has been sent. This feature is enabled by the host driver if firmware is capable. After receiving event from host, firmware allocates the necessary memory to store the ack_rssi for data packets during the init time. After each successful transmission, If tx completion status is OK and 24th bit is set in HTT message header then host will fetch the ack_rssi else host can ignore the ack_rssi field. Signed-off-by: Balaji Pothunoori Signed-off-by: Kalle Valo commit f5e758b8358f6c27e8a351ddf0b441a64cdabb94 Author: Marek Szyprowski Date: Wed Sep 5 12:02:15 2018 +0200 ARM: dts: exynos: Disable pull control for MAX8997 interrupts on Origen PMIC_IRQB and PMIC_KEYINB lines on Exynos4210-based Origen board have external pull-up resistors, so disable any pull control for those lines in respective pin controller node. This fixes support for MAX8997 interrupts and enables operation of wakeup from MAX8997 RTC alarm. Signed-off-by: Marek Szyprowski Fixes: 17419726aaa1 ("ARM: dts: add max8997 device node for exynos4210-origen board") Cc: Signed-off-by: Krzysztof Kozlowski commit 97c69a70dc2cecb2c3b96a66529e0082dabc2d2c Author: K.T.VIJAYAKUMAAR Date: Mon Sep 3 20:07:44 2018 +0300 ath10k: avoid possible memory access violation array "ctl_power_table" access index "pream" is initialized with -1 and is raised as a static analysis tool issue. [drivers\net\wireless\ath\ath10k\wmi.c:4719] -> [drivers\net\wireless\ath\ath10k\wmi.c:4730]: (error) Array index -1 is out of bounds. Since the "pream" index for accessing ctl_power_table array is initialized with -1, there is a chance of memory access violation for the cases below. 1) wmi_pdev_tpc_final_table_event change frequency is between 2483 and 5180 2) pream_idx is out of the enumeration ranges of wmi_tpc_pream_2ghz, wmi_tpc_pream_5ghz Signed-off-by: K.T.VIJAYAKUMAAR [kvalo@codeaurora.org: clean up the warning message] Signed-off-by: Kalle Valo commit 85dd28eb9917fb22095aab0cf22eaa351bb3e24d Author: Anilkumar Kolli Date: Tue Sep 4 12:15:16 2018 +0530 ath10k: add debugfs support to dump per sta tx stats This patch adds 'tx_stats' in per station debugfs entry. Use this command to dump tx_stats: cat /sys/kernel/debug/ieee80211/phy0/netdev\:wlan0/ stations//tx_stats Signed-off-by: Anilkumar Kolli Signed-off-by: Kalle Valo commit a904417fc8761b78d46342d13a6fd08f4beb7075 Author: Anilkumar Kolli Date: Tue Sep 4 12:15:15 2018 +0530 ath10k: add extended per sta tx statistics support This patch adds per station tx statistics support. Per station tx stats include - pkts/bytes transmitted at all possible rates(mcs/nss/bw/gi). - ACK fails count - ampdu bytes/pkts transmitted at all possible rates(mcs/nss/bw/gi). - BA fails count Tested on QCA9984/QCA4019/QCA988x Firmware: 10.4-3.5.3-00057 10.2.4-1.0-00037 Signed-off-by: Anilkumar Kolli Signed-off-by: Kalle Valo commit 348cd95c8196818613980983b277faae8a3d1fd5 Author: Anilkumar Kolli Date: Tue Sep 4 12:15:14 2018 +0530 ath10k: add debugfs entry to enable extended tx stats This patch adds debugfs entry to enable/disable extended tx statistics. Extended tx statistics are from peer stats feature. Signed-off-by: Anilkumar Kolli Signed-off-by: Kalle Valo commit 0189dbd71cbd18386c7395e41c5816ae541f3e8a Author: Anilkumar Kolli Date: Tue Sep 4 12:15:13 2018 +0530 ath10k: get the legacy rate index to update the txrate table Get the legacy rate index to update the pkts/bytes counter against each possible tx rate. Signed-off-by: Anilkumar Kolli Signed-off-by: Kalle Valo commit 49925f24701600433d0342135e9963818c6b0238 Author: Gustavo A. R. Silva Date: Wed Aug 29 12:50:18 2018 -0500 wil6210: fix unsigned cid comparison with >= 0 The comparison of cid >= 0 is always true because cid is of type u8 (8 bits, unsigned). Fix this by removing such comparison and updating the type of variable cid to u8 in the caller function. Addresses-Coverity-ID: 1473079 ("Unsigned compared against 0") Fixes: b9010f105f21 ("wil6210: add FT roam support for AP and station") Signed-off-by: Gustavo A. R. Silva Signed-off-by: Kalle Valo commit 713358c321f4f8553afe956c0d5e9a87b43d561e Author: Govind Singh Date: Mon Sep 3 20:08:01 2018 +0300 ath10k: enable pktlog for WCN3990 target WCN3990 target uses separate htc service for pktlog. Add pktlog service request and support for pktlog rx path handling. Testing: Tested on WCN3990 and QCA6174 HW. Tested FW: WLAN.HL.2.0-01192-QCAHLSWMTPLZ-1, WLAN.RM.4.4.1-00109-QCARMSWPZ-1 Signed-off-by: Govind Singh Signed-off-by: Kalle Valo commit 9abcb9371bccc8aed6fea273058c322f4a886a2d Author: Govind Singh Date: Mon Sep 3 20:07:58 2018 +0300 ath10k: introduce CE_ATTR_POLL attribute for polling pipe Existing copy engine interrupt enable logic assumes that last CE is using polling mode and due to this interrupt for last copy engine are always disabled. WCN3990 uses last CE for pktlog and interrupt remains disabled with existing logic. To mitigate this issue, introduce CE_ATTR_POLL flag and control the interrupt based on the flag which can be set in ce_attr. Testing: Tested on WCN3990 and QCA6174 HW. Tested FW: WLAN.HL.2.0-01192-QCAHLSWMTPLZ-1, WLAN.RM.4.4.1-00109-QCARMSWPZ-1 Signed-off-by: Govind Singh Signed-off-by: Kalle Valo commit 31324d17976ed063839db5de3ce0b37a48dd0439 Author: Sathishkumar Muruganandam Date: Mon Sep 3 20:07:53 2018 +0300 ath10k: support extended board data download for dual-band QCA9984 To support dual-band variant of QCA9984, new extended board data (eBDF) is introduced since existing board data ran out of space. Below is the brief implementation & design detail, ---------------------------------------------------- 1. New OTP changes to inform eBDF support in existing OTP download to fetch board ID and chip ID. This is backward compatible and older card sends 0 by default for eBDF support bit (bit 18 of OTP response) we check in ath10k driver. 2. If eBDF is supported, then we need to fetch eBDF ID which is bundled in downloaded board data. So again OTP is executed for knowing the eBDF ID. This is done once we set 'board_data_initialized' bit. If eBDF ID returned is zero, we continue booting with previous board data downloaded. 3. Based on the eBDF ID fetched, ath10k driver tries to download the extended board data to a new offset ahead of already downloaded board data address. 4. A new BD IE type, ATH10K_BD_IE_BOARD_EXT is added to differentiate in bundling eBDF separately in board-2.bin and also to parse through board bundle for eBDF download in ath10k boot. 5. If eBDF is not present in the board-2.bin bundle or when board ID is zero, we do a fallback boot to "eboard.bin" in the same QCA9984/hw1.0 dir. This is same as done to existing "board.bin" if board ID is not present in board-2.bin bundle. Current design is that eBDF size will be 2KB and eBDF ID will be byte value. Tested the above changes with dual-band variant of QCA9984 card. OTP update needed for the test will be part of next FW release 10.4-3.6-xxxx. Below are the logs with ath10k BOOT debugs enabled. First OTP response : --------------------- .. boot upload otp to 0x1234 len 9478 for board id boot get otp board id result 0x00040400 board_id 1 chip_id 0 ext_bid_support 1 .. Second OTP response : --------------------- .. boot upload otp to 0x1234 len 9478 for ext board id boot get otp ext board id result 0x00000005 ext_board_id 5 boot using eboard name 'bus=pci,bmi-chip-id=0,bmi-eboard-id=5' .. Extended board data download: ------------------------------ .. board name 00000000: 62 75 73 3d 70 63 69 2c 62 6d 69 2d 63 68 69 70 bus=pci,bmi-chip 00000010: 2d 69 64 3d 30 2c 62 6d 69 2d 65 62 6f 61 72 64 -id=0,bmi-eboard 00000020: 2d 69 64 3d 35 -id=5 boot found match for name 'bus=pci,bmi-chip-id=0,bmi-eboard-id=5' boot found eboard data for 'bus=pci,bmi-chip-id=0,bmi-eboard-id=5' using board api 2 boot writing ext board data to addr 0xc3000 .. Fallback Extended board data download from "eboard.bin": --------------------------------------------------------- .. board name 00000000: 62 75 73 3d 70 63 69 2c 62 6d 69 2d 63 68 69 70 bus=pci,bmi-chip 00000010: 2d 69 64 3d 30 2c 62 6d 69 2d 62 6f 61 72 64 2d -id=0,bmi-board- 00000020: 69 64 3d 31 30 id=10 failed to fetch board data for bus=pci,bmi-chip-id=0,bmi-eboard-id=5 from ath10k/QCA9984/hw1.0/board-2.bin boot fw request 'ath10k/QCA9984/hw1.0/eboard.bin': 0 using board api 1 boot writing ext board data to addr 0xc3000 .. Signed-off-by: Sathishkumar Muruganandam Signed-off-by: Kalle Valo commit 5849ed48d226523fd53863104d6aff5052674c1b Author: Sathishkumar Muruganandam Date: Mon Sep 3 20:07:50 2018 +0300 ath10k: refactoring needed for extended board data download Just moving functions down in the file, no functional changes. Signed-off-by: Sathishkumar Muruganandam Signed-off-by: Kalle Valo commit 2f4830ef96d21e144b742c394eb12888b0e233cc Author: Takashi Sakamoto Date: Tue Sep 4 17:02:25 2018 -0700 FireWire: add driver-api Introduction section Replace the Introduction section's TBD with some useful overview text. Signed-off-by: Takashi Sakamoto Acked-by: Randy Dunlap Tested-by: Randy Dunlap Signed-off-by: Randy Dunlap Cc: Stefan Richter Cc: Takashi Sakamoto Cc: linux-doc@vger.kernel.org Cc: linux-scsi@vger.kernel.org Cc: Randy Dunlap Cc: Andrew Morton Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: Jonathan Corbet Signed-off-by: Jonathan Corbet commit ea2ae0ecc9ad8c47ca25837823cc25679a1e4d1a Author: Randy Dunlap Date: Tue Sep 4 17:02:24 2018 -0700 FireWire: add a Documentation driver-api chapter Add a basic Firewire/IEEE 1394 driver API chapter to the Linux kernel documentation. Signed-off-by: Randy Dunlap Cc: Stefan Richter Cc: Takashi Sakamoto Cc: linux-doc@vger.kernel.org Cc: linux-scsi@vger.kernel.org Cc: Randy Dunlap Cc: Andrew Morton Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: Jonathan Corbet Signed-off-by: Jonathan Corbet commit 226b18ad5589550e989afce6b293580abc880a79 Author: Randy Dunlap Date: Tue Sep 4 17:02:23 2018 -0700 FireWire: clean up core-transaction.c kernel-doc Clean up kernel-doc warnings in so that it can be added to a Firewire/IEEE 1394 driver-api chapter without adding lots of noisy warnings to the documentation build. Signed-off-by: Randy Dunlap Cc: Stefan Richter Cc: Takashi Sakamoto Cc: linux-doc@vger.kernel.org Cc: linux-scsi@vger.kernel.org Cc: Randy Dunlap Cc: Andrew Morton Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: Jonathan Corbet Signed-off-by: Jonathan Corbet commit 48f02b88c82b5aaf51adbce0932e47a3044e35d4 Author: Randy Dunlap Date: Tue Sep 4 17:02:22 2018 -0700 FireWire: clean up core-iso.c kernel-doc Clean up kernel-doc warnings in so that it can be added to a Firewire/IEEE 1394 driver-api chapter without adding lots of noisy warnings to the documentation build. Signed-off-by: Randy Dunlap Cc: Stefan Richter Cc: Takashi Sakamoto Cc: linux-doc@vger.kernel.org Cc: linux-scsi@vger.kernel.org Cc: Randy Dunlap Cc: Andrew Morton Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: Jonathan Corbet Signed-off-by: Jonathan Corbet commit 9a40068220cb6ef15785a82155f38298d5ee9d35 Author: Randy Dunlap Date: Tue Sep 4 17:02:21 2018 -0700 FireWire: clean up firewire-cdev.h kernel-doc Clean up kernel-doc warnings in so that it can be added to a Firewire/IEEE 1394 driver-api chapter without adding lots of noisy warnings to the documentation build. Signed-off-by: Randy Dunlap Cc: Stefan Richter Cc: Takashi Sakamoto Cc: linux-doc@vger.kernel.org Cc: linux-scsi@vger.kernel.org Cc: Randy Dunlap Cc: Andrew Morton Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: Jonathan Corbet Signed-off-by: Jonathan Corbet commit 2002bc328ca3e23b7b31849d823b67d4d7c1fd41 Merge: a3f723079df8 0e01491de646 Author: David S. Miller Date: Thu Sep 6 07:48:34 2018 -0700 Merge branch 'dsa-b53-SerDes-support' Florian Fainelli says: ==================== net: dsa: b53: SerDes support This patch series adds support for the SerDes found on NorthStar Plus (NSP) which allows us to use the SFP port on the BCM958625HR board (and other similar designs). Changes in v3: - properly hunk the request_threaded_irq() bits into patch #2 Changes in v2: - migrate to threaded interrupt (Andrew) - fixed a case where MLO_AN_FIXED's mac_config would still call into the serdes_config callback - added an additional check on the phylink interface in mac_config - default to ARCH_BCM_NSP instead of ARCH_BCM_IPROC which is really the NSP Kconfig bit we want ==================== Signed-off-by: David S. Miller commit 0e01491de646000567bc202cc70026dc4b7f7d7a Author: Florian Fainelli Date: Wed Sep 5 12:42:15 2018 -0700 net: dsa: b53: Add SerDes support Add support for the Northstar Plus SerDes which is accessed through a special page of the switch. Since this is something that most people probably will not want to use, make it a configurable option with a default on ARCH_BCM_NSP where it is the most useful currently. The SerDes supports both SGMII and 1000baseX modes for both lanes, and 2500baseX for one of the lanes, and is internally looking like a seemingly standard MII PHY, except for the few bits that got repurposed. Signed-off-by: Florian Fainelli Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit a8e8b98531369c9d9f21a81587b630935c64cb59 Author: Florian Fainelli Date: Wed Sep 5 12:42:14 2018 -0700 net: dsa: b53: Add PHYLINK support Add support for PHYLINK, things are reasonably straight forward since we do not yet support SerDes interfaces, that leaves us with just MLO_AN_PHY and MLO_AN_FIXED to deal with. Signed-off-by: Florian Fainelli Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 5e004460f874fa590e622b200859e419f5127f5c Author: Florian Fainelli Date: Wed Sep 5 12:42:13 2018 -0700 net: dsa: b53: Add helper to set link parameters Extract the logic from b53_adjust_link() responsible for overriding a given port's link, speed, duplex and pause settings and make two helper functions to set the port's configuration and the port's link settings. We will make use of both, as separate functions while adding PHYLINK support next. Signed-off-by: Florian Fainelli Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 16994374a6fc6a620aae199243c34ccb9efa0ac7 Author: Florian Fainelli Date: Wed Sep 5 12:42:12 2018 -0700 net: dsa: b53: Make SRAB driver manage port interrupts Update the SRAB driver to manage per-port interrupts. Since we cannot sleep during b53_io_ops, schedule a workqueue whenever we get a port specific interrupt. We will later make use of this to call back into PHYLINK when there is e.g: a link state change. Signed-off-by: Florian Fainelli Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 8ca7c1608c34aeaed2411af60b3531b2ddf85cc3 Author: Florian Fainelli Date: Wed Sep 5 12:42:11 2018 -0700 net: dsa: b53: Add ability to enable/disable port interrupts Some switches expose individual interrupt line(s) for port specific event(s), allow configuring these interrupts at an appropriate time during port_enable/disable callbacks where all port specific resources are known to be set-up and ready for use. Signed-off-by: Florian Fainelli Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit a3f723079df85eafc10c628dabdfcf374b8e1523 Author: Denis Bolotin Date: Wed Sep 5 18:35:55 2018 +0300 qed*: Utilize FW 8.37.7.0 This patch adds a new qed firmware with fixes and support for new features. Fixes: - Fix a rare case of device crash with iWARP, iSCSI or FCoE offload. - Fix GRE tunneled traffic when iWARP offload is enabled. - Fix RoCE failure in ib_send_bw when using inline data. - Fix latency optimization flow for inline WQEs. - BigBear 100G fix RDMA: - Reduce task context size. - Application page sizes above 2GB support. - Performance improvements. ETH: - Tenant DCB support. - Replace RSS indirection table update interface. Misc: - Debug Tools changes. Signed-off-by: Denis Bolotin Signed-off-by: Ariel Elior Signed-off-by: David S. Miller commit a28957b8f10be714f076fb3981a3b1a0318c48c2 Author: Joonas Lahtinen Date: Thu Sep 6 16:54:43 2018 +0300 drm/i915: Update DRIVER_DATE to 20180906 Signed-off-by: Joonas Lahtinen commit 5781cf82553ce1c91aa2173f9def10680275cddb Merge: d4da8a4d4004 69ca5af4ff9a Author: Joonas Lahtinen Date: Thu Sep 6 16:51:50 2018 +0300 Merge tag 'gvt-next-2018-09-04' of https://github.com/intel/gvt-linux into drm-intel-next-queued gvt-next-2018-09-04 - guest context shadow optimization for restore inhibit one (Yan) - cmd parser optimization (Yan) - W=1 warning fixes (Zhenyu) Signed-off-by: Joonas Lahtinen # Conflicts: # drivers/gpu/drm/i915/gvt/reg.h From: Zhenyu Wang Link: https://patchwork.freedesktop.org/patch/msgid/20180904030154.GG20737@zhen-hp.sh.intel.com commit d4da8a4d4004e61bd23494e23e22ddbc98571546 Author: Joonas Lahtinen Date: Thu Sep 6 16:45:54 2018 +0300 drm/i915: Update DRIVER_DATE to 20180906 Signed-off-by: Joonas Lahtinen commit e058a4033240d30192124d6bf32b78e9a1f8975c Author: Hiroyuki Yokoyama Date: Thu Sep 6 22:28:33 2018 +0900 ASoC: rsnd: Add device tree binding for r8a77990 This patch adds the device tree binding of the r8a77990 SoC. Signed-off-by: Hiroyuki Yokoyama Signed-off-by: Yoshihiro Kaneko Signed-off-by: Mark Brown commit bda58ee8f8e4c2b6d9949755aa06cc1a8538c069 Merge: 60c1f89241d4 1632936480a5 Author: Thomas Gleixner Date: Thu Sep 6 14:56:44 2018 +0200 Merge tag 'perf-core-for-mingo-4.20-20180905' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core Pull perf/core improvements and fixes from Arnaldo: perf trace: - Augment the payload of syscall entry/exit tracepoints with the contents of pointer arguments, such as the "filename" argument to the "open" syscall or the 'struct sockaddr *' argument to the 'connect' syscall. This is done using a BPF program that gets compiled and attached to various syscalls:sys_enter_NAME tracepoints, copying via a BPF map and "bpf-output" perf event the raw_syscalls:sys_enter tracepoint payload + the contents of pointer arguments using the "probe_read", "probe_read_str" and "perf_event_output" BPF functions. The 'perf trace' codebase now just processes these augmented tracepoints using the existing beautifiers that now check if there is more in the perf_sample->raw_data than what is expected for a normal syscall enter tracepoint (the common preamble, syscall id, up to six parameters), using that with hand crafted struct beautifiers. This is just to show how to augment the existing tracepoints, work will be done to use DWARF or BTF info to do the pretty-printing and to create the collectors. For now this is done using an example restricted C BPF program, but the end goal is to have this all autogenerated and done transparently. Its still useful to have this example as one can use it as an skeleton and write more involved filters, see the etcsnoop.c BPF example, for instance. E.g.: # cd tools/perf/examples/bpf/ # perf trace -e augmented_syscalls.c ping -c 1 ::1 0.000 ( 0.008 ms): openat(dfd: CWD, filename: /etc/ld.so.cache, flags: CLOEXEC) = 3 0.020 ( 0.004 ms): openat(dfd: CWD, filename: /lib64/libcap.so.2, flags: CLOEXEC) = 3 0.051 ( 0.004 ms): openat(dfd: CWD, filename: /lib64/libidn.so.11, flags: CLOEXEC) = 3 0.076 ( 0.003 ms): openat(dfd: CWD, filename: /lib64/libcrypto.so.1.1, flags: CLOEXEC) = 3 0.106 ( 0.003 ms): openat(dfd: CWD, filename: /lib64/libresolv.so.2, flags: CLOEXEC) = 3 0.136 ( 0.004 ms): openat(dfd: CWD, filename: /lib64/libm.so.6, flags: CLOEXEC) = 3 0.194 ( 0.004 ms): openat(dfd: CWD, filename: /lib64/libc.so.6, flags: CLOEXEC) = 3 0.224 ( 0.003 ms): openat(dfd: CWD, filename: /lib64/libz.so.1, flags: CLOEXEC) = 3 0.252 ( 0.004 ms): openat(dfd: CWD, filename: /lib64/libdl.so.2, flags: CLOEXEC) = 3 0.275 ( 0.003 ms): openat(dfd: CWD, filename: /lib64/libpthread.so.0, flags: CLOEXEC) = 3 0.730 ( 0.007 ms): open(filename: /usr/lib/locale/locale-archive, flags: CLOEXEC) = 3 PING ::1(::1) 56 data bytes 0.834 ( 0.008 ms): connect(fd: 5, uservaddr: { .family: INET6, port: 1025, addr: ::1 }, addrlen: 28) = 0 64 bytes from ::1: icmp_seq=1 ttl=64 time=0.032 ms --- ::1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.032/0.032/0.032/0.000 ms 0.914 ( 0.036 ms): sendto(fd: 4, buff: 0x55b5e52e9720, len: 64, addr: { .family: INET6, port: 58, addr: ::1 }, addr_len: 28) = 64 # Use 'perf trace -e augmented_syscalls.c,close ping -c 1 ::1' to see the 'close' calls as well, as it is not one of the syscalls augmented in that .c file. (Arnaldo Carvalho de Melo) - Alias 'umount' to 'umount2' (Benjamin Peterson) perf stat: (Jiri Olsa) - Make many builtin-stat.c functions generic, moving display functions to a separate file, prep work for adding the ability to store/display stat data in perf record/top. perf annotate: (Kim Phillips) - Handle arm64 move instructions perf report: (Thomas Richter): - Create auxiliary trace data files for s390 libtraceevent: (Tzvetomir Stoyanov (VMware)): - Split trace-seq related APIs in a separate header file. Signed-off-by: Arnaldo Carvalho de Melo commit b7a5eb6aafa95fce45fc4dcbc195cb232fa1b76d Author: Juergen Gross Date: Wed Sep 5 07:37:20 2018 +0200 x86/paravirt: Prevent redefinition of SAVE_FLAGS macro The PARAVIRT_XXL changes introduced a redefinition of SAVE_FLAGS under certain configurations. Cure it Fixes: 6da63eb241a0 ("x86/paravirt: Move the pv_irq_ops under the PARAVIRT_XXL umbrella"). Signed-off-by: Juergen Gross Signed-off-by: Thomas Gleixner Cc: hpa@zytor.com Link: https://lkml.kernel.org/r/20180905053720.13710-1-jgross@suse.com commit 4f2d7af70256b258a6a5729a1d33d5ecb2330f8f Author: Juergen Gross Date: Wed Sep 5 07:36:34 2018 +0200 x86/xen: Make xen_reservation_lock static No users outside of that file. Fixes: f030aade9165 ("x86/xen: Move pv specific parts of arch/x86/xen/mmu.c to mmu_pv.c") Signed-off-by: Juergen Gross Signed-off-by: Thomas Gleixner Cc: xen-devel@lists.xenproject.org Cc: boris.ostrovsky@oracle.com Cc: hpa@zytor.com Link: https://lkml.kernel.org/r/20180905053634.13648-1-jgross@suse.com commit 01a84c11a5e6a4f78834c66c7eb84bcdfea6eafc Author: Joonas Lahtinen Date: Thu Sep 6 15:14:18 2018 +0300 drm/i915: Update DRIVER_DATE to 20180906 Signed-off-by: Joonas Lahtinen commit af060b3f72b801962033f75a2fda25fff992796d Author: Simon Goldschmidt Date: Tue Sep 4 21:49:44 2018 +0200 spi: dw: support 4-16 bits per word The spi-dw driver currently only supports 8 or 16 bits per word. Since the hardware supports 4-16 bits per word, adapt the driver to also support this. Tested on socfpga cyclone5 with a 9-bit SPI display. Signed-off-by: Simon Goldschmidt Reviewed-by: Andy Shevchenko Signed-off-by: Mark Brown commit 9ab708aef61f5620113269a9d1bdb1543d1207d0 Author: Colin Ian King Date: Thu Sep 6 11:41:52 2018 +0100 ASoC: sgtl5000: avoid division by zero if lo_vag is zero In the case where lo_vag <= SGTL5000_LINE_OUT_GND_BASE, lo_vag is set to zero and later vol_quot is computed by dividing by lo_vag causing a division by zero error. Fix this by avoiding a zero division and set vol_quot to zero in this specific case so that the lowest setting for i is correctly set. Signed-off-by: Colin Ian King Signed-off-by: Mark Brown commit 48c29d0d27fbbb4c78d3c14c50067d7e8919ed95 Author: YueHaibing Date: Thu Sep 6 01:38:45 2018 +0000 spi: spi-gpio: Remove set but not used variable 'pdata' Fixes gcc '-Wunused-but-set-variable' warning: drivers/spi/spi-gpio.c: In function 'spi_gpio_remove': drivers/spi/spi-gpio.c:450:33: warning: variable 'pdata' set but not used [-Wunused-but-set-variable] Signed-off-by: YueHaibing Signed-off-by: Mark Brown commit dabdbe3ae0cb9a67872fa4ac80ffdef61391f645 Author: Kuninori Morimoto Date: Thu Sep 6 03:22:01 2018 +0000 ASoC: rsnd: don't use %p for dev_dbg() rsnd driver sometimes want to know which address is used when debugging. But it will indicate "(____ptrval____)" if it used "%p" on dev_dbg(). Let's use "%pa" or "%px" for it. Signed-off-by: Kuninori Morimoto Tested-by: Hiroyuki Yokoyama Signed-off-by: Mark Brown commit 501683d0cd54714de78501efe945bbe4356b922b Author: Kuninori Morimoto Date: Thu Sep 6 03:21:16 2018 +0000 ASoC: rsnd: gen: use tab instead of white-space commit 8c9d75033340 ("ASoC: rsnd: ssiu: Support BUSIF other than BUSIF0") added new SSIU registers. But it is using white-space for it. This patch fixup it to use tab. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit c24fb71fa4f764f02c17cbf88a969f109794e602 Author: Colin Ian King Date: Thu Sep 6 10:39:01 2018 +0100 ASoC: hdac_hdmi: remove redundant check for !port condition The !port check is redundant as it being performed in the following check. Remove it. Signed-off-by: Colin Ian King Signed-off-by: Mark Brown commit 1926bd6bf20fe306797fbf366902674d2d6c20cc Author: Geert Uytterhoeven Date: Tue Aug 28 17:12:31 2018 +0200 ARM: dts: r9a06g032: Use r9a06g032-sysctrl binding definitions Replace the hardcoded clock indices by R9A06G032_CLK_* symbols. Signed-off-by: Geert Uytterhoeven Reviewed-by: Phil Edworthy Signed-off-by: Simon Horman commit c1801ad028456267dde2111e470ac43f7882debf Author: Sergei Shtylyov Date: Fri Aug 31 22:54:42 2018 +0300 arm64: enable CMT/TMU support for Renesas SoC Renesas R-Car gen3 SoCs have both CMT and TMU timers, so we have to enable building them in Kconfig.platforms (as they don't normally have the prompts in Kconfig). Signed-off-by: Sergei Shtylyov Signed-off-by: Simon Horman commit 9a09a42369a4a37a959c051d8e1a1f948c1529a4 Author: Chunming Zhou Date: Thu Aug 30 14:48:30 2018 +0800 drm: expand replace_fence to support timeline point v2 we can place a fence to a timeline point after expanded. v2: change func parameter order Signed-off-by: Chunming Zhou Reviewed-by: Christian König Signed-off-by: Christian König Link: https://patchwork.freedesktop.org/patch/246543/ commit 0a6730ea27b68c7ac4171c29a816c29d26a9637a Author: Chunming Zhou Date: Thu Aug 30 14:48:29 2018 +0800 drm: expand drm_syncobj_find_fence to support timeline point v2 we can fetch timeline point fence after expanded. v2: The parameter fence is the result of the function and should come last. Signed-off-by: Chunming Zhou Reviewed-by: Christian König Signed-off-by: Christian König Link: https://patchwork.freedesktop.org/patch/246541/ commit e28bd101ae1b0f3f653e160c0339c95da7e0fc1e Author: Chunming Zhou Date: Thu Aug 30 14:48:28 2018 +0800 drm: rename null fence to stub fence in syncobj v2 moved to front of file. stub fence will be used by timeline syncobj as well. Signed-off-by: Chunming Zhou Cc: Jason Ekstrand Reviewed-by: Christian König Signed-off-by: Christian König Link: https://patchwork.freedesktop.org/patch/246539/ commit 94e4c5305a9b5a939bfba08039c1b383af7e453b Author: Chunming Zhou Date: Thu Aug 30 14:48:27 2018 +0800 drm: fix syncobj null_fence_enable_signaling That is certainly totally nonsense. dma_fence_enable_sw_signaling() is the function who is calling this callback. Signed-off-by: Chunming Zhou Cc: Jason Ekstrand Reviewed-by: Christian König Acked-by: Daniel Vetter Signed-off-by: Christian König Link: https://patchwork.freedesktop.org/patch/246535/ commit 70109354fed232dfce8fb2c7cadf635acbe03e19 Author: Chris Wilson Date: Wed Sep 5 16:31:16 2018 +0100 drm: Reject unknown legacy bpp and depth for drm_mode_addfb ioctl Since this is handling user provided bpp and depth, we need to sanity check and propagate the EINVAL back rather than assume what the insane client intended and fill the logs with DRM_ERROR. v2: Check both bpp and depth match the builtin pixel format, and introduce a canonical DRM_FORMAT_INVALID to reserve 0 against any future fourcc. v3: Mark up DRM_FORMAT_C8 as being {bpp:8, depth:8} Testcase: igt/kms_addfb_basic/legacy-format Signed-off-by: Chris Wilson Cc: Daniel Vetter Cc: Ville Syrjälä Cc: Michel Dänzer Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20180905153116.28924-1-chris@chris-wilson.co.uk commit 6960e6da9cec3f6638121527c728305827ec12ab Author: Gerd Hoffmann Date: Wed Sep 5 08:04:43 2018 +0200 drm: fix drm_mode_addfb() on big endian machines. Userspace on big endian machhines typically expects the ADDFB ioctl returns a big endian framebuffer. drm_mode_addfb() will call drm_mode_addfb2() unconditionally with little endian DRM_FORMAT_* values though, which is wrong. This patch fixes that. Drivers (both kernel and xorg) have quirks in place to deal with the broken drm_mode_addfb() behavior. Because of this we can't just change drm_mode_addfb() behavior for everybody without breaking things. Add the quirk_addfb_prefer_host_byte_order field to mode_config, so drivers can opt-in. Signed-off-by: Gerd Hoffmann Reviewed-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20180905060445.15008-5-kraxel@redhat.com commit 00409fd6f14f1a3f06c6ea50a6f2fba17c5573d9 Author: Gerd Hoffmann Date: Wed Sep 5 08:04:42 2018 +0200 drm: do not mask out DRM_FORMAT_BIG_ENDIAN framebuffer_check() expects that drm_get_format_info() will not fail if the __drm_format_info() call was successful. That'll work only in case both are called with the same pixel_format value, so masking out the DRM_FORMAT_BIG_ENDIAN flag isn't a good idea. Signed-off-by: Gerd Hoffmann Reviewed-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20180905060445.15008-4-kraxel@redhat.com commit ec2fae2558ba6b7b166db20901545cab7e41a050 Author: Gerd Hoffmann Date: Wed Sep 5 08:04:41 2018 +0200 drm: byteorder: add DRM_FORMAT_HOST_* Add fourcc variants in host byte order. With these at hand we don't need #ifdefs in drivers which support framebuffers in cpu endianess. Signed-off-by: Gerd Hoffmann Reviewed-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20180905060445.15008-3-kraxel@redhat.com commit 0e94043ee1d98d5112aa4e1d68733b0197dfdafa Author: Gerd Hoffmann Date: Wed Sep 5 08:04:40 2018 +0200 drm: replace DRIVER_PREFER_XBGR_30BPP driver flag with mode_config quirk Signed-off-by: Gerd Hoffmann Reviewed-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20180905060445.15008-2-kraxel@redhat.com commit 6ef848efc231aa6a67aff25467ea979569fb894b Merge: d4cc597623c3 203651b665f7 Author: David S. Miller Date: Wed Sep 5 22:27:12 2018 -0700 Merge branch 'rtnetlink-add-IFA_TARGET_NETNSID-for-RTM_GETADDR' Christian Brauner says: ==================== rtnetlink: add IFA_TARGET_NETNSID for RTM_GETADDR This iteration should mainly addresses the suggestion to use IFA_TARGET_NETNSID as the property name. Additionally, an an alias for the already existing IFLA_IF_NETNSID property is added. Note that two additional cleanup patches (8\9 and 9\9) were added to address concerns raised that passing more than 6 arguments to a function will cause additional variables to be pushed onto the stack instead of being placed into registers. The way I addressed this is by introducing two new struct inet{6}_fill_args that are used to pass common information down to inet{6}_fill_if*() functions shortening all those functions to three pointer arguments. If this is something more people than Kirill find useful they can be kept if not they can simply be dropped in later iterations of this series or when merging. Here is a short overview: 1. Rename from IFA_IF_NETNSID to IFA_TARGET_NETNSID. 2. Add IFLA_TARGET_NETNSID as an alias for IFA_IFLA_NETNSID and switch all occurrences over to the new alias. 3. Add inet4_fill_args struct to avoid passing more than 6 arguments in inet_fill_if*() functions. 4. Add inet6_fill_args struct to avoid passing more than 6 arguments in inet_fill_if*() functions. The only functional change is the export of rtnl_get_net_ns_capable() which is needed in case ipv6 is built as a module. Note, I did not change the property name to IFA_TARGET_NSID as there was no clear agreement what would be preferred. My personal preference is to keep the IFA_IF_NETNSID name because it aligns naturally with the IFLA_IF_NETNSID property for RTM_*LINK requests. Jiri seems to prefer this name too. However, if there is agreement that another property name makes more sense I'm happy to send a v2 that changes this. To test this patchset I performed 1 million getifaddrs() requests against a network namespace containing 5 interfaces (lo, eth{0-4}). The first test used a network namespace aware getifaddrs() implementation I wrote and the second test used the traditional setns() + getifaddrs() method. The results show that this patchsets allows userspace to cut retrieval time in half: 1. netns_getifaddrs(): 82 microseconds 2. setns() + getifaddrs(): 162 microseconds A while back we introduced and enabled IFLA_IF_NETNSID in RTM_{DEL,GET,NEW}LINK requests (cf. [1], [2], [3], [4], [5]). This has led to signficant performance increases since it allows userspace to avoid taking the hit of a setns(netns_fd, CLONE_NEWNET), then getting the interfaces from the netns associated with the netns_fd. Especially when a lot of network namespaces are in use, using setns() becomes increasingly problematic when performance matters. Usually, RTML_GETLINK requests are followed by RTM_GETADDR requests (cf. getifaddrs() style functions and friends). But currently, RTM_GETADDR requests do not support a similar property like IFLA_IF_NETNSID for RTM_*LINK requests. This is problematic since userspace can retrieve interfaces from another network namespace by sending a IFLA_IF_NETNSID property along but RTM_GETLINK request but is still forced to use the legacy setns() style of retrieving interfaces in RTM_GETADDR requests. The goal of this series is to make it possible to perform RTM_GETADDR requests on different network namespaces. To this end a new IFA_IF_NETNSID property for RTM_*ADDR requests is introduced. It can be used to send a network namespace identifier along in RTM_*ADDR requests. The network namespace identifier will be used to retrieve the target network namespace in which the request is supposed to be fulfilled. This aligns the behavior of RTM_*ADDR requests with the behavior of RTM_*LINK requests. - The caller must have assigned a valid network namespace identifier for the target network namespace. - The caller must have CAP_NET_ADMIN in the owning user namespace of the target network namespace. [1]: commit 7973bfd8758d ("rtnetlink: remove check for IFLA_IF_NETNSID") [2]: commit 5bb8ed075428 ("rtnetlink: enable IFLA_IF_NETNSID for RTM_NEWLINK") [3]: commit b61ad68a9fe8 ("rtnetlink: enable IFLA_IF_NETNSID for RTM_DELLINK") [4]: commit c310bfcb6e1b ("rtnetlink: enable IFLA_IF_NETNSID for RTM_SETLINK") [5]: commit 7c4f63ba8243 ("rtnetlink: enable IFLA_IF_NETNSID in do_setlink()") ==================== Signed-off-by: David S. Miller commit 203651b665f72ba765fc4721842a471f8e9e5739 Author: Christian Brauner Date: Tue Sep 4 21:53:55 2018 +0200 ipv6: add inet6_fill_args inet6_fill_if{addr,mcaddr, acaddr}() already took 6 arguments which meant the 7th argument would need to be pushed onto the stack on x86. Add a new struct inet6_fill_args which holds common information passed to inet6_fill_if{addr,mcaddr, acaddr}() and shortens the functions to three pointer arguments. Signed-off-by: Christian Brauner Cc: Kirill Tkhai Signed-off-by: David S. Miller commit 978a46fa6c34c311f44e6f832cbea765ac148ace Author: Christian Brauner Date: Tue Sep 4 21:53:54 2018 +0200 ipv4: add inet_fill_args inet_fill_ifaddr() already took 6 arguments which meant the 7th argument would need to be pushed onto the stack on x86. Add a new struct inet_fill_args which holds common information passed to inet_fill_ifaddr() and shortens the function to three pointer arguments. Signed-off-by: Christian Brauner Cc: Kirill Tkhai Signed-off-by: David S. Miller commit 7e4a8d5a93f649a1c0a0181cab5d965b1f85cf71 Author: Christian Brauner Date: Tue Sep 4 21:53:53 2018 +0200 rtnetlink: s/IFLA_IF_NETNSID/IFLA_TARGET_NETNSID/g IFLA_TARGET_NETNSID is the new alias for IFLA_IF_NETNSID. This commit replaces all occurrences of IFLA_IF_NETNSID with the new alias to indicate that this identifier is the preferred one. Signed-off-by: Christian Brauner Cc: Nicolas Dichtel Cc: Jiri Benc Signed-off-by: David S. Miller commit 19d8f1ad12fd746e60707a58d954980013c7a35a Author: Christian Brauner Date: Tue Sep 4 21:53:52 2018 +0200 if_link: add IFLA_TARGET_NETNSID alias This adds IFLA_TARGET_NETNSID as an alias for IFLA_IF_NETNSID for RTM_*LINK requests. The new name is clearer and also aligns with the newly introduced IFA_TARGET_NETNSID propert for RTM_*ADDR requests. Signed-off-by: Christian Brauner Suggested-by: Nicolas Dichtel Cc: Jiri Benc Signed-off-by: David S. Miller commit 87ccbb1f943625884b824c5560f635dcea8e4510 Author: Christian Brauner Date: Tue Sep 4 21:53:51 2018 +0200 rtnetlink: move type calculation out of loop I don't see how the type - which is one of RTM_{GETADDR,GETROUTE,GETNETCONF} - can change. So do the message type calculation once before entering the for loop. Signed-off-by: Christian Brauner Signed-off-by: David S. Miller commit 6ecf4c37eb3e89b0832c9616089a5cdca3747da7 Author: Christian Brauner Date: Tue Sep 4 21:53:50 2018 +0200 ipv6: enable IFA_TARGET_NETNSID for RTM_GETADDR - Backwards Compatibility: If userspace wants to determine whether ipv6 RTM_GETADDR requests support the new IFA_TARGET_NETNSID property it should verify that the reply includes the IFA_TARGET_NETNSID property. If it does not userspace should assume that IFA_TARGET_NETNSID is not supported for ipv6 RTM_GETADDR requests on this kernel. - From what I gather from current userspace tools that make use of RTM_GETADDR requests some of them pass down struct ifinfomsg when they should actually pass down struct ifaddrmsg. To not break existing tools that pass down the wrong struct we will do the same as for RTM_GETLINK | NLM_F_DUMP requests and not error out when the nlmsg_parse() fails. - Security: Callers must have CAP_NET_ADMIN in the owning user namespace of the target network namespace. Signed-off-by: Christian Brauner Signed-off-by: David S. Miller commit d38071455ffb553ffa9f63d3c8e6af13c42da512 Author: Christian Brauner Date: Tue Sep 4 21:53:49 2018 +0200 ipv4: enable IFA_TARGET_NETNSID for RTM_GETADDR - Backwards Compatibility: If userspace wants to determine whether ipv4 RTM_GETADDR requests support the new IFA_TARGET_NETNSID property it should verify that the reply includes the IFA_TARGET_NETNSID property. If it does not userspace should assume that IFA_TARGET_NETNSID is not supported for ipv4 RTM_GETADDR requests on this kernel. - From what I gather from current userspace tools that make use of RTM_GETADDR requests some of them pass down struct ifinfomsg when they should actually pass down struct ifaddrmsg. To not break existing tools that pass down the wrong struct we will do the same as for RTM_GETLINK | NLM_F_DUMP requests and not error out when the nlmsg_parse() fails. - Security: Callers must have CAP_NET_ADMIN in the owning user namespace of the target network namespace. Signed-off-by: Christian Brauner Signed-off-by: David S. Miller commit 9f3c057c146fce335c160e95ca893d5bc34e7d00 Author: Christian Brauner Date: Tue Sep 4 21:53:48 2018 +0200 if_addr: add IFA_TARGET_NETNSID This adds a new IFA_TARGET_NETNSID property to be used by address families such as PF_INET and PF_INET6. The IFA_TARGET_NETNSID property can be used to send a network namespace identifier as part of a request. If a IFA_TARGET_NETNSID property is identified it will be used to retrieve the target network namespace in which the request is to be made. Signed-off-by: Christian Brauner Cc: Jiri Benc Cc: Nicolas Dichtel Signed-off-by: David S. Miller commit c383edc42403b0bca31cbaabafd44dd58afb202f Author: Christian Brauner Date: Tue Sep 4 21:53:47 2018 +0200 rtnetlink: add rtnl_get_net_ns_capable() get_target_net() will be used in follow-up patches in ipv{4,6} codepaths to retrieve network namespaces based on network namespace identifiers. So remove the static declaration and export in the rtnetlink header. Also, rename it to rtnl_get_net_ns_capable() to make it obvious what this function is doing. Export rtnl_get_net_ns_capable() so it can be used when ipv6 is built as a module. Signed-off-by: Christian Brauner Signed-off-by: David S. Miller commit a9c676bc8fc58d00eea9836fb14ee43c0346416a Author: Alexei Starovoitov Date: Tue Sep 4 19:13:44 2018 -0700 bpf/verifier: fix verifier instability Edward Cree says: In check_mem_access(), for the PTR_TO_CTX case, after check_ctx_access() has supplied a reg_type, the other members of the register state are set appropriately. Previously reg.range was set to 0, but as it is in a union with reg.map_ptr, which is larger, upper bytes of the latter were left in place. This then caused the memcmp() in regsafe() to fail, preventing some branches from being pruned (and occasionally causing the same program to take a varying number of processed insns on repeated verifier runs). Fix the instability by clearing bpf_reg_state in __mark_reg_[un]known() Fixes: f1174f77b50c ("bpf/verifier: rework value tracking") Debugged-by: Edward Cree Acked-by: Edward Cree Signed-off-by: Alexei Starovoitov commit d4cc597623c33b53346eae250475beebd17a6420 Merge: 7848418e28f5 51ceac9fb588 Author: David S. Miller Date: Wed Sep 5 22:20:45 2018 -0700 Merge branch 'net-lan78xx-Minor-improvements' Stefan Wahren says: ==================== net: lan78xx: Minor improvements This patch series contains some minor improvements for the lan78xx driver. Changes in V2: - Keep Copyright comment as multi-line - Add Raghuram's Reviewed-by ==================== Signed-off-by: David S. Miller commit 51ceac9fb5886febc4116123012caa268277643b Author: Stefan Wahren Date: Tue Sep 4 19:29:12 2018 +0200 net: lan78xx: Make declaration style consistent This patch makes some declaration more consistent. Signed-off-by: Stefan Wahren Reviewed-by: Raghuram Chary Jallipalli Signed-off-by: David S. Miller commit 6be665a56d366bc7577e6b8f9aaaba57e4c38c35 Author: Stefan Wahren Date: Tue Sep 4 19:29:11 2018 +0200 net: lan78xx: Switch to SPDX identifier Adopt the SPDX license identifier headers to ease license compliance management. Signed-off-by: Stefan Wahren Signed-off-by: David S. Miller commit 7a6b022d7964a8f9fa09885a62dc5ba82127dccc Author: Stefan Wahren Date: Tue Sep 4 19:29:10 2018 +0200 net: lan78xx: Drop unnecessary strcpy in lan78xx_probe There is no need for this strcpy because alloc_etherdev() already does this job. Signed-off-by: Stefan Wahren Reviewed-by: Raghuram Chary Jallipalli Signed-off-by: David S. Miller commit fa8cd98c06407b5798b927cd7fd14d30f360ed02 Author: Stefan Wahren Date: Tue Sep 4 19:29:09 2018 +0200 net: lan78xx: Bail out if lan78xx_get_endpoints fails We need to bail out if lan78xx_get_endpoints() fails, otherwise the result is overwritten. Fixes: 55d7de9de6c3 ("Microchip's LAN7800 family USB 2/3 to 10/100/1000 Ethernet") Signed-off-by: Stefan Wahren Reviewed-by: Raghuram Chary Jallipalli Signed-off-by: David S. Miller commit 7848418e28f5428d223838400e1d2878b018c9d8 Author: Jakub Kicinski Date: Tue Sep 4 08:28:33 2018 -0700 nfp: separate VXLAN and GRE feature handling VXLAN and GRE FW features have to currently be both advertised for the driver to enable them. Separate the handling. Signed-off-by: Jakub Kicinski Reviewed-by: Dirk van der Merwe Signed-off-by: David S. Miller commit eebd3faa4f0301a09243c803c07e96aaf92c5fc1 Merge: 9e7e6cabf371 e84b2f2db2ea Author: David S. Miller Date: Wed Sep 5 22:17:07 2018 -0700 Merge branch 'nfp-improve-the-new-rtsym-helpers' Jakub Kicinski says: ==================== nfp: improve the new rtsym helpers This set fixes a bug in ABS rtsym handling I added in net-next, it expands the error checking and reporting on the rtsym accesses. ==================== Signed-off-by: David S. Miller commit e84b2f2db2eaf025fb5bcec7223b749a9554174a Author: Jakub Kicinski Date: Tue Sep 4 07:37:33 2018 -0700 nfp: validate rtsym accesses fall within the symbol With the accesses to rtsyms now all going via special helpers we can easily make sure the driver is not reading past the end of the symbol. Signed-off-by: Jakub Kicinski Reviewed-by: Francois H. Theron Signed-off-by: David S. Miller commit 31e380f38f6d508f280658ed17fe54d817fedea2 Author: Jakub Kicinski Date: Tue Sep 4 07:37:32 2018 -0700 nfp: prefix rtsym error messages with symbol name For ease of debug preface all error messages with the name of the symbol which caused them. Use the same message format for existing messages while at it. Signed-off-by: Jakub Kicinski Reviewed-by: Francois H. Theron Signed-off-by: David S. Miller commit 3c576de30bb49a4821923928f85f13e957d1e47d Author: Jakub Kicinski Date: Tue Sep 4 07:37:31 2018 -0700 nfp: fix readq on absolute RTsyms Return the error and report value through the output param. Fixes: 640917dd81b6 ("nfp: support access to absolute RTsyms") Reported-by: Dan Carpenter Signed-off-by: Jakub Kicinski Reviewed-by: Francois H. Theron Signed-off-by: David S. Miller commit 69495d2a52957c415d11312fe37844062a48fd32 Author: Taeung Song Date: Mon Sep 3 08:30:07 2018 +0900 libbpf: Remove the duplicate checking of function storage After the commit eac7d84519a3 ("tools: libbpf: don't return '.text' as a program for multi-function programs"), bpf_program__next() in bpf_object__for_each_program skips the function storage such as .text, so eliminate the duplicate checking. Cc: Jakub Kicinski Signed-off-by: Taeung Song Acked-by: Jakub Kicinski Signed-off-by: Alexei Starovoitov commit 9e7e6cabf371cc008cb2244a04c012b516753693 Author: YueHaibing Date: Tue Sep 4 02:56:26 2018 +0000 failover: Add missing check to validate 'slave_dev' in net_failover_slave_unregister Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/net_failover.c: In function 'net_failover_slave_unregister': drivers/net/net_failover.c:598:35: warning: variable 'primary_dev' set but not used [-Wunused-but-set-variable] There should check the validity of 'slave_dev'. Fixes: cfc80d9a1163 ("net: Introduce net_failover driver") Signed-off-by: YueHaibing Acked-by: Sridhar Samudrala Signed-off-by: David S. Miller commit 428f944bd58607021b5a1f85d145c0b50f908c6f Author: Dmitry Safonov Date: Mon Sep 3 22:40:51 2018 +0100 netlink: Make groups check less stupid in netlink_bind() As Linus noted, the test for 0 is needless, groups type can follow the usual kernel style and 8*sizeof(unsigned long) is BITS_PER_LONG: > The code [..] isn't technically incorrect... > But it is stupid. > Why stupid? Because the test for 0 is pointless. > > Just doing > if (nlk->ngroups < 8*sizeof(groups)) > groups &= (1UL << nlk->ngroups) - 1; > > would have been fine and more understandable, since the "mask by shift > count" already does the right thing for a ngroups value of 0. Now that > test for zero makes me go "what's special about zero?". It turns out > that the answer to that is "nothing". [..] > The type of "groups" is kind of silly too. > > Yeah, "long unsigned int" isn't _technically_ wrong. But we normally > call that type "unsigned long". Cleanup my piece of pointlessness. Cc: "David S. Miller" Cc: Herbert Xu Cc: Steffen Klassert Cc: netdev@vger.kernel.org Fairly-blamed-by: Linus Torvalds Signed-off-by: Dmitry Safonov Signed-off-by: David S. Miller commit fa788d986a3aac5069378ed04697bd06f83d3488 Author: Vincent Whitchurch Date: Mon Sep 3 16:23:36 2018 +0200 packet: add sockopt to ignore outgoing packets Currently, the only way to ignore outgoing packets on a packet socket is via the BPF filter. With MSG_ZEROCOPY, packets that are looped into AF_PACKET are copied in dev_queue_xmit_nit(), and this copy happens even if the filter run from packet_rcv() would reject them. So the presence of a packet socket on the interface takes away the benefits of MSG_ZEROCOPY, even if the packet socket is not interested in outgoing packets. (Even when MSG_ZEROCOPY is not used, the skb is unnecessarily cloned, but the cost for that is much lower.) Add a socket option to allow AF_PACKET sockets to ignore outgoing packets to solve this. Note that the *BSDs already have something similar: BIOCSSEESENT/BIOCSDIRECTION and BIOCSDIRFILT. The first intended user is lldpd. Signed-off-by: Vincent Whitchurch Signed-off-by: David S. Miller commit fe1dc069990c1f290ef6b99adb46332c03258f38 Author: Alaa Hleihel Date: Tue Jul 10 13:34:06 2018 +0300 net/mlx5e: don't set CHECKSUM_COMPLETE on SCTP packets CHECKSUM_COMPLETE is not applicable to SCTP protocol. Setting it for SCTP packets leads to CRC32c validation failure. Fixes: bbceefce9adf ("net/mlx5e: Support RX CHECKSUM_COMPLETE") Signed-off-by: Alaa Hleihel Reviewed-by: Or Gerlitz Signed-off-by: Saeed Mahameed commit f007c13d4ad62f494c83897eda96437005df4a91 Author: Natali Shechtman Date: Tue Mar 20 17:15:31 2018 +0200 net/mlx5e: Set ECN for received packets using CQE indication In multi-host (MH) NIC scheme, a single HW port serves multiple hosts or sockets on the same host. The HW uses a mechanism in the PCIe buffer which monitors the amount of consumed PCIe buffers per host. On a certain configuration, under congestion, the HW emulates a switch doing ECN marking on packets using ECN indication on the completion descriptor (CQE). The driver needs to set the ECN bits on the packet SKB, such that the network stack can react on that, this commit does that. Signed-off-by: Natali Shechtman Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 64109f1dc41f25f4a9c6b114e04b6266bf4128ad Author: Shay Agroskin Date: Tue Jun 5 09:22:18 2018 +0300 net/mlx5e: Replace PTP clock lock from RW lock to seq lock Changed "priv.clock.lock" lock from 'rw_lock' to 'seq_lock' in order to improve packet rate performance. Tested on Intel(R) Xeon(R) CPU E5-2660 v2 @ 2.20GHz. Sent 64b packets between two peers connected by ConnectX-5, and measured packet rate for the receiver in three modes: no time-stamping (base rate) time-stamping using rw_lock (old lock) for critical region time-stamping using seq_lock (new lock) for critical region Only the receiver time stamped its packets. The measured packet rate improvements are: Single flow (multiple TX rings to single RX ring): without timestamping: 4.26 (M packets)/sec with rw-lock (old lock): 4.1 (M packets)/sec with seq-lock (new lock): 4.16 (M packets)/sec 1.46% improvement Multiple flows (multiple TX rings to six RX rings): without timestamping: 22 (M packets)/sec with rw-lock (old lock): 11.7 (M packets)/sec with seq-lock (new lock): 21.3 (M packets)/sec 82.05% improvement The packet rate improvement is due to the lack of atomic operations for the 'readers' by the seq-lock. Since there are much more 'readers' than 'writers' contention on this lock, almost all atomic operations are saved. this results in a dramatic decrease in overall cache misses. Signed-off-by: Shay Agroskin Signed-off-by: Saeed Mahameed commit 1462e48db0597a3dec8e73d64f3a001936ec398e Author: Roi Dayan Date: Sun Aug 5 06:58:05 2018 +0300 net/mlx5e: Move Q counters allocation and drop RQ to init_rx Not all profiles query the HW Q counters in update_stats() callback. HW Q couners are limited per device and in case of representors all their Q counters are allocated on the parent PF device. Avoid reundant allocation of HW Q counters by moving the allocation to init_rx profile callback. Signed-off-by: Roi Dayan Signed-off-by: Saeed Mahameed commit d24082050f2f626582902f7c65b91d699ec60613 Author: Kamal Heib Date: Sun Jul 15 22:06:28 2018 +0300 net/mlx5e: Move mlx5e_priv_flags into en_ethtool.c Move the definition of mlx5e_priv_flags into en_ethtool.c because it's only used there. Fixes: 4e59e2888139 ("net/mlx5e: Introduce net device priv flags infrastructure") Signed-off-by: Kamal Heib Signed-off-by: Saeed Mahameed commit 12d6066c3b29c5606c4a2466f964fbd9ede803c5 Author: Vlad Buslov Date: Tue Jul 24 16:37:40 2018 +0300 net/mlx5: Add flow counters idr Previous patch in series changed flow counter storage structure from rb_tree to linked list in order to improve flow counter traversal performance. The drawback of such solution is that flow counter lookup by id becomes linear in complexity. Store pointers to flow counters in idr in order to improve lookup performance to logarithmic again. Idr is non-intrusive data structure and doesn't require extending flow counter struct with new elements. This means that idr can be used for lookup, while linked list from previous patch is used for traversal, and struct mlx5_fc size is <= 2 cache lines. Signed-off-by: Vlad Buslov Acked-by: Amir Vadai Reviewed-by: Paul Blakey Signed-off-by: Saeed Mahameed commit 9aff93d7d0d4b3f3076d7bd12a4ad06ef1cf9804 Author: Vlad Buslov Date: Tue Jul 24 09:52:11 2018 +0300 net/mlx5: Store flow counters in a list In order to improve performance of flow counter stats query loop that traverses all configured flow counters, replace rb_tree with double-linked list. This change improves performance of traversing flow counters by removing the tree traversal. (profiling data showed that call to rb_next was most top CPU consumer) However, lookup of flow flow counter in list becomes linear, instead of logarithmic. This problem is fixed by next patch in series, which adds idr for fast lookup. Idr is to be used because it is not an intrusive data structure and doesn't require adding any new members to struct mlx5_fc, which allows its control data part to stay <= 1 cache line in size. Signed-off-by: Vlad Buslov Acked-by: Amir Vadai Reviewed-by: Paul Blakey Signed-off-by: Saeed Mahameed commit 6e5e22839136fdb466af0aa46ff2404713dff974 Author: Vlad Buslov Date: Mon Jul 23 11:32:05 2018 +0300 net/mlx5: Add new list to store deleted flow counters In order to prevent flow counters stats work function from traversing whole flow counters tree while searching for deleted flow counters, new list to store deleted flow counters is added to struct mlx5_fc_stats. Lockless NULL-terminated single linked list data type is used due to following reasons: - This use case only needs to add single element to list and remove/iterate whole list. Lockless list doesn't require any additional synchronization for these operations. - First cache line of flow counter data structure only has space to store single additional pointer, which precludes usage of double linked list. Remove flow counter 'deleted' flag that is no longer needed. Signed-off-by: Vlad Buslov Acked-by: Amir Vadai Reviewed-by: Paul Blakey Signed-off-by: Saeed Mahameed commit 83033688b7ade18d2dbbcefa810f02ff66ba549d Author: Vlad Buslov Date: Mon Jul 23 10:55:39 2018 +0300 net/mlx5: Change flow counters addlist type to single linked list In order to prevent flow counters stats work function from traversing whole flow counters tree while searching for deleted flow counters, new list to store deleted flow counters will be added to struct mlx5_fc_stats. However, the flow counter structure itself has no space left to store any more data in first cache line. To free space that is needed to store additional list node, convert current addlist double linked list (two pointers per node) to atomic single linked list (one pointer per node). Lockless NULL-terminated single linked list data type doesn't require any additional external synchronization for operations used by flow counters module (add single new element, remove all elements from list and traverse them). Remove addlist_lock that is no longer needed. Signed-off-by: Vlad Buslov Acked-by: Amir Vadai Reviewed-by: Paul Blakey Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed commit 7c45885ea92972e7909847c39bd1698b76dffd73 Author: Alexandre Belloni Date: Fri Aug 31 17:11:14 2018 +0200 MIPS: dts: mscc: enable i2c on ocelot_pcb123 Enable the i2c controller on ocelot PCB123. While there are no i2c devices on the board itself, it can be used to control the SFP transceivers. Signed-off-by: Alexandre Belloni Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/20352/ Cc: Wolfram Sang Cc: Jarkko Nikula Cc: James Hogan Cc: Andy Shevchenko Cc: Mika Westerberg Cc: linux-i2c@vger.kernel.org Cc: devicetree@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: linux-mips@linux-mips.org Cc: Thomas Petazzoni Cc: Allan Nielsen commit 9ca953a3d6a649f4d5d2a4f1d5d51db10de46e5b Author: Alexandre Belloni Date: Fri Aug 31 17:11:13 2018 +0200 MIPS: dts: mscc: Add i2c on ocelot Ocelot has an i2c controller, add it. There is only one possible pinmux configuration so add it as well. Signed-off-by: Alexandre Belloni Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/20353/ Cc: Wolfram Sang Cc: Jarkko Nikula Cc: James Hogan Cc: Andy Shevchenko Cc: Mika Westerberg Cc: linux-i2c@vger.kernel.org Cc: devicetree@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: linux-mips@linux-mips.org Cc: Thomas Petazzoni Cc: Allan Nielsen commit 2c910cb75e1fe6de52d95c8e32caedd1629a33a5 Merge: 627212c9d49b b53b1c08a23e Author: Jason Gunthorpe Date: Wed Sep 5 16:21:22 2018 -0600 Merge branch 'uverbs_dev_cleanups' into rdma.git for-next For dependencies, branch based on rdma.git 'for-rc' of https://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git/ Pull 'uverbs_dev_cleanups' from Leon Romanovsky: ==================== Reuse the char device code interfaces to simplify ib_uverbs_device creation and destruction. As part of this series, we are sending fix to cleanup path, which was discovered during internal review, The fix definitely can go to -rc, but it means that this series will be dependent on rdma-rc. ==================== * branch 'uverbs_dev_cleanups': RDMA/uverbs: Use device.groups to initialize device attributes RDMA/uverbs: Use cdev_device_add() instead of cdev_add() RDMA/core: Depend on device_add() to add device attributes RDMA/uverbs: Fix error cleanup path of ib_uverbs_add_one() Resolved conflict in ib_device_unregister_sysfs() Signed-off-by: Jason Gunthorpe commit b53b1c08a23eb1091982daacb2122f90a7094a77 Author: Parav Pandit Date: Wed Sep 5 09:48:00 2018 +0300 RDMA/uverbs: Use device.groups to initialize device attributes Instead of explicitly adding device attribute files and handling such error conditions, depend on device core layer to create device attributes files based group pointer NULL terminated array. Signed-off-by: Parav Pandit Reviewed-by: Daniel Jurgens Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit c5c4d92e70f37369b5bdca5e85f9fc55dc2c8a3b Author: Parav Pandit Date: Wed Sep 5 09:47:59 2018 +0300 RDMA/uverbs: Use cdev_device_add() instead of cdev_add() Instead of doing two step process to add char device and create underlying device, use cdev_device_add() which does both. Currently a kobject per uverbs_device is created to keep reference to its holding ib_uverbs_device in addition to its underlying device 'dev'. Instead just use uverbs_device->dev to keep a reference to. With this change there is single reference tracker for ib_uverbs_device structure. This allows for subsequent patch to registers group attribute as well using single API cdev_device_add(). Signed-off-by: Parav Pandit Reviewed-by: Daniel Jurgens Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit adee9f3f3bbb317c5469f84deba01eef4b86515b Author: Parav Pandit Date: Wed Sep 5 09:47:58 2018 +0300 RDMA/core: Depend on device_add() to add device attributes Instead of adding/removing device attribute files, depend on device_add() which considers adding these device files based on NULL terminated attributes group array. Signed-off-by: Parav Pandit Reviewed-by: Daniel Jurgens Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 627212c9d49ba2759b699450f5d8f45f73e062fa Author: Parav Pandit Date: Mon Sep 3 20:20:25 2018 +0300 RDMA/core: Replace open-coded variant of get_device Reuse existing get_device() API to do it symmetric to already used put_device() in commit 924b8900a49d ("RDMA/core: Replace open-coded variant of put_device") Signed-off-by: Parav Pandit Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 6ceb6331b3291694fb6ceba625219f51447c3fa2 Author: Leon Romanovsky Date: Mon Sep 3 20:18:03 2018 +0300 RDMA/uverbs: Declare closing variable as boolean The "closing" variable is used as boolean and set to "true" in one place, update the declaration of that variable and their other assignment to proper type. Fixes: e951747a087a ("IB/uverbs: Rework the locking for cleaning up the ucontext") Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 12d6f669717d8f1b7de5cb7409c362fd8a4f1d2d Author: Leon Romanovsky Date: Wed Sep 5 08:58:31 2018 +0300 RDMA/nes: Delete impossible debug prints The pci-core and net-core logic ensure that parameters provided to nes_probe() and nes_netdev_open() are valid, hence the assert print are not possible. Cc: Faisal Latif Signed-off-by: Leon Romanovsky Reviewed-by: Dennis Dalessandro Signed-off-by: Jason Gunthorpe commit b3b43483a26dbb7b05fce1c21f6807d299888617 Author: YueHaibing Date: Sat Sep 1 03:53:46 2018 +0000 RDMA/qedr: remove set but not used variable 'ctx' Fixes gcc '-Wunused-but-set-variable' warning: drivers/infiniband/hw/qedr/verbs.c: In function 'qedr_create_srq': drivers/infiniband/hw/qedr/verbs.c:1450:24: warning: variable 'ctx' set but not used [-Wunused-but-set-variable] Signed-off-by: YueHaibing Acked-by: Rahul Verma Signed-off-by: Jason Gunthorpe commit 882dff2890e1e0928803701fcad75291e5310d0d Author: Igor Stoppa Date: Fri Aug 31 23:16:45 2018 +0300 IB/srp: Remove unnecessary unlikely() WARN_ON() already contains an unlikely(), so it's not necessary to wrap it into another. Signed-off-by: Igor Stoppa Reviewed-by: Bart Van Assche Signed-off-by: Jason Gunthorpe commit 95ffe194204ae3cef88d0b59be209204bbe9b3be Author: Jann Horn Date: Mon Aug 6 23:19:32 2018 +0200 selinux: refactor mls_context_to_sid() and make it stricter The intended behavior change for this patch is to reject any MLS strings that contain (trailing) garbage if p->mls_enabled is true. As suggested by Paul Moore, change mls_context_to_sid() so that the two parts of the range are extracted before the rest of the parsing. Because now we don't have to scan for two different separators simultaneously everywhere, we can actually switch to strchr() everywhere instead of the open-coded loops that scan for two separators at once. mls_context_to_sid() used to signal how much of the input string was parsed by updating `*scontext`. However, there is actually no case in which mls_context_to_sid() only parses a subset of the input and still returns a success (other than the buggy case with a second '-' in which it incorrectly claims to have consumed the entire string). Turn `scontext` into a simple pointer argument and stop redundantly checking whether the entire input was consumed in string_to_context_struct(). This also lets us remove the `scontext_len` argument from `string_to_context_struct()`. Signed-off-by: Jann Horn [PM: minor merge fuzz in convert_context()] Signed-off-by: Paul Moore commit f794809a7259dfaa3d47d90ef5a86007cf48b1ce Author: Jack Morgenstein Date: Mon Aug 27 08:35:55 2018 +0300 IB/core: Add an unbound WQ type to the new CQ API The upstream kernel commit cited below modified the workqueue in the new CQ API to be bound to a specific CPU (instead of being unbound). This caused ALL users of the new CQ API to use the same bound WQ. Specifically, MAD handling was severely delayed when the CPU bound to the WQ was busy handling (higher priority) interrupts. This caused a delay in the MAD "heartbeat" response handling, which resulted in ports being incorrectly classified as "down". To fix this, add a new "unbound" WQ type to the new CQ API, so that users have the option to choose either a bound WQ or an unbound WQ. For MADs, choose the new "unbound" WQ. Fixes: b7363e67b23e ("IB/device: Convert ib-comp-wq to be CPU-bound") Signed-off-by: Jack Morgenstein Signed-off-by: Leon Romanovsky Reviewed-by: Sagi Grimberg Signed-off-by: Jason Gunthorpe commit 08920b8f5d2d3b6eb8bc118923f707c769704c77 Author: Joe Perches Date: Fri Aug 10 11:42:46 2018 -0700 RDMA/bnxt_re: QPLIB: Add and use #define dev_fmt(fmt) "QPLIB: " fmt Consistently use the "QPLIB: " prefix for dev_ logging. Miscellanea: o Add missing newlines to avoid possible message interleaving o Coalesce consecutive dev_ uses that emit a message header to avoid < 80 column lengths and mistakenly output on multiple lines o Reflow modified lines to use 80 columns where appropriate o Consistently use "%s: " where __func__ is output o QPLIB: is now always output immediately after the dev_ header Signed-off-by: Joe Perches Acked-by: Selvin Xavier Signed-off-by: Jason Gunthorpe commit af68ccbc1131ddd8dcda65b015cd9919b352485a Merge: c6a21c3864fc a090d0d859ff Author: Jason Gunthorpe Date: Wed Sep 5 15:24:58 2018 -0600 Merge branch 'mlx5-flow-mutate' into rdma.git for-next For dependencies, branch based on 'mellanox/mlx5-next' of git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux.git Pull Flow actions to mutate packets from Leon Romanovsky: ==================== This series exposes the ability to create flow actions which can mutate packet headers. We do that by exposing two new verbs: * modify header - can change existing packet headers. packet * reformat - can encapsulate or decapsulate a packet. Once created a flow action must be attached to a steering rule for it to take effect. The first 10 patches refactor mlx5_core code, rename internal structures to better reflect their operation and export needed functions so the RDMA side can allocate the action. The last 5 patches expose via the IOCTL infrastructure mlx5_ib methods which do the actual allocation of resources and return an handle to the user. A user of this API is expected to know how to work with the device's spec as the input to those function is HW depended. An example usage of the modify header action is routing, A user can create an action which edits the L2 header and decrease the TTL. An example usage of the packet reformat action is VXLAN encap/decap which is done by the HW. ==================== * branch 'mlx5-flow-mutate': RDMA/mlx5: Extend packet reformat verbs RDMA/mlx5: Add new flow action verb - packet reformat RDMA/uverbs: Add generic function to fill in flow action object RDMA/mlx5: Add a new flow action verb - modify header RDMA/uverbs: Add UVERBS_ATTR_CONST_IN to the specs language net/mlx5: Export packet reformat alloc/dealloc functions net/mlx5: Pass a namespace for packet reformat ID allocation net/mlx5: Expose new packet reformat capabilities {net, RDMA}/mlx5: Rename encap to reformat packet net/mlx5: Move header encap type to IFC header file net/mlx5: Break encap/decap into two separated flow table creation flags net/mlx5: Add support for more namespaces when allocating modify header net/mlx5: Export modify header alloc/dealloc functions net/mlx5: Add proper NIC TX steering flow tables support net/mlx5: Cleanup flow namespace getter switch logic Signed-off-by: Jason Gunthorpe commit a090d0d859ff88dd4c34614d01cee9b0603f4313 Author: Mark Bloch Date: Tue Aug 28 14:18:54 2018 +0300 RDMA/mlx5: Extend packet reformat verbs We expose new actions: L2_TO_L2_TUNNEL - A generic encap from L2 to L2, the data passed should be the encapsulating headers. L3_TUNNEL_TO_L2 - Will do decap where the inner packet starts from L3, the data should be mac or mac + vlan (14 or 18 bytes). L2_TO_L3_TUNNEL - Will do encap where is L2 of the original packet will not be included, the data should be the encapsulating header. Signed-off-by: Mark Bloch Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 08aeb97cb82483192bd8ad8e60d1b73ce1b75923 Author: Mark Bloch Date: Tue Aug 28 14:18:53 2018 +0300 RDMA/mlx5: Add new flow action verb - packet reformat For now, only add L2_TUNNEL_TO_L2 option. This will allow to perform generic decap operation if the encapsulating protocol is L2 based, and the inner packet is also L2 based. For example this can be used to decap VXLAN packets. Signed-off-by: Mark Bloch Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 841eefc5cb57030ad05a0c4bc285f93ffa668ad9 Author: Mark Bloch Date: Tue Aug 28 14:18:52 2018 +0300 RDMA/uverbs: Add generic function to fill in flow action object Refactor the initialization of a flow action object to a common function. Signed-off-by: Mark Bloch Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit b4749bf25652689d8e33827460266b78bb2ec42c Author: Mark Bloch Date: Tue Aug 28 14:18:51 2018 +0300 RDMA/mlx5: Add a new flow action verb - modify header Expose the ability to create a flow action which changes packet headers. The data passed from userspace should be modify header actions as defined by HW specification. Signed-off-by: Mark Bloch Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 0953fffec9ba022f63bfe01e86427530d8320d5c Author: Mark Bloch Date: Tue Aug 28 14:18:50 2018 +0300 RDMA/uverbs: Add UVERBS_ATTR_CONST_IN to the specs language This makes it clear and safe to access constants passed in from user space. We define a consistent ABI of u64 for all constants, and verify that the data passed in can be represented by the type the user supplies. The expectation is this will always be used with an enum declaring the constant values, and the user will use the enum type as input to the accessor. To retrieve the attribute value we introduce two helper calls - one standard which may fail if attribute is not valid and one where caller can provide a default value which will be used in case the attribute is not valid (useful when attribute is optional). Signed-off-by: Jason Gunthorpe Signed-off-by: Ariel Levkovich Signed-off-by: Mark Bloch Signed-off-by: Leon Romanovsky commit 67314ec7b0250290cc85eaa7a2f88a8ddb9e8547 Author: Guenter Roeck Date: Wed Sep 5 07:36:06 2018 -0700 RISC-V: Request newstat syscalls Since commit 82b355d161c9 ("y2038: Remove newstat family from default syscall set"), riscv images fail to boot with the following error. /sbin/init: error while loading shared libraries: libc.so.6: cannot stat shared object: Error 38 Kernel panic - not syncing: Attempted to kill init! exitcode=0x00007f00 Explicitly request newstat syscalls to fix the problem. Fixes: 82b355d161c9 ("y2038: Remove newstat family from default syscall set") Cc: Arnd Bergmann Signed-off-by: Guenter Roeck Signed-off-by: Arnd Bergmann commit 0ded69f632bb717be9aeea3ae74e29050fcb060c Author: Jaegeuk Kim Date: Wed Aug 22 21:18:00 2018 -0700 f2fs: avoid wrong decrypted data from disk 1. Create a file in an encrypted directory 2. Do GC & drop caches 3. Read stale data before its bio for metapage was not issued yet Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 22d7ea1364140eaafb272875ff40e95c85a75bdf Author: Chao Yu Date: Wed Aug 22 17:17:47 2018 +0800 Revert "f2fs: use printk_ratelimited for f2fs_msg" Don't limit printing log, so that we will not miss any key messages. This reverts commit a36c106dffb616250117efb1cab271c19a8f94ff. In addition, we use printk_ratelimited to avoid too many log prints. - error injection - discard submission failure Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit abde73c718293b83c23b2ca137f18b3f8650a553 Author: Sahitya Tummala Date: Fri Aug 31 15:09:26 2018 +0530 f2fs: fix unnecessary periodic wakeup of discard thread when dev is busy When dev is busy, discard thread wake up timeout can be aligned with the exact time that it needs to wait for dev to come out of busy. This helps to avoid unnecessary periodic wakeups and thus save some power. Signed-off-by: Sahitya Tummala Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 7d20c8abb2edcf962ca857d51f4d0f9cd4b19053 Author: Chao Yu Date: Tue Sep 4 03:52:17 2018 +0800 f2fs: fix to avoid NULL pointer dereference on se->discard_map https://bugzilla.kernel.org/show_bug.cgi?id=200951 These is a NULL pointer dereference issue reported in bugzilla: Hi, in the setup there is a SATA SSD connected to a SATA-to-USB bridge. The disc is "Samsung SSD 850 PRO 256G" which supports TRIM. There are four partitions: sda1: FAT /boot sda2: F2FS / sda3: F2FS /home sda4: F2FS The bridge is ASMT1153e which uses the "uas" driver. There is no TRIM pass-through, so, when mounting it reports: mounting with "discard" option, but the device does not support discard The USB host is USB3.0 and UASP capable. It is the one on RK3399. Given this everything works fine, except there is no TRIM support. In order to enable TRIM a new UDEV rule is added [1]: /etc/udev/rules.d/10-sata-bridge-trim.rules: ACTION=="add|change", ATTRS{idVendor}=="174c", ATTRS{idProduct}=="55aa", SUBSYSTEM=="scsi_disk", ATTR{provisioning_mode}="unmap" After reboot any F2FS write hangs forever and dmesg reports: Unable to handle kernel NULL pointer dereference Also tested on a x86_64 system: works fine even with TRIM enabled. same disc same bridge different usb host controller different cpu architecture not root filesystem Regards, Vicenç. [1] Post #5 in https://bbs.archlinux.org/viewtopic.php?id=236280 Unable to handle kernel NULL pointer dereference at virtual address 000000000000003e Mem abort info: ESR = 0x96000004 Exception class = DABT (current EL), IL = 32 bits SET = 0, FnV = 0 EA = 0, S1PTW = 0 Data abort info: ISV = 0, ISS = 0x00000004 CM = 0, WnR = 0 user pgtable: 4k pages, 48-bit VAs, pgdp = 00000000626e3122 [000000000000003e] pgd=0000000000000000 Internal error: Oops: 96000004 [#1] SMP Modules linked in: overlay snd_soc_hdmi_codec rc_cec dw_hdmi_i2s_audio dw_hdmi_cec snd_soc_simple_card snd_soc_simple_card_utils snd_soc_rockchip_i2s rockchip_rga snd_soc_rockchip_pcm rockchipdrm videobuf2_dma_sg v4l2_mem2mem rtc_rk808 videobuf2_memops analogix_dp videobuf2_v4l2 videobuf2_common dw_hdmi dw_wdt cec rc_core videodev drm_kms_helper media drm rockchip_thermal rockchip_saradc realtek drm_panel_orientation_quirks syscopyarea sysfillrect sysimgblt fb_sys_fops dwmac_rk stmmac_platform stmmac pwm_bl squashfs loop crypto_user gpio_keys hid_kensington CPU: 5 PID: 957 Comm: nvim Not tainted 4.19.0-rc1-1-ARCH #1 Hardware name: Sapphire-RK3399 Board (DT) pstate: 00000005 (nzcv daif -PAN -UAO) pc : update_sit_entry+0x304/0x4b0 lr : update_sit_entry+0x108/0x4b0 sp : ffff00000ca13bd0 x29: ffff00000ca13bd0 x28: 000000000000003e x27: 0000000000000020 x26: 0000000000080000 x25: 0000000000000048 x24: ffff8000ebb85cf8 x23: 0000000000000253 x22: 00000000ffffffff x21: 00000000000535f2 x20: 00000000ffffffdf x19: ffff8000eb9e6800 x18: ffff8000eb9e6be8 x17: 0000000007ce6926 x16: 000000001c83ffa8 x15: 0000000000000000 x14: ffff8000f602df90 x13: 0000000000000006 x12: 0000000000000040 x11: 0000000000000228 x10: 0000000000000000 x9 : 0000000000000000 x8 : 0000000000000000 x7 : 00000000000535f2 x6 : ffff8000ebff3440 x5 : ffff8000ebff3440 x4 : ffff8000ebe3a6c8 x3 : 00000000ffffffff x2 : 0000000000000020 x1 : 0000000000000000 x0 : ffff8000eb9e5800 Process nvim (pid: 957, stack limit = 0x0000000063a78320) Call trace: update_sit_entry+0x304/0x4b0 f2fs_invalidate_blocks+0x98/0x140 truncate_node+0x90/0x400 f2fs_remove_inode_page+0xe8/0x340 f2fs_evict_inode+0x2b0/0x408 evict+0xe0/0x1e0 iput+0x160/0x260 do_unlinkat+0x214/0x298 __arm64_sys_unlinkat+0x3c/0x68 el0_svc_handler+0x94/0x118 el0_svc+0x8/0xc Code: f9400800 b9488400 36080140 f9400f01 (387c4820) ---[ end trace a0f21a307118c477 ]--- The reason is it is possible to enable discard flag on block queue via UDEV, but during mount, f2fs will initialize se->discard_map only if this flag is set, once the flag is set after mount, f2fs may dereference NULL pointer on se->discard_map. So this patch does below changes to fix this issue: - initialize and update se->discard_map all the time. - don't clear DISCARD option if device has no QUEUE_FLAG_DISCARD flag during mount. - don't issue small discard on zoned block device. - introduce some functions to enhance the readability. Signed-off-by: Chao Yu Tested-by: Vicente Bergas Signed-off-by: Jaegeuk Kim commit 1618e6e297082def6350887e1c6c606749716fac Author: Chengguang Xu Date: Thu Aug 30 21:33:31 2018 +0800 f2fs: add additional sanity check in f2fs_acl_from_disk() Add additinal sanity check for irregular case(e.g. corruption). If size of extended attribution is smaller than size of acl header, then return -EINVAL. Signed-off-by: Chengguang Xu Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 31962ca6a26087eea255c000ea9fa4ffbdad697b Author: Chris Wilson Date: Wed Sep 5 15:09:21 2018 +0100 drm/i915: Move final cleanup of drm_i915_private to i915_driver_destroy Introduce a complementary function to i915_driver_create() to undo all that is created. Suggested-by: Michal Wajdeczko Signed-off-by: Chris Wilson Cc: Michal Wajdeczko Reviewed-by: Michal Wajdeczko Link: https://patchwork.freedesktop.org/patch/msgid/20180905140921.17467-2-chris@chris-wilson.co.uk commit 55ac5a1614f99816ed367a9ded5f5d65321b522f Author: Chris Wilson Date: Wed Sep 5 15:09:20 2018 +0100 drm/i915: Attach the pci match data to the device upon creation Attach our device_info to the our i915 private on creation so that it is always available for inspection. Signed-off-by: Chris Wilson Reviewed-by: Michal Wajdeczko Link: https://patchwork.freedesktop.org/patch/msgid/20180905140921.17467-1-chris@chris-wilson.co.uk commit 3ee22b769fd761c98eeaceab49153c3eb7612821 Author: Heiko Stuebner Date: Wed Sep 5 21:13:02 2018 +0200 drm/rockchip: rgb: add stub functions when rgb encoder is disabled The newly added internal rgb encoder for Rockchip vops is missing stubs for the case that the rgb output part is not enabled in the kernel config. So add these. Fixes: 1f0f01515172 (drm/rockchip: Add support for Rockchip Soc RGB output interface) Reviewed-by: Sean Paul Signed-off-by: Heiko Stuebner [seanpaul fixed up checkpatch nits] Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20180905191302.26023-1-heiko@sntech.de commit 6ef5bd6cfd5da9fe67aea031fd0a66ff77d64ad6 Author: Stefan Wahren Date: Sat Sep 1 20:16:22 2018 +0200 ARM: dts: bcm283x-rpi-lan7515: Enable Ethernet LEDs Since the LAN7515 on Raspberry Pi 3B+ doesn't have an EEPROM and the OTP is empty, we need to enable the Ethernet LEDs via Device Tree. Signed-off-by: Stefan Wahren commit acb3ef0ee40ea657280a4a11d9f60eb2937c0dca Author: Imre Deak Date: Wed Sep 5 13:00:05 2018 +0300 drm/i915/bdw: Increase IPS disable timeout to 100ms During IPS disabling the current 42ms timeout value leads to occasional timeouts, increase it to 100ms which seems to get rid of the problem. References: https://bugs.freedesktop.org/show_bug.cgi?id=107494 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107562 Reported-by: Diego Viola Tested-by: Diego Viola Cc: Diego Viola Cc: Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180905100005.7663-1-imre.deak@intel.com commit 243bcfafcd9a23a20867fd488dc3a35264918d87 Author: Charles Keepax Date: Wed Sep 5 15:21:02 2018 +0100 ASoC: dapm: Move CODEC to CODEC params from the widget to the runtime Larger CODECs may contain many several hundred widgets and which set of parameters is selected only needs to be recorded on a per DAI basis. As such move the selected CODEC to CODEC link params to be stored in the runtime rather than the DAPM widget, to save some memory. Signed-off-by: Charles Keepax Signed-off-by: Mark Brown commit 4a75aae17b2a802a7267206414050408392c374c Author: Charles Keepax Date: Wed Sep 5 15:21:01 2018 +0100 ASoC: dapm: Add support for multi-CODEC CODEC to CODEC links Currently multi-CODEC is not supported on CODEC to CODEC links. There are common applications where this would be useful, such as connecting two mono amplifiers to an audio CODEC. Adding support simply requires an update of snd_soc_dai_link_event to loop over the attached CODEC DAIs. Signed-off-by: Charles Keepax Signed-off-by: Mark Brown commit 778ff5bb8689eb4fd05a72a409e32a3a34e23faf Author: Charles Keepax Date: Wed Sep 5 15:21:00 2018 +0100 ASoC: dapm: Move connection of CODEC to CODEC DAIs Currently, snd_soc_dapm_connect_dai_link_widgets connects up the routes representing normal DAIs, however CODEC to CODEC links are hooked up through separate infrastructure in soc_link_dai_widgets. Improve the consistency of the code by using snd_soc_dapm_connect_dai_link for both types of DAIs. Signed-off-by: Charles Keepax Signed-off-by: Mark Brown commit 94e630a35d3383b42f12a873a5404bdf61e38e42 Author: Charles Keepax Date: Wed Sep 5 15:20:59 2018 +0100 ASoC: dapm: Cosmetic tidy up of snd_soc_dapm_new_control Move the function snd_soc_dapm_new_control to be next to snd_soc_dapm_new_controls and add some kernel doc for it. Signed-off-by: Charles Keepax Signed-off-by: Mark Brown commit 3bbf5d34fd4a0c41246290b70338095ae291851b Author: Charles Keepax Date: Wed Sep 5 15:20:58 2018 +0100 ASoC: dapm: Move error handling to snd_soc_dapm_new_control_unlocked Currently DAPM has a lot of similar code to handle errors from snd_soc_dapm_new_control_unlocked, and much of this code does not really accurately reflect what the function returns. Firstly, most places will check for a return value of -EPROBE_DEFER and silence any error messages in that case. The one notable exception here being dapm_kcontrol_data_alloc which does currently print any error messages in the case of snd_soc_dapm_new_control_unlocked returning NULL or an error. Additionally the error prints being silenced in these case are redundant as snd_soc_dapm_new_control_unlocked can only return -EPROBE_DEFER or NULL when failing. Secondly, most places will treat a return value of NULL as an -ENOMEM. This is not correct either since any error except EPROBE_DEFER will cause a return value of NULL from snd_soc_dapm_new_control_unlocked. Centralise this handling and the error messages within snd_soc_dapm_new_control_unlocked and update the callers to simply check IS_ERR and return. Note that this update is slightly simpler in the case of dapm_kcontrol_data_alloc where that is fairly close to the handling that was already in place. Signed-off-by: Charles Keepax Signed-off-by: Mark Brown commit 05dcc71298643256948a2e17db7dbecc748719d2 Author: YueHaibing Date: Wed Sep 5 20:24:37 2018 +0800 net: lan743x_ptp: make function lan743x_ptp_set_sync_ts_insert() static Fixes the following sparse warning: drivers/net/ethernet/microchip/lan743x_ptp.c:980:6: warning: symbol 'lan743x_ptp_set_sync_ts_insert' was not declared. Should it be static? Signed-off-by: YueHaibing Signed-off-by: David S. Miller commit fbb66ad5dcbebc1bb9330acfbd684df06e016d56 Author: Wei Yongjun Date: Wed Sep 5 11:16:02 2018 +0000 net/mlx5e: Make function mlx5i_grp_sw_update_stats() static Fixes the following sparse warning: drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c:119:6: warning: symbol 'mlx5i_grp_sw_update_stats' was not declared. Should it be static? Signed-off-by: Wei Yongjun Reviewed-by: Leon Romanovsky Signed-off-by: David S. Miller commit 8473a93d1ba5385f63a128a285702ccc1d3ae2cc Author: Tatsunosuke Tobita Date: Wed Aug 8 09:31:43 2018 +0900 HID: input: Set INPUT_PROP_-property for HID_UP_DIGITIZERS Some system may want to know if a detected digitizer device is either an integrated or an external device. In order to distinguish such condition, setting either INPUT_PROP_DIRECT or INPUT_PROP_POINTER is required, checking the member, "application", in "hid_field" structure. Signed-off-by: Tatsunosuke Tobita Reviewed-by: Ping Cheng Signed-off-by: Jiri Kosina commit 579d03fecb23858e5070ea168e38442ccef80a9d Merge: 36302685f593 014f5a250fc4 Author: David S. Miller Date: Wed Sep 5 07:48:52 2018 -0700 Merge tag 'mac80211-next-for-davem-2018-09-05' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next Johannes Berg says: ==================== This time, we have some pretty impactful work. Among the changes: * changes to make PTK rekeying work better, or actually better/safely if drivers get updated * VHT extended NSS support - some APs had capabilities that didn't fit into the VHT (11ac) spec, so the spec was updated and we follow that now * some TXQ and A-MSDU building work - will allow iwlwifi to use this soon * more HE work, including aligning to 802.11ax Draft 3.0 * L-SIG and 0-length-PSDU support in radiotap ==================== Signed-off-by: David S. Miller commit 0ca33adb91c0a94a29bdcecf49cd08fe24a21666 Author: Haneen Mohammed Date: Tue Sep 4 00:18:17 2018 +0300 drm/vkms: Fix race condition around accessing frame number crtc_state is accessed by both vblank_handle() and the ordered work_struct handle vkms_crc_work_handle() to retrieve and or update the frame number for computed CRC. Since work_struct can fail, add frame_end to account for missing frame numbers. Use (frame_[start/end]) for synchronization between hrtimer callback and ordered work_struct handle. This patch passes the following subtests from igt kms_pipe_crc_basic test: bad-source, read-crc-pipe-A, read-crc-pipe-A-frame-sequence, nonblocking-crc-pipe-A, nonblocking-crc-pipe-A-frame-sequence Signed-off-by: Haneen Mohammed Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20180903211743.GA2773@haneenDRM commit 0fff1428bee08d40a01f24de731f6263f0a013cf Author: Heiko Stuebner Date: Fri Aug 31 09:25:37 2018 +0200 ARM: dts: rockchip: add rk3188 lcd controller nodes Add the core display subsystem and vop nodes to rk3188. Vop0 has a fully dedicated set of pins and only vop1 needs to do pinctrl to have display output, so also add the necessary pinctrl entries for it. Signed-off-by: Heiko Stuebner Reviewed-by Sandy Huang commit 1632936480a53d85ef3012cd9f290e247251cbb9 Author: Arnaldo Carvalho de Melo Date: Wed Sep 5 10:47:56 2018 -0300 perf tests: Fix record+probe_libc_inet_pton.sh without ping's debuginfo When we don't have the iputils-debuginfo package installed, i.e. when we don't have the DWARF information needed to resolve ping's samples, we end up failing this 'perf test' entry: # perf test ping 62: probe libc's inet_pton & backtrace it with ping : Ok # rpm -e iputils-debuginfo # perf test ping 62: probe libc's inet_pton & backtrace it with ping : FAILED! # Fix it to accept "[unknown]" where the symbol + offset, when resolved, is expected. I think this will fail in the other arches as well, but since I can't test now, I'm leaving s390x and ppc cases as-is. Cc: Adrian Hunter Cc: Alexander Shishkin Cc: David Ahern Cc: Hendrik Brueckner Cc: Jiri Olsa Cc: Kim Phillips Cc: Michael Petlan Cc: Namhyung Kim Cc: Naveen N. Rao Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Sandipan Das Cc: Sukadev Bhattiprolu Cc: Thomas Richter Cc: Wang Nan Fixes: 7903a7086723 ("perf script: Show symbol offsets by default") Link: https://lkml.kernel.org/n/tip-hnizqwqrs03vcq1b74yao0f6@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 20487a8ddf207dde042a4463e3f82ab17c17cf13 Author: Rob Herring Date: Mon Aug 27 20:52:04 2018 -0500 ARM: zynq: 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: Michal Simek Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Rob Herring Signed-off-by: Michal Simek commit 7c5d8a249acadc3e9d5af643c0fe24b608a98269 Author: Geert Uytterhoeven Date: Wed Sep 5 10:51:57 2018 +0200 spi: Do not print a message if spi_controller_{suspend,resume}() fails spi_controller_{suspend,resume}() already prints an error message on failure, so there is no need to repeat this in individual drivers. Note: spi_master_{suspend,resume}() is an alias for spi_controller_{suspend,resume}(). Signed-off-by: Geert Uytterhoeven Reviewed-by: Alexandre Belloni Reviewed-by: Daniel Mack Acked-by: Nicolas Ferre Signed-off-by: Mark Brown commit 830e82aa48f32518dfa5335c0134f611d4bab4b2 Author: Jiri Kosina Date: Wed Sep 5 13:24:47 2018 +0200 HID: microsoft: the driver now neeed MEMLESS_FF infrastructure Reflect that fact in Kconfig, the same we do for other such drivers. Reported-by: kbuild test robot Signed-off-by: Jiri Kosina commit 288f1ced5e24abe3e768224f701a205c3a7e16f9 Author: Chris Wilson Date: Tue Sep 4 16:31:17 2018 +0100 drm/i915: Reduce context HW ID lifetime Future gen reduce the number of bits we will have available to differentiate between contexts, so reduce the lifetime of the ID assignment from that of the context to its current active cycle (i.e. only while it is pinned for use by the HW, will it have a constant ID). This means that instead of a max of 2k allocated contexts (worst case before fun with bit twiddling), we instead have a limit of 2k in flight contexts (minus a few that have been pinned by the kernel or by perf). To reduce the number of contexts id we require, we allocate a context id on first and mark it as pinned for as long as the GEM context itself is, that is we keep it pinned it while active on each engine. If we exhaust our context id space, then we try to reclaim an id from an idle context. In the extreme case where all context ids are pinned by active contexts, we force the system to idle in order to recover ids. We cannot reduce the scope of an HW-ID to an engine (allowing the same gem_context to have different ids on each engine) as in the future we will need to preassign an id before we know which engine the context is being executed on. v2: Improved commentary (Tvrtko) [I tried at least] References: https://bugs.freedesktop.org/show_bug.cgi?id=107788 Signed-off-by: Chris Wilson Cc: Lionel Landwerlin Cc: Tvrtko Ursulin Cc: Mika Kuoppala Cc: Michel Thierry Cc: Michal Wajdeczko Cc: Daniele Ceraolo Spurio Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20180904153117.3907-1-chris@chris-wilson.co.uk commit 428e15cc41e3603942edd4a1aa991127ce9eccea Author: Heiko Stuebner Date: Thu Aug 30 13:09:37 2018 +0200 drm/rockchip: vop: add rk3188 vop definitions The rk3188 has 2 vops not using iommus which only output directly to a rgb interface per vop. So all other output modes like hdmi are provided by external brige chips. Signed-off-by: Heiko Stuebner Reviewed-by: Sandy Huang Acked-by: Rob Herring Link: https://patchwork.freedesktop.org/patch/msgid/20180830110937.1739-1-heiko@sntech.de commit 8d544233100b286efff3475d94827819c6375531 Author: Sandy Huang Date: Thu Aug 30 23:12:07 2018 +0200 drm/rockchip: vop: Add directly output rgb feature for px30 Add this feature bit indicate px30 vop can directly output parallel or serial rgb data. Signed-off-by: Sandy Huang Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20180830211207.10480-4-heiko@sntech.de commit 1f0f015151727872be866b6a5b64e07f9e7a3071 Author: Sandy Huang Date: Thu Aug 30 23:12:06 2018 +0200 drm/rockchip: Add support for Rockchip Soc RGB output interface Some Rockchip CRTCs, like rv1108 and px30, can directly output parallel and serial RGB data to panel or conversion chip. So add a feature-bit for vops to mark the ability for these direct outputs and add an internal encoder in that case, that can attach to bridge chipsor panels. Changes in v7: 1. forget to delete rockchip_rgb_driver and delete it. Changes in v6: 1. Update according to Heiko Stuebner' implemention, rgb output is part of vop's feature, should not register as a independent driver. Changes in v5: 1. add SPDX-License-Identifier tag Changes in v4: 1. add support px30; Changes in v3: 1. update for rgb-mode move to panel node. Changes in v2: 1. add error log when probe failed; 2. update name_to_output_mode() according to sean's suggest; 3. Fix uninitialized use of ret. Signed-off-by: Sandy Huang Reviewed-by: Sean Paul Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20180830211207.10480-3-heiko@sntech.de commit 3880f62e476df5fb6fe4ac3ebd2442a9ce306c6b Author: Heiko Stuebner Date: Thu Aug 30 23:12:05 2018 +0200 drm/rockchip: add function to check if endpoint is a subdriver To be able to have both internal subdrivers and external bridge drivers as output endpoints of vops, add a function to be able to distinguish these. changes in v8: - improved function documentation - better error handling - put calls for node and pdev references changes in v6: - added function to check subdriver vs. bridge Signed-off-by: Heiko Stuebner Reviewed-by: Sandy Huang Link: https://patchwork.freedesktop.org/patch/msgid/20180830211207.10480-2-heiko@sntech.de commit 9ae4987ebbb9d9a39c34900304c23a06afb53da2 Author: YueHaibing Date: Fri Aug 31 02:09:06 2018 +0000 pinctrl: sirf: atlas7: remove set but not used variables 'conf, bank' Fixes gcc '-Wunused-but-set-variable' warning: drivers/pinctrl/sirf/pinctrl-atlas7.c: In function 'atlas7_pinmux_resume_noirq': drivers/pinctrl/sirf/pinctrl-atlas7.c:5545:6: warning: variable 'bank' set but not used [-Wunused-but-set-variable] u32 bank; drivers/pinctrl/sirf/pinctrl-atlas7.c:5543:28: warning: variable 'conf' set but not used [-Wunused-but-set-variable] struct atlas7_pad_config *conf; Signed-off-by: YueHaibing Signed-off-by: Linus Walleij commit 0d5b476f8f57fcb06c45fe27681ac47254f63fd2 Author: Douglas Anderson Date: Thu Aug 30 08:23:39 2018 -0700 pinctrl: spmi-mpp: Fix pmic_mpp_config_get() to be compliant If you look at "pinconf-groups" in debugfs for ssbi-mpp you'll notice it looks like nonsense. The problem is fairly well described in commit 1cf86bc21257 ("pinctrl: qcom: spmi-gpio: Fix pmic_gpio_config_get() to be compliant") and commit 05e0c828955c ("pinctrl: msm: Fix msm_config_group_get() to be compliant"), but it was pointed out that ssbi-mpp has the same problem. Let's fix it there too. NOTE: in case it's helpful to someone reading this, the way to tell whether to do the -EINVAL or not is to look at the PCONFDUMP for a given attribute. If the last element (has_arg) is false then you need to do the -EINVAL trick. ALSO NOTE: it seems unlikely that the values returned when we try to get PIN_CONFIG_BIAS_PULL_UP will actually be printed since "has_arg" is false for that one, but I guess it's still fine to return different values so I kept doing that. It seems like another driver (ssbi-gpio) uses a custom attribute (PM8XXX_QCOM_PULL_UP_STRENGTH) for something similar so maybe a future change should do that here too. Fixes: cfb24f6ebd38 ("pinctrl: Qualcomm SPMI PMIC MPP pin controller driver") Signed-off-by: Douglas Anderson Reviewed-by: Stephen Boyd Reviewed-by: Bjorn Andersson Signed-off-by: Linus Walleij commit b432414b996d32a1bd9afe2bd595bd5729c1477f Author: Douglas Anderson Date: Thu Aug 30 08:23:38 2018 -0700 pinctrl: ssbi-gpio: Fix pm8xxx_pin_config_get() to be compliant If you look at "pinconf-groups" in debugfs for ssbi-gpio you'll notice it looks like nonsense. The problem is fairly well described in commit 1cf86bc21257 ("pinctrl: qcom: spmi-gpio: Fix pmic_gpio_config_get() to be compliant") and commit 05e0c828955c ("pinctrl: msm: Fix msm_config_group_get() to be compliant"), but it was pointed out that ssbi-gpio has the same problem. Let's fix it there too. Fixes: b4c45fe974bc ("pinctrl: qcom: ssbi: Family A gpio & mpp drivers") Signed-off-by: Douglas Anderson Reviewed-by: Stephen Boyd Reviewed-by: Bjorn Andersson Signed-off-by: Linus Walleij commit 75f1f19bdd60575164b5d1fb04602bf4450e2b62 Author: Daniel M. Lambea Date: Fri Jul 27 21:19:12 2018 +0100 HID: cougar: Stop processing vendor events on hid-core Special key events received by the custom vendor's hdev are translated to key events on the kbd iface's input device, so their processing must not continue. Return -EPERM from raw_event handler to effectively stop source events from being processed in hid-core. Signed-off-by: Daniel M. Lambea Signed-off-by: Jiri Kosina commit 6b003a8ddd6f413a7e17470515accdd4cd80e871 Author: Daniel M. Lambea Date: Fri Jul 27 21:19:11 2018 +0100 HID: cougar: Make parameter 'g6_is_space' dinamically settable Parameter g6_is_space instructs the driver to map G6 keypresses to KEY_SPACE (true) or to KEY_F18 (false). Make the parameter configurable via module_param_cb to allow users to change its value without reloading the module. Signed-off-by: Daniel M. Lambea Signed-off-by: Jiri Kosina commit 73c5b254c36529c84c9d19e07905f7103bb32e79 Author: Andrey Smirnov Date: Wed Aug 15 19:44:10 2018 -0700 HID: microsoft: Add rumble support for Xbox One S controller Add HID quirk driver for Xbox One S controller over bluetooth. This driver only adds support for rumble. Standard controller functionality is exposed by default HID driver. [jkosina@suse.cz: straightforward rebase on more recent driver code] Cc: Dmitry Torokhov Cc: Jiri Kosina Cc: Benjamin Tissoires Cc: linux-input@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Pierre-Loup A. Griffais Signed-off-by: Juha Kuikka Signed-off-by: Andrey Smirnov Signed-off-by: Jiri Kosina commit f2d3b625dae10cdf14bcfcacb965b02f5c0acc01 Author: Andrey Smirnov Date: Wed Aug 15 19:44:09 2018 -0700 HID: microsoft: Convert private data to be a proper struct In order to be able to have more than just an unsigned long worth of private data, convert the code to allocate and use a dedicated struct. Cc: Dmitry Torokhov Cc: Jiri Kosina Cc: Benjamin Tissoires Cc: linux-input@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Pierre-Loup A. Griffais Signed-off-by: Juha Kuikka Signed-off-by: Andrey Smirnov Signed-off-by: Jiri Kosina commit 014f5a250fc49fa8c6cd50093e725e71f3ae52da Author: Stanislaw Gruszka Date: Wed Aug 22 13:52:22 2018 +0200 cfg80211: validate wmm rule when setting Add validation check for wmm rule when copy rules from fwdb and print error when rule is invalid. Signed-off-by: Stanislaw Gruszka Signed-off-by: Johannes Berg commit 40b5a0f8c6c701dddd9b508b1d244203e89e9422 Author: Gustavo A. R. Silva Date: Tue Sep 4 08:20:01 2018 -0500 mac80211: remove unnecessary NULL check Both old and new cannot be NULL at the same time, hence checking new when old is not NULL is unnecessary. Also, notice that new is being dereferenced before it is checked: idx = new->conf.keyidx; The above triggers a static code analysis warning. Address this by removing the NULL check on new and adding a code comment based on the following piece of code: 387 /* caller must provide at least one old/new */ 388 if (WARN_ON(!new && !old)) 389 return 0; Addresses-Coverity-ID: 1473176 ("Dereference before null check") Signed-off-by: Gustavo A. R. Silva Signed-off-by: Johannes Berg commit 3fe1d6bbcd16f384d2c7dab2caf8e4b2df9ea7e6 Author: Harry Cutts Date: Thu Aug 30 14:56:22 2018 -0700 HID: logitech: Use LDJ_DEVICE macro for existing Logitech mice Signed-off-by: Harry Cutts Reviewed-by: Benjamin Tissoires Signed-off-by: Jiri Kosina commit d56ca9855bf924f3bc9807a3e42f38539df3f41f Author: Harry Cutts Date: Thu Aug 30 14:56:21 2018 -0700 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 Signed-off-by: Harry Cutts Reviewed-by: Benjamin Tissoires Signed-off-by: Jiri Kosina commit 051dc9b0579602bd63e9df74d0879b5293e71581 Author: Harry Cutts Date: Thu Aug 30 14:56:20 2018 -0700 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: Jiri Kosina commit 1ff2e1a44e02d4bdbb9be67c7d9acc240a67141f Author: Harry Cutts Date: Thu Aug 30 14:56:19 2018 -0700 HID: input: Create a utility class for counting scroll events To avoid code duplication, this class counts high-resolution scroll movements and emits the legacy low-resolution events when appropriate. Drivers should be able to create one instance for each scroll wheel that they need to handle. Signed-off-by: Harry Cutts Reviewed-by: Benjamin Tissoires Signed-off-by: Jiri Kosina commit aaf9978c3c0291ef3beaa97610bc9c3084656a85 Author: Harry Cutts Date: Thu Aug 30 14:56:18 2018 -0700 Input: Add the `REL_WHEEL_HI_RES` event code This event code represents scroll reports from high-resolution wheels, and will be used by future patches in this series. See the linux-input "Reporting high-resolution scroll events" thread [0] for more details. [0]: https://www.spinics.net/lists/linux-input/msg57380.html Signed-off-by: Harry Cutts Acked-by: Dmitry Torokhov Reviewed-by: Benjamin Tissoires Signed-off-by: Jiri Kosina commit 9739fe29a207ffff55361a3047e7780ebddccdb2 Author: Sara Sharon Date: Wed Sep 5 08:06:11 2018 +0300 mac80211: add an option for drivers to check if packets can be aggregated Some hardwares have limitations on the packets' type in AMSDU. Add an optional driver callback to determine if two skbs can be used in the same AMSDU or not. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg commit edba6bdad6fef787c0363e8a1e7d91e8d6a10129 Author: Sara Sharon Date: Wed Sep 5 08:06:10 2018 +0300 mac80211: allow AMSDU size limitation per-TID Some drivers may have AMSDU size limitation per TID, due to HW constrains. Add an option to set this limit. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg commit 0eeb2b674f05ccb5162a1d68c0b8ae81e25fd972 Author: Sara Sharon Date: Wed Sep 5 08:06:09 2018 +0300 mac80211: add an option for station management TXQ We have a TXQ abstraction for non-data packets that need powersave buffering. Since the AP cannot sleep, in case of station we can use this TXQ for all management frames, regardless if they are bufferable. Add HW flag to allow that. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg commit add7453ad62f05c8f1a48675bb4dfed52e6ac878 Author: Shaul Triebitz Date: Wed Sep 5 08:06:08 2018 +0300 wireless: align to draft 11ax D3.0 Align to new 11ax draft D3.0. Change/add new MAC and PHY capabilities and update drivers' 11ax capabilities and mac80211's debugfs accordingly. Signed-off-by: Shaul Triebitz Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg commit 77cbbc35a49b75969d98edce9400beb21720aa39 Author: Naftali Goldstein Date: Wed Sep 5 08:06:07 2018 +0300 mac80211: fix saving a few HE values After masking the he_oper_params, to get the requested values as integers one must rshift and not lshift. Fix that by using the le32_get_bits() macro. Fixes: 41cbb0f5a295 ("mac80211: add support for HE") Signed-off-by: Naftali Goldstein [converted to use le32_get_bits()] Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg commit c3d1f8752802b2e1fb12c73bee50035bc125bc54 Author: Shaul Triebitz Date: Wed Sep 5 08:06:06 2018 +0300 mac80211: support reporting 0-length PSDU in radiotap For certain sounding frames, it may be useful to report them to userspace even though they don't have a PSDU in order to determine the PHY parameters (e.g. VHT rate/stream config.) Add support for this to mac80211. Signed-off-by: Johannes Berg Signed-off-by: Shaul Triebitz Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg commit 62872a9b9a106f00360193f428451c321ec2e823 Author: Alexander Wetzel Date: Fri Aug 31 15:00:38 2018 +0200 mac80211: Fix PTK rekey freezes and clear text leak Rekeying PTK keys without "Extended Key ID for Individually Addressed Frames" did use a procedure not suitable to replace in-use keys and could caused the following issues: 1) Freeze caused by incoming frames: If the local STA installed the key prior to the remote STA we still had the old key active in the hardware when mac80211 switched over to the new key. Therefore there was a window where the card could hand over frames decoded with the old key to mac80211 and bump the new PN (IV) value to an incorrect high number. When it happened the local replay detection silently started to drop all frames sent with the new key. 2) Freeze caused by outgoing frames: If mac80211 was providing the PN (IV) and handed over a clear text frame for encryption to the hardware prior to a key change the driver/card could have processed the queued frame after switching to the new key. This bumped the PN value on the remote STA to an incorrect high number, tricking the remote STA to discard all frames we sent later. 3) Freeze caused by RX aggregation reorder buffer: An aggregation session started with the old key and ending after the switch to the new key also bumped the PN to an incorrect high number, freezing the connection quite similar to 1). 4) Freeze caused by repeating lost frames in an aggregation session: A driver could repeat a lost frame and encrypt it with the new key while in a TX aggregation session without updating the PN for the new key. This also could freeze connections similar to 2). 5) Clear text leak: Removing encryption offload from the card cleared the encryption offload flag only after the card had deleted the key and we did not stop TX during the rekey. The driver/card could therefore get unencrypted frames from mac80211 while no longer be instructed to encrypt them. To prevent those issues the key install logic has been changed: - Mac80211 divers known to be able to rekey PTK0 keys have to set @NL80211_EXT_FEATURE_CAN_REPLACE_PTK0, - mac80211 stops queuing frames depending on the key during the replace - the key is first replaced in the hardware and after that in mac80211 - and mac80211 stops/blocks new aggregation sessions during the rekey. For drivers not setting @NL80211_EXT_FEATURE_CAN_REPLACE_PTK0 the user space must avoid PTK rekeys if "Extended Key ID for Individually Addressed Frames" is not being used. Rekeys for mac80211 drivers without this flag will generate a warning and use an extra call to ieee80211_flush_queues() to both highlight and try to prevent the issues with not updated drivers. The core of the fix changes the key install procedure from: - atomic switch over to the new key in mac80211 - remove the old key in the hardware (stops encryption offloading, fall back to software encryption with a potential clear text packet leak in between) - delete the inactive old key in mac80211 - enable hardware encryption offloading for the new key to: - if it's a PTK mark the old key as tainted to drop TX frames with the outgoing key - replace the key in hardware with the new one - atomic switch over to the new (not marked as tainted) key in mac80211 (which also resumes TX) - delete the inactive old key in mac80211 With the new sequence the hardware will be unable to decrypt frames encrypted with the old key prior to switching to the new key in mac80211 and thus prevent PNs from packets decrypted with the old key to be accounted against the new key. For that to work the drivers have to provide a clear boundary. Mac80211 drivers setting @NL80211_EXT_FEATURE_CAN_REPLACE_PTK0 confirm to provide it and mac80211 will then be able to correctly rekey in-use PTK keys with those drivers. The mac80211 requirements for drivers to set the flag have been added to the "Hardware crypto acceleration" documentation section. It drills down to: The drivers must not hand over frames decrypted with the old key to mac80211 once the call to set_key() with %DISABLE_KEY has been completed. It's allowed to either drop or continue to use the old key for any outgoing frames which are already in the queues, but it must not send out any of them unencrypted or encrypted with the new key. Even with the new boundary in place aggregation sessions with the reorder buffer are problematic: RX aggregation session started prior and completed after the rekey could still dump frames received with the old key at mac80211 after it switched over to the new key. This is side stepped by stopping all (RX and TX) aggregation sessions when replacing a PTK key and hardware key offloading. Stopping TX aggregation sessions avoids the need to get the PNs (IVs) updated in frames prepared for the old key and (re)transmitted after the switch to the new key. As a bonus it improves the compatibility when the remote STA is not handling rekeys as it should. When using software crypto aggregation sessions are not stopped. Mac80211 won't be able to decode the dangerous frames and discard them without special handling. Signed-off-by: Alexander Wetzel [trim overly long rekey warning] Signed-off-by: Johannes Berg commit 2b815b04dfe45d1278fd4137675fe1398f656b0a Author: Alexander Wetzel Date: Fri Aug 31 15:00:37 2018 +0200 nl80211: Add CAN_REPLACE_PTK0 API Drivers able to correctly replace a in-use key should set @NL80211_EXT_FEATURE_CAN_REPLACE_PTK0 to allow the user space (e.g. hostapd or wpa_supplicant) to rekey PTK keys. The user space must detect a PTK rekey attempt and only go ahead with it when the driver has set this flag. If the driver is not supporting the feature the user space either must not replace the PTK key or perform a full re-association instead. Ignoring this flag and continuing to rekey the connection can still work but has to be considered insecure and broken. Depending on the driver it can leak clear text packets or freeze the connection and is only supported to allow the user space to be updated. Signed-off-by: Alexander Wetzel Reviewed-by: Denis Kenzior Signed-off-by: Johannes Berg commit d1332e7be25088383527e3de325930bea64780cb Author: Shaul Triebitz Date: Fri Aug 31 11:31:20 2018 +0300 mac80211: support radiotap L-SIG data As before with HE, the data needs to be provided by the driver in the skb head, since there's not enough space in the skb CB. Signed-off-by: Johannes Berg Signed-off-by: Shaul Triebitz Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg commit 70e53669c4c41b0fc043cb0bcb518b53428edf64 Author: Wen Gong Date: Wed Aug 8 18:40:01 2018 +0800 mac80211: Store sk_pacing_shift in ieee80211_hw Make it possibly for drivers to adjust the default skb_pacing_shift by storing it in the hardware struct. Signed-off-by: Wen Gong [adjust commit log, move & adjust comment] Signed-off-by: Johannes Berg commit e80d642552a3190aad97cae6c22742b079b5d30b Author: Johannes Berg Date: Fri Aug 31 11:31:19 2018 +0300 mac80211: copy VHT EXT NSS BW Support/Capable data to station When taking VHT capabilities for a station, copy the new fields if we support them as a transmitter. Also adjust the maximum bandwidth the station supports appropriately. Also, since it was missing, copy tx_highest and rx_highest. Signed-off-by: Johannes Berg commit 7eb26df2972504ffe37da77612c0e5f714f0d6df Author: Johannes Berg Date: Fri Aug 31 11:31:18 2018 +0300 mac80211: add ability to parse CCFS2 With newer VHT implementations, it's necessary to look at the HT operation's CCFS2 field to identify the actual bandwidth used. Signed-off-by: Johannes Berg commit 09b4a4faf9d037990ac4f8110dd944b27b42d5df Author: Johannes Berg Date: Fri Aug 31 11:31:17 2018 +0300 mac80211: introduce capability flags for VHT EXT NSS support Depending on whether or not rate control supports selecting rates depending on the bandwidth, we can use VHT extended NSS support. In essence, this is dot11VHTExtendedNSSBWCapable from the spec, since depending on that we'll need to parse the bandwidth. If needed, also set/clear the VHT Capability Element bit for this capability so that we don't advertise it erroneously or don't advertise it when we actually use it. Signed-off-by: Johannes Berg commit b0aa75f0b1b2e6bc77128fab36c8ed87e84917cc Author: Johannes Berg Date: Fri Aug 31 11:31:16 2018 +0300 ieee80211: add new VHT capability fields/parsing IEEE 802.11-2016 extended the VHT capability fields to allow indicating the number of spatial streams depending on the actually used bandwidth, add support for decoding this. Signed-off-by: Johannes Berg commit 34fb190ec0e2284ef44b34ead88bc192b1212286 Author: Shaul Triebitz Date: Fri Aug 31 11:31:15 2018 +0300 mac80211: in AP mode, set bss_conf::he_supported In AP mode, If AP advertises HE capabilities, set to true bss_conf::he_supported so that the Driver knows about it. Signed-off-by: Shaul Triebitz Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg commit 244eb9ae797385c2ed244f6bdf0534fcaa6f0d33 Author: Shaul Triebitz Date: Fri Aug 31 11:31:14 2018 +0300 cfg80211: add he_capabilities (ext) IE to AP settings Same as for HT and VHT. This helps the lower level to know whether the AP supports HE. Signed-off-by: Shaul Triebitz Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg commit 03512ceb60ae4be71ed3129dabb8625224c8ec40 Author: Sara Sharon Date: Fri Aug 31 11:31:09 2018 +0300 ieee80211: remove redundant leading zeroes The defines of IEEE80211_HE_OPERATION_VHT_OPER_INFO and IEEE80211_HE_OPERATION_MULTI_BSSID_AP have leading zeroes that makes the number look like it is bigger than 32 bit. This is misleading, remove it. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg commit adf8ed01e4fdd254efead978d633718ab01a7d5c Author: Johannes Berg Date: Fri Aug 31 11:31:08 2018 +0300 mac80211: add an optional TXQ for other PS-buffered frames Some drivers may want to also use the TXQ abstraction with non-data packets that need powersave buffering, so add a hardware flag to allow this. Signed-off-by: Johannes Berg commit 331aead5203f5979212e798682ff9157c939ceba Author: Johannes Berg Date: Fri Aug 31 11:31:07 2018 +0300 mac80211: use le16_encode_bits() instead of open-coding Instead of open-coding the equivalent of le16_encode_bits(), just use that. Signed-off-by: Johannes Berg commit 6f527287e0bbcb2d9a9f0580ac0c65786b9b9f0b Author: Johannes Berg Date: Fri Aug 31 11:31:05 2018 +0300 mac80211: remove pointless 'params' NULL checks These checks aren't necessary, cfg80211 never passes NULL. Some static checkers complain about the missing checks on the next line, but really the NULL checks are unnecessary. Signed-off-by: Johannes Berg commit 80aaa9c1641590ab85c74824399cdb6b2e28e772 Author: Ido Yariv Date: Fri Aug 31 11:31:03 2018 +0300 mac80211: Add he_capa debugfs entry Export HE capabilities information via debugfs, similar to HT & VHT. Signed-off-by: Ido Yariv Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg commit 666907a3f9bdd48a3b30f80a2ee2811c625efe22 Author: Corentin Labbe Date: Mon Sep 3 12:02:01 2018 +0200 ARM: dts: sun8i: sun8i-r40-bananapi-m2-ultra: enable AHCI This patch enable the AHCI controller. Since this controller need two regulator, this patch add them. Signed-off-by: Corentin Labbe Signed-off-by: Maxime Ripard commit 41c64d3318aa3fbd3be5f6c35b50a87f050fca0b Author: Corentin Labbe Date: Mon Sep 3 12:02:00 2018 +0200 ARM: dts: sun8i: r40: add sata node R40 have a sata controller which is the same as A20. This patch adds a DT node for it. Signed-off-by: Icenowy Zheng Signed-off-by: Corentin Labbe Signed-off-by: Maxime Ripard commit 633ba1e086e1abbeef1ffd899911de8cf3987d9f Author: Jernej Skrabec Date: Tue Sep 4 12:40:52 2018 +0800 drm/sun4i: Add support for HDMI voltage regulator Some boards have HDMI VCC pin connected to voltage regulator which may not be turned on by default. Add support for such boards by adding voltage regulator handling code to HDMI driver. Signed-off-by: Jernej Skrabec [Icenowy: change supply name to "hvcc"] Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20180904044053.15425-11-icenowy@aosc.io commit 50414b954ba647693db655fb753811dc895e8cbe Author: Icenowy Zheng Date: Tue Sep 4 12:40:51 2018 +0800 dt-bindings: sun4i-drm: add HDMI VCC supply property for sun8i-dw-hdmi Allwiner SoCs with DesignWare HDMI controller all come with a "HVCC" pin, which is the VCC of HDMI part. Add a supply property to specify HVCC's regulator in the device tree. Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20180904044053.15425-10-icenowy@aosc.io commit 8b2a37870419f4aa6e6f837aa8ec627eae984010 Author: Jagan Teki Date: Tue Sep 4 12:40:49 2018 +0800 dt-bindings: clock: sun50i-a64-ccu: Add PLL_VIDEO0 macro Allwinner A64 HDMI PHY clock has PLL_VIDEO0 as a parent. Include the macro on dt-bindings so-that the same can be used while defining CCU clock phandles. Signed-off-by: Jagan Teki Reviewed-by: Rob Herring Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard commit d9ac59978d0dab5c4e2141cd7d62edcbd79434ce Author: Jagan Teki Date: Tue Sep 4 12:40:48 2018 +0800 dt-bindings: display: Add compatible for A64 HDMI The HDMI controller on Allwinner A64 is similar on the one on H3/H5/A83T (although the PHY is different with A83T). Add A64 compatible and append A83T compatible as fallback. Signed-off-by: Jagan Teki Reviewed-by: Rob Herring [Icenowy: refactor commit log] Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20180904044053.15425-7-icenowy@aosc.io commit dd8bd5478cc415158f1861b647e4893c7a314568 Author: Jagan Teki Date: Tue Sep 4 12:40:47 2018 +0800 drm/sun4i: Add support for A64 display engine Display Engine(DE2) in Allwinner A64 has two mixers and tcons. The routing for mixer0 is through tcon0 and connected to LVDS/RGB/MIPI-DSI controller. The routing for mixer1 is through tcon1 and connected to HDMI. Signed-off-by: Jagan Teki Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20180904044053.15425-6-icenowy@aosc.io commit 06f27fe9ffb7efd9902c134f1e5ceb3861a1cefd Author: Jagan Teki Date: Tue Sep 4 12:40:46 2018 +0800 drm/sun4i: Add support for A64 mixers Mixers in Allwinner have similar capabilities as others SoCs with DE2. Add support for them. Signed-off-by: Jagan Teki [Icenowy: Add mixer1] Signed-off-by: Icenowy Zheng Reviewed-by: Jernej Skrabec Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20180904044053.15425-5-icenowy@aosc.io commit 69517c1798f31232f91d9b4f3d07540f9aea6a07 Author: Jagan Teki Date: Tue Sep 4 12:40:45 2018 +0800 dt-bindings: display: Add compatible for A64 DE2 display pipeline Allwinner A64 has a DE2 display pipeline. The TCONs are similar to the ones in A83T, but the mixers are new (similar to the later R40 SoC). This patch adds dt-binding documentation for A64 DE2 display pipeline. Signed-off-by: Jagan Teki Reviewed-by: Rob Herring [Icenowy: Refactor and also cover TCON1] Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20180904044053.15425-4-icenowy@aosc.io commit 5de39acaf34604bd04834f092479cf4dcc946dd4 Author: Icenowy Zheng Date: Tue Sep 4 12:40:44 2018 +0800 clk: sunxi-ng: a64: Add max. rate constraint to video PLLs Video PLLs on A64 can be set to higher rate that it is actually supported by HW. Limit maximum rate to 1008 MHz. This is the maximum allowed rate by BSP clock driver. Interestengly, user manual specifies maximum frequency to be 600 MHz. Historically, this data was wrong in some user manuals for other SoCs, so more faith is put in BSP clock driver. Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard commit 65b1e8a6ca5f5305962daee6af730bd2d210bb0b Author: Jagan Teki Date: Tue Sep 4 12:40:43 2018 +0800 clk: sunxi-ng: a64: Add minimal rate for video PLLs According to documentation and experience with other similar SoCs, video PLLs don't work stable if their output frequency is set below 192 MHz. Because of that, set minimal rate to both A64 video PLLs to 192 MHz. Signed-off-by: Jagan Teki Signed-off-by: Icenowy Zheng Reviewed-by: Jernej Skrabec Signed-off-by: Maxime Ripard commit 0570921c4c32e88a2f6102c476313eaa51c4842a Author: Jagan Teki Date: Tue Sep 4 22:06:07 2018 +0530 arm64: defconfig: Enable CONFIG_DRM_SUN4I Enable DRM Support for Allwinner Display Engine, built as a module. Signed-off-by: Jagan Teki Signed-off-by: Maxime Ripard commit c2ff8383cc33c2d9c169e4daf1e37a434c3bb420 Author: Icenowy Zheng Date: Mon Aug 20 21:40:13 2018 +0800 clk: sunxi-ng: sun50i: h6: Add 2x fixed post-divider to MMC module clocks On the H6, the MMC module clocks are fixed in the new timing mode, i.e. they do not have a bit to select the mode. These clocks have a 2x divider somewhere between the clock and the MMC module. To be consistent with other SoCs supporting the new timing mode, we model the 2x divider as a fixed post-divider on the MMC module clocks. This patch adds the post-dividers to the MMC clocks, following the approach on A64. Fixes: 524353ea480b ("clk: sunxi-ng: add support for the Allwinner H6 CCU") Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard commit 683a0e630cb463d18e9c158496270dc918cf5437 Author: Gustavo A. R. Silva Date: Tue Sep 4 14:07:49 2018 -0500 dma-buf/udmabuf: Fix NULL pointer dereference in udmabuf_create There is a potential execution path in which pointer memfd is NULL when passed as argument to fput(), hence there is a NULL pointer dereference in fput(). Fix this by null checking *memfd* before calling fput(). Addresses-Coverity-ID: 1473174 ("Explicit null dereferenced") Fixes: fbb0de795078 ("Add udmabuf misc device") Signed-off-by: Gustavo A. R. Silva Link: http://patchwork.freedesktop.org/patch/msgid/20180904190749.GA9308@embeddedor.com Signed-off-by: Gerd Hoffmann commit a3b815f09bb846255c458c181b8a5b1cc66891b4 Author: Gerd Hoffmann Date: Wed Aug 29 14:20:26 2018 +0200 drm/virtio: add iommu support. Use the dma mapping api and properly add iommu mappings for objects, unless virtio is in iommu quirk mode. Signed-off-by: Gerd Hoffmann Reviewed-by: Dave Airlie Link: http://patchwork.freedesktop.org/patch/msgid/20180829122026.27012-3-kraxel@redhat.com commit b3f13ec958a77497da76cc7a89d60b741b79ba22 Author: Gerd Hoffmann Date: Wed Aug 29 14:20:25 2018 +0200 drm/virtio: add virtio_gpu_object_detach() function The new function balances virtio_gpu_object_attach(). Also make virtio_gpu_cmd_resource_inval_backing() static and switch call sites to the new virtio_gpu_object_attach() function. Signed-off-by: Gerd Hoffmann Reviewed-by: Dave Airlie Link: http://patchwork.freedesktop.org/patch/msgid/20180829122026.27012-2-kraxel@redhat.com commit 6c19787e10b1bb99abbc3d257156c22bea5ca5b1 Author: Gerd Hoffmann Date: Mon Aug 13 17:28:55 2018 +0200 drm/virtio: track virtual output state Track whenever an virtual output (crtc) is enabled or disabled. On atomic updates check for both framebuffer being present and crtc being enabled to figure whenever the output is active or not. Signed-off-by: Gerd Hoffmann Reviewed-by: Dave Airlie Link: http://patchwork.freedesktop.org/patch/msgid/20180813152855.12863-1-kraxel@redhat.com commit 7948a2b15873319d1bff4d37c09b9f2bf87b9021 Author: Peter Wu Date: Tue Sep 4 22:27:47 2018 +0200 qxl: fix null-pointer crash during suspend "crtc->helper_private" is not initialized by the QXL driver and thus the "crtc_funcs->disable" call would crash (resulting in suspend failure). Fix this by converting the suspend/resume functions to use the drm_mode_config_helper_* helpers. Tested system sleep with QEMU 3.0 using "echo mem > /sys/power/state". During suspend the following message is visible from QEMU: spice/server/display-channel.c:2425:display_channel_validate_surface: canvas address is 0x7fd05da68308 for 0 (and is NULL) spice/server/display-channel.c:2426:display_channel_validate_surface: failed on 0 This seems to be triggered by QXL_IO_NOTIFY_CMD after QXL_IO_DESTROY_PRIMARY_ASYNC, but aside from the warning things still seem to work (tested with both the GTK and -spice options). Signed-off-by: Peter Wu Link: http://patchwork.freedesktop.org/patch/msgid/20180904202747.14968-1-peter@lekensteyn.nl Signed-off-by: Gerd Hoffmann commit 50acec06f3928fc29647aecf1270e54cae583afb Author: Mark Bloch Date: Tue Aug 28 14:18:49 2018 +0300 net/mlx5: Export packet reformat alloc/dealloc functions This will allow for the RDMA side to allocate packet reformat context. Signed-off-by: Mark Bloch Reviewed-by: Saeed Mahameed Signed-off-by: Leon Romanovsky commit 31ca3648f01bf19ae64618521ce539615cc0d5a0 Author: Mark Bloch Date: Tue Aug 28 14:18:48 2018 +0300 net/mlx5: Pass a namespace for packet reformat ID allocation Currently we attach packet reformat actions only to the FDB namespace. In preparation to be able to use that for NIC steering, pass the actual namespace as a parameter. Signed-off-by: Mark Bloch Reviewed-by: Or Gerlitz Reviewed-by: Saeed Mahameed Signed-off-by: Leon Romanovsky commit bea4e1f6c6c5744d467ebf8b0699f5e391835130 Author: Mark Bloch Date: Tue Aug 28 14:18:47 2018 +0300 net/mlx5: Expose new packet reformat capabilities Expose new abilities when creating a packet reformat context. The new types which can be created are: MLX5_REFORMAT_TYPE_L2_TO_L2_TUNNEL: Ability to create generic encap operation to be done by the HW. MLX5_REFORMAT_TYPE_L3_TUNNEL_TO_L2: Ability to create generic decap operation where the inner packet doesn't contain L2. MLX5_REFORMAT_TYPE_L2_TO_L3_TUNNEL: Ability to create generic encap operation to be done by the HW. The L2 of the original packet is dropped. Signed-off-by: Mark Bloch Reviewed-by: Saeed Mahameed Signed-off-by: Leon Romanovsky commit 60786f0987c0d9354e5330ee11615b16cdb448fe Author: Mark Bloch Date: Tue Aug 28 14:18:46 2018 +0300 {net, RDMA}/mlx5: Rename encap to reformat packet Renames all encap mlx5_{core,ib} code to use the new naming of packet reformat. This change doesn't introduce any function change and is needed to properly reflect the operation being done by this action. For example not only can we encapsulate a packet, but also decapsulate it. Signed-off-by: Mark Bloch Reviewed-by: Saeed Mahameed Signed-off-by: Leon Romanovsky commit e0e7a3861b6c6b673dc93e291ef11cf5e746b0c2 Author: Mark Bloch Date: Tue Aug 28 14:18:45 2018 +0300 net/mlx5: Move header encap type to IFC header file Those bits are hardware specification and should be defined in the IFC header file. Signed-off-by: Mark Bloch Reviewed-by: Or Gerlitz Reviewed-by: Saeed Mahameed Signed-off-by: Leon Romanovsky commit 61444b458b01c95e55003d6f0b4d4c936fde51cb Author: Mark Bloch Date: Tue Aug 28 14:18:44 2018 +0300 net/mlx5: Break encap/decap into two separated flow table creation flags Today we are able to attach encap and decap actions only to the FDB. In preparation to enable those actions on the NIC flow tables, break the single flag into two. Those flags control whatever a decap or encap operations can be attached to the flow table created. For FDB, if encapsulation is required, we set both of them. Signed-off-by: Mark Bloch Reviewed-by: Saeed Mahameed Reviewed-by: Or Gerlitz Signed-off-by: Leon Romanovsky commit c3c062f8066504bc38b28266f4b71ff90c3ab8be Author: Mark Bloch Date: Tue Aug 28 14:18:43 2018 +0300 net/mlx5: Add support for more namespaces when allocating modify header There are RX and TX flow steering namespaces with different number of actions. Initialize them accordingly. Signed-off-by: Mark Bloch Reviewed-by: Saeed Mahameed Reviewed-by: Or Gerlitz Signed-off-by: Leon Romanovsky commit 90c1d1b8da67330b09893d749401a45328b51704 Author: Mark Bloch Date: Tue Aug 28 14:18:42 2018 +0300 net/mlx5: Export modify header alloc/dealloc functions Those functions will be used by the RDMA side to create modify header actions to be attached to flow steering rules via verbs. Signed-off-by: Mark Bloch Reviewed-by: Saeed Mahameed Signed-off-by: Leon Romanovsky commit 8ce78257965e6cd49720e653867e766ecd38883f Author: Mark Bloch Date: Tue Aug 28 14:18:41 2018 +0300 net/mlx5: Add proper NIC TX steering flow tables support Extend the ability to add steering rules to NIC TX flow tables. For now, we are only adding TX bypass (egress) which is used by the RDMA side. This will allow to shape outgoing traffic and tweak it if needed, for example performing encapsulation or rewriting headers. Signed-off-by: Mark Bloch Reviewed-by: Saeed Mahameed Signed-off-by: Leon Romanovsky commit 2226dcb424bf0641f9ee61b1209e0bb4e5db5b94 Author: Mark Bloch Date: Tue Aug 28 14:18:40 2018 +0300 net/mlx5: Cleanup flow namespace getter switch logic Refactor the switch logic so it's simpler to follow and understand. Signed-off-by: Mark Bloch Reviewed-by: Saeed Mahameed Signed-off-by: Leon Romanovsky commit 36302685f59345959de96d0d70a5ad20a3a3451b Merge: 2fc4aa59ab47 28619527b8a7 Author: David S. Miller Date: Tue Sep 4 21:33:03 2018 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net commit c6a21c3864fc7f5febae7d096cd136f397c791f2 Author: Majd Dibbiny Date: Tue Aug 28 14:29:05 2018 +0300 IB/mlx5: Change TX affinity assignment in RoCE LAG mode In the current code, the TX affinity is per RoCE device, which can cause unfairness between different contexts. e.g. if we open two contexts, and each open 10 QPs concurrently, all of the QPs of the first context might end up on the first port instead of distributed on the two ports as expected To overcome this unfairness between processes, we maintain per device TX affinity, and per process TX affinity. The allocation algorithm is as follow: 1. Hold two tx_port_affinity atomic variables, one per RoCE device and one per ucontext. Both initialized to 0. 2. In mlx5_ib_alloc_ucontext do: 2.1. ucontext.tx_port_affinity = device.tx_port_affinity 2.2. device.tx_port_affinity += 1 3. In modify QP INIT2RST: 3.1. qp.tx_port_affinity = ucontext.tx_port_affinity % MLX5_PORT_NUM 3.2. ucontext.tx_port_affinity += 1 Signed-off-by: Majd Dibbiny Reviewed-by: Moni Shoua Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 7bb185edb0306bb90029a5fa6b9cff900ffdbf4b Author: Stephen Smalley Date: Tue Sep 4 16:51:36 2018 -0400 selinux: fix mounting of cgroup2 under older policies commit 901ef845fa2469c ("selinux: allow per-file labeling for cgroupfs") broke mounting of cgroup2 under older SELinux policies which lacked a genfscon rule for cgroup2. This prevents mounting of cgroup2 even when SELinux is permissive. Change the handling when there is no genfscon rule in policy to just mark the inode unlabeled and not return an error to the caller. This permits mounting and access if allowed by policy, e.g. to unconfined domains. I also considered changing the behavior of security_genfs_sid() to never return -ENOENT, but the current behavior is relied upon by other callers to perform caller-specific handling. Fixes: 901ef845fa2469c ("selinux: allow per-file labeling for cgroupfs") CC: Reported-by: Dmitry Vyukov Reported-by: Waiman Long Signed-off-by: Stephen Smalley Tested-by: Waiman Long Signed-off-by: Paul Moore commit 2f91eb6951d9e9d8d751a390cfd3e8b0216d88ef Author: Gustavo A. R. Silva Date: Thu Aug 23 20:09:38 2018 -0500 mtd: rawnand: atmel: 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 issue was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva Reviewed-by: Kees Cook Signed-off-by: Miquel Raynal commit 81592c69c9ed34138fef8b6fe3a990f8380148f4 Author: Gustavo A. R. Silva Date: Thu Aug 23 14:33:32 2018 -0500 mtd: rawnand: jz4780: 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); Signed-off-by: Gustavo A. R. Silva Reviewed-by: Boris Brezillon Reviewed-by: Kees Cook Signed-off-by: Miquel Raynal commit a9fdba0b0e5f63646fdf65e0e01dd757b11cec83 Author: Rob Herring Date: Mon Aug 27 20:52:34 2018 -0500 mtd: rawnand: 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: Boris Brezillon Cc: Miquel Raynal Cc: Richard Weinberger Cc: David Woodhouse Cc: Brian Norris Cc: Marek Vasut Cc: linux-mtd@lists.infradead.org Signed-off-by: Rob Herring Acked-by: Boris Brezillon Signed-off-by: Miquel Raynal commit ab0fb17c7d46406e1aac2dda265874751946626d Author: Christoph Hellwig Date: Mon Aug 27 10:59:43 2018 +0200 mtd: rawnand: qcom: don't include dma-direct.h A recent commit removed the incorrect use of phys_to_dma from this driver, but failed to remove the dma-direct.h include, so do that now. Signed-off-by: Christoph Hellwig Signed-off-by: Miquel Raynal commit f1bf52e8657299ecc85db657ee825923a082de28 Author: Masahiro Yamada Date: Mon Aug 20 12:26:36 2018 +0900 mtd: rawnand: denali: use SPDX-License-Identifier and fix license mismatch Use SPDX-License-Identifier instead of the license boilerplates. This conversion makes it easier for us to scan the license, then I notice license mismatch problems. The license blocks in denali* indicate GPL-2.0 "only", while the MODULE_LICENSE in denali.c and denali_dt.c is GPL-2.0 "or later" as explained in include/linux/module.h as follows: "GPL" [GNU Public License v2 or later] "GPL v2" [GNU Public License v2] I fixed the MODULE_LICENSE tags, assuming the license blocks are the authors' intention. Also, add missing MODULE_DESCRIPTION/AUTHOR to denali.c While I am touching the license things, I added my credit to denali.c because this driver was largely re-written by me in 2017. Signed-off-by: Masahiro Yamada Signed-off-by: Miquel Raynal commit ff8648f29fe58c2d94d32a076d2de7b92be4b485 Author: Kurt Kanzenbach Date: Mon Aug 13 09:18:46 2018 +0200 mtd: rawnand: fsl_ifc: fixup SRAM init for newer ctrl versions Newer versions of the IFC controller use a different method of initializing the internal SRAM: Instead of reading from flash, a bit in the NAND configuration register has to be set in order to trigger the self-initializing process. Signed-off-by: Kurt Kanzenbach Signed-off-by: Miquel Raynal commit 434655af6a187129d8114640443b27d2cecfb979 Author: Kurt Kanzenbach Date: Mon Aug 13 09:18:45 2018 +0200 mtd: rawnand: fsl_ifc: check result of SRAM initialization The SRAM initialization might fail. If that happens further NAND operations won't be successful. Therefore, the chip init routine should fail if the SRAM initialization didn't work. Signed-off-by: Kurt Kanzenbach Signed-off-by: Miquel Raynal commit 64a225881705f78537e477c8eec1a9f5b6bc1f73 Author: Miquel Raynal Date: Sun Aug 5 16:52:57 2018 +0200 Documentation: mtd: remove stale pxa3xx NAND controller documentation It is preferred to have the documentation about the drivers directly embedded in the driver itself. Remove this file now that the most important information from this file have been re-written in marvell_nand.c. Signed-off-by: Miquel Raynal Acked-by: Boris Brezillon Acked-by: Ezequiel Garcia commit 33c1c5fee2e88de2ae1efc4554aa7f36d10c3874 Author: Miquel Raynal Date: Sun Aug 5 16:52:56 2018 +0200 mtd: rawnand: marvell: document a bit more the driver A stale document about the old pxa3cc_nand.c driver is available in Documentation/mtd/nand/. Rewrite the parts that explain the IP itself and some non-trivial choices made in the driver directly in marvell_nand.c to then be able to remove this file. Signed-off-by: Miquel Raynal Reviewed-by: Boris Brezillon commit f223713f15171855526232cd71b2dd96eafeb363 Author: KOBAYASHI Yoshitake Date: Sat Aug 4 14:25:52 2018 +0900 mtd: rawnand: toshiba: Add support for Toshiba Memory BENAND (Built-in ECC NAND) This patch is a patch to support TOSHIBA MEMORY CORPORATION BENAND memory devices. Check the status of the built-in ECC with the Read Status command without using the vendor specific command. The Read Status command only knows whether there was bitflips above the threshold and can not get accurate bitflips. For now, I set max_bitflips mtd->bitflip_threshold. Signed-off-by: KOBAYASHI Yoshitake Reviewed-by: Boris Brezillon Signed-off-by: Miquel Raynal commit 88aa3bbfc020d14b13d67af3f5c08aa992d82cd8 Author: Thomas Petazzoni Date: Thu Aug 2 10:56:25 2018 +0200 mtd: rawnand: marvell: use regmap_update_bits() for syscon access The marvell_nfc_init() function fiddles with some bits of a system controller on Armada 7K/8K. However, it does a read/modify/write sequence on GENCONF_CLK_GATING_CTRL and GENCONF_ND_CLK_CTRL, which isn't safe from a concurrency point of view, as the regmap lock isn't taken accross the read/modify/write sequence. To solve this issue, use regmap_update_bits(). While at it, since the "reg" variable is no longer needed for the read/modify/write sequences, get rid of it for the regmap_write() to GENCONF_SOC_DEVICE_MUX, and directly pass the value to be written as argument. Fixes: 02f26ecf8c772 ("mtd: nand: add reworked Marvell NAND controller driver") Signed-off-by: Thomas Petazzoni Signed-off-by: Miquel Raynal commit f31094fe8c16fbd2ca47921acf93b744b045aace Author: Martin Blumenstingl Date: Sat Jul 21 21:05:53 2018 +0200 ARM: dts: meson8b: fix the clock controller register size The clock controller registers are not 0x460 wide because the reset controller starts at CBUS 0x4404. This currently overlaps with the clock controller (which is at CBUS 0x4000). There is no public documentation available on the actual size of the clock controller's register area (also called "HHI"). However, in Amlogic's GPL kernel sources the last "HHI" register is HHI_HDMI_PHY_CNTL2 at CBUS + 0x43a8. 0x400 was chosen because that size doesn't seem unlikely. Fixes: 4a69fcd3a10803 ("ARM: meson: Add DTS for Odroid-C1 and Tronfy MXQ boards") Signed-off-by: Martin Blumenstingl Reviewed-by: Neil Armstrong Signed-off-by: Kevin Hilman commit f7f9da89bc4f61e33f7b9f5c75c4efdc1f0455d8 Author: Martin Blumenstingl Date: Sat Jul 21 21:05:52 2018 +0200 ARM: dts: meson8: fix the clock controller register size The clock controller registers are not 0x460 wide because the reset controller starts at CBUS 0x4404. This currently overlaps with the clock controller (which is at CBUS 0x4000). There is no public documentation available on the actual size of the clock controller's register area (also called "HHI"). However, in Amlogic's GPL kernel sources the last "HHI" register is HHI_HDMI_PHY_CNTL2 at CBUS + 0x43a8. 0x400 was chosen because that size doesn't seem unlikely. Fixes: 2c323c43a3d619 ("ARM: dts: meson8: add and use the real clock controller") Signed-off-by: Martin Blumenstingl Reviewed-by: Neil Armstrong Signed-off-by: Kevin Hilman commit 7525c9518ea6feabc8154956df0891a59a69d289 Author: Boris Brezillon Date: Fri Jul 27 23:05:42 2018 +0200 mtd: rawnand: Get rid of the ->read_word() hook Commit c120e75e0e7d ("mtd: nand: use read_oob() instead of cmdfunc() for bad block check") removed this only user of the ->read_word() method but kept the hook in place. Remove it now. Signed-off-by: Boris Brezillon Signed-off-by: Miquel Raynal commit 52f05b6b87decfc74245ac16b4ae18e321b5ae98 Author: Boris Brezillon Date: Fri Jul 27 09:44:18 2018 +0200 mtd: rawnand: Add the nand_wait_rdy_op() helper and use it In order to make sure we use ->exec_op() to wait for chip readiness when it's available we provide an helper that does the selection between ->exec_op(), udelay(chip->chip_delay) and nand_wait_ready() based on what's implemented by the controller driver. We then use it in nand_wait_readrdy(). Signed-off-by: Boris Brezillon Signed-off-by: Miquel Raynal commit 7ffa13be4945b2f60dfe6c71acbc1fdcfc4629a0 Author: Benjamin Tissoires Date: Tue Sep 4 15:31:15 2018 +0200 HID: multitouch: simplify the application retrieval Now that the application is simply stored in struct hid_input, we can overwrite it in mt_input_mapping() for the faulty egalax and have a simpler suffix processing in mt_input_configured() Signed-off-by: Benjamin Tissoires Signed-off-by: Jiri Kosina commit 85e08e5864458b2e5e25defe2601bd835a42912c Author: Boris Brezillon Date: Fri Jul 27 09:44:17 2018 +0200 mtd: rawnand: Add the nand_wait_readrdy() helper and use it The logic to wait for chip readiness after a page read has been duplicated in nand_do_read_ops() and nand_do_read_oob(). Provide an helper that does the right thing and call it where appropriate. Signed-off-by: Boris Brezillon Signed-off-by: Miquel Raynal commit 9d3f8d2ff777b94993581bdfe5c595c619429624 Author: Chris Wilson Date: Tue Sep 4 17:29:02 2018 +0100 drm/i915: Be defensive and don't assume PSR has any commit to sync against If the previous modeset commit has completed and is no longer part of the crtc state, skip waiting for it. Ville pointed out that, in fact, the commit is never removed after a modeset so the only way we could see a NULL here should be if there was never a commit attached. Nevertheless, we have the evidence it can be NULL and it has been defended against elsewhere, for example commit 93313538c153 ("drm/i915: Pass idle crtc_state to intel_dp_sink_crc"). Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107792 Fixes: c44301fce614 ("drm/i915: Allow control of PSR at runtime through debugfs, v6") Signed-off-by: Chris Wilson Cc: Maarten Lankhorst Cc: Rodrigo Vivi Cc: Dhinakaran Pandiyan Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180904162902.2578-1-chris@chris-wilson.co.uk commit d8e75a110df7e3318990c9fb207ae0aa7812895a Author: Arnaldo Carvalho de Melo Date: Tue Sep 4 10:43:07 2018 -0300 perf map: Turn some pr_warning() to pr_debug() Annoying when using it with --stdio/--stdio2, so just turn them debug, we can get those using -v. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-t3684lkugnf1w4lwcmpj9ivm@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit b1a9e2535e20cdd6cd14eec8128278bc5d97843c Author: Arnaldo Carvalho de Melo Date: Mon Sep 3 16:29:39 2018 -0300 perf trace: Use the raw_syscalls:sys_enter for the augmented syscalls Now we combine what comes from the "bpf-output" event, i.e. what is added in the augmented_syscalls.c BPF program via the __augmented_syscalls__ BPF map, i.e. the payload we get with raw_syscalls:sys_enter tracepoints plus the pointer contents, right after that payload, with the raw_syscall:sys_exit also added, without augmentation, in the augmented_syscalls.c program. The end result is that for the hooked syscalls, we get strace like output with pointer expansion, something that wasn't possible before with just raw_syscalls:sys_enter + raw_syscalls:sys_exit. E.g.: # perf trace -e tools/perf/examples/bpf/augmented_syscalls.c ping -c 2 ::1 0.000 ( 0.008 ms): ping/19573 openat(dfd: CWD, filename: /etc/ld.so.cache, flags: CLOEXEC) = 3 0.036 ( 0.006 ms): ping/19573 openat(dfd: CWD, filename: /lib64/libcap.so.2, flags: CLOEXEC) = 3 0.070 ( 0.004 ms): ping/19573 openat(dfd: CWD, filename: /lib64/libidn.so.11, flags: CLOEXEC) = 3 0.095 ( 0.004 ms): ping/19573 openat(dfd: CWD, filename: /lib64/libcrypto.so.1.1, flags: CLOEXEC) = 3 0.127 ( 0.004 ms): ping/19573 openat(dfd: CWD, filename: /lib64/libresolv.so.2, flags: CLOEXEC) = 3 0.156 ( 0.004 ms): ping/19573 openat(dfd: CWD, filename: /lib64/libm.so.6, flags: CLOEXEC) = 3 0.181 ( 0.004 ms): ping/19573 openat(dfd: CWD, filename: /lib64/libc.so.6, flags: CLOEXEC) = 3 0.212 ( 0.004 ms): ping/19573 openat(dfd: CWD, filename: /lib64/libz.so.1, flags: CLOEXEC) = 3 0.242 ( 0.004 ms): ping/19573 openat(dfd: CWD, filename: /lib64/libdl.so.2, flags: CLOEXEC) = 3 0.266 ( 0.003 ms): ping/19573 openat(dfd: CWD, filename: /lib64/libpthread.so.0, flags: CLOEXEC) = 3 0.709 ( 0.006 ms): ping/19573 open(filename: /usr/lib/locale/locale-archive, flags: CLOEXEC) = 3 PING ::1(::1) 56 data bytes 1.133 ( 0.011 ms): ping/19573 connect(fd: 5, uservaddr: { .family: INET6, port: 1025, addr: ::1 }, addrlen: 28) = 0 64 bytes from ::1: icmp_seq=1 ttl=64 time=0.033 ms 1.234 ( 0.036 ms): ping/19573 sendto(fd: 4, buff: 0x555e5b975720, len: 64, addr: { .family: INET6, port: 58, addr: ::1 }, addr_len: 28) = 64 64 bytes from ::1: icmp_seq=2 ttl=64 time=0.120 ms --- ::1 ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 1000ms rtt min/avg/max/mdev = 0.033/0.076/0.120/0.044 ms 1002.060 ( 0.129 ms): ping/19573 sendto(fd: 4, buff: 0x555e5b975720, len: 64, flags: CONFIRM, addr: { .family: INET6, port: 58, addr: ::1 }, addr_len: 28) = 64 # # perf trace -e tools/perf/examples/bpf/augmented_syscalls.c cat tools/perf/examples/bpf/hello.c #include int syscall_enter(openat)(void *args) { puts("Hello, world\n"); return 0; } license(GPL); 0.000 ( 0.008 ms): cat/20054 openat(dfd: CWD, filename: /etc/ld.so.cache, flags: CLOEXEC) = 3 0.020 ( 0.005 ms): cat/20054 openat(dfd: CWD, filename: /lib64/libc.so.6, flags: CLOEXEC) = 3 0.176 ( 0.011 ms): cat/20054 open(filename: /usr/lib/locale/locale-archive, flags: CLOEXEC) = 3 0.243 ( 0.006 ms): cat/20054 openat(dfd: CWD, filename: tools/perf/examples/bpf/hello.c) = 3 # Now to think how to hook on all syscalls, fallbacking to the non-augmented raw_syscalls:sys_enter payload. Probably the best way is to use a BPF_MAP_TYPE_PROG_ARRAY just like samples/bpf/tracex5_kern.c does. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-nlt60y69o26xi59z5vtpdrj5@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit db2da3f85cd6314321b6a9441a5af8841c93394d Author: Arnaldo Carvalho de Melo Date: Mon Sep 3 16:24:09 2018 -0300 perf trace: Setup augmented_args in the raw_syscalls:sys_enter handler Without using something to augment the raw_syscalls:sys_enter tracepoint payload with the pointer contents, this will work just like before, i.e. the augmented_args arg will be NULL and the augmented_args_size will be 0. This just paves the way for the next cset where we will associate the trace__sys_enter tracepoint handler with the augmented "bpf-output" event named "__augmented_args__". Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-p8uvt2a6ug3uwlhja3cno4la@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit d7065620b89fcc183caa6fa6ea36de5e01211137 Author: Benjamin Tissoires Date: Tue Sep 4 15:31:13 2018 +0200 HID: input: do not append a suffix if the name already has it Or it creates some weird input names like: "MI Dongle MI Wireless Mouse Mouse" Signed-off-by: Benjamin Tissoires Signed-off-by: Jiri Kosina commit 2fc4aa59ab470f1d5124b33c05680e2b2f2c6f65 Author: Gustavo A. R. Silva Date: Mon Sep 3 13:48:45 2018 -0500 net: usbnet: mark expected switch fall-through In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 1077614 ("Missing break in switch") Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller commit dbdb75bd087954aaf9b3248109cb85748b62c21d Author: Ding Xiang Date: Tue Sep 4 16:41:39 2018 +0800 security: tomoyo: Fix obsolete function simple_strtoul is obsolete, and use kstrtouint instead Signed-off-by: Ding Xiang Acked-by: Tetsuo Handa Signed-off-by: James Morris commit e42f6f9be4f83c537aa81b4c6239ea94ff5b29ce Merge: 4408e300a67a 57361846b52b Author: James Morris Date: Tue Sep 4 11:35:54 2018 -0700 Merge tag 'v4.19-rc2' into next-general Sync to Linux 4.19-rc2 for downstream developers. commit 70f7922c25cfb4cc7757f0964919d7d87e2ba250 Merge: b917d58dcfaa d873d5ea89e3 Author: Takashi Iwai Date: Tue Sep 4 20:23:29 2018 +0200 Merge branch 'topic/pcm-indirect-fixes' into for-next Signed-off-by: Takashi Iwai commit 5ddd6582cd7ba018b7527eed1777b7d83e6d9b62 Author: Chris Wilson Date: Mon Sep 3 10:31:55 2018 +0100 drm: Remove "protection" around drm_vma_offset_manager_destroy() Using a spinlock to serialize the destroy function, within the destroy function itself does not prevent the buggy driver from shooting themselves in the foot - either way they still have a use-after-free issue. Reported-by: Jia-Ju Bai Signed-off-by: Chris Wilson Cc: Davidlohr Bueso Cc: Liviu Dudau Cc: Daniel Vetter Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20180903093155.3825-1-chris@chris-wilson.co.uk commit a9734d8ee63346865d5966551ef4aabf8016d8dd Author: Chris Wilson Date: Tue Sep 4 12:57:19 2018 +0100 drm: Suppress user controlled spam for invalid drm_wait_vblank_ioctl The ioctl arguments are under control of the user and as such we should resist any temptation to flood the kernel logs with their errors. Relegate the DRM_ERROR to a DRM_DEBUG so the user has to opt into hearing of their own mistakes. (One day we will have a small ringbuffer attached to the task, so that the concerned process can inspect its own debug info for EINVAL without them being hitting syslog at all.) Signed-off-by: Chris Wilson Cc: Daniel Vetter Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20180904115719.24525-1-chris@chris-wilson.co.uk commit e02eef317d71cea307fc033c92d7d30f1d9d86bb Author: Quentin Schulz Date: Mon Sep 3 10:48:53 2018 +0200 dt-bindings: net: phy: mscc: vsc8531: factorize vsc8531, led-N-mode VSC8584 supports 4 LEDs while VSC8531 only supports 2. Let's factorize the documentation for LED mode properties and give the 4 default values (the first two being shared between VSC8531 and VSC8584). Reviewed-by: Rob Herring Signed-off-by: Quentin Schulz Signed-off-by: David S. Miller commit 4bdbacfda627bc93fe468be97e11257ce1ad1770 Author: Quentin Schulz Date: Mon Sep 3 10:48:52 2018 +0200 dt-bindings: net: phy: mscc: vsc8531: remove compatible from required properties Compatible isn't a required property for PHYs so let's remove it from the binding DT of the VSC8531 PHYs. Acked-by: Rob Herring Reviewed-by: Andrew Lunn Signed-off-by: Quentin Schulz Signed-off-by: David S. Miller commit 5ff8e1f3cd63e892cedf34e374678c2c178000d6 Author: Quentin Schulz Date: Mon Sep 3 10:48:51 2018 +0200 net: phy: mscc: read 'vsc8531, led-%d-mode' as an u32 In the DT binding, it is specified nowhere that 'vsc8531,led-%d-mode' is an u8, even though it's read as an u8 in the driver. Let's update the driver to take into consideration that the 'vsc8531,led-%d-mode' property is of the default type u32. Signed-off-by: Quentin Schulz Signed-off-by: David S. Miller commit 36c53cf0f46526b898390659b125155939f67892 Author: Quentin Schulz Date: Mon Sep 3 10:48:50 2018 +0200 net: phy: mscc: read 'vsc8531, edge-slowdown' as an u32 In the DT binding, it is specified nowhere that 'vsc8531,edge-slowdown' is an u8, even though it's read as an u8 in the driver. Let's update the driver to take into consideration that the 'vsc8531,edge-slowdown' property is of the default type u32. Signed-off-by: Quentin Schulz Signed-off-by: David S. Miller commit a993e0f583c7925adaa7721226ccd7a41e7e63d1 Author: Quentin Schulz Date: Mon Sep 3 10:48:49 2018 +0200 net: phy: mscc: read 'vsc8531,vddmac' as an u32 In the DT binding, it is specified nowhere that 'vsc8531,vddmac' is an u16, even though it's read as an u16 in the driver. Let's update the driver to take into consideration that the 'vsc8531,vddmac' property is of the default type u32. Signed-off-by: Quentin Schulz Signed-off-by: David S. Miller commit 0969abaa5093ef958540c140f86fb6dd46cfa61f Author: Quentin Schulz Date: Mon Sep 3 10:48:48 2018 +0200 net: phy: mscc: factorize function for getting LED mode from DT Microsemi PHYs support different LED modes depending on the variant, so let's factorize the code so we just have to give the supported modes while the logic behind getting the mode remains identical. Signed-off-by: Quentin Schulz Signed-off-by: David S. Miller commit 11bfdabb7ff572935fb110df345ffe946eda905e Author: Quentin Schulz Date: Mon Sep 3 10:48:47 2018 +0200 net: phy: mscc: factorize code for LEDs mode LEDs modes are set the same way, except they are offset by 4 times the index of the LED. Let's factorize all the code so that it's easier to add support for the 4 LEDs of the VSC8584 PHY. Signed-off-by: Quentin Schulz Signed-off-by: David S. Miller commit 6fcde90466738b84a073e4f4d18c50015ee29fb2 Author: Alexander Popov Date: Fri Aug 17 01:17:04 2018 +0300 arm64: Drop unneeded stackleak_check_alloca() Drop stackleak_check_alloca() for arm64 since the STACKLEAK gcc plugin now doesn't track stack depth overflow caused by alloca(). Signed-off-by: Alexander Popov Tested-by: Laura Abbott Signed-off-by: Kees Cook commit 964c9dff0091893a9a74a88edf984c6da0b779f7 Author: Alexander Popov Date: Fri Aug 17 01:17:03 2018 +0300 stackleak: Allow runtime disabling of kernel stack erasing Introduce CONFIG_STACKLEAK_RUNTIME_DISABLE option, which provides 'stack_erasing' sysctl. It can be used in runtime to control kernel stack erasing for kernels built with CONFIG_GCC_PLUGIN_STACKLEAK. Suggested-by: Ingo Molnar Signed-off-by: Alexander Popov Tested-by: Laura Abbott Signed-off-by: Kees Cook commit ed535a2dae1836d15c71e250475952881265d244 Author: Alexander Popov Date: Fri Aug 17 01:17:02 2018 +0300 doc: self-protection: Add information about STACKLEAK feature Add information about STACKLEAK feature to the "Memory poisoning" section of self-protection.rst. Signed-off-by: Alexander Popov Signed-off-by: Kees Cook commit c8d126275a5fa59394fe17109bdb9812fed296b8 Author: Alexander Popov Date: Fri Aug 17 01:17:01 2018 +0300 fs/proc: Show STACKLEAK metrics in the /proc file system Introduce CONFIG_STACKLEAK_METRICS providing STACKLEAK information about tasks via the /proc file system. In particular, /proc//stack_depth shows the maximum kernel stack consumption for the current and previous syscalls. Although this information is not precise, it can be useful for estimating the STACKLEAK performance impact for your workloads. Suggested-by: Ingo Molnar Signed-off-by: Alexander Popov Tested-by: Laura Abbott Signed-off-by: Kees Cook commit f90d1e0c7804b52e12fea501aa46a12c1ff6a567 Author: Alexander Popov Date: Fri Aug 17 01:17:00 2018 +0300 lkdtm: Add a test for STACKLEAK Introduce an lkdtm test for the STACKLEAK feature: check that the current task stack is properly erased (filled with STACKLEAK_POISON). Signed-off-by: Alexander Popov Signed-off-by: Tycho Andersen Tested-by: Laura Abbott Signed-off-by: Kees Cook commit 10e9ae9fabaf96c8e5227c1cd4827d58b3aa406d Author: Alexander Popov Date: Fri Aug 17 01:16:59 2018 +0300 gcc-plugins: Add STACKLEAK plugin for tracking the kernel stack The STACKLEAK feature erases the kernel stack before returning from syscalls. That reduces the information which kernel stack leak bugs can reveal and blocks some uninitialized stack variable attacks. This commit introduces the STACKLEAK gcc plugin. It is needed for tracking the lowest border of the kernel stack, which is important for the code erasing the used part of the kernel stack at the end of syscalls (comes in a separate commit). The STACKLEAK feature is ported from grsecurity/PaX. More information at: https://grsecurity.net/ https://pax.grsecurity.net/ This code is modified from Brad Spengler/PaX Team's code in the last public patch of grsecurity/PaX based on our understanding of the code. Changes or omissions from the original code are ours and don't reflect the original grsecurity/PaX code. Signed-off-by: Alexander Popov Tested-by: Laura Abbott Signed-off-by: Kees Cook commit afaef01c001537fa97a25092d7f54d764dc7d8c1 Author: Alexander Popov Date: Fri Aug 17 01:16:58 2018 +0300 x86/entry: Add STACKLEAK erasing the kernel stack at the end of syscalls The STACKLEAK feature (initially developed by PaX Team) has the following benefits: 1. Reduces the information that can be revealed through kernel stack leak bugs. The idea of erasing the thread stack at the end of syscalls is similar to CONFIG_PAGE_POISONING and memzero_explicit() in kernel crypto, which all comply with FDP_RIP.2 (Full Residual Information Protection) of the Common Criteria standard. 2. Blocks some uninitialized stack variable attacks (e.g. CVE-2017-17712, CVE-2010-2963). That kind of bugs should be killed by improving C compilers in future, which might take a long time. This commit introduces the code filling the used part of the kernel stack with a poison value before returning to userspace. Full STACKLEAK feature also contains the gcc plugin which comes in a separate commit. The STACKLEAK feature is ported from grsecurity/PaX. More information at: https://grsecurity.net/ https://pax.grsecurity.net/ This code is modified from Brad Spengler/PaX Team's code in the last public patch of grsecurity/PaX based on our understanding of the code. Changes or omissions from the original code are ours and don't reflect the original grsecurity/PaX code. Performance impact: Hardware: Intel Core i7-4770, 16 GB RAM Test #1: building the Linux kernel on a single core 0.91% slowdown Test #2: hackbench -s 4096 -l 2000 -g 15 -f 25 -P 4.2% slowdown So the STACKLEAK description in Kconfig includes: "The tradeoff is the performance impact: on a single CPU system kernel compilation sees a 1% slowdown, other systems and workloads may vary and you are advised to test this feature on your expected workload before deploying it". Signed-off-by: Alexander Popov Acked-by: Thomas Gleixner Reviewed-by: Dave Hansen Acked-by: Ingo Molnar Signed-off-by: Kees Cook commit 7adb6bab284627050b778d2f2014ea5857fe8a4b Merge: 57361846b52b 202eb5481421 Author: Olof Johansson Date: Tue Sep 4 10:35:04 2018 -0700 Merge tag 'socfpga_updates_for_v4.20_part1' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux into next/dt SoCFPGA DTS updates for v4.20 - Rename de0_sockit to de0_nano_soc - Update NAND clocking - Set timer interrupt to edge sensitive - Stratix10 platform updates - Update devkit with correct i2c clock * tag 'socfpga_updates_for_v4.20_part1' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux: ARM: dts: socfpga: Rename socfpga_cyclone5_de0_{sockit,nano_soc} ARM: dts: socfpga: update NAND clocking for c5/a5 ARM: dts: arria10: update NAND clocking ARM: dts: socfpga: set timer interrupt to edge sensitive ARM: dts: socfpga: use stdout-path for chosen node arm64: dts: stratix10: i2c clock running out of spec Signed-off-by: Olof Johansson commit 35386dfd13b746daf36a393bdf066dbe9b9b7aed Author: Geert Uytterhoeven Date: Mon Sep 3 19:33:23 2018 +0200 spi: spidev_test: Improve decoded text part of hex dump - Print spaces as spaces, - Do not print characters > 126, as they will be shown as garbage in the modern UTF-8 era, - Use a normal period instead of its hexadecimal ASCII value, - Delimit the text part with pipe symbols on both sides (was left side only), without any spaces, to make it clear where the decoded text starts and ends, - Drop a useless comment. Signed-off-by: Geert Uytterhoeven Signed-off-by: Mark Brown commit 3806112c9ecb4c958581808e0a4040d5de47216a Author: Geert Uytterhoeven Date: Mon Sep 3 19:25:12 2018 +0200 spi: sh-msiof: Document R-Car E3 support Document support for the MSIOF module in the Renesas R-Car E3 (r8a77990) SoC. No driver update is needed. Signed-off-by: Geert Uytterhoeven Signed-off-by: Mark Brown commit 04c55a34cf3d8a39ea85b89cf6b1f6945b3dfc3c Author: Ulrich Hecht Date: Mon Sep 3 19:25:11 2018 +0200 spi: sh-msiof: Document R-Car D3 support Document support for the MSIOF module in the Renesas R-Car D3 (r8a77995) SoC. No driver update is needed. Signed-off-by: Ulrich Hecht Reviewed-by: Simon Horman Reviewed-by: Wolfram Sang Signed-off-by: Geert Uytterhoeven Signed-off-by: Mark Brown commit 0b7990e38971da403ce223d8bdc758a817eb72f8 Author: Kuninori Morimoto Date: Mon Sep 3 02:12:56 2018 +0000 ASoC: add for_each_rtd_codec_dai() macro ALSA SoC snd_soc_pcm_runtime has snd_soc_dai array for codec_dai. To be more readable code, this patch adds new for_each_rtd_codec_dai() macro, and replace existing code to it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit 3db769f17714ae65f2faf44ff2bae9d52f4bd46b Author: Kuninori Morimoto Date: Mon Sep 3 02:12:40 2018 +0000 ASoC: add for_each_link_codecs() macro ALSA SoC snd_soc_dai_link has snd_soc_dai_link_component array for codecs. To be more readable code, this patch adds new for_each_link_codecs() macro, and replace existing code to it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit 1efef7cc72716a168f37c0cc19889a4bf9ee8603 Author: Randy Dunlap Date: Tue Sep 4 08:30:05 2018 -0700 regulator: fix kernel-doc for regulator_suspend() Fix kernel-doc warning: ../drivers/regulator/core.c:4479: warning: Excess function parameter 'state' description in 'regulator_suspend' Signed-off-by: Randy Dunlap Cc: Liam Girdwood Cc: Mark Brown Signed-off-by: Mark Brown commit 18d545bb2599d6e5b0747351eaeebb0160d261f9 Author: Andrew F. Davis Date: Tue Sep 4 10:36:17 2018 -0500 ASoC: tlv320aic31xx: Add overflow detection support Similar to short circuit detection, when the ADC/DAC is saturated and overflows poor audio quality can result and should be reported to the user. This device support Automatic Dynamic Range Compression (DRC) to reduce this but it is not enabled currently in this driver. Signed-off-by: Andrew F. Davis Signed-off-by: Mark Brown commit 0b1ea6f3573a5f68c9a79729c0e4d78c1d1bef36 Author: Jagan Teki Date: Sat Jul 28 23:56:15 2018 +0530 arm64: dts: allwinner: h6: Add OrangePi One Plus initial support OrangePi One Plus 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 - 1Gbps GMAC via RTL8211 - USB 2.0 Host, OTG - HDMI port - 5V/2A DC power supply Signed-off-by: Jagan Teki Acked-by: Maxime Ripard Signed-off-by: Chen-Yu Tsai commit a167b1e1319cac8894a88e9ea05a13be05b46d87 Author: Chris Wilson Date: Tue Sep 4 14:12:07 2018 +0100 drm/i915: Pull intel_uncore_arm_unclaimed_mmio_detection() under the spinlock Elsewhere we manipulate uncore.unclaimed_mmio_check and i915_param.mmio_debug under the irq lock (e.g. preserving the current value across a user forcewake grab), but do not protect the manipulation inside intel_uncore_arm_unclaimed_mmio_detection() from concurrent access, even from itself. This is an issue as we do call arm_unclaimed_mmio_detection from multiple threads without coordination. Suggested-by: Mika Kuoppala Signed-off-by: Chris Wilson Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20180904131207.17563-1-chris@chris-wilson.co.uk commit 6901378c799d2358a2e4eff9818266df73c3b216 Author: Rob Herring Date: Mon Aug 27 09:05:06 2018 -0500 of/unittest: add printf tests for node name Add some printf test for printing the node name (without the unit-address). Reviewed-by: Frank Rowand Signed-off-by: Rob Herring commit b610e2ff4622794f4472b7b0e899b3320671d909 Author: Rob Herring Date: Mon Aug 27 08:38:08 2018 -0500 of/unittest: remove use of node name pointer in overlay high level test In preparation for removing the node name pointer, it needs to be removed from of_unittest_overlay_high_level. However, it's not really correct to use the node name without the unit-address and we should use the full node name. This most easily done by iterating over the child nodes with for_each_child_of_node() which is what of_get_child_by_name() does internally. While at it, we might as well convert the outer loop to use for_each_child_of_node() too instead of open coding it. Reviewed-by: Frank Rowand Signed-off-by: Rob Herring commit b212f0a470eeb62a8eaa95f51b3cdbc457f687a8 Author: Tvrtko Ursulin Date: Mon Sep 3 12:30:07 2018 +0100 drm/i915/icl: Fix context RPCS programming There are two issues with the current RPCS programming for Icelake: Expansion of the slice count bitfield has been missed, as well as the required programming workaround for the subslice count bitfield size limitation. 1) Bitfield width for configuring the active slice count has grown so we need to program the GEN8_R_PWR_CLK_STATE accordingly. Current code was always requesting eight times the number of slices (due writing to a bitfield starting three bits higher than it should). These requests were luckily a) capped by the hardware to the available number of slices, and b) we haven't yet exported the code to ask for reduced slice configurations. Due both of the above there was no impact from this incorrect programming but we should still fix it. 2) Due subslice count bitfield being only three bits wide and furthermore capped to a maximum documented value of four, special programming workaround is needed to enable more than four subslices. With this programming driver has to consider the GT configuration as 2x4x8, while the hardware internally translates this to 1x8x8. A limitation stemming from this is that either a subslice count between one and four can be selected, or a subslice count equaling the total number of subslices in all selected slices. In other words, odd subslice counts greater than four are impossible, as are odd subslice counts greater than a single slice subslice count. This also had no impact in the current code base due breakage from 1) always reqesting more than one slice. While fixing this we also add some asserts to flag up any future bitfield overflows. v2: * Use a local in all branches for clarity. (Lionel) Signed-off-by: Tvrtko Ursulin Bspec: 12247 Reported-by: tony.ye@intel.com Suggested-by: Lionel Landwerlin Cc: Lionel Landwerlin Cc: tony.ye@intel.com Cc: Mika Kuoppala Reviewed-by: Lionel Landwerlin Link: https://patchwork.freedesktop.org/patch/msgid/20180903113007.2643-1-tvrtko.ursulin@linux.intel.com commit 06348d3086a3b34f2db6c7692b4327fb7fc0b6c7 Author: Chris Wilson Date: Tue Sep 4 07:38:02 2018 +0100 drm/i915/ringbuffer: Move double invalidate to after pd flush Continuing the fun of trying to find exactly the delay that is sufficient to ensure that the page directory is fully loaded between context switches, move the extra flush added in commit 70b73f9ac113 ("drm/i915/ringbuffer: Delay after invalidating gen6+ xcs") to just after we flush the pd. Entirely based on the empirical data of running failing tests in a loop until we survive a day (before the mtbf is 10-30 minutes). Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107769 References: 70b73f9ac113 ("drm/i915/ringbuffer: Delay after invalidating gen6+ xcs") Signed-off-by: Chris Wilson Acked-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20180904063802.13880-1-chris@chris-wilson.co.uk commit 7ef4ac6ed9eddd12c48020998d98647d2d85bdb1 Author: Chris Wilson Date: Tue Sep 4 12:17:32 2018 +0100 drm/i915: Double check we didn't miss an unclaimed register access Currently, if the user has enabled mmio-debug around each register access, we presume that we have then checked them all. However, it is still possible through omission (raw register access) or external interaction that the unclaimed access was not highlighted. Signed-off-by: Chris Wilson Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20180904111732.24266-1-chris@chris-wilson.co.uk commit 9f9d594d952abad06f31ed65f29855f3b99a3c17 Author: Ville Syrjälä Date: Mon Sep 3 17:28:41 2018 +0300 drm/i915: Fix ICL+ HDMI clock readout Copy the 38.4 vs. 19.2 MHz ref clock exception from the dpll mgr into the clock readout function as well. v2: Refactor the code into a common function s/is_icl/gen11+/ (Rodrigo) Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107722 Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180903142841.14627-1-ville.syrjala@linux.intel.com Reviewed-by: Rodrigo Vivi commit b9a40816fef79a6053b9d601f50e852acdaafebd Author: Souptick Joarder Date: Tue Sep 4 09:45:05 2018 +0530 Document/gpu: Use new vm_fault_t type We have introduce new return type vm_fault_t for fault handler. Update the document for the same. Signed-off-by: Souptick Joarder Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20180904041505.GA2712@jordon-HP-15-Notebook-PC commit 09adbb5dd01b197d093ec5af82785e49fa0a4a69 Author: Ariel Levkovich Date: Mon Sep 3 20:19:48 2018 +0300 net/mlx5: Add memic command opcode to command checker Adding the alloc/dealloc memic FW command opcodes to avoid "unknown command" prints in the command string converter and internal error status handler. Signed-off-by: Ariel Levkovich Signed-off-by: Leon Romanovsky commit aa7e80b220f3a543eefbe4b7e2c5d2b73e2e2ef7 Author: Moni Shoua Date: Mon Sep 3 20:19:28 2018 +0300 net/mlx5: Fix atomic_mode enum values The field atomic_mode is 4 bits wide and therefore can hold values from 0x0 to 0xf. Remove the unnecessary 20 bit shift that made the values be incorrect. While that, remove unused enum values. Fixes: 57cda166bbe0 ("net/mlx5: Add DCT command interface") Signed-off-by: Moni Shoua Reviewed-by: Artemy Kovalyov Signed-off-by: Leon Romanovsky commit d873d5ea89e39e3224ec873a00414b6861507cac Author: Takashi Iwai Date: Sun Sep 2 10:26:08 2018 +0200 ALSA: mips: Cleanup indirect PCM helper usages We shouldn't set up the indirect PCM parameters at trigger but they should be set at prepare. Also, remove a useless debug message, too. Reviewed-by: Takashi Sakamoto Signed-off-by: Takashi Iwai commit b81e7732ce86eb4b2a7804e1210007f8fcbdb7dd Author: Takashi Iwai Date: Sun Sep 2 10:23:22 2018 +0200 ALSA: cs46xx: Use SNDRV_PCM_INFO_SYNC_APPLPTR info flag The recently introduced PCM info flag assures the call of ack ops at each applptr change, and this is mandatory for the indirect PCM helpers. Reviewed-by: Takashi Sakamoto Signed-off-by: Takashi Iwai commit 10a23f614dc96ff46087edfc1ffd7e19ff23d8fe Author: Takashi Iwai Date: Sun Sep 2 10:23:07 2018 +0200 ALSA: emu10k1: Use SNDRV_PCM_INFO_SYNC_APPLPTR info flag The recently introduced PCM info flag assures the call of ack ops at each applptr change, and this is mandatory for the indirect PCM helpers. Reviewed-by: Takashi Sakamoto Signed-off-by: Takashi Iwai commit dc0d1c4519095a6c6bbd9ec4a808674aba502741 Author: Takashi Iwai Date: Sun Sep 2 10:22:37 2018 +0200 ALSA: mips: Use SNDRV_PCM_INFO_SYNC_APPLPTR info flag The recently introduced PCM info flag assures the call of ack ops at each applptr change, and this is mandatory for the indirect PCM helpers. Also, with the proper ack callback, we need no longer prefill at trigger start. The relevant code can be killed. Reviewed-by: Takashi Sakamoto Signed-off-by: Takashi Iwai commit 38ce57ad164816b432b80feb67d46d53137ff82a Author: Takashi Iwai Date: Sun Sep 2 10:22:13 2018 +0200 ALSA: rme32: Use SNDRV_PCM_INFO_SYNC_APPLPTR info flag The recently introduced PCM info flag assures the call of ack ops at each applptr change, and this is mandatory for the indirect PCM helpers. Also, with the proper ack callback, we need no longer prefill at trigger start. The relevant code can be killed. Reviewed-by: Takashi Sakamoto Signed-off-by: Takashi Iwai commit a6d60245d6d9b1caf66b0d94419988c4836980af Author: Will Deacon Date: Thu Aug 23 21:01:46 2018 +0100 asm-generic/tlb: Track which levels of the page tables have been cleared It is common for architectures with hugepage support to require only a single TLB invalidation operation per hugepage during unmap(), rather than iterating through the mapping at a PAGE_SIZE increment. Currently, however, the level in the page table where the unmap() operation occurs is not stored in the mmu_gather structure, therefore forcing architectures to issue additional TLB invalidation operations or to give up and over-invalidate by e.g. invalidating the entire TLB. Ideally, we could add an interval rbtree to the mmu_gather structure, which would allow us to associate the correct mapping granule with the various sub-mappings within the range being invalidated. However, this is costly in terms of book-keeping and memory management, so instead we approximate by keeping track of the page table levels that are cleared and provide a means to query the smallest granule required for invalidation. Acked-by: Peter Zijlstra (Intel) Acked-by: Nicholas Piggin Signed-off-by: Will Deacon commit 22a61c3c4f1379ef8b0ce0d5cb78baf3178950e2 Author: Peter Zijlstra Date: Thu Aug 23 20:27:25 2018 +0100 asm-generic/tlb: Track freeing of page-table directories in struct mmu_gather Some architectures require different TLB invalidation instructions depending on whether it is only the last-level of page table being changed, or whether there are also changes to the intermediate (directory) entries higher up the tree. Add a new bit to the flags bitfield in struct mmu_gather so that the architecture code can operate accordingly if it's the intermediate levels being invalidated. Acked-by: Nicholas Piggin Signed-off-by: Peter Zijlstra Signed-off-by: Will Deacon commit faaadaf315b48d40b39bf4f0011fa740f40fbe9e Author: Will Deacon Date: Fri Aug 24 13:28:28 2018 +0100 asm-generic/tlb: Guard with #ifdef CONFIG_MMU The inner workings of the mmu_gather-based TLB invalidation mechanism are not relevant to nommu configurations, so guard them with an #ifdef. This allows us to implement future functions using static inlines without breaking the build. Acked-by: Nicholas Piggin Acked-by: Peter Zijlstra (Intel) Signed-off-by: Will Deacon commit cf5652c962dae3bff1e256be7eba142b067e74ba Author: Gustavo A. R. Silva Date: Mon Sep 3 15:17:52 2018 -0500 orinoco_usb: fix spelling mistake in fall-through annotation Replace "fall though" with a proper "fall through" annotation. This fix is part of the ongoing efforts to enabling -Wimplicit-fallthrough Signed-off-by: Gustavo A. R. Silva Signed-off-by: Kalle Valo commit b9bcce366bd5cf5da634a689afcd54058767c359 Author: Kevin Lo Date: Mon Sep 3 22:57:35 2018 +0800 rtlwifi: remove set but unused variables Remove set but unused variables from _rtl88ee_hw_configure() and _rtl8723e_hw_configure(). Signed-off-by: Kevin Lo Acked-by: Ping-Ke Shih Signed-off-by: Kalle Valo commit ec7eccf7ad1cd5f13614e77f59c87fe1f37bf56c Author: YueHaibing Date: Sat Sep 1 07:48:27 2018 +0000 rsi: remove set but not used variables 'header_size' and 'tx_params' Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/wireless/rsi/rsi_91x_hal.c: In function 'rsi_send_data_pkt': drivers/net/wireless/rsi/rsi_91x_hal.c:288:5: warning: variable 'header_size' set but not used [-Wunused-but-set-variable] 'tx_params' only used for 'header_size' dereferenced,so also can be removed. Signed-off-by: YueHaibing Signed-off-by: Kalle Valo commit 7e41fb504592bd5eefc1808bfcac1448c9465081 Author: Igor Stoppa Date: Fri Aug 31 18:03:00 2018 +0300 wireless: remove unnecessary unlikely() Both WARN_ON() and WARN_ON_ONCE() already contain unlikely(). Signed-off-by: Igor Stoppa Cc: Kalle Valo Cc: Christian Lamparter Cc: Michal Kazior Cc: Larry Finger Cc: Linux Kernel Mailing List Cc: Linux Wireless Mailing List Signed-off-by: Kalle Valo commit 514502c3a70bcadd9f7d915524acf09e5fc36f89 Author: Aleksei Mamlin Date: Thu Aug 30 17:05:41 2018 +0300 rtl8xxxu: Add rtl8188ctv support The Realtek rtl8188ctv (0x0bda:0x018a) is a highly integrated single-chip WLAN USB2.0 network interface controller. Currently rtl8188ctv is supported by rtlwifi driver. It is similar to the rtl8188cus(0x0bda:0x818a) and uses the same config. Signed-off-by: Aleksei Mamlin Signed-off-by: Kalle Valo commit b37b30afc2b39642e1a609d94466965642b1b2a7 Author: Kristian Evensen Date: Sat Sep 1 10:38:34 2018 +0200 mt76: Enable NL80211_EXT_FEATURE_CQM_RSSI_LIST Enable the use of CQM_RSSI_LIST with mt76-devices. The change has been tested with the mt7602, mt7603 and mt7621 PCI wifi-cards. I passed a list of RSSI thresholds to the driver, and when disconnecting/connecting the antenna(s) I got an event each time the RSSI went above/below a threshold. While I have not been able to test the change with any of the mt76 USB-devices (no access to a device), the RX RSSI management code is shared between the two device types. Thus, CQM should also work with the mt76 USB-devices. Signed-off-by: Kristian Evensen Signed-off-by: Kalle Valo commit 01b302cd5874e98cb44835ec766597b1524fb7a8 Author: Lorenzo Bianconi Date: Sat Aug 25 12:40:56 2018 +0200 mt76x0: remove unused routines for usb_buff alloc/free Remove the following unused routines for usb buffer allocation/free/submit: - mt76x0_usb_alloc_buf - mt76x0_usb_free_buf - mt76x0_usb_submit_buf Signed-off-by: Lorenzo Bianconi Signed-off-by: Kalle Valo commit a0b65ca60ec7e6fade309dc874f166b1be19a812 Author: Lorenzo Bianconi Date: Sat Aug 25 12:40:55 2018 +0200 mt76x0: use mt76u_mcu_fw_send_data for fw uploading Use mt76u_mcu_fw_send_data utility routine for firmware uploading and remove unused __mt76x0_dma_fw/mt76x0_dma_fw functions Signed-off-by: Lorenzo Bianconi Signed-off-by: Kalle Valo commit 0e3612e06be42a91accec101fdc98bbcbd31f3fe Author: Lorenzo Bianconi Date: Sat Aug 25 12:40:54 2018 +0200 mt76x0: remove unused mt76x0_mcu structure Remove no longer used mt76x0_mcu data structure Signed-off-by: Lorenzo Bianconi Signed-off-by: Kalle Valo commit 6f4796b7063e334902049b0cc41514b6c3b52876 Author: Lorenzo Bianconi Date: Sat Aug 25 12:40:53 2018 +0200 mt76x0: use mt76u_mcu_send_msg utility routine to send fw cmds Use mt76u_mcu_send_msg/__mt76u_mcu_send_msg utility routines to send commands to usb mcu. Remove following unused routines: - mt76x0_mcu_wait_resp - __mt76x0_mcu_msg_send - mt76x0_mcu_msg_send - mt76x0_dma_skb_wrap_cmd - trace_mt_mcu_msg_send_cs - mt76x0_mcu_cmd_deinit Signed-off-by: Lorenzo Bianconi Signed-off-by: Kalle Valo commit 876d3d02ee314250ac53d81977360b72c278be1b Author: Lorenzo Bianconi Date: Sat Aug 25 12:40:52 2018 +0200 mt76x0: remove unused mt76x0_wait_asic_ready routine Delete core.c source file since, removing mt76x0_wait_asic_ready routine, it is no longer needed Signed-off-by: Lorenzo Bianconi Signed-off-by: Kalle Valo commit 172222cff0665c9cbced365d0c1a314507a37d31 Author: Lorenzo Bianconi Date: Sat Aug 25 12:40:51 2018 +0200 mt76x0: remove mt76x0_vendor_request routine Remove mt76x0_vendor_request routine and use mt76u_vendor_request utility function from mt76-usb layer in mt76x0_upload_firmware Signed-off-by: Lorenzo Bianconi Signed-off-by: Kalle Valo commit 73d411e2d499adea41ff4c949b257c458b3b4cd3 Author: Lorenzo Bianconi Date: Sat Aug 25 12:40:50 2018 +0200 mt76x0: remove mt76x0_complete_urb routine Remove mt76x0_complete_urb routine and use mt76u_mcu_complete_urb utility function as usb mcu completion handler Signed-off-by: Lorenzo Bianconi Signed-off-by: Kalle Valo commit ad27c4ae0ba7a4725628c60e2191df7551fbb36e Author: Lorenzo Bianconi Date: Sat Aug 25 12:40:49 2018 +0200 mt76x0: use shared mt76 usb mcu completion Use mt76 usb shared completion data structure in mt76x0_mcu_wait_resp routine and remove mt76x0 private one Signed-off-by: Lorenzo Bianconi Signed-off-by: Kalle Valo commit 84740d5dc66ebe09682f457bae9784a264a94d3c Author: Lorenzo Bianconi Date: Sat Aug 25 12:40:48 2018 +0200 mt76x0: remove mt76x0_mcu_msg_alloc routine Remove mt76x0_mcu_msg_alloc duplicated routine and use mt76u_mcu_msg_alloc utility function for usb mcu message allocation Signed-off-by: Lorenzo Bianconi Signed-off-by: Kalle Valo commit 72750efddba928b98fc86a73ce714bdd3c2b4502 Author: Lorenzo Bianconi Date: Sat Aug 25 12:40:47 2018 +0200 mt76x0: remove mt76x0_vendor_single_wr routine Remove mt76x0_vendor_single_wr routine and use mt76u_single_wr utility function for mcu firmware loading Signed-off-by: Lorenzo Bianconi Signed-off-by: Kalle Valo commit e9fa647a0ad3700240d494168b9976cb69444f27 Author: Lorenzo Bianconi Date: Sat Aug 25 12:40:46 2018 +0200 mt76x0: remove mt76x0_vendor_reset routine Remove mt76x0_vendor_reset duplicated routine and use mt76u_mcu_fw_reset utility function for mcu fw reset Signed-off-by: Lorenzo Bianconi Signed-off-by: Kalle Valo commit 795dbf0fd20cd351178358f90503b56f766ddc3d Author: Lorenzo Bianconi Date: Sat Aug 25 12:40:45 2018 +0200 mt76x0: use mt76u_init for bus initialization Use mt76u_init utility routine for usb initialization. Moreover remove following unused routines: - mt76x0_rr - mt76x0_wr - mt76x0_rmw - mt76x0_wr_copy - mt76x0_assign_pipes Signed-off-by: Lorenzo Bianconi Signed-off-by: Kalle Valo commit 851ab66e293c5ea4a6136c799edc08d4be622e72 Author: Lorenzo Bianconi Date: Sat Aug 25 12:40:44 2018 +0200 mt76: add multiple regs read support to usb_mcu layer Introduce multiple regs read support to mcu layer in mt76-usb module. Multiple regs read will be reused by mt76x0 driver in usb mcu layer unification between mt76x0 and mt76x2u drivers Signed-off-by: Lorenzo Bianconi Signed-off-by: Kalle Valo commit 288d600a8880efdfebc3654fbadf326e9be77908 Author: Lorenzo Bianconi Date: Sat Aug 25 12:40:43 2018 +0200 mt76: move mt76x2u_mcu_deinit routine in mt76-usb module Move mt76x2u_mcu_deinit routine in usb_mcu layer in order to be reused by mt76x0 driver in usb mcu layer unification between mt76x0 and mt76x2u drivers Signed-off-by: Lorenzo Bianconi Signed-off-by: Kalle Valo commit 4c89ff2c74e39b60f1f6e650721f6f92f007ea5b Author: Lorenzo Bianconi Date: Sat Aug 25 12:40:42 2018 +0200 mt76: split __mt76u_mcu_send_msg and mt76u_mcu_send_msg routines Split __mt76u_mcu_send_msg and mt76u_mcu_send_msg in order to be reused by mt76x0 driver in usb mcu layer unification between mt76x0 and mt76x2u drivers Signed-off-by: Lorenzo Bianconi Signed-off-by: Kalle Valo commit 5090efa4a2e85beeb170b4424923c083462ede13 Author: Lorenzo Bianconi Date: Sat Aug 25 12:40:41 2018 +0200 mt76: move mt76_reg_pair definition in mt76.h Move common definition of mt76_reg_pair in mt76.h and remove duplicated code in mt76x2_init_common.c Signed-off-by: Lorenzo Bianconi Signed-off-by: Kalle Valo commit 16c8a792ea4467ccb41df4667f9b13699154004b Author: Stanislaw Gruszka Date: Wed Aug 29 13:16:47 2018 +0200 mt76x0: use mt76x02_sta and mt76x02_tx_status Use common mt76x02_sta and mt76x02_tx_status structures in mt76x0 sub-driver. Signed-off-by: Stanislaw Gruszka Signed-off-by: Kalle Valo commit 78dae93fd8ff0a9f791621b9da0b274413c7fa60 Author: Stanislaw Gruszka Date: Wed Aug 29 13:16:46 2018 +0200 mt76x0: initalize custom tx queues Signed-off-by: Stanislaw Gruszka Signed-off-by: Kalle Valo commit b2d91fb30223a7c0e90b89ccc56bb311729fb7f1 Author: Stanislaw Gruszka Date: Wed Aug 29 13:16:45 2018 +0200 mt76: unify sta structure part 2 Second part of unifying mt76x02_sta structure between mt76x0 and mt76x2. Signed-off-by: Stanislaw Gruszka Signed-off-by: Kalle Valo commit f5a7f126e5fe7dd597ef45e812ddd991be348f64 Author: Stanislaw Gruszka Date: Wed Aug 29 13:16:44 2018 +0200 mt76: unify sta structure part 1 First part of unifying mt76x02_sta structure between mt76x0 and mt76x2. Signed-off-by: Stanislaw Gruszka Signed-off-by: Kalle Valo commit 98ff26e5e21733be4527a9b3ecffe529b282542a Author: Stanislaw Gruszka Date: Wed Aug 29 13:16:43 2018 +0200 mt76: unify mt76x02_vif struct Private vif structures definitions are the same for mt76x2 and mt76x0. Signed-off-by: Stanislaw Gruszka Signed-off-by: Kalle Valo commit 459e237f14cda04232753aa9a44c0da8b629d69b Author: Stanislaw Gruszka Date: Wed Aug 29 13:16:42 2018 +0200 mt76x0: use mt76_wcid_free in mt76x0 Use helper from util instead of custom code. Signed-off-by: Stanislaw Gruszka Signed-off-by: Kalle Valo commit 516ea2a2a9d43a562879634c7d57254b51b0dc60 Author: Stanislaw Gruszka Date: Wed Aug 29 13:16:41 2018 +0200 mt76: use mac_wcid_set_drop in mt76x0 Move mt76x02_mac_wcid_set_drop to common code and use it in mt76x0. Signed-off-by: Stanislaw Gruszka Signed-off-by: Kalle Valo commit 32bb405fe2bc30dc2f2236e97d2767d549021ec3 Author: Stanislaw Gruszka Date: Wed Aug 29 13:16:40 2018 +0200 mt76: unify mac_wcid_setup Merge mt76x{0,2}_mac_wcid_setup into common code. Signed-off-by: Stanislaw Gruszka Signed-off-by: Kalle Valo commit 46436b5ef9dd2b44349641301c35c2181bf7f568 Author: Stanislaw Gruszka Date: Wed Aug 29 13:16:39 2018 +0200 mt76: unify mac_wcid_set_key Merge mt76x{0,2}_mac_wcid_set_key into common code. Signed-off-by: Stanislaw Gruszka Signed-off-by: Kalle Valo commit 047aed1c38cf4bfd5cf42ed845ef721aa6ed1283 Author: Stanislaw Gruszka Date: Wed Aug 29 13:16:38 2018 +0200 mt76: unify mac_shared_key_setup Merge mt76x{0,2} mac_shared_key_setup into common code. Signed-off-by: Stanislaw Gruszka Signed-off-by: Kalle Valo commit d413127359c36ab81d1e5f25d57cce9c4ae40890 Author: Stanislaw Gruszka Date: Wed Aug 29 13:16:37 2018 +0200 mt76: add helpers for register access with mt76_dev struct Add helpers for register access from common code. Signed-off-by: Stanislaw Gruszka Signed-off-by: Kalle Valo commit c378f2473466fa403fb809566f4e81d704d34d21 Author: Stanislaw Gruszka Date: Wed Aug 29 13:16:36 2018 +0200 mt76: unify mac_get_key_info Merge mt76x{0,2} mac_get_key_info into new mt76x02_mac.c file. Signed-off-by: Stanislaw Gruszka Signed-off-by: Kalle Valo commit 108a4861ef19af44dbec89b4f9e2ebc87b781cdc Author: Stanislaw Gruszka Date: Wed Aug 29 13:16:35 2018 +0200 mt76: create new mt76x02-lib module for common mt76x{0,2} code Move rxfilter and mutex to common structure. Create mt76x02-lib.ko for mt76x0 and mt76x2 common functions and create new unified mt76x02_configure_filter() function there. Signed-off-by: Stanislaw Gruszka Signed-off-by: Kalle Valo commit 797ea240782505ddad901a59651b598385a50302 Author: Stanislaw Gruszka Date: Wed Aug 29 13:16:34 2018 +0200 mt76: merge mt76x0/regs.h into mt76x02_regs.h Add missed definitions for mt76x0 into mt76x02_regs.h. Remove mt76x0/regs.h and fixup mt76x0 code to adjust to some diffrent registers/fields names. Signed-off-by: Stanislaw Gruszka Signed-off-by: Kalle Valo commit 89e1b1bc075a74a808779e3e7e90d059132266f4 Author: Stanislaw Gruszka Date: Wed Aug 29 13:16:33 2018 +0200 mt76: rename mt76x2_regs.h MAC registers are the same for mt76x0 and mt76x2. Rename mt76x2_regs.h file to reflect that. Signed-off-by: Stanislaw Gruszka Signed-off-by: Kalle Valo commit 2735a6dd7df3ca95e1e98273abf1048d4c53c0e5 Author: Stanislaw Gruszka Date: Wed Aug 29 13:16:32 2018 +0200 mt76: unify wait_for_mac Create new mt76x02_mac.h for common mac functions of mt76x0 and mt76x2 and unity wait_for_mac for both drivers. Signed-off-by: Stanislaw Gruszka Signed-off-by: Kalle Valo commit f0916167d7e5467fbd1b3654aab396773e8172ae Author: Linus Walleij Date: Mon Sep 3 00:18:51 2018 +0200 gpio: zevio: Include the right header This is a driver so include only . Signed-off-by: Linus Walleij commit 97feacc05dfb601273fd680d7b805b8e09c1bec7 Author: Linus Walleij Date: Wed Aug 29 17:16:18 2018 +0200 gpio: ts5500: Delete platform data handling The TS5500 GPIO driver apparently supports platform data without making any use of it whatsoever. Delete this code, last chance to speak up if you think it is needed. Cc: kernel@savoirfairelinux.com Cc: Vivien Didelot Cc: Jerome Oufella Signed-off-by: Linus Walleij commit bf97279079be21fc843d90489846d2c73c77ed09 Author: Linus Walleij Date: Wed Aug 29 17:08:53 2018 +0200 gpio: ts5500: Use SPDX header Cut some boilerplate, use the SPDX license identifier. Cc: kernel@savoirfairelinux.com Cc: Vivien Didelot Cc: Jerome Oufella Signed-off-by: Linus Walleij commit c99601f672fdb057955a5359ab25958c054b07c5 Author: Linus Walleij Date: Wed Aug 29 17:07:29 2018 +0200 gpio: ts5500: Include the right header This is a GPIO driver so include only . Cc: kernel@savoirfairelinux.com Cc: Vivien Didelot Cc: Jerome Oufella Signed-off-by: Linus Walleij commit 833eacc7b5913da9896bacd30db7d490aa777868 Author: Linus Walleij Date: Wed Aug 29 17:02:16 2018 +0200 gpio: mxs: Get rid of external API call The MXS driver was calling back into the GPIO API from its irqchip. This is not very elegant, as we are a driver, let's just shortcut back into the gpio_chip .get() function instead. This is a tricky case since the .get() callback is not in this file, instead assigned by bgpio_init(). Calling the function direcly in the gpio_chip is however the lesser evil. Cc: Sascha Hauer Cc: Janusz Uzycki Signed-off-by: Linus Walleij commit d5a4da159ed32034be1c7a3c905159b97eb54c5d Author: Linus Walleij Date: Wed Aug 29 16:49:14 2018 +0200 gpio: tps65xxx: Use SPDX license tag I'm tired of boilerplate, use the SPDX tag. Acked-by: Andrew F. Davis Reviewed-by: Keerthy Signed-off-by: Linus Walleij commit 5d75683e2b875fd8f6826d17b68ec665ca379a14 Author: Linus Walleij Date: Wed Aug 29 16:45:30 2018 +0200 gpio: tpx65xxx: Include the right header These are drivers so include only . Acked-by: Andrew F. Davis Reviewed-by: Keerthy Signed-off-by: Linus Walleij commit 802869f4e5423457aa547ea3330eff34b9e16d68 Merge: 68ddc82aff0c ccb7bc0edd99 Author: David S. Miller Date: Mon Sep 3 22:14:41 2018 -0700 Merge branch 'ethernet-over-hdlc' David Gounaris says: ==================== Ethernet over hdlc ==================== Signed-off-by: David S. Miller commit ccb7bc0edd9979b57d2f0becf4d4c7ec62b7202d Author: David Gounaris Date: Mon Sep 3 14:47:30 2018 +0200 net/wan/fsl_ucc_hdlc: tx timeout handler Added tx timeout handler. This helps when troubleshooting. Signed-off-by: David Gounaris Signed-off-by: David S. Miller commit 040b7c94e4ec585149f63f429253a493064749c3 Author: David Gounaris Date: Mon Sep 3 14:47:29 2018 +0200 net/wan/fsl_ucc_hdlc: GUMR for non tsa mode The following bits in the GUMR is changed for non tsa mode: CDS, CTSP and CTSS are set to zero. When set, there is no tx interrupts from the controller. Signed-off-by: David Gounaris Signed-off-by: David S. Miller commit 045f77baf6b429a446ace64ba3174783a933398a Author: David Gounaris Date: Mon Sep 3 14:47:28 2018 +0200 net/wan/fsl_ucc_hdlc: hmask Ability to set hmask in the device-tree, which can be used to change address filtering of packets. Signed-off-by: David Gounaris Signed-off-by: David S. Miller commit 8978ca7c8b7b0710309eb7bf155179d21f5dd3fb Author: David Gounaris Date: Mon Sep 3 14:47:27 2018 +0200 net/wan/fsl_ucc_hdlc: Adding ARPHRD_ETHER This patch is to avoid discarding ethernet packets when using HDLC_ETH protocol. Signed-off-by: David Gounaris Signed-off-by: David S. Miller commit 43a78e0e64d1122fb85527dd96fa786b4084e0df Author: David Gounaris Date: Mon Sep 3 14:47:26 2018 +0200 net/wan/fsl_ucc_hdlc: allow PARITY_CRC16_PR0_CCITT parity Signed-off-by: David Gounaris Signed-off-by: David S. Miller commit d8d7477702f7c7cbc6ed7beb93cc9515753ed9e9 Author: David Gounaris Date: Mon Sep 3 14:47:25 2018 +0200 net/wan/fsl_ucc_hdlc: allow ucc index up to 7 There is a need to allow higher indexes to be able to support MPC83xx platforms. (UCC1-UCC8) Signed-off-by: David Gounaris Signed-off-by: David S. Miller commit 68ddc82aff0c772364757028c2319f386464d512 Author: Rahul Lakkireddy Date: Mon Sep 3 17:41:29 2018 +0530 cxgb4: collect hardware queue descriptors Collect descriptors of all ULD and LLD hardware queues managed by LLD. Signed-off-by: Rahul Lakkireddy Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller commit b5e281ab5a96edf617ed95dc20e6d640c24e301a Author: Ganesh Goudar Date: Mon Sep 3 16:21:46 2018 +0530 cxgb4: when max_tx_rate is 0 disable tx rate limiting in ndo_set_vf_rate() when max_tx_rate is 0 disable tx rate limiting for that vf. Signed-off-by: Casey Leedom Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller commit 4ee5489e5419a9b279ce570fa2ef9e9eddb2fa2a Merge: 05a6843c9281 12f46bc1d447 Author: David S. Miller Date: Mon Sep 3 22:04:46 2018 -0700 Merge branch 'hns3-fixes' Salil Mehta says: ==================== Misc. bug fixes & small enhancements for HNS3 Driver This patch-set presents some fixes and minor enhancements to HNS3 Driver ==================== Signed-off-by: David S. Miller commit 12f46bc1d447ebf6e5bf4d0c318fa7320e1d6dcb Author: Jian Shen Date: Mon Sep 3 11:21:56 2018 +0100 net: hns3: Refine hns3_get_link_ksettings() In the previous implement, the query operation for fibre port and copper port are mixed. This patch refines it by seperating them based on the port type. Signed-off-by: Jian Shen Signed-off-by: Peng Li Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit 7a0a928402689e32dc659b9466cb99254f7f7ed8 Author: Jian Shen Date: Mon Sep 3 11:21:55 2018 +0100 net: hns3: Remove redundant codes of query advertised flow control abilitiy If the advertised flow control ability has been fetched using phy_ethtool_ksettings_get() or hclge_get_link_mode() then it is unnecessary to fetch them again later using hclge_get_flowctrl_adv(). This patch removes it. Signed-off-by: Jian Shen Signed-off-by: Peng Li Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit 7f7d9e501f4123e64b130576621d24f9379adc8f Author: Yunsheng Lin Date: Mon Sep 3 11:21:54 2018 +0100 net: hns3: Change the dst mac addr of loopback packet Currently, the dst mac addr of loopback packet is the same as the host' mac addr, the SSU component may loop back the packet to host before the packet reaches mac or serdes, which will defect the purpose of mac or serdes selftest. This patch changes it by adding 0x1f to the last byte of dst mac addr. Signed-off-by: Yunsheng Lin Signed-off-by: Peng Li Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit 2d03eacc0b7e7aeedce6032f79872f3fd3d1a94f Author: Yunsheng Lin Date: Mon Sep 3 11:21:53 2018 +0100 net: hns3: Only update mac configuation when necessary Currently only fiber port checks if it is necessay to set the mac through firmware when link is changed, this patch unify the checking to allow the copper port do the checking too. Signed-off-by: Yunsheng Lin Signed-off-by: Peng Li Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit daaa8521760ee4d4e65f309c4c37b3a1e58c9d4e Author: Yunsheng Lin Date: Mon Sep 3 11:21:52 2018 +0100 net: hns3: Preserve vlan 0 in hardware table When netdev is down, the stack will delete the vlan from hardware including vlan0, which will cause problem when doing loopback selftest when netdev is down. This patch fixes it by always preserving vlan 0 in hardware, because vlan 0 is defalut vlan, which should always be in hardware. Fixes: c39c4d98dc65 ("net: hns3: Add mac loopback selftest support in hns3 driver") Signed-off-by: Yunsheng Lin Signed-off-by: Peng Li Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit 3f8601f0f5716c4e63a9f215bbc581df42859d61 Author: Yunsheng Lin Date: Mon Sep 3 11:21:51 2018 +0100 net: hns3: Fix ping exited problem when doing lp selftest When ping is runnig and user executes the loopback selftest, the ping cmd will stop and exit. This patch fixes it by using the hns3_nic_net_open/stop to offline the netdev when doing loopback selftest. Fixes: c39c4d98dc65 ("net: hns3: Add mac loopback selftest support in hns3 driver") Signed-off-by: Yunsheng Lin Signed-off-by: Peng Li Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit 0f29fc23b21d3cbd966537bfabba07c00466b787 Author: Yunsheng Lin Date: Mon Sep 3 11:21:50 2018 +0100 net: hns3: Fix for loopback selftest failed problem Tqp and mac need to be enabled when doing loopback selftest, ae_algo->ops->start/stop is used to do the job, there is a time window between ae_algo->ops->start/stop and loopback setup, which will cause selftest failed problem when there is frame coming in during that time window. This patch fixes it by enabling the tqp and mac during loopback setup process. Fixes: c39c4d98dc65 ("net: hns3: Add mac loopback selftest support in hns3 driver") Signed-off-by: Yunsheng Lin Signed-off-by: Peng Li Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit ce2c1d2ea67adf2742d4d3ef58f8d668b3a6b85f Author: Yunsheng Lin Date: Mon Sep 3 11:21:49 2018 +0100 net: hns3: Implement shutdown ops in hns3 pci driver This patch implements shutdown ops in hns3 pci driver, which unloads the hns3 driver and set the power state to D3hot. Signed-off-by: Yunsheng Lin Signed-off-by: Peng Li Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit 54e97d117bafa161b08c6ade243a335d92890d94 Author: Jian Shen Date: Mon Sep 3 11:21:48 2018 +0100 net: hns3: Fix error of checking used vlan id PF uses hdev->vlan_table to manage the port vlan table. In function hclge_set_vlan_filter_hw(), it checks whether a vlan id has been used, by foreach all the vport bits. It should use macro HCLGE_VPORT_NUM, not VLAN_N_VID as the foreach condition. Fixes: 6c251711b37f ("net: hns3: Disable vf vlan filter when vf vlan table is full") Signed-off-by: Jian Shen Signed-off-by: Peng Li Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit fd5f9da3f6583046215d614a87792b46e55785e2 Author: Huazhong Tan Date: Mon Sep 3 11:21:47 2018 +0100 net: hns3: Fix for multicast failure When the lower 24 bits of the IPV6 link-local addresses at both ends are the same, the multicast MAC address for Neigbour Discovery is the same. The multicast for Neigbour Discovery will fail. This patch fixes it by including the bonding uplink port in the multicast group. Fixes: 46a3df9f9718("net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support") Signed-off-by: Huazhong Tan Signed-off-by: Peng Li Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit 41dafea2af781d8e3ab8626d236b52e4172905a3 Author: Yunsheng Lin Date: Mon Sep 3 11:21:46 2018 +0100 net: hns3: Fix for vf vlan delete failed problem There are only 128 entries in vf vlan table, if user has added more than 128 vlan, fw will ignore it and disable the vf vlan table. So when user deletes the vlan entry that has not been set to vf vlan table, fw will return not found result and driver treat that as error, which will cause vlan delete failed problem. This patch fixes it by returning ok when fw returns not found result. Fixes: 6c251711b37f ("net: hns3: Disable vf vlan filter when vf vlan table is full") Signed-off-by: Yunsheng Lin Signed-off-by: Peng Li Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit 05a6843c9281807c51e44d76e2b8bf3e3a678a1c Author: Zhenbo Gao Date: Mon Sep 3 14:08:40 2018 +0800 tipc: correct structure parameter comments for topsrv Remove the following obsolete parameter comments of tipc_topsrv struct: @rcvbuf_cache @tipc_conn_new @tipc_conn_release @tipc_conn_recvmsg @imp @type Add the comments for the missing parameters below of tipc_topsrv struct: @awork @listener Remove the unused or duplicated parameter comments of tipc_conn struct: @outqueue_lock @rx_action Signed-off-by: Zhenbo Gao Reviewed-by: Ying Xue Signed-off-by: David S. Miller commit a1b22a5f45fe884147a99e7c381bcc48d9b2acef Author: Eric Biggers Date: Sat Sep 1 00:17:07 2018 -0700 crypto: arm/chacha20 - faster 8-bit rotations and other optimizations Optimize ChaCha20 NEON performance by: - Implementing the 8-bit rotations using the 'vtbl.8' instruction. - Streamlining the part that adds the original state and XORs the data. - Making some other small tweaks. On ARM Cortex-A7, these optimizations improve ChaCha20 performance from about 12.08 cycles per byte to about 11.37 -- a 5.9% improvement. There is a tradeoff involved with the 'vtbl.8' rotation method since there is at least one CPU (Cortex-A53) where it's not fastest. But it seems to be a better default; see the added comment. Overall, this patch reduces Cortex-A53 performance by less than 0.5%. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 11dcb1037f40a19f298845a9b2ec093f7b8b958b Author: Martin K. Petersen Date: Thu Aug 30 11:00:16 2018 -0400 crc-t10dif: Allow current transform to be inspected in sysfs Add a way to print the currently active CRC algorithm in: /sys/module/crc_t10dif/parameters/transform Signed-off-by: Martin K. Petersen Signed-off-by: Herbert Xu commit b76377543b738a6b58b0a7b0a42dd9e16436fee1 Author: Martin K. Petersen Date: Thu Aug 30 11:00:15 2018 -0400 crc-t10dif: Pick better transform if one becomes available T10 CRC library is linked into the kernel thanks to block and SCSI. The crypto accelerators are typically loaded later as modules and are therefore not available when the T10 CRC library is initialized. Use the crypto notifier facility to trigger a switch to a better algorithm if one becomes available after the initial hash has been registered. Use RCU to protect the original transform while the new one is being set up. Suggested-by: Ard Biesheuvel Signed-off-by: Martin K. Petersen Signed-off-by: Herbert Xu commit dd8b083f9a5ed06946d559e0ca1eda0577ef24a9 Author: Martin K. Petersen Date: Thu Aug 30 11:00:14 2018 -0400 crypto: api - Introduce notifier for new crypto algorithms Introduce a facility that can be used to receive a notification callback when a new algorithm becomes available. This can be used by existing crypto registrations to trigger a switch from a software-only algorithm to a hardware-accelerated version. A new CRYPTO_MSG_ALG_LOADED state is introduced to the existing crypto notification chain, and the register/unregister functions are exported so they can be called by subsystems outside of crypto. Signed-off-by: Martin K. Petersen Suggested-by: Herbert Xu Signed-off-by: Martin K. Petersen Signed-off-by: Herbert Xu commit 2fffee536c6875bdf546cee0045fed8faa5ea51f Author: Ard Biesheuvel Date: Mon Aug 27 17:38:12 2018 +0200 crypto: arm64/crct10dif - implement non-Crypto Extensions alternative The arm64 implementation of the CRC-T10DIF algorithm uses the 64x64 bit polynomial multiplication instructions, which are optional in the architecture, and if these instructions are not available, we fall back to the C routine which is slow and inefficient. So let's reuse the 64x64 bit PMULL alternative from the GHASH driver that uses a sequence of ~40 instructions involving 8x8 bit PMULL and some shifting and masking. This is a lot slower than the original, but it is still twice as fast as the current [unoptimized] C code on Cortex-A53, and it is time invariant and much easier on the D-cache. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 6c1b0da13e521fa5cb4a3541b991efb100aced35 Author: Ard Biesheuvel Date: Mon Aug 27 17:38:11 2018 +0200 crypto: arm64/crct10dif - preparatory refactor for 8x8 PMULL version Reorganize the CRC-T10DIF asm routine so we can easily instantiate an alternative version based on 8x8 polynomial multiplication in a subsequent patch. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 598b7d41e544322c8c4f3737ee8ddf905a44175e Author: Ard Biesheuvel Date: Mon Aug 27 13:02:45 2018 +0200 crypto: arm64/crc32 - remove PMULL based CRC32 driver Now that the scalar fallbacks have been moved out of this driver into the core crc32()/crc32c() routines, we are left with a CRC32 crypto API driver for arm64 that is based only on 64x64 polynomial multiplication, which is an optional instruction in the ARMv8 architecture, and is less and less likely to be available on cores that do not also implement the CRC32 instructions, given that those are mandatory in the architecture as of ARMv8.1. Since the scalar instructions do not require the special handling that SIMD instructions do, and since they turn out to be considerably faster on some cores (Cortex-A53) as well, there is really no point in keeping this code around so let's just remove it. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit ed6ed11830a9ded520db31a6e2b69b6b0a1eb0e2 Author: Ard Biesheuvel Date: Thu Aug 23 17:48:45 2018 +0100 crypto: arm64/aes-modes - get rid of literal load of addend vector Replace the literal load of the addend vector with a sequence that performs each add individually. This sequence is only 2 instructions longer than the original, and 2% faster on Cortex-A53. This is an improvement by itself, but also works around a Clang issue, whose integrated assembler does not implement the GNU ARM asm syntax completely, and does not support the =literal notation for FP registers (more info at https://bugs.llvm.org/show_bug.cgi?id=38642) Cc: Nick Desaulniers Signed-off-by: Ard Biesheuvel Reviewed-by: Nick Desaulniers Signed-off-by: Herbert Xu commit 00227e3a1d0855e9777cf53c52b842503435e22b Author: Ard Biesheuvel Date: Thu Aug 23 15:48:51 2018 +0100 crypto: arm/ghash-ce - implement support for 4-way aggregation Speed up the GHASH algorithm based on 64-bit polynomial multiplication by adding support for 4-way aggregation. This improves throughput by ~85% on Cortex-A53, from 1.7 cycles per byte to 0.9 cycles per byte. When combined with AES into GCM, throughput improves by ~25%, from 3.8 cycles per byte to 3.0 cycles per byte. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit ab8085c130edd65be0d95cc95c28b51c4c6faf9d Author: Ard Biesheuvel Date: Wed Aug 22 10:51:44 2018 +0200 crypto: x86 - remove SHA multibuffer routines and mcryptd As it turns out, the AVX2 multibuffer SHA routines are currently broken [0], in a way that would have likely been noticed if this code were in wide use. Since the code is too complicated to be maintained by anyone except the original authors, and since the performance benefits for real-world use cases are debatable to begin with, it is better to drop it entirely for the moment. [0] https://marc.info/?l=linux-crypto-vger&m=153476243825350&w=2 Suggested-by: Eric Biggers Cc: Megha Dey Cc: Tim Chen Cc: Geert Uytterhoeven Cc: Martin Schwidefsky Cc: Heiko Carstens Cc: Thomas Gleixner Cc: Ingo Molnar Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 820684cc269f8295f13c890491dcbe07fdc647af Author: Tudor Ambarus Date: Tue Aug 21 16:36:09 2018 +0300 crypto: atmel - switch to SPDX license identifiers Adopt the SPDX license identifiers to ease license compliance management. Signed-off-by: Tudor Ambarus Signed-off-by: Herbert Xu commit e82867fddd28b236d488751899310397b4f871f3 Author: Brijesh Singh Date: Wed Aug 15 16:11:25 2018 -0500 crypto: ccp - add timeout support in the SEV command Currently, the CCP driver assumes that the SEV command issued to the PSP will always return (i.e. it will never hang). But recently, firmware bugs have shown that a command can hang. Since of the SEV commands are used in probe routines, this can cause boot hangs and/or loss of virtualization capabilities. To protect against firmware bugs, add a timeout in the SEV command execution flow. If a command does not complete within the specified timeout then return -ETIMEOUT and stop the driver from executing any further commands since the state of the SEV firmware is unknown. Cc: Tom Lendacky Cc: Gary Hook Cc: Herbert Xu Cc: linux-kernel@vger.kernel.org Signed-off-by: Brijesh Singh Signed-off-by: Herbert Xu commit f3569fd613f669c95ad187208ad281995f30cc2a Author: Kees Cook Date: Tue Aug 7 14:18:42 2018 -0700 crypto: shash - Remove VLA usage in unaligned hashing In the quest to remove all stack VLA usage from the kernel[1], this uses the newly defined max alignment to perform unaligned hashing to avoid VLAs, and drops the helper function while adding sanity checks on the resulting buffer sizes. Additionally, the __aligned_largest macro is removed since this helper was the only user. [1] https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qPXydAacU1RqZWA@mail.gmail.com Signed-off-by: Kees Cook Signed-off-by: Herbert Xu commit 1299c9cfae6dccd79e4e035cad44f99fdb828593 Author: Kees Cook Date: Tue Aug 7 14:18:41 2018 -0700 crypto: qat - Remove VLA usage In the quest to remove all stack VLA usage from the kernel[1], this uses the new upper bound for the stack buffer. Also adds a sanity check. [1] https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qPXydAacU1RqZWA@mail.gmail.com Signed-off-by: Kees Cook Signed-off-by: Herbert Xu commit a9f7f88a12f1494deca1fd9e173c7ae886d14f91 Author: Kees Cook Date: Tue Aug 7 14:18:40 2018 -0700 crypto: api - Introduce generic max blocksize and alignmask In the quest to remove all stack VLA usage from the kernel[1], this exposes a new general upper bound on crypto blocksize and alignmask (higher than for the existing cipher limits) for VLA removal, and introduces new checks. At present, the highest cra_alignmask in the kernel is 63. The highest cra_blocksize is 144 (SHA3_224_BLOCK_SIZE, 18 8-byte words). For the new blocksize limit, I went with 160 (20 8-byte words). [1] https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qPXydAacU1RqZWA@mail.gmail.com Signed-off-by: Kees Cook Signed-off-by: Herbert Xu commit b68a7ec1e9a3efac53ae26a1658a553825a2375c Author: Kees Cook Date: Tue Aug 7 14:18:38 2018 -0700 crypto: hash - Remove VLA usage In the quest to remove all stack VLA usage from the kernel[1], this removes the VLAs in SHASH_DESC_ON_STACK (via crypto_shash_descsize()) by using the maximum allowable size (which is now more clearly captured in a macro), along with a few other cases. Similar limits are turned into macros as well. A review of existing sizes shows that SHA512_DIGEST_SIZE (64) is the largest digest size and that sizeof(struct sha3_state) (360) is the largest descriptor size. The corresponding maximums are reduced. [1] https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qPXydAacU1RqZWA@mail.gmail.com Signed-off-by: Kees Cook Signed-off-by: Herbert Xu commit ebf533adc877d9171800bbce77372d8051fc35c2 Author: Ard Biesheuvel Date: Tue Aug 7 14:18:37 2018 -0700 crypto: ccm - Remove VLA usage In the quest to remove all stack VLA usage from the kernel[1], this drops AHASH_REQUEST_ON_STACK by preallocating the ahash request area combined with the skcipher area (which are not used at the same time). [1] https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qPXydAacU1RqZWA@mail.gmail.com Signed-off-by: Ard Biesheuvel Signed-off-by: Kees Cook Signed-off-by: Herbert Xu commit d73d67fbcb94409e0a92952750f162d4eb696e96 Author: Kees Cook Date: Tue Aug 7 14:18:36 2018 -0700 crypto: cbc - Remove VLA usage In the quest to remove all stack VLA usage from the kernel[1], this uses the upper bounds on blocksize. Since this is always a cipher blocksize, use the existing cipher max blocksize. [1] https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qPXydAacU1RqZWA@mail.gmail.com Signed-off-by: Kees Cook Signed-off-by: Herbert Xu commit 3bdd23f886c08a0d649c535e1e2cf083ec600036 Author: Kees Cook Date: Tue Aug 7 14:18:35 2018 -0700 crypto: xcbc - Remove VLA usage In the quest to remove all stack VLA usage from the kernel[1], this uses the maximum blocksize and adds a sanity check. For xcbc, the blocksize must always be 16, so use that, since it's already being enforced during instantiation. [1] https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qPXydAacU1RqZWA@mail.gmail.com Signed-off-by: Kees Cook Signed-off-by: Herbert Xu commit 578bdaabd015b9b164842c3e8ace9802f38e7ecc Author: Jason A. Donenfeld Date: Tue Aug 7 08:22:25 2018 +0200 crypto: speck - remove Speck These are unused, undesired, and have never actually been used by anybody. The original authors of this code have changed their mind about its inclusion. While originally proposed for disk encryption on low-end devices, the idea was discarded [1] in favor of something else before that could really get going. Therefore, this patch removes Speck. [1] https://marc.info/?l=linux-crypto-vger&m=153359499015659 Signed-off-by: Jason A. Donenfeld Acked-by: Eric Biggers Cc: stable@vger.kernel.org Acked-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 9dbe3072c6b1f28000961e34497237d0e3d13318 Author: Horia Geantă Date: Mon Aug 6 15:44:00 2018 +0300 crypto: caam/qi - ablkcipher -> skcipher conversion Convert driver from deprecated ablkcipher API to skcipher. Link: https://www.mail-archive.com/search?l=mid&q=20170728085622.GC19664@gondor.apana.org.au Signed-off-by: Horia Geantă Signed-off-by: Herbert Xu commit 5ca7badb1f6266d3d519be110dc84ffb224d80c9 Author: Horia Geantă Date: Mon Aug 6 15:43:59 2018 +0300 crypto: caam/jr - ablkcipher -> skcipher conversion Convert driver from deprecated ablkcipher API to skcipher. Link: https://www.mail-archive.com/search?l=mid&q=20170728085622.GC19664@gondor.apana.org.au Signed-off-by: Horia Geantă Signed-off-by: Herbert Xu commit aec48adce85d4ca96b0f75cd951c06b6bee613a4 Author: Horia Geantă Date: Mon Aug 6 15:43:58 2018 +0300 crypto: caam/qi - remove ablkcipher IV generation IV generation is done only at AEAD level. Support in ablkcipher is not needed, thus remove the dead code. Link: https://www.mail-archive.com/search?l=mid&q=20160901101257.GA3362@gondor.apana.org.a Signed-off-by: Horia Geantă Signed-off-by: Herbert Xu commit cf5448b5c3d847ce348d6f2041d6c4e42bbdac6e Author: Horia Geantă Date: Mon Aug 6 15:43:57 2018 +0300 crypto: caam/jr - remove ablkcipher IV generation IV generation is done only at AEAD level. Support in ablkcipher is not needed, thus remove the dead code. Link: https://www.mail-archive.com/search?l=mid&q=20160901101257.GA3362@gondor.apana.org.au Signed-off-by: Horia Geantă Signed-off-by: Herbert Xu commit 35878618c92db85c4e077ada6c2c18ac79ccadb8 Author: Pradeep Nalla Date: Fri Aug 31 17:44:07 2018 -0700 liquidio: Added delayed work for periodically updating the link statistics. Signed-off-by: Pradeep Nalla Signed-off-by: Felix Manlunas Signed-off-by: David S. Miller commit b917d58dcfaada52bbf2c734411c87532c0af67d Author: Rob Herring Date: Tue Aug 28 10:44:31 2018 -0500 ALSA: aoa: 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: Rob Herring Signed-off-by: Takashi Iwai commit 8a041f86a83f9783ba23a423a2d5a51b48136850 Author: Arnaldo Carvalho de Melo Date: Mon Sep 3 16:07:53 2018 -0300 perf trace: Introduce syscall__augmented_args() method That will be used by trace__sys_enter when we start combining the augmented syscalls:sys_enter_FOO + syscalls:sys_exit_FOO. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-iiseo3s0qbf9i3rzn8k597bv@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 7538d16397dfc72d8b61a99c32c592a75ae7f157 Author: Arnaldo Carvalho de Melo Date: Mon Sep 3 15:18:37 2018 -0300 perf augmented_syscalls: Avoid optimization to pass older BPF validators See https://www.spinics.net/lists/netdev/msg480099.html for the whole discussio, but to make the augmented_syscalls.c BPF program to get built and loaded successfully in a greater range of kernels, add an extra check. Related patch: a60dd35d2e39 ("bpf: change bpf_perf_event_output arg5 type to ARG_CONST_SIZE_OR_ZERO") That is in the kernel since v4.15, I couldn't figure why this is hitting me with 4.17.17, but adding the workaround discussed there makes this work with this fedora kernel and with 4.18.recent. Before: # uname -a Linux seventh 4.17.17-100.fc27.x86_64 #1 SMP Mon Aug 20 15:53:11 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux # perf trace -e tools/perf/examples/bpf/augmented_syscalls.c cat /etc/passwd > /dev/null libbpf: load bpf program failed: Permission denied libbpf: -- BEGIN DUMP LOG --- libbpf: 0: (bf) r6 = r1 1: (b7) r1 = 0 2: (7b) *(u64 *)(r10 -8) = r1 3: (7b) *(u64 *)(r10 -16) = r1 4: (7b) *(u64 *)(r10 -24) = r1 5: (7b) *(u64 *)(r10 -32) = r1 6: (7b) *(u64 *)(r10 -40) = r1 7: (7b) *(u64 *)(r10 -48) = r1 8: (7b) *(u64 *)(r10 -56) = r1 9: (7b) *(u64 *)(r10 -64) = r1 10: (7b) *(u64 *)(r10 -72) = r1 11: (7b) *(u64 *)(r10 -80) = r1 12: (7b) *(u64 *)(r10 -88) = r1 13: (7b) *(u64 *)(r10 -96) = r1 14: (7b) *(u64 *)(r10 -104) = r1 15: (7b) *(u64 *)(r10 -112) = r1 16: (7b) *(u64 *)(r10 -120) = r1 17: (7b) *(u64 *)(r10 -128) = r1 18: (7b) *(u64 *)(r10 -136) = r1 19: (7b) *(u64 *)(r10 -144) = r1 20: (7b) *(u64 *)(r10 -152) = r1 21: (7b) *(u64 *)(r10 -160) = r1 22: (7b) *(u64 *)(r10 -168) = r1 23: (7b) *(u64 *)(r10 -176) = r1 24: (7b) *(u64 *)(r10 -184) = r1 25: (7b) *(u64 *)(r10 -192) = r1 26: (7b) *(u64 *)(r10 -200) = r1 27: (7b) *(u64 *)(r10 -208) = r1 28: (7b) *(u64 *)(r10 -216) = r1 29: (7b) *(u64 *)(r10 -224) = r1 30: (7b) *(u64 *)(r10 -232) = r1 31: (7b) *(u64 *)(r10 -240) = r1 32: (7b) *(u64 *)(r10 -248) = r1 33: (7b) *(u64 *)(r10 -256) = r1 34: (7b) *(u64 *)(r10 -264) = r1 35: (7b) *(u64 *)(r10 -272) = r1 36: (7b) *(u64 *)(r10 -280) = r1 37: (7b) *(u64 *)(r10 -288) = r1 38: (7b) *(u64 *)(r10 -296) = r1 39: (7b) *(u64 *)(r10 -304) = r1 40: (7b) *(u64 *)(r10 -312) = r1 41: (bf) r7 = r10 42: (07) r7 += -312 43: (bf) r1 = r7 44: (b7) r2 = 48 45: (bf) r3 = r6 46: (85) call bpf_probe_read#4 47: (79) r3 = *(u64 *)(r6 +24) 48: (bf) r1 = r10 49: (07) r1 += -256 50: (b7) r8 = 256 51: (b7) r2 = 256 52: (85) call bpf_probe_read_str#45 53: (bf) r1 = r0 54: (67) r1 <<= 32 55: (77) r1 >>= 32 56: (bf) r5 = r0 57: (07) r5 += 56 58: (2d) if r8 > r1 goto pc+1 R0=inv(id=0) R1=inv(id=0,umin_value=256,umax_value=4294967295,var_off=(0x0; 0xffffffff)) R5=inv(id=0) R6=ctx(id=0,off=0,imm=0) R7=fp-312,call_-1 R8=inv256 R10=fp0,call_-1 fp-264=0 59: (b7) r5 = 312 60: (63) *(u32 *)(r10 -264) = r0 61: (67) r5 <<= 32 62: (77) r5 >>= 32 63: (bf) r1 = r6 64: (18) r2 = 0xffff8b9120cc8500 66: (18) r3 = 0xffffffff 68: (bf) r4 = r7 69: (85) call bpf_perf_event_output#25 70: (b7) r0 = 0 71: (95) exit from 58 to 60: R0=inv(id=0) R1=inv(id=0,umax_value=255,var_off=(0x0; 0xff)) R5=inv(id=0) R6=ctx(id=0,off=0,imm=0) R7=fp-312,call_-1 R8=inv256 R10=fp0,call_-1 fp-264=0 60: (63) *(u32 *)(r10 -264) = r0 61: (67) r5 <<= 32 62: (77) r5 >>= 32 63: (bf) r1 = r6 64: (18) r2 = 0xffff8b9120cc8500 66: (18) r3 = 0xffffffff 68: (bf) r4 = r7 69: (85) call bpf_perf_event_output#25 R5 unbounded memory access, use 'var &= const' or 'if (var < const)' libbpf: -- END LOG -- libbpf: failed to load program 'syscalls:sys_enter_openat' libbpf: failed to load object 'tools/perf/examples/bpf/augmented_syscalls.c' bpf: load objects failed: err=-4007: (Kernel verifier blocks program loading) event syntax error: 'tools/perf/examples/bpf/augmented_syscalls.c' \___ Kernel verifier blocks program loading After: # perf trace -e tools/perf/examples/bpf/augmented_syscalls.c cat /etc/passwd > /dev/null 0.000 cat/29249 openat(dfd: CWD, filename: /etc/ld.so.cache, flags: CLOEXEC) 0.008 cat/29249 syscalls:sys_exit_openat:0x3 0.021 cat/29249 openat(dfd: CWD, filename: /lib64/libc.so.6, flags: CLOEXEC) 0.025 cat/29249 syscalls:sys_exit_openat:0x3 0.180 cat/29249 open(filename: /usr/lib/locale/locale-archive, flags: CLOEXEC) 0.185 cat/29249 syscalls:sys_exit_open:0x3 0.242 cat/29249 openat(dfd: CWD, filename: /etc/passwd) 0.245 cat/29249 syscalls:sys_exit_openat:0x3 # It also works with a more recent kernel: # uname -a Linux jouet 4.18.0-00014-g4e67b2a5df5d #6 SMP Thu Aug 30 17:34:17 -03 2018 x86_64 x86_64 x86_64 GNU/Linux # perf trace -e tools/perf/examples/bpf/augmented_syscalls.c cat /etc/passwd > /dev/null 0.000 cat/26451 openat(dfd: CWD, filename: /etc/ld.so.cache, flags: CLOEXEC) 0.020 cat/26451 syscalls:sys_exit_openat:0x3 0.039 cat/26451 openat(dfd: CWD, filename: /lib64/libc.so.6, flags: CLOEXEC) 0.044 cat/26451 syscalls:sys_exit_openat:0x3 0.231 cat/26451 open(filename: /usr/lib/locale/locale-archive, flags: CLOEXEC) 0.238 cat/26451 syscalls:sys_exit_open:0x3 0.278 cat/26451 openat(dfd: CWD, filename: /etc/passwd) 0.282 cat/26451 syscalls:sys_exit_openat:0x3 # Cc: Adrian Hunter Cc: Daniel Borkmann Cc: David Ahern Cc: Gianluca Borello Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Cc: Yonghong Song Link: https://lkml.kernel.org/n/tip-wkpsivs1a9afwldbul46btbv@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 21d7eb9a24739cdc5ea19c90a79e5a585866ba35 Author: Arnaldo Carvalho de Melo Date: Mon Sep 3 15:02:22 2018 -0300 perf augmented_syscalls: Check probe_read_str() return separately Using a value returned from probe_read_str() to tell how many bytes to copy using perf_event_output() has issues in some older kernels, like 4.17.17-100.fc27.x86_64, so separate the bounds checking done on how many bytes to copy to a separate variable, so that the next patch has only what is being done to make the test pass on older BPF validators. For reference, see the discussion in this thread: https://www.spinics.net/lists/netdev/msg480099.html Cc: Adrian Hunter Cc: Daniel Borkmann Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Cc: Yonghong Song Link: https://lkml.kernel.org/n/tip-jtsapwibyxrnv1xjfsgzp0fj@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit f1908735f141f662fbf04436e6efc1560418b5a0 Author: Niklas Cassel Date: Tue Jun 12 13:39:06 2018 +0200 ath10k: allow ATH10K_SNOC with COMPILE_TEST ATH10K_SNOC builds just fine with COMPILE_TEST, so make that possible. Signed-off-by: Niklas Cassel Signed-off-by: Kalle Valo commit e12e643c1dfb46a807a9c03149ad81b11c9db683 Author: Rob Herring Date: Tue Aug 28 19:48:46 2018 +0300 ath6kl: 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: Kalle Valo Cc: "David S. Miller" Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Rob Herring Signed-off-by: Kalle Valo commit 828853ac58265c93249b53ba81782213962d5d4e Author: Wen Gong Date: Tue Aug 28 19:48:42 2018 +0300 ath10k: add waiting htt tx complete before wow enable If there are some tx packets pending in firmware, and then system enters suspend, firmware will fail for wow enable. This will trigger mac80211 to stop ath10k and download firmware again, then it is non-wow suspend. After add the waiting htt tx complete, then firmware will have some time window to send or flush the pending tx packets. Tested with QCA6174 PCI with firmware WLAN.RM.4.4.1-00109-QCARMSWPZ-1, but this will also affect QCA9377 PCI. It's not a regression with new firmware releases. Signed-off-by: Wen Gong Signed-off-by: Kalle Valo commit d6acae363e63d655ba892c139ba14f24206462c0 Author: Chris Wilson Date: Mon Sep 3 16:23:04 2018 +0100 drm/i915: Use a cached mapping for the physical HWS Older gen use a physical address for the hardware status page, for which we use cache-coherent writes. As the writes are into the cpu cache, we use a normal WB mapped page to read the HWS, used for our seqno tracking. Anecdotally, I observed lost breadcrumbs writes into the HWS on i965gm, which so far have not reoccurred with this patch. How reliable that evidence is remains to be seen. v2: Explicitly pass the expected physical address to the hw v3: Also remember the wild writes we once had for HWS above 4G. Signed-off-by: Chris Wilson Cc: Daniel Vetter Cc: Joonas Lahtinen Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20180903152304.31589-2-chris@chris-wilson.co.uk commit a0e731f4e26c4d774e71f9e69fff3e88d49dd34f Author: Chris Wilson Date: Mon Sep 3 16:23:03 2018 +0100 drm/i915: Combine cleanup_status_page() Pull the physical status page cleanup into a common cleanup_status_page() for caller simplicity. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20180903152304.31589-1-chris@chris-wilson.co.uk commit 46223993c2e4fbbb5bd35b5abef0c6b663ebba58 Author: Chris Wilson Date: Mon Sep 3 16:02:16 2018 +0100 drm/i915: Fix up FORCE_GPU_RELOC (debug) to flush CPU write domains We currently assert that if the target is in a CPU write domain, we use a CPU reloc path rather than the GPU reloc path. However, we have a debug override to force the GPU path and that unfortunately hits the assert. Include the async clflush under the debug option to ensure correct behaviour even when debugging, and strict when not. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20180903150216.19965-1-chris@chris-wilson.co.uk commit 9d5804662ce1f9bdde0a14c3c40940acbbf09538 Author: Brian Norris Date: Tue Aug 28 19:48:17 2018 +0300 ath10k: retrieve MAC address from system firmware if provided Devices may provide their own MAC address via system firmware (e.g., device tree), especially in the case where the device doesn't have a useful EEPROM on which to store its MAC address (e.g., for integrated Wifi). Use the generic device helper to retrieve the MAC address, and (if present) honor it above the MAC address advertised by the card. Signed-off-by: Brian Norris Signed-off-by: Kalle Valo commit 6e4228fbaf0fce00f3d348a7b89d28288e73293c Author: Michał Mirosław Date: Sat Sep 1 16:08:51 2018 +0200 drm/tegra: kick out simplefb Kick out firmware fb when loading Tegra driver. Signed-off-by: Michał Mirosław Acked-by: Daniel Vetter Acked-by: Bartlomiej Zolnierkiewicz Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/b5c3972e5774d0d1f8887054a993bbc54e9dbe2a.1535810304.git.mirq-linux@rere.qmqm.pl commit a7e3fa76989165f11f11463dd98ead7e5ff80873 Author: Michał Mirosław Date: Sat Sep 1 16:08:51 2018 +0200 drm/sun4i: use simpler remove_conflicting_framebuffers(NULL) Use remove_conflicting_framebuffers(NULL) instead of duplicating it. Signed-off-by: Michał Mirosław Acked-by: Maxime Ripard Acked-by: Daniel Vetter Acked-by: Bartlomiej Zolnierkiewicz Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/7d6d5bc4deac322b1351533c989cb3583e91be49.1535810304.git.mirq-linux@rere.qmqm.pl commit ff07a5854b09d7c65774e80942b0d92dc6087e15 Author: Michał Mirosław Date: Sat Sep 1 16:08:50 2018 +0200 drm/vc4: use simpler remove_conflicting_framebuffers(NULL) Use remove_conflicting_framebuffers(NULL) instead of open-coding it. Signed-off-by: Michał Mirosław Acked-by: Eric Anholt Acked-by: Daniel Vetter Acked-by: Bartlomiej Zolnierkiewicz Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/be7e6396e6e7159695a5bccc109c6ab49a51e0d8.1535810304.git.mirq-linux@rere.qmqm.pl commit 770af5859d6903049b7f39ed4f4e6612b63fd82d Author: Michał Mirosław Date: Sat Sep 1 16:08:49 2018 +0200 drm/virtio: use simpler remove_conflicting_pci_framebuffers() Signed-off-by: Michał Mirosław Acked-by: Daniel Vetter Acked-by: Bartlomiej Zolnierkiewicz Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/25f89daf6217da98a52d41c4ad62a78272bb0cf6.1535810304.git.mirq-linux@rere.qmqm.pl commit 020aa2ec15fc4a5ffdfcab7dc0db648a137abc41 Author: Michał Mirosław Date: Sat Sep 1 16:08:48 2018 +0200 drm/mgag200: use simpler remove_conflicting_pci_framebuffers() Remove duplicated call, while at it. Signed-off-by: Michał Mirosław Acked-by: Daniel Vetter Acked-by: Bartlomiej Zolnierkiewicz Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/90fc954f90de44157d6cc1c782147db6252c71e4.1535810304.git.mirq-linux@rere.qmqm.pl commit 39a3043aa4463da0c0f6954cecd36a302e0bf181 Author: Michał Mirosław Date: Sat Sep 1 16:08:48 2018 +0200 drm/radeon: use simpler remove_conflicting_pci_framebuffers() Signed-off-by: Michał Mirosław Acked-by: Alex Deucher Acked-by: Daniel Vetter Acked-by: Bartlomiej Zolnierkiewicz Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/b61a2e458b6a2964039693d724cc75b4fcfb3ddb.1535810304.git.mirq-linux@rere.qmqm.pl commit 77d1ed41c0c1eb2a19b5a6b1c99059ffb92da36e Author: Michał Mirosław Date: Sat Sep 1 16:08:46 2018 +0200 drm/bochs: use simpler remove_conflicting_pci_framebuffers() Signed-off-by: Michał Mirosław Acked-by: Daniel Vetter Acked-by: Bartlomiej Zolnierkiewicz Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/b5fce8eba7472e5ba8e18c2624938be6c5aa6ebb.1535810304.git.mirq-linux@rere.qmqm.pl Link: https://patchwork.freedesktop.org/patch/msgid/a9a4691b6eea789664edd6b85a85b7990953a222.1535810304.git.mirq-linux@rere.qmqm.pl commit 256ee417525a19ace2680a1f699c8656c0d907d5 Author: Michał Mirosław Date: Sat Sep 1 16:08:47 2018 +0200 drm/cirrus: use simpler remove_conflicting_pci_framebuffers() Signed-off-by: Michał Mirosław Acked-by: Daniel Vetter Acked-by: Bartlomiej Zolnierkiewicz Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/a9a4691b6eea789664edd6b85a85b7990953a222.1535810304.git.mirq-linux@rere.qmqm.pl commit a62dfac0ff984686e1139b0ea9bb9364315a31b6 Author: Michał Mirosław Date: Sat Sep 1 16:08:46 2018 +0200 drm/amdgpu: use simpler remove_conflicting_pci_framebuffers() Signed-off-by: Michał Mirosław Acked-by: Alex Deucher Acked-by: Daniel Vetter Acked-by: Bartlomiej Zolnierkiewicz Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/fe59ab587ef4ef799b525fcc03d87800c5dc26d9.1535810304.git.mirq-linux@rere.qmqm.pl commit 4d18975c78f2d5c91792356501cf369e67594241 Author: Michał Mirosław Date: Sat Sep 1 16:08:45 2018 +0200 fbdev: add remove_conflicting_pci_framebuffers() Almost all PCI drivers using remove_conflicting_framebuffers() wrap it with the same code. v2: add kerneldoc for DRM helper v3: propagate remove_conflicting_framebuffers() return value + move kerneldoc to where function is implemented Signed-off-by: Michał Mirosław Acked-by: Bartlomiej Zolnierkiewicz Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/7db1c278276de420eb45a1b71d06b5eb6bbd49ef.1535810304.git.mirq-linux@rere.qmqm.pl commit 69aa5355ab0da7a73ef95aff647a054590e48416 Author: Michał Mirosław Date: Sat Sep 1 16:08:45 2018 +0200 fbdev: add kerneldoc do remove_conflicting_framebuffers() Document remove_conflicting_framebuffers() behaviour. Signed-off-by: Michał Mirosław Acked-by: Bartlomiej Zolnierkiewicz Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/283fef19815b991700b56119d8d5874a2a8da44e.1535810304.git.mirq-linux@rere.qmqm.pl commit 5fa793d36646ee313361a764eac2503d0a561a7c Author: Michał Mirosław Date: Sat Sep 1 16:08:44 2018 +0200 fbdev: allow apertures == NULL in remove_conflicting_framebuffers() Interpret (otherwise-invalid) NULL apertures argument to mean all-memory range. This will allow to remove several duplicates of this code from drivers in following patches. Signed-off-by: Michał Mirosław Acked-by: Bartlomiej Zolnierkiewicz Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/b5fed539fe569035139c8594c23effd8c39f12ca.1535810304.git.mirq-linux@rere.qmqm.pl commit fbc42d455a2982b457251405e2a8f5b50deffc4d Author: Michał Mirosław Date: Sat Sep 1 16:08:44 2018 +0200 fbdev: show fbdev number for debugging Signed-off-by: Michał Mirosław Acked-by: Bartlomiej Zolnierkiewicz Acked-by: Daniel Vetter Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/ef584ecd8642e8b1a04f28d6d9c1864b5aa507bb.1535810304.git.mirq-linux@rere.qmqm.pl commit cd7e36ab7222af85597517bafd66013cbc8f9877 Author: Marek Szyprowski Date: Mon Sep 3 16:49:36 2018 +0200 regulator: Fix useless O^2 complexity in suspend/resume regulator_pm_ops with regulator_suspend and regulator_resume functions are assigned to every regulator device registered in the system, so there is no need to iterate over all again in them. Replace class_for_each_device() construction with direct operation on the rdev embedded in the given regulator device. This saves a lots of useless operations in suspend and resume paths. Fixes: f7efad10b5c4: regulator: add PM suspend and resume hooks Signed-off-by: Marek Szyprowski Signed-off-by: Mark Brown commit 495310e4f2dd857c4d5a62806a04cb8ba53855c1 Author: Juergen Gross Date: Tue Aug 28 09:40:26 2018 +0200 x86/paravirt: Remove unneeded mmu related paravirt ops bits There is no need to have 32-bit code for CONFIG_PGTABLE_LEVELS >= 4. Remove it. Signed-off-by: Juergen Gross Signed-off-by: Thomas Gleixner Cc: xen-devel@lists.xenproject.org Cc: virtualization@lists.linux-foundation.org Cc: akataria@vmware.com Cc: rusty@rustcorp.com.au Cc: boris.ostrovsky@oracle.com Cc: hpa@zytor.com Link: https://lkml.kernel.org/r/20180828074026.820-16-jgross@suse.com commit fdc0269e8958a1ec95b8ac685c1d372c24c60faa Author: Juergen Gross Date: Tue Aug 28 09:40:25 2018 +0200 x86/paravirt: Move the Xen-only pv_mmu_ops under the PARAVIRT_XXL umbrella Most of the paravirt ops defined in pv_mmu_ops are for Xen PV guests only. Define them only if CONFIG_PARAVIRT_XXL is set. Signed-off-by: Juergen Gross Signed-off-by: Thomas Gleixner Cc: xen-devel@lists.xenproject.org Cc: virtualization@lists.linux-foundation.org Cc: akataria@vmware.com Cc: rusty@rustcorp.com.au Cc: boris.ostrovsky@oracle.com Cc: hpa@zytor.com Link: https://lkml.kernel.org/r/20180828074026.820-15-jgross@suse.com commit 6da63eb241a05b0e676d68975e793c0521387141 Author: Juergen Gross Date: Tue Aug 28 09:40:24 2018 +0200 x86/paravirt: Move the pv_irq_ops under the PARAVIRT_XXL umbrella All of the paravirt ops defined in pv_irq_ops are for Xen PV guests or VSMP only. Define them only if CONFIG_PARAVIRT_XXL is set. Signed-off-by: Juergen Gross Signed-off-by: Thomas Gleixner Cc: xen-devel@lists.xenproject.org Cc: virtualization@lists.linux-foundation.org Cc: akataria@vmware.com Cc: rusty@rustcorp.com.au Cc: boris.ostrovsky@oracle.com Cc: hpa@zytor.com Link: https://lkml.kernel.org/r/20180828074026.820-14-jgross@suse.com commit 9bad5658ea710f45e4ee68b88a01cfe1839d8b00 Author: Juergen Gross Date: Tue Aug 28 09:40:23 2018 +0200 x86/paravirt: Move the Xen-only pv_cpu_ops under the PARAVIRT_XXL umbrella Most of the paravirt ops defined in pv_cpu_ops are for Xen PV guests only. Define them only if CONFIG_PARAVIRT_XXL is set. Signed-off-by: Juergen Gross Signed-off-by: Thomas Gleixner Cc: xen-devel@lists.xenproject.org Cc: virtualization@lists.linux-foundation.org Cc: akataria@vmware.com Cc: rusty@rustcorp.com.au Cc: boris.ostrovsky@oracle.com Cc: hpa@zytor.com Link: https://lkml.kernel.org/r/20180828074026.820-13-jgross@suse.com commit 40181646db45fb72f46563a2f3b792adc5380710 Author: Juergen Gross Date: Tue Aug 28 09:40:22 2018 +0200 x86/paravirt: Move items in pv_info under PARAVIRT_XXL umbrella All items but name in pv_info are needed by Xen PV only. Define them with CONFIG_PARAVIRT_XXL set only. Signed-off-by: Juergen Gross Signed-off-by: Thomas Gleixner Cc: xen-devel@lists.xenproject.org Cc: virtualization@lists.linux-foundation.org Cc: akataria@vmware.com Cc: rusty@rustcorp.com.au Cc: boris.ostrovsky@oracle.com Cc: hpa@zytor.com Link: https://lkml.kernel.org/r/20180828074026.820-12-jgross@suse.com commit c00a280a8efa4dc077596cf646bd50cbd13db3c8 Author: Juergen Gross Date: Tue Aug 28 09:40:21 2018 +0200 x86/paravirt: Introduce new config option PARAVIRT_XXL A large amount of paravirt ops is used by Xen PV guests only. Add a new config option PARAVIRT_XXL which is selected by XEN_PV. Later we can put the Xen PV only paravirt ops under the PARAVIRT_XXL umbrella. Since irq related paravirt ops are used only by VSMP and Xen PV, let VSMP select PARAVIRT_XXL, too, in order to enable moving the irq ops under PARAVIRT_XXL. Signed-off-by: Juergen Gross Signed-off-by: Thomas Gleixner Cc: xen-devel@lists.xenproject.org Cc: virtualization@lists.linux-foundation.org Cc: akataria@vmware.com Cc: rusty@rustcorp.com.au Cc: boris.ostrovsky@oracle.com Cc: hpa@zytor.com Link: https://lkml.kernel.org/r/20180828074026.820-11-jgross@suse.com commit 5def7a4cd5bef80f7c997cf37c09022fa8c9cd76 Author: Juergen Gross Date: Tue Aug 28 09:40:20 2018 +0200 x86/paravirt: Remove unused paravirt bits The macros ENABLE_INTERRUPTS_SYSEXIT, GET_CR0_INTO_EAX and PARAVIRT_ADJUST_EXCEPTION_FRAME are used nowhere. Remove their definitions. Signed-off-by: Juergen Gross Signed-off-by: Thomas Gleixner Cc: xen-devel@lists.xenproject.org Cc: virtualization@lists.linux-foundation.org Cc: akataria@vmware.com Cc: rusty@rustcorp.com.au Cc: boris.ostrovsky@oracle.com Cc: hpa@zytor.com Link: https://lkml.kernel.org/r/20180828074026.820-10-jgross@suse.com commit 5c83511bdb9832c86be20fb86b783356e2f58062 Author: Juergen Gross Date: Tue Aug 28 09:40:19 2018 +0200 x86/paravirt: Use a single ops structure Instead of using six globally visible paravirt ops structures combine them in a single structure, keeping the original structures as sub-structures. This avoids the need to assemble struct paravirt_patch_template at runtime on the stack each time apply_paravirt() is being called (i.e. when loading a module). [ tglx: Made the struct and the initializer tabular for readability sake ] Signed-off-by: Juergen Gross Signed-off-by: Thomas Gleixner Cc: xen-devel@lists.xenproject.org Cc: virtualization@lists.linux-foundation.org Cc: akataria@vmware.com Cc: rusty@rustcorp.com.au Cc: boris.ostrovsky@oracle.com Cc: hpa@zytor.com Link: https://lkml.kernel.org/r/20180828074026.820-9-jgross@suse.com commit 27876f3882fdd4acb3d3614a0133ecdc777fc292 Author: Juergen Gross Date: Tue Aug 28 09:40:18 2018 +0200 x86/paravirt: Remove clobbers from struct paravirt_patch_site There is no need any longer to store the clobbers in struct paravirt_patch_site. Remove clobbers from the struct and from the related macros. While at it fix some lines longer than 80 characters. Signed-off-by: Juergen Gross Signed-off-by: Thomas Gleixner Reviewed-by: Thomas Gleixner Cc: xen-devel@lists.xenproject.org Cc: virtualization@lists.linux-foundation.org Cc: akataria@vmware.com Cc: rusty@rustcorp.com.au Cc: boris.ostrovsky@oracle.com Cc: hpa@zytor.com Link: https://lkml.kernel.org/r/20180828074026.820-8-jgross@suse.com commit abc745f85c1193d2a052addf0031d59b4436c246 Author: Juergen Gross Date: Tue Aug 28 09:40:17 2018 +0200 x86/paravirt: Remove clobbers parameter from paravirt patch functions The clobbers parameter from paravirt_patch_default() et al isn't used any longer. Remove it. Signed-off-by: Juergen Gross Signed-off-by: Thomas Gleixner Reviewed-by: Thomas Gleixner Cc: xen-devel@lists.xenproject.org Cc: virtualization@lists.linux-foundation.org Cc: akataria@vmware.com Cc: rusty@rustcorp.com.au Cc: boris.ostrovsky@oracle.com Cc: hpa@zytor.com Link: https://lkml.kernel.org/r/20180828074026.820-7-jgross@suse.com commit 7e4372028929e43a1f986438572a533b728dd266 Author: Juergen Gross Date: Tue Aug 28 09:40:16 2018 +0200 x86/paravirt: Make paravirt_patch_call() and paravirt_patch_jmp() static paravirt_patch_call() and paravirt_patch_jmp() are used in paravirt.c only. Convert them to static. Signed-off-by: Juergen Gross Signed-off-by: Thomas Gleixner Reviewed-by: Thomas Gleixner Cc: xen-devel@lists.xenproject.org Cc: virtualization@lists.linux-foundation.org Cc: akataria@vmware.com Cc: rusty@rustcorp.com.au Cc: boris.ostrovsky@oracle.com Cc: hpa@zytor.com Link: https://lkml.kernel.org/r/20180828074026.820-6-jgross@suse.com commit 901d209a8b0e448dadbc830bc7d7951d1c9621f9 Author: Juergen Gross Date: Tue Aug 28 09:40:15 2018 +0200 x86/xen: Add SPDX identifier in arch/x86/xen files Signed-off-by: Juergen Gross Signed-off-by: Thomas Gleixner Reviewed-by: Boris Ostrovsky Cc: xen-devel@lists.xenproject.org Cc: virtualization@lists.linux-foundation.org Cc: akataria@vmware.com Cc: rusty@rustcorp.com.au Cc: hpa@zytor.com Link: https://lkml.kernel.org/r/20180828074026.820-5-jgross@suse.com commit 3013c2be600fe22d336ab4de91aedde258f1f7d5 Author: Juergen Gross Date: Tue Aug 28 09:40:14 2018 +0200 x86/xen: Link platform-pci-unplug.o only if CONFIG_XEN_PVHVM Instead of using one large #ifdef CONFIG_XEN_PVHVM in arch/x86/xen/platform-pci-unplug.c add the object file depending on CONFIG_XEN_PVHVM being set. Signed-off-by: Juergen Gross Signed-off-by: Thomas Gleixner Reviewed-by: Boris Ostrovsky Cc: xen-devel@lists.xenproject.org Cc: virtualization@lists.linux-foundation.org Cc: akataria@vmware.com Cc: rusty@rustcorp.com.au Cc: hpa@zytor.com Link: https://lkml.kernel.org/r/20180828074026.820-4-jgross@suse.com commit f030aade9165080f3539fb86fc2ce9ffc391813c Author: Juergen Gross Date: Tue Aug 28 09:40:13 2018 +0200 x86/xen: Move pv specific parts of arch/x86/xen/mmu.c to mmu_pv.c There are some PV specific functions in arch/x86/xen/mmu.c which can be moved to mmu_pv.c. This in turn enables to build multicalls.c dependent on CONFIG_XEN_PV. Signed-off-by: Juergen Gross Signed-off-by: Thomas Gleixner Reviewed-by: Boris Ostrovsky Cc: xen-devel@lists.xenproject.org Cc: virtualization@lists.linux-foundation.org Cc: akataria@vmware.com Cc: rusty@rustcorp.com.au Cc: hpa@zytor.com Link: https://lkml.kernel.org/r/20180828074026.820-3-jgross@suse.com commit 28c11b0f798c6727355bd44603b16bb04e3a044d Author: Juergen Gross Date: Tue Aug 28 09:40:12 2018 +0200 x86/xen: Move pv irq related functions under CONFIG_XEN_PV umbrella All functions in arch/x86/xen/irq.c and arch/x86/xen/xen-asm*.S are specific to PV guests. Include them in the kernel with CONFIG_XEN_PV only. Make the PV specific code in arch/x86/entry/entry_*.S dependent on CONFIG_XEN_PV instead of CONFIG_XEN. The HVM specific code should depend on CONFIG_XEN_PVHVM. While at it reformat the Makefile to make it more readable. Signed-off-by: Juergen Gross Signed-off-by: Thomas Gleixner Reviewed-by: Boris Ostrovsky Acked-by: Thomas Gleixner Cc: xen-devel@lists.xenproject.org Cc: virtualization@lists.linux-foundation.org Cc: akataria@vmware.com Cc: rusty@rustcorp.com.au Cc: hpa@zytor.com Link: https://lkml.kernel.org/r/20180828074026.820-2-jgross@suse.com commit e03546ddd3db5352a74dec247dbdaa29889e93f7 Author: Jon Hunter Date: Fri Aug 17 16:35:43 2018 +0100 ASoC: core: Don't schedule DAPM work if already in target state When dapm_power_widgets() is called, the dapm_pre_sequence_async() and dapm_post_sequence_async() functions are scheduled for all DAPM contexts (apart from the card DAPM context) regardless of whether the DAPM context is already in the desired state. The overhead of this is not insignificant and the more DAPM contexts there are the more overhead there is. For example, on the Tegra124 Jetson TK1, when profiling the time taken to execute the dapm_power_widgets() the following times were observed. Times for function dapm_power_widgets() are (us): Min 23, Ave 190, Max 434, Count 39 Here 'Count' is the number of times that dapm_power_widgets() has been called. Please note that the above time were measured using ktime_get() to log the time on entry and exit from dapm_power_widgets(). So it should be noted that these times may not be purely the time take to execute this function if it is preempted. However, after applying this patch and measuring the time taken to execute dapm_power_widgets() again a significant improvement is seen as shown below. Times for function dapm_power_widgets() are (us): Min 4, Ave 16, Max 82, Count 39 Therefore, optimise the dapm_power_widgets() function by only scheduling the dapm_pre/post_sequence_async() work if the DAPM context is not in the desired state. Signed-off-by: Jon Hunter Reviewed-by: Charles Keepax Signed-off-by: Mark Brown commit caf8975b97c10f92de69b2a144e96eb19229f199 Author: Corentin Labbe Date: Mon Sep 3 12:01:59 2018 +0200 dt-bindings: ata: update ahci_sunxi bindings This patch update binding with the new R40 compatible. Acked-by: Maxime Ripard Reviewed-by: Hans de Goede Signed-off-by: Corentin Labbe Signed-off-by: Jens Axboe commit 76dfb49d2e2a9cb2bab39d4148f20537efca84a2 Author: Corentin Labbe Date: Mon Sep 3 12:01:58 2018 +0200 ata: ahci_sunxi: add support for r40 This patch add the r40 compatible to the ahci_sunxi's supported list of compatible. Since R40 need ahci_platform to handle the reset controller, we also add the new AHCI_PLATFORM_GET_RESETS flag for ahci_platform_get_resources(). This has no consequence for older platform (a10, a20) since the reset is optional. Acked-by: Maxime Ripard Reviewed-by: Hans de Goede Signed-off-by: Corentin Labbe Signed-off-by: Jens Axboe commit a052ae02e40128bf26755ff1be8511c6f4ca85a3 Author: Corentin Labbe Date: Mon Sep 3 12:01:57 2018 +0200 dt-bindings: ata: ahci-platform: document phy-supply This patch document the new optional phy-supply. Acked-by: Maxime Ripard Reviewed-by: Hans de Goede Signed-off-by: Corentin Labbe Signed-off-by: Jens Axboe commit f20fb266e77a8af8a6e42eecfb5981178cc4d8a1 Author: Corentin Labbe Date: Mon Sep 3 12:01:56 2018 +0200 ata: ahci_platform: add support for PHY controller regulator The SoC R40 AHCI controller need a PHY regulator to work. But since the PHY is embedded in the controller, we cannot do a DT node for it, since phy-supply works only in node with a PHY compatible. So this patch adds a way to add an optional phy-supply regulator on AHCI controller node. Acked-by: Maxime Ripard Reviewed-by: Hans de Goede Signed-off-by: Corentin Labbe Signed-off-by: Jens Axboe commit d4fbe64bc6ed4a08f01bfd3a224c5a3ff083ec85 Author: Corentin Labbe Date: Mon Sep 3 12:01:55 2018 +0200 dt-bindings: ata: ahci-platform: document ahci-supply This patch document the new optional ahci-supply. Reviewed-by: Rob Herring Acked-by: Maxime Ripard Reviewed-by: Hans de Goede Signed-off-by: Corentin Labbe Signed-off-by: Jens Axboe commit a37da9180f42c953416c8aa3be2fbedf59fc4e3b Author: Corentin Labbe Date: Mon Sep 3 12:01:54 2018 +0200 ata: ahci_platform: add support for AHCI controller regulator The SoC R40 AHCI controller need a regulator to work. So this patch add a way to add an optional regulator on AHCI controller. Acked-by: Maxime Ripard Reviewed-by: Hans de Goede Signed-off-by: Corentin Labbe Signed-off-by: Jens Axboe commit 15fd6ec97d4c6277ddfa170718ca277f044524d6 Author: Corentin Labbe Date: Mon Sep 3 12:01:53 2018 +0200 dt-bindings: ata: ahci-platform: fix indentation of target-supply This patch fix the indentation of target-supply's ':'. Acked-by: Maxime Ripard Reviewed-by: Hans de Goede Signed-off-by: Corentin Labbe Signed-off-by: Jens Axboe commit 5bd72622e7cc582c6b59de7adbc607c2d332b9c0 Author: Peter Rosin Date: Fri Aug 31 22:44:03 2018 +0200 ARM: dts: at91: tse850: drop three indentation levels Make use of the recently added &pinctrl and &watchdog labels. This makes the whole file consistent and knowledge of the ahb/apb structure is hidden. Signed-off-by: Peter Rosin Signed-off-by: Alexandre Belloni commit 8daa181d91ebf53d3c9ad64d6d5b9ad178553941 Author: Peter Rosin Date: Fri Aug 31 22:44:02 2018 +0200 ARM: dts: at91: nattis: drop three indentation levels Make use of the recently added &pinctrl and &watchdog labels. This makes the whole file consistent and knowledge of the ahb/apb structure is hidden. Signed-off-by: Peter Rosin Signed-off-by: Alexandre Belloni commit c7ba473628586a138c35e00cff303c3eb47c9cbf Author: Kosta Zertsekel Date: Wed Aug 15 22:04:49 2018 +0300 spi: orion: cosmetics - alias long direct_access variables This change increases the source code readability. Instead of using `spi->child[cs].direct_access.XXX` use `dir_acc->XXX`. Instead of using `orion_spi->child[cs].direct_access.vaddr` use `vaddr`. Signed-off-by: Kosta Zertsekel Reviewed-by: Andrew Lunn Reviewed-by: Stefan Roese Reviewed-by: Jan Kundrát Signed-off-by: Mark Brown commit 85e16fdd2f25ef6b08b4275acd5f60fdccfe0973 Author: Codrin Ciubotariu Date: Fri Aug 31 20:14:36 2018 +0300 ASoC: mikroe-proto: dt-bindings: add DT bindings for PROTO board DT binding documentation for this new ASoC driver. Signed-off-by: Codrin Ciubotariu Signed-off-by: Mark Brown commit a45f8853a5f95e3760dfbd7ba09d3d597d247040 Author: Codrin Ciubotariu Date: Fri Aug 31 20:14:35 2018 +0300 ASoC: Add driver for PROTO Audio CODEC (with a WM8731) Add support for the MikroElektronika PROTO audio codec board. URL to the audio chip: http://www.mikroe.com/add-on-boards/audio-voice/audio-codec-proto/ Signed-off-by: Florian Meier Signed-off-by: Codrin Ciubotariu Signed-off-by: Mark Brown commit 6ab6a2474e0dce02f71e92adb9778a168a8931f4 Author: Kuninori Morimoto Date: Mon Sep 3 07:09:17 2018 +0000 ASoC: rsnd: merge .nolock_start and .prepare Main purpose of .nolock_start is we need to call some function without spinlock. OTOH we have .prepare which main purpose is called under atomic context. Then, it is called without spinlock. In summary, our main callback init/quit, and start/stop are called under "atomic context and with spinlock". And some function need to be called under "non-atomic context or without spinlock". Let's merge .nolock_start and prepare to be more clear code. Then, let's rename nolock_stop to cleanup Signed-off-by: Kuninori Morimoto Tested-by: Hiroyuki Yokoyama Signed-off-by: Mark Brown commit d47f9580a6ea82b80c34c9dbc9dd8dba6bb25dc0 Merge: 2e66d523cd05 4d230d127106 Author: Mark Brown Date: Mon Sep 3 14:37:28 2018 +0100 Merge branch 'asoc-4.19' into asoc-4.20 for rcar dep commit 2e66d523cd055ac3fa920f7e630c4bfa80d24c24 Author: Jiada Wang Date: Mon Sep 3 07:08:37 2018 +0000 ASoC: rsnd: ssiu: Support to init different BUSIF instance Currently ssiu's .init is only called once during audio stream. But SSIU with different BUSIF, shall be initialized each time, even they are used in the same audio stream. This patch introduces ssiu_status for BUSIF0 to BUSIF7 in rsnd_ssiu, to make sure same .init for different BUSIF can always be executed. To avoid the first stopped stream to stop the whole SSIU, which may still has other BUSIF instance running, use usrcnt to count the usage of SSIU, only the last user of SSIU can stop the whole SSIU. Signed-off-by: Jiada Wang Signed-off-by: Timo Wischer [Kuninori: tidyup for upstream] Signed-off-by: Kuninori Morimoto Tested-by: Hiroyuki Yokoyama Signed-off-by: Mark Brown commit 8c9d750333408420a1e4816b1820f10be2a84af6 Author: Jiada Wang Date: Mon Sep 3 07:08:20 2018 +0000 ASoC: rsnd: ssiu: Support BUSIF other than BUSIF0 Currently only BUSIF0 is supported by SSIU, all register setting is done only for BUSIF. Since BUSIF1 ~ BUSIF7 has been supported, so also support these BUSIF from SSIU. One note is that we can't support SSI9-4/5/6/7 so far, because its address is out of calculation rule. Signed-off-by: Jiada Wang Signed-off-by: Timo Wischer [Kuninori: tidyup for upstream] Signed-off-by: Kuninori Morimoto Tested-by: Hiroyuki Yokoyama Signed-off-by: Mark Brown commit 92c7d384ff7282738c70720f8670c9b65c90c7df Author: Jiada Wang Date: Mon Sep 3 07:08:00 2018 +0000 ASoc: rsnd: dma: Calculate PDMACHCRE with consider of BUSIF PDMACHCR setting for SSI only considers BUSIF0 so far. But BUSIF1 ~ BUSIF7 also maybe used, in the future. This patch updates table gen2_id_table_ssiu, to also consider BUSIF number used by SSI. Signed-off-by: Jiada Wang Signed-off-by: Timo Wischer [kuninori: adjust to upstreaming] Signed-off-by: Kuninori Morimoto Tested-by: Hiroyuki Yokoyama Signed-off-by: Mark Brown commit 5e45a6fab3b90ca300e13191fc68baaa8e37d1d4 Author: Jiada Wang Date: Mon Sep 3 07:07:43 2018 +0000 ASoc: rsnd: dma: Calculate dma address with consider of BUSIF DMA address calculated by rsnd_dma_addr() only considers BUSIF0 so far. But BUSIF1 ~ BUSIF7 also maybe used, in the future. This patch updates DMA address calculations, to also consider BUSIF number used by SSI. One note is that we can't support SSI9-4/5/6/7 so far, because its address is out of calculation rule. Signed-off-by: Jiada Wang Signed-off-by: Timo Wischer [kuninori: adjust to upstreaming] Signed-off-by: Kuninori Morimoto Tested-by: Hiroyuki Yokoyama Signed-off-by: Mark Brown commit 599da084e041b877ef89211dcbb4c7bd8380049d Author: Jiada Wang Date: Mon Sep 3 07:07:26 2018 +0000 ASoC: rsnd: ssi: Check runtime channel number rather than hw_params The number of channel handled by SSI maybe differs from the one set in hw_params, currently SSI checks hw_params's channel number, and constrains to use same channel number, when it is being used by multiple clients. This patch corrects to check runtime channel number rather than channel number set in hw_params. Signed-off-by: Jiada Wang Signed-off-by: Timo Wischer [kuninori: adjust to upstreaming] Signed-off-by: Kuninori Morimoto Tested-by: Hiroyuki Yokoyama Signed-off-by: Mark Brown commit 0e289012b47a2de1f029a6b61c75998e2f159dd9 Author: Jiada Wang Date: Mon Sep 3 07:07:07 2018 +0000 ASoC: rsnd: ssi: Fix issue in dma data address assignment Same SSI device may be used in different dai links, by only having one dma struct in rsnd_ssi, after the first instance's dma config be initilized, the following instances can no longer configure dma, this causes issue, when their dma data address are different from the first instance. Signed-off-by: Jiada Wang Signed-off-by: Timo Wischer [Kuninori: tidyup for upstream] Signed-off-by: Kuninori Morimoto Tested-by: Hiroyuki Yokoyama Signed-off-by: Mark Brown commit b735662fa473c0e3618a4d645ce797d31e0c9192 Author: Jiada Wang Date: Mon Sep 3 07:06:50 2018 +0000 ASoC: rsnd: remove is_play parameter from hw_rule function Currently rsnd_dai_stream *io is set to either &rdai->playback or &rdai->capture based on whether it is a playback or capture stream, in __rsnd_soc_hw_rule_* functions, but this is not necessary, rsnd_dai_stream *io handler can be get from rule->private. This patch removes 'is_play' parameter from hw_rule function. Signed-off-by: Jiada Wang Signed-off-by: Timo Wischer [Kuninori: tidyup for upstream] Signed-off-by: Kuninori Morimoto Tested-by: Hiroyuki Yokoyama Signed-off-by: Mark Brown commit ba5d553b7bd71e63d639863e2cb09e0c9543b8b7 Author: Dragos Tarcatu Date: Mon Sep 3 07:06:29 2018 +0000 ASoC: rsnd: add support for 8 bit S8 format This patch adds support for SNDRV_PCM_FMTBIT_S8 format. Signed-off-by: Dragos Tarcatu Signed-off-by: Jiada Wang Signed-off-by: Timo Wischer [Kuninori: tidyup for upstream] Signed-off-by: Kuninori Morimoto Tested-by: Hiroyuki Yokoyama Signed-off-by: Mark Brown commit 3791b3ee4bb13c381868da89e9e6deb11de660ad Author: Dragos Tarcatu Date: Mon Sep 3 07:06:01 2018 +0000 ASoC: rsnd: add support for the DSP_A/DSP_B formats Signed-off-by: Dragos Tarcatu Signed-off-by: Jiada Wang Signed-off-by: Timo Wischer [Kuninori: tidyup for upstream] Signed-off-by: Kuninori Morimoto Tested-by: Hiroyuki Yokoyama Signed-off-by: Mark Brown commit fb2815f44a9eb341ed8990263855a266960a5135 Author: Dragos Tarcatu Date: Mon Sep 3 07:05:42 2018 +0000 ASoC: rsnd: add support for 16/24 bit slot widths The slot width (system word length) was fixed at 32 bits. This patch allows also setting it to 16 or 24 bits. Signed-off-by: Dragos Tarcatu Signed-off-by: Jiada Wang Signed-off-by: Timo Wischer [Kuninori: tidyup for upstream] Signed-off-by: Kuninori Morimoto Tested-by: Hiroyuki Yokoyama Signed-off-by: Mark Brown commit b5c088689847372794500f83b65673aaa8ca4d8d Author: Jiada Wang Date: Mon Sep 3 07:05:11 2018 +0000 ASoC: rsnd: add warning message to rsnd_kctrl_accept_runtime() Add warning message to rsnd_kctrl_accept_runtime(), when kctrl update is rejected due to corresponding dai-link is idle. So that user can notice the reason of kctrl update failure. Signed-off-by: Jiada Wang Signed-off-by: Timo Wischer [kuninori: adjust to upstream] Signed-off-by: Kuninori Morimoto Tested-by: Hiroyuki Yokoyama Signed-off-by: Mark Brown commit d54f4fba889b205e9cd8239182ca5d27d0ac3bc2 Author: Amir Goldstein Date: Sat Sep 1 10:41:13 2018 +0300 fanotify: add API to attach/detach super block mark Add another mark type flag FAN_MARK_FILESYSTEM for add/remove/flush of super block mark type. A super block watch gets all events on the filesystem, regardless of the mount from which the mark was added, unless an ignore mask exists on either the inode or the mount where the event was generated. Only one of FAN_MARK_MOUNT and FAN_MARK_FILESYSTEM mark type flags may be provided to fanotify_mark() or no mark type flag for inode mark. Cc: Signed-off-by: Amir Goldstein Signed-off-by: Jan Kara commit 60f7ed8c7c4d06aeda448c6da74621552ee739aa Author: Amir Goldstein Date: Sat Sep 1 10:41:12 2018 +0300 fsnotify: send path type events to group with super block marks Send events to group if super block mark mask matches the event and unless the same group has an ignore mask on the vfsmount or the inode on which the event occurred. Soon, fanotify backend is going to support super block marks and fanotify backend only supports path type events. Signed-off-by: Amir Goldstein Signed-off-by: Jan Kara commit 1e6cb72399fd58b38a1c11055ef18fe01f535cda Author: Amir Goldstein Date: Sat Sep 1 10:41:11 2018 +0300 fsnotify: add super block object type Add the infrastructure to attach a mark to a super_block struct and detach all attached marks when super block is destroyed. This is going to be used by fanotify backend to setup super block marks. Signed-off-by: Amir Goldstein Signed-off-by: Jan Kara commit 6ea48430952323091194100d48c5610b9cd286b4 Author: Laurent Pinchart Date: Thu Jun 7 19:55:04 2018 +0300 drm/omap: Don't call .set_timings() operation recursively Instead of calling the .set_timings() operation recursively from the display device backwards, iterate over the devices manually in the DRM encoder code. This moves the complexity to a single central location and simplifies the logic in omap_dss_device drivers. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen commit d8dbe79143764b86bd04c63c044431565582a22d Author: Laurent Pinchart Date: Fri Jun 8 16:53:37 2018 +0300 drm/omap: Store CRTC timings in .set_timings() operation The video timings are stored in the CRTC structure by the omap_crtc_dss_set_timings() function, called by dss_mgr_set_timings() from the .enable() operation of the internal encoders. This instead belongs to the .set_timings() code paths. Move the omap_crtc_dss_set_timings() calls accordingly. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen commit a730ce996ce4da09979bac884ddb62daf413b79e Author: Laurent Pinchart Date: Fri Jun 8 15:59:31 2018 +0300 drm/omap: venc: Fixup video mode in .check_timings() operation The VENC encoder modifies the requested video mode to match the NTSC or PAL timings (or reject the video mode completely) in the .set_timings() operation. This should be performed in the .check_timings() operation instead. Move the fixup. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen commit 96fc64c775370b18bbf53732ad5130a6662cf1a2 Author: Laurent Pinchart Date: Fri Jun 8 15:59:31 2018 +0300 drm/omap: sdi: Fixup video mode in .check_timings() operation The SDI encoder modifies the pixel clock of the requested video mode to take the limitations of the PLL into account in the .enable() operation. This should be performed in the .check_timings() operation instead. Move the fixup. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen commit 95e472da1094dfe41b7d1d3fb2d04486cf863a42 Author: Laurent Pinchart Date: Fri Jun 8 16:39:27 2018 +0300 drm/omap: hdmi: Constify video mode and related pointers Constify many pointers to struct videomode, as well as pointers to container structures, to ensure the video mode isn't modified after the .check_timings() operation. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen commit 7d39e59be51bddbd5cd487274d48969a39a3bcd1 Author: Laurent Pinchart Date: Fri Jun 8 15:59:31 2018 +0300 drm/omap: dsi: Fixup video mode in .set_config() operation The DSI encoder modifies the passed videomode to take the requirements of the internal DISPC-DSI bus into account in the .enable_video_output() operation. This should be performed in the .check_timings() operation instead. There is however no .check_timings() operation as the DSI encoder uses a custom API, so move it to the closest match which is the .set_config() operation. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen commit f79fa7da6a2953c9964f285dfddc61f92ced0a5a Author: Laurent Pinchart Date: Fri Jun 8 16:03:14 2018 +0300 drm/omap: dpi: Don't fixup video mode in dpi_set_mode() The video mode is aleady fixed up by the .check_timings() operation, there's no need to repeat that when enabling the DPI output. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen commit 7c27fa57ef31debf62c5529725d4fa096b336a99 Author: Laurent Pinchart Date: Tue Jun 5 01:57:09 2018 +0300 drm/omap: Call dispc timings check operation directly Instead of call the dispc timings check function dispc_mgr_timings_ok() from the internal encoders .check_timings() operation, expose it through the dispc ops (after renaming it to check_timings) and call it directly from omapdrm. This allows removal of now empty omap_dss_device .check_timings() operations. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen commit 3fbda31e814868d8477ddf52d74b7b8f596578e8 Author: Laurent Pinchart Date: Thu Jun 7 17:58:57 2018 +0300 drm/omap: Split mode fixup and mode set from encoder enable The encoder enable operation currently performs mode fixup and mode setting for all omap_dss_device instances in the display pipeline. There are dedicated encoder operations for those operations (respectively .atomic_check() and .mode_set()), but they are not used for this purpose. Move the mode fixup code to .atomic_check() and the mode set code .mode_set() to better fit the KMS model. The bus flags fixup has to happen at .mode_set() time as there is no place to store the bus flags in the atomic state structures. This could be solved by extending one of the state structures, but as the goal is to replace the fixup by direct usage of bus flags through the driver, that would be pointless. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen commit 8e9c1c6676ea3d0dc60d84ee9a69984a4bcf859f Author: Laurent Pinchart Date: Thu Jun 7 18:32:16 2018 +0300 drm/omap: Move bus flag hack to encoder implementation The bus flags stored in omap_dss_device instances are used to fixup the video mode before setting it, to honour constraints that can't be expressed through drm_display_mode. The fixup occurs in the CRTC mode set operation and the resulting video mode is stored internally in the CRTC. It is then used next by omap_encoder_enable() to apply mode fixups for the omap_dss_device instances in omap_encoder_update(). Move the hack to the omap_encoder_update() function right before applying the omap_dss_device fixups, in order to group all fixups together. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen commit 31cd7afa3086f1206ef4c7434e033669702adf08 Author: Laurent Pinchart Date: Thu Jun 7 00:17:32 2018 +0300 drm/omap: panels: Don't modify fixed timings Panels drivers store their timings in a device data structure field that is initialized at probe time, either from hardcoded values or from firmware-supplied values. Those timings are then reported through the .get_timings() operation to construct the panel display mode. The panel timings are further modified by the .set_timings() operation, which is called with the timings retrieved by .get_timings(), and mangled by .check_timings(). The latter potentially adjusts the pixel clock only. Conceptually, modifying the panel timings is wrong, as the timings are an intrinsic property of the panel and should thus be fixed. Furthermore, modifying them this way at runtime can result in display modes reported to userspace varying between calls, which is also wrong. There's no actual need to store the mangled pixel clock value in the timings. Don't modify the panel timings in the .set_timings() operation, just forward it to the previous device in the display pipeline. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen commit ca6e968b9326a17d072b14b658fff538466c6bd2 Author: Laurent Pinchart Date: Wed Jun 6 18:04:26 2018 +0300 drm/omap: Remove .get_timings() operation from display connectors The analog TV, DVI and HDMI connectors all report timing information through the .get_timings() information. For analog TV outputs the information is queried from the encoder, so the operation is unused. Remove it. For HDMI outputs the display pipeline provides EDID capability, so the operation is unused as well. Remove it. For DVI outputs the operation is also unused if the pipeline provides EDID capability. Otherwise (when the DDC bus is not connected) we shouldn't hardcode a single mode, but instead report no mode and let the KMS core add default modes. This is achieved by removing the operation. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen commit 35d944cbee2199312c6832a4acd0201a921545f4 Author: Laurent Pinchart Date: Wed Jun 6 17:49:37 2018 +0300 drm/omap: Query timing information from analog TV encoder Timings for the TV output are currently reported by the analog TV connector. This has the disadvantage of having to handle timing-related operations in a connector omap_dss_device that has, at the hardware level, no knowledge of any timing information. Implement the .get_timings() operation in the venc driver, and get timings from the first component in the pipeline that implements the operatation. This switches the duty of reporting analog TV timings from the connector to the encoder. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen commit 28120302c2fdf29b515c8cbd4e3a3867cb0cde7d Author: Laurent Pinchart Date: Wed Jun 6 00:55:48 2018 +0300 drm/omap: Don't call .check_timings() operation recursively The .check_timings() operation is called recursively from the display device back to the output device. Most components just forward the operation to the previous component in the chain, resulting in lots of duplicated pass-through functions. To avoid that, iterate over the components manually. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen commit b4935e3a3cfa456b356e9714e75513be672c227e Author: Laurent Pinchart Date: Wed Jun 6 15:20:01 2018 +0300 drm/omap: Store bus flags in the omap_dss_device structure Source components in the display pipeline need to configure their output signals polarities and clock driving edge based on the requirements of the sink component. Those requirements are currently shared across the whole pipeline in the flags of a videomode structure, instead of being local to each bus. This both prevents multiple buses from having different configurations (when the hardware supports it), and makes it difficult to move from videomode to drm_display_mode as the latter doesn't contain bus polarities and clock edge flags. Add a bus_flags field to the omap_dss_device structure and move the DISPLAY_FLAGS_DE_(LOW|HIGH), DISPLAY_FLAGS_PIXDATA_(POS|NEG)EDGE and DISPLAY_FLAGS_SYNC_(POS|NEG)EDGE videomode flags to bus_flags in all external encoders, connectors and panels. The videomode flags are still used internally for internal encoders, this will be addressed in a second step. The related videomode flags in the default mode of the DVI connector can simply be dropped, as they are always overridden by the TFP410 driver. Note that this results in both the DISPLAY_FLAGS_SYNC_POSEDGE and DISPLAY_FLAGS_SYNC_NEGEDGE flags being set, which is invalid, but only the former is tested for when programming the DISPC, so the DVI connector flags are effectively overridden by the TFP410 flags. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen commit 26c91a3898f1fd52af4e90d03ad740586112a6f7 Author: Laurent Pinchart Date: Wed Jun 6 16:18:43 2018 +0300 drm/omap: Don't store video mode internally for external encoders The omap_dss_device .set_timings() operation for external encoders stores the video mode in the device data structure. That mode is then never used again. Drop it. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen commit 138fe53ef8d341dd27a0f01d55f8774d33b880f8 Author: Laurent Pinchart Date: Wed Jun 6 00:04:39 2018 +0300 drm/omap: Remove unneeded fallback for missing .check_timings() The .check_timings() operation is present in all panels and connectors. The fallback that uses .get_timings() in the absence of .check_timings() is thus unneeded. While it could be argued that the fallback implements a useful check that should be extended to cover all fixed-resolution panels, the code is currently unused and gets in the way of the ongoing refactoring. Remove it, a similar feature can always be added later. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen commit bb23800c887da3a96297ec3d4a09b6bd887ce503 Author: Laurent Pinchart Date: Tue Jun 5 02:06:54 2018 +0300 drm/omap: Remove duplicate calls to .set_timings() operation The omap_dss_device .set_timings() operations are called directly from omap_encoder_update(), and indirectly from the omap_dss_device .enable() operation. The latter is called from omap_encoder_enable(), right after calling omap_encoder_update(). The .set_timings() operation it thus called twice in a row. Fix it by removing the indirect call. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen commit 8fe1d36100c84ab1b501771252755d75ddcb6bff Author: Laurent Pinchart Date: Mon Jun 4 18:29:01 2018 +0300 drm/omap: Make the video_mode pointer to .set_timings() const The .set_timings() operations of the omap_dss_device instances don't need to modify the passed timings. Make the pointer const. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen commit 9c626dee5cdb13aad5aa1448e08186bf6452647d Author: Laurent Pinchart Date: Sun Aug 19 14:12:27 2018 +0300 drm/omap: encoder-tfp410: Don't fix timings in .set_timings() handler Both the .check_timings() and .set_timings() handlers call tfp410_fix_timings() to fix the timing's flags. As .check_timings() is always called before .set_timings(), there's no need to fix the flags twice. Remove the tfp410_fix_timings() call from .set_timings(). Signed-off-by: Laurent Pinchart Signed-off-by: Tomi Valkeinen commit ec68cd5a18e16318969e0e59a7d99513dcfa2d02 Author: Laurent Pinchart Date: Mon Jun 4 18:26:00 2018 +0300 drm/omap: dss: hdmi: Rename hdmi_display_(set|check)_timing() functions The two functions implement the .set_timings() and .check_timings() operations. Rename them to hdmi_disply_set_timings() and hdmi_display_check_timings() respectively to match the operations names and make searching the source code easier. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen commit 52c5dd2a7bed1610a37f89aeb4f73ad8fbba05fc Author: Laurent Pinchart Date: Wed Jun 6 00:31:57 2018 +0300 drm/omap: Determine connector type directly in omap_connector.c Instead of determining the connector type from the type of the display's omap_dss_device and passing it to the omap_connector_init() function, move the type determination code to omap_connector.c and remove the type argument to the connector init function. This moves code to a more natural location, making the driver easier to read. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen commit 47a3ee27934a7a774be4aa1733c662f33e1ae656 Author: Laurent Pinchart Date: Thu May 31 23:14:43 2018 +0300 drm/omap: Pass both output and display omap_dss_device to connector init The drm_connector implementation requires access to the omap_dss_device corresponding to the display, which is passed to its initialization function and stored internally. Refactoring of the timings operations will require access to the output omap_dss_device. To prepare for that, pass it to the connector initialization function and store it internally as well. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen commit 7805d1e5098c1a90e5feb153809b16ba890b03e4 Author: Laurent Pinchart Date: Thu May 31 22:56:59 2018 +0300 drm/omap: Don't call HDMI mode and infoframe operations recursively The HDMI mode (.set_hdmi_mode()) and infoframe (.set_infoframe()) operations are called recursively from the display device back to the HDMI encoder. This isn't required, as all components other than the HDMI encoder just forward the operation to the previous component in the chain. Call the operations directly on the HDMI encoder. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen commit d96aaada55553b9e4264a2f2c8cc9599f027cd28 Author: Laurent Pinchart Date: Thu May 31 23:14:43 2018 +0300 drm/omap: Pass both output and display omap_dss_device to encoder init The drm_encoder implementation requires access to the omap_dss_device corresponding to the display, which is passed to its initialization function and stored internally. Clean up of the HDMI mode and infoframe handling will require access to the output omap_dss_device. To prepare for that, pass it to the encoder initialization function and store it internally as well. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen commit 70f9cbfc56a3239ff65796e024b4bbf653d1e0ba Author: Laurent Pinchart Date: Thu May 31 23:04:30 2018 +0300 drm/omap: Get from CRTC to display device directly The CRTC mode set implementation needs to access the omap_dss_device for the pipeline display. To do so, it iterates over all pipelines to find the one that contains an encoder corresponding to the CRTC, and request the display device from the encoder. That's a very complicated dance when the CRTC has a direct pipeline pointer already, and the pipeline contains a pointer to the display device. Replace the convoluted code with direct access. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen commit 90279e9518da8488982e9d5704b890fe0e34ad30 Author: Laurent Pinchart Date: Thu May 31 22:09:14 2018 +0300 drm/omap: Don't call EDID read operation recursively Instead of calling the EDID read operation (.read_edid()) recursively from the display device back to the first device that provides EDID read support, iterate over the devices manually in the DRM connector code. This moves the complexity to a single central location and simplifies the logic in omap_dss_device drivers. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen commit f006325cdc8008b015b47d830bce072adf40f313 Author: Laurent Pinchart Date: Wed May 30 16:53:43 2018 +0300 drm/omap: Move HPD disconnection handling to omap_connector On HDMI outputs, CEC support requires notification of HPD signal deassertion. The HPD signal can be handled by various omap_dss_device instances in the pipeline, and all of them forward HPD events to the OMAP4 internal HDMI encoder. Knowledge of the DSS internals need to be removed from the omap_dss_device instances in order to migrate to drm_bridge. To do so, move HPD handling for CEC to the omap_connector. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen commit 18412b667c96d1a5210f33191e128866a72cea07 Author: Laurent Pinchart Date: Wed May 30 21:46:44 2018 +0300 drm/omap: Merge HPD enable operation with HPD callback registration The omap_dss_device .enable_hpd() and .disable_hpd() are used to enable and disable hot-plug detection at omapdrm probe and remove time. This is required to avoid reporting hot-plug detection events before the DRM infrastructure is ready to accept them, as that could result in crashes or other malfunction. Hot-plug event reporting is conditioned by both HPD being enabled through the .enable_hpd() operation and by the HPD callback being registered though the .register_hpd_cb() operation. We thus don't need a separate enable operation if we can guarantee that callbacks won't be registered too early. HPD callbacks are registered at connector initialization time, which is too early to start reporting HPD events. There's however nothing blocking a move of callback registration to a later time when the omapdrm driver calls the HPD enable operations. Do so, and remove the HPD enable operation completely from omap_dss_device drivers. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen commit a21a8f3c93e1a95cc811a1297ec60aa455a6c523 Author: Laurent Pinchart Date: Wed May 30 18:51:59 2018 +0300 drm/omap: Remove unneeded safety checks in the HPD operations The HPD-related omap_dss_device operations are now only called when the device supports HPD. There's no need to duplicate that check in the omap_dss_device drivers. The .register_hpd_cb() operation can as a result be turned into a void operation. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen commit 949ea2ef3fed4e1d0f9b80ec21ed81a9833ac248 Author: Laurent Pinchart Date: Wed May 30 18:49:48 2018 +0300 drm/omap: Don't call HPD registration operations recursively Instead of calling the hot-plug detection callback registration operations (.register_hpd_cb() and .unregister_hpd_cb()) recursively from the display device back to the first device that provides hot plug detection support, iterate over the devices manually in the DRM connector code. This moves the complexity to a single central location and simplifies the logic in omap_dss_device drivers. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen commit f2ea55775e0591aa292e2e8d9707d0196df73d61 Author: Laurent Pinchart Date: Mon May 28 16:49:36 2018 +0300 drm/omap: Don't call .detect() operation recursively Instead of calling the .detect() operation recursively from the display device back to the first device that provides hot plug detection support, iterate over the devices manually in the DRM connector .detect() implementation. This moves the complexity to a single central location and simplifies the logic in omap_dss_device drivers. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen commit 09e5bb6d5b94929d9b0c17eec56c2f5d19886514 Author: Laurent Pinchart Date: Mon May 28 16:03:13 2018 +0300 drm/omap: dss: Add device operations flags When an omap_dss_device operation can be implemented in multiple places in a chain of devices, it is important to find out which device to address to perfom the operation. This is currently done by calling the operation on the display device at the end of the chain, and recursively delagating the operation to the previous device if it can't be performed locally. The drawback of this approach is an increased complexity in omap_dss_device drivers. In order to simplify the drivers, we will switch from a recursive model to an interative model, centralizing the complexity in a single location. This requires knowing which operations an omap_dss_device supports at runtime. We can already test which operations are implemented by checking the operation pointer, but implemented operations can require resources whose availability varies between systems. For instance a hot-plug signal from a connector can be wired to a GPIO or to a bridge chip. Add operation flags that can be set in the omap_dss_device structure by drivers to signal support for operations. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen commit 83910ad3f51fbc0e6546b60aafa90697b5127a8a Author: Laurent Pinchart Date: Fri Jun 1 19:45:01 2018 +0300 drm/omap: Move most omap_dss_driver operations to omap_dss_device_ops omap_dss_device instances have two ops structures, omap_dss_driver and omap_dss_device_ops. The former is used for devices at the end of the pipeline (a.k.a. display devices), and the latter for intermediate devices. Having two sets of operations isn't convenient as code that iterates over omap_dss_device instances need to take them both into account. There's currently a reasonably small amount of such code, but more will be introduced to move the driver away from recursive operations. To simplify current and future code, move all operations that are not specific to the display device to the omap_dss_device_ops. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen commit e7df6571024ba791c6521efba5b3875724c47af6 Author: Laurent Pinchart Date: Mon May 28 17:18:26 2018 +0300 drm/omap: panel-tpo-td043mtea1: Convert to the GPIO descriptors API The GPIO descriptor API is favoured over the plain GPIO API for consumer drivers. Using it simplifies the driver code. As the descriptor API handles the active-low flag internally we need to invert the polarity of all GPIO operations in the driver. Rename the nreset_gpio field to reset_gpio to reflect that. The reset GPIO is mandatory, so drop conditional tests through the driver. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen commit 2167f9e28a30a4b129b2464fbc5ee8c15e254ff1 Author: Laurent Pinchart Date: Mon May 28 17:16:52 2018 +0300 drm/omap: panel-tpo-td028ttec1: Drop unneeded linux/gpio.h header The driver doesn't use GPIOs and thus doesn't need to include the linux/gpio.h header. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen commit aec338cbf8c3c86e318eac4d896087ac78fc85b9 Author: Laurent Pinchart Date: Mon May 28 17:18:26 2018 +0300 drm/omap: panel-sony-acx565akm: Convert to the GPIO descriptors API The GPIO descriptor API is favoured over the plain GPIO API for consumer drivers. Using it simplifies the driver code. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen commit 57e0478a29cf280c8ea26d06d393994ff336eeb6 Author: Laurent Pinchart Date: Mon May 28 17:18:26 2018 +0300 drm/omap: panel-nec-nl8048hl11: Convert to the GPIO descriptors API The GPIO descriptor API is favoured over the plain GPIO API for consumer drivers. Using it simplifies the driver code. The reset GPIO is mandatory, so drop conditional tests through the driver. The qvga GPIO is unused, so drop it completely. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen commit ac2d1fcbebd6e9ff3a5ef645f88611a6ba9b4ece Author: Laurent Pinchart Date: Mon May 28 17:18:26 2018 +0300 drm/omap: encoder-tfp410: Convert to the GPIO descriptors API The GPIO descriptor API is favoured over the plain GPIO API for consumer drivers. Using it simplifies the driver code. As the descriptor API handles the active-low flag internally we need to invert the polarity of all GPIO operations in the driver. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen commit ede880e1825bfe267088afcf1c096ec62713f005 Author: Laurent Pinchart Date: Mon May 28 17:18:26 2018 +0300 drm/omap: connector-hdmi: Convert to the GPIO descriptors API The GPIO descriptor API is favoured over the plain GPIO API for consumer drivers. Using it simplifies the driver code. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen commit 1298977f0c8a06743dad0bf64d9a9e5a1e863fa3 Author: Laurent Pinchart Date: Sun May 27 22:01:24 2018 +0300 drm/omap: Check omap_dss_device type based on the output_type field Various functions that need to differentiate between omap_dss_device instances corresponding to displays and to internal encoders use the omap_dss_device.driver field, which is only set for display instances. This gets in the way of the omap_dss_device operations refactoring. Replace that with a check based on the output_type field which is set for all omap_dss_device instances but displays. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen commit a4e9ecf4bb19f13bbd346fae646e7d9ce33db3b8 Author: Laurent Pinchart Date: Thu Mar 29 14:51:04 2018 +0300 drm/omap: Remove unnecessary display output sanity checks The omapdrm driver checks at suspend and resume time whether the displays it operates on have their driver operations set. This check is unneeded, as all display drivers set the driver operations field at probe time and never touch it afterwards. This is furthermore proven by the dereferencing of the driver field without checking it first in several locations. The omapdss driver performs a similar check at shutdown time. This is unneeded as well, as the for_each_dss_display() macro it uses to iterate over displays locates the displays by checking the driver field internally. As those checks are unnecessary, remove them. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen commit 6f7ae8c29242df34386ba9cbbc77ba21f69ac18e Author: Laurent Pinchart Date: Thu Mar 29 14:08:12 2018 +0300 drm/omap: dss: Remove omap_dss_driver .[gs]et_mirror operations The .get_mirror() and .set_mirror() omap_dss_driver operations are implemented by the panel-tpo-td043mtea1 driver but are never used. Remove them. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen commit e553ea09e26810221707e16842e8c7e05297ac75 Author: Laurent Pinchart Date: Thu Mar 29 14:08:12 2018 +0300 drm/omap: dss: Remove unused omap_dss_driver operations The .probe(), .remove(), .run_test(), .get_rotate() and .set_rotate() omap_dss_driver operations are not used. Remove them. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen commit 43f7078f6b6f8fed8edfbbdeff83e276306e5e6e Author: Laurent Pinchart Date: Tue Mar 6 23:34:53 2018 +0200 drm/omap: dss: Remove the dss_mgr_(dis)connect() operations The dss_mgr .connect() and .disconnect() are implemented as no-op in omapdrm. The operations are unneeded, remove them. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen commit 0f37938c7c432c7737d85940475bcbd3c362447e Author: Laurent Pinchart Date: Wed Mar 7 00:28:18 2018 +0200 drm/omap: Set dispc_channel_connect from DSS output connect handlers The omap_dss_device.dispc_channel_connect field is used by DSS outputs to fail the .enable() operation if they're not connected. Set the field directly from the (dis)connect handlers of the DSS outputs instead of going through the CRTC dss_mgr operations. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen commit d25a7d67465faa28062323d46a1d755d3ae6abc6 Author: Laurent Pinchart Date: Wed Mar 7 00:22:10 2018 +0200 drm/omap: Remove supported output check in CRTC connect handler The CRTC connect handler checks whether the DSS output supports the DISPC channel assigned to it. As the channel is assigned to the output by the output driver a failure there could only result from a driver bug. All the output drivers have been verified and they are always assigned a DISPC channel that is supported on the SoC they run on. The check can thus be removed. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen commit 67dfd2d3d0c24217e12d82909f88dfadb04f34bb Author: Laurent Pinchart Date: Tue Mar 6 23:38:21 2018 +0200 drm/omap: Remove omap_crtc_output global array The omap_crtc_output global array is used to look up the DSS output device by channel. We can replace that by accessing the output device from the pipeline if we store the pipeline pointer in the omap_crtc structure. The global array is also used to protect against double connection of an output. This can't happen with the connection handling mechanism going from DSS outputs to displays. We can thus drop that check, allowing removal of the global array. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen commit e48f9f16a16a6ee1befda6d8e5486234ac3a5162 Author: Laurent Pinchart Date: Wed Mar 7 00:01:33 2018 +0200 drm/omap: Store CRTC lookup by channel table in omap_drm_private The omap_crtcs global array is used to store pointers to omap_crtc indexed by DISPC channel number, in order to look them up in the dss_mgr operations. Store the information in the omap_drm_private structure in the form of an array of omap_drm_pipeline pointers. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen commit 00b30e794ffc3bd8f4c6dc357fe7e881ae6e5373 Author: Laurent Pinchart Date: Tue Mar 6 23:37:25 2018 +0200 drm/omap: Pass pipe pointer to omap_crtc_init() Replace the dss display device pointer by a pipe pointer that will allow the omap_crtc_init() function to access both the display and the DSS output. As a result we can remove the omapdss_device_get_dispc_channel() function that is now unneeded. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen commit 3be0f15bd6e94aa17a571020704bde413342e8eb Author: Laurent Pinchart Date: Tue Mar 6 01:51:31 2018 +0200 drm/omap: dss: Merge two disconnection helpers To simplify the pipeline disconnection handling merge the omapdss_device_disconnect() and omapdss_output_unset_device() functions. The device state check is now called for every device in the pipeline, extending this sanity check coverage. There is no need to return an error from omapdss_device_disconnect() when the check fails, as omapdss_output_unset_device() used to do, given that we can't prevent disconnection due to device unbinding (the return value of omapdss_output_unset_device() is never checked in the current code for that reason). Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen commit 713165561b7e372cd21f34bfeb82188361569f74 Author: Laurent Pinchart Date: Tue Mar 6 01:25:13 2018 +0200 drm/omap: dss: Move display type validation to initialization time The display type is validated when the display is connected to the DSS output. We already have all the information we need for validation when initializing the outputs. Move validation to output initialization to simplify pipeline connection handling. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen commit 79ddb2f0c348e991edca106a0e5ab414a822ccfc Author: Laurent Pinchart Date: Sat May 26 20:25:10 2018 +0300 drm/omap: dss: Move connection checks to omapdss_device_(dis)connect When a DSS output is (dis)connected the omapdss_output_(un)set_device() function performs a sanity check to ensure that the output isn't already (dis)connected. The check is unnecessary as those situations should never happen, but can nonetheless be useful to catch driver bugs. To prepare for removal of the omapdss_output_(un)set_device() functions move the connection check to the omapdss_device_connect() function. The omapdss_device_disconnect() already contains a corresponding check. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen commit 511afb44d72aa7b6b871fa71f829afaaa27e84f0 Author: Laurent Pinchart Date: Sun Mar 4 23:42:36 2018 +0200 drm/omap: Reverse direction of DSS device (dis)connect operations The omapdrm and omapdss drivers are architectured based on display pipelines made of multiple components handled from sink (display) to source (DSS output). This is incompatible with the DRM bridge and panel APIs that handle components from source to sink. To reconcile the omapdrm and omapdss drivers with the DRM bridge and panel model, we need to reverse the direction of the DSS device operations. Start with the connect and disconnect operations. Signed-off-by: Laurent Pinchart Signed-off-by: Tomi Valkeinen commit 2ee767922e1bc7ede9ceb7aed9a14141480836a7 Author: Laurent Pinchart Date: Mon Mar 5 15:02:22 2018 +0200 drm/omap: Group CRTC, encoder, connector and dssdev in a structure Create an omap_drm_pipeline structure to model display pipelines, made of a CRTC, an encoder, a connector and a DSS display device. This allows grouping related parameters together instead of storing them in independent arrays and thus improves code readability. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen commit ac3b13189333c224e800b3421ac89536d0109b78 Author: Laurent Pinchart Date: Mon Mar 5 19:11:30 2018 +0200 drm/omap: Create all planes before CRTCs Creating all the planes in a single location instead of creating them per-CRTC with remaining planes then created in a second step simplifies the logic. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen commit f96993630445b7bf0aebc67288f804035ec46fc6 Author: Laurent Pinchart Date: Mon Mar 5 14:47:47 2018 +0200 drm/omap: Remove unneeded variable assignments in omap_modeset_init The crtc_idx and plane_idw variables in the main loop are always equal to the loop counter i, use it instead. Don't unnecessarily initialize dssdev to NULL. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen commit 8a36357ae3b2d1b4647d20bc806d524c21132572 Author: Laurent Pinchart Date: Mon Mar 5 00:10:55 2018 +0200 drm/omap: dss: Get regulators at probe time Regulators for the DPI, DSI, HDMI, SDI and VENC outputs are all looked up when connecting the output omap_dss_device. There's no need to delay regulator handling to that time, get the regulators at probe time. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen commit a48bc6ac2c6cd85bc079fc859ab14ea844e812cd Author: Laurent Pinchart Date: Sun Mar 4 23:55:56 2018 +0200 drm/omap: dss: Remove duplicated parameter to dss_mgr_(dis)connect() The dss_mgr_connect() and dss_mgr_disconnect() functions take two omap_dss_device pointers as parameters, which are always set to the same value by all callers. Remove the duplicated pointer. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen commit bea131966ffab271e8c3b33e37244ad340fb7876 Author: Laurent Pinchart Date: Mon Mar 5 14:28:06 2018 +0200 drm/omap: dss: Add function to retrieve display for an output Add a new omapdss_display_get() function to retrieve the omap_dss_device for a given DSS output. This will be used when reversing the direction of the DSS pipeline handling logic. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen commit f7e376aece4636afb0c4da5ce54d5e805ce47a76 Author: Laurent Pinchart Date: Sun Mar 4 22:28:25 2018 +0200 drm/omap: dss: Add for_each_dss_output() macro Similarly to for_each_dss_display(), the for_each_dss_output() macro iterates over all the DSS connected outputs. Signed-off-by: Laurent Pinchart Signed-off-by: Tomi Valkeinen commit 27d624527d99265c2df999af3615ff71c29d06f4 Author: Laurent Pinchart Date: Fri Mar 2 22:13:06 2018 +0200 drm/omap: dss: Acquire next dssdev at probe time Look up the next dssdev at probe time based on device tree links for all DSS outputs and encoders. This will be used to reverse the order of the dssdev connect and disconnect call chains. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen commit c87193267d247c58f4517081d9cd04c8dc6302b8 Author: Laurent Pinchart Date: Sat Mar 3 18:52:59 2018 +0200 drm/omap: dss: venc: Move initialization code from bind to probe There's no reason to delay initialization of most of the driver (such as mapping memory I/O or enabling runtime PM) to the component bind handler. Perform as much of the initialization as possible at probe time, initializing at bind time only the parts that depends on the DSS. The cleanup code is moved from unbind to remove in a similar way. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen commit 5f031b4717349849e4d88edd09c9ec06a4729cfb Author: Laurent Pinchart Date: Sat Mar 3 18:52:59 2018 +0200 drm/omap: dss: hdmi5: Move initialization code from bind to probe There's no reason to delay initialization of most of the driver (such as mapping memory I/O or enabling runtime PM) to the component bind handler. Perform as much of the initialization as possible at probe time, initializing at bind time only the parts that depends on the DSS. The cleanup code is moved from unbind to remove in a similar way. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen commit 5fc15d98a06833dd6b4247533fa50e15ada34c5e Author: Laurent Pinchart Date: Sat Mar 3 18:52:59 2018 +0200 drm/omap: dss: hdmi4: Move initialization code from bind to probe There's no reason to delay initialization of most of the driver (such as mapping memory I/O or enabling runtime PM) to the component bind handler. Perform as much of the initialization as possible at probe time, initializing at bind time only the parts that depends on the DSS. The cleanup code is moved from unbind to remove in a similar way. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen commit edb715dffdee71bb8216ee4d71c0714d932e9acf Author: Laurent Pinchart Date: Sat Mar 3 18:52:59 2018 +0200 drm/omap: dss: dsi: Move initialization code from bind to probe There's no reason to delay initialization of most of the driver (such as mapping memory I/O or enabling runtime PM) to the component bind handler. Perform as much of the initialization as possible at probe time, initializing at bind time only the parts that depends on the DSS. The cleanup code is moved from unbind to remove in a similar way. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen commit 66aacfe22d53137eab511b3f4d674ddd40a7b1ac Author: Laurent Pinchart Date: Fri Mar 2 21:38:21 2018 +0200 drm/omap: dss: Cleanup error paths in output init functions Rename the jump labels according to the cleanup they perform, not the location they're accessed from, and move functions from error checks to cleanup paths, and move reference handling to simplify cleanup. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen commit a25edf0ea6de6780ef9e8dc489a5c14599c48326 Author: Laurent Pinchart Date: Fri Mar 2 22:05:41 2018 +0200 drm/omap: displays: Don't cast dssdev to panel data unnecessarily The connect handle of the analog TV and HDMI connectors casts the dssdev to panel data only to then access fields of the panel data that are also present in the dssdev. Remove the cast and use dssdev directly. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen commit eaaedaf6a1de3be2f62feefc40fa6a711382f1ca Author: Laurent Pinchart Date: Fri Mar 2 21:11:06 2018 +0200 drm/omap: dss: Extend omapdss_of_find_source_for_first_ep() to sinks The omapdss_of_find_source_for_first_ep() function locates the source corresponding to the first endpoint of the first port of a device node. We can easily extend it to locate sinks as well by passing the port number as a parameter. This will be useful to find sinks in encoders drivers. Extend the function and rename it to omapdss_of_find_connected_device() to reflect its new extended purpose. Additionally, it is useful to differentiate between failures to return the connected device because no link exists in the device tree for the requested port, or because the connected device as described in the device tree is invalid or not probed yet. Return NULL in the first case and an error code in the second case, and update the callers accordingly. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen commit 4e20bda68e01f723d7fcc4e7d55a4afc78223fb7 Author: Laurent Pinchart Date: Sun Mar 4 21:49:28 2018 +0200 drm/omap: dss: Replace omap_dss_device port number with bitmask The omap_dss_device port_num field stores the DT port number associated with the device. The field is used in different ways depending on the device type: - For DPI outputs, the port number is used as an identifier of the DPI instance - For sources, the port number is used to look up the omap_dss_device by DT port node As omap_dss_device instances are only looked up as sources by sinks, setting the field to the number of the source port works for both use cases. However, to enable looking up sinks, we need to record all the ports associated with an omap_dss_device. Do so by turning the port_num field into an of_ports bitmask. For DPI outputs the port number is additionally stored in the dpi_data structure as the output ID. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen commit 5c718e015a0f1280440f90ebf1c18e2b98a102e4 Author: Laurent Pinchart Date: Fri Mar 2 03:11:49 2018 +0200 drm/omap: dss: Modify omapdss_find_output_from_display() to return channel The omapdss_find_output_from_display() function is only used to retrieve the dispc channel corresponding to the display. Return the dispc channel directly, and rename the function to omapdss_device_get_dispc_channel() to match its new purpose. The dssdev->id check is removed as the dssdev is guaranteed to be an output and have a non-zero id, as proved by the lack of crash despite the caller never checking the returned pointer before dereferencing it. As the function is not specific to outputs anymore, move it from output.c to base.c. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen commit 845417b3b3b0d6c1694394ae6c3e07b281b89f82 Author: Laurent Pinchart Date: Fri Mar 2 03:05:10 2018 +0200 drm/omap: dss: Move DSS mgr ops and private data to dss_device The DSS manager ops and private data pointer are specific to a DSS instance. Store them in the dss_device structure instead of global variable. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen commit f324b2798c871511c64ea4232405e6f248e20d52 Author: Laurent Pinchart Date: Fri Mar 2 02:54:16 2018 +0200 drm/omap: dss: Store dss_device pointer in omap_dss_device Storing the dss_device pointer in the omap_dss_device structure will allow accessing the dss_device from the dss_mgr API functions. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen commit c1dfe721e0966947019c43b65f2837c591fdcb3c Author: Laurent Pinchart Date: Fri Mar 2 02:43:45 2018 +0200 drm/omap: dss: Move and rename omap_dss_(get|put)_device() The functions operate on any omap_dss_device, move them from display.c to base.c. While at it rename them to match the naming of the other functions operating on struct omap_dss_device. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen commit 67822ae11971c664f5d28d7914b4b00cff07a9fd Author: Laurent Pinchart Date: Fri Mar 2 01:25:32 2018 +0200 drm/omap: dss: Remove panel devices list The panel devices list isn't used anymore, all panel devices are accessed through the global devices list. Remove it. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen commit 4e0bb06c0b9a025a5a52f93ecef7658d8f8c3c06 Author: Laurent Pinchart Date: Fri Mar 2 02:15:36 2018 +0200 drm/omap: dss: Split omapdss_register_display() Split the function into omapdss_display_init() to perform display-specific initialization of the omap_dss_device, and omapdss_register_display() to register the device. The latter will then be replaced by more generic registration. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen commit b9f4d2ebf641d157be89a68227a5feb00c961d10 Author: Laurent Pinchart Date: Fri Mar 2 02:07:34 2018 +0200 drm/omap: dss: Make omap_dss_get_next_device() more generic Despite its name, the omap_dss_get_next_device() function operates on display devices only. Make it more generic by allowing operation on all devices, with a parameter to specify the device type. While at it rename the function to omapdss_device_get_next() to match the naming of the other functions operating on struct omap_dss_device. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen commit 92ce521a4841131acf9af41e5bc772990ada06dc Author: Laurent Pinchart Date: Fri Mar 2 01:40:48 2018 +0200 drm/omap: dss: Rename for_each_dss_dev macro to for_each_dss_display The macro iterates over displays only, rename it accordingly. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen commit de57e9dbc1454704a54190cb3b544b841c34301a Author: Laurent Pinchart Date: Fri Mar 2 01:25:32 2018 +0200 drm/omap: dss: Remove output devices list The output devices list isn't used anymore, all output devices are accessed through the global devices list. Remove it. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen commit 3ce75d67e44c11c9f84ea0355fe6431a43ce6e94 Author: Laurent Pinchart Date: Fri Mar 2 00:40:04 2018 +0200 drm/omap: Move DSI debugfs clocks dump to dsi%u_clks files The DSI clocks are dumped in the DSS-level debugfs clocks file. This complicates the implementation as the DSI private data has to be looked up through the outputs list. Simplify it by creating two debugfs files, dsi1_clks and dsi2_clks, to dump the DSI clocks. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen commit f3ed97f9ae7df6a36025b94e1943492e73691f7c Author: Laurent Pinchart Date: Fri Mar 2 00:40:04 2018 +0200 drm/omap: dsi: Simplify debugfs implementation The DSI debugfs regs and irqs show handlers received a pointer to the DSI private data. There's no need to look it up from the list of DSS outputs. Use the pointer directly, this allows simplifying the implementation of the handlers. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen commit 7269fde4e8c96e67cd39f456cabf3329b06efffc Author: Laurent Pinchart Date: Wed Feb 28 17:30:30 2018 +0200 drm/omap: displays: Remove input omap_dss_device from panel data All connectors, encoders and panels store a pointer to their input omap_dss_device in the panel driver data structure. This duplicates the src field in the omap_dss_device structure. Remove the private copy and use the src field. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen commit fb5571717c24c264518aaaf1ab4ec4df73e4cebd Author: Laurent Pinchart Date: Wed Feb 28 17:30:30 2018 +0200 drm/omap: dss: Move src and dst check and set to connection handlers The encoders duplicate the same omap_dss_device src and dst fields set and checks in their connect and disconnect handlers. Move the code to the connect and disconnect wrappers. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen commit 73fc0ac4a69506ead7cf0c0ad0ef79f283766f25 Author: Laurent Pinchart Date: Sat Aug 4 22:10:44 2018 +0300 drm/omap: displays: Don't call disconnect handlers directly In preparation for the move of checks from the disconnect handlers to the omapdss_device_disconnect() function, replace direct calls to the disconnect handlers at remove time with calls to omapdss_device_disconnect(). Signed-off-by: Laurent Pinchart Signed-off-by: Tomi Valkeinen commit 1f507968c30b0e86a307164a212ef11def1e5899 Author: Laurent Pinchart Date: Wed Feb 28 17:30:30 2018 +0200 drm/omap: dss: Move debug message and checks to connection handlers The connectors, encoders and display duplicate the same debug messages and connection checks in their omap_dss_device connect and disconnect handlers. Move the code to the connect and disconnect wrappers. To simplify the code the connect function returns -EBUSY unconditionally if the device is already connected. This doesn't cause any change in practice: the connect handler of displays is never called on a connected device as it is only invoked during omapdrm initialization. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen commit ec727e3f61845d6d64b3c5eba464096d6cc7f8e9 Author: Laurent Pinchart Date: Wed Feb 28 17:30:30 2018 +0200 drm/omap: dss: Add functions to connect and disconnect devices The omap_dss_device objects model display components and are connected at runtime to create display pipelines. The connect and disconnect operations implemented by each component contain lots of duplicate code. As a first step towards fixing this, create new functions to wrap the direct calls to those operations and use them. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen commit b93109d7dc9e15649e1cf18281f02d8b4a102584 Author: Laurent Pinchart Date: Wed Feb 28 15:58:13 2018 +0200 drm/omap: dss: Move common device operations to common structure The various types of omapdss_*_ops structures define multiple operations that are not specific to a bus type. To simplify the code and remove dependencies on specific bus types move those operations to a common structure. Operations that are specific to a bus type are kept in the specialized ops structures. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen commit e10bd354ad79d2772842300c85ffd1a49722cfae Author: Laurent Pinchart Date: Thu Mar 1 23:35:55 2018 +0200 drm/omap: dss: Allow looking up any device by port The omap_dss_find_output_by_port() function looks up an omap_dss_device by port from the list of devices registered as outputs. In preparation for looking up sinks in addition to sources, allow the function to look up any registered device. Rename it to omap_dss_find_device_by_port() to match its new purpose. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen commit a7e82a67c1d7b0be6c195a7c4cf2548fa873c056 Author: Laurent Pinchart Date: Thu Mar 1 23:35:55 2018 +0200 drm/omap: dss: Rework output lookup by port node The omap_dss_find_output_by_port_node() function defined in output.c looks up an output from its port node. To do so it needs to call helper functions from dss-of.c to lookup the port parent and the port number. As omap_dss_find_output_by_port_node() is only called by omapdss_of_find_source_for_first_ep() from dss-of.c this goes back and forth between the to source files and isn't very clear. Simplify the code by passing both the parent and the port number to omap_dss_find_output_by_port_node() instead of the port node, and rename the function to omap_dss_find_output_by_port(). Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen commit 9184f8d94c389c4712b4f393cca4a09c9e770514 Author: Laurent Pinchart Date: Wed Feb 28 23:53:16 2018 +0200 drm/omap: dss: Create and use omapdss_device_is_registered() The omapdss_component_is_loaded() function test whether a component is loaded by checking whether it is present in the displays list or the outputs list. Simplify the implementation by checking for the component in the global omap_dss_device list. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen commit 6a7c5a2200ad10a23912d3f40ef104f0d0543de4 Author: Laurent Pinchart Date: Wed Feb 28 23:49:24 2018 +0200 drm/omap: dss: Create global list of all omap_dss_device instances The omap_dss_device instances are stored in two separate lists, depending on whether they are panels or outputs. Create a third list that stores all omap_dss_device instances to allow generic code to operate on all instances. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen commit 7e7a0edecca0e317b6a29478c24e8f7a2234382b Author: Laurent Pinchart Date: Wed Feb 28 23:48:35 2018 +0200 drm/omap: dss: Rename omap_dss_device list field to output_list For coherency with the panel_list field, rename list to output_list. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen commit df91128b205d65a714ab3b2c82481c69ae18b1a9 Author: Laurent Pinchart Date: Wed Feb 28 14:48:45 2018 +0200 drm/omap: dss: Remove omap_dss_device panel fields The omap_dss_device panel.dsi_pix_fmt and panel.dsi_mode fields are unused. Remove them. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen commit d65b0e0530bbdf2c90657c086319f68ddfd3837d Author: Laurent Pinchart Date: Tue Feb 27 20:11:52 2018 +0200 drm/omap: displays: Remove videomode from omap_dss_device structure The omap_dss_device structure stores a videomode. All the connector and panel drivers that use omap_dss_device also store the videomode in their own panel_drv_data structures. There's no need to duplicate, remove the videomode field from omap_dss_device. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen commit e0528c944058e137a1c74176173109a6864241ac Author: Laurent Pinchart Date: Wed Feb 14 03:12:37 2018 +0200 drm/omap: dss: Constify omap_dss_driver operations structure The structure contains function pointers that don't need to be modified. Make all its instances const to improve security. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen commit 21ebcbac5066a36e0d88ea43921cce8418fd453a Author: Laurent Pinchart Date: Wed Feb 14 03:26:52 2018 +0200 drm/omap: dss: Remove unused omapdss_default_get_timings() All omap_dss_driver instances provide the get_timings operation. Remove the default function. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen commit 9976782f331b0d54710fddd89848b9b6e22746d4 Author: Laurent Pinchart Date: Tue Feb 27 20:29:21 2018 +0200 drm/omap: dss: Remove DSS encoders get_timings operation The get_timings operation from DSS encoders (not to be confused with the identically named operation in omap_dss_driver) is never called. Remove it. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen commit 52dd898a30e0cc0354e34ee3955cec0ca60a80d5 Author: Laurent Pinchart Date: Wed Feb 14 02:22:42 2018 +0200 drm/omap: dss: Remove omapdss_atv_ops get_wss and set_wss operations The operations are never used, remove them. If the need to set wide screen signaling data arises later, it should be implemented by extending the DRM bridge API. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen commit 8023651bd3d9372779be731a1165058cd33b454e Author: Laurent Pinchart Date: Wed Mar 7 20:34:42 2018 +0200 drm/omap: dss: Handle DPI and SDI port initialization failures The dpi_init_port() and sdi_init_port() functions can return errors but their return value is ignored. This prevents both probe failures and probe deferral from working correctly. Propagate the errors up the call stack. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen commit cc1876ce5791b1c87d0b4dd5d1507e9c80558af2 Author: Jyri Sarha Date: Fri Feb 16 13:25:07 2018 +0200 drm/omap: dss: Move platform_device_register from core.c to dss.c probe Register the omapdrm device when we know that dss device probe going to succeed. This avoids DSS6 and DSS2 omapdrm device registration from colliding with each other. Signed-off-by: Jyri Sarha Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen commit f13e97cf3e72288b883a29e82a6d0d7cfb9827a4 Author: Laurent Pinchart Date: Thu Mar 1 21:51:43 2018 +0200 drm/omap: dss: Gather OMAP DSS components at probe time The omapdss_gather_components() function walks the OF graph to create a list of all components part of the display device. There's no need to delay this operation until DSS bind time as we have all the information we need at probe time. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen commit 36c61ae2b755f1b64d5adcf43bb32932dcc4c330 Author: Peter Ujfalusi Date: Mon Feb 12 11:44:40 2018 +0200 drm/omap: dss: Remove display ordering from dss/display.c As ordering of the dss_devices based on DT aliases is now implemented in omap_drm.c, there is no need to do the ordering in dss/display.c anymore. At the same time remove the alias member of the omap_dss_device struct since it is no longer needed. The only place it was used is in the omapdss_register_display() function. Signed-off-by: Peter Ujfalusi Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen commit eb5bc1f92ba38ae16a4db499e3ebeb0b86fe769e Author: Peter Ujfalusi Date: Mon Feb 12 11:44:39 2018 +0200 drm/omap: Do dss_device (display) ordering in omap_drv.c Sort the dssdev array based on DT aliases. With this change we can remove the panel ordering from dss/display.c and have all sorting related to dssdevs in one place. Signed-off-by: Peter Ujfalusi Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen commit 52b9ef246d6a8667c87771d1b0fdb982afc88c7f Author: Peter Ujfalusi Date: Mon Feb 12 11:44:37 2018 +0200 drm/omap: Manage the usable omap_dss_device list within omap_drm_private Instead of reaching back to DSS to iterate through the dss_devices every time, use an internal array where we store the available and usable dss_devices. At the same time remove the omapdss_device_is_connected() check from omap_modeset_init() as it became irrelevant: We are not adding dssdevs if their connect failed. Signed-off-by: Peter Ujfalusi Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen commit fb96b67c8ae0c91e17f0f9fe88cfce406ace6a94 Author: Peter Ujfalusi Date: Mon Feb 12 11:44:36 2018 +0200 drm/omap: Allocate drm_device earlier and unref it as last step If we allocate the drm_device earlier we can just return the error code without the need to use goto. Do the unref of the drm_device as a last step when cleaning up. This will make the drm_device available longer for us and makes sure that we only free up the memory when all other cleanups have been already done. Signed-off-by: Peter Ujfalusi Reviewed-by: Laurent Pinchart Signed-off-by: Tomi Valkeinen Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen commit bef459026b161fbc39d20dcba698ed0cfffbac38 Author: Jann Horn Date: Tue Aug 28 22:14:21 2018 +0200 lkdtm: Test copy_to_user() on bad kernel pointer under KERNEL_DS Test whether the kernel WARN()s when, under KERNEL_DS, a bad kernel pointer is used as "userspace" pointer. Should normally be used in "DIRECT" mode. Signed-off-by: Jann Horn Signed-off-by: Thomas Gleixner Tested-by: Kees Cook Acked-by: Kees Cook Cc: Andy Lutomirski Cc: kernel-hardening@lists.openwall.com Cc: dvyukov@google.com Cc: Masami Hiramatsu Cc: "Naveen N. Rao" Cc: Anil S Keshavamurthy Cc: "David S. Miller" Cc: Alexander Viro Cc: linux-fsdevel@vger.kernel.org Cc: Borislav Petkov Link: https://lkml.kernel.org/r/20180828201421.157735-8-jannh@google.com commit 9da3f2b74054406f87dff7101a569217ffceb29b Author: Jann Horn Date: Tue Aug 28 22:14:20 2018 +0200 x86/fault: BUG() when uaccess helpers fault on kernel addresses There have been multiple kernel vulnerabilities that permitted userspace to pass completely unchecked pointers through to userspace accessors: - the waitid() bug - commit 96ca579a1ecc ("waitid(): Add missing access_ok() checks") - the sg/bsg read/write APIs - the infiniband read/write APIs These don't happen all that often, but when they do happen, it is hard to test for them properly; and it is probably also hard to discover them with fuzzing. Even when an unmapped kernel address is supplied to such buggy code, it just returns -EFAULT instead of doing a proper BUG() or at least WARN(). Try to make such misbehaving code a bit more visible by refusing to do a fixup in the pagefault handler code when a userspace accessor causes a #PF on a kernel address and the current context isn't whitelisted. Signed-off-by: Jann Horn Signed-off-by: Thomas Gleixner Tested-by: Kees Cook Cc: Andy Lutomirski Cc: kernel-hardening@lists.openwall.com Cc: dvyukov@google.com Cc: Masami Hiramatsu Cc: "Naveen N. Rao" Cc: Anil S Keshavamurthy Cc: "David S. Miller" Cc: Alexander Viro Cc: linux-fsdevel@vger.kernel.org Cc: Borislav Petkov Link: https://lkml.kernel.org/r/20180828201421.157735-7-jannh@google.com commit 81fd9c18444ed1199b5a6f6776a395292d4256fb Author: Jann Horn Date: Tue Aug 28 22:14:19 2018 +0200 x86/fault: Plumb error code and fault address through to fault handlers This is preparation for looking at trap number and fault address in the handlers for uaccess errors. No functional change. Signed-off-by: Jann Horn Signed-off-by: Thomas Gleixner Tested-by: Kees Cook Cc: Andy Lutomirski Cc: kernel-hardening@lists.openwall.com Cc: linux-kernel@vger.kernel.org Cc: dvyukov@google.com Cc: Masami Hiramatsu Cc: "Naveen N. Rao" Cc: Anil S Keshavamurthy Cc: "David S. Miller" Cc: Alexander Viro Cc: linux-fsdevel@vger.kernel.org Cc: Borislav Petkov Link: https://lkml.kernel.org/r/20180828201421.157735-6-jannh@google.com commit 75045f77f7a73e617494d7a1fcf4e9c1849cec39 Author: Jann Horn Date: Tue Aug 28 22:14:18 2018 +0200 x86/extable: Introduce _ASM_EXTABLE_UA for uaccess fixups Currently, most fixups for attempting to access userspace memory are handled using _ASM_EXTABLE, which is also used for various other types of fixups (e.g. safe MSR access, IRET failures, and a bunch of other things). In order to make it possible to add special safety checks to uaccess fixups (in particular, checking whether the fault address is actually in userspace), introduce a new exception table handler ex_handler_uaccess() and wire it up to all the user access fixups (excluding ones that already use _ASM_EXTABLE_EX). Signed-off-by: Jann Horn Signed-off-by: Thomas Gleixner Tested-by: Kees Cook Cc: Andy Lutomirski Cc: kernel-hardening@lists.openwall.com Cc: dvyukov@google.com Cc: Masami Hiramatsu Cc: "Naveen N. Rao" Cc: Anil S Keshavamurthy Cc: "David S. Miller" Cc: Alexander Viro Cc: linux-fsdevel@vger.kernel.org Cc: Borislav Petkov Link: https://lkml.kernel.org/r/20180828201421.157735-5-jannh@google.com commit e3e4d5019c2dd0f91600f6df377b215a73d506fe Author: Jann Horn Date: Tue Aug 28 22:14:17 2018 +0200 x86/kprobes: Stop calling fixup_exception() from kprobe_fault_handler() This removes the call into exception fixup that was added in commit c28f896634f2 ("[PATCH] kprobes: fix broken fault handling for x86_64"). On X86, kprobe_fault_handler() is called from two places: do_general_protection() (for #GP) and kprobes_fault() (for #PF). In both paths, the fixup_exception() call in the kprobe fault handler is redundant. In case of #GP, fixup_exception() is called immediately before kprobe_fault_handler() is invoked, so no need to try that again. This assumes that the kprobe's fault handler isn't going to do something crazy like changing RIP so that it suddenly points to an instruction that does userspace access. For #PF on a kernel address from kernel space, after the kprobe fault handler has run, no_context() is invoked, which calls fixup_exception(). Signed-off-by: Jann Horn Signed-off-by: Thomas Gleixner Tested-by: Kees Cook Acked-by: Masami Hiramatsu Cc: Andy Lutomirski Cc: kernel-hardening@lists.openwall.com Cc: linux-kernel@vger.kernel.org Cc: dvyukov@google.com Cc: "Naveen N. Rao" Cc: Anil S Keshavamurthy Cc: "David S. Miller" Cc: Alexander Viro Cc: linux-fsdevel@vger.kernel.org Cc: Borislav Petkov Link: https://lkml.kernel.org/r/20180828201421.157735-4-jannh@google.com commit 76dee4a72849561f6ffacc357cfd0aa33336081a Author: Jann Horn Date: Tue Aug 28 22:14:16 2018 +0200 x86/kprobes: Inline kprobe_exceptions_notify() into do_general_protection() The opaque plumbing of #GP from do_general_protection() through notify_die() into kprobe_exceptions_notify() makes it hard to understand what's going on. Suggested-by: Andy Lutomirski Signed-off-by: Jann Horn Signed-off-by: Thomas Gleixner Tested-by: Kees Cook Acked-by: Masami Hiramatsu Cc: kernel-hardening@lists.openwall.com Cc: dvyukov@google.com Cc: "Naveen N. Rao" Cc: Anil S Keshavamurthy Cc: "David S. Miller" Cc: Alexander Viro Cc: linux-fsdevel@vger.kernel.org Cc: Borislav Petkov Link: https://lkml.kernel.org/r/20180828201421.157735-3-jannh@google.com commit a980c0ef9f6d8c45445d6ed0f5836bb6941c8c91 Author: Jann Horn Date: Tue Aug 28 22:14:15 2018 +0200 x86/kprobes: Refactor kprobes_fault() like kprobe_exceptions_notify() This is an extension of commit b506a9d08bae ("x86: code clarification patch to Kprobes arch code"). As that commit explains, even though kprobe_running() can't be called with preemption enabled, preemption does not need to be disabled. If preemption is enabled, then this can't be originate from a kprobe. Also, use X86_TRAP_PF instead of 14. Signed-off-by: Jann Horn Signed-off-by: Thomas Gleixner Tested-by: Kees Cook Acked-by: Masami Hiramatsu Cc: Andy Lutomirski Cc: kernel-hardening@lists.openwall.com Cc: dvyukov@google.com Cc: "Naveen N. Rao" Cc: Anil S Keshavamurthy Cc: "David S. Miller" Cc: Alexander Viro Cc: linux-fsdevel@vger.kernel.org Cc: Borislav Petkov Link: https://lkml.kernel.org/r/20180828201421.157735-2-jannh@google.com commit 80863ee222d37b1797cea74d2257ad6d68444d30 Author: Andrew F. Davis Date: Fri Aug 31 13:24:31 2018 -0500 ASoC: tlv320aic31xx: Add short circuit detection support These devices support detecting and reporting short circuits across the output stages. Add support for reporting these issue. Do this by registering an interrupt if available and enabling this error to trigger that interrupt in the device. Signed-off-by: Andrew F. Davis Signed-off-by: Mark Brown commit 34f89904b01e6d0cc7425d040ffa38f37d218725 Author: Joonas Lahtinen Date: Mon Sep 3 14:57:55 2018 +0300 drm/i915: Update DRIVER_DATE to 20180903 Signed-off-by: Joonas Lahtinen commit fbb0de795078190a9834b3409e4b009cfb18a6d4 Author: Gerd Hoffmann Date: Mon Aug 27 11:34:44 2018 +0200 Add udmabuf misc device A driver to let userspace turn memfd regions into dma-bufs. Use case: Allows qemu create dmabufs for the vga framebuffer or virtio-gpu ressources. Then they can be passed around to display those guest things on the host. To spice client for classic full framebuffer display, and hopefully some day to wayland server for seamless guest window display. qemu test branch: https://git.kraxel.org/cgit/qemu/log/?h=sirius/udmabuf Cc: David Airlie Cc: Tomeu Vizoso Cc: Laurent Pinchart Cc: Daniel Vetter Signed-off-by: Gerd Hoffmann Acked-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20180827093444.23623-1-kraxel@redhat.com commit 4ac695464763ecf696eaba563eff1c2ab994f6d8 Author: Eric Long Date: Tue Aug 28 19:09:07 2018 +0800 dmaengine: sprd: Support DMA link-list mode The Spreadtrum DMA can support the link-list transaction mode, which means DMA controller can do transaction one by one automatically once we linked these transaction by link-list register. Signed-off-by: Eric Long Signed-off-by: Baolin Wang Signed-off-by: Vinod Koul commit 63a886f38dd96868e33488eccee8ed427144d397 Author: Randy Dunlap Date: Sun Sep 2 19:38:10 2018 -0700 ASoC: fix soc-core.c kernel-doc warning Fix kernel-doc warning: ../sound/soc/soc-core.c:2918: warning: Excess function parameter 'legacy_dai_naming' description in 'snd_soc_register_dais' Signed-off-by: Randy Dunlap Signed-off-by: Mark Brown commit 6b048706f407f138293f06db31f88370f970db3a Author: Chris Wilson Date: Mon Sep 3 09:33:37 2018 +0100 drm/i915: Forcibly flush unwanted requests in drop-caches Add a mode to debugfs/drop-caches to flush unwanted requests off the GPU (by wedging the device and resetting). This is very useful if a test terminated leaving a long queue of hanging batches that would ordinarily require a round trip through hangcheck for each. It reduces the inter-test operation to just a write into drop-caches to reset driver/GPU state between tests. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20180903083337.13134-5-chris@chris-wilson.co.uk commit e0ff7a7cddeff8ab2445f9d33f2416f8f89f9bca Author: Chris Wilson Date: Mon Sep 3 09:33:36 2018 +0100 drm/i915: Early rejection of buffer allocations larger than RAM We currently try to pin and allocate the whole buffer at a time. If that object is larger than RAM, we will try to pin the whole of physical memory, force the machine into oom, and then still fail the allocation. If the request is obviously too large, error out early. We opt to do this in the backend to make it easy to use alternate paths that do not require the entire object pinned, or may easily handle proxy objects that are larger than physical memory. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20180903083337.13134-4-chris@chris-wilson.co.uk commit fddcd00a49e9122a3579247151e9cb3ce5a1a36e Author: Chris Wilson Date: Mon Sep 3 09:33:35 2018 +0100 drm/i915: Force the slow path after a user-write error If we fail to write the user relocation back when it is changed, force ourselves to take the slow relocation path where we can handle faults in the write path. There is still an element of dubiousness as having patched up the batch to use the correct offset, it no longer matches the presumed_offset in the relocation, so a second pass may miss any changes in layout. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20180903083337.13134-3-chris@chris-wilson.co.uk commit aae7c06b34e4a351c8dab28f3cda6b1ba0637bf9 Author: Chris Wilson Date: Mon Sep 3 09:33:34 2018 +0100 drm/i915: Flag any possible writes for a GTT fault We do not explicitly mark the PTE for the user's GTT mmap as being wrprotect, so we don't get a refault when we would need to change a read-only mmapping into read-write. As such, we must presume that if the vma has PROT_WRITE it may be written to, although this is supposed to be indicated by set-domain there are cases (e.g. after swap) where userspace may not be aware of the implicit domain change. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20180903083337.13134-2-chris@chris-wilson.co.uk commit 2bfbf6fed1a0f672726b0637b89b44d94dedd2b6 Author: Chris Wilson Date: Mon Sep 3 09:33:33 2018 +0100 drm/i915: Do a full device reset after being wedged We only call unset_wedged on the global reset path (since it's a global operation), so if we are terminally wedged and wish to reset, take the full device reset path rather than the quicker individual engine resets. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20180903083337.13134-1-chris@chris-wilson.co.uk commit d8570d018f69de60ec65790083767fd2e44a6c7a Author: Barry Song <21cnbao@gmail.com> Date: Fri Aug 17 06:03:43 2018 -0700 dmaengine: at_xdmac: move spin_lock_bh to spin_lock in tasklet as you are already in a tasklet, it is unnecessary to call spin_lock_bh. Signed-off-by: Barry Song <21cnbao@gmail.com> Acked-by: Ludovic Desroches Signed-off-by: Vinod Koul commit cbc229a47c82052677cac3066db7cb90aa8ffdc2 Author: Barry Song <21cnbao@gmail.com> Date: Fri Aug 17 06:02:02 2018 -0700 dmaengine: mv_xor: move spin_lock_bh to spin_lock in tasklet as you are already in a tasklet, it is unnecessary to call spin_lock_bh. Signed-off-by: Barry Song <21cnbao@gmail.com> Signed-off-by: Vinod Koul commit 1297b647c58c5d1d576654acf93c3dabb615256a Author: Barry Song <21cnbao@gmail.com> Date: Fri Aug 17 06:00:26 2018 -0700 dmaengine: fsldma: move spin_lock_bh to spin_lock in tasklet as you are already in a tasklet, it is unnecessary to call spin_lock_bh. Signed-off-by: Barry Song <21cnbao@gmail.com> Signed-off-by: Vinod Koul commit bd1852317ffea39ed970f942259be82713bbf8d4 Author: Andy Shevchenko Date: Fri Aug 31 11:23:41 2018 +0300 EDAC: Get rid of custom ICPU() macro Replace custom grown macro with generic INTEL_CPU_FAM6() one. No functional change intended. Signed-off-by: Andy Shevchenko Cc: linux-edac Link: http://lkml.kernel.org/r/20180831082341.72363-1-andriy.shevchenko@linux.intel.com Signed-off-by: Borislav Petkov commit 4f2c7337af638bd73fd1f247f84a85521a34b74c Author: Chris Wilson Date: Sat Sep 1 10:24:51 2018 +0100 drm/i915: Determine uses-full-ppgtt from context for execbuf Rather than inspect the global module parameter for whether full-ppgtt maybe enabled, we can inspect the context directly as to whether it has its own vm. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Bob Paauwe Cc: Rodrigo Vivi Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20180901092451.7233-1-chris@chris-wilson.co.uk commit 59fed3bf8a461ab07a8e57b42b6402e984c7cc62 Author: Chengguang Xu Date: Fri Aug 31 22:33:48 2018 +0800 ext2: cache NULL when both default_acl and acl are NULL default_acl and acl of newly created inode will be initiated as ACL_NOT_CACHED in vfs function inode_init_always() and later will be updated by calling xxx_init_acl() in specific filesystems. However, when default_acl and acl are NULL, then they keep the value of ACL_NOT_CACHED. This patch changes the code to cache NULL for acl / default_acl in this case to save unnecessary ACL lookup in future. Signed-off-by: Chengguang Xu Signed-off-by: Jan Kara commit 849fe89ce6d7bb52d2903c79d2ff089d55e6ff8a Author: Colin Ian King Date: Wed Aug 29 11:16:12 2018 +0100 udf: remove unused variables group_start and nr_groups Variables group_start and nr_groups are being assigned but are never used hence they are redundant and can be removed. Cleans up clang warning: variable 'group_start' set but not used [-Wunused-but-set-variable] variable 'nr_groups' set but not used [-Wunused-but-set-variable] Signed-off-by: Colin Ian King Signed-off-by: Jan Kara commit 381081ffc2948e1e1a7cbbafe3b91631530a1936 Author: Sergei Shtylyov Date: Sat Sep 1 23:12:28 2018 +0300 clk: renesas: r8a77970: Add SD0H/SD0 clocks for SDHI On R-Car V3M (AKA R8A77970), the SD0CKCR is laid out differently than on the other R-Car gen3 SoCs. In fact, the layout is the same as on R-Car gen2 SoCs, so we'll need to copy the divisor tables from the R-Car gen2 driver. We'll also need to support the SoC specific clock types, thus we're adding CLK_TYPE_GEN3_SOC_BASE at the end of 'enum rcar_gen3_clk_types', declare SD0H/SDH clocks in 'enum r8a77970_clk_types', and handle those clocks in the overridden cpg_clk_register() method; then, finally, add the SD-IF module clock (derived from the SD0 clock). Signed-off-by: Sergei Shtylyov Signed-off-by: Geert Uytterhoeven commit 0a87bf6cd5297d8ae99f3560a7969a0b141f7350 Author: Sergei Shtylyov Date: Sat Sep 1 21:54:27 2018 +0300 clk: renesas: r8a77980: Add CMT clocks Now that RCLK has been added by Geert, we can add the CMT module clocks. Based on the original (and large) patch by Vladimir Barinov. Signed-off-by: Vladimir Barinov Signed-off-by: Sergei Shtylyov Signed-off-by: Geert Uytterhoeven commit 6f4ec8842dd2b634c8811956ca0dcbacd75de06b Author: Anson Huang Date: Mon Sep 3 09:45:41 2018 +0800 ARM: dts: imx7s: enable cpuidle driver Enable cpuidle for i.MX7S/D using generic ARM cpuidle driver, below 2 idle states enabled: 1. ARM WFI; 2. SoC WAIT mode. Signed-off-by: Anson Huang Signed-off-by: Shawn Guo commit 470104ae7296b339baa4e02ffd324251ae56589a Author: Kurt Kanzenbach Date: Thu Aug 30 11:00:38 2018 +0200 arm64: dts: ls208xa: add second duart The NXP LS208xA SoCs have two dual uarts. Thus, add the second one. Signed-off-by: Kurt Kanzenbach Acked-by: Li Yang Signed-off-by: Shawn Guo commit 5b39601cd3a326d50f91a395a614ff6da58aee20 Author: Prabhakar Kushwaha Date: Wed Aug 29 08:57:49 2018 +0530 arm64: dts: fsl: remove big-endian field from IFC controller As per IFC binding, Absence of "little-endian" field causes registers access in big-endian mode. So no need to set explicit big-endian field IFC node for LS1043A and LS1046A. Signed-off-by: Prabhakar Kushwaha Acked-by: Li Yang Signed-off-by: Shawn Guo commit 03444ad87be2d19e7df9ba065be09da397394eb3 Author: Prabhakar Kushwaha Date: Tue Aug 28 12:29:36 2018 +0530 arm64: dts: Add big-endian in nor node for ls104xa NOR and IFC controller connectivity is big-endian. So add big-endian field in nor device tree node allowing IFC controller to read/write data from/to the flash correctly. Signed-off-by: Prabhakar Kushwaha Acked-by: Li Yang Signed-off-by: Shawn Guo commit f5d5d2e6c6490e8245ca704f1d3d0295161d78f5 Author: Anson Huang Date: Thu Aug 30 14:59:39 2018 +0800 ARM: dts: imx6sx-sdb: enable gpio buttons as wakeup source This patch enables i.MX6SX SDB board's below GPIO buttons as wakeup sources: SW4(FUNC1): KEY_VOLUMEUP SW5(FUNC2): KEY_VOLUMEDOWN Signed-off-by: Anson Huang Signed-off-by: Shawn Guo commit 9873fde84ae8ce385865134f8610d8ef6e635c59 Author: Anson Huang Date: Wed Aug 29 09:45:38 2018 +0800 ARM: dts: imx7d-sdb: enable gpio buttons as wakeup source This patch enables i.MX7D SDB board's below GPIO buttons as wakeup sources: S1(FUNC1): KEY_VOLUMEUP S3(FUNC2): KEY_VOLUMEDOWN Signed-off-by: Anson Huang Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo commit 85b839c8733986c04ccfd1213694d17935917d26 Author: Pierre-Jean Texier Date: Tue Aug 28 19:06:37 2018 +0200 ARM: dts: imx7s-warp: use SPDX-License-Identifier Adopt the SPDX license identifier headers to ease license compliance management. Signed-off-by: Pierre-Jean Texier Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo commit f6fea52a7efbe9ffa49ff32ae8d0f40524404ab9 Author: Prabhakar Kushwaha Date: Tue Aug 28 12:29:35 2018 +0530 ARM: dts: Add big-endian in nor node for ls1021a NOR and IFC controller connectivity is big-endian. So add big-endian field in nor device tree node allowing IFC controller to read/write data from/to the flash correctly. Signed-off-by: Prabhakar Kushwaha Acked-by: Li Yang Signed-off-by: Shawn Guo commit 66ba345ba8a613cbe50f00743256c470c756b1c7 Author: Anson Huang Date: Thu Aug 23 16:41:14 2018 +0800 dt-bindings: arm: add missing compatible for i.MX boards This patch adds missing compatible for i.MX boards. Signed-off-by: Anson Huang Reviewed-by: Rob Herring Signed-off-by: Shawn Guo commit 243e022efafbbc263a3af1a2fce5277c65eedf3b Author: Anson Huang Date: Thu Aug 23 16:41:13 2018 +0800 ARM: dts: imx6ull-14x14-evk: correct machine model name i.MX6ULL is a lite version of i.MX6UL, its full name is i.MX6 UltraLiteLite, NOT UlltraLite. Signed-off-by: Anson Huang Signed-off-by: Shawn Guo commit 994558374538d1c59de315642258a165d3bb7fc0 Author: Anson Huang Date: Fri Jun 22 14:32:34 2018 +0800 ARM: dts: imx6sll: add gpio clocks i.MX6SLL has GPIO clock gates in CCM CCGR, add clock property for GPIO driver to make sure all GPIO banks work as expected. Signed-off-by: Anson Huang Signed-off-by: Shawn Guo commit 3494cfb5e41e876e545ef735b2541f2ee53bde6c Author: Sébastien Szymanski Date: Mon Aug 27 10:01:27 2018 +0200 ARM: dts: imx6ul: Add weim node Add weim node for i.MX6UL SOC. Signed-off-by: Sébastien Szymanski Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo commit 31edaa6e7fd8143085a6a60c564447c07e76ed9f Author: Sébastien Szymanski Date: Wed Aug 22 13:38:03 2018 +0200 ARM: dts: imx6ull: keep IMX6UL_ prefix for signals on both i.MX6UL and i.MX6ULL Signals available on both i.MX6UL and i.MX6ULL should have the same name because it is the case of all others common signals, it avoids to make mistakes (use the wrong ones) and it makes writing device tree files less complicated. For example: imx6ul-imx6ull-board.dtsi: ... pinctrl_uart5: uart5grp { fsl,pins = < MX6UL_PAD_UART5_TX_DATA__UART5_DCE_TX 0x1b0b1 MX6UL_PAD_UART5_RX_DATA__UART5_DCE_RX 0x1b0b1 >; }; imx6ul-board.dts: #include #include ... imx6ull-board.dts: #include #include ... Without this patch, the imx6ull-board.dtb will use MX6UL_PAD_UART5_RX_DATA__UART5_DCE_RX instead of MX6ULL_PAD_UART5_RX_DATA__UART5_DCE_RX and the uart5 will be misconfigured. Signed-off-by: Sébastien Szymanski Reviewed-by: Fabio Estevam Acked-by: Rob Herring Signed-off-by: Shawn Guo commit 3ca5a850de8342ae6b4e9e174848c9ae7f485dc8 Author: Tuomas Tynkkynen Date: Tue Aug 21 00:07:18 2018 +0300 ARM: dts: imx6qdl-wandboard: Add stdout-path Setting a stdout-path in the .dtb is convenient because then the user gets a serial console on the RS-232 connector without any extra effort of figuring out the relevant 'console=' boot parameter. Reviewed-by: Fabio Estevam Signed-off-by: Tuomas Tynkkynen Signed-off-by: Shawn Guo commit cf69efe57ae87db10bdb0214549eded1920ad694 Author: Pierre-Jean Texier Date: Fri Aug 17 23:23:17 2018 +0200 ARM: dts: imx7s-warp: enable i2c3 device support The WaRP7 has one mikroBUS socket on the back to plug click boards. This patch allows to interact with some of these i2c modules (EEPROM, RTC and so on). Signed-off-by: Pierre-Jean Texier Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo commit 09ad741b7ecee8f7fa80bfa21eb0716394aff418 Author: Jacopo Mondi Date: Tue Aug 14 15:21:46 2018 +0200 ARM: dts: imx6q-icore-mipi: Use 1.5 version of i.Core MX6 The "EDIMM STARTER KIT i.Core 1.5 MIPI Evaluation" is based on the 1.5 version of the i.Core MX6 cpu module. The 1.5 version differs from the original one for a few details, including the ethernet PHY interface clock provider. With this commit, the ethernet interface works properly: SMSC LAN8710/LAN8720 2188000.ethernet-1:00: attached PHY driver While before using the 1.5 version, ethernet failed to startup do to un-clocked PHY interface: fec 2188000.ethernet eth0: could not attach to PHY Fixes: 3fe088357731 ("ARM: dts: imx6q: Add Engicam i.CoreM6 1.5 Quad/Dual MIPI starter kit support") Reviewed-by: Fabio Estevam Signed-off-by: Jacopo Mondi Signed-off-by: Shawn Guo commit 37c045d25e90038682b845de0a1db43c8301694d Author: Jacopo Mondi Date: Tue Aug 14 15:21:45 2018 +0200 ARM: dts: imx6qdl: Add Engicam i.Core 1.5 MX6 The 1.5 version of Engicam's i.Core MX6 CPU module features a different clock provider for the ethernet's PHY interface. Adjust the FEC ptp clock to reference CLK_ENET_REF clock source, and set SION bit of MX6QDL_PAD_GPIO_16__ENET_REF_CLK to adjust the input path of that pin. The newly introduced imx6ql-icore-1.5.dtsi allows to collect in a single place differences between version '1.0' and '1.5' of the module. Reviewed-by: Fabio Estevam Signed-off-by: Jacopo Mondi Signed-off-by: Shawn Guo commit cc07fd3c45c1e589f1f2bea4ac69e5d4ecb77e9d Author: Esben Haabendal Date: Thu Aug 9 14:32:07 2018 +0200 ARM: dts: ls1021a: Enable I2C DMA support Gives substantial performance improvement for transfers larger than 16 bytes (DMA_THRESHOLD). Smaller transfers are unaffected. Signed-off-by: Esben Haabendal Acked-by: Uwe Kleine-König Signed-off-by: Shawn Guo commit 475ecf2ef8b0b5a082092062116ce884b1b1e532 Author: Jagan Teki Date: Tue Aug 7 12:38:38 2018 +0530 ARM: dts: i.MX6: Use consistent node names for Engicam files Use consistent pinctrl node names for Engicam dt files, sufix 'grp' look consistent than actual node name - pinctrl_gpmi_nand: gpmi-nand { + pinctrl_gpmi_nand: gpminandgrp { Signed-off-by: Jagan Teki Signed-off-by: Shawn Guo commit dd203753d4932646c6b25ad7004649cba3a74ca9 Author: Jagan Teki Date: Tue Aug 7 12:38:37 2018 +0530 ARM: dts: imx6ul-isiot: Move node definitions into dtsi Move usdhc2 and gpmi along with pinctrl nodes on imx6ul-isiot.dtsi from dts files and mark it as 'disabled' and the relevant dts will enable the status as 'okay' Signed-off-by: Jagan Teki Signed-off-by: Shawn Guo commit 6b3f0b58397e506303f06e21db2e0d63868f3a94 Author: Jagan Teki Date: Tue Aug 7 12:38:36 2018 +0530 ARM: dts: imx: Switch Engicam boards to use SPDX identifier Adopt the SPDX license identifier headers to ease license compliance management. Also added Engicam Copyright on missing files. Signed-off-by: Jagan Teki Signed-off-by: Shawn Guo commit 96daf949112db1fd0316df9c0c9bb3385c7a546a Author: Anson Huang Date: Mon Aug 6 13:40:05 2018 +0800 ARM: dts: imx7s: remove snvs_poweroff node System poweroff is already supported by PSCI on i.MX7D, remove "snvs_poweroff" node to avoid below debug message from syscon-poweroff driver: [ 1.831414] syscon-poweroff 30370000.snvs:snvs-poweroff: pm_power_off already claimed (ptrval) psci_sys_poweroff [ 1.841707] syscon-poweroff: probe of 30370000.snvs:snvs-poweroff failed with error -16 Signed-off-by: Anson Huang Signed-off-by: Shawn Guo commit c91727f4765631b005600a865e10cbfcbf79e004 Author: Oleksij Rempel Date: Fri Aug 3 07:29:18 2018 +0200 ARM: dts: imx7s: add i.MX7 messaging unit support Define the Messaging Unit (MU) for i.MX7 in the processor's dtsi. The respective driver is added in the next commit. Reviewed-by: Dong Aisheng Signed-off-by: Oleksij Rempel Signed-off-by: Shawn Guo commit 2c72d69ffda502d1215c515f8689474d330cc8bb Author: Anson Huang Date: Tue Jul 31 06:10:35 2018 +0800 ARM: dts: imx7ulp: update pinfunc header file The i.MX7ULP B0 chip has some pin changes for USB and VIU module, update pinfunc header file accordingly. Signed-off-by: Anson Huang Signed-off-by: Shawn Guo commit 2f7d353c8b10b3cbca30065f9ee8a6c4ad954f70 Author: Fabio Estevam Date: Thu Jul 26 13:05:21 2018 -0300 ARM: dts: imx51-babbage: Add MC13892 ADC support The MC13892 Analog-to-Digital input pins (ADIN5-7) are exposed on the imx51-babbage board. Pass the "fsl,mc13xxx-uses-adc" property so that the MC13892 ADC block can work. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit ec16e9bc7b0929ad1b8bd5a64013ac5c38115f38 Author: Anson Huang Date: Fri Jul 20 18:06:57 2018 +0800 ARM: dts: imx6sll: add gpio-ranges property Add "gpio-ranges" property to establish connections between GPIOs and PINs on i.MX6SLL pinctrl driver, for details, please refer to Documentation/devicetree/bindings/gpio/gpio.txt of "gpio-ranges" property. Signed-off-by: Anson Huang Signed-off-by: Shawn Guo commit b0682d485f12a720a066ec65f00510df3532e160 Author: Sven Schmitt Date: Tue Jul 24 09:46:07 2018 +0000 soc: imx: gpc: use GPC_PGC_DOMAIN_* indexes Use GPC_PGC_DOMAIN_* indexes consistent. Signed-off-by: Sven Schmitt Reviewed-by: Leonard Crestez Signed-off-by: Shawn Guo commit 9f4d61d531e0efc9c3283963ae5ef7e314579191 Author: Sven Schmitt Date: Tue Jul 24 09:46:03 2018 +0000 soc: imx: gpc: fix PDN delay imx6_pm_domain_power_off() reads iso and iso2sw from GPC_PGC_PUPSCR_OFFS which stores the power up delays. So use GPC_PGC_PDNSCR_OFFS for the correct delays. Signed-off-by: Sven Schmitt Reviewed-by: Leonard Crestez Signed-off-by: Shawn Guo commit 1b6ff1cb7e67ca262b7e6448aea9b7b14e3def94 Author: Chen-Yu Tsai Date: Tue Aug 28 18:01:32 2018 +0800 arm64: dts: allwinner: a64: Rename r_i2c_pins_a label to r_i2c_pl89_pins The pinmux name and label for a specific function should denote which pingroup it is on, or if there is only one option for the function, have not enumerating prefix/suffix at all. The "r_i2c_pins_a" label is renamed to "r_i2c_pl89_pins" to fit our current style. The node name "i2c" is also changed to "r-i2c-pl89-pins" to match. The reason for the peculiar name is that the other option for muxing R_I2C is on the PL0/PL1 pins, so the name has to mention the pin numbers in addition to the pingroup. Acked-by: Maxime Ripard Signed-off-by: Chen-Yu Tsai commit d91ebb95b96c8840932dc3a10c9f243712555467 Author: Chen-Yu Tsai Date: Tue Aug 28 18:01:31 2018 +0800 arm64: dts: allwinner: a64: Rename uart0_pins_a label to uart0_pb_pins The pinmux name and label for a specific function should denote which pingroup it is on, or if there is only one option for the function, have not enumerating prefix/suffix at all. The "uart0_pins_a" label is renamed to "uart0_pb_pins" to fit our current style. The node name "uart0" is also changed to "uart0-pb-pins" to match. Acked-by: Maxime Ripard Signed-off-by: Chen-Yu Tsai commit fa59dd2ef7551ecae468d5ac2329e70226a8f1d8 Author: Chen-Yu Tsai Date: Tue Aug 28 18:01:30 2018 +0800 arm64: dts: allwinner: a64: Split out data strobe pin from mmc2 pinmux The eMMC 5.0 standard introduced the data strobe (DS) pin. This pin is not used for pre-5.0 data modes, nor is it found on pre-5.0 eMMC chips. On the A64, this pin is muxed with spi0's MISO pin. If the DS pin is included in the mmc2 pinmux by default, this wil prevent the usage of both mmc2 and spi0 together. Instead, split out the DS pin to a separate pinmux that only gets used by boards that actually have it wired up. Currently supported ones include the Bananapi M64 and Pine64 Pinebook. These are fixed up. Fixes: a3e8f4926248 ("arm64: allwinner: a64: Add MMC pinctrl nodes") Fixes: b8bcf0e1b212 ("arm64: allwinner: add BananaPi-M64 support") Fixes: df35fbcfa398 ("arm64: dts: allwinner: add support for Pinebook") Acked-by: Maxime Ripard Signed-off-by: Chen-Yu Tsai commit 132c5b452ed825b22509f5f4f9bcd0659b061399 Merge: 1fcc3fd75ee5 19052a3b7710 Author: David S. Miller Date: Sun Sep 2 16:22:43 2018 -0700 Merge branch 'mlx5e-IPoIB-stats' Tariq Toukan says: ==================== mlx5e IPoIB stats This patchset by Feras contains statistics enhancements and NDO implementation for the mlx5e IPoIB driver. Series generated against net-next commit: 2d5c28859839 net: bgmac: remove set but not used variable 'err' ==================== Signed-off-by: David S. Miller commit 19052a3b7710c469b478d470deecdebc0e93cb99 Author: Feras Daoud Date: Sun Sep 2 22:12:10 2018 +0300 net/mlx5e: IPoIB, Use priv stats in completion rx flow Since the RQs are shared between all pkey interfaces, the stats should be taken from where the per-ring stats are stored instead of the parent RQ. Fixes: 4c6c615e3f30 ("net/mlx5e: IPoIB, Add PKEY child interface nic profile") Signed-off-by: Feras Daoud Signed-off-by: Saeed Mahameed Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller commit b75ba3822c617e40ab2ca0fc4ed40a29db9b7787 Author: Feras Daoud Date: Sun Sep 2 22:12:09 2018 +0300 net/mlx5e: IPoIB, Add ndo stats support for IPoIB child devices Expose RX and TX counters by implementing ndo_get_stats64 operation for child devices. Signed-off-by: Feras Daoud Signed-off-by: Saeed Mahameed Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller commit c57d2358ff0dfa09a05dea10d0ea1dd0895029b4 Author: Feras Daoud Date: Sun Sep 2 22:12:08 2018 +0300 net/mlx5e: IPoIB, Add ndo stats support for IPoIB netdevices Expose RX and TX counters by implementing ndo_get_stats64 operation for both parent devices. After this change, all the relevant statistics can be retrieved using ifconfig. Signed-off-by: Feras Daoud Signed-off-by: Saeed Mahameed Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller commit 6dae6f06f0fc0096213dde2203c335938d3bde99 Author: Feras Daoud Date: Sun Sep 2 22:12:07 2018 +0300 net/mlx5e: IPoIB, Initialize max_opened_tc in mlx5i_init flow Enhanced ipoib does not initialize max_opened_tc causing wrong ethtool statistics. As mlx5e_grp_sw_update_stats relies on this variable, without this change, the TX statistics will not be updated. Fixes: 05909babce53 ("net/mlx5e: Avoid reset netdev stats on configuration changes") Signed-off-by: Feras Daoud Signed-off-by: Saeed Mahameed Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller commit 1fcc3fd75ee57640226c7b6f59c67a797659c6fb Merge: 743e481580b4 4382172fa778 Author: David S. Miller Date: Sun Sep 2 16:16:24 2018 -0700 Merge branch 'Full-phylink-support-for-mv88e6352' Andrew Lunn says: ==================== Full phylink support for mv88e6352 These two patches implement full phylink support for the mv88e6352 family, when using an SFP connected to its SERDES interface. This adds interrupt support to the SERDES, so that we get interrupts on link up/down, and then make calls phydev_link_change(). The first patch is a minor bug fix, which does not seem to affect any current features, so i'm not submitting it for stable. It is however required for configuring SERDES interrupts. ==================== Signed-off-by: David S. Miller commit 4382172fa778ad388aa01cb5d97f94ad25f34c38 Author: Andrew Lunn Date: Sun Sep 2 18:13:15 2018 +0200 net: dsa: mv88e6xxx: Add SERDES phydev_link_change for 6352 The 6352 family has one SERDES interface, which can be used by either port 4 or port 5. Add interrupt support for the SERDES interface, and report when the link status changes. Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller commit c309b158090d788e96ee597444965cb79b040484 Author: Andrew Lunn Date: Sun Sep 2 18:13:14 2018 +0200 net: dsa: mv88e6xxx: Fix writing to a PHY page. After changing to the needed page, actually write the value to the register! Fixes: 09cb7dfd3f14 ("net: dsa: mv88e6xxx: describe PHY page and SerDes") Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller commit 743e481580b4646cde416dd549e2ecb0f16848d2 Author: Yafang Shao Date: Sat Sep 1 20:21:05 2018 +0800 tcp: remove useless add operation when init sysctl_max_tw_buckets cp_hashinfo.ehash_mask is always an odd number, which is set in function alloc_large_system_hash(). See bellow, if (_hash_mask) *_hash_mask = (1 << log2qty) - 1; <<< always odd number Hence the local variable 'cnt' is a even number, as a result of that it is no difference to do the incrementation here. Signed-off-by: Yafang Shao Signed-off-by: David S. Miller commit 1914104fc6f84c1fa9947f3f304a34816d1fabee Author: Moritz Fischer Date: Fri Aug 31 13:30:54 2018 -0700 net: nixge: Fix Kconfig warning with OF_MDIO Fix Kconfig warning with OF_MDIO where OF_MDIO was selected unconditionally instead of only when OF is actually enabled. Fixes 7e8d5755be0e ("net: nixge: Add support for 64-bit platforms") Suggested-by: Andrew Lunn Signed-off-by: Moritz Fischer Signed-off-by: David S. Miller commit 1bb39959623b438d6b7705abfd0538e8ef4f5f0f Author: Alexandre Belloni Date: Fri Aug 31 17:11:12 2018 +0200 i2c: designware: add MSCC Ocelot support The Microsemi Ocelot I2C controller is a designware IP. It also has a second set of registers to allow tweaking SDA hold time and spike filtering. Reviewed-by: Andy Shevchenko Tested-by: Jarkko Nikula Acked-by: Jarkko Nikula Signed-off-by: Alexandre Belloni [wsa: made one function static] Signed-off-by: Wolfram Sang commit ffbc01bff2ef98430e4ab486b878f04fe7bb7c29 Author: Alexandre Belloni Date: Fri Aug 31 17:11:11 2018 +0200 dt-bindings: i2c: designware: document MSCC Ocelot bindings Document bindings for the Microsemi Ocelot integration of the Designware I2C controller. Reviewed-by: Rob Herring Signed-off-by: Alexandre Belloni Signed-off-by: Wolfram Sang commit c7fa7aeff85cbd71c724e7a7b167c24356de9c5f Author: Alexandre Belloni Date: Fri Aug 31 17:11:10 2018 +0200 i2c: designware: allow IP specific sda_hold_time Because some old designware IPs were not supporting setting an SDA hold time, vendors developed their own solution. Add a way for the final driver to provide its own SDA hold time handling. Reviewed-by: Andy Shevchenko Tested-by: Jarkko Nikula Acked-by: Jarkko Nikula Signed-off-by: Alexandre Belloni Signed-off-by: Wolfram Sang commit 96742775a3c0649b88140803737ffa1915eb4509 Author: Alexandre Belloni Date: Fri Aug 31 17:11:09 2018 +0200 i2c: designware: move #ifdef CONFIG_OF to the top Move the #ifdef CONFIG_OF section to the top of the file, after the ACPI section so functions defined there can be used in dw_i2c_plat_probe. Tested-by: Jarkko Nikula Acked-by: Jarkko Nikula Signed-off-by: Alexandre Belloni Signed-off-by: Wolfram Sang commit 1732c22abca8f4e2528a4927baf6ffb2e3be58b0 Author: Alexandre Belloni Date: Fri Aug 31 17:11:08 2018 +0200 i2c: designware: use generic table matching Switch to device_get_match_data in probe to match the device specific data instead of using the acpi specific function. Suggested-by: Andy Shevchenko Acked-by: Andy Shevchenko Tested-by: Jarkko Nikula Acked-by: Jarkko Nikula Signed-off-by: Alexandre Belloni Signed-off-by: Wolfram Sang commit 42220b77495d20eff5880336faff7bca1c111ee3 Merge: b9de3963cc2b bd9f1ee36409 Author: David S. Miller Date: Sun Sep 2 14:13:31 2018 -0700 Merge branch 'mvneta-some-small-improvements' Jisheng Zhang says: ==================== net: mvneta: some small improvements patch1 removes the NETIF_F_GRO check ourself, because the net subsystem will handle it for us. patch2 enables NETIF_F_RXCSUM by default, since the driver and HW supports the feature. patch3 is a small optimization, to reduce smp_processor_id() calling in mvneta_tx_done_gbe. since v1: - based on net-next tree - remove the fix patches, since they should be based on net branch. - Add Gregory's Reviewed-by tag ==================== Signed-off-by: David S. Miller commit bd9f1ee364094c66e387199809e28518b0e73954 Author: Jisheng Zhang Date: Fri Aug 31 16:11:09 2018 +0800 net: mvneta: reduce smp_processor_id() calling in mvneta_tx_done_gbe In the loop of mvneta_tx_done_gbe(), we call the smp_processor_id() each time, move the call out of the loop to optimize the code a bit. Before the patch, the loop looks like(under arm64): ldr x1, [x29,#120] ... ldr w24, [x1,#36] ... bl 0 <_raw_spin_lock> str w24, [x27,#132] ... After the patch, the loop looks like(under arm64): ... bl 0 <_raw_spin_lock> str w23, [x28,#132] ... where w23 is loaded so be ready before the loop. >From another side, mvneta_tx_done_gbe() is called from mvneta_poll() which is in non-preemptible context, so it's safe to call the smp_processor_id() function once. Signed-off-by: Jisheng Zhang Reviewed-by: Gregory CLEMENT Signed-off-by: David S. Miller commit 7772988ad62332477bc2f427953fa122e24026b0 Author: Jisheng Zhang Date: Fri Aug 31 16:10:03 2018 +0800 net: mvneta: enable NETIF_F_RXCSUM by default The code and HW supports NETIF_F_RXCSUM, so let's enable it by default. Signed-off-by: Jisheng Zhang Reviewed-by: Gregory CLEMENT Tested-by: Andrew Lunn Signed-off-by: David S. Miller commit d28118e39516c7e9ee620acf3ba19f41703bdb29 Author: Jisheng Zhang Date: Fri Aug 31 16:09:13 2018 +0800 net: mvneta: Don't check NETIF_F_GRO ourself napi_gro_receive() checks NETIF_F_GRO bit as well, if the bit is not set, we will go through GRO_NORMAL in napi_skb_finish(), so fall back to netif_receive_skb_internal(), so we don't need to check NETIF_F_GRO ourself. Signed-off-by: Jisheng Zhang Reviewed-by: Gregory CLEMENT Signed-off-by: David S. Miller commit b9de3963cc2b373a655636335cb8c4ed12fc9d3b Author: Florent Fourcot Date: Thu Aug 30 16:39:23 2018 +0200 net/sched: fix type of htb statistics tokens and ctokens are defined as s64 in htb_class structure, and clamped to 32bits value during netlink dumps: cl->xstats.tokens = clamp_t(s64, PSCHED_NS2TICKS(cl->tokens), INT_MIN, INT_MAX); Defining it as u32 is working since userspace (tc) is printing it as signed int, but a correct definition from the beginning is probably better. In the same time, 'giants' structure member is unused since years, so update the comment to mark it unused. Signed-off-by: Florent Fourcot Signed-off-by: David S. Miller commit 801a6e0af0c6cedca2e99155e343ad385a50f08e Author: Lorenzo Bianconi Date: Thu Aug 30 22:52:58 2018 +0200 iio: imu: st_lsm6dsx: add support to LSM6DSO Add support to STM LSM6DSO 6-axis (acc + gyro) Mems sensor https://www.st.com/resource/en/datasheet/lsm6dso.pdf Signed-off-by: Lorenzo Bianconi Signed-off-by: Jonathan Cameron commit 5b3c87fd92d5ef462b9b3894f4d4bc452ad7eff4 Author: Lorenzo Bianconi Date: Thu Aug 30 22:52:57 2018 +0200 iio: imu: st_lsm6dsx: add addr/max_word_len to st_lsm6dsx_read_block() Add reg addr and max_word_len parameters to st_lsm6dsx_read_block since LSM6DSO will use a different register address to read samples from the FIFO and a different sample len Signed-off-by: Lorenzo Bianconi Signed-off-by: Jonathan Cameron commit 54a6d0c6882df3608103042eed7f57e6188f95ca Author: Lorenzo Bianconi Date: Thu Aug 30 22:52:56 2018 +0200 iio: imu: st_lsm6dsx: make st_lsm6dsx_check_odr() non-static Remove static qualifier from st_lsm6dsx_check_odr() definition in order to use it for the support of new devices Signed-off-by: Lorenzo Bianconi Signed-off-by: Jonathan Cameron commit 50ff457d1b321d6392ade6bcc67877b8b4aeef89 Author: Lorenzo Bianconi Date: Thu Aug 30 22:52:55 2018 +0200 iio: imu: st_lsm6dsx: add read_fifo callback to fifo_ops Remove static qualifier from st_lsm6dsx_read_fifo definition and introduce read_fifo function pointer in fifo_ops data structure in order to run the proper read_fifo routine since other compliant devices will use a different FIFO queueing scheme. Signed-off-by: Lorenzo Bianconi Signed-off-by: Jonathan Cameron commit ff5059302642d349596a7ebc3282a978a78144bd Author: Stefan Popa Date: Wed Aug 29 17:58:42 2018 +0300 iio: dac: ad5758: Add support for hard reset The ad5758 has a hardware reset active low input pin. This patch adds a devicetree entry for a reset GPIO and a new ad5758_reset() function. During initialization, it is checked if the reset property is specified and the the GPIO is being asserted, therefore the device will become active. When the reset function is called, if the gpio_reset var is set, then the GPIO will be toggled, otherwise a software reset is performed. Signed-off-by: Stefan Popa Signed-off-by: Jonathan Cameron commit 1fc378fa9dab9d3036562ecd58b26ecae2dbd85d Author: Rob Herring Date: Mon Aug 27 20:52:23 2018 -0500 iio: 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: Jonathan Cameron Cc: Hartmut Knaack Cc: Lars-Peter Clausen Cc: linux-iio@vger.kernel.org Signed-off-by: Rob Herring Signed-off-by: Jonathan Cameron commit 1e46774fec4b54adbd7cc15f1931e9df98664530 Author: Matthias Kaehlcke Date: Mon Aug 27 14:14:53 2018 -0700 iio: adc: qcom-spmi-adc5: Verify channel numbers from DT The driver only defines a subset of all possible ADC channels. Channel numbers read from the device tree are accepted as long as they don't exceed a max value, even when no channel definition exists. Add a check to abort initialization in this case. Signed-off-by: Matthias Kaehlcke Signed-off-by: Jonathan Cameron commit 99fa3b0c6082bff346f7d09f29e5edcc93d40bd3 Author: Stefan Wahren Date: Sun Sep 2 18:49:33 2018 +0200 ARM: bcm2835_defconfig: Enable bcm2835-audio This enables the bcm2835-audio driver, which depends on bcm2835-vchiq. After that we gain more test coverage (e.g. Kernel CI). Signed-off-by: Stefan Wahren commit 6abc0c8f8cf3e0c47707b01f027f9f9b9aa75646 Author: Alex Deucher Date: Thu Aug 30 09:46:27 2018 -0500 drm/amdgpu/gmc9: don't keep stolen memory on vega20 Vega20 does not appear to be affected by the same issue as vega10. Enable the full stolen memory handling on vega20. Reserve the appropriate size at init time to avoid display artifacts and then free it at the end of init once the new FB is up and running. Acked-by: Christian König Signed-off-by: Alex Deucher commit 95010ba79baae078c2bcabda49cf564261d0b796 Author: Alex Deucher Date: Thu Aug 30 09:44:31 2018 -0500 drm/amdgpu/gmc9: don't keep stolen memory on vega12 vega12 does not appear to be affected by the same issue as vega10. Enable the full stolen memory handling on vega12. Reserve the appropriate size at init time to avoid display artifacts and then free it at the end of init once the new FB is up and running. Acked-by: Christian König Signed-off-by: Alex Deucher commit 6fb81375db0f959ea7fda02ecc5388f65ab4ac7c Author: Alex Deucher Date: Thu Aug 30 09:41:12 2018 -0500 drm/amdgpu/gmc9: don't keep stolen memory on Raven Raven does not appear to be affected by the same issue as vega10. Enable the full stolen memory handling on Raven. Reserve the appropriate size at init time to avoid display artifacts and then free it at the end of init once the new FB is up and running. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=106639 Reviewed-by: Junwei Zhang Acked-by: Christian König Signed-off-by: Alex Deucher commit cd2b56238ef7173e1e0363c9e6d035cfd4f47140 Author: Alex Deucher Date: Thu Aug 30 09:31:56 2018 -0500 drm/amdgpu/gmc9: rework stolen vga memory handling No functional change, just rework it in order to adjust the behavior on a per asic level. The problem is that on vega10, something corrupts the lower 8 MB of vram on the second resume from S3. This does not seem to affect Raven, other gmc9 based asics need testing. Reviewed-by: Junwei Zhang Acked-by: Christian König Signed-off-by: Alex Deucher commit 5d35ed4832dab334e076a24c18a52776c2f24911 Author: Christian König Date: Fri Aug 31 11:08:06 2018 +0200 drm/amdgpu: fix idle state and bulk_moveable flag Add BOs to the idle state again and correctly clear the flag when new BOs are added. Signed-off-by: Christian König Tested-by: Michel Dänzer Signed-off-by: Alex Deucher commit b995795bf09b6bb7847a2a9fc8e6b5b4ab0ce20c Author: Christian König Date: Thu Aug 30 10:04:53 2018 +0200 drm/amdgpu: fix "use bulk moves for efficient VM LRU handling" v2 First step to fix the LRU corruption, we accidentially tried to move things on the LRU after dropping the lock. Signed-off-by: Christian König Tested-by: Michel Dänzer Signed-off-by: Alex Deucher commit 972a21f94631642d6714bb2a1983b7b15a77526d Author: Christian König Date: Fri Aug 31 15:06:35 2018 +0200 drm/ttm: fix ttm_bo_bulk_move_helper Staring at the function for six hours, just to essentially move one line of code. The problem was that the first list_cut_position call could result in list2 pointing to la-la-land. Signed-off-by: Christian König Tested-by: Michel Dänzer Signed-off-by: Alex Deucher commit 88b35d83a79c19e0d817f500f9306fe3eef43057 Author: Andrey Grodzovsky Date: Thu Aug 30 11:24:17 2018 -0400 drm/amdgpu: Use drm_dev_unplug in PCI .remove This at least allows to fail any subsequent IOCTLs with -ENODEV after the device is gone. Still this operation is not supported yet in graphic mode and will lead at least to page faults and other issues. Signed-off-by: Andrey Grodzovsky Reviewed-by: Christian König Signed-off-by: Alex Deucher commit f4661d293eb2d01dfc742982761a36fafe456d46 Author: Jacek Tomaka Date: Sat Aug 25 11:50:39 2018 +0800 x86/microcode: Make revision and processor flags world-readable The microcode revision is already readable for non-root users via /proc/cpuinfo. Thus, there's no reason to keep the same information readable by root only in /sys/devices/system/cpu/cpuX/microcode/. Make .../processor_flags world-readable too, while at it. Reported-by: Tim Burgess Signed-off-by: Jacek Tomaka Signed-off-by: Borislav Petkov Signed-off-by: Thomas Gleixner Link: http://lkml.kernel.org/r/20180825035039.14409-1-jacekt@dugeo.com commit 21eab7861688aa4c69fcb88440cc0c4a422bdcd6 Author: Eugen Hristev Date: Tue Aug 28 13:30:34 2018 +0300 iio: fix position relative kernel version Position relative channel type was added in 4.19 kernel version Fixes: "3055a6cfa04ba" ("iio: Add channel for Position Relative") Signed-off-by: Eugen Hristev Signed-off-by: Jonathan Cameron commit 24493cce03b689f9723244f9a7c2247296fc617e Author: Geert Uytterhoeven Date: Thu Aug 23 23:24:35 2018 +0200 iio: light: isl29501: Simplify code to kill compiler warning With gcc 4.1.2: drivers/iio/proximity/isl29501.c: In function ‘isl29501_register_write’: drivers/iio/proximity/isl29501.c:235: warning: ‘msb’ may be used uninitialized in this function While this is a false positive, it can easily be avoided by removing the "msb" intermediate variable. Remove the "lsb" intermediate variable for consistency. Signed-off-by: Geert Uytterhoeven Signed-off-by: Jonathan Cameron commit 8ba0dbfd07a3587aedb952a95292e41d70dbf16e Author: Baolin Wang Date: Wed Aug 29 14:04:05 2018 +0800 iio: adc: sc27xx: Add ADC scale calibration This patch adds support to read calibration values from the eFuse controller to calibrate the ADC channel scales, which can make ADC sample data more accurate. Signed-off-by: Baolin Wang Signed-off-by: Jonathan Cameron commit fd2f53ebf98173d667fe6b9c2300fef8b4f72f30 Author: Baolin Wang Date: Wed Aug 29 14:04:04 2018 +0800 iio: adc: sc27xx: Add raw data support The headset device will use channel 20 of ADC controller to detect events, but it needs the raw ADC data to do conversion according to its own formula. Thus we should configure the channel mask separately and configure channel 20 as IIO_CHAN_INFO_RAW, as well as adding raw data read support. Signed-off-by: Baolin Wang Signed-off-by: Jonathan Cameron commit 2d5c2885983996ae5c32585b16bc600da7aa17bc Author: YueHaibing Date: Sat Sep 1 03:13:10 2018 +0000 net: bgmac: remove set but not used variable 'err' Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/ethernet/broadcom/bgmac.c: In function 'bgmac_dma_alloc': drivers/net/ethernet/broadcom/bgmac.c:619:6: warning: variable 'err' set but not used [-Wunused-but-set-variable] Signed-off-by: YueHaibing Signed-off-by: David S. Miller commit 5582f44360c4665d77109cc5aa2dddc3b77f5da2 Author: Florian Fainelli Date: Fri Aug 31 12:29:49 2018 -0700 net: dsa: b53: Provide sensible defaults The SRAB driver is the default way to communicate with the integrated switch on iProc platforms and the MMAP driver is the way to communicate with the integrated switch on DSL BCM63xx and CM BCM33xx. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller commit c9e4f5f067f0e9224db9af77262b5a69c07cf263 Author: YueHaibing Date: Fri Aug 31 12:03:56 2018 +0000 liquidio: remove set but not used variable 'irh' Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/ethernet/cavium/liquidio/request_manager.c: In function 'lio_process_iq_request_list': drivers/net/ethernet/cavium/liquidio/request_manager.c:383:27: warning: variable 'irh' set but not used [-Wunused-but-set-variable] Signed-off-by: YueHaibing Acked-by: Felix Manlunas Signed-off-by: David S. Miller commit c8b795669a5eb94fc97d2e1c967f0bad85d80046 Author: Sudarsana Reddy Kalluru Date: Fri Aug 31 04:10:17 2018 -0700 qed: Lower the severity of a dcbx log message. Driver displays an error message for each unrecognized dcbx TLV that's received from the peer or configured on the device. It is observed that syslog will be flooded with such messages in certain scenarios e.g., frequent link-flaps/lldp-transactions. Changing the severity of this message to verbose level as it's not an error scenario/message. Signed-off-by: Sudarsana Reddy Kalluru Signed-off-by: David S. Miller commit 2de9d505fb0d53676b6d595e8334a9dcdfda8d12 Author: Arnd Bergmann Date: Wed Aug 29 17:47:19 2018 +0200 rds: store socket timestamps as ktime_t rds is the last in-kernel user of the old do_gettimeofday() function. Convert it over to ktime_get_real() to make it work more like the generic socket timestamps, and to let us kill off do_gettimeofday(). A follow-up patch will have to change the user space interface to deal better with 32-bit tasks, which may use an incompatible layout for 'struct timespec'. Signed-off-by: Arnd Bergmann Acked-by: Santosh Shilimkar Signed-off-by: David S. Miller commit c2ad647c6442cf6730ffd86cbadbbce101dea937 Author: Vakul Garg Date: Wed Aug 29 15:30:14 2018 +0530 selftests/tls: Add test for recv(PEEK) spanning across multiple records Added test case to receive multiple records with a single recvmsg() operation with a MSG_PEEK set. Signed-off-by: David S. Miller commit 94524d8fc965a7a0facdef6d1b01d5ef6d71a802 Author: Vakul Garg Date: Wed Aug 29 15:26:55 2018 +0530 net/tls: Add support for async decryption of tls records When tls records are decrypted using asynchronous acclerators such as NXP CAAM engine, the crypto apis return -EINPROGRESS. Presently, on getting -EINPROGRESS, the tls record processing stops till the time the crypto accelerator finishes off and returns the result. This incurs a context switch and is not an efficient way of accessing the crypto accelerators. Crypto accelerators work efficient when they are queued with multiple crypto jobs without having to wait for the previous ones to complete. The patch submits multiple crypto requests without having to wait for for previous ones to complete. This has been implemented for records which are decrypted in zero-copy mode. At the end of recvmsg(), we wait for all the asynchronous decryption requests to complete. The references to records which have been sent for async decryption are dropped. For cases where record decryption is not possible in zero-copy mode, asynchronous decryption is not used and we wait for decryption crypto api to complete. For crypto requests executing in async fashion, the memory for aead_request, sglists and skb etc is freed from the decryption completion handler. The decryption completion handler wakesup the sleeping user context when recvmsg() flags that it has done sending all the decryption requests and there are no more decryption requests pending to be completed. Signed-off-by: Vakul Garg Reviewed-by: Dave Watson Signed-off-by: David S. Miller commit 181ab62311c62fdd8c450969d0b822e1b89de42a Author: YueHaibing Date: Fri Aug 31 04:08:01 2018 +0000 bnxt_en: remove set but not used variable 'rx_stats' Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c: In function 'bnxt_vf_rep_rx': drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c:212:28: warning: variable 'rx_stats' set but not used [-Wunused-but-set-variable] struct bnxt_vf_rep_stats *rx_stats; Signed-off-by: YueHaibing Signed-off-by: David S. Miller commit d99b7d6bca9c7fc318346bb3c00c17c8840e241d Author: YueHaibing Date: Fri Aug 31 03:44:27 2018 +0000 net: remove duplicated include from net_failover.c Remove duplicated include. Signed-off-by: YueHaibing Signed-off-by: David S. Miller commit ec6ea8e3eee969fb4e04e86e7abc0e662262f443 Author: Jose Abreu Date: Thu Aug 30 15:09:48 2018 +0100 net: stmmac: Add CBS support in XGMAC2 XGMAC2 uses the same CBS mechanism as GMAC5, only registers offset changes. Lets use the same TC callbacks and implement the .config_cbs callback in XGMAC2 core. Signed-off-by: Jose Abreu Cc: David S. Miller Cc: Joao Pinto Cc: Giuseppe Cavallaro Cc: Alexandre Torgue Signed-off-by: David S. Miller commit 531778d0e3a371f05442830df954bc6215f1c19e Merge: 459479da9769 34ff68465a17 Author: David S. Miller Date: Sat Sep 1 17:16:59 2018 -0700 Merge branch 'dpaa2-eth-Move-DPAA2-Ethernet-driver' Ioana Radulescu says: ==================== dpaa2-eth: Move DPAA2 Ethernet driver The Freescale/NXP DPAA2 Ethernet driver was first included in drivers/staging, due to its dependencies on two components located there at the time of its initial submission: * the fsl-mc bus driver, which was moved to drivers/bus in kernel 4.17 * the dpio driver, which was moved to drivers/soc/fsl in kernel 4.18 More information on the DPAA2 architecture and the interactions between the fsl-mc bus and the objects present on it can be found in: Documentation/networking/dpaa2/overview.rst For easier review, the patch is generated without the -M option, although the driver files are moved without any code changes. changes since v1[1]: * remove RFC label, since dependencies have been merged on net-next * add patch fixing a possible race at probe (reported by Andrew Lunn) [1] https://lore.kernel.org/patchwork/patch/971333/ ==================== Signed-off-by: David S. Miller commit 34ff68465a17d0c1f022ec9086504cb27dbb2fd7 Author: Ioana Radulescu Date: Wed Aug 29 04:42:40 2018 -0500 dpaa2-eth: Move DPAA2 Ethernet driver from staging to drivers/net The DPAA2 Ethernet driver supports Freescale/NXP SoCs with DPAA2 (DataPath Acceleration Architecture v2). The driver manages network objects discovered on the fsl-mc bus. Signed-off-by: Ioana Radulescu Signed-off-by: David S. Miller commit 7f12c8a3670f15ab8592c287279a4050960a7fc6 Author: Ioana Radulescu Date: Wed Aug 29 04:42:39 2018 -0500 staging: fsl-dpaa2/eth: Delay netdev_register() call Only call netdev_register() at the end of the probe function, once all other necessary bits and pieces are properly initialized. We keep the rest of the netdevice initialization code in place, at the earlier point of the probing sequence, including the settings previously done in ndo_init. Signed-off-by: Ioana Radulescu Suggested-by: Andrew Lunn Signed-off-by: David S. Miller commit f0beb4ba9b185d497c8efe7b349363700092aee0 Author: Chris Lew Date: Fri Jul 27 17:47:27 2018 +0530 rpmsg: glink: Remove chunk size word align warning It is possible for the chunk sizes coming from the non RPM remote procs to not be word aligned. Remove the alignment warning and continue to read from the FIFO so execution is not stalled. Signed-off-by: Chris Lew Signed-off-by: Arun Kumar Neelakantam Signed-off-by: Bjorn Andersson commit dc9f5d0f841d604b8ca6310bd021096f804cd2a0 Author: Michael J. Ruhl Date: Wed Aug 15 23:04:32 2018 -0700 IB/hfi1: Move URGENT IRQ enable to hfi1_rcvctrl() User contexts use the receive URGENT interrupt. However, enabling the IRQ SRC in the file_ops module is not as clean as it could be. Augment the _rcvctl() function to be able to enable/disable the IRQ source. Use the new interface from file_ops to enable/disable the IRQ. Reviewed-by: Mike Marciniszyn Reviewed-by: Sadanand Warrier Signed-off-by: Michael J. Ruhl Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford commit a2f7bbdc2dba0e4c82a9243a64931aa81c0c28cf Author: Michael J. Ruhl Date: Wed Aug 15 23:04:22 2018 -0700 IB/hfi1: Rework the IRQ API to be more flexible The current IRQ API is an all or nothing interface. This has two problems: 1. All IRQs are enabled regardless of use 2. Moving from general interrupt to MSIx handling is difficult Introduce a new API to enable/disable specific IRQs or a range of IRQs. Do not enable and disable all IRQs in one step. Rework various modules to enable/disable IRQs when needed. Reviewed-by: Mike Marciniszyn Reviewed-by: Sadanand Warrier Signed-off-by: Michael J. Ruhl Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford commit e63bb50d1994b71f97b40077ddec46a7354197a0 Author: Kamenee Arumugam Date: Wed Aug 15 23:04:13 2018 -0700 IB/hfi1: PCIe bus width retry Retry the PCIe link training up to 'pcie_retry' times if the PCIe link width is narrower than the previous width. Reviewed-by: Michael J. Ruhl Reviewed-by: Mitko Haralanov Signed-off-by: Kamenee Arumugam Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford commit 6eb4eb10fb0d14340956c05281b7e09d80902788 Author: Michael J. Ruhl Date: Wed Aug 15 23:04:04 2018 -0700 IB/hfi1: Make the MSIx resource allocation a bit more flexible The current method of allocating MSIx resources is a bit cumbersome, and not very easily added to. Refactor and re-order the code paths into a more consistent interface. Update the interface so that allocations are not order dependent. Reviewed-by: Mike Marciniszyn Reviewed-by: Sadanand Warrier Signed-off-by: Michael J. Ruhl Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford commit 09e71899b9cf5ed7495118b3023db41575013fe2 Author: Michael J. Ruhl Date: Thu Aug 16 06:28:40 2018 -0700 IB/hfi1: Prepare for new HFI1 MSIx API The current HFI1 MSIx API is difficult to follow, change, or add to. In anticipation of moving to an more flexible API, move the current MSIx functionality to the new msix.c module. Reviewed-by: Mike Marciniszyn Reviewed-by: Sadanand Warrier Signed-off-by: Michael J. Ruhl Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford commit 57f97e96625fe89246827ebb4d129741a4f83c40 Author: Michael J. Ruhl Date: Wed Aug 15 23:03:46 2018 -0700 IB/hfi1: Get the hfi1_devdata structure as early as possible Currently several things occur before the hfi1_devdata structure is allocated. This leads to an inconsistent logging ability and makes it more difficult to restructure some code paths. Allocate (and do a minimal init) the structure as soon as possible. Reviewed-by: Mike Marciniszyn Reviewed-by: Sadanand Warrier Signed-off-by: Michael J. Ruhl Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford commit 6a516bc9d70b291d3271c6c66b89c25e3c2b5795 Author: Michael J. Ruhl Date: Wed Aug 15 22:58:49 2018 -0700 IB/hfi1: tune_pcie_caps is arbitrarily placed, poorly The tune_pcie_caps needs to occur sometime after PCI is enabled, but before the HFI is enabled. Currently it is placed in the MSIx allocation code which doesn't really fit. Moving it to just after the gen3 bump. Clean up the associated code (modules, etc.). Reviewed-by: Mike Marciniszyn Reviewed-by: Sadanand Warrier Signed-off-by: Michael J. Ruhl Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford commit 22c21438aad76022b6e41fea02e7e382d94ab361 Author: Michael J. Ruhl Date: Wed Aug 15 22:58:40 2018 -0700 IB/hfi1: Remove duplicated defines TXREQ defines are duplicated, incompletely, in the sdma header file. Remove duplicate defines. Reviewed-by: Mike Marciniszyn Signed-off-by: Michael J. Ruhl Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford commit c54a73d8202a3f072f6635ec1046edb34f770a81 Author: Dennis Dalessandro Date: Wed Aug 15 22:58:31 2018 -0700 IB/hfi1: Rework file list in Makefile We want to keep files in alphabetical order in our makefile, however this just makes for messy diffs when adding (or removing) files. Let's just clean this up and make it line by line. Reviewed-by: Michael J. Ruhl Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford commit 48e905048f39ae97bd08dbbbc78a848d1d555d80 Author: Tvrtko Ursulin Date: Fri Aug 31 15:36:43 2018 +0100 drm/i915: Explicitly mark Global GTT address spaces So far we have been relying on vm->file pointer being NULL to declare something GGTT. This has the unfortunate consequence that the default kernel context is also declared GGTT and interferes with the following patch which wants to instantiate VMA's and execute requests against the kernel context. Change the is_ggtt test to use an explicit flag in struct address_space to solve this issue. Note that the bit used is free since there is an alignment hole in the struct. v2: * Mark mock ggtt. Signed-off-by: Tvrtko Ursulin Cc: Chris Wilson Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20180831143643.12366-1-tvrtko.ursulin@linux.intel.com commit 459479da9769b2c91425a8edae16f40f7082a1fc Author: Andy Shevchenko Date: Thu Aug 30 13:33:18 2018 +0300 bridge: 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 Signed-off-by: David S. Miller commit 2b5cf4ef541f1b2facaca58cae5e8e0b5f19ad4c Author: Imre Deak Date: Fri Aug 31 20:47:39 2018 +0300 drm/i915/dp_mst: Fix enabling pipe clock for all streams commit afb2c4437dae ("drm/i915/ddi: Push pipe clock enabling to encoders") inadvertently stopped enabling the pipe clock for any DP-MST stream after the first one. It also rearranged the pipe clock enabling wrt. initial MST payload allocation step (which may or may not be a problem, but it's contrary to the spec.). Fix things by making the above commit truly a non-functional change. Fixes: afb2c4437dae ("drm/i915/ddi: Push pipe clock enabling to encoders") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107365 Reported-by: Lyude Paul Reported-by: dmummenschanz@web.de Tested-by: dmummenschanz@web.de Tested-by: Lyude Paul Cc: Lyude Paul Cc: dmummenschanz@web.de Cc: Ville Syrjälä Cc: Rodrigo Vivi Cc: Chris Wilson Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Reviewed-by: Lyude Paul Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20180831174739.30387-1-imre.deak@intel.com commit 0340376ecc89568825f6c5628c0c23f8daadbc61 Author: Marek Behún Date: Thu Aug 30 02:13:50 2018 +0200 net: dsa: mv88e6xxx: Share main switch IRQ On some boards the interrupt can be shared between multiple devices. For example on Turris Mox the interrupt is shared between all switches. Signed-off-by: Marek Behun Signed-off-by: David S. Miller commit 1367bbf52a4355990f14e7e97cad708b2e266e65 Author: David Ahern Date: Wed Aug 29 16:54:01 2018 -0700 net/ipv6: Do not reset nl_net in ip6_route_info_create nl_net is set on entry to ip6_route_info_create. Only devices within that namespace are considered so no need to reset it before returning. Signed-off-by: David Ahern Signed-off-by: David S. Miller commit 066b1030088986e61326938d5b7694e72ff693f8 Author: David Ahern Date: Wed Aug 29 16:53:27 2018 -0700 net/ipv4: Add extack message that dev is required for ONLINK Make IPv4 consistent with IPv6 and return an extack message that the ONLINK flag requires a nexthop device. Signed-off-by: David Ahern Signed-off-by: David S. Miller commit 7788174e8726c309d8bfd8aeca743cefd6943616 Author: Yuchung Cheng Date: Wed Aug 29 14:53:56 2018 -0700 tcp: change IPv6 flow-label upon receiving spurious retransmission Currently a Linux IPv6 TCP sender will change the flow label upon timeouts to potentially steer away from a data path that has gone bad. However this does not help if the problem is on the ACK path and the data path is healthy. In this case the receiver is likely to receive repeated spurious retransmission because the sender couldn't get the ACKs in time and has recurring timeouts. This patch adds another feature to mitigate this problem. It leverages the DSACK states in the receiver to change the flow label of the ACKs to speculatively re-route the ACK packets. In order to allow triggering on the second consecutive spurious RTO, the receiver changes the flow label upon sending a second consecutive DSACK for a sequence number below RCV.NXT. Signed-off-by: Yuchung Cheng Signed-off-by: Neal Cardwell Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit 506a03aa04deed321b26153aff4e61161aefa8af Author: Cong Wang Date: Wed Aug 29 10:15:36 2018 -0700 net_sched: add missing tcf_lock for act_connmark According to the new locking rule, we have to take tcf_lock for both ->init() and ->dump(), as RTNL will be removed. However, it is missing for act_connmark. Cc: Vlad Buslov Signed-off-by: Cong Wang Signed-off-by: David S. Miller commit aa4e689ed1a7b5c1a479a57f05da0a340b1f8d0c Author: Michael Walle Date: Wed Aug 29 17:24:11 2018 +0200 veth: add software timestamping Provide a software TX timestamp as well as the ethtool query interface and report the software timestamp capabilities. Tested with "ethtool -T" and two linuxptp instances each bound to a tunnel endpoint. Signed-off-by: Michael Walle Signed-off-by: David S. Miller commit f061b48c1787e6fece2190e27da6878f4f1796d0 Author: Cong Wang Date: Wed Aug 29 10:15:35 2018 -0700 Revert "net: sched: act: add extack for lookup callback" This reverts commit 331a9295de23 ("net: sched: act: add extack for lookup callback"). This extack is never used after 6 months... In fact, it can be just set in the caller, right after ->lookup(). Cc: Alexander Aring Signed-off-by: Cong Wang Signed-off-by: David S. Miller commit fd3c040b244b7aba6b18f7d12c87fd774b2257a8 Merge: ee713b6da510 93ee30f3e8b4 Author: David S. Miller Date: Fri Aug 31 17:41:08 2018 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next Daniel Borkmann says: ==================== pull-request: bpf-next 2018-09-01 The following pull-request contains BPF updates for your *net-next* tree. The main changes are: 1) Add AF_XDP zero-copy support for i40e driver (!), from Björn and Magnus. 2) BPF verifier improvements by giving each register its own liveness chain which allows to simplify and getting rid of skip_callee() logic, from Edward. 3) Add bpf fs pretty print support for percpu arraymap, percpu hashmap and percpu lru hashmap. Also add generic percpu formatted print on bpftool so the same can be dumped there, from Yonghong. 4) Add bpf_{set,get}sockopt() helper support for TCP_SAVE_SYN and TCP_SAVED_SYN options to allow reflection of tos/tclass from received SYN packet, from Nikita. 5) Misc improvements to the BPF sockmap test cases in terms of cgroup v2 interaction and removal of incorrect shutdown() calls, from John. 6) Few cleanups in xdp_umem_assign_dev() and xdpsock samples, from Prashant. ==================== Signed-off-by: David S. Miller commit 93ee30f3e8b412c5fc2d2f7d9d002529d9a209ad Author: Magnus Karlsson Date: Fri Aug 31 13:40:02 2018 +0200 xsk: i40e: get rid of useless struct xdp_umem_props This commit gets rid of the structure xdp_umem_props. It was there to be able to break a dependency at one point, but this is no longer needed. The values in the struct are instead stored directly in the xdp_umem structure. This simplifies the xsk code as well as af_xdp zero-copy drivers and as a bonus gets rid of one internal header file. The i40e driver is also adapted to the new interface in this commit. Signed-off-by: Magnus Karlsson Signed-off-by: Daniel Borkmann commit cf484f9f91f702e61eb47f7b142de6edc33a4a88 Author: Magnus Karlsson Date: Fri Aug 31 13:40:01 2018 +0200 i40e: fix possible compiler warning in xsk TX path With certain gcc versions, it was possible to get the warning "'tx_desc' may be used uninitialized in this function" for the i40e_xmit_zc. This was not possible, however this commit simplifies the code path so that this warning is no longer emitted. Signed-off-by: Magnus Karlsson Signed-off-by: Daniel Borkmann commit 9746b1ee2edcabfb8f40d5311f23ac2f01f152ed Author: Nikita V. Shirokov Date: Fri Aug 31 09:43:47 2018 -0700 bpf: add selftest for bpf's (set|get)_sockopt for SAVE_SYN adding selftest for feature, introduced in commit 9452048c79404 ("bpf: add TCP_SAVE_SYN/TCP_SAVED_SYN options for bpf_(set|get)sockopt"). Signed-off-by: Nikita V. Shirokov Signed-off-by: Daniel Borkmann commit 11c3f5113600c40cc8789f9a7023e02b73cb0ca7 Author: Prashant Bhole Date: Fri Aug 31 10:00:49 2018 +0900 samples/bpf: xdpsock, minor fixes - xsks_map size was fixed to 4, changed it MAX_SOCKS - Remove redundant definition of MAX_SOCKS in xdpsock_user.c - In dump_stats(), add NULL check for xsks[i] Signed-off-by: Prashant Bhole Acked-by: Björn Töpel Signed-off-by: Daniel Borkmann commit a29c8bb640ca13f5731510ceaf65a6e1fe6055c8 Author: Prashant Bhole Date: Fri Aug 31 09:59:16 2018 +0900 xsk: remove unnecessary assignment Since xdp_umem_query() was added one assignment of bpf.command was missed from cleanup. Removing the assignment statement. Fixes: 84c6b86875e01a0 ("xsk: don't allow umem replace at stack level") Signed-off-by: Prashant Bhole Acked-by: Björn Töpel Signed-off-by: Daniel Borkmann commit acb4ea9564152bba8b4c2d66f8c1ba21e7a94d90 Author: Nikita V. Shirokov Date: Thu Aug 30 07:51:54 2018 -0700 bpf: add TCP_SAVE_SYN/TCP_SAVED_SYN sample program Sample program which shows TCP_SAVE_SYN/TCP_SAVED_SYN usage example: bpf program which is doing TOS/TCLASS reflection (server would reply with a same TOS/TCLASS as client). Signed-off-by: Nikita V. Shirokov Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann commit 1e215300f1384072c62459a1c194a08dbe05ff2c Author: Nikita V. Shirokov Date: Thu Aug 30 07:51:53 2018 -0700 bpf: add TCP_SAVE_SYN/TCP_SAVED_SYN options for bpf_(set|get)sockopt Adding support for two new bpf get/set sockopts: TCP_SAVE_SYN (set) and TCP_SAVED_SYN (get). This would allow for bpf program to build logic based on data from ingress SYN packet (e.g. doing tcp's tos/ tclass reflection (see sample prog)) and do it transparently from userspace program point of view. Signed-off-by: Nikita V. Shirokov Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann commit 7296216776dbbe5094e218035debe1c0a5a3674a Author: Colin Ian King Date: Thu Aug 30 15:27:18 2018 +0100 xdp: remove redundant variable 'headroom' Variable 'headroom' is being assigned but is never used hence it is redundant and can be removed. Cleans up clang warning: variable ‘headroom’ set but not used [-Wunused-but-set-variable] Signed-off-by: Colin Ian King Acked-by: Björn Töpel Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann commit 9eff4a2e92a2ea8e8364976a699e3a03937c3457 Author: Himanshu Jha Date: Mon Aug 13 16:16:38 2018 +0530 docs: dev-tools: coccinelle: Update documentation * Fix install instruction by adding `./autogen` command before `./configure`. * Add link to a more detailed installation instruction. * Add link to SmPL grammar documentation. * Add single space after ',' to slightly improve readability. Signed-off-by: Himanshu Jha Acked-by: Julia Lawall Signed-off-by: Jonathan Corbet commit 9799445af124c2476c7e0cc5432375348b6a4724 Author: Markus Heiser Date: Tue Aug 14 13:43:12 2018 +0200 docs: tidy up TOCs and refs to license-rules.rst The documentation and TOCs are organized in a manner of a tree. Adding a TOC to the root, which refers to a file which is located in a subfolder forms a grid. Those TOCs are a bit confusing and thats why we get additional error messages while building partial documentation:: $ make SPHINXDIRS=process htmldocs ... checking consistency... Documentation/process/license-rules.rst: \ WARNING: document isn't included in any toctree To fix it, the *root-license-TOC* is replaced by a reference and the 'license-roles.txt' is added to the Documentation/process/index.rst TOC. BTW: there was an old licences remark in Documentation/process/howto.rst which is also updated, mentioning SPDX and pointing to the license-rules.rst Signed-off-by: Markus Heiser Signed-off-by: Jonathan Corbet commit 60ca05c3b44566b70d64fbb8e87a6e0c67725468 Author: Salvatore Bonaccorso Date: Wed Aug 15 07:46:04 2018 +0200 Documentation/l1tf: Fix small spelling typo Fix small typo (wiil -> will) in the "3.4. Nested virtual machines" section. Fixes: 5b76a3cff011 ("KVM: VMX: Tell the nested hypervisor to skip L1D flush on vmentry") Cc: linux-kernel@vger.kernel.org Cc: Jonathan Corbet Cc: Josh Poimboeuf Cc: Paolo Bonzini Cc: Greg Kroah-Hartman Cc: Tony Luck Cc: linux-doc@vger.kernel.org Cc: trivial@kernel.org Signed-off-by: Salvatore Bonaccorso Signed-off-by: Jonathan Corbet commit 8a2933cfe7841cf8e3ed268b13210b71a80aabf0 Author: Masami Hiramatsu Date: Thu Aug 16 18:50:47 2018 +0900 docs: tracing: Add stacktrace filter command Add a description of stacktrace filter command. Signed-off-by: Masami Hiramatsu Acked-by: Steven Rostedt (VMware) Signed-off-by: Jonathan Corbet commit ff7872ef6f9ada550e81a177f8792da766e554d8 Author: Randy Dunlap Date: Thu Aug 16 21:12:07 2018 -0700 Documentation/fb/vesafb.txt: "inverse" option corrections Spell the vesafb "inverse" option correctly and tell what it does. Signed-off-by: Randy Dunlap Cc: Bartlomiej Zolnierkiewicz Cc: dri-devel@lists.freedesktop.org Cc: linux-fbdev@vger.kernel.org Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: Antonino A. Daplas Signed-off-by: Jonathan Corbet commit 52c985acf3fe95bd7b842bace8134971f0f431a2 Author: Paul Burton Date: Fri Aug 31 15:28:57 2018 -0700 MIPS: Move arch_mem_init() comment near definition The comment describing arch_mem_init() was separated from the definition of arch_mem_init() by commit a09fc446fb6d ("[MIPS] setup.c: use early_param() for early command line parsing"). Move the comment such that it's next to the definition again for ease of reading. Signed-off-by: Paul Burton commit cb95ff7da1182e9d60a810d79e76a333db929d98 Author: Akinobu Mita Date: Sat Aug 18 02:33:30 2018 +0900 docs: fix typo in table describing 4.16 development cycle Fix s/4.17/4.16/ typo. Fixes: 8962e40c1993 ("docs: update kernel versions and dates in tables") Cc: Tim Bird Cc: Jonathan Corbet Signed-off-by: Akinobu Mita Signed-off-by: Jonathan Corbet commit 0e0f00935ae182d579c40d59720634b466562d84 Author: Anders Roxell Date: Fri Aug 24 14:47:44 2018 +0200 doc: dev-tools: kselftest.rst: update config file location Config fragment files should be placed in tools/testing/selftests//config Signed-off-by: Anders Roxell Acked-by: Shuah Khan (Samsung OSG) Signed-off-by: Jonathan Corbet commit 74f0fc936c059e622e1a0c1006c7a7d2fcd29a58 Author: Baoquan He Date: Fri Aug 31 16:01:19 2018 +0800 docs/vm/hmm.rst: Add missed space This space missing caused the colour scheme in vim editor messy after that line. Add it to fix. Signed-off-by: Baoquan He [ jc: fixed alignment after the changed line ] Signed-off-by: Jonathan Corbet commit ee713b6da510924f0965a1ea77e4e6219e3b8b5a Merge: f0259b6ac4a3 5907cf6c5bbe Author: David S. Miller Date: Fri Aug 31 14:08:34 2018 -0700 Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue Jeff Kirsher says: ==================== 40GbE Intel Wired LAN Driver Updates 2018-08-30 This series contains updates to i40e, i40evf and virtchnl. Jake implements helper functions to use an array to handle the queue stats which reduces the boiler plate code as well as keep the complexity localized to a few functions. Paweł adds the ability to change a VF's MAC address from the host side without having to reload the VF driver on the guest side. Paul adds a check to ensure that the number of queues that the PF sends to the VF is equal to or less than the maximum number of queues the VF can support. Mitch fixes an issue caught by GCC 8, where we need to not include the terminating null in the length of the string for strncpy(). Lihong fixes a VF issue to ensure that it does not enter into promiscuous mode when macvlan is added to the VF. Fixed a potential crash after a VF is removed, since the workqueue sync for the adminq task was not being cancelled. Harshitha fixes the type for field_flags in the virtchnl_filter struct. Martyna removes an unnecessary check in a conditional if statement. Björn fixes an issue reported by Jesper Dangaard Brouer, where the driver was reporting incorrect statistics when XDP was enabled. Jan fixes the potential reporting of incorrect speed settings. Patryk fixed an issue where the flag I40EVF_FLAG_AQ_ENABLE_VLAN_STRIPPING was getting set when any offload is set via ethtool. Resolved by only setting this flag when VLAN offload is enabled. Also ensure we hold the rtnl lock when we are clearing the interrupt scheme. Added a check when deleting the MAC address from the VF to ensure that the MAC address was not set by the PF and if it was, do not delete it. v2: updated patch 2 in the series based on community feedback from David Miller to inline a function ==================== Signed-off-by: David S. Miller commit 9f296fe2718efe558825471b5cdf0ca4d1bdd3c6 Author: Robert Jarzmik Date: Mon Jul 2 07:37:52 2018 +0200 ARM: dts: pxa: add pincontrol helpers Add 3 helpers so that pincontrol definitions for pxa25x and pxa27x are easier, and can be easily converted from old mfp mach-pxa code to devicetree. An example of such conversion would be : static unsigned long mioa701_pin_config[] = { GPIO32_MMC_CLK, GPIO92_MMC_DAT_0, GPIO109_MMC_DAT_1, GPIO110_MMC_DAT_2, GPIO111_MMC_DAT_3, GPIO112_MMC_CMD, MIO_CFG_IN(GPIO78_SDIO_RO, AF0), MIO_CFG_IN(GPIO15_SDIO_INSERT, AF0), MIO_CFG_OUT(GPIO91_SDIO_EN, AF0, DRIVE_LOW), }; into: pinctrl_mmc_default: mmc-default { PMMUX(sd-insert, 15, gpio_in); PMMUX(mmclk, 32, MMCLK); PMMUX(sd-ro, 78, gpio_in); PMMUX_LPM_LOW(sd-enable, 91, gpio_out); PMMUX(mmdat0, 92, MMDAT<0>); PMMUX(mmdat1, 109, MMDAT<1>); PMMUX(mmdat2, 110, MMDAT<2>); PMMUX(mmdat3, 111, MMDAT<3>); PMMUX(mmcmd, 112, MMCMD); }; The third column of PMMUX*() helpers can be found in pincontrol muxing functions, either in pinctrl-pxa27x.c (or pinctrl-pxa25x.c), or by inspecting the pincontrol once booted in debugfs. Signed-off-by: Robert Jarzmik commit b0465fdfdd7e7c1afe2fae1cb36b94e1ce89732e Author: Rafał Miłecki Date: Sat Jul 28 14:13:57 2018 +0200 ARM: dts: BCM5301X: Specify flash partitions Most devices use Broadcom standard partitions which allows them to be described with the "brcm,bcm947xx-cfe-partitions". Exceptions are: 1) TP-LINK devices which use "os-image" partition with TRX containing kernel only + separated rootfs partition. 2) Asus RT-AC87U with custom "asus" partition. This commit also removes undocumented and unsupported linux,part-probe binding which got accidentally upstreamed while describing SPI controller. Signed-off-by: Rafał Miłecki Signed-off-by: Florian Fainelli commit 4988154211adfd688bf7f3f7eb1691608083a1f9 Author: Paul Burton Date: Fri Aug 31 11:49:20 2018 -0700 MIPS: Remove no-op/identity casts Clean up instances of casts to the type that a value already has, since they are effectively no-ops and only serve to complicate the code. This is the result of the following semantic patch: @identitycast@ type T; T *A; @@ - (T *)(A) + A Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/19599/ commit 5beb1e60dba973e0b9cfb54d9735d5d4385b9d90 Author: Miquel Raynal Date: Fri Jul 13 15:44:46 2018 +0200 clk: mvebu: armada-37xx-periph: add suspend/resume support Add suspend/resume hooks in Armada 37xx peripheral clocks driver to handle S2RAM operations. One can think that these hooks are useless by comparing the register values before and after a suspend/resume cycle: they will look the same anyway. This is because of some scripts executed by the Cortex-M3 core during ATF operations to init both the clocks and the DDR. These values could be modified by the BL33 stage or by Linux itself and should be preserved. Signed-off-by: Miquel Raynal Signed-off-by: Stephen Boyd commit d9d95e78cff80c3fe43e757ba90644cd766302ac Author: Miquel Raynal Date: Fri Jul 13 15:44:45 2018 +0200 clk: mvebu: armada-37xx-periph: save the IP base address in the driver data Prepare the introduction of suspend/resume hooks by having an easy way to access all the registers in one go just from a device: add the IP base address in the driver data. Signed-off-by: Miquel Raynal Signed-off-by: Stephen Boyd commit e9a2310fb689151166df7fd9971093362d34bd79 Author: Gustavo A. R. Silva Date: Wed Jul 25 19:47:19 2018 -0500 reset: hisilicon: fix potential NULL pointer dereference There is a potential execution path in which function platform_get_resource() returns NULL. If this happens, we will end up having a NULL pointer dereference. Fix this by replacing devm_ioremap with devm_ioremap_resource, which has the NULL check and the memory region request. This code was detected with the help of Coccinelle. Cc: stable@vger.kernel.org Fixes: 97b7129cd2af ("reset: hisilicon: change the definition of hisi_reset_init") Signed-off-by: Gustavo A. R. Silva Signed-off-by: Stephen Boyd commit f676d8612cd64af98e65134473917155c5080839 Merge: 5b394b2ddf03 b30c862f2a72 Author: Stephen Boyd Date: Fri Aug 31 10:13:53 2018 -0700 Merge tag 'clk-renesas-for-v4.20-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: - Improve OSC and RCLK (watchdog) handling on R-Car Gen3 SoCs, - Add support for SATA and Fine Display Processor (FDP) clocks on R-Car M3-N, - Add support for the new RZ/G2M (r8a774a1) SoC, - Small fixes and clean ups. * tag 'clk-renesas-for-v4.20-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers: clk: renesas: r8a77990: Add missing I2C7 clock clk: renesas: r8a77965: Add FDP clock clk: renesas: cpg-mssr: Add r8a774a1 support clk: renesas: Add r8a774a1 CPG Core Clock Definitions clk: renesas: r8a77965: Add SATA clock clk: renesas: r8a77980: Add RCLK for watchdog timer clk: renesas: rcar-gen3: Add support for mode pin clock selection clk: renesas: r8a77995: Correct RCLK handling clk: renesas: r8a77990: Correct RCLK handling clk: renesas: rcar-gen3: Add support for RCKSEL clock selection clk: renesas: cpg-mssr: Add support for fixed rate clocks clk: renesas: r8a77980: Add OSC predivider configuration and clock clk: renesas: r8a77965: Add OSC EXTAL predivider configuration clk: renesas: r8a7796: Add OSC EXTAL predivider configuration clk: renesas: r8a7795: Add OSC EXTAL predivider configuration clk: renesas: rcar-gen3: Add support for OSC EXTAL predivider clk: renesas: rcar-gen3: Rename rint to .r commit ac5d5b3f199ed93e089754bf5d2a0a1ae6671d6d Author: Lorenzo Bianconi Date: Fri Aug 24 12:41:44 2018 +0200 mt76: verify evt type in usb mcu response Verify if evt field is set to EVT_CMD_DONE in usb mcu response messages. This is a preliminary patch for usb_mcu layer unification between mt76x0u and mt76x2u driver. Signed-off-by: Lorenzo Bianconi Signed-off-by: Kalle Valo commit 9b2fd48d36e25b9be9ddb8be8cc1eb263a1d1843 Author: Lorenzo Bianconi Date: Fri Aug 24 10:17:49 2018 +0200 mt76x2u: run device cleanup routine if resume fails Cleanup {tx,rx} and mcu queues if resume operation fails Fixes: ee676cd5017c ("mt76: add driver code for MT76x2u based devices") Signed-off-by: Lorenzo Bianconi Signed-off-by: Kalle Valo commit 81c8eccc2404d06082025b773f1d90e8c861bc6a Author: Geert Uytterhoeven Date: Thu Aug 23 23:27:38 2018 +0200 mt76: Fix comparisons with invalid hardware key index With gcc 4.1.2: drivers/net/wireless/mediatek/mt76/mt76x0/tx.c: In function ‘mt76x0_tx’: drivers/net/wireless/mediatek/mt76/mt76x0/tx.c:169: warning: comparison is always true due to limited range of data type drivers/net/wireless/mediatek/mt76/mt76x2_tx_common.c: In function ‘mt76x2_tx’: drivers/net/wireless/mediatek/mt76/mt76x2_tx_common.c:35: warning: comparison is always true due to limited range of data type While assigning -1 to a u8 works fine, comparing with -1 does not work as expected. Fix this by comparing with 0xff, like is already done in some other places. Signed-off-by: Geert Uytterhoeven Signed-off-by: Kalle Valo commit 4c62764d0fc21a34ffc44eec1210038c3a2e4473 Author: Siva Rebbagondla Date: Mon Aug 27 17:05:15 2018 +0530 rsi: improve kernel thread handling to fix kernel panic While running regressions, observed below kernel panic when sdio disconnect called. This is because of, kthread_stop() is taking care of wait_for_completion() by default. When wait_for_completion triggered in kthread_stop and as it was done already, giving kernel panic. Hence, removing redundant wait_for_completion() from rsi_kill_thread(). ... skipping ... BUG: unable to handle kernel NULL pointer dereference at (null) IP: [] exit_creds+0x1f/0x50 PGD 0 Oops: 0002 [#1] SMP CPU: 0 PID: 6502 Comm: rmmod Tainted: G OE 4.15.9-Generic #154-Ubuntu Hardware name: Dell Inc. Edge Gateway 3003/ , BIOS 01.00.00 04/17/2017 Stack: ffff88007392e600 ffff880075847dc0 ffffffff8108160a 0000000000000000 ffff88007392e600 ffff880075847de8 ffffffff810a484b ffff880076127000 ffff88003cd3a800 ffff880074f12a00 ffff880075847e28 ffffffffc09bed15 Call Trace: [] __put_task_struct+0x5a/0x140 [] kthread_stop+0x10b/0x110 [] rsi_disconnect+0x2f5/0x300 [ven_rsi_sdio] [] ? __pm_runtime_resume+0x5b/0x80 [] sdio_bus_remove+0x38/0x100 [] __device_release_driver+0xa4/0x150 [] driver_detach+0xb5/0xc0 [] bus_remove_driver+0x55/0xd0 [] driver_unregister+0x2c/0x50 [] sdio_unregister_driver+0x1a/0x20 [] rsi_module_exit+0x15/0x30 [ven_rsi_sdio] [] SyS_delete_module+0x1b8/0x210 [] entry_SYSCALL_64_fastpath+0x1c/0xbb Signed-off-by: Siva Rebbagondla Signed-off-by: Kalle Valo commit baa8caf4ab7af2d9e84b566b99fe919a4e9e7562 Author: Siva Rebbagondla Date: Mon Aug 27 17:05:14 2018 +0530 rsi: fix memory alignment issue in ARM32 platforms During testing in ARM32 platforms, observed below kernel panic, as driver accessing data beyond the allocated memory while submitting URB to USB. Fix: Resolved this by specifying correct length by considering 64 bit alignment. so that, USB bus driver will access only allocated memory. Unit-test: Tested and confirm that driver bring up and scanning, connection and data transfer works fine with this fix. ...skipping... [ 25.389450] Unable to handle kernel paging request at virtual address 5aa11422 [ 25.403078] Internal error: Oops: 5 [#1] SMP ARM [ 25.407703] Modules linked in: rsi_usb [ 25.411473] CPU: 1 PID: 317 Comm: RX-Thread Not tainted 4.18.0-rc7 #1 [ 25.419221] Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree) [ 25.425764] PC is at skb_release_data+0x90/0x168 [ 25.430393] LR is at skb_release_all+0x28/0x2c [ 25.434842] pc : [<807435b0>] lr : [<80742ba0>] psr: 200e0013 5aa1141e [ 25.464633] Flags: nzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none [ 25.477524] Process RX-Thread (pid: 317, stack limit = 0x(ptrval)) [ 25.483709] Stack: (0xedf69ed8 to 0xedf6a000) [ 25.569907] Backtrace: [ 25.572368] [<80743520>] (skb_release_data) from [<80742ba0>] (skb_release_all+0x28/0x2c) [ 25.580555] r9:7f00258c r8:00000001 r7:ee355000 r6:eddab0d0 r5:eddab000 r4:eddbb840 [ 25.588308] [<80742b78>] (skb_release_all) from [<807432cc>] (consume_skb+0x30/0x50) [ 25.596055] r5:eddab000 r4:eddbb840 [ 25.599648] [<8074329c>] (consume_skb) from [<7f00117c>] (rsi_usb_rx_thread+0x64/0x12c [rsi_usb]) [ 25.608524] r5:eddab000 r4:eddbb840 [ 25.612116] [<7f001118>] (rsi_usb_rx_thread [rsi_usb]) from [<80142750>] (kthread+0x11c/0x15c) [ 25.620735] r10:ee9ff9e0 r9:edcde3b8 r8:ee355000 r7:edf68000 r6:edd3a780 r5:00000000 [ 25.628567] r4:edcde380 [ 25.631110] [<80142634>] (kthread) from [<801010e8>] (ret_from_fork+0x14/0x2c) [ 25.638336] Exception stack(0xedf69fb0 to 0xedf69ff8) [ 25.682929] ---[ end trace 8236a5496f5b5d3b ]--- Signed-off-by: Siva Rebbagondla Signed-off-by: Kalle Valo commit cb18e2e9ec71d42409a51b83546686c609780dde Author: Rasmus Villemoes Date: Wed Aug 22 15:22:15 2018 +0200 brcmfmac: fix wrong strnchr usage strnchr takes arguments in the order of its name: string, max bytes to read, character to search for. Here we're passing '\n' aka 10 as the buffer size, and searching for sizeof(buf) aka BRCMF_DCMD_SMLEN aka 256 (aka '\0', since it's implicitly converted to char) within those 10 bytes. Just interchanging the last two arguments would still leave a bug, because if we've been successful once, there are not sizeof(buf) characters left after the new value of p. Since clmver is immediately afterwards passed as a %s argument, I assume that it is actually a properly nul-terminated string. For that case, we have strreplace(). Signed-off-by: Rasmus Villemoes Signed-off-by: Kalle Valo commit f483039cf51acf30494cd754194562c22cf98764 Author: Dan Carpenter Date: Wed Aug 22 13:41:26 2018 +0300 rt2x00: use simple_read_from_buffer() The problem with this copy_to_user() calls is that they don't ensure that "size" is less than the "length" which the user provided. Obviously, this is debugfs and "size" is normally going to be very small so it probably doesn't matter, but this is the correct thing to do. Signed-off-by: Dan Carpenter Acked-by: Stanislaw Gruszka Signed-off-by: Kalle Valo commit 33a164fa8a4c91408e0b7738f754cb1a7827c5f2 Author: Ganapathi Bhat Date: Tue Aug 21 13:23:02 2018 +0530 mwifex: free rx_cmd skb in suspended state USB suspend handler will kill the presubmitted rx_cmd URB. This triggers a call to the corresponding URB complete handler, which will free the rx_cmd skb, associated with rx_cmd URB. Due to a possible race betwen suspend handler and main thread, depicted in 'commit bfcacac6c84b ("mwifiex: do no submit URB in suspended state")', it is possible that the rx_cmd skb will fail to get freed. This causes a memory leak, since the resume handler will always allocate a new rx_cmd skb. To fix this, free the rx_cmd skb in mwifiex_usb_submit_rx_urb, if the device is in suspended state. Signed-off-by: Vidya Dharmaraju Signed-off-by: Cathy Luo Signed-off-by: Ganapathi Bhat Signed-off-by: Kalle Valo commit 7bd4628c2f31c51254aa39628ecae521d00d0b90 Author: Ganapathi Bhat Date: Tue Aug 21 13:23:01 2018 +0530 mwifiex: do no submit URB in suspended state There is a possible race between USB suspend and main thread: 1. After processing the command response, main thread will submit rx_cmd URB back so as to process next command response, by calling mwifiex_usb_submit_rx_urb. 2. During USB suspend, the suspend handler will check if rx_cmd URB is pending(submitted) and if true, kill this URB. There is a possible race between #1 and #2, where rx_cmd URB will be submitted by main thread(#1) after the suspend handler check in #2. To fix this, check if device is already suspended in mwifiex_usb_submit_rx_urb, in which case do not submit the URB. Signed-off-by: Vidya Dharmaraju Signed-off-by: Cathy Luo Signed-off-by: Ganapathi Bhat Signed-off-by: Kalle Valo commit 199ba9faca909e77ac533449ecd1248123ce89e7 Author: Larry Finger Date: Mon Aug 20 13:48:31 2018 -0500 rtl8187: Fix warning generated when strncpy() destination length matches the sixe argument In gcc8, when the 3rd argument (size) of a call to strncpy() matches the length of the first argument, the compiler warns of the possibility of an unterminated string. Using strlcpy() forces a null at the end. Signed-off-by: Larry Finger Signed-off-by: Kalle Valo commit 5945310a175506f743b68fd6812dbcd1b3c95ec1 Author: Colin Ian King Date: Thu Aug 16 13:59:44 2018 +0100 orinoco: remove unused array encaps_hdr and macro ENCAPS_OVERHEAD Array encaps_hdr and macro ENCAPS_OVERHEAD are declared but are not being used, hence they are redundant and can be removed. Cleans up clang warning: warning: 'encaps_hdr' defined but not used [-Wunused-const-variable=] Signed-off-by: Colin Ian King Signed-off-by: Kalle Valo commit a858376cdbb3edfef7dc6ca5ec1c70ff94bdbef2 Author: Chung-Hsien Hsu Date: Wed Aug 15 05:32:40 2018 -0500 brcmfmac: add 4-way handshake offload detection for FT-802.1X Add 4-way handshake offload detection for FT with EAP authentication. Signed-off-by: Chung-Hsien Hsu Signed-off-by: Chi-Hsien Lin Signed-off-by: Kalle Valo commit 4ad298da9392975f0dc1355dd302a7e95d3c9801 Author: Chung-Hsien Hsu Date: Wed Aug 15 05:32:39 2018 -0500 brcmfmac: add FT-based AKMs in brcmf_set_key_mgmt() for FT support Add WLAN_AKM_SUITE_FT_8021X and WLAN_AKM_SUITE_FT_PSK in brcmf_set_key_mgmt() for FT support. Signed-off-by: Chung-Hsien Hsu Signed-off-by: Chi-Hsien Lin Signed-off-by: Kalle Valo commit 2fef681a4cf7994c882190fd2417b95f30510afb Author: Jia-Shyr Chuang Date: Wed Aug 15 04:23:09 2018 -0500 brcmfmac: add CYW89342 mini-PCIe device CYW89342 is a 2x2 MIMO, 802.11a/b/g/n/ac for WLAN. It is a member of 4355/4359 family. Signed-off-by: Jia-Shyr Chuang Signed-off-by: Chi-Hsien Lin Signed-off-by: Kalle Valo commit 3348ef6a6a126706d6a73ed40c18d8033df72783 Author: Dan Carpenter Date: Tue Aug 14 12:07:48 2018 +0300 libertas_tf: prevent underflow in process_cmdrequest() If recvlength is less than MESSAGE_HEADER_LEN (4) we would end up corrupting memory. Fixes: c305a19a0d0a ("libertas_tf: usb specific functions") Signed-off-by: Dan Carpenter Signed-off-by: Kalle Valo commit 62a25dc56990a382afeb40891eead0dbf8b598b4 Author: Rosen Penev Date: Sat Aug 11 16:33:52 2018 -0700 mt76x2u: Add support for Alfa AWUS036ACM A 2x2 unit with a USB dock for optimal placement. Signed-off-by: Rosen Penev Acked-by: Lorenzo Bianconi Signed-off-by: Kalle Valo commit 057118edfc365676022cdce4b218074f1fd67672 Author: Varsha Rao Date: Wed Jul 25 21:00:07 2018 +0200 cw1200: Remove extra parentheses Remove unnecessary parentheses to fix the extraneous parentheses clang warning. Signed-off-by: Varsha Rao Signed-off-by: Kalle Valo commit 9e9e11d83238b068c78dbb5c63340132dc76fd8b Author: Varsha Rao Date: Wed Jul 25 20:56:22 2018 +0200 brcmsmac: Remove extra parentheses Remove the unnecessary parentheses to fix the clang warning of extraneous parentheses. Signed-off-by: Varsha Rao Signed-off-by: Kalle Valo commit b972cece9448c55a2464d61787c955ab28110a40 Author: Sean Paul Date: Fri Aug 31 11:09:25 2018 -0400 drm: Describe pixel_blend_mode in drm_plane_state Adds docs for pixel_blend_mode in drm_plane_state. Fixes the warning found by kbuild test robot: htmldocs: include/drm/drm_plane.h:189: warning: Function parameter or member 'pixel_blend_mode' not described in 'drm_plane_state' Cc: Daniel Vetter Cc: Lowry Li Reviewed-by: Maarten Lankhorst Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20180831150934.202332-1-sean@poorly.run commit 757fdb51c14fda221ccb6999a865f7f895c79750 Author: Hans Verkuil Date: Mon May 21 04:54:59 2018 -0400 media: vivid: add request support Add support for requests to vivid. Signed-off-by: Hans Verkuil Reviewed-by: Mauro Carvalho Chehab Signed-off-by: Mauro Carvalho Chehab commit 945b07b1630fd15e556137e31e9c38d01db0fb0c Author: Hans Verkuil Date: Mon May 21 04:54:58 2018 -0400 media: vivid: add mc Add support for the media_device to vivid. This is a prerequisite for request support. Signed-off-by: Hans Verkuil Reviewed-by: Mauro Carvalho Chehab Signed-off-by: Mauro Carvalho Chehab commit 86b93b2c95f15d6b0c753b17de43db0e7e588f2d Author: Hans Verkuil Date: Mon May 21 04:54:57 2018 -0400 media: vim2m: support requests Add support for requests to vim2m. Signed-off-by: Hans Verkuil Reviewed-by: Mauro Carvalho Chehab Signed-off-by: Mauro Carvalho Chehab commit 144bd0ee304c7d0690eec285aee93019d3f30fc8 Author: Hans Verkuil Date: Mon May 21 04:54:56 2018 -0400 media: vim2m: use workqueue v4l2_ctrl uses mutexes, so we can't setup a ctrl_handler in interrupt context. Switch to a workqueue instead and drop the timer. Signed-off-by: Hans Verkuil Reviewed-by: Mauro Carvalho Chehab Signed-off-by: Mauro Carvalho Chehab commit 803a7ab758252599ddadf5fe9326acee7340d9b6 Author: Hans Verkuil Date: Mon May 21 04:54:53 2018 -0400 media: v4l2-mem2mem: add vb2_m2m_request_queue For mem2mem devices we have to make sure that v4l2_m2m_try_schedule() is called whenever a request is queued. We do that by creating a vb2_m2m_request_queue() helper that should be used instead of the 'normal' vb2_request_queue() helper. The m2m helper function will call v4l2_m2m_try_schedule() as needed. In addition we also avoid calling v4l2_m2m_try_schedule() when preparing or queueing a buffer for a request since that is no longer needed. Instead this helper function will do that when the request is actually queued. Signed-off-by: Hans Verkuil Reviewed-by: Mauro Carvalho Chehab Signed-off-by: Mauro Carvalho Chehab commit 5fb6589acc3860304436aa436e7ea33712de6fc2 Author: Andrew F. Davis Date: Fri Aug 31 10:14:07 2018 -0500 ASoC: tas6424: Add channel fault reporting The TAS6426 has a register that reports channel faults such as overcurrent and continuous DC output. Add reporting of this here. Signed-off-by: Andrew F. Davis Signed-off-by: Mark Brown commit 4c11d7675827421194325b82b20ddc6c8b86c83d Merge: 919869214b8e d40e3e9e44db Author: Mark Brown Date: Fri Aug 31 16:23:43 2018 +0100 Merge branch 'asoc-4.19' into asoc-4.20 tas dependency commit 9ac8090fda77f072815c209c80fb230e89cda18c Author: Hans Verkuil Date: Wed May 23 08:09:23 2018 -0400 media: videobuf2-v4l2: refuse qbuf if queue uses requests or vv. Check if the vb2 queue uses requests, and if so refuse to add buffers that are not part of a request. Also check for the reverse: a vb2 queue did not use requests, and an attempt was made to queue a buffer to a request. We might relax this in the future, but for now just return -EPERM in that case. Signed-off-by: Hans Verkuil Reviewed-by: Mauro Carvalho Chehab Signed-off-by: Mauro Carvalho Chehab commit 919869214b8e0b24926a278e121879f60df485bb Author: Andrew F. Davis Date: Fri Aug 31 10:14:06 2018 -0500 ASoC: tas6424: Print full register name in error message The current short version of the register name may be ambiguous when another fault register detection is added. Use the full name. While here fix comment about clearing faults, the CLEAR_FAULT register actually only clears sticky bits, which are only warnings, fault bits can only cleared by resolving the fault. Signed-off-by: Andrew F. Davis Signed-off-by: Mark Brown commit 61add367dda6309ee1702d85344b5fcbd6ede9a1 Author: Hans Verkuil Date: Wed May 23 07:51:25 2018 -0400 media: videobuf2-core: add uses_requests/qbuf flags Set the first time a buffer from a request is queued to vb2 (uses_requests) or directly queued (uses_qbuf). Cleared when the queue is canceled. Signed-off-by: Hans Verkuil Reviewed-by: Mauro Carvalho Chehab Signed-off-by: Mauro Carvalho Chehab commit 86f6bd3cf1222c62bcccd76daf1c831f22e595bf Author: Hans Verkuil Date: Mon May 21 04:54:52 2018 -0400 media: videobuf2-v4l2: add vb2_request_queue/validate helpers The generic vb2_request_validate helper function checks if there are buffers in the request and if so, prepares (validates) all objects in the request. The generic vb2_request_queue helper function queues all buffer objects in the validated request. Signed-off-by: Hans Verkuil Reviewed-by: Mauro Carvalho Chehab Signed-off-by: Mauro Carvalho Chehab commit c07aa48ec57eca649e987e8f19a336d4373b8da6 Author: Hans Verkuil Date: Mon May 21 04:54:51 2018 -0400 media: videobuf2-core: add request helper functions Add a new helper function to tell if a request object is a buffer. Add a new helper function that returns true if a media_request contains at least one buffer. Signed-off-by: Hans Verkuil Reviewed-by: Mauro Carvalho Chehab Signed-off-by: Mauro Carvalho Chehab commit 394dc588809158826e2877adb670391829f91c63 Author: Hans Verkuil Date: Wed May 30 02:46:22 2018 -0400 media: videobuf2-v4l2: integrate with media requests This implements the V4L2 part of the request support. The main change is that vb2_qbuf and vb2_prepare_buf now have a new media_device pointer. This required changes to several drivers that did not use the vb2_ioctl_qbuf/prepare_buf helper functions. Signed-off-by: Hans Verkuil Reviewed-by: Mauro Carvalho Chehab Signed-off-by: Mauro Carvalho Chehab commit 35ab4fd2b98b8ad11d67606dd209e0947e448074 Author: Lionel Landwerlin Date: Mon Aug 13 09:02:18 2018 +0100 drm/i915/perf: reuse intel_lrc ctx regs macro Abstract the context image access a bit. Signed-off-by: Lionel Landwerlin Reviewed-by: Tvrtko Ursulin Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20180813080218.28994-3-tvrtko.ursulin@linux.intel.com commit 1c71bc565cdbd592f9bca4fbf60111f664899a76 Author: Lionel Landwerlin Date: Mon Aug 13 09:02:17 2018 +0100 drm/i915/perf: simplify configure all context function We don't need any special treatment on error so just return as soon as possible. Signed-off-by: Lionel Landwerlin Reviewed-by: Tvrtko Ursulin Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20180813080218.28994-2-tvrtko.ursulin@linux.intel.com commit fd89e0bb6ebff6481b9b8dd73729f5d62984490a Author: Hans Verkuil Date: Mon May 21 04:54:47 2018 -0400 media: videobuf2-core: integrate with media requests Buffers can now be prepared or queued for a request. A buffer is unbound from the request at vb2_buffer_done time or when the queue is cancelled. Signed-off-by: Hans Verkuil Reviewed-by: Mauro Carvalho Chehab Signed-off-by: Mauro Carvalho Chehab commit 1cf96dcc6e79a860d2216a4d1c3edb1676a5798e Author: Hans Verkuil Date: Mon May 21 04:54:46 2018 -0400 media: videobuf2-core: embed media_request_object Make vb2_buffer a request object. Signed-off-by: Hans Verkuil Reviewed-by: Mauro Carvalho Chehab Signed-off-by: Mauro Carvalho Chehab commit 8e013700bc12806d80f31ebe360916987f0e03df Author: Hans Verkuil Date: Fri Jun 1 11:03:13 2018 -0400 media: vb2: add init_buffer buffer op We need to initialize the request_fd field in struct vb2_v4l2_buffer to -1 instead of the default of 0. So we need to add a new op that is called when struct vb2_v4l2_buffer is allocated. Signed-off-by: Hans Verkuil Reviewed-by: Mauro Carvalho Chehab Signed-off-by: Mauro Carvalho Chehab commit 62fed26ff4338eeccc702799be358bbb1471b76c Author: Hans Verkuil Date: Mon May 21 04:54:44 2018 -0400 media: videodev2.h: Add request_fd field to v4l2_buffer When queuing buffers allow for passing the request that should be associated with this buffer. If V4L2_BUF_FLAG_REQUEST_FD is set, then request_fd is used as the file descriptor. If a buffer is stored in a request, but not yet queued to the driver, then V4L2_BUF_FLAG_IN_REQUEST is set. Signed-off-by: Hans Verkuil Reviewed-by: Mauro Carvalho Chehab Signed-off-by: Mauro Carvalho Chehab commit 55028695c3bbd8f202b969a5a702caa7d7a51675 Author: Hans Verkuil Date: Sun Jun 3 05:02:27 2018 -0400 media: vb2: drop VB2_BUF_STATE_PREPARED, use bool prepared/synced instead The PREPARED state becomes a problem with the request API: a buffer could be PREPARED but dequeued, or PREPARED and in state IN_REQUEST. PREPARED is really not a state as such, but more a property of the buffer. So make new 'prepared' and 'synced' bools instead to remember whether the buffer is prepared and/or synced or not. V4L2_BUF_FLAG_PREPARED is only set if the buffer is both synced and prepared and in the DEQUEUED state. Signed-off-by: Hans Verkuil Reviewed-by: Mauro Carvalho Chehab Signed-off-by: Mauro Carvalho Chehab commit 559cd0a3e4848050810d125ffba36dab1e686c9d Author: Hans Verkuil Date: Sun Jun 3 05:00:25 2018 -0400 media: davinci_vpfe: remove bogus vb2->state check There is no need to check the vb2 state in the buf_prepare callback: it can never be wrong. Since VB2_BUF_STATE_PREPARED will be removed in the next patch we'll remove this unnecessary check (and use of that state) first. Signed-off-by: Hans Verkuil Reviewed-by: Mauro Carvalho Chehab Signed-off-by: Mauro Carvalho Chehab commit db6e8d57e2cd9fb77e6ceef8476912caecbd59b5 Author: Hans Verkuil Date: Mon May 21 04:54:45 2018 -0400 media: vb2: store userspace data in vb2_v4l2_buffer The userspace-provided plane data needs to be stored in vb2_v4l2_buffer. Currently this information is applied by __fill_vb2_buffer() which is called by the core prepare_buf and qbuf functions, but when using requests these functions aren't called yet since the buffer won't be prepared until the media request is actually queued. In the meantime this information has to be stored somewhere and vb2_v4l2_buffer is a good place for it. The __fill_vb2_buffer callback now just copies the relevant information from vb2_v4l2_buffer into the planes array. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 0af4e80bf24a3caf56cd94d6dbe6a8bb72536b1d Author: Hans Verkuil Date: Tue Aug 14 05:29:40 2018 -0400 media: videobuf2-v4l2: replace if by switch in __fill_vb2_buffer() Replace 'if' statements by a switch in __fill_vb2_buffer() in preparation of the next patch. No other changes. Signed-off-by: Hans Verkuil Reviewed-by: Mauro Carvalho Chehab Signed-off-by: Mauro Carvalho Chehab commit 5f89ec80f1e074d3f25c989264e376a452b03d02 Author: Hans Verkuil Date: Tue Aug 14 05:17:53 2018 -0400 media: videobuf2-v4l2: move __fill_v4l2_buffer() function Move the __fill_v4l2_buffer() to before the vb2_queue_or_prepare_buf() function to prepare for the next two patches. No other changes. Signed-off-by: Hans Verkuil Reviewed-by: Mauro Carvalho Chehab Signed-off-by: Mauro Carvalho Chehab commit 5f611d74c2bd89296aa045609df0e5309ff7ab41 Author: Hans Verkuil Date: Tue Jul 10 04:00:53 2018 -0400 media: v4l2-ctrls: add v4l2_ctrl_request_hdl_find/put/ctrl_find functions If a driver needs to find/inspect the controls set in a request then it can use these functions. E.g. to check if a required control is set in a request use this in the req_validate() implementation: int res = -EINVAL; hdl = v4l2_ctrl_request_hdl_find(req, parent_hdl); if (hdl) { if (v4l2_ctrl_request_hdl_ctrl_find(hdl, ctrl_id)) res = 0; v4l2_ctrl_request_hdl_put(hdl); } return res; Signed-off-by: Hans Verkuil Reviewed-by: Mauro Carvalho Chehab Signed-off-by: Mauro Carvalho Chehab commit c41e9cff704a06b8cbd9eeea0fdec54fb6d13825 Author: Hans Verkuil Date: Mon May 21 04:54:42 2018 -0400 media: v4l2-ctrls: support g/s_ext_ctrls for requests The v4l2_g/s_ext_ctrls functions now support control handlers that represent requests. The v4l2_ctrls_find_req_obj() function is responsible for finding the request from the fd. Signed-off-by: Hans Verkuil Reviewed-by: Mauro Carvalho Chehab Signed-off-by: Mauro Carvalho Chehab commit 6fa6f831f0950bf46934e6c3a9766b258a9ea85f Author: Hans Verkuil Date: Mon May 21 04:54:40 2018 -0400 media: v4l2-ctrls: add core request support Integrate the request support. This adds the v4l2_ctrl_request_complete and v4l2_ctrl_request_setup functions to complete a request and (as a helper function) to apply a request to the hardware. It takes care of queuing requests and correctly chaining control values in the request queue. Note that when a request is marked completed it will copy control values to the internal request state. This can be optimized in the future since this is sub-optimal when dealing with large compound and/or array controls. For the initial 'stateless codec' use-case the current implementation is sufficient. Signed-off-by: Hans Verkuil Reviewed-by: Mauro Carvalho Chehab Signed-off-by: Mauro Carvalho Chehab commit dcea5601dbdfb13be91526eb898c0f9122381032 Author: Hans Verkuil Date: Mon May 21 04:54:39 2018 -0400 media: v4l2-ctrls: use ref in helper instead of ctrl The next patch needs the reference to a control instead of the control itself, so change struct v4l2_ctrl_helper accordingly. Signed-off-by: Hans Verkuil Reviewed-by: Mauro Carvalho Chehab Signed-off-by: Mauro Carvalho Chehab commit 178543a3ba96b7857fcb6cef806ed9f98ea0cca1 Author: Hans Verkuil Date: Mon May 21 04:54:38 2018 -0400 media: v4l2-ctrls: alloc memory for p_req To store request data the handler_new_ref() allocates memory for it if needed. Signed-off-by: Hans Verkuil Reviewed-by: Mauro Carvalho Chehab Signed-off-by: Mauro Carvalho Chehab commit 52beeddb68833e02c0923bc46868b347a6ad393c Author: Hans Verkuil Date: Mon May 21 04:54:37 2018 -0400 media: v4l2-ctrls: prepare internal structs for request API Embed and initialize a media_request_object in struct v4l2_ctrl_handler. Add a p_req field to struct v4l2_ctrl_ref that will store the request value. Signed-off-by: Hans Verkuil Signed-off-by: Alexandre Courbot Reviewed-by: Mauro Carvalho Chehab Signed-off-by: Mauro Carvalho Chehab commit da1b1aeac1aced231ac85329112a592dc14d173a Author: Hans Verkuil Date: Mon May 21 04:54:36 2018 -0400 media: v4l2-ctrls: v4l2_ctrl_add_handler: add from_other_dev Add a 'bool from_other_dev' argument: set to true if the two handlers refer to different devices (e.g. it is true when inheriting controls from a subdev into a main v4l2 bridge driver). This will be used later when implementing support for the request API since we need to skip such controls. Signed-off-by: Hans Verkuil Signed-off-by: Alexandre Courbot Reviewed-by: Mauro Carvalho Chehab Signed-off-by: Mauro Carvalho Chehab commit f23317adf6a726b9dbedbe3a0363846f597cc0e8 Author: Alexandre Courbot Date: Mon May 21 04:54:35 2018 -0400 media: videodev2.h: add request_fd field to v4l2_ext_controls If 'which' is V4L2_CTRL_WHICH_REQUEST_VAL, then the 'request_fd' field can be used to specify a request for the G/S/TRY_EXT_CTRLS ioctls. Signed-off-by: Alexandre Courbot Signed-off-by: Hans Verkuil Reviewed-by: Mauro Carvalho Chehab Signed-off-by: Mauro Carvalho Chehab commit cc6eddcd37ce6be403b5820ffd84cb84b33b653f Author: Hans Verkuil Date: Mon May 21 04:54:34 2018 -0400 media: v4l2-dev: lock req_queue_mutex We need to serialize streamon/off with queueing new requests. These ioctls may trigger the cancellation of a streaming operation, and that should not be mixed with queuing a new request at the same time. Finally close() needs this lock since that too can trigger the cancellation of a streaming operation. We take the req_queue_mutex here before any other locks since it is a very high-level lock. Signed-off-by: Hans Verkuil Signed-off-by: Sakari Ailus Reviewed-by: Mauro Carvalho Chehab Signed-off-by: Mauro Carvalho Chehab commit 93a9d9008d3c963d5d12c56460b5e1d93dad3ea8 Author: Hans Verkuil Date: Wed May 23 07:11:06 2018 -0400 media: v4l2-device.h: add v4l2_device_supports_requests() helper Add a simple helper function that tests if the driver supports the request API. Signed-off-by: Hans Verkuil Reviewed-by: Mauro Carvalho Chehab Signed-off-by: Mauro Carvalho Chehab commit 0ca0e8442dcd5da2af5ce35e90b083a492b4cbac Author: Hans Verkuil Date: Mon May 21 04:54:29 2018 -0400 media: media-request: add media_request_object_find Add media_request_object_find to find a request object inside a request based on ops and priv values. Objects of the same type (vb2 buffer, control handler) will have the same ops value. And objects that refer to the same 'parent' object (e.g. the v4l2_ctrl_handler that has the current driver state) will have the same priv value. The caller has to call media_request_object_put() for the returned object since this function increments the refcount. Signed-off-by: Hans Verkuil Acked-by: Sakari Ailus Reviewed-by: Mauro Carvalho Chehab Signed-off-by: Mauro Carvalho Chehab commit 8a1ecc01a473b75ab97be9b36f623e4551a6e9ae Author: Marcel Ziswiler Date: Fri Aug 31 14:03:09 2018 +0200 ARM: dts: pxa: fix power i2c base address There is one too many zeroes in the Power I2C base address. Fix this. Signed-off-by: Marcel Ziswiler Signed-off-by: Robert Jarzmik commit be9d6d4b0bf9cc3644826fb95264dbddb9a6d047 Author: Hans Verkuil Date: Mon May 21 04:54:28 2018 -0400 media: media-request: add media_request_get_by_fd Add media_request_get_by_fd() to find a request based on the file descriptor. The caller has to call media_request_put() for the returned request since this function increments the refcount. Signed-off-by: Hans Verkuil Acked-by: Sakari Ailus Reviewed-by: Mauro Carvalho Chehab Signed-off-by: Mauro Carvalho Chehab commit 496f6f4d8a84421b70c4fb629656cb4730cbcd61 Author: Sakari Ailus Date: Mon May 21 04:54:33 2018 -0400 media: doc: Add media-request.h header to documentation build media-request.h has been recently added; add it to the documentation build as well. Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil Reviewed-by: Mauro Carvalho Chehab Signed-off-by: Mauro Carvalho Chehab commit 647d2886a892906e56f621bfe81735c3afcb18ba Merge: 9cac6a9b6297 ab27926d9e4a Author: Kalle Valo Date: Fri Aug 31 18:05:12 2018 +0300 Merge tag 'iwlwifi-next-for-kalle-2018-08-31' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next iwlwifi patches for 4.20 * One fix for channel-switch handling; * Some improvements in the HE code; * New FW API handling; * Improvements in the debugging code; * Some improvements in the PCI recovery mechanism; * Support for a few FW API changes; * Enable a new scanning feature; * Continued work on HE (mostly radiotap); * Some fixes in the FW rate-scaling implementation; * Other clean-ups and small fixes and improvements; commit 10905d70d78841a6fa191be5ec193e3c0d63555f Author: Hans Verkuil Date: Mon May 21 04:54:27 2018 -0400 media: media-request: implement media requests Add initial media request support: 1) Add MEDIA_IOC_REQUEST_ALLOC ioctl support to media-device.c 2) Add struct media_request to store request objects. 3) Add struct media_request_object to represent a request object. 4) Add MEDIA_REQUEST_IOC_QUEUE/REINIT ioctl support. Basic lifecycle: the application allocates a request, adds objects to it, queues the request, polls until it is completed and can then read the final values of the objects at the time of completion. When it closes the file descriptor the request memory will be freed (actually, when the last user of that request releases the request). Drivers will bind an object to a request (the 'adds objects to it' phase), when MEDIA_REQUEST_IOC_QUEUE is called the request is validated (req_validate op), then queued (the req_queue op). When done with an object it can either be unbound from the request (e.g. when the driver has finished with a vb2 buffer) or marked as completed (e.g. for controls associated with a buffer). When all objects in the request are completed (or unbound), then the request fd will signal an exception (poll). Co-developed-by: Sakari Ailus Co-developed-by: Laurent Pinchart Co-developed-by: Alexandre Courbot Signed-off-by: Hans Verkuil Signed-off-by: Sakari Ailus Reviewed-by: Mauro Carvalho Chehab Signed-off-by: Mauro Carvalho Chehab commit 66431c0bab0fb8bdd62930575869bea98eb2baf0 Author: Hans Verkuil Date: Mon May 21 04:54:26 2018 -0400 media: uapi/linux/media.h: add request API Define the public request API. This adds the new MEDIA_IOC_REQUEST_ALLOC ioctl to allocate a request and two ioctls that operate on a request in order to queue the contents of the request to the driver and to re-initialize the request. Signed-off-by: Hans Verkuil Acked-by: Sakari Ailus Reviewed-by: Laurent Pinchart Reviewed-by: Mauro Carvalho Chehab Signed-off-by: Mauro Carvalho Chehab commit c2f0898b86486a459fa8c91d194f3b699498c0c1 Author: Kuninori Morimoto Date: Fri Aug 31 03:11:25 2018 +0000 ASoC: simple-card-util: remove dai_link compatible code for platform Now no simple/audio cards are using legacy dai_link style for platform. Let's remove compatible code. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit 77b9b84132f0b9ca0802a25277eb7be49713661f Author: Kuninori Morimoto Date: Fri Aug 31 03:11:12 2018 +0000 ASoC: audio-graph-scu-card: support snd_soc_dai_link_component style for platform Current ASoC is supporting snd_soc_dai_link_component for binding, it is more useful than current legacy style. Currently only codec is supporting it as multicodec (= codecs). CPU will support multi style in the future. We want to have it on Platform too in the future. If all Codec/CPU/Platform are replaced into snd_soc_dai_link_component style, we can remove legacy complex style. This patch supports snd_soc_dai_link_component style for audio-graph-scu-card for platform. [current] struct snd_soc_dai_link { ... *cpu_name; *cpu_of_node; *cpu_dai_name; *codec_name; *codec_of_node; *codec_dai_name; *codecs; num_codecs; *platform_name; *platform_of_node; ... } [in the future] struct snd_soc_dai_link { ... *cpus num_cpus; *codecs; num_codecs; *platform; ... } Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit 46c73187f2986e40b427485bb8f4401aa9143ed0 Author: Kuninori Morimoto Date: Fri Aug 31 03:10:58 2018 +0000 ASoC: audio-graph-card: support snd_soc_dai_link_component style for platform Current ASoC is supporting snd_soc_dai_link_component for binding, it is more useful than current legacy style. Currently only codec is supporting it as multicodec (= codecs). CPU will support multi style in the future. We want to have it on Platform too in the future. If all Codec/CPU/Platform are replaced into snd_soc_dai_link_component style, we can remove legacy complex style. This patch supports snd_soc_dai_link_component style for audio-graph-card for platform. [current] struct snd_soc_dai_link { ... *cpu_name; *cpu_of_node; *cpu_dai_name; *codec_name; *codec_of_node; *codec_dai_name; *codecs; num_codecs; *platform_name; *platform_of_node; ... } [in the future] struct snd_soc_dai_link { ... *cpus num_cpus; *codecs; num_codecs; *platform; ... } Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit 24f3bead9b72cbd91956be28ab6a74d51bdd4c6b Author: Kuninori Morimoto Date: Fri Aug 31 03:10:46 2018 +0000 ASoC: simple-scu-card: support snd_soc_dai_link_component style for platform Current ASoC is supporting snd_soc_dai_link_component for binding, it is more useful than current legacy style. Currently only codec is supporting it as multicodec (= codecs). CPU will support multi style in the future. We want to have it on Platform too in the future. If all Codec/CPU/Platform are replaced into snd_soc_dai_link_component style, we can remove legacy complex style. This patch supports snd_soc_dai_link_component style for simple-scu-card for platform. [current] struct snd_soc_dai_link { ... *cpu_name; *cpu_of_node; *cpu_dai_name; *codec_name; *codec_of_node; *codec_dai_name; *codecs; num_codecs; *platform_name; *platform_of_node; ... } [in the future] struct snd_soc_dai_link { ... *cpus num_cpus; *codecs; num_codecs; *platform; ... } Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit e58f41e41185c6906bd11c73c4e76aa5fc3ea685 Author: Kuninori Morimoto Date: Fri Aug 31 03:10:33 2018 +0000 ASoC: simple-card: support snd_soc_dai_link_component style for platform Current ASoC is supporting snd_soc_dai_link_component for binding, it is more useful than current legacy style. Currently only codec is supporting it as multicodec (= codecs). CPU will support multi style in the future. We want to have it on Platform too in the future. If all Codec/CPU/Platform are replaced into snd_soc_dai_link_component style, we can remove legacy complex style. This patch supports snd_soc_dai_link_component style for simple-card for platform. [current] struct snd_soc_dai_link { ... *cpu_name; *cpu_of_node; *cpu_dai_name; *codec_name; *codec_of_node; *codec_dai_name; *codecs; num_codecs; *platform_name; *platform_of_node; ... } [in the future] struct snd_soc_dai_link { ... *cpus num_cpus; *codecs; num_codecs; *platform; ... } Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit 868cdb4690699b04ca4d09b1e0178dfc680dbd8e Author: Kuninori Morimoto Date: Fri Aug 31 03:10:20 2018 +0000 ASoC: simple-card-util: support snd_soc_dai_link_component style for platform Current ASoC is supporting snd_soc_dai_link_component for binding, it is more useful than current legacy style. Currently only codec is supporting it as multicodec (= codecs). CPU will support multi style in the future. We want to have it on Platform too in the future. If all Codec/CPU/Platform are replaced into snd_soc_dai_link_component style, we can remove legacy complex style. This patch supports snd_soc_dai_link_component style for simple-card-util for platform. [current] struct snd_soc_dai_link { ... *cpu_name; *cpu_of_node; *cpu_dai_name; *codec_name; *codec_of_node; *codec_dai_name; *codecs; num_codecs; *platform_name; *platform_of_node; ... } [in the future] struct snd_soc_dai_link { ... *cpus num_cpus; *codecs; num_codecs; *platform; ... } Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit daecf46ee0e5f0fb2349e20af53c4653e2afc440 Author: Kuninori Morimoto Date: Fri Aug 31 03:10:08 2018 +0000 ASoC: soc-core: use snd_soc_dai_link_component for platform Current struct snd_soc_dai_link is supporting multicodec, and it is supporting legacy style of codec_name codec_of_node code_dai_name This is handled as single entry of multicodec. We don't have multicpu support yet, but in the future we will. In such case, we can use snd_soc_dai_link_component for both cpu/codec. Then the code will be more simple and readble. As next step, we want to use it for platform, too. This patch adds snd_soc_dai_link_component style for platform. We might have multiplatform support in the future, but we don't know yet. To avoid un-known issue / complex code, this patch supports just single-platform as 1st step. If we could use snd_soc_dai_link_component for all CPU/Codec/Platform, we will switch to new style, and remove legacy code. This is prepare for it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit 2967e5ea19ec041104fd43da4cb07e8e76a39e55 Author: Kuninori Morimoto Date: Fri Aug 31 03:09:47 2018 +0000 ASoC: simple-card-util: remove dai_link compatible code for codec Now no simple/audio cards are using legacy dai_link style for codec. Let's remove compatible code. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit 04f7267aa8d17773917580951c740496e8059cba Author: Kuninori Morimoto Date: Fri Aug 31 03:09:33 2018 +0000 ASoC: audio-graph-scu-card: support snd_soc_dai_link_component style for codec Current ASoC is supporting snd_soc_dai_link_component for binding, it is more useful than current legacy style. Currently only codec is supporting it as multicodec (= codecs). CPU will support multi style in the future. We want to have it on Platform too in the future. If all Codec/CPU/Platform are replaced into snd_soc_dai_link_component style, we can remove legacy complex style. This patch supports snd_soc_dai_link_component style for audio-graph-scu-card for codec. [current] struct snd_soc_dai_link { ... *cpu_name; *cpu_of_node; *cpu_dai_name; *codec_name; *codec_of_node; *codec_dai_name; *codecs; num_codecs; *platform_name; *platform_of_node; ... } [in the future] struct snd_soc_dai_link { ... *cpus num_cpus; *codecs; num_codecs; *platform; ... } Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit 1340739d4de4d9d99f1134180f95b42cc4eda438 Author: Kuninori Morimoto Date: Fri Aug 31 03:09:20 2018 +0000 ASoC: audio-graph-scu-card: use simple_dai_props audi-graph-card and audio-graph-scu-card are very similar driver, but using different feature. Thus we are keeping synchronization on these 2 drivers style, because it is easy to confirm / check. Current big difference between these 2 drivers are "dai_props" on graph_card_data (= priv). It will be difficult to keep synchronize if we will add new feature on audio-graph-scu-card. Thus, this patch synchronize it. [audio-graph] struct graph_card_data { ... struct graph_dai_props { ... } *dai_props; ... }; [audio-graph-scu] struct graph_card_data { ... struct asoc_simple_dai *dai_props; ... }; Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit 8e6746db2e66c30e59a49ac15eb0c54d51acfb4b Author: Kuninori Morimoto Date: Fri Aug 31 03:09:05 2018 +0000 ASoC: audio-graph-card: support snd_soc_dai_link_component style for codec Current ASoC is supporting snd_soc_dai_link_component for binding, it is more useful than current legacy style. Currently only codec is supporting it as multicodec (= codecs). CPU will support multi style in the future. We want to have it on Platform too in the future. If all Codec/CPU/Platform are replaced into snd_soc_dai_link_component style, we can remove legacy complex style. This patch supports snd_soc_dai_link_component style for audio-graph-card for codec. [current] struct snd_soc_dai_link { ... *cpu_name; *cpu_of_node; *cpu_dai_name; *codec_name; *codec_of_node; *codec_dai_name; *codecs; num_codecs; *platform_name; *platform_of_node; ... } [in the future] struct snd_soc_dai_link { ... *cpus num_cpus; *codecs; num_codecs; *platform; ... } Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit 2289cc1c78574653d30b80696327646ba340babf Author: Kuninori Morimoto Date: Fri Aug 31 03:08:51 2018 +0000 ASoC: simple-scu-card: support snd_soc_dai_link_component style for codec Current ASoC is supporting snd_soc_dai_link_component for binding, it is more useful than current legacy style. Currently only codec is supporting it as multicodec (= codecs). CPU will support multi style in the future. We want to have it on Platform too in the future. If all Codec/CPU/Platform are replaced into snd_soc_dai_link_component style, we can remove legacy complex style. This patch supports snd_soc_dai_link_component style for simple-scu-card for codec. [current] struct snd_soc_dai_link { ... *cpu_name; *cpu_of_node; *cpu_dai_name; *codec_name; *codec_of_node; *codec_dai_name; *codecs; num_codecs; *platform_name; *platform_of_node; ... } [in the future] struct snd_soc_dai_link { ... *cpus num_cpus; *codecs; num_codecs; *platform; ... } Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit 3ff7ee8a972ac7379bd74af4dc203359320e7c75 Author: Geert Uytterhoeven Date: Fri Aug 31 11:16:18 2018 +0200 ARM: multi_v7_defconfig: Enable VIDEO_RENESAS_FDP1 R-Car Gen2 (and RZ/G1) SoCs have a Fine Display Processor, hence enable support for it. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit 5ece10ab99205d11419e3d2e6c7ac0e382d952b5 Author: Kuninori Morimoto Date: Fri Aug 31 03:08:38 2018 +0000 ASoC: simple-scu-card: use simple_dai_props simple-card and simple-scu-card are very similar driver, but using different feature. Thus we are keeping synchronization on these 2 drivers style, because it is easy to confirm / check. Current big difference between these 2 drivers are "dai_props" on simple_card_data (= priv). It will be difficult to keep synchronize if we will add new feature on simple-scu-card. Thus, this patch synchronize it. [simple] struct simple_card_data { ... struct simple_dai_props { ... } *dai_props; ... }; [simple scu] struct simple_card_data { ... struct asoc_simple_dai *dai_props; ... }; Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit 710af9196ce614ee02185c2ec55e617a71843183 Author: Kuninori Morimoto Date: Fri Aug 31 03:08:24 2018 +0000 ASoC: simple-card: support snd_soc_dai_link_component style for codec Current ASoC is supporting snd_soc_dai_link_component for binding, it is more useful than current legacy style. Currently only codec is supporting it as multicodec (= codecs). CPU will support multi style in the future. We want to have it on Platform too in the future. If all Codec/CPU/Platform are replaced into snd_soc_dai_link_component style, we can remove legacy complex style. This patch supports snd_soc_dai_link_component style for simple-card for codec. [current] struct snd_soc_dai_link { ... *cpu_name; *cpu_of_node; *cpu_dai_name; *codec_name; *codec_of_node; *codec_dai_name; *codecs; num_codecs; *platform_name; *platform_of_node; ... } [in the future] struct snd_soc_dai_link { ... *cpus num_cpus; *codecs; num_codecs; *platform; ... } Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit e664de680b10c13d65f982bcb9cfe56096e1de55 Author: Kuninori Morimoto Date: Fri Aug 31 03:08:09 2018 +0000 ASoC: simple_card_utils: support snd_soc_dai_link_component style for codec Current ASoC is supporting snd_soc_dai_link_component for binding, it is more useful than current legacy style. Currently only codec is supporting it as multicodec (= codecs). CPU will support multi style in the future. We want to have it on Platform too in the future. If all Codec/CPU/Platform are replaced into snd_soc_dai_link_component style, we can remove legacy complex style. This patch supports snd_soc_dai_link_component style for simple_card_utils for codec. [current] struct snd_soc_dai_link { ... *cpu_name; *cpu_of_node; *cpu_dai_name; *codec_name; *codec_of_node; *codec_dai_name; *codecs; num_codecs; *platform_name; *platform_of_node; ... } [in the future] struct snd_soc_dai_link { ... *cpus num_cpus; *codecs; num_codecs; *platform; ... } Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit 59051a25bfb51d98d50b7270d55d38a928b55073 Author: Geert Uytterhoeven Date: Fri Aug 31 11:16:17 2018 +0200 ARM: shmobile: defconfig: Enable VIDEO_RENESAS_FDP1 R-Car Gen2 (and RZ/G1) SoCs have a Fine Display Processor, hence enable support for it. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit f853d6b3ba345297974d877d8ed0f4a91eaca739 Author: Matt Flax Date: Thu Aug 30 09:38:02 2018 +1000 ASoC: cs4265: Add a S/PDIF enable switch This patch adds a S/PDIF enable switch as a SOC_SINGLE. Signed-off-by: Matt Flax Reviewed-by: Charles Keepax Signed-off-by: Mark Brown commit be47e75eb1419ffc1d9c26230963fd5fa3055097 Author: Matt Flax Date: Thu Aug 30 09:38:01 2018 +1000 ASoC: cs4265: Add native 32bit I2S transport The cs4265 uses 32 bit transport on the I2S bus. This patch enables native 32 bit mode for machine drivers which use this sound card driver. Signed-off-by: Matt Flax Reviewed-by: Charles Keepax Signed-off-by: Mark Brown commit 6f18bcdaa24bae39c746b57b95af19ff3c41b17f Author: Matt Flax Date: Thu Aug 30 09:38:00 2018 +1000 ASoC: cs4265: SOC_SINGLE register value error fix The cs4265 driver declares the "MMTLR Data Switch" register setting with a 0 register value rather then the 0x12 register (CS4265_SPDIF_CTL2). This incorrect value causes alsamixer to fault with the output : cannot load mixer controls: Input/output error This patch corrects the register value. alsamixer now runs. Signed-off-by: Matt Flax Signed-off-by: Mark Brown commit db658f40cae33a9fddbd9ca5c35c6bbfbd593a82 Author: Andreas Dannenberg Date: Fri Aug 31 09:47:14 2018 -0500 ASoC: codecs: tas5720: add TAS5722 TDM slot width setting support Unlike the TAS5720, the TAS5722 can be configured to utilize 16-bit wide slots in TDM mode. This can help easing audio clocking/frequency requirements. Signed-off-by: Andreas Dannenberg Signed-off-by: Andrew F. Davis Signed-off-by: Mark Brown commit ec94c177bf3700ce44c53c375a3fb4c347f2b08f Author: Andreas Dannenberg Date: Fri Aug 31 09:47:13 2018 -0500 ASoC: codecs: tas5720: add TAS5722 specific volume control The TAS5722 supports modifying volume in 0.25dB steps (as opposed to 0.5dB steps on the TAS5720). Introduce a custom mixer control that allows taking advantage of this finer output volume granularity. Also add custom getters/setters for access as the TAS5722 digital volume controls are split over two registers. Signed-off-by: Andreas Dannenberg Signed-off-by: Andrew F. Davis Signed-off-by: Mark Brown commit c1d8b0825d50e1eb6b6ea2cb9e450637dba9b4e2 Author: Alexandre Belloni Date: Fri Aug 31 13:40:46 2018 +0200 spi: dw-mmio: avoid hardcoded field mask Define a mask for the IF_SI_OWNER field. Signed-off-by: Alexandre Belloni Acked-by: Andy Shevchenko Signed-off-by: Mark Brown commit 24a610eba32a80ed778ea79680b600c3fe73d7de Author: Robert Jarzmik Date: Mon Jun 25 18:44:01 2018 +0200 ARM: dts: pxa: fix the rtc controller The RTC controller is fed by an external fixed 32kHz clock. Yet the driver wants to acquire this clock, even though it doesn't make any use of it, ie. doesn't get the rate to make calculation. Therefore, use the exported 32.768kHz clock in the PXA clock tree to make the driver happy and working. Signed-off-by: Robert Jarzmik commit cbb6a7f52b148dea0fed434b629aedddf7804d14 Author: Alexandre Courbot Date: Mon May 21 04:54:54 2018 -0400 media: Documentation: v4l: document request API Document the request API for V4L2 devices, and amend the documentation of system calls influenced by it. Signed-off-by: Alexandre Courbot Signed-off-by: Hans Verkuil Reviewed-by: Mauro Carvalho Chehab Signed-off-by: Mauro Carvalho Chehab commit d842a7cf938b6e0f8a1aa9f1aec0476c9a599310 Author: Hans Verkuil Date: Wed Aug 15 08:54:43 2018 -0400 media: adv7842: enable reduced fps detection The pixelclock detection of the adv7842 is precise enough to detect if the framerate is 60 Hz or 59.94 Hz (aka "reduced fps"). Implement this detection. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 3ae17c66ed666c5a5c627f28c9e20b2ab8fafe28 Author: Jose Abreu Date: Tue Mar 21 07:49:18 2017 -0400 media: cobalt: Use v4l2_calc_timeperframe helper Currently, cobalt driver always returns 60fps in g_parm. This patch uses the new v4l2_calc_timeperframe helper to calculate the time per frame value. Signed-off-by: Jose Abreu Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 87f9ed85d0f93fcc810dd7081e5f1a883940fab6 Author: Jose Abreu Date: Tue Mar 21 07:49:17 2017 -0400 media: v4l2-dv-timings: Introduce v4l2_calc_timeperframe helper A new helper function was introduced to facilitate the calculation of time per frame value whenever we have access to the full v4l2_dv_timings structure. This should be used only for receivers and only when there is enough accuracy in the measured pixel clock value as well as in the horizontal/vertical values. Signed-off-by: Jose Abreu Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit a64f88874930be944f2c78c7df501d5d1d19becc Author: Jyoti Yadav Date: Fri Aug 31 02:00:23 2018 -0400 drm/i915/intel_csr.c Fix DMC FW Loading issue on ICL. This patch resolves the DMC FW loading issue. Earlier DMC FW package have only one DMC FW for one stepping. But as such there is no such restriction from Package side. For ICL icl_dmc_ver1_07.bin binary package has DMC FW for 2 steppings. So while reading the dmc_offset from package header, for 1st stepping offset used to come 0x0 and was working fine till now. But for second stepping and other steppings, offset is non zero number and is in dwords. So we need to convert into bytes to fetch correct DMC FW from correct place. v2 : Added check for DMC FW max size for various gen. (Imre Deak) v3 : Corrected naming convention for various gen. (Imre Deak) v4 : Initialized max_fw_size to 0 v5 : Corrected DMC FW MAX_SIZE for various gen. (Imre Deak) v6 : Fixed the typo issues. Reviewed-by: Imre Deak Signed-off-by: Jyoti Yadav Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/1535695223-4648-1-git-send-email-jyoti.r.yadav@intel.com commit 2e38b882b9b051d4262c0f5edd4f9063db377edf Merge: 27d91e80d53f 2ed03c835d6f Author: Linus Walleij Date: Fri Aug 31 15:42:33 2018 +0200 Merge tag 'sh-pfc-for-v4.20-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into devel pinctrl: sh-pfc: Updates for v4.20 - Add SATA and audio pin groups on R-Car M3-N, - Add EtherAVB pin groups on RZ/G1C, - Add PWM and display (DU) pin groups on R-Car E3, - Add support for the new RZ/G2M (r8a774a1) SoC. commit f992cee5ef9769f8a804d155e4451980cc96c855 Author: Jose Abreu Date: Tue Mar 21 07:49:16 2017 -0400 media: videodev2.h: Add new DV flag CAN_DETECT_REDUCED_FPS Add a new flag to UAPI for DV timings which, whenever set, indicates that hardware can detect the difference between regular FPS and 1000/1001 FPS. This is specific to HDMI receivers. Also, it is only valid when V4L2_DV_FL_CAN_REDUCE_FPS is set. Signed-off-by: Jose Abreu Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit a125385c9b17de4e555cc2057593ab11da5edc70 Author: Hans Verkuil Date: Wed Aug 15 09:10:59 2018 -0400 media: vidioc-g-dv-timings.rst: document V4L2_DV_FL_CAN_DETECT_REDUCED_FPS Document the new V4L2_DV_FL_CAN_DETECT_REDUCED_FPS flag and update the V4L2_DV_FL_REDUCED_FPS description since it can now also be used with receivers. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit fb98e29ff1ea5a8118265d11f0e03bc8608a49cb Author: Hugues Fruchet Date: Thu Aug 16 05:46:53 2018 -0400 media: ov5640: fix mode change regression fixes: 6949d864776e ("media: ov5640: do not change mode if format or frame interval is unchanged"). Symptom was fuzzy image because of JPEG default format not being changed according to new format selected, fix this. Init sequence initialises format to YUV422 UYVY but sensor->fmt initial value was set to JPEG, fix this. Signed-off-by: Hugues Fruchet Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 1d18c2cd9d38ad639b2e00546b9ee638f2cef4b0 Author: Alexey Khoroshilov Date: Wed Aug 15 16:10:39 2018 -0400 media: ov772x: Disable clk on error path If ov772x_power_on() is unable to get GPIO rstb, the clock is left undisabled. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov Acked-by: Jacopo Mondi Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 1526dbeb54f202e9fa2de660fd18030ebaa99f49 Author: zhong jiang Date: Sat Aug 18 11:16:54 2018 -0400 media: ipu3-cio2: Use dma_zalloc_coherent to replace dma_alloc_coherent + memset dma_zalloc_coherent has implemented the dma_alloc_coherent() + memset(), We prefer to dma_zalloc_coherent instead of open-codeing. Signed-off-by: zhong jiang Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 4d471563d87b2b83e73b8abffb9273950e6d2e36 Author: Sakari Ailus Date: Mon Jul 30 07:44:43 2018 -0400 media: i2c: Fix pm_runtime_get_if_in_use() usage in sensor drivers pm_runtime_get_if_in_use() returns -EINVAL if runtime PM is disabled. This should not be considered an error. Generally the driver has enabled runtime PM already so getting this error due to runtime PM being disabled will not happen. Instead of checking for lesser or equal to zero, check for zero only. Address this for drivers where this pattern exists. This patch has been produced using the following command: $ git grep -l pm_runtime_get_if_in_use -- drivers/media/i2c/ | \ xargs perl -i -pe 's/(pm_runtime_get_if_in_use\(.*\)) \<\= 0/!$1/' Signed-off-by: Sakari Ailus Reviewed-by: Tomasz Figa Signed-off-by: Mauro Carvalho Chehab commit d508fffb92d9b8b9e0951657b2b78cf752ff0b4e Author: Sakari Ailus Date: Fri Jul 20 16:26:44 2018 -0400 media: ov5670, ov13858: Use pm_runtime_idle Replace the calls to pm_runtime_get_noresume() and pm_runtime_put() with pm_runtime_idle() in the driver's probe function. This will have the same effect with fewer calls. pm_runtime_disable() in remove is sufficient as the device is already in RPM_SUSPENDED state. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 361f3803adfea1714de6da0af92854a0ac44a07c Author: Akinobu Mita Date: Mon Jul 16 11:47:50 2018 -0400 media: ov9650: use SCCB regmap Convert ov965x register access to use SCCB regmap. Cc: Mark Brown Cc: Peter Rosin Cc: Sebastian Reichel Cc: Wolfram Sang Cc: Sylwester Nawrocki Cc: Jacopo Mondi Cc: Laurent Pinchart Cc: Hans Verkuil Signed-off-by: Akinobu Mita Acked-by: Wolfram Sang (I2C parts) Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 5bbf32217bf97a58ddda4b27d4f01087fb57d6ba Author: Akinobu Mita Date: Mon Jul 16 11:47:49 2018 -0400 media: ov772x: use SCCB regmap Convert ov772x register access to use SCCB regmap. Cc: Mark Brown Cc: Peter Rosin Cc: Sebastian Reichel Cc: Wolfram Sang Cc: Sylwester Nawrocki Cc: Jacopo Mondi Cc: Laurent Pinchart Cc: Hans Verkuil Signed-off-by: Akinobu Mita Acked-by: Wolfram Sang (I2C parts) Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit be5a1509af8dd8a78fea24a35fe4a82d4cd0ae70 Author: Hans Verkuil Date: Thu Aug 23 04:10:05 2018 -0400 media: vicodec: fix out-of-range values when decoding While decoding you need to make sure you do not get values < 0 or > 255. Note that since this code will also be used in userspace utilities the clamp macro isn't used since that is kernel-only. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit cd12b401adc3cdfa643172f664aa28ecebbd3b67 Author: Hans Verkuil Date: Wed Aug 22 03:50:56 2018 -0400 media: vicodec: split off v4l2 specific parts for the codec Split off the decode and encode functions into a separate source that can be reused elsewhere. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 21abebf06dc97721238b77cf03d0be8c839a3898 Author: Hans Verkuil Date: Tue Aug 21 02:53:34 2018 -0400 media: vicodec: rename and use proper fwht prefix for codec The codec source is generic and not vicodec specific. It can be used by other drivers or userspace as well. So rename the source and header to something more generic (codec-fwht.c/h) and prefix the defines, types and functions with fwht_. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit abe9d19ae3fd50d729cc6668f996ab27da414449 Author: Hans Verkuil Date: Tue Aug 21 03:09:02 2018 -0400 media: vicodec: improve handling of uncompressable planes Exit the loop immediately once it is clear that the plane cannot be compressed. Also clear the PCODED bit and fix the PCODED check (it should check for the bit) in the caller code. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 98efd5525ac092d20ae126936c87c02be0588bdc Author: Hans Verkuil Date: Tue Aug 21 03:00:07 2018 -0400 media: vicodec: simplify blocktype checking Simplify some blocktype/is_intra checks. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 56ba4d03d83869f6cf1a7c63da8588dd54aedb18 Author: Hans Verkuil Date: Tue Aug 21 02:58:10 2018 -0400 media: vicodec: simplify flags handling The flags field can be removed from struct vicodec_q_data. This simplifies the flags handling elsewhere. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 29a7a5e99080fead74d5172053b2f22f7004eb93 Author: Hans Verkuil Date: Sun Aug 19 10:58:55 2018 -0400 media: vicodec: add support for more pixel formats Add support for 4:2:2, 4:4:4 and RGB 24/32 bits formats. This makes it a lot more useful, esp. as a simple video compression codec for use with v4l2-ctl/qvidcap. Note that it does not do any conversion between e.g. 4:2:2 and 4:2:0 or RGB and YUV: it still just compresses planes be they Y/U/V or R/G/B. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 48568b0c30c28e0a5daf56ba36278f68f10f8f29 Author: Hans Verkuil Date: Sun Aug 19 10:18:11 2018 -0400 media: vicodec: add QP controls Instead of hardcoding the quantization parameter (or 'DEADZONE_WIDTH' as it was called in the codec) make this configurable through two controls: one for I frames, one for P frames. Also allow changing these parameters and the GOP_SIZE parameter while streaming. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 5fcb457ac2fdc62c5ff6d3962c958b1301bc5ea1 Author: Peter Ujfalusi Date: Fri Aug 31 11:24:56 2018 +0300 ASoC: davinci-mcasp: Add support for FIFO usage caused delay reporting McASP have write and read FIFO, each 64 words deep. From the WFIFOS/RFIFOS registers we can read the amount of data currently in the FIFO which can be directly reported as delay. Signed-off-by: Peter Ujfalusi Signed-off-by: Mark Brown commit 27d91e80d53f5b9343b53fb5441d1c8816d6b3d9 Author: Igor Stoppa Date: Fri Aug 31 01:34:25 2018 +0300 pinctrl: remove unnecessary unlikely() WARN_ON() already contains an unlikely(), so it's not necessary to wrap it into another. Signed-off-by: Igor Stoppa Cc: Andrew Jeffery Cc: Linus Walleij Signed-off-by: Linus Walleij commit f1ff4b84176319f129fc09b0176f87095c644052 Author: Andy Shevchenko Date: Thu Aug 30 19:49:35 2018 +0300 MAINTAINERS: Add myself as designated reviewer of Intel PMIC GPIO There are few Intel PMIC GPIO device drivers which I would like to review. Note, Intel MSIC is old system controller that based mostly on PMIC integrated in it. Thus, I included it as well. Signed-off-by: Andy Shevchenko Signed-off-by: Linus Walleij commit ae4610873fab504e1be0993a0c69d196cca61fd9 Author: Andy Shevchenko Date: Thu Aug 30 19:27:51 2018 +0300 pinctrl: lewisburg: Define PM ops via INTEL_PINCTRL_PM_OPS() Instead of open coding same structure definition for PM operations, replace it with a common macro. No functional change intended. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg Signed-off-by: Linus Walleij commit 558b34ba10e2520eb13a9c1c6b0c25f6c7b7b706 Author: Andy Shevchenko Date: Thu Aug 30 19:27:50 2018 +0300 pinctrl: sunrisepoint: Define PM ops via INTEL_PINCTRL_PM_OPS() Instead of open coding same structure definition for PM operations, replace it with a common macro. No functional change intended. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg Signed-off-by: Linus Walleij commit 4ee73414a4a151880d919b0fe1962d8d21ebe699 Author: Andy Shevchenko Date: Thu Aug 30 19:27:49 2018 +0300 pinctrl: icelake: Define PM ops via INTEL_PINCTRL_PM_OPS() Instead of open coding same structure definition for PM operations, replace it with a common macro. No functional change intended. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg Signed-off-by: Linus Walleij commit 6016b099c343fa52053a0c95483355dec66abd83 Author: Andy Shevchenko Date: Thu Aug 30 19:27:48 2018 +0300 pinctrl: geminilake: Define PM ops via INTEL_PINCTRL_PM_OPS() Instead of open coding same structure definition for PM operations, replace it with a common macro. No functional change intended. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg Signed-off-by: Linus Walleij commit c804d8ae2083bc207c002f323fb7bd69bd45cbaf Author: Andy Shevchenko Date: Thu Aug 30 19:27:47 2018 +0300 pinctrl: denverton: Define PM ops via INTEL_PINCTRL_PM_OPS() Instead of open coding same structure definition for PM operations, replace it with a common macro. No functional change intended. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg Signed-off-by: Linus Walleij commit b417748c0fa26353c0ed67cf110f2d12a7e1630d Author: Andy Shevchenko Date: Thu Aug 30 19:27:46 2018 +0300 pinctrl: cedarfork: Define PM ops via INTEL_PINCTRL_PM_OPS() Instead of open coding same structure definition for PM operations, replace it with a common macro. No functional change intended. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg Signed-off-by: Linus Walleij commit 05a100e4ac7d338121351eb8673b5d93f0317322 Author: Andy Shevchenko Date: Thu Aug 30 19:27:45 2018 +0300 pinctrl: cannonlake: Define PM ops via INTEL_PINCTRL_PM_OPS() Instead of open coding same structure definition for PM operations, replace it with a common macro. No functional change intended. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg Signed-off-by: Linus Walleij commit 5689d6aaea248d3e5742292baccb9498d91257ee Author: Andy Shevchenko Date: Thu Aug 30 19:27:44 2018 +0300 pinctrl: broxton: Define PM ops via INTEL_PINCTRL_PM_OPS() Instead of open coding same structure definition for PM operations, replace it with a common macro. No functional change intended. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg Signed-off-by: Linus Walleij commit 6d7c05faaf01a082fa2458ff615d8373d876905c Author: Andy Shevchenko Date: Thu Aug 30 19:27:43 2018 +0300 pinctrl: intel: Introduce common macro for PM operations This common macro will simplify the code of pin control drivers for Intel SoCs. Suggested-by: Mika Westerberg Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg Signed-off-by: Linus Walleij commit 0c03e92e7d665b01afbddf057b2cc07587ffc2cc Author: Andy Shevchenko Date: Thu Aug 30 19:27:42 2018 +0300 pinctrl: sunrisepoint: Convert to use intel_pinctrl_probe_by_hid() Get rid of code duplication by converting to use intel_pinctrl_probe_by_hid(). No functional change intended. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg Signed-off-by: Linus Walleij commit c98a96672b106b2563cebf1b8137c51f41b808ae Author: Andy Shevchenko Date: Thu Aug 30 19:27:41 2018 +0300 pinctrl: cannonlake: Convert to use intel_pinctrl_probe_by_hid() Get rid of code duplication by converting to use intel_pinctrl_probe_by_hid(). No functional change intended. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg Signed-off-by: Linus Walleij commit 70c263c42c385c8116cc9728defb337081f9da54 Author: Andy Shevchenko Date: Thu Aug 30 19:27:40 2018 +0300 pinctrl: intel: Introduce intel_pinctrl_probe_by_hid() internal API Introduce intel_pinctrl_probe_by_hid() internal API to simplify drivers, which are using ACPI _HID to distinguish which SoC data needs to be used when being probed. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg Signed-off-by: Linus Walleij commit 61db6c9db384f5d35960ab1a24998129fa3ff091 Author: Andy Shevchenko Date: Thu Aug 30 19:27:39 2018 +0300 pinctrl: baytrail: Convert to use device_get_match_data() Get rid of code duplication by converting to use device_get_match_data(). No functional change intended. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg Signed-off-by: Linus Walleij commit 79b7d19ebaf6ca2e60826cbdd4c5a0f0a414694c Author: Andy Shevchenko Date: Thu Aug 30 19:27:38 2018 +0300 pinctrl: geminilake: Convert to use intel_pinctrl_probe_by_uid() Get rid of code duplication by converting to use intel_pinctrl_probe_by_uid(). No functional change intended. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg Signed-off-by: Linus Walleij commit 99d9806f8552d98fcd3c51657f17e7f30970e207 Author: Andy Shevchenko Date: Thu Aug 30 19:27:37 2018 +0300 pinctrl: broxton: Convert to use intel_pinctrl_probe_by_uid() Get rid of code duplication by converting to use intel_pinctrl_probe_by_uid(). No functional change intended. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg Signed-off-by: Linus Walleij commit 924cf800574ffd53469d245637607a8b0768ad69 Author: Andy Shevchenko Date: Thu Aug 30 19:27:36 2018 +0300 pinctrl: intel: Introduce intel_pinctrl_probe_by_uid() internal API Introduce intel_pinctrl_probe_by_uid() internal API to simplify drivers, which are using ACPI _UID to distinguish which SoC data needs to be used when being probed. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg Signed-off-by: Linus Walleij commit 3f51b7e1f36a37cfc6ed281a231485e4e6b511c3 Author: Chris Wilson Date: Thu Aug 30 14:48:06 2018 +0100 drm/i915/selftests: Add a simple exerciser for suspend/hibernate Although we cannot do a full system-level test of suspend/hibernate from deep with the kernel selftests, we can exercise the GEM subsystem in isolation and simulate the external effects (such as losing stolen contents and trashing the register state). v2: Don't forget to hold rpm v3: Suspend the GTT mappings, and more rpm! References: https://bugs.freedesktop.org/show_bug.cgi?id=96526 References: 5ab57c702069 ("drm/i915: Flush logical context image out to memory upon suspend") Signed-off-by: Chris Wilson Cc: Jakub Bartmiński Cc: Matthew Auld Cc: Joonas Lahtinen Reviewed-by: Jakub Bartmiński Link: https://patchwork.freedesktop.org/patch/msgid/20180830134806.21939-1-chris@chris-wilson.co.uk commit de96bc39951f106a074d5ee1db927ad8abbfe7fe Author: YueHaibing Date: Fri Aug 31 02:15:39 2018 +0000 rtc: mrst: remove set but not used variable 'valid' Fixes gcc '-Wunused-but-set-variable' warning: drivers/rtc/rtc-mrst.c: In function 'mrst_procfs': drivers/rtc/rtc-mrst.c:264:29: warning: variable 'valid' set but not used [-Wunused-but-set-variable] unsigned char rtc_control, valid; Signed-off-by: YueHaibing Signed-off-by: Alexandre Belloni commit ab27926d9e4ae23df4f4d98e31f067c8b486bb4f Author: Luca Coelho Date: Wed Aug 15 22:07:25 2018 +0300 iwlwifi: fix devices with PCI Device ID 0x34F0 and 11ac RF modules The devices with PCI device ID 0x34F0 are part of the SoC and can be combined with some different external RF modules. The configuration for these devices should reflect that, but are currently mixed up. To avoid confusion with discrete devices, add part of the firmware to be used and the official name of the device to the cfg structs. This is least reorganization possible (without messing things even more) that could be done as a bugfix for this SoC. Further reorganization of this code will be done separately. Signed-off-by: Luca Coelho commit ea7c2bfdec6d57cf8b7e60c745cf4d651bad68f0 Author: Johannes Berg Date: Thu May 17 16:02:36 2018 +0200 Revert "iwlwifi: allow memory debug TLV to specify the memory type" This reverts the addition of memory type in the memory debug TLV as the firmware never ended up implementing it, and now the PRPH dump is added as a different TLV. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho commit 930ab73c3759b8848c97749f34c6748ca5cf0e4c Author: Ayala Beker Date: Tue May 1 14:40:03 2018 +0300 iwlwifi: mvm: activate fragmented EBS in case of fragmented scan In case of fragmented scan on the HB channels, configure EBS to be fragmented as well. Signed-off-by: Ayala Beker Signed-off-by: Luca Coelho commit 1169310fa9a8d8a1fc94e406643444cac30ad8b1 Author: Golan Ben Ami Date: Tue Apr 3 18:37:51 2018 +0300 iwlwifi: refactor txq_alloc for supporting more command type Support more txq_alloc command types by moving the command declaration to the gen specific area. While at it, move some of the code segments to a common place for re-use. Signed-off-by: Golan Ben Ami Signed-off-by: Luca Coelho commit 764f9de5027149518b1633e5846b21b9fb882363 Author: Johannes Berg Date: Wed May 9 11:53:04 2018 +0200 iwlwifi: mvm: decode HE TB PPDU data Decode the HE TB PPDU data that we get in sniffer mode and use it to populate the HE radiotap information. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho commit 423584dd8060a6d7e1b2fb71ad11025a64aa0bec Author: Naftali Goldstein Date: Tue May 1 14:40:44 2018 +0300 iwlwifi: rs-fw: support dcm Add flags to the tlc_cfg_cmd for signaling peer support for receiving Dual Carrier Modulation at BPSK (MCS 0), and set them according to peer capabilities. Signed-off-by: Naftali Goldstein Signed-off-by: Luca Coelho commit 3e467b8e4cf4d56244f92b1fb26a25e405e7d3aa Author: Naftali Goldstein Date: Tue May 1 14:36:23 2018 +0300 iwlwifi: rs-fw: enable STBC in he correctly In the HE phy capabilities IE there are 2 bits to signal support for STBC in bandwidths of 80Mhz or less, and of 160Mhz. Use these bits to determine STBC support if this IE exists. Signed-off-by: Naftali Goldstein Signed-off-by: Luca Coelho commit ae17404e38601856036836a8082ad57102dd097e Author: Shahar S Matityahu Date: Thu May 3 09:52:12 2018 +0300 iwlwifi: avoid code duplication in stopping fw debug data recording Make all FW debug data stop recording flows to use iwl_fw_dbg_stop_recording function instead of writing to FW registers directly. Signed-off-by: Shahar S Matityahu Signed-off-by: Luca Coelho commit c5f97542aa06bd6ef34a87f0c8bcb924899cf861 Author: Shahar S Matityahu Date: Thu May 3 09:41:11 2018 +0300 iwlwifi: change monitor DMA to be coherent Allow access to the memory by the host and the device simultaneously. This will be needed in some future patches. Signed-off-by: Shahar S Matityahu Signed-off-by: Luca Coelho commit 2859de7637b541dc7191f4d3fce4a1adba80fb3e Author: Naftali Goldstein Date: Thu May 10 20:32:36 2018 +0300 iwlwifi: mvm: always init rs_fw with 20MHz bandwidth rates As with the non-offloaded rs case, during assoc on the ap side the phy context is set to 20MHz until authorization of a client that supports wider channel-widths. Support this by sending the initial tlc_config_cmd with max supported channel width of 20MHz until authorization succeeds. Fixes: 6b7a5aea71b3 ("iwlwifi: mvm: always init rs with 20mhz bandwidth rates") Signed-off-by: Naftali Goldstein Signed-off-by: Luca Coelho commit 65c3b582ecab7a403efdf08babbf87fdbe27369c Author: Emmanuel Grumbach Date: Mon May 7 16:46:35 2018 +0300 iwlwifi: mvm: send BCAST management frames to the right station Probe responses were sent to the multicast station while they should be routed to the broadcast station. This has no negative effect since the frame was still routed to the right queue, but it looked very fishy to send a frame to a (queue, station) tuple where 'queue' is not mapped to 'station'. Fixes: 7c305de2b954 ("iwlwifi: mvm: Direct multicast frames to the correct station") Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho commit 06c34dee07c7de4f679267321c914db4b3c2a56f Author: Ido Yariv Date: Mon Apr 30 21:21:19 2018 -0400 iwlwifi: Add missing 11n disable module parameter check In the new method of parsing the NVM the disable_11n module parameter isn't consulted when setting up HT capabilities. Fix this. Signed-off-by: Ido Yariv Signed-off-by: Luca Coelho commit 317bc55fa82fbb7f1fe20170e50e0553af1bd69c Author: Johannes Berg Date: Thu May 3 13:35:08 2018 +0200 iwlwifi: mvm: remove channel 2 from HE radiotap if not applicable If the bandwidth is only 20 MHz, then the second channel doesn't exist, but the hardware reports the CRC was OK. Suppress the data of the second channel in the HE radiotap in this case, by marking it as not known. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho commit 925bc2b189ec05a2993d3870f4c9c7edaf60d088 Author: Johannes Berg Date: Thu May 3 12:52:16 2018 +0200 iwlwifi: mvm: report # of LTF symbols for extended range SU PPDUs This is the same as for SU PPDUs, so it's easy to do. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho commit 93cc712a7993194c5682978d46f859b8d288ed53 Author: Johannes Berg Date: Wed May 2 22:53:34 2018 +0200 iwlwifi: mvm: properly decode HE GI duration The GI duration depends on the frame type in some cases, take that into account when decoding for radiotap. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho commit de8da23060843b07ad291ad3bdea173b58d86a3d Author: Johannes Berg Date: Wed May 2 11:20:00 2018 +0200 iwlwifi: mvm: put LTF symbol size into HE radiotap I evidently completely confused "number of LTF symbols" and "LTF size". Radiotap was reporting the former, while I thought it was the latter, and we really need both. Add the LTF symbol size into the newly defined field in radiotap. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho commit dabf9844385885e50c05a08ebc312d46017eb261 Author: Johannes Berg Date: Thu Apr 26 13:14:26 2018 +0200 iwlwifi: mvm: implement extended HE-MU sniffer API Implement the extended HE-MU info type decoding to show the HE-SIG-B common contents in the HE-MU radiotap field. The DW4 data is partially overwritten by the hardware in all cases, so only the higher 16 bits can be used. To be able to use it for the HE SIG-B common data anyway, move the bits around in the following way: SIG-B common 0: DW 4 -> DW 7 SIG-B common 1: DW 7 -> DW 8 SIG-B common 2: DW 8 -> DW 4 (upper half) Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho commit 754f890a3aef8211903d314cd9e1fbebe30283cc Author: Luca Coelho Date: Fri Aug 24 10:50:45 2018 +0300 iwlwifi: remove all occurrences of the FSF address paragraph The Free Software Foundation address is superfluous and causes checkpatch to issue a warning when present. Remove all paragraphs with FSF's address to prevent that. Signed-off-by: Luca Coelho commit e506b481642a9e8d71e82f0facd250a917f24aa1 Author: Sara Sharon Date: Mon Apr 23 09:38:41 2018 +0300 iwlwifi: pcie: set interrupt coalescing also for gen2 We offloaded all the RX configuration of init to firmware. However, the configuration of interrupt coalescing was left hanging - it wasn't offloaded nor was it written by host. This write to the CSR is allowed in gen2, so the host can do it. Without it we have various issues with RX fullness. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho commit 3baf7528d6f832b28622d1ddadd2e47f6c2b5e08 Author: Avraham Stern Date: Thu May 3 15:02:16 2018 +0300 iwlwifi: mvm: Send LQ command as async when necessary The parameter that indicated whether the LQ command should be sent as sync or async was removed, causing the LQ command to be sent as sync from interrupt context (e.g. from the RX path). This resulted in a kernel warning: "scheduling while atomic" and failing to send the LQ command, which ultimately leads to a queue hang. Fix it by adding back the required parameter to send the command as sync only when it is allowed. Fixes: d94c5a820d10 ("iwlwifi: mvm: open BA session only when sta is authorized") Signed-off-by: Avraham Stern Signed-off-by: Luca Coelho commit 1a19c139be18ed4d6d681049cc48586fae070120 Author: Sara Sharon Date: Tue May 1 15:12:08 2018 +0300 iwlwifi: mvm: avoid sending too many BARs When we receive TX response, we may release a few packets due to a hole that was closed in the transmission window. However, if that frame failed, we will mark all the released frames as failed and will send multiple BARs. This affects statistics badly, and cause unnecessary frames transmission. Instead, mark all the following packets as success, with the desired result of sending a bar for the failed frame only. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho commit 941ab4eb66c10bc5c7234e83a7a858b2806ed151 Author: Sara Sharon Date: Tue May 1 14:54:22 2018 +0300 iwlwifi: mvm: fix BAR seq ctrl reporting There is a bug in FW where the sequence control may be incorrect, and the driver overrides it with the value of the ieee80211 header. However, in BAR there is no sequence control in the header, which result with arbitrary sequence. This access to an unknown location is bad and it makes the logs very confusing - so fix it. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho commit f60c9e591b058af18b45f8e222d7b40cf3c001cb Author: Emmanuel Grumbach Date: Tue May 1 14:23:56 2018 +0300 iwlwifi: improve the flow when a NIC is disconnected When the NIC is disconnected, we just can't do anything besides seeking for help from the bus driver. Dumping the device's memory is not necessary and just bloats the logs with unusable data. Moreover, asking mac80211 to restart the hardware is also useless. Bypass all this. Also, use the STATUS_TRANS_DEAD status bit instead of a bool inside the transport layer. The advantage of this is that now, the transport and the op_mode can know what is the situation and bypass the useless recovery steps mentioned above. Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho commit 50f067b35684dbc5dfe81683c6e381e8eb7da3fb Author: Erel Geron Date: Mon Apr 23 11:43:02 2018 +0300 iwlwifi: mvm: support Coex Schema 2 The new coex schema requires moving to SISO only when BT AG is 4. Adjust the SISO criteria according to the coex schema version reported by firmware. Signed-off-by: Erel Geron Signed-off-by: Luca Coelho commit 2b3fae668c66b21d42583583619fa1ba23bd2885 Author: Matt Chen Date: Thu Apr 19 15:18:00 2018 +0800 iwlwifi: pcie: avoid unnecessary work if NIC is disconnected When the NIC is disconnected from PCI bus, we are not able to access it anymore. Check the status to avoid some unnecessary work so can improve the performance. It will help to make PCI bus rescan to bring back the device much faster. The real test is able to improve 7 seconds. [w/o patch] It takes around 9 seconds .. 2018-04-20T01:22:39.691929-07:00 WARNING kernel: [ 66.335881] Timeout waiting for hardware access (CSR_GP_CNTRL 0xffffffff) .. 2018-04-20T01:22:48.101094-07:00 INFO kernel: [ 74.747364] iwlwifi 0000:01:00.0: loaded firmware version 29.610311.0 op_mode iwlmvm [w/a patch] It takes about 2 seconds. .. 2018-04-20T01:18:16.454087-07:00 WARNING kernel: [ 75.966860] Timeout waiting for hardware access (CSR_GP_CNTRL 0xffffffff) .. 2018-04-20T01:18:18.602717-07:00 INFO kernel: [ 78.116132] iwlwifi 0000:01:00.0: loaded firmware version 29.610311.0 op_mode iwlmvm .. Fixes: 49564a806fc5 ("iwlwifi: pcie: remove non-responsive device") Signed-off-by: Matt Chen Signed-off-by: Luca Coelho commit 84f260251ed8153e84c64eb2c5278ab18d3ddef6 Author: Johannes Berg Date: Thu Apr 19 10:57:08 2018 +0200 iwlwifi: don't WARN on trying to dump dead firmware There's no point in warning here, the user will just get an error back to the debugfs file write, and warning just makes it seem like there's an internal consistency problem when in reality the user just happened to hit this at a bad time. Remove the warning. Fixes: f45f979dc208 ("iwlwifi: mvm: disable dbg data collect when fw isn't alive") Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho commit 38bd7e58cf414d364df8c024314e2db0ce083918 Author: Mordechay Goodstein Date: Tue Apr 10 18:19:49 2018 +0300 iwlwifi: add 80211 hdr offset to trace data Every rx mpdu cmd is built from cmd_hdr | 80211_hdr. The problem is that the size of cmd_hdr changes with API changes and we don't know where the 80211_hdr starts. By adding the size of cmd_hdr dynamically, we can ensure that we always know how to parse mpdu frames, without dependending on the API changes. Signed-off-by: Mordechay Goodstein Signed-off-by: Luca Coelho commit b6fe27575a041267347d5b6cbc4447b4be049de3 Author: Golan Ben Ami Date: Thu Mar 22 14:57:11 2018 +0200 iwlwifi: pcie: make gen2 of apm_init non-static This will allow using the same init in future generations. Signed-off-by: Golan Ben Ami Signed-off-by: Luca Coelho commit 9416560e41537a3f3be19b7ae757e517991900cd Author: Golan Ben Ami Date: Sun Mar 25 11:28:33 2018 +0300 iwlwifi: pcie: store the default rxq number Store the default rxq number in a variable, so we won't need to use the actual number in the code. Signed-off-by: Golan Ben Ami Signed-off-by: Luca Coelho commit 0791c2fce3c8b719db14c57fe3fac689743cd399 Author: Haim Dreyfuss Date: Thu Mar 29 14:13:54 2018 +0300 iwlwifi: mvm: support new reduce tx power FW API. Update reduce tx power command API to be compatible with new FW API. Signed-off-by: Haim Dreyfuss Signed-off-by: Luca Coelho commit 4c2f445c0f49bfd9d28f31df3919e5d88ecff6c6 Author: Ayala Beker Date: Thu Mar 8 12:20:46 2018 +0200 iwlwifi: mvm: skip EBS in low latency mode while fragmented scan isn't supported While associated in low latency mode, or when traffic load is high, don't enable EBS in scan request if fragmented EBS is not supported by the FW. Signed-off-by: Ayala Beker Signed-off-by: Luca Coelho commit 33bdccb71aa697c0e2051fe5dd03c7b291bfef7e Author: Golan Ben Ami Date: Wed Apr 4 08:56:05 2018 +0300 iwlwifi: remove FSF's address from the license notice The Free Software Foundation's address shouldn't be in the license notice anymore, and some of our check scripts complain about it (via checkpatch.pl). Remove the address to silence it. Signed-off-by: Golan Ben Ami Signed-off-by: Luca Coelho commit 4290eaad7a8a7168c8f675d54503d7203b2db5ea Author: Johannes Berg Date: Wed Apr 11 16:17:00 2018 +0200 iwlwifi: remove dump_regs() from transport ops This is used only within PCIe, and there's no reason to go through the transport methods for a function call within PCIe itself. Remove the dump_regs() method and call the function directly. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho commit 89d5e833534bfdbcf2d25f93c780883f530847c9 Author: Golan Ben Ami Date: Sun Mar 25 09:57:08 2018 +0300 iwlwifi: pcie: make non-static hcmd and rx code Allow other device generations to use the utilities that are used to send and reclaim host commands and to allocate rx, by making it non-static. Signed-off-by: Golan Ben Ami Signed-off-by: Luca Coelho commit 9b3089bd820d16c9bc27acbd0a68a575e1df9290 Author: Golan Ben Ami Date: Sun Mar 25 16:57:42 2018 +0300 iwlwifi: pcie: allow using tx init for other queues but the command queue We would like to allow using tx init code for other queues but the command queue - for newer devices. Signed-off-by: Golan Ben Ami Signed-off-by: Luca Coelho commit 7891965d74bc48fb42b5068033192f97c9aa2090 Author: Sara Sharon Date: Mon Apr 9 14:00:27 2018 +0300 iwlwifi: drop packets with bad status in CD We need to drop packets with errors (such as replay, MIC, ICV, conversion, duplicate and so on). Drop invalid packets, put the status bits in the metadata and move the enum definition to the correct place (FW API header). Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho commit 75e9947ea42de92ab330a9761bc6f5862720260d Author: Mordechay Goodstein Date: Mon Apr 9 15:52:16 2018 +0300 iwlwifi: enable reading the value of delay in timestamp_marker cmd The user can validate what was written to the file by reading it, and check what is the default value before changing it. Signed-off-by: Mordechay Goodstein Signed-off-by: Luca Coelho commit 4799ea53a57854b0b35f73703d9bfabf15bfd4f7 Author: Sara Sharon Date: Mon Apr 9 11:20:09 2018 +0300 iwlwifi: mvm: move he RX handling to a separate function The HE code is bloating the RX handling, and makes it too big. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho commit c630b477caf78998cdcd5766956817d8721c23c9 Author: Sara Sharon Date: Mon Apr 9 11:20:09 2018 +0300 iwlwifi: mvm: move he RX handling to a separate function The HE code is bloating the RX handling, and makes it too big. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho commit 621f3f57050a71b05411f3665ef6b105a25af672 Author: Liad Kaufman Date: Sun Apr 1 17:35:43 2018 +0300 iwlwifi: mvm: add support for RX_AMPDU_EOF bit for HE SU Current implementation turns this bit on only for HE MU. Signed-off-by: Liad Kaufman Signed-off-by: Luca Coelho commit bd6fc6552b053fcb7bef8c1665adb8011d2b7eaa Author: Liad Kaufman Date: Sun Mar 4 14:21:49 2018 +0200 iwlwifi: mvm: add bss color to radiotap Add BSS color to the HE radiotap. Signed-off-by: Liad Kaufman Signed-off-by: Luca Coelho commit 7d2bcc22cd16dd3997df2c8417a2cd31b79c3bae Author: Golan Ben Ami Date: Tue Apr 3 16:39:18 2018 +0300 iwlwifi: add required include to iwl-fh.h Some variables are used in iwl-fh.h, but their type's definition isn't included. This may break compilation when using the file without including the necessary dependencies first. Add the required include to iwl-fh.h. Signed-off-by: Golan Ben Ami Signed-off-by: Luca Coelho commit 86e177d80ff7b127138e69e03a3ba7a4c090f57b Author: Gregory Greenman Date: Mon Jan 22 07:38:12 2018 +0200 iwlwifi: mvm: add NOA and CSA to a probe response A probe response built by a P2P GO should contain: 1. CSA/eCSA IE when relevant 2. If the corresponding probe request had P2P IE, then need to add P2P IE with NOA attributes. However, the NOA attributes and the updated channel switch counter are known only to the FW. The solution is that FW will send a notification with the relevant probe response data and the driver will save it and update the probe response accordingly. Signed-off-by: Gregory Greenman Signed-off-by: Luca Coelho commit 2afa6a7311f5727c5a3984419d11b863cae69712 Author: Luca Coelho Date: Mon Mar 26 10:24:18 2018 +0300 iwlwifi: mvm: support new WoWLAN status FW API A new FW API has been added for WOWLAN_GET_STATUSES to support multiple GTK keys and IGTK keys. Check the respective TLV and use the new API when it is set. Let most of the code use the new version (v7) and convert the old version (v6) to the new one when needed. Also refactor some functions a bit so that they can be reused more easily. Particularly the part that calls WOWLAN_GET_STATUSES which is reused in D3 and D0i3. Signed-off-by: Luca Coelho commit a75b9b333aeb045fdb7f610b85f8b5305a2d706d Author: Luca Coelho Date: Tue Aug 21 07:24:18 2018 +0300 iwlwifi: mvm: protect D0i3 code behind CONFIG_PM Runtime PM can only be used if CONFIG_PM is set. Move all the d0i3 code (which is essentially runtime PM) behind the CONFIG_PM flag. This prevents undefined usage of some functions when CONFIG_PM is not defined. Signed-off-by: Luca Coelho commit 11a0513cac8afb0c78280a10db72bcd671a8841f Author: Luca Coelho Date: Tue Feb 27 16:37:56 2018 +0200 iwlwifi: mvm: remove duplicate if in iwl_mvm_setup_connection_keep() We repeated the same if twice in a row. Remove the second one and move the code block into the previous one. Signed-off-by: Luca Coelho commit 2d8c261511abfebd705d2163500d6b3049f0dec6 Author: Shahar S Matityahu Date: Mon Jan 29 11:05:37 2018 +0200 iwlwifi: add d3 debug data support During d3, the firmware records debug data into internal buffer if debug data collection occurs, collect the data that was written to the buffer Signed-off-by: Shahar S Matityahu Signed-off-by: Luca Coelho commit 2210f6959dfa754d2a191f3db6ac7592d1bebc9c Author: Avraham Stern Date: Tue Mar 20 17:05:06 2018 +0200 iwlwifi: set the tid for non-QOS frames to zero The tid for Non-QOS frames is set to IWL_MAX_TID_COUNT. This value is also used for configuring the queue for non-QOS data. However, this tid is used by the FW for management queues. As a result, the FW does not encrypt non-QOS data frames. Fix this by setting the tid for non-QOS data frames to zero, which is a valid value for data frames in the FW. This also fixes a bug in sending multicast frames, where the queues are allocated with tid == 0, but are sent with tid == 8, which may lead to unexpected behavior. Signed-off-by: Avraham Stern Signed-off-by: Luca Coelho commit dd2690579f5138e569440e5252e93d8634593190 Author: Naftali Goldstein Date: Tue Mar 13 20:00:35 2018 +0200 iwlwifi: runtime: avoid calling debugfs read functions more than once Upon first calling read() on a debugfs file, invoke iwl_dbgfs_##name##_read and store the response buffer on the heap, so subsequent read() calls don't need to invoke said function again. This is done because cat etc will call read() repeatedly until EOF is reached (or read() returns 0), which in the current implementation will cause said function to be invoked multiple times. With the current implementation this can also cause buggy behavior in some weird edge cases where the first invocation returns a string of length n, and the second of length m>n: The last m-n characters of the second invocation will be printed to screen. Signed-off-by: Naftali Goldstein Signed-off-by: Luca Coelho commit fe997b00c5b5953e48e61956ced0e73c84e9d054 Author: Luca Coelho Date: Sat Aug 18 10:16:29 2018 +0300 iwlwifi: remove unused TLC debugging commands The iwl_dhc_tlc_cmd struct is not used, so remove it, including the iwl_tcl_debug_flags enumeration. Signed-off-by: Luca Coelho commit b21e32dc348a6facd178306d9d8151aeb47b1535 Author: Mordechay Goodstein Date: Sun Feb 11 20:34:19 2018 +0200 iwlwifi: turn timestamp marker cmd off by default Don't enable debugging timestamps by default, so we save power by not waking up the FW with timestamp commands. Signed-off-by: Mordechay Goodstein Signed-off-by: Luca Coelho commit b30c862f2a72002c06df23d05c2ca6b49148c4d4 Author: Geert Uytterhoeven Date: Thu Aug 30 17:21:26 2018 +0200 clk: renesas: r8a77990: Add missing I2C7 clock When trying to use I2C7 on R-Car E3: renesas-cpg-mssr e6150000.clock-controller: Cannot get module clock 1003: -2 i2c-rcar e6690000.i2c: failed to add to PM domain always-on: -2 i2c-rcar: probe of e6690000.i2c failed with error -2 Unlike other R-Car Gen3 SoCs, R-Car E3 has more than 7 I2C bus interfaces. Add the forgotten module clock for the 8th instance to fix this. Signed-off-by: Geert Uytterhoeven Reviewed-by: Stephen Boyd commit e86e894751f0420fbe05d834e02a6777c4b4ac3f Author: Hans Verkuil Date: Mon Aug 27 10:08:18 2018 +0200 drm/amdgpu: add DisplayPort CEC-Tunneling-over-AUX support Add DisplayPort CEC-Tunneling-over-AUX support to amdgpu. Signed-off-by: Hans Verkuil Acked-by: Alex Deucher Reviewed-by: Harry Wentland Link: https://patchwork.freedesktop.org/patch/msgid/de9586bb-151e-bae9-b8e3-14db107a60df@xs4all.nl commit 46094b2baeeb5e5fe113243e689a69d56f428ec8 Author: Hans Verkuil Date: Mon Aug 27 10:06:51 2018 +0200 drm/nouveau: add DisplayPort CEC-Tunneling-over-AUX support Add DisplayPort CEC-Tunneling-over-AUX support to nouveau. Signed-off-by: Hans Verkuil Reviewed-by: Lyude Paul Acked-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/5c0b907d-0bf2-7b80-b4b6-cbde78b03f0d@xs4all.nl commit a4c30a4861c54af78c4eb8b7855524c1a96d9f80 Author: Hans Verkuil Date: Mon Aug 27 10:07:42 2018 +0200 drm_dp_mst_topology: fix broken drm_dp_sideband_parse_remote_dpcd_read() When parsing the reply of a DP_REMOTE_DPCD_READ DPCD command the result is wrong due to a missing idx increment. This was never noticed since DP_REMOTE_DPCD_READ is currently not used, but if you enable it, then it is all wrong. Signed-off-by: Hans Verkuil Reviewed-by: Lyude Paul Acked-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/e72ddac2-1dc0-100a-d816-9ac98ac009dd@xs4all.nl commit 9bcf6d9868ae95fc7e5eda3dae5200f234ea5623 Author: Hans Verkuil Date: Mon Aug 27 09:58:17 2018 +0200 drm_dp_cec: add note about good MegaChips 2900 CEC support A big problem with DP CEC-Tunneling-over-AUX is that it is tricky to find adapters with a chipset that supports this AND where the manufacturer actually connected the HDMI CEC line to the chipset. Add a mention of the MegaChips 2900 chipset which seems to support this feature well. Signed-off-by: Hans Verkuil Reviewed-by: Lyude Paul Acked-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20180827075820.41109-3-hverkuil@xs4all.nl commit 5ce70c799ac22c142061c71aaeae518f04283472 Author: Hans Verkuil Date: Mon Aug 27 09:58:16 2018 +0200 drm_dp_cec: check that aux has a transfer function If aux->transfer == NULL, then just return without doing anything. In that case the function is likely called for a non-(e)DP connector. This never happened for the i915 driver, but the nouveau and amdgpu drivers need this check. The alternative would be to add this check in those drivers before every drm_dp_cec call, but it makes sense to check it in the drm_dp_cec functions to prevent a kernel oops. Signed-off-by: Hans Verkuil Reviewed-by: Lyude Paul Acked-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20180827075820.41109-2-hverkuil@xs4all.nl commit 4a477651033e48851386d12e773584c99a878670 Author: Chris Wilson Date: Fri Aug 17 09:24:05 2018 +0100 drm/i915: Keep physical cursors pinned while in use The optimisation inherent in commit 6a2c4232ece1 ("drm/i915: Make the physical object coherent with GTT") relies on that once we allocated a cursor we would have coherent, zero overhead access to the scanout plane holding the cursor. That is we could then do the very frequent cursor updates X enjoys with no indirection or kernel involvement. However, that all hinges on the GGTT mmap of the cursor being pinned and not require refaulting on each access -- handling such a page fault likely requires the busy GGTT to be rearranged causing a stall. A very simple fix is then to handle the physical cursor exactly like other cursors and keep its vma pinned while active. References: https://bugs.freedesktop.org/show_bug.cgi?id=107600 References: 6a2c4232ece1 ("drm/i915: Make the physical object coherent with GTT") Signed-off-by: Chris Wilson Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180817082405.755-1-chris@chris-wilson.co.uk commit c14d28e86d3c70720622e1d517968c1721f23214 Author: Urja Rannikko Date: Tue Aug 28 18:55:07 2018 +0000 clk: rockchip: improve rk3288 pll rates for better hdmi output Add and correct PLL rates for better hdmi output. This includes minimizing jitter on 213 MHz for better 71 MHz, 250.5 MHz for better 83.5 MHz, 428 MHz for better 25.175 Mhz, low jitter 273 MHz for better 68.25 mhz, 356 MHz for better 118.68 Mhz and 300MHz. Increase the used Fvco for 308, 324 MHz, 292.5 MHz, 273.6 MHz, 238 MHz and 216 MHz. And add some additional rates allowing to reach better hdmi-related rates in general. These match the rates used by ChromeOS, so have been quite widely tested. Signed-off-by: Urja Rannikko Signed-off-by: Heiko Stuebner commit 58c116fb7dc6703a557fe79c6e6ebab1450082b3 Author: Руслан Исаев Date: Wed Aug 22 13:53:46 2018 +0300 m68k/sun3: Remove is_medusa and m68k_pgtable_cachemode Did TODO to clean the kernel code a bit. Signed-off-by: Ruslan Isaev Signed-off-by: Geert Uytterhoeven commit aee94ee873d71d706928b8550dc8ef0c9ca6722d Author: Robert P. J. Day Date: Sat Aug 11 05:57:26 2018 -0400 m68k/atari: ARAnyM - Remove reference to long-deprecated MODULE_PARM Given that MODULE_PARM was deprecated years ago, and this is only a comment, get rid of this reference to further the goal of deleting every remaining reference in the entire kernel code base. Signed-off-by: Robert P. J. Day Signed-off-by: Geert Uytterhoeven commit a7eb26392b893bff92b1eb6483f4af3d2eb19510 Author: Stefan Wahren Date: Mon Aug 27 19:33:28 2018 +0200 arm64: dts: broadcom: Add reference to Compute Module IO Board V3 This adds a reference to the dts of the Compute Module IO Board V3 in arm, so we don't need to maintain the content in arm64. Signed-off-by: Stefan Wahren commit 1adb0a9faabb44cd76c668f12d8b51de869c38b5 Author: Colin Ian King Date: Mon Aug 6 14:44:02 2018 +0100 clk: mediatek: remove unused array audio_parents Array audio_parents is declared but never used, hence it is redundant and can be removed. Cleans up clang warning: warning: 'audio_parents' defined but not used [-Wunused-const-variable=] Signed-off-by: Colin Ian King Signed-off-by: Stephen Boyd commit 78412c262004be21d1104ffad3232bb1c2e14a25 Author: Amit Nischal Date: Wed Aug 8 16:17:19 2018 +0530 clk: qcom: Add camera clock controller driver for SDM845 Add support for the camera clock controller found on SDM845 based devices. This would allow camera drivers to probe and control their clocks. Signed-off-by: Amit Nischal Signed-off-by: Stephen Boyd commit f40c467523cb5dd352e669a8bab2411b31db089e Author: Amit Nischal Date: Mon Jul 23 16:56:32 2018 +0530 dt-bindings: clock: Introduce QCOM Camera clock bindings Add device tree bindings for camera clock controller for Qualcomm Technology Inc's SDM845 SoCs. Signed-off-by: Amit Nischal Signed-off-by: Stephen Boyd commit e848c2ea117f222b62715d5c4e1714ec4e0aa647 Author: Wolfram Sang Date: Wed Aug 22 00:02:14 2018 +0200 clk: renesas: use SPDX identifier for Renesas drivers Signed-off-by: Wolfram Sang Reviewed-by: Simon Horman Reviewed-by: Geert Uytterhoeven Signed-off-by: Stephen Boyd commit b56ada120921fbb0a4fb2a5bee163717182e7e9e Merge: 5c3f78ec285b 894d45bbf7e7 4e6ea4ef56f9 7c590fcca66b Author: Paul E. McKenney Date: Thu Aug 30 16:12:53 2018 -0700 Merge branches 'doc.2018.08.30a', 'dynticks.2018.08.30b', 'srcu.2018.08.30b' and 'torture.2018.08.29a' into HEAD doc.2018.08.30a: Documentation updates dynticks.2018.08.30b: RCU flavor consolidation updates and cleanups srcu.2018.08.30b: SRCU updates torture.2018.08.29a: Torture-test updates commit 4e6ea4ef56f9425cd239ffdb6be45b3aeeb347fd Author: Paul E. McKenney Date: Tue Aug 14 14:41:49 2018 -0700 srcu: Make early-boot call_srcu() reuse workqueue lists Allocating a list_head structure that is almost never used, and, when used, is used only during early boot (rcu_init() and earlier), is a bit wasteful. This commit therefore eliminates that list_head in favor of the one in the work_struct structure. This is safe because the work_struct structure cannot be used until after rcu_init() returns. Reported-by: Steven Rostedt Signed-off-by: Paul E. McKenney Cc: Tejun Heo Cc: Lai Jiangshan Tested-by: Steven Rostedt (VMware) commit 55cda2290bf9d8510fbe7c1939a36680476c69c4 Author: Paul E. McKenney Date: Tue Aug 14 09:19:05 2018 -0700 rcutorture: Test early boot call_srcu() Now that SRCU permits call_srcu() to be invoked at early boot, this commit ensures that the rcutorture scripting tests early boot call_srcu(). Signed-off-by: Paul E. McKenney commit e0fcba9ac02af5aeb1e1c3e842eab987f817c309 Author: Paul E. McKenney Date: Tue Aug 14 08:45:54 2018 -0700 srcu: Make call_srcu() available during very early boot Event tracing is moving to SRCU in order to take advantage of the fact that SRCU may be safely used from idle and even offline CPUs. However, event tracing can invoke call_srcu() very early in the boot process, even before workqueue_init_early() is invoked (let alone rcu_init()). Therefore, call_srcu()'s attempts to queue work fail miserably. This commit therefore detects this situation, and refrains from attempting to queue work before rcu_init() time, but does everything else that it would have done, and in addition, adds the srcu_struct to a global list. The rcu_init() function now invokes a new srcu_init() function, which is empty if CONFIG_SRCU=n. Otherwise, srcu_init() queues work for each srcu_struct on the list. This all happens early enough in boot that there is but a single CPU with interrupts disabled, which allows synchronization to be dispensed with. Of course, the queued work won't actually be invoked until after workqueue_init() is invoked, which happens shortly after the scheduler is up and running. This means that although call_srcu() may be invoked any time after per-CPU variables have been set up, there is still a very narrow window when synchronize_srcu() won't work, and this window extends from the time that the scheduler starts until the time that workqueue_init() returns. This can be fixed in a manner similar to the fix for synchronize_rcu_expedited() and friends, but until someone actually needs to use synchronize_srcu() during this window, this fix is added churn for no benefit. Finally, note that Tree SRCU's new srcu_init() function invokes queue_work() rather than the queue_delayed_work() function that is invoked post-boot. The reason is that queue_delayed_work() will (as you would expect) post a timer, and timers have not yet been initialized. So use of queue_work() avoids the complaints about use of uninitialized spinlocks that would otherwise result. Besides, some delay is already provide by the aforementioned fact that the queued work won't actually be invoked until after the scheduler is up and running. Requested-by: Steven Rostedt Signed-off-by: Paul E. McKenney Tested-by: Steven Rostedt (VMware) commit 894d45bbf7e7569ec2aa845155801fd503b5f1bf Author: Mike Galbraith Date: Wed Aug 15 09:05:29 2018 -0700 rcu: Convert rcu_state.ofl_lock to raw_spinlock_t 1e64b15a4b10 ("rcu: Fix grace-period hangs due to race with CPU offline") added spinlock_t ofl_lock to the rcu_state structure, then takes it with preemption disabled during CPU offline, which gives the -rt patchset's sleeping spinlock heartburn. This commit therefore converts ->ofl_lock to raw_spinlock_t. Signed-off-by: Mike Galbraith Signed-off-by: Paul E. McKenney Cc: Sebastian Andrzej Siewior commit 8d8a9d0e7eda9feeee4af7be31932e14b512d3ad Author: Paul E. McKenney Date: Sat Aug 4 20:32:07 2018 -0700 rcu: Remove obsolete ->dynticks_fqs and ->cond_resched_completed The rcu_data structure's ->dynticks_fqs is incremented but never accesses. Its ->cond_resched_completed field isn't used at all. This commit therefore removes both fields. Signed-off-by: Paul E. McKenney commit dc5a4f2932f18568bb9d8cdbe2139a8ddbc28bb8 Author: Paul E. McKenney Date: Fri Aug 3 21:00:38 2018 -0700 rcu: Switch ->dynticks to rcu_data structure, remove rcu_dynticks This commit move ->dynticks from the rcu_dynticks structure to the rcu_data structure, replacing the field of the same name. It also updates the code to access ->dynticks from the rcu_data structure and to use the rcu_data structure rather than following to now-gone ->dynticks field to the now-gone rcu_dynticks structure. While in the area, this commit also fixes up comments. Signed-off-by: Paul E. McKenney commit 4c5273bf2b5ed9b585e470dda19c09c875a9fbbd Author: Paul E. McKenney Date: Fri Aug 3 21:00:38 2018 -0700 rcu: Switch dyntick nesting counters to rcu_data structure This commit removes ->dynticks_nesting and ->dynticks_nmi_nesting from the rcu_dynticks structure and updates the code to access them from the rcu_data structure. Signed-off-by: Paul E. McKenney commit 2dba13f0b6c2b26ff371b8927ac58d20a7d94713 Author: Paul E. McKenney Date: Fri Aug 3 21:00:38 2018 -0700 rcu: Switch urgent quiescent-state requests to rcu_data structure This commit removes ->rcu_need_heavy_qs and ->rcu_urgent_qs from the rcu_dynticks structure and updates the code to access them from the rcu_data structure. Signed-off-by: Paul E. McKenney commit c458a89e964dbf3c56b23eca2018bd0e2380969d Author: Paul E. McKenney Date: Fri Aug 3 21:00:38 2018 -0700 rcu: Switch lazy counts to rcu_data structure This commit removes ->all_lazy, ->nonlazy_posted and ->nonlazy_posted_snap from the rcu_dynticks structure and updates the code to access them from the rcu_data structure. Signed-off-by: Paul E. McKenney commit 5998a75adbf4f85e63b06fa7723633cc84d7129b Author: Paul E. McKenney Date: Fri Aug 3 21:00:38 2018 -0700 rcu: Switch last accelerate/advance to rcu_data structure This commit removes ->last_accelerate and ->last_advance_all from the rcu_dynticks structure and updates the code to access them from the rcu_data structure. Signed-off-by: Paul E. McKenney commit 0fd79e7521bc944522c3c97f40f3d25619e329f4 Author: Paul E. McKenney Date: Fri Aug 3 21:00:38 2018 -0700 rcu: Switch ->tick_nohz_enabled_snap to rcu_data structure This commit removes ->tick_nohz_enabled_snap from the rcu_dynticks structure and updates the code to access it from the rcu_data structure. Signed-off-by: Paul E. McKenney commit cc72046cc3cce8438778f306d59442febf4b7683 Author: Paul E. McKenney Date: Fri Aug 3 19:31:39 2018 -0700 rcu: Merge rcu_dynticks structure into rcu_data structure Now that there is only ever one rcu_data structure per CPU, there is no need for a separate rcu_dynticks structure. This commit therefore adds the rcu_dynticks fields into the rcu_data structure in preparation for removing the rcu_dynticks structure entirely. Note that the ->dynticks field will be handled specially because there is a field by that name in both structures. Signed-off-by: Paul E. McKenney commit 31ab604bf3232374e6471a2df9a83c4e75538390 Author: Paul E. McKenney Date: Fri Aug 3 16:15:54 2018 -0700 rcu: Remove unused rcu_dynticks_snap() from Tiny RCU The rcu_dynticks_snap() function is defined in include/linux/rcutiny.h, but is no longer used by Tiny RCU. This commit therefore removes it. Signed-off-by: Paul E. McKenney commit df63fa5bc11aadf81126d4a1785080c800e2ece3 Author: Paul E. McKenney Date: Tue Jul 31 09:49:20 2018 -0700 rcu: Convert "1UL << x" to "BIT(x)" This commit saves a few characters by converting "1UL << x" to "BIT(x)". Signed-off-by: Paul E. McKenney commit fced9c8cfe6bc8a26dbbf785927aa673c83a7a35 Author: Paul E. McKenney Date: Thu Jul 26 13:44:00 2018 -0700 rcu: Avoid resched_cpu() when rescheduling the current CPU The resched_cpu() interface is quite handy, but it does acquire the specified CPU's runqueue lock, which does not come for free. This commit therefore substitutes the following when directing resched_cpu() at the current CPU: set_tsk_need_resched(current); set_preempt_need_resched(); Signed-off-by: Paul E. McKenney Cc: Peter Zijlstra commit d3052109c0bc9e536d17d627ae628ed8ceb6928c Author: Paul E. McKenney Date: Wed Jul 25 11:49:47 2018 -0700 rcu: More aggressively enlist scheduler aid for nohz_full CPUs Because nohz_full CPUs can leave the scheduler-clock interrupt disabled even when in kernel mode, RCU cannot rely on rcu_check_callbacks() to enlist the scheduler's aid in extracting a quiescent state from such CPUs. This commit therefore more aggressively uses resched_cpu() on nohz_full CPUs that fail to pass through a quiescent state in a timely manner. By default, the resched_cpu() beating starts 300 milliseconds into the quiescent state. While in the neighborhood, add a ->last_fqs_resched field to the rcu_data structure in order to rate-limit resched_cpu() calls from the RCU grace-period kthread. Signed-off-by: Paul E. McKenney commit c06aed0e31008a248c1841f1b7fc80e9ee242a31 Author: Paul E. McKenney Date: Wed Jul 25 11:25:23 2018 -0700 rcu: Compute jiffies_till_sched_qs from other kernel parameters The jiffies_till_sched_qs value used to determine how old a grace period must be before RCU enlists the help of the scheduler to force a quiescent state on the holdout CPU. Currently, this defaults to HZ/10 regardless of system size and may be set only at boot time. This can be a problem for very large systems, because if the values of the jiffies_till_first_fqs and jiffies_till_next_fqs kernel parameters are left at their defaults, they are calculated to increase as the number of CPUs actually configured on the system increases. Thus, on a sufficiently large system, RCU would enlist the help of the scheduler before the grace-period kthread had a chance to scan for idle CPUs, which wastes CPU time. This commit therefore allows jiffies_till_sched_qs to be set, if desired, but if left as default, computes is as jiffies_till_first_fqs plus twice jiffies_till_next_fqs, thus allowing three force-quiescent-state scans for idle CPUs. This scales with the number of CPUs, providing sensible default values. Signed-off-by: Paul E. McKenney commit 74de6960c99d8df0d09fb29a7b014cb9c5571e2b Author: Paul E. McKenney Date: Tue Jul 24 15:28:09 2018 -0700 rcu: Provide functions for determining if call_rcu() has been invoked This commit adds rcu_head_init() and rcu_head_after_call_rcu() functions to help RCU users detect when another CPU has passed the specified rcu_head structure and function to call_rcu(). The rcu_head_init() should be invoked before making the structure visible to RCU readers, and then the rcu_head_after_call_rcu() may be invoked from within an RCU read-side critical section on an rcu_head structure that was obtained during a traversal of the data structure in question. The rcu_head_after_call_rcu() function will return true if the rcu_head structure has already been passed (with the specified function) to call_rcu(), otherwise it will return false. If rcu_head_init() has not been invoked on the rcu_head structure or if the rcu_head (AKA callback) has already been invoked, then rcu_head_after_call_rcu() will do WARN_ON_ONCE(). Reported-by: NeilBrown Signed-off-by: Paul E. McKenney [ paulmck: Apply neilb naming feedback. ] commit 7e28c5af4ef6b539334aa5de40feca0c041c94df Author: Paul E. McKenney Date: Wed Jul 11 08:09:28 2018 -0700 rcu: Eliminate ->rcu_qs_ctr from the rcu_dynticks structure The ->rcu_qs_ctr counter was intended to allow providing a lightweight report of a quiescent state to all RCU flavors. But now that there is only one flavor of RCU in any one running kernel, there is no point in having this feature. This commit therefore removes the ->rcu_qs_ctr field from the rcu_dynticks structure and the ->rcu_qs_ctr_snap field from the rcu_data structure. This results in the "rqc" option to the rcu_fqs trace event no longer being used, so this commit also removes the "rqc" description from the header comment. While in the neighborhood, this commit also causes the forward-progress request .rcu_need_heavy_qs be set one jiffies_till_sched_qs interval later in the grace period than the first setting of .rcu_urgent_qs. Signed-off-by: Paul E. McKenney commit c5bacd94173ec49d7dce7ac7c64bbdde3a6e69ae Author: Paul E. McKenney Date: Fri Jul 20 14:18:23 2018 -0700 rcu: Motivate Tiny RCU forward progress If a long-running CPU-bound in-kernel task invokes call_rcu(), the callback won't be invoked until the next context switch. If there are no other runnable tasks (which is not an uncommon situation on deep embedded systems), the callback might never be invoked. This commit therefore causes rcu_check_callbacks() to ask the scheduler for a context switch if there are callbacks posted that are still waiting for a grace period. Suggested-by: Peter Zijlstra Signed-off-by: Paul E. McKenney commit c116dba68d19246639e4fdb8c75756c67d6d268f Author: Paul E. McKenney Date: Fri Jul 13 12:09:14 2018 -0700 rcutorture: Dump reader protection sequence if failures or close calls Now that RCU can have readers with multiple segments, it is quite possible that a specific sequence of reader segments might result in an rcutorture failure (reader spans a full grace period as detected by one of the grace-period primitives) or an rcutorture close call (reader potentially spans a full grace period based on reading out the RCU implementation's grace-period counter, but with no ordering). In such cases, it would clearly ease debugging if the offending specific sequence was known. For the first reader encountering a failure or a close call, this commit therefore dumps out the segments, delay durations, and whether or not the reader was preempted. Signed-off-by: Paul E. McKenney [ paulmck: Mark variables static, as suggested by kbuild test robot. ] commit a0ef9ec24144799b5b47fa54c38f9a0f9dfe9a59 Author: Paul E. McKenney Date: Mon Jul 9 15:50:16 2018 -0700 rcu: Provide improved interrupt-from-idle check in rcu_check_callbacks() The patch making need_resched() respond to urgent RCU-QS needs used is_idle_task(current) to detect an interrupt from idle, which does work reasonably, but is (in theory at least) vulnerable to loops containing need_resched() invoked from within RCU_NONIDLE() or its tracepoint equivalent. This commit therefore moves rcu_is_cpu_rrupt_from_idle() to a place from which rcu_check_callbacks() can invoke it and replaces the is_idle_task(current) with rcu_is_cpu_rrupt_from_idle(). Signed-off-by: Paul E. McKenney commit 92aa39e9dc77481b90cbef25e547d66cab901496 Author: Paul E. McKenney Date: Mon Jul 9 13:47:30 2018 -0700 rcu: Make need_resched() respond to urgent RCU-QS needs The per-CPU rcu_dynticks.rcu_urgent_qs variable communicates an urgent need for an RCU quiescent state from the force-quiescent-state processing within the grace-period kthread to context switches and to cond_resched(). Unfortunately, such urgent needs are not communicated to need_resched(), which is sometimes used to decide when to invoke cond_resched(), for but one example, within the KVM vcpu_run() function. As of v4.15, this can result in synchronize_sched() being delayed by up to ten seconds, which can be problematic, to say nothing of annoying. This commit therefore checks rcu_dynticks.rcu_urgent_qs from within rcu_check_callbacks(), which is invoked from the scheduling-clock interrupt handler. If the current task is not an idle task and is not executing in usermode, a context switch is forced, and either way, the rcu_dynticks.rcu_urgent_qs variable is set to false. If the current task is an idle task, then RCU's dyntick-idle code will detect the quiescent state, so no further action is required. Similarly, if the task is executing in usermode, other code in rcu_check_callbacks() and its called functions will report the corresponding quiescent state. Reported-by: Marius Hillenbrand Reported-by: David Woodhouse Suggested-by: Peter Zijlstra Signed-off-by: Paul E. McKenney commit dd46a7882c2c2006201e053ebf5e9ad761860cc0 Author: Paul E. McKenney Date: Tue Jul 10 18:37:30 2018 -0700 rcu: Inline _rcu_barrier() into its sole remaining caller Because rcu_barrier() is a one-line wrapper function for _rcu_barrier() and because nothing else calls _rcu_barrier(), this commit inlines _rcu_barrier() into rcu_barrier(). Signed-off-by: Paul E. McKenney commit 395a2f097ebdddf2bfa286b6119f1b231025c2f1 Author: Paul E. McKenney Date: Tue Jul 10 14:00:14 2018 -0700 rcu: Define rcu_all_qs() only in !PREEMPT builds Now that rcu_all_qs() is used only in !PREEMPT builds, move it to tree_plugin.h so that it is defined only in those builds. This in turn means that rcu_momentary_dyntick_idle() is only used in !PREEMPT builds, but it is simply marked __maybe_unused in order to keep it near the rest of the dyntick-idle code. Signed-off-by: Paul E. McKenney commit 4d232dfe1df35254298e7986c4de8c9f63f58c79 Author: Paul E. McKenney Date: Tue Jul 10 12:53:40 2018 -0700 rcu: Remove !PREEMPT code from rcu_note_voluntary_context_switch() Because RCU-tasks exists only in PREEMPT kernels and because RCU-sched no longer exists in PREEMPT kernels, it is no longer necessary for the rcu_note_voluntary_context_switch() macro to do anything for !PREEMPT kernels. This commit therefore removes !PREEMPT-related code from this macro, namely, the rcu_all_qs(). Signed-off-by: Paul E. McKenney commit 06462efc808c956f462ec5c3b5e10bbee0be2545 Author: Paul E. McKenney Date: Sun Jul 8 10:58:37 2018 -0700 rcu: Clean up flavor-related definitions and comments in update.c Signed-off-by: Paul E. McKenney commit 0ae86a272656b34edfe90a637363d10f470c65d8 Author: Paul E. McKenney Date: Sat Jul 7 18:12:26 2018 -0700 rcu: Clean up flavor-related definitions and comments in tree_plugin.h Signed-off-by: Paul E. McKenney commit 8fa946d42855c2e3a481bf105aa2b25cefebe111 Author: Paul E. McKenney Date: Sat Jul 7 18:12:26 2018 -0700 rcu: Clean up flavor-related definitions and comments in tree_exp.h Signed-off-by: Paul E. McKenney commit 49918a54e63c99899aa3aa64d456c5bf14122e5a Author: Paul E. McKenney Date: Sat Jul 7 18:12:26 2018 -0700 rcu: Clean up flavor-related definitions and comments in tree.c Signed-off-by: Paul E. McKenney commit 679d3f30923eb687ce3bcd3dfaf108a2809d5a57 Author: Paul E. McKenney Date: Sat Jul 7 18:12:26 2018 -0700 rcu: Clean up flavor-related definitions and comments in tiny.c Signed-off-by: Paul E. McKenney commit 6eb95cc4507a765de06d30028390da1b4a9c8e5c Author: Paul E. McKenney Date: Sat Jul 7 18:12:26 2018 -0700 rcu: Clean up flavor-related definitions and comments in srcutree.h Signed-off-by: Paul E. McKenney commit 62a1a945368ff8b4011dfc791f89152ef3da0ecf Author: Paul E. McKenney Date: Sat Jul 7 18:12:26 2018 -0700 rcu: Clean up flavor-related definitions and comments in rcutorture.c Signed-off-by: Paul E. McKenney commit 7f87c036fea3c17eb6a6e4f4164c67aeb98710ea Author: Paul E. McKenney Date: Sat Jul 7 18:12:26 2018 -0700 rcu: Clean up flavor-related definitions and comments in rcu.h Signed-off-by: Paul E. McKenney commit 8c1cf2da6f8af7f6b6e0e06d3a83115712cc04b8 Author: Paul E. McKenney Date: Sat Jul 7 18:12:26 2018 -0700 rcu: Clean up flavor-related definitions and comments in Kconfig Signed-off-by: Paul E. McKenney commit df8561a0d7e4f5cb72d0aa6be43e154b2027bba6 Author: Paul E. McKenney Date: Sat Jul 7 18:12:26 2018 -0700 rcu: Clean up flavor-related definitions and comments in rcupdate_wait.h Signed-off-by: Paul E. McKenney commit aff5f0369e312b0ab0ca7a2a12dd64b7e39c7091 Author: Paul E. McKenney Date: Sat Jul 7 18:12:26 2018 -0700 rcu: Clean up flavor-related definitions and comments in rculist.h Signed-off-by: Paul E. McKenney commit 2bd8b1a2afc4463cc503665e98faa5909d1ac462 Author: Paul E. McKenney Date: Sat Jul 7 18:12:26 2018 -0700 rcu: Clean up flavor-related definitions and comments in rcupdate.h Signed-off-by: Paul E. McKenney commit de3875d3023310416d08eaab3c1a8527e9b452bf Author: Paul E. McKenney Date: Sat Jul 7 21:43:17 2018 -0700 rcu: Remove now-unused rcutorture APIs This commit removes rcu_sched_get_gp_seq(), rcu_bh_get_gp_seq(), rcu_exp_batches_completed_sched(), rcu_sched_force_quiescent_state(), and rcu_bh_force_quiescent_state(), which are no longer used because rcutorture no longer does "rcu_bh" and "rcu_sched" torture types. Signed-off-by: Paul E. McKenney commit 620d246065cdca4c4a8ad9ed28a191665cd3d457 Author: Paul E. McKenney Date: Sat Jul 7 18:25:10 2018 -0700 rcuperf: Remove the "rcu_bh" and "sched" torture types Now that the RCU-bh and RCU-sched update-side functions are simple wrappers around their RCU counterparts, there isn't a whole lot of point in testing them. This commit therefore removes the "rcu_bh" and "sched" torture types from rcuperf. Signed-off-by: Paul E. McKenney commit c770c82a238237d7e97b9101b9e44db14203de47 Author: Paul E. McKenney Date: Sat Jul 7 10:28:07 2018 -0700 rcutorture: Remove the "rcu_bh" and "sched" torture types Now that the RCU-bh and RCU-sched update-side functions are simple wrappers around their RCU counterparts, there isn't a whole lot of point in testing them. This commit therefore removes the "rcu_bh" and "sched" torture types from rcutorture. Signed-off-by: Paul E. McKenney commit 72ce30dd1f9bdbd6913ba868d0d2ca55c268eff3 Author: Paul E. McKenney Date: Sat Jul 7 10:24:23 2018 -0700 rcu: Stop testing RCU-bh and RCU-sched Now that the RCU-bh and RCU-sched update-side functions are simple wrappers around their RCU counterparts, there isn't a whole lot of point in testing them. This commit therefore removes the self-test capability and removes the corresponding kernel-boot parameters. It also updates the various rcutorture .boot files to remove the kernel boot parameters that call for testing RCU-bh and RCU-sched. Signed-off-by: Paul E. McKenney commit 2ceebc035082a42f1416d4b47270c0acb5354949 Author: Paul E. McKenney Date: Fri Jul 6 15:16:12 2018 -0700 rcutorture: Add RCU-bh and RCU-sched support for extended readers Since there is now a single consolidated RCU flavor, rcutorture needs to test extending of RCU readers via rcu_read_lock_bh() and rcu_read_lock_sched(). This commit adds this support, with added checks (just like for local_bh_enable()) to ensure that rcu_read_unlock_bh() will not be invoked while interrupts are disabled. Signed-off-by: Paul E. McKenney commit a8bb74acd8efe2eb934d524ae20859980975b602 Author: Paul E. McKenney Date: Fri Jul 6 11:46:47 2018 -0700 rcu: Consolidate RCU-sched update-side function definitions This commit saves a few lines by consolidating the RCU-sched function definitions at the end of include/linux/rcupdate.h. This consolidation also makes it easier to remove them all when the time comes. Signed-off-by: Paul E. McKenney commit 4c7e9c1434c6fc960774a5475f2fbccbf557fdeb Author: Paul E. McKenney Date: Fri Jul 6 09:54:25 2018 -0700 rcu: Consolidate RCU-bh update-side function definitions This commit saves a few lines by consolidating the RCU-bh function definitions at the end of include/linux/rcupdate.h. This consolidation also makes it easier to remove them all when the time comes. Signed-off-by: Paul E. McKenney commit c3854a055bc834806b481b34f5f552ac415b2000 Author: Paul E. McKenney Date: Thu Jul 5 18:23:23 2018 -0700 rcu: Pull rcu_gp_kthread() FQS loop into separate function The rcu_gp_kthread() function is long and deeply indented, so this commit pulls the loop that repeatedly invokes rcu_gp_fqs() into a new rcu_gp_fqs_loop() function. Signed-off-by: Paul E. McKenney commit 4e95020cdd34bbfc86f9c705f4d46ed63fa2e231 Author: Paul E. McKenney Date: Thu Jul 5 17:59:36 2018 -0700 rcu: Inline increment_cpu_stall_ticks() into its sole caller Consolidation of the RCU flavors into one makes increment_cpu_stall_ticks() a trivial one-line function with only one caller. This commit therefore inlines it. Signed-off-by: Paul E. McKenney commit 8ff0b90780910821a53c70d5e68d28382f2a1a07 Author: Paul E. McKenney Date: Thu Jul 5 17:55:14 2018 -0700 rcu: Fix typo in force_qs_rnp()'s parameter's parameter Pointers to rcu_data structures should be named rdp, not rsp. This commit therefore makes this change. Signed-off-by: Paul E. McKenney commit eb7a6653887b540a81d1b91ee0fc68b604da9386 Author: Paul E. McKenney Date: Thu Jul 5 17:47:45 2018 -0700 rcu: Eliminate initialization-time use of rsp Now that there is only one rcu_state structure, there is less point in maintaining a pointer to it. This commit therefore replaces rsp with &rcu_state in rcu_cpu_starting() and rcu_init_one(). Signed-off-by: Paul E. McKenney commit ec9f5835f74cba5cc2285d3032bb2b16afc312c3 Author: Paul E. McKenney Date: Thu Jul 5 16:26:12 2018 -0700 rcu: Eliminate RCU-barrier use of rsp Now that there is only one rcu_state structure, there is less point in maintaining a pointer to it. This commit therefore replaces rsp with &rcu_state in rcu_barrier_callback(), rcu_barrier_func(), and _rcu_barrier(). Signed-off-by: Paul E. McKenney commit 67a0edbf3c4dfcf3d20dafaff0d8c1c0ed44c292 Author: Paul E. McKenney Date: Thu Jul 5 16:15:38 2018 -0700 rcu: Eliminate quiescent-state and grace-period-nonstart use of rsp Now that there is only one rcu_state structure, there is less point in maintaining a pointer to it. This commit therefore replaces rsp with &rcu_state in rcu_report_qs_rnp(), force_quiescent_state(), and rcu_check_gp_start_stall(). Signed-off-by: Paul E. McKenney commit 3c779dfef2c45248c5916e5acb79570649374fd6 Author: Paul E. McKenney Date: Thu Jul 5 15:54:02 2018 -0700 rcu: Eliminate callback-invocation/invocation use of rsp Now that there is only one rcu_state structure, there is less point in maintaining a pointer to it. This commit therefore replaces rsp with &rcu_state in rcu_do_batch(), invoke_rcu_callbacks(), and __call_rcu(). Signed-off-by: Paul E. McKenney commit 9cbc5b97029bff2db7fb413d6ce588d38373834c Author: Paul E. McKenney Date: Thu Jul 5 15:47:01 2018 -0700 rcu: Eliminate grace-period management code use of rsp Now that there is only one rcu_state structure, there is less point in maintaining a pointer to it. This commit therefore replaces rsp with &rcu_state in rcu_start_this_gp(), rcu_accelerate_cbs(), __note_gp_changes(), rcu_gp_init(), rcu_gp_fqs(), rcu_gp_cleanup(), rcu_gp_kthread(), and rcu_report_qs_rsp(). Signed-off-by: Paul E. McKenney commit 4c6ed43708bbd53112f3a455bf7fe0d224167943 Author: Paul E. McKenney Date: Thu Jul 5 00:02:29 2018 -0700 rcu: Eliminate stall-warning use of rsp Now that there is only one rcu_state structure, there is less point in maintaining a pointer to it. This commit therefore replaces rsp with &rcu_state in print_other_cpu_stall(), print_cpu_stall(), and check_cpu_stall(). Signed-off-by: Paul E. McKenney commit 7cba4775ba79d8da5775339f6a4769762626bcfd Author: Paul E. McKenney Date: Wed Jul 4 18:25:59 2018 -0700 rcu: Restructure rcu_check_gp_kthread_starvation() This commit removes the rsp and gpa local variables, repurposes the j local variable and adds a gpk (GP kthread) local to improve readability. Signed-off-by: Paul E. McKenney commit f7dd7d44fd2db80bfb2c5f81e67b5404b4735312 Author: Paul E. McKenney Date: Wed Jul 4 15:39:40 2018 -0700 rcu: Simplify rcutorture_get_gp_data() This commit restructures rcutorture_get_gp_data() to take advantage of the fact that there is only one flavor of RCU. Signed-off-by: Paul E. McKenney commit b97d23c51c9fee56b0c7598c323ab2846d873f2d Author: Paul E. McKenney Date: Wed Jul 4 15:35:00 2018 -0700 rcu: Remove for_each_rcu_flavor() flavor-traversal macro Now that there is only ever a single flavor of RCU in a given kernel build, there isn't a whole lot of point in having a flavor-traversal macro. This commit therefore removes it and converts calls to it to straightline code, inlining trivial functions as appropriate. Signed-off-by: Paul E. McKenney commit 564a9ae6046c64d03df0c1c1264094b1a00dccc9 Author: Paul E. McKenney Date: Wed Jul 4 14:52:04 2018 -0700 rcu: Remove last non-flavor-traversal rsp local variable from tree_plugin.h This commit removes the last non-flavor-traversal rsp local variable from kernel/rcu/tree_plugin.h in favor of &rcu_state. The flavor-traversal locals will be removed with the removal of flavor traversal. Signed-off-by: Paul E. McKenney commit 88d1bead858d88cdda92ed8f3388eea8ee3a9675 Author: Paul E. McKenney Date: Wed Jul 4 14:45:00 2018 -0700 rcu: Remove rcu_data structure's ->rsp field Now that there is only one rcu_state structure, there is no need for the rcu_data structure to indicate which it corresponds to. This commit therefore removes the rcu_data structure's ->rsp field, replacing all remaining uses of it with &rcu_state. Signed-off-by: Paul E. McKenney commit aedf4ba984168ab5b96898a03bfdb51d07194776 Author: Paul E. McKenney Date: Wed Jul 4 14:33:59 2018 -0700 rcu: Remove rsp parameter from rcu_node tree accessor macros There now is only one rcu_state structure in a given build of the Linux kernel, so there is no need to pass it as a parameter to RCU's rcu_node tree's accessor macros. This commit therefore removes the rsp parameter from those macros in kernel/rcu/rcu.h, and removes some now-unused rsp local variables while in the area. Signed-off-by: Paul E. McKenney commit 63d4c8c97948b0be8cb7ef3b7b943c25864eae4b Author: Paul E. McKenney Date: Tue Jul 3 17:22:34 2018 -0700 rcu: Remove rsp parameter from expedited grace-period functions There now is only one rcu_state structure in a given build of the Linux kernel, so there is no need to pass it as a parameter to RCU's functions. This commit therefore removes the rsp parameter from the code in kernel/rcu/tree_exp.h, and removes all of the rsp local variables while in the area. Signed-off-by: Paul E. McKenney commit 4580b0541beac895a9ba9a4b6f60aec94355bfdd Author: Paul E. McKenney Date: Tue Jul 3 17:22:34 2018 -0700 rcu: Remove rsp parameter from no-CBs CPU functions There now is only one rcu_state structure in a given build of the Linux kernel, so there is no need to pass it as a parameter to RCU's functions. This commit therefore removes the rsp parameter from rcu_nocb_cpu_needs_barrier(), rcu_spawn_one_nocb_kthread(), rcu_organize_nocb_kthreads(), rcu_nocb_cpu_needs_barrier(), and rcu_nohz_full_cpu(). Signed-off-by: Paul E. McKenney commit b21ebed951010acccbe9a55337d16cf4da4cce0a Author: Paul E. McKenney Date: Tue Jul 3 17:22:34 2018 -0700 rcu: Remove rsp parameter from print_cpu_stall_info() There now is only one rcu_state structure in a given build of the Linux kernel, so there is no need to pass it as a parameter to RCU's functions. This commit therefore removes the rsp parameter from print_cpu_stall_info(). Signed-off-by: Paul E. McKenney commit 6dbfdc1409cf07accf7c97475c3b58d46daa319b Author: Paul E. McKenney Date: Tue Jul 3 17:22:34 2018 -0700 rcu: Remove rsp parameter from rcu_spawn_one_boost_kthread() There now is only one rcu_state structure in a given build of the Linux kernel, so there is no need to pass it as a parameter to RCU's functions. This commit therefore removes the rsp parameter from rcu_spawn_one_boost_kthread(). Signed-off-by: Paul E. McKenney commit 81ab59a3ad8656620d7106e855085bc12dc13a4c Author: Paul E. McKenney Date: Tue Jul 3 17:22:34 2018 -0700 rcu: Remove rsp parameter from dump_blkd_tasks() and friend There now is only one rcu_state structure in a given build of the Linux kernel, so there is no need to pass it as a parameter to RCU's functions. This commit therefore removes the rsp parameter from dump_blkd_tasks() and rcu_preempt_blocked_readers_cgp(). Signed-off-by: Paul E. McKenney commit a2887cd85f38cf2fdbf42bad97e5c412d99ff5ca Author: Paul E. McKenney Date: Tue Jul 3 17:22:34 2018 -0700 rcu: Remove rsp parameter from rcu_print_detail_task_stall() There now is only one rcu_state structure in a given build of the Linux kernel, so there is no need to pass it as a parameter to RCU's functions. This commit therefore removes the rsp parameter from rcu_print_detail_task_stall(). Signed-off-by: Paul E. McKenney commit b8bb1f63cf9ac43fc3015449843fe1f81c1b31a6 Author: Paul E. McKenney Date: Tue Jul 3 17:22:34 2018 -0700 rcu: Remove rsp parameter from rcu_init_one() and friends There now is only one rcu_state structure in a given build of the Linux kernel, so there is no need to pass it as a parameter to RCU's functions. This commit therefore removes the rsp parameter from rcu_init_one() and rcu_dump_rcu_node_tree(). Signed-off-by: Paul E. McKenney commit 53b46303da84d611cd281f74a6538d47709b06b5 Author: Paul E. McKenney Date: Tue Jul 3 17:22:34 2018 -0700 rcu: Remove rsp parameter from rcu_boot_init_percpu_data() and friends There now is only one rcu_state structure in a given build of the Linux kernel, so there is no need to pass it as a parameter to RCU's functions. This commit therefore removes the rsp parameter from rcu_boot_init_percpu_data(), rcu_init_percpu_data(), rcu_cleanup_dying_idle_cpu(), and rcu_migrate_callbacks(). While in the neighborhood, line the last three into rcutree_prepare_cpu(), rcu_report_dead() and rcutree_migrate_callbacks(), respectively. This also gets rid of the for_each_rcu_flavor() calls that were in those tree functions. Signed-off-by: Paul E. McKenney commit 8344b871b1d575ba630ca57448ea4cbc84daba0f Author: Paul E. McKenney Date: Tue Jul 3 17:22:34 2018 -0700 rcu: Remove rsp parameter from _rcu_barrier() and friends There now is only one rcu_state structure in a given build of the Linux kernel, so there is no need to pass it as a parameter to RCU's functions. This commit therefore removes the rsp parameter from _rcu_barrier_trace() and _rcu_barrier(). Signed-off-by: Paul E. McKenney commit 98ece508b545bdaa5575ab46c68f17981516f689 Author: Paul E. McKenney Date: Tue Jul 3 17:22:34 2018 -0700 rcu: Remove rsp parameter from __rcu_pending() There now is only one rcu_state structure in a given build of the Linux kernel, so there is no need to pass it as a parameter to RCU's functions. This commit therefore removes the rsp parameter from __rcu_pending(), and also inlines it into rcu_pending(), removing the for_each_rcu_flavor() while in the neighborhood.. Signed-off-by: Paul E. McKenney commit 5c7d89676bc51966ea7882703d15795587e7108c Author: Paul E. McKenney Date: Tue Jul 3 17:22:34 2018 -0700 rcu: Remove rsp parameter from __call_rcu() and friend There now is only one rcu_state structure in a given build of the Linux kernel, so there is no need to pass it as a parameter to RCU's functions. This commit therefore removes the rsp parameter from __call_rcu_core() and __call_rcu(). Signed-off-by: Paul E. McKenney commit b049fdf8e3b986c2695642fa2d2ceeec55245fb1 Author: Paul E. McKenney Date: Tue Jul 3 17:22:34 2018 -0700 rcu: Remove rsp parameter from __rcu_process_callbacks() There now is only one rcu_state structure in a given build of the Linux kernel, so there is no need to pass it as a parameter to RCU's functions. This commit therefore removes the rsp parameter from __rcu_process_callbacks(), and also inlines it into rcu_process_callbacks(), removing the for_each_rcu_flavor() while in the neighborhood. Signed-off-by: Paul E. McKenney commit b96f9dc4fb642b2fa604bc0b64464356ef2b54f5 Author: Paul E. McKenney Date: Tue Jul 3 17:22:34 2018 -0700 rcu: Remove rsp parameter from rcu_check_gp_start_stall() There now is only one rcu_state structure in a given build of the Linux kernel, so there is no need to pass it as a parameter to RCU's functions. This commit therefore removes the rsp parameter from rcu_check_gp_start_stall(). Signed-off-by: Paul E. McKenney commit e9ecb780fe7d881ebd290663d5cfb9dd7b5e58f4 Author: Paul E. McKenney Date: Tue Jul 3 17:22:34 2018 -0700 rcu: Remove rsp parameter from force-quiescent-state functions There now is only one rcu_state structure in a given build of the Linux kernel, so there is no need to pass it as a parameter to RCU's functions. This commit therefore removes the rsp parameter from force_qs_rnp() and force_quiescent_state(). Signed-off-by: Paul E. McKenney commit 5bb5d09cc4f868497dfec2f8101f580f2c571816 Author: Paul E. McKenney Date: Tue Jul 3 17:22:34 2018 -0700 rcu: Remove rsp parameter from rcu_do_batch() There now is only one rcu_state structure in a given build of the Linux kernel, so there is no need to pass it as a parameter to RCU's functions. This commit therefore removes the rsp parameter from rcu_do_batch(). Signed-off-by: Paul E. McKenney commit 780cd590836fe24bc2a81b8cd7c2f9cbe495421e Author: Paul E. McKenney Date: Tue Jul 3 17:22:34 2018 -0700 rcu: Remove rsp parameter from CPU hotplug functions There now is only one rcu_state structure in a given build of the Linux kernel, so there is no need to pass it as a parameter to RCU's functions. This commit therefore removes the rsp parameter from rcu_cleanup_dying_cpu() and rcu_cleanup_dead_cpu(). And, as long as we are in the neighborhood, inlines them into rcutree_dying_cpu() and rcutree_dead_cpu(), respectively. This also eliminates a pair of for_each_rcu_flavor() loops. Signed-off-by: Paul E. McKenney commit 8087d3e3c453a7caad389dbd78a32bf19a536928 Author: Paul E. McKenney Date: Tue Jul 3 17:22:34 2018 -0700 rcu: Remove rsp parameter from rcu_check_quiescent_state() There now is only one rcu_state structure in a given build of the Linux kernel, so there is no need to pass it as a parameter to RCU's functions. This commit therefore removes the rsp parameter from rcu_check_quiescent_state(). Signed-off-by: Paul E. McKenney commit 0854a05c9fa554930174f0fa7453c18f99108a4a Author: Paul E. McKenney Date: Tue Jul 3 17:22:34 2018 -0700 rcu: Remove rsp parameter from rcu_gp_kthread() and friends There now is only one rcu_state structure in a given build of the Linux kernel, so there is no need to pass it as a parameter to RCU's functions. This commit therefore removes the rsp parameter from rcu_gp_init(), rcu_gp_fqs_check_wake(), rcu_gp_fqs(), rcu_gp_cleanup(), and rcu_gp_kthread(). Signed-off-by: Paul E. McKenney commit 22212332c1f37da35e0d841b1e06421a4956e1ea Author: Paul E. McKenney Date: Tue Jul 3 17:22:34 2018 -0700 rcu: Remove rsp parameter from rcu_gp_slow() There now is only one rcu_state structure in a given build of the Linux kernel, so there is no need to pass it as a parameter to RCU's functions. This commit therefore removes the rsp parameter from rcu_gp_slow(). Signed-off-by: Paul E. McKenney commit 15cabdffbbf629f2588612f092bdb37dfa16cc79 Author: Paul E. McKenney Date: Tue Jul 3 17:22:34 2018 -0700 rcu: Remove rsp parameter from note_gp_changes() There now is only one rcu_state structure in a given build of the Linux kernel, so there is no need to pass it as a parameter to RCU's functions. This commit therefore removes the rsp parameter from note_gp_changes(). Signed-off-by: Paul E. McKenney commit c7e48f7ba3820145d08015108ea763bd03c888e9 Author: Paul E. McKenney Date: Tue Jul 3 17:22:34 2018 -0700 rcu: Remove rsp parameter from __note_gp_changes() There now is only one rcu_state structure in a given build of the Linux kernel, so there is no need to pass it as a parameter to RCU's functions. This commit therefore removes the rsp parameter from __note_gp_changes(). Signed-off-by: Paul E. McKenney commit 834f56bf54e866e8db9d09b02fb1f3c0184ec927 Author: Paul E. McKenney Date: Tue Jul 3 17:22:34 2018 -0700 rcu: Remove rsp parameter from rcu_advance_cbs() There now is only one rcu_state structure in a given build of the Linux kernel, so there is no need to pass it as a parameter to RCU's functions. This commit therefore removes the rsp parameter from rcu_advance_cbs(). Signed-off-by: Paul E. McKenney commit c6e09b97b9338de2b829a4005dc437e689bf903e Author: Paul E. McKenney Date: Tue Jul 3 17:22:34 2018 -0700 rcu: Remove rsp parameter from rcu_accelerate_cbs_unlocked() There now is only one rcu_state structure in a given build of the Linux kernel, so there is no need to pass it as a parameter to RCU's functions. This commit therefore removes the rsp parameter from rcu_accelerate_cbs_unlocked(). Signed-off-by: Paul E. McKenney commit 02f501423d0dde7a4b0dd138e0de6175bcf1926c Author: Paul E. McKenney Date: Tue Jul 3 17:22:34 2018 -0700 rcu: Remove rsp parameter from rcu_accelerate_cbs() There now is only one rcu_state structure in a given build of the Linux kernel, so there is no need to pass it as a parameter to RCU's functions. This commit therefore removes the rsp parameter from rcu_accelerate_cbs(). Signed-off-by: Paul E. McKenney commit 532c00c97f16a2a8576d453ae13ddc38162faed4 Author: Paul E. McKenney Date: Tue Jul 3 17:22:34 2018 -0700 rcu: Remove rsp parameter from rcu_gp_kthread_wake() There now is only one rcu_state structure in a given build of the Linux kernel, so there is no need to pass it as a parameter to RCU's functions. This commit therefore removes the rsp parameter from rcu_gp_kthread_wake(). Signed-off-by: Paul E. McKenney commit 3481f2eab09563456bbc7cb358ad5d151a509064 Author: Paul E. McKenney Date: Tue Jul 3 17:22:34 2018 -0700 rcu: Remove rsp parameter from rcu_future_gp_cleanup() There now is only one rcu_state structure in a given build of the Linux kernel, so there is no need to pass it as a parameter to RCU's functions. This commit therefore removes the rsp parameter from rcu_future_gp_cleanup(). Signed-off-by: Paul E. McKenney commit ea12ff2b7d97607bb69b50ccc30d3819b44ffb2b Author: Paul E. McKenney Date: Tue Jul 3 17:22:34 2018 -0700 rcu: Remove rsp parameter from check_cpu_stall() There now is only one rcu_state structure in a given build of the Linux kernel, so there is no need to pass it as a parameter to RCU's functions. This commit therefore removes the rsp parameter from check_cpu_stall(). Signed-off-by: Paul E. McKenney commit 4e8b8e08f931c9378dec9f304f8a170bcf5e70bb Author: Paul E. McKenney Date: Tue Jul 3 17:22:34 2018 -0700 rcu: Remove rsp parameter from print_cpu_stall() There now is only one rcu_state structure in a given build of the Linux kernel, so there is no need to pass it as a parameter to RCU's functions. This commit therefore removes the rsp parameter from print_cpu_stall(). Signed-off-by: Paul E. McKenney commit a91e7e58b1016cd3ce043ab3dd5cde7a1b098215 Author: Paul E. McKenney Date: Tue Jul 3 17:22:34 2018 -0700 rcu: Remove rsp parameter from print_other_cpu_stall() There now is only one rcu_state structure in a given build of the Linux kernel, so there is no need to pass it as a parameter to RCU's functions. This commit therefore removes the rsp parameter from print_other_cpu_stall(). Signed-off-by: Paul E. McKenney commit e1741c69d427596c67639b25f1309836e001c224 Author: Paul E. McKenney Date: Tue Jul 3 17:22:34 2018 -0700 rcu: Remove rsp parameter from rcu_stall_kick_kthreads() There now is only one rcu_state structure in a given build of the Linux kernel, so there is no need to pass it as a parameter to RCU's functions. This commit therefore removes the rsp parameter from rcu_stall_kick_kthreads(). Signed-off-by: Paul E. McKenney commit 33dbdbf02538e8f088f83a89de68436da590ce76 Author: Paul E. McKenney Date: Tue Jul 3 17:22:34 2018 -0700 rcu: Remove rsp parameter from rcu_dump_cpu_stacks() There now is only one rcu_state structure in a given build of the Linux kernel, so there is no need to pass it as a parameter to RCU's functions. This commit therefore removes the rsp parameter from rcu_dump_cpu_stacks(). Signed-off-by: Paul E. McKenney commit 8fd119b6522fea9ba5e68a3aa653f1490778fb25 Author: Paul E. McKenney Date: Tue Jul 3 17:22:34 2018 -0700 rcu: Remove rsp parameter from rcu_check_gp_kthread_starvation() There now is only one rcu_state structure in a given build of the Linux kernel, so there is no need to pass it as a parameter to RCU's functions. This commit therefore removes the rsp parameter from rcu_check_gp_kthread_starvation(). Signed-off-by: Paul E. McKenney commit ad3832e974eba3b6d253d60a28eac2f2da7ea7ff Author: Paul E. McKenney Date: Tue Jul 3 17:22:34 2018 -0700 rcu: Remove rsp parameter from record_gp_stall_check_time() There now is only one rcu_state structure in a given build of the Linux kernel, so there is no need to pass it as a parameter to RCU's functions. This commit therefore removes the rsp parameter from record_gp_stall_check_time(). Signed-off-by: Paul E. McKenney commit 336a4f6c451e488b5388a2593fa20f7192706c7b Author: Paul E. McKenney Date: Tue Jul 3 17:22:34 2018 -0700 rcu: Remove rsp parameter from rcu_get_root() There now is only one rcu_state structure in a given build of the Linux kernel, so there is no need to pass it as a parameter to RCU's functions. This commit therefore removes the rsp parameter from rcu_get_root(). Signed-off-by: Paul E. McKenney commit de8e87305a1ae878f7c518fd9cadcc9159cda493 Author: Paul E. McKenney Date: Tue Jul 3 17:22:34 2018 -0700 rcu: Remove rsp parameter from rcu_gp_in_progress() There now is only one rcu_state structure in a given build of the Linux kernel, so there is no need to pass it as a parameter to RCU's functions. This commit therefore removes the rsp parameter from rcu_gp_in_progress(). Signed-off-by: Paul E. McKenney commit 33085c469aeaef3e1f8a203128cf886490419205 Author: Paul E. McKenney Date: Tue Jul 3 17:22:34 2018 -0700 rcu: Remove rsp parameter from rcu_report_qs_rdp() There now is only one rcu_state structure in a given build of the Linux kernel, so there is no need to pass it as a parameter to RCU's functions. This commit therefore removes the rsp parameter from rcu_report_qs_rdp(). Signed-off-by: Paul E. McKenney commit 139ad4da5ab5d5600b46d930dbf4419577039d9c Author: Paul E. McKenney Date: Tue Jul 3 17:22:34 2018 -0700 rcu: Remove rsp parameter from rcu_report_unblock_qs_rnp() There now is only one rcu_state structure in a given build of the Linux kernel, so there is no need to pass it as a parameter to RCU's functions. This commit therefore removes the rsp parameter from rcu_report_unblock_qs_rnp(), which is particularly appropriate in this case given that this parameter is no longer used. Signed-off-by: Paul E. McKenney commit aff4e9ede52badf550745c3d30ed5fcf86ed4351 Author: Paul E. McKenney Date: Tue Jul 3 17:22:34 2018 -0700 rcu: Remove rsp parameter from rcu_report_qs_rsp() There now is only one rcu_state structure in a given build of the Linux kernel, so there is no need to pass it as a parameter to RCU's functions. This commit therefore removes the rsp parameter from rcu_report_qs_rsp(). Signed-off-by: Paul E. McKenney commit b50912d0b5e03f11004fec1e2b50244de9e2fa41 Author: Paul E. McKenney Date: Tue Jul 3 17:22:34 2018 -0700 rcu: Remove rsp parameter from rcu_report_qs_rnp() There now is only one rcu_state structure in a given build of the Linux kernel, so there is no need to pass it as a parameter to RCU's functions. This commit therefore removes the rsp parameter from rcu_report_qs_rnp(). Signed-off-by: Paul E. McKenney commit 2280ee5a7d3efca0dbb2c241029b6c63bec50a6b Author: Paul E. McKenney Date: Tue Jul 3 15:54:39 2018 -0700 rcu: Remove rcu_data_p pointer to default rcu_data structure The rcu_data_p pointer references the default set of per-CPU rcu_data structures, that is, those that call_rcu() uses, as opposed to call_rcu_bh() and sometimes call_rcu_sched(). But there is now only one set of per-CPU rcu_data structures, so that one set is by definition the default, which means that the rcu_data_p pointer no longer serves any useful purpose. This commit therefore removes it. Signed-off-by: Paul E. McKenney commit 16fc9c600b3caf97f42cdd1e35309b7529a55cfb Author: Paul E. McKenney Date: Tue Jul 3 15:54:39 2018 -0700 rcu: Remove rcu_state_p pointer to default rcu_state structure The rcu_state_p pointer references the default rcu_state structure, that is, the one that call_rcu() uses, as opposed to call_rcu_bh() and sometimes call_rcu_sched(). But there is now only one rcu_state structure, so that one structure is by definition the default, which means that the rcu_state_p pointer no longer serves any useful purpose. This commit therefore removes it. Signed-off-by: Paul E. McKenney commit da1df50d16171f4c65da18093d5b5652423f5b99 Author: Paul E. McKenney Date: Tue Jul 3 15:37:16 2018 -0700 rcu: Remove rcu_state structure's ->rda field The rcu_state structure's ->rda field was used to find the per-CPU rcu_data structures corresponding to that rcu_state structure. But now there is only one rcu_state structure (creatively named "rcu_state") and one set of per-CPU rcu_data structures (creatively named "rcu_data"). Therefore, uses of the ->rda field can always be replaced by "rcu_data, and this commit makes that change and removes the ->rda field. Signed-off-by: Paul E. McKenney commit ec5dd444b678b1305d9af34ebb4cca17e0ef88e6 Author: Paul E. McKenney Date: Tue Jul 3 15:02:28 2018 -0700 rcu: Eliminate rcu_state structure's ->call field The rcu_state structure's ->call field references the corresponding RCU flavor's call_rcu() function. However, now that there is only ever one rcu_state structure in a given build of the Linux kernel, and that flavor uses plain old call_rcu(), there is not a lot of point in continuing to have the ->call field. This commit therefore removes it. Signed-off-by: Paul E. McKenney commit 358be2d3685cb0cca49c914e89824467ee0b589c Author: Paul E. McKenney Date: Tue Jul 3 14:15:31 2018 -0700 rcu: Remove RCU_STATE_INITIALIZER() Now that a given build of the Linux kernel has only one set of rcu_state, rcu_node, and rcu_data structures, there is no point in creating a macro to declare and compile-time initialize them. This commit therefore just does normal declaration and compile-time initialization of these structures. While in the area, this commit also removes #ifndefs of the no-longer-ever-defined preprocessor macro RCU_TREE_NONCORE. Signed-off-by: Paul E. McKenney commit 709fdce7545c978e69f52eb19082ea3af44332f5 Author: Paul E. McKenney Date: Tue Jul 3 10:44:44 2018 -0700 rcu: Express Tiny RCU updates in terms of RCU rather than RCU-sched This commit renames Tiny RCU functions so that the lowest level of functionality is RCU (e.g., synchronize_rcu()) rather than RCU-sched (e.g., synchronize_sched()). This provides greater naming compatibility with Tree RCU, which will in turn permit more LoC removal once the RCU-sched and RCU-bh update-side API is removed. Signed-off-by: Paul E. McKenney [ paulmck: Fix Tiny call_rcu()'s EXPORT_SYMBOL() in response to a bug report from kbuild test robot. ] commit 45975c7d21a1c0aba97e3d8007e2a7c123145748 Author: Paul E. McKenney Date: Mon Jul 2 14:30:37 2018 -0700 rcu: Define RCU-sched API in terms of RCU for Tree RCU PREEMPT builds Now that RCU-preempt knows about preemption disabling, its implementation of synchronize_rcu() works for synchronize_sched(), and likewise for the other RCU-sched update-side API members. This commit therefore confines the RCU-sched update-side code to CONFIG_PREEMPT=n builds, and defines RCU-sched's update-side API members in terms of those of RCU-preempt. This means that any given build of the Linux kernel has only one update-side flavor of RCU, namely RCU-preempt for CONFIG_PREEMPT=y builds and RCU-sched for CONFIG_PREEMPT=n builds. This in turn means that kernels built with CONFIG_RCU_NOCB_CPU=y have only one rcuo kthread per CPU. Signed-off-by: Paul E. McKenney Cc: Andi Kleen commit 4cf439a200fd621f838270c36c853407a934bcb5 Author: Paul E. McKenney Date: Mon Jul 2 12:15:25 2018 -0700 rcu: Fix typo in rcu_get_gp_kthreads_prio() header comment Signed-off-by: Paul E. McKenney commit 2bbfc25b09dff6335acf4103c6c7c4591e62988b Author: Paul E. McKenney Date: Mon Jul 2 09:17:57 2018 -0700 rcu: Drop "wake" parameter from rcu_report_exp_rdp() The rcu_report_exp_rdp() function is always invoked with its "wake" argument set to "true", so this commit drops this parameter. The only potential call site that would use "false" is in the code driving the expedited grace period, and that code uses rcu_report_exp_cpu_mult() instead, which therefore retains its "wake" parameter. Signed-off-by: Paul E. McKenney commit 82fcecfa81855924cc69f3078113cf63dd6c2964 Author: Paul E. McKenney Date: Mon Jul 2 09:04:27 2018 -0700 rcu: Update comments and help text for no more RCU-bh updaters This commit updates comments and help text to account for the fact that RCU-bh update-side functions are now simple wrappers for their RCU or RCU-sched counterparts. Signed-off-by: Paul E. McKenney commit 65cfe3583b612a22e12fba9a7bbd2d37ca5ad941 Author: Paul E. McKenney Date: Sun Jul 1 07:40:52 2018 -0700 rcu: Define RCU-bh update API in terms of RCU Now that the main RCU API knows about softirq disabling and softirq's quiescent states, the RCU-bh update code can be dispensed with. This commit therefore removes the RCU-bh update-side implementation and defines RCU-bh's update-side API in terms of that of either RCU-preempt or RCU-sched, depending on the setting of the CONFIG_PREEMPT Kconfig option. In kernels built with CONFIG_RCU_NOCB_CPU=y this has the knock-on effect of reducing by one the number of rcuo kthreads per CPU. Signed-off-by: Paul E. McKenney commit ba1c64c27239373be1b3d88cf0a9ac1b10fa871f Author: Paul E. McKenney Date: Sat Jun 30 15:23:37 2018 -0700 rcu: Report expedited grace periods at context-switch time This commit reduces the latency of expedited RCU grace periods by reporting a quiescent state for the CPU at context-switch time. In CONFIG_PREEMPT=y kernels, if the outgoing task is still within an RCU read-side critical section (and thus still blocking some grace period, perhaps including this expedited grace period), then that task will already have been placed on one of the leaf rcu_node structures' ->blkd_tasks list. Signed-off-by: Paul E. McKenney commit d28139c4e96713d52a300fb9036c5be2f45e0741 Author: Paul E. McKenney Date: Thu Jun 28 14:45:25 2018 -0700 rcu: Apply RCU-bh QSes to RCU-sched and RCU-preempt when safe One necessary step towards consolidating the three flavors of RCU is to make sure that the resulting consolidated "one flavor to rule them all" correctly handles networking denial-of-service attacks. One thing that allows RCU-bh to do so is that __do_softirq() invokes rcu_bh_qs() every so often, and so something similar has to happen for consolidated RCU. This must be done carefully. For example, if a preemption-disabled region of code takes an interrupt which does softirq processing before returning, consolidated RCU must ignore the resulting rcu_bh_qs() invocations -- preemption is still disabled, and that means an RCU reader for the consolidated flavor. This commit therefore creates a new rcu_softirq_qs() that is called only from the ksoftirqd task, thus avoiding the interrupted-a-preempted-region problem. This new rcu_softirq_qs() function invokes rcu_sched_qs(), rcu_preempt_qs(), and rcu_preempt_deferred_qs(). The latter call handles any deferred quiescent states. Note that __do_softirq() still invokes rcu_bh_qs(). It will continue to do so until a later stage of cleanup when the RCU-bh flavor is removed. Signed-off-by: Paul E. McKenney [ paulmck: Fix !SMP issue located by kbuild test robot. ] commit e11ec65cc8d63c41fc468363b65826a5ae4b8c66 Author: Paul E. McKenney Date: Thu Jun 28 12:45:23 2018 -0700 rcu: Add warning to detect half-interrupts RCU's dyntick-idle code is written to tolerate half-interrupts, that it, either an interrupt that invokes rcu_irq_enter() but never invokes the corresponding rcu_irq_exit() on the one hand, or an interrupt that never invokes rcu_irq_enter() but does invoke the "corresponding" rcu_irq_exit() on the other. These things really did happen at one time, as evidenced by this ca-2011 LKML post: http://lkml.kernel.org/r/20111014170019.GE2428@linux.vnet.ibm.com The reason why RCU tolerates half-interrupts is that usermode helpers used exceptions to invoke a system call from within the kernel such that the system call did a normal return (not a return from exception) to the calling context. This caused rcu_irq_enter() to be invoked without a matching rcu_irq_exit(). However, usermode helpers have since been rewritten to make much more housebroken use of workqueues, kernel threads, and do_execve(), and therefore should no longer produce half-interrupts. No one knows of any other source of half-interrupts, but then again, no one seems insane enough to go audit the entire kernel to verify that half-interrupts really are a relic of the past. This commit therefore adds a pair of WARN_ON_ONCE() calls that will trigger in the presence of half interrupts, which the code will continue to handle correctly. If neither of these WARN_ON_ONCE() trigger by mid-2021, then perhaps RCU can stop handling half-interrupts, which would be a considerable simplification. Reported-by: Steven Rostedt Reported-by: Joel Fernandes Reported-by: Andy Lutomirski Signed-off-by: Paul E. McKenney Reviewed-by: Joel Fernandes (Google) commit fcc878e4dfb70128a73857c609d70570629b0d9e Author: Paul E. McKenney Date: Thu Jun 28 07:39:59 2018 -0700 rcu: Remove now-unused ->b.exp_need_qs field from the rcu_special union The ->b.exp_need_qs field is now set only to false, so this commit removes it. The job this field used to do is now done by the rcu_data structure's ->deferred_qs field, which is a consequence of a better split between task-based (the rcu_node structure's ->exp_tasks field) and CPU-based (the aforementioned rcu_data structure's ->deferred_qs field) tracking of quiescent states for RCU-preempt expedited grace periods. Signed-off-by: Paul E. McKenney commit 27c744e32a9a4066daca0ee7496819bff78c1b37 Author: Paul E. McKenney Date: Wed Jun 27 21:48:00 2018 -0700 rcu: Allow processing deferred QSes for exiting RCU-preempt readers If an RCU-preempt read-side critical section is exiting, that is, ->rcu_read_lock_nesting is negative, then it is a good time to look at the possibility of reporting deferred quiescent states. This commit therefore updates the checks in rcu_preempt_need_deferred_qs() to allow exiting critical sections to report deferred quiescent states. Signed-off-by: Paul E. McKenney commit c0335743c5d80233753d81a4c7d22b7437363a8f Author: Paul E. McKenney Date: Thu Jun 21 16:17:46 2018 -0700 rcutorture: Test extended "rcu" read-side critical sections This commit makes the "rcu" torture type test extended read-side critical sections in order to test the deferral of RCU-preempt quiescent-state testing. In CONFIG_PREEMPT=n kernels, this simply duplicates the setup already in place for the "sched" torture type. Signed-off-by: Paul E. McKenney commit 3e31009898699dfca823893054748d85048dc7b3 Author: Paul E. McKenney Date: Thu Jun 21 12:50:01 2018 -0700 rcu: Defer reporting RCU-preempt quiescent states when disabled This commit defers reporting of RCU-preempt quiescent states at rcu_read_unlock_special() time when any of interrupts, softirq, or preemption are disabled. These deferred quiescent states are reported at a later RCU_SOFTIRQ, context switch, idle entry, or CPU-hotplug offline operation. Of course, if another RCU read-side critical section has started in the meantime, the reporting of the quiescent state will be further deferred. This also means that disabling preemption, interrupts, and/or softirqs will act as an RCU-preempt read-side critical section. This is enforced by checking preempt_count() as needed. Some special cases must be handled on an ad-hoc basis, for example, context switch is a quiescent state even though both the scheduler and do_exit() disable preemption. In these cases, additional calls to rcu_preempt_deferred_qs() override the preemption disabling. Similar logic overrides disabled interrupts in rcu_preempt_check_callbacks() because in this case the quiescent state happened just before the corresponding scheduling-clock interrupt. In theory, this change lifts a long-standing restriction that required that if interrupts were disabled across a call to rcu_read_unlock() that the matching rcu_read_lock() also be contained within that interrupts-disabled region of code. Because the reporting of the corresponding RCU-preempt quiescent state is now deferred until after interrupts have been enabled, it is no longer possible for this situation to result in deadlocks involving the scheduler's runqueue and priority-inheritance locks. This may allow some code simplification that might reduce interrupt latency a bit. Unfortunately, in practice this would also defer deboosting a low-priority task that had been subjected to RCU priority boosting, so real-time-response considerations might well force this restriction to remain in place. Because RCU-preempt grace periods are now blocked not only by RCU read-side critical sections, but also by disabling of interrupts, preemption, and softirqs, it will be possible to eliminate RCU-bh and RCU-sched in favor of RCU-preempt in CONFIG_PREEMPT=y kernels. This may require some additional plumbing to provide the network denial-of-service guarantees that have been traditionally provided by RCU-bh. Once these are in place, CONFIG_PREEMPT=n kernels will be able to fold RCU-bh into RCU-sched. This would mean that all kernels would have but one flavor of RCU, which would open the door to significant code cleanup. Moving to a single flavor of RCU would also have the beneficial effect of reducing the NOCB kthreads by at least a factor of two. Signed-off-by: Paul E. McKenney [ paulmck: Apply rcu_read_unlock_special() preempt_count() feedback from Joel Fernandes. ] [ paulmck: Adjust rcu_eqs_enter() call to rcu_preempt_deferred_qs() in response to bug reports from kbuild test robot. ] [ paulmck: Fix bug located by kbuild test robot involving recursion via rcu_preempt_deferred_qs(). ] commit cf7614e13c8fcaf290c5ffaa04b2e1b4f704a52a Author: Byungchul Park Date: Fri Jun 22 15:12:06 2018 +0900 rcu: Refactor rcu_{nmi,irq}_{enter,exit}() When entering or exiting irq or NMI handlers, the current code uses ->dynticks_nmi_nesting to detect if it is in the outermost handler, that is, the one interrupting or returning to an RCU-idle context (the idle loop or nohz_full usermode execution). When entering the outermost handler via an interrupt (as opposed to NMI), it is necessary to invoke rcu_dynticks_task_exit() just before the CPU is marked non-idle from an RCU perspective and to invoke rcu_cleanup_after_idle() just after the CPU is marked non-idle. Similarly, when exiting the outermost handler via an interrupt, it is necessary to invoke rcu_prepare_for_idle() just before marking the CPU idle and to invoke rcu_dynticks_task_enter() just after marking the CPU idle. The decision to execute these four functions is currently taken in rcu_irq_enter() and rcu_irq_exit() as follows: rcu_irq_enter() /* A conditional branch with ->dynticks_nmi_nesting */ rcu_nmi_enter() /* A conditional branch with ->dynticks */ /* A conditional branch with ->dynticks_nmi_nesting */ rcu_irq_exit() /* A conditional branch with ->dynticks_nmi_nesting */ rcu_nmi_exit() /* A conditional branch with ->dynticks_nmi_nesting */ /* A conditional branch with ->dynticks_nmi_nesting */ rcu_nmi_enter() /* A conditional branch with ->dynticks */ rcu_nmi_exit() /* A conditional branch with ->dynticks_nmi_nesting */ This works, but the conditional branches in rcu_irq_enter() and rcu_irq_exit() are redundant with those in rcu_nmi_enter() and rcu_nmi_exit(), respectively. Redundant branches are not something we want in the to/from-idle fastpaths, so this commit refactors rcu_{nmi,irq}_{enter,exit}() so they use a common inlined function passed a constant argument as follows: rcu_irq_enter() inlining rcu_nmi_enter_common(irq=true) /* A conditional branch with ->dynticks */ rcu_irq_exit() inlining rcu_nmi_exit_common(irq=true) /* A conditional branch with ->dynticks_nmi_nesting */ rcu_nmi_enter() inlining rcu_nmi_enter_common(irq=false) /* A conditional branch with ->dynticks */ rcu_nmi_exit() inlining rcu_nmi_exit_common(irq=false) /* A conditional branch with ->dynticks_nmi_nesting */ The combination of the constant function argument and the inlining allows the compiler to discard the conditionals that previously controlled execution of rcu_dynticks_task_exit(), rcu_cleanup_after_idle(), rcu_prepare_for_idle(), and rcu_dynticks_task_enter(). This reduces both the to-idle and from-idle path lengths by two conditional branches each, and improves readability as well. This commit also changes order of execution from this: rcu_dynticks_task_exit(); rcu_dynticks_eqs_exit(); trace_rcu_dyntick(); rcu_cleanup_after_idle(); To this: rcu_dynticks_task_exit(); rcu_dynticks_eqs_exit(); rcu_cleanup_after_idle(); trace_rcu_dyntick(); In other words, the calls to rcu_cleanup_after_idle() and trace_rcu_dyntick() are reversed. This has no functional effect because the real concern is whether a given call is before or after the call to rcu_dynticks_eqs_exit(), and this patch does not change that. Before the call to rcu_dynticks_eqs_exit(), RCU is not yet watching the current CPU and after that call RCU is watching. A similar switch in calling order happens on the idle-entry path, with similar lack of effect for the same reasons. Suggested-by: Paul E. McKenney Signed-off-by: Byungchul Park Signed-off-by: Paul E. McKenney [ paulmck: Applied Steven Rostedt feedback. ] Reviewed-by: Steven Rostedt (VMware) commit 0b85de7cef013eeaf5cc873f0fd127ccfc2413be Author: Alexey Khoroshilov Date: Wed Aug 22 00:05:32 2018 +0300 clk: cdce925: release child device nodes of_get_child_by_name() returns device node with refcount incremented, but there is no decrement in cdce925_probe(). The patch adds one. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov Signed-off-by: Stephen Boyd commit 681cd4a890e394b91b0b5df0d7f6095d3ae83193 Author: Gustavo A. R. Silva Date: Sat Aug 4 19:22:22 2018 -0500 clk: qcom: clk-branch: Use true and false for boolean values Return statements in functions returning bool should use true or false instead of an integer value. This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Stephen Boyd commit 2bdb2a1cca8669cfe15be62b8f1ed966e374585b Author: Douglas Anderson Date: Thu Aug 30 10:34:37 2018 -0700 clk: qcom: Allocate space for NULL terimation in DFS table The table allocated in clk_rcg2_dfs_populate_freq_table() is eventually iterated over by qcom_find_freq() which assumes that the table is NULL terminated. Allocate one extra space in the array for the NULL termination. Initting of the NULL termination is implicit due to kcalloc(). Fixes: cc4f6944d0e3 ("clk: qcom: Add support for RCG to register for DFS") Signed-off-by: Douglas Anderson Signed-off-by: Stephen Boyd commit 00a461cc32ec27fa7bd9c874a7b36b0c6c542c12 Author: Johan Hovold Date: Wed Aug 22 11:03:19 2018 +0200 clk: ti: fix OF child-node lookup Fix child-node lookup which by using the wrong OF helper was searching the whole tree depth-first, something which could end up matching an unrelated node. Also fix the related node-reference leaks. Fixes: 5b385a45e001 ("clk: ti: add support for clkctrl aliases") Signed-off-by: Johan Hovold Acked-by: Tero Kristo Signed-off-by: Stephen Boyd commit 030e46e495af855a13964a0aab9753ea82a96edc Author: Vijay Immanuel Date: Wed Jun 13 18:48:07 2018 -0700 IB/rxe: fixes for rdma read retry When a read request is retried for the remaining partial data, the response may restart from read response first or read response only. So support those cases. Do not advance the comp psn beyond the current wqe's last_psn as that could skip over an entire read wqe and will cause the req_retry() logic to set an incorrect req psn. An example sequence is as follows: Write PSN 40 -- this is the current WQE. Read request PSN 41 Write PSN 42 Receive ACK PSN 42 -- this will complete the current WQE for PSN 40, and set the comp psn to 42 which is a problem because the read request at PSN 41 has been skipped over. So when req_retry() tries to retransmit the read request, it sets the req psn to 42 which is incorrect. When retrying a read request, calculate the number of psns completed based on the dma resid instead of the wqe first_psn. The wqe first_psn could have moved if the read request was retried multiple times. Set the reth length to the dma resid to handle read retries for the remaining partial data. Signed-off-by: Vijay Immanuel Signed-off-by: Doug Ledford commit 4e4c53df567714b3d08b2b5d8ccb1d175fc9be01 Author: Vijay Immanuel Date: Wed Jun 13 18:47:30 2018 -0700 IB/rxe: avoid back-to-back retries Error retries can occur due to timeouts, NAKs or receiving packets beyond the current read request. Avoid back-to-back retries due to packet processing, by only retrying the initial attempt immediately. Subsequent retries must be due to timeouts. Continue to process completion packets after scheduling a retry. Signed-off-by: Vijay Immanuel Signed-off-by: Doug Ledford commit b97db58557f4aa6d9903f8e1deea6b3d1ed0ba43 Author: Vijay Immanuel Date: Tue Jun 12 18:20:49 2018 -0700 IB/rxe: fix for duplicate request processing and ack psns Don't reset the resp opcode for a replayed read response. The resp opcode could be in the middle of a write or send sequence, when the duplicate read request was received. An example sequence is as follows: - Receive read request for 12KB PSN 20. Transmit read response first, middle and last with PSNs 20,21,22. - Receive write first PSN 23. At this point the resp psn is 24 and resp opcode is write first. - The sender notices that PSN 20 is dropped and retransmits. Receive read request for 12KB PSN 20. Transmit read response first, middle and last with PSNs 20,21,22. The resp opcode is set to -1, the resp psn remains 24. - Receive write first PSN 23. This is processed by duplicate_request(). The resp opcode remains -1 and resp psn remains 24. - Receive write middle PSN 24. check_op_seq() reports a missing first error since the resp opcode is -1. When sending an ack for a duplicate send or write request, use the psn of the previous ack sent. Do not use the psn of a read response for the ack. An example sequence is as follows: - Receive write PSN 30. Transmit ACK for PSN 30. - Receive read request 4KB PSN 31. Transmit read response with PSN 31. The resp psn is now 32. - The sender notices that PSN 30 is dropped and retransmits. Receive write PSN 30. duplicate_request() sends an ACK with PSN 31. That is incorrect since PSN 31 was a read request. Signed-off-by: Vijay Immanuel Signed-off-by: Doug Ledford commit 5907cf6c5bbe78be2ed18b875b316c6028b20634 Author: Patryk Małek Date: Tue Aug 28 10:16:09 2018 -0700 i40e: Prevent deleting MAC address from VF when set by PF To prevent VF from deleting MAC address that was assigned by the PF we need to check for that scenario when we try to delete a MAC address from a VF. Signed-off-by: Patryk Małek Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit babbcc60040abfb7a9e3caa1c58fe182ae73762a Author: Lihong Yang Date: Tue Aug 28 10:16:08 2018 -0700 i40evf: cancel workqueue sync for adminq when a VF is removed If a VF is being removed, there is no need to continue with the workqueue sync for the adminq task, thus cancel it. Without this call, when VFs are created and removed right away, there might be a chance for the driver to crash with events stuck in the adminq. Signed-off-by: Lihong Yang Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 5cba17b14182696d6bb0ec83a1d087933f252241 Author: Patryk Małek Date: Tue Aug 28 10:16:03 2018 -0700 i40e: hold the rtnl lock on clearing interrupt scheme Hold the rtnl lock when we're clearing interrupt scheme in i40e_shutdown and in i40e_remove. Signed-off-by: Patryk Małek Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 3bd77e2ae1477d6f87fc3f542c737119d5decf9f Author: Patryk Małek Date: Tue Aug 28 10:16:02 2018 -0700 i40evf: Don't enable vlan stripping when rx offload is turned on With current implementation of i40evf_set_features when user sets any offload via ethtool we set I40EVF_FLAG_AQ_ENABLE_VLAN_STRIPPING as a required aq which triggers driver to call i40evf_enable_vlan_stripping. This shouldn't take place. This patches fixes it by setting the flag only when VLAN offload is turned on. Signed-off-by: Patryk Małek Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit e78d9a39fd06109022d11c8ca444cfcec2abb290 Author: Jan Sokolowski Date: Tue Aug 28 10:16:01 2018 -0700 i40e: Check and correct speed values for link on open If our card has been put in an unstable state due to other drivers interacting with it, speed settings might be incorrect. If incorrect, forcefully reset them on open to known default values. Signed-off-by: Jan Sokolowski Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit cdec2141c24ef177d929765c5a6f95549c266fb3 Author: Björn Töpel Date: Fri Aug 24 13:21:59 2018 +0200 i40e: report correct statistics when XDP is enabled When XDP is enabled, the driver will report incorrect statistics. Received frames will reported as transmitted frames. This commits fixes the i40e implementation of ndo_get_stats64 (struct net_device_ops), so that iproute2 will report correct statistics (e.g. when running "ip -stats link show dev eth0") even when XDP is enabled. Reported-by: Jesper Dangaard Brouer Fixes: 74608d17fe29 ("i40e: add support for XDP_TX action") Signed-off-by: Björn Töpel Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit cfe396991ad7763bd82e3b976b218ef59c777022 Author: Martyna Szapar Date: Mon Aug 20 08:12:33 2018 -0700 i40e: static analysis report from community Static analysis tools report a problem from original driver submission. Removing unnecessary check in condition. Signed-off-by: Martyna Szapar Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit a4e0109a19c554e44c832958e426303781e1ad30 Author: Harshitha Ramamurthy Date: Mon Aug 20 08:12:32 2018 -0700 virtchnl: use u8 type for a field in the virtchnl_filter struct The virtchnl_filter struct has a field called field_flags. A previous commit mistakenly had the type to be a __u8. What we want is for the field to be an unsigned 8 bit value, so let's just use the existing kernel type u8 for that. Signed-off-by: Harshitha Ramamurthy Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit e65aae086330d0a6c6c9f874aef03c69cf98884b Author: Lihong Yang Date: Mon Aug 20 08:12:31 2018 -0700 i40evf: set IFF_UNICAST_FLT flag for the VF Set IFF_UNICAST_FLT flag for the VF to prevent it from entering promiscuous mode when macvlan is added to the VF. Signed-off-by: Lihong Yang Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 7eb74ff891b4e94b8bac48f648a21e4b94ddee64 Author: Mitch Williams Date: Mon Aug 20 08:12:30 2018 -0700 i40e: use correct length for strncpy Caught by GCC 8. When we provide a length for strncpy, we should not include the terminating null. So we must tell it one less than the size of the destination buffer. Signed-off-by: Mitch Williams Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 3c818910911c93bb5099c6637ec350f90c0e71fc Author: Paul M Stillwell Jr Date: Mon Aug 20 08:12:29 2018 -0700 i40evf: Validate the number of queues a PF sends A PF can send any number of queues to the VF and the VF may not be able to support that many. Check to see that the number of queues is less than or equal to the max number of queues the VF can have. Signed-off-by: Paul M Stillwell Jr Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit ae1e29f671b467f3e9e9aa2b82ee40e4300ea810 Author: Paweł Jabłoński Date: Mon Aug 20 08:12:26 2018 -0700 i40evf: Change a VF mac without reloading the VF driver Add possibility to change a VF mac address from host side without reloading the VF driver on the guest side. Without this patch it is not possible to change the VF mac because executing i40evf_virtchnl_completion function with VIRTCHNL_OP_GET_VF_RESOURCES opcode resets the VF mac address to previous value. Signed-off-by: Paweł Jabłoński Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 6dba41cd02fc0c408ae9a99809e1960a691dfad0 Author: Jacob Keller Date: Mon Aug 20 08:12:25 2018 -0700 i40evf: update ethtool stats code and use helper functions Fix a bug in the way we handled VF queues, by always showing stats for the maximum number of queues, even if they aren't allocated. It is not safe to change the number of strings reported to ethtool, as grabbing statistics occurs over multiple ethtool ops for which the rtnl_lock() cannot be held the entire time. Avoid this by always reporting queue stats for the maximum number of queues in the netdevice. Share some of the helper functionality for adding stats with the PF code in i40e_ethtool_stats.h This should reduce the chance of potential future bugs, and make adding new statistics easier. Note for the queue stats, unlike the PF driver we do not keep an array of queue pointers, but an array of queues, so care must be taken to avoid accessing queue memory that hasn't yet been allocated. Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 8fd75c58a09a571543b5b61e49171bb3a1d88c19 Author: Jacob Keller Date: Mon Aug 20 08:12:24 2018 -0700 i40e: move ethtool stats boiler plate code to i40e_ethtool_stats.h Move the boiler plate structures and helper functions we recently added into their own header file, so that the complete collection is located together. Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 4b59938b209efedc4277e99be0ec7ddbc66fed10 Author: Jacob Keller Date: Mon Aug 20 08:12:23 2018 -0700 i40e: convert queue stats to i40e_stats array Use an i40e_stats array to handle the queue stats, instead of coding similar functionality separately. Because of how the queue stats are accessed on some kernels, we can't easily use i40e_add_ethtool_stats. Instead, implement a separate helper, i40e_add_queue_stats, which we'll use instead. This helper will correctly implement the u64_stats_fetch_begin_irq logic and allow retries until successful. We share the most complex code by re-using i40e_add_one_ethtool_stat. This logic additionally easily supports skipping disabled rings by using a ternary operator before calling the u64_stats_fetch_begin_irq() function, so that we correctly zero-out the stats values without having to perform two separate sections of code. This significantly reduces the boiler plate code in i40e_get_ethtool_stats, and helps keep the complex logic contained to as few functions as possible. With this patch, we've finally converted all the statistics to use the helpers and the i40e_stats function. Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 1703129ed2c12c112889f471bddf242012791b47 Author: Parav Pandit Date: Mon Aug 27 08:44:17 2018 +0300 IB/rxe: Refactor lookup memory function Consolidate all error checks under single if() condition and use helper unlikely() macro for them, in addition drop unneeded goto labels. rxe_pool_get_index() already provides RB tree based efficient lookup. Avoid doing extra checks for error cases which are rare and already covered by rxe_pool_get_index(). Signed-off-by: Parav Pandit Reviewed-by: Daniel Jurgens Signed-off-by: Leon Romanovsky Reviewed-by: Yuval Shaia Signed-off-by: Doug Ledford commit 536a631d1ec1de6ed51453954407068c10473eea Author: Parav Pandit Date: Mon Aug 27 08:44:16 2018 +0300 IB/rxe: Avoid NULL check when search is successful While performing lookup in a pool, if entry is found, take the reference right there, instead of checking again outside the loop and save one branch. Signed-off-by: Parav Pandit Reviewed-by: Daniel Jurgens Signed-off-by: Leon Romanovsky Reviewed-by: Yuval Shaia Signed-off-by: Doug Ledford commit 3ccf19e25adf2d3b9c5f1e65b950b6d223e1c4c0 Author: Parav Pandit Date: Mon Aug 27 08:44:15 2018 +0300 IB/rxe: Change pool state enums to capital letters Normal practice is to have enum defines in capital letters. Signed-off-by: Parav Pandit Reviewed-by: Daniel Jurgens Signed-off-by: Leon Romanovsky Reviewed-by: Yuval Shaia Signed-off-by: Doug Ledford commit 66d0f207dbf0e983c8006eb2fc5060163646210f Author: Parav Pandit Date: Mon Aug 27 08:44:14 2018 +0300 IB/rxe: Replace spinlock with rwlock Concurrent readers which read rb tree are protected using read lock. Concurrent writers which add element to pool are protected using write lock. Signed-off-by: Parav Pandit Reviewed-by: Daniel Jurgens Signed-off-by: Leon Romanovsky Reviewed-by: Yuval Shaia Signed-off-by: Doug Ledford commit 3db2bceb29fd9a2f31d5df573f337dbba577f8e9 Author: Parav Pandit Date: Tue Aug 28 13:51:37 2018 +0300 IB/rxe: Simplify rxe_find_route() to avoid GID query for netdev rxe_prepare() is called on an skb which has ndev already initialized by rxe_init_packet(). Therefore avoid querying the GID attribute again and use the available netdevice from the skb->dev. Signed-off-by: Parav Pandit Reviewed-by: Daniel Jurgens Reviewed-by: Yuval Shaia Tested-by: Yuval Shaia Signed-off-by: Zhu Yanjun Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford commit 8b7b59d030cc0d34b83b0c556bb6365c9ae6ba77 Author: Zhu Yanjun Date: Sun Aug 19 15:04:01 2018 +0800 IB/rxe: remove redudant qpn check In the commit 536ca245c512 ("IB/rxe: Drop QP0 silently"), if qpn is zero, the function directly returns. So in the following function, it is not necessary to check qpn. The qpn check in the function check_keys is removed. Fixes: 536ca245c512 ("IB/rxe: Drop QP0 silently") CC: Srinivas Eeda CC: Junxiao Bi Signed-off-by: Zhu Yanjun Reviewed-by: Yuval Shaia Signed-off-by: Doug Ledford commit d3c04a3a6870a4b96ee213d99b4f4ca723e64025 Author: Vijay Immanuel Date: Thu Jul 5 18:43:47 2018 -0700 IB/rxe: vary the source udp port for receive scaling Select the source udp port number for a QP based on the source QPN. This provides a better spread of traffic across NIC RX queues for RC/UC QPs. Signed-off-by: Vijay Immanuel Signed-off-by: Doug Ledford commit 35d017947401d9f449a7e55e52506744e0c62577 Author: Mathias Kresin Date: Wed Aug 22 22:38:06 2018 +0200 MIPS: ralink: Add rt3352 SPI_CS1 pinmux The rt3352 has a pin that can be used as second spi chip select, watchdog reset or GPIO. The pinmux setup was missing the definition of said pin. The pin is configured via the same bit on rt5350, so reuse the existing macro. Signed-off-by: Mathias Kresin Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/20301/ Cc: John Crispin Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org commit 4eb2534057b1b01014a2b2bb6898d9934d2ba831 Author: Codrin Ciubotariu Date: Wed Aug 29 19:47:55 2018 +0300 ARM: multi_v7_defconfig: add Atmel I2S driver Add atmel-i2s driver CONFIG_SND_ATMEL_SOC_I2S. Signed-off-by: Codrin Ciubotariu Signed-off-by: Alexandre Belloni commit be62e019ce179d9776a673b8bb53fd4d42ff1522 Author: Codrin Ciubotariu Date: Wed Aug 29 19:47:54 2018 +0300 ARM: configs: at91: Add I2S driver to sama5 Add I2S CONFIG_SND_ATMEL_SOC_I2S to sama5_defconfig. Signed-off-by: Codrin Ciubotariu Signed-off-by: Alexandre Belloni commit 293201c27b50e5e122da458745c324239bfe69fe Author: Eugen Hristev Date: Wed Aug 29 17:17:44 2018 +0300 ARM: multi_v7_defconfig: add generic resistive touchscreen Add generic resistive touchscreen CONFIG_TOUCHSCREEN_ADC Signed-off-by: Eugen Hristev Signed-off-by: Alexandre Belloni commit d68f8918b82275ee45e7c3753b68933f6a02233b Author: Eugen Hristev Date: Wed Aug 29 17:17:43 2018 +0300 ARM: configs: at91: add generic resistive touchscreen to sama5 Add generic resistive touchscreen CONFIG_TOUCHSCREEN_ADC to sama5_defconfig Signed-off-by: Eugen Hristev Signed-off-by: Alexandre Belloni commit 4adb6603ddefbd068555036bbad014d3e0493893 Author: Robert Jarzmik Date: Sun Jul 15 21:47:18 2018 +0200 ARM: dts: pxa: change serial node names Change from xxuart to serial to normalize the devicetree pxa serial support. Signed-off-by: Robert Jarzmik commit 58094c48f4079cfc784f53a73caaa446db436389 Author: Kim Phillips Date: Mon Aug 27 15:08:07 2018 -0500 perf annotate: Handle arm64 move instructions Add default handler for non-jump instructions. This really only has an effect on instructions that compute a PC-relative address, such as 'adrp,' as seen in these couple of examples: BEFORE: adrp x0, ffff20000aa11000 AFTER: adrp x0, kallsyms_token_index+0xce000 BEFORE: adrp x23, ffff20000ae94000 <__per_cpu_load> AFTER: adrp x23, __per_cpu_load The implementation is identical to that of s390, but with a slight adjustment for objdump whitespace propagation (arm64 objdump puts spaces after commas, whereas s390's presumably doesn't). The mov__scnprintf() declaration is moved from s390's to arm64's instructions.c because arm64's gets included before s390's. Committer testing: Ran 'perf annotate --stdio2 > /tmp/{before,after}' no diff. Signed-off-by: Kim Phillips Tested-by: Arnaldo Carvalho de Melo Tested-by: Thomas Richter Cc: Alexander Shishkin Cc: Greg Kroah-Hartman Cc: Hendrik Brueckner Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/20180827150807.304110d2e9919a17c832ca48@arm.com Signed-off-by: Arnaldo Carvalho de Melo commit 3de3e8bbf302545ef9acebb9f900939ac5c3820f Author: Benjamin Peterson Date: Mon Aug 27 20:53:44 2018 -0700 perf trace beauty: Alias 'umount' to 'umount2' Before: # perf trace -e *mount* umount /dev/mapper/fedora-home /s 11.576 ( 0.004 ms) umount/3138 umount2(arg0: 94501956754656, arg1: 0, arg2: 1, arg3: 140051050083104, arg4: 4, arg5: 94501956755136) = -1 EINVAL Invalid argument # After: # perf trace -e *mount* umount /s 0.000 ( 9.241 ms): umount/5251 umount2(name: 0x55f74a986480) = 0 Signed-off-by: Benjamin Peterson Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20180828035344.31500-1-benjamin@python.org [ split from a larger patch ] Signed-off-by: Arnaldo Carvalho de Melo commit 088519f318be3a41d1afe8d628c4a1eb5a50b4c0 Author: Jiri Olsa Date: Thu Aug 30 08:32:52 2018 +0200 perf stat: Move the display functions to stat-display.c Move perf_evlist__print_counters() with all its dependency functions to the stat-display.c object. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20180830063252.23729-44-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit d0192fdba09a8901db133fe5a1fcd22d40fcf545 Author: Jiri Olsa Date: Thu Aug 30 08:32:51 2018 +0200 perf stat: Move 'metric_events' to 'struct perf_stat_config' Move the static variable 'metric_events' to 'struct perf_stat_config', so that it can be passed around and used outside 'perf stat' command. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20180830063252.23729-43-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 54ac0b1bd25cbdeda226b32a0459e09de46157b3 Author: Jiri Olsa Date: Thu Aug 30 08:32:50 2018 +0200 perf stat: Move 'walltime_*' data to 'struct perf_stat_config' Move the static variables 'walltime_*' to 'struct perf_stat_config', so that it can be passed around and used outside 'perf stat' command. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20180830063252.23729-42-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit be54d59325314be9d4d53852cbfbeeaebc3b9239 Author: Jiri Olsa Date: Thu Aug 30 08:32:49 2018 +0200 perf stat: Propagate 'struct target' arg to sort_aggr_thread() Propagate the 'struct target' arg to sort_aggr_thread() so that the function does not depend on the 'perf stat' command object local variable 'target' and can be moved out. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20180830063252.23729-41-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit fdee335b00b0807e8d65b8e3d81214556f07bed3 Author: Jiri Olsa Date: Thu Aug 30 08:32:48 2018 +0200 perf stat: Move 'no_merge' data to 'struct perf_stat_config' Move the static variable 'no_merge' to 'struct perf_stat_config', so that it can be passed around and used outside 'perf stat' command. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20180830063252.23729-40-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 34ff0866d46ae206de884f54e7235f57096e5588 Author: Jiri Olsa Date: Thu Aug 30 08:32:47 2018 +0200 perf stat: Move 'big_num' data to 'struct perf_stat_config' Move the static variable 'big_num' to 'struct perf_stat_config', so that it can be passed around and used outside 'perf stat' command. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20180830063252.23729-39-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit a138af663500a07742bb27793302625135a0f6c4 Author: Jiri Olsa Date: Thu Aug 30 08:32:46 2018 +0200 perf stat: Do not use the global 'evsel_list' in print functions Get rid of the the 'evsel_list' global variable dependency, here we can use the 'evlist' pointer from the evsel. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20180830063252.23729-38-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 6f6b6594b5f380b0a972b66b275caa6c54bb1fea Author: Jiri Olsa Date: Thu Aug 30 08:32:45 2018 +0200 perf stat: Move *_aggr_* data to 'struct perf_stat_config' Move the *_aggr_* global variables to 'struct perf_stat_config', so that it can be passed around and used outside 'perf stat' command. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20180830063252.23729-37-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 8897a8916efb29fa8bbe9e5f6e5d56362aedf64e Author: Jiri Olsa Date: Thu Aug 30 08:32:44 2018 +0200 perf stat: Move ru_* data to 'struct perf_stat_config' Move the 'ru_*' global variables to 'struct perf_stat_config', so that it can be passed around and used outside the 'perf stat' command. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20180830063252.23729-36-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 3b3cd9a41c2b5d97309099ba6eae69b2d3177226 Author: Jiri Olsa Date: Thu Aug 30 08:32:43 2018 +0200 perf stat: Move 'print_mixed_hw_group_error' to 'struct perf_stat_config' Move the 'print_mixed_hw_group_error' global variable to 'struct perf_stat_config', so that it can be passed around and used outside the 'perf stat' command. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20180830063252.23729-35-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 31084123c1962dd4235655c1839a50c9cf6c709b Author: Jiri Olsa Date: Thu Aug 30 08:32:42 2018 +0200 perf stat: Move 'print_free_counters_hint' to 'struct perf_stat_config' Move the 'print_free_counters_hint' variable to 'struct perf_stat_config', so that it can be passed around and used outside the 'perf stat' command. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20180830063252.23729-34-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit aea0dca1629c72128cf7174d1d3f3807f7297005 Author: Jiri Olsa Date: Thu Aug 30 08:32:41 2018 +0200 perf stat: Move 'null_run' to 'struct perf_stat_config' Move the static 'null_run' variable to 'struct perf_stat_config', so that it can be passed around and used outside the 'perf stat' command. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20180830063252.23729-33-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 26893a6018f88779c0aded934e99e0ebb6859a58 Author: Jiri Olsa Date: Thu Aug 30 08:32:40 2018 +0200 perf stat: Add 'walltime_nsecs_stats' pointer to 'struct perf_stat_config' Add 'walltime_nsecs_stats' pointer to 'struct perf_stat_config', so that it can be passed around and used outside the 'perf stat' command. It's initialized to point to stat's walltime_nsecs_stats value. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20180830063252.23729-32-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 77e0faf8552c9329d58a4de460928e03252647c6 Author: Jiri Olsa Date: Thu Aug 30 08:32:39 2018 +0200 perf stat: Pass 'evlist' to aggr_update_shadow() Pass a 'evlist' argument to aggr_update_shadow(), to get rid of the global 'evsel_list' variable dependency. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20180830063252.23729-31-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit ae2d7da554f0dda837b6639d247665f6df90e41f Author: Jiri Olsa Date: Thu Aug 30 08:32:38 2018 +0200 perf stat: Pass 'struct perf_stat_config' to first_shadow_cpu() Pass a 'struct perf_stat_config' arg to first_shadow_cpu(), so that the function does not depend on the 'perf stat' command object local 'stat_config' variable and can then be moved out. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20180830063252.23729-30-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit ee1760e2cf623bc6834fc3e4e89c6ad030a25dfd Author: Jiri Olsa Date: Thu Aug 30 08:32:37 2018 +0200 perf stat: Move 'metric_only_len' to 'struct perf_stat_config' Move the static 'metric_only_len' variable to 'struct perf_stat_config', so that it can be passed around and used outside the 'perf stat' command. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20180830063252.23729-29-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit d97ae04b3d5263be242a6a9f9eef6422fc86326a Author: Jiri Olsa Date: Thu Aug 30 08:32:36 2018 +0200 perf stat: Move 'run_count' to 'struct perf_stat_config' Move the static 'run_count' variable to 'struct perf_stat_config', so that it can be passed around and used outside the 'perf stat' command. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20180830063252.23729-28-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 0c538a9462953dfcde2fe961aca2cf75c2747040 Author: Jiri Olsa Date: Thu Aug 30 08:32:35 2018 +0200 perf stat: Use 'evsel->evlist' instead of 'evsel_list' in collect_all_aliases() Use 'evsel->evlist' instead of 'evsel_list' in collect_all_aliases(), to get rid of the global 'evsel_list' variable dependency. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20180830063252.23729-27-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit bc0bcda201e87d62f0922fa664376355b0fc77ff Author: Jiri Olsa Date: Thu Aug 30 08:32:34 2018 +0200 perf stat: Pass 'evlist' argument to print functions Add 'evlist' argument to print functions to get rid of the global 'evsel_list' variable dependency. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20180830063252.23729-26-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit c512e0eae4c63be8c5964c3942b2e9c04dcd459e Author: Jiri Olsa Date: Thu Aug 30 08:32:33 2018 +0200 perf stat: Add 'target' argument to perf_evlist__print_counters() Add 'struct target' argument to perf_evlist__print_counters(), so the function does not depend on the 'perf stat' command object local target and can be moved out. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20180830063252.23729-25-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit df4f7b4d4b1e61e6b16ac2e3760be46bac86e4f4 Author: Jiri Olsa Date: Thu Aug 30 08:32:32 2018 +0200 perf stat: Move 'unit_width' to 'struct perf_stat_config' Move the static 'unit_width' variable to 'struct perf_stat_config', so it can be passed around and used outside the 'perf stat' command. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20180830063252.23729-24-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 0ce5aa0266604c77ee64882b70c980e843629177 Author: Jiri Olsa Date: Thu Aug 30 08:32:31 2018 +0200 perf stat: Move 'metric_only' to 'struct perf_stat_config' Move the static 'metric_only' variable to 'struct perf_stat_config', so it can be passed around and used outside the 'perf stat' command. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20180830063252.23729-23-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 132c6ba3c440fd21a45ff7f9d7a1f53813f4d0e3 Author: Jiri Olsa Date: Thu Aug 30 08:32:30 2018 +0200 perf stat: Move 'interval_clear' to 'struct perf_stat_config' Move the static 'interval_clear' variable to 'struct perf_stat_config', so it can be passed around and used outside the 'perf stat' command. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20180830063252.23729-22-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit fa7070a38676d660c0a71ab6981bfdca3b340ccd Author: Jiri Olsa Date: Thu Aug 30 08:32:29 2018 +0200 perf stat: Move csv_* to 'struct perf_stat_config' Move the static csv_* variables to 'struct perf_stat_config', so that it can be passed around and used outside the 'perf stat' command. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20180830063252.23729-21-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 6ca9a082b1908ff7f8adedf08166043b83b266f6 Author: Jiri Olsa Date: Thu Aug 30 08:32:28 2018 +0200 perf stat: Pass a 'struct perf_stat_config' argument to global print functions Add 'struct perf_stat_config' argument to the global print functions, so that these functions can be used out of the 'perf stat' command code. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20180830063252.23729-20-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit f3ca50e61ff4aebfbefc666be2e064d277ad524c Author: Jiri Olsa Date: Thu Aug 30 08:32:27 2018 +0200 perf stat: Pass 'struct perf_stat_config' argument to local print functions Add 'struct perf_stat_config' argument to print functions, so that those functions can be moved out of the 'perf stat' command to a generic class in the following patches. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20180830063252.23729-19-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit b64df7f33743cd6095b4a007f5f15ff4432fbcf5 Author: Jiri Olsa Date: Thu Aug 30 08:32:26 2018 +0200 perf stat: Add 'struct perf_stat_config' argument to perf_evlist__print_counters() Add a 'struct perf_stat_config' argument to perf_evlist__print_counters(), so that it can be moved out of the 'perf stat' command to generic object in the following patches. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20180830063252.23729-18-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 0174820a8ba108f2e72dac5caaea3500c8ca6323 Author: Jiri Olsa Date: Thu Aug 30 08:32:25 2018 +0200 perf stat: Move STAT_RECORD out of perf_evlist__print_counters() It's stat related and should stay in the 'perf stat' command. The perf_evlist__print_counters function will be moved out in the following patches. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20180830063252.23729-17-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit a5a9eac1a018ad3bfcf9a3ec11eae99fd35f466b Author: Jiri Olsa Date: Thu Aug 30 08:32:24 2018 +0200 perf stat: Introduce perf_evlist__print_counters() To be in charge of printing out the stat output. It will be moved out of the 'perf stat' command in the following patches. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20180830063252.23729-16-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 0a4e64d391a2c771ae33e648cf84d4492369560c Author: Jiri Olsa Date: Thu Aug 30 08:32:23 2018 +0200 perf stat: Move perf_stat_synthesize_config() to stat.c So that it can be used globally. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20180830063252.23729-15-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit c2c247f2dd87706961fa16d033f9dbf173145e70 Author: Jiri Olsa Date: Thu Aug 30 08:32:22 2018 +0200 perf stat: Add 'perf_event__handler_t' argument to perf_stat_synthesize_config() So that it's completely independent and can be used outside the 'perf stat' command. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20180830063252.23729-14-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 1c21e9899d6a9ea72d4d678faa7b0ec22bcf59a9 Author: Jiri Olsa Date: Thu Aug 30 08:32:21 2018 +0200 perf stat: Add 'struct perf_evlist' argument to perf_stat_synthesize_config() Get rid of the 'evsel_list' global variable dependency, here in perf_stat_synthesize_config() we are adding the 'evlist' arg. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20180830063252.23729-13-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 1821f4eb480bdd3c7c2a1863431ba539c7b0c1f8 Author: Jiri Olsa Date: Thu Aug 30 08:32:20 2018 +0200 perf stat: Add 'struct perf_tool' argument to perf_stat_synthesize_config() So that we can use the function outside the 'perf stat' command with standard synthesize functions, that take 'struct perf_tool *' argument. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20180830063252.23729-12-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 73d586c3917d5109bb547c16d90d0eb97203986a Author: Jiri Olsa Date: Thu Aug 30 08:32:19 2018 +0200 perf stat: Add 'struct perf_stat_config' argument to perf_stat_synthesize_config() Add a 'struct perf_stat_config' argument to perf_stat_synthesize_config(), so we could synthesize arbitrary config. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20180830063252.23729-11-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 491073a6126644d3c60b677b777006deb3c0e16b Author: Jiri Olsa Date: Thu Aug 30 08:32:18 2018 +0200 perf stat: Rename 'is_pipe' argument to 'attrs' in perf_stat_synthesize_config() The attrs name makes more sense. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20180830063252.23729-10-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit d09cefd2ef9945b4b767bb67f473a0eb2066374f Author: Jiri Olsa Date: Thu Aug 30 08:32:17 2018 +0200 perf stat: Move create_perf_stat_counter() to stat.c Move create_perf_stat_counter() to the 'stat' class, so that we can use it globally. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20180830063252.23729-9-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 650d622046024623e71fea1f28acf1edb7e61a81 Author: Jiri Olsa Date: Thu Aug 30 08:32:16 2018 +0200 perf evsel: Introduce perf_evsel__store_ids() Add perf_evsel__store_ids() from stat's store_counter_ids() code to the evsel class, so that it can be used globally. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20180830063252.23729-8-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 318ec1841a3f26799fe663d8f979a57623c0c470 Author: Jiri Olsa Date: Thu Aug 30 08:32:15 2018 +0200 perf tools: Switch 'session' argument to 'evlist' in perf_event__synthesize_attrs() To be able to pass in other than session's evlist. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20180830063252.23729-7-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 7d9ad16afe2bfc73b8967cc2aa2dc30f0170a8e2 Author: Jiri Olsa Date: Thu Aug 30 08:32:14 2018 +0200 perf stat: Add 'identifier' flag to 'struct perf_stat_config' Add 'identifier' flag to 'struct perf_stat_config' to carry the info whether to use PERF_SAMPLE_IDENTIFIER for events. This makes create_perf_stat_counter() independent. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20180830063252.23729-6-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 35386233fcf78f20cb8a51199518da9f81eca280 Author: Jiri Olsa Date: Thu Aug 30 08:32:13 2018 +0200 perf stat: Use local config arg for scale in create_perf_stat_counter() Use the local 'scale' member in the 'struct perf_stat_config' argument instead of the global 'stat_config' variable, to make the function independent. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20180830063252.23729-5-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 5698f26b46e4f47f2371418eb92732048fa4fa66 Author: Jiri Olsa Date: Thu Aug 30 08:32:12 2018 +0200 perf stat: Move 'no_inherit' to 'struct perf_stat_config' Move the static 'no_inherit' variable to 'struct perf_stat_config', so it can be passed around and used outside the 'perf stat' command. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20180830063252.23729-4-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 728c0ee0a896fcb0957b496afdb78bf195397645 Author: Jiri Olsa Date: Thu Aug 30 08:32:11 2018 +0200 perf stat: Move 'initial_delay' to 'struct perf_stat_config' Move the static 'initial_delay' variable to 'struct perf_stat_config', so it can be passed around and used outside the 'perf stat' command. Add 'struct perf_stat_config' argument to create_perf_stat_counter() and use its 'initial_delay' member instead of the static one. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20180830063252.23729-3-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit d50ed0ce820414dbe249a6ad5c9830e29cc46fcc Author: Jiri Olsa Date: Thu Aug 30 08:32:10 2018 +0200 perf stat: Use evsel->threads in create_perf_stat_counter() Get rid of the evsel_list dependency, here we can use the evsel->threads copy of the struct thread_map. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20180830063252.23729-2-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit c4191e55b8741f72d44c7c1435c340681ae1ea4e Author: Arnaldo Carvalho de Melo Date: Thu Aug 30 13:37:28 2018 -0300 perf trace: Show comm and tid for tracepoint events So that all events have that info, improving reading by having information better aligned, etc. Before: # echo 1 > /proc/sys/vm/drop_caches # perf trace -e block:*,ext4:*,tools/perf/examples/bpf/augmented_syscalls.c,close cat tools/perf/examples/bpf/hello.c 0.000 ( ): #include int syscall_enter(openat)(void *args) { puts("Hello, world\n"); return 0; } license(GPL); cat/2731 openat(dfd: CWD, filename: /etc/ld.so.cache, flags: CLOEXEC) 0.025 ( ): syscalls:sys_exit_openat:0x3 0.063 ( 0.022 ms): cat/2731 close(fd: 3) = 0 0.110 ( ): cat/2731 openat(dfd: CWD, filename: /lib64/libc.so.6, flags: CLOEXEC) 0.123 ( ): syscalls:sys_exit_openat:0x3 0.243 ( 0.008 ms): cat/2731 close(fd: 3) = 0 0.485 ( ): cat/2731 open(filename: /usr/lib/locale/locale-archive, flags: CLOEXEC) 0.500 ( ): syscalls:sys_exit_open:0x3 0.531 ( 0.017 ms): cat/2731 close(fd: 3) = 0 0.587 ( ): cat/2731 openat(dfd: CWD, filename: tools/perf/examples/bpf/hello.c) 0.601 ( ): syscalls:sys_exit_openat:0x3 0.631 ( ): ext4:ext4_es_lookup_extent_enter:dev 253,2 ino 1311399 lblk 0 0.639 ( ): ext4:ext4_es_lookup_extent_exit:dev 253,2 ino 1311399 found 1 [0/1) 5276651 W0x10 0.654 ( ): block:block_bio_queue:253,2 R 42213208 + 8 [cat] 0.663 ( ): block:block_bio_remap:8,0 R 58206040 + 8 <- (253,2) 42213208 0.671 ( ): block:block_bio_remap:8,0 R 175570776 + 8 <- (8,6) 58206040 0.678 ( ): block:block_bio_queue:8,0 R 175570776 + 8 [cat] 0.692 ( ): block:block_getrq:8,0 R 175570776 + 8 [cat] 0.700 ( ): block:block_plug:[cat] 0.708 ( ): block:block_rq_insert:8,0 R 4096 () 175570776 + 8 [cat] 0.713 ( ): block:block_unplug:[cat] 1 0.716 ( ): block:block_rq_issue:8,0 R 4096 () 175570776 + 8 [cat] 0.949 ( 0.007 ms): cat/2731 close(fd: 3) = 0 0.969 ( 0.006 ms): cat/2731 close(fd: 1) = 0 0.982 ( 0.006 ms): cat/2731 close(fd: 2) = 0 # After: # echo 1 > /proc/sys/vm/drop_caches # perf trace -e block:*,ext4:*,tools/perf/examples/bpf/augmented_syscalls.c,close cat tools/perf/examples/bpf/hello.c 0.000 ( ): cat/1380 openat(dfd: CWD, filename: /etc/ld.so.cache, flags: CLOEXEC)#include int syscall_enter(openat)(void *args) { puts("Hello, world\n"); return 0; } license(GPL); 0.024 ( ): cat/1380 syscalls:sys_exit_openat:0x3 0.063 ( 0.024 ms): cat/1380 close(fd: 3) = 0 0.114 ( ): cat/1380 openat(dfd: CWD, filename: /lib64/libc.so.6, flags: CLOEXEC) 0.127 ( ): cat/1380 syscalls:sys_exit_openat:0x3 0.247 ( 0.009 ms): cat/1380 close(fd: 3) = 0 0.484 ( ): cat/1380 open(filename: /usr/lib/locale/locale-archive, flags: CLOEXEC) 0.499 ( ): cat/1380 syscalls:sys_exit_open:0x3 0.613 ( 0.010 ms): cat/1380 close(fd: 3) = 0 0.662 ( ): cat/1380 openat(dfd: CWD, filename: tools/perf/examples/bpf/hello.c) 0.678 ( ): cat/1380 syscalls:sys_exit_openat:0x3 0.712 ( ): cat/1380 ext4:ext4_es_lookup_extent_enter:dev 253,2 ino 1311399 lblk 0 0.721 ( ): cat/1380 ext4:ext4_es_lookup_extent_exit:dev 253,2 ino 1311399 found 1 [0/1) 5276651 W0x10 0.734 ( ): cat/1380 block:block_bio_queue:253,2 R 42213208 + 8 [cat] 0.745 ( ): cat/1380 block:block_bio_remap:8,0 R 58206040 + 8 <- (253,2) 42213208 0.754 ( ): cat/1380 block:block_bio_remap:8,0 R 175570776 + 8 <- (8,6) 58206040 0.761 ( ): cat/1380 block:block_bio_queue:8,0 R 175570776 + 8 [cat] 0.780 ( ): cat/1380 block:block_getrq:8,0 R 175570776 + 8 [cat] 0.791 ( ): cat/1380 block:block_plug:[cat] 0.802 ( ): cat/1380 block:block_rq_insert:8,0 R 4096 () 175570776 + 8 [cat] 0.806 ( ): cat/1380 block:block_unplug:[cat] 1 0.810 ( ): cat/1380 block:block_rq_issue:8,0 R 4096 () 175570776 + 8 [cat] 1.005 ( 0.011 ms): cat/1380 close(fd: 3) = 0 1.031 ( 0.008 ms): cat/1380 close(fd: 1) = 0 1.048 ( 0.008 ms): cat/1380 close(fd: 2) = 0 # Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-us1mwsupxffs4jlm3uqm5dvj@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit f5b076dc01e77fa016de8439f8ac21d1c310c5be Author: Arnaldo Carvalho de Melo Date: Thu Aug 30 12:32:35 2018 -0300 perf trace augmented_syscalls: Hook into syscalls:sys_exit_SYSCALL too Hook the pair enter/exit when using augmented_{filename,sockaddr,etc}_syscall(), this way we'll be able to see what entries are in the ELF sections generated from augmented_syscalls.c and filter them out from the main raw_syscalls:* tracepoints used by 'perf trace'. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-cyav42qj5yylolw4attcw99z@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 4c8f0a726ef808244788a237e52ce3c612bff8c3 Author: Arnaldo Carvalho de Melo Date: Thu Aug 30 11:50:21 2018 -0300 perf trace augmented_syscalls: Rename augmented_*_syscall__enter to just *_syscall As we'll also hook into the syscalls:sys_exit_SYSCALL for which there are enter hooks. This way we'll be able to iterate the ELF file for the eBPF program, find the syscalls that have hooks and filter them out from the general raw_syscalls:sys_{enter,exit} tracepoint for not-yet-augmented (the ones with pointer arguments not yet being attached to the usual syscalls tracepoint payload) and non augmentable syscalls (syscalls without pointer arguments). Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-cl1xyghwb1usp500354mv37h@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 5e2d8a5acc99e7b9df9be216f0a73855e865f9a5 Author: Arnaldo Carvalho de Melo Date: Thu Aug 30 10:02:23 2018 -0300 perf augmented_syscalls: Update the header comments Reflecting the fact that it now augments more than syscalls:sys_enter_SYSCALL tracepoints that have filename strings as args. Also mention how the extra data is handled by the by now modified 'perf trace' beautifiers, that will use special "augmented" beautifiers when extra data is found after the expected syscall enter/exit tracepoints. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-ybskanehmdilj5fs7080nz1g@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 664b6a95d771a6dcd7069996c825a03be411ef99 Author: Arnaldo Carvalho de Melo Date: Thu Aug 30 08:48:44 2018 -0300 perf bpf: Add syscall_exit() helper So that we can hook to the syscalls:sys_exit_SYSCALL tracepoints in addition to the syscalls:sys_enter_SYSCALL we hook using the syscall_enter() helper. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-6qh8aph1jklyvdu7w89c0izc@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 266b851cc2874774a59f04a7b3b059ca0f26569b Author: Tzvetomir Stoyanov (VMware) Date: Tue Aug 28 18:50:38 2018 -0400 tools lib traceevent, perf tools: Split trace-seq related APIs in a separate header file In order to make libtraceevent into a proper library, all its APIs should be defined in corresponding header files. This patch splits trace-seq related APIs in a separate header file: trace-seq.h Signed-off-by: Tzvetomir Stoyanov (VMware) Cc: Jiri Olsa Cc: Namhyung Kim Link: http://lkml.kernel.org/r/20180828185038.2dcb2743@gandalf.local.home Signed-off-by: Steven Rostedt Signed-off-by: Arnaldo Carvalho de Melo commit 766e0618e49490bf67a35542880bcecbcee2e5fa Author: Thomas Richter Date: Thu Aug 9 06:56:50 2018 +0200 perf report: Create auxiliary trace data files for s390 Create auxiliary trace data log files when invoked with option --itrace=d as in: [root@s35lp76 perf] perf report -i perf.data.aux1 --stdio --itrace=d perf report creates several data files in the current directory named aux.smp.## where ## is a 2 digit hex number with leading zeros representing the CPU number this trace data was recorded from. The file contents is binary and contains the CPU-Measurement Sampling Data Blocks (SDBs). The directory to save the auxiliary trace buffer can be changed using the perf config file and command. Specify section 'auxtrace' keyword 'dumpdir' and assign it a valid directory name. If the directory does not exist or has the wrong file type, the current directory is used. [root@p23lp27 perf]# perf config auxtrace.dumpdir=/tmp [root@p23lp27 perf]# perf config --user -l auxtrace.dumpdir=/tmp [root@p23lp27 perf]# perf report ... [root@p23lp27 perf]# ll /tmp/aux.smp.00 -rw-r--r-- 1 root root 204800 Aug 2 13:48 /tmp/aux.smp.00 [root@p23lp27 perf]# Signed-off-by: Thomas Richter Reviewed-by: Hendrik Brueckner Cc: Heiko Carstens Cc: Martin Schwidefsky Link: http://lkml.kernel.org/r/20180809045650.89197-1-tmricht@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo commit b043cb524d2892be75c78bc348e83863829d50a0 Author: Arnaldo Carvalho de Melo Date: Wed Aug 29 17:11:33 2018 -0300 perf trace beauty: Reorganize 'struct sockaddr *' beautifier Use an array to multiplex by sockaddr->sa_family, this way adding new families gets a bit easier and tidy. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-v3s85ra659tc40g1s1xaqoun@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 6ebb686225a83200b94777cfc651c94f4e0f6f50 Author: Arnaldo Carvalho de Melo Date: Wed Aug 29 08:47:08 2018 -0300 perf trace augmented_syscalls: Augment sendto's 'addr' arg Its a 'struct sockaddr' pointer, augment it with the same beautifier as for 'connect' and 'bind', that all receive from userspace that pointer. Doing it in the other direction remains to be done, hooking at the syscalls:sys_exit_{accept4?,recvmsg} tracepoints somehow. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-k2eu68lsphnm2fthc32gq76c@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 02ef288420775542316e41dc610a6a88725aa83a Author: Arnaldo Carvalho de Melo Date: Tue Aug 28 17:03:53 2018 -0300 perf trace augmented_syscalls: Augment bind's 'myaddr' sockaddr arg One more, to reuse the augmented_sockaddr_syscall_enter() macro introduced from the augmentation of connect's sockaddr arg, also to get a subset of the struct arg augmentations done using the manual method, before switching to something automatic, using tracefs's format file or, even better, BTF containing the syscall args structs. # perf trace -e tools/perf/examples/bpf/augmented_syscalls.c 0.000 sshd/11479 bind(fd: 3, umyaddr: { .family: NETLINK }, addrlen: 12) 1.752 sshd/11479 bind(fd: 3, umyaddr: { .family: INET, port: 22, addr: 0.0.0.0 }, addrlen: 16) 1.924 sshd/11479 bind(fd: 4, umyaddr: { .family: INET6, port: 22, addr: :: }, addrlen: 28) ^C# Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-a2drqpahpmc7uwb3n3gj2plu@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 24a6c2cd1dbd85bd5624a6d0b05de891d0f07696 Author: Arnaldo Carvalho de Melo Date: Tue Aug 28 16:39:11 2018 -0300 perf trace augmented_syscalls: Add augmented_sockaddr_syscall_enter() From the one for 'connect', so that we can use it with sendto and others that receive a 'struct sockaddr'. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-8bdqv1q0ndcjl1nqns5r5je2@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit d5a7e6613b00d46a4971e8b69e18e2cfd7b00df3 Author: Arnaldo Carvalho de Melo Date: Tue Aug 28 16:24:44 2018 -0300 perf trace augmented_syscalls: Augment connect's 'sockaddr' arg As the first example of augmenting something other than a 'filename', augment the 'struct sockaddr' argument for the 'connect' syscall: # perf trace -e tools/perf/examples/bpf/augmented_syscalls.c ssh -6 fedorapeople.org 0.000 ssh/29669 connect(fd: 3, uservaddr: { .family: LOCAL, path: /var/run/nscd/socket }, addrlen: 110) 0.042 ssh/29669 connect(fd: 3, uservaddr: { .family: LOCAL, path: /var/run/nscd/socket }, addrlen: 110) 1.329 ssh/29669 connect(fd: 3, uservaddr: { .family: LOCAL, path: /var/run/nscd/socket }, addrlen: 110) 1.362 ssh/29669 connect(fd: 3, uservaddr: { .family: LOCAL, path: /var/run/nscd/socket }, addrlen: 110) 1.458 ssh/29669 connect(fd: 3, uservaddr: { .family: LOCAL, path: /var/run/nscd/socket }, addrlen: 110) 1.478 ssh/29669 connect(fd: 3, uservaddr: { .family: LOCAL, path: /var/run/nscd/socket }, addrlen: 110) 1.683 ssh/29669 connect(fd: 3, uservaddr: { .family: INET, port: 53, addr: 192.168.43.1 }, addrlen: 16) 4.710 ssh/29669 connect(fd: 3, uservaddr: { .family: INET6, port: 22, addr: 2610:28:3090:3001:5054:ff:fea7:9474 }, addrlen: 28) root@fedorapeople.org: Permission denied (publickey). # This is still just augmenting the syscalls:sys_enter_connect part, later we'll wire this up to augment the enter+exit combo, like in the tradicional 'perf trace' and 'strace' outputs. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-s7l541cbiqb22ifio6z7dpf6@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 403f833d15a33bfd8e50dd79fa8e25fb4aa132f6 Author: Arnaldo Carvalho de Melo Date: Wed Aug 29 17:41:53 2018 -0300 perf bpf: Add linux/socket.h to the headers accessible to bpf proggies So that we don't have to define sockaddr_storage in the augmented_syscalls.c bpf example when hooking into syscalls needing it, idea is to mimic the system headers. Eventually we probably need to have sys/socket.h, etc. Start by having at least linux/socket.h. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-yhzarcvsjue8pgpvkjhqgioc@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit d35b168c3dcdf103c2b2d694ad8513a669781703 Author: Arnaldo Carvalho de Melo Date: Wed Aug 29 23:53:22 2018 -0300 perf bpf: Give precedence to bpf header dir I need to check the need for $KERNEL_INC_OPTIONS when building eBPF restricted C programs, for now just give precedence to $PERF_BPF_INC_OPTIONS so that we can get a linux/socket.h usable in eBPF programs. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-5z7qw529sdebrn9y1xxqw9hf@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 9ab5aadebeddc77fccfdf94a048259315ce95fe1 Author: Arnaldo Carvalho de Melo Date: Tue Aug 21 15:02:09 2018 -0300 perf trace: Add a etcsnoop.c augmented syscalls eBPF utility We need to put common stuff into a separate header in tools/perf/include/bpf/ for these augmented syscalls, but I couldn't resist adding a etcsnoop.c tool, combining augmented syscalls + filtering, that in the future will be passed from 'perf trace''s command line, to use in building the eBPF program to do that specific filtering at the source, inside the kernel: Running system wide: (hope there isn't any embarassing stuff here... ;-) ) # perf trace -e tools/perf/examples/bpf/etcsnoop.c 0.000 sed/21878 openat(dfd: CWD, filename: /etc/ld.so.cache, flags: CLOEXEC) 1741.473 cat/21883 openat(dfd: CWD, filename: /etc/ld.so.cache, flags: CLOEXEC) 1741.892 cat/21883 openat(dfd: CWD, filename: /etc/passwd) 1748.948 sed/21886 openat(dfd: CWD, filename: /etc/ld.so.cache, flags: CLOEXEC) 1777.136 gvfs-udisks2-v/2302 openat(dfd: CWD, filename: /etc/fstab, flags: CLOEXEC) 1777.738 gvfs-udisks2-v/2302 openat(dfd: CWD, filename: /etc/fstab, flags: CLOEXEC) 1778.158 gvfs-udisks2-v/2302 openat(dfd: CWD, filename: /etc/fstab, flags: CLOEXEC) 1778.528 gvfs-udisks2-v/2302 openat(dfd: CWD, filename: /etc/fstab, flags: CLOEXEC) 1778.595 gvfs-udisks2-v/2302 openat(dfd: CWD, filename: /etc/fstab, flags: CLOEXEC) 1778.901 gvfs-udisks2-v/2302 openat(dfd: CWD, filename: /etc/fstab, flags: CLOEXEC) 1778.939 gvfs-udisks2-v/2302 openat(dfd: CWD, filename: /etc/fstab, flags: CLOEXEC) 1778.966 gvfs-udisks2-v/2302 openat(dfd: CWD, filename: /etc/fstab, flags: CLOEXEC) 1778.992 gvfs-udisks2-v/2302 openat(dfd: CWD, filename: /etc/fstab, flags: CLOEXEC) 1779.019 gvfs-udisks2-v/2302 openat(dfd: CWD, filename: /etc/fstab, flags: CLOEXEC) 1779.045 gvfs-udisks2-v/2302 openat(dfd: CWD, filename: /etc/fstab, flags: CLOEXEC) 1779.071 gvfs-udisks2-v/2302 openat(dfd: CWD, filename: /etc/fstab, flags: CLOEXEC) 1779.095 gvfs-udisks2-v/2302 openat(dfd: CWD, filename: /etc/fstab, flags: CLOEXEC) 1779.121 gvfs-udisks2-v/2302 openat(dfd: CWD, filename: /etc/fstab, flags: CLOEXEC) 1779.148 gvfs-udisks2-v/2302 openat(dfd: CWD, filename: /etc/fstab, flags: CLOEXEC) 1779.175 gvfs-udisks2-v/2302 openat(dfd: CWD, filename: /etc/fstab, flags: CLOEXEC) 1779.202 gvfs-udisks2-v/2302 openat(dfd: CWD, filename: /etc/fstab, flags: CLOEXEC) 1779.229 gvfs-udisks2-v/2302 openat(dfd: CWD, filename: /etc/fstab, flags: CLOEXEC) 1779.254 gvfs-udisks2-v/2302 openat(dfd: CWD, filename: /etc/fstab, flags: CLOEXEC) 1779.279 gvfs-udisks2-v/2302 openat(dfd: CWD, filename: /etc/fstab, flags: CLOEXEC) 1779.309 gvfs-udisks2-v/2302 openat(dfd: CWD, filename: /etc/fstab, flags: CLOEXEC) 1779.336 gvfs-udisks2-v/2302 openat(dfd: CWD, filename: /etc/fstab, flags: CLOEXEC) 1779.363 gvfs-udisks2-v/2302 openat(dfd: CWD, filename: /etc/fstab, flags: CLOEXEC) 1779.388 gvfs-udisks2-v/2302 openat(dfd: CWD, filename: /etc/fstab, flags: CLOEXEC) 1779.414 gvfs-udisks2-v/2302 openat(dfd: CWD, filename: /etc/fstab, flags: CLOEXEC) 1779.442 gvfs-udisks2-v/2302 openat(dfd: CWD, filename: /etc/fstab, flags: CLOEXEC) 1779.470 gvfs-udisks2-v/2302 openat(dfd: CWD, filename: /etc/fstab, flags: CLOEXEC) 1779.500 gvfs-udisks2-v/2302 openat(dfd: CWD, filename: /etc/fstab, flags: CLOEXEC) 1779.529 gvfs-udisks2-v/2302 openat(dfd: CWD, filename: /etc/fstab, flags: CLOEXEC) 1779.557 gvfs-udisks2-v/2302 openat(dfd: CWD, filename: /etc/fstab, flags: CLOEXEC) 1779.586 gvfs-udisks2-v/2302 openat(dfd: CWD, filename: /etc/fstab, flags: CLOEXEC) 1779.617 gvfs-udisks2-v/2302 openat(dfd: CWD, filename: /etc/fstab, flags: CLOEXEC) 1779.648 gvfs-udisks2-v/2302 openat(dfd: CWD, filename: /etc/fstab, flags: CLOEXEC) 1779.679 gvfs-udisks2-v/2302 openat(dfd: CWD, filename: /etc/fstab, flags: CLOEXEC) 1779.706 gvfs-udisks2-v/2302 openat(dfd: CWD, filename: /etc/fstab, flags: CLOEXEC) 1779.739 gvfs-udisks2-v/2302 openat(dfd: CWD, filename: /etc/fstab, flags: CLOEXEC) 1779.769 gvfs-udisks2-v/2302 openat(dfd: CWD, filename: /etc/fstab, flags: CLOEXEC) 1779.798 gvfs-udisks2-v/2302 openat(dfd: CWD, filename: /etc/fstab, flags: CLOEXEC) 1779.823 gvfs-udisks2-v/2302 openat(dfd: CWD, filename: /etc/fstab, flags: CLOEXEC) 1779.844 gvfs-udisks2-v/2302 openat(dfd: CWD, filename: /etc/fstab, flags: CLOEXEC) 1779.862 gvfs-udisks2-v/2302 openat(dfd: CWD, filename: /etc/fstab, flags: CLOEXEC) 1779.880 gvfs-udisks2-v/2302 openat(dfd: CWD, filename: /etc/fstab, flags: CLOEXEC) 1779.911 gvfs-udisks2-v/2302 openat(dfd: CWD, filename: /etc/fstab, flags: CLOEXEC) 1779.942 gvfs-udisks2-v/2302 openat(dfd: CWD, filename: /etc/fstab, flags: CLOEXEC) 1779.972 gvfs-udisks2-v/2302 openat(dfd: CWD, filename: /etc/fstab, flags: CLOEXEC) 1780.004 gvfs-udisks2-v/2302 openat(dfd: CWD, filename: /etc/fstab, flags: CLOEXEC) 1780.035 gvfs-udisks2-v/2302 openat(dfd: CWD, filename: /etc/fstab, flags: CLOEXEC) 13059.154 NetworkManager/1237 open(filename: /etc/passwd, flags: CLOEXEC) 13060.739 NetworkManager/1237 open(filename: /etc/passwd, flags: CLOEXEC) 13061.990 NetworkManager/1237 open(filename: /etc/passwd, flags: CLOEXEC) 13063.177 NetworkManager/1237 open(filename: /etc/passwd, flags: CLOEXEC) 13064.265 NetworkManager/1237 open(filename: /etc/passwd, flags: CLOEXEC) 13065.483 NetworkManager/1237 open(filename: /etc/passwd, flags: CLOEXEC) 13067.383 NetworkManager/1237 open(filename: /etc/passwd, flags: CLOEXEC) 13068.902 NetworkManager/1237 open(filename: /etc/passwd, flags: CLOEXEC) 13069.922 NetworkManager/1237 open(filename: /etc/passwd, flags: CLOEXEC) 13070.915 NetworkManager/1237 open(filename: /etc/passwd, flags: CLOEXEC) 13072.612 NetworkManager/1237 open(filename: /etc/passwd, flags: CLOEXEC) 13074.816 NetworkManager/1237 open(filename: /etc/passwd, flags: CLOEXEC) 13077.343 NetworkManager/1237 open(filename: /etc/passwd, flags: CLOEXEC) 13078.731 NetworkManager/1237 open(filename: /etc/passwd, flags: CLOEXEC) 13559.064 DNS Res~er #22/21054 open(filename: /etc/hosts, flags: CLOEXEC) 22419.522 sed/21896 openat(dfd: CWD, filename: /etc/ld.so.cache, flags: CLOEXEC) 24473.313 git/21900 openat(dfd: CWD, filename: /etc/ld.so.cache, flags: CLOEXEC) 24491.988 less/21901 openat(dfd: CWD, filename: /etc/ld.so.cache, flags: CLOEXEC) 24493.793 git/21901 openat(dfd: CWD, filename: /etc/sysless) 24565.772 sed/21924 openat(dfd: CWD, filename: /etc/ld.so.cache, flags: CLOEXEC) 25878.752 git/21928 openat(dfd: CWD, filename: /etc/ld.so.cache, flags: CLOEXEC) 26075.666 git/21928 open(filename: /etc/localtime, flags: CLOEXEC) 26075.565 less/21929 openat(dfd: CWD, filename: /etc/ld.so.cache, flags: CLOEXEC) 26076.060 less/21929 openat(dfd: CWD, filename: /etc/sysless) 26346.395 sed/21932 openat(dfd: CWD, filename: /etc/ld.so.cache, flags: CLOEXEC) 26483.583 sed/21938 openat(dfd: CWD, filename: /etc/ld.so.cache, flags: CLOEXEC) 26954.890 sed/21944 openat(dfd: CWD, filename: /etc/ld.so.cache, flags: CLOEXEC) 27016.165 gsd-color/1762 openat(dfd: CWD, filename: /etc/localtime) 27016.414 gsd-color/1762 openat(dfd: CWD, filename: /etc/localtime) 27712.313 gsd-color/2408 openat(dfd: CWD, filename: /etc/localtime) 27712.616 gsd-color/2408 openat(dfd: CWD, filename: /etc/localtime) 27829.035 gnome-shell/2125 openat(dfd: CWD, filename: /etc/localtime) 27829.368 gnome-shell/2125 openat(dfd: CWD, filename: /etc/localtime) 27829.584 gnome-shell/2125 openat(dfd: CWD, filename: /etc/localtime) 27829.800 gnome-shell/2125 openat(dfd: CWD, filename: /etc/localtime) 27830.107 gnome-shell/2125 openat(dfd: CWD, filename: /etc/localtime) 27830.521 gnome-shell/2125 openat(dfd: CWD, filename: /etc/localtime) 27961.516 git/21948 openat(dfd: CWD, filename: /etc/ld.so.cache, flags: CLOEXEC) 27987.568 less/21949 openat(dfd: CWD, filename: /etc/ld.so.cache, flags: CLOEXEC) 27988.948 bash/21949 openat(dfd: CWD, filename: /etc/sysless) 28043.536 sed/21972 openat(dfd: CWD, filename: /etc/ld.so.cache, flags: CLOEXEC) 28736.008 sed/21978 openat(dfd: CWD, filename: /etc/ld.so.cache, flags: CLOEXEC) 34882.664 git/21991 openat(dfd: CWD, filename: /etc/ld.so.cache, flags: CLOEXEC) 34882.664 sort/21990 openat(dfd: CWD, filename: /etc/ld.so.cache, flags: CLOEXEC) 34884.441 uniq/21992 openat(dfd: CWD, filename: /etc/ld.so.cache, flags: CLOEXEC) 35593.098 git/21997 openat(dfd: CWD, filename: /etc/ld.so.cache, flags: CLOEXEC) 35638.839 git/21997 openat(dfd: CWD, filename: /etc/gitattributes) 35702.851 sed/22000 openat(dfd: CWD, filename: /etc/ld.so.cache, flags: CLOEXEC) 36076.039 sed/22006 openat(dfd: CWD, filename: /etc/ld.so.cache, flags: CLOEXEC) 37569.049 git/22014 openat(dfd: CWD, filename: /etc/ld.so.cache, flags: CLOEXEC) 37673.712 git/22014 open(filename: /etc/localtime, flags: CLOEXEC) 37781.710 vim/22040 openat(dfd: CWD, filename: /etc/ld.so.cache, flags: CLOEXEC) 37783.667 git/22040 openat(dfd: CWD, filename: /etc/vimrc) 37792.394 git/22040 open(filename: /etc/nsswitch.conf, flags: CLOEXEC) 37792.436 git/22040 openat(dfd: CWD, filename: /etc/ld.so.cache, flags: CLOEXEC) 37792.580 git/22040 open(filename: /etc/passwd, flags: CLOEXEC) 43893.625 DNS Res~er #23/21365 open(filename: /etc/hosts, flags: CLOEXEC) 48060.409 nm-dhcp-helper/22044 openat(dfd: CWD, filename: /etc/ld.so.cache, flags: CLOEXEC) 48071.745 systemd/1 openat(dfd: CWD, filename: /etc/systemd/system/dbus-org.freedesktop.nm-dispatcher.service, flags: CLOEXEC|NOFOLLOW|NOCTTY) 48082.780 nm-dispatcher/22049 openat(dfd: CWD, filename: /etc/ld.so.cache, flags: CLOEXEC) 48111.418 systemd/22049 open(filename: /etc/NetworkManager/dispatcher.d, flags: CLOEXEC|DIRECTORY|NONBLOCK) 48111.904 systemd/22049 open(filename: /etc/localtime, flags: CLOEXEC) 48118.357 00-netreport/22052 openat(dfd: CWD, filename: /etc/ld.so.cache, flags: CLOEXEC) 48119.668 systemd/22052 open(filename: /etc/nsswitch.conf, flags: CLOEXEC) 48119.762 systemd/22052 openat(dfd: CWD, filename: /etc/ld.so.cache, flags: CLOEXEC) 48119.887 systemd/22052 open(filename: /etc/passwd, flags: CLOEXEC) 48120.025 systemd/22052 openat(dfd: CWD, filename: /etc/NetworkManager/dispatcher.d/00-netreport) 48124.144 hostname/22054 openat(dfd: CWD, filename: /etc/ld.so.cache, flags: CLOEXEC) 48125.492 systemd/22052 openat(dfd: CWD, filename: /etc/init.d/functions) 48127.253 systemd/22052 openat(dfd: CWD, filename: /etc/profile.d/lang.sh) 48127.388 systemd/22052 openat(dfd: CWD, filename: /etc/locale.conf) 48137.749 cat/22056 openat(dfd: CWD, filename: /etc/ld.so.cache, flags: CLOEXEC) 48143.519 04-iscsi/22058 openat(dfd: CWD, filename: /etc/ld.so.cache, flags: CLOEXEC) 48144.438 04-iscsi/22058 open(filename: /etc/nsswitch.conf, flags: CLOEXEC) 48144.478 04-iscsi/22058 openat(dfd: CWD, filename: /etc/ld.so.cache, flags: CLOEXEC) 48144.577 04-iscsi/22058 open(filename: /etc/passwd, flags: CLOEXEC) 48144.819 04-iscsi/22058 openat(dfd: CWD, filename: /etc/NetworkManager/dispatcher.d/04-iscsi) 48145.620 10-ifcfg-rh-ro/22059 openat(dfd: CWD, filename: /etc/ld.so.cache, flags: CLOEXEC) 48146.169 systemd/22059 open(filename: /etc/nsswitch.conf, flags: CLOEXEC) 48146.207 systemd/22059 openat(dfd: CWD, filename: /etc/ld.so.cache, flags: CLOEXEC) 48146.287 systemd/22059 open(filename: /etc/passwd, flags: CLOEXEC) 48146.387 systemd/22059 openat(dfd: CWD, filename: /etc/NetworkManager/dispatcher.d/10-ifcfg-rh-routes.sh) 48147.215 11-dhclient/22060 openat(dfd: CWD, filename: /etc/ld.so.cache, flags: CLOEXEC) 48147.787 11-dhclient/22060 open(filename: /etc/nsswitch.conf, flags: CLOEXEC) 48147.813 11-dhclient/22060 openat(dfd: CWD, filename: /etc/ld.so.cache, flags: CLOEXEC) 48147.929 11-dhclient/22060 open(filename: /etc/passwd, flags: CLOEXEC) 48148.016 11-dhclient/22060 openat(dfd: CWD, filename: /etc/NetworkManager/dispatcher.d/11-dhclient) 48148.906 grep/22063 openat(dfd: CWD, filename: /etc/ld.so.cache, flags: CLOEXEC) 48151.165 11-dhclient/22060 openat(dfd: CWD, filename: /etc/sysconfig/network) 48151.560 11-dhclient/22060 open(filename: /etc/dhcp/dhclient.d/, flags: CLOEXEC|DIRECTORY|NONBLOCK) 48151.704 11-dhclient/22060 openat(dfd: CWD, filename: /etc/dhcp/dhclient.d/chrony.sh) 48153.593 20-chrony/22065 openat(dfd: CWD, filename: /etc/ld.so.cache, flags: CLOEXEC) 48154.695 20-chrony/22065 open(filename: /etc/nsswitch.conf, flags: CLOEXEC) 48154.756 20-chrony/22065 openat(dfd: CWD, filename: /etc/ld.so.cache, flags: CLOEXEC) 48154.914 20-chrony/22065 open(filename: /etc/passwd, flags: CLOEXEC) 48155.067 20-chrony/22065 openat(dfd: CWD, filename: /etc/NetworkManager/dispatcher.d/20-chrony) 48156.962 25-polipo/22066 openat(dfd: CWD, filename: /etc/ld.so.cache, flags: CLOEXEC) 48157.824 systemd/22066 open(filename: /etc/nsswitch.conf, flags: CLOEXEC) 48157.866 systemd/22066 openat(dfd: CWD, filename: /etc/ld.so.cache, flags: CLOEXEC) 48157.981 systemd/22066 open(filename: /etc/passwd, flags: CLOEXEC) 48158.090 systemd/22066 openat(dfd: CWD, filename: /etc/NetworkManager/dispatcher.d/25-polipo) 48533.616 gsd-housekeepi/2412 openat(dfd: CWD, filename: /etc/fstab, flags: CLOEXEC) 87122.021 gsd-color/1762 openat(dfd: CWD, filename: /etc/localtime) 87122.146 gsd-color/1762 openat(dfd: CWD, filename: /etc/localtime) 87825.582 gsd-color/2408 openat(dfd: CWD, filename: /etc/localtime) 87825.844 gsd-color/2408 openat(dfd: CWD, filename: /etc/localtime) 87829.524 gnome-shell/2125 openat(dfd: CWD, filename: /etc/localtime) 87830.531 gnome-shell/2125 openat(dfd: CWD, filename: /etc/localtime) 87831.288 gnome-shell/2125 openat(dfd: CWD, filename: /etc/localtime) 87832.011 gnome-shell/2125 openat(dfd: CWD, filename: /etc/localtime) 87832.672 gnome-shell/2125 openat(dfd: CWD, filename: /etc/localtime) 87833.276 gnome-shell/2125 openat(dfd: CWD, filename: /etc/localtime) ^C# Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-0o770jvdcy04ee6vhv6v471m@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 16cc63593f67477e9ca62f10182e74e949af1acb Author: Arnaldo Carvalho de Melo Date: Tue Aug 21 13:55:50 2018 -0300 perf trace: Augment 'newstat' (aka 'stat') filename ptr This one will need some more work, that 'statbuf' pointer requires a beautifier in 'perf trace'. # perf trace -e tools/perf/examples/bpf/augmented_syscalls.c 0.000 weechat/3596 stat(filename: /etc/localtime, statbuf: 0x7ffd87d11f60) 0.186 perf/29818 openat(dfd: CWD, filename: /sys/kernel/debug/tracing/events/syscalls/sys_enter_stat/format) 0.279 perf/29818 openat(dfd: CWD, filename: /sys/kernel/debug/tracing/events/syscalls/sys_enter_newstat/for) 0.670 perf/29818 openat(dfd: CWD, filename: /sys/kernel/debug/tracing/events/syscalls/sys_enter_openat/form) 60.805 DNS Res~er #20/21308 stat(filename: /etc/resolv.conf, statbuf: 0x7ffa733fe4a0) 60.836 DNS Res~er #20/21308 open(filename: /etc/hosts, flags: CLOEXEC) 60.931 perf/29818 openat(dfd: CWD, filename: /sys/kernel/debug/tracing/events/syscalls/sys_enter_open/format) 607.070 DNS Res~er #21/29812 stat(filename: /etc/resolv.conf, statbuf: 0x7ffa5e1fe3f0) 607.098 DNS Res~er #21/29812 open(filename: /etc/hosts, flags: CLOEXEC) 999.336 weechat/3596 stat(filename: /etc/localtime, statbuf: 0x7ffd87d11f60) ^C# Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-4lhabe7m4uzo76lnqpyfmnvk@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit f6618ce6c024ec90b156700fc39eb313ec117881 Author: Arnaldo Carvalho de Melo Date: Tue Aug 21 13:44:49 2018 -0300 perf trace: Introduce augmented_filename_syscall_enter() declarator Helping with tons of boilerplate for syscalls that only want to augment a filename. Now supporting one such syscall is just a matter of declaring its arguments struct + using: augmented_filename_syscall_enter(openat); Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-ls7ojdseu8fxw7fvj77ejpao@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 9779fc021410e7d8433d923a2202dac7e1384b05 Author: Arnaldo Carvalho de Melo Date: Tue Aug 21 13:21:36 2018 -0300 perf trace: Augment inotify_add_watch pathname syscall arg Again, just changing tools/perf/examples/bpf/augmented_syscalls.c, that is starting to have too much boilerplate, some macro will come to the rescue. # perf trace -e tools/perf/examples/bpf/augmented_syscalls.c 0.000 gmain/2590 inotify_add_watch(fd: 3, pathname: /var/cache/app-info/yaml, mask: 16789454) 0.023 gmain/2590 inotify_add_watch(fd: 3, pathname: /var/lib/app-info/xmls, mask: 16789454) 0.028 gmain/2590 inotify_add_watch(fd: 3, pathname: /var/lib/app-info/yaml, mask: 16789454) 0.032 gmain/2590 inotify_add_watch(fd: 3, pathname: /usr/share/app-info/yaml, mask: 16789454) 0.039 gmain/2590 inotify_add_watch(fd: 3, pathname: /usr/local/share/app-info/xmls, mask: 16789454) 0.045 gmain/2590 inotify_add_watch(fd: 3, pathname: /usr/local/share/app-info/yaml, mask: 16789454) 0.049 gmain/2590 inotify_add_watch(fd: 3, pathname: /home/acme/.local/share/app-info/yaml, mask: 16789454) 0.056 gmain/2590 inotify_add_watch(fd: 3, pathname: , mask: 16789454) 0.010 gmain/2245 inotify_add_watch(fd: 7, pathname: /home/acme/~, mask: 16789454) 0.087 perf/20116 openat(dfd: CWD, filename: /sys/kernel/debug/tracing/events/syscalls/sys_enter_inotify_add) 0.436 perf/20116 openat(dfd: CWD, filename: /sys/kernel/debug/tracing/events/syscalls/sys_enter_openat/form) 56.042 gmain/2791 inotify_add_watch(fd: 4, pathname: /var/lib/fwupd/remotes.d/lvfs-testing, mask: 16789454) 113.986 gmain/1721 inotify_add_watch(fd: 3, pathname: /var/lib/gdm/~, mask: 16789454) 3777.265 gsd-color/2408 openat(dfd: CWD, filename: /etc/localtime) 3777.550 gsd-color/2408 openat(dfd: CWD, filename: /etc/localtime) ^C[root@jouet perf]# Still not combining raw_syscalls:sys_enter + raw_syscalls:sys_exit, to get it strace-like, but that probably will come very naturally with some more wiring up... Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-ol83juin2cht9vzquynec5hz@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit daa1284af3b9a8d73b1dadaa12bc4068a4ce22ab Author: Arnaldo Carvalho de Melo Date: Tue Aug 21 12:20:06 2018 -0300 perf trace: Augment the 'open' syscall 'filename' arg As described in the previous cset, all we had to do was to touch the augmented_syscalls.c eBPF program, fire up 'perf trace' with that new eBPF script in system wide mode and wait for 'open' syscalls, in addition to 'openat' ones to see that it works: # perf trace -e tools/perf/examples/bpf/augmented_syscalls.c 0.000 StreamT~s #200/16150 openat(dfd: CWD, filename: /home/acme/.mozilla/firefox/fqxhj76d.default/prefs.js, flags: CREAT|EXCL|TRUNC|WRONLY, mode: IRUSR|IWUSR) 0.065 StreamT~s #200/16150 openat(dfd: CWD, filename: /home/acme/.mozilla/firefox/fqxhj76d.default/prefs-1.js, flags: CREAT|EXCL|TRUNC|WRONLY, mode: IRUSR|IWUSR) 0.435 StreamT~s #200/16150 openat(dfd: CWD, filename: /home/acme/.mozilla/firefox/fqxhj76d.default/prefs-1.js, flags: CREAT|TRUNC|WRONLY, mode: IRUSR|IWUSR) 1.875 perf/16772 openat(dfd: CWD, filename: /sys/kernel/debug/tracing/events/syscalls/sys_enter_openat/form) 1227.260 gnome-shell/1463 openat(dfd: CWD, filename: /proc/self/stat) 1227.397 gnome-shell/2125 openat(dfd: CWD, filename: /proc/self/stat) 7227.619 gnome-shell/1463 openat(dfd: CWD, filename: /proc/self/stat) 7227.661 gnome-shell/2125 openat(dfd: CWD, filename: /proc/self/stat) 10018.079 gnome-shell/1463 openat(dfd: CWD, filename: /proc/self/stat) 10018.514 perf/16772 openat(dfd: CWD, filename: /proc/1237/status) 10018.568 perf/16772 openat(dfd: CWD, filename: /proc/1237/status) 10022.409 gnome-shell/2125 openat(dfd: CWD, filename: /proc/self/stat) 10090.044 NetworkManager/1237 openat(dfd: CWD, filename: /proc/2125/stat) 10090.351 NetworkManager/1237 open(filename: /etc/passwd, flags: CLOEXEC) 10090.407 perf/16772 openat(dfd: CWD, filename: /sys/kernel/debug/tracing/events/syscalls/sys_enter_open/format) 10091.763 NetworkManager/1237 openat(dfd: CWD, filename: /proc/2125/stat) 10091.812 NetworkManager/1237 open(filename: /etc/passwd, flags: CLOEXEC) 10092.807 NetworkManager/1237 openat(dfd: CWD, filename: /proc/2125/stat) 10092.851 NetworkManager/1237 open(filename: /etc/passwd, flags: CLOEXEC) 10094.650 NetworkManager/1237 openat(dfd: CWD, filename: /proc/1463/stat) 10094.926 NetworkManager/1237 open(filename: /etc/passwd, flags: CLOEXEC) 10096.010 NetworkManager/1237 openat(dfd: CWD, filename: /proc/1463/stat) 10096.057 NetworkManager/1237 open(filename: /etc/passwd, flags: CLOEXEC) 10097.056 NetworkManager/1237 openat(dfd: CWD, filename: /proc/1463/stat) 10097.099 NetworkManager/1237 open(filename: /etc/passwd, flags: CLOEXEC) 13228.345 gnome-shell/1463 openat(dfd: CWD, filename: /proc/self/stat) 13232.734 gnome-shell/2125 openat(dfd: CWD, filename: /proc/self/stat) 15198.956 lighttpd/16748 open(filename: /proc/loadavg, mode: ISGID|IXOTH) ^C# It even catches 'perf' itself looking at the sys_enter_open and sys_enter_openat tracefs format dictionaries when it first finds them in the trace... :-) Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-upmogc57uatljr6el6u8537l@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 75d1e30681d006f4dc148c153395fb938acfc7c0 Author: Arnaldo Carvalho de Melo Date: Tue Aug 21 12:00:39 2018 -0300 perf trace: Use the augmented filename, expanding syscall enter pointers This is the final touch in showing how a syscall argument beautifier can access the augmented args put in place by the tools/perf/examples/bpf/augmented_syscalls.c eBPF script, right after the regular raw syscall args, i.e. the up to 6 long integer values in the syscall interface. With this we are able to show the 'openat' syscall arg, now with up to 64 bytes, but in time this will be configurable, just like with the 'strace -s strsize' argument, from 'strace''s man page: -s strsize Specify the maximum string size to print (the default is 32). This actually is the maximum string to _collect_ and store in the ring buffer, not just print. Before: # perf trace -e tools/perf/examples/bpf/augmented_syscalls.c,openat cat /etc/passwd > /dev/null 0.000 ( ): cat/9658 openat(dfd: CWD, filename: 0x6626eda8, flags: CLOEXEC) 0.017 ( 0.007 ms): cat/9658 openat(dfd: CWD, filename: 0x6626eda8, flags: CLOEXEC) = 3 0.049 ( ): cat/9658 openat(dfd: CWD, filename: 0x66476ce0, flags: CLOEXEC) 0.051 ( 0.007 ms): cat/9658 openat(dfd: CWD, filename: 0x66476ce0, flags: CLOEXEC) = 3 0.377 ( ): cat/9658 openat(dfd: CWD, filename: 0x1e8f806b) 0.379 ( 0.005 ms): cat/9658 openat(dfd: CWD, filename: 0x1e8f806b) = 3 # After: # perf trace -e tools/perf/examples/bpf/augmented_syscalls.c,openat cat /etc/passwd > /dev/null 0.000 ( ): cat/11966 openat(dfd: CWD, filename: /etc/ld.so.cache, flags: CLOEXEC) 0.006 ( 0.006 ms): cat/11966 openat(dfd: CWD, filename: 0x4bfdcda8, flags: CLOEXEC) = 3 0.034 ( ): cat/11966 openat(dfd: CWD, filename: /lib64/libc.so.6, flags: CLOEXEC) 0.036 ( 0.008 ms): cat/11966 openat(dfd: CWD, filename: 0x4c1e4ce0, flags: CLOEXEC) = 3 0.375 ( ): cat/11966 openat(dfd: CWD, filename: /etc/passwd) 0.377 ( 0.005 ms): cat/11966 openat(dfd: CWD, filename: 0xe87906b) = 3 # This cset should show all the aspects of establishing a protocol between an eBPF syscall arg augmenter program, tools/perf/examples/bpf/augmented_syscalls.c and a 'perf trace' beautifier, the one associated with all 'char *' point syscall args with names that can heuristically be associated with filenames. Now to wire up 'open' to show a second syscall using this scheme, all we have to do now is to change tools/perf/examples/bpf/augmented_syscalls.c, as 'perf trace' will notice that the perf_sample.raw_size is more than what is expected for a particular syscall payload as defined by its tracefs format file and will then use the augmented payload in the 'filename' syscall arg beautifier. The same protocol will be used for structs such as 'struct sockaddr *', 'struct pollfd', etc, with additions for handling arrays. This will all be done under the hood when 'perf trace' realizes the system has the necessary components, and also can be done by providing a precompiled augmented_syscalls.c eBPF ELF object. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-gj9kqb61wo7m3shtpzercbcr@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit c96f4edcc3560a7dc910271d30d91c54a422d46c Author: Arnaldo Carvalho de Melo Date: Tue Aug 21 11:47:44 2018 -0300 perf trace: Show comm/tid for augmented_syscalls To get us a bit more like the sys_enter + sys_exit combo: # perf trace -e tools/perf/examples/bpf/augmented_syscalls.c,openat cat /etc/passwd > /dev/null 0.000 ( ): openat(dfd: CWD, filename: 0x31b6dda8, flags: CLOEXEC) 0.009 ( 0.009 ms): cat/3619 openat(dfd: CWD, filename: 0x31b6dda8, flags: CLOEXEC) = 3 0.051 ( ): openat(dfd: CWD, filename: 0x31d75ce0, flags: CLOEXEC) 0.054 ( 0.010 ms): cat/3619 openat(dfd: CWD, filename: 0x31d75ce0, flags: CLOEXEC) = 3 0.539 ( ): openat(dfd: CWD, filename: 0xca71506b) 0.543 ( 0.115 ms): cat/3619 openat(dfd: CWD, filename: 0xca71506b) = 3 # After: # perf trace -e tools/perf/examples/bpf/augmented_syscalls.c,openat cat /etc/passwd > /dev/null 0.000 ( ): cat/4919 openat(dfd: CWD, filename: 0xc8358da8, flags: CLOEXEC) 0.007 ( 0.005 ms): cat/4919 openat(dfd: CWD, filename: 0xc8358da8, flags: CLOEXEC) = 3 0.032 ( ): cat/4919 openat(dfd: CWD, filename: 0xc8560ce0, flags: CLOEXEC) 0.033 ( 0.006 ms): cat/4919 openat(dfd: CWD, filename: 0xc8560ce0, flags: CLOEXEC) = 3 0.301 ( ): cat/4919 openat(dfd: CWD, filename: 0x91fa306b) 0.304 ( 0.004 ms): cat/4919 openat(dfd: CWD, filename: 0x91fa306b) = 3 # Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-6w8ytyo5y655a1hsyfpfily6@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 6dcbd212ff4988d8e6caa0b6700bd1c1d317dc02 Author: Arnaldo Carvalho de Melo Date: Tue Aug 21 11:40:09 2018 -0300 perf trace: Extract the comm/tid printing for syscall enter Will be used with augmented syscalls, where we haven't transitioned completely to combining sys_enter_FOO with sys_exit_FOO, so we'll go as far as having it similar to the end result, strace like, as possible. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-canomaoiybkswwnhj69u9ae4@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 1cdf618f23867dd1dae58f10f1f82839f2bf73b4 Author: Arnaldo Carvalho de Melo Date: Tue Aug 21 11:44:23 2018 -0300 perf trace: Print the syscall name for augmented_syscalls Since we copy all the payload for raw_syscalls:sys_enter plus add expanded pointers, we can use the syscall id to get its name, etc: # grep 'field:.* id' /sys/kernel/debug/tracing/events/raw_syscalls/sys_enter/format field:long id; offset:8; size:8; signed:1; # Before: # perf trace -e tools/perf/examples/bpf/augmented_syscalls.c,openat cat /etc/passwd > /dev/null 0.000 ( ): __augmented_syscalls__:dfd: CWD, filename: 0xec9f9da8, flags: CLOEXEC 0.006 ( 0.006 ms): cat/2395 openat(dfd: CWD, filename: 0xec9f9da8, flags: CLOEXEC) = 3 0.041 ( ): __augmented_syscalls__:dfd: CWD, filename: 0xecc01ce0, flags: CLOEXEC 0.042 ( 0.007 ms): cat/2395 openat(dfd: CWD, filename: 0xecc01ce0, flags: CLOEXEC) = 3 0.376 ( ): __augmented_syscalls__:dfd: CWD, filename: 0xac0a806b 0.379 ( 0.006 ms): cat/2395 openat(dfd: CWD, filename: 0xac0a806b) = 3 # After: # perf trace -e tools/perf/examples/bpf/augmented_syscalls.c,openat cat /etc/passwd > /dev/null 0.000 ( ): openat(dfd: CWD, filename: 0x31b6dda8, flags: CLOEXEC) 0.009 ( 0.009 ms): cat/3619 openat(dfd: CWD, filename: 0x31b6dda8, flags: CLOEXEC) = 3 0.051 ( ): openat(dfd: CWD, filename: 0x31d75ce0, flags: CLOEXEC) 0.054 ( 0.010 ms): cat/3619 openat(dfd: CWD, filename: 0x31d75ce0, flags: CLOEXEC) = 3 0.539 ( ): openat(dfd: CWD, filename: 0xca71506b) 0.543 ( 0.115 ms): cat/3619 openat(dfd: CWD, filename: 0xca71506b) = 3 # Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-epz6y9i0eavmerc5ha98t7gn@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 6ccc18a9a17a1189b8b157176ce4a58c458c9eee Author: Arnaldo Carvalho de Melo Date: Tue Aug 21 11:14:15 2018 -0300 perf trace: Make the augmented_syscalls filter out the tracepoint event When we attach a eBPF object to a tracepoint, if we return 1, then that tracepoint will be stored in the perf's ring buffer. In the augmented_syscalls.c case we want to just attach and _override_ the tracepoint payload with an augmented, extended one. In this example, tools/perf/examples/bpf/augmented_syscalls.c, we are attaching to the 'openat' syscall, and adding, after the syscalls:sys_enter_openat usual payload as defined by /sys/kernel/debug/tracing/events/syscalls/sys_enter_openat/format, a snapshot of its sole pointer arg: # grep 'field:.*\*' /sys/kernel/debug/tracing/events/syscalls/sys_enter_openat/format field:const char * filename; offset:24; size:8; signed:0; # For now this is not being considered, the next csets will make use of it, but as this is overriding the syscall tracepoint enter, we don't want that event appearing on the ring buffer, just our synthesized one. Before: # perf trace -e ~acme/git/perf/tools/perf/examples/bpf/augmented_syscalls.c,openat cat /etc/passwd > /dev/null 0.000 ( ): __augmented_syscalls__:dfd: CWD, filename: /etc/ld.so.cache, flags: CLOEXEC 0.006 ( ): syscalls:sys_enter_openat:dfd: CWD, filename: , flags: CLOEXEC 0.007 ( 0.004 ms): cat/24044 openat(dfd: CWD, filename: 0x216dda8, flags: CLOEXEC ) = 3 0.028 ( ): __augmented_syscalls__:dfd: CWD, filename: /lib64/libc.so.6, flags: CLOEXEC 0.030 ( ): syscalls:sys_enter_openat:dfd: CWD, filename: , flags: CLOEXEC 0.031 ( 0.006 ms): cat/24044 openat(dfd: CWD, filename: 0x2375ce0, flags: CLOEXEC ) = 3 0.291 ( ): __augmented_syscalls__:dfd: CWD, filename: /etc/passwd 0.293 ( ): syscalls:sys_enter_openat:dfd: CWD, filename: 0.294 ( 0.004 ms): cat/24044 openat(dfd: CWD, filename: 0x637db06b ) = 3 # After: # perf trace -e ~acme/git/perf/tools/perf/examples/bpf/augmented_syscalls.c,openat cat /etc/passwd > /dev/null 0.000 ( ): __augmented_syscalls__:dfd: CWD, filename: 0x9c6a1da8, flags: CLOEXEC 0.005 ( 0.015 ms): cat/27341 openat(dfd: CWD, filename: 0x9c6a1da8, flags: CLOEXEC ) = 3 0.040 ( ): __augmented_syscalls__:dfd: CWD, filename: 0x9c8a9ce0, flags: CLOEXEC 0.041 ( 0.006 ms): cat/27341 openat(dfd: CWD, filename: 0x9c8a9ce0, flags: CLOEXEC ) = 3 0.294 ( ): __augmented_syscalls__:dfd: CWD, filename: 0x482a706b 0.296 ( 0.067 ms): cat/27341 openat(dfd: CWD, filename: 0x482a706b ) = 3 # Now lets replace that __augmented_syscalls__ name with the syscall name, using: # grep 'field:.*syscall_nr' /sys/kernel/debug/tracing/events/syscalls/sys_enter_openat/format field:int __syscall_nr; offset:8; size:4; signed:1; # That the synthesized payload has exactly where the syscall enter tracepoint puts it. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-og4r9k87mzp9hv7el046idmd@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 7a983a0fe2a29ec849f6748d6bd86904d6e88eea Author: Arnaldo Carvalho de Melo Date: Mon Aug 20 17:58:17 2018 -0300 perf trace: Pass augmented args to the arg formatters when available If the tracepoint payload is bigger than what a syscall expected from what is in its format file in tracefs, then that will be used as augmented args, i.e. the expansion of syscall arg pointers, with things like a filename, structs, etc. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-bsbqx7xi2ot4q9bf570f7tqs@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 5c3f78ec285bf4902ff6b5c8e0ced520c750aeae Author: Paul E. McKenney Date: Thu Jul 26 13:19:22 2018 -0700 doc: Fix broken HTML directive This commit adds the needed "<". Signed-off-by: Paul E. McKenney commit 77095901b895a64b6d775879b54c73472ba21e68 Author: Paul E. McKenney Date: Mon Jul 2 08:25:57 2018 -0700 doc: Update removal of RCU-bh/sched update machinery The RCU-bh update API is now defined in terms of that of RCU-bh and RCU-sched, so this commit updates the documentation accordingly. In addition, although RCU-sched persists in !PREEMPT kernels, in the PREEMPT case its update API is now defined in terms of that of RCU-preempt, so this commit also updates the documentation accordingly. While in the area, this commit removes the documentation for the now-obsolete synchronize_rcu_mult() and clarifies the Tasks RCU documentation. Signed-off-by: Paul E. McKenney commit f8f3b7fc21b1cb59385b780acd9b9a26d04cb7b2 Author: Marek Szyprowski Date: Fri Aug 10 10:04:25 2018 +0200 ARM: dts: exynos: Fix regulators configuration on Peach Pi/Pit Chromebooks Regulators, which are marked as 'on-in-suspend' seems to be critical for board operation, thus they must not be disabled anytime. This can be only assured by marking them as 'always-on', because otherwise some actions of their clients might result in turning them off. This patch restores suspend/resume operation on Peach-Pit Chromebook board. It partially reverts 'always-on' property removal done by the commit mentioned in the Fixes tag. Fixes: 665c441eea3d ("ARM: dts: exynos: Remove unneded always-on for regulators on Peach boards") Signed-off-by: Marek Szyprowski Tested-by: Tomasz Figa Signed-off-by: Krzysztof Kozlowski commit b2a13da505e8614f55dc4abb6e2067261be35a55 Author: Krzysztof Kozlowski Date: Mon Aug 13 17:13:10 2018 +0200 ARM: s3c24xx: Remove empty gta02_pmu children probe Since commit 67e67df8da72 ("gta02: Use pcf50633 backlight driver instead of platform backlight driver.") the list of gta02 pmu children is empty therefore looping through it and adding devices is a no-op. This also fixes the GCC v8.1 W=1 warning: arch/arm/mach-s3c24xx/mach-gta02.c: In function 'gta02_pmu_attach_child_devices': arch/arm/mach-s3c24xx/mach-gta02.c:538:16: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] for (n = 0; n < ARRAY_SIZE(gta02_devices_pmu_children); n++) ^ Signed-off-by: Krzysztof Kozlowski commit e0b35c1ab5ac5f0453d1093770e119bd8d63d85c Author: Krzysztof Kozlowski Date: Tue Jul 24 18:49:46 2018 +0200 ARM: exynos: Fix imprecise abort during Exynos5422 suspend to RAM Suspend to RAM on Odroid XU3/XU4/HC1 family (Exynos5422) causes imprecise abort: PM: Syncing filesystems ... done. Freezing user space processes ... (elapsed 0.003 seconds) done. OOM killer disabled. Freezing remaining freezable tasks ... (elapsed 0.003 seconds) done. wake enabled for irq 139 Disabling non-boot CPUs ... IRQ51 no longer affine to CPU1 IRQ52 no longer affine to CPU2 IRQ53 no longer affine to CPU3 IRQ54 no longer affine to CPU4 IRQ55 no longer affine to CPU5 IRQ56 no longer affine to CPU6 cpu cpu4: Dropping the link to regulator.40 IRQ57 no longer affine to CPU7 Unhandled fault: external abort on non-linefetch (0x1008) at 0xf081a028 Internal error: : 1008 [#1] PREEMPT SMP ARM with last call trace in exynos_suspend_enter(). The abort is caused by writing to register in secure part of sysram. Boards booted under secure firmware (e.g. Hardkernel Odroid boards) should access non-secure sysram. Signed-off-by: Krzysztof Kozlowski commit 687b5ae2e6c6682a2b0bda3b31a884ed564f9194 Author: Krzysztof Kozlowski Date: Tue Jul 24 18:49:44 2018 +0200 ARM: exynos: Store Exynos5420 register state in one variable Instead of keeping two static variables put them into one struct which later can grow. This will reduce number of file-scope symbols. Signed-off-by: Krzysztof Kozlowski commit 70b73f9ac113983f9c7db9887447f1344ac5b69b Author: Chris Wilson Date: Thu Aug 30 17:10:42 2018 +0100 drm/i915/ringbuffer: Delay after invalidating gen6+ xcs During stress testing of full-ppgtt (on Baytrail at least), we found that the invalidation around a context/mm switch was insufficient (writes would go astray). Adding a second MI_FLUSH_DW barrier prevents this, but it is unclear as to whether this is merely a delaying tactic or if it is truly serialising with the TLB invalidation. Either way, it is empirically required. v2: Avoid the loop for readability; Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107715 References: https://bugs.freedesktop.org/show_bug.cgi?id=107759 Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: Mika Kuoppala Cc: Matthew Auld Cc: Tvrtko Ursulin Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180830161042.29193-1-chris@chris-wilson.co.uk commit afa86d264a7ce62ba214bc7c6012e2129141421e Author: Colin Ian King Date: Wed Aug 29 10:27:46 2018 +0100 soc: fsl: dpio: remove redundant pointer 'priv' Pointer 'priv' is being assigned but is never used hence it is redundant and can be removed. Cleans up clang warning: variable 'priv' set but not used [-Wunused-but-set-variable] Signed-off-by: Colin Ian King Signed-off-by: Li Yang commit f55f61225a2b98fd3eef56428edee767dc43d21d Author: Rob Herring Date: Wed Aug 29 15:04:25 2018 -0500 soc: fsl/qe: Use of_get_child_by_name helper Use the of_get_child_by_name() helper instead of open coding searching for the 'firmware' child node. This removes directly accessing the name pointer as well. Cc: Qiang Zhao Cc: Li Yang Cc: linuxppc-dev@lists.ozlabs.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Rob Herring Acked-by: Qiang Zhao Signed-off-by: Li Yang commit e665f029a283aff4f36f0c5388f7c708be67470e Author: Rob Herring Date: Tue Aug 28 10:44:29 2018 -0500 clk: 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: Eugeniy Paltsev Cc: Michael Turquette Cc: Stephen Boyd Cc: linux-clk@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-renesas-soc@vger.kernel.org Cc: linux-omap@vger.kernel.org Signed-off-by: Rob Herring Signed-off-by: Stephen Boyd commit e966d3084596c62f152bf1dd8028d94792c9c380 Author: Paul Burton Date: Wed Aug 29 14:54:01 2018 -0700 MIPS: Remove SLOW_DOWN_IO arch/mips appears to have inherited SLOW_DOWN_IO from arch/x86 in antiquity, but we never define CONF_SLOWDOWN_IO so this is unused code. Perhaps it was once useful to keep the MIPS header close to the x86 version to ease comparisons or porting changes, but they've diverged significantly at this point & x86 does this differently now anyway. Delete the dead code. Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/20343/ Cc: linux-mips@linux-mips.org commit b962aeb022051915c26dcaba97d3ed0883bef9f5 Author: Paul Burton Date: Wed Aug 29 14:54:00 2018 -0700 MIPS: Use GENERIC_IOMAP MIPS has a copy of lib/iomap.c with minor alterations, none of which are necessary given appropriate definitions of PIO_OFFSET, PIO_MASK & PIO_RESERVED. Provide such definitions, select GENERIC_IOMAP & remove arch/mips/lib/iomap.c to cut back on the needless duplication. The one change this does make is to our mmio_{in,out}s[bwl] functions, which began to deviate from their generic counterparts with commit 0845bb721ebb ("MIPS: iomap: Use __mem_{read,write}{b,w,l} for MMIO"). I suspect that this commit was incorrect, and that the SEAD-3 platform should have instead selected CONFIG_SWAP_IO_SPACE. Since the SEAD-3 platform code is now gone & the board is instead supported by the generic platform (CONFIG_MIPS_GENERIC) which selects CONFIG_SWAP_IO_SPACE anyway, this shouldn't be a problem any more. Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/20342/ Cc: linux-mips@linux-mips.org commit e245767abf2797f1581f94e48db7f6184e14ebed Author: Paul Burton Date: Wed Aug 29 11:01:30 2018 -0700 MIPS: Use a custom elf-entry program to find kernel entry point For a long time arch/mips/Makefile used nm to discover the kernel entry point by looking for the address of the kernel_entry symbol. This doesn't work for systems which make use of bit 0 of the PC to reflect the ISA mode - ie. microMIPS (and MIPS16, but we don't support building kernels that target MIPS16 anyway). So for a while with commit 5fc9484f5e41 ("MIPS: Set ISA bit in entry-y for microMIPS kernels") we manually modified the last nibble of the output from nm, which worked but wasn't particularly pretty. Commit 27c524d17430 ("MIPS: Use the entry point from the ELF file header") then cleaned this up by using objdump to print the ELF entry point which includes the ISA bit, rather than using nm to print the address of the kernel_entry symbol which doesn't. That removed the ugly replacement of the last nibble, but added its own ugliness by needing to manually sign extend in the 32 bit case. Unfortunately it has been pointed out that objdump's output is localised, and therefore grepping for its "start address" output doesn't work when the user's language settings are such that objdump doesn't print in English. We could simply revert commit 27c524d17430 ("MIPS: Use the entry point from the ELF file header") and return to the manual replacement of the last nibble of entry-y, but it seems that was found sufficiently unpalatable to avoid. We could attempt to force the language used by objdump by setting an environment variable such as LC_ALL, but that seems fragile. Instead we add a small tool named elf-entry which simply prints out the entry point of the kernel in the format we require. Signed-off-by: Paul Burton Reported-by: Philippe Reynes Tested-by: Philippe Reynes Fixes: 27c524d17430 ("MIPS: Use the entry point from the ELF file header") Patchwork: https://patchwork.linux-mips.org/patch/20322/ Cc: James Hogan Cc: Ralf Baechle Cc: linux-mips@linux-mips.org commit 096055487115883dc82fdebb5d16444585e4fc24 Author: Lionel Landwerlin Date: Thu Aug 30 14:24:24 2018 +0100 drm/i915: clear error registers after error capture We need to clear the register in order to get correct value after the next potential hang. v2: Centralize error register clearing in i915_irq.c (Chris) v3: Don't read gen8 register on < gen6 (Chris) v4: Don't swap gen8+ & gen6+ code... (Chris) Signed-off-by: Lionel Landwerlin Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20180830132424.21940-1-lionel.g.landwerlin@intel.com commit 56e91b12688648fc69aa5896dce3190a1a795ef9 Merge: 3a182c848946 be57bfffb7b5 Author: Takashi Iwai Date: Thu Aug 30 16:55:38 2018 +0200 Merge tag 'hda-codec-h-move' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next ALSA: Move hda_codec.h to include/sound For easier sharing with ASoC. commit 834fe4084d31f30e88a6a2cae25709a38054f839 Merge: 2cfc123eea74 be57bfffb7b5 Author: Mark Brown Date: Thu Aug 30 15:46:15 2018 +0100 Merge tag 'hda-codec-h-move' into asoc-4.20 ALSA: Move hda_codec.h to include/sound For easier sharing with ASoC. commit be57bfffb7b5ba72e1293643053f8861fcaa5163 Author: Pierre-Louis Bossart Date: Wed Aug 22 15:24:57 2018 -0500 ALSA: hda: move hda_codec.h to include/sound As suggested by Takashi, move this header file to make it easier to include from e.g. the Intel Skylake driver in follow-up patches Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown commit b9fad74bfe767aa924d5e329ab3c9a92b20f6b91 Author: Rob Herring Date: Mon Aug 27 20:52:03 2018 -0500 ARM: shmobile: 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: Rob Herring Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit f355eece319507a73d9231e0a6fbccbf00c25286 Author: Linus Walleij Date: Thu Aug 30 11:06:36 2018 +0200 libata: Use SMART LBAM/LBAH password defines Instead of hardcoding magic values for the SMART password, use the defines in Signed-off-by: Linus Walleij Signed-off-by: Jens Axboe commit 381116d327b55b26cc99fb0fa78526c029fb969b Author: Joonas Lahtinen Date: Thu Aug 30 17:26:24 2018 +0300 drm/i915: Update DRIVER_DATE to 20180830 Signed-off-by: Joonas Lahtinen commit 6e249d1ec1b4e39bd51b01cdfa3fa05641ca918e Author: YueHaibing Date: Thu Aug 30 14:01:12 2018 +0000 spi: davinci: remove set but not used variable 'pdata' Fixes gcc '-Wunused-but-set-variable' warning: drivers/spi/spi-davinci.c: In function 'davinci_spi_chipselect': drivers/spi/spi-davinci.c:211:36: warning: variable 'pdata' set but not used [-Wunused-but-set-variable] Signed-off-by: YueHaibing Signed-off-by: Mark Brown commit 0964d66036edde3fd0813b0146066f293ff1ba66 Author: Geert Uytterhoeven Date: Tue Aug 28 17:10:11 2018 +0200 arm64: renesas: Remove the ARCH_SHMOBILE Kconfig symbol The Kconfig symbol for Renesas 64-bit ARM SoCs has always been ARCH_RENESAS, with ARCH_SHMOBILE being selected to reuse drivers shared with Renesas 32-bit ARM and/or Renesas SuperH SH-Mobile SoCs. Commit 9b5ba0df4ea4f940 ("ARM: shmobile: Introduce ARCH_RENESAS") started the conversion from ARCH_SHMOBILE to ARCH_RENESAS for Renesas 32-bit SoCs. Now all drivers for Renesas ARM SoCs have gained proper ARCH_RENESAS platform dependencies, there is no longer a need to select ARCH_SHMOBILE. With ARCH_SHMOBILE gone, move the ARCH_RENESAS section up, to restore alphabetical sort order. Signed-off-by: Geert Uytterhoeven Acked-by: Arnd Bergmann Signed-off-by: Simon Horman commit 08e735233ea29b17bfec8e4cb302e799d9f920b8 Author: Geert Uytterhoeven Date: Tue Aug 28 17:10:10 2018 +0200 ARM: shmobile: Remove the ARCH_SHMOBILE Kconfig symbol All drivers for Renesas ARM SoCs have gained proper ARCH_RENESAS platform dependencies. Hence finish the conversion from ARCH_SHMOBILE to ARCH_RENESAS for Renesas 32-bit ARM SoCs, as started by commit 9b5ba0df4ea4f940 ("ARM: shmobile: Introduce ARCH_RENESAS"). Signed-off-by: Geert Uytterhoeven Acked-by: Arnd Bergmann Signed-off-by: Simon Horman commit 57bc9f041638a62137d7d18bbc51edf712eaf3c1 Author: Geert Uytterhoeven Date: Tue Aug 28 16:56:46 2018 +0200 ARM: shmobile: defconfig: Refresh shmobile_defconfig for v4.19-rc1 Refresh the defconfig for Renesas ARM boards: - Move options that have moved, - Remove CONFIG_HAVE_ARM_ARCH_TIMER (auto-enabled), - Remove ENABLE_WARN_DEPRECATED (removed). Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit 17cc525206d6dba36d0fde12fd512c77dcfa1954 Author: Christian König Date: Thu Aug 30 09:45:07 2018 +0200 drm/amdgpu: Revert "kmap PDs/PTs in amdgpu_vm_update_directories" This reverts commit a7f91061c60ad9cac2e6a03b642be6a4f88b3662. Felix pointed out that we need to have the BOs mapped even before amdgpu_vm_update_directories is called. Signed-off-by: Christian König Acked-by: Junwei Zhang Signed-off-by: Alex Deucher commit ec210e3226dc0b481ac1b33082b3b508f89387e3 Author: Christian König Date: Fri Aug 24 10:48:12 2018 +0200 drm/amdgpu: put GART away from VRAM v2 Always try to put the GART away from where VRAM is. v2: correctly handle the 4GB limitation Signed-off-by: Christian König Reviewed-by: Junwei Zhang Signed-off-by: Alex Deucher commit 202eb5481421040e115526b75317b5ca72584806 Author: Marek Vasut Date: Wed Aug 29 17:15:04 2018 +0200 ARM: dts: socfpga: Rename socfpga_cyclone5_de0_{sockit,nano_soc} Rename DT source for DE0 Nano SoC . The board name is really DE0-Nano-SoC or Atlas SoC, and it is not to be confused with SoCkit board, which is a different one. Rename the DT source file to match the board name and to avoid this possible mixup with another different board. Signed-off-by: Marek Vasut Cc: Dinh Nguyen Cc: Jan Kiszka Signed-off-by: Dinh Nguyen commit 0ffc5df823dd3495441c47ea3ffaa09d4a57a5f1 Author: Dinh Nguyen Date: Mon Jul 9 17:16:00 2018 -0500 ARM: dts: socfpga: update NAND clocking for c5/a5 The NAND IP needs 3 clocks(nand_x_clk, nand_clk, and nand_ecc_clk). The nand_x_clk and nand_ecc_clk are derived from the nand_clk. The nand_x_clk has a fixed divider of 4. Also, update the NAND dts property with the correct clocks property. Signed-off-by: Dinh Nguyen --- v2: add nand_ecc_clk and update commit message commit 12b2982a1f72ce453d76da977e1dad422b2f34ad Author: Dinh Nguyen Date: Mon Jul 9 13:47:20 2018 -0500 ARM: dts: arria10: update NAND clocking The NAND IP needs 3 clocks(nand_x_clk, nand_clk, and nand_ecc_clk). This patch adds a nand_clk, which is derived from the nand_x_clk, but has a fixed divider of 4, and the nand_ecc_clk, which is derived from the nand_x_clk. Update the NAND node to use the additional clocks. Signed-off-by: Dinh Nguyen --- v2: add nand_ecc_clk and update commit message commit 9a8e3cfd3469a7c083c013963ca5282aec63b1e8 Author: Silvan Murer Date: Thu Aug 2 13:41:14 2018 +0200 ARM: dts: socfpga: set timer interrupt to edge sensitive Change timer interrupt to edge sensitive. Signed-off-by: Silvan Murer Reviewed-by: Thor Thayer Signed-off-by: Dinh Nguyen commit f20193f7c79e1a8433954342f0e30cad0f17c192 Author: Simon Goldschmidt Date: Wed Aug 8 11:09:44 2018 +0200 ARM: dts: socfpga: use stdout-path for chosen node Use stdout-path dts property for kernel console. There were two socfpga boards left not using stdout-path: socrates and vining. Make sure they match the other boards. Signed-off-by: Simon Goldschmidt Signed-off-by: Dinh Nguyen commit c8da1d15b8a4957f105ad77bb1404d72e304566f Author: Alan Tull Date: Wed Aug 8 10:42:41 2018 -0500 arm64: dts: stratix10: i2c clock running out of spec DesignWare I2C controller was observed running at 105.93kHz rather than the specified 100kHz. Adjust device tree settings to bring it within spec (a slightly conservative 98 MHz). Signed-off-by: Alan Tull Signed-off-by: Dinh Nguyen commit 18baed2684b02f752b5d800bb113e99730e1d24b Author: Björn Töpel Date: Thu Aug 30 15:12:48 2018 +0200 xsk: include XDP meta data in AF_XDP frames Previously, the AF_XDP (XDP_DRV/XDP_SKB copy-mode) ingress logic did not include XDP meta data in the data buffers copied out to the user application. In this commit, we check if meta data is available, and if so, it is prepended to the frame. Signed-off-by: Björn Töpel Signed-off-by: Daniel Borkmann commit 2ed03c835d6f4dbe9f0d093187825d1c0e2e9b39 Author: Laurent Pinchart Date: Tue Aug 28 14:11:04 2018 +0300 pinctrl: sh-pfc: r8a77990: Add DU pins, groups and function This patch adds DU pins, groups and function for the R8A77990 (E3) SoC. Signed-off-by: Laurent Pinchart Signed-off-by: Geert Uytterhoeven commit 56b48c6a6008d9d5d023b7dd002913c8715dc3a0 Merge: 234dbe3dc1db 1a86ad89da1c Author: Daniel Borkmann Date: Thu Aug 30 14:03:54 2018 +0200 Merge branch 'bpf-bpffs-bpftool-dump-with-btf' Yonghong Song says: ==================== Commit a26ca7c982cb ("bpf: btf: Add pretty print support to the basic arraymap") and Commit 699c86d6ec21 ("bpf: btf: add pretty print for hash/lru_hash maps") added bpffs pretty print for array, hash and lru hash maps. The pretty print gives users a structurally formatted dump for keys/values which much easy to understand than raw bytes. This patch set implemented bpffs pretty print support for percpu arraymap, percpu hashmap and percpu lru hashmap. For complex key/value types, the pretty print here is even more useful due to: . large volumne of data making it even harder to correlate bytes to a particular field in a particular cpu. . kernel rounds the value size for each cpu to multiple of 8. User has to be aware of this otherwise wrong value may be derived from cpu 1/2/... For example, we may have a bpffs pretty print like below: 43602: { cpu0: {43602,0,-43602,0x3,0xaa52,0x3,{43602|[82,170,0,0,0,0,0,0]},ENUM_TWO} cpu1: {43602,0,-43602,0x3,0xaa52,0x3,{43602|[82,170,0,0,0,0,0,0]},ENUM_TWO} cpu2: {43602,0,-43602,0x3,0xaa52,0x3,{43602|[82,170,0,0,0,0,0,0]},ENUM_TWO} cpu3: {43602,0,-43602,0x3,0xaa52,0x3,{43602|[82,170,0,0,0,0,0,0]},ENUM_TWO} } for a percpu map. This patch also added percpu formatted print on bpftool. For example, bpftool may print like below: { "key": 0, "values": [{ "cpu": 0, "value": { "ui32": 0, "ui16": 0, } },{ "cpu": 1, "value": { "ui32": 1, "ui16": 0, } },{ "cpu": 2, "value": { "ui32": 2, "ui16": 0, } },{ "cpu": 3, "value": { "ui32": 3, "ui16": 0, } } ] } Patch #1 implemented bpffs pretty print for percpu arraymap/hash/lru_hash in kernel. Patch #2 added the test case in tools bpf selftest test_btf. Patch #3 added percpu map btf based dump. ==================== Signed-off-by: Daniel Borkmann commit 1a86ad89da1c06b2a326953309dcb99f0d079a32 Author: Yonghong Song Date: Wed Aug 29 14:43:15 2018 -0700 tools/bpf: bpftool: add btf percpu map formated dump The btf pretty print is added to percpu arraymap, percpu hashmap and percpu lru hashmap. For each pair, the following will be added to plain/json output: { "key": , "values": [{ "cpu": 0, "value": },{ "cpu": 1, "value": },{ .... },{ "cpu": n, "value": } ] } For example, the following could be part of plain or json formatted output: { "key": 0, "values": [{ "cpu": 0, "value": { "ui32": 0, "ui16": 0, } },{ "cpu": 1, "value": { "ui32": 1, "ui16": 0, } },{ "cpu": 2, "value": { "ui32": 2, "ui16": 0, } },{ "cpu": 3, "value": { "ui32": 3, "ui16": 0, } } ] } Signed-off-by: Yonghong Song Signed-off-by: Daniel Borkmann commit 6493ebf7242d9b9a2c50db91b9baeb0543990736 Author: Yonghong Song Date: Wed Aug 29 14:43:14 2018 -0700 tools/bpf: add bpffs percpu map pretty print tests in test_btf The bpf selftest test_btf is extended to test bpffs percpu map pretty print for percpu array, percpu hash and percpu lru hash. Signed-off-by: Yonghong Song Signed-off-by: Daniel Borkmann commit c7b27c37af3da5a63f32b0bc99569e3069e4d9c1 Author: Yonghong Song Date: Wed Aug 29 14:43:13 2018 -0700 bpf: add bpffs pretty print for percpu arraymap/hash/lru_hash Added bpffs pretty print for percpu arraymap, percpu hashmap and percpu lru hashmap. For each map pair, the format is: : { cpu0: cpu1: ... cpun: } For example, on my VM, there are 4 cpus, and for test_btf test in the next patch: cat /sys/fs/bpf/pprint_test_percpu_hash You may get: ... 43602: { cpu0: {43602,0,-43602,0x3,0xaa52,0x3,{43602|[82,170,0,0,0,0,0,0]},ENUM_TWO} cpu1: {43602,0,-43602,0x3,0xaa52,0x3,{43602|[82,170,0,0,0,0,0,0]},ENUM_TWO} cpu2: {43602,0,-43602,0x3,0xaa52,0x3,{43602|[82,170,0,0,0,0,0,0]},ENUM_TWO} cpu3: {43602,0,-43602,0x3,0xaa52,0x3,{43602|[82,170,0,0,0,0,0,0]},ENUM_TWO} } 72847: { cpu0: {72847,0,-72847,0x3,0x11c8f,0x3,{72847|[143,28,1,0,0,0,0,0]},ENUM_THREE} cpu1: {72847,0,-72847,0x3,0x11c8f,0x3,{72847|[143,28,1,0,0,0,0,0]},ENUM_THREE} cpu2: {72847,0,-72847,0x3,0x11c8f,0x3,{72847|[143,28,1,0,0,0,0,0]},ENUM_THREE} cpu3: {72847,0,-72847,0x3,0x11c8f,0x3,{72847|[143,28,1,0,0,0,0,0]},ENUM_THREE} } ... Signed-off-by: Yonghong Song Signed-off-by: Daniel Borkmann commit cca6cb8ad7a868f4ae03827e520b9ad7f37f6622 Author: Sam Protsenko Date: Wed Aug 29 20:00:15 2018 +0300 scsi: aic7xxx: Fix build using bare-metal toolchain Bare-metal toolchains don't define __linux__, so aic7xxx build with bare-metal toolchain is broken. This driver codebase used to be partially shared with FreeBSD, but these days there is no point in keeping the compatibility around. So let's just drop FreeBSD related code and get rid of __linux__ checking in order to fix the build using bare-metal toolchains. Signed-off-by: Sam Protsenko Signed-off-by: Martin K. Petersen commit b6876a8407d042de369105e8c86299c83a4fdab1 Author: Chengguang Xu Date: Tue Aug 28 07:50:08 2018 +0800 scsi: libfc: remove unnecessary condition check kmem_cache_destroy() can handle NULL pointer correctly, so there is no need to check NULL pointer before calling kmem_cache_destroy() Signed-off-by: Chengguang Xu Acked-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen commit 26c724a690a1cd10575365da90b5b4040278a6c5 Author: Dan Carpenter Date: Thu Aug 23 16:56:33 2018 +0300 scsi: lpfc: remove an unnecessary NULL check Smatch complains about this code: drivers/scsi/lpfc/lpfc_scsi.c:1053 lpfc_get_scsi_buf_s4() warn: variable dereferenced before check 'lpfc_cmd' (see line 1039) Fortunately the NULL check isn't required so I have removed it. Signed-off-by: Dan Carpenter Signed-off-by: Martin K. Petersen commit 6e4adef7e4b0f5000a914482c028ed6284577997 Author: Joonas Lahtinen Date: Thu Aug 30 14:29:53 2018 +0300 drm/i915: Update DRIVER_DATE to 20180830 Signed-off-by: Joonas Lahtinen commit 165ee6215062f98ac8bf8c62865343cf3306a3c8 Author: Faisal Mehmood Date: Sat Aug 18 23:42:14 2018 +0500 scsi: 53c700: Fix spelling of 'NEGOTIATION' 'NEGOTIATION' was misspelled as 'NEGOTATION'. Fixed it. It is a coding style change which should have no impact on runtime execution of code. Signed-off-by: Faisal Mehmood Signed-off-by: Martin K. Petersen commit 45b7af985d546df2cc5e142c9c108d482811126c Author: Colin Ian King Date: Thu Aug 16 15:02:54 2018 +0100 scsi: be2iscsi: remove unused variable dmsg Variable dmsg is not being used and is redundant and hence can be removed. Cleans up clang warning: warning: variable 'dmsg' set but not used [-Wunused-but-set-variable] Signed-off-by: Colin Ian King Signed-off-by: Martin K. Petersen commit 05a9874426af47e29b8949896e2337431feceac0 Author: Colin Ian King Date: Thu Aug 16 14:33:20 2018 +0100 scsi: aacraid: remove unused variables dev and cpu Variables dev and cpu are not being used and are redundant and hence can be removed. Cleans up clang warnings: warning: variable 'dev' set but not used [-Wunused-but-set-variable] warning: variable 'cpu' set but not used [-Wunused-but-set-variable] Signed-off-by: Colin Ian King Signed-off-by: Martin K. Petersen commit 0eeec01488da9b1403c8c29e73eacac8af9e4bf2 Author: Arnd Bergmann Date: Tue Aug 14 00:27:10 2018 +0200 scsi: raid_attrs: fix unused variable warning I ran into a new warning on randconfig kernels: drivers/scsi/raid_class.c: In function 'raid_match': drivers/scsi/raid_class.c:64:24: error: unused variable 'i' [-Werror=unused-variable] This looks like a very old problem that for some reason was very hard to run into, but it is very easy to fix, by replacing the incorrect #ifdef with a simpler IS_ENABLED() check. Fixes: fac829fdcaf4 ("[SCSI] raid_attrs: fix dependency problems") Signed-off-by: Arnd Bergmann Signed-off-by: Martin K. Petersen commit bfba223dcc4548632d8f3bfd15690a86d4c68504 Author: Justin Chen Date: Fri Aug 17 16:47:39 2018 -0700 gpio: brcmstb: allow 0 width GPIO banks Sometimes we have empty banks within the GPIO block. This commit allows proper handling of 0 width GPIO banks. We handle 0 width GPIO banks by incrementing the bank and number of GPIOs, but not initializing them. This will mean a call into the non-existent GPIOs will return an error. Also remove "GPIO registered" dev print. This information is misleading since the incremented banks and gpio_base do not reflect the actual GPIOs that get initialized. We leave this information out since it is already printed with dev_dbg. Signed-off-by: Justin Chen Acked-by: Florian Fainelli Signed-off-by: Linus Walleij commit 09c4b49457434fa74749ad6194ef28464d9f5df9 Author: Dan Carpenter Date: Wed Jul 4 12:42:50 2018 +0300 drm/virtio: fix bounds check in virtio_gpu_cmd_get_capset() This doesn't affect runtime because in the current code "idx" is always valid. First, we read from "vgdev->capsets[idx].max_size" before checking whether "idx" is within bounds. And secondly the bounds check is off by one so we could end up reading one element beyond the end of the vgdev->capsets[] array. Fixes: 62fb7a5e1096 ("virtio-gpu: add 3d/virgl support") Signed-off-by: Dan Carpenter Link: http://patchwork.freedesktop.org/patch/msgid/20180704094250.m7sgvvzg3dhcvv3h@kili.mountain Signed-off-by: Gerd Hoffmann commit 0e7a3d4b66e18c7a56124594b124d0337059c4f2 Author: Thomas Zimmermann Date: Tue Jul 31 08:21:27 2018 +0200 drm/virtio: Replace ttm_bo_unref with ttm_bo_put The function ttm_bo_put releases a reference to a TTM buffer object. The function's name is more aligned to the Linux kernel convention of naming ref-counting function _get and _put. A call to ttm_bo_unref takes the address of the TTM BO object's pointer and clears the pointer's value to NULL. This is not necessary in most cases and sometimes even worked around by the calling code. A call to ttm_bo_put only releases the reference without clearing the pointer. The current behaviour of cleaning the pointer is kept in the calling code, but should be removed if not required in a later patch. Signed-off-by: Thomas Zimmermann Link: http://patchwork.freedesktop.org/patch/msgid/20180731062127.10131-3-tzimmermann@suse.de Signed-off-by: Gerd Hoffmann commit 94f4a12707c9b425e03fbaea5e0089c64e257831 Author: Thomas Zimmermann Date: Tue Jul 31 08:21:26 2018 +0200 drm/virtio: Replace ttm_bo_reference with ttm_bo_get The function ttm_bo_get acquires a reference on a TTM buffer object. The function's name is more aligned to the Linux kernel convention of naming ref-counting function _get and _put. Signed-off-by: Thomas Zimmermann Link: http://patchwork.freedesktop.org/patch/msgid/20180731062127.10131-2-tzimmermann@suse.de Signed-off-by: Gerd Hoffmann commit 233c2b74b008eada6d6f5ecebc9e1c065826ea37 Author: Thomas Zimmermann Date: Tue Jul 31 08:35:59 2018 +0200 drm/qxl: Replace ttm_bo_unref with ttm_bo_put The function ttm_bo_put releases a reference to a TTM buffer object. The function's name is more aligned to the Linux kernel convention of naming ref-counting function _get and _put. A call to ttm_bo_unref takes the address of the TTM BO object's pointer and clears the pointer's value to NULL. This is not necessary in most cases and sometimes even worked around by the calling code. A call to ttm_bo_put only releases the reference without clearing the pointer. The current behaviour of cleaning the pointer is kept in the calling code, but should be removed if not required in a later patch. Signed-off-by: Thomas Zimmermann Link: http://patchwork.freedesktop.org/patch/msgid/20180731063559.11629-1-tzimmermann@suse.de Signed-off-by: Gerd Hoffmann commit 4efd631e2f48536221a8512e83785484d73bb8ea Author: Thomas Zimmermann Date: Tue Jul 31 08:31:28 2018 +0200 drm/cirrus: Replace ttm_bo_unref with ttm_bo_put The function ttm_bo_put releases a reference to a TTM buffer object. The function's name is more aligned to the Linux kernel convention of naming ref-counting function _get and _put. A call to ttm_bo_unref takes the address of the TTM BO object's pointer and clears the pointer's value to NULL. This is not necessary in most cases and sometimes even worked around by the calling code. A call to ttm_bo_put only releases the reference without clearing the pointer. The current behaviour of cleaning the pointer is kept in the calling code, but should be removed if not required in a later patch. Signed-off-by: Thomas Zimmermann Link: http://patchwork.freedesktop.org/patch/msgid/20180731063128.11041-1-tzimmermann@suse.de Signed-off-by: Gerd Hoffmann commit aba911e6ac7407f8828d53e5270eb15d58a287f4 Author: Thomas Zimmermann Date: Tue Jul 31 08:28:51 2018 +0200 drm/bochs: Replace ttm_bo_unref with ttm_bo_put The function ttm_bo_put releases a reference to a TTM buffer object. The function's name is more aligned to the Linux kernel convention of naming ref-counting function _get and _put. A call to ttm_bo_unref takes the address of the TTM BO object's pointer and clears the pointer's value to NULL. This is not necessary in most cases and sometimes even worked around by the calling code. A call to ttm_bo_put only releases the reference without clearing the pointer. The current behaviour of cleaning the pointer is kept in the calling code, but should be removed if not required in a later patch. Signed-off-by: Thomas Zimmermann Link: http://patchwork.freedesktop.org/patch/msgid/20180731062851.10812-1-tzimmermann@suse.de Signed-off-by: Gerd Hoffmann commit 36f3f19a82152d558ee6846898b9480409b57e9d Author: Linus Walleij Date: Mon Aug 27 22:15:51 2018 +0200 gpio: ftgpio: Support debounce timer The FTGPIO010 has a debounce timer or rather prescaler that will affect interrupts fireing off the block. We can support this to get proper debounce on e.g. keypresses. Since the same prescaler is used across all GPIO lines of the silicon block, we need to bail out if the prescaler is already set and in use by another line. If the prescaler is already set to what we need, fine, we reuse it. This happens more often than not when the same debounce time is set for several GPIO keys, so we support that usecase easily with this code. Signed-off-by: Linus Walleij commit da02d79452ea34e7ab22bd97d2fc7383bc00e16b Author: Linus Walleij Date: Mon Aug 27 22:15:40 2018 +0200 gpio: ftgpio: Support optional silicon clock The GPIO silicon is clocked with a PCLK (peripheral clock) on all systems, however not all platforms model it and include it in e.g. the device tree, so add clock handling but make it optional so we bail out safely if it is e.g. always on. Reviewed-by: Andrew Lunn Signed-off-by: Linus Walleij commit 3a182c848946584a241b4ae220359888bb2f5936 Author: Takashi Iwai Date: Thu Aug 30 07:58:50 2018 +0200 ALSA: hda - Clean up jackpoll_ms option handling Currently the jackpoll_ms option value is passed indirectly by referring to an array in chip->jackpoll_ms although each card needs to see only the assigned value. Also, the sanity check is done at each time in get_jackpoll_interval() although basically jackpoll_ms option is a read-only, hence we need to evaluate only once at probe time. This patch is the code simplification about the above points: the jack polling interval is directly set to chip->jackpoll_interval so that it can be simply copied to each codec. No functional change but only code reduction. Signed-off-by: Takashi Iwai commit f0259b6ac4a3d27f6b7e938d6fce367cea377063 Merge: 016f3d1818b0 9c06602b1b92 Author: David S. Miller Date: Wed Aug 29 22:13:47 2018 -0700 Merge tag 'mac80211-next-for-davem-2018-08-29' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next Johannes Berg says: ==================== Only a few changes at this point: * new channels in 60 GHz * clarify (average) ACK signal reporting API * expose ieee80211_send_layer2_update() for all drivers * start/stop mac80211's TXQs properly when required * avoid regulatory restore with IE ignoring * spelling: contidion -> condition * fully implement WFA Multi-AP backhaul ==================== Signed-off-by: David S. Miller commit 016f3d1818b047c80100d92f023916f9c8d34d3c Author: Li RongQing Date: Wed Aug 29 11:52:10 2018 +0800 vxlan: reduce dirty cache line in vxlan_find_mac vxlan_find_mac() unconditionally set f->used for every packet, this causes a cache miss for every packet, since remote, hlist and used of vxlan_fdb share the same cache line, which are accessed when send every packets. so f->used is set only if not equal to jiffies, to reduce dirty cache line times, this gives 3% speed-up with small packets. Signed-off-by: Zhang Yu Signed-off-by: Li RongQing Signed-off-by: David S. Miller commit 920767a9c8925781afdfdbcbc2c0536d3d9b81c0 Merge: 0927f71dbcfb 64fecd3ec512 Author: David S. Miller Date: Wed Aug 29 20:07:42 2018 -0700 Merge branch 'liquidio-improve-soft-command-response-handling' Weilin Chang says: ==================== liquidio: improve soft command/response handling Change soft command handling to fix the possible race condition when the process handles a response of a soft command that was already freed by an application which got timeout for this request. ==================== Signed-off-by: David S. Miller commit 64fecd3ec512a14a5837ab4eee2779201f353da5 Author: Felix Manlunas Date: Tue Aug 28 18:51:44 2018 -0700 liquidio: remove obsolete functions and data structures 1. Remove unused functions and data structures. 2. Change the sending of the remaining soft commands to synchronous. Signed-off-by: Weilin Chang Signed-off-by: Felix Manlunas Signed-off-by: David S. Miller commit edd572d72f8c6d7179c3943edaea3bcfee9484f5 Author: Felix Manlunas Date: Tue Aug 28 18:51:40 2018 -0700 liquidio: change octnic_ctrl_pkt to do synchronous soft commands 1. Change struct octnic_ctrl_pkt to support synchronous operation. 2. Change code which use structure octnic_ctrl_pkt to send sc's synchronously. Signed-off-by: Weilin Chang Signed-off-by: Felix Manlunas Signed-off-by: David S. Miller commit 6870957ed5bc3a4c15fe556e3ebbb4e2f41d3eed Author: Felix Manlunas Date: Tue Aug 28 18:51:35 2018 -0700 liquidio: make soft command calls synchronous 1. Add wait_for_sc_completion_timeout() for waiting the response and handling common response errors 2. Send sc's synchronously: remove unused callback function, and context structure; use wait_for_sc_completion_timeout() to wait its response. Signed-off-by: Weilin Chang Signed-off-by: Felix Manlunas Signed-off-by: David S. Miller commit c9aec05228dc6fa5573c56dba6bed43250228069 Author: Felix Manlunas Date: Tue Aug 28 18:51:30 2018 -0700 liquidio: improve soft command handling 1. Set LIO_SC_MAX_TMO_MS as the maximum timeout value for a soft command (sc). All sc's use this value as a hard timeout value. Add expiry_time in struct octeon_soft_command to keep the hard timeout value. The field wait_time and timeout in struct octeon_soft_command will be obsoleted in the last patch of this patch series. 2. Add processing a synchronous sc in sc response thread lio_process_ordered_list. The memory allocated for a synchronous sc will be freed by lio_process_ordered_list() to the sc pool. 3. Add two response lists for lio_process_ordered_list to process the storage allocated for sc's: OCTEON_DONE_SC_LIST response list keeps all sc's which will be freed to the pool after their requestors have finished processing the responses. OCTEON_ZOMBIE_SC_LIST response list keeps all sc's which have got LIO_SC_MAX_TMO_MS timeout. When an sc gets a hard timeout, lio_process_order_list() will recheck its status 1 ms later. If the status has not updated by the firmware at that time, the sc will be removed from OCTEON_DONE_SC_LIST response list to OCTEON_ZOMBIE_SC_LIST response list. The sc's in the OCTEON_ZOMBIE_SC_LIST response list will be freed when the driver is unloaded. Signed-off-by: Weilin Chang Signed-off-by: Felix Manlunas Signed-off-by: David S. Miller commit 0927f71dbcfb59131b289d7d518e9472e51d4830 Author: Doron Roberts-Kedes Date: Tue Aug 28 16:33:57 2018 -0700 net/tls: Calculate nsg for zerocopy path without skb_cow_data. decrypt_skb fails if the number of sg elements required to map it is greater than MAX_SKB_FRAGS. nsg must always be calculated, but skb_cow_data adds unnecessary memcpy's for the zerocopy case. The new function skb_nsg calculates the number of scatterlist elements required to map the skb without the extra overhead of skb_cow_data. This patch reduces memcpy by 50% on my encrypted NBD benchmarks. Reported-by: Vakul Garg Reviewed-by: Vakul Garg Tested-by: Vakul Garg Signed-off-by: Doron Roberts-Kedes Signed-off-by: David S. Miller commit 7e8d5755be0e6c92d3b86a85e54c6a550b1910c5 Author: Moritz Fischer Date: Tue Aug 28 15:16:31 2018 -0700 net: nixge: Add support for 64-bit platforms Add support for 64-bit platforms to driver. The hardware only supports 32-bit register accesses so the accesses need to be split up into two writes when setting the current and tail descriptor values. Signed-off-by: Moritz Fischer Cc: Florian Fainelli Signed-off-by: David S. Miller commit 02c7f38b7ace9f1b2ddb7a88139127eef4cf8706 Author: Peter Oskolkov Date: Tue Aug 28 11:36:20 2018 -0700 selftests/net: add ip_defrag selftest This test creates a raw IPv4 socket, fragments a largish UDP datagram and sends the fragments out of order. Then repeats in a loop with different message and fragment lengths. Then does the same with overlapping fragments (with overlapping fragments the expectation is that the recv times out). Tested: root@# time ./ip_defrag.sh ipv4 defrag PASS ipv4 defrag with overlaps PASS real 1m7.679s user 0m0.628s sys 0m2.242s A similar test for IPv6 is to follow. Signed-off-by: Peter Oskolkov Reviewed-by: Willem de Bruijn Signed-off-by: David S. Miller commit 0ff89efb524631ac9901b81446b453c29711c376 Author: Peter Oskolkov Date: Tue Aug 28 11:36:19 2018 -0700 ip: fail fast on IP defrag errors The current behavior of IP defragmentation is inconsistent: - some overlapping/wrong length fragments are dropped without affecting the queue; - most overlapping fragments cause the whole frag queue to be dropped. This patch brings consistency: if a bad fragment is detected, the whole frag queue is dropped. Two major benefits: - fail fast: corrupted frag queues are cleared immediately, instead of by timeout; - testing of overlapping fragments is now much easier: any kind of random fragment length mutation now leads to the frag queue being discarded (IP packet dropped); before this patch, some overlaps were "corrected", with tests not seeing expected packet drops. Note that in one case (see "if (end&7)" conditional) the current behavior is preserved as there are concerns that this could be legitimate padding. Signed-off-by: Peter Oskolkov Reviewed-by: Eric Dumazet Reviewed-by: Willem de Bruijn Signed-off-by: David S. Miller commit b943f17e06493fd2c7fd00743093ad5dcdb90e7f Author: Rick Farrington Date: Tue Aug 28 11:32:55 2018 -0700 liquidio: fix race condition in instruction completion processing In lio_enable_irq, the pkt_in_done count register was being cleared to zero. However, there could be some completed instructions which were not yet processed due to budget and limit constraints. So, only write this register with the number of actual completions that were processed. Signed-off-by: Rick Farrington Signed-off-by: Felix Manlunas Signed-off-by: David S. Miller commit 9ecc660ea1a7a5cebf403fb74ad363400d645463 Author: Rick Farrington Date: Tue Aug 28 11:19:54 2018 -0700 liquidio: remove unnecessary delay when processing IQ responses Signed-off-by: Rick Farrington Signed-off-by: Felix Manlunas Signed-off-by: David S. Miller commit 2930942e0a3923c6142548615b60315f5bbdf81e Merge: 7e3af5936893 9b3004953503 Author: David S. Miller Date: Wed Aug 29 19:46:11 2018 -0700 Merge branch 'ethtool-drop-get_settings-and-set_settings-ops' Michal Kubecek says: ==================== ethtool: drop get_settings and set_settings ops As Andrew Lunn pointed out in recent discussion, there is only one in tree driver left which still defines deprecated callbacks get_settings() and set_settings() in ethtool_ops. First patch converts this driver to get_link_ksettings() and set_link_ksettings(). Second patch then removes the deprecated callbacks from struct ethtool_ops and ethtool code which falls back to them. This doesn't break old versions of ethtool or any other userspace code using ETHTOOL_{G,S}SET. We still implement both (old) ETHTOOL_{G,S}SET and (new) ETHTOOL_{G,S}LINKSETTINGS ioctl commands but after this series both will be implemented only using {g,s}et_link_ksettings(). The only affected code would be out of tree NIC drivers which have not been converted yet. ==================== Signed-off-by: David S. Miller commit 9b3004953503462a4fab31b85e44ae446d48f0bd Author: Michal Kubecek Date: Tue Aug 28 19:56:58 2018 +0200 ethtool: drop get_settings and set_settings callbacks Since [gs]et_settings ethtool_ops callbacks have been deprecated in February 2016, all in tree NIC drivers have been converted to provide [gs]et_link_ksettings() and out of tree drivers have had enough time to do the same. Drop get_settings() and set_settings() and implement both ETHTOOL_[GS]SET and ETHTOOL_[GS]LINKSETTINGS only using [gs]et_link_ksettings(). Signed-off-by: Michal Kubecek Signed-off-by: David S. Miller commit 6ce706a56c9336e8b48d9165d8cf57ace3f048f6 Author: Michal Kubecek Date: Tue Aug 28 19:56:53 2018 +0200 8390/etherh: convert to ethtool_{get, set}_link_ksettings This is the last in-tree driver using the old {get,set}_settings API. Note: this is only build tested. I don't have the hardware at hand; as it's 10Mb/s half duplex device and driver can be built only for one subplatform of 32-bit ARM (Acorn RiscPC), it may be difficult to find someone who does. Signed-off-by: Michal Kubecek Signed-off-by: David S. Miller commit 7e3af593689383e87a84d827c260682863b7f22a Author: Mika Westerberg Date: Tue Aug 28 19:58:43 2018 +0300 net: thunderbolt: Convert to use SPDX identifier This gets rid of the licence boilerblate in favor of SPDX identifier which only takes a single line comment. Signed-off-by: Mika Westerberg Signed-off-by: David S. Miller commit 6fce10f70461c14079d5d44aa2b25c693f4d9221 Author: Michal Kubecek Date: Tue Aug 28 18:51:58 2018 +0200 genetlink: constify genl_err_attr() argument genl_err_attr() sets netlink_ext_ack::bad_attr which is a pointer to const struct nlattr so make the attr argument also const. Signed-off-by: Michal Kubecek Signed-off-by: David S. Miller commit 21c328dcecfc419544c37bbd2decc1e73b6b367b Author: Rob Herring Date: Tue Aug 28 10:44:30 2018 -0500 net: ethernet: 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 S. Miller" Cc: Yisen Zhuang Cc: Salil Mehta Cc: Sebastian Hesselbarth Cc: Felix Fietkau Cc: John Crispin Cc: Sean Wang Cc: Nelson Chang Cc: Matthias Brugger Cc: Wingman Kwok Cc: Murali Karicheri Cc: netdev@vger.kernel.org Signed-off-by: Rob Herring Reviewed-by: Matthias Brugger Acked-by: Sean Wang Signed-off-by: David S. Miller commit 8bad008e79512a06c075c9fb34c5c74acff4ee13 Author: YueHaibing Date: Thu Aug 30 01:29:39 2018 +0000 net/ncsi: remove duplicated include from ncsi-netlink.c Remove duplicated include. Signed-off-by: YueHaibing Signed-off-by: David S. Miller commit 234dbe3dc1db002076bb593c1f6dc5f3ebc46b21 Merge: 29b5e0f34359 8efea21d333d Author: Alexei Starovoitov Date: Wed Aug 29 18:52:13 2018 -0700 Merge branch 'verifier-liveness-simplification' Edward Cree says: ==================== The first patch is a simplification of register liveness tracking by using a separate parentage chain for each register and stack slot, thus avoiding the need for logic to handle callee-saved registers when applying read marks. In the future this idea may be extended to form use-def chains. The second patch adds information about misc/zero data on the stack to the state dumps emitted to the log at various points; this information was found essential in debugging the first patch, and may be useful elsewhere. ==================== Signed-off-by: Alexei Starovoitov commit 8efea21d333d21e1f9177579ffdc69556314f603 Author: Edward Cree Date: Wed Aug 22 20:02:44 2018 +0100 bpf/verifier: display non-spill stack slot types in print_verifier_state If a stack slot does not hold a spilled register (STACK_SPILL), then each of its eight bytes could potentially have a different slot_type. This information can be important for debugging, and previously we either did not print anything for the stack slot, or just printed fp-X=0 in the case where its first byte was STACK_ZERO. Instead, print eight characters with either 0 (STACK_ZERO), m (STACK_MISC) or ? (STACK_INVALID) for any stack slot which is neither STACK_SPILL nor entirely STACK_INVALID. Signed-off-by: Edward Cree Signed-off-by: Alexei Starovoitov commit 679c782de14bd48c19dd74cd1af20a2bc05dd936 Author: Edward Cree Date: Wed Aug 22 20:02:19 2018 +0100 bpf/verifier: per-register parent pointers By giving each register its own liveness chain, we elide the skip_callee() logic. Instead, each register's parent is the state it inherits from; both check_func_call() and prepare_func_exit() automatically connect reg states to the correct chain since when they copy the reg state across (r1-r5 into the callee as args, and r0 out as the return value) they also copy the parent pointer. Signed-off-by: Edward Cree Signed-off-by: Alexei Starovoitov commit 7b38ebdf74308918f2e2e92f8ee8f60f5bbc512c Author: Krzysztof Kozlowski Date: Tue Aug 7 18:21:06 2018 +0200 power: supply: maxim: Add SPDX license identifiers Replace GPL v2.0 and v2.0+ license statements with SPDX license identifiers. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Sebastian Reichel commit b00b04aa668cc16ab67fe7ef553a7d14d4d16861 Author: Ding Xiang Date: Mon Aug 27 06:49:15 2018 -0400 power: supply: ab8500_fg: fix obsolete function simple_strtoul is obsolete, and use kstrtoint instead Signed-off-by: Ding Xiang Signed-off-by: Sebastian Reichel commit 89a74789f4b476cda2c791ba26a1ade116218b15 Author: Colin Ian King Date: Wed Aug 29 15:51:06 2018 +0100 power: supply: cros_usbpd: remove unused pointer 'dev' Pointer 'dev' is being assigned but is never used hence it is redundant and can be removed. Cleans up clang warning: variable 'dev' set but not used [-Wunused-but-set-variable] Signed-off-by: Colin Ian King Reviewed-by: Krzysztof Kozlowski Signed-off-by: Sebastian Reichel commit 64858773d78e820003a94e5a7179d368213655d6 Author: Marek Szyprowski Date: Fri Aug 3 12:55:32 2018 +0200 ARM: dts: exynos: Fix sound in Snow-rev5 Chromebook This patch adds missing properties to the CODEC and sound nodes, so the audio will work also on Snow rev5 Chromebook. This patch is an extension to the commit e9eefc3f8ce0 ("ARM: dts: exynos: Add missing clock and DAI properties to the max98095 node in Snow Chromebook") and commit 6ab569936d60 ("ARM: dts: exynos: Enable HDMI audio on Snow Chromebook"). It has been reported that such changes work fine on the rev5 board too. Signed-off-by: Marek Szyprowski [krzk: Fixed typo in phandle to &max98090] Signed-off-by: Krzysztof Kozlowski commit 8be3e7f0785c2258479aab26c926ed9be6b9a799 Author: Krzysztof Kozlowski Date: Mon Aug 6 18:09:33 2018 +0200 ARM: dts: exynos: Add LDO28 regulator on Exynos5422 Odroid boards The LDO28 is used only on Odroid XU3 for Display Port. Define it so DTS will describe entire hardware. Depending on bootloader behavior this might affect the Display Port because none of drivers are enabling it. By default it is off in S2MPS11 PMIC reset values. However it could be enabled by bootloader so in such case kernel will later disable it as unused regulator. Signed-off-by: Krzysztof Kozlowski Tested-by: Marek Szyprowski commit b5124e4507939e6a254968091148759de37947bb Author: Krzysztof Kozlowski Date: Mon Aug 6 18:09:32 2018 +0200 ARM: dts: exynos: Disable unused PMIC regulators on Exynos5422 Odroid boards Disable unused PMIC regulators on Exynos5422 Odroid boards to reduce energy used. According to schematics: 1. LDO12, LDO16 and LDO24 are not connected, 2. LDO26 is not used on Odroid HC1. Signed-off-by: Krzysztof Kozlowski commit 8e82954979fc41426c924a9bee93d435b5639cda Author: Krzysztof Kozlowski Date: Mon Aug 6 18:09:31 2018 +0200 ARM: dts: exynos: Add unused PMIC regulators on Exynos5422 Odroid boards Define LDO14, LDO20-22, LDO25 and LOD29-38 unused regulators to describe the hardware. Signed-off-by: Krzysztof Kozlowski commit 95ac226222a6130982b9b2d924db2945b6338885 Author: Krzysztof Kozlowski Date: Mon Aug 6 18:09:30 2018 +0200 ARM: dts: exynos: Add missing used PMIC regulators on Exynos5422 Odroid boards Define LDO2, LDO23 and LDO27 critical board regulators to describe the hardware. Suggested-by: Joonyoung Shim Signed-off-by: Krzysztof Kozlowski commit 645b23da6f8b47f295fa87051335d41d139717a5 Author: Marek Szyprowski Date: Tue Aug 7 12:48:49 2018 +0200 ARM: dts: exynos: Mark 1 GHz CPU OPP as suspend OPP on Exynos5250 1 GHz CPU OPP is the default boot value for the Exynos5250 SOC, so mark it as suspend OPP. This fixes suspend/resume on Samsung Exynos5250 Snow Chomebook, which was broken since switching to generic cpufreq-dt driver in v4.3. Cc: # 4.3.x: cd6f55457eb4: ARM: dts: exynos: Remove "cooling-{min|max}-level" for CPU nodes Cc: # 4.3.x: 672f33198bee: arm: dts: exynos: Add missing cooling device properties for CPUs Cc: # 4.3.x Signed-off-by: Marek Szyprowski Reviewed-by: Chanwoo Choi Acked-by: Bartlomiej Zolnierkiewicz Signed-off-by: Krzysztof Kozlowski commit eb9e16d8573e243f8175647f851eb5085dbe97a4 Author: Marek Szyprowski Date: Tue Aug 7 12:48:48 2018 +0200 ARM: dts: exynos: Convert exynos5250.dtsi to opp-v2 bindings Convert Exynos5250 to OPP-v2 bindings. This is a preparation to add proper support for suspend operation point, which cannot be marked in opp-v1. Cc: # 4.3.x: cd6f55457eb4: ARM: dts: exynos: Remove "cooling-{min|max}-level" for CPU nodes Cc: # 4.3.x: 672f33198bee: arm: dts: exynos: Add missing cooling device properties for CPUs Cc: # 4.3.x Signed-off-by: Marek Szyprowski Reviewed-by: Chanwoo Choi Acked-by: Bartlomiej Zolnierkiewicz Signed-off-by: Krzysztof Kozlowski commit 29b5e0f34359f0e1c95aa644bdd92e459c1231ee Merge: 7d2c6cfc5411 58c50ae4a0b6 Author: Alexei Starovoitov Date: Wed Aug 29 12:26:39 2018 -0700 Merge branch 'AF_XDP-zerocopy-for-i40e' Björn Töpel says: ==================== This patch set introduces zero-copy AF_XDP support for Intel's i40e driver. In the first preparatory patch we also add support for XDP_REDIRECT for zero-copy allocated frames so that XDP programs can redirect them. This was a ToDo from the first AF_XDP zero-copy patch set from early June. Special thanks to Alex Duyck and Jesper Dangaard Brouer for reviewing earlier versions of this patch set. The i40e zero-copy code is located in its own file i40e_xsk.[ch]. Note that in the interest of time, to get an AF_XDP zero-copy implementation out there for people to try, some code paths have been copied from the XDP path to the zero-copy path. It is out goal to merge the two paths in later patch sets. In contrast to the implementation from beginning of June, this patch set does not require any extra HW queues for AF_XDP zero-copy TX. Instead, the XDP TX HW queue is used for both XDP_REDIRECT and AF_XDP zero-copy TX. Jeff, given that most of changes are in i40e, it is up to you how you would like to route these patches. The set is tagged bpf-next, but if taking it via the Intel driver tree is easier, let us know. We have run some benchmarks on a dual socket system with two Broadwell E5 2660 @ 2.0 GHz with hyperthreading turned off. Each socket has 14 cores which gives a total of 28, but only two cores are used in these experiments. One for TR/RX and one for the user space application. The memory is DDR4 @ 2133 MT/s (1067 MHz) and the size of each DIMM is 8192MB and with 8 of those DIMMs in the system we have 64 GB of total memory. The compiler used is gcc (Ubuntu 7.3.0-16ubuntu3) 7.3.0. The NIC is Intel I40E 40Gbit/s using the i40e driver. Below are the results in Mpps of the I40E NIC benchmark runs for 64 and 1500 byte packets, generated by a commercial packet generator HW outputing packets at full 40 Gbit/s line rate. The results are with retpoline and all other spectre and meltdown fixes, so these results are not comparable to the ones from the zero-copy patch set in June. AF_XDP performance 64 byte packets. Benchmark XDP_SKB XDP_DRV XDP_DRV with zerocopy rxdrop 2.6 8.2 15.0 txpush 2.2 - 21.9 l2fwd 1.7 2.3 11.3 AF_XDP performance 1500 byte packets: Benchmark XDP_SKB XDP_DRV XDP_DRV with zerocopy rxdrop 2.0 3.3 3.3 l2fwd 1.3 1.7 3.1 XDP performance on our system as a base line: 64 byte packets: XDP stats CPU pps issue-pps XDP-RX CPU 16 18.4M 0 1500 byte packets: XDP stats CPU pps issue-pps XDP-RX CPU 16 3.3M 0 The structure of the patch set is as follows: Patch 1: Add support for XDP_REDIRECT of zero-copy allocated frames Patches 2-4: Preparatory patches to common xsk and net code Patches 5-7: Preparatory patches to i40e driver code for RX Patch 8: i40e zero-copy support for RX Patch 9: Preparatory patch to i40e driver code for TX Patch 10: i40e zero-copy support for TX Patch 11: Add flags to sample application to force zero-copy/copy mode ==================== Acked-by: Daniel Borkmann Signed-off-by: Alexei Starovoitov commit 58c50ae4a0b638ebbcdddf03cfa4fd36f0edeb02 Author: Björn Töpel Date: Tue Aug 28 14:44:35 2018 +0200 samples/bpf: add -c/--copy -z/--zero-copy flags to xdpsock The -c/--copy -z/--zero-copy flags enforces either copy or zero-copy mode. Signed-off-by: Björn Töpel Signed-off-by: Alexei Starovoitov commit 1328dcddbd53900481994f4c4d8b79e64477965e Author: Magnus Karlsson Date: Tue Aug 28 14:44:34 2018 +0200 i40e: add AF_XDP zero-copy Tx support This patch adds zero-copy Tx support for AF_XDP sockets. It implements the ndo_xsk_async_xmit netdev ndo and performs all the Tx logic from a NAPI context. This means pulling egress packets from the Tx ring, placing the frames on the NIC HW descriptor ring and completing sent frames back to the application via the completion ring. The regular XDP Tx ring is used for AF_XDP as well. This rationale for this is as follows: XDP_REDIRECT guarantees mutual exclusion between different NAPI contexts based on CPU id. In other words, a netdev can XDP_REDIRECT to another netdev with a different NAPI context, since the operation is bound to a specific core and each core has its own hardware ring. As the AF_XDP Tx action is running in the same NAPI context and using the same ring, it will also be protected from XDP_REDIRECT actions with the exact same mechanism. As with AF_XDP Rx, all AF_XDP Tx specific functions are added to i40e_xsk.c. Signed-off-by: Magnus Karlsson Signed-off-by: Alexei Starovoitov commit a96e7472732842d76af0132c5f87f531f312d7a9 Author: Magnus Karlsson Date: Tue Aug 28 14:44:33 2018 +0200 i40e: move common Tx functions to i40e_txrx_common.h This patch prepares for the upcoming zero-copy Tx functionality, by moving common functions and refactor chunks of code into re-usable functions, used both by the regular path and zero-copy path. Signed-off-by: Magnus Karlsson Signed-off-by: Alexei Starovoitov commit 0a714186d3c0f7c563a03537f98716457c1f5ae0 Author: Björn Töpel Date: Tue Aug 28 14:44:32 2018 +0200 i40e: add AF_XDP zero-copy Rx support This patch adds zero-copy Rx support for AF_XDP sockets. Instead of allocating buffers of type MEM_TYPE_PAGE_SHARED, the Rx frames are allocated as MEM_TYPE_ZERO_COPY when AF_XDP is enabled for a certain queue. All AF_XDP specific functions are added to a new file, i40e_xsk.c. Note that when AF_XDP zero-copy is enabled, the XDP action XDP_PASS will allocate a new buffer and copy the zero-copy frame prior passing it to the kernel stack. Signed-off-by: Björn Töpel Signed-off-by: Alexei Starovoitov commit 20a739dbef28fb3c17de2789a3d7847efec6a3ff Author: Björn Töpel Date: Tue Aug 28 14:44:31 2018 +0200 i40e: move common Rx functions to i40e_txrx_common.h This patch prepares for the upcoming zero-copy Rx functionality, by moving/changing linkage of common functions, used both by the regular path and zero-copy path. Signed-off-by: Björn Töpel Signed-off-by: Alexei Starovoitov commit 6d7aad1da2791cc0863a5b8068dcdb8c7536519d Author: Björn Töpel Date: Tue Aug 28 14:44:30 2018 +0200 i40e: refactor Rx path for re-use In this commit, the Rx path is refactored some, as a step torwards the introduction AF_XDP Rx zero-copy. The page re-use counter is moved into the i40e_reuse_rx_page, instead of bumping the counter in many places. The Rx buffer page clearing is moved for better readability. Lastely, functions to update statistics and bump the XDP Tx ring are introduced. Signed-off-by: Björn Töpel Signed-off-by: Alexei Starovoitov commit 123cecd427b6c1af5bdc3a90131ae85581854319 Author: Björn Töpel Date: Tue Aug 28 14:44:29 2018 +0200 i40e: added queue pair disable/enable functions Add functions for queue pair enable/disable. Instead of resetting the whole device, only the affected queue pair is disabled or enabled. This plumbing is used in a later commit, when zero-copy AF_XDP support is introduced. Signed-off-by: Björn Töpel Signed-off-by: Alexei Starovoitov commit 6c5c9581044dd6e0cd284ab653502fb9264f08b6 Author: Magnus Karlsson Date: Tue Aug 28 14:44:28 2018 +0200 net: add napi_if_scheduled_mark_missed The function napi_if_scheduled_mark_missed is used to check if the NAPI context is scheduled, if so set NAPIF_STATE_MISSED and return true. Used by the AF_XDP zero-copy i40e Tx code implementation in order to make sure that irq affinity is honored by the napi context. Signed-off-by: Magnus Karlsson Signed-off-by: Alexei Starovoitov commit 902540342096af8a13351f6a22bfdd7a8e19ffd2 Author: Björn Töpel Date: Tue Aug 28 14:44:27 2018 +0200 xsk: expose xdp_umem_get_{data,dma} to drivers Move the xdp_umem_get_{data,dma} functions to include/net/xdp_sock.h, so that the upcoming zero-copy implementation in the Ethernet drivers can utilize them. Also, supply some dummy function implementations for CONFIG_XDP_SOCKETS=n configs. Signed-off-by: Björn Töpel Signed-off-by: Alexei Starovoitov commit dce5bd6140a436e3348f6d13a1efb6e6c5a89acd Author: Björn Töpel Date: Tue Aug 28 14:44:26 2018 +0200 xdp: export xdp_rxq_info_unreg_mem_model Export __xdp_rxq_info_unreg_mem_model as xdp_rxq_info_unreg_mem_model, so it can be used from netdev drivers. Also, add additional checks for the memory type. Signed-off-by: Björn Töpel Signed-off-by: Alexei Starovoitov commit b0d1beeff2a97a0cf1965ea8f1d13b8973f22582 Author: Björn Töpel Date: Tue Aug 28 14:44:25 2018 +0200 xdp: implement convert_to_xdp_frame for MEM_TYPE_ZERO_COPY This commit adds proper MEM_TYPE_ZERO_COPY support for convert_to_xdp_frame. Converting a MEM_TYPE_ZERO_COPY xdp_buff to an xdp_frame is done by transforming the MEM_TYPE_ZERO_COPY buffer into a MEM_TYPE_PAGE_ORDER0 frame. This is costly, and in the future it might make sense to implement a more sophisticated thread-safe alloc/free scheme for MEM_TYPE_ZERO_COPY, so that no allocation and copy is required in the fast-path. Signed-off-by: Björn Töpel Signed-off-by: Alexei Starovoitov commit db4e26115c73378d6617f1c92786855b2ad26aec Author: Krzysztof Kozlowski Date: Mon Jul 23 19:52:59 2018 +0200 ARM: dts: s5pv210: Switch to S5Pv210 specific pinctrl wakeup compatible The pin controller block of S5Pv210 for handling external wakeup interrupts is different than in newer designs (Exynos). Signed-off-by: Krzysztof Kozlowski Cc: Tomasz Figa Cc: Sylwester Nawrocki Acked-by: Tomasz Figa commit 21cb5a27483a3cfdbcb7508a06a30c0a485e1211 Author: Andrzej Hajda Date: Thu Jul 26 12:12:28 2018 +0200 ARM: dts: exynos: Fix HDMI-HPD line handling on Arndale HDMI-HPD was set active low, moreover by default pincontrol chip sets pull-down on the pin. As a result HDMI driver assumes TV is always connected regardless of actual state. The patch fixes it. Signed-off-by: Andrzej Hajda Signed-off-by: Krzysztof Kozlowski commit 620375c8fdf2f9f5110ed48d6c407cc4b7554f86 Author: Andrzej Hajda Date: Thu Jul 26 15:22:09 2018 +0200 ARM: dts: exynos: Use i2c-gpio for HDMI-DDC on Arndale HDMI-DDC for unknown reasons doesn't work with Exynos I2C controllers. Fortunately i2c-gpio comes to the rescue. Signed-off-by: Andrzej Hajda Signed-off-by: Krzysztof Kozlowski commit 0772cf588cc9ee1bc151d109769f8729cee3a084 Author: Andrzej Hajda Date: Wed Jul 25 17:46:42 2018 +0200 ARM: dts: exynos: Add DSI and panel nodes on Arndale Add to Arndale board: bridge and panel nodes, DSI properties and regulators required by the bridge. Signed-off-by: Andrzej Hajda Signed-off-by: Maciej Purski Signed-off-by: Krzysztof Kozlowski commit d428b5355d5fe7739ba7a7f20bccb41a5d9acf78 Author: Andrzej Hajda Date: Wed Jul 25 17:46:41 2018 +0200 ARM: dts: exynos: Add DSI node on Exynos5250 Add common part of DSI node for Exynos5250 platforms and a required mipi-phy node. Signed-off-by: Andrzej Hajda Signed-off-by: Maciej Purski Signed-off-by: Krzysztof Kozlowski commit feef7918667b84f9d5653c501542dd8d84ae32af Author: Tuomas Tynkkynen Date: Sun Aug 19 22:20:23 2018 +0300 MIPS: BCM47XX: Enable USB power on Netgear WNDR3400v3 Setting GPIO 21 high seems to be required to enable power to USB ports on the WNDR3400v3. As there is already similar code for WNR3500L, make the existing USB power GPIO code generic and use that. Signed-off-by: Tuomas Tynkkynen Acked-by: Hauke Mehrtens Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/20259/ Cc: Rafał Miłecki Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org commit d9997b64c52b70bd98c48f443f068253621d1ffc Author: Alex Deucher Date: Tue Aug 28 14:16:23 2018 -0500 drm/amdgpu: add missing CHIP_HAINAN in amdgpu_ucode_get_load_type This caused a confusing error message, but there is functionally no problem since the default method is DIRECT. Reviewed-by: Michel Dänzer Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 2690262ec9fea3aa364ca9cd31981d7fe3888a5b Author: Amber Lin Date: Wed Aug 29 12:39:16 2018 -0500 drm/amdgpu: Relocate some definitions v2 Move some KFD-related (but used in amdgpu_drv.c) definitions from kfd_priv.h to kgd_kfd_interface.h so we don't need to include kfd_priv.h in amdgpu_drv.c. This fixes a build failure when AMDGPU is enabled but MMU_NOTIFIER is not. This patch also disables KFD-related module options when HSA_AMD is not enabled. v2: rebase (Alex) Signed-off-by: Amber Lin Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit dcaaff4eed13c4dcc15525ff87269b3f4544345a Author: Philip Yang Date: Wed Aug 29 10:53:23 2018 -0400 drm/amdgpu: remove redundant memset kvmalloc_array uses __GFP_ZERO flag ensures that the returned address is zeroed already, memset it to zero again afterwards is unnecessary, and in this case buggy because we only clear the first entry. Signed-off-by: Philip Yang Reviewed-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 25eef4214a43513c9166d8a99470b3a4d2220976 Author: Michel Dänzer Date: Tue Aug 28 18:56:29 2018 +0200 drm/ttm: Initialize local lists in ttm_bo_bulk_move_helper The first parameter of list_cut_position() must point to an initialized list. Noticed thanks to KASAN pointing out something's fishy here. Fixes: "drm/ttm: add bulk move function on LRU" Reviewed-by: Christian König Signed-off-by: Michel Dänzer Signed-off-by: Alex Deucher commit 5f232bd79b2417450064b78a9b3d398f9cd498ba Author: Christian König Date: Fri Aug 24 09:40:10 2018 +0200 drm/amdgpu: use the smaller hole for GART Instead of the larger one use the smaller hole in the MC address space for the GART mappings. Signed-off-by: Christian König Reviewed-by: Junwei Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit d78c1fa0c9f815fe951fd57001acca3d35262a17 Author: Michel Dänzer Date: Wed Aug 29 11:59:38 2018 +0200 Revert "drm/amdgpu: move PD/PT bos on LRU again" This reverts commit 31625ccae4464b61ec8cdb9740df848bbc857a5b. It triggered various badness on my development machine when running the piglit gpu profile with radeonsi on Bonaire, looks like memory corruption due to insufficiently protected list manipulations. Signed-off-by: Michel Dänzer Signed-off-by: Alex Deucher commit 0e33495d4907f0834321c678f86c912d64f0cd6c Author: Christian König Date: Mon Aug 27 13:51:27 2018 +0200 drm/amdgpu: distinct between allocated GART space and GMC addr Most of the time we only need to know if the BO has a valid GMC addr. Signed-off-by: Christian König Reviewed-by: Junwei Zhang Acked-by: Felix Kuehling Signed-off-by: Alex Deucher commit 22d8bfafcc12dfa17b91d2e8ae4e1898e782003a Author: Christian König Date: Mon Aug 27 13:12:19 2018 +0200 drm/amdgpu: stop using gart_start as offset for the GTT domain Further separate GART and GTT domain. Signed-off-by: Christian König Reviewed-by: Junwei Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 0be655d1c6c6a98811067544f6a84ebd42ba46b3 Author: Christian König Date: Thu Aug 23 20:38:52 2018 +0200 drm/amdgpu: fix amdgpu_gmc_gart_location a little bit Improve the VCE limitation handling. Signed-off-by: Christian König Reviewed-by: Alex Deucher Reviewed-by: Junwei Zhang Signed-off-by: Alex Deucher commit 961c75cf203179d0c546722290bf4b1147e5feb1 Author: Christian König Date: Thu Aug 23 15:20:43 2018 +0200 drm/amdgpu: move amdgpu_device_(vram|gtt)_location Move that into amdgpu_gmc.c since we are really deadling with GMC address space here. Signed-off-by: Christian König Reviewed-by: Alex Deucher Reviewed-by: Junwei Zhang Signed-off-by: Alex Deucher commit efa9a5ef10fbbf500e6b479359dde72947a9799e Author: Christian König Date: Tue Aug 28 13:44:32 2018 +0200 drm/amdgpu: remove amdgpu_bo_gpu_accessible Not used any more. Signed-off-by: Christian König Reviewed-by: Michel Dänzer Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit bf47afbabf1cf149f9ebc8e1f7dab6913e360dc4 Author: Oak Zeng Date: Mon Aug 27 15:18:36 2018 -0400 drm/amdkfd: Release an acquired process vm For compute vm acquired from amdgpu, vm.pasid is managed by kfd. Decouple pasid from such vm on process destroy to avoid duplicate pasid release. Signed-off-by: Oak Zeng Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 1685b01a858872075bc258a350153de0c7e95404 Author: Oak Zeng Date: Wed Aug 29 12:33:52 2018 -0500 drm/amdgpu: Set pasid for compute vm (v2) To make a amdgpu vm to a compute vm, the old pasid will be freed and replaced with a pasid managed by kfd. Kfd can't reuse original pasid allocated by amdgpu because kfd uses different pasid policy with amdgpu. For example, all graphic devices share one same pasid in a process. v2: rebase (Alex) Signed-off-by: Oak Zeng Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 901fd85251e5dea328d287352d99e342d05c6e09 Author: Wolfram Sang Date: Thu Aug 23 15:34:54 2018 +0200 dmaengine: use SPDX identifier for Renesas drivers Signed-off-by: Wolfram Sang Reviewed-by: Simon Horman Signed-off-by: Vinod Koul commit 5658f4f94ccab6fa93af82368a63256011f9592c Author: Hans de Goede Date: Mon Aug 27 09:45:45 2018 +0200 dmaengine: dw: Add alternative ACPI HIDs for Cherry Trail DMA controllers Bay and Cherry Trail DSTDs represent a different set of devices depending on which OS the device think it is booting. One set of decices for Windows and another set of devices for Android which targets the Android-x86 Linux kernel fork (which e.g. used to have its own display driver instead of using the i915 driver). Which set of devices we are actually going to get is out of our control, this is controlled by the ACPI OSID variable, which gets either set through an EFI setup option, or sometimes is autodetected. So we need to support both. This commit adds support for the 80862286 and 808622C0 ACPI HIDs which we get for the first resp. second DMA controller on Cherry Trail devices when OSID is set to Android. Signed-off-by: Hans de Goede Signed-off-by: Vinod Koul commit 7c590fcca66b58957f8e34acdb0587cd1eeed35b Author: Paul E. McKenney Date: Tue Aug 7 16:42:42 2018 -0700 rcutorture: Maintain self-propagating CB only during forward-progress test The current forward-progress testing maintains a self-propagating callback during the full test. This could result in false negatives for stutter-end checking, where it might appear that RCU was clearing out old callbacks only because it was being continually motivated by the self-propagating callback. This commit therefore shuts down the self-propagating callback at the end of each forward-progress test interval. Signed-off-by: Paul E. McKenney commit 474e59b476b3390ef9f730515439f21640b61623 Author: Paul E. McKenney Date: Tue Aug 7 14:34:44 2018 -0700 rcutorture: Check GP completion at stutter end The rcu_torture_writer() function invokes stutter_wait() at the end of each writer pass, which occasionally blocks for an extended time period in order to ensure that RCU can handle intermittent loads. But part of handling a busy period is invoking all the callbacks before the end of the idle period induced by stutter_wait(). This commit therefore adds a return value to stutter_wait() indicating whether stutter_wait() actually waited. In addition, this commit causes rcu_torture_writer() to test this value and if set, checks that all the elements of the rcu_tortures[] array have been freed up. Signed-off-by: Paul E. McKenney commit f4de46ed5bbc8ba9acebc8ac75809751b716e470 Author: Paul E. McKenney Date: Tue Jul 24 20:50:40 2018 -0700 rcutorture: Print forward-progress test interval on error This commit prints the duration of the forward-progress test interval in the case that no forward progress was observed as an aid to debugging. When forward progress does happen, it prints out the number of rcu_torture_writer() versions and grace periods that elapsed during the forward-progress test. At the end of the run, it also prints the number of attempted and actual forward-progress tests. Signed-off-by: Paul E. McKenney commit c04dd09bd38c0df1aa6318164a51eccbc3a9fa5e Author: Paul E. McKenney Date: Mon Jul 23 14:16:47 2018 -0700 rcutorture: Adjust number of reader kthreads per CPU-hotplug operations Currently, rcutorture provisions rcu_torture_reader() kthreads based on the initial number of CPUs. This can be problematic when CPU hotplug is enabled, as a system with a very large number of CPUs will provision a very large number of rcu_torture_reader() kthreads. All of these kthreads will continue running even if the CPU-hotplug operations result in only one remaining online CPU. This can result in all sorts of strange artifacts due simply to massive overload. This commit therefore causes the rcu_torture_reader() kthreads to start blocking as the number of online CPUs decreases. This is accomplished by numbering these kthreads, and having each check to make sure that the number of online CPUs is at least as large as its assigned number. Signed-off-by: Paul E. McKenney commit fecad5091f35425246316ab25c8a9f2aa44a7051 Author: Paul E. McKenney Date: Fri Jul 20 12:18:11 2018 -0700 rcutorture: Reduce priority of forward-progress testing On !SMP tests, the forward-progress kthread might prevent RCU's grace-period kthread from running, which would defeat RCU's forward-progress measures. On PREEMPT tests without RCU priority boosting, the forward-progress kthread might preempt a reader for an extended time period, which would also defeat RCU's forward-progress measures. This commit therefore reduced rcutorture's forward-progress kthread's priority in those cases. Signed-off-by: Paul E. McKenney commit 1e69676592edaf81eed88ba53f5239d84fae4e67 Author: Paul E. McKenney Date: Fri Jul 20 12:04:12 2018 -0700 rcutorture: Limit reader duration if irq or bh disabled There are debug checks in some environments that will complain if the duration of a bh-disabled region of code exceeds about 50 milliseconds. Because rcu_read_delay() can produce a 50-millisecond delay and because there could be up to eight reader segments with such delays, this commit limits the maximum delay to 10 milliseconds if either interrupts or softirqs are disabled. Reported-by: Thomas Gleixner Signed-off-by: Paul E. McKenney commit 3cff54a830f760eafc9c20191ce1d4b8c356d002 Author: Paul E. McKenney Date: Thu Jul 19 15:25:57 2018 -0700 rcutorture: Increase rcu_read_delay() longdelay_ms RCU now takes certain actions 100 and 200 milliseconds into a grace period by default, but rcutorture only runs RCU read-side critical sections with durations up to 50 milliseconds. This commit therefore increases test coverage by increasing the maximum critical-section duration to 300 milliseconds. Note that the existing code automatically dials down the probability of long delays based on the maximum duration, which means that this change should not significantly change the rate of execution of RCU read-side critical sections. Signed-off-by: Paul E. McKenney commit 9fdcb9afe082794c6dcf2b79b3070ef5dafc8a8f Author: Paul E. McKenney Date: Thu Jul 19 13:36:00 2018 -0700 rcutorture: Add self-propagating callback to forward-progress testing If rcutorture is run on a quiet system with the rcutorture.stutter module parameter set high, then there can legitimately be an extended period during which no RCU forward progress takes place. This can result in false-positive no-forward-progress splats. This commit therefore makes rcu_torture_fwd_prog() create a self-propagating RCU callback to ensure that grace periods are in progress for the duration of the forward-progress test. Note that the RCU flavor under test must define ->call(), ->sync(), and ->cb_barrier() for this self-propagating callback to be created. If one or more of those rcu_torture_ops fields are NULL, then the rcu_torture_fwd_prog() function will silently proceed without creating the self-propagating callback. Signed-off-by: Paul E. McKenney commit 08a7a2ec68348ebc6d8bf5f20df23815fc0d332b Author: Paul E. McKenney Date: Thu Jul 19 13:07:20 2018 -0700 rcutorture: Vary forward-progress test interval Some of the Linux kernel's RCU implementations provide several mechanisms to promote forward progress that operate over different timeframes. This commit therefore causes rcu_torture_fwd_prog() to vary the duration of its forward-progress testing in order to test each such mechanism. Signed-off-by: Paul E. McKenney commit 152f4afbfd58f8ada7591113129aa6ba7fe114c5 Author: Paul E. McKenney Date: Thu Jul 19 10:57:58 2018 -0700 rcutorture: Avoid no-test complaint if too few forward-progress tries In a too-short test, random delays can cause each attempt to do forward-progress testing to fail to complete, thus resulting in spurious splats. This commit therefore requires at least five tries before complaining about rcutorture runs that failed to produce at least one valid forward-progress testing attempt. Note that actual forward-progress failures will splat regardless of the number of tries. Signed-off-by: Paul E. McKenney commit 119248bec9d318ae41da8ab8f400f07e7a610cc3 Author: Paul E. McKenney Date: Wed Jul 18 15:39:37 2018 -0700 rcutorture: Also use GP sequence to judge forward progress Currently, rcutorture relies solely on the progress of rcu_torture_writer() to judge grace-period forward progress. In theory, this is the gold standard of forward progress, but in practice rcutorture separately detects and reports rcu_torture_writer() stalls. This commit therefore adds the grace-period sequence number (when provided) to the judgment of grace-period forward progress, which makes it easier to distinguish between failure of actual grace periods to progress on the one hand and downstream forward-progress failures on the other. For example, given this change, if rcu_torture_writer() stalls, but rcu_torture_fwd_prog() does not complain, then the grace-period computation is working, which is a hint that the failure lies in callback processing, wakeup of the rcu_torture_writer() kthread, or similar. Signed-off-by: Paul E. McKenney commit 1b27291b1ea4f1f2090fb07c3425db474cdb99ba Author: Paul E. McKenney Date: Wed Jul 18 14:32:31 2018 -0700 rcutorture: Add forward-progress tests for RCU grace periods This commit adds a kthread that loops going into and out of RCU read-side critical sections, but also including a cond_resched(), optionally guarded by a check of need_resched(), in that same loop. This commit relies solely on rcu_torture_writer() progress to judge the forward progress of grace periods. Note that Tasks RCU and SRCU are exempted from forward-progress testing due their (intentionally) less-robust forward-progress guarantees. Signed-off-by: Paul E. McKenney commit a52d14addf06c00cfca4f1698e254955942be754 Author: Paul E. McKenney Date: Sat Jul 7 10:30:28 2018 -0700 rcutorture: Remove TREE06 and TREE08 from the default test list Now that there is only one RCU flavor to rule them all, the TREE06 and TREE08 test scenarios are redundant. This commit therefore removes them. Later changes will rebalance and renumber the tests. Signed-off-by: Paul E. McKenney commit f0288064425ff9a5e05c8c0fdba6ec7681dd3330 Author: Paul E. McKenney Date: Sat Jul 7 18:26:50 2018 -0700 rcuperf: Warn on bad perf type for built-in tests When running a built-in rcuperf test, specifying an invalid perf type results in what looks like a hard hang, with the error messages hidden by other boot-time output. This commit therefore executes a WARN_ON() in this case so that the splat appears just following the error messages. Signed-off-by: Paul E. McKenney commit e746b558572efbad250e35e582a32ecabc9e9316 Author: Paul E. McKenney Date: Sat Jul 7 17:35:22 2018 -0700 rcutorture: Warn on bad torture type for built-in tests When running a built-in rcutorture test, specifying an invalid torture type results in what looks like a hard hang, with the error messages hidden by other boot-time output. This commit therefore executes a WARN_ON() in this case so that the splat appears just following the error messages. Signed-off-by: Paul E. McKenney commit 444da518fd554eb1b9875dc97fac6ec249cee330 Author: Paul E. McKenney Date: Wed Jul 4 14:14:42 2018 -0700 rcutorture: Force occasional reader waits Deferred quiescent states can interact with the scheduler, but rcu_torture_reader() does not force such interaction all that frequently. This commit therefore blocks for one jiffy after ten jiffies of read-side runtime. This has the beneficial effect of being most likely to block just after long-running readers, and it is exactly these readers that are most likely to have been preempted (in CONFIG_PREEMPT=y kernels). This in turn helps increase the probability that a deferred quiescent state will be seen by RCU's context-switch hooks. Signed-off-by: Paul E. McKenney commit 31e7490741566d6f72be3a68bf9259a3bc2bc21d Author: Paul E. McKenney Date: Sun Jul 1 05:48:46 2018 -0700 torture: Stop overwriting Make.out file with obsolete version The old approach placed all the build products into the b* directories, which meant that some of these build products needed to be copied to the proper directory in the res hierarchy. The new approach leaves things like .config and the .o files in the b1 directory, but directs build output and diagnostics directly to the proper directory in the res hierarchy. Unfortunately, one of the copies was still carried out, which could (and sometimes did) overwrite the build output and diagnostics with obsolete output remaining in the b1 directory. This commit therefore removes the offending "cp" command. Signed-off-by: Paul E. McKenney commit 90082cd397aebc8ce375904024d7c80d1258df85 Author: Huang Shijie Date: Mon Aug 6 16:52:31 2018 +0800 dmaengine: add COMPILE_TEST for the drivers We can do the compiling test with COMPILE_TEST. This patch adds the COMPILE_TEST for the drivers. Signed-off-by: Huang Shijie Acked-by: Linus Walleij Acked-by: Robert Jarzmik Signed-off-by: Vinod Koul commit fbb69ece0462ae95bbdff3ade9288bb5f1709f26 Author: Huang Shijie Date: Mon Aug 6 16:52:30 2018 +0800 dmaengine: mxs-dma: use dmaenginem_async_device_register to simplify the code Use dmaenginem_async_device_register to simplify the code: remove dma_async_device_unregister. Signed-off-by: Huang Shijie Signed-off-by: Vinod Koul commit d72c5f98539d092692d5d94dfcb74e1d27588907 Author: Huang Shijie Date: Mon Aug 6 16:52:29 2018 +0800 dmaengine: pxa_dma: use dmaenginem_async_device_register to simplify the code Use dmaenginem_async_device_register to simplify the code: remove dma_async_device_unregister. Signed-off-by: Huang Shijie Acked-by: Robert Jarzmik Signed-off-by: Vinod Koul commit 0f5a5e5700adeef1dc9660ec862f52506096c711 Author: Huang Shijie Date: Mon Aug 6 16:52:28 2018 +0800 dmaengine: dma-jz4780: use dmaenginem_async_device_register to simplify the code Use dmaenginem_async_device_register to simplify the code: remove dma_async_device_unregister. remove label err_unregister_dev Signed-off-by: Huang Shijie Signed-off-by: Vinod Koul commit fc9826dec54c445d1bfbb8fd85d3382dc90bb110 Author: Huang Shijie Date: Mon Aug 6 16:52:27 2018 +0800 dmaengine: ste_dma40: use dmaenginem_async_device_register to simplify the code Use dmaenginem_async_device_register to simplify the code: remove dma_async_device_unregister. remove label unregister_slave, unregister_memcpy Signed-off-by: Huang Shijie Acked-by: Linus Walleij Signed-off-by: Vinod Koul commit a5f99a95869e3052970ee17a2d9911f09ad818cd Author: Huang Shijie Date: Mon Aug 6 16:52:26 2018 +0800 dmaengine: mmp_tdma: use dmaenginem_async_device_register to simplify the code Use dmaenginem_async_device_register to simplify the code: remove dma_async_device_unregister. return error if it fails. Signed-off-by: Huang Shijie Signed-off-by: Vinod Koul commit 42f604b6516b9e4d6847f6461aa4260effe68f55 Author: Huang Shijie Date: Mon Aug 6 16:52:24 2018 +0800 dmaengine: stm32-mdma: use dmaenginem_async_device_register to simplify the code Use dmaenginem_async_device_register to simplify the code: remove dma_async_device_unregister. Acked-by: Pierre-Yves MORDRET Signed-off-by: Huang Shijie Signed-off-by: Vinod Koul commit c88c2d46e29bf18f882b5afec231a4f86b578269 Author: Huang Shijie Date: Mon Aug 6 16:52:23 2018 +0800 dmaengine: dw-axi-dmac: use dmaenginem_async_device_register to simplify the code Use dmaenginem_async_device_register to simplify the code: remove dma_async_device_unregister. Signed-off-by: Huang Shijie Signed-off-by: Vinod Koul commit a5c1d8ec733cc354e810bbc30dc0904ddd684976 Author: Huang Shijie Date: Mon Aug 6 17:43:28 2018 +0800 dmaengine: st_fdma: use dmaenginem_async_device_register to simplify the code Use dmaenginem_async_device_register to simplify the code: remove dma_async_device_unregister. remove label err_dma_dev Signed-off-by: Huang Shijie Signed-off-by: Vinod Koul commit 4408e300a67ab2ce2505087986a9fe922c800ffd Author: Christian Brauner Date: Wed Aug 22 13:52:40 2018 +0200 security/capabilities: remove check for -EINVAL bprm_caps_from_vfs_caps() never returned -EINVAL so remove the rc == -EINVAL check. Signed-off-by: Christian Brauner Reviewed-by: Serge Hallyn Signed-off-by: James Morris commit ea24c125fe79fd966a4f59768d3d70142a9eb18d Author: Joel Fernandes (Google) Date: Sun Jun 24 12:34:51 2018 -0700 doc: Improve rcu_dynticks::dynticks documentation The very useful RCU Data-Structures describes that the dynticks counter of the rcu_dynticks data structure is incremented when we transitions to or from dynticks-idle mode. However it doesn't mention that it is also incremented due to transitions to and from user mode which for dynticks purposes is an extended quiescent state. I found this with tracing calls to rcu_dynticks_eqs_enter which can also happen from rcu_user_enter. Lets add this information to the Data-Structures document. Signed-off-by: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney commit a5a2889544997d3909480d6d27e2559875226532 Author: Joel Fernandes (Google) Date: Fri Jun 22 21:40:55 2018 -0700 doc: Fix broken RCU-requirements link to LKML archive Two of the Requirements.html LKML links are broken. This patch changes them to use the archive from lore.kernel.org, which works fine. Signed-off-by: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney commit e77cb32558a7bd0e996b7e203158a7fbf1a663fb Author: Paul E. McKenney Date: Fri Jun 22 06:22:20 2018 -0700 doc: Add design documentation on interruption of NMI handlers Make Requirements.html talk about how NMI handlers can take what appear to RCU to be normal interrupts. Signed-off-by: Paul E. McKenney commit 6f59dc1afbb2e12b218206c03c974dc93dc7db19 Author: Jerome Brunet Date: Wed Aug 1 15:40:33 2018 +0200 arm64: dts: meson-axg: s400: add sound card Add the sound card of the s400. With it the following interface should be working: * Lineout * Daugther card speaker 1 (same output as lineout) * Linein * SPDIF output Signed-off-by: Jerome Brunet Signed-off-by: Kevin Hilman commit a0ef1c1cc8b51d9eb6ceef2e4af0c8deea7be757 Author: Jerome Brunet Date: Wed Aug 1 15:40:32 2018 +0200 arm64: dts: meson-axg: s400: enable audio devices Enable the audio devices on the s400. Signed-off-by: Jerome Brunet Signed-off-by: Kevin Hilman commit f2b8f6a933576816058c819f13644cbbc9664121 Author: Jerome Brunet Date: Wed Aug 1 15:40:31 2018 +0200 arm64: dts: meson-axg: add audio fifos Add TODDR and FRDDR audio fifos of the AXG SoC. These fifos are the capture and playback memory interfaces of audio subsystem of the AXG. Signed-off-by: Jerome Brunet Signed-off-by: Kevin Hilman commit 7d2c6cfc5411207f1094e7ca5e63e711dc76d1ff Author: John Fastabend Date: Tue Aug 28 09:10:50 2018 -0700 bpf: use --cgroup in test_suite if supplied If the user supplies a --cgroup value in the arguments when running the test_suite go ahaead and run the self tests there. I use this to test with multiple cgroup users. Signed-off-by: John Fastabend Signed-off-by: Daniel Borkmann commit b5d83fec732dc98e37b22e8b20a7943aa0bb55d9 Author: John Fastabend Date: Tue Aug 28 09:10:45 2018 -0700 bpf: sockmap test remove shutdown() calls Currently, we do a shutdown(sk, SHUT_RDWR) on both peer sockets and a shutdown on the sender as well. However, this is incorrect and can occasionally cause issues if you happen to have bad timing. First peer1 or peer2 may still be in use depending on the test and timing. Second we really should only be closing the read side and/or write side depending on if the test is receiving or sending. But, really none of this is needed just remove the shutdown calls. Signed-off-by: John Fastabend Signed-off-by: Daniel Borkmann commit efbaec89c642cd1d4977fc6df9923697e1598d4e Author: YueHaibing Date: Tue Aug 28 07:42:32 2018 +0000 bpf: remove duplicated include from syscall.c Remove duplicated include. Signed-off-by: YueHaibing Signed-off-by: Daniel Borkmann commit 2cfc123eea7477f26f59506fb45f25cb09ee1591 Author: Jerome Brunet Date: Wed Aug 29 17:00:51 2018 +0200 ASoC: meson: add axg pdm input Add pdm input driver for the device found on the amlogic AXG SoC family Signed-off-by: Jerome Brunet Signed-off-by: Mark Brown commit 5cc3f8f89f2a42992315c4917e0c67ccb0269dec Author: Jerome Brunet Date: Wed Aug 29 17:00:50 2018 +0200 ASoC: meson: add axg pdm input DT binding documentation Add the DT binding documentation for axg's PDM input Signed-off-by: Jerome Brunet Signed-off-by: Mark Brown commit cb06a037f8362e250a6e61872ffa01ab086ec9e2 Author: Jerome Brunet Date: Wed Aug 29 17:00:49 2018 +0200 ASoC: dmic: add DT module alias Before this patch the only alias provided by the dmic module is: alias: platform:dmic-codec Device instantiated from DT will not probe automatically with this After this patch, here is the new alias list: alias: platform:dmic-codec alias: of:N*T*Cdmic-codecC* alias: of:N*T*Cdmic-codec Now the dmic codec probes automatically when instantiated from DT. Signed-off-by: Jerome Brunet Signed-off-by: Mark Brown commit 26bcf1c368d9460987d597fb0476d60e51a1bf82 Author: Jerome Brunet Date: Wed Aug 29 17:00:48 2018 +0200 ASoC: dmic: add Kconfig prompt for the generic dmic codec. Add Kconfig prompt for the generic digital mic to make it configurable through menuconfig Signed-off-by: Jerome Brunet Signed-off-by: Mark Brown commit 49c39f8464a9af702e9d45800c00a572753aeb06 Author: Arnd Bergmann Date: Wed Apr 18 15:56:13 2018 +0200 y2038: signal: Change rt_sigtimedwait to use __kernel_timespec This changes sys_rt_sigtimedwait() to use get_timespec64(), changing the timeout type to __kernel_timespec, which will be changed to use a 64-bit time_t in the future. Since the do_sigtimedwait() core function changes, we also have to modify the compat version of this system call in the same way. Signed-off-by: Arnd Bergmann commit c2e6c8567acdba8db1055b242c34ceb123c6a253 Author: Arnd Bergmann Date: Wed Apr 18 13:42:25 2018 +0200 y2038: socket: Change recvmmsg to use __kernel_timespec This converts the recvmmsg() system call in all its variations to use 'timespec64' internally for its timeout, and have a __kernel_timespec64 argument in the native entry point. This lets us change the type to use 64-bit time_t at a later point while using the 32-bit compat system call emulation for existing user space. Signed-off-by: Arnd Bergmann commit 474b9c777b20b8340a6ee0f7ba6ebbd6a4bf47e2 Author: Arnd Bergmann Date: Tue Apr 17 21:59:47 2018 +0200 y2038: sched: Change sched_rr_get_interval to use __kernel_timespec This is a preparation patch for converting sys_sched_rr_get_interval to work with 64-bit time_t on 32-bit architectures. The 'interval' argument is changed to struct __kernel_timespec, which will be redefined using 64-bit time_t in the future. The compat version of the system call in turn is enabled for compilation with CONFIG_COMPAT_32BIT_TIME so the individual 32-bit architectures can share the handling of the traditional argument with 64-bit architectures providing it for their compat mode. Signed-off-by: Arnd Bergmann commit 4faea239e529d1d6b3b93fbf08d5e90427961a41 Author: Arnd Bergmann Date: Tue Apr 17 12:03:19 2018 +0200 y2038: utimes: Rework #ifdef guards for compat syscalls After changing over to 64-bit time_t syscalls, many architectures will want compat_sys_utimensat() but not respective handlers for utime(), utimes() and futimesat(). This adds a new __ARCH_WANT_SYS_UTIME32 to complement __ARCH_WANT_SYS_UTIME. For now, all 64-bit architectures that support CONFIG_COMPAT set it, but future 64-bit architectures will not (tile would not have needed it either, but got removed). As older 32-bit architectures get converted to using CONFIG_64BIT_TIME, they will have to use __ARCH_WANT_SYS_UTIME32 instead of __ARCH_WANT_SYS_UTIME. Architectures using the generic syscall ABI don't need either of them as they never had a utime syscall. Since the compat_utimbuf structure is now required outside of CONFIG_COMPAT, I'm moving it into compat_time.h. Signed-off-by: Arnd Bergmann --- changed from last version: - renamed __ARCH_WANT_COMPAT_SYS_UTIME to __ARCH_WANT_SYS_UTIME32 commit 185cfaf7641e14af85635bb2750da302e32b04e3 Author: Arnd Bergmann Date: Tue Apr 17 09:11:58 2018 +0200 y2038: Compile utimes()/futimesat() conditionally There are four generations of utimes() syscalls: utime(), utimes(), futimesat() and utimensat(), each one being a superset of the previous one. For y2038 support, we have to add another one, which is the same as the existing utimensat() but always passes 64-bit times_t based timespec values. There are currently 10 architectures that only use utimensat(), two that use utimes(), futimesat() and utimensat() but not utime(), and 11 architectures that have all four, and those define __ARCH_WANT_SYS_UTIME in order to get a sys_utime implementation. Since all the new architectures only want utimensat(), moving all the legacy entry points into a common __ARCH_WANT_SYS_UTIME guard simplifies the logic. Only alpha and ia64 grow a tiny bit as they now also get an unused sys_utime(), but it didn't seem worth the extra complexity of adding yet another ifdef for those. Signed-off-by: Arnd Bergmann commit a4f7a3004630f1a0fb130ab1824942a49ce33140 Author: Arnd Bergmann Date: Tue Apr 17 09:11:58 2018 +0200 y2038: Change sys_utimensat() to use __kernel_timespec When 32-bit architectures get changed to support 64-bit time_t, utimensat() needs to use the new __kernel_timespec structure as its argument. The older utime(), utimes() and futimesat() system calls don't need a corresponding change as they are no longer used on C libraries that have 64-bit time support. As we do for the other syscalls that have timespec arguments, we reuse the 'compat' syscall entry points to implement the traditional four interfaces, and only leave the new utimensat() as a native handler, so that the same code gets used on both 32-bit and 64-bit kernels on each syscall. Signed-off-by: Arnd Bergmann commit c5ba7e6c9ba545c3f67188de510d4cab2e3223b2 Author: Arnd Bergmann Date: Fri Apr 13 13:07:57 2018 +0200 asm-generic: Remove empty asm/unistd.h Nothing is left in asm/unistd.h except for the redirect to uapi/asm/unistd.h, so removing the file simply leads to that one being used directly. The linux/export.h inclusion is a leftover from commit e1b5bb6d1236 ("consolidate cond_syscall and SYSCALL_ALIAS declarations") and should not be used anyway. Reviewed-by: Christoph Hellwig Signed-off-by: Arnd Bergmann commit caf6f9c8a326cffd1d4b3ff3f1cfba75d159d70b Author: Arnd Bergmann Date: Fri Apr 13 12:57:26 2018 +0200 asm-generic: Remove unneeded __ARCH_WANT_SYS_LLSEEK macro The sys_llseek sytem call is needed on all 32-bit architectures and none of the 64-bit ones, so we can remove the __ARCH_WANT_SYS_LLSEEK guard and simplify the include/asm-generic/unistd.h header further. Since 32-bit tasks can run either natively or in compat mode on 64-bit architectures, we have to check for both !CONFIG_64BIT and CONFIG_COMPAT. There are a few 64-bit architectures that also reference sys_llseek in their 64-bit ABI (e.g. sparc), but I verified that those all select CONFIG_COMPAT, so the #if check is still correct here. It's a bit odd to include it in the syscall table though, as it's the same as sys_lseek() on 64-bit, but with strange calling conventions. Acked-by: Geert Uytterhoeven Reviewed-by: Christoph Hellwig Signed-off-by: Arnd Bergmann commit fb3739759474d150a9927b920a80ea2afb4c2a51 Author: Arnd Bergmann Date: Wed Apr 18 22:01:26 2018 +0200 asm-generic: Move common compat types to asm-generic/compat.h While converting compat system call handlers to work on 32-bit architectures, I found a number of types used in those handlers that are identical between all architectures. Let's move all the identical ones into asm-generic/compat.h to avoid having to add even more identical definitions of those types. For unknown reasons, mips defines __compat_gid32_t, __compat_uid32_t and compat_caddr_t as signed, while all others have them unsigned. This seems to be a mistake, but I'm leaving it alone here. The other types all differ by size or alignment on at least on architecture. compat_aio_context_t is currently defined in linux/compat.h but also needed for compat_sys_io_getevents(), so let's move it into the same place. While we still have not decided whether the 32-bit time handling will always use the compat syscalls, or in which form, I think this is a useful cleanup that we can merge regardless. Reviewed-by: Christoph Hellwig Signed-off-by: Arnd Bergmann commit bf4b6a7d371e4d2a23a9d545bee908f67d32b3ea Author: Arnd Bergmann Date: Fri Apr 13 12:19:47 2018 +0200 y2038: Remove stat64 family from default syscall set New architectures should no longer need stat64, which is not y2038 safe and has been replaced by statx(). This removes the 'select __ARCH_WANT_STAT64' statement from asm-generic/unistd.h and instead moves it into the respective asm/unistd.h UAPI header files for each architecture that uses it today. In the generic file, the system call number and entry points are now made conditional, so newly added architectures (e.g. riscv32 or csky) will never need to carry backwards compatiblity for it. arm64 is the only 64-bit architecture using the asm-generic/unistd.h file, and it already sets __ARCH_WANT_NEW_STAT in its headers, and I use the same #ifdef here: future 64-bit architectures therefore won't see newstat or stat64 any more. They don't suffer from the y2038 time_t overflow, but for consistency it seems best to also let them use statx(). Signed-off-by: Arnd Bergmann commit 82b355d161c9525ab8838cc27d3200bc3bc9082d Author: Arnd Bergmann Date: Fri Apr 13 11:50:12 2018 +0200 y2038: Remove newstat family from default syscall set We have four generations of stat() syscalls: - the oldstat syscalls that are only used on the older architectures - the newstat family that is used on all 64-bit architectures but lacked support for large files on 32-bit architectures. - the stat64 family that is used mostly on 32-bit architectures to replace newstat - statx() to replace all of the above, adding 64-bit timestamps among other things. We already compile stat64 only on those architectures that need it, but newstat is always built, including on those that don't reference it. This adds a new __ARCH_WANT_NEW_STAT symbol along the lines of __ARCH_WANT_OLD_STAT and __ARCH_WANT_STAT64 to control compilation of newstat. All architectures that need it use an explict define, the others now get a little bit smaller, and future architecture (including 64-bit targets) won't ever see it. Acked-by: Geert Uytterhoeven Signed-off-by: Arnd Bergmann commit 743f5cdb6cec33d2300922f6b1b1670a572595ad Author: kbuild test robot Date: Wed Aug 29 20:50:52 2018 +0800 y2038: __get_old_timespec32() can be static The kbuild test robot reports two new warnings with the previous patch: kernel/time/time.c:866:5: sparse: symbol '__get_old_timespec32' was not declared. Should it be static? kernel/time/time.c:882:5: sparse: symbol '__put_old_timespec32' was not declared. Should it be static? These are actually older bugs, but came up now after the symbol got renamed. Fortunately, commit afef05cf238c ("time: Enable get/put_compat_itimerspec64 always") makes the two functions (__compat_get_timespec64/__compat_get_timespec64) local to time.c already, so we can mark them as 'static'. Fixes: ee16c8f415e4 ("y2038: Globally rename compat_time to old_time32") Signed-off-by: kbuild test robot [arnd: added changelog text] Signed-off-by: Arnd Bergmann commit be17ee0da35a5fe75813adb8e2c110c5541c8456 Author: Alexandre Belloni Date: Wed Aug 29 14:45:48 2018 +0200 spi: dw-mmio: add MSCC Jaguar2 support Unfortunately, the Jaguar2 CPU_SYSTEM_CTRL register set has a different layout than the Ocelot one. Handle that while keeping most of the code common. Signed-off-by: Alexandre Belloni Reviewed-by: Gregory CLEMENT Signed-off-by: Mark Brown commit 967c146491329414957005d4eb2d2569da081608 Author: Sandy Huang Date: Wed Aug 29 11:17:13 2018 +0800 arm64: dts: rockchip: add missing vop properties for px30 Add display ports for display-subsystem and add reset property for vop node. If missing these properties, drm driver can't probe sucessfully. Signed-off-by: Sandy Huang Signed-off-by: Heiko Stuebner commit 9e4fa01221b3230320135072ad31ea809ca31147 Author: Chris Wilson Date: Tue Aug 28 16:27:02 2018 +0100 drm/i915/execlists: Flush tasklet directly from reset-finish On finishing the reset, the intention is to restart the GPU before we relinquish the forcewake taken to handle the reset - the goal being the GPU reloads a context before it is allowed to sleep. For this purpose, we used tasklet_flush() which although it accomplished the goal of restarting the GPU, carried with it a sting in its tail: it cleared the TASKLET_STATE_SCHED bit. This meant that if another CPU queued a new request to this engine, we would clear the flag and later attempt to requeue the tasklet on the local CPU, breaking the per-cpu softirq lists. Remove the dangerous tasklet_kill() and just run the tasklet func directly as we know it is safe to do so (the tasklets are internally locked to allow mixed usage from direct submission). Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Mika Kuoppala Cc: Michel Thierry Cc: Joonas Lahtinen Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20180828152702.27536-1-chris@chris-wilson.co.uk commit f888da16628c150e23a80e9c24ed76d1cf8a94d2 Author: Tony Xie Date: Fri Aug 24 18:03:00 2018 +0800 arm64: dts: rockchip: Add idle-states to device tree for rk3399 Add idle-states for cpu and cluster sleep states. Signed-off-by: Tony Xie Signed-off-by: Heiko Stuebner commit 888263947cd9f14e3f83be5b3e73ccabb71834d1 Merge: 62cdcb6c572e 28d6eeb4f066 Author: Linus Walleij Date: Wed Aug 29 14:10:57 2018 +0200 Merge branch 'ib-ingenic' of ../linux-pinctrl into devel commit 5624bf9635436bdf35eb69ef4d8196ea0e19336b Merge: 94f4e54cecaf 28d6eeb4f066 Author: Linus Walleij Date: Wed Aug 29 14:10:34 2018 +0200 Merge branch 'ib-ingenic' into devel commit 94f4e54cecaf3ec9181cca9367e1ad0d60188d1f Author: Rob Herring Date: Mon Aug 27 20:52:41 2018 -0500 pinctrl: 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: Linus Walleij Cc: Dong Aisheng Cc: Fabio Estevam Cc: Shawn Guo Cc: Stefan Agner Cc: Pengutronix Kernel Team Cc: Sean Wang Cc: Matthias Brugger Cc: Carlo Caione Cc: Kevin Hilman Cc: Jason Cooper Cc: Andrew Lunn Cc: Gregory Clement Cc: Sebastian Hesselbarth Cc: Jean-Christophe Plagniol-Villard Cc: Nicolas Ferre Cc: Alexandre Belloni Cc: Heiko Stuebner Cc: Tony Lindgren Cc: Haojian Zhuang Cc: Patrice Chotard Cc: Barry Song Cc: Maxime Coquelin Cc: Alexandre Torgue Cc: Maxime Ripard Cc: Chen-Yu Tsai Cc: linux-gpio@vger.kernel.org Cc: linux-mediatek@lists.infradead.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-amlogic@lists.infradead.org Cc: linux-rockchip@lists.infradead.org Cc: linux-omap@vger.kernel.org Acked-by: Dong Aisheng Reviewed-by: Alexandre Belloni Acked-by: Tony Lindgren Acked-by: Sean Wang Acked-by: Chen-Yu Tsai Acked-by: Heiko Stuebner Signed-off-by: Rob Herring Signed-off-by: Linus Walleij commit 62cdcb6c572ef0f55f4d6c06f008289f50eb516a Author: Rob Herring Date: Mon Aug 27 20:52:19 2018 -0500 gpio: 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: Linus Walleij Cc: linux-gpio@vger.kernel.org Signed-off-by: Rob Herring Signed-off-by: Linus Walleij commit a6edf83922ef39f81dca8a66c9e0c43ed165e144 Author: Sandy Huang Date: Tue Aug 28 16:32:30 2018 +0800 drm/rockchip: vop: fix some register define error for px30 1. interrupt register define error lead to enable interrupt failed; 2. px30 unsupport hdmi output; 3. there are some hardware designed bug, we must swap win2 gate and enable offset, otherwise will appear vop iommu pagefault. Signed-off-by: Sandy Huang Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/1535445150-40296-1-git-send-email-hjc@rock-chips.com commit 9ce3ebe973bf4073426f35f282c6b955ed802765 Author: Robert Jarzmik Date: Sat Aug 25 10:44:17 2018 +0200 gpio: pxa: handle corner case of unprobed device In the corner case where the gpio driver probe fails, for whatever reason, the suspend and resume handlers will still be called as they have to be registered as syscore operations. This applies as well when no probe was called while the driver has been built in the kernel. Nicolas tracked this in : https://bugzilla.kernel.org/show_bug.cgi?id=200905 Therefore, add a failsafe in these function, and test if a proper probe succeeded and the driver is functional. Signed-off-by: Robert Jarzmik Reported-by: Nicolas Chauvet Signed-off-by: Linus Walleij commit 803ceb297a240e7356907b84a8b334400bbf4f4c Author: Andy Shevchenko Date: Mon Aug 20 16:35:07 2018 +0300 pinctrl: intel: Fix a spelling typo in kernel documentation The parameter 'community' had been spelled incorrectly. Fix it here. As a side effect it satisfies static checkers that issue the following warnings: drivers/pinctrl/intel/pinctrl-intel.c:845: warning: Function parameter or member 'community' not described in 'intel_gpio_to_pin' drivers/pinctrl/intel/pinctrl-intel.c:845: warning: Excess function parameter 'commmunity' description in 'intel_gpio_to_pin' Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg Signed-off-by: Linus Walleij commit d290e096d2a59c655b3c718aa17bb8864bb6fa5e Author: Gustavo A. R. Silva Date: Wed Aug 15 12:10:35 2018 -0500 pinctrl: lpc18xx: mark expected switch fall-throughs In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 1292308 ("Missing break in switch") Addresses-Coverity-ID: 1292309 ("Missing break in switch") Addresses-Coverity-ID: 1309546 ("Missing break in switch") Addresses-Coverity-ID: 1357369 ("Missing break in switch") Addresses-Coverity-ID: 1357389 ("Missing break in switch") Reviewed-by: Vladimir Zapolskiy Signed-off-by: Gustavo A. R. Silva Signed-off-by: Linus Walleij commit 28123791ddbe493b957423625810e75a4ce3a9ef Author: Fabrizio Castro Date: Tue Aug 14 13:32:37 2018 +0100 dt-bindings: gpio: rcar: Add r8a774a1 (RZ/G2M) support Document Renesas' RZ/G2M (R8A774A1) GPIO blocks compatibility within the relevant dt-bindings. Signed-off-by: Fabrizio Castro Reviewed-by: Biju Das Reviewed-by: Rob Herring Reviewed-by: Simon Horman Signed-off-by: Linus Walleij commit 29adeb4f954b2e398c75d71bd49e62b0287d50c7 Author: Gustavo A. R. Silva Date: Sun Aug 26 13:47:12 2018 -0500 drm/rockchip: 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); or, like in this particular case: size = sizeof(struct foo) + sizeof(void *) * count; instance = devm_kzalloc(dev, size, 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 issue was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva Reviewed-by: Kees Cook Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20180826184712.GA9330@embeddedor.com commit 28d6eeb4f06634e5f7c98cad7b91c7981b82e3a6 Author: Linus Walleij Date: Wed Aug 29 13:39:54 2018 +0200 pinctrl: ingenic: Include the right header This is a GPIO driver so only include Cc: Paul Cercueil Signed-off-by: Linus Walleij commit dba508b5ab1d138bd7543a3f503492f1a173aa32 Author: Robert Rosengren Date: Mon Aug 13 09:33:58 2018 +0200 ASoC: adau17x1: Unused exported functions changed to internal adau17x1_setup_firmware and adau17x1_has_dsp is only used internally, so making them static instead of exported. Signed-off-by: Robert Rosengren Acked-by: Lars-Peter Clausen Signed-off-by: Mark Brown commit 57e2143473fd7c5a4aefd90d6d9ed19c2d1981f8 Author: Paul Cercueil Date: Tue Aug 21 18:42:36 2018 +0200 gpio: ingenic: Remove driver The pinctrl-ingenic driver is now handling the GPIO chips directly. Signed-off-by: Paul Cercueil Signed-off-by: Linus Walleij commit 635c20a1fa79f30a5b3a603098a316c838e66983 Author: Paul Cercueil Date: Tue Aug 21 18:42:35 2018 +0200 pinctrl: ingenic: Drop dependency on MACH_INGENIC Depending on MACH_INGENIC prevent us from creating a generic kernel that works on more than one MIPS board. Instead, we just depend on MIPS being set. Signed-off-by: Paul Cercueil Signed-off-by: Linus Walleij commit f2a967658a5d0f456d6f0530d3bc2b101260eeb5 Author: Paul Cercueil Date: Tue Aug 21 18:42:34 2018 +0200 pinctrl: ingenic: Add support for the JZ4725B Add support for the JZ4725B and compatible SoCs from Ingenic. Signed-off-by: Paul Cercueil Signed-off-by: Linus Walleij commit ebd6651418b64ff358e105d611ad993f534b8ea7 Author: Paul Cercueil Date: Tue Aug 21 18:42:33 2018 +0200 pinctrl: ingenic: Implement .get_direction for GPIO chips This allows to read from debugfs whether the GPIOs requested are set as input or output. Signed-off-by: Paul Cercueil Signed-off-by: Linus Walleij commit e72394e2ea196a0cba70c7aeb861ff9c1fa2b1b6 Author: Paul Cercueil Date: Tue Aug 21 18:42:32 2018 +0200 pinctrl: ingenic: Merge GPIO functionality Merge the code of the gpio-ingenic driver into the pinctrl-ingenic driver. The reason behind this, is that the same hardware block handles both pin config / muxing and GPIO. ingenic_gpio_probe() have been marked as __init, but for the most part, the code is the exact same as what it was in the gpio-ingenic driver. Signed-off-by: Paul Cercueil Signed-off-by: Linus Walleij commit 4717b11f80cf81b069f76e6225dc1caf194e1a58 Author: Paul Cercueil Date: Tue Aug 21 18:42:31 2018 +0200 pinctrl: ingenic: Mark probe function as __init By using platform_driver_probe() instead of platform_driver_register(), we can mark the ingenic_pinctrl_probe() function as __init. Signed-off-by: Paul Cercueil Signed-off-by: Linus Walleij commit 556a36a71ed80e17ade49225b58513ea3c9e4558 Author: Paul Cercueil Date: Tue Aug 21 18:42:30 2018 +0200 pinctrl: ingenic: Probe driver at subsys_initcall Using postcore_initcall() makes the driver try to initialize way too early. Signed-off-by: Paul Cercueil Signed-off-by: Linus Walleij commit 890e48be8d8470ab7057408865069ed6f8fd2745 Author: Paul Cercueil Date: Tue Aug 21 18:42:29 2018 +0200 dt-bindings: pinctrl: Update pinctrl-ingenic for JZ4725B and GPIO merge The pinctrl-ingenic driver now supports the JZ4725B SoC. Furthermore, the gpio-ingenic driver was dropped and the pinctrl-ingenic driver is now responsible for providing the GPIO functionality. Signed-off-by: Paul Cercueil Reviewed-by: Rob Herring Signed-off-by: Linus Walleij commit 080aaf10892eec4b359126473e582f62ebb09496 Author: Kirill Marinushkin Date: Tue Aug 28 23:42:31 2018 +0200 ASoC: pcm3060: Improve legibility of if-statements Modified some if-statements to make them more clear Signed-off-by: Kirill Marinushkin Signed-off-by: Mark Brown commit aec785f6a0dcd68c3d2ad4a7d5b48d5fc94d75e8 Author: Kirill Marinushkin Date: Tue Aug 28 23:42:30 2018 +0200 ASoC: pcm3060: Improve stylistics of file comments Modified the complete file comments in C++ style, to make them look more intentional Signed-off-by: Kirill Marinushkin Signed-off-by: Mark Brown commit be887843f275d5a57db7033ea8ed2d7637475b66 Author: Michael Hennerich Date: Tue Aug 14 13:29:18 2018 +0200 drivers: gpio: Update MODULE AUTHOR email address no functional changes Signed-off-by: Michael Hennerich Signed-off-by: Linus Walleij commit dc879f61c45d0f28ba52ddbded2cdd82117f458e Author: Sandy Huang Date: Tue Aug 28 15:44:55 2018 +0800 drm/rockchip: fix coding style and incorrect description Align with other drivers, tab + 2 space key for description. and edp/hdmi/dsi can be used on both rk3288 and rk3399. Signed-off-by: Sandy Huang Reviewed-by: Enric Balletbo i Serra Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/1535442295-4007-1-git-send-email-hjc@rock-chips.com commit eeaceb8b7d1fb64b6030249ca0dd1d902ef3069e Author: Baolin Wang Date: Thu Aug 16 20:54:49 2018 +0800 spi: Introduce one new field to set word delay For some SPI controllers, after each word size (specified by bits_per_word) transimission, the hardware need some delay to make sure the slave has enough time to receive the whole data. So introducing one new 'word_delay' field of struct spi_tansfer for slave devices to set this inter word delay time. Signed-off-by: Baolin Wang Signed-off-by: Mark Brown commit d8c5d29f21bf0bc690fd8c26c54197221e235bc9 Author: Imre Deak Date: Tue Aug 28 15:22:31 2018 +0300 drm/i915: Don't check power domains state in intel_power_domains_init_hw() During power domains initialization we acquire power well references for power wells in the INIT power domain. The rest of power wells - which BIOS could have left enabled - we can only acquire references as needed during display HW readout and so must defer sanitization until then (also implying that we must always do HW readout to cleanup unused power wells). Thus during initialization these latter power wells can have a refcount of 0 while still being enabled. To avoid the false-positive state mismatch error this causes remove the check from intel_power_domains_init_hw() and rely on the state check in intel_power_domains_enable() which follows the HW readout. v2: - Add comment to log and code clarifying how unused power wells get disabled. (Chris) Fixes: 6dfc4a8f134f ("drm/i915: Verify power domains after enabling them") Cc: Chris Wilson References: https://bugs.freedesktop.org/show_bug.cgi?id=107411 Signed-off-by: Imre Deak Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20180828122231.14336-1-imre.deak@intel.com commit 9c06602b1b920ed6b546632bdbbc1f400eea5242 Author: Balaji Pothunoori Date: Thu Jul 19 18:56:27 2018 +0530 cfg80211: clarify frames covered by average ACK signal report Modify the API to include all ACK frames in average ACK signal strength reporting, not just ACKs for data frames. Make exposing the data conditional on implementing the extended feature flag. This is how it was really implemented in mac80211, update the code there to use the new defines and clean up some of the setting code. Keep nl80211.h source compatibility by keeping the old names. Signed-off-by: Balaji Pothunoori [rewrite commit log, change compatibility to be old=new instead of the other way around, update kernel-doc, roll in mac80211 changes, make mac80211 depend on valid bit instead of HW flag] Signed-off-by: Johannes Berg commit 375fef591696069a423223b6110f2dd79427a713 Author: Masahiro Yamada Date: Sat Aug 11 11:16:13 2018 +0900 pinctrl: uniphier: drop meaningless pin from SD1 pin-mux of Pro4 The pin 327 was supposed to be used as a voltage control line for the SD card regulator, but the SD card port1 does not support UHS-I. It only supports 3.3V signaling, hence this pin is pointless. Just a note about the background. At first, hardware engineers tried to implement the UHS for this port. Then, they needed to shrink the silicon die size, and gave up the UHS, but forgot to remove the pin assignment. Signed-off-by: Masahiro Yamada Signed-off-by: Linus Walleij commit c0f6afad46a8ed2c0a2053ec720b1e6da80cf69a Author: Biju Das Date: Tue Aug 7 08:57:03 2018 +0100 dt-bindings: gpio: rcar: Add gpio-reserved-ranges support Update the DT bindings documentation with the optional gpio-reserved-ranges properties. Signed-off-by: Biju Das Reviewed-by: Fabrizio Castro Reviewed-by: Geert Uytterhoeven Reviewed-by: Rob Herring Signed-off-by: Linus Walleij commit 496069b87eea631274c2c35fb6f8c45ad838436b Author: Biju Das Date: Tue Aug 7 08:57:02 2018 +0100 gpio: rcar: Add GPIO hole support GPIO hole is present in RZ/G1C SoC. Valid GPIO pins on bank3 are in the range GP3_0 to GP3_16 and GP3_27 to GP3_29. The GPIO pins between GP3_17 to GP3_26 are unused. Add support for handling unused GPIO's. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Signed-off-by: Linus Walleij commit 305fa67ee452d4b36c7cba334de119281a5a917f Author: Richard Fitzgerald Date: Tue Aug 7 10:32:26 2018 +0100 pinctrl: madera: Fix missing space in debugfs output The SCHMITT tag was being dumped without a separating space. Signed-off-by: Richard Fitzgerald Signed-off-by: Linus Walleij commit d2f7a822041d3ad7a958b8b87557e09445a29701 Author: Richard Fitzgerald Date: Tue Aug 7 10:32:25 2018 +0100 pinctrl: madera: Return ENOTSUPP for unsupported pin attributes The pin_config_[get|set] functions should return ENOTSUPP if the requested attribute isn't supported. Signed-off-by: Richard Fitzgerald Signed-off-by: Linus Walleij commit 25cb9e5a0e1e8fd119dd32353159ec51317fc62c Author: Richard Fitzgerald Date: Tue Aug 7 10:32:24 2018 +0100 pinctrl: madera: Set is_generic We are using the generic pin configuration interface so we can set is_generic. Signed-off-by: Richard Fitzgerald Signed-off-by: Linus Walleij commit 29ae0952e85f3ef2ac87eb39f9cc867e2458a0ad Author: Yixun Lan Date: Tue Aug 7 10:06:34 2018 +0800 pinctrl: meson-g12a: add pinctrl driver support Add the pinctrl driver for Meson-G12A SoC which share the similar IP as the previous Meson-AXG SoC, both use same pinmux ops (register layout). A new driver is needed here due to the differences in the pins. Starting from Meson-AXG SoC, the pinctrl controller block use 4 continues register bits to specific the pin mux function, while comparing to old generation SoC which using variable length register bits for the pin mux definition. The new design greatly simplify the software model. For the detail example, one 32bit register can be divided into 8 parts, each has 4 bits whose value start from 0 - 7, each can describe one pin, the value 0 is always devoted to GPIO function, while 1 - 7 devoted to the mux pin function. Please note, the GPIOE is actually located at AO (always on) bank. Acked-by: Martin Blumenstingl Signed-off-by: Xingyu Chen Signed-off-by: Yixun Lan Signed-off-by: Linus Walleij commit 3cd3c83f675259aaf6bebdafb37622be2139fb8f Author: Yixun Lan Date: Tue Aug 7 10:06:33 2018 +0800 pinctrl: Add compatibles for Amlogic Meson G12A pin controllers Add new compatible name for Amlogic's Meson-G12A pin controllers, add a dt-binding header file which document the detail pin names. Acked-by: Martin Blumenstingl Reviewed-by: Rob Herring Signed-off-by: Xingyu Chen Signed-off-by: Yixun Lan Signed-off-by: Linus Walleij commit 3b588e43ee5c7ad8ccccfbfc6fc379b816c178f0 Author: Tomer Maimon Date: Wed Aug 8 12:25:26 2018 +0300 pinctrl: nuvoton: add NPCM7xx pinctrl and GPIO driver Add Nuvoton BMC NPCM750/730/715/705 Pinmux and GPIO controller driver. Signed-off-by: Tomer Maimon [Add back select GPIO_GENERIC] Signed-off-by: Linus Walleij commit d0e4e8f0d6abd8e992cb8cdc57a1396dd1e3a486 Author: Tomer Maimon Date: Wed Aug 8 12:25:25 2018 +0300 dt-binding: pinctrl: Add NPCM7xx pinctrl and GPIO documentation Added device tree binding documentation for Nuvoton BMC NPCM750/730/715/705 pinmux and GPIO controller. Signed-off-by: Tomer Maimon Reviewed-by: Rob Herring Signed-off-by: Linus Walleij commit fe2731211e784bff5a738631e5fd48041524239f Author: Stephen Boyd Date: Thu Aug 16 13:06:48 2018 -0700 pinctrl: msm: Configure interrupts as input and gpio mode When requesting a gpio as an interrupt, we should make sure to mux the pin as the GPIO function and configure it to be an input so that various functions or output signals don't affect the interrupt state of the pin. So far, we've relied on pinmux configurations in DT to handle this, but let's explicitly configure this in the code so that DT implementers don't have to get this part right. Cc: Doug Anderson Signed-off-by: Stephen Boyd Reviewed-by: Bjorn Andersson Signed-off-by: Linus Walleij commit 1de7ddb3a15c649fd15568d2056af295930656f8 Author: Stephen Boyd Date: Thu Aug 16 13:06:47 2018 -0700 pinctrl: msm: Mux out gpio function with gpio_request() We rely on devices to use pinmuxing configurations in DT to select the GPIO function (function 0) if they're going to use the gpio in GPIO mode. Let's simplify things for driver authors by implementing gpio_request_enable() for this pinctrl driver to mux out the GPIO function when the gpio is use from gpiolib. Cc: Doug Anderson Signed-off-by: Stephen Boyd Reviewed-by: Bjorn Andersson Signed-off-by: Linus Walleij commit 1ecef20cf12865729c86b0e428584635c77159ba Author: Sathishkumar Muruganandam Date: Tue Aug 28 17:51:38 2018 +0530 mac80211: add missing WFA Multi-AP backhaul STA Rx requirement The current mac80211 WDS (4-address mode) can be used to cover most of the Multi-AP requirements for Data frames per the WFA Multi-AP Specification v1.0. When configuring AP/STA interfaces in 4-address mode, they are able to function as fronthaul AP/backhaul STA of Multi-AP device complying below Tx, Rx requirements except one missing STA Rx requirement added by this patch. Multi-AP specification section 14.1 describes the following requirements: Transmitter requirements ------------------------ 1. Fronthaul AP i) When DA!=RA of backhaul STA, must use 4-address format ii) When DA==RA of backhaul STA, shall use either 3-address or 4-address format with RA updated with STA MAC (mac80211 support 4-address format via AP/VLAN interface) 2. Backhaul STA i) When SA!=TA of backhaul STA, must use 4-address format ii) When SA==TA of backhaul STA, shall use either 3-address or 4-address format with RA updated with AP MAC (mac80211 support 4-address format via use_4addr) Receiver requirements --------------------- 1. Fronthaul AP i) When SA!=TA of backhaul STA, must support receiving 4-address format frames ii) When SA==TA of backhaul STA, must support receiving both 3-address and 4-address format frames (mac80211 support both 3-addr & 4-addr via AP/VLAN interface) 2. Backhaul STA i) When DA!=RA of backhaul STA, must support receiving 4-address format frames ii) When DA==RA of backhaul STA, must support receiving both 3-address and 4-address format frames (mac80211 support only receiving 4-address format via use_4addr) This patch addresses the above Rx requirement (ii) for backhaul STA to receive unicast (DA==RA) 3-address frames in addition to 4-address frames. The current design doesn't accept 3-address frames when configured in 4-address mode (use_4addr). Hence add a check to allow 3-address frames when DA==RA of backhaul STA (adhering to Table 9-26 of IEEE Std 802.11™-2016). This case was tested with a bridged station interface when associated with a non-mac80211 based vendor AP implementation using 3-address frames for WDS. STA was able to support the Multi-AP Rx requirement when DA==RA. No issues, no loops seen when tested with mac80211 based AP as well. Verified and confirmed all other Tx and Rx requirements of AP and STA for Multi-AP respectively. They all work using the current mac80211-WDS design. Signed-off-by: Sathishkumar Muruganandam Signed-off-by: Johannes Berg commit a419a3d92aab88dba1bf151f98f93c49d0e34206 Author: Linus Walleij Date: Wed Aug 22 22:41:11 2018 +0200 gpio: ep93xx: Switch A and B to use GPIOLIB_IRQCHIP We can quite easily switch banks/ports A and B to use GPIOLIB_IRQCHIP which is code that will be more careful about handling interrupt descriptors and use a proper irqdomain for translating the IRQs. This cuts down some code in favor of using the implementation inside gpiolib. Acked-by: Alexander Sverdlin Signed-off-by: Linus Walleij commit d875cc27e2399a4b5d190db0a949570fc4276fec Author: Linus Walleij Date: Wed Aug 22 22:41:10 2018 +0200 gpio: ep93xx: Cut gpio_to_irq() usage This removes the callback into the gpiolib creating a circular call to convert between GPIO numbers and IRQs and pushes the whole business into the driver, just using an array of IRQ bases for the three IRQ capable ports. This way we get rid of including that no driver should include. Acked-by: Alexander Sverdlin Signed-off-by: Linus Walleij commit 68491b075db2e905d7df1594cf127da9bcd05cab Author: Linus Walleij Date: Wed Aug 22 22:41:09 2018 +0200 gpio: ep93xx: 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. Acked-by: Alexander Sverdlin Signed-off-by: Linus Walleij commit 51ba88e32ff5b3caee39862c862a7a1fbae78b2b Author: Linus Walleij Date: Wed Aug 22 22:41:08 2018 +0200 gpio: ep93xx: Use the hwirq and port In the IRQ-related functions, switch to using the hwirq and port number found from the current struct gpio_chip * As the lower 3 bits of the IRQ number is identical to the lower 3 bits of the GPIO number we can cut some corners. Call directly into the gpiochip to set up the direction and read the input instead of using the consumer API. This enabled us to cut the confusing irq_to_gpio() macro that is a remnant of the old generic GPIO API as well. Acked-by: Alexander Sverdlin Signed-off-by: Linus Walleij commit fd935fc421e74b9777370a0175bc011b780173d3 Author: Linus Walleij Date: Wed Aug 22 22:41:07 2018 +0200 gpio: ep93xx: Do not pingpong irq numbers For setting debounce config we want to write an offset in a per-gpiochip register, and we know which gpiochip we are on. Instead of a roundtrip over the IRQ number, figure out what port we are on for this GPIO chip, then index to the right register and write the value. This adds the ep93xx_gpio_port() that finds the port index from a struct gpio_chip * that we can later exploit to simplify more code. Acked-by: Alexander Sverdlin Signed-off-by: Linus Walleij commit 99399f40d896077ec175d42722d37e625056707e Author: Linus Walleij Date: Wed Aug 22 22:41:06 2018 +0200 gpio: ep93xx: Properly call the chained IRQ handler The chained irq handler should call chained_irq_enter() and chained_irq_exit() before/after handling the chained IRQ. Acked-by: Alexander Sverdlin Signed-off-by: Linus Walleij commit 3c38b3a3065eef10a12f5cf6c711f640d53ddb1a Author: Linus Walleij Date: Wed Aug 22 22:41:05 2018 +0200 gpio: ep93xx: Rename has_debounce to has_irq This is closer to what the variable (per bank) actually means. We have the .gpio_to_irq() hook registered only when this is true. Acked-by: Alexander Sverdlin Signed-off-by: Linus Walleij commit 991ce74eeb561650705766bbbcc1a6e3a49f358e Author: Linus Walleij Date: Wed Aug 22 22:41:04 2018 +0200 gpio: ep93xx: Pass around struct gpio_chip Instead of using a global variable, pass around the struct gpio_chip * pointer and dereference to the state container struct ep93xx_gpio as needed, like all other drivers do. Acked-by: Alexander Sverdlin Signed-off-by: Linus Walleij commit 68b6493185f7e2600af82e211f147dd1dc1af4c6 Author: Linus Walleij Date: Wed Aug 22 22:41:03 2018 +0200 gpio: ep93xx: Switch to SPDX license tag The subject says it all. Cut down on boilerplate. Acked-by: Alexander Sverdlin Signed-off-by: Linus Walleij commit 1d2bb17aaf11b0470336cdafd02241a5d6355215 Author: Linus Walleij Date: Wed Aug 22 22:41:02 2018 +0200 gpio: ep93xx: Cut down variable names In order to clean up the driver I need to cut a few trees, sorry, variable names, so I can see the forest, sorry driver properly. Acked-by: Alexander Sverdlin Signed-off-by: Linus Walleij commit 4c2baed3a7e6fd72fb967d55dc67719e7f6ebcf6 Author: Arnd Bergmann Date: Wed Aug 22 22:41:01 2018 +0200 ARM/gpio: ep93xx: build standalone As a preparation for multiplatform support, this ensures that the ep93xx gpio driver can be built without any of the platform specific header files. We pass the IRQ numbers as a resource now, and use the virtual mmio base from the already existing resource, rather than relying on the hardwired virtual address from the header file. Some numbers are now hardcoded that came from macros in the past, but for all I can tell, the driver already relied on the specific values. Cc: arm@kernel.org Signed-off-by: Arnd Bergmann Acked-by: Olof Johansson Acked-by: Alexander Sverdlin Signed-off-by: Linus Walleij commit 0d1e31abcaf5a3f5ebff81fa0c1322c2b17e59dd Author: Linus Walleij Date: Mon Aug 6 16:59:42 2018 +0200 gpio: tb10x: Use GENERIC_GPIO Instead of open coding logic for reading and writing GPIO lines, use the generic GPIO library. Also switch to using the spinlock from the generic GPIO to protect the registers. Cc: linux-snps-arc@lists.infradead.org Acked-by: Christian Ruppert Signed-off-by: Linus Walleij commit d28af35b0c91eea1030c5fef1f8c0f21b97a7e03 Author: Linus Walleij Date: Mon Aug 6 16:30:12 2018 +0200 gpio: tb10x: Create local helper variables Create a local struct device *dev helper variable to make the code easier to read. Most GPIO drivers use "np" (node pointer) rather than "dn" (device node) to point to the device tree node. Let's follow this convention. Cc: linux-snps-arc@lists.infradead.org Acked-by: Christian Ruppert Signed-off-by: Linus Walleij commit 4a132095dd64fefabdc5dad1cd9e9809b126e582 Author: Shannon Nelson Date: Wed Aug 22 14:38:10 2018 -0700 xfrm: allow driver to quietly refuse offload If the "offload" attribute is used to create an IPsec SA and the .xdo_dev_state_add() fails, the SA creation fails. However, if the "offload" attribute is used on a device that doesn't offer it, the attribute is quietly ignored and the SA is created without an offload. Along the same line of that second case, it would be good to have a way for the device to refuse to offload an SA without failing the whole SA creation. This patch adds that feature by allowing the driver to return -EOPNOTSUPP as a signal that the SA may be fine, it just can't be offloaded. This allows the user a little more flexibility in requesting offloads and not needing to know every detail at all times about each specific NIC when trying to create SAs. Signed-off-by: Shannon Nelson Signed-off-by: Steffen Klassert commit 0c05f98376678098e9a4a8bc06839797ea3ee942 Author: Haishuang Yan Date: Fri Aug 17 15:51:00 2018 +0800 esp: remove redundant define esph The pointer 'esph' is defined but is never used hence it is redundant and canbe removed. Signed-off-by: Haishuang Yan Signed-off-by: Steffen Klassert commit 211d6f2dc883fe2235532d7ec4ed7e8222957ae0 Author: Wei Yongjun Date: Sat Jul 28 06:49:48 2018 +0000 xfrm: Make function xfrmi_get_link_net() static Fixes the following sparse warning: net/xfrm/xfrm_interface.c:745:12: warning: symbol 'xfrmi_get_link_net' was not declared. Should it be static? Fixes: f203b76d7809 ("xfrm: Add virtual xfrm interfaces") Signed-off-by: Wei Yongjun Signed-off-by: Steffen Klassert commit 6348b903d79119a8157aace08ab99521f5dba139 Author: Matthew Wilcox Date: Wed Jul 11 14:02:25 2018 -0700 9p: Remove p9_idpool There are no more users left of the p9_idpool; delete it. Link: http://lkml.kernel.org/r/20180711210225.19730-7-willy@infradead.org Signed-off-by: Matthew Wilcox Cc: Eric Van Hensbergen Cc: Ron Minnich Cc: Latchesar Ionkov Signed-off-by: Dominique Martinet commit 996d5b4db4b191f2676cf8775565cab8a5e2753b Author: Matthew Wilcox Date: Wed Jul 11 14:02:24 2018 -0700 9p: Use a slab for allocating requests Replace the custom batch allocation with a slab. Use an IDR to store pointers to the active requests instead of an array. We don't try to handle P9_NOTAG specially; the IDR will happily shrink all the way back once the TVERSION call has completed. Link: http://lkml.kernel.org/r/20180711210225.19730-6-willy@infradead.org Signed-off-by: Matthew Wilcox Cc: Eric Van Hensbergen Cc: Ron Minnich Cc: Latchesar Ionkov Signed-off-by: Dominique Martinet commit 62e3941776fea8678bb8120607039410b1b61a65 Author: Dominique Martinet Date: Tue Aug 28 07:32:35 2018 +0900 9p: clear dangling pointers in p9stat_free p9stat_free is more of a cleanup function than a 'free' function as it only frees the content of the struct; there are chances of use-after-free if it is improperly used (e.g. p9stat_free called twice as it used to be possible to) Clearing dangling pointers makes the function idempotent and safer to use. Link: http://lkml.kernel.org/r/1535410108-20650-2-git-send-email-asmadeus@codewreck.org Signed-off-by: Dominique Martinet Reported-by: syzbot+d4252148d198410b864f@syzkaller.appspotmail.com commit 81c99089bce693b94b775b6eb888115d2d540086 Author: Dominique Martinet Date: Mon Aug 27 15:12:05 2018 +0900 v9fs_dir_readdir: fix double-free on p9stat_read error p9stat_read will call p9stat_free on error, we should only free the struct content on success. There also is no need to "p9stat_init" st as the read function will zero the whole struct for us anyway, so clean up the code a bit while we are here. Link: http://lkml.kernel.org/r/1535410108-20650-1-git-send-email-asmadeus@codewreck.org Signed-off-by: Dominique Martinet Reported-by: syzbot+d4252148d198410b864f@syzkaller.appspotmail.com commit 817e60a7a2bb1f22052f18562990d675cb3a3762 Merge: 09990ad1647f 4152e58cb8c5 Author: David S. Miller Date: Tue Aug 28 16:01:48 2018 -0700 Merge branch 'nfp-add-NFP5000-support' Jakub Kicinski says: ==================== nfp: add NFP5000 support This series broadly speaking adds support for NFP5000 and related products. First we add support for loading FW from flash. We need to allow for the management processor to provide extended log messages when FW is loaded. This is needed when FW selection policy is to compare the FW on the disk and in the flash, and load the newer. User should be told what FW was selected. We use this opportunity to add extended errors for normal FW loading as well. Next we add support for requesting HW information from the management processor. Up until now the driver read the HWinfo as it appears in card memory, but there can be cases when management processor has additional information or generates the entries dynamically so occasionally we will have to consult it. We use this to look up MAC addresses for PCIe netdevs. Next the actual patch with NFP5000 support and a small dose of refactoring of PCIe init. The remaining patches add support for reading RTsymbol types we didn't need before. Ones explicitly placed in external memory unit's cache and absolute ones. This part begins with a patch moving the logic which figures out the correct bit offsets to device probe, to avoid redoing the calculation for each access. Second patch adds error messages for easier troubleshooting. Next patch adds helpers which will take care of address conversions to reach into EMU cache. Subsequently users are migrated from the raw CPP API to the new RTsym helpers. Finally we add support for reading absolute symbols. ==================== Signed-off-by: David S. Miller commit 4152e58cb8c5cd390989f1e96092bce92c27c67a Author: Jakub Kicinski Date: Tue Aug 28 13:20:47 2018 -0700 nfp: make RTsym users handle absolute symbols correctly Make the RTsym users access the size via the helper, which takes care of special handling of absolute symbols. Signed-off-by: Jakub Kicinski Reviewed-by: Francois H. Theron Signed-off-by: David S. Miller commit 640917dd81b622ac1c6e66b80be6a4174cbe3710 Author: Jakub Kicinski Date: Tue Aug 28 13:20:46 2018 -0700 nfp: support access to absolute RTsyms Add support in nfpcore for reading the absolute RTsyms. Signed-off-by: Jakub Kicinski Reviewed-by: Francois H. Theron Signed-off-by: David S. Miller commit 1240989ccca95863ceebfbdff0f84993d84458f9 Author: Jakub Kicinski Date: Tue Aug 28 13:20:45 2018 -0700 nfp: convert all RTsym users to use new read/write helpers Convert all users of RTsym to the new set of helpers which handle all targets correctly. Signed-off-by: Jakub Kicinski Reviewed-by: Francois H. Theron Signed-off-by: David S. Miller commit 761969992dd024757ae0268330ab4d7b38be680b Author: Jakub Kicinski Date: Tue Aug 28 13:20:44 2018 -0700 nfp: convert existing RTsym helpers to full target decoding Make nfp_rtsym_{read,write}_le() and nfp_rtsym_map() use the new target resolution helpers to allow accessing in-cache symbols. Signed-off-by: Jakub Kicinski Reviewed-by: Francois H. Theron Signed-off-by: David S. Miller commit 8f6d6052cf65a19a0c58d7f056935520d9961e7c Author: Jakub Kicinski Date: Tue Aug 28 13:20:43 2018 -0700 nfp: pass cpp_id to nfp_cpp_map_area() Align nfp_cpp_map_area() with other CPP-level APIs and pass encoded cpp_id/dest rather than target, action, domain tuple. Signed-off-by: Jakub Kicinski Reviewed-by: Francois H. Theron Signed-off-by: David S. Miller commit 3f0e55a2a6e27e3d6792f2476ee374b4c1102c5e Author: Jakub Kicinski Date: Tue Aug 28 13:20:42 2018 -0700 nfp: add RTsym access helpers RTsyms may have special encodings for more complex symbol types. For example symbols which are placed in external memory unit's cache directly, constants or local memory. Add set of helpers which will check for those special encodings and handle them correctly. For now only add direct cache accesses, we don't have a need to access the other ones in foreseeable future. Signed-off-by: Jakub Kicinski Reviewed-by: Francois H. Theron Signed-off-by: David S. Miller commit c678a9759ade7a523a76d8ccb60f6ac7dcd2e8f3 Author: Jakub Kicinski Date: Tue Aug 28 13:20:41 2018 -0700 nfp: add basic errors messages to target logic Add error prints to CPP target encoding/decoding logic, otherwise it's quite hard to pin point the reasons why read or write operations fail. Signed-off-by: Jakub Kicinski Reviewed-by: Francois H. Theron Signed-off-by: David S. Miller commit 73eaf3b7b875a819dbef46fed1ab67d793f4136d Author: Jakub Kicinski Date: Tue Aug 28 13:20:40 2018 -0700 nfp: save the MU locality field offset We will soon need the MU locality field offset much more often than just for decoding MIP address. Save it in nfp_cpp for quick access. Note that we can already reuse the target config from nfp_cpp, no need to do the XPB read. Signed-off-by: Jakub Kicinski Reviewed-by: Francois H. Theron Signed-off-by: David S. Miller commit 9bf6cce893072a078aaab0eaa8e399974b815bb1 Author: Jakub Kicinski Date: Tue Aug 28 13:20:39 2018 -0700 nfp: refactor the per-chip PCIe config Use a switch statement instead of ifs for code dependent on chip version. While at it make sure we fail for unknown chip revisions. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit 0377505c540c4182ef50005188fe3940e17642d9 Author: Jakub Kicinski Date: Tue Aug 28 13:20:38 2018 -0700 nfp: add support for NFP5000 Add NFP5000 to supported chips, the chip is backward compatible with NFP4000 and NFP6000, so core PCIe code needs to handle it the same way as 4k and 6k. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit f6e71efdf9fb1044361edbb89ff59d89120af6a6 Author: Jakub Kicinski Date: Tue Aug 28 13:20:37 2018 -0700 nfp: abm: look up MAC addresses via management FW In multi-host scenarios Management FW may allocate MAC addresses at runtime, we have to use the indirect lookup to find them. Signed-off-by: Jakub Kicinski Reviewed-by: Dirk van der Merwe Signed-off-by: David S. Miller commit 34243f59095e2c50ecb5c217b9d439a31e0e049a Author: Jakub Kicinski Date: Tue Aug 28 13:20:36 2018 -0700 nfp: add support for indirect HWinfo lookup Management FW can adjust some of the information in the HWinfo table at runtime. In some cases reading the table directly will not yield correct results. Add a NSP command for looking up information. Up until now we weren't making use of any of the values which may get adjusted. Signed-off-by: Jakub Kicinski Reviewed-by: Dirk van der Merwe Signed-off-by: David S. Miller commit ac86da05463dc91af3741540663d864ba9287071 Author: Jakub Kicinski Date: Tue Aug 28 13:20:35 2018 -0700 nfp: interpret extended FW load result codes To enable easier FW distribution NFP can now automatically select between FW stored on the flash and loaded from the kernel. If FW loading policy is set to auto it will compare the versions of FW from the host and from the flash and load the newer one. If FW type doesn't match (e.g. one advanced application vs another) the FW from the host takes precedence, unless one of them is the basic NIC firmware, in which case the non-basic-NIC FW is selected. This automatic selection mechanism requires we inform user what the verdict was. Print a message to the logs explaining the decision and the reason. Signed-off-by: Jakub Kicinski Reviewed-by: Dirk van der Merwe Signed-off-by: David S. Miller commit 2db100002eed110e08023cc99d953646f4d62605 Author: Jakub Kicinski Date: Tue Aug 28 13:20:34 2018 -0700 nfp: attempt FW load from flash Flash may contain a default NFP application FW. This application can either be put there by the user (with ethtool -f) or shipped with the card. If file system FW is not found, attempt to load this flash stored app FW. Signed-off-by: Jakub Kicinski Reviewed-by: Dirk van der Merwe Signed-off-by: David S. Miller commit 1c0372b67ccaf1b1fa0709475f4a53619e407e61 Author: Jakub Kicinski Date: Tue Aug 28 13:20:33 2018 -0700 nfp: encapsulate NSP command arguments into structs There is already a fair number of arguments to nfp_nsp_command() family of functions. Encapsulate them into structures to make adding new ones easier. No functional changes. Signed-off-by: Jakub Kicinski Reviewed-by: Dirk van der Merwe Signed-off-by: David S. Miller commit 09990ad1647f986489df33f5ad461eae28c34a35 Merge: b537f5845fff 9ea47d81a7f1 Author: David S. Miller Date: Tue Aug 28 15:57:25 2018 -0700 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-08-28 This series contains new features and implementation updates for the ice driver. Anirudh reworks the current flex programming logic to add support for a second flex descriptor profile. Updated the transmit scheduler code to handle changes to the spec, specifically the firmware expects a 4KB buffer at all times so fix the default scheduler topology buffer size. Also the maximum children per node per layer is replaced by maximum sibling group size. Adds a check to ensure a reset is not in progress before exercising a control queue operation. Refactored the switch rule management functions and structures to simply the logic and to add a common function to search for a rule entry and add a new rule entry. Refactored the VSI allocation, deletion and rebuild flow so that on reset we can restore all the filters that were previously added. Did some spring cleaning of define names and macros. Dan updates the admin queue command for requesting resource ownership to the latest specification by adding new enum's and change the locks. Zhenning optimizes the driver by using the existing buffer in a structure directly versus a local array. Chinh implements handlers for ethtool for get and set link settings. Sudheer implements transmit hang/timeout detection and malicious driver detection in the driver. Md Fahad Iqbal implements the get and set bridge mode operations. Hieu adds the ability for firmware logging during initialization. Brett updates the driver to only enable VSI transmit and receive pruning when VLAN 0 is active, and when VLAN 0 is removed/not active, pruning is disabled. Akeem adds a flag to use for stopping the service task. ==================== Signed-off-by: David S. Miller commit 4f83d9b848f67f85df04e69740bf8d70cb4a72b6 Author: Douglas Anderson Date: Tue Jul 24 10:45:13 2018 -0700 clk: qcom: Add qspi (Quad SPI) clocks for sdm845 Add both the interface and core clock. Signed-off-by: Douglas Anderson Reviewed-by: Taniya Das Signed-off-by: Stephen Boyd commit b537f5845ffff5238d51b50b460681ace09a32be Merge: 050cdc6c9501 5ed4e9e990ee Author: David S. Miller Date: Tue Aug 28 15:56:37 2018 -0700 Merge branch '10GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue Jeff Kirsher says: ==================== 10GbE Intel Wired LAN Driver Updates 2018-08-28 This series contains updates to ixgbe and ixgbevf only. Sebastian adds support for firmware NVM recovery mode, which logs a message when errors are detected and un-registers the device. Also fixed RSS type recognition with VF to VF communication. Shannon Nelson implements IPsec hardware offload for VF devices in Intel's 10GbE x540 family of Ethernet devices. The IPsec HW offload feature has been in the x540/Niantic family of network devices since their release in 2009, but there was no Linux kernel support for the offload until 2017. After the XFRM code added support for the offload last year, the HW offload was added to the ixgbe PF driver. Since the related x540 VF device uses same setup as the PF for implementing the offload, adding the feature to the ixgbevf seemed like a good idea. In this case, the PF owns the device registers, so the VF simply packages up the request information into a VF<->PF message and the PF does the device configuration. ==================== Signed-off-by: David S. Miller commit 48735597f7bd4421fe1e9392899ae9654c263315 Author: Douglas Anderson Date: Tue Jul 24 10:45:12 2018 -0700 clk: qcom: Add qspi (Quad SPI) clock defines for sdm845 to header These clocks will need to be defined in the clock driver and referenced in device tree files. Signed-off-by: Douglas Anderson Acked-by: Rob Herring Reviewed-by: Taniya Das Signed-off-by: Stephen Boyd commit b567752144e39a6bc621d56b8f09daba041c7806 Author: Rajendra Nayak Date: Thu Aug 9 15:01:19 2018 -0700 clk: qcom: Add some missing gcc clks for msm8996 Add a few missing gcc clks for msm8996 Signed-off-by: Rajendra Nayak [bjorn: omit aggre0_noc_qosgen_extref_clk] Signed-off-by: Bjorn Andersson Reviewed-by: Rob Herring Signed-off-by: Stephen Boyd commit 5df52391ddbed869c7d67b00fbb013bd64334115 Author: Manasi Navare Date: Thu Aug 23 18:48:07 2018 -0700 drm/i915/dsc: Fix PPS register definition macros for 2nd VDSC engine This patch fixes the PPS4 and PPS5 register definition macros that were resulting into an incorect MMIO address. Fixes: 2efbb2f099fb ("i915/dp/dsc: Add DSC PPS register definitions") Cc: Anusha Srivatsa Signed-off-by: Manasi Navare Reviewed-by: Rodrigo Vivi Reviewed-by: Anusha Srivatsa Link: https://patchwork.freedesktop.org/patch/msgid/20180824014807.14681-1-manasi.d.navare@intel.com commit 8a7e2d2ea080d10a189a1d611344b0330468ebc3 Author: Anders Roxell Date: Tue Aug 28 11:31:18 2018 +0200 cpupower: remove stringop-truncation waring The strncpy doesn't null terminate the string because the size is too short by one byte. parse.c: In function ‘prepare_default_config’: parse.c:148:2: warning: ‘strncpy’ output truncated before terminating nul copying 8 bytes from a string of the same length [-Wstringop-truncation] strncpy(config->governor, "ondemand", 8); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The normal method of passing the length of the destination buffer works correctly here. Fixes: 7fe2f6399a84 ("cpupowerutils - cpufrequtils extended with quite some features") Signed-off-by: Anders Roxell Signed-off-by: Shuah Khan (Samsung OSG) commit 5ed4e9e990eea130b9881da3655c56cfc5646da7 Author: Shannon Nelson Date: Wed Aug 22 16:47:15 2018 -0700 ixgbe: fix the return value for unsupported VF offload When failing the request because we can't support that offload, reporting EOPNOTSUPP makes much more sense than ENXIO. Signed-off-by: Shannon Nelson Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 47b6f50077e68bcd544f657526dad4bfdce7e87d Author: Shannon Nelson Date: Wed Aug 22 16:47:14 2018 -0700 ixgbe: disallow IPsec Tx offload when in SR-IOV mode There seems to be a problem in the x540's internal switch wherein if SR-IOV mode is enabled and an offloaded IPsec packet is sent to a local VF, the packet is silently dropped. This might never be a problem as it is somewhat a corner case, but if someone happens to be using IPsec offload from the PF to a VF that just happens to get migrated to the local box, communication will mysteriously fail. Not good. A simple way to protect from this is to simply not allow any IPsec offloads for outgoing packets when num_vfs != 0. This doesn't help any offloads that were created before SR-IOV was enabled, but we'll get to that later. Signed-off-by: Shannon Nelson Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 7f68d43067018df9b6ce0e75a99c9d58ded989f5 Author: Shannon Nelson Date: Mon Aug 13 11:43:45 2018 -0700 ixgbevf: enable VF IPsec offload operations Add the IPsec initialization into the driver startup and add the Rx and Tx processing hooks. Signed-off-by: Shannon Nelson Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 0062e7cc955e0827a88570ed36ea511a7dcb391e Author: Shannon Nelson Date: Mon Aug 13 11:43:44 2018 -0700 ixgbevf: add VF IPsec offload code Add the IPsec offload support code. This is based off of the similar code in ixgbe, but instead of writing the SA registers, the VF asks the PF to setup the offload by sending the offload information to the PF via the standard mailbox. Signed-off-by: Shannon Nelson Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit adef9a26d6c39cbfa1b396aa34df85051a143402 Author: Shannon Nelson Date: Mon Aug 13 11:43:43 2018 -0700 ixgbevf: add defines for IPsec offload request Fix up the register definitions for using IPsec offloads and add the new mailbox message IDs. Signed-off-by: Shannon Nelson Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 72698240463769f68020c61eb71d1aef96458200 Author: Shannon Nelson Date: Mon Aug 13 11:43:42 2018 -0700 ixgbe: add VF IPsec offload request message handling Add an add and a delete message for IPsec offload requests from the VF. These call into the IPsec functions that can translate the message buffer into a useful IPsec offload. These new messages bump the mbox API version to 1.4. Signed-off-by: Shannon Nelson Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 9e4e30cc0c41bb5c727851c7028f840d488365ee Author: Shannon Nelson Date: Mon Aug 13 11:43:41 2018 -0700 ixgbe: add VF IPsec offload enable flag Add a private flag to expressly enable support for VF IPsec offload. The VF will have to be "trusted" in order to use the hardware offload, but because of the general concerns of managing VF access, we want to be sure the user specifically is enabling the feature. This is likely a candidate for becoming a netdev feature flag. Signed-off-by: Shannon Nelson Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit eda0333ac29304c5f5cd72d963d5d1e788ce49ab Author: Shannon Nelson Date: Mon Aug 13 11:43:40 2018 -0700 ixgbe: add VF IPsec management Add functions to translate VF IPsec offload add and delete requests into something the existing code can work with. Signed-off-by: Shannon Nelson Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 99a7b0c14c3078c0eaa1e795fb9bd53330977fa7 Author: Shannon Nelson Date: Mon Aug 13 11:43:39 2018 -0700 ixgbe: prep IPsec constants for later use Pull out a couple of values from a function so they can be used later elsewhere. Signed-off-by: Shannon Nelson Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit b2875fbf6c96ab0f052835be16e00ec403c8c778 Author: Shannon Nelson Date: Mon Aug 13 11:43:38 2018 -0700 ixgbe: reload IPsec IP table after sa tables Restore the IPsec hardware IP table after reloading the SA tables. This doesn't make much difference now, but will matter when we add support for VF IPsec offloads. Signed-off-by: Shannon Nelson Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 9e3f2f5ecee69b0f70003fb3e07639151e91de73 Author: Shannon Nelson Date: Fri Aug 10 12:24:10 2018 -0700 ixgbe: don't clear IPsec sa counters on HW clearing The software SA record counters should not be cleared when clearing the hardware tables. This causes the counters to be out of sync after a driver reset. Fixes: 63a67fe229ea ("ixgbe: add ipsec offload add and remove SA") Signed-off-by: Shannon Nelson Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit f813eec972ee32f69e3a8be3512cb6ba266d7d64 Author: Rob Herring Date: Mon Aug 27 20:52:26 2018 -0500 leds: 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: Rob Herring Cc: linux-leds@vger.kernel.org Acked-by: Sakari Ailus Acked-by: Pavel Machek Signed-off-by: Jacek Anaszewski commit 7fb94bd58dd6650a0158e68d414e185077d8b57a Author: Sebastian Basierski Date: Thu Aug 9 11:45:40 2018 +0200 ixgbevf: VF2VF TCP RSS While VF2VF with RSS communication, RSS Type were wrongly recognized and RSS hash was not calculated as it should be. Packets was distributed on various queues by accident. This commit fixes that behaviour and causes proper RSS Type recognition. Signed-off-by: Sebastian Basierski Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 864822235f1897219409ec1f0af076fcc9057c57 Author: Fabrizio Castro Date: Fri Aug 17 15:58:34 2018 +0100 spi: sh-msiof: 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: Mark Brown commit e69a35531589a2d3c746b0491d5ad3f77b6a0125 Author: Nishanth Menon Date: Tue Aug 28 13:22:13 2018 -0700 firmware: ti_sci: Provide host-id as an optional dt parameter Texas Instrument's System Control Interface (TISCI) permits the ability for Operating Systems to running in virtual machines to be able to independently communicate with the firmware without the need going through an hypervisor. The "host-id" in effect is the hardware representation of the host (example: VMs locked to a core) as identified to the System Controller. Provide support as an optional parameter implementation and use the compatible data as default if one is not provided by device tree. Signed-off-by: Nishanth Menon Signed-off-by: Santosh Shilimkar commit 79a79c3a0ec2043711577750d4499abf4155d216 Author: Nishanth Menon Date: Tue Aug 28 13:22:10 2018 -0700 Documentation: dt: keystone: ti-sci: Add optional host-id parameter Texas Instrument's System Control Interface (TISCI) permits the ability for OSs running in virtual machines to be able to independently communicate with the firmware without the need going through an hypervisor. The "host-id" in effect is the hardware representation of the host (example: VMs locked to a core) as identified to the System Controller. Hypervisors can either fill in appropriate host-ids in dt used for each VM instance OR may use prebuilt blobs where the host-ids are pre-populated, as appropriate for the OS running in the VMs. This is introduced as an optional parameter to maintain consistency with legacy device tree blobs. Reviewed-by: Rob Herring Signed-off-by: Nishanth Menon Signed-off-by: Santosh Shilimkar commit beb5a17fa32ed9b3b44be23dda9caf92c01e8200 Author: Douglas Anderson Date: Fri Aug 10 13:05:31 2018 -0700 regulator: qcom-rpmh: Add stylistic breaks in the default cases No functional change here but it can make the code more readable to have breaks in the "default" case even though it's the last case. Let's add them. Signed-off-by: Douglas Anderson Reviewed-by: David Collins Signed-off-by: Mark Brown commit e7d973a31c24b3e82d54b6619f4b633038fce228 Author: Lanqing Liu Date: Thu Aug 16 20:54:51 2018 +0800 spi: sprd: Add SPI driver for Spreadtrum SC9860 This patch adds the SPI controller driver for Spreadtrum SC9860 platform. Signed-off-by: Lanqing Liu Signed-off-by: Baolin Wang Signed-off-by: Mark Brown commit 862cf93e4b9ba17f6375dc68c1e01da3210d5310 Author: Lanqing Liu Date: Thu Aug 16 20:54:50 2018 +0800 spi: Add Spreadtrum SPI controller documentation This patch adds the binding documentation for Spreadtrum SPI controller device. Signed-off-by: Lanqing Liu Signed-off-by: Baolin Wang Reviewed-by: Rob Herring Signed-off-by: Mark Brown commit 7e4d9683d6a716533f5c5026795b7b1ebdbcb2ed Author: Douglas Anderson Date: Thu Aug 16 13:28:03 2018 -0700 regulator: core: Add locking to debugfs regulator_summary Most functions that access the rdev lock the rdev mutex before looking at data. ...but not the code that implements the debugfs regulator_summary. It probably should though, so let's do it. Note: this fixes no known issues. The problem was found only by code inspection. Signed-off-by: Douglas Anderson Signed-off-by: Mark Brown commit 7d3827b5954840ff7765aef282257b7368b5ea67 Author: Douglas Anderson Date: Thu Aug 16 13:28:02 2018 -0700 regulator: core: Add consumer-requested load in regulator_summary It's handy to see the load requested by a regulator consumer in the regulator_summary. Add it. Signed-off-by: Douglas Anderson Signed-off-by: Mark Brown commit 01de19d09ce6129740b318687a92c137451d2369 Author: Douglas Anderson Date: Thu Aug 16 13:28:01 2018 -0700 regulator: core: Add the opmode to regulator_summary It's handy to know what opmode a regulator has been configured to in the summary. Add it. Signed-off-by: Douglas Anderson Signed-off-by: Mark Brown commit 1b3b7981524af2b6dcdf78cfa6dca89522c13ade Author: Peter Rosin Date: Mon Aug 20 12:14:09 2018 +0200 ASoC: atmel: tse850: switch to SPDX license identifier Convert to // comments in the leading comment, drop the boilerplate license text and use the correct MODULE_LICENSE. Signed-off-by: Peter Rosin Signed-off-by: Mark Brown commit a1b1e9880f0c2754a5ac416a546d9f295f72eabc Author: Akshu Agrawal Date: Tue Aug 21 12:29:43 2018 +0530 ASoC: AMD: Change MCLK to 48Mhz 25Mhz MCLK which was earlier used was of spread type. Thus, we were not getting accurate rate. The 48Mhz system clk is of non-spread type and we are changing to it to get accurate rate. Signed-off-by: Akshu Agrawal Reviewed-by: Daniel Kurtz Signed-off-by: Mark Brown commit c736cbd3a668c3befd3ce08e0fbccac302fbecac Author: Akshu Agrawal Date: Tue Aug 21 12:25:05 2018 +0530 ASoC: AMD: Set constraints for DMIC and MAX98357a codec We support dual channel, 48Khz. This constraint was set only for da7219. It is being extended to DMIC and MAX98357a. Signed-off-by: Akshu Agrawal Reviewed-by: Daniel Kurtz Signed-off-by: Mark Brown commit 6ee47d4a8dacfa484d526c0475730568d979de24 Author: Kirill Marinushkin Date: Tue Aug 21 18:52:46 2018 +0200 ASoC: pcm3060: Add codec driver This commit adds support for TI PCM3060 CODEC. The technical documentation is available at [1]. [1] http://ti.com/product/pcm3060 Signed-off-by: Kirill Marinushkin Cc: Mark Brown Cc: Liam Girdwood Cc: Jaroslav Kysela Cc: Takashi Iwai Cc: M R Swami Reddy Cc: Vishwas A Deshpande Cc: Kevin Cernekee Cc: Peter Ujfalusi Cc: alsa-devel@alsa-project.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Mark Brown commit 6fbf9d8e2793b81dd5f8738999163582ce61dba7 Author: Fabrizio Castro Date: Tue Aug 21 17:42:28 2018 +0100 ASoC: rsnd: Add r8a774a1 support Document RZ/G2M (R8A774A1) SoC bindings. Signed-off-by: Fabrizio Castro Reviewed-by: Biju Das Acked-by: Kuninori Morimoto Reviewed-by: Simon Horman Signed-off-by: Mark Brown commit f8fc397e13107f925186ee742e9e8dfbfe9a3d03 Author: Hans de Goede Date: Tue Aug 21 13:43:37 2018 +0200 ASoC: Intel: cht-bsw-rt5672: Add key-mappings for the headset buttons Having the headset buttons send BTN_0, BTN_1 and BTN_2 events is not really useful. Add mappings to PLAYPAUSE VOLUME_UP and VOLUME_DOWN like we do in other Intel machine drivers. Signed-off-by: Hans de Goede Signed-off-by: Mark Brown commit 2ca426a24dd75e775ece1466ae45e019f0035b8d Author: Hans de Goede Date: Tue Aug 21 13:43:36 2018 +0200 ASoC: Intel: common: Add quirk for Thinkpad 8 tablet The Thinkpad 8 tablet uses 10EC5640 as ACPI HID, but it has a rt5670 codec add a quirk for this. Signed-off-by: Hans de Goede Signed-off-by: Mark Brown commit 818838e6bfa4ddc6c76703237028dcffb80d6496 Author: Hans de Goede Date: Tue Aug 21 13:43:35 2018 +0200 ASoC: rt5670: Add quirk for Thinkpad 8 tablet The Thinkpad 8 needs a quirk for jack-detect and the internal mic to work correctly. Signed-off-by: Hans de Goede Signed-off-by: Mark Brown commit b0f2d651299f0743818bdadcbe6a67d7869e0da1 Author: Danny Smith Date: Tue Aug 21 13:07:49 2018 +0200 ASoC: adau17x1: Implemented safeload support Safeload support has been implemented which is used when updating for instance filter parameters using alsa controls. Without safeload support audio can become distorted during update. Signed-off-by: Danny Smith Signed-off-by: Robert Rosengren Acked-by: Lars-Peter Clausen Signed-off-by: Mark Brown commit 9135bac325052be8a131a8a75bbcc583451ebb1f Author: Wolfram Sang Date: Wed Aug 22 00:02:23 2018 +0200 spi: use SPDX identifier for Renesas drivers Signed-off-by: Wolfram Sang Reviewed-by: Simon Horman Signed-off-by: Mark Brown commit e7d80b6b848b4b5f83d3fbee9fd042d036ede9c6 Author: Matti Vaittinen Date: Wed Aug 22 12:53:27 2018 +0300 regulator: regmap helpers - support overlapping linear ranges Don't give up voltage mapping if first range with suitable min/max uV does not provide the wanted voltage. Signed-off-by: Matti Vaittinen Signed-off-by: Mark Brown commit b45649fbd5bf94199a84bdeb4515bca926f698a9 Author: Dhinakaran Pandiyan Date: Fri Aug 24 13:38:56 2018 -0700 drm/i915: Do not advertize support for NV12 on ICL yet. ICL requires two planes for scanning out a NV12 framebuffer. Do not advertize support for creating NV12 framebuffers until required plane programming is implemented. v2: Do not allow adding buffers. Check inside skl_plane_has_planar (Ville) Bspec: Plane Planar YUV programming (18566) Cc: Ville Syrjälä Cc: Rodrigo Vivi Signed-off-by: Dhinakaran Pandiyan Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180824203856.17700-2-dhinakaran.pandiyan@intel.com commit 18563409b13274e9d199276ba82910f72b69c308 Author: Dhinakaran Pandiyan Date: Mon Aug 27 15:56:24 2018 -0700 drm/i915: Clean up skl_plane_has_planar() skl_plane_has_planar is hard to read, simplify the logic by checking for support in the order of platform, pipe and plane. No change in functionality intended. v2: Fix logic for primary plane (Ville) Cc: Ville Syrjälä Signed-off-by: Dhinakaran Pandiyan Reviewed-by: Ville Syrjälä Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20180827225624.4912-1-dhinakaran.pandiyan@intel.com commit 6bae5ea9498926440ffc883f3dbceb0adc65e492 Author: Rakesh Ughreja Date: Wed Aug 22 15:25:03 2018 -0500 ASoC: hdac_hda: add asoc extension for legacy HDA codec drivers This patch adds a kernel module which is used by the legacy HDA codec drivers as library. This implements hdac_ext_bus_ops to enable the reuse of legacy HDA codec drivers with ASoC platform drivers. Signed-off-by: Rakesh Ughreja Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown commit 00deadb5d86a3c1e691aaa073a8852a198595099 Author: Rakesh Ughreja Date: Wed Aug 22 15:25:02 2018 -0500 ASoC: Intel: Skylake: use hda_bus instead of hdac_bus Use hda_bus instead of hdac_bus in the SKL ASoC platform driver to enable reuse of legacy HDA codec drivers. Signed-off-by: Rakesh Ughreja Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown commit 3d17871349d5cec0a37ce9407ba72fdbf8572cfd Author: Rakesh Ughreja Date: Wed Aug 22 15:25:01 2018 -0500 ASoC: Intel: Skylake: add HDA BE DAIs Add support for HDA BE DAIs in SKL platform driver. Signed-off-by: Rakesh Ughreja Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown commit 9cdae4352cba3f66d39a4ef78bb726940ae1e513 Author: Rakesh Ughreja Date: Wed Aug 22 15:25:00 2018 -0500 ASoC: Intel: Skylake: use HDAudio if ACPI enumeration fails When no I2S based codec entries are found in the BIOS, check if there are any HDA codecs detected on the bus. Based on the number of codecs found take appropriate action in machine driver. If there are two HDA codecs i.e. iDisp + HDA found on the bus, register DAIs and DAI links for both. If only one codec i.e. iDisp is found then load only iDisp machine driver. Signed-off-by: Rakesh Ughreja Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown commit 7c33b5f16915a7bc3d3b81a9a041bdc562f71dfb Author: Rakesh Ughreja Date: Wed Aug 22 15:24:59 2018 -0500 ASoC: Intel: Boards: Machine driver for SKL+ w/ HDAudio codecs Add machine driver for Intel platforms (SKL/KBL/BXT/APL) with HDA and iDisp codecs. This patch adds support for only iDisp (HDMI/DP) codec. In the following patches support for HDA codecs will be added. This should work for other Intel platforms as well e.g. GLK,CNL however this series is not tested on all the platforms. Signed-off-by: Rakesh Ughreja Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown commit 8dce1d026da4588382ed8c03e791c7c9b37b22e8 Author: Pierre-Louis Bossart Date: Wed Aug 22 15:24:58 2018 -0500 ASoC: Intel: common: add table for HDA-based platforms Expose a table containing machine driver information for HDAudio-based platforms handled by ASoC on Intel hardware. We only set constant values that are valid across multiple platforms. The firmware name used by the DSP will be set dynamically for each platform. The table is made of a single entry for now, if we need more complicated set-up where HDAudio is mixed with ACPI-enumerated devices (I2C, SoundWire) then we'd expect the differentiation to be handled through information provided by the BIOS (as done for KBL Chromebooks). Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown commit b4af16d617add4f6380d6651473b8efba13ca8ca Author: Pierre-Louis Bossart Date: Wed Aug 22 15:24:57 2018 -0500 ALSA: hda: move hda_codec.h to include/sound As suggested by Takashi, move this header file to make it easier to include from e.g. the Intel Skylake driver in follow-up patches Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown commit 59dd45d550c518a2c297b2888f194633cb8e5700 Author: Sebastian Basierski Date: Tue Jul 31 18:04:10 2018 +0200 ixgbe: firmware recovery mode Add check for FW NVM recovery mode during driver initialization and service task. If in recovery mode, log message and unregister device Signed-off-by: Sebastian Basierski Tested-by: Don Buchholz Signed-off-by: Jeff Kirsher commit 0d45db9c7a02a4736b78bb8e4ee7d96a29f554b5 Author: Ville Syrjälä Date: Tue Aug 28 17:27:07 2018 +0300 drm/i915: Reject compressed Y/Yf with interlaced modes Y/Yf tiling can't be used with IF-ID. We already reject uncompressed Y/Yf but we should also reject them when compressed. Cc: José Roberto de Souza Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180828142707.31583-2-ville.syrjala@linux.intel.com Reviewed-by: José Roberto de Souza Reviewed-by: Mahesh Kumar commit eb0f50441056c68b2bbef82ac03d300221f41d26 Author: Ville Syrjälä Date: Tue Aug 28 17:27:06 2018 +0300 drm/i915: Don't pass plane to .check_plane() .check_plane() already gets the plane state, so we can dig out the plane from there if needed. No need in passing it separately. Cc: José Roberto de Souza Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180828142707.31583-1-ville.syrjala@linux.intel.com Reviewed-by: José Roberto de Souza commit 513792c2554bdece11d82568ea25501a555abd34 Author: Shuming Fan Date: Fri Aug 24 10:51:51 2018 +0800 ASoC: rt5682: Update calibration function New calibration sequence allows rt5682 do calibration without MCLK. Signed-off-by: Shuming Fan Signed-off-by: Mark Brown commit 61b2e6741e81226c29a5ed92fd886f11efb78e98 Author: Axel Lin Date: Fri Aug 24 19:16:12 2018 +0800 regulator: bd71837: Remove duplicate assignment for n_voltages of LDO2 Set it once is enough. Also move n_voltages close to volt_table for better readability. Signed-off-by: Axel Lin Signed-off-by: Mark Brown commit 302df2694b97e6a56f7956c1105630809b141ea0 Author: Jerome Brunet Date: Mon Aug 27 16:21:07 2018 +0200 ASoC: meson: axg-tdm: restrict formats depending on slot width Restrict the formats possible on the TDM interface depending on the width of the TDM slot and let dpcm merging do the rest. Fixes: d60e4f1e4be5 ("ASoC: meson: add tdm interface driver") Signed-off-by: Jerome Brunet Signed-off-by: Mark Brown commit dadfab7272b13ca441efdb9aa9117bc669680b05 Author: Jerome Brunet Date: Mon Aug 27 16:15:29 2018 +0200 ASoC: meson: axg-fifo: report interrupt request failure Return value of request_irq() was irgnored. Fix this and report the failure if any Fixes: 6dc4fa179fb8 ("ASoC: meson: add axg fifo base driver") Signed-off-by: Jerome Brunet Signed-off-by: Mark Brown commit ac16df938e5107a1e08cf0f52818fa6a5f7bba94 Author: Jerome Brunet Date: Tue Aug 28 14:17:21 2018 +0200 ASoC: meson: imply clock and reset controllers Add audio clock controller and ARB reset controller module implication for the device using them Signed-off-by: Jerome Brunet Signed-off-by: Mark Brown commit 46942b21a95ffd1476c82b3a8683a1caa58b6f40 Author: Axel Lin Date: Mon Aug 27 22:15:21 2018 +0800 regulator: isl9305: Add missing .owner field in regulator_desc Add missing .owner field in regulator_desc, which is used for refcounting. Signed-off-by: Axel Lin Signed-off-by: Mark Brown commit 0c9721a5d1dea7122601dc8694e7d4a208874b84 Author: Rob Herring Date: Mon Aug 27 20:52:42 2018 -0500 regulator: 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: Rob Herring Signed-off-by: Mark Brown commit e33ffbd9cd39da09831ce62c11025d830bf78d9e Author: Charles Keepax Date: Mon Aug 27 14:26:47 2018 +0100 ASoC: dpcm: Properly initialise hw->rate_max If the CPU DAI does not initialise rate_max, say if using using KNOT or CONTINUOUS, then the rate_max field will be initialised to 0. A value of zero in the rate_max field of the hardware runtime will cause the sound card to support no sample rates at all. Obviously this is not desired, just a different mechanism is being used to apply the constraints. As such update the setting of rate_max in dpcm_init_runtime_hw to be consistent with the non-DPCM cases and set rate_max to UINT_MAX if nothing is defined on the CPU DAI. Signed-off-by: Charles Keepax Signed-off-by: Mark Brown commit a5cd7e9cf587f51a84b86c828b4e1c7b392f448e Author: Charles Keepax Date: Tue Aug 28 14:35:03 2018 +0100 ASoC: dapm: Don't fail creating new DAPM control on NULL pinctrl devm_pinctrl_get will only return NULL in the case that pinctrl is not built into the kernel and all the pinctrl functions used by the DAPM core are appropriately stubbed for that case. There is no need to error out of snd_soc_dapm_new_control_unlocked if pinctrl isn't built into the kernel, so change the IS_ERR_OR_NULL to just an IS_ERR. Signed-off-by: Charles Keepax Signed-off-by: Mark Brown commit d78b1e43e2182640b33d1c39245965d9231f0130 Author: Charles Keepax Date: Tue Aug 28 14:35:02 2018 +0100 ASoC: dapm: Remove clock framework ifdefs The clock code now has stub functions defined in its header files so the ifdefs around clocking code should no longer be necessary. Signed-off-by: Charles Keepax Signed-off-by: Mark Brown commit 9ea47d81a7f17c6b77211ab75fbca2127719ad39 Author: Anirudh Venkataramanan Date: Thu Aug 9 06:29:58 2018 -0700 ice: Fix and update driver version string Remove the "ice" prefix for the driver version string and bump version to 0.7.1-k. Signed-off-by: Anirudh Venkataramanan Tested-by: Tony Brelinski Signed-off-by: Jeff Kirsher commit 8d81fa55bac0c730d59e990db099ebecd82d7880 Author: Akeem G Abodunrin Date: Thu Aug 9 06:29:57 2018 -0700 ice: Introduce SERVICE_DIS flag and service routine functions This patch introduces SERVICE_DIS flag to use for stopping service task. This flag will be checked before scheduling new tasks. Also add new functions ice_service_task_stop to stop service task. Signed-off-by: Akeem G Abodunrin Signed-off-by: Anirudh Venkataramanan Tested-by: Tony Brelinski Signed-off-by: Jeff Kirsher commit 4f74dcc1b86d75d8ec5506195d6d892666f2285b Author: Brett Creeley Date: Thu Aug 9 06:29:56 2018 -0700 ice: Enable VSI Rx/Tx pruning only when VLAN 0 is active VLAN pruning is not valid when VLAN 0 is not active. If VLAN pruning is enabled and VLAN 0 is not active (8021q driver not loaded) then normal, non-VLAN, traffic will not pass. TX/RX VLAN pruning is enabled when the VLAN 0 is added to the active_vlan bitmap and it is disabled when VLAN 0 is removed from the active_vlan bitmap. So, only enable VLAN pruning when VLAN 0 is active. Setting RX VLAN pruning causes the switch to drop received VLAN packets when there are no matching VLAN ids in the associated VSI's switch filters. Setting TX pruning makes it so the switch will not send out any packets with VLAN tags that don't match the associated VSI's switch filters. With this patch, if the VF or PF tries to send a VLAN tagged packet with a VLAN tag that it does not have a pruning rule for it will trigger an MDD event. For example, if PF0 has VLAN10 and VLAN11 interfaces and scapy is used to send a packet with VLAN8 then the MDD is triggered. Also make ice_vsi_kill_vlan return a value which the caller can check before updating VLAN related data structures (counts, pruning bits, etc.). Signed-off-by: Brett Creeley Signed-off-by: Anirudh Venkataramanan Tested-by: Tony Brelinski Signed-off-by: Jeff Kirsher commit 5d585e1e756838d91144c3173323b96f5aa12874 Author: Rob Herring Date: Tue Aug 28 10:44:28 2018 -0500 ASoC: 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: Rob Herring Signed-off-by: Mark Brown commit 8b97ceb1dc0f29d6af0cd85983041a9fbac8e14c Author: Hieu Tran Date: Thu Aug 9 06:29:55 2018 -0700 ice: Enable firmware logging during device initialization. To enable FW logging, the "cq_en" and "uart_en" enable bits of the "fw_log" element in struct ice_hw need to set accordingly based on some user-provided parameters during driver loading. To select which FW log events to be emitted, the "cfg" elements of corresponding FW modules in the "evnts" array member of "fw_log" need to be configured. Signed-off-by: Hieu Tran Signed-off-by: Anirudh Venkataramanan Tested-by: Tony Brelinski Signed-off-by: Jeff Kirsher commit 6e2d6b2728fcb408eabd7991804f8cb33ff59f20 Merge: 6f0a256253f4 5b394b2ddf03 Author: Mark Brown Date: Tue Aug 28 19:03:57 2018 +0100 Merge tag 'v4.19-rc1' into asoc-4.19 Linux 4.19-rc1 commit b1edc14a3fbfe0154a2aecb8bb9775c3012cb6e2 Author: Md Fahad Iqbal Polash Date: Thu Aug 9 06:29:54 2018 -0700 ice: Implement ice_bridge_getlink and ice_bridge_setlink ice_bridge_getlink returns the current bridge mode using ndo_dflt_bridge_getlink and the mode parameter available in first_switch->bridge_mode. ice_bridge_setlink is invoked when the bridge mode needs to changed. The value to be changed to is available as a netlink message which is parsed in this function. If the mode has to be changed, switch_flags is set appropriately (set ALLOW_LB for VEB mode and clear it for VEPA mode) and ice_aq_update_vsi is called. Also change the unicast switch filter rules. Signed-off-by: Md Fahad Iqbal Polash Signed-off-by: Anirudh Venkataramanan Tested-by: Tony Brelinski Signed-off-by: Jeff Kirsher commit b3969fd727aa1f2ace4794f2a180f9769128027c Author: Sudheer Mogilappagari Date: Thu Aug 9 06:29:53 2018 -0700 ice: Add support for Tx hang, Tx timeout and malicious driver detection When a malicious operation is detected, the firmware triggers an interrupt, which is then picked up by the service task (specifically by ice_handle_mdd_event). A reset is scheduled if required. Tx hang detection works in a similar way, except the logic here monitors the VSI's Tx queues and tries to revive them if stalled. If the hang is not resolved, the kernel eventually calls ndo_tx_timeout, which is handled by ice_tx_timeout. Signed-off-by: Sudheer Mogilappagari Signed-off-by: Anirudh Venkataramanan Tested-by: Tony Brelinski Signed-off-by: Jeff Kirsher commit 4f36cb36c9d14340bb200d2ad9117b03ce992cfe Author: Bob Peterson Date: Thu Aug 16 10:32:13 2018 -0500 gfs2: Don't set GFS2_RDF_UPTODATE when the lvb is updated The GFS2_RDF_UPTODATE flag in the rgrp is used to determine when a rgrp buffer is valid. It's cleared when the glock is invalidated, signifying that the buffer data is now invalid. But before this patch, function update_rgrp_lvb was setting the flag when it determined it had a valid lvb. But that's an invalid assumption: just because you have a valid lvb doesn't mean you have valid buffers. After all, another node may have made the lvb valid, and this node just fetched it from the glock via dlm. Consider this scenario: 1. The file system is mounted with RGRPLVB option. 2. In gfs2_inplace_reserve it locks the rgrp glock EX, but thanks to GL_SKIP, it skips the gfs2_rgrp_bh_get. 3. Since loops == 0 and the allocation target (ap->target) is bigger than the largest known chunk of blocks in the rgrp (rs->rs_rbm.rgd->rd_extfail_pt) it skips that rgrp and bypasses the call to gfs2_rgrp_bh_get there as well. 4. update_rgrp_lvb sees the lvb MAGIC number is valid, so bypasses gfs2_rgrp_bh_get, but it still sets sets GFS2_RDF_UPTODATE due to this invalid assumption. 5. The next time update_rgrp_lvb is called, it sees the bit is set and just returns 0, assuming both the lvb and rgrp are both uptodate. But since this is a smaller allocation, or space has been freed by another node, thus adjusting the lvb values, it decides to use the rgrp for allocations, with invalid rd_free due to the fact it was never updated. This patch changes update_rgrp_lvb so it doesn't set the UPTODATE flag anymore. That way, it has no choice but to fetch the latest values. Signed-off-by: Bob Peterson commit 72244b6bc752b5c496f09de9a13c18adc314a53c Author: Bob Peterson Date: Wed Aug 15 12:09:49 2018 -0500 gfs2: improve debug information when lvb mismatches are found Before this patch, gfs2_rgrp_bh_get would check for lvb mismatches, but it wouldn't tell you what was actually wrong. This patch adds more information to help us debug it. It also makes rgrp consistency checks dump any bad rgrps, and the rgrp dump code dump any lvbs as well as the rgrp itself. Signed-off-by: Bob Peterson Acked-by: Steven Whitehouse commit f80eaa42107638684014f1f7c9d7bedda2b5e355 Author: Anirudh Venkataramanan Date: Thu Aug 9 06:29:52 2018 -0700 ice: Clean up register file This patch cleans up the existing register definitions. 1) Several instances of long defines names used in the BIT() macro were replaced to use the actual values they represent. As a result some defines for shifts (ending with _S) that were used only to create bitmasks were removed completely. 2) Apply more consistent tab spacing. Signed-off-by: Anirudh Venkataramanan Tested-by: Tony Brelinski Signed-off-by: Jeff Kirsher commit 48cb27f2fd18391056ea40cce5e33f1fd741679e Author: Chinh Cao Date: Thu Aug 9 06:29:51 2018 -0700 ice: Implement handlers for ethtool PHY/link operations This patch implements handlers for ethtool get_link_ksettings and set_link_ksettings. Helper functions use by these handlers are also introduced in this patch. Signed-off-by: Chinh Cao Signed-off-by: Anirudh Venkataramanan Tested-by: Tony Brelinski Signed-off-by: Jeff Kirsher commit 0f9d5027a7496c451737f0f549be083688a40549 Author: Anirudh Venkataramanan Date: Thu Aug 9 06:29:50 2018 -0700 ice: Refactor VSI allocation, deletion and rebuild flow This patch refactors aspects of the VSI allocation, deletion and rebuild flow. Some of the more noteworthy changes are described below. 1) On reset, all switch filters applied in the hardware are lost. In the rebuild flow, only MAC and broadcast filters are being restored. Instead, use a new function ice_replay_all_fltr to restore all the filters that were previously added. To do this, remove calls to ice_remove_vsi_fltr to prevent cleaning out the internal bookkeeping structures that ice_replay_all_fltr uses to replay filters. 2) Introduce a new state bit __ICE_PREPARED_FOR_RESET to distinguish the PF that requested the reset (and consequently prepared for it) from the rest of the PFs. These other PFs will prepare for reset only when they receive an interrupt from the firmware. 3) Use new functions ice_add_vsi and ice_free_vsi to create and destroy VSIs respectively. These functions accept a handle to uniquely identify a VSI. This same handle is required to rebuild the VSI post reset. To prevent confusion, the existing ice_vsi_add was renamed to ice_vsi_init. 4) Enhance ice_vsi_setup for the upcoming SR-IOV changes and expose a new wrapper function ice_pf_vsi_setup to create PF VSIs. Rework the error handling path in ice_setup_pf_sw. 5) Introduce a new function ice_vsi_release_all to release all PF VSIs. Signed-off-by: Anirudh Venkataramanan Tested-by: Tony Brelinski Signed-off-by: Jeff Kirsher commit 80d144c9ac82fd07436c02c830b2af03c471db8a Author: Anirudh Venkataramanan Date: Thu Aug 9 06:29:49 2018 -0700 ice: Refactor switch rule management structures and functions This patch is an adaptation of the work originally done by Grishma Kotecha that in summary refactors the switch filtering logic in the driver. More specifically, - Update the recipe structure to also store list of rules - Update the existing code for recipes like MAC, VLAN, ethtype etc to use list head that is attached to switch recipe structure - Add a common function to search for a rule entry and add a new rule entry. Update the code to use this new function. - Refactor the rem_handle_vsi_list function to simplify the logic CC: Shannon Nelson Signed-off-by: Anirudh Venkataramanan Tested-by: Tony Brelinski Signed-off-by: Jeff Kirsher commit 74118f7af092a4edc194573a8749f3843d280d3f Author: Zhenning Xiao Date: Thu Aug 9 06:29:48 2018 -0700 ice: Code optimization for ice_fill_sw_rule() Use the buffer in the s_rule structure directly instead of using a local array eth_hdr[DUMMY_ETH_HDR_LEN] Signed-off-by: Zhenning Xiao Signed-off-by: Anirudh Venkataramanan Tested-by: Tony Brelinski Signed-off-by: Jeff Kirsher commit fd2a981777d911b2e94cdec50779c85c58a0dec9 Author: Anirudh Venkataramanan Date: Thu Aug 9 06:29:47 2018 -0700 ice: Prevent control queue operations during reset Once reset is issued, the driver loses all control queue interfaces. Exercising control queue operations during reset is incorrect and may result in long timeouts. This patch introduces a new field 'reset_ongoing' in the hw structure. This is set to 1 by the core driver when it receives a reset interrupt. ice_sq_send_cmd checks reset_ongoing before actually issuing the control queue operation. If a reset is in progress, it returns a soft error code (ICE_ERR_RESET_PENDING) to the caller. The caller may or may not have to take any action based on this return. Once the driver knows that the reset is done, it has to set reset_ongoing back to 0. This will allow control queue operations to be posted to the hardware again. This "bail out" logic was specifically added to ice_sq_send_cmd (which is pretty low level function) so that we have one solution in one place that applies to all types of control queues. Signed-off-by: Anirudh Venkataramanan Tested-by: Tony Brelinski Signed-off-by: Jeff Kirsher commit ff2b13213a6a0baca105bc3bc724225f0adde1f8 Author: Dan Nowlin Date: Thu Aug 9 06:29:46 2018 -0700 ice: Update request resource command to latest specification Align Request Resource Ownership AQ command (0x0008) to the latest specification. This includes: - Correcting the resource IDs for the Global Cfg and Change locks. - new enum ICE_CHANGE_LOCK_RES_ID - new enum ICE_GLOBAL_CFG_LOCK_RES_ID - Altering the flow for Global Config Lock to allow only the first PF to download the package. Signed-off-by: Dan Nowlin Signed-off-by: Anirudh Venkataramanan Tested-by: Tony Brelinski Signed-off-by: Jeff Kirsher commit b36c598c999c628130f6743dc2362585360de65c Author: Anirudh Venkataramanan Date: Thu Aug 9 06:29:45 2018 -0700 ice: Updates to Tx scheduler code 1) The maximum device nodes is a global value and shared by the whole device. Add element AQ command would fail if there is no space to add new nodes so the check for max nodes isn't required. So remove ice_sched_get_num_nodes_per_layer and ice_sched_val_max_nodes. 2) In ice_sched_add_elems, set default node's CIR/EIR bandwidth weight. 3) Fix default scheduler topology buffer size as the firmware expects a 4KB buffer at all times, and will error out if one of any other size is provided. 4) In the latest spec, max children per node per layer is replaced by max sibling group size. Now it provides the max children of the below layer node, not the current layer node. 5) Fix some newline/whitespace issues for consistency. Signed-off-by: Anirudh Venkataramanan Tested-by: Tony Brelinski Signed-off-by: Jeff Kirsher commit bdb1922abd620d24715906bac4d119274d98f4c9 Author: Michel Dänzer Date: Tue Aug 28 11:26:17 2018 +0200 drm/amdgpu: Only retrieve GPU address of GART table after pinning it Doing it earlier hits a WARN_ON_ONCE in amdgpu_bo_gpu_offset. Fixes: "drm/amdgpu: remove gart.table_addr" Reviewed-by: Christian König Signed-off-by: Michel Dänzer Signed-off-by: Alex Deucher commit 7ef0b435457a797712119c0151e144744bc45ded Author: Emily Deng Date: Tue Aug 28 20:52:40 2018 +0800 drm/amdgpu: Need to set moved to true when evict bo Fix the VMC page fault when the running sequence is as below: 1.amdgpu_gem_create_ioctl 2.ttm_bo_swapout->amdgpu_vm_bo_invalidate, as not called amdgpu_vm_bo_base_init, so won't called list_add_tail(&base->bo_list, &bo->va). Even the bo was evicted, it won't set the bo_base->moved. 3.drm_gem_open_ioctl->amdgpu_vm_bo_base_init, here only called list_move_tail(&base->vm_status, &vm->evicted), but not set the bo_base->moved. 4.amdgpu_vm_bo_map->amdgpu_vm_bo_insert_map, as the bo_base->moved is not set true, the function amdgpu_vm_bo_insert_map will call list_move(&bo_va->base.vm_status, &vm->moved) 5.amdgpu_cs_ioctl won't validate the swapout bo, as it is only in the moved list, not in the evict list. So VMC page fault occurs. Signed-off-by: Emily Deng Reviewed-by: Christian König Signed-off-by: Alex Deucher commit e78196444b43caed136bf424b09352d8433cdb95 Author: Yintian Tao Date: Wed Aug 22 17:08:13 2018 +0800 drm/amdgpu: move full access into amdgpu_device_ip_suspend It will be more safe to make full-acess include both phase1 and phase2. Then accessing special registeris wherever at phase1 or phase2 will not block any shutdown and suspend process under virtualization. Signed-off-by: Yintian Tao Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 0c79c0bb872e393d507fb7a0835b2ec124f8266b Author: Christian König Date: Mon Aug 27 15:43:37 2018 +0200 drm/amdgpu: remove extra newline when printing VM faults Looks like a copy&paste error to me. Signed-off-by: Christian König Reviewed-by: Alex Deucher Reviewed-by: Junwei Zhang Signed-off-by: Alex Deucher commit 9475e90f024a622ecee27675b50f5263029bb991 Author: Rob Herring Date: Mon Aug 27 20:52:05 2018 -0500 MIPS: 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: Rob Herring Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/20315/ Cc: Ralf Baechle Cc: James Hogan Cc: John Crispin Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org commit 521fb7d021f7952aa3030e56c19edf342309cf9f Author: Amber Lin Date: Thu Aug 23 10:52:34 2018 -0400 drm/amdgpu: Move KFD parameters to amdgpu (v3) After merging KFD into amdgpu, move module parameters defined in KFD to amdgpu_drv.c, where other module parameters are declared. v2: add kernel-doc comments v3: rebase and fix parameter variable name (Alex) Signed-off-by: Amber Lin Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 33f2ac5451a62f4e441454522b0588790144a717 Author: Huacai Chen Date: Thu Aug 23 13:33:10 2018 +0800 MIPS: Loongon64: DMA functions cleanup Split the common dma.c which shared by Loongson-2E and Loongson-2F, since the code in 'common' directory is assumed be shared by all 64bit Loongson platforms (but Loongson-3 doesn't use it now). By the way, Loongson-2E and Loongson-2F have already dropped 32bit kernel support, so CONFIG_64BIT isn't needed. Signed-off-by: Huacai Chen Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/20302/ Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@linux-mips.org Cc: Fuxin Zhang Cc: Zhangjin Wu Cc: Huacai Chen commit 9cac6a9b629739537d7792898cc0d401ae020205 Merge: 050cdc6c9501 34d5629d2ca8 Author: Kalle Valo Date: Tue Aug 28 19:39:22 2018 +0300 Merge ath-next from git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git ath.git patches for 4.20. Major changes: ath10k * limit available channels via DT ieee80211-freq-limit wil6210 * add 802.11r Fast Roaming support for AP and station modes * add support for channel 4 commit 82b7b619c44c5cd5b92134cbb58bd62558079ba4 Author: Amber Lin Date: Wed Aug 22 17:05:33 2018 -0400 drm/amdgpu: Remove CONFIG_HSA_AMD_MODULE After amdkfd is merged to amdgpu, CONFIG_HSA_AMD_MODULE no longer exists. Signed-off-by: Amber Lin Acked-by: Christian König Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 04d5e2765802241b54ee93d1e655123c39fa7385 Author: Amber Lin Date: Wed Aug 22 16:48:50 2018 -0400 drm/amdgpu: Merge amdkfd into amdgpu Since KFD is only supported by single GPU driver, it makes sense to merge amdgpu and amdkfd into one module. This patch is the initial step: merge Kconfig and Makefile. v2: also remove kfd from drm Kconfig Signed-off-by: Amber Lin Acked-by: Christian König Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 22ef683b48182f4d6125a2fb2725eb8a141514ff Author: Anirudh Venkataramanan Date: Thu Aug 9 06:29:44 2018 -0700 ice: Rework flex descriptor programming The driver can support two flex descriptor profiles, ICE_RXDID_FLEX_NIC and ICE_RXDID_FLEX_NIC_2. This patch reworks the current flex programming logic to add support for the latter profile. Signed-off-by: Anirudh Venkataramanan Tested-by: Tony Brelinski Signed-off-by: Jeff Kirsher commit ed11e4158451bf69e1e34b44797d6989d84db60f Author: Ville Syrjälä Date: Tue Aug 28 16:37:23 2018 +0300 drm/i915: Fix gtt_view asserts gcc is too smart for us and doesn't evaluate BUILD_BUG_ON()s in unused static inlines. Collect them up in one static inline and actually call it to make sure gcc sees it. Cc: Chris Wilson Suggested-by: Chris Wilson Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180828133723.18505-1-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson commit 2ce711f965d9406dd674a0c0146e5100baf40673 Author: Rob Herring Date: Mon Aug 27 20:52:10 2018 -0500 ata: ahci: 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: Hans de Goede Cc: Jens Axboe Cc: linux-ide@vger.kernel.org Signed-off-by: Rob Herring Signed-off-by: Jens Axboe commit 925c5c32f31d3bf931ee7d5b24561bdcae25c4e7 Author: Kunihiko Hayashi Date: Thu Jul 26 16:10:00 2018 +0900 arm64: dts: uniphier: add SPI node for LD20, LD11 and PXs3 Add nodes of SPI controller for UniPhier SoCs. Signed-off-by: Kunihiko Hayashi Signed-off-by: Masahiro Yamada commit 92fa4f4cc2cdf70a7db650c09fd6ee5598ebe52b Author: Kunihiko Hayashi Date: Thu Jul 26 16:09:59 2018 +0900 ARM: dts: uniphier: add SPI node for UniPhier 32bit SoCs Add nodes of SPI controller for LD4, Pro4, sLD8, Pro5 and PXs2. Signed-off-by: Kunihiko Hayashi Signed-off-by: Masahiro Yamada commit dc0a2098cc2a673b9315d1ac3f577fa53dd5ea74 Author: Kunihiko Hayashi Date: Thu Jul 26 16:09:58 2018 +0900 ARM: dts: uniphier: add SPI pin-mux node This commit adds pin-mux nodes for SPI controller. Signed-off-by: Kunihiko Hayashi Signed-off-by: Masahiro Yamada commit bae120f8acb2b6082c34abc1a4c1a3716febb31d Author: Masahiro Yamada Date: Fri Jul 20 17:50:45 2018 +0900 arm64: uniphier: dts: add more clocks to Denali NAND controller node Catch up with the new binding of the Denali IP where three clocks, "nand", "nand_x", "ecc" are required. For UniPhier SoCs, the "nand_x" and "ecc" are tied up because they are both 200MHz. Signed-off-by: Masahiro Yamada commit 007a93891dca11dc6f62866ab0c1e25a0db6422c Author: Masahiro Yamada Date: Fri Jul 20 17:50:44 2018 +0900 ARM: uniphier: dts: add more clocks to Denali NAND controller node Catch up with the new binding of the Denali IP where three clocks, "nand", "nand_x", "ecc" are required. For UniPhier SoCs, the "nand_x" and "ecc" are tied up because they are both 200MHz. Signed-off-by: Masahiro Yamada commit 1895759ee932e47f48b5e87baadc449ffd0853f1 Author: Rodrigo Vivi Date: Mon Aug 27 15:30:21 2018 -0700 drm/i915: Use dp_to_i915 on intel_psr.c Now that we have a generic caller let's simplify it and clean up the intel_psr.c code a bit. Cc: Dhinakaran Pandiyan Signed-off-by: Rodrigo Vivi Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180827223021.7145-2-rodrigo.vivi@intel.com commit de25eb7f3075f6fb02962526664699cdbdc26db4 Author: Rodrigo Vivi Date: Mon Aug 27 15:30:20 2018 -0700 drm/i915: introduce dp_to_i915() helper No functional change. But let's get first i915 pointer directly from intel_dp so we can clean up a lot of code later. Signed-off-by: Rodrigo Vivi Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180827223021.7145-1-rodrigo.vivi@intel.com commit 34d5629d2ca89d847b7040762b87964c696c14da Author: Sven Eckelmann Date: Fri Aug 24 15:04:59 2018 +0300 ath10k: limit available channels via DT ieee80211-freq-limit Tri-band devices (1x 2.4GHz + 2x 5GHz) often incorporate special filters in the RX and TX path. These filtered channel can in theory still be used by the hardware but the signal strength is reduced so much that it makes no sense. There is already a DT property to limit the available channels but ath10k has to manually call this functionality to limit the currrently set wiphy channels further. Signed-off-by: Sven Eckelmann Signed-off-by: Kalle Valo commit 4405b632e3da839defec966e4b0be44d0c5e3102 Author: Dedy Lansky Date: Thu Aug 23 14:47:13 2018 +0300 wil6210: fix invalid memory access for rx_buff_mgmt debugfs Check rx_buff_mgmt is allocated before accessing its internal fields. Signed-off-by: Dedy Lansky Signed-off-by: Maya Erez Signed-off-by: Kalle Valo commit b9010f105f21788b2dbe0e9599677a27247a9092 Author: Ahmad Masri Date: Thu Aug 23 14:47:12 2018 +0300 wil6210: add FT roam support for AP and station This feature is needed for enterprise APs and clients to enable fast roaming as defined in 802.11r between APs in the same ESS. On AP side, this feature is supported only when disable_ap_sme is enabled. Signed-off-by: Ahmad Masri Signed-off-by: Maya Erez Signed-off-by: Kalle Valo commit 84f16fbb62384fb209cd35741d94eb00b5ca2746 Author: Maya Erez Date: Thu Aug 23 14:47:11 2018 +0300 wil6210: fix RX buffers release and unmap RX SKBs are released in both wil6210 rmmod and RX handle. As there is no lock to protect the buffers DMA unmap, the SKB pointer in buff_arr is used to check if the buffer memory was already released. Setting wil->rx_buff_mgmt.buff_arr[buff_id].skb to NULL before the DMA memory unmap will prevent duplicate unmapping of the same memory. Move the buffer ID to the free list also in case the SKB is NULL. Signed-off-by: Maya Erez Signed-off-by: Kalle Valo commit df2b53884a5a454bf441ca78e5b57307262c73f4 Author: Maya Erez Date: Thu Aug 23 14:47:10 2018 +0300 wil6210: prevent usage of tx ring 0 for eDMA In enhanced DMA ring 0 is used for RX ring, hence TX ring 0 is an unused element in ring_tx and ring2cid_tid arrays. Initialize ring2cid_tid CID to WIL6210_MAX_CID to prevent a false match of CID 0. Go over the ring_tx and ring2cid_tid from wil_get_min_tx_ring_id and on to prevent access to index 0 in eDMA. Signed-off-by: Maya Erez Signed-off-by: Kalle Valo commit 686ab4f5bd8d696bfeef55ef761c7f7a6ad1b3ec Author: Maya Erez Date: Thu Aug 23 14:47:09 2018 +0300 wil6210: allocate rx reorder buffer only if rx reorder is enabled wil_addba_rx_request allocates the rx reorder buffer regardless of use_rx_hw_reordering settings. Fix this by checking wil->use_rx_hw_reordering before allocating the reorder buffer. Signed-off-by: Maya Erez Signed-off-by: Kalle Valo commit 596bdbcce90fa93f43ebcb99cefea34bd2e27707 Author: Maya Erez Date: Thu Aug 23 14:47:08 2018 +0300 wil6210: set edma variables only for Talyn-MB devices use_rx_hw_reordering is already set to true in wil_set_capabilities for Talyn-MB devices. Remove its setting from wil_priv_init to prevent its activation for older chips. Similarly, move the setting of use_compressed_rx_status to wil_set_capabilities. Signed-off-by: Maya Erez Signed-off-by: Kalle Valo commit 9a65064abdf82934e0ed4744125f9f466f421f57 Author: Dedy Lansky Date: Thu Aug 23 14:47:07 2018 +0300 wil6210: drop Rx multicast packets that are looped-back to STA Delivering a looped-back multicast packet to network stack can cause higher layer protocols to fail like for example IPv6 DAD. In STA mode, upon receiving Rx multicast packet, check if the source MAC address is equal to our own MAC address and if so drop the packet. Signed-off-by: Dedy Lansky Signed-off-by: Maya Erez Signed-off-by: Kalle Valo commit 22b9610ec68716d664aac99cee6e65464cc6c922 Author: Alexei Avshalom Lazar Date: Thu Aug 23 14:47:06 2018 +0300 wil6210: add support for channel 4 wil6210 supports channels 1-3 of the 60GHz band. New FW added support for channel 4. Add support for channel 4 also in wil6210 driver. Signed-off-by: Alexei Avshalom Lazar Signed-off-by: Maya Erez Signed-off-by: Kalle Valo commit 32dcfe8316cdbd885542967c0c85f5b9de78874b Author: Karthick Gopalasubramanian Date: Thu Aug 23 14:47:05 2018 +0300 wil6210: remove reset file from debugfs Reset file is not used and may cause race conditions with operational driver if used. Signed-off-by: Karthick Gopalasubramanian Signed-off-by: Maya Erez Signed-off-by: Kalle Valo commit 4ac1f003e72ad46b0dfc22954bf012adb809d08e Author: Varsha Rao Date: Wed Jul 25 20:49:48 2018 +0200 ath6kl: Remove unnecessary parentheses Remove extra parentheses to fix the clang warning of extraneous parentheses. Signed-off-by: Varsha Rao Signed-off-by: Kalle Valo commit d9c52fd17cb483bd8a470398afcb79f86c1b77c8 Author: Felix Fietkau Date: Mon Aug 20 11:37:51 2018 +0200 ath9k: fix tx99 with monitor mode interface Tx99 is typically configured via a monitor mode interface, which does not get added to the driver as a vif. Since the code currently expects a configured virtual interface for tx99, enabling tx99 via debugfs fails. Since the vif is not needed anyway, remove all checks for it. Signed-off-by: Felix Fietkau [kvalo@codeaurora.org: s/CPTCFG/CONFIG/] Signed-off-by: Kalle Valo commit a2f73a167dc1d4940c59099c18d23c15ac9aee71 Author: Colin Ian King Date: Thu Aug 16 13:50:30 2018 +0100 ath9k: remove unused array firstep_table Array firstep_table is being assigned but is never used hence it is redundant and can be removed. Cleans up clang warning: warning: 'firstep_table' defined but not used [-Wunused-const-variable=] Signed-off-by: Colin Ian King Signed-off-by: Kalle Valo commit bf05e0fe7da443a518db883112d4485ae65ba9d7 Author: Varsha Rao Date: Wed Jul 25 20:53:03 2018 +0200 ath9k: Remove unnecessary parentheses Remove extra parentheses to fix the clang warning of extraneous parentheses. Signed-off-by: Varsha Rao Signed-off-by: Kalle Valo commit 06ae8dc00433797555481ee3391cab6acaf1a5db Author: Gustavo A. R. Silva Date: Thu Aug 23 20:12:47 2018 -0500 ath10k: 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 Reviewed-by: Kees Cook Signed-off-by: Kalle Valo commit a9911937e7d332761e8c4fcbc7ba0426bdc3956f Author: Martin Willi Date: Wed Aug 22 09:39:52 2018 +0200 ath10k: schedule hardware restart if WMI command times out When running in AP mode, ath10k sometimes suffers from TX credit starvation. The issue is hard to reproduce and shows up once in a few days, but has been repeatedly seen with QCA9882 and a large range of firmwares, including 10.2.4.70.67. Once the module is in this state, TX credits are never replenished, which results in "SWBA overrun" errors, as no beacons can be sent. Even worse, WMI commands run in a timeout while holding the conf mutex for three seconds each, making any further operations slow and the whole system unresponsive. The firmware/driver never recovers from that state automatically, and triggering TX flush or warm restarts won't work over WMI. So issue a hardware restart if a WMI command times out due to missing TX credits. This implies a connectivity outage of about 1.4s in AP mode, but brings back the interface and the whole system to a usable state. WMI command timeouts have not been seen in absent of this specific issue, so taking such drastic actions seems legitimate. Signed-off-by: Martin Willi Signed-off-by: Kalle Valo commit 58da3b42307061b71f2dcce2bd1185d578a3aa53 Author: Rakesh Pillai Date: Mon Aug 6 20:18:08 2018 +0530 ath10k: skip resetting rx filter for WCN3990 WCN3990 has the MAC_PCU_ADDR1 configured properly and hence it will not send spurious ack frames during boot up. Hence the reset_rx_filter workaround is not needed for WCN3990. Add a hw_param to indicate if hardware rx filter reset is needed and skip the reset_rx_filter for WCN3990. Tested HW: WCN3990 Tested FW: WLAN.HL.2.0-01188-QCAHLSWMTPLZ-1 Signed-off-by: Rakesh Pillai Signed-off-by: Kalle Valo commit 5382bed38f09636330fd119ca2c83d738a551540 Author: Daniele Ceraolo Spurio Date: Mon Aug 27 15:36:14 2018 -0700 drm/i915/selftests: ring all doorbells in igt_guc_doorbells We currently verify that all doorbells can be registered with GuC and HW but don't check that all works as expected after a db ring. Do a nop ring of all doorbells to make sure we haven't misprogrammed any WQ or stage descriptor data. This will also help validating upcoming changes in the db programming flow. Cc: Michel Thierry Cc: Michal Wajdeczko Signed-off-by: Daniele Ceraolo Spurio Reviewed-by: Michel Thierry Acked-by: Katarzyna Dec Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20180827223614.22789-1-daniele.ceraolospurio@intel.com commit 87246f7fd572f9c3db752708730d68cc9eb08d72 Author: Takashi Iwai Date: Wed Aug 8 22:38:36 2018 +0200 ALSA: intel_hdmi: Use the new non-cached allocation The HDMI LPE audio driver requires the non-cached page allocations for its buffers. With the recent support of SNDRV_DMA_TYPE_DEV_UC type, we can reduce lots of codes in the driver side and let the memalloc core doing it properly. Signed-off-by: Takashi Iwai commit 4985ddbf1edb06f0dc4ae22e9886bde267925e6c Author: Takashi Iwai Date: Wed Aug 8 22:31:52 2018 +0200 ALSA: intel8x0: Use the new non-cached allocation for 440MX workaround intel8x0 driver requires the non-cached pages for 440MX workaround, and this can be implemented more easily with the new memalloc type, SNDRV_DMA_TYPE_DEV_UC. This allows us to reduce lots of code. Signed-off-by: Takashi Iwai commit 193c7e14762a58003af7914183f9b963c0267788 Author: Takashi Iwai Date: Wed Aug 8 17:12:58 2018 +0200 ALSA: hda: Remove substream allocation/free ops Since we dropped the memory page fiddling in the own allocators in hda_intel.c, the substream allocation and free ops in both hda_intel.c and hda_tegra.c became nothing but the simple calls of the standard snd_pcm_lib helpers. As both are identical, there is no longer need for indirect calls via ops; it's a good opportunity for removing ops and simplifying the codes. Signed-off-by: Takashi Iwai commit fc478143693d8750dca5e35d03d497bdd0202b3f Author: Takashi Iwai Date: Wed Aug 8 22:23:30 2018 +0200 ALSA: hda: Use new non-cached allocation for non-snoop mode Now the ALSA memory allocator helper supports the new non-cached pages, let's use the new type, SNDRV_DMA_TYPE_DEV_UC_SG, for HD-audio driver. This allows us to reduce lots of codes. As another positive side-effect by this patch, the long-standing issue with non-snoop mode playing in the non-mmap mode is fixed. The core memalloc helper does the proper pgprot setup for non-cached pages for vmap(), which was missing in the past. Reported-and-tested-by: Hans Hu Signed-off-by: Takashi Iwai commit 78c9be61c3a5cd9e2439fd27a5ffad73a81958c7 Author: Takashi Iwai Date: Sat Aug 11 23:33:34 2018 +0200 ALSA: hda: Check the non-cached stream buffers more explicitly Introduce a new flag, uc_buffer, to indicate that the controller requires the non-cached pages for stream buffers, either as a chip-specific requirement or specified via snoop=0 option. This improves the code-readability. Also, this patch fixes the incorrect behavior for C-Media chip where the stream buffers were never handled as non-cached due to the check of driver_type even if you pass snoop=0 option. Signed-off-by: Takashi Iwai commit 42e748a0b3251cca0de2c269ca106884907eb289 Author: Takashi Iwai Date: Wed Aug 8 17:01:00 2018 +0200 ALSA: memalloc: Add non-cached buffer type In some cases (mainly for x86), we need the DMA coherent buffer with non-cached pages. Although this has been done in each driver side like HD-audio and intel8x0, it can be done cleaner in the core memory allocator. This patch adds the new types, SNDRV_DMA_TYPE_DEV_UC and SNDRV_DMA_TYPE_DEV_UC_SG, for allocating such non-cached buffer pages. On non-x86 architectures, they work as same as the standard SNDRV_DMA_TYPE_DEV and *_SG. One additional change by this move is that we can assure to pass the non-cached pgprot to the vmapped buffer, too. It eventually fixes the case like non-snoop mode without mmap access on HD-audio. Signed-off-by: Takashi Iwai commit 28f3f4f685d7d7226ba4ed4f78e04c75dd3a5b27 Author: Takashi Iwai Date: Fri Aug 10 14:43:37 2018 +0200 ALSA: memalloc: Simplify snd_malloc_dev_pages() calls snd_malloc_dev_pages() and snd_free_dev_pages() are local functions and the parameters passed there are all contained in snd_dma_buffer object. As a code-simplification, pass snd_dma_buffer object and assign the address there like other allocators do (except for snd_malloc_pages() which is called from outside, hence we can't change easily). Only code refactoring, no functional changes. Signed-off-by: Takashi Iwai commit 03486830c577d3fe49c1f2c316414552a549ff00 Author: Takashi Iwai Date: Wed Aug 8 16:56:46 2018 +0200 ALSA: memalloc: Don't align the size to power-of-two The size passed to dma_alloc_coherent() doesn't have to be aligned with power-of-two, rather it should be the raw size. As a minor optimization, remove the size adjustment in the current code. Signed-off-by: Takashi Iwai commit 71f6fa90a353605bf25c36417c9ae529ac1a9a8d Author: Song, Hongyan Date: Fri Aug 3 14:45:59 2018 +0800 HID: increase maximum global item tag report size to 256 The maximum globale report size has changed from 32->...->96->128 in the past years. With the development usage of HID, the report_size max value 128 cannot satisfy all requirements. There are applications need to expose intrinsic metadata to camera stabilizing applications such as 3DFE application. 3DFE intrinsic is designed to express environmental information about sensor that may dynamically change while the sensor is running (such data include noise spectral density, bias standard deviation) A sensor data field is SENSOR_VALUE_PAIR that consists of a PROPERTYKEY and PROPVARIANT pair. It need to report a unique PROPERTYKEY for each data field. Take “Noise Spectral Density” as an example, it report count will be defined as below: "Size of Property key GUID(16 Byte) + property key index(4 Byte) + size of Noise Spectral Density value(4 Byte)" In this case, the data report max is totally 192(24Byte), which is larger than 128, while max size 128 blocked it as illegal length. So increase the report size to satisfy it and more demands in the future. Signed-off-by: Song Hongyan Signed-off-by: Jiri Kosina commit b8e131542b47b81236ecf6768c923128e1f5db6e Author: Takashi Iwai Date: Tue Aug 28 12:49:43 2018 +0200 ALSA: seq: Do error checks at creating system ports snd_seq_system_client_init() doesn't check the errors returned from its port creations. Let's do it properly and handle the error paths. Signed-off-by: Takashi Iwai commit c4f971240719a73b4992136ce6d6c6a0badceba6 Author: Peter Rosin Date: Tue Aug 28 11:48:44 2018 +0200 ARM: dts: at91: nattis: describe the lvds panel Make the DT usable with the panel-lvds driver. Signed-off-by: Peter Rosin Signed-off-by: Alexandre Belloni commit 9cb6927680b05105c8e40e9a9cb069dd3638aba5 Author: Peter Rosin Date: Tue Aug 28 11:48:43 2018 +0200 ARM: dts: at91: nattis: move pinctrls for the lvds chip to the lvds node The atmel hlcdc controller has nothing to do with these pins, so move them to where they belong. Signed-off-by: Peter Rosin Signed-off-by: Alexandre Belloni commit 9a91c0c88ad26e076aad9a75f6ea1213538d0e8c Author: Peter Rosin Date: Tue Aug 28 11:48:42 2018 +0200 ARM: dts: at91: nattis: state the actual lvds-encoder chip Just to be explicit. Signed-off-by: Peter Rosin Signed-off-by: Alexandre Belloni commit f52eb2067929d533babe106fbc131c88db3eff3d Author: Peter Rosin Date: Tue Aug 28 11:48:41 2018 +0200 ARM: dts: at91: nattis: make the SD-card slot work The cd-gpios signal is assumed active-low by the driver, and the cd-inverted property is needed if it is, in fact, active-high. Fix this oversight. Fixes: 0e4323899973 ("ARM: dts: at91: add devicetree for the Axentia Nattis with Natte power") Signed-off-by: Peter Rosin Signed-off-by: Alexandre Belloni commit 29feb2c960ab32fc24249443d4434194ce96f083 Author: Peter Rosin Date: Tue Aug 28 11:48:40 2018 +0200 ARM: dts: at91: nattis: set the PRLUD and HIPOW signals low AT91_PINCTRL_OUTPUT_VAL(0) without AT91_PINCTRL_OUTPUT is a no-op, so make sure the pins really output a zero. Fixes: 0e4323899973 ("ARM: dts: at91: add devicetree for the Axentia Nattis with Natte power") Signed-off-by: Peter Rosin Signed-off-by: Alexandre Belloni commit 7a7dfc4770c7904062186ff480af59a68c858ca0 Author: Hoan Nguyen An Date: Tue Aug 28 13:37:19 2018 +0900 pinctrl: sh-pfc: r8a77965: Add Audio SSI pin support Add Audio SSI pin support for r8a77965. Signed-off-by: Hoan Nguyen An Signed-off-by: Geert Uytterhoeven commit ada9a3d98facdc0489de52aa24fd8630ba2ec847 Author: Hoan Nguyen An Date: Tue Aug 28 13:37:18 2018 +0900 pinctrl: sh-pfc: r8a77965: Add Audio clock pin support Add Audio clock pin support for r8a77965. Signed-off-by: Hoan Nguyen An Signed-off-by: Geert Uytterhoeven commit 91d627a779a16a247f7da30a6538bccd30804b2b Author: Biju Das Date: Mon Aug 13 14:52:32 2018 +0100 pinctrl: sh-pfc: r8a7796: Add R8A774A1 PFC support Renesas RZ/G2M (r8a774a1) is pin compatible with R-Car M3-W (r8a7796), however it doesn't have several automotive specific peripherals. Add an r8a7796 specific pin groups/functions along with common pin groups/functions for supporting both r8a7796 and r8a774a1 SoCs. Signed-off-by: Biju Das Reviewed-by: Fabrizio Castro Signed-off-by: Geert Uytterhoeven commit 8f9a1acd8c8b8e6d980bca02fd55ee9867792609 Author: Biju Das Date: Mon Aug 13 14:52:31 2018 +0100 dt-bindings: pinctrl: sh-pfc: Document r8a774a1 PFC support Document PFC support for the R8A774A1 SoC. Signed-off-by: Biju Das Reviewed-by: Fabrizio Castro Reviewed-by: Rob Herring Reviewed-by: Simon Horman Signed-off-by: Geert Uytterhoeven commit 951ae7cb068ffdc53afe6cb532aa5a3f215beaa2 Author: Takeshi Kihara Date: Mon Jul 30 20:47:58 2018 +0900 pinctrl: sh-pfc: r8a77990: Add PWM pins, groups and functions This patch adds PWM{0,1,2,3,4,5,6} pins, groups and functions to the R8A77990 SoC. Signed-off-by: Takeshi Kihara Signed-off-by: Yoshihiro Shimoda Reviewed-by: Simon Horman Signed-off-by: Geert Uytterhoeven commit 491e9f585c97c857c52669244c2263cdc5e3e645 Author: Biju Das Date: Fri Jul 27 10:22:02 2018 +0100 pinctrl: sh-pfc: r8a77470: Add EtherAVB pin groups Add EtherAVB groups and functions definitions for R8A77470 SoC. Signed-off-by: Biju Das Reviewed-by: Fabrizio Castro Reviewed-by: Simon Horman Signed-off-by: Geert Uytterhoeven commit 9cf0a0b4b64ae103cf0e7dfaa72b44ecda24c0eb Author: Alexei Avshalom Lazar Date: Mon Aug 13 15:33:00 2018 +0300 cfg80211: Add support for 60GHz band channels 5 and 6 The current support in the 60GHz band is for channels 1-4. Add support for channels 5 and 6. This requires enlarging ieee80211_channel.center_freq from u16 to u32. Signed-off-by: Alexei Avshalom Lazar Signed-off-by: Johannes Berg commit 21a5d4c3a45ca608477a083096cfbce76e449a0c Author: Manikanta Pubbisetty Date: Wed Jul 11 00:12:53 2018 +0530 mac80211: add stop/start logic for software TXQs Sometimes, it is required to stop the transmissions momentarily and resume it later; stopping the txqs becomes very critical in scenarios where the packet transmission has to be ceased completely. For example, during the hardware restart, during off channel operations, when initiating CSA(upon detecting a radar on the DFS channel), etc. The TX queue stop/start logic in mac80211 works well in stopping the TX when drivers make use of netdev queues, i.e, when Qdiscs in network layer take care of traffic scheduling. Since the devices implementing wake_tx_queue can run without Qdiscs, packets will be handed to mac80211 directly without queueing them in the netdev queues. Also, mac80211 does not invoke any of the netif_stop_*/netif_wake_* APIs if wake_tx_queue is implemented. Since the queues are not stopped in this case, transmissions can continue and this will impact negatively on the operation of the wireless device. For example, During hardware restart, we stop the netdev queues so that packets are not sent to the driver. Since ath10k implements wake_tx_queue, TX queues will not be stopped and packets might reach the hardware while it is restarting; this can make hardware unresponsive and the only possible option for recovery is to reboot the entire system. There is another problem to this, it is observed that the packets were sent on the DFS channel for a prolonged duration after radar detection impacting the channel closing time. We can still invoke netif stop/wake APIs when wake_tx_queue is implemented but this could lead to packet drops in network layer; adding stop/start logic for software TXQs in mac80211 instead makes more sense; the change proposed adds the same in mac80211. Signed-off-by: Manikanta Pubbisetty Signed-off-by: Johannes Berg commit 7417844b63d4b0dc8ab23f88259bf95de7d09b57 Author: Rajeev Kumar Sirasanagandla Date: Tue Jul 10 18:46:13 2018 +0530 cfg80211: Avoid regulatory restore when COUNTRY_IE_IGNORE is set When REGULATORY_COUNTRY_IE_IGNORE is set, __reg_process_hint_country_ie() ignores the country code change request from __cfg80211_connect_result() via regulatory_hint_country_ie(). After Disconnect, similar to above, country code should not be reset to world when country IE ignore is set. But this is violated and restore of regulatory settings is invoked by cfg80211_disconnect_work via regulatory_hint_disconnect(). To address this, avoid regulatory restore from regulatory_hint_disconnect() when COUNTRY_IE_IGNORE is set. Note: Currently, restore_regulatory_settings() takes care of clearing beacon hints. But in the proposed change, regulatory restore is avoided. Therefore, explicitly clear beacon hints when DISABLE_BEACON_HINTS is not set. Signed-off-by: Rajeev Kumar Sirasanagandla Signed-off-by: Johannes Berg commit 30ca1aa536211f5ac3de0173513a7a99a98a97f3 Author: Dedy Lansky Date: Sun Jul 29 14:59:16 2018 +0300 cfg80211/mac80211: make ieee80211_send_layer2_update a public function Make ieee80211_send_layer2_update() a common function so other drivers can re-use it. Signed-off-by: Dedy Lansky Signed-off-by: Johannes Berg commit f404c3ecc401b3617c454c06a3d36a43a01f1aaf Author: Richard Guy Briggs Date: Mon Jul 23 15:41:38 2018 -0400 rfkill: fix spelling mistake contidion to condition This came about while trying to determine if there would be any pattern match on contid, a new audit container identifier internal variable. This was the only one. Signed-off-by: Richard Guy Briggs Signed-off-by: Johannes Berg commit bc7133cef81283d48a426604ef4af1507e2b20d9 Author: Hoan Nguyen An Date: Fri Aug 24 13:52:29 2018 +0900 clk: renesas: r8a77965: Add FDP clock This patch adds FDP1-0 clock to the R8A77965 SoC. Signed-off-by: Hoan Nguyen An Reviewed-by: Laurent Pinchart Signed-off-by: Geert Uytterhoeven commit c4f1957e14444e444b35418e85069b7ab65465a5 Author: Dan Carpenter Date: Tue Aug 28 11:46:34 2018 +0300 ALSA: seq: add error check in snd_seq_system_client_init() Static checkers complain that snd_seq_create_kernel_client() can return -EBUSY here so we need to have some error handling. Signed-off-by: Dan Carpenter Signed-off-by: Takashi Iwai commit 5ab64902b5f9f800fe677759b1b6ed1f5f749f62 Author: Rob Herring Date: Mon Aug 27 20:52:17 2018 -0500 dmaengine: 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: Rob Herring Signed-off-by: Vinod Koul commit c8a54c0c9a7dbb8b99851e3a9cb2dacabf3b80c6 Author: Rob Herring Date: Mon Aug 27 20:52:43 2018 -0500 rpmsg: 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: Ohad Ben-Cohen Cc: Bjorn Andersson Cc: linux-remoteproc@vger.kernel.org Signed-off-by: Rob Herring Signed-off-by: Bjorn Andersson commit 2e464ff0a9b1ab0fbb56e2ca8b1f5ff8c9f4e02f Author: Andy Shevchenko Date: Mon Aug 27 18:35:57 2018 +0300 extcon: int3496: Convert to use SPDX identifier Convert driver to use SPDX identifier. While here, fix MODULE_LICENSE() string to be the same as license text states. Signed-off-by: Andy Shevchenko Signed-off-by: Chanwoo Choi commit 900ed55571941c5b61869954dc96e082e2ded78d Author: Andy Shevchenko Date: Mon Aug 27 18:35:56 2018 +0300 extcon: cht-wc: Convert to use SPDX identifier Convert driver to use SPDX identifier. Signed-off-by: Andy Shevchenko Signed-off-by: Chanwoo Choi commit a4722503fadf0ed6219153da7ed6fa6cb4da98ec Author: Andy Shevchenko Date: Mon Aug 27 18:35:55 2018 +0300 extcon: cht-wc: Correct USBID bit field handling USBID is 2-bit bit field according to specification. Make it clear. No functional change intended. Signed-off-by: Andy Shevchenko Signed-off-by: Chanwoo Choi commit 001d3eccf9fc9b598b155f94b5f727ee825252d9 Author: Andy Shevchenko Date: Mon Aug 27 18:35:54 2018 +0300 extcon: cht-wc: Fix definition names according to spec There is no suffix MASK in the spec and other small spelling fixes. Signed-off-by: Andy Shevchenko Signed-off-by: Chanwoo Choi commit 962341b54b99965ebec5f70c8d39f1c382eea833 Author: Andy Shevchenko Date: Mon Aug 27 18:35:53 2018 +0300 extcon: cht-wc: Return from default case to avoid warnings When we have first case to fall through it's not enough to put single comment there to satisfy compiler. Instead of doing that, return fall back value directly from default case. This to avoid following warnings: drivers/extcon/extcon-intel-cht-wc.c: In function ‘cht_wc_extcon_get_charger’: include/linux/device.h:1420:2: warning: this statement may fall through [-Wimplicit-fallthrough=] _dev_warn(dev, dev_fmt(fmt), ##__VA_ARGS__) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/extcon/extcon-intel-cht-wc.c:148:3: note: in expansion of macro ‘dev_warn’ dev_warn(ext->dev, ^~~~~~~~ drivers/extcon/extcon-intel-cht-wc.c:152:2: note: here case CHT_WC_USBSRC_TYPE_SDP: ^~~~ Signed-off-by: Andy Shevchenko Signed-off-by: Chanwoo Choi commit 69f75a4f8c7b56a5cb050255167cf77a6f4c2fe1 Author: Andy Shevchenko Date: Mon Aug 27 18:35:52 2018 +0300 extcon: Switch to use kasprintf() instead of open coded Switch to use kasprintf() instead of open coded variant. No functional change intended. Signed-off-by: Andy Shevchenko Signed-off-by: Chanwoo Choi commit cff7499d7eb4196f21fdd1bf643aad12d846ee5d Author: Andy Shevchenko Date: Mon Aug 27 18:35:51 2018 +0300 extcon: Make static analyzer happy about union assignment When assign unions we need to supply non-scalar value, otherwise static analyzer is not happy: CHECK drivers/extcon/extcon.c drivers/extcon/extcon.c:631:22: warning: cast to non-scalar Signed-off-by: Andy Shevchenko Signed-off-by: Chanwoo Choi commit 1213a366817299ed91fcb4e738c057a9ac4c8666 Author: Krzysztof Kozlowski Date: Tue Aug 7 18:21:22 2018 +0200 extcon: maxim: Add SPDX license identifiers Replace GPL v2.0+ license statements with SPDX license identifiers. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Chanwoo Choi commit ccf45b18ce89f598c69a0c945ced1635013fc0b1 Author: Bjorn Andersson Date: Tue Aug 7 00:14:24 2018 -0700 rpmsg: char: Migrate to iter versions of read and write In order to be able to use the aio interface for writing to a rpmsg_char the write_iter function must be implemented, so migrate to iter version for read and write functions. Regular read and write uses the iter methods if present and is as such unaffected. Signed-off-by: Bjorn Andersson commit 1e28dbbeced6152b9ea7c417ff8cef3f7dcf0f19 Author: Bjorn Andersson Date: Thu Aug 16 17:49:19 2018 -0700 remoteproc/davinci: Use %zx for formating size_t da8xx_rproc_mem size is of type size_t, so use %zx to format the debug print of it to avoid a compile warning. Acked-by: Suman Anna Reviewed-by: Bartosz Golaszewski Signed-off-by: Bjorn Andersson commit ac771ed746c800749ec5adbb4b7c22ce1d89943e Author: Alexandre Belloni Date: Mon Aug 27 23:23:44 2018 +0200 rtc: rv8803: add Epson RX8803 support The Epson rx8803 is mostly similar to the Microcrystal RV8803 but the size of the offset register is 4 bits vs 6 bits but it has a configurable temperature compensation. Signed-off-by: Alexandre Belloni commit c856618d20662695fcdb47bf4d560dc457662aec Author: Alexandre Belloni Date: Mon Aug 27 23:23:43 2018 +0200 rtc: rv8803: fix the rv8803 id in the OF table The ID for RV8803 must be rv_8803 Signed-off-by: Alexandre Belloni commit 8748b4a786a9e3973f6e6521edff7b266cafef48 Author: Krzysztof Kozlowski Date: Tue Aug 7 18:17:13 2018 +0200 clk: s2mps11: Use existing defines from bindings for clock IDs The clock IDs must match between DeviceTree bindings and the driver. There is already a header file used by DeviceTree sources so include it in the driver to remove duplicated symbols. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Signed-off-by: Stephen Boyd commit 94047d979574dda95a92a0e696189afb9b284ede Author: Krzysztof Kozlowski Date: Tue Aug 7 18:17:12 2018 +0200 clk: s2mps11,s3c64xx: Add SPDX license identifiers Replace GPL v2.0 and v2.0+ license statements with SPDX license identifiers. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Signed-off-by: Stephen Boyd commit f300168a3a012a4e49ef550d69bd4dbcfc97a23f Author: Krzysztof Kozlowski Date: Tue Aug 7 18:17:11 2018 +0200 clk: max77686: Add SPDX license identifiers Replace GPL v2.0 and v2.0+ license statements with SPDX license identifiers. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Stephen Boyd commit f62df676d7f16580fa5085a8f51a1cbe27f7dd10 Author: Gustavo A. R. Silva Date: Thu Aug 23 20:07:06 2018 -0500 memory: atmel-ebi: 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 issue was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva Reviewed-by: Kees Cook Signed-off-by: Alexandre Belloni commit 777d8ae56da18fb6440acd941edb3597c1b02bf0 Author: Dan Carpenter Date: Mon Aug 27 12:22:34 2018 +0300 rtc: sysfs: fix NULL check in rtc_add_groups() devm_kcalloc() returns NULL, it never returns error pointers. In the current code we would return PTR_ERR(NULL) which is success, instead of returning the -ENOMEM error code. Fixes: a0a1a1ba3032 ("rtc: sysfs: facilitate attribute add to rtc device") Signed-off-by: Dan Carpenter Signed-off-by: Alexandre Belloni commit 725e0e15f84bb30e83fad8fa4b4dd1f335506172 Author: Gustavo A. R. Silva Date: Thu Aug 23 13:51:40 2018 -0500 rtc: sun6i: 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); Signed-off-by: Gustavo A. R. Silva Reviewed-by: Kees Cook Signed-off-by: Alexandre Belloni commit 1e6e4e169a8aef8127ff9ffece6290fafe0d92bf Author: Paul Cercueil Date: Mon Aug 20 20:07:16 2018 +0200 rtc: jz4740: Drop dependency on MACH_INGENIC Depending on MACH_INGENIC prevent us from creating a generic kernel that works on more than one MIPS board. Instead, we just depend on MIPS being set. Signed-off-by: Paul Cercueil Signed-off-by: Alexandre Belloni commit 09058eab4b4f77b721572da5291532e751b63931 Author: Keerthy Date: Thu Aug 16 10:39:00 2018 +0530 rtc: omap: Cut down the shutdown time from 2 seconds to 1 sec Cut down the shutdown time from 2 seconds to 1 sec. In case of roll over try again. Signed-off-by: Keerthy Reviewed-by: Johan Hovold Signed-off-by: Alexandre Belloni commit 0438002ac52637cef5f5734bab56d8d8750e1f37 Author: Keerthy Date: Thu Aug 16 10:38:59 2018 +0530 rtc: omap: use of_device_is_system_power_controller function Use of_device_is_system_power_controller instead of manually reading the system-power-controller property from the device tree node. Reviewed-by: Johan Hovold Signed-off-by: Keerthy Signed-off-by: Alexandre Belloni commit c6b5eb8dd33480104683d838da10c7ec77d32e8a Author: Jia-Ju Bai Date: Mon Jul 30 21:59:03 2018 +0800 rtc: rtc-mrst: Replace mdelay() with msleep() in mrst_read_time() mrst_read_time() is never called in atomic context. It calls mdelay() to busily wait, which is not necessary. mdelay() can be replaced with msleep(). This is found by a static analysis tool named DCNS written by myself. Signed-off-by: Jia-Ju Bai Signed-off-by: Alexandre Belloni commit 8b69c6dba2300b616737bbfc28685d86d786b11d Author: Taniya Das Date: Sat Aug 11 07:23:56 2018 +0530 clk: qcom: gcc: Register QUPv3 RCGs for DFS on SDM845 QUPv3 clocks support DFS and thus register the RCGs which require support for the same. Signed-off-by: Taniya Das [sboyd@kernel.org: Use new macro, split out init structures so they don't have to be copied] Signed-off-by: Stephen Boyd commit cc4f6944d0e333ed57a2f300afd7c8cb6df228d5 Author: Taniya Das Date: Sat Aug 11 07:23:55 2018 +0530 clk: qcom: Add support for RCG to register for DFS Dynamic Frequency switch is a feature of clock controller by which request from peripherals allows automatic switching frequency of input clock without SW intervention. There are various performance levels associated with a root clock. When the input performance state changes, the source clocks and division ratios of the new performance state are loaded on to RCG via HW and the RCG switches to new clock frequency when the RCG is in DFS HW enabled mode. Register the root clock generators(RCG) to switch to use the dfs clock ops in the cases where DFS is enabled. The clk_round_rate() called by the clock consumer would invoke the dfs determine clock ops and would read the DFS performance level registers to identify all the frequencies supported and update the frequency table. The DFS clock consumers would maintain these frequency mapping and request the desired performance levels. Signed-off-by: Taniya Das [sboyd@kernel.org: Rework registration logic to stop copying, change recalc_rate() to index directly into the table if possible and fallback to calculating on the fly with an assumed correct parent] Signed-off-by: Stephen Boyd commit 7d0aa3765fa839c0047a8924807e5201f4d9e76d Author: Andrey Grodzovsky Date: Mon Aug 27 14:17:26 2018 -0400 drm/amdgpu: Refine gmc9 VM fault print. The fault reports the page number where the fault happend and not the exact faulty address. Update the print message to reflect that. Signed-off-by: Andrey Grodzovsky Reviewed-by: Alex Deucher Reviewed-by: Marek Olšák Signed-off-by: Alex Deucher commit 9bbf6a5341092e8a9b4e7b02bea6721e29ced9ef Author: David Francis Date: Fri Aug 3 13:24:28 2018 -0400 drm/amd/display: Flatten unnecessary i2c functions [Why] The dce_i2c_hw code contained four funtcions that were only called in one place and did not have a clearly delineated purpose. [How] Inline these functions, keeping the same functionality. This is not a functional change. The functions disable_i2c_hw_engine and release_engine_dce_hw were pulled into their respective callers. The most interesting part of this change is the acquire functions. dce_i2c_hw_engine_acquire_engine was pulled into dce_i2c_engine_acquire_hw, and dce_i2c_engine_acquire_hw was pulled into acquire_i2c_hw_engine. Some notes to show that this change is not functional: -Failure conditions in any function resulted in a cascade of calls that ended in a 'return NULL'. Those are replaced with a direct 'return NULL'. -The variable result is the one from dce_i2c_hw_engine_acquire_engine. The boolean result used as part of return logic was removed. -As the second half of dce_i2c_hw_engine_acquire_engine is only executed if that function is returning true and therefore exiting the do-while loop in dce_i2c_engine_acquire_hw, those lines were moved outside of the loop. Signed-off-by: David Francis Acked-by: Leo Li Signed-off-by: Alex Deucher commit ad908423ef86f1787b635a8830d49f50ff862295 Author: Eric Yang Date: Wed Aug 15 17:35:50 2018 -0400 drm/amd/display: support 48 MHZ refclk off [Why] On PCO and up, whenever SMU receive message to indicate active display count = 0. SMU will turn off 48MHZ TMDP reference clock by writing to 1 TMDP_48M_Refclk_Driver_PWDN. Once this clock is off, no PHY register will respond to register access. This means our current sequence of notifying display count along with requesting clock will cause driver to hang when accessing PHY registers after displays count goes to 0. [How] Separate the PPSMC_MSG_SetDisplayCount message from the SMU messages that request clocks, have display own sequencing of this message so that we can send it at the appropriate time. Do not redundantly power off HW when entering S3, S4, since display should already be called to disable all streams. And ASIC soon be powered down. Signed-off-by: Eric Yang Reviewed-by: Tony Cheng Acked-by: Leo Li Signed-off-by: Alex Deucher commit d377ae4e3754ee3f81f63a0d9e3eadba7830d3e3 Author: David Francis Date: Fri Aug 3 14:25:19 2018 -0400 drm/amd/display: Remove redundant i2c structs [Why] The i2c code contains two structs that contain the same information as i2c_payload [How] Replace references to those structs with references to i2c_payload dce_i2c_transaction_request->status was written to but never read, so all references to it are removed Signed-off-by: David Francis Reviewed-by: Jordan Lazare Acked-by: Leo Li Signed-off-by: Alex Deucher commit 46659a83e4662ed92000ec13445b8c0ca96fd2cc Author: Nicholas Kazlauskas Date: Wed Aug 15 12:00:23 2018 -0400 drm/amd/display: Support reading hw state from debugfs file [Why] Logging hardware state can be done by triggering a write to the debugfs file. It would also be useful to be able to read the hardware state from the debugfs file to be able to generate a clean log without timestamps. [How] Usage: cat /sys/kernel/debug/dri/0/amdgpu_dm_dtn_log Threading is an obvious concern when dealing with multiple debugfs operations and blocking on global state in dm or dc seems unfavorable. Adding an extra parameter for the debugfs log context state is the implementation done here. Existing code that made use of DTN_INFO and its associated macros needed to be refactored to support this. We don't know the size of the log in advance so it reallocates the log string dynamically. Once the log has been generated it's copied into the user supplied buffer for the debugfs. This allows for seeking support but it's worth nothing that unlike triggering output via dmesg the hardware state might change in-between reads if your buffer size is too small. Signed-off-by: Nicholas Kazlauskas Reviewed-by: Jordan Lazare Acked-by: Leo Li Signed-off-by: Alex Deucher commit 1f6010a96273c3111ecdc12aa274c932da920493 Author: David Francis Date: Wed Aug 15 14:38:30 2018 -0400 drm/amd/display: Improve spelling, grammar, and formatting of amdgpu_dm.c comments [Why] Good spelling and grammar makes comments more pleasant and clearer. Linux has coding standards for comments that we should try to follow. [How] Fix obvious spelling and grammar issues Ensure all comments use '/*' and '*/' and multi-line comments follow linux convention Remove line-of-stars comments that do not separate sections of code and comments referring to lines of code that have since been removed Signed-off-by: David Francis Reviewed-by: Nicholas Kazlauskas Acked-by: Leo Li Signed-off-by: Alex Deucher commit 219097df0f9d47fd882791144c60f3155750a6a7 Author: SivapiriyanKumarasamy Date: Wed Aug 15 16:55:18 2018 -0400 drm/amd/display: Fix memory leak caused by missed dc_sink_release [Why] There is currently an intermittent hang from a memory leak in DTN stress testing. It is caused by unfreed memory during driver disable. [How] Do a dc_sink_release in the case that skips it incorrectly. Signed-off-by: SivapiriyanKumarasamy Reviewed-by: Aric Cyr Acked-by: Leo Li Signed-off-by: Alex Deucher commit 18e4aa33bdfba0e7ac4e5a62d0665becb78ce012 Author: Ken Chalmers Date: Fri Aug 10 15:51:59 2018 -0400 drm/amd/display: eliminate long wait between register polls on Maximus [Why] Now that we "scale" time delays correctly on Maximus (as of diags svn r170115), the forced "35 ms" wait time now becomes 35 ms * 500 = 17.5 seconds, which is far too long. Even having to repeat polling a register once causes excessive delays on Maximus. [How] Just use the regular wait time passed to the generic_reg_wait() function. This is sufficient for Maximus now, and it also means that there's one less "Maximus-only" code path in DAL. Also disable the "REG_WAIT taking a while:" message on Maximus, since things do take a while longer there and 1-2ms delays are not uncommon (and nothing to worry about). Signed-off-by: Ken Chalmers Reviewed-by: Eric Bernstein Acked-by: Leo Li Signed-off-by: Alex Deucher commit e498eb7136042aa9a352b1039c678537f4694158 Author: Nicholas Kazlauskas Date: Tue Aug 14 15:40:57 2018 -0400 drm/amd/display: Add support for hw_state logging via debugfs [Why] We have logging methods for printing hardware state for newer ASICs but no way to trigger the log output. [How] Add support for triggering the output via writing to a debugfs file entry. Log output currently goes into dmesg for convenience, but accessing via a read should be possible later. Signed-off-by: Nicholas Kazlauskas Reviewed-by: Jordan Lazare Acked-by: Leo Li Signed-off-by: Alex Deucher commit e5d0170e5644508a28e063995b89af4fdabd38b9 Author: Leo (Sunpeng) Li Date: Mon Aug 13 17:45:05 2018 -0400 drm/amd/display: Use non-deprecated vblank handler [Why] drm_handle_vblank is deprecated. Use drm_crtc_handle_vblank instead. Signed-off-by: Leo (Sunpeng) Li Reviewed-by: David Francis Acked-by: Leo Li Signed-off-by: Alex Deucher commit 58382a445b7616ef60f2d8fc4717f90fc8472d45 Author: Tony Cheng Date: Wed Jul 18 20:29:46 2018 -0400 drm/amd/display: dc 3.1.63 Signed-off-by: Tony Cheng Reviewed-by: Steven Chiu Acked-by: Leo Li Signed-off-by: Alex Deucher commit 9bbdb0f345f50e2a9afd7d7c475e3b788eec402b Author: David Francis Date: Thu Aug 9 13:20:04 2018 -0400 drm/amd/display: Eliminate i2c hw function pointers [Why] The function pointers of the dce_i2c_hw struct were never accessed from outside dce_i2c_hw.c and had only one version. As function pointers take up space and make debugging difficult, and they are not needed in this case, they should be removed. [How] Remove the dce_i2c_hw_funcs struct and make static all functions that were previously a part of it. Reorder the functions in dce_i2c_hw.c. Signed-off-by: David Francis Reviewed-by: Sun peng Li Acked-by: Leo Li Signed-off-by: Alex Deucher commit 284dec4317c8e76f45d3ce922f673c80331812f1 Author: Christian König Date: Wed Aug 22 16:44:56 2018 +0200 drm/amdgpu: enable GTT PD/PT for raven v3 Should work on Vega10 as well, but with an obvious performance hit. Older APUs can be enabled as well, but will probably be more work. v2: fix error checking v3: use more general check Signed-off-by: Christian König Acked-by: Andrey Grodzovsky Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 24a8d289d532003a167b8f52f97c50430db76ca3 Author: Christian König Date: Wed Aug 22 14:11:19 2018 +0200 drm/amdgpu: add amdgpu_gmc_get_pde_for_bo helper v2 Helper to get the PDE for a PD/PT. v2: improve documentation Signed-off-by: Christian König Reviewed-by: Junwei Zhang Reviewed-by: Huang Rui Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit bbc9fb10e581c5463961506df7504356b3bd0a61 Author: Christian König Date: Wed Aug 22 12:27:05 2018 +0200 drm/amdgpu: add GMC9 support for PDs/PTs in system memory Add the necessary handling. Signed-off-by: Christian König Reviewed-by: Junwei Zhang Reviewed-by: Alex Deucher Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit e21eb2613d071abfaa40e353b106f01f4ce83d77 Author: Christian König Date: Mon Aug 27 15:17:59 2018 -0500 drm/amdgpu: add helper for VM PD/PT allocation parameters v3 Add a helper function to figure them out only once. v2: fix typo with memset v3: rebase on kfd changes (Alex) Signed-off-by: Christian König Reviewed-by: Junwei Zhang Reviewed-by: Alex Deucher Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 248f2b8ef25c9505fc763d42bf5e2c9fcf94fd16 Author: Christian König Date: Wed Aug 22 15:47:37 2018 +0200 drm/amdgpu: remove extra root PD alignment Just another leftover from radeon. Signed-off-by: Christian König Reviewed-by: Alex Deucher Reviewed-by: Junwei Zhang Acked-by: Huang Rui Signed-off-by: Alex Deucher commit 4f9ea1d0d1ed914092d9e03d87d80fa7e63ecc8f Author: Christian König Date: Fri Aug 24 14:48:02 2018 +0200 drm/amdgpu: fix holding mn_lock while allocating memory We can't hold the mn_lock while allocating memory. Signed-off-by: Christian König Acked-by: Chunming Zhou Signed-off-by: Alex Deucher commit 85eff20020a656b2d13b33dc4681523508fee037 Author: Christian König Date: Fri Aug 24 14:23:33 2018 +0200 drm/amdgpu: amdgpu_ctx_add_fence can't fail No more waiting for a fence done here. Signed-off-by: Christian König Reviewed-by: Chunming Zhou Reviewed-by: Junwei Zhang Signed-off-by: Alex Deucher commit a9a8a788e5e946a9835a1365256fc4ce9e96ba2c Author: Rex Zhu Date: Wed Aug 22 18:54:45 2018 +0800 drm/amdgpu: Change kiq ring initialize sequence on gfx9 1. initialize kiq before initialize gfx ring. 2. set kiq ring ready immediately when kiq initialize successfully. 3. split function gfx_v9_0_kiq_resume into two functions. gfx_v9_0_kiq_resume is for kiq initialize. gfx_v9_0_kcq_resume is for kcq initialize. Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher commit 36859cd5354b9cb418c28930936a8a6fce18a1d7 Author: Rex Zhu Date: Wed Aug 22 17:58:31 2018 +0800 drm/amdgpu: Change kiq initialize/reset sequence on gfx8 1. initialize kiq before initialize gfx ring. 2. set kiq ring ready immediately when kiq initialize successfully. 3. split function gfx_v8_0_kiq_resume into two functions. gfx_v8_0_kiq_resume is for kiq initialize. gfx_v8_0_kcq_resume is for kcq initialize. Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher commit ffabea84c55b1c6446b2245b87cdf6827b22e366 Author: Rex Zhu Date: Fri Aug 17 16:45:16 2018 +0800 drm/amdgpu: Refine gfx_v9_0_kcq_disable function Send all kcq unmap_queue packets and then wait for complete. Reviewed-by: Alex Deucher Acked-by: Christian König Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher commit 841cf911fb9e4abd7b8bac2776943c60da9069f4 Author: Rex Zhu Date: Fri Aug 17 16:42:35 2018 +0800 drm/amdgpu: Remove duplicate code in gfx_v9_0.c There are no any logical changes here. 1. if kcq can be enabled via kiq, we don't need to do kiq ring test. 2. amdgpu_ring_test_ring function can be used to sync the ring complete, remove the duplicate code. Reviewed-by: Alex Deucher Acked-by: Christian König Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher commit a62a49e5b968a58266ee04d63ddaa81a01510b39 Author: Rex Zhu Date: Fri Aug 17 14:57:18 2018 +0800 drm/amdgpu: Refine gfx_v8_0_kcq_disable function Send all kcq unmap_queue packets and then wait for complete. Reviewed-by: Alex Deucher Acked-by: Christian König Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher commit 6c10b5cc4eaa31ecedfb98a7f3e1fa5be032e189 Author: Rex Zhu Date: Fri Aug 17 13:13:12 2018 +0800 drm/amdgpu: Remove duplicate code in gfx_v8_0.c There are no any logical changes here. 1. if kcq can be enabled via kiq, we don't need to do kiq ring test. 2. amdgpu_ring_test_ring function can be used to sync the ring complete, remove the duplicate code. v2: alloc 6 (not 7) dws for unmap_queues Reviewed-by: Alex Deucher Acked-by: Christian König Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher commit f1df06d0f9bc8d2e9f0736a23b78d6db033460dc Author: Rex Zhu Date: Thu Aug 23 15:45:15 2018 +0800 drm/amdgpu: Remove dead code in amdgpu_pm.c As we have unify powergate_uvd/vce/mmhub to set_powergating_by_smu, and set_powergating_by_smu was supported by both dpm and powerplay. so remove the else case. Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher commit e851abd830885c37c18183e36541d2fc11e3c674 Author: Rex Zhu Date: Thu Aug 23 15:41:57 2018 +0800 drm/amdgpu: Power on uvd block when hw_fini when hw_fini/suspend, smu only need to power on uvd block if uvd pg is supported, don't need to call uvd to do hw_init. v2: fix typo in patch descriptions and comments. Reviewed-by: Alex Deucher Tested-by: Michel Dänzer Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher commit 3442516d14816b862bf7d1150c84ef1d0bfdd915 Author: Rex Zhu Date: Fri Aug 24 16:17:54 2018 +0800 drm/amdgpu: Update power state at the end of smu hw_init. For SI/Kv, the power state is managed by function amdgpu_pm_compute_clocks. when dpm enabled, we should call amdgpu_pm_compute_clocks to update current power state instand of set boot state. this change can fix the oops when kfd driver was enabled on Kv. Reviewed-by: Alex Deucher Tested-by: Michel Dänzer Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher commit 3510bafe561bd86ce16ef67bf06a0ae6b9202043 Author: Rex Zhu Date: Thu Aug 23 15:30:45 2018 +0800 drm/amdgpu: Fix vce initialize failed on Kaveri/Mullins Forgot to add vce pg support via smu for Kaveri/Mullins. Fixes: 561a5c83eadd ("drm/amd/pp: Unify powergate_uvd/vce/mmhub to set_powergating_by_smu") v2: refine patch descriptions suggested by Michel Reviewed-by: Alex Deucher Tested-by: Michel Dänzer Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher commit d3200a536ccbc047cee408c44a92235c4e84c91b Author: Rex Zhu Date: Thu Aug 23 11:46:13 2018 +0800 drm/amdgpu: Remove duplicated power source update when ac/dc switch, driver will be notified by acpi event. then the power source will be updated. so don't need to get power source when set power state. Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher commit 1f06dee8f784e4f3af4add95076659ba95ffa9fb Author: Rex Zhu Date: Fri Aug 24 17:26:23 2018 +0800 drm/amdgpu: Enable/disable gfx PG feature in rlc safe mode This is required by gfx hw and can fix the rlc hang when do s3 stree test on Cz/St. Reviewed-by: Alex Deucher Signed-off-by: Hang Zhou Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher commit 43370c4ce5c6a1fae84b58f67f7834902ee74b7c Author: Felix Kuehling Date: Tue Aug 21 17:14:32 2018 -0400 drm/amdgpu: Adjust the VM size based on system memory size v2 Set the VM size based on system memory size between the ASIC-specific limits given by min_vm_size and max_bits. GFXv9 GPUs will keep their default VM size of 256TB (48 bit). Only older GPUs will adjust VM size depending on system memory size. This makes more VM space available for ROCm applications on GFXv8 GPUs that want to map all available VRAM and system memory in their SVM address space. v2: * Clarify comment * Round up memory size before >> 30 * Round up automatic vm_size to power of two Signed-off-by: Felix Kuehling Acked-by: Junwei Zhang Reviewed-by: Huang Rui Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 80dbea4720bb43b473219fad0cf3b426f2cd04cc Author: Christian König Date: Wed Aug 22 12:04:11 2018 +0200 drm/amdgpu: implement soft_recovery for GFX9 Try to kill waves on the SQ. Signed-off-by: Christian König Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit f5d850331ea9bdf18e68ae298cff35c7b7233993 Author: Christian König Date: Tue Aug 21 12:45:31 2018 +0200 drm/amdgpu: implement soft_recovery for GFX8 v2 Try to kill waves on the SQ. v2: only for the GFX ring for now. Signed-off-by: Christian König Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit efb6706405963047fb312efbe1af2d7490b58261 Author: Christian König Date: Wed Aug 22 11:55:23 2018 +0200 drm/amdgpu: implement soft_recovery for GFX7 Try to kill waves on the SQ. Signed-off-by: Christian König Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 7876fa4f55fda4a57348832f4a668279ed2b2fc4 Author: Christian König Date: Tue Aug 21 11:11:36 2018 +0200 drm/amdgpu: add ring soft recovery v4 Instead of hammering hard on the GPU try a soft recovery first. v2: reorder code a bit v3: increase timeout to 10ms, increment GPU reset counter v4: squash in compile fix (Christian) Signed-off-by: Christian König Reviewed-by: Huang Rui commit b6e075c3cb6e57d487f6ca1be688e88eb8fc6a79 Author: Peter Rosin Date: Sat Aug 25 10:56:20 2018 +0200 drm/atmel-hlcdc: support bus-width (12/16/18/24) in endpoint nodes This beats the heuristic that the connector is involved in what format should be output for cases where this fails. E.g. if there is a bridge that changes format between the encoder and the connector, or if some of the RGB pins between the lcd controller and the encoder are not routed on the PCB. This is critical for the devices that have the "conflicting output formats" issue (SAM9N12, SAM9X5, SAMA5D3), since the most significant RGB bits move around depending on the selected output mode. For devices that do not have the "conflicting output formats" issue (SAMA5D2, SAMA5D4), this is completely irrelevant. Acked-by: Boris Brezillon Reviewed-by: Jacopo Mondi Signed-off-by: Peter Rosin Signed-off-by: Boris Brezillon Link: https://patchwork.freedesktop.org/patch/msgid/20180825085620.10566-5-peda@axentia.se commit 012877b76c2f004f03c9b119b96f73494b8c5196 Author: Peter Rosin Date: Sat Aug 25 10:56:19 2018 +0200 drm/atmel-hlcdc: always iterate over the first 4 output endpoints This enables more flexible devicetrees. You can e.g. have two output nodes where one is not enabled, without the ordering affecting things. Prior to this patch the active nodes had to have endpoint id zero and upwards consecutively. Signed-off-by: Peter Rosin Signed-off-by: Boris Brezillon Link: https://patchwork.freedesktop.org/patch/msgid/20180825085620.10566-4-peda@axentia.se commit 2e7c04aec86758e0adfcad4a24c86593b45807a3 Author: Peter Rosin Date: Sat Aug 25 10:56:18 2018 +0200 dt-bindings: display: atmel: optional video-interface of endpoints With bus-type/bus-width properties in the endpoint nodes, the video- interface of the connection can be specified for cases where the heuristic fails to select the correct output mode. This can happen e.g. if not all RGB pins are routed on the PCB; the driver has no way of knowing this, and needs to be told explicitly. This is critical for the devices that have the "conflicting output formats" issue (SAM9N12, SAM9X5, SAMA5D3), since the most significant RGB bits move around depending on the selected output mode. For devices that do not have the "conflicting output formats" issue (SAMA5D2, SAMA5D4), this is completely irrelevant. Acked-by: Boris Brezillon Reviewed-by: Rob Herring Reviewed-by: Jacopo Mondi Signed-off-by: Peter Rosin Signed-off-by: Boris Brezillon Link: https://patchwork.freedesktop.org/patch/msgid/20180825085620.10566-3-peda@axentia.se commit 7473b9aff963007fed591a76b9df0335635c8bcd Author: Peter Rosin Date: Sat Aug 25 10:56:17 2018 +0200 dt-bindings: display: bridge: lvds-transmitter: add ti, ds90c185 Start list of actual chips compatible with "lvds-encoder". Reviewed-by: Laurent Pinchart Reviewed-by: Rob Herring Signed-off-by: Peter Rosin Signed-off-by: Boris Brezillon Link: https://patchwork.freedesktop.org/patch/msgid/20180825085620.10566-2-peda@axentia.se commit 9946a3a9dbedaaacef8b7e94f6ac144f1daaf1de Author: Peter Rosin Date: Fri Aug 24 11:24:58 2018 +0200 drm/atmel-hlcdc: allow selecting a higher pixel-clock than requested But only if the highest pixel-clock frequency lower than requested is significantly less accurate than the lowest frequency higher than requested. I pulled "10 times" as the discriminator out of the hat, and went with that. This is useful, if e.g. the target pixel-clock is 65MHz and the sys_clk is 132MHz. In this case the highest possible pixel-clock lower than the requested 65MHz is 52.8MHz, which is almost 20% off (and outside the spec for the panel). The lowest possible pixel-clock higher than 65MHz is 66MHz, which is a *much* better match, and only 1.5% off. Signed-off-by: Peter Rosin Signed-off-by: Boris Brezillon Link: https://patchwork.freedesktop.org/patch/msgid/20180824092458.13165-3-peda@axentia.se commit 319711f982084b044d3dac6ae58e3d801ae4ca43 Author: Peter Rosin Date: Fri Aug 24 11:24:57 2018 +0200 drm/atmel-hlcdc: prefer a higher rate clock as pixel-clock base If the divider used to get the pixel-clock is small, the granularity of the frequencies possible for the pixel-clock is quite coarse. E.g. requesting a pixel-clock of 65MHz with a sys_clk of 132MHz results in the divider being set to 3 ending up with 44MHz. By preferring the doubled sys_clk as base, the divider instead ends up as 5 yielding a pixel-clock of 52.8Mhz, which is a definite improvement. While at it, clamp the divider so that it does not overflow in case it gets big. Signed-off-by: Peter Rosin Signed-off-by: Boris Brezillon Link: https://patchwork.freedesktop.org/patch/msgid/20180824092458.13165-2-peda@axentia.se commit 65df9c7947d70a8d78b2af5a1a835c713110d21e Author: Dhinakaran Pandiyan Date: Fri Aug 24 16:08:44 2018 -0700 drm/i915/psr: Rewrite comments in intel_psr_wait_for_idle() Added bspec reference, aligned text and documented the function. Cc: Rodrigo Vivi Signed-off-by: Dhinakaran Pandiyan Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20180824230844.12428-2-dhinakaran.pandiyan@intel.com commit fd255f6e3704d183f6f5011efd01fcda70372cab Author: Dhinakaran Pandiyan Date: Fri Aug 24 16:08:43 2018 -0700 drm/i915/psr: Remove wait_for_idle() for PSR2 CI runs show PSR2 does not go to IDLE with selective update enabled on all PSR exit triggers. Specifically, logs indicate the hardware enters "SLEEP Selective Update" and not "IDLE Reset state', like the kernel expects, when vblank interrupts are enabled. This check was added for PSR1 but incorrectly extended to PSR2, remove the check as it breaks tests and prints out misleading error messages. v2: Split out non-code changes (Rodrigo) Cc: Tarun Vyas Cc: José Roberto de Souza Cc: Rodrigo Vivi Fixes: c43dbcbbcc8c ("drm/i915/psr: Lockless version of psr_wait_for_idle") Signed-off-by: Dhinakaran Pandiyan Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20180824230844.12428-1-dhinakaran.pandiyan@intel.com commit 3e195a80e096887692f97f5078a8c98e9b2dc39d Author: Georgios Tsotsos Date: Mon Aug 13 19:25:29 2018 +0300 Staging: octeon-usb: Replaces CVMX_WAIT_FOR_FIELD32 macro with a function Replaces CVMX_WAIT_FOR_FIELD32 macro with equivalent function. Signed-off-by: Georgios Tsotsos Signed-off-by: Greg Kroah-Hartman commit c28b6699acf85fb195aa93dcfdd648ce14e6c738 Author: Arkadiusz Lis Date: Wed Aug 8 17:42:29 2018 +0200 Staging: One Laptop Per Child: fix SPDX-License-Identifier issue Add SPDX-License-Identifier to the source files. Remove redundant, old license. Signed-off-by: Arkadiusz Lis Signed-off-by: Greg Kroah-Hartman commit 4ad866231e4c73af02c89c337c2b655793088bb8 Author: Christian Gromm Date: Mon Aug 13 15:02:29 2018 +0200 staging: most: do not make interface dependent attrs default for all channels The channel attribute dbr_size is only relevant for the DIM2 interface. so is the packets_per_xact for USB. This patch cleans up the driver's ABI by not showing all attributes by default for each channel, but only on those they belong to. Signed-off-by: Christian Gromm Signed-off-by: Greg Kroah-Hartman commit f0b4a22a48481824e124f633bbe5d3e884fc8e36 Author: Christian Gromm Date: Mon Aug 13 15:02:28 2018 +0200 staging: most: register channel device after init of struct members This patch moves the call to device_register to the end of the channel initialization section that the devcie belongs to. It is needed to avoid NULL pointer dereferences once the device is registered with sysfs. Signed-off-by: Christian Gromm Signed-off-by: Greg Kroah-Hartman commit 23c41ca6173da88c4acff1e353af654085ee3a0d Author: Colin Ian King Date: Thu Aug 9 11:51:20 2018 +0100 staging: rtl8712: remove unused array iw_operation_mode Array iw_operation_mode is defined but is never used hence it is redundant and can be removed. This array has been like this since the driver was added back in 2010 Cleans up clang warning: warning: 'iw_operation_mode' defined but not used [-Wunused-const-variable=] Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman commit 1257bf8052bd70dbb4ad70bc23e31f19a8db3f26 Author: Gao Xiang Date: Fri Aug 24 10:02:40 2018 +0800 staging: erofs: fix potential overflow in z_erofs_vle_normalaccess_readpage{,s} As Dan reported in the LKP mailing list: https://lists.01.org/pipermail/kbuild-all/2018-August/051558.html New smatch warnings: drivers/staging/erofs/unzip_vle.c:1359 z_erofs_vle_normalaccess_readpages() warn: should '()->index << 12' be a 64 bit type? Old smatch warnings: drivers/staging/erofs/unzip_vle.c:1322 z_erofs_vle_normalaccess_readpage() warn: should 'page->index << 12' be a 64 bit type? It needs to cast variable's type to erofs_off_t before left shifting. Reported-by: Dan Carpenter Reviewed-by: Chao Yu Signed-off-by: Gao Xiang Signed-off-by: Greg Kroah-Hartman commit 89fcd8360e7b3eafe6fe58102fa3cef8bde00b60 Author: Leon Imhof Date: Mon Aug 13 17:20:11 2018 +0200 staging: erofs: change 'unsigned' to 'unsigned int' Fix coding style issue "Prefer 'unsigned int' to bare use of 'unsigned'" detected by checkpatch.pl Signed-off-by: Leon Imhof Reviewed-by: Gao Xiang Reviewed-by: Chao Yu Signed-off-by: Greg Kroah-Hartman commit eed276c0401d80b108f5aec018cae7e14b32bc9b Author: Chao Yu Date: Tue Aug 21 22:49:37 2018 +0800 staging: erofs: fix potential overflow in erofs_grab_bio() As Dan reported in LKP's mailing list: https://lists.01.org/pipermail/kbuild-all/2018-August/051419.html New smatch warnings: drivers/staging/erofs/internal.h:446 erofs_grab_bio() warn: should 'blkaddr << (12 - 9)' be a 64 bit type? drivers/staging/erofs/data.c:78 __erofs_get_meta_page() error: 'bio' dereferencing possible ERR_PTR() drivers/staging/erofs/internal.h:446 erofs_grab_bio() warn: should 'blkaddr << (12 - 9)' be a 64 bit type? Old smatch warnings: drivers/staging/erofs/unzip_vle.c:989 z_erofs_vle_unzip() error: double unlock 'mutex:&z_pagemap_global_lock' drivers/staging/erofs/unzip_vle.c:1318 z_erofs_vle_normalaccess_readpage() warn: should 'page->index << 12' be a 64 bit type? drivers/staging/erofs/unzip_vle.c:1351 __z_erofs_vle_normalaccess_readpages() warn: should '()->index << 12' be a 64 bit type? It needs to cast varable's type to sector_t before left shifting. Reported-by: Dan Carpenter Reviewed-by: Gao Xiang Signed-off-by: Chao Yu Signed-off-by: Greg Kroah-Hartman commit d6421a46af70ce8d74f27ee1a099a23b4c90e691 Author: Gao Xiang Date: Tue Aug 21 22:49:36 2018 +0800 staging: erofs: fix compression mapping beyond EOF Logical address of EOF LTP mapping should start at `inode->i_size' rather than `inode->i_size - 1' to `m_la(in)', fix it. Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Signed-off-by: Chao Yu Signed-off-by: Greg Kroah-Hartman commit 390c642e1264f3deb5c4b4394b41479221a57542 Author: Gao Xiang Date: Tue Aug 21 22:49:35 2018 +0800 staging: erofs: fix integer overflow on 32-bit platform This patch fixes integer overflow on multiplication of 32-bit `lcn' in z_erofs_map_blocks_iter. Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Signed-off-by: Chao Yu Signed-off-by: Greg Kroah-Hartman commit df1e3f1f0008513d286bfeee4f9f857908d56ead Author: Gao Xiang Date: Tue Aug 21 22:49:34 2018 +0800 staging: erofs: fix vle_decompressed_index_clusterofs This patch adds error handing code, and fixes a missing endian conversion in vle_decompressed_index_clusterofs. Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Signed-off-by: Chao Yu Signed-off-by: Greg Kroah-Hartman commit 99691b4662ddc6e62978976a434ee6444c242263 Author: Gao Xiang Date: Tue Aug 21 22:49:33 2018 +0800 staging: erofs: rearrange vle clustertype definitions This patch moves vle clustertype definitions to erofs_fs.h since they are part of on-disk format. It also adds compile time check for Z_EROFS_VLE_DI_CLUSTER_TYPE_BITS Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Signed-off-by: Chao Yu Signed-off-by: Greg Kroah-Hartman commit ab47dd2b08193753ffd289d4042988d2c077cb76 Author: Gao Xiang Date: Tue Aug 21 22:49:32 2018 +0800 staging: erofs: cleanup z_erofs_vle_work_{lookup, register} This patch introduces 'struct z_erofs_vle_work_finder' to clean up arguments of z_erofs_vle_work_lookup and z_erofs_vle_work_register. Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Signed-off-by: Chao Yu Signed-off-by: Greg Kroah-Hartman commit cadf1ccf1b0021d0b7a9347e102ac5258f9f98c8 Author: Gao Xiang Date: Tue Aug 21 22:49:31 2018 +0800 staging: erofs: add error handling for xattr submodule This patch enhances the missing error handling code for xattr submodule, which improves the stability for the rare cases. Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Signed-off-by: Chao Yu Signed-off-by: Greg Kroah-Hartman commit 6e78901a9f233fb3581799a996b8ff6fadc97763 Author: Gao Xiang Date: Tue Aug 21 22:49:30 2018 +0800 staging: erofs: separate erofs_get_meta_page This patch separates 'erofs_get_meta_page' into 'erofs_get_meta_page' and 'erofs_get_meta_page_nofail'. The second one ensures that it should not fail under memory pressure and should make best efforts if IO errors occur. It also adds auxiliary variables in order to fulfill 80 character limit. Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Signed-off-by: Chao Yu Signed-off-by: Greg Kroah-Hartman commit 8be31270362b444a1f9d160aa5df9f147675b4a7 Author: Gao Xiang Date: Tue Aug 21 22:49:29 2018 +0800 staging: erofs: introduce erofs_grab_bio this patch renames prepare_bio to erofs_grab_bio, and adds a nofail option in order to retry in the bio allocator under memory pressure. Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Signed-off-by: Chao Yu Signed-off-by: Greg Kroah-Hartman commit cca5dd879075e95b706376123ea22231190aefe9 Author: Todd Poynor Date: Thu Aug 9 20:21:11 2018 -0700 staging: gasket: interrupt: remove unimplemented interrupt types Interrupt types PCI_MSI and PLATFORM_WIRE are unused and unimplemented. Remove these. Signed-off-by: Todd Poynor Signed-off-by: Greg Kroah-Hartman commit 8b872d6f06c20d58058afb457cc266c578c431b2 Author: Todd Poynor Date: Thu Aug 9 20:21:10 2018 -0700 staging: gasket: interrupt: simplify interrupt init parameters Pass the gasket driver descriptor to the interrupt init function, rather than exploding out separate parameters from various fields of that structure. This allows us to make more localized changes to the types of interrupts supported (MSIX vs. wire, etc.) without affecting the calling sequence, and seems nicer for simplification purposes. Signed-off-by: Todd Poynor Signed-off-by: Greg Kroah-Hartman commit 62af16524ced2f38b754a9a31a9b93854012d38c Author: Todd Poynor Date: Thu Aug 9 20:21:09 2018 -0700 staging: gasket: interrupt: refactor PCI MSIX-specific handler code Split interrupt handler into PCI MSIX-specific and generic functions, for adding non-MSIX handlers in the future. Move MSIX init code together,, out of generic init path. Signed-off-by: Todd Poynor Signed-off-by: Greg Kroah-Hartman commit 97fead8c90961390902ec7a9780775b9e87908bc Author: Todd Poynor Date: Thu Aug 9 20:21:08 2018 -0700 staging: gasket: core: rename lookup_internal_desc to be PCI-specific Rename lookup_internal_desc() to lookup_pci_internal_desc() to reflect use for PCI devices only, in prep for non-PCI devices in the future. Signed-off-by: Todd Poynor Signed-off-by: Greg Kroah-Hartman commit 1fb5e1c92e7d81497da3627671e119b44cb7a175 Author: Todd Poynor Date: Thu Aug 9 20:21:07 2018 -0700 staging: gasket: core: factor out generic device remove code from PCI Separate code for generic parts of gasket device removal sequence from the PCI device removal code, in prep for non-PCI devices later. Signed-off-by: Todd Poynor Signed-off-by: Greg Kroah-Hartman commit 9c34e95c6f03f581dcb3a209ea475972fcb67998 Author: Todd Poynor Date: Thu Aug 9 20:21:06 2018 -0700 staging: gasket: core: factor out generic device add code from PCI code Split out generic gasket device add code from the code for adding a PCI gasket device, in prep for other gasket device types in the future. Signed-off-by: Todd Poynor Signed-off-by: Greg Kroah-Hartman commit 7b49682bdc6cf6f7d55e7c7e74415c2b101a9671 Author: Todd Poynor Date: Thu Aug 9 20:21:05 2018 -0700 staging: gasket: page table: remove extraneous memory barriers Some explicit memory barriers in the page table code are not necessary, either because: (a) The barrier follows a non-relaxed MMIO access that already performs a read or write memory barrier. (b) The barrier follows DMA API calls for which the device-visible effects of IOMMU programming are guaranteed to be flushed to the IOMMU prior to the call returning, and doesn't need to sync with normal memory access. Signed-off-by: Todd Poynor Signed-off-by: Greg Kroah-Hartman commit 717264bab46e774e196574c77aae5f103b9b2f26 Author: Todd Poynor Date: Thu Aug 9 20:21:04 2018 -0700 staging: gasket: core: switch to relaxed memory-mapped I/O Use of readl() is deprecated; readl_relaxed() with appropriate memory barriers is preferred. Switch to relaxed reads and writes for better performance as well. Memory barriers required for I/O vs. normal memory access on Apex devices have already been explicitly coded in the page table routines. Signed-off-by: Todd Poynor Signed-off-by: Greg Kroah-Hartman commit 6c258edc64ae3d655a37abb773c21492a5196bf2 Author: Todd Poynor Date: Thu Aug 9 20:21:03 2018 -0700 staging: gasket: page table: use dma_mapping_error for error detection gasket_perform_mapping() call dma_mapping_error() to determine if mapping failed. Signed-off-by: Todd Poynor Signed-off-by: Greg Kroah-Hartman commit 1fdd6d720cdc31b569189f6c534250b9deb1152d Author: Todd Poynor Date: Thu Aug 9 20:21:01 2018 -0700 staging: gasket: remove gasket_exit() Remove now-empty gasket_exit() function. Signed-off-by: Todd Poynor Signed-off-by: Greg Kroah-Hartman commit 1fb227bf2ed2834fb0a3e9baf5aba34a19b111f6 Author: Todd Poynor Date: Thu Aug 9 20:21:00 2018 -0700 staging: gasket: core: remove ftrace-style debug logs Remove debug logs that only indicate the name of the entered function, in favor of using ftrace for function tracing style logs. Signed-off-by: Todd Poynor Signed-off-by: Greg Kroah-Hartman commit 57db4be3bbe45bdbd0b073ed6048e86830ded865 Author: Todd Poynor Date: Thu Aug 9 20:20:59 2018 -0700 staging: gasket: core: remove kobj_name param from gasket_alloc_dev gasket_alloc_dev can retrieve the device name from the parent parameter, a separate parameter isn't needed for this. Rename the variable to better reflect its meaning, as the name of the parent device for which a gasket device is being allocated. Signed-off-by: Todd Poynor Signed-off-by: Greg Kroah-Hartman commit c5e0a62ad80aac638f222e8d574f0994c4425f30 Author: Todd Poynor Date: Thu Aug 9 20:20:58 2018 -0700 staging: gasket: core: fix line continuation indent in gasket_alloc_dev Previous cleanups missed a case of multi-line function call with line continuation parameters not aligned per kernel style. Signed-off-by: Todd Poynor Signed-off-by: Greg Kroah-Hartman commit 4cfc2bff29cadf9c0df9723adbce1fce7ee33281 Author: Todd Poynor Date: Thu Aug 9 20:20:57 2018 -0700 staging: gasket: core: remove debug log that could crash A debug log in gasket_alloc_dev() is issued regardless of whether the device pointer used returned success or error. The log isn't that useful anyway, remove it. Signed-off-by: Todd Poynor Reviewed-by: Rob Springer Signed-off-by: Greg Kroah-Hartman commit 9323bbfa140ca565be637c955e8420ec51ae43f5 Author: Colin Ian King Date: Thu Aug 9 11:44:32 2018 +0100 staging: gasket: apex: remove unused array cm_mappable_regions Array cm_mappable_regions is defined but is never used hence it is redundant and can be removed. Cleans up clang warning: warning: 'cm_mappable_regions' defined but not used [-Wunused-const-variable=] Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman commit 3c0971939e5682bf8c20bdf240900d5014107b57 Author: Sumit Kumar Date: Sun Aug 12 12:38:19 2018 +0530 staging: gasket: remove null ptr check before kfree Remove null ptr check before kfree because kfree is null ptr safe. Issue found by checkpatch. Signed-off-by: Sumit Kumar Signed-off-by: Greg Kroah-Hartman commit 2b2424d9a7e35d05cddf94f3e65a375855064505 Author: Leonardo Brás Date: Thu Aug 9 20:29:34 2018 -0300 staging: fbtft: Adds space around "/" Kernel coding style recommends a space char around "/". Signed-off-by: Leonardo Brás Signed-off-by: Greg Kroah-Hartman commit 13c7a0ecdf8d6db62199a579bf030a7db3b0f43e Author: Nishad Kamdar Date: Thu Aug 23 23:01:11 2018 +0530 staging: mt7621-mmc: Remove macro INIT_MSG and its usages Removed all usages of INIT_MSG and dropped it from dbg.h. Signed-off-by: Nishad Kamdar Signed-off-by: Greg Kroah-Hartman commit 293dcd6592a29eec392312246f2b158195d700d6 Author: Sergio Paracuellos Date: Fri Aug 10 18:58:46 2018 +0200 staging: mt7621-pci: show N_FTS status using a loop There are some printk's which can be replaced properly using dev_* kernel functions. Use dev_info to show N_FTS status for each port using a loop instead of duplicating lines of code. Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman commit 02d72eef1814ea05e2613e5ab6136d8393f8a682 Author: Sergio Paracuellos Date: Fri Aug 10 18:58:45 2018 +0200 staging: mt7621-pci: make some function static There are some functions in driver code that can be declared 'static'. Just do it. Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman commit b9e50d0cfd32274df6a057a59cb0695ae828fa2b Author: Sumit Pundir Date: Fri Aug 10 18:01:40 2018 +0530 staging: mt7621-mmc: place a check for sscanf Placed a check for the return value of sscanf. -EINVAL is returned if the value is anything other than expected. Reported by checkpatch.pl Signed-off-by: Sumit Pundir Signed-off-by: Greg Kroah-Hartman commit a54fe8a6cf66828499b121c3c39c194b43b8ed94 Author: Stefan Wahren Date: Mon Aug 27 19:31:17 2018 +0200 ARM: dts: add Raspberry Pi Compute Module 3 and IO board The Raspberry Pi Compute Module 3 (CM3) and the Raspberry Pi Compute Module 3 Lite (CM3L) are SoMs which contains a BCM2837 processor, 1 GB RAM and a GPIO expander. The CM3 has a 4 GB eMMC, but on the CM3L the eMMC is unpopulated and it's up to the user to connect their own SD/MMC device. The dtsi file is designed to work for both modules. There is also a matching carrier board which is called Compute Module IO Board V3. Signed-off-by: Stefan Wahren commit fff12fcd60d0dff7ea84825d6086306abebc652c Author: Bhaskar Singh Date: Sun Aug 19 22:57:05 2018 +0530 staging: rtl8188eu: Removed unneeded variable This patch removed unneeded variable named ret because this variable is used only to return 0. Signed-off-by: Bhaskar Singh Signed-off-by: Greg Kroah-Hartman commit 22d8eeb32abcf4323757e6044497a2fdd560c0af Author: Bhaskar Singh Date: Tue Aug 21 06:32:22 2018 +0530 staging: rtl8188eu: Removed a function and coded inline This patch removed function named rtw_malloc2d. I removed this function because this function is used exactly once and function call have some overhead also. Maybe this will improve code runtime slightly. Signed-off-by: Bhaskar Singh Signed-off-by: Greg Kroah-Hartman commit 6c352cfd12f40e95635e8f6b6be53f1f958e7f86 Author: Bhaskar Singh Date: Tue Aug 21 07:06:03 2018 +0530 staging: rtl8188eu: Removed code valid for 5GHz This patch removes support for channels > 14. That is from the TODO which says: -find and remove remaining code valid only for 5HGz. Most of obvious ones have been removed, but things like channel > 14 still exist. Signed-off-by: Bhaskar Singh Signed-off-by: Greg Kroah-Hartman commit 0056d8bdea00e614140e654e56928985bf06e0b0 Author: Bhaskar Singh Date: Tue Aug 21 07:14:28 2018 +0530 staging: rtl8188eu: Fix spelling mistake This patch fix spelling mistakes in TODO. Signed-off-by: Bhaskar Singh Signed-off-by: Greg Kroah-Hartman commit 11272dde1e21e2026940be662cea4cf15d055f1f Author: John Whitmore Date: Sun Aug 26 23:45:33 2018 +0100 staging:rtl8192u: Add SPDX-License-Identifier tag - Style Add the missing SPDX-License-Identifier tag to clear the checkpatch issue. This is a coding style change which should not impact runtime code execution. Signed-off-by: John Whitmore Signed-off-by: Greg Kroah-Hartman commit 071327fc42793e9b9e9f5ee164f75854e70140d1 Author: John Whitmore Date: Sun Aug 26 23:45:32 2018 +0100 staging:rtl8192u: Rename PHY_SetRF8256OFDMTxPower() - Style Rename function PHY_SetRF8256OFDMTxPower() to phy_set_rf8256_ofdm_tx_power(), to clear the checkpatch issue with CamelCase naming. This is a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore Signed-off-by: Greg Kroah-Hartman commit 3942039a65170b21737596d32d7acf5894ba03bc Author: John Whitmore Date: Sun Aug 26 23:45:31 2018 +0100 staging:rtl8192u: Rename PHY_SetRF8256CCKTxPower() - Style Rename the function PHY_SetRF8256CCKTxPower() to phy_set_rf8256_cck_tx_power(), to clear the checkpatch issue with CamelCase naming. This is a purely coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore Signed-off-by: Greg Kroah-Hartman commit 319f942517c558d71efa81eb2f276332d1f8bada Author: John Whitmore Date: Sun Aug 26 23:45:30 2018 +0100 staging:rtl8192u: Refactor phy_RF8256_Config_ParaFile() - Style Rename the function phy_RF8256_Config_ParaFile() to phy_rf8256_config_para_file(). This change clears the checkpatch issue with CamelCase naming. Additionally as the function is only ever used in one file, (r8190_rtl8256.c), the function prototype has been removed from the header file, (r8190_rtl8256.h). These changes are purely coding style in nature and should have no impact on runtime code execution. Signed-off-by: John Whitmore Signed-off-by: Greg Kroah-Hartman commit 9980fd11f16ad427ee4b3e88e848f65ebcca07dd Author: John Whitmore Date: Sun Aug 26 23:45:29 2018 +0100 staging:rtl8192u: Rename function PHY_RF8256_Config() - Style Rename the function PHY_RF8256_Config() to phy_rf8256_config(). This change clears the checkpatch issue with CamelCase naming. This is a simple coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore Signed-off-by: Greg Kroah-Hartman commit 7c67160857a2eeb6241f71271e2a8af62a15a3df Author: John Whitmore Date: Sun Aug 26 23:45:28 2018 +0100 staging:rtl8192u: Rename PHY_SetRF8256Bandwidth() - Style Rename the function PHY_SetRF8256Bandwidth() to phy_set_rf8256_bandwidth(). This change clears the checkpatch issue with CamelCase naming. The parameter Bandwidth has been renamed to bandwidth, for the same reason. Additionally a new line has been added to the parameter list of the function declaration in r8190_rtl8256.h to truncate the line length to the checkpatch limit. These changes are simple coding style changes which should have no impact on runtime code execution. Signed-off-by: John Whitmore Signed-off-by: Greg Kroah-Hartman commit b33b80710a54bd19f76eff5a327167234a7ee7f8 Author: Stefan Wahren Date: Sat Aug 4 13:10:02 2018 +0200 dt-bindings: bcm: Add Raspberry Pi CM3 and CM3L This adds the root properties for Raspberry Pi Compute Module 3 and Compute Module 3 Lite. Signed-off-by: Stefan Wahren Reviewed-by: Rob Herring commit 1e7b06f0e09d3249fac5b40d35b3d1fbc8f49871 Author: John Whitmore Date: Sun Aug 26 22:14:39 2018 +0100 staging:rtl8192u: Rename EEPROM_ChannelPlan - Style Rename the constant EEPROM_ChannelPlan to EEPROM_CHANNEL_PLAN, this clears the checkpatch issue with CamelCase naming. This is purely a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore Signed-off-by: Greg Kroah-Hartman commit 89d5bcf46ab25280393016ed4474e8e4742e8b41 Author: John Whitmore Date: Sun Aug 26 22:14:38 2018 +0100 staging:rtl8192u: Rename EEPROM_Customer_ID - Style Rename the constant EEPROM_Customer_ID to EEPROM_CUSTOMER_ID, this change clears the checkpatch issue with CamelCase naming. This is purely a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore Signed-off-by: Greg Kroah-Hartman commit b635fb9f1302e4b4eeea519159d59c0ff648a7c2 Author: John Whitmore Date: Sun Aug 26 22:14:37 2018 +0100 staging:rtl8192u: Rename EEPROM_Default_TxPower - Style rename the constant EEPROM_Default_TxPower to EEPROM_DEFAULT_TX_POWER, this clears the checkpatch issue with CamelCase issue. This is purely a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore Signed-off-by: Greg Kroah-Hartman commit 3e86b6426311eb1e85efbb50cc503b2c4da60288 Author: John Whitmore Date: Sun Aug 26 22:14:36 2018 +0100 staging:rtl8192u: Rename EEPROM_Default_CrystalCap - Style Rename the constant EEPROM_Default_CrystalCap to EEPROM_DEFAULT_CRYSTAL_CAP, this clears the checkpatch issue with CamelCase naming. This is purely a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore Signed-off-by: Greg Kroah-Hartman commit aa37aea128b5d8a314c2f933cbd4e13a0a7c18a7 Author: John Whitmore Date: Sun Aug 26 22:14:35 2018 +0100 staging:rtl8192u: Rename EEPROM_Default_PwDiff - Style Rename the constant EEPROM_Default_PwDiff to EEPROM_DEFAULT_PW_DIFF, this clears the checkpatch issue with CamelCase naming. This change is purely a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore Signed-off-by: Greg Kroah-Hartman commit 74103437df6ad8f18f4a92e14080c60b42ab3d95 Author: John Whitmore Date: Sun Aug 26 22:14:34 2018 +0100 staging:rtl8192u: Rename EEPROM_Default_ThermalMeter - Style Rename the constant EEPROM_Default_ThermalMeter to EEPROM_DEFAULT_THERNAL_METER, this change clears the checkpatch issue with CamelCase naming. This is purely a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore Signed-off-by: Greg Kroah-Hartman commit 81bba51495f5a7b4272600e1b8c5622cedd79bf4 Author: John Whitmore Date: Sun Aug 26 22:14:33 2018 +0100 staging:rtl8192u: rename EEPROM_TxPwIndex_Ver - Style Rename the constant EEPROM_TxPwIndex_Ver to EEPROM_TX_PW_INDEX_VER, this clears the checkpatch issue with CamelCase naming. This is purely a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore Signed-off-by: Greg Kroah-Hartman commit be9bd9d5a7f27c8bcbeb2aa7123b9232638544d6 Author: John Whitmore Date: Sun Aug 26 22:14:32 2018 +0100 staging:rtl8192u: Rename EEPROM_TxPwIndex_CCK_V1 - Style Rename the constant EEPROM_TxPwIndex_CCK_V1 to EEPROM_TX_PW_INDEX_CCK_V1, this clears the checkpatch issue with CamelCase naming. This is purely a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore Signed-off-by: Greg Kroah-Hartman commit e9034dd6e1e7b67aa109120923f854af0af4da83 Author: John Whitmore Date: Sun Aug 26 22:14:31 2018 +0100 staging:rtl8192u: Rename EEPROM_TxPwIndex_OFDM_24G - Style Rename the constant EEPROM_TxPwIndex_OFDM_24G to EEPROM_TX_PW_INDEX_OFDM_24G, this change clears the checkpatch issue with CamelCase naming. This change is a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore Signed-off-by: Greg Kroah-Hartman commit 2b29377bdad51f8ba7e01be8a23e1e19915a65ae Author: John Whitmore Date: Sun Aug 26 22:14:30 2018 +0100 staging:rtl8192u: Rename EEPROM_TxPwIndex_OFDM_24G_V1 - STYLE Rename the constant EEPROM_TxPwIndex_OFDM_24G_V1 to EEPROM_TX_PW_INDEX_OFDM_24G_V1, this change clears the checkpatch issue with CamelCase naming. This is a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore Signed-off-by: Greg Kroah-Hartman commit 3e78c2127d5b09e2ebfecb1afc0ab57339a3bbb2 Author: John Whitmore Date: Sun Aug 26 22:14:29 2018 +0100 staging:rtl8192u: Rename EEPROM_TxPwIndex_CCK - Style Rename the constant EEPROM_TxPwIndex_CCK to EEPROM_TX_PW_INDEX_CCK. This change clears the checkpatch issue with CamelCase naming. The change is coding style in nature so should have no impact on runtime code execution. Signed-off-by: John Whitmore Signed-off-by: Greg Kroah-Hartman commit 7a4a474db375bf07398764fd637461c0a02efb36 Author: John Whitmore Date: Sun Aug 26 22:14:28 2018 +0100 staging:rtl8192u: Rename EEPROM_CrystalCap - Style Rename the constant EEPROM_CrystalCap to EEPROM_CRYSTAL_CAP. This clears the checkpatch issue with CamelCase naming. This is a coding style change which should not impact on runtime code execution. Signed-off-by: John Whitmore Signed-off-by: Greg Kroah-Hartman commit 98dbfe8bfff565f950f71d9b7f4fdc603feb423c Author: John Whitmore Date: Sun Aug 26 22:14:27 2018 +0100 staging:rtl8192u: Rename EEPROM_PwDiff - Style Rename the constant EEPROM_PwDiff to EEPROM_PW_DIFF. This change clears the checkpatch issue with CamelCase naming. This is a coding style change which should not impact on runtime code execution. Signed-off-by: John Whitmore Signed-off-by: Greg Kroah-Hartman commit 9bfe573611876db351dc769661162ab74cd96873 Author: John Whitmore Date: Sun Aug 26 22:14:26 2018 +0100 staging:rtl8192u: Rename EEPROM_ThermalMeter - Style Rename EEPROM_ThermalMeter to EEPROM_THERMAL_METER. This change clears the checkpatch issue with CamelCase naming. This change is a coding style change which should not impact on runtime code execution. Signed-off-by: John Whitmore Signed-off-by: Greg Kroah-Hartman commit e94d958580d0f0b666a6adfa589f564d3900606a Author: John Whitmore Date: Sun Aug 26 22:14:25 2018 +0100 staging:rtl8192u: Rename EEPROM_TxPowerDiff - Style Rename EEPROM_TxPowerDiff to EEPROM_TX_POWER_DIFF. This change clears the checkpatch issue with CamelCase naming. This change is purely a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore Signed-off-by: Greg Kroah-Hartman commit 69b281907429c4c90b2f73d5a71be51e4cc534f2 Author: John Whitmore Date: Sun Aug 26 22:14:24 2018 +0100 staging:rtl8192u: Reorder enum _RTL8192Usb_HW members - Style Reorder the members of enum _RTL8192Usb_HW so that they are in order. This is a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore Signed-off-by: Greg Kroah-Hartman commit 12a2b6f6ea01235aa5bec68013fe50b3b9f11751 Author: John Whitmore Date: Sun Aug 26 22:14:23 2018 +0100 staging:rtl8192u: Remove unused definitions - Style Remove unused definitions from the r8192U_hw.h header file. These are coding style changes which should not impact on runtime code execution. Signed-off-by: John Whitmore Signed-off-by: Greg Kroah-Hartman commit 111118af91c4bf06791a902789bd03992b41faf0 Author: John Whitmore Date: Sun Aug 26 22:14:22 2018 +0100 staging:rtl8192u: Refactor BaseBand_Config_Type - Style Rename the type to baseband_config_type to clear the checkpatch issue with CamelCase naming. Remove the 'typedef' directive to clear the issue with defining new types. As it is only used in the file r819xU_phy.c the type has been moved to the r819xU_phy.h file. The enumerated type is only used as a parameter to the function rtl8192_phyConfigBB. Previously that parameter used type 'u8' so no compiler typechecking was being performed. The parameter type has been corrected. These changes are coding style changes and as such should have no impact on runtime code execution. Signed-off-by: John Whitmore Signed-off-by: Greg Kroah-Hartman commit 4a4c1b7ceb8a9c36a45a04dc26232d25f804120b Author: John Whitmore Date: Sun Aug 26 22:14:21 2018 +0100 staging:rtl8192u: Make function rtl8192_phyConfigBB static The function rtl8192_phyConfigBB is only used in the file in which it is defined so can be declared static. Additionally the prototype has been removed from the header file, as it is not used. Signed-off-by: John Whitmore Signed-off-by: Greg Kroah-Hartman commit 1d5de99435c7a5dcf64ea106e6fdaada5847664e Author: John Whitmore Date: Sun Aug 26 22:14:20 2018 +0100 staging:rtl8192u: Refactor RT_RF_TYPE_DEF - Style Rename the enumerated type RT_RF_TYPE_DEF to rt_rf_type to comply with the coding standard, lower case type names. Removed the 'def' postscript which provides no additional information. The 'typedef' directive has been removed to clear the checkpatch issue with defining new types. The type has been moved to the file r8192U.h, where it is actually used by the member variable 'rf_type'. Previously the member variable used a 'u8' type so no compiler type checking is being performed. The type has been changed to the correct type. Signed-off-by: John Whitmore Signed-off-by: Greg Kroah-Hartman commit 64749a7e54e36bf33b0c9c69a567d3f682587107 Author: John Whitmore Date: Sun Aug 26 22:14:19 2018 +0100 staging:rtl8192u: Refactor enum VERSION_819xU - Style Rename enumerated type VERSION_819xU to version_819xu to clear checkpatch issue with CamelCase naming. Additionally the constants defined by the type are renamed for the same reason. Remove the 'typedef' directive to clear the checkpatch issue with defining new types. The enumerated type has been moved to the file where the type is actually used, r8192U.h Additionally the memeber variable, which uses the type (card_8192_version), has been changed to use the type to enable compiler typechecking. These are coding style changes which should not impact runtime code execution. Signed-off-by: John Whitmore Signed-off-by: Greg Kroah-Hartman commit 6367ae41f2c46889ef611843a1a48de03714673b Author: John Whitmore Date: Tue Aug 21 18:15:37 2018 +0100 staging:rtl8192u: Remove commented out code and indent - Style Remove old commented out structure and clean up the indentation. These are coding style changes which should have no impact on runtime code execution. Signed-off-by: John Whitmore Signed-off-by: Greg Kroah-Hartman commit 9f4887109a0a3555cf38c83b3cb7d8b087c52ad4 Author: John Whitmore Date: Tue Aug 21 18:15:36 2018 +0100 staging:rtl8192u: Rename BaStartSeqCtrl - Style Rename BaStartSeqCtrl to start_seq_ctrl. This change clears the checkpatch issue with CamelCase naming. This is a coding style change which should not impact runtime code execution. Signed-off-by: John Whitmore Signed-off-by: Greg Kroah-Hartman commit ea62c80ad30d4cabfc2898e70af8731e073006fb Author: John Whitmore Date: Tue Aug 21 18:15:35 2018 +0100 staging:rtl8192u: Rename BaTimeoutValue - Style Rename BaTimeoutValue to timeout_value. This clears checkpatch issue with CamelCase naming. This is a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore Signed-off-by: Greg Kroah-Hartman commit a3ba6bb9a38eea467d0fb8838a01f0fbc5d7f3bc Author: John Whitmore Date: Tue Aug 21 18:15:34 2018 +0100 staging:rtl8192u: Rename BaParamSet - Style Rename the member variable BaParamSet to param_set. This clears the checkpatch issue with CamelCase naming. This is a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore Signed-off-by: Greg Kroah-Hartman commit efff422454f3b09ecc4e4a6fbfe94676b9666d44 Author: John Whitmore Date: Tue Aug 21 18:15:33 2018 +0100 staging:rtl8192u: Rename DialogToken - Style Rename the member variable DialogToken to dialog_token. This clears the checkpatch issue with CamelCase naming. This is a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore Signed-off-by: Greg Kroah-Hartman commit 1f9766a0625e762cc34bc65b2f418703c7eab103 Author: John Whitmore Date: Tue Aug 21 18:15:32 2018 +0100 staging:rtl8192u: Rename bValid - Style Rename the member variable bValid to valid, this clears the checkpatch issue with CamelCase naming. This is a coding style change which should have no impatch on runtime code execution. Signed-off-by: John Whitmore Signed-off-by: Greg Kroah-Hartman commit 6fcb0759b99dfef56f2be7ba967431bfc59ce0b4 Author: John Whitmore Date: Tue Aug 21 18:15:31 2018 +0100 staging:rtl8192u: Rename member variable Timer - Style Rename the member variable Timer to all lowercase to clear the checkpatch issue with CamelCase naming. This change is purely a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore Signed-off-by: Greg Kroah-Hartman commit f813f408a145ebb34e468a0c9b711d33bd6b876e Author: John Whitmore Date: Tue Aug 21 18:15:30 2018 +0100 staging:rtl8192u: Refactor struct BA_RECORD - Style Remove the 'typedef' directive from the BA_RECORD structure, to clear the checkpatch issue with defining new types. Additionally rename the structure to lowercase to comply with the coding style. These changes are purely coding style changes which should have no impact on runtime code execution. Signed-off-by: John Whitmore Signed-off-by: Greg Kroah-Hartman commit ea7b840cb61ad3b6d44be953a781cc3eb92adae8 Author: John Whitmore Date: Tue Aug 21 18:15:29 2018 +0100 staging:rtl8192u: Refactor union delba_param_set - Style remove member 'charData' from the union delba_param_set, as it is not used in code. The remaining member variables have all been renamed to clear the checkpatch issue with CamelCase naming. shortData to short_data Reserved to reserved Initiator to initiator TID to tid These changes are all coding style changes which should have no impact on runtime code execution. Signed-off-by: John Whitmore Signed-off-by: Greg Kroah-Hartman commit d07b07f89350cf127082d3cdf321270c36c43b83 Author: John Whitmore Date: Tue Aug 21 18:15:28 2018 +0100 staging:rtl8192u: Refactor DELBA_PARAM_SET - Style Remove the typedef directive from union DELBA_PARAM_SET, to clear the checkpatch issue with CamelCase naming. Rename the union to lowercase to comply with the coding standard. These changes are coding style changes which should have no impact on runtime code execution. Signed-off-by: John Whitmore Signed-off-by: Greg Kroah-Hartman commit be433db16f775a82fe307e35abbc57ba8c7b9db7 Author: John Whitmore Date: Tue Aug 21 18:15:27 2018 +0100 staging:rtl8192u: Rename ba_param_set members - Style Rename the member variables of union ba_param_set to clear the checkpatch issue with CamelCase naming: AMSDU_Support to amsdu_support BAPolicy to ba_policy TID to tid BufferSize to buffer_size These are coding style changes which should have no impact on runtime code execution. Signed-off-by: John Whitmore Signed-off-by: Greg Kroah-Hartman commit 21c875a59c99529429cc9ffa9f24bfa0821e0327 Author: John Whitmore Date: Tue Aug 21 18:15:26 2018 +0100 staging:rtl8192u: Remove charData and rename shortData - Style The union ba_param_set contains the member variable charData which is unused. The variable has been removed. Additionally the member variable shortData has been renamed to clear a checkpatch issue with CamelCase naming. These are coding style changes which should not impact runtime code execution. Signed-off-by: John Whitmore Signed-off-by: Greg Kroah-Hartman commit 0078a6e54e22dbba2cea0bf1bd2ecca997e517b9 Author: John Whitmore Date: Tue Aug 21 18:15:25 2018 +0100 staging:rtl8192u: Refactor BA_PARAM_SET - Style Refactor the union BA_PARAM_SET, firstly removing the 'typedef', this clears the checkpatch issue with defining new types. Secondly the union is renamed to lowercase to comply with the coding standard. These are coding style changes which should have no impact on runtime code execution. Signed-off-by: John Whitmore Signed-off-by: Greg Kroah-Hartman commit 198a136f7f240c8640387b5bd27117b94dc5bd8d Author: John Whitmore Date: Tue Aug 21 18:15:24 2018 +0100 staging:rtl8192u: Rename member variables - Style Rename the member variables FragNum and SeqNum. This change clears a checkpatch issue with CamelCase naming. This is a coding style change and should have no impact on runtime code execution. Signed-off-by: John Whitmore Signed-off-by: Greg Kroah-Hartman commit 56f6e5a7e4d756162ad4af471f75c0074a0f505d Author: John Whitmore Date: Tue Aug 21 18:15:23 2018 +0100 staging:rtl8192u: Rename ShortData - Style Rename the ShortData member variable to short_data. This clears a checkpatch issue with CamelCase naming. This is a coding style change which should not impact runtime code execution. Signed-off-by: John Whitmore Signed-off-by: Greg Kroah-Hartman commit f9406665ffe70043dba7728b1b7d969d19bd90c7 Author: John Whitmore Date: Tue Aug 21 18:15:22 2018 +0100 staging:rtl8192u: Refactor SEQUENCE_CONTROL - Style Remove the 'typedef' from union SEQUENCE_CONTROL. This clears a checkpatch issue with defining new types. Additionally renamed the union to lowercase to comply with coding standard. These are coding style changes which should not impact runtime code execution. typedef union _SEQUENCE_CONTROL{ +union sequence_control { Signed-off-by: John Whitmore Signed-off-by: Greg Kroah-Hartman commit 1f20545654e6de19de3d3582b067d550dded36bf Author: John Whitmore Date: Tue Aug 21 18:15:21 2018 +0100 staging:rtl8192u: Remove unused defines - Style Remove a number of unused constant definitions. This is a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore Signed-off-by: Greg Kroah-Hartman commit 2c6d0ee300c84a2c3a3f9ed8c72269f181182117 Author: John Whitmore Date: Fri Aug 17 19:34:47 2018 +0100 staging:rtl8192u: Refactor struct HT_CAPABILITY_ELE - Style The structure HT_CAPABILITY_ELE causes a number of checkpatch / coding style issues. The structure uses a 'typedef' directive causing an issue regarding defining new types in the code. The name of the structure should be lowercase, and the '__packed' directive is prefered over the attribute directive. The typedef has been removed, structure renamed to ht_capability_ele and the '__packed' directive used. These are coding style changes and should not impact on runtime code execution. Signed-off-by: John Whitmore Signed-off-by: Greg Kroah-Hartman commit 9ff6cdd3934a38589bc1895a898bf11a5f50b4b7 Author: John Whitmore Date: Fri Aug 17 19:34:46 2018 +0100 staging:rtl8192u: Remove enum CHNLOP - Style The enumerated type CHNLOP is only used as a member variable of the structure RT_HIGH_THROUGHPUT. Whilst this member variable is initialised it is never actually used in the code. To simplify the code both the enumerated type and the member variable have been removed. This is a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore Signed-off-by: Greg Kroah-Hartman commit ccedf8912c36a7a7d62c85b28973a0b4e0d86cfe Author: John Whitmore Date: Fri Aug 17 19:34:45 2018 +0100 staging:rtl8192u: Removed commented out structure - Style Two unions HT_CAPABILITY and HT_CAPABILITY_MACPARA have previously been commented out of code. Since they are obviously not used in code and the commented out unions add nothing to the code they have been removed. This is a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore Signed-off-by: Greg Kroah-Hartman commit 40602a0d1f34af110c5b0c2a9fc495f571b29b63 Author: John Whitmore Date: Fri Aug 17 19:34:44 2018 +0100 staging:rtl8192u: Remove unused CHHLOP_IN_PROGRESS - Style The macro CHHLOP_IN_PROGRESS is never used in code, so has been removed. This is a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore Signed-off-by: Greg Kroah-Hartman commit 47bd0dc30eacac7d413d12b46ee965afa4b83426 Author: John Whitmore Date: Fri Aug 17 19:34:43 2018 +0100 staging:rtl8192u: Correct block comments - Style Correct the block comments so they conform to coding standard. This is a coding style change which should not impact on runtime code execution. Signed-off-by: John Whitmore Signed-off-by: Greg Kroah-Hartman commit 362ed57ee889db184109b85677ea94a96bd8bbec Author: John Whitmore Date: Fri Aug 17 19:34:42 2018 +0100 staging:rtl8192u: Remove unused constants - Style Remove unused constants, this is a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore Signed-off-by: Greg Kroah-Hartman commit 0df408add7afddd0c7f524d03ac6c62052f2a9ed Author: John Whitmore Date: Fri Aug 17 19:34:41 2018 +0100 staging:rtl8192u: Add required spaces - Style Add spaces required by coding style to clear checkpatch issues. This is a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore Signed-off-by: Greg Kroah-Hartman commit 50a37490b169d87efba1bbaa6ba093a90bb83c5a Author: John Whitmore Date: Fri Aug 17 19:34:40 2018 +0100 staging:rtl8192u: Remove unnecessary blank lines - Style Removed blank lines which cause checkpatch issues. This is a simple coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore Signed-off-by: Greg Kroah-Hartman commit 3f119c9da3b8581eb96178254b6d78a44b076edf Author: John Whitmore Date: Fri Aug 17 19:34:39 2018 +0100 staging:rtl8192u: Rename sHTCLng - Style The constant sHTCLng causes a checkpatch issue, due to its use of CamelCase naming. To correct the issue the constant has been renamed to HTCLNG. I'm not sure this is a good name as it communicates very little and contradicts the block comment above its definition. MCS_LEN might be a better name if the block comment is correct. Additionally the block comment has been changed to the recommended style. This is a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore Signed-off-by: Greg Kroah-Hartman commit fe9756ee9e0c71c09bee4d154e339c77a81312a7 Author: John Whitmore Date: Fri Aug 17 19:34:38 2018 +0100 staging:rtl8192u: Replace magic number with defined constant - Style The defined constant MIMO_PS_STATIC is used for this test for zero elsewhere in code so the magic number '0' has been replaced with that comment, which was actually explicitly mentioned in the comment. This is a simple coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore Signed-off-by: Greg Kroah-Hartman commit 34fbab5f0a028ded186cebf09c94f783bfed4c6c Author: Bhaskar Singh Date: Fri Aug 17 13:21:26 2018 +0530 staging: rtl8188eu: Removed unnecessary parentheses Removed unnecessary parentheses and this resolve the check patch issue. Structure dereference operator have higher precedence then Address of operator So there is no need of parentheses. This change is purely coding style in nature and should have not effect on runtime code execution. Signed-off-by: Bhaskar Singh Signed-off-by: Greg Kroah-Hartman commit c19636f5dc1d57fd1054f7e87bd54a03ad5d4372 Author: Michael Straube Date: Fri Aug 10 09:18:33 2018 +0200 staging: rtl8188eu: use phydm_reg.h from rtlwifi Use rtlwifi/phydm/phydm_reg.h instead of odm_reg.h and remove the now unused odm_reg.h. All defines from odm_reg.h are defined with the same values in rtlwifi/phydm/phydm_reg.h. Signed-off-by: Michael Straube Reviewed-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman commit fa1deb227d799f8de73356a17f5b552f9ff3fa3e Author: Michael Straube Date: Fri Aug 10 09:18:32 2018 +0200 staging: rtl8188eu: remove unused IS_MCAST Remove the now unused IS_MCAST. Signed-off-by: Michael Straube Reviewed-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman commit 2bd827a8d81586f80a6d53c0bc81a6c66a13bcf5 Author: Michael Straube Date: Fri Aug 10 09:18:31 2018 +0200 staging: rtl8188eu: use is_multicast_ether_addr in rtw_xmit.c Use is_multicast_ether_addr instead of custom IS_MCAST in core/rtw_xmit.c. In all uses the address array is properly aligned. Signed-off-by: Michael Straube Reviewed-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman commit e232f8841e1bad4850c2da8ecc267b4eac071cb6 Author: Michael Straube Date: Fri Aug 10 09:18:30 2018 +0200 staging: rtl8188eu: use is_multicast_ether_addr in rtw_recv.c Use is_multicast_ether_addr instead of custom IS_MCAST in core/rtw_recv.c. In all uses the address array/memory is properly aligned. Signed-off-by: Michael Straube Reviewed-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman commit 3bd589eb93a50cade27bc37072eeacb0c66cc78e Author: Michael Straube Date: Fri Aug 10 09:18:29 2018 +0200 staging: rtl8188eu: use is_multicast_ether_addr in rtw_security.c Use is_multicast_ether_addr instead of custom IS_MCAST in core/rtw_security.c. In all uses the address array is properly aligned. Signed-off-by: Michael Straube Reviewed-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman commit f1d18719393ba80359e68b3268736a0c8f4ac8b2 Author: John Whitmore Date: Wed Aug 8 22:00:36 2018 +0100 staging:rtl8192u: Rename ToLegalChannel - Style Rename the function ToLegalChannel, which causes a checkpatch issue due to its use of CamelCase naming. The function has been renamed to to_legal_channel. This is a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore Signed-off-by: Greg Kroah-Hartman commit b56b1438a103a6ab80c29dbce2a0033999ac30c1 Author: John Whitmore Date: Wed Aug 8 22:00:35 2018 +0100 staging:rtl8192u: Rename IsLegalChannel - Style The function IsLegalChannel causes a checkpatch issue due to its use of CamelCase naming. The function has been renamed to is_legal_channel. This is a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore Signed-off-by: Greg Kroah-Hartman commit e859737a15a47fd6035175c928d800ab35c67125 Author: John Whitmore Date: Wed Aug 8 22:00:34 2018 +0100 staging:rtl8192u: Rename DOT11D_ScanComplete - Style The function DOT11D_ScanComplete causes a checkpatch issue due to its use of CamelCase naming. The function has been renamed to dot11d_scan_complete. This is a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore Signed-off-by: Greg Kroah-Hartman commit 715a3d9336f40a5a7a57762d5a03a15368eab166 Author: John Whitmore Date: Wed Aug 8 22:00:33 2018 +0100 staging:rtl8192u: Rename Channel - Style The function dot11d_get_max_tx_pwr_in_dbm() uses a parameter name, Channel, which causes a checkpatch issue with CamelCase naming. The parameter has been renamed to channel. The change is a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore Signed-off-by: Greg Kroah-Hartman commit 869b4372677cd48e601d19f8006487b3719cf8eb Author: John Whitmore Date: Wed Aug 8 22:00:32 2018 +0100 staging:rtl8192u: Rename DOT11D_GetMaxTxPwrInDbm - Style The function DOT11D_GetMaxTxPwrInDbm causes a checkpatch issue due to its use of CamelCase naming. The function has been renamed to dot11d_get_max_tx_pwr_in_dbm. This is a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore Signed-off-by: Greg Kroah-Hartman commit b83ff82670f3793360d1d360599fe7fcd9ec019b Author: John Whitmore Date: Wed Aug 8 22:00:31 2018 +0100 staging:rtl8192u: Rename dot11d_update_country_ie() parameters - Style The function dot11d_update_country_ie() uses parameter names which cause a checkpatch issue due to the use of CamelCase naming. This is a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore Signed-off-by: Greg Kroah-Hartman commit d1f91e04395243c03f17dabf54cba70b36c3ad01 Author: John Whitmore Date: Wed Aug 8 22:00:30 2018 +0100 staging:rtl8192u: Rename Dot11d_UpdateCountryIe - Style The function Dot11d_UpdateCountryIe causes a checkpatch issue due to its use of CamelCase naming, the function has been renamed to dot11d_update_country_ie. This is a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore Signed-off-by: Greg Kroah-Hartman commit 6a184731c2a09834a6549afea040485820396b24 Author: John Whitmore Date: Wed Aug 8 22:00:29 2018 +0100 staging:rtl8192u: Rename Dot11d_Reset - Style The function Dot11d_Reset causes a checkpatch issue due to its use of CamelCase naming, so has been renamed to dot11d_reset. This is a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore Signed-off-by: Greg Kroah-Hartman commit c01f06b7506f9769d230b1eb103330eb47a8bfe7 Author: John Whitmore Date: Wed Aug 8 22:00:28 2018 +0100 staging:rtl8192u: Rename Dot11d_Init - Style The function Dot11d_Init() causes a checkpatch issue due to its use of CamelCase naming. The function has been renamed to dot11d_init. This is a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore Signed-off-by: Greg Kroah-Hartman commit bbb151166560a7372e55d442cb42ea7038b61e3c Author: John Whitmore Date: Wed Aug 8 22:00:27 2018 +0100 staging:rtl8192u: Lines should not end with a '(' - Style A number of function prototypes cause a checkpatch issue - "Lines should not end with a '(' ". This issue has been cleared by moving function prototype parameters to the same line as the function name. This is a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore Signed-off-by: Greg Kroah-Hartman commit bc3ae2415becf994002067273677a3b4514ed907 Author: John Whitmore Date: Wed Aug 8 22:00:26 2018 +0100 staging:rtl8192u: Rename __pTa - Style The macro parameter __pTa causes a checkpatch issue because of its use of CamelCase naming. The parameter has this been renamed to addr. This is a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore Signed-off-by: Greg Kroah-Hartman commit abdc4cae86f03c7cb319ac9cbb573e27b74c59bc Author: John Whitmore Date: Wed Aug 8 22:00:25 2018 +0100 staging:rtl8192u: Rename macro parameter __pIeeeDev - Style Multiple macros, defined in dot11d.h, use the variable __pIeeeDev as a parameter. This name causes a checkpatch issue due to its use of CamelCase naming. The parameter name has been changed to ieee_dev to clear this issue. This is a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore Signed-off-by: Greg Kroah-Hartman commit 51e1eb742745ffd3ee0960eaf20507ca2f44bb64 Author: John Whitmore Date: Wed Aug 8 22:00:24 2018 +0100 staging:rtl8192u: Replace magic number 6 with ETH_ALEN - Style The array size 6 represents the length of an Ethernet address so the magic number has been replaced with the defined constant representing that length. This is a coding style change which should not impact runtime code execution. Signed-off-by: John Whitmore Signed-off-by: Greg Kroah-Hartman commit ace3c2a23cf8170ba5d5db45d8150f9d15773fb8 Author: John Whitmore Date: Wed Aug 8 22:00:23 2018 +0100 staging:rtl8192u: Remove macro cpMacAddr - Style The macro cpMacAddr implements the same functionality as the ether_addr_copy function defined in etherdevice.h, as a result the macro has been removed from the code, and its use replaced with the function call. Note that the header comment of the function ether_addr_copy states that the two byte arrays passed as parameters to the function must be u16 aligned. Because of this the structure ieee80211_network has had its member variables re-ordered so that the members bssid and MBssid are aligned to a u16 boundary. This is a coding style change which should have no impact on runtime code execution. Suggested-by: Joe Perches Signed-off-by: John Whitmore Signed-off-by: Greg Kroah-Hartman commit 9391bea9ad4e7d4b3ad5748c080061bafcb1693f Author: John Whitmore Date: Wed Aug 8 22:00:22 2018 +0100 staging:rtl8192u: Remove macro eqMacAddr - Style The macro eqMacAddr implements the same functionality as the ether_addr_equal function defined in etherdevice.h, as a result the macro has been removed from the code, and its use replaced with the function call. Note that to use the ether_addr_equal function the data array containing the MAC Address has to be u16 aligned. Because of this the struct rt_dot11d_info has had it's member variables re-ordered. This is a coding style change which should have no impact on runtime code execution. Suggested-by: Joe Perches Signed-off-by: John Whitmore Signed-off-by: Greg Kroah-Hartman commit 07e6d3f03b5ff7b93af37932ee0f4b775812274f Author: Huang Rui Date: Tue Jul 31 21:24:40 2018 +0800 drm/amdgpu: move PD/PT bos on LRU again The new bulk moving functionality is ready, the overhead of moving PD/PT bos to LRU is fixed. So move them on LRU again. Signed-off-by: Huang Rui Tested-by: Mike Lothian Tested-by: Dieter Nützel Acked-by: Chunming Zhou Reviewed-by: Junwei Zhang Signed-off-by: Alex Deucher commit f921661bd4a112f80d57bbfb3e792da63787f4b0 Author: Huang Rui Date: Mon Aug 6 10:57:08 2018 +0800 drm/amdgpu: use bulk moves for efficient VM LRU handling (v6) I continue to work for bulk moving that based on the proposal by Christian. Background: amdgpu driver will move all PD/PT and PerVM BOs into idle list. Then move all of them on the end of LRU list one by one. Thus, that cause so many BOs moved to the end of the LRU, and impact performance seriously. Then Christian provided a workaround to not move PD/PT BOs on LRU with below patch: Commit 0bbf32026cf5ba41e9922b30e26e1bed1ecd38ae ("drm/amdgpu: band aid validating VM PTs") However, the final solution should bulk move all PD/PT and PerVM BOs on the LRU instead of one by one. Whenever amdgpu_vm_validate_pt_bos() is called and we have BOs which need to be validated we move all BOs together to the end of the LRU without dropping the lock for the LRU. While doing so we note the beginning and end of this block in the LRU list. Now when amdgpu_vm_validate_pt_bos() is called and we don't have anything to do, we don't move every BO one by one, but instead cut the LRU list into pieces so that we bulk move everything to the end in just one operation. Test data: +--------------+-----------------+-----------+---------------------------------------+ | |The Talos |Clpeak(OCL)|BusSpeedReadback(OCL) | | |Principle(Vulkan)| | | +------------------------------------------------------------------------------------+ | | | |0.319 ms(1k) 0.314 ms(2K) 0.308 ms(4K) | | Original | 147.7 FPS | 76.86 us |0.307 ms(8K) 0.310 ms(16K) | +------------------------------------------------------------------------------------+ | Orignial + WA| | |0.254 ms(1K) 0.241 ms(2K) | |(don't move | 162.1 FPS | 42.15 us |0.230 ms(4K) 0.223 ms(8K) 0.204 ms(16K)| |PT BOs on LRU)| | | | +------------------------------------------------------------------------------------+ | Bulk move | 163.1 FPS | 40.52 us |0.244 ms(1K) 0.252 ms(2K) 0.213 ms(4K) | | | | |0.214 ms(8K) 0.225 ms(16K) | +--------------+-----------------+-----------+---------------------------------------+ After test them with above three benchmarks include vulkan and opencl. We can see the visible improvement than original, and even better than original with workaround. v2: move all BOs include idle, relocated, and moved list to the end of LRU and put them together. v3: remove unused parameter and use list_for_each_entry instead of the one with save entry. v4: move the amdgpu_vm_move_to_lru_tail after command submission, at that time, all bo will be back on idle list. v5: remove amdgpu_vm_move_to_lru_tail_by_list(), use bulk_moveable instread of validated, and move ttm_bo_bulk_move_lru_tail() also into amdgpu_vm_move_to_lru_tail(). v6: clean up and fix return value. Signed-off-by: Christian König Signed-off-by: Huang Rui Tested-by: Mike Lothian Tested-by: Dieter Nützel Acked-by: Chunming Zhou Reviewed-by: Junwei Zhang Signed-off-by: Alex Deucher commit 7748e2dcdaad901776c0d78e76e066403e95513c Author: Huang Rui Date: Mon Aug 6 17:28:35 2018 +0800 drm/ttm: add bulk move function on LRU This function allow us to bulk move a group of BOs to the tail of their LRU. The positions of group of BOs are stored on the (first, last) bulk_move_pos structure. Signed-off-by: Christian König Signed-off-by: Huang Rui Tested-by: Mike Lothian Tested-by: Dieter Nützel Acked-by: Chunming Zhou Reviewed-by: Junwei Zhang Signed-off-by: Alex Deucher commit 9a2779528eddacf0123bfd7308b71141b54cc619 Author: Christian König Date: Mon Aug 6 17:05:30 2018 +0800 drm/ttm: revise ttm_bo_move_to_lru_tail to support bulk moves When move a BO to the end of LRU, it need remember the BO positions. Make sure all moved bo in between "first" and "last". And they will be bulk moving together. Signed-off-by: Christian König Signed-off-by: Huang Rui Tested-by: Mike Lothian Tested-by: Dieter Nützel Acked-by: Chunming Zhou Reviewed-by: Junwei Zhang Signed-off-by: Alex Deucher commit 8c7655a0fdd32ab39cfef604403dbe1013df213b Author: Christian König Date: Mon Aug 6 16:46:26 2018 +0800 drm/ttm: add helper structures for bulk moves on lru list Add bulk move pos to store the pointer of first and last buffer object. The list in between will be bulk moved on lru list. Signed-off-by: Christian König Signed-off-by: Huang Rui Tested-by: Mike Lothian Tested-by: Dieter Nützel Acked-by: Chunming Zhou Reviewed-by: Junwei Zhang Signed-off-by: Alex Deucher commit 11c3a249ff7a1c710011bd06a451956f2a40c30c Author: Christian König Date: Wed Aug 22 12:22:14 2018 +0200 drm/amdgpu: add amdgpu_gmc_pd_addr helper Add a helper to get the root PD address and remove the workarounds from the GMC9 code for that. Signed-off-by: Christian König Acked-by: Felix Kuehling Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 4e830fb1b5f589352e711fc0df515c34e978e1a0 Author: Christian König Date: Tue Aug 21 17:18:22 2018 +0200 drm/amdgpu: remove gart.table_addr We can easily figure out the address on the fly. Signed-off-by: Christian König Reviewed-by: Junwei Zhang Signed-off-by: Alex Deucher commit 1123b989c50613ea555c51ced26257e54c6fa029 Author: Christian König Date: Tue Aug 21 17:07:47 2018 +0200 drm/amdgpu: rename gart.robj into gart.bo sed -i "s/gart.robj/gart.bo/" drivers/gpu/drm/amd/amdgpu/*.c sed -i "s/gart.robj/gart.bo/" drivers/gpu/drm/amd/amdgpu/*.h Just cleaning up radeon leftovers. Signed-off-by: Christian König Reviewed-by: Huang Rui Reviewed-by: Junwei Zhang Signed-off-by: Alex Deucher commit cbd528514276dce3a8057cff18ef328c35b49d95 Author: Christian König Date: Tue Aug 21 16:47:01 2018 +0200 drm/amdgpu: move setting the GART addr into TTM Move setting the GART addr for window based copies into the TTM code who uses it. Signed-off-by: Christian König Reviewed-by: Huang Rui Reviewed-by: Junwei Zhang Signed-off-by: Alex Deucher commit 9a02ece43ee49efdfad19a3ca90c02d20f491031 Author: Christian König Date: Fri Aug 17 15:07:13 2018 +0200 drm/amdgpu: cleanup VM handling in the CS a bit Add a helper function for getting the root PD addr and cleanup join the two VM related functions and cleanup the function name. No functional change. Signed-off-by: Christian König Reviewed-by: Huang Rui Reviewed-by: Junwei Zhang Signed-off-by: Alex Deucher commit 262b9c392e7dbe264b075fa5ad6a0de5a403da7a Author: Christian König Date: Wed Aug 15 19:10:40 2018 +0200 drm/amdgpu: validate the VM root PD from the VM code Preparation for following changes. This validates the root PD twice, but the overhead of that should be minimal. Signed-off-by: Christian König Reviewed-by: Junwei Zhang Signed-off-by: Alex Deucher commit 12938fad234a3924cc9b82080db4f62fe1cf52bb Author: Christian König Date: Tue Aug 21 10:45:29 2018 +0200 drm/amdgpu: cleanup GPU recovery check a bit (v2) Check if we should call the function instead of providing the forced flag. v2: rebase on KFD changes (Alex) Signed-off-by: Christian König Acked-by: Andrey Grodzovsky Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 1849e73748be3c80bf752e4c4877fe90a8da4822 Author: kbuild test robot Date: Wed Aug 22 10:31:01 2018 +0800 drm/amdgpu: amdgpu_kiq_reg_write_reg_wait() can be static Fixes: d790449835e6 ("drm/amdgpu: use kiq to do invalidate tlb") Reviewed-by: Emily Deng Signed-off-by: kbuild test robot Signed-off-by: Alex Deucher commit 11c3ee48bd7c232c0a750b4dde8ee48f315dcdf3 Author: Alex Deucher Date: Tue Aug 14 14:53:52 2018 -0500 drm/amdgpu/display: add support for LVDS (v5) This adds support for LVDS displays. v2: add support for spread spectrum, sink detect v3: clean up enable_lvds_output v4: fix up link_detect v5: remove assert on 888 format Bug: https://bugs.freedesktop.org/show_bug.cgi?id=105880 Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher commit ae74da3e145198dfb766c7beddd473fad2fb2a5b Author: Emily Deng Date: Wed Aug 22 20:32:23 2018 +0800 drm/amdgpu: Don't use kiq in gpu reset When in gpu reset, don't use kiq, it will generate more TDR. Signed-off-by: Emily Deng Reviewed-by: Christian König . Signed-off-by: Alex Deucher commit c89677afb30582f16d7378a324e3e3f1c07e69b2 Author: Nayan Deshmukh Date: Tue Aug 21 18:59:08 2018 +0530 drm/scheduler: avoid redundant shifting of the entity v2 do not remove entity from the rq if the current rq is from the least loaded scheduler. Signed-off-by: Nayan Deshmukh Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 43fbbe89f15b297e269388dee63901715e55d712 Author: Dan Carpenter Date: Tue Aug 14 12:09:45 2018 +0300 drm/amd/display: indent an if statement The if statement isn't indented and it makes static checkers complain. Signed-off-by: Dan Carpenter Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher commit 35fb7220742b80dadd7218448b4bee5b190c9f07 Author: Wen Yang Date: Fri Aug 17 11:09:48 2018 +0800 drm/amd/display: fix a compile warning Fix comile warning like, CC [M] drivers/gpu/drm/i915/gvt/execlist.o CC [M] drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv50.o CC [M] drivers/gpu/drm/radeon/btc_dpm.o CC [M] drivers/isdn/hisax/avm_a1p.o CC [M] drivers/gpu/drm/amd/amdgpu/../display/dc/dcn10/dcn10_dpp.o drivers/gpu/drm/amd/amdgpu/../display/dc/dcn10/dcn10_hw_sequencer.c: In function ‘dcn10_update_mpcc’: drivers/gpu/drm/amd/amdgpu/../display/dc/dcn10/dcn10_hw_sequencer.c:1903:9: warning: missing braces around initializer [-Wmissing-braces] struct mpcc_blnd_cfg blnd_cfg = {0}; ^ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn10/dcn10_hw_sequencer.c:1903:9: warning: (near initialization for ‘blnd_cfg.black_color’) [-Wmissing-braces] Acked-by: Randy Dunlap Signed-off-by: Wen Yang Reviewed-by: Jiang Biao Signed-off-by: Alex Deucher commit fc0faf04400133393faa0a289aeba5d82069e52e Author: Emily Deng Date: Tue Aug 21 18:51:38 2018 +0800 drm/amdgpu/sriov: Only sriov runtime support use kiq For sriov, don't use kiq in exclusive mode, as don't know how long time it will take, some times it will occur exclusive timeout. Signed-off-by: Emily Deng Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 52de2ea74f36b50e2c2b101306fe892f8e7be6a6 Author: Evan Quan Date: Tue Aug 21 14:51:53 2018 +0800 drm/amdgpu: fix sdma doorbell range setting Use the old doorbell range setting until the driver is able to support more sdma queues. Signed-off-by: Evan Quan Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit a00ead2b394bd591159261f4e8c08819ff4f45f4 Author: Rex Zhu Date: Mon Aug 20 20:19:18 2018 +0800 drm/amdgpu: Fix compile warning In function ‘gfx_v9_0_check_fw_write_wait’: warning: enumeration value ‘CHIP_TAHITI’ not handled in switch [-Wswitch] Always add default case in case there is no match Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher commit 1b1f2fecb699bb4ccc3cb2fafe92950e9bdb39de Author: Christian König Date: Wed Aug 1 16:00:52 2018 +0200 drm/amdgpu: rework ctx entity creation Use a fixed number of entities for each hardware IP. The number of compute entities is reduced to four, SDMA keeps it two entities and all other engines just expose one entity. Signed-off-by: Christian König Reviewed-by: Chunming Zhou Signed-off-by: Alex Deucher commit a245daf3d7a143fb2df16485ad200aa3298eac8c Author: Christian König Date: Wed Aug 1 13:52:25 2018 +0200 drm/amdgpu: cleanup HW_IP query Move the code into a separate function. Signed-off-by: Christian König Reviewed-by: Chunming Zhou Signed-off-by: Alex Deucher commit 62347a33001c27b22465361aa4adcaa432497bdf Author: Andrey Grodzovsky Date: Fri Aug 17 10:32:50 2018 -0400 drm/scheduler: Add stopped flag to drm_sched_entity The flag will prevent another thread from same process to reinsert the entity queue into scheduler's rq after it was already removewd from there by another thread during drm_sched_entity_flush. Signed-off-by: Andrey Grodzovsky Reviewed-by: Chunming Zhou Signed-off-by: Alex Deucher commit 9c70d10ae72a188adb9da83ec760e1d5779bc2ed Author: Yintian Tao Date: Thu Aug 16 16:17:57 2018 +0800 drm/amdgpu: remove fulll access for suspend phase1 There is no need for gpu full access for suspend phase1 because under virtualization there is no hw register access for dce block. Signed-off-by: Yintian Tao Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 3890d11153e20ed48de2adca4261788f72b93f66 Author: Emily Deng Date: Fri Aug 17 18:25:36 2018 +0800 drm/amdgpu: use kiq to do invalidate tlb To avoid the tlb flush not interrupted by world switch, use kiq and one command to do tlb invalidate. v2: Refine the invalidate lock position. Signed-off-by: Emily Deng Reviewed-and-Tested-by: Rex Zhu Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 39b62541aac396d18108c160ddb956a22483046d Author: Emily Deng Date: Fri Aug 17 18:26:41 2018 +0800 drm/amdgpu: Remove the sriov checking and add firmware checking Unify bare metal and sriov, and add firmware checking for reg write and reg wait unify command. Signed-off-by: Emily Deng Acked-by: Christian König Reviewed-and-Tested-by: Rex Zhu Signed-off-by: Alex Deucher commit dd73043534515c1b8bf31f78f0e9945f5d95e0e6 Author: Jun Lei Date: Wed Aug 8 11:53:39 2018 -0400 drm/amd/display: implement DPMS DTN test v2 [why] Existing DTN infrastructure in driver is hacky. It uses implicit log names, and also incorrect escape ID. [how] - Implement using generic DTN escape ID. - Move file logging functionality from driver to to script; driver now outputs to string/buffer - Move HWSS debug functionality to separate c file - Add debug functionalty for per-block logging as CSV - Add pretty print in python Signed-off-by: Jun Lei Reviewed-by: Tony Cheng Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit d82f99422b21c0e9d174be453d0a5062da40568e Author: Anthony Koo Date: Tue Aug 21 14:28:05 2018 -0500 drm/amd/display: move edp fast boot optimization flag to stream [Why] During S4/S3 stress test it is possible to resume from S4 without calling mode set on eDP, meaning high level optimization flag is not reset. If this is followed by an S3 resume call, driver will see optimization flag is set and consume it and think backend is powered on when in fact it is not. This results in PHY being off in sequence where S4->Resume->S3->Resume->ApplyOpt->black screen. [How] Move optimization flag to stream instead of a DC flag. Signed-off-by: Anthony Koo Reviewed-by: Tony Cheng Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 728098352ea493584feea20be114006c30d76bca Author: David Francis Date: Thu Aug 9 13:15:36 2018 -0400 drm/amd/display: Combine dce80 and dce100 i2c hw functions [Why] There are two versions of the hw function pointers: one for dce80 and one for all other versions. These paired functions are nearly identical. dce80 and dce100 should not require different i2c access functions. [How] Combine each pair of functions into a single function. Mostly the new functions are based on the dce100 versions as those versions are newer, support more features, and were more maintained. Signed-off-by: David Francis Reviewed-by: Sun peng Li Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit d75de8ac943beef397375d96d01be15aed3fdf27 Author: Nikola Cornij Date: Fri Jul 13 18:19:07 2018 -0400 drm/amd/display: Define registers for dcn10 Define register for dcn10 for future changes Signed-off-by: Nikola Cornij Reviewed-by: Tony Cheng Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit eb385204b2416f88aea6e1d1cfbbf5b8dbddcaa5 Author: SivapiriyanKumarasamy Date: Thu Jul 26 14:58:35 2018 -0400 drm/amd/display: Program csc matrix as part of stream update Add csc_transform struct to dc_stream_update, and program if set when updating streams Signed-off-by: SivapiriyanKumarasamy Reviewed-by: Anthony Koo Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit c85e6e546edd7e362693218a33a6f63217802fd3 Author: David Francis Date: Mon Jul 23 14:12:10 2018 -0400 drm/amd/display: Create new i2c resource [Why] I2C code did not match dc resource model and was generally unpleasant [How] Move code into new svelte dce_i2c files, replacing various i2c objects with two structs: dce_i2c_sw and dce_i2c_hw. Fully split sw and hw code paths. Remove all redundant declarations. Use address lists to distinguish between versions. Change dce80 code to newer register access macros. Signed-off-by: David Francis Reviewed-by: Tony Cheng Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit d6257ab531ba0053d6f7c98ef949ab53f9a8ff0a Author: Paul Menzel Date: Tue Jul 31 18:48:41 2018 +0200 drm/radeon: Do not evict VRAM on APUs with disabled HIBERNATE Improve commit d796d844 (drm/radeon/kms: make hibernate work on IGPs) to only migrate VRAM objects if the Linux kernel is actually built with support for hibernation (suspend to disk). Link: https://bugs.freedesktop.org/show_bug.cgi?id=100941 Signed-off-by: Paul Menzel Signed-off-by: Alex Deucher commit 2c1e9bca448ab3c49f0bfc687ae79b8123237f4d Author: Paul Menzel Date: Wed Jul 25 12:54:19 2018 +0200 drm/amdgpu: Do not evict VRAM on APUs with disabled HIBERNATE Improve commit d796d844 (drm/radeon/kms: make hibernate work on IGPs) to only migrate VRAM objects if the Linux kernel is actually built with support for hibernation (suspend to disk). The better solution is to get the information, if this is suspend or hibernate, from `amdgpu_device_suspend()`, but that’s more involved, so apply the simple solution first. Link: https://bugs.freedesktop.org/show_bug.cgi?id=107277 Signed-off-by: Paul Menzel Signed-off-by: Alex Deucher commit 28a160277aef92b606c869960f40704493d30b42 Author: Huang Rui Date: Sun Aug 5 12:45:35 2018 +0800 drm/amdgpu: add status checking after fw is loaded The status field must be 0 after FW is loaded. Signed-off-by: Huang Rui Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 02b29caf18b3b0f6ff7b7d0b639060893cddf930 Author: Huang Rui Date: Wed Aug 15 15:39:33 2018 +0800 drm/ttm: remove dead codes These codes are not used. Signed-off-by: Huang Rui Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 09b6f25b55d9c66af7302e1f09ad90aa5b1dfbcb Author: Christian König Date: Wed Aug 15 14:04:47 2018 +0200 drm/amdgpu: fix VM size reporting on Raven Raven doesn't have an VCE block and so also no buggy VCE firmware. Signed-off-by: Christian König Reviewed-by: Alex Deucher Reviewed-by: Huang Rui Acked-by: Chunming Zhou Signed-off-by: Alex Deucher commit fdd34271a321e20358ba8825c59d367e75f313fa Author: Rex Zhu Date: Tue Aug 14 17:28:46 2018 +0800 drm/amdgpu: Set clock ungate state when suspend/fini After set power ungate state, set clock ungate state before when suspend or fini. Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher commit 05df1f01b2924d2e1737deeb63ad115c1df19021 Author: Rex Zhu Date: Tue Aug 14 16:54:15 2018 +0800 drm/amdgpu: Set power ungate state when suspend/fini Unify to set power ungate state at the begin of suspend/fini. Remove the workaround code for gfx off feature in amdgpu_device.c. Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher commit 1112a46b48b74766bd957742c853c8a582a81991 Author: Rex Zhu Date: Tue Aug 14 13:32:30 2018 +0800 drm/amdgpu: Refine function name and function args There are no any logical changes here. 1. change function names: amdgpu_device_ip_late_set_pg/cg_state to amdgpu_device_set_pg/cg_state. 2. add a function argument cg/pg_state, so we can enable/disable cg/pg through those functions Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher commit 8ab5617279507044682248f47c3afa9f753d8fe3 Author: SivapiriyanKumarasamy Date: Thu Jul 26 14:58:35 2018 -0400 drm/amd/display: Program gamut remap as part of stream update Add gamut remap to dc_stream_update struct, and program if set when updating streams. Signed-off-by: SivapiriyanKumarasamy Reviewed-by: Anthony Koo Acked-by: Leo Li Signed-off-by: Alex Deucher commit 72ac71a7e65260cc9a5f5e7dde5d14892d867c98 Author: Krunoslav Kovac Date: Fri Jul 20 15:44:08 2018 -0400 drm/amd/display: HDR dynamic meta should be treated as stream update [Why] Recently we fixed HDR static meta using AFMT registers to be treated as fast stream update. Dynamic meta is still being treated as (full) surface update because it touches HUBP and it travels with pipe data. Here we change it to be (fast) stream update. Note, originally we also wanted to redesign here a bit, but without OS level support for true dynamic meta, it's left the same. We are simply using HW that can do dynamic meta to send HDR static meta, I still prefer keeping it in one static meta type then defining dynamic meta types to hold the same info. Once we know how OS interfaces look like, we can do proper design. [How] Move dyn meta update from update_hubp_dpp to commit_planes_do_stream_update Signed-off-by: Krunoslav Kovac Reviewed-by: Tony Cheng Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit e71f8ca1a7db244642f9f882f1df003fa567ad43 Author: Krunoslav Kovac Date: Thu Jul 5 19:23:17 2018 -0400 drm/amd/display: Handle HDR meta update as fast update [Why] Vesa DPMS tool sends different HDR meta in OS flips without changing output parameters. We don't properly update HDR info frame: - we label HDR meta update as fast update - when updating HW info frame, we only do it if full update [How] It should still be fast update, so when doing HW infoframe update, do it always no matter the update type. Also, don't request passive flip for HDR meta update only without output transfer function or color space changed. Signed-off-by: Krunoslav Kovac Reviewed-by: Tony Cheng Acked-by: Leo Li Signed-off-by: Alex Deucher commit 0e4af5f3675bd766dbf11e5f17428ea69b630035 Author: Alvin lee Date: Fri Jun 8 13:58:36 2018 -0400 drm/amd/display: Program vsc_infopacket in commit_planes_for_stream Signed-off-by: Alvin lee Reviewed-by: Jun Lei Acked-by: Harry Wentland Signed-off-by: Alex Deucher commit 1336926f43ccadf2a152ea89a27de725c4d17f62 Author: Alvin lee Date: Mon Jun 4 17:31:25 2018 -0400 drm/amd/display: Enable Stereo in Dal3 - program infoframe for Stereo - program stereo flip control registers properly v2: Add missing license headers Signed-off-by: Alvin lee Reviewed-by: Tony Cheng Acked-by: Harry Wentland Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 27e2e207747981ca3161dec16cea304f8e46cd65 Author: SivapiriyanKumarasamy Date: Fri May 18 17:05:52 2018 -0400 drm/amd/display: Program vline interrupt on FAST update Signed-off-by: SivapiriyanKumarasamy Reviewed-by: Tony Cheng Reviewed-by: Anthony Koo Acked-by: Harry Wentland Signed-off-by: Alex Deucher commit 1e7e86c43f38d2cc0183ae2a440c70f3c6163883 Author: Samson Tam Date: Tue May 1 10:39:26 2018 -0400 drm/amd/display: decouple front and backend pgm using dpms_off as backend enable flag Signed-off-by: Samson Tam Reviewed-by: Anthony Koo Acked-by: Harry Wentland Signed-off-by: Alex Deucher commit 69ff884526742fcb00b7509461bf8e41c87d9b10 Author: Anthony Koo Date: Tue May 8 17:09:49 2018 -0400 drm/amd/display: add config for sending VSIF Signed-off-by: Anthony Koo Reviewed-by: Aric Cyr Acked-by: Harry Wentland Signed-off-by: Alex Deucher commit 4c1fa3630b44f03d5539a778ddcea319e9c8223a Author: Harry Wentland Date: Sun Mar 25 16:28:33 2018 -0400 drm/amd/display: Don't force UPDATE_TYPE_FULL if stream_update has hdr_static_metadata This was missed when pushing public patch for 3e3a40b03847 (drm/amd/display: Updated HDR Static Metadata to directly take info packet raw) This is currently no problem yet since we're not doing HDR on Linux yet. Signed-off-by: Harry Wentland Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit bf2af91cb3a4ef1c5f9132687b9818f33d6a389f Author: Anthony Koo Date: Tue Apr 17 11:40:31 2018 -0400 drm/amd/display: Correct rounding calcs in mod_freesync_is_valid_range Signed-off-by: Anthony Koo Reviewed-by: Aric Cyr Acked-by: Harry Wentland Signed-off-by: Alex Deucher commit 953c2901c860da16963b48db8344bf0fd5b03040 Author: Anthony Koo Date: Fri Apr 6 13:55:39 2018 -0400 drm/amd/display: refactor vupdate interrupt registration We only need to register once OS calls the interrupt control. Also, if we are entering static screen mode, disable after ramping is done. Disable shall be done via timer of 2 seconds regardless of ramping complete or not, just to simplify. Also, ramp to mid instead of min, due to better flicker performance... Signed-off-by: Anthony Koo Reviewed-by: Aric Cyr Acked-by: Harry Wentland Signed-off-by: Alex Deucher commit 9410a3776bbf1e172cfdb9f8b771a5ce64081a51 Author: Anthony Koo Date: Fri Apr 6 12:12:06 2018 -0400 drm/amd/display: fix LFC tearing at top of screen Tearing occurred because new VTOTAL MIN/MAX was being programmed too early. The flip can happen within the VUPDATE high region, and the new min/max would take effect immediately. But this means that frame is not variable anymore, and tearing would occur when the flip actually happens. The fixed insert duration should be programmed on the first VUPDATE interrupt instead. Signed-off-by: Anthony Koo Reviewed-by: Aric Cyr Acked-by: Harry Wentland Signed-off-by: Alex Deucher commit be922ff750e40b292824959577aa914388ff6c8b Author: Anthony Koo Date: Thu Apr 5 15:20:15 2018 -0400 drm/amd/display: Add back code to allow for rounding error Signed-off-by: Anthony Koo Reviewed-by: Aric Cyr Acked-by: Harry Wentland Signed-off-by: Alex Deucher commit 050790cc59732cd99789235cb118df23e9b42911 Author: Anthony Koo Date: Wed Apr 4 21:04:42 2018 -0400 drm/amd/display: Fix bug that causes black screen Ignore MSA bit on DP display is usually set during SetTimings, but there was a case where the module thought refresh rate was not valid and ignore MSA bit was not set. Later, a valid refresh rate range was requested but since ignore MSA bit not set, it caused black screen. Issue if with how the module checked for VRR support. Fix up that logic. DM should call new valid_range function to determine if timing is supported. Signed-off-by: Anthony Koo Reviewed-by: Aric Cyr Acked-by: Harry Wentland Signed-off-by: Alex Deucher commit ff6014d63a87d9a801ddd9ddd10359b2dead6943 Author: Anthony Koo Date: Wed Apr 4 21:01:21 2018 -0400 drm/amd/display: Fix bug where refresh rate becomes fixed This issue occurs if refresh rate range is very small and lfc is not used. When frame spikes occur, refresh rate becomes fixed and will not restore properly Signed-off-by: Anthony Koo Reviewed-by: Aric Cyr Acked-by: Harry Wentland Signed-off-by: Alex Deucher commit e80e9446084168c4f186f502dd15e6241bf454a1 Author: Anthony Koo Date: Wed Apr 4 20:59:43 2018 -0400 drm/amd/display: add method to check for supported range Signed-off-by: Anthony Koo Reviewed-by: Aric Cyr Acked-by: Harry Wentland Signed-off-by: Alex Deucher commit 98e6436d3af5fef7ca9b59d865dd5807ede36fb9 Author: Anthony Koo Date: Tue Aug 21 14:40:28 2018 -0500 drm/amd/display: Refactor FreeSync module Remove dependency on internal sink map and instead use existing stream and plane state Signed-off-by: Anthony Koo Signed-off-by: Harry Wentland Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher commit 8c3db1284a016dc670fe0a98afec33e001d363bc Author: Harry Wentland Date: Wed Aug 15 16:49:27 2018 -0500 drm/amdgpu: fill in amdgpu_dm_remove_sink_from_freesync_module Add code to tear down freesync modules when disabled. Signed-off-by: Harry Wentland Signed-off-by: Alex Deucher commit bfcea5204287b0a09dac71fa56a5d066d94d9bb1 Author: Feifei Xu Date: Tue Aug 14 14:53:53 2018 -0400 drm/amdgpu:change VEGA booting with firmware loaded by PSP With PSP firmware loading, TMR mc address is supposed to be used. Signed-off-by: James Zhu Acked-by: Huang Rui Reviewed-by: Alex Deucher Signed-off-by: Feifei Xu Signed-off-by: Alex Deucher commit d4e838431d56ac132a7f387b34e5c9f227dce428 Author: Evan Quan Date: Tue Aug 14 14:53:52 2018 -0400 drm/amdgpu: added support 2nd UVD instance Added psp fw loading support for vega20 2nd UVD instance. Signed-off-by: Evan Quan Acked-by: Huang Rui Reviewed-by: Alex Deucher Signed-off-by: Feifei Xu Signed-off-by: Alex Deucher commit 851c2509aef6ee2374d8192130f33e1166c1c2a3 Author: Michel Dänzer Date: Wed Aug 15 12:58:13 2018 +0200 drm/doc: Adapt GPU scheduler references for renamed C file Fixes: "drm/scheduler: rename gpu_scheduler.c to sched_main.c" Reviewed-by: Christian König Signed-off-by: Michel Dänzer Signed-off-by: Alex Deucher commit 0d346a14c634120046d194377e2cb5b387a6c1c6 Author: Christian König Date: Thu Jul 19 14:22:25 2018 +0200 drm/amdgpu: use entity instead of ring for CS Further demangle ring from entity handling. Signed-off-by: Christian König Reviewed-by: Chunming Zhou Signed-off-by: Alex Deucher commit 8290268f31b8c1bc3d331212b60ae7fb2262e20d Author: Christian König Date: Wed Jul 18 16:34:49 2018 +0200 drm/amdgpu: move context related stuff to amdgpu_ctx.h Further unmangle amdgpu.h. Signed-off-by: Christian König Reviewed-by: Chunming Zhou Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 86275d090f0196d63245796aa0e3a12fa17e61a5 Author: Christian König Date: Mon Jul 16 15:23:15 2018 +0200 drm/amdgpu: remove ring lru handling Not needed any more. Signed-off-by: Christian König Reviewed-by: Chunming Zhou Signed-off-by: Alex Deucher commit 869a53d4d7d7976d039b9389aa90b6f3d29ed234 Author: Christian König Date: Mon Jul 16 15:19:20 2018 +0200 drm/amdgpu: remove the queue manager Not needed any more since that is now done by the scheduler. Signed-off-by: Christian König Reviewed-by: Chunming Zhou Signed-off-by: Alex Deucher commit 72a4c072ca9f2640ea303c399bd3224b69a543d9 Author: Christian König Date: Mon Jul 16 14:59:26 2018 +0200 drm/amdgpu: use scheduler load balancing for compute CS Start to use the scheduler load balancing for userspace compute command submissions. Signed-off-by: Christian König Reviewed-by: Chunming Zhou Signed-off-by: Alex Deucher commit 845e6fdf3b52ae8d8cde8ddafa6bbd60214f2bd2 Author: Christian König Date: Fri Jul 13 09:12:44 2018 +0200 drm/amdgpu: use scheduler load balancing for SDMA CS Start to use the scheduler load balancing for userspace SDMA command submissions. Signed-off-by: Christian König Reviewed-by: Chunming Zhou Signed-off-by: Alex Deucher commit 3798e9a6e6390b873a745d6240ac9646bd2bf514 Author: Christian König Date: Thu Jul 12 15:15:21 2018 +0200 drm/amdgpu: use new scheduler load balancing for VMs Instead of the fixed round robin use let the scheduler balance the load of page table updates. Signed-off-by: Christian König Reviewed-by: Chunming Zhou Signed-off-by: Alex Deucher commit aa5873dca46385454d36c3dca31d66d7b64574be Author: James Zhu Date: Tue Aug 14 14:53:51 2018 -0400 drm/amdgpu: Change VCE booting with firmware loaded by PSP With PSP firmware loading, TMR mc address is supposed to be used. Signed-off-by: James Zhu Acked-by: Huang Rui Reviewed-by: Alex Deucher Signed-off-by: Feifei Xu Signed-off-by: Alex Deucher commit 23f67981fd92859a156fc7d2e41f98d826f68a6c Author: Christian König Date: Mon Aug 6 15:01:45 2018 +0200 drm/scheduler: rename gpu_scheduler.c to sched_main.c Better match the naming of the other components. Signed-off-by: Christian König Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 7b10574eac0b44f99e8e1d3ea9345a78d1fcaf07 Author: Christian König Date: Mon Aug 6 14:58:56 2018 +0200 drm/scheduler: cleanup entity coding style Cleanup coding style in sched_entity.c Signed-off-by: Christian König Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 620e762f9a984fc3f77cd6f757581a21605ce125 Author: Christian König Date: Mon Aug 6 14:25:32 2018 +0200 drm/scheduler: move entity handling into separate file This is complex enough on it's own. Move it into a separate C file. Signed-off-by: Christian König Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 8acc7254577a3007029b4f13c759bf07d6719075 Author: Christian König Date: Tue Aug 14 09:41:12 2018 +0200 drm/scheduler: trivial error handling fix Return -ENOMEM when allocating the rq_list fails. Signed-off-by: Christian König Reviewed-by: Huang Rui Reviewed-by: Andrey Grodzovsky Signed-off-by: Alex Deucher commit ff30e9e8509cb877dc7cbc776b36c70f5bdd290f Author: Dan Carpenter Date: Fri Aug 10 18:50:32 2018 +0800 drm/amdgpu: fix integer overflow test in amdgpu_bo_list_create() We accidentally left out the size of the amdgpu_bo_list struct. It could lead to memory corruption on 32 bit systems. You'd have to pick the absolute maximum and set "num_entries == 59652323" then size would wrap to 16 bytes. Fixes: 920990cb080a ("drm/amdgpu: allocate the bo_list array after the list") Signed-off-by: Dan Carpenter Reviewed-by: Huang Rui Reviewed-by: Bas Nieuwenhuizen Signed-off-by: Huang Rui Signed-off-by: Alex Deucher commit e51ee68ff2eef2a0117a26ec28d64f86081df4e8 Author: Rex Zhu Date: Mon Aug 13 18:37:39 2018 +0800 drm/amd/pp: OverDrive gfx domain voltage on Tonga Also ajust the gfx domain voltage on Tonga when user overdriver the voltage. For Tonga, Driver do not update user's setting to voltage table in smu, we only pick up a minimum value from voltage table that not less than the user's setting. v2: fix a typo Acked-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher commit a54594752ad48de75dc0158f0c9b124177235efc Author: Rex Zhu Date: Tue Aug 14 17:31:09 2018 +0800 drm/amdgpu: Cancel the delay work when suspend Cancel the delay work to avoid the corner case that ib test was not running when suspend Reviewed-by: Christian König Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher commit 6dddaeef4f9e0445a75261f88e29de5a24e302c6 Author: Alex Deucher Date: Tue Aug 14 11:44:44 2018 -0500 drm/amdgpu: remove experimental flag for vega20 Now that PSP and SMU support is in place. Signed-off-by: Alex Deucher commit 3082be1aeaeef52a907b9d5bff3c50011504c687 Author: Feifei Xu Date: Tue Aug 14 10:33:25 2018 +0800 drm/amdgpu/psp: Enlarge PSP TMR SIZE from 3M to 4M. Enlarge the PSP TMR SIZE to 4M for dual UVD fw front-door loading. Signed-off-by: Feifei Xu Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit 218a9fbc8a28f63dc0990070b81ad5574e87846c Author: Evan Quan Date: Wed Jul 18 16:00:03 2018 +0800 drm/amdgpu: update vega20 sdma golden settings Updated vega20 SDMA0 and SDMA1 golden settings. Signed-off-by: Evan Quan Signed-off-by: Feifei Xu Reviewed-by: Hawking Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 54d682d9a5b357eb711994fa94ef1bc44d7ce9d9 Author: Feifei Xu Date: Thu Jul 26 12:31:34 2018 +0800 drm/amdgpu/gfx9: Update gfx9 golden settings. Update the goldensettings for vega20. Signed-off-by: Feifei Xu Signed-off-by: Evan Quan Reviewed-by: Hawking Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit ff50e15b00b0d107df58d0f95065015196015543 Author: Evan Quan Date: Fri Aug 10 14:27:56 2018 +0800 drm/amd/powerplay: added voltage boot time calibration Run AFLL BTC after upload pptable and before enabling all smu features. Signed-off-by: Evan Quan Reviewed-by: Rex Zhu Signed-off-by: Alex Deucher commit efa7ac67a80f31a35c6c3e2b40841439bf107fa2 Author: Evan Quan Date: Mon Jul 30 14:01:00 2018 +0800 drm/amd/powerplay: remove max DCEFCLK limitation The latest SMU fw removes the limitation that required UCLK >= DCEFCLK. Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 16ed0ff2755c852c3222bf53d4a0d97f3665733e Author: Evan Quan Date: Fri Jul 20 10:56:21 2018 +0800 drm/amd/powerplay: allow slow switch only if NBPState enabled Otherwise there may be potential SMU performance issues. Signed-off-by: Evan Quan Reviewed-by: Rex Zhu Signed-off-by: Alex Deucher commit 5d923a692868609f77db4873a3ff4420853cb38c Author: Evan Quan Date: Fri Jul 20 10:53:31 2018 +0800 drm/amd/powerplay: correct the argument for PPSMC_MSG_SetUclkFastSwitch The argument was set wrongly. Fast/slow switch was asked when there is actually a slow/fast switch needed. Signed-off-by: Evan Quan Reviewed-by: Rex Zhu Signed-off-by: Alex Deucher commit d940def9ab1f02bb421e02f3e9137153705a79e6 Author: Evan Quan Date: Thu Jul 19 18:40:25 2018 +0800 drm/amd/powerplay: avoid enabling/disabling uvd/vce dpm twice For vega20, there are two UVD rings which share one powerplay instance. Under some case(two rings used parallel), the uvd dpm is disabled twice which causes the SMC hang. Signed-off-by: Evan Quan Reviewed-by: Rex Zhu Signed-off-by: Alex Deucher commit be6a55a11af64fc07e478ba0f964bef76521293b Author: Evan Quan Date: Wed Jul 18 10:59:02 2018 +0800 drm/amd/powerplay: remove setting soc floor voltage before sending pptable SOC voltage is not able to switch and forced to low 0.8V when running HEVC. Thus the test failed. Signed-off-by: Evan Quan Reviewed-by: Rex Zhu Signed-off-by: Alex Deucher commit 3490738f9be9e20ac44dff4e76ed63762453ef68 Author: Evan Quan Date: Tue Jul 17 10:22:37 2018 +0800 drm/amd/powerplay: enable fclk ss by default Set fclk ss as enabled on default. Signed-off-by: Evan Quan Reviewed-by: Rex Zhu Signed-off-by: Alex Deucher commit 0df5295c99de7bd092392bc6f902db26baf99042 Author: Likun Gao Date: Mon Jul 9 13:47:04 2018 -0500 drm/amdgpu/vg20: Change the load type of vega20 to psp (v2) Modified the vega20 load type to psp now that psp support is implemented. v2: squash in fixes history (Alex) Signed-off-by: Likun Gao Reviewed-by: Feifei Xu Reviewed-by: Hawking Zhang Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 654f761cfa0454bbfdf50d5ed6dc004c92114a97 Author: Feifei Xu Date: Fri May 11 14:54:50 2018 +0800 drm/amdgpu: Add psp 11.0 support for vega20. (v2) Add psp 11.0 code for vega20 and enable it. PSP is the security processor for the GPU. It handles firmware loading and GPU resets among other things. v2: whitespace fix, enable support, adjust reg includes (Alex) Signed-off-by: Feifei Xu Reviewed-by: Alex Deucher Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit a6637313c7bf013d30fc7d501a19a93fddab7b5f Author: Evan Quan Date: Wed May 2 15:45:54 2018 +0800 drm/amdgpu: enable vega20 powerplay support Signed-off-by: Evan Quan Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 8c191fe3d55309f0bd12ab5fa6f2272675a89f41 Author: Evan Quan Date: Mon May 21 10:43:31 2018 +0800 drm/amd/powerplay: update vega20 clocks threshold settings on power state adjust UVD, VCE and SOC clocks need to be taken into consideration. Also, the thresholds need be updated correspondingly when stable power state is selected. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit acd116243a0da2a082dabd920ec68d782390d66d Author: Evan Quan Date: Mon May 21 10:24:57 2018 +0800 drm/amd/powerplay: revise vega20 PPSMC_MSG_SetSoftMin/[Max]ByFreq settings UVD, VCE and Socclk also need to be taken into consideration when setting PPSMC_MSG_SetSoftMinByFreq and PPSMC_MSG_SetSoftMaxByFreq. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit d617d4d73043bc4cbc316a7a1b4370fa5bc26a31 Author: Evan Quan Date: Mon May 21 10:19:06 2018 +0800 drm/amd/powerplay: new interfaces for overdrive vega20 sclk and mclk Add support for the new SMU firmware interface for clock adjustment. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 7dd67c0d4200a333aa7f6fc9b077f423654987dd Author: Evan Quan Date: Mon May 21 10:16:41 2018 +0800 drm/amd/powerplay: initialize vega20 overdrive settings The initialized overdrive settings are taken from vbios and SMU( by PPSMC_MSG_TransferTableSmu2Dram). Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit bc9b8c45b86ff24c34ad7e6a320ad11507ca9f63 Author: Evan Quan Date: Fri May 11 16:10:51 2018 +0800 drm/amd/powerplay: conv the vega20 pstate sclk/mclk into necessary 10KHz unit Powerplay uses 10KHz units. Signed-off-by: Evan Quan Reviewed-by: Rex Zhu Signed-off-by: Alex Deucher commit 8dd97d6bc2c5875a365fbe0f4f00de3ae62390e2 Author: Evan Quan Date: Wed May 9 11:14:06 2018 +0800 drm/amd/powerplay: add vega20 pre_display_config_changed callback fix possible handshake hang and video playback crash Corner cases: - Handshake between SMU and DCE causes hangs when CRTC is not enabled - System crash occurs when starting 4K playback with Movies and TV in an SLS configuration Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit b8497699ef8a1858e7246bf1abfa0c84a479f665 Author: Evan Quan Date: Tue May 8 18:23:16 2018 +0800 drm/amd/powerplay: export vega20 stable pstate clocks Needed for querying the stable pstate clocks. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit fff7e3e049d897801addf2e9051b3f26e48bdf46 Author: Evan Quan Date: Tue May 8 18:27:03 2018 +0800 drm/amd/powerplay: correct force clock level related settings for vega20 (v2) 1. The min/max level is determined by soft_min_level/soft_max_level. 2. Vega20 comes with pptable v3 which has no vdd related table(vdd_dep_on_socclk, vdd_dep_on_mclk) support. 3. Vega20 does not support separate fan feature control(enable or disable). v2: squash in fixes: - bug fix for force dpm level settings - fix wrong data type Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 7c2912a26d363eb33d04b4009e857a81c918247b Author: Evan Quan Date: Fri May 4 15:20:15 2018 +0800 drm/amd/powerplay: init vega20 uvd/vce powergate status on dpm setup This is essentially necessary when uvd/vce dpm is not enabled yet. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 982b90319459c78fca0ddaac9858b2ef7bb5424c Author: Evan Quan Date: Fri Jul 6 14:00:37 2018 -0500 drm/amd/powerplay: support workload profile query and setup for vega20 Support the power profile API. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit da958630d530250c72bc54394ce77488acf2144c Author: Evan Quan Date: Thu Aug 2 15:55:33 2018 -0500 drm/amd/powerplay: add the hw manager for vega20 (v3) hwmgr is the interface for the driver to setup state structures which are used by the smu for managing the power state. v2: squash in fixes: - update set_watermarks_for_clocks_ranges to use common code - drop unsupported apis - correct MAX_REGULAR_DPM_NUMBER value - multimonitor fixes - add check for vbios pptable version - revise dpm table setup - init fclk dpm state - Remove unused definition in vega20_hwmgr - support power limit setup - enable vega20 to honour DAL clock limits - comment out dump_table debugging v3: switch to SOC15 register access macros Signed-off-by: Evan Quan Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit f0e7e5e2a8e4cad91b24ae5dbcd308cd2c05382a Author: Evan Quan Date: Fri May 11 10:56:25 2018 +0800 drm/amd/powerplay: new interfaces for ActivityMonitor table with SMU Vega20 has a new activity monitor table that is stored in memory. Add API to get and set the new table. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit f4eac80add11572fe36800c045a1ed1fd9132ec0 Author: Evan Quan Date: Thu Aug 2 15:52:41 2018 -0500 drm/amd/powerplay: add the smu manager for vega20 (v2) The SMU manager handles the driver interaction with the SMU which handles clock and voltage controls. v2: switch to SOC15 register access macros reserve space for ActivityMonitor table enable SMU fw loading Drop dead code from bringup Signed-off-by: Evan Quan Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit b9443b572c0614c54bc475abf5b3b7e6e88c1158 Author: Evan Quan Date: Wed Mar 21 16:36:08 2018 +0800 drm/amd/powerplay: add vega20_pptable.h (v2) v2: squash in table size fixes Signed-off-by: Evan Quan Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 79df9413f7c3bc5ae305b8c08dbd048334dd6092 Author: Evan Quan Date: Wed Mar 21 16:21:51 2018 +0800 drm/amd/powerplay: add vega20_ppsmc.h (v2) v2: update to latest. Signed-off-by: Evan Quan Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 5fef5b1e7d9b10847559bc1fcc8cc01bb84097b8 Author: Evan Quan Date: Wed Mar 21 16:16:41 2018 +0800 drm/amd/powerplay: add smu11_driver_if.h (v4) v2: cleanup v3: fit the latest 40.6 smc fw v4: update to latest. Signed-off-by: Evan Quan Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 5f51ab41e7a0ca2b56080fe5e15fd3e32c96aecb Author: Evan Quan Date: Wed Mar 21 14:10:21 2018 +0800 drm/amd/powerplay: add vega20_inc.h (v2) v2: use thm 11.0.2 headers Signed-off-by: Evan Quan Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 7a0d7089c700fbdc1bd3da957c26c0b142536cf6 Author: Evan Quan Date: Wed May 2 15:50:10 2018 +0800 drm/amdgpu: update atomfirmware.h Add struct atom_smc_dpm_info_v4_3 Signed-off-by: Evan Quan Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit fe3c948918e7e3d18eed85571d32a2f7c4b63a84 Author: Feifei Xu Date: Fri Mar 23 14:44:28 2018 -0500 drm/amdgpu: Add nbio 7.4 support for vega20 (v3) Some register offset in nbio v7.4 are different with v7.0. We need a seperate nbio_v7_4.c for vega20. v2: fix doorbell range for sdma (Alex) v3: squash in static fix (kbuild test robot) Signed-off-by: Feifei Xu Reviewed-by: Hawking Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 25eaa565c47b229962d6c6f2212b224db188aef9 Author: Alex Deucher Date: Tue Apr 3 15:49:56 2018 -0500 Revert "drm/amdgpu: Add nbio support for vega20 (v2)" Revert this to add proper nbio 7.4 support. This reverts commit f5b2e1fa321eff20a9418ebd497d8a466f024a85. Signed-off-by: Alex Deucher commit e9126d09eeb514d349771c3b90c94535396ffe0a Author: Feifei Xu Date: Thu May 10 21:23:58 2018 +0800 drm/amdgpu/include: Add mp 11.0 header files. (v2) Add the system management controller v11.0 header files. v2: cleanup Signed-off-by: Feifei Xu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit e6af616a7822294dac294d92a04772a467ef9fd7 Author: Evan Quan Date: Mon Mar 26 15:29:48 2018 +0800 drm/amdgpu/include: add thm 11.0.2 headers Headers for thermal controller. Signed-off-by: Evan Quan Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit c62d3cd0ddd629606a3830aa22e9dcc6c2a0d3bf Author: Feifei Xu Date: Wed Jan 17 19:42:33 2018 +0800 drm/amdgpu/include: Add sdma0/1 4.2 register headerfiles. (v3) These are the System DMA register headers for vega20. v2: cleanups (Alex) v3: add missing licenses (Alex) Signed-off-by: Feifei Xu Acked-by: Hawking Zhang Signed-off-by: Alex Deucher commit 1f902edecb3201eacae5e3735fe4857a987627d2 Author: Feifei Xu Date: Wed Jan 17 20:05:19 2018 +0800 drm/amdgpu/include: Add nbio 7.4 header files (v4) v2: Cleanups (Alex) v3: More updates (Alex) v4: more cleanups (Alex) Signed-off-by: Feifei Xu Acked-by: Hawking Zhang Signed-off-by: Alex Deucher commit a69e40fd824ddae4f515ca8e754882bebf644ed4 Author: Mauro Rossi Date: Sun Aug 12 21:43:03 2018 +0200 drm/radeon: enable ABGR and XBGR formats (v2) Add support for DRM_FORMAT_{A,X}BGR8888 in atombios_crtc Swapping of red and blue channels is implemented for radeon chipsets: DCE2/R6xx and later - crossbar registers defined where needed and used DCE1/R5xx - AVIVO_D1GRPH_SWAP_RB bit is used (v2) Set AVIVO_D1GRPH_SWAP_RB bit in fb_format, using bitwise OR for DCE1 path Use bitwise OR where required for big endian settings in fb_swap Use existing code style CHIP_R600 condition, fix typo in R600 blue crossbar Signed-off-by: Mauro Rossi Signed-off-by: Alex Deucher commit 00ecc6e6d4eeba9681ec91f9601a9ed1a68a9e7f Author: Mauro Rossi Date: Sun Aug 12 21:43:02 2018 +0200 drm/amdgpu: enable ABGR and XBGR formats (v2) Add support for DRM_FORMAT_{A,X}BGR8888 in amdgpu with amd dc disabled (v2) Crossbar registers are defined and used to swap red and blue channels, keeping the existing coding style in each of the dce modules. After setting crossbar bits in fb_swap, use bitwise OR for big endian where required in DCE6 and DCE8 which do not rely on REG_SET_FIELD() Signed-off-by: Mauro Rossi Signed-off-by: Alex Deucher commit bcd47f60ab65c780eef44cc09c0e264453dd455e Author: Mauro Rossi Date: Sun Aug 12 21:43:01 2018 +0200 drm/amd/display: enable ABGR and XBGR formats (v4) SURFACE_PIXEL_FORMAT_GRPH_ABGR8888 is supported in amd/display/dc/dc_hw_types.h and the necessary crossbars register controls to swap red and blue channels are already implemented in drm/amd/display/dc/dce/dce_mem_input.c (v4) Logic to handle new formats is added only in amdgpu_dm module. Signed-off-by: Mauro Rossi Signed-off-by: Alex Deucher commit a19c3bea8ebea8f4ee740c56a6796dbcef692474 Author: Alex Deucher Date: Fri Aug 10 13:21:09 2018 -0500 drm/amdgpu/powerplay/vega10: enable AVFS control via ppfeaturemask Allow the user to disable AFVS via ppfeaturemask for debugging. Reviewed-by: Rex Zhu Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit b4abff4bb2b43e94d7d36432d02a21ea25724bf8 Author: Alex Deucher Date: Fri Aug 10 13:19:26 2018 -0500 drm/amdgpu/powerplay/smu7: enable AVFS control via ppfeaturemask Allow the user to disable AFVS via ppfeaturemask for debugging. Reviewed-by: Rex Zhu Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit a4ead3e5d6f37b49291b81c1016e3d6f03843f2f Author: Alex Deucher Date: Fri Aug 10 13:09:43 2018 -0500 drm/amdgpu: add AVFS control to PP_FEATURE_MASK Add a ppfeaturemask flag to disable AVFS control. Reviewed-by: Rex Zhu Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 5d0e7e5caa08e1548aa39ad316202bd99bf970c4 Author: Tony Cheng Date: Wed Jul 18 20:29:13 2018 -0400 drm/amd/display: dc 3.1.62 Signed-off-by: Tony Cheng Reviewed-by: Steven Chiu Acked-by: Leo Li Signed-off-by: Alex Deucher commit 56780940389a344a949d53ed7be77012a20ced7a Author: Leo (Sunpeng) Li Date: Wed Aug 1 10:20:53 2018 -0400 drm/amd/display: Remove redundant non-zero and overflow check [Why] Unsigned int is guaranteed to be >= 0, and read_channel_reply checks for overflows. read_channel_reply also returns -1 on error, which is what dc_link_aux_transfer is expected to return on error. [How] Remove the if-statement. Return result of read_channel_reply directly. Signed-off-by: Leo (Sunpeng) Li Reviewed-by: Mikita Lipski Acked-by: Leo Li Signed-off-by: Alex Deucher commit 2f14bc8968e3d97fc46bb464045d0fa8fbd2b013 Author: Charlene Liu Date: Tue Jul 31 20:14:26 2018 -0400 drm/amd/display: add retimer log for HWQ tuning use. Signed-off-by: Charlene Liu Reviewed-by: Dmytro Laktyushkin Acked-by: Leo Li Signed-off-by: Alex Deucher commit f137586b2b2bb3ea0b9886b0929055ddef5a32f4 Author: Dmytro Laktyushkin Date: Tue Jul 17 17:15:48 2018 -0400 drm/amd/display: fix dml handling of mono8/16 pixel formats mono formats are treated exactly the same as equivallent bpp 444 formats. Dml validation however lacks 444 8 bit format while dml perf param calculation lacks mono format support This change makes them equivallent as far as the enum is concerned to avoid having to update dml Signed-off-by: Dmytro Laktyushkin Reviewed-by: Charlene Liu Acked-by: Leo Li Signed-off-by: Alex Deucher commit c4621988d49785849a9fa817721d960798d14e19 Author: Dmytro Laktyushkin Date: Mon Jul 30 14:41:01 2018 -0400 drm/amd/display: Add dprefclk value to dce_dccg This allows us to avoid any vbios bugs when initializing clocks Signed-off-by: Dmytro Laktyushkin Reviewed-by: Charlene Liu Acked-by: Leo Li Signed-off-by: Alex Deucher commit 94a4ffd1d40b845dd19f9fdbb2cb6bf32de0946b Author: Gloria Li Date: Thu Jul 26 11:32:14 2018 -0400 drm/amd/display: fix PIP bugs on Dal3 [Why] There are outstanding bugs for PIP in Dal3: -Crash when toggling PIP visibility -Global Alpha is not working, Adjusting global alpha doesn’t have an effect -Cursor is not working with pip plane and pipe splits -One flash occurs when cursor enters PIP plane from top/bottom -Crash when moving PIP plane off the screen [How] Resolve divide by 0 error Implement global alpha Program cursor on all pipes Add dst rects' x and y offests into cursor position Disable cursor when it is beyond bottom/top edge Signed-off-by: Gloria Li Reviewed-by: Aric Cyr Acked-by: Leo Li Signed-off-by: Alex Deucher commit f1220c876d4fb6bb41851f7f422efa4600d0bfa7 Author: Tony Cheng Date: Wed Jul 18 20:28:54 2018 -0400 drm/amd/display: dc 3.1.61 Signed-off-by: Tony Cheng Reviewed-by: Steven Chiu Acked-by: Leo Li Signed-off-by: Alex Deucher commit 6c1fd99bc6694be3cca3c1778908fe40ef7532ca Author: Rex Zhu Date: Thu Aug 9 15:26:06 2018 +0800 drm/amdgpu: Cancel gfx off delay work when driver fini/suspend there may be gfx off delay work pending when suspend/driver unload, need to cancel them first. Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher commit ec2e082a79b5d46addf2e7b83a13fb015fca6149 Author: Alex Deucher Date: Thu Aug 9 14:24:08 2018 -0500 drm/amdgpu/powerplay: check vrefresh when when changing displays Compare the current vrefresh in addition to the number of displays when determining whether or not the smu needs updates when changing modes. The SMU needs to be updated if the vbi timeout changes due to a different refresh rate. Fixes flickering around mode changes in some cases on polaris parts. Reviewed-by: Rex Zhu Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 7ea34ea3e889a539ecfe1073ac45f64e7eb3579b Author: Boyuan Zhang Date: Wed Jul 18 16:29:29 2018 -0400 drm/amdgpu: fix emit frame size and comments for jpeg Fix vcn jpeg ring emit fence size in dword, and fix the naming in comments. Signed-off-by: Boyuan Zhang Acked-by: Leo Liu Signed-off-by: Alex Deucher commit 36a12bd0b4239ef11178344525c6d0b912b0b230 Author: Boyuan Zhang Date: Wed Jul 18 16:26:28 2018 -0400 drm/amdgpu: add emit trap for vcn jpeg Add emit trap command in jpeg emit fence call. Signed-off-by: Boyuan Zhang Acked-by: Leo Liu Signed-off-by: Alex Deucher commit 7f31077cadc98517bc580b638063c7d841b90372 Author: Boyuan Zhang Date: Wed Jul 18 16:25:42 2018 -0400 drm/amdgpu: enable system interrupt for jrbc Enable system interrupt for jrbc during engine starting time. Signed-off-by: Boyuan Zhang Acked-by: Leo Liu Signed-off-by: Alex Deucher commit 44287b7190f4504792e8bbfcd0ef899d566e4ec7 Author: Boyuan Zhang Date: Wed Jul 18 16:24:18 2018 -0400 drm/amdgpu: add system interrupt mask for jrbc Add new mask for enabling system interrupt for jrbc. Signed-off-by: Boyuan Zhang Acked-by: Leo Liu Signed-off-by: Alex Deucher commit 8709890892d839ba7169924a301c9cb0bd54ce6b Author: Boyuan Zhang Date: Wed Jul 18 16:13:29 2018 -0400 drm/amdgpu: add system interrupt register offset header Add new register offset for enabling system interrupt. Signed-off-by: Boyuan Zhang Acked-by: Leo Liu Signed-off-by: Alex Deucher commit eb4f6999203710f82861fd03c1bc696dae4182b5 Author: Boyuan Zhang Date: Wed Jul 11 14:40:18 2018 -0400 drm/amdgpu: add emit reg write reg wait for vcn jpeg The emit_reg_write_reg_wait function was not assigned for vcn jpeg. This patch adds it back. Signed-off-by: Boyuan Zhang Reviewed-by: Leo Liu Signed-off-by: Alex Deucher commit 54f16ebfde5d32ea9583a4affbbe7c7fb5054966 Author: Alex Deucher Date: Tue Aug 7 16:30:50 2018 -0500 drm/amdgpu/pp: endian fixes for processpptables.c Properly swap when reading from the vbios. Reviewed-by: Evan Quan Reviewed-by: Rex Zhu Signed-off-by: Alex Deucher commit 2cf01099518b845ff0df332a16bf3eb48c631c0c Author: Alex Deucher Date: Tue Aug 7 15:17:09 2018 -0500 drm/amdgpu/pp: endian fixes for process_pptables_v1_0.c Properly swap when reading from the vbios. Reviewed-by: Evan Quan Reviewed-by: Rex Zhu Signed-off-by: Alex Deucher commit 35e160e781a048a9170a9deb3c1f13f06df4add9 Author: Christian König Date: Wed Aug 8 13:07:11 2018 +0200 drm/scheduler: change entities rq even earlier Looks like for correct debugging we need to know the scheduler even earlier. So move picking a rq for an entity into job creation. Signed-off-by: Christian König Reviewed-by: Nayan Deshmukh Signed-off-by: Alex Deucher commit 573edb241b44162a1478cc74429f94df86e6e71d Author: Christian König Date: Tue Aug 7 14:52:13 2018 +0200 drm/scheduler: fix last_scheduled handling Make sure we access last_scheduled only after checking that there are no more jobs on the entity. Signed-off-by: Christian König Reviewed-by: Nayan Deshmukh Signed-off-by: Alex Deucher commit 93f15e1c0796f102a62fdc4931e4c5f847c98a12 Author: Christian König Date: Fri Aug 3 13:07:36 2018 +0200 drm/scheduler: Remove entity->rq NULL check That is superflous now. Signed-off-by: Christian König Acked-by: Nayan Deshmukh Signed-off-by: Alex Deucher commit c2d358d724ee5ba8bda49a384ac3ae5ab125134c Author: Huang Rui Date: Mon Aug 6 20:14:51 2018 +0800 drm/amdgpu: move missed gfxoff entry into amdgpu_gfx header Move missed gfxoff entry to amdgpu_gfx.h. Signed-off-by: Huang Rui Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 4473e1db3120cc78e795fd2902275ba18659ae3f Author: Huang Rui Date: Fri Aug 3 19:06:02 2018 +0800 drm/amdgpu: move vm definitions into amdgpu_vm header Demangle amdgpu.h. Signed-off-by: Huang Rui Acked-by: Christian König Signed-off-by: Alex Deucher commit c082b99878b73ebf9e9b5296a5c4f3ad5313942a Author: Huang Rui Date: Fri Aug 3 18:59:25 2018 +0800 drm/amdgpu: move gmc macros into amdgpu_gmc header Demangle amdgpu.h. Signed-off-by: Huang Rui Acked-by: Christian König Signed-off-by: Alex Deucher commit 5df585258f9ff5d5b653f6a162dc389c597c5714 Author: Huang Rui Date: Thu Aug 9 09:50:12 2018 -0500 drm/amdgpu: move display definitions into amdgpu_display header Demangle amdgpu.h. Signed-off-by: Huang Rui Acked-by: Christian König Signed-off-by: Alex Deucher commit 9e21fc56fe5828642d0058700912ff31facb6fa6 Author: Huang Rui Date: Fri Aug 3 18:37:58 2018 +0800 drm/amdgpu: remove useless gds switch macro Demangle amdgpu.h. Signed-off-by: Huang Rui Acked-by: Christian König Signed-off-by: Alex Deucher commit 0a7845db93b29f773f37d87e9a15ec1c295b1163 Author: Huang Rui Date: Fri Aug 3 18:33:06 2018 +0800 drm/amdgpu: move ring macros into amdgpu_ring header Demangle amdgpu.h. Signed-off-by: Huang Rui Acked-by: Christian König Signed-off-by: Alex Deucher commit 4b991c54ce82e85d89babcf32d72746365163ed5 Author: Jia-Ju Bai Date: Sat Aug 4 08:01:02 2018 +0800 gpu: drm: radeon: radeon_test: Replace mdelay() with msleep() radeon_test_ring_sync() and radeon_test_ring_sync2() are never called in atomic context. They call mdelay() to busily wait, which is not necessary. mdelay() can be replaced with msleep(). This is found by a static analysis tool named DCNS written by myself. Signed-off-by: Jia-Ju Bai Signed-off-by: Alex Deucher commit 2f2debb5a162ea9aeb03ad2532827631e3a68b1a Author: Jia-Ju Bai Date: Sat Aug 4 08:33:44 2018 +0800 gpu: drm: radeon: si: Replace mdelay() with msleep() in si_pcie_gen3_enable() si_pcie_gen3_enable() is never called in atomic context. It calls mdelay() to busily wait, which is not necessary. mdelay() can be replaced with msleep(). This is found by a static analysis tool named DCNS written by myself Signed-off-by: Jia-Ju Bai Signed-off-by: Alex Deucher commit c51cebb890dc76260c02354882cf333c8207dd19 Author: Jia-Ju Bai Date: Sat Aug 4 08:25:35 2018 +0800 gpu: drm: radeon: cik: Replace mdelay() with msleep() in cik_pcie_gen3_enable() cik_pcie_gen3_enable() is never called in atomic context. It calls mdelay() to busily wait, which is not necessary. mdelay() can be replaced with msleep(). This is found by a static analysis tool named DCNS written by myself. Signed-off-by: Jia-Ju Bai Signed-off-by: Alex Deucher commit e854b61acf775a082d01d828fe3430bab0c4769f Author: Christian König Date: Mon Aug 6 12:46:41 2018 +0200 drm/scheduler: bind job earlier to scheduler Update job earlier with the scheduler it is supposed to be scheduled on. Otherwise we could incorrectly optimize dependencies when moving an entity from one scheduler to another. Signed-off-by: Christian König Reviewed-by: Nayan Deshmukh Signed-off-by: Alex Deucher commit 7febe4bfd5d477eba17f70d4879cb81e9787118e Author: Christian König Date: Wed Aug 1 16:22:39 2018 +0200 drm/scheduler: fix setting the priorty for entities (v2) Since we now deal with multiple rq we need to update all of them, not just the current one. v2: Trivial: Removed unused variable (Alex) Signed-off-by: Christian König Acked-by: Nayan Deshmukh Signed-off-by: Alex Deucher commit bf9b1d9dc7e99bb1395deb0ed0df3999ea527de3 Author: Rex Zhu Date: Mon Aug 6 19:45:04 2018 +0800 drm/amdgpu: Delay 100ms to enable gfx off feature Original 500ms delay seems a bit large. Change to 100 ms suggested by Christian. Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher commit 1fdf7a4b1f96520467a578bdd9c90793cf7e8728 Author: Vitaly Prosyak Date: Thu Jul 12 14:26:47 2018 -0500 drm/amd/display: Add check for num of entries in gamma This check avoids potential bugs related to gamma. Signed-off-by: Vitaly Prosyak Reviewed-by: Charlene Liu Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit dc6c981d202733fd5718d4db627f7d85fee651eb Author: Vitaly Prosyak Date: Wed Jul 18 15:10:10 2018 -0500 drm/amd/display: Use DGAM ROM or RAM [Why] Optimize gamma programming [How] Use ROM for optimization when it is possible. Use RAM only when it is necessary. Signed-off-by: Vitaly Prosyak Reviewed-by: Dmytro Laktyushkin Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit d02e07948fcff46a7a48f8747260941d7290774b Author: Nikola Cornij Date: Thu Jul 19 14:03:14 2018 -0400 drm/amd/display: Print DPP DTN log info only for enabled pipes [why] There is currently a dependency on the order in which tests are executed. This is because the non-relevant state info is being printed, which results in the output based on the state from the previous test. [how] Print DPP DTN log only if the pipe is enabled. In addition to the affected per-submission DTN golden logs, included in this change is also DTN golden log update for pre-submission tests. The other DTN golden logs affected by this change will be updated upon nightly test run (which will generate the updated DTN logs). Signed-off-by: Nikola Cornij Reviewed-by: Nikola Cornij Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 9b5349f74a85a6aa05c06d30f10b3a83d6ec00b1 Author: Martin Tsai Date: Fri Jul 27 15:39:47 2018 +0800 drm/amd/display: correct image viewport calculation [why] We didn't transfer the camera/video viewport coordinate when doing rotation and mirror. [how] To correct the viewport coordinate in calculate_viewport(). Signed-off-by: Martin Tsai Reviewed-by: Charlene Liu Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 1b369d3c0d9364df702fc9e50dd9f471b640ddff Author: Mikita Lipski Date: Thu Jul 26 16:27:48 2018 -0400 drm/amd/display: pass the right num of modes added [why] In case if edid is null or corrupted we need to manually add a single failsafe mode (640x480). If zero modes returned DRM adds a different failsafe mode that is not accepted by DP 1.2 compliance test [how] Return the number of modes manually added Signed-off-by: Mikita Lipski Reviewed-by: Sun peng Li Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 2cddc50e98193f2c4aab10d05550b5ffe7587e73 Author: Huang Rui Date: Mon Aug 13 11:41:35 2018 -0500 drm/amdgpu: move gem definitions into amdgpu_gem header Demangle amdgpu.h. Signed-off-by: Huang Rui Acked-by: Christian König Signed-off-by: Alex Deucher commit 6462c0071b8df3d03f5020a3f9b785d94cad80c6 Author: Huang Rui Date: Thu Aug 2 17:54:21 2018 +0800 drm/amdgpu: move psp macro into amdgpu_psp header Demangle amdgpu.h. Signed-off-by: Huang Rui Acked-by: Christian König Signed-off-by: Alex Deucher commit 55560046d5b0495833cc2cb3de43bbf4425da234 Author: Huang Rui Date: Thu Aug 2 17:47:15 2018 +0800 drm/amdgpu: move firmware definitions into amdgpu_ucode header Demangle amdgpu.h. Signed-off-by: Huang Rui Acked-by: Christian König Signed-off-by: Alex Deucher commit bb7743bc205177440ba98eca2359779ba943e03b Author: Huang Rui Date: Thu Aug 2 17:23:33 2018 +0800 drm/amdgpu: move sdma definitions into amdgpu_sdma header Demangle amdgpu.h. Furthermore, SDMA is used for moving and clearing the data buffer, so the header also need be included in ttm. Signed-off-by: Huang Rui Acked-by: Christian König Signed-off-by: Alex Deucher commit aa47d117282cc32874e2749ce8ae94262b9edddf Author: Huang Rui Date: Thu Aug 2 16:24:52 2018 +0800 drm/amdgpu: move ih definitions into amdgpu_ih header Demangle amdgpu.h Signed-off-by: Huang Rui Acked-by: Christian König Signed-off-by: Alex Deucher commit 448fe1928ce415b8cae0425e5c7f066d6bd8b2de Author: Huang Rui Date: Thu Aug 2 16:12:39 2018 +0800 drm/amdgpu: move gfx definitions into amdgpu_gfx header Demangle amdgpu.h Signed-off-by: Huang Rui Acked-by: Christian König Signed-off-by: Alex Deucher commit fd28705388ef5244a963aa5ec70751d522c214c3 Author: Rex Zhu Date: Fri Jul 27 14:10:45 2018 +0800 drm/amd/pp: Delete duplicated interface in hwmgr_func gfx off support in smu can be via powergate_gfx interface. so remove the gfx_off_control interface. Reviewed-by: Hawking Zhang Reviewed-by: Evan Quan Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher commit 3fded222f4bf7f4c56ef4854872a39a4de08f7a8 Author: Rex Zhu Date: Fri Jul 27 17:00:02 2018 +0800 drm/amdgpu: Disable gfx off if VCN is busy this patch is a workaround for the gpu hang at video begin/end time if gfx off is enabled. Reviewed-by: Hawking Zhang Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher commit 408acede8732bec629959f8628c46ab4517e3995 Author: Rex Zhu Date: Fri Jul 27 14:55:09 2018 +0800 drm/amdgpu: Ctrl gfx off via amdgpu_gfx_off_ctrl use amdgpu_gfx_off_ctrl function so driver can arbitrate whether the gfx ip can be power off or power on. Reviewed-by: Hawking Zhang Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher commit 1e317b99f0c244bd8830918fdae9715210baf4fe Author: Rex Zhu Date: Fri Jul 27 21:06:30 2018 +0800 drm/amdgpu: Put enable gfx off feature to a delay thread delay to enable gfx off feature to avoid gfx on/off frequently suggested by Alex and Evan. Reviewed-by: Hawking Zhang Reviewed-by: Felix Kuehling Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher commit d23ee13fba23a3039971a976b2c4857cb5ba9c73 Author: Rex Zhu Date: Mon Jul 30 16:59:09 2018 +0800 drm/amdgpu: Add amdgpu_gfx_off_ctrl function v2: 1. drop the special handling for the hw IP suggested by hawking and Christian. 2. refine the variable name suggested by Flora. This funciton as the entry of gfx off feature. we arbitrat gfx off feature enable/disable in this function. Reviewed-by: Hawking Zhang Reviewed-by: Felix Kuehling Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher commit 5a83c93249098df2ee3b0039ec8f4495b959fcd0 Author: Nicholas Kazlauskas Date: Tue Aug 21 14:36:49 2018 -0500 drm/amd/display: Add support for toggling DFS bypass [Why] If the hardware supports DFS bypass it will always be enabled after creation of the DCCG. DFS bypass should only be enabled when the current stream consists of a single embedded panel and the minimum display clock is below the DFS bypass threshold. [How] Add a function to the DCCG table that updates the DFS bypass state when setting the bandwidth. If the DFS bypass state is changed, the clock needs to be reprogrammed to reflect this before the DPREFCLK is updated for audio endpoints. The existing display clock value is used as the target display clock value when reprogramming since the resulting change will be equal or larger to the current value. These changes only specifically target dce110 but do offer a framework for support on other applicable targets. Signed-off-by: Nicholas Kazlauskas Reviewed-by: David Francis Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 1c8faa9aa0cc1ccf02bed608d23966b7347d71a6 Author: Nicholas Kazlauskas Date: Tue Jul 24 09:42:23 2018 -0400 drm/amd/display: Enable DFS bypass support in DC config [Why] We explicitly disable DFS bypass support when creating DC. Support for this feature should now be in place so it can be left implicitly enabled. [How] Remove the line that disables DFS bypass support. Note: This option was actually reset to false anyway for most of the hardware I've tested on making this particular line misleading in the first place. This patch also fixes this issue. Signed-off-by: Nicholas Kazlauskas Reviewed-by: Harry Wentland Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 4e60536d093f486229bb8d86c739e8ef6446df85 Author: Nicholas Kazlauskas Date: Tue Jul 24 13:19:49 2018 -0400 drm/amd/display: Set DFS bypass flags for dce110 [Why] While there is support for using and quering DFS bypass clocks the hardware is never notified to enter DFS bypass mode for dce110. [How] Add a flag that can be set when programming the display engine PLL to enable DFS bypass mode. If this flag is set then the hardware is notified to enter DFS bypass mode and the correct display engine clock frequency can be acquired. Signed-off-by: Nicholas Kazlauskas Reviewed-by: Harry Wentland Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 2cb3bcdb33c0a18b25a23e7081de8c9a1698a80e Author: Tony Cheng Date: Wed Jul 18 20:28:12 2018 -0400 drm/amd/display: dal 3.1.60 Signed-off-by: Tony Cheng Reviewed-by: Aric Cyr Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 265f5ba6c209875081da7c5f7affe8c2c1913a75 Author: Jun Lei Date: Mon Jul 16 10:40:31 2018 -0400 drm/amd/display: Move PME to function pointer call semantics [why] Legacy IRI style is not linux friendly. [how] New function pointer call semantics will be used for all future PPLIB/DAL interfaces, and also some existing will be refactored. This change defines how the new function pointer structures will look, as well as implements Signed-off-by: Jun Lei Reviewed-by: Tony Cheng Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit a465feae60dc615d0e363ea5809b95a433b259d4 Author: Charlene Liu Date: Mon Jul 16 14:05:11 2018 -0400 drm/amd/display: pass compat_level to hubp Signed-off-by: Charlene Liu Reviewed-by: Dmytro Laktyushkin Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit f688b614b64368ce1681f28cb6f2ff53e1eb8462 Author: Rex Zhu Date: Thu Jul 5 19:22:50 2018 +0800 drm/amd/pp: Implement get_performance_level for legacy dgpu display can get clock info through this function. implement this function for vega10 and old asics. from vega12, there is no power state management, so need to add new interface to notify display the clock info Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher commit 65f7260b135669bb1da72969ca8aad5c2fc4a300 Author: Andrey Grodzovsky Date: Tue Jul 31 10:52:25 2018 -0400 drm/amdgpu: Add job pipe sync dependecy trace It's useful to trace any dependency a job has on prevoius jobs. Signed-off-by: Andrey Grodzovsky Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 07507c01aa70558828216ea81393c1511fb6189d Author: Andrey Grodzovsky Date: Tue Jul 31 10:48:52 2018 -0400 drm/scheduler: Add job dependency trace. During debug sessions I encountered a need to trace back a job dependecy a few steps back to the first failing job. This trace helpped me a lot. Signed-off-by: Andrey Grodzovsky Reviewed-by: Christian König Signed-off-by: Alex Deucher commit df0ca30838eeddbd34d7573cdbfaf88c56ad3e65 Author: Nayan Deshmukh Date: Wed Aug 1 13:50:02 2018 +0530 drm/scheduler: move idle entities to scheduler with less load v2 This is the first attempt to move entities between schedulers to have dynamic load balancing. We just move entities with no jobs for now as moving the ones with jobs will lead to other compilcations like ensuring that the other scheduler does not remove a job from the current entity while we are moving. v2: remove unused variable and an unecessary check Signed-off-by: Nayan Deshmukh Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 97ffa35b5dec4e68baa85e626b69ae4949a4ca2a Author: Nayan Deshmukh Date: Wed Aug 1 13:50:01 2018 +0530 drm/scheduler: add new function to get least loaded sched v2 The function selects the run queue from the rq_list with the least load. The load is decided by the number of jobs in a scheduler. v2: avoid using atomic read twice consecutively, instead store it locally Signed-off-by: Nayan Deshmukh Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 249a07c05a8da9637c2eb3205f1fc739c216f707 Author: Nayan Deshmukh Date: Wed Aug 1 13:50:00 2018 +0530 drm/scheduler: add counter for total jobs in scheduler To keep track of the scheduler load. Signed-off-by: Nayan Deshmukh Reviewed-by: Christian König Signed-off-by: Alex Deucher commit ac0a6cf1c6ef91e4af2a9d56eeaee8fca61d6ad7 Author: Nayan Deshmukh Date: Wed Aug 1 13:49:59 2018 +0530 drm/scheduler: add a list of run queues to the entity These are the potential run queues on which the jobs from this entity can be scheduled. We will use this to do load balancing. Signed-off-by: Nayan Deshmukh Reviewed-by: Christian König Signed-off-by: Alex Deucher commit c36628d8989a7a0d1cc4fe2ae93c6cd99a865f68 Author: Rex Zhu Date: Sun Jul 29 18:53:02 2018 +0800 drm/amgpu/acp: Implement set_powergating_state for acp so driver can powergate acp block after asic initialized to save power. Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher commit 3a54d2c8951113171655425bd173f43bbcb531c5 Author: Rex Zhu Date: Sun Jul 29 18:44:06 2018 +0800 drm/amdgpu/acp: Powrgate acp via smu Call smu to power gate/ungate acp instand of only powr down acp tiles in acp block. when smu power gate acp: smu will turn off clock, power down acp tiles,check and enter in ULV state. when smu ungate acp: smu will exit ulv, turn on clocks, power on acp tiles. Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher commit 1062ddb6d5749f58fb3f086b9cdf596487ca2d6a Author: Vijendar Mukunda Date: Sun Jul 29 19:08:32 2018 +0800 drm/amd/amdgpu: Enabling Power Gating for Stoney platform Removed condition checks to skip the power gating feature for stoney platform. Reviewed-by: Alex Deucher Signed-off-by: Vijendar Mukunda Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher commit be2d6aa51e66625f93d3ba1eb817cd33d8136c60 Author: Rex Zhu Date: Thu Jul 19 11:48:36 2018 -0500 drm/amdgpu: Power down acp if board uses AZ (v2) if board uses AZ rather than ACP, we power down acp through smu to save power. v2: handle S3/S4 and hw_fini (Alex) Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher commit 982976d92f17aa8ff5d7a4d09fab4608795d12f3 Author: Rex Zhu Date: Thu Jul 19 13:49:07 2018 +0800 drm/amd/pp: Add ACP PG support in SMU when ACP block not enabled, we power off acp block to save power. Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher commit 9650205a32e7f69c9846a205351e307ea525c1e7 Author: Rex Zhu Date: Thu Aug 16 11:36:38 2018 +0800 drm/amd/display: Fix bug use wrong pp interface Used wrong pp interface, the original interface is exposed by dpm on SI and paritial CI. Pointed out by Francis David v2: dal only need to set min_dcefclk and min_fclk to smu. so use display_clock_voltage_request interface, instand of update all display configuration. Acked-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher commit a3d9103ebfa03824d255060fc2c11ac94e3ef441 Author: Andrey Grodzovsky Date: Wed Aug 22 10:07:35 2018 -0400 drm/amdgpu: Fix page fault and kasan warning on pci device remove. Problem: When executing echo 1 > /sys/class/drm/card0/device/remove kasan warning as bellow and page fault happen because adev->gart.pages already freed by the time amdgpu_gart_unbind is called. BUG: KASAN: user-memory-access in amdgpu_gart_unbind+0x98/0x180 [amdgpu] Write of size 8 at addr 0000000000003648 by task bash/1828 CPU: 2 PID: 1828 Comm: bash Tainted: G W O 4.18.0-rc1-dev+ #29 Hardware name: Gigabyte Technology Co., Ltd. AX370-Gaming/AX370-Gaming-CF, BIOS F3 06/19/2017 Call Trace: dump_stack+0x71/0xab kasan_report+0x109/0x390 amdgpu_gart_unbind+0x98/0x180 [amdgpu] ttm_tt_unbind+0x43/0x60 [ttm] ttm_bo_move_ttm+0x83/0x1c0 [ttm] ttm_bo_handle_move_mem+0xb97/0xd00 [ttm] ttm_bo_evict+0x273/0x530 [ttm] ttm_mem_evict_first+0x29c/0x360 [ttm] ttm_bo_force_list_clean+0xfc/0x210 [ttm] ttm_bo_clean_mm+0xe7/0x160 [ttm] amdgpu_ttm_fini+0xda/0x1d0 [amdgpu] amdgpu_bo_fini+0xf/0x60 [amdgpu] gmc_v8_0_sw_fini+0x36/0x70 [amdgpu] amdgpu_device_fini+0x2d0/0x7d0 [amdgpu] amdgpu_driver_unload_kms+0x6a/0xd0 [amdgpu] drm_dev_unregister+0x79/0x180 [drm] amdgpu_pci_remove+0x2a/0x60 [amdgpu] pci_device_remove+0x5b/0x100 device_release_driver_internal+0x236/0x360 pci_stop_bus_device+0xbf/0xf0 pci_stop_and_remove_bus_device_locked+0x16/0x30 remove_store+0xda/0xf0 kernfs_fop_write+0x186/0x220 __vfs_write+0xcc/0x330 vfs_write+0xe6/0x250 ksys_write+0xb1/0x140 do_syscall_64+0x77/0x1e0 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x7f66ebbb32c0 Fix: Split gmc_v{6,7,8,9}_0_gart_fini to postpone amdgpu_gart_fini to after memory managers are shut down since gart unbind happens as part of this procedure Signed-off-by: Andrey Grodzovsky Reviewed-by: Junwei Zhang Acked-by: Huang Rui Signed-off-by: Alex Deucher commit 4f0ecd36f276941453f6ea7f76308a2f14540987 Author: Emily Deng Date: Wed Aug 22 20:18:25 2018 +0800 amdgpu: fix multi-process hang issue SWDEV-146499: hang during multi vulkan process testing cause: the second frame's PREAMBLE_IB have clear-state and LOAD actions, those actions ruin the pipeline that is still doing process in the previous frame's work-load IB. fix: need insert pipeline sync if have context switch for SRIOV (because only SRIOV will report PREEMPTION flag to UMD) Signed-off-by: Monk Liu Signed-off-by: Emily Deng Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 9296435729dc8a2fd28b42391ff9f1ff310ebb7b Author: Christian König Date: Tue Aug 21 15:09:39 2018 +0200 drm/amdgpu: fix preamble handling At this point the command submission can still be interrupted. Signed-off-by: Christian König Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 1cadf2b36809dca78ea9bbee7789a30727c1b5b3 Author: Christian König Date: Thu Aug 16 12:01:03 2018 +0200 drm/amdgpu: fix VM clearing for the root PD We need to figure out the address after validating the BO, not before. Signed-off-by: Christian König Reviewed-by: Felix Kuehling Reviewed-by: Junwei Zhang Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 67458e543eb7c2d4290a51e9607998da5d0e5464 Author: Nicolas Ferre Date: Mon Aug 20 12:20:41 2018 +0200 ARM: dts: at91/trivial: remove old NAND bindings leftover in sama5d2 As the new bindings are already in place in sama5d2.dtsi and that it's used in the only Mainline board for this product (at91-sama5d2_ptc_ek.dts), we can safely remove the old bindings. Cc: Boris Brezillon Signed-off-by: Nicolas Ferre Signed-off-by: Alexandre Belloni commit 10af10db8c76fa5b9bf1f52a895c1cb2c0ac24da Author: Jay Foster Date: Mon Aug 20 11:42:01 2018 +0200 ARM: dts: at91/trivial: Fix USART1 definition for at91sam9g45 Fix a typo. No functional change made by this patch. Signed-off-by: Jay Foster Signed-off-by: Nicolas Ferre Signed-off-by: Alexandre Belloni commit 1e1f808f9d7ae8e39c81c51a1f713b2bc5a0074f Author: Claudiu Beznea Date: Wed Aug 8 10:47:40 2018 +0300 ARM: at91: pm: remove pm_bu initialization in at91_pm_backup_init() There is no need to initialize pm_bu since it is used only if backup mode is selected. In case backup mode initialization fails (which means pm_bu is invalid) the ULP0 mode will be selected. Signed-off-by: Claudiu Beznea Signed-off-by: Alexandre Belloni commit d06e3be6e86a5456a2b760952b7697e4a0d1fc02 Author: Takeshi Kihara Date: Wed Jul 25 21:15:46 2018 +0200 pinctrl: sh-pfc: r8a77965: Add SATA pins, groups and functions This patch adds SATA0 pin, group and function to the R8A77965 SoC. Signed-off-by: Takeshi Kihara [wsa: rebased to upstream base] Signed-off-by: Wolfram Sang Reviewed-by: Simon Horman Signed-off-by: Geert Uytterhoeven commit 331a53e05b67b40a107e7e2597d22b4f8a2ca0d2 Author: Biju Das Date: Thu Aug 2 15:57:51 2018 +0100 clk: renesas: cpg-mssr: Add r8a774a1 support Add RZ/G2M (R8A774A1) Clock Pulse Generator / Module Standby and Software Reset support. Based on the Table 8.2b of "RZ/G Series, 2nd Generation User's Manual: Hardware ((Rev. 0.61, June 12, 2018)". Signed-off-by: Biju Das Reviewed-by: Fabrizio Castro Signed-off-by: Geert Uytterhoeven commit 62f32dde334302d7ebb2b3c150f404a61cfcf55e Author: Biju Das Date: Thu Aug 2 15:56:34 2018 +0100 clk: renesas: Add r8a774a1 CPG Core Clock Definitions Add all RZ/G2M Clock Pulse Generator Core Clock Outputs, as listed in Table 8.2b ("List of Clocks [RZ/G2M]") of the RZ/G2M Hardware User's Manual. Signed-off-by: Biju Das Reviewed-by: Fabrizio Castro Signed-off-by: Geert Uytterhoeven commit e59bb7be47af31d293d6f94d2fad11188d2ba0e7 Author: Takeshi Kihara Date: Wed Jul 25 21:14:17 2018 +0200 clk: renesas: r8a77965: Add SATA clock This patch adds SATA clock to the R8A77965 SoC. Signed-off-by: Takeshi Kihara [wsa: rebased to upstream base] Signed-off-by: Wolfram Sang Reviewed-by: Simon Horman Signed-off-by: Geert Uytterhoeven commit f3824deb46332d1f037f9a26c8f01e3143e64c7e Author: Geert Uytterhoeven Date: Wed Jul 11 14:25:07 2018 +0200 clk: renesas: r8a77980: Add RCLK for watchdog timer On R-Car V3H, RCLK can be switched between EXTALR and the On-Chip Oscillator using mode pin MD19. Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman commit cd51e427e050f6a3d3bc3e0e38ad30974a52cb44 Author: Geert Uytterhoeven Date: Wed Jul 11 14:19:47 2018 +0200 clk: renesas: rcar-gen3: Add support for mode pin clock selection Make the existing support for selecting between clean and SSCG clocks using MD12 more generic, to allow using other mode pins for arbitrary clock selection. Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman commit 4f57998d647772280a6442bbc746249e5bfee572 Author: Geert Uytterhoeven Date: Wed Jul 11 14:12:19 2018 +0200 clk: renesas: r8a77995: Correct RCLK handling According to R-Car Gen3 Hardware Manual Rev.1.00, R-Car D3 has the RCLK Frequency Control Register (RCKCR), which determines the OSC and RINT predivider values, and selection of the RCLK clock source between RINT and the On-Chip Oscillator. Hence change the OSC and RINT clock definitions to use the RCKCR divider, and add the missing On-Chip Oscillator and RCLK clock source switching logic. Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman commit dc643a843b5d510c04b2e222a1a4bd735d387f50 Author: Geert Uytterhoeven Date: Wed Jul 11 14:04:51 2018 +0200 clk: renesas: r8a77990: Correct RCLK handling According to R-Car Gen3 Hardware Manual Rev.1.00, R-Car E3 has the RCLK Frequency Control Register (RCKCR), which determines the OSC and RINT predivider values, and selection of the RCLK clock source between RINT and the On-Chip Oscillator. Hence change the OSC and RINT clock definitions to use the RCKCR divider, and add the missing On-Chip Oscillator and RCLK clock source switching logic. Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman commit b9d0b84b3db8552f033d5051393b90852b977a76 Author: Geert Uytterhoeven Date: Wed Jul 11 13:54:30 2018 +0200 clk: renesas: rcar-gen3: Add support for RCKSEL clock selection Add a clock type and macro for defining clocks where the parent and divider are selected based on the value of the RCKCR.CKSEL bit. Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman commit 0d2602d750152f9fcf3d9af9466f3d67b60aa646 Author: Geert Uytterhoeven Date: Wed Jul 11 13:47:28 2018 +0200 clk: renesas: cpg-mssr: Add support for fixed rate clocks Add support for defining fixed rate clocks, to be used for on-chip oscillators. Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman commit 3a251270e6c877092baded767eba07e9abb1e00d Author: Geert Uytterhoeven Date: Wed Jul 11 14:16:40 2018 +0200 clk: renesas: r8a77980: Add OSC predivider configuration and clock R-Car Gen3 Hardware Manual Rev.0.54 documents the relation between the MD13 and MD14 mode pins, and the OSC EXTAL predivider, as used by the OSC clock. Hence augment the configuration structure with all documented predivider values. Add the OSC clock using the configured predivider. Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman commit 979a2298a55a5b93d47b9479f7fbc977324f091f Author: Geert Uytterhoeven Date: Wed Jul 11 13:41:25 2018 +0200 clk: renesas: r8a77965: Add OSC EXTAL predivider configuration R-Car Gen3 Hardware Manual Rev.0.52 documents the relation between the MD13 and MD14 mode pins, and the OSC EXTAL predivider, as used by the OSC and RINT RCLK clocks. Hence augment the configuration structure with all documented predivider values. According to R-Car Gen3 Hardware Manual Rev.1.00, R-Car M3-N does not have the CPG_RCKCR register. Change the OSC and RINT clock definitions to use the OSC EXTAL predivider instead, which is supported on all R-Car M3-N SoC revisions. Inspired by a patch in the BSP by Takeshi Kihara . Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman commit 7b8b9a4131221b5e9c460c0bbc107b8b018b05ca Author: Geert Uytterhoeven Date: Wed Jul 11 13:39:29 2018 +0200 clk: renesas: r8a7796: Add OSC EXTAL predivider configuration R-Car Gen3 Hardware Manual Rev.0.52 documents the relation between the MD13 and MD14 mode pins, and the OSC EXTAL predivider, as used by the OSC and RINT RCLK clocks. Hence augment the configuration structure with all documented predivider values. According to R-Car Gen3 Hardware Manual Rev.0.53, the CPG_RCKCR register was removed in R-Car M3-W ES1.1. Change the OSC and RINT clock definitions to use the OSC EXTAL predivider instead, which is supported on all R-Car M3-W SoC revisions. Inspired by a patch in the BSP by Takeshi Kihara . Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman commit f23b866e20210d2ca8e6aa8506ff727dd9d03d03 Author: Geert Uytterhoeven Date: Wed Jul 11 13:28:44 2018 +0200 clk: renesas: r8a7795: Add OSC EXTAL predivider configuration R-Car Gen3 Hardware Manual Rev.0.52 documents the relation between the MD13 and MD14 mode pins, and the OSC EXTAL predivider, as used by the OSC and RINT RCLK clocks. Hence augment the configuration structure with all documented predivider values. According to R-Car Gen3 Hardware Manual Rev.0.53, the CPG_RCKCR register was removed in R-Car H3 ES2.0. Change the OSC and RINT clock definitions to use the OSC EXTAL predivider instead, which is supported on all R-Car H3 SoC revisions. Inspired by a patch in the BSP by Takeshi Kihara . Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman commit 38c79e2899a66096583f3377c64b35f30584f1b4 Author: Geert Uytterhoeven Date: Wed Jul 11 13:14:44 2018 +0200 clk: renesas: rcar-gen3: Add support for OSC EXTAL predivider Add a clock type and macro for defining clocks using the OSC EXTAL predivider combined with a fixed divider. On most R-Car Gen3 SoCs, the predivider value depends on mode pins, and thus must be specified in the configuration structure. Inspired by a patch in the BSP by Takeshi Kihara . Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman commit fdb78a8c35bce065272d71ac7eb64d6d7512db99 Author: Geert Uytterhoeven Date: Mon Jul 23 15:21:52 2018 +0200 clk: renesas: rcar-gen3: Rename rint to .r All other internal clock names have a period prepended. Hence rename the internal RCLK from "rint" to ".r", and move it to the section where all other internal clocks are defined. Signed-off-by: Geert Uytterhoeven Acked-by: Stephen Boyd Reviewed-by: Simon Horman commit bf1178c9893018b77c829215970cf4c6a3cebb34 Author: Sean Paul Date: Mon Aug 13 17:30:46 2018 -0400 drm/bridge: ti-sn65dsi86: Add mystery delay to enable() This patch adds a 70ms mystery delay to the bridge driver in enable. By experimentation, it seems like it can go anywhere up until we initiate semi-auto link training. If we don't have the delay, link training fails. I tried to root cause this as best I could, but neither the datasheet for the panel nor the bridge mention a delay of this magnitude in their timing requirements. So for now, add the mystery delay until someone figures out a better fix. Changes in v3: - Added to the set Cc: Sandeep Panda Reviewed-by: Sandeep Panda Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20180813213058.184821-8-sean@poorly.run commit bb837a434e6e3fce9e9d453271dd65fc79e74a42 Author: Cyrille Pitchen Date: Mon Aug 6 14:19:48 2018 +0300 ARM: dts: at91: sama5d2 Xplained: add pin muxing for I2S This patch sets the pin muxing for the I2S controllers Signed-off-by: Cyrille Pitchen [codrin.ciubotariu@microchip.com: added pin muxing for the second controller] Signed-off-by: Codrin Ciubotariu Signed-off-by: Alexandre Belloni commit 1ca81883c557642f1a6312e95298931722689149 Author: Cyrille Pitchen Date: Mon Aug 6 14:19:47 2018 +0300 ARM: dts: at91: sama5d2: add nodes for I2S controllers This patch adds DT nodes for I2S0 and I2S1. It also adds an alias for each I2S node. Signed-off-by: Cyrille Pitchen [codrin.ciubotariu@microchip.com: removed unnecessary clock phandles] Signed-off-by: Codrin Ciubotariu Signed-off-by: Alexandre Belloni commit 943b4164abdfa6e1cdd5f8fe70fa696f2bad6449 Author: Codrin Ciubotariu Date: Mon Aug 6 14:19:46 2018 +0300 ARM: dts: at91: sama5d2: add I2S clock muxing nodes This patch adds two clock muxes for the two I2S buses present on sama5d2 platforms. Signed-off-by: Codrin Ciubotariu Signed-off-by: Alexandre Belloni commit cfb3cff763dfefee3b3ed0cafde46415bf9be119 Author: Eugen Hristev Date: Mon Aug 27 16:57:13 2018 +0300 ARM: dts: at91: sama5d2: Add resistive touch device Add generic resistive touch device which is connected to ADC block inside the SAMA5D2 SoC Signed-off-by: Eugen Hristev Signed-off-by: Alexandre Belloni commit 368e824b1d4e94c10d84aab6569805c511bbedaa Author: Eugen Hristev Date: Mon Aug 27 16:57:12 2018 +0300 ARM: dts: at91: sama5d2: add channel cells for ADC device Preparing the ADC device to connect channel consumer drivers Signed-off-by: Eugen Hristev Signed-off-by: Alexandre Belloni commit bc537a9cc47eec7f4e32b8164c494ddc35dca8ac Merge: a5ec8332d428 5b394b2ddf03 Author: Sean Paul Date: Mon Aug 27 10:00:03 2018 -0400 Merge drm/drm-next into drm-misc-next Now that 4.19-rc1 is cut, backmerge it into -misc-next. Signed-off-by: Sean Paul commit 43bcac2396f7874338016d3c6d86d0bdad8e63e8 Author: Eugeniu Rosca Date: Sun Aug 12 15:31:43 2018 +0200 dt-bindings: arm: Document Renesas R-Car M3-N-based ULCB board In harmony with ATF and U-Boot outputs [1] and [2], the new board is based on M3-N revision ES1.1 and the amount of memory present on SiP is 2GiB, contiguously addressed. The amount of RAM is mentioned based on the assumption that it is encoded in the board id/string. There is some evidence supporting this in form of last-digit-mismatch between two R-Car H3 ES2.0 ULCB board ids, one with 4GiB and one with 8GiB of RAM (see [3]). [1] BL2: R-Car Gen3 Initial Program Loader(CA57) Rev.1.0.21 BL2: PRR is R-Car M3N Ver.1.1 [2] U-Boot 2015.04-00295-* CPU: Renesas Electronics R8A77965 rev 1.1 ---8<---- DRAM: 1.9 GiB Bank #0: 0x048000000 - 0x0bfffffff, 1.9 GiB ---8<---- [3] https://patchwork.kernel.org/patch/10555957/#22169325 Signed-off-by: Eugeniu Rosca Signed-off-by: Simon Horman commit d0990cd0930c93e06bdf815ce7c350b621e7fd2f Author: Chris Brandt Date: Fri Jul 27 11:53:33 2018 -0500 dt-bindings: arm: Document RZ/A2 SoC DT bindings Add device tree bindings documentation for Renesas RZ/A2 (r7s9210) SoC. Also document new option for "renesas,bsid" Signed-off-by: Chris Brandt Reviewed-by: Geert Uytterhoeven Reviewed-by: Rob Herring Signed-off-by: Simon Horman commit 01588646dbce3bf9a79a190f3949677067cc1e20 Author: Biju Das Date: Tue Jul 24 16:47:16 2018 +0100 dt-bindings: arm: Document RZ/G2M SoC DT bindings Add device tree bindings documentation for Renesas RZ/G2M (r8a774a1) SoC. Signed-off-by: Biju Das Reviewed-by: Chris Paterson Reviewed-by: Geert Uytterhoeven Reviewed-by: Rob Herring Signed-off-by: Simon Horman commit 175f435f44b724e389f23c154d94fda45870c1f6 Author: Chris Brandt Date: Fri Jul 27 11:53:32 2018 -0500 soc: renesas: identify RZ/A2 Add support for identifying the RZ/A2M (R7S9210) SoC. Also add support for reading the BSID register which is a different format than the PRR. Signed-off-by: Chris Brandt Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit 332df9828e94d4288825584638b7df6ad4c1ff38 Author: Chris Brandt Date: Wed Jul 25 16:22:18 2018 -0500 ARM: shmobile: Add basic RZ/A2 SoC support Add the RZ/A2 SoC to the Renesas SoC collection. Signed-off-by: Chris Brandt Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit 2a4056a759e26745f3a19431f5428c581fd8f347 Author: Biju Das Date: Tue Jul 24 16:47:18 2018 +0100 soc: renesas: Identify RZ/G2M This patch adds support for identifying the RZ/G2M (r8a774a1) SoC. It corrects the original RZ/G SoC family name to RZ/G1 and also adds support for the new RZ/G2 SoC family. Signed-off-by: Biju Das Reviewed-by: Chris Paterson Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit 58e8ed2ee9abe7181d68d5cf067a858a753c77a0 Author: Laurent Pinchart Date: Tue Jun 5 12:51:06 2018 +0300 arm64: dts: renesas: Convert to new LVDS DT bindings The internal LVDS encoder now has DT bindings separate from the DU. Port the r8a7795 and r8a7796 device trees over to the new model. Signed-off-by: Laurent Pinchart Signed-off-by: Simon Horman commit dc7a6bab2bb78ff403fb7adce81514cb6f82aeb1 Author: Magnus Damm Date: Thu Jul 19 20:25:25 2018 +0900 arm64: dts: renesas: r8a77995: Attach the SYS-DMAC to the IPMMU Hook up SYS-DMAC0, SYS-DMAC1 and SYS-DMAC2 to IPMMU-DS0 and IPMMU-DS1 following the R-Car Gen3 Rev.1.00 (April 2018) datasheet. Signed-off-by: Magnus Damm Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit e18a31a7add2d85c0d3e88460a09032d35e70d6c Author: Magnus Damm Date: Thu Jul 19 20:19:50 2018 +0900 arm64: dts: renesas: Include R-Car product name in DTSI files Browsing the DTS for all the R-Car SoCs with similar part numbers makes my head hurt, so to improve the user friendliness of the DTS code base include R-Car product name in each DTSI file. Product names are derived from Documentation/devicetree/bindings/arm/shmobile.txt Signed-off-by: Magnus Damm Signed-off-by: Simon Horman commit bcee502ceb6c0dcbc7ccd460ed7040c3d6998c3e Author: Sergei Shtylyov Date: Fri Jul 20 22:21:45 2018 +0300 arm64: dts: renesas: r8a77980: add RWDT support Describe RWDT in the R8A77980 SoC device tree. Enable RWDT on the Condor and V3H Starter Kit boards. Based on the original (and large) patch by Vladimir Barinov. Signed-off-by: Vladimir Barinov Signed-off-by: Sergei Shtylyov Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit 48acc8440a78596384881ba773e47d55c4de2ebc Author: Biju Das Date: Mon Aug 13 08:41:33 2018 +0100 arm64: defconfig: enable R8A774A1 SoC Enable the Renesas RZ/G2M (R8A774A1) SoC in the ARM64 defconfig. Signed-off-by: Biju Das Signed-off-by: Simon Horman commit ad73cc2b913273df971cf318d0fe40785376dbcd Author: Geert Uytterhoeven Date: Tue Jul 31 17:56:02 2018 +0200 ARM: shmobile: r8a7779: Remove unused includes Presumable unused since commit c99cd90d98a98aa1 ("ARM: shmobile: r8a7779: Remove legacy SoC code"). Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit af69e34040d1d72f7002208a2a46fea7192c7ad6 Author: Magnus Damm Date: Mon Aug 20 23:04:44 2018 +0900 ARM: dts: Include R-Car Gen1 product name in DTSI files Browsing the DTS for all the R-Car SoCs with similar part numbers still makes my head hurt, so to improve the user friendliness of the 32-bit ARM DTS code base include R-Car Gen1 product names for each DTSI file. Signed-off-by: Magnus Damm Signed-off-by: Simon Horman commit 180814bb9cd217e7cefc76f817c6f316dcd1e195 Author: Marek Vasut Date: Sat Aug 11 13:25:10 2018 +0200 ARM: dts: stout: Add DA9063 OnKey node Add DA9063 OnKey subnode to DA9063 PMIC node on Stout. Signed-off-by: Marek Vasut Signed-off-by: Simon Horman commit d688a83aa6e33654d14d1d79e59a340ed4d08332 Author: Marek Vasut Date: Sat Aug 11 13:02:57 2018 +0200 ARM: dts: silk: Add DA9063 RTC and OnKey node Add DA9063 RTC and OnKey subnode to DA9063 PMIC node on Silk. Signed-off-by: Marek Vasut Signed-off-by: Simon Horman commit 938fbd1ae2aca6e0547411687f0cc32d18427eae Author: Biju Das Date: Tue Aug 7 08:57:05 2018 +0100 ARM: dts: iwg23s-sbc: specify EtherAVB PHY IRQ Specify EtherAVB PHY IRQ in the board specific device tree, now that we have GPIO support. Signed-off-by: Biju Das Reviewed-by: Fabrizio Castro Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit 5fcd4bfe03913301bab34e2934c838eb4173a475 Author: Biju Das Date: Tue Aug 7 08:57:04 2018 +0100 ARM: dts: r8a77470: Add GPIO support Describe GPIO blocks in the R8A77470 device tree. Signed-off-by: Biju Das Reviewed-by: Fabrizio Castro Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit bce6d67d035eeaea20dcee12b1362cebde6d9b35 Author: Marek Vasut Date: Sat Aug 4 18:38:18 2018 +0200 ARM: dts: silk: Add DA9063 PMIC node Add DA9063 PMIC node to the I2C bus. Signed-off-by: Marek Vasut Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit d17f45eb718172088e3460fc9fadc735b1df8a20 Author: Marek Vasut Date: Mon Jul 30 13:17:26 2018 +0200 ARM: dts: gose: Add DA9210 node for CPU DVFS Add DA9210 DVFS node to the I2C bus and link it to CPU0 for DVFS. Signed-off-by: Marek Vasut Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit b8ca3668a328b08eea1ed74dc11f72968b2e8032 Author: Laurent Pinchart Date: Tue Jun 5 12:51:05 2018 +0300 ARM: dts: rcar-gen2: Convert to new DU DT bindings The DU DT bindings have been updated to drop the reg-names property. Update the r8a7792 and r8a7794 device trees accordingly. Signed-off-by: Laurent Pinchart Signed-off-by: Simon Horman commit 01a12d4975fb09c10f64cb551d4903dacd032b79 Author: Biju Das Date: Fri Jul 20 14:13:31 2018 +0100 ARM: dts: iwg23s-sbc: Add pinctl support for scif1 Adding pinctrl support for scif1 interface. Signed-off-by: Biju Das Reviewed-by: Chris Paterson Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit 0ea1a4d2c92a65aea6acc2397938cd01b053bc38 Author: Biju Das Date: Fri Jul 20 14:09:46 2018 +0100 ARM: dts: r8a77470: Add PFC support Define the generic R8A77470 part of the PFC device node. Signed-off-by: Biju Das Reviewed-by: Fabrizio Castro Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit f892c0c70ecad58d096ed5bd54a650fa9c770d74 Author: Biju Das Date: Fri Jul 20 14:07:02 2018 +0100 ARM: dts: r8a77470: Use r8a77470-sysc binding definitions Replace the hardcoded power domain indices by R8A77470_PD_* symbols. Signed-off-by: Biju Das Reviewed-by: Chris Paterson Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit 441f61e3aa9e7386731ce1405044d484bd81f911 Author: Geert Uytterhoeven Date: Fri Jul 20 14:28:57 2018 +0200 ARM: dts: rcar: Correct SATA device sizes to 2 MiB Update the SATA device nodes on R-Car H1, H2, and M2-W to use a 2 MiB I/O space, as specified in Rev.1.0 of the R-Car H1 and R-Car Gen2 hardware user manuals. See also commit e9f0089b2d8a3d45 ("arm64: dts: r8a7795: Correct SATA device size to 2MiB"). Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit f7be103571e8085a363d47b911560a261a440fd4 Author: Jacopo Mondi Date: Wed Jul 18 15:31:12 2018 +0200 ARM: shmobile: defconfig: Remove SOC_CAMERA As the soc_camera framework is going to be deprecated soon, remove the associated configuration options from shmobile defconfig. Signed-off-by: Jacopo Mondi Acked-by: Hans Verkuil Signed-off-by: Simon Horman commit 9afc5eee65ca7d717a99d6fe8f4adfe32a40940a Author: Arnd Bergmann Date: Fri Jul 13 12:52:28 2018 +0200 y2038: globally rename compat_time to old_time32 Christoph Hellwig suggested a slightly different path for handling backwards compatibility with the 32-bit time_t based system calls: Rather than simply reusing the compat_sys_* entry points on 32-bit architectures unchanged, we get rid of those entry points and the compat_time types by renaming them to something that makes more sense on 32-bit architectures (which don't have a compat mode otherwise), and then share the entry points under the new name with the 64-bit architectures that use them for implementing the compatibility. The following types and interfaces are renamed here, and moved from linux/compat_time.h to linux/time32.h: old new --- --- compat_time_t old_time32_t struct compat_timeval struct old_timeval32 struct compat_timespec struct old_timespec32 struct compat_itimerspec struct old_itimerspec32 ns_to_compat_timeval() ns_to_old_timeval32() get_compat_itimerspec64() get_old_itimerspec32() put_compat_itimerspec64() put_old_itimerspec32() compat_get_timespec64() get_old_timespec32() compat_put_timespec64() put_old_timespec32() As we already have aliases in place, this patch addresses only the instances that are relevant to the system call interface in particular, not those that occur in device drivers and other modules. Those will get handled separately, while providing the 64-bit version of the respective interfaces. I'm not renaming the timex, rusage and itimerval structures, as we are still debating what the new interface will look like, and whether we will need a replacement at all. This also doesn't change the names of the syscall entry points, which can be done more easily when we actually switch over the 32-bit architectures to use them, at that point we need to change COMPAT_SYSCALL_DEFINEx to SYSCALL_DEFINEx with a new name, e.g. with a _time32 suffix. Suggested-by: Christoph Hellwig Link: https://lore.kernel.org/lkml/20180705222110.GA5698@infradead.org/ Signed-off-by: Arnd Bergmann commit 33e26418193f58d1895f2f968e1953b1caf8deb7 Author: Arnd Bergmann Date: Tue Aug 14 15:18:20 2018 +0200 y2038: make do_gettimeofday() and get_seconds() inline get_seconds() and do_gettimeofday() are only used by a few modules now any more (waiting for the respective patches to get accepted), and they are among the last holdouts of code that is not y2038 safe in the core kernel. Move the implementation into the timekeeping32.h header to clean up the core kernel and isolate the old interfaces further. Signed-off-by: Arnd Bergmann commit 976516404ff3fab2a8caa8bd6f5efc1437fed0b8 Author: Arnd Bergmann Date: Tue Aug 14 14:02:57 2018 +0200 y2038: remove unused time interfaces After many small patches, at least some of the deprecated interfaces have no remaining users any more and can be removed: current_kernel_time do_settimeofday get_monotonic_boottime get_monotonic_boottime64 get_monotonic_coarse get_monotonic_coarse64 getrawmonotonic64 ktime_get_real_ts timekeeping_clocktai timespec_trunc timespec_valid_strict time_to_tm For many of the remaining time functions, we are missing one or two patches that failed to make it into 4.19, they will be removed in the following merge window. The replacement functions for the removed interfaces are documented in Documentation/core-api/timekeeping.rst. Signed-off-by: Arnd Bergmann commit 207f60babbed7e95c3a9accf3560e2f2a9b662ec Author: Aapo Vienamo Date: Fri Aug 10 21:14:04 2018 +0300 arm64: dts: tegra186: Enable HS400 Enable HS400 signaling on Tegra186 SDMMC4 controller. Signed-off-by: Aapo Vienamo Signed-off-by: Thierry Reding commit d5d6b468a0043579c3576ddbd4191c13837af672 Author: Aapo Vienamo Date: Fri Aug 10 21:14:05 2018 +0300 arm64: dts: tegra210: Enable HS400 Enable HS400 signaling on Tegra210 SDMMC4 controller. Signed-off-by: Aapo Vienamo Signed-off-by: Thierry Reding commit 22248e91bee0d582b1601675a16d7c2134d5fd2d Author: Aapo Vienamo Date: Fri Aug 10 21:14:02 2018 +0300 arm64: dts: tegra186: Add SDMMC4 DQS trim value Add the HS400 DQS trim value for Tegra186 SDMMC4. Signed-off-by: Aapo Vienamo Signed-off-by: Thierry Reding commit 5879600a70d07d643f1b858f3f94675a9e93ba29 Author: Aapo Vienamo Date: Fri Aug 10 21:14:03 2018 +0300 arm64: dts: tegra210: Add SDMMC4 DQS trim value Add the HS400 DQS trim value for Tegra210 SDMMC4. Signed-off-by: Aapo Vienamo Signed-off-by: Thierry Reding commit 98a2494f847c2d219db3b6460a3446199f0bd300 Author: Aapo Vienamo Date: Fri Aug 10 21:08:41 2018 +0300 arm64: dts: tegra186: Assign clocks for sdmmc1 and sdmmc4 Configure sdmmc4 parent clock to pllc4 and sdmmc1 to pllp_out0 by setting the assigned-clocks device tree properties. pllc4 offer better jitter performance and should be used with higher speed modes like HS200 and HS400. Signed-off-by: Aapo Vienamo Signed-off-by: Thierry Reding commit 918f9671c86b1d4771e9738f9c42abce90194369 Author: Aapo Vienamo Date: Fri Aug 10 21:08:42 2018 +0300 arm64: dts: tegra210: Assign clocks for sdmmc1 and sdmmc4 Use assigned-clock properties to configure pllc4 as the parent clock for sdmmc4 on Tegra210. pllc4 offers better jitter perfomance than the default pllp and is required by HS200 and HS400 modes. Signed-off-by: Aapo Vienamo Signed-off-by: Thierry Reding commit 6f90c6f0db83f2be2dcd9f1a07a5238751b3a7f7 Author: Aapo Vienamo Date: Fri Aug 10 21:08:40 2018 +0300 arm64: dts: tegra186: Add SDHCI tap and trim values Add SDHCI inbound and outbound SDHCI sampling trimmer values for Tegra186. Signed-off-by: Aapo Vienamo Signed-off-by: Thierry Reding commit 63af8bcd23a6adb056c10c872f3da14e1ed8469f Author: Aapo Vienamo Date: Fri Aug 10 21:08:39 2018 +0300 arm64: dts: tegra210: Add SDHCI tap and trim values Add SDHCI inbound and outbound SDHCI sampling trimmer values for Tegra210. Signed-off-by: Aapo Vienamo Signed-off-by: Thierry Reding commit 41408c215ab79a3c0ca487a77ad5e007989cb64f Author: Aapo Vienamo Date: Fri Aug 10 21:08:37 2018 +0300 arm64: dts: tegra186: Add sdmmc pad auto calibration offsets Add the calibration offset properties used for automatic pad drive strength calibration. Signed-off-by: Aapo Vienamo Signed-off-by: Thierry Reding commit 1ea067183d8a4d59a0d908113b5f96a7bb3d5c8c Author: Aapo Vienamo Date: Fri Aug 10 21:08:38 2018 +0300 arm64: dts: tegra210: Add sdmmc pad auto calibration offsets Add the calibration offset properties used for automatic pad drive strength calibration. Signed-off-by: Aapo Vienamo Signed-off-by: Thierry Reding commit 1e0f69746d62b29aae70b8a5ddc7bdea8b36e5b4 Author: Aapo Vienamo Date: Fri Aug 10 21:08:36 2018 +0300 arm64: dts: tegra210-p2597: Remove no-1-8-v from sdmmc1 Allow sdmmc1 to set the signaling voltage to 1.8 V in order to support faster signaling modes. Signed-off-by: Aapo Vienamo Signed-off-by: Thierry Reding commit 6ff7705da8806de45ca1490194f0b4eb07725804 Author: Aapo Vienamo Date: Fri Aug 10 21:08:35 2018 +0300 arm64: dts: tegra210-p2180: Correct sdmmc4 vqmmc-supply On p2180 sdmmc4 is powered from a fixed 1.8 V regulator. Signed-off-by: Aapo Vienamo Reviewed-by: Mikko Perttunen Signed-off-by: Thierry Reding commit 41cc3771c93e7b08520e80c1673ed3183e7cfa2a Author: Aapo Vienamo Date: Fri Aug 10 21:08:34 2018 +0300 arm64: dts: tegra210-p2180: Allow ldo2 to go down to 1.8 V Set regulator-min-microvolt property of ldo2 to 1.8 V in tegra210-p2180.dtsi. ldo2 is used by the sdmmc1 SDHCI controller and its voltage needs to be adjusted down to 1.8 V to support faster signaling modes. It appears that the comment about the SDHCI driver requesting invalid voltages no longer applies. Signed-off-by: Aapo Vienamo Reviewed-by: Mikko Perttunen Signed-off-by: Thierry Reding commit 24005fd1b3b4e3fdd4cc45e7ead21d07e8ee1670 Author: Aapo Vienamo Date: Fri Aug 10 21:08:33 2018 +0300 arm64: dts: Add Tegra186 sdmmc pinctrl voltage states Add pad voltage configuration nodes for sdmmc pads with configurable voltages on Tegra186. Signed-off-by: Aapo Vienamo Reviewed-by: Mikko Perttunen Signed-off-by: Thierry Reding commit 6641af7e1fa76276c33fa74cd637b6e738ae693c Author: Aapo Vienamo Date: Fri Aug 10 21:08:32 2018 +0300 arm64: dts: Add Tegra210 sdmmc pinctrl voltage states Add pad voltage configuration nodes for sdmmc pads with configurable voltages on Tegra210. Signed-off-by: Aapo Vienamo Reviewed-by: Mikko Perttunen Signed-off-by: Thierry Reding commit 33a1f89b605cf393666fa4156546dccb2f2d066f Merge: 5b394b2ddf03 d9be10edf7d6 Author: Thierry Reding Date: Mon Aug 27 12:27:09 2018 +0200 Merge branch 'for-4.20/dt-bindings' into for-4.20/arm64/dt commit 4a37f11c8f57ffd6f7397eaf372109d67edd3769 Author: Aapo Vienamo Date: Fri Aug 10 21:08:12 2018 +0300 soc/tegra: pmc: Implement pad configuration via pinctrl Register a pinctrl device and implement get and set functions for PIN_CONFIG_LOW_POWER_MODE and PIN_CONFIG_POWER_SOURCE parameters. Signed-off-by: Aapo Vienamo Acked-by: Jon Hunter Signed-off-by: Thierry Reding commit fccf0f76ecd3e4dfb947cb0eeac7ce22a2f0f42b Author: Aapo Vienamo Date: Fri Aug 10 21:08:11 2018 +0300 soc/tegra: pmc: Remove public pad voltage APIs Make tegra_io_pad_set_voltage() and tegra_io_pad_get_voltage() static and remove the prototypes from pmc.h. Remove enum tegra_io_pad_voltage and use the defines from instead. These functions aren't used outside of the pmc driver and new use cases should use the pinctrl interface instead. Signed-off-by: Aapo Vienamo Acked-by: Jon Hunter Signed-off-by: Thierry Reding commit 437c4f26f428cc2d5399442ce5d18f3c222c9c3b Author: Aapo Vienamo Date: Fri Aug 10 21:08:10 2018 +0300 soc/tegra: pmc: Use X macro to generate IO pad tables Refactor the IO pad tables into macro tables so that they can be reused to generate pinctrl pin descriptors. Also add a name field which is needed by pinctrl. Signed-off-by: Aapo Vienamo Signed-off-by: Thierry Reding commit f142b9d6461c4f60feb2a602bafcd582aa324288 Author: Aapo Vienamo Date: Fri Aug 10 21:08:09 2018 +0300 soc/tegra: pmc: Implement tegra_io_pad_is_powered() Implement a function to query whether a pad is in deep power down mode. This is needed by the pinctrl callbacks. Signed-off-by: Aapo Vienamo Acked-by: Jon Hunter Signed-off-by: Thierry Reding commit 00ead3c913afe8872a428e56e2a815adb2b230d1 Author: Aapo Vienamo Date: Fri Aug 10 21:08:08 2018 +0300 soc/tegra: pmc: Factor out DPD register bit calculation Factor out the the code to calculate the correct DPD register and bit number for a given pad. This logic will be needed to query the status register. Signed-off-by: Aapo Vienamo Acked-by: Jon Hunter Signed-off-by: Thierry Reding commit 13136a47a061c01c91df78b37f7708dd5ce7035f Author: Aapo Vienamo Date: Fri Aug 10 21:08:07 2018 +0300 soc/tegra: pmc: Fix pad voltage configuration for Tegra186 Implement support for the PMC_IMPL_E_33V_PWR register which replaces PMC_PWR_DET register interface of the SoC generations preceding Tegra186. Also add the voltage bit offsets to the tegra186_io_pads[] table and the AO_HV pad. Signed-off-by: Aapo Vienamo Acked-by: Jon Hunter Signed-off-by: Thierry Reding commit 1dc6bd5e39a29453bdcc17348dd2a89f1aa4004e Author: Johan Hovold Date: Wed Nov 15 10:44:58 2017 +0100 soc/tegra: pmc: Fix child-node lookup Fix child-node lookup during probe, which ended up searching the whole device tree depth-first starting at the parent rather than just matching on its children. To make things worse, the parent pmc node could end up being prematurely freed as of_find_node_by_name() drops a reference to its first argument. Fixes: 3568df3d31d6 ("soc: tegra: Add thermal reset (thermtrip) support to PMC") Cc: stable # 4.0 Cc: Mikko Perttunen Signed-off-by: Johan Hovold Reviewed-by: Mikko Perttunen Signed-off-by: Thierry Reding commit 4d8c836a866bb49812edcc9f1c1c4cd562619e1d Merge: 5b394b2ddf03 d9be10edf7d6 Author: Thierry Reding Date: Mon Aug 27 12:24:32 2018 +0200 Merge branch 'for-4.20/dt-bindings' into for-4.20/soc commit d9be10edf7d6040468f89824df0dfcfcbf3a693b Author: Aapo Vienamo Date: Fri Aug 10 21:08:03 2018 +0300 dt-bindings: Add Tegra PMC pad configuration bindings Document the PMC pinctrl bindings for pad power state and signaling voltage configuration. Both nvidia,tegra186-pmc.txt and nvidia,tegra20-pmc.txt are modified as they both cover SoC generations for which these bindings apply. Add a header defining Tegra PMC pad voltage configurations. Signed-off-by: Aapo Vienamo Acked-by: Jon Hunter Reviewed-by: Rob Herring Signed-off-by: Thierry Reding commit d947dddf1c95122f5a6e2de19b4483c7ba74aeca Author: Dan Carpenter Date: Mon Aug 27 12:24:10 2018 +0300 staging: pi433: eliminate a temporary variable We can just get rid of the "spi_address". It's not clear what the "address" part of the name means, and the type should have been a u8. Signed-off-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman commit 6f128fa41f310e1f39ebcea9621d2905549ecf52 Author: Dan Carpenter Date: Mon Aug 27 12:21:45 2018 +0300 ALSA: pcm: signedness bug in snd_pcm_plug_alloc() The "frames" variable is unsigned so the error handling doesn't work properly. Signed-off-by: Dan Carpenter Signed-off-by: Takashi Iwai commit 1bb6d9e2f682a401417f925d602de992c559b057 Author: Colin Ian King Date: Sun Aug 26 23:09:52 2018 +0100 ALSA: hdspm: fix spelling mistake "Initializeing" -> "Initializing" Trivial fix to spelling mistake in dev_dbg message and also remove extraneous white space and repeated question marks. Signed-off-by: Colin Ian King Signed-off-by: Takashi Iwai commit 3e9429efb7f22e780b96a8afe82bac4e87f69e50 Author: Andre Przywara Date: Mon Jul 30 13:31:37 2018 +0100 arm64: dts: allwinner: a64: NanoPi-A64: Add blue status LED Beside the non-controllable green power LED, the NanoPi-A64 features a blue "status" LED, connected to PD24. Add the device tree node to make it usable. Signed-off-by: Andre Przywara Acked-by: Maxime Ripard Signed-off-by: Chen-Yu Tsai commit ca6aee21ced725c6eb81f88dbf49e666c019abf5 Author: Andre Przywara Date: Mon Jul 30 13:31:36 2018 +0100 arm64: dts: allwinner: a64: NanoPi-A64: Add Wifi chip The NanoPi-A64 has an on-board WiFi chip, connected to the usual MMC1 SDIO interface. The AXP power line is the always-on VDD_SYS_3.3V, but it uses pin L2 to enable the regulator. As the actual WiFi driver is not in mainline Linux, it doesn't have a compatible string, so we omit this from the node. Add the respective nodes to the DT to make it usable. Signed-off-by: Andre Przywara Acked-by: Maxime Ripard [wens@csie.org: Add RTL8189ETV LPO clock to pwrseq node] Signed-off-by: Chen-Yu Tsai commit 708db568f594165e7761408b94d4a0839fa38304 Author: Andre Przywara Date: Mon Jul 30 13:31:35 2018 +0100 arm64: dts: allwinner: a64: NanoPi-A64: Add Ethernet The NanoPi-A64 has the usual Realtek Gbit PHY connected to the EMAC, so add the respective nodes to the DT. The PHY is powered by the VDD_SYS_3.3V line, which is always on. Signed-off-by: Andre Przywara Acked-by: Maxime Ripard Signed-off-by: Chen-Yu Tsai commit 480f58cdbe392d4387a2193b6131a277e0111dd0 Author: Andre Przywara Date: Mon Jul 30 13:31:34 2018 +0100 arm64: dts: allwinner: a64: NanoPi-A64: Fix DCDC1 voltage According to the NanoPi-A64 schematics, DCDC1 is connected to a voltage rail named "VDD_SYS_3.3V". All users seem to expect 3.3V here: the Ethernet PHY, the uSD card slot, the camera interface and the GPIO pins on the headers. Fix up the voltage on the regulator to lift it up to 3.3V. Signed-off-by: Andre Przywara Acked-by: Maxime Ripard Signed-off-by: Chen-Yu Tsai commit aa9cbe94ed821a8293246559728783ce6c372f12 Author: Andre Przywara Date: Mon Jul 30 13:31:33 2018 +0100 arm64: dts: allwinner: a64: Olinuxino: enable USB The Olinuxino has two USB sockets: USB0 is connected to a micro B socket. As it has the ID pin wired and the VBUS line connected to the PMIC, we describe it as a proper OTG socket, which switches between host and device automatically. USB1 is connected to a normal USB A socket. PG9 enables the power line, so add the required regulator as well. Signed-off-by: Andre Przywara Acked-by: Maxime Ripard Signed-off-by: Chen-Yu Tsai commit 21eac6f33e68ae778e9d1c910606452abf058d3d Author: Andre Przywara Date: Mon Jul 30 13:31:32 2018 +0100 arm64: dts: allwinner: a64: Olinuxino: add Ethernet nodes Add the DT nodes required to enable the Gigabit Ethernet on the board. The PHY is powered by the always-on power rail VDD_SYS_3.3V (DCDC1). Signed-off-by: Andre Przywara Acked-by: Maxime Ripard Signed-off-by: Chen-Yu Tsai commit 93366b49a35f3a190052734b3f32c8fe2535b53f Author: Andre Przywara Date: Mon Jul 30 13:31:31 2018 +0100 arm64: dts: allwinner: a64: Olinuxino: fix DRAM voltage The Olinuxino board uses DDR3L chips which are supposed to be driven with 1.35V. The reset default of the AXP is properly set to 1.36V. While technically the chips can also run at 1.5 volts, changing the voltage on the fly while booting Linux is asking for trouble. Also running at a lower voltage saves power. So fix the DCDC5 value to match the actual board design. Signed-off-by: Andre Przywara Tested-by: Martin Lucina Acked-by: Maxime Ripard Signed-off-by: Chen-Yu Tsai commit eacd9c431ac6fcb975103899c67575251074179c Author: Samuel Holland Date: Mon Jul 30 13:31:30 2018 +0100 arm64: dts: allwinner: a64: Orange Pi Win: Adjust CSI power rails The Orange Pi Win board uses the AXP's ALDO1 power rail to drive the VCC-CSI line, which, according to the schematic, needs to be set to 2.8V. Also the ELDO3 power rail is connected to the CSI, with somewhat unclear voltage requirements. Add this regulator and allow the voltage to be set between 1.5V and 1.8V, which are the voltages mentioned in the schematic. Signed-off-by: Samuel Holland Signed-off-by: Andre Przywara Acked-by: Maxime Ripard Signed-off-by: Chen-Yu Tsai commit d817442236e5fb861dac720d03048728e055f0f4 Author: Samuel Holland Date: Mon Jul 30 13:31:29 2018 +0100 arm64: dts: allwinner: a64: Orange Pi Win: Add SPI flash node The Orange Pi Win comes with 2 MB SPI flash, add the node. Signed-off-by: Samuel Holland Signed-off-by: Andre Przywara Acked-by: Maxime Ripard Signed-off-by: Chen-Yu Tsai commit 64971e5ad5da2da78c0888a0e208c430c8aefaef Author: Samuel Holland Date: Mon Jul 30 13:31:28 2018 +0100 arm64: dts: allwinner: a64: Orange Pi Win: Add SDIO node The Orange Pi Win features a soldered WiFi chip on the board, connected via the SDIO interface. Add the required DT nodes. Signed-off-by: Samuel Holland Signed-off-by: Andre Przywara Acked-by: Maxime Ripard Signed-off-by: Chen-Yu Tsai commit e71cc56058f32f698ca9ae21655af683fc57d21e Author: Samuel Holland Date: Mon Jul 30 13:31:27 2018 +0100 arm64: dts: allwinner: a64: Orange Pi Win: Add LED node The Orange Pi Win has a green status LED, add the DT node for it. Signed-off-by: Samuel Holland Signed-off-by: Andre Przywara Acked-by: Maxime Ripard Signed-off-by: Chen-Yu Tsai commit 13b31e6bd3574dca59478e9c513e308610a19ec4 Author: Samuel Holland Date: Mon Jul 30 13:31:25 2018 +0100 arm64: dts: allwinner: a64: Orange Pi Win: Add UARTs The Orange Pi Win exposes several UARTs on header pins, and connects one to the on-board WiFi/Bluetooth chip. Add the pinmux definitions to the UART nodes, but keep them disabled. Enable the UART1, which is wired to the Bluetooth chip, and add a serdev node. There is no binding for the BT8723 yet, so leave this mostly empty for now. Signed-off-by: Samuel Holland Signed-off-by: Andre Przywara Acked-by: Maxime Ripard Signed-off-by: Chen-Yu Tsai commit 93d6a27cfcc0bec643aace831b878b2a6950e94f Author: Samuel Holland Date: Mon Jul 30 13:31:24 2018 +0100 arm64: dts: allwinner: a64: Orange Pi Win: Add Ethernet node The Orange Pi Win has the usual Gigabit PHY connected to the EMAC. Its power is controlled by GPIO PD14. Signed-off-by: Samuel Holland Signed-off-by: Andre Przywara Acked-by: Maxime Ripard Signed-off-by: Chen-Yu Tsai commit 14ff5d8f9151c40bbeed3a71ef98b9faa7ba90a6 Author: Samuel Holland Date: Mon Jul 30 13:31:23 2018 +0100 arm64: dts: allwinner: a64: Orange Pi Win: Enable USB OTG socket The Orange Pi Win has a micro USB-B socket, connected to the SoC's USB-OTG port. Its power is supplied by the AXP PMIC, and the ID pin is connected to GPIO PH9. It can serve both as a host or a client port. Add the respective DT nodes to enable it. Signed-off-by: Samuel Holland Signed-off-by: Andre Przywara Acked-by: Maxime Ripard [wens@csie.org: enable paired EHCI/OHCI device nodes and regulator supply] Signed-off-by: Chen-Yu Tsai commit 3131cfb68480aed0025ea5d3840f82d291144d79 Author: Samuel Holland Date: Mon Jul 30 13:31:22 2018 +0100 arm64: dts: allwinner: a64: Orange Pi Win: Enable USB hub regulator The Orange Pi Win has four standard USB-A sockets, connected to an on-board USB hub. The hub's and socket's power regulators are enabled by GPIO PD7. Add the regulator to the DT to enable the power supply. Signed-off-by: Samuel Holland Signed-off-by: Andre Przywara Acked-by: Maxime Ripard Signed-off-by: Chen-Yu Tsai commit 09b964afca14d0594b2b2f265df3d987e2f43867 Author: Samuel Holland Date: Mon Jul 30 13:31:21 2018 +0100 arm64: dts: allwinner: a64: Orange Pi Win: Fix SD card node The Orange Pi Win has a microSD card slot which is connected via all four SD data lines. As the DT was not mentioning this fact, we got the default single bit transfers, losing out on performance. Also, as microSD does not have a write protect switch, we disable this feature in the DT node. Signed-off-by: Samuel Holland Signed-off-by: Andre Przywara Acked-by: Maxime Ripard Signed-off-by: Chen-Yu Tsai commit b3ee15a509ffd7473b77b21cb921b3128efdd005 Author: Andre Przywara Date: Mon Jul 30 13:31:20 2018 +0100 arm64: dts: allwinner: a64: Add Pine64-LTS device tree file The Pine64-LTS is a variant of the Pine64 board, from the software visible side resembling a SoPine module on a baseboard, though the board has the SoC and DRAM integrated on one PCB. Due to this it basically shares the DT with the SoPine baseboard, which we mimic in our DT by inclucing the boardboard .dts into the new file, just overwriting the model name. Having a separate .dts for this seems useful, since we don't know yet if there are subtle differences between the two. Also the SoC on the LTS board is technically an "R18" instead of the original "A64", although as far as we know this is just a relabelled version of the original SoC. Signed-off-by: Andre Przywara Acked-by: Maxime Ripard Signed-off-by: Chen-Yu Tsai commit 39defc813264ea87c837900af6f39964353d6b41 Author: Andre Przywara Date: Mon Jul 30 13:31:19 2018 +0100 arm64: dts: allwinner: a64: Add L2 cache nodes Current kernels complain when booting on an A64 Soc: .... [ 1.904297] cacheinfo: Unable to detect cache hierarchy for CPU 0 .... Not a real biggie on this flat topology, but also easy enough to fix. Add the L2 cache node and let each CPU point to it. Signed-off-by: Andre Przywara Acked-by: Maxime Ripard Signed-off-by: Chen-Yu Tsai commit c41ca64d075020e2d5daecb7f48da6af0ba5b512 Author: Tuomas Tynkkynen Date: Wed Aug 8 02:25:53 2018 +0300 ARM: dts: sunxi: Don't use cd-inverted in sun8i-r40-bananapi-m2-ultra Another user of cd-inverted seems to have crept in. Switch it away from cd-inverted to be consistent with other sunxi boards. Signed-off-by: Tuomas Tynkkynen Signed-off-by: Maxime Ripard commit a528872dbb87faefda3056023eaaf83f14fdafdf Author: Jernej Skrabec Date: Thu Aug 9 18:52:17 2018 +0200 clk: sunxi-ng: a83t: Add max. rate constraint to video PLLs It may happen that clock framework finds optimal video PLL rate above that which is really supported by HW. User manual doesn't really say what is upper limit for video PLLs on A83T. Because of that, use the maximum rate defined in BSP clk driver which is 3 GHz. Signed-off-by: Jernej Skrabec Signed-off-by: Maxime Ripard commit a8e5433cdc500290b52d26a05056e02c448a413c Author: Jernej Skrabec Date: Thu Aug 9 18:52:16 2018 +0200 clk: sunxi-ng: nkmp: Add constraint for maximum rate Some, if not most, NKMP PLLs can be set to higher rate that is really supported by HW. Implement support for maximum frequency constrain for NKMP PLLs. Signed-off-by: Jernej Skrabec Signed-off-by: Maxime Ripard commit b16fb66915fcfc6b1a7eb48225b6b30b69bb721b Author: Jernej Skrabec Date: Thu Aug 9 18:52:15 2018 +0200 clk: sunxi-ng: r40: Add max. rate constraint to video PLLs Video PLLs on R40 can be set to higher rate that it is actually supported by HW. Limit maximum rate to 1008 MHz. This is the maximum allowed rate by BSP clock driver. Interestengly, user manual specifies maximum frequency to be 600 MHz. Historically, this data was wrong in some user manuals for other SoCs, so more faith is put in BSP clock driver. Signed-off-by: Jernej Skrabec Signed-off-by: Maxime Ripard commit 02d7901695afd1dcbec7182d878927893c07174e Author: Jernej Skrabec Date: Thu Aug 9 18:52:14 2018 +0200 clk: sunxi-ng: h3/h5: Add max. rate constraint to pll-video As it turns out, pll-video can be set to higher rate that it is really supported by HW. For example, one monitor requested 185.58 MHz pixel clock. Clock framework calculated that minimum rate error would be when pll-video is set to 2040 MHz. This is clearly out of specs. Both H3 and H5 user manuals specify 600 MHz as maximum supported rate. However, BSP clock drivers allow up to 912 MHz and 1008 MHz respectively. Here 912 MHz is chosen because user manuals were already proven wrong once for lower limits. Signed-off-by: Jernej Skrabec Signed-off-by: Maxime Ripard commit cb54fbd21a8fd97c2a82a069e8c80abdedbeb530 Author: Jernej Skrabec Date: Thu Aug 9 18:52:13 2018 +0200 clk: sunxi-ng: Add maximum rate constraint to NM PLLs On some NM PLLs, frequency can be set above PLL working range. Add a constraint for maximum supported rate. This way, drivers can specify which is maximum allowed rate for PLL. Signed-off-by: Jernej Skrabec Signed-off-by: Maxime Ripard commit fcddd1f609ea39dc8377cc587d070e49d32940ff Author: Tuomas Tynkkynen Date: Wed Aug 8 02:25:54 2018 +0300 arm64: dts: allwinner: Don't use cd-inverted in sun50i-a64-pinebook Another user of cd-inverted seems to have crept in. Switch it away from cd-inverted to be consistent with other sunxi boards. Signed-off-by: Tuomas Tynkkynen Signed-off-by: Maxime Ripard commit ac947b179bdc0f2ce02bacec806f632ff5e31698 Author: Emmanuel Vadot Date: Fri Jul 27 13:52:02 2018 +0200 arm64: dts: allwinner: a64: Add SID node The A64 have a SID controller which consist of EFUSE (starting at 0x200) and three registers to read/write some of the protected efuses. Signed-off-by: Emmanuel Vadot Signed-off-by: Maxime Ripard commit 2f9ad0ac947ccbe3ffe7c6229c9330f2a7755f64 Author: Dominique Martinet Date: Tue Aug 14 02:43:48 2018 +0000 9p/xen: fix check for xenbus_read error in front_probe If the xen bus exists but does not expose the proper interface, it is possible to get a non-zero length but still some error, leading to strcmp failing trying to load invalid memory addresses e.g. fffffffffffffffe. There is then no need to check length when there is no error, as the xenbus driver guarantees that the string is nul-terminated. Link: http://lkml.kernel.org/r/1534236007-10170-1-git-send-email-asmadeus@codewreck.org Signed-off-by: Dominique Martinet Reviewed-by: Stefano Stabellini Cc: Eric Van Hensbergen Cc: Latchesar Ionkov commit 62ba568f7aef4beb0eda945a2b2a91b7a2b8f215 Author: Ricardo Biehl Pasquali Date: Sat Aug 25 16:53:23 2018 -0300 ALSA: pcm: Return 0 when size < start_threshold in capture In __snd_pcm_lib_xfer(), when capture, if state is PREPARED and size is less than start_threshold nothing can be done. As there is no error, 0 is returned. Signed-off-by: Ricardo Biehl Pasquali Signed-off-by: Takashi Iwai commit c272a766db4f826d3ba35c734894dfcdb0740827 Author: Shreyas NC Date: Tue Aug 7 17:26:00 2018 +0530 soundwire: intel: Remove duplicate assignment Signed-off-by: Shreyas NC Acked-by: Pierre-Louis Bossart Signed-off-by: Vinod Koul commit 7bce918be43fd21e9a66c68d95984f825b99c047 Author: Vinod Koul Date: Tue Aug 7 12:20:41 2018 +0530 MAINTAINERS: Update Vinod's email Looks like this one was missed last time, so fix it Signed-off-by: Vinod Koul commit e1c815f4b24a305e5bc9eceb541674bf4d02b709 Author: Vinod Koul Date: Tue Aug 7 11:54:50 2018 +0530 soundwire: intel: Fix uninitialized adev deref In case of error, we can dereference uninitialized 'adev' drivers/soundwire/intel_init.c:154 sdw_intel_acpi_cb() error: uninitialized symbol 'adev'. Fix that by not using adev for warn print and make it pr_err. Reported-by: Dan Carpenter Acked-by: Pierre-Louis Bossart Signed-off-by: Vinod Koul commit 30246e2d78c0b06d67f77c4239f6741e77f42185 Author: Shreyas NC Date: Fri Jul 27 14:44:17 2018 +0530 soundwire: intel: Add pre/post bank switch ops To support multi link on Intel platforms, we need to update SDW SHIM registers. So, add pre/post bank switch ops for the same in Intel driver. Signed-off-by: Sanyog Kale Signed-off-by: Shreyas NC Acked-by: Pierre-Louis Bossart Signed-off-by: Vinod Koul commit 9b5c132a1ec98895fe40ba73a19e0a17293122e5 Author: Shreyas NC Date: Fri Jul 27 14:44:15 2018 +0530 soundwire: keep track of Masters in a stream A multi link bankswitch can be done if the hardware supports and the stream is handled by multiple Master(s). This preparatory patch adds support to track m_rt in a stream. Modifying m_rt_count and usage is added as part of the next patch. Signed-off-by: Shreyas NC Acked-by: Pierre-Louis Bossart Signed-off-by: Vinod Koul commit ce6e74d008ff5c8b43e3bafaa7343bf7eb69593e Author: Shreyas NC Date: Fri Jul 27 14:44:16 2018 +0530 soundwire: Add support for multi link bank switch In cases of multiple Masters in a stream, synchronization between multiple Master(s) is achieved by performing bank switch together and using Master methods. Add sdw_ml_bank_switch() to wait for completion of bank switch. Signed-off-by: Sanyog Kale Signed-off-by: Shreyas NC Acked-by: Pierre-Louis Bossart Signed-off-by: Vinod Koul commit 48949722ced4daacfa32f13c221f173b87231ead Author: Vinod Koul Date: Fri Jul 27 14:44:14 2018 +0530 soundwire: Handle multiple master instances in a stream For each SoundWire stream operation, we need to parse master list and operate upon all master runtime. This is a preparatory patch to do the boilerplate conversion of stream handling from single master runtime to handle a list of master runtime. The code to support bank switch for multiple master instances is added in the next patch. Signed-off-by: Sanyog Kale Signed-off-by: Shreyas NC Acked-by: Pierre-Louis Bossart Signed-off-by: Vinod Koul commit 0c4a1049cf298721eaec4553d3d5039798086e12 Author: Sanyog Kale Date: Fri Jul 27 14:44:13 2018 +0530 soundwire: Add support to lock across bus instances Currently, the stream concept is limited to single Master and one or more Codecs. This patch extends the concept to support multiple Master(s) sharing the same reference clock and synchronized in the hardware. Modify sdw_stream_runtime to support a list of sdw_master_runtime for the same. The existing reference to a single m_rt is removed in the next patch. Typically to lock, one would acquire a global lock and then lock bus instances. In this case, the caller framework(ASoC DPCM) guarantees that stream operations on a card are always serialized. So, there is no race condition and hence no need for global lock. Bus lock(s) are acquired to reconfigure the bus while the stream is set-up. So, we add sdw_acquire_bus_lock()/sdw_release_bus_lock() APIs which are used only to reconfigure the bus. Signed-off-by: Sanyog Kale Signed-off-by: Shreyas NC Acked-by: Pierre-Louis Bossart Signed-off-by: Vinod Koul commit a306a0e4a5326269b6c78d136407f08433ab5ece Author: Shreyas NC Date: Fri Jul 27 14:44:12 2018 +0530 soundwire: Initialize completion for defer messages Deferred messages are async messages used to synchronize transitions mostly while doing a bank switch on multi links. On successful transitions these messages are marked complete and thereby confirming that all the buses performed bank switch successfully. So, initialize the completion structure for the same. Signed-off-by: Sanyog Kale Signed-off-by: Shreyas NC Acked-by: Pierre-Louis Bossart Signed-off-by: Vinod Koul commit 8cf3f9cfd9dc9e448012576b9a06cce2d294e400 Author: Sanyog Kale Date: Fri Jul 27 14:44:11 2018 +0530 Documentation: soundwire: Add documentation for multi link Add example and documentation to describe multi link streams Signed-off-by: Pierre-Louis Bossart Signed-off-by: Sanyog Kale Signed-off-by: Shreyas NC Acked-by: Pierre-Louis Bossart Signed-off-by: Vinod Koul commit 8960de4a5ca7980ed1e19e7ca5a774d3b7a55c38 Author: Michael Jin Date: Thu Aug 16 15:28:40 2018 -0400 EDAC, amd64: Add Family 17h, models 10h-2fh support Add new device IDs for family 17h, models 10h-2fh. This is required by amd64_edac_mod in order to properly detect PCI device functions 0 and 6. Signed-off-by: Michael Jin Reviewed-by: Yazen Ghannam Cc: Link: http://lkml.kernel.org/r/20180816192840.31166-1-mikhail.jin@gmail.com Signed-off-by: Borislav Petkov commit 99165b93dafe4f2a821b5dae106f2ef6b4ceff7e Author: Levin Du Date: Tue Jul 31 13:59:22 2018 +0800 arm64: dts: rockchip: add sdmmc UHS support for roc-rk3328-cc In roc-rk3328-cc board, the signal voltage of sdmmc is supplied by the vcc_sdio regulator, which is a mux between 1.8V and 3.3V, controlled by a special output only gpio pin labeled "gpiomut_pmuio_iout", corresponding bit 1 of the syscon GRF_SOC_CON10. This special pin can now be reference as <&grf_gpio 0>, thanks to the gpio-syscon driver, which makes writing regulator-gpio possible. If the signal voltage changes, the io domain needs to change correspondingly. To use this feature, the following options are required in kernel config: - CONFIG_GPIO_SYSCON=y - CONFIG_POWER_AVS=y - CONFIG_ROCKCHIP_IODOMAIN=y Signed-off-by: Levin Du Signed-off-by: Heiko Stuebner commit 692ff61efab62fde4ae43d611e9c0cdb060dacbd Author: Levin Du Date: Tue Jul 31 13:59:20 2018 +0800 arm64: dts: rockchip: add GRF GPIO controller to rk3328 Adding a GRF GPIO controller labled "grf_gpio" to rk3328, currently providing access to the GPIO_MUTE pin, which is manupulated by the GRF_SOC_CON10 register. The GPIO_MUTE pin is referred to as <&grf_gpio 0>. Signed-off-by: Levin Du [dropped default-status disabled] Signed-off-by: Heiko Stuebner commit 49533b821143f1d15dc10dfaff33f49bd091a466 Author: Levin Du Date: Tue Jul 31 13:59:21 2018 +0800 arm64: dts: rockchip: add io-domain to roc-rk3328-cc It is necessary for the io domain setting of the SoC to match the voltage supplied by the regulators. Signed-off-by: Levin Du Signed-off-by: Heiko Stuebner commit 4afbce842a5c5eb413142e267c9ff56cc6ee6b91 Author: Liang Chen Date: Wed Aug 1 16:45:16 2018 +0800 arm64: dts: rockchip: add PX30 evaluation board devicetree This patch add px30-evb.dts for PX30 evaluation board. Tested on PX30 evb. Signed-off-by: Liang Chen Acked-by: Rob Herring Signed-off-by: Heiko Stuebner commit 7053e06b1422a60550c3e8a5e228f110c582ce26 Author: Liang Chen Date: Wed Aug 1 16:45:15 2018 +0800 arm64: dts: rockchip: add core dtsi file for PX30 SoCs This patch adds core dtsi file for Rockchip PX30 SoCs. Signed-off-by: Liang Chen Signed-off-by: Heiko Stuebner commit d15524609bd66f72c511d410c0490825962983c1 Author: Liang Chen Date: Wed Aug 1 16:45:14 2018 +0800 dt-bindings: rockchip: grf: add grf and pmugrf description for px30 This patch adds the compatible of GRF and PMUGRF for PX30 SoCs. Signed-off-by: Liang Chen Acked-by: Rob Herring Signed-off-by: Heiko Stuebner commit 8bb878cf20ae10809c36db96993bfce7026d062b Author: Levin Du Date: Mon Jul 30 10:12:01 2018 +0800 arm64: dts: rockchip: add support for ROC-RK3399-PC board ROC-RK3399-PC is a power efficient 4GB LPDDR4 single board computer with USB 3.0 and Gigabit Ethernet in a form factor compatible with the Raspberry Pi. It is based on the Rockchip RK3399 SoC, powered by the Type-C port. The devicetree currently supports peripherals of: - Ethernet - HDMI - SD Card - UART2 debug - Type-C - eMMC USB3 in Type-C port currently only works with normal orientation, not flip one. Signed-off-by: Levin Du Reviewed-by: Rob Herring Signed-off-by: Heiko Stuebner commit 6f26c238b7d3c7caf195f4c4ceea6c54d3bb4ffa Author: Philipp Rossak Date: Wed Aug 1 11:48:00 2018 +0200 ARM: dts: sun8i: a83t: bananapi-m3: Enable IR controller The Bananapi M3 has an onboard IR receiver. This enables the onboard IR receiver subnode. Unlike the other IR receivers this one needs a base clock frequency of 3000000 Hz (3 MHz), to be able to work. Signed-off-by: Philipp Rossak Acked-by: Chen-Yu Tsai Acked-by: Maxime Ripard Signed-off-by: Chen-Yu Tsai commit 26de4dc74cf5eba0ac6d9d258da1a10f808873e6 Author: Philipp Rossak Date: Wed Aug 1 11:47:59 2018 +0200 ARM: dts: sun8i: a83t: Add support for the cir interface The cir interface is like on the H3 located at 0x01f02000 and is exactly the same. This patch adds support for the ir interface on the A83T. Signed-off-by: Philipp Rossak Acked-by: Maxime Ripard Signed-off-by: Chen-Yu Tsai commit a8858d871c062f3f74f4060d3ca6a3d6ca88f441 Author: Philipp Rossak Date: Wed Aug 1 11:47:58 2018 +0200 ARM: dts: sun8i: a83t: Add the cir pin for the A83T The CIR Pin of the A83T is located at PL12. Signed-off-by: Philipp Rossak Acked-by: Maxime Ripard Signed-off-by: Chen-Yu Tsai commit 58c0f79887d5e425fe6a9fd542778e50df69e9c6 Author: Rongyi Chen Date: Fri Aug 10 23:16:38 2018 +0800 clk: sunxi-ng: h6: fix PWM gate/reset offset Currently the register offset of the PWM bus gate in Allwinner H6 clock driver is wrong. Fix this issue. Fixes: 542353ea ("clk: sunxi-ng: add support for the Allwinner H6 CCU") Signed-off-by: Rongyi Chen [Icenowy: refactor commit message] Signed-off-by: Icenowy Zheng Signed-off-by: Chen-Yu Tsai commit 2852bfbf4f168fec27049ad9ed20941fc9e84b95 Author: Icenowy Zheng Date: Thu Aug 9 01:19:52 2018 +0800 clk: sunxi-ng: h6: fix bus clocks' divider position The bus clocks (AHB/APB) on Allwinner H6 have their second divider start at bit 8, according to the user manual and the BSP code. However, currently the divider offset is incorrectly set to 16, thus the divider is not correctly read and the clock frequency is not correctly calculated. Fix this bit offset on all affected bus clocks in ccu-sun50i-h6. Cc: stable@vger.kernel.org # v4.17.y Signed-off-by: Icenowy Zheng Signed-off-by: Chen-Yu Tsai commit 63c65b872562a2faf8a3a289c117d0c0e3bceb5a Merge: 5b394b2ddf03 25559c22cef8 Author: Olof Johansson Date: Sun Aug 26 16:27:32 2018 -0700 Merge tag 'tee-drv-for-4.20' of git://git.linaro.org/people/jens.wiklander/linux-tee into next/drivers Misc enhancement for tee driver subsystem * Adds a kernel internal tee client interface allowing other drivers etc to access a TEE * OP-TEE driver takes DT status property into account * tag 'tee-drv-for-4.20' of git://git.linaro.org/people/jens.wiklander/linux-tee: tee: add kernel internal client interface tee: optee: take DT status property into account Signed-off-by: Olof Johansson commit 3cf71bc9904d7ee4a25a822c5dcb54c7804ea388 Author: Jan-Marek Glogowski Date: Sat Aug 25 15:10:35 2018 -0400 drm/i915: Re-apply "Perform link quality check, unconditionally during long pulse" This re-applies the workaround for "some DP sinks, [which] are a little nuts" from commit 1a36147bb939 ("drm/i915: Perform link quality check unconditionally during long pulse"). It makes the secondary AOC E2460P monitor connected via DP to an acer Veriton N4640G usable again. This hunk was dropped in commit c85d200e8321 ("drm/i915: Move SST DP link retraining into the ->post_hotplug() hook") Fixes: c85d200e8321 ("drm/i915: Move SST DP link retraining into the ->post_hotplug() hook") [Cleaned up commit message, added stable cc] Signed-off-by: Lyude Paul Signed-off-by: Jan-Marek Glogowski Cc: stable@vger.kernel.org Link: https://patchwork.freedesktop.org/patch/msgid/20180825191035.3945-1-lyude@redhat.com commit 91d05d7639f388bbed90076299867e85e983f298 Author: Marcus Folkesson Date: Fri Aug 24 22:24:59 2018 +0200 iio: dac: ti-dac5571: provide of_match_table to driver Use the created list of of_device_id's as a match table. Signed-off-by: Marcus Folkesson Signed-off-by: Jonathan Cameron commit 0833627fc3f757a0dca11e2a9c46c96335a900ee Author: Marcus Folkesson Date: Fri Aug 24 22:24:40 2018 +0200 iio: dac: mcp4922: fix error handling in mcp4922_write_raw Do not try to write negative values and make sure that the write goes well. Signed-off-by: Marcus Folkesson Signed-off-by: Jonathan Cameron commit e2b01faf6cde01b2ed5a7fb8a63e5fa25c2257ea Author: Marcus Folkesson Date: Tue Aug 21 21:31:26 2018 +0200 MAINTAINERS: add entry for ltc1660 DAC driver Add entry for ltc1660 DAC driver and add myself as maintainer of this driver. Signed-off-by: Marcus Folkesson Signed-off-by: Jonathan Cameron commit d1071f726a7640ce0525d1868844bbb107e9e43a Author: Marcus Folkesson Date: Tue Aug 21 21:31:25 2018 +0200 dt-bindings: iio: dac: add bindings for ltc1660 LTC1665/LTC1660 is a 8/10-bit Digital-to-Analog Converter (DAC) with eight individual channels. Signed-off-by: Marcus Folkesson Reviewed-by: Rob Herring Signed-off-by: Jonathan Cameron commit 8316cebd1e59823872d10799ce91f67c7c06968e Author: Marcus Folkesson Date: Tue Aug 21 21:31:24 2018 +0200 iio: dac: add support for ltc1660 LTC1665/LTC1660 is a 8/10-bit Digital-to-Analog Converter (DAC) with eight individual channels. Signed-off-by: Marcus Folkesson Signed-off-by: Jonathan Cameron commit 7ec040af6ce11285c8bd3ec59a1a570db742e9aa Author: Stefan Popa Date: Mon Aug 20 17:54:55 2018 +0300 iio:adxl372: Add filter bandwidth support This patch adds the option for the user to select the filter bandwidth. The user can also read the available bandwidths which are always adjusted to be at most half of the sampling frequency. Furthermore, the currently selected bandwidth can be read via the read_raw function, while the write_raw sets a new bandwidth value. Signed-off-by: Stefan Popa Signed-off-by: Jonathan Cameron commit 5e605a4df6f18dc4e2e529f5f2e01f76441cece5 Author: Stefan Popa Date: Mon Aug 20 17:54:27 2018 +0300 iio:adxl372: Add sampling frequency support This patch adds the option for the user to select the sampling frequency. Also, the user can read the available frequencies and read the currently set frequency via the read_raw function. The frequency can be set via the write_raw function. When the frequency is set, the bandwidth is also checked and ensured that it is constrained to at most half of the sampling frequency. Also, the activity and inactivity timers have to be updated because they depend on the selected ODR. Signed-off-by: Stefan Popa Signed-off-by: Jonathan Cameron commit 1c412a321590d4a01698b85710e29b1e575de1a7 Author: Stefan Popa Date: Mon Aug 20 17:53:43 2018 +0300 iio: adxl372: Provide validate_trigger and validate_device callbacks This patch provides a validate_device callback for the trigger which makes sure that other devices are rejected. Signed-off-by: Stefan Popa Signed-off-by: Jonathan Cameron commit 1691d4ca7081d3154771c2c4b18ec816936fef4f Author: David Frey Date: Mon Aug 20 10:39:59 2018 -0700 iio: chemical: bme680: Remove field value defines Remove BME680_RUN_GAS_EN_BIT and BME680_NB_CONV_0_VAL field value definitions because the fields are simply boolean and integer respectively. Signed-off-by: David Frey Reviewed-by: Himanshu Jha Tested-by: Himanshu Jha Signed-off-by: Jonathan Cameron commit be6af481f3b2d5084c4e70684eaa962602f94707 Author: Fabrizio Castro Date: Fri Aug 17 15:53:04 2018 +0100 dt-bindings: thermal: rcar-gen3-thermal: 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: Eduardo Valentin commit 1d9e6cf3c8537c14ad979a9c02ce4e674e5f50e8 Author: Fabrizio Castro Date: Fri Aug 17 15:53:03 2018 +0100 thermal: rcar_gen3_thermal: Add r8a774a1 support Add r8a774a1 specific compatible string. Signed-off-by: Fabrizio Castro Reviewed-by: Biju Das Reviewed-by: Simon Horman Signed-off-by: Eduardo Valentin commit a92bab8919e3fb0dfb58e79d9a452507b389fd77 Author: Viresh Kumar Date: Wed Aug 8 12:38:14 2018 +0530 of: thermal: Allow multiple devices to share cooling map A cooling map entry may now contain a list of phandles and their arguments representing multiple devices which share the trip point. This patch updates the thermal OF core to parse them properly. The trip point and contribution value is shared by multiple cooling devices now and so a new structure is created, struct __thermal_cooling_bind_param, which represents a cooling device and its min/max states and the existing struct __thermal_bind_params now contains an array of this new cooling device structure. Tested on Hikey960. Signed-off-by: Viresh Kumar Signed-off-by: Eduardo Valentin commit f1599f9e4cd6f1dd0cad202853fb830854f4e944 Author: Matthias Kaehlcke Date: Tue Jul 31 11:59:15 2018 -0700 thermal: qcom-spmi: Use PMIC thermal stage 2 for critical trip points There are three thermal stages defined in the PMIC: stage 1: warning stage 2: system should shut down stage 3: emergency shut down By default the PMIC assumes that the OS isn't doing anything and thus at stage 2 it does a partial PMIC shutdown and at stage 3 it kills all power. When switching between thermal stages the PMIC generates an interrupt which is handled by the driver. The partial PMIC shutdown at stage 2 can be disabled by software, which allows the OS to initiate a shutdown at stage 2 with a thermal zone configured accordingly. If a critical trip point is configured in the thermal zone the driver adjusts the stage 1-3 temperature thresholds to (closely) match the critical temperature with a stage 2 threshold (125/130/135/140 °C). If a suitable match is found the partial shutdown at stage 2 is disabled. If for some reason the system doesn't shutdown at stage 2 the emergency shutdown at stage 3 kicks in. The partial shutdown at stage 2 remains enabled in these cases: - no critical trip point defined - the temperature of the critical trip point is < 125°C - the temperature of the critical trip point is > 140°C and no ADC channel is configured (thus the OS is not notified when the critical temperature is reached) Suggested-by: Douglas Anderson Signed-off-by: Matthias Kaehlcke Reviewed-by: Douglas Anderson Signed-off-by: Eduardo Valentin commit 97b27dd33d592b14cfb9299d5c89167ec57a3b83 Author: Matthias Kaehlcke Date: Tue Jul 31 11:59:14 2018 -0700 dt-bindings: thermal: qcom-spmi-temp-alarm: Improve thermal zone in example The current example for a thermal zone isn't very useful as reference since it would result in a hardware shutdown at 145°C, instead of allowing the system to try to shutdown gracefully. Without an ADC channel a maximum of two trip points is useful in practice for this sensor, with temperatures corresponding to the stage 1 and stage 2 'hardware trip points'. A critical trip point at stage 2 may allow the system to shutdown before a hardware shutdown at stage 3 kicks in. It should be noted though that by default the chip performs a 'partial shutdown' when the temperature reaches stage 2, which may prevent an orderly shutdown. The 'partial shutdown' can be disabled by software. Signed-off-by: Matthias Kaehlcke Reviewed-by: Douglas Anderson Reviewed-by: Rob Herring Signed-off-by: Eduardo Valentin commit 7fd5257f11445e35257a80d186a1da0e9795068f Author: Matthias Kaehlcke Date: Tue Jul 31 11:59:13 2018 -0700 dt-bindings: thermal: qcom-spmi-temp-alarm: Fix documentation of 'reg' The documentation claims that the 'reg' property consists of two values, the SPMI address and the length of the controller's registers. However the SPMI bus to which it is added specifies "#size-cells = <0>;". Remove the controller register length from the documentation of the field and the example. Signed-off-by: Matthias Kaehlcke Reviewed-by: Douglas Anderson Reviewed-by: Rob Herring Signed-off-by: Eduardo Valentin commit f7480b2f65919d104ee41c2b609bc4ae3a3e6d60 Author: Paulo Zanoni Date: Mon Aug 20 16:31:38 2018 -0700 drm/i915: move lookup_power_well() up There's no need for that forward declaration. Cc: Imre Deak Reviewed-by: Imre Deak Signed-off-by: Paulo Zanoni Link: https://patchwork.freedesktop.org/patch/msgid/20180820233139.11936-4-paulo.r.zanoni@intel.com commit 0229bfd42bbe7fd49d23b5f696c22241096b8847 Author: Paulo Zanoni Date: Mon Aug 20 16:31:37 2018 -0700 drm/i915: use for_each_power_well in lookup_power_well() Use the nice helper function to make the implementation simpler. v2: Rebase. Cc: Imre Deak Reviewed-by: José Roberto de Souza (v1) Signed-off-by: Paulo Zanoni Link: https://patchwork.freedesktop.org/patch/msgid/20180820233139.11936-3-paulo.r.zanoni@intel.com commit 99da0b35396f3907fa8594b554bf81904389c48c Author: Paulo Zanoni Date: Mon Aug 20 16:31:36 2018 -0700 drm/i915: WARN() if we can't lookup_power_well() None of the current lookup_power_well() callers are actually checking for NULL return values, they all just use the pointer right away. The first idea was to replace these theoretical segfaults with a BUG() since this would at least make our code a little more explicit to the reader. It was suggested that just converting the BUG() to a WARN() and returning any power well would probably be better since it would still keep the system running while at the same time exposing the driver bug. We can only hit this NULL/BUG()/WARN() condition if we try to lookup a power well that isn't defined on a given platform. If that ever happens, we have to fix our code, making it lookup the correct power well. Because of this, I don't think it's worth trying to implement error checking in every caller. Improving our CI system will be a better use of our time once a bug is found in the wild. v2: Avoid the BUG() with a WARN() return a random PW (Michal). Cc: Michal Wajdeczko Cc: Imre Deak Reviewed-by: Imre Deak Signed-off-by: Paulo Zanoni Link: https://patchwork.freedesktop.org/patch/msgid/20180820233139.11936-2-paulo.r.zanoni@intel.com commit 39d1e234e1e13f65f4d53715d34aadfb6249eeaf Author: Paulo Zanoni Date: Wed Aug 1 10:34:41 2018 -0700 drm/i915/icl: implement the tc/legacy HPD {dis,}connect flows Unlike the other ports, TC ports are not available to use as soon as we get a hotplug. The TC PHYs can be shared between multiple controllers: display, USB, etc. As a result, handshaking through FIA is required around connect and disconnect to cleanly transfer ownership with the controller and set the type-C power state. This patch implements the flow sequences described by our specification. We opt to grab ownership of the ports as soon as we get the hotplugs in order to simplify the interactions and avoid surprises in the user space side. We may consider changing this in the future, once we improve our testing capabilities on this area. v2: * This unifies the DP and HDMI patches so we can discuss everything at once so people looking at random single patches can actually understand the direction. * I found out the spec was updated a while ago. There's a small difference in the connect flow and the patch was updated for that. * Our spec also now gives a good explanation on what is really happening. As a result, comments were added. * Add some more comments as requested by Rodrigo (Rodrigo). v3: * Downgrade a DRM_ERROR that shouldn't ever happen but we can't act on in case it does (Chris). BSpec: 21750, 4250. Cc: Animesh Manna Cc: Rodrigo Vivi Reviewed-by: Rodrigo Vivi Signed-off-by: Paulo Zanoni Link: https://patchwork.freedesktop.org/patch/msgid/20180801173441.9789-1-paulo.r.zanoni@intel.com commit a5ec8332d4280500544e316f76c04a7adc02ce03 Author: Lowry Li Date: Thu Aug 23 16:30:19 2018 +0800 drm: Add per-plane pixel blend mode property Pixel blend modes represent the alpha blending equation selection, describing how the pixels from the current plane are composited with the background. Adds a pixel_blend_mode to drm_plane_state and a blend_mode_property to drm_plane, and related support functions. Defines three blend modes in drm_blend.h. Changes since v1: - Moves the blending equation into the DOC comment - Refines the comments of drm_plane_create_blend_mode_property to not enumerate the #defines, but instead the string values - Uses fg.* instead of pixel.* and plane_alpha instead of plane.alpha Changes since v2: - Refines the comments of drm_plane_create_blend_mode_property: 1) Puts the descriptions (after the ":") on a new line 2) Adds explaining why @supported_modes need PREMUL as default Changes since v3: - Refines drm_plane_create_blend_mode_property(). drm_property_add_enum() can calculate the index itself just fine, so no point in having the caller pass it in. - Since the current DRM assumption is that alpha is premultiplied as default, define DRM_MODE_BLEND_PREMULTI as 0 will be better. - Refines some comments. Changes since v4: - Adds comments in drm_blend.h. - Removes setting default value in drm_plane_create_blend_mode_property() as it is already in __drm_atomic_helper_plane_reset(). - Fixes to use state->pixel_blend_mode instead of using plane->state->pixel_blend_mode in reset function. - Rebases on drm-misc-next. Reviewed-by: Liviu Dudau Signed-off-by: Lowry Li Signed-off-by: Ayan Kumar Halder Reviewed-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/245734/ commit 06e3c29716d9ba1eedfbd697afddbd7495491b26 Author: Gustavo A. R. Silva Date: Thu Aug 23 20:05:21 2018 -0500 drm/sun4i: tcon-top: 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 issue was detected with the help of Coccinelle. Reviewed-by: Kees Cook Signed-off-by: Gustavo A. R. Silva Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20180824010521.GA25451@embeddedor.com commit d410e28f3ae476e1572b8893c646ef44fae7bbbd Author: YueHaibing Date: Mon Aug 6 12:39:16 2018 +0300 wcn36xx: use dma_zalloc_coherent instead of allocator/memset Use dma_zalloc_coherent instead of dma_alloc_coherent followed by memset 0. Signed-off-by: YueHaibing Signed-off-by: Kalle Valo commit 3f96556f639e6cc507cc682406e83671f8e7c1ea Author: YueHaibing Date: Mon Aug 6 12:39:07 2018 +0300 wcn36xx: Use kmemdup instead of duplicating it in wcn36xx_smd_process_ptt_msg_rsp Replace calls to kmalloc followed by a memcpy with a direct call to kmemdup. Signed-off-by: YueHaibing Signed-off-by: Kalle Valo commit bd1d395070cca4f42a93e520b0597274789274a4 Author: Tamizh chelvam Date: Mon Aug 6 12:39:01 2018 +0300 ath10k: fix kernel panic by moving pci flush after napi_disable When continuously running wifi up/down sequence, the napi poll can be scheduled after the CE buffers being freed by ath10k_pci_flush Steps: In a certain condition, during wifi down below scenario might occur. ath10k_stop->ath10k_hif_stop->napi_schedule->ath10k_pci_flush->napi_poll(napi_synchronize). In the above scenario, CE buffer entries will be freed up and become NULL in ath10k_pci_flush. And the napi_poll has been invoked after the flush process and it will try to get the skb from the CE buffer entry and perform some action on that. Since the CE buffer already cleaned by pci flush this action will create NULL pointer dereference and trigger below kernel panic. Unable to handle kernel NULL pointer dereference at virtual address 0000005c PC is at ath10k_pci_htt_rx_cb+0x64/0x3ec [ath10k_pci] ath10k_pci_htt_rx_cb [ath10k_pci] ath10k_ce_per_engine_service+0x74/0xc4 [ath10k_pci] ath10k_ce_per_engine_service [ath10k_pci] ath10k_ce_per_engine_service_any+0x74/0x80 [ath10k_pci] ath10k_ce_per_engine_service_any [ath10k_pci] ath10k_pci_napi_poll+0x48/0xec [ath10k_pci] ath10k_pci_napi_poll [ath10k_pci] net_rx_action+0xac/0x160 net_rx_action __do_softirq+0xdc/0x208 __do_softirq irq_exit+0x84/0xe0 irq_exit __handle_domain_irq+0x80/0xa0 __handle_domain_irq gic_handle_irq+0x38/0x5c gic_handle_irq __irq_usr+0x44/0x60 Tested on QCA4019 and firmware version 10.4.3.2.1.1-00010 Signed-off-by: Tamizh chelvam Signed-off-by: Kalle Valo commit 25559c22cef879c5cf7119540bfe21fb379d29f3 Author: Jens Wiklander Date: Mon Jul 9 08:15:49 2018 +0200 tee: add kernel internal client interface Adds a kernel internal TEE client interface to be used by other drivers. Reviewed-by: Sumit Garg Tested-by: Sumit Garg Tested-by: Zeng Tao Signed-off-by: Jens Wiklander commit db878f76b9ff7487da9bb0f686153f81829f1230 Author: Ard Biesheuvel Date: Wed Aug 1 11:48:33 2018 +0200 tee: optee: take DT status property into account DT nodes may have a 'status' property which, if set to anything other than 'ok' or 'okay', indicates to the OS that the DT node should be treated as if it was not present. So add that missing logic to the OP-TEE driver. Signed-off-by: Ard Biesheuvel Signed-off-by: Jens Wiklander commit 62d3a8deaa10b8346d979d0dabde56c33b742afa Author: Rodrigo Vivi Date: Thu Aug 23 13:51:36 2018 -0700 drm/i915: Free write_buf that we allocated with kzalloc. We use kzalloc to allocate the write_buf that we use for i2c transfer on hdcp write. But it seems that we are forgetting to free the memory that is not needed after i2c transfer is completed. Reported-by: Brian J Wood Fixes: 2320175feb74 ("drm/i915: Implement HDCP for HDMI") Cc: Ramalingam C Cc: Sean Paul Cc: Jani Nikula Cc: Rodrigo Vivi Cc: # v4.17+ Signed-off-by: Rodrigo Vivi Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20180823205136.31310-1-rodrigo.vivi@intel.com commit a61d904fd6fa85bfa7e0ae9aeaa8992173322e77 Author: Imre Deak Date: Wed Aug 22 14:26:02 2018 +0300 drm/i915: Simplify condition to keep DMC active during S0ix For S0ix we want to deinit power domains (and so deactivate the DMC firmware) exactly when the platform supports the DC9 state. To reach S0ix we need DC9 on these platforms (for which the DMC FW needs to be deactivated) while to reach S0ix on the rest of the DMC platforms we need DC6 (which needs the DMC FW to stay active). Simplify the condition accordingly so it will be automatically correct for upcoming DC9 platforms like ICL. Cc: Lucas De Marchi Cc: Michel Thierry Cc: Ville Syrjälä Cc: Rodrigo Vivi Cc: Paulo Zanoni Cc: Chris Wilson Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180822112602.27543-1-imre.deak@intel.com commit 53867b46fa8443713b3aee520d6ca558b222d829 Author: Dhinakaran Pandiyan Date: Tue Aug 21 18:50:53 2018 -0700 drm/i915: Rename PLANE_CTL_DECOMPRESSION_ENABLE Rename PLANE_CTL_DECOMPRESSION_ENABLE to resemble the bpsec name - PLANE_CTL_RENDER_DECOMPRESSION_ENABLE Suggested-by: Rodrigo Vivi Cc: Daniel Vetter Signed-off-by: Dhinakaran Pandiyan Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180822015053.1420-2-dhinakaran.pandiyan@intel.com commit 63eaf9acc00d394c75cb1a442387e0a05c17bcac Author: Dhinakaran Pandiyan Date: Wed Aug 22 12:38:27 2018 -0700 drm/i915: Add a small wrapper to check for CCS modifiers. Code looks cleaner with modifiers hidden inside this wrapper. v2: Remove const qualifier (Ville) Signed-off-by: Dhinakaran Pandiyan Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180822193827.6341-1-dhinakaran.pandiyan@intel.com commit 0577ab482f46653d6210aeb1d7dc57aa5e2dbfc3 Author: Azhar Shaikh Date: Wed Aug 22 10:23:48 2018 -0700 drm/i915/psr: Add PSR mode/revision to debugfs Log the PSR mode/revision (PSR1 or PSR2) in the debugfs file i915_edp_psr_status. Suggested-by: Dhinakaran Pandiyan Signed-off-by: Azhar Shaikh Reviewed-by: Dhinakaran Pandiyan Signed-off-by: Dhinakaran Pandiyan Link: https://patchwork.freedesktop.org/patch/msgid/1534958628-193724-1-git-send-email-azhar.shaikh@intel.com commit e296de926dfd39cf1ff9e5a41b56d4b3258a5a07 Author: Daniel Vetter Date: Wed Aug 22 11:29:05 2018 +0200 drm/syncobj: Drop add/remove_callback from driver interface This is used for handling future fences. Currently no driver use these, and I think given the new timeline fence proposed by KHR it would be better to have a more abstract interface for future fences. Could be something simple like a struct dma_future_fence plus a function to add a callback or wait for the fence to materialize. Then syncobj (and anything else really) could grow new functions to expose these two drivers. Normal dma_fence would then keep the nice guarantee that they will always signal (and through ordering, be deadlock free). dma_future_fence would then be the tricky one. This also fixes sphinx complaining about the kerneldoc. Cc: Jason Ekstrand Cc: Dave Airlie Cc: Chris Wilson Reviewed-by: Jason Ekstrand Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20180822092905.19884-1-daniel.vetter@ffwll.ch commit ad1a56f1bf2bd2394f98320baf9ad430f7b1534c Author: Mahesh Kumar Date: Tue Aug 21 14:08:57 2018 +0530 Revert "drm: crc: Wait for a frame before returning from open()" This reverts commit e8fa5671183c80342d520ad81d14fa79a9d4a680. Don't wait for first CRC during crtc_crc_open. It avoids one frame wait during open. If application want to wait after read call, it can use poll/read blocking read() call. Suggested-by: Ville Syrjälä Signed-off-by: Mahesh Kumar Cc: dri-devel@lists.freedesktop.org Cc: Tomeu Vizoso Reviewed-by: Laurent Pinchart Reviewed-by: Maarten Lankhorst Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20180821083858.26275-4-mahesh1.kumar@intel.com commit c0811a7d5befe34a17772760100e26b09a561c0e Author: Mahesh Kumar Date: Tue Aug 21 14:08:56 2018 +0530 drm/crc: Cleanup crtc_crc_open function This patch make changes to allocate crc-entries buffer before enabling CRC generation. It moves all the failure check early in the function before setting the source or memory allocation. Now set_crc_source takes only two variable inputs, values_cnt we already gets as part of verify_crc_source. Changes since V1: - refactor code to use single spin lock Changes since V2: - rebase Changes since V3: - rebase on top of VKMS driver Signed-off-by: Mahesh Kumar Cc: dri-devel@lists.freedesktop.org Cc: Laurent Pinchart Cc: Haneen Mohammed Reviewed-by: Maarten Lankhorst Acked-by: Leo Li (V2) Reviewed-by: Laurent Pinchart (V3) Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20180821083858.26275-3-mahesh1.kumar@intel.com commit af6979331da12d2db92a1fe7e1aba85ee5f4b06d Author: Mahesh Kumar Date: Tue Aug 21 14:08:55 2018 +0530 drm/vkms/crc: Implement verify_crc_source callback This patch implements "verify_crc_source" callback function for Virtual KMS drm driver. Changes Since V1: - update values_cnt in verify_crc_source Changes Since V2: - don't return early from set_crc_source to keep behavior same (Haneen) Cc: Haneen Mohammed Signed-off-by: Mahesh Kumar Reviewed-by: Haneen Mohammed Reviewed-by: Maarten Lankhorst Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20180821083858.26275-2-mahesh1.kumar@intel.com commit b1f1c2c11fc6c6cd3e361061e30f9b2839897b28 Author: Ville Syrjälä Date: Thu Jul 19 21:21:57 2018 +0300 drm/i915: Fix glk/cnl display w/a #1175 The workaround was supposed to look at the plane destination coordinates. Currently it's looking at some mixture of src and dst coordinates that doesn't make sense. Fix it up. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180719182214.4323-2-ville.syrjala@linux.intel.com Fixes: 394676f05bee (drm/i915: Add WA for planes ending close to left screen edge) Reviewed-by: Imre Deak commit 1aeb1b5fa069f7d7a0de3ac8a33547014613fc7a Author: Dhinakaran Pandiyan Date: Tue Aug 21 15:11:56 2018 -0700 drm/i915/psr: Mask PSR irq bits when re-enabling interrupts. gen8_de_irq_postinstall() wasn't masking the IRQ bit before passing the debug flag to psr_irq_control(). This check was missed when new debug bits were defined in 'commit c44301fce614 ("drm/i915: Allow control of PSR at runtime through debugfs, v6")'. Instead of ANDing the irq bit in all the callers, move it to the callee. v2: Rebased. Fixes: c44301fce614 ("drm/i915: Allow control of PSR at runtime through debugfs, v6") Cc: Maarten Lankhorst Signed-off-by: Dhinakaran Pandiyan Reviewed-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20180821221156.2442-3-dhinakaran.pandiyan@intel.com commit 9844d4bf3eb46778f46390d7beee5add650d5fc0 Author: Dhinakaran Pandiyan Date: Tue Aug 21 15:11:55 2018 -0700 drm/i915/psr: Add missing check for I915_PSR_DEBUG_IRQ bit We print the last attempted entry and last exit timestamps only when IRQ debug is requested. This check was missed when new debug flags were added in 'commit c44301fce614 ("drm/i915: Allow control of PSR at runtime through debugfs, v6") Fixes: c44301fce614 ("drm/i915: Allow control of PSR at runtime through debugfs, v6") Cc: Maarten Lankhorst Signed-off-by: Dhinakaran Pandiyan Reviewed-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20180821221156.2442-2-dhinakaran.pandiyan@intel.com commit 63ec132d5b60a0d504a82ac0356557112dfbb114 Author: Dhinakaran Pandiyan Date: Tue Aug 21 15:11:54 2018 -0700 drm/i915/psr: Print PSR_STATUS when PSR idle wait times out. Knowing the status of the PSR HW state machine is useful for debug, especially since we are seeing errors with PSR2 in CI. Cc: José Roberto de Souza Cc: Rodrigo Vivi Signed-off-by: Dhinakaran Pandiyan Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20180821221156.2442-1-dhinakaran.pandiyan@intel.com commit 7e7b68ef0076691f05b85a3ecd604a6160015fe9 Author: Brian Starkey Date: Tue Aug 21 17:16:11 2018 +0100 drm/fourcc: Add DOC: overview comment There's a number of things which haven't previously been documented around the usage of format modifiers. Capture the current understanding in an overview comment and add it to the rst documentation. Ideally, the generated documentation would also include documentation of all of the #defines, but the kernel-doc system doesn't currently support kernel-doc comments on #define constants. Suggested-by: Daniel Vetter Signed-off-by: Brian Starkey Reviewed-by: Daniel Vetter Signed-off-by: Alexandru Gheorghe Link: https://patchwork.freedesktop.org/patch/msgid/20180821161611.10424-1-brian.starkey@arm.com commit df4f94e810fc270db4baa8f4b35ef138246c7746 Author: Chris Wilson Date: Tue Aug 21 11:11:38 2018 +0100 drm/i915: Correct CSB probing for engine state dumper Since we no longer maintain our read position in the CSB pointers register, it always returns 0 and not where we last read up to. As a result the CSB probing in the state dumper starts from 0, either missing entries or showing stale one. Signed-off-by: Chris Wilson Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20180821101138.15822-1-chris@chris-wilson.co.uk commit 7b19f544ed90b7ca4bd850145e2624a99a967de0 Author: Manasi Navare Date: Fri Aug 17 14:52:09 2018 -0700 drm/i915/icl: Get DDI clock for ICL for MG PLL and TBT PLL PLLs are the source clocks for the DDIs so in order to determine the ddi clock we need to check the PLL configuration. For MG PHy Ports (C - F), depending on whether it is a TBT PLL or MG PLL the link lock can be obtained from the the PLL divisors based on the specification. v2 (from Paulo): * Make the algorithm look more like what's in the spec, also document where we differ form the spec and why. * Make the code a little more consistent with our coding style. Reviewed-by: José Roberto de Souza Signed-off-by: Manasi Navare Signed-off-by: Paulo Zanoni Link: https://patchwork.freedesktop.org/patch/msgid/20180817215209.29133-2-paulo.r.zanoni@intel.com commit bcaad532974eb47f1fb4ee04ede9812107060245 Author: Manasi Navare Date: Fri Aug 17 14:52:08 2018 -0700 drm/i915/icl: Implement HSDIV_RATIO of MG_CLKTOP2_HSCLKCTL_PORT reg as separate divider value defines The register value of Divider Ratio for high speed divider (hsdiv_ratio) in MG_CLKTOP2_HSCLKCTL_PORT register is not same as the actual numerical value of the divider. So this patch implements separate divider value defines for that field. icl_mg_pll_find_divisors() can use these defines instead of magic register values. The new defines are going to be used in the next patch. v2 (from Paulo): * Rebase. * Make it look a little more like the rest of our code. v3 (from Paulo): * Make hsdiv u32 now that it's a bit field (José). Reviewed-by: Rodrigo Vivi Reviewed-by: José Roberto de Souza Suggested-by: James Ausmus Signed-off-by: Manasi Navare Signed-off-by: Paulo Zanoni Link: https://patchwork.freedesktop.org/patch/msgid/20180817215209.29133-1-paulo.r.zanoni@intel.com commit 8109b2c94f586e120cc86449777818a2e1020e7c Author: Peter Rosin Date: Mon Aug 20 12:01:14 2018 +0200 iio: multiplexer: switch to SPDX license identifier Drop the boilerplate license text. Signed-off-by: Peter Rosin Signed-off-by: Jonathan Cameron commit 3c4b0f4ddf462bd713ce53d1b95e782dcba5298e Author: Peter Rosin Date: Mon Aug 20 12:01:13 2018 +0200 iio: dpot-dac: switch to SPDX license identifier Drop the boilerplate license text. Signed-off-by: Peter Rosin Signed-off-by: Jonathan Cameron commit 10d6e7955594dcb318c8a52ed6b85ce66fcd32bd Author: Peter Rosin Date: Mon Aug 20 12:01:12 2018 +0200 iio: envelope-detector: switch to SPDX license identifier Drop the boilerplate license text. Signed-off-by: Peter Rosin Signed-off-by: Jonathan Cameron commit 0ba56985824e2232ac2d8dfe5e793385c36527d4 Author: Peter Rosin Date: Mon Aug 20 12:01:11 2018 +0200 iio: potentiometer: mcp4531: switch to SPDX license identifier Drop the boilerplate license text and use the correct MODULE_LICENSE. Signed-off-by: Peter Rosin Signed-off-by: Jonathan Cameron commit b9ea8c31e36e8e244becf5250ec28d82b8faf4b0 Author: Peter Rosin Date: Mon Aug 20 12:01:10 2018 +0200 iio: potentiometer: mcp4018: use the correct MODULE_LICENSE The file is GPL v2 only. Signed-off-by: Peter Rosin Signed-off-by: Jonathan Cameron commit 35a5fd9ebfa93758ca579e30f337b6c9126d995b Author: Chris Wilson Date: Fri Aug 17 11:02:41 2018 +0100 drm/i915/audio: Hook up component bindings even if displays are disabled If the display has been disabled by modparam, we still want to connect together the HW bits and bobs with the associated drivers so that we can continue to manage their runtime power gating. Fixes: 108109444ff6 ("drm/i915: Check num_pipes before initializing audio component") Signed-off-by: Chris Wilson Cc: Imre Deak Cc: Takashi Iwai Cc: Jani Nikula Cc: Elaine Wang Reviewed-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20180817100241.4628-1-chris@chris-wilson.co.uk commit c76abab59b3cb34a0bc819595614844ed28be721 Author: Ayan Kumar Halder Date: Fri Aug 17 17:54:00 2018 +0100 drm: Use horizontal and vertical chroma subsampling factor while calculating offsets in the physical address of framebuffer For multi-planar formats, while calculating offsets in planes with index greater than 0 (ie second plane, third plane, etc), one needs to divide (src_x * cpp) with horizontal chroma subsampling factor and (src_y * pitch) with vertical chroma subsampling factor. The reason being that the planes contain subsampled (ie reduced) data (by a factor of 2) and thus while calculating the byte position coresponding to the x and y co-ordinates, one needs to divide it with the sampling factor. Signed-off-by: Ayan Kumar halder Reviewed-by: Liviu Dudau Link: https://patchwork.kernel.org/patch/10569263/ commit 59f1c8ab30d6f9042562949f42cbd3f3cf69de94 Author: Fredrik Schön Date: Fri Aug 17 22:07:28 2018 +0200 drm/i915: Increase LSPCON timeout 100 ms is not enough time for the LSPCON adapter on Intel NUC devices to settle. This causes dropped display modes at boot or screen reconfiguration. Empirical testing can reproduce the error up to a timeout of 190 ms. Basic boot and stress testing at 200 ms has not (yet) failed. Increase timeout to 400 ms to get some margin of error. Changes from v1: The initial suggestion of 1000 ms was lowered due to concerns about delaying valid timeout cases. Update patch metadata. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107503 Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1570392 Fixes: 357c0ae9198a ("drm/i915/lspcon: Wait for expected LSPCON mode to settle") Cc: Shashank Sharma Cc: Imre Deak Cc: Jani Nikula Cc: # v4.11+ Reviewed-by: Rodrigo Vivi Reviewed-by: Shashank Sharma Signed-off-by: Fredrik Schön Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20180817200728.8154-1-fredrik.schon@gmail.com commit 6dfc4a8f134fe0fe4c77dd09906e7305ba7b3edc Author: Imre Deak Date: Thu Aug 16 22:34:14 2018 +0300 drm/i915: Verify power domains after enabling them After commit 2cd9a689e97b ("drm/i915: Refactor intel_display_set_init_power() logic") it makes more sense to check the power domain/well refcounts after enabling the power domains functionality. Before that it's guaranteed that most power wells (in the INIT domain) will have a reference held, so not an interesting state. While at it also add the check after the init_hw/fini_hw, disable and suspend/resume steps. Make the test optional on a Kconfig option since it may add substantial overhead: on VLV/CHV the corresponding PUNIT reg access for each power well may take up to 20ms. v2: - Add the state check to more spots. (Chris) v3: - During suspend check the state before deiniting display core. Afterwards DC states are disabled (and so the dc_off power well is enabled) even though we don't hold a reference on it. - Do the test conditionally based on a new Kconfig option. (Chris) Cc: Chris Wilson Reviewed-by: Chris Wilson [Add DRM_I915_DEBUG_RUNTIME_PM to welcome messages] Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20180817145837.26592-1-imre.deak@intel.com commit ce7c637a8368d0293649a4acc0b89930295cb62a Author: Julia Lawall Date: Mon May 21 11:49:10 2018 +0200 iio: potentiometer: merge calls to of_match_device and of_device_get_match_data Drop call to of_match_device, which is subsumed by the subsequent call to of_device_get_match_data. The code becomes simpler, and a temporary variable can be dropped. The semantic match that makes this change is as follows: (http://coccinelle.lip6.fr/) // @r@ local idexpression match; identifier i; expression x, dev, e, e1; @@ - match@i = of_match_device(x, dev); - if (match) e = of_device_get_match_data(dev); - else e = e1; + e = of_device_get_match_data(dev); + if (!e) e = e1; @@ identifier r.i; @@ - const struct of_device_id *i; ... when != i // Signed-off-by: Julia Lawall Reviewed-by: Peter Rosin Signed-off-by: Jonathan Cameron commit 892e62fab4983656d3ca5df4e83fdf2b496c06e4 Author: Himanshu Jha Date: Sat Aug 11 15:56:36 2018 +0530 iio: chemical: bme680: Add check for val2 in the write_raw function val2 is responsible for the floating part of the number to be written to the device. We don't need the floating part while writing the oversampling ratio for BME680 since the available oversampling ratios are pure natural numbers. So, add a sanity check to make sure val2 is 0. Signed-off-by: Himanshu Jha Signed-off-by: Jonathan Cameron commit 010de20412fc40dabfbab926358ecd9c4486dd0d Author: Marcus Folkesson Date: Wed Aug 8 10:09:17 2018 +0200 MAINTAINERS: Add entry for mcp3911 ADC driver Add an entry for mcp3911 ADC driver and add myself and Kent Gustavsson as maintainers of this driver. Co-Developed-by: Kent Gustavsson Signed-off-by: Kent Gustavsson Signed-off-by: Marcus Folkesson Signed-off-by: Jonathan Cameron commit 1c4fbbea34087007b871d444bcbe7c24fad32bd3 Author: Marcus Folkesson Date: Wed Aug 8 10:09:16 2018 +0200 dt-bindings: iio: adc: add bindings for mcp3911 MCP3911 is a dual channel Analog Front End (AFE) containing two synchronous sampling delta-sigma Analog-to-Digital Converters (ADC). Co-Developed-by: Kent Gustavsson Signed-off-by: Kent Gustavsson Signed-off-by: Marcus Folkesson Reviewed-by: Rob Herring Signed-off-by: Jonathan Cameron commit 3a89b289df5df45e2343c2a8e837ad445f9776f6 Author: Marcus Folkesson Date: Wed Aug 8 10:09:15 2018 +0200 iio: adc: add support for mcp3911 MCP3911 is a dual channel Analog Front End (AFE) containing two synchronous sampling delta-sigma Analog-to-Digital Converters (ADC). Co-developed-by: Kent Gustavsson Signed-off-by: Kent Gustavsson Signed-off-by: Marcus Folkesson Signed-off-by: Jonathan Cameron commit 6b8471e4601db48ef76144fac6e706256c2aae2d Author: Alexandru Ardelean Date: Tue Aug 7 17:06:05 2018 +0300 iio: adxl345: move null check for i2c id at start of probe Fixes ef89f4b96a2 ("iio: adxl345: Add support for the ADXL375"). This was found via static checker. After looking into the code a bit, it's unlikely that there will be a NULL dereference if the `id` object in that specific code path. However, it's safe to add a NULL (paranoid) check just to make sure and remove any uncertainties. Reported-by: Dan Carpenter Signed-off-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron commit eb2e188817b13d2f13b61ea6b96b7753ccff48dd Author: Colin Ian King Date: Thu Aug 9 14:53:38 2018 +0100 iio: max44000: remove unused variable max44000_alstim_shift Variable max44000_alstim_shift is defined but is never used hence it is redundant and can be removed. This variable has been like this since the driver was added back in 2016. Cleans up clang warning: warning: 'max44000_alstim_shift' defined but not used [-Wunused-const-variable=] Signed-off-by: Colin Ian King Signed-off-by: Jonathan Cameron commit f4f55ce38e5f823a13662b12189627a5b9a34688 Author: Stefan Popa Date: Fri Aug 10 11:46:21 2018 +0300 iio:adxl372: Add FIFO and interrupts support This patch adds support for the adxl372 FIFO. In order to accomplish this, triggered buffers were used. The number of FIFO samples which trigger the watermark interrupt can be configured by using the buffer watermark. The FIFO format is determined by configuring the scan elements for each axis. The FIFO data is pushed to the IIO device's buffer. Signed-off-by: Stefan Popa Signed-off-by: Jonathan Cameron commit 4bc5b6b64c9df1a1b9ca6a37359d6476d9e25354 Merge: ad6e1fb0312c 74fe7b551f33 Author: Jonathan Cameron Date: Sun Aug 19 18:06:59 2018 +0100 Merge tag 'regmap-noinc-read' into togreg regmap: Support non-incrementing registers Some devices have individual registers that don't autoincrement the register address during bulk reads but instead repeatedly read the same value, for example for monitoring GPIOs or ADCs. Add support for these. commit ad6e1fb0312c5a4b4fc70e17b73ca1cdfc68c429 Author: Stefan Popa Date: Fri Aug 10 11:46:19 2018 +0300 dt-bindings: iio: accel: Add docs for ADXL372 Add the device tree binding documentation for the ADXL372 3-axis digital accelerometer. Signed-off-by: Stefan Popa Reviewed-by: Rob Herring Signed-off-by: Jonathan Cameron commit 4097da40f9264ab75f256ec7f097cfff2710cc0a Author: Stefan Popa Date: Fri Aug 10 11:46:18 2018 +0300 iio: adxl372: New driver for Analog Devices ADXL372 Accelerometer This patch adds basic support for Analog Devices ADXL372 SPI-Bus Three-Axis Digital Accelerometer. The device is probed and configured the with some initial default values. With this basic driver, it is possible to read raw acceleration data. Datasheet: http://www.analog.com/media/en/technical-documentation/data-sheets/ADXL372.pdf Signed-off-by: Stefan Popa Signed-off-by: Jonathan Cameron commit 4d0434f1297c25c2adbd188888367b534e0aff87 Author: Matthias Kaehlcke Date: Fri Aug 10 12:47:02 2018 -0700 iio: adc: qcom-spmi-adc5: Add ADC5_AMUX_THM[24]_100K_PU to rev2 channel list Add ADC5_AMUX_THM2_100K_PU and ADC5_AMUX_THM4_100K_PU to the list of rev2 ADC channels. Signed-off-by: Matthias Kaehlcke Signed-off-by: Jonathan Cameron commit b1ec0802503820ccbc894aadfd2a44da20232f5e Author: Stefan Agner Date: Sat Aug 11 11:12:19 2018 +0200 iio: adc: max9611: explicitly cast gain_selectors After finding a reasonable gain, the function converts the configured gain to a gain configuration option selector enum max9611_csa_gain. Make the conversion clearly visible by using an explicit cast. This also avoids a warning seen with clang: drivers/iio/adc/max9611.c:292:16: warning: implicit conversion from enumeration type 'enum max9611_conf_ids' to different enumeration type 'enum max9611_csa_gain' [-Wenum-conversion] *csa_gain = gain_selectors[i]; ~ ^~~~~~~~~~~~~~~~~ Signed-off-by: Stefan Agner Signed-off-by: Jonathan Cameron commit 1a5bc41a3d23745577fa26f1ee34d50c205e2926 Author: Marcus Folkesson Date: Sat Aug 11 10:47:25 2018 +0200 iio: dac: mcp4725: avoid using CONFIG_PM_SLEEP This is already handled by SIMPLE_DEV_PM_OPS(). Signed-off-by: Marcus Folkesson Signed-off-by: Jonathan Cameron commit b6ec220c28268872cad624aa824463a52c50ed47 Author: Marcus Folkesson Date: Sat Aug 11 10:47:18 2018 +0200 iio: dac: max5821: avoid using CONFIG_PM_SLEEP This is already handled by SIMPLE_DEV_PM_OPS(). Signed-off-by: Marcus Folkesson Signed-off-by: Jonathan Cameron commit fe8a5420749f5d1e1bd1be15942281bf1b6e3d4e Author: Marcus Folkesson Date: Sat Aug 11 10:47:09 2018 +0200 iio: dac: max517: avoid using CONFIG_PM_SLEEP This is already handled by SIMPLE_DEV_PM_OPS(). Signed-off-by: Marcus Folkesson Signed-off-by: Jonathan Cameron commit 9920ed25eccc9b494926be5372ba745db83481ab Author: Michael Hennerich Date: Tue Aug 14 13:23:17 2018 +0200 drivers: iio: Update MODULE AUTHOR email address no functional changes Signed-off-by: Michael Hennerich Signed-off-by: Jonathan Cameron commit 9ffa68f65416094714c63ed1db219493e84fe21d Author: Gustavo A. R. Silva Date: Wed Aug 15 11:23:49 2018 -0500 iio: health: max30102: 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 placed the "fall through" annotation at the bottom of the case, which is what GCC is expecting to find. Addresses-Coverity-ID: 1458342 ("Missing break in switch") Addresses-Coverity-ID: 1458345 ("Missing break in switch") Signed-off-by: Gustavo A. R. Silva Signed-off-by: Jonathan Cameron commit a18c66c405c740291ea263412f2e8b6c66fa5966 Author: Tomasz Duszynski Date: Thu Aug 16 20:49:15 2018 +0200 iio: pressure: ms5611: remove deprecated compatible strings Compatible strings tend to follow manufacturer,model format. In case one wants to do a matching with manufacturer stripped off he can still do so since SPI/I2C core will try id_table based matching anyway. Signed-off-by: Tomasz Duszynski Signed-off-by: Jonathan Cameron commit 79fd571b7a4915cee0de64314ea08d8a2ffe8e78 Author: David Frey Date: Fri Aug 17 12:03:19 2018 -0700 iio: chemical: bme680: simplify oversampling handling Temperature, pressure and humidity all expose and oversampling setting that works in the same way. Provide common handling for the oversampling sysfs attributes. Signed-off-by: David Frey Reviewed-by: Himanshu Jha Tested-by: Himanshu Jha Signed-off-by: Jonathan Cameron commit 3dcb60cd926ebfc8f85603d226457c9a38794209 Author: David Frey Date: Fri Aug 17 12:03:18 2018 -0700 iio: chemical: bme680: use FIELD_GET macro Use the FIELD_GET macro instead of explicit mask and shift. Signed-off-by: David Frey Reviewed-by: Himanshu Jha Tested-by: Himanshu Jha Signed-off-by: Jonathan Cameron commit 8d3032c3692d247ad625863e949d419952db8cbd Author: David Frey Date: Fri Aug 17 12:03:17 2018 -0700 iio: chemical: bme680: use GENMASK macro Replace hardcoded bit masks with GENMASK macro Signed-off-by: David Frey Reviewed-by: Himanshu Jha Tested-by: Himanshu Jha Signed-off-by: Jonathan Cameron commit a24b4d70c7b2f4b4fed807b9283ba7ae8b114e2f Author: David Frey Date: Fri Aug 17 12:03:16 2018 -0700 iio: chemical: bme680: change MSK->MASK in #defines Convert all defines to use "MASK" instead of a mix of "MSK" and "MASK" Signed-off-by: David Frey Reviewed-by: Himanshu Jha Tested-by: Himanshu Jha Signed-off-by: Jonathan Cameron commit 70f1cbddb265c6420b149f55e7e9c67a1e77a294 Author: David Frey Date: Fri Aug 17 12:03:15 2018 -0700 iio: chemical: bme680: indent #defines consistently Signed-off-by: David Frey Reviewed-by: Himanshu Jha Tested-by: Himanshu Jha Signed-off-by: Jonathan Cameron commit 6784ba340a0ea48e276f888143d444ec631ff4a6 Author: David Frey Date: Fri Aug 17 12:03:14 2018 -0700 iio: chemical: bme680: cleanup bme680_read_calib formatting Use the full 80 char width to reduce the number of lines taken by function calls. Remove blank lines where it aids clarity by bringing together related code blocks (such as read hi and low bytes and then combine them into one value). Signed-off-by: David Frey Reviewed-by: Himanshu Jha Tested-by: Himanshu Jha Signed-off-by: Jonathan Cameron commit 8a0ae7d83aa8427fd264404da3045994521b621f Author: David Frey Date: Fri Aug 17 12:03:13 2018 -0700 iio: chemical: bme680: use clamp macro Signed-off-by: David Frey Reviewed-by: Himanshu Jha Tested-by: Himanshu Jha Signed-off-by: Jonathan Cameron commit 7c14947e4d3d8585cc047b132cd1a4ac3167928c Author: Brian Masney Date: Thu Aug 2 20:18:56 2018 -0400 iio: tsl2772: add support for regulator framework This patch adds support for the regulator framework to the tsl2772 driver. Driver was tested using a LG Nexus 5 (hammerhead) phone with the two regulators and on a Raspberry Pi 2 without any regulators controlling the power to the sensor. Signed-off-by: Brian Masney Signed-off-by: Jonathan Cameron commit 75de3b570b1c80f185df5289cb781e453fd64502 Author: Brian Masney Date: Thu Aug 2 20:18:58 2018 -0400 iio: tsl2772: add support for avago,apds9930 The Avago APDS9930 has the same register set as the TAOS/AMS TSL2772 so this patch adds the correct bindings and the appropriate LUX table values derived from the values in the datasheet. Driver was tested on a LG Nexus 5 (hammerhead) phone. avago,apds9930 datasheet: https://www.mouser.com/datasheet/2/678/avago_AV02-3190EN_DS_APDS-9930_2014-03-25[1]-1217273.pdf tsl2772 datasheet: https://ams.com/eng/content/download/291503/1066377/file/TSL2772_DS000181_2-00.pdf Signed-off-by: Brian Masney Signed-off-by: Jonathan Cameron commit 28b6977e089dda97f8f32ac1a6a223f59e7065f4 Author: Brian Masney Date: Thu Aug 2 20:18:59 2018 -0400 dt-bindings: iio: tsl2772: add binding for avago,apds9930 This patch adds avago,apds9930 to the tsl2772 bindings. Signed-off-by: Brian Masney Reviewed-by: Rob Herring Signed-off-by: Jonathan Cameron commit 94cd1113aaa07762c57032e2e6212531f5308893 Author: Brian Masney Date: Thu Aug 2 20:18:54 2018 -0400 iio: tsl2772: add support for reading proximity led settings from device tree This patch adds support for optionally reading the proximity led diode and current settings from device tree. This was tested using a LG Nexus 5 (hammerhead) which requires a different diode than the driver default for the IR LED. Signed-off-by: Brian Masney Signed-off-by: Jonathan Cameron commit 1ed80a817bc42de91701cc60e58d968077359a58 Author: Brian Masney Date: Thu Aug 2 20:18:55 2018 -0400 dt-bindings: iio: tsl2772: add new bindings This patch adds the new properties amstaos,proximity-diodes and led-max-microamp to the tsl2772 driver. This patch also removes the driver from the trivial-devices.txt. Signed-off-by: Brian Masney Reviewed-by: Rob Herring Signed-off-by: Jonathan Cameron commit 07c12b1c007c5c1d9c434ec9a19373ce5d87fe04 Author: Brian Masney Date: Thu Aug 2 20:18:52 2018 -0400 iio: imu: mpu6050: add support for regulator framework This patch adds support for the regulator framework to the mpu6050 driver. Signed-off-by: Brian Masney Signed-off-by: Jonathan Marek Acked-by: Rob Herring Signed-off-by: Jonathan Cameron commit 2c8909b95b3e2e9f3c312bf8385c2099dacd6d63 Author: Siddartha Mohanadoss Date: Thu Aug 2 18:44:06 2018 -0700 iio: adc: Update QCOM ADC license to SPDX format Update QCOM ADC header file to SPDX format. Signed-off-by: Siddartha Mohanadoss Reviewed-by: Rob Herring Signed-off-by: Jonathan Cameron commit e13d757279bbc59776c8435fb94e54b5a58bdd0b Author: Siddartha Mohanadoss Date: Thu Aug 2 18:43:53 2018 -0700 iio: adc: Add QCOM SPMI PMIC5 ADC driver This patch adds support for QCOM SPMI PMIC5 family of ADC driver that supports hardware based offset and gain compensation. The ADC peripheral can measure both voltage and current channels whose input signal is connected to the PMIC ADC AMUX. The register set and configuration has been refreshed compared to the prior QCOM PMIC ADC family. Register ADC5 as part of the IIO framework. Signed-off-by: Siddartha Mohanadoss Signed-off-by: Jonathan Cameron commit da4468a1aa75457e6134127b19761b7ba62ce945 Author: Anusha Srivatsa Date: Fri Aug 17 10:33:30 2018 -0700 drm/i915: Do not redefine the has_csr parameter. Let us reuse the already defined has_csr check and not redefine it. The main difference is that in effect this will flip .has_csr to 1 (via GEN9_FEATURES which GEN11_FEATURES pulls in). Suggested-by: Imre Deak Cc: Imre Deak Cc: Rodrigo Vivi Signed-off-by: Anusha Srivatsa Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=107382 Reviewed-by: Imre Deak Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/1534527210-16841-1-git-send-email-anusha.srivatsa@intel.com commit 065e8c8ff0c7948bc6452f88f0acc488be206b5d Author: Daniel Vetter Date: Thu Aug 9 14:45:44 2018 +0200 drm/vgem: Remove unecessary dma_fence_ops dma_fence_default_wait is the default now, same for the trivial enable_signaling implementation. Also remove the ->signaled callback, vgem can't peek ahead with a fastpath, returning false is the default implementation. v2: Protect the meaningful space! (Chris) Reviewed-by: Chris Wilson Signed-off-by: Daniel Vetter Cc: Kees Cook Cc: Cihangir Akturk Cc: Chris Wilson Cc: Sean Paul Cc: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20180809124544.9250-1-daniel.vetter@ffwll.ch commit 409254281fb0115d448e56c5a81f420cdeeb9209 Author: Daniel Vetter Date: Wed Jul 4 11:29:07 2018 +0200 drm/nouveau: Remove unecessary dma_fence_ops dma_fence_default_wait is the default now. Reviewed-by: Chris Wilson Signed-off-by: Daniel Vetter Cc: Ben Skeggs Cc: nouveau@lists.freedesktop.org Link: https://patchwork.freedesktop.org/patch/msgid/20180704092909.6599-4-daniel.vetter@ffwll.ch commit e43b9082abe47b77ca00a9fe53b5860e3e3693ee Author: Daniel Vetter Date: Wed Jul 4 11:29:06 2018 +0200 drm/msm: Remove unecessary dma_fence_ops dma_fence_default_wait is the default now, same for the trivial enable_signaling implementation. v2: Also remove the relase hook, dma_fence_free is the default. Reviewed-by: Chris Wilson Signed-off-by: Daniel Vetter Cc: Rob Clark Cc: linux-arm-msm@vger.kernel.org Cc: freedreno@lists.freedesktop.org Link: https://patchwork.freedesktop.org/patch/msgid/20180704092909.6599-3-daniel.vetter@ffwll.ch commit a5aca5d9f47c6899ad0ec8c117542f645419855b Author: Daniel Vetter Date: Wed Jul 4 11:29:05 2018 +0200 drm/i915: Remove unecessary dma_fence_ops dma_fence_default_wait is the default now, same for the trivial enable_signaling implementation. v2: Also remove the relase hook, dma_fence_free is the default. Reviewed-by: Chris Wilson Signed-off-by: Daniel Vetter Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: Chris Wilson Cc: Tvrtko Ursulin Cc: Colin Ian King Cc: Daniel Vetter Cc: Mika Kuoppala Cc: intel-gfx@lists.freedesktop.org Link: https://patchwork.freedesktop.org/patch/msgid/20180704092909.6599-2-daniel.vetter@ffwll.ch commit 86e5d0b529a4002c720c8bddcba56c1e913c5359 Author: Thomas Zimmermann Date: Fri Aug 17 10:21:38 2018 +0200 drm/gma500: Do not include The gma500 driver has no dependencies on drm_global.h. Remove the include statement. Signed-off-by: Thomas Zimmermann Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20180817082138.26628-1-tzimmermann@suse.de commit 8a68060cefa6db0e02600ac35deed0dc2fa6a68f Author: Al Viro Date: Thu Aug 16 21:03:35 2018 -0400 alpha: unify the glue for sigreturn-like syscalls Signed-off-by: Al Viro commit 060581c158a66fcc68f8877ccd0d60fd9aeca65e Author: Al Viro Date: Sat Aug 11 01:04:55 2018 +0100 alpha: use alpha_ni_syscall only for syscall zero Once upon a time it used to have a C part that printed a warning about unimplemented OSF syscalls. That's what it's been doing all over the OSF syscall range, while the native Linux syscall range uses sys_ni_syscall(). With those warnings about unimplemented OSF syscalls gone (circa 2.4), alpha_ni_syscall() has shrunk to that little bit of asm and the only reason it hasn't been replaced with sys_ni_syscall() everywhere is that extra twist needed in case of syscall #0. Let's keep it only for syscall #0 and replace the rest with sys_ni_syscall. And use sys_ni_syscall for "number out range" in ptraced-call case, as we'd been doing for normal codepath since 2.1.86... Acked-by: Richard Henderson Signed-off-by: Al Viro commit 66fc82960c5c68eecdcf4568e5907d3702e4fcdc Author: Chris Wilson Date: Wed Aug 15 14:58:27 2018 +0100 drm/i915/execlists: Include reset depth in traces Show the reset depth (the tasklet disable count) in the GEM_TRACE to indicate when we might not expect tasklets to be flushed. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20180815135827.25869-1-chris@chris-wilson.co.uk commit dce888798d3ed1c7fea2d45f5f757a749a9e2584 Author: Lucas De Marchi Date: Fri Jul 27 12:36:47 2018 -0700 drm/i915: remove confusing GPIO vs PCH_GPIO Instead of defining all registers twice, define just a PCH_GPIO_BASE that has the same address as PCH_GPIO_A and use that to calculate all the others. This also brings VLV and !HAS_GMCH_DISPLAY in line, doing the same thing. v2: Fix GMBUS registers to be relative to gpio base; create GPIO() macro to return a particular gpio address and move the enum out of i915_reg.h (suggested by Jani) v3: Move base offset inside the GPIO() macro so the GMBUS defines don't actually need to be changed (suggested by Daniel/Ville) v4: Move definition of i915_gpio to intel_display.h and remove GMBUS/GPIO handling from gvt since now they have their own defines. Signed-off-by: Lucas De Marchi Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20180727193647.8639-3-lucas.demarchi@intel.com commit 336662e5e3c90e2b6d4b2c2a773f87218baa8a61 Author: Lucas De Marchi Date: Fri Jul 27 12:36:46 2018 -0700 drm/i915/gvt: use its own define for gpio The definition on i915_reg.h is going to change to depend on dev_priv->gpio_mmio_base being properly initialized. Define our own macros since init_generic_mmio_info() is called before than gpio_mmio_base being set. Cc: intel-gvt-dev@lists.freedesktop.org Cc: Zhenyu Wang Signed-off-by: Lucas De Marchi Reviewed-by: Zhenyu Wang Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20180727193647.8639-2-lucas.demarchi@intel.com commit f5133cca38f5cad3e8eff5f75e321cb592c3b4b0 Author: Lucas De Marchi Date: Fri Jul 27 12:36:45 2018 -0700 drm/i915: make PCH_GMBUS* definitions private to gvt This is the only place that they are being used - the others use the GMBUS* macros that rely on dev_priv being already properly initialized. Cc: intel-gvt-dev@lists.freedesktop.org Cc: Zhenyu Wang Signed-off-by: Lucas De Marchi Reviewed-by: Zhenyu Wang Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20180727193647.8639-1-lucas.demarchi@intel.com commit 3eb3cd04e2d8cd930c7caa8d9e57f1c964792b6e Author: Sean Paul Date: Wed Aug 15 16:38:28 2018 -0400 drm/panel: Fix sphinx warning Resolves the following warnings. ../drivers/gpu/drm/drm_panel.c:158: WARNING: Unexpected indentation. ../drivers/gpu/drm/drm_panel.c:159: WARNING: Block quote ends without a blank line; unexpected unindent. Fixes: c59eb3cfde1f ("drm/panel: Let of_drm_find_panel() return -ENODEV when the panel is disabled") Cc: Boris Brezillon Cc: Daniel Vetter Cc: Thierry Reding Cc: Jyri Sarha Reviewed-by: Daniel Vetter Acked-by: Thierry Reding Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20180815203833.210143-1-sean@poorly.run commit d2c53b337ef53bb874d4be076b6d51ae1498ab2a Author: Guenter Roeck Date: Wed Aug 15 15:49:14 2018 -0400 drm/bridge: ti-sn65dsi86: Fix 0-day build error 0day reports: >> drivers/gpu/drm/bridge/ti-sn65dsi86.o: In function mipi_dsi_detach' >> drivers/gpu/drm/bridge/ti-sn65dsi86.c:630: undefined reference to ti_sn_bridge_attach': >> drivers/gpu/drm/bridge/ti-sn65dsi86.c:249: undefined reference to mipi_dsi_device_register_full' >> drivers/gpu/drm/bridge/ti-sn65dsi86.c:276: undefined reference to mipi_dsi_device_unregister' Quite obviously the driver depends on DRM_MIPI_DSI. We can not use depends since the driver configuration uses select, so we'll have to select the missing dependency instead. Cc: Sean Paul Cc: Dylan Reid Reviewed-by: Daniel Vetter Signed-off-by: Guenter Roeck Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20180815194923.3258-1-sean@poorly.run commit 2cd9a689e97b460489348aee89d72a812c3c1066 Author: Imre Deak Date: Thu Aug 16 15:37:57 2018 +0300 drm/i915: Refactor intel_display_set_init_power() logic The device global init_power_on flag is somewhat arbitrary and makes debugging power refcounting problems difficult. Instead arrange things so that all display power domain get has a corresponding put call. After this change we have the following sequences: driver loading: intel_power_domains_init_hw(); intel_power_domains_enable(); driver unloading: intel_power_domains_disable(); intel_power_domains_fini_hw(); system suspend: intel_power_domains_disable(); intel_power_domains_suspend(); system resume: intel_power_domains_resume(); intel_power_domains_enable(); at other times while the driver is loaded: intel_display_power_get(); ... intel_display_power_put(); Suggested-by: Chris Wilson Cc: Chris Wilson Signed-off-by: Imre Deak Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20180816123757.3286-2-imre.deak@intel.com commit 07d805721938a35e695d9f89218a4b02f6a4b2c4 Author: Chris Wilson Date: Thu Aug 16 15:37:56 2018 +0300 drm/i915: Introduce intel_runtime_pm_disable to pair intel_runtime_pm_enable Currently, we cancel the extra wakeref we have for !runtime-pm devices inside power_wells_fini_hw. However, this is not strictly paired with the acquisition of that wakeref in runtime_pm_enable (as the fini_hw may be called on errors paths before we even call runtime_pm_enable). Make the symmetry more explicit and include a check that we do release all of our rpm wakerefs. v2: Fixup transfer of ownership back to core whilst keeping our wakeref count balanced. Signed-off-by: Chris Wilson Cc: Imre Deak Reviewed-by: Imre Deak Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20180816123757.3286-1-imre.deak@intel.com commit a4417b7b419a68540ad7945ac4efbb39d19afa63 Author: Chris Wilson Date: Thu Aug 16 08:34:46 2018 +0100 drm/i915: Stop holding a ref to the ppgtt from each vma The context owns both the ppgtt and the vma within it, and our activity tracking on the context ensures that we do not release active ppgtt. As the context fulfils our obligations for active memory tracking, we can relinquish the reference from the vma. This fixes a silly transient refleak from closed vma being kept alive until the entire system was idle, keeping all vm alive as well. Reported-by: Paulo Zanoni Testcase: igt/gem_ctx_create/files Fixes: 3365e2268b6b ("drm/i915: Lazily unbind vma on close") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Paulo Zanoni Reviewed-by: Mika Kuoppala Tested-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20180816073448.19396-1-chris@chris-wilson.co.uk commit 103c1944c6ae6d951b61c962f2d9901c465cabc7 Author: Jyri Sarha Date: Wed Aug 15 20:03:31 2018 +0300 drm: Add kerneldoc description for "link"-member in struct drm_panel Add kerneldoc description for "struct device_link *link"-member in struct drm_panel. Signed-off-by: Jyri Sarha Reviewed-by: Daniel Vetter Signed-off-by: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/1534352611-19074-1-git-send-email-jsarha@ti.com commit 805615dae0572087d2def1625496a72b8d6dbd25 Author: Chris Wilson Date: Wed Aug 15 19:42:51 2018 +0100 drm/i915: Remove useless error return from intel_init_mocs_engine() As the only error is for a programming error in constructing the static tables describing the register values, replace the error code propagation with an assert. Signed-off-by: Chris Wilson Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20180815184251.5850-1-chris@chris-wilson.co.uk commit fc0c5a9d1dabba39058e91987766ec24988ae1fa Author: Chris Wilson Date: Wed Aug 15 21:12:07 2018 +0100 drm/i915: Only skip connector output for disable_display We want to add no connectors, encoders or crtcs if the display is disabled, but we still need to hook up any existing HW so that we can power it down. Signed-off-by: Chris Wilson Reviewed-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20180815201207.2203-1-chris@chris-wilson.co.uk commit ad3c776b171078a10ace07616a34ed6266beb0e7 Author: Imre Deak Date: Wed Aug 15 16:10:38 2018 +0300 drm/i915: Fix PM refcounting w/o DMC firmware The case where the firmware isn't specified for a platform (although runtime PM works only with DMC on this platform) is the same case where the firmware is specified but can't be loaded for some reason. Hence we need to get a display init power domain ref in the first case too to keep the refcount bookkeeping in balance. Also convert the related log message to be a debug one, since it's a valid scenario for a new platform, where we need to have dev_info->has_csr=1 set, but add support for actually loading the firmware only later. v2: - In addition to the debug log, WARN on non-alpha support platforms, since then the first case isn't valid scenario. (Chris) References: https://bugs.freedesktop.org/show_bug.cgi?id=107382 Cc: Chris Wilson Cc: Anusha Srivatsa Signed-off-by: Imre Deak Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20180815131038.24446-1-imre.deak@intel.com commit a99b32a6fff7e482a267c72e565c8c410ce793d7 Author: Chris Wilson Date: Tue Aug 14 18:18:57 2018 +0100 drm/i915: Clear stop-engine for a pardoned reset If we pardon a per-engine reset, we may leave the STOP_RING bit asserted in RING_MI_MODE resulting in the engine hanging. Unconditionally clear it on the per-engine exit path as we know that either we skipped the reset and so need the cancellation, or the reset was successful and the cancellation is a no-op, or there was an error and we will follow up with a full-reset or wedging (both of which will stop the engines again as required). Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107188 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106560 Signed-off-by: Chris Wilson Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20180814171857.24673-1-chris@chris-wilson.co.uk commit 0aeb35ea0e1a4eb01d401b85b541181c796d5c86 Author: Matt Atwood Date: Mon Jul 23 14:27:34 2018 -0700 drm/dp: add extended receiver capability field present bit This bit was added to DP Training Aux RD interval with DP 1.3. Via descriptiion of the spec this field indicates the panels true capabilities are described in DPCD address space 02200h through 022FFh. v2: version comment update v3: version comment correction, commit message update v4: white space correction Signed-off-by: Matt Atwood Reviewed-by: Manasi Navare [manasi: fixup whitespace per Rodrigo's comment] Signed-off-by: Manasi Navare Link: https://patchwork.freedesktop.org/patch/msgid/20180723212735.23893-1-matthew.s.atwood@intel.com commit 638e9af16b95f6fe0141821d06360039c53ba84d Author: Sean Paul Date: Mon Aug 13 17:30:45 2018 -0400 drm/bridge: ti-sn65dsi86: Poll for training complete Instead of just waiting 20ms for training to complete, actually poll the status to ensure training is finished. Changes in v3: - Added to the set Cc: Sandeep Panda Reviewed-by: Sandeep Panda Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20180813213058.184821-7-sean@poorly.run commit fc52d0ed11188cae53912a13b44c1a77f058ae26 Author: Sean Paul Date: Mon Aug 13 17:30:44 2018 -0400 drm/bridge: ti-sn65dsi86: Poll for DP PLL Lock Instead of just waiting and hoping, actually poll for the pll lock to be acquired. As a bonus, this should be significantly faster than the sleep. Changes in v3: - Added to the set Cc: Sandeep Panda Reviewed-by: Sandeep Panda Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20180813213058.184821-6-sean@poorly.run commit 73c89ead71859af7f439ac983e9e6f610448d44e Author: Sean Paul Date: Mon Aug 13 17:30:43 2018 -0400 drm/bridge: ti-sn65dsi86: Move panel_prepare() to pre_enable() prepare() is the old-timey way to say pre_enable(). It should be called before modeset. This fixes an issue where the panel on cheza must have the regulator always-on/boot-on for it to work. Changes in v3: - Added to the set Cc: Sandeep Panda Reviewed-by: Sandeep Panda Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20180813213058.184821-5-sean@poorly.run commit b814ec6d453577727e4911331c4e182d80e9ad18 Author: Sean Paul Date: Mon Aug 13 17:30:42 2018 -0400 drm/bridge: ti-sn65dsi86: Implement AUX channel This was hand-rolled in the first version, and will surely be useful as we expand the driver to support more varied use cases. Changes in v2: - Change subject prefix s/panel/bridge/ - Downgrade warning in poll function to error message - Fix DP_EDP_CONFIGURATION_SET write value (Sandeep) - Mask upper 8 bits of msg->address (Sandeep) - Check aux cmd status for errors after completing the send (Sandeep) - Remove length check since it's covered in the aux status - Flip the READ check in transfer to WRITE check + early exit Changes in v3: - Added to the set - Wrapped (x) in WDATA/RDATA #defines - Replace readx_poll* with regmap_read_poll* Cc: Sandeep Panda Reviewed-by: Sandeep Panda Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20180813213058.184821-4-sean@poorly.run commit 6c76c0eb031f0a590c03da7381c0251ca783c585 Author: Sean Paul Date: Mon Aug 13 17:30:41 2018 -0400 drm/bridge: ti-sn65dsi86: Fixup register names Order registers by offset and rename bits & masks to match the datasheet. This makes the driver a bit easier to grok and cross-reference with the datasheet. Changes in v3: - Added to the set Cc: Sandeep Panda Reviewed-by: Sandeep Panda Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20180813213058.184821-3-sean@poorly.run commit 08ea70a417baa1c0e5faa580070cd2ffd04e6285 Author: Chris Wilson Date: Sun Aug 12 23:36:31 2018 +0100 drm/i915: Disable runtime-pm using lowlevel functions if !HAS_RC6 If we cannot setup rc6, we cannot let the GPU suspend itself as it cannot save its state (to a powercontext). As such, we must disable runtime-pm, but we should do so using the low-level pm-runtime function which leaves our own debugging functions intact (and continue to detect errors in our runtime-pm handling should we ever be able to enable rc6). Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20180812223642.24865-3-chris@chris-wilson.co.uk commit dc5977da99ea28094b8fa4e9bacbd29bedc41de5 Author: Jani Nikula Date: Tue Aug 14 09:00:01 2018 +0300 drm/i915: set DP Main Stream Attribute for color range on DDI platforms Since Haswell we have no color range indication either in the pipe or port registers for DP. Instead, there's a separate register for setting the DP Main Stream Attributes (MSA) directly. The MSA register definition makes no references to colorimetry, just a vague reference to the DP spec. The connection to the color range was lost. Apparently we've failed to set the proper MSA bit for limited, or CEA, range ever since the first DDI platforms. We've started setting other MSA parameters since commit dae847991a43 ("drm/i915: add intel_ddi_set_pipe_settings"). Without the crucial bit of information, the DP sink has no way of knowing the source is actually transmitting limited range RGB, leading to "washed out" colors. With the colorimetry information, compliant sinks should be able to handle the limited range properly. Native (i.e. non-LSPCON) HDMI was not affected because we do pass the color range via AVI infoframes. Though not the root cause, the problem was made worse for DDI platforms with commit 55bc60db5988 ("drm/i915: Add "Automatic" mode for the "Broadcast RGB" property"), which selects limited range RGB automatically based on the mode, as per the DP, HDMI and CEA specs. After all these years, the fix boils down to flipping one bit. [Per testing reports, this fixes DP sinks, but not the LSPCON. My educated guess is that the LSPCON fails to turn the CEA range MSA into AVI infoframes for HDMI.] Reported-by: Michał Kopeć Reported-by: N. W. Reported-by: Nicholas Stommel Reported-by: Tom Yan Tested-by: Nicholas Stommel References: https://bugs.freedesktop.org/show_bug.cgi?id=100023 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107476 Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=94921 Cc: Paulo Zanoni Cc: Rodrigo Vivi Cc: Ville Syrjälä Cc: # v3.9+ Reviewed-by: Rodrigo Vivi Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20180814060001.18224-1-jani.nikula@intel.com commit d6fee0dee09317d5e83e9b855316cb779dd679cf Author: Chris Wilson Date: Tue Aug 14 11:40:56 2018 +0100 drm/i915: Kick waiters on resetting legacy rings This reapplies commit 39f3be162c46 ("drm/i915: Kick waiters on resetting legacy rings") after the improved gem_eio was run across all machines we found that gen3 and early gen4 still lost the immediate interrupt following reset, and the HWSTAM w/a applied to gen6+ is inadequate. Unlike the later gen, on gen3/4 the principle (and only tests to fail so far) are the wait vs reset test cases, whereas the reset stress case works fine (which was the predominantly failing case for gen6+). That is enough to suggest the underlying issue is sufficiently different to support the difference in HWSTAM efficacy. Testcase: igt/gem_eio/wait-10ms References: 39f3be162c46 ("drm/i915: Kick waiters on resetting legacy rings") References: a69ab52b0358 ("drm/i915: Remove extra waiter kick on legacy resets") Signed-off-by: Chris Wilson Cc: Matthew Auld Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20180814104056.27001-1-chris@chris-wilson.co.uk commit 61e1e376bb25095f741d3949e51eb557cc432dc2 Author: Chris Wilson Date: Sun Aug 12 23:36:30 2018 +0100 drm/i915: Restrict gen6_reset_rps_interrupts to gen6+ Do not call gen6_reset_rps_interrupts() when we know the registers do not exist. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20180812223642.24865-2-chris@chris-wilson.co.uk commit 30b710840e4b9c9699d3d4b33fb19ad8880d4614 Author: Chris Wilson Date: Sun Aug 12 23:36:29 2018 +0100 drm/i915: Cleanup gt powerstate from gem Since the gt powerstate is allocated by i915_gem_init, clean it from i915_gem_fini for symmetry and to correct the imbalance on error. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20180812223642.24865-1-chris@chris-wilson.co.uk commit f4e60c5cfbf217cc9faa3aeb63742860154fcfef Author: Mika Kuoppala Date: Mon Aug 13 16:01:16 2018 +0300 drm/i915: Force reset on unready engine If engine reports that it is not ready for reset, we give up. Evidence shows that forcing a per engine reset on an engine which is not reporting to be ready for reset, can bring it back into a working order. There is risk that we corrupt the context image currently executing on that engine. But that is a risk worth taking as if we unblock the engine, we prevent a whole device wedging in a case of full gpu reset. Reset individual engine even if it reports that it is not prepared for reset, but only if we aim for full gpu reset and not on first reset attempt. v2: force reset only on later attempts, readability (Chris) v3: simplify with adequate caffeine levels (Chris) v4: comment about risks and migitations (Chris) Cc: Chris Wilson Signed-off-by: Mika Kuoppala Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20180813130116.7250-1-mika.kuoppala@linux.intel.com commit e02e65001e7b436f3590ec6acff259ec54689df5 Author: Mika Kuoppala Date: Fri Aug 10 17:00:35 2018 +0300 drm/i915: Expose retry count to per gen reset logic There is a possibility for per gen reset logic to be more nasty if the softer approach on resetting does not bear fruit. Expose retry count to per gen reset logic if it wants to take such tough measures. Cc: Chris Wilson Signed-off-by: Mika Kuoppala Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20180810140036.24240-1-mika.kuoppala@linux.intel.com commit 41db645a33e775855aeeec1a437d5c1e24ff6c88 Author: Chris Wilson Date: Thu Jul 12 12:57:29 2018 +0100 drm/i915: Bump priority of clean up work We require that we keep the list of outstanding work short so that we do not "leak" memory while pageflipping under stress. However that system stress may delay kernel workers virtually indefinitely, which incurs the pageflips stall and eventually hit a timeout waiting for the cleanup. Try to combat CPU starvation of our short-lived cleanup workers by switching to a high priority workqueue. Testcase: igt/kms_cursor_legacy/all-pipes-torture-move References: https://bugs.freedesktop.org/show_bug.cgi?id=107122 Signed-off-by: Chris Wilson Cc: Daniel Vetter Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20180712115729.3506-1-chris@chris-wilson.co.uk commit ea24a6221c8d596aba6f87c157feccf111f06fae Author: Mahesh Kumar Date: Wed Aug 8 20:56:30 2018 +0530 drm/rcar-du/crc: Implement get_crc_sources callback This patch implements get_crc_sources callback, which returns list of all the crc sources supported by driver in current platform. Changes Since V1: - move sources list per-crtc - init sources-list only for gen3 Changes Since V2: - Adopt to driver style - Address other review comments from Laurent Pinchart Changes Since V3/4/5: (Laurent Pinchart review) - s/rcar_du_crtc_crc_sources_list_init/rcar_du_crtc_crc_init - s/rcar_du_crtc_crc_sources_list_uninit/rcar_du_crtc_crc_cleanup - other cleanup Signed-off-by: Mahesh Kumar Cc: dri-devel@lists.freedesktop.org Cc: Laurent Pinchart Reviewed-by: Laurent Pinchart Signed-off-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20180808152630.6563-1-mahesh1.kumar@intel.com commit 260bc55116c58756aabf5e9beab4370297fb6369 Author: Mahesh Kumar Date: Fri Jul 13 19:29:39 2018 +0530 drm/i915/crc: implement get_crc_sources callback This patch implements get_crc_sources callback, which returns list of all the valid crc sources supported by driver in current platform. Changes since V1: - Return array of crc sources Signed-off-by: Mahesh Kumar Cc: dri-devel@lists.freedesktop.org Reviewed-by: Maarten Lankhorst Signed-off-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20180713135942.25061-8-mahesh1.kumar@intel.com commit a8c20833c6bf1246e05c9f13130b295960348555 Author: Mahesh Kumar Date: Fri Jul 13 19:29:38 2018 +0530 drm/i915/crc: implement verify_crc_source callback This patch implements verify_crc_source callback function introduced earlier in this series. Signed-off-by: Mahesh Kumar Cc: dri-devel@lists.freedesktop.org Reviewed-by: Maarten Lankhorst Signed-off-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20180713135942.25061-7-mahesh1.kumar@intel.com commit 3a3cd0d92a0bbec9afed252f8685ba534b2ddf6e Author: Mahesh Kumar Date: Mon Jul 23 16:08:24 2018 +0530 drm/rcar-du/crc: Implement verify_crc_source callback This patch implements "verify_crc_source" callback function for rcar drm driver. Changes Since V1: - avoid duplication of code Changes Since V2: - further optimize the code Changes Since V3: - Adopt to driver style - Address review comments from Laurent Pinchart Signed-off-by: Mahesh Kumar Cc: dri-devel@lists.freedesktop.org Cc: Laurent Pinchart Reviewed-by: Maarten Lankhorst Reviewed-by: Laurent Pinchart Signed-off-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20180723103824.21734-1-mahesh1.kumar@intel.com commit 3b3b8448ebd1e54927bf7a77be9d6eac11441bfd Author: Mahesh Kumar Date: Fri Jul 13 19:29:36 2018 +0530 drm/amdgpu_dm/crc: Implement verify_crc_source callback This patch implements "verify_crc_source" callback function for AMD drm driver. Signed-off-by: Mahesh Kumar Cc: dri-devel@lists.freedesktop.org Reviewed-by: Maarten Lankhorst Acked-by: Leo Li Signed-off-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20180713135942.25061-5-mahesh1.kumar@intel.com commit b8d913c0ee00833f9011d2d8381510cb682dfa6e Author: Mahesh Kumar Date: Fri Jul 13 19:29:35 2018 +0530 drm/rockchip/crc: Implement verify_crc_source callback This patch implements "verify_crc_source" callback function for rockchip drm driver. Changes since V1: - simplify the verification (Jani N) Signed-off-by: Mahesh Kumar Cc: dri-devel@lists.freedesktop.org Reviewed-by: Maarten Lankhorst Acked-by: Heiko Stuebner Signed-off-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20180713135942.25061-4-mahesh1.kumar@intel.com commit 4396551e9cf3e7233d45a2ce92f73e085bcad4b2 Author: Mahesh Kumar Date: Fri Jul 13 19:29:34 2018 +0530 drm: crc: Introduce get_crc_sources callback This patch introduce a callback function "get_crc_sources" which will be called during read of control node. It is an optional callback function and if driver implements this callback, driver should return a constant pointer to an array of crc sources list and update count according to the number of source in the list. Changes Since V1: (Daniel) - return const pointer to an array of crc sources list - do validation of sources in CRC-core Changes Since V2: - update commit message - update callback documentation - print one source name per line Signed-off-by: Mahesh Kumar Cc: dri-devel@lists.freedesktop.org Cc: Laurent Pinchart Reviewed-by: Maarten Lankhorst Reviewed-by: Laurent Pinchart Signed-off-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20180713135942.25061-3-mahesh1.kumar@intel.com commit d5cc15a0c66e207d5a7f1b92f32899cc8f380468 Author: Mahesh Kumar Date: Fri Jul 13 19:29:33 2018 +0530 drm: crc: Introduce verify_crc_source callback This patch adds a new callback function "verify_crc_source" which will be used during setting the crc source in control node. This will help in avoiding setting of wrong string for source. Changes since V1: - do not yet verify_crc_source during open. Changes since V1: - improve callback description Signed-off-by: Mahesh Kumar Cc: dri-devel@lists.freedesktop.org Cc: Laurent Pinchart Reviewed-by: Maarten Lankhorst Reviewed-by: Laurent Pinchart Signed-off-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20180713135942.25061-2-mahesh1.kumar@intel.com commit ee435831ec83344dba5ccddd4ffcc6ca95d1cf77 Author: Paulo Zanoni Date: Thu Aug 9 16:58:52 2018 -0700 drm/i915/icl: account for context save/restore removed bits The RS_CTX_ENABLE and CTX_SAVE_INHIBIT bits are not present on ICL anymore, but we still try to set them and then check them with GEM_BUG_ON, resulting in a BUG() call. The bug can be reproduced by igt/drv_selftest/live_hangcheck/others-priority and our CI was able to catch it. It is worth noticing that commit 05f0addd9b10 ("drm/i915/icl: Enhanced execution list support") already tried to avoid the save bits on ICL, but only inside populate_lr_context(). Cc: Chris Wilson Cc: Mika Kuoppala Testcase: igt/drv_selftest/live_hangcheck/others-priority Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107399 References: 05f0addd9b10 ("drm/i915/icl: Enhanced execution list support") Signed-off-by: Paulo Zanoni Link: https://patchwork.freedesktop.org/patch/msgid/20180809235852.24516-1-paulo.r.zanoni@intel.com Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson commit 2ac45bdd92e0289ee2d1310f1e07b719c037c6b7 Author: Maarten Lankhorst Date: Wed Aug 8 16:19:11 2018 +0200 drm/i915/psr: Add debugfs support to force a downgrade to PSR1 mode. This will make it easier to test PSR1 on PSR2 capable eDP machines. Changes since v1: - Remove I915_PSR_DEBUG_FORCE_PSR2, it did nothing, not sure forcing PSR2 would even work. - Handle NULL crtc in intel_psr_set_debugfs_mode. (dhnkrn) Signed-off-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20180808141911.7647-2-maarten.lankhorst@linux.intel.com Reviewed-by: Dhinakaran Pandiyan commit c44301fce614644bbd608347881bf1aab940b436 Author: Maarten Lankhorst Date: Thu Aug 9 16:21:01 2018 +0200 drm/i915: Allow control of PSR at runtime through debugfs, v6 Currently tests modify i915.enable_psr and then do a modeset cycle to change PSR. We can write a value to i915_edp_psr_debug to force a certain PSR mode without a modeset. To retain compatibility with older userspace, we also still allow the override through the module parameter, and add some tracking to check whether a debugfs mode is specified. Changes since v1: - Rename dev_priv->psr.enabled to .dp, and .hw_configured to .enabled. - Fix i915_psr_debugfs_mode to match the writes to debugfs. - Rename __i915_edp_psr_write to intel_psr_set_debugfs_mode, simplify it and move it to intel_psr.c. This keeps all internals in intel_psr.c - Perform an interruptible wait for hw completion outside of the psr lock, instead of being forced to trywait and return -EBUSY. Changes since v2: - Rebase on top of intel_psr changes. Changes since v3: - Assign psr.dp during init. (dhnkrn) - Add prepared bool, which should be used instead of relying on psr.dp. (dhnkrn) - Fix -EDEADLK handling in debugfs. (dhnkrn) - Clean up waiting for idle in intel_psr_set_debugfs_mode. - Print PSR mode when trying to enable PSR. (dhnkrn) - Move changing psr debug setting to i915_edp_psr_debug_set. (dhnkrn) Changes since v4: - Return error in _set() function. - Change flag values to make them easier to remember. (dhnkrn) - Only assign psr.dp once. (dhnkrn) - Only set crtc_state->has_psr on the crtc with psr.dp. - Fix typo. (dhnkrn) Changes since v5: - Only wait for PSR idle on the PSR connector correctly. (dhnkrn) - Reinstate WARN_ON(drrs.dp) in intel_psr_enable. (dhnkrn) - Remove stray comment. (dhnkrn) - Be silent in intel_psr_compute_config on wrong connector. (dhnkrn) Signed-off-by: Maarten Lankhorst Cc: Rodrigo Vivi Cc: Dhinakaran Pandiyan Link: https://patchwork.freedesktop.org/patch/msgid/20180809142101.26155-1-maarten.lankhorst@linux.intel.com Reviewed-by: Dhinakaran Pandiyan commit eec97cd3677d92a01218b771f35436ea6141e933 Author: Thomas Zimmermann Date: Mon Jul 16 09:49:40 2018 +0200 drm/virtio: 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 Link: http://patchwork.freedesktop.org/patch/msgid/20180716074940.8691-1-tzimmermann@suse.de Signed-off-by: Gerd Hoffmann commit 66e0c8a5bcfd292606a70268376b44b468c316e8 Author: Anton Vasilyev Date: Fri Jul 27 18:30:58 2018 +0300 drm: qxl: Fix NULL pointer dereference at qxl_alloc_client_monitors_config If qxl_alloc_client_monitors_config() fails to allocate client_monitors_config then NULL pointer dereference occurs in function qxl_display_copy_rom_client_monitors_config() after qxl_alloc_client_monitors_config() call. The patch adds return error from qxl_alloc_client_monitors_config() and additional status for qxl_display_copy_rom_client_monitors_config return value. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Anton Vasilyev Link: http://patchwork.freedesktop.org/patch/msgid/20180727153058.23620-1-vasilyev@ispras.ru Signed-off-by: Gerd Hoffmann commit 5043348a4969ae1661c008efe929abd0d76e3792 Author: Anton Vasilyev Date: Fri Jul 27 14:54:40 2018 +0300 drm: qxl: Fix error handling at qxl_device_init If qxl_device_init fails on creating resources and does not report it, then qxl module will catch null pointer exception on remove, or on probe's error path. The patch adds error path with resources release into qxl_device_init. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Anton Vasilyev Link: http://patchwork.freedesktop.org/patch/msgid/20180727115440.11112-1-vasilyev@ispras.ru Signed-off-by: Gerd Hoffmann commit b0d146ac7b9a9f1e1303aca9e1e828348f5d8a2f Author: Thomas Zimmermann Date: Fri Jul 13 14:03:18 2018 +0200 drm/qxl: 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 Link: http://patchwork.freedesktop.org/patch/msgid/20180713120318.32195-1-tzimmermann@suse.de Signed-off-by: Gerd Hoffmann commit 550f17441f5396732dee20ae69a903f29087ba1d Author: Gerd Hoffmann Date: Wed Aug 8 13:13:11 2018 +0200 drm/cirrus: flip default from 24bpp to 16bpp The problem with 24bpp is that it is a rather unusual depth these days, cirrus is pretty much the only relevant device still using that, and it is a endless source of issues. Wayland doesn't support it at all. Bugs in Xorg keep showing up. Typically either 32bpp or 16bpp are used. Using 32bpp would limit the resolution to 800x600 due to hardware constrains. So lets go with 16bpp. Also use the default depth for the framebuffer console and mode_info->preferred_depth. Signed-off-by: Gerd Hoffmann Reviewed-by: Adam Jackson Link: http://patchwork.freedesktop.org/patch/msgid/20180808111311.30311-1-kraxel@redhat.com commit abf7b30d7f61d981bfcca65d1e8331b27021b475 Author: Thomas Zimmermann Date: Fri Jul 20 13:27:43 2018 +0200 drm/cirrus: Use drm_framebuffer_put to avoid kernel oops in clean-up In the Cirrus driver, the regular clean-up code also performs the clean-up of a failed initialization. If the fbdev's framebuffer was not initialized, the clean-up will fail within drm_framebuffer_unregister_private. Booting with cirrus.bpp=16 triggers this bug. The framebuffer is currently stored directly within struct cirrus_fbdev. To fix the bug, we turn it into a pointer that is only set for initialized framebuffers. The fbdev's clean-up code skips uninitialized framebuffers. The memory for struct drm_framebuffer is allocated dynamically. This requires additional error handling within cirrusfb_create. The framebuffer clean-up is now performed by drm_framebuffer_put, which also frees the data strcuture's memory. Link: https://bugzilla.suse.com/show_bug.cgi?id=1101822 Signed-off-by: Thomas Zimmermann Link: http://patchwork.freedesktop.org/patch/msgid/20180720112743.27159-1-tzimmermann@suse.de Signed-off-by: Gerd Hoffmann commit f82aab2d521e4c1d4f9f98450b4a9a8abeaff1c4 Author: Chris Wilson Date: Tue Aug 7 19:36:47 2018 +0100 dma-buf: Remove requirement for ops->map() from dma_buf_export Since commit 9ea0dfbf972 ("dma-buf: make map_atomic and map function pointers optional"), the core provides the no-op functions when map and map_atomic are not provided, so we no longer need assert that are supplied by a dma-buf exporter. Fixes: 09ea0dfbf972 ("dma-buf: make map_atomic and map function pointers optional") Signed-off-by: Chris Wilson Reviewed-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20180807183647.22626-1-chris@chris-wilson.co.uk Cc: Daniel Vetter Cc: Gerd Hoffmann Cc: Sumit Semwal Signed-off-by: Gerd Hoffmann commit 7b5ee80a5da3ea44c5abff48e3621135ae9d8177 Author: Chris Wilson Date: Thu Aug 9 07:34:49 2018 +0100 drm/i915/selftests: Hold rpm for unparking The call to i915_gem_unpark() checks that we hold a rpm wakeref before taking a long term wakeref for i915->gt.awake. We should therefore make sure we do hold the wakeref when directly calling unpark to disable the retire worker. Fixes: 932cac10c8fb ("drm/i915/selftests: Prevent background reaping of active objects") Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Matthew Auld Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20180809063449.4474-1-chris@chris-wilson.co.uk commit d60996ab430c8a6033a0944c068edc5ec5becb9b Author: Chris Wilson Date: Wed Aug 8 22:08:42 2018 +0100 drm/i915: Restore user forcewake domains across suspend On suspend, we cancel the automatic forcewake and clear all other sources of forcewake so the machine can sleep before we do suspend. However, we expose the forcewake to userspace (only via debugfs, but nevertheless we do) and want to restore that upon resume or else our accounting will be off and we may not acquire the forcewake before we use it. So record which domains we cleared on suspend and reacquire them early on resume. v2: Hold the spinlock to appease our sanitychecks v3: s/fw_domains_user/fw_domains_saved/ to convey intent more clearly Reported-by: Imre Deak Fixes: b8473050805f ("drm/i915: Fix forcewake active domain tracking") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Mika Kuoppala Cc: Imre Deak Reviewed-by: Imre Deak Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20180808210842.3555-1-chris@chris-wilson.co.uk commit 75ff9f3c9a9827bb917603657568bf46a2355e1a Author: Thomas Zimmermann Date: Mon Jul 16 09:46:24 2018 +0200 drm/vgem: 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: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20180716074624.7931-1-tzimmermann@suse.de commit d0e062ebb3a44b56a7e672da568334c76f763552 Author: Rodrigo Vivi Date: Fri Aug 3 16:27:21 2018 -0700 drm/i915/cfl: Add a new CFL PCI ID. One more CFL ID added to spec. Cc: José Roberto de Souza Signed-off-by: Rodrigo Vivi Reviewed-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20180803232721.20038-1-rodrigo.vivi@intel.com commit e81eb98e3fa8bfd558f134d9d9862eefbd5e6663 Author: Alexandru Gheorghe Date: Sat Aug 4 17:15:30 2018 +0100 drm/vmwgfx: Use __drm_atomic_helper_plane_reset instead of copying the logic A new helper function(__drm_atomic_helper_plane_reset) has been added for linking a plane with its state and resetting the core properties(alpha, rotation, etc.) to their default values. Use that instead of duplicating the logic. Reviewed-by: Sinclair Yeh Reviewed-by: Deepak Rawat Signed-off-by: Alexandru Gheorghe Acked-by: Sinclair Yeh Link: https://patchwork.freedesktop.org/patch/msgid/20180804161530.12275-11-alexandru-cosmin.gheorghe@arm.com commit 42da633809c1d76078c313a5bd35a9cb93a6f447 Author: Alexandru Gheorghe Date: Sat Aug 4 17:15:29 2018 +0100 drm/vc4: Use __drm_atomic_helper_plane_reset instead of copying the logic A new helper function(__drm_atomic_helper_plane_reset) has been added for linking a plane with its state and resetting the core properties(alpha, rotation, etc.) to their default values. Use that instead of duplicating the logic. __drm_atomic_helper_plane_reset initializes the alpha property to its max value, which is defined by the drm core as DRM_BLEND_ALPHA_OPAQUE, so nothing changes regarding the alpha value. Signed-off-by: Alexandru Gheorghe Acked-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/20180804161530.12275-10-alexandru-cosmin.gheorghe@arm.com commit a69ab52b0358d630bfa31183a45903263b46eaf2 Author: Chris Wilson Date: Wed Aug 8 11:51:01 2018 +0100 drm/i915: Remove extra waiter kick on legacy resets Now with a more efficacious workaround for the lost interrupts after reset, we can remove the hack of kicking the waiters after reset. The issue was that the kick only worked for the immediate window after the reset (those seqno that would complete in the time it took for the waiter thread to perform its check) but miss any seqno that lacked an interrupt afterwards. References: 39f3be162c46 ("drm/i915: Kick waiters on resetting legacy rings") Signed-off-by: Chris Wilson Cc: Matthew Auld Cc: Ville Syrjälä Acked-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20180808105101.913-3-chris@chris-wilson.co.uk commit a4a717010f4e8cacaa3f0cae8a22f25c39ae1d41 Author: Chris Wilson Date: Wed Aug 8 11:51:00 2018 +0100 drm/i915: Unmask user interrupts writes into HWSP on snb/ivb/vlv/hsw An oddity occurs on Sandybridge, Ivybridge and Haswell (and presumably Valleyview) in that for the period following the GPU restart after a reset, there are no GT interrupts received. From Ville's notes, bit 0 in the HWSTAM corresponds to the render interrupt, and if we unmask it we do see immediate resumption of GT interrupt delivery (via the master irq handler) after the reset. v2: Limit the w/a to the render interrupt from rcs Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107500 Fixes: c5498089463b ("drm/i915: Mask everything in ring HWSTAM on gen6+ in ringbuffer mode") References: d420a50c21ef ("drm/i915: Clean up the HWSTAM mess") Testcase: igt/gem_eio/reset-stress Signed-off-by: Chris Wilson Cc: Ville Syrjälä Acked-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20180808105101.913-2-chris@chris-wilson.co.uk commit c1e63f6df3d3e9e4d0da67f6c8aabdfbe592371f Author: Chris Wilson Date: Wed Aug 8 11:50:59 2018 +0100 drm/i915: Warn if we hit the timeout for wait-for-idle Hitting the timeout and finding that all engines are actually idle is indicative of an interrupt delivery problem. This problem is an issue that we need to fix, so make sure we log it and provide the GEM trace. Signed-off-by: Chris Wilson Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20180808105101.913-1-chris@chris-wilson.co.uk commit 1a260e1117a4ba5c39224fd00adcac78c84411b1 Author: Imre Deak Date: Mon Aug 6 12:58:43 2018 +0300 drm/i915/icl: Add missing power gate enums On ICL there are 5 fused power gates, so add the two missing ones for clarity. Cc: Ville Syrjala Cc: Paulo Zanoni Cc: Jani Nikula Signed-off-by: Imre Deak Reviewed-by: Paulo Zanoni Link: https://patchwork.freedesktop.org/patch/msgid/20180806095843.13294-11-imre.deak@intel.com commit d9fcdc8d1f8e7b12111bb410abc4c27c411aa5d9 Author: Imre Deak Date: Mon Aug 6 12:58:42 2018 +0300 drm/i915: Use existing power well IDs where possible There is no need for separate IDs for power wells on a new platform with the same functionality as an other power well on a previous platform, we can just reuse the ID from the previous platform. This is only possible after the previous patches where we removed dependence on the actual enum values. This also fixes a problem on ICL where in assert_can_enable_dc5/9() we would've failed to look up the PW#2 power well. v2: - Keep an ID assigned for the ICL PW#2 power well too. (Paulo) Cc: Ville Syrjala Cc: Paulo Zanoni Cc: Jani Nikula Signed-off-by: Imre Deak [Added comment about the ICL PW#2 fix to the commit log] Reviewed-by: Paulo Zanoni Link: https://patchwork.freedesktop.org/patch/msgid/20180806095843.13294-10-imre.deak@intel.com commit 2183b49933fce40eaf406e0ccfb57a3d4c50d9b8 Author: Imre Deak Date: Mon Aug 6 12:58:41 2018 +0300 drm/i915: Make power well ID names more uniform The format for the ID names is _DISP_PW_* so rename the IDs not following this accordingly. Leave BXT_DPIO_CMN_BC as-is since we'll change that to use another existing ID in the next patch. v2: - Fix line over 80 chars checkpatch warning. Cc: Ville Syrjala Cc: Paulo Zanoni Cc: Jani Nikula Signed-off-by: Imre Deak Reviewed-by: Paulo Zanoni Link: https://patchwork.freedesktop.org/patch/msgid/20180806095843.13294-9-imre.deak@intel.com commit 4739a9d2438bbc89e9aeea33b43680aeae2882e9 Author: Imre Deak Date: Mon Aug 6 12:58:40 2018 +0300 drm/i915: Remove redundant power well IDs Now that we removed dependence on the power well IDs to determine the control register and request/status flag offsets the only purpose of power well IDs is to look up power wells directly bypassing the power domains framework. However this direct lookup isn't needed for most of the exisiting power wells and hopefully won't be needed for any new power wells in the future. To make maintenance of the power well ID enum easier, don't require a unique ID for each power well, only if it's necessary. Remove the IDs becoming redundant this way and assign to all the corresponding power wells a new DISP_PW_ID_NONE ID. After the previous two patches the IDs don't need to have a fixed value, so remove the explicit initializers and adjust the enum's code comment accordingly. v2: - Keep required ID assignments for HSW_DISP_PW_GLOBAL and ICL_DISP_PW_2. (Paulo) Cc: Ville Syrjala Cc: Paulo Zanoni Cc: Jani Nikula Signed-off-by: Imre Deak Reviewed-by: Paulo Zanoni Link: https://patchwork.freedesktop.org/patch/msgid/20180806095843.13294-8-imre.deak@intel.com commit 75e39688f350f63dc916c1b9d01c973a3a7bf5c8 Author: Imre Deak Date: Mon Aug 6 12:58:39 2018 +0300 drm/i915/ddi: Use power well CTL IDX instead of ID Similarly to the previous patch use a separate request/status HW flag index defined right after the corresponding control registers instead of depending for this on the power well IDs. Since the set of control/status registers varies among the different power wells (on a single platform), also add a new i915_power_well_registers struct that we populate and assign to each DDI power well as needed. Also clarify a bit the code comment describing the function and layout of the control registers. This also fixes a problem on ICL, where we incorrectly read the KVMR control register in hsw_power_well_requesters() even for DDI and AUX power wells. v2: - Clarify platform range tags in code comments. (Paulo) - Fix line over 80 chars checkpatch warning. Cc: Ville Syrjala Cc: Paulo Zanoni Cc: Jani Nikula Signed-off-by: Imre Deak Reviewed-by: Paulo Zanoni Link: https://patchwork.freedesktop.org/patch/msgid/20180806095843.13294-7-imre.deak@intel.com commit d13dd05a1f20262e32335a1f1363809185e3d2e1 Author: Imre Deak Date: Mon Aug 6 12:58:38 2018 +0300 drm/i915/vlv: Use power well CTL IDX instead of ID Atm, we determine the control/status flag offsets within the PUNIT control/status registers based on the power well's ID. Since the power well ID enum is global across all platforms, the associated macros to get the flag offsets involves some magic. This makes checking the register/bit definitions against the specification more difficult than necessary. Also the values in the power well ID enum must stay fixed, making code maintenance of the enum cumbersome. To solve the above define the control/status flag indices right after the corresponding registers and use these to derive the control/status flag values by storing the indices in the i915_power_well_desc struct. Initializing anonymous union fields require the preceding field in the struct to be explicitly initialized - even when using named initializers - and the initialization to be done right before the union initialization, hence the reordering of the .id fields. v2: - Clarify commit log message about anonymous union initializers. (Paulo) Cc: Ville Syrjala Cc: Paulo Zanoni Cc: Jani Nikula Signed-off-by: Imre Deak Reviewed-by: Paulo Zanoni Link: https://patchwork.freedesktop.org/patch/msgid/20180806095843.13294-6-imre.deak@intel.com commit f28ec6f4ea483554aacc59e8eb4a7667ecaf58ad Author: Imre Deak Date: Mon Aug 6 12:58:37 2018 +0300 drm/i915: Constify power well descriptors It makes sense to keep unchanging data const. Extract such fields from the i915_power_well struct into a new i915_power_well_desc struct that we initialize during compile time. For the rest of the dynamic fields allocate an array of i915_power_well objects in i915 dev_priv, and link to each of these objects their corresponding i915_power_well_desc object. v2: - Fix checkpatch warnings about missing param name in fn declaration and lines over 80 chars. (Paulo) - Move check for unique IDs to __set_power_wells(). Cc: Ville Syrjala Cc: Paulo Zanoni Cc: Jani Nikula Signed-off-by: Imre Deak [Fixed checkpatch warn in __set_power_wells()] Reviewed-by: Paulo Zanoni Link: https://patchwork.freedesktop.org/patch/msgid/20180806095843.13294-5-imre.deak@intel.com commit 3ae27f7e103d95a820061fa692d0fe53303ccf98 Author: Imre Deak Date: Mon Aug 6 12:58:36 2018 +0300 drm/i915/vlv: Remove redundant power well ID asserts The callbacks these asserts are called from are used from a single power well, so not much point in checking that. The check also requires a unique power well ID that we would need to keep around only for this purpose. (A follow-up patch removes power well IDs not needed for direct power well access). Cc: Ville Syrjala Cc: Paulo Zanoni Cc: Jani Nikula Signed-off-by: Imre Deak Reviewed-by: Paulo Zanoni Link: https://patchwork.freedesktop.org/patch/msgid/20180806095843.13294-4-imre.deak@intel.com commit 48a287ed9d624d8eae65e2dd1b12915b2b853644 Author: Imre Deak Date: Mon Aug 6 12:58:35 2018 +0300 drm/i915: Rename intel_power_domains_fini() to intel_power_domains_fini_hw() intel_power_domains_fini() rolls back what was done in intel_power_domains_init_hw(), so rename and move it accordingly. This allows us adding a cleanup function later for intel_power_domains_init() in a cleaner way. No functional change. v2: - Fix checkpatch error adding missing param name to function declaration. (Paulo) Cc: Ville Syrjala Cc: Paulo Zanoni Cc: Jani Nikula Signed-off-by: Imre Deak Reviewed-by: Rodrigo Vivi Reviewed-by: Paulo Zanoni Link: https://patchwork.freedesktop.org/patch/msgid/20180806095843.13294-3-imre.deak@intel.com commit ae9b06ca067d5c22286c7290553c4b290607a042 Author: Imre Deak Date: Mon Aug 6 12:58:34 2018 +0300 drm/i915/icl: Fix power well anonymous union initializers Similarly to commit 0a445945be6d ("drm/i915: Work around GCC anonymous union initialization bug") we need to initialize anonymous unions inside extra braces to work around a GCC4.4 build error. v2: - Fix checkpatch errors in commit log. (Paulo) Cc: Chris Wilson Cc: Ville Syrjala Cc: Paulo Zanoni Cc: Jani Nikula Signed-off-by: Imre Deak Reviewed-by: Rodrigo Vivi Reviewed-by: Paulo Zanoni Link: https://patchwork.freedesktop.org/patch/msgid/20180806095843.13294-2-imre.deak@intel.com commit e750218d26c3648698bfe9e2858012443f08c734 Author: Stefan Agner Date: Tue Aug 7 22:11:43 2018 +0200 drm/doc: clarify how to acquire required vblank event reference As a driver write it is not entirely obvious that a reference to the event e mentioned in the doc can be obtained via drm_crtc_vblank_get(). Clarify how to obtain the reference. Signed-off-by: Stefan Agner Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20180807201143.7446-1-stefan@agner.ch commit 31e63d31eaf066651efac299913591b04c5aaa18 Author: Haneen Mohammed Date: Wed Aug 1 12:08:07 2018 +0300 drm/vkms: Fix vmap_count increment position Move vmap_count out of the conditional statement since it needs to be updated for every successful call to vkms_gem_vmap. Signed-off-by: Haneen Mohammed Fixes: bb112b14af8d ("drm/vkms: Add functions to map/unmap GEM backing storage") Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20180801090807.GA4611@haneenDRM commit e61e0f07ef0d0b9312269582542f6627bc35c799 Author: Souptick Joarder Date: Tue Jul 3 21:03:53 2018 +0530 gpu: drm: virtio: code cleanup The fault handler code is commented since v4.2. If there is no plan to enable the fault handler code in future, we can remove this dead code. Signed-off-by: Souptick Joarder Link: http://patchwork.freedesktop.org/patch/msgid/20180703153353.GA3375@jordon-HP-15-Notebook-PC Signed-off-by: Gerd Hoffmann commit 4354d64ea90c4caf6f14522f5bf357e4e4857886 Author: Souptick Joarder Date: Tue Jul 31 00:53:26 2018 +0530 drm: Remove drm_fbdev_cma_set_suspend() drm_fbdev_cma_set_suspend() is not getting called from any other places. If there is no plan to use it in future we can remove this API. Signed-off-by: Souptick Joarder Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20180730192326.GA31354@jordon-HP-15-Notebook-PC commit 3ee53ae575013b5009184f5a4fa8743e234dea15 Author: Thomas Zimmermann Date: Fri Jul 13 15:46:01 2018 +0200 drm/tinydrm: 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: Noralf Trønnes Link: https://patchwork.freedesktop.org/patch/msgid/20180713134601.14391-1-tzimmermann@suse.de commit 66e31a72dc38543b2d9d1ce267dc78ba9beebcfd Author: Peter Rosin Date: Mon Aug 6 08:19:09 2018 +0200 drm/sti: do not remove the drm_bridge that was never added Removing the drm_bridge_remove call should avoid a NULL dereference during list processing in drm_bridge_remove if the error path is ever taken. The more natural approach would perhaps be to add a drm_bridge_add, but there are several other bridges that never call drm_bridge_add. Just removing the drm_bridge_remove is the easier fix. Fixes: 84601dbdea36 ("drm: sti: rework init sequence") Acked-by: Daniel Vetter Signed-off-by: Peter Rosin Signed-off-by: Benjamin Gaignard Link: https://patchwork.freedesktop.org/patch/msgid/20180806061910.29914-2-peda@axentia.se commit 97f0615800041b145b36e00df65526e0fa6927bd Author: Chris Wilson Date: Mon Aug 6 12:26:05 2018 +0100 drm/i915: Pull seqno started checks together We have a few instances of checking seqno-1 to see if the HW has started the request. Pull those together under a helper. v2: Pull the !seqno assertion higher, as given seqno==1 we may indeed check to see if we have started using seqno==0. Suggested-by: Tvrtko Ursulin Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20180806112605.20725-1-chris@chris-wilson.co.uk commit cf1f697acb04d2e06c117436cc55e52760f1ea7c Author: Mahesh Kumar Date: Wed Aug 1 20:41:13 2018 +0530 drm/i915/skl: distribute DDB based on panel resolution We distribute DDB equally among all pipes irrespective of display buffer requirement of each pipe. This leads to a situation where high resolution y-tiled display can not be enabled with 2 low resolution displays. Main contributing factor for DDB requirement is width of the display. This patch make changes to distribute ddb based on display width. So display with higher width will get bigger chunk of DDB. Changes Since V1: - pipe_size/ddb_size will not overflow u16 so use appropriate data-types during computation (Chris) Changes Since V2: - avoid redundancy and possible truncation errors (Chris) Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107113 Cc: raviraj.p.sitaram@intel.com Cc: Chris Wilson Signed-off-by: Mahesh Kumar Reviewed-by: Chris Wilson Reviewed-by: Maarten Lankhorst Signed-off-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20180801151113.5337-1-mahesh1.kumar@intel.com commit aaa023782fda76a3eacd9f3c8c14ad7382d86cf2 Author: Mahesh Kumar Date: Tue Jul 31 19:54:44 2018 +0530 drm/i915: ddb_size is of u16 type ddb_size is u16 so use same return type for intel_get_ddb_size wrapper. Signed-off-by: Mahesh Kumar Reviewed-by: Chris Wilson Reviewed-by: Maarten Lankhorst Signed-off-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20180731142445.30723-2-mahesh1.kumar@intel.com commit 69ca5af4ff9a3ff96e4595c2b7522c01a2641779 Author: Zhenyu Wang Date: Tue Jul 31 11:02:13 2018 +0800 drm/i915/gvt: Move some MMIO definitions to reg.h To consolidate all gvt private MMIO definition in one place, this moves some not yet used in i915 to reg.h. Reviewed-by: Hang Yuan Signed-off-by: Zhenyu Wang commit a752b070a67823174565322cc48b2668daf9a8da Author: Zhenyu Wang Date: Tue Jul 31 11:02:12 2018 +0800 drm/i915/gvt: Fix function comment doc errors Caught by W=1 to fix left wrong function comment doc. Reviewed-by: Hang Yuan Signed-off-by: Zhenyu Wang commit 63ef26237ba846b8898c229a85bfae1cf4fac845 Author: Zhenyu Wang Date: Tue Jul 31 11:02:11 2018 +0800 drm/i915/gvt: make dma map/unmap kvmgt functions as static Make kvmgt_dma_map/unmap_guest_page as static function. Reviewed-by: Hang Yuan Signed-off-by: Zhenyu Wang commit e6a59382924e2d007b554a2aebcd4445ebb01fef Author: Chris Wilson Date: Mon Aug 6 15:46:04 2018 +0100 drm/i915/selftests: Unconditionally do a chipset flush before emit_bb_start Experience teaches us over and over again that coherency on Baytrail requires the odd heavy hammer, and in particular clflush alone is not enough to guarrantee that writes from the CPU are picked up by the CS. Do as we do elsewhere and ensure we have an unconditional i915_gem_chipset_flush() after writing to memory and submitting a batch to HW. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107499 Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20180806144604.8346-1-chris@chris-wilson.co.uk commit a6476ebd4350d51146ef0492b4b06bc0d31e8827 Author: Chris Wilson Date: Mon Aug 6 15:56:47 2018 +0100 drm/i915: Stop dropping irq around resets A long time ago, we were afraid of handling interrupts and signaling waiters during a reset, worrying that the confusion in request handling would interfere with our attempts to process the reset in an orderly fashion. Since then, we have isolated our irq-driven request handling by virtue of the engine->timeline.lock and control of kthreads where required, eliminating the danger of concurrently processing interrupts. Signed-off-by: Chris Wilson Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20180806145647.13131-1-chris@chris-wilson.co.uk commit 08e3e21a24d23db6a4adca90f7cb40d69e09d35c Author: Lucas De Marchi Date: Fri Aug 3 16:24:43 2018 -0700 drm/i915: kill resource streamer support After disabling resource streamer on ICL (due to it actually not existing there), I got feedback that there have been some experimental patches for mesa to use RS years ago, but nothing ever landed or shipped because there was no performance improvement. This removes it from kernel keeping the uapi defines around for compatibility. v2: - re-add the inadvertent removal of CTX_CTRL_INHIBIT_SYN_CTX_SWITCH - don't bother trying to document removed params on uapi header: applications should know that from the query. (from Chris) v3: - disable CTX_CTRL_RS_CTX_ENABLE istead of removing it - reword commit message after Daniele confirmed no performance regression on his machine - reword commit message to make clear RS is being removed due to never been used v4: - move I915_EXEC_RESOURCE_STREAMER to __I915_EXEC_ILLEGAL_FLAGS so the check on ioctl() is made much earlier by i915_gem_check_execbuffer() (suggested by Tvrtko) Signed-off-by: Lucas De Marchi Acked-by: Daniele Ceraolo Spurio Reviewed-by: Tvrtko Ursulin Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20180803232443.17193-1-lucas.demarchi@intel.com commit 48928d4b5d6243296a95d60edd2dcbc8e39512b7 Author: Lucas De Marchi Date: Thu Jul 19 10:05:56 2018 -0700 drm/i915/icl: move has_resource_streamer to GEN11_FEATURES Resource streamer has been removed on GEN11 so move it to the FEATURES macro. Signed-off-by: Lucas De Marchi Reviewed-by: Daniele Ceraolo Spurio Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20180719170557.10729-1-lucas.demarchi@intel.com commit 161ad653d6c9ca2c5ef3bc4fc883689932c9ac8e Author: Alexandru Gheorghe Date: Sat Aug 4 17:15:27 2018 +0100 drm: rcar-du: Use __drm_atomic_helper_plane_reset instead of copying the logic A new helper function(__drm_atomic_helper_plane_reset) has been added for linking a plane with its state and resetting the core properties(alpha, rotation, etc.) to their default values. Use that instead of duplicating the logic. __drm_atomic_helper_plane_reset initializes the alpha property to its max value, which is defined by the drm core as DRM_BLEND_ALPHA_OPAQUE, so nothing changes regarding the alpha value. Reviewed-by: Laurent Pinchart Signed-off-by: Alexandru Gheorghe Link: https://patchwork.freedesktop.org/patch/msgid/20180804161530.12275-8-alexandru-cosmin.gheorghe@arm.com commit 60252323ec9c36392d0ae83f26a6a436bb597606 Author: Alexandru Gheorghe Date: Sat Aug 4 17:15:28 2018 +0100 drm/sun4i: Use __drm_atomic_helper_plane_reset instead of copying the logic A new helper function(__drm_atomic_helper_plane_reset) has been added for linking a plane with its state and resetting the core properties(alpha, rotation, etc.) to their default values. Use that instead of duplicating the logic. __drm_atomic_helper_plane_reset initializes the alpha property to its max value, which is defined by the drm core as DRM_BLEND_ALPHA_OPAQUE, so nothing changes regarding the alpha value. Acked-by: Maxime Ripard Signed-off-by: Alexandru Gheorghe Link: https://patchwork.freedesktop.org/patch/msgid/20180804161530.12275-9-alexandru-cosmin.gheorghe@arm.com commit 4f4762fcc426126ff680150aab7c43721536e67f Author: Alexandru Gheorghe Date: Sat Aug 4 17:15:26 2018 +0100 drm/imx: Use __drm_atomic_helper_plane_reset instead of copying the logic A new helper function(__drm_atomic_helper_plane_reset) has been added for linking a plane with its state and resetting the core properties(alpha, rotation, etc.) to their default values. Use that instead of duplicating the logic. Signed-off-by: Alexandru Gheorghe Acked-by: Philipp Zabel Link: https://patchwork.freedesktop.org/patch/msgid/20180804161530.12275-7-alexandru-cosmin.gheorghe@arm.com commit e2512172d16b135302b462e31f14b333e8501e49 Author: Alexandru Gheorghe Date: Sat Aug 4 17:15:24 2018 +0100 drm: atmel-hlcdc: Use __drm_atomic_helper_plane_reset instead of copying the logic A new helper function(__drm_atomic_helper_plane_reset) has been added for linking a plane with its state and resetting the core properties(alpha, rotation, etc.) to their default values. Use that instead of duplicating the logic. __drm_atomic_helper_plane_reset initializes the alpha property to its max value, which is defined by the drm core as DRM_BLEND_ALPHA_OPAQUE, so nothing changes regarding the alpha value. Acked-by: Boris Brezillon Signed-off-by: Alexandru Gheorghe Link: https://patchwork.freedesktop.org/patch/msgid/20180804161530.12275-5-alexandru-cosmin.gheorghe@arm.com commit ffcf4626d3fed1587e69b90026334aa26ab13278 Author: Alexandru Gheorghe Date: Sat Aug 4 17:15:23 2018 +0100 drm: mali-dp: Use __drm_atomic_helper_plane_reset instead of copying the logic A new helper function(__drm_atomic_helper_plane_reset) has been added for linking a plane with its state and resetting the core properties(alpha, rotation, etc.) to their default values. Use that instead of duplicating the logic. Reviewed-by: Ayan Kumar halder Acked-by: Liviu Dudau Signed-off-by: Alexandru Gheorghe Link: https://patchwork.freedesktop.org/patch/msgid/20180804161530.12275-4-alexandru-cosmin.gheorghe@arm.com commit 7f4de521001f4ea705d505c9f91f58d0f56a0e6d Author: Alexandru Gheorghe Date: Sat Aug 4 17:15:21 2018 +0100 drm/atomic: Add __drm_atomic_helper_plane_reset There are a lot of drivers that subclass drm_plane_state, all of them duplicate the code that links together the plane with plane_state. On top of that, drivers that enable core properties also have to duplicate the code for initializing the properties to their default values, which in all cases are the same as the defaults from core. Change since v1: - Make it consistent with the other helpers and require that both plane and state not be NULL, suggested by Boris Brezillon and Philipp Zabel. Reviewed-by: Laurent Pinchart Signed-off-by: Alexandru Gheorghe Reviewed-by: Philipp Zabel Link: https://patchwork.freedesktop.org/patch/msgid/20180804161530.12275-2-alexandru-cosmin.gheorghe@arm.com commit 2fca585502716c25c52ad4fe54207f80762bc7b4 Author: Siddartha Mohanadoss Date: Thu Aug 2 18:43:38 2018 -0700 dt-bindings: iio: adc: Add DT binding document for PMIC5 ADC PMIC5 ADC has support for clients to measure voltage and current on inputs connected to the PMIC. Clients include reading voltage phone power and on board system thermistors for thermal management. ADC5 on certain PMIC has support to read battery current. This change adds documentation. Signed-off-by: Siddartha Mohanadoss Reviewed-by: Rob Herring Signed-off-by: Jonathan Cameron commit 5e45729608dd231a771817c7af4e2be61ef3b659 Author: Colin Ian King Date: Fri Aug 3 12:55:51 2018 +0100 iio: chemical: fix spelling mistake "failted" -> "failed" fix spelling mistake in dev_err error message text Signed-off-by: Colin Ian King Reviewed-by: Himanshu Jha Signed-off-by: Jonathan Cameron commit bc0d332daef3fb9f58e34cb4d03d99f2c84b11cb Author: Haneen Mohammed Date: Fri Aug 3 23:11:42 2018 +0300 drm/vkms: Release pages_lock before return Release pages_lock before return when vkms_obj->vaddr is NULL. This patch fixes: 6c234fe37c57 ("drm/vkms: Implement CRC debugfs API"). Signed-off-by: Haneen Mohammed Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20180803201142.GA2206@haneenDRM commit c444ad790cc2b2bb6925a0b56716712a79624b4e Author: Gwan-gyeong Mun Date: Fri Aug 3 19:41:50 2018 +0300 drm/i915: Fix typo in i915_drm_resume() Trivial typo, s/loose/lose/, in i915_drm_resume. Signed-off-by: Gwan-gyeong Mun Link: https://patchwork.freedesktop.org/patch/msgid/20180803164150.8185-1-gwan-gyeong.mun@intel.com Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson commit 6c234fe37c57627a5baf96f552afa1fae2b67d4d Author: Haneen Mohammed Date: Thu Aug 2 04:10:26 2018 +0300 drm/vkms: Implement CRC debugfs API This patch implement the necessary functions to compute and add CRCs entries: - Implement the set_crc_source() callback. - Compute CRC using crc32 on the visible part of the framebuffer. - Use ordered workqueue per output to compute and add CRC at the end of a vblank. - Use appropriate synchronization methods since the CRC computation must be atomic wrt the generated vblank event for a given atomic update, by using spinlock across atomic_begin/atomic_flush to wrap the event handling code completely and match the flip event with the CRC. Since vkms_crc_work_handle() can sleep, spinlock can't be acquired while accessing vkms_output->primary_crc to compute CRC. To make sure the data is updated and released without conflict with the vkms_crc_work_handle(), the work_struct is flushed @crtc_destroy and the data is updated before scheduling the work handle again, as follow: * CRC data update: 1- store vkms_crc_data {fb, src} per plane_state 2- @plane_duplicate_state -> allocate vkms_crc_data 3- during atomic commit (@atomic_update) -> a) copy {fb, src} to plane_state->crc_data b) get reference to fb, 3- @plane_destroy_state -> a) if (fb refcount) remove reference to fb b) deallocate crc_data * Atomic Commit: 1- vkms_plane_atomic_check 2- vkms_prepare_fb -> vmap vkms_gem_obj->vaddr 3- atomic_begin -> hold crc spinlock 4- atomic_plane_update -> a) update vkms_output->primary_crc b) get reference to fb 5- atomic_flush -> a) send vblank event while holding event_lock b) release crc spinlock * hrtimer regular callback: 1- hold crc spinlock 2- drm_crtc_handle_vblank() 3- queue vkms_crc_work_handle 4- release crc spinlock * cleanup: 1- @cleanup_fb ->vunmap vkms_gem_obj->vaddr 2- @crtc_destroy -> flush work struct 3- @plane_destroy -> a) if (fb refcount) remove reference to fb b) deallocate crc_data Signed-off-by: Haneen Mohammed [seanpaul fixed typo in vkms_crtc s/vblamk/vblank/] Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/b948327f48c3e70ab232b4a0848ee6d033b26484.1533171495.git.hamohammed.sa@gmail.com commit 3e77c4d02237b054806c151b21c5307c6a064ce4 Author: Haneen Mohammed Date: Thu Aug 2 04:08:22 2018 +0300 drm/vkms: Subclass plane state Subclass plane state struct to enable storing driver's private state. This patch only adds the base drm_plane_state struct and the atomic functions that handle it. Signed-off-by: Haneen Mohammed Reviewed-by: Sean Paul Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/c35c512c8987a7255aac94a9eb985d2dd3e6c90d.1533171495.git.hamohammed.sa@gmail.com commit 4668f69544328dd04f39546274d5cd7a1cde2240 Author: Chris Wilson Date: Thu Aug 2 11:06:30 2018 +0100 drm/i915: Clear all residual RPS events on disabling interrupts Make sure that the RPS IIR is completely clear on disabling so we should not get any more interrupts after idling. Since the IIR is shared with the guc, we have to be careful to only clobber RPS events. Signed-off-by: Chris Wilson Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20180802100631.31305-3-chris@chris-wilson.co.uk commit f4de7794de84f06dc56f0adc8ce34ab8294138a9 Author: Chris Wilson Date: Thu Aug 2 11:06:29 2018 +0100 drm/i915: Unconditionally clear the pm/guc GT IIR upon acking Having stored the IIR for action, we should always clear it. Signed-off-by: Chris Wilson Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20180802100631.31305-2-chris@chris-wilson.co.uk commit 46e831abe864a6b59fa3de253a681c0f2ee1bf2f Author: Chris Wilson Date: Thu Aug 2 15:04:16 2018 +0100 drm/i915/lpe: Mark LPE audio runtime pm as "no callbacks" The LPE audio is a child device of i915, it is powered up and down alongside the igfx and presents no independent runtime interface. This aptly fulfils the description of a "No-Callback" Device, so mark it thus. Fixes: 183c00350ccd ("drm/i915: Fix runtime PM for LPE audio") Testcase: igt/pm_rpm/basic-pci-d3-state Testcase: igt/pm_rpm/basic-rte Signed-off-by: Chris Wilson Cc: Takashi Iwai Cc: Pierre-Louis Bossart Cc: Ville Syrjälä Cc: stable@vger.kernel.org Reviewed-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20180802140416.6062-1-chris@chris-wilson.co.uk commit 12a6c931beffeaaa350ef562e91e49918b4b3e68 Author: Paulo Zanoni Date: Tue Jul 31 17:46:14 2018 -0700 drm/i915/icl: avoid unclaimed PLANE_NV12_BUF_CFG register We don't have proper watermark NV12 support on ICL due to differences in how it should be implemented. In commit 234059da0f33 ("drm/i915/icl: NV12 y-plane ddb is not in same plane") we avoided writing the non-existent PLANE_NV12_BUF_CFG registers but we forgot to also avoid them on the hardware state readout. While the code is still not correct, at least now we can avoid unclaimed register error messages when dealing with RGB formats, which makes CI happier. Also add some FIXME comments in order to make it even more clear that there's still work to do. References: commit 234059da0f33 ("drm/i915/icl: NV12 y-plane ddb is not in same plane") Cc: Mahesh Kumar Reviewed-by: Mahesh Kumar Signed-off-by: Paulo Zanoni Link: https://patchwork.freedesktop.org/patch/msgid/20180801004614.22149-1-paulo.r.zanoni@intel.com commit 0d55babc8392754352f1058866dd4182ae587d11 Author: Chris Wilson Date: Thu Aug 2 11:06:28 2018 +0100 drm/i915: Drop stray clearing of rps->last_adj We used to reset last_adj to 0 on crossing a power domain boundary, to slow down our rate of change. However, commit 60548c554be2 ("drm/i915: Interactive RPS mode") accidentally caused it to be reset on every frequency update, nerfing the fast response granted by the slow start algorithm. Fixes: 60548c554be2 ("drm/i915: Interactive RPS mode") Testcase: igt/pm_rps/mix-max-config-loaded Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20180802100631.31305-1-chris@chris-wilson.co.uk commit 570913e0b1bebec0676ac7091544a00b278e8765 Author: Sandy Huang Date: Tue Jun 26 16:53:35 2018 +0800 drm/rockchip: vop: add px30 vop support PX30 have vop big and vop lite, just like rk3036 and rk3126 the max input and output resolution is 1920x1080, the main difference between the two vop is: vop big: win0 support yuv and rgb format; win1 and win2 support rgb format; vop lit: win1 support rgb format; Signed-off-by: Sandy Huang Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/1530003215-46593-3-git-send-email-hjc@rock-chips.com commit d5890d5ff4b93bb4ccb0fb2085fc2da77c89790a Author: Sandy Huang Date: Tue Jun 26 16:53:34 2018 +0800 dt-bindings: display: rockchip: add document for px30 vop Add the compatible values for the px30 display controllers. Signed-off-by: Sandy Huang Acked-by: Rob Herring [added commit message] Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/1530003215-46593-2-git-send-email-hjc@rock-chips.com commit 8bfa02c885ee538353f52b36d16de90655e1bcde Author: Zhao Yan Date: Wed Aug 1 00:15:31 2018 -0400 drm/i915/gvt: only copy the first page for restore inhibit context if a context is a restore inhibit context, gfx hw only load the first page for ring context, so we only need to copy from guest the 1 page too. v3: use "return" instead of "goto" for inhibit case. (zhenyu wang) v2: move judgement of restore inhibit to a macro in mmio_context.h Signed-off-by: Zhao Yan Acked-by: Hang Yuan Signed-off-by: Zhenyu Wang commit db47685da1d8224f0eaa35c32e1a1ea97b05bae0 Author: Zhao Yan Date: Wed Aug 1 00:15:09 2018 -0400 drm/i915/gvt: add a fastpath for cmd parsing on MI_NOOP MI_NOOP is a common command appearing in almost all command buffers, put it into a fastpath can improve perfomance, especially in command buffers contains lots of MI_NOOPs (0s). Take glmark2 as an example, 3% performance increase is observed after introduced this patch. Meanwhile, in case where abundant in MI_NOOPs, up to 12% performance increase is measured. v2: use lowercase for index of MI_NOOP in cmd_info (zhenyu wang) Signed-off-by: Li Weinan Signed-off-by: Zhao Yan Signed-off-by: Zhenyu Wang commit 22e6de7074b820103cc566b1f57106515a054a39 Author: Paulo Zanoni Date: Fri Jul 27 13:33:31 2018 -0700 drm/dp: add missing ')' to I2C nack debug message "(an unmatched left parenthesis creates an unresolved tension that will stay with you all day." -- Randall Munroe Signed-off-by: Paulo Zanoni Reviewed-by: Alex Deucher Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20180727203331.27778-1-paulo.r.zanoni@intel.com commit d0f5cc5db11470a160788c123cc67bdb0cad1904 Author: Chris Wilson Date: Mon Jul 30 17:43:25 2018 +0100 drm/i915/execlists: Terminate the context image with BB_END In the aub trace utility, the context images are terminated with a MI_BATCH_BUFFER_END; the simulator is reported as complaining otherwise. Do the same for our protocontext image for completeness, and in passing apply the magic bit for gen10 to mark the end of the context image. Reported-by: Lionel Landwerlin Signed-off-by: Chris Wilson Cc: Lionel Landwerlin Reviewed-by: Lionel Landwerlin Link: https://patchwork.freedesktop.org/patch/msgid/20180730164325.12770-1-chris@chris-wilson.co.uk commit c358514ba8da9e235876db1628cedd19a35803c6 Author: Mika Kuoppala Date: Mon Jul 30 15:06:36 2018 +0300 Revert "drm/i915/icl: WaEnableFloatBlendOptimization" The register for 0xe420 is unable to hold any value, including this bit. The documentation is also mixed between having a register bit for toggle and having a state command setup for it. Apparently the register toggle is deprecated. Remove the register toggle as evidence shows it's futile. The thing remaining is an apology and humble request for Mesa folks to resurrect their state setup for this as they were on right track from start. This reverts commit 0bf059f3532bb39c52d917142206a8554fc2f1c5. Fixes: 0bf059f3532b ("drm/i915/icl: WaEnableFloatBlendOptimization") References: HSDES#1406393558 Cc: Oscar Mateo Cc: Anuj Phogat Cc: Chris Wilson Cc: Lionel Landwerlin Signed-off-by: Mika Kuoppala Acked-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20180730120636.26958-1-mika.kuoppala@linux.intel.com commit e7941cc2340cc48cc84d61108707d12a59c78405 Author: Souptick Joarder Date: Wed Aug 1 02:04:30 2018 +0530 drm/rockchip: Convert drm_atomic_helper_suspend/resume() convert drm_atomic_helper_suspend/resume() to use drm_mode_config_helper_suspend/resume(). With this conversion, rockchip_drm_fb_resume() and rockchip_drm_fb_suspend() will not be used anymore. Both of these functions can be removed. Also, in struct rockchip_drm_private state will not be used anymore. So this can be removed forever. Signed-off-by: Souptick Joarder Co-Developed-by: Ajit Negi [changed to Co-Developed-by, according to process/submitting-patches.rst] Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20180731203430.GA30136@jordon-HP-15-Notebook-PC commit 21eb1850fa0bd0a9b729bf3708da78888433027f Author: Chris Wilson Date: Wed Aug 1 11:47:21 2018 +0100 drm/i95: Mark GGTT as incoherent for gen10+ The evidence suggests that we need to start treating writes via GGTT as incoherent for gen10+, that is that they are internally buffered and not immediately visible via a read along a different physical path. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107398 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107400 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107435 Signed-off-by: Chris Wilson Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20180801104721.4030-1-chris@chris-wilson.co.uk commit 60548c554be2830d29d2533dad0ac8133347ee51 Author: Chris Wilson Date: Tue Jul 31 14:26:29 2018 +0100 drm/i915: Interactive RPS mode RPS provides a feedback loop where we use the load during the previous evaluation interval to decide whether to up or down clock the GPU frequency. Our responsiveness is split into 3 regimes, a high and low plateau with the intent to keep the gpu clocked high to cover occasional stalls under high load, and low despite occasional glitches under steady low load, and inbetween. However, we run into situations like kodi where we want to stay at low power (video decoding is done efficiently inside the fixed function HW and doesn't need high clocks even for high bitrate streams), but just occasionally the pipeline is more complex than a video decode and we need a smidgen of extra GPU power to present on time. In the high power regime, we sample at sub frame intervals with a bias to upclocking, and conversely at low power we sample over a few frames worth to provide what we consider to be the right levels of responsiveness respectively. At low power, we more or less expect to be kicked out to high power at the start of a busy sequence by waitboosting. Prior to commit e9af4ea2b9e7 ("drm/i915: Avoid waitboosting on the active request") whenever we missed the frame or stalled, we would immediate go full throttle and upclock the GPU to max. But in commit e9af4ea2b9e7, we relaxed the waitboosting to only apply if the pipeline was deep to avoid over-committing resources for a near miss. Sadly though, a near miss is still a miss, and perceptible as jitter in the frame delivery. To try and prevent the near miss before having to resort to boosting after the fact, we use the pageflip queue as an indication that we are in an "interactive" regime and so should sample the load more frequently to provide power before the frame misses it vblank. This will make us more favorable to providing a small power increase (one or two bins) as required rather than going all the way to maximum and then having to work back down again. (We still keep the waitboosting mechanism around just in case a dramatic change in system load requires urgent uplocking, faster than we can provide in a few evaluation intervals.) v2: Reduce rps_set_interactive to a boolean parameter to avoid the confusion of what if they wanted a new power mode after pinning to a different mode (which to choose?) v3: Only reprogram RPS while the GT is awake, it will be set when we wake the GT, and while off warns about being used outside of rpm. v4: Fix deferred application of interactive mode v5: s/state/interactive/ v6: Group the mutex with its principle in a substruct Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107111 Fixes: e9af4ea2b9e7 ("drm/i915: Avoid waitboosting on the active request") Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: Tvrtko Ursulin Cc: Radoslaw Szwichtenberg Cc: Ville Syrjälä Reviewed-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20180731132629.3381-1-chris@chris-wilson.co.uk commit 80e0b19996d58db9ddff3f65b7cd9efa8e78de72 Author: Sean Paul Date: Mon Jul 30 13:42:21 2018 -0400 drm/bridge/ti-sn65dsi86: Fix implicit declaration to drm_mode_connector_attach_encoder This function name was changed to drm_connector_attach_encoder(). Unfortunately this driver was posted on the list before that change, and applied after Fixes: a095f15c00e2 ("drm/bridge: add support for sn65dsi86 bridge driver") Cc: Sandeep Panda Cc: Andrzej Hajda Cc: Archit Taneja Cc: Laurent Pinchart Reviewed-by: Sandeep Panda Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20180730174225.257255-1-seanpaul@chromium.org commit 7c3d0f159ca056f11326c2285636df214564af89 Author: Souptick Joarder Date: Thu Jul 26 20:15:49 2018 +0530 drm/vkms: Use new return type vm_fault_t Use new return type vm_fault_t for fault handler. Signed-off-by: Souptick Joarder Signed-off-by: Gustavo Padovan Link: https://patchwork.freedesktop.org/patch/msgid/20180726144549.GA9434@jordon-HP-15-Notebook-PC commit 27fb462a01c3e78e223eb625b416bb03bd493541 Author: Andrzej Hajda Date: Fri Jul 27 11:48:59 2018 +0200 drm/bridge/tc358764: fix drm helper name Recently drm_mode_connector_attach_encoder changed it's name. The change was not noticed by bridge author, as a result gcc reports compile error on next branch. Fixes: f38b7cca6d0e ("drm/bridge: tc358764: Add DSI to LVDS bridge driver") Reported-by: kbuild test robot Signed-off-by: Andrzej Hajda Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20180727094859.27727-1-a.hajda@samsung.com commit dfb9f5cabfe31b8e936b725b5de8f787f7c18b0f Author: Haneen Mohammed Date: Tue Jul 24 19:31:05 2018 +0300 drm/vkms: subclass CRTC state Subclass CRTC state struct to enable storing driver's private state. This patch only adds the base drm_crtc_state struct and the atomic functions that handle it. Signed-off-by: Haneen Mohammed Reviewed-by: Daniel Vetter Reviewed-by: Sean Paul Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/1f3564a5a0a6c4410c5d383c86a572ddda4818a8.1532446182.git.hamohammed.sa@gmail.com commit d7734b74095dfa103747a82a63ae8bd71dcbf24e Author: Haneen Mohammed Date: Tue Jul 24 19:30:22 2018 +0300 drm/vkms: Add atomic_helper_check_plane_state Call atomic_helper_check_plane_state to clip plane coordinates. Signed-off-by: Haneen Mohammed Reviewed-by: Sean Paul Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/b8c1bfed8b5720cc4794ace41cf49af66c99a48c.1532446182.git.hamohammed.sa@gmail.com commit 8ce1bb0b5337db4be801eea234f959104323f959 Author: Haneen Mohammed Date: Tue Jul 24 19:29:23 2018 +0300 drm/vkms: map/unmap buffers in [prepare/cleanup]_fb hooks This patch map/unmap GEM backing memory to kernel address space in prepare/cleanup_fb respectively and cache the virtual address for later use. Signed-off-by: Haneen Mohammed Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/17d19f61b6539ce1b614c59762d04d816261b307.1532446182.git.hamohammed.sa@gmail.com commit bb112b14af8d1910909eb132c78ddf49be907e31 Author: Haneen Mohammed Date: Tue Jul 24 19:26:59 2018 +0300 drm/vkms: Add functions to map/unmap GEM backing storage This patch add the necessary functions to map/unmap GEM backing memory to the kernel's virtual address space. Signed-off-by: Haneen Mohammed Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/4b6563ae4f4337a5fd51f872424addf64e8d59a6.1532446182.git.hamohammed.sa@gmail.com commit 3d94361aa13a0135a1b67d27a80a5158c93d6505 Author: Matthew Auld Date: Mon Jul 30 13:05:44 2018 +0100 drm/i915/gtt: remove px_page Entries will either be pointing to scratch or real PD, making the px_page(pd) check pointless. Also since there are no other users of px_page, just remove it. Signed-off-by: Matthew Auld Cc: Chris Wilson Cc: Michel Thierry Reviewed-by: Chris Wilson Reviewed-by: Mika Kuoppala Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20180730120544.20784-1-matthew.auld@intel.com commit f6844a85e0c96a55c61fa3e611f414999b11e4de Author: Chris Wilson Date: Mon Jul 30 08:53:51 2018 +0100 drm/i915/selftests: Replace opencoded clflush with drm_clflush_virt_range We occasionally see that the clflush prior to a read of GPU data is returning stale data, reminiscent of much earlier bugs fixed by adding a second clflush for serialisation. As drm_clflush_virt_range() already supplies the workaround, use it rather than open code the clflush instruction. References: 396f5d62d1a5 ("drm: Restore double clflush on the last partial cacheline") Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20180730075351.15569-3-chris@chris-wilson.co.uk commit 39f3be162c46bc2349ad7a5bd89536eb83561c81 Author: Chris Wilson Date: Mon Jul 30 08:53:50 2018 +0100 drm/i915: Kick waiters on resetting legacy rings For reasons unknown, interrupts following a reset do not arrive, but this can be papered over by kicking any waiter and peeking at the breadcrumbs following the reset. Testcase: igt/gem_eio/reset-stress References: https://bugs.freedesktop.org/show_bug.cgi?id=105957 Signed-off-by: Chris Wilson Acked-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20180730075351.15569-2-chris@chris-wilson.co.uk commit 86c1c87d0e6241cbe35bd52badfc84b154e1b959 Author: Chris Wilson Date: Thu Jul 26 17:15:27 2018 +0100 drm/i915: Downgrade Gen9 Plane WM latency error According to intel_read_wm_latency() it is perfectly legal for one WM and all subsequent levels to be 0 (and the deeper powersaving states disabled), so don't shout *ERROR*, over and over again. Signed-off-by: Chris Wilson Cc: Maarten Lankhorst Cc: Ville Syrjala Acked-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20180726161527.10516-1-chris@chris-wilson.co.uk commit 6f211ed4343832ce5c18ea68e860705b3fdfa82f Author: Anusha Srivatsa Date: Thu Jul 26 16:35:15 2018 -0700 drm/i915/icl: Set TBT IO in Aux transaction For a TBT sequence, we need to set the IO type to TBT in DDI_AUX_CTL. v2: Avoid duplications.(Paulo) Cc: Paulo Zanoni Reviewed-by: Paulo Zanoni Signed-off-by: Anusha Srivatsa Signed-off-by: Paulo Zanoni Link: https://patchwork.freedesktop.org/patch/msgid/1532648115-29795-2-git-send-email-anusha.srivatsa@intel.com commit 2b7edeb008527b1dd649d3a581792825b57df08a Author: Anusha Srivatsa Date: Thu Jul 26 16:35:14 2018 -0700 drm/i915/icl: Add TBT checks for PLL calculations Add missing TBT check in the Pll calculation. v2: do not use a auxiliary function to check if status is TBT or not. (Paulo) v3: Code style changes. (Paulo) Cc: Paulo Zanoni Cc: Lucas De Marchi Reviewed-by: Paulo Zanoni Signed-off-by: Anusha Srivatsa Signed-off-by: Paulo Zanoni Link: https://patchwork.freedesktop.org/patch/msgid/1532648115-29795-1-git-send-email-anusha.srivatsa@intel.com commit f00ca81510b9aa81c88c916c253509e879740342 Author: Paulo Zanoni Date: Thu Jun 7 16:07:00 2018 -0700 drm/i915: inline skl_copy_ddb_for_pipe() to its only caller While things may have been different before, right now the function is very simple and has a single caller. IMHO any possible benefits from an abstraction here are gone and not worth the price of the current indirection while reading the code. Cc: Mahesh Kumar Reviewed-by: Mahesh Kumar Signed-off-by: Paulo Zanoni Link: https://patchwork.freedesktop.org/patch/msgid/20180607230700.28359-1-paulo.r.zanoni@intel.com commit c50dfe79ec3ea28efe494808576d281738056d90 Author: Paulo Zanoni Date: Wed Jul 25 17:12:29 2018 -0700 drm/i915/icl: don't set CNL_DDI_CLOCK_REG_ACCESS_ON anymore The new recommendation from the spec is to simply not set this bit anymore. Not setting the bit would prevent some hangs that our driver manages to avoid since commit c8af5274c3cb ("drm/i915: enable the pipe/transcoder/planes later on HSW+"), and the theoretical downside of not setting the bit doesn't seem realistic according to the HW team. Let's follow their recommendation. BSpec: 20233 References: commit c8af5274c3cb ("drm/i915: enable the pipe/transcoder/planes later on HSW+") Cc: José Roberto de Souza Reviewed-by: José Roberto de Souza Signed-off-by: Paulo Zanoni Link: https://patchwork.freedesktop.org/patch/msgid/20180726001229.13791-1-paulo.r.zanoni@intel.com commit 5503cb0decdc03c2f9dad53560bd5963aeb8fc8a Author: Chris Wilson Date: Fri Jul 27 16:55:01 2018 +0100 drm/i915: Drop unneed i915 parameter from intel_ring_pin() As we now have a ring->vma available, we can just lookup our i915 pointer from inside the vm, and so not require the unsightly parameter. Signed-off-by: Chris Wilson Reviewed-by: Michal Wajdeczko Link: https://patchwork.freedesktop.org/patch/msgid/20180727155501.18963-1-chris@chris-wilson.co.uk commit 905febf592f7280084ee853b05d7bd59e26c4ca0 Author: Jakub Bartmiński Date: Fri Jul 27 16:11:47 2018 +0200 drm/i915: Add a fault injection point to WOPCM init Add a fault injection point in the WOPCM initialization path. v4: Move the injection inside the WOPCM init function. Signed-off-by: Jakub Bartmiński Cc: Chris Wilson Cc: Michał Winiarski Cc: Michal Wajdeczko Reviewed-by: Michal Wajdeczko Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20180727141148.30874-5-jakub.bartminski@intel.com commit 496bcce3c9bf50ccf74b3050669600631cbf8138 Author: Jakub Bartmiński Date: Fri Jul 27 16:11:46 2018 +0200 drm/i915: Remove unnecessary ggtt_offset_bias from i915_gem_context Since ggtt_offset_bias is now stored in ggtt.pin_bias, it is duplicated inside i915_gem_context, and can instead be accessed directly from ggtt. v3: Added a helper function to retrieve the ggtt.pin_bias from the vma. v4: Moved the helper function to the previous patch in the series. Dropped the bias from intel_ring_pin. This introduces a slight functional change since we are always pinning the ring a bit higher if GuC is present even though we don't really need to. v8: Fixed patch not applying on the most recent upstream. Signed-off-by: Jakub Bartmiński Cc: Chris Wilson Cc: Michał Winiarski Cc: Michal Wajdeczko Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20180727141148.30874-4-jakub.bartminski@intel.com commit dd18cedfa36fbbc19903aed12d6d94c06f5e6dea Author: Jakub Bartmiński Date: Fri Jul 27 16:11:45 2018 +0200 drm/i915/guc: Move the pin bias value from GuC to GGTT Removing the pin bias from GuC allows us to not check for GuC every time we pin a context, which fixes the assertion error on unresolved GuC platform default in mock contexts selftest. It also seems that we were using uninitialized WOPCM variables when setting the GuC pin bias. The pin bias has to be set after the WOPCM, but before the call to i915_gem_contexts_init where the first contexts are pinned. v2: This also makes it so that there's no need to set GuC variables from within the WOPCM init function or to move the WOPCM init, while keeping the correct initialization order. Also for mock tests the pin bias is left at 0 and we make sure that the pin bias with GuC will not be smaller than without GuC. v3: Avoid unused i915 in intel_guc_ggtt_offset if debug is disabled. v4: Squash with WOPCM init reordering. Moved the i915_ggtt_pin_bias helper to this patch, and made some functions use it instead of directly dereferencing i915->ggtt. v5: Since we now don't use wopcm.guc.base for the pin bias there's no need to validate it. It also has already been verified in WOPCM init. v6: Deleted the now unnecessarily introduced includes from previous versions. Dropped naming changes from dev_priv to i915 for better patch readability. v7: Changed some comments to make more sense in the context they're in. v8: Moved and renamed the function which now returns the wopcm.guc.size to intel_guc.c:intel_guc_reserved_gtt_size to avoid any possible confusion with the pin_bias in ggtt, which should be used for pinning. Fixed patch not applying or the most recent upstream. Fixes: f7dc0157e4b5 ("drm/i915/uc: Fetch GuC/HuC firmwares from guc/huc specific init") Testcase: igt/drv_selftest/mock_contexts #GuC Signed-off-by: Jakub Bartmiński Cc: Chris Wilson Cc: Michał Winiarski Cc: Michal Wajdeczko Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20180727141148.30874-3-jakub.bartminski@intel.com commit b6445e17799d931c8c94e5d7acc59c9558f52df5 Author: Jakub Bartmiński Date: Fri Jul 27 16:11:44 2018 +0200 drm/i915/guc: Do not partition WOPCM if GuC is not used There seems to be no reason for doing extra work on WOPCM partitioning in the case GuC is not used, as the partitioning will not be used by the intel_wopcm_init_hw function anyway. Signed-off-by: Jakub Bartmiński Cc: Chris Wilson Cc: Michał Winiarski Cc: Michal Wajdeczko Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20180727141148.30874-2-jakub.bartminski@intel.com commit 9936ef55f254bb95fca9258539819a92d824497d Author: Jakub Bartmiński Date: Fri Jul 27 16:11:43 2018 +0200 drm/i915/guc: Avoid wasting memory on incorrect GuC pin bias It would appear that the calculated GuC pin bias was larger than it should be, as the GuC address space does NOT contain the "HW contexts RSVD" part of the WOPCM. Thus, the GuC pin bias is simply the GuC WOPCM size. v5: Clarify the diagram to better represent the GuC address space. Since we now don't use guc.base for the pin bias there's no need to validate it. It also has already been verified in WOPCM init. Bspec: 1180 Signed-off-by: Jakub Bartmiński Cc: Chris Wilson Cc: Michał Winiarski Cc: Michal Wajdeczko Reviewed-by: Michał Winiarski Reviewed-by: Michal Wajdeczko Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20180727141148.30874-1-jakub.bartminski@intel.com commit c00db496bbd4586448bd46e19d79f424fd6faf6a Author: Chris Wilson Date: Fri Jul 27 10:29:47 2018 +0100 drm/i915: Remove superfluous GEN8_LR_CONTEXT_ALIGN As GEN8_LR_CONTEXT_ALIGN is I915_GTT_MIN_ALIGNMENT is it functionally equivalent to 0, and we will not be able to reduce the min-alignment for the GTT, so passing 0 is and will remain equivalent. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20180727092947.1953-1-chris@chris-wilson.co.uk commit 7a859c655d8f9e83d95ad8e4722c0da6b29590d6 Author: Chris Wilson Date: Fri Jul 27 10:18:55 2018 +0100 drm/i915: Eliminate use of PAGE_SIZE as a virtual alignment Using PAGE_SIZE for virtual offset alignment is superfluous as it is equal to the minimum gtt alignment and so equivalent to 0. It is also the wrong value to use as we stopped using physical page constructs for the virtual GTT, i.e. it would be preferrable to use I915_GTT_PAGE_SIZE and in these cases merely imply I915_GTT_MIN_ALIGNMENT. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20180727091855.1879-1-chris@chris-wilson.co.uk commit 344d00795eb11927ba84233473bb18398e569eb4 Author: Masahiro Yamada Date: Wed Jul 25 14:25:48 2018 +0900 drm/bridge/synopsys: remove commented-out flag in Makefile Please do not comment out unneeded code. Remove. Signed-off-by: Masahiro Yamada Reviewed-by: Laurent Pinchart Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/1532496348-11589-1-git-send-email-yamada.masahiro@socionext.com commit f38b7cca6d0eafef278703ddadb369322a510ca6 Author: Andrzej Hajda Date: Wed Jul 25 17:46:40 2018 +0200 drm/bridge: tc358764: Add DSI to LVDS bridge driver Add a drm_bridge driver for the Toshiba TC358764 DSI to LVDS bridge. Changes in v4: - removed license blob, - ordered includes, - added error handling, - fixed reset GPIO handling, - added missing calls to the panel, - custom OF graph code replaced with helpers, - removed tc358764_poweroff from remove callback. v5: - fixed supply names, - fixed broken console - added connector to fb_helper, - added detach callback - unbinding works, - fixed typo in error checking code, - removed sparse bridge->encoder check - core does it already. Signed-off-by: Andrzej Hajda Signed-off-by: Maciej Purski [ a.hajda@samsung.com: v4, v5 ] Signed-off-by: Andrzej Hajda Reviewed-by: Archit Taneja Link: https://patchwork.freedesktop.org/patch/msgid/20180725154644.25412-6-a.hajda@samsung.com commit eb91cde094f523c06adf463aad0e41ae35765d71 Author: Andrzej Hajda Date: Wed Jul 25 17:46:39 2018 +0200 dt-bindings: tc358754: add DT bindings The patch adds bindings to Toshiba DSI/LVDS bridge TC358764. Bindings describe power supplies, reset gpio and video interfaces. Signed-off-by: Andrzej Hajda Signed-off-by: Maciej Purski Reviewed-by: Rob Herring Link: https://patchwork.freedesktop.org/patch/msgid/20180725154644.25412-5-a.hajda@samsung.com commit a095f15c00e2788bd83f4e9aa64ef303cae8e649 Author: Sandeep Panda Date: Fri Jul 20 12:24:02 2018 +0530 drm/bridge: add support for sn65dsi86 bridge driver Add support for TI's sn65dsi86 dsi2edp bridge chip. The chip converts DSI transmitted signal to eDP signal, which is fed to the connected eDP panel. This chip can be controlled via either i2c interface or dsi interface. Currently in driver all the control registers are being accessed through i2c interface only. Also as of now HPD support has not been added to bridge chip driver. Changes in v1: - Split the dt-bindings and the driver support into separate patches (Andrzej Hajda). - Use of gpiod APIs to parse and configure gpios instead of obsolete ones (Andrzej Hajda). - Use macros to define the register offsets (Andrzej Hajda). Changes in v2: - Separate out edp panel specific HW resource handling from bridge driver and create a separate edp panel drivers to handle panel specific mode information and HW resources (Sean Paul). - Replace pr_* APIs to DRM_* APIs to log error or debug information (Sean Paul). - Remove some of the unnecessary structure/variable from driver (Sean Paul). - Rename the function and structure prefix "sn65dsi86" to "ti_sn_bridge" (Sean Paul / Rob Herring). - Remove most of the hard-coding and modified the bridge init sequence based on current mode (Sean Paul). - Remove the existing function to retrieve the EDID data and implemented this as an i2c_adapter and use drm_get_edid() (Sean Paul). - Remove the dummy irq handler implementation, will add back the proper irq handling later (Sean Paul). - Capture the required enable gpios in a single array based on dt entry instead of having individual descriptor for each gpio (Sean Paul). Changes in v3: - Remove usage of irq_gpio and replace it as "interrupts" property (Rob Herring). - Remove the unnecessary header file inclusions (Sean Paul). - Rearrange the header files in alphabetical order (Sean Paul). - Use regmap interface to perform i2c transactions. - Update Copyright/License field and address other review comments (Jordan Crouse). Changes in v4: - Update License/Copyright (Sean Paul). - Add Kconfig and Makefile changes (Sean Paul). - Drop i2c gpio handling from this bridge driver, since i2c sda/scl gpios will be handled by i2c master. - Update required supplies names. - Remove unnecessary goto statements (Sean Paul). - Add mutex lock to power_ctrl API to avoid race conditions (Sean Paul). - Add support to parse reference clk frequency from dt(optional). - Update the bridge chip enable/disable sequence. Changes in v5: - Fixed Kbuild test service reported warnings. Changes in v6: - Use PM runtime based ref-counting instead of local ref_count mechanism (Stephen Boyd). - Clean up some debug logs and indentations (Sean Paul). - Simplify dp rate calculation (Sean Paul). - Add support to configure refclk based on input REFCLK pin or DACP/N pin (Stephen Boyd). Changes in v7: - Use static supply entries instead of dynamic allocation (Andrzej Hajda). - Defer bridge driver probe if panel is not probed (Andrzej Hajda). - Update of_graph APIs for correct node reference management. (Andrzej Hajda). - Remove local display_mode object (Andrzej Hajda). - Remove version id check function from driver. Changes in v8: - Move dsi register/attach function to bridge driver probe (Andrzej Hajda). - Introduce a new helper function to write 16bit words into consecutive registers (Andrzej Hajda). - Remove unnecessary macros (Andrzej Hajda). Changes in v9: - Remove dsi register/attach from bridge probe, since dsi dev register completion also waits for any panel or bridge to get added. This creates deadlock situation when bridge driver calls dsi dev register and attach before bridge add, in its probe function. - Fix issues faced during testing of bridge driver on actual HW. - Remove unnecessary initializations (Stephen Boyd). - Use local refclk lut size instead of global macro (Sean Paul). Changes in v10: - Use refclk to determine if continuous dsi clock is needed or not. Changes in v11: - Read DPPLL_SRC register to determine continuous clock instead of using refclk handle (Stephen Boyd). Changes in v12: - Explain in comment as in why dsi dev registration is done in bridge_attach (Andrzej Hajda). - Move HPD disable to bridge_pre_enable (Andrzej Hajda). - Make panel/DDC exclusive until HPD support is added (Andrzej Hajda). Changes in v13: - eDP panels report EDID via DP-AUX channel, so remove support for dedicated DDC line (Andrzej Hajda). Changes in v14: - Remove unnecessary drm_panel checks (Andrzej Hajda). Signed-off-by: Sandeep Panda Reviewed-by: Andrzej Hajda Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/1532069642-21392-1-git-send-email-spanda@codeaurora.org commit e3896e6dddf0b821dc3214b623a922aa7ee2c2d5 Author: Sandeep Panda Date: Mon Jul 16 14:13:30 2018 +0530 dt-bindings: drm/bridge: Document sn65dsi86 bridge bindings Document the bindings used for the sn65dsi86 DSI to eDP bridge. Changes in v1: - Rephrase the dt-binding descriptions to be more inline with existing bindings (Andrzej Hajda). - Add missing dt-binding that are parsed by corresponding driver (Andrzej Hajda). Changes in v2: - Remove edp panel specific dt-binding entries. Only keep bridge specific entries (Sean Paul). - Remove custom-modes dt entry since its usage is removed from driver also (Sean Paul). - Remove is-pluggable dt entry since this will not be needed anymore (Sean Paul). Changes in v3: - Remove irq-gpio dt entry and instead populate is an interrupt property (Rob Herring). Changes in v4: - Add link to bridge chip datasheet (Stephen Boyd) - Add vpll and vcc regulator supply bindings (Stephen Boyd) - Add ref clk optional dt binding (Stephen Boyd) - Add gpio-controller optional dt binding (Stephen Boyd) Changes in v5: - Use clock property to specify the input refclk (Stephen Boyd). - Update gpio cell and pwm cell numbers (Stephen Boyd). Changes in v6: - Add property to mention the lane mapping scheme and polarity inversion (Stephen Boyd). Changes in v7: - Detail description of lane mapping scheme dt property (Andrzej Hajda/ Rob Herring). - Removed HDP gpio binding, since the bridge uses IRQ signal to determine HPD, and IRQ property is already documented in binding. Changes in v8: - Removed unnecessary explanation of lane mapping and polarity dt property, since these are already explained in media/video-interface dt binidng (Rob Herring). Changes in v9: - Avoid putting re-definition of lane mapping and polarity dt binding (Rob Herring). Changes in v10: - Use interrupts-extended property instead of interrupts to specify interrupt line (Andrzej Hajda). - Move data-lanes and lane-polarity property example to proper place (Andrzej Hajda). Changes in v11: - Add a property for suspend gpio function of GPIO1 pin on bridge chip (Stephen Boyd). Changes in v12: - Remove binding for dedicated DDC line (Andrzej Hajda). Signed-off-by: Sandeep Panda Reviewed-by: Stephen Boyd Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20180716084330.26698-3-spanda@codeaurora.org commit 6dc17d69f83ec315157b76fbf47d4379e1266cef Author: Chris Wilson Date: Thu Jul 19 20:47:46 2018 +0100 drm/i915/selftests: Exercise resetting in the middle of a wait-on-fence On older HW, gen2/3, fence registers are used for detiling GPU commands and as such changing those registers requires serialisation with the requests on the GPU. Anything running on the GPU is subject to a hang, and so we must be able to recover cleanly in the middle of a stuck wait on a fence register. We can simulate using the fence on the GPU simply by marking the fence as active on the request for this vma, the interface being common to all gen, thus broadening the test. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20180719194746.19111-2-chris@chris-wilson.co.uk commit ab84a110490d38d40780113a1cdfce03b1cdec13 Author: Chris Wilson Date: Thu Jul 19 20:47:45 2018 +0100 drm/i915/selftests: Use a full emulation of a user ppgtt context To test eviction from a ppgtt, we just want a ppgtt i.e. something other than the Global GTT which is shared and used by the kernel for HW features like fencing and scanout. However, we also need it to pass !i915_is_ggtt() and the simplest way is to emulate a full user context rather than the internal kernel context that is used for the GGTT. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20180719194746.19111-1-chris@chris-wilson.co.uk commit ec5b65a97c60f482bd23d513ce8c398797d40156 Author: Chris Wilson Date: Thu Jul 26 09:50:33 2018 +0100 drm/i915: Don't disable the GPU for older gen on wedging If we issue a device level GPU reset on the older gen, it will disable key components of the GMCH and the display engine. The purpose of wedging is to simply prevent further GEM usage without disabling KMS, so we need to be careful when we do issue the reset on wedging. Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20180726085033.4044-3-chris@chris-wilson.co.uk Reviewed-by: Michał Winiarski commit 7ed43df720c007d60bee6d81da07bcdc7e4a55ae Author: Chris Wilson Date: Thu Jul 26 09:50:32 2018 +0100 drm/i915: Restore sane defaults for KMS on GEM error load If we fail during GEM initialisation, we scrub the HW state by performing a device level GPU resuet. However, we want to leave the system in a usable state (with functioning KMS but no GEM) so after scrubbing the HW state, we need to restore some sane defaults and re-enable the low-level common parts of the GPU (such as the GMCH). v2: Restore GTT entries. Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20180726085033.4044-2-chris@chris-wilson.co.uk Reviewed-by: Michał Winiarski commit 52dda80d62dff39979fb407d67b7c9fc02381589 Author: Chris Wilson Date: Thu Jul 26 09:50:31 2018 +0100 drm/i915: Protect guc_fini_wq() against module load abort Prevent [ 397.873143] general protection fault: 0000 [#1] PREEMPT SMP PTI [ 397.873154] CPU: 4 PID: 4799 Comm: drv_module_relo Tainted: G U 4.18.0-rc6-CI-CI_DRM_4534+ #1 [ 397.873162] Hardware name: Micro-Star International Co., Ltd. MS-7B54/Z370M MORTAR (MS-7B54), BIOS 1.10 12/28/2017 [ 397.873175] RIP: 0010:__lock_acquire+0xf6/0x1b50 [ 397.873179] Code: 85 c0 4c 8b 9d 40 ff ff ff 8b 8d 38 ff ff ff 44 8b 8d 30 ff ff ff 4c 8b 85 28 ff ff ff 44 8b 95 24 ff ff ff 0f 84 54 03 00 00 ff 80 38 01 00 00 8b 15 45 8c 59 02 45 8b bc 24 70 08 00 00 85 [ 397.873240] RSP: 0018:ffffc90000497b40 EFLAGS: 00010002 [ 397.873246] RAX: 6b6b6b6b6b6b6b6b RBX: 0000000000000001 RCX: 0000000000000000 [ 397.873252] RDX: 0000000000000046 RSI: 0000000000000000 RDI: 0000000000000000 [ 397.873258] RBP: ffffc90000497c20 R08: ffffffff810a25e9 R09: 0000000000000000 [ 397.873264] R10: 0000000000000000 R11: ffff880255c63c28 R12: ffff8801093b2840 [ 397.873270] R13: 0000000000000001 R14: 0000000000000001 R15: 0000000000000246 [ 397.873277] FS: 00007faf88d71980(0000) GS:ffff880266300000(0000) knlGS:0000000000000000 [ 397.873284] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 397.873289] CR2: 000055d866c9ca10 CR3: 000000025472e006 CR4: 00000000003606e0 [ 397.873295] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 397.873301] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 397.873308] Call Trace: [ 397.873318] ? lock_acquire+0xa6/0x210 [ 397.873323] lock_acquire+0xa6/0x210 [ 397.873331] ? drain_workqueue+0x19/0x180 [ 397.873339] __mutex_lock+0x89/0x980 [ 397.873346] ? drain_workqueue+0x19/0x180 [ 397.873352] ? _raw_spin_unlock_irqrestore+0x4c/0x60 [ 397.873359] ? trace_hardirqs_on_caller+0xe0/0x1b0 [ 397.873365] ? drain_workqueue+0x19/0x180 [ 397.873373] ? debug_object_active_state+0x127/0x150 [ 397.873381] ? drain_workqueue+0x19/0x180 [ 397.873387] drain_workqueue+0x19/0x180 [ 397.873395] destroy_workqueue+0x12/0x1f0 [ 397.873476] intel_guc_fini_misc+0x36/0x90 [i915] [ 397.873540] i915_gem_fini+0x91/0x100 [i915] [ 397.873588] i915_driver_unload+0xd2/0x110 [i915] [ 397.873638] i915_pci_remove+0x19/0x30 [i915] [ 397.873646] pci_device_remove+0x36/0xb0 [ 397.873653] device_release_driver_internal+0x185/0x250 [ 397.873660] driver_detach+0x35/0x70 [ 397.873668] bus_remove_driver+0x53/0xd0 [ 397.873675] pci_unregister_driver+0x25/0xa0 [ 397.873683] __se_sys_delete_module+0x162/0x210 [ 397.873691] ? do_syscall_64+0xd/0x190 [ 397.873697] do_syscall_64+0x55/0x190 [ 397.873704] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 397.873710] RIP: 0033:0x7faf884231b7 [ 397.873714] Code: 73 01 c3 48 8b 0d d1 8c 2c 00 f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 b8 b0 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d a1 8c 2c 00 f7 d8 64 89 01 48 [ 397.873775] RSP: 002b:00007ffda4e98cf8 EFLAGS: 00000206 ORIG_RAX: 00000000000000b0 [ 397.873784] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007faf884231b7 [ 397.873790] RDX: 0000000000000000 RSI: 0000000000000800 RDI: 000055fbb18f1bd8 [ 397.873796] RBP: 000055fbb18f1b70 R08: 000055fbb18f1bdc R09: 00007ffda4e98d38 [ 397.873802] R10: 00007ffda4e97cf4 R11: 0000000000000206 R12: 000055fbb0d32470 [ 397.873808] R13: 00007ffda4e992e0 R14: 0000000000000000 R15: 0000000000000000 v2: It's use-after-free; not a NULL pointer. Testcase: igt/drv_module_reload/basic-reload-inject Signed-off-by: Chris Wilson Cc: Michał Winiarski Cc: Michal Wajdeczko Reviewed-by: Michał Winiarski Link: https://patchwork.freedesktop.org/patch/msgid/20180726085033.4044-1-chris@chris-wilson.co.uk commit d899aceb60912c9f1d7e1d7a3b388f116baf1b44 Author: Chris Wilson Date: Wed Jul 25 16:54:47 2018 +0100 drm/i915: Mark up object tiling-and-stride getters as const For that little bit of defense against a tired programmer. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20180725155447.11909-1-chris@chris-wilson.co.uk commit 406bc5633c6b1c7e7a86230db312ee34e785a8f1 Author: Chris Wilson Date: Thu Jul 26 11:47:59 2018 +0100 drm/i915: Avoid computing tile_row_size() for untiled objects i915_gem_tile_height() asserts that the object is tiled, but inside the error printer for the selftest we computed the row size regardless of tiling, tripping over the assert. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20180726104759.8684-1-chris@chris-wilson.co.uk commit 65172699a8bd9956705f71fb8b66b1068a1bb5cd Author: Dhinakaran Pandiyan Date: Wed Jul 18 10:19:43 2018 -0700 drm/i915/mst: Continue state updates even if AUX writes fail. We are too late in the enabling sequence to back out cleanly, not updating state tracking variables, like intel_dp->active_mst_links in this instance, results in incorrect behaviour further along. v2: Fixed int v/s bool comparison Cc: Ville Syrjälä Cc: Rodrigo Vivi Cc: Nathan Ciobanu Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107281 Signed-off-by: Dhinakaran Pandiyan Reviewed-by: Nathan Ciobanu Tested-by: Nathan Ciobanu Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20180718171943.3246-2-dhinakaran.pandiyan@intel.com commit 45ef40aab72e21eb81147a6e8a2bca863f0234fd Author: Dhinakaran Pandiyan Date: Wed Jul 18 10:19:42 2018 -0700 drm/i915/mst: Do not retrain new links The short pulse handler checks if channel equalization is okay and goes onto retrain a link if there are active MST links. This retraining path is not meant for new MST connections, but due to a bug elsewhere, if active_mst_links is < 0 the boolean check for active_mst_links passes and we proceed to retrain a new link. This results in a sequence of failed link training attempts, most likely due to the hardware not setup for link training at that point i.e., missing the DDI pre_enable sequence. [ 80.301272] [drm:intel_dp_check_mst_status] channel EQ not ok, retraining [ 80.301312] [drm:intel_ddi_prepare_link_retrain] *ERROR* Timeout waiting for DDI BUF C idle bit The above error gives us a hint something went wrong before link training started. Check for a positive value of active_mst_links and throw in a warning for invalid active_mst_links as debug aid. Cc: Nathan Ciobanu Cc: Rodrigo Vivi Signed-off-by: Dhinakaran Pandiyan Tested-by: Nathan Ciobanu Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20180718171943.3246-1-dhinakaran.pandiyan@intel.com commit bc334d914eeee02eddefd7be533acafd9a042ade Author: Paulo Zanoni Date: Tue Jul 24 17:28:13 2018 -0700 drm/i915/icl: toggle PHY clock gating around link training The Gen11 TypeC PHY DDI Buffer chapter, PHY Clock Gating Programming section says that PHY clock gating should be disabled before starting voltage swing programming, then enabled after any link training is complete. v2: Simple rebase. Cc: Animesh Manna Cc: Manasi Navare Reviewed-by: Maarten Lankhorst (v1) Signed-off-by: Paulo Zanoni Link: https://patchwork.freedesktop.org/patch/msgid/20180725002813.6938-6-paulo.r.zanoni@intel.com commit 340a44bef2342b0ff7334017e9e821645fa8ae43 Author: Paulo Zanoni Date: Tue Jul 24 17:28:12 2018 -0700 drm/i915/icl: program MG_DP_MODE Programming this register is part of the Enable Sequence for DisplayPort on ICL. Do as the spec says. v2: Simple rebase. Cc: Animesh Manna Reviewed-by: Maarten Lankhorst (v1) Signed-off-by: Paulo Zanoni Link: https://patchwork.freedesktop.org/patch/msgid/20180725002813.6938-5-paulo.r.zanoni@intel.com commit db7295c2c4efb56efab7f6fe0fc3c646d200630a Author: Animesh Manna Date: Tue Jul 24 17:28:11 2018 -0700 drm/i915/icl: Update FIA supported lane count for hpd. In ICL, Flexible IO Adapter (FIA) muxes data and clocks of USB 3.1, tbt and display controller. In DP alt mode FIA configure the number of lanes and will be used apart from DPCD read to calculate max available lanes for DP enablement. v2 (from Paulo): Simple rebase. Reviewed-by: Anusha Srivatsa (v1). Reviewed-by: Rodrigo Vivi Signed-off-by: Animesh Manna [Paulo: significant rewrite of the patch.] Signed-off-by: Paulo Zanoni Link: https://patchwork.freedesktop.org/patch/msgid/20180725002813.6938-4-paulo.r.zanoni@intel.com commit 6075546f57f8fb56a95070adf9602687a01fd49b Author: Paulo Zanoni Date: Tue Jul 24 17:28:10 2018 -0700 drm/i915/icl: store the port type for TC ports The type is detected based on the live status bits. Once detected, it's not supposed to be changed, so we have some sanity checks for that. v2: Rebase. Cc: Animesh Manna Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi Signed-off-by: Paulo Zanoni Link: https://patchwork.freedesktop.org/patch/msgid/20180725002813.6938-3-paulo.r.zanoni@intel.com commit b9fcddab4afbac67660410009828eae83b6f3a36 Author: Paulo Zanoni Date: Wed Jul 25 12:59:27 2018 -0700 drm/i915/icl: implement icl_digital_port_connected() Do like the other functions and check for the status bits. The "Hot Plug Detection" page from our documentation says we can't just use the ISR bits on the CPU side (North Display, which has the TC and TBT modes), so use the correct register: DFLEXDPSP, TC Live State field. v2: Rebase. v3: - Simplify true/false assignment (Rodrigo). - Reorganize is_gen if ladder (Rodrigo). - Don't use the ISR for TC/TBT CPU bits. v4: - Improve commit message wording (Lucas). v5: - COMMIT_LOG_LONG_LINE (Checkpatch). Cc: Animesh Manna Cc: Rodrigo Vivi Cc: Lucas De Marchi Reviewed-by: Lucas De Marchi (v3). Signed-off-by: Rodrigo Vivi Signed-off-by: Paulo Zanoni Link: https://patchwork.freedesktop.org/patch/msgid/20180725195927.12059-1-paulo.r.zanoni@intel.com commit 4de737a26e6a251c86ff1e96667aebc5eecf9456 Author: Nathan Ciobanu Date: Tue Jul 24 15:33:32 2018 -0700 drm/i915/dp: Improve clock recovery loop limit comment Clarifies the clock recovery loop limit comment that 80 max_cr_tries for pre-DP1.4 devices was chosen as a very tolerant upper bound. Assumptions made: - DP1.4 syncs should be smarter so they won't need more than 10 tries - pre-DP1.4 syncs should be compliant enough to not need that many tries (80) but we should tolerate any that may trigger this corner case Cc: Dhinakaran Pandiyan Cc: Rodrigo Vivi Cc: Marc Herbert Suggested-by: Marc Herbert Signed-off-by: Nathan Ciobanu Reviewed-by: Marc Herbert Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/1532471612-30001-1-git-send-email-nathan.d.ciobanu@linux.intel.com commit 5e03f02cb58d1cee5d98f323da9abe2e7073b2b4 Author: Archit Taneja Date: Mon Jul 9 14:37:51 2018 +0530 dt-bindings: mipi-dsi: Add dual-channel DSI related info Add binding info for peripherals that support dual-channel DSI. Add corresponding optional bindings for DSI host controllers that may be configured in this mode. Add an example of an I2C controlled device operating in dual-channel DSI mode. Reviewed-by: Rob Herring Reviewed-by: Philippe Cornu Reviewed-by: Sean Paul Reviewed-by: Heiko Stuebner Signed-off-by: Archit Taneja Link: https://patchwork.freedesktop.org/patch/msgid/20180709090751.10221-3-architt@codeaurora.org commit 9b32f8951f0f3f8e07c0682d853f5aaf77603aef Author: Archit Taneja Date: Mon Jul 9 14:37:50 2018 +0530 dt-bindings: mipi-dsi: Add info about peripherals with non-DSI control bus Add a section that describes dt-bindings for peripherals that support MIPI DSI, but have a different bus as the primary control bus, or no control bus at all. Add an example for a peripheral with a non-DSI control bus. Reviewed-by: Rob Herring Reviewed-by: Boris Brezillon Reviewed-by: Philippe Cornu Reviewed-by: Sean Paul Signed-off-by: Archit Taneja Link: https://patchwork.freedesktop.org/patch/msgid/20180709090751.10221-2-architt@codeaurora.org commit 3970c65c2b47c450f917bc8a29c5849563a95dfe Author: Chris Wilson Date: Mon Jul 23 15:53:35 2018 +0100 drm/i915: Skip repeated calls to i915_gem_set_wedged() If we already wedged, i915_gem_set_wedged() becomes a complicated no-op. References: https://bugs.freedesktop.org/show_bug.cgi?id=107343 Signed-off-by: Chris Wilson Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20180723145335.24579-1-chris@chris-wilson.co.uk commit 07685c827b2a020c88c25a6961c435050bbbe7b3 Author: Manasi Navare Date: Thu Jun 28 15:35:44 2018 -0700 drm/i915/icl: Implement voltage swing programming sequence for MG PHY DDI This sequence is used to setup voltage swing before enabling MG PHY DDI as well as for changing the voltage during DisplayPort Link training. For ICL, there are two types of DDIs. This sequence needs to be used for MG PHY DDI which is ports C-F. v6 (From Manasi): * Add programming for MG_CLKHUB and MG_TX_DCC as per the spec updates v5 (from Paulo): * Checkpatch. v4 (from Paulo): * Fix bogus error message * Fix copy+paste bugs (missing s/TX1/TX2/ after copy+paste) * Use the new mask names * Stay under 80 columns * Add some blank lines v3: * Clear the regs before writing (Paulo) v2: * Rename to MG PHY in the function def (Jani Nikula) * Rebase on top of new revision of other patches in series Cc: Rodrigo Vivi Cc: Jani Nikula Reviewed-by: Paulo Zanoni Signed-off-by: Manasi Navare Signed-off-by: Paulo Zanoni Link: https://patchwork.freedesktop.org/patch/msgid/1530225344-20373-2-git-send-email-manasi.d.navare@intel.com commit a38bb309c2ce25a562819949a19fefa38ae8ab96 Author: Manasi Navare Date: Fri Jul 13 12:43:13 2018 -0700 drm/i915/icl: Add remaining registers and bitfields for MG PHY DDI This patch adds the remaining register definitions and bit fields required for MG PHy DDI buffer initializations and voltage swing programming for MG PHy DDI ports. While at it this patch also fixes the naming for previously defined MG PHY registers in original commit id (c92f47b5ec977a "drm/i915/icl: Add register defs for voltage swing sequences for MG PHY DDI"). Since the MG PHY registers are first defined in ICL platform, there is no need for _ICL prefix. v4 (from Paulo): add two white spaces to CRI_CALCINIT too. v3: * Fix register names, add spaces for MASK defines, correct the order of #defines (Paulo) v2: * Change the MG_TX_DRVCTL registers names to match the spec (Anusha) Cc: James Ausmus Reviewed-by: Paulo Zanoni Signed-off-by: Manasi Navare Signed-off-by: Paulo Zanoni Link: https://patchwork.freedesktop.org/patch/msgid/1531510993-6606-1-git-send-email-manasi.d.navare@intel.com commit 0305189afb323c1bad2be7fe713d556a9b708003 Author: Jernej Skrabec Date: Tue Jul 10 22:35:06 2018 +0200 drm/sun4i: tcon: Add support for R40 TCON R40 TV TCON is basically the same as on A83T. However, it needs special handling, because it has to set up TCON TOP muxes at runtime. Reviewed-by: Chen-Yu Tsai Signed-off-by: Jernej Skrabec Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20180710203511.18454-14-jernej.skrabec@siol.net commit cf77d79b4e296d3c65aefa094232694a5977ea9a Author: Jernej Skrabec Date: Tue Jul 10 22:35:05 2018 +0200 drm/sun4i: tcon: Add another way for matching mixers with tcon Till now, new way of matching engines with TCONs was reading their respective ids and match them by those ids. However, with introduction of TCON TOP, that might not be so straightforward anymore. - there might be more TCONs that engines (mixers) - TCON ids might have non-consecutive ids Workaround that by matching mixer id with TCON index from TCON list. For example, R40 has 2 mixers and 4 TCONs. Board designer can choose 2 outputs, which are connected to any of those 4 TCONs. As long as there are only 2 TCONs enabled in DT, using index in list as alternative id, will allow to match them with mixer 0 and 1. Reviewed-by: Chen-Yu Tsai Signed-off-by: Jernej Skrabec Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20180710203511.18454-13-jernej.skrabec@siol.net commit 2aafafab5a9ad922ae13d04f5abca7942a499a5e Author: Ayan Kumar Halder Date: Mon Jul 23 09:57:00 2018 +0100 drm/sun4i: Use (struct drm_format_info) fields to determine if a format is yuv and multi planar or not. We do not need sun4i_backend_format_is_packed_yuv422() / sun4i_backend_format_is_planar_yuv() to determine if the format is yuv multi planar or not. (struct drm_format_info *)->is_yuv tells if the format is yuv or not. And (struct drm_format_info *)->num_planes denotes the number of planes. This issue was identified during a review on a previous patch:- https://lists.freedesktop.org/archives/dri-devel/2018-July/183840.html Signed-off-by: Ayan Kumar halder Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/1532336220-3791-1-git-send-email-ayan.halder@arm.com commit a5b22b5ed88bfb848d40d3c593f5506bdb75c882 Author: Chris Wilson Date: Fri Jul 20 12:11:02 2018 +0100 drm/i915: Show stack (by WARN) for hitting forcewake errors On Sandybridge, we need a workaround to wait for the CPU thread to wake up before we are sure that we have enabled the GT power well. However, we do see the errors being reported and failed reads returning spurious results. To try and capture more details as it fails, promote the error into a WARN so we grab the stacktrace, and to try and reduce the frequency of error increase the timeout from 500us to 5ms. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20180720111102.11549-1-chris@chris-wilson.co.uk commit 6a2f59e45afc6277cb3e9c9dec466935bb8a8295 Author: Chris Wilson Date: Sat Jul 21 13:50:37 2018 +0100 drm/i915: Pull unpin map into vma release A reasonably common operation is to pin the map of the vma alongside the vma itself for the lifetime of the vma, and so release both pins at the same time as destroying the vma. It is common enough to pull into the release function, making that central function more attractive to a couple of other callsites. The continual ulterior motive is to sweep over errors on module load aborting... Testcase: igt/drv_module_reload/basic-reload-inject Signed-off-by: Chris Wilson Cc: Michał Winiarski Cc: Michal Wajdeczko Reviewed-by: Michał Winiarski Link: https://patchwork.freedesktop.org/patch/msgid/20180721125037.20127-1-chris@chris-wilson.co.uk commit 102506d52922345cf17af362b94b869cffefbbe1 Author: Nathan Ciobanu Date: Fri Jul 20 14:44:13 2018 -0700 drm/i915/dp: Refactor max_vswing_tries variable Changes the type and renames the max_vswing_tries variable which was declared as an integer but used as a boolean making it easy to be confused with a counter. Changes in v2: - updated the title and commit message - left the loop exit point in place v3: fix typo in title v4: renamed max_vswing to max_vswing_reached (Ville) Cc: Dhinakaran Pandiyan Cc: Rodrigo Vivi Cc: Marc Herbert Signed-off-by: Nathan Ciobanu Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20180720214413.29506-2-rodrigo.vivi@intel.com commit bb5ffe6fd58cd37f1cade411c4a00745ed0fbbd1 Author: Nathan Ciobanu Date: Fri Jul 20 14:44:12 2018 -0700 drm/i915/dp: Limit link training clock recovery loop Limit the link training clock recovery loop to 10 attempts at LANEx_CR_DONE per DP 1.4 spec section 3.5.1.2.2 and 80 attempts for pre-DP 1.4 (4 voltage levels x 4 preemphasis levels x x 5 identical voltages tries). Some faulty USB-C MST hubs can cause us to get stuck in this loop indefinitely requesting something like: voltage swing: 0, pre-emphasis level: 2 voltage swing: 1, pre-emphasis level: 2 voltage swing: 0, pre-emphasis level: 3 over and over so max_vswing would never be reached, drm_dp_clock_recovery_ok() would never return true and voltage_tries would always get reset to 1. The driver sends those values to the hub but the hub keeps requesting new values every time. Changes in v2: - updated commit message (DK, Manasi) - defined DP_DP14_MAX_CR_TRIES (Marc) - made the loop iterate for max 10 times (Rodrigo, Marc) Changes in v3: - changed error message to use DP_DP14_MAX_CR_TRIES Changes in v4: - Updated the title to reflect the change - Updated the commit message - Added 80 attempts for pre-DP 1.4 devices Changes in v5: - Removed DP_DP14_MAX_CR_TRIES from drm v6: Updated comment to match kernel style (Rodrigo) Cc: Dhinakaran Pandiyan Cc: Rodrigo Vivi Cc: Marc Herbert Cc: Manasi Navare Signed-off-by: Nathan Ciobanu Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20180720214413.29506-1-rodrigo.vivi@intel.com commit 4eaf317a60fbea0555b936035002ca9bd9b9105d Author: Michał Winiarski Date: Thu Jul 12 17:53:30 2018 +0200 drm/i915/kvmgt: Fix compilation error gvt_pin_guest_page extracted some of the gvt_dma_map_page functionality: commit 79e542f5af79 ("drm/i915/kvmgt: Support setting dma map for huge pages") And yet, part of it was reintroduced in: commit 39b4cbadb9a9 ("drm/i915/kvmgt: Check the pfn got from vfio_pin_pages") Causing kvmgt part to no longer build. Let's remove it. Reported-by: Tomasz Lis Signed-off-by: Michał Winiarski Cc: Changbin Du Cc: Zhenyu Wang Acked-by: Zhenyu Wang Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20180712155330.32055-1-michal.winiarski@intel.com commit 574e0fbfc95e7fccc3b8321f25e1e4366ce72ad2 Author: Thomas Zimmermann Date: Tue Jul 17 13:09:27 2018 +0200 drm/rockchip: 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: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20180717110927.30776-1-tzimmermann@suse.de commit c74a7469f97c0f40b46e82ee979f9fb1bb6e847c Merge: 6f15a7de86c8 500775074f88 Author: Rodrigo Vivi Date: Mon Jul 23 09:13:12 2018 -0700 Merge drm/drm-next into drm-intel-next-queued We need a backmerge to get DP_DPCD_REV_14 before we push other i915 changes to dinq that could break compilation. Signed-off-by: Rodrigo Vivi commit a31ac0b23cb8ae832d49162bd217b2727154889b Author: Oleksandr Andrushchenko Date: Thu Jul 19 12:37:13 2018 +0300 drm: Replace NULL with error value in drm_prime_pages_to_sg Dan Carpenter has reported that there is the following static checker warning: drivers/gpu/drm/drm_prime.c:317 drm_gem_map_dma_buf() warn: 'sgt' can also be NULL 314 sgt = obj->dev->driver->gem_prime_get_sg_table(obj); 315 316 if (!IS_ERR(sgt)) { 317 if (!dma_map_sg_attrs(attach->dev, sgt->sgl, sgt->nents, dir, Problematic functions are xen_drm_front_gem_get_sg_table and drm_gem_cma_prime_get_sg_table. Fix those by replacing NULL with error value. Signed-off-by: Oleksandr Andrushchenko Reported-by: Dan Carpenter Reviewed-by: Dan Carpenter Link: https://patchwork.freedesktop.org/patch/msgid/20180719093713.3643-1-andr2000@gmail.com commit 6f15a7de86c8cf2dc09fc9e6d07047efa40ef809 Author: Anusha Srivatsa Date: Fri Jul 20 14:42:42 2018 -0700 drm/i915/dsc: Add missing _MMIO() from PPS registers This patch fixes the commit - <2efbb2f099fb> ("i915/dp/dsc: Add DSC PPS register definitions"), which did not have _MMIO() for DSCA and DSCC. v2: Fix typos. (manasi) v3: Change the commit message (Rodrigo) Cc: Rodrigi Vivi Cc: Manasi Navare Signed-off-by: Anusha Srivatsa Reviewed-by: Manasi Navare Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/1532122962-9068-1-git-send-email-anusha.srivatsa@intel.com commit 7a72c78bdd0a1ea1d879610542679cc680398220 Author: Rodrigo Vivi Date: Thu Jul 19 17:31:55 2018 -0700 drm/i915: Fix psr sink status report. First of all don't try to read dpcd if PSR is not even supported. But also, if read failed return -EIO instead of reporting via a backchannel. v2: fix dev_priv: At this level m->private is the connector. (CI/DK) don't convert dpcd read errors to EIO. (DK) Fixes: 5b7b30864d1d ("drm/i915/psr: Split sink status into a separate debugfs node") Cc: Chris Wilson Cc: Dhinakaran Pandiyan Cc: José Roberto de Souza Signed-off-by: Rodrigo Vivi Reviewed-by: Dhinakaran Pandiyan Link: https://patchwork.freedesktop.org/patch/msgid/20180720003155.16290-1-rodrigo.vivi@intel.com commit 6bd31b3798c83b611737097d98008663a2f5d065 Author: Rodrigo Vivi Date: Thu Jul 19 16:42:17 2018 -0700 drm/i915: Remove unused "ret" variable. Just a small clean-up with no functional change, only removing a variable that is never actually used. Cc: Dhinakaran Pandiyan Signed-off-by: Rodrigo Vivi Reviewed-by: Reviewed-by: Nathan Ciobanu Link: https://patchwork.freedesktop.org/patch/msgid/20180719234217.7855-1-rodrigo.vivi@intel.com commit 900ccf30f9e112b508a61b228bf014e3bea14bc4 Author: Chris Wilson Date: Fri Jul 20 11:19:10 2018 +0100 drm/i915: Only force GGTT coherency w/a on required chipsets Not all chipsets have an internal buffer delaying the visibility of writes via the GGTT being visible by other physical paths, but we use a very heavy workaround for all. We only need to apply that workarounds to the chipsets we know suffer from the delay and the resulting coherency issue. Similarly, the same inconsistent coherency fouls up our ABI promise that a write into a mmap_gtt is immediately visible to others. Since the HW has made that a lie, let userspace know when that contract is broken. (Not that userspace would want to use mmap_gtt on those chipsets for other performance reasons...) Testcase: igt/drv_selftest/live_coherency Testcase: igt/gem_mmap_gtt/coherency Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100587 Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Reviewed-by: Tomasz Lis Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20180720101910.11153-1-chris@chris-wilson.co.uk commit 35e900818e177d9ae34988d15461792582937924 Author: Chris Wilson Date: Fri Jul 20 10:51:44 2018 +0100 drm/i915: Suppress assertion for i915_ggtt_disable_guc Another step in the drv_module_reload fault-injection saga, is that we try to disable the guc twice. Probably. It's a little unclear exactly what is going on in the unload sequence that catches us out, so for the time being suppress the assertion to get the test re-enabled. Testcase: igt/drv_module_reload/basic-reload-inject Signed-off-by: Chris Wilson Cc: Michał Winiarski Cc: Michal Wajdeczko Acked-by: Michał Winiarski Link: https://patchwork.freedesktop.org/patch/msgid/20180720095144.5885-1-chris@chris-wilson.co.uk commit f7a738fca03c8dae6a1b448393989cc9f612198d Author: Paulo Zanoni Date: Wed Jul 11 14:59:02 2018 -0700 drm/i915/icl: compute the TBT PLL registers Use the hardcoded tables provided by our spec. v2: - SSC stays disabled. - Use intel_port_is_tc(). Cc: Anusha Srivatsa Reviewed-by: Rodrigo Vivi Signed-off-by: Paulo Zanoni Link: https://patchwork.freedesktop.org/patch/msgid/20180711215909.23945-2-paulo.r.zanoni@intel.com commit 516a49cc19467e298d08a404f73a6e311f4548d1 Author: Azhar Shaikh Date: Fri Jul 6 11:37:30 2018 -0700 drm/i915: Fix assert_plane() warning on bootup with external display On KBL, WHL RVPs, booting up with an external display connected, triggers below warning, when the BiOS brings up the external display too. This warning is not seen during hotplug. [ 3.615226] ------------[ cut here ]------------ [ 3.619829] plane 1A assertion failure (expected on, current off) [ 3.632039] WARNING: CPU: 2 PID: 354 at drivers/gpu/drm/i915/intel_display.c:1294 assert_plane+0x71/0xbb [ 3.633920] iwlwifi 0000:00:14.3: loaded firmware version 38.c0e03d94.0 op_mode iwlmvm [ 3.647157] Modules linked in: iwlwifi cfg80211 btusb btrtl btbcm btintel bluetooth ecdh_generic [ 3.647163] CPU: 2 PID: 354 Comm: frecon Not tainted 4.17.0-rc7-50176-g655af12d39c2 #3 [ 3.647165] Hardware name: Intel Corporation CoffeeLake Client Platform/WhiskeyLake U DDR4 ERB, BIOS CNLSFWR1.R00.X140.B00.1804040304 04/04/2018 [ 3.684509] RIP: 0010:assert_plane+0x71/0xbb [ 3.764451] Call Trace: [ 3.766888] intel_atomic_commit_tail+0xa97/0xb77 [ 3.771569] intel_atomic_commit+0x26a/0x279 [ 3.771572] drm_atomic_helper_set_config+0x5c/0x76 [ 3.780670] __drm_mode_set_config_internal+0x66/0x109 [ 3.780672] drm_mode_setcrtc+0x4c9/0x5cc [ 3.780674] ? drm_mode_getcrtc+0x162/0x162 [ 3.789774] ? drm_mode_getcrtc+0x162/0x162 [ 3.798108] drm_ioctl_kernel+0x8d/0xe4 [ 3.801926] drm_ioctl+0x27d/0x368 [ 3.805311] ? drm_mode_getcrtc+0x162/0x162 [ 3.805314] ? selinux_file_ioctl+0x14e/0x199 [ 3.805317] vfs_ioctl+0x21/0x2f [ 3.813812] do_vfs_ioctl+0x491/0x4b4 [ 3.813813] ? security_file_ioctl+0x37/0x4b [ 3.813816] ksys_ioctl+0x55/0x75 [ 3.820672] __x64_sys_ioctl+0x1a/0x1e [ 3.820674] do_syscall_64+0x51/0x5f [ 3.820678] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [ 3.828221] RIP: 0033:0x7b5e04953967 [ 3.835504] RSP: 002b:00007fff2eafb6f8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 3.835505] RAX: ffffffffffffffda RBX: 0000000000000002 RCX: 00007b5e04953967 [ 3.835505] RDX: 00007fff2eafb730 RSI: 00000000c06864a2 RDI: 000000000000000f [ 3.835506] RBP: 00007fff2eafb720 R08: 0000000000000000 R09: 0000000000000000 [ 3.835507] R10: 0000000000000070 R11: 0000000000000246 R12: 000000000000000f [ 3.879988] R13: 000056bc9dd7d210 R14: 00007fff2eafb730 R15: 00000000c06864a2 [ 3.887081] Code: 48 c7 c7 06 71 a5 be 84 c0 48 c7 c2 06 fd a3 be 48 89 f9 48 0f 44 ca 84 db 48 0f 45 d7 48 c7 c7 df d3 a4 be 31 c0 e8 af a0 c0 ff <0f> 0b eb 2b 48 c7 c7 06 fd a3 be 84 c0 48 c7 c2 06 71 a5 be 48 [ 3.905845] WARNING: CPU: 2 PID: 354 at drivers/gpu/drm/i915/intel_display.c:1294 assert_plane+0x71/0xbb [ 3.920964] ---[ end trace dac692f4ac46391a ]--- The warning is seen when mode_setcrtc() is called for pipeB during bootup and before we get a mode_setcrtc() for pipeA, while doing update_crtcs() in intel_atomic_commit_tail(). Now since, plane1A is still active after commit, update_crtcs() is done for pipeA and eventually update_plane() for plane1A. intel_plane_state->ctl for plane1A is not updated since set_modecrtc() is called for pipeB. So intel_plane_state->ctl for plane 1A will be 0x0. So doing an update_plane() for plane1A, will result in clearing PLANE_CTL_ENABLE bit, and hence the warning. To fix this warning, force all active planes to recompute their states in probe. Changes in v8: - Actually add Reviewed-by: Ville Syrjälä Changes in v7: - Move call to intel_initial_commit() after sanitize_watermarks() Otherwise the plane update will still consult potentially bogus watermarks we read out from the hardware. (Ville) - Carry Reviewed-by: Ville Syrjälä from v6 Changes in v6: - Handle EDEADLK for drm_atomic_get_crtc_state() and drm_atomic_add_affected_planes() - Remove optimization of calling intel_initial_commit() only when there is more than one active pipe in probe. - Avoid using intel_ types. Changes in v5: - Drop drm_modeset_lock_all_ctx() since locks will be taken later. Changes in v4: - Handle locking in intel_initial_commit() - Move the for loop inside intel_initial_commit() so that drm_atomic_commit() is called only once - Call intel_initial_commit() only for more than one active crtc on boot. - Save the return value of intel_initial_commit() and print a message in case of an error Changes in v3: - Add comments Changes in v2: - Force all planes to recompute their states.(Ville Syrjälä) - Update the commit message Signed-off-by: Azhar Shaikh Reviewed-by: Ville Syrjälä Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/1530902250-44583-1-git-send-email-azhar.shaikh@intel.com commit 106b6c39c870c1f7628ba41693e571f419b1981d Author: Lyude Paul Date: Wed Jul 18 17:57:16 2018 -0400 drm/print: Fix DRM_DEBUG_DP macro This isn't supposed to take dev as an argument, I guess no one noticed! Signed-off-by: Lyude Paul Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20180718215716.5784-1-lyude@redhat.com commit 5f9c4f95bed24c8a8ad9258ee120a910876f6eed Author: Chris Wilson Date: Tue Jul 17 10:57:51 2018 +0100 drm/i915/gtt: Full ppgtt everywhere, no excuses We believe we have all the kinks worked out, even for the early Valleyview devices, for whom we currently disable all ppgtt. References: 62942ed7279d ("drm/i915/vlv: disable PPGTT on early revs v3") Signed-off-by: Chris Wilson Cc: Ville Syrjälä Cc: Joonas Lahtinen Reviewed-by: Joonas Lahtinen Acked-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180717095751.1034-2-chris@chris-wilson.co.uk commit 79556df293b2efbb3ccebb6db02120d62e348b44 Author: Chris Wilson Date: Tue Jul 17 10:57:50 2018 +0100 drm/i915/gtt: Enable full-ppgtt by default everywhere We should we have all the kinks worked out and full-ppgtt now works reliably on gen7 (Ivybridge, Valleyview/Baytrail and Haswell). If we can let userspace have full control over their own ppgtt, it makes softpinning far more effective, in turn making GPU dispatch far more efficient by virtue of better mm segregation. On the other hand, switching over to a different GTT for every client does incur noticeable overhead, but only for very lightweight tasks. Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: Mika Kuoppala Cc: Matthew Auld Reviewed-by: Joonas Lahtinen Cc: Jason Ekstrand Cc: Kenneth Graunke Acked-by: Kenneth Graunke Link: https://patchwork.freedesktop.org/patch/msgid/20180717095751.1034-1-chris@chris-wilson.co.uk commit dcf496a6a608733ef18a2f757b55111df9eadca6 Author: Paul Kocialkowski Date: Thu Jul 19 10:08:38 2018 +0200 drm/sun4i: sun4i: Introduce a quirk for lowest plane alpha support Not all sunxi platforms with the first version of the Display Engine support an alpha component on the plane with the lowest z position (as in: lowest z-pos), that gets blended with the background color. In particular, the A13 is known to have this limitation. However, it was recently discovered that the A20 and A33 are capable of having alpha on their lowest plane. Thus, this introduces a specific quirk to indicate such support, per-platform. Since this was not tested on sun4i and sun6i platforms, a conservative approach is kept and this feature is not supported. Signed-off-by: Paul Kocialkowski Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20180719080838.31598-2-paul.kocialkowski@bootlin.com commit e527cd9e48e33e8caffc0b00a4f5bd1add0b3d09 Author: Paul Kocialkowski Date: Thu Jul 19 10:08:37 2018 +0200 drm/sun4i: sun4i: Register quirks with the backend structure In prevision for introducing a new quirk that will be used at atomic plane check time, register the quirks structure with the backend structure. This way, it can easily be grabbed where needed. Signed-off-by: Paul Kocialkowski Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20180719080838.31598-1-paul.kocialkowski@bootlin.com commit 490cda5a3c82c4a6a0bbdffe783eb48aec25511a Author: Giulio Benetti Date: Wed Jul 18 16:23:57 2018 +0200 drm/sun4i: Handle DRM_BUS_FLAG_PIXDATA_*EDGE checking if panel is used. Handle both positive and negative dclk polarity, according to bus_flags, taking care of this: On A20 and similar SoCs, the only way to achieve Positive Edge (Rising Edge), is setting dclk clock phase to 2/3(240°). By default TCON works in Negative Edge(Falling Edge), this is why phase is set to 0 in that case. Unfortunately there's no way to logically invert dclk through IO_POL register. The only acceptable way to work, triple checked with scope, is using clock phase set to 0° for Negative Edge and set to 240° for Positive Edge. On A33 and similar SoCs there would be a 90° phase option, but it divides also dclk by 2. This patch is a way to avoid quirks all around TCON and DOTCLOCK drivers for using A33 90° phase divided by 2 and consequently increase code complexity. Check if panel is used. TCON can also handle VGA DAC, then panel could be empty. Signed-off-by: Giulio Benetti Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20180718142357.120998-1-giulio.benetti@micronovasrl.com